PageSourceSearch

https://admin-dashboard-od19.onrender.com/assets/plugins/global/plugins.bundle.js

js admin-dashboard-od19.onrender.com collected 2026-10-03 11:38:56 UTC 3,706,494 bytes, 74,191 lines download raw bytes

1/*!
2 * jQuery JavaScript Library v3.6.0
3 * https://jquery.com/
4 *
5 * Includes Sizzle.js
6 * https://sizzlejs.com/
7 *
8 * Copyright OpenJS Foundation and other contributors
9 * Released under the MIT license
10 * https://jquery.org/license
11 *
12 * Date: 2021-03-02T17:08Z
13 */
14( function( global, factory ) {
15
16	"use strict";
vendor: 6,502 bytes, lines 16-262
16
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		// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5
84		// Plus for old WebKit, typeof returns "function" for HTML collections
85		// (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756)
86		return typeof obj === "function" && typeof obj.nodeType !== "number" &&
87			typeof obj.item !== "function";
88	};
89
90
91var isWindow = function isWindow( obj ) {
92		return obj != null && obj === obj.window;
93	};
94
95
96var document = window.document;
97
98
99
100	var preservedScriptAttributes = {
101		type: true,
102		src: true,
103		nonce: true,
104		noModule: true
105	};
106
107	function DOMEval( code, node, doc ) {
108		doc = doc || document;
109
110		var i, val,
111			script = doc.createElement( "script" );
112
113		script.text = code;
114		if ( node ) {
115			for ( i in preservedScriptAttributes ) {
116
117				// Support: Firefox 64+, Edge 18+
118				// Some browsers don't support the "nonce" property on scripts.
119				// On the other hand, just using `getAttribute` is not enough as
120				// the `nonce` attribute is reset to an empty string whenever it
121				// becomes browsing-context connected.
122				// See https://github.com/whatwg/html/issues/2369
123				// See https://html.spec.whatwg.org/#nonce-attributes
124				// The `node.getAttribute` check was added for the sake of
125				// `jQuery.globalEval` so that it can fake a nonce-containing node
126				// via an object.
127				val = node[ i ] || node.getAttribute && node.getAttribute( i );
128				if ( val ) {
129					script.setAttribute( i, val );
130				}
131			}
132		}
133		doc.head.appendChild( script ).parentNode.removeChild( script );
134	}
135
136
137function toType( obj ) {
138	if ( obj == null ) {
139		return obj + "";
140	}
141
142	// Support: Android <=2.3 only (functionish RegExp)
143	return typeof obj === "object" || typeof obj === "function" ?
144		class2type[ toString.call( obj ) ] || "object" :
145		typeof obj;
146}
147/* global Symbol */
148// Defining this global in .eslintrc.json would create a danger of using the global
149// unguarded in another place, it seems safer to define global only for this module
150
151
152
153var
154	version = "3.6.0",
155
156	// Define a local copy of jQuery
157	jQuery = function( selector, context ) {
158
159		// The jQuery object is actually just the init constructor 'enhanced'
160		// Need init if jQuery is called (just allow error to be thrown if not included)
161		return new jQuery.fn.init( selector, context );
162	};
163
164jQuery.fn = jQuery.prototype = {
165
166	// The current version of jQuery being used
167	jquery: version,
168
169	constructor: jQuery,
170
171	// The default length of a jQuery object is 0
172	length: 0,
173
174	toArray: function() {
175		return slice.call( this );
176	},
177
178	// Get the Nth element in the matched element set OR
179	// Get the whole matched element set as a clean array
180	get: function( num ) {
181
182		// Return all the elements in a clean array
183		if ( num == null ) {
184			return slice.call( this );
185		}
186
187		// Return just the one element from the set
188		return num < 0 ? this[ num + this.length ] : this[ num ];
189	},
190
191	// Take an array of elements and push it onto the stack
192	// (returning the new matched element set)
193	pushStack: function( elems ) {
194
195		// Build a new jQuery matched element set
196		var ret = jQuery.merge( this.constructor(), elems );
197
198		// Add the old object onto the stack (as a reference)
199		ret.prevObject = this;
200
201		// Return the newly-formed element set
202		return ret;
203	},
204
205	// Execute a callback for every element in the matched set.
206	each: function( callback ) {
207		return jQuery.each( this, callback );
208	},
209
210	map: function( callback ) {
211		return this.pushStack( jQuery.map( this, function( elem, i ) {
212			return callback.call( elem, i, elem );
213		} ) );
214	},
215
216	slice: function() {
217		return this.pushStack( slice.apply( this, arguments ) );
218	},
219
220	first: function() {
221		return this.eq( 0 );
222	},
223
224	last: function() {
225		return this.eq( -1 );
226	},
227
228	even: function() {
229		return this.pushStack( jQuery.grep( this, function( _elem, i ) {
230			return ( i + 1 ) % 2;
231		} ) );
232	},
233
234	odd: function() {
235		return this.pushStack( jQuery.grep( this, function( _elem, i ) {
236			return i % 2;
237		} ) );
238	},
239
240	eq: function( i ) {
241		var len = this.length,
242			j = +i + ( i < 0 ? len : 0 );
243		return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
244	},
245
246	end: function() {
247		return this.prevObject || this.constructor();
248	},
249
250	// For internal use only.
251	// Behaves like an Array's method, not like a jQuery method.
252	push: push,
253	sort: arr.sort,
254	splice: arr.splice
255};
256
257jQuery.extend = jQuery.fn.extend = function() {
258	var options, name, src, copy, copyIsArray, clone,
259		target = arguments[ 0 ] || {},
260		i = 1,
261		length = arguments.length,
262		deep = false;
vendor: 180,765 bytes, lines 263-6949
263
264	// Handle a deep copy situation
265	if ( typeof target === "boolean" ) {
266		deep = target;
267
268		// Skip the boolean and the target
269		target = arguments[ i ] || {};
270		i++;
271	}
272
273	// Handle case when target is a string or something (possible in deep copy)
274	if ( typeof target !== "object" && !isFunction( target ) ) {
275		target = {};
276	}
277
278	// Extend jQuery itself if only one argument is passed
279	if ( i === length ) {
280		target = this;
281		i--;
282	}
283
284	for ( ; i < length; i++ ) {
285
286		// Only deal with non-null/undefined values
287		if ( ( options = arguments[ i ] ) != null ) {
288
289			// Extend the base object
290			for ( name in options ) {
291				copy = options[ name ];
292
293				// Prevent Object.prototype pollution
294				// Prevent never-ending loop
295				if ( name === "__proto__" || target === copy ) {
296					continue;
297				}
298
299				// Recurse if we're merging plain objects or arrays
300				if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
301					( copyIsArray = Array.isArray( copy ) ) ) ) {
302					src = target[ name ];
303
304					// Ensure proper type for the source value
305					if ( copyIsArray && !Array.isArray( src ) ) {
306						clone = [];
307					} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {
308						clone = {};
309					} else {
310						clone = src;
311					}
312					copyIsArray = false;
313
314					// Never move original objects, clone them
315					target[ name ] = jQuery.extend( deep, clone, copy );
316
317				// Don't bring in undefined values
318				} else if ( copy !== undefined ) {
319					target[ name ] = copy;
320				}
321			}
322		}
323	}
324
325	// Return the modified object
326	return target;
327};
328
329jQuery.extend( {
330
331	// Unique for each copy of jQuery on the page
332	expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
333
334	// Assume jQuery is ready without the ready module
335	isReady: true,
336
337	error: function( msg ) {
338		throw new Error( msg );
339	},
340
341	noop: function() {},
342
343	isPlainObject: function( obj ) {
344		var proto, Ctor;
345
346		// Detect obvious negatives
347		// Use toString instead of jQuery.type to catch host objects
348		if ( !obj || toString.call( obj ) !== "[object Object]" ) {
349			return false;
350		}
351
352		proto = getProto( obj );
353
354		// Objects with no prototype (e.g., `Object.create( null )`) are plain
355		if ( !proto ) {
356			return true;
357		}
358
359		// Objects with prototype are plain iff they were constructed by a global Object function
360		Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;
361		return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString;
362	},
363
364	isEmptyObject: function( obj ) {
365		var name;
366
367		for ( name in obj ) {
368			return false;
369		}
370		return true;
371	},
372
373	// Evaluates a script in a provided context; falls back to the global one
374	// if not specified.
375	globalEval: function( code, options, doc ) {
376		DOMEval( code, { nonce: options && options.nonce }, doc );
377	},
378
379	each: function( obj, callback ) {
380		var length, i = 0;
381
382		if ( isArrayLike( obj ) ) {
383			length = obj.length;
384			for ( ; i < length; i++ ) {
385				if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
386					break;
387				}
388			}
389		} else {
390			for ( i in obj ) {
391				if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
392					break;
393				}
394			}
395		}
396
397		return obj;
398	},
399
400	// results is for internal usage only
401	makeArray: function( arr, results ) {
402		var ret = results || [];
403
404		if ( arr != null ) {
405			if ( isArrayLike( Object( arr ) ) ) {
406				jQuery.merge( ret,
407					typeof arr === "string" ?
408						[ arr ] : arr
409				);
410			} else {
411				push.call( ret, arr );
412			}
413		}
414
415		return ret;
416	},
417
418	inArray: function( elem, arr, i ) {
419		return arr == null ? -1 : indexOf.call( arr, elem, i );
420	},
421
422	// Support: Android <=4.0 only, PhantomJS 1 only
423	// push.apply(_, arraylike) throws on ancient WebKit
424	merge: function( first, second ) {
425		var len = +second.length,
426			j = 0,
427			i = first.length;
428
429		for ( ; j < len; j++ ) {
430			first[ i++ ] = second[ j ];
431		}
432
433		first.length = i;
434
435		return first;
436	},
437
438	grep: function( elems, callback, invert ) {
439		var callbackInverse,
440			matches = [],
441			i = 0,
442			length = elems.length,
443			callbackExpect = !invert;
444
445		// Go through the array, only saving the items
446		// that pass the validator function
447		for ( ; i < length; i++ ) {
448			callbackInverse = !callback( elems[ i ], i );
449			if ( callbackInverse !== callbackExpect ) {
450				matches.push( elems[ i ] );
451			}
452		}
453
454		return matches;
455	},
456
457	// arg is for internal usage only
458	map: function( elems, callback, arg ) {
459		var length, value,
460			i = 0,
461			ret = [];
462
463		// Go through the array, translating each of the items to their new values
464		if ( isArrayLike( elems ) ) {
465			length = elems.length;
466			for ( ; i < length; i++ ) {
467				value = callback( elems[ i ], i, arg );
468
469				if ( value != null ) {
470					ret.push( value );
471				}
472			}
473
474		// Go through every key on the object,
475		} else {
476			for ( i in elems ) {
477				value = callback( elems[ i ], i, arg );
478
479				if ( value != null ) {
480					ret.push( value );
481				}
482			}
483		}
484
485		// Flatten any nested arrays
486		return flat( ret );
487	},
488
489	// A global GUID counter for objects
490	guid: 1,
491
492	// jQuery.support is not used in Core but other projects attach their
493	// properties to it so it needs to exist.
494	support: support
495} );
496
497if ( typeof Symbol === "function" ) {
498	jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
499}
500
501// Populate the class2type map
502jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
503	function( _i, name ) {
504		class2type[ "[object " + name + "]" ] = name.toLowerCase();
505	} );
506
507function isArrayLike( obj ) {
508
509	// Support: real iOS 8.2 only (not reproducible in simulator)
510	// `in` check used to prevent JIT error (gh-2145)
511	// hasOwn isn't used here due to false negatives
512	// regarding Nodelist length in IE
513	var length = !!obj && "length" in obj && obj.length,
514		type = toType( obj );
515
516	if ( isFunction( obj ) || isWindow( obj ) ) {
517		return false;
518	}
519
520	return type === "array" || length === 0 ||
521		typeof length === "number" && length > 0 && ( length - 1 ) in obj;
522}
523var Sizzle =
524/*!
525 * Sizzle CSS Selector Engine v2.3.6
526 * https://sizzlejs.com/
527 *
528 * Copyright JS Foundation and other contributors
529 * Released under the MIT license
530 * https://js.foundation/
531 *
532 * Date: 2021-02-16
533 */
534( function( window ) {
535var i,
536	support,
537	Expr,
538	getText,
539	isXML,
540	tokenize,
541	compile,
542	select,
543	outermostContext,
544	sortInput,
545	hasDuplicate,
546
547	// Local document vars
548	setDocument,
549	document,
550	docElem,
551	documentIsHTML,
552	rbuggyQSA,
553	rbuggyMatches,
554	matches,
555	contains,
556
557	// Instance-specific data
558	expando = "sizzle" + 1 * new Date(),
559	preferredDoc = window.document,
560	dirruns = 0,
561	done = 0,
562	classCache = createCache(),
563	tokenCache = createCache(),
564	compilerCache = createCache(),
565	nonnativeSelectorCache = createCache(),
566	sortOrder = function( a, b ) {
567		if ( a === b ) {
568			hasDuplicate = true;
569		}
570		return 0;
571	},
572
573	// Instance methods
574	hasOwn = ( {} ).hasOwnProperty,
575	arr = [],
576	pop = arr.pop,
577	pushNative = arr.push,
578	push = arr.push,
579	slice = arr.slice,
580
581	// Use a stripped-down indexOf as it's faster than native
582	// https://jsperf.com/thor-indexof-vs-for/5
583	indexOf = function( list, elem ) {
584		var i = 0,
585			len = list.length;
586		for ( ; i < len; i++ ) {
587			if ( list[ i ] === elem ) {
588				return i;
589			}
590		}
591		return -1;
592	},
593
594	booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" +
595		"ismap|loop|multiple|open|readonly|required|scoped",
596
597	// Regular expressions
598
599	// http://www.w3.org/TR/css3-selectors/#whitespace
600	whitespace = "[\\x20\\t\\r\\n\\f]",
601
602	// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram
603	identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace +
604		"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",
605
606	// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
607	attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
608
609		// Operator (capture 2)
610		"*([*^$|!~]?=)" + whitespace +
611
612		// "Attribute values must be CSS identifiers [capture 5]
613		// or strings [capture 3 or capture 4]"
614		"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" +
615		whitespace + "*\\]",
616
617	pseudos = ":(" + identifier + ")(?:\\((" +
618
619		// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
620		// 1. quoted (capture 3; capture 4 or capture 5)
621		"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
622
623		// 2. simple (capture 6)
624		"((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
625
626		// 3. anything else (capture 2)
627		".*" +
628		")\\)|)",
629
630	// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
631	rwhitespace = new RegExp( whitespace + "+", "g" ),
632	rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" +
633		whitespace + "+$", "g" ),
634
635	rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
636	rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace +
637		"*" ),
638	rdescend = new RegExp( whitespace + "|>" ),
639
640	rpseudo = new RegExp( pseudos ),
641	ridentifier = new RegExp( "^" + identifier + "$" ),
642
643	matchExpr = {
644		"ID": new RegExp( "^#(" + identifier + ")" ),
645		"CLASS": new RegExp( "^\\.(" + identifier + ")" ),
646		"TAG": new RegExp( "^(" + identifier + "|[*])" ),
647		"ATTR": new RegExp( "^" + attributes ),
648		"PSEUDO": new RegExp( "^" + pseudos ),
649		"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" +
650			whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" +
651			whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
652		"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
653
654		// For use in libraries implementing .is()
655		// We use this for POS matching in `select`
656		"needsContext": new RegExp( "^" + whitespace +
657			"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace +
658			"*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
659	},
660
661	rhtml = /HTML$/i,
662	rinputs = /^(?:input|select|textarea|button)$/i,
663	rheader = /^h\d$/i,
664
665	rnative = /^[^{]+\{\s*\[native \w/,
666
667	// Easily-parseable/retrievable ID or TAG or CLASS selectors
668	rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
669
670	rsibling = /[+~]/,
671
672	// CSS escapes
673	// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
674	runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g" ),
675	funescape = function( escape, nonHex ) {
676		var high = "0x" + escape.slice( 1 ) - 0x10000;
677
678		return nonHex ?
679
680			// Strip the backslash prefix from a non-hex escape sequence
681			nonHex :
682
683			// Replace a hexadecimal escape sequence with the encoded Unicode code point
684			// Support: IE <=11+
685			// For values outside the Basic Multilingual Plane (BMP), manually construct a
686			// surrogate pair
687			high < 0 ?
688				String.fromCharCode( high + 0x10000 ) :
689				String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
690	},
691
692	// CSS string/identifier serialization
693	// https://drafts.csswg.org/cssom/#common-serializing-idioms
694	rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
695	fcssescape = function( ch, asCodePoint ) {
696		if ( asCodePoint ) {
697
698			// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
699			if ( ch === "\0" ) {
700				return "\uFFFD";
701			}
702
703			// Control characters and (dependent upon position) numbers get escaped as code points
704			return ch.slice( 0, -1 ) + "\\" +
705				ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
706		}
707
708		// Other potentially-special ASCII characters get backslash-escaped
709		return "\\" + ch;
710	},
711
712	// Used for iframes
713	// See setDocument()
714	// Removing the function wrapper causes a "Permission Denied"
715	// error in IE
716	unloadHandler = function() {
717		setDocument();
718	},
719
720	inDisabledFieldset = addCombinator(
721		function( elem ) {
722			return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset";
723		},
724		{ dir: "parentNode", next: "legend" }
725	);
726
727// Optimize for push.apply( _, NodeList )
728try {
729	push.apply(
730		( arr = slice.call( preferredDoc.childNodes ) ),
731		preferredDoc.childNodes
732	);
733
734	// Support: Android<4.0
735	// Detect silently failing push.apply
736	// eslint-disable-next-line no-unused-expressions
737	arr[ preferredDoc.childNodes.length ].nodeType;
738} catch ( e ) {
739	push = { apply: arr.length ?
740
741		// Leverage slice if possible
742		function( target, els ) {
743			pushNative.apply( target, slice.call( els ) );
744		} :
745
746		// Support: IE<9
747		// Otherwise append directly
748		function( target, els ) {
749			var j = target.length,
750				i = 0;
751
752			// Can't trust NodeList.length
753			while ( ( target[ j++ ] = els[ i++ ] ) ) {}
754			target.length = j - 1;
755		}
756	};
757}
758
759function Sizzle( selector, context, results, seed ) {
760	var m, i, elem, nid, match, groups, newSelector,
761		newContext = context && context.ownerDocument,
762
763		// nodeType defaults to 9, since context defaults to document
764		nodeType = context ? context.nodeType : 9;
765
766	results = results || [];
767
768	// Return early from calls with invalid selector or context
769	if ( typeof selector !== "string" || !selector ||
770		nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
771
772		return results;
773	}
774
775	// Try to shortcut find operations (as opposed to filters) in HTML documents
776	if ( !seed ) {
777		setDocument( context );
778		context = context || document;
779
780		if ( documentIsHTML ) {
781
782			// If the selector is sufficiently simple, try using a "get*By*" DOM method
783			// (excepting DocumentFragment context, where the methods don't exist)
784			if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {
785
786				// ID selector
787				if ( ( m = match[ 1 ] ) ) {
788
789					// Document context
790					if ( nodeType === 9 ) {
791						if ( ( elem = context.getElementById( m ) ) ) {
792
793							// Support: IE, Opera, Webkit
794							// TODO: identify versions
795							// getElementById can match elements by name instead of ID
796							if ( elem.id === m ) {
797								results.push( elem );
798								return results;
799							}
800						} else {
801							return results;
802						}
803
804					// Element context
805					} else {
806
807						// Support: IE, Opera, Webkit
808						// TODO: identify versions
809						// getElementById can match elements by name instead of ID
810						if ( newContext && ( elem = newContext.getElementById( m ) ) &&
811							contains( context, elem ) &&
812							elem.id === m ) {
813
814							results.push( elem );
815							return results;
816						}
817					}
818
819				// Type selector
820				} else if ( match[ 2 ] ) {
821					push.apply( results, context.getElementsByTagName( selector ) );
822					return results;
823
824				// Class selector
825				} else if ( ( m = match[ 3 ] ) && support.getElementsByClassName &&
826					context.getElementsByClassName ) {
827
828					push.apply( results, context.getElementsByClassName( m ) );
829					return results;
830				}
831			}
832
833			// Take advantage of querySelectorAll
834			if ( support.qsa &&
835				!nonnativeSelectorCache[ selector + " " ] &&
836				( !rbuggyQSA || !rbuggyQSA.test( selector ) ) &&
837
838				// Support: IE 8 only
839				// Exclude object elements
840				( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) {
841
842				newSelector = selector;
843				newContext = context;
844
845				// qSA considers elements outside a scoping root when evaluating child or
846				// descendant combinators, which is not what we want.
847				// In such cases, we work around the behavior by prefixing every selector in the
848				// list with an ID selector referencing the scope context.
849				// The technique has to be used as well when a leading combinator is used
850				// as such selectors are not recognized by querySelectorAll.
851				// Thanks to Andrew Dupont for this technique.
852				if ( nodeType === 1 &&
853					( rdescend.test( selector ) || rcombinators.test( selector ) ) ) {
854
855					// Expand context for sibling selectors
856					newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
857						context;
858
859					// We can use :scope instead of the ID hack if the browser
860					// supports it & if we're not changing the context.
861					if ( newContext !== context || !support.scope ) {
862
863						// Capture the context ID, setting it first if necessary
864						if ( ( nid = context.getAttribute( "id" ) ) ) {
865							nid = nid.replace( rcssescape, fcssescape );
866						} else {
867							context.setAttribute( "id", ( nid = expando ) );
868						}
869					}
870
871					// Prefix every selector in the list
872					groups = tokenize( selector );
873					i = groups.length;
874					while ( i-- ) {
875						groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " +
876							toSelector( groups[ i ] );
877					}
878					newSelector = groups.join( "," );
879				}
880
881				try {
882					push.apply( results,
883						newContext.querySelectorAll( newSelector )
884					);
885					return results;
886				} catch ( qsaError ) {
887					nonnativeSelectorCache( selector, true );
888				} finally {
889					if ( nid === expando ) {
890						context.removeAttribute( "id" );
891					}
892				}
893			}
894		}
895	}
896
897	// All others
898	return select( selector.replace( rtrim, "$1" ), context, results, seed );
899}
900
901/**
902 * Create key-value caches of limited size
903 * @returns {function(string, object)} Returns the Object data after storing it on itself with
904 *	property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
905 *	deleting the oldest entry
906 */
907function createCache() {
908	var keys = [];
909
910	function cache( key, value ) {
911
912		// Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
913		if ( keys.push( key + " " ) > Expr.cacheLength ) {
914
915			// Only keep the most recent entries
916			delete cache[ keys.shift() ];
917		}
918		return ( cache[ key + " " ] = value );
919	}
920	return cache;
921}
922
923/**
924 * Mark a function for special use by Sizzle
925 * @param {Function} fn The function to mark
926 */
927function markFunction( fn ) {
928	fn[ expando ] = true;
929	return fn;
930}
931
932/**
933 * Support testing using an element
934 * @param {Function} fn Passed the created element and returns a boolean result
935 */
936function assert( fn ) {
937	var el = document.createElement( "fieldset" );
938
939	try {
940		return !!fn( el );
941	} catch ( e ) {
942		return false;
943	} finally {
944
945		// Remove from its parent by default
946		if ( el.parentNode ) {
947			el.parentNode.removeChild( el );
948		}
949
950		// release memory in IE
951		el = null;
952	}
953}
954
955/**
956 * Adds the same handler for all of the specified attrs
957 * @param {String} attrs Pipe-separated list of attributes
958 * @param {Function} handler The method that will be applied
959 */
960function addHandle( attrs, handler ) {
961	var arr = attrs.split( "|" ),
962		i = arr.length;
963
964	while ( i-- ) {
965		Expr.attrHandle[ arr[ i ] ] = handler;
966	}
967}
968
969/**
970 * Checks document order of two siblings
971 * @param {Element} a
972 * @param {Element} b
973 * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
974 */
975function siblingCheck( a, b ) {
976	var cur = b && a,
977		diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
978			a.sourceIndex - b.sourceIndex;
979
980	// Use IE sourceIndex if available on both nodes
981	if ( diff ) {
982		return diff;
983	}
984
985	// Check if b follows a
986	if ( cur ) {
987		while ( ( cur = cur.nextSibling ) ) {
988			if ( cur === b ) {
989				return -1;
990			}
991		}
992	}
993
994	return a ? 1 : -1;
995}
996
997/**
998 * Returns a function to use in pseudos for input types
999 * @param {String} type
1000 */
1001function createInputPseudo( type ) {
1002	return function( elem ) {
1003		var name = elem.nodeName.toLowerCase();
1004		return name === "input" && elem.type === type;
1005	};
1006}
1007
1008/**
1009 * Returns a function to use in pseudos for buttons
1010 * @param {String} type
1011 */
1012function createButtonPseudo( type ) {
1013	return function( elem ) {
1014		var name = elem.nodeName.toLowerCase();
1015		return ( name === "input" || name === "button" ) && elem.type === type;
1016	};
1017}
1018
1019/**
1020 * Returns a function to use in pseudos for :enabled/:disabled
1021 * @param {Boolean} disabled true for :disabled; false for :enabled
1022 */
1023function createDisabledPseudo( disabled ) {
1024
1025	// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
1026	return function( elem ) {
1027
1028		// Only certain elements can match :enabled or :disabled
1029		// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled
1030		// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled
1031		if ( "form" in elem ) {
1032
1033			// Check for inherited disabledness on relevant non-disabled elements:
1034			// * listed form-associated elements in a disabled fieldset
1035			//   https://html.spec.whatwg.org/multipage/forms.html#category-listed
1036			//   https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled
1037			// * option elements in a disabled optgroup
1038			//   https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled
1039			// All such elements have a "form" property.
1040			if ( elem.parentNode && elem.disabled === false ) {
1041
1042				// Option elements defer to a parent optgroup if present
1043				if ( "label" in elem ) {
1044					if ( "label" in elem.parentNode ) {
1045						return elem.parentNode.disabled === disabled;
1046					} else {
1047						return elem.disabled === disabled;
1048					}
1049				}
1050
1051				// Support: IE 6 - 11
1052				// Use the isDisabled shortcut property to check for disabled fieldset ancestors
1053				return elem.isDisabled === disabled ||
1054
1055					// Where there is no isDisabled, check manually
1056					/* jshint -W018 */
1057					elem.isDisabled !== !disabled &&
1058					inDisabledFieldset( elem ) === disabled;
1059			}
1060
1061			return elem.disabled === disabled;
1062
1063		// Try to winnow out elements that can't be disabled before trusting the disabled property.
1064		// Some victims get caught in our net (label, legend, menu, track), but it shouldn't
1065		// even exist on them, let alone have a boolean value.
1066		} else if ( "label" in elem ) {
1067			return elem.disabled === disabled;
1068		}
1069
1070		// Remaining elements are neither :enabled nor :disabled
1071		return false;
1072	};
1073}
1074
1075/**
1076 * Returns a function to use in pseudos for positionals
1077 * @param {Function} fn
1078 */
1079function createPositionalPseudo( fn ) {
1080	return markFunction( function( argument ) {
1081		argument = +argument;
1082		return markFunction( function( seed, matches ) {
1083			var j,
1084				matchIndexes = fn( [], seed.length, argument ),
1085				i = matchIndexes.length;
1086
1087			// Match elements found at the specified indexes
1088			while ( i-- ) {
1089				if ( seed[ ( j = matchIndexes[ i ] ) ] ) {
1090					seed[ j ] = !( matches[ j ] = seed[ j ] );
1091				}
1092			}
1093		} );
1094	} );
1095}
1096
1097/**
1098 * Checks a node for validity as a Sizzle context
1099 * @param {Element|Object=} context
1100 * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
1101 */
1102function testContext( context ) {
1103	return context && typeof context.getElementsByTagName !== "undefined" && context;
1104}
1105
1106// Expose support vars for convenience
1107support = Sizzle.support = {};
1108
1109/**
1110 * Detects XML nodes
1111 * @param {Element|Object} elem An element or a document
1112 * @returns {Boolean} True iff elem is a non-HTML XML node
1113 */
1114isXML = Sizzle.isXML = function( elem ) {
1115	var namespace = elem && elem.namespaceURI,
1116		docElem = elem && ( elem.ownerDocument || elem ).documentElement;
1117
1118	// Support: IE <=8
1119	// Assume HTML when documentElement doesn't yet exist, such as inside loading iframes
1120	// https://bugs.jquery.com/ticket/4833
1121	return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" );
1122};
1123
1124/**
1125 * Sets document-related variables once based on the current document
1126 * @param {Element|Object} [doc] An element or document object to use to set the document
1127 * @returns {Object} Returns the current document
1128 */
1129setDocument = Sizzle.setDocument = function( node ) {
1130	var hasCompare, subWindow,
1131		doc = node ? node.ownerDocument || node : preferredDoc;
1132
1133	// Return early if doc is invalid or already selected
1134	// Support: IE 11+, Edge 17 - 18+
1135	// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
1136	// two documents; shallow comparisons work.
1137	// eslint-disable-next-line eqeqeq
1138	if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {
1139		return document;
1140	}
1141
1142	// Update global variables
1143	document = doc;
1144	docElem = document.documentElement;
1145	documentIsHTML = !isXML( document );
1146
1147	// Support: IE 9 - 11+, Edge 12 - 18+
1148	// Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
1149	// Support: IE 11+, Edge 17 - 18+
1150	// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
1151	// two documents; shallow comparisons work.
1152	// eslint-disable-next-line eqeqeq
1153	if ( preferredDoc != document &&
1154		( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {
1155
1156		// Support: IE 11, Edge
1157		if ( subWindow.addEventListener ) {
1158			subWindow.addEventListener( "unload", unloadHandler, false );
1159
1160		// Support: IE 9 - 10 only
1161		} else if ( subWindow.attachEvent ) {
1162			subWindow.attachEvent( "onunload", unloadHandler );
1163		}
1164	}
1165
1166	// Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only,
1167	// Safari 4 - 5 only, Opera <=11.6 - 12.x only
1168	// IE/Edge & older browsers don't support the :scope pseudo-class.
1169	// Support: Safari 6.0 only
1170	// Safari 6.0 supports :scope but it's an alias of :root there.
1171	support.scope = assert( function( el ) {
1172		docElem.appendChild( el ).appendChild( document.createElement( "div" ) );
1173		return typeof el.querySelectorAll !== "undefined" &&
1174			!el.querySelectorAll( ":scope fieldset div" ).length;
1175	} );
1176
1177	/* Attributes
1178	---------------------------------------------------------------------- */
1179
1180	// Support: IE<8
1181	// Verify that getAttribute really returns attributes and not properties
1182	// (excepting IE8 booleans)
1183	support.attributes = assert( function( el ) {
1184		el.className = "i";
1185		return !el.getAttribute( "className" );
1186	} );
1187
1188	/* getElement(s)By*
1189	---------------------------------------------------------------------- */
1190
1191	// Check if getElementsByTagName("*") returns only elements
1192	support.getElementsByTagName = assert( function( el ) {
1193		el.appendChild( document.createComment( "" ) );
1194		return !el.getElementsByTagName( "*" ).length;
1195	} );
1196
1197	// Support: IE<9
1198	support.getElementsByClassName = rnative.test( document.getElementsByClassName );
1199
1200	// Support: IE<10
1201	// Check if getElementById returns elements by name
1202	// The broken getElementById methods don't pick up programmatically-set names,
1203	// so use a roundabout getElementsByName test
1204	support.getById = assert( function( el ) {
1205		docElem.appendChild( el ).id = expando;
1206		return !document.getElementsByName || !document.getElementsByName( expando ).length;
1207	} );
1208
1209	// ID filter and find
1210	if ( support.getById ) {
1211		Expr.filter[ "ID" ] = function( id ) {
1212			var attrId = id.replace( runescape, funescape );
1213			return function( elem ) {
1214				return elem.getAttribute( "id" ) === attrId;
1215			};
1216		};
1217		Expr.find[ "ID" ] = function( id, context ) {
1218			if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
1219				var elem = context.getElementById( id );
1220				return elem ? [ elem ] : [];
1221			}
1222		};
1223	} else {
1224		Expr.filter[ "ID" ] =  function( id ) {
1225			var attrId = id.replace( runescape, funescape );
1226			return function( elem ) {
1227				var node = typeof elem.getAttributeNode !== "undefined" &&
1228					elem.getAttributeNode( "id" );
1229				return node && node.value === attrId;
1230			};
1231		};
1232
1233		// Support: IE 6 - 7 only
1234		// getElementById is not reliable as a find shortcut
1235		Expr.find[ "ID" ] = function( id, context ) {
1236			if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
1237				var node, i, elems,
1238					elem = context.getElementById( id );
1239
1240				if ( elem ) {
1241
1242					// Verify the id attribute
1243					node = elem.getAttributeNode( "id" );
1244					if ( node && node.value === id ) {
1245						return [ elem ];
1246					}
1247
1248					// Fall back on getElementsByName
1249					elems = context.getElementsByName( id );
1250					i = 0;
1251					while ( ( elem = elems[ i++ ] ) ) {
1252						node = elem.getAttributeNode( "id" );
1253						if ( node && node.value === id ) {
1254							return [ elem ];
1255						}
1256					}
1257				}
1258
1259				return [];
1260			}
1261		};
1262	}
1263
1264	// Tag
1265	Expr.find[ "TAG" ] = support.getElementsByTagName ?
1266		function( tag, context ) {
1267			if ( typeof context.getElementsByTagName !== "undefined" ) {
1268				return context.getElementsByTagName( tag );
1269
1270			// DocumentFragment nodes don't have gEBTN
1271			} else if ( support.qsa ) {
1272				return context.querySelectorAll( tag );
1273			}
1274		} :
1275
1276		function( tag, context ) {
1277			var elem,
1278				tmp = [],
1279				i = 0,
1280
1281				// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
1282				results = context.getElementsByTagName( tag );
1283
1284			// Filter out possible comments
1285			if ( tag === "*" ) {
1286				while ( ( elem = results[ i++ ] ) ) {
1287					if ( elem.nodeType === 1 ) {
1288						tmp.push( elem );
1289					}
1290				}
1291
1292				return tmp;
1293			}
1294			return results;
1295		};
1296
1297	// Class
1298	Expr.find[ "CLASS" ] = support.getElementsByClassName && function( className, context ) {
1299		if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
1300			return context.getElementsByClassName( className );
1301		}
1302	};
1303
1304	/* QSA/matchesSelector
1305	---------------------------------------------------------------------- */
1306
1307	// QSA and matchesSelector support
1308
1309	// matchesSelector(:active) reports false when true (IE9/Opera 11.5)
1310	rbuggyMatches = [];
1311
1312	// qSa(:focus) reports false when true (Chrome 21)
1313	// We allow this because of a bug in IE8/9 that throws an error
1314	// whenever `document.activeElement` is accessed on an iframe
1315	// So, we allow :focus to pass through QSA all the time to avoid the IE error
1316	// See https://bugs.jquery.com/ticket/13378
1317	rbuggyQSA = [];
1318
1319	if ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) {
1320
1321		// Build QSA regex
1322		// Regex strategy adopted from Diego Perini
1323		assert( function( el ) {
1324
1325			var input;
1326
1327			// Select is set to empty string on purpose
1328			// This is to test IE's treatment of not explicitly
1329			// setting a boolean content attribute,
1330			// since its presence should be enough
1331			// https://bugs.jquery.com/ticket/12359
1332			docElem.appendChild( el ).innerHTML = "<a id='" + expando + "'></a>" +
1333				"<select id='" + expando + "-\r\\' msallowcapture=''>" +
1334				"<option selected=''></option></select>";
1335
1336			// Support: IE8, Opera 11-12.16
1337			// Nothing should be selected when empty strings follow ^= or $= or *=
1338			// The test attribute must be unknown in Opera but "safe" for WinRT
1339			// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
1340			if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) {
1341				rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
1342			}
1343
1344			// Support: IE8
1345			// Boolean attributes and "value" are not treated correctly
1346			if ( !el.querySelectorAll( "[selected]" ).length ) {
1347				rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
1348			}
1349
1350			// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
1351			if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
1352				rbuggyQSA.push( "~=" );
1353			}
1354
1355			// Support: IE 11+, Edge 15 - 18+
1356			// IE 11/Edge don't find elements on a `[name='']` query in some cases.
1357			// Adding a temporary attribute to the document before the selection works
1358			// around the issue.
1359			// Interestingly, IE 10 & older don't seem to have the issue.
1360			input = document.createElement( "input" );
1361			input.setAttribute( "name", "" );
1362			el.appendChild( input );
1363			if ( !el.querySelectorAll( "[name='']" ).length ) {
1364				rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" +
1365					whitespace + "*(?:''|\"\")" );
1366			}
1367
1368			// Webkit/Opera - :checked should return selected option elements
1369			// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
1370			// IE8 throws error here and will not see later tests
1371			if ( !el.querySelectorAll( ":checked" ).length ) {
1372				rbuggyQSA.push( ":checked" );
1373			}
1374
1375			// Support: Safari 8+, iOS 8+
1376			// https://bugs.webkit.org/show_bug.cgi?id=136851
1377			// In-page `selector#id sibling-combinator selector` fails
1378			if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {
1379				rbuggyQSA.push( ".#.+[+~]" );
1380			}
1381
1382			// Support: Firefox <=3.6 - 5 only
1383			// Old Firefox doesn't throw on a badly-escaped identifier.
1384			el.querySelectorAll( "\\\f" );
1385			rbuggyQSA.push( "[\\r\\n\\f]" );
1386		} );
1387
1388		assert( function( el ) {
1389			el.innerHTML = "<a href='' disabled='disabled'></a>" +
1390				"<select disabled='disabled'><option/></select>";
1391
1392			// Support: Windows 8 Native Apps
1393			// The type and name attributes are restricted during .innerHTML assignment
1394			var input = document.createElement( "input" );
1395			input.setAttribute( "type", "hidden" );
1396			el.appendChild( input ).setAttribute( "name", "D" );
1397
1398			// Support: IE8
1399			// Enforce case-sensitivity of name attribute
1400			if ( el.querySelectorAll( "[name=d]" ).length ) {
1401				rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
1402			}
1403
1404			// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
1405			// IE8 throws error here and will not see later tests
1406			if ( el.querySelectorAll( ":enabled" ).length !== 2 ) {
1407				rbuggyQSA.push( ":enabled", ":disabled" );
1408			}
1409
1410			// Support: IE9-11+
1411			// IE's :disabled selector does not pick up the children of disabled fieldsets
1412			docElem.appendChild( el ).disabled = true;
1413			if ( el.querySelectorAll( ":disabled" ).length !== 2 ) {
1414				rbuggyQSA.push( ":enabled", ":disabled" );
1415			}
1416
1417			// Support: Opera 10 - 11 only
1418			// Opera 10-11 does not throw on post-comma invalid pseudos
1419			el.querySelectorAll( "*,:x" );
1420			rbuggyQSA.push( ",.*:" );
1421		} );
1422	}
1423
1424	if ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches ||
1425		docElem.webkitMatchesSelector ||
1426		docElem.mozMatchesSelector ||
1427		docElem.oMatchesSelector ||
1428		docElem.msMatchesSelector ) ) ) ) {
1429
1430		assert( function( el ) {
1431
1432			// Check to see if it's possible to do matchesSelector
1433			// on a disconnected node (IE 9)
1434			support.disconnectedMatch = matches.call( el, "*" );
1435
1436			// This should fail with an exception
1437			// Gecko does not error, returns false instead
1438			matches.call( el, "[s!='']:x" );
1439			rbuggyMatches.push( "!=", pseudos );
1440		} );
1441	}
1442
1443	rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) );
1444	rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) );
1445
1446	/* Contains
1447	---------------------------------------------------------------------- */
1448	hasCompare = rnative.test( docElem.compareDocumentPosition );
1449
1450	// Element contains another
1451	// Purposefully self-exclusive
1452	// As in, an element does not contain itself
1453	contains = hasCompare || rnative.test( docElem.contains ) ?
1454		function( a, b ) {
1455			var adown = a.nodeType === 9 ? a.documentElement : a,
1456				bup = b && b.parentNode;
1457			return a === bup || !!( bup && bup.nodeType === 1 && (
1458				adown.contains ?
1459					adown.contains( bup ) :
1460					a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
1461			) );
1462		} :
1463		function( a, b ) {
1464			if ( b ) {
1465				while ( ( b = b.parentNode ) ) {
1466					if ( b === a ) {
1467						return true;
1468					}
1469				}
1470			}
1471			return false;
1472		};
1473
1474	/* Sorting
1475	---------------------------------------------------------------------- */
1476
1477	// Document order sorting
1478	sortOrder = hasCompare ?
1479	function( a, b ) {
1480
1481		// Flag for duplicate removal
1482		if ( a === b ) {
1483			hasDuplicate = true;
1484			return 0;
1485		}
1486
1487		// Sort on method existence if only one input has compareDocumentPosition
1488		var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
1489		if ( compare ) {
1490			return compare;
1491		}
1492
1493		// Calculate position if both inputs belong to the same document
1494		// Support: IE 11+, Edge 17 - 18+
1495		// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
1496		// two documents; shallow comparisons work.
1497		// eslint-disable-next-line eqeqeq
1498		compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?
1499			a.compareDocumentPosition( b ) :
1500
1501			// Otherwise we know they are disconnected
1502			1;
1503
1504		// Disconnected nodes
1505		if ( compare & 1 ||
1506			( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) {
1507
1508			// Choose the first element that is related to our preferred document
1509			// Support: IE 11+, Edge 17 - 18+
1510			// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
1511			// two documents; shallow comparisons work.
1512			// eslint-disable-next-line eqeqeq
1513			if ( a == document || a.ownerDocument == preferredDoc &&
1514				contains( preferredDoc, a ) ) {
1515				return -1;
1516			}
1517
1518			// Support: IE 11+, Edge 17 - 18+
1519			// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
1520			// two documents; shallow comparisons work.
1521			// eslint-disable-next-line eqeqeq
1522			if ( b == document || b.ownerDocument == preferredDoc &&
1523				contains( preferredDoc, b ) ) {
1524				return 1;
1525			}
1526
1527			// Maintain original order
1528			return sortInput ?
1529				( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
1530				0;
1531		}
1532
1533		return compare & 4 ? -1 : 1;
1534	} :
1535	function( a, b ) {
1536
1537		// Exit early if the nodes are identical
1538		if ( a === b ) {
1539			hasDuplicate = true;
1540			return 0;
1541		}
1542
1543		var cur,
1544			i = 0,
1545			aup = a.parentNode,
1546			bup = b.parentNode,
1547			ap = [ a ],
1548			bp = [ b ];
1549
1550		// Parentless nodes are either documents or disconnected
1551		if ( !aup || !bup ) {
1552
1553			// Support: IE 11+, Edge 17 - 18+
1554			// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
1555			// two documents; shallow comparisons work.
1556			/* eslint-disable eqeqeq */
1557			return a == document ? -1 :
1558				b == document ? 1 :
1559				/* eslint-enable eqeqeq */
1560				aup ? -1 :
1561				bup ? 1 :
1562				sortInput ?
1563				( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
1564				0;
1565
1566		// If the nodes are siblings, we can do a quick check
1567		} else if ( aup === bup ) {
1568			return siblingCheck( a, b );
1569		}
1570
1571		// Otherwise we need full lists of their ancestors for comparison
1572		cur = a;
1573		while ( ( cur = cur.parentNode ) ) {
1574			ap.unshift( cur );
1575		}
1576		cur = b;
1577		while ( ( cur = cur.parentNode ) ) {
1578			bp.unshift( cur );
1579		}
1580
1581		// Walk down the tree looking for a discrepancy
1582		while ( ap[ i ] === bp[ i ] ) {
1583			i++;
1584		}
1585
1586		return i ?
1587
1588			// Do a sibling check if the nodes have a common ancestor
1589			siblingCheck( ap[ i ], bp[ i ] ) :
1590
1591			// Otherwise nodes in our document sort first
1592			// Support: IE 11+, Edge 17 - 18+
1593			// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
1594			// two documents; shallow comparisons work.
1595			/* eslint-disable eqeqeq */
1596			ap[ i ] == preferredDoc ? -1 :
1597			bp[ i ] == preferredDoc ? 1 :
1598			/* eslint-enable eqeqeq */
1599			0;
1600	};
1601
1602	return document;
1603};
1604
1605Sizzle.matches = function( expr, elements ) {
1606	return Sizzle( expr, null, null, elements );
1607};
1608
1609Sizzle.matchesSelector = function( elem, expr ) {
1610	setDocument( elem );
1611
1612	if ( support.matchesSelector && documentIsHTML &&
1613		!nonnativeSelectorCache[ expr + " " ] &&
1614		( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
1615		( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {
1616
1617		try {
1618			var ret = matches.call( elem, expr );
1619
1620			// IE 9's matchesSelector returns false on disconnected nodes
1621			if ( ret || support.disconnectedMatch ||
1622
1623				// As well, disconnected nodes are said to be in a document
1624				// fragment in IE 9
1625				elem.document && elem.document.nodeType !== 11 ) {
1626				return ret;
1627			}
1628		} catch ( e ) {
1629			nonnativeSelectorCache( expr, true );
1630		}
1631	}
1632
1633	return Sizzle( expr, document, null, [ elem ] ).length > 0;
1634};
1635
1636Sizzle.contains = function( context, elem ) {
1637
1638	// Set document vars if needed
1639	// Support: IE 11+, Edge 17 - 18+
1640	// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
1641	// two documents; shallow comparisons work.
1642	// eslint-disable-next-line eqeqeq
1643	if ( ( context.ownerDocument || context ) != document ) {
1644		setDocument( context );
1645	}
1646	return contains( context, elem );
1647};
1648
1649Sizzle.attr = function( elem, name ) {
1650
1651	// Set document vars if needed
1652	// Support: IE 11+, Edge 17 - 18+
1653	// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
1654	// two documents; shallow comparisons work.
1655	// eslint-disable-next-line eqeqeq
1656	if ( ( elem.ownerDocument || elem ) != document ) {
1657		setDocument( elem );
1658	}
1659
1660	var fn = Expr.attrHandle[ name.toLowerCase() ],
1661
1662		// Don't get fooled by Object.prototype properties (jQuery #13807)
1663		val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
1664			fn( elem, name, !documentIsHTML ) :
1665			undefined;
1666
1667	return val !== undefined ?
1668		val :
1669		support.attributes || !documentIsHTML ?
1670			elem.getAttribute( name ) :
1671			( val = elem.getAttributeNode( name ) ) && val.specified ?
1672				val.value :
1673				null;
1674};
1675
1676Sizzle.escape = function( sel ) {
1677	return ( sel + "" ).replace( rcssescape, fcssescape );
1678};
1679
1680Sizzle.error = function( msg ) {
1681	throw new Error( "Syntax error, unrecognized expression: " + msg );
1682};
1683
1684/**
1685 * Document sorting and removing duplicates
1686 * @param {ArrayLike} results
1687 */
1688Sizzle.uniqueSort = function( results ) {
1689	var elem,
1690		duplicates = [],
1691		j = 0,
1692		i = 0;
1693
1694	// Unless we *know* we can detect duplicates, assume their presence
1695	hasDuplicate = !support.detectDuplicates;
1696	sortInput = !support.sortStable && results.slice( 0 );
1697	results.sort( sortOrder );
1698
1699	if ( hasDuplicate ) {
1700		while ( ( elem = results[ i++ ] ) ) {
1701			if ( elem === results[ i ] ) {
1702				j = duplicates.push( i );
1703			}
1704		}
1705		while ( j-- ) {
1706			results.splice( duplicates[ j ], 1 );
1707		}
1708	}
1709
1710	// Clear input after sorting to release objects
1711	// See https://github.com/jquery/sizzle/pull/225
1712	sortInput = null;
1713
1714	return results;
1715};
1716
1717/**
1718 * Utility function for retrieving the text value of an array of DOM nodes
1719 * @param {Array|Element} elem
1720 */
1721getText = Sizzle.getText = function( elem ) {
1722	var node,
1723		ret = "",
1724		i = 0,
1725		nodeType = elem.nodeType;
1726
1727	if ( !nodeType ) {
1728
1729		// If no nodeType, this is expected to be an array
1730		while ( ( node = elem[ i++ ] ) ) {
1731
1732			// Do not traverse comment nodes
1733			ret += getText( node );
1734		}
1735	} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
1736
1737		// Use textContent for elements
1738		// innerText usage removed for consistency of new lines (jQuery #11153)
1739		if ( typeof elem.textContent === "string" ) {
1740			return elem.textContent;
1741		} else {
1742
1743			// Traverse its children
1744			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
1745				ret += getText( elem );
1746			}
1747		}
1748	} else if ( nodeType === 3 || nodeType === 4 ) {
1749		return elem.nodeValue;
1750	}
1751
1752	// Do not include comment or processing instruction nodes
1753
1754	return ret;
1755};
1756
1757Expr = Sizzle.selectors = {
1758
1759	// Can be adjusted by the user
1760	cacheLength: 50,
1761
1762	createPseudo: markFunction,
1763
1764	match: matchExpr,
1765
1766	attrHandle: {},
1767
1768	find: {},
1769
1770	relative: {
1771		">": { dir: "parentNode", first: true },
1772		" ": { dir: "parentNode" },
1773		"+": { dir: "previousSibling", first: true },
1774		"~": { dir: "previousSibling" }
1775	},
1776
1777	preFilter: {
1778		"ATTR": function( match ) {
1779			match[ 1 ] = match[ 1 ].replace( runescape, funescape );
1780
1781			// Move the given value to match[3] whether quoted or unquoted
1782			match[ 3 ] = ( match[ 3 ] || match[ 4 ] ||
1783				match[ 5 ] || "" ).replace( runescape, funescape );
1784
1785			if ( match[ 2 ] === "~=" ) {
1786				match[ 3 ] = " " + match[ 3 ] + " ";
1787			}
1788
1789			return match.slice( 0, 4 );
1790		},
1791
1792		"CHILD": function( match ) {
1793
1794			/* matches from matchExpr["CHILD"]
1795				1 type (only|nth|...)
1796				2 what (child|of-type)
1797				3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
1798				4 xn-component of xn+y argument ([+-]?\d*n|)
1799				5 sign of xn-component
1800				6 x of xn-component
1801				7 sign of y-component
1802				8 y of y-component
1803			*/
1804			match[ 1 ] = match[ 1 ].toLowerCase();
1805
1806			if ( match[ 1 ].slice( 0, 3 ) === "nth" ) {
1807
1808				// nth-* requires argument
1809				if ( !match[ 3 ] ) {
1810					Sizzle.error( match[ 0 ] );
1811				}
1812
1813				// numeric x and y parameters for Expr.filter.CHILD
1814				// remember that false/true cast respectively to 0/1
1815				match[ 4 ] = +( match[ 4 ] ?
1816					match[ 5 ] + ( match[ 6 ] || 1 ) :
1817					2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) );
1818				match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" );
1819
1820				// other types prohibit arguments
1821			} else if ( match[ 3 ] ) {
1822				Sizzle.error( match[ 0 ] );
1823			}
1824
1825			return match;
1826		},
1827
1828		"PSEUDO": function( match ) {
1829			var excess,
1830				unquoted = !match[ 6 ] && match[ 2 ];
1831
1832			if ( matchExpr[ "CHILD" ].test( match[ 0 ] ) ) {
1833				return null;
1834			}
1835
1836			// Accept quoted arguments as-is
1837			if ( match[ 3 ] ) {
1838				match[ 2 ] = match[ 4 ] || match[ 5 ] || "";
1839
1840			// Strip excess characters from unquoted arguments
1841			} else if ( unquoted && rpseudo.test( unquoted ) &&
1842
1843				// Get excess from tokenize (recursively)
1844				( excess = tokenize( unquoted, true ) ) &&
1845
1846				// advance to the next closing parenthesis
1847				( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) {
1848
1849				// excess is a negative index
1850				match[ 0 ] = match[ 0 ].slice( 0, excess );
1851				match[ 2 ] = unquoted.slice( 0, excess );
1852			}
1853
1854			// Return only captures needed by the pseudo filter method (type and argument)
1855			return match.slice( 0, 3 );
1856		}
1857	},
1858
1859	filter: {
1860
1861		"TAG": function( nodeNameSelector ) {
1862			var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
1863			return nodeNameSelector === "*" ?
1864				function() {
1865					return true;
1866				} :
1867				function( elem ) {
1868					return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
1869				};
1870		},
1871
1872		"CLASS": function( className ) {
1873			var pattern = classCache[ className + " " ];
1874
1875			return pattern ||
1876				( pattern = new RegExp( "(^|" + whitespace +
1877					")" + className + "(" + whitespace + "|$)" ) ) && classCache(
1878						className, function( elem ) {
1879							return pattern.test(
1880								typeof elem.className === "string" && elem.className ||
1881								typeof elem.getAttribute !== "undefined" &&
1882									elem.getAttribute( "class" ) ||
1883								""
1884							);
1885				} );
1886		},
1887
1888		"ATTR": function( name, operator, check ) {
1889			return function( elem ) {
1890				var result = Sizzle.attr( elem, name );
1891
1892				if ( result == null ) {
1893					return operator === "!=";
1894				}
1895				if ( !operator ) {
1896					return true;
1897				}
1898
1899				result += "";
1900
1901				/* eslint-disable max-len */
1902
1903				return operator === "=" ? result === check :
1904					operator === "!=" ? result !== check :
1905					operator === "^=" ? check && result.indexOf( check ) === 0 :
1906					operator === "*=" ? check && result.indexOf( check ) > -1 :
1907					operator === "$=" ? check && result.slice( -check.length ) === check :
1908					operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
1909					operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
1910					false;
1911				/* eslint-enable max-len */
1912
1913			};
1914		},
1915
1916		"CHILD": function( type, what, _argument, first, last ) {
1917			var simple = type.slice( 0, 3 ) !== "nth",
1918				forward = type.slice( -4 ) !== "last",
1919				ofType = what === "of-type";
1920
1921			return first === 1 && last === 0 ?
1922
1923				// Shortcut for :nth-*(n)
1924				function( elem ) {
1925					return !!elem.parentNode;
1926				} :
1927
1928				function( elem, _context, xml ) {
1929					var cache, uniqueCache, outerCache, node, nodeIndex, start,
1930						dir = simple !== forward ? "nextSibling" : "previousSibling",
1931						parent = elem.parentNode,
1932						name = ofType && elem.nodeName.toLowerCase(),
1933						useCache = !xml && !ofType,
1934						diff = false;
1935
1936					if ( parent ) {
1937
1938						// :(first|last|only)-(child|of-type)
1939						if ( simple ) {
1940							while ( dir ) {
1941								node = elem;
1942								while ( ( node = node[ dir ] ) ) {
1943									if ( ofType ?
1944										node.nodeName.toLowerCase() === name :
1945										node.nodeType === 1 ) {
1946
1947										return false;
1948									}
1949								}
1950
1951								// Reverse direction for :only-* (if we haven't yet done so)
1952								start = dir = type === "only" && !start && "nextSibling";
1953							}
1954							return true;
1955						}
1956
1957						start = [ forward ? parent.firstChild : parent.lastChild ];
1958
1959						// non-xml :nth-child(...) stores cache data on `parent`
1960						if ( forward && useCache ) {
1961
1962							// Seek `elem` from a previously-cached index
1963
1964							// ...in a gzip-friendly way
1965							node = parent;
1966							outerCache = node[ expando ] || ( node[ expando ] = {} );
1967
1968							// Support: IE <9 only
1969							// Defend against cloned attroperties (jQuery gh-1709)
1970							uniqueCache = outerCache[ node.uniqueID ] ||
1971								( outerCache[ node.uniqueID ] = {} );
1972
1973							cache = uniqueCache[ type ] || [];
1974							nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
1975							diff = nodeIndex && cache[ 2 ];
1976							node = nodeIndex && parent.childNodes[ nodeIndex ];
1977
1978							while ( ( node = ++nodeIndex && node && node[ dir ] ||
1979
1980								// Fallback to seeking `elem` from the start
1981								( diff = nodeIndex = 0 ) || start.pop() ) ) {
1982
1983								// When found, cache indexes on `parent` and break
1984								if ( node.nodeType === 1 && ++diff && node === elem ) {
1985									uniqueCache[ type ] = [ dirruns, nodeIndex, diff ];
1986									break;
1987								}
1988							}
1989
1990						} else {
1991
1992							// Use previously-cached element index if available
1993							if ( useCache ) {
1994
1995								// ...in a gzip-friendly way
1996								node = elem;
1997								outerCache = node[ expando ] || ( node[ expando ] = {} );
1998
1999								// Support: IE <9 only
2000								// Defend against cloned attroperties (jQuery gh-1709)
2001								uniqueCache = outerCache[ node.uniqueID ] ||
2002									( outerCache[ node.uniqueID ] = {} );
2003
2004								cache = uniqueCache[ type ] || [];
2005								nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
2006								diff = nodeIndex;
2007							}
2008
2009							// xml :nth-child(...)
2010							// or :nth-last-child(...) or :nth(-last)?-of-type(...)
2011							if ( diff === false ) {
2012
2013								// Use the same loop as above to seek `elem` from the start
2014								while ( ( node = ++nodeIndex && node && node[ dir ] ||
2015									( diff = nodeIndex = 0 ) || start.pop() ) ) {
2016
2017									if ( ( ofType ?
2018										node.nodeName.toLowerCase() === name :
2019										node.nodeType === 1 ) &&
2020										++diff ) {
2021
2022										// Cache the index of each encountered element
2023										if ( useCache ) {
2024											outerCache = node[ expando ] ||
2025												( node[ expando ] = {} );
2026
2027											// Support: IE <9 only
2028											// Defend against cloned attroperties (jQuery gh-1709)
2029											uniqueCache = outerCache[ node.uniqueID ] ||
2030												( outerCache[ node.uniqueID ] = {} );
2031
2032											uniqueCache[ type ] = [ dirruns, diff ];
2033										}
2034
2035										if ( node === elem ) {
2036											break;
2037										}
2038									}
2039								}
2040							}
2041						}
2042
2043						// Incorporate the offset, then check against cycle size
2044						diff -= last;
2045						return diff === first || ( diff % first === 0 && diff / first >= 0 );
2046					}
2047				};
2048		},
2049
2050		"PSEUDO": function( pseudo, argument ) {
2051
2052			// pseudo-class names are case-insensitive
2053			// http://www.w3.org/TR/selectors/#pseudo-classes
2054			// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
2055			// Remember that setFilters inherits from pseudos
2056			var args,
2057				fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
2058					Sizzle.error( "unsupported pseudo: " + pseudo );
2059
2060			// The user may use createPseudo to indicate that
2061			// arguments are needed to create the filter function
2062			// just as Sizzle does
2063			if ( fn[ expando ] ) {
2064				return fn( argument );
2065			}
2066
2067			// But maintain support for old signatures
2068			if ( fn.length > 1 ) {
2069				args = [ pseudo, pseudo, "", argument ];
2070				return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
2071					markFunction( function( seed, matches ) {
2072						var idx,
2073							matched = fn( seed, argument ),
2074							i = matched.length;
2075						while ( i-- ) {
2076							idx = indexOf( seed, matched[ i ] );
2077							seed[ idx ] = !( matches[ idx ] = matched[ i ] );
2078						}
2079					} ) :
2080					function( elem ) {
2081						return fn( elem, 0, args );
2082					};
2083			}
2084
2085			return fn;
2086		}
2087	},
2088
2089	pseudos: {
2090
2091		// Potentially complex pseudos
2092		"not": markFunction( function( selector ) {
2093
2094			// Trim the selector passed to compile
2095			// to avoid treating leading and trailing
2096			// spaces as combinators
2097			var input = [],
2098				results = [],
2099				matcher = compile( selector.replace( rtrim, "$1" ) );
2100
2101			return matcher[ expando ] ?
2102				markFunction( function( seed, matches, _context, xml ) {
2103					var elem,
2104						unmatched = matcher( seed, null, xml, [] ),
2105						i = seed.length;
2106
2107					// Match elements unmatched by `matcher`
2108					while ( i-- ) {
2109						if ( ( elem = unmatched[ i ] ) ) {
2110							seed[ i ] = !( matches[ i ] = elem );
2111						}
2112					}
2113				} ) :
2114				function( elem, _context, xml ) {
2115					input[ 0 ] = elem;
2116					matcher( input, null, xml, results );
2117
2118					// Don't keep the element (issue #299)
2119					input[ 0 ] = null;
2120					return !results.pop();
2121				};
2122		} ),
2123
2124		"has": markFunction( function( selector ) {
2125			return function( elem ) {
2126				return Sizzle( selector, elem ).length > 0;
2127			};
2128		} ),
2129
2130		"contains": markFunction( function( text ) {
2131			text = text.replace( runescape, funescape );
2132			return function( elem ) {
2133				return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1;
2134			};
2135		} ),
2136
2137		// "Whether an element is represented by a :lang() selector
2138		// is based solely on the element's language value
2139		// being equal to the identifier C,
2140		// or beginning with the identifier C immediately followed by "-".
2141		// The matching of C against the element's language value is performed case-insensitively.
2142		// The identifier C does not have to be a valid language name."
2143		// http://www.w3.org/TR/selectors/#lang-pseudo
2144		"lang": markFunction( function( lang ) {
2145
2146			// lang value must be a valid identifier
2147			if ( !ridentifier.test( lang || "" ) ) {
2148				Sizzle.error( "unsupported lang: " + lang );
2149			}
2150			lang = lang.replace( runescape, funescape ).toLowerCase();
2151			return function( elem ) {
2152				var elemLang;
2153				do {
2154					if ( ( elemLang = documentIsHTML ?
2155						elem.lang :
2156						elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) {
2157
2158						elemLang = elemLang.toLowerCase();
2159						return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
2160					}
2161				} while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );
2162				return false;
2163			};
2164		} ),
2165
2166		// Miscellaneous
2167		"target": function( elem ) {
2168			var hash = window.location && window.location.hash;
2169			return hash && hash.slice( 1 ) === elem.id;
2170		},
2171
2172		"root": function( elem ) {
2173			return elem === docElem;
2174		},
2175
2176		"focus": function( elem ) {
2177			return elem === document.activeElement &&
2178				( !document.hasFocus || document.hasFocus() ) &&
2179				!!( elem.type || elem.href || ~elem.tabIndex );
2180		},
2181
2182		// Boolean properties
2183		"enabled": createDisabledPseudo( false ),
2184		"disabled": createDisabledPseudo( true ),
2185
2186		"checked": function( elem ) {
2187
2188			// In CSS3, :checked should return both checked and selected elements
2189			// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
2190			var nodeName = elem.nodeName.toLowerCase();
2191			return ( nodeName === "input" && !!elem.checked ) ||
2192				( nodeName === "option" && !!elem.selected );
2193		},
2194
2195		"selected": function( elem ) {
2196
2197			// Accessing this property makes selected-by-default
2198			// options in Safari work properly
2199			if ( elem.parentNode ) {
2200				// eslint-disable-next-line no-unused-expressions
2201				elem.parentNode.selectedIndex;
2202			}
2203
2204			return elem.selected === true;
2205		},
2206
2207		// Contents
2208		"empty": function( elem ) {
2209
2210			// http://www.w3.org/TR/selectors/#empty-pseudo
2211			// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
2212			//   but not by others (comment: 8; processing instruction: 7; etc.)
2213			// nodeType < 6 works because attributes (2) do not appear as children
2214			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
2215				if ( elem.nodeType < 6 ) {
2216					return false;
2217				}
2218			}
2219			return true;
2220		},
2221
2222		"parent": function( elem ) {
2223			return !Expr.pseudos[ "empty" ]( elem );
2224		},
2225
2226		// Element/input types
2227		"header": function( elem ) {
2228			return rheader.test( elem.nodeName );
2229		},
2230
2231		"input": function( elem ) {
2232			return rinputs.test( elem.nodeName );
2233		},
2234
2235		"button": function( elem ) {
2236			var name = elem.nodeName.toLowerCase();
2237			return name === "input" && elem.type === "button" || name === "button";
2238		},
2239
2240		"text": function( elem ) {
2241			var attr;
2242			return elem.nodeName.toLowerCase() === "input" &&
2243				elem.type === "text" &&
2244
2245				// Support: IE<8
2246				// New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
2247				( ( attr = elem.getAttribute( "type" ) ) == null ||
2248					attr.toLowerCase() === "text" );
2249		},
2250
2251		// Position-in-collection
2252		"first": createPositionalPseudo( function() {
2253			return [ 0 ];
2254		} ),
2255
2256		"last": createPositionalPseudo( function( _matchIndexes, length ) {
2257			return [ length - 1 ];
2258		} ),
2259
2260		"eq": createPositionalPseudo( function( _matchIndexes, length, argument ) {
2261			return [ argument < 0 ? argument + length : argument ];
2262		} ),
2263
2264		"even": createPositionalPseudo( function( matchIndexes, length ) {
2265			var i = 0;
2266			for ( ; i < length; i += 2 ) {
2267				matchIndexes.push( i );
2268			}
2269			return matchIndexes;
2270		} ),
2271
2272		"odd": createPositionalPseudo( function( matchIndexes, length ) {
2273			var i = 1;
2274			for ( ; i < length; i += 2 ) {
2275				matchIndexes.push( i );
2276			}
2277			return matchIndexes;
2278		} ),
2279
2280		"lt": createPositionalPseudo( function( matchIndexes, length, argument ) {
2281			var i = argument < 0 ?
2282				argument + length :
2283				argument > length ?
2284					length :
2285					argument;
2286			for ( ; --i >= 0; ) {
2287				matchIndexes.push( i );
2288			}
2289			return matchIndexes;
2290		} ),
2291
2292		"gt": createPositionalPseudo( function( matchIndexes, length, argument ) {
2293			var i = argument < 0 ? argument + length : argument;
2294			for ( ; ++i < length; ) {
2295				matchIndexes.push( i );
2296			}
2297			return matchIndexes;
2298		} )
2299	}
2300};
2301
2302Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ];
2303
2304// Add button/input type pseudos
2305for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
2306	Expr.pseudos[ i ] = createInputPseudo( i );
2307}
2308for ( i in { submit: true, reset: true } ) {
2309	Expr.pseudos[ i ] = createButtonPseudo( i );
2310}
2311
2312// Easy API for creating new setFilters
2313function setFilters() {}
2314setFilters.prototype = Expr.filters = Expr.pseudos;
2315Expr.setFilters = new setFilters();
2316
2317tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
2318	var matched, match, tokens, type,
2319		soFar, groups, preFilters,
2320		cached = tokenCache[ selector + " " ];
2321
2322	if ( cached ) {
2323		return parseOnly ? 0 : cached.slice( 0 );
2324	}
2325
2326	soFar = selector;
2327	groups = [];
2328	preFilters = Expr.preFilter;
2329
2330	while ( soFar ) {
2331
2332		// Comma and first run
2333		if ( !matched || ( match = rcomma.exec( soFar ) ) ) {
2334			if ( match ) {
2335
2336				// Don't consume trailing commas as valid
2337				soFar = soFar.slice( match[ 0 ].length ) || soFar;
2338			}
2339			groups.push( ( tokens = [] ) );
2340		}
2341
2342		matched = false;
2343
2344		// Combinators
2345		if ( ( match = rcombinators.exec( soFar ) ) ) {
2346			matched = match.shift();
2347			tokens.push( {
2348				value: matched,
2349
2350				// Cast descendant combinators to space
2351				type: match[ 0 ].replace( rtrim, " " )
2352			} );
2353			soFar = soFar.slice( matched.length );
2354		}
2355
2356		// Filters
2357		for ( type in Expr.filter ) {
2358			if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||
2359				( match = preFilters[ type ]( match ) ) ) ) {
2360				matched = match.shift();
2361				tokens.push( {
2362					value: matched,
2363					type: type,
2364					matches: match
2365				} );
2366				soFar = soFar.slice( matched.length );
2367			}
2368		}
2369
2370		if ( !matched ) {
2371			break;
2372		}
2373	}
2374
2375	// Return the length of the invalid excess
2376	// if we're just parsing
2377	// Otherwise, throw an error or return tokens
2378	return parseOnly ?
2379		soFar.length :
2380		soFar ?
2381			Sizzle.error( selector ) :
2382
2383			// Cache the tokens
2384			tokenCache( selector, groups ).slice( 0 );
2385};
2386
2387function toSelector( tokens ) {
2388	var i = 0,
2389		len = tokens.length,
2390		selector = "";
2391	for ( ; i < len; i++ ) {
2392		selector += tokens[ i ].value;
2393	}
2394	return selector;
2395}
2396
2397function addCombinator( matcher, combinator, base ) {
2398	var dir = combinator.dir,
2399		skip = combinator.next,
2400		key = skip || dir,
2401		checkNonElements = base && key === "parentNode",
2402		doneName = done++;
2403
2404	return combinator.first ?
2405
2406		// Check against closest ancestor/preceding element
2407		function( elem, context, xml ) {
2408			while ( ( elem = elem[ dir ] ) ) {
2409				if ( elem.nodeType === 1 || checkNonElements ) {
2410					return matcher( elem, context, xml );
2411				}
2412			}
2413			return false;
2414		} :
2415
2416		// Check against all ancestor/preceding elements
2417		function( elem, context, xml ) {
2418			var oldCache, uniqueCache, outerCache,
2419				newCache = [ dirruns, doneName ];
2420
2421			// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
2422			if ( xml ) {
2423				while ( ( elem = elem[ dir ] ) ) {
2424					if ( elem.nodeType === 1 || checkNonElements ) {
2425						if ( matcher( elem, context, xml ) ) {
2426							return true;
2427						}
2428					}
2429				}
2430			} else {
2431				while ( ( elem = elem[ dir ] ) ) {
2432					if ( elem.nodeType === 1 || checkNonElements ) {
2433						outerCache = elem[ expando ] || ( elem[ expando ] = {} );
2434
2435						// Support: IE <9 only
2436						// Defend against cloned attroperties (jQuery gh-1709)
2437						uniqueCache = outerCache[ elem.uniqueID ] ||
2438							( outerCache[ elem.uniqueID ] = {} );
2439
2440						if ( skip && skip === elem.nodeName.toLowerCase() ) {
2441							elem = elem[ dir ] || elem;
2442						} else if ( ( oldCache = uniqueCache[ key ] ) &&
2443							oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
2444
2445							// Assign to newCache so results back-propagate to previous elements
2446							return ( newCache[ 2 ] = oldCache[ 2 ] );
2447						} else {
2448
2449							// Reuse newcache so results back-propagate to previous elements
2450							uniqueCache[ key ] = newCache;
2451
2452							// A match means we're done; a fail means we have to keep checking
2453							if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {
2454								return true;
2455							}
2456						}
2457					}
2458				}
2459			}
2460			return false;
2461		};
2462}
2463
2464function elementMatcher( matchers ) {
2465	return matchers.length > 1 ?
2466		function( elem, context, xml ) {
2467			var i = matchers.length;
2468			while ( i-- ) {
2469				if ( !matchers[ i ]( elem, context, xml ) ) {
2470					return false;
2471				}
2472			}
2473			return true;
2474		} :
2475		matchers[ 0 ];
2476}
2477
2478function multipleContexts( selector, contexts, results ) {
2479	var i = 0,
2480		len = contexts.length;
2481	for ( ; i < len; i++ ) {
2482		Sizzle( selector, contexts[ i ], results );
2483	}
2484	return results;
2485}
2486
2487function condense( unmatched, map, filter, context, xml ) {
2488	var elem,
2489		newUnmatched = [],
2490		i = 0,
2491		len = unmatched.length,
2492		mapped = map != null;
2493
2494	for ( ; i < len; i++ ) {
2495		if ( ( elem = unmatched[ i ] ) ) {
2496			if ( !filter || filter( elem, context, xml ) ) {
2497				newUnmatched.push( elem );
2498				if ( mapped ) {
2499					map.push( i );
2500				}
2501			}
2502		}
2503	}
2504
2505	return newUnmatched;
2506}
2507
2508function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
2509	if ( postFilter && !postFilter[ expando ] ) {
2510		postFilter = setMatcher( postFilter );
2511	}
2512	if ( postFinder && !postFinder[ expando ] ) {
2513		postFinder = setMatcher( postFinder, postSelector );
2514	}
2515	return markFunction( function( seed, results, context, xml ) {
2516		var temp, i, elem,
2517			preMap = [],
2518			postMap = [],
2519			preexisting = results.length,
2520
2521			// Get initial elements from seed or context
2522			elems = seed || multipleContexts(
2523				selector || "*",
2524				context.nodeType ? [ context ] : context,
2525				[]
2526			),
2527
2528			// Prefilter to get matcher input, preserving a map for seed-results synchronization
2529			matcherIn = preFilter && ( seed || !selector ) ?
2530				condense( elems, preMap, preFilter, context, xml ) :
2531				elems,
2532
2533			matcherOut = matcher ?
2534
2535				// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
2536				postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
2537
2538					// ...intermediate processing is necessary
2539					[] :
2540
2541					// ...otherwise use results directly
2542					results :
2543				matcherIn;
2544
2545		// Find primary matches
2546		if ( matcher ) {
2547			matcher( matcherIn, matcherOut, context, xml );
2548		}
2549
2550		// Apply postFilter
2551		if ( postFilter ) {
2552			temp = condense( matcherOut, postMap );
2553			postFilter( temp, [], context, xml );
2554
2555			// Un-match failing elements by moving them back to matcherIn
2556			i = temp.length;
2557			while ( i-- ) {
2558				if ( ( elem = temp[ i ] ) ) {
2559					matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );
2560				}
2561			}
2562		}
2563
2564		if ( seed ) {
2565			if ( postFinder || preFilter ) {
2566				if ( postFinder ) {
2567
2568					// Get the final matcherOut by condensing this intermediate into postFinder contexts
2569					temp = [];
2570					i = matcherOut.length;
2571					while ( i-- ) {
2572						if ( ( elem = matcherOut[ i ] ) ) {
2573
2574							// Restore matcherIn since elem is not yet a final match
2575							temp.push( ( matcherIn[ i ] = elem ) );
2576						}
2577					}
2578					postFinder( null, ( matcherOut = [] ), temp, xml );
2579				}
2580
2581				// Move matched elements from seed to results to keep them synchronized
2582				i = matcherOut.length;
2583				while ( i-- ) {
2584					if ( ( elem = matcherOut[ i ] ) &&
2585						( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) {
2586
2587						seed[ temp ] = !( results[ temp ] = elem );
2588					}
2589				}
2590			}
2591
2592		// Add elements to results, through postFinder if defined
2593		} else {
2594			matcherOut = condense(
2595				matcherOut === results ?
2596					matcherOut.splice( preexisting, matcherOut.length ) :
2597					matcherOut
2598			);
2599			if ( postFinder ) {
2600				postFinder( null, results, matcherOut, xml );
2601			} else {
2602				push.apply( results, matcherOut );
2603			}
2604		}
2605	} );
2606}
2607
2608function matcherFromTokens( tokens ) {
2609	var checkContext, matcher, j,
2610		len = tokens.length,
2611		leadingRelative = Expr.relative[ tokens[ 0 ].type ],
2612		implicitRelative = leadingRelative || Expr.relative[ " " ],
2613		i = leadingRelative ? 1 : 0,
2614
2615		// The foundational matcher ensures that elements are reachable from top-level context(s)
2616		matchContext = addCombinator( function( elem ) {
2617			return elem === checkContext;
2618		}, implicitRelative, true ),
2619		matchAnyContext = addCombinator( function( elem ) {
2620			return indexOf( checkContext, elem ) > -1;
2621		}, implicitRelative, true ),
2622		matchers = [ function( elem, context, xml ) {
2623			var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
2624				( checkContext = context ).nodeType ?
2625					matchContext( elem, context, xml ) :
2626					matchAnyContext( elem, context, xml ) );
2627
2628			// Avoid hanging onto element (issue #299)
2629			checkContext = null;
2630			return ret;
2631		} ];
2632
2633	for ( ; i < len; i++ ) {
2634		if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) {
2635			matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];
2636		} else {
2637			matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );
2638
2639			// Return special upon seeing a positional matcher
2640			if ( matcher[ expando ] ) {
2641
2642				// Find the next relative operator (if any) for proper handling
2643				j = ++i;
2644				for ( ; j < len; j++ ) {
2645					if ( Expr.relative[ tokens[ j ].type ] ) {
2646						break;
2647					}
2648				}
2649				return setMatcher(
2650					i > 1 && elementMatcher( matchers ),
2651					i > 1 && toSelector(
2652
2653					// If the preceding token was a descendant combinator, insert an implicit any-element `*`
2654					tokens
2655						.slice( 0, i - 1 )
2656						.concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } )
2657					).replace( rtrim, "$1" ),
2658					matcher,
2659					i < j && matcherFromTokens( tokens.slice( i, j ) ),
2660					j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),
2661					j < len && toSelector( tokens )
2662				);
2663			}
2664			matchers.push( matcher );
2665		}
2666	}
2667
2668	return elementMatcher( matchers );
2669}
2670
2671function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
2672	var bySet = setMatchers.length > 0,
2673		byElement = elementMatchers.length > 0,
2674		superMatcher = function( seed, context, xml, results, outermost ) {
2675			var elem, j, matcher,
2676				matchedCount = 0,
2677				i = "0",
2678				unmatched = seed && [],
2679				setMatched = [],
2680				contextBackup = outermostContext,
2681
2682				// We must always have either seed elements or outermost context
2683				elems = seed || byElement && Expr.find[ "TAG" ]( "*", outermost ),
2684
2685				// Use integer dirruns iff this is the outermost matcher
2686				dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),
2687				len = elems.length;
2688
2689			if ( outermost ) {
2690
2691				// Support: IE 11+, Edge 17 - 18+
2692				// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
2693				// two documents; shallow comparisons work.
2694				// eslint-disable-next-line eqeqeq
2695				outermostContext = context == document || context || outermost;
2696			}
2697
2698			// Add elements passing elementMatchers directly to results
2699			// Support: IE<9, Safari
2700			// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
2701			for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {
2702				if ( byElement && elem ) {
2703					j = 0;
2704
2705					// Support: IE 11+, Edge 17 - 18+
2706					// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
2707					// two documents; shallow comparisons work.
2708					// eslint-disable-next-line eqeqeq
2709					if ( !context && elem.ownerDocument != document ) {
2710						setDocument( elem );
2711						xml = !documentIsHTML;
2712					}
2713					while ( ( matcher = elementMatchers[ j++ ] ) ) {
2714						if ( matcher( elem, context || document, xml ) ) {
2715							results.push( elem );
2716							break;
2717						}
2718					}
2719					if ( outermost ) {
2720						dirruns = dirrunsUnique;
2721					}
2722				}
2723
2724				// Track unmatched elements for set filters
2725				if ( bySet ) {
2726
2727					// They will have gone through all possible matchers
2728					if ( ( elem = !matcher && elem ) ) {
2729						matchedCount--;
2730					}
2731
2732					// Lengthen the array for every element, matched or not
2733					if ( seed ) {
2734						unmatched.push( elem );
2735					}
2736				}
2737			}
2738
2739			// `i` is now the count of elements visited above, and adding it to `matchedCount`
2740			// makes the latter nonnegative.
2741			matchedCount += i;
2742
2743			// Apply set filters to unmatched elements
2744			// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
2745			// equals `i`), unless we didn't visit _any_ elements in the above loop because we have
2746			// no element matchers and no seed.
2747			// Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
2748			// case, which will result in a "00" `matchedCount` that differs from `i` but is also
2749			// numerically zero.
2750			if ( bySet && i !== matchedCount ) {
2751				j = 0;
2752				while ( ( matcher = setMatchers[ j++ ] ) ) {
2753					matcher( unmatched, setMatched, context, xml );
2754				}
2755
2756				if ( seed ) {
2757
2758					// Reintegrate element matches to eliminate the need for sorting
2759					if ( matchedCount > 0 ) {
2760						while ( i-- ) {
2761							if ( !( unmatched[ i ] || setMatched[ i ] ) ) {
2762								setMatched[ i ] = pop.call( results );
2763							}
2764						}
2765					}
2766
2767					// Discard index placeholder values to get only actual matches
2768					setMatched = condense( setMatched );
2769				}
2770
2771				// Add matches to results
2772				push.apply( results, setMatched );
2773
2774				// Seedless set matches succeeding multiple successful matchers stipulate sorting
2775				if ( outermost && !seed && setMatched.length > 0 &&
2776					( matchedCount + setMatchers.length ) > 1 ) {
2777
2778					Sizzle.uniqueSort( results );
2779				}
2780			}
2781
2782			// Override manipulation of globals by nested matchers
2783			if ( outermost ) {
2784				dirruns = dirrunsUnique;
2785				outermostContext = contextBackup;
2786			}
2787
2788			return unmatched;
2789		};
2790
2791	return bySet ?
2792		markFunction( superMatcher ) :
2793		superMatcher;
2794}
2795
2796compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
2797	var i,
2798		setMatchers = [],
2799		elementMatchers = [],
2800		cached = compilerCache[ selector + " " ];
2801
2802	if ( !cached ) {
2803
2804		// Generate a function of recursive functions that can be used to check each element
2805		if ( !match ) {
2806			match = tokenize( selector );
2807		}
2808		i = match.length;
2809		while ( i-- ) {
2810			cached = matcherFromTokens( match[ i ] );
2811			if ( cached[ expando ] ) {
2812				setMatchers.push( cached );
2813			} else {
2814				elementMatchers.push( cached );
2815			}
2816		}
2817
2818		// Cache the compiled function
2819		cached = compilerCache(
2820			selector,
2821			matcherFromGroupMatchers( elementMatchers, setMatchers )
2822		);
2823
2824		// Save selector and tokenization
2825		cached.selector = selector;
2826	}
2827	return cached;
2828};
2829
2830/**
2831 * A low-level selection function that works with Sizzle's compiled
2832 *  selector functions
2833 * @param {String|Function} selector A selector or a pre-compiled
2834 *  selector function built with Sizzle.compile
2835 * @param {Element} context
2836 * @param {Array} [results]
2837 * @param {Array} [seed] A set of elements to match against
2838 */
2839select = Sizzle.select = function( selector, context, results, seed ) {
2840	var i, tokens, token, type, find,
2841		compiled = typeof selector === "function" && selector,
2842		match = !seed && tokenize( ( selector = compiled.selector || selector ) );
2843
2844	results = results || [];
2845
2846	// Try to minimize operations if there is only one selector in the list and no seed
2847	// (the latter of which guarantees us context)
2848	if ( match.length === 1 ) {
2849
2850		// Reduce context if the leading compound selector is an ID
2851		tokens = match[ 0 ] = match[ 0 ].slice( 0 );
2852		if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" &&
2853			context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {
2854
2855			context = ( Expr.find[ "ID" ]( token.matches[ 0 ]
2856				.replace( runescape, funescape ), context ) || [] )[ 0 ];
2857			if ( !context ) {
2858				return results;
2859
2860			// Precompiled matchers will still verify ancestry, so step up a level
2861			} else if ( compiled ) {
2862				context = context.parentNode;
2863			}
2864
2865			selector = selector.slice( tokens.shift().value.length );
2866		}
2867
2868		// Fetch a seed set for right-to-left matching
2869		i = matchExpr[ "needsContext" ].test( selector ) ? 0 : tokens.length;
2870		while ( i-- ) {
2871			token = tokens[ i ];
2872
2873			// Abort if we hit a combinator
2874			if ( Expr.relative[ ( type = token.type ) ] ) {
2875				break;
2876			}
2877			if ( ( find = Expr.find[ type ] ) ) {
2878
2879				// Search, expanding context for leading sibling combinators
2880				if ( ( seed = find(
2881					token.matches[ 0 ].replace( runescape, funescape ),
2882					rsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) ||
2883						context
2884				) ) ) {
2885
2886					// If seed is empty or no tokens remain, we can return early
2887					tokens.splice( i, 1 );
2888					selector = seed.length && toSelector( tokens );
2889					if ( !selector ) {
2890						push.apply( results, seed );
2891						return results;
2892					}
2893
2894					break;
2895				}
2896			}
2897		}
2898	}
2899
2900	// Compile and execute a filtering function if one is not provided
2901	// Provide `match` to avoid retokenization if we modified the selector above
2902	( compiled || compile( selector, match ) )(
2903		seed,
2904		context,
2905		!documentIsHTML,
2906		results,
2907		!context || rsibling.test( selector ) && testContext( context.parentNode ) || context
2908	);
2909	return results;
2910};
2911
2912// One-time assignments
2913
2914// Sort stability
2915support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando;
2916
2917// Support: Chrome 14-35+
2918// Always assume duplicates if they aren't passed to the comparison function
2919support.detectDuplicates = !!hasDuplicate;
2920
2921// Initialize against the default document
2922setDocument();
2923
2924// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
2925// Detached nodes confoundingly follow *each other*
2926support.sortDetached = assert( function( el ) {
2927
2928	// Should return 1, but returns 4 (following)
2929	return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1;
2930} );
2931
2932// Support: IE<8
2933// Prevent attribute/property "interpolation"
2934// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
2935if ( !assert( function( el ) {
2936	el.innerHTML = "<a href='#'></a>";
2937	return el.firstChild.getAttribute( "href" ) === "#";
2938} ) ) {
2939	addHandle( "type|href|height|width", function( elem, name, isXML ) {
2940		if ( !isXML ) {
2941			return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
2942		}
2943	} );
2944}
2945
2946// Support: IE<9
2947// Use defaultValue in place of getAttribute("value")
2948if ( !support.attributes || !assert( function( el ) {
2949	el.innerHTML = "<input/>";
2950	el.firstChild.setAttribute( "value", "" );
2951	return el.firstChild.getAttribute( "value" ) === "";
2952} ) ) {
2953	addHandle( "value", function( elem, _name, isXML ) {
2954		if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
2955			return elem.defaultValue;
2956		}
2957	} );
2958}
2959
2960// Support: IE<9
2961// Use getAttributeNode to fetch booleans when getAttribute lies
2962if ( !assert( function( el ) {
2963	return el.getAttribute( "disabled" ) == null;
2964} ) ) {
2965	addHandle( booleans, function( elem, name, isXML ) {
2966		var val;
2967		if ( !isXML ) {
2968			return elem[ name ] === true ? name.toLowerCase() :
2969				( val = elem.getAttributeNode( name ) ) && val.specified ?
2970					val.value :
2971					null;
2972		}
2973	} );
2974}
2975
2976return Sizzle;
2977
2978} )( window );
2979
2980
2981
2982jQuery.find = Sizzle;
2983jQuery.expr = Sizzle.selectors;
2984
2985// Deprecated
2986jQuery.expr[ ":" ] = jQuery.expr.pseudos;
2987jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
2988jQuery.text = Sizzle.getText;
2989jQuery.isXMLDoc = Sizzle.isXML;
2990jQuery.contains = Sizzle.contains;
2991jQuery.escapeSelector = Sizzle.escape;
2992
2993
2994
2995
2996var dir = function( elem, dir, until ) {
2997	var matched = [],
2998		truncate = until !== undefined;
2999
3000	while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
3001		if ( elem.nodeType === 1 ) {
3002			if ( truncate && jQuery( elem ).is( until ) ) {
3003				break;
3004			}
3005			matched.push( elem );
3006		}
3007	}
3008	return matched;
3009};
3010
3011
3012var siblings = function( n, elem ) {
3013	var matched = [];
3014
3015	for ( ; n; n = n.nextSibling ) {
3016		if ( n.nodeType === 1 && n !== elem ) {
3017			matched.push( n );
3018		}
3019	}
3020
3021	return matched;
3022};
3023
3024
3025var rneedsContext = jQuery.expr.match.needsContext;
3026
3027
3028
3029function nodeName( elem, name ) {
3030
3031	return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
3032
3033}
3034var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );
3035
3036
3037
3038// Implement the identical functionality for filter and not
3039function winnow( elements, qualifier, not ) {
3040	if ( isFunction( qualifier ) ) {
3041		return jQuery.grep( elements, function( elem, i ) {
3042			return !!qualifier.call( elem, i, elem ) !== not;
3043		} );
3044	}
3045
3046	// Single element
3047	if ( qualifier.nodeType ) {
3048		return jQuery.grep( elements, function( elem ) {
3049			return ( elem === qualifier ) !== not;
3050		} );
3051	}
3052
3053	// Arraylike of elements (jQuery, arguments, Array)
3054	if ( typeof qualifier !== "string" ) {
3055		return jQuery.grep( elements, function( elem ) {
3056			return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
3057		} );
3058	}
3059
3060	// Filtered directly for both simple and complex selectors
3061	return jQuery.filter( qualifier, elements, not );
3062}
3063
3064jQuery.filter = function( expr, elems, not ) {
3065	var elem = elems[ 0 ];
3066
3067	if ( not ) {
3068		expr = ":not(" + expr + ")";
3069	}
3070
3071	if ( elems.length === 1 && elem.nodeType === 1 ) {
3072		return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];
3073	}
3074
3075	return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
3076		return elem.nodeType === 1;
3077	} ) );
3078};
3079
3080jQuery.fn.extend( {
3081	find: function( selector ) {
3082		var i, ret,
3083			len = this.length,
3084			self = this;
3085
3086		if ( typeof selector !== "string" ) {
3087			return this.pushStack( jQuery( selector ).filter( function() {
3088				for ( i = 0; i < len; i++ ) {
3089					if ( jQuery.contains( self[ i ], this ) ) {
3090						return true;
3091					}
3092				}
3093			} ) );
3094		}
3095
3096		ret = this.pushStack( [] );
3097
3098		for ( i = 0; i < len; i++ ) {
3099			jQuery.find( selector, self[ i ], ret );
3100		}
3101
3102		return len > 1 ? jQuery.uniqueSort( ret ) : ret;
3103	},
3104	filter: function( selector ) {
3105		return this.pushStack( winnow( this, selector || [], false ) );
3106	},
3107	not: function( selector ) {
3108		return this.pushStack( winnow( this, selector || [], true ) );
3109	},
3110	is: function( selector ) {
3111		return !!winnow(
3112			this,
3113
3114			// If this is a positional/relative selector, check membership in the returned set
3115			// so $("p:first").is("p:last") won't return true for a doc with two "p".
3116			typeof selector === "string" && rneedsContext.test( selector ) ?
3117				jQuery( selector ) :
3118				selector || [],
3119			false
3120		).length;
3121	}
3122} );
3123
3124
3125// Initialize a jQuery object
3126
3127
3128// A central reference to the root jQuery(document)
3129var rootjQuery,
3130
3131	// A simple way to check for HTML strings
3132	// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
3133	// Strict HTML recognition (#11290: must start with <)
3134	// Shortcut simple #id case for speed
3135	rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,
3136
3137	init = jQuery.fn.init = function( selector, context, root ) {
3138		var match, elem;
3139
3140		// HANDLE: $(""), $(null), $(undefined), $(false)
3141		if ( !selector ) {
3142			return this;
3143		}
3144
3145		// Method init() accepts an alternate rootjQuery
3146		// so migrate can support jQuery.sub (gh-2101)
3147		root = root || rootjQuery;
3148
3149		// Handle HTML strings
3150		if ( typeof selector === "string" ) {
3151			if ( selector[ 0 ] === "<" &&
3152				selector[ selector.length - 1 ] === ">" &&
3153				selector.length >= 3 ) {
3154
3155				// Assume that strings that start and end with <> are HTML and skip the regex check
3156				match = [ null, selector, null ];
3157
3158			} else {
3159				match = rquickExpr.exec( selector );
3160			}
3161
3162			// Match html or make sure no context is specified for #id
3163			if ( match && ( match[ 1 ] || !context ) ) {
3164
3165				// HANDLE: $(html) -> $(array)
3166				if ( match[ 1 ] ) {
3167					context = context instanceof jQuery ? context[ 0 ] : context;
3168
3169					// Option to run scripts is true for back-compat
3170					// Intentionally let the error be thrown if parseHTML is not present
3171					jQuery.merge( this, jQuery.parseHTML(
3172						match[ 1 ],
3173						context && context.nodeType ? context.ownerDocument || context : document,
3174						true
3175					) );
3176
3177					// HANDLE: $(html, props)
3178					if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
3179						for ( match in context ) {
3180
3181							// Properties of context are called as methods if possible
3182							if ( isFunction( this[ match ] ) ) {
3183								this[ match ]( context[ match ] );
3184
3185							// ...and otherwise set as attributes
3186							} else {
3187								this.attr( match, context[ match ] );
3188							}
3189						}
3190					}
3191
3192					return this;
3193
3194				// HANDLE: $(#id)
3195				} else {
3196					elem = document.getElementById( match[ 2 ] );
3197
3198					if ( elem ) {
3199
3200						// Inject the element directly into the jQuery object
3201						this[ 0 ] = elem;
3202						this.length = 1;
3203					}
3204					return this;
3205				}
3206
3207			// HANDLE: $(expr, $(...))
3208			} else if ( !context || context.jquery ) {
3209				return ( context || root ).find( selector );
3210
3211			// HANDLE: $(expr, context)
3212			// (which is just equivalent to: $(context).find(expr)
3213			} else {
3214				return this.constructor( context ).find( selector );
3215			}
3216
3217		// HANDLE: $(DOMElement)
3218		} else if ( selector.nodeType ) {
3219			this[ 0 ] = selector;
3220			this.length = 1;
3221			return this;
3222
3223		// HANDLE: $(function)
3224		// Shortcut for document ready
3225		} else if ( isFunction( selector ) ) {
3226			return root.ready !== undefined ?
3227				root.ready( selector ) :
3228
3229				// Execute immediately if ready is not present
3230				selector( jQuery );
3231		}
3232
3233		return jQuery.makeArray( selector, this );
3234	};
3235
3236// Give the init function the jQuery prototype for later instantiation
3237init.prototype = jQuery.fn;
3238
3239// Initialize central reference
3240rootjQuery = jQuery( document );
3241
3242
3243var rparentsprev = /^(?:parents|prev(?:Until|All))/,
3244
3245	// Methods guaranteed to produce a unique set when starting from a unique set
3246	guaranteedUnique = {
3247		children: true,
3248		contents: true,
3249		next: true,
3250		prev: true
3251	};
3252
3253jQuery.fn.extend( {
3254	has: function( target ) {
3255		var targets = jQuery( target, this ),
3256			l = targets.length;
3257
3258		return this.filter( function() {
3259			var i = 0;
3260			for ( ; i < l; i++ ) {
3261				if ( jQuery.contains( this, targets[ i ] ) ) {
3262					return true;
3263				}
3264			}
3265		} );
3266	},
3267
3268	closest: function( selectors, context ) {
3269		var cur,
3270			i = 0,
3271			l = this.length,
3272			matched = [],
3273			targets = typeof selectors !== "string" && jQuery( selectors );
3274
3275		// Positional selectors never match, since there's no _selection_ context
3276		if ( !rneedsContext.test( selectors ) ) {
3277			for ( ; i < l; i++ ) {
3278				for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {
3279
3280					// Always skip document fragments
3281					if ( cur.nodeType < 11 && ( targets ?
3282						targets.index( cur ) > -1 :
3283
3284						// Don't pass non-elements to Sizzle
3285						cur.nodeType === 1 &&
3286							jQuery.find.matchesSelector( cur, selectors ) ) ) {
3287
3288						matched.push( cur );
3289						break;
3290					}
3291				}
3292			}
3293		}
3294
3295		return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );
3296	},
3297
3298	// Determine the position of an element within the set
3299	index: function( elem ) {
3300
3301		// No argument, return index in parent
3302		if ( !elem ) {
3303			return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
3304		}
3305
3306		// Index in selector
3307		if ( typeof elem === "string" ) {
3308			return indexOf.call( jQuery( elem ), this[ 0 ] );
3309		}
3310
3311		// Locate the position of the desired element
3312		return indexOf.call( this,
3313
3314			// If it receives a jQuery object, the first element is used
3315			elem.jquery ? elem[ 0 ] : elem
3316		);
3317	},
3318
3319	add: function( selector, context ) {
3320		return this.pushStack(
3321			jQuery.uniqueSort(
3322				jQuery.merge( this.get(), jQuery( selector, context ) )
3323			)
3324		);
3325	},
3326
3327	addBack: function( selector ) {
3328		return this.add( selector == null ?
3329			this.prevObject : this.prevObject.filter( selector )
3330		);
3331	}
3332} );
3333
3334function sibling( cur, dir ) {
3335	while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}
3336	return cur;
3337}
3338
3339jQuery.each( {
3340	parent: function( elem ) {
3341		var parent = elem.parentNode;
3342		return parent && parent.nodeType !== 11 ? parent : null;
3343	},
3344	parents: function( elem ) {
3345		return dir( elem, "parentNode" );
3346	},
3347	parentsUntil: function( elem, _i, until ) {
3348		return dir( elem, "parentNode", until );
3349	},
3350	next: function( elem ) {
3351		return sibling( elem, "nextSibling" );
3352	},
3353	prev: function( elem ) {
3354		return sibling( elem, "previousSibling" );
3355	},
3356	nextAll: function( elem ) {
3357		return dir( elem, "nextSibling" );
3358	},
3359	prevAll: function( elem ) {
3360		return dir( elem, "previousSibling" );
3361	},
3362	nextUntil: function( elem, _i, until ) {
3363		return dir( elem, "nextSibling", until );
3364	},
3365	prevUntil: function( elem, _i, until ) {
3366		return dir( elem, "previousSibling", until );
3367	},
3368	siblings: function( elem ) {
3369		return siblings( ( elem.parentNode || {} ).firstChild, elem );
3370	},
3371	children: function( elem ) {
3372		return siblings( elem.firstChild );
3373	},
3374	contents: function( elem ) {
3375		if ( elem.contentDocument != null &&
3376
3377			// Support: IE 11+
3378			// <object> elements with no `data` attribute has an object
3379			// `contentDocument` with a `null` prototype.
3380			getProto( elem.contentDocument ) ) {
3381
3382			return elem.contentDocument;
3383		}
3384
3385		// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only
3386		// Treat the template element as a regular one in browsers that
3387		// don't support it.
3388		if ( nodeName( elem, "template" ) ) {
3389			elem = elem.content || elem;
3390		}
3391
3392		return jQuery.merge( [], elem.childNodes );
3393	}
3394}, function( name, fn ) {
3395	jQuery.fn[ name ] = function( until, selector ) {
3396		var matched = jQuery.map( this, fn, until );
3397
3398		if ( name.slice( -5 ) !== "Until" ) {
3399			selector = until;
3400		}
3401
3402		if ( selector && typeof selector === "string" ) {
3403			matched = jQuery.filter( selector, matched );
3404		}
3405
3406		if ( this.length > 1 ) {
3407
3408			// Remove duplicates
3409			if ( !guaranteedUnique[ name ] ) {
3410				jQuery.uniqueSort( matched );
3411			}
3412
3413			// Reverse order for parents* and prev-derivatives
3414			if ( rparentsprev.test( name ) ) {
3415				matched.reverse();
3416			}
3417		}
3418
3419		return this.pushStack( matched );
3420	};
3421} );
3422var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g );
3423
3424
3425
3426// Convert String-formatted options into Object-formatted ones
3427function createOptions( options ) {
3428	var object = {};
3429	jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {
3430		object[ flag ] = true;
3431	} );
3432	return object;
3433}
3434
3435/*
3436 * Create a callback list using the following parameters:
3437 *
3438 *	options: an optional list of space-separated options that will change how
3439 *			the callback list behaves or a more traditional option object
3440 *
3441 * By default a callback list will act like an event callback list and can be
3442 * "fired" multiple times.
3443 *
3444 * Possible options:
3445 *
3446 *	once:			will ensure the callback list can only be fired once (like a Deferred)
3447 *
3448 *	memory:			will keep track of previous values and will call any callback added
3449 *					after the list has been fired right away with the latest "memorized"
3450 *					values (like a Deferred)
3451 *
3452 *	unique:			will ensure a callback can only be added once (no duplicate in the list)
3453 *
3454 *	stopOnFalse:	interrupt callings when a callback returns false
3455 *
3456 */
3457jQuery.Callbacks = function( options ) {
3458
3459	// Convert options from String-formatted to Object-formatted if needed
3460	// (we check in cache first)
3461	options = typeof options === "string" ?
3462		createOptions( options ) :
3463		jQuery.extend( {}, options );
3464
3465	var // Flag to know if list is currently firing
3466		firing,
3467
3468		// Last fire value for non-forgettable lists
3469		memory,
3470
3471		// Flag to know if list was already fired
3472		fired,
3473
3474		// Flag to prevent firing
3475		locked,
3476
3477		// Actual callback list
3478		list = [],
3479
3480		// Queue of execution data for repeatable lists
3481		queue = [],
3482
3483		// Index of currently firing callback (modified by add/remove as needed)
3484		firingIndex = -1,
3485
3486		// Fire callbacks
3487		fire = function() {
3488
3489			// Enforce single-firing
3490			locked = locked || options.once;
3491
3492			// Execute callbacks for all pending executions,
3493			// respecting firingIndex overrides and runtime changes
3494			fired = firing = true;
3495			for ( ; queue.length; firingIndex = -1 ) {
3496				memory = queue.shift();
3497				while ( ++firingIndex < list.length ) {
3498
3499					// Run callback and check for early termination
3500					if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
3501						options.stopOnFalse ) {
3502
3503						// Jump to end and forget the data so .add doesn't re-fire
3504						firingIndex = list.length;
3505						memory = false;
3506					}
3507				}
3508			}
3509
3510			// Forget the data if we're done with it
3511			if ( !options.memory ) {
3512				memory = false;
3513			}
3514
3515			firing = false;
3516
3517			// Clean up if we're done firing for good
3518			if ( locked ) {
3519
3520				// Keep an empty list if we have data for future add calls
3521				if ( memory ) {
3522					list = [];
3523
3524				// Otherwise, this object is spent
3525				} else {
3526					list = "";
3527				}
3528			}
3529		},
3530
3531		// Actual Callbacks object
3532		self = {
3533
3534			// Add a callback or a collection of callbacks to the list
3535			add: function() {
3536				if ( list ) {
3537
3538					// If we have memory from a past run, we should fire after adding
3539					if ( memory && !firing ) {
3540						firingIndex = list.length - 1;
3541						queue.push( memory );
3542					}
3543
3544					( function add( args ) {
3545						jQuery.each( args, function( _, arg ) {
3546							if ( isFunction( arg ) ) {
3547								if ( !options.unique || !self.has( arg ) ) {
3548									list.push( arg );
3549								}
3550							} else if ( arg && arg.length && toType( arg ) !== "string" ) {
3551
3552								// Inspect recursively
3553								add( arg );
3554							}
3555						} );
3556					} )( arguments );
3557
3558					if ( memory && !firing ) {
3559						fire();
3560					}
3561				}
3562				return this;
3563			},
3564
3565			// Remove a callback from the list
3566			remove: function() {
3567				jQuery.each( arguments, function( _, arg ) {
3568					var index;
3569					while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
3570						list.splice( index, 1 );
3571
3572						// Handle firing indexes
3573						if ( index <= firingIndex ) {
3574							firingIndex--;
3575						}
3576					}
3577				} );
3578				return this;
3579			},
3580
3581			// Check if a given callback is in the list.
3582			// If no argument is given, return whether or not list has callbacks attached.
3583			has: function( fn ) {
3584				return fn ?
3585					jQuery.inArray( fn, list ) > -1 :
3586					list.length > 0;
3587			},
3588
3589			// Remove all callbacks from the list
3590			empty: function() {
3591				if ( list ) {
3592					list = [];
3593				}
3594				return this;
3595			},
3596
3597			// Disable .fire and .add
3598			// Abort any current/pending executions
3599			// Clear all callbacks and values
3600			disable: function() {
3601				locked = queue = [];
3602				list = memory = "";
3603				return this;
3604			},
3605			disabled: function() {
3606				return !list;
3607			},
3608
3609			// Disable .fire
3610			// Also disable .add unless we have memory (since it would have no effect)
3611			// Abort any pending executions
3612			lock: function() {
3613				locked = queue = [];
3614				if ( !memory && !firing ) {
3615					list = memory = "";
3616				}
3617				return this;
3618			},
3619			locked: function() {
3620				return !!locked;
3621			},
3622
3623			// Call all callbacks with the given context and arguments
3624			fireWith: function( context, args ) {
3625				if ( !locked ) {
3626					args = args || [];
3627					args = [ context, args.slice ? args.slice() : args ];
3628					queue.push( args );
3629					if ( !firing ) {
3630						fire();
3631					}
3632				}
3633				return this;
3634			},
3635
3636			// Call all the callbacks with the given arguments
3637			fire: function() {
3638				self.fireWith( this, arguments );
3639				return this;
3640			},
3641
3642			// To know if the callbacks have already been called at least once
3643			fired: function() {
3644				return !!fired;
3645			}
3646		};
3647
3648	return self;
3649};
3650
3651
3652function Identity( v ) {
3653	return v;
3654}
3655function Thrower( ex ) {
3656	throw ex;
3657}
3658
3659function adoptValue( value, resolve, reject, noValue ) {
3660	var method;
3661
3662	try {
3663
3664		// Check for promise aspect first to privilege synchronous behavior
3665		if ( value && isFunction( ( method = value.promise ) ) ) {
3666			method.call( value ).done( resolve ).fail( reject );
3667
3668		// Other thenables
3669		} else if ( value && isFunction( ( method = value.then ) ) ) {
3670			method.call( value, resolve, reject );
3671
3672		// Other non-thenables
3673		} else {
3674
3675			// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:
3676			// * false: [ value ].slice( 0 ) => resolve( value )
3677			// * true: [ value ].slice( 1 ) => resolve()
3678			resolve.apply( undefined, [ value ].slice( noValue ) );
3679		}
3680
3681	// For Promises/A+, convert exceptions into rejections
3682	// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in
3683	// Deferred#then to conditionally suppress rejection.
3684	} catch ( value ) {
3685
3686		// Support: Android 4.0 only
3687		// Strict mode functions invoked without .call/.apply get global-object context
3688		reject.apply( undefined, [ value ] );
3689	}
3690}
3691
3692jQuery.extend( {
3693
3694	Deferred: function( func ) {
3695		var tuples = [
3696
3697				// action, add listener, callbacks,
3698				// ... .then handlers, argument index, [final state]
3699				[ "notify", "progress", jQuery.Callbacks( "memory" ),
3700					jQuery.Callbacks( "memory" ), 2 ],
3701				[ "resolve", "done", jQuery.Callbacks( "once memory" ),
3702					jQuery.Callbacks( "once memory" ), 0, "resolved" ],
3703				[ "reject", "fail", jQuery.Callbacks( "once memory" ),
3704					jQuery.Callbacks( "once memory" ), 1, "rejected" ]
3705			],
3706			state = "pending",
3707			promise = {
3708				state: function() {
3709					return state;
3710				},
3711				always: function() {
3712					deferred.done( arguments ).fail( arguments );
3713					return this;
3714				},
3715				"catch": function( fn ) {
3716					return promise.then( null, fn );
3717				},
3718
3719				// Keep pipe for back-compat
3720				pipe: function( /* fnDone, fnFail, fnProgress */ ) {
3721					var fns = arguments;
3722
3723					return jQuery.Deferred( function( newDefer ) {
3724						jQuery.each( tuples, function( _i, tuple ) {
3725
3726							// Map tuples (progress, done, fail) to arguments (done, fail, progress)
3727							var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];
3728
3729							// deferred.progress(function() { bind to newDefer or newDefer.notify })
3730							// deferred.done(function() { bind to newDefer or newDefer.resolve })
3731							// deferred.fail(function() { bind to newDefer or newDefer.reject })
3732							deferred[ tuple[ 1 ] ]( function() {
3733								var returned = fn && fn.apply( this, arguments );
3734								if ( returned && isFunction( returned.promise ) ) {
3735									returned.promise()
3736										.progress( newDefer.notify )
3737										.done( newDefer.resolve )
3738										.fail( newDefer.reject );
3739								} else {
3740									newDefer[ tuple[ 0 ] + "With" ](
3741										this,
3742										fn ? [ returned ] : arguments
3743									);
3744								}
3745							} );
3746						} );
3747						fns = null;
3748					} ).promise();
3749				},
3750				then: function( onFulfilled, onRejected, onProgress ) {
3751					var maxDepth = 0;
3752					function resolve( depth, deferred, handler, special ) {
3753						return function() {
3754							var that = this,
3755								args = arguments,
3756								mightThrow = function() {
3757									var returned, then;
3758
3759									// Support: Promises/A+ section 2.3.3.3.3
3760									// https://promisesaplus.com/#point-59
3761									// Ignore double-resolution attempts
3762									if ( depth < maxDepth ) {
3763										return;
3764									}
3765
3766									returned = handler.apply( that, args );
3767
3768									// Support: Promises/A+ section 2.3.1
3769									// https://promisesaplus.com/#point-48
3770									if ( returned === deferred.promise() ) {
3771										throw new TypeError( "Thenable self-resolution" );
3772									}
3773
3774									// Support: Promises/A+ sections 2.3.3.1, 3.5
3775									// https://promisesaplus.com/#point-54
3776									// https://promisesaplus.com/#point-75
3777									// Retrieve `then` only once
3778									then = returned &&
3779
3780										// Support: Promises/A+ section 2.3.4
3781										// https://promisesaplus.com/#point-64
3782										// Only check objects and functions for thenability
3783										( typeof returned === "object" ||
3784											typeof returned === "function" ) &&
3785										returned.then;
3786
3787									// Handle a returned thenable
3788									if ( isFunction( then ) ) {
3789
3790										// Special processors (notify) just wait for resolution
3791										if ( special ) {
3792											then.call(
3793												returned,
3794												resolve( maxDepth, deferred, Identity, special ),
3795												resolve( maxDepth, deferred, Thrower, special )
3796											);
3797
3798										// Normal processors (resolve) also hook into progress
3799										} else {
3800
3801											// ...and disregard older resolution values
3802											maxDepth++;
3803
3804											then.call(
3805												returned,
3806												resolve( maxDepth, deferred, Identity, special ),
3807												resolve( maxDepth, deferred, Thrower, special ),
3808												resolve( maxDepth, deferred, Identity,
3809													deferred.notifyWith )
3810											);
3811										}
3812
3813									// Handle all other returned values
3814									} else {
3815
3816										// Only substitute handlers pass on context
3817										// and multiple values (non-spec behavior)
3818										if ( handler !== Identity ) {
3819											that = undefined;
3820											args = [ returned ];
3821										}
3822
3823										// Process the value(s)
3824										// Default process is resolve
3825										( special || deferred.resolveWith )( that, args );
3826									}
3827								},
3828
3829								// Only normal processors (resolve) catch and reject exceptions
3830								process = special ?
3831									mightThrow :
3832									function() {
3833										try {
3834											mightThrow();
3835										} catch ( e ) {
3836
3837											if ( jQuery.Deferred.exceptionHook ) {
3838												jQuery.Deferred.exceptionHook( e,
3839													process.stackTrace );
3840											}
3841
3842											// Support: Promises/A+ section 2.3.3.3.4.1
3843											// https://promisesaplus.com/#point-61
3844											// Ignore post-resolution exceptions
3845											if ( depth + 1 >= maxDepth ) {
3846
3847												// Only substitute handlers pass on context
3848												// and multiple values (non-spec behavior)
3849												if ( handler !== Thrower ) {
3850													that = undefined;
3851													args = [ e ];
3852												}
3853
3854												deferred.rejectWith( that, args );
3855											}
3856										}
3857									};
3858
3859							// Support: Promises/A+ section 2.3.3.3.1
3860							// https://promisesaplus.com/#point-57
3861							// Re-resolve promises immediately to dodge false rejection from
3862							// subsequent errors
3863							if ( depth ) {
3864								process();
3865							} else {
3866
3867								// Call an optional hook to record the stack, in case of exception
3868								// since it's otherwise lost when execution goes async
3869								if ( jQuery.Deferred.getStackHook ) {
3870									process.stackTrace = jQuery.Deferred.getStackHook();
3871								}
3872								window.setTimeout( process );
3873							}
3874						};
3875					}
3876
3877					return jQuery.Deferred( function( newDefer ) {
3878
3879						// progress_handlers.add( ... )
3880						tuples[ 0 ][ 3 ].add(
3881							resolve(
3882								0,
3883								newDefer,
3884								isFunction( onProgress ) ?
3885									onProgress :
3886									Identity,
3887								newDefer.notifyWith
3888							)
3889						);
3890
3891						// fulfilled_handlers.add( ... )
3892						tuples[ 1 ][ 3 ].add(
3893							resolve(
3894								0,
3895								newDefer,
3896								isFunction( onFulfilled ) ?
3897									onFulfilled :
3898									Identity
3899							)
3900						);
3901
3902						// rejected_handlers.add( ... )
3903						tuples[ 2 ][ 3 ].add(
3904							resolve(
3905								0,
3906								newDefer,
3907								isFunction( onRejected ) ?
3908									onRejected :
3909									Thrower
3910							)
3911						);
3912					} ).promise();
3913				},
3914
3915				// Get a promise for this deferred
3916				// If obj is provided, the promise aspect is added to the object
3917				promise: function( obj ) {
3918					return obj != null ? jQuery.extend( obj, promise ) : promise;
3919				}
3920			},
3921			deferred = {};
3922
3923		// Add list-specific methods
3924		jQuery.each( tuples, function( i, tuple ) {
3925			var list = tuple[ 2 ],
3926				stateString = tuple[ 5 ];
3927
3928			// promise.progress = list.add
3929			// promise.done = list.add
3930			// promise.fail = list.add
3931			promise[ tuple[ 1 ] ] = list.add;
3932
3933			// Handle state
3934			if ( stateString ) {
3935				list.add(
3936					function() {
3937
3938						// state = "resolved" (i.e., fulfilled)
3939						// state = "rejected"
3940						state = stateString;
3941					},
3942
3943					// rejected_callbacks.disable
3944					// fulfilled_callbacks.disable
3945					tuples[ 3 - i ][ 2 ].disable,
3946
3947					// rejected_handlers.disable
3948					// fulfilled_handlers.disable
3949					tuples[ 3 - i ][ 3 ].disable,
3950
3951					// progress_callbacks.lock
3952					tuples[ 0 ][ 2 ].lock,
3953
3954					// progress_handlers.lock
3955					tuples[ 0 ][ 3 ].lock
3956				);
3957			}
3958
3959			// progress_handlers.fire
3960			// fulfilled_handlers.fire
3961			// rejected_handlers.fire
3962			list.add( tuple[ 3 ].fire );
3963
3964			// deferred.notify = function() { deferred.notifyWith(...) }
3965			// deferred.resolve = function() { deferred.resolveWith(...) }
3966			// deferred.reject = function() { deferred.rejectWith(...) }
3967			deferred[ tuple[ 0 ] ] = function() {
3968				deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments );
3969				return this;
3970			};
3971
3972			// deferred.notifyWith = list.fireWith
3973			// deferred.resolveWith = list.fireWith
3974			// deferred.rejectWith = list.fireWith
3975			deferred[ tuple[ 0 ] + "With" ] = list.fireWith;
3976		} );
3977
3978		// Make the deferred a promise
3979		promise.promise( deferred );
3980
3981		// Call given func if any
3982		if ( func ) {
3983			func.call( deferred, deferred );
3984		}
3985
3986		// All done!
3987		return deferred;
3988	},
3989
3990	// Deferred helper
3991	when: function( singleValue ) {
3992		var
3993
3994			// count of uncompleted subordinates
3995			remaining = arguments.length,
3996
3997			// count of unprocessed arguments
3998			i = remaining,
3999
4000			// subordinate fulfillment data
4001			resolveContexts = Array( i ),
4002			resolveValues = slice.call( arguments ),
4003
4004			// the primary Deferred
4005			primary = jQuery.Deferred(),
4006
4007			// subordinate callback factory
4008			updateFunc = function( i ) {
4009				return function( value ) {
4010					resolveContexts[ i ] = this;
4011					resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
4012					if ( !( --remaining ) ) {
4013						primary.resolveWith( resolveContexts, resolveValues );
4014					}
4015				};
4016			};
4017
4018		// Single- and empty arguments are adopted like Promise.resolve
4019		if ( remaining <= 1 ) {
4020			adoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject,
4021				!remaining );
4022
4023			// Use .then() to unwrap secondary thenables (cf. gh-3000)
4024			if ( primary.state() === "pending" ||
4025				isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {
4026
4027				return primary.then();
4028			}
4029		}
4030
4031		// Multiple arguments are aggregated like Promise.all array elements
4032		while ( i-- ) {
4033			adoptValue( resolveValues[ i ], updateFunc( i ), primary.reject );
4034		}
4035
4036		return primary.promise();
4037	}
4038} );
4039
4040
4041// These usually indicate a programmer mistake during development,
4042// warn about them ASAP rather than swallowing them by default.
4043var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
4044
4045jQuery.Deferred.exceptionHook = function( error, stack ) {
4046
4047	// Support: IE 8 - 9 only
4048	// Console exists when dev tools are open, which can happen at any time
4049	if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {
4050		window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack );
4051	}
4052};
4053
4054
4055
4056
4057jQuery.readyException = function( error ) {
4058	window.setTimeout( function() {
4059		throw error;
4060	} );
4061};
4062
4063
4064
4065
4066// The deferred used on DOM ready
4067var readyList = jQuery.Deferred();
4068
4069jQuery.fn.ready = function( fn ) {
4070
4071	readyList
4072		.then( fn )
4073
4074		// Wrap jQuery.readyException in a function so that the lookup
4075		// happens at the time of error handling instead of callback
4076		// registration.
4077		.catch( function( error ) {
4078			jQuery.readyException( error );
4079		} );
4080
4081	return this;
4082};
4083
4084jQuery.extend( {
4085
4086	// Is the DOM ready to be used? Set to true once it occurs.
4087	isReady: false,
4088
4089	// A counter to track how many items to wait for before
4090	// the ready event fires. See #6781
4091	readyWait: 1,
4092
4093	// Handle when the DOM is ready
4094	ready: function( wait ) {
4095
4096		// Abort if there are pending holds or we're already ready
4097		if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
4098			return;
4099		}
4100
4101		// Remember that the DOM is ready
4102		jQuery.isReady = true;
4103
4104		// If a normal DOM Ready event fired, decrement, and wait if need be
4105		if ( wait !== true && --jQuery.readyWait > 0 ) {
4106			return;
4107		}
4108
4109		// If there are functions bound, to execute
4110		readyList.resolveWith( document, [ jQuery ] );
4111	}
4112} );
4113
4114jQuery.ready.then = readyList.then;
4115
4116// The ready event handler and self cleanup method
4117function completed() {
4118	document.removeEventListener( "DOMContentLoaded", completed );
4119	window.removeEventListener( "load", completed );
4120	jQuery.ready();
4121}
4122
4123// Catch cases where $(document).ready() is called
4124// after the browser event has already occurred.
4125// Support: IE <=9 - 10 only
4126// Older IE sometimes signals "interactive" too soon
4127if ( document.readyState === "complete" ||
4128	( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
4129
4130	// Handle it asynchronously to allow scripts the opportunity to delay ready
4131	window.setTimeout( jQuery.ready );
4132
4133} else {
4134
4135	// Use the handy event callback
4136	document.addEventListener( "DOMContentLoaded", completed );
4137
4138	// A fallback to window.onload, that will always work
4139	window.addEventListener( "load", completed );
4140}
4141
4142
4143
4144
4145// Multifunctional method to get and set values of a collection
4146// The value/s can optionally be executed if it's a function
4147var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
4148	var i = 0,
4149		len = elems.length,
4150		bulk = key == null;
4151
4152	// Sets many values
4153	if ( toType( key ) === "object" ) {
4154		chainable = true;
4155		for ( i in key ) {
4156			access( elems, fn, i, key[ i ], true, emptyGet, raw );
4157		}
4158
4159	// Sets one value
4160	} else if ( value !== undefined ) {
4161		chainable = true;
4162
4163		if ( !isFunction( value ) ) {
4164			raw = true;
4165		}
4166
4167		if ( bulk ) {
4168
4169			// Bulk operations run against the entire set
4170			if ( raw ) {
4171				fn.call( elems, value );
4172				fn = null;
4173
4174			// ...except when executing function values
4175			} else {
4176				bulk = fn;
4177				fn = function( elem, _key, value ) {
4178					return bulk.call( jQuery( elem ), value );
4179				};
4180			}
4181		}
4182
4183		if ( fn ) {
4184			for ( ; i < len; i++ ) {
4185				fn(
4186					elems[ i ], key, raw ?
4187						value :
4188						value.call( elems[ i ], i, fn( elems[ i ], key ) )
4189				);
4190			}
4191		}
4192	}
4193
4194	if ( chainable ) {
4195		return elems;
4196	}
4197
4198	// Gets
4199	if ( bulk ) {
4200		return fn.call( elems );
4201	}
4202
4203	return len ? fn( elems[ 0 ], key ) : emptyGet;
4204};
4205
4206
4207// Matches dashed string for camelizing
4208var rmsPrefix = /^-ms-/,
4209	rdashAlpha = /-([a-z])/g;
4210
4211// Used by camelCase as callback to replace()
4212function fcamelCase( _all, letter ) {
4213	return letter.toUpperCase();
4214}
4215
4216// Convert dashed to camelCase; used by the css and data modules
4217// Support: IE <=9 - 11, Edge 12 - 15
4218// Microsoft forgot to hump their vendor prefix (#9572)
4219function camelCase( string ) {
4220	return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
4221}
4222var acceptData = function( owner ) {
4223
4224	// Accepts only:
4225	//  - Node
4226	//    - Node.ELEMENT_NODE
4227	//    - Node.DOCUMENT_NODE
4228	//  - Object
4229	//    - Any
4230	return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
4231};
4232
4233
4234
4235
4236function Data() {
4237	this.expando = jQuery.expando + Data.uid++;
4238}
4239
4240Data.uid = 1;
4241
4242Data.prototype = {
4243
4244	cache: function( owner ) {
4245
4246		// Check if the owner object already has a cache
4247		var value = owner[ this.expando ];
4248
4249		// If not, create one
4250		if ( !value ) {
4251			value = {};
4252
4253			// We can accept data for non-element nodes in modern browsers,
4254			// but we should not, see #8335.
4255			// Always return an empty object.
4256			if ( acceptData( owner ) ) {
4257
4258				// If it is a node unlikely to be stringify-ed or looped over
4259				// use plain assignment
4260				if ( owner.nodeType ) {
4261					owner[ this.expando ] = value;
4262
4263				// Otherwise secure it in a non-enumerable property
4264				// configurable must be true to allow the property to be
4265				// deleted when data is removed
4266				} else {
4267					Object.defineProperty( owner, this.expando, {
4268						value: value,
4269						configurable: true
4270					} );
4271				}
4272			}
4273		}
4274
4275		return value;
4276	},
4277	set: function( owner, data, value ) {
4278		var prop,
4279			cache = this.cache( owner );
4280
4281		// Handle: [ owner, key, value ] args
4282		// Always use camelCase key (gh-2257)
4283		if ( typeof data === "string" ) {
4284			cache[ camelCase( data ) ] = value;
4285
4286		// Handle: [ owner, { properties } ] args
4287		} else {
4288
4289			// Copy the properties one-by-one to the cache object
4290			for ( prop in data ) {
4291				cache[ camelCase( prop ) ] = data[ prop ];
4292			}
4293		}
4294		return cache;
4295	},
4296	get: function( owner, key ) {
4297		return key === undefined ?
4298			this.cache( owner ) :
4299
4300			// Always use camelCase key (gh-2257)
4301			owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];
4302	},
4303	access: function( owner, key, value ) {
4304
4305		// In cases where either:
4306		//
4307		//   1. No key was specified
4308		//   2. A string key was specified, but no value provided
4309		//
4310		// Take the "read" path and allow the get method to determine
4311		// which value to return, respectively either:
4312		//
4313		//   1. The entire cache object
4314		//   2. The data stored at the key
4315		//
4316		if ( key === undefined ||
4317				( ( key && typeof key === "string" ) && value === undefined ) ) {
4318
4319			return this.get( owner, key );
4320		}
4321
4322		// When the key is not a string, or both a key and value
4323		// are specified, set or extend (existing objects) with either:
4324		//
4325		//   1. An object of properties
4326		//   2. A key and value
4327		//
4328		this.set( owner, key, value );
4329
4330		// Since the "set" path can have two possible entry points
4331		// return the expected data based on which path was taken[*]
4332		return value !== undefined ? value : key;
4333	},
4334	remove: function( owner, key ) {
4335		var i,
4336			cache = owner[ this.expando ];
4337
4338		if ( cache === undefined ) {
4339			return;
4340		}
4341
4342		if ( key !== undefined ) {
4343
4344			// Support array or space separated string of keys
4345			if ( Array.isArray( key ) ) {
4346
4347				// If key is an array of keys...
4348				// We always set camelCase keys, so remove that.
4349				key = key.map( camelCase );
4350			} else {
4351				key = camelCase( key );
4352
4353				// If a key with the spaces exists, use it.
4354				// Otherwise, create an array by matching non-whitespace
4355				key = key in cache ?
4356					[ key ] :
4357					( key.match( rnothtmlwhite ) || [] );
4358			}
4359
4360			i = key.length;
4361
4362			while ( i-- ) {
4363				delete cache[ key[ i ] ];
4364			}
4365		}
4366
4367		// Remove the expando if there's no more data
4368		if ( key === undefined || jQuery.isEmptyObject( cache ) ) {
4369
4370			// Support: Chrome <=35 - 45
4371			// Webkit & Blink performance suffers when deleting properties
4372			// from DOM nodes, so set to undefined instead
4373			// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)
4374			if ( owner.nodeType ) {
4375				owner[ this.expando ] = undefined;
4376			} else {
4377				delete owner[ this.expando ];
4378			}
4379		}
4380	},
4381	hasData: function( owner ) {
4382		var cache = owner[ this.expando ];
4383		return cache !== undefined && !jQuery.isEmptyObject( cache );
4384	}
4385};
4386var dataPriv = new Data();
4387
4388var dataUser = new Data();
4389
4390
4391
4392//	Implementation Summary
4393//
4394//	1. Enforce API surface and semantic compatibility with 1.9.x branch
4395//	2. Improve the module's maintainability by reducing the storage
4396//		paths to a single mechanism.
4397//	3. Use the same single mechanism to support "private" and "user" data.
4398//	4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
4399//	5. Avoid exposing implementation details on user objects (eg. expando properties)
4400//	6. Provide a clear path for implementation upgrade to WeakMap in 2014
4401
4402var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
4403	rmultiDash = /[A-Z]/g;
4404
4405function getData( data ) {
4406	if ( data === "true" ) {
4407		return true;
4408	}
4409
4410	if ( data === "false" ) {
4411		return false;
4412	}
4413
4414	if ( data === "null" ) {
4415		return null;
4416	}
4417
4418	// Only convert to a number if it doesn't change the string
4419	if ( data === +data + "" ) {
4420		return +data;
4421	}
4422
4423	if ( rbrace.test( data ) ) {
4424		return JSON.parse( data );
4425	}
4426
4427	return data;
4428}
4429
4430function dataAttr( elem, key, data ) {
4431	var name;
4432
4433	// If nothing was found internally, try to fetch any
4434	// data from the HTML5 data-* attribute
4435	if ( data === undefined && elem.nodeType === 1 ) {
4436		name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();
4437		data = elem.getAttribute( name );
4438
4439		if ( typeof data === "string" ) {
4440			try {
4441				data = getData( data );
4442			} catch ( e ) {}
4443
4444			// Make sure we set the data so it isn't changed later
4445			dataUser.set( elem, key, data );
4446		} else {
4447			data = undefined;
4448		}
4449	}
4450	return data;
4451}
4452
4453jQuery.extend( {
4454	hasData: function( elem ) {
4455		return dataUser.hasData( elem ) || dataPriv.hasData( elem );
4456	},
4457
4458	data: function( elem, name, data ) {
4459		return dataUser.access( elem, name, data );
4460	},
4461
4462	removeData: function( elem, name ) {
4463		dataUser.remove( elem, name );
4464	},
4465
4466	// TODO: Now that all calls to _data and _removeData have been replaced
4467	// with direct calls to dataPriv methods, these can be deprecated.
4468	_data: function( elem, name, data ) {
4469		return dataPriv.access( elem, name, data );
4470	},
4471
4472	_removeData: function( elem, name ) {
4473		dataPriv.remove( elem, name );
4474	}
4475} );
4476
4477jQuery.fn.extend( {
4478	data: function( key, value ) {
4479		var i, name, data,
4480			elem = this[ 0 ],
4481			attrs = elem && elem.attributes;
4482
4483		// Gets all values
4484		if ( key === undefined ) {
4485			if ( this.length ) {
4486				data = dataUser.get( elem );
4487
4488				if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {
4489					i = attrs.length;
4490					while ( i-- ) {
4491
4492						// Support: IE 11 only
4493						// The attrs elements can be null (#14894)
4494						if ( attrs[ i ] ) {
4495							name = attrs[ i ].name;
4496							if ( name.indexOf( "data-" ) === 0 ) {
4497								name = camelCase( name.slice( 5 ) );
4498								dataAttr( elem, name, data[ name ] );
4499							}
4500						}
4501					}
4502					dataPriv.set( elem, "hasDataAttrs", true );
4503				}
4504			}
4505
4506			return data;
4507		}
4508
4509		// Sets multiple values
4510		if ( typeof key === "object" ) {
4511			return this.each( function() {
4512				dataUser.set( this, key );
4513			} );
4514		}
4515
4516		return access( this, function( value ) {
4517			var data;
4518
4519			// The calling jQuery object (element matches) is not empty
4520			// (and therefore has an element appears at this[ 0 ]) and the
4521			// `value` parameter was not undefined. An empty jQuery object
4522			// will result in `undefined` for elem = this[ 0 ] which will
4523			// throw an exception if an attempt to read a data cache is made.
4524			if ( elem && value === undefined ) {
4525
4526				// Attempt to get data from the cache
4527				// The key will always be camelCased in Data
4528				data = dataUser.get( elem, key );
4529				if ( data !== undefined ) {
4530					return data;
4531				}
4532
4533				// Attempt to "discover" the data in
4534				// HTML5 custom data-* attrs
4535				data = dataAttr( elem, key );
4536				if ( data !== undefined ) {
4537					return data;
4538				}
4539
4540				// We tried really hard, but the data doesn't exist.
4541				return;
4542			}
4543
4544			// Set the data...
4545			this.each( function() {
4546
4547				// We always store the camelCased key
4548				dataUser.set( this, key, value );
4549			} );
4550		}, null, value, arguments.length > 1, null, true );
4551	},
4552
4553	removeData: function( key ) {
4554		return this.each( function() {
4555			dataUser.remove( this, key );
4556		} );
4557	}
4558} );
4559
4560
4561jQuery.extend( {
4562	queue: function( elem, type, data ) {
4563		var queue;
4564
4565		if ( elem ) {
4566			type = ( type || "fx" ) + "queue";
4567			queue = dataPriv.get( elem, type );
4568
4569			// Speed up dequeue by getting out quickly if this is just a lookup
4570			if ( data ) {
4571				if ( !queue || Array.isArray( data ) ) {
4572					queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
4573				} else {
4574					queue.push( data );
4575				}
4576			}
4577			return queue || [];
4578		}
4579	},
4580
4581	dequeue: function( elem, type ) {
4582		type = type || "fx";
4583
4584		var queue = jQuery.queue( elem, type ),
4585			startLength = queue.length,
4586			fn = queue.shift(),
4587			hooks = jQuery._queueHooks( elem, type ),
4588			next = function() {
4589				jQuery.dequeue( elem, type );
4590			};
4591
4592		// If the fx queue is dequeued, always remove the progress sentinel
4593		if ( fn === "inprogress" ) {
4594			fn = queue.shift();
4595			startLength--;
4596		}
4597
4598		if ( fn ) {
4599
4600			// Add a progress sentinel to prevent the fx queue from being
4601			// automatically dequeued
4602			if ( type === "fx" ) {
4603				queue.unshift( "inprogress" );
4604			}
4605
4606			// Clear up the last queue stop function
4607			delete hooks.stop;
4608			fn.call( elem, next, hooks );
4609		}
4610
4611		if ( !startLength && hooks ) {
4612			hooks.empty.fire();
4613		}
4614	},
4615
4616	// Not public - generate a queueHooks object, or return the current one
4617	_queueHooks: function( elem, type ) {
4618		var key = type + "queueHooks";
4619		return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
4620			empty: jQuery.Callbacks( "once memory" ).add( function() {
4621				dataPriv.remove( elem, [ type + "queue", key ] );
4622			} )
4623		} );
4624	}
4625} );
4626
4627jQuery.fn.extend( {
4628	queue: function( type, data ) {
4629		var setter = 2;
4630
4631		if ( typeof type !== "string" ) {
4632			data = type;
4633			type = "fx";
4634			setter--;
4635		}
4636
4637		if ( arguments.length < setter ) {
4638			return jQuery.queue( this[ 0 ], type );
4639		}
4640
4641		return data === undefined ?
4642			this :
4643			this.each( function() {
4644				var queue = jQuery.queue( this, type, data );
4645
4646				// Ensure a hooks for this queue
4647				jQuery._queueHooks( this, type );
4648
4649				if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {
4650					jQuery.dequeue( this, type );
4651				}
4652			} );
4653	},
4654	dequeue: function( type ) {
4655		return this.each( function() {
4656			jQuery.dequeue( this, type );
4657		} );
4658	},
4659	clearQueue: function( type ) {
4660		return this.queue( type || "fx", [] );
4661	},
4662
4663	// Get a promise resolved when queues of a certain type
4664	// are emptied (fx is the type by default)
4665	promise: function( type, obj ) {
4666		var tmp,
4667			count = 1,
4668			defer = jQuery.Deferred(),
4669			elements = this,
4670			i = this.length,
4671			resolve = function() {
4672				if ( !( --count ) ) {
4673					defer.resolveWith( elements, [ elements ] );
4674				}
4675			};
4676
4677		if ( typeof type !== "string" ) {
4678			obj = type;
4679			type = undefined;
4680		}
4681		type = type || "fx";
4682
4683		while ( i-- ) {
4684			tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
4685			if ( tmp && tmp.empty ) {
4686				count++;
4687				tmp.empty.add( resolve );
4688			}
4689		}
4690		resolve();
4691		return defer.promise( obj );
4692	}
4693} );
4694var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source;
4695
4696var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );
4697
4698
4699var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
4700
4701var documentElement = document.documentElement;
4702
4703
4704
4705	var isAttached = function( elem ) {
4706			return jQuery.contains( elem.ownerDocument, elem );
4707		},
4708		composed = { composed: true };
4709
4710	// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only
4711	// Check attachment across shadow DOM boundaries when possible (gh-3504)
4712	// Support: iOS 10.0-10.2 only
4713	// Early iOS 10 versions support `attachShadow` but not `getRootNode`,
4714	// leading to errors. We need to check for `getRootNode`.
4715	if ( documentElement.getRootNode ) {
4716		isAttached = function( elem ) {
4717			return jQuery.contains( elem.ownerDocument, elem ) ||
4718				elem.getRootNode( composed ) === elem.ownerDocument;
4719		};
4720	}
4721var isHiddenWithinTree = function( elem, el ) {
4722
4723		// isHiddenWithinTree might be called from jQuery#filter function;
4724		// in that case, element will be second argument
4725		elem = el || elem;
4726
4727		// Inline style trumps all
4728		return elem.style.display === "none" ||
4729			elem.style.display === "" &&
4730
4731			// Otherwise, check computed style
4732			// Support: Firefox <=43 - 45
4733			// Disconnected elements can have computed display: none, so first confirm that elem is
4734			// in the document.
4735			isAttached( elem ) &&
4736
4737			jQuery.css( elem, "display" ) === "none";
4738	};
4739
4740
4741
4742function adjustCSS( elem, prop, valueParts, tween ) {
4743	var adjusted, scale,
4744		maxIterations = 20,
4745		currentValue = tween ?
4746			function() {
4747				return tween.cur();
4748			} :
4749			function() {
4750				return jQuery.css( elem, prop, "" );
4751			},
4752		initial = currentValue(),
4753		unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
4754
4755		// Starting value computation is required for potential unit mismatches
4756		initialInUnit = elem.nodeType &&
4757			( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
4758			rcssNum.exec( jQuery.css( elem, prop ) );
4759
4760	if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
4761
4762		// Support: Firefox <=54
4763		// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)
4764		initial = initial / 2;
4765
4766		// Trust units reported by jQuery.css
4767		unit = unit || initialInUnit[ 3 ];
4768
4769		// Iteratively approximate from a nonzero starting point
4770		initialInUnit = +initial || 1;
4771
4772		while ( maxIterations-- ) {
4773
4774			// Evaluate and update our best guess (doubling guesses that zero out).
4775			// Finish if the scale equals or crosses 1 (making the old*new product non-positive).
4776			jQuery.style( elem, prop, initialInUnit + unit );
4777			if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {
4778				maxIterations = 0;
4779			}
4780			initialInUnit = initialInUnit / scale;
4781
4782		}
4783
4784		initialInUnit = initialInUnit * 2;
4785		jQuery.style( elem, prop, initialInUnit + unit );
4786
4787		// Make sure we update the tween properties later on
4788		valueParts = valueParts || [];
4789	}
4790
4791	if ( valueParts ) {
4792		initialInUnit = +initialInUnit || +initial || 0;
4793
4794		// Apply relative offset (+=/-=) if specified
4795		adjusted = valueParts[ 1 ] ?
4796			initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
4797			+valueParts[ 2 ];
4798		if ( tween ) {
4799			tween.unit = unit;
4800			tween.start = initialInUnit;
4801			tween.end = adjusted;
4802		}
4803	}
4804	return adjusted;
4805}
4806
4807
4808var defaultDisplayMap = {};
4809
4810function getDefaultDisplay( elem ) {
4811	var temp,
4812		doc = elem.ownerDocument,
4813		nodeName = elem.nodeName,
4814		display = defaultDisplayMap[ nodeName ];
4815
4816	if ( display ) {
4817		return display;
4818	}
4819
4820	temp = doc.body.appendChild( doc.createElement( nodeName ) );
4821	display = jQuery.css( temp, "display" );
4822
4823	temp.parentNode.removeChild( temp );
4824
4825	if ( display === "none" ) {
4826		display = "block";
4827	}
4828	defaultDisplayMap[ nodeName ] = display;
4829
4830	return display;
4831}
4832
4833function showHide( elements, show ) {
4834	var display, elem,
4835		values = [],
4836		index = 0,
4837		length = elements.length;
4838
4839	// Determine new display value for elements that need to change
4840	for ( ; index < length; index++ ) {
4841		elem = elements[ index ];
4842		if ( !elem.style ) {
4843			continue;
4844		}
4845
4846		display = elem.style.display;
4847		if ( show ) {
4848
4849			// Since we force visibility upon cascade-hidden elements, an immediate (and slow)
4850			// check is required in this first loop unless we have a nonempty display value (either
4851			// inline or about-to-be-restored)
4852			if ( display === "none" ) {
4853				values[ index ] = dataPriv.get( elem, "display" ) || null;
4854				if ( !values[ index ] ) {
4855					elem.style.display = "";
4856				}
4857			}
4858			if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) {
4859				values[ index ] = getDefaultDisplay( elem );
4860			}
4861		} else {
4862			if ( display !== "none" ) {
4863				values[ index ] = "none";
4864
4865				// Remember what we're overwriting
4866				dataPriv.set( elem, "display", display );
4867			}
4868		}
4869	}
4870
4871	// Set the display of the elements in a second loop to avoid constant reflow
4872	for ( index = 0; index < length; index++ ) {
4873		if ( values[ index ] != null ) {
4874			elements[ index ].style.display = values[ index ];
4875		}
4876	}
4877
4878	return elements;
4879}
4880
4881jQuery.fn.extend( {
4882	show: function() {
4883		return showHide( this, true );
4884	},
4885	hide: function() {
4886		return showHide( this );
4887	},
4888	toggle: function( state ) {
4889		if ( typeof state === "boolean" ) {
4890			return state ? this.show() : this.hide();
4891		}
4892
4893		return this.each( function() {
4894			if ( isHiddenWithinTree( this ) ) {
4895				jQuery( this ).show();
4896			} else {
4897				jQuery( this ).hide();
4898			}
4899		} );
4900	}
4901} );
4902var rcheckableType = ( /^(?:checkbox|radio)$/i );
4903
4904var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i );
4905
4906var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i );
4907
4908
4909
4910( function() {
4911	var fragment = document.createDocumentFragment(),
4912		div = fragment.appendChild( document.createElement( "div" ) ),
4913		input = document.createElement( "input" );
4914
4915	// Support: Android 4.0 - 4.3 only
4916	// Check state lost if the name is set (#11217)
4917	// Support: Windows Web Apps (WWA)
4918	// `name` and `type` must use .setAttribute for WWA (#14901)
4919	input.setAttribute( "type", "radio" );
4920	input.setAttribute( "checked", "checked" );
4921	input.setAttribute( "name", "t" );
4922
4923	div.appendChild( input );
4924
4925	// Support: Android <=4.1 only
4926	// Older WebKit doesn't clone checked state correctly in fragments
4927	support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
4928
4929	// Support: IE <=11 only
4930	// Make sure textarea (and checkbox) defaultValue is properly cloned
4931	div.innerHTML = "<textarea>x</textarea>";
4932	support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
4933
4934	// Support: IE <=9 only
4935	// IE <=9 replaces <option> tags with their contents when inserted outside of
4936	// the select element.
4937	div.innerHTML = "<option></option>";
4938	support.option = !!div.lastChild;
4939} )();
4940
4941
4942// We have to close these tags to support XHTML (#13200)
4943var wrapMap = {
4944
4945	// XHTML parsers do not magically insert elements in the
4946	// same way that tag soup parsers do. So we cannot shorten
4947	// this by omitting <tbody> or other required elements.
4948	thead: [ 1, "<table>", "</table>" ],
4949	col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
4950	tr: [ 2, "<table><tbody>", "</tbody></table>" ],
4951	td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
4952
4953	_default: [ 0, "", "" ]
4954};
4955
4956wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
4957wrapMap.th = wrapMap.td;
4958
4959// Support: IE <=9 only
4960if ( !support.option ) {
4961	wrapMap.optgroup = wrapMap.option = [ 1, "<select multiple='multiple'>", "</select>" ];
4962}
4963
4964
4965function getAll( context, tag ) {
4966
4967	// Support: IE <=9 - 11 only
4968	// Use typeof to avoid zero-argument method invocation on host objects (#15151)
4969	var ret;
4970
4971	if ( typeof context.getElementsByTagName !== "undefined" ) {
4972		ret = context.getElementsByTagName( tag || "*" );
4973
4974	} else if ( typeof context.querySelectorAll !== "undefined" ) {
4975		ret = context.querySelectorAll( tag || "*" );
4976
4977	} else {
4978		ret = [];
4979	}
4980
4981	if ( tag === undefined || tag && nodeName( context, tag ) ) {
4982		return jQuery.merge( [ context ], ret );
4983	}
4984
4985	return ret;
4986}
4987
4988
4989// Mark scripts as having already been evaluated
4990function setGlobalEval( elems, refElements ) {
4991	var i = 0,
4992		l = elems.length;
4993
4994	for ( ; i < l; i++ ) {
4995		dataPriv.set(
4996			elems[ i ],
4997			"globalEval",
4998			!refElements || dataPriv.get( refElements[ i ], "globalEval" )
4999		);
5000	}
5001}
5002
5003
5004var rhtml = /<|&#?\w+;/;
5005
5006function buildFragment( elems, context, scripts, selection, ignored ) {
5007	var elem, tmp, tag, wrap, attached, j,
5008		fragment = context.createDocumentFragment(),
5009		nodes = [],
5010		i = 0,
5011		l = elems.length;
5012
5013	for ( ; i < l; i++ ) {
5014		elem = elems[ i ];
5015
5016		if ( elem || elem === 0 ) {
5017
5018			// Add nodes directly
5019			if ( toType( elem ) === "object" ) {
5020
5021				// Support: Android <=4.0 only, PhantomJS 1 only
5022				// push.apply(_, arraylike) throws on ancient WebKit
5023				jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
5024
5025			// Convert non-html into a text node
5026			} else if ( !rhtml.test( elem ) ) {
5027				nodes.push( context.createTextNode( elem ) );
5028
5029			// Convert html into DOM nodes
5030			} else {
5031				tmp = tmp || fragment.appendChild( context.createElement( "div" ) );
5032
5033				// Deserialize a standard representation
5034				tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
5035				wrap = wrapMap[ tag ] || wrapMap._default;
5036				tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];
5037
5038				// Descend through wrappers to the right content
5039				j = wrap[ 0 ];
5040				while ( j-- ) {
5041					tmp = tmp.lastChild;
5042				}
5043
5044				// Support: Android <=4.0 only, PhantomJS 1 only
5045				// push.apply(_, arraylike) throws on ancient WebKit
5046				jQuery.merge( nodes, tmp.childNodes );
5047
5048				// Remember the top-level container
5049				tmp = fragment.firstChild;
5050
5051				// Ensure the created nodes are orphaned (#12392)
5052				tmp.textContent = "";
5053			}
5054		}
5055	}
5056
5057	// Remove wrapper from fragment
5058	fragment.textContent = "";
5059
5060	i = 0;
5061	while ( ( elem = nodes[ i++ ] ) ) {
5062
5063		// Skip elements already in the context collection (trac-4087)
5064		if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
5065			if ( ignored ) {
5066				ignored.push( elem );
5067			}
5068			continue;
5069		}
5070
5071		attached = isAttached( elem );
5072
5073		// Append to fragment
5074		tmp = getAll( fragment.appendChild( elem ), "script" );
5075
5076		// Preserve script evaluation history
5077		if ( attached ) {
5078			setGlobalEval( tmp );
5079		}
5080
5081		// Capture executables
5082		if ( scripts ) {
5083			j = 0;
5084			while ( ( elem = tmp[ j++ ] ) ) {
5085				if ( rscriptType.test( elem.type || "" ) ) {
5086					scripts.push( elem );
5087				}
5088			}
5089		}
5090	}
5091
5092	return fragment;
5093}
5094
5095
5096var rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
5097
5098function returnTrue() {
5099	return true;
5100}
5101
5102function returnFalse() {
5103	return false;
5104}
5105
5106// Support: IE <=9 - 11+
5107// focus() and blur() are asynchronous, except when they are no-op.
5108// So expect focus to be synchronous when the element is already active,
5109// and blur to be synchronous when the element is not already active.
5110// (focus and blur are always synchronous in other supported browsers,
5111// this just defines when we can count on it).
5112function expectSync( elem, type ) {
5113	return ( elem === safeActiveElement() ) === ( type === "focus" );
5114}
5115
5116// Support: IE <=9 only
5117// Accessing document.activeElement can throw unexpectedly
5118// https://bugs.jquery.com/ticket/13393
5119function safeActiveElement() {
5120	try {
5121		return document.activeElement;
5122	} catch ( err ) { }
5123}
5124
5125function on( elem, types, selector, data, fn, one ) {
5126	var origFn, type;
5127
5128	// Types can be a map of types/handlers
5129	if ( typeof types === "object" ) {
5130
5131		// ( types-Object, selector, data )
5132		if ( typeof selector !== "string" ) {
5133
5134			// ( types-Object, data )
5135			data = data || selector;
5136			selector = undefined;
5137		}
5138		for ( type in types ) {
5139			on( elem, type, selector, data, types[ type ], one );
5140		}
5141		return elem;
5142	}
5143
5144	if ( data == null && fn == null ) {
5145
5146		// ( types, fn )
5147		fn = selector;
5148		data = selector = undefined;
5149	} else if ( fn == null ) {
5150		if ( typeof selector === "string" ) {
5151
5152			// ( types, selector, fn )
5153			fn = data;
5154			data = undefined;
5155		} else {
5156
5157			// ( types, data, fn )
5158			fn = data;
5159			data = selector;
5160			selector = undefined;
5161		}
5162	}
5163	if ( fn === false ) {
5164		fn = returnFalse;
5165	} else if ( !fn ) {
5166		return elem;
5167	}
5168
5169	if ( one === 1 ) {
5170		origFn = fn;
5171		fn = function( event ) {
5172
5173			// Can use an empty set, since event contains the info
5174			jQuery().off( event );
5175			return origFn.apply( this, arguments );
5176		};
5177
5178		// Use same guid so caller can remove using origFn
5179		fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
5180	}
5181	return elem.each( function() {
5182		jQuery.event.add( this, types, fn, data, selector );
5183	} );
5184}
5185
5186/*
5187 * Helper functions for managing events -- not part of the public interface.
5188 * Props to Dean Edwards' addEvent library for many of the ideas.
5189 */
5190jQuery.event = {
5191
5192	global: {},
5193
5194	add: function( elem, types, handler, data, selector ) {
5195
5196		var handleObjIn, eventHandle, tmp,
5197			events, t, handleObj,
5198			special, handlers, type, namespaces, origType,
5199			elemData = dataPriv.get( elem );
5200
5201		// Only attach events to objects that accept data
5202		if ( !acceptData( elem ) ) {
5203			return;
5204		}
5205
5206		// Caller can pass in an object of custom data in lieu of the handler
5207		if ( handler.handler ) {
5208			handleObjIn = handler;
5209			handler = handleObjIn.handler;
5210			selector = handleObjIn.selector;
5211		}
5212
5213		// Ensure that invalid selectors throw exceptions at attach time
5214		// Evaluate against documentElement in case elem is a non-element node (e.g., document)
5215		if ( selector ) {
5216			jQuery.find.matchesSelector( documentElement, selector );
5217		}
5218
5219		// Make sure that the handler has a unique ID, used to find/remove it later
5220		if ( !handler.guid ) {
5221			handler.guid = jQuery.guid++;
5222		}
5223
5224		// Init the element's event structure and main handler, if this is the first
5225		if ( !( events = elemData.events ) ) {
5226			events = elemData.events = Object.create( null );
5227		}
5228		if ( !( eventHandle = elemData.handle ) ) {
5229			eventHandle = elemData.handle = function( e ) {
5230
5231				// Discard the second event of a jQuery.event.trigger() and
5232				// when an event is called after a page has unloaded
5233				return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
5234					jQuery.event.dispatch.apply( elem, arguments ) : undefined;
5235			};
5236		}
5237
5238		// Handle multiple events separated by a space
5239		types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
5240		t = types.length;
5241		while ( t-- ) {
5242			tmp = rtypenamespace.exec( types[ t ] ) || [];
5243			type = origType = tmp[ 1 ];
5244			namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
5245
5246			// There *must* be a type, no attaching namespace-only handlers
5247			if ( !type ) {
5248				continue;
5249			}
5250
5251			// If event changes its type, use the special event handlers for the changed type
5252			special = jQuery.event.special[ type ] || {};
5253
5254			// If selector defined, determine special event api type, otherwise given type
5255			type = ( selector ? special.delegateType : special.bindType ) || type;
5256
5257			// Update special based on newly reset type
5258			special = jQuery.event.special[ type ] || {};
5259
5260			// handleObj is passed to all event handlers
5261			handleObj = jQuery.extend( {
5262				type: type,
5263				origType: origType,
5264				data: data,
5265				handler: handler,
5266				guid: handler.guid,
5267				selector: selector,
5268				needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
5269				namespace: namespaces.join( "." )
5270			}, handleObjIn );
5271
5272			// Init the event handler queue if we're the first
5273			if ( !( handlers = events[ type ] ) ) {
5274				handlers = events[ type ] = [];
5275				handlers.delegateCount = 0;
5276
5277				// Only use addEventListener if the special events handler returns false
5278				if ( !special.setup ||
5279					special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
5280
5281					if ( elem.addEventListener ) {
5282						elem.addEventListener( type, eventHandle );
5283					}
5284				}
5285			}
5286
5287			if ( special.add ) {
5288				special.add.call( elem, handleObj );
5289
5290				if ( !handleObj.handler.guid ) {
5291					handleObj.handler.guid = handler.guid;
5292				}
5293			}
5294
5295			// Add to the element's handler list, delegates in front
5296			if ( selector ) {
5297				handlers.splice( handlers.delegateCount++, 0, handleObj );
5298			} else {
5299				handlers.push( handleObj );
5300			}
5301
5302			// Keep track of which events have ever been used, for event optimization
5303			jQuery.event.global[ type ] = true;
5304		}
5305
5306	},
5307
5308	// Detach an event or set of events from an element
5309	remove: function( elem, types, handler, selector, mappedTypes ) {
5310
5311		var j, origCount, tmp,
5312			events, t, handleObj,
5313			special, handlers, type, namespaces, origType,
5314			elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );
5315
5316		if ( !elemData || !( events = elemData.events ) ) {
5317			return;
5318		}
5319
5320		// Once for each type.namespace in types; type may be omitted
5321		types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
5322		t = types.length;
5323		while ( t-- ) {
5324			tmp = rtypenamespace.exec( types[ t ] ) || [];
5325			type = origType = tmp[ 1 ];
5326			namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
5327
5328			// Unbind all events (on this namespace, if provided) for the element
5329			if ( !type ) {
5330				for ( type in events ) {
5331					jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
5332				}
5333				continue;
5334			}
5335
5336			special = jQuery.event.special[ type ] || {};
5337			type = ( selector ? special.delegateType : special.bindType ) || type;
5338			handlers = events[ type ] || [];
5339			tmp = tmp[ 2 ] &&
5340				new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );
5341
5342			// Remove matching events
5343			origCount = j = handlers.length;
5344			while ( j-- ) {
5345				handleObj = handlers[ j ];
5346
5347				if ( ( mappedTypes || origType === handleObj.origType ) &&
5348					( !handler || handler.guid === handleObj.guid ) &&
5349					( !tmp || tmp.test( handleObj.namespace ) ) &&
5350					( !selector || selector === handleObj.selector ||
5351						selector === "**" && handleObj.selector ) ) {
5352					handlers.splice( j, 1 );
5353
5354					if ( handleObj.selector ) {
5355						handlers.delegateCount--;
5356					}
5357					if ( special.remove ) {
5358						special.remove.call( elem, handleObj );
5359					}
5360				}
5361			}
5362
5363			// Remove generic event handler if we removed something and no more handlers exist
5364			// (avoids potential for endless recursion during removal of special event handlers)
5365			if ( origCount && !handlers.length ) {
5366				if ( !special.teardown ||
5367					special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
5368
5369					jQuery.removeEvent( elem, type, elemData.handle );
5370				}
5371
5372				delete events[ type ];
5373			}
5374		}
5375
5376		// Remove data and the expando if it's no longer used
5377		if ( jQuery.isEmptyObject( events ) ) {
5378			dataPriv.remove( elem, "handle events" );
5379		}
5380	},
5381
5382	dispatch: function( nativeEvent ) {
5383
5384		var i, j, ret, matched, handleObj, handlerQueue,
5385			args = new Array( arguments.length ),
5386
5387			// Make a writable jQuery.Event from the native event object
5388			event = jQuery.event.fix( nativeEvent ),
5389
5390			handlers = (
5391				dataPriv.get( this, "events" ) || Object.create( null )
5392			)[ event.type ] || [],
5393			special = jQuery.event.special[ event.type ] || {};
5394
5395		// Use the fix-ed jQuery.Event rather than the (read-only) native event
5396		args[ 0 ] = event;
5397
5398		for ( i = 1; i < arguments.length; i++ ) {
5399			args[ i ] = arguments[ i ];
5400		}
5401
5402		event.delegateTarget = this;
5403
5404		// Call the preDispatch hook for the mapped type, and let it bail if desired
5405		if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
5406			return;
5407		}
5408
5409		// Determine handlers
5410		handlerQueue = jQuery.event.handlers.call( this, event, handlers );
5411
5412		// Run delegates first; they may want to stop propagation beneath us
5413		i = 0;
5414		while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {
5415			event.currentTarget = matched.elem;
5416
5417			j = 0;
5418			while ( ( handleObj = matched.handlers[ j++ ] ) &&
5419				!event.isImmediatePropagationStopped() ) {
5420
5421				// If the event is namespaced, then each handler is only invoked if it is
5422				// specially universal or its namespaces are a superset of the event's.
5423				if ( !event.rnamespace || handleObj.namespace === false ||
5424					event.rnamespace.test( handleObj.namespace ) ) {
5425
5426					event.handleObj = handleObj;
5427					event.data = handleObj.data;
5428
5429					ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
5430						handleObj.handler ).apply( matched.elem, args );
5431
5432					if ( ret !== undefined ) {
5433						if ( ( event.result = ret ) === false ) {
5434							event.preventDefault();
5435							event.stopPropagation();
5436						}
5437					}
5438				}
5439			}
5440		}
5441
5442		// Call the postDispatch hook for the mapped type
5443		if ( special.postDispatch ) {
5444			special.postDispatch.call( this, event );
5445		}
5446
5447		return event.result;
5448	},
5449
5450	handlers: function( event, handlers ) {
5451		var i, handleObj, sel, matchedHandlers, matchedSelectors,
5452			handlerQueue = [],
5453			delegateCount = handlers.delegateCount,
5454			cur = event.target;
5455
5456		// Find delegate handlers
5457		if ( delegateCount &&
5458
5459			// Support: IE <=9
5460			// Black-hole SVG <use> instance trees (trac-13180)
5461			cur.nodeType &&
5462
5463			// Support: Firefox <=42
5464			// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)
5465			// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click
5466			// Support: IE 11 only
5467			// ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)
5468			!( event.type === "click" && event.button >= 1 ) ) {
5469
5470			for ( ; cur !== this; cur = cur.parentNode || this ) {
5471
5472				// Don't check non-elements (#13208)
5473				// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
5474				if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) {
5475					matchedHandlers = [];
5476					matchedSelectors = {};
5477					for ( i = 0; i < delegateCount; i++ ) {
5478						handleObj = handlers[ i ];
5479
5480						// Don't conflict with Object.prototype properties (#13203)
5481						sel = handleObj.selector + " ";
5482
5483						if ( matchedSelectors[ sel ] === undefined ) {
5484							matchedSelectors[ sel ] = handleObj.needsContext ?
5485								jQuery( sel, this ).index( cur ) > -1 :
5486								jQuery.find( sel, this, null, [ cur ] ).length;
5487						}
5488						if ( matchedSelectors[ sel ] ) {
5489							matchedHandlers.push( handleObj );
5490						}
5491					}
5492					if ( matchedHandlers.length ) {
5493						handlerQueue.push( { elem: cur, handlers: matchedHandlers } );
5494					}
5495				}
5496			}
5497		}
5498
5499		// Add the remaining (directly-bound) handlers
5500		cur = this;
5501		if ( delegateCount < handlers.length ) {
5502			handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );
5503		}
5504
5505		return handlerQueue;
5506	},
5507
5508	addProp: function( name, hook ) {
5509		Object.defineProperty( jQuery.Event.prototype, name, {
5510			enumerable: true,
5511			configurable: true,
5512
5513			get: isFunction( hook ) ?
5514				function() {
5515					if ( this.originalEvent ) {
5516						return hook( this.originalEvent );
5517					}
5518				} :
5519				function() {
5520					if ( this.originalEvent ) {
5521						return this.originalEvent[ name ];
5522					}
5523				},
5524
5525			set: function( value ) {
5526				Object.defineProperty( this, name, {
5527					enumerable: true,
5528					configurable: true,
5529					writable: true,
5530					value: value
5531				} );
5532			}
5533		} );
5534	},
5535
5536	fix: function( originalEvent ) {
5537		return originalEvent[ jQuery.expando ] ?
5538			originalEvent :
5539			new jQuery.Event( originalEvent );
5540	},
5541
5542	special: {
5543		load: {
5544
5545			// Prevent triggered image.load events from bubbling to window.load
5546			noBubble: true
5547		},
5548		click: {
5549
5550			// Utilize native event to ensure correct state for checkable inputs
5551			setup: function( data ) {
5552
5553				// For mutual compressibility with _default, replace `this` access with a local var.
5554				// `|| data` is dead code meant only to preserve the variable through minification.
5555				var el = this || data;
5556
5557				// Claim the first handler
5558				if ( rcheckableType.test( el.type ) &&
5559					el.click && nodeName( el, "input" ) ) {
5560
5561					// dataPriv.set( el, "click", ... )
5562					leverageNative( el, "click", returnTrue );
5563				}
5564
5565				// Return false to allow normal processing in the caller
5566				return false;
5567			},
5568			trigger: function( data ) {
5569
5570				// For mutual compressibility with _default, replace `this` access with a local var.
5571				// `|| data` is dead code meant only to preserve the variable through minification.
5572				var el = this || data;
5573
5574				// Force setup before triggering a click
5575				if ( rcheckableType.test( el.type ) &&
5576					el.click && nodeName( el, "input" ) ) {
5577
5578					leverageNative( el, "click" );
5579				}
5580
5581				// Return non-false to allow normal event-path propagation
5582				return true;
5583			},
5584
5585			// For cross-browser consistency, suppress native .click() on links
5586			// Also prevent it if we're currently inside a leveraged native-event stack
5587			_default: function( event ) {
5588				var target = event.target;
5589				return rcheckableType.test( target.type ) &&
5590					target.click && nodeName( target, "input" ) &&
5591					dataPriv.get( target, "click" ) ||
5592					nodeName( target, "a" );
5593			}
5594		},
5595
5596		beforeunload: {
5597			postDispatch: function( event ) {
5598
5599				// Support: Firefox 20+
5600				// Firefox doesn't alert if the returnValue field is not set.
5601				if ( event.result !== undefined && event.originalEvent ) {
5602					event.originalEvent.returnValue = event.result;
5603				}
5604			}
5605		}
5606	}
5607};
5608
5609// Ensure the presence of an event listener that handles manually-triggered
5610// synthetic events by interrupting progress until reinvoked in response to
5611// *native* events that it fires directly, ensuring that state changes have
5612// already occurred before other listeners are invoked.
5613function leverageNative( el, type, expectSync ) {
5614
5615	// Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add
5616	if ( !expectSync ) {
5617		if ( dataPriv.get( el, type ) === undefined ) {
5618			jQuery.event.add( el, type, returnTrue );
5619		}
5620		return;
5621	}
5622
5623	// Register the controller as a special universal handler for all event namespaces
5624	dataPriv.set( el, type, false );
5625	jQuery.event.add( el, type, {
5626		namespace: false,
5627		handler: function( event ) {
5628			var notAsync, result,
5629				saved = dataPriv.get( this, type );
5630
5631			if ( ( event.isTrigger & 1 ) && this[ type ] ) {
5632
5633				// Interrupt processing of the outer synthetic .trigger()ed event
5634				// Saved data should be false in such cases, but might be a leftover capture object
5635				// from an async native handler (gh-4350)
5636				if ( !saved.length ) {
5637
5638					// Store arguments for use when handling the inner native event
5639					// There will always be at least one argument (an event object), so this array
5640					// will not be confused with a leftover capture object.
5641					saved = slice.call( arguments );
5642					dataPriv.set( this, type, saved );
5643
5644					// Trigger the native event and capture its result
5645					// Support: IE <=9 - 11+
5646					// focus() and blur() are asynchronous
5647					notAsync = expectSync( this, type );
5648					this[ type ]();
5649					result = dataPriv.get( this, type );
5650					if ( saved !== result || notAsync ) {
5651						dataPriv.set( this, type, false );
5652					} else {
5653						result = {};
5654					}
5655					if ( saved !== result ) {
5656
5657						// Cancel the outer synthetic event
5658						event.stopImmediatePropagation();
5659						event.preventDefault();
5660
5661						// Support: Chrome 86+
5662						// In Chrome, if an element having a focusout handler is blurred by
5663						// clicking outside of it, it invokes the handler synchronously. If
5664						// that handler calls `.remove()` on the element, the data is cleared,
5665						// leaving `result` undefined. We need to guard against this.
5666						return result && result.value;
5667					}
5668
5669				// If this is an inner synthetic event for an event with a bubbling surrogate
5670				// (focus or blur), assume that the surrogate already propagated from triggering the
5671				// native event and prevent that from happening again here.
5672				// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the
5673				// bubbling surrogate propagates *after* the non-bubbling base), but that seems
5674				// less bad than duplication.
5675				} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {
5676					event.stopPropagation();
5677				}
5678
5679			// If this is a native event triggered above, everything is now in order
5680			// Fire an inner synthetic event with the original arguments
5681			} else if ( saved.length ) {
5682
5683				// ...and capture the result
5684				dataPriv.set( this, type, {
5685					value: jQuery.event.trigger(
5686
5687						// Support: IE <=9 - 11+
5688						// Extend with the prototype to reset the above stopImmediatePropagation()
5689						jQuery.extend( saved[ 0 ], jQuery.Event.prototype ),
5690						saved.slice( 1 ),
5691						this
5692					)
5693				} );
5694
5695				// Abort handling of the native event
5696				event.stopImmediatePropagation();
5697			}
5698		}
5699	} );
5700}
5701
5702jQuery.removeEvent = function( elem, type, handle ) {
5703
5704	// This "if" is needed for plain objects
5705	if ( elem.removeEventListener ) {
5706		elem.removeEventListener( type, handle );
5707	}
5708};
5709
5710jQuery.Event = function( src, props ) {
5711
5712	// Allow instantiation without the 'new' keyword
5713	if ( !( this instanceof jQuery.Event ) ) {
5714		return new jQuery.Event( src, props );
5715	}
5716
5717	// Event object
5718	if ( src && src.type ) {
5719		this.originalEvent = src;
5720		this.type = src.type;
5721
5722		// Events bubbling up the document may have been marked as prevented
5723		// by a handler lower down the tree; reflect the correct value.
5724		this.isDefaultPrevented = src.defaultPrevented ||
5725				src.defaultPrevented === undefined &&
5726
5727				// Support: Android <=2.3 only
5728				src.returnValue === false ?
5729			returnTrue :
5730			returnFalse;
5731
5732		// Create target properties
5733		// Support: Safari <=6 - 7 only
5734		// Target should not be a text node (#504, #13143)
5735		this.target = ( src.target && src.target.nodeType === 3 ) ?
5736			src.target.parentNode :
5737			src.target;
5738
5739		this.currentTarget = src.currentTarget;
5740		this.relatedTarget = src.relatedTarget;
5741
5742	// Event type
5743	} else {
5744		this.type = src;
5745	}
5746
5747	// Put explicitly provided properties onto the event object
5748	if ( props ) {
5749		jQuery.extend( this, props );
5750	}
5751
5752	// Create a timestamp if incoming event doesn't have one
5753	this.timeStamp = src && src.timeStamp || Date.now();
5754
5755	// Mark it as fixed
5756	this[ jQuery.expando ] = true;
5757};
5758
5759// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
5760// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
5761jQuery.Event.prototype = {
5762	constructor: jQuery.Event,
5763	isDefaultPrevented: returnFalse,
5764	isPropagationStopped: returnFalse,
5765	isImmediatePropagationStopped: returnFalse,
5766	isSimulated: false,
5767
5768	preventDefault: function() {
5769		var e = this.originalEvent;
5770
5771		this.isDefaultPrevented = returnTrue;
5772
5773		if ( e && !this.isSimulated ) {
5774			e.preventDefault();
5775		}
5776	},
5777	stopPropagation: function() {
5778		var e = this.originalEvent;
5779
5780		this.isPropagationStopped = returnTrue;
5781
5782		if ( e && !this.isSimulated ) {
5783			e.stopPropagation();
5784		}
5785	},
5786	stopImmediatePropagation: function() {
5787		var e = this.originalEvent;
5788
5789		this.isImmediatePropagationStopped = returnTrue;
5790
5791		if ( e && !this.isSimulated ) {
5792			e.stopImmediatePropagation();
5793		}
5794
5795		this.stopPropagation();
5796	}
5797};
5798
5799// Includes all common event props including KeyEvent and MouseEvent specific props
5800jQuery.each( {
5801	altKey: true,
5802	bubbles: true,
5803	cancelable: true,
5804	changedTouches: true,
5805	ctrlKey: true,
5806	detail: true,
5807	eventPhase: true,
5808	metaKey: true,
5809	pageX: true,
5810	pageY: true,
5811	shiftKey: true,
5812	view: true,
5813	"char": true,
5814	code: true,
5815	charCode: true,
5816	key: true,
5817	keyCode: true,
5818	button: true,
5819	buttons: true,
5820	clientX: true,
5821	clientY: true,
5822	offsetX: true,
5823	offsetY: true,
5824	pointerId: true,
5825	pointerType: true,
5826	screenX: true,
5827	screenY: true,
5828	targetTouches: true,
5829	toElement: true,
5830	touches: true,
5831	which: true
5832}, jQuery.event.addProp );
5833
5834jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) {
5835	jQuery.event.special[ type ] = {
5836
5837		// Utilize native event if possible so blur/focus sequence is correct
5838		setup: function() {
5839
5840			// Claim the first handler
5841			// dataPriv.set( this, "focus", ... )
5842			// dataPriv.set( this, "blur", ... )
5843			leverageNative( this, type, expectSync );
5844
5845			// Return false to allow normal processing in the caller
5846			return false;
5847		},
5848		trigger: function() {
5849
5850			// Force setup before trigger
5851			leverageNative( this, type );
5852
5853			// Return non-false to allow normal event-path propagation
5854			return true;
5855		},
5856
5857		// Suppress native focus or blur as it's already being fired
5858		// in leverageNative.
5859		_default: function() {
5860			return true;
5861		},
5862
5863		delegateType: delegateType
5864	};
5865} );
5866
5867// Create mouseenter/leave events using mouseover/out and event-time checks
5868// so that event delegation works in jQuery.
5869// Do the same for pointerenter/pointerleave and pointerover/pointerout
5870//
5871// Support: Safari 7 only
5872// Safari sends mouseenter too often; see:
5873// https://bugs.chromium.org/p/chromium/issues/detail?id=470258
5874// for the description of the bug (it existed in older Chrome versions as well).
5875jQuery.each( {
5876	mouseenter: "mouseover",
5877	mouseleave: "mouseout",
5878	pointerenter: "pointerover",
5879	pointerleave: "pointerout"
5880}, function( orig, fix ) {
5881	jQuery.event.special[ orig ] = {
5882		delegateType: fix,
5883		bindType: fix,
5884
5885		handle: function( event ) {
5886			var ret,
5887				target = this,
5888				related = event.relatedTarget,
5889				handleObj = event.handleObj;
5890
5891			// For mouseenter/leave call the handler if related is outside the target.
5892			// NB: No relatedTarget if the mouse left/entered the browser window
5893			if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {
5894				event.type = handleObj.origType;
5895				ret = handleObj.handler.apply( this, arguments );
5896				event.type = fix;
5897			}
5898			return ret;
5899		}
5900	};
5901} );
5902
5903jQuery.fn.extend( {
5904
5905	on: function( types, selector, data, fn ) {
5906		return on( this, types, selector, data, fn );
5907	},
5908	one: function( types, selector, data, fn ) {
5909		return on( this, types, selector, data, fn, 1 );
5910	},
5911	off: function( types, selector, fn ) {
5912		var handleObj, type;
5913		if ( types && types.preventDefault && types.handleObj ) {
5914
5915			// ( event )  dispatched jQuery.Event
5916			handleObj = types.handleObj;
5917			jQuery( types.delegateTarget ).off(
5918				handleObj.namespace ?
5919					handleObj.origType + "." + handleObj.namespace :
5920					handleObj.origType,
5921				handleObj.selector,
5922				handleObj.handler
5923			);
5924			return this;
5925		}
5926		if ( typeof types === "object" ) {
5927
5928			// ( types-object [, selector] )
5929			for ( type in types ) {
5930				this.off( type, selector, types[ type ] );
5931			}
5932			return this;
5933		}
5934		if ( selector === false || typeof selector === "function" ) {
5935
5936			// ( types [, fn] )
5937			fn = selector;
5938			selector = undefined;
5939		}
5940		if ( fn === false ) {
5941			fn = returnFalse;
5942		}
5943		return this.each( function() {
5944			jQuery.event.remove( this, types, fn, selector );
5945		} );
5946	}
5947} );
5948
5949
5950var
5951
5952	// Support: IE <=10 - 11, Edge 12 - 13 only
5953	// In IE/Edge using regex groups here causes severe slowdowns.
5954	// See https://connect.microsoft.com/IE/feedback/details/1736512/
5955	rnoInnerhtml = /<script|<style|<link/i,
5956
5957	// checked="checked" or checked
5958	rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
5959	rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
5960
5961// Prefer a tbody over its parent table for containing new rows
5962function manipulationTarget( elem, content ) {
5963	if ( nodeName( elem, "table" ) &&
5964		nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {
5965
5966		return jQuery( elem ).children( "tbody" )[ 0 ] || elem;
5967	}
5968
5969	return elem;
5970}
5971
5972// Replace/restore the type attribute of script elements for safe DOM manipulation
5973function disableScript( elem ) {
5974	elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;
5975	return elem;
5976}
5977function restoreScript( elem ) {
5978	if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) {
5979		elem.type = elem.type.slice( 5 );
5980	} else {
5981		elem.removeAttribute( "type" );
5982	}
5983
5984	return elem;
5985}
5986
5987function cloneCopyEvent( src, dest ) {
5988	var i, l, type, pdataOld, udataOld, udataCur, events;
5989
5990	if ( dest.nodeType !== 1 ) {
5991		return;
5992	}
5993
5994	// 1. Copy private data: events, handlers, etc.
5995	if ( dataPriv.hasData( src ) ) {
5996		pdataOld = dataPriv.get( src );
5997		events = pdataOld.events;
5998
5999		if ( events ) {
6000			dataPriv.remove( dest, "handle events" );
6001
6002			for ( type in events ) {
6003				for ( i = 0, l = events[ type ].length; i < l; i++ ) {
6004					jQuery.event.add( dest, type, events[ type ][ i ] );
6005				}
6006			}
6007		}
6008	}
6009
6010	// 2. Copy user data
6011	if ( dataUser.hasData( src ) ) {
6012		udataOld = dataUser.access( src );
6013		udataCur = jQuery.extend( {}, udataOld );
6014
6015		dataUser.set( dest, udataCur );
6016	}
6017}
6018
6019// Fix IE bugs, see support tests
6020function fixInput( src, dest ) {
6021	var nodeName = dest.nodeName.toLowerCase();
6022
6023	// Fails to persist the checked state of a cloned checkbox or radio button.
6024	if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
6025		dest.checked = src.checked;
6026
6027	// Fails to return the selected option to the default selected state when cloning options
6028	} else if ( nodeName === "input" || nodeName === "textarea" ) {
6029		dest.defaultValue = src.defaultValue;
6030	}
6031}
6032
6033function domManip( collection, args, callback, ignored ) {
6034
6035	// Flatten any nested arrays
6036	args = flat( args );
6037
6038	var fragment, first, scripts, hasScripts, node, doc,
6039		i = 0,
6040		l = collection.length,
6041		iNoClone = l - 1,
6042		value = args[ 0 ],
6043		valueIsFunction = isFunction( value );
6044
6045	// We can't cloneNode fragments that contain checked, in WebKit
6046	if ( valueIsFunction ||
6047			( l > 1 && typeof value === "string" &&
6048				!support.checkClone && rchecked.test( value ) ) ) {
6049		return collection.each( function( index ) {
6050			var self = collection.eq( index );
6051			if ( valueIsFunction ) {
6052				args[ 0 ] = value.call( this, index, self.html() );
6053			}
6054			domManip( self, args, callback, ignored );
6055		} );
6056	}
6057
6058	if ( l ) {
6059		fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );
6060		first = fragment.firstChild;
6061
6062		if ( fragment.childNodes.length === 1 ) {
6063			fragment = first;
6064		}
6065
6066		// Require either new content or an interest in ignored elements to invoke the callback
6067		if ( first || ignored ) {
6068			scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
6069			hasScripts = scripts.length;
6070
6071			// Use the original fragment for the last item
6072			// instead of the first because it can end up
6073			// being emptied incorrectly in certain situations (#8070).
6074			for ( ; i < l; i++ ) {
6075				node = fragment;
6076
6077				if ( i !== iNoClone ) {
6078					node = jQuery.clone( node, true, true );
6079
6080					// Keep references to cloned scripts for later restoration
6081					if ( hasScripts ) {
6082
6083						// Support: Android <=4.0 only, PhantomJS 1 only
6084						// push.apply(_, arraylike) throws on ancient WebKit
6085						jQuery.merge( scripts, getAll( node, "script" ) );
6086					}
6087				}
6088
6089				callback.call( collection[ i ], node, i );
6090			}
6091
6092			if ( hasScripts ) {
6093				doc = scripts[ scripts.length - 1 ].ownerDocument;
6094
6095				// Reenable scripts
6096				jQuery.map( scripts, restoreScript );
6097
6098				// Evaluate executable scripts on first document insertion
6099				for ( i = 0; i < hasScripts; i++ ) {
6100					node = scripts[ i ];
6101					if ( rscriptType.test( node.type || "" ) &&
6102						!dataPriv.access( node, "globalEval" ) &&
6103						jQuery.contains( doc, node ) ) {
6104
6105						if ( node.src && ( node.type || "" ).toLowerCase()  !== "module" ) {
6106
6107							// Optional AJAX dependency, but won't run scripts if not present
6108							if ( jQuery._evalUrl && !node.noModule ) {
6109								jQuery._evalUrl( node.src, {
6110									nonce: node.nonce || node.getAttribute( "nonce" )
6111								}, doc );
6112							}
6113						} else {
6114							DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc );
6115						}
6116					}
6117				}
6118			}
6119		}
6120	}
6121
6122	return collection;
6123}
6124
6125function remove( elem, selector, keepData ) {
6126	var node,
6127		nodes = selector ? jQuery.filter( selector, elem ) : elem,
6128		i = 0;
6129
6130	for ( ; ( node = nodes[ i ] ) != null; i++ ) {
6131		if ( !keepData && node.nodeType === 1 ) {
6132			jQuery.cleanData( getAll( node ) );
6133		}
6134
6135		if ( node.parentNode ) {
6136			if ( keepData && isAttached( node ) ) {
6137				setGlobalEval( getAll( node, "script" ) );
6138			}
6139			node.parentNode.removeChild( node );
6140		}
6141	}
6142
6143	return elem;
6144}
6145
6146jQuery.extend( {
6147	htmlPrefilter: function( html ) {
6148		return html;
6149	},
6150
6151	clone: function( elem, dataAndEvents, deepDataAndEvents ) {
6152		var i, l, srcElements, destElements,
6153			clone = elem.cloneNode( true ),
6154			inPage = isAttached( elem );
6155
6156		// Fix IE cloning issues
6157		if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
6158				!jQuery.isXMLDoc( elem ) ) {
6159
6160			// We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2
6161			destElements = getAll( clone );
6162			srcElements = getAll( elem );
6163
6164			for ( i = 0, l = srcElements.length; i < l; i++ ) {
6165				fixInput( srcElements[ i ], destElements[ i ] );
6166			}
6167		}
6168
6169		// Copy the events from the original to the clone
6170		if ( dataAndEvents ) {
6171			if ( deepDataAndEvents ) {
6172				srcElements = srcElements || getAll( elem );
6173				destElements = destElements || getAll( clone );
6174
6175				for ( i = 0, l = srcElements.length; i < l; i++ ) {
6176					cloneCopyEvent( srcElements[ i ], destElements[ i ] );
6177				}
6178			} else {
6179				cloneCopyEvent( elem, clone );
6180			}
6181		}
6182
6183		// Preserve script evaluation history
6184		destElements = getAll( clone, "script" );
6185		if ( destElements.length > 0 ) {
6186			setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
6187		}
6188
6189		// Return the cloned set
6190		return clone;
6191	},
6192
6193	cleanData: function( elems ) {
6194		var data, elem, type,
6195			special = jQuery.event.special,
6196			i = 0;
6197
6198		for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {
6199			if ( acceptData( elem ) ) {
6200				if ( ( data = elem[ dataPriv.expando ] ) ) {
6201					if ( data.events ) {
6202						for ( type in data.events ) {
6203							if ( special[ type ] ) {
6204								jQuery.event.remove( elem, type );
6205
6206							// This is a shortcut to avoid jQuery.event.remove's overhead
6207							} else {
6208								jQuery.removeEvent( elem, type, data.handle );
6209							}
6210						}
6211					}
6212
6213					// Support: Chrome <=35 - 45+
6214					// Assign undefined instead of using delete, see Data#remove
6215					elem[ dataPriv.expando ] = undefined;
6216				}
6217				if ( elem[ dataUser.expando ] ) {
6218
6219					// Support: Chrome <=35 - 45+
6220					// Assign undefined instead of using delete, see Data#remove
6221					elem[ dataUser.expando ] = undefined;
6222				}
6223			}
6224		}
6225	}
6226} );
6227
6228jQuery.fn.extend( {
6229	detach: function( selector ) {
6230		return remove( this, selector, true );
6231	},
6232
6233	remove: function( selector ) {
6234		return remove( this, selector );
6235	},
6236
6237	text: function( value ) {
6238		return access( this, function( value ) {
6239			return value === undefined ?
6240				jQuery.text( this ) :
6241				this.empty().each( function() {
6242					if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
6243						this.textContent = value;
6244					}
6245				} );
6246		}, null, value, arguments.length );
6247	},
6248
6249	append: function() {
6250		return domManip( this, arguments, function( elem ) {
6251			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
6252				var target = manipulationTarget( this, elem );
6253				target.appendChild( elem );
6254			}
6255		} );
6256	},
6257
6258	prepend: function() {
6259		return domManip( this, arguments, function( elem ) {
6260			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
6261				var target = manipulationTarget( this, elem );
6262				target.insertBefore( elem, target.firstChild );
6263			}
6264		} );
6265	},
6266
6267	before: function() {
6268		return domManip( this, arguments, function( elem ) {
6269			if ( this.parentNode ) {
6270				this.parentNode.insertBefore( elem, this );
6271			}
6272		} );
6273	},
6274
6275	after: function() {
6276		return domManip( this, arguments, function( elem ) {
6277			if ( this.parentNode ) {
6278				this.parentNode.insertBefore( elem, this.nextSibling );
6279			}
6280		} );
6281	},
6282
6283	empty: function() {
6284		var elem,
6285			i = 0;
6286
6287		for ( ; ( elem = this[ i ] ) != null; i++ ) {
6288			if ( elem.nodeType === 1 ) {
6289
6290				// Prevent memory leaks
6291				jQuery.cleanData( getAll( elem, false ) );
6292
6293				// Remove any remaining nodes
6294				elem.textContent = "";
6295			}
6296		}
6297
6298		return this;
6299	},
6300
6301	clone: function( dataAndEvents, deepDataAndEvents ) {
6302		dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
6303		deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
6304
6305		return this.map( function() {
6306			return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
6307		} );
6308	},
6309
6310	html: function( value ) {
6311		return access( this, function( value ) {
6312			var elem = this[ 0 ] || {},
6313				i = 0,
6314				l = this.length;
6315
6316			if ( value === undefined && elem.nodeType === 1 ) {
6317				return elem.innerHTML;
6318			}
6319
6320			// See if we can take a shortcut and just use innerHTML
6321			if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
6322				!wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {
6323
6324				value = jQuery.htmlPrefilter( value );
6325
6326				try {
6327					for ( ; i < l; i++ ) {
6328						elem = this[ i ] || {};
6329
6330						// Remove element nodes and prevent memory leaks
6331						if ( elem.nodeType === 1 ) {
6332							jQuery.cleanData( getAll( elem, false ) );
6333							elem.innerHTML = value;
6334						}
6335					}
6336
6337					elem = 0;
6338
6339				// If using innerHTML throws an exception, use the fallback method
6340				} catch ( e ) {}
6341			}
6342
6343			if ( elem ) {
6344				this.empty().append( value );
6345			}
6346		}, null, value, arguments.length );
6347	},
6348
6349	replaceWith: function() {
6350		var ignored = [];
6351
6352		// Make the changes, replacing each non-ignored context element with the new content
6353		return domManip( this, arguments, function( elem ) {
6354			var parent = this.parentNode;
6355
6356			if ( jQuery.inArray( this, ignored ) < 0 ) {
6357				jQuery.cleanData( getAll( this ) );
6358				if ( parent ) {
6359					parent.replaceChild( elem, this );
6360				}
6361			}
6362
6363		// Force callback invocation
6364		}, ignored );
6365	}
6366} );
6367
6368jQuery.each( {
6369	appendTo: "append",
6370	prependTo: "prepend",
6371	insertBefore: "before",
6372	insertAfter: "after",
6373	replaceAll: "replaceWith"
6374}, function( name, original ) {
6375	jQuery.fn[ name ] = function( selector ) {
6376		var elems,
6377			ret = [],
6378			insert = jQuery( selector ),
6379			last = insert.length - 1,
6380			i = 0;
6381
6382		for ( ; i <= last; i++ ) {
6383			elems = i === last ? this : this.clone( true );
6384			jQuery( insert[ i ] )[ original ]( elems );
6385
6386			// Support: Android <=4.0 only, PhantomJS 1 only
6387			// .get() because push.apply(_, arraylike) throws on ancient WebKit
6388			push.apply( ret, elems.get() );
6389		}
6390
6391		return this.pushStack( ret );
6392	};
6393} );
6394var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
6395
6396var getStyles = function( elem ) {
6397
6398		// Support: IE <=11 only, Firefox <=30 (#15098, #14150)
6399		// IE throws on elements created in popups
6400		// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
6401		var view = elem.ownerDocument.defaultView;
6402
6403		if ( !view || !view.opener ) {
6404			view = window;
6405		}
6406
6407		return view.getComputedStyle( elem );
6408	};
6409
6410var swap = function( elem, options, callback ) {
6411	var ret, name,
6412		old = {};
6413
6414	// Remember the old values, and insert the new ones
6415	for ( name in options ) {
6416		old[ name ] = elem.style[ name ];
6417		elem.style[ name ] = options[ name ];
6418	}
6419
6420	ret = callback.call( elem );
6421
6422	// Revert the old values
6423	for ( name in options ) {
6424		elem.style[ name ] = old[ name ];
6425	}
6426
6427	return ret;
6428};
6429
6430
6431var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );
6432
6433
6434
6435( function() {
6436
6437	// Executing both pixelPosition & boxSizingReliable tests require only one layout
6438	// so they're executed at the same time to save the second computation.
6439	function computeStyleTests() {
6440
6441		// This is a singleton, we need to execute it only once
6442		if ( !div ) {
6443			return;
6444		}
6445
6446		container.style.cssText = "position:absolute;left:-11111px;width:60px;" +
6447			"margin-top:1px;padding:0;border:0";
6448		div.style.cssText =
6449			"position:relative;display:block;box-sizing:border-box;overflow:scroll;" +
6450			"margin:auto;border:1px;padding:1px;" +
6451			"width:60%;top:1%";
6452		documentElement.appendChild( container ).appendChild( div );
6453
6454		var divStyle = window.getComputedStyle( div );
6455		pixelPositionVal = divStyle.top !== "1%";
6456
6457		// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44
6458		reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;
6459
6460		// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3
6461		// Some styles come back with percentage values, even though they shouldn't
6462		div.style.right = "60%";
6463		pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;
6464
6465		// Support: IE 9 - 11 only
6466		// Detect misreporting of content dimensions for box-sizing:border-box elements
6467		boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;
6468
6469		// Support: IE 9 only
6470		// Detect overflow:scroll screwiness (gh-3699)
6471		// Support: Chrome <=64
6472		// Don't get tricked when zoom affects offsetWidth (gh-4029)
6473		div.style.position = "absolute";
6474		scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;
6475
6476		documentElement.removeChild( container );
6477
6478		// Nullify the div so it wouldn't be stored in the memory and
6479		// it will also be a sign that checks already performed
6480		div = null;
6481	}
6482
6483	function roundPixelMeasures( measure ) {
6484		return Math.round( parseFloat( measure ) );
6485	}
6486
6487	var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,
6488		reliableTrDimensionsVal, reliableMarginLeftVal,
6489		container = document.createElement( "div" ),
6490		div = document.createElement( "div" );
6491
6492	// Finish early in limited (non-browser) environments
6493	if ( !div.style ) {
6494		return;
6495	}
6496
6497	// Support: IE <=9 - 11 only
6498	// Style of cloned element affects source element cloned (#8908)
6499	div.style.backgroundClip = "content-box";
6500	div.cloneNode( true ).style.backgroundClip = "";
6501	support.clearCloneStyle = div.style.backgroundClip === "content-box";
6502
6503	jQuery.extend( support, {
6504		boxSizingReliable: function() {
6505			computeStyleTests();
6506			return boxSizingReliableVal;
6507		},
6508		pixelBoxStyles: function() {
6509			computeStyleTests();
6510			return pixelBoxStylesVal;
6511		},
6512		pixelPosition: function() {
6513			computeStyleTests();
6514			return pixelPositionVal;
6515		},
6516		reliableMarginLeft: function() {
6517			computeStyleTests();
6518			return reliableMarginLeftVal;
6519		},
6520		scrollboxSize: function() {
6521			computeStyleTests();
6522			return scrollboxSizeVal;
6523		},
6524
6525		// Support: IE 9 - 11+, Edge 15 - 18+
6526		// IE/Edge misreport `getComputedStyle` of table rows with width/height
6527		// set in CSS while `offset*` properties report correct values.
6528		// Behavior in IE 9 is more subtle than in newer versions & it passes
6529		// some versions of this test; make sure not to make it pass there!
6530		//
6531		// Support: Firefox 70+
6532		// Only Firefox includes border widths
6533		// in computed dimensions. (gh-4529)
6534		reliableTrDimensions: function() {
6535			var table, tr, trChild, trStyle;
6536			if ( reliableTrDimensionsVal == null ) {
6537				table = document.createElement( "table" );
6538				tr = document.createElement( "tr" );
6539				trChild = document.createElement( "div" );
6540
6541				table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate";
6542				tr.style.cssText = "border:1px solid";
6543
6544				// Support: Chrome 86+
6545				// Height set through cssText does not get applied.
6546				// Computed height then comes back as 0.
6547				tr.style.height = "1px";
6548				trChild.style.height = "9px";
6549
6550				// Support: Android 8 Chrome 86+
6551				// In our bodyBackground.html iframe,
6552				// display for all div elements is set to "inline",
6553				// which causes a problem only in Android 8 Chrome 86.
6554				// Ensuring the div is display: block
6555				// gets around this issue.
6556				trChild.style.display = "block";
6557
6558				documentElement
6559					.appendChild( table )
6560					.appendChild( tr )
6561					.appendChild( trChild );
6562
6563				trStyle = window.getComputedStyle( tr );
6564				reliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) +
6565					parseInt( trStyle.borderTopWidth, 10 ) +
6566					parseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight;
6567
6568				documentElement.removeChild( table );
6569			}
6570			return reliableTrDimensionsVal;
6571		}
6572	} );
6573} )();
6574
6575
6576function curCSS( elem, name, computed ) {
6577	var width, minWidth, maxWidth, ret,
6578
6579		// Support: Firefox 51+
6580		// Retrieving style before computed somehow
6581		// fixes an issue with getting wrong values
6582		// on detached elements
6583		style = elem.style;
6584
6585	computed = computed || getStyles( elem );
6586
6587	// getPropertyValue is needed for:
6588	//   .css('filter') (IE 9 only, #12537)
6589	//   .css('--customProperty) (#3144)
6590	if ( computed ) {
6591		ret = computed.getPropertyValue( name ) || computed[ name ];
6592
6593		if ( ret === "" && !isAttached( elem ) ) {
6594			ret = jQuery.style( elem, name );
6595		}
6596
6597		// A tribute to the "awesome hack by Dean Edwards"
6598		// Android Browser returns percentage for some values,
6599		// but width seems to be reliably pixels.
6600		// This is against the CSSOM draft spec:
6601		// https://drafts.csswg.org/cssom/#resolved-values
6602		if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {
6603
6604			// Remember the original values
6605			width = style.width;
6606			minWidth = style.minWidth;
6607			maxWidth = style.maxWidth;
6608
6609			// Put in the new values to get a computed value out
6610			style.minWidth = style.maxWidth = style.width = ret;
6611			ret = computed.width;
6612
6613			// Revert the changed values
6614			style.width = width;
6615			style.minWidth = minWidth;
6616			style.maxWidth = maxWidth;
6617		}
6618	}
6619
6620	return ret !== undefined ?
6621
6622		// Support: IE <=9 - 11 only
6623		// IE returns zIndex value as an integer.
6624		ret + "" :
6625		ret;
6626}
6627
6628
6629function addGetHookIf( conditionFn, hookFn ) {
6630
6631	// Define the hook, we'll check on the first run if it's really needed.
6632	return {
6633		get: function() {
6634			if ( conditionFn() ) {
6635
6636				// Hook not needed (or it's not possible to use it due
6637				// to missing dependency), remove it.
6638				delete this.get;
6639				return;
6640			}
6641
6642			// Hook needed; redefine it so that the support test is not executed again.
6643			return ( this.get = hookFn ).apply( this, arguments );
6644		}
6645	};
6646}
6647
6648
6649var cssPrefixes = [ "Webkit", "Moz", "ms" ],
6650	emptyStyle = document.createElement( "div" ).style,
6651	vendorProps = {};
6652
6653// Return a vendor-prefixed property or undefined
6654function vendorPropName( name ) {
6655
6656	// Check for vendor prefixed names
6657	var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
6658		i = cssPrefixes.length;
6659
6660	while ( i-- ) {
6661		name = cssPrefixes[ i ] + capName;
6662		if ( name in emptyStyle ) {
6663			return name;
6664		}
6665	}
6666}
6667
6668// Return a potentially-mapped jQuery.cssProps or vendor prefixed property
6669function finalPropName( name ) {
6670	var final = jQuery.cssProps[ name ] || vendorProps[ name ];
6671
6672	if ( final ) {
6673		return final;
6674	}
6675	if ( name in emptyStyle ) {
6676		return name;
6677	}
6678	return vendorProps[ name ] = vendorPropName( name ) || name;
6679}
6680
6681
6682var
6683
6684	// Swappable if display is none or starts with table
6685	// except "table", "table-cell", or "table-caption"
6686	// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
6687	rdisplayswap = /^(none|table(?!-c[ea]).+)/,
6688	rcustomProp = /^--/,
6689	cssShow = { position: "absolute", visibility: "hidden", display: "block" },
6690	cssNormalTransform = {
6691		letterSpacing: "0",
6692		fontWeight: "400"
6693	};
6694
6695function setPositiveNumber( _elem, value, subtract ) {
6696
6697	// Any relative (+/-) values have already been
6698	// normalized at this point
6699	var matches = rcssNum.exec( value );
6700	return matches ?
6701
6702		// Guard against undefined "subtract", e.g., when used as in cssHooks
6703		Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
6704		value;
6705}
6706
6707function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
6708	var i = dimension === "width" ? 1 : 0,
6709		extra = 0,
6710		delta = 0;
6711
6712	// Adjustment may not be necessary
6713	if ( box === ( isBorderBox ? "border" : "content" ) ) {
6714		return 0;
6715	}
6716
6717	for ( ; i < 4; i += 2 ) {
6718
6719		// Both box models exclude margin
6720		if ( box === "margin" ) {
6721			delta += jQuery.css( elem, box + cssExpand[ i ], true, styles );
6722		}
6723
6724		// If we get here with a content-box, we're seeking "padding" or "border" or "margin"
6725		if ( !isBorderBox ) {
6726
6727			// Add padding
6728			delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
6729
6730			// For "border" or "margin", add border
6731			if ( box !== "padding" ) {
6732				delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
6733
6734			// But still keep track of it otherwise
6735			} else {
6736				extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
6737			}
6738
6739		// If we get here with a border-box (content + padding + border), we're seeking "content" or
6740		// "padding" or "margin"
6741		} else {
6742
6743			// For "content", subtract padding
6744			if ( box === "content" ) {
6745				delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
6746			}
6747
6748			// For "content" or "padding", subtract border
6749			if ( box !== "margin" ) {
6750				delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
6751			}
6752		}
6753	}
6754
6755	// Account for positive content-box scroll gutter when requested by providing computedVal
6756	if ( !isBorderBox && computedVal >= 0 ) {
6757
6758		// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border
6759		// Assuming integer scroll gutter, subtract the rest and round down
6760		delta += Math.max( 0, Math.ceil(
6761			elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
6762			computedVal -
6763			delta -
6764			extra -
6765			0.5
6766
6767		// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter
6768		// Use an explicit zero to avoid NaN (gh-3964)
6769		) ) || 0;
6770	}
6771
6772	return delta;
6773}
6774
6775function getWidthOrHeight( elem, dimension, extra ) {
6776
6777	// Start with computed style
6778	var styles = getStyles( elem ),
6779
6780		// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).
6781		// Fake content-box until we know it's needed to know the true value.
6782		boxSizingNeeded = !support.boxSizingReliable() || extra,
6783		isBorderBox = boxSizingNeeded &&
6784			jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
6785		valueIsBorderBox = isBorderBox,
6786
6787		val = curCSS( elem, dimension, styles ),
6788		offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );
6789
6790	// Support: Firefox <=54
6791	// Return a confounding non-pixel value or feign ignorance, as appropriate.
6792	if ( rnumnonpx.test( val ) ) {
6793		if ( !extra ) {
6794			return val;
6795		}
6796		val = "auto";
6797	}
6798
6799
6800	// Support: IE 9 - 11 only
6801	// Use offsetWidth/offsetHeight for when box sizing is unreliable.
6802	// In those cases, the computed value can be trusted to be border-box.
6803	if ( ( !support.boxSizingReliable() && isBorderBox ||
6804
6805		// Support: IE 10 - 11+, Edge 15 - 18+
6806		// IE/Edge misreport `getComputedStyle` of table rows with width/height
6807		// set in CSS while `offset*` properties report correct values.
6808		// Interestingly, in some cases IE 9 doesn't suffer from this issue.
6809		!support.reliableTrDimensions() && nodeName( elem, "tr" ) ||
6810
6811		// Fall back to offsetWidth/offsetHeight when value is "auto"
6812		// This happens for inline elements with no explicit setting (gh-3571)
6813		val === "auto" ||
6814
6815		// Support: Android <=4.1 - 4.3 only
6816		// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)
6817		!parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) &&
6818
6819		// Make sure the element is visible & connected
6820		elem.getClientRects().length ) {
6821
6822		isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
6823
6824		// Where available, offsetWidth/offsetHeight approximate border box dimensions.
6825		// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the
6826		// retrieved value as a content box dimension.
6827		valueIsBorderBox = offsetProp in elem;
6828		if ( valueIsBorderBox ) {
6829			val = elem[ offsetProp ];
6830		}
6831	}
6832
6833	// Normalize "" and auto
6834	val = parseFloat( val ) || 0;
6835
6836	// Adjust for the element's box model
6837	return ( val +
6838		boxModelAdjustment(
6839			elem,
6840			dimension,
6841			extra || ( isBorderBox ? "border" : "content" ),
6842			valueIsBorderBox,
6843			styles,
6844
6845			// Provide the current computed size to request scroll gutter calculation (gh-3589)
6846			val
6847		)
6848	) + "px";
6849}
6850
6851jQuery.extend( {
6852
6853	// Add in style property hooks for overriding the default
6854	// behavior of getting and setting a style property
6855	cssHooks: {
6856		opacity: {
6857			get: function( elem, computed ) {
6858				if ( computed ) {
6859
6860					// We should always get a number back from opacity
6861					var ret = curCSS( elem, "opacity" );
6862					return ret === "" ? "1" : ret;
6863				}
6864			}
6865		}
6866	},
6867
6868	// Don't automatically add "px" to these possibly-unitless properties
6869	cssNumber: {
6870		"animationIterationCount": true,
6871		"columnCount": true,
6872		"fillOpacity": true,
6873		"flexGrow": true,
6874		"flexShrink": true,
6875		"fontWeight": true,
6876		"gridArea": true,
6877		"gridColumn": true,
6878		"gridColumnEnd": true,
6879		"gridColumnStart": true,
6880		"gridRow": true,
6881		"gridRowEnd": true,
6882		"gridRowStart": true,
6883		"lineHeight": true,
6884		"opacity": true,
6885		"order": true,
6886		"orphans": true,
6887		"widows": true,
6888		"zIndex": true,
6889		"zoom": true
6890	},
6891
6892	// Add in properties whose names you wish to fix before
6893	// setting or getting the value
6894	cssProps: {},
6895
6896	// Get and set the style property on a DOM Node
6897	style: function( elem, name, value, extra ) {
6898
6899		// Don't set styles on text and comment nodes
6900		if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
6901			return;
6902		}
6903
6904		// Make sure that we're working with the right name
6905		var ret, type, hooks,
6906			origName = camelCase( name ),
6907			isCustomProp = rcustomProp.test( name ),
6908			style = elem.style;
6909
6910		// Make sure that we're working with the right name. We don't
6911		// want to query the value if it is a CSS custom property
6912		// since they are user-defined.
6913		if ( !isCustomProp ) {
6914			name = finalPropName( origName );
6915		}
6916
6917		// Gets hook for the prefixed version, then unprefixed version
6918		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
6919
6920		// Check if we're setting a value
6921		if ( value !== undefined ) {
6922			type = typeof value;
6923
6924			// Convert "+=" or "-=" to relative numbers (#7345)
6925			if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
6926				value = adjustCSS( elem, name, ret );
6927
6928				// Fixes bug #9237
6929				type = "number";
6930			}
6931
6932			// Make sure that null and NaN values aren't set (#7116)
6933			if ( value == null || value !== value ) {
6934				return;
6935			}
6936
6937			// If a number was passed in, add the unit (except for certain CSS properties)
6938			// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append
6939			// "px" to a few hardcoded values.
6940			if ( type === "number" && !isCustomProp ) {
6941				value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );
6942			}
6943
6944			// background-* props affect original clone's values
6945			if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
6946				style[ name ] = "inherit";
6947			}
6948
6949			// If a hook was provided, use that value, otherwise just set the specified value
vendor: 25,692 bytes, lines 6950-7946
6950			if ( !hooks || !( "set" in hooks ) ||
6951				( value = hooks.set( elem, value, extra ) ) !== undefined ) {
6952
6953				if ( isCustomProp ) {
6954					style.setProperty( name, value );
6955				} else {
6956					style[ name ] = value;
6957				}
6958			}
6959
6960		} else {
6961
6962			// If a hook was provided get the non-computed value from there
6963			if ( hooks && "get" in hooks &&
6964				( ret = hooks.get( elem, false, extra ) ) !== undefined ) {
6965
6966				return ret;
6967			}
6968
6969			// Otherwise just get the value from the style object
6970			return style[ name ];
6971		}
6972	},
6973
6974	css: function( elem, name, extra, styles ) {
6975		var val, num, hooks,
6976			origName = camelCase( name ),
6977			isCustomProp = rcustomProp.test( name );
6978
6979		// Make sure that we're working with the right name. We don't
6980		// want to modify the value if it is a CSS custom property
6981		// since they are user-defined.
6982		if ( !isCustomProp ) {
6983			name = finalPropName( origName );
6984		}
6985
6986		// Try prefixed name followed by the unprefixed name
6987		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
6988
6989		// If a hook was provided get the computed value from there
6990		if ( hooks && "get" in hooks ) {
6991			val = hooks.get( elem, true, extra );
6992		}
6993
6994		// Otherwise, if a way to get the computed value exists, use that
6995		if ( val === undefined ) {
6996			val = curCSS( elem, name, styles );
6997		}
6998
6999		// Convert "normal" to computed value
7000		if ( val === "normal" && name in cssNormalTransform ) {
7001			val = cssNormalTransform[ name ];
7002		}
7003
7004		// Make numeric if forced or a qualifier was provided and val looks numeric
7005		if ( extra === "" || extra ) {
7006			num = parseFloat( val );
7007			return extra === true || isFinite( num ) ? num || 0 : val;
7008		}
7009
7010		return val;
7011	}
7012} );
7013
7014jQuery.each( [ "height", "width" ], function( _i, dimension ) {
7015	jQuery.cssHooks[ dimension ] = {
7016		get: function( elem, computed, extra ) {
7017			if ( computed ) {
7018
7019				// Certain elements can have dimension info if we invisibly show them
7020				// but it must have a current display style that would benefit
7021				return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&
7022
7023					// Support: Safari 8+
7024					// Table columns in Safari have non-zero offsetWidth & zero
7025					// getBoundingClientRect().width unless display is changed.
7026					// Support: IE <=11 only
7027					// Running getBoundingClientRect on a disconnected node
7028					// in IE throws an error.
7029					( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?
7030					swap( elem, cssShow, function() {
7031						return getWidthOrHeight( elem, dimension, extra );
7032					} ) :
7033					getWidthOrHeight( elem, dimension, extra );
7034			}
7035		},
7036
7037		set: function( elem, value, extra ) {
7038			var matches,
7039				styles = getStyles( elem ),
7040
7041				// Only read styles.position if the test has a chance to fail
7042				// to avoid forcing a reflow.
7043				scrollboxSizeBuggy = !support.scrollboxSize() &&
7044					styles.position === "absolute",
7045
7046				// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)
7047				boxSizingNeeded = scrollboxSizeBuggy || extra,
7048				isBorderBox = boxSizingNeeded &&
7049					jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
7050				subtract = extra ?
7051					boxModelAdjustment(
7052						elem,
7053						dimension,
7054						extra,
7055						isBorderBox,
7056						styles
7057					) :
7058					0;
7059
7060			// Account for unreliable border-box dimensions by comparing offset* to computed and
7061			// faking a content-box to get border and padding (gh-3699)
7062			if ( isBorderBox && scrollboxSizeBuggy ) {
7063				subtract -= Math.ceil(
7064					elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
7065					parseFloat( styles[ dimension ] ) -
7066					boxModelAdjustment( elem, dimension, "border", false, styles ) -
7067					0.5
7068				);
7069			}
7070
7071			// Convert to pixels if value adjustment is needed
7072			if ( subtract && ( matches = rcssNum.exec( value ) ) &&
7073				( matches[ 3 ] || "px" ) !== "px" ) {
7074
7075				elem.style[ dimension ] = value;
7076				value = jQuery.css( elem, dimension );
7077			}
7078
7079			return setPositiveNumber( elem, value, subtract );
7080		}
7081	};
7082} );
7083
7084jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
7085	function( elem, computed ) {
7086		if ( computed ) {
7087			return ( parseFloat( curCSS( elem, "marginLeft" ) ) ||
7088				elem.getBoundingClientRect().left -
7089					swap( elem, { marginLeft: 0 }, function() {
7090						return elem.getBoundingClientRect().left;
7091					} )
7092			) + "px";
7093		}
7094	}
7095);
7096
7097// These hooks are used by animate to expand properties
7098jQuery.each( {
7099	margin: "",
7100	padding: "",
7101	border: "Width"
7102}, function( prefix, suffix ) {
7103	jQuery.cssHooks[ prefix + suffix ] = {
7104		expand: function( value ) {
7105			var i = 0,
7106				expanded = {},
7107
7108				// Assumes a single number if not a string
7109				parts = typeof value === "string" ? value.split( " " ) : [ value ];
7110
7111			for ( ; i < 4; i++ ) {
7112				expanded[ prefix + cssExpand[ i ] + suffix ] =
7113					parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
7114			}
7115
7116			return expanded;
7117		}
7118	};
7119
7120	if ( prefix !== "margin" ) {
7121		jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
7122	}
7123} );
7124
7125jQuery.fn.extend( {
7126	css: function( name, value ) {
7127		return access( this, function( elem, name, value ) {
7128			var styles, len,
7129				map = {},
7130				i = 0;
7131
7132			if ( Array.isArray( name ) ) {
7133				styles = getStyles( elem );
7134				len = name.length;
7135
7136				for ( ; i < len; i++ ) {
7137					map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
7138				}
7139
7140				return map;
7141			}
7142
7143			return value !== undefined ?
7144				jQuery.style( elem, name, value ) :
7145				jQuery.css( elem, name );
7146		}, name, value, arguments.length > 1 );
7147	}
7148} );
7149
7150
7151function Tween( elem, options, prop, end, easing ) {
7152	return new Tween.prototype.init( elem, options, prop, end, easing );
7153}
7154jQuery.Tween = Tween;
7155
7156Tween.prototype = {
7157	constructor: Tween,
7158	init: function( elem, options, prop, end, easing, unit ) {
7159		this.elem = elem;
7160		this.prop = prop;
7161		this.easing = easing || jQuery.easing._default;
7162		this.options = options;
7163		this.start = this.now = this.cur();
7164		this.end = end;
7165		this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
7166	},
7167	cur: function() {
7168		var hooks = Tween.propHooks[ this.prop ];
7169
7170		return hooks && hooks.get ?
7171			hooks.get( this ) :
7172			Tween.propHooks._default.get( this );
7173	},
7174	run: function( percent ) {
7175		var eased,
7176			hooks = Tween.propHooks[ this.prop ];
7177
7178		if ( this.options.duration ) {
7179			this.pos = eased = jQuery.easing[ this.easing ](
7180				percent, this.options.duration * percent, 0, 1, this.options.duration
7181			);
7182		} else {
7183			this.pos = eased = percent;
7184		}
7185		this.now = ( this.end - this.start ) * eased + this.start;
7186
7187		if ( this.options.step ) {
7188			this.options.step.call( this.elem, this.now, this );
7189		}
7190
7191		if ( hooks && hooks.set ) {
7192			hooks.set( this );
7193		} else {
7194			Tween.propHooks._default.set( this );
7195		}
7196		return this;
7197	}
7198};
7199
7200Tween.prototype.init.prototype = Tween.prototype;
7201
7202Tween.propHooks = {
7203	_default: {
7204		get: function( tween ) {
7205			var result;
7206
7207			// Use a property on the element directly when it is not a DOM element,
7208			// or when there is no matching style property that exists.
7209			if ( tween.elem.nodeType !== 1 ||
7210				tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {
7211				return tween.elem[ tween.prop ];
7212			}
7213
7214			// Passing an empty string as a 3rd parameter to .css will automatically
7215			// attempt a parseFloat and fallback to a string if the parse fails.
7216			// Simple values such as "10px" are parsed to Float;
7217			// complex values such as "rotate(1rad)" are returned as-is.
7218			result = jQuery.css( tween.elem, tween.prop, "" );
7219
7220			// Empty strings, null, undefined and "auto" are converted to 0.
7221			return !result || result === "auto" ? 0 : result;
7222		},
7223		set: function( tween ) {
7224
7225			// Use step hook for back compat.
7226			// Use cssHook if its there.
7227			// Use .style if available and use plain properties where available.
7228			if ( jQuery.fx.step[ tween.prop ] ) {
7229				jQuery.fx.step[ tween.prop ]( tween );
7230			} else if ( tween.elem.nodeType === 1 && (
7231				jQuery.cssHooks[ tween.prop ] ||
7232					tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {
7233				jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
7234			} else {
7235				tween.elem[ tween.prop ] = tween.now;
7236			}
7237		}
7238	}
7239};
7240
7241// Support: IE <=9 only
7242// Panic based approach to setting things on disconnected nodes
7243Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
7244	set: function( tween ) {
7245		if ( tween.elem.nodeType && tween.elem.parentNode ) {
7246			tween.elem[ tween.prop ] = tween.now;
7247		}
7248	}
7249};
7250
7251jQuery.easing = {
7252	linear: function( p ) {
7253		return p;
7254	},
7255	swing: function( p ) {
7256		return 0.5 - Math.cos( p * Math.PI ) / 2;
7257	},
7258	_default: "swing"
7259};
7260
7261jQuery.fx = Tween.prototype.init;
7262
7263// Back compat <1.8 extension point
7264jQuery.fx.step = {};
7265
7266
7267
7268
7269var
7270	fxNow, inProgress,
7271	rfxtypes = /^(?:toggle|show|hide)$/,
7272	rrun = /queueHooks$/;
7273
7274function schedule() {
7275	if ( inProgress ) {
7276		if ( document.hidden === false && window.requestAnimationFrame ) {
7277			window.requestAnimationFrame( schedule );
7278		} else {
7279			window.setTimeout( schedule, jQuery.fx.interval );
7280		}
7281
7282		jQuery.fx.tick();
7283	}
7284}
7285
7286// Animations created synchronously will run synchronously
7287function createFxNow() {
7288	window.setTimeout( function() {
7289		fxNow = undefined;
7290	} );
7291	return ( fxNow = Date.now() );
7292}
7293
7294// Generate parameters to create a standard animation
7295function genFx( type, includeWidth ) {
7296	var which,
7297		i = 0,
7298		attrs = { height: type };
7299
7300	// If we include width, step value is 1 to do all cssExpand values,
7301	// otherwise step value is 2 to skip over Left and Right
7302	includeWidth = includeWidth ? 1 : 0;
7303	for ( ; i < 4; i += 2 - includeWidth ) {
7304		which = cssExpand[ i ];
7305		attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
7306	}
7307
7308	if ( includeWidth ) {
7309		attrs.opacity = attrs.width = type;
7310	}
7311
7312	return attrs;
7313}
7314
7315function createTween( value, prop, animation ) {
7316	var tween,
7317		collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ),
7318		index = 0,
7319		length = collection.length;
7320	for ( ; index < length; index++ ) {
7321		if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {
7322
7323			// We're done with this property
7324			return tween;
7325		}
7326	}
7327}
7328
7329function defaultPrefilter( elem, props, opts ) {
7330	var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
7331		isBox = "width" in props || "height" in props,
7332		anim = this,
7333		orig = {},
7334		style = elem.style,
7335		hidden = elem.nodeType && isHiddenWithinTree( elem ),
7336		dataShow = dataPriv.get( elem, "fxshow" );
7337
7338	// Queue-skipping animations hijack the fx hooks
7339	if ( !opts.queue ) {
7340		hooks = jQuery._queueHooks( elem, "fx" );
7341		if ( hooks.unqueued == null ) {
7342			hooks.unqueued = 0;
7343			oldfire = hooks.empty.fire;
7344			hooks.empty.fire = function() {
7345				if ( !hooks.unqueued ) {
7346					oldfire();
7347				}
7348			};
7349		}
7350		hooks.unqueued++;
7351
7352		anim.always( function() {
7353
7354			// Ensure the complete handler is called before this completes
7355			anim.always( function() {
7356				hooks.unqueued--;
7357				if ( !jQuery.queue( elem, "fx" ).length ) {
7358					hooks.empty.fire();
7359				}
7360			} );
7361		} );
7362	}
7363
7364	// Detect show/hide animations
7365	for ( prop in props ) {
7366		value = props[ prop ];
7367		if ( rfxtypes.test( value ) ) {
7368			delete props[ prop ];
7369			toggle = toggle || value === "toggle";
7370			if ( value === ( hidden ? "hide" : "show" ) ) {
7371
7372				// Pretend to be hidden if this is a "show" and
7373				// there is still data from a stopped show/hide
7374				if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
7375					hidden = true;
7376
7377				// Ignore all other no-op show/hide data
7378				} else {
7379					continue;
7380				}
7381			}
7382			orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
7383		}
7384	}
7385
7386	// Bail out if this is a no-op like .hide().hide()
7387	propTween = !jQuery.isEmptyObject( props );
7388	if ( !propTween && jQuery.isEmptyObject( orig ) ) {
7389		return;
7390	}
7391
7392	// Restrict "overflow" and "display" styles during box animations
7393	if ( isBox && elem.nodeType === 1 ) {
7394
7395		// Support: IE <=9 - 11, Edge 12 - 15
7396		// Record all 3 overflow attributes because IE does not infer the shorthand
7397		// from identically-valued overflowX and overflowY and Edge just mirrors
7398		// the overflowX value there.
7399		opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
7400
7401		// Identify a display type, preferring old show/hide data over the CSS cascade
7402		restoreDisplay = dataShow && dataShow.display;
7403		if ( restoreDisplay == null ) {
7404			restoreDisplay = dataPriv.get( elem, "display" );
7405		}
7406		display = jQuery.css( elem, "display" );
7407		if ( display === "none" ) {
7408			if ( restoreDisplay ) {
7409				display = restoreDisplay;
7410			} else {
7411
7412				// Get nonempty value(s) by temporarily forcing visibility
7413				showHide( [ elem ], true );
7414				restoreDisplay = elem.style.display || restoreDisplay;
7415				display = jQuery.css( elem, "display" );
7416				showHide( [ elem ] );
7417			}
7418		}
7419
7420		// Animate inline elements as inline-block
7421		if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) {
7422			if ( jQuery.css( elem, "float" ) === "none" ) {
7423
7424				// Restore the original display value at the end of pure show/hide animations
7425				if ( !propTween ) {
7426					anim.done( function() {
7427						style.display = restoreDisplay;
7428					} );
7429					if ( restoreDisplay == null ) {
7430						display = style.display;
7431						restoreDisplay = display === "none" ? "" : display;
7432					}
7433				}
7434				style.display = "inline-block";
7435			}
7436		}
7437	}
7438
7439	if ( opts.overflow ) {
7440		style.overflow = "hidden";
7441		anim.always( function() {
7442			style.overflow = opts.overflow[ 0 ];
7443			style.overflowX = opts.overflow[ 1 ];
7444			style.overflowY = opts.overflow[ 2 ];
7445		} );
7446	}
7447
7448	// Implement show/hide animations
7449	propTween = false;
7450	for ( prop in orig ) {
7451
7452		// General show/hide setup for this element animation
7453		if ( !propTween ) {
7454			if ( dataShow ) {
7455				if ( "hidden" in dataShow ) {
7456					hidden = dataShow.hidden;
7457				}
7458			} else {
7459				dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } );
7460			}
7461
7462			// Store hidden/visible for toggle so `.stop().toggle()` "reverses"
7463			if ( toggle ) {
7464				dataShow.hidden = !hidden;
7465			}
7466
7467			// Show elements before animating them
7468			if ( hidden ) {
7469				showHide( [ elem ], true );
7470			}
7471
7472			/* eslint-disable no-loop-func */
7473
7474			anim.done( function() {
7475
7476				/* eslint-enable no-loop-func */
7477
7478				// The final step of a "hide" animation is actually hiding the element
7479				if ( !hidden ) {
7480					showHide( [ elem ] );
7481				}
7482				dataPriv.remove( elem, "fxshow" );
7483				for ( prop in orig ) {
7484					jQuery.style( elem, prop, orig[ prop ] );
7485				}
7486			} );
7487		}
7488
7489		// Per-property setup
7490		propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
7491		if ( !( prop in dataShow ) ) {
7492			dataShow[ prop ] = propTween.start;
7493			if ( hidden ) {
7494				propTween.end = propTween.start;
7495				propTween.start = 0;
7496			}
7497		}
7498	}
7499}
7500
7501function propFilter( props, specialEasing ) {
7502	var index, name, easing, value, hooks;
7503
7504	// camelCase, specialEasing and expand cssHook pass
7505	for ( index in props ) {
7506		name = camelCase( index );
7507		easing = specialEasing[ name ];
7508		value = props[ index ];
7509		if ( Array.isArray( value ) ) {
7510			easing = value[ 1 ];
7511			value = props[ index ] = value[ 0 ];
7512		}
7513
7514		if ( index !== name ) {
7515			props[ name ] = value;
7516			delete props[ index ];
7517		}
7518
7519		hooks = jQuery.cssHooks[ name ];
7520		if ( hooks && "expand" in hooks ) {
7521			value = hooks.expand( value );
7522			delete props[ name ];
7523
7524			// Not quite $.extend, this won't overwrite existing keys.
7525			// Reusing 'index' because we have the correct "name"
7526			for ( index in value ) {
7527				if ( !( index in props ) ) {
7528					props[ index ] = value[ index ];
7529					specialEasing[ index ] = easing;
7530				}
7531			}
7532		} else {
7533			specialEasing[ name ] = easing;
7534		}
7535	}
7536}
7537
7538function Animation( elem, properties, options ) {
7539	var result,
7540		stopped,
7541		index = 0,
7542		length = Animation.prefilters.length,
7543		deferred = jQuery.Deferred().always( function() {
7544
7545			// Don't match elem in the :animated selector
7546			delete tick.elem;
7547		} ),
7548		tick = function() {
7549			if ( stopped ) {
7550				return false;
7551			}
7552			var currentTime = fxNow || createFxNow(),
7553				remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
7554
7555				// Support: Android 2.3 only
7556				// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
7557				temp = remaining / animation.duration || 0,
7558				percent = 1 - temp,
7559				index = 0,
7560				length = animation.tweens.length;
7561
7562			for ( ; index < length; index++ ) {
7563				animation.tweens[ index ].run( percent );
7564			}
7565
7566			deferred.notifyWith( elem, [ animation, percent, remaining ] );
7567
7568			// If there's more to do, yield
7569			if ( percent < 1 && length ) {
7570				return remaining;
7571			}
7572
7573			// If this was an empty animation, synthesize a final progress notification
7574			if ( !length ) {
7575				deferred.notifyWith( elem, [ animation, 1, 0 ] );
7576			}
7577
7578			// Resolve the animation and report its conclusion
7579			deferred.resolveWith( elem, [ animation ] );
7580			return false;
7581		},
7582		animation = deferred.promise( {
7583			elem: elem,
7584			props: jQuery.extend( {}, properties ),
7585			opts: jQuery.extend( true, {
7586				specialEasing: {},
7587				easing: jQuery.easing._default
7588			}, options ),
7589			originalProperties: properties,
7590			originalOptions: options,
7591			startTime: fxNow || createFxNow(),
7592			duration: options.duration,
7593			tweens: [],
7594			createTween: function( prop, end ) {
7595				var tween = jQuery.Tween( elem, animation.opts, prop, end,
7596					animation.opts.specialEasing[ prop ] || animation.opts.easing );
7597				animation.tweens.push( tween );
7598				return tween;
7599			},
7600			stop: function( gotoEnd ) {
7601				var index = 0,
7602
7603					// If we are going to the end, we want to run all the tweens
7604					// otherwise we skip this part
7605					length = gotoEnd ? animation.tweens.length : 0;
7606				if ( stopped ) {
7607					return this;
7608				}
7609				stopped = true;
7610				for ( ; index < length; index++ ) {
7611					animation.tweens[ index ].run( 1 );
7612				}
7613
7614				// Resolve when we played the last frame; otherwise, reject
7615				if ( gotoEnd ) {
7616					deferred.notifyWith( elem, [ animation, 1, 0 ] );
7617					deferred.resolveWith( elem, [ animation, gotoEnd ] );
7618				} else {
7619					deferred.rejectWith( elem, [ animation, gotoEnd ] );
7620				}
7621				return this;
7622			}
7623		} ),
7624		props = animation.props;
7625
7626	propFilter( props, animation.opts.specialEasing );
7627
7628	for ( ; index < length; index++ ) {
7629		result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );
7630		if ( result ) {
7631			if ( isFunction( result.stop ) ) {
7632				jQuery._queueHooks( animation.elem, animation.opts.queue ).stop =
7633					result.stop.bind( result );
7634			}
7635			return result;
7636		}
7637	}
7638
7639	jQuery.map( props, createTween, animation );
7640
7641	if ( isFunction( animation.opts.start ) ) {
7642		animation.opts.start.call( elem, animation );
7643	}
7644
7645	// Attach callbacks from options
7646	animation
7647		.progress( animation.opts.progress )
7648		.done( animation.opts.done, animation.opts.complete )
7649		.fail( animation.opts.fail )
7650		.always( animation.opts.always );
7651
7652	jQuery.fx.timer(
7653		jQuery.extend( tick, {
7654			elem: elem,
7655			anim: animation,
7656			queue: animation.opts.queue
7657		} )
7658	);
7659
7660	return animation;
7661}
7662
7663jQuery.Animation = jQuery.extend( Animation, {
7664
7665	tweeners: {
7666		"*": [ function( prop, value ) {
7667			var tween = this.createTween( prop, value );
7668			adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );
7669			return tween;
7670		} ]
7671	},
7672
7673	tweener: function( props, callback ) {
7674		if ( isFunction( props ) ) {
7675			callback = props;
7676			props = [ "*" ];
7677		} else {
7678			props = props.match( rnothtmlwhite );
7679		}
7680
7681		var prop,
7682			index = 0,
7683			length = props.length;
7684
7685		for ( ; index < length; index++ ) {
7686			prop = props[ index ];
7687			Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];
7688			Animation.tweeners[ prop ].unshift( callback );
7689		}
7690	},
7691
7692	prefilters: [ defaultPrefilter ],
7693
7694	prefilter: function( callback, prepend ) {
7695		if ( prepend ) {
7696			Animation.prefilters.unshift( callback );
7697		} else {
7698			Animation.prefilters.push( callback );
7699		}
7700	}
7701} );
7702
7703jQuery.speed = function( speed, easing, fn ) {
7704	var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
7705		complete: fn || !fn && easing ||
7706			isFunction( speed ) && speed,
7707		duration: speed,
7708		easing: fn && easing || easing && !isFunction( easing ) && easing
7709	};
7710
7711	// Go to the end state if fx are off
7712	if ( jQuery.fx.off ) {
7713		opt.duration = 0;
7714
7715	} else {
7716		if ( typeof opt.duration !== "number" ) {
7717			if ( opt.duration in jQuery.fx.speeds ) {
7718				opt.duration = jQuery.fx.speeds[ opt.duration ];
7719
7720			} else {
7721				opt.duration = jQuery.fx.speeds._default;
7722			}
7723		}
7724	}
7725
7726	// Normalize opt.queue - true/undefined/null -> "fx"
7727	if ( opt.queue == null || opt.queue === true ) {
7728		opt.queue = "fx";
7729	}
7730
7731	// Queueing
7732	opt.old = opt.complete;
7733
7734	opt.complete = function() {
7735		if ( isFunction( opt.old ) ) {
7736			opt.old.call( this );
7737		}
7738
7739		if ( opt.queue ) {
7740			jQuery.dequeue( this, opt.queue );
7741		}
7742	};
7743
7744	return opt;
7745};
7746
7747jQuery.fn.extend( {
7748	fadeTo: function( speed, to, easing, callback ) {
7749
7750		// Show any hidden elements after setting opacity to 0
7751		return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show()
7752
7753			// Animate to the value specified
7754			.end().animate( { opacity: to }, speed, easing, callback );
7755	},
7756	animate: function( prop, speed, easing, callback ) {
7757		var empty = jQuery.isEmptyObject( prop ),
7758			optall = jQuery.speed( speed, easing, callback ),
7759			doAnimation = function() {
7760
7761				// Operate on a copy of prop so per-property easing won't be lost
7762				var anim = Animation( this, jQuery.extend( {}, prop ), optall );
7763
7764				// Empty animations, or finishing resolves immediately
7765				if ( empty || dataPriv.get( this, "finish" ) ) {
7766					anim.stop( true );
7767				}
7768			};
7769
7770		doAnimation.finish = doAnimation;
7771
7772		return empty || optall.queue === false ?
7773			this.each( doAnimation ) :
7774			this.queue( optall.queue, doAnimation );
7775	},
7776	stop: function( type, clearQueue, gotoEnd ) {
7777		var stopQueue = function( hooks ) {
7778			var stop = hooks.stop;
7779			delete hooks.stop;
7780			stop( gotoEnd );
7781		};
7782
7783		if ( typeof type !== "string" ) {
7784			gotoEnd = clearQueue;
7785			clearQueue = type;
7786			type = undefined;
7787		}
7788		if ( clearQueue ) {
7789			this.queue( type || "fx", [] );
7790		}
7791
7792		return this.each( function() {
7793			var dequeue = true,
7794				index = type != null && type + "queueHooks",
7795				timers = jQuery.timers,
7796				data = dataPriv.get( this );
7797
7798			if ( index ) {
7799				if ( data[ index ] && data[ index ].stop ) {
7800					stopQueue( data[ index ] );
7801				}
7802			} else {
7803				for ( index in data ) {
7804					if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
7805						stopQueue( data[ index ] );
7806					}
7807				}
7808			}
7809
7810			for ( index = timers.length; index--; ) {
7811				if ( timers[ index ].elem === this &&
7812					( type == null || timers[ index ].queue === type ) ) {
7813
7814					timers[ index ].anim.stop( gotoEnd );
7815					dequeue = false;
7816					timers.splice( index, 1 );
7817				}
7818			}
7819
7820			// Start the next in the queue if the last step wasn't forced.
7821			// Timers currently will call their complete callbacks, which
7822			// will dequeue but only if they were gotoEnd.
7823			if ( dequeue || !gotoEnd ) {
7824				jQuery.dequeue( this, type );
7825			}
7826		} );
7827	},
7828	finish: function( type ) {
7829		if ( type !== false ) {
7830			type = type || "fx";
7831		}
7832		return this.each( function() {
7833			var index,
7834				data = dataPriv.get( this ),
7835				queue = data[ type + "queue" ],
7836				hooks = data[ type + "queueHooks" ],
7837				timers = jQuery.timers,
7838				length = queue ? queue.length : 0;
7839
7840			// Enable finishing flag on private data
7841			data.finish = true;
7842
7843			// Empty the queue first
7844			jQuery.queue( this, type, [] );
7845
7846			if ( hooks && hooks.stop ) {
7847				hooks.stop.call( this, true );
7848			}
7849
7850			// Look for any active animations, and finish them
7851			for ( index = timers.length; index--; ) {
7852				if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
7853					timers[ index ].anim.stop( true );
7854					timers.splice( index, 1 );
7855				}
7856			}
7857
7858			// Look for any animations in the old queue and finish them
7859			for ( index = 0; index < length; index++ ) {
7860				if ( queue[ index ] && queue[ index ].finish ) {
7861					queue[ index ].finish.call( this );
7862				}
7863			}
7864
7865			// Turn off finishing flag
7866			delete data.finish;
7867		} );
7868	}
7869} );
7870
7871jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) {
7872	var cssFn = jQuery.fn[ name ];
7873	jQuery.fn[ name ] = function( speed, easing, callback ) {
7874		return speed == null || typeof speed === "boolean" ?
7875			cssFn.apply( this, arguments ) :
7876			this.animate( genFx( name, true ), speed, easing, callback );
7877	};
7878} );
7879
7880// Generate shortcuts for custom animations
7881jQuery.each( {
7882	slideDown: genFx( "show" ),
7883	slideUp: genFx( "hide" ),
7884	slideToggle: genFx( "toggle" ),
7885	fadeIn: { opacity: "show" },
7886	fadeOut: { opacity: "hide" },
7887	fadeToggle: { opacity: "toggle" }
7888}, function( name, props ) {
7889	jQuery.fn[ name ] = function( speed, easing, callback ) {
7890		return this.animate( props, speed, easing, callback );
7891	};
7892} );
7893
7894jQuery.timers = [];
7895jQuery.fx.tick = function() {
7896	var timer,
7897		i = 0,
7898		timers = jQuery.timers;
7899
7900	fxNow = Date.now();
7901
7902	for ( ; i < timers.length; i++ ) {
7903		timer = timers[ i ];
7904
7905		// Run the timer and safely remove it when done (allowing for external removal)
7906		if ( !timer() && timers[ i ] === timer ) {
7907			timers.splice( i--, 1 );
7908		}
7909	}
7910
7911	if ( !timers.length ) {
7912		jQuery.fx.stop();
7913	}
7914	fxNow = undefined;
7915};
7916
7917jQuery.fx.timer = function( timer ) {
7918	jQuery.timers.push( timer );
7919	jQuery.fx.start();
7920};
7921
7922jQuery.fx.interval = 13;
7923jQuery.fx.start = function() {
7924	if ( inProgress ) {
7925		return;
7926	}
7927
7928	inProgress = true;
7929	schedule();
7930};
7931
7932jQuery.fx.stop = function() {
7933	inProgress = null;
7934};
7935
7936jQuery.fx.speeds = {
7937	slow: 600,
7938	fast: 200,
7939
7940	// Default speed
7941	_default: 400
7942};
7943
7944
7945// Based off of the plugin by Clint Helfers, with permission.
7946// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/
vendor: 21,001 bytes, lines 7947-8815
7947jQuery.fn.delay = function( time, type ) {
7948	time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
7949	type = type || "fx";
7950
7951	return this.queue( type, function( next, hooks ) {
7952		var timeout = window.setTimeout( next, time );
7953		hooks.stop = function() {
7954			window.clearTimeout( timeout );
7955		};
7956	} );
7957};
7958
7959
7960( function() {
7961	var input = document.createElement( "input" ),
7962		select = document.createElement( "select" ),
7963		opt = select.appendChild( document.createElement( "option" ) );
7964
7965	input.type = "checkbox";
7966
7967	// Support: Android <=4.3 only
7968	// Default value for a checkbox should be "on"
7969	support.checkOn = input.value !== "";
7970
7971	// Support: IE <=11 only
7972	// Must access selectedIndex to make default options select
7973	support.optSelected = opt.selected;
7974
7975	// Support: IE <=11 only
7976	// An input loses its value after becoming a radio
7977	input = document.createElement( "input" );
7978	input.value = "t";
7979	input.type = "radio";
7980	support.radioValue = input.value === "t";
7981} )();
7982
7983
7984var boolHook,
7985	attrHandle = jQuery.expr.attrHandle;
7986
7987jQuery.fn.extend( {
7988	attr: function( name, value ) {
7989		return access( this, jQuery.attr, name, value, arguments.length > 1 );
7990	},
7991
7992	removeAttr: function( name ) {
7993		return this.each( function() {
7994			jQuery.removeAttr( this, name );
7995		} );
7996	}
7997} );
7998
7999jQuery.extend( {
8000	attr: function( elem, name, value ) {
8001		var ret, hooks,
8002			nType = elem.nodeType;
8003
8004		// Don't get/set attributes on text, comment and attribute nodes
8005		if ( nType === 3 || nType === 8 || nType === 2 ) {
8006			return;
8007		}
8008
8009		// Fallback to prop when attributes are not supported
8010		if ( typeof elem.getAttribute === "undefined" ) {
8011			return jQuery.prop( elem, name, value );
8012		}
8013
8014		// Attribute hooks are determined by the lowercase version
8015		// Grab necessary hook if one is defined
8016		if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
8017			hooks = jQuery.attrHooks[ name.toLowerCase() ] ||
8018				( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );
8019		}
8020
8021		if ( value !== undefined ) {
8022			if ( value === null ) {
8023				jQuery.removeAttr( elem, name );
8024				return;
8025			}
8026
8027			if ( hooks && "set" in hooks &&
8028				( ret = hooks.set( elem, value, name ) ) !== undefined ) {
8029				return ret;
8030			}
8031
8032			elem.setAttribute( name, value + "" );
8033			return value;
8034		}
8035
8036		if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
8037			return ret;
8038		}
8039
8040		ret = jQuery.find.attr( elem, name );
8041
8042		// Non-existent attributes return null, we normalize to undefined
8043		return ret == null ? undefined : ret;
8044	},
8045
8046	attrHooks: {
8047		type: {
8048			set: function( elem, value ) {
8049				if ( !support.radioValue && value === "radio" &&
8050					nodeName( elem, "input" ) ) {
8051					var val = elem.value;
8052					elem.setAttribute( "type", value );
8053					if ( val ) {
8054						elem.value = val;
8055					}
8056					return value;
8057				}
8058			}
8059		}
8060	},
8061
8062	removeAttr: function( elem, value ) {
8063		var name,
8064			i = 0,
8065
8066			// Attribute names can contain non-HTML whitespace characters
8067			// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
8068			attrNames = value && value.match( rnothtmlwhite );
8069
8070		if ( attrNames && elem.nodeType === 1 ) {
8071			while ( ( name = attrNames[ i++ ] ) ) {
8072				elem.removeAttribute( name );
8073			}
8074		}
8075	}
8076} );
8077
8078// Hooks for boolean attributes
8079boolHook = {
8080	set: function( elem, value, name ) {
8081		if ( value === false ) {
8082
8083			// Remove boolean attributes when set to false
8084			jQuery.removeAttr( elem, name );
8085		} else {
8086			elem.setAttribute( name, name );
8087		}
8088		return name;
8089	}
8090};
8091
8092jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) {
8093	var getter = attrHandle[ name ] || jQuery.find.attr;
8094
8095	attrHandle[ name ] = function( elem, name, isXML ) {
8096		var ret, handle,
8097			lowercaseName = name.toLowerCase();
8098
8099		if ( !isXML ) {
8100
8101			// Avoid an infinite loop by temporarily removing this function from the getter
8102			handle = attrHandle[ lowercaseName ];
8103			attrHandle[ lowercaseName ] = ret;
8104			ret = getter( elem, name, isXML ) != null ?
8105				lowercaseName :
8106				null;
8107			attrHandle[ lowercaseName ] = handle;
8108		}
8109		return ret;
8110	};
8111} );
8112
8113
8114
8115
8116var rfocusable = /^(?:input|select|textarea|button)$/i,
8117	rclickable = /^(?:a|area)$/i;
8118
8119jQuery.fn.extend( {
8120	prop: function( name, value ) {
8121		return access( this, jQuery.prop, name, value, arguments.length > 1 );
8122	},
8123
8124	removeProp: function( name ) {
8125		return this.each( function() {
8126			delete this[ jQuery.propFix[ name ] || name ];
8127		} );
8128	}
8129} );
8130
8131jQuery.extend( {
8132	prop: function( elem, name, value ) {
8133		var ret, hooks,
8134			nType = elem.nodeType;
8135
8136		// Don't get/set properties on text, comment and attribute nodes
8137		if ( nType === 3 || nType === 8 || nType === 2 ) {
8138			return;
8139		}
8140
8141		if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
8142
8143			// Fix name and attach hooks
8144			name = jQuery.propFix[ name ] || name;
8145			hooks = jQuery.propHooks[ name ];
8146		}
8147
8148		if ( value !== undefined ) {
8149			if ( hooks && "set" in hooks &&
8150				( ret = hooks.set( elem, value, name ) ) !== undefined ) {
8151				return ret;
8152			}
8153
8154			return ( elem[ name ] = value );
8155		}
8156
8157		if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
8158			return ret;
8159		}
8160
8161		return elem[ name ];
8162	},
8163
8164	propHooks: {
8165		tabIndex: {
8166			get: function( elem ) {
8167
8168				// Support: IE <=9 - 11 only
8169				// elem.tabIndex doesn't always return the
8170				// correct value when it hasn't been explicitly set
8171				// https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
8172				// Use proper attribute retrieval(#12072)
8173				var tabindex = jQuery.find.attr( elem, "tabindex" );
8174
8175				if ( tabindex ) {
8176					return parseInt( tabindex, 10 );
8177				}
8178
8179				if (
8180					rfocusable.test( elem.nodeName ) ||
8181					rclickable.test( elem.nodeName ) &&
8182					elem.href
8183				) {
8184					return 0;
8185				}
8186
8187				return -1;
8188			}
8189		}
8190	},
8191
8192	propFix: {
8193		"for": "htmlFor",
8194		"class": "className"
8195	}
8196} );
8197
8198// Support: IE <=11 only
8199// Accessing the selectedIndex property
8200// forces the browser to respect setting selected
8201// on the option
8202// The getter ensures a default option is selected
8203// when in an optgroup
8204// eslint rule "no-unused-expressions" is disabled for this code
8205// since it considers such accessions noop
8206if ( !support.optSelected ) {
8207	jQuery.propHooks.selected = {
8208		get: function( elem ) {
8209
8210			/* eslint no-unused-expressions: "off" */
8211
8212			var parent = elem.parentNode;
8213			if ( parent && parent.parentNode ) {
8214				parent.parentNode.selectedIndex;
8215			}
8216			return null;
8217		},
8218		set: function( elem ) {
8219
8220			/* eslint no-unused-expressions: "off" */
8221
8222			var parent = elem.parentNode;
8223			if ( parent ) {
8224				parent.selectedIndex;
8225
8226				if ( parent.parentNode ) {
8227					parent.parentNode.selectedIndex;
8228				}
8229			}
8230		}
8231	};
8232}
8233
8234jQuery.each( [
8235	"tabIndex",
8236	"readOnly",
8237	"maxLength",
8238	"cellSpacing",
8239	"cellPadding",
8240	"rowSpan",
8241	"colSpan",
8242	"useMap",
8243	"frameBorder",
8244	"contentEditable"
8245], function() {
8246	jQuery.propFix[ this.toLowerCase() ] = this;
8247} );
8248
8249
8250
8251
8252	// Strip and collapse whitespace according to HTML spec
8253	// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace
8254	function stripAndCollapse( value ) {
8255		var tokens = value.match( rnothtmlwhite ) || [];
8256		return tokens.join( " " );
8257	}
8258
8259
8260function getClass( elem ) {
8261	return elem.getAttribute && elem.getAttribute( "class" ) || "";
8262}
8263
8264function classesToArray( value ) {
8265	if ( Array.isArray( value ) ) {
8266		return value;
8267	}
8268	if ( typeof value === "string" ) {
8269		return value.match( rnothtmlwhite ) || [];
8270	}
8271	return [];
8272}
8273
8274jQuery.fn.extend( {
8275	addClass: function( value ) {
8276		var classes, elem, cur, curValue, clazz, j, finalValue,
8277			i = 0;
8278
8279		if ( isFunction( value ) ) {
8280			return this.each( function( j ) {
8281				jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
8282			} );
8283		}
8284
8285		classes = classesToArray( value );
8286
8287		if ( classes.length ) {
8288			while ( ( elem = this[ i++ ] ) ) {
8289				curValue = getClass( elem );
8290				cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
8291
8292				if ( cur ) {
8293					j = 0;
8294					while ( ( clazz = classes[ j++ ] ) ) {
8295						if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
8296							cur += clazz + " ";
8297						}
8298					}
8299
8300					// Only assign if different to avoid unneeded rendering.
8301					finalValue = stripAndCollapse( cur );
8302					if ( curValue !== finalValue ) {
8303						elem.setAttribute( "class", finalValue );
8304					}
8305				}
8306			}
8307		}
8308
8309		return this;
8310	},
8311
8312	removeClass: function( value ) {
8313		var classes, elem, cur, curValue, clazz, j, finalValue,
8314			i = 0;
8315
8316		if ( isFunction( value ) ) {
8317			return this.each( function( j ) {
8318				jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
8319			} );
8320		}
8321
8322		if ( !arguments.length ) {
8323			return this.attr( "class", "" );
8324		}
8325
8326		classes = classesToArray( value );
8327
8328		if ( classes.length ) {
8329			while ( ( elem = this[ i++ ] ) ) {
8330				curValue = getClass( elem );
8331
8332				// This expression is here for better compressibility (see addClass)
8333				cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
8334
8335				if ( cur ) {
8336					j = 0;
8337					while ( ( clazz = classes[ j++ ] ) ) {
8338
8339						// Remove *all* instances
8340						while ( cur.indexOf( " " + clazz + " " ) > -1 ) {
8341							cur = cur.replace( " " + clazz + " ", " " );
8342						}
8343					}
8344
8345					// Only assign if different to avoid unneeded rendering.
8346					finalValue = stripAndCollapse( cur );
8347					if ( curValue !== finalValue ) {
8348						elem.setAttribute( "class", finalValue );
8349					}
8350				}
8351			}
8352		}
8353
8354		return this;
8355	},
8356
8357	toggleClass: function( value, stateVal ) {
8358		var type = typeof value,
8359			isValidValue = type === "string" || Array.isArray( value );
8360
8361		if ( typeof stateVal === "boolean" && isValidValue ) {
8362			return stateVal ? this.addClass( value ) : this.removeClass( value );
8363		}
8364
8365		if ( isFunction( value ) ) {
8366			return this.each( function( i ) {
8367				jQuery( this ).toggleClass(
8368					value.call( this, i, getClass( this ), stateVal ),
8369					stateVal
8370				);
8371			} );
8372		}
8373
8374		return this.each( function() {
8375			var className, i, self, classNames;
8376
8377			if ( isValidValue ) {
8378
8379				// Toggle individual class names
8380				i = 0;
8381				self = jQuery( this );
8382				classNames = classesToArray( value );
8383
8384				while ( ( className = classNames[ i++ ] ) ) {
8385
8386					// Check each className given, space separated list
8387					if ( self.hasClass( className ) ) {
8388						self.removeClass( className );
8389					} else {
8390						self.addClass( className );
8391					}
8392				}
8393
8394			// Toggle whole class name
8395			} else if ( value === undefined || type === "boolean" ) {
8396				className = getClass( this );
8397				if ( className ) {
8398
8399					// Store className if set
8400					dataPriv.set( this, "__className__", className );
8401				}
8402
8403				// If the element has a class name or if we're passed `false`,
8404				// then remove the whole classname (if there was one, the above saved it).
8405				// Otherwise bring back whatever was previously saved (if anything),
8406				// falling back to the empty string if nothing was stored.
8407				if ( this.setAttribute ) {
8408					this.setAttribute( "class",
8409						className || value === false ?
8410							"" :
8411							dataPriv.get( this, "__className__" ) || ""
8412					);
8413				}
8414			}
8415		} );
8416	},
8417
8418	hasClass: function( selector ) {
8419		var className, elem,
8420			i = 0;
8421
8422		className = " " + selector + " ";
8423		while ( ( elem = this[ i++ ] ) ) {
8424			if ( elem.nodeType === 1 &&
8425				( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) {
8426				return true;
8427			}
8428		}
8429
8430		return false;
8431	}
8432} );
8433
8434
8435
8436
8437var rreturn = /\r/g;
8438
8439jQuery.fn.extend( {
8440	val: function( value ) {
8441		var hooks, ret, valueIsFunction,
8442			elem = this[ 0 ];
8443
8444		if ( !arguments.length ) {
8445			if ( elem ) {
8446				hooks = jQuery.valHooks[ elem.type ] ||
8447					jQuery.valHooks[ elem.nodeName.toLowerCase() ];
8448
8449				if ( hooks &&
8450					"get" in hooks &&
8451					( ret = hooks.get( elem, "value" ) ) !== undefined
8452				) {
8453					return ret;
8454				}
8455
8456				ret = elem.value;
8457
8458				// Handle most common string cases
8459				if ( typeof ret === "string" ) {
8460					return ret.replace( rreturn, "" );
8461				}
8462
8463				// Handle cases where value is null/undef or number
8464				return ret == null ? "" : ret;
8465			}
8466
8467			return;
8468		}
8469
8470		valueIsFunction = isFunction( value );
8471
8472		return this.each( function( i ) {
8473			var val;
8474
8475			if ( this.nodeType !== 1 ) {
8476				return;
8477			}
8478
8479			if ( valueIsFunction ) {
8480				val = value.call( this, i, jQuery( this ).val() );
8481			} else {
8482				val = value;
8483			}
8484
8485			// Treat null/undefined as ""; convert numbers to string
8486			if ( val == null ) {
8487				val = "";
8488
8489			} else if ( typeof val === "number" ) {
8490				val += "";
8491
8492			} else if ( Array.isArray( val ) ) {
8493				val = jQuery.map( val, function( value ) {
8494					return value == null ? "" : value + "";
8495				} );
8496			}
8497
8498			hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
8499
8500			// If set returns undefined, fall back to normal setting
8501			if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) {
8502				this.value = val;
8503			}
8504		} );
8505	}
8506} );
8507
8508jQuery.extend( {
8509	valHooks: {
8510		option: {
8511			get: function( elem ) {
8512
8513				var val = jQuery.find.attr( elem, "value" );
8514				return val != null ?
8515					val :
8516
8517					// Support: IE <=10 - 11 only
8518					// option.text throws exceptions (#14686, #14858)
8519					// Strip and collapse whitespace
8520					// https://html.spec.whatwg.org/#strip-and-collapse-whitespace
8521					stripAndCollapse( jQuery.text( elem ) );
8522			}
8523		},
8524		select: {
8525			get: function( elem ) {
8526				var value, option, i,
8527					options = elem.options,
8528					index = elem.selectedIndex,
8529					one = elem.type === "select-one",
8530					values = one ? null : [],
8531					max = one ? index + 1 : options.length;
8532
8533				if ( index < 0 ) {
8534					i = max;
8535
8536				} else {
8537					i = one ? index : 0;
8538				}
8539
8540				// Loop through all the selected options
8541				for ( ; i < max; i++ ) {
8542					option = options[ i ];
8543
8544					// Support: IE <=9 only
8545					// IE8-9 doesn't update selected after form reset (#2551)
8546					if ( ( option.selected || i === index ) &&
8547
8548							// Don't return options that are disabled or in a disabled optgroup
8549							!option.disabled &&
8550							( !option.parentNode.disabled ||
8551								!nodeName( option.parentNode, "optgroup" ) ) ) {
8552
8553						// Get the specific value for the option
8554						value = jQuery( option ).val();
8555
8556						// We don't need an array for one selects
8557						if ( one ) {
8558							return value;
8559						}
8560
8561						// Multi-Selects return an array
8562						values.push( value );
8563					}
8564				}
8565
8566				return values;
8567			},
8568
8569			set: function( elem, value ) {
8570				var optionSet, option,
8571					options = elem.options,
8572					values = jQuery.makeArray( value ),
8573					i = options.length;
8574
8575				while ( i-- ) {
8576					option = options[ i ];
8577
8578					/* eslint-disable no-cond-assign */
8579
8580					if ( option.selected =
8581						jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1
8582					) {
8583						optionSet = true;
8584					}
8585
8586					/* eslint-enable no-cond-assign */
8587				}
8588
8589				// Force browsers to behave consistently when non-matching value is set
8590				if ( !optionSet ) {
8591					elem.selectedIndex = -1;
8592				}
8593				return values;
8594			}
8595		}
8596	}
8597} );
8598
8599// Radios and checkboxes getter/setter
8600jQuery.each( [ "radio", "checkbox" ], function() {
8601	jQuery.valHooks[ this ] = {
8602		set: function( elem, value ) {
8603			if ( Array.isArray( value ) ) {
8604				return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
8605			}
8606		}
8607	};
8608	if ( !support.checkOn ) {
8609		jQuery.valHooks[ this ].get = function( elem ) {
8610			return elem.getAttribute( "value" ) === null ? "on" : elem.value;
8611		};
8612	}
8613} );
8614
8615
8616
8617
8618// Return jQuery for attributes-only inclusion
8619
8620
8621support.focusin = "onfocusin" in window;
8622
8623
8624var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
8625	stopPropagationCallback = function( e ) {
8626		e.stopPropagation();
8627	};
8628
8629jQuery.extend( jQuery.event, {
8630
8631	trigger: function( event, data, elem, onlyHandlers ) {
8632
8633		var i, cur, tmp, bubbleType, ontype, handle, special, lastElement,
8634			eventPath = [ elem || document ],
8635			type = hasOwn.call( event, "type" ) ? event.type : event,
8636			namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : [];
8637
8638		cur = lastElement = tmp = elem = elem || document;
8639
8640		// Don't do events on text and comment nodes
8641		if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
8642			return;
8643		}
8644
8645		// focus/blur morphs to focusin/out; ensure we're not firing them right now
8646		if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
8647			return;
8648		}
8649
8650		if ( type.indexOf( "." ) > -1 ) {
8651
8652			// Namespaced trigger; create a regexp to match event type in handle()
8653			namespaces = type.split( "." );
8654			type = namespaces.shift();
8655			namespaces.sort();
8656		}
8657		ontype = type.indexOf( ":" ) < 0 && "on" + type;
8658
8659		// Caller can pass in a jQuery.Event object, Object, or just an event type string
8660		event = event[ jQuery.expando ] ?
8661			event :
8662			new jQuery.Event( type, typeof event === "object" && event );
8663
8664		// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
8665		event.isTrigger = onlyHandlers ? 2 : 3;
8666		event.namespace = namespaces.join( "." );
8667		event.rnamespace = event.namespace ?
8668			new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) :
8669			null;
8670
8671		// Clean up the event in case it is being reused
8672		event.result = undefined;
8673		if ( !event.target ) {
8674			event.target = elem;
8675		}
8676
8677		// Clone any incoming data and prepend the event, creating the handler arg list
8678		data = data == null ?
8679			[ event ] :
8680			jQuery.makeArray( data, [ event ] );
8681
8682		// Allow special events to draw outside the lines
8683		special = jQuery.event.special[ type ] || {};
8684		if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
8685			return;
8686		}
8687
8688		// Determine event propagation path in advance, per W3C events spec (#9951)
8689		// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
8690		if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {
8691
8692			bubbleType = special.delegateType || type;
8693			if ( !rfocusMorph.test( bubbleType + type ) ) {
8694				cur = cur.parentNode;
8695			}
8696			for ( ; cur; cur = cur.parentNode ) {
8697				eventPath.push( cur );
8698				tmp = cur;
8699			}
8700
8701			// Only add window if we got to document (e.g., not plain obj or detached DOM)
8702			if ( tmp === ( elem.ownerDocument || document ) ) {
8703				eventPath.push( tmp.defaultView || tmp.parentWindow || window );
8704			}
8705		}
8706
8707		// Fire handlers on the event path
8708		i = 0;
8709		while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {
8710			lastElement = cur;
8711			event.type = i > 1 ?
8712				bubbleType :
8713				special.bindType || type;
8714
8715			// jQuery handler
8716			handle = ( dataPriv.get( cur, "events" ) || Object.create( null ) )[ event.type ] &&
8717				dataPriv.get( cur, "handle" );
8718			if ( handle ) {
8719				handle.apply( cur, data );
8720			}
8721
8722			// Native handler
8723			handle = ontype && cur[ ontype ];
8724			if ( handle && handle.apply && acceptData( cur ) ) {
8725				event.result = handle.apply( cur, data );
8726				if ( event.result === false ) {
8727					event.preventDefault();
8728				}
8729			}
8730		}
8731		event.type = type;
8732
8733		// If nobody prevented the default action, do it now
8734		if ( !onlyHandlers && !event.isDefaultPrevented() ) {
8735
8736			if ( ( !special._default ||
8737				special._default.apply( eventPath.pop(), data ) === false ) &&
8738				acceptData( elem ) ) {
8739
8740				// Call a native DOM method on the target with the same name as the event.
8741				// Don't do default actions on window, that's where global variables be (#6170)
8742				if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {
8743
8744					// Don't re-trigger an onFOO event when we call its FOO() method
8745					tmp = elem[ ontype ];
8746
8747					if ( tmp ) {
8748						elem[ ontype ] = null;
8749					}
8750
8751					// Prevent re-triggering of the same event, since we already bubbled it above
8752					jQuery.event.triggered = type;
8753
8754					if ( event.isPropagationStopped() ) {
8755						lastElement.addEventListener( type, stopPropagationCallback );
8756					}
8757
8758					elem[ type ]();
8759
8760					if ( event.isPropagationStopped() ) {
8761						lastElement.removeEventListener( type, stopPropagationCallback );
8762					}
8763
8764					jQuery.event.triggered = undefined;
8765
8766					if ( tmp ) {
8767						elem[ ontype ] = tmp;
8768					}
8769				}
8770			}
8771		}
8772
8773		return event.result;
8774	},
8775
8776	// Piggyback on a donor event to simulate a different one
8777	// Used only for `focus(in | out)` events
8778	simulate: function( type, elem, event ) {
8779		var e = jQuery.extend(
8780			new jQuery.Event(),
8781			event,
8782			{
8783				type: type,
8784				isSimulated: true
8785			}
8786		);
8787
8788		jQuery.event.trigger( e, null, elem );
8789	}
8790
8791} );
8792
8793jQuery.fn.extend( {
8794
8795	trigger: function( type, data ) {
8796		return this.each( function() {
8797			jQuery.event.trigger( type, data, this );
8798		} );
8799	},
8800	triggerHandler: function( type, data ) {
8801		var elem = this[ 0 ];
8802		if ( elem ) {
8803			return jQuery.event.trigger( type, data, elem, true );
8804		}
8805	}
8806} );
8807
8808
8809// Support: Firefox <=44
8810// Firefox doesn't have focus(in | out) events
8811// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
8812//
8813// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
8814// focus(in | out) events fire after focus & blur events,
8815// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
vendor: 54,284 bytes, lines 8816-10878
8816// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
8817if ( !support.focusin ) {
8818	jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {
8819
8820		// Attach a single capturing handler on the document while someone wants focusin/focusout
8821		var handler = function( event ) {
8822			jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );
8823		};
8824
8825		jQuery.event.special[ fix ] = {
8826			setup: function() {
8827
8828				// Handle: regular nodes (via `this.ownerDocument`), window
8829				// (via `this.document`) & document (via `this`).
8830				var doc = this.ownerDocument || this.document || this,
8831					attaches = dataPriv.access( doc, fix );
8832
8833				if ( !attaches ) {
8834					doc.addEventListener( orig, handler, true );
8835				}
8836				dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
8837			},
8838			teardown: function() {
8839				var doc = this.ownerDocument || this.document || this,
8840					attaches = dataPriv.access( doc, fix ) - 1;
8841
8842				if ( !attaches ) {
8843					doc.removeEventListener( orig, handler, true );
8844					dataPriv.remove( doc, fix );
8845
8846				} else {
8847					dataPriv.access( doc, fix, attaches );
8848				}
8849			}
8850		};
8851	} );
8852}
8853var location = window.location;
8854
8855var nonce = { guid: Date.now() };
8856
8857var rquery = ( /\?/ );
8858
8859
8860
8861// Cross-browser xml parsing
8862jQuery.parseXML = function( data ) {
8863	var xml, parserErrorElem;
8864	if ( !data || typeof data !== "string" ) {
8865		return null;
8866	}
8867
8868	// Support: IE 9 - 11 only
8869	// IE throws on parseFromString with invalid input.
8870	try {
8871		xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
8872	} catch ( e ) {}
8873
8874	parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ];
8875	if ( !xml || parserErrorElem ) {
8876		jQuery.error( "Invalid XML: " + (
8877			parserErrorElem ?
8878				jQuery.map( parserErrorElem.childNodes, function( el ) {
8879					return el.textContent;
8880				} ).join( "\n" ) :
8881				data
8882		) );
8883	}
8884	return xml;
8885};
8886
8887
8888var
8889	rbracket = /\[\]$/,
8890	rCRLF = /\r?\n/g,
8891	rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
8892	rsubmittable = /^(?:input|select|textarea|keygen)/i;
8893
8894function buildParams( prefix, obj, traditional, add ) {
8895	var name;
8896
8897	if ( Array.isArray( obj ) ) {
8898
8899		// Serialize array item.
8900		jQuery.each( obj, function( i, v ) {
8901			if ( traditional || rbracket.test( prefix ) ) {
8902
8903				// Treat each array item as a scalar.
8904				add( prefix, v );
8905
8906			} else {
8907
8908				// Item is non-scalar (array or object), encode its numeric index.
8909				buildParams(
8910					prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]",
8911					v,
8912					traditional,
8913					add
8914				);
8915			}
8916		} );
8917
8918	} else if ( !traditional && toType( obj ) === "object" ) {
8919
8920		// Serialize object item.
8921		for ( name in obj ) {
8922			buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
8923		}
8924
8925	} else {
8926
8927		// Serialize scalar item.
8928		add( prefix, obj );
8929	}
8930}
8931
8932// Serialize an array of form elements or a set of
8933// key/values into a query string
8934jQuery.param = function( a, traditional ) {
8935	var prefix,
8936		s = [],
8937		add = function( key, valueOrFunction ) {
8938
8939			// If value is a function, invoke it and use its return value
8940			var value = isFunction( valueOrFunction ) ?
8941				valueOrFunction() :
8942				valueOrFunction;
8943
8944			s[ s.length ] = encodeURIComponent( key ) + "=" +
8945				encodeURIComponent( value == null ? "" : value );
8946		};
8947
8948	if ( a == null ) {
8949		return "";
8950	}
8951
8952	// If an array was passed in, assume that it is an array of form elements.
8953	if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
8954
8955		// Serialize the form elements
8956		jQuery.each( a, function() {
8957			add( this.name, this.value );
8958		} );
8959
8960	} else {
8961
8962		// If traditional, encode the "old" way (the way 1.3.2 or older
8963		// did it), otherwise encode params recursively.
8964		for ( prefix in a ) {
8965			buildParams( prefix, a[ prefix ], traditional, add );
8966		}
8967	}
8968
8969	// Return the resulting serialization
8970	return s.join( "&" );
8971};
8972
8973jQuery.fn.extend( {
8974	serialize: function() {
8975		return jQuery.param( this.serializeArray() );
8976	},
8977	serializeArray: function() {
8978		return this.map( function() {
8979
8980			// Can add propHook for "elements" to filter or add form elements
8981			var elements = jQuery.prop( this, "elements" );
8982			return elements ? jQuery.makeArray( elements ) : this;
8983		} ).filter( function() {
8984			var type = this.type;
8985
8986			// Use .is( ":disabled" ) so that fieldset[disabled] works
8987			return this.name && !jQuery( this ).is( ":disabled" ) &&
8988				rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
8989				( this.checked || !rcheckableType.test( type ) );
8990		} ).map( function( _i, elem ) {
8991			var val = jQuery( this ).val();
8992
8993			if ( val == null ) {
8994				return null;
8995			}
8996
8997			if ( Array.isArray( val ) ) {
8998				return jQuery.map( val, function( val ) {
8999					return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
9000				} );
9001			}
9002
9003			return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
9004		} ).get();
9005	}
9006} );
9007
9008
9009var
9010	r20 = /%20/g,
9011	rhash = /#.*$/,
9012	rantiCache = /([?&])_=[^&]*/,
9013	rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
9014
9015	// #7653, #8125, #8152: local protocol detection
9016	rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
9017	rnoContent = /^(?:GET|HEAD)$/,
9018	rprotocol = /^\/\//,
9019
9020	/* Prefilters
9021	 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
9022	 * 2) These are called:
9023	 *    - BEFORE asking for a transport
9024	 *    - AFTER param serialization (s.data is a string if s.processData is true)
9025	 * 3) key is the dataType
9026	 * 4) the catchall symbol "*" can be used
9027	 * 5) execution will start with transport dataType and THEN continue down to "*" if needed
9028	 */
9029	prefilters = {},
9030
9031	/* Transports bindings
9032	 * 1) key is the dataType
9033	 * 2) the catchall symbol "*" can be used
9034	 * 3) selection will start with transport dataType and THEN go to "*" if needed
9035	 */
9036	transports = {},
9037
9038	// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
9039	allTypes = "*/".concat( "*" ),
9040
9041	// Anchor tag for parsing the document origin
9042	originAnchor = document.createElement( "a" );
9043
9044originAnchor.href = location.href;
9045
9046// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
9047function addToPrefiltersOrTransports( structure ) {
9048
9049	// dataTypeExpression is optional and defaults to "*"
9050	return function( dataTypeExpression, func ) {
9051
9052		if ( typeof dataTypeExpression !== "string" ) {
9053			func = dataTypeExpression;
9054			dataTypeExpression = "*";
9055		}
9056
9057		var dataType,
9058			i = 0,
9059			dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];
9060
9061		if ( isFunction( func ) ) {
9062
9063			// For each dataType in the dataTypeExpression
9064			while ( ( dataType = dataTypes[ i++ ] ) ) {
9065
9066				// Prepend if requested
9067				if ( dataType[ 0 ] === "+" ) {
9068					dataType = dataType.slice( 1 ) || "*";
9069					( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );
9070
9071				// Otherwise append
9072				} else {
9073					( structure[ dataType ] = structure[ dataType ] || [] ).push( func );
9074				}
9075			}
9076		}
9077	};
9078}
9079
9080// Base inspection function for prefilters and transports
9081function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
9082
9083	var inspected = {},
9084		seekingTransport = ( structure === transports );
9085
9086	function inspect( dataType ) {
9087		var selected;
9088		inspected[ dataType ] = true;
9089		jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
9090			var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
9091			if ( typeof dataTypeOrTransport === "string" &&
9092				!seekingTransport && !inspected[ dataTypeOrTransport ] ) {
9093
9094				options.dataTypes.unshift( dataTypeOrTransport );
9095				inspect( dataTypeOrTransport );
9096				return false;
9097			} else if ( seekingTransport ) {
9098				return !( selected = dataTypeOrTransport );
9099			}
9100		} );
9101		return selected;
9102	}
9103
9104	return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
9105}
9106
9107// A special extend for ajax options
9108// that takes "flat" options (not to be deep extended)
9109// Fixes #9887
9110function ajaxExtend( target, src ) {
9111	var key, deep,
9112		flatOptions = jQuery.ajaxSettings.flatOptions || {};
9113
9114	for ( key in src ) {
9115		if ( src[ key ] !== undefined ) {
9116			( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
9117		}
9118	}
9119	if ( deep ) {
9120		jQuery.extend( true, target, deep );
9121	}
9122
9123	return target;
9124}
9125
9126/* Handles responses to an ajax request:
9127 * - finds the right dataType (mediates between content-type and expected dataType)
9128 * - returns the corresponding response
9129 */
9130function ajaxHandleResponses( s, jqXHR, responses ) {
9131
9132	var ct, type, finalDataType, firstDataType,
9133		contents = s.contents,
9134		dataTypes = s.dataTypes;
9135
9136	// Remove auto dataType and get content-type in the process
9137	while ( dataTypes[ 0 ] === "*" ) {
9138		dataTypes.shift();
9139		if ( ct === undefined ) {
9140			ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" );
9141		}
9142	}
9143
9144	// Check if we're dealing with a known content-type
9145	if ( ct ) {
9146		for ( type in contents ) {
9147			if ( contents[ type ] && contents[ type ].test( ct ) ) {
9148				dataTypes.unshift( type );
9149				break;
9150			}
9151		}
9152	}
9153
9154	// Check to see if we have a response for the expected dataType
9155	if ( dataTypes[ 0 ] in responses ) {
9156		finalDataType = dataTypes[ 0 ];
9157	} else {
9158
9159		// Try convertible dataTypes
9160		for ( type in responses ) {
9161			if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) {
9162				finalDataType = type;
9163				break;
9164			}
9165			if ( !firstDataType ) {
9166				firstDataType = type;
9167			}
9168		}
9169
9170		// Or just use first one
9171		finalDataType = finalDataType || firstDataType;
9172	}
9173
9174	// If we found a dataType
9175	// We add the dataType to the list if needed
9176	// and return the corresponding response
9177	if ( finalDataType ) {
9178		if ( finalDataType !== dataTypes[ 0 ] ) {
9179			dataTypes.unshift( finalDataType );
9180		}
9181		return responses[ finalDataType ];
9182	}
9183}
9184
9185/* Chain conversions given the request and the original response
9186 * Also sets the responseXXX fields on the jqXHR instance
9187 */
9188function ajaxConvert( s, response, jqXHR, isSuccess ) {
9189	var conv2, current, conv, tmp, prev,
9190		converters = {},
9191
9192		// Work with a copy of dataTypes in case we need to modify it for conversion
9193		dataTypes = s.dataTypes.slice();
9194
9195	// Create converters map with lowercased keys
9196	if ( dataTypes[ 1 ] ) {
9197		for ( conv in s.converters ) {
9198			converters[ conv.toLowerCase() ] = s.converters[ conv ];
9199		}
9200	}
9201
9202	current = dataTypes.shift();
9203
9204	// Convert to each sequential dataType
9205	while ( current ) {
9206
9207		if ( s.responseFields[ current ] ) {
9208			jqXHR[ s.responseFields[ current ] ] = response;
9209		}
9210
9211		// Apply the dataFilter if provided
9212		if ( !prev && isSuccess && s.dataFilter ) {
9213			response = s.dataFilter( response, s.dataType );
9214		}
9215
9216		prev = current;
9217		current = dataTypes.shift();
9218
9219		if ( current ) {
9220
9221			// There's only work to do if current dataType is non-auto
9222			if ( current === "*" ) {
9223
9224				current = prev;
9225
9226			// Convert response if prev dataType is non-auto and differs from current
9227			} else if ( prev !== "*" && prev !== current ) {
9228
9229				// Seek a direct converter
9230				conv = converters[ prev + " " + current ] || converters[ "* " + current ];
9231
9232				// If none found, seek a pair
9233				if ( !conv ) {
9234					for ( conv2 in converters ) {
9235
9236						// If conv2 outputs current
9237						tmp = conv2.split( " " );
9238						if ( tmp[ 1 ] === current ) {
9239
9240							// If prev can be converted to accepted input
9241							conv = converters[ prev + " " + tmp[ 0 ] ] ||
9242								converters[ "* " + tmp[ 0 ] ];
9243							if ( conv ) {
9244
9245								// Condense equivalence converters
9246								if ( conv === true ) {
9247									conv = converters[ conv2 ];
9248
9249								// Otherwise, insert the intermediate dataType
9250								} else if ( converters[ conv2 ] !== true ) {
9251									current = tmp[ 0 ];
9252									dataTypes.unshift( tmp[ 1 ] );
9253								}
9254								break;
9255							}
9256						}
9257					}
9258				}
9259
9260				// Apply converter (if not an equivalence)
9261				if ( conv !== true ) {
9262
9263					// Unless errors are allowed to bubble, catch and return them
9264					if ( conv && s.throws ) {
9265						response = conv( response );
9266					} else {
9267						try {
9268							response = conv( response );
9269						} catch ( e ) {
9270							return {
9271								state: "parsererror",
9272								error: conv ? e : "No conversion from " + prev + " to " + current
9273							};
9274						}
9275					}
9276				}
9277			}
9278		}
9279	}
9280
9281	return { state: "success", data: response };
9282}
9283
9284jQuery.extend( {
9285
9286	// Counter for holding the number of active queries
9287	active: 0,
9288
9289	// Last-Modified header cache for next request
9290	lastModified: {},
9291	etag: {},
9292
9293	ajaxSettings: {
9294		url: location.href,
9295		type: "GET",
9296		isLocal: rlocalProtocol.test( location.protocol ),
9297		global: true,
9298		processData: true,
9299		async: true,
9300		contentType: "application/x-www-form-urlencoded; charset=UTF-8",
9301
9302		/*
9303		timeout: 0,
9304		data: null,
9305		dataType: null,
9306		username: null,
9307		password: null,
9308		cache: null,
9309		throws: false,
9310		traditional: false,
9311		headers: {},
9312		*/
9313
9314		accepts: {
9315			"*": allTypes,
9316			text: "text/plain",
9317			html: "text/html",
9318			xml: "application/xml, text/xml",
9319			json: "application/json, text/javascript"
9320		},
9321
9322		contents: {
9323			xml: /\bxml\b/,
9324			html: /\bhtml/,
9325			json: /\bjson\b/
9326		},
9327
9328		responseFields: {
9329			xml: "responseXML",
9330			text: "responseText",
9331			json: "responseJSON"
9332		},
9333
9334		// Data converters
9335		// Keys separate source (or catchall "*") and destination types with a single space
9336		converters: {
9337
9338			// Convert anything to text
9339			"* text": String,
9340
9341			// Text to html (true = no transformation)
9342			"text html": true,
9343
9344			// Evaluate text as a json expression
9345			"text json": JSON.parse,
9346
9347			// Parse text as xml
9348			"text xml": jQuery.parseXML
9349		},
9350
9351		// For options that shouldn't be deep extended:
9352		// you can add your own custom options here if
9353		// and when you create one that shouldn't be
9354		// deep extended (see ajaxExtend)
9355		flatOptions: {
9356			url: true,
9357			context: true
9358		}
9359	},
9360
9361	// Creates a full fledged settings object into target
9362	// with both ajaxSettings and settings fields.
9363	// If target is omitted, writes into ajaxSettings.
9364	ajaxSetup: function( target, settings ) {
9365		return settings ?
9366
9367			// Building a settings object
9368			ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
9369
9370			// Extending ajaxSettings
9371			ajaxExtend( jQuery.ajaxSettings, target );
9372	},
9373
9374	ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
9375	ajaxTransport: addToPrefiltersOrTransports( transports ),
9376
9377	// Main method
9378	ajax: function( url, options ) {
9379
9380		// If url is an object, simulate pre-1.5 signature
9381		if ( typeof url === "object" ) {
9382			options = url;
9383			url = undefined;
9384		}
9385
9386		// Force options to be an object
9387		options = options || {};
9388
9389		var transport,
9390
9391			// URL without anti-cache param
9392			cacheURL,
9393
9394			// Response headers
9395			responseHeadersString,
9396			responseHeaders,
9397
9398			// timeout handle
9399			timeoutTimer,
9400
9401			// Url cleanup var
9402			urlAnchor,
9403
9404			// Request state (becomes false upon send and true upon completion)
9405			completed,
9406
9407			// To know if global events are to be dispatched
9408			fireGlobals,
9409
9410			// Loop variable
9411			i,
9412
9413			// uncached part of the url
9414			uncached,
9415
9416			// Create the final options object
9417			s = jQuery.ajaxSetup( {}, options ),
9418
9419			// Callbacks context
9420			callbackContext = s.context || s,
9421
9422			// Context for global events is callbackContext if it is a DOM node or jQuery collection
9423			globalEventContext = s.context &&
9424				( callbackContext.nodeType || callbackContext.jquery ) ?
9425				jQuery( callbackContext ) :
9426				jQuery.event,
9427
9428			// Deferreds
9429			deferred = jQuery.Deferred(),
9430			completeDeferred = jQuery.Callbacks( "once memory" ),
9431
9432			// Status-dependent callbacks
9433			statusCode = s.statusCode || {},
9434
9435			// Headers (they are sent all at once)
9436			requestHeaders = {},
9437			requestHeadersNames = {},
9438
9439			// Default abort message
9440			strAbort = "canceled",
9441
9442			// Fake xhr
9443			jqXHR = {
9444				readyState: 0,
9445
9446				// Builds headers hashtable if needed
9447				getResponseHeader: function( key ) {
9448					var match;
9449					if ( completed ) {
9450						if ( !responseHeaders ) {
9451							responseHeaders = {};
9452							while ( ( match = rheaders.exec( responseHeadersString ) ) ) {
9453								responseHeaders[ match[ 1 ].toLowerCase() + " " ] =
9454									( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] )
9455										.concat( match[ 2 ] );
9456							}
9457						}
9458						match = responseHeaders[ key.toLowerCase() + " " ];
9459					}
9460					return match == null ? null : match.join( ", " );
9461				},
9462
9463				// Raw string
9464				getAllResponseHeaders: function() {
9465					return completed ? responseHeadersString : null;
9466				},
9467
9468				// Caches the header
9469				setRequestHeader: function( name, value ) {
9470					if ( completed == null ) {
9471						name = requestHeadersNames[ name.toLowerCase() ] =
9472							requestHeadersNames[ name.toLowerCase() ] || name;
9473						requestHeaders[ name ] = value;
9474					}
9475					return this;
9476				},
9477
9478				// Overrides response content-type header
9479				overrideMimeType: function( type ) {
9480					if ( completed == null ) {
9481						s.mimeType = type;
9482					}
9483					return this;
9484				},
9485
9486				// Status-dependent callbacks
9487				statusCode: function( map ) {
9488					var code;
9489					if ( map ) {
9490						if ( completed ) {
9491
9492							// Execute the appropriate callbacks
9493							jqXHR.always( map[ jqXHR.status ] );
9494						} else {
9495
9496							// Lazy-add the new callbacks in a way that preserves old ones
9497							for ( code in map ) {
9498								statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
9499							}
9500						}
9501					}
9502					return this;
9503				},
9504
9505				// Cancel the request
9506				abort: function( statusText ) {
9507					var finalText = statusText || strAbort;
9508					if ( transport ) {
9509						transport.abort( finalText );
9510					}
9511					done( 0, finalText );
9512					return this;
9513				}
9514			};
9515
9516		// Attach deferreds
9517		deferred.promise( jqXHR );
9518
9519		// Add protocol if not provided (prefilters might expect it)
9520		// Handle falsy url in the settings object (#10093: consistency with old signature)
9521		// We also use the url parameter if available
9522		s.url = ( ( url || s.url || location.href ) + "" )
9523			.replace( rprotocol, location.protocol + "//" );
9524
9525		// Alias method option to type as per ticket #12004
9526		s.type = options.method || options.type || s.method || s.type;
9527
9528		// Extract dataTypes list
9529		s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ];
9530
9531		// A cross-domain request is in order when the origin doesn't match the current origin.
9532		if ( s.crossDomain == null ) {
9533			urlAnchor = document.createElement( "a" );
9534
9535			// Support: IE <=8 - 11, Edge 12 - 15
9536			// IE throws exception on accessing the href property if url is malformed,
9537			// e.g. http://example.com:80x/
9538			try {
9539				urlAnchor.href = s.url;
9540
9541				// Support: IE <=8 - 11 only
9542				// Anchor's host property isn't correctly set when s.url is relative
9543				urlAnchor.href = urlAnchor.href;
9544				s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==
9545					urlAnchor.protocol + "//" + urlAnchor.host;
9546			} catch ( e ) {
9547
9548				// If there is an error parsing the URL, assume it is crossDomain,
9549				// it can be rejected by the transport if it is invalid
9550				s.crossDomain = true;
9551			}
9552		}
9553
9554		// Convert data if not already a string
9555		if ( s.data && s.processData && typeof s.data !== "string" ) {
9556			s.data = jQuery.param( s.data, s.traditional );
9557		}
9558
9559		// Apply prefilters
9560		inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
9561
9562		// If request was aborted inside a prefilter, stop there
9563		if ( completed ) {
9564			return jqXHR;
9565		}
9566
9567		// We can fire global events as of now if asked to
9568		// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
9569		fireGlobals = jQuery.event && s.global;
9570
9571		// Watch for a new set of requests
9572		if ( fireGlobals && jQuery.active++ === 0 ) {
9573			jQuery.event.trigger( "ajaxStart" );
9574		}
9575
9576		// Uppercase the type
9577		s.type = s.type.toUpperCase();
9578
9579		// Determine if request has content
9580		s.hasContent = !rnoContent.test( s.type );
9581
9582		// Save the URL in case we're toying with the If-Modified-Since
9583		// and/or If-None-Match header later on
9584		// Remove hash to simplify url manipulation
9585		cacheURL = s.url.replace( rhash, "" );
9586
9587		// More options handling for requests with no content
9588		if ( !s.hasContent ) {
9589
9590			// Remember the hash so we can put it back
9591			uncached = s.url.slice( cacheURL.length );
9592
9593			// If data is available and should be processed, append data to url
9594			if ( s.data && ( s.processData || typeof s.data === "string" ) ) {
9595				cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data;
9596
9597				// #9682: remove data so that it's not used in an eventual retry
9598				delete s.data;
9599			}
9600
9601			// Add or update anti-cache param if needed
9602			if ( s.cache === false ) {
9603				cacheURL = cacheURL.replace( rantiCache, "$1" );
9604				uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) +
9605					uncached;
9606			}
9607
9608			// Put hash and anti-cache on the URL that will be requested (gh-1732)
9609			s.url = cacheURL + uncached;
9610
9611		// Change '%20' to '+' if this is encoded form body content (gh-2658)
9612		} else if ( s.data && s.processData &&
9613			( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) {
9614			s.data = s.data.replace( r20, "+" );
9615		}
9616
9617		// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
9618		if ( s.ifModified ) {
9619			if ( jQuery.lastModified[ cacheURL ] ) {
9620				jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
9621			}
9622			if ( jQuery.etag[ cacheURL ] ) {
9623				jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
9624			}
9625		}
9626
9627		// Set the correct header, if data is being sent
9628		if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
9629			jqXHR.setRequestHeader( "Content-Type", s.contentType );
9630		}
9631
9632		// Set the Accepts header for the server, depending on the dataType
9633		jqXHR.setRequestHeader(
9634			"Accept",
9635			s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?
9636				s.accepts[ s.dataTypes[ 0 ] ] +
9637					( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
9638				s.accepts[ "*" ]
9639		);
9640
9641		// Check for headers option
9642		for ( i in s.headers ) {
9643			jqXHR.setRequestHeader( i, s.headers[ i ] );
9644		}
9645
9646		// Allow custom headers/mimetypes and early abort
9647		if ( s.beforeSend &&
9648			( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {
9649
9650			// Abort if not done already and return
9651			return jqXHR.abort();
9652		}
9653
9654		// Aborting is no longer a cancellation
9655		strAbort = "abort";
9656
9657		// Install callbacks on deferreds
9658		completeDeferred.add( s.complete );
9659		jqXHR.done( s.success );
9660		jqXHR.fail( s.error );
9661
9662		// Get transport
9663		transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
9664
9665		// If no transport, we auto-abort
9666		if ( !transport ) {
9667			done( -1, "No Transport" );
9668		} else {
9669			jqXHR.readyState = 1;
9670
9671			// Send global event
9672			if ( fireGlobals ) {
9673				globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
9674			}
9675
9676			// If request was aborted inside ajaxSend, stop there
9677			if ( completed ) {
9678				return jqXHR;
9679			}
9680
9681			// Timeout
9682			if ( s.async && s.timeout > 0 ) {
9683				timeoutTimer = window.setTimeout( function() {
9684					jqXHR.abort( "timeout" );
9685				}, s.timeout );
9686			}
9687
9688			try {
9689				completed = false;
9690				transport.send( requestHeaders, done );
9691			} catch ( e ) {
9692
9693				// Rethrow post-completion exceptions
9694				if ( completed ) {
9695					throw e;
9696				}
9697
9698				// Propagate others as results
9699				done( -1, e );
9700			}
9701		}
9702
9703		// Callback for when everything is done
9704		function done( status, nativeStatusText, responses, headers ) {
9705			var isSuccess, success, error, response, modified,
9706				statusText = nativeStatusText;
9707
9708			// Ignore repeat invocations
9709			if ( completed ) {
9710				return;
9711			}
9712
9713			completed = true;
9714
9715			// Clear timeout if it exists
9716			if ( timeoutTimer ) {
9717				window.clearTimeout( timeoutTimer );
9718			}
9719
9720			// Dereference transport for early garbage collection
9721			// (no matter how long the jqXHR object will be used)
9722			transport = undefined;
9723
9724			// Cache response headers
9725			responseHeadersString = headers || "";
9726
9727			// Set readyState
9728			jqXHR.readyState = status > 0 ? 4 : 0;
9729
9730			// Determine if successful
9731			isSuccess = status >= 200 && status < 300 || status === 304;
9732
9733			// Get response data
9734			if ( responses ) {
9735				response = ajaxHandleResponses( s, jqXHR, responses );
9736			}
9737
9738			// Use a noop converter for missing script but not if jsonp
9739			if ( !isSuccess &&
9740				jQuery.inArray( "script", s.dataTypes ) > -1 &&
9741				jQuery.inArray( "json", s.dataTypes ) < 0 ) {
9742				s.converters[ "text script" ] = function() {};
9743			}
9744
9745			// Convert no matter what (that way responseXXX fields are always set)
9746			response = ajaxConvert( s, response, jqXHR, isSuccess );
9747
9748			// If successful, handle type chaining
9749			if ( isSuccess ) {
9750
9751				// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
9752				if ( s.ifModified ) {
9753					modified = jqXHR.getResponseHeader( "Last-Modified" );
9754					if ( modified ) {
9755						jQuery.lastModified[ cacheURL ] = modified;
9756					}
9757					modified = jqXHR.getResponseHeader( "etag" );
9758					if ( modified ) {
9759						jQuery.etag[ cacheURL ] = modified;
9760					}
9761				}
9762
9763				// if no content
9764				if ( status === 204 || s.type === "HEAD" ) {
9765					statusText = "nocontent";
9766
9767				// if not modified
9768				} else if ( status === 304 ) {
9769					statusText = "notmodified";
9770
9771				// If we have data, let's convert it
9772				} else {
9773					statusText = response.state;
9774					success = response.data;
9775					error = response.error;
9776					isSuccess = !error;
9777				}
9778			} else {
9779
9780				// Extract error from statusText and normalize for non-aborts
9781				error = statusText;
9782				if ( status || !statusText ) {
9783					statusText = "error";
9784					if ( status < 0 ) {
9785						status = 0;
9786					}
9787				}
9788			}
9789
9790			// Set data for the fake xhr object
9791			jqXHR.status = status;
9792			jqXHR.statusText = ( nativeStatusText || statusText ) + "";
9793
9794			// Success/Error
9795			if ( isSuccess ) {
9796				deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
9797			} else {
9798				deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
9799			}
9800
9801			// Status-dependent callbacks
9802			jqXHR.statusCode( statusCode );
9803			statusCode = undefined;
9804
9805			if ( fireGlobals ) {
9806				globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
9807					[ jqXHR, s, isSuccess ? success : error ] );
9808			}
9809
9810			// Complete
9811			completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
9812
9813			if ( fireGlobals ) {
9814				globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
9815
9816				// Handle the global AJAX counter
9817				if ( !( --jQuery.active ) ) {
9818					jQuery.event.trigger( "ajaxStop" );
9819				}
9820			}
9821		}
9822
9823		return jqXHR;
9824	},
9825
9826	getJSON: function( url, data, callback ) {
9827		return jQuery.get( url, data, callback, "json" );
9828	},
9829
9830	getScript: function( url, callback ) {
9831		return jQuery.get( url, undefined, callback, "script" );
9832	}
9833} );
9834
9835jQuery.each( [ "get", "post" ], function( _i, method ) {
9836	jQuery[ method ] = function( url, data, callback, type ) {
9837
9838		// Shift arguments if data argument was omitted
9839		if ( isFunction( data ) ) {
9840			type = type || callback;
9841			callback = data;
9842			data = undefined;
9843		}
9844
9845		// The url can be an options object (which then must have .url)
9846		return jQuery.ajax( jQuery.extend( {
9847			url: url,
9848			type: method,
9849			dataType: type,
9850			data: data,
9851			success: callback
9852		}, jQuery.isPlainObject( url ) && url ) );
9853	};
9854} );
9855
9856jQuery.ajaxPrefilter( function( s ) {
9857	var i;
9858	for ( i in s.headers ) {
9859		if ( i.toLowerCase() === "content-type" ) {
9860			s.contentType = s.headers[ i ] || "";
9861		}
9862	}
9863} );
9864
9865
9866jQuery._evalUrl = function( url, options, doc ) {
9867	return jQuery.ajax( {
9868		url: url,
9869
9870		// Make this explicit, since user can override this through ajaxSetup (#11264)
9871		type: "GET",
9872		dataType: "script",
9873		cache: true,
9874		async: false,
9875		global: false,
9876
9877		// Only evaluate the response if it is successful (gh-4126)
9878		// dataFilter is not invoked for failure responses, so using it instead
9879		// of the default converter is kludgy but it works.
9880		converters: {
9881			"text script": function() {}
9882		},
9883		dataFilter: function( response ) {
9884			jQuery.globalEval( response, options, doc );
9885		}
9886	} );
9887};
9888
9889
9890jQuery.fn.extend( {
9891	wrapAll: function( html ) {
9892		var wrap;
9893
9894		if ( this[ 0 ] ) {
9895			if ( isFunction( html ) ) {
9896				html = html.call( this[ 0 ] );
9897			}
9898
9899			// The elements to wrap the target around
9900			wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
9901
9902			if ( this[ 0 ].parentNode ) {
9903				wrap.insertBefore( this[ 0 ] );
9904			}
9905
9906			wrap.map( function() {
9907				var elem = this;
9908
9909				while ( elem.firstElementChild ) {
9910					elem = elem.firstElementChild;
9911				}
9912
9913				return elem;
9914			} ).append( this );
9915		}
9916
9917		return this;
9918	},
9919
9920	wrapInner: function( html ) {
9921		if ( isFunction( html ) ) {
9922			return this.each( function( i ) {
9923				jQuery( this ).wrapInner( html.call( this, i ) );
9924			} );
9925		}
9926
9927		return this.each( function() {
9928			var self = jQuery( this ),
9929				contents = self.contents();
9930
9931			if ( contents.length ) {
9932				contents.wrapAll( html );
9933
9934			} else {
9935				self.append( html );
9936			}
9937		} );
9938	},
9939
9940	wrap: function( html ) {
9941		var htmlIsFunction = isFunction( html );
9942
9943		return this.each( function( i ) {
9944			jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );
9945		} );
9946	},
9947
9948	unwrap: function( selector ) {
9949		this.parent( selector ).not( "body" ).each( function() {
9950			jQuery( this ).replaceWith( this.childNodes );
9951		} );
9952		return this;
9953	}
9954} );
9955
9956
9957jQuery.expr.pseudos.hidden = function( elem ) {
9958	return !jQuery.expr.pseudos.visible( elem );
9959};
9960jQuery.expr.pseudos.visible = function( elem ) {
9961	return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );
9962};
9963
9964
9965
9966
9967jQuery.ajaxSettings.xhr = function() {
9968	try {
9969		return new window.XMLHttpRequest();
9970	} catch ( e ) {}
9971};
9972
9973var xhrSuccessStatus = {
9974
9975		// File protocol always yields status code 0, assume 200
9976		0: 200,
9977
9978		// Support: IE <=9 only
9979		// #1450: sometimes IE returns 1223 when it should be 204
9980		1223: 204
9981	},
9982	xhrSupported = jQuery.ajaxSettings.xhr();
9983
9984support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
9985support.ajax = xhrSupported = !!xhrSupported;
9986
9987jQuery.ajaxTransport( function( options ) {
9988	var callback, errorCallback;
9989
9990	// Cross domain only allowed if supported through XMLHttpRequest
9991	if ( support.cors || xhrSupported && !options.crossDomain ) {
9992		return {
9993			send: function( headers, complete ) {
9994				var i,
9995					xhr = options.xhr();
9996
9997				xhr.open(
9998					options.type,
9999					options.url,
10000					options.async,
10001					options.username,
10002					options.password
10003				);
10004
10005				// Apply custom fields if provided
10006				if ( options.xhrFields ) {
10007					for ( i in options.xhrFields ) {
10008						xhr[ i ] = options.xhrFields[ i ];
10009					}
10010				}
10011
10012				// Override mime type if needed
10013				if ( options.mimeType && xhr.overrideMimeType ) {
10014					xhr.overrideMimeType( options.mimeType );
10015				}
10016
10017				// X-Requested-With header
10018				// For cross-domain requests, seeing as conditions for a preflight are
10019				// akin to a jigsaw puzzle, we simply never set it to be sure.
10020				// (it can always be set on a per-request basis or even using ajaxSetup)
10021				// For same-domain requests, won't change header if already provided.
10022				if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) {
10023					headers[ "X-Requested-With" ] = "XMLHttpRequest";
10024				}
10025
10026				// Set headers
10027				for ( i in headers ) {
10028					xhr.setRequestHeader( i, headers[ i ] );
10029				}
10030
10031				// Callback
10032				callback = function( type ) {
10033					return function() {
10034						if ( callback ) {
10035							callback = errorCallback = xhr.onload =
10036								xhr.onerror = xhr.onabort = xhr.ontimeout =
10037									xhr.onreadystatechange = null;
10038
10039							if ( type === "abort" ) {
10040								xhr.abort();
10041							} else if ( type === "error" ) {
10042
10043								// Support: IE <=9 only
10044								// On a manual native abort, IE9 throws
10045								// errors on any property access that is not readyState
10046								if ( typeof xhr.status !== "number" ) {
10047									complete( 0, "error" );
10048								} else {
10049									complete(
10050
10051										// File: protocol always yields status 0; see #8605, #14207
10052										xhr.status,
10053										xhr.statusText
10054									);
10055								}
10056							} else {
10057								complete(
10058									xhrSuccessStatus[ xhr.status ] || xhr.status,
10059									xhr.statusText,
10060
10061									// Support: IE <=9 only
10062									// IE9 has no XHR2 but throws on binary (trac-11426)
10063									// For XHR2 non-text, let the caller handle it (gh-2498)
10064									( xhr.responseType || "text" ) !== "text"  ||
10065									typeof xhr.responseText !== "string" ?
10066										{ binary: xhr.response } :
10067										{ text: xhr.responseText },
10068									xhr.getAllResponseHeaders()
10069								);
10070							}
10071						}
10072					};
10073				};
10074
10075				// Listen to events
10076				xhr.onload = callback();
10077				errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" );
10078
10079				// Support: IE 9 only
10080				// Use onreadystatechange to replace onabort
10081				// to handle uncaught aborts
10082				if ( xhr.onabort !== undefined ) {
10083					xhr.onabort = errorCallback;
10084				} else {
10085					xhr.onreadystatechange = function() {
10086
10087						// Check readyState before timeout as it changes
10088						if ( xhr.readyState === 4 ) {
10089
10090							// Allow onerror to be called first,
10091							// but that will not handle a native abort
10092							// Also, save errorCallback to a variable
10093							// as xhr.onerror cannot be accessed
10094							window.setTimeout( function() {
10095								if ( callback ) {
10096									errorCallback();
10097								}
10098							} );
10099						}
10100					};
10101				}
10102
10103				// Create the abort callback
10104				callback = callback( "abort" );
10105
10106				try {
10107
10108					// Do send the request (this may raise an exception)
10109					xhr.send( options.hasContent && options.data || null );
10110				} catch ( e ) {
10111
10112					// #14683: Only rethrow if this hasn't been notified as an error yet
10113					if ( callback ) {
10114						throw e;
10115					}
10116				}
10117			},
10118
10119			abort: function() {
10120				if ( callback ) {
10121					callback();
10122				}
10123			}
10124		};
10125	}
10126} );
10127
10128
10129
10130
10131// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)
10132jQuery.ajaxPrefilter( function( s ) {
10133	if ( s.crossDomain ) {
10134		s.contents.script = false;
10135	}
10136} );
10137
10138// Install script dataType
10139jQuery.ajaxSetup( {
10140	accepts: {
10141		script: "text/javascript, application/javascript, " +
10142			"application/ecmascript, application/x-ecmascript"
10143	},
10144	contents: {
10145		script: /\b(?:java|ecma)script\b/
10146	},
10147	converters: {
10148		"text script": function( text ) {
10149			jQuery.globalEval( text );
10150			return text;
10151		}
10152	}
10153} );
10154
10155// Handle cache's special case and crossDomain
10156jQuery.ajaxPrefilter( "script", function( s ) {
10157	if ( s.cache === undefined ) {
10158		s.cache = false;
10159	}
10160	if ( s.crossDomain ) {
10161		s.type = "GET";
10162	}
10163} );
10164
10165// Bind script tag hack transport
10166jQuery.ajaxTransport( "script", function( s ) {
10167
10168	// This transport only deals with cross domain or forced-by-attrs requests
10169	if ( s.crossDomain || s.scriptAttrs ) {
10170		var script, callback;
10171		return {
10172			send: function( _, complete ) {
10173				script = jQuery( "<script>" )
10174					.attr( s.scriptAttrs || {} )
10175					.prop( { charset: s.scriptCharset, src: s.url } )
10176					.on( "load error", callback = function( evt ) {
10177						script.remove();
10178						callback = null;
10179						if ( evt ) {
10180							complete( evt.type === "error" ? 404 : 200, evt.type );
10181						}
10182					} );
10183
10184				// Use native DOM manipulation to avoid our domManip AJAX trickery
10185				document.head.appendChild( script[ 0 ] );
10186			},
10187			abort: function() {
10188				if ( callback ) {
10189					callback();
10190				}
10191			}
10192		};
10193	}
10194} );
10195
10196
10197
10198
10199var oldCallbacks = [],
10200	rjsonp = /(=)\?(?=&|$)|\?\?/;
10201
10202// Default jsonp settings
10203jQuery.ajaxSetup( {
10204	jsonp: "callback",
10205	jsonpCallback: function() {
10206		var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce.guid++ ) );
10207		this[ callback ] = true;
10208		return callback;
10209	}
10210} );
10211
10212// Detect, normalize options and install callbacks for jsonp requests
10213jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
10214
10215	var callbackName, overwritten, responseContainer,
10216		jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
10217			"url" :
10218			typeof s.data === "string" &&
10219				( s.contentType || "" )
10220					.indexOf( "application/x-www-form-urlencoded" ) === 0 &&
10221				rjsonp.test( s.data ) && "data"
10222		);
10223
10224	// Handle iff the expected data type is "jsonp" or we have a parameter to set
10225	if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
10226
10227		// Get callback name, remembering preexisting value associated with it
10228		callbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?
10229			s.jsonpCallback() :
10230			s.jsonpCallback;
10231
10232		// Insert callback into url or form data
10233		if ( jsonProp ) {
10234			s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
10235		} else if ( s.jsonp !== false ) {
10236			s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
10237		}
10238
10239		// Use data converter to retrieve json after script execution
10240		s.converters[ "script json" ] = function() {
10241			if ( !responseContainer ) {
10242				jQuery.error( callbackName + " was not called" );
10243			}
10244			return responseContainer[ 0 ];
10245		};
10246
10247		// Force json dataType
10248		s.dataTypes[ 0 ] = "json";
10249
10250		// Install callback
10251		overwritten = window[ callbackName ];
10252		window[ callbackName ] = function() {
10253			responseContainer = arguments;
10254		};
10255
10256		// Clean-up function (fires after converters)
10257		jqXHR.always( function() {
10258
10259			// If previous value didn't exist - remove it
10260			if ( overwritten === undefined ) {
10261				jQuery( window ).removeProp( callbackName );
10262
10263			// Otherwise restore preexisting value
10264			} else {
10265				window[ callbackName ] = overwritten;
10266			}
10267
10268			// Save back as free
10269			if ( s[ callbackName ] ) {
10270
10271				// Make sure that re-using the options doesn't screw things around
10272				s.jsonpCallback = originalSettings.jsonpCallback;
10273
10274				// Save the callback name for future use
10275				oldCallbacks.push( callbackName );
10276			}
10277
10278			// Call if it was a function and we have a response
10279			if ( responseContainer && isFunction( overwritten ) ) {
10280				overwritten( responseContainer[ 0 ] );
10281			}
10282
10283			responseContainer = overwritten = undefined;
10284		} );
10285
10286		// Delegate to script
10287		return "script";
10288	}
10289} );
10290
10291
10292
10293
10294// Support: Safari 8 only
10295// In Safari 8 documents created via document.implementation.createHTMLDocument
10296// collapse sibling forms: the second one becomes a child of the first one.
10297// Because of that, this security measure has to be disabled in Safari 8.
10298// https://bugs.webkit.org/show_bug.cgi?id=137337
10299support.createHTMLDocument = ( function() {
10300	var body = document.implementation.createHTMLDocument( "" ).body;
10301	body.innerHTML = "<form></form><form></form>";
10302	return body.childNodes.length === 2;
10303} )();
10304
10305
10306// Argument "data" should be string of html
10307// context (optional): If specified, the fragment will be created in this context,
10308// defaults to document
10309// keepScripts (optional): If true, will include scripts passed in the html string
10310jQuery.parseHTML = function( data, context, keepScripts ) {
10311	if ( typeof data !== "string" ) {
10312		return [];
10313	}
10314	if ( typeof context === "boolean" ) {
10315		keepScripts = context;
10316		context = false;
10317	}
10318
10319	var base, parsed, scripts;
10320
10321	if ( !context ) {
10322
10323		// Stop scripts or inline event handlers from being executed immediately
10324		// by using document.implementation
10325		if ( support.createHTMLDocument ) {
10326			context = document.implementation.createHTMLDocument( "" );
10327
10328			// Set the base href for the created document
10329			// so any parsed elements with URLs
10330			// are based on the document's URL (gh-2965)
10331			base = context.createElement( "base" );
10332			base.href = document.location.href;
10333			context.head.appendChild( base );
10334		} else {
10335			context = document;
10336		}
10337	}
10338
10339	parsed = rsingleTag.exec( data );
10340	scripts = !keepScripts && [];
10341
10342	// Single tag
10343	if ( parsed ) {
10344		return [ context.createElement( parsed[ 1 ] ) ];
10345	}
10346
10347	parsed = buildFragment( [ data ], context, scripts );
10348
10349	if ( scripts && scripts.length ) {
10350		jQuery( scripts ).remove();
10351	}
10352
10353	return jQuery.merge( [], parsed.childNodes );
10354};
10355
10356
10357/**
10358 * Load a url into a page
10359 */
10360jQuery.fn.load = function( url, params, callback ) {
10361	var selector, type, response,
10362		self = this,
10363		off = url.indexOf( " " );
10364
10365	if ( off > -1 ) {
10366		selector = stripAndCollapse( url.slice( off ) );
10367		url = url.slice( 0, off );
10368	}
10369
10370	// If it's a function
10371	if ( isFunction( params ) ) {
10372
10373		// We assume that it's the callback
10374		callback = params;
10375		params = undefined;
10376
10377	// Otherwise, build a param string
10378	} else if ( params && typeof params === "object" ) {
10379		type = "POST";
10380	}
10381
10382	// If we have elements to modify, make the request
10383	if ( self.length > 0 ) {
10384		jQuery.ajax( {
10385			url: url,
10386
10387			// If "type" variable is undefined, then "GET" method will be used.
10388			// Make value of this field explicit since
10389			// user can override it through ajaxSetup method
10390			type: type || "GET",
10391			dataType: "html",
10392			data: params
10393		} ).done( function( responseText ) {
10394
10395			// Save response for use in complete callback
10396			response = arguments;
10397
10398			self.html( selector ?
10399
10400				// If a selector was specified, locate the right elements in a dummy div
10401				// Exclude scripts to avoid IE 'Permission Denied' errors
10402				jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :
10403
10404				// Otherwise use the full result
10405				responseText );
10406
10407		// If the request succeeds, this function gets "data", "status", "jqXHR"
10408		// but they are ignored because response was set above.
10409		// If it fails, this function gets "jqXHR", "status", "error"
10410		} ).always( callback && function( jqXHR, status ) {
10411			self.each( function() {
10412				callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );
10413			} );
10414		} );
10415	}
10416
10417	return this;
10418};
10419
10420
10421
10422
10423jQuery.expr.pseudos.animated = function( elem ) {
10424	return jQuery.grep( jQuery.timers, function( fn ) {
10425		return elem === fn.elem;
10426	} ).length;
10427};
10428
10429
10430
10431
10432jQuery.offset = {
10433	setOffset: function( elem, options, i ) {
10434		var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
10435			position = jQuery.css( elem, "position" ),
10436			curElem = jQuery( elem ),
10437			props = {};
10438
10439		// Set position first, in-case top/left are set even on static elem
10440		if ( position === "static" ) {
10441			elem.style.position = "relative";
10442		}
10443
10444		curOffset = curElem.offset();
10445		curCSSTop = jQuery.css( elem, "top" );
10446		curCSSLeft = jQuery.css( elem, "left" );
10447		calculatePosition = ( position === "absolute" || position === "fixed" ) &&
10448			( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1;
10449
10450		// Need to be able to calculate position if either
10451		// top or left is auto and position is either absolute or fixed
10452		if ( calculatePosition ) {
10453			curPosition = curElem.position();
10454			curTop = curPosition.top;
10455			curLeft = curPosition.left;
10456
10457		} else {
10458			curTop = parseFloat( curCSSTop ) || 0;
10459			curLeft = parseFloat( curCSSLeft ) || 0;
10460		}
10461
10462		if ( isFunction( options ) ) {
10463
10464			// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)
10465			options = options.call( elem, i, jQuery.extend( {}, curOffset ) );
10466		}
10467
10468		if ( options.top != null ) {
10469			props.top = ( options.top - curOffset.top ) + curTop;
10470		}
10471		if ( options.left != null ) {
10472			props.left = ( options.left - curOffset.left ) + curLeft;
10473		}
10474
10475		if ( "using" in options ) {
10476			options.using.call( elem, props );
10477
10478		} else {
10479			curElem.css( props );
10480		}
10481	}
10482};
10483
10484jQuery.fn.extend( {
10485
10486	// offset() relates an element's border box to the document origin
10487	offset: function( options ) {
10488
10489		// Preserve chaining for setter
10490		if ( arguments.length ) {
10491			return options === undefined ?
10492				this :
10493				this.each( function( i ) {
10494					jQuery.offset.setOffset( this, options, i );
10495				} );
10496		}
10497
10498		var rect, win,
10499			elem = this[ 0 ];
10500
10501		if ( !elem ) {
10502			return;
10503		}
10504
10505		// Return zeros for disconnected and hidden (display: none) elements (gh-2310)
10506		// Support: IE <=11 only
10507		// Running getBoundingClientRect on a
10508		// disconnected node in IE throws an error
10509		if ( !elem.getClientRects().length ) {
10510			return { top: 0, left: 0 };
10511		}
10512
10513		// Get document-relative position by adding viewport scroll to viewport-relative gBCR
10514		rect = elem.getBoundingClientRect();
10515		win = elem.ownerDocument.defaultView;
10516		return {
10517			top: rect.top + win.pageYOffset,
10518			left: rect.left + win.pageXOffset
10519		};
10520	},
10521
10522	// position() relates an element's margin box to its offset parent's padding box
10523	// This corresponds to the behavior of CSS absolute positioning
10524	position: function() {
10525		if ( !this[ 0 ] ) {
10526			return;
10527		}
10528
10529		var offsetParent, offset, doc,
10530			elem = this[ 0 ],
10531			parentOffset = { top: 0, left: 0 };
10532
10533		// position:fixed elements are offset from the viewport, which itself always has zero offset
10534		if ( jQuery.css( elem, "position" ) === "fixed" ) {
10535
10536			// Assume position:fixed implies availability of getBoundingClientRect
10537			offset = elem.getBoundingClientRect();
10538
10539		} else {
10540			offset = this.offset();
10541
10542			// Account for the *real* offset parent, which can be the document or its root element
10543			// when a statically positioned element is identified
10544			doc = elem.ownerDocument;
10545			offsetParent = elem.offsetParent || doc.documentElement;
10546			while ( offsetParent &&
10547				( offsetParent === doc.body || offsetParent === doc.documentElement ) &&
10548				jQuery.css( offsetParent, "position" ) === "static" ) {
10549
10550				offsetParent = offsetParent.parentNode;
10551			}
10552			if ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {
10553
10554				// Incorporate borders into its offset, since they are outside its content origin
10555				parentOffset = jQuery( offsetParent ).offset();
10556				parentOffset.top += jQuery.css( offsetParent, "borderTopWidth", true );
10557				parentOffset.left += jQuery.css( offsetParent, "borderLeftWidth", true );
10558			}
10559		}
10560
10561		// Subtract parent offsets and element margins
10562		return {
10563			top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
10564			left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
10565		};
10566	},
10567
10568	// This method will return documentElement in the following cases:
10569	// 1) For the element inside the iframe without offsetParent, this method will return
10570	//    documentElement of the parent window
10571	// 2) For the hidden or detached element
10572	// 3) For body or html element, i.e. in case of the html node - it will return itself
10573	//
10574	// but those exceptions were never presented as a real life use-cases
10575	// and might be considered as more preferable results.
10576	//
10577	// This logic, however, is not guaranteed and can change at any point in the future
10578	offsetParent: function() {
10579		return this.map( function() {
10580			var offsetParent = this.offsetParent;
10581
10582			while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) {
10583				offsetParent = offsetParent.offsetParent;
10584			}
10585
10586			return offsetParent || documentElement;
10587		} );
10588	}
10589} );
10590
10591// Create scrollLeft and scrollTop methods
10592jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
10593	var top = "pageYOffset" === prop;
10594
10595	jQuery.fn[ method ] = function( val ) {
10596		return access( this, function( elem, method, val ) {
10597
10598			// Coalesce documents and windows
10599			var win;
10600			if ( isWindow( elem ) ) {
10601				win = elem;
10602			} else if ( elem.nodeType === 9 ) {
10603				win = elem.defaultView;
10604			}
10605
10606			if ( val === undefined ) {
10607				return win ? win[ prop ] : elem[ method ];
10608			}
10609
10610			if ( win ) {
10611				win.scrollTo(
10612					!top ? val : win.pageXOffset,
10613					top ? val : win.pageYOffset
10614				);
10615
10616			} else {
10617				elem[ method ] = val;
10618			}
10619		}, method, val, arguments.length );
10620	};
10621} );
10622
10623// Support: Safari <=7 - 9.1, Chrome <=37 - 49
10624// Add the top/left cssHooks using jQuery.fn.position
10625// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
10626// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347
10627// getComputedStyle returns percent when specified for top/left/bottom/right;
10628// rather than make the css module depend on the offset module, just check for it here
10629jQuery.each( [ "top", "left" ], function( _i, prop ) {
10630	jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
10631		function( elem, computed ) {
10632			if ( computed ) {
10633				computed = curCSS( elem, prop );
10634
10635				// If curCSS returns percentage, fallback to offset
10636				return rnumnonpx.test( computed ) ?
10637					jQuery( elem ).position()[ prop ] + "px" :
10638					computed;
10639			}
10640		}
10641	);
10642} );
10643
10644
10645// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
10646jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
10647	jQuery.each( {
10648		padding: "inner" + name,
10649		content: type,
10650		"": "outer" + name
10651	}, function( defaultExtra, funcName ) {
10652
10653		// Margin is only for outerHeight, outerWidth
10654		jQuery.fn[ funcName ] = function( margin, value ) {
10655			var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
10656				extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
10657
10658			return access( this, function( elem, type, value ) {
10659				var doc;
10660
10661				if ( isWindow( elem ) ) {
10662
10663					// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)
10664					return funcName.indexOf( "outer" ) === 0 ?
10665						elem[ "inner" + name ] :
10666						elem.document.documentElement[ "client" + name ];
10667				}
10668
10669				// Get document width or height
10670				if ( elem.nodeType === 9 ) {
10671					doc = elem.documentElement;
10672
10673					// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
10674					// whichever is greatest
10675					return Math.max(
10676						elem.body[ "scroll" + name ], doc[ "scroll" + name ],
10677						elem.body[ "offset" + name ], doc[ "offset" + name ],
10678						doc[ "client" + name ]
10679					);
10680				}
10681
10682				return value === undefined ?
10683
10684					// Get width or height on the element, requesting but not forcing parseFloat
10685					jQuery.css( elem, type, extra ) :
10686
10687					// Set width or height on the element
10688					jQuery.style( elem, type, value, extra );
10689			}, type, chainable ? margin : undefined, chainable );
10690		};
10691	} );
10692} );
10693
10694
10695jQuery.each( [
10696	"ajaxStart",
10697	"ajaxStop",
10698	"ajaxComplete",
10699	"ajaxError",
10700	"ajaxSuccess",
10701	"ajaxSend"
10702], function( _i, type ) {
10703	jQuery.fn[ type ] = function( fn ) {
10704		return this.on( type, fn );
10705	};
10706} );
10707
10708
10709
10710
10711jQuery.fn.extend( {
10712
10713	bind: function( types, data, fn ) {
10714		return this.on( types, null, data, fn );
10715	},
10716	unbind: function( types, fn ) {
10717		return this.off( types, null, fn );
10718	},
10719
10720	delegate: function( selector, types, data, fn ) {
10721		return this.on( types, selector, data, fn );
10722	},
10723	undelegate: function( selector, types, fn ) {
10724
10725		// ( namespace ) or ( selector, types [, fn] )
10726		return arguments.length === 1 ?
10727			this.off( selector, "**" ) :
10728			this.off( types, selector || "**", fn );
10729	},
10730
10731	hover: function( fnOver, fnOut ) {
10732		return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
10733	}
10734} );
10735
10736jQuery.each(
10737	( "blur focus focusin focusout resize scroll click dblclick " +
10738	"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
10739	"change select submit keydown keypress keyup contextmenu" ).split( " " ),
10740	function( _i, name ) {
10741
10742		// Handle event binding
10743		jQuery.fn[ name ] = function( data, fn ) {
10744			return arguments.length > 0 ?
10745				this.on( name, null, data, fn ) :
10746				this.trigger( name );
10747		};
10748	}
10749);
10750
10751
10752
10753
10754// Support: Android <=4.0 only
10755// Make sure we trim BOM and NBSP
10756var rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
10757
10758// Bind a function to a context, optionally partially applying any
10759// arguments.
10760// jQuery.proxy is deprecated to promote standards (specifically Function#bind)
10761// However, it is not slated for removal any time soon
10762jQuery.proxy = function( fn, context ) {
10763	var tmp, args, proxy;
10764
10765	if ( typeof context === "string" ) {
10766		tmp = fn[ context ];
10767		context = fn;
10768		fn = tmp;
10769	}
10770
10771	// Quick check to determine if target is callable, in the spec
10772	// this throws a TypeError, but we will just return undefined.
10773	if ( !isFunction( fn ) ) {
10774		return undefined;
10775	}
10776
10777	// Simulated bind
10778	args = slice.call( arguments, 2 );
10779	proxy = function() {
10780		return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
10781	};
10782
10783	// Set the guid of unique handler to the same of original handler, so it can be removed
10784	proxy.guid = fn.guid = fn.guid || jQuery.guid++;
10785
10786	return proxy;
10787};
10788
10789jQuery.holdReady = function( hold ) {
10790	if ( hold ) {
10791		jQuery.readyWait++;
10792	} else {
10793		jQuery.ready( true );
10794	}
10795};
10796jQuery.isArray = Array.isArray;
10797jQuery.parseJSON = JSON.parse;
10798jQuery.nodeName = nodeName;
10799jQuery.isFunction = isFunction;
10800jQuery.isWindow = isWindow;
10801jQuery.camelCase = camelCase;
10802jQuery.type = toType;
10803
10804jQuery.now = Date.now;
10805
10806jQuery.isNumeric = function( obj ) {
10807
10808	// As of jQuery 3.0, isNumeric is limited to
10809	// strings and numbers (primitives or objects)
10810	// that can be coerced to finite numbers (gh-2662)
10811	var type = jQuery.type( obj );
10812	return ( type === "number" || type === "string" ) &&
10813
10814		// parseFloat NaNs numeric-cast false positives ("")
10815		// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
10816		// subtraction forces infinities to NaN
10817		!isNaN( obj - parseFloat( obj ) );
10818};
10819
10820jQuery.trim = function( text ) {
10821	return text == null ?
10822		"" :
10823		( text + "" ).replace( rtrim, "" );
10824};
10825
10826
10827
10828// Register as a named AMD module, since jQuery can be concatenated with other
10829// files that may use define, but not via a proper concatenation script that
10830// understands anonymous AMD modules. A named AMD is safest and most robust
10831// way to register. Lowercase jquery is used because AMD module names are
10832// derived from file names, and jQuery is normally delivered in a lowercase
10833// file name. Do this after creating the global so that if an AMD module wants
10834// to call noConflict to hide this version of jQuery, it will work.
10835
10836// Note that for maximum portability, libraries that are not jQuery should
10837// declare themselves as anonymous modules, and avoid setting a global if an
10838// AMD loader is present. jQuery is a special case. For more information, see
10839// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
10840
10841if ( typeof define === "function" && define.amd ) {
10842	define( "jquery", [], function() {
10843		return jQuery;
10844	} );
10845}
10846
10847
10848
10849
10850var
10851
10852	// Map over jQuery in case of overwrite
10853	_jQuery = window.jQuery,
10854
10855	// Map over the $ in case of overwrite
10856	_$ = window.$;
10857
10858jQuery.noConflict = function( deep ) {
10859	if ( window.$ === jQuery ) {
10860		window.$ = _$;
10861	}
10862
10863	if ( deep && window.jQuery === jQuery ) {
10864		window.jQuery = _jQuery;
10865	}
10866
10867	return jQuery;
10868};
10869
10870// Expose jQuery and $ identifiers, even in AMD
10871// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
10872// and CommonJS for browser emulators (#13566)
10873if ( typeof noGlobal === "undefined" ) {
10874	window.jQuery = window.$ = jQuery;
10875}
10876
10877
10878
10879
10880return jQuery;
10881} );
10882
10883/**
10884 * @popperjs/core v2.10.1 - MIT License
10885 */
10886
10887(function (global, factory) {
10888  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
10889  typeof define === 'function' && define.amd ? define(['exports'], factory) :
10890  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Popper = {}));
10891}(this, (function (exports) { 'use strict';
10892
10893  function getWindow(node) {
10894    if (node == null) {
10895      return window;
10896    }
10897
10898    if (node.toString() !== '[object Window]') {
10899      var ownerDocument = node.ownerDocument;
10900      return ownerDocument ? ownerDocument.defaultView || window : window;
10901    }
10902
10903    return node;
10904  }
10905
10906  function isElement(node) {
10907    var OwnElement = getWindow(node).Element;
10908    return node instanceof OwnElement || node instanceof Element;
10909  }
10910
10911  function isHTMLElement(node) {
10912    var OwnElement = getWindow(node).HTMLElement;
10913    return node instanceof OwnElement || node instanceof HTMLElement;
10914  }
10915
10916  function isShadowRoot(node) {
10917    // IE 11 has no ShadowRoot
10918    if (typeof ShadowRoot === 'undefined') {
10919      return false;
10920    }
10921
10922    var OwnElement = getWindow(node).ShadowRoot;
10923    return node instanceof OwnElement || node instanceof ShadowRoot;
10924  }
10925
10926  var round$1 = Math.round;
10927  function getBoundingClientRect(element, includeScale) {
10928    if (includeScale === void 0) {
10929      includeScale = false;
10930    }
10931
10932    var rect = element.getBoundingClientRect();
10933    var scaleX = 1;
10934    var scaleY = 1;
10935
10936    if (isHTMLElement(element) && includeScale) {
10937      var offsetHeight = element.offsetHeight;
10938      var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
10939      // Fallback to 1 in case both values are `0`
10940
10941      if (offsetWidth > 0) {
10942        scaleX = rect.width / offsetWidth || 1;
10943      }
10944
10945      if (offsetHeight > 0) {
10946        scaleY = rect.height / offsetHeight || 1;
10947      }
10948    }
10949
10950    return {
10951      width: round$1(rect.width / scaleX),
10952      height: round$1(rect.height / scaleY),
10953      top: round$1(rect.top / scaleY),
10954      right: round$1(rect.right / scaleX),
10955      bottom: round$1(rect.bottom / scaleY),
10956      left: round$1(rect.left / scaleX),
10957      x: round$1(rect.left / scaleX),
10958      y: round$1(rect.top / scaleY)
10959    };
10960  }
10961
10962  function getWindowScroll(node) {
10963    var win = getWindow(node);
10964    var scrollLeft = win.pageXOffset;
10965    var scrollTop = win.pageYOffset;
10966    return {
10967      scrollLeft: scrollLeft,
10968      scrollTop: scrollTop
10969    };
10970  }
10971
10972  function getHTMLElementScroll(element) {
10973    return {
10974      scrollLeft: element.scrollLeft,
10975      scrollTop: element.scrollTop
10976    };
10977  }
10978
10979  function getNodeScroll(node) {
vendor: 5,565 bytes, lines 10980-11143
10980    if (node === getWindow(node) || !isHTMLElement(node)) {
10981      return getWindowScroll(node);
10982    } else {
10983      return getHTMLElementScroll(node);
10984    }
10985  }
10986
10987  function getNodeName(element) {
10988    return element ? (element.nodeName || '').toLowerCase() : null;
10989  }
10990
10991  function getDocumentElement(element) {
10992    // $FlowFixMe[incompatible-return]: assume body is always available
10993    return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]
10994    element.document) || window.document).documentElement;
10995  }
10996
10997  function getWindowScrollBarX(element) {
10998    // If <html> has a CSS width greater than the viewport, then this will be
10999    // incorrect for RTL.
11000    // Popper 1 is broken in this case and never had a bug report so let's assume
11001    // it's not an issue. I don't think anyone ever specifies width on <html>
11002    // anyway.
11003    // Browsers where the left scrollbar doesn't cause an issue report `0` for
11004    // this (e.g. Edge 2019, IE11, Safari)
11005    return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
11006  }
11007
11008  function getComputedStyle(element) {
11009    return getWindow(element).getComputedStyle(element);
11010  }
11011
11012  function isScrollParent(element) {
11013    // Firefox wants us to check `-x` and `-y` variations as well
11014    var _getComputedStyle = getComputedStyle(element),
11015        overflow = _getComputedStyle.overflow,
11016        overflowX = _getComputedStyle.overflowX,
11017        overflowY = _getComputedStyle.overflowY;
11018
11019    return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
11020  }
11021
11022  function isElementScaled(element) {
11023    var rect = element.getBoundingClientRect();
11024    var scaleX = rect.width / element.offsetWidth || 1;
11025    var scaleY = rect.height / element.offsetHeight || 1;
11026    return scaleX !== 1 || scaleY !== 1;
11027  } // Returns the composite rect of an element relative to its offsetParent.
11028  // Composite means it takes into account transforms as well as layout.
11029
11030
11031  function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
11032    if (isFixed === void 0) {
11033      isFixed = false;
11034    }
11035
11036    var isOffsetParentAnElement = isHTMLElement(offsetParent);
11037    var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
11038    var documentElement = getDocumentElement(offsetParent);
11039    var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
11040    var scroll = {
11041      scrollLeft: 0,
11042      scrollTop: 0
11043    };
11044    var offsets = {
11045      x: 0,
11046      y: 0
11047    };
11048
11049    if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
11050      if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078
11051      isScrollParent(documentElement)) {
11052        scroll = getNodeScroll(offsetParent);
11053      }
11054
11055      if (isHTMLElement(offsetParent)) {
11056        offsets = getBoundingClientRect(offsetParent, true);
11057        offsets.x += offsetParent.clientLeft;
11058        offsets.y += offsetParent.clientTop;
11059      } else if (documentElement) {
11060        offsets.x = getWindowScrollBarX(documentElement);
11061      }
11062    }
11063
11064    return {
11065      x: rect.left + scroll.scrollLeft - offsets.x,
11066      y: rect.top + scroll.scrollTop - offsets.y,
11067      width: rect.width,
11068      height: rect.height
11069    };
11070  }
11071
11072  // means it doesn't take into account transforms.
11073
11074  function getLayoutRect(element) {
11075    var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.
11076    // Fixes https://github.com/popperjs/popper-core/issues/1223
11077
11078    var width = element.offsetWidth;
11079    var height = element.offsetHeight;
11080
11081    if (Math.abs(clientRect.width - width) <= 1) {
11082      width = clientRect.width;
11083    }
11084
11085    if (Math.abs(clientRect.height - height) <= 1) {
11086      height = clientRect.height;
11087    }
11088
11089    return {
11090      x: element.offsetLeft,
11091      y: element.offsetTop,
11092      width: width,
11093      height: height
11094    };
11095  }
11096
11097  function getParentNode(element) {
11098    if (getNodeName(element) === 'html') {
11099      return element;
11100    }
11101
11102    return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle
11103      // $FlowFixMe[incompatible-return]
11104      // $FlowFixMe[prop-missing]
11105      element.assignedSlot || // step into the shadow DOM of the parent of a slotted node
11106      element.parentNode || ( // DOM Element detected
11107      isShadowRoot(element) ? element.host : null) || // ShadowRoot detected
11108      // $FlowFixMe[incompatible-call]: HTMLElement is a Node
11109      getDocumentElement(element) // fallback
11110
11111    );
11112  }
11113
11114  function getScrollParent(node) {
11115    if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {
11116      // $FlowFixMe[incompatible-return]: assume body is always available
11117      return node.ownerDocument.body;
11118    }
11119
11120    if (isHTMLElement(node) && isScrollParent(node)) {
11121      return node;
11122    }
11123
11124    return getScrollParent(getParentNode(node));
11125  }
11126
11127  /*
11128  given a DOM element, return the list of all scroll parents, up the list of ancesors
11129  until we get to the top window object. This list is what we attach scroll listeners
11130  to, because if any of these parent elements scroll, we'll need to re-calculate the
11131  reference element's position.
11132  */
11133
11134  function listScrollParents(element, list) {
11135    var _element$ownerDocumen;
11136
11137    if (list === void 0) {
11138      list = [];
11139    }
11140
11141    var scrollParent = getScrollParent(element);
11142    var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);
11143    var win = getWindow(scrollParent);
vendor: 4,110 bytes, lines 11144-11247
11144    var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;
11145    var updatedList = list.concat(target);
11146    return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
11147    updatedList.concat(listScrollParents(getParentNode(target)));
11148  }
11149
11150  function isTableElement(element) {
11151    return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;
11152  }
11153
11154  function getTrueOffsetParent(element) {
11155    if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837
11156    getComputedStyle(element).position === 'fixed') {
11157      return null;
11158    }
11159
11160    return element.offsetParent;
11161  } // `.offsetParent` reports `null` for fixed elements, while absolute elements
11162  // return the containing block
11163
11164
11165  function getContainingBlock(element) {
11166    var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;
11167    var isIE = navigator.userAgent.indexOf('Trident') !== -1;
11168
11169    if (isIE && isHTMLElement(element)) {
11170      // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport
11171      var elementCss = getComputedStyle(element);
11172
11173      if (elementCss.position === 'fixed') {
11174        return null;
11175      }
11176    }
11177
11178    var currentNode = getParentNode(element);
11179
11180    while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
11181      var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that
11182      // create a containing block.
11183      // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
11184
11185      if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {
11186        return currentNode;
11187      } else {
11188        currentNode = currentNode.parentNode;
11189      }
11190    }
11191
11192    return null;
11193  } // Gets the closest ancestor positioned element. Handles some edge cases,
11194  // such as table ancestors and cross browser bugs.
11195
11196
11197  function getOffsetParent(element) {
11198    var window = getWindow(element);
11199    var offsetParent = getTrueOffsetParent(element);
11200
11201    while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {
11202      offsetParent = getTrueOffsetParent(offsetParent);
11203    }
11204
11205    if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {
11206      return window;
11207    }
11208
11209    return offsetParent || getContainingBlock(element) || window;
11210  }
11211
11212  var top = 'top';
11213  var bottom = 'bottom';
11214  var right = 'right';
11215  var left = 'left';
11216  var auto = 'auto';
11217  var basePlacements = [top, bottom, right, left];
11218  var start = 'start';
11219  var end = 'end';
11220  var clippingParents = 'clippingParents';
11221  var viewport = 'viewport';
11222  var popper = 'popper';
11223  var reference = 'reference';
11224  var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {
11225    return acc.concat([placement + "-" + start, placement + "-" + end]);
11226  }, []);
11227  var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {
11228    return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
11229  }, []); // modifiers that need to read the DOM
11230
11231  var beforeRead = 'beforeRead';
11232  var read = 'read';
11233  var afterRead = 'afterRead'; // pure-logic modifiers
11234
11235  var beforeMain = 'beforeMain';
11236  var main = 'main';
11237  var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)
11238
11239  var beforeWrite = 'beforeWrite';
11240  var write = 'write';
11241  var afterWrite = 'afterWrite';
11242  var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
11243
11244  function order(modifiers) {
11245    var map = new Map();
11246    var visited = new Set();
11247    var result = [];
vendor: 6,465 bytes, lines 11248-11436
11248    modifiers.forEach(function (modifier) {
11249      map.set(modifier.name, modifier);
11250    }); // On visiting object, check for its dependencies and visit them recursively
11251
11252    function sort(modifier) {
11253      visited.add(modifier.name);
11254      var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);
11255      requires.forEach(function (dep) {
11256        if (!visited.has(dep)) {
11257          var depModifier = map.get(dep);
11258
11259          if (depModifier) {
11260            sort(depModifier);
11261          }
11262        }
11263      });
11264      result.push(modifier);
11265    }
11266
11267    modifiers.forEach(function (modifier) {
11268      if (!visited.has(modifier.name)) {
11269        // check for visited object
11270        sort(modifier);
11271      }
11272    });
11273    return result;
11274  }
11275
11276  function orderModifiers(modifiers) {
11277    // order based on dependencies
11278    var orderedModifiers = order(modifiers); // order based on phase
11279
11280    return modifierPhases.reduce(function (acc, phase) {
11281      return acc.concat(orderedModifiers.filter(function (modifier) {
11282        return modifier.phase === phase;
11283      }));
11284    }, []);
11285  }
11286
11287  function debounce(fn) {
11288    var pending;
11289    return function () {
11290      if (!pending) {
11291        pending = new Promise(function (resolve) {
11292          Promise.resolve().then(function () {
11293            pending = undefined;
11294            resolve(fn());
11295          });
11296        });
11297      }
11298
11299      return pending;
11300    };
11301  }
11302
11303  function format(str) {
11304    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
11305      args[_key - 1] = arguments[_key];
11306    }
11307
11308    return [].concat(args).reduce(function (p, c) {
11309      return p.replace(/%s/, c);
11310    }, str);
11311  }
11312
11313  var INVALID_MODIFIER_ERROR = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s';
11314  var MISSING_DEPENDENCY_ERROR = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available';
11315  var VALID_PROPERTIES = ['name', 'enabled', 'phase', 'fn', 'effect', 'requires', 'options'];
11316  function validateModifiers(modifiers) {
11317    modifiers.forEach(function (modifier) {
11318      [].concat(Object.keys(modifier), VALID_PROPERTIES) // IE11-compatible replacement for `new Set(iterable)`
11319      .filter(function (value, index, self) {
11320        return self.indexOf(value) === index;
11321      }).forEach(function (key) {
11322        switch (key) {
11323          case 'name':
11324            if (typeof modifier.name !== 'string') {
11325              console.error(format(INVALID_MODIFIER_ERROR, String(modifier.name), '"name"', '"string"', "\"" + String(modifier.name) + "\""));
11326            }
11327
11328            break;
11329
11330          case 'enabled':
11331            if (typeof modifier.enabled !== 'boolean') {
11332              console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"enabled"', '"boolean"', "\"" + String(modifier.enabled) + "\""));
11333            }
11334
11335            break;
11336
11337          case 'phase':
11338            if (modifierPhases.indexOf(modifier.phase) < 0) {
11339              console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"phase"', "either " + modifierPhases.join(', '), "\"" + String(modifier.phase) + "\""));
11340            }
11341
11342            break;
11343
11344          case 'fn':
11345            if (typeof modifier.fn !== 'function') {
11346              console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"fn"', '"function"', "\"" + String(modifier.fn) + "\""));
11347            }
11348
11349            break;
11350
11351          case 'effect':
11352            if (modifier.effect != null && typeof modifier.effect !== 'function') {
11353              console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"effect"', '"function"', "\"" + String(modifier.fn) + "\""));
11354            }
11355
11356            break;
11357
11358          case 'requires':
11359            if (modifier.requires != null && !Array.isArray(modifier.requires)) {
11360              console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requires"', '"array"', "\"" + String(modifier.requires) + "\""));
11361            }
11362
11363            break;
11364
11365          case 'requiresIfExists':
11366            if (!Array.isArray(modifier.requiresIfExists)) {
11367              console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requiresIfExists"', '"array"', "\"" + String(modifier.requiresIfExists) + "\""));
11368            }
11369
11370            break;
11371
11372          case 'options':
11373          case 'data':
11374            break;
11375
11376          default:
11377            console.error("PopperJS: an invalid property has been provided to the \"" + modifier.name + "\" modifier, valid properties are " + VALID_PROPERTIES.map(function (s) {
11378              return "\"" + s + "\"";
11379            }).join(', ') + "; but \"" + key + "\" was provided.");
11380        }
11381
11382        modifier.requires && modifier.requires.forEach(function (requirement) {
11383          if (modifiers.find(function (mod) {
11384            return mod.name === requirement;
11385          }) == null) {
11386            console.error(format(MISSING_DEPENDENCY_ERROR, String(modifier.name), requirement, requirement));
11387          }
11388        });
11389      });
11390    });
11391  }
11392
11393  function uniqueBy(arr, fn) {
11394    var identifiers = new Set();
11395    return arr.filter(function (item) {
11396      var identifier = fn(item);
11397
11398      if (!identifiers.has(identifier)) {
11399        identifiers.add(identifier);
11400        return true;
11401      }
11402    });
11403  }
11404
11405  function getBasePlacement(placement) {
11406    return placement.split('-')[0];
11407  }
11408
11409  function mergeByName(modifiers) {
11410    var merged = modifiers.reduce(function (merged, current) {
11411      var existing = merged[current.name];
11412      merged[current.name] = existing ? Object.assign({}, existing, current, {
11413        options: Object.assign({}, existing.options, current.options),
11414        data: Object.assign({}, existing.data, current.data)
11415      }) : current;
11416      return merged;
11417    }, {}); // IE11 does not support Object.values
11418
11419    return Object.keys(merged).map(function (key) {
11420      return merged[key];
11421    });
11422  }
11423
11424  function getViewportRect(element) {
11425    var win = getWindow(element);
11426    var html = getDocumentElement(element);
11427    var visualViewport = win.visualViewport;
11428    var width = html.clientWidth;
11429    var height = html.clientHeight;
11430    var x = 0;
11431    var y = 0; // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper
11432    // can be obscured underneath it.
11433    // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even
11434    // if it isn't open, so if this isn't available, the popper will be detected
11435    // to overflow the bottom of the screen too early.
11436
vendor: 4,389 bytes, lines 11437-11559
11437    if (visualViewport) {
11438      width = visualViewport.width;
11439      height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently)
11440      // In Chrome, it returns a value very close to 0 (+/-) but contains rounding
11441      // errors due to floating point numbers, so we need to check precision.
11442      // Safari returns a number <= 0, usually < -1 when pinch-zoomed
11443      // Feature detection fails in mobile emulation mode in Chrome.
11444      // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <
11445      // 0.001
11446      // Fallback here: "Not Safari" userAgent
11447
11448      if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {
11449        x = visualViewport.offsetLeft;
11450        y = visualViewport.offsetTop;
11451      }
11452    }
11453
11454    return {
11455      width: width,
11456      height: height,
11457      x: x + getWindowScrollBarX(element),
11458      y: y
11459    };
11460  }
11461
11462  var max = Math.max;
11463  var min = Math.min;
11464  var round = Math.round;
11465
11466  // of the `<html>` and `<body>` rect bounds if horizontally scrollable
11467
11468  function getDocumentRect(element) {
11469    var _element$ownerDocumen;
11470
11471    var html = getDocumentElement(element);
11472    var winScroll = getWindowScroll(element);
11473    var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
11474    var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
11475    var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
11476    var x = -winScroll.scrollLeft + getWindowScrollBarX(element);
11477    var y = -winScroll.scrollTop;
11478
11479    if (getComputedStyle(body || html).direction === 'rtl') {
11480      x += max(html.clientWidth, body ? body.clientWidth : 0) - width;
11481    }
11482
11483    return {
11484      width: width,
11485      height: height,
11486      x: x,
11487      y: y
11488    };
11489  }
11490
11491  function contains(parent, child) {
11492    var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method
11493
11494    if (parent.contains(child)) {
11495      return true;
11496    } // then fallback to custom implementation with Shadow DOM support
11497    else if (rootNode && isShadowRoot(rootNode)) {
11498        var next = child;
11499
11500        do {
11501          if (next && parent.isSameNode(next)) {
11502            return true;
11503          } // $FlowFixMe[prop-missing]: need a better way to handle this...
11504
11505
11506          next = next.parentNode || next.host;
11507        } while (next);
11508      } // Give up, the result is false
11509
11510
11511    return false;
11512  }
11513
11514  function rectToClientRect(rect) {
11515    return Object.assign({}, rect, {
11516      left: rect.x,
11517      top: rect.y,
11518      right: rect.x + rect.width,
11519      bottom: rect.y + rect.height
11520    });
11521  }
11522
11523  function getInnerBoundingClientRect(element) {
11524    var rect = getBoundingClientRect(element);
11525    rect.top = rect.top + element.clientTop;
11526    rect.left = rect.left + element.clientLeft;
11527    rect.bottom = rect.top + element.clientHeight;
11528    rect.right = rect.left + element.clientWidth;
11529    rect.width = element.clientWidth;
11530    rect.height = element.clientHeight;
11531    rect.x = rect.left;
11532    rect.y = rect.top;
11533    return rect;
11534  }
11535
11536  function getClientRectFromMixedType(element, clippingParent) {
11537    return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
11538  } // A "clipping parent" is an overflowable container with the characteristic of
11539  // clipping (or hiding) overflowing elements with a position different from
11540  // `initial`
11541
11542
11543  function getClippingParents(element) {
11544    var clippingParents = listScrollParents(getParentNode(element));
11545    var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;
11546    var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
11547
11548    if (!isElement(clipperElement)) {
11549      return [];
11550    } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414
11551
11552
11553    return clippingParents.filter(function (clippingParent) {
11554      return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';
11555    });
11556  } // Gets the maximum area that the element is visible in due to any number of
11557  // clipping parents
11558
11559
vendor: 4,117 bytes, lines 11560-11689
11560  function getClippingRect(element, boundary, rootBoundary) {
11561    var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);
11562    var clippingParents = [].concat(mainClippingParents, [rootBoundary]);
11563    var firstClippingParent = clippingParents[0];
11564    var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {
11565      var rect = getClientRectFromMixedType(element, clippingParent);
11566      accRect.top = max(rect.top, accRect.top);
11567      accRect.right = min(rect.right, accRect.right);
11568      accRect.bottom = min(rect.bottom, accRect.bottom);
11569      accRect.left = max(rect.left, accRect.left);
11570      return accRect;
11571    }, getClientRectFromMixedType(element, firstClippingParent));
11572    clippingRect.width = clippingRect.right - clippingRect.left;
11573    clippingRect.height = clippingRect.bottom - clippingRect.top;
11574    clippingRect.x = clippingRect.left;
11575    clippingRect.y = clippingRect.top;
11576    return clippingRect;
11577  }
11578
11579  function getVariation(placement) {
11580    return placement.split('-')[1];
11581  }
11582
11583  function getMainAxisFromPlacement(placement) {
11584    return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
11585  }
11586
11587  function computeOffsets(_ref) {
11588    var reference = _ref.reference,
11589        element = _ref.element,
11590        placement = _ref.placement;
11591    var basePlacement = placement ? getBasePlacement(placement) : null;
11592    var variation = placement ? getVariation(placement) : null;
11593    var commonX = reference.x + reference.width / 2 - element.width / 2;
11594    var commonY = reference.y + reference.height / 2 - element.height / 2;
11595    var offsets;
11596
11597    switch (basePlacement) {
11598      case top:
11599        offsets = {
11600          x: commonX,
11601          y: reference.y - element.height
11602        };
11603        break;
11604
11605      case bottom:
11606        offsets = {
11607          x: commonX,
11608          y: reference.y + reference.height
11609        };
11610        break;
11611
11612      case right:
11613        offsets = {
11614          x: reference.x + reference.width,
11615          y: commonY
11616        };
11617        break;
11618
11619      case left:
11620        offsets = {
11621          x: reference.x - element.width,
11622          y: commonY
11623        };
11624        break;
11625
11626      default:
11627        offsets = {
11628          x: reference.x,
11629          y: reference.y
11630        };
11631    }
11632
11633    var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;
11634
11635    if (mainAxis != null) {
11636      var len = mainAxis === 'y' ? 'height' : 'width';
11637
11638      switch (variation) {
11639        case start:
11640          offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);
11641          break;
11642
11643        case end:
11644          offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);
11645          break;
11646      }
11647    }
11648
11649    return offsets;
11650  }
11651
11652  function getFreshSideObject() {
11653    return {
11654      top: 0,
11655      right: 0,
11656      bottom: 0,
11657      left: 0
11658    };
11659  }
11660
11661  function mergePaddingObject(paddingObject) {
11662    return Object.assign({}, getFreshSideObject(), paddingObject);
11663  }
11664
11665  function expandToHashMap(value, keys) {
11666    return keys.reduce(function (hashMap, key) {
11667      hashMap[key] = value;
11668      return hashMap;
11669    }, {});
11670  }
11671
11672  function detectOverflow(state, options) {
11673    if (options === void 0) {
11674      options = {};
11675    }
11676
11677    var _options = options,
11678        _options$placement = _options.placement,
11679        placement = _options$placement === void 0 ? state.placement : _options$placement,
11680        _options$boundary = _options.boundary,
11681        boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,
11682        _options$rootBoundary = _options.rootBoundary,
11683        rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,
11684        _options$elementConte = _options.elementContext,
11685        elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,
11686        _options$altBoundary = _options.altBoundary,
11687        altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,
11688        _options$padding = _options.padding,
11689        padding = _options$padding === void 0 ? 0 : _options$padding;
vendor: 8,726 bytes, lines 11690-11883
11690    var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
11691    var altContext = elementContext === popper ? reference : popper;
11692    var popperRect = state.rects.popper;
11693    var element = state.elements[altBoundary ? altContext : elementContext];
11694    var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);
11695    var referenceClientRect = getBoundingClientRect(state.elements.reference);
11696    var popperOffsets = computeOffsets({
11697      reference: referenceClientRect,
11698      element: popperRect,
11699      strategy: 'absolute',
11700      placement: placement
11701    });
11702    var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));
11703    var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect
11704    // 0 or negative = within the clipping rect
11705
11706    var overflowOffsets = {
11707      top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
11708      bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
11709      left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
11710      right: elementClientRect.right - clippingClientRect.right + paddingObject.right
11711    };
11712    var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element
11713
11714    if (elementContext === popper && offsetData) {
11715      var offset = offsetData[placement];
11716      Object.keys(overflowOffsets).forEach(function (key) {
11717        var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;
11718        var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';
11719        overflowOffsets[key] += offset[axis] * multiply;
11720      });
11721    }
11722
11723    return overflowOffsets;
11724  }
11725
11726  var INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';
11727  var INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';
11728  var DEFAULT_OPTIONS = {
11729    placement: 'bottom',
11730    modifiers: [],
11731    strategy: 'absolute'
11732  };
11733
11734  function areValidElements() {
11735    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
11736      args[_key] = arguments[_key];
11737    }
11738
11739    return !args.some(function (element) {
11740      return !(element && typeof element.getBoundingClientRect === 'function');
11741    });
11742  }
11743
11744  function popperGenerator(generatorOptions) {
11745    if (generatorOptions === void 0) {
11746      generatorOptions = {};
11747    }
11748
11749    var _generatorOptions = generatorOptions,
11750        _generatorOptions$def = _generatorOptions.defaultModifiers,
11751        defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,
11752        _generatorOptions$def2 = _generatorOptions.defaultOptions,
11753        defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;
11754    return function createPopper(reference, popper, options) {
11755      if (options === void 0) {
11756        options = defaultOptions;
11757      }
11758
11759      var state = {
11760        placement: 'bottom',
11761        orderedModifiers: [],
11762        options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),
11763        modifiersData: {},
11764        elements: {
11765          reference: reference,
11766          popper: popper
11767        },
11768        attributes: {},
11769        styles: {}
11770      };
11771      var effectCleanupFns = [];
11772      var isDestroyed = false;
11773      var instance = {
11774        state: state,
11775        setOptions: function setOptions(setOptionsAction) {
11776          var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;
11777          cleanupModifierEffects();
11778          state.options = Object.assign({}, defaultOptions, state.options, options);
11779          state.scrollParents = {
11780            reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
11781            popper: listScrollParents(popper)
11782          }; // Orders the modifiers based on their dependencies and `phase`
11783          // properties
11784
11785          var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers
11786
11787          state.orderedModifiers = orderedModifiers.filter(function (m) {
11788            return m.enabled;
11789          }); // Validate the provided modifiers so that the consumer will get warned
11790          // if one of the modifiers is invalid for any reason
11791
11792          {
11793            var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {
11794              var name = _ref.name;
11795              return name;
11796            });
11797            validateModifiers(modifiers);
11798
11799            if (getBasePlacement(state.options.placement) === auto) {
11800              var flipModifier = state.orderedModifiers.find(function (_ref2) {
11801                var name = _ref2.name;
11802                return name === 'flip';
11803              });
11804
11805              if (!flipModifier) {
11806                console.error(['Popper: "auto" placements require the "flip" modifier be', 'present and enabled to work.'].join(' '));
11807              }
11808            }
11809
11810            var _getComputedStyle = getComputedStyle(popper),
11811                marginTop = _getComputedStyle.marginTop,
11812                marginRight = _getComputedStyle.marginRight,
11813                marginBottom = _getComputedStyle.marginBottom,
11814                marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can
11815            // cause bugs with positioning, so we'll warn the consumer
11816
11817
11818            if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {
11819              return parseFloat(margin);
11820            })) {
11821              console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));
11822            }
11823          }
11824
11825          runModifierEffects();
11826          return instance.update();
11827        },
11828        // Sync update – it will always be executed, even if not necessary. This
11829        // is useful for low frequency updates where sync behavior simplifies the
11830        // logic.
11831        // For high frequency updates (e.g. `resize` and `scroll` events), always
11832        // prefer the async Popper#update method
11833        forceUpdate: function forceUpdate() {
11834          if (isDestroyed) {
11835            return;
11836          }
11837
11838          var _state$elements = state.elements,
11839              reference = _state$elements.reference,
11840              popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements
11841          // anymore
11842
11843          if (!areValidElements(reference, popper)) {
11844            {
11845              console.error(INVALID_ELEMENT_ERROR);
11846            }
11847
11848            return;
11849          } // Store the reference and popper rects to be read by modifiers
11850
11851
11852          state.rects = {
11853            reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),
11854            popper: getLayoutRect(popper)
11855          }; // Modifiers have the ability to reset the current update cycle. The
11856          // most common use case for this is the `flip` modifier changing the
11857          // placement, which then needs to re-run all the modifiers, because the
11858          // logic was previously ran for the previous placement and is therefore
11859          // stale/incorrect
11860
11861          state.reset = false;
11862          state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier
11863          // is filled with the initial data specified by the modifier. This means
11864          // it doesn't persist and is fresh on each update.
11865          // To ensure persistent data, use `${name}#persistent`
11866
11867          state.orderedModifiers.forEach(function (modifier) {
11868            return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
11869          });
11870          var __debug_loops__ = 0;
11871
11872          for (var index = 0; index < state.orderedModifiers.length; index++) {
11873            {
11874              __debug_loops__ += 1;
11875
11876              if (__debug_loops__ > 100) {
11877                console.error(INFINITE_LOOP_ERROR);
11878                break;
11879              }
11880            }
11881
11882            if (state.reset === true) {
11883              state.reset = false;
vendor: 6,132 bytes, lines 11884-12088
11884              index = -1;
11885              continue;
11886            }
11887
11888            var _state$orderedModifie = state.orderedModifiers[index],
11889                fn = _state$orderedModifie.fn,
11890                _state$orderedModifie2 = _state$orderedModifie.options,
11891                _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,
11892                name = _state$orderedModifie.name;
11893
11894            if (typeof fn === 'function') {
11895              state = fn({
11896                state: state,
11897                options: _options,
11898                name: name,
11899                instance: instance
11900              }) || state;
11901            }
11902          }
11903        },
11904        // Async and optimistically optimized update – it will not be executed if
11905        // not necessary (debounced to run at most once-per-tick)
11906        update: debounce(function () {
11907          return new Promise(function (resolve) {
11908            instance.forceUpdate();
11909            resolve(state);
11910          });
11911        }),
11912        destroy: function destroy() {
11913          cleanupModifierEffects();
11914          isDestroyed = true;
11915        }
11916      };
11917
11918      if (!areValidElements(reference, popper)) {
11919        {
11920          console.error(INVALID_ELEMENT_ERROR);
11921        }
11922
11923        return instance;
11924      }
11925
11926      instance.setOptions(options).then(function (state) {
11927        if (!isDestroyed && options.onFirstUpdate) {
11928          options.onFirstUpdate(state);
11929        }
11930      }); // Modifiers have the ability to execute arbitrary code before the first
11931      // update cycle runs. They will be executed in the same order as the update
11932      // cycle. This is useful when a modifier adds some persistent data that
11933      // other modifiers need to use, but the modifier is run after the dependent
11934      // one.
11935
11936      function runModifierEffects() {
11937        state.orderedModifiers.forEach(function (_ref3) {
11938          var name = _ref3.name,
11939              _ref3$options = _ref3.options,
11940              options = _ref3$options === void 0 ? {} : _ref3$options,
11941              effect = _ref3.effect;
11942
11943          if (typeof effect === 'function') {
11944            var cleanupFn = effect({
11945              state: state,
11946              name: name,
11947              instance: instance,
11948              options: options
11949            });
11950
11951            var noopFn = function noopFn() {};
11952
11953            effectCleanupFns.push(cleanupFn || noopFn);
11954          }
11955        });
11956      }
11957
11958      function cleanupModifierEffects() {
11959        effectCleanupFns.forEach(function (fn) {
11960          return fn();
11961        });
11962        effectCleanupFns = [];
11963      }
11964
11965      return instance;
11966    };
11967  }
11968
11969  var passive = {
11970    passive: true
11971  };
11972
11973  function effect$2(_ref) {
11974    var state = _ref.state,
11975        instance = _ref.instance,
11976        options = _ref.options;
11977    var _options$scroll = options.scroll,
11978        scroll = _options$scroll === void 0 ? true : _options$scroll,
11979        _options$resize = options.resize,
11980        resize = _options$resize === void 0 ? true : _options$resize;
11981    var window = getWindow(state.elements.popper);
11982    var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);
11983
11984    if (scroll) {
11985      scrollParents.forEach(function (scrollParent) {
11986        scrollParent.addEventListener('scroll', instance.update, passive);
11987      });
11988    }
11989
11990    if (resize) {
11991      window.addEventListener('resize', instance.update, passive);
11992    }
11993
11994    return function () {
11995      if (scroll) {
11996        scrollParents.forEach(function (scrollParent) {
11997          scrollParent.removeEventListener('scroll', instance.update, passive);
11998        });
11999      }
12000
12001      if (resize) {
12002        window.removeEventListener('resize', instance.update, passive);
12003      }
12004    };
12005  } // eslint-disable-next-line import/no-unused-modules
12006
12007
12008  var eventListeners = {
12009    name: 'eventListeners',
12010    enabled: true,
12011    phase: 'write',
12012    fn: function fn() {},
12013    effect: effect$2,
12014    data: {}
12015  };
12016
12017  function popperOffsets(_ref) {
12018    var state = _ref.state,
12019        name = _ref.name;
12020    // Offsets are the actual position the popper needs to have to be
12021    // properly positioned near its reference element
12022    // This is the most basic placement, and will be adjusted by
12023    // the modifiers in the next step
12024    state.modifiersData[name] = computeOffsets({
12025      reference: state.rects.reference,
12026      element: state.rects.popper,
12027      strategy: 'absolute',
12028      placement: state.placement
12029    });
12030  } // eslint-disable-next-line import/no-unused-modules
12031
12032
12033  var popperOffsets$1 = {
12034    name: 'popperOffsets',
12035    enabled: true,
12036    phase: 'read',
12037    fn: popperOffsets,
12038    data: {}
12039  };
12040
12041  var unsetSides = {
12042    top: 'auto',
12043    right: 'auto',
12044    bottom: 'auto',
12045    left: 'auto'
12046  }; // Round the offsets to the nearest suitable subpixel based on the DPR.
12047  // Zooming can change the DPR, but it seems to report a value that will
12048  // cleanly divide the values into the appropriate subpixels.
12049
12050  function roundOffsetsByDPR(_ref) {
12051    var x = _ref.x,
12052        y = _ref.y;
12053    var win = window;
12054    var dpr = win.devicePixelRatio || 1;
12055    return {
12056      x: round(round(x * dpr) / dpr) || 0,
12057      y: round(round(y * dpr) / dpr) || 0
12058    };
12059  }
12060
12061  function mapToStyles(_ref2) {
12062    var _Object$assign2;
12063
12064    var popper = _ref2.popper,
12065        popperRect = _ref2.popperRect,
12066        placement = _ref2.placement,
12067        variation = _ref2.variation,
12068        offsets = _ref2.offsets,
12069        position = _ref2.position,
12070        gpuAcceleration = _ref2.gpuAcceleration,
12071        adaptive = _ref2.adaptive,
12072        roundOffsets = _ref2.roundOffsets;
12073
12074    var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets,
12075        _ref3$x = _ref3.x,
12076        x = _ref3$x === void 0 ? 0 : _ref3$x,
12077        _ref3$y = _ref3.y,
12078        y = _ref3$y === void 0 ? 0 : _ref3$y;
12079
12080    var hasX = offsets.hasOwnProperty('x');
12081    var hasY = offsets.hasOwnProperty('y');
12082    var sideX = left;
12083    var sideY = top;
12084    var win = window;
12085
12086    if (adaptive) {
12087      var offsetParent = getOffsetParent(popper);
12088      var heightProp = 'clientHeight';
vendor: 4,427 bytes, lines 12089-12194
12089      var widthProp = 'clientWidth';
12090
12091      if (offsetParent === getWindow(popper)) {
12092        offsetParent = getDocumentElement(popper);
12093
12094        if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {
12095          heightProp = 'scrollHeight';
12096          widthProp = 'scrollWidth';
12097        }
12098      } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it
12099
12100
12101      offsetParent = offsetParent;
12102
12103      if (placement === top || (placement === left || placement === right) && variation === end) {
12104        sideY = bottom; // $FlowFixMe[prop-missing]
12105
12106        y -= offsetParent[heightProp] - popperRect.height;
12107        y *= gpuAcceleration ? 1 : -1;
12108      }
12109
12110      if (placement === left || (placement === top || placement === bottom) && variation === end) {
12111        sideX = right; // $FlowFixMe[prop-missing]
12112
12113        x -= offsetParent[widthProp] - popperRect.width;
12114        x *= gpuAcceleration ? 1 : -1;
12115      }
12116    }
12117
12118    var commonStyles = Object.assign({
12119      position: position
12120    }, adaptive && unsetSides);
12121
12122    if (gpuAcceleration) {
12123      var _Object$assign;
12124
12125      return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
12126    }
12127
12128    return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
12129  }
12130
12131  function computeStyles(_ref4) {
12132    var state = _ref4.state,
12133        options = _ref4.options;
12134    var _options$gpuAccelerat = options.gpuAcceleration,
12135        gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
12136        _options$adaptive = options.adaptive,
12137        adaptive = _options$adaptive === void 0 ? true : _options$adaptive,
12138        _options$roundOffsets = options.roundOffsets,
12139        roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;
12140
12141    {
12142      var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || '';
12143
12144      if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {
12145        return transitionProperty.indexOf(property) >= 0;
12146      })) {
12147        console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: "transform", "top", "right", "bottom", "left".', '\n\n', 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\n\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));
12148      }
12149    }
12150
12151    var commonStyles = {
12152      placement: getBasePlacement(state.placement),
12153      variation: getVariation(state.placement),
12154      popper: state.elements.popper,
12155      popperRect: state.rects.popper,
12156      gpuAcceleration: gpuAcceleration
12157    };
12158
12159    if (state.modifiersData.popperOffsets != null) {
12160      state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {
12161        offsets: state.modifiersData.popperOffsets,
12162        position: state.options.strategy,
12163        adaptive: adaptive,
12164        roundOffsets: roundOffsets
12165      })));
12166    }
12167
12168    if (state.modifiersData.arrow != null) {
12169      state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {
12170        offsets: state.modifiersData.arrow,
12171        position: 'absolute',
12172        adaptive: false,
12173        roundOffsets: roundOffsets
12174      })));
12175    }
12176
12177    state.attributes.popper = Object.assign({}, state.attributes.popper, {
12178      'data-popper-placement': state.placement
12179    });
12180  } // eslint-disable-next-line import/no-unused-modules
12181
12182
12183  var computeStyles$1 = {
12184    name: 'computeStyles',
12185    enabled: true,
12186    phase: 'beforeWrite',
12187    fn: computeStyles,
12188    data: {}
12189  };
12190
12191  // and applies them to the HTMLElements such as popper and arrow
12192
12193  function applyStyles(_ref) {
12194    var state = _ref.state;
vendor: 8,677 bytes, lines 12195-12449
12195    Object.keys(state.elements).forEach(function (name) {
12196      var style = state.styles[name] || {};
12197      var attributes = state.attributes[name] || {};
12198      var element = state.elements[name]; // arrow is optional + virtual elements
12199
12200      if (!isHTMLElement(element) || !getNodeName(element)) {
12201        return;
12202      } // Flow doesn't support to extend this property, but it's the most
12203      // effective way to apply styles to an HTMLElement
12204      // $FlowFixMe[cannot-write]
12205
12206
12207      Object.assign(element.style, style);
12208      Object.keys(attributes).forEach(function (name) {
12209        var value = attributes[name];
12210
12211        if (value === false) {
12212          element.removeAttribute(name);
12213        } else {
12214          element.setAttribute(name, value === true ? '' : value);
12215        }
12216      });
12217    });
12218  }
12219
12220  function effect$1(_ref2) {
12221    var state = _ref2.state;
12222    var initialStyles = {
12223      popper: {
12224        position: state.options.strategy,
12225        left: '0',
12226        top: '0',
12227        margin: '0'
12228      },
12229      arrow: {
12230        position: 'absolute'
12231      },
12232      reference: {}
12233    };
12234    Object.assign(state.elements.popper.style, initialStyles.popper);
12235    state.styles = initialStyles;
12236
12237    if (state.elements.arrow) {
12238      Object.assign(state.elements.arrow.style, initialStyles.arrow);
12239    }
12240
12241    return function () {
12242      Object.keys(state.elements).forEach(function (name) {
12243        var element = state.elements[name];
12244        var attributes = state.attributes[name] || {};
12245        var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them
12246
12247        var style = styleProperties.reduce(function (style, property) {
12248          style[property] = '';
12249          return style;
12250        }, {}); // arrow is optional + virtual elements
12251
12252        if (!isHTMLElement(element) || !getNodeName(element)) {
12253          return;
12254        }
12255
12256        Object.assign(element.style, style);
12257        Object.keys(attributes).forEach(function (attribute) {
12258          element.removeAttribute(attribute);
12259        });
12260      });
12261    };
12262  } // eslint-disable-next-line import/no-unused-modules
12263
12264
12265  var applyStyles$1 = {
12266    name: 'applyStyles',
12267    enabled: true,
12268    phase: 'write',
12269    fn: applyStyles,
12270    effect: effect$1,
12271    requires: ['computeStyles']
12272  };
12273
12274  function distanceAndSkiddingToXY(placement, rects, offset) {
12275    var basePlacement = getBasePlacement(placement);
12276    var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;
12277
12278    var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {
12279      placement: placement
12280    })) : offset,
12281        skidding = _ref[0],
12282        distance = _ref[1];
12283
12284    skidding = skidding || 0;
12285    distance = (distance || 0) * invertDistance;
12286    return [left, right].indexOf(basePlacement) >= 0 ? {
12287      x: distance,
12288      y: skidding
12289    } : {
12290      x: skidding,
12291      y: distance
12292    };
12293  }
12294
12295  function offset(_ref2) {
12296    var state = _ref2.state,
12297        options = _ref2.options,
12298        name = _ref2.name;
12299    var _options$offset = options.offset,
12300        offset = _options$offset === void 0 ? [0, 0] : _options$offset;
12301    var data = placements.reduce(function (acc, placement) {
12302      acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);
12303      return acc;
12304    }, {});
12305    var _data$state$placement = data[state.placement],
12306        x = _data$state$placement.x,
12307        y = _data$state$placement.y;
12308
12309    if (state.modifiersData.popperOffsets != null) {
12310      state.modifiersData.popperOffsets.x += x;
12311      state.modifiersData.popperOffsets.y += y;
12312    }
12313
12314    state.modifiersData[name] = data;
12315  } // eslint-disable-next-line import/no-unused-modules
12316
12317
12318  var offset$1 = {
12319    name: 'offset',
12320    enabled: true,
12321    phase: 'main',
12322    requires: ['popperOffsets'],
12323    fn: offset
12324  };
12325
12326  var hash$1 = {
12327    left: 'right',
12328    right: 'left',
12329    bottom: 'top',
12330    top: 'bottom'
12331  };
12332  function getOppositePlacement(placement) {
12333    return placement.replace(/left|right|bottom|top/g, function (matched) {
12334      return hash$1[matched];
12335    });
12336  }
12337
12338  var hash = {
12339    start: 'end',
12340    end: 'start'
12341  };
12342  function getOppositeVariationPlacement(placement) {
12343    return placement.replace(/start|end/g, function (matched) {
12344      return hash[matched];
12345    });
12346  }
12347
12348  function computeAutoPlacement(state, options) {
12349    if (options === void 0) {
12350      options = {};
12351    }
12352
12353    var _options = options,
12354        placement = _options.placement,
12355        boundary = _options.boundary,
12356        rootBoundary = _options.rootBoundary,
12357        padding = _options.padding,
12358        flipVariations = _options.flipVariations,
12359        _options$allowedAutoP = _options.allowedAutoPlacements,
12360        allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP;
12361    var variation = getVariation(placement);
12362    var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {
12363      return getVariation(placement) === variation;
12364    }) : basePlacements;
12365    var allowedPlacements = placements$1.filter(function (placement) {
12366      return allowedAutoPlacements.indexOf(placement) >= 0;
12367    });
12368
12369    if (allowedPlacements.length === 0) {
12370      allowedPlacements = placements$1;
12371
12372      {
12373        console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(' '));
12374      }
12375    } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...
12376
12377
12378    var overflows = allowedPlacements.reduce(function (acc, placement) {
12379      acc[placement] = detectOverflow(state, {
12380        placement: placement,
12381        boundary: boundary,
12382        rootBoundary: rootBoundary,
12383        padding: padding
12384      })[getBasePlacement(placement)];
12385      return acc;
12386    }, {});
12387    return Object.keys(overflows).sort(function (a, b) {
12388      return overflows[a] - overflows[b];
12389    });
12390  }
12391
12392  function getExpandedFallbackPlacements(placement) {
12393    if (getBasePlacement(placement) === auto) {
12394      return [];
12395    }
12396
12397    var oppositePlacement = getOppositePlacement(placement);
12398    return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];
12399  }
12400
12401  function flip(_ref) {
12402    var state = _ref.state,
12403        options = _ref.options,
12404        name = _ref.name;
12405
12406    if (state.modifiersData[name]._skip) {
12407      return;
12408    }
12409
12410    var _options$mainAxis = options.mainAxis,
12411        checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
12412        _options$altAxis = options.altAxis,
12413        checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,
12414        specifiedFallbackPlacements = options.fallbackPlacements,
12415        padding = options.padding,
12416        boundary = options.boundary,
12417        rootBoundary = options.rootBoundary,
12418        altBoundary = options.altBoundary,
12419        _options$flipVariatio = options.flipVariations,
12420        flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,
12421        allowedAutoPlacements = options.allowedAutoPlacements;
12422    var preferredPlacement = state.options.placement;
12423    var basePlacement = getBasePlacement(preferredPlacement);
12424    var isBasePlacement = basePlacement === preferredPlacement;
12425    var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));
12426    var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {
12427      return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {
12428        placement: placement,
12429        boundary: boundary,
12430        rootBoundary: rootBoundary,
12431        padding: padding,
12432        flipVariations: flipVariations,
12433        allowedAutoPlacements: allowedAutoPlacements
12434      }) : placement);
12435    }, []);
12436    var referenceRect = state.rects.reference;
12437    var popperRect = state.rects.popper;
12438    var checksMap = new Map();
12439    var makeFallbackChecks = true;
12440    var firstFittingPlacement = placements[0];
12441
12442    for (var i = 0; i < placements.length; i++) {
12443      var placement = placements[i];
12444
12445      var _basePlacement = getBasePlacement(placement);
12446
12447      var isStartVariation = getVariation(placement) === start;
12448      var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;
12449      var len = isVertical ? 'width' : 'height';
vendor: 9,084 bytes, lines 12450-12688
12450      var overflow = detectOverflow(state, {
12451        placement: placement,
12452        boundary: boundary,
12453        rootBoundary: rootBoundary,
12454        altBoundary: altBoundary,
12455        padding: padding
12456      });
12457      var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;
12458
12459      if (referenceRect[len] > popperRect[len]) {
12460        mainVariationSide = getOppositePlacement(mainVariationSide);
12461      }
12462
12463      var altVariationSide = getOppositePlacement(mainVariationSide);
12464      var checks = [];
12465
12466      if (checkMainAxis) {
12467        checks.push(overflow[_basePlacement] <= 0);
12468      }
12469
12470      if (checkAltAxis) {
12471        checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);
12472      }
12473
12474      if (checks.every(function (check) {
12475        return check;
12476      })) {
12477        firstFittingPlacement = placement;
12478        makeFallbackChecks = false;
12479        break;
12480      }
12481
12482      checksMap.set(placement, checks);
12483    }
12484
12485    if (makeFallbackChecks) {
12486      // `2` may be desired in some cases – research later
12487      var numberOfChecks = flipVariations ? 3 : 1;
12488
12489      var _loop = function _loop(_i) {
12490        var fittingPlacement = placements.find(function (placement) {
12491          var checks = checksMap.get(placement);
12492
12493          if (checks) {
12494            return checks.slice(0, _i).every(function (check) {
12495              return check;
12496            });
12497          }
12498        });
12499
12500        if (fittingPlacement) {
12501          firstFittingPlacement = fittingPlacement;
12502          return "break";
12503        }
12504      };
12505
12506      for (var _i = numberOfChecks; _i > 0; _i--) {
12507        var _ret = _loop(_i);
12508
12509        if (_ret === "break") break;
12510      }
12511    }
12512
12513    if (state.placement !== firstFittingPlacement) {
12514      state.modifiersData[name]._skip = true;
12515      state.placement = firstFittingPlacement;
12516      state.reset = true;
12517    }
12518  } // eslint-disable-next-line import/no-unused-modules
12519
12520
12521  var flip$1 = {
12522    name: 'flip',
12523    enabled: true,
12524    phase: 'main',
12525    fn: flip,
12526    requiresIfExists: ['offset'],
12527    data: {
12528      _skip: false
12529    }
12530  };
12531
12532  function getAltAxis(axis) {
12533    return axis === 'x' ? 'y' : 'x';
12534  }
12535
12536  function within(min$1, value, max$1) {
12537    return max(min$1, min(value, max$1));
12538  }
12539
12540  function preventOverflow(_ref) {
12541    var state = _ref.state,
12542        options = _ref.options,
12543        name = _ref.name;
12544    var _options$mainAxis = options.mainAxis,
12545        checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
12546        _options$altAxis = options.altAxis,
12547        checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,
12548        boundary = options.boundary,
12549        rootBoundary = options.rootBoundary,
12550        altBoundary = options.altBoundary,
12551        padding = options.padding,
12552        _options$tether = options.tether,
12553        tether = _options$tether === void 0 ? true : _options$tether,
12554        _options$tetherOffset = options.tetherOffset,
12555        tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;
12556    var overflow = detectOverflow(state, {
12557      boundary: boundary,
12558      rootBoundary: rootBoundary,
12559      padding: padding,
12560      altBoundary: altBoundary
12561    });
12562    var basePlacement = getBasePlacement(state.placement);
12563    var variation = getVariation(state.placement);
12564    var isBasePlacement = !variation;
12565    var mainAxis = getMainAxisFromPlacement(basePlacement);
12566    var altAxis = getAltAxis(mainAxis);
12567    var popperOffsets = state.modifiersData.popperOffsets;
12568    var referenceRect = state.rects.reference;
12569    var popperRect = state.rects.popper;
12570    var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
12571      placement: state.placement
12572    })) : tetherOffset;
12573    var data = {
12574      x: 0,
12575      y: 0
12576    };
12577
12578    if (!popperOffsets) {
12579      return;
12580    }
12581
12582    if (checkMainAxis || checkAltAxis) {
12583      var mainSide = mainAxis === 'y' ? top : left;
12584      var altSide = mainAxis === 'y' ? bottom : right;
12585      var len = mainAxis === 'y' ? 'height' : 'width';
12586      var offset = popperOffsets[mainAxis];
12587      var min$1 = popperOffsets[mainAxis] + overflow[mainSide];
12588      var max$1 = popperOffsets[mainAxis] - overflow[altSide];
12589      var additive = tether ? -popperRect[len] / 2 : 0;
12590      var minLen = variation === start ? referenceRect[len] : popperRect[len];
12591      var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
12592      // outside the reference bounds
12593
12594      var arrowElement = state.elements.arrow;
12595      var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {
12596        width: 0,
12597        height: 0
12598      };
12599      var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();
12600      var arrowPaddingMin = arrowPaddingObject[mainSide];
12601      var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want
12602      // to include its full size in the calculation. If the reference is small
12603      // and near the edge of a boundary, the popper can overflow even if the
12604      // reference is not overflowing as well (e.g. virtual elements with no
12605      // width or height)
12606
12607      var arrowLen = within(0, referenceRect[len], arrowRect[len]);
12608      var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - tetherOffsetValue : minLen - arrowLen - arrowPaddingMin - tetherOffsetValue;
12609      var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + tetherOffsetValue : maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue;
12610      var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
12611      var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
12612      var offsetModifierValue = state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis] : 0;
12613      var tetherMin = popperOffsets[mainAxis] + minOffset - offsetModifierValue - clientOffset;
12614      var tetherMax = popperOffsets[mainAxis] + maxOffset - offsetModifierValue;
12615
12616      if (checkMainAxis) {
12617        var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
12618        popperOffsets[mainAxis] = preventedOffset;
12619        data[mainAxis] = preventedOffset - offset;
12620      }
12621
12622      if (checkAltAxis) {
12623        var _mainSide = mainAxis === 'x' ? top : left;
12624
12625        var _altSide = mainAxis === 'x' ? bottom : right;
12626
12627        var _offset = popperOffsets[altAxis];
12628
12629        var _min = _offset + overflow[_mainSide];
12630
12631        var _max = _offset - overflow[_altSide];
12632
12633        var _preventedOffset = within(tether ? min(_min, tetherMin) : _min, _offset, tether ? max(_max, tetherMax) : _max);
12634
12635        popperOffsets[altAxis] = _preventedOffset;
12636        data[altAxis] = _preventedOffset - _offset;
12637      }
12638    }
12639
12640    state.modifiersData[name] = data;
12641  } // eslint-disable-next-line import/no-unused-modules
12642
12643
12644  var preventOverflow$1 = {
12645    name: 'preventOverflow',
12646    enabled: true,
12647    phase: 'main',
12648    fn: preventOverflow,
12649    requiresIfExists: ['offset']
12650  };
12651
12652  var toPaddingObject = function toPaddingObject(padding, state) {
12653    padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {
12654      placement: state.placement
12655    })) : padding;
12656    return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
12657  };
12658
12659  function arrow(_ref) {
12660    var _state$modifiersData$;
12661
12662    var state = _ref.state,
12663        name = _ref.name,
12664        options = _ref.options;
12665    var arrowElement = state.elements.arrow;
12666    var popperOffsets = state.modifiersData.popperOffsets;
12667    var basePlacement = getBasePlacement(state.placement);
12668    var axis = getMainAxisFromPlacement(basePlacement);
12669    var isVertical = [left, right].indexOf(basePlacement) >= 0;
12670    var len = isVertical ? 'height' : 'width';
12671
12672    if (!arrowElement || !popperOffsets) {
12673      return;
12674    }
12675
12676    var paddingObject = toPaddingObject(options.padding, state);
12677    var arrowRect = getLayoutRect(arrowElement);
12678    var minProp = axis === 'y' ? top : left;
12679    var maxProp = axis === 'y' ? bottom : right;
12680    var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];
12681    var startDiff = popperOffsets[axis] - state.rects.reference[axis];
12682    var arrowOffsetParent = getOffsetParent(arrowElement);
12683    var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
12684    var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is
12685    // outside of the popper bounds
12686
12687    var min = paddingObject[minProp];
12688    var max = clientSize - arrowRect[len] - paddingObject[maxPro
12688p];
12689    var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;
12690    var offset = within(min, center, max); // Prevents breaking syntax highlighting...
12691
12692    var axisProp = axis;
12693    state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);
12694  }
12695
12696  function effect(_ref2) {
12697    var state = _ref2.state,
12698        options = _ref2.options;
12699    var _options$element = options.element,
12700        arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;
12701
12702    if (arrowElement == null) {
12703      return;
12704    } // CSS selector
12705
12706
12707    if (typeof arrowElement === 'string') {
12708      arrowElement = state.elements.popper.querySelector(arrowElement);
12709
12710      if (!arrowElement) {
12711        return;
12712      }
12713    }
12714
12715    {
12716      if (!isHTMLElement(arrowElement)) {
12717        console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));
12718      }
12719    }
12720
12721    if (!contains(state.elements.popper, arrowElement)) {
12722      {
12723        console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', 'element.'].join(' '));
12724      }
12725
12726      return;
12727    }
12728
12729    state.elements.arrow = arrowElement;
12730  } // eslint-disable-next-line import/no-unused-modules
12731
12732
12733  var arrow$1 = {
12734    name: 'arrow',
12735    enabled: true,
12736    phase: 'main',
12737    fn: arrow,
12738    effect: effect,
12739    requires: ['popperOffsets'],
12740    requiresIfExists: ['preventOverflow']
12741  };
12742
12743  function getSideOffsets(overflow, rect, preventedOffsets) {
12744    if (preventedOffsets === void 0) {
12745      preventedOffsets = {
12746        x: 0,
12747        y: 0
12748      };
12749    }
12750
12751    return {
12752      top: overflow.top - rect.height - preventedOffsets.y,
12753      right: overflow.right - rect.width + preventedOffsets.x,
12754      bottom: overflow.bottom - rect.height + preventedOffsets.y,
12755      left: overflow.left - rect.width - preventedOffsets.x
12756    };
12757  }
12758
12759  function isAnySideFullyClipped(overflow) {
12760    return [top, right, bottom, left].some(function (side) {
12761      return overflow[side] >= 0;
12762    });
12763  }
12764
12765  function hide(_ref) {
12766    var state = _ref.state,
12767        name = _ref.name;
12768    var referenceRect = state.rects.reference;
12769    var popperRect = state.rects.popper;
12770    var preventedOffsets = state.modifiersData.preventOverflow;
12771    var referenceOverflow = detectOverflow(state, {
12772      elementContext: 'reference'
12773    });
12774    var popperAltOverflow = detectOverflow(state, {
12775      altBoundary: true
12776    });
12777    var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);
12778    var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);
12779    var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);
12780    var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);
12781    state.modifiersData[name] = {
12782      referenceClippingOffsets: referenceClippingOffsets,
12783      popperEscapeOffsets: popperEscapeOffsets,
12784      isReferenceHidden: isReferenceHidden,
12785      hasPopperEscaped: hasPopperEscaped
12786    };
12787    state.attributes.popper = Object.assign({}, state.attributes.popper, {
12788      'data-popper-reference-hidden': isReferenceHidden,
12789      'data-popper-escaped': hasPopperEscaped
12790    });
12791  } // eslint-disable-next-line import/no-unused-modules
12792
12793
12794  var hide$1 = {
12795    name: 'hide',
12796    enabled: true,
12797    phase: 'main',
12798    requiresIfExists: ['preventOverflow'],
12799    fn: hide
12800  };
12801
12802  var defaultModifiers$1 = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1];
12803  var createPopper$1 = /*#__PURE__*/popperGenerator({
12804    defaultModifiers: defaultModifiers$1
12805  }); // eslint-disable-next-line import/no-unused-modules
12806
12807  var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1];
12808  var createPopper = /*#__PURE__*/popperGenerator({
12809    defaultModifiers: defaultModifiers
12810  }); // eslint-disable-next-line import/no-unused-modules
12811
12812  exports.applyStyles = applyStyles$1;
12813  exports.arrow = arrow$1;
12814  exports.computeStyles = computeStyles$1;
12815  exports.createPopper = createPopper;
12816  exports.createPopperLite = createPopper$1;
12817  exports.defaultModifiers = defaultModifiers;
12818  exports.detectOverflow = detectOverflow;
12819  exports.eventListeners = eventListeners;
12820  exports.flip = flip$1;
12821  exports.hide = hide$1;
12822  exports.offset = offset$1;
12823  exports.popperGenerator = popperGenerator;
12824  exports.popperOffsets = popperOffsets$1;
12825  exports.preventOverflow = preventOverflow$1;
12826
12827  Object.defineProperty(exports, '__esModule', { value: true });
12828
12829})));
12830//# sourceMappingURL=popper.js.map
12831
12832/*!
12833  * Bootstrap v5.1.1 (https://getbootstrap.com/)
12834  * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
12835  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
12836  */
12837!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e(t.Popper)}(this,(function(t){"use strict";function e(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(i){if("default"!==i){var s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:function(){return t[i]}})}})),e.default=t,Object.freeze(e)}var i=e(t);const s=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i="#"+i.split("#")[1]),e=i&&"#"!==i?i.trim():null}return e},n=t=>{const e=s(t);return e&&document.querySelector(e)?e:null},o=t=>{const e=s(t);return e?document.querySelector(e):null},r=t=>{t.dispatchEvent(new Event("transitionend"))},a=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),l=t=>a(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,c=(t,e,i)=>
vendor: 1,961 bytes, line 12837
12837{Object.keys(i).forEach(s=>{const n=i[s],o=e[s],r=o&&a(o)?"element":null==(l=o)?""+l:{}.toString.call(l).match(/\s([a-z]+)/i)[1].toLowerCase();var l;if(!new RegExp(n).test(r))throw new TypeError(`${t.toUpperCase()}: Option "${s}" provided type "${r}" but expected type "${n}".`)})},h=t=>!(!a(t)||0===t.getClientRects().length)&&"visible"===getComputedStyle(t).getPropertyValue("visibility"),d=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),u=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?u(t.parentNode):null},g=()=>{},p=t=>{t.offsetHeight},f=()=>{const{jQuery:t}=window;return t&&!document.body.hasAttribute("data-bs-no-jquery")?t:null},_=[],m=()=>"rtl"===document.documentElement.dir,b=t=>{var e;e=()=>{const e=f();if(e){const i=t.NAME,s=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=s,t.jQueryInterface)}},"loading"===document.readyState?(_.length||document.addEventListener("DOMContentLoaded",()=>{_.forEach(t=>t())}),_.push(e)):e()},v=t=>{"function"==typeof t&&t()},w=(t,e,i=!0)=>{if(!i)return void v(t);const s=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const s=Number.parseFloat(e),n=Number.parseFloat(i);return s||n?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let n=!1;const o=({target:i})=>{i===e&&(n=!0,e.removeEventListener("transitionend",o),v(t))};e.addEventListener("transitionend",o),setTimeout(()=>{n||r(e)},s)},y=(t,e,i,s)=>{let n=t.indexOf(e);if(-1===n)return t[!i&&s?t.length-1:0];const o=t.length;return n+=i?1:-1,s&&(n=(n+o)%o),t[Math.max(0,Math.min(n,o-1))]},E=/[^.]*(?=\..*)\.|.*/,A=/\..*/,T=/::\d+$/,C={};let k=1;
vendor: 2,971 bytes, line 12837
12837const L={mouseenter:"mouseover",mouseleave:"mouseout"},S=/^(mouseenter|mouseleave)/i,O=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function N(t,e){return e&&`${e}::${k++}`||t.uidEvent||k++}function D(t){const e=N(t);return t.uidEvent=e,C[e]=C[e]||{},C[e]}function I(t,e,i=null){const s=Object.keys(t);for(let n=0,o=s.length;n<o;n++){const o=t[s[n]];if(o.originalHandler===e&&o.delegationSelector===i)return o}return null}function P(t,e,i){const s="string"==typeof e,n=s?i:e;let o=j(t);return O.has(o)||(o=t),[s,n,o]}function x(t,e,i,s,n){if("string"!=typeof e||!t)return;if(i||(i=s,s=null),S.test(e)){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};s?s=t(s):i=t(i)}const[o,r,a]=P(e,i,s),l=D(t),c=l[a]||(l[a]={}),h=I(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&n);const d=N(r,e.replace(E,"")),u=o?function(t,e,i){return function s(n){const o=t.querySelectorAll(e);for(let{target:r}=n;r&&r!==this;r=r.parentNode)for(let a=o.length;a--;)if(o[a]===r)return n.delegateTarget=r,s.oneOff&&H.off(t,n.type,e,i),i.apply(r,[n]);return null}}(t,i,s):function(t,e){return function i(s){return s.delegateTarget=t,i.oneOff&&H.off(t,s.type,e),e.apply(t,[s])}}(t,i);u.delegationSelector=o?i:null,u.originalHandler=r,u.oneOff=n,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function M(t,e,i,s,n){const o=I(e[i],s,n);o&&(t.removeEventListener(i,o,Boolean(n)),delete e[i][o.uidEvent])}function j(t){return t=t.replace(A,""),L[t]||t}const H={on(t,e,i,s){x(t,e,i,s,!1)},one(t,e,i,s){x(t,e,i,s,!0)},off(t,e,i,s){if("string"!=typeof e||!t)return;const[n,o,r]=P(e,i,s),a=r!==e,l=D(t),c=e.startsWith(".");if(void 0!==o){if(!l||!l[r])return;return void M(t,l,r,o,n?i:null)}c&&Object.keys(l).forEach(i=>{!function(t,e,i,s){const n=e[i]||{};Object.keys(n).forEach(o=>{if(o.includes(s)){const s=n[o];M(t,e,i,s.originalHandler,s.delegationSelector)}})}(t,l,i,e.slice(1))});const h=l[r]||{};Object.keys(h).forEach(i=>{const s=i.replace(T,"");if(!a||e.includes(s)){const e=h[i];M(t,l,r,e.originalHandler,e.delegationSelector)}})},trigger(t,e,i){if("string"!=typeof e||!t)return null;const s=f(),n=j(e),o=e!==n,r=O.has(n);let a,l=!0,c=!0,h=!1,d=null;return o&&s&&(a=s.Event(e,i),s(t).trigger(a),l=!a.isPropagationStopped(),c=!a.isImmediatePropagationStopped(),h=a.isDefaultPrevented()),r?(d=document.createEvent("HTMLEvents"),d.initEvent(n,l,!0)):d=new CustomEvent(e,{bubbles:l,cancelable:!0}
vendor: 6,224 bytes, line 12837
12837),void 0!==i&&Object.keys(i).forEach(t=>{Object.defineProperty(d,t,{get:()=>i[t]})}),h&&d.preventDefault(),c&&t.dispatchEvent(d),d.defaultPrevented&&void 0!==a&&a.preventDefault(),d}},B=new Map;var z={set(t,e,i){B.has(t)||B.set(t,new Map);const s=B.get(t);s.has(e)||0===s.size?s.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`)},get:(t,e)=>B.has(t)&&B.get(t).get(e)||null,remove(t,e){if(!B.has(t))return;const i=B.get(t);i.delete(e),0===i.size&&B.delete(t)}};class R{constructor(t){(t=l(t))&&(this._element=t,z.set(this._element,this.constructor.DATA_KEY,this))}dispose(){z.remove(this._element,this.constructor.DATA_KEY),H.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach(t=>{this[t]=null})}_queueCallback(t,e,i=!0){w(t,e,i)}static getInstance(t){return z.get(l(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.1.1"}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return"bs."+this.NAME}static get EVENT_KEY(){return"."+this.DATA_KEY}}const F=(t,e="hide")=>{const i="click.dismiss"+t.EVENT_KEY,s=t.NAME;H.on(document,i,`[data-bs-dismiss="${s}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),d(this))return;const n=o(this)||this.closest("."+s);t.getOrCreateInstance(n)[e]()}))};class q extends R{static get NAME(){return"alert"}close(){if(H.trigger(this._element,"close.bs.alert").defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,t)}_destroyElement(){this._element.remove(),H.trigger(this._element,"closed.bs.alert"),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=q.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}F(q,"close"),b(q);class W extends R{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){const e=W.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}function $(t){return"true"===t||"false"!==t&&(t===Number(t).toString()?Number(t):""===t||"null"===t?null:t)}function U(t){return t.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())}H.on(document,"click.bs.button.data-api",'[data-bs-toggle="button"]',t=>{t.preventDefault();const e=t.target.closest('[data-bs-toggle="button"]');W.getOrCreateInstance(e).toggle()}),b(W);const K={setDataAttribute(t,e,i){t.setAttribute("data-bs-"+U(e),i)},removeDataAttribute(t,e){t.removeAttribute("data-bs-"+U(e))},getDataAttributes(t){if(!t)return{};const e={};return Object.keys(t.dataset).filter(t=>t.startsWith("bs")).forEach(i=>{let s=i.replace(/^bs/,"");s=s.charAt(0).toLowerCase()+s.slice(1,s.length),e[s]=$(t.dataset[i])}),e},getDataAttribute:(t,e)=>$(t.getAttribute("data-bs-"+U(e))),offset(t){const e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset,left:e.left+window.pageXOffset}},position:t=>({top:t.offsetTop,left:t.offsetLeft})},V={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter(t=>t.matches(e)),parents(t,e){const i=[];let s=t.parentNode;for(;s&&s.nodeType===Node.ELEMENT_NODE&&3!==s.nodeType;)s.matches(e)&&i.push(s),s=s.parentNode;return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(t=>t+':not([tabindex^="-"])').join(", ");return this.find(e,t).filter(t=>!d(t)&&h(t))}},X={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},Y={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},Q="next",G="prev",Z="left",J="right",tt={ArrowLeft:J,ArrowRight:Z};class et extends R{constructor(t,e){super(t),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._indicatorsElement=V.findOne(".carousel-indicators",this._element),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent),this._addEventListeners()}static get Default(){return X}static get NAME(){return"carousel"}next(){this._slide(Q)}nextWhenVisible(){!document.hidden&&h(this._element)&&this.next()}prev(){this._slide(G)}pause(t){t||(this._isPaused=!0),V.findOne(".carousel-item-next, .carousel-item-prev",this._element)&&(r(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}cycle(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}to(t){this._activeElement=V.findOne(".active.carousel-item",this._element);const e=this._getItemIndex(this._activeElement);if(t>this._items.length-1||t<0)return;if(this._isSliding)return void H.one(this._element,"slid.bs.carousel",()=>this.to(t));if(e===t)return this.pause(),void this.cycle();const i=t>e?Q:G;this._slide(i,this._items[t])}_getConfig(t){return t={...X,...K.getDataAttributes(this._element),..."object"==typeof t?t:{}},c("carousel",t,Y),t}_handleSwipe(){const t=Math.abs(this.touchDeltaX);if(t<=40)return;const e=t/this.touchDeltaX;this.touchDeltaX=0,e&&this._slide(e>0?J:Z)}_addEventListeners(){this._config.keyboard&&H.on(this._element,"keydown.bs.carousel",t=>
vendor: 4,364 bytes, line 12837
12837this._keydown(t)),"hover"===this._config.pause&&(H.on(this._element,"mouseenter.bs.carousel",t=>this.pause(t)),H.on(this._element,"mouseleave.bs.carousel",t=>this.cycle(t))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()}_addTouchEventListeners(){const t=t=>this._pointerEvent&&("pen"===t.pointerType||"touch"===t.pointerType),e=e=>{t(e)?this.touchStartX=e.clientX:this._pointerEvent||(this.touchStartX=e.touches[0].clientX)},i=t=>{this.touchDeltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this.touchStartX},s=e=>{t(e)&&(this.touchDeltaX=e.clientX-this.touchStartX),this._handleSwipe(),"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(t=>this.cycle(t),500+this._config.interval))};V.find(".carousel-item img",this._element).forEach(t=>{H.on(t,"dragstart.bs.carousel",t=>t.preventDefault())}),this._pointerEvent?(H.on(this._element,"pointerdown.bs.carousel",t=>e(t)),H.on(this._element,"pointerup.bs.carousel",t=>s(t)),this._element.classList.add("pointer-event")):(H.on(this._element,"touchstart.bs.carousel",t=>e(t)),H.on(this._element,"touchmove.bs.carousel",t=>i(t)),H.on(this._element,"touchend.bs.carousel",t=>s(t)))}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=tt[t.key];e&&(t.preventDefault(),this._slide(e))}_getItemIndex(t){return this._items=t&&t.parentNode?V.find(".carousel-item",t.parentNode):[],this._items.indexOf(t)}_getItemByOrder(t,e){const i=t===Q;return y(this._items,e,i,this._config.wrap)}_triggerSlideEvent(t,e){const i=this._getItemIndex(t),s=this._getItemIndex(V.findOne(".active.carousel-item",this._element));return H.trigger(this._element,"slide.bs.carousel",{relatedTarget:t,direction:e,from:s,to:i})}_setActiveIndicatorElement(t){if(this._indicatorsElement){const e=V.findOne(".active",this._indicatorsElement);e.classList.remove("active"),e.removeAttribute("aria-current");const i=V.find("[data-bs-target]",this._indicatorsElement);for(let e=0;e<i.length;e++)if(Number.parseInt(i[e].getAttribute("data-bs-slide-to"),10)===this._getItemIndex(t)){i[e].classList.add("active"),i[e].setAttribute("aria-current","true");break}}}_updateInterval(){const t=this._activeElement||V.findOne(".active.carousel-item",this._element);if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);e?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=e):this._config.interval=this._config.defaultInterval||this._config.interval}_slide(t,e){const i=this._directionToOrder(t),s=V.findOne(".active.carousel-item",this._element),n=this._getItemIndex(s),o=e||this._getItemByOrder(i,s),r=this._getItemIndex(o),a=Boolean(this._interval),l=i===Q,c=l?"carousel-item-start":"carousel-item-end",h=l?"carousel-item-next":"carousel-item-prev",d=this._orderToDirection(i);if(o&&o.classList.contains("active"))return void(this._isSliding=!1);if(this._isSliding)return;if(this._triggerSlideEvent(o,d).defaultPrevented)return;if(!s||!o)return;this._isSliding=!0,a&&this.pause(),this._setActiveIndicatorElement(o),this._activeElement=o;const u=()=>{H.trigger(this._element,"slid.bs.carousel",{relatedTarget:o,direction:d,from:n,to:r})};if(this._element.classList.contains("slide")){o.classList.add(h),p(o),s.classList.add(c),o.classList.add(c);const t=()=>{o.classList.remove(c,h),o.classList.add("active"),s.classList.remove("active",h,c),this._isSliding=!1,setTimeout(u,0)};this._queueCallback(t,s,!0)}else s.classList.remove("active"),o.classList.add("active"),this._isSliding=!1,u();a&&this.cycle()}_directionToOrder(t){return[J,Z].includes(t)?m()?t===Z?G:Q:t===Z?Q:G:t}_orderToDirection(t){return[Q,G].includes(t)?m()?t===G?Z:J:t===G?J:Z:t}static carouselInterface(t,e){const i=et.getOrCreateInstance(t,e);let{_config:s}=i;"object"==typeof e&&(s={...s,...e});const n="string"==typeof e?e:s.slide;if("number"==typeof e)i.to(e);else if("string"==typeof n){if(void 0===i[n])throw new TypeError(`No method named "${n}"`);i[n]()}else s.interval&&s.ride&&(i.pause(),i.cycle())}static jQueryInterface(t){return this.each((function(){et.carouselInterface(this,t)}))}static dataApiClickHandler(t){const e=o(this);if(!e||!e.classList.contains("carousel"))return;const i={...K.getDataAttributes(e),...K.getDataAttributes(this)},s=this.getAttribute("data-bs-slide-to");
vendor: 1,230 bytes, line 12837
12837s&&(i.interval=!1),et.carouselInterface(e,i),s&&et.getInstance(e).to(s),t.preventDefault()}}H.on(document,"click.bs.carousel.data-api","[data-bs-slide], [data-bs-slide-to]",et.dataApiClickHandler),H.on(window,"load.bs.carousel.data-api",()=>{const t=V.find('[data-bs-ride="carousel"]');for(let e=0,i=t.length;e<i;e++)et.carouselInterface(t[e],et.getInstance(t[e]))}),b(et);const it={toggle:!0,parent:null},st={toggle:"boolean",parent:"(null|element)"};class nt extends R{constructor(t,e){super(t),this._isTransitioning=!1,this._config=this._getConfig(e),this._triggerArray=[];const i=V.find('[data-bs-toggle="collapse"]');for(let t=0,e=i.length;t<e;t++){const e=i[t],s=n(e),o=V.find(s).filter(t=>t===this._element);null!==s&&o.length&&(this._selector=s,this._triggerArray.push(e))}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return it}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t,e=[];if(this._config.parent){const t=V.find(".collapse .collapse",this._config.parent);e=V.find(".collapse.show, .collapse
vendor: 7,155 bytes, line 12837
12837.collapsing",this._config.parent).filter(e=>!t.includes(e))}const i=V.findOne(this._selector);if(e.length){const s=e.find(t=>i!==t);if(t=s?nt.getInstance(s):null,t&&t._isTransitioning)return}if(H.trigger(this._element,"show.bs.collapse").defaultPrevented)return;e.forEach(e=>{i!==e&&nt.getOrCreateInstance(e,{toggle:!1}).hide(),t||z.set(e,"bs.collapse",null)});const s=this._getDimension();this._element.classList.remove("collapse"),this._element.classList.add("collapsing"),this._element.style[s]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n="scroll"+(s[0].toUpperCase()+s.slice(1));this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove("collapsing"),this._element.classList.add("collapse","show"),this._element.style[s]="",H.trigger(this._element,"shown.bs.collapse")},this._element,!0),this._element.style[s]=this._element[n]+"px"}hide(){if(this._isTransitioning||!this._isShown())return;if(H.trigger(this._element,"hide.bs.collapse").defaultPrevented)return;const t=this._getDimension();this._element.style[t]=this._element.getBoundingClientRect()[t]+"px",p(this._element),this._element.classList.add("collapsing"),this._element.classList.remove("collapse","show");const e=this._triggerArray.length;for(let t=0;t<e;t++){const e=this._triggerArray[t],i=o(e);i&&!this._isShown(i)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0,this._element.style[t]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove("collapsing"),this._element.classList.add("collapse"),H.trigger(this._element,"hidden.bs.collapse")},this._element,!0)}_isShown(t=this._element){return t.classList.contains("show")}_getConfig(t){return(t={...it,...K.getDataAttributes(this._element),...t}).toggle=Boolean(t.toggle),t.parent=l(t.parent),c("collapse",t,st),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=V.find(".collapse .collapse",this._config.parent);V.find('[data-bs-toggle="collapse"]',this._config.parent).filter(e=>!t.includes(e)).forEach(t=>{const e=o(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))})}_addAriaAndCollapsedClass(t,e){t.length&&t.forEach(t=>{e?t.classList.remove("collapsed"):t.classList.add("collapsed"),t.setAttribute("aria-expanded",e)})}static jQueryInterface(t){return this.each((function(){const e={};"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1);const i=nt.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}))}}H.on(document,"click.bs.collapse.data-api",'[data-bs-toggle="collapse"]',(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();const e=n(this);V.find(e).forEach(t=>{nt.getOrCreateInstance(t,{toggle:!1}).toggle()})})),b(nt);const ot=new RegExp("ArrowUp|ArrowDown|Escape"),rt=m()?"top-end":"top-start",at=m()?"top-start":"top-end",lt=m()?"bottom-end":"bottom-start",ct=m()?"bottom-start":"bottom-end",ht=m()?"left-start":"right-start",dt=m()?"right-start":"left-start",ut={offset:[0,2],boundary:"clippingParents",reference:"toggle",display:"dynamic",popperConfig:null,autoClose:!0},gt={offset:"(array|string|function)",boundary:"(string|element)",reference:"(string|element|object)",display:"string",popperConfig:"(null|object|function)",autoClose:"(boolean|string)"};class pt extends R{constructor(t,e){super(t),this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar()}static get Default(){return ut}static get DefaultType(){return gt}static get NAME(){return"dropdown"}toggle(){return this._isShown()?this.hide():this.show()}show(){if(d(this._element)||this._isShown(this._menu))return;const t={relatedTarget:this._element};if(H.trigger(this._element,"show.bs.dropdown",t).defaultPrevented)return;const e=pt.getParentFromElement(this._element);this._inNavbar?K.setDataAttribute(this._menu,"popper","none"):this._createPopper(e),"ontouchstart"in document.documentElement&&!e.closest(".navbar-nav")&&[].concat(...document.body.children).forEach(t=>H.on(t,"mouseover",g)),this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add("show"),this._element.classList.add("show"),H.trigger(this._element,"shown.bs.dropdown",t)}hide(){if(d(this._element)||!this._isShown(this._menu))return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){H.trigger(this._element,"hide.bs.dropdown",t).defaultPrevented||("ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(t=>H.off(t,"mouseover",g)),this._popper&&this._popper.destroy(),this._menu.classList.remove("show"),this._element.classList.remove("show"),this._element.setAttribute("aria-expanded","false"),K.removeDataAttribute(this._menu,"popper"),H.trigger(this._element,"hidden.bs.dropdown",t))}_getConfig(t){if(t={...this.constructor.Default,...K.getDataAttributes(this._element),...t},c("dropdown",t,this.constructor.DefaultType),"object"==typeof t.reference&&!a(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError("dropdown".toUpperCase()+': Option "reference" provided type "object" without a required "getBoundingClientRect" method.');return t}_createPopper(t){if(void 0===i)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;"parent"===this._config.reference?e=t:a(this._config.reference)?e=l(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference);const s=this._getPopperConfig(),n=s.modifiers.find(t=>"applyStyles"===t.name&&!1===t.enabled);this._popper=i.createPopper(e,this._menu,s),n&&K.setDataAttribute(this._menu,"popper","static")}_isShown(t=this._element){return t.classList.contains("show")}_getMenuElement(){return V.next(this._element,".dropdown-menu")[0]}_getPlacement(){const t=this._element.parentNode;if(t.classList.contains("dropend"))return ht;if(t.classList.contains("dropstart"))return dt;const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?at:rt:e?ct:lt}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(t=>Number.parseInt(t,10)):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return"static"===this._config.display&&(t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){const i=V.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(h);i.length&&
vendor: 23,363 bytes, line 12837
12837y(i,e,"ArrowDown"===t,!i.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=pt.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(t&&(2===t.button||"keyup"===t.type&&"Tab"!==t.key))return;const e=V.find('[data-bs-toggle="dropdown"]');for(let i=0,s=e.length;i<s;i++){const s=pt.getInstance(e[i]);if(!s||!1===s._config.autoClose)continue;if(!s._isShown())continue;const n={relatedTarget:s._element};if(t){const e=t.composedPath(),i=e.includes(s._menu);if(e.includes(s._element)||"inside"===s._config.autoClose&&!i||"outside"===s._config.autoClose&&i)continue;if(s._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;"click"===t.type&&(n.clickEvent=t)}s._completeHide(n)}}static getParentFromElement(t){return o(t)||t.parentNode}static dataApiKeydownHandler(t){if(/input|textarea/i.test(t.target.tagName)?"Space"===t.key||"Escape"!==t.key&&("ArrowDown"!==t.key&&"ArrowUp"!==t.key||t.target.closest(".dropdown-menu")):!ot.test(t.key))return;const e=this.classList.contains("show");if(!e&&"Escape"===t.key)return;if(t.preventDefault(),t.stopPropagation(),d(this))return;const i=this.matches('[data-bs-toggle="dropdown"]')?this:V.prev(this,'[data-bs-toggle="dropdown"]')[0],s=pt.getOrCreateInstance(i);if("Escape"!==t.key)return"ArrowUp"===t.key||"ArrowDown"===t.key?(e||s.show(),void s._selectMenuItem(t)):void(e&&"Space"!==t.key||pt.clearMenus());s.hide()}}H.on(document,"keydown.bs.dropdown.data-api",'[data-bs-toggle="dropdown"]',pt.dataApiKeydownHandler),H.on(document,"keydown.bs.dropdown.data-api",".dropdown-menu",pt.dataApiKeydownHandler),H.on(document,"click.bs.dropdown.data-api",pt.clearMenus),H.on(document,"keyup.bs.dropdown.data-api",pt.clearMenus),H.on(document,"click.bs.dropdown.data-api",'[data-bs-toggle="dropdown"]',(function(t){t.preventDefault(),pt.getOrCreateInstance(this).toggle()})),b(pt);class ft{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,"paddingRight",e=>e+t),this._setElementAttributes(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top","paddingRight",e=>e+t),this._setElementAttributes(".sticky-top","marginRight",e=>e-t)}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const s=this.getWidth();this._applyManipulationCallback(t,t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+s)return;this._saveInitialAttribute(t,e);const n=window.getComputedStyle(t)[e];t.style[e]=i(Number.parseFloat(n))+"px"})}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,"paddingRight"),this._resetElementAttributes(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top","paddingRight"),this._resetElementAttributes(".sticky-top","marginRight")}_saveInitialAttribute(t,e){const i=t.style[e];i&&K.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,t=>{const i=K.getDataAttribute(t,e);void 0===i?t.style.removeProperty(e):(K.removeDataAttribute(t,e),t.style[e]=i)})}_applyManipulationCallback(t,e){a(t)?e(t):V.find(t,this._element).forEach(e)}isOverflowing(){return this.getWidth()>0}}const _t={className:"modal-backdrop",isVisible:!0,isAnimated:!1,rootElement:"body",clickCallback:null},mt={className:"string",isVisible:"boolean",isAnimated:"boolean",rootElement:"(element|string)",clickCallback:"(function|null)"};class bt{constructor(t){this._config=this._getConfig(t),this._isAppended=!1,this._element=null}show(t){this._config.isVisible?(this._append(),this._config.isAnimated&&p(this._getElement()),this._getElement().classList.add("show"),this._emulateAnimation(()=>{v(t)})):v(t)}hide(t){this._config.isVisible?(this._getElement().classList.remove("show"),this._emulateAnimation(()=>{this.dispose(),v(t)})):v(t)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_getConfig(t){return(t={..._t,..."object"==typeof t?t:{}}).rootElement=l(t.rootElement),c("backdrop",t,mt),t}_append(){this._isAppended||(this._config.rootElement.append(this._getElement()),H.on(this._getElement(),"mousedown.bs.backdrop",()=>{v(this._config.clickCallback)}),this._isAppended=!0)}dispose(){this._isAppended&&(H.off(this._element,"mousedown.bs.backdrop"),this._element.remove(),this._isAppended=!1)}_emulateAnimation(t){w(t,this._getElement(),this._config.isAnimated)}}const vt={trapElement:null,autofocus:!0},wt={trapElement:"element",autofocus:"boolean"};class yt{constructor(t){this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}activate(){const{trapElement:t,autofocus:e}=this._config;this._isActive||(e&&t.focus(),H.off(document,".bs.focustrap"),H.on(document,"focusin.bs.focustrap",t=>this._handleFocusin(t)),H.on(document,"keydown.tab.bs.focustrap",t=>this._handleKeydown(t)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,H.off(document,".bs.focustrap"))}_handleFocusin(t){const{target:e}=t,{trapElement:i}=this._config;if(e===document||e===i||i.contains(e))return;const s=V.focusableChildren(i);0===s.length?i.focus():"backward"===this._lastTabNavDirection?s[s.length-1].focus():s[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?"backward":"forward")}_getConfig(t){return t={...vt,..."object"==typeof t?t:{}},c("focustrap",t,wt),t}}const Et={backdrop:!0,keyboard:!0,focus:!0},At={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean"};class Tt extends R{constructor(t,e){super(t),this._config=this._getConfig(e),this._dialog=V.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollBar=new ft}static get Default(){return Et}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||H.trigger(this._element,"show.bs.modal",{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._scrollBar.hide(),document.body.classList.add("modal-open"),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),H.on(this._dialog,"mousedown.dismiss.bs.modal",()=>{H.one(this._element,"mouseup.dismiss.bs.modal",t=>{t.target===this._element&&(this._ignoreBackdropClick=!0)})}),this._showBackdrop(()=>this._showElement(t)))}hide(){if(!this._isShown||this._isTransitioning)return;if(H.trigger(this._element,"hide.bs.modal").defaultPrevented)return;this._isShown=!1;const t=this._isAnimated();t&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),this._focustrap.deactivate(),this._element.classList.remove("show"),H.off(this._element,"click.dismiss.bs.modal"),H.off(this._dialog,"mousedown.dismiss.bs.modal"),this._queueCallback(()=>this._hideModal(),this._element,t)}dispose(){[window,this._dialog].forEach(t=>H.off(t,".bs.modal")),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new bt({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new yt({trapElement:this._element})}_getConfig(t){return t={...Et,...K.getDataAttributes(this._element),..."object"==typeof t?t:{}},c("modal",t,At),t}_showElement(t){const e=this._isAnimated(),i=V.findOne(".modal-body",this._dialog);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0,i&&(i.scrollTop=0),e&&p(this._element),this._element.classList.add("show"),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,H.trigger(this._element,"shown.bs.modal",{relatedTarget:t})},this._dialog,e)}_setEscapeEvent(){this._isShown?H.on(this._element,"keydown.dismiss.bs.modal",t=>{this._config.keyboard&&"Escape"===t.key?(t.preventDefault(),this.hide()):this._config.keyboard||"Escape"!==t.key||this._triggerBackdropTransition()}):H.off(this._element,"keydown.dismiss.bs.modal")}_setResizeEvent(){this._isShown?H.on(window,"resize.bs.modal",()=>this._adjustDialog()):H.off(window,"resize.bs.modal")}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove("modal-open"),this._resetAdjustments(),this._scrollBar.reset(),H.trigger(this._element,"hidden.bs.modal")})}_showBackdrop(t){H.on(this._element,"click.dismiss.bs.modal",t=>{this._ignoreBackdropClick?this._ignoreBackdropClick=!1:t.target===t.currentTarget&&(!0===this._config.backdrop?this.hide():"static"===this._config.backdrop&&this._triggerBackdropTransition())}),this._backdrop.show(t)}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(H.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented)return;const{classList:t,scrollHeight:e,style:i}=this._element,s=e>document.documentElement.clientHeight;!s&&"hidden"===i.overflowY||t.contains("modal-static")||(s||(i.overflowY="hidden"),t.add("modal-static"),this._queueCallback(()=>{t.remove("modal-static"),s||this._queueCallback(()=>{i.overflowY=""},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;(!i&&t&&!m()||i&&!t&&m())&&(this._element.style.paddingLeft=e+"px"),(i&&!t&&!m()||!i&&t&&m())&&(this._element.style.paddingRight=e+"px")}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const i=Tt.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}H.on(document,"click.bs.modal.data-api",'[data-bs-toggle="modal"]',(function(t){const e=o(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),H.one(e,"show.bs.modal",t=>{t.defaultPrevented||H.one(e,"hidden.bs.modal",()=>{h(this)&&this.focus()})});const i=V.findOne(".modal.show");i&&Tt.getInstance(i).hide(),Tt.getOrCreateInstance(e).toggle(this)})),F(Tt),b(Tt);const Ct={backdrop:!0,keyboard:!0,scroll:!1},kt={backdrop:"boolean",keyboard:"boolean",scroll:"boolean"};class Lt extends R{constructor(t,e){super(t),this._config=this._getConfig(e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get NAME(){return"offcanvas"}static get Default(){return Ct}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||H.trigger(this._element,"show.bs.offcanvas",{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._element.style.visibility="visible",this._backdrop.show(),this._config.scroll||(new ft).hide(),this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add("show"),this._queueCallback(()=>{this._config.scroll||this._focustrap.activate(),H.trigger(this._element,"shown.bs.offcanvas",{relatedTarget:t})},this._element,!0))}hide(){this._isShown&&(H.trigger(this._element,"hide.bs.offcanvas").defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.remove("show"),this._backdrop.hide(),this._queueCallback(()=>{this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._element.style.visibility="hidden",this._config.scroll||(new ft).reset(),H.trigger(this._element,"hidden.bs.offcanvas")},this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_getConfig(t){return t={...Ct,...K.getDataAttributes(this._element),..."object"==typeof t?t:{}},c("offcanvas",t,kt),t}_initializeBackDrop(){return new bt({className:"offcanvas-backdrop",isVisible:this._config.backdrop,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:()=>this.hide()})}_initializeFocusTrap(){return new yt({trapElement:this._element})}_addEventListeners(){H.on(this._element,"keydown.dismiss.bs.offcanvas",t=>{this._config.keyboard&&"Escape"===t.key&&this.hide()})}static jQueryInterface(t){return this.each((function(){const e=Lt.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}H.on(document,"click.bs.offcanvas.data-api",'[data-bs-toggle="offcanvas"]',(function(t){const e=o(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),d(this))return;H.one(e,"hidden.bs.offcanvas",()=>{h(this)&&this.focus()});const i=V.findOne(".offcanvas.show");i&&i!==e&&Lt.getInstance(i).hide(),Lt.getOrCreateInstance(e).toggle(this)})),H.on(window,"load.bs.offcanvas.data-api",()=>V.find(".offcanvas.show").forEach(t=>Lt.getOrCreateInstance(t).show())),F(Lt),b(Lt);const St=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Ot=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/i,Nt=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,Dt=(t,e)=>{const i=t.nodeName.toLowerCase();if(e.includes(i))return!St.has(i)||Boolean(Ot.test(t.nodeValue)||Nt.test(t.nodeValue));const s=e.filter(t=>t instanceof RegExp);for(let t=0,e=s.length;t<e;t++)if(s[t].test(i))return!0;return!1};function It(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const s=(new window.DOMParser).parseFromString(t,"text/html"),n=Object.keys(e),o=[].concat(...s.body.querySelectorAll("*"));for(let t=0,i=o.length;t<i;t++){const i=o[t],s=i.nodeName.toLowerCase();if(!n.includes(s)){i.remove();continue}const r=[].concat(...i.attributes),a=[].concat(e["*"]||[],e[s]||[]);r.forEach(t=>{Dt(t,a)||i.removeAttribute(t.nodeName)})}return s.body.innerHTML}const Pt=new Set(["sanitize","allowList","sanitizeFn"]),xt={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(array|string|function)",container:"(string|element|boolean)",fallbackPlacements:"array",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",allowList:"object",popperConfig:"(null|object|function)"},Mt={AUTO:"auto",TOP:"top",RIGHT:m()?"left":"right",BOTTOM:"bottom",LEFT:m()?"right":"left"},jt={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:[0,0],container:!1,fallbackPlacements:["top","right","bottom","left"],boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},popperConfig:null},Ht={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"};class Bt extends R{constructor(t,e){if(void 0===i)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this._config=this._getConfig(e),this.tip=null,this._setListeners()}static get Default(){return jt}static get NAME(){return"tooltip"}static get Event(){return Ht}static get DefaultType(){return xt}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(t){if(this._isEnabled)if(t){const e=this._initializeOnDelegatedTarget(t);e._activeTrigger.click=!e._activeTrigger.click,e._isWithActiveTrigger()?e._enter(null,e):e._leave(null,e)}else{if(this.getTipElement().classList.contains("show"))return void this._leave(null,this);this._enter(null,this)}}dispose(){clearTimeout(this._timeout),H.off(this._element.closest(".modal"),"hide.bs.modal",this._hideModalHandler),this.tip&&this.tip.remove(),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this.isWithContent()||!this._isEnabled)return;const t=H.trigger(this._element,this.constructor.Event.SHOW),e=u(this._element),s=null===e?this._element.ownerDocument.documentElement.contains(this._element):e.contains(this._element);if(t.defaultPrevented||!s)return;"tooltip"===this.constructor.NAME&&this.tip&&this.getTitle()!==this.tip.querySelector(".tooltip-inner").innerHTML&&(this._disposePopper(),this.tip.remove(),this.tip=null);const n=this.getTipElement(),o=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME);n.setAttribute("id",o),this._element.setAttribute("aria-describedby",o),this._config.animation&&n.classList.add("fade");const r="function"==typeof this._config.placement?this._config.placement.call(this,n,this._element):this._config.placement,a=this._getAttachment(r);this._addAttachmentClass(a);const{container:l}=this._config;z.set(n,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||(l.append(n),H.trigger(this._element,this.constructor.Event.INSERTED)),this._popper?this._popper.update():this._popper=i.createPopper(this._element,n,this._getPopperConfig(a)),n.classList.add("show");const c=this._resolvePossibleFunction(this._config.customClass);c&&n.classList.add(...c.split(" ")),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(t=>{H.on(t,"mouseover",g)});const h=this.tip.classList.contains("fade");this._queueCallback(()=>{const t=this._hoverState;this._hoverState=null,H.trigger(this._element,this.constructor.Event.SHOWN),"out"===t&&this._leave(null,this)},this.tip,h)}hide(){if(!this._popper)return;const t=this.getTipElement();if(H.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented)return;t.classList.remove("show"),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(t=>H.off(t,"mouseover",g)),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1;const e=this.tip.classList.contains("fade");this._queueCallback(()=>{this._isWithActiveTrigger()||("show"!==this._hoverState&&t.remove(),this._cleanTipClass(),this._element.removeAttribute("aria-describedby"),H.trigger(this._element,this.constructor.Event.HIDDEN),this._disposePopper())},this.tip,e),this._hoverState=""}update(){null!==this._popper&&this._popper.update()}isWithContent(){return Boolean(this.getTitle())}getTipElement(){if(this.tip)return this.tip;const t=document.createElement("div");t.innerHTML=this._config.template;const e=t.children[0];return this.setContent(e),e.classList.remove("fade","show"),this.tip=e,this.tip}setContent(t){this._sanitizeAndSetContent(t,this.getTitle(),".tooltip-inner")}_sanitizeAndSetContent(t,e,i){const s=V.findOne(i,t);e||!s?this.setElementContent(s,e):s.remove()}setElementContent(t,e){if(null!==t)return a(e)?(e=l(e),void(this._config.html?e.parentNode!==t&&(t.innerHTML="",t.append(e)):t.textContent=e.textContent)):void(this._config.html?(this._config.sanitize&&(e=It(e,this._config.allowList,this._config.sanitizeFn)),t.innerHTML=e):t.textContent=e)}getTitle(){const t=this._element.getAttribute("data-bs-original-title")||this._config.title;return this._resolvePossibleFunction(t)}updateAttachment(t){return"right"===t?"end":"left"===t?"start":t}_initializeOnDelegatedTarget(t,e){return e||this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(t=>Number.parseInt(t,10)):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return"function"==typeof t?t.call(this._element):t}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"onChange",enabled:!0,phase:"afterWrite",fn:t=>this._handlePopperPlacementChange(t)}],onFirstUpdate:t=>{t.options.placement!==t.placement&&this._handlePopperPlacementChange(t)}};return{...e,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_addAttachmentClass(t){this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(t)}`)}_getAttachment(t){return Mt[t.toUpperCase()]}_setListeners(){this._config.trigger.split(" ").forEach(t=>{if("click"===t)H.on(this._element,this.constructor.Event.CLICK,this._config.selector,t=>this.toggle(t));else if("manual"!==t){const e="hover"===t?this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN,i="hover"===t?this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;H.on(this._element,e,this._config.selector,t=>this._enter(t)),H.on(this._element,i,this._config.selector,t=>this._leave(t))}}),this._hideModalHandler=()=>{this._element&&this.hide()},H.on(this._element.closest(".modal"),"hide.bs.modal",this._hideModalHandler),this._config.selector?this._config={...this._config,trigger:"manual",selector:""}:this._fixTitle()}_fixTitle(){const t=this._element.getAttribute("title"),e=typeof this._element.getAttribute("data-bs-original-title");(t||"string"!==e)&&(this._element.setAttribute("data-bs-original-title",t||""),!t||this._element.getAttribute("aria-label")||this._element.textContent||this._element.setAttribute("aria-label",t),this._element.setAttribute("title",""))}_enter(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusin"===t.type?"focus":"hover"]=!0),e.getTipElement().classList.contains("show")||"show"===e._hoverState?e._hoverState="show":(clearTimeout(e._timeout),e._hoverState="show",e._config.delay&&e._config.delay.show?e._timeout=setTimeout(()=>{"show"===e._hoverState&&e.show()},e._config.delay.show):e.show())}_leave(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusout"===t.type?"focu
12837s":"hover"]=e._element.contains(t.relatedTarget)),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState="out",e._config.delay&&e._config.delay.hide?e._timeout=setTimeout(()=>{"out"===e._hoverState&&e.hide()},e._config.delay.hide):e.hide())}_isWithActiveTrigger(){for(const t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1}_getConfig(t){const e=K.getDataAttributes(this._element);return Object.keys(e).forEach(t=>{Pt.has(t)&&delete e[t]}),(t={...this.constructor.Default,...e,..."object"==typeof t&&t?t:{}}).container=!1===t.container?document.body:l(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),c("tooltip",t,this.constructor.DefaultType),t.sanitize&&(t.template=It(t.template,t.allowList,t.sanitizeFn)),t}_getDelegateConfig(){const t={};for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t}_cleanTipClass(){const t=this.getTipElement(),e=new RegExp(`(^|\\s)${this._getBasicClassPrefix()}\\S+`,"g"),i=t.getAttribute("class").match(e);null!==i&&i.length>0&&i.map(t=>t.trim()).forEach(e=>t.classList.remove(e))}_getBasicClassPrefix(){return"bs-tooltip"}_handlePopperPlacementChange(t){const{state:e}=t;e&&(this.tip=e.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(e.placement)))}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null)}static jQueryInterface(t){return this.each((function(){const e=Bt.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}b(Bt);const zt={...Bt.Default,placement:"right",offset:[0,8],trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'},Rt={...Bt.DefaultType,content:"(string|element|function)"},Ft={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"};class qt extends Bt{static get Default(){return zt}static get NAME(){return"popover"}static get Event(){return Ft}static get DefaultType(){return Rt}isWithContent(){return this.getTitle()||this._getContent()}setContent(t){this._sanitizeAndSetContent(t,this.getTitle(),".popover-header"),this._sanitizeAndSetContent(t,this._getContent(),".popover-body")}_getContent(){return this._resolvePossibleFunction(this._config.content)}_getBasicClassPrefix(){return"bs-popover"}static jQueryInterface(t){return this.each((function(){const e=qt.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}b(qt);const Wt={offset:10,method:"auto",target:""},$t={offset:"number",method:"string",target:"(string|element)"},Ut=".nav-link, .list-group-item, .dropdown-item";class Kt extends R{constructor(t,e){super(t),this._scrollElement="BODY"===this._element.tagName?window:this._element,this._config=this._getConfig(e),this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,H.on(this._scrollElement,"scroll.bs.scrollspy",()=>this._process()),this.refresh(),this._process()}static get Default(){return Wt}static get NAME(){return"scrollspy"}refresh(){const t=this._scrollElement===this._scrollElement.window?"offset":"position",e="auto"===this._config.method?t:this._config.method,i="position"===e?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),V.find(Ut,this._config.target).map(t=>{const s=n(t),o=s?V.findOne(s):null;if(o){const t=o.getBoundingClientRect();if(t.width||t.height)return[K[e](o).top+i,s]}return null}).filter(t=>t).sort((t,e)=>t[0]-e[0]).forEach(t=>{this._offsets.push(t[0]),this._targets.push(t[1])})}dispose(){H.off(this._scrollElement,".bs.scrollspy"),super.dispose()}_getConfig(t){return(t={...Wt,...K.getDataAttributes(this._element),..."object"==typeof t&&t?t:{}}).target=l(t.target)||document.documentElement,c("scrollspy",t,$
vendor: 6,593 bytes, line 12837
12837t),t}_getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}_getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}_getOffsetHeight(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}_process(){const t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),i=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=i){const t=this._targets[this._targets.length-1];this._activeTarget!==t&&this._activate(t)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(let e=this._offsets.length;e--;)this._activeTarget!==this._targets[e]&&t>=this._offsets[e]&&(void 0===this._offsets[e+1]||t<this._offsets[e+1])&&this._activate(this._targets[e])}}_activate(t){this._activeTarget=t,this._clear();const e=Ut.split(",").map(e=>`${e}[data-bs-target="${t}"],${e}[href="${t}"]`),i=V.findOne(e.join(","),this._config.target);i.classList.add("active"),i.classList.contains("dropdown-item")?V.findOne(".dropdown-toggle",i.closest(".dropdown")).classList.add("active"):V.parents(i,".nav, .list-group").forEach(t=>{V.prev(t,".nav-link, .list-group-item").forEach(t=>t.classList.add("active")),V.prev(t,".nav-item").forEach(t=>{V.children(t,".nav-link").forEach(t=>t.classList.add("active"))})}),H.trigger(this._scrollElement,"activate.bs.scrollspy",{relatedTarget:t})}_clear(){V.find(Ut,this._config.target).filter(t=>t.classList.contains("active")).forEach(t=>t.classList.remove("active"))}static jQueryInterface(t){return this.each((function(){const e=Kt.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}H.on(window,"load.bs.scrollspy.data-api",()=>{V.find('[data-bs-spy="scroll"]').forEach(t=>new Kt(t))}),b(Kt);class Vt extends R{static get NAME(){return"tab"}show(){if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.classList.contains("active"))return;let t;const e=o(this._element),i=this._element.closest(".nav, .list-group");if(i){const e="UL"===i.nodeName||"OL"===i.nodeName?":scope > li > .active":".active";t=V.find(e,i),t=t[t.length-1]}const s=t?H.trigger(t,"hide.bs.tab",{relatedTarget:this._element}):null;if(H.trigger(this._element,"show.bs.tab",{relatedTarget:t}).defaultPrevented||null!==s&&s.defaultPrevented)return;this._activate(this._element,i);const n=()=>{H.trigger(t,"hidden.bs.tab",{relatedTarget:this._element}),H.trigger(this._element,"shown.bs.tab",{relatedTarget:t})};e?this._activate(e,e.parentNode,n):n()}_activate(t,e,i){const s=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?V.children(e,".active"):V.find(":scope > li > .active",e))[0],n=i&&s&&s.classList.contains("fade"),o=()=>this._transitionComplete(t,s,i);s&&n?(s.classList.remove("show"),this._queueCallback(o,t,!0)):o()}_transitionComplete(t,e,i){if(e){e.classList.remove("active");const t=V.findOne(":scope > .dropdown-menu .active",e.parentNode);t&&t.classList.remove("active"),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}t.classList.add("active"),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),p(t),t.classList.contains("fade")&&t.classList.add("show");let s=t.parentNode;if(s&&"LI"===s.nodeName&&(s=s.parentNode),s&&s.classList.contains("dropdown-menu")){const e=t.closest(".dropdown");e&&V.find(".dropdown-toggle",e).forEach(t=>t.classList.add("active")),t.setAttribute("aria-expanded",!0)}i&&i()}static jQueryInterface(t){return this.each((function(){const e=Vt.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}H.on(document,"click.bs.tab.data-api",'[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),d(this)||Vt.getOrCreateInstance(this).show()})),b(Vt);const Xt={animation:"boolean",autohide:"boolean",delay:"number"},Yt={animation:!0,autohide:!0,delay:5e3};class Qt extends R{constructor(t,e){super(t),this._config=this._getConfig(e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get DefaultType(){return Xt}static get Default(){return Yt}static get NAME(){return"toast"}show(){H.trigger(this._element,"show.bs.toast").defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove("hide"),p(this._element),this._element.classList.add("show"),this._element.classList.add("showing"),this._queueCallback(()=>{this._element.classList.remove("showing"),H.trigger(this._element,"shown.bs.toast"),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this._element.classList.contains("show")&&(H.trigger(this._element,"hide.bs.toast").defaultPrevented||(this._element.classList.add("showing"),this._queueCallback(()=>{this._element.classList.add("hide"),this._element.classList.remove("showing"),this._element.classList.remove("show"),H.trigger(this._element,"hidden.bs.toast")},this._element,this._config.animation)))}dispose(){this._clearTimeout(),this._element.classList.contains("show")&&this._element.classList.remove("show"),super.dispose()}_getConfig(t){return t={...Yt,...K.getDataAttributes(this._element),..."object"==typeof t&&t?t:{}},c("toast",t,this.constructor.DefaultType),t}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){H.on(this._element,"mouseover.bs.toast",t=>this._onInteraction(t,!0)),H.on(this._element,"mouseout.bs.toast",t=>this._onInteraction(t,!1)),H.on(this._element,"focusin.bs.toast",t=>this._onInteraction(t,!0)),H.on(this._element,"focusout.bs.toast",t=>this._onInteraction(t,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=Qt.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}return F(Qt),b(Qt),{Alert:
vendor: 12,384 bytes, lines 12837-12839
12837q,Button:W,Carousel:et,Collapse:nt,Dropdown:pt,Modal:Tt,Offcanvas:Lt,Popover:qt,ScrollSpy:Kt,Tab:Vt,Toast:Qt,Tooltip:Bt}}));
12838//# sourceMappingURL=bootstrap.min.js.map
12839!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define(a):e.moment=a()}(this,function(){"use strict";var e,n;function M(){return e.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function _(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function h(e,a){return Object.prototype.hasOwnProperty.call(e,a)}function o(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var a in e)if(h(e,a))return;return 1}function r(e){return void 0===e}function m(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function u(e,a){for(var t=[],s=0;s<e.length;++s)t.push(a(e[s],s));return t}function l(e,a){for(var t in a)h(a,t)&&(e[t]=a[t]);return h(a,"toString")&&(e.toString=a.toString),h(a,"valueOf")&&(e.valueOf=a.valueOf),e}function c(e,a,t,s){return Sa(e,a,t,s,!0).utc()}function L(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function Y(e){if(null==e._isValid){var a=L(e),t=n.call(a.parsedDateParts,function(e){return null!=e}),s=!isNaN(e._d.getTime())&&a.overflow<0&&!a.empty&&!a.invalidEra&&!a.invalidMonth&&!a.invalidWeekday&&!a.weekdayMismatch&&!a.nullInput&&!a.invalidFormat&&!a.userInvalidated&&(!a.meridiem||a.meridiem&&t);if(e._strict&&(s=s&&0===a.charsLeftOver&&0===a.unusedTokens.length&&void 0===a.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return s;e._isValid=s}return e._isValid}function y(e){var a=c(NaN);return null!=e?l(L(a),e):L(a).userInvalidated=!0,a}n=Array.prototype.some?Array.prototype.some:function(e){for(var a=Object(this),t=a.length>>>0,s=0;s<t;s++)if(s in a&&e.call(this,a[s],s,a))return!0;return!1};var f=M.momentProperties=[],a=!1;function p(e,a){var t,s,n;if(r(a._isAMomentObject)||(e._isAMomentObject=a._isAMomentObject),r(a._i)||(e._i=a._i),r(a._f)||(e._f=a._f),r(a._l)||(e._l=a._l),r(a._strict)||(e._strict=a._strict),r(a._tzm)||(e._tzm=a._tzm),r(a._isUTC)||(e._isUTC=a._isUTC),r(a._offset)||(e._offset=a._offset),r(a._pf)||(e._pf=L(a)),r(a._locale)||(e._locale=a._locale),0<f.length)for(t=0;t<f.length;t++)r(n=a[s=f[t]])||(e[s]=n);return e}function k(e){p(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===a&&(a=!0,M.updateOffset(this),a=!1)}function D(e){return e instanceof k||null!=e&&null!=e._isAMomentObject}function T(e){!1===M.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function t(n,r){var d=!0;return l(function(){if(null!=M.deprecationHandler&&M.deprecationHandler(null,n),d){for(var e,a,t=[],s=0;s<arguments.length;s++){if(e="","object"==typeof arguments[s]){for(a in e+="\n["+s+"] ",arguments[0])h(arguments[0],a)&&(e+=a+": "+arguments[0][a]+", ");e=e.slice(0,-2)}else e=arguments[s];t.push(e)}T(n+"\nArguments: "+Array.prototype.slice.call(t).join("")+"\n"+(new Error).stack),d=!1}return r.apply(this,arguments)},r)}var s,g={};function w(e,a){null!=M.deprecationHandler&&M.deprecationHandler(e,a),g[e]||(T(a),g[e]=!0)}function v(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function b(e,a){var t,s=l({},e);for(t in a)h(a,t)&&(_(e[t])&&_(a[t])?(s[t]={},l(s[t],e[t]),l(s[t],a[t])):null!=a[t]?s[t]=a[t]:delete s[t]);for(t in e)h(e,t)&&!h(a,t)&&_(e[t])&&(s[t]=l({},s[t]));return s}function S(e){null!=e&&this.set(e)}M.suppressDeprecationWarnings=!1,M.deprecationHandler=null,s=Object.keys?Object.keys:function(e){var a,t=[];for(a in e)h(e,a)&&t.push(a);return t};function H(e,a,t){var s=""+Math.abs(e),n=a-s.length;return(0<=e?t?"+":"":"-")+Math.pow(10,Math.max(0,n)).toString().substr(1)+s}var j=/(\[[^\[]*\])|(\\)?([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,x=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,P={},O={};function W(e,a,t,s){var n="string"==typeof s?function(){return this[s]()}:s;e&&(O[e]=n),a&&(O[a[0]]=function(){return H(n.apply(this,arguments),a[1],a[2])}),t&&(O[t]=function(){return this.localeData().ordinal(n.apply(this,arguments),e)})}function A(e,a){return e.isValid()?(a=E(a,e.localeData()),P[a]=P[a]||function(s){for(var e,n=s.match(j),a=0,r=n.length;a<r;a++)O[n[a]]?n[a]=O[n[a]]:n[a]=(e=n[a]).match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"");return function(e){for(var a="",t=0;t<r;t++)a+=v(n[t])?n[t].call(e,s):n[t];return a}}(a),P[a](e)):e.localeData().invalidDate()}function E(e,a){var t=5;function s(e){return a.longDateFormat(e)||e}for(x.lastIndex=0;0<=t&&x.test(e);)e=e.replace(x,s),x.lastIndex=0,--t;return e}var F={};function z(e,a){var t=e.toLowerCase();F[t]=F[t+"s"]=F[a]=e}function N(e){return"string"==typeof e?F[e]||F[e.toLowerCase()]:void 0}function J(e){var a,t,s={};for(t in e)h(e,t)&&(a=N(t))&&(s[a]=e[t]);return s}var R={};function C(e,a){R[e]=a}function I(e){return e%4==0&&e%100!=0||e%400==0}function U(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function G(e){var a=+e,t=0;return 0!=a&&isFinite(a)&&(t=U(a)),t}function V(a,t){return function(e){return null!=e?(K(this,a,e),M.updateOffset(this,t),this):B(this,a)}}function B(e,a){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+a]():NaN}function K(e,a,t){e.isValid()&&!isNaN(t)&&("FullYear"===a&&I(e.year())&&1===e.month()&&29===e.date()?(t=G(t),e._d["set"+(e._isUTC?"UTC":"")+a](t,e.month(),Se(t,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+a](t))}var q,Z=/\d/,$=/\d\d/,Q=/\d{3}/,X=/\d{4}/,ee=/[+-]?\d{6}/,ae=/\d\d?/,te=/\d\d\d\d?/,se=/\d\d\d\d\d\d?/,ne=/\d{1,3}/,re=/\d{1,4}/,de=/[+-]?\d{1,6}/,ie=/\d+/,_e=/[+-]?\d+/,oe=/Z|[+-]\d\d:?\d\d/gi,me=/Z|[+-]\d\d(?::?\d\d)?/gi,ue=/[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;function le(e,t,s){q[e]=v(t)?t:function(e,a){return e&&s?s:t}}function Me(e,a){return h(q,e)?q[e](a._strict,a._locale):new RegExp(he(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,a,t,s,n){return a||t||s||n})))}function he(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}q={};var ce={};function Le(e,t){var a,s=t;for("string"==typeof e&&(e=[e]),m(t)&&(s=function(e,a){a[t]=G(e)}),a=0;a<e.length;a++)ce[e[a]]=s}function Ye(e,n){Le(e,function(e,a,t,s){t._w=t._w||{},n(e,t._w,t,s)})}var ye,fe=0,pe=1,ke=2,De=3,Te=4,ge=5,we=6,ve=7,be=8;function Se(e,a){if(isNaN(e)||isNaN(a))return NaN;var t,s=(a%(t=12)+t)%t;return e+=(a-s)/12,1==s?I(e)?29:28:31-s%7%2}ye=Array.prototype.indexOf?Array.prototype.indexOf:function(e){for(var a=0;a<this.length;++a)if(this[a]===e)return a;return-1},W("M",["MM",2],"Mo",function(){return this.month()+1}),W("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),W("MMMM",0,0,function(e){return this.localeData().months(this,e)}),z("month","M"),C("month",8),le("M",ae),le("MM",ae,$),le("MMM",function(e,a){return a.monthsShortRegex(e)}),le("MMMM",function(e,a){return a.monthsRegex(e)}),Le(["M","MM"],function(e,a){a[pe]=G(e)-1}),Le(["MMM","MMMM"],function(e,a,t,s){var n=t._locale.monthsParse(e,s,t._strict);null!=n?a[pe]=n:L(t).invalidMonth=e});var He="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),je="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),xe=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Pe=ue,Oe=ue;function We(e,a){var t;if(!e.isValid())return e;if("string"==typeof a)if(/^\d+$/.test(a))a=G(a);else if(!m(a=e.localeData().monthsParse(a)))return e;return t=Math.min(e.date(),Se(e.year(),a)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](a,t),e}function Ae(e){return null!=e?(We(this,e),M.updateOffset(this,!0),this):B(this,"Month")}function Ee(){function e(e,a){return a.length-e.length}for(var a,t=[],s=[],n=[],r=0;r<12;r++)a=c([2e3,r]),t.push(this.monthsShort(a,"")),s.push(this.months(a,"")),n.push(this.months(a,"")),n.push(this.monthsShort(a,""));for(t.sort(e),s.sort(e),n.sort(e),r=0;r<12;r++)t[r]=he(t[r]),s[r]=he(s[r]);for(r=0;r<24;r++)n[r]=he(n[r]);this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Fe(e){return I(e)?366:365}W("Y",0,0,function(){var e=this.year();return e<=9999?H(e,4):"+"+e}),W(0,["YY",2],0,function(){return this.year()%100}),W(0,["YYYY",4],0,"year"),W(0,["YYYYY",5],0,"year"),W(0,["YYYYYY",6,!0],0,"year"),z("year","y"),C("year",1),le("Y",_e),le("YY",ae,$),le("YYYY",re,X),le("YYYYY",de,ee),le("YYYYYY",de,ee),Le(["YYYYY","YYYYYY"],fe),Le("YYYY",function(e,a){a[fe]=2===e.length?M.parseTwoDigitYear(e):G(e)}),Le("YY",function(e,a){a[fe]=M.parseTwoDigitYear(e)}),Le("Y",function(e,a){a[fe]=parseInt(e,10)}),M.parseTwoDigitYear=function(e){return G(e)+(68<G(e)?1900:2e3)};var ze=V("FullYear",!0);function Ne(e){var a,t;return e<100&&0<=e?((t=Array.prototype.slice.call(arguments))[0]=e+400,a=new Date(Date.UTC.apply(null,t)),isFinite(a.getUTCFullYear())&&a.setUTCFullYear(e)):a=new Date(Date.UTC.apply(null,arguments)),a}function Je(e,a,t){var s=7+a-t;return s-(7+Ne(e,0,s).getUTCDay()-a)%7-1}function Re(e,a,t,s,n){var r,d=1+7*(a-1)+(7+t-s)%7+Je(e,s,n),i=d<=0?Fe(r=e-1)+d:d>Fe(e)?(r=e+1,d-Fe(e)):(r=e,d);return{year:r,dayOfYear:i}}function Ce(e,a,t){var s,n,r=Je(e.year(),a,t),d=Math.floor((e.dayOfYear()-r-1)/7)+1;return d<1?s=d+Ie(n=e.year()-1,a,t):d>Ie(e.year(),a,t)?(s=d-Ie(e.year(),a,t),n=e.year()+1):(n=e.year(),s=d),{week:s,year:n}}function Ie(e,a,t){var s=Je(e,a,t),n=Je(e+1,a,t);return(Fe(e)-s+n)/7}W("w",["ww",2],"wo","week"),W("W",["WW",2],"Wo","isoWeek"),z("week","w"),z("isoWeek","W"),C("week",5),C("isoWeek",5),le("w",ae),le("ww",ae,$),le("W",ae),le("WW",ae,$),Ye(["w","ww","W","WW"],function(e,a,t,s){a[s.substr(0,1)]=G(e)});function Ue(e,a){return e.slice(a,7).concat(e.slice(0,a))}W("d",0,"do","day"),W("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),W("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),W("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),W("e",0,0,"weekday"),W("E",0,0,"isoWeekday"),z("day","d"),z("weekday","e"),z("isoWeekday","E"),C("day",11),C("weekday",11),C("isoWeekday",11),le("d",ae),le("e",ae),le("E",ae),le("dd",function(e,a){return a.weekdaysMinRegex(e)}),le("ddd",function(e,a){return a.weekdaysShortRegex(e)}),le("dddd",function(e,a){return a.weekdaysRegex(e)}),Ye(["dd","ddd","dddd"],function(e,a,t,s){var n=t._locale.weekdaysParse(e,s,t._strict);null!=n?a.d=n:L(t).invalidWeekday=e}),Ye(["d","e","E"],function(e,a,t,s){a[s]=G(e)});var Ge="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ve="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Be="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ke=ue,qe=ue,Ze=ue;function $e(){function e(e,a){return a.length-e.length}for(var a,t,s,n,r=[],d=[],i=[],_=[],o=0;o<7;o++)a=c([2e3,1]).day(o),t=he(this.weekdaysMin(a,"")),s=he(this.weekdaysShort(a,"")),n=he(this.weekdays(a,"")),r.push(t),d.push(s),i.push(n),_.push(t),_.push(s),_.push(n);r.sort(e),d.sort(e),i.sort(e),_.sort(e),this._weekdaysRegex=new RegExp("^("+_.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Qe(){return this.hours()%12||12}function Xe(e,a){W(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),a)})}function ea(e,a){return a._meridiemParse}W("H",["HH",2],0,"hour"),W("h",["hh",2],0,Qe),W("k",["kk",2],0,function(){return this.hours()||24}),W("hmm",0,0,function(){return""+Qe.apply(this)+H(this.minutes(),2)}
vendor: 5,196 bytes, line 12839
12839),W("hmmss",0,0,function(){return""+Qe.apply(this)+H(this.minutes(),2)+H(this.seconds(),2)}),W("Hmm",0,0,function(){return""+this.hours()+H(this.minutes(),2)}),W("Hmmss",0,0,function(){return""+this.hours()+H(this.minutes(),2)+H(this.seconds(),2)}),Xe("a",!0),Xe("A",!1),z("hour","h"),C("hour",13),le("a",ea),le("A",ea),le("H",ae),le("h",ae),le("k",ae),le("HH",ae,$),le("hh",ae,$),le("kk",ae,$),le("hmm",te),le("hmmss",se),le("Hmm",te),le("Hmmss",se),Le(["H","HH"],De),Le(["k","kk"],function(e,a,t){var s=G(e);a[De]=24===s?0:s}),Le(["a","A"],function(e,a,t){t._isPm=t._locale.isPM(e),t._meridiem=e}),Le(["h","hh"],function(e,a,t){a[De]=G(e),L(t).bigHour=!0}),Le("hmm",function(e,a,t){var s=e.length-2;a[De]=G(e.substr(0,s)),a[Te]=G(e.substr(s)),L(t).bigHour=!0}),Le("hmmss",function(e,a,t){var s=e.length-4,n=e.length-2;a[De]=G(e.substr(0,s)),a[Te]=G(e.substr(s,2)),a[ge]=G(e.substr(n)),L(t).bigHour=!0}),Le("Hmm",function(e,a,t){var s=e.length-2;a[De]=G(e.substr(0,s)),a[Te]=G(e.substr(s))}),Le("Hmmss",function(e,a,t){var s=e.length-4,n=e.length-2;a[De]=G(e.substr(0,s)),a[Te]=G(e.substr(s,2)),a[ge]=G(e.substr(n))});var aa=V("Hours",!0);var ta,sa={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:He,monthsShort:je,week:{dow:0,doy:6},weekdays:Ge,weekdaysMin:Be,weekdaysShort:Ve,meridiemParse:/[ap]\.?m?\.?/i},na={},ra={};function da(e){return e?e.toLowerCase().replace("_","-"):e}function ia(e){for(var a,t,s,n,r=0;r<e.length;){for(a=(n=da(e[r]).split("-")).length,t=(t=da(e[r+1]))?t.split("-"):null;0<a;){if(s=_a(n.slice(0,a).join("-")))return s;if(t&&t.length>=a&&function(e,a){for(var t=Math.min(e.length,a.length),s=0;s<t;s+=1)if(e[s]!==a[s])return s;return t}(n,t)>=a-1)break;a--}r++}return ta}function _a(a){var e;if(void 0===na[a]&&"undefined"!=typeof module&&module&&module.exports)try{e=ta._abbr,require("./locale/"+a),oa(e)}catch(e){na[a]=null}return na[a]}function oa(e,a){var t;return e&&((t=r(a)?ua(e):ma(e,a))?ta=t:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ta._abbr}function ma(e,a){if(null===a)return delete na[e],null;var t,s=sa;if(a.abbr=e,null!=na[e])w("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=na[e]._config;else if(null!=a.parentLocale)if(null!=na[a.parentLocale])s=na[a.parentLocale]._config;else{if(null==(t=_a(a.parentLocale)))return ra[a.parentLocale]||(ra[a.parentLocale]=[]),ra[a.parentLocale].push({name:e,config:a}),null;s=t._config}return na[e]=new S(b(s,a)),ra[e]&&ra[e].forEach(function(e){ma(e.name,e.config)}),oa(e),na[e]}function ua(e){var a;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ta;if(!i(e)){if(a=_a(e))return a;e=[e]}return ia(e)}function la(e){var a,t=e._a;return t&&-2===L(e).overflow&&(a=t[pe]<0||11<t[pe]?pe:t[ke]<1||t[ke]>Se(t[fe],t[pe])?ke:t[De]<0||24<t[De]||24===t[De]&&(0!==t[Te]||0!==t[ge]||0!==t[we])?De:t[Te]<0||59<t[Te]?Te:t[ge]<0||59<t[ge]?ge:t[we]<0||999<t[we]?we:-1,L(e)._overflowDayOfYear&&(a<fe||ke<a)&&(a=ke),L(e)._overflowWeeks&&-1===a&&(a=ve),L(e)._overflowWeekday&&-1===a&&(a=be),L(e).overflow=a),e}var Ma=/^\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)?)?$/,ha=/^\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)?)?$/,ca=/Z|[+-]\d\d(?::?\d\d)?/,La=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Ya=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],ya=/^\/?Date\((-?\d+)/i,fa=/^(?:(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}))$/,pa={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ka(e){var a,t,s,n,r,d,i=e._i,_=Ma.exec(i)||ha.exec(i);if(_){for(L(e).iso=!0,a=0,t=La.length;a<t;
vendor: 4,302 bytes, line 12839
12839a++)if(La[a][1].exec(_[1])){n=La[a][0],s=!1!==La[a][2];break}if(null==n)return void(e._isValid=!1);if(_[3]){for(a=0,t=Ya.length;a<t;a++)if(Ya[a][1].exec(_[3])){r=(_[2]||" ")+Ya[a][0];break}if(null==r)return void(e._isValid=!1)}if(!s&&null!=r)return void(e._isValid=!1);if(_[4]){if(!ca.exec(_[4]))return void(e._isValid=!1);d="Z"}e._f=n+(r||"")+(d||""),va(e)}else e._isValid=!1}function Da(e,a,t,s,n,r){var d=[function(e){var a=parseInt(e,10);{if(a<=49)return 2e3+a;if(a<=999)return 1900+a}return a}(e),je.indexOf(a),parseInt(t,10),parseInt(s,10),parseInt(n,10)];return r&&d.push(parseInt(r,10)),d}function Ta(e){var a,t,s,n,r=fa.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(r){if(a=Da(r[4],r[3],r[2],r[5],r[6],r[7]),t=r[1],s=a,n=e,t&&Ve.indexOf(t)!==new Date(s[0],s[1],s[2]).getDay()&&(L(n).weekdayMismatch=!0,!void(n._isValid=!1)))return;e._a=a,e._tzm=function(e,a,t){if(e)return pa[e];if(a)return 0;var s=parseInt(t,10),n=s%100;return 60*((s-n)/100)+n}(r[8],r[9],r[10]),e._d=Ne.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),L(e).rfc2822=!0}else e._isValid=!1}function ga(e,a,t){return null!=e?e:null!=a?a:t}function wa(e){var a,t,s,n,r,d,i,_=[];if(!e._d){for(d=e,i=new Date(M.now()),s=d._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()],e._w&&null==e._a[ke]&&null==e._a[pe]&&function(e){var a,t,s,n,r,d,i,_,o;null!=(a=e._w).GG||null!=a.W||null!=a.E?(r=1,d=4,t=ga(a.GG,e._a[fe],Ce(Ha(),1,4).year),s=ga(a.W,1),((n=ga(a.E,1))<1||7<n)&&(_=!0)):(r=e._locale._week.dow,d=e._locale._week.doy,o=Ce(Ha(),r,d),t=ga(a.gg,e._a[fe],o.year),s=ga(a.w,o.week),null!=a.d?((n=a.d)<0||6<n)&&(_=!0):null!=a.e?(n=a.e+r,(a.e<0||6<a.e)&&(_=!0)):n=r);s<1||s>Ie(t,r,d)?L(e)._overflowWeeks=!0:null!=_?L(e)._overflowWeekday=!0:(i=Re(t,s,n,r,d),e._a[fe]=i.year,e._dayOfYear=i.dayOfYear)}(e),null!=e._dayOfYear&&(r=ga(e._a[fe],s[fe]),(e._dayOfYear>Fe(r)||0===e._dayOfYear)&&(L(e)._overflowDayOfYear=!0),t=Ne(r,0,e._dayOfYear),e._a[pe]=t.getUTCMonth(),e._a[ke]=t.getUTCDate()),a=0;a<3&&null==e._a[a];++a)e._a[a]=_[a]=s[a];for(;a<7;a++)e._a[a]=_[a]=null==e._a[a]?2===a?1:0:e._a[a];24===e._a[De]&&0===e._a[Te]&&0===e._a[ge]&&0===e._a[we]&&(e._nextDay=!0,e._a[De]=0),e._d=(e._useUTC?Ne:function(e,a,t,s,n,r,d){var i;return e<100&&0<=e?(i=new Date(e+400,a,t,s,n,r,d),isFinite(i.getFullYear())&&i.setFullYear(e)):i=new Date(e,a,t,s,n,r,d),i}).apply(null,_),n=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[De]=24),e._w&&void 0!==e._w.d&&e._w.d!==n&&(L(e).weekdayMismatch=!0)}}function va(e){if(e._f!==M.ISO_8601)if(e._f!==M.RFC_2822){e._a=[],L(e).empty=!0;for(var a,t,s,n,r,d,i,_=""+e._i,o=_.length,m=0,u=E(e._f,e._locale).match(j)||[],l=0;l<u.length;l++)t=u[l],(a=(_.match(Me(t,e))||[])[0])&&(0<(s=_.substr(0,_.indexOf(a))).length&&L(e).unusedInput.push(s),_=_.slice(_.indexOf(a)+a.length),m+=a.length),O[t]?(a?L(e).empty=!1:L(e).unusedTokens.push(t),r=t,i=e,null!=(d=a)&&h(ce,r)&&ce[r](d,i._a,i,r)):e._strict&&!a&&L(e).unusedTokens.push(t);L(e).charsLeftOver=o-m,0<_.length&&L(e).unusedInput.push(_),e._a[De]<=12&&!0===L(e).bigHour&&0<e._a[De]&&(L(e).bigHour=void 0),L(e).parsedDateParts=e._a.slice(0),L(e).meridiem=e._meridiem,e._a[De]=function(e,a,t){var s;if(null==t)return a;return null!=e.meridiemHour?e.meridiemHour(a,t):(null!=e.isPM&&((s=e.isPM(t))&&a<12&&(a+=12),s||12!==a||(a=0)),a)}(e._locale,e._a[De],e._meridiem),null!==(n=L(e).era)&&(e._a[fe]=e._locale.erasConvertYear(n,e._a[fe])),wa(e),la(e)}else Ta(e);else ka(e)}function ba(e){var a,t,s=e._i,n=e._f;return e._locale=e._locale||ua(e._l),null===s||void 0===n&&""===s?y({nullInput:!0}):("string"==typeof s&&(e._i=s=e._locale.preparse(s)),D(s)?new k(la(s)):(d(s)?e._d=s:i(n)?function(e){var a,t,s,n,r,d,i=!1;if(0===e._f.length)return L(e).invalidFormat=!0,e._d=new Date(NaN);for(n=0;n<e._f.length;n++)r=0,d=!1,a=p({},e),null!=e._useUTC&&(a._useUTC=e._useUTC),a._f=e._f[n],va(a),Y(a)&&(d=!0),r+=L(a).charsLeftOver,r+=10*L(a).unusedTokens.length,L(a).score=r,i?r<s&&(s=r,t=a):(null==s||r<s||d)&&(s=r,t=a,d&&(i=!0));l(e,t||a)}(e):n?va(e):r(t=(a=e)._i)?a._d=new Date(M.now()):d(t)?a._d=new Date(t.valueOf()):"string"==typeof t?function(e){var a=ya.exec(e._i);
vendor: 12,813 bytes, line 12839
12839null===a?(ka(e),!1===e._isValid&&(delete e._isValid,Ta(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:M.createFromInputFallback(e)))):e._d=new Date(+a[1])}(a):i(t)?(a._a=u(t.slice(0),function(e){return parseInt(e,10)}),wa(a)):_(t)?function(e){var a,t;e._d||(t=void 0===(a=J(e._i)).day?a.date:a.day,e._a=u([a.year,a.month,t,a.hour,a.minute,a.second,a.millisecond],function(e){return e&&parseInt(e,10)}),wa(e))}(a):m(t)?a._d=new Date(t):M.createFromInputFallback(a),Y(e)||(e._d=null),e))}function Sa(e,a,t,s,n){var r,d={};return!0!==a&&!1!==a||(s=a,a=void 0),!0!==t&&!1!==t||(s=t,t=void 0),(_(e)&&o(e)||i(e)&&0===e.length)&&(e=void 0),d._isAMomentObject=!0,d._useUTC=d._isUTC=n,d._l=t,d._i=e,d._f=a,d._strict=s,(r=new k(la(ba(d))))._nextDay&&(r.add(1,"d"),r._nextDay=void 0),r}function Ha(e,a,t,s){return Sa(e,a,t,s,!1)}M.createFromInputFallback=t("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),M.ISO_8601=function(){},M.RFC_2822=function(){};var ja=t("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ha.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:y()}),xa=t("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ha.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:y()});function Pa(e,a){var t,s;if(1===a.length&&i(a[0])&&(a=a[0]),!a.length)return Ha();for(t=a[0],s=1;s<a.length;++s)a[s].isValid()&&!a[s][e](t)||(t=a[s]);return t}var Oa=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Wa(e){var a=J(e),t=a.year||0,s=a.quarter||0,n=a.month||0,r=a.week||a.isoWeek||0,d=a.day||0,i=a.hour||0,_=a.minute||0,o=a.second||0,m=a.millisecond||0;this._isValid=function(e){var a,t,s=!1;for(a in e)if(h(e,a)&&(-1===ye.call(Oa,a)||null!=e[a]&&isNaN(e[a])))return!1;for(t=0;t<Oa.length;++t)if(e[Oa[t]]){if(s)return!1;parseFloat(e[Oa[t]])!==G(e[Oa[t]])&&(s=!0)}return!0}(a),this._milliseconds=+m+1e3*o+6e4*_+1e3*i*60*60,this._days=+d+7*r,this._months=+n+3*s+12*t,this._data={},this._locale=ua(),this._bubble()}function Aa(e){return e instanceof Wa}function Ea(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Fa(e,t){W(e,0,0,function(){var e=this.utcOffset(),a="+";return e<0&&(e=-e,a="-"),a+H(~~(e/60),2)+t+H(~~e%60,2)})}Fa("Z",":"),Fa("ZZ",""),le("Z",me),le("ZZ",me),Le(["Z","ZZ"],function(e,a,t){t._useUTC=!0,t._tzm=Na(me,e)});var za=/([\+\-]|\d\d)/gi;function Na(e,a){var t,s,n=(a||"").match(e);return null===n?null:0===(s=60*(t=((n[n.length-1]||[])+"").match(za)||["-",0,0])[1]+G(t[2]))?0:"+"===t[0]?s:-s}function Ja(e,a){var t,s;return a._isUTC?(t=a.clone(),s=(D(e)||d(e)?e.valueOf():Ha(e).valueOf())-t.valueOf(),t._d.setTime(t._d.valueOf()+s),M.updateOffset(t,!1),t):Ha(e).local()}function Ra(e){return-Math.round(e._d.getTimezoneOffset())}function Ca(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}M.updateOffset=function(){};var Ia=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Ua=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ga(e,a){var t,s,n,r=e,d=null;return Aa(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:m(e)||!isNaN(+e)?(r={},a?r[a]=+e:r.milliseconds=+e):(d=Ia.exec(e))?(t="-"===d[1]?-1:1,r={y:0,d:G(d[ke])*t,h:G(d[De])*t,m:G(d[Te])*t,s:G(d[ge])*t,ms:G(Ea(1e3*d[we]))*t}):(d=Ua.exec(e))?(t="-"===d[1]?-1:1,r={y:Va(d[2],t),M:Va(d[3],t),w:Va(d[4],t),d:Va(d[5],t),h:Va(d[6],t),m:Va(d[7],t),s:Va(d[8],t)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(n=function(e,a){var t;if(!e.isValid()||!a.isValid())return{milliseconds:0,months:0};a=Ja(a,e),e.isBefore(a)?t=Ba(e,a):((t=Ba(a,e)).milliseconds=-t.milliseconds,t.months=-t.months);return t}(Ha(r.from),Ha(r.to)),(r={}).ms=n.milliseconds,r.M=n.months),s=new Wa(r),Aa(e)&&h(e,"_locale")&&(s._locale=e._locale),Aa(e)&&h(e,"_isValid")&&(s._isValid=e._isValid),s}function Va(e,a){var t=e&&parseFloat(e.replace(",","."));return(isNaN(t)?0:t)*a}function Ba(e,a){var t={};return t.months=a.month()-e.month()+12*(a.year()-e.year()),e.clone().add(t.months,"M").isAfter(a)&&--t.months,t.milliseconds=a-e.clone().add(t.months,"M"),t}function Ka(s,n){return function(e,a){var t;return null===a||isNaN(+a)||(w(n,"moment()."+n+"(period, number) is deprecated. Please use moment()."+n+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),t=e,e=a,a=t),qa(this,Ga(e,a),s),this}}function qa(e,a,t,s){var n=a._milliseconds,r=Ea(a._days),d=Ea(a._months);e.isValid()&&(s=null==s||s,d&&We(e,B(e,"Month")+d*t),r&&K(e,"Date",B(e,"Date")+r*t),n&&e._d.setTime(e._d.valueOf()+n*t),s&&M.updateOffset(e,r||d))}Ga.fn=Wa.prototype,Ga.invalid=function(){return Ga(NaN)};var Za=Ka(1,"add"),$a=Ka(-1,"subtract");function Qa(e){return"string"==typeof e||e instanceof String}function Xa(e){return D(e)||d(e)||Qa(e)||m(e)||function(a){var e=i(a),t=!1;e&&(t=0===a.filter(function(e){return!m(e)&&Qa(a)}).length);return e&&t}(e)||function(e){var a,t,s=_(e)&&!o(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"];for(a=0;a<r.length;a+=1)t=r[a],n=n||h(e,t);return s&&n}(e)||null==e}function et(e,a){if(e.date()<a.date())return-et(a,e);var t=12*(a.year()-e.year())+(a.month()-e.month()),s=e.clone().add(t,"months"),n=a-s<0?(a-s)/(s-e.clone().add(t-1,"months")):(a-s)/(e.clone().add(1+t,"months")-s);return-(t+n)||0}function at(e){var a;return void 0===e?this._locale._abbr:(null!=(a=ua(e))&&(this._locale=a),this)}M.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",M.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var tt=t("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function st(){return this._locale}var nt=126227808e5;function rt(e,a){return(e%a+a)%a}function dt(e,a,t){return e<100&&0<=e?new Date(e+400,a,t)-nt:new Date(e,a,t).valueOf()}function it(e,a,t){return e<100&&0<=e?Date.UTC(e+400,a,t)-nt:Date.UTC(e,a,t)}function _t(e,a){return a.erasAbbrRegex(e)}function ot(){for(var e=[],a=[],t=[],s=[],n=this.eras(),r=0,d=n.length;r<d;++r)a.push(he(n[r].name)),e.push(he(n[r].abbr)),t.push(he(n[r].narrow)),s.push(he(n[r].name)),s.push(he(n[r].abbr)),s.push(he(n[r].narrow));this._erasRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+a.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+t.join("|")+")","i")}function mt(e,a){W(0,[e,e.length],0,a)}function ut(e,a,t,s,n){var r;return null==e?Ce(this,s,n).year:((r=Ie(e,s,n))<a&&(a=r),function(e,a,t,s,n){var r=Re(e,a,t,s,n),d=Ne(r.year,0,r.dayOfYear);return this.year(d.getUTCFullYear()),this.month(d.getUTCMonth()),this.date(d.getUTCDate()),this}.call(this,e,a,t,s,n))}W("N",0,0,"eraAbbr"),W("NN",0,0,"eraAbbr"),W("NNN",0,0,"eraAbbr"),W("NNNN",0,0,"eraName"),W("NNNNN",0,0,"eraNarrow"),W("y",["y",1],"yo","eraYear"),W("y",["yy",2],0,"eraYear"),W("y",["yyy",3],0,"eraYear"),W("y",["yyyy",4],0,"eraYear"),le("N",_t),le("NN",_t),le("NNN",_t),le("NNNN",function(e,a){return a.erasNameRegex(e)}),le("NNNNN",function(e,a){return a.erasNarrowRegex(e)}),Le(["N","NN","NNN","NNNN","NNNNN"],function(e,a,t,s){var n=t._locale.erasParse(e,s,t._strict);n?L(t).era=n:L(t).invalidEra=e}),le("y",ie),le("yy",ie),le("yyy",ie),le("yyyy",ie),le("yo",function(e,a){return a._eraYearOrdinalRegex||ie}),Le(["y","yy","yyy","yyyy"],fe),Le(["yo"],function(e,a,t,s){var n;t._locale._eraYearOrdinalRegex&&(n=e.match(t._locale._eraYearOrdinalRegex)),t._locale.eraYearOrdinalParse?a[fe]=t._locale.eraYearOrdinalParse(e,n):a[fe]=parseInt(e,10)}),W(0,["gg",2],0,function(){return this.weekYear()%100}),W(0,["GG",2],0,function(){return this.isoWeekYear()%100}),mt("gggg","weekYear"),mt("ggggg","weekYear"),mt("GGGG","isoWeekYear"),mt("GGGGG","isoWeekYear"),z("weekYear","gg"),z("isoWeekYear","GG"),C("weekYear",1),C("isoWeekYear",1),le("G",_e),le("g",_e),le("GG",ae,$),le("gg",ae,$),le("GGGG",re,X),le("gggg",re,X),le("GGGGG",de,ee),le("ggggg",de,ee),Ye(["gggg","ggggg","GGGG","GGGGG"],function(e,a,t,s){a[s.substr(0,2)]=G(e)}),Ye(["gg","GG"],function(e,a,t,s){a[s]=M.parseTwoDigitYear(e)}),W("Q",0,"Qo","quarter"),z("quarter","Q"),C("quarter",7),le("Q",Z),Le("Q",function(e,a){a[pe]=3*(G(e)-1)}),W("D",["DD",2],"Do","date"),z("date","D"),C("date",9),le("D",ae),le("DD",ae,$),le("Do",function(e,a){return e?a._dayOfMonthOrdinalParse||a._ordinalParse:a._dayOfMonthOrdinalParseLenient}),Le(["D","DD"],ke),Le("Do",function(e,a){a[ke]=G(e.match(ae)[0])});var lt=V("Date",!0);W("DDD",["DDDD",3],"DDDo","dayOfYear"),z("dayOfYear","DDD"),C("dayOfYear",4),le("DDD",ne),le("DDDD",Q),Le(["DDD","DDDD"],function(e,a,t){t._dayOfYear=G(e)}),W("m",["mm",2],0,"minute"),z("minute","m"),C("minute",14),le("m",ae),le("mm",ae,$),Le(["m","mm"],Te);var Mt=V("Minutes",!1);W("s",["ss",2],0,"second"),z("second","s"),C("second",15),le("s",ae),le("ss",ae,$),Le(["s","ss"],ge);var ht,ct,Lt=V("Seconds",!1);for(W("S",0,0,function(){return~~(this.millisecond()/100)}),W(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),W(0,["SSS",3],0,"millisecond"),W(0,["SSSS",4],0,function(){return 10*this.millisecond()}),W(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),W(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),W(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),W(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),W(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),z("millisecond","ms"),C("millisecond",16),le("S",ne,Z),le("SS",ne,$),le("SSS",ne,Q),ht="SSSS";ht.length<=9;ht+="S")le(ht,ie);function Yt(e,a){a[we]=G(1e3*("0."+e))}for(ht="S";ht.length<=9;ht+="S")Le(ht,Yt);ct=V("Milliseconds",!1),W("z",0,0,"zoneAbbr"),W("zz",0,0,"zoneName");var yt=k.prototype;function ft(e){return e}yt.add=Za,yt.calendar=function(e,a){1===arguments.length&&(arguments[0]?Xa(arguments[0])?(e=arguments[0],a=void 0):function(e){for(var a=_(e)&&!o(e),t=!1,s=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],n=0;n<s.length;n+=1)t=t||h(e,s[n]);return a&&t}(arguments[0])&&(a=arguments[0],e=void 0):a=e=void 0);var t=e||Ha(),s=Ja(t,this).startOf("day"),n=M.calendarFormat(this,s)||"sameElse",r=a&&(v(a[n])?a[n].call(this,t):a[n]);return this.format(r||this.localeData().calendar(n,this,Ha(t)))},yt.clone=function(){return new k(this)},yt.diff=function(e,a,t){var s,n,r;if(!this.isValid())return NaN;if(!(s=Ja(e,this)).isValid())return NaN;switch(n=6e4*(s.utcOffset()-this.utcOffset()),a=N(a)){case"year":r=et(this,s)/12;break;case"month":r=et(this,s);break;case"quarter":r=et(this,s)/3;break;case"second":r=(this-s)/1e3;break;case"minute":r=(this-s)/6e4;break;case"hour":r=(this-s)/36e5;break;case"day":r=(this-s-n)/864e5;break;case"week":r=(this-s-n)/6048e5;break;default:r=this-s}return t?r:U(r)},yt.endOf=function(e){var a,t;if(void 0===(e=N(e))||"millisecond"===e||!this.isValid())return this;switch(t=this._isUTC?it:dt,e){case"year":a=t(this.year()+1,0,1)-1;break;case"quarter":a=t(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":a=t(this.year(),this.month()+1,1)-1;break;case"week":a=t(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":a=t(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":a=t(this.year(),this.month(),this.date()+1)-1;break;case"hour":a=this._d.valueOf(),a+=36e5-rt(a+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":a=this._d.valueOf(),a+=6e4-rt(a,6e4)-1;break;case"second":a=this._d.valueOf(),a+=1e3-rt(a,1e3)-1;break}return this._d.setTime(a),M.updateOffset(this,!0),this},yt.format=function(e){e=e||(this.isUtc()?M.defaultFormatUtc:M.defaultFormat);var a=A(this,e);return this.localeData().postformat(a)},yt.from=function(e,a){return this.isValid()&&(D(e)&&e.isValid()||Ha(e).isValid())?Ga({to:this,from:e}).locale(this.locale()).humanize(!a):this.localeData().invalidDate()},yt.fromNow=function(e){return this.from(Ha(),e)},yt.to=function(e,a){return this.isValid()&&(D(e)&&e.isValid()||Ha(e).isValid())?Ga({from:this,to:e}).locale(this.locale()).humanize(!a):this.localeData().invalidDate()},yt.toNow=function(e){return this.to(Ha(),e)},yt.get=function(e){return v(this[e=N(e)])?this[e]():this}
vendor: 4,827 bytes, line 12839
12839,yt.invalidAt=function(){return L(this).overflow},yt.isAfter=function(e,a){var t=D(e)?e:Ha(e);return!(!this.isValid()||!t.isValid())&&("millisecond"===(a=N(a)||"millisecond")?this.valueOf()>t.valueOf():t.valueOf()<this.clone().startOf(a).valueOf())},yt.isBefore=function(e,a){var t=D(e)?e:Ha(e);return!(!this.isValid()||!t.isValid())&&("millisecond"===(a=N(a)||"millisecond")?this.valueOf()<t.valueOf():this.clone().endOf(a).valueOf()<t.valueOf())},yt.isBetween=function(e,a,t,s){var n=D(e)?e:Ha(e),r=D(a)?a:Ha(a);return!!(this.isValid()&&n.isValid()&&r.isValid())&&(("("===(s=s||"()")[0]?this.isAfter(n,t):!this.isBefore(n,t))&&(")"===s[1]?this.isBefore(r,t):!this.isAfter(r,t)))},yt.isSame=function(e,a){var t,s=D(e)?e:Ha(e);return!(!this.isValid()||!s.isValid())&&("millisecond"===(a=N(a)||"millisecond")?this.valueOf()===s.valueOf():(t=s.valueOf(),this.clone().startOf(a).valueOf()<=t&&t<=this.clone().endOf(a).valueOf()))},yt.isSameOrAfter=function(e,a){return this.isSame(e,a)||this.isAfter(e,a)},yt.isSameOrBefore=function(e,a){return this.isSame(e,a)||this.isBefore(e,a)},yt.isValid=function(){return Y(this)},yt.lang=tt,yt.locale=at,yt.localeData=st,yt.max=xa,yt.min=ja,yt.parsingFlags=function(){return l({},L(this))},yt.set=function(e,a){if("object"==typeof e)for(var t=function(e){var a,t=[];for(a in e)h(e,a)&&t.push({unit:a,priority:R[a]});return t.sort(function(e,a){return e.priority-a.priority}),t}(e=J(e)),s=0;s<t.length;s++)this[t[s].unit](e[t[s].unit]);else if(v(this[e=N(e)]))return this[e](a);return this},yt.startOf=function(e){var a,t;if(void 0===(e=N(e))||"millisecond"===e||!this.isValid())return this;switch(t=this._isUTC?it:dt,e){case"year":a=t(this.year(),0,1);break;case"quarter":a=t(this.year(),this.month()-this.month()%3,1);break;case"month":a=t(this.year(),this.month(),1);break;case"week":a=t(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":a=t(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":a=t(this.year(),this.month(),this.date());break;case"hour":a=this._d.valueOf(),a-=rt(a+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":a=this._d.valueOf(),a-=rt(a,6e4);break;case"second":a=this._d.valueOf(),a-=rt(a,1e3);break}return this._d.setTime(a),M.updateOffset(this,!0),this},yt.subtract=$a,yt.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},yt.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},yt.toDate=function(){return new Date(this.valueOf())},yt.toISOString=function(e){if(!this.isValid())return null;var a=!0!==e,t=a?this.clone().utc():this;return t.year()<0||9999<t.year()?A(t,a?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):v(Date.prototype.toISOString)?a?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",A(t,"Z")):A(t,a?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},yt.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,a,t,s="moment",n="";return this.isLocal()||(s=0===this.utcOffset()?"moment.utc":"moment.parseZone",n="Z"),e="["+s+'("]',a=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",t=n+'[")]',this.format(e+a+"-MM-DD[T]HH:mm:ss.SSS"+t)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(yt[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),yt.toJSON=function(){return this.isValid()?this.toISOString():null},yt.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},yt.unix=function(){return Math.floor(this.valueOf()/1e3)},yt.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},yt.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},yt.eraName=function(){for(var e,a=this.localeData().eras(),t=0,s=a.length;t<s;++t){if(e=this.clone().startOf("day").valueOf(),a[t].since<=e&&e<=a[t].until)return a[t].name;if(a[t].until<=e&&e<=a[t].since)return a[t].name}return""},yt.eraNarrow=function(){for(var e,a=this.localeData().eras(),t=0,s=a.length;t<s;++t){if(e=this.clone().startOf("day").valueOf(),a[t].since<=e&&e<=a[t].until)return a[t].narrow;if(a[t].until<=e&&e<=a[t].since)return a[t].narrow}return""},yt.eraAbbr=function(){for(var e,a=this.localeData().eras(),t=0,s=a.length;t<s;++t){if(e=this.clone().startOf("day").valueOf(),a[t].since<=e&&e<=a[t].until)return a[t].abbr;if(a[t].until<=e&&e<=a[t].since)return a[t].abbr}return""},yt.eraYear=function(){for(var e,a,t=this.localeData().eras(),s=0,n=t.length;s<n;++s)if(e=t[s].since<=t[s].until?1:-1,a=this.clone().startOf("day").valueOf(),t[s].since<=a&&a<=t[s].until||t[
vendor: 4,528 bytes, line 12839
12839s].until<=a&&a<=t[s].since)return(this.year()-M(t[s].since).year())*e+t[s].offset;return this.year()},yt.year=ze,yt.isLeapYear=function(){return I(this.year())},yt.weekYear=function(e){return ut.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},yt.isoWeekYear=function(e){return ut.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},yt.quarter=yt.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},yt.month=Ae,yt.daysInMonth=function(){return Se(this.year(),this.month())},yt.week=yt.weeks=function(e){var a=this.localeData().week(this);return null==e?a:this.add(7*(e-a),"d")},yt.isoWeek=yt.isoWeeks=function(e){var a=Ce(this,1,4).week;return null==e?a:this.add(7*(e-a),"d")},yt.weeksInYear=function(){var e=this.localeData()._week;return Ie(this.year(),e.dow,e.doy)},yt.weeksInWeekYear=function(){var e=this.localeData()._week;return Ie(this.weekYear(),e.dow,e.doy)},yt.isoWeeksInYear=function(){return Ie(this.year(),1,4)},yt.isoWeeksInISOWeekYear=function(){return Ie(this.isoWeekYear(),1,4)},yt.date=lt,yt.day=yt.days=function(e){if(!this.isValid())return null!=e?this:NaN;var a,t,s=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(a=e,t=this.localeData(),e="string"!=typeof a?a:isNaN(a)?"number"==typeof(a=t.weekdaysParse(a))?a:null:parseInt(a,10),this.add(e-s,"d")):s},yt.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var a=(this.day()+7-this.localeData()._week.dow)%7;return null==e?a:this.add(e-a,"d")},yt.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null==e)return this.day()||7;var a,t,s=(a=e,t=this.localeData(),"string"==typeof a?t.weekdaysParse(a)%7||7:isNaN(a)?null:a);return this.day(this.day()%7?s:s-7)},yt.dayOfYear=function(e){var a=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?a:this.add(e-a,"d")},yt.hour=yt.hours=aa,yt.minute=yt.minutes=Mt,yt.second=yt.seconds=Lt,yt.millisecond=yt.milliseconds=ct,yt.utcOffset=function(e,a,t){var s,n=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null==e)return this._isUTC?n:Ra(this);if("string"==typeof e){if(null===(e=Na(me,e)))return this}else Math.abs(e)<16&&!t&&(e*=60);return!this._isUTC&&a&&(s=Ra(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,"m"),n!==e&&(!a||this._changeInProgress?qa(this,Ga(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,M.updateOffset(this,!0),this._changeInProgress=null)),this},yt.utc=function(e){return this.utcOffset(0,e)},yt.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Ra(this),"m")),this},yt.parseZone=function(){var e;return null!=this._tzm?this.utcOffset(this._tzm,!1,!0):"string"==typeof this._i&&(null!=(e=Na(oe,this._i))?this.utcOffset(e):this.utcOffset(0,!0)),this},yt.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Ha(e).utcOffset():0,(this.utcOffset()-e)%60==0)},yt.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},yt.isLocal=function(){return!!this.isValid()&&!this._isUTC},yt.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},yt.isUtc=Ca,yt.isUTC=Ca,yt.zoneAbbr=function(){return this._isUTC?"UTC":""},yt.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},yt.dates=t("dates accessor is deprecated. Use date instead.",lt),yt.months=t("months accessor is deprecated. Use month instead",Ae),yt.years=t("years accessor is deprecated. Use year instead",ze),yt.zone=t("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,a){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,a),this):-this.utcOffset()}),yt.isDSTShifted=t("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!r(this._isDSTShifted))return this._isDSTShifted;var e,a={};return p(a,this),(a=ba(a))._a?(e=(a._isUTC?c:Ha)(a._a),this._isDSTShifted=this.isValid()&&0<function(e,a,t){for(var s=Math.min(e.length,a.length),n=Math.abs(e.length-a.length),r=0,d=0;d<s;d++)(t&&e[d]!==a[d]||!t&&G(e[d])!==G(a[d]))&&r++;return r+n}(a._a,e.toArray())):this._isDSTShifted=!1,this._isDSTShifted});var pt=S.prototype;function kt(e,a,t,s){var n=ua(),r=c().set(s,a);return n[t](r,e)}function Dt(e,a,t){if(m(e)&&(a=e,e=void 0),e=e||"",null!=a)return kt(e,a,t,"month");for(var s=[],n=0;n<12;n++)s[n]=kt(e,n,t,"month");return s}
vendor: 11,692 bytes, line 12839
12839function Tt(e,a,t,s){a=("boolean"==typeof e?m(a)&&(t=a,a=void 0):(a=e,e=!1,m(t=a)&&(t=a,a=void 0)),a||"");var n,r=ua(),d=e?r._week.dow:0,i=[];if(null!=t)return kt(a,(t+d)%7,s,"day");for(n=0;n<7;n++)i[n]=kt(a,(n+d)%7,s,"day");return i}pt.calendar=function(e,a,t){var s=this._calendar[e]||this._calendar.sameElse;return v(s)?s.call(a,t):s},pt.longDateFormat=function(e){var a=this._longDateFormat[e],t=this._longDateFormat[e.toUpperCase()];return a||!t?a:(this._longDateFormat[e]=t.match(j).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])},pt.invalidDate=function(){return this._invalidDate},pt.ordinal=function(e){return this._ordinal.replace("%d",e)},pt.preparse=ft,pt.postformat=ft,pt.relativeTime=function(e,a,t,s){var n=this._relativeTime[t];return v(n)?n(e,a,t,s):n.replace(/%d/i,e)},pt.pastFuture=function(e,a){var t=this._relativeTime[0<e?"future":"past"];return v(t)?t(a):t.replace(/%s/i,a)},pt.set=function(e){var a,t;for(t in e)h(e,t)&&(v(a=e[t])?this[t]=a:this["_"+t]=a);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},pt.eras=function(e,a){for(var t,s=this._eras||ua("en")._eras,n=0,r=s.length;n<r;++n){switch(typeof s[n].since){case"string":t=M(s[n].since).startOf("day"),s[n].since=t.valueOf();break}switch(typeof s[n].until){case"undefined":s[n].until=1/0;break;case"string":t=M(s[n].until).startOf("day").valueOf(),s[n].until=t.valueOf();break}}return s},pt.erasParse=function(e,a,t){var s,n,r,d,i,_=this.eras();for(e=e.toUpperCase(),s=0,n=_.length;s<n;++s)if(r=_[s].name.toUpperCase(),d=_[s].abbr.toUpperCase(),i=_[s].narrow.toUpperCase(),t)switch(a){case"N":case"NN":case"NNN":if(d===e)return _[s];break;case"NNNN":if(r===e)return _[s];break;case"NNNNN":if(i===e)return _[s];break}else if(0<=[r,d,i].indexOf(e))return _[s]},pt.erasConvertYear=function(e,a){var t=e.since<=e.until?1:-1;return void 0===a?M(e.since).year():M(e.since).year()+(a-e.offset)*t},pt.erasAbbrRegex=function(e){return h(this,"_erasAbbrRegex")||ot.call(this),e?this._erasAbbrRegex:this._erasRegex},pt.erasNameRegex=function(e){return h(this,"_erasNameRegex")||ot.call(this),e?this._erasNameRegex:this._erasRegex},pt.erasNarrowRegex=function(e){return h(this,"_erasNarrowRegex")||ot.call(this),e?this._erasNarrowRegex:this._erasRegex},pt.months=function(e,a){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||xe).test(a)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},pt.monthsShort=function(e,a){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[xe.test(a)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},pt.monthsParse=function(e,a,t){var s,n,r;if(this._monthsParseExact)return function(e,a,t){var s,n,r,d=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=c([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,"").toLocaleLowerCase();return t?"MMM"===a?-1!==(n=ye.call(this._shortMonthsParse,d))?n:null:-1!==(n=ye.call(this._longMonthsParse,d))?n:null:"MMM"===a?-1!==(n=ye.call(this._shortMonthsParse,d))||-1!==(n=ye.call(this._longMonthsParse,d))?n:null:-1!==(n=ye.call(this._longMonthsParse,d))||-1!==(n=ye.call(this._shortMonthsParse,d))?n:null}.call(this,e,a,t);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(n=c([2e3,s]),t&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(n,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(n,"").replace(".","")+"$","i")),t||this._monthsParse[s]||(r="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[s]=new RegExp(r.replace(".",""),"i")),t&&"MMMM"===a&&this._longMonthsParse[s].test(e))return s;if(t&&"MMM"===a&&this._shortMonthsParse[s].test(e))return s;if(!t&&this._monthsParse[s].test(e))return s}},pt.monthsRegex=function(e){return this._monthsParseExact?(h(this,"_monthsRegex")||Ee.call(this),e?this._monthsStrictRegex:this._monthsRegex):(h(this,"_monthsRegex")||(this._monthsRegex=Oe),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},pt.monthsShortRegex=function(e){return this._monthsParseExact?(h(this,"_monthsRegex")||Ee.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(h(this,"_monthsShortRegex")||(this._monthsShortRegex=Pe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},pt.week=function(e){return Ce(e,this._week.dow,this._week.doy).week},pt.firstDayOfYear=function(){return this._week.doy},pt.firstDayOfWeek=function(){return this._week.dow},pt.weekdays=function(e,a){var t=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(a)?"format":"standalone"];return!0===e?Ue(t,this._week.dow):e?t[e.day()]:t},pt.weekdaysMin=function(e){return!0===e?Ue(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},pt.weekdaysShort=function(e){return!0===e?Ue(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},pt.weekdaysParse=function(e,a,t){var s,n,r;if(this._weekdaysParseExact)return function(e,a,t){var s,n,r,d=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=c([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return t?"dddd"===a?-1!==(n=ye.call(this._weekdaysParse,d))?n:null:"ddd"===a?-1!==(n=ye.call(this._shortWeekdaysParse,d))?n:null:-1!==(n=ye.call(this._minWeekdaysParse,d))?n:null:"dddd"===a?-1!==(n=ye.call(this._weekdaysParse,d))||-1!==(n=ye.call(this._shortWeekdaysParse,d))||-1!==(n=ye.call(this._minWeekdaysParse,d))?n:null:"ddd"===a?-1!==(n=ye.call(this._shortWeekdaysParse,d))||-1!==(n=ye.call(this._weekdaysParse,d))||-1!==(n=ye.call(this._minWeekdaysParse,d))?n:null:-1!==(n=ye.call(this._minWeekdaysParse,d))||-1!==(n=ye.call(this._weekdaysParse,d))||-1!==(n=ye.call(this._shortWeekdaysParse,d))?n:null}.call(this,e,a,t);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(n=c([2e3,1]).day(s),t&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(n,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(n,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(n,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(r="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[s]=new RegExp(r.replace(".",""),"i")),t&&"dddd"===a&&this._fullWeekdaysParse[s].test(e))return s;if(t&&"ddd"===a&&this._shortWeekdaysParse[s].test(e))return s;if(t&&"dd"===a&&this._minWeekdaysParse[s].test(e))return s;if(!t&&this._weekdaysParse[s].test(e))return s}},pt.weekdaysRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||$e.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=Ke),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},pt.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||$e.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=qe),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},pt.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||$e.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ze),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},pt.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},pt.meridiem=function(e,a,t){return 11<e?t?"pm":"PM":t?"am":"AM"},oa("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var a=e%10;return e+(1===G(e%100/10)?"th":1==a?"st":2==a?"nd":3==a?"rd":"th")}}),M.lang=t("moment.lang is deprecated. Use moment.locale instead.",oa),M.langData=t("moment.langData is deprecated. Use moment.localeData instead.",ua);var gt=Math.abs;function wt(e,a,t,s){var n=Ga(a,t);return e._milliseconds+=s*n._milliseconds,e._days+=s*n._days,e._months+=s*n._months,e._bubble()}function vt(e){return e<0?Math.floor(e):Math.ceil(e)}function bt(e){return 4800*e/146097}function St(e){return 146097*e/4800}function Ht(e){return function(){return this.as(e)}}var jt=Ht("ms"),xt=Ht("s"),Pt=Ht("m"),Ot=Ht("h"),Wt=Ht("d"),At=Ht("w"),Et=Ht("M"),Ft=Ht("Q"),zt=Ht("y");function Nt(e){return function(){return this.isValid()?this._data[e]:NaN}}var Jt=Nt("milliseconds"),Rt=Nt("seconds"),Ct=Nt("minutes"),It=Nt("hours"),Ut=Nt("days"),Gt=Nt("months"),Vt=Nt("years");var Bt=Math.round,Kt={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function qt(e,a,t,s){var n=Ga(e).abs(),r=Bt(n.as("s")),d=Bt(n.as("m")),i=Bt(n.as("h")),_=Bt(n.as("d")),o=Bt(n.as("M")),m=Bt(n.as("w")),u=Bt(n.as("y")),l=(r<=t.ss?["s",r]:r<t.s&&["ss",r])||d<=1&&["m"]||d<t.m&&["mm",d]||i<=1&&["h"]||i<t.h&&["hh",i]||_<=1&&["d"]||_<t.d&&["dd",_];return null!=t.w&&(l=l||m<=1&&["w"]||m<t.w&&["ww",m]),(l=l||o<=1&&["M"]||o<t.M&&["MM",o]||u<=1&&["y"]||["yy",u])[2]=a,l[3]=0<+e,l[4]=s,function(e,a,t,s,n){return n.relativeTime(a||1,!!t,e,s)}.apply(null,l)}var Zt=Math.abs;function $t(e){return(0<e)-(e<0)||+e}function Qt(){if(!this.isValid())return this.localeData().invalidDate();var e,a,t,s,n,r,d,i,_=Zt(this._milliseconds)/1e3,o=Zt(this._days),m=Zt(this._months),u=this.asSeconds();return u?(e=U(_/60),a=U(e/60),_%=60,e%=60,t=U(m/12),m%=12,s=_?_.toFixed(3).replace(/\.?0+$/,""):"",n=u<0?"-":"",r=$t(this._months)!==$t(u)?"-":"",d=$t(this._days)!==$t(u)?"-":"",i=$t(this._milliseconds)!==$t(u)?"-":"",n+"P"+(t?r+t+"Y":"")+(m?r+m+"M":"")+(o?d+o+"D":"")+(a||e||_?"T":"")+(a?i+a+"H":"")+(e?i+e+"M":"")+(_?i+s+"S":"")):"P0D"}var Xt=Wa.prototype;Xt.isValid=function(){return this._isValid},Xt.abs=function(){var e=this._data;return this._milliseconds=gt(this._milliseconds),this._days=gt(this._days),this._months=gt(this._months),e.milliseconds=gt(e.milliseconds),e.seconds=gt(e.seconds),e.minutes=gt(e.minutes),e.hours=gt(e.hours),e.months=gt(e.months),e.years=gt(e.years),this},Xt.add=function(e,a){return wt(this,e,a,1)},Xt.subtract=function(e,a){return wt(this,e,a,-1)},Xt.as=function(e){if(!this.isValid())return NaN;var a,t,s=this._milliseconds;if("month"===(e=N(e))||"quarter"===e||"year"===e)switch(a=this._days+s/864e5,t=this._months+bt(a),e){case"month":return t;case"quarter":return t/3;case"year":return t/12}else switch(a=this._days+Math.round(St(this._months)),e){case"week":return a/7+s/6048e5;case"day":return a+s/864e5;case"hour":return 24*a+s/36e5;case"minute":return 1440*a+s/6e4;case"second":return 86400*a+s/1e3;case"millisecond":return Math.floor(864e5*a)+s;default:throw new Error("Unknown unit "+e)}},Xt.asMilliseconds=jt,Xt.asSeconds=xt,Xt.asMinutes=Pt,Xt.asHours=Ot,Xt.asDays=Wt,Xt.asWeeks=At,Xt.asMonths=Et,Xt.asQuarters=
vendor: 6,317 bytes, line 12839
12839Ft,Xt.asYears=zt,Xt.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*G(this._months/12):NaN},Xt._bubble=function(){var e,a,t,s,n,r=this._milliseconds,d=this._days,i=this._months,_=this._data;return 0<=r&&0<=d&&0<=i||r<=0&&d<=0&&i<=0||(r+=864e5*vt(St(i)+d),i=d=0),_.milliseconds=r%1e3,e=U(r/1e3),_.seconds=e%60,a=U(e/60),_.minutes=a%60,t=U(a/60),_.hours=t%24,d+=U(t/24),i+=n=U(bt(d)),d-=vt(St(n)),s=U(i/12),i%=12,_.days=d,_.months=i,_.years=s,this},Xt.clone=function(){return Ga(this)},Xt.get=function(e){return e=N(e),this.isValid()?this[e+"s"]():NaN},Xt.milliseconds=Jt,Xt.seconds=Rt,Xt.minutes=Ct,Xt.hours=It,Xt.days=Ut,Xt.weeks=function(){return U(this.days()/7)},Xt.months=Gt,Xt.years=Vt,Xt.humanize=function(e,a){if(!this.isValid())return this.localeData().invalidDate();var t,s,n=!1,r=Kt;return"object"==typeof e&&(a=e,e=!1),"boolean"==typeof e&&(n=e),"object"==typeof a&&(r=Object.assign({},Kt,a),null!=a.s&&null==a.ss&&(r.ss=a.s-1)),t=this.localeData(),s=qt(this,!n,r,t),n&&(s=t.pastFuture(+this,s)),t.postformat(s)},Xt.toISOString=Qt,Xt.toString=Qt,Xt.toJSON=Qt,Xt.locale=at,Xt.localeData=st,Xt.toIsoString=t("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Qt),Xt.lang=tt,W("X",0,0,"unix"),W("x",0,0,"valueOf"),le("x",_e),le("X",/[+-]?\d+(\.\d{1,3})?/),Le("X",function(e,a,t){t._d=new Date(1e3*parseFloat(e))}),Le("x",function(e,a,t){t._d=new Date(G(e))}),M.version="2.29.1",e=Ha,M.fn=yt,M.min=function(){return Pa("isBefore",[].slice.call(arguments,0))},M.max=function(){return Pa("isAfter",[].slice.call(arguments,0))},M.now=function(){return Date.now?Date.now():+new Date},M.utc=c,M.unix=function(e){return Ha(1e3*e)},M.months=function(e,a){return Dt(e,a,"months")},M.isDate=d,M.locale=oa,M.invalid=y,M.duration=Ga,M.isMoment=D,M.weekdays=function(e,a,t){return Tt(e,a,t,"weekdays")},M.parseZone=function(){return Ha.apply(null,arguments).parseZone()},M.localeData=ua,M.isDuration=Aa,M.monthsShort=function(e,a){return Dt(e,a,"monthsShort")},M.weekdaysMin=function(e,a,t){return Tt(e,a,t,"weekdaysMin")},M.defineLocale=ma,M.updateLocale=function(e,a){var t,s,n;return null!=a?(n=sa,null!=na[e]&&null!=na[e].parentLocale?na[e].set(b(na[e]._config,a)):(null!=(s=_a(e))&&(n=s._config),a=b(n,a),null==s&&(a.abbr=e),(t=new S(a)).parentLocale=na[e],na[e]=t),oa(e)):null!=na[e]&&(null!=na[e].parentLocale?(na[e]=na[e].parentLocale,e===oa()&&oa(e)):null!=na[e]&&delete na[e]),na[e]},M.locales=function(){return s(na)},M.weekdaysShort=function(e,a,t){return Tt(e,a,t,"weekdaysShort")},M.normalizeUnits=N,M.relativeTimeRounding=function(e){return void 0===e?Bt:"function"==typeof e&&(Bt=e,!0)},M.relativeTimeThreshold=function(e,a){return void 0!==Kt[e]&&(void 0===a?Kt[e]:(Kt[e]=a,"s"===e&&(Kt.ss=a-1),!0))},M.calendarFormat=function(e,a){var t=e.diff(a,"days",!0);return t<-6?"sameElse":t<-1?"lastWeek":t<0?"lastDay":t<1?"sameDay":t<2?"nextDay":t<7?"nextWeek":"sameElse"},M.prototype=yt,M.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},M.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,a,t){return e<12?t?"vm":"VM":t?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[M\xf4re om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||20<=e?"ste":"de")},week:{dow:1,doy:4}});function es(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5}function as(d){return function(e,a,t,s){var n=es(e),r=ts[d][es(e)];return 2===n&&(r=r[a?0:1]),r.replace(/%d/i,e)}}var ts={s:["\u0623\u0642\u0644 \u0645\u0646 \u062b\u0627\u0646\u064a\u0629","\u062b\u0627\u0646\u064a\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062b\u0627\u0646\u064a\u062a\u0627\u0646","\u062b\u0627\u0646\u064a\u062a\u064a\u0646"],"%d \u062b\u0648\u0627\u0646","%d \u062b\u0627\u0646\u064a\u0629","%d \u062b\u0627\u0646\u064a\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062f\u0642\u064a\u0642\u0629","\u062f\u0642\u064a\u0642\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062f\u0642\u064a\u0642\u062a\u0627\u0646","\u062f\u0642\u064a\u0642\u062a\u064a\u0646"],"%d \u062f\u0642\u0627\u0626\u0642","%d \u062f\u0642\u064a\u0642\u0629","%d \u062f\u0642\u064a\u0642\u0629"],h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062d\u062f\u0629",["\u0633\u0627\u0639\u062a\u0627\u0646","\u0633\u0627\u0639\u062a\u064a\u0646"],"%d \u0633\u0627\u0639\u0627\u062a","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064a\u0648\u0645","\u064a\u0648\u0645 \u0648\u0627\u062d\u062f",["\u064a\u0648\u0645\u0627\u0646","\u064a\u0648\u0645\u064a\u0646"],"%d \u0623\u064a\u0627\u0645","%d \u064a\u0648\u0645\u064b\u0627","%d \u064a\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062d\u062f",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064a\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062d\u062f",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064a\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064b\u0627","%d \u0639\u0627\u0645"]}
vendor: 14,432 bytes, line 12839
12839,ss=["\u062c\u0627\u0646\u0641\u064a","\u0641\u064a\u0641\u0631\u064a","\u0645\u0627\u0631\u0633","\u0623\u0641\u0631\u064a\u0644","\u0645\u0627\u064a","\u062c\u0648\u0627\u0646","\u062c\u0648\u064a\u0644\u064a\u0629","\u0623\u0648\u062a","\u0633\u0628\u062a\u0645\u0628\u0631","\u0623\u0643\u062a\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062f\u064a\u0633\u0645\u0628\u0631"];M.defineLocale("ar-dz",{months:ss,monthsShort:ss,weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200fM/\u200fYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,a,t){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u064b\u0627 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062f %s",past:"\u0645\u0646\u0630 %s",s:as("s"),ss:as("s"),m:as("m"),mm:as("m"),h:as("h"),hh:as("h"),d:as("d"),dd:as("d"),M:as("M"),MM:as("M"),y:as("y"),yy:as("y")},postformat:function(e){return e.replace(/,/g,"\u060c")},week:{dow:0,doy:4}}),M.defineLocale("ar-kw",{months:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),monthsShort:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062a\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0627\u062d\u062f_\u0627\u062a\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:0,doy:12}});function ns(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5}function rs(d){return function(e,a,t,s){var n=ns(e),r=is[d][ns(e)];return 2===n&&(r=r[a?0:1]),r.replace(/%d/i,e)}}var ds={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},is={s:["\u0623\u0642\u0644 \u0645\u0646 \u062b\u0627\u0646\u064a\u0629","\u062b\u0627\u0646\u064a\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062b\u0627\u0646\u064a\u062a\u0627\u0646","\u062b\u0627\u0646\u064a\u062a\u064a\u0646"],"%d \u062b\u0648\u0627\u0646","%d \u062b\u0627\u0646\u064a\u0629","%d \u062b\u0627\u0646\u064a\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062f\u0642\u064a\u0642\u0629","\u062f\u0642\u064a\u0642\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062f\u0642\u064a\u0642\u062a\u0627\u0646","\u062f\u0642\u064a\u0642\u062a\u064a\u0646"],"%d \u062f\u0642\u0627\u0626\u0642","%d \u062f\u0642\u064a\u0642\u0629","%d \u062f\u0642\u064a\u0642\u0629"],h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062d\u062f\u0629",["\u0633\u0627\u0639\u062a\u0627\u0646","\u0633\u0627\u0639\u062a\u064a\u0646"],"%d \u0633\u0627\u0639\u0627\u062a","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064a\u0648\u0645","\u064a\u0648\u0645 \u0648\u0627\u062d\u062f",["\u064a\u0648\u0645\u0627\u0646","\u064a\u0648\u0645\u064a\u0646"],"%d \u0623\u064a\u0627\u0645","%d \u064a\u0648\u0645\u064b\u0627","%d \u064a\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062d\u062f",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064a\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062d\u062f",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064a\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064b\u0627","%d \u0639\u0627\u0645"]},_s=["\u064a\u0646\u0627\u064a\u0631","\u0641\u0628\u0631\u0627\u064a\u0631","\u0645\u0627\u0631\u0633","\u0623\u0628\u0631\u064a\u0644","\u0645\u0627\u064a\u0648","\u064a\u0648\u0646\u064a\u0648","\u064a\u0648\u0644\u064a\u0648","\u0623\u063a\u0633\u0637\u0633","\u0633\u0628\u062a\u0645\u0628\u0631","\u0623\u0643\u062a\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062f\u064a\u0633\u0645\u0628\u0631"];M.defineLocale("ar-ly",{months:_s,monthsShort:_s,weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200fM/\u200fYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,a,t){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u064b\u0627 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062f %s",past:"\u0645\u0646\u0630 %s",s:rs("s"),ss:rs("s"),m:rs("m"),mm:rs("m"),h:rs("h"),hh:rs("h"),d:rs("d"),dd:rs("d"),M:rs("M"),MM:rs("M"),y:rs("y"),yy:rs("y")},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return ds[e]}).replace(/,/g,"\u060c")},week:{dow:6,doy:12}}),M.defineLocale("ar-ma",{months:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),monthsShort:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0627\u062d\u062f_\u0627\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:1,doy:4}});var os={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},ms={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"};M.defineLocale("ar-sa",{months:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a\u0648_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648_\u0623\u063a\u0633\u0637\u0633_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),monthsShort:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a\u0648_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648_\u0623\u063a\u0633\u0637\u0633_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,a,t){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},preparse:function(e){return e.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,function(e){return ms[e]}).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return os[e]}).replace(/,/g,"\u060c")},week:{dow:0,doy:6}}),M.defineLocale("ar-tn",{months:"\u062c\u0627\u0646\u0641\u064a_\u0641\u064a\u064
128391\u0631\u064a_\u0645\u0627\u0631\u0633_\u0623\u0641\u0631\u064a\u0644_\u0645\u0627\u064a_\u062c\u0648\u0627\u0646_\u062c\u0648\u064a\u0644\u064a\u0629_\u0623\u0648\u062a_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),monthsShort:"\u062c\u0627\u0646\u0641\u064a_\u0641\u064a\u0641\u0631\u064a_\u0645\u0627\u0631\u0633_\u0623\u0641\u0631\u064a\u0644_\u0645\u0627\u064a_\u062c\u0648\u0627\u0646_\u062c\u0648\u064a\u0644\u064a\u0629_\u0623\u0648\u062a_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:1,doy:4}});function us(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5}function ls(d){return function(e,a,t,s){var n=us(e),r=cs[d][us(e)];return 2===n&&(r=r[a?0:1]),r.replace(/%d/i,e)}}var Ms={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},hs={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"},cs={s:["\u0623\u0642\u0644 \u0645\u0646 \u062b\u0627\u0646\u064a\u0629","\u062b\u0627\u0646\u064a\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062b\u0627\u0646\u064a\u062a\u0627\u0646","\u062b\u0627\u0646\u064a\u062a\u064a\u0646"],"%d \u062b\u0648\u0627\u0646","%d \u062b\u0627\u0646\u064a\u0629","%d \u062b\u0627\u0646\u064a\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062f\u0642\u064a\u0642\u0629","\u062f\u0642\u064a\u0642\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062f\u0642\u064a\u0642\u062a\u0627\u0646","\u062f\u0642\u064a\u0642\u062a\u064a\u0646"],"%d \u062f\u0642\u0627\u0626\u0642","%d \u062f\u0642\u064a\u0642\u0629","%d \u062f\u0642\u064a\u0642\u0629"],h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062d\u062f\u0629",["\u0633\u0627\u0639\u062a\u0627\u0646","\u0633\u0627\u0639\u062a\u064a\u0646"],"%d \u0633\u0627\u0639\u0627\u062a","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064a\u0648\u0645","\u064a\u0648\u0645 \u0648\u0627\u062d\u062f",["\u064a\u0648\u0645\u0627\u0646","\u064a\u0648\u0645\u064a\u0646"],"%d \u0623\u064a\u0627\u0645","%d \u064a\u0648\u0645\u064b\u0627","%d \u064a\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062d\u062f",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064a\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062d\u062f",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064a\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064b\u0627","%d \u0639\u0627\u0645"]},Ls=["\u064a\u0646\u0627\u064a\u0631","\u0641\u0628\u0631\u0627\u064a\u0631","\u0645\u0627\u0631\u0633","\u0623\u0628\u0631\u064a\u0644","\u0645\u0627\u064a\u0648","\u064a\u0648\u0646\u064a\u0648","\u064a\u0648\u0644\u064a\u0648","\u0623\u063a\u0633\u0637\u0633","\u0633\u0628\u062a\u0645\u0628\u0631","\u0623\u0643\u062a\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062f\u064a\u0633\u0645\u0628\u0631"];M.defineLocale("ar",{months:Ls,monthsShort:Ls,weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200fM/\u200fYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,a,t){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u064b\u0627 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062f %s",past:"\u0645\u0646\u0630 %s",s:ls("s"),ss:ls("s"),m:ls("m"),mm:ls("m"),h:ls("h"),hh:ls("h"),d:ls("d"),dd:ls("d"),M:ls("M"),MM:ls("M"),y:ls("y"),yy:ls("y")},preparse:function(e){return e.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,function(e){return hs[e]}).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return Ms[e]}).replace(/,/g,"\u060c")},week:{dow:6,doy:12}});var Ys={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-\xfcnc\xfc",4:"-\xfcnc\xfc",100:"-\xfcnc\xfc",6:"-nc\u0131",9:"-uncu",10:"-uncu",30:"-uncu",60:"-\u0131nc\u0131",90:"-\u0131nc\u0131"};function ys(e,a,t){var s,n;return"m"===t?a?"\u0445\u0432\u0456\u043b\u0456\u043d\u0430":"\u0445\u0432\u0456\u043b\u0456\u043d\u0443":"h"===t?a?"\u0433\u0430\u0434\u0437\u0456\u043d\u0430":"\u0433\u0430\u0434\u0437\u0456\u043d\u0443":e+" "+(s=+e,n={ss:a?"\u0441\u0435\u043a\u0443\u043d\u0434\u0430_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434":"\u0441\u0435\u043a\u0443\u043d\u0434\u0443_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434",mm:a?"\u0445\u0432\u0456\u043b\u0456\u043d\u0430_\u0445\u0432\u0456\u043b\u0456\u043d\u044b_\u0445\u0432\u0456\u043b\u0456\u043d":"\u0445\u0432\u0456\u043b\u0456\u043d\u0443_\u0445\u0432\u0456\u043b\u0456\u043d\u044b_\u0445\u0432\u0456\u043b\u0456\u043d",hh:a?"\u0433\u0430\u0434\u0437\u0456\u043d\u0430_\u0433\u0430\u0434\u0437\u0456\u043d\u044b_\u0433\u0430\u0434\u0437\u0456\u043d":"\u0433\u0430\u0434\u0437\u0456\u043d\u0443_\u0433\u0430\u0434\u0437\u0456\u043d\u044b_\u0433\u0430\u0434\u0437\u0456\u043d",dd:"\u0434\u0437\u0435\u043d\u044c_\u0434\u043d\u0456_\u0434\u0437\u0451\u043d",MM:"\u043c\u0435\u0441\u044f\u0446_\u043c\u0435\u0441\u044f\u0446\u044b_\u043c\u0435\u0441\u044f\u0446\u0430\u045e",yy:"\u0433\u043e\u0434_\u0433\u0430\u0434\u044b_\u0433\u0430\u0434\u043e\u045e"}[t].split("_"),s%10==1&&s%100!=11?n[0]:2<=s%10&&s%10<=4&&(s%100<10||20<=s%100)?n[1]:n[2])}M.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ert\u0259si_\xc7\u0259r\u015f\u
128390259nb\u0259 ax\u015fam\u0131_\xc7\u0259r\u015f\u0259nb\u0259_C\xfcm\u0259 ax\u015fam\u0131_C\xfcm\u0259_\u015e\u0259nb\u0259".split("_"),weekdaysShort:"Baz_BzE_\xc7Ax_\xc7\u0259r_CAx_C\xfcm_\u015e\u0259n".split("_"),weekdaysMin:"Bz_BE_\xc7A_\xc7\u0259_CA_C\xfc_\u015e\u0259".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bug\xfcn saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[g\u0259l\u0259n h\u0259ft\u0259] dddd [saat] LT",lastDay:"[d\xfcn\u0259n] LT",lastWeek:"[ke\xe7\u0259n h\u0259ft\u0259] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s \u0259vv\u0259l",s:"bir ne\xe7\u0259 saniy\u0259",ss:"%d saniy\u0259",m:"bir d\u0259qiq\u0259",mm:"%d d\u0259qiq\u0259",h:"bir saat",hh:"%d saat",d:"bir g\xfcn",dd:"%d g\xfcn",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gec\u0259|s\u0259h\u0259r|g\xfcnd\xfcz|ax\u015fam/,isPM:function(e){return/^(g\xfcnd\xfcz|ax\u015fam)$/.test(e)},meridiem:function(e,a,t){return e<4?"gec\u0259":e<12?"s\u0259h\u0259r":e<17?"g\xfcnd\xfcz":"ax\u015fam"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0131nc\u0131|inci|nci|\xfcnc\xfc|nc\u0131|uncu)/,ordinal:function(e){if(0===e)return e+"-\u0131nc\u0131";var a=e%10;return e+(Ys[a]||Ys[e%100-a]||Ys[100<=e?100:null])},week:{dow:1,doy:7}}),M.defineLocale("be",{months:{format:"\u0441\u0442\u0443\u0434\u0437\u0435\u043d\u044f_\u043b\u044e\u0442\u0430\u0433\u0430_\u0441\u0430\u043a\u0430\u0432\u0456\u043a\u0430_\u043a\u0440\u0430\u0441\u0430\u0432\u0456\u043a\u0430_\u0442\u0440\u0430\u045e\u043d\u044f_\u0447\u044d\u0440\u0432\u0435\u043d\u044f_\u043b\u0456\u043f\u0435\u043d\u044f_\u0436\u043d\u0456\u045e\u043d\u044f_\u0432\u0435\u0440\u0430\u0441\u043d\u044f_\u043a\u0430\u0441\u0442\u0440\u044b\u0447\u043d\u0456\u043a\u0430_\u043b\u0456\u0441\u0442\u0430\u043f\u0430\u0434\u0430_\u0441\u043d\u0435\u0436\u043d\u044f".split("_"),standalone:"\u0441\u0442\u0443\u0434\u0437\u0435\u043d\u044c_\u043b\u044e\u0442\u044b_\u0441\u0430\u043a\u0430\u0432\u0456\u043a_\u043a\u0440\u0430\u0441\u0430\u0432\u0456\u043a_\u0442\u0440\u0430\u0432\u0435\u043d\u044c_\u0447\u044d\u0440\u0432\u0435\u043d\u044c_\u043b\u0456\u043f\u0435\u043d\u044c_\u0436\u043d\u0456\u0432\u0435\u043d\u044c_\u0432\u0435\u0440\u0430\u0441\u0435\u043d\u044c_\u043a\u0430\u0441\u0442\u0440\u044b\u0447\u043d\u0456\u043a_\u043b\u0456\u0441\u0442\u0430\u043f\u0430\u0434_\u0441\u043d\u0435\u0436\u0430\u043d\u044c".split("_")},monthsShort:"\u0441\u0442\u0443\u0434_\u043b\u044e\u0442_\u0441\u0430\u043a_\u043a\u0440\u0430\u0441_\u0442\u0440\u0430\u0432_\u0447\u044d\u0440\u0432_\u043b\u0456\u043f_\u0436\u043d\u0456\u0432_\u0432\u0435\u0440_\u043a\u0430\u0441\u0442_\u043b\u0456\u0441\u0442_\u0441\u043d\u0435\u0436".
vendor: 7,259 bytes, line 12839
12839split("_"),weekdays:{format:"\u043d\u044f\u0434\u0437\u0435\u043b\u044e_\u043f\u0430\u043d\u044f\u0434\u0437\u0435\u043b\u0430\u043a_\u0430\u045e\u0442\u043e\u0440\u0430\u043a_\u0441\u0435\u0440\u0430\u0434\u0443_\u0447\u0430\u0446\u0432\u0435\u0440_\u043f\u044f\u0442\u043d\u0456\u0446\u0443_\u0441\u0443\u0431\u043e\u0442\u0443".split("_"),standalone:"\u043d\u044f\u0434\u0437\u0435\u043b\u044f_\u043f\u0430\u043d\u044f\u0434\u0437\u0435\u043b\u0430\u043a_\u0430\u045e\u0442\u043e\u0440\u0430\u043a_\u0441\u0435\u0440\u0430\u0434\u0430_\u0447\u0430\u0446\u0432\u0435\u0440_\u043f\u044f\u0442\u043d\u0456\u0446\u0430_\u0441\u0443\u0431\u043e\u0442\u0430".split("_"),isFormat:/\[ ?[\u0423\u0443\u045e] ?(?:\u043c\u0456\u043d\u0443\u043b\u0443\u044e|\u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0443\u044e)? ?\] ?dddd/},weekdaysShort:"\u043d\u0434_\u043f\u043d_\u0430\u0442_\u0441\u0440_\u0447\u0446_\u043f\u0442_\u0441\u0431".split("_"),weekdaysMin:"\u043d\u0434_\u043f\u043d_\u0430\u0442_\u0441\u0440_\u0447\u0446_\u043f\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0433.",LLL:"D MMMM YYYY \u0433., HH:mm",LLLL:"dddd, D MMMM YYYY \u0433., HH:mm"},calendar:{sameDay:"[\u0421\u0451\u043d\u043d\u044f \u045e] LT",nextDay:"[\u0417\u0430\u045e\u0442\u0440\u0430 \u045e] LT",lastDay:"[\u0423\u0447\u043e\u0440\u0430 \u045e] LT",nextWeek:function(){return"[\u0423] dddd [\u045e] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[\u0423 \u043c\u0456\u043d\u0443\u043b\u0443\u044e] dddd [\u045e] LT";case 1:case 2:case 4:return"[\u0423 \u043c\u0456\u043d\u0443\u043b\u044b] dddd [\u045e] LT"}},sameElse:"L"},relativeTime:{future:"\u043f\u0440\u0430\u0437 %s",past:"%s \u0442\u0430\u043c\u0443",s:"\u043d\u0435\u043a\u0430\u043b\u044c\u043a\u0456 \u0441\u0435\u043a\u0443\u043d\u0434",m:ys,mm:ys,h:ys,hh:ys,d:"\u0434\u0437\u0435\u043d\u044c",dd:ys,M:"\u043c\u0435\u0441\u044f\u0446",MM:ys,y:"\u0433\u043e\u0434",yy:ys},meridiemParse:/\u043d\u043e\u0447\u044b|\u0440\u0430\u043d\u0456\u0446\u044b|\u0434\u043d\u044f|\u0432\u0435\u0447\u0430\u0440\u0430/,isPM:function(e){return/^(\u0434\u043d\u044f|\u0432\u0435\u0447\u0430\u0440\u0430)$/.test(e)},meridiem:function(e,a,t){return e<4?"\u043d\u043e\u0447\u044b":e<12?"\u0440\u0430\u043d\u0456\u0446\u044b":e<17?"\u0434\u043d\u044f":"\u0432\u0435\u0447\u0430\u0440\u0430"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0456|\u044b|\u0433\u0430)/,ordinal:function(e,a){switch(a){case"M":case"d":case"DDD":case"w":case"W":return e%10!=2&&e%10!=3||e%100==12||e%100==13?e+"-\u044b":e+"-\u0456";case"D":return e+"-\u0433\u0430";default:return e}},week:{dow:1,doy:7}}),M.defineLocale("bg",{months:"\u044f\u043d\u0443\u0430\u0440\u0438_\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0438\u043b_\u043c\u0430\u0439_\u044e\u043d\u0438_\u044e\u043b\u0438_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438_\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438_\u043d\u043e\u0435\u043c\u0432\u0440\u0438_\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438".split("_"),monthsShort:"\u044f\u043d\u0443_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0439_\u044e\u043d\u0438_\u044e\u043b\u0438_\u0430\u0432\u0433_\u0441\u0435\u043f_\u043e\u043a\u0442_\u043d\u043e\u0435_\u0434\u0435\u043a".split("_"),weekdays:"\u043d\u0435\u0434\u0435\u043b\u044f_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u044f\u0434\u0430_\u0447\u0435\u0442\u0432\u044a\u0440\u0442\u044a\u043a_\u043f\u0435\u0442\u044a\u043a_\u0441\u044a\u0431\u043e\u0442\u0430".split("_"),weekdaysShort:"\u043d\u0435\u0434_\u043f\u043e\u043d_\u0432\u0442\u043e_\u0441\u0440\u044f_\u0447\u0435\u0442_\u043f\u0435\u0442_\u0441\u044a\u0431".split("_"),weekdaysMin:"\u043d\u0434_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[\u0414\u043d\u0435\u0441 \u0432] LT",nextDay:"[\u0423\u0442\u0440\u0435 \u0432] LT",nextWeek:"dddd [\u0432] LT",lastDay:"[\u0412\u0447\u0435\u0440\u0430 \u0432] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[\u041c\u0438\u043d\u0430\u043b\u0430\u0442\u0430] dddd [\u0432] LT";case 1:case 2:case 4:case 5:return"[\u041c\u0438\u043d\u0430\u043b\u0438\u044f] dddd [\u0432] LT"}},sameElse:"L"},relativeTime:{future:"\u0441\u043b\u0435\u0434 %s",past:"\u043f\u0440\u0435\u0434\u0438 %s",s:"\u043d\u044f\u043a\u043e\u043b\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434\u0438",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434\u0438",m:"\u043c\u0438\u043d\u0443\u0442\u0430",mm:"%d \u043c\u0438\u043d\u0443\u0442\u0438",h:"\u0447\u0430\u0441",hh:"%d \u0447\u0430\u0441\u0430",d:"\u0434\u0435\u043d",dd:"%d \u0434\u0435\u043d\u0430",w:"\u0441\u0435\u0434\u043c\u0438\u0446\u0430",ww:"%d \u0441\u0435\u0434\u043c\u0438\u0446\u0438",M:"\u043c\u0435\u0441\u0435\u0446",MM:"%d \u043c\u0435\u0441\u0435\u0446\u0430",y:"\u0433\u043e\u0434\u0438\u043d\u0430",yy:"%d \u0433\u043e\u0434\u0438\u043d\u0438"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0435\u0432|\u0435\u043d|\u0442\u0438|\u0432\u0438|\u0440\u0438|\u043c\u0438)/,ordinal:function(e){var a=e%10,t=e%100;return 0===e?e+"-\u0435\u0432":0==t?e+"-\u0435\u043d":10<t&&t<20?e+"-\u0442\u0438":1==a?e+"-\u0432\u0438":2==a?e+"-\u0440\u0438":7==a||8==a?e+"-\u043c\u0438":e+"-\u0442\u0438"},week:{dow:1,doy:7}}),M.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_M\u025bkalo_Zuw\u025bnkalo_Zuluyekalo_Utikalo_S\u025btanburukalo_\u0254kut\u0254burukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_M\u025b_Zuw_Zul_Uti_S\u025bt_\u0254ku_Now_Des".split("_"),weekdays:"Kari_Nt\u025bn\u025bn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Nt\u025b_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [l\u025br\u025b] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [l\u025br\u025b] HH:mm"},calendar:{sameDay:"[Bi l\u025br\u025b] LT",nextDay:"[Sini l\u025br\u025b] LT",nextWeek:"dddd [don l\u025br\u025b] LT",lastDay:"[Kunu l\u025br\u025b] LT",lastWeek:"dddd [t\u025bm\u025bnen l\u025br\u025b] LT",sameElse:"L"},relativeTime:{future:"%s k\u0254n\u0254",past:"a b\u025b %s b\u0254",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"l\u025br\u025b kelen",hh:"l\u025br\u025b %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}});var fs={1:"\u09e7",2:"\u09e8",3:"\u09e9",4:"\u09ea",5:"\u09eb",6:"\u09ec",7:"\u09ed",8:"\u09ee",9:"\u09ef",0:"\u09e6"},ps={"\u09e7":"1","\u09e8":"2","\u09e9":"3","\u09ea":"4","\u09eb":"5","\u09ec":"6","\u09ed":"7","\u09ee":"8","\u09ef":"9","\u09e6":"0"};M.defineLocale("bn-bd",{months:"\u099c\u09be\u09a8\u09c1\u09df\u09be\u09b0\u09bf_\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1\u09df\u09be\u09b0\u09bf_\u09ae\u09be\u09b0\u09cd\u099a_\u098f\u09aa\u09cd\u09b0\u09bf\u09b2_\u
1283909ae\u09c7_\u099c\u09c1\u09a8_\u099c\u09c1\u09b2\u09be\u0987_\u0986\u0997\u09b8\u09cd\u099f_\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0_\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0_\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0_\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0".split("_"),monthsShort:"\u099c\u09be\u09a8\u09c1_\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1_\u09ae\u09be\u09b0\u09cd\u099a_\u098f\u09aa\u09cd\u09b0\u09bf\u09b2_\u09ae\u09c7_\u099c\u09c1\u09a8_\u099c\u09c1\u09b2\u09be\u0987_\u0986\u0997\u09b8\u09cd\u099f_\u09b8\u09c7\u09aa\u09cd\u099f_\u0985\u0995\u09cd\u099f\u09cb_\u09a8\u09ad\u09c7_\u09a1\u09bf\u09b8\u09c7".split("_"),weekdays:"\u09b0\u09ac\u09bf\u09ac\u09be\u09b0_\u09b8\u09cb\u09ae\u09ac\u09be\u09b0_\u09ae\u0999\u09cd\u0997\u09b2\u09ac\u09be\u09b0_\u09ac\u09c1\u09a7\u09ac\u09be\u09b0_\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf\u09ac\u09be\u09b0_\u09b6\u09c1\u0995\u09cd\u09b0\u09ac\u09be\u09b0_\u09b6\u09a8\u09bf\u09ac\u09be\u09b0".split("_"),weekdaysShort:"\u09b0\u09ac\u09bf_\u09b8\u09cb\u09ae_\u09ae\u0999\u09cd\u0997\u09b2_\u09ac\u09c1\u09a7_\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf_\u09b6\u09c1\u0995\u09cd\u09b0_\u09b6\u09a8\u09bf".split("_"),weekdaysMin:"\u09b0\u09ac\u09bf_\u09b8\u09cb\u09ae_\u09ae\u0999\u09cd\u0997\u09b2_\u09ac\u09c1\u09a7_\u09ac\u09c3\u09b9_\u09b6\u09c1\u0995\u09cd\u09b0_\u09b6\u09a8\u09bf".split("_"),longDateFormat:{LT:"A h:mm \u09b8\u09ae\u09df",LTS:"A h:mm:ss \u09b8\u09ae\u09df",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u09b8\u09ae\u09df",LLLL:"dddd, D MMMM YYYY, A h:mm \u09b8\u09ae\u09df"},calendar:{sameDay:"[\u0986\u099c] LT",nextDay:"[\u0986\u0997\u09be\u09ae\u09c0\u0995\u09be\u09b2] LT",nextWeek:"dddd, LT",lastDay:"[\u0997\u09a4\u0995\u09be\u09b2] LT",lastWeek:"[\u0997\u09a4] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u09aa\u09b0\u09c7",past:"%s \u0986\u0997\u09c7",s:"\u0995\u09df\u09c7\u0995 \u09b8\u09c7\u0995\u09c7\u09a8\u09cd\u09a1",ss:"%d \u09b8\u09c7\u0995\u09c7\u09a8\u09cd\u09a1",m:"\u098f\u0995 \u09ae\u09bf\u09a8\u09bf\u099f",mm:"%d \u09ae\u09bf\u09a8\u09bf\u099f",h:"\u098f\u0995 \u0998\u09a8\u09cd\u099f\u09be",hh:"%d \u0998\u09a8\u09cd\u099f\u09be",d:"\u098f\u0995 \u09a6\u09bf\u09a8",dd:"%d \u09a6\u09bf\u09a8",M:"\u098f\u0995 \u09ae\u09be\u09b8",MM:"%d \u09ae\u09be\u09b8",y:"\u098f\u0995 \u09ac\u099b\u09b0",yy:"%d \u09ac\u099b\u09b0"},preparse:function(e){return e.replace(/[\u09e7\u09e8\u09e9\u09ea\u09eb\u09ec\u09ed\u09ee\u09ef\u09e6]/g,function(e){return ps[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return fs[e]})},meridiemParse:/\u09b0\u09be\u09a4|\u09ad\u09cb\u09b0|\u09b8\u0995\u09be\u09b2|\u09a6\u09c1\u09aa\u09c1\u09b0|\u09ac\u09bf\u0995\u09be\u09b2|\u09b8\u09a8\u09cd\u09a7\u09cd\u09af\u09be|\u09b0\u09be\u09a4/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u09b0\u09be\u09a4"===a?e<4?e:e+12:"\u09ad\u09cb\u09b0"===a||"\u09b8\u0995\u09be\u09b2"===a?e:"\u09a6\u09c1\u09aa\u09c1\u09b0"===a?3<=e?e:e+12:"\u09ac\u09bf\u0995\u09be\u09b2"===a||"\u09b8\u09a8\u09cd\u09a7\u09cd\u09af\u09be"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"\u09b0\u09be\u09a4":e<6?"\u09ad\u09cb\u09b0":e<12?"\u09b8\u0995\u09be\u09b2":e<15?"\u09a6\u09c1\u09aa\u09c1\u09b0":e<18?"\u09ac\u09bf\u0995\u09be\u09b2":e<20?"\u09b8\u09a8\u09cd\u09a7\u09cd\u09af\u09be":"\u09b0\u09be\u09a4"},week:{dow:0,doy:6}});var ks={1:"\u09e7",2:"\u09e8",3:"\u09e9",4:"\u09ea",5:"\u09eb",6:"\u09ec",7:"\u09ed",8:"\u09ee",9:"\u09ef",0:"\u09e6"},Ds={"\u09e7":"1","\u09e8":"2","\u09e9":"3","\u09ea":"4","\u09eb":"5","\u09ec":"6","\u09ed":"7","\u09ee":"8","\u09ef":"9","\u09e6":"0"};M.defineLocale("bn",{months:"\u099c\u09be\u09a8\u09c1\u09df\u09be\u09b0\u09bf_\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1\u09df\u09be\u09b0\u09bf_\u09ae\u09be\u09b0\u09cd\u099a_\u098f\u09aa\u09cd\u09b0\u09bf\u09b2_\u09ae\u09c7_\u099c\u09c1\u09a8_\u099c\u09c1\u09b2\u09be\u0987_\u0986\u0997\u09b8\u09cd\u099f_\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0_\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0_\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0_\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0".split("_"),monthsShort:"\u099c\u09be\u09a8\u09c1_\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1_\u09ae\u09be\u09b0\u09cd\u099a_\u098f\u09aa\u09cd\u09b0\u09bf\u09b2_\u
1283909ae\u09c7_\u099c\u09c1\u09a8_\u099c\u09c1\u09b2\u09be\u0987_\u0986\u0997\u09b8\u09cd\u099f_\u09b8\u09c7\u09aa\u09cd\u099f_\u0985\u0995\u09cd\u099f\u09cb_\u09a8\u09ad\u09c7_\u09a1\u09bf\u09b8\u09c7".split("_"),weekdays:"\u09b0\u09ac\u09bf\u09ac\u09be\u09b0_\u09b8\u09cb\u09ae\u09ac\u09be\u09b0_\u09ae\u0999\u09cd\u0997\u09b2\u09ac\u09be\u09b0_\u09ac\u09c1\u09a7\u09ac\u09be\u09b0_\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf\u09ac\u09be\u09b0_\u09b6\u09c1\u0995\u09cd\u09b0\u09ac\u09be\u09b0_\u09b6\u09a8\u09bf\u09ac\u09be\u09b0".split("_"),weekdaysShort:"\u09b0\u09ac\u09bf_\u09b8\u09cb\u09ae_\u09ae\u0999\u09cd\u0997\u09b2_\u09ac\u09c1\u09a7_\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf_\u09b6\u09c1\u0995\u09cd\u09b0_\u09b6\u09a8\u09bf".split("_"),weekdaysMin:"\u09b0\u09ac\u09bf_\u09b8\u09cb\u09ae_\u09ae\u0999\u09cd\u0997\u09b2_\u09ac\u09c1\u09a7_\u09ac\u09c3\u09b9_\u09b6\u09c1\u0995\u09cd\u09b0_\u09b6\u09a8\u09bf".split("_"),longDateFormat:{LT:"A h:mm \u09b8\u09ae\u09df",LTS:"A h:mm:ss \u09b8\u09ae\u09df",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u09b8\u09ae\u09df",LLLL:"dddd, D MMMM YYYY, A h:mm \u09b8\u09ae\u09df"},calendar:{sameDay:"[\u0986\u099c] LT",nextDay:"[\u0986\u0997\u09be\u09ae\u09c0\u0995\u09be\u09b2] LT",nextWeek:"dddd, LT",lastDay:"[\u0997\u09a4\u0995\u09be\u09b2] LT",lastWeek:"[\u0997\u09a4] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u09aa\u09b0\u09c7",past:"%s \u0986\u0997\u09c7",s:"\u0995\u09df\u09c7\u0995 \u09b8\u09c7\u0995\u09c7\u09a8\u09cd\u09a1",ss:"%d \u09b8\u09c7\u0995\u09c7\u09a8\u09cd\u09a1",m:"\u098f\u0995 \u09ae\u09bf\u09a8\u09bf\u099f",mm:"%d \u09ae\u09bf\u09a8\u09bf\u099f",h:"\u098f\u0995 \u0998\u09a8\u09cd\u099f\u09be",hh:"%d \u0998\u09a8\u09cd\u099f\u09be",d:"\u098f\u0995 \u09a6\u09bf\u09a8",dd:"%d \u09a6\u09bf\u09a8",M:"\u098f\u0995 \u09ae\u09be\u09b8",MM:"%d \u09ae\u09be\u09b8",y:"\u098f\u0995 \u09ac\u099b\u09b0",yy:"%d \u09ac\u099b\u09b0"},preparse:function(e){return e.replace(/[\u09e7\u09e8\u09e9\u09ea\u09eb\u09ec\u09ed\u09ee\u09ef\u09e6]/g,function(e){return Ds[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return ks[e]})},meridiemParse:/\u09b0\u09be\u09a4|\u09b8\u0995\u09be\u09b2|\u09a6\u09c1\u09aa\u09c1\u09b0|\u09ac\u09bf\u0995\u09be\u09b2|\u09b0\u09be\u09a4/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u09b0\u09be\u09a4"===a&&4<=e||"\u09a6\u09c1\u09aa\u09c1\u09b0"===a&&e<5||"\u09ac\u09bf\u0995\u09be\u09b2"===a?e+12:e},meridiem:function(e,a,t){return e<4?"\u09b0\u09be\u09a4":e<10?"\u09b8\u0995\u09be\u09b2":e<17?"\u09a6\u09c1\u09aa\u09c1\u09b0":e<20?"\u09ac\u09bf\u0995\u09be\u09b2":"\u09b0\u09be\u09a4"},week:{dow:0,doy:6}});var Ts={1:"\u0f21",2:"\u0f22",3:"\u0f23",4:"\u0f24",5:"\u0f25",6:"\u0f26",7:"\u0f27",8:"\u0f28",9:"\u0f29",0:"\u0f20"},gs={"\u0f21":"1","\u0f22":"2","\u0f23":"3","\u0f24":"4","\u0f25":"5","\u0f26":"6","\u0f27":"7","\u0f28":"8","\u0f29":"9","\u0f20":"0"};function ws(e,a,t){var s;return e+" "+(s={mm:"munutenn",MM:"miz",dd:"devezh"}[t],2!==e?s:function(e){var a={m:"v",b:"v",d:"z"};return void 0!==a[e.charAt(0)]?a[e.charAt(0)]+e.substring(1):e}(s))}M.defineLocale("bo",{months:"\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f44\u0f0b\u0f54\u0f7c_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f66\u0f74\u0f58\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f5e\u0f72\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f63\u0f94\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0fb2\u0f74\u0f42\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f62\u0f92\u0fb1\u0f51\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f42\u0f74\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f45\u0f72\u0f42\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54".split("_"),monthsShort:"\u0f5f\u0fb3\u0f0b1_\u0f5f\u0fb3\u0f0b2_\u0f5f\u0fb3\u0f0b3_\u0f5f\u0fb3\u0f0b4_\u0f5f\u0fb3\u0f0b5_\u0f5f\u0fb3\u0f0b6_\u0f5f\u0fb3\u0f0b7_\u0f5f\u0fb3\u0f0b8_\u0f5f\u0fb3\u0f0b9_\u0f5f\u0fb3\u0f0b10_\u0f5f\u0fb3\u0f0b11_\u0f5f\u0fb3\u0f0b12".split("_"),monthsShortRegex:/^(\u0f5f\u0fb3\u0f0b\d{1,2})/,monthsParseExact:!0,weekdays:"\u0f42\u0f5f\u0f60\u0f0b\u0f49\u0f72\u0f0b\u0f58\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74_\u0f42\u0f5f\u0f60\u0f0b\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b".split("_"),weekdaysShort:"\u0f49\u0f72\u0f0b\u0f58\u0f0b_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b_\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b_\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b_\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74_\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b_\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b".split("_"),weekdaysMin:"\u0f49\u0f72_\u0f5f\u0fb3_\u0f58\u0f72\u0f42_\u
128390f63\u0fb7\u0f42_\u0f55\u0f74\u0f62_\u0f66\u0f44\u0f66_\u0f66\u0fa4\u0f7a\u0f53".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[\u0f51\u0f72\u0f0b\u0f62\u0f72\u0f44] LT",nextDay:"[\u0f66\u0f44\u0f0b\u0f49\u0f72\u0f53] LT",nextWeek:"[\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f55\u0fb2\u0f42\u0f0b\u0f62\u0f97\u0f7a\u0f66\u0f0b\u0f58], LT",lastDay:"[\u0f41\u0f0b\u0f66\u0f44] LT",lastWeek:"[\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f55\u0fb2\u0f42\u0f0b\u0f58\u0f50\u0f60\u0f0b\u0f58] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0f63\u0f0b",past:"%s \u0f66\u0f94\u0f53\u0f0b\u0f63",s:"\u0f63\u0f58\u0f0b\u0f66\u0f44",ss:"%d \u0f66\u0f90\u0f62\u0f0b\u0f46\u0f0d",m:"\u0f66\u0f90\u0f62\u0f0b\u0f58\u0f0b\u0f42\u0f45\u0f72\u0f42",mm:"%d \u0f66\u0f90\u0f62\u0f0b\u0f58",h:"\u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51\u0f0b\u0f42\u0f45\u0f72\u0f42",hh:"%d \u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51",d:"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f45\u0f72\u0f42",dd:"%d \u0f49\u0f72\u0f53\u0f0b",M:"\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f45\u0f72\u0f42",MM:"%d \u0f5f\u0fb3\u0f0b\u0f56",y:"\u0f63\u0f7c\u0f0b\u0f42\u0f45\u0f72\u0f42",yy:"%d \u0f63\u0f7c"},preparse:function(e){return e.replace(/[\u0f21\u0f22\u0f23\u0f24\u0f25\u0f26\u0f27\u0f28\u0f29\u0f20]/g,function(e){return gs[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return Ts[e]})},meridiemParse:/\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c|\u0f5e\u0f7c\u0f42\u0f66\u0f0b\u0f40\u0f66|\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44|\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42|\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c"===a&&4<=e||"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44"===a&&e<5||"\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42"===a?e+12:e},meridiem:function(e,a,t){return e<4?"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c":e<10?"\u0f5e\u0f7c\u0f42\u0f66\u0f0b\u0f40\u0f66":e<17?"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44":e<20?"\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42":"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c"},week:{dow:0,doy:6}});var vs=[/^gen/i,/^c[\u02bc\']hwe/i,/^meu/i,/^ebr/i,/^mae/i,/^(mez|eve)/i,/^gou/i,/^eos/i,/^gwe/i,/^her/i,/^du/i,/^ker/i],bs=/^(genver|c[\u02bc\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[\u02bc\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,Ss=[/^Su/i,/^Lu/i,/^Me([^r]|$)/i,/^Mer/i,/^Ya/i,/^Gw/i,/^Sa/i];function Hs(e,a,t){var s=e+" ";switch(t){case"ss":return s+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"m":return a?"jedna minuta":"jedne minute";case"mm":return s+=1!==e&&(2===e||3===e||4===e)?"minute":"minuta";case"h":return a?"jedan sat":"jednog sata";case"hh":return s+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return s+=1===e?"dan":"dana";case"MM":return s+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return s+=1!==e&&(2===e||3===e||4===e)?"godine":"godina"}}M.defineLocale("br",{months:"Genver_C\u02bchwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C\u02bchwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc\u02bcher_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParse:Ss,fullWeekdaysParse:[/^sul/i,/^lun/i,/^meurzh/i,/^merc[\u02bc\']her/i,/^yaou/i,/^gwener/i,/^sadorn/i],shortWeekdaysParse:[/^Sul/i,/^Lun/i,/^Meu/i,/^Mer/i,/^Yao/i,/^Gwe/i,/^Sad/i],minWeekdaysParse:Ss,monthsRegex:bs,monthsShortRegex:bs,monthsStrictRegex:/^(genver|c[\u02bc\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,monthsShortStrictRegex:/^(gen|c[\u02bc\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,monthsParse:vs,longMonthsParse:vs,shortMonthsParse:vs,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY HH:mm",LLLL:"dddd, D [a viz] MMMM YYYY HH:mm"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc\u02bchoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec\u02bch da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"}
vendor: 18,452 bytes, line 12839
12839,relativeTime:{future:"a-benn %s",past:"%s \u02bczo",s:"un nebeud segondenno\xf9",ss:"%d eilenn",m:"ur vunutenn",mm:ws,h:"un eur",hh:"%d eur",d:"un devezh",dd:ws,M:"ur miz",MM:ws,y:"ur bloaz",yy:function(e){switch(function e(a){if(9<a)return e(a%10);return a}(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}},dayOfMonthOrdinalParse:/\d{1,2}(a\xf1|vet)/,ordinal:function(e){return e+(1===e?"a\xf1":"vet")},week:{dow:1,doy:4},meridiemParse:/a.m.|g.m./,isPM:function(e){return"g.m."===e},meridiem:function(e,a,t){return e<12?"a.m.":"g.m."}}),M.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_\u010detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._\u010det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010de_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[ju\u010der u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[pro\u0161lu] dddd [u] LT";case 6:return"[pro\u0161le] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[pro\u0161li] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:Hs,m:Hs,mm:Hs,h:Hs,hh:Hs,d:"dan",dd:Hs,M:"mjesec",MM:Hs,y:"godinu",yy:Hs},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),M.defineLocale("ca",{months:{standalone:"gener_febrer_mar\xe7_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de mar\xe7_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._mar\xe7_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[dem\xe0 a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aqu\xed %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|\xe8|a)/,ordinal:function(e,a){return e+("w"!==a&&"W"!==a?1===e?"r":2===e?"n":3===e?"r":4===e?"t":"\xe8":"a")},week:{dow:1,doy:4}});var js="leden_\xfanor_b\u0159ezen_duben_kv\u011bten_\u010derven_\u010dervenec_srpen_z\xe1\u0159\xed_\u0159\xedjen_listopad_prosinec".split("_"),xs="led_\xfano_b\u0159e_dub_kv\u011b_\u010dvn_\u010dvc_srp_z\xe1\u0159_\u0159\xedj_lis_pro".split("_"),Ps=[/^led/i,/^\xfano/i,/^b\u0159e/i,/^dub/i,/^kv\u011b/i,/^(\u010dvn|\u010derven$|\u010dervna)/i,/^(\u010dvc|\u010dervenec|\u010dervence)/i,/^srp/i,/^z\xe1\u0159/i,/^\u0159\xedj/i,/^lis/i,/^pro/i],Os=/^(leden|\xfanor|b\u0159ezen|duben|kv\u011bten|\u010dervenec|\u010dervence|\u010derven|\u010dervna|srpen|z\xe1\u0159\xed|\u0159\xedjen|listopad|prosinec|led|\xfano|b\u0159e|dub|kv\u011b|\u010dvn|\u010dvc|srp|z\xe1\u0159|\u0159\xedj|lis|pro)/i;function Ws(e){return 1<e&&e<5&&1!=~~(e/10)}function As(e,a,t,s){var n=e+" ";switch(t){case"s":return a||s?"p\xe1r sekund":"p\xe1r sekundami";case"ss":return a||s?n+(Ws(e)?"sekundy":"sekund"):n+"sekundami";case"m":return a?"minuta":s?"minutu":"minutou";case"mm":return a||s?n+(Ws(e)?"minuty":"minut"):n+"minutami";case"h":return a?"hodina":s?"hodinu":"hodinou";case"hh":return a||s?n+(Ws(e)?"hodiny":"hodin"):n+"hodinami";case"d":return a||s?"den":"dnem";case"dd":return a||s?n+(Ws(e)?"dny":"dn\xed"):n+"dny";case"M":return a||s?"m\u011bs\xedc":"m\u011bs\xedcem";case"MM":return a||s?n+(Ws(e)?"m\u011bs\xedce":"m\u011bs\xedc\u016f"):n+"m\u011bs\xedci";case"y":return a||s?"rok":"rokem";case"yy":return a||s?n+(Ws(e)?"roky":"let"):n+"lety"}}function Es(e,a,t,s){var n={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return a?n[t][0]:n[t][1]}function Fs(e,a,t,s){var n={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return a?n[t][0]:n[t][1]}function zs(e,a,t,s){var n={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return a?n[t][0]:n[t][1]}M.defineLocale("cs",{months:js,monthsShort:xs,monthsRegex:Os,monthsShortRegex:Os,monthsStrictRegex:/^(leden|ledna|\xfanora|\xfanor|b\u0159ezen|b\u0159ezna|duben|dubna|kv\u011bten|kv\u011btna|\u010dervenec|\u010dervence|\u010derven|\u010dervna|srpen|srpna|z\xe1\u0159\xed|\u0159\xedjen|\u0159\xedjna|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|\xfano|b\u0159e|dub|kv\u011b|\u010dvn|\u010dvc|srp|z\xe1\u0159|\u0159\xedj|lis|pro)/i,monthsParse:Ps,longMonthsParse:Ps,shortMonthsParse:Ps,weekdays:"ned\u011ble_pond\u011bl\xed_\xfater\xfd_st\u0159eda_\u010dtvrtek_p\xe1tek_sobota".split("_"),weekdaysShort:"ne_po_\xfat_st_\u010dt_p\xe1_so".split("_"),weekdaysMin:"ne_po_\xfat_st_\u010dt_p\xe1_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[z\xedtra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v ned\u011bli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve st\u0159edu v] LT";case 4:return"[ve \u010dtvrtek v] LT";case 5:return"[v p\xe1tek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[v\u010dera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou ned\u011bli v] LT";case 1:case 2:return"[minul\xe9] dddd [v] LT";case 3:return"[minulou st\u0159edu v] LT";case 4:case 5:return"[minul\xfd] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"p\u0159ed %s",s:As,ss:As,m:As,mm:As,h:As,hh:As,d:As,dd:As,M:As,MM:As,y:As,yy:As},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),M.defineLocale("cv",{months:"\u043a\u04d1\u0440\u043b\u0430\u0447_\u043d\u0430\u0440\u04d1\u0441_\u043f\u0443\u0448_\u0430\u043a\u0430_\u043c\u0430\u0439_\u04ab\u04d7\u0440\u0442\u043c\u0435_\u0443\u0442\u04d1_\u04ab\u0443\u0440\u043b\u0430_\u0430\u0432\u04d1\u043d_\u044e\u043f\u0430_\u0447\u04f3\u043a_\u0440\u0430\u0448\u0442\u0430\u0432".split("_"),monthsShort:"\u043a\u04d1\u0440_\u043d\u0430\u0440_\u043f\u0443\u0448_\u0430\u043a\u0430_\u043c\u0430\u0439_\u04ab\u04d7\u0440_\u0443\u0442\u04d1_\u04ab\u0443\u0440_\u0430\u0432\u043d_\u044e\u043f\u0430_\u0447\u04f3\u043a_\u0440\u0430\u0448".split("_"),weekdays:"\u0432\u044b\u0440\u0441\u0430\u0440\u043d\u0438\u043a\u0443\u043d_\u0442\u0443\u043d\u0442\u0438\u043a\u0443\u043d_\u044b\u0442\u043b\u0430\u0440\u0438\u043a\u0443\u043d_\u044e\u043d\u043a\u0443\u043d_\u043a\u04d7\u04ab\u043d\u0435\u0440\u043d\u0438\u043a\u0443\u043d_\u044d\u0440\u043d\u0435\u043a\u0443\u043d_\u0448\u04d1\u043c\u0430\u0442\u043a\u0443\u043d".split("_"),weekdaysShort:"\u0432\u044b\u0440_\u0442\u0443\u043d_\u044b\u0442\u043b_\u044e\u043d_\u043a\u04d7\u04ab_\u044d\u0440\u043d_\u0448\u04d1\u043c".split("_"),weekdaysMin:"\u0432\u0440_\u0442\u043d_\u044b\u0442_\u044e\u043d_\u043a\u04ab_\u044d\u0440_\u0448\u043c".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [\u04ab\u0443\u043b\u0445\u0438] MMMM [\u0443\u0439\u04d1\u0445\u04d7\u043d] D[-\u043c\u04d7\u0448\u04d7]",LLL:"YYYY [\u04ab\u0443\u043b\u0445\u0438] MMMM [\u0443\u0439\u04d1\u0445\u04d7\u043d] D[-\u043c\u04d7\u0448\u04d7], HH:mm",LLLL:"dddd, YYYY [\u04ab\u0443\u043b\u0445\u0438] MMMM [\u0443\u0439\u04d1\u0445\u04d7\u043d] D[-\u043c\u04d7\u0448\u04d7], HH:mm"},calendar:{sameDay:"[\u041f\u0430\u044f\u043d] LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",nextDay:"[\u042b\u0440\u0430\u043d] LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",lastDay:"[\u04d6\u043d\u0435\u0440] LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",nextWeek:"[\u04aa\u0438\u0442\u0435\u0441] dddd LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",lastWeek:"[\u0418\u0440\u0442\u043d\u04d7] dddd LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",sameElse:"L"},relativeTime:{future:function(e){return e+(/\u0441\u0435\u0445\u0435\u0442$/i.exec(e)?"\u0440\u0435\u043d":/\u04ab\u0443\u043b$/i.exec(e)?"\u0442\u0430\u043d":"\u0440\u0430\u043d")},past:"%s \u043a\u0430\u044f\u043b\u043b\u0430",s:"\u043f\u04d7\u0440-\u0438\u043a \u04ab\u0435\u043a\u043a\u0443\u043d\u0442",ss:"%d \u04ab\u0435\u043a\u043a\u0443\u043d\u0442",m:"\u043f\u04d7\u0440 \u043c\u0438\u043d\u0443\u0442",mm:"%d \u043c\u0438\u043d\u0443\u0442",h:"\u043f\u04d7\u0440 \u0441\u0435\u0445\u0435\u0442",hh:"%d \u0441\u0435\u0445\u0435\u0442",d:"\u043f\u04d7\u0440 \u043a\u0443\u043d",dd:"%d \u043a\u0443\u043d",M:"\u043f\u04d7\u0440 \u0443\u0439\u04d1\u0445",MM:"%d \u0443\u0439\u04d1\u0445",y:"\u043f\u04d7\u0440 \u04ab\u0443\u043b",yy:"%d \u04ab\u0443\u043b"},dayOfMonthOrdinalParse:/\d{1,2}-\u043c\u04d7\u0448/,ordinal:"%d-\u043c\u04d7\u0448",week:{dow:1,doy:7}}),M.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn \xf4l",s:"ychydig eiliadau",ss:"%d eiliad",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var a="";return 20<e?a=40===e||50===e||60===e||80===e||100===e?"fed":"ain":0<e&&(a=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"][e]),e+a},week:{dow:1,doy:4}}),M.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"s\xf8ndag_mandag_tirsdag_onsdag_torsdag_fredag_l\xf8rdag".split("_"),weekdaysShort:"s\xf8n_man_tir_ons_tor_fre_l\xf8r".split("_"),weekdaysMin:"s\xf8_ma_ti_on_to_fr_l\xf8".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"p\xe5 dddd [kl.] LT",lastDay:"[i g\xe5r kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"f\xe5 sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en m\xe5ned",MM:"%d m\xe5neder",y:"et \xe5r",yy:"%d \xe5r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),M.defineLocale("de-at",{months:"J\xe4nner_Februar_M\xe4rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"J\xe4n._Feb._M\xe4rz_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:Es,mm:"%d Minuten",h:Es,hh:"%d Stunden",d:Es,dd:Es,w:Es,ww:"%d Wochen",M:Es,MM:Es,y:Es,yy:Es},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),M.defineLocale("de-ch",{months:"Januar_Februar_M\xe4rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._M\xe4rz_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:Fs,mm:"%d Minuten",h:Fs,hh:"%d Stunden",d:Fs,dd:Fs,w:Fs,ww:"%d Wochen",M:Fs,MM:Fs,y:Fs,yy:Fs},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),M.defineLocale("de",{months:"Januar_Februar_M\xe4rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._M\xe4rz_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:zs,mm:"%d Minuten",h:zs,hh:"%d Stunden",d:zs,dd:zs,w:zs,ww:"%d Wochen",M:zs,MM:zs,y:zs,yy:zs},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var Ns=["\u0796\u07ac\u0782\u07aa\u0787\u07a6\u0783\u07a9","\u078a\u07ac\u0784\u07b0\u0783\u07aa\u0787\u07a6\u0783\u07a9","\u0789\u07a7\u0783\u07a8\u0797\u07aa","\u0787\u07ad\u0795\u07b0\u0783\u07a9\u078d\u07aa","\u0789\u07ad","\u0796\u07ab\u0782\u07b0","\u0796\u07aa\u078d\u07a6\u0787\u07a8","\u0787\u07af\u078e\u07a6\u0790\u07b0\u0793\u07aa","\u0790\u07ac\u0795\u07b0\u0793\u07ac\u0789\u07b0\u0784\u07a6\u0783\u07aa","\u0787\u07ae\u0786\u07b0\u0793\u07af\u0784\u07a6\u0783\u07aa","\u0782\u07ae\u0788\u07ac\u0789\u07b0\u0784\u07a6\u0783\u07aa","\u0791\u07a8\u0790\u07ac\u0789\u07b0\u0784\u07a6\u0783\u07aa"],Js=["\u0787\u07a7\u078b\u07a8\u0787\u07b0\u078c\u07a6","\u0780\u07af\u0789\u07a6","\u0787\u07a6\u0782\u07b0\u078e\u07a7\u0783\u07a6","\u0784\u07aa\u078b\u07a6","\u0784\u07aa\u0783\u07a7\u0790\u07b0\u078a\u07a6\u078c\u07a8","\u0780\u07aa\u0786\u07aa\u0783\u07aa","\u0780\u07ae\u0782\u07a8\u0780\u07a8\u0783\u07aa"];M.defineLocale("dv",{months:Ns,monthsShort:Ns,weekdays:Js,weekdaysShort:Js,weekdaysMin:"\u0787\u07a7\u078b\u07a8_\u0780\u07af\u0789\u07a6_\u0787\u07a6\u0782\u07b0_\u0784\u07aa\u078b\u07a6_\u0784\u07aa\u0783\u07a7_\u0780\u07aa\u0786\u07aa_\u0780\u07ae\u0782\u07a8".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0789\u0786|\u0789\u078a/,isPM:function(e){return"\u0789\u078a"===e},meridiem:function(e,a,t){return e<12?"\u0789\u0786":"\u0789\u078a"},calendar:{sameDay:"[\u0789\u07a8\u0787\u07a6\u078b\u07aa] LT",nextDay:"[\u0789\u07a7\u078b\u07a6\u0789\u07a7] LT",nextWeek:"dddd LT",lastDay:"[\u0787\u07a8\u0787\u07b0\u0794\u07ac] LT",lastWeek:"[\u078a\u07a7\u0787\u07a8\u078c\u07aa\u0788\u07a8] dddd LT",sameElse:"L"},relativeTime:{future:"\u078c\u07ac\u0783\u07ad\u078e\u07a6\u0787\u07a8 %s",past:"\u0786\u07aa\u0783\u07a8\u0782\u07b0 %s",s:"\u0790\u07a8\u0786\u07aa\u0782\u07b0\u078c\u07aa\u0786\u07ae\u0785\u07ac\u0787\u07b0",ss:"d% \u0790\u07a8\u0786\u07aa\u0782\u07b0\u078c\u07aa",m:"\u0789\u07a8\u0782\u07a8\u0793\u07ac\u0787\u07b0",mm:"\u0789\u07a8\u0782\u07a8\u0793\u07aa %d",h:"\u078e\u07a6\u0791\u07a8\u0787\u07a8\u0783\u07ac\u0787\u07b0",hh:"\u078e\u07a6\u0791\u07a8\u0787\u07a8\u0783\u07aa %d",d:"\u078b\u07aa\u0788\u07a6\u0780\u07ac\u0787\u07b0",dd:"\u078b\u07aa\u0788\u07a6\u0790\u07b0 %d",M:"\u0789\u07a6\u0780\u07ac\u0787\u07b0",MM:"\u0789\u07a6\u0790\u07b0 %d",y:"\u0787\u07a6\u0780\u07a6\u0783\u07ac\u0787\u07b0",yy:"\u0787\u07a6\u0780\u07a6\u0783\u07aa %d"},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"\u060c")},week:{dow:7,doy:12}}
vendor: 4,689 bytes, line 12839
12839),M.defineLocale("el",{monthsNominativeEl:"\u0399\u03b1\u03bd\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2_\u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2_\u039c\u03ac\u03c1\u03c4\u03b9\u03bf\u03c2_\u0391\u03c0\u03c1\u03af\u03bb\u03b9\u03bf\u03c2_\u039c\u03ac\u03b9\u03bf\u03c2_\u0399\u03bf\u03cd\u03bd\u03b9\u03bf\u03c2_\u0399\u03bf\u03cd\u03bb\u03b9\u03bf\u03c2_\u0391\u03cd\u03b3\u03bf\u03c5\u03c3\u03c4\u03bf\u03c2_\u03a3\u03b5\u03c0\u03c4\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2_\u039f\u03ba\u03c4\u03ce\u03b2\u03c1\u03b9\u03bf\u03c2_\u039d\u03bf\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2_\u0394\u03b5\u03ba\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2".split("_"),monthsGenitiveEl:"\u0399\u03b1\u03bd\u03bf\u03c5\u03b1\u03c1\u03af\u03bf\u03c5_\u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03b1\u03c1\u03af\u03bf\u03c5_\u039c\u03b1\u03c1\u03c4\u03af\u03bf\u03c5_\u0391\u03c0\u03c1\u03b9\u03bb\u03af\u03bf\u03c5_\u039c\u03b1\u0390\u03bf\u03c5_\u0399\u03bf\u03c5\u03bd\u03af\u03bf\u03c5_\u0399\u03bf\u03c5\u03bb\u03af\u03bf\u03c5_\u0391\u03c5\u03b3\u03bf\u03cd\u03c3\u03c4\u03bf\u03c5_\u03a3\u03b5\u03c0\u03c4\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5_\u039f\u03ba\u03c4\u03c9\u03b2\u03c1\u03af\u03bf\u03c5_\u039d\u03bf\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5_\u0394\u03b5\u03ba\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5".split("_"),months:function(e,a){return e?"string"==typeof a&&/D/.test(a.substring(0,a.indexOf("MMMM")))?this._monthsGenitiveEl[e.month()]:this._monthsNominativeEl[e.month()]:this._monthsNominativeEl},monthsShort:"\u0399\u03b1\u03bd_\u03a6\u03b5\u03b2_\u039c\u03b1\u03c1_\u0391\u03c0\u03c1_\u039c\u03b1\u03ca_\u0399\u03bf\u03c5\u03bd_\u0399\u03bf\u03c5\u03bb_\u0391\u03c5\u03b3_\u03a3\u03b5\u03c0_\u039f\u03ba\u03c4_\u039d\u03bf\u03b5_\u0394\u03b5\u03ba".split("_"),weekdays:"\u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae_\u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1_\u03a4\u03c1\u03af\u03c4\u03b7_\u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7_\u03a0\u03ad\u03bc\u03c0\u03c4\u03b7_\u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae_\u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf".split("_"),weekdaysShort:"\u039a\u03c5\u03c1_\u0394\u03b5\u03c5_\u03a4\u03c1\u03b9_\u03a4\u03b5\u03c4_\u03a0\u03b5\u03bc_\u03a0\u03b1\u03c1_\u03a3\u03b1\u03b2".split("_"),weekdaysMin:"\u039a\u03c5_\u0394\u03b5_\u03a4\u03c1_\u03a4\u03b5_\u03a0\u03b5_\u03a0\u03b1_\u03a3\u03b1".split("_"),meridiem:function(e,a,t){return 11<e?t?"\u03bc\u03bc":"\u039c\u039c":t?"\u03c0\u03bc":"\u03a0\u039c"},isPM:function(e){return"\u03bc"===(e+"").toLowerCase()[0]},meridiemParse:/[\u03a0\u039c]\.?\u039c?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[\u03a3\u03ae\u03bc\u03b5\u03c1\u03b1 {}] LT",nextDay:"[\u0391\u03cd\u03c1\u03b9\u03bf {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[\u03a7\u03b8\u03b5\u03c2 {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[\u03c4\u03bf \u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03bf] dddd [{}] LT";default:return"[\u03c4\u03b7\u03bd \u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03b7] dddd [{}] LT"}},sameElse:"L"},calendar:function(e,a){var t,s=this._calendarEl[e],n=a&&a.hours();return t=s,("undefined"!=typeof Function&&t instanceof Function||"[object Function]"===Object.prototype.toString.call(t))&&(s=s.apply(a)),s.replace("{}",n%12==1?"\u03c3\u03c4\u03b7":"\u03c3\u03c4\u03b9\u03c2")},relativeTime:{future:"\u03c3\u03b5 %s",past:"%s \u03c0\u03c1\u03b9\u03bd",s:"\u03bb\u03af\u03b3\u03b1 \u03b4\u03b5\u03c5\u03c4\u03b5\u03c1\u03cc\u03bb\u03b5\u03c0\u03c4\u03b1",ss:"%d \u03b4\u03b5\u03c5\u03c4\u03b5\u03c1\u03cc\u03bb\u03b5\u03c0\u03c4\u03b1",m:"\u03ad\u03bd\u03b1 \u03bb\u03b5\u03c0\u03c4\u03cc",mm:"%d \u03bb\u03b5\u03c0\u03c4\u03ac",h:"\u03bc\u03af\u03b1 \u03ce\u03c1\u03b1",hh:"%d \u03ce\u03c1\u03b5\u03c2",d:"\u03bc\u03af\u03b1 \u03bc\u03ad\u03c1\u03b1",dd:"%d \u03bc\u03ad\u03c1\u03b5\u03c2",M:"\u03ad\u03bd\u03b1\u03c2 \u03bc\u03ae\u03bd\u03b1\u03c2",MM:"%d \u03bc\u03ae\u03bd\u03b5\u03c2",y:"\u03ad\u03bd\u03b1\u03c2 \u03c7\u03c1\u03cc\u03bd\u03bf\u03c2",yy:"%d \u03c7\u03c1\u03cc\u03bd\u03b9\u03b1"},dayOfMonthOrdinalParse:/\d{1,2}\u03b7/,ordinal:"%d\u03b7",week:{dow:1,doy:4}}),M.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LT
12839S:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1==a?"st":2==a?"nd":3==a?"rd":"th")},week:{dow:0,doy:4}}),M.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1==a?"st":2==a?"nd":3==a?"rd":"th")}}),M.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1==a?"st":2==a?"nd":3==a?"rd":"th")},week:{dow:1,doy:4}}),M.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1==a?"st":2==a?"nd":3==a?"rd":"th")},week:{dow:1,doy:4}}),M.defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1==a?"st":2==a?"nd":3==a?"rd":"th")}}),M.defineLocale("en-in",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LT
vendor: 3,522 bytes, line 12839
12839S:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1==a?"st":2==a?"nd":3==a?"rd":"th")},week:{dow:0,doy:6}}),M.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1==a?"st":2==a?"nd":3==a?"rd":"th")},week:{dow:1,doy:4}}),M.defineLocale("en-sg",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1==a?"st":2==a?"nd":3==a?"rd":"th")},week:{dow:1,doy:4}}),M.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_a\u016dgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mart_apr_maj_jun_jul_a\u016dg_sept_okt_nov_dec".split("_"),weekdays:"diman\u0109o_lundo_mardo_merkredo_\u0135a\u016ddo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_\u0135a\u016d_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_\u0135a_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"[la] D[-an de] MMMM, YYYY",LLL:"[la] D[-an de] MMMM, YYYY HH:mm",LLLL:"dddd[n], [la] D[-an de] MMMM, YYYY HH:mm",llll:"ddd, [la] D[-an de] MMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return"p"===e.charAt(0).toLowerCase()},meridiem:function(e,a,t){return 11<e?t?"p.t.m.":"P.T.M.":t?"a.t.m."
vendor: 4,423 bytes, line 12839
12839:"A.T.M."},calendar:{sameDay:"[Hodia\u016d je] LT",nextDay:"[Morga\u016d je] LT",nextWeek:"dddd[n je] LT",lastDay:"[Hiera\u016d je] LT",lastWeek:"[pasintan] dddd[n je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"anta\u016d %s",s:"kelkaj sekundoj",ss:"%d sekundoj",m:"unu minuto",mm:"%d minutoj",h:"unu horo",hh:"%d horoj",d:"unu tago",dd:"%d tagoj",M:"unu monato",MM:"%d monatoj",y:"unu jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}});var Rs="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),Cs="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),Is=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],Us=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;M.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,a){return e?/-MMM-/.test(a)?Cs[e.month()]:Rs[e.month()]:Rs},monthsRegex:Us,monthsShortRegex:Us,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:Is,longMonthsParse:Is,shortMonthsParse:Is,weekdays:"domingo_lunes_martes_mi\xe9rcoles_jueves_viernes_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xe9._jue._vie._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[ma\xf1ana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un d\xeda",dd:"%d d\xedas",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un a\xf1o",yy:"%d a\xf1os"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}});var Gs="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),Vs="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),Bs=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],Ks=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;M.defineLocale("es-mx",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,a){return e?/-MMM-/.test(a)?Vs[e.month()]:Gs[e.month()]:Gs},monthsRegex:Ks,monthsShortRegex:Ks,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:Bs,longMonthsParse:Bs,shortMonthsParse:Bs,weekdays:"domingo_lunes_martes_mi\xe9rcoles_jueves_viernes_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xe9._jue._vie._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[ma\xf1ana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%
12839d horas",d:"un d\xeda",dd:"%d d\xedas",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un a\xf1o",yy:"%d a\xf1os"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:0,doy:4},invalidDate:"Fecha inv\xe1lida"});var qs="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),Zs="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),$s=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],Qs=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;M.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,a){return e?/-MMM-/.test(a)?Zs[e.month()]:qs[e.month()]:qs},monthsRegex:Qs,monthsShortRegex:Qs,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:$s,longMonthsParse:$s,shortMonthsParse:$s,weekdays:"domingo_lunes_martes_mi\xe9rcoles_jueves_viernes_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xe9._jue._vie._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[ma\xf1ana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un d\xeda",dd:"%d d\xedas",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un a\xf1o",yy:"%d a\xf1os"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:0,doy:6}});var Xs="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),en="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),an=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],tn=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;function sn(e,a,t,s){var n={s:["m\xf5ne sekundi","m\xf5ni sekund","paar sekundit"],ss:[e+"sekundi",e+"sekundit"],m:["\xfche minuti","\xfcks minut"],mm:[e+" minuti",e+" minutit"],h:["\xfche tunni","tund aega","\xfcks tund"],hh:[e+" tunni",e+" tundi"],d:["\xfche p\xe4eva","\xfcks p\xe4ev"],M:["kuu aja","kuu aega","\xfcks kuu"],MM:[e+" kuu",e+" kuud"],y:["\xfche aasta","aasta","\xfcks aasta"],yy:[e+" aasta",e+" aastat"]};return a?n[t][2]?n[t][2]:n[t][1]:s?n[t][0]:n[t][1]}M.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,a){return e?/-MMM-/.test(a)?en[e.month()]:Xs[e.month()]:Xs},monthsRegex:tn,monthsShortRegex:tn,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:an,longMonthsParse:an,shortMonthsParse:an,weekdays:"domingo_lunes_martes_mi\xe9rcoles_jueves_viernes_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xe9._jue._vie._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[ma\xf1ana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%
12839d horas",d:"un d\xeda",dd:"%d d\xedas",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un a\xf1o",yy:"%d a\xf1os"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4},invalidDate:"Fecha inv\xe1lida"}),M.defineLocale("et",{months:"jaanuar_veebruar_m\xe4rts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_m\xe4rts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"p\xfchap\xe4ev_esmasp\xe4ev_teisip\xe4ev_kolmap\xe4ev_neljap\xe4ev_reede_laup\xe4ev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[T\xe4na,] LT",nextDay:"[Homme,] LT",nextWeek:"[J\xe4rgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s p\xe4rast",past:"%s tagasi",s:sn,ss:sn,m:sn,mm:sn,h:sn,hh:sn,d:sn,dd:"%d p\xe4eva",M:sn,MM:sn,y:sn,yy:sn},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),M.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",ss:"%d segundo",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});var nn={1:"\u06f1",2:"\u06f2",3:"\u06f3",4:"\u06f4",5:"\u06f5",6:"\u06f6",7:"\u06f7",8:"\u06f8",9:"\u06f9",0:"\u06f0"},rn={"\u06f1":"1","\u06f2":"2","\u06f3":"3","\u06f4":"4","\u06f5":"5","\u06f6":"6","\u06f7":"7","\u06f8":"8","\u06f9":"9","\u06f0":"0"};M.defineLocale("fa",{months:"\u0698\u0627\u0646\u0648\u06cc\u0647_\u0641\u0648\u0631\u06cc\u0647_\u0645\u0627\u0631\u0633_\u0622\u0648\u0631\u06cc\u0644_\u0645\u0647_\u0698\u0648\u0626\u0646_\u0698\u0648\u0626\u06cc\u0647_\u0627\u0648\u062a_\u0633\u067e\u062a\u0627\u0645\u0628\u0631_\u0627\u06a9\u062a\u0628\u0631_\u0646\u0648\u0627\u0645\u0628\u0631_\u062f\u0633\u0627\u0645\u0628\u0631".split("_"),monthsShort:"\u0698\u0627\u0646\u0648\u06cc\u0647_\u0641\u0648\u0631\u06cc\u0647_\u0645\u0627\u0631\u0633_\u0622\u0648\u0631\u06cc\u0644_\u0645\u0647_\u0698\u0648\u0626\u0646_\u0698\u0648\u0626\u06cc\u0647_\u0627\u0648\u062a_\u0633\u067e\u062a\u0627\u0645\u0628\u0631_\u0627\u06a9\u062a\u0628\u0631_\u0646\u0648\u0627\u0645\u0628\u0631_\u062f\u0633\u0627\u0645\u0628\u0631".split("_"),weekdays:"\u06cc\u06a9\u200c\u0634\u0646\u0628\u0647_\u062f\u0648\u0634\u0646\u0628\u0647_\u0633\u0647\u200c\u0634\u0646\u0628\u0647_\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647_\u067e\u0646\u062c\u200c\u0634\u0646\u0628\u0647_\u062c\u0645\u0639\u0647_\u0634\u0646\u0628\u0647".split("_"),weekdaysShort:"\u06cc\u06a9\u200c\u0634\u0646\u0628\u0647_\u062f\u0648\u0634\u0646\u0628\u0647_\u0633\u0647\u200c\u0634\u0646\u0628\u0647_\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647_\u067e\u0646\u062c\u200c\u0634\u0646\u0628\u0647_\u062c\u0645\u0639\u0647_\u0634\u0646\u0628\u0647".split("_"),weekdaysMin:"\u06cc_\u062f_\u0633_\u0686_\u067e_\u062c_\u0634".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/\u0642\u0628\u0644 \u0627\u0632 \u0638\u0647\u0631|\u0628\u0639\u062f \u0627\u0632 \u0638\u0647\u0631/,isPM:function(e){return/\u0628\u0639\u062f \u0627\u0632 \u0638\u0647\u0631/.test(e)},meridiem:function(e,a,t){return e<12?"\u0642\u0628\u0644 \u0627\u0632 \u0638\u0647\u0631":"\u0628\u0639\u062f \u0627\u0632 \u0638\u0647\u0631"},calendar:{sameDay:"[\u0627\u0645\u0631\u0648\u0632 \u0633\u0627\u0639\u062a] LT",nextDay:"[\u0641\u0631\u062f\u0627 \u0633\u0627\u0639\u062a] LT",nextWeek:"dddd [\u0633\u0627\u0639\u062a] LT",lastDay:"[\u062f\u06cc\u0631\u0648\u0632 \u0633\u0627\u0639\u062a] LT",lastWeek:"dddd [\u067e\u06cc\u0634] [\u0633\u0627\u0639\u062a] LT",sameElse:"L"}
vendor: 14,632 bytes, line 12839
12839,relativeTime:{future:"\u062f\u0631 %s",past:"%s \u067e\u06cc\u0634",s:"\u0686\u0646\u062f \u062b\u0627\u0646\u06cc\u0647",ss:"%d \u062b\u0627\u0646\u06cc\u0647",m:"\u06cc\u06a9 \u062f\u0642\u06cc\u0642\u0647",mm:"%d \u062f\u0642\u06cc\u0642\u0647",h:"\u06cc\u06a9 \u0633\u0627\u0639\u062a",hh:"%d \u0633\u0627\u0639\u062a",d:"\u06cc\u06a9 \u0631\u0648\u0632",dd:"%d \u0631\u0648\u0632",M:"\u06cc\u06a9 \u0645\u0627\u0647",MM:"%d \u0645\u0627\u0647",y:"\u06cc\u06a9 \u0633\u0627\u0644",yy:"%d \u0633\u0627\u0644"},preparse:function(e){return e.replace(/[\u06f0-\u06f9]/g,function(e){return rn[e]}).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return nn[e]}).replace(/,/g,"\u060c")},dayOfMonthOrdinalParse:/\d{1,2}\u0645/,ordinal:"%d\u0645",week:{dow:6,doy:12}});var dn="nolla yksi kaksi kolme nelj\xe4 viisi kuusi seitsem\xe4n kahdeksan yhdeks\xe4n".split(" "),_n=["nolla","yhden","kahden","kolmen","nelj\xe4n","viiden","kuuden",dn[7],dn[8],dn[9]];function on(e,a,t,s){var n,r,d="";switch(t){case"s":return s?"muutaman sekunnin":"muutama sekunti";case"ss":d=s?"sekunnin":"sekuntia";break;case"m":return s?"minuutin":"minuutti";case"mm":d=s?"minuutin":"minuuttia";break;case"h":return s?"tunnin":"tunti";case"hh":d=s?"tunnin":"tuntia";break;case"d":return s?"p\xe4iv\xe4n":"p\xe4iv\xe4";case"dd":d=s?"p\xe4iv\xe4n":"p\xe4iv\xe4\xe4";break;case"M":return s?"kuukauden":"kuukausi";case"MM":d=s?"kuukauden":"kuukautta";break;case"y":return s?"vuoden":"vuosi";case"yy":d=s?"vuoden":"vuotta";break}return r=s,d=((n=e)<10?r?_n[n]:dn[n]:n)+" "+d}M.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kes\xe4kuu_hein\xe4kuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kes\xe4_hein\xe4_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[t\xe4n\xe4\xe4n] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s p\xe4\xe4st\xe4",past:"%s sitten",s:on,ss:on,m:on,mm:on,h:on,hh:on,d:on,dd:on,M:on,MM:on,y:on,yy:on},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),M.defineLocale("fil",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}}),M.defineLocale("fo",{months:"januar_februar_mars_apr\xedl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_m\xe1nadagur_t\xfdsdagur_mikudagur_h\xf3sdagur_fr\xedggjadagur_leygardagur".split("_"),weekdaysShort:"sun_m\xe1n_t\xfds_mik_h\xf3s_fr\xed_ley".split("_"),weekdaysMin:"su_m\xe1_t\xfd_mi_h\xf3_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[\xcd dag kl.] LT",nextDay:"[\xcd morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[\xcd gj\xe1r kl.] LT",lastWeek:"[s\xed\xf0stu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s s\xed\xf0ani",s:"f\xe1 sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein t\xedmi",hh:"%d t\xedmar",d:"ein dagur",dd:"%d dagar",M:"ein m\xe1na\xf0ur",MM:"%d m\xe1na\xf0ir",y:"eitt \xe1r",yy:"%d \xe1r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),M.defineLocale("fr-ca",{months:"janvier_f\xe9vrier_mars_avril_mai_juin_juillet_ao\xfbt_septembre_octobre_novembre_d\xe9cembre".split("_"),monthsShort:"janv._f\xe9vr._mars_avr._mai_juin_juil._ao\xfbt_sept._oct._nov._d\xe9c.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd\u2019hui \xe0] LT",nextDay:"[Demain \xe0] LT",nextWeek:"dddd [\xe0] LT",lastDay:"[Hier \xe0] LT",lastWeek:"dddd [dernier \xe0] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,a){switch(a){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}}}),M.defineLocale("fr-ch",{months:"janvier_f\xe9vrier_mars_avril_mai_juin_juillet_ao\xfbt_septembre_octobre_novembre_d\xe9cembre".split("_"),monthsShort:"janv._f\xe9vr._mars_avr._mai_juin_juil._ao\xfbt_sept._oct._nov._d\xe9c.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd\u2019hui \xe0] LT",nextDay:"[Demain \xe0] LT",nextWeek:"dddd [\xe0] LT",lastDay:"[Hier \xe0] LT",lastWeek:"dddd [dernier \xe0] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,a){switch(a){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}});var mn=/(janv\.?|f\xe9vr\.?|mars|avr\.?|mai|juin|juil\.?|ao\xfbt|sept\.?|oct\.?|nov\.?|d\xe9c\.?|janvier|f\xe9vrier|mars|avril|mai|juin|juillet|ao\xfbt|septembre|octobre|novembre|d\xe9cembre)/i,un=[/^janv/i,/^f\xe9vr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^ao\xfbt/i,/^sept/i,/^oct/i,/^nov/i,/^d\xe9c/i];M.defineLocale("fr",{months:"janvier_f\xe9vrier_mars_avril_mai_juin_juillet_ao\xfbt_septembre_octobre_novembre_d\xe9cembre".split("_"),monthsShort:"janv._f\xe9vr._mars_avr._mai_juin_juil._ao\xfbt_sept._oct._nov._d\xe9c.".split("_"),monthsRegex:mn,monthsShortRegex:mn,monthsStrictRegex:/^(janvier|f\xe9vrier|mars|avril|mai|juin|juillet|ao\xfbt|septembre|octobre|novembre|d\xe9cembre)/i,monthsShortStrictRegex:/(janv\.?|f\xe9vr\.?|mars|avr\.?|mai|juin|juil\.?|ao\xfbt|sept\.?|oct\.?|nov\.?|d\xe9c\.?)/i,monthsParse:un,longMonthsParse:un,shortMonthsParse:un,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd\u2019hui \xe0] LT",nextDay:"[Demain \xe0] LT",nextWeek:"dddd [\xe0] LT",lastDay:"[Hier \xe0] LT",lastWeek:"dddd [dernier \xe0] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,a){switch(a){case"D":return e+(1===e?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}});var ln="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),Mn="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_");M.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,a){return e?/-MMM-/.test(a)?Mn[e.month()]:ln[e.month()]:ln},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[\xf4fr\xfbne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien min\xfat",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||20<=e?"ste":"de")},week:{dow:1,doy:4}});M.defineLocale("ga",{months:["Ean\xe1ir","Feabhra","M\xe1rta","Aibre\xe1n","Bealtaine","Meitheamh","I\xfail","L\xfanasa","Me\xe1n F\xf3mhair","Deireadh F\xf3mhair","Samhain","Nollaig"],monthsShort:["Ean","Feabh","M\xe1rt","Aib","Beal","Meith","I\xfail","L\xfan","M.F.","D.F.","Samh","Noll"],monthsParseExact:!0,weekdays:["D\xe9 Domhnaigh","D\xe9 Luain","D\xe9 M\xe1irt","D\xe9 C\xe9adaoin","D\xe9ardaoin","D\xe9 hAoine","D\xe9 Sathairn"],weekdaysShort:["Domh","Luan","M\xe1irt","C\xe9ad","D\xe9ar","Aoine","Sath"],weekdaysMin:["Do","Lu","M\xe1","C\xe9","D\xe9","A","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Inniu ag] LT",nextDay:"[Am\xe1rach ag] LT",nextWeek:"dddd [ag] LT",lastDay:"[Inn\xe9 ag] LT",lastWeek:"dddd [seo caite] [ag] LT",sameElse:"L"},relativeTime:{future:"i %s",past:"%s \xf3 shin",s:"c\xfapla soicind",ss:"%d soicind",m:"n\xf3im\xe9ad",mm:"%d n\xf3im\xe9ad",h:"uair an chloig",hh:"%d uair an chloig",d:"l\xe1",dd:"%d l\xe1",M:"m\xed",MM:"%d m\xedonna",y:"bliain",yy:"%d bliain"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}});function hn(e,a,t,s){var n={s:["\u0925\u094b\u0921\u092f\u093e \u0938\u0945\u0915\u0902\u0921\u093e\u0902\u0928\u0940","\u0925\u094b\u0921\u0947 \u0938\u0945\u0915\u0902\u0921"],ss:[e+" \u0938\u0945\u0915\u0902\u0921\u093e\u0902\u0928\u0940",e+" \u0938\u0945\u0915\u0902\u0921"],m:["\u090f\u0915\u093e \u092e\u093f\u0923\u091f\u093e\u0928","\u090f\u0915 \u092e\u093f\u0928\u0942\u091f"],mm:[e+" \u092e\u093f\u0923\u091f\u093e\u0902\u0928\u0940",e+" \u092e\u093f\u0923\u091f\u093e\u0902"],h:["\u090f\u0915\u093e \u0935\u0930\u093e\u0928","\u090f\u0915 \u0935\u0930"],hh:[e+" \u0935\u0930\u093e\u0902\u0928\u0940",e+" \u0935\u0930\u093e\u0902"],d:["\u090f\u0915\u093e \u0926\u093f\u0938\u093e\u0928","\u090f\u0915 \u0926\u0940\u0938"],dd:[e+" \u0926\u093f\u0938\u093e\u0902\u0928\u0940",e+" \u0926\u0940\u0938"],M:["\u090f\u0915\u093e \u092e\u094d\u0939\u092f\u0928\u094d\u092f\u093e\u0928","\u090f\u0915 \u092e\u094d\u0939\u092f\u0928\u094b"],MM:[e+" \u092e\u094d\u0939\u092f\u0928\u094d\u092f\u093e\u0928\u0940",e+" \u092e\u094d\u0939\u092f\u0928\u0947"],y:["\u090f\u0915\u093e \u0935\u0930\u094d\u0938\u093e\u0928","\u090f\u0915 \u0935\u0930\u094d\u0938"],yy:[e+" \u0935\u0930\u094d\u0938\u093e\u0902\u0928\u0940",e+" \u0935\u0930\u094d\u0938\u093e\u0902"]};return s?n[t][0]:n[t][1]}function cn(e,a,t,s){var n={s:["thoddea sekondamni","thodde sekond"],ss:[e+" sekondamni",e+" sekond"],m:["eka mintan","ek minut"],mm:[e+" mintamni",e+" mintam"],h:["eka voran","ek vor"],hh:[e+" voramni",e+" voram"],d:["eka disan","ek dis"],dd:[e+" disamni",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineamni",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsamni",e+" vorsam"]};return s?n[t][0]:n[t][1]}M.defineLocale("gd",{months:["Am Faoilleach","An Gearran","Am M\xe0rt","An Giblean","An C\xe8itean","An t-\xd2gmhios","An t-Iuchar","An L\xf9nastal","An t-Sultain","An D\xe0mhair","An t-Samhain","An D\xf9bhlachd"],monthsShort:["Faoi","Gear","M\xe0rt","Gibl","C\xe8it","\xd2gmh","Iuch","L\xf9n","Sult","D\xe0mh","Samh","D\xf9bh"],monthsParseExact:!0,weekdays:["Did\xf2mhnaich","Diluain","Dim\xe0irt","Diciadain","Diardaoin","Dihaoine","Disathairne"],weekdaysShort:["Did","Dil","Dim","Dic","Dia","Dih","Dis"],weekdaysMin:["D\xf2","Lu","M\xe0","Ci","Ar","Ha","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-m\xe0ireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-d\xe8 aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"m\xecos",MM:"%d m\xecosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}}),M.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xu\xf1o_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xu\xf1._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_m\xe9rcores_xoves_venres_s\xe1bado".
vendor: 4,317 bytes, line 12839
12839split("_"),weekdaysShort:"dom._lun._mar._m\xe9r._xov._ven._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_m\xe9_xo_ve_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"\xe1s":"\xe1")+"] LT"},nextDay:function(){return"[ma\xf1\xe1 "+(1!==this.hours()?"\xe1s":"\xe1")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"\xe1s":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"\xe1":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"\xe1s":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){return 0===e.indexOf("un")?"n"+e:"en "+e},past:"hai %s",s:"uns segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un d\xeda",dd:"%d d\xedas",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}}),M.defineLocale("gom-deva",{months:{standalone:"\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940_\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u090f\u092a\u094d\u0930\u0940\u0932_\u092e\u0947_\u091c\u0942\u0928_\u091c\u0941\u0932\u092f_\u0911\u0917\u0938\u094d\u091f_\u0938\u092a\u094d\u091f\u0947\u0902\u092c\u0930_\u0911\u0915\u094d\u091f\u094b\u092c\u0930_\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930_\u0921\u093f\u0938\u0947\u0902\u092c\u0930".split("_"),format:"\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940\u091a\u094d\u092f\u093e_\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940\u091a\u094d\u092f\u093e_\u092e\u093e\u0930\u094d\u091a\u093e\u091a\u094d\u092f\u093e_\u090f\u092a\u094d\u0930\u0940\u0932\u093e\u091a\u094d\u092f\u093e_\u092e\u0947\u092f\u093e\u091a\u094d\u092f\u093e_\u091c\u0942\u0928\u093e\u091a\u094d\u092f\u093e_\u091c\u0941\u0932\u092f\u093e\u091a\u094d\u092f\u093e_\u0911\u0917\u0938\u094d\u091f\u093e\u091a\u094d\u092f\u093e_\u0938\u092a\u094d\u091f\u0947\u0902\u092c\u0930\u093e\u091a\u094d\u092f\u093e_\u0911\u0915\u094d\u091f\u094b\u092c\u0930\u093e\u091a\u094d\u092f\u093e_\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930\u093e\u091a\u094d\u092f\u093e_\u0921\u093f\u0938\u0947\u0902\u092c\u0930\u093e\u091a\u094d\u092f\u093e".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"\u091c\u093e\u0928\u0947._\u092b\u0947\u092c\u094d\u0930\u0941._\u092e\u093e\u0930\u094d\u091a_\u090f\u092a\u094d\u0930\u0940._\u092e\u0947_\u091c\u0942\u0928_\u091c\u0941\u0932._\u0911\u0917._\u0938\u092a\u094d\u091f\u0947\u0902._\u0911\u0915\u094d\u091f\u094b._\u0928\u094b\u0935\u094d\u0939\u0947\u0902._\u0921\u093f\u0938\u0947\u0902.".split("_"),monthsParseExact:!0,weekdays:"\u0906\u092f\u0924\u093e\u0930_\u0938\u094b\u092e\u093e\u0930_\u092e\u0902\u0917\u0933\u093e\u0930_\u092c\u0941\u0927\u0935\u093e\u0930_\u092c\u093f\u0930\u0947\u0938\u094d\u0924\u093e\u0930_\u0938\u0941\u0915\u094d\u0930\u093e\u0930_\u0936\u0947\u0928\u0935\u093e\u0930".split("_"),weekdaysShort:"\u0906\u092f\u0924._\u0938\u094b\u092e._\u092e\u0902\u0917\u0933._\u092c\u0941\u0927._\u092c\u094d\u0930\u0947\u0938\u094d\u0924._\u0938\u0941\u0915\u094d\u0930._\u0936\u0947\u0928.".split("_"),weekdaysMin:"\u0906_\u0938\u094b_\u092e\u0902_\u092c\u0941_\u092c\u094d\u0930\u0947_\u0938\u0941_\u0936\u0947".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [\u0935\u093e\u091c\u0924\u093e\u0902]",LTS:"A h:mm:ss [\u0935\u093e\u091c\u0924\u093e\u0902]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [\u0935\u093e\u091c\u0924\u093e\u0902]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [\u0935\u093e\u091c\u0924\u093e\u0902]",llll:"ddd, D MMM YYYY, A h:mm [\u0935\u093e\u091c\u0924\u093e\u0902]"},calendar:{sameDay:"[\u0906\u092f\u091c] LT",nextDay:"[\u092b\u093e\u0932\u094d\u092f\u093e\u0902] LT",nextWeek:"[\u092b\u0941\u0921\u0932\u094b] dddd[,] LT",lastDay:"[\u0915\u093e\u0932] LT",lastWeek:"[\u092b\u093e\u091f\u0932\u094b] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s \u0906\u0926\u0940\u0902",s:hn,ss:hn,m:hn,mm:hn,h:hn,hh:hn,d:hn,dd:hn,M:hn,MM:hn,y:hn,yy:hn},dayOfMonthOrdinalParse:/\d{1,2}(\u0935\u0947\u0930)/,ordinal:function(e,a){switch(a){case"D":return e+"\u
128390935\u0947\u0930";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:0,doy:3},meridiemParse:/\u0930\u093e\u0924\u0940|\u0938\u0915\u093e\u0933\u0940\u0902|\u0926\u0928\u092a\u093e\u0930\u093e\u0902|\u0938\u093e\u0902\u091c\u0947/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0930\u093e\u0924\u0940"===a?e<4?e:e+12:"\u0938\u0915\u093e\u0933\u0940\u0902"===a?e:"\u0926\u0928\u092a\u093e\u0930\u093e\u0902"===a?12<e?e:e+12:"\u0938\u093e\u0902\u091c\u0947"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"\u0930\u093e\u0924\u0940":e<12?"\u0938\u0915\u093e\u0933\u0940\u0902":e<16?"\u0926\u0928\u092a\u093e\u0930\u093e\u0902":e<20?"\u0938\u093e\u0902\u091c\u0947":"\u0930\u093e\u0924\u0940"}}),M.defineLocale("gom-latn",{months:{standalone:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),format:"Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Fuddlo] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fattlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:cn,ss:cn,m:cn,mm:cn,h:cn,hh:cn,d:cn,dd:cn,M:cn,MM:cn,y:cn,yy:cn},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,a){switch(a){case"D":return e+"er";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:0,doy:3},meridiemParse:/rati|sokallim|donparam|sanje/,meridiemHour:function(e,a){return 12===e&&(e=0),"rati"===a?e<4?e:e+12:"sokallim"===a?e:"donparam"===a?12<e?e:e+12:"sanje"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"rati":e<12?"sokallim":e<16?"donparam":e<20?"sanje":"rati"}});var Ln={1:"\u0ae7",2:"\u0ae8",3:"\u0ae9",4:"\u0aea",5:"\u0aeb",6:"\u0aec",7:"\u0aed",8:"\u0aee",9:"\u0aef",0:"\u0ae6"},Yn={"\u0ae7":"1","\u0ae8":"2","\u0ae9":"3","\u0aea":"4","\u0aeb":"5","\u0aec":"6","\u0aed":"7","\u0aee":"8","\u0aef":"9","\u0ae6":"0"};M.defineLocale("gu",{months:"\u0a9c\u0abe\u0aa8\u0acd\u0aaf\u0ac1\u0a86\u0ab0\u0ac0_\u0aab\u0ac7\u0aac\u0acd\u0ab0\u0ac1\u0a86\u0ab0\u0ac0_\u0aae\u0abe\u0ab0\u0acd\u0a9a_\u0a8f\u0aaa\u0acd\u0ab0\u0abf\u0ab2_\u0aae\u0ac7_\u0a9c\u0ac2\u0aa8_\u0a9c\u0ac1\u0ab2\u0abe\u0a88_\u0a91\u0a97\u0ab8\u0acd\u0a9f_\u0ab8\u0aaa\u0acd\u0a9f\u0ac7\u0aae\u0acd\u0aac\u0ab0_\u0a91\u0a95\u0acd\u0a9f\u0acd\u0aac\u0ab0_\u0aa8\u0ab5\u0ac7\u0aae\u0acd\u0aac\u0ab0_\u0aa1\u0abf\u0ab8\u0ac7\u0aae\u0acd\u0aac\u0ab0".split("_"),monthsShort:"\u0a9c\u0abe\u0aa8\u0acd\u0aaf\u0ac1._\u0aab\u0ac7\u0aac\u0acd\u0ab0\u0ac1._\u0aae\u0abe\u0ab0\u0acd\u0a9a_\u0a8f\u0aaa\u0acd\u0ab0\u0abf._\u0aae\u0ac7_\u0a9c\u0ac2\u0aa8_\u0a9c\u0ac1\u0ab2\u0abe._\u0a91\u0a97._\u0ab8\u0aaa\u0acd\u0a9f\u0ac7._\u0a91\u0a95\u0acd\u0a9f\u0acd._\u0aa8\u0ab5\u0ac7._\u0aa1\u0abf\u0ab8\u0ac7.".split("_"),monthsParseExact:!0,weekdays:"\u0ab0\u0ab5\u0abf\u0ab5\u0abe\u0ab0_\u0ab8\u0acb\u0aae\u0ab5\u0abe\u0ab0_\u0aae\u0a82\u0a97\u0ab3\u0ab5\u0abe\u0ab0_\u0aac\u0ac1\u0aa7\u0acd\u0ab5\u0abe\u0ab0_\u0a97\u0ac1\u0ab0\u0ac1\u0ab5\u0abe\u0ab0_\u0ab6\u0ac1\u0a95\u0acd\u0ab0\u0ab5\u0abe\u0ab0_\u0ab6\u0aa8\u0abf\u0ab5\u0abe\u0ab0".split("_"),weekdaysShort:"\u0ab0\u0ab5\u0abf_\u0ab8\u0acb\u0aae_\u0aae\u0a82\u0a97\u0ab3_\u0aac\u0ac1\u0aa7\u0acd_\u0a97\u0ac1\u0ab0\u0ac1_\u0ab6\u0ac1\u0a95\u0acd\u0ab0_\u0ab6\u0aa8\u0abf".split("_"),weekdaysMin:"\u0ab0_\u0ab8\u0acb_\u0aae\u0a82_\u0aac\u0ac1_\u0a97\u0ac1_\u0ab6\u0ac1_\u0ab6".split("_"),longDateFormat:{LT:"A h:mm \u0ab5\u0abe\u0a97\u0acd\u0aaf\u0ac7",LTS:"A h:mm:ss \u0ab5\u0abe\u0a97\u0acd\u0aaf\u0ac7",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u0ab5\u0abe\u0a97\u0acd\u0aaf\u0ac7",LLLL:"dddd, D MMMM YYYY, A h:mm \u0ab5\u0abe\u0a97\u0acd\u0aaf\u0ac7"},calendar:{sameDay:"[\u0a86\u0a9c] LT",nextDay:"[\u0a95\u0abe\u0ab2\u0ac7] LT",nextWeek:"dddd, LT",lastDay:"[\u0a97\u0a87\u0a95\u0abe\u0ab2\u0ac7] LT",lastWeek:"[\u0aaa\u0abe\u0a9b\u0ab2\u0abe] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0aae\u0abe",past:"%s \u0aaa\u0ab9\u0ac7\u0ab2\u0abe",s:"\u0a85\u0aae\u0ac1\u0a95 \u0aaa\u0ab3\u0acb",ss:"%d \u0ab8\u0ac7\u0a95\u0a82\u0aa1",m:"\u0a8f\u0a95 \u0aae\u0abf\u0aa8\u0abf\u0a9f",mm:"%d \u0aae\u0abf\u0aa8\u0abf\u0a9f",h:"\u0a8f\u0a95 \u0a95\u0ab2\u0abe\u0a95",hh:"%
12839d \u0a95\u0ab2\u0abe\u0a95",d:"\u0a8f\u0a95 \u0aa6\u0abf\u0ab5\u0ab8",dd:"%d \u0aa6\u0abf\u0ab5\u0ab8",M:"\u0a8f\u0a95 \u0aae\u0ab9\u0abf\u0aa8\u0acb",MM:"%d \u0aae\u0ab9\u0abf\u0aa8\u0acb",y:"\u0a8f\u0a95 \u0ab5\u0ab0\u0acd\u0ab7",yy:"%d \u0ab5\u0ab0\u0acd\u0ab7"},preparse:function(e){return e.replace(/[\u0ae7\u0ae8\u0ae9\u0aea\u0aeb\u0aec\u0aed\u0aee\u0aef\u0ae6]/g,function(e){return Yn[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return Ln[e]})},meridiemParse:/\u0ab0\u0abe\u0aa4|\u0aac\u0aaa\u0acb\u0ab0|\u0ab8\u0ab5\u0abe\u0ab0|\u0ab8\u0abe\u0a82\u0a9c/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0ab0\u0abe\u0aa4"===a?e<4?e:e+12:"\u0ab8\u0ab5\u0abe\u0ab0"===a?e:"\u0aac\u0aaa\u0acb\u0ab0"===a?10<=e?e:e+12:"\u0ab8\u0abe\u0a82\u0a9c"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"\u0ab0\u0abe\u0aa4":e<10?"\u0ab8\u0ab5\u0abe\u0ab0":e<17?"\u0aac\u0aaa\u0acb\u0ab0":e<20?"\u0ab8\u0abe\u0a82\u0a9c":"\u0ab0\u0abe\u0aa4"},week:{dow:0,doy:6}}),M.defineLocale("he",{months:"\u05d9\u05e0\u05d5\u05d0\u05e8_\u05e4\u05d1\u05e8\u05d5\u05d0\u05e8_\u05de\u05e8\u05e5_\u05d0\u05e4\u05e8\u
1283905d9\u05dc_\u05de\u05d0\u05d9_\u05d9\u05d5\u05e0\u05d9_\u05d9\u05d5\u05dc\u05d9_\u05d0\u05d5\u05d2\u05d5\u05e1\u05d8_\u05e1\u05e4\u05d8\u05de\u05d1\u05e8_\u05d0\u05d5\u05e7\u05d8\u05d5\u05d1\u05e8_\u05e0\u05d5\u05d1\u05de\u05d1\u05e8_\u05d3\u05e6\u05de\u05d1\u05e8".split("_"),monthsShort:"\u05d9\u05e0\u05d5\u05f3_\u05e4\u05d1\u05e8\u05f3_\u05de\u05e8\u05e5_\u05d0\u05e4\u05e8\u05f3_\u05de\u05d0\u05d9_\u05d9\u05d5\u05e0\u05d9_\u05d9\u05d5\u05dc\u05d9_\u05d0\u05d5\u05d2\u05f3_\u05e1\u05e4\u05d8\u05f3_\u05d0\u05d5\u05e7\u05f3_\u05e0\u05d5\u05d1\u05f3_\u05d3\u05e6\u05de\u05f3".split("_"),weekdays:"\u05e8\u05d0\u05e9\u05d5\u05df_\u05e9\u05e0\u05d9_\u05e9\u05dc\u05d9\u05e9\u05d9_\u05e8\u05d1\u05d9\u05e2\u05d9_\u05d7\u05de\u05d9\u05e9\u05d9_\u05e9\u05d9\u05e9\u05d9_\u05e9\u05d1\u05ea".split("_"),weekdaysShort:"\u05d0\u05f3_\u05d1\u05f3_\u05d2\u05f3_\u05d3\u05f3_\u05d4\u05f3_\u05d5\u05f3_\u05e9\u05f3".split("_"),weekdaysMin:"\u05d0_\u05d1_\u05d2_\u05d3_\u05d4_\u05d5_\u05e9".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [\u05d1]MMMM YYYY",LLL:"D [\u05d1]MMMM YYYY HH:mm",LLLL:"dddd, D [\u05d1]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[\u05d4\u05d9\u05d5\u05dd \u05d1\u05be]LT",nextDay:"[\u05de\u05d7\u05e8 \u05d1\u05be]LT",nextWeek:"dddd [\u05d1\u05e9\u05e2\u05d4] LT",lastDay:"[\u05d0\u05ea\u05de\u05d5\u05dc \u05d1\u05be]LT",lastWeek:"[\u05d1\u05d9\u05d5\u05dd] dddd [\u05d4\u05d0\u05d7\u05e8\u05d5\u05df \u05d1\u05e9\u05e2\u05d4] LT",sameElse:"L"},relativeTime:{future:"\u05d1\u05e2\u05d5\u05d3 %s",past:"\u05dc\u05e4\u05e0\u05d9 %s",s:"\u05de\u05e1\u05e4\u05e8 \u05e9\u05e0\u05d9\u05d5\u05ea",ss:"%d \u05e9\u05e0\u05d9\u05d5\u05ea",m:"\u05d3\u05e7\u05d4",mm:"%d \u05d3\u05e7\u05d5\u05ea",h:"\u05e9\u05e2\u05d4",hh:function(e){return 2===e?"\u05e9\u05e2\u05ea\u05d9\u05d9\u05dd":e+" \u05e9\u05e2\u05d5\u05ea"},d:"\u05d9\u05d5\u05dd",dd:function(e){return 2===e?"\u05d9\u05d5\u05de\u05d9\u05d9\u05dd":e+" \u05d9\u05de\u05d9\u05dd"},M:"\u05d7\u05d5\u05d3\u05e9",MM:function(e){return 2===e?"\u05d7\u05d5\u05d3\u05e9\u05d9\u05d9\u05dd":e+" \u05d7\u05d5\u05d3\u05e9\u05d9\u05dd"},y:"\u05e9\u05e0\u05d4",yy:function(e){return 2===e?"\u05e9\u05e0\u05ea\u05d9\u05d9\u05dd":e%10==0&&10!==e?e+" \u05e9\u05e0\u05d4":e+" \u05e9\u05e0\u05d9\u05dd"}},meridiemParse:/\u05d0\u05d7\u05d4"\u05e6|\u05dc\u05e4\u05e0\u05d4"\u05e6|\u05d0\u05d7\u05e8\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd|\u05dc\u05e4\u05e0\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd|\u05dc\u05e4\u05e0\u05d5\u05ea \u05d1\u05d5\u05e7\u05e8|\u05d1\u05d1\u05d5\u05e7\u05e8|\u05d1\u05e2\u05e8\u05d1/i,isPM:function(e){return/^(\u05d0\u05d7\u05d4"\u05e6|\u05d0\u05d7\u05e8\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd|\u05d1\u05e2\u05e8\u05d1)$/.test(e)},meridiem:function(e,a,t){return e<5?"\u05dc\u05e4\u05e0\u05d5\u05ea \u05d1\u05d5\u05e7\u05e8":e<10?"\u05d1\u05d1\u05d5\u05e7\u05e8":e<12?t?'\u05dc\u05e4\u05e0\u05d4"\u05e6':"\u05dc\u05e4\u05e0\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd":e<18?t?'\u05d0\u05d7\u05d4"\u05e6':"\u05d0\u05d7\u05e8\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd":"\u05d1\u05e2\u05e8\u05d1"}});var yn={1:"\u0967",2:"\u0968",3:"\u0969",4:"\u096a",5:"\u096b",6:"\u096c",7:"\u096d",8:"\u096e",9:"\u096f",0:"\u0966"},fn={"\u0967":"1","\u0968":"2","\u0969":"3","\u096a":"4","\u096b":"5","\u096c":"6","\u096d":"7","\u096e":"8","\u096f":"9","\u0966":"0"},pn=[/^\u091c\u0928/i,/^\u092b\u093c\u0930|\u092b\u0930/i,/^\u092e\u093e\u0930\u094d\u091a/i,/^\u0905\u092a\u094d\u0930\u0948/i,/^\u092e\u0908/i,/^\u091c\u0942\u0928/i,/^\u091c\u0941\u0932/i,/^\u0905\u0917/i,/^\u0938\u093f\u0924\u0902|\u0938\u093f\u0924/i,/^\u0905\u0915\u094d\u091f\u0942/i,/^\u0928\u0935|\u0928\u0935\u0902/i,/^\u0926\u093f\u0938\u0902|\u0926\u093f\u0938/i];function kn(e,a,t){var s=e+" ";switch(t){case"ss":return s+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"m":return a?"jedna minuta":"jedne minute";case"mm":return s+=1!==e&&(2===e||3===e||4===e)?"minute":"minuta";case"h":return a?"jedan sat":"jednog sata";case"hh":return s+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return s+=1===e?"dan":"dana";case"MM":return s+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return s+=1!==e&&(2===e||3===e||4===e)?"godine":"godina"}}M.defineLocale("hi",{months:{format:"\u091c\u0928\u0935\u0930\u0940_\u092b\u093c\u0930\u0935\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u0948\u
128390932_\u092e\u0908_\u091c\u0942\u0928_\u091c\u0941\u0932\u093e\u0908_\u0905\u0917\u0938\u094d\u0924_\u0938\u093f\u0924\u092e\u094d\u092c\u0930_\u0905\u0915\u094d\u091f\u0942\u092c\u0930_\u0928\u0935\u092e\u094d\u092c\u0930_\u0926\u093f\u0938\u092e\u094d\u092c\u0930".split("_"),standalone:"\u091c\u0928\u0935\u0930\u0940_\u092b\u0930\u0935\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u0948\u0932_\u092e\u0908_\u091c\u0942\u0928_\u091c\u0941\u0932\u093e\u0908_\u0905\u0917\u0938\u094d\u0924_\u0938\u093f\u0924\u0902\u092c\u0930_\u0905\u0915\u094d\u091f\u0942\u092c\u0930_\u0928\u0935\u0902\u092c\u0930_\u0926\u093f\u0938\u0902\u092c\u0930".split("_")},monthsShort:"\u091c\u0928._\u092b\u093c\u0930._\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u0948._\u092e\u0908_\u091c\u0942\u0928_\u091c\u0941\u0932._\u0905\u0917._\u0938\u093f\u0924._\u0905\u0915\u094d\u091f\u0942._\u0928\u0935._\u0926\u093f\u0938.".split("_"),weekdays:"\u0930\u0935\u093f\u0935\u093e\u0930_\u0938\u094b\u092e\u0935\u093e\u0930_\u092e\u0902\u0917\u0932\u0935\u093e\u0930_\u092c\u0941\u0927\u0935\u093e\u0930_\u0917\u0941\u0930\u0942\u0935\u093e\u0930_\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930_\u0936\u0928\u093f\u0935\u093e\u0930".split("_"),weekdaysShort:"\u0930\u0935\u093f_\u0938\u094b\u092e_\u092e\u0902\u0917\u0932_\u092c\u0941\u0927_\u0917\u0941\u0930\u0942_\u0936\u0941\u0915\u094d\u0930_\u0936\u0928\u093f".split("_"),weekdaysMin:"\u0930_\u0938\u094b_\u092e\u0902_\u092c\u0941_\u0917\u0941_\u0936\u0941_\u0936".split("_"),longDateFormat:{LT:"A h:mm \u092c\u091c\u0947",LTS:"A h:mm:ss \u092c\u091c\u0947",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u092c\u091c\u0947",LLLL:"dddd, D MMMM YYYY, A h:mm \u092c\u091c\u0947"},monthsParse:pn,longMonthsParse:pn,shortMonthsParse:[/^\u091c\u0928/i,/^\u092b\u093c\u0930/i,/^\u092e\u093e\u0930\u094d\u091a/i,/^\u0905\u092a\u094d\u0930\u0948/i,/^\u092e\u0908/i,/^\u091c\u0942\u0928/i,/^\u091c\u0941\u0932/i,/^\u0905\u0917/i,/^\u0938\u093f\u0924/i,/^\u0905\u0915\u094d\u091f\u0942/i,/^\u0928\u0935/i,/^\u0926\u093f\u0938/i],monthsRegex:/^(\u091c\u0928\u0935\u0930\u0940|\u091c\u0928\.?|\u092b\u093c\u0930\u0935\u0930\u0940|\u092b\u0930\u0935\u0930\u0940|\u092b\u093c\u0930\.?|\u092e\u093e\u0930\u094d\u091a?|\u0905\u092a\u094d\u0930\u0948\u0932|\u0905\u092a\u094d\u0930\u0948\.?|\u092e\u0908?|\u091c\u0942\u0928?|\u091c\u0941\u0932\u093e\u0908|\u091c\u0941\u0932\.?|\u0905\u0917\u0938\u094d\u0924|\u0905\u0917\.?|\u0938\u093f\u0924\u092e\u094d\u092c\u0930|\u0938\u093f\u0924\u0902\u092c\u0930|\u0938\u093f\u0924\.?|\u0905\u0915\u094d\u091f\u0942\u092c\u0930|\u0905\u0915\u094d\u091f\u0942\.?|\u0928\u0935\u092e\u094d\u092c\u0930|\u0928\u0935\u0902\u092c\u0930|\u0928\u0935\.?|\u0926\u093f\u0938\u092e\u094d\u092c\u0930|\u0926\u093f\u0938\u0902\u092c\u0930|\u0926\u093f\u0938\.?)/i,monthsShortRegex:/^(\u091c\u0928\u0935\u0930\u0940|\u091c\u0928\.?|\u092b\u093c\u0930\u0935\u0930\u0940|\u092b\u0930\u0935\u0930\u0940|\u092b\u093c\u0930\.?|\u092e\u093e\u0930\u094d\u091a?|\u0905\u092a\u094d\u0930\u0948\u0932|\u0905\u092a\u094d\u0930\u0948\.?|\u092e\u0908?|\u091c\u0942\u0928?|\u091c\u0941\u0932\u093e\u0908|\u091c\u0941\u0932\.?|\u0905\u0917\u0938\u094d\u0924|\u0905\u0917\.?|\u0938\u093f\u0924\u092e\u094d\u092c\u0930|\u0938\u093f\u0924\u0902\u092c\u0930|\u0938\u093f\u0924\.?|\u0905\u0915\u094d\u091f\u0942\u092c\u0930|\u0905\u0915\u094d\u091f\u0942\.?|\u0928\u0935\u092e\u094d\u092c\u0930|\u0928\u0935\u0902\u092c\u0930|\u0928\u0935\.?|\u0926\u093f\u0938\u092e\u094d\u092c\u0930|\u0926\u093f\u0938\u0902\u092c\u0930|\u0926\u093f\u0938\.?)/i,monthsStrictRegex:/^(\u091c\u0928\u0935\u0930\u0940?|\u092b\u093c\u0930\u0935\u0930\u0940|\u092b\u0930\u0935\u0930\u0940?|\u092e\u093e\u0930\u094d\u091a?|\u0905\u092a\u094d\u0930\u0948\u0932?|\u092e\u0908?|\u091c\u0942\u0928?|\u091c\u0941\u0932\u093e\u0908?|\u0905\u0917\u0938\u094d\u0924?|\u0938\u093f\u0924\u092e\u094d\u092c\u0930|\u0938\u093f\u0924\u0902\u092c\u0930|\u0938\u093f\u0924?\.?|\u0905\u0915\u094d\u091f\u0942\u092c\u0930|\u0905\u0915\u094d\u091f\u0942\.?|\u0928\u0935\u092e\u094d\u092c\u0930|\u0928\u0935\u0902\u092c\u0930?|\u0926\u093f\u0938\u092e\u094d\u092c\u0930|\u0926\u093f\u0938\u0902\u092c\u0930?)/i,monthsShortStrictRegex:/^(\u091c\u0928\.?|\u092b\u093c\u0930\.?|\u092e\u093e\u0930\u094d\u091a?|\u0905\u092a\u094d\u0930\u0948\.?|\u092e\u0908?|\u091c\u0942\u0928?|\u091c\u0941\u0932\.?|\u0905\u0917\.?|\u0938\u093f\u0924\.?|\u0905\u0915\u094d\u091f\u0942\.?|\u0928\u0935\.?|\u0926\u093f\u0938\.?)/i,calendar:{sameDay:"[\u0906\u091c] LT",nextDay:"[\u0915\u0932] LT",nextWeek:"dddd, LT",lastDay:"[\u0915\u0932] LT",lastWeek:"[\u092a\u093f\u091b\u0932\u0947] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u092e\u0947\u0902",past:"%s \u092a\u0939\u0932\u0947",s:"\u0915\u0941\u091b \u0939\u0940 \u0915\u094d\u0937\u0923",ss:"%d \u0938\u0947\u0915\u0902\u0921",m:"\u090f\u0915 \u092e\u093f\u0928\u091f",mm:"%d \u092e\u093f\u0928\u091f",h:"\u090f\u0915 \u0918\u0902\u091f\u093e",hh:"%d \u0918\u0902\u091f\u0947",d:"\u090f\u0915 \u0926\u093f\u0928",dd:"%d \u0926\u093f\u0928",M:"\u090f\u0915 \u092e\u0939\u0940\u0928\u0947",MM:"%d \u092e\u0939\u0940\u0928\u0947",y:"\u090f\u0915 \u0935\u0930\u094d\u0937",yy:"%d \u0935\u0930\u094d\u0937"},preparse:function(e){return e.replace(/[\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f\u0966]/g,function(e){return fn[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return yn[e]})},meridiemParse:/\u0930\u093e\u0924|\u0938\u0941\u092c\u0939|\u0926\u094b\u092a\u0939\u0930|\u0936\u093e\u092e/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0930\u093e\u0924"===a?e<4?e:e+12:"\u0938\u0941\u092c\u0939"===a?e:"\u0926\u094b\u092a\u0939\u0930"===a?10<=e?e:e+12:"\u0936\u093e\u092e"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"\u0930\u093e\u0924":e<10?"\u0938\u0941\u092c\u0939":e<17?"\u0926\u094b\u092a\u0939\u0930":e<20?"\u093
128396\u093e\u092e":"\u0930\u093e\u0924"},week:{dow:0,doy:6}}),M.defineLocale("hr",{months:{format:"sije\u010dnja_velja\u010de_o\u017eujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"sije\u010danj_velja\u010da_o\u017eujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._o\u017eu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_\u010detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._\u010det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010de_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"Do MMMM YYYY",LLL:"Do MMMM YYYY H:mm",LLLL:"dddd, Do MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[ju\u010der u] LT",lastWeek:function(){switch(this.day()){case 0:return"[pro\u0161lu] [nedjelju] [u] LT";case 3:return"[pro\u0161lu] [srijedu] [u] LT";case 6:return"[pro\u0161le] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[pro\u0161li] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:kn,m:kn,mm:kn,h:kn,hh:kn,d:"dan",dd:kn,M:"mjesec",MM:kn,y:"godinu",yy:kn},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});var Dn="vas\xe1rnap h\xe9tf\u0151n kedden szerd\xe1n cs\xfct\xf6rt\xf6k\xf6n p\xe9nteken szombaton".split(" ");function Tn(e,a,t,s){var n=e;switch(t){case"s":return s||a?"n\xe9h\xe1ny m\xe1sodperc":"n\xe9h\xe1ny m\xe1sodperce";case"ss":return n+(s||a)?" m\xe1sodperc":" m\xe1sodperce";case"m":return"egy"+(s||a?" perc":" perce");case"mm":return n+(s||a?" perc":" perce");case"h":return"egy"+(s||a?" \xf3ra":" \xf3r\xe1ja");case"hh":return n+(s||a?" \xf3ra":" \xf3r\xe1ja");case"d":return"egy"+(s||a?" nap":" napja");case"dd":return n+(s||a?" nap":" napja");case"M":return"egy"+(s||a?" h\xf3nap":" h\xf3napja");case"MM":return n+(s||a?" h\xf3nap":" h\xf3napja");case"y":return"egy"+(s||a?" \xe9v":" \xe9ve");case"yy":return n+(s||a?" \xe9v":" \xe9ve")}return""}function gn(e){return(e?"":"[m\xfalt] ")+"["+Dn[this.day()]+"] LT[-kor]"}function wn(e){return e%100==11||e%10!=1}function vn(e,a,t,s){var n=e+" ";switch(t){case"s":return a||s?"nokkrar sek\xfandur":"nokkrum sek\xfandum";case"ss":return wn(e)?n+(a||s?"sek\xfandur":"sek\xfandum"):n+"sek\xfanda";case"m":return a?"m\xedn\xfata":"m\xedn\xfatu";case"mm":return wn(e)?n+(a||s?"m\xedn\xfatur":"m\xedn\xfatum"):a?n+"m\xedn\xfata":n+"m\xedn\xfatu";case"hh":return wn(e)?n+(a||s?"klukkustundir":"klukkustundum"):n+"klukkustund";case"d":return a?"dagur":s?"dag":"degi";case"dd":return wn(e)?a?n+"dagar":n+(s?"daga":"d\xf6gum"):a?n+"dagur":n+(s?"dag":"degi");case"M":return a?"m\xe1nu\xf0ur":s?"m\xe1nu\xf0":"m\xe1nu\xf0i";case"MM":return wn(e)?a?n+"m\xe1nu\xf0ir":n+(s?"m\xe1nu\xf0i":"m\xe1nu\xf0um"):a?n+"m\xe1nu\xf0ur":n+(s?"m\xe1nu\xf0":"m\xe1nu\xf0i");case"y":return a||s?"\xe1r":"\xe1ri";case"yy":return wn(e)?n+(a||s?"\xe1r":"\xe1rum"):n+(a||s?"\xe1r":"\xe1ri")}}M.defineLocale("hu",{months:"janu\xe1r_febru\xe1r_m\xe1rcius_\xe1prilis_m\xe1jus_j\xfanius_j\xfalius_augusztus_szeptember_okt\xf3ber_november_december".split("_"),monthsShort:"jan._feb._m\xe1rc._\xe1pr._m\xe1j._j\xfan._j\xfal._aug._szept._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"vas\xe1rnap_h\xe9tf\u0151_kedd_szerda_cs\xfct\xf6rt\xf6k_p\xe9ntek_szombat".split("_"),weekdaysShort:"vas_h\xe9t_kedd_sze_cs\xfct_p\xe9n_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,a,t){return e<12?!0===t?"de":"DE":!0===t?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return gn.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return gn.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s m\xfalva",past:"%s",s:Tn,ss:Tn,m:Tn,mm:Tn,h:Tn,hh:Tn,d:Tn,dd:Tn,M:Tn,MM:T
vendor: 7,120 bytes, line 12839
12839n,y:Tn,yy:Tn},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),M.defineLocale("hy-am",{months:{format:"\u0570\u0578\u0582\u0576\u057e\u0561\u0580\u056b_\u0583\u0565\u057f\u0580\u057e\u0561\u0580\u056b_\u0574\u0561\u0580\u057f\u056b_\u0561\u057a\u0580\u056b\u056c\u056b_\u0574\u0561\u0575\u056b\u057d\u056b_\u0570\u0578\u0582\u0576\u056b\u057d\u056b_\u0570\u0578\u0582\u056c\u056b\u057d\u056b_\u0585\u0563\u0578\u057d\u057f\u0578\u057d\u056b_\u057d\u0565\u057a\u057f\u0565\u0574\u0562\u0565\u0580\u056b_\u0570\u0578\u056f\u057f\u0565\u0574\u0562\u0565\u0580\u056b_\u0576\u0578\u0575\u0565\u0574\u0562\u0565\u0580\u056b_\u0564\u0565\u056f\u057f\u0565\u0574\u0562\u0565\u0580\u056b".split("_"),standalone:"\u0570\u0578\u0582\u0576\u057e\u0561\u0580_\u0583\u0565\u057f\u0580\u057e\u0561\u0580_\u0574\u0561\u0580\u057f_\u0561\u057a\u0580\u056b\u056c_\u0574\u0561\u0575\u056b\u057d_\u0570\u0578\u0582\u0576\u056b\u057d_\u0570\u0578\u0582\u056c\u056b\u057d_\u0585\u0563\u0578\u057d\u057f\u0578\u057d_\u057d\u0565\u057a\u057f\u0565\u0574\u0562\u0565\u0580_\u0570\u0578\u056f\u057f\u0565\u0574\u0562\u0565\u0580_\u0576\u0578\u0575\u0565\u0574\u0562\u0565\u0580_\u0564\u0565\u056f\u057f\u0565\u0574\u0562\u0565\u0580".split("_")},monthsShort:"\u0570\u0576\u057e_\u0583\u057f\u0580_\u0574\u0580\u057f_\u0561\u057a\u0580_\u0574\u0575\u057d_\u0570\u0576\u057d_\u0570\u056c\u057d_\u0585\u0563\u057d_\u057d\u057a\u057f_\u0570\u056f\u057f_\u0576\u0574\u0562_\u0564\u056f\u057f".split("_"),weekdays:"\u056f\u056b\u0580\u0561\u056f\u056b_\u0565\u0580\u056f\u0578\u0582\u0577\u0561\u0562\u0569\u056b_\u0565\u0580\u0565\u0584\u0577\u0561\u0562\u0569\u056b_\u0579\u0578\u0580\u0565\u0584\u0577\u0561\u0562\u0569\u056b_\u0570\u056b\u0576\u0563\u0577\u0561\u0562\u0569\u056b_\u0578\u0582\u0580\u0562\u0561\u0569_\u0577\u0561\u0562\u0561\u0569".split("_"),weekdaysShort:"\u056f\u0580\u056f_\u0565\u0580\u056f_\u0565\u0580\u0584_\u0579\u0580\u0584_\u0570\u0576\u0563_\u0578\u0582\u0580\u0562_\u0577\u0562\u0569".split("_"),weekdaysMin:"\u056f\u0580\u056f_\u0565\u0580\u056f_\u0565\u0580\u0584_\u0579\u0580\u0584_\u0570\u0576\u0563_\u0578\u0582\u0580\u0562_\u0577\u0562\u0569".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0569.",LLL:"D MMMM YYYY \u0569., HH:mm",LLLL:"dddd, D MMMM YYYY \u0569., HH:mm"},calendar:{sameDay:"[\u0561\u0575\u057d\u0585\u0580] LT",nextDay:"[\u057e\u0561\u0572\u0568] LT",lastDay:"[\u0565\u0580\u0565\u056f] LT",nextWeek:function(){return"dddd [\u0585\u0580\u0568 \u056a\u0561\u0574\u0568] LT"},lastWeek:function(){return"[\u0561\u0576\u0581\u0561\u056e] dddd [\u0585\u0580\u0568 \u056a\u0561\u0574\u0568] LT"},sameElse:"L"},relativeTime:{future:"%s \u0570\u0565\u057f\u0578",past:"%s \u0561\u057c\u0561\u057b",s:"\u0574\u056b \u0584\u0561\u0576\u056b \u057e\u0561\u0575\u0580\u056f\u0575\u0561\u0576",ss:"%d \u057e\u0561\u0575\u0580\u056f\u0575\u0561\u0576",m:"\u0580\u0578\u057a\u0565",mm:"%d \u0580\u0578\u057a\u0565",h:"\u056a\u0561\u0574",hh:"%d \u056a\u0561\u0574",d:"\u0585\u0580",dd:"%d \u0585\u0580",M:"\u0561\u0574\u056b\u057d",MM:"%d \u0561\u0574\u056b\u057d",y:"\u057f\u0561\u0580\u056b",yy:"%d \u057f\u0561\u0580\u056b"},meridiemParse:/\u0563\u056b\u0577\u0565\u0580\u057e\u0561|\u0561\u057c\u0561\u057e\u0578\u057f\u057e\u0561|\u0581\u0565\u0580\u0565\u056f\u057e\u0561|\u0565\u0580\u0565\u056f\u0578\u0575\u0561\u0576/,isPM:function(e){return/^(\u0581\u0565\u0580\u0565\u056f\u057e\u0561|\u0565\u0580\u0565\u056f\u0578\u0575\u0561\u0576)$/.test(e)},meridiem:function(e){return e<4?"\u0563\u056b\u0577\u0565\u0580\u057e\u0561":e<12?"\u0561\u057c\u0561\u057e\u0578\u057f\u057e\u0561":e<17?"\u0581\u0565\u0580\u0565\u056f\u057e\u0561":"\u0565\u0580\u0565\u056f\u0578\u0575\u0561\u0576"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(\u056b\u0576|\u0580\u0564)/,ordinal:function(e,a){switch(a){case"DDD":case"w":case"W":case"DDDo":return 1===e?e+"-\u056b\u0576":e+"-\u0580\u0564";default:return e}},week:{dow:1,doy:7}}),M.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,a){return 12===e&&(e=0),"pagi"===a?e:"siang"===a?11<=e?e:e+12:"sore"===a||"malam"===a?e+12:void 0},meridiem:function(e,a,t){return e<11?"pagi":e<15?"siang":e<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",ss:"%d detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:0,doy:6}}),M.defineLocale("is",{months:"jan\xfaar_febr\xfaar_mars_apr\xedl_ma\xed_j\xfan\xed_j\xfal\xed_\xe1g\xfast_september_okt\xf3ber_n\xf3vember_desember".split("_"),monthsShort:"jan_feb_mar_apr_ma\xed_j\xfan_j\xfal_\xe1g\xfa_sep_okt_n\xf3v_des".split("_"),weekdays:"sunnudagur_m\xe1nudagur_\xferi\xf0judagur_mi\xf0vikudagur_fimmtudagur_f\xf6studagur_laugardagur".split("_"),weekdaysShort:"sun_m\xe1n_\xferi_mi\xf0_fim_f\xf6s_lau".split("_"),weekdaysMin:"Su_M\xe1_\xder_Mi_Fi_F\xf6_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[\xed dag kl.] LT",nextDay:"[\xe1 morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[\xed g\xe6r kl.] LT",lastWeek:"[s\xed\xf0asta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s s\xed\xf0an",s:vn,ss:vn,m:vn,mm:vn,h:"klukkustund",hh:vn,d:vn,dd:vn,M:vn,MM:vn,y:vn,yy:vn},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),M.defineLocale("it-ch",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_luned\xec_marted\xec_mercoled\xec_gioved\xec_venerd\xec_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%
12839d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}}),M.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_luned\xec_marted\xec_mercoled\xec_gioved\xec_venerd\xec_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:function(){return"[Oggi a"+(1<this.hours()?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextDay:function(){return"[Domani a"+(1<this.hours()?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextWeek:function(){return"dddd [a"+(1<this.hours()?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastDay:function(){return"[Ieri a"+(1<this.hours()?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastWeek:function(){switch(this.day()){case 0:return"[La scorsa] dddd [a"+(1<this.hours()?"lle ":0===this.hours()?" ":"ll'")+"]LT";default:return"[Lo scorso] dddd [a"+(1<this.hours()?"lle ":0===this.hours()?" ":"ll'")+"]LT"}},sameElse:"L"},relativeTime:{future:"tra %s",past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",w:"una settimana",ww:"%d settimane",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}}),M.defineLocale("ja",{eras:[{since:"2019-05-01",offset:1,name:"\u4ee4\u548c",narrow:"\u32ff",abbr:"R"},{since:"1989-01-08",until:"2019-04-30",offset:1,name:"\u5e73\u6210",narrow:"\u337b",abbr:"H"},{since:"1926-12-25",until:"1989-01-07",offset:1,name:"\u662d\u548c",narrow:"\u337c",abbr:"S"},{since:"1912-07-30",until:"1926-12-24",offset:1,name:"\u5927\u6b63",narrow:"\u337d",abbr:"T"},{since:"1873-01-01",until:"1912-07-29",offset:6,name:"\u660e\u6cbb",narrow:"\u337e",abbr:"M"},{since:"0001-01-01",until:"1873-12-31",offset:1,name:"\u897f\u66a6",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"\u7d00\u5143\u524d",narrow:"BC",abbr:"BC"}],eraYearOrdinalRegex:/(\u5143|\d+)\u5e74/,eraYearOrdinalParse:function(e,a){return"\u5143"===a[1]?1:parseInt(a[1]||e,10)},months:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u65e5\u66dc\u65e5_\u6708\u66dc\u65e5_\u706b\u66dc\u65e5_\u6c34\u66dc\u65e5_\u6728\u66dc\u65e5_\u91d1\u66dc\u65e5_\u571f\u66dc\u65e5".split("_"),weekdaysShort:"\u65e5_\u6708_\u706b_\u6c34_\u6728_\u91d1_\u571f".split("_"),weekdaysMin:"\u65e5_\u6708_\u706b_\u6c34_\u6728_\u91d1_\u571f".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5 HH:mm",LLLL:"YYYY\u5e74M\u6708D\u65e5 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5(ddd) HH:mm"},meridiemParse:/\u5348\u524d|\u5348\u5f8c/i,isPM:function(e){return"\u5348\u5f8c"===e},meridiem:function(e,a,t){return e<12?"\u5348\u524d":"\u5348\u5f8c"},calendar:{sameDay:"[\u4eca\u65e5] LT",nextDay:"[\u660e\u65e5] LT",nextWeek:function(e){return e.week()!==this.week()?"[\u6765\u9031]dddd LT":"dddd LT"},lastDay:"[\u6628\u65e5] LT",lastWeek:function(e){return this.week()!==e.week()?"[\u5148\u9031]dddd LT":"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}\u65e5/,ordinal:function(e,a){switch(a){case"y":return 1===e?"\u5143\u5e74":e+"\u5e74";case"d":case"D":case"DDD":return e+"\u65e5";default:return e}},relativeTime:{future:"%s\u5f8c",past:"%s\u524d",s:"\u6570\u79d2",ss:"%d\u79d2",m:"1\u5206",mm:"%d\u5206",h:"1\u6642\u9593",hh:"%d\u6642\u9593",d:"1\u65e5",dd:"%d\u65e5",M:"1\u30f6\u6708",MM:"%d\u30f6\u6708",y:"1\u5e74",yy:"%d\u5e74"}}),M.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(e,a){return 12===e&&(e=0),"enjing"===a?e:"siyang"===a?11<=e?e:e+12:"sonten"===a||"ndalu"===a?e+12:void 0},meridiem:function(e,a,t){return e<11?"enjing":e<15?"siyang":e<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",ss:"%d detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}}
vendor: 7,702 bytes, line 12839
12839),M.defineLocale("ka",{months:"\u10d8\u10d0\u10dc\u10d5\u10d0\u10e0\u10d8_\u10d7\u10d4\u10d1\u10d4\u10e0\u10d5\u10d0\u10da\u10d8_\u10db\u10d0\u10e0\u10e2\u10d8_\u10d0\u10de\u10e0\u10d8\u10da\u10d8_\u10db\u10d0\u10d8\u10e1\u10d8_\u10d8\u10d5\u10dc\u10d8\u10e1\u10d8_\u10d8\u10d5\u10da\u10d8\u10e1\u10d8_\u10d0\u10d2\u10d5\u10d8\u10e1\u10e2\u10dd_\u10e1\u10d4\u10e5\u10e2\u10d4\u10db\u10d1\u10d4\u10e0\u10d8_\u10dd\u10e5\u10e2\u10dd\u10db\u10d1\u10d4\u10e0\u10d8_\u10dc\u10dd\u10d4\u10db\u10d1\u10d4\u10e0\u10d8_\u10d3\u10d4\u10d9\u10d4\u10db\u10d1\u10d4\u10e0\u10d8".split("_"),monthsShort:"\u10d8\u10d0\u10dc_\u10d7\u10d4\u10d1_\u10db\u10d0\u10e0_\u10d0\u10de\u10e0_\u10db\u10d0\u10d8_\u10d8\u10d5\u10dc_\u10d8\u10d5\u10da_\u10d0\u10d2\u10d5_\u10e1\u10d4\u10e5_\u10dd\u10e5\u10e2_\u10dc\u10dd\u10d4_\u10d3\u10d4\u10d9".split("_"),weekdays:{standalone:"\u10d9\u10d5\u10d8\u10e0\u10d0_\u10dd\u10e0\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8_\u10e1\u10d0\u10db\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8_\u10dd\u10d7\u10ee\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8_\u10ee\u10e3\u10d7\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8_\u10de\u10d0\u10e0\u10d0\u10e1\u10d9\u10d4\u10d5\u10d8_\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8".split("_"),format:"\u10d9\u10d5\u10d8\u10e0\u10d0\u10e1_\u10dd\u10e0\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1_\u10e1\u10d0\u10db\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1_\u10dd\u10d7\u10ee\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1_\u10ee\u10e3\u10d7\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1_\u10de\u10d0\u10e0\u10d0\u10e1\u10d9\u10d4\u10d5\u10e1_\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1".split("_"),isFormat:/(\u10ec\u10d8\u10dc\u10d0|\u10e8\u10d4\u10db\u10d3\u10d4\u10d2)/},weekdaysShort:"\u10d9\u10d5\u10d8_\u10dd\u10e0\u10e8_\u10e1\u10d0\u10db_\u10dd\u10d7\u10ee_\u10ee\u10e3\u10d7_\u10de\u10d0\u10e0_\u10e8\u10d0\u10d1".split("_"),weekdaysMin:"\u10d9\u10d5_\u10dd\u10e0_\u10e1\u10d0_\u10dd\u10d7_\u10ee\u10e3_\u10de\u10d0_\u10e8\u10d0".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u10d3\u10e6\u10d4\u10e1] LT[-\u10d6\u10d4]",nextDay:"[\u10ee\u10d5\u10d0\u10da] LT[-\u10d6\u10d4]",lastDay:"[\u10d2\u10e3\u10e8\u10d8\u10dc] LT[-\u10d6\u10d4]",nextWeek:"[\u10e8\u10d4\u10db\u10d3\u10d4\u10d2] dddd LT[-\u10d6\u10d4]",lastWeek:"[\u10ec\u10d8\u10dc\u10d0] dddd LT-\u10d6\u10d4",sameElse:"L"},relativeTime:{future:function(e){return e.replace(/(\u10ec\u10d0\u10db|\u10ec\u10e3\u10d7|\u10e1\u10d0\u10d0\u10d7|\u10ec\u10d4\u10da|\u10d3\u10e6|\u10d7\u10d5)(\u10d8|\u10d4)/,function(e,a,t){return"\u10d8"===t?a+"\u10e8\u10d8":a+t+"\u10e8\u10d8"})},past:function(e){return/(\u10ec\u10d0\u10db\u10d8|\u10ec\u10e3\u10d7\u10d8|\u10e1\u10d0\u10d0\u10d7\u10d8|\u10d3\u10e6\u10d4|\u10d7\u10d5\u10d4)/.test(e)?e.replace(/(\u10d8|\u10d4)$/,"\u10d8\u10e1 \u10ec\u10d8\u10dc"):/\u10ec\u10d4\u10da\u10d8/.test(e)?e.replace(/\u10ec\u10d4\u10da\u10d8$/,"\u10ec\u10da\u10d8\u10e1 \u10ec\u10d8\u10dc"):e},s:"\u10e0\u10d0\u10db\u10d3\u10d4\u10dc\u10d8\u10db\u10d4 \u10ec\u10d0\u10db\u10d8",ss:"%d \u10ec\u10d0\u10db\u10d8",m:"\u10ec\u10e3\u10d7\u10d8",mm:"%d \u10ec\u10e3\u10d7\u10d8",h:"\u10e1\u10d0\u10d0\u10d7\u10d8",hh:"%d \u10e1\u10d0\u10d0\u10d7\u10d8",d:"\u10d3\u10e6\u10d4",dd:"%d \u10d3\u10e6\u10d4",M:"\u10d7\u10d5\u10d4",MM:"%d \u10d7\u10d5\u10d4",y:"\u10ec\u10d4\u10da\u10d8",yy:"%d \u10ec\u10d4\u10da\u10d8"},dayOfMonthOrdinalParse:/0|1-\u10da\u10d8|\u10db\u10d4-\d{1,2}|\d{1,2}-\u10d4/,ordinal:function(e){return 0===e?e:1===e?e+"-\u10da\u10d8":e<20||e<=100&&e%20==0||e%100==0?"\u10db\u10d4-"+e:e+"-\u10d4"},week:{dow:1,doy:7}});var bn={0:"-\u0448\u0456",1:"-\u0448\u0456",2:"-\u0448\u0456",3:"-\u0448\u0456",4:"-\u0448\u0456",5:"-\u0448\u0456",6:"-\u0448\u044b",7:"-\u0448\u0456",8:"-\u0448\u0456",9:"-\u0448\u044b",10:"-\u0448\u044b",20:"-\u0448\u044b",30:"-\u0448\u044b",40:"-\u0448\u044b",50:"-\u0448\u0456",60:"-\u0448\u044b",70:"-\u0448\u0456",80:"-\u0448\u0456",90:"-\u0448\u044b",100:"-\u0448\u0456"};M.defineLocale("kk",{months:"\u049b\u0430\u04a3\u0442\u0430\u0440_\u0430\u049b\u043f\u0430\u043d_\u043d\u0430\u0443\u0440\u044b\u0437_\u0441\u04d9\u0443\u0456\u0440_\u043c\u0430\u043c\u044b\u0440_\u043c\u0430\u0443\u0441\u044b\u043c_\u0448\u0456\u043b\u0434\u0435_\u0442\u0430\u043c\u044b\u0437_\u049b\u044b\u0440\u043a\u04af\u0439\u0435\u043a_\u049b\u0430\u0437\u0430\u043d_\u049b\u0430\u0440\u0430\u0448\u0430_\u0436\u0435\u043b\u0442\u043e\u049b\u0441\u0430\u043d".split("_"),monthsShort:"\u049b\u0430\u04a3_\u0430\u049b\u043f_\u043d\u0430\u0443_\u0441\u04d9\u0443_\u043c\u0430\u043c_\u043c\u0430\u0443_\u0448\u0456\u043b_\u0442\u0430\u043c_\u049b\u044b\u0440_\u049b\u0430\u0437_\u049b\u0430\u0440_\u0436\u0435\u043b".split("_"),weekdays:"\u0436\u0435\u043a\u0441\u0435\u043d\u0431\u0456_\u0434\u04af\u0439\u0441\u0435\u043d\u0431\u0456_\u0441\u0435\u0439\u0441\u0435\u043d\u0431\u0456_\u0441\u04d9\u0440\u0441\u0435\u043d\u0431\u0456_\u0431\u0435\u0439\u0441\u0435\u043d\u0431\u0456_\u0436\u04b1\u043c\u0430_\u0441\u0435\u043d\u0431\u0456".split("_"),weekdaysShort:"\u0436\u0435\u043a_\u0434\u04af\u0439_\u0441\u0435\u0439_\u0441\u04d9\u0440_\u0431\u0435\u0439_\u0436\u04b1\u043c_\u0441\u0435\u043d".split("_"),weekdaysMin:"\u0436\u043a_\u0434\u0439_\u0441\u0439_\u0441\u0440_\u0431\u0439_\u0436\u043c_\u0441\u043d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0411\u04af\u0433\u0456\u043d \u0441\u0430\u0493\u0430\u0442] LT",nextDay:"[\u0415\u0440\u0442\u0435\u04a3 \u0441\u0430\u0493\u0430\u0442] LT",nextWeek:"dddd [\u0441\u0430\u0493\u0430\u0442] LT",lastDay:"[\u041a\u0435\u0448\u0435 \u0441\u0430\u0493\u0430\u0442] LT",lastWeek:"[\u04e8\u0442\u043a\u0435\u043d \u0430\u043f\u0442\u0430\u043d\u044b\u04a3] dddd [\u0441\u0430\u0493\u0430\u0442] LT",sameElse:"L"},relativeTime:{future:"%s \u0456\u0448\u0456\u043d\u0434\u0435",past:"%s \u0431\u04b1\u0440\u044b\u043d",s:"\u0431\u0456\u0440\u043d\u0435\u0448\u0435 \u0441\u0435\u043a\u0443\u043d\u0434",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434",m:"\u0431\u0456\u0440 \u043c\u0438\u043d\u0443\u0442",mm:"%d \u043c\u0438\u043d\u0443\u0442",h:"\u0431\u0456\u0440 \u0441\u0430\u0493\u0430\u0442",hh:"%d \u0441\u0430\u0493\u0430\u0442",d:"\u0431\u0456\u0440 \u043a\u04af\u043d",dd:"%d \u043a\u04af\u043d",M:"\u0431\u0456\u0440 \u0430\u0439",MM:"%d \u0430\u0439",y:"\u0431\u0456\u0440 \u0436\u044b\u043b",yy:"%d \u0436\u044b\u043b"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0448\u0456|\u0448\u044b)/,ordinal:function(e){return e+(bn[e]||bn[e%10]||bn[100<=e?100:null])},week:{dow:1,doy:7}});var Sn={1:"\u17e1",2:"\u17e2",3:"\u17e3",4:"\u17e4",5:"\u17e5",6:"\u17e6",7:"\u17e7",8:"\u17e8",9:"\u17e9",0:"\u17e0"},Hn={"\u17e1":"1","\u17e2":"2","\u17e3":"3","\u17e4":"4","\u17e5":"5","\u17e6":"6","\u17e7":"7","\u17e8":"8","\u17e9":"9","\u17e0":"0"};M.defineLocale("km",{months:"\u1798\u1780\u179a\u17b6_\u1780\u17bb\u1798\u17d2\u1797\u17c8_\u1798\u17b8\u1793\u17b6_\u1798\u17c1\u179f\u17b6_\u17a7\u179f\u1797\u17b6_\u1798\u17b7\u1790\u17bb\u1793\u17b6_\u1780\u1780\u17d2\u1780\u178a\u17b6_\u179f\u17b8\u17a0\u17b6_\u1780\u1789\u17d2\u1789\u17b6_\u178f\u17bb\u179b\u17b6_\u179c\u17b7\u1785\u17d2\u1786\u17b7\u1780\u17b6_\u1792\u17d2\u1793\u17bc".split("_"),monthsShort:"\u1798\u1780\u179a\u17b6_\u1780\u17bb\u1798\u17d2\u1797\u17c8_\u1798\u17b8\u1793\u17b6_\u1798\u17c1\u179f\u17b6_\u17a7\u179f\u1797\u17b6_\u1798\u17b7\u1790\u17bb\u1793\u17b6_\u1780\u1780\u17d2\u1780\u178a\u17b6_\u179f\u17b8\u17a0\u17b6_\u1780\u1789\u17d2\u1789\u17b6_\u178f\u17bb\u179b\u17b6_\u179c\u17b7\u1785\u17d2\u1786\u17b7\u1780\u17b6_\u1792\u17d2\u1793\u17bc".split("_"),weekdays:"\u
1283917a2\u17b6\u1791\u17b7\u178f\u17d2\u1799_\u1785\u17d0\u1793\u17d2\u1791_\u17a2\u1784\u17d2\u1782\u17b6\u179a_\u1796\u17bb\u1792_\u1796\u17d2\u179a\u17a0\u179f\u17d2\u1794\u178f\u17b7\u17cd_\u179f\u17bb\u1780\u17d2\u179a_\u179f\u17c5\u179a\u17cd".split("_"),weekdaysShort:"\u17a2\u17b6_\u1785_\u17a2_\u1796_\u1796\u17d2\u179a_\u179f\u17bb_\u179f".split("_"),weekdaysMin:"\u17a2\u17b6_\u1785_\u17a2_\u1796_\u1796\u17d2\u179a_\u179f\u17bb_\u179f".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/\u1796\u17d2\u179a\u17b9\u1780|\u179b\u17d2\u1784\u17b6\u1785/,isPM:function(e){return"\u179b\u17d2\u1784\u17b6\u1785"===e},meridiem:function(e,a,t){return e<12?"\u1796\u17d2\u179a\u17b9\u1780":"\u179b\u17d2\u1784\u17b6\u1785"},calendar:{sameDay:"[\u1790\u17d2\u1784\u17c3\u1793\u17c1\u17c7 \u1798\u17c9\u17c4\u1784] LT",nextDay:"[\u179f\u17d2\u17a2\u17c2\u1780 \u1798\u17c9\u17c4\u1784] LT",nextWeek:"dddd [\u1798\u17c9\u17c4\u1784] LT",lastDay:"[\u1798\u17d2\u179f\u17b7\u179b\u1798\u17b7\u1789 \u1798\u17c9\u17c4\u1784] LT",lastWeek:"dddd [\u179f\u1794\u17d2\u178f\u17b6\u17a0\u17cd\u1798\u17bb\u1793] [\u1798\u17c9\u17c4\u1784] LT",sameElse:"L"},relativeTime:{future:"%s\u1791\u17c0\u178f",past:"%s\u1798\u17bb\u1793",s:"\u1794\u17c9\u17bb\u1793\u17d2\u1798\u17b6\u1793\u179c\u17b7\u1793\u17b6\u1791\u17b8",ss:"%d \u179c\u17b7\u1793\u17b6\u1791\u17b8",m:"\u1798\u17bd\u1799\u1793\u17b6\u1791\u17b8",mm:"%d \u1793\u17b6\u1791\u17b8",h:"\u1798\u17bd\u1799\u1798\u17c9\u17c4\u1784",hh:"%d \u1798\u17c9\u17c4\u1784",d:"\u1798\u17bd\u1799\u1790\u17d2\u1784\u17c3",dd:"%d \u1790\u17d2\u1784\u17c3",M:"\u1798\u17bd\u1799\u1781\u17c2",MM:"%d \u1781\u17c2",y:"\u1798\u17bd\u1799\u1786\u17d2\u1793\u17b6\u17c6",yy:"%d \u1786\u17d2\u1793\u17b6\u17c6"},dayOfMonthOrdinalParse:/\u1791\u17b8\d{1,2}/,ordinal:"\u1791\u17b8%d",preparse:function(e){return e.replace(/[\u17e1\u17e2\u17e3\u17e4\u17e5\u17e6\u17e7\u17e8\u17e9\u17e0]/g,function(e){return Hn[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return Sn[e]})},week:{dow:1,doy:4}});var jn={1:"\u0ce7",2:"\u0ce8",3:"\u0ce9",4:"\u0cea",5:"\u0ceb",6:"\u0cec",7:"\u0ced",8:"\u0cee",9:"\u0cef",0:"\u0ce6"},xn={"\u0ce7":"1","\u0ce8":"2","\u0ce9":"3","\u0cea":"4","\u0ceb":"5","\u0cec":"6","\u0ced":"7","\u0cee":"8","\u0cef":"9","\u0ce6":"0"};M.defineLocale("kn",{months:"\u0c9c\u0ca8\u0cb5\u0cb0\u0cbf_\u0cab\u0cc6\u0cac\u0ccd\u0cb0\u0cb5\u0cb0\u0cbf_\u0cae\u0cbe\u0cb0\u0ccd\u0c9a\u0ccd_\u0c8f\u0caa\u0ccd\u0cb0\u0cbf\u0cb2\u0ccd_\u0cae\u0cc6\u0cd5_\u0c9c\u0cc2\u0ca8\u0ccd_\u0c9c\u0cc1\u0cb2\u0cc6\u0cd6_\u0c86\u0c97\u0cb8\u0ccd\u0c9f\u0ccd_\u0cb8\u0cc6\u0caa\u0ccd\u0c9f\u0cc6\u0c82\u0cac\u0cb0\u0ccd_\u0c85\u0c95\u0ccd\u0c9f\u0cc6\u0cc2\u0cd5\u0cac\u0cb0\u0ccd_\u0ca8\u0cb5\u0cc6\u0c82\u0cac\u0cb0\u0ccd_\u0ca1\u0cbf\u0cb8\u0cc6\u0c82\u0cac\u0cb0\u0ccd".split("_"),monthsShort:"\u0c9c\u0ca8_\u0cab\u0cc6\u0cac\u0ccd\u0cb0_\u0cae\u0cbe\u0cb0\u0ccd\u0c9a\u0ccd_\u0c8f\u0caa\u0ccd\u0cb0\u0cbf\u0cb2\u0ccd_\u0cae\u0cc6\u0cd5_\u0c9c\u0cc2\u0ca8\u0ccd_\u0c9c\u0cc1\u0cb2\u0cc6\u0cd6_\u0c86\u0c97\u0cb8\u0ccd\u0c9f\u0ccd_\u0cb8\u0cc6\u0caa\u0ccd\u0c9f\u0cc6\u0c82_\u0c85\u0c95\u0ccd\u0c9f\u0cc6\u0cc2\u0cd5_\u0ca8\u0cb5\u0cc6\u0c82_\u0ca1\u0cbf\u0cb8\u0cc6\u0c82".split("_"),monthsParseExact:!0,weekdays:"\u0cad\u0cbe\u0ca8\u0cc1\u0cb5\u0cbe\u0cb0_\u0cb8\u0cc6\u0cc2\u0cd5\u0cae\u0cb5\u0cbe\u0cb0_\u0cae\u0c82\u0c97\u0cb3\u0cb5\u0cbe\u0cb0_\u0cac\u0cc1\u0ca7\u0cb5\u0cbe\u0cb0_\u0c97\u0cc1\u0cb0\u0cc1\u0cb5\u0cbe\u0cb0_\u0cb6\u0cc1\u0c95\u0ccd\u0cb0\u0cb5\u0cbe\u0cb0_\u0cb6\u0ca8\u0cbf\u0cb5\u0cbe\u0cb0".split("_"),weekdaysShort:"\u0cad\u0cbe\u0ca8\u0cc1_\u0cb8\u0cc6\u0cc2\u0cd5\u0cae_\u0cae\u0c82\u0c97\u0cb3_\u0cac\u0cc1\u0ca7_\u0c97\u0cc1\u0cb0\u0cc1_\u0cb6\u0cc1\u0c95\u0ccd\u0cb0_\u0cb6\u0ca8\u0cbf".split("_"),weekdaysMin:"\u0cad\u0cbe_\u0cb8\u0cc6\u0cc2\u0cd5_\u0cae\u0c82_\u0cac\u0cc1_\u0c97\u0cc1_\u0cb6\u0cc1_\u0cb6".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[\u0c87\u0c82\u0ca6\u0cc1] LT",nextDay:"[\u0ca8\u0cbe\u0cb3\u0cc6] LT",nextWeek:"dddd, LT",lastDay:"[\u0ca8\u0cbf\u0ca8\u0ccd\u0ca8\u0cc6] LT",lastWeek:"[\u0c95\u0cc6\u0cc2\u0ca8\u0cc6\u0caf] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0ca8\u0c82\u0ca4\u0cb0",past:"%s \u0cb9\u0cbf\u0c82\u0ca6\u0cc6",s:"\u0c95\u0cc6\u0cb2\u0cb5\u0cc1 \u0c95\u0ccd\u0cb7\u0ca3\u0c97\u0cb3\u0cc1",ss:"%d \u0cb8\u0cc6\u0c95\u0cc6\u0c82\u0ca1\u0cc1\u0c97\u0cb3\u0cc1",m:"\u0c92\u0c82\u0ca6\u0cc1 \u0ca8\u0cbf\u0cae\u0cbf\u0cb7",mm:"%d \u0ca8\u0cbf\u0cae\u0cbf\u0cb7",h:"\u0c92\u0c82\u0ca6\u0cc1 \u0c97\u0c82\u0c9f\u0cc6",hh:"%
12839d \u0c97\u0c82\u0c9f\u0cc6",d:"\u0c92\u0c82\u0ca6\u0cc1 \u0ca6\u0cbf\u0ca8",dd:"%d \u0ca6\u0cbf\u0ca8",M:"\u0c92\u0c82\u0ca6\u0cc1 \u0ca4\u0cbf\u0c82\u0c97\u0cb3\u0cc1",MM:"%d \u0ca4\u0cbf\u0c82\u0c97\u0cb3\u0cc1",y:"\u0c92\u0c82\u0ca6\u0cc1 \u0cb5\u0cb0\u0ccd\u0cb7",yy:"%d \u0cb5\u0cb0\u0ccd\u0cb7"},preparse:function(e){return e.replace(/[\u0ce7\u0ce8\u0ce9\u0cea\u0ceb\u0cec\u0ced\u0cee\u0cef\u0ce6]/g,function(e){return xn[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return jn[e]})},meridiemParse:/\u0cb0\u0cbe\u0ca4\u0ccd\u0cb0\u0cbf|\u0cac\u0cc6\u0cb3\u0cbf\u0c97\u0ccd\u0c97\u0cc6|\u0cae\u0ca7\u0ccd\u0caf\u0cbe\u0cb9\u0ccd\u0ca8|\u0cb8\u0c82\u0c9c\u0cc6/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0cb0\u0cbe\u0ca4\u0ccd\u0cb0\u0cbf"===a?e<4?e:e+12:"\u0cac\u0cc6\u0cb3\u0cbf\u0c97\u0ccd\u0c97\u0cc6"===a?e:"\u0cae\u0ca7\u0ccd\u0caf\u0cbe\u0cb9\u0ccd\u0ca8"===a?10<=e?e:e+12:"\u0cb8\u0c82\u0c9c\u0cc6"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"\u0cb0\u0cbe\u0ca4\u0ccd\u0cb0\u0cbf":e<10?"\u0cac\u0cc6\u0cb3\u0cbf\u0c97\u0ccd\u0c97\u0cc6":e<17?"\u0cae\u0ca7\u0ccd\u0caf\u0cbe\u0cb9\u0ccd\u0ca8":e<20?"\u0cb8\u0c82\u0c9c\u0cc6":"\u0cb0\u0cbe\u0ca4\u0ccd\u0cb0\u0cbf"},dayOfMonthOrdinalParse:/\d{1,2}(\u0ca8\u0cc6\u0cd5)/,ordinal:function(e){return e+"\u0ca8\u0cc6\u0cd5"},week:{dow:0,doy:6}}),M.defineLocale("ko",{months:"1\uc6d4_2\uc6d4_3\uc6d4_4\uc6d4_5\uc6d4_6\uc6d4_7\uc6d4_8\uc6d4_9\uc6d4_10\uc6d4_11\uc6d4_12\uc6d4".split("_"),monthsShort:"1\uc6d4_2\uc6d4_3\uc6d4_4\uc6d4_5\uc6d4_6\uc6d4_7\uc6d4_8\uc6d4_9\uc6d4_10\uc6d4_11\uc6d4_12\uc6d4".split("_"),weekdays:"\uc77c\uc694\uc77c_\uc6d4\uc694\uc77c_\ud654\uc694\uc77c_\uc218\uc694\uc77c_\ubaa9\uc694\uc77c_\uae08\uc694\uc77c_\ud1a0\uc694\uc77c".split("_"),weekdaysShort:"\uc77c_\uc6d4_\ud654_\uc218_\ubaa9_\uae08_\ud1a0".split("_"),weekdaysMin:"\uc77c_\uc6d4_\ud654_\uc218_\ubaa9_\uae08_\ud1a0".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY\ub144 MMMM D\uc77c",LLL:"YYYY\ub144 MMMM D\uc77c A h:mm",LLLL:"YYYY\ub144 MMMM D\uc77c dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY\ub144 MMMM D\uc77c",lll:"YYYY\ub144 MMMM D\uc77c A h:mm",llll:"YYYY\ub144 MMMM D\uc77c dddd A h:mm"},calendar:{sameDay:"\uc624\ub298 LT",nextDay:"\ub0b4\uc77c LT",nextWeek:"dddd LT",lastDay:"\uc5b4\uc81c LT",lastWeek:"\uc9c0\ub09c\uc8fc dddd LT",sameElse:"L"},relativeTime:{future:"%s \ud6c4",past:"%s \uc804",s:"\uba87 \ucd08",ss:"%d\ucd08",m:"1\ubd84",mm:"%d\ubd84",h:"\ud55c \uc2dc\uac04",hh:"%d\uc2dc\uac04",d:"\ud558\ub8e8",dd:"%d\uc77c",M:"\ud55c \ub2ec",MM:"%d\ub2ec",y:"\uc77c \ub144",yy:"%d\ub144"},dayOfMonthOrdinalParse:/\d{1,2}(\uc77c|\uc6d4|\uc8fc)/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"\uc77c";case"M":return e+"\uc6d4";case"w":case"W":return e+"\uc8fc";default:return e}},meridiemParse:/\uc624\uc804|\uc624\ud6c4/,isPM:function(e){return"\uc624\ud6c4"===e},meridiem:function(e,a,t){return e<12?"\uc624\uc804":"\uc624\ud6c4"}});var Pn={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},On={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"},Wn=["\u06a9\u0627\u0646\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645","\u0634\u0648\u0628\u0627\u062a","\u0626\u0627\u0632\u0627\u0631","\u0646\u06cc\u0633\u0627\u0646","\u0626\u0627\u06cc\u0627\u0631","\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646","\u062a\u06d5\u0645\u0645\u0648\u0632","\u0626\u0627\u0628","\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644","\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u0643\u06d5\u0645","\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645","\u0643\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645"];M.defineLocale("ku",{months:Wn,monthsShort:Wn,weekdays:"\u06cc\u0647\u200c\u0643\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u062f\u0648\u0648\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u0633\u06ce\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u0686\u0648\u0627\u0631\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u067e\u06ce\u0646\u062c\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u0647\u0647\u200c\u06cc\u0646\u06cc_\u0634\u0647\u200c\u0645\u0645\u0647\u200c".split("_"),weekdaysShort:"\u06cc\u0647\u200c\u0643\u0634\u0647\u200c\u0645_\u062f\u0648\u0648\u0634\u0647\u200c\u0645_\u0633\u06ce\u0634\u0647\u200c\u0645_\u0686\u0648\u0627\u0631\u0634\u0647\u200c\u0645_\u067e\u06ce\u0646\u062c\u0634\u0647\u200c\u0645_\u0647\u0647\u200c\u06cc\u0646\u06cc_\u0634\u0647\u200c\u0645\u0645\u0647\u200c".split("_"),weekdaysMin:"\u06cc_\u062f_\u0633_\u0686_\u067e_\u0647_\u0634".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/\u0626\u06ce\u0648\u0627\u0631\u0647\u200c|\u0628\u0647\u200c\u06cc\u0627\u0646\u06cc/,isPM:function(e){return/\u0626\u06ce\u0648\u0627\u0631\u0647\u200c/.test(e)},meridiem:function(e,a,t){return e<12?"\u0628\u0647\u200c\u06cc\u0627\u0646\u06cc":"\u0626\u06ce\u0648\u0627\u0631\u0647\u200c"},calendar:{sameDay:"[\u0626\u0647\u200c\u0645\u0631\u06c6 \u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",nextDay:"[\u0628\u0647\u200c\u06cc\u0627\u0646\u06cc \u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",nextWeek:"dddd [\u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",lastDay:"[\u062f\u0648\u06ce\u0646\u06ce \u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",lastWeek:"dddd [\u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",sameElse:"L"},relativeTime:{future:"\u0644\u0647\u200c %s",past:"%s",s:"\u0686\u0647\u200c\u0646\u062f \u0686\u0631\u0643\u0647\u200c\u06cc\u0647\u200c\u0643",ss:"\u0686\u0631\u0643\u0647\u200c %d",m:"\u06cc\u0647\u200c\u0643 \u062e\u0648\u0644\u0647\u200c\u0643",mm:"%d \u062e\u0648\u0644\u0647\u200c\u0643",h:"\u06cc\u0647\u200c\u0643 \u0643\u0627\u062a\u0698\u0645\u06ce\u0631",hh:"%d \u0643\u0627\u062a\u0698\u0645\u06ce\u0631",d:"\u06cc\u0647\u200c\u0643 \u0695\u06c6\u0698",dd:"%d \u0695\u06c6\u0698",M:"\u06cc\u0647\u200c\u0643 \u0645\u0627\u0646\u06af",MM:"%d \u0645\u0627\u0646\u06af",y:"\u06cc\u0647\u200c\u0643 \u0633\u0627\u06b5",yy:"%d \u0633\u0627\u06b5"},preparse:function(e){return e.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,function(e){return On[e]}).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return Pn[e]}).replace(/,/g,"\u060c")},week:{dow:6,doy:12}});var An={0:"-\u0447\u04af",1:"-\u0447\u0438",2:"-\u0447\u0438",3:"-\u0447\u04af",4:"-\u0447\u04af",5:"-\u0447\u0438",6:"-\u0447\u044b",7:"-\u0447\u0438",8:"-\u0447\u0438",9:"-\u0447\u0443",10:"-\u0447\u0443",20:"-\u0447\u044b",30:"-\u0447\u0443",40:"-\u0447\u044b",50:"-\u0447\u04af",60:"-\u0447\u044b",70:"-\u0447\u0438",80:"-\u0447\u0438",90:"-\u0447\u0443",100:"-\u0447\u04af"};function En(e,a,t,s){var n={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return a?n[t][0]:n[t][1]}function Fn(e){if(e=parseInt(e,10),isNaN(e))return!1;if(e<0)return!0;
vendor: 6,691 bytes, line 12839
12839if(e<10)return 4<=e&&e<=7;if(e<100){var a=e%10;return 0==a?Fn(e/10):Fn(a)}if(e<1e4){for(;10<=e;)e/=10;return Fn(e)}return Fn(e/=1e3)}M.defineLocale("ky",{months:"\u044f\u043d\u0432\u0430\u0440\u044c_\u0444\u0435\u0432\u0440\u0430\u043b\u044c_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0435\u043b\u044c_\u043c\u0430\u0439_\u0438\u044e\u043d\u044c_\u0438\u044e\u043b\u044c_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c_\u043e\u043a\u0442\u044f\u0431\u0440\u044c_\u043d\u043e\u044f\u0431\u0440\u044c_\u0434\u0435\u043a\u0430\u0431\u0440\u044c".split("_"),monthsShort:"\u044f\u043d\u0432_\u0444\u0435\u0432_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440_\u043c\u0430\u0439_\u0438\u044e\u043d\u044c_\u0438\u044e\u043b\u044c_\u0430\u0432\u0433_\u0441\u0435\u043d_\u043e\u043a\u0442_\u043d\u043e\u044f_\u0434\u0435\u043a".split("_"),weekdays:"\u0416\u0435\u043a\u0448\u0435\u043c\u0431\u0438_\u0414\u04af\u0439\u0448\u04e9\u043c\u0431\u04af_\u0428\u0435\u0439\u0448\u0435\u043c\u0431\u0438_\u0428\u0430\u0440\u0448\u0435\u043c\u0431\u0438_\u0411\u0435\u0439\u0448\u0435\u043c\u0431\u0438_\u0416\u0443\u043c\u0430_\u0418\u0448\u0435\u043c\u0431\u0438".split("_"),weekdaysShort:"\u0416\u0435\u043a_\u0414\u04af\u0439_\u0428\u0435\u0439_\u0428\u0430\u0440_\u0411\u0435\u0439_\u0416\u0443\u043c_\u0418\u0448\u0435".split("_"),weekdaysMin:"\u0416\u043a_\u0414\u0439_\u0428\u0439_\u0428\u0440_\u0411\u0439_\u0416\u043c_\u0418\u0448".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0411\u04af\u0433\u04af\u043d \u0441\u0430\u0430\u0442] LT",nextDay:"[\u042d\u0440\u0442\u0435\u04a3 \u0441\u0430\u0430\u0442] LT",nextWeek:"dddd [\u0441\u0430\u0430\u0442] LT",lastDay:"[\u041a\u0435\u0447\u044d\u044d \u0441\u0430\u0430\u0442] LT",lastWeek:"[\u04e8\u0442\u043a\u04e9\u043d \u0430\u043f\u0442\u0430\u043d\u044b\u043d] dddd [\u043a\u04af\u043d\u04af] [\u0441\u0430\u0430\u0442] LT",sameElse:"L"},relativeTime:{future:"%s \u0438\u0447\u0438\u043d\u0434\u0435",past:"%s \u043c\u0443\u0440\u0443\u043d",s:"\u0431\u0438\u0440\u043d\u0435\u0447\u0435 \u0441\u0435\u043a\u0443\u043d\u0434",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434",m:"\u0431\u0438\u0440 \u043c\u04af\u043d\u04e9\u0442",mm:"%d \u043c\u04af\u043d\u04e9\u0442",h:"\u0431\u0438\u0440 \u0441\u0430\u0430\u0442",hh:"%d \u0441\u0430\u0430\u0442",d:"\u0431\u0438\u0440 \u043a\u04af\u043d",dd:"%d \u043a\u04af\u043d",M:"\u0431\u0438\u0440 \u0430\u0439",MM:"%d \u0430\u0439",y:"\u0431\u0438\u0440 \u0436\u044b\u043b",yy:"%d \u0436\u044b\u043b"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0447\u0438|\u0447\u044b|\u0447\u04af|\u0447\u0443)/,ordinal:function(e){return e+(An[e]||An[e%10]||An[100<=e?100:null])},week:{dow:1,doy:7}}),M.defineLocale("lb",{months:"Januar_Februar_M\xe4erz_Abr\xebll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_M\xe9indeg_D\xebnschdeg_M\xebttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._M\xe9._D\xeb._M\xeb._Do._Fr._Sa.".split("_"),weekdaysMin:"So_M\xe9_D\xeb_M\xeb_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[G\xebschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:function(e){return Fn(e.substr(0,e.indexOf(" ")))?"a "+e:"an "+e},past:function(e){return Fn(e.substr(0,e.indexOf(" ")))?"viru "+e:"virun "+e},s:"e puer Sekonnen",ss:"%d Sekonnen",m:En,mm:"%d Minutten",h:En,hh:"%d Stonnen",d:En,dd:"%d Deeg",M:En,MM:"%d M\xe9int",y:En,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),M.defineLocale("lo",{months:"\u0ea1\u0eb1\u0e87\u0e81\u0ead\u0e99_\u0e81\u0eb8\u0ea1\u0e9e\u0eb2_\u0ea1\u0eb5\u0e99\u0eb2_\u0ec0\u0ea1\u0eaa\u0eb2_\u0e9e\u0eb6\u0e94\u0eaa\u0eb0\u0e9e\u0eb2_\u0ea1\u0eb4\u0e96\u0eb8\u0e99\u0eb2_\u0e81\u0ecd\u0ea5\u0eb0\u0e81\u0ebb\u0e94_\u0eaa\u0eb4\u0e87\u0eab\u0eb2_\u0e81\u0eb1\u0e99\u0e8d\u0eb2_\u0e95\u0eb8\u0ea5\u0eb2_\u0e9e\u0eb0\u0e88\u0eb4\u0e81_\u0e97\u0eb1\u0e99\u0ea7\u0eb2".split("_"),monthsShort:"\u0ea1\u0eb1\u0e87\u0e81\u0ead\u0e99_\u0e81\u0eb8\u0ea1\u0e9e\u0eb2_\u0ea1\u0eb5\u0e99\u0eb2_\u0ec0\u0ea1\u0eaa\u0eb2_\u0e9e\u0eb6\u0e94\u0eaa\u0eb0\u0e9e\u0eb2_\u0ea1\u0eb4\u0e96\u0eb8\u0e99\u0eb2_\u0e81\u0ecd\u0ea5\u0eb0\u0e81\u0ebb\u0e94_\u0eaa\u0eb4\u0e87\u0eab\u0eb2_\u0e81\u0eb1\u0e99\u0e8d\u0eb2_\u0e95\u0eb8\u0ea5\u0eb2_\u0e9e\u0eb0\u0e88\u0eb4\u0e81_\u0e97\u0eb1\u0e99\u0ea7\u0eb2".split("_"),weekdays:"\u0ead\u0eb2\u0e97\u0eb4\u0e94_\u0e88\u0eb1\u0e99_\u0ead\u0eb1\u0e87\u0e84\u0eb2\u0e99_\u0e9e\u0eb8\u0e94_\u0e9e\u0eb0\u0eab\u0eb1\u0e94_\u0eaa\u0eb8\u0e81_\u0ec0\u0eaa\u0ebb\u0eb2".split("_"),weekdaysShort:"\u0e97\u0eb4\u0e94_\u0e88\u0eb1\u0e99_\u0ead\u0eb1\u0e87\u0e84\u0eb2\u0e99_\u0e9e\u0eb8\u0e94_\u0e9e\u0eb0\u0eab\u0eb1\u0e94_\u0eaa\u0eb8\u0e81_\u0ec0\u0eaa\u0ebb\u0eb2".split("_"),weekdaysMin:"\u0e97_\u0e88_\u0ead\u0e84_\u0e9e_\u0e9e\u0eab_\u0eaa\u0e81_\u0eaa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"\u0ea7\u0eb1\u0e99dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0e95\u0ead\u0e99\u0ec0\u0e8a\u0ebb\u0ec9\u0eb2|\u0e95\u0ead\u0e99\u0ec1\u0ea5\u0e87/,isPM:function(e){return"\u0e95\u0ead\u0e99\u0ec1\u0ea5\u0e87"===e},meridiem:function(e,a,t){return e<12?"\u0e95\u0ead\u0e99\u0ec0\u0e8a\u0ebb\u0ec9\u0eb2":"\u0e95\u0ead\u0e99\u0ec1\u0ea5\u0e87"},calendar:{sameDay:"[\u0ea1\u0eb7\u0ec9\u0e99\u0eb5\u0ec9\u0ec0\u0ea7\u0ea5\u0eb2] LT",nextDay:"[\u0ea1\u0eb7\u0ec9\u0ead\u0eb7\u0ec8\u0e99\u0ec0\u0ea7\u0ea5\u0eb2] LT",nextWeek:"[\u0ea7\u0eb1\u0e99]dddd[\u0edc\u0ec9\u0eb2\u0ec0\u0ea7\u0ea5\u0eb2] LT",lastDay:"[\u0ea1\u0eb7\u0ec9\u0ea7\u0eb2\u0e99\u0e99\u0eb5\u0ec9\u0ec0\u0ea7\u0ea5\u0eb2] LT",lastWeek:"[\u0ea7\u0eb1\u0e99]dddd[\u0ec1\u0ea5\u0ec9\u0ea7\u0e99\u0eb5\u0ec9\u0ec0\u0ea7\u0ea5\u0eb2] LT",sameElse:"L"},relativeTime:{future:"\u0ead\u0eb5\u0e81 %s",past:"%s\u0e9c\u0ec8\u0eb2\u0e99\u0ea1\u0eb2",s:"\u0e9a\u0ecd\u0ec8\u0ec0\u0e97\u0ebb\u0ec8\u0eb2\u0ec3\u0e94\u0ea7\u0eb4\u0e99\u0eb2\u0e97\u0eb5",ss:"%d \u0ea7\u0eb4\u0e99\u0eb2\u0e97\u0eb5",m:"1 \u0e99\u0eb2\u0e97\u0eb5",mm:"%d \u0e99\u0eb2\u0e97\u0eb5",h:"1 \u0e8a\u0ebb\u0ec8\u0ea7\u0ec2\u0ea1\u0e87",hh:"%
12839d \u0e8a\u0ebb\u0ec8\u0ea7\u0ec2\u0ea1\u0e87",d:"1 \u0ea1\u0eb7\u0ec9",dd:"%d \u0ea1\u0eb7\u0ec9",M:"1 \u0ec0\u0e94\u0eb7\u0ead\u0e99",MM:"%d \u0ec0\u0e94\u0eb7\u0ead\u0e99",y:"1 \u0e9b\u0eb5",yy:"%d \u0e9b\u0eb5"},dayOfMonthOrdinalParse:/(\u0e97\u0eb5\u0ec8)\d{1,2}/,ordinal:function(e){return"\u0e97\u0eb5\u0ec8"+e}});var zn={ss:"sekund\u0117_sekund\u017ei\u0173_sekundes",m:"minut\u0117_minut\u0117s_minut\u0119",mm:"minut\u0117s_minu\u010di\u0173_minutes",h:"valanda_valandos_valand\u0105",hh:"valandos_valand\u0173_valandas",d:"diena_dienos_dien\u0105",dd:"dienos_dien\u0173_dienas",M:"m\u0117nuo_m\u0117nesio_m\u0117nes\u012f",MM:"m\u0117nesiai_m\u0117nesi\u0173_m\u0117nesius",y:"metai_met\u0173_metus",yy:"metai_met\u0173_metus"};function Nn(e,a,t,s){return a?Rn(t)[0]:s?Rn(t)[1]:Rn(t)[2]}function Jn(e){return e%10==0||10<e&&e<20}function Rn(e){return zn[e].split("_")}function Cn(e,a,t,s){var n=e+" ";return 1===e?n+Nn(0,a,t[0],s):a?n+(Jn(e)?Rn(t)[1]:Rn(t)[0]):s?n+Rn(t)[1]:n+(Jn(e)?Rn(t)[1]:Rn(t)[2])}M.defineLocale("lt",{months:{format:"sausio_vasario_kovo_baland\u017eio_gegu\u017e\u0117s_bir\u017eelio_liepos_rugpj\u016b\u010dio_rugs\u0117jo_spalio_lapkri\u010dio_gruod\u017eio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegu\u017e\u0117_bir\u017eelis_liepa_rugpj\u016btis_rugs\u0117jis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadien\u012f_pirmadien\u012f_antradien\u012f_tre\u010diadien\u012f_ketvirtadien\u012f_penktadien\u012f_\u0161e\u0161tadien\u012f".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_tre\u010diadienis_ketvirtadienis_penktadienis_\u0161e\u0161tadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_\u0160e\u0161".split("_"),weekdaysMin:"S_P_A_T_K_Pn_\u0160".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[\u0160iandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Pra\u0117jus\u012f] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prie\u0161 %s",s:function(e,a,t,s){return a?"kelios sekund\u0117s":s?"keli\u0173 sekund\u017ei\u0173":"kelias sekundes"},ss:Cn,m:Nn,mm:Cn,h:Nn,hh:Cn,d:Nn,dd:Cn,M:Nn,MM:Cn,y:Nn,yy:Cn},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}});var In={ss:"sekundes_sekund\u0113m_sekunde_sekundes".split("_"),m:"min\u016btes_min\u016bt\u0113m_min\u016bte_min\u016btes".split("_"),mm:"min\u016btes_min\u016bt\u0113m_min\u016bte_min\u016btes".split("_"),h:"stundas_stund\u0101m_stunda_stundas".split("_"),hh:"stundas_stund\u0101m_stunda_stundas".split("_"),d:"dienas_dien\u0101m_diena_dienas".split("_"),dd:"dienas_dien\u0101m_diena_dienas".split("_"),M:"m\u0113ne\u0161a_m\u0113ne\u0161iem_m\u0113nesis_m\u0113ne\u0161i".split("_"),MM:"m\u0113ne\u0161a_m\u0113ne\u0161iem_m\u0113nesis_m\u0113ne\u0161i".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function Un(e,a,t){return t?a%10==1&&a%100!=11?e[2]:e[3]:a%10==1&&a%100!=11?e[0]:e[1]}function Gn(e,a,t){return e+" "+Un(In[t],e,a)}function Vn(e,a,t){return Un(In[t],e,a)}M.defineLocale("lv",{months:"janv\u0101ris_febru\u0101ris_marts_apr\u012blis_maijs_j\u016bnijs_j\u016blijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_j\u016bn_j\u016bl_aug_sep_okt_nov_dec".split("_"),weekdays:"sv\u0113tdiena_pirmdiena_otrdiena_tre\u0161diena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[\u0160odien pulksten] LT",nextDay:"[R\u012bt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pag\u0101ju\u0161\u0101] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"p\u0113c %s",past:"pirms %s",s:function(e,a){return a?"da\u017eas sekundes":"da\u017e\u0101m sekund\u0113m"},ss:Gn,m:Vn,mm:Gn,h:Vn,hh:Gn,d:Vn,dd:Gn,M:Vn,MM:Gn,y:Vn,yy:Gn},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var Bn={words:{ss:["sekund","sekunda","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,a){return 1===e?a[0]:2<=e&&e<=4?a[1]:a[2]},translate:function(e,a,t){var s=Bn.words[t];return 1===t.length?a?s[0]:s[1]:e+" "+Bn.correctGrammaticalCase(e,s)}};function Kn(e,a,t,s){switch(t){case"s":return a?"\u0445\u044d\u0434\u0445\u044d\u043d \u0441\u0435\u043a\u0443\u043d\u0434":"\u0445\u044d\u0434\u0445\u044d\u043d \u0441\u0435\u043a\u0443\u043d\u0434\u044b\u043d";case"ss":return e+(a?" \u0441\u0435\u043a\u0443\u043d\u0434":" \u0441\u0435\u043a\u0443\u043d\u0434\u044b\u043d");case"m":case"mm":return e+(a?" \u043c\u0438\u043d\u0443\u0442":" \u043c\u0438\u043d\u0443\u0442\u044b\u043d");case"h":case"hh":return e+(a?" \u0446\u0430\u0433":" \u0446\u0430\u0433\u0438\u0439\u043d");case"d":case"dd":return e+(a?" \u04e9\u0434\u04e9\u0440":" \u04e9\u0434\u0440\u0438\u0439\u043d");case"M":case"MM":return e+(a?" \u0441\u0430\u0440":" \u0441\u0430\u0440\u044b\u043d");case"y":case"yy":return e+(a?" \u0436\u0438\u043b":" \u0436\u0438\u043b\u0438\u0439\u043d");default:return e}}M.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_\u010detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._\u010det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010de_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[ju\u010de u] LT",lastWeek:function(){return["[pro\u0161le] [nedjelje] [u] LT","[pro\u0161log] [ponedjeljka] [u] LT","[pro\u0161log] [utorka] [u] LT","[pro\u0161le] [srijede] [u] LT","[pro\u0161log] [\u010detvrtka] [u] LT","[pro\u0161log] [petka] [u] LT","[pro\u0161le] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:Bn.translate,m:Bn.translate,mm:Bn.translate,h:Bn.translate,hh:Bn.translate,d:"dan",dd:Bn.translate,M:"mjesec",MM:Bn.translate,y:"godinu",yy:Bn.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),M.defineLocale("mi",{months:"Kohi-t\u0101te_Hui-tanguru_Pout\u016b-te-rangi_Paenga-wh\u0101wh\u0101_Haratua_Pipiri_H\u014dngoingoi_Here-turi-k\u014dk\u0101_Mahuru_Whiringa-\u0101-nuku_Whiringa-\u0101-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_H\u014dngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"R\u0101tapu_Mane_T\u016brei_Wenerei_T\u0101ite_Paraire_H\u0101tarei".split("_"),weekdaysShort:"Ta_Ma_T\u016b_We_T\u0101i_Pa_H\u0101".split("_"),weekdaysMin:"Ta_Ma_T\u016b_We_T\u0101i_Pa_H\u0101".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te h\u0113kona ruarua",ss:"%d h\u0113kona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%
12839d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}}),M.defineLocale("mk",{months:"\u0458\u0430\u043d\u0443\u0430\u0440\u0438_\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0438\u043b_\u043c\u0430\u0458_\u0458\u0443\u043d\u0438_\u0458\u0443\u043b\u0438_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438_\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438_\u043d\u043e\u0435\u043c\u0432\u0440\u0438_\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438".split("_"),monthsShort:"\u0458\u0430\u043d_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0458_\u0458\u0443\u043d_\u0458\u0443\u043b_\u0430\u0432\u0433_\u0441\u0435\u043f_\u043e\u043a\u0442_\u043d\u043e\u0435_\u0434\u0435\u043a".split("_"),weekdays:"\u043d\u0435\u0434\u0435\u043b\u0430_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0440\u0442\u043e\u043a_\u043f\u0435\u0442\u043e\u043a_\u0441\u0430\u0431\u043e\u0442\u0430".split("_"),weekdaysShort:"\u043d\u0435\u0434_\u043f\u043e\u043d_\u0432\u0442\u043e_\u0441\u0440\u0435_\u0447\u0435\u0442_\u043f\u0435\u0442_\u0441\u0430\u0431".split("_"),weekdaysMin:"\u043de_\u043fo_\u0432\u0442_\u0441\u0440_\u0447\u0435_\u043f\u0435_\u0441a".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[\u0414\u0435\u043d\u0435\u0441 \u0432\u043e] LT",nextDay:"[\u0423\u0442\u0440\u0435 \u0432\u043e] LT",nextWeek:"[\u0412\u043e] dddd [\u0432\u043e] LT",lastDay:"[\u0412\u0447\u0435\u0440\u0430 \u0432\u043e] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[\u0418\u0437\u043c\u0438\u043d\u0430\u0442\u0430\u0442\u0430] dddd [\u0432\u043e] LT";case 1:case 2:case 4:case 5:return"[\u0418\u0437\u043c\u0438\u043d\u0430\u0442\u0438\u043e\u0442] dddd [\u0432\u043e] LT"}},sameElse:"L"},relativeTime:{future:"\u0437\u0430 %s",past:"\u043f\u0440\u0435\u0434 %s",s:"\u043d\u0435\u043a\u043e\u043b\u043a\u0443 \u0441\u0435\u043a\u0443\u043d\u0434\u0438",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434\u0438",m:"\u0435\u0434\u043d\u0430 \u043c\u0438\u043d\u0443\u0442\u0430",mm:"%d \u043c\u0438\u043d\u0443\u0442\u0438",h:"\u0435\u0434\u0435\u043d \u0447\u0430\u0441",hh:"%d \u0447\u0430\u0441\u0430",d:"\u0435\u0434\u0435\u043d \u0434\u0435\u043d",dd:"%d \u0434\u0435\u043d\u0430",M:"\u0435\u0434\u0435\u043d \u043c\u0435\u0441\u0435\u0446",MM:"%d \u043c\u0435\u0441\u0435\u0446\u0438",y:"\u0435\u0434\u043d\u0430 \u0433\u043e\u0434\u0438\u043d\u0430",yy:"%d \u0433\u043e\u0434\u0438\u043d\u0438"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0435\u0432|\u0435\u043d|\u0442\u0438|\u0432\u0438|\u0440\u0438|\u043c\u0438)/,ordinal:function(e){var a=e%10,t=e%100;return 0===e?e+"-\u0435\u0432":0==t?e+"-\u0435\u043d":10<t&&t<20?e+"-\u0442\u0438":1==a?e+"-\u0432\u0438":2==a?e+"-\u0440\u0438":7==a||8==a?e+"-\u043c\u0438":e+"-\u0442\u0438"},week:{dow:1,doy:7}}),M.defineLocale("ml",{months:"\u0d1c\u0d28\u0d41\u0d35\u0d30\u0d3f_\u0d2b\u0d46\u0d2c\u0d4d\u0d30\u0d41\u0d35\u0d30\u0d3f_\u0d2e\u0d3e\u0d7c\u0d1a\u0d4d\u0d1a\u0d4d_\u0d0f\u0d2a\u0d4d\u0d30\u0d3f\u0d7d_\u0d2e\u0d47\u0d2f\u0d4d_\u0d1c\u0d42\u0d7a_\u0d1c\u0d42\u0d32\u0d48_\u0d13\u0d17\u0d38\u0d4d\u0d31\u0d4d\u0d31\u0d4d_\u0d38\u0d46\u0d2a\u0d4d\u0d31\u0d4d\u0d31\u0d02\u0d2c\u0d7c_\u0d12\u0d15\u0d4d\u0d1f\u0d4b\u0d2c\u0d7c_\u0d28\u0d35\u0d02\u0d2c\u0d7c_\u0d21\u0d3f\u0d38\u0d02\u0d2c\u0d7c".split("_"),monthsShort:"\u0d1c\u0d28\u0d41._\u0d2b\u0d46\u0d2c\u0d4d\u0d30\u0d41._\u0d2e\u0d3e\u0d7c._\u0d0f\u0d2a\u0d4d\u0d30\u0d3f._\u0d2e\u0d47\u0d2f\u0d4d_\u0d1c\u0d42\u0d7a_\u0d1c\u0d42\u0d32\u0d48._\u0d13\u0d17._\u0d38\u0d46\u0d2a\u0d4d\u0d31\u0d4d\u0d31._\u0d12\u0d15\u0d4d\u0d1f\u0d4b._\u0d28\u0d35\u0d02._\u0d21\u0d3f\u0d38\u0d02.".split("_"),monthsParseExact:!0,weekdays:"\u0d1e\u0d3e\u0d2f\u0d31\u0d3e\u0d34\u0d4d\u0d1a_\u0d24\u0d3f\u0d19\u0d4d\u0d15\u0d33\u0d3e\u0d34\u0d4d\u0d1a_\u0d1a\u0d4a\u0d35\u0d4d\u0d35\u0d3e\u0d34\u0d4d\u0d1a_\u0d2c\u0d41\u0d27\u0d28\u0d3e\u0d34\u0d4d\u0d1a_\u0d35\u0d4d\u0d2f\u0d3e\u0d34\u0d3e\u0d34\u0d4d\u0d1a_\u0d35\u0d46\u0d33\u0d4d\u0d33\u0d3f\u0d2f\u0d3e\u0d34\u0d4d\u0d1a_\u0d36\u0d28\u0d3f\u0d2f\u0d3e\u0d34\u0d4d\u0d1a".split("_"),weekdaysShort:"\u0d1e\u0d3e\u0d2f\u0d7c_\u0d24\u0d3f\u0d19\u0d4d\u0d15\u0d7e_\u0d1a\u0d4a\u0d35\u0d4d\u0d35_\u0d2c\u0d41\u0d27\u0d7b_\u0d35\u0d4d\u0d2f\u0d3e\u0d34\u0d02_\u0d35\u0d46\u0d33\u0d4d\u0d33\u0d3f_\u0d36\u0d28\u0d3f".split("_"),weekdaysMin:"\u0d1e\u0d3e_\u0d24\u0d3f_\u0d1a\u0d4a_\u0d2c\u0d41_\u0d35\u0d4d\u0d2f\u0d3e_\u0d35\u0d46_\u0d36".split("_"),longDateFormat:{LT:"A h:mm -\u0d28\u0d41",LTS:"A h:mm:ss -\u0d28\u0d41",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -\u0d28\u0d41",LLLL:"dddd, D MMMM YYYY, A h:mm -\u0d28\u0d41"},calendar:{sameDay:"[\u0d07\u0d28\u0d4d\u0d28\u0d4d] LT",nextDay:"[\u0d28\u0d3e\u0d33\u0d46] LT",nextWeek:"dddd, LT",lastDay:"[\u0d07\u0d28\u0d4d\u0d28\u0d32\u0d46] LT",lastWeek:"[\u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d4d",past:"%s \u0d2e\u0d41\u0d7b\u0d2a\u0d4d",s:"\u0d05\u0d7d\u0d2a \u0d28\u0d3f\u0d2e\u0d3f\u0d37\u0d19\u0d4d\u0d19\u0d7e",ss:"%d \u0d38\u0d46\u0d15\u0d4d\u0d15\u0d7b\u0d21\u0d4d",m:"\u0d12\u0d30\u0d41 \u0d2e\u0d3f\u0d28\u0d3f\u0d31\u0d4d\u0d31\u0d4d",mm:"%d \u0d2e\u0d3f\u0d28\u0d3f\u0d31\u0d4d\u0d31\u0d4d",h:"\u0d12\u0d30\u0d41 \u0d2e\u0d23\u0d3f\u0d15\u0d4d\u0d15\u0d42\u0d7c",hh:"%
12839d \u0d2e\u0d23\u0d3f\u0d15\u0d4d\u0d15\u0d42\u0d7c",d:"\u0d12\u0d30\u0d41 \u0d26\u0d3f\u0d35\u0d38\u0d02",dd:"%d \u0d26\u0d3f\u0d35\u0d38\u0d02",M:"\u0d12\u0d30\u0d41 \u0d2e\u0d3e\u0d38\u0d02",MM:"%d \u0d2e\u0d3e\u0d38\u0d02",y:"\u0d12\u0d30\u0d41 \u0d35\u0d7c\u0d37\u0d02",yy:"%d \u0d35\u0d7c\u0d37\u0d02"},meridiemParse:/\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f|\u0d30\u0d3e\u0d35\u0d3f\u0d32\u0d46|\u0d09\u0d1a\u0d4d\u0d1a \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d4d|\u0d35\u0d48\u0d15\u0d41\u0d28\u0d4d\u0d28\u0d47\u0d30\u0d02|\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f/i,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f"===a&&4<=e||"\u0d09\u0d1a\u0d4d\u0d1a \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d4d"===a||"\u0d35\u0d48\u0d15\u0d41\u0d28\u0d4d\u0d28\u0d47\u0d30\u0d02"===a?e+12:e},meridiem:function(e,a,t){return e<4?"\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f":e<12?"\u0d30\u0d3e\u0d35\u0d3f\u0d32\u0d46":e<17?"\u0d09\u0d1a\u0d4d\u0d1a \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d4d":e<20?"\u0d35\u0d48\u0d15\u0d41\u0d28\u0d4d\u0d28\u0d47\u0d30\u0d02":"\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f"}}),M.defineLocale("mn",{months:"\u041d\u044d\u0433\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440_\u0425\u043e\u0451\u0440\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0413\u0443\u0440\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0414\u04e9\u0440\u04e9\u0432\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440_\u0422\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0417\u0443\u0440\u0433\u0430\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0414\u043e\u043b\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u041d\u0430\u0439\u043c\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0415\u0441\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440_\u0410\u0440\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0410\u0440\u0432\u0430\u043d \u043d\u044d\u0433\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440_\u0410\u0440\u0432\u0430\u043d \u0445\u043e\u0451\u0440\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440".split("_"),monthsShort:"1 \u0441\u0430\u0440_2 \u0441\u0430\u0440_3 \u0441\u0430\u0440_4 \u0441\u0430\u0440_5 \u0441\u0430\u0440_6 \u0441\u0430\u0440_7 \u0441\u0430\u0440_8 \u0441\u0430\u0440_9 \u0441\u0430\u0440_10 \u0441\u0430\u0440_11 \u0441\u0430\u0440_12 \u0441\u0430\u0440".split("_"),monthsParseExact:!0,weekdays:"\u041d\u044f\u043c_\u0414\u0430\u0432\u0430\u0430_\u041c\u044f\u0433\u043c\u0430\u0440_\u041b\u0445\u0430\u0433\u0432\u0430_\u041f\u04af\u0440\u044d\u0432_\u0411\u0430\u0430\u0441\u0430\u043d_\u0411\u044f\u043c\u0431\u0430".split("_"),weekdaysShort:"\u041d\u044f\u043c_\u0414\u0430\u0432_\u041c\u044f\u0433_\u041b\u0445\u0430_\u041f\u04af\u0440_\u0411\u0430\u0430_\u0411\u044f\u043c".split("_"),weekdaysMin:"\u041d\u044f_\u0414\u0430_\u041c\u044f_\u041b\u0445_\u041f\u04af_\u0411\u0430_\u0411\u044f".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY \u043e\u043d\u044b MMMM\u044b\u043d D",LLL:"YYYY \u043e\u043d\u044b MMMM\u044b\u043d D HH:mm",LLLL:"dddd, YYYY \u043e\u043d\u044b MMMM\u044b\u043d D HH:mm"},meridiemParse:/\u04ae\u04e8|\u04ae\u0425/i,isPM:function(e){return"\u04ae\u0425"===e},meridiem:function(e,a,t){return e<12?"\u04ae\u04e8":"\u04ae\u0425"},calendar:{sameDay:"[\u04e8\u043d\u04e9\u04e9\u0434\u04e9\u0440] LT",nextDay:"[\u041c\u0430\u0440\u0433\u0430\u0430\u0448] LT",nextWeek:"[\u0418\u0440\u044d\u0445] dddd LT",lastDay:"[\u04e8\u0447\u0438\u0433\u0434\u04e9\u0440] LT",lastWeek:"[\u04e8\u043d\u0433\u04e9\u0440\u0441\u04e9\u043d] dddd LT",sameElse:"L"},relativeTime:{future:"%s \u0434\u0430\u0440\u0430\u0430",past:"%s \u04e9\u043c\u043d\u04e9",s:Kn,ss:Kn,m:Kn,mm:Kn,h:Kn,hh:Kn,d:Kn,dd:Kn,M:Kn,MM:Kn,y:Kn,yy:Kn},dayOfMonthOrdinalParse:/\d{1,2} \u04e9\u0434\u04e9\u0440/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+" \u04e9\u0434\u04e9\u0440";default:return e}}});var qn={1:"\u0967",2:"\u0968",3:"\u0969",4:"\u096a",5:"\u096b",6:"\u096c",7:"\u096d",8:"\u096e",9:"\u096f",0:"\u0966"},Zn={"\u0967":"1","\u0968":"2","\u0969":"3","\u096a":"4","\u096b":"5","\u096c":"6","\u096d":"7","\u096e":"8","\u096f":"9","\u0966":"0"};function $n(e,a,t,s){var n="";if(a)switch(t){case"s":n="\u0915\u093e\u0939\u0940 \u0938\u0947\u0915\u0902\u0926";break;case"ss":n="%d \u0938\u0947\u0915\u0902\u0926";break;case"m":n="\u090f\u0915 \u092e\u093f\u0928\u093f\u091f";break;case"mm":n="%d \u092e\u093f\u0928\u093f\u091f\u0947";break;case"h":n="\u090f\u0915 \u0924\u093e\u0938";break;case"hh":n="%d \u0924\u093e\u0938";break;case"d":n="\u090f\u0915 \u0926\u093f\u0935\u0938";break;case"dd":n="%d \u0926\u093f\u0935\u0938";break;case"M":n="\u090f\u0915 \u092e\u0939\u093f\u0928\u093e";break;case"MM":n="%d \u092e\u0939\u093f\u0928\u0947";break;case"y":n="\u090f\u0915 \u0935\u0930\u094d\u0937";break;case"yy":n="%d \u0935\u0930\u094d\u0937\u0947";break}else switch(t){case"s":n="\u0915\u093e\u0939\u0940 \u0938\u0947\u0915\u0902\u0926\u093e\u0902";break;case"ss":n="%d \u0938\u0947\u0915\u0902\u0926\u093e\u0902";break;case"m":n="\u090f\u0915\u093e \u092e\u093f\u0928\u093f\u091f\u093e";break;case"mm":n="%d \u092e\u093f\u0928\u093f\u091f\u093e\u0902";break;case"h":n="\u090f\u0915\u093e \u0924\u093e\u0938\u093e";break;case"hh":n="%d \u0924\u093e\u0938\u093e\u0902";break;case"d":n="\u090f\u0915\u093e \u0926\u093f\u0935\u0938\u093e";break;case"dd":n="%d \u0926\u093f\u0935\u0938\u093e\u0902";break;case"M":n="\u090f\u0915\u093e \u092e\u0939\u093f\u0928\u094d\u092f\u093e";break;case"MM":n="%d \u092e\u0939\u093f\u0928\u094d\u092f\u093e\u0902";break;case"y":n="\u090f\u0915\u093e \u0935\u0930\u094d\u0937\u093e";break;case"yy":n="%d \u0935\u0930\u094d\u0937\u093e\u0902";break}return n.replace(/%d/i,e)}M.defineLocale("mr",{months:"\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940_\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u090f\u092a\u094d\u0930\u093f\u0932_\u092e\u0947_\u091c\u0942\u0928_\u091c\u0941\u0932\u0948_\u0911\u0917\u0938\u094d\u091f_\u0938\u092a\u094d\u091f\u0947\u0902\u092c\u0930_\u0911\u0915\u094d\u091f\u094b\u092c\u0930_\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930_\u0921\u093f\u0938\u0947\u0902\u092c\u0930".split("_"),monthsShort:"\u091c\u093e\u0928\u0947._\u092b\u0947\u092c\u094d\u0930\u0941._\u092e\u093e\u0930\u094d\u091a._\u090f\u092a\u094d\u0930\u093f._\u092e\u0947._\u091c\u0942\u0928._\u091c\u0941\u0932\u0948._\u0911\u0917._\u0938\u092a\u094d\u091f\u0947\u0902._\u0911\u0915\u094d\u091f\u094b._\u0928\u094b\u0935\u094d\u0939\u0947\u0902._\u0921\u093f\u0938\u0947\u0902.".split("_"),monthsParseExact:!0,weekdays:"\u0930\u0935\u093f\u0935\u093e\u0930_\u0938\u094b\u092e\u0935\u093e\u0930_\u092e\u0902\u0917\u0933\u0935\u093e\u0930_\u092c\u0941\u0927\u0935\u093e\u0930_\u0917\u0941\u0930\u0942\u0935\u093e\u0930_\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930_\u0936\u0928\u093f\u0935\u093e\u0930".split("_"),weekdaysShort:"\u0930\u0935\u093f_\u0938\u094b\u092e_\u092e\u0902\u0917\u0933_\u092c\u0941\u0927_\u0917\u0941\u0930\u0942_\u0936\u0941\u0915\u094d\u0930_\u0936\u0928\u093f".split("_"),weekdaysMin:"\u0930_\u0938\u094b_\u092e\u0902_\u092c\u0941_\u0917\u0941_\u0936\u0941_\u0936".split("_"),longDateFormat:{LT:"A h:mm \u0935\u093e\u091c\u0924\u093e",LTS:"A h:mm:ss \u0935\u093e\u091c\u0924\u093e",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u0935\u093e\u091c\u0924\u093e",LLLL:"dddd, D MMMM YYYY, A h:mm \u0935\u093e\u091c\u0924\u093e"},calendar:{sameDay:"[\u0906\u091c] LT",nextDay:"[\u0909\u0926\u094d\u092f\u093e] LT",nextWeek:"dddd, LT",lastDay:"[\u0915\u093e\u0932] LT",lastWeek:"[\u092e\u093e\u0917\u0940\u0932] dddd, LT",sameElse:"L"},relativeTime:{future:"%s\u092e\u0927\u094d\u092f\u0947",past:"%s\u092a\u0942\u0930\u094d\u0935\u0940",s:$n,ss:$n,m:$n,mm:$n,h:$n,hh:$n,d:$n,dd:$n,M:$n,MM:$n,y:$n,yy:$n},preparse:function(e){return e.replace(/[\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f\u0966]/g,function(e){return Zn[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return qn[e]})},meridiemParse:/\u092a\u0939\u093e\u091f\u0947|\u0938\u0915\u093e\u0933\u0940|\u0926\u0941\u092a\u093e\u0930\u0940|\u0938\u093e\u092f\u0902\u0915\u093e\u0933\u0940|\u0930\u093e\u0924\u094d\u0930\u0940/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u092a\u0939\u093e\u091f\u0947"===a||"\u0938\u0915\u093e\u0933\u0940"===a?e:"\u0926\u0941\u092a\u093e\u0930\u0940"===a||"\u0938\u093e\u092f\u0902\u0915\u093e\u0933\u0940"===a||"\u0930\u093e\u0924\u094d\u0930\u0940"===a?12<=e?e:e+12:void 0},meridiem:function(e,a,t){return 0<=e&&e<6?"\u092a\u0939\u093e\u091f\u0947":e<12?"\u0938\u0915\u093e\u0933\u0940":e<17?"\u0926\u0941\u092a\u093e\u0930\u0940":e<20?"\u0938\u093e\u092f\u0902\u0915\u093e\u0933\u0940":"\u0930\u093e\u0924\u094d\u0930\u0940"},week:{dow:0,doy:6}}),M.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,a){return 12===e&&(e=0),"pagi"===a?e:"tengahari"===a?11<=e?e:e+12:"petang"===a||"malam"===a?e+12:void 0},meridiem:function(e,a,t){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}}),M.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,a){return 12===e&&(e=0),"pagi"===a?e:"tengahari"===a?11<=e?e:e+12:"petang"===a||"malam"===a?e+12:void 0},meridiem:function(e,a,t){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}}),M.defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_\u0120unju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Di\u010bembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_\u0120un_Lul_Aww_Set_Ott_Nov_Di\u010b".split("_"),weekdays:"Il-\u0126add_It-Tnejn_It-Tlieta_L-Erbg\u0127a_Il-\u0126amis_Il-\u0120img\u0127a_Is-Sibt".split("_"),weekdaysShort:"\u0126ad_Tne_Tli_Erb_\u0126am_\u0120im_Sib".split("_"),weekdaysMin:"\u0126a_Tn_Tl_Er_\u0126a_\u0120i_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Illum fil-]LT",nextDay:"[G\u0127ada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-biera\u0127 fil-]LT",lastWeek:"dddd [li g\u0127adda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f\u2019 %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"sieg\u0127a",hh:"%d sieg\u0127at",d:"\u0121urnata",dd:"%d \u0121ranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}});var Qn={1:"\u1041",2:"\u1042",3:"\u1043",4:"\u1044",5:"\u1045",6:"\u1046",7:"\u1047",8:"\u1048",9:"\u1049",0:"\u1040"},Xn={"\u1041":"1","\u1042":"2","\u1043":"3","\u1044":"4","\u1045":"5","\u1046":"6","\u1047":"7","\u1048":"8","\u1049":"9","\u1040":"0"};M.defineLocale("my",{months:"\u1007\u1014\u103a\u1014\u101d\u102b\u101b\u102e_\u1016\u1031\u1016\u1031\u102c\u103a\u101d\u102b\u101b\u102e_\u1019\u1010\u103a_\u1027\u1015\u103c\u102e_\u1019\u1031_\u1007\u103d\u1014\u103a_\u1007\u1030\u101c\u102d\u102f\u1004\u103a_\u101e\u103c\u1002\u102f\u1010\u103a_\u1005\u1000\u103a\u1010\u1004\u103a\u1018\u102c_\u1021\u1031\u102c\u1000\u103a\u1010\u102d\u102f\u1018\u102c_\u1014\u102d\u102f\u101d\u1004\u103a\u1018\u102c_\u1012\u102e\u1007\u1004\u103a\u1018\u102c".split("_"),monthsShort:"\u1007\u1014\u103a_\u1016\u1031_\u1019\u1010\u103a_\u1015\u103c\u102e_\u1019\u1031_\u1007\u103d\u1014\u103a_\u101c\u102d\u102f\u1004\u103a_\u101e\u103c_\u1005\u1000\u103a_\u1021\u1031\u102c\u1000\u103a_\u1014\u102d\u102f_\u1012\u102e".split("_"),weekdays:"\u
128391010\u1014\u1004\u103a\u1039\u1002\u1014\u103d\u1031_\u1010\u1014\u1004\u103a\u1039\u101c\u102c_\u1021\u1004\u103a\u1039\u1002\u102b_\u1017\u102f\u1012\u1039\u1013\u101f\u1030\u1038_\u1000\u103c\u102c\u101e\u1015\u1010\u1031\u1038_\u101e\u1031\u102c\u1000\u103c\u102c_\u1005\u1014\u1031".split("_"),weekdaysShort:"\u1014\u103d\u1031_\u101c\u102c_\u1002\u102b_\u101f\u1030\u1038_\u1000\u103c\u102c_\u101e\u1031\u102c_\u1014\u1031".split("_"),weekdaysMin:"\u1014\u103d\u1031_\u101c\u102c_\u1002\u102b_\u101f\u1030\u1038_\u1000\u103c\u102c_\u101e\u1031\u102c_\u1014\u1031".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u101a\u1014\u1031.] LT [\u1019\u103e\u102c]",nextDay:"[\u1019\u1014\u1000\u103a\u1016\u103c\u1014\u103a] LT [\u1019\u103e\u102c]",nextWeek:"dddd LT [\u1019\u103e\u102c]",lastDay:"[\u1019\u1014\u1031.\u1000] LT [\u1019\u103e\u102c]",lastWeek:"[\u1015\u103c\u102e\u1038\u1001\u1032\u1037\u101e\u1031\u102c] dddd LT [\u1019\u103e\u102c]",sameElse:"L"},relativeTime:{future:"\u101c\u102c\u1019\u100a\u103a\u1037 %s \u1019\u103e\u102c",past:"\u101c\u103d\u1014\u103a\u1001\u1032\u1037\u101e\u1031\u102c %s \u1000",s:"\u1005\u1000\u1039\u1000\u1014\u103a.\u1021\u1014\u100a\u103a\u1038\u1004\u101a\u103a",ss:"%d \u1005\u1000\u1039\u1000\u1014\u1037\u103a",m:"\u1010\u1005\u103a\u1019\u102d\u1014\u1005\u103a",mm:"%d \u1019\u102d\u1014\u1005\u103a",h:"\u1010\u1005\u103a\u1014\u102c\u101b\u102e",hh:"%d \u1014\u102c\u101b\u102e",d:"\u1010\u1005\u103a\u101b\u1000\u103a",dd:"%d \u101b\u1000\u103a",M:"\u1010\u1005\u103a\u101c",MM:"%d \u101c",y:"\u1010\u1005\u103a\u1014\u103e\u1005\u103a",yy:"%d \u1014\u103e\u1005\u103a"},preparse:function(e){return e.replace(/[\u1041\u1042\u1043\u1044\u1045\u1046\u1047\u1048\u1049\u1040]/g,function(e){return Xn[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return Qn[e]})},week:{dow:1,doy:4}}),M.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"s\xf8ndag_mandag_tirsdag_onsdag_torsdag_fredag_l\xf8rdag".split("_"),weekdaysShort:"s\xf8._ma._ti._on._to._fr._l\xf8.".split("_"),weekdaysMin:"s\xf8_ma_ti_on_to_fr_l\xf8".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i g\xe5r kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",w:"en uke",ww:"%d uker",M:"en m\xe5ned",MM:"%d m\xe5neder",y:"ett \xe5r",yy:"%d \xe5r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var er={1:"\u0967",2:"\u0968",3:"\u0969",4:"\u096a",5:"\u096b",6:"\u096c",7:"\u096d",8:"\u096e",9:"\u096f",0:"\u0966"},ar={"\u0967":"1","\u0968":"2","\u0969":"3","\u096a":"4","\u096b":"5","\u096c":"6","\u096d":"7","\u096e":"8","\u096f":"9","\u0966":"0"};M.defineLocale("ne",{months:"\u091c\u0928\u0935\u0930\u0940_\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u093f\u0932_\u092e\u0908_\u091c\u0941\u0928_\u091c\u0941\u0932\u093e\u0908_\u0905\u0917\u0937\u094d\u091f_\u0938\u0947\u092a\u094d\u091f\u0947\u092e\u094d\u092c\u0930_\u0905\u0915\u094d\u091f\u094b\u092c\u0930_\u0928\u094b\u092d\u0947\u092e\u094d\u092c\u0930_\u0921\u093f\u0938\u0947\u092e\u094d\u092c\u0930".split("_"),monthsShort:"\u091c\u0928._\u092b\u0947\u092c\u094d\u0930\u0941._\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u093f._\u092e\u0908_\u091c\u0941\u0928_\u091c\u0941\u0932\u093e\u0908._\u0905\u0917._\u0938\u0947\u092a\u094d\u091f._\u0905\u0915\u094d\u091f\u094b._\u0928\u094b\u092d\u0947._\u0921\u093f\u0938\u0947.".split("_"),monthsParseExact:!0,weekdays:"\u0906\u0907\u0924\u092c\u093e\u0930_\u0938\u094b\u092e\u092c\u093e\u0930_\u092e\u0919\u094d\u0917\u0932\u092c\u093e\u0930_\u092c\u0941\u0927\u092c\u093e\u0930_\u092c\u093f\u0939\u093f\u092c\u093e\u0930_\u0936\u0941\u0915\u094d\u0930\u092c\u093e\u0930_\u0936\u0928\u093f\u092c\u093e\u0930".split("_"),weekdaysShort:"\u0906\u0907\u0924._\u0938\u094b\u092e._\u092e\u0919\u094d\u0917\u0932._\u092c\u0941\u0927._\u092c\u093f\u0939\u093f._\u0936\u0941\u0915\u094d\u0930._\u0936\u0928\u093f.".split("_"),weekdaysMin:"\u0906._\u0938\u094b._\u092e\u0902._\u092c\u0941._\u092c\u093f._\u0936\u0941._\u0936.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A\u0915\u094b h:mm \u092c\u091c\u0947",LTS:"A\u0915\u094b h:mm:ss \u092c\u091c\u0947",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A\u0915\u094b h:mm \u092c\u091c\u0947",LLLL:"dddd, D MMMM YYYY, A\u0915\u094b h:mm \u092c\u091c\u0947"},preparse:function(e){return e.replace(/[\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f\u0966]/g,function(e){return ar[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return er[e]})},meridiemParse:/\u0930\u093e\u0924\u093f|\u092c\u093f\u0939\u093e\u0928|\u0926\u093f\u0909\u0901\u0938\u094b|\u0938\u093e\u0901\u091d/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0930\u093e\u0924\u093f"===a?e<4?e:e+12:"\u092c\u093f\u0939\u093e\u0928"===a?e:"\u0926\u093f\u0909\u0901\u0938\u094b"===a?10<=e?e:e+12:"\u0938\u093e\u0901\u091d"===a?e+12:void 0},meridiem:function(e,a,t){return e<3?"\u0930\u093e\u0924\u093f":e<12?"\u092c\u093f\u0939\u093e\u0928":e<16?"\u0926\u093f\u0909\u0901\u0938\u094b":e<20?"\u0938\u093e\u0901\u091d":"\u0930\u093e\u0924\u093f"},calendar:{sameDay:"[\u0906\u091c] LT",nextDay:"[\u092d\u094b\u0932\u093f] LT",nextWeek:"[\u0906\u0909\u0901\u0926\u094b] dddd[,] LT",lastDay:"[\u0939\u093f\u091c\u094b] LT",lastWeek:"[\u0917\u090f\u0915\u094b] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s\u092e\u093e",past:"%s \u0905\u0917\u093e\u0921\u093f",s:"\u0915\u0947\u0939\u0940 \u0915\u094d\u0937\u0923",ss:"%d \u0938\u0947\u0915\u0947\u0923\u094d\u0921",m:"\u090f\u0915 \u092e\u093f\u0928\u0947\u091f",mm:"%d \u092e\u093f\u0928\u0947\u091f",h:"\u090f\u0915 \u0918\u0923\u094d\u091f\u093e",hh:"%d \u0918\u0923\u094d\u091f\u093e",d:"\u090f\u0915 \u0926\u093f\u0928",dd:"%d \u0926\u093f\u0928",M:"\u090f\u0915 \u092e\u0939\u093f\u0928\u093e",MM:"%d \u092e\u0939\u093f\u0928\u093e",y:"\u090f\u0915 \u092c\u0930\u094d\u0937",yy:"%d \u092c\u0930\u094d\u0937"},week:{dow:0,doy:6}});var tr="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),sr="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),nr=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],rr=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;M.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,a){return e?/-MMM-/.test(a)?sr[e.month()]:tr[e.month()]:tr},monthsRegex:rr,monthsShortRegex:rr,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:nr,longMonthsParse:nr,shortMonthsParse:nr,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"\xe9\xe9n minuut",mm:"%d minuten",h:"\xe9\xe9n uur",hh:"%d uur",d:"\xe9\xe9n dag",dd:"%d dagen",M:"\xe9\xe9n maand",MM:"%d maanden",y:"\xe9\xe9n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||20<=e?"ste":"de")},week:{dow:1,doy:4}});var dr="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),ir="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),_r=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],or=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;M.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,a){return e?/-MMM-/.test(a)?ir[e.month()]:dr[e.month()]:dr},monthsRegex:or,monthsShortRegex:or,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:_r,longMonthsParse:_r,shortMonthsParse:_r,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"\xe9\xe9n minuut",mm:"%d minuten",h:"\xe9\xe9n uur",hh:"%d uur",d:"\xe9\xe9n dag",dd:"%d dagen",w:"\xe9\xe9n week",ww:"%d weken",M:"\xe9\xe9n maand",MM:"%d maanden",y:"\xe9\xe9n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||20<=e?"ste":"de")},week:{dow:1,doy:4}}),M.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"sundag_m\xe5ndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"su._m\xe5._ty._on._to._fr._lau.".split("_"),weekdaysMin:"su_m\xe5_ty_on_to_fr_la".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I g\xe5r klokka] LT",lastWeek:"[F\xf8reg\xe5ande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",ss:"%d sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",w:"ei veke",ww:"%d veker",M:"ein m\xe5nad",MM:"%d m\xe5nader",y:"eit \xe5r",yy:"%d \xe5r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),M.defineLocale("oc-lnc",{months:{standalone:"geni\xe8r_febri\xe8r_mar\xe7_abril_mai_junh_julhet_agost_setembre_oct\xf2bre_novembre_decembre".split("_"),format:"de geni\xe8r_de febri\xe8r_de mar\xe7_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'oct\xf2bre_de novembre_de decembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._mar\xe7_abr._mai_junh_julh._ago._set._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"dimenge_diluns_dimars_dim\xe8cres_dij\xf2us_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dm._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dm_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:"[u\xe8i a] LT",nextDay:"[deman a] LT",nextWeek:"dddd [a] LT",lastDay:"[i\xe8r a] LT",lastWeek:"dddd [passat a] LT",sameElse:"L"},relativeTime:{future:"d'aqu\xed %s",past:"fa %s",s:"unas segondas",ss:"%d segondas",m:"una minuta",mm:"%d minutas",h:"una ora",hh:"%
12839d oras",d:"un jorn",dd:"%d jorns",M:"un mes",MM:"%d meses",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|\xe8|a)/,ordinal:function(e,a){return e+("w"!==a&&"W"!==a?1===e?"r":2===e?"n":3===e?"r":4===e?"t":"\xe8":"a")},week:{dow:1,doy:4}});var mr={1:"\u0a67",2:"\u0a68",3:"\u0a69",4:"\u0a6a",5:"\u0a6b",6:"\u0a6c",7:"\u0a6d",8:"\u0a6e",9:"\u0a6f",0:"\u0a66"},ur={"\u0a67":"1","\u0a68":"2","\u0a69":"3","\u0a6a":"4","\u0a6b":"5","\u0a6c":"6","\u0a6d":"7","\u0a6e":"8","\u0a6f":"9","\u0a66":"0"};M.defineLocale("pa-in",{months:"\u0a1c\u0a28\u0a35\u0a30\u0a40_\u0a2b\u0a3c\u0a30\u0a35\u0a30\u0a40_\u0a2e\u0a3e\u0a30\u0a1a_\u0a05\u0a2a\u0a4d\u0a30\u0a48\u0a32_\u0a2e\u0a08_\u0a1c\u0a42\u0a28_\u0a1c\u0a41\u0a32\u0a3e\u0a08_\u0a05\u0a17\u0a38\u0a24_\u0a38\u0a24\u0a70\u0a2c\u0a30_\u0a05\u0a15\u0a24\u0a42\u0a2c\u0a30_\u0a28\u0a35\u0a70\u0a2c\u0a30_\u0a26\u0a38\u0a70\u0a2c\u0a30".split("_"),monthsShort:"\u0a1c\u0a28\u0a35\u0a30\u0a40_\u0a2b\u0a3c\u0a30\u0a35\u0a30\u0a40_\u0a2e\u0a3e\u0a30\u0a1a_\u0a05\u0a2a\u0a4d\u0a30\u0a48\u0a32_\u0a2e\u0a08_\u0a1c\u0a42\u0a28_\u0a1c\u0a41\u0a32\u0a3e\u0a08_\u0a05\u0a17\u0a38\u0a24_\u0a38\u0a24\u0a70\u0a2c\u0a30_\u0a05\u0a15\u0a24\u0a42\u0a2c\u0a30_\u0a28\u0a35\u0a70\u0a2c\u0a30_\u0a26\u0a38\u0a70\u0a2c\u0a30".split("_"),weekdays:"\u0a10\u0a24\u0a35\u0a3e\u0a30_\u0a38\u0a4b\u0a2e\u0a35\u0a3e\u0a30_\u0a2e\u0a70\u0a17\u0a32\u0a35\u0a3e\u0a30_\u0a2c\u0a41\u0a27\u0a35\u0a3e\u0a30_\u0a35\u0a40\u0a30\u0a35\u0a3e\u0a30_\u0a38\u0a3c\u0a41\u0a71\u0a15\u0a30\u0a35\u0a3e\u0a30_\u0a38\u0a3c\u0a28\u0a40\u0a1a\u0a30\u0a35\u0a3e\u0a30".split("_"),weekdaysShort:"\u0a10\u0a24_\u0a38\u0a4b\u0a2e_\u0a2e\u0a70\u0a17\u0a32_\u0a2c\u0a41\u0a27_\u0a35\u0a40\u0a30_\u0a38\u0a3c\u0a41\u0a15\u0a30_\u0a38\u0a3c\u0a28\u0a40".split("_"),weekdaysMin:"\u0a10\u0a24_\u0a38\u0a4b\u0a2e_\u0a2e\u0a70\u0a17\u0a32_\u0a2c\u0a41\u0a27_\u0a35\u0a40\u0a30_\u0a38\u0a3c\u0a41\u0a15\u0a30_\u0a38\u0a3c\u0a28\u0a40".split("_"),longDateFormat:{LT:"A h:mm \u0a35\u0a1c\u0a47",LTS:"A h:mm:ss \u0a35\u0a1c\u0a47",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u0a35\u0a1c\u0a47",LLLL:"dddd, D MMMM YYYY, A h:mm \u0a35\u0a1c\u0a47"},calendar:{sameDay:"[\u0a05\u0a1c] LT",nextDay:"[\u0a15\u0a32] LT",nextWeek:"[\u0a05\u0a17\u0a32\u0a3e] dddd, LT",lastDay:"[\u0a15\u0a32] LT",lastWeek:"[\u0a2a\u0a3f\u0a1b\u0a32\u0a47] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0a35\u0a3f\u0a71\u0a1a",past:"%s \u0a2a\u0a3f\u0a1b\u0a32\u0a47",s:"\u0a15\u0a41\u0a1d \u0a38\u0a15\u0a3f\u0a70\u0a1f",ss:"%d \u0a38\u0a15\u0a3f\u0a70\u0a1f",m:"\u0a07\u0a15 \u0a2e\u0a3f\u0a70\u0a1f",mm:"%d \u0a2e\u0a3f\u0a70\u0a1f",h:"\u0a07\u0a71\u0a15 \u0a18\u0a70\u0a1f\u0a3e",hh:"%d \u0a18\u0a70\u0a1f\u0a47",d:"\u0a07\u0a71\u0a15 \u0a26\u0a3f\u0a28",dd:"%d \u0a26\u0a3f\u0a28",M:"\u0a07\u0a71\u0a15 \u0a2e\u0a39\u0a40\u0a28\u0a3e",MM:"%d \u0a2e\u0a39\u0a40\u0a28\u0a47",y:"\u0a07\u0a71\u0a15 \u0a38\u0a3e\u0a32",yy:"%d \u0a38\u0a3e\u0a32"},preparse:function(e){return e.replace(/[\u0a67\u0a68\u0a69\u0a6a\u0a6b\u0a6c\u0a6d\u0a6e\u0a6f\u0a66]/g,function(e){return ur[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return mr[e]})},meridiemParse:/\u0a30\u0a3e\u0a24|\u0a38\u0a35\u0a47\u0a30|\u0a26\u0a41\u0a2a\u0a39\u0a3f\u0a30|\u0a38\u0a3c\u0a3e\u0a2e/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0a30\u0a3e\u0a24"===a?e<4?e:e+12:"\u0a38\u0a35\u0a47\u0a30"===a?e:"\u0a26\u0a41\u0a2a\u0a39\u0a3f\u0a30"===a?10<=e?e:e+12:"\u0a38\u0a3c\u0a3e\u0a2e"===a?e+12:void 0}
vendor: 4,765 bytes, line 12839
12839,meridiem:function(e,a,t){return e<4?"\u0a30\u0a3e\u0a24":e<10?"\u0a38\u0a35\u0a47\u0a30":e<17?"\u0a26\u0a41\u0a2a\u0a39\u0a3f\u0a30":e<20?"\u0a38\u0a3c\u0a3e\u0a2e":"\u0a30\u0a3e\u0a24"},week:{dow:0,doy:6}});var lr="stycze\u0144_luty_marzec_kwiecie\u0144_maj_czerwiec_lipiec_sierpie\u0144_wrzesie\u0144_pa\u017adziernik_listopad_grudzie\u0144".split("_"),Mr="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_wrze\u015bnia_pa\u017adziernika_listopada_grudnia".split("_"),hr=[/^sty/i,/^lut/i,/^mar/i,/^kwi/i,/^maj/i,/^cze/i,/^lip/i,/^sie/i,/^wrz/i,/^pa\u017a/i,/^lis/i,/^gru/i];function cr(e){return e%10<5&&1<e%10&&~~(e/10)%10!=1}function Lr(e,a,t){var s=e+" ";switch(t){case"ss":return s+(cr(e)?"sekundy":"sekund");case"m":return a?"minuta":"minut\u0119";case"mm":return s+(cr(e)?"minuty":"minut");case"h":return a?"godzina":"godzin\u0119";case"hh":return s+(cr(e)?"godziny":"godzin");case"ww":return s+(cr(e)?"tygodnie":"tygodni");case"MM":return s+(cr(e)?"miesi\u0105ce":"miesi\u0119cy");case"yy":return s+(cr(e)?"lata":"lat")}}function Yr(e,a,t){return e+(20<=e%100||100<=e&&e%100==0?" de ":" ")+{ss:"secunde",mm:"minute",hh:"ore",dd:"zile",ww:"s\u0103pt\u0103m\xe2ni",MM:"luni",yy:"ani"}[t]}function yr(e,a,t){var s,n;return"m"===t?a?"\u043c\u0438\u043d\u0443\u0442\u0430":"\u043c\u0438\u043d\u0443\u0442\u0443":e+" "+(s=+e,n={ss:a?"\u0441\u0435\u043a\u0443\u043d\u0434\u0430_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434":"\u0441\u0435\u043a\u0443\u043d\u0434\u0443_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434",mm:a?"\u043c\u0438\u043d\u0443\u0442\u0430_\u043c\u0438\u043d\u0443\u0442\u044b_\u043c\u0438\u043d\u0443\u0442":"\u043c\u0438\u043d\u0443\u0442\u0443_\u043c\u0438\u043d\u0443\u0442\u044b_\u043c\u0438\u043d\u0443\u0442",hh:"\u0447\u0430\u0441_\u0447\u0430\u0441\u0430_\u0447\u0430\u0441\u043e\u0432",dd:"\u0434\u0435\u043d\u044c_\u0434\u043d\u044f_\u0434\u043d\u0435\u0439",ww:"\u043d\u0435\u0434\u0435\u043b\u044f_\u043d\u0435\u0434\u0435\u043b\u0438_\u043d\u0435\u0434\u0435\u043b\u044c",MM:"\u043c\u0435\u0441\u044f\u0446_\u043c\u0435\u0441\u044f\u0446\u0430_\u043c\u0435\u0441\u044f\u0446\u0435\u0432",yy:"\u0433\u043e\u0434_\u0433\u043e\u0434\u0430_\u043b\u0435\u0442"}[t].split("_"),s%10==1&&s%100!=11?n[0]:2<=s%10&&s%10<=4&&(s%100<10||20<=s%100)?n[1]:n[2])}M.defineLocale("pl",{months:function(e,a){return e?/D MMMM/.test(a)?Mr[e.month()]:lr[e.month()]:lr},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_pa\u017a_lis_gru".split("_"),monthsParse:hr,longMonthsParse:hr,shortMonthsParse:hr,weekdays:"niedziela_poniedzia\u0142ek_wtorek_\u015broda_czwartek_pi\u0105tek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_\u015br_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_\u015ar_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dzi\u015b o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedziel\u0119 o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W \u015brod\u0119 o] LT";case 6:return"[W sobot\u0119 o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zesz\u0142\u0105 niedziel\u0119 o] LT";case 3:return"[W zesz\u0142\u0105 \u015brod\u0119 o] LT";case 6:return"[W zesz\u0142\u0105 sobot\u0119 o] LT";default:return"[W zesz\u0142y] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:Lr,m:Lr,mm:Lr,h:Lr,hh:Lr,d:"1 dzie\u0144",dd:"%d dni",w:"tydzie\u0144",ww:Lr,M:"miesi\u0105c",MM:Lr,y:"rok",yy:Lr},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),M.defineLocale("pt-br",{months:"janeiro_fevereiro_mar\xe7o_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_ter\xe7a-feira_quarta-feira_quinta-feira_sexta-feira_s\xe1bado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_s\xe1b".split("_"),weekdaysMin:"do_2\xaa_3\xaa_4\xaa_5\xaa_6\xaa_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [\xe0s] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [\xe0s] HH:mm"},calendar:{sameDay:"[Hoje \xe0s] LT",nextDay:"[Amanh\xe3 \xe0s] LT",nextWeek:"dddd [\xe0s] LT",lastDay:"[Ontem \xe0s] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[\xdaltimo] dddd [\xe0s] LT":"[\xdaltima] dddd [\xe0s] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"h\xe1 %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%
12839d horas",d:"um dia",dd:"%d dias",M:"um m\xeas",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",invalidDate:"Data inv\xe1lida"}),M.defineLocale("pt",{months:"janeiro_fevereiro_mar\xe7o_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"Domingo_Segunda-feira_Ter\xe7a-feira_Quarta-feira_Quinta-feira_Sexta-feira_S\xe1bado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_S\xe1b".split("_"),weekdaysMin:"Do_2\xaa_3\xaa_4\xaa_5\xaa_6\xaa_S\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje \xe0s] LT",nextDay:"[Amanh\xe3 \xe0s] LT",nextWeek:"dddd [\xe0s] LT",lastDay:"[Ontem \xe0s] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[\xdaltimo] dddd [\xe0s] LT":"[\xdaltima] dddd [\xe0s] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"h\xe1 %s",s:"segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",w:"uma semana",ww:"%d semanas",M:"um m\xeas",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}}),M.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminic\u0103_luni_mar\u021bi_miercuri_joi_vineri_s\xe2mb\u0103t\u0103".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_S\xe2m".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_S\xe2".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[m\xe2ine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s \xeen urm\u0103",s:"c\xe2teva secunde",ss:Yr,m:"un minut",mm:Yr,h:"o or\u0103",hh:Yr,d:"o zi",dd:Yr,w:"o s\u0103pt\u0103m\xe2n\u0103",ww:Yr,M:"o lun\u0103",MM:Yr,y:"un an",yy:Yr},week:{dow:1,doy:7}});var fr=[/^\u044f\u043d\u0432/i,/^\u0444\u0435\u0432/i,/^\u043c\u0430\u0440/i,/^\u0430\u043f\u0440/i,/^\u043c\u0430[\u0439\u044f]/i,/^\u0438\u044e\u043d/i,/^\u0438\u044e\u043b/i,/^\u0430\u0432\u0433/i,/^\u0441\u0435\u043d/i,/^\u043e\u043a\u0442/i,/^\u043d\u043e\u044f/i,/^\u0434\u0435\u043a/i];M.defineLocale("ru",{months:{format:"\u044f\u043d\u0432\u0430\u0440\u044f_\u0444\u0435\u0432\u0440\u0430\u043b\u044f_\u043c\u0430\u0440\u0442\u0430_\u0430\u043f\u0440\u0435\u043b\u044f_\u043c\u0430\u044f_\u0438\u044e\u043d\u044f_\u0438\u044e\u043b\u044f_\u0430\u0432\u0433\u0443\u0441\u0442\u0430_\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f_\u043e\u043a\u0442\u044f\u0431\u0440\u044f_\u043d\u043e\u044f\u0431\u0440\u044f_\u0434\u0435\u043a\u0430\u0431\u0440\u044f".split("_"),standalone:"\u044f\u043d\u0432\u0430\u0440\u044c_\u0444\u0435\u0432\u0440\u0430\u043b\u044c_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0435\u043b\u044c_\u043c\u0430\u0439_\u0438\u044e\u043d\u044c_\u0438\u044e\u043b\u044c_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c_\u043e\u043a\u0442\u044f\u0431\u0440\u044c_\u043d\u043e\u044f\u0431\u0440\u044c_\u0434\u0435\u043a\u0430\u0431\u0440\u044c".split("_")},monthsShort:{format:"\u044f\u043d\u0432._\u0444\u0435\u0432\u0440._\u043c\u0430\u0440._\u0430\u043f\u0440._\u043c\u0430\u044f_\u0438\u044e\u043d\u044f_\u0438\u044e\u043b\u044f_\u0430\u0432\u0433._\u0441\u0435\u043d\u0442._\u043e\u043a\u0442._\u043d\u043e\u044f\u0431._\u0434\u0435\u043a.".split("_"),standalone:"\u044f\u043d\u0432._\u0444\u0435\u0432\u0440._\u043c\u0430\u0440\u0442_\u0430\u043f\u0440._\u043c\u0430\u0439_\u0438\u044e\u043d\u044c_\u0438\u044e\u043b\u044c_\u0430\u0432\u0433._\u0441\u0435\u043d\u0442._\u043e\u043a\u0442._\u043d\u043e\u044f\u0431._\u0434\u0435\u043a.".split("_")},weekdays:{standalone:"\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0435\u0440\u0433_\u043f\u044f\u0442\u043d\u0438\u0446\u0430_\u0441\u0443\u0431\u0431\u043e\u0442\u0430".split("_"),format:"\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u0435\u0434\u0443_\u0447\u0435\u0442\u0432\u0435\u0440\u0433_\u043f\u044f\u0442\u043d\u0438\u0446\u0443_\u0441\u0443\u0431\u0431\u043e\u0442\u0443".split("_"),isFormat:/\[ ?[\u0412\u0432] ?(?:\u043f\u0440\u043e\u0448\u043b\u0443\u044e|\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e|\u044d\u0442\u0443)? ?] ?dddd/},weekdaysShort:"\u0432\u0441_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),weekdaysMin:"\u0432\u0441_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),monthsParse:fr,longMonthsParse:fr,shortMonthsParse:fr,monthsRegex:/^(\u044f\u043d\u0432\u0430\u0440[\u044c\u044f]|\u044f\u043d\u0432\.?|\u0444\u0435\u0432\u0440\u0430\u043b[\u044c\u044f]|\u0444\u0435\u0432\u0440?\.?|\u043c\u0430\u0440\u0442\u0430?|\u043c\u0430\u0440\.?|\u0430\u043f\u0440\u0435\u043b[\u044c\u044f]|\u0430\u043f\u0440\.?|\u043c\u0430[\u0439\u044f]|\u0438\u044e\u043d[\u044c\u044f]|\u0438\u044e\u043d\.?|\u0438\u044e\u043b[\u044c\u044f]|\u0438\u044e\u043b\.?|\u0430\u0432\u0433\u0443\u0441\u0442\u0430?|\u0430\u0432\u0433\.?|\u0441\u0435\u043d\u0442\u044f\u0431\u0440[\u044c\u044f]|\u0441\u0435\u043d\u0442?\.?|\u043e\u043a\u0442\u044f\u0431\u0440[\u044c\u044f]|\u043e\u043a\u0442\.?|\u043d\u043e\u044f\u0431\u0440[\u044c\u044f]|\u043d\u043e\u044f\u0431?\.?|\u0434\u0435\u043a\u0430\u0431\u0440[\u044c\u044f]|\u0434\u0435\u043a\.?)/i,monthsShortRegex:/^(\u044f\u043d\u0432\u0430\u0440[\u044c\u044f]|\u044f\u043d\u0432\.?|\u0444\u0435\u0432\u0440\u0430\u043b[\u044c\u044f]|\u0444\u0435\u0432\u0440?\.?|\u043c\u0430\u0440\u0442\u0430?|\u043c\u0430\u0440\.?|\u0430\u043f\u0440\u0435\u043b[\u044c\u044f]|\u0430\u043f\u0440\.?|\u043c\u0430[\u0439\u044f]|\u0438\u044e\u043d[\u044c\u044f]|\u0438\u044e\u043d\.?|\u0438\u044e\u043b[\u044c\u044f]|\u0438\u044e\u043b\.?|\u0430\u0432\u0433\u0443\u0441\u0442\u0430?|\u0430\u0432\u0433\.?|\u0441\u0435\u043d\u0442\u044f\u0431\u0440[\u044c\u044f]|\u0441\u0435\u043d\u0442?\.?|\u043e\u043a\u0442\u044f\u0431\u0440[\u044c\u044f]|\u043e\u043a\u0442\.?|\u043d\u043e\u044f\u0431\u0440[\u044c\u044f]|\u043d\u043e\u044f\u0431?\.?|\u0434\u0435\u043a\u0430\u0431\u0440[\u044c\u044f]|\u0434\u0435\u043a\.?)/i,monthsStrictRegex:/^(\u044f\u043d\u0432\u0430\u0440[\u044f\u044c]|\u0444\u0435\u0432\u0440\u0430\u043b[\u044f\u044c]|\u043c\u0430\u0440\u0442\u0430?|\u0430\u043f\u0440\u0435\u043b[\u044f\u044c]|\u043c\u0430[\u044f\u0439]|\u0438\u044e\u043d[\u044f\u044c]|\u0438\u044e\u043b[\u044f\u044c]|\u0430\u0432\u0433\u0443\u0441\u0442\u0430?|\u0441\u0435\u043d\u0442\u044f\u0431\u0440[\u044f\u044c]|\u043e\u043a\u0442\u044f\u0431\u0440[\u044f\u044c]|\u043d\u043e\u044f\u0431\u0440[\u044f\u044c]|\u0434\u0435\u043a\u0430\u0431\u0440[\u044f\u044c])/i,monthsShortStrictRegex:/^(\u044f\u043d\u0432\.|\u0444\u0435\u0432\u0440?\.|\u
vendor: 16,384 bytes, line 12839
12839043c\u0430\u0440[\u0442.]|\u0430\u043f\u0440\.|\u043c\u0430[\u044f\u0439]|\u0438\u044e\u043d[\u044c\u044f.]|\u0438\u044e\u043b[\u044c\u044f.]|\u0430\u0432\u0433\.|\u0441\u0435\u043d\u0442?\.|\u043e\u043a\u0442\.|\u043d\u043e\u044f\u0431?\.|\u0434\u0435\u043a\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0433.",LLL:"D MMMM YYYY \u0433., H:mm",LLLL:"dddd, D MMMM YYYY \u0433., H:mm"},calendar:{sameDay:"[\u0421\u0435\u0433\u043e\u0434\u043d\u044f, \u0432] LT",nextDay:"[\u0417\u0430\u0432\u0442\u0440\u0430, \u0432] LT",lastDay:"[\u0412\u0447\u0435\u0440\u0430, \u0432] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[\u0412\u043e] dddd, [\u0432] LT":"[\u0412] dddd, [\u0432] LT";switch(this.day()){case 0:return"[\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435] dddd, [\u0432] LT";case 1:case 2:case 4:return"[\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439] dddd, [\u0432] LT";case 3:case 5:case 6:return"[\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e] dddd, [\u0432] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[\u0412\u043e] dddd, [\u0432] LT":"[\u0412] dddd, [\u0432] LT";switch(this.day()){case 0:return"[\u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u0435] dddd, [\u0432] LT";case 1:case 2:case 4:return"[\u0412 \u043f\u0440\u043e\u0448\u043b\u044b\u0439] dddd, [\u0432] LT";case 3:case 5:case 6:return"[\u0412 \u043f\u0440\u043e\u0448\u043b\u0443\u044e] dddd, [\u0432] LT"}},sameElse:"L"},relativeTime:{future:"\u0447\u0435\u0440\u0435\u0437 %s",past:"%s \u043d\u0430\u0437\u0430\u0434",s:"\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434",ss:yr,m:yr,mm:yr,h:"\u0447\u0430\u0441",hh:yr,d:"\u0434\u0435\u043d\u044c",dd:yr,w:"\u043d\u0435\u0434\u0435\u043b\u044f",ww:yr,M:"\u043c\u0435\u0441\u044f\u0446",MM:yr,y:"\u0433\u043e\u0434",yy:yr},meridiemParse:/\u043d\u043e\u0447\u0438|\u0443\u0442\u0440\u0430|\u0434\u043d\u044f|\u0432\u0435\u0447\u0435\u0440\u0430/i,isPM:function(e){return/^(\u0434\u043d\u044f|\u0432\u0435\u0447\u0435\u0440\u0430)$/.test(e)},meridiem:function(e,a,t){return e<4?"\u043d\u043e\u0447\u0438":e<12?"\u0443\u0442\u0440\u0430":e<17?"\u0434\u043d\u044f":"\u0432\u0435\u0447\u0435\u0440\u0430"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0439|\u0433\u043e|\u044f)/,ordinal:function(e,a){switch(a){case"M":case"d":case"DDD":return e+"-\u0439";case"D":return e+"-\u0433\u043e";case"w":case"W":return e+"-\u044f";default:return e}},week:{dow:1,doy:4}});var pr=["\u062c\u0646\u0648\u0631\u064a","\u0641\u064a\u0628\u0631\u0648\u0631\u064a","\u0645\u0627\u0631\u0686","\u0627\u067e\u0631\u064a\u0644","\u0645\u0626\u064a","\u062c\u0648\u0646","\u062c\u0648\u0644\u0627\u0621\u0650","\u0622\u06af\u0633\u067d","\u0633\u064a\u067e\u067d\u0645\u0628\u0631","\u0622\u06aa\u067d\u0648\u0628\u0631","\u0646\u0648\u0645\u0628\u0631","\u068a\u0633\u0645\u0628\u0631"],kr=["\u0622\u0686\u0631","\u0633\u0648\u0645\u0631","\u0627\u06b1\u0627\u0631\u0648","\u0627\u0631\u0628\u0639","\u062e\u0645\u064a\u0633","\u062c\u0645\u0639","\u0687\u0646\u0687\u0631"];M.defineLocale("sd",{months:pr,monthsShort:pr,weekdays:kr,weekdaysShort:kr,weekdaysMin:kr,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd\u060c D MMMM YYYY HH:mm"},meridiemParse:/\u0635\u0628\u062d|\u0634\u0627\u0645/,isPM:function(e){return"\u0634\u0627\u0645"===e},meridiem:function(e,a,t){return e<12?"\u0635\u0628\u062d":"\u0634\u0627\u0645"},calendar:{sameDay:"[\u0627\u0684] LT",nextDay:"[\u0633\u0680\u0627\u06bb\u064a] LT",nextWeek:"dddd [\u0627\u06b3\u064a\u0646 \u0647\u0641\u062a\u064a \u062a\u064a] LT",lastDay:"[\u06aa\u0627\u0644\u0647\u0647] LT",lastWeek:"[\u06af\u0632\u0631\u064a\u0644 \u0647\u0641\u062a\u064a] dddd [\u062a\u064a] LT",sameElse:"L"},relativeTime:{future:"%s \u067e\u0648\u0621",past:"%s \u0627\u06b3",s:"\u0686\u0646\u062f \u0633\u064a\u06aa\u0646\u068a",ss:"%d \u0633\u064a\u06aa\u0646\u068a",m:"\u0647\u06aa \u0645\u0646\u067d",mm:"%d \u0645\u0646\u067d",h:"\u0647\u06aa \u06aa\u0644\u0627\u06aa",hh:"%d \u06aa\u0644\u0627\u06aa",d:"\u0647\u06aa \u068f\u064a\u0646\u0647\u0646",dd:"%d \u068f\u064a\u0646\u0647\u0646",M:"\u0647\u06aa \u0645\u0647\u064a\u0646\u0648",MM:"%d \u0645\u0647\u064a\u0646\u0627",y:"\u0647\u06aa \u0633\u0627\u0644",yy:"%d \u0633\u0627\u0644"},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"\u060c")},week:{dow:1,doy:4}}),M.defineLocale("se",{months:"o\u0111\u0111ajagem\xe1nnu_guovvam\xe1nnu_njuk\u010dam\xe1nnu_cuo\u014bom\xe1nnu_miessem\xe1nnu_geassem\xe1nnu_suoidnem\xe1nnu_borgem\xe1nnu_\u010dak\u010dam\xe1nnu_golggotm\xe1nnu_sk\xe1bmam\xe1nnu_juovlam\xe1nnu".split("_"),monthsShort:"o\u0111\u0111j_guov_njuk_cuo_mies_geas_suoi_borg_\u010dak\u010d_golg_sk\xe1b_juov".split("_"),weekdays:"sotnabeaivi_vuoss\xe1rga_ma\u014b\u014beb\xe1rga_gaskavahkku_duorastat_bearjadat_l\xe1vvardat".split("_"),weekdaysShort:"sotn_vuos_ma\u014b_gask_duor_bear_l\xe1v".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s gea\u017ees",past:"ma\u014bit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta m\xe1nnu",MM:"%d m\xe1nut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),M.defineLocale("si",{months:"\u0da2\u0db1\u0dc0\u0dcf\u0dbb\u0dd2_\u0db4\u0dd9\u0db6\u0dbb\u0dc0\u0dcf\u0dbb\u0dd2_\u0db8\u0dcf\u0dbb\u0dca\u0dad\u0dd4_\u0d85\u0db4\u0dca\u200d\u0dbb\u0dda\u0dbd\u0dca_\u0db8\u0dd0\u0dba\u0dd2_\u0da2\u0dd6\u0db1\u0dd2_\u0da2\u0dd6\u0dbd\u0dd2_\u0d85\u0d9c\u0ddd\u0dc3\u0dca\u0dad\u0dd4_\u0dc3\u0dd0\u0db4\u0dca\u0dad\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca_\u0d94\u0d9a\u0dca\u0dad\u0ddd\u0db6\u0dbb\u0dca_\u0db1\u0ddc\u0dc0\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca_\u0daf\u0dd9\u0dc3\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca".split("_"),monthsShort:"\u0da2\u0db1_\u0db4\u0dd9\u0db6_\u0db8\u0dcf\u0dbb\u0dca_\u0d85\u0db4\u0dca_\u0db8\u0dd0\u0dba\u0dd2_\u0da2\u0dd6\u0db1\u0dd2_\u0da2\u0dd6\u0dbd\u0dd2_\u0d85\u0d9c\u0ddd_\u0dc3\u0dd0\u0db4\u0dca_\u0d94\u0d9a\u0dca_\u0db1\u0ddc\u0dc0\u0dd0_\u0daf\u0dd9\u0dc3\u0dd0".split("_"),weekdays:"\u0d89\u0dbb\u0dd2\u0daf\u0dcf_\u0dc3\u0db3\u0dd4\u0daf\u0dcf_\u0d85\u0d9f\u0dc4\u0dbb\u0dd4\u0dc0\u0dcf\u0daf\u0dcf_\u0db6\u0daf\u0dcf\u0daf\u0dcf_\u0db6\u0dca\u200d\u0dbb\u0dc4\u0dc3\u0dca\u0db4\u0dad\u0dd2\u0db1\u0dca\u0daf\u0dcf_\u0dc3\u0dd2\u0d9a\u0dd4\u0dbb\u0dcf\u0daf\u0dcf_\u0dc3\u0dd9\u0db1\u0dc3\u0dd4\u0dbb\u0dcf\u0daf\u0dcf".split("_"),weekdaysShort:"\u0d89\u0dbb\u0dd2_\u0dc3\u0db3\u0dd4_\u0d85\u0d9f_\u0db6\u0daf\u0dcf_\u0db6\u0dca\u200d\u0dbb\u0dc4_\u0dc3\u0dd2\u0d9a\u0dd4_\u0dc3\u0dd9\u0db1".split("_"),weekdaysMin:"\u0d89_\u0dc3_\u0d85_\u0db6_\u0db6\u0dca\u200d\u0dbb_\u0dc3\u0dd2_\u0dc3\u0dd9".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [\u0dc0\u0dd0\u0db1\u0dd2] dddd, a h:mm:ss"},calendar:{sameDay:"[\u0d85\u0daf] LT[\u0da7]",nextDay:"[\u0dc4\u0dd9\u0da7] LT[\u0da7]",nextWeek:"dddd LT[\u0da7]",lastDay:"[\u0d8a\u0dba\u0dda] LT[\u0da7]",lastWeek:"[\u0db4\u0dc3\u0dd4\u0d9c\u0dd2\u0dba] dddd LT[\u0da7]",sameElse:"L"},relativeTime:{future:"%s\u0d9a\u0dd2\u0db1\u0dca",past:"%s\u0d9a\u0da7 \u0db4\u0dd9\u0dbb",s:"\u0dad\u0dad\u0dca\u0db4\u0dbb \u0d9a\u0dd2\u0dc4\u0dd2\u0db4\u0dba",ss:"\u0dad\u0dad\u0dca\u0db4\u0dbb %d",m:"\u0db8\u0dd2\u0db1\u0dd2\u0dad\u0dca\u0dad\u0dd4\u0dc0",mm:"\u0db8\u0dd2\u0db1\u0dd2\u0dad\u0dca\u0dad\u0dd4 %d",h:"\u0db4\u0dd0\u0dba",hh:"\u0db4\u0dd0\u0dba %d",d:"\u0daf\u0dd2\u0db1\u0dba",dd:"\u0daf\u0dd2\u0db1 %d",M:"\u0db8\u0dcf\u0dc3\u0dba",MM:"\u0db8\u0dcf\u0dc3 %d",y:"\u0dc0\u0dc3\u0dbb",yy:"\u0dc0\u0dc3\u0dbb %d"},dayOfMonthOrdinalParse:/\d{1,2} \u0dc0\u0dd0\u0db1\u0dd2/,ordinal:function(e){return e+" \u0dc0\u0dd0\u0db1\u0dd2"},meridiemParse:/\u0db4\u0dd9\u0dbb \u0dc0\u0dbb\u0dd4|\u0db4\u0dc3\u0dca \u0dc0\u0dbb\u0dd4|\u0db4\u0dd9.\u0dc0|\u0db4.\u0dc0./,isPM:function(e){return"\u0db4.\u0dc0."===e||"\u0db4\u0dc3\u0dca \u0dc0\u0dbb\u0dd4"===e},meridiem:function(e,a,t){return 11<e?t?"\u0db4.\u0dc0.":"\u0db4\u0dc3\u0dca \u0dc0\u0dbb\u0dd4":t?"\u0db4\u0dd9.\u0dc0.":"\u0db4\u0dd9\u0dbb \u0dc0\u0dbb\u0dd4"}});var Dr="janu\xe1r_febru\xe1r_marec_apr\xedl_m\xe1j_j\xfan_j\xfal_august_september_okt\xf3ber_november_december".split("_"),Tr="jan_feb_mar_apr_m\xe1j_j\xfan_j\xfal_aug_sep_okt_nov_dec".split("_");function gr(e){return 1<e&&e<5}function wr(e,a,t,s){var n=e+" ";switch(t){case"s":return a||s?"p\xe1r sek\xfand":"p\xe1r sekundami";case"ss":return a||s?n+(gr(e)?"sekundy":"sek\xfand"):n+"sekundami";case"m":return a?"min\xfata":s?"min\xfatu":"min\xfatou";case"mm":return a||s?n+(gr(e)?"min\xfaty":"min\xfat"):n+"min\xfatami";case"h":return a?"hodina":s?"hodinu":"hodinou";case"hh":return a||s?n+(gr(e)?"hodiny":"hod\xedn"):n+"hodinami";case"d":return a||s?"de\u0148":"d\u0148om";case"dd":return a||s?n+(gr(e)?"dni":"dn\xed"):n+"d\u0148ami";case"M":return a||s?"mesiac":"mesiacom";case"MM":return a||s?n+(gr(e)?"mesiace":"mesiacov"):n+"mesiacmi";case"y":return a||s?"rok":"rokom";case"yy":return a||s?n+(gr(e)?"roky":"rokov"):n+"rokmi"}}function vr(e,a,t,s){var n=e+" ";switch(t){case"s":return a||s?"nekaj sekund":"nekaj sekundami";case"ss":return n+=1===e?a?"sekundo":"sekundi":2===e?a||s?"sekundi":"sekundah":e<5?a||s?"sekunde":"sekundah":"sekund";case"m":return a?"ena minuta":"eno minuto";case"mm":return n+=1===e?a?"minuta":"minuto":2===e?a||s?"minuti":"minutama":e<5?a||s?"minute":"minutami":a||s?"minut":"minutami";case"h":return a?"ena ura":"eno uro";case"hh":return n+=1===e?a?"ura":"uro":2===e?a||s?"uri":"urama":e<5?a||s?"ure":"urami":a||s?"ur":"urami";case"d":return a||s?"en dan":"enim dnem";case"dd":return n+=1===e?a||s?"dan":"dnem":2===e?a||s?"dni":"dnevoma":a||s?"dni":"dnevi";case"M":return a||s?"en mesec":"enim mesecem";case"MM":return n+=1===e?a||s?"mesec":"mesecem":2===e?a||s?"meseca":"mesecema":e<5?a||s?"mesece":"meseci":a||s?"mesecev":"meseci";case"y":return a||s?"eno leto":"enim letom";case"yy":return n+=1===e?a||s?"leto":"letom":2===e?a||s?"leti":"letoma":e<5?a||s?"leta":"leti":a||s?"let":"leti"}}M.defineLocale("sk",{months:Dr,monthsShort:Tr,weekdays:"nede\u013ea_pondelok_utorok_streda_\u0161tvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_\u0161t_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_\u0161t_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nede\u013eu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo \u0161tvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[v\u010dera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minul\xfa nede\u013eu o] LT";case 1:case 2:return"[minul\xfd] dddd [o] LT";case 3:return"[minul\xfa stredu o] LT";case 4:case 5:return"[minul\xfd] dddd [o] LT";case 6:return"[minul\xfa sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:wr,ss:wr,m:wr,mm:wr,h:wr,hh:wr,d:wr,dd:wr,M:wr,MM:wr,y:wr,yy:wr},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),M.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_\u010detrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._\u010det._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_\u010de_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[v\u010deraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prej\u0161njo] [nedeljo] [ob] LT";case 3:return"[prej\u0161njo] [sredo] [ob] LT";case 6:return"[prej\u0161njo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prej\u0161nji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"\u010dez %s",past:"pred %s",s:vr,ss:vr,m:vr,mm:vr,h:vr,hh:vr,d:vr,dd:vr,M:vr,MM:vr,y:vr,yy:vr},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),M.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_N\xebntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_N\xebn_Dhj".split("_"),weekdays:"E Diel_E H\xebn\xeb_E Mart\xeb_E M\xebrkur\xeb_E Enjte_E Premte_E Shtun\xeb".split("_"),weekdaysShort:"Die_H\xebn_Mar_M\xebr_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_M\xeb_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(e){return"M"===e.charAt(0)},meridiem:function(e,a,t){return e<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot n\xeb] LT",nextDay:"[Nes\xebr n\xeb] LT",nextWeek:"dddd [n\xeb] LT",lastDay:"[Dje n\xeb] LT",lastWeek:"dddd [e kaluar n\xeb] LT",sameElse:"L"},relativeTime:{future:"n\xeb %s",past:"%s m\xeb par\xeb",s:"disa sekonda",ss:"%d sekonda",m:"nj\xeb minut\xeb",mm:"%d minuta",h:"nj\xeb or\xeb",hh:"%d or\xeb",d:"nj\xeb dit\xeb",dd:"%d dit\xeb",M:"nj\xeb muaj",MM:"%d muaj",y:"nj\xeb vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var br={words:{ss:["\u0441\u0435\u043a\u0443\u043d\u0434\u0430","\u0441\u0435\u043a\u0443\u043d\u0434\u0435","\u0441\u0435\u043a\u0443\u043d\u0434\u0438"],m:["\u0458\u0435\u0434\u0430\u043d \u043c\u0438\u043d\u0443\u0442","\u0458\u0435\u0434\u043d\u0435 \u043c\u0438\u043d\u0443\u0442\u0435"],mm:["\u043c\u0438\u043d\u0443\u0442","\u043c\u0438\u043d\u0443\u0442\u0435","\u043c\u0438\u043d\u0443\u0442\u0430"],h:["\u0458\u0435\u0434\u0430\u043d \u0441\u0430\u0442","\u0458\u0435\u0434\u043d\u043e\u0433 \u0441\u0430\u0442\u0430"],hh:["\u0441\u0430\u0442","\u0441\u0430\u0442\u0430","\u0441\u0430\u0442\u0438"],dd:["\u0434\u0430\u043d","\u0434\u0430\u043d\u0430","\u0434\u0430\u043d\u0430"],MM:["\u043c\u0435\u0441\u0435\u0446","\u043c\u0435\u0441\u0435\u0446\u0430","\u043c\u0435\u0441\u0435\u0446\u0438"],yy:["\u0433\u043e\u0434\u0438\u043d\u0430","\u0433\u043e\u0434\u0438\u043d\u0435","\u0433\u043e\u0434\u0438\u043d\u0430"]},correctGrammaticalCase:function(e,a){return 1===e?a[0]:2<=e&&e<=4?a[1]:a[2]},translate:function(e,a,t){var s=br.words[t];return 1===t.length?a?s[0]:s[1]:e+" "+br.correctGrammaticalCase(e,s)}};M.defineLocale("sr-cyrl",{months:"\u0458\u0430\u043d\u0443\u0430\u0440_\u0444\u0435\u0431\u0440\u0443\u0430\u0440_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0438\u043b_\u043c\u0430\u0458_\u0458\u0443\u043d_\u0458\u0443\u043b_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440_\u043e\u043a\u0442\u043e\u0431\u0430\u0440_\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440_\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440".split("_"),monthsShort:"\u0458\u0430\u043d._\u0444\u0435\u0431._\u043c\u0430\u0440._\u0430\u043f\u0440._\u043c\u0430\u0458_\u0458\u0443\u043d_\u0458\u0443\u043b_\u0430\u0432\u0433._\u0441\u0435\u043f._\u043e\u043a\u0442._\u043d\u043e\u0432._\u0434\u0435\u0446.".split("_"),monthsParseExact:!0,weekdays:"\u043d\u0435\u0434\u0435\u0459\u0430_\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u0430\u043a_\u0443\u0442\u043e\u0440\u0430\u043a_\u0441\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043a_\u043f\u0435\u0442\u0430\u043a_\u0441\u0443\u0431
12839\u043e\u0442\u0430".split("_"),weekdaysShort:"\u043d\u0435\u0434._\u043f\u043e\u043d._\u0443\u0442\u043e._\u0441\u0440\u0435._\u0447\u0435\u0442._\u043f\u0435\u0442._\u0441\u0443\u0431.".split("_"),weekdaysMin:"\u043d\u0435_\u043f\u043e_\u0443\u0442_\u0441\u0440_\u0447\u0435_\u043f\u0435_\u0441\u0443".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[\u0434\u0430\u043d\u0430\u0441 \u0443] LT",nextDay:"[\u0441\u0443\u0442\u0440\u0430 \u0443] LT",nextWeek:function(){switch(this.day()){case 0:return"[\u0443] [\u043d\u0435\u0434\u0435\u0459\u0443] [\u0443] LT";case 3:return"[\u0443] [\u0441\u0440\u0435\u0434\u0443] [\u0443] LT";case 6:return"[\u0443] [\u0441\u0443\u0431\u043e\u0442\u0443] [\u0443] LT";case 1:case 2:case 4:case 5:return"[\u0443] dddd [\u0443] LT"}},lastDay:"[\u0458\u0443\u0447\u0435 \u0443] LT",lastWeek:function(){return["[\u043f\u0440\u043e\u0448\u043b\u0435] [\u043d\u0435\u0434\u0435\u0459\u0435] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u043e\u0433] [\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u043a\u0430] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u043e\u0433] [\u0443\u0442\u043e\u0440\u043a\u0430] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u0435] [\u0441\u0440\u0435\u0434\u0435] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u043e\u0433] [\u0447\u0435\u0442\u0432\u0440\u0442\u043a\u0430] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u043e\u0433] [\u043f\u0435\u0442\u043a\u0430] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u0435] [\u0441\u0443\u0431\u043e\u0442\u0435] [\u0443] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"\u0437\u0430 %s",past:"\u043f\u0440\u0435 %s",s:"\u043d\u0435\u043a\u043e\u043b\u0438\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434\u0438",ss:br.translate,m:br.translate,mm:br.translate,h:br.translate,hh:br.translate,d:"\u0434\u0430\u043d",dd:br.translate,M:"\u043c\u0435\u0441\u0435\u0446",MM:br.translate,y:"\u0433\u043e\u0434\u0438\u043d\u0443",yy:br.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});var Sr={words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,a){return 1===e?a[0]:2<=e&&e<=4?a[1]:a[2]},translate:function(e,a,t){var s=Sr.words[t];return 1===t.length?a?s[0]:s[1]:e+" "+Sr.correctGrammaticalCase(e,s)}};M.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_\u010detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._\u010det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010de_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[ju\u010de u] LT",lastWeek:function(){return["[pro\u0161le] [nedelje] [u] LT","[pro\u0161log] [ponedeljka] [u] LT","[pro\u0161log] [utorka] [u] LT","[pro\u0161le] [srede] [u] LT","[pro\u0161log] [\u010detvrtka] [u] LT","[pro\u0161log] [petka] [u] LT","[pro\u0161le] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:Sr.translate,m:Sr.translate,mm:Sr.translate,h:Sr.translate,hh:Sr.translate,d:"dan",dd:Sr.translate,M:"mesec",MM:Sr.translate,y:"godinu",yy:Sr.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),M.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LT
vendor: 18,962 bytes, line 12839
12839S:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,a,t){return e<11?"ekuseni":e<15?"emini":e<19?"entsambama":"ebusuku"},meridiemHour:function(e,a){return 12===e&&(e=0),"ekuseni"===a?e:"emini"===a?11<=e?e:e+12:"entsambama"===a||"ebusuku"===a?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}}),M.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"s\xf6ndag_m\xe5ndag_tisdag_onsdag_torsdag_fredag_l\xf6rdag".split("_"),weekdaysShort:"s\xf6n_m\xe5n_tis_ons_tor_fre_l\xf6r".split("_"),weekdaysMin:"s\xf6_m\xe5_ti_on_to_fr_l\xf6".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Ig\xe5r] LT",nextWeek:"[P\xe5] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"f\xf6r %s sedan",s:"n\xe5gra sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en m\xe5nad",MM:"%d m\xe5nader",y:"ett \xe5r",yy:"%d \xe5r"},dayOfMonthOrdinalParse:/\d{1,2}(\:e|\:a)/,ordinal:function(e){var a=e%10;return e+(1!=~~(e%100/10)&&(1==a||2==a)?":a":":e")},week:{dow:1,doy:4}}),M.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"hh:mm A",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"siku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}});var Hr={1:"\u0be7",2:"\u0be8",3:"\u0be9",4:"\u0bea",5:"\u0beb",6:"\u0bec",7:"\u0bed",8:"\u0bee",9:"\u0bef",0:"\u0be6"},jr={"\u0be7":"1","\u0be8":"2","\u0be9":"3","\u0bea":"4","\u0beb":"5","\u0bec":"6","\u0bed":"7","\u0bee":"8","\u0bef":"9","\u0be6":"0"};M.defineLocale("ta",{months:"\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf_\u0baa\u0bbf\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf_\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd_\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd_\u0bae\u0bc7_\u0b9c\u0bc2\u0ba9\u0bcd_\u0b9c\u0bc2\u0bb2\u0bc8_\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd_\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bc6\u0bae\u0bcd\u0baa\u0bb0\u0bcd_\u0b85\u0b95\u0bcd\u0b9f\u0bc7\u0bbe\u0baa\u0bb0\u0bcd_\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd_\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcd".split("_"),monthsShort:"\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf_\u0baa\u0bbf\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf_\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd_\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd_\u0bae\u0bc7_\u0b9c\u0bc2\u0ba9\u0bcd_\u0b9c\u0bc2\u0bb2\u0bc8_\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd_\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bc6\u0bae\u0bcd\u0baa\u0bb0\u0bcd_\u0b85\u0b95\u0bcd\u0b9f\u0bc7\u0bbe\u0baa\u0bb0\u0bcd_\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd_\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcd".split("_"),weekdays:"\u0b9e\u0bbe\u0baf\u0bbf\u0bb1\u0bcd\u0bb1\u0bc1\u0b95\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0ba4\u0bbf\u0b99\u0bcd\u0b95\u0b9f\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0b9a\u0bc6\u0bb5\u0bcd\u0bb5\u0bbe\u0baf\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0baa\u0bc1\u0ba4\u0ba9\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0bb5\u0bbf\u0baf\u0bbe\u0bb4\u0b95\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0bb5\u0bc6\u0bb3\u0bcd\u0bb3\u0bbf\u0b95\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0b9a\u0ba9\u0bbf\u0b95\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8".split("_"),weekdaysShort:"\u0b9e\u0bbe\u0baf\u0bbf\u0bb1\u0bc1_\u0ba4\u0bbf\u0b99\u0bcd\u0b95\u0bb3\u0bcd_\u0b9a\u0bc6\u0bb5\u0bcd\u0bb5\u0bbe\u0baf\u0bcd_\u0baa\u0bc1\u0ba4\u0ba9\u0bcd_\u0bb5\u0bbf\u0baf\u0bbe\u0bb4\u0ba9\u0bcd_\u0bb5\u0bc6\u0bb3\u0bcd\u0bb3\u0bbf_\u0b9a\u0ba9\u0bbf".split("_"),weekdaysMin:"\u0b9e\u0bbe_\u0ba4\u0bbf_\u0b9a\u0bc6_\u0baa\u0bc1_\u0bb5\u0bbf_\u0bb5\u0bc6_\u0b9a".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[\u0b87\u0ba9\u0bcd\u0bb1\u0bc1] LT",nextDay:"[\u0ba8\u0bbe\u0bb3\u0bc8] LT",nextWeek:"dddd, LT",lastDay:"[\u0ba8\u0bc7\u0bb1\u0bcd\u0bb1\u0bc1] LT",lastWeek:"[\u0b95\u0b9f\u0ba8\u0bcd\u0ba4 \u0bb5\u0bbe\u0bb0\u0bae\u0bcd] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0b87\u0bb2\u0bcd",past:"%s \u0bae\u0bc1\u0ba9\u0bcd",s:"\u0b92\u0bb0\u0bc1 \u0b9a\u0bbf\u0bb2 \u0bb5\u0bbf\u0ba8\u0bbe\u0b9f\u0bbf\u0b95\u0bb3\u0bcd",ss:"%d \u0bb5\u0bbf\u0ba8\u0bbe\u0b9f\u0bbf\u0b95\u0bb3\u0bcd",m:"\u0b92\u0bb0\u0bc1 \u0ba8\u0bbf\u0bae\u0bbf\u0b9f\u0bae\u0bcd",mm:"%d \u0ba8\u0bbf\u0bae\u0bbf\u0b9f\u0b99\u0bcd\u0b95\u0bb3\u0bcd",h:"\u0b92\u0bb0\u0bc1 \u0bae\u0ba3\u0bbf \u0ba8\u0bc7\u0bb0\u0bae\u0bcd",hh:"%d \u0bae\u0ba3\u0bbf \u0ba8\u0bc7\u0bb0\u0bae\u0bcd",d:"\u0b92\u0bb0\u0bc1 \u0ba8\u0bbe\u0bb3\u0bcd",dd:"%d \u0ba8\u0bbe\u0b9f\u0bcd\u0b95\u0bb3\u0bcd",M:"\u0b92\u0bb0\u0bc1 \u0bae\u0bbe\u0ba4\u0bae\u0bcd",MM:"%d \u0bae\u0bbe\u0ba4\u0b99\u0bcd\u0b95\u0bb3\u0bcd",y:"\u0b92\u0bb0\u0bc1 \u0bb5\u0bb0\u0bc1\u0b9f\u0bae\u0bcd",yy:"%d \u0b86\u0ba3\u0bcd\u0b9f\u0bc1\u0b95\u0bb3\u0bcd"},dayOfMonthOrdinalParse:/\d{1,2}\u0bb5\u0ba4\u0bc1/,ordinal:function(e){return e+"\u0bb5\u0ba4\u0bc1"},preparse:function(e){return e.replace(/[\u0be7\u0be8\u0be9\u0bea\u0beb\u0bec\u0bed\u0bee\u0bef\u0be6]/g,function(e){return jr[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return Hr[e]})},meridiemParse:/\u0baf\u0bbe\u0bae\u0bae\u0bcd|\u0bb5\u0bc8\u0b95\u0bb1\u0bc8|\u0b95\u0bbe\u0bb2\u0bc8|\u0ba8\u0ba3\u0bcd\u0baa\u0b95\u0bb2\u0bcd|\u0b8e\u0bb1\u0bcd\u0baa\u0bbe\u0b9f\u0bc1|\u0bae\u0bbe\u0bb2\u0bc8/,meridiem:function(e,a,t){return e<2?" \u0baf\u0bbe\u0bae\u0bae\u0bcd":e<6?" \u0bb5\u0bc8\u0b95\u0bb1\u0bc8":e<10?" \u0b95\u0bbe\u0bb2\u0bc8":e<14?" \u0ba8\u0ba3\u0bcd\u0baa\u0b95\u0bb2\u0bcd":e<18?" \u0b8e\u0bb1\u0bcd\u0baa\u0bbe\u0b9f\u0bc1":e<22?" \u0bae\u0bbe\u0bb2\u0bc8":" \u0baf\u0bbe\u0bae\u0bae\u0bcd"},meridiemHour:function(e,a){return 12===e&&(e=0),"\u0baf\u0bbe\u0bae\u0bae\u0bcd"===a?e<2?e:e+12:"\u0bb5\u0bc8\u0b95\u0bb1\u0bc8"===a||"\u0b95\u0bbe\u0bb2\u0bc8"===a||"\u0ba8\u0ba3\u0bcd\u0baa\u0b95\u0bb2\u0bcd"===a&&10<=e?e:e+12},week:{dow:0,doy:6}}),M.defineLocale("te",{months:"\u0c1c\u0c28\u0c35\u0c30\u0c3f_\u0c2b\u0c3f\u0c2c\u0c4d\u0c30\u0c35\u0c30\u0c3f_\u0c2e\u0c3e\u0c30\u0c4d\u0c1a\u0c3f_\u0c0f\u0c2a\u0c4d\u0c30\u0c3f\u0c32\u0c4d_\u0c2e\u0c47_\u0c1c\u0c42\u0c28\u0c4d_\u0c1c\u0c41\u0c32\u0c48_\u0c06\u0c17\u0c38\u0c4d\u0c1f\u0c41_\u0c38\u0c46\u0c2a\u0c4d\u0c1f\u0c46\u0c02\u0c2c\u0c30\u0c4d_\u0c05\u0c15\u0c4d\u0c1f\u0c4b\u0c2c\u0c30\u0c4d_\u0c28\u0c35\u0c02\u0c2c\u0c30\u0c4d_\u0c21\u0c3f\u0c38\u0c46\u0c02\u0c2c\u0c30\u0c4d".split("_"),monthsShort:"\u0c1c\u0c28._\u0c2b\u0c3f\u0c2c\u0c4d\u0c30._\u0c2e\u0c3e\u0c30\u0c4d\u0c1a\u0c3f_\u0c0f\u0c2a\u0c4d\u0c30\u0c3f._\u0c2e\u0c47_\u0c1c\u0c42\u0c28\u0c4d_\u0c1c\u0c41\u0c32\u0c48_\u0c06\u0c17._\u0c38\u0c46\u0c2a\u0c4d._\u0c05\u0c15\u0c4d\u0c1f\u0c4b._\u0c28\u0c35._\u0c21\u0c3f\u0c38\u0c46.".split("_"),monthsParseExact:!0,weekdays:"\u0c06\u0c26\u0c3f\u0c35\u0c3e\u0c30\u0c02_\u0c38\u0c4b\u0c2e\u0c35\u0c3e\u0c30\u0c02_\u0c2e\u0c02\u0c17\u0c33\u0c35\u0c3e\u0c30\u0c02_\u0c2c\u0c41\u0c27\u0c35\u0c3e\u0c30\u0c02_\u0c17\u0c41\u0c30\u0c41\u0c35\u0c3e\u0c30\u0c02_\u0c36\u0c41\u0c15\u0c4d\u0c30\u0c35\u0c3e\u0c30\u0c02_\u0c36\u0c28\u0c3f\u0c35\u0c3e\u0c30\u0c02".split("_"),weekdaysShort:"\u0c06\u0c26\u0c3f_\u0c38\u0c4b\u0c2e_\u0c2e\u0c02\u0c17\u0c33_\u0c2c\u0c41\u0c27_\u0c17\u0c41\u0c30\u0c41_\u0c36\u0c41\u0c15\u0c4d\u0c30_\u0c36\u0c28\u0c3f".split("_"),weekdaysMin:"\u0c06_\u0c38\u0c4b_\u0c2e\u0c02_\u0c2c\u0c41_\u0c17\u0c41_\u0c36\u0c41_\u0c36".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[\u0c28\u0c47\u0c21\u0c41] LT",nextDay:"[\u0c30\u0c47\u0c2a\u0c41] LT",nextWeek:"dddd, LT",lastDay:"[\u0c28\u0c3f\u0c28\u0c4d\u0c28] LT",lastWeek:"[\u0c17\u0c24] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0c32\u0c4b",past:"%s \u0c15\u0c4d\u0c30\u0c3f\u0c24\u0c02",s:"\u0c15\u0c4a\u0c28\u0c4d\u0c28\u0c3f \u0c15\u0c4d\u0c37\u0c23\u0c3e\u0c32\u0c41",ss:"%d \u0c38\u0c46\u0c15\u0c28\u0c4d\u0c32\u0c41",m:"\u0c12\u0c15 \u0c28\u0c3f\u0c2e\u0c3f\u0c37\u0c02",mm:"%d \u0c28\u0c3f\u0c2e\u0c3f\u0c37\u0c3e\u0c32\u0c41",h:"\u0c12\u0c15 \u0c17\u0c02\u0c1f",hh:"%d \u0c17\u0c02\u0c1f\u0c32\u0c41",d:"\u0c12\u0c15 \u0c30\u0c4b\u0c1c\u0c41",dd:"%d \u0c30\u0c4b\u0c1c\u0c41\u0c32\u0c41",M:"\u0c12\u0c15 \u0c28\u0c46\u0c32",MM:"%d \u0c28\u0c46\u0c32\u0c32\u0c41",y:"\u0c12\u0c15 \u0c38\u0c02\u0c35\u0c24\u0c4d\u0c38\u0c30\u0c02",yy:"%d \u0c38\u0c02\u0c35\u0c24\u0c4d\u0c38\u0c30\u0c3e\u0c32\u0c41"},dayOfMonthOrdinalParse:/\d{1,2}\u0c35/,ordinal:"%d\u0c35",meridiemParse:/\u0c30\u0c3e\u0c24\u0c4d\u0c30\u0c3f|\u0c09\u0c26\u0c2f\u0c02|\u0c2e\u0c27\u0c4d\u0c2f\u0c3e\u0c39\u0c4d\u0c28\u0c02|\u0c38\u0c3e\u0c2f\u0c02\u0c24\u0c4d\u0c30\u0c02/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0c30\u0c3e\u0c24\u0c4d\u0c30\u0c3f"===a?e<4?e:e+12:"\u0c09\u0c26\u0c2f\u0c02"===a?e:"\u0c2e\u0c27\u0c4d\u0c2f\u0c3e\u0c39\u0c4d\u0c28\u0c02"===a?10<=e?e:e+12:"\u0c38\u0c3e\u0c2f\u0c02\u0c24\u0c4d\u0c30\u0c02"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"\u0c30\u0c3e\u0c24\u0c4d\u0c30\u0c3f":e<10?"\u0c09\u0c26\u0c2f\u0c02":e<17?"\u0c2e\u0c27\u0c4d\u0c2f\u0c3e\u0c39\u0c4d\u0c28\u0c02":e<20?"\u0c38\u0c3e\u0c2f\u0c02\u0c24\u0c4d\u0c30\u0c02":"\u0c30\u0c3e\u0c24\u0c4d\u0c30\u0c3f"},week:{dow:0,doy:6}}),M.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Ju\xf1u_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sest_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Ses_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"segundu balun",ss:"segundu %d",m:"minutu ida",mm:"minutu %d",h:"oras ida",hh:"oras %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1==a?"st":2==a?"nd":3==a?"rd":"th")},week:{dow:1,doy:4}});var xr={0:"-\u0443\u043c",1:"-\u0443\u043c",2:"-\u044e\u043c",3:"-\u044e\u043c",4:"-\u0443\u043c",5:"-\u0443\u043c",6:"-\u0443\u043c",7:"-\u0443\u043c",8:"-\u0443\u043c",9:"-\u0443\u043c",10:"-\u0443\u043c",12:"-\u0443\u043c",13:"-\u0443\u043c",20:"-\u0443\u043c",30:"-\u044e\u043c",40:"-\u0443\u043c",50:"-\u0443\u043c",60:"-\u0443\u043c",70:"-\u0443\u043c",80:"-\u0443\u043c",90:"-\u0443\u043c",100:"-\u0443\u043c"};M.defineLocale("tg",{months:{format:"\u044f\u043d\u0432\u0430\u0440\u0438_\u0444\u0435\u0432\u0440\u0430\u043b\u0438_\u043c\u0430\u0440\u0442\u0438_\u0430\u043f\u0440\u0435\u043b\u0438_\u043c\u0430\u0439\u0438_\u0438\u044e\u043d\u0438_\u0438\u044e\u043b\u0438_\u0430\u0432\u0433\u0443\u0441\u0442\u0438_\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u0438_\u043e\u043a\u0442\u044f\u0431\u0440\u0438_\u043d\u043e\u044f\u0431\u0440\u0438_\u0434\u0435\u043a\u0430\u0431\u0440\u0438".split("_"),standalone:"\u044f\u043d\u0432\u0430\u0440_\u0444\u0435\u0432\u0440\u0430\u043b_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0435\u043b_\u043c\u0430\u0439_\u0438\u044e\u043d_\u0438\u044e\u043b_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043d\u0442\u044f\u0431\u0440_\u043e\u043a\u0442\u044f\u0431\u0440_\u043d\u043e\u044f\u0431\u0440_\u0434\u0435\u043a\u0430\u0431\u0440".split("_")},monthsShort:"\u044f\u043d\u0432_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0439_\u0438\u044e\u043d_\u0438\u044e\u043b_\u0430\u0432\u0433_\u0441\u0435\u043d_\u043e\u043a\u0442_\u043d\u043e\u044f_\u0434\u0435\u043a".split("_"),weekdays:"\u044f\u043a\u0448\u0430\u043d\u0431\u0435_\u0434\u0443\u0448\u0430\u043d\u0431\u0435_\u0441\u0435\u0448\u0430\u043d\u0431\u0435_\u0447\u043e\u0440\u0448\u0430\u043d\u0431\u0435_\u043f\u0430\u043d\u04b7\u0448\u0430\u043d\u0431\u0435_\u04b7\u0443\u043c\u044a\u0430_\u0448\u0430\u043d\u0431\u0435".split("_"),weekdaysShort:"\u044f\u0448\u0431_\u0434\u0448\u0431_\u0441\u0448\u0431_\u0447\u0448\u0431_\u043f\u0448\u0431_\u04b7\u0443\u043c_\u0448\u043d\u0431".split("_"),weekdaysMin:"\u044f\u0448_\u0434\u0448_\u0441\u0448_\u0447\u0448_\u043f\u0448_\u04b7\u043c_\u0448\u0431".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0418\u043c\u0440\u04ef\u0437 \u0441\u043e\u0430\u0442\u0438] LT",nextDay:"[\u0424\u0430\u0440\u0434\u043e \u0441\u043e\u0430\u0442\u0438] LT",lastDay:"[\u0414\u0438\u0440\u04ef\u0437 \u0441\u043e\u0430\u0442\u0438] LT",nextWeek:"dddd[\u0438] [\u04b3\u0430\u0444\u0442\u0430\u0438 \u043e\u044f\u043d\u0434\u0430 \u0441\u043e\u0430\u0442\u0438] LT",lastWeek:"dddd[\u0438] [\u04b3\u0430\u0444\u0442\u0430\u0438 \u0433\u0443\u0437\u0430\u0448\u0442\u0430 \u0441\u043e\u0430\u0442\u0438] LT",sameElse:"L"},relativeTime:{future:"\u0431\u0430\u044a\u0434\u0438 %s",past:"%s \u043f\u0435\u0448",s:"\u044f\u043a\u0447\u0430\u043d\u0434 \u0441\u043e\u043d\u0438\u044f",m:"\u044f\u043a \u0434\u0430\u049b\u0438\u049b\u0430",mm:"%d \u0434\u0430\u049b\u0438\u049b\u0430",h:"\u044f\u043a \u0441\u043e\u0430\u0442",hh:"%d \u0441\u043e\u0430\u0442",d:"\u044f\u043a \u0440\u04ef\u0437",dd:"%d \u0440\u04ef\u0437",M:"\u044f\u043a \u043c\u043e\u04b3",MM:"%d \u043c\u043e\u04b3",y:"\u044f\u043a \u0441\u043e\u043b",yy:"%d \u0441\u043e\u043b"},meridiemParse:/\u0448\u0430\u0431|\u0441\u0443\u0431\u04b3|\u0440\u04ef\u0437|\u0431\u0435\u0433\u043e\u04b3/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0448\u0430\u0431"===a?e<4?e:e+12:"\u0441\u0443\u0431\u04b3"===a?e:"\u0440\u04ef\u0437"===a?11<=e?e:e+12:"\u0431\u0435\u0433\u043e\u04b3"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"\u0448\u0430\u0431":e<11?"\u0441\u0443\u0431\u04b3":e<16?"\u0440\u04ef\u0437":e<19?"\u0431\u0435\u0433\u043e\u04b3":"\u0448\u0430\u0431"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0443\u043c|\u044e\u043c)/,ordinal:function(e){return e+(xr[e]||xr[e%10]||xr[100<=e?100:null])},week:{dow:1,doy:7}}),M.defineLocale("th",{months:"\u0e21\u0e01\u0e23\u0e32\u0e04\u0e21_\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c_\u0e21\u0e35\u0e19\u0e32\u0e04\u0e21_\u0e40\u0e21\u0e29\u0e32\u0e22\u0e19_\u0e1e\u0e24\u0e29\u0e20\u0e32\u0e04\u0e21_\u0e21\u0e34\u0e16\u0e38\u0e19\u0e32\u0e22\u0e19_\u0e01\u0e23\u0e01\u0e0e\u0e32\u0e04\u0e21_\u0e2a\u0e34\u0e07\u0e2b\u0e32\u0e04\u0e21_\u0e01\u0e31\u0e19\u0e22\u0e32\u0e22\u0e19_\u0e15\u0e38\u0e25\u0e32\u0e04\u0e21_\u0e1e\u0e24\u0e28\u0e08\u0e34\u0e01\u0e32\u0e22\u0e19_\u0e18\u0e31\u0e19\u0e27\u0e32\u0e04\u0e21".split("_"),monthsShort:"\u0e21.\u0e04._\u0e01.\u0e1e._\u0e21\u0e35.\u0e04._\u0e40\u0e21.\u0e22._\u0e1e.\u0e04._\u0e21\u0e34.\u0e22._\u0e01.\u0e04._\u0e2a.\u0e04._\u0e01.\u0e22._\u0e15.\u0e04._\u0e1e.\u0e22._\u0e18.\u0e04.".split("_"),monthsParseExact:!0,weekdays:"\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c_\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c_\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23_\u0e1e\u0e38\u0e18_\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e1a\u0e14\u0e35_\u0e28\u0e38\u0e01\u0e23\u0e4c_\u0e40\u0e2a\u0e32\u0e23\u0e4c".split("_"),weekdaysShort:"\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c_\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c_\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23_\u0e1e\u0e38\u0e18_\u0e1e\u0e24\u0e2b\u0e31\u0e2a_\u0e28\u0e38\u0e01\u0e23\u0e4c_\u0e40\u0e2a\u0e32\u0e23\u0e4c".split("_"),weekdaysMin:"\u0e2d\u0e32._\u0e08._\u0e2d._\u0e1e._\u0e1e\u0e24._\u0e28._\u0e2a.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY \u0e40\u0e27\u0e25\u0e32 H:mm",LLLL:"\u0e27\u0e31\u0e19dddd\u0e17\u0e35\u0e48 D MMMM YYYY \u0e40\u0e27\u0e25\u0e32 H:mm"},meridiemParse:/\u0e01\u0e48\u0e2d\u0e19\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07|\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07/,isPM:function(e){return"\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07"===e},meridiem:function(e,a,t){return e<12?"\u0e01\u0e48\u0e2d\u0e19\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07":"\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07"},calendar:{sameDay:"[\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49 \u0e40\u0e27\u0e25\u0e32] LT",nextDay:"[\u0e1e\u0e23\u0e38\u0e48\u0e07\u0e19\u0e35\u0e49 \u0e40\u0e27\u0e25\u0e32] LT",nextWeek:"dddd[\u0e2b\u0e19\u0e49\u0e32 \u0e40\u0e27\u0e25\u0e32] LT",lastDay:"[\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e27\u0e32\u0e19\u0e19\u0e35\u0e49 \u0e40\u0e27\u0e25\u0e32] LT",lastWeek:"[\u0e27\u0e31\u0e19]dddd[\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27 \u0e40\u0e27\u0e25\u0e32] LT",sameElse:"L"},relativeTime:{future:"\u0e2d\u0e35\u0e01 %s",past:"%s\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27",s:"\u0e44\u0e21\u0e48\u0e01\u0e35\u0e48\u0e27\u0e34\u0e19\u0e32\u0e17\u0e35",ss:"%d \u0e27\u0e34\u0e19\u0e32\u0e17\u0e35",m:"1 \u0e19\u0e32\u0e17\u0e35",mm:"%d \u0e19\u0e32\u0e17\u0e35",h:"1 \u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07",hh:"%d \u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07",d:"1 \u0e27\u0e31\u0e19",dd:"%d \u0e27\u0e31\u0e19",w:"1 \u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c",ww:"%d \u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c",M:"1 \u0e40\u0e14\u0e37\u0e2d\u0e19",MM:"%d \u0e40\u0e14\u0e37\u0e2d\u0e19",y:"1 \u0e1b\u0e35",yy:"%d \u0e1b\u0e35"}});
vendor: 6,476 bytes, line 12839
12839var Pr={1:"'inji",5:"'inji",8:"'inji",70:"'inji",80:"'inji",2:"'nji",7:"'nji",20:"'nji",50:"'nji",3:"'\xfcnji",4:"'\xfcnji",100:"'\xfcnji",6:"'njy",9:"'unjy",10:"'unjy",30:"'unjy",60:"'ynjy",90:"'ynjy"};M.defineLocale("tk",{months:"\xddanwar_Fewral_Mart_Aprel_Ma\xfd_I\xfdun_I\xfdul_Awgust_Sent\xfdabr_Okt\xfdabr_No\xfdabr_Dekabr".split("_"),monthsShort:"\xddan_Few_Mar_Apr_Ma\xfd_I\xfdn_I\xfdl_Awg_Sen_Okt_No\xfd_Dek".split("_"),weekdays:"\xddek\u015fenbe_Du\u015fenbe_Si\u015fenbe_\xc7ar\u015fenbe_Pen\u015fenbe_Anna_\u015eenbe".split("_"),weekdaysShort:"\xddek_Du\u015f_Si\u015f_\xc7ar_Pen_Ann_\u015een".split("_"),weekdaysMin:"\xddk_D\u015f_S\u015f_\xc7r_Pn_An_\u015en".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bug\xfcn sagat] LT",nextDay:"[ertir sagat] LT",nextWeek:"[indiki] dddd [sagat] LT",lastDay:"[d\xfc\xfdn] LT",lastWeek:"[ge\xe7en] dddd [sagat] LT",sameElse:"L"},relativeTime:{future:"%s so\u0148",past:"%s \xf6\u0148",s:"birn\xe4\xe7e sekunt",m:"bir minut",mm:"%d minut",h:"bir sagat",hh:"%d sagat",d:"bir g\xfcn",dd:"%d g\xfcn",M:"bir a\xfd",MM:"%d a\xfd",y:"bir \xfdyl",yy:"%d \xfdyl"},ordinal:function(e,a){switch(a){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'unjy";var t=e%10;return e+(Pr[t]||Pr[e%100-t]||Pr[100<=e?100:null])}},week:{dow:1,doy:7}}),M.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}});var Or="pagh_wa\u2019_cha\u2019_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function Wr(e,a,t,s){var n=function(e){var a=Math.floor(e%1e3/100),t=Math.floor(e%100/10),s=e%10,n="";0<a&&(n+=Or[a]+"vatlh");0<t&&(n+=(""!==n?" ":"")+Or[t]+"maH");0<s&&(n+=(""!==n?" ":"")+Or[s]);return""===n?"pagh":n}(e);switch(t){case"ss":return n+" lup";case"mm":return n+" tup";case"hh":return n+" rep";case"dd":return n+" jaj";case"MM":return n+" jar";case"yy":return n+" DIS"}}M.defineLocale("tlh",{months:"tera\u2019 jar wa\u2019_tera\u2019 jar cha\u2019_tera\u2019 jar wej_tera\u2019 jar loS_tera\u2019 jar vagh_tera\u2019 jar jav_tera\u2019 jar Soch_tera\u2019 jar chorgh_tera\u2019 jar Hut_tera\u2019 jar wa\u2019maH_tera\u2019 jar wa\u2019maH wa\u2019_tera\u2019 jar wa\u2019maH cha\u2019".split("_"),monthsShort:"jar wa\u2019_jar cha\u2019_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa\u2019maH_jar wa\u2019maH wa\u2019_jar wa\u2019maH cha\u2019".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa\u2019leS] LT",nextWeek:"LLL",lastDay:"[wa\u2019Hu\u2019] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:function(e){var a=e;return a=-1!==e.indexOf("jaj")?a.slice(0,-3)+"leS":-1!==e.indexOf("jar")?a.slice(0,-3)+"waQ":-1!==e.indexOf("DIS")?a.slice(0,-3)+"nem":a+" pIq"},past:function(e){var a=e;return a=-1!==e.indexOf("jaj")?a.slice(0,-3)+"Hu\u2019":-1!==e.indexOf("jar")?a.slice(0,-3)+"wen":-1!==e.indexOf("DIS")?a.slice(0,-3)+"ben":a+" ret"},s:"puS lup",ss:Wr,m:"wa\u2019 tup",mm:Wr,h:"wa\u2019 rep",hh:Wr,d:"wa\u2019 jaj",dd:Wr,M:"wa\u2019 jar",MM:Wr,y:"wa\u2019 DIS",yy:Wr},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var Ar={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'\xfcnc\xfc",4:"'\xfcnc\xfc",100:"'\xfcnc\xfc",6:"'nc\u0131",9:"'uncu",10:"'uncu",30:"'uncu",60:"'\u0131nc\u0131",90:"'\u0131nc\u0131"};function Er(e,a,t,s){var n={s:["viensas secunds","'iensas secunds"],ss:[e+" secunds",e+" secunds"],m:["'n m\xedut","'iens m\xedut"],mm:[e+" m\xeduts",e+" m\xeduts"],h:["'n \xfeora","'iensa \xfeora"],hh:[e+" \xfeoras",e+" \xfeoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",e+" ars"]};return s||a?n[t][0]:n[t][1]}function Fr(e,a,t){var s,n;return"m"===t?a?"\u0445\u0432\u0438\u043b\u0438\u043d\u0430":"\u0445\u0432\u0438\u043b\u0438\u043d\u0443":"h"===t?a?"\u0433\u043e\u0434\u0438\u043d\u0430":"\u0433\u043e\u0434\u0438\u043d\u0443":e+" "+(s=+e,n={ss:a?"\u0441\u0435\u043a\u0443\u043d\u0434\u0430_\u0441\u0435\u043a\u0443\u043d\u0434\u0438_\u0441\u0435\u043a\u0443\u043d\u0434":"\u0441\u0435\u043a\u0443\u043d\u0434\u0443_\u0441\u0435\u043a\u0443\u043d\u0434\u0438_\u0441\u0435\u043a\u0443\u043d\u0434",mm:a?"\u0445\u0432\u0438\u043b\u0438\u043d\u0430_\u0445\u0432\u0438\u043b\u0438\u043d\u0438_\u0445\u0432\u0438\u043b\u0438\u043d":"\u0445\u0432\u0438\u043b\u0438\u043d\u0443_\u0445\u0432\u0438\u043b\u0438\u043d\u0438_\u0445\u0432\u0438\u043b\u0438\u043d",hh:a?"\u0433\u043e\u0434\u0438\u043d\u0430_\u0433\u043e\u0434\u0438\u043d\u0438_\u0433\u043e\u0434\u0438\u043d":"\u0433\u043e\u0434\u0438\u043d\u0443_\u0433\u043e\u0434\u0438\u043d\u0438_\u0433\u043e\u0434\u0438\u043d",dd:"\u0434\u0435\u043d\u044c_\u0434\u043d\u0456_\u0434\u043d\u0456\u0432",MM:"\u043c\u0456\u0441\u044f\u0446\u044c_\u043c\u0456\u0441\u044f\u0446\u0456_\u043c\u0456\u0441\u044f\u0446\u0456\u0432",yy:"\u0440\u0456\u043a_\u0440\u043e\u043a\u0438_\u0440\u043e\u043a\u0456\u0432"}[t].split("_"),s%10==1&&s%100!=11?n[0]:2<=s%10&&s%10<=4&&(s%100<10||20<=s%100)?n[1]:n[2])}
vendor: 2,708 bytes, line 12839
12839function zr(e){return function(){return e+"\u043e"+(11===this.hours()?"\u0431":"")+"] LT"}}M.defineLocale("tr",{months:"Ocak_\u015eubat_Mart_Nisan_May\u0131s_Haziran_Temmuz_A\u011fustos_Eyl\xfcl_Ekim_Kas\u0131m_Aral\u0131k".split("_"),monthsShort:"Oca_\u015eub_Mar_Nis_May_Haz_Tem_A\u011fu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Sal\u0131_\xc7ar\u015famba_Per\u015fembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_\xc7ar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_\xc7a_Pe_Cu_Ct".split("_"),meridiem:function(e,a,t){return e<12?t?"\xf6\xf6":"\xd6\xd6":t?"\xf6s":"\xd6S"},meridiemParse:/\xf6\xf6|\xd6\xd6|\xf6s|\xd6S/,isPM:function(e){return"\xf6s"===e||"\xd6S"===e},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bug\xfcn saat] LT",nextDay:"[yar\u0131n saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[d\xfcn] LT",lastWeek:"[ge\xe7en] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s \xf6nce",s:"birka\xe7 saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir g\xfcn",dd:"%d g\xfcn",w:"bir hafta",ww:"%d hafta",M:"bir ay",MM:"%d ay",y:"bir y\u0131l",yy:"%d y\u0131l"},ordinal:function(e,a){switch(a){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'\u0131nc\u0131";var t=e%10;return e+(Ar[t]||Ar[e%100-t]||Ar[100<=e?100:null])}},week:{dow:1,doy:7}}),M.defineLocale("tzl",{months:"Januar_Fevraglh_Mar\xe7_Avr\xefu_Mai_G\xfcn_Julia_Guscht_Setemvar_Listop\xe4ts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_G\xfcn_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"S\xfaladi_L\xfane\xe7i_Maitzi_M\xe1rcuri_Xh\xfaadi_Vi\xe9ner\xe7i_S\xe1turi".split("_"),weekdaysShort:"S\xfal_L\xfan_Mai_M\xe1r_Xh\xfa_Vi\xe9_S\xe1t".split("_"),weekdaysMin:"S\xfa_L\xfa_Ma_M\xe1_Xh_Vi_S\xe1".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(e){return"d'o"===e.toLowerCase()},meridiem:function(e,a,t){return 11<e?t?"d'o":"D'O":t?"d'a":"D'A"},calendar:{sameDay:"[oxhi \xe0] LT",nextDay:"[dem\xe0 \xe0] LT",nextWeek:"dddd [\xe0] LT",lastDay:"[ieiri \xe0] LT",lastWeek:"[s\xfcr el] dddd [lasteu \xe0] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:Er,ss:Er,m:Er,mm:Er,h:Er,hh:Er,d:Er,dd:Er,M:Er,MM:Er,y:Er,yy:Er},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),M.defineLocale("tzm-latn",{months:"innayr_br\u02e4ayr\u02e4_mar\u02e4s\u02e4_ibrir_mayyw_ywnyw_ywlywz_\u0263w\u0161t_\u0161wtanbir_kt\u02e4
12839wbr\u02e4_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_br\u02e4ayr\u02e4_mar\u02e4s\u02e4_ibrir_mayyw_ywnyw_ywlywz_\u0263w\u0161t_\u0161wtanbir_kt\u02e4wbr\u02e4_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asi\u1e0dyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asi\u1e0dyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asi\u1e0dyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minu\u1e0d",mm:"%d minu\u1e0d",h:"sa\u025ba",hh:"%d tassa\u025bin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}}),M.defineLocale("tzm",{months:"\u2d49\u2d4f\u2d4f\u2d30\u2d62\u2d54_\u2d31\u2d55\u2d30\u2d62\u2d55_\u2d4e\u2d30\u2d55\u2d5a_\u2d49\u2d31\u2d54\u2d49\u2d54_\u2d4e\u2d30\u2d62\u2d62\u2d53_\u2d62\u2d53\u2d4f\u2d62\u2d53_\u2d62\u2d53\u2d4d\u2d62\u2d53\u2d63_\u2d56\u2d53\u2d5b\u2d5c_\u2d5b\u2d53\u2d5c\u2d30\u2d4f\u2d31\u2d49\u2d54_\u2d3d\u2d5f\u2d53\u2d31\u2d55_\u2d4f\u2d53\u2d61\u2d30\u2d4f\u2d31\u2d49\u2d54_\u2d37\u2d53\u2d4a\u2d4f\u2d31\u2d49\u2d54".split("_"),monthsShort:"\u2d49\u2d4f\u2d4f\u2d30\u2d62\u2d54_\u2d31\u2d55\u2d30\u2d62\u2d55_\u2d4e\u2d30\u2d55\u2d5a_\u2d49\u2d31\u2d54\u2d49\u2d54_\u2d4e\u2d30\u2d62\u2d62\u2d53_\u2d62\u2d53\u2d4f\u2d62\u2d53_\u2d62\u2d53\u2d4d\u2d62\u2d53\u2d63_\u2d56\u2d53\u2d5b\u2d5c_\u2d5b\u2d53\u2d5c\u2d30\u2d4f\u2d31\u2d49\u2d54_\u2d3d\u2d5f\u2d53\u2d31\u2d55_\u2d4f\u2d53\u2d61\u2d30\u2d4f\u2d31\u2d49\u2d54_\u2d37\u2d53\u2d4a\u2d4f\u2d31\u2d49\u2d54".split("_"),weekdays:"\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59_\u2d30\u2d62\u2d4f\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59_\u2d30\u2d3d\u2d54\u2d30\u2d59_\u2d30\u2d3d\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59".split("_"),weekdaysShort:"\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59_\u2d30\u2d62\u2d4f\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59_\u2d30\u2d3d\u2d54\u2d30\u2d59_\u2d30\u2d3d\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59".split("_"),weekdaysMin:"\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59_\u2d30\u2d62\u2d4f\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59_\u2d30\u2d3d\u2d54\u2d30\u2d59_\u2d30\u2d3d\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u2d30\u2d59\u2d37\u2d45 \u2d34] LT",nextDay:"[\u2d30\u2d59\u2d3d\u2d30 \u2d34] LT",nextWeek:"dddd [\u2d34] LT",lastDay:"[\u2d30\u2d5a\u2d30\u2d4f\u2d5c \u2d34] LT",lastWeek:"dddd [\u2d34] LT",sameElse:"L"},relativeTime:{future:"\u2d37\u2d30\u2d37\u2d45 \u2d59 \u2d62\u2d30\u2d4f %s",past:"\u2d62\u2d30\u2d4f %s",s:"\u2d49\u2d4e\u2d49\u2d3d",ss:"%d \u2d49\u2d4e\u2d49\u2d3d",m:"\u2d4e\u2d49\u2d4f\u2d53\u2d3a",mm:"%d \u2d4e\u2d49\u2d4f\u2d53\u2d3a",h:"\u2d59\u2d30\u2d44\u2d30",hh:"%d \u2d5c\u2d30\u2d59\u2d59\u2d30\u2d44\u2d49\u2d4f",d:"\u2d30\u2d59\u2d59",dd:"%d o\u2d59\u2d59\u2d30\u2d4f",M:"\u2d30\u2d62o\u2d53\u2d54",MM:"%d \u2d49\u2d62\u2d62\u2d49\u2d54\u2d4f",y:"\u2d30\u2d59\u2d33\u2d30\u2d59",yy:"%d \u2d49\u2d59\u2d33\u2d30\u2d59\u2d4f"},week:{dow:6,doy:12}}),M.defineLocale("ug-cn",{months:"\u064a\u0627\u0646\u06cb\u0627\u0631_\u0641\u06d0\u06cb\u0631\u0627\u0644_\u0645\u0627\u0631\u062a_\u0626\u0627\u067e\u0631\u06d0\u0644_\u0645\u0627\u064a_\u0626\u0649\u064a\u06c7\u0646_\u0626\u0649\u064a\u06c7\u0644_\u0626\u0627\u06cb\u063a\u06c7\u0633\u062a_\u0633\u06d0\u0646\u062a\u06d5\u0628\u0649\u0631_\u0626\u06c6\u0643\u062a\u06d5\u0628\u0649\u0631_\u0646\u0648\u064a\u0627\u0628\u0649\u0631_\u062f\u06d0\u0643\u0627\u0628\u0649\u0631".split("_"),monthsShort:"\u064a\u0627\u0646\u06cb\u0627\u0631_\u0641\u06d0\u06cb\u0631\u0627\u0644_\u0645\u0627\u0631\u062a_\u0626\u0627\u067e\u0631\u06d0\u0644_\u0645\u0627\u064a_\u0626\u0649\u064a\u06c7\u0646_\u0626\u0649\u064a\u06c7\u0644_\u0626\u0627\u06cb\u063a\u06c7\u0633\u062a_\u0633\u06d0\u0646\u062a\u06d5\u0628\u0649\u0631_\u0626\u06c6\u0643\u062a\u06d5\u0628\u0649\u0631_\u0646\u0648\u064a\u0627\u0628\u0649\u0631_\u062f\u06d0\u0643\u0627\u0628\u0649\u0631".split("_"),weekdays:"\u064a\u06d5\u0643\u0634\u06d5\u0646\u0628\u06d5_\u062f\u06c8\u0634\u06d5\u0646\u0628\u06d5_\u0633\u06d5\u064a\u0634\u06d5\u0646\u0628\u06d5_\u0686\u0627\u0631\u0634\u06d5\u0646\u0628\u06d5_\u067e\u06d5\u064a\u0634\u06d5\u0646\u0628\u06d5_\u062c\u06c8\u0645\u06d5_\u0634\u06d5\u0646\u0628\u06d5".split("_"),weekdaysShort:"\u064a\u06d5_\u062f\u06c8_\u0633\u06d5_\u0686\u0627_\u067e\u06d5_\u062c\u06c8_\u0634\u06d5".split("_"),weekdaysMin:"\u064a\u06d5_\u062f\u06c8_\u0633\u06d5_\u0686\u0627_\u067e\u06d5_\u062c\u06c8_\u0634\u06d5".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY-\u064a\u0649\u0644\u0649M-\u0626\u0627\u064a\u0646\u0649\u06adD-\u0643\u06c8\u0646\u0649",LLL:"YYYY-\u064a\u0649\u0644\u0649M-\u0626\u0627\u064a\u0646\u0649\u06adD-\u0643\u06c8\u0646\u0649\u060c HH:mm",LLLL:"dddd\u060c YYYY-\u064a\u0649\u0644\u0649M-\u0626\u0627\u064a\u0646\u0649\u06adD-\u0643\u06c8\u0646\u0649\u060c HH:mm"},meridiemParse:/\u064a\u06d0\u0631\u0649\u0645 \u0643\u06d0\u0686\u06d5|\u0633\u06d5\u06be\u06d5\u0631|\u0686\u06c8\u0634\u062a\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646|\u0686\u06c8\u0634|\u0686\u06c8\u0634\u062a\u0649\u0646 \u0643\u06d0\u064a\u0649\u0646|\u0643\u06d5\u0686/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u064a\u06d0\u0631\u0649\u0645 \u0643\u06d0\u0686\u06d5"===a||"\u0633\u06d5\u06be\u06d5\u0631"===a||"\u0686\u06c8\u0634\u062a\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646"===a||"\u0686\u06c8\u0634\u062a\u0649\u0646 \u0643\u06d0\u064a\u0649\u0646"!==a&&"\u0643\u06d5\u0686"!==a&&11<=e?e:e+12},meridiem:function(e,a,t){var s=100*e+a;return s<600?"\u064a\u06d0\u0631\u0649\u0645 \u0643\u06d0\u0686\u06d5":s<900?"\u0633\u06d5\u06be\u06d5\u0631":s<1130?"\u0686\u06c8\u0634\u062a\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646":s<1230?"\u0686\u06c8\u0634":s<1800?"\u0686\u06c8\u0634\u062a\u0649\u0646 \u0643\u06d0\u064a\u0649\u0646":"\u0643\u06d5\u0686"},calendar:{sameDay:"[\u0628\u06c8\u06af\u06c8\u0646 \u0633\u0627\u0626\u06d5\u062a] LT",nextDay:"[\u0626\u06d5\u062a\u06d5 \u0633\u0627\u0626\u06d5\u062a] LT",nextWeek:"[\u0643\u06d0\u0644\u06d5\u0631\u0643\u0649] dddd [\u0633\u0627\u0626\u06d5\u062a] LT",lastDay:"[\u062a\u06c6\u0646\u06c8\u06af\u06c8\u0646] LT",lastWeek:"[\u0626\u0627\u0644\u062f\u0649\u0646\u0642\u0649] dddd [\u0633\u0627\u0626\u06d5\u062a] LT",sameElse:"L"},relativeTime:{future:"%s \u0643\u06d0\u064a\u0649\u0646",past:"%s \u0628\u06c7\u0631\u06c7\u0646",s:"\u0646\u06d5\u0686\u0686\u06d5 \u0633\u06d0\u0643\u0648\u0646\u062a",ss:"%d \u0633\u06d0\u0643\u0648\u0646\u062a",m:"\u0628\u0649\u0631 \u0645\u0649\u0646\u06c7\u062a",mm:"%d \u0645\u0649\u0646\u06c7\u062a",h:"\u0628\u0649\u0631 \u0633\u0627\u0626\u06d5\u062a",hh:"%
12839d \u0633\u0627\u0626\u06d5\u062a",d:"\u0628\u0649\u0631 \u0643\u06c8\u0646",dd:"%d \u0643\u06c8\u0646",M:"\u0628\u0649\u0631 \u0626\u0627\u064a",MM:"%d \u0626\u0627\u064a",y:"\u0628\u0649\u0631 \u064a\u0649\u0644",yy:"%d \u064a\u0649\u0644"},dayOfMonthOrdinalParse:/\d{1,2}(-\u0643\u06c8\u0646\u0649|-\u0626\u0627\u064a|-\u06be\u06d5\u067e\u062a\u06d5)/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"-\u0643\u06c8\u0646\u0649";case"w":case"W":return e+"-\u06be\u06d5\u067e\u062a\u06d5";default:return e}},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"\u060c")},week:{dow:1,doy:7}}),M.defineLocale("uk",{months:{format:"\u0441\u0456\u0447\u043d\u044f_\u043b\u044e\u0442\u043e\u0433\u043e_\u0431\u0435\u0440\u0435\u0437\u043d\u044f_\u043a\u0432\u0456\u0442\u043d\u044f_\u0442\u0440\u0430\u0432\u043d\u044f_\u0447\u0435\u0440\u0432\u043d\u044f_\u043b\u0438\u043f\u043d\u044f_\u0441\u0435\u0440\u043f\u043d\u044f_\u0432\u0435\u0440\u0435\u0441\u043d\u044f_\u0436\u043e\u0432\u0442\u043d\u044f_\u043b\u0438\u0441\u0442\u043e\u043f\u0430\u0434\u0430_\u0433\u0440\u0443\u0434\u043d\u044f".split("_"),standalone:"\u0441\u0456\u0447\u0435\u043d\u044c_\u043b\u044e\u0442\u0438\u0439_\u0431\u0435\u0440\u0435\u0437\u0435\u043d\u044c_\u043a\u0432\u0456\u0442\u0435\u043d\u044c_\u0442\u0440\u0430\u0432\u0435\u043d\u044c_\u0447\u0435\u0440\u0432\u0435\u043d\u044c_\u043b\u0438\u043f\u0435\u043d\u044c_\u0441\u0435\u0440\u043f\u0435\u043d\u044c_\u0432\u0435\u0440\u0435\u0441\u0435\u043d\u044c_\u0436\u043e\u0432\u0442\u0435\u043d\u044c_\u043b\u0438\u0441\u0442\u043e\u043f\u0430\u0434_\u0433\u0440\u0443\u0434\u0435\u043d\u044c".split("_")},monthsShort:"\u0441\u0456\u0447_\u043b\u044e\u0442_\u0431\u0435\u0440_\u043a\u0432\u0456\u0442_\u0442\u0440\u0430\u0432_\u0447\u0435\u0440\u0432_\u043b\u0438\u043f_\u0441\u0435\u0440\u043f_\u0432\u0435\u0440_\u0436\u043e\u0432\u0442_\u043b\u0438\u0441\u0442_\u0433\u0440\u0443\u0434".split("_"),weekdays:function(e,a){var t={nominative:"\u043d\u0435\u0434\u0456\u043b\u044f_\u043f\u043e\u043d\u0435\u0434\u0456\u043b\u043e\u043a_\u0432\u0456\u0432\u0442\u043e\u0440\u043e\u043a_\u0441\u0435\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0435\u0440_\u043f\u2019\u044f\u0442\u043d\u0438\u0446\u044f_\u0441\u0443\u0431\u043e\u0442\u0430".split("_"),accusative:"\u043d\u0435\u0434\u0456\u043b\u044e_\u043f\u043e\u043d\u0435\u0434\u0456\u043b\u043e\u043a_\u0432\u0456\u0432\u0442\u043e\u0440\u043e\u043a_\u0441\u0435\u0440\u0435\u0434\u0443_\u0447\u0435\u0442\u0432\u0435\u0440_\u043f\u2019\u044f\u0442\u043d\u0438\u0446\u044e_\u0441\u0443\u0431\u043e\u0442\u0443".split("_"),genitive:"\u043d\u0435\u0434\u0456\u043b\u0456_\u043f\u043e\u043d\u0435\u0434\u0456\u043b\u043a\u0430_\u0432\u0456\u0432\u0442\u043e\u0440\u043a\u0430_\u0441\u0435\u0440\u0435\u0434\u0438_\u0447\u0435\u0442\u0432\u0435\u0440\u0433\u0430_\u043f\u2019\u044f\u0442\u043d\u0438\u0446\u0456_\u0441\u0443\u0431\u043e\u0442\u0438".split("_")};return!0===e?t.nominative.slice(1,7).concat(t.nominative.slice(0,1)):e?t[/(\[[\u0412\u0432\u0423\u0443]\]) ?dddd/.test(a)?"accusative":/\[?(?:\u043c\u0438\u043d\u0443\u043b\u043e\u0457|\u043d\u0430\u0441\u0442\u0443\u043f\u043d\u043e\u0457)? ?\] ?dddd/.test(a)?"genitive":"nominative"][e.day()]:t.nominative},weekdaysShort:"\u043d\u0434_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),weekdaysMin:"\u043d\u0434_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0440.",LLL:"D MMMM YYYY \u0440., HH:mm",LLLL:"dddd, D MMMM YYYY \u0440., HH:mm"},calendar:{sameDay:zr("[\u0421\u044c\u043e\u0433\u043e\u0434\u043d\u0456 "),nextDay:zr("[\u0417\u0430\u0432\u0442\u0440\u0430 "),lastDay:zr("[\u0412\u0447\u043e\u0440\u0430 "),nextWeek:zr("[\u0423] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return zr("[\u041c\u0438\u043d\u0443\u043b\u043e\u0457] dddd [").call(this);case 1:case 2:case 4:return zr("[\u041c\u0438\u043d\u0443\u043b\u043e\u0433\u043e] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"\u0437\u0430 %s",past:"%s \u0442\u043e\u043c\u0443",s:"\u0434\u0435\u043a\u0456\u043b\u044c\u043a\u0430 \u0441\u0435\u043a\u0443\u043d\u0434",ss:Fr,m:Fr,mm:Fr,h:"\u0433\u043e\u0434\u0438\u043d\u0443",hh:Fr,d:"\u0434\u0435\u043d\u044c",dd:Fr,M:"\u043c\u0456\u0441\u044f\u0446\u044c",MM:Fr,y:"\u0440\u0456\u043a",yy:Fr},meridiemParse:/\u043d\u043e\u0447\u0456|\u0440\u0430\u043d\u043a\u0443|\u0434\u043d\u044f|\u0432\u0435\u0447\u043e\u0440\u0430/,isPM:function(e){return/^(\u0434\u043d\u044f|\u0432\u0435\u0447\u043e\u0440\u0430)$/.test(e)},meridiem:function(e,a,t){return e<4?"\u043d\u043e\u0447\u0456":e<12?"\u0440\u0430\u043d\u043a\u0443":e<17?"\u0434\u043d\u044f":"\u0432\u0435\u0447\u043e\u0440\u0430"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0439|\u0433\u043e)/,ordinal:function(e,a){switch(a){case"M":case"d":case"DDD":case"w":case"W":return e+"-\u0439";case"D":return e+"-\u0433\u043e";default:return e}},week:{dow:1,doy:7}});var Nr=["\u062c\u0646\u0648\u0631\u06cc","\u0641\u0631\u0648\u0631\u06cc","\u0645\u0627\u0631\u0686","\u0627\u067e\u0631\u06cc\u0644","\u0645\u0626\u06cc","\u062c\u0648\u0646","\u062c\u0648\u0644\u0627\u0626\u06cc","\u0627\u06af\u0633\u062a","\u0633\u062a\u0645\u0628\u0631","\u0627\u06a9\u062a\u0648\u0628\u0631","\u0646\u0648\u0645\u0628\u0631","\u062f\u0633\u0645\u0628\u0631"],Jr=["\u0627\u062a\u0648\u0627\u0631","\u067e\u06cc\u0631","\u0645\u0646\u06af\u0644","\u0628\u062f\u06be","\u062c\u0645\u0639\u0631\u0627\u062a","\u062c\u0645\u0639\u06c1","\u06c1\u064
128391\u062a\u06c1"];return M.defineLocale("ur",{months:Nr,monthsShort:Nr,weekdays:Jr,weekdaysShort:Jr,weekdaysMin:Jr,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd\u060c D MMMM YYYY HH:mm"},meridiemParse:/\u0635\u0628\u062d|\u0634\u0627\u0645/,isPM:function(e){return"\u0634\u0627\u0645"===e},meridiem:function(e,a,t){return e<12?"\u0635\u0628\u062d":"\u0634\u0627\u0645"},calendar:{sameDay:"[\u0622\u062c \u0628\u0648\u0642\u062a] LT",nextDay:"[\u06a9\u0644 \u0628\u0648\u0642\u062a] LT",nextWeek:"dddd [\u0628\u0648\u0642\u062a] LT",lastDay:"[\u06af\u0630\u0634\u062a\u06c1 \u0631\u0648\u0632 \u0628\u0648\u0642\u062a] LT",lastWeek:"[\u06af\u0630\u0634\u062a\u06c1] dddd [\u0628\u0648\u0642\u062a] LT",sameElse:"L"},relativeTime:{future:"%s \u0628\u0639\u062f",past:"%s \u0642\u0628\u0644",s:"\u0686\u0646\u062f \u0633\u06cc\u06a9\u0646\u0688",ss:"%d \u0633\u06cc\u06a9\u0646\u0688",m:"\u0627\u06cc\u06a9 \u0645\u0646\u0679",mm:"%d \u0645\u0646\u0679",h:"\u0627\u06cc\u06a9 \u06af\u06be\u0646\u0679\u06c1",hh:"%d \u06af\u06be\u0646\u0679\u06d2",d:"\u0627\u06cc\u06a9 \u062f\u0646",dd:"%d \u062f\u0646",M:"\u0627\u06cc\u06a9 \u0645\u0627\u06c1",MM:"%d \u0645\u0627\u06c1",y:"\u0627\u06cc\u06a9 \u0633\u0627\u0644",yy:"%d \u0633\u0627\u0644"},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"\u060c")},week:{dow:1,doy:4}}),M.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}}),M.defineLocale("uz",{months:"\u044f\u043d\u0432\u0430\u0440_\u0444\u0435\u0432\u0440\u0430\u043b_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0435\u043b_\u043c\u0430\u0439_\u0438\u044e\u043d_\u0438\u044e\u043b_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043d\u0442\u044f\u0431\u0440_\u043e\u043a\u0442\u044f\u0431\u0440_\u043d\u043e\u044f\u0431\u0440_\u0434\u0435\u043a\u0430\u0431\u0440".split("_"),monthsShort:"\u044f\u043d\u0432_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0439_\u0438\u044e\u043d_\u0438\u044e\u043b_\u0430\u0432\u0433_\u0441\u0435\u043d_\u043e\u043a\u0442_\u043d\u043e\u044f_\u0434\u0435\u043a".split("_"),weekdays:"\u042f\u043a\u0448\u0430\u043d\u0431\u0430_\u0414\u0443\u0448\u0430\u043d\u0431\u0430_\u0421\u0435\u0448\u0430\u043d\u0431\u0430_\u0427\u043e\u0440\u0448\u0430\u043d\u0431\u0430_\u041f\u0430\u0439\u0448\u0430\u043d\u0431\u0430_\u0416\u0443\u043c\u0430_\u0428\u0430\u043d\u0431\u0430".split("_"),weekdaysShort:"\u042f\u043a\u0448_\u0414\u0443\u0448_\u0421\u0435\u0448_\u0427\u043e\u0440_\u041f\u0430\u0439_\u0416\u0443\u043c_\u0428\u0430\u043d".split("_"),weekdaysMin:"\u042f\u043a_\u0414\u0443_\u0421\u0435_\u0427\u043e_\u041f\u0430_\u0416\u0443_\u0428\u0430".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[\u0411\u0443\u0433\u0443\u043d \u0441\u043e\u0430\u0442] LT [\u0434\u0430]",nextDay:"[\u042d\u0440\u0442\u0430\u0433\u0430] LT [\u0434\u0430]",nextWeek:"dddd [\u043a\u0443\u043d\u0438 \u0441\u043e\u0430\u0442] LT [\u0434\u0430]",lastDay:"[\u041a\u0435\u0447\u0430 \u0441\u043e\u0430\u0442] LT [\u0434\u0430]",lastWeek:"[\u0423\u0442\u0433\u0430\u043d] dddd [\u043a\u0443\u043d\u0438 \u0441\u043e\u0430\u0442] LT [\u0434\u0430]",sameElse:"L"},relativeTime:{future:"\u042f\u043a\u0438\u043d %s \u0438\u0447\u0438\u0434\u0430",past:"\u0411\u0438\u0440 \u043d\u0435\u0447\u0430 %s \u043e\u043b\u0434\u0438\u043d",s:"\u0444\u0443\u0440\u0441\u0430\u0442",ss:"%d \u0444\u0443\u0440\u0441\u0430\u0442",m:"\u0431\u0438\u0440 \u0434\u0430\u043a\u0438\u043a\u0430",mm:"%d \u0434\u0430\u043a\u0438\u043a\u0430",h:"\u0431\u0438\u0440 \u0441\u043e\u0430\u0442",hh:"%d \u0441\u043e\u0430\u0442",d:"\u0431\u0438\u0440 \u043a\u0443\u043d",dd:"%d \u043a\u0443\u043d",M:"\u0431\u0438\u0440 \u043e\u0439",MM:"%d \u043e\u0439",y:"\u0431\u0438\u0440 \u0439\u0438\u043b",yy:"%d \u0439\u0438\u043b"},week:{dow:1,doy:7}}),M.defineLocale("vi",{months:"th\xe1ng 1_th\xe1ng 2_th\xe1ng 3_th\xe1ng 4_th\xe1ng 5_th\xe1ng 6_th\xe1ng 7_th\xe1ng 8_th\xe1ng 9_th\xe1ng 10_th\xe1ng 11_th\xe1ng 12".split("_"),monthsShort:"Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12".split("_"),monthsParseExact:!0,weekdays:"ch\u1ee7 nh\u1eadt_th\u1ee9 hai_th\u1ee9 ba_th\u1ee9 t\u01b0_th\u1ee9 n\u0103m_th\u1ee9 s\xe1u_th\u1ee9 b\u1ea3y".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)}
vendor: 4,234 bytes, line 12839
12839,meridiem:function(e,a,t){return e<12?t?"sa":"SA":t?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [n\u0103m] YYYY",LLL:"D MMMM [n\u0103m] YYYY HH:mm",LLLL:"dddd, D MMMM [n\u0103m] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[H\xf4m nay l\xfac] LT",nextDay:"[Ng\xe0y mai l\xfac] LT",nextWeek:"dddd [tu\u1ea7n t\u1edbi l\xfac] LT",lastDay:"[H\xf4m qua l\xfac] LT",lastWeek:"dddd [tu\u1ea7n tr\u01b0\u1edbc l\xfac] LT",sameElse:"L"},relativeTime:{future:"%s t\u1edbi",past:"%s tr\u01b0\u1edbc",s:"v\xe0i gi\xe2y",ss:"%d gi\xe2y",m:"m\u1ed9t ph\xfat",mm:"%d ph\xfat",h:"m\u1ed9t gi\u1edd",hh:"%d gi\u1edd",d:"m\u1ed9t ng\xe0y",dd:"%d ng\xe0y",w:"m\u1ed9t tu\u1ea7n",ww:"%d tu\u1ea7n",M:"m\u1ed9t th\xe1ng",MM:"%d th\xe1ng",y:"m\u1ed9t n\u0103m",yy:"%d n\u0103m"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}}),M.defineLocale("x-pseudo",{months:"J~\xe1\xf1\xfa\xe1~r\xfd_F~\xe9br\xfa~\xe1r\xfd_~M\xe1rc~h_\xc1p~r\xedl_~M\xe1\xfd_~J\xfa\xf1\xe9~_J\xfal~\xfd_\xc1\xfa~g\xfast~_S\xe9p~t\xe9mb~\xe9r_\xd3~ct\xf3b~\xe9r_\xd1~\xf3v\xe9m~b\xe9r_~D\xe9c\xe9~mb\xe9r".split("_"),monthsShort:"J~\xe1\xf1_~F\xe9b_~M\xe1r_~\xc1pr_~M\xe1\xfd_~J\xfa\xf1_~J\xfal_~\xc1\xfag_~S\xe9p_~\xd3ct_~\xd1\xf3v_~D\xe9c".split("_"),monthsParseExact:!0,weekdays:"S~\xfa\xf1d\xe1~\xfd_M\xf3~\xf1d\xe1\xfd~_T\xfa\xe9~sd\xe1\xfd~_W\xe9d~\xf1\xe9sd~\xe1\xfd_T~h\xfars~d\xe1\xfd_~Fr\xedd~\xe1\xfd_S~\xe1t\xfar~d\xe1\xfd".split("_"),weekdaysShort:"S~\xfa\xf1_~M\xf3\xf1_~T\xfa\xe9_~W\xe9d_~Th\xfa_~Fr\xed_~S\xe1t".split("_"),weekdaysMin:"S~\xfa_M\xf3~_T\xfa_~W\xe9_T~h_Fr~_S\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~\xf3d\xe1~\xfd \xe1t] LT",nextDay:"[T~\xf3m\xf3~rr\xf3~w \xe1t] LT",nextWeek:"dddd [\xe1t] LT",lastDay:"[\xdd~\xe9st~\xe9rd\xe1~\xfd \xe1t] LT",lastWeek:"[L~\xe1st] dddd [\xe1t] LT",sameElse:"L"},relativeTime:{future:"\xed~\xf1 %s",past:"%s \xe1~g\xf3",s:"\xe1 ~f\xe9w ~s\xe9c\xf3~\xf1ds",ss:"%d s~\xe9c\xf3\xf1~ds",m:"\xe1 ~m\xed\xf1~\xfat\xe9",mm:"%d m~\xed\xf1\xfa~t\xe9s",h:"\xe1~\xf1 h\xf3~\xfar",hh:"%d h~\xf3\xfars",d:"\xe1 ~d\xe1\xfd",dd:"%d d~\xe1\xfds",M:"\xe1 ~m\xf3\xf1~th",MM:"%d m~\xf3\xf1t~hs",y:"\xe1 ~\xfd\xe9\xe1r",yy:"%d \xfd~\xe9\xe1rs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1==a?"st":2==a?"nd":3==a?"rd":"th")},week:{dow:1,doy:4}}),M.defineLocale("yo",{months:"S\u1eb9\u0301r\u1eb9\u0301_E\u0300re\u0300le\u0300_\u1eb8r\u1eb9\u0300na\u0300_I\u0300gbe\u0301_E\u0300bibi_O\u0300ku\u0300du_Ag\u1eb9mo_O\u0300gu\u0301n_Owewe_\u1ecc\u0300wa\u0300ra\u0300_Be\u0301lu\u0301_\u1ecc\u0300p\u1eb9\u0300\u0300".split("_"),monthsShort:"S\u1eb9\u0301r_E\u0300rl_\u1eb8rn_I\u0300gb_E\u0300bi_O\u0300ku\u0300_Ag\u1eb9_O\u0300gu\u0301_Owe_\u1ecc\u0300wa\u0300_Be\u0301l_\u1ecc\u0300p\u1eb9\u0300\u0300".split("_"),weekdays:"A\u0300i\u0300ku\u0301_Aje\u0301_I\u0300s\u1eb9\u0301gun_\u1eccj\u1ecd\u0301ru\u0301_\u1eccj\u1ecd\u0301b\u1ecd_\u1eb8ti\u0300_A\u0300ba\u0301m\u1eb9\u0301ta".split("_"),weekdaysShort:"A\u0300i\u0300k_Aje\u0301_I\u0300s\u1eb9\u0301_\u1eccjr_\u1eccjb_\u1eb8ti\u0300_A\u0300ba\u0301".split("_"),weekdaysMin:"A\u0300i\u0300_Aj_I\u0300s_\u1eccr_\u1eccb_\u1eb8t_A\u0300b".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[O\u0300ni\u0300 ni] LT",nextDay:"[\u1ecc\u0300la ni] LT",nextWeek:"dddd [\u1eccs\u1eb9\u0300 to\u0301n'b\u1ecd] [ni] LT",lastDay:"[A\u0300na ni] LT",lastWeek:"dddd [\u1eccs\u1eb9\u0300 to\u0301l\u1ecd\u0301] [ni] LT",sameElse:"L"},relativeTime:{future:"ni\u0301 %s",past:"%s k\u1ecdja\u0301",s:"i\u0300s\u1eb9ju\u0301 aaya\u0301 die",ss:"aaya\u0301 %d",m:"i\u0300s\u1eb9ju\u0301 kan",mm:"i\u0300s\u1eb9ju\u0301 %d",h:"wa\u0301kati kan",hh:"wa\u0301kati %d",d:"\u1ecdj\u1ecd\u0301 kan",dd:"\u1ecdj\u1ecd\u0301 %d",M:"osu\u0300 kan",MM:"osu\u0300 %d",y:"\u1ecddu\u0301n kan",yy:"\u1ecddu\u0301n %d"},dayOfMonthOrdinalParse:/\u1ecdj\u1ecd\u0301\s\d{1,2}
12839/,ordinal:"\u1ecdj\u1ecd\u0301 %d",week:{dow:1,doy:4}}),M.defineLocale("zh-cn",{months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u5468\u65e5_\u5468\u4e00_\u5468\u4e8c_\u5468\u4e09_\u5468\u56db_\u5468\u4e94_\u5468\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5Ah\u70b9mm\u5206",LLLL:"YYYY\u5e74M\u6708D\u65e5ddddAh\u70b9mm\u5206",l:"YYYY/M/D",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u51cc\u6668"===a||"\u65e9\u4e0a"===a||"\u4e0a\u5348"===a||"\u4e0b\u5348"!==a&&"\u665a\u4e0a"!==a&&11<=e?e:e+12},meridiem:function(e,a,t){var s=100*e+a;return s<600?"\u51cc\u6668":s<900?"\u65e9\u4e0a":s<1130?"\u4e0a\u5348":s<1230?"\u4e2d\u5348":s<1800?"\u4e0b\u5348":"\u665a\u4e0a"},calendar:{sameDay:"[\u4eca\u5929]LT",nextDay:"[\u660e\u5929]LT",nextWeek:function(e){return e.week()!==this.week()?"[\u4e0b]dddLT":"[\u672c]dddLT"},lastDay:"[\u6628\u5929]LT",lastWeek:function(e){return this.week()!==e.week()?"[\u4e0a]dddLT":"[\u672c]dddLT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u5468)/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"\u65e5";case"M":return e+"\u6708";case"w":case"W":return e+"\u5468";default:return e}},relativeTime:{future:"%s\u540e",past:"%s\u524d",s:"\u51e0\u79d2",ss:"%d \u79d2",m:"1 \u5206\u949f",mm:"%d \u5206\u949f",h:"1 \u5c0f\u65f6",hh:"%d \u5c0f\u65f6",d:"1 \u5929",dd:"%d \u5929",w:"1 \u5468",ww:"%d \u5468",M:"1 \u4e2a\u6708",MM:"%d \u4e2a\u6708",y:"1 \u5e74",yy:"%d \u5e74"},week:{dow:1,doy:4}}),M.defineLocale("zh-hk",{months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u9031\u65e5_\u9031\u4e00_\u9031\u4e8c_\u9031\u4e09_\u9031\u56db_\u9031\u4e94_\u9031\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5 HH:mm",LLLL:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm",l:"YYYY/M/D",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u51cc\u6668"===a||"\u65e9\u4e0a"===a||"\u4e0a\u5348"===a?e:"\u4e2d\u5348"===a?11<=e?e:e+12:"\u4e0b\u5348"===a||"\u665a\u4e0a"===a?e+12:void 0},meridiem:function(e,a,t){var s=100*e+a;return s<600?"\u51cc\u6668":s<900?"\u65e9\u4e0a":s<1200?"\u4e0a\u5348":1200===s?"\u4e2d\u5348":s<1800?"\u4e0b\u5348":"\u665a\u4e0a"},calendar:{sameDay:"[\u4eca\u5929]LT",nextDay:"[\u660e\u5929]LT",nextWeek:"[\u4e0b]ddddLT",lastDay:"[\u6628\u5929]LT",lastWeek:"[\u4e0a]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u9031)/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"\u65e5";case"M":return e+"\u6708";case"w":case"W":return e+"\u9031";default:return e}},relativeTime:{future:"%s\u5f8c",past:"%s\u524d",s:"\u5e7e\u79d2",ss:"%d \u79d2",m:"1 \u5206\u9418",mm:"%d \u5206\u9418",h:"1 \u5c0f\u6642",hh:"%d \u5c0f\u6642",d:"1 \u5929",dd:"%d \u5929",M:"1 \u500b\u6708",MM:"%d \u500b\u6708",y:"1 \u5e74",yy:"%d \u5e74"}}),M.defineLocale("zh-mo",{months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u9031\u65e5_\u9031\u4e00_\u9031\u4e8c_\u9031\u4e09_\u9031\u56db_\u9031\u4e94_\u9031\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5 HH:mm",LLLL:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm",l:"D/M/YYYY",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u51cc\u6668"===a||"\u65e9\u4e0a"===a||"\u4e0a\u5348"===a?e:"\u4e2d\u5348"===a?11<=e?e:e+12:"\u4e0b\u5348"===a||"\u665a\u4e0a"===a?e+12:void 0},meridiem:function(e,a,t){var s=100*e+a;return s<600?"\u51cc\u6668":s<900?"\u65e9\u4e0a":s<1130?"\u4e0a\u5348":s<1230?"\u4e2d\u5348":s<1800?"\u4e0b\u5348":"\u665a\u4e0a"},calendar:{sameDay:"[\u4eca\u5929] LT",nextDay:"[\u660e\u5929] LT",nextWeek:"[\u4e0b]dddd LT",lastDay:"[\u6628\u5929] LT",lastWeek:"[\u4e0a]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u9031)/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"\u65e5";case"M":return e+"\u6708";case"w":case"W":return e+"\u9031";default:return e}},relativeTime:{future:"%s\u5167",past:"%s\u524d",s:"\u5e7e\u79d2",ss:"%d \u79d2",m:"1 \u5206\u9418",mm:"%d \u5206\u9418",h:"1 \u5c0f\u6642",hh:"%d \u5c0f\u6642",d:"1 \u5929",dd:"%d \u5929",M:"1 \u500b\u6708",MM:"%d \u500b\u6708",y:"1 \u5e74",yy:"%d \u5e74"}}),M.defineLocale("zh-tw",{months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u9031\u65e5_\u9031\u4e00_\u9031\u4e8c_\u9031\u4e09_\u9031\u56db_\u9031\u4e94_\u9031\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5 HH:mm",LLLL:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm",l:"YYYY/M/D",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u51cc\u6668"===a||"\u65e9\u4e0a"===a||"\u4e0a\u5348"===a?e:"\u4e2d\u5348"===a?11<=e?e:e+12:"\u4e0b\u5348"===a||"\u665a\u4e0a"===a?e+12:void 0},meridiem:function(e,a,t){var s=100*e+a;return s<600?"\u51cc\u6668":s<900?"\u65e9\u4e0a":s<1130?"\u4e0a\u5348":s<1230?"\u4e2d\u5348":s<1800?"\u4e0b\u5348":"\u665a\u4e0a"},calendar:{sameDay:"[\u4eca\u5929] LT",nextDay:"[\u660e\u5929] LT",nextWeek:"[\u4e0b]dddd LT",lastDay:"[\u6628\u5929] LT",lastWeek:"[\u4e0a]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u9031)/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"\u65e5";case"M":return e+"\u6708";case"w":case"W":return e+"\u9031";default:return e}},relativeTime:{future:"%s\u5f8c",past:"%s\u524d",s:"\u5e7e\u79d2",ss:"%d \u79d2",m:"1 \u5206\u9418",mm:"%d \u5206\u9418",h:"1 \u5c0f\u6642",hh:"%d \u5c0f\u6642",d:"1 \u5929",dd:"%d \u5929",M:"1 \u500b\u6708",MM:"%d \u500b\u6708",y:"1 \u5e74",yy:"%d \u5e74"}}),M.locale("en"),M});
12840//# sourceMappingURL=moment-with-locales.min.js.map
12841(function(factory) {
12842  if (typeof define === "function" && define.amd) {
12843    // AMD. Register as an anonymous module.
12844    define([], factory);
12845  } else if (typeof exports === "object") {
12846    // Node/CommonJS
12847    module.exports = factory();
12848  } else {
12849    // Browser globals
12850    window.wNumb = factory();
12851  }
12852})(function() {
12853  "use strict";
12854
12855  var FormatOptions = [
12856    "decimals",
12857    "thousand",
12858    "mark",
12859    "prefix",
12860    "suffix",
12861    "encoder",
12862    "decoder",
12863    "negativeBefore",
12864    "negative",
12865    "edit",
12866    "undo"
12867  ];
12868
12869  // General
12870
12871  // Reverse a string
12872  function strReverse(a) {
12873    return a
12874      .split("")
12875      .reverse()
12876      .join("");
12877  }
12878
12879  // Check if a string starts with a specified prefix.
12880  function strStartsWith(input, match) {
12881    return input.substring(0, match.length) === match;
12882  }
12883
12884  // Check is a string ends in a specified suffix.
12885  function strEndsWith(input, match) {
12886    return input.slice(-1 * match.length) === match;
12887  }
12888
12889  // Throw an error if formatting options are incompatible.
vendor: 8,568 bytes, lines 12890-13230
12890  function throwEqualError(F, a, b) {
12891    if ((F[a] || F[b]) && F[a] === F[b]) {
12892      throw new Error(a);
12893    }
12894  }
12895
12896  // Check if a number is finite and not NaN
12897  function isValidNumber(input) {
12898    return typeof input === "number" && isFinite(input);
12899  }
12900
12901  // Provide rounding-accurate toFixed method.
12902  // Borrowed: http://stackoverflow.com/a/21323330/775265
12903  function toFixed(value, exp) {
12904    value = value.toString().split("e");
12905    value = Math.round(+(value[0] + "e" + (value[1] ? +value[1] + exp : exp)));
12906    value = value.toString().split("e");
12907    return (+(value[0] + "e" + (value[1] ? +value[1] - exp : -exp))).toFixed(exp);
12908  }
12909
12910  // Formatting
12911
12912  // Accept a number as input, output formatted string.
12913  function formatTo(
12914    decimals,
12915    thousand,
12916    mark,
12917    prefix,
12918    suffix,
12919    encoder,
12920    decoder,
12921    negativeBefore,
12922    negative,
12923    edit,
12924    undo,
12925    input
12926  ) {
12927    var originalInput = input,
12928      inputIsNegative,
12929      inputPieces,
12930      inputBase,
12931      inputDecimals = "",
12932      output = "";
12933
12934    // Apply user encoder to the input.
12935    // Expected outcome: number.
12936    if (encoder) {
12937      input = encoder(input);
12938    }
12939
12940    // Stop if no valid number was provided, the number is infinite or NaN.
12941    if (!isValidNumber(input)) {
12942      return false;
12943    }
12944
12945    // Rounding away decimals might cause a value of -0
12946    // when using very small ranges. Remove those cases.
12947    if (decimals !== false && parseFloat(input.toFixed(decimals)) === 0) {
12948      input = 0;
12949    }
12950
12951    // Formatting is done on absolute numbers,
12952    // decorated by an optional negative symbol.
12953    if (input < 0) {
12954      inputIsNegative = true;
12955      input = Math.abs(input);
12956    }
12957
12958    // Reduce the number of decimals to the specified option.
12959    if (decimals !== false) {
12960      input = toFixed(input, decimals);
12961    }
12962
12963    // Transform the number into a string, so it can be split.
12964    input = input.toString();
12965
12966    // Break the number on the decimal separator.
12967    if (input.indexOf(".") !== -1) {
12968      inputPieces = input.split(".");
12969
12970      inputBase = inputPieces[0];
12971
12972      if (mark) {
12973        inputDecimals = mark + inputPieces[1];
12974      }
12975    } else {
12976      // If it isn't split, the entire number will do.
12977      inputBase = input;
12978    }
12979
12980    // Group numbers in sets of three.
12981    if (thousand) {
12982      inputBase = strReverse(inputBase).match(/.{1,3}/g);
12983      inputBase = strReverse(inputBase.join(strReverse(thousand)));
12984    }
12985
12986    // If the number is negative, prefix with negation symbol.
12987    if (inputIsNegative && negativeBefore) {
12988      output += negativeBefore;
12989    }
12990
12991    // Prefix the number
12992    if (prefix) {
12993      output += prefix;
12994    }
12995
12996    // Normal negative option comes after the prefix. Defaults to '-'.
12997    if (inputIsNegative && negative) {
12998      output += negative;
12999    }
13000
13001    // Append the actual number.
13002    output += inputBase;
13003    output += inputDecimals;
13004
13005    // Apply the suffix.
13006    if (suffix) {
13007      output += suffix;
13008    }
13009
13010    // Run the output through a user-specified post-formatter.
13011    if (edit) {
13012      output = edit(output, originalInput);
13013    }
13014
13015    // All done.
13016    return output;
13017  }
13018
13019  // Accept a sting as input, output decoded number.
13020  function formatFrom(
13021    decimals,
13022    thousand,
13023    mark,
13024    prefix,
13025    suffix,
13026    encoder,
13027    decoder,
13028    negativeBefore,
13029    negative,
13030    edit,
13031    undo,
13032    input
13033  ) {
13034    var originalInput = input,
13035      inputIsNegative,
13036      output = "";
13037
13038    // User defined pre-decoder. Result must be a non empty string.
13039    if (undo) {
13040      input = undo(input);
13041    }
13042
13043    // Test the input. Can't be empty.
13044    if (!input || typeof input !== "string") {
13045      return false;
13046    }
13047
13048    // If the string starts with the negativeBefore value: remove it.
13049    // Remember is was there, the number is negative.
13050    if (negativeBefore && strStartsWith(input, negativeBefore)) {
13051      input = input.replace(negativeBefore, "");
13052      inputIsNegative = true;
13053    }
13054
13055    // Repeat the same procedure for the prefix.
13056    if (prefix && strStartsWith(input, prefix)) {
13057      input = input.replace(prefix, "");
13058    }
13059
13060    // And again for negative.
13061    if (negative && strStartsWith(input, negative)) {
13062      input = input.replace(negative, "");
13063      inputIsNegative = true;
13064    }
13065
13066    // Remove the suffix.
13067    // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice
13068    if (suffix && strEndsWith(input, suffix)) {
13069      input = input.slice(0, -1 * suffix.length);
13070    }
13071
13072    // Remove the thousand grouping.
13073    if (thousand) {
13074      input = input.split(thousand).join("");
13075    }
13076
13077    // Set the decimal separator back to period.
13078    if (mark) {
13079      input = input.replace(mark, ".");
13080    }
13081
13082    // Prepend the negative symbol.
13083    if (inputIsNegative) {
13084      output += "-";
13085    }
13086
13087    // Add the number
13088    output += input;
13089
13090    // Trim all non-numeric characters (allow '.' and '-');
13091    output = output.replace(/[^0-9\.\-.]/g, "");
13092
13093    // The value contains no parse-able number.
13094    if (output === "") {
13095      return false;
13096    }
13097
13098    // Covert to number.
13099    output = Number(output);
13100
13101    // Run the user-specified post-decoder.
13102    if (decoder) {
13103      output = decoder(output);
13104    }
13105
13106    // Check is the output is valid, otherwise: return false.
13107    if (!isValidNumber(output)) {
13108      return false;
13109    }
13110
13111    return output;
13112  }
13113
13114  // Framework
13115
13116  // Validate formatting options
13117  function validate(inputOptions) {
13118    var i,
13119      optionName,
13120      optionValue,
13121      filteredOptions = {};
13122
13123    if (inputOptions["suffix"] === undefined) {
13124      inputOptions["suffix"] = inputOptions["postfix"];
13125    }
13126
13127    for (i = 0; i < FormatOptions.length; i += 1) {
13128      optionName = FormatOptions[i];
13129      optionValue = inputOptions[optionName];
13130
13131      if (optionValue === undefined) {
13132        // Only default if negativeBefore isn't set.
13133        if (optionName === "negative" && !filteredOptions.negativeBefore) {
13134          filteredOptions[optionName] = "-";
13135          // Don't set a default for mark when 'thousand' is set.
13136        } else if (optionName === "mark" && filteredOptions.thousand !== ".") {
13137          filteredOptions[optionName] = ".";
13138        } else {
13139          filteredOptions[optionName] = false;
13140        }
13141
13142        // Floating points in JS are stable up to 7 decimals.
13143      } else if (optionName === "decimals") {
13144        if (optionValue >= 0 && optionValue < 8) {
13145          filteredOptions[optionName] = optionValue;
13146        } else {
13147          throw new Error(optionName);
13148        }
13149
13150        // These options, when provided, must be functions.
13151      } else if (
13152        optionName === "encoder" ||
13153        optionName === "decoder" ||
13154        optionName === "edit" ||
13155        optionName === "undo"
13156      ) {
13157        if (typeof optionValue === "function") {
13158          filteredOptions[optionName] = optionValue;
13159        } else {
13160          throw new Error(optionName);
13161        }
13162
13163        // Other options are strings.
13164      } else {
13165        if (typeof optionValue === "string") {
13166          filteredOptions[optionName] = optionValue;
13167        } else {
13168          throw new Error(optionName);
13169        }
13170      }
13171    }
13172
13173    // Some values can't be extracted from a
13174    // string if certain combinations are present.
13175    throwEqualError(filteredOptions, "mark", "thousand");
13176    throwEqualError(filteredOptions, "prefix", "negative");
13177    throwEqualError(filteredOptions, "prefix", "negativeBefore");
13178
13179    return filteredOptions;
13180  }
13181
13182  // Pass all options as function arguments
13183  function passAll(options, method, input) {
13184    var i,
13185      args = [];
13186
13187    // Add all options in order of FormatOptions
13188    for (i = 0; i < FormatOptions.length; i += 1) {
13189      args.push(options[FormatOptions[i]]);
13190    }
13191
13192    // Append the input, then call the method, presenting all
13193    // options as arguments.
13194    args.push(input);
13195    return method.apply("", args);
13196  }
13197
13198  function wNumb(options) {
13199    if (!(this instanceof wNumb)) {
13200      return new wNumb(options);
13201    }
13202
13203    if (typeof options !== "object") {
13204      return;
13205    }
13206
13207    options = validate(options);
13208
13209    // Call 'formatTo' with proper arguments.
13210    this.to = function(input) {
13211      return passAll(options, formatTo, input);
13212    };
13213
13214    // Call 'formatFrom' with proper arguments.
13215    this.from = function(input) {
13216      return passAll(options, formatFrom, input);
13217    };
13218  }
13219
13220  return wNumb;
13221});
13222
13223/*!
13224 * Select2 4.1.0-rc.0
13225 * https://select2.github.io
13226 *
13227 * Released under the MIT license
13228 * https://github.com/select2/select2/blob/master/LICENSE.md
13229 */
13230;
vendor: 18,996 bytes, lines 13230-13799
13230(function (factory) {
13231  if (typeof define === 'function' && define.amd) {
13232    // AMD. Register as an anonymous module.
13233    define(['jquery'], factory);
13234  } else if (typeof module === 'object' && module.exports) {
13235    // Node/CommonJS
13236    module.exports = function (root, jQuery) {
13237      if (jQuery === undefined) {
13238        // require('jQuery') returns a factory that requires window to
13239        // build a jQuery instance, we normalize how we use modules
13240        // that require this pattern but the window provided is a noop
13241        // if it's defined (how jquery works)
13242        if (typeof window !== 'undefined') {
13243          jQuery = require('jquery');
13244        }
13245        else {
13246          jQuery = require('jquery')(root);
13247        }
13248      }
13249      factory(jQuery);
13250      return jQuery;
13251    };
13252  } else {
13253    // Browser globals
13254    factory(jQuery);
13255  }
13256} (function (jQuery) {
13257  // This is needed so we can catch the AMD loader configuration and use it
13258  // The inner file should be wrapped (by `banner.start.js`) in a function that
13259  // returns the AMD loader references.
13260  var S2 =(function () {
13261  // Restore the Select2 AMD loader so it can be used
13262  // Needed mostly in the language files, where the loader is not inserted
13263  if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {
13264    var S2 = jQuery.fn.select2.amd;
13265  }
13266var S2;(function () { if (!S2 || !S2.requirejs) {
13267if (!S2) { S2 = {}; } else { require = S2; }
13268/**
13269 * @license almond 0.3.3 Copyright jQuery Foundation and other contributors.
13270 * Released under MIT license, http://github.com/requirejs/almond/LICENSE
13271 */
13272//Going sloppy to avoid 'use strict' string cost, but strict practices should
13273//be followed.
13274/*global setTimeout: false */
13275
13276var requirejs, require, define;
13277(function (undef) {
13278    var main, req, makeMap, handlers,
13279        defined = {},
13280        waiting = {},
13281        config = {},
13282        defining = {},
13283        hasOwn = Object.prototype.hasOwnProperty,
13284        aps = [].slice,
13285        jsSuffixRegExp = /\.js$/;
13286
13287    function hasProp(obj, prop) {
13288        return hasOwn.call(obj, prop);
13289    }
13290
13291    /**
13292     * Given a relative module name, like ./something, normalize it to
13293     * a real name that can be mapped to a path.
13294     * @param {String} name the relative name
13295     * @param {String} baseName a real name that the name arg is relative
13296     * to.
13297     * @returns {String} normalized name
13298     */
13299    function normalize(name, baseName) {
13300        var nameParts, nameSegment, mapValue, foundMap, lastIndex,
13301            foundI, foundStarMap, starI, i, j, part, normalizedBaseParts,
13302            baseParts = baseName && baseName.split("/"),
13303            map = config.map,
13304            starMap = (map && map['*']) || {};
13305
13306        //Adjust any relative paths.
13307        if (name) {
13308            name = name.split('/');
13309            lastIndex = name.length - 1;
13310
13311            // If wanting node ID compatibility, strip .js from end
13312            // of IDs. Have to do this here, and not in nameToUrl
13313            // because node allows either .js or non .js to map
13314            // to same file.
13315            if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
13316                name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
13317            }
13318
13319            // Starts with a '.' so need the baseName
13320            if (name[0].charAt(0) === '.' && baseParts) {
13321                //Convert baseName to array, and lop off the last part,
13322                //so that . matches that 'directory' and not name of the baseName's
13323                //module. For instance, baseName of 'one/two/three', maps to
13324                //'one/two/three.js', but we want the directory, 'one/two' for
13325                //this normalization.
13326                normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
13327                name = normalizedBaseParts.concat(name);
13328            }
13329
13330            //start trimDots
13331            for (i = 0; i < name.length; i++) {
13332                part = name[i];
13333                if (part === '.') {
13334                    name.splice(i, 1);
13335                    i -= 1;
13336                } else if (part === '..') {
13337                    // If at the start, or previous value is still ..,
13338                    // keep them so that when converted to a path it may
13339                    // still work when converted to a path, even though
13340                    // as an ID it is less than ideal. In larger point
13341                    // releases, may be better to just kick out an error.
13342                    if (i === 0 || (i === 1 && name[2] === '..') || name[i - 1] === '..') {
13343                        continue;
13344                    } else if (i > 0) {
13345                        name.splice(i - 1, 2);
13346                        i -= 2;
13347                    }
13348                }
13349            }
13350            //end trimDots
13351
13352            name = name.join('/');
13353        }
13354
13355        //Apply map config if available.
13356        if ((baseParts || starMap) && map) {
13357            nameParts = name.split('/');
13358
13359            for (i = nameParts.length; i > 0; i -= 1) {
13360                nameSegment = nameParts.slice(0, i).join("/");
13361
13362                if (baseParts) {
13363                    //Find the longest baseName segment match in the config.
13364                    //So, do joins on the biggest to smallest lengths of baseParts.
13365                    for (j = baseParts.length; j > 0; j -= 1) {
13366                        mapValue = map[baseParts.slice(0, j).join('/')];
13367
13368                        //baseName segment has  config, find if it has one for
13369                        //this name.
13370                        if (mapValue) {
13371                            mapValue = mapValue[nameSegment];
13372                            if (mapValue) {
13373                                //Match, update name to the new value.
13374                                foundMap = mapValue;
13375                                foundI = i;
13376                                break;
13377                            }
13378                        }
13379                    }
13380                }
13381
13382                if (foundMap) {
13383                    break;
13384                }
13385
13386                //Check for a star map match, but just hold on to it,
13387                //if there is a shorter segment match later in a matching
13388                //config, then favor over this star map.
13389                if (!foundStarMap && starMap && starMap[nameSegment]) {
13390                    foundStarMap = starMap[nameSegment];
13391                    starI = i;
13392                }
13393            }
13394
13395            if (!foundMap && foundStarMap) {
13396                foundMap = foundStarMap;
13397                foundI = starI;
13398            }
13399
13400            if (foundMap) {
13401                nameParts.splice(0, foundI, foundMap);
13402                name = nameParts.join('/');
13403            }
13404        }
13405
13406        return name;
13407    }
13408
13409    function makeRequire(relName, forceSync) {
13410        return function () {
13411            //A version of a require function that passes a moduleName
13412            //value for items that may need to
13413            //look up paths relative to the moduleName
13414            var args = aps.call(arguments, 0);
13415
13416            //If first arg is not require('string'), and there is only
13417            //one arg, it is the array form without a callback. Insert
13418            //a null so that the following concat is correct.
13419            if (typeof args[0] !== 'string' && args.length === 1) {
13420                args.push(null);
13421            }
13422            return req.apply(undef, args.concat([relName, forceSync]));
13423        };
13424    }
13425
13426    function makeNormalize(relName) {
13427        return function (name) {
13428            return normalize(name, relName);
13429        };
13430    }
13431
13432    function makeLoad(depName) {
13433        return function (value) {
13434            defined[depName] = value;
13435        };
13436    }
13437
13438    function callDep(name) {
13439        if (hasProp(waiting, name)) {
13440            var args = waiting[name];
13441            delete waiting[name];
13442            defining[name] = true;
13443            main.apply(undef, args);
13444        }
13445
13446        if (!hasProp(defined, name) && !hasProp(defining, name)) {
13447            throw new Error('No ' + name);
13448        }
13449        return defined[name];
13450    }
13451
13452    //Turns a plugin!resource to [plugin, resource]
13453    //with the plugin being undefined if the name
13454    //did not have a plugin prefix.
13455    function splitPrefix(name) {
13456        var prefix,
13457            index = name ? name.indexOf('!') : -1;
13458        if (index > -1) {
13459            prefix = name.substring(0, index);
13460            name = name.substring(index + 1, name.length);
13461        }
13462        return [prefix, name];
13463    }
13464
13465    //Creates a parts array for a relName where first part is plugin ID,
13466    //second part is resource ID. Assumes relName has already been normalized.
13467    function makeRelParts(relName) {
13468        return relName ? splitPrefix(relName) : [];
13469    }
13470
13471    /**
13472     * Makes a name map, normalizing the name, and using a plugin
13473     * for normalization if necessary. Grabs a ref to plugin
13474     * too, as an optimization.
13475     */
13476    makeMap = function (name, relParts) {
13477        var plugin,
13478            parts = splitPrefix(name),
13479            prefix = parts[0],
13480            relResourceName = relParts[1];
13481
13482        name = parts[1];
13483
13484        if (prefix) {
13485            prefix = normalize(prefix, relResourceName);
13486            plugin = callDep(prefix);
13487        }
13488
13489        //Normalize according
13490        if (prefix) {
13491            if (plugin && plugin.normalize) {
13492                name = plugin.normalize(name, makeNormalize(relResourceName));
13493            } else {
13494                name = normalize(name, relResourceName);
13495            }
13496        } else {
13497            name = normalize(name, relResourceName);
13498            parts = splitPrefix(name);
13499            prefix = parts[0];
13500            name = parts[1];
13501            if (prefix) {
13502                plugin = callDep(prefix);
13503            }
13504        }
13505
13506        //Using ridiculous property names for space reasons
13507        return {
13508            f: prefix ? prefix + '!' + name : name, //fullName
13509            n: name,
13510            pr: prefix,
13511            p: plugin
13512        };
13513    };
13514
13515    function makeConfig(name) {
13516        return function () {
13517            return (config && config.config && config.config[name]) || {};
13518        };
13519    }
13520
13521    handlers = {
13522        require: function (name) {
13523            return makeRequire(name);
13524        },
13525        exports: function (name) {
13526            var e = defined[name];
13527            if (typeof e !== 'undefined') {
13528                return e;
13529            } else {
13530                return (defined[name] = {});
13531            }
13532        },
13533        module: function (name) {
13534            return {
13535                id: name,
13536                uri: '',
13537                exports: defined[name],
13538                config: makeConfig(name)
13539            };
13540        }
13541    };
13542
13543    main = function (name, deps, callback, relName) {
13544        var cjsModule, depName, ret, map, i, relParts,
13545            args = [],
13546            callbackType = typeof callback,
13547            usingExports;
13548
13549        //Use name if no relName
13550        relName = relName || name;
13551        relParts = makeRelParts(relName);
13552
13553        //Call the callback to define the module, if necessary.
13554        if (callbackType === 'undefined' || callbackType === 'function') {
13555            //Pull out the defined dependencies and pass the ordered
13556            //values to the callback.
13557            //Default to [require, exports, module] if no deps
13558            deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;
13559            for (i = 0; i < deps.length; i += 1) {
13560                map = makeMap(deps[i], relParts);
13561                depName = map.f;
13562
13563                //Fast path CommonJS standard dependencies.
13564                if (depName === "require") {
13565                    args[i] = handlers.require(name);
13566                } else if (depName === "exports") {
13567                    //CommonJS module spec 1.1
13568                    args[i] = handlers.exports(name);
13569                    usingExports = true;
13570                } else if (depName === "module") {
13571                    //CommonJS module spec 1.1
13572                    cjsModule = args[i] = handlers.module(name);
13573                } else if (hasProp(defined, depName) ||
13574                           hasProp(waiting, depName) ||
13575                           hasProp(defining, depName)) {
13576                    args[i] = callDep(depName);
13577                } else if (map.p) {
13578                    map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});
13579                    args[i] = defined[depName];
13580                } else {
13581                    throw new Error(name + ' missing ' + depName);
13582                }
13583            }
13584
13585            ret = callback ? callback.apply(defined[name], args) : undefined;
13586
13587            if (name) {
13588                //If setting exports via "module" is in play,
13589                //favor that over return value and exports. After that,
13590                //favor a non-undefined return value over exports use.
13591                if (cjsModule && cjsModule.exports !== undef &&
13592                        cjsModule.exports !== defined[name]) {
13593                    defined[name] = cjsModule.exports;
13594                } else if (ret !== undef || !usingExports) {
13595                    //Use the return value from the function.
13596                    defined[name] = ret;
13597                }
13598            }
13599        } else if (name) {
13600            //May just be an object definition for the module. Only
13601            //worry about defining if have a module name.
13602            defined[name] = callback;
13603        }
13604    };
13605
13606    requirejs = require = req = function (deps, callback, relName, forceSync, alt) {
13607        if (typeof deps === "string") {
13608            if (handlers[deps]) {
13609                //callback in this case is really relName
13610                return handlers[deps](callback);
13611            }
13612            //Just return the module wanted. In this scenario, the
13613            //deps arg is the module name, and second arg (if passed)
13614            //is just the relName.
13615            //Normalize module name, if it contains . or ..
13616            return callDep(makeMap(deps, makeRelParts(callback)).f);
13617        } else if (!deps.splice) {
13618            //deps is a config object, not an array.
13619            config = deps;
13620            if (config.deps) {
13621                req(config.deps, config.callback);
13622            }
13623            if (!callback) {
13624                return;
13625            }
13626
13627            if (callback.splice) {
13628                //callback is an array, which means it is a dependency list.
13629                //Adjust args if there are dependencies
13630                deps = callback;
13631                callback = relName;
13632                relName = null;
13633            } else {
13634                deps = undef;
13635            }
13636        }
13637
13638        //Support require(['a'])
13639        callback = callback || function () {};
13640
13641        //If relName is a function, it is an errback handler,
13642        //so remove it.
13643        if (typeof relName === 'function') {
13644            relName = forceSync;
13645            forceSync = alt;
13646        }
13647
13648        //Simulate async callback;
13649        if (forceSync) {
13650            main(undef, deps, callback, relName);
13651        } else {
13652            //Using a non-zero value because of concern for what old browsers
13653            //do, and latest browsers "upgrade" to 4 if lower value is used:
13654            //http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:
13655            //If want a value immediately, use require('id') instead -- something
13656            //that works in almond on the global level, but not guaranteed and
13657            //unlikely to work in other AMD implementations.
13658            setTimeout(function () {
13659                main(undef, deps, callback, relName);
13660            }, 4);
13661        }
13662
13663        return req;
13664    };
13665
13666    /**
13667     * Just drops the config on the floor, but returns req in case
13668     * the config return value is used.
13669     */
13670    req.config = function (cfg) {
13671        return req(cfg);
13672    };
13673
13674    /**
13675     * Expose module registry for debugging and tooling
13676     */
13677    requirejs._defined = defined;
13678
13679    define = function (name, deps, callback) {
13680        if (typeof name !== 'string') {
13681            throw new Error('See almond README: incorrect module build, no module name');
13682        }
13683
13684        //This module may not have dependencies
13685        if (!deps.splice) {
13686            //deps is not an array, so probably means
13687            //an object literal or factory function for
13688            //the value. Adjust args.
13689            callback = deps;
13690            deps = [];
13691        }
13692
13693        if (!hasProp(defined, name) && !hasProp(waiting, name)) {
13694            waiting[name] = [name, deps, callback];
13695        }
13696    };
13697
13698    define.amd = {
13699        jQuery: true
13700    };
13701}());
13702
13703S2.requirejs = requirejs;S2.require = require;S2.define = define;
13704}
13705}());
13706S2.define("almond", function(){});
13707
13708/* global jQuery:false, $:false */
13709S2.define('jquery',[],function () {
13710  var _$ = jQuery || $;
13711
13712  if (_$ == null && console && console.error) {
13713    console.error(
13714      'Select2: An instance of jQuery or a jQuery-compatible library was not ' +
13715      'found. Make sure that you are including jQuery before Select2 on your ' +
13716      'web page.'
13717    );
13718  }
13719
13720  return _$;
13721});
13722
13723S2.define('select2/utils',[
13724  'jquery'
13725], function ($) {
13726  var Utils = {};
13727
13728  Utils.Extend = function (ChildClass, SuperClass) {
13729    var __hasProp = {}.hasOwnProperty;
13730
13731    function BaseConstructor () {
13732      this.constructor = ChildClass;
13733    }
13734
13735    for (var key in SuperClass) {
13736      if (__hasProp.call(SuperClass, key)) {
13737        ChildClass[key] = SuperClass[key];
13738      }
13739    }
13740
13741    BaseConstructor.prototype = SuperClass.prototype;
13742    ChildClass.prototype = new BaseConstructor();
13743    ChildClass.__super__ = SuperClass.prototype;
13744
13745    return ChildClass;
13746  };
13747
13748  function getMethods (theClass) {
13749    var proto = theClass.prototype;
13750
13751    var methods = [];
13752
13753    for (var methodName in proto) {
13754      var m = proto[methodName];
13755
13756      if (typeof m !== 'function') {
13757        continue;
13758      }
13759
13760      if (methodName === 'constructor') {
13761        continue;
13762      }
13763
13764      methods.push(methodName);
13765    }
13766
13767    return methods;
13768  }
13769
13770  Utils.Decorate = function (SuperClass, DecoratorClass) {
13771    var decoratedMethods = getMethods(DecoratorClass);
13772    var superMethods = getMethods(SuperClass);
13773
13774    function DecoratedClass () {
13775      var unshift = Array.prototype.unshift;
13776
13777      var argCount = DecoratorClass.prototype.constructor.length;
13778
13779      var calledConstructor = SuperClass.prototype.constructor;
13780
13781      if (argCount > 0) {
13782        unshift.call(arguments, SuperClass.prototype.constructor);
13783
13784        calledConstructor = DecoratorClass.prototype.constructor;
13785      }
13786
13787      calledConstructor.apply(this, arguments);
13788    }
13789
13790    DecoratorClass.displayName = SuperClass.displayName;
13791
13792    function ctr () {
13793      this.constructor = DecoratedClass;
13794    }
13795
13796    DecoratedClass.prototype = new ctr();
13797
13798    for (var m = 0; m < superMethods.length; m++) {
13799      
vendor: 102,497 bytes, lines 13799-18071
13799var superMethod = superMethods[m];
13800
13801      DecoratedClass.prototype[superMethod] =
13802        SuperClass.prototype[superMethod];
13803    }
13804
13805    var calledMethod = function (methodName) {
13806      // Stub out the original method if it's not decorating an actual method
13807      var originalMethod = function () {};
13808
13809      if (methodName in DecoratedClass.prototype) {
13810        originalMethod = DecoratedClass.prototype[methodName];
13811      }
13812
13813      var decoratedMethod = DecoratorClass.prototype[methodName];
13814
13815      return function () {
13816        var unshift = Array.prototype.unshift;
13817
13818        unshift.call(arguments, originalMethod);
13819
13820        return decoratedMethod.apply(this, arguments);
13821      };
13822    };
13823
13824    for (var d = 0; d < decoratedMethods.length; d++) {
13825      var decoratedMethod = decoratedMethods[d];
13826
13827      DecoratedClass.prototype[decoratedMethod] = calledMethod(decoratedMethod);
13828    }
13829
13830    return DecoratedClass;
13831  };
13832
13833  var Observable = function () {
13834    this.listeners = {};
13835  };
13836
13837  Observable.prototype.on = function (event, callback) {
13838    this.listeners = this.listeners || {};
13839
13840    if (event in this.listeners) {
13841      this.listeners[event].push(callback);
13842    } else {
13843      this.listeners[event] = [callback];
13844    }
13845  };
13846
13847  Observable.prototype.trigger = function (event) {
13848    var slice = Array.prototype.slice;
13849    var params = slice.call(arguments, 1);
13850
13851    this.listeners = this.listeners || {};
13852
13853    // Params should always come in as an array
13854    if (params == null) {
13855      params = [];
13856    }
13857
13858    // If there are no arguments to the event, use a temporary object
13859    if (params.length === 0) {
13860      params.push({});
13861    }
13862
13863    // Set the `_type` of the first object to the event
13864    params[0]._type = event;
13865
13866    if (event in this.listeners) {
13867      this.invoke(this.listeners[event], slice.call(arguments, 1));
13868    }
13869
13870    if ('*' in this.listeners) {
13871      this.invoke(this.listeners['*'], arguments);
13872    }
13873  };
13874
13875  Observable.prototype.invoke = function (listeners, params) {
13876    for (var i = 0, len = listeners.length; i < len; i++) {
13877      listeners[i].apply(this, params);
13878    }
13879  };
13880
13881  Utils.Observable = Observable;
13882
13883  Utils.generateChars = function (length) {
13884    var chars = '';
13885
13886    for (var i = 0; i < length; i++) {
13887      var randomChar = Math.floor(Math.random() * 36);
13888      chars += randomChar.toString(36);
13889    }
13890
13891    return chars;
13892  };
13893
13894  Utils.bind = function (func, context) {
13895    return function () {
13896      func.apply(context, arguments);
13897    };
13898  };
13899
13900  Utils._convertData = function (data) {
13901    for (var originalKey in data) {
13902      var keys = originalKey.split('-');
13903
13904      var dataLevel = data;
13905
13906      if (keys.length === 1) {
13907        continue;
13908      }
13909
13910      for (var k = 0; k < keys.length; k++) {
13911        var key = keys[k];
13912
13913        // Lowercase the first letter
13914        // By default, dash-separated becomes camelCase
13915        key = key.substring(0, 1).toLowerCase() + key.substring(1);
13916
13917        if (!(key in dataLevel)) {
13918          dataLevel[key] = {};
13919        }
13920
13921        if (k == keys.length - 1) {
13922          dataLevel[key] = data[originalKey];
13923        }
13924
13925        dataLevel = dataLevel[key];
13926      }
13927
13928      delete data[originalKey];
13929    }
13930
13931    return data;
13932  };
13933
13934  Utils.hasScroll = function (index, el) {
13935    // Adapted from the function created by @ShadowScripter
13936    // and adapted by @BillBarry on the Stack Exchange Code Review website.
13937    // The original code can be found at
13938    // http://codereview.stackexchange.com/q/13338
13939    // and was designed to be used with the Sizzle selector engine.
13940
13941    var $el = $(el);
13942    var overflowX = el.style.overflowX;
13943    var overflowY = el.style.overflowY;
13944
13945    //Check both x and y declarations
13946    if (overflowX === overflowY &&
13947        (overflowY === 'hidden' || overflowY === 'visible')) {
13948      return false;
13949    }
13950
13951    if (overflowX === 'scroll' || overflowY === 'scroll') {
13952      return true;
13953    }
13954
13955    return ($el.innerHeight() < el.scrollHeight ||
13956      $el.innerWidth() < el.scrollWidth);
13957  };
13958
13959  Utils.escapeMarkup = function (markup) {
13960    var replaceMap = {
13961      '\\': '&#92;',
13962      '&': '&amp;',
13963      '<': '&lt;',
13964      '>': '&gt;',
13965      '"': '&quot;',
13966      '\'': '&#39;',
13967      '/': '&#47;'
13968    };
13969
13970    // Do not try to escape the markup if it's not a string
13971    if (typeof markup !== 'string') {
13972      return markup;
13973    }
13974
13975    return String(markup).replace(/[&<>"'\/\\]/g, function (match) {
13976      return replaceMap[match];
13977    });
13978  };
13979
13980  // Cache objects in Utils.__cache instead of $.data (see #4346)
13981  Utils.__cache = {};
13982
13983  var id = 0;
13984  Utils.GetUniqueElementId = function (element) {
13985    // Get a unique element Id. If element has no id,
13986    // creates a new unique number, stores it in the id
13987    // attribute and returns the new id with a prefix.
13988    // If an id already exists, it simply returns it with a prefix.
13989
13990    var select2Id = element.getAttribute('data-select2-id');
13991
13992    if (select2Id != null) {
13993      return select2Id;
13994    }
13995
13996    // If element has id, use it.
13997    if (element.id) {
13998      select2Id = 'select2-data-' + element.id;
13999    } else {
14000      select2Id = 'select2-data-' + (++id).toString() +
14001        '-' + Utils.generateChars(4);
14002    }
14003
14004    element.setAttribute('data-select2-id', select2Id);
14005
14006    return select2Id;
14007  };
14008
14009  Utils.StoreData = function (element, name, value) {
14010    // Stores an item in the cache for a specified element.
14011    // name is the cache key.
14012    var id = Utils.GetUniqueElementId(element);
14013    if (!Utils.__cache[id]) {
14014      Utils.__cache[id] = {};
14015    }
14016
14017    Utils.__cache[id][name] = value;
14018  };
14019
14020  Utils.GetData = function (element, name) {
14021    // Retrieves a value from the cache by its key (name)
14022    // name is optional. If no name specified, return
14023    // all cache items for the specified element.
14024    // and for a specified element.
14025    var id = Utils.GetUniqueElementId(element);
14026    if (name) {
14027      if (Utils.__cache[id]) {
14028        if (Utils.__cache[id][name] != null) {
14029          return Utils.__cache[id][name];
14030        }
14031        return $(element).data(name); // Fallback to HTML5 data attribs.
14032      }
14033      return $(element).data(name); // Fallback to HTML5 data attribs.
14034    } else {
14035      return Utils.__cache[id];
14036    }
14037  };
14038
14039  Utils.RemoveData = function (element) {
14040    // Removes all cached items for a specified element.
14041    var id = Utils.GetUniqueElementId(element);
14042    if (Utils.__cache[id] != null) {
14043      delete Utils.__cache[id];
14044    }
14045
14046    element.removeAttribute('data-select2-id');
14047  };
14048
14049  Utils.copyNonInternalCssClasses = function (dest, src) {
14050    var classes;
14051
14052    var destinationClasses = dest.getAttribute('class').trim().split(/\s+/);
14053
14054    destinationClasses = destinationClasses.filter(function (clazz) {
14055      // Save all Select2 classes
14056      return clazz.indexOf('select2-') === 0;
14057    });
14058
14059    var sourceClasses = src.getAttribute('class').trim().split(/\s+/);
14060
14061    sourceClasses = sourceClasses.filter(function (clazz) {
14062      // Only copy non-Select2 classes
14063      return clazz.indexOf('select2-') !== 0;
14064    });
14065
14066    var replacements = destinationClasses.concat(sourceClasses);
14067
14068    dest.setAttribute('class', replacements.join(' '));
14069  };
14070
14071  return Utils;
14072});
14073
14074S2.define('select2/results',[
14075  'jquery',
14076  './utils'
14077], function ($, Utils) {
14078  function Results ($element, options, dataAdapter) {
14079    this.$element = $element;
14080    this.data = dataAdapter;
14081    this.options = options;
14082
14083    Results.__super__.constructor.call(this);
14084  }
14085
14086  Utils.Extend(Results, Utils.Observable);
14087
14088  Results.prototype.render = function () {
14089    var $results = $(
14090      '<ul class="select2-results__options" role="listbox"></ul>'
14091    );
14092
14093    if (this.options.get('multiple')) {
14094      $results.attr('aria-multiselectable', 'true');
14095    }
14096
14097    this.$results = $results;
14098
14099    return $results;
14100  };
14101
14102  Results.prototype.clear = function () {
14103    this.$results.empty();
14104  };
14105
14106  Results.prototype.displayMessage = function (params) {
14107    var escapeMarkup = this.options.get('escapeMarkup');
14108
14109    this.clear();
14110    this.hideLoading();
14111
14112    var $message = $(
14113      '<li role="alert" aria-live="assertive"' +
14114      ' class="select2-results__option"></li>'
14115    );
14116
14117    var message = this.options.get('translations').get(params.message);
14118
14119    $message.append(
14120      escapeMarkup(
14121        message(params.args)
14122      )
14123    );
14124
14125    $message[0].className += ' select2-results__message';
14126
14127    this.$results.append($message);
14128  };
14129
14130  Results.prototype.hideMessages = function () {
14131    this.$results.find('.select2-results__message').remove();
14132  };
14133
14134  Results.prototype.append = function (data) {
14135    this.hideLoading();
14136
14137    var $options = [];
14138
14139    if (data.results == null || data.results.length === 0) {
14140      if (this.$results.children().length === 0) {
14141        this.trigger('results:message', {
14142          message: 'noResults'
14143        });
14144      }
14145
14146      return;
14147    }
14148
14149    data.results = this.sort(data.results);
14150
14151    for (var d = 0; d < data.results.length; d++) {
14152      var item = data.results[d];
14153
14154      var $option = this.option(item);
14155
14156      $options.push($option);
14157    }
14158
14159    this.$results.append($options);
14160  };
14161
14162  Results.prototype.position = function ($results, $dropdown) {
14163    var $resultsContainer = $dropdown.find('.select2-results');
14164    $resultsContainer.append($results);
14165  };
14166
14167  Results.prototype.sort = function (data) {
14168    var sorter = this.options.get('sorter');
14169
14170    return sorter(data);
14171  };
14172
14173  Results.prototype.highlightFirstItem = function () {
14174    var $options = this.$results
14175      .find('.select2-results__option--selectable');
14176
14177    var $selected = $options.filter('.select2-results__option--selected');
14178
14179    // Check if there are any selected options
14180    if ($selected.length > 0) {
14181      // If there are selected options, highlight the first
14182      $selected.first().trigger('mouseenter');
14183    } else {
14184      // If there are no selected options, highlight the first option
14185      // in the dropdown
14186      $options.first().trigger('mouseenter');
14187    }
14188
14189    this.ensureHighlightVisible();
14190  };
14191
14192  Results.prototype.setClasses = function () {
14193    var self = this;
14194
14195    this.data.current(function (selected) {
14196      var selectedIds = selected.map(function (s) {
14197        return s.id.toString();
14198      });
14199
14200      var $options = self.$results
14201        .find('.select2-results__option--selectable');
14202
14203      $options.each(function () {
14204        var $option = $(this);
14205
14206        var item = Utils.GetData(this, 'data');
14207
14208        // id needs to be converted to a string when comparing
14209        var id = '' + item.id;
14210
14211        if ((item.element != null && item.element.selected) ||
14212            (item.element == null && selectedIds.indexOf(id) > -1)) {
14213          this.classList.add('select2-results__option--selected');
14214          $option.attr('aria-selected', 'true');
14215        } else {
14216          this.classList.remove('select2-results__option--selected');
14217          $option.attr('aria-selected', 'false');
14218        }
14219      });
14220
14221    });
14222  };
14223
14224  Results.prototype.showLoading = function (params) {
14225    this.hideLoading();
14226
14227    var loadingMore = this.options.get('translations').get('searching');
14228
14229    var loading = {
14230      disabled: true,
14231      loading: true,
14232      text: loadingMore(params)
14233    };
14234    var $loading = this.option(loading);
14235    $loading.className += ' loading-results';
14236
14237    this.$results.prepend($loading);
14238  };
14239
14240  Results.prototype.hideLoading = function () {
14241    this.$results.find('.loading-results').remove();
14242  };
14243
14244  Results.prototype.option = function (data) {
14245    var option = document.createElement('li');
14246    option.classList.add('select2-results__option');
14247    option.classList.add('select2-results__option--selectable');
14248
14249    var attrs = {
14250      'role': 'option'
14251    };
14252
14253    var matches = window.Element.prototype.matches ||
14254      window.Element.prototype.msMatchesSelector ||
14255      window.Element.prototype.webkitMatchesSelector;
14256
14257    if ((data.element != null && matches.call(data.element, ':disabled')) ||
14258        (data.element == null && data.disabled)) {
14259      attrs['aria-disabled'] = 'true';
14260
14261      option.classList.remove('select2-results__option--selectable');
14262      option.classList.add('select2-results__option--disabled');
14263    }
14264
14265    if (data.id == null) {
14266      option.classList.remove('select2-results__option--selectable');
14267    }
14268
14269    if (data._resultId != null) {
14270      option.id = data._resultId;
14271    }
14272
14273    if (data.title) {
14274      option.title = data.title;
14275    }
14276
14277    if (data.children) {
14278      attrs.role = 'group';
14279      attrs['aria-label'] = data.text;
14280
14281      option.classList.remove('select2-results__option--selectable');
14282      option.classList.add('select2-results__option--group');
14283    }
14284
14285    for (var attr in attrs) {
14286      var val = attrs[attr];
14287
14288      option.setAttribute(attr, val);
14289    }
14290
14291    if (data.children) {
14292      var $option = $(option);
14293
14294      var label = document.createElement('strong');
14295      label.className = 'select2-results__group';
14296
14297      this.template(data, label);
14298
14299      var $children = [];
14300
14301      for (var c = 0; c < data.children.length; c++) {
14302        var child = data.children[c];
14303
14304        var $child = this.option(child);
14305
14306        $children.push($child);
14307      }
14308
14309      var $childrenContainer = $('<ul></ul>', {
14310        'class': 'select2-results__options select2-results__options--nested',
14311        'role': 'none'
14312      });
14313
14314      $childrenContainer.append($children);
14315
14316      $option.append(label);
14317      $option.append($childrenContainer);
14318    } else {
14319      this.template(data, option);
14320    }
14321
14322    Utils.StoreData(option, 'data', data);
14323
14324    return option;
14325  };
14326
14327  Results.prototype.bind = function (container, $container) {
14328    var self = this;
14329
14330    var id = container.id + '-results';
14331
14332    this.$results.attr('id', id);
14333
14334    container.on('results:all', function (params) {
14335      self.clear();
14336      self.append(params.data);
14337
14338      if (container.isOpen()) {
14339        self.setClasses();
14340        self.highlightFirstItem();
14341      }
14342    });
14343
14344    container.on('results:append', function (params) {
14345      self.append(params.data);
14346
14347      if (container.isOpen()) {
14348        self.setClasses();
14349      }
14350    });
14351
14352    container.on('query', function (params) {
14353      self.hideMessages();
14354      self.showLoading(params);
14355    });
14356
14357    container.on('select', function () {
14358      if (!container.isOpen()) {
14359        return;
14360      }
14361
14362      self.setClasses();
14363
14364      if (self.options.get('scrollAfterSelect')) {
14365        self.highlightFirstItem();
14366      }
14367    });
14368
14369    container.on('unselect', function () {
14370      if (!container.isOpen()) {
14371        return;
14372      }
14373
14374      self.setClasses();
14375
14376      if (self.options.get('scrollAfterSelect')) {
14377        self.highlightFirstItem();
14378      }
14379    });
14380
14381    container.on('open', function () {
14382      // When the dropdown is open, aria-expended="true"
14383      self.$results.attr('aria-expanded', 'true');
14384      self.$results.attr('aria-hidden', 'false');
14385
14386      self.setClasses();
14387      self.ensureHighlightVisible();
14388    });
14389
14390    container.on('close', function () {
14391      // When the dropdown is closed, aria-expended="false"
14392      self.$results.attr('aria-expanded', 'false');
14393      self.$results.attr('aria-hidden', 'true');
14394      self.$results.removeAttr('aria-activedescendant');
14395    });
14396
14397    container.on('results:toggle', function () {
14398      var $highlighted = self.getHighlightedResults();
14399
14400      if ($highlighted.length === 0) {
14401        return;
14402      }
14403
14404      $highlighted.trigger('mouseup');
14405    });
14406
14407    container.on('results:select', function () {
14408      var $highlighted = self.getHighlightedResults();
14409
14410      if ($highlighted.length === 0) {
14411        return;
14412      }
14413
14414      var data = Utils.GetData($highlighted[0], 'data');
14415
14416      if ($highlighted.hasClass('select2-results__option--selected')) {
14417        self.trigger('close', {});
14418      } else {
14419        self.trigger('select', {
14420          data: data
14421        });
14422      }
14423    });
14424
14425    container.on('results:previous', function () {
14426      var $highlighted = self.getHighlightedResults();
14427
14428      var $options = self.$results.find('.select2-results__option--selectable');
14429
14430      var currentIndex = $options.index($highlighted);
14431
14432      // If we are already at the top, don't move further
14433      // If no options, currentIndex will be -1
14434      if (currentIndex <= 0) {
14435        return;
14436      }
14437
14438      var nextIndex = currentIndex - 1;
14439
14440      // If none are highlighted, highlight the first
14441      if ($highlighted.length === 0) {
14442        nextIndex = 0;
14443      }
14444
14445      var $next = $options.eq(nextIndex);
14446
14447      $next.trigger('mouseenter');
14448
14449      var currentOffset = self.$results.offset().top;
14450      var nextTop = $next.offset().top;
14451      var nextOffset = self.$results.scrollTop() + (nextTop - currentOffset);
14452
14453      if (nextIndex === 0) {
14454        self.$results.scrollTop(0);
14455      } else if (nextTop - currentOffset < 0) {
14456        self.$results.scrollTop(nextOffset);
14457      }
14458    });
14459
14460    container.on('results:next', function () {
14461      var $highlighted = self.getHighlightedResults();
14462
14463      var $options = self.$results.find('.select2-results__option--selectable');
14464
14465      var currentIndex = $options.index($highlighted);
14466
14467      var nextIndex = currentIndex + 1;
14468
14469      // If we are at the last option, stay there
14470      if (nextIndex >= $options.length) {
14471        return;
14472      }
14473
14474      var $next = $options.eq(nextIndex);
14475
14476      $next.trigger('mouseenter');
14477
14478      var currentOffset = self.$results.offset().top +
14479        self.$results.outerHeight(false);
14480      var nextBottom = $next.offset().top + $next.outerHeight(false);
14481      var nextOffset = self.$results.scrollTop() + nextBottom - currentOffset;
14482
14483      if (nextIndex === 0) {
14484        self.$results.scrollTop(0);
14485      } else if (nextBottom > currentOffset) {
14486        self.$results.scrollTop(nextOffset);
14487      }
14488    });
14489
14490    container.on('results:focus', function (params) {
14491      params.element[0].classList.add('select2-results__option--highlighted');
14492      params.element[0].setAttribute('aria-selected', 'true');
14493    });
14494
14495    container.on('results:message', function (params) {
14496      self.displayMessage(params);
14497    });
14498
14499    if ($.fn.mousewheel) {
14500      this.$results.on('mousewheel', function (e) {
14501        var top = self.$results.scrollTop();
14502
14503        var bottom = self.$results.get(0).scrollHeight - top + e.deltaY;
14504
14505        var isAtTop = e.deltaY > 0 && top - e.deltaY <= 0;
14506        var isAtBottom = e.deltaY < 0 && bottom <= self.$results.height();
14507
14508        if (isAtTop) {
14509          self.$results.scrollTop(0);
14510
14511          e.preventDefault();
14512          e.stopPropagation();
14513        } else if (isAtBottom) {
14514          self.$results.scrollTop(
14515            self.$results.get(0).scrollHeight - self.$results.height()
14516          );
14517
14518          e.preventDefault();
14519          e.stopPropagation();
14520        }
14521      });
14522    }
14523
14524    this.$results.on('mouseup', '.select2-results__option--selectable',
14525      function (evt) {
14526      var $this = $(this);
14527
14528      var data = Utils.GetData(this, 'data');
14529
14530      if ($this.hasClass('select2-results__option--selected')) {
14531        if (self.options.get('multiple')) {
14532          self.trigger('unselect', {
14533            originalEvent: evt,
14534            data: data
14535          });
14536        } else {
14537          self.trigger('close', {});
14538        }
14539
14540        return;
14541      }
14542
14543      self.trigger('select', {
14544        originalEvent: evt,
14545        data: data
14546      });
14547    });
14548
14549    this.$results.on('mouseenter', '.select2-results__option--selectable',
14550      function (evt) {
14551      var data = Utils.GetData(this, 'data');
14552
14553      self.getHighlightedResults()
14554          .removeClass('select2-results__option--highlighted')
14555          .attr('aria-selected', 'false');
14556
14557      self.trigger('results:focus', {
14558        data: data,
14559        element: $(this)
14560      });
14561    });
14562  };
14563
14564  Results.prototype.getHighlightedResults = function () {
14565    var $highlighted = this.$results
14566    .find('.select2-results__option--highlighted');
14567
14568    return $highlighted;
14569  };
14570
14571  Results.prototype.destroy = function () {
14572    this.$results.remove();
14573  };
14574
14575  Results.prototype.ensureHighlightVisible = function () {
14576    var $highlighted = this.getHighlightedResults();
14577
14578    if ($highlighted.length === 0) {
14579      return;
14580    }
14581
14582    var $options = this.$results.find('.select2-results__option--selectable');
14583
14584    var currentIndex = $options.index($highlighted);
14585
14586    var currentOffset = this.$results.offset().top;
14587    var nextTop = $highlighted.offset().top;
14588    var nextOffset = this.$results.scrollTop() + (nextTop - currentOffset);
14589
14590    var offsetDelta = nextTop - currentOffset;
14591    nextOffset -= $highlighted.outerHeight(false) * 2;
14592
14593    if (currentIndex <= 2) {
14594      this.$results.scrollTop(0);
14595    } else if (offsetDelta > this.$results.outerHeight() || offsetDelta < 0) {
14596      this.$results.scrollTop(nextOffset);
14597    }
14598  };
14599
14600  Results.prototype.template = function (result, container) {
14601    var template = this.options.get('templateResult');
14602    var escapeMarkup = this.options.get('escapeMarkup');
14603
14604    var content = template(result, container);
14605
14606    if (content == null) {
14607      container.style.display = 'none';
14608    } else if (typeof content === 'string') {
14609      container.innerHTML = escapeMarkup(content);
14610    } else {
14611      $(container).append(content);
14612    }
14613  };
14614
14615  return Results;
14616});
14617
14618S2.define('select2/keys',[
14619
14620], function () {
14621  var KEYS = {
14622    BACKSPACE: 8,
14623    TAB: 9,
14624    ENTER: 13,
14625    SHIFT: 16,
14626    CTRL: 17,
14627    ALT: 18,
14628    ESC: 27,
14629    SPACE: 32,
14630    PAGE_UP: 33,
14631    PAGE_DOWN: 34,
14632    END: 35,
14633    HOME: 36,
14634    LEFT: 37,
14635    UP: 38,
14636    RIGHT: 39,
14637    DOWN: 40,
14638    DELETE: 46
14639  };
14640
14641  return KEYS;
14642});
14643
14644S2.define('select2/selection/base',[
14645  'jquery',
14646  '../utils',
14647  '../keys'
14648], function ($, Utils, KEYS) {
14649  function BaseSelection ($element, options) {
14650    this.$element = $element;
14651    this.options = options;
14652
14653    BaseSelection.__super__.constructor.call(this);
14654  }
14655
14656  Utils.Extend(BaseSelection, Utils.Observable);
14657
14658  BaseSelection.prototype.render = function () {
14659    var $selection = $(
14660      '<span class="select2-selection" role="combobox" ' +
14661      ' aria-haspopup="true" aria-expanded="false">' +
14662      '</span>'
14663    );
14664
14665    this._tabindex = 0;
14666
14667    if (Utils.GetData(this.$element[0], 'old-tabindex') != null) {
14668      this._tabindex = Utils.GetData(this.$element[0], 'old-tabindex');
14669    } else if (this.$element.attr('tabindex') != null) {
14670      this._tabindex = this.$element.attr('tabindex');
14671    }
14672
14673    $selection.attr('title', this.$element.attr('title'));
14674    $selection.attr('tabindex', this._tabindex);
14675    $selection.attr('aria-disabled', 'false');
14676
14677    this.$selection = $selection;
14678
14679    return $selection;
14680  };
14681
14682  BaseSelection.prototype.bind = function (container, $container) {
14683    var self = this;
14684
14685    var resultsId = container.id + '-results';
14686
14687    this.container = container;
14688
14689    this.$selection.on('focus', function (evt) {
14690      self.trigger('focus', evt);
14691    });
14692
14693    this.$selection.on('blur', function (evt) {
14694      self._handleBlur(evt);
14695    });
14696
14697    this.$selection.on('keydown', function (evt) {
14698      self.trigger('keypress', evt);
14699
14700      if (evt.which === KEYS.SPACE) {
14701        evt.preventDefault();
14702      }
14703    });
14704
14705    container.on('results:focus', function (params) {
14706      self.$selection.attr('aria-activedescendant', params.data._resultId);
14707    });
14708
14709    container.on('selection:update', function (params) {
14710      self.update(params.data);
14711    });
14712
14713    container.on('open', function () {
14714      // When the dropdown is open, aria-expanded="true"
14715      self.$selection.attr('aria-expanded', 'true');
14716      self.$selection.attr('aria-owns', resultsId);
14717
14718      self._attachCloseHandler(container);
14719    });
14720
14721    container.on('close', function () {
14722      // When the dropdown is closed, aria-expanded="false"
14723      self.$selection.attr('aria-expanded', 'false');
14724      self.$selection.removeAttr('aria-activedescendant');
14725      self.$selection.removeAttr('aria-owns');
14726
14727      self.$selection.trigger('focus');
14728
14729      self._detachCloseHandler(container);
14730    });
14731
14732    container.on('enable', function () {
14733      self.$selection.attr('tabindex', self._tabindex);
14734      self.$selection.attr('aria-disabled', 'false');
14735    });
14736
14737    container.on('disable', function () {
14738      self.$selection.attr('tabindex', '-1');
14739      self.$selection.attr('aria-disabled', 'true');
14740    });
14741  };
14742
14743  BaseSelection.prototype._handleBlur = function (evt) {
14744    var self = this;
14745
14746    // This needs to be delayed as the active element is the body when the tab
14747    // key is pressed, possibly along with others.
14748    window.setTimeout(function () {
14749      // Don't trigger `blur` if the focus is still in the selection
14750      if (
14751        (document.activeElement == self.$selection[0]) ||
14752        ($.contains(self.$selection[0], document.activeElement))
14753      ) {
14754        return;
14755      }
14756
14757      self.trigger('blur', evt);
14758    }, 1);
14759  };
14760
14761  BaseSelection.prototype._attachCloseHandler = function (container) {
14762
14763    $(document.body).on('mousedown.select2.' + container.id, function (e) {
14764      var $target = $(e.target);
14765
14766      var $select = $target.closest('.select2');
14767
14768      var $all = $('.select2.select2-container--open');
14769
14770      $all.each(function () {
14771        if (this == $select[0]) {
14772          return;
14773        }
14774
14775        var $element = Utils.GetData(this, 'element');
14776
14777        $element.select2('close');
14778      });
14779    });
14780  };
14781
14782  BaseSelection.prototype._detachCloseHandler = function (container) {
14783    $(document.body).off('mousedown.select2.' + container.id);
14784  };
14785
14786  BaseSelection.prototype.position = function ($selection, $container) {
14787    var $selectionContainer = $container.find('.selection');
14788    $selectionContainer.append($selection);
14789  };
14790
14791  BaseSelection.prototype.destroy = function () {
14792    this._detachCloseHandler(this.container);
14793  };
14794
14795  BaseSelection.prototype.update = function (data) {
14796    throw new Error('The `update` method must be defined in child classes.');
14797  };
14798
14799  /**
14800   * Helper method to abstract the "enabled" (not "disabled") state of this
14801   * object.
14802   *
14803   * @return {true} if the instance is not disabled.
14804   * @return {false} if the instance is disabled.
14805   */
14806  BaseSelection.prototype.isEnabled = function () {
14807    return !this.isDisabled();
14808  };
14809
14810  /**
14811   * Helper method to abstract the "disabled" state of this object.
14812   *
14813   * @return {true} if the disabled option is true.
14814   * @return {false} if the disabled option is false.
14815   */
14816  BaseSelection.prototype.isDisabled = function () {
14817    return this.options.get('disabled');
14818  };
14819
14820  return BaseSelection;
14821});
14822
14823S2.define('select2/selection/single',[
14824  'jquery',
14825  './base',
14826  '../utils',
14827  '../keys'
14828], function ($, BaseSelection, Utils, KEYS) {
14829  function SingleSelection () {
14830    SingleSelection.__super__.constructor.apply(this, arguments);
14831  }
14832
14833  Utils.Extend(SingleSelection, BaseSelection);
14834
14835  SingleSelection.prototype.render = function () {
14836    var $selection = SingleSelection.__super__.render.call(this);
14837
14838    $selection[0].classList.add('select2-selection--single');
14839
14840    $selection.html(
14841      '<span class="select2-selection__rendered"></span>' +
14842      '<span class="select2-selection__arrow" role="presentation">' +
14843        '<b role="presentation"></b>' +
14844      '</span>'
14845    );
14846
14847    return $selection;
14848  };
14849
14850  SingleSelection.prototype.bind = function (container, $container) {
14851    var self = this;
14852
14853    SingleSelection.__super__.bind.apply(this, arguments);
14854
14855    var id = container.id + '-container';
14856
14857    this.$selection.find('.select2-selection__rendered')
14858      .attr('id', id)
14859      .attr('role', 'textbox')
14860      .attr('aria-readonly', 'true');
14861    this.$selection.attr('aria-labelledby', id);
14862    this.$selection.attr('aria-controls', id);
14863
14864    this.$selection.on('mousedown', function (evt) {
14865      // Only respond to left clicks
14866      if (evt.which !== 1) {
14867        return;
14868      }
14869
14870      self.trigger('toggle', {
14871        originalEvent: evt
14872      });
14873    });
14874
14875    this.$selection.on('focus', function (evt) {
14876      // User focuses on the container
14877    });
14878
14879    this.$selection.on('blur', function (evt) {
14880      // User exits the container
14881    });
14882
14883    container.on('focus', function (evt) {
14884      if (!container.isOpen()) {
14885        self.$selection.trigger('focus');
14886      }
14887    });
14888  };
14889
14890  SingleSelection.prototype.clear = function () {
14891    var $rendered = this.$selection.find('.select2-selection__rendered');
14892    $rendered.empty();
14893    $rendered.removeAttr('title'); // clear tooltip on empty
14894  };
14895
14896  SingleSelection.prototype.display = function (data, container) {
14897    var template = this.options.get('templateSelection');
14898    var escapeMarkup = this.options.get('escapeMarkup');
14899
14900    return escapeMarkup(template(data, container));
14901  };
14902
14903  SingleSelection.prototype.selectionContainer = function () {
14904    return $('<span></span>');
14905  };
14906
14907  SingleSelection.prototype.update = function (data) {
14908    if (data.length === 0) {
14909      this.clear();
14910      return;
14911    }
14912
14913    var selection = data[0];
14914
14915    var $rendered = this.$selection.find('.select2-selection__rendered');
14916    var formatted = this.display(selection, $rendered);
14917
14918    $rendered.empty().append(formatted);
14919
14920    var title = selection.title || selection.text;
14921
14922    if (title) {
14923      $rendered.attr('title', title);
14924    } else {
14925      $rendered.removeAttr('title');
14926    }
14927  };
14928
14929  return SingleSelection;
14930});
14931
14932S2.define('select2/selection/multiple',[
14933  'jquery',
14934  './base',
14935  '../utils'
14936], function ($, BaseSelection, Utils) {
14937  function MultipleSelection ($element, options) {
14938    MultipleSelection.__super__.constructor.apply(this, arguments);
14939  }
14940
14941  Utils.Extend(MultipleSelection, BaseSelection);
14942
14943  MultipleSelection.prototype.render = function () {
14944    var $selection = MultipleSelection.__super__.render.call(this);
14945
14946    $selection[0].classList.add('select2-selection--multiple');
14947
14948    $selection.html(
14949      '<ul class="select2-selection__rendered"></ul>'
14950    );
14951
14952    return $selection;
14953  };
14954
14955  MultipleSelection.prototype.bind = function (container, $container) {
14956    var self = this;
14957
14958    MultipleSelection.__super__.bind.apply(this, arguments);
14959
14960    var id = container.id + '-container';
14961    this.$selection.find('.select2-selection__rendered').attr('id', id);
14962
14963    this.$selection.on('click', function (evt) {
14964      self.trigger('toggle', {
14965        originalEvent: evt
14966      });
14967    });
14968
14969    this.$selection.on(
14970      'click',
14971      '.select2-selection__choice__remove',
14972      function (evt) {
14973        // Ignore the event if it is disabled
14974        if (self.isDisabled()) {
14975          return;
14976        }
14977
14978        var $remove = $(this);
14979        var $selection = $remove.parent();
14980
14981        var data = Utils.GetData($selection[0], 'data');
14982
14983        self.trigger('unselect', {
14984          originalEvent: evt,
14985          data: data
14986        });
14987      }
14988    );
14989
14990    this.$selection.on(
14991      'keydown',
14992      '.select2-selection__choice__remove',
14993      function (evt) {
14994        // Ignore the event if it is disabled
14995        if (self.isDisabled()) {
14996          return;
14997        }
14998
14999        evt.stopPropagation();
15000      }
15001    );
15002  };
15003
15004  MultipleSelection.prototype.clear = function () {
15005    var $rendered = this.$selection.find('.select2-selection__rendered');
15006    $rendered.empty();
15007    $rendered.removeAttr('title');
15008  };
15009
15010  MultipleSelection.prototype.display = function (data, container) {
15011    var template = this.options.get('templateSelection');
15012    var escapeMarkup = this.options.get('escapeMarkup');
15013
15014    return escapeMarkup(template(data, container));
15015  };
15016
15017  MultipleSelection.prototype.selectionContainer = function () {
15018    var $container = $(
15019      '<li class="select2-selection__choice">' +
15020        '<button type="button" class="select2-selection__choice__remove" ' +
15021        'tabindex="-1">' +
15022          '<span aria-hidden="true">&times;</span>' +
15023        '</button>' +
15024        '<span class="select2-selection__choice__display"></span>' +
15025      '</li>'
15026    );
15027
15028    return $container;
15029  };
15030
15031  MultipleSelection.prototype.update = function (data) {
15032    this.clear();
15033
15034    if (data.length === 0) {
15035      return;
15036    }
15037
15038    var $selections = [];
15039
15040    var selectionIdPrefix = this.$selection.find('.select2-selection__rendered')
15041      .attr('id') + '-choice-';
15042
15043    for (var d = 0; d < data.length; d++) {
15044      var selection = data[d];
15045
15046      var $selection = this.selectionContainer();
15047      var formatted = this.display(selection, $selection);
15048
15049      var selectionId = selectionIdPrefix + Utils.generateChars(4) + '-';
15050
15051      if (selection.id) {
15052        selectionId += selection.id;
15053      } else {
15054        selectionId += Utils.generateChars(4);
15055      }
15056
15057      $selection.find('.select2-selection__choice__display')
15058        .append(formatted)
15059        .attr('id', selectionId);
15060
15061      var title = selection.title || selection.text;
15062
15063      if (title) {
15064        $selection.attr('title', title);
15065      }
15066
15067      var removeItem = this.options.get('translations').get('removeItem');
15068
15069      var $remove = $selection.find('.select2-selection__choice__remove');
15070
15071      $remove.attr('title', removeItem());
15072      $remove.attr('aria-label', removeItem());
15073      $remove.attr('aria-describedby', selectionId);
15074
15075      Utils.StoreData($selection[0], 'data', selection);
15076
15077      $selections.push($selection);
15078    }
15079
15080    var $rendered = this.$selection.find('.select2-selection__rendered');
15081
15082    $rendered.append($selections);
15083  };
15084
15085  return MultipleSelection;
15086});
15087
15088S2.define('select2/selection/placeholder',[
15089
15090], function () {
15091  function Placeholder (decorated, $element, options) {
15092    this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
15093
15094    decorated.call(this, $element, options);
15095  }
15096
15097  Placeholder.prototype.normalizePlaceholder = function (_, placeholder) {
15098    if (typeof placeholder === 'string') {
15099      placeholder = {
15100        id: '',
15101        text: placeholder
15102      };
15103    }
15104
15105    return placeholder;
15106  };
15107
15108  Placeholder.prototype.createPlaceholder = function (decorated, placeholder) {
15109    var $placeholder = this.selectionContainer();
15110
15111    $placeholder.html(this.display(placeholder));
15112    $placeholder[0].classList.add('select2-selection__placeholder');
15113    $placeholder[0].classList.remove('select2-selection__choice');
15114
15115    var placeholderTitle = placeholder.title ||
15116      placeholder.text ||
15117      $placeholder.text();
15118
15119    this.$selection.find('.select2-selection__rendered').attr(
15120      'title',
15121      placeholderTitle
15122    );
15123
15124    return $placeholder;
15125  };
15126
15127  Placeholder.prototype.update = function (decorated, data) {
15128    var singlePlaceholder = (
15129      data.length == 1 && data[0].id != this.placeholder.id
15130    );
15131    var multipleSelections = data.length > 1;
15132
15133    if (multipleSelections || singlePlaceholder) {
15134      return decorated.call(this, data);
15135    }
15136
15137    this.clear();
15138
15139    var $placeholder = this.createPlaceholder(this.placeholder);
15140
15141    this.$selection.find('.select2-selection__rendered').append($placeholder);
15142  };
15143
15144  return Placeholder;
15145});
15146
15147S2.define('select2/selection/allowClear',[
15148  'jquery',
15149  '../keys',
15150  '../utils'
15151], function ($, KEYS, Utils) {
15152  function AllowClear () { }
15153
15154  AllowClear.prototype.bind = function (decorated, container, $container) {
15155    var self = this;
15156
15157    decorated.call(this, container, $container);
15158
15159    if (this.placeholder == null) {
15160      if (this.options.get('debug') && window.console && console.error) {
15161        console.error(
15162          'Select2: The `allowClear` option should be used in combination ' +
15163          'with the `placeholder` option.'
15164        );
15165      }
15166    }
15167
15168    this.$selection.on('mousedown', '.select2-selection__clear',
15169      function (evt) {
15170        self._handleClear(evt);
15171    });
15172
15173    container.on('keypress', function (evt) {
15174      self._handleKeyboardClear(evt, container);
15175    });
15176  };
15177
15178  AllowClear.prototype._handleClear = function (_, evt) {
15179    // Ignore the event if it is disabled
15180    if (this.isDisabled()) {
15181      return;
15182    }
15183
15184    var $clear = this.$selection.find('.select2-selection__clear');
15185
15186    // Ignore the event if nothing has been selected
15187    if ($clear.length === 0) {
15188      return;
15189    }
15190
15191    evt.stopPropagation();
15192
15193    var data = Utils.GetData($clear[0], 'data');
15194
15195    var previousVal = this.$element.val();
15196    this.$element.val(this.placeholder.id);
15197
15198    var unselectData = {
15199      data: data
15200    };
15201    this.trigger('clear', unselectData);
15202    if (unselectData.prevented) {
15203      this.$element.val(previousVal);
15204      return;
15205    }
15206
15207    for (var d = 0; d < data.length; d++) {
15208      unselectData = {
15209        data: data[d]
15210      };
15211
15212      // Trigger the `unselect` event, so people can prevent it from being
15213      // cleared.
15214      this.trigger('unselect', unselectData);
15215
15216      // If the event was prevented, don't clear it out.
15217      if (unselectData.prevented) {
15218        this.$element.val(previousVal);
15219        return;
15220      }
15221    }
15222
15223    this.$element.trigger('input').trigger('change');
15224
15225    this.trigger('toggle', {});
15226  };
15227
15228  AllowClear.prototype._handleKeyboardClear = function (_, evt, container) {
15229    if (container.isOpen()) {
15230      return;
15231    }
15232
15233    if (evt.which == KEYS.DELETE || evt.which == KEYS.BACKSPACE) {
15234      this._handleClear(evt);
15235    }
15236  };
15237
15238  AllowClear.prototype.update = function (decorated, data) {
15239    decorated.call(this, data);
15240
15241    this.$selection.find('.select2-selection__clear').remove();
15242    this.$selection[0].classList.remove('select2-selection--clearable');
15243
15244    if (this.$selection.find('.select2-selection__placeholder').length > 0 ||
15245        data.length === 0) {
15246      return;
15247    }
15248
15249    var selectionId = this.$selection.find('.select2-selection__rendered')
15250      .attr('id');
15251
15252    var removeAll = this.options.get('translations').get('removeAllItems');
15253
15254    var $remove = $(
15255      '<button type="button" class="select2-selection__clear" tabindex="-1">' +
15256        '<span aria-hidden="true">&times;</span>' +
15257      '</button>'
15258    );
15259    $remove.attr('title', removeAll());
15260    $remove.attr('aria-label', removeAll());
15261    $remove.attr('aria-describedby', selectionId);
15262    Utils.StoreData($remove[0], 'data', data);
15263
15264    this.$selection.prepend($remove);
15265    this.$selection[0].classList.add('select2-selection--clearable');
15266  };
15267
15268  return AllowClear;
15269});
15270
15271S2.define('select2/selection/search',[
15272  'jquery',
15273  '../utils',
15274  '../keys'
15275], function ($, Utils, KEYS) {
15276  function Search (decorated, $element, options) {
15277    decorated.call(this, $element, options);
15278  }
15279
15280  Search.prototype.render = function (decorated) {
15281    var searchLabel = this.options.get('translations').get('search');
15282    var $search = $(
15283      '<span class="select2-search select2-search--inline">' +
15284        '<textarea class="select2-search__field"'+
15285        ' type="search" tabindex="-1"' +
15286        ' autocorrect="off" autocapitalize="none"' +
15287        ' spellcheck="false" role="searchbox" aria-autocomplete="list" >' +
15288        '</textarea>' +
15289      '</span>'
15290    );
15291
15292    this.$searchContainer = $search;
15293    this.$search = $search.find('textarea');
15294
15295    this.$search.prop('autocomplete', this.options.get('autocomplete'));
15296    this.$search.attr('aria-label', searchLabel());
15297
15298    var $rendered = decorated.call(this);
15299
15300    this._transferTabIndex();
15301    $rendered.append(this.$searchContainer);
15302
15303    return $rendered;
15304  };
15305
15306  Search.prototype.bind = function (decorated, container, $container) {
15307    var self = this;
15308
15309    var resultsId = container.id + '-results';
15310    var selectionId = container.id + '-container';
15311
15312    decorated.call(this, container, $container);
15313
15314    self.$search.attr('aria-describedby', selectionId);
15315
15316    container.on('open', function () {
15317      self.$search.attr('aria-controls', resultsId);
15318      self.$search.trigger('focus');
15319    });
15320
15321    container.on('close', function () {
15322      self.$search.val('');
15323      self.resizeSearch();
15324      self.$search.removeAttr('aria-controls');
15325      self.$search.removeAttr('aria-activedescendant');
15326      self.$search.trigger('focus');
15327    });
15328
15329    container.on('enable', function () {
15330      self.$search.prop('disabled', false);
15331
15332      self._transferTabIndex();
15333    });
15334
15335    container.on('disable', function () {
15336      self.$search.prop('disabled', true);
15337    });
15338
15339    container.on('focus', function (evt) {
15340      self.$search.trigger('focus');
15341    });
15342
15343    container.on('results:focus', function (params) {
15344      if (params.data._resultId) {
15345        self.$search.attr('aria-activedescendant', params.data._resultId);
15346      } else {
15347        self.$search.removeAttr('aria-activedescendant');
15348      }
15349    });
15350
15351    this.$selection.on('focusin', '.select2-search--inline', function (evt) {
15352      self.trigger('focus', evt);
15353    });
15354
15355    this.$selection.on('focusout', '.select2-search--inline', function (evt) {
15356      self._handleBlur(evt);
15357    });
15358
15359    this.$selection.on('keydown', '.select2-search--inline', function (evt) {
15360      evt.stopPropagation();
15361
15362      self.trigger('keypress', evt);
15363
15364      self._keyUpPrevented = evt.isDefaultPrevented();
15365
15366      var key = evt.which;
15367
15368      if (key === KEYS.BACKSPACE && self.$search.val() === '') {
15369        var $previousChoice = self.$selection
15370          .find('.select2-selection__choice').last();
15371
15372        if ($previousChoice.length > 0) {
15373          var item = Utils.GetData($previousChoice[0], 'data');
15374
15375          self.searchRemoveChoice(item);
15376
15377          evt.preventDefault();
15378        }
15379      }
15380    });
15381
15382    this.$selection.on('click', '.select2-search--inline', function (evt) {
15383      if (self.$search.val()) {
15384        evt.stopPropagation();
15385      }
15386    });
15387
15388    // Try to detect the IE version should the `documentMode` property that
15389    // is stored on the document. This is only implemented in IE and is
15390    // slightly cleaner than doing a user agent check.
15391    // This property is not available in Edge, but Edge also doesn't have
15392    // this bug.
15393    var msie = document.documentMode;
15394    var disableInputEvents = msie && msie <= 11;
15395
15396    // Workaround for browsers which do not support the `input` event
15397    // This will prevent double-triggering of events for browsers which support
15398    // both the `keyup` and `input` events.
15399    this.$selection.on(
15400      'input.searchcheck',
15401      '.select2-search--inline',
15402      function (evt) {
15403        // IE will trigger the `input` event when a placeholder is used on a
15404        // search box. To get around this issue, we are forced to ignore all
15405        // `input` events in IE and keep using `keyup`.
15406        if (disableInputEvents) {
15407          self.$selection.off('input.search input.searchcheck');
15408          return;
15409        }
15410
15411        // Unbind the duplicated `keyup` event
15412        self.$selection.off('keyup.search');
15413      }
15414    );
15415
15416    this.$selection.on(
15417      'keyup.search input.search',
15418      '.select2-search--inline',
15419      function (evt) {
15420        // IE will trigger the `input` event when a placeholder is used on a
15421        // search box. To get around this issue, we are forced to ignore all
15422        // `input` events in IE and keep using `keyup`.
15423        if (disableInputEvents && evt.type === 'input') {
15424          self.$selection.off('input.search input.searchcheck');
15425          return;
15426        }
15427
15428        var key = evt.which;
15429
15430        // We can freely ignore events from modifier keys
15431        if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) {
15432          return;
15433        }
15434
15435        // Tabbing will be handled during the `keydown` phase
15436        if (key == KEYS.TAB) {
15437          return;
15438        }
15439
15440        self.handleSearch(evt);
15441      }
15442    );
15443  };
15444
15445  /**
15446   * This method will transfer the tabindex attribute from the rendered
15447   * selection to the search box. This allows for the search box to be used as
15448   * the primary focus instead of the selection container.
15449   *
15450   * @private
15451   */
15452  Search.prototype._transferTabIndex = function (decorated) {
15453    this.$search.attr('tabindex', this.$selection.attr('tabindex'));
15454    this.$selection.attr('tabindex', '-1');
15455  };
15456
15457  Search.prototype.createPlaceholder = function (decorated, placeholder) {
15458    this.$search.attr('placeholder', placeholder.text);
15459  };
15460
15461  Search.prototype.update = function (decorated, data) {
15462    var searchHadFocus = this.$search[0] == document.activeElement;
15463
15464    this.$search.attr('placeholder', '');
15465
15466    decorated.call(this, data);
15467
15468    this.resizeSearch();
15469    if (searchHadFocus) {
15470      this.$search.trigger('focus');
15471    }
15472  };
15473
15474  Search.prototype.handleSearch = function () {
15475    this.resizeSearch();
15476
15477    if (!this._keyUpPrevented) {
15478      var input = this.$search.val();
15479
15480      this.trigger('query', {
15481        term: input
15482      });
15483    }
15484
15485    this._keyUpPrevented = false;
15486  };
15487
15488  Search.prototype.searchRemoveChoice = function (decorated, item) {
15489    this.trigger('unselect', {
15490      data: item
15491    });
15492
15493    this.$search.val(item.text);
15494    this.handleSearch();
15495  };
15496
15497  Search.prototype.resizeSearch = function () {
15498    this.$search.css('width', '25px');
15499
15500    var width = '100%';
15501
15502    if (this.$search.attr('placeholder') === '') {
15503      var minimumWidth = this.$search.val().length + 1;
15504
15505      width = (minimumWidth * 0.75) + 'em';
15506    }
15507
15508    this.$search.css('width', width);
15509  };
15510
15511  return Search;
15512});
15513
15514S2.define('select2/selection/selectionCss',[
15515  '../utils'
15516], function (Utils) {
15517  function SelectionCSS () { }
15518
15519  SelectionCSS.prototype.render = function (decorated) {
15520    var $selection = decorated.call(this);
15521
15522    var selectionCssClass = this.options.get('selectionCssClass') || '';
15523
15524    if (selectionCssClass.indexOf(':all:') !== -1) {
15525      selectionCssClass = selectionCssClass.replace(':all:', '');
15526
15527      Utils.copyNonInternalCssClasses($selection[0], this.$element[0]);
15528    }
15529
15530    $selection.addClass(selectionCssClass);
15531
15532    return $selection;
15533  };
15534
15535  return SelectionCSS;
15536});
15537
15538S2.define('select2/selection/eventRelay',[
15539  'jquery'
15540], function ($) {
15541  function EventRelay () { }
15542
15543  EventRelay.prototype.bind = function (decorated, container, $container) {
15544    var self = this;
15545    var relayEvents = [
15546      'open', 'opening',
15547      'close', 'closing',
15548      'select', 'selecting',
15549      'unselect', 'unselecting',
15550      'clear', 'clearing'
15551    ];
15552
15553    var preventableEvents = [
15554      'opening', 'closing', 'selecting', 'unselecting', 'clearing'
15555    ];
15556
15557    decorated.call(this, container, $container);
15558
15559    container.on('*', function (name, params) {
15560      // Ignore events that should not be relayed
15561      if (relayEvents.indexOf(name) === -1) {
15562        return;
15563      }
15564
15565      // The parameters should always be an object
15566      params = params || {};
15567
15568      // Generate the jQuery event for the Select2 event
15569      var evt = $.Event('select2:' + name, {
15570        params: params
15571      });
15572
15573      self.$element.trigger(evt);
15574
15575      // Only handle preventable events if it was one
15576      if (preventableEvents.indexOf(name) === -1) {
15577        return;
15578      }
15579
15580      params.prevented = evt.isDefaultPrevented();
15581    });
15582  };
15583
15584  return EventRelay;
15585});
15586
15587S2.define('select2/translation',[
15588  'jquery',
15589  'require'
15590], function ($, require) {
15591  function Translation (dict) {
15592    this.dict = dict || {};
15593  }
15594
15595  Translation.prototype.all = function () {
15596    return this.dict;
15597  };
15598
15599  Translation.prototype.get = function (key) {
15600    return this.dict[key];
15601  };
15602
15603  Translation.prototype.extend = function (translation) {
15604    this.dict = $.extend({}, translation.all(), this.dict);
15605  };
15606
15607  // Static functions
15608
15609  Translation._cache = {};
15610
15611  Translation.loadPath = function (path) {
15612    if (!(path in Translation._cache)) {
15613      var translations = require(path);
15614
15615      Translation._cache[path] = translations;
15616    }
15617
15618    return new Translation(Translation._cache[path]);
15619  };
15620
15621  return Translation;
15622});
15623
15624S2.define('select2/diacritics',[
15625
15626], function () {
15627  var diacritics = {
15628    '\u24B6': 'A',
15629    '\uFF21': 'A',
15630    '\u00C0': 'A',
15631    '\u00C1': 'A',
15632    '\u00C2': 'A',
15633    '\u1EA6': 'A',
15634    '\u1EA4': 'A',
15635    '\u1EAA': 'A',
15636    '\u1EA8': 'A',
15637    '\u00C3': 'A',
15638    '\u0100': 'A',
15639    '\u0102': 'A',
15640    '\u1EB0': 'A',
15641    '\u1EAE': 'A',
15642    '\u1EB4': 'A',
15643    '\u1EB2': 'A',
15644    '\u0226': 'A',
15645    '\u01E0': 'A',
15646    '\u00C4': 'A',
15647    '\u01DE': 'A',
15648    '\u1EA2': 'A',
15649    '\u00C5': 'A',
15650    '\u01FA': 'A',
15651    '\u01CD': 'A',
15652    '\u0200': 'A',
15653    '\u0202': 'A',
15654    '\u1EA0': 'A',
15655    '\u1EAC': 'A',
15656    '\u1EB6': 'A',
15657    '\u1E00': 'A',
15658    '\u0104': 'A',
15659    '\u023A': 'A',
15660    '\u2C6F': 'A',
15661    '\uA732': 'AA',
15662    '\u00C6': 'AE',
15663    '\u01FC': 'AE',
15664    '\u01E2': 'AE',
15665    '\uA734': 'AO',
15666    '\uA736': 'AU',
15667    '\uA738': 'AV',
15668    '\uA73A': 'AV',
15669    '\uA73C': 'AY',
15670    '\u24B7': 'B',
15671    '\uFF22': 'B',
15672    '\u1E02': 'B',
15673    '\u1E04': 'B',
15674    '\u1E06': 'B',
15675    '\u0243': 'B',
15676    '\u0182': 'B',
15677    '\u0181': 'B',
15678    '\u24B8': 'C',
15679    '\uFF23': 'C',
15680    '\u0106': 'C',
15681    '\u0108': 'C',
15682    '\u010A': 'C',
15683    '\u010C': 'C',
15684    '\u00C7': 'C',
15685    '\u1E08': 'C',
15686    '\u0187': 'C',
15687    '\u023B': 'C',
15688    '\uA73E': 'C',
15689    '\u24B9': 'D',
15690    '\uFF24': 'D',
15691    '\u1E0A': 'D',
15692    '\u010E': 'D',
15693    '\u1E0C': 'D',
15694    '\u1E10': 'D',
15695    '\u1E12': 'D',
15696    '\u1E0E': 'D',
15697    '\u0110': 'D',
15698    '\u018B': 'D',
15699    '\u018A': 'D',
15700    '\u0189': 'D',
15701    '\uA779': 'D',
15702    '\u01F1': 'DZ',
15703    '\u01C4': 'DZ',
15704    '\u01F2': 'Dz',
15705    '\u01C5': 'Dz',
15706    '\u24BA': 'E',
15707    '\uFF25': 'E',
15708    '\u00C8': 'E',
15709    '\u00C9': 'E',
15710    '\u00CA': 'E',
15711    '\u1EC0': 'E',
15712    '\u1EBE': 'E',
15713    '\u1EC4': 'E',
15714    '\u1EC2': 'E',
15715    '\u1EBC': 'E',
15716    '\u0112': 'E',
15717    '\u1E14': 'E',
15718    '\u1E16': 'E',
15719    '\u0114': 'E',
15720    '\u0116': 'E',
15721    '\u00CB': 'E',
15722    '\u1EBA': 'E',
15723    '\u011A': 'E',
15724    '\u0204': 'E',
15725    '\u0206': 'E',
15726    '\u1EB8': 'E',
15727    '\u1EC6': 'E',
15728    '\u0228': 'E',
15729    '\u1E1C': 'E',
15730    '\u0118': 'E',
15731    '\u1E18': 'E',
15732    '\u1E1A': 'E',
15733    '\u0190': 'E',
15734    '\u018E': 'E',
15735    '\u24BB': 'F',
15736    '\uFF26': 'F',
15737    '\u1E1E': 'F',
15738    '\u0191': 'F',
15739    '\uA77B': 'F',
15740    '\u24BC': 'G',
15741    '\uFF27': 'G',
15742    '\u01F4': 'G',
15743    '\u011C': 'G',
15744    '\u1E20': 'G',
15745    '\u011E': 'G',
15746    '\u0120': 'G',
15747    '\u01E6': 'G',
15748    '\u0122': 'G',
15749    '\u01E4': 'G',
15750    '\u0193': 'G',
15751    '\uA7A0': 'G',
15752    '\uA77D': 'G',
15753    '\uA77E': 'G',
15754    '\u24BD': 'H',
15755    '\uFF28': 'H',
15756    '\u0124': 'H',
15757    '\u1E22': 'H',
15758    '\u1E26': 'H',
15759    '\u021E': 'H',
15760    '\u1E24': 'H',
15761    '\u1E28': 'H',
15762    '\u1E2A': 'H',
15763    '\u0126': 'H',
15764    '\u2C67': 'H',
15765    '\u2C75': 'H',
15766    '\uA78D': 'H',
15767    '\u24BE': 'I',
15768    '\uFF29': 'I',
15769    '\u00CC': 'I',
15770    '\u00CD': 'I',
15771    '\u00CE': 'I',
15772    '\u0128': 'I',
15773    '\u012A': 'I',
15774    '\u012C': 'I',
15775    '\u0130': 'I',
15776    '\u00CF': 'I',
15777    '\u1E2E': 'I',
15778    '\u1EC8': 'I',
15779    '\u01CF': 'I',
15780    '\u0208': 'I',
15781    '\u020A': 'I',
15782    '\u1ECA': 'I',
15783    '\u012E': 'I',
15784    '\u1E2C': 'I',
15785    '\u0197': 'I',
15786    '\u24BF': 'J',
15787    '\uFF2A': 'J',
15788    '\u0134': 'J',
15789    '\u0248': 'J',
15790    '\u24C0': 'K',
15791    '\uFF2B': 'K',
15792    '\u1E30': 'K',
15793    '\u01E8': 'K',
15794    '\u1E32': 'K',
15795    '\u0136': 'K',
15796    '\u1E34': 'K',
15797    '\u0198': 'K',
15798    '\u2C69': 'K',
15799    '\uA740': 'K',
15800    '\uA742': 'K',
15801    '\uA744': 'K',
15802    '\uA7A2': 'K',
15803    '\u24C1': 'L',
15804    '\uFF2C': 'L',
15805    '\u013F': 'L',
15806    '\u0139': 'L',
15807    '\u013D': 'L',
15808    '\u1E36': 'L',
15809    '\u1E38': 'L',
15810    '\u013B': 'L',
15811    '\u1E3C': 'L',
15812    '\u1E3A': 'L',
15813    '\u0141': 'L',
15814    '\u023D': 'L',
15815    '\u2C62': 'L',
15816    '\u2C60': 'L',
15817    '\uA748': 'L',
15818    '\uA746': 'L',
15819    '\uA780': 'L',
15820    '\u01C7': 'LJ',
15821    '\u01C8': 'Lj',
15822    '\u24C2': 'M',
15823    '\uFF2D': 'M',
15824    '\u1E3E': 'M',
15825    '\u1E40': 'M',
15826    '\u1E42': 'M',
15827    '\u2C6E': 'M',
15828    '\u019C': 'M',
15829    '\u24C3': 'N',
15830    '\uFF2E': 'N',
15831    '\u01F8': 'N',
15832    '\u0143': 'N',
15833    '\u00D1': 'N',
15834    '\u1E44': 'N',
15835    '\u0147': 'N',
15836    '\u1E46': 'N',
15837    '\u0145': 'N',
15838    '\u1E4A': 'N',
15839    '\u1E48': 'N',
15840    '\u0220': 'N',
15841    '\u019D': 'N',
15842    '\uA790': 'N',
15843    '\uA7A4': 'N',
15844    '\u01CA': 'NJ',
15845    '\u01CB': 'Nj',
15846    '\u24C4': 'O',
15847    '\uFF2F': 'O',
15848    '\u00D2': 'O',
15849    '\u00D3': 'O',
15850    '\u00D4': 'O',
15851    '\u1ED2': 'O',
15852    '\u1ED0': 'O',
15853    '\u1ED6': 'O',
15854    '\u1ED4': 'O',
15855    '\u00D5': 'O',
15856    '\u1E4C': 'O',
15857    '\u022C': 'O',
15858    '\u1E4E': 'O',
15859    '\u014C': 'O',
15860    '\u1E50': 'O',
15861    '\u1E52': 'O',
15862    '\u014E': 'O',
15863    '\u022E': 'O',
15864    '\u0230': 'O',
15865    '\u00D6': 'O',
15866    '\u022A': 'O',
15867    '\u1ECE': 'O',
15868    '\u0150': 'O',
15869    '\u01D1': 'O',
15870    '\u020C': 'O',
15871    '\u020E': 'O',
15872    '\u01A0': 'O',
15873    '\u1EDC': 'O',
15874    '\u1EDA': 'O',
15875    '\u1EE0': 'O',
15876    '\u1EDE': 'O',
15877    '\u1EE2': 'O',
15878    '\u1ECC': 'O',
15879    '\u1ED8': 'O',
15880    '\u01EA': 'O',
15881    '\u01EC': 'O',
15882    '\u00D8': 'O',
15883    '\u01FE': 'O',
15884    '\u0186': 'O',
15885    '\u019F': 'O',
15886    '\uA74A': 'O',
15887    '\uA74C': 'O',
15888    '\u0152': 'OE',
15889    '\u01A2': 'OI',
15890    '\uA74E': 'OO',
15891    '\u0222': 'OU',
15892    '\u24C5': 'P',
15893    '\uFF30': 'P',
15894    '\u1E54': 'P',
15895    '\u1E56': 'P',
15896    '\u01A4': 'P',
15897    '\u2C63': 'P',
15898    '\uA750': 'P',
15899    '\uA752': 'P',
15900    '\uA754': 'P',
15901    '\u24C6': 'Q',
15902    '\uFF31': 'Q',
15903    '\uA756': 'Q',
15904    '\uA758': 'Q',
15905    '\u024A': 'Q',
15906    '\u24C7': 'R',
15907    '\uFF32': 'R',
15908    '\u0154': 'R',
15909    '\u1E58': 'R',
15910    '\u0158': 'R',
15911    '\u0210': 'R',
15912    '\u0212': 'R',
15913    '\u1E5A': 'R',
15914    '\u1E5C': 'R',
15915    '\u0156': 'R',
15916    '\u1E5E': 'R',
15917    '\u024C': 'R',
15918    '\u2C64': 'R',
15919    '\uA75A': 'R',
15920    '\uA7A6': 'R',
15921    '\uA782': 'R',
15922    '\u24C8': 'S',
15923    '\uFF33': 'S',
15924    '\u1E9E': 'S',
15925    '\u015A': 'S',
15926    '\u1E64': 'S',
15927    '\u015C': 'S',
15928    '\u1E60': 'S',
15929    '\u0160': 'S',
15930    '\u1E66': 'S',
15931    '\u1E62': 'S',
15932    '\u1E68': 'S',
15933    '\u0218': 'S',
15934    '\u015E': 'S',
15935    '\u2C7E': 'S',
15936    '\uA7A8': 'S',
15937    '\uA784': 'S',
15938    '\u24C9': 'T',
15939    '\uFF34': 'T',
15940    '\u1E6A': 'T',
15941    '\u0164': 'T',
15942    '\u1E6C': 'T',
15943    '\u021A': 'T',
15944    '\u0162': 'T',
15945    '\u1E70': 'T',
15946    '\u1E6E': 'T',
15947    '\u0166': 'T',
15948    '\u01AC': 'T',
15949    '\u01AE': 'T',
15950    '\u023E': 'T',
15951    '\uA786': 'T',
15952    '\uA728': 'TZ',
15953    '\u24CA': 'U',
15954    '\uFF35': 'U',
15955    '\u00D9': 'U',
15956    '\u00DA': 'U',
15957    '\u00DB': 'U',
15958    '\u0168': 'U',
15959    '\u1E78': 'U',
15960    '\u016A': 'U',
15961    '\u1E7A': 'U',
15962    '\u016C': 'U',
15963    '\u00DC': 'U',
15964    '\u01DB': 'U',
15965    '\u01D7': 'U',
15966    '\u01D5': 'U',
15967    '\u01D9': 'U',
15968    '\u1EE6': 'U',
15969    '\u016E': 'U',
15970    '\u0170': 'U',
15971    '\u01D3': 'U',
15972    '\u0214': 'U',
15973    '\u0216': 'U',
15974    '\u01AF': 'U',
15975    '\u1EEA': 'U',
15976    '\u1EE8': 'U',
15977    '\u1EEE': 'U',
15978    '\u1EEC': 'U',
15979    '\u1EF0': 'U',
15980    '\u1EE4': 'U',
15981    '\u1E72': 'U',
15982    '\u0172': 'U',
15983    '\u1E76': 'U',
15984    '\u1E74': 'U',
15985    '\u0244': 'U',
15986    '\u24CB': 'V',
15987    '\uFF36': 'V',
15988    '\u1E7C': 'V',
15989    '\u1E7E': 'V',
15990    '\u01B2': 'V',
15991    '\uA75E': 'V',
15992    '\u0245': 'V',
15993    '\uA760': 'VY',
15994    '\u24CC': 'W',
15995    '\uFF37': 'W',
15996    '\u1E80': 'W',
15997    '\u1E82': 'W',
15998    '\u0174': 'W',
15999    '\u1E86': 'W',
16000    '\u1E84': 'W',
16001    '\u1E88': 'W',
16002    '\u2C72': 'W',
16003    '\u24CD': 'X',
16004    '\uFF38': 'X',
16005    '\u1E8A': 'X',
16006    '\u1E8C': 'X',
16007    '\u24CE': 'Y',
16008    '\uFF39': 'Y',
16009    '\u1EF2': 'Y',
16010    '\u00DD': 'Y',
16011    '\u0176': 'Y',
16012    '\u1EF8': 'Y',
16013    '\u0232': 'Y',
16014    '\u1E8E': 'Y',
16015    '\u0178': 'Y',
16016    '\u1EF6': 'Y',
16017    '\u1EF4': 'Y',
16018    '\u01B3': 'Y',
16019    '\u024E': 'Y',
16020    '\u1EFE': 'Y',
16021    '\u24CF': 'Z',
16022    '\uFF3A': 'Z',
16023    '\u0179': 'Z',
16024    '\u1E90': 'Z',
16025    '\u017B': 'Z',
16026    '\u017D': 'Z',
16027    '\u1E92': 'Z',
16028    '\u1E94': 'Z',
16029    '\u01B5': 'Z',
16030    '\u0224': 'Z',
16031    '\u2C7F': 'Z',
16032    '\u2C6B': 'Z',
16033    '\uA762': 'Z',
16034    '\u24D0': 'a',
16035    '\uFF41': 'a',
16036    '\u1E9A': 'a',
16037    '\u00E0': 'a',
16038    '\u00E1': 'a',
16039    '\u00E2': 'a',
16040    '\u1EA7': 'a',
16041    '\u1EA5': 'a',
16042    '\u1EAB': 'a',
16043    '\u1EA9': 'a',
16044    '\u00E3': 'a',
16045    '\u0101': 'a',
16046    '\u0103': 'a',
16047    '\u1EB1': 'a',
16048    '\u1EAF': 'a',
16049    '\u1EB5': 'a',
16050    '\u1EB3': 'a',
16051    '\u0227': 'a',
16052    '\u01E1': 'a',
16053    '\u00E4': 'a',
16054    '\u01DF': 'a',
16055    '\u1EA3': 'a',
16056    '\u00E5': 'a',
16057    '\u01FB': 'a',
16058    '\u01CE': 'a',
16059    '\u0201': 'a',
16060    '\u0203': 'a',
16061    '\u1EA1': 'a',
16062    '\u1EAD': 'a',
16063    '\u1EB7': 'a',
16064    '\u1E01': 'a',
16065    '\u0105': 'a',
16066    '\u2C65': 'a',
16067    '\u0250': 'a',
16068    '\uA733': 'aa',
16069    '\u00E6': 'ae',
16070    '\u01FD': 'ae',
16071    '\u01E3': 'ae',
16072    '\uA735': 'ao',
16073    '\uA737': 'au',
16074    '\uA739': 'av',
16075    '\uA73B': 'av',
16076    '\uA73D': 'ay',
16077    '\u24D1': 'b',
16078    '\uFF42': 'b',
16079    '\u1E03': 'b',
16080    '\u1E05': 'b',
16081    '\u1E07': 'b',
16082    '\u0180': 'b',
16083    '\u0183': 'b',
16084    '\u0253': 'b',
16085    '\u24D2': 'c',
16086    '\uFF43': 'c',
16087    '\u0107': 'c',
16088    '\u0109': 'c',
16089    '\u010B': 'c',
16090    '\u010D': 'c',
16091    '\u00E7': 'c',
16092    '\u1E09': 'c',
16093    '\u0188': 'c',
16094    '\u023C': 'c',
16095    '\uA73F': 'c',
16096    '\u2184': 'c',
16097    '\u24D3': 'd',
16098    '\uFF44': 'd',
16099    '\u1E0B': 'd',
16100    '\u010F': 'd',
16101    '\u1E0D': 'd',
16102    '\u1E11': 'd',
16103    '\u1E13': 'd',
16104    '\u1E0F': 'd',
16105    '\u0111': 'd',
16106    '\u018C': 'd',
16107    '\u0256': 'd',
16108    '\u0257': 'd',
16109    '\uA77A': 'd',
16110    '\u01F3': 'dz',
16111    '\u01C6': 'dz',
16112    '\u24D4': 'e',
16113    '\uFF45': 'e',
16114    '\u00E8': 'e',
16115    '\u00E9': 'e',
16116    '\u00EA': 'e',
16117    '\u1EC1': 'e',
16118    '\u1EBF': 'e',
16119    '\u1EC5': 'e',
16120    '\u1EC3': 'e',
16121    '\u1EBD': 'e',
16122    '\u0113': 'e',
16123    '\u1E15': 'e',
16124    '\u1E17': 'e',
16125    '\u0115': 'e',
16126    '\u0117': 'e',
16127    '\u00EB': 'e',
16128    '\u1EBB': 'e',
16129    '\u011B': 'e',
16130    '\u0205': 'e',
16131    '\u0207': 'e',
16132    '\u1EB9': 'e',
16133    '\u1EC7': 'e',
16134    '\u0229': 'e',
16135    '\u1E1D': 'e',
16136    '\u0119': 'e',
16137    '\u1E19': 'e',
16138    '\u1E1B': 'e',
16139    '\u0247': 'e',
16140    '\u025B': 'e',
16141    '\u01DD': 'e',
16142    '\u24D5': 'f',
16143    '\uFF46': 'f',
16144    '\u1E1F': 'f',
16145    '\u0192': 'f',
16146    '\uA77C': 'f',
16147    '\u24D6': 'g',
16148    '\uFF47': 'g',
16149    '\u01F5': 'g',
16150    '\u011D': 'g',
16151    '\u1E21': 'g',
16152    '\u011F': 'g',
16153    '\u0121': 'g',
16154    '\u01E7': 'g',
16155    '\u0123': 'g',
16156    '\u01E5': 'g',
16157    '\u0260': 'g',
16158    '\uA7A1': 'g',
16159    '\u1D79': 'g',
16160    '\uA77F': 'g',
16161    '\u24D7': 'h',
16162    '\uFF48': 'h',
16163    '\u0125': 'h',
16164    '\u1E23': 'h',
16165    '\u1E27': 'h',
16166    '\u021F': 'h',
16167    '\u1E25': 'h',
16168    '\u1E29': 'h',
16169    '\u1E2B': 'h',
16170    '\u1E96': 'h',
16171    '\u0127': 'h',
16172    '\u2C68': 'h',
16173    '\u2C76': 'h',
16174    '\u0265': 'h',
16175    '\u0195': 'hv',
16176    '\u24D8': 'i',
16177    '\uFF49': 'i',
16178    '\u00EC': 'i',
16179    '\u00ED': 'i',
16180    '\u00EE': 'i',
16181    '\u0129': 'i',
16182    '\u012B': 'i',
16183    '\u012D': 'i',
16184    '\u00EF': 'i',
16185    '\u1E2F': 'i',
16186    '\u1EC9': 'i',
16187    '\u01D0': 'i',
16188    '\u0209': 'i',
16189    '\u020B': 'i',
16190    '\u1ECB': 'i',
16191    '\u012F': 'i',
16192    '\u1E2D': 'i',
16193    '\u0268': 'i',
16194    '\u0131': 'i',
16195    '\u24D9': 'j',
16196    '\uFF4A': 'j',
16197    '\u0135': 'j',
16198    '\u01F0': 'j',
16199    '\u0249': 'j',
16200    '\u24DA': 'k',
16201    '\uFF4B': 'k',
16202    '\u1E31': 'k',
16203    '\u01E9': 'k',
16204    '\u1E33': 'k',
16205    '\u0137': 'k',
16206    '\u1E35': 'k',
16207    '\u0199': 'k',
16208    '\u2C6A': 'k',
16209    '\uA741': 'k',
16210    '\uA743': 'k',
16211    '\uA745': 'k',
16212    '\uA7A3': 'k',
16213    '\u24DB': 'l',
16214    '\uFF4C': 'l',
16215    '\u0140': 'l',
16216    '\u013A': 'l',
16217    '\u013E': 'l',
16218    '\u1E37': 'l',
16219    '\u1E39': 'l',
16220    '\u013C': 'l',
16221    '\u1E3D': 'l',
16222    '\u1E3B': 'l',
16223    '\u017F': 'l',
16224    '\u0142': 'l',
16225    '\u019A': 'l',
16226    '\u026B': 'l',
16227    '\u2C61': 'l',
16228    '\uA749': 'l',
16229    '\uA781': 'l',
16230    '\uA747': 'l',
16231    '\u01C9': 'lj',
16232    '\u24DC': 'm',
16233    '\uFF4D': 'm',
16234    '\u1E3F': 'm',
16235    '\u1E41': 'm',
16236    '\u1E43': 'm',
16237    '\u0271': 'm',
16238    '\u026F': 'm',
16239    '\u24DD': 'n',
16240    '\uFF4E': 'n',
16241    '\u01F9': 'n',
16242    '\u0144': 'n',
16243    '\u00F1': 'n',
16244    '\u1E45': 'n',
16245    '\u0148': 'n',
16246    '\u1E47': 'n',
16247    '\u0146': 'n',
16248    '\u1E4B': 'n',
16249    '\u1E49': 'n',
16250    '\u019E': 'n',
16251    '\u0272': 'n',
16252    '\u0149': 'n',
16253    '\uA791': 'n',
16254    '\uA7A5': 'n',
16255    '\u01CC': 'nj',
16256    '\u24DE': 'o',
16257    '\uFF4F': 'o',
16258    '\u00F2': 'o',
16259    '\u00F3': 'o',
16260    '\u00F4': 'o',
16261    '\u1ED3': 'o',
16262    '\u1ED1': 'o',
16263    '\u1ED7': 'o',
16264    '\u1ED5': 'o',
16265    '\u00F5': 'o',
16266    '\u1E4D': 'o',
16267    '\u022D': 'o',
16268    '\u1E4F': 'o',
16269    '\u014D': 'o',
16270    '\u1E51': 'o',
16271    '\u1E53': 'o',
16272    '\u014F': 'o',
16273    '\u022F': 'o',
16274    '\u0231': 'o',
16275    '\u00F6': 'o',
16276    '\u022B': 'o',
16277    '\u1ECF': 'o',
16278    '\u0151': 'o',
16279    '\u01D2': 'o',
16280    '\u020D': 'o',
16281    '\u020F': 'o',
16282    '\u01A1': 'o',
16283    '\u1EDD': 'o',
16284    '\u1EDB': 'o',
16285    '\u1EE1': 'o',
16286    '\u1EDF': 'o',
16287    '\u1EE3': 'o',
16288    '\u1ECD': 'o',
16289    '\u1ED9': 'o',
16290    '\u01EB': 'o',
16291    '\u01ED': 'o',
16292    '\u00F8': 'o',
16293    '\u01FF': 'o',
16294    '\u0254': 'o',
16295    '\uA74B': 'o',
16296    '\uA74D': 'o',
16297    '\u0275': 'o',
16298    '\u0153': 'oe',
16299    '\u01A3': 'oi',
16300    '\u0223': 'ou',
16301    '\uA74F': 'oo',
16302    '\u24DF': 'p',
16303    '\uFF50': 'p',
16304    '\u1E55': 'p',
16305    '\u1E57': 'p',
16306    '\u01A5': 'p',
16307    '\u1D7D': 'p',
16308    '\uA751': 'p',
16309    '\uA753': 'p',
16310    '\uA755': 'p',
16311    '\u24E0': 'q',
16312    '\uFF51': 'q',
16313    '\u024B': 'q',
16314    '\uA757': 'q',
16315    '\uA759': 'q',
16316    '\u24E1': 'r',
16317    '\uFF52': 'r',
16318    '\u0155': 'r',
16319    '\u1E59': 'r',
16320    '\u0159': 'r',
16321    '\u0211': 'r',
16322    '\u0213': 'r',
16323    '\u1E5B': 'r',
16324    '\u1E5D': 'r',
16325    '\u0157': 'r',
16326    '\u1E5F': 'r',
16327    '\u024D': 'r',
16328    '\u027D': 'r',
16329    '\uA75B': 'r',
16330    '\uA7A7': 'r',
16331    '\uA783': 'r',
16332    '\u24E2': 's',
16333    '\uFF53': 's',
16334    '\u00DF': 's',
16335    '\u015B': 's',
16336    '\u1E65': 's',
16337    '\u015D': 's',
16338    '\u1E61': 's',
16339    '\u0161': 's',
16340    '\u1E67': 's',
16341    '\u1E63': 's',
16342    '\u1E69': 's',
16343    '\u0219': 's',
16344    '\u015F': 's',
16345    '\u023F': 's',
16346    '\uA7A9': 's',
16347    '\uA785': 's',
16348    '\u1E9B': 's',
16349    '\u24E3': 't',
16350    '\uFF54': 't',
16351    '\u1E6B': 't',
16352    '\u1E97': 't',
16353    '\u0165': 't',
16354    '\u1E6D': 't',
16355    '\u021B': 't',
16356    '\u0163': 't',
16357    '\u1E71': 't',
16358    '\u1E6F': 't',
16359    '\u0167': 't',
16360    '\u01AD': 't',
16361    '\u0288': 't',
16362    '\u2C66': 't',
16363    '\uA787': 't',
16364    '\uA729': 'tz',
16365    '\u24E4': 'u',
16366    '\uFF55': 'u',
16367    '\u00F9': 'u',
16368    '\u00FA': 'u',
16369    '\u00FB': 'u',
16370    '\u0169': 'u',
16371    '\u1E79': 'u',
16372    '\u016B': 'u',
16373    '\u1E7B': 'u',
16374    '\u016D': 'u',
16375    '\u00FC': 'u',
16376    '\u01DC': 'u',
16377    '\u01D8': 'u',
16378    '\u01D6': 'u',
16379    '\u01DA': 'u',
16380    '\u1EE7': 'u',
16381    '\u016F': 'u',
16382    '\u0171': 'u',
16383    '\u01D4': 'u',
16384    '\u0215': 'u',
16385    '\u0217': 'u',
16386    '\u01B0': 'u',
16387    '\u1EEB': 'u',
16388    '\u1EE9': 'u',
16389    '\u1EEF': 'u',
16390    '\u1EED': 'u',
16391    '\u1EF1': 'u',
16392    '\u1EE5': 'u',
16393    '\u1E73': 'u',
16394    '\u0173': 'u',
16395    '\u1E77': 'u',
16396    '\u1E75': 'u',
16397    '\u0289': 'u',
16398    '\u24E5': 'v',
16399    '\uFF56': 'v',
16400    '\u1E7D': 'v',
16401    '\u1E7F': 'v',
16402    '\u028B': 'v',
16403    '\uA75F': 'v',
16404    '\u028C': 'v',
16405    '\uA761': 'vy',
16406    '\u24E6': 'w',
16407    '\uFF57': 'w',
16408    '\u1E81': 'w',
16409    '\u1E83': 'w',
16410    '\u0175': 'w',
16411    '\u1E87': 'w',
16412    '\u1E85': 'w',
16413    '\u1E98': 'w',
16414    '\u1E89': 'w',
16415    '\u2C73': 'w',
16416    '\u24E7': 'x',
16417    '\uFF58': 'x',
16418    '\u1E8B': 'x',
16419    '\u1E8D': 'x',
16420    '\u24E8': 'y',
16421    '\uFF59': 'y',
16422    '\u1EF3': 'y',
16423    '\u00FD': 'y',
16424    '\u0177': 'y',
16425    '\u1EF9': 'y',
16426    '\u0233': 'y',
16427    '\u1E8F': 'y',
16428    '\u00FF': 'y',
16429    '\u1EF7': 'y',
16430    '\u1E99': 'y',
16431    '\u1EF5': 'y',
16432    '\u01B4': 'y',
16433    '\u024F': 'y',
16434    '\u1EFF': 'y',
16435    '\u24E9': 'z',
16436    '\uFF5A': 'z',
16437    '\u017A': 'z',
16438    '\u1E91': 'z',
16439    '\u017C': 'z',
16440    '\u017E': 'z',
16441    '\u1E93': 'z',
16442    '\u1E95': 'z',
16443    '\u01B6': 'z',
16444    '\u0225': 'z',
16445    '\u0240': 'z',
16446    '\u2C6C': 'z',
16447    '\uA763': 'z',
16448    '\u0386': '\u0391',
16449    '\u0388': '\u0395',
16450    '\u0389': '\u0397',
16451    '\u038A': '\u0399',
16452    '\u03AA': '\u0399',
16453    '\u038C': '\u039F',
16454    '\u038E': '\u03A5',
16455    '\u03AB': '\u03A5',
16456    '\u038F': '\u03A9',
16457    '\u03AC': '\u03B1',
16458    '\u03AD': '\u03B5',
16459    '\u03AE': '\u03B7',
16460    '\u03AF': '\u03B9',
16461    '\u03CA': '\u03B9',
16462    '\u0390': '\u03B9',
16463    '\u03CC': '\u03BF',
16464    '\u03CD': '\u03C5',
16465    '\u03CB': '\u03C5',
16466    '\u03B0': '\u03C5',
16467    '\u03CE': '\u03C9',
16468    '\u03C2': '\u03C3',
16469    '\u2019': '\''
16470  };
16471
16472  return diacritics;
16473});
16474
16475S2.define('select2/data/base',[
16476  '../utils'
16477], function (Utils) {
16478  function BaseAdapter ($element, options) {
16479    BaseAdapter.__super__.constructor.call(this);
16480  }
16481
16482  Utils.Extend(BaseAdapter, Utils.Observable);
16483
16484  BaseAdapter.prototype.current = function (callback) {
16485    throw new Error('The `current` method must be defined in child classes.');
16486  };
16487
16488  BaseAdapter.prototype.query = function (params, callback) {
16489    throw new Error('The `query` method must be defined in child classes.');
16490  };
16491
16492  BaseAdapter.prototype.bind = function (container, $container) {
16493    // Can be implemented in subclasses
16494  };
16495
16496  BaseAdapter.prototype.destroy = function () {
16497    // Can be implemented in subclasses
16498  };
16499
16500  BaseAdapter.prototype.generateResultId = function (container, data) {
16501    var id = container.id + '-result-';
16502
16503    id += Utils.generateChars(4);
16504
16505    if (data.id != null) {
16506      id += '-' + data.id.toString();
16507    } else {
16508      id += '-' + Utils.generateChars(4);
16509    }
16510    return id;
16511  };
16512
16513  return BaseAdapter;
16514});
16515
16516S2.define('select2/data/select',[
16517  './base',
16518  '../utils',
16519  'jquery'
16520], function (BaseAdapter, Utils, $) {
16521  function SelectAdapter ($element, options) {
16522    this.$element = $element;
16523    this.options = options;
16524
16525    SelectAdapter.__super__.constructor.call(this);
16526  }
16527
16528  Utils.Extend(SelectAdapter, BaseAdapter);
16529
16530  SelectAdapter.prototype.current = function (callback) {
16531    var self = this;
16532
16533    var data = Array.prototype.map.call(
16534      this.$element[0].querySelectorAll(':checked'),
16535      function (selectedElement) {
16536        return self.item($(selectedElement));
16537      }
16538    );
16539
16540    callback(data);
16541  };
16542
16543  SelectAdapter.prototype.select = function (data) {
16544    var self = this;
16545
16546    data.selected = true;
16547
16548    // If data.element is a DOM node, use it instead
16549    if (
16550      data.element != null && data.element.tagName.toLowerCase() === 'option'
16551    ) {
16552      data.element.selected = true;
16553
16554      this.$element.trigger('input').trigger('change');
16555
16556      return;
16557    }
16558
16559    if (this.$element.prop('multiple')) {
16560      this.current(function (currentData) {
16561        var val = [];
16562
16563        data = [data];
16564        data.push.apply(data, currentData);
16565
16566        for (var d = 0; d < data.length; d++) {
16567          var id = data[d].id;
16568
16569          if (val.indexOf(id) === -1) {
16570            val.push(id);
16571          }
16572        }
16573
16574        self.$element.val(val);
16575        self.$element.trigger('input').trigger('change');
16576      });
16577    } else {
16578      var val = data.id;
16579
16580      this.$element.val(val);
16581      this.$element.trigger('input').trigger('change');
16582    }
16583  };
16584
16585  SelectAdapter.prototype.unselect = function (data) {
16586    var self = this;
16587
16588    if (!this.$element.prop('multiple')) {
16589      return;
16590    }
16591
16592    data.selected = false;
16593
16594    if (
16595      data.element != null &&
16596      data.element.tagName.toLowerCase() === 'option'
16597    ) {
16598      data.element.selected = false;
16599
16600      this.$element.trigger('input').trigger('change');
16601
16602      return;
16603    }
16604
16605    this.current(function (currentData) {
16606      var val = [];
16607
16608      for (var d = 0; d < currentData.length; d++) {
16609        var id = currentData[d].id;
16610
16611        if (id !== data.id && val.indexOf(id) === -1) {
16612          val.push(id);
16613        }
16614      }
16615
16616      self.$element.val(val);
16617
16618      self.$element.trigger('input').trigger('change');
16619    });
16620  };
16621
16622  SelectAdapter.prototype.bind = function (container, $container) {
16623    var self = this;
16624
16625    this.container = container;
16626
16627    container.on('select', function (params) {
16628      self.select(params.data);
16629    });
16630
16631    container.on('unselect', function (params) {
16632      self.unselect(params.data);
16633    });
16634  };
16635
16636  SelectAdapter.prototype.destroy = function () {
16637    // Remove anything added to child elements
16638    this.$element.find('*').each(function () {
16639      // Remove any custom data set by Select2
16640      Utils.RemoveData(this);
16641    });
16642  };
16643
16644  SelectAdapter.prototype.query = function (params, callback) {
16645    var data = [];
16646    var self = this;
16647
16648    var $options = this.$element.children();
16649
16650    $options.each(function () {
16651      if (
16652        this.tagName.toLowerCase() !== 'option' &&
16653        this.tagName.toLowerCase() !== 'optgroup'
16654      ) {
16655        return;
16656      }
16657
16658      var $option = $(this);
16659
16660      var option = self.item($option);
16661
16662      var matches = self.matches(params, option);
16663
16664      if (matches !== null) {
16665        data.push(matches);
16666      }
16667    });
16668
16669    callback({
16670      results: data
16671    });
16672  };
16673
16674  SelectAdapter.prototype.addOptions = function ($options) {
16675    this.$element.append($options);
16676  };
16677
16678  SelectAdapter.prototype.option = function (data) {
16679    var option;
16680
16681    if (data.children) {
16682      option = document.createElement('optgroup');
16683      option.label = data.text;
16684    } else {
16685      option = document.createElement('option');
16686
16687      if (option.textContent !== undefined) {
16688        option.textContent = data.text;
16689      } else {
16690        option.innerText = data.text;
16691      }
16692    }
16693
16694    if (data.id !== undefined) {
16695      option.value = data.id;
16696    }
16697
16698    if (data.disabled) {
16699      option.disabled = true;
16700    }
16701
16702    if (data.selected) {
16703      option.selected = true;
16704    }
16705
16706    if (data.title) {
16707      option.title = data.title;
16708    }
16709
16710    var normalizedData = this._normalizeItem(data);
16711    normalizedData.element = option;
16712
16713    // Override the option's data with the combined data
16714    Utils.StoreData(option, 'data', normalizedData);
16715
16716    return $(option);
16717  };
16718
16719  SelectAdapter.prototype.item = function ($option) {
16720    var data = {};
16721
16722    data = Utils.GetData($option[0], 'data');
16723
16724    if (data != null) {
16725      return data;
16726    }
16727
16728    var option = $option[0];
16729
16730    if (option.tagName.toLowerCase() === 'option') {
16731      data = {
16732        id: $option.val(),
16733        text: $option.text(),
16734        disabled: $option.prop('disabled'),
16735        selected: $option.prop('selected'),
16736        title: $option.prop('title')
16737      };
16738    } else if (option.tagName.toLowerCase() === 'optgroup') {
16739      data = {
16740        text: $option.prop('label'),
16741        children: [],
16742        title: $option.prop('title')
16743      };
16744
16745      var $children = $option.children('option');
16746      var children = [];
16747
16748      for (var c = 0; c < $children.length; c++) {
16749        var $child = $($children[c]);
16750
16751        var child = this.item($child);
16752
16753        children.push(child);
16754      }
16755
16756      data.children = children;
16757    }
16758
16759    data = this._normalizeItem(data);
16760    data.element = $option[0];
16761
16762    Utils.StoreData($option[0], 'data', data);
16763
16764    return data;
16765  };
16766
16767  SelectAdapter.prototype._normalizeItem = function (item) {
16768    if (item !== Object(item)) {
16769      item = {
16770        id: item,
16771        text: item
16772      };
16773    }
16774
16775    item = $.extend({}, {
16776      text: ''
16777    }, item);
16778
16779    var defaults = {
16780      selected: false,
16781      disabled: false
16782    };
16783
16784    if (item.id != null) {
16785      item.id = item.id.toString();
16786    }
16787
16788    if (item.text != null) {
16789      item.text = item.text.toString();
16790    }
16791
16792    if (item._resultId == null && item.id && this.container != null) {
16793      item._resultId = this.generateResultId(this.container, item);
16794    }
16795
16796    return $.extend({}, defaults, item);
16797  };
16798
16799  SelectAdapter.prototype.matches = function (params, data) {
16800    var matcher = this.options.get('matcher');
16801
16802    return matcher(params, data);
16803  };
16804
16805  return SelectAdapter;
16806});
16807
16808S2.define('select2/data/array',[
16809  './select',
16810  '../utils',
16811  'jquery'
16812], function (SelectAdapter, Utils, $) {
16813  function ArrayAdapter ($element, options) {
16814    this._dataToConvert = options.get('data') || [];
16815
16816    ArrayAdapter.__super__.constructor.call(this, $element, options);
16817  }
16818
16819  Utils.Extend(ArrayAdapter, SelectAdapter);
16820
16821  ArrayAdapter.prototype.bind = function (container, $container) {
16822    ArrayAdapter.__super__.bind.call(this, container, $container);
16823
16824    this.addOptions(this.convertToOptions(this._dataToConvert));
16825  };
16826
16827  ArrayAdapter.prototype.select = function (data) {
16828    var $option = this.$element.find('option').filter(function (i, elm) {
16829      return elm.value == data.id.toString();
16830    });
16831
16832    if ($option.length === 0) {
16833      $option = this.option(data);
16834
16835      this.addOptions($option);
16836    }
16837
16838    ArrayAdapter.__super__.select.call(this, data);
16839  };
16840
16841  ArrayAdapter.prototype.convertToOptions = function (data) {
16842    var self = this;
16843
16844    var $existing = this.$element.find('option');
16845    var existingIds = $existing.map(function () {
16846      return self.item($(this)).id;
16847    }).get();
16848
16849    var $options = [];
16850
16851    // Filter out all items except for the one passed in the argument
16852    function onlyItem (item) {
16853      return function () {
16854        return $(this).val() == item.id;
16855      };
16856    }
16857
16858    for (var d = 0; d < data.length; d++) {
16859      var item = this._normalizeItem(data[d]);
16860
16861      // Skip items which were pre-loaded, only merge the data
16862      if (existingIds.indexOf(item.id) >= 0) {
16863        var $existingOption = $existing.filter(onlyItem(item));
16864
16865        var existingData = this.item($existingOption);
16866        var newData = $.extend(true, {}, item, existingData);
16867
16868        var $newOption = this.option(newData);
16869
16870        $existingOption.replaceWith($newOption);
16871
16872        continue;
16873      }
16874
16875      var $option = this.option(item);
16876
16877      if (item.children) {
16878        var $children = this.convertToOptions(item.children);
16879
16880        $option.append($children);
16881      }
16882
16883      $options.push($option);
16884    }
16885
16886    return $options;
16887  };
16888
16889  return ArrayAdapter;
16890});
16891
16892S2.define('select2/data/ajax',[
16893  './array',
16894  '../utils',
16895  'jquery'
16896], function (ArrayAdapter, Utils, $) {
16897  function AjaxAdapter ($element, options) {
16898    this.ajaxOptions = this._applyDefaults(options.get('ajax'));
16899
16900    if (this.ajaxOptions.processResults != null) {
16901      this.processResults = this.ajaxOptions.processResults;
16902    }
16903
16904    AjaxAdapter.__super__.constructor.call(this, $element, options);
16905  }
16906
16907  Utils.Extend(AjaxAdapter, ArrayAdapter);
16908
16909  AjaxAdapter.prototype._applyDefaults = function (options) {
16910    var defaults = {
16911      data: function (params) {
16912        return $.extend({}, params, {
16913          q: params.term
16914        });
16915      },
16916      transport: function (params, success, failure) {
16917        var $request = $.ajax(params);
16918
16919        $request.then(success);
16920        $request.fail(failure);
16921
16922        return $request;
16923      }
16924    };
16925
16926    return $.extend({}, defaults, options, true);
16927  };
16928
16929  AjaxAdapter.prototype.processResults = function (results) {
16930    return results;
16931  };
16932
16933  AjaxAdapter.prototype.query = function (params, callback) {
16934    var matches = [];
16935    var self = this;
16936
16937    if (this._request != null) {
16938      // JSONP requests cannot always be aborted
16939      if (typeof this._request.abort === 'function') {
16940        this._request.abort();
16941      }
16942
16943      this._request = null;
16944    }
16945
16946    var options = $.extend({
16947      type: 'GET'
16948    }, this.ajaxOptions);
16949
16950    if (typeof options.url === 'function') {
16951      options.url = options.url.call(this.$element, params);
16952    }
16953
16954    if (typeof options.data === 'function') {
16955      options.data = options.data.call(this.$element, params);
16956    }
16957
16958    function request () {
16959      var $request = options.transport(options, function (data) {
16960        var results = self.processResults(data, params);
16961
16962        if (self.options.get('debug') && window.console && console.error) {
16963          // Check to make sure that the response included a `results` key.
16964          if (!results || !results.results || !Array.isArray(results.results)) {
16965            console.error(
16966              'Select2: The AJAX results did not return an array in the ' +
16967              '`results` key of the response.'
16968            );
16969          }
16970        }
16971
16972        callback(results);
16973      }, function () {
16974        // Attempt to detect if a request was aborted
16975        // Only works if the transport exposes a status property
16976        if ('status' in $request &&
16977            ($request.status === 0 || $request.status === '0')) {
16978          return;
16979        }
16980
16981        self.trigger('results:message', {
16982          message: 'errorLoading'
16983        });
16984      });
16985
16986      self._request = $request;
16987    }
16988
16989    if (this.ajaxOptions.delay && params.term != null) {
16990      if (this._queryTimeout) {
16991        window.clearTimeout(this._queryTimeout);
16992      }
16993
16994      this._queryTimeout = window.setTimeout(request, this.ajaxOptions.delay);
16995    } else {
16996      request();
16997    }
16998  };
16999
17000  return AjaxAdapter;
17001});
17002
17003S2.define('select2/data/tags',[
17004  'jquery'
17005], function ($) {
17006  function Tags (decorated, $element, options) {
17007    var tags = options.get('tags');
17008
17009    var createTag = options.get('createTag');
17010
17011    if (createTag !== undefined) {
17012      this.createTag = createTag;
17013    }
17014
17015    var insertTag = options.get('insertTag');
17016
17017    if (insertTag !== undefined) {
17018        this.insertTag = insertTag;
17019    }
17020
17021    decorated.call(this, $element, options);
17022
17023    if (Array.isArray(tags)) {
17024      for (var t = 0; t < tags.length; t++) {
17025        var tag = tags[t];
17026        var item = this._normalizeItem(tag);
17027
17028        var $option = this.option(item);
17029
17030        this.$element.append($option);
17031      }
17032    }
17033  }
17034
17035  Tags.prototype.query = function (decorated, params, callback) {
17036    var self = this;
17037
17038    this._removeOldTags();
17039
17040    if (params.term == null || params.page != null) {
17041      decorated.call(this, params, callback);
17042      return;
17043    }
17044
17045    function wrapper (obj, child) {
17046      var data = obj.results;
17047
17048      for (var i = 0; i < data.length; i++) {
17049        var option = data[i];
17050
17051        var checkChildren = (
17052          option.children != null &&
17053          !wrapper({
17054            results: option.children
17055          }, true)
17056        );
17057
17058        var optionText = (option.text || '').toUpperCase();
17059        var paramsTerm = (params.term || '').toUpperCase();
17060
17061        var checkText = optionText === paramsTerm;
17062
17063        if (checkText || checkChildren) {
17064          if (child) {
17065            return false;
17066          }
17067
17068          obj.data = data;
17069          callback(obj);
17070
17071          return;
17072        }
17073      }
17074
17075      if (child) {
17076        return true;
17077      }
17078
17079      var tag = self.createTag(params);
17080
17081      if (tag != null) {
17082        var $option = self.option(tag);
17083        $option.attr('data-select2-tag', 'true');
17084
17085        self.addOptions([$option]);
17086
17087        self.insertTag(data, tag);
17088      }
17089
17090      obj.results = data;
17091
17092      callback(obj);
17093    }
17094
17095    decorated.call(this, params, wrapper);
17096  };
17097
17098  Tags.prototype.createTag = function (decorated, params) {
17099    if (params.term == null) {
17100      return null;
17101    }
17102
17103    var term = params.term.trim();
17104
17105    if (term === '') {
17106      return null;
17107    }
17108
17109    return {
17110      id: term,
17111      text: term
17112    };
17113  };
17114
17115  Tags.prototype.insertTag = function (_, data, tag) {
17116    data.unshift(tag);
17117  };
17118
17119  Tags.prototype._removeOldTags = function (_) {
17120    var $options = this.$element.find('option[data-select2-tag]');
17121
17122    $options.each(function () {
17123      if (this.selected) {
17124        return;
17125      }
17126
17127      $(this).remove();
17128    });
17129  };
17130
17131  return Tags;
17132});
17133
17134S2.define('select2/data/tokenizer',[
17135  'jquery'
17136], function ($) {
17137  function Tokenizer (decorated, $element, options) {
17138    var tokenizer = options.get('tokenizer');
17139
17140    if (tokenizer !== undefined) {
17141      this.tokenizer = tokenizer;
17142    }
17143
17144    decorated.call(this, $element, options);
17145  }
17146
17147  Tokenizer.prototype.bind = function (decorated, container, $container) {
17148    decorated.call(this, container, $container);
17149
17150    this.$search =  container.dropdown.$search || container.selection.$search ||
17151      $container.find('.select2-search__field');
17152  };
17153
17154  Tokenizer.prototype.query = function (decorated, params, callback) {
17155    var self = this;
17156
17157    function createAndSelect (data) {
17158      // Normalize the data object so we can use it for checks
17159      var item = self._normalizeItem(data);
17160
17161      // Check if the data object already exists as a tag
17162      // Select it if it doesn't
17163      var $existingOptions = self.$element.find('option').filter(function () {
17164        return $(this).val() === item.id;
17165      });
17166
17167      // If an existing option wasn't found for it, create the option
17168      if (!$existingOptions.length) {
17169        var $option = self.option(item);
17170        $option.attr('data-select2-tag', true);
17171
17172        self._removeOldTags();
17173        self.addOptions([$option]);
17174      }
17175
17176      // Select the item, now that we know there is an option for it
17177      select(item);
17178    }
17179
17180    function select (data) {
17181      self.trigger('select', {
17182        data: data
17183      });
17184    }
17185
17186    params.term = params.term || '';
17187
17188    var tokenData = this.tokenizer(params, this.options, createAndSelect);
17189
17190    if (tokenData.term !== params.term) {
17191      // Replace the search term if we have the search box
17192      if (this.$search.length) {
17193        this.$search.val(tokenData.term);
17194        this.$search.trigger('focus');
17195      }
17196
17197      params.term = tokenData.term;
17198    }
17199
17200    decorated.call(this, params, callback);
17201  };
17202
17203  Tokenizer.prototype.tokenizer = function (_, params, options, callback) {
17204    var separators = options.get('tokenSeparators') || [];
17205    var term = params.term;
17206    var i = 0;
17207
17208    var createTag = this.createTag || function (params) {
17209      return {
17210        id: params.term,
17211        text: params.term
17212      };
17213    };
17214
17215    while (i < term.length) {
17216      var termChar = term[i];
17217
17218      if (separators.indexOf(termChar) === -1) {
17219        i++;
17220
17221        continue;
17222      }
17223
17224      var part = term.substr(0, i);
17225      var partParams = $.extend({}, params, {
17226        term: part
17227      });
17228
17229      var data = createTag(partParams);
17230
17231      if (data == null) {
17232        i++;
17233        continue;
17234      }
17235
17236      callback(data);
17237
17238      // Reset the term to not include the tokenized portion
17239      term = term.substr(i + 1) || '';
17240      i = 0;
17241    }
17242
17243    return {
17244      term: term
17245    };
17246  };
17247
17248  return Tokenizer;
17249});
17250
17251S2.define('select2/data/minimumInputLength',[
17252
17253], function () {
17254  function MinimumInputLength (decorated, $e, options) {
17255    this.minimumInputLength = options.get('minimumInputLength');
17256
17257    decorated.call(this, $e, options);
17258  }
17259
17260  MinimumInputLength.prototype.query = function (decorated, params, callback) {
17261    params.term = params.term || '';
17262
17263    if (params.term.length < this.minimumInputLength) {
17264      this.trigger('results:message', {
17265        message: 'inputTooShort',
17266        args: {
17267          minimum: this.minimumInputLength,
17268          input: params.term,
17269          params: params
17270        }
17271      });
17272
17273      return;
17274    }
17275
17276    decorated.call(this, params, callback);
17277  };
17278
17279  return MinimumInputLength;
17280});
17281
17282S2.define('select2/data/maximumInputLength',[
17283
17284], function () {
17285  function MaximumInputLength (decorated, $e, options) {
17286    this.maximumInputLength = options.get('maximumInputLength');
17287
17288    decorated.call(this, $e, options);
17289  }
17290
17291  MaximumInputLength.prototype.query = function (decorated, params, callback) {
17292    params.term = params.term || '';
17293
17294    if (this.maximumInputLength > 0 &&
17295        params.term.length > this.maximumInputLength) {
17296      this.trigger('results:message', {
17297        message: 'inputTooLong',
17298        args: {
17299          maximum: this.maximumInputLength,
17300          input: params.term,
17301          params: params
17302        }
17303      });
17304
17305      return;
17306    }
17307
17308    decorated.call(this, params, callback);
17309  };
17310
17311  return MaximumInputLength;
17312});
17313
17314S2.define('select2/data/maximumSelectionLength',[
17315
17316], function (){
17317  function MaximumSelectionLength (decorated, $e, options) {
17318    this.maximumSelectionLength = options.get('maximumSelectionLength');
17319
17320    decorated.call(this, $e, options);
17321  }
17322
17323  MaximumSelectionLength.prototype.bind =
17324    function (decorated, container, $container) {
17325      var self = this;
17326
17327      decorated.call(this, container, $container);
17328
17329      container.on('select', function () {
17330        self._checkIfMaximumSelected();
17331      });
17332  };
17333
17334  MaximumSelectionLength.prototype.query =
17335    function (decorated, params, callback) {
17336      var self = this;
17337
17338      this._checkIfMaximumSelected(function () {
17339        decorated.call(self, params, callback);
17340      });
17341  };
17342
17343  MaximumSelectionLength.prototype._checkIfMaximumSelected =
17344    function (_, successCallback) {
17345      var self = this;
17346
17347      this.current(function (currentData) {
17348        var count = currentData != null ? currentData.length : 0;
17349        if (self.maximumSelectionLength > 0 &&
17350          count >= self.maximumSelectionLength) {
17351          self.trigger('results:message', {
17352            message: 'maximumSelected',
17353            args: {
17354              maximum: self.maximumSelectionLength
17355            }
17356          });
17357          return;
17358        }
17359
17360        if (successCallback) {
17361          successCallback();
17362        }
17363      });
17364  };
17365
17366  return MaximumSelectionLength;
17367});
17368
17369S2.define('select2/dropdown',[
17370  'jquery',
17371  './utils'
17372], function ($, Utils) {
17373  function Dropdown ($element, options) {
17374    this.$element = $element;
17375    this.options = options;
17376
17377    Dropdown.__super__.constructor.call(this);
17378  }
17379
17380  Utils.Extend(Dropdown, Utils.Observable);
17381
17382  Dropdown.prototype.render = function () {
17383    var $dropdown = $(
17384      '<span class="select2-dropdown">' +
17385        '<span class="select2-results"></span>' +
17386      '</span>'
17387    );
17388
17389    $dropdown.attr('dir', this.options.get('dir'));
17390
17391    this.$dropdown = $dropdown;
17392
17393    return $dropdown;
17394  };
17395
17396  Dropdown.prototype.bind = function () {
17397    // Should be implemented in subclasses
17398  };
17399
17400  Dropdown.prototype.position = function ($dropdown, $container) {
17401    // Should be implemented in subclasses
17402  };
17403
17404  Dropdown.prototype.destroy = function () {
17405    // Remove the dropdown from the DOM
17406    this.$dropdown.remove();
17407  };
17408
17409  return Dropdown;
17410});
17411
17412S2.define('select2/dropdown/search',[
17413  'jquery'
17414], function ($) {
17415  function Search () { }
17416
17417  Search.prototype.render = function (decorated) {
17418    var $rendered = decorated.call(this);
17419    var searchLabel = this.options.get('translations').get('search');
17420
17421    var $search = $(
17422      '<span class="select2-search select2-search--dropdown">' +
17423        '<input class="select2-search__field" type="search" tabindex="-1"' +
17424        ' autocorrect="off" autocapitalize="none"' +
17425        ' spellcheck="false" role="searchbox" aria-autocomplete="list" />' +
17426      '</span>'
17427    );
17428
17429    this.$searchContainer = $search;
17430    this.$search = $search.find('input');
17431
17432    this.$search.prop('autocomplete', this.options.get('autocomplete'));
17433    this.$search.attr('aria-label', searchLabel());
17434
17435    $rendered.prepend($search);
17436
17437    return $rendered;
17438  };
17439
17440  Search.prototype.bind = function (decorated, container, $container) {
17441    var self = this;
17442
17443    var resultsId = container.id + '-results';
17444
17445    decorated.call(this, container, $container);
17446
17447    this.$search.on('keydown', function (evt) {
17448      self.trigger('keypress', evt);
17449
17450      self._keyUpPrevented = evt.isDefaultPrevented();
17451    });
17452
17453    // Workaround for browsers which do not support the `input` event
17454    // This will prevent double-triggering of events for browsers which support
17455    // both the `keyup` and `input` events.
17456    this.$search.on('input', function (evt) {
17457      // Unbind the duplicated `keyup` event
17458      $(this).off('keyup');
17459    });
17460
17461    this.$search.on('keyup input', function (evt) {
17462      self.handleSearch(evt);
17463    });
17464
17465    container.on('open', function () {
17466      self.$search.attr('tabindex', 0);
17467      self.$search.attr('aria-controls', resultsId);
17468
17469      self.$search.trigger('focus');
17470
17471      window.setTimeout(function () {
17472        self.$search.trigger('focus');
17473      }, 0);
17474    });
17475
17476    container.on('close', function () {
17477      self.$search.attr('tabindex', -1);
17478      self.$search.removeAttr('aria-controls');
17479      self.$search.removeAttr('aria-activedescendant');
17480
17481      self.$search.val('');
17482      self.$search.trigger('blur');
17483    });
17484
17485    container.on('focus', function () {
17486      if (!container.isOpen()) {
17487        self.$search.trigger('focus');
17488      }
17489    });
17490
17491    container.on('results:all', function (params) {
17492      if (params.query.term == null || params.query.term === '') {
17493        var showSearch = self.showSearch(params);
17494
17495        if (showSearch) {
17496          self.$searchContainer[0].classList.remove('select2-search--hide');
17497        } else {
17498          self.$searchContainer[0].classList.add('select2-search--hide');
17499        }
17500      }
17501    });
17502
17503    container.on('results:focus', function (params) {
17504      if (params.data._resultId) {
17505        self.$search.attr('aria-activedescendant', params.data._resultId);
17506      } else {
17507        self.$search.removeAttr('aria-activedescendant');
17508      }
17509    });
17510  };
17511
17512  Search.prototype.handleSearch = function (evt) {
17513    if (!this._keyUpPrevented) {
17514      var input = this.$search.val();
17515
17516      this.trigger('query', {
17517        term: input
17518      });
17519    }
17520
17521    this._keyUpPrevented = false;
17522  };
17523
17524  Search.prototype.showSearch = function (_, params) {
17525    return true;
17526  };
17527
17528  return Search;
17529});
17530
17531S2.define('select2/dropdown/hidePlaceholder',[
17532
17533], function () {
17534  function HidePlaceholder (decorated, $element, options, dataAdapter) {
17535    this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
17536
17537    decorated.call(this, $element, options, dataAdapter);
17538  }
17539
17540  HidePlaceholder.prototype.append = function (decorated, data) {
17541    data.results = this.removePlaceholder(data.results);
17542
17543    decorated.call(this, data);
17544  };
17545
17546  HidePlaceholder.prototype.normalizePlaceholder = function (_, placeholder) {
17547    if (typeof placeholder === 'string') {
17548      placeholder = {
17549        id: '',
17550        text: placeholder
17551      };
17552    }
17553
17554    return placeholder;
17555  };
17556
17557  HidePlaceholder.prototype.removePlaceholder = function (_, data) {
17558    var modifiedData = data.slice(0);
17559
17560    for (var d = data.length - 1; d >= 0; d--) {
17561      var item = data[d];
17562
17563      if (this.placeholder.id === item.id) {
17564        modifiedData.splice(d, 1);
17565      }
17566    }
17567
17568    return modifiedData;
17569  };
17570
17571  return HidePlaceholder;
17572});
17573
17574S2.define('select2/dropdown/infiniteScroll',[
17575  'jquery'
17576], function ($) {
17577  function InfiniteScroll (decorated, $element, options, dataAdapter) {
17578    this.lastParams = {};
17579
17580    decorated.call(this, $element, options, dataAdapter);
17581
17582    this.$loadingMore = this.createLoadingMore();
17583    this.loading = false;
17584  }
17585
17586  InfiniteScroll.prototype.append = function (decorated, data) {
17587    this.$loadingMore.remove();
17588    this.loading = false;
17589
17590    decorated.call(this, data);
17591
17592    if (this.showLoadingMore(data)) {
17593      this.$results.append(this.$loadingMore);
17594      this.loadMoreIfNeeded();
17595    }
17596  };
17597
17598  InfiniteScroll.prototype.bind = function (decorated, container, $container) {
17599    var self = this;
17600
17601    decorated.call(this, container, $container);
17602
17603    container.on('query', function (params) {
17604      self.lastParams = params;
17605      self.loading = true;
17606    });
17607
17608    container.on('query:append', function (params) {
17609      self.lastParams = params;
17610      self.loading = true;
17611    });
17612
17613    this.$results.on('scroll', this.loadMoreIfNeeded.bind(this));
17614  };
17615
17616  InfiniteScroll.prototype.loadMoreIfNeeded = function () {
17617    var isLoadMoreVisible = $.contains(
17618      document.documentElement,
17619      this.$loadingMore[0]
17620    );
17621
17622    if (this.loading || !isLoadMoreVisible) {
17623      return;
17624    }
17625
17626    var currentOffset = this.$results.offset().top +
17627      this.$results.outerHeight(false);
17628    var loadingMoreOffset = this.$loadingMore.offset().top +
17629      this.$loadingMore.outerHeight(false);
17630
17631    if (currentOffset + 50 >= loadingMoreOffset) {
17632      this.loadMore();
17633    }
17634  };
17635
17636  InfiniteScroll.prototype.loadMore = function () {
17637    this.loading = true;
17638
17639    var params = $.extend({}, {page: 1}, this.lastParams);
17640
17641    params.page++;
17642
17643    this.trigger('query:append', params);
17644  };
17645
17646  InfiniteScroll.prototype.showLoadingMore = function (_, data) {
17647    return data.pagination && data.pagination.more;
17648  };
17649
17650  InfiniteScroll.prototype.createLoadingMore = function () {
17651    var $option = $(
17652      '<li ' +
17653      'class="select2-results__option select2-results__option--load-more"' +
17654      'role="option" aria-disabled="true"></li>'
17655    );
17656
17657    var message = this.options.get('translations').get('loadingMore');
17658
17659    $option.html(message(this.lastParams));
17660
17661    return $option;
17662  };
17663
17664  return InfiniteScroll;
17665});
17666
17667S2.define('select2/dropdown/attachBody',[
17668  'jquery',
17669  '../utils'
17670], function ($, Utils) {
17671  function AttachBody (decorated, $element, options) {
17672    this.$dropdownParent = $(options.get('dropdownParent') || document.body);
17673
17674    decorated.call(this, $element, options);
17675  }
17676
17677  AttachBody.prototype.bind = function (decorated, container, $container) {
17678    var self = this;
17679
17680    decorated.call(this, container, $container);
17681
17682    container.on('open', function () {
17683      self._showDropdown();
17684      self._attachPositioningHandler(container);
17685
17686      // Must bind after the results handlers to ensure correct sizing
17687      self._bindContainerResultHandlers(container);
17688    });
17689
17690    container.on('close', function () {
17691      self._hideDropdown();
17692      self._detachPositioningHandler(container);
17693    });
17694
17695    this.$dropdownContainer.on('mousedown', function (evt) {
17696      evt.stopPropagation();
17697    });
17698  };
17699
17700  AttachBody.prototype.destroy = function (decorated) {
17701    decorated.call(this);
17702
17703    this.$dropdownContainer.remove();
17704  };
17705
17706  AttachBody.prototype.position = function (decorated, $dropdown, $container) {
17707    // Clone all of the container classes
17708    $dropdown.attr('class', $container.attr('class'));
17709
17710    $dropdown[0].classList.remove('select2');
17711    $dropdown[0].classList.add('select2-container--open');
17712
17713    $dropdown.css({
17714      position: 'absolute',
17715      top: -999999
17716    });
17717
17718    this.$container = $container;
17719  };
17720
17721  AttachBody.prototype.render = function (decorated) {
17722    var $container = $('<span></span>');
17723
17724    var $dropdown = decorated.call(this);
17725    $container.append($dropdown);
17726
17727    this.$dropdownContainer = $container;
17728
17729    return $container;
17730  };
17731
17732  AttachBody.prototype._hideDropdown = function (decorated) {
17733    this.$dropdownContainer.detach();
17734  };
17735
17736  AttachBody.prototype._bindContainerResultHandlers =
17737      function (decorated, container) {
17738
17739    // These should only be bound once
17740    if (this._containerResultsHandlersBound) {
17741      return;
17742    }
17743
17744    var self = this;
17745
17746    container.on('results:all', function () {
17747      self._positionDropdown();
17748      self._resizeDropdown();
17749    });
17750
17751    container.on('results:append', function () {
17752      self._positionDropdown();
17753      self._resizeDropdown();
17754    });
17755
17756    container.on('results:message', function () {
17757      self._positionDropdown();
17758      self._resizeDropdown();
17759    });
17760
17761    container.on('select', function () {
17762      self._positionDropdown();
17763      self._resizeDropdown();
17764    });
17765
17766    container.on('unselect', function () {
17767      self._positionDropdown();
17768      self._resizeDropdown();
17769    });
17770
17771    this._containerResultsHandlersBound = true;
17772  };
17773
17774  AttachBody.prototype._attachPositioningHandler =
17775      function (decorated, container) {
17776    var self = this;
17777
17778    var scrollEvent = 'scroll.select2.' + container.id;
17779    var resizeEvent = 'resize.select2.' + container.id;
17780    var orientationEvent = 'orientationchange.select2.' + container.id;
17781
17782    var $watchers = this.$container.parents().filter(Utils.hasScroll);
17783    $watchers.each(function () {
17784      Utils.StoreData(this, 'select2-scroll-position', {
17785        x: $(this).scrollLeft(),
17786        y: $(this).scrollTop()
17787      });
17788    });
17789
17790    $watchers.on(scrollEvent, function (ev) {
17791      var position = Utils.GetData(this, 'select2-scroll-position');
17792      $(this).scrollTop(position.y);
17793    });
17794
17795    $(window).on(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent,
17796      function (e) {
17797      self._positionDropdown();
17798      self._resizeDropdown();
17799    });
17800  };
17801
17802  AttachBody.prototype._detachPositioningHandler =
17803      function (decorated, container) {
17804    var scrollEvent = 'scroll.select2.' + container.id;
17805    var resizeEvent = 'resize.select2.' + container.id;
17806    var orientationEvent = 'orientationchange.select2.' + container.id;
17807
17808    var $watchers = this.$container.parents().filter(Utils.hasScroll);
17809    $watchers.off(scrollEvent);
17810
17811    $(window).off(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent);
17812  };
17813
17814  AttachBody.prototype._positionDropdown = function () {
17815    var $window = $(window);
17816
17817    var isCurrentlyAbove = this.$dropdown[0].classList
17818      .contains('select2-dropdown--above');
17819    var isCurrentlyBelow = this.$dropdown[0].classList
17820      .contains('select2-dropdown--below');
17821
17822    var newDirection = null;
17823
17824    var offset = this.$container.offset();
17825
17826    offset.bottom = offset.top + this.$container.outerHeight(false);
17827
17828    var container = {
17829      height: this.$container.outerHeight(false)
17830    };
17831
17832    container.top = offset.top;
17833    container.bottom = offset.top + container.height;
17834
17835    var dropdown = {
17836      height: this.$dropdown.outerHeight(false)
17837    };
17838
17839    var viewport = {
17840      top: $window.scrollTop(),
17841      bottom: $window.scrollTop() + $window.height()
17842    };
17843
17844    var enoughRoomAbove = viewport.top < (offset.top - dropdown.height);
17845    var enoughRoomBelow = viewport.bottom > (offset.bottom + dropdown.height);
17846
17847    var css = {
17848      left: offset.left,
17849      top: container.bottom
17850    };
17851
17852    // Determine what the parent element is to use for calculating the offset
17853    var $offsetParent = this.$dropdownParent;
17854
17855    // For statically positioned elements, we need to get the element
17856    // that is determining the offset
17857    if ($offsetParent.css('position') === 'static') {
17858      $offsetParent = $offsetParent.offsetParent();
17859    }
17860
17861    var parentOffset = {
17862      top: 0,
17863      left: 0
17864    };
17865
17866    if (
17867      $.contains(document.body, $offsetParent[0]) ||
17868      $offsetParent[0].isConnected
17869      ) {
17870      parentOffset = $offsetParent.offset();
17871    }
17872
17873    css.top -= parentOffset.top;
17874    css.left -= parentOffset.left;
17875
17876    if (!isCurrentlyAbove && !isCurrentlyBelow) {
17877      newDirection = 'below';
17878    }
17879
17880    if (!enoughRoomBelow && enoughRoomAbove && !isCurrentlyAbove) {
17881      newDirection = 'above';
17882    } else if (!enoughRoomAbove && enoughRoomBelow && isCurrentlyAbove) {
17883      newDirection = 'below';
17884    }
17885
17886    if (newDirection == 'above' ||
17887      (isCurrentlyAbove && newDirection !== 'below')) {
17888      css.top = container.top - parentOffset.top - dropdown.height;
17889    }
17890
17891    if (newDirection != null) {
17892      this.$dropdown[0].classList.remove('select2-dropdown--below');
17893      this.$dropdown[0].classList.remove('select2-dropdown--above');
17894      this.$dropdown[0].classList.add('select2-dropdown--' + newDirection);
17895
17896      this.$container[0].classList.remove('select2-container--below');
17897      this.$container[0].classList.remove('select2-container--above');
17898      this.$container[0].classList.add('select2-container--' + newDirection);
17899    }
17900
17901    this.$dropdownContainer.css(css);
17902  };
17903
17904  AttachBody.prototype._resizeDropdown = function () {
17905    var css = {
17906      width: this.$container.outerWidth(false) + 'px'
17907    };
17908
17909    if (this.options.get('dropdownAutoWidth')) {
17910      css.minWidth = css.width;
17911      css.position = 'relative';
17912      css.width = 'auto';
17913    }
17914
17915    this.$dropdown.css(css);
17916  };
17917
17918  AttachBody.prototype._showDropdown = function (decorated) {
17919    this.$dropdownContainer.appendTo(this.$dropdownParent);
17920
17921    this._positionDropdown();
17922    this._resizeDropdown();
17923  };
17924
17925  return AttachBody;
17926});
17927
17928S2.define('select2/dropdown/minimumResultsForSearch',[
17929
17930], function () {
17931  function countResults (data) {
17932    var count = 0;
17933
17934    for (var d = 0; d < data.length; d++) {
17935      var item = data[d];
17936
17937      if (item.children) {
17938        count += countResults(item.children);
17939      } else {
17940        count++;
17941      }
17942    }
17943
17944    return count;
17945  }
17946
17947  function MinimumResultsForSearch (decorated, $element, options, dataAdapter) {
17948    this.minimumResultsForSearch = options.get('minimumResultsForSearch');
17949
17950    if (this.minimumResultsForSearch < 0) {
17951      this.minimumResultsForSearch = Infinity;
17952    }
17953
17954    decorated.call(this, $element, options, dataAdapter);
17955  }
17956
17957  MinimumResultsForSearch.prototype.showSearch = function (decorated, params) {
17958    if (countResults(params.data.results) < this.minimumResultsForSearch) {
17959      return false;
17960    }
17961
17962    return decorated.call(this, params);
17963  };
17964
17965  return MinimumResultsForSearch;
17966});
17967
17968S2.define('select2/dropdown/selectOnClose',[
17969  '../utils'
17970], function (Utils) {
17971  function SelectOnClose () { }
17972
17973  SelectOnClose.prototype.bind = function (decorated, container, $container) {
17974    var self = this;
17975
17976    decorated.call(this, container, $container);
17977
17978    container.on('close', function (params) {
17979      self._handleSelectOnClose(params);
17980    });
17981  };
17982
17983  SelectOnClose.prototype._handleSelectOnClose = function (_, params) {
17984    if (params && params.originalSelect2Event != null) {
17985      var event = params.originalSelect2Event;
17986
17987      // Don't select an item if the close event was triggered from a select or
17988      // unselect event
17989      if (event._type === 'select' || event._type === 'unselect') {
17990        return;
17991      }
17992    }
17993
17994    var $highlightedResults = this.getHighlightedResults();
17995
17996    // Only select highlighted results
17997    if ($highlightedResults.length < 1) {
17998      return;
17999    }
18000
18001    var data = Utils.GetData($highlightedResults[0], 'data');
18002
18003    // Don't re-select already selected resulte
18004    if (
18005      (data.element != null && data.element.selected) ||
18006      (data.element == null && data.selected)
18007    ) {
18008      return;
18009    }
18010
18011    this.trigger('select', {
18012        data: data
18013    });
18014  };
18015
18016  return SelectOnClose;
18017});
18018
18019S2.define('select2/dropdown/closeOnSelect',[
18020
18021], function () {
18022  function CloseOnSelect () { }
18023
18024  CloseOnSelect.prototype.bind = function (decorated, container, $container) {
18025    var self = this;
18026
18027    decorated.call(this, container, $container);
18028
18029    container.on('select', function (evt) {
18030      self._selectTriggered(evt);
18031    });
18032
18033    container.on('unselect', function (evt) {
18034      self._selectTriggered(evt);
18035    });
18036  };
18037
18038  CloseOnSelect.prototype._selectTriggered = function (_, evt) {
18039    var originalEvent = evt.originalEvent;
18040
18041    // Don't close if the control key is being held
18042    if (originalEvent && (originalEvent.ctrlKey || originalEvent.metaKey)) {
18043      return;
18044    }
18045
18046    this.trigger('close', {
18047      originalEvent: originalEvent,
18048      originalSelect2Event: evt
18049    });
18050  };
18051
18052  return CloseOnSelect;
18053});
18054
18055S2.define('select2/dropdown/dropdownCss',[
18056  '../utils'
18057], function (Utils) {
18058  function DropdownCSS () { }
18059
18060  DropdownCSS.prototype.render = function (decorated) {
18061    var $dropdown = decorated.call(this);
18062
18063    var dropdownCssClass = this.options.get('dropdownCssClass') || '';
18064
18065    if (dropdownCssClass.indexOf(':all:') !== -1) {
18066      dropdownCssClass = dropdownCssClass.replace(':all:', '');
18067
18068      Utils.copyNonInternalCssClasses($dropdown[0], this.$element[0]);
18069    }
18070
18071    $dropdown.addClass(dropdownCssClass
vendor: 10,812 bytes, lines 18071-18493
18071);
18072
18073    return $dropdown;
18074  };
18075
18076  return DropdownCSS;
18077});
18078
18079S2.define('select2/dropdown/tagsSearchHighlight',[
18080  '../utils'
18081], function (Utils) {
18082  function TagsSearchHighlight () { }
18083
18084  TagsSearchHighlight.prototype.highlightFirstItem = function (decorated) {
18085    var $options = this.$results
18086    .find(
18087      '.select2-results__option--selectable' +
18088      ':not(.select2-results__option--selected)'
18089    );
18090
18091    if ($options.length > 0) {
18092      var $firstOption = $options.first();
18093      var data = Utils.GetData($firstOption[0], 'data');
18094      var firstElement = data.element;
18095
18096      if (firstElement && firstElement.getAttribute) {
18097        if (firstElement.getAttribute('data-select2-tag') === 'true') {
18098          $firstOption.trigger('mouseenter');
18099
18100          return;
18101        }
18102      }
18103    }
18104
18105    decorated.call(this);
18106  };
18107
18108  return TagsSearchHighlight;
18109});
18110
18111S2.define('select2/i18n/en',[],function () {
18112  // English
18113  return {
18114    errorLoading: function () {
18115      return 'The results could not be loaded.';
18116    },
18117    inputTooLong: function (args) {
18118      var overChars = args.input.length - args.maximum;
18119
18120      var message = 'Please delete ' + overChars + ' character';
18121
18122      if (overChars != 1) {
18123        message += 's';
18124      }
18125
18126      return message;
18127    },
18128    inputTooShort: function (args) {
18129      var remainingChars = args.minimum - args.input.length;
18130
18131      var message = 'Please enter ' + remainingChars + ' or more characters';
18132
18133      return message;
18134    },
18135    loadingMore: function () {
18136      return 'Loading more results…';
18137    },
18138    maximumSelected: function (args) {
18139      var message = 'You can only select ' + args.maximum + ' item';
18140
18141      if (args.maximum != 1) {
18142        message += 's';
18143      }
18144
18145      return message;
18146    },
18147    noResults: function () {
18148      return 'No results found';
18149    },
18150    searching: function () {
18151      return 'Searching…';
18152    },
18153    removeAllItems: function () {
18154      return 'Remove all items';
18155    },
18156    removeItem: function () {
18157      return 'Remove item';
18158    },
18159    search: function() {
18160      return 'Search';
18161    }
18162  };
18163});
18164
18165S2.define('select2/defaults',[
18166  'jquery',
18167
18168  './results',
18169
18170  './selection/single',
18171  './selection/multiple',
18172  './selection/placeholder',
18173  './selection/allowClear',
18174  './selection/search',
18175  './selection/selectionCss',
18176  './selection/eventRelay',
18177
18178  './utils',
18179  './translation',
18180  './diacritics',
18181
18182  './data/select',
18183  './data/array',
18184  './data/ajax',
18185  './data/tags',
18186  './data/tokenizer',
18187  './data/minimumInputLength',
18188  './data/maximumInputLength',
18189  './data/maximumSelectionLength',
18190
18191  './dropdown',
18192  './dropdown/search',
18193  './dropdown/hidePlaceholder',
18194  './dropdown/infiniteScroll',
18195  './dropdown/attachBody',
18196  './dropdown/minimumResultsForSearch',
18197  './dropdown/selectOnClose',
18198  './dropdown/closeOnSelect',
18199  './dropdown/dropdownCss',
18200  './dropdown/tagsSearchHighlight',
18201
18202  './i18n/en'
18203], function ($,
18204
18205             ResultsList,
18206
18207             SingleSelection, MultipleSelection, Placeholder, AllowClear,
18208             SelectionSearch, SelectionCSS, EventRelay,
18209
18210             Utils, Translation, DIACRITICS,
18211
18212             SelectData, ArrayData, AjaxData, Tags, Tokenizer,
18213             MinimumInputLength, MaximumInputLength, MaximumSelectionLength,
18214
18215             Dropdown, DropdownSearch, HidePlaceholder, InfiniteScroll,
18216             AttachBody, MinimumResultsForSearch, SelectOnClose, CloseOnSelect,
18217             DropdownCSS, TagsSearchHighlight,
18218
18219             EnglishTranslation) {
18220  function Defaults () {
18221    this.reset();
18222  }
18223
18224  Defaults.prototype.apply = function (options) {
18225    options = $.extend(true, {}, this.defaults, options);
18226
18227    if (options.dataAdapter == null) {
18228      if (options.ajax != null) {
18229        options.dataAdapter = AjaxData;
18230      } else if (options.data != null) {
18231        options.dataAdapter = ArrayData;
18232      } else {
18233        options.dataAdapter = SelectData;
18234      }
18235
18236      if (options.minimumInputLength > 0) {
18237        options.dataAdapter = Utils.Decorate(
18238          options.dataAdapter,
18239          MinimumInputLength
18240        );
18241      }
18242
18243      if (options.maximumInputLength > 0) {
18244        options.dataAdapter = Utils.Decorate(
18245          options.dataAdapter,
18246          MaximumInputLength
18247        );
18248      }
18249
18250      if (options.maximumSelectionLength > 0) {
18251        options.dataAdapter = Utils.Decorate(
18252          options.dataAdapter,
18253          MaximumSelectionLength
18254        );
18255      }
18256
18257      if (options.tags) {
18258        options.dataAdapter = Utils.Decorate(options.dataAdapter, Tags);
18259      }
18260
18261      if (options.tokenSeparators != null || options.tokenizer != null) {
18262        options.dataAdapter = Utils.Decorate(
18263          options.dataAdapter,
18264          Tokenizer
18265        );
18266      }
18267    }
18268
18269    if (options.resultsAdapter == null) {
18270      options.resultsAdapter = ResultsList;
18271
18272      if (options.ajax != null) {
18273        options.resultsAdapter = Utils.Decorate(
18274          options.resultsAdapter,
18275          InfiniteScroll
18276        );
18277      }
18278
18279      if (options.placeholder != null) {
18280        options.resultsAdapter = Utils.Decorate(
18281          options.resultsAdapter,
18282          HidePlaceholder
18283        );
18284      }
18285
18286      if (options.selectOnClose) {
18287        options.resultsAdapter = Utils.Decorate(
18288          options.resultsAdapter,
18289          SelectOnClose
18290        );
18291      }
18292
18293      if (options.tags) {
18294        options.resultsAdapter = Utils.Decorate(
18295          options.resultsAdapter,
18296          TagsSearchHighlight
18297        );
18298      }
18299    }
18300
18301    if (options.dropdownAdapter == null) {
18302      if (options.multiple) {
18303        options.dropdownAdapter = Dropdown;
18304      } else {
18305        var SearchableDropdown = Utils.Decorate(Dropdown, DropdownSearch);
18306
18307        options.dropdownAdapter = SearchableDropdown;
18308      }
18309
18310      if (options.minimumResultsForSearch !== 0) {
18311        options.dropdownAdapter = Utils.Decorate(
18312          options.dropdownAdapter,
18313          MinimumResultsForSearch
18314        );
18315      }
18316
18317      if (options.closeOnSelect) {
18318        options.dropdownAdapter = Utils.Decorate(
18319          options.dropdownAdapter,
18320          CloseOnSelect
18321        );
18322      }
18323
18324      if (options.dropdownCssClass != null) {
18325        options.dropdownAdapter = Utils.Decorate(
18326          options.dropdownAdapter,
18327          DropdownCSS
18328        );
18329      }
18330
18331      options.dropdownAdapter = Utils.Decorate(
18332        options.dropdownAdapter,
18333        AttachBody
18334      );
18335    }
18336
18337    if (options.selectionAdapter == null) {
18338      if (options.multiple) {
18339        options.selectionAdapter = MultipleSelection;
18340      } else {
18341        options.selectionAdapter = SingleSelection;
18342      }
18343
18344      // Add the placeholder mixin if a placeholder was specified
18345      if (options.placeholder != null) {
18346        options.selectionAdapter = Utils.Decorate(
18347          options.selectionAdapter,
18348          Placeholder
18349        );
18350      }
18351
18352      if (options.allowClear) {
18353        options.selectionAdapter = Utils.Decorate(
18354          options.selectionAdapter,
18355          AllowClear
18356        );
18357      }
18358
18359      if (options.multiple) {
18360        options.selectionAdapter = Utils.Decorate(
18361          options.selectionAdapter,
18362          SelectionSearch
18363        );
18364      }
18365
18366      if (options.selectionCssClass != null) {
18367        options.selectionAdapter = Utils.Decorate(
18368          options.selectionAdapter,
18369          SelectionCSS
18370        );
18371      }
18372
18373      options.selectionAdapter = Utils.Decorate(
18374        options.selectionAdapter,
18375        EventRelay
18376      );
18377    }
18378
18379    // If the defaults were not previously applied from an element, it is
18380    // possible for the language option to have not been resolved
18381    options.language = this._resolveLanguage(options.language);
18382
18383    // Always fall back to English since it will always be complete
18384    options.language.push('en');
18385
18386    var uniqueLanguages = [];
18387
18388    for (var l = 0; l < options.language.length; l++) {
18389      var language = options.language[l];
18390
18391      if (uniqueLanguages.indexOf(language) === -1) {
18392        uniqueLanguages.push(language);
18393      }
18394    }
18395
18396    options.language = uniqueLanguages;
18397
18398    options.translations = this._processTranslations(
18399      options.language,
18400      options.debug
18401    );
18402
18403    return options;
18404  };
18405
18406  Defaults.prototype.reset = function () {
18407    function stripDiacritics (text) {
18408      // Used 'uni range + named function' from http://jsperf.com/diacritics/18
18409      function match(a) {
18410        return DIACRITICS[a] || a;
18411      }
18412
18413      return text.replace(/[^\u0000-\u007E]/g, match);
18414    }
18415
18416    function matcher (params, data) {
18417      // Always return the object if there is nothing to compare
18418      if (params.term == null || params.term.trim() === '') {
18419        return data;
18420      }
18421
18422      // Do a recursive check for options with children
18423      if (data.children && data.children.length > 0) {
18424        // Clone the data object if there are children
18425        // This is required as we modify the object to remove any non-matches
18426        var match = $.extend(true, {}, data);
18427
18428        // Check each child of the option
18429        for (var c = data.children.length - 1; c >= 0; c--) {
18430          var child = data.children[c];
18431
18432          var matches = matcher(params, child);
18433
18434          // If there wasn't a match, remove the object in the array
18435          if (matches == null) {
18436            match.children.splice(c, 1);
18437          }
18438        }
18439
18440        // If any children matched, return the new object
18441        if (match.children.length > 0) {
18442          return match;
18443        }
18444
18445        // If there were no matching children, check just the plain object
18446        return matcher(params, match);
18447      }
18448
18449      var original = stripDiacritics(data.text).toUpperCase();
18450      var term = stripDiacritics(params.term).toUpperCase();
18451
18452      // Check if the text contains the term
18453      if (original.indexOf(term) > -1) {
18454        return data;
18455      }
18456
18457      // If it doesn't contain the term, don't return anything
18458      return null;
18459    }
18460
18461    this.defaults = {
18462      amdLanguageBase: './i18n/',
18463      autocomplete: 'off',
18464      closeOnSelect: true,
18465      debug: false,
18466      dropdownAutoWidth: false,
18467      escapeMarkup: Utils.escapeMarkup,
18468      language: {},
18469      matcher: matcher,
18470      minimumInputLength: 0,
18471      maximumInputLength: 0,
18472      maximumSelectionLength: 0,
18473      minimumResultsForSearch: 0,
18474      selectOnClose: false,
18475      scrollAfterSelect: false,
18476      sorter: function (data) {
18477        return data;
18478      },
18479      templateResult: function (result) {
18480        return result.text;
18481      },
18482      templateSelection: function (selection) {
18483        return selection.text;
18484      },
18485      theme: 'default',
18486      width: 'resolve'
18487    };
18488  };
18489
18490  Defaults.prototype.applyFromElement = function (options, $element) {
18491    var optionLanguage = options.language;
18492    var defaultLanguage = this.defaults.language;
18493    var elementLanguage = $element
vendor: 23,793 bytes, lines 18493-19417
18493.prop('lang');
18494    var parentLanguage = $element.closest('[lang]').prop('lang');
18495
18496    var languages = Array.prototype.concat.call(
18497      this._resolveLanguage(elementLanguage),
18498      this._resolveLanguage(optionLanguage),
18499      this._resolveLanguage(defaultLanguage),
18500      this._resolveLanguage(parentLanguage)
18501    );
18502
18503    options.language = languages;
18504
18505    return options;
18506  };
18507
18508  Defaults.prototype._resolveLanguage = function (language) {
18509    if (!language) {
18510      return [];
18511    }
18512
18513    if ($.isEmptyObject(language)) {
18514      return [];
18515    }
18516
18517    if ($.isPlainObject(language)) {
18518      return [language];
18519    }
18520
18521    var languages;
18522
18523    if (!Array.isArray(language)) {
18524      languages = [language];
18525    } else {
18526      languages = language;
18527    }
18528
18529    var resolvedLanguages = [];
18530
18531    for (var l = 0; l < languages.length; l++) {
18532      resolvedLanguages.push(languages[l]);
18533
18534      if (typeof languages[l] === 'string' && languages[l].indexOf('-') > 0) {
18535        // Extract the region information if it is included
18536        var languageParts = languages[l].split('-');
18537        var baseLanguage = languageParts[0];
18538
18539        resolvedLanguages.push(baseLanguage);
18540      }
18541    }
18542
18543    return resolvedLanguages;
18544  };
18545
18546  Defaults.prototype._processTranslations = function (languages, debug) {
18547    var translations = new Translation();
18548
18549    for (var l = 0; l < languages.length; l++) {
18550      var languageData = new Translation();
18551
18552      var language = languages[l];
18553
18554      if (typeof language === 'string') {
18555        try {
18556          // Try to load it with the original name
18557          languageData = Translation.loadPath(language);
18558        } catch (e) {
18559          try {
18560            // If we couldn't load it, check if it wasn't the full path
18561            language = this.defaults.amdLanguageBase + language;
18562            languageData = Translation.loadPath(language);
18563          } catch (ex) {
18564            // The translation could not be loaded at all. Sometimes this is
18565            // because of a configuration problem, other times this can be
18566            // because of how Select2 helps load all possible translation files
18567            if (debug && window.console && console.warn) {
18568              console.warn(
18569                'Select2: The language file for "' + language + '" could ' +
18570                'not be automatically loaded. A fallback will be used instead.'
18571              );
18572            }
18573          }
18574        }
18575      } else if ($.isPlainObject(language)) {
18576        languageData = new Translation(language);
18577      } else {
18578        languageData = language;
18579      }
18580
18581      translations.extend(languageData);
18582    }
18583
18584    return translations;
18585  };
18586
18587  Defaults.prototype.set = function (key, value) {
18588    var camelKey = $.camelCase(key);
18589
18590    var data = {};
18591    data[camelKey] = value;
18592
18593    var convertedData = Utils._convertData(data);
18594
18595    $.extend(true, this.defaults, convertedData);
18596  };
18597
18598  var defaults = new Defaults();
18599
18600  return defaults;
18601});
18602
18603S2.define('select2/options',[
18604  'jquery',
18605  './defaults',
18606  './utils'
18607], function ($, Defaults, Utils) {
18608  function Options (options, $element) {
18609    this.options = options;
18610
18611    if ($element != null) {
18612      this.fromElement($element);
18613    }
18614
18615    if ($element != null) {
18616      this.options = Defaults.applyFromElement(this.options, $element);
18617    }
18618
18619    this.options = Defaults.apply(this.options);
18620  }
18621
18622  Options.prototype.fromElement = function ($e) {
18623    var excludedData = ['select2'];
18624
18625    if (this.options.multiple == null) {
18626      this.options.multiple = $e.prop('multiple');
18627    }
18628
18629    if (this.options.disabled == null) {
18630      this.options.disabled = $e.prop('disabled');
18631    }
18632
18633    if (this.options.autocomplete == null && $e.prop('autocomplete')) {
18634      this.options.autocomplete = $e.prop('autocomplete');
18635    }
18636
18637    if (this.options.dir == null) {
18638      if ($e.prop('dir')) {
18639        this.options.dir = $e.prop('dir');
18640      } else if ($e.closest('[dir]').prop('dir')) {
18641        this.options.dir = $e.closest('[dir]').prop('dir');
18642      } else {
18643        this.options.dir = 'ltr';
18644      }
18645    }
18646
18647    $e.prop('disabled', this.options.disabled);
18648    $e.prop('multiple', this.options.multiple);
18649
18650    if (Utils.GetData($e[0], 'select2Tags')) {
18651      if (this.options.debug && window.console && console.warn) {
18652        console.warn(
18653          'Select2: The `data-select2-tags` attribute has been changed to ' +
18654          'use the `data-data` and `data-tags="true"` attributes and will be ' +
18655          'removed in future versions of Select2.'
18656        );
18657      }
18658
18659      Utils.StoreData($e[0], 'data', Utils.GetData($e[0], 'select2Tags'));
18660      Utils.StoreData($e[0], 'tags', true);
18661    }
18662
18663    if (Utils.GetData($e[0], 'ajaxUrl')) {
18664      if (this.options.debug && window.console && console.warn) {
18665        console.warn(
18666          'Select2: The `data-ajax-url` attribute has been changed to ' +
18667          '`data-ajax--url` and support for the old attribute will be removed' +
18668          ' in future versions of Select2.'
18669        );
18670      }
18671
18672      $e.attr('ajax--url', Utils.GetData($e[0], 'ajaxUrl'));
18673      Utils.StoreData($e[0], 'ajax-Url', Utils.GetData($e[0], 'ajaxUrl'));
18674    }
18675
18676    var dataset = {};
18677
18678    function upperCaseLetter(_, letter) {
18679      return letter.toUpperCase();
18680    }
18681
18682    // Pre-load all of the attributes which are prefixed with `data-`
18683    for (var attr = 0; attr < $e[0].attributes.length; attr++) {
18684      var attributeName = $e[0].attributes[attr].name;
18685      var prefix = 'data-';
18686
18687      if (attributeName.substr(0, prefix.length) == prefix) {
18688        // Get the contents of the attribute after `data-`
18689        var dataName = attributeName.substring(prefix.length);
18690
18691        // Get the data contents from the consistent source
18692        // This is more than likely the jQuery data helper
18693        var dataValue = Utils.GetData($e[0], dataName);
18694
18695        // camelCase the attribute name to match the spec
18696        var camelDataName = dataName.replace(/-([a-z])/g, upperCaseLetter);
18697
18698        // Store the data attribute contents into the dataset since
18699        dataset[camelDataName] = dataValue;
18700      }
18701    }
18702
18703    // Prefer the element's `dataset` attribute if it exists
18704    // jQuery 1.x does not correctly handle data attributes with multiple dashes
18705    if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {
18706      dataset = $.extend(true, {}, $e[0].dataset, dataset);
18707    }
18708
18709    // Prefer our internal data cache if it exists
18710    var data = $.extend(true, {}, Utils.GetData($e[0]), dataset);
18711
18712    data = Utils._convertData(data);
18713
18714    for (var key in data) {
18715      if (excludedData.indexOf(key) > -1) {
18716        continue;
18717      }
18718
18719      if ($.isPlainObject(this.options[key])) {
18720        $.extend(this.options[key], data[key]);
18721      } else {
18722        this.options[key] = data[key];
18723      }
18724    }
18725
18726    return this;
18727  };
18728
18729  Options.prototype.get = function (key) {
18730    return this.options[key];
18731  };
18732
18733  Options.prototype.set = function (key, val) {
18734    this.options[key] = val;
18735  };
18736
18737  return Options;
18738});
18739
18740S2.define('select2/core',[
18741  'jquery',
18742  './options',
18743  './utils',
18744  './keys'
18745], function ($, Options, Utils, KEYS) {
18746  var Select2 = function ($element, options) {
18747    if (Utils.GetData($element[0], 'select2') != null) {
18748      Utils.GetData($element[0], 'select2').destroy();
18749    }
18750
18751    this.$element = $element;
18752
18753    this.id = this._generateId($element);
18754
18755    options = options || {};
18756
18757    this.options = new Options(options, $element);
18758
18759    Select2.__super__.constructor.call(this);
18760
18761    // Set up the tabindex
18762
18763    var tabindex = $element.attr('tabindex') || 0;
18764    Utils.StoreData($element[0], 'old-tabindex', tabindex);
18765    $element.attr('tabindex', '-1');
18766
18767    // Set up containers and adapters
18768
18769    var DataAdapter = this.options.get('dataAdapter');
18770    this.dataAdapter = new DataAdapter($element, this.options);
18771
18772    var $container = this.render();
18773
18774    this._placeContainer($container);
18775
18776    var SelectionAdapter = this.options.get('selectionAdapter');
18777    this.selection = new SelectionAdapter($element, this.options);
18778    this.$selection = this.selection.render();
18779
18780    this.selection.position(this.$selection, $container);
18781
18782    var DropdownAdapter = this.options.get('dropdownAdapter');
18783    this.dropdown = new DropdownAdapter($element, this.options);
18784    this.$dropdown = this.dropdown.render();
18785
18786    this.dropdown.position(this.$dropdown, $container);
18787
18788    var ResultsAdapter = this.options.get('resultsAdapter');
18789    this.results = new ResultsAdapter($element, this.options, this.dataAdapter);
18790    this.$results = this.results.render();
18791
18792    this.results.position(this.$results, this.$dropdown);
18793
18794    // Bind events
18795
18796    var self = this;
18797
18798    // Bind the container to all of the adapters
18799    this._bindAdapters();
18800
18801    // Register any DOM event handlers
18802    this._registerDomEvents();
18803
18804    // Register any internal event handlers
18805    this._registerDataEvents();
18806    this._registerSelectionEvents();
18807    this._registerDropdownEvents();
18808    this._registerResultsEvents();
18809    this._registerEvents();
18810
18811    // Set the initial state
18812    this.dataAdapter.current(function (initialData) {
18813      self.trigger('selection:update', {
18814        data: initialData
18815      });
18816    });
18817
18818    // Hide the original select
18819    $element[0].classList.add('select2-hidden-accessible');
18820    $element.attr('aria-hidden', 'true');
18821
18822    // Synchronize any monitored attributes
18823    this._syncAttributes();
18824
18825    Utils.StoreData($element[0], 'select2', this);
18826
18827    // Ensure backwards compatibility with $element.data('select2').
18828    $element.data('select2', this);
18829  };
18830
18831  Utils.Extend(Select2, Utils.Observable);
18832
18833  Select2.prototype._generateId = function ($element) {
18834    var id = '';
18835
18836    if ($element.attr('id') != null) {
18837      id = $element.attr('id');
18838    } else if ($element.attr('name') != null) {
18839      id = $element.attr('name') + '-' + Utils.generateChars(2);
18840    } else {
18841      id = Utils.generateChars(4);
18842    }
18843
18844    id = id.replace(/(:|\.|\[|\]|,)/g, '');
18845    id = 'select2-' + id;
18846
18847    return id;
18848  };
18849
18850  Select2.prototype._placeContainer = function ($container) {
18851    $container.insertAfter(this.$element);
18852
18853    var width = this._resolveWidth(this.$element, this.options.get('width'));
18854
18855    if (width != null) {
18856      $container.css('width', width);
18857    }
18858  };
18859
18860  Select2.prototype._resolveWidth = function ($element, method) {
18861    var WIDTH = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;
18862
18863    if (method == 'resolve') {
18864      var styleWidth = this._resolveWidth($element, 'style');
18865
18866      if (styleWidth != null) {
18867        return styleWidth;
18868      }
18869
18870      return this._resolveWidth($element, 'element');
18871    }
18872
18873    if (method == 'element') {
18874      var elementWidth = $element.outerWidth(false);
18875
18876      if (elementWidth <= 0) {
18877        return 'auto';
18878      }
18879
18880      return elementWidth + 'px';
18881    }
18882
18883    if (method == 'style') {
18884      var style = $element.attr('style');
18885
18886      if (typeof(style) !== 'string') {
18887        return null;
18888      }
18889
18890      var attrs = style.split(';');
18891
18892      for (var i = 0, l = attrs.length; i < l; i = i + 1) {
18893        var attr = attrs[i].replace(/\s/g, '');
18894        var matches = attr.match(WIDTH);
18895
18896        if (matches !== null && matches.length >= 1) {
18897          return matches[1];
18898        }
18899      }
18900
18901      return null;
18902    }
18903
18904    if (method == 'computedstyle') {
18905      var computedStyle = window.getComputedStyle($element[0]);
18906
18907      return computedStyle.width;
18908    }
18909
18910    return method;
18911  };
18912
18913  Select2.prototype._bindAdapters = function () {
18914    this.dataAdapter.bind(this, this.$container);
18915    this.selection.bind(this, this.$container);
18916
18917    this.dropdown.bind(this, this.$container);
18918    this.results.bind(this, this.$container);
18919  };
18920
18921  Select2.prototype._registerDomEvents = function () {
18922    var self = this;
18923
18924    this.$element.on('change.select2', function () {
18925      self.dataAdapter.current(function (data) {
18926        self.trigger('selection:update', {
18927          data: data
18928        });
18929      });
18930    });
18931
18932    this.$element.on('focus.select2', function (evt) {
18933      self.trigger('focus', evt);
18934    });
18935
18936    this._syncA = Utils.bind(this._syncAttributes, this);
18937    this._syncS = Utils.bind(this._syncSubtree, this);
18938
18939    this._observer = new window.MutationObserver(function (mutations) {
18940      self._syncA();
18941      self._syncS(mutations);
18942    });
18943    this._observer.observe(this.$element[0], {
18944      attributes: true,
18945      childList: true,
18946      subtree: false
18947    });
18948  };
18949
18950  Select2.prototype._registerDataEvents = function () {
18951    var self = this;
18952
18953    this.dataAdapter.on('*', function (name, params) {
18954      self.trigger(name, params);
18955    });
18956  };
18957
18958  Select2.prototype._registerSelectionEvents = function () {
18959    var self = this;
18960    var nonRelayEvents = ['toggle', 'focus'];
18961
18962    this.selection.on('toggle', function () {
18963      self.toggleDropdown();
18964    });
18965
18966    this.selection.on('focus', function (params) {
18967      self.focus(params);
18968    });
18969
18970    this.selection.on('*', function (name, params) {
18971      if (nonRelayEvents.indexOf(name) !== -1) {
18972        return;
18973      }
18974
18975      self.trigger(name, params);
18976    });
18977  };
18978
18979  Select2.prototype._registerDropdownEvents = function () {
18980    var self = this;
18981
18982    this.dropdown.on('*', function (name, params) {
18983      self.trigger(name, params);
18984    });
18985  };
18986
18987  Select2.prototype._registerResultsEvents = function () {
18988    var self = this;
18989
18990    this.results.on('*', function (name, params) {
18991      self.trigger(name, params);
18992    });
18993  };
18994
18995  Select2.prototype._registerEvents = function () {
18996    var self = this;
18997
18998    this.on('open', function () {
18999      self.$container[0].classList.add('select2-container--open');
19000    });
19001
19002    this.on('close', function () {
19003      self.$container[0].classList.remove('select2-container--open');
19004    });
19005
19006    this.on('enable', function () {
19007      self.$container[0].classList.remove('select2-container--disabled');
19008    });
19009
19010    this.on('disable', function () {
19011      self.$container[0].classList.add('select2-container--disabled');
19012    });
19013
19014    this.on('blur', function () {
19015      self.$container[0].classList.remove('select2-container--focus');
19016    });
19017
19018    this.on('query', function (params) {
19019      if (!self.isOpen()) {
19020        self.trigger('open', {});
19021      }
19022
19023      this.dataAdapter.query(params, function (data) {
19024        self.trigger('results:all', {
19025          data: data,
19026          query: params
19027        });
19028      });
19029    });
19030
19031    this.on('query:append', function (params) {
19032      this.dataAdapter.query(params, function (data) {
19033        self.trigger('results:append', {
19034          data: data,
19035          query: params
19036        });
19037      });
19038    });
19039
19040    this.on('keypress', function (evt) {
19041      var key = evt.which;
19042
19043      if (self.isOpen()) {
19044        if (key === KEYS.ESC || (key === KEYS.UP && evt.altKey)) {
19045          self.close(evt);
19046
19047          evt.preventDefault();
19048        } else if (key === KEYS.ENTER || key === KEYS.TAB) {
19049          self.trigger('results:select', {});
19050
19051          evt.preventDefault();
19052        } else if ((key === KEYS.SPACE && evt.ctrlKey)) {
19053          self.trigger('results:toggle', {});
19054
19055          evt.preventDefault();
19056        } else if (key === KEYS.UP) {
19057          self.trigger('results:previous', {});
19058
19059          evt.preventDefault();
19060        } else if (key === KEYS.DOWN) {
19061          self.trigger('results:next', {});
19062
19063          evt.preventDefault();
19064        }
19065      } else {
19066        if (key === KEYS.ENTER || key === KEYS.SPACE ||
19067            (key === KEYS.DOWN && evt.altKey)) {
19068          self.open();
19069
19070          evt.preventDefault();
19071        }
19072      }
19073    });
19074  };
19075
19076  Select2.prototype._syncAttributes = function () {
19077    this.options.set('disabled', this.$element.prop('disabled'));
19078
19079    if (this.isDisabled()) {
19080      if (this.isOpen()) {
19081        this.close();
19082      }
19083
19084      this.trigger('disable', {});
19085    } else {
19086      this.trigger('enable', {});
19087    }
19088  };
19089
19090  Select2.prototype._isChangeMutation = function (mutations) {
19091    var self = this;
19092
19093    if (mutations.addedNodes && mutations.addedNodes.length > 0) {
19094      for (var n = 0; n < mutations.addedNodes.length; n++) {
19095        var node = mutations.addedNodes[n];
19096
19097        if (node.selected) {
19098          return true;
19099        }
19100      }
19101    } else if (mutations.removedNodes && mutations.removedNodes.length > 0) {
19102      return true;
19103    } else if (Array.isArray(mutations)) {
19104      return mutations.some(function (mutation) {
19105        return self._isChangeMutation(mutation);
19106      });
19107    }
19108
19109    return false;
19110  };
19111
19112  Select2.prototype._syncSubtree = function (mutations) {
19113    var changed = this._isChangeMutation(mutations);
19114    var self = this;
19115
19116    // Only re-pull the data if we think there is a change
19117    if (changed) {
19118      this.dataAdapter.current(function (currentData) {
19119        self.trigger('selection:update', {
19120          data: currentData
19121        });
19122      });
19123    }
19124  };
19125
19126  /**
19127   * Override the trigger method to automatically trigger pre-events when
19128   * there are events that can be prevented.
19129   */
19130  Select2.prototype.trigger = function (name, args) {
19131    var actualTrigger = Select2.__super__.trigger;
19132    var preTriggerMap = {
19133      'open': 'opening',
19134      'close': 'closing',
19135      'select': 'selecting',
19136      'unselect': 'unselecting',
19137      'clear': 'clearing'
19138    };
19139
19140    if (args === undefined) {
19141      args = {};
19142    }
19143
19144    if (name in preTriggerMap) {
19145      var preTriggerName = preTriggerMap[name];
19146      var preTriggerArgs = {
19147        prevented: false,
19148        name: name,
19149        args: args
19150      };
19151
19152      actualTrigger.call(this, preTriggerName, preTriggerArgs);
19153
19154      if (preTriggerArgs.prevented) {
19155        args.prevented = true;
19156
19157        return;
19158      }
19159    }
19160
19161    actualTrigger.call(this, name, args);
19162  };
19163
19164  Select2.prototype.toggleDropdown = function () {
19165    if (this.isDisabled()) {
19166      return;
19167    }
19168
19169    if (this.isOpen()) {
19170      this.close();
19171    } else {
19172      this.open();
19173    }
19174  };
19175
19176  Select2.prototype.open = function () {
19177    if (this.isOpen()) {
19178      return;
19179    }
19180
19181    if (this.isDisabled()) {
19182      return;
19183    }
19184
19185    this.trigger('query', {});
19186  };
19187
19188  Select2.prototype.close = function (evt) {
19189    if (!this.isOpen()) {
19190      return;
19191    }
19192
19193    this.trigger('close', { originalEvent : evt });
19194  };
19195
19196  /**
19197   * Helper method to abstract the "enabled" (not "disabled") state of this
19198   * object.
19199   *
19200   * @return {true} if the instance is not disabled.
19201   * @return {false} if the instance is disabled.
19202   */
19203  Select2.prototype.isEnabled = function () {
19204    return !this.isDisabled();
19205  };
19206
19207  /**
19208   * Helper method to abstract the "disabled" state of this object.
19209   *
19210   * @return {true} if the disabled option is true.
19211   * @return {false} if the disabled option is false.
19212   */
19213  Select2.prototype.isDisabled = function () {
19214    return this.options.get('disabled');
19215  };
19216
19217  Select2.prototype.isOpen = function () {
19218    return this.$container[0].classList.contains('select2-container--open');
19219  };
19220
19221  Select2.prototype.hasFocus = function () {
19222    return this.$container[0].classList.contains('select2-container--focus');
19223  };
19224
19225  Select2.prototype.focus = function (data) {
19226    // No need to re-trigger focus events if we are already focused
19227    if (this.hasFocus()) {
19228      return;
19229    }
19230
19231    this.$container[0].classList.add('select2-container--focus');
19232    this.trigger('focus', {});
19233  };
19234
19235  Select2.prototype.enable = function (args) {
19236    if (this.options.get('debug') && window.console && console.warn) {
19237      console.warn(
19238        'Select2: The `select2("enable")` method has been deprecated and will' +
19239        ' be removed in later Select2 versions. Use $element.prop("disabled")' +
19240        ' instead.'
19241      );
19242    }
19243
19244    if (args == null || args.length === 0) {
19245      args = [true];
19246    }
19247
19248    var disabled = !args[0];
19249
19250    this.$element.prop('disabled', disabled);
19251  };
19252
19253  Select2.prototype.data = function () {
19254    if (this.options.get('debug') &&
19255        arguments.length > 0 && window.console && console.warn) {
19256      console.warn(
19257        'Select2: Data can no longer be set using `select2("data")`. You ' +
19258        'should consider setting the value instead using `$element.val()`.'
19259      );
19260    }
19261
19262    var data = [];
19263
19264    this.dataAdapter.current(function (currentData) {
19265      data = currentData;
19266    });
19267
19268    return data;
19269  };
19270
19271  Select2.prototype.val = function (args) {
19272    if (this.options.get('debug') && window.console && console.warn) {
19273      console.warn(
19274        'Select2: The `select2("val")` method has been deprecated and will be' +
19275        ' removed in later Select2 versions. Use $element.val() instead.'
19276      );
19277    }
19278
19279    if (args == null || args.length === 0) {
19280      return this.$element.val();
19281    }
19282
19283    var newVal = args[0];
19284
19285    if (Array.isArray(newVal)) {
19286      newVal = newVal.map(function (obj) {
19287        return obj.toString();
19288      });
19289    }
19290
19291    this.$element.val(newVal).trigger('input').trigger('change');
19292  };
19293
19294  Select2.prototype.destroy = function () {
19295    Utils.RemoveData(this.$container[0]);
19296    this.$container.remove();
19297
19298    this._observer.disconnect();
19299    this._observer = null;
19300
19301    this._syncA = null;
19302    this._syncS = null;
19303
19304    this.$element.off('.select2');
19305    this.$element.attr('tabindex',
19306    Utils.GetData(this.$element[0], 'old-tabindex'));
19307
19308    this.$element[0].classList.remove('select2-hidden-accessible');
19309    this.$element.attr('aria-hidden', 'false');
19310    Utils.RemoveData(this.$element[0]);
19311    this.$element.removeData('select2');
19312
19313    this.dataAdapter.destroy();
19314    this.selection.destroy();
19315    this.dropdown.destroy();
19316    this.results.destroy();
19317
19318    this.dataAdapter = null;
19319    this.selection = null;
19320    this.dropdown = null;
19321    this.results = null;
19322  };
19323
19324  Select2.prototype.render = function () {
19325    var $container = $(
19326      '<span class="select2 select2-container">' +
19327        '<span class="selection"></span>' +
19328        '<span class="dropdown-wrapper" aria-hidden="true"></span>' +
19329      '</span>'
19330    );
19331
19332    $container.attr('dir', this.options.get('dir'));
19333
19334    this.$container = $container;
19335
19336    this.$container[0].classList
19337      .add('select2-container--' + this.options.get('theme'));
19338
19339    Utils.StoreData($container[0], 'element', this.$element);
19340
19341    return $container;
19342  };
19343
19344  return Select2;
19345});
19346
19347S2.define('select2/dropdown/attachContainer',[
19348
19349], function () {
19350  function AttachContainer (decorated, $element, options) {
19351    decorated.call(this, $element, options);
19352  }
19353
19354  AttachContainer.prototype.position =
19355    function (decorated, $dropdown, $container) {
19356    var $dropdownContainer = $container.find('.dropdown-wrapper');
19357    $dropdownContainer.append($dropdown);
19358
19359    $dropdown[0].classList.add('select2-dropdown--below');
19360    $container[0].classList.add('select2-container--below');
19361  };
19362
19363  return AttachContainer;
19364});
19365
19366S2.define('select2/dropdown/stopPropagation',[
19367
19368], function () {
19369  function StopPropagation () { }
19370
19371  StopPropagation.prototype.bind = function (decorated, container, $container) {
19372    decorated.call(this, container, $container);
19373
19374    var stoppedEvents = [
19375    'blur',
19376    'change',
19377    'click',
19378    'dblclick',
19379    'focus',
19380    'focusin',
19381    'focusout',
19382    'input',
19383    'keydown',
19384    'keyup',
19385    'keypress',
19386    'mousedown',
19387    'mouseenter',
19388    'mouseleave',
19389    'mousemove',
19390    'mouseover',
19391    'mouseup',
19392    'search',
19393    'touchend',
19394    'touchstart'
19395    ];
19396
19397    this.$dropdown.on(stoppedEvents.join(' '), function (evt) {
19398      evt.stopPropagation();
19399    });
19400  };
19401
19402  return StopPropagation;
19403});
19404
19405S2.define('select2/selection/stopPropagation',[
19406
19407], function () {
19408  function StopPropagation () { }
19409
19410  StopPropagation.prototype.bind = function (decorated, container, $container) {
19411    decorated.call(this, container, $container);
19412
19413    var stoppedEvents = [
19414      'blur',
19415      'change',
19416      'click',
19417      'dblclick',
vendor: 7,732 bytes, lines 19418-19642
19418      'focus',
19419      'focusin',
19420      'focusout',
19421      'input',
19422      'keydown',
19423      'keyup',
19424      'keypress',
19425      'mousedown',
19426      'mouseenter',
19427      'mouseleave',
19428      'mousemove',
19429      'mouseover',
19430      'mouseup',
19431      'search',
19432      'touchend',
19433      'touchstart'
19434    ];
19435
19436    this.$selection.on(stoppedEvents.join(' '), function (evt) {
19437      evt.stopPropagation();
19438    });
19439  };
19440
19441  return StopPropagation;
19442});
19443
19444/*!
19445 * jQuery Mousewheel 3.1.13
19446 *
19447 * Copyright jQuery Foundation and other contributors
19448 * Released under the MIT license
19449 * http://jquery.org/license
19450 */
19451
19452(function (factory) {
19453    if ( typeof S2.define === 'function' && S2.define.amd ) {
19454        // AMD. Register as an anonymous module.
19455        S2.define('jquery-mousewheel',['jquery'], factory);
19456    } else if (typeof exports === 'object') {
19457        // Node/CommonJS style for Browserify
19458        module.exports = factory;
19459    } else {
19460        // Browser globals
19461        factory(jQuery);
19462    }
19463}(function ($) {
19464
19465    var toFix  = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'],
19466        toBind = ( 'onwheel' in document || document.documentMode >= 9 ) ?
19467                    ['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'],
19468        slice  = Array.prototype.slice,
19469        nullLowestDeltaTimeout, lowestDelta;
19470
19471    if ( $.event.fixHooks ) {
19472        for ( var i = toFix.length; i; ) {
19473            $.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks;
19474        }
19475    }
19476
19477    var special = $.event.special.mousewheel = {
19478        version: '3.1.12',
19479
19480        setup: function() {
19481            if ( this.addEventListener ) {
19482                for ( var i = toBind.length; i; ) {
19483                    this.addEventListener( toBind[--i], handler, false );
19484                }
19485            } else {
19486                this.onmousewheel = handler;
19487            }
19488            // Store the line height and page height for this particular element
19489            $.data(this, 'mousewheel-line-height', special.getLineHeight(this));
19490            $.data(this, 'mousewheel-page-height', special.getPageHeight(this));
19491        },
19492
19493        teardown: function() {
19494            if ( this.removeEventListener ) {
19495                for ( var i = toBind.length; i; ) {
19496                    this.removeEventListener( toBind[--i], handler, false );
19497                }
19498            } else {
19499                this.onmousewheel = null;
19500            }
19501            // Clean up the data we added to the element
19502            $.removeData(this, 'mousewheel-line-height');
19503            $.removeData(this, 'mousewheel-page-height');
19504        },
19505
19506        getLineHeight: function(elem) {
19507            var $elem = $(elem),
19508                $parent = $elem['offsetParent' in $.fn ? 'offsetParent' : 'parent']();
19509            if (!$parent.length) {
19510                $parent = $('body');
19511            }
19512            return parseInt($parent.css('fontSize'), 10) || parseInt($elem.css('fontSize'), 10) || 16;
19513        },
19514
19515        getPageHeight: function(elem) {
19516            return $(elem).height();
19517        },
19518
19519        settings: {
19520            adjustOldDeltas: true, // see shouldAdjustOldDeltas() below
19521            normalizeOffset: true  // calls getBoundingClientRect for each event
19522        }
19523    };
19524
19525    $.fn.extend({
19526        mousewheel: function(fn) {
19527            return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel');
19528        },
19529
19530        unmousewheel: function(fn) {
19531            return this.unbind('mousewheel', fn);
19532        }
19533    });
19534
19535
19536    function handler(event) {
19537        var orgEvent   = event || window.event,
19538            args       = slice.call(arguments, 1),
19539            delta      = 0,
19540            deltaX     = 0,
19541            deltaY     = 0,
19542            absDelta   = 0,
19543            offsetX    = 0,
19544            offsetY    = 0;
19545        event = $.event.fix(orgEvent);
19546        event.type = 'mousewheel';
19547
19548        // Old school scrollwheel delta
19549        if ( 'detail'      in orgEvent ) { deltaY = orgEvent.detail * -1;      }
19550        if ( 'wheelDelta'  in orgEvent ) { deltaY = orgEvent.wheelDelta;       }
19551        if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY;      }
19552        if ( 'wheelDeltaX' in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; }
19553
19554        // Firefox < 17 horizontal scrolling related to DOMMouseScroll event
19555        if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
19556            deltaX = deltaY * -1;
19557            deltaY = 0;
19558        }
19559
19560        // Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy
19561        delta = deltaY === 0 ? deltaX : deltaY;
19562
19563        // New school wheel delta (wheel event)
19564        if ( 'deltaY' in orgEvent ) {
19565            deltaY = orgEvent.deltaY * -1;
19566            delta  = deltaY;
19567        }
19568        if ( 'deltaX' in orgEvent ) {
19569            deltaX = orgEvent.deltaX;
19570            if ( deltaY === 0 ) { delta  = deltaX * -1; }
19571        }
19572
19573        // No change actually happened, no reason to go any further
19574        if ( deltaY === 0 && deltaX === 0 ) { return; }
19575
19576        // Need to convert lines and pages to pixels if we aren't already in pixels
19577        // There are three delta modes:
19578        //   * deltaMode 0 is by pixels, nothing to do
19579        //   * deltaMode 1 is by lines
19580        //   * deltaMode 2 is by pages
19581        if ( orgEvent.deltaMode === 1 ) {
19582            var lineHeight = $.data(this, 'mousewheel-line-height');
19583            delta  *= lineHeight;
19584            deltaY *= lineHeight;
19585            deltaX *= lineHeight;
19586        } else if ( orgEvent.deltaMode === 2 ) {
19587            var pageHeight = $.data(this, 'mousewheel-page-height');
19588            delta  *= pageHeight;
19589            deltaY *= pageHeight;
19590            deltaX *= pageHeight;
19591        }
19592
19593        // Store lowest absolute delta to normalize the delta values
19594        absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) );
19595
19596        if ( !lowestDelta || absDelta < lowestDelta ) {
19597            lowestDelta = absDelta;
19598
19599            // Adjust older deltas if necessary
19600            if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
19601                lowestDelta /= 40;
19602            }
19603        }
19604
19605        // Adjust older deltas if necessary
19606        if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
19607            // Divide all the things by 40!
19608            delta  /= 40;
19609            deltaX /= 40;
19610            deltaY /= 40;
19611        }
19612
19613        // Get a whole, normalized value for the deltas
19614        delta  = Math[ delta  >= 1 ? 'floor' : 'ceil' ](delta  / lowestDelta);
19615        deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta);
19616        deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta);
19617
19618        // Normalise offsetX and offsetY properties
19619        if ( special.settings.normalizeOffset && this.getBoundingClientRect ) {
19620            var boundingRect = this.getBoundingClientRect();
19621            offsetX = event.clientX - boundingRect.left;
19622            offsetY = event.clientY - boundingRect.top;
19623        }
19624
19625        // Add information to the event object
19626        event.deltaX = deltaX;
19627        event.deltaY = deltaY;
19628        event.deltaFactor = lowestDelta;
19629        event.offsetX = offsetX;
19630        event.offsetY = offsetY;
19631        // Go ahead and set deltaMode to 0 since we converted to pixels
19632        // Although this is a little odd since we overwrite the deltaX/Y
19633        // properties with normalized deltas.
19634        event.deltaMode = 0;
19635
19636        // Add event and delta to the front of the arguments
19637        args.unshift(event, delta, deltaX, deltaY);
19638
19639        // Clearout lowestDelta after sometime to better
19640        // handle multiple device types that give different
19641        // a different lowestDelta
19642        // Ex: trackpad = 3 and mouse wheel = 120
19643        if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); }
19644        nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200);
19645
19646        return ($.event.dispatch || $.event.handle).apply(this, args);
19647    }
19648
19649    function nullLowestDelta() {
19650        lowestDelta = null;
19651    }
19652
19653    function shouldAdjustOldDeltas(orgEvent, absDelta) {
19654        // If this is an older event and the delta is divisable by 120,
19655        // then we are assuming that the browser is treating this as an
19656        // older mouse wheel event and that we should divide the deltas
19657        // by 40 to try and get a more usable deltaFactor.
19658        // Side note, this actually impacts the reported scroll distance
19659        // in older browsers and can cause scrolling to be slower than native.
19660        // Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false.
19661        return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0;
19662    }
19663
19664}));
19665
19666S2.define('jquery.select2',[
19667  'jquery',
19668  'jquery-mousewheel',
19669
19670  './select2/core',
19671  './select2/defaults',
19672  './select2/utils'
19673], function ($, _, Select2, Defaults, Utils) {
19674  if ($.fn.select2 == null) {
19675    // All methods that should return the element
19676    var thisMethods = ['open', 'close', 'destroy'];
19677
19678    $.fn.select2 = function (options) {
19679      options = options || {};
19680
19681      if (typeof options === 'object') {
19682        this.each(function () {
19683          var instanceOptions = $.extend(true, {}, options);
19684
19685          var instance = new Select2($(this), instanceOptions);
19686        });
19687
19688        return this;
19689      } else if (typeof options === 'string') {
19690        var ret;
19691        var args = Array.prototype.slice.call(arguments, 1);
19692
19693        this.each(function () {
19694          var instance = Utils.GetData(this, 'select2');
19695
19696          if (instance == null && window.console && console.error) {
19697            console.error(
19698              'The select2(\'' + options + '\') method was called on an ' +
19699              'element that is not using Select2.'
19700            );
19701          }
19702
19703          ret = instance[options].apply(instance, args);
19704        });
19705
19706        // Check if we should be returning `this`
19707        if (thisMethods.indexOf(options) > -1) {
19708          return this;
19709        }
19710
19711        return ret;
19712      } else {
19713        throw new Error('Invalid arguments for Select2: ' + options);
19714      }
19715    };
19716  }
19717
19718  if ($.fn.select2.defaults == null) {
19719    $.fn.select2.defaults = Defaults;
19720  }
19721
19722  return Select2;
19723});
19724
19725  // Return the AMD loader configuration so it can be used outside of this file
19726  return {
19727    define: S2.define,
19728    require: S2.require
19729  };
19730}());
19731
19732  // Autoload the jQuery bindings
19733  // We know that all of the modules exist above this, so we're safe
19734  var select2 = S2.require('jquery.select2');
19735
19736  // Hold the AMD module references on the jQuery function that was just loaded
19737  // This allows Select2 to use the internal loader outside of this file, such
19738  // as in the language files.
19739  jQuery.fn.select2.amd = S2;
19740
19741  // Return the Select2 instance for anyone who is importing it.
19742  return select2;
19743}));
19744
19745"use strict";
19746
19747//
19748// Select2 Initialization
19749//
19750
19751$.fn.select2.defaults.set("theme", "bootstrap5");
19752$.fn.select2.defaults.set("width", "100%");
19753$.fn.select2.defaults.set("selectionCssClass", ":all:");
19754
19755/* flatpickr v4.6.9, @license MIT */
19756(function (global, factory) {
19757    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
19758    typeof define === 'function' && define.amd ? define(factory) :
19759    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.flatpickr = factory());
19760}(this, (function () { 'use strict';
19761
19762    /*! *****************************************************************************
19763    Copyright (c) Microsoft Corporation.
19764
19765    Permission to use, copy, modify, and/or distribute this software for any
19766    purpose with or without fee is hereby granted.
19767
19768    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
19769    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
19770    AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
19771    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
19772    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
19773    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19774    PERFORMANCE OF THIS SOFTWARE.
19775    ***************************************************************************** */
19776
19777    var __assign = function() {
19778        __assign = Object.assign || function __assign(t) {
19779            for (var s, i = 1, n = arguments.length; i < n; i++) {
19780                s = arguments[i];
19781                for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
19782            }
19783            return t;
19784        };
19785        return __assign.apply(this, arguments);
19786    };
19787
19788    function __spreadArrays() {
19789        for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
19790        for (var r = Array(s), k = 0, i = 0; i < il; i++)
19791            for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
19792                r[k] = a[j];
19793        return r;
19794    }
19795
19796    var HOOKS = [
19797        "onChange",
19798        "onClose",
19799        "onDayCreate",
19800        "onDestroy",
19801        "onKeyDown",
19802        "onMonthChange",
19803        "onOpen",
19804        "onParseConfig",
19805        "onReady",
19806        "onValueUpdate",
19807        "onYearChange",
19808        "onPreCalendarPosition",
19809    ];
19810    var defaults = {
19811        _disable: [],
19812        allowInput: false,
19813        allowInvalidPreload: false,
19814        altFormat: "F j, Y",
19815        altInput: false,
19816        altInputClass: "form-control input",
19817        animate: typeof window === "object" &&
19818            window.navigator.userAgent.indexOf("MSIE") === -1,
19819        ariaDateFormat: "F j, Y",
19820        autoFillDefaultTime: true,
19821        clickOpens: true,
19822        closeOnSelect: true,
19823        conjunction: ", ",
19824        dateFormat: "Y-m-d",
19825        defaultHour: 12,
19826        defaultMinute: 0,
19827        defaultSeconds: 0,
19828        disable: [],
19829        disableMobile: false,
19830        enableSeconds: false,
19831        enableTime: false,
19832        errorHandler: function (err) {
19833            return typeof console !== "undefined" && console.warn(err);
19834        },
19835        getWeek: function (givenDate) {
19836            var date = new Date(givenDate.getTime());
19837            date.setHours(0, 0, 0, 0);
19838            // Thursday in current week decides the year.
19839            date.setDate(date.getDate() + 3 - ((date.getDay() + 6) % 7));
19840            // January 4 is always in week 1.
19841            var week1 = new Date(date.getFullYear(), 0, 4);
19842            // Adjust to Thursday in week 1 and count number of weeks from date to week1.
19843            return (1 +
19844                Math.round(((date.getTime() - week1.getTime()) / 86400000 -
19845                    3 +
19846                    ((week1.getDay() + 6) % 7)) /
19847                    7));
19848        },
19849        hourIncrement: 1,
19850        ignoredFocusElements: [],
19851        inline: false,
19852        locale: "default",
19853        minuteIncrement: 5,
19854        mode: "single",
19855        monthSelectorType: "dropdown",
19856        nextArrow: "<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewB
vendor: 44,516 bytes, lines 19856-20890
19856ox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",
19857        noCalendar: false,
19858        now: new Date(),
19859        onChange: [],
19860        onClose: [],
19861        onDayCreate: [],
19862        onDestroy: [],
19863        onKeyDown: [],
19864        onMonthChange: [],
19865        onOpen: [],
19866        onParseConfig: [],
19867        onReady: [],
19868        onValueUpdate: [],
19869        onYearChange: [],
19870        onPreCalendarPosition: [],
19871        plugins: [],
19872        position: "auto",
19873        positionElement: undefined,
19874        prevArrow: "<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",
19875        shorthandCurrentMonth: false,
19876        showMonths: 1,
19877        static: false,
19878        time_24hr: false,
19879        weekNumbers: false,
19880        wrap: false,
19881    };
19882
19883    var english = {
19884        weekdays: {
19885            shorthand: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
19886            longhand: [
19887                "Sunday",
19888                "Monday",
19889                "Tuesday",
19890                "Wednesday",
19891                "Thursday",
19892                "Friday",
19893                "Saturday",
19894            ],
19895        },
19896        months: {
19897            shorthand: [
19898                "Jan",
19899                "Feb",
19900                "Mar",
19901                "Apr",
19902                "May",
19903                "Jun",
19904                "Jul",
19905                "Aug",
19906                "Sep",
19907                "Oct",
19908                "Nov",
19909                "Dec",
19910            ],
19911            longhand: [
19912                "January",
19913                "February",
19914                "March",
19915                "April",
19916                "May",
19917                "June",
19918                "July",
19919                "August",
19920                "September",
19921                "October",
19922                "November",
19923                "December",
19924            ],
19925        },
19926        daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
19927        firstDayOfWeek: 0,
19928        ordinal: function (nth) {
19929            var s = nth % 100;
19930            if (s > 3 && s < 21)
19931                return "th";
19932            switch (s % 10) {
19933                case 1:
19934                    return "st";
19935                case 2:
19936                    return "nd";
19937                case 3:
19938                    return "rd";
19939                default:
19940                    return "th";
19941            }
19942        },
19943        rangeSeparator: " to ",
19944        weekAbbreviation: "Wk",
19945        scrollTitle: "Scroll to increment",
19946        toggleTitle: "Click to toggle",
19947        amPM: ["AM", "PM"],
19948        yearAriaLabel: "Year",
19949        monthAriaLabel: "Month",
19950        hourAriaLabel: "Hour",
19951        minuteAriaLabel: "Minute",
19952        time_24hr: false,
19953    };
19954
19955    var pad = function (number, length) {
19956        if (length === void 0) { length = 2; }
19957        return ("000" + number).slice(length * -1);
19958    };
19959    var int = function (bool) { return (bool === true ? 1 : 0); };
19960    /* istanbul ignore next */
19961    function debounce(fn, wait) {
19962        var t;
19963        return function () {
19964            var _this = this;
19965            clearTimeout(t);
19966            t = setTimeout(function () { return fn.apply(_this, arguments); }, wait);
19967        };
19968    }
19969    var arrayify = function (obj) {
19970        return obj instanceof Array ? obj : [obj];
19971    };
19972
19973    function toggleClass(elem, className, bool) {
19974        if (bool === true)
19975            return elem.classList.add(className);
19976        elem.classList.remove(className);
19977    }
19978    function createElement(tag, className, content) {
19979        var e = window.document.createElement(tag);
19980        className = className || "";
19981        content = content || "";
19982        e.className = className;
19983        if (content !== undefined)
19984            e.textContent = content;
19985        return e;
19986    }
19987    function clearNode(node) {
19988        while (node.firstChild)
19989            node.removeChild(node.firstChild);
19990    }
19991    function findParent(node, condition) {
19992        if (condition(node))
19993            return node;
19994        else if (node.parentNode)
19995            return findParent(node.parentNode, condition);
19996        return undefined; // nothing found
19997    }
19998    function createNumberInput(inputClassName, opts) {
19999        var wrapper = createElement("div", "numInputWrapper"), numInput = createElement("input", "numInput " + inputClassName), arrowUp = createElement("span", "arrowUp"), arrowDown = createElement("span", "arrowDown");
20000        if (navigator.userAgent.indexOf("MSIE 9.0") === -1) {
20001            numInput.type = "number";
20002        }
20003        else {
20004            numInput.type = "text";
20005            numInput.pattern = "\\d*";
20006        }
20007        if (opts !== undefined)
20008            for (var key in opts)
20009                numInput.setAttribute(key, opts[key]);
20010        wrapper.appendChild(numInput);
20011        wrapper.appendChild(arrowUp);
20012        wrapper.appendChild(arrowDown);
20013        return wrapper;
20014    }
20015    function getEventTarget(event) {
20016        try {
20017            if (typeof event.composedPath === "function") {
20018                var path = event.composedPath();
20019                return path[0];
20020            }
20021            return event.target;
20022        }
20023        catch (error) {
20024            return event.target;
20025        }
20026    }
20027
20028    var doNothing = function () { return undefined; };
20029    var monthToStr = function (monthNumber, shorthand, locale) { return locale.months[shorthand ? "shorthand" : "longhand"][monthNumber]; };
20030    var revFormat = {
20031        D: doNothing,
20032        F: function (dateObj, monthName, locale) {
20033            dateObj.setMonth(locale.months.longhand.indexOf(monthName));
20034        },
20035        G: function (dateObj, hour) {
20036            dateObj.setHours(parseFloat(hour));
20037        },
20038        H: function (dateObj, hour) {
20039            dateObj.setHours(parseFloat(hour));
20040        },
20041        J: function (dateObj, day) {
20042            dateObj.setDate(parseFloat(day));
20043        },
20044        K: function (dateObj, amPM, locale) {
20045            dateObj.setHours((dateObj.getHours() % 12) +
20046                12 * int(new RegExp(locale.amPM[1], "i").test(amPM)));
20047        },
20048        M: function (dateObj, shortMonth, locale) {
20049            dateObj.setMonth(locale.months.shorthand.indexOf(shortMonth));
20050        },
20051        S: function (dateObj, seconds) {
20052            dateObj.setSeconds(parseFloat(seconds));
20053        },
20054        U: function (_, unixSeconds) { return new Date(parseFloat(unixSeconds) * 1000); },
20055        W: function (dateObj, weekNum, locale) {
20056            var weekNumber = parseInt(weekNum);
20057            var date = new Date(dateObj.getFullYear(), 0, 2 + (weekNumber - 1) * 7, 0, 0, 0, 0);
20058            date.setDate(date.getDate() - date.getDay() + locale.firstDayOfWeek);
20059            return date;
20060        },
20061        Y: function (dateObj, year) {
20062            dateObj.setFullYear(parseFloat(year));
20063        },
20064        Z: function (_, ISODate) { return new Date(ISODate); },
20065        d: function (dateObj, day) {
20066            dateObj.setDate(parseFloat(day));
20067        },
20068        h: function (dateObj, hour) {
20069            dateObj.setHours(parseFloat(hour));
20070        },
20071        i: function (dateObj, minutes) {
20072            dateObj.setMinutes(parseFloat(minutes));
20073        },
20074        j: function (dateObj, day) {
20075            dateObj.setDate(parseFloat(day));
20076        },
20077        l: doNothing,
20078        m: function (dateObj, month) {
20079            dateObj.setMonth(parseFloat(month) - 1);
20080        },
20081        n: function (dateObj, month) {
20082            dateObj.setMonth(parseFloat(month) - 1);
20083        },
20084        s: function (dateObj, seconds) {
20085            dateObj.setSeconds(parseFloat(seconds));
20086        },
20087        u: function (_, unixMillSeconds) {
20088            return new Date(parseFloat(unixMillSeconds));
20089        },
20090        w: doNothing,
20091        y: function (dateObj, year) {
20092            dateObj.setFullYear(2000 + parseFloat(year));
20093        },
20094    };
20095    var tokenRegex = {
20096        D: "(\\w+)",
20097        F: "(\\w+)",
20098        G: "(\\d\\d|\\d)",
20099        H: "(\\d\\d|\\d)",
20100        J: "(\\d\\d|\\d)\\w+",
20101        K: "",
20102        M: "(\\w+)",
20103        S: "(\\d\\d|\\d)",
20104        U: "(.+)",
20105        W: "(\\d\\d|\\d)",
20106        Y: "(\\d{4})",
20107        Z: "(.+)",
20108        d: "(\\d\\d|\\d)",
20109        h: "(\\d\\d|\\d)",
20110        i: "(\\d\\d|\\d)",
20111        j: "(\\d\\d|\\d)",
20112        l: "(\\w+)",
20113        m: "(\\d\\d|\\d)",
20114        n: "(\\d\\d|\\d)",
20115        s: "(\\d\\d|\\d)",
20116        u: "(.+)",
20117        w: "(\\d\\d|\\d)",
20118        y: "(\\d{2})",
20119    };
20120    var formats = {
20121        // get the date in UTC
20122        Z: function (date) { return date.toISOString(); },
20123        // weekday name, short, e.g. Thu
20124        D: function (date, locale, options) {
20125            return locale.weekdays.shorthand[formats.w(date, locale, options)];
20126        },
20127        // full month name e.g. January
20128        F: function (date, locale, options) {
20129            return monthToStr(formats.n(date, locale, options) - 1, false, locale);
20130        },
20131        // padded hour 1-12
20132        G: function (date, locale, options) {
20133            return pad(formats.h(date, locale, options));
20134        },
20135        // hours with leading zero e.g. 03
20136        H: function (date) { return pad(date.getHours()); },
20137        // day (1-30) with ordinal suffix e.g. 1st, 2nd
20138        J: function (date, locale) {
20139            return locale.ordinal !== undefined
20140                ? date.getDate() + locale.ordinal(date.getDate())
20141                : date.getDate();
20142        },
20143        // AM/PM
20144        K: function (date, locale) { return locale.amPM[int(date.getHours() > 11)]; },
20145        // shorthand month e.g. Jan, Sep, Oct, etc
20146        M: function (date, locale) {
20147            return monthToStr(date.getMonth(), true, locale);
20148        },
20149        // seconds 00-59
20150        S: function (date) { return pad(date.getSeconds()); },
20151        // unix timestamp
20152        U: function (date) { return date.getTime() / 1000; },
20153        W: function (date, _, options) {
20154            return options.getWeek(date);
20155        },
20156        // full year e.g. 2016, padded (0001-9999)
20157        Y: function (date) { return pad(date.getFullYear(), 4); },
20158        // day in month, padded (01-30)
20159        d: function (date) { return pad(date.getDate()); },
20160        // hour from 1-12 (am/pm)
20161        h: function (date) { return (date.getHours() % 12 ? date.getHours() % 12 : 12); },
20162        // minutes, padded with leading zero e.g. 09
20163        i: function (date) { return pad(date.getMinutes()); },
20164        // day in month (1-30)
20165        j: function (date) { return date.getDate(); },
20166        // weekday name, full, e.g. Thursday
20167        l: function (date, locale) {
20168            return locale.weekdays.longhand[date.getDay()];
20169        },
20170        // padded month number (01-12)
20171        m: function (date) { return pad(date.getMonth() + 1); },
20172        // the month number (1-12)
20173        n: function (date) { return date.getMonth() + 1; },
20174        // seconds 0-59
20175        s: function (date) { return date.getSeconds(); },
20176        // Unix Milliseconds
20177        u: function (date) { return date.getTime(); },
20178        // number of the day of the week
20179        w: function (date) { return date.getDay(); },
20180        // last two digits of year e.g. 16 for 2016
20181        y: function (date) { return String(date.getFullYear()).substring(2); },
20182    };
20183
20184    var createDateFormatter = function (_a) {
20185        var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c, _d = _a.isMobile, isMobile = _d === void 0 ? false : _d;
20186        return function (dateObj, frmt, overrideLocale) {
20187            var locale = overrideLocale || l10n;
20188            if (config.formatDate !== undefined && !isMobile) {
20189                return config.formatDate(dateObj, frmt, locale);
20190            }
20191            return frmt
20192                .split("")
20193                .map(function (c, i, arr) {
20194                return formats[c] && arr[i - 1] !== "\\"
20195                    ? formats[c](dateObj, locale, config)
20196                    : c !== "\\"
20197                        ? c
20198                        : "";
20199            })
20200                .join("");
20201        };
20202    };
20203    var createDateParser = function (_a) {
20204        var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c;
20205        return function (date, givenFormat, timeless, customLocale) {
20206            if (date !== 0 && !date)
20207                return undefined;
20208            var locale = customLocale || l10n;
20209            var parsedDate;
20210            var dateOrig = date;
20211            if (date instanceof Date)
20212                parsedDate = new Date(date.getTime());
20213            else if (typeof date !== "string" &&
20214                date.toFixed !== undefined // timestamp
20215            )
20216                // create a copy
20217                parsedDate = new Date(date);
20218            else if (typeof date === "string") {
20219                // date string
20220                var format = givenFormat || (config || defaults).dateFormat;
20221                var datestr = String(date).trim();
20222                if (datestr === "today") {
20223                    parsedDate = new Date();
20224                    timeless = true;
20225                }
20226                else if (/Z$/.test(datestr) ||
20227                    /GMT$/.test(datestr) // datestrings w/ timezone
20228                )
20229                    parsedDate = new Date(date);
20230                else if (config && config.parseDate)
20231                    parsedDate = config.parseDate(date, format);
20232                else {
20233                    parsedDate =
20234                        !config || !config.noCalendar
20235                            ? new Date(new Date().getFullYear(), 0, 1, 0, 0, 0, 0)
20236                            : new Date(new Date().setHours(0, 0, 0, 0));
20237                    var matched = void 0, ops = [];
20238                    for (var i = 0, matchIndex = 0, regexStr = ""; i < format.length; i++) {
20239                        var token_1 = format[i];
20240                        var isBackSlash = token_1 === "\\";
20241                        var escaped = format[i - 1] === "\\" || isBackSlash;
20242                        if (tokenRegex[token_1] && !escaped) {
20243                            regexStr += tokenRegex[token_1];
20244                            var match = new RegExp(regexStr).exec(date);
20245                            if (match && (matched = true)) {
20246                                ops[token_1 !== "Y" ? "push" : "unshift"]({
20247                                    fn: revFormat[token_1],
20248                                    val: match[++matchIndex],
20249                                });
20250                            }
20251                        }
20252                        else if (!isBackSlash)
20253                            regexStr += "."; // don't really care
20254                        ops.forEach(function (_a) {
20255                            var fn = _a.fn, val = _a.val;
20256                            return (parsedDate = fn(parsedDate, val, locale) || parsedDate);
20257                        });
20258                    }
20259                    parsedDate = matched ? parsedDate : undefined;
20260                }
20261            }
20262            /* istanbul ignore next */
20263            if (!(parsedDate instanceof Date && !isNaN(parsedDate.getTime()))) {
20264                config.errorHandler(new Error("Invalid date provided: " + dateOrig));
20265                return undefined;
20266            }
20267            if (timeless === true)
20268                parsedDate.setHours(0, 0, 0, 0);
20269            return parsedDate;
20270        };
20271    };
20272    /**
20273     * Compute the difference in dates, measured in ms
20274     */
20275    function compareDates(date1, date2, timeless) {
20276        if (timeless === void 0) { timeless = true; }
20277        if (timeless !== false) {
20278            return (new Date(date1.getTime()).setHours(0, 0, 0, 0) -
20279                new Date(date2.getTime()).setHours(0, 0, 0, 0));
20280        }
20281        return date1.getTime() - date2.getTime();
20282    }
20283    var isBetween = function (ts, ts1, ts2) {
20284        return ts > Math.min(ts1, ts2) && ts < Math.max(ts1, ts2);
20285    };
20286    var duration = {
20287        DAY: 86400000,
20288    };
20289    function getDefaultHours(config) {
20290        var hours = config.defaultHour;
20291        var minutes = config.defaultMinute;
20292        var seconds = config.defaultSeconds;
20293        if (config.minDate !== undefined) {
20294            var minHour = config.minDate.getHours();
20295            var minMinutes = config.minDate.getMinutes();
20296            var minSeconds = config.minDate.getSeconds();
20297            if (hours < minHour) {
20298                hours = minHour;
20299            }
20300            if (hours === minHour && minutes < minMinutes) {
20301                minutes = minMinutes;
20302            }
20303            if (hours === minHour && minutes === minMinutes && seconds < minSeconds)
20304                seconds = config.minDate.getSeconds();
20305        }
20306        if (config.maxDate !== undefined) {
20307            var maxHr = config.maxDate.getHours();
20308            var maxMinutes = config.maxDate.getMinutes();
20309            hours = Math.min(hours, maxHr);
20310            if (hours === maxHr)
20311                minutes = Math.min(maxMinutes, minutes);
20312            if (hours === maxHr && minutes === maxMinutes)
20313                seconds = config.maxDate.getSeconds();
20314        }
20315        return { hours: hours, minutes: minutes, seconds: seconds };
20316    }
20317
20318    if (typeof Object.assign !== "function") {
20319        Object.assign = function (target) {
20320            var args = [];
20321            for (var _i = 1; _i < arguments.length; _i++) {
20322                args[_i - 1] = arguments[_i];
20323            }
20324            if (!target) {
20325                throw TypeError("Cannot convert undefined or null to object");
20326            }
20327            var _loop_1 = function (source) {
20328                if (source) {
20329                    Object.keys(source).forEach(function (key) { return (target[key] = source[key]); });
20330                }
20331            };
20332            for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {
20333                var source = args_1[_a];
20334                _loop_1(source);
20335            }
20336            return target;
20337        };
20338    }
20339
20340    var DEBOUNCED_CHANGE_MS = 300;
20341    function FlatpickrInstance(element, instanceConfig) {
20342        var self = {
20343            config: __assign(__assign({}, defaults), flatpickr.defaultConfig),
20344            l10n: english,
20345        };
20346        self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });
20347        self._handlers = [];
20348        self.pluginElements = [];
20349        self.loadedPlugins = [];
20350        self._bind = bind;
20351        self._setHoursFromDate = setHoursFromDate;
20352        self._positionCalendar = positionCalendar;
20353        self.changeMonth = changeMonth;
20354        self.changeYear = changeYear;
20355        self.clear = clear;
20356        self.close = close;
20357        self._createElement = createElement;
20358        self.destroy = destroy;
20359        self.isEnabled = isEnabled;
20360        self.jumpToDate = jumpToDate;
20361        self.open = open;
20362        self.redraw = redraw;
20363        self.set = set;
20364        self.setDate = setDate;
20365        self.toggle = toggle;
20366        function setupHelperFunctions() {
20367            self.utils = {
20368                getDaysInMonth: function (month, yr) {
20369                    if (month === void 0) { month = self.currentMonth; }
20370                    if (yr === void 0) { yr = self.currentYear; }
20371                    if (month === 1 && ((yr % 4 === 0 && yr % 100 !== 0) || yr % 400 === 0))
20372                        return 29;
20373                    return self.l10n.daysInMonth[month];
20374                },
20375            };
20376        }
20377        function init() {
20378            self.element = self.input = element;
20379            self.isOpen = false;
20380            parseConfig();
20381            setupLocale();
20382            setupInputs();
20383            setupDates();
20384            setupHelperFunctions();
20385            if (!self.isMobile)
20386                build();
20387            bindEvents();
20388            if (self.selectedDates.length || self.config.noCalendar) {
20389                if (self.config.enableTime) {
20390                    setHoursFromDate(self.config.noCalendar ? self.latestSelectedDateObj : undefined);
20391                }
20392                updateValue(false);
20393            }
20394            setCalendarWidth();
20395            var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
20396            /* TODO: investigate this further
20397        
20398              Currently, there is weird positioning behavior in safari causing pages
20399              to scroll up. https://github.com/chmln/flatpickr/issues/563
20400        
20401              However, most browsers are not Safari and positioning is expensive when used
20402              in scale. https://github.com/chmln/flatpickr/issues/1096
20403            */
20404            if (!self.isMobile && isSafari) {
20405                positionCalendar();
20406            }
20407            triggerEvent("onReady");
20408        }
20409        function bindToInstance(fn) {
20410            return fn.bind(self);
20411        }
20412        function setCalendarWidth() {
20413            var config = self.config;
20414            if (config.weekNumbers === false && config.showMonths === 1) {
20415                return;
20416            }
20417            else if (config.noCalendar !== true) {
20418                window.requestAnimationFrame(function () {
20419                    if (self.calendarContainer !== undefined) {
20420                        self.calendarContainer.style.visibility = "hidden";
20421                        self.calendarContainer.style.display = "block";
20422                    }
20423                    if (self.daysContainer !== undefined) {
20424                        var daysWidth = (self.days.offsetWidth + 1) * config.showMonths;
20425                        self.daysContainer.style.width = daysWidth + "px";
20426                        self.calendarContainer.style.width =
20427                            daysWidth +
20428                                (self.weekWrapper !== undefined
20429                                    ? self.weekWrapper.offsetWidth
20430                                    : 0) +
20431                                "px";
20432                        self.calendarContainer.style.removeProperty("visibility");
20433                        self.calendarContainer.style.removeProperty("display");
20434                    }
20435                });
20436            }
20437        }
20438        /**
20439         * The handler for all events targeting the time inputs
20440         */
20441        function updateTime(e) {
20442            if (self.selectedDates.length === 0) {
20443                var defaultDate = self.config.minDate === undefined ||
20444                    compareDates(new Date(), self.config.minDate) >= 0
20445                    ? new Date()
20446                    : new Date(self.config.minDate.getTime());
20447                var defaults = getDefaultHours(self.config);
20448                defaultDate.setHours(defaults.hours, defaults.minutes, defaults.seconds, defaultDate.getMilliseconds());
20449                self.selectedDates = [defaultDate];
20450                self.latestSelectedDateObj = defaultDate;
20451            }
20452            if (e !== undefined && e.type !== "blur") {
20453                timeWrapper(e);
20454            }
20455            var prevValue = self._input.value;
20456            setHoursFromInputs();
20457            updateValue();
20458            if (self._input.value !== prevValue) {
20459                self._debouncedChange();
20460            }
20461        }
20462        function ampm2military(hour, amPM) {
20463            return (hour % 12) + 12 * int(amPM === self.l10n.amPM[1]);
20464        }
20465        function military2ampm(hour) {
20466            switch (hour % 24) {
20467                case 0:
20468                case 12:
20469                    return 12;
20470                default:
20471                    return hour % 12;
20472            }
20473        }
20474        /**
20475         * Syncs the selected date object time with user's time input
20476         */
20477        function setHoursFromInputs() {
20478            if (self.hourElement === undefined || self.minuteElement === undefined)
20479                return;
20480            var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24, minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60, seconds = self.secondElement !== undefined
20481                ? (parseInt(self.secondElement.value, 10) || 0) % 60
20482                : 0;
20483            if (self.amPM !== undefined) {
20484                hours = ampm2military(hours, self.amPM.textContent);
20485            }
20486            var limitMinHours = self.config.minTime !== undefined ||
20487                (self.config.minDate &&
20488                    self.minDateHasTime &&
20489                    self.latestSelectedDateObj &&
20490                    compareDates(self.latestSelectedDateObj, self.config.minDate, true) ===
20491                        0);
20492            var limitMaxHours = self.config.maxTime !== undefined ||
20493                (self.config.maxDate &&
20494                    self.maxDateHasTime &&
20495                    self.latestSelectedDateObj &&
20496                    compareDates(self.latestSelectedDateObj, self.config.maxDate, true) ===
20497                        0);
20498            if (limitMaxHours) {
20499                var maxTime = self.config.maxTime !== undefined
20500                    ? self.config.maxTime
20501                    : self.config.maxDate;
20502                hours = Math.min(hours, maxTime.getHours());
20503                if (hours === maxTime.getHours())
20504                    minutes = Math.min(minutes, maxTime.getMinutes());
20505                if (minutes === maxTime.getMinutes())
20506                    seconds = Math.min(seconds, maxTime.getSeconds());
20507            }
20508            if (limitMinHours) {
20509                var minTime = self.config.minTime !== undefined
20510                    ? self.config.minTime
20511                    : self.config.minDate;
20512                hours = Math.max(hours, minTime.getHours());
20513                if (hours === minTime.getHours() && minutes < minTime.getMinutes())
20514                    minutes = minTime.getMinutes();
20515                if (minutes === minTime.getMinutes())
20516                    seconds = Math.max(seconds, minTime.getSeconds());
20517            }
20518            setHours(hours, minutes, seconds);
20519        }
20520        /**
20521         * Syncs time input values with a date
20522         */
20523        function setHoursFromDate(dateObj) {
20524            var date = dateObj || self.latestSelectedDateObj;
20525            if (date) {
20526                setHours(date.getHours(), date.getMinutes(), date.getSeconds());
20527            }
20528        }
20529        /**
20530         * Sets the hours, minutes, and optionally seconds
20531         * of the latest selected date object and the
20532         * corresponding time inputs
20533         * @param {Number} hours the hour. whether its military
20534         *                 or am-pm gets inferred from config
20535         * @param {Number} minutes the minutes
20536         * @param {Number} seconds the seconds (optional)
20537         */
20538        function setHours(hours, minutes, seconds) {
20539            if (self.latestSelectedDateObj !== undefined) {
20540                self.latestSelectedDateObj.setHours(hours % 24, minutes, seconds || 0, 0);
20541            }
20542            if (!self.hourElement || !self.minuteElement || self.isMobile)
20543                return;
20544            self.hourElement.value = pad(!self.config.time_24hr
20545                ? ((12 + hours) % 12) + 12 * int(hours % 12 === 0)
20546                : hours);
20547            self.minuteElement.value = pad(minutes);
20548            if (self.amPM !== undefined)
20549                self.amPM.textContent = self.l10n.amPM[int(hours >= 12)];
20550            if (self.secondElement !== undefined)
20551                self.secondElement.value = pad(seconds);
20552        }
20553        /**
20554         * Handles the year input and incrementing events
20555         * @param {Event} event the keyup or increment event
20556         */
20557        function onYearInput(event) {
20558            var eventTarget = getEventTarget(event);
20559            var year = parseInt(eventTarget.value) + (event.delta || 0);
20560            if (year / 1000 > 1 ||
20561                (event.key === "Enter" && !/[^\d]/.test(year.toString()))) {
20562                changeYear(year);
20563            }
20564        }
20565        /**
20566         * Essentially addEventListener + tracking
20567         * @param {Element} element the element to addEventListener to
20568         * @param {String} event the event name
20569         * @param {Function} handler the event handler
20570         */
20571        function bind(element, event, handler, options) {
20572            if (event instanceof Array)
20573                return event.forEach(function (ev) { return bind(element, ev, handler, options); });
20574            if (element instanceof Array)
20575                return element.forEach(function (el) { return bind(el, event, handler, options); });
20576            element.addEventListener(event, handler, options);
20577            self._handlers.push({
20578                remove: function () { return element.removeEventListener(event, handler); },
20579            });
20580        }
20581        function triggerChange() {
20582            triggerEvent("onChange");
20583        }
20584        /**
20585         * Adds all the necessary event listeners
20586         */
20587        function bindEvents() {
20588            if (self.config.wrap) {
20589                ["open", "close", "toggle", "clear"].forEach(function (evt) {
20590                    Array.prototype.forEach.call(self.element.querySelectorAll("[data-" + evt + "]"), function (el) {
20591                        return bind(el, "click", self[evt]);
20592                    });
20593                });
20594            }
20595            if (self.isMobile) {
20596                setupMobile();
20597                return;
20598            }
20599            var debouncedResize = debounce(onResize, 50);
20600            self._debouncedChange = debounce(triggerChange, DEBOUNCED_CHANGE_MS);
20601            if (self.daysContainer && !/iPhone|iPad|iPod/i.test(navigator.userAgent))
20602                bind(self.daysContainer, "mouseover", function (e) {
20603                    if (self.config.mode === "range")
20604                        onMouseOver(getEventTarget(e));
20605                });
20606            bind(window.document.body, "keydown", onKeyDown);
20607            if (!self.config.inline && !self.config.static)
20608                bind(window, "resize", debouncedResize);
20609            if (window.ontouchstart !== undefined)
20610                bind(window.document, "touchstart", documentClick);
20611            else
20612                bind(window.document, "mousedown", documentClick);
20613            bind(window.document, "focus", documentClick, { capture: true });
20614            if (self.config.clickOpens === true) {
20615                bind(self._input, "focus", self.open);
20616                bind(self._input, "click", self.open);
20617            }
20618            if (self.daysContainer !== undefined) {
20619                bind(self.monthNav, "click", onMonthNavClick);
20620                bind(self.monthNav, ["keyup", "increment"], onYearInput);
20621                bind(self.daysContainer, "click", selectDate);
20622            }
20623            if (self.timeContainer !== undefined &&
20624                self.minuteElement !== undefined &&
20625                self.hourElement !== undefined) {
20626                var selText = function (e) {
20627                    return getEventTarget(e).select();
20628                };
20629                bind(self.timeContainer, ["increment"], updateTime);
20630                bind(self.timeContainer, "blur", updateTime, { capture: true });
20631                bind(self.timeContainer, "click", timeIncrement);
20632                bind([self.hourElement, self.minuteElement], ["focus", "click"], selText);
20633                if (self.secondElement !== undefined)
20634                    bind(self.secondElement, "focus", function () { return self.secondElement && self.secondElement.select(); });
20635                if (self.amPM !== undefined) {
20636                    bind(self.amPM, "click", function (e) {
20637                        updateTime(e);
20638                        triggerChange();
20639                    });
20640                }
20641            }
20642            if (self.config.allowInput) {
20643                bind(self._input, "blur", onBlur);
20644            }
20645        }
20646        /**
20647         * Set the calendar view to a particular date.
20648         * @param {Date} jumpDate the date to set the view to
20649         * @param {boolean} triggerChange if change events should be triggered
20650         */
20651        function jumpToDate(jumpDate, triggerChange) {
20652            var jumpTo = jumpDate !== undefined
20653                ? self.parseDate(jumpDate)
20654                : self.latestSelectedDateObj ||
20655                    (self.config.minDate && self.config.minDate > self.now
20656                        ? self.config.minDate
20657                        : self.config.maxDate && self.config.maxDate < self.now
20658                            ? self.config.maxDate
20659                            : self.now);
20660            var oldYear = self.currentYear;
20661            var oldMonth = self.currentMonth;
20662            try {
20663                if (jumpTo !== undefined) {
20664                    self.currentYear = jumpTo.getFullYear();
20665                    self.currentMonth = jumpTo.getMonth();
20666                }
20667            }
20668            catch (e) {
20669                /* istanbul ignore next */
20670                e.message = "Invalid date supplied: " + jumpTo;
20671                self.config.errorHandler(e);
20672            }
20673            if (triggerChange && self.currentYear !== oldYear) {
20674                triggerEvent("onYearChange");
20675                buildMonthSwitch();
20676            }
20677            if (triggerChange &&
20678                (self.currentYear !== oldYear || self.currentMonth !== oldMonth)) {
20679                triggerEvent("onMonthChange");
20680            }
20681            self.redraw();
20682        }
20683        /**
20684         * The up/down arrow handler for time inputs
20685         * @param {Event} e the click event
20686         */
20687        function timeIncrement(e) {
20688            var eventTarget = getEventTarget(e);
20689            if (~eventTarget.className.indexOf("arrow"))
20690                incrementNumInput(e, eventTarget.classList.contains("arrowUp") ? 1 : -1);
20691        }
20692        /**
20693         * Increments/decrements the value of input associ-
20694         * ated with the up/down arrow by dispatching an
20695         * "increment" event on the input.
20696         *
20697         * @param {Event} e the click event
20698         * @param {Number} delta the diff (usually 1 or -1)
20699         * @param {Element} inputElem the input element
20700         */
20701        function incrementNumInput(e, delta, inputElem) {
20702            var target = e && getEventTarget(e);
20703            var input = inputElem ||
20704                (target && target.parentNode && target.parentNode.firstChild);
20705            var event = createEvent("increment");
20706            event.delta = delta;
20707            input && input.dispatchEvent(event);
20708        }
20709        function build() {
20710            var fragment = window.document.createDocumentFragment();
20711            self.calendarContainer = createElement("div", "flatpickr-calendar");
20712            self.calendarContainer.tabIndex = -1;
20713            if (!self.config.noCalendar) {
20714                fragment.appendChild(buildMonthNav());
20715                self.innerContainer = createElement("div", "flatpickr-innerContainer");
20716                if (self.config.weekNumbers) {
20717                    var _a = buildWeeks(), weekWrapper = _a.weekWrapper, weekNumbers = _a.weekNumbers;
20718                    self.innerContainer.appendChild(weekWrapper);
20719                    self.weekNumbers = weekNumbers;
20720                    self.weekWrapper = weekWrapper;
20721                }
20722                self.rContainer = createElement("div", "flatpickr-rContainer");
20723                self.rContainer.appendChild(buildWeekdays());
20724                if (!self.daysContainer) {
20725                    self.daysContainer = createElement("div", "flatpickr-days");
20726                    self.daysContainer.tabIndex = -1;
20727                }
20728                buildDays();
20729                self.rContainer.appendChild(self.daysContainer);
20730                self.innerContainer.appendChild(self.rContainer);
20731                fragment.appendChild(self.innerContainer);
20732            }
20733            if (self.config.enableTime) {
20734                fragment.appendChild(buildTime());
20735            }
20736            toggleClass(self.calendarContainer, "rangeMode", self.config.mode === "range");
20737            toggleClass(self.calendarContainer, "animate", self.config.animate === true);
20738            toggleClass(self.calendarContainer, "multiMonth", self.config.showMonths > 1);
20739            self.calendarContainer.appendChild(fragment);
20740            var customAppend = self.config.appendTo !== undefined &&
20741                self.config.appendTo.nodeType !== undefined;
20742            if (self.config.inline || self.config.static) {
20743                self.calendarContainer.classList.add(self.config.inline ? "inline" : "static");
20744                if (self.config.inline) {
20745                    if (!customAppend && self.element.parentNode)
20746                        self.element.parentNode.insertBefore(self.calendarContainer, self._input.nextSibling);
20747                    else if (self.config.appendTo !== undefined)
20748                        self.config.appendTo.appendChild(self.calendarContainer);
20749                }
20750                if (self.config.static) {
20751                    var wrapper = createElement("div", "flatpickr-wrapper");
20752                    if (self.element.parentNode)
20753                        self.element.parentNode.insertBefore(wrapper, self.element);
20754                    wrapper.appendChild(self.element);
20755                    if (self.altInput)
20756                        wrapper.appendChild(self.altInput);
20757                    wrapper.appendChild(self.calendarContainer);
20758                }
20759            }
20760            if (!self.config.static && !self.config.inline)
20761                (self.config.appendTo !== undefined
20762                    ? self.config.appendTo
20763                    : window.document.body).appendChild(self.calendarContainer);
20764        }
20765        function createDay(className, date, dayNumber, i) {
20766            var dateIsEnabled = isEnabled(date, true), dayElement = createElement("span", "flatpickr-day " + className, date.getDate().toString());
20767            dayElement.dateObj = date;
20768            dayElement.$i = i;
20769            dayElement.setAttribute("aria-label", self.formatDate(date, self.config.ariaDateFormat));
20770            if (className.indexOf("hidden") === -1 &&
20771                compareDates(date, self.now) === 0) {
20772                self.todayDateElem = dayElement;
20773                dayElement.classList.add("today");
20774                dayElement.setAttribute("aria-current", "date");
20775            }
20776            if (dateIsEnabled) {
20777                dayElement.tabIndex = -1;
20778                if (isDateSelected(date)) {
20779                    dayElement.classList.add("selected");
20780                    self.selectedDateElem = dayElement;
20781                    if (self.config.mode === "range") {
20782                        toggleClass(dayElement, "startRange", self.selectedDates[0] &&
20783                            compareDates(date, self.selectedDates[0], true) === 0);
20784                        toggleClass(dayElement, "endRange", self.selectedDates[1] &&
20785                            compareDates(date, self.selectedDates[1], true) === 0);
20786                        if (className === "nextMonthDay")
20787                            dayElement.classList.add("inRange");
20788                    }
20789                }
20790            }
20791            else {
20792                dayElement.classList.add("flatpickr-disabled");
20793            }
20794            if (self.config.mode === "range") {
20795                if (isDateInRange(date) && !isDateSelected(date))
20796                    dayElement.classList.add("inRange");
20797            }
20798            if (self.weekNumbers &&
20799                self.config.showMonths === 1 &&
20800                className !== "prevMonthDay" &&
20801                dayNumber % 7 === 1) {
20802                self.weekNumbers.insertAdjacentHTML("beforeend", "<span class='flatpickr-day'>" + self.config.getWeek(date) + "</span>");
20803            }
20804            triggerEvent("onDayCreate", dayElement);
20805            return dayElement;
20806        }
20807        function focusOnDayElem(targetNode) {
20808            targetNode.focus();
20809            if (self.config.mode === "range")
20810                onMouseOver(targetNode);
20811        }
20812        function getFirstAvailableDay(delta) {
20813            var startMonth = delta > 0 ? 0 : self.config.showMonths - 1;
20814            var endMonth = delta > 0 ? self.config.showMonths : -1;
20815            for (var m = startMonth; m != endMonth; m += delta) {
20816                var month = self.daysContainer.children[m];
20817                var startIndex = delta > 0 ? 0 : month.children.length - 1;
20818                var endIndex = delta > 0 ? month.children.length : -1;
20819                for (var i = startIndex; i != endIndex; i += delta) {
20820                    var c = month.children[i];
20821                    if (c.className.indexOf("hidden") === -1 && isEnabled(c.dateObj))
20822                        return c;
20823                }
20824            }
20825            return undefined;
20826        }
20827        function getNextAvailableDay(current, delta) {
20828            var givenMonth = current.className.indexOf("Month") === -1
20829                ? current.dateObj.getMonth()
20830                : self.currentMonth;
20831            var endMonth = delta > 0 ? self.config.showMonths : -1;
20832            var loopDelta = delta > 0 ? 1 : -1;
20833            for (var m = givenMonth - self.currentMonth; m != endMonth; m += loopDelta) {
20834                var month = self.daysContainer.children[m];
20835                var startIndex = givenMonth - self.currentMonth === m
20836                    ? current.$i + delta
20837                    : delta < 0
20838                        ? month.children.length - 1
20839                        : 0;
20840                var numMonthDays = month.children.length;
20841                for (var i = startIndex; i >= 0 && i < numMonthDays && i != (delta > 0 ? numMonthDays : -1); i += loopDelta) {
20842                    var c = month.children[i];
20843                    if (c.className.indexOf("hidden") === -1 &&
20844                        isEnabled(c.dateObj) &&
20845                        Math.abs(current.$i - i) >= Math.abs(delta))
20846                        return focusOnDayElem(c);
20847                }
20848            }
20849            self.changeMonth(loopDelta);
20850            focusOnDay(getFirstAvailableDay(loopDelta), 0);
20851            return undefined;
20852        }
20853        function focusOnDay(current, offset) {
20854            var dayFocused = isInView(document.activeElement || document.body);
20855            var startElem = current !== undefined
20856                ? current
20857                : dayFocused
20858                    ? document.activeElement
20859                    : self.selectedDateElem !== undefined && isInView(self.selectedDateElem)
20860                        ? self.selectedDateElem
20861                        : self.todayDateElem !== undefined && isInView(self.todayDateElem)
20862                            ? self.todayDateElem
20863                            : getFirstAvailableDay(offset > 0 ? 1 : -1);
20864            if (startElem === undefined) {
20865                self._input.focus();
20866            }
20867            else if (!dayFocused) {
20868                focusOnDayElem(startElem);
20869            }
20870            else {
20871                getNextAvailableDay(startElem, offset);
20872            }
20873        }
20874        function buildMonthDays(year, month) {
20875            var firstOfMonth = (new Date(year, month, 1).getDay() - self.l10n.firstDayOfWeek + 7) % 7;
20876            var prevMonthDays = self.utils.getDaysInMonth((month - 1 + 12) % 12, year);
20877            var daysInMonth = self.utils.getDaysInMonth(month, year), days = window.document.createDocumentFragment(), isMultiMonth = self.config.showMonths > 1, prevMonthDayClass = isMultiMonth ? "prevMonthDay hidden" : "prevMonthDay", nextMonthDayClass = isMultiMonth ? "nextMonthDay hidden" : "nextMonthDay";
20878            var dayNumber = prevMonthDays + 1 - firstOfMonth, dayIndex = 0;
20879            // prepend days from the ending of previous month
20880            for (; dayNumber <= prevMonthDays; dayNumber++, dayIndex++) {
20881                days.appendChild(createDay(prevMonthDayClass, new Date(year, month - 1, dayNumber), dayNumber, dayIndex));
20882            }
20883            // Start at 1 since there is no 0th day
20884            for (dayNumber = 1; dayNumber <= daysInMonth; dayNumber++, dayIndex++) {
20885                days.appendChild(createDay("", new Date(year, month, dayNumber), dayNumber, dayIndex));
20886            }
20887            // append days from the next month
20888            for (var dayNum = daysInMonth + 1; dayNum <= 42 - firstOfMonth &&
20889                (self.config.showMonths === 1 || dayIndex % 7 !== 0); dayNum++, dayIndex++) {
20890                days.appendChild(createDay(
vendor: 17,737 bytes, lines 20890-21261
20890nextMonthDayClass, new Date(year, month + 1, dayNum % daysInMonth), dayNum, dayIndex));
20891            }
20892            //updateNavigationCurrentMonth();
20893            var dayContainer = createElement("div", "dayContainer");
20894            dayContainer.appendChild(days);
20895            return dayContainer;
20896        }
20897        function buildDays() {
20898            if (self.daysContainer === undefined) {
20899                return;
20900            }
20901            clearNode(self.daysContainer);
20902            // TODO: week numbers for each month
20903            if (self.weekNumbers)
20904                clearNode(self.weekNumbers);
20905            var frag = document.createDocumentFragment();
20906            for (var i = 0; i < self.config.showMonths; i++) {
20907                var d = new Date(self.currentYear, self.currentMonth, 1);
20908                d.setMonth(self.currentMonth + i);
20909                frag.appendChild(buildMonthDays(d.getFullYear(), d.getMonth()));
20910            }
20911            self.daysContainer.appendChild(frag);
20912            self.days = self.daysContainer.firstChild;
20913            if (self.config.mode === "range" && self.selectedDates.length === 1) {
20914                onMouseOver();
20915            }
20916        }
20917        function buildMonthSwitch() {
20918            if (self.config.showMonths > 1 ||
20919                self.config.monthSelectorType !== "dropdown")
20920                return;
20921            var shouldBuildMonth = function (month) {
20922                if (self.config.minDate !== undefined &&
20923                    self.currentYear === self.config.minDate.getFullYear() &&
20924                    month < self.config.minDate.getMonth()) {
20925                    return false;
20926                }
20927                return !(self.config.maxDate !== undefined &&
20928                    self.currentYear === self.config.maxDate.getFullYear() &&
20929                    month > self.config.maxDate.getMonth());
20930            };
20931            self.monthsDropdownContainer.tabIndex = -1;
20932            self.monthsDropdownContainer.innerHTML = "";
20933            for (var i = 0; i < 12; i++) {
20934                if (!shouldBuildMonth(i))
20935                    continue;
20936                var month = createElement("option", "flatpickr-monthDropdown-month");
20937                month.value = new Date(self.currentYear, i).getMonth().toString();
20938                month.textContent = monthToStr(i, self.config.shorthandCurrentMonth, self.l10n);
20939                month.tabIndex = -1;
20940                if (self.currentMonth === i) {
20941                    month.selected = true;
20942                }
20943                self.monthsDropdownContainer.appendChild(month);
20944            }
20945        }
20946        function buildMonth() {
20947            var container = createElement("div", "flatpickr-month");
20948            var monthNavFragment = window.document.createDocumentFragment();
20949            var monthElement;
20950            if (self.config.showMonths > 1 ||
20951                self.config.monthSelectorType === "static") {
20952                monthElement = createElement("span", "cur-month");
20953            }
20954            else {
20955                self.monthsDropdownContainer = createElement("select", "flatpickr-monthDropdown-months");
20956                self.monthsDropdownContainer.setAttribute("aria-label", self.l10n.monthAriaLabel);
20957                bind(self.monthsDropdownContainer, "change", function (e) {
20958                    var target = getEventTarget(e);
20959                    var selectedMonth = parseInt(target.value, 10);
20960                    self.changeMonth(selectedMonth - self.currentMonth);
20961                    triggerEvent("onMonthChange");
20962                });
20963                buildMonthSwitch();
20964                monthElement = self.monthsDropdownContainer;
20965            }
20966            var yearInput = createNumberInput("cur-year", { tabindex: "-1" });
20967            var yearElement = yearInput.getElementsByTagName("input")[0];
20968            yearElement.setAttribute("aria-label", self.l10n.yearAriaLabel);
20969            if (self.config.minDate) {
20970                yearElement.setAttribute("min", self.config.minDate.getFullYear().toString());
20971            }
20972            if (self.config.maxDate) {
20973                yearElement.setAttribute("max", self.config.maxDate.getFullYear().toString());
20974                yearElement.disabled =
20975                    !!self.config.minDate &&
20976                        self.config.minDate.getFullYear() === self.config.maxDate.getFullYear();
20977            }
20978            var currentMonth = createElement("div", "flatpickr-current-month");
20979            currentMonth.appendChild(monthElement);
20980            currentMonth.appendChild(yearInput);
20981            monthNavFragment.appendChild(currentMonth);
20982            container.appendChild(monthNavFragment);
20983            return {
20984                container: container,
20985                yearElement: yearElement,
20986                monthElement: monthElement,
20987            };
20988        }
20989        function buildMonths() {
20990            clearNode(self.monthNav);
20991            self.monthNav.appendChild(self.prevMonthNav);
20992            if (self.config.showMonths) {
20993                self.yearElements = [];
20994                self.monthElements = [];
20995            }
20996            for (var m = self.config.showMonths; m--;) {
20997                var month = buildMonth();
20998                self.yearElements.push(month.yearElement);
20999                self.monthElements.push(month.monthElement);
21000                self.monthNav.appendChild(month.container);
21001            }
21002            self.monthNav.appendChild(self.nextMonthNav);
21003        }
21004        function buildMonthNav() {
21005            self.monthNav = createElement("div", "flatpickr-months");
21006            self.yearElements = [];
21007            self.monthElements = [];
21008            self.prevMonthNav = createElement("span", "flatpickr-prev-month");
21009            self.prevMonthNav.innerHTML = self.config.prevArrow;
21010            self.nextMonthNav = createElement("span", "flatpickr-next-month");
21011            self.nextMonthNav.innerHTML = self.config.nextArrow;
21012            buildMonths();
21013            Object.defineProperty(self, "_hidePrevMonthArrow", {
21014                get: function () { return self.__hidePrevMonthArrow; },
21015                set: function (bool) {
21016                    if (self.__hidePrevMonthArrow !== bool) {
21017                        toggleClass(self.prevMonthNav, "flatpickr-disabled", bool);
21018                        self.__hidePrevMonthArrow = bool;
21019                    }
21020                },
21021            });
21022            Object.defineProperty(self, "_hideNextMonthArrow", {
21023                get: function () { return self.__hideNextMonthArrow; },
21024                set: function (bool) {
21025                    if (self.__hideNextMonthArrow !== bool) {
21026                        toggleClass(self.nextMonthNav, "flatpickr-disabled", bool);
21027                        self.__hideNextMonthArrow = bool;
21028                    }
21029                },
21030            });
21031            self.currentYearElement = self.yearElements[0];
21032            updateNavigationCurrentMonth();
21033            return self.monthNav;
21034        }
21035        function buildTime() {
21036            self.calendarContainer.classList.add("hasTime");
21037            if (self.config.noCalendar)
21038                self.calendarContainer.classList.add("noCalendar");
21039            var defaults = getDefaultHours(self.config);
21040            self.timeContainer = createElement("div", "flatpickr-time");
21041            self.timeContainer.tabIndex = -1;
21042            var separator = createElement("span", "flatpickr-time-separator", ":");
21043            var hourInput = createNumberInput("flatpickr-hour", {
21044                "aria-label": self.l10n.hourAriaLabel,
21045            });
21046            self.hourElement = hourInput.getElementsByTagName("input")[0];
21047            var minuteInput = createNumberInput("flatpickr-minute", {
21048                "aria-label": self.l10n.minuteAriaLabel,
21049            });
21050            self.minuteElement = minuteInput.getElementsByTagName("input")[0];
21051            self.hourElement.tabIndex = self.minuteElement.tabIndex = -1;
21052            self.hourElement.value = pad(self.latestSelectedDateObj
21053                ? self.latestSelectedDateObj.getHours()
21054                : self.config.time_24hr
21055                    ? defaults.hours
21056                    : military2ampm(defaults.hours));
21057            self.minuteElement.value = pad(self.latestSelectedDateObj
21058                ? self.latestSelectedDateObj.getMinutes()
21059                : defaults.minutes);
21060            self.hourElement.setAttribute("step", self.config.hourIncrement.toString());
21061            self.minuteElement.setAttribute("step", self.config.minuteIncrement.toString());
21062            self.hourElement.setAttribute("min", self.config.time_24hr ? "0" : "1");
21063            self.hourElement.setAttribute("max", self.config.time_24hr ? "23" : "12");
21064            self.hourElement.setAttribute("maxlength", "2");
21065            self.minuteElement.setAttribute("min", "0");
21066            self.minuteElement.setAttribute("max", "59");
21067            self.minuteElement.setAttribute("maxlength", "2");
21068            self.timeContainer.appendChild(hourInput);
21069            self.timeContainer.appendChild(separator);
21070            self.timeContainer.appendChild(minuteInput);
21071            if (self.config.time_24hr)
21072                self.timeContainer.classList.add("time24hr");
21073            if (self.config.enableSeconds) {
21074                self.timeContainer.classList.add("hasSeconds");
21075                var secondInput = createNumberInput("flatpickr-second");
21076                self.secondElement = secondInput.getElementsByTagName("input")[0];
21077                self.secondElement.value = pad(self.latestSelectedDateObj
21078                    ? self.latestSelectedDateObj.getSeconds()
21079                    : defaults.seconds);
21080                self.secondElement.setAttribute("step", self.minuteElement.getAttribute("step"));
21081                self.secondElement.setAttribute("min", "0");
21082                self.secondElement.setAttribute("max", "59");
21083                self.secondElement.setAttribute("maxlength", "2");
21084                self.timeContainer.appendChild(createElement("span", "flatpickr-time-separator", ":"));
21085                self.timeContainer.appendChild(secondInput);
21086            }
21087            if (!self.config.time_24hr) {
21088                // add self.amPM if appropriate
21089                self.amPM = createElement("span", "flatpickr-am-pm", self.l10n.amPM[int((self.latestSelectedDateObj
21090                    ? self.hourElement.value
21091                    : self.config.defaultHour) > 11)]);
21092                self.amPM.title = self.l10n.toggleTitle;
21093                self.amPM.tabIndex = -1;
21094                self.timeContainer.appendChild(self.amPM);
21095            }
21096            return self.timeContainer;
21097        }
21098        function buildWeekdays() {
21099            if (!self.weekdayContainer)
21100                self.weekdayContainer = createElement("div", "flatpickr-weekdays");
21101            else
21102                clearNode(self.weekdayContainer);
21103            for (var i = self.config.showMonths; i--;) {
21104                var container = createElement("div", "flatpickr-weekdaycontainer");
21105                self.weekdayContainer.appendChild(container);
21106            }
21107            updateWeekdays();
21108            return self.weekdayContainer;
21109        }
21110        function updateWeekdays() {
21111            if (!self.weekdayContainer) {
21112                return;
21113            }
21114            var firstDayOfWeek = self.l10n.firstDayOfWeek;
21115            var weekdays = __spreadArrays(self.l10n.weekdays.shorthand);
21116            if (firstDayOfWeek > 0 && firstDayOfWeek < weekdays.length) {
21117                weekdays = __spreadArrays(weekdays.splice(firstDayOfWeek, weekdays.length), weekdays.splice(0, firstDayOfWeek));
21118            }
21119            for (var i = self.config.showMonths; i--;) {
21120                self.weekdayContainer.children[i].innerHTML = "\n      <span class='flatpickr-weekday'>\n        " + weekdays.join("</span><span class='flatpickr-weekday'>") + "\n      </span>\n      ";
21121            }
21122        }
21123        /* istanbul ignore next */
21124        function buildWeeks() {
21125            self.calendarContainer.classList.add("hasWeeks");
21126            var weekWrapper = createElement("div", "flatpickr-weekwrapper");
21127            weekWrapper.appendChild(createElement("span", "flatpickr-weekday", self.l10n.weekAbbreviation));
21128            var weekNumbers = createElement("div", "flatpickr-weeks");
21129            weekWrapper.appendChild(weekNumbers);
21130            return {
21131                weekWrapper: weekWrapper,
21132                weekNumbers: weekNumbers,
21133            };
21134        }
21135        function changeMonth(value, isOffset) {
21136            if (isOffset === void 0) { isOffset = true; }
21137            var delta = isOffset ? value : value - self.currentMonth;
21138            if ((delta < 0 && self._hidePrevMonthArrow === true) ||
21139                (delta > 0 && self._hideNextMonthArrow === true))
21140                return;
21141            self.currentMonth += delta;
21142            if (self.currentMonth < 0 || self.currentMonth > 11) {
21143                self.currentYear += self.currentMonth > 11 ? 1 : -1;
21144                self.currentMonth = (self.currentMonth + 12) % 12;
21145                triggerEvent("onYearChange");
21146                buildMonthSwitch();
21147            }
21148            buildDays();
21149            triggerEvent("onMonthChange");
21150            updateNavigationCurrentMonth();
21151        }
21152        function clear(triggerChangeEvent, toInitial) {
21153            if (triggerChangeEvent === void 0) { triggerChangeEvent = true; }
21154            if (toInitial === void 0) { toInitial = true; }
21155            self.input.value = "";
21156            if (self.altInput !== undefined)
21157                self.altInput.value = "";
21158            if (self.mobileInput !== undefined)
21159                self.mobileInput.value = "";
21160            self.selectedDates = [];
21161            self.latestSelectedDateObj = undefined;
21162            if (toInitial === true) {
21163                self.currentYear = self._initialDate.getFullYear();
21164                self.currentMonth = self._initialDate.getMonth();
21165            }
21166            if (self.config.enableTime === true) {
21167                var _a = getDefaultHours(self.config), hours = _a.hours, minutes = _a.minutes, seconds = _a.seconds;
21168                setHours(hours, minutes, seconds);
21169            }
21170            self.redraw();
21171            if (triggerChangeEvent)
21172                // triggerChangeEvent is true (default) or an Event
21173                triggerEvent("onChange");
21174        }
21175        function close() {
21176            self.isOpen = false;
21177            if (!self.isMobile) {
21178                if (self.calendarContainer !== undefined) {
21179                    self.calendarContainer.classList.remove("open");
21180                }
21181                if (self._input !== undefined) {
21182                    self._input.classList.remove("active");
21183                }
21184            }
21185            triggerEvent("onClose");
21186        }
21187        function destroy() {
21188            if (self.config !== undefined)
21189                triggerEvent("onDestroy");
21190            for (var i = self._handlers.length; i--;) {
21191                self._handlers[i].remove();
21192            }
21193            self._handlers = [];
21194            if (self.mobileInput) {
21195                if (self.mobileInput.parentNode)
21196                    self.mobileInput.parentNode.removeChild(self.mobileInput);
21197                self.mobileInput = undefined;
21198            }
21199            else if (self.calendarContainer && self.calendarContainer.parentNode) {
21200                if (self.config.static && self.calendarContainer.parentNode) {
21201                    var wrapper = self.calendarContainer.parentNode;
21202                    wrapper.lastChild && wrapper.removeChild(wrapper.lastChild);
21203                    if (wrapper.parentNode) {
21204                        while (wrapper.firstChild)
21205                            wrapper.parentNode.insertBefore(wrapper.firstChild, wrapper);
21206                        wrapper.parentNode.removeChild(wrapper);
21207                    }
21208                }
21209                else
21210                    self.calendarContainer.parentNode.removeChild(self.calendarContainer);
21211            }
21212            if (self.altInput) {
21213                self.input.type = "text";
21214                if (self.altInput.parentNode)
21215                    self.altInput.parentNode.removeChild(self.altInput);
21216                delete self.altInput;
21217            }
21218            if (self.input) {
21219                self.input.type = self.input._type;
21220                self.input.classList.remove("flatpickr-input");
21221                self.input.removeAttribute("readonly");
21222            }
21223            [
21224                "_showTimeInput",
21225                "latestSelectedDateObj",
21226                "_hideNextMonthArrow",
21227                "_hidePrevMonthArrow",
21228                "__hideNextMonthArrow",
21229                "__hidePrevMonthArrow",
21230                "isMobile",
21231                "isOpen",
21232                "selectedDateElem",
21233                "minDateHasTime",
21234                "maxDateHasTime",
21235                "days",
21236                "daysContainer",
21237                "_input",
21238                "_positionElement",
21239                "innerContainer",
21240                "rContainer",
21241                "monthNav",
21242                "todayDateElem",
21243                "calendarContainer",
21244                "weekdayContainer",
21245                "prevMonthNav",
21246                "nextMonthNav",
21247                "monthsDropdownContainer",
21248                "currentMonthElement",
21249                "currentYearElement",
21250                "navigationCurrentMonth",
21251                "selectedDateElem",
21252                "config",
21253            ].forEach(function (k) {
21254                try {
21255                    delete self[k];
21256                }
21257                catch (_) { }
21258            });
21259        }
21260        function isCalendarElem(elem) {
21261            
vendor: 16,179 bytes, lines 21261-21595
21261if (self.config.appendTo && self.config.appendTo.contains(elem))
21262                return true;
21263            return self.calendarContainer.contains(elem);
21264        }
21265        function documentClick(e) {
21266            if (self.isOpen && !self.config.inline) {
21267                var eventTarget_1 = getEventTarget(e);
21268                var isCalendarElement = isCalendarElem(eventTarget_1);
21269                var isInput = eventTarget_1 === self.input ||
21270                    eventTarget_1 === self.altInput ||
21271                    self.element.contains(eventTarget_1) ||
21272                    // web components
21273                    // e.path is not present in all browsers. circumventing typechecks
21274                    (e.path &&
21275                        e.path.indexOf &&
21276                        (~e.path.indexOf(self.input) ||
21277                            ~e.path.indexOf(self.altInput)));
21278                var lostFocus = e.type === "blur"
21279                    ? isInput &&
21280                        e.relatedTarget &&
21281                        !isCalendarElem(e.relatedTarget)
21282                    : !isInput &&
21283                        !isCalendarElement &&
21284                        !isCalendarElem(e.relatedTarget);
21285                var isIgnored = !self.config.ignoredFocusElements.some(function (elem) {
21286                    return elem.contains(eventTarget_1);
21287                });
21288                if (lostFocus && isIgnored) {
21289                    if (self.timeContainer !== undefined &&
21290                        self.minuteElement !== undefined &&
21291                        self.hourElement !== undefined &&
21292                        self.input.value !== "" &&
21293                        self.input.value !== undefined) {
21294                        updateTime();
21295                    }
21296                    self.close();
21297                    if (self.config &&
21298                        self.config.mode === "range" &&
21299                        self.selectedDates.length === 1) {
21300                        self.clear(false);
21301                        self.redraw();
21302                    }
21303                }
21304            }
21305        }
21306        function changeYear(newYear) {
21307            if (!newYear ||
21308                (self.config.minDate && newYear < self.config.minDate.getFullYear()) ||
21309                (self.config.maxDate && newYear > self.config.maxDate.getFullYear()))
21310                return;
21311            var newYearNum = newYear, isNewYear = self.currentYear !== newYearNum;
21312            self.currentYear = newYearNum || self.currentYear;
21313            if (self.config.maxDate &&
21314                self.currentYear === self.config.maxDate.getFullYear()) {
21315                self.currentMonth = Math.min(self.config.maxDate.getMonth(), self.currentMonth);
21316            }
21317            else if (self.config.minDate &&
21318                self.currentYear === self.config.minDate.getFullYear()) {
21319                self.currentMonth = Math.max(self.config.minDate.getMonth(), self.currentMonth);
21320            }
21321            if (isNewYear) {
21322                self.redraw();
21323                triggerEvent("onYearChange");
21324                buildMonthSwitch();
21325            }
21326        }
21327        function isEnabled(date, timeless) {
21328            var _a;
21329            if (timeless === void 0) { timeless = true; }
21330            var dateToCheck = self.parseDate(date, undefined, timeless); // timeless
21331            if ((self.config.minDate &&
21332                dateToCheck &&
21333                compareDates(dateToCheck, self.config.minDate, timeless !== undefined ? timeless : !self.minDateHasTime) < 0) ||
21334                (self.config.maxDate &&
21335                    dateToCheck &&
21336                    compareDates(dateToCheck, self.config.maxDate, timeless !== undefined ? timeless : !self.maxDateHasTime) > 0))
21337                return false;
21338            if (!self.config.enable && self.config.disable.length === 0)
21339                return true;
21340            if (dateToCheck === undefined)
21341                return false;
21342            var bool = !!self.config.enable, array = (_a = self.config.enable) !== null && _a !== void 0 ? _a : self.config.disable;
21343            for (var i = 0, d = void 0; i < array.length; i++) {
21344                d = array[i];
21345                if (typeof d === "function" &&
21346                    d(dateToCheck) // disabled by function
21347                )
21348                    return bool;
21349                else if (d instanceof Date &&
21350                    dateToCheck !== undefined &&
21351                    d.getTime() === dateToCheck.getTime())
21352                    // disabled by date
21353                    return bool;
21354                else if (typeof d === "string") {
21355                    // disabled by date string
21356                    var parsed = self.parseDate(d, undefined, true);
21357                    return parsed && parsed.getTime() === dateToCheck.getTime()
21358                        ? bool
21359                        : !bool;
21360                }
21361                else if (
21362                // disabled by range
21363                typeof d === "object" &&
21364                    dateToCheck !== undefined &&
21365                    d.from &&
21366                    d.to &&
21367                    dateToCheck.getTime() >= d.from.getTime() &&
21368                    dateToCheck.getTime() <= d.to.getTime())
21369                    return bool;
21370            }
21371            return !bool;
21372        }
21373        function isInView(elem) {
21374            if (self.daysContainer !== undefined)
21375                return (elem.className.indexOf("hidden") === -1 &&
21376                    elem.className.indexOf("flatpickr-disabled") === -1 &&
21377                    self.daysContainer.contains(elem));
21378            return false;
21379        }
21380        function onBlur(e) {
21381            var isInput = e.target === self._input;
21382            if (isInput &&
21383                (self.selectedDates.length > 0 || self._input.value.length > 0) &&
21384                !(e.relatedTarget && isCalendarElem(e.relatedTarget))) {
21385                self.setDate(self._input.value, true, e.target === self.altInput
21386                    ? self.config.altFormat
21387                    : self.config.dateFormat);
21388            }
21389        }
21390        function onKeyDown(e) {
21391            // e.key                      e.keyCode
21392            // "Backspace"                        8
21393            // "Tab"                              9
21394            // "Enter"                           13
21395            // "Escape"     (IE "Esc")           27
21396            // "ArrowLeft"  (IE "Left")          37
21397            // "ArrowUp"    (IE "Up")            38
21398            // "ArrowRight" (IE "Right")         39
21399            // "ArrowDown"  (IE "Down")          40
21400            // "Delete"     (IE "Del")           46
21401            var eventTarget = getEventTarget(e);
21402            var isInput = self.config.wrap
21403                ? element.contains(eventTarget)
21404                : eventTarget === self._input;
21405            var allowInput = self.config.allowInput;
21406            var allowKeydown = self.isOpen && (!allowInput || !isInput);
21407            var allowInlineKeydown = self.config.inline && isInput && !allowInput;
21408            if (e.keyCode === 13 && isInput) {
21409                if (allowInput) {
21410                    self.setDate(self._input.value, true, eventTarget === self.altInput
21411                        ? self.config.altFormat
21412                        : self.config.dateFormat);
21413                    return eventTarget.blur();
21414                }
21415                else {
21416                    self.open();
21417                }
21418            }
21419            else if (isCalendarElem(eventTarget) ||
21420                allowKeydown ||
21421                allowInlineKeydown) {
21422                var isTimeObj = !!self.timeContainer &&
21423                    self.timeContainer.contains(eventTarget);
21424                switch (e.keyCode) {
21425                    case 13:
21426                        if (isTimeObj) {
21427                            e.preventDefault();
21428                            updateTime();
21429                            focusAndClose();
21430                        }
21431                        else
21432                            selectDate(e);
21433                        break;
21434                    case 27: // escape
21435                        e.preventDefault();
21436                        focusAndClose();
21437                        break;
21438                    case 8:
21439                    case 46:
21440                        if (isInput && !self.config.allowInput) {
21441                            e.preventDefault();
21442                            self.clear();
21443                        }
21444                        break;
21445                    case 37:
21446                    case 39:
21447                        if (!isTimeObj && !isInput) {
21448                            e.preventDefault();
21449                            if (self.daysContainer !== undefined &&
21450                                (allowInput === false ||
21451                                    (document.activeElement && isInView(document.activeElement)))) {
21452                                var delta_1 = e.keyCode === 39 ? 1 : -1;
21453                                if (!e.ctrlKey)
21454                                    focusOnDay(undefined, delta_1);
21455                                else {
21456                                    e.stopPropagation();
21457                                    changeMonth(delta_1);
21458                                    focusOnDay(getFirstAvailableDay(1), 0);
21459                                }
21460                            }
21461                        }
21462                        else if (self.hourElement)
21463                            self.hourElement.focus();
21464                        break;
21465                    case 38:
21466                    case 40:
21467                        e.preventDefault();
21468                        var delta = e.keyCode === 40 ? 1 : -1;
21469                        if ((self.daysContainer &&
21470                            eventTarget.$i !== undefined) ||
21471                            eventTarget === self.input ||
21472                            eventTarget === self.altInput) {
21473                            if (e.ctrlKey) {
21474                                e.stopPropagation();
21475                                changeYear(self.currentYear - delta);
21476                                focusOnDay(getFirstAvailableDay(1), 0);
21477                            }
21478                            else if (!isTimeObj)
21479                                focusOnDay(undefined, delta * 7);
21480                        }
21481                        else if (eventTarget === self.currentYearElement) {
21482                            changeYear(self.currentYear - delta);
21483                        }
21484                        else if (self.config.enableTime) {
21485                            if (!isTimeObj && self.hourElement)
21486                                self.hourElement.focus();
21487                            updateTime(e);
21488                            self._debouncedChange();
21489                        }
21490                        break;
21491                    case 9:
21492                        if (isTimeObj) {
21493                            var elems = [
21494                                self.hourElement,
21495                                self.minuteElement,
21496                                self.secondElement,
21497                                self.amPM,
21498                            ]
21499                                .concat(self.pluginElements)
21500                                .filter(function (x) { return x; });
21501                            var i = elems.indexOf(eventTarget);
21502                            if (i !== -1) {
21503                                var target = elems[i + (e.shiftKey ? -1 : 1)];
21504                                e.preventDefault();
21505                                (target || self._input).focus();
21506                            }
21507                        }
21508                        else if (!self.config.noCalendar &&
21509                            self.daysContainer &&
21510                            self.daysContainer.contains(eventTarget) &&
21511                            e.shiftKey) {
21512                            e.preventDefault();
21513                            self._input.focus();
21514                        }
21515                        break;
21516                }
21517            }
21518            if (self.amPM !== undefined && eventTarget === self.amPM) {
21519                switch (e.key) {
21520                    case self.l10n.amPM[0].charAt(0):
21521                    case self.l10n.amPM[0].charAt(0).toLowerCase():
21522                        self.amPM.textContent = self.l10n.amPM[0];
21523                        setHoursFromInputs();
21524                        updateValue();
21525                        break;
21526                    case self.l10n.amPM[1].charAt(0):
21527                    case self.l10n.amPM[1].charAt(0).toLowerCase():
21528                        self.amPM.textContent = self.l10n.amPM[1];
21529                        setHoursFromInputs();
21530                        updateValue();
21531                        break;
21532                }
21533            }
21534            if (isInput || isCalendarElem(eventTarget)) {
21535                triggerEvent("onKeyDown", e);
21536            }
21537        }
21538        function onMouseOver(elem) {
21539            if (self.selectedDates.length !== 1 ||
21540                (elem &&
21541                    (!elem.classList.contains("flatpickr-day") ||
21542                        elem.classList.contains("flatpickr-disabled"))))
21543                return;
21544            var hoverDate = elem
21545                ? elem.dateObj.getTime()
21546                : self.days.firstElementChild.dateObj.getTime(), initialDate = self.parseDate(self.selectedDates[0], undefined, true).getTime(), rangeStartDate = Math.min(hoverDate, self.selectedDates[0].getTime()), rangeEndDate = Math.max(hoverDate, self.selectedDates[0].getTime());
21547            var containsDisabled = false;
21548            var minRange = 0, maxRange = 0;
21549            for (var t = rangeStartDate; t < rangeEndDate; t += duration.DAY) {
21550                if (!isEnabled(new Date(t), true)) {
21551                    containsDisabled =
21552                        containsDisabled || (t > rangeStartDate && t < rangeEndDate);
21553                    if (t < initialDate && (!minRange || t > minRange))
21554                        minRange = t;
21555                    else if (t > initialDate && (!maxRange || t < maxRange))
21556                        maxRange = t;
21557                }
21558            }
21559            for (var m = 0; m < self.config.showMonths; m++) {
21560                var month = self.daysContainer.children[m];
21561                var _loop_1 = function (i, l) {
21562                    var dayElem = month.children[i], date = dayElem.dateObj;
21563                    var timestamp = date.getTime();
21564                    var outOfRange = (minRange > 0 && timestamp < minRange) ||
21565                        (maxRange > 0 && timestamp > maxRange);
21566                    if (outOfRange) {
21567                        dayElem.classList.add("notAllowed");
21568                        ["inRange", "startRange", "endRange"].forEach(function (c) {
21569                            dayElem.classList.remove(c);
21570                        });
21571                        return "continue";
21572                    }
21573                    else if (containsDisabled && !outOfRange)
21574                        return "continue";
21575                    ["startRange", "inRange", "endRange", "notAllowed"].forEach(function (c) {
21576                        dayElem.classList.remove(c);
21577                    });
21578                    if (elem !== undefined) {
21579                        elem.classList.add(hoverDate <= self.selectedDates[0].getTime()
21580                            ? "startRange"
21581                            : "endRange");
21582                        if (initialDate < hoverDate && timestamp === initialDate)
21583                            dayElem.classList.add("startRange");
21584                        else if (initialDate > hoverDate && timestamp === initialDate)
21585                            dayElem.classList.add("endRange");
21586                        if (timestamp >= minRange &&
21587                            (maxRange === 0 || timestamp <= maxRange) &&
21588                            isBetween(timestamp, initialDate, hoverDate))
21589                            dayElem.classList.add("inRange");
21590                    }
21591                };
21592                for (var i = 0, l = month.children.length; i < l; i++) {
21593                    _loop_1(i, l);
21594                }
21595            }
vendor: 9,139 bytes, lines 21595-21788
21595
21596        }
21597        function onResize() {
21598            if (self.isOpen && !self.config.static && !self.config.inline)
21599                positionCalendar();
21600        }
21601        function open(e, positionElement) {
21602            if (positionElement === void 0) { positionElement = self._positionElement; }
21603            if (self.isMobile === true) {
21604                if (e) {
21605                    e.preventDefault();
21606                    var eventTarget = getEventTarget(e);
21607                    if (eventTarget) {
21608                        eventTarget.blur();
21609                    }
21610                }
21611                if (self.mobileInput !== undefined) {
21612                    self.mobileInput.focus();
21613                    self.mobileInput.click();
21614                }
21615                triggerEvent("onOpen");
21616                return;
21617            }
21618            else if (self._input.disabled || self.config.inline) {
21619                return;
21620            }
21621            var wasOpen = self.isOpen;
21622            self.isOpen = true;
21623            if (!wasOpen) {
21624                self.calendarContainer.classList.add("open");
21625                self._input.classList.add("active");
21626                triggerEvent("onOpen");
21627                positionCalendar(positionElement);
21628            }
21629            if (self.config.enableTime === true && self.config.noCalendar === true) {
21630                if (self.config.allowInput === false &&
21631                    (e === undefined ||
21632                        !self.timeContainer.contains(e.relatedTarget))) {
21633                    setTimeout(function () { return self.hourElement.select(); }, 50);
21634                }
21635            }
21636        }
21637        function minMaxDateSetter(type) {
21638            return function (date) {
21639                var dateObj = (self.config["_" + type + "Date"] = self.parseDate(date, self.config.dateFormat));
21640                var inverseDateObj = self.config["_" + (type === "min" ? "max" : "min") + "Date"];
21641                if (dateObj !== undefined) {
21642                    self[type === "min" ? "minDateHasTime" : "maxDateHasTime"] =
21643                        dateObj.getHours() > 0 ||
21644                            dateObj.getMinutes() > 0 ||
21645                            dateObj.getSeconds() > 0;
21646                }
21647                if (self.selectedDates) {
21648                    self.selectedDates = self.selectedDates.filter(function (d) { return isEnabled(d); });
21649                    if (!self.selectedDates.length && type === "min")
21650                        setHoursFromDate(dateObj);
21651                    updateValue();
21652                }
21653                if (self.daysContainer) {
21654                    redraw();
21655                    if (dateObj !== undefined)
21656                        self.currentYearElement[type] = dateObj.getFullYear().toString();
21657                    else
21658                        self.currentYearElement.removeAttribute(type);
21659                    self.currentYearElement.disabled =
21660                        !!inverseDateObj &&
21661                            dateObj !== undefined &&
21662                            inverseDateObj.getFullYear() === dateObj.getFullYear();
21663                }
21664            };
21665        }
21666        function parseConfig() {
21667            var boolOpts = [
21668                "wrap",
21669                "weekNumbers",
21670                "allowInput",
21671                "allowInvalidPreload",
21672                "clickOpens",
21673                "time_24hr",
21674                "enableTime",
21675                "noCalendar",
21676                "altInput",
21677                "shorthandCurrentMonth",
21678                "inline",
21679                "static",
21680                "enableSeconds",
21681                "disableMobile",
21682            ];
21683            var userConfig = __assign(__assign({}, JSON.parse(JSON.stringify(element.dataset || {}))), instanceConfig);
21684            var formats = {};
21685            self.config.parseDate = userConfig.parseDate;
21686            self.config.formatDate = userConfig.formatDate;
21687            Object.defineProperty(self.config, "enable", {
21688                get: function () { return self.config._enable; },
21689                set: function (dates) {
21690                    self.config._enable = parseDateRules(dates);
21691                },
21692            });
21693            Object.defineProperty(self.config, "disable", {
21694                get: function () { return self.config._disable; },
21695                set: function (dates) {
21696                    self.config._disable = parseDateRules(dates);
21697                },
21698            });
21699            var timeMode = userConfig.mode === "time";
21700            if (!userConfig.dateFormat && (userConfig.enableTime || timeMode)) {
21701                var defaultDateFormat = flatpickr.defaultConfig.dateFormat || defaults.dateFormat;
21702                formats.dateFormat =
21703                    userConfig.noCalendar || timeMode
21704                        ? "H:i" + (userConfig.enableSeconds ? ":S" : "")
21705                        : defaultDateFormat + " H:i" + (userConfig.enableSeconds ? ":S" : "");
21706            }
21707            if (userConfig.altInput &&
21708                (userConfig.enableTime || timeMode) &&
21709                !userConfig.altFormat) {
21710                var defaultAltFormat = flatpickr.defaultConfig.altFormat || defaults.altFormat;
21711                formats.altFormat =
21712                    userConfig.noCalendar || timeMode
21713                        ? "h:i" + (userConfig.enableSeconds ? ":S K" : " K")
21714                        : defaultAltFormat + (" h:i" + (userConfig.enableSeconds ? ":S" : "") + " K");
21715            }
21716            Object.defineProperty(self.config, "minDate", {
21717                get: function () { return self.config._minDate; },
21718                set: minMaxDateSetter("min"),
21719            });
21720            Object.defineProperty(self.config, "maxDate", {
21721                get: function () { return self.config._maxDate; },
21722                set: minMaxDateSetter("max"),
21723            });
21724            var minMaxTimeSetter = function (type) { return function (val) {
21725                self.config[type === "min" ? "_minTime" : "_maxTime"] = self.parseDate(val, "H:i:S");
21726            }; };
21727            Object.defineProperty(self.config, "minTime", {
21728                get: function () { return self.config._minTime; },
21729                set: minMaxTimeSetter("min"),
21730            });
21731            Object.defineProperty(self.config, "maxTime", {
21732                get: function () { return self.config._maxTime; },
21733                set: minMaxTimeSetter("max"),
21734            });
21735            if (userConfig.mode === "time") {
21736                self.config.noCalendar = true;
21737                self.config.enableTime = true;
21738            }
21739            Object.assign(self.config, formats, userConfig);
21740            for (var i = 0; i < boolOpts.length; i++)
21741                // https://github.com/microsoft/TypeScript/issues/31663
21742                self.config[boolOpts[i]] =
21743                    self.config[boolOpts[i]] === true ||
21744                        self.config[boolOpts[i]] === "true";
21745            HOOKS.filter(function (hook) { return self.config[hook] !== undefined; }).forEach(function (hook) {
21746                self.config[hook] = arrayify(self.config[hook] || []).map(bindToInstance);
21747            });
21748            self.isMobile =
21749                !self.config.disableMobile &&
21750                    !self.config.inline &&
21751                    self.config.mode === "single" &&
21752                    !self.config.disable.length &&
21753                    !self.config.enable &&
21754                    !self.config.weekNumbers &&
21755                    /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
21756            for (var i = 0; i < self.config.plugins.length; i++) {
21757                var pluginConf = self.config.plugins[i](self) || {};
21758                for (var key in pluginConf) {
21759                    if (HOOKS.indexOf(key) > -1) {
21760                        self.config[key] = arrayify(pluginConf[key])
21761                            .map(bindToInstance)
21762                            .concat(self.config[key]);
21763                    }
21764                    else if (typeof userConfig[key] === "undefined")
21765                        self.config[key] = pluginConf[key];
21766                }
21767            }
21768            if (!userConfig.altInputClass) {
21769                self.config.altInputClass =
21770                    getInputElem().className + " " + self.config.altInputClass;
21771            }
21772            triggerEvent("onParseConfig");
21773        }
21774        function getInputElem() {
21775            return self.config.wrap
21776                ? element.querySelector("[data-input]")
21777                : element;
21778        }
21779        function setupLocale() {
21780            if (typeof self.config.locale !== "object" &&
21781                typeof flatpickr.l10ns[self.config.locale] === "undefined")
21782                self.config.errorHandler(new Error("flatpickr: invalid locale " + self.config.locale));
21783            self.l10n = __assign(__assign({}, flatpickr.l10ns.default), (typeof self.config.locale === "object"
21784                ? self.config.locale
21785                : self.config.locale !== "default"
21786                    ? flatpickr.l10ns[self.config.locale]
21787                    : undefined));
21788            tokenRegex.
vendor: 9,632 bytes, lines 21788-21980
21788K = "(" + self.l10n.amPM[0] + "|" + self.l10n.amPM[1] + "|" + self.l10n.amPM[0].toLowerCase() + "|" + self.l10n.amPM[1].toLowerCase() + ")";
21789            var userConfig = __assign(__assign({}, instanceConfig), JSON.parse(JSON.stringify(element.dataset || {})));
21790            if (userConfig.time_24hr === undefined &&
21791                flatpickr.defaultConfig.time_24hr === undefined) {
21792                self.config.time_24hr = self.l10n.time_24hr;
21793            }
21794            self.formatDate = createDateFormatter(self);
21795            self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });
21796        }
21797        function positionCalendar(customPositionElement) {
21798            if (typeof self.config.position === "function") {
21799                return void self.config.position(self, customPositionElement);
21800            }
21801            if (self.calendarContainer === undefined)
21802                return;
21803            triggerEvent("onPreCalendarPosition");
21804            var positionElement = customPositionElement || self._positionElement;
21805            var calendarHeight = Array.prototype.reduce.call(self.calendarContainer.children, (function (acc, child) { return acc + child.offsetHeight; }), 0), calendarWidth = self.calendarContainer.offsetWidth, configPos = self.config.position.split(" "), configPosVertical = configPos[0], configPosHorizontal = configPos.length > 1 ? configPos[1] : null, inputBounds = positionElement.getBoundingClientRect(), distanceFromBottom = window.innerHeight - inputBounds.bottom, showOnTop = configPosVertical === "above" ||
21806                (configPosVertical !== "below" &&
21807                    distanceFromBottom < calendarHeight &&
21808                    inputBounds.top > calendarHeight);
21809            var top = window.pageYOffset +
21810                inputBounds.top +
21811                (!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2);
21812            toggleClass(self.calendarContainer, "arrowTop", !showOnTop);
21813            toggleClass(self.calendarContainer, "arrowBottom", showOnTop);
21814            if (self.config.inline)
21815                return;
21816            var left = window.pageXOffset + inputBounds.left;
21817            var isCenter = false;
21818            var isRight = false;
21819            if (configPosHorizontal === "center") {
21820                left -= (calendarWidth - inputBounds.width) / 2;
21821                isCenter = true;
21822            }
21823            else if (configPosHorizontal === "right") {
21824                left -= calendarWidth - inputBounds.width;
21825                isRight = true;
21826            }
21827            toggleClass(self.calendarContainer, "arrowLeft", !isCenter && !isRight);
21828            toggleClass(self.calendarContainer, "arrowCenter", isCenter);
21829            toggleClass(self.calendarContainer, "arrowRight", isRight);
21830            var right = window.document.body.offsetWidth -
21831                (window.pageXOffset + inputBounds.right);
21832            var rightMost = left + calendarWidth > window.document.body.offsetWidth;
21833            var centerMost = right + calendarWidth > window.document.body.offsetWidth;
21834            toggleClass(self.calendarContainer, "rightMost", rightMost);
21835            if (self.config.static)
21836                return;
21837            self.calendarContainer.style.top = top + "px";
21838            if (!rightMost) {
21839                self.calendarContainer.style.left = left + "px";
21840                self.calendarContainer.style.right = "auto";
21841            }
21842            else if (!centerMost) {
21843                self.calendarContainer.style.left = "auto";
21844                self.calendarContainer.style.right = right + "px";
21845            }
21846            else {
21847                var doc = getDocumentStyleSheet();
21848                // some testing environments don't have css support
21849                if (doc === undefined)
21850                    return;
21851                var bodyWidth = window.document.body.offsetWidth;
21852                var centerLeft = Math.max(0, bodyWidth / 2 - calendarWidth / 2);
21853                var centerBefore = ".flatpickr-calendar.centerMost:before";
21854                var centerAfter = ".flatpickr-calendar.centerMost:after";
21855                var centerIndex = doc.cssRules.length;
21856                var centerStyle = "{left:" + inputBounds.left + "px;right:auto;}";
21857                toggleClass(self.calendarContainer, "rightMost", false);
21858                toggleClass(self.calendarContainer, "centerMost", true);
21859                doc.insertRule(centerBefore + "," + centerAfter + centerStyle, centerIndex);
21860                self.calendarContainer.style.left = centerLeft + "px";
21861                self.calendarContainer.style.right = "auto";
21862            }
21863        }
21864        function getDocumentStyleSheet() {
21865            var editableSheet = null;
21866            for (var i = 0; i < document.styleSheets.length; i++) {
21867                var sheet = document.styleSheets[i];
21868                try {
21869                    sheet.cssRules;
21870                }
21871                catch (err) {
21872                    continue;
21873                }
21874                editableSheet = sheet;
21875                break;
21876            }
21877            return editableSheet != null ? editableSheet : createStyleSheet();
21878        }
21879        function createStyleSheet() {
21880            var style = document.createElement("style");
21881            document.head.appendChild(style);
21882            return style.sheet;
21883        }
21884        function redraw() {
21885            if (self.config.noCalendar || self.isMobile)
21886                return;
21887            buildMonthSwitch();
21888            updateNavigationCurrentMonth();
21889            buildDays();
21890        }
21891        function focusAndClose() {
21892            self._input.focus();
21893            if (window.navigator.userAgent.indexOf("MSIE") !== -1 ||
21894                navigator.msMaxTouchPoints !== undefined) {
21895                // hack - bugs in the way IE handles focus keeps the calendar open
21896                setTimeout(self.close, 0);
21897            }
21898            else {
21899                self.close();
21900            }
21901        }
21902        function selectDate(e) {
21903            e.preventDefault();
21904            e.stopPropagation();
21905            var isSelectable = function (day) {
21906                return day.classList &&
21907                    day.classList.contains("flatpickr-day") &&
21908                    !day.classList.contains("flatpickr-disabled") &&
21909                    !day.classList.contains("notAllowed");
21910            };
21911            var t = findParent(getEventTarget(e), isSelectable);
21912            if (t === undefined)
21913                return;
21914            var target = t;
21915            var selectedDate = (self.latestSelectedDateObj = new Date(target.dateObj.getTime()));
21916            var shouldChangeMonth = (selectedDate.getMonth() < self.currentMonth ||
21917                selectedDate.getMonth() >
21918                    self.currentMonth + self.config.showMonths - 1) &&
21919                self.config.mode !== "range";
21920            self.selectedDateElem = target;
21921            if (self.config.mode === "single")
21922                self.selectedDates = [selectedDate];
21923            else if (self.config.mode === "multiple") {
21924                var selectedIndex = isDateSelected(selectedDate);
21925                if (selectedIndex)
21926                    self.selectedDates.splice(parseInt(selectedIndex), 1);
21927                else
21928                    self.selectedDates.push(selectedDate);
21929            }
21930            else if (self.config.mode === "range") {
21931                if (self.selectedDates.length === 2) {
21932                    self.clear(false, false);
21933                }
21934                self.latestSelectedDateObj = selectedDate;
21935                self.selectedDates.push(selectedDate);
21936                // unless selecting same date twice, sort ascendingly
21937                if (compareDates(selectedDate, self.selectedDates[0], true) !== 0)
21938                    self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });
21939            }
21940            setHoursFromInputs();
21941            if (shouldChangeMonth) {
21942                var isNewYear = self.currentYear !== selectedDate.getFullYear();
21943                self.currentYear = selectedDate.getFullYear();
21944                self.currentMonth = selectedDate.getMonth();
21945                if (isNewYear) {
21946                    triggerEvent("onYearChange");
21947                    buildMonthSwitch();
21948                }
21949                triggerEvent("onMonthChange");
21950            }
21951            updateNavigationCurrentMonth();
21952            buildDays();
21953            updateValue();
21954            // maintain focus
21955            if (!shouldChangeMonth &&
21956                self.config.mode !== "range" &&
21957                self.config.showMonths === 1)
21958                focusOnDayElem(target);
21959            else if (self.selectedDateElem !== undefined &&
21960                self.hourElement === undefined) {
21961                self.selectedDateElem && self.selectedDateElem.focus();
21962            }
21963            if (self.hourElement !== undefined)
21964                self.hourElement !== undefined && self.hourElement.focus();
21965            if (self.config.closeOnSelect) {
21966                var single = self.config.mode === "single" && !self.config.enableTime;
21967                var range = self.config.mode === "range" &&
21968                    self.selectedDates.length === 2 &&
21969                    !self.config.enableTime;
21970                if (single || range) {
21971                    focusAndClose();
21972                }
21973            }
21974            triggerChange();
21975        }
21976        var CALLBACKS = {
21977            locale: [setupLocale, updateWeekdays],
21978            showMonths: [buildMonths, setCalendarWidth, buildWeekdays],
21979            minDate: [jumpToDate],
21980            maxDate: [jumpToDate
vendor: 8,137 bytes, lines 21980-22152
21980],
21981            clickOpens: [
21982                function () {
21983                    if (self.config.clickOpens === true) {
21984                        bind(self._input, "focus", self.open);
21985                        bind(self._input, "click", self.open);
21986                    }
21987                    else {
21988                        self._input.removeEventListener("focus", self.open);
21989                        self._input.removeEventListener("click", self.open);
21990                    }
21991                },
21992            ],
21993        };
21994        function set(option, value) {
21995            if (option !== null && typeof option === "object") {
21996                Object.assign(self.config, option);
21997                for (var key in option) {
21998                    if (CALLBACKS[key] !== undefined)
21999                        CALLBACKS[key].forEach(function (x) { return x(); });
22000                }
22001            }
22002            else {
22003                self.config[option] = value;
22004                if (CALLBACKS[option] !== undefined)
22005                    CALLBACKS[option].forEach(function (x) { return x(); });
22006                else if (HOOKS.indexOf(option) > -1)
22007                    self.config[option] = arrayify(value);
22008            }
22009            self.redraw();
22010            updateValue(true);
22011        }
22012        function setSelectedDate(inputDate, format) {
22013            var dates = [];
22014            if (inputDate instanceof Array)
22015                dates = inputDate.map(function (d) { return self.parseDate(d, format); });
22016            else if (inputDate instanceof Date || typeof inputDate === "number")
22017                dates = [self.parseDate(inputDate, format)];
22018            else if (typeof inputDate === "string") {
22019                switch (self.config.mode) {
22020                    case "single":
22021                    case "time":
22022                        dates = [self.parseDate(inputDate, format)];
22023                        break;
22024                    case "multiple":
22025                        dates = inputDate
22026                            .split(self.config.conjunction)
22027                            .map(function (date) { return self.parseDate(date, format); });
22028                        break;
22029                    case "range":
22030                        dates = inputDate
22031                            .split(self.l10n.rangeSeparator)
22032                            .map(function (date) { return self.parseDate(date, format); });
22033                        break;
22034                }
22035            }
22036            else
22037                self.config.errorHandler(new Error("Invalid date supplied: " + JSON.stringify(inputDate)));
22038            self.selectedDates = (self.config.allowInvalidPreload
22039                ? dates
22040                : dates.filter(function (d) { return d instanceof Date && isEnabled(d, false); }));
22041            if (self.config.mode === "range")
22042                self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });
22043        }
22044        function setDate(date, triggerChange, format) {
22045            if (triggerChange === void 0) { triggerChange = false; }
22046            if (format === void 0) { format = self.config.dateFormat; }
22047            if ((date !== 0 && !date) || (date instanceof Array && date.length === 0))
22048                return self.clear(triggerChange);
22049            setSelectedDate(date, format);
22050            self.latestSelectedDateObj =
22051                self.selectedDates[self.selectedDates.length - 1];
22052            self.redraw();
22053            jumpToDate(undefined, triggerChange);
22054            setHoursFromDate();
22055            if (self.selectedDates.length === 0) {
22056                self.clear(false);
22057            }
22058            updateValue(triggerChange);
22059            if (triggerChange)
22060                triggerEvent("onChange");
22061        }
22062        function parseDateRules(arr) {
22063            return arr
22064                .slice()
22065                .map(function (rule) {
22066                if (typeof rule === "string" ||
22067                    typeof rule === "number" ||
22068                    rule instanceof Date) {
22069                    return self.parseDate(rule, undefined, true);
22070                }
22071                else if (rule &&
22072                    typeof rule === "object" &&
22073                    rule.from &&
22074                    rule.to)
22075                    return {
22076                        from: self.parseDate(rule.from, undefined),
22077                        to: self.parseDate(rule.to, undefined),
22078                    };
22079                return rule;
22080            })
22081                .filter(function (x) { return x; }); // remove falsy values
22082        }
22083        function setupDates() {
22084            self.selectedDates = [];
22085            self.now = self.parseDate(self.config.now) || new Date();
22086            // Workaround IE11 setting placeholder as the input's value
22087            var preloadedDate = self.config.defaultDate ||
22088                ((self.input.nodeName === "INPUT" ||
22089                    self.input.nodeName === "TEXTAREA") &&
22090                    self.input.placeholder &&
22091                    self.input.value === self.input.placeholder
22092                    ? null
22093                    : self.input.value);
22094            if (preloadedDate)
22095                setSelectedDate(preloadedDate, self.config.dateFormat);
22096            self._initialDate =
22097                self.selectedDates.length > 0
22098                    ? self.selectedDates[0]
22099                    : self.config.minDate &&
22100                        self.config.minDate.getTime() > self.now.getTime()
22101                        ? self.config.minDate
22102                        : self.config.maxDate &&
22103                            self.config.maxDate.getTime() < self.now.getTime()
22104                            ? self.config.maxDate
22105                            : self.now;
22106            self.currentYear = self._initialDate.getFullYear();
22107            self.currentMonth = self._initialDate.getMonth();
22108            if (self.selectedDates.length > 0)
22109                self.latestSelectedDateObj = self.selectedDates[0];
22110            if (self.config.minTime !== undefined)
22111                self.config.minTime = self.parseDate(self.config.minTime, "H:i");
22112            if (self.config.maxTime !== undefined)
22113                self.config.maxTime = self.parseDate(self.config.maxTime, "H:i");
22114            self.minDateHasTime =
22115                !!self.config.minDate &&
22116                    (self.config.minDate.getHours() > 0 ||
22117                        self.config.minDate.getMinutes() > 0 ||
22118                        self.config.minDate.getSeconds() > 0);
22119            self.maxDateHasTime =
22120                !!self.config.maxDate &&
22121                    (self.config.maxDate.getHours() > 0 ||
22122                        self.config.maxDate.getMinutes() > 0 ||
22123                        self.config.maxDate.getSeconds() > 0);
22124        }
22125        function setupInputs() {
22126            self.input = getInputElem();
22127            /* istanbul ignore next */
22128            if (!self.input) {
22129                self.config.errorHandler(new Error("Invalid input element specified"));
22130                return;
22131            }
22132            // hack: store previous type to restore it after destroy()
22133            self.input._type = self.input.type;
22134            self.input.type = "text";
22135            self.input.classList.add("flatpickr-input");
22136            self._input = self.input;
22137            if (self.config.altInput) {
22138                // replicate self.element
22139                self.altInput = createElement(self.input.nodeName, self.config.altInputClass);
22140                self._input = self.altInput;
22141                self.altInput.placeholder = self.input.placeholder;
22142                self.altInput.disabled = self.input.disabled;
22143                self.altInput.required = self.input.required;
22144                self.altInput.tabIndex = self.input.tabIndex;
22145                self.altInput.type = "text";
22146                self.input.setAttribute("type", "hidden");
22147                if (!self.config.static && self.input.parentNode)
22148                    self.input.parentNode.insertBefore(self.altInput, self.input.nextSibling);
22149            }
22150            if (!self.config.allowInput)
22151                self._input.setAttribute("readonly", "readonly");
22152            
vendor: 3,344 bytes, lines 22152-22225
22152self._positionElement = self.config.positionElement || self._input;
22153        }
22154        function setupMobile() {
22155            var inputType = self.config.enableTime
22156                ? self.config.noCalendar
22157                    ? "time"
22158                    : "datetime-local"
22159                : "date";
22160            self.mobileInput = createElement("input", self.input.className + " flatpickr-mobile");
22161            self.mobileInput.tabIndex = 1;
22162            self.mobileInput.type = inputType;
22163            self.mobileInput.disabled = self.input.disabled;
22164            self.mobileInput.required = self.input.required;
22165            self.mobileInput.placeholder = self.input.placeholder;
22166            self.mobileFormatStr =
22167                inputType === "datetime-local"
22168                    ? "Y-m-d\\TH:i:S"
22169                    : inputType === "date"
22170                        ? "Y-m-d"
22171                        : "H:i:S";
22172            if (self.selectedDates.length > 0) {
22173                self.mobileInput.defaultValue = self.mobileInput.value = self.formatDate(self.selectedDates[0], self.mobileFormatStr);
22174            }
22175            if (self.config.minDate)
22176                self.mobileInput.min = self.formatDate(self.config.minDate, "Y-m-d");
22177            if (self.config.maxDate)
22178                self.mobileInput.max = self.formatDate(self.config.maxDate, "Y-m-d");
22179            if (self.input.getAttribute("step"))
22180                self.mobileInput.step = String(self.input.getAttribute("step"));
22181            self.input.type = "hidden";
22182            if (self.altInput !== undefined)
22183                self.altInput.type = "hidden";
22184            try {
22185                if (self.input.parentNode)
22186                    self.input.parentNode.insertBefore(self.mobileInput, self.input.nextSibling);
22187            }
22188            catch (_a) { }
22189            bind(self.mobileInput, "change", function (e) {
22190                self.setDate(getEventTarget(e).value, false, self.mobileFormatStr);
22191                triggerEvent("onChange");
22192                triggerEvent("onClose");
22193            });
22194        }
22195        function toggle(e) {
22196            if (self.isOpen === true)
22197                return self.close();
22198            self.open(e);
22199        }
22200        function triggerEvent(event, data) {
22201            // If the instance has been destroyed already, all hooks have been removed
22202            if (self.config === undefined)
22203                return;
22204            var hooks = self.config[event];
22205            if (hooks !== undefined && hooks.length > 0) {
22206                for (var i = 0; hooks[i] && i < hooks.length; i++)
22207                    hooks[i](self.selectedDates, self.input.value, self, data);
22208            }
22209            if (event === "onChange") {
22210                self.input.dispatchEvent(createEvent("change"));
22211                // many front-end frameworks bind to the input event
22212                self.input.dispatchEvent(createEvent("input"));
22213            }
22214        }
22215        function createEvent(name) {
22216            var e = document.createEvent("Event");
22217            e.initEvent(name, true, true);
22218            return e;
22219        }
22220        function isDateSelected(date) {
22221            for (var i = 0; i < self.selectedDates.length; i++) {
22222                if (compareDates(self.selectedDates[i], date) === 0)
22223                    return "" + i;
22224            }
22225            return false;
vendor: 10,191 bytes, lines 22226-22477
22226        }
22227        function isDateInRange(date) {
22228            if (self.config.mode !== "range" || self.selectedDates.length < 2)
22229                return false;
22230            return (compareDates(date, self.selectedDates[0]) >= 0 &&
22231                compareDates(date, self.selectedDates[1]) <= 0);
22232        }
22233        function updateNavigationCurrentMonth() {
22234            if (self.config.noCalendar || self.isMobile || !self.monthNav)
22235                return;
22236            self.yearElements.forEach(function (yearElement, i) {
22237                var d = new Date(self.currentYear, self.currentMonth, 1);
22238                d.setMonth(self.currentMonth + i);
22239                if (self.config.showMonths > 1 ||
22240                    self.config.monthSelectorType === "static") {
22241                    self.monthElements[i].textContent =
22242                        monthToStr(d.getMonth(), self.config.shorthandCurrentMonth, self.l10n) + " ";
22243                }
22244                else {
22245                    self.monthsDropdownContainer.value = d.getMonth().toString();
22246                }
22247                yearElement.value = d.getFullYear().toString();
22248            });
22249            self._hidePrevMonthArrow =
22250                self.config.minDate !== undefined &&
22251                    (self.currentYear === self.config.minDate.getFullYear()
22252                        ? self.currentMonth <= self.config.minDate.getMonth()
22253                        : self.currentYear < self.config.minDate.getFullYear());
22254            self._hideNextMonthArrow =
22255                self.config.maxDate !== undefined &&
22256                    (self.currentYear === self.config.maxDate.getFullYear()
22257                        ? self.currentMonth + 1 > self.config.maxDate.getMonth()
22258                        : self.currentYear > self.config.maxDate.getFullYear());
22259        }
22260        function getDateStr(format) {
22261            return self.selectedDates
22262                .map(function (dObj) { return self.formatDate(dObj, format); })
22263                .filter(function (d, i, arr) {
22264                return self.config.mode !== "range" ||
22265                    self.config.enableTime ||
22266                    arr.indexOf(d) === i;
22267            })
22268                .join(self.config.mode !== "range"
22269                ? self.config.conjunction
22270                : self.l10n.rangeSeparator);
22271        }
22272        /**
22273         * Updates the values of inputs associated with the calendar
22274         */
22275        function updateValue(triggerChange) {
22276            if (triggerChange === void 0) { triggerChange = true; }
22277            if (self.mobileInput !== undefined && self.mobileFormatStr) {
22278                self.mobileInput.value =
22279                    self.latestSelectedDateObj !== undefined
22280                        ? self.formatDate(self.latestSelectedDateObj, self.mobileFormatStr)
22281                        : "";
22282            }
22283            self.input.value = getDateStr(self.config.dateFormat);
22284            if (self.altInput !== undefined) {
22285                self.altInput.value = getDateStr(self.config.altFormat);
22286            }
22287            if (triggerChange !== false)
22288                triggerEvent("onValueUpdate");
22289        }
22290        function onMonthNavClick(e) {
22291            var eventTarget = getEventTarget(e);
22292            var isPrevMonth = self.prevMonthNav.contains(eventTarget);
22293            var isNextMonth = self.nextMonthNav.contains(eventTarget);
22294            if (isPrevMonth || isNextMonth) {
22295                changeMonth(isPrevMonth ? -1 : 1);
22296            }
22297            else if (self.yearElements.indexOf(eventTarget) >= 0) {
22298                eventTarget.select();
22299            }
22300            else if (eventTarget.classList.contains("arrowUp")) {
22301                self.changeYear(self.currentYear + 1);
22302            }
22303            else if (eventTarget.classList.contains("arrowDown")) {
22304                self.changeYear(self.currentYear - 1);
22305            }
22306        }
22307        function timeWrapper(e) {
22308            e.preventDefault();
22309            var isKeyDown = e.type === "keydown", eventTarget = getEventTarget(e), input = eventTarget;
22310            if (self.amPM !== undefined && eventTarget === self.amPM) {
22311                self.amPM.textContent =
22312                    self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];
22313            }
22314            var min = parseFloat(input.getAttribute("min")), max = parseFloat(input.getAttribute("max")), step = parseFloat(input.getAttribute("step")), curValue = parseInt(input.value, 10), delta = e.delta ||
22315                (isKeyDown ? (e.which === 38 ? 1 : -1) : 0);
22316            var newValue = curValue + step * delta;
22317            if (typeof input.value !== "undefined" && input.value.length === 2) {
22318                var isHourElem = input === self.hourElement, isMinuteElem = input === self.minuteElement;
22319                if (newValue < min) {
22320                    newValue =
22321                        max +
22322                            newValue +
22323                            int(!isHourElem) +
22324                            (int(isHourElem) && int(!self.amPM));
22325                    if (isMinuteElem)
22326                        incrementNumInput(undefined, -1, self.hourElement);
22327                }
22328                else if (newValue > max) {
22329                    newValue =
22330                        input === self.hourElement ? newValue - max - int(!self.amPM) : min;
22331                    if (isMinuteElem)
22332                        incrementNumInput(undefined, 1, self.hourElement);
22333                }
22334                if (self.amPM &&
22335                    isHourElem &&
22336                    (step === 1
22337                        ? newValue + curValue === 23
22338                        : Math.abs(newValue - curValue) > step)) {
22339                    self.amPM.textContent =
22340                        self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];
22341                }
22342                input.value = pad(newValue);
22343            }
22344        }
22345        init();
22346        return self;
22347    }
22348    /* istanbul ignore next */
22349    function _flatpickr(nodeList, config) {
22350        // static list
22351        var nodes = Array.prototype.slice
22352            .call(nodeList)
22353            .filter(function (x) { return x instanceof HTMLElement; });
22354        var instances = [];
22355        for (var i = 0; i < nodes.length; i++) {
22356            var node = nodes[i];
22357            try {
22358                if (node.getAttribute("data-fp-omit") !== null)
22359                    continue;
22360                if (node._flatpickr !== undefined) {
22361                    node._flatpickr.destroy();
22362                    node._flatpickr = undefined;
22363                }
22364                node._flatpickr = FlatpickrInstance(node, config || {});
22365                instances.push(node._flatpickr);
22366            }
22367            catch (e) {
22368                console.error(e);
22369            }
22370        }
22371        return instances.length === 1 ? instances[0] : instances;
22372    }
22373    /* istanbul ignore next */
22374    if (typeof HTMLElement !== "undefined" &&
22375        typeof HTMLCollection !== "undefined" &&
22376        typeof NodeList !== "undefined") {
22377        // browser env
22378        HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function (config) {
22379            return _flatpickr(this, config);
22380        };
22381        HTMLElement.prototype.flatpickr = function (config) {
22382            return _flatpickr([this], config);
22383        };
22384    }
22385    /* istanbul ignore next */
22386    var flatpickr = function (selector, config) {
22387        if (typeof selector === "string") {
22388            return _flatpickr(window.document.querySelectorAll(selector), config);
22389        }
22390        else if (selector instanceof Node) {
22391            return _flatpickr([selector], config);
22392        }
22393        else {
22394            return _flatpickr(selector, config);
22395        }
22396    };
22397    /* istanbul ignore next */
22398    flatpickr.defaultConfig = {};
22399    flatpickr.l10ns = {
22400        en: __assign({}, english),
22401        default: __assign({}, english),
22402    };
22403    flatpickr.localize = function (l10n) {
22404        flatpickr.l10ns.default = __assign(__assign({}, flatpickr.l10ns.default), l10n);
22405    };
22406    flatpickr.setDefaults = function (config) {
22407        flatpickr.defaultConfig = __assign(__assign({}, flatpickr.defaultConfig), config);
22408    };
22409    flatpickr.parseDate = createDateParser({});
22410    flatpickr.formatDate = createDateFormatter({});
22411    flatpickr.compareDates = compareDates;
22412    /* istanbul ignore next */
22413    if (typeof jQuery !== "undefined" && typeof jQuery.fn !== "undefined") {
22414        jQuery.fn.flatpickr = function (config) {
22415            return _flatpickr(this, config);
22416        };
22417    }
22418    Date.prototype.fp_incr = function (days) {
22419        return new Date(this.getFullYear(), this.getMonth(), this.getDate() + (typeof days === "string" ? parseInt(days, 10) : days));
22420    };
22421    if (typeof window !== "undefined") {
22422        window.flatpickr = flatpickr;
22423    }
22424
22425    return flatpickr;
22426
22427})));
22428
22429"use strict";
22430
22431//
22432// Flatpickr
22433//
22434
22435/*!
22436 * https://github.com/paulmillr/es6-shim
22437 * @license es6-shim Copyright 2013-2016 by Paul Miller (http://paulmillr.com)
22438 *   and contributors,  MIT License
22439 * es6-shim: v0.35.4
22440 * see https://github.com/paulmillr/es6-shim/blob/0.35.3/LICENSE
22441 * Details and documentation:
22442 * https://github.com/paulmillr/es6-shim/
22443 */
22444
22445// UMD (Universal Module Definition)
22446// see https://github.com/umdjs/umd/blob/master/returnExports.js
22447(function (root, factory) {
22448  /*global define */
22449  if (typeof define === 'function' && define.amd) {
22450    // AMD. Register as an anonymous module.
22451    define(factory);
22452  } else if (typeof exports === 'object') {
22453    // Node. Does not work with strict CommonJS, but
22454    // only CommonJS-like environments that support module.exports,
22455    // like Node.
22456    module.exports = factory();
22457  } else {
22458    // Browser globals (root is window)
22459    root.returnExports = factory();
22460  }
22461}(this, function () {
22462  'use strict';
22463
22464  var _apply = Function.call.bind(Function.apply);
22465  var _call = Function.call.bind(Function.call);
22466  var isArray = Array.isArray;
22467  var keys = Object.keys;
22468
22469  var not = function notThunker(func) {
22470    return function notThunk() {
22471      return !_apply(func, this, arguments);
22472    };
22473  };
22474  var throwsError = function (func) {
22475    try {
22476      func();
22477      return false;
vendor: 12,879 bytes, lines 22478-22828
22478    } catch (e) {
22479      return true;
22480    }
22481  };
22482  var valueOrFalseIfThrows = function valueOrFalseIfThrows(func) {
22483    try {
22484      return func();
22485    } catch (e) {
22486      return false;
22487    }
22488  };
22489
22490  var isCallableWithoutNew = not(throwsError);
22491  var arePropertyDescriptorsSupported = function () {
22492    // if Object.defineProperty exists but throws, it's IE 8
22493    return !throwsError(function () {
22494      return Object.defineProperty({}, 'x', { get: function () { } }); // eslint-disable-line getter-return
22495    });
22496  };
22497  var supportsDescriptors = !!Object.defineProperty && arePropertyDescriptorsSupported();
22498  var functionsHaveNames = (function foo() {}).name === 'foo'; // eslint-disable-line no-extra-parens
22499
22500  var _forEach = Function.call.bind(Array.prototype.forEach);
22501  var _reduce = Function.call.bind(Array.prototype.reduce);
22502  var _filter = Function.call.bind(Array.prototype.filter);
22503  var _some = Function.call.bind(Array.prototype.some);
22504
22505  var defineProperty = function (object, name, value, force) {
22506    if (!force && name in object) { return; }
22507    if (supportsDescriptors) {
22508      Object.defineProperty(object, name, {
22509        configurable: true,
22510        enumerable: false,
22511        writable: true,
22512        value: value
22513      });
22514    } else {
22515      object[name] = value;
22516    }
22517  };
22518
22519  // Define configurable, writable and non-enumerable props
22520  // if they don’t exist.
22521  var defineProperties = function (object, map, forceOverride) {
22522    _forEach(keys(map), function (name) {
22523      var method = map[name];
22524      defineProperty(object, name, method, !!forceOverride);
22525    });
22526  };
22527
22528  var _toString = Function.call.bind(Object.prototype.toString);
22529  var isCallable = typeof /abc/ === 'function' ? function IsCallableSlow(x) {
22530    // Some old browsers (IE, FF) say that typeof /abc/ === 'function'
22531    return typeof x === 'function' && _toString(x) === '[object Function]';
22532  } : function IsCallableFast(x) { return typeof x === 'function'; };
22533
22534  var Value = {
22535    getter: function (object, name, getter) {
22536      if (!supportsDescriptors) {
22537        throw new TypeError('getters require true ES5 support');
22538      }
22539      Object.defineProperty(object, name, {
22540        configurable: true,
22541        enumerable: false,
22542        get: getter
22543      });
22544    },
22545    proxy: function (originalObject, key, targetObject) {
22546      if (!supportsDescriptors) {
22547        throw new TypeError('getters require true ES5 support');
22548      }
22549      var originalDescriptor = Object.getOwnPropertyDescriptor(originalObject, key);
22550      Object.defineProperty(targetObject, key, {
22551        configurable: originalDescriptor.configurable,
22552        enumerable: originalDescriptor.enumerable,
22553        get: function getKey() { return originalObject[key]; },
22554        set: function setKey(value) { originalObject[key] = value; }
22555      });
22556    },
22557    redefine: function (object, property, newValue) {
22558      if (supportsDescriptors) {
22559        var descriptor = Object.getOwnPropertyDescriptor(object, property);
22560        descriptor.value = newValue;
22561        Object.defineProperty(object, property, descriptor);
22562      } else {
22563        object[property] = newValue;
22564      }
22565    },
22566    defineByDescriptor: function (object, property, descriptor) {
22567      if (supportsDescriptors) {
22568        Object.defineProperty(object, property, descriptor);
22569      } else if ('value' in descriptor) {
22570        object[property] = descriptor.value;
22571      }
22572    },
22573    preserveToString: function (target, source) {
22574      if (source && isCallable(source.toString)) {
22575        defineProperty(target, 'toString', source.toString.bind(source), true);
22576      }
22577    }
22578  };
22579
22580  // Simple shim for Object.create on ES3 browsers
22581  // (unlike real shim, no attempt to support `prototype === null`)
22582  var create = Object.create || function (prototype, properties) {
22583    var Prototype = function Prototype() {};
22584    Prototype.prototype = prototype;
22585    var object = new Prototype();
22586    if (typeof properties !== 'undefined') {
22587      keys(properties).forEach(function (key) {
22588        Value.defineByDescriptor(object, key, properties[key]);
22589      });
22590    }
22591    return object;
22592  };
22593
22594  var supportsSubclassing = function (C, f) {
22595    if (!Object.setPrototypeOf) { return false; /* skip test on IE < 11 */ }
22596    return valueOrFalseIfThrows(function () {
22597      var Sub = function Subclass(arg) {
22598        var o = new C(arg);
22599        Object.setPrototypeOf(o, Subclass.prototype);
22600        return o;
22601      };
22602      Object.setPrototypeOf(Sub, C);
22603      Sub.prototype = create(C.prototype, {
22604        constructor: { value: Sub }
22605      });
22606      return f(Sub);
22607    });
22608  };
22609
22610  var getGlobal = function () {
22611    /* global self, window */
22612    // the only reliable means to get the global object is
22613    // `Function('return this')()`
22614    // However, this causes CSP violations in Chrome apps.
22615    if (typeof self !== 'undefined') { return self; }
22616    if (typeof window !== 'undefined') { return window; }
22617    if (typeof global !== 'undefined') { return global; }
22618    throw new Error('unable to locate global object');
22619  };
22620
22621  var globals = getGlobal();
22622  var globalIsFinite = globals.isFinite;
22623  var _indexOf = Function.call.bind(String.prototype.indexOf);
22624  var _arrayIndexOfApply = Function.apply.bind(Array.prototype.indexOf);
22625  var _concat = Function.call.bind(Array.prototype.concat);
22626  // var _sort = Function.call.bind(Array.prototype.sort);
22627  var _strSlice = Function.call.bind(String.prototype.slice);
22628  var _push = Function.call.bind(Array.prototype.push);
22629  var _pushApply = Function.apply.bind(Array.prototype.push);
22630  var _join = Function.call.bind(Array.prototype.join);
22631  var _shift = Function.call.bind(Array.prototype.shift);
22632  var _max = Math.max;
22633  var _min = Math.min;
22634  var _floor = Math.floor;
22635  var _abs = Math.abs;
22636  var _exp = Math.exp;
22637  var _log = Math.log;
22638  var _sqrt = Math.sqrt;
22639  var _hasOwnProperty = Function.call.bind(Object.prototype.hasOwnProperty);
22640  var ArrayIterator; // make our implementation private
22641  var noop = function () {};
22642
22643  var OrigMap = globals.Map;
22644  var origMapDelete = OrigMap && OrigMap.prototype['delete'];
22645  var origMapGet = OrigMap && OrigMap.prototype.get;
22646  var origMapHas = OrigMap && OrigMap.prototype.has;
22647  var origMapSet = OrigMap && OrigMap.prototype.set;
22648
22649  var Symbol = globals.Symbol || {};
22650  var symbolSpecies = Symbol.species || '@@species';
22651
22652  var numberIsNaN = Number.isNaN || function isNaN(value) {
22653    // NaN !== NaN, but they are identical.
22654    // NaNs are the only non-reflexive value, i.e., if x !== x,
22655    // then x is NaN.
22656    // isNaN is broken: it converts its argument to number, so
22657    // isNaN('foo') => true
22658    return value !== value;
22659  };
22660  var numberIsFinite = Number.isFinite || function isFinite(value) {
22661    return typeof value === 'number' && globalIsFinite(value);
22662  };
22663  var _sign = isCallable(Math.sign) ? Math.sign : function sign(value) {
22664    var number = Number(value);
22665    if (number === 0) { return number; }
22666    if (numberIsNaN(number)) { return number; }
22667    return number < 0 ? -1 : 1;
22668  };
22669  var _log1p = function log1p(value) {
22670    var x = Number(value);
22671    if (x < -1 || numberIsNaN(x)) { return NaN; }
22672    if (x === 0 || x === Infinity) { return x; }
22673    if (x === -1) { return -Infinity; }
22674
22675    return (1 + x) - 1 === 0 ? x : x * (_log(1 + x) / ((1 + x) - 1));
22676  };
22677
22678  // taken directly from https://github.com/ljharb/is-arguments/blob/master/index.js
22679  // can be replaced with require('is-arguments') if we ever use a build process instead
22680  var isStandardArguments = function isArguments(value) {
22681    return _toString(value) === '[object Arguments]';
22682  };
22683  var isLegacyArguments = function isArguments(value) {
22684    return value !== null &&
22685      typeof value === 'object' &&
22686      typeof value.length === 'number' &&
22687      value.length >= 0 &&
22688      _toString(value) !== '[object Array]' &&
22689      _toString(value.callee) === '[object Function]';
22690  };
22691  var isArguments = isStandardArguments(arguments) ? isStandardArguments : isLegacyArguments;
22692
22693  var Type = {
22694    primitive: function (x) { return x === null || (typeof x !== 'function' && typeof x !== 'object'); },
22695    string: function (x) { return _toString(x) === '[object String]'; },
22696    regex: function (x) { return _toString(x) === '[object RegExp]'; },
22697    symbol: function (x) {
22698      return typeof globals.Symbol === 'function' && typeof x === 'symbol';
22699    }
22700  };
22701
22702  var overrideNative = function overrideNative(object, property, replacement) {
22703    var original = object[property];
22704    defineProperty(object, property, replacement, true);
22705    Value.preserveToString(object[property], original);
22706  };
22707
22708  // eslint-disable-next-line no-restricted-properties
22709  var hasSymbols = typeof Symbol === 'function' && typeof Symbol['for'] === 'function' && Type.symbol(Symbol());
22710
22711  // This is a private name in the es6 spec, equal to '[Symbol.iterator]'
22712  // we're going to use an arbitrary _-prefixed name to make our shims
22713  // work properly with each other, even though we don't have full Iterator
22714  // support.  That is, `Array.from(map.keys())` will work, but we don't
22715  // pretend to export a "real" Iterator interface.
22716  var $iterator$ = Type.symbol(Symbol.iterator) ? Symbol.iterator : '_es6-shim iterator_';
22717  // Firefox ships a partial implementation using the name @@iterator.
22718  // https://bugzilla.mozilla.org/show_bug.cgi?id=907077#c14
22719  // So use that name if we detect it.
22720  if (globals.Set && typeof new globals.Set()['@@iterator'] === 'function') {
22721    $iterator$ = '@@iterator';
22722  }
22723
22724  // Reflect
22725  if (!globals.Reflect) {
22726    defineProperty(globals, 'Reflect', {}, true);
22727  }
22728  var Reflect = globals.Reflect;
22729
22730  var $String = String;
22731
22732  /* global document */
22733  var domAll = (typeof document === 'undefined' || !document) ? null : document.all;
22734  var isNullOrUndefined = domAll == null ? function isNullOrUndefined(x) {
22735    return x == null;
22736  } : function isNullOrUndefinedAndNotDocumentAll(x) {
22737    return x == null && x !== domAll;
22738  };
22739
22740  var ES = {
22741    // http://www.ecma-international.org/ecma-262/6.0/#sec-call
22742    Call: function Call(F, V) {
22743      var args = arguments.length > 2 ? arguments[2] : [];
22744      if (!ES.IsCallable(F)) {
22745        throw new TypeError(F + ' is not a function');
22746      }
22747      return _apply(F, V, args);
22748    },
22749
22750    RequireObjectCoercible: function (x, optMessage) {
22751      if (isNullOrUndefined(x)) {
22752        throw new TypeError(optMessage || 'Cannot call method on ' + x);
22753      }
22754      return x;
22755    },
22756
22757    // This might miss the "(non-standard exotic and does not implement
22758    // [[Call]])" case from
22759    // http://www.ecma-international.org/ecma-262/6.0/#sec-typeof-operator-runtime-semantics-evaluation
22760    // but we can't find any evidence these objects exist in practice.
22761    // If we find some in the future, you could test `Object(x) === x`,
22762    // which is reliable according to
22763    // http://www.ecma-international.org/ecma-262/6.0/#sec-toobject
22764    // but is not well optimized by runtimes and creates an object
22765    // whenever it returns false, and thus is very slow.
22766    TypeIsObject: function (x) {
22767      if (x === void 0 || x === null || x === true || x === false) {
22768        return false;
22769      }
22770      return typeof x === 'function' || typeof x === 'object' || x === domAll;
22771    },
22772
22773    ToObject: function (o, optMessage) {
22774      return Object(ES.RequireObjectCoercible(o, optMessage));
22775    },
22776
22777    IsCallable: isCallable,
22778
22779    IsConstructor: function (x) {
22780      // We can't tell callables from constructors in ES5
22781      return ES.IsCallable(x);
22782    },
22783
22784    ToInt32: function (x) {
22785      return ES.ToNumber(x) >> 0;
22786    },
22787
22788    ToUint32: function (x) {
22789      return ES.ToNumber(x) >>> 0;
22790    },
22791
22792    ToNumber: function (value) {
22793      if (hasSymbols && _toString(value) === '[object Symbol]') {
22794        throw new TypeError('Cannot convert a Symbol value to a number');
22795      }
22796      return +value;
22797    },
22798
22799    ToInteger: function (value) {
22800      var number = ES.ToNumber(value);
22801      if (numberIsNaN(number)) { return 0; }
22802      if (number === 0 || !numberIsFinite(number)) { return number; }
22803      return (number > 0 ? 1 : -1) * _floor(_abs(number));
22804    },
22805
22806    ToLength: function (value) {
22807      var len = ES.ToInteger(value);
22808      if (len <= 0) { return 0; } // includes converting -0 to +0
22809      if (len > Number.MAX_SAFE_INTEGER) { return Number.MAX_SAFE_INTEGER; }
22810      return len;
22811    },
22812
22813    SameValue: function (a, b) {
22814      if (a === b) {
22815        // 0 === -0, but they are not identical.
22816        if (a === 0) { return 1 / a === 1 / b; }
22817        return true;
22818      }
22819      return numberIsNaN(a) && numberIsNaN(b);
22820    },
22821
22822    SameValueZero: function (a, b) {
22823      // same as SameValue except for SameValueZero(+0, -0) == true
22824      return (a === b) || (numberIsNaN(a) && numberIsNaN(b));
22825    },
22826
22827    IsIterable: function (o) {
22828      return ES.TypeIsObject(o) && (typeof o[$iterator$] !== 'undefined' || isArguments(o
vendor: 19,473 bytes, lines 22828-23370
22828));
22829    },
22830
22831    GetIterator: function (o) {
22832      if (isArguments(o)) {
22833        // special case support for `arguments`
22834        return new ArrayIterator(o, 'value');
22835      }
22836      var itFn = ES.GetMethod(o, $iterator$);
22837      if (!ES.IsCallable(itFn)) {
22838        // Better diagnostics if itFn is null or undefined
22839        throw new TypeError('value is not an iterable');
22840      }
22841      var it = ES.Call(itFn, o);
22842      if (!ES.TypeIsObject(it)) {
22843        throw new TypeError('bad iterator');
22844      }
22845      return it;
22846    },
22847
22848    GetMethod: function (o, p) {
22849      var func = ES.ToObject(o)[p];
22850      if (isNullOrUndefined(func)) {
22851        return void 0;
22852      }
22853      if (!ES.IsCallable(func)) {
22854        throw new TypeError('Method not callable: ' + p);
22855      }
22856      return func;
22857    },
22858
22859    IteratorComplete: function (iterResult) {
22860      return !!iterResult.done;
22861    },
22862
22863    IteratorClose: function (iterator, completionIsThrow) {
22864      var returnMethod = ES.GetMethod(iterator, 'return');
22865      if (returnMethod === void 0) {
22866        return;
22867      }
22868      var innerResult, innerException;
22869      try {
22870        innerResult = ES.Call(returnMethod, iterator);
22871      } catch (e) {
22872        innerException = e;
22873      }
22874      if (completionIsThrow) {
22875        return;
22876      }
22877      if (innerException) {
22878        throw innerException;
22879      }
22880      if (!ES.TypeIsObject(innerResult)) {
22881        throw new TypeError("Iterator's return method returned a non-object.");
22882      }
22883    },
22884
22885    IteratorNext: function (it) {
22886      var result = arguments.length > 1 ? it.next(arguments[1]) : it.next();
22887      if (!ES.TypeIsObject(result)) {
22888        throw new TypeError('bad iterator');
22889      }
22890      return result;
22891    },
22892
22893    IteratorStep: function (it) {
22894      var result = ES.IteratorNext(it);
22895      var done = ES.IteratorComplete(result);
22896      return done ? false : result;
22897    },
22898
22899    Construct: function (C, args, newTarget, isES6internal) {
22900      var target = typeof newTarget === 'undefined' ? C : newTarget;
22901
22902      if (!isES6internal && Reflect.construct) {
22903        // Try to use Reflect.construct if available
22904        return Reflect.construct(C, args, target);
22905      }
22906      // OK, we have to fake it.  This will only work if the
22907      // C.[[ConstructorKind]] == "base" -- but that's the only
22908      // kind we can make in ES5 code anyway.
22909
22910      // OrdinaryCreateFromConstructor(target, "%ObjectPrototype%")
22911      var proto = target.prototype;
22912      if (!ES.TypeIsObject(proto)) {
22913        proto = Object.prototype;
22914      }
22915      var obj = create(proto);
22916      // Call the constructor.
22917      var result = ES.Call(C, obj, args);
22918      return ES.TypeIsObject(result) ? result : obj;
22919    },
22920
22921    SpeciesConstructor: function (O, defaultConstructor) {
22922      var C = O.constructor;
22923      if (C === void 0) {
22924        return defaultConstructor;
22925      }
22926      if (!ES.TypeIsObject(C)) {
22927        throw new TypeError('Bad constructor');
22928      }
22929      var S = C[symbolSpecies];
22930      if (isNullOrUndefined(S)) {
22931        return defaultConstructor;
22932      }
22933      if (!ES.IsConstructor(S)) {
22934        throw new TypeError('Bad @@species');
22935      }
22936      return S;
22937    },
22938
22939    CreateHTML: function (string, tag, attribute, value) {
22940      var S = ES.ToString(string);
22941      var p1 = '<' + tag;
22942      if (attribute !== '') {
22943        var V = ES.ToString(value);
22944        var escapedV = V.replace(/"/g, '&quot;');
22945        p1 += ' ' + attribute + '="' + escapedV + '"';
22946      }
22947      var p2 = p1 + '>';
22948      var p3 = p2 + S;
22949      return p3 + '</' + tag + '>';
22950    },
22951
22952    IsRegExp: function IsRegExp(argument) {
22953      if (!ES.TypeIsObject(argument)) {
22954        return false;
22955      }
22956      var isRegExp = argument[Symbol.match];
22957      if (typeof isRegExp !== 'undefined') {
22958        return !!isRegExp;
22959      }
22960      return Type.regex(argument);
22961    },
22962
22963    ToString: function ToString(string) {
22964      if (hasSymbols && _toString(string) === '[object Symbol]') {
22965        throw new TypeError('Cannot convert a Symbol value to a number');
22966      }
22967      return $String(string);
22968    }
22969  };
22970
22971  // Well-known Symbol shims
22972  if (supportsDescriptors && hasSymbols) {
22973    var defineWellKnownSymbol = function defineWellKnownSymbol(name) {
22974      if (Type.symbol(Symbol[name])) {
22975        return Symbol[name];
22976      }
22977      // eslint-disable-next-line no-restricted-properties
22978      var sym = Symbol['for']('Symbol.' + name);
22979      Object.defineProperty(Symbol, name, {
22980        configurable: false,
22981        enumerable: false,
22982        writable: false,
22983        value: sym
22984      });
22985      return sym;
22986    };
22987    if (!Type.symbol(Symbol.search)) {
22988      var symbolSearch = defineWellKnownSymbol('search');
22989      var originalSearch = String.prototype.search;
22990      defineProperty(RegExp.prototype, symbolSearch, function search(string) {
22991        return ES.Call(originalSearch, string, [this]);
22992      });
22993      var searchShim = function search(regexp) {
22994        var O = ES.RequireObjectCoercible(this);
22995        if (!isNullOrUndefined(regexp)) {
22996          var searcher = ES.GetMethod(regexp, symbolSearch);
22997          if (typeof searcher !== 'undefined') {
22998            return ES.Call(searcher, regexp, [O]);
22999          }
23000        }
23001        return ES.Call(originalSearch, O, [ES.ToString(regexp)]);
23002      };
23003      overrideNative(String.prototype, 'search', searchShim);
23004    }
23005    if (!Type.symbol(Symbol.replace)) {
23006      var symbolReplace = defineWellKnownSymbol('replace');
23007      var originalReplace = String.prototype.replace;
23008      defineProperty(RegExp.prototype, symbolReplace, function replace(string, replaceValue) {
23009        return ES.Call(originalReplace, string, [this, replaceValue]);
23010      });
23011      var replaceShim = function replace(searchValue, replaceValue) {
23012        var O = ES.RequireObjectCoercible(this);
23013        if (!isNullOrUndefined(searchValue)) {
23014          var replacer = ES.GetMethod(searchValue, symbolReplace);
23015          if (typeof replacer !== 'undefined') {
23016            return ES.Call(replacer, searchValue, [O, replaceValue]);
23017          }
23018        }
23019        return ES.Call(originalReplace, O, [ES.ToString(searchValue), replaceValue]);
23020      };
23021      overrideNative(String.prototype, 'replace', replaceShim);
23022    }
23023    if (!Type.symbol(Symbol.split)) {
23024      var symbolSplit = defineWellKnownSymbol('split');
23025      var originalSplit = String.prototype.split;
23026      defineProperty(RegExp.prototype, symbolSplit, function split(string, limit) {
23027        return ES.Call(originalSplit, string, [this, limit]);
23028      });
23029      var splitShim = function split(separator, limit) {
23030        var O = ES.RequireObjectCoercible(this);
23031        if (!isNullOrUndefined(separator)) {
23032          var splitter = ES.GetMethod(separator, symbolSplit);
23033          if (typeof splitter !== 'undefined') {
23034            return ES.Call(splitter, separator, [O, limit]);
23035          }
23036        }
23037        return ES.Call(originalSplit, O, [ES.ToString(separator), limit]);
23038      };
23039      overrideNative(String.prototype, 'split', splitShim);
23040    }
23041    var symbolMatchExists = Type.symbol(Symbol.match);
23042    var stringMatchIgnoresSymbolMatch = symbolMatchExists && (function () {
23043      // Firefox 41, through Nightly 45 has Symbol.match, but String#match ignores it.
23044      // Firefox 40 and below have Symbol.match but String#match works fine.
23045      var o = {};
23046      o[Symbol.match] = function () { return 42; };
23047      return 'a'.match(o) !== 42;
23048    }());
23049    if (!symbolMatchExists || stringMatchIgnoresSymbolMatch) {
23050      var symbolMatch = defineWellKnownSymbol('match');
23051
23052      var originalMatch = String.prototype.match;
23053      defineProperty(RegExp.prototype, symbolMatch, function match(string) {
23054        return ES.Call(originalMatch, string, [this]);
23055      });
23056
23057      var matchShim = function match(regexp) {
23058        var O = ES.RequireObjectCoercible(this);
23059        if (!isNullOrUndefined(regexp)) {
23060          var matcher = ES.GetMethod(regexp, symbolMatch);
23061          if (typeof matcher !== 'undefined') {
23062            return ES.Call(matcher, regexp, [O]);
23063          }
23064        }
23065        return ES.Call(originalMatch, O, [ES.ToString(regexp)]);
23066      };
23067      overrideNative(String.prototype, 'match', matchShim);
23068    }
23069  }
23070
23071  var wrapConstructor = function wrapConstructor(original, replacement, keysToSkip) {
23072    Value.preserveToString(replacement, original);
23073    if (Object.setPrototypeOf) {
23074      // sets up proper prototype chain where possible
23075      Object.setPrototypeOf(original, replacement);
23076    }
23077    if (supportsDescriptors) {
23078      _forEach(Object.getOwnPropertyNames(original), function (key) {
23079        if (key in noop || keysToSkip[key]) { return; }
23080        Value.proxy(original, key, replacement);
23081      });
23082    } else {
23083      _forEach(Object.keys(original), function (key) {
23084        if (key in noop || keysToSkip[key]) { return; }
23085        replacement[key] = original[key];
23086      });
23087    }
23088    replacement.prototype = original.prototype;
23089    Value.redefine(original.prototype, 'constructor', replacement);
23090  };
23091
23092  var defaultSpeciesGetter = function () { return this; };
23093  var addDefaultSpecies = function (C) {
23094    if (supportsDescriptors && !_hasOwnProperty(C, symbolSpecies)) {
23095      Value.getter(C, symbolSpecies, defaultSpeciesGetter);
23096    }
23097  };
23098
23099  var addIterator = function (prototype, impl) {
23100    var implementation = impl || function iterator() { return this; };
23101    defineProperty(prototype, $iterator$, implementation);
23102    if (!prototype[$iterator$] && Type.symbol($iterator$)) {
23103      // implementations are buggy when $iterator$ is a Symbol
23104      prototype[$iterator$] = implementation;
23105    }
23106  };
23107
23108  var createDataProperty = function createDataProperty(object, name, value) {
23109    if (supportsDescriptors) {
23110      Object.defineProperty(object, name, {
23111        configurable: true,
23112        enumerable: true,
23113        writable: true,
23114        value: value
23115      });
23116    } else {
23117      object[name] = value;
23118    }
23119  };
23120  var createDataPropertyOrThrow = function createDataPropertyOrThrow(object, name, value) {
23121    createDataProperty(object, name, value);
23122    if (!ES.SameValue(object[name], value)) {
23123      throw new TypeError('property is nonconfigurable');
23124    }
23125  };
23126
23127  var emulateES6construct = function (o, defaultNewTarget, defaultProto, slots) {
23128    // This is an es5 approximation to es6 construct semantics.  in es6,
23129    // 'new Foo' invokes Foo.[[Construct]] which (for almost all objects)
23130    // just sets the internal variable NewTarget (in es6 syntax `new.target`)
23131    // to Foo and then returns Foo().
23132
23133    // Many ES6 object then have constructors of the form:
23134    // 1. If NewTarget is undefined, throw a TypeError exception
23135    // 2. Let xxx by OrdinaryCreateFromConstructor(NewTarget, yyy, zzz)
23136
23137    // So we're going to emulate those first two steps.
23138    if (!ES.TypeIsObject(o)) {
23139      throw new TypeError('Constructor requires `new`: ' + defaultNewTarget.name);
23140    }
23141    var proto = defaultNewTarget.prototype;
23142    if (!ES.TypeIsObject(proto)) {
23143      proto = defaultProto;
23144    }
23145    var obj = create(proto);
23146    for (var name in slots) {
23147      if (_hasOwnProperty(slots, name)) {
23148        var value = slots[name];
23149        defineProperty(obj, name, value, true);
23150      }
23151    }
23152    return obj;
23153  };
23154
23155  // Firefox 31 reports this function's length as 0
23156  // https://bugzilla.mozilla.org/show_bug.cgi?id=1062484
23157  if (String.fromCodePoint && String.fromCodePoint.length !== 1) {
23158    var originalFromCodePoint = String.fromCodePoint;
23159    overrideNative(String, 'fromCodePoint', function fromCodePoint(codePoints) {
23160      return ES.Call(originalFromCodePoint, this, arguments);
23161    });
23162  }
23163
23164  var StringShims = {
23165    fromCodePoint: function fromCodePoint(codePoints) {
23166      var result = [];
23167      var next;
23168      for (var i = 0, length = arguments.length; i < length; i++) {
23169        next = Number(arguments[i]);
23170        if (!ES.SameValue(next, ES.ToInteger(next)) || next < 0 || next > 0x10FFFF) {
23171          throw new RangeError('Invalid code point ' + next);
23172        }
23173
23174        if (next < 0x10000) {
23175          _push(result, String.fromCharCode(next));
23176        } else {
23177          next -= 0x10000;
23178          _push(result, String.fromCharCode((next >> 10) + 0xD800));
23179          _push(result, String.fromCharCode((next % 0x400) + 0xDC00));
23180        }
23181      }
23182      return _join(result, '');
23183    },
23184
23185    raw: function raw(template) {
23186      var numberOfSubstitutions = arguments.length - 1;
23187      var cooked = ES.ToObject(template, 'bad template');
23188      var raw = ES.ToObject(cooked.raw, 'bad raw value');
23189      var len = raw.length;
23190      var literalSegments = ES.ToLength(len);
23191      if (literalSegments <= 0) {
23192        return '';
23193      }
23194
23195      var stringElements = [];
23196      var nextIndex = 0;
23197      var nextKey, next, nextSeg, nextSub;
23198      while (nextIndex < literalSegments) {
23199        nextKey = ES.ToString(nextIndex);
23200        nextSeg = ES.ToString(raw[nextKey]);
23201        _push(stringElements, nextSeg);
23202        if (nextIndex + 1 >= literalSegments) {
23203          break;
23204        }
23205        next = nextIndex + 1 < arguments.length ? arguments[nextIndex + 1] : '';
23206        nextSub = ES.ToString(next);
23207        _push(stringElements, nextSub);
23208        nextIndex += 1;
23209      }
23210      return _join(stringElements, '');
23211    }
23212  };
23213  if (String.raw && String.raw({ raw: { 0: 'x', 1: 'y', length: 2 } }) !== 'xy') {
23214    // IE 11 TP has a broken String.raw implementation
23215    overrideNative(String, 'raw', StringShims.raw);
23216  }
23217  defineProperties(String, StringShims);
23218
23219  // Fast repeat, uses the `Exponentiation by squaring` algorithm.
23220  // Perf: http://jsperf.com/string-repeat2/2
23221  var stringRepeat = function repeat(s, times) {
23222    if (times < 1) { return ''; }
23223    if (times % 2) { return repeat(s, times - 1) + s; }
23224    var half = repeat(s, times / 2);
23225    return half + half;
23226  };
23227  var stringMaxLength = Infinity;
23228
23229  var StringPrototypeShims = {
23230    repeat: function repeat(times) {
23231      var thisStr = ES.ToString(ES.RequireObjectCoercible(this));
23232      var numTimes = ES.ToInteger(times);
23233      if (numTimes < 0 || numTimes >= stringMaxLength) {
23234        throw new RangeError('repeat count must be less than infinity and not overflow maximum string size');
23235      }
23236      return stringRepeat(thisStr, numTimes);
23237    },
23238
23239    startsWith: function startsWith(searchString) {
23240      var S = ES.ToString(ES.RequireObjectCoercible(this));
23241      if (ES.IsRegExp(searchString)) {
23242        throw new TypeError('Cannot call method "startsWith" with a regex');
23243      }
23244      var searchStr = ES.ToString(searchString);
23245      var position;
23246      if (arguments.length > 1) {
23247        position = arguments[1];
23248      }
23249      var start = _max(ES.ToInteger(position), 0);
23250      return _strSlice(S, start, start + searchStr.length) === searchStr;
23251    },
23252
23253    endsWith: function endsWith(searchString) {
23254      var S = ES.ToString(ES.RequireObjectCoercible(this));
23255      if (ES.IsRegExp(searchString)) {
23256        throw new TypeError('Cannot call method "endsWith" with a regex');
23257      }
23258      var searchStr = ES.ToString(searchString);
23259      var len = S.length;
23260      var endPosition;
23261      if (arguments.length > 1) {
23262        endPosition = arguments[1];
23263      }
23264      var pos = typeof endPosition === 'undefined' ? len : ES.ToInteger(endPosition);
23265      var end = _min(_max(pos, 0), len);
23266      return _strSlice(S, end - searchStr.length, end) === searchStr;
23267    },
23268
23269    includes: function includes(searchString) {
23270      if (ES.IsRegExp(searchString)) {
23271        throw new TypeError('"includes" does not accept a RegExp');
23272      }
23273      var searchStr = ES.ToString(searchString);
23274      var position;
23275      if (arguments.length > 1) {
23276        position = arguments[1];
23277      }
23278      // Somehow this trick makes method 100% compat with the spec.
23279      return _indexOf(this, searchStr, position) !== -1;
23280    },
23281
23282    codePointAt: function codePointAt(pos) {
23283      var thisStr = ES.ToString(ES.RequireObjectCoercible(this));
23284      var position = ES.ToInteger(pos);
23285      var length = thisStr.length;
23286      if (position >= 0 && position < length) {
23287        var first = thisStr.charCodeAt(position);
23288        var isEnd = position + 1 === length;
23289        if (first < 0xD800 || first > 0xDBFF || isEnd) { return first; }
23290        var second = thisStr.charCodeAt(position + 1);
23291        if (second < 0xDC00 || second > 0xDFFF) { return first; }
23292        return ((first - 0xD800) * 1024) + (second - 0xDC00) + 0x10000;
23293      }
23294    }
23295  };
23296  if (String.prototype.includes && 'a'.includes('a', Infinity) !== false) {
23297    overrideNative(String.prototype, 'includes', StringPrototypeShims.includes);
23298  }
23299
23300  if (String.prototype.startsWith && String.prototype.endsWith) {
23301    var startsWithRejectsRegex = throwsError(function () {
23302      /* throws if spec-compliant */
23303      return '/a/'.startsWith(/a/);
23304    });
23305    var startsWithHandlesInfinity = valueOrFalseIfThrows(function () {
23306      return 'abc'.startsWith('a', Infinity) === false;
23307    });
23308    if (!startsWithRejectsRegex || !startsWithHandlesInfinity) {
23309      // Firefox (< 37?) and IE 11 TP have a noncompliant startsWith implementation
23310      overrideNative(String.prototype, 'startsWith', StringPrototypeShims.startsWith);
23311      overrideNative(String.prototype, 'endsWith', StringPrototypeShims.endsWith);
23312    }
23313  }
23314  if (hasSymbols) {
23315    var startsWithSupportsSymbolMatch = valueOrFalseIfThrows(function () {
23316      var re = /a/;
23317      re[Symbol.match] = false;
23318      return '/a/'.startsWith(re);
23319    });
23320    if (!startsWithSupportsSymbolMatch) {
23321      overrideNative(String.prototype, 'startsWith', StringPrototypeShims.startsWith);
23322    }
23323    var endsWithSupportsSymbolMatch = valueOrFalseIfThrows(function () {
23324      var re = /a/;
23325      re[Symbol.match] = false;
23326      return '/a/'.endsWith(re);
23327    });
23328    if (!endsWithSupportsSymbolMatch) {
23329      overrideNative(String.prototype, 'endsWith', StringPrototypeShims.endsWith);
23330    }
23331    var includesSupportsSymbolMatch = valueOrFalseIfThrows(function () {
23332      var re = /a/;
23333      re[Symbol.match] = false;
23334      return '/a/'.includes(re);
23335    });
23336    if (!includesSupportsSymbolMatch) {
23337      overrideNative(String.prototype, 'includes', StringPrototypeShims.includes);
23338    }
23339  }
23340
23341  defineProperties(String.prototype, StringPrototypeShims);
23342
23343  // whitespace from: http://es5.github.io/#x15.5.4.20
23344  // implementation from https://github.com/es-shims/es5-shim/blob/v3.4.0/es5-shim.js#L1304-L1324
23345  var ws = [
23346    '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003',
23347    '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028',
23348    '\u2029\uFEFF'
23349  ].join('');
23350  var trimRegexp = new RegExp('(^[' + ws + ']+)|([' + ws + ']+$)', 'g');
23351  var trimShim = function trim() {
23352    return ES.ToString(ES.RequireObjectCoercible(this)).replace(trimRegexp, '');
23353  };
23354  var nonWS = ['\u0085', '\u200b', '\ufffe'].join('');
23355  var nonWSregex = new RegExp('[' + nonWS + ']', 'g');
23356  var isBadHexRegex = /^[-+]0x[0-9a-f]+$/i;
23357  var hasStringTrimBug = nonWS.trim().length !== nonWS.length;
23358  defineProperty(String.prototype, 'trim', trimShim, hasStringTrimBug);
23359
23360  // Given an argument x, it will return an IteratorResult object,
23361  // with value set to x and done to false.
23362  // Given no arguments, it will return an iterator completion object.
23363  var iteratorResult = function (x) {
23364    return { value: x, done: arguments.length === 0 };
23365  };
23366
23367  // see http://www.ecma-international.org/ecma-262/6.0/#sec-string.prototype-@@iterator
23368  var StringIterator = function (s) {
23369    ES.RequireObjectCoercible(s);
23370    
vendor: 14,627 bytes, lines 23370-23804
23370this._s = ES.ToString(s);
23371    this._i = 0;
23372  };
23373  StringIterator.prototype.next = function () {
23374    var s = this._s;
23375    var i = this._i;
23376    if (typeof s === 'undefined' || i >= s.length) {
23377      this._s = void 0;
23378      return iteratorResult();
23379    }
23380    var first = s.charCodeAt(i);
23381    var second, len;
23382    if (first < 0xD800 || first > 0xDBFF || (i + 1) === s.length) {
23383      len = 1;
23384    } else {
23385      second = s.charCodeAt(i + 1);
23386      len = (second < 0xDC00 || second > 0xDFFF) ? 1 : 2;
23387    }
23388    this._i = i + len;
23389    return iteratorResult(s.substr(i, len));
23390  };
23391  addIterator(StringIterator.prototype);
23392  addIterator(String.prototype, function () {
23393    return new StringIterator(this);
23394  });
23395
23396  var ArrayShims = {
23397    from: function from(items) {
23398      var C = this;
23399      var mapFn;
23400      if (arguments.length > 1) {
23401        mapFn = arguments[1];
23402      }
23403      var mapping, T;
23404      if (typeof mapFn === 'undefined') {
23405        mapping = false;
23406      } else {
23407        if (!ES.IsCallable(mapFn)) {
23408          throw new TypeError('Array.from: when provided, the second argument must be a function');
23409        }
23410        if (arguments.length > 2) {
23411          T = arguments[2];
23412        }
23413        mapping = true;
23414      }
23415
23416      // Note that that Arrays will use ArrayIterator:
23417      // https://bugs.ecmascript.org/show_bug.cgi?id=2416
23418      var usingIterator = typeof (isArguments(items) || ES.GetMethod(items, $iterator$)) !== 'undefined';
23419
23420      var length, result, i;
23421      if (usingIterator) {
23422        result = ES.IsConstructor(C) ? Object(new C()) : [];
23423        var iterator = ES.GetIterator(items);
23424        var next, nextValue;
23425
23426        i = 0;
23427        while (true) {
23428          next = ES.IteratorStep(iterator);
23429          if (next === false) {
23430            break;
23431          }
23432          nextValue = next.value;
23433          try {
23434            if (mapping) {
23435              nextValue = typeof T === 'undefined' ? mapFn(nextValue, i) : _call(mapFn, T, nextValue, i);
23436            }
23437            result[i] = nextValue;
23438          } catch (e) {
23439            ES.IteratorClose(iterator, true);
23440            throw e;
23441          }
23442          i += 1;
23443        }
23444        length = i;
23445      } else {
23446        var arrayLike = ES.ToObject(items);
23447        length = ES.ToLength(arrayLike.length);
23448        result = ES.IsConstructor(C) ? Object(new C(length)) : new Array(length);
23449        var value;
23450        for (i = 0; i < length; ++i) {
23451          value = arrayLike[i];
23452          if (mapping) {
23453            value = typeof T === 'undefined' ? mapFn(value, i) : _call(mapFn, T, value, i);
23454          }
23455          createDataPropertyOrThrow(result, i, value);
23456        }
23457      }
23458
23459      result.length = length;
23460      return result;
23461    },
23462
23463    of: function of() {
23464      var len = arguments.length;
23465      var C = this;
23466      var A = isArray(C) || !ES.IsCallable(C) ? new Array(len) : ES.Construct(C, [len]);
23467      for (var k = 0; k < len; ++k) {
23468        createDataPropertyOrThrow(A, k, arguments[k]);
23469      }
23470      A.length = len;
23471      return A;
23472    }
23473  };
23474  defineProperties(Array, ArrayShims);
23475  addDefaultSpecies(Array);
23476
23477  // Our ArrayIterator is private; see
23478  // https://github.com/paulmillr/es6-shim/issues/252
23479  ArrayIterator = function (array, kind) {
23480    this.i = 0;
23481    this.array = array;
23482    this.kind = kind;
23483  };
23484
23485  defineProperties(ArrayIterator.prototype, {
23486    next: function () {
23487      var i = this.i;
23488      var array = this.array;
23489      if (!(this instanceof ArrayIterator)) {
23490        throw new TypeError('Not an ArrayIterator');
23491      }
23492      if (typeof array !== 'undefined') {
23493        var len = ES.ToLength(array.length);
23494        if (i < len) {
23495        //for (; i < len; i++) {
23496          var kind = this.kind;
23497          var retval;
23498          if (kind === 'key') {
23499            retval = i;
23500          } else if (kind === 'value') {
23501            retval = array[i];
23502          } else if (kind === 'entry') {
23503            retval = [i, array[i]];
23504          }
23505          this.i = i + 1;
23506          return iteratorResult(retval);
23507        }
23508      }
23509      this.array = void 0;
23510      return iteratorResult();
23511    }
23512  });
23513  addIterator(ArrayIterator.prototype);
23514
23515  /*
23516  var orderKeys = function orderKeys(a, b) {
23517    var aNumeric = String(ES.ToInteger(a)) === a;
23518    var bNumeric = String(ES.ToInteger(b)) === b;
23519    if (aNumeric && bNumeric) {
23520      return b - a;
23521    } else if (aNumeric && !bNumeric) {
23522      return -1;
23523    } else if (!aNumeric && bNumeric) {
23524      return 1;
23525    } else {
23526      return a.localeCompare(b);
23527    }
23528  };
23529
23530  var getAllKeys = function getAllKeys(object) {
23531    var ownKeys = [];
23532    var keys = [];
23533
23534    for (var key in object) {
23535      _push(_hasOwnProperty(object, key) ? ownKeys : keys, key);
23536    }
23537    _sort(ownKeys, orderKeys);
23538    _sort(keys, orderKeys);
23539
23540    return _concat(ownKeys, keys);
23541  };
23542  */
23543
23544  // note: this is positioned here because it depends on ArrayIterator
23545  var arrayOfSupportsSubclassing = Array.of === ArrayShims.of || (function () {
23546    // Detects a bug in Webkit nightly r181886
23547    var Foo = function Foo(len) { this.length = len; };
23548    Foo.prototype = [];
23549    var fooArr = Array.of.apply(Foo, [1, 2]);
23550    return fooArr instanceof Foo && fooArr.length === 2;
23551  }());
23552  if (!arrayOfSupportsSubclassing) {
23553    overrideNative(Array, 'of', ArrayShims.of);
23554  }
23555
23556  var ArrayPrototypeShims = {
23557    copyWithin: function copyWithin(target, start) {
23558      var o = ES.ToObject(this);
23559      var len = ES.ToLength(o.length);
23560      var relativeTarget = ES.ToInteger(target);
23561      var relativeStart = ES.ToInteger(start);
23562      var to = relativeTarget < 0 ? _max(len + relativeTarget, 0) : _min(relativeTarget, len);
23563      var from = relativeStart < 0 ? _max(len + relativeStart, 0) : _min(relativeStart, len);
23564      var end;
23565      if (arguments.length > 2) {
23566        end = arguments[2];
23567      }
23568      var relativeEnd = typeof end === 'undefined' ? len : ES.ToInteger(end);
23569      var finalItem = relativeEnd < 0 ? _max(len + relativeEnd, 0) : _min(relativeEnd, len);
23570      var count = _min(finalItem - from, len - to);
23571      var direction = 1;
23572      if (from < to && to < (from + count)) {
23573        direction = -1;
23574        from += count - 1;
23575        to += count - 1;
23576      }
23577      while (count > 0) {
23578        if (from in o) {
23579          o[to] = o[from];
23580        } else {
23581          delete o[to];
23582        }
23583        from += direction;
23584        to += direction;
23585        count -= 1;
23586      }
23587      return o;
23588    },
23589
23590    fill: function fill(value) {
23591      var start;
23592      if (arguments.length > 1) {
23593        start = arguments[1];
23594      }
23595      var end;
23596      if (arguments.length > 2) {
23597        end = arguments[2];
23598      }
23599      var O = ES.ToObject(this);
23600      var len = ES.ToLength(O.length);
23601      start = ES.ToInteger(typeof start === 'undefined' ? 0 : start);
23602      end = ES.ToInteger(typeof end === 'undefined' ? len : end);
23603
23604      var relativeStart = start < 0 ? _max(len + start, 0) : _min(start, len);
23605      var relativeEnd = end < 0 ? len + end : end;
23606
23607      for (var i = relativeStart; i < len && i < relativeEnd; ++i) {
23608        O[i] = value;
23609      }
23610      return O;
23611    },
23612
23613    find: function find(predicate) {
23614      var list = ES.ToObject(this);
23615      var length = ES.ToLength(list.length);
23616      if (!ES.IsCallable(predicate)) {
23617        throw new TypeError('Array#find: predicate must be a function');
23618      }
23619      var thisArg = arguments.length > 1 ? arguments[1] : null;
23620      for (var i = 0, value; i < length; i++) {
23621        value = list[i];
23622        if (thisArg) {
23623          if (_call(predicate, thisArg, value, i, list)) {
23624            return value;
23625          }
23626        } else if (predicate(value, i, list)) {
23627          return value;
23628        }
23629      }
23630    },
23631
23632    findIndex: function findIndex(predicate) {
23633      var list = ES.ToObject(this);
23634      var length = ES.ToLength(list.length);
23635      if (!ES.IsCallable(predicate)) {
23636        throw new TypeError('Array#findIndex: predicate must be a function');
23637      }
23638      var thisArg = arguments.length > 1 ? arguments[1] : null;
23639      for (var i = 0; i < length; i++) {
23640        if (thisArg) {
23641          if (_call(predicate, thisArg, list[i], i, list)) {
23642            return i;
23643          }
23644        } else if (predicate(list[i], i, list)) {
23645          return i;
23646        }
23647      }
23648      return -1;
23649    },
23650
23651    keys: function keys() {
23652      return new ArrayIterator(this, 'key');
23653    },
23654
23655    values: function values() {
23656      return new ArrayIterator(this, 'value');
23657    },
23658
23659    entries: function entries() {
23660      return new ArrayIterator(this, 'entry');
23661    }
23662  };
23663  // Safari 7.1 defines Array#keys and Array#entries natively,
23664  // but the resulting ArrayIterator objects don't have a "next" method.
23665  if (Array.prototype.keys && !ES.IsCallable([1].keys().next)) {
23666    delete Array.prototype.keys;
23667  }
23668  if (Array.prototype.entries && !ES.IsCallable([1].entries().next)) {
23669    delete Array.prototype.entries;
23670  }
23671
23672  // Chrome 38 defines Array#keys and Array#entries, and Array#@@iterator, but not Array#values
23673  if (Array.prototype.keys && Array.prototype.entries && !Array.prototype.values && Array.prototype[$iterator$]) {
23674    defineProperties(Array.prototype, {
23675      values: Array.prototype[$iterator$]
23676    });
23677    if (Type.symbol(Symbol.unscopables)) {
23678      Array.prototype[Symbol.unscopables].values = true;
23679    }
23680  }
23681  // Chrome 40 defines Array#values with the incorrect name, although Array#{keys,entries} have the correct name
23682  if (functionsHaveNames && Array.prototype.values && Array.prototype.values.name !== 'values') {
23683    var originalArrayPrototypeValues = Array.prototype.values;
23684    overrideNative(Array.prototype, 'values', function values() { return ES.Call(originalArrayPrototypeValues, this, arguments); });
23685    defineProperty(Array.prototype, $iterator$, Array.prototype.values, true);
23686  }
23687  defineProperties(Array.prototype, ArrayPrototypeShims);
23688
23689  if (1 / [true].indexOf(true, -0) < 0) {
23690    // indexOf when given a position arg of -0 should return +0.
23691    // https://github.com/tc39/ecma262/pull/316
23692    defineProperty(Array.prototype, 'indexOf', function indexOf(searchElement) {
23693      var value = _arrayIndexOfApply(this, arguments);
23694      if (value === 0 && (1 / value) < 0) {
23695        return 0;
23696      }
23697      return value;
23698    }, true);
23699  }
23700
23701  addIterator(Array.prototype, function () { return this.values(); });
23702  // Chrome defines keys/values/entries on Array, but doesn't give us
23703  // any way to identify its iterator.  So add our own shimmed field.
23704  if (Object.getPrototypeOf) {
23705    addIterator(Object.getPrototypeOf([].values()));
23706  }
23707
23708  // note: this is positioned here because it relies on Array#entries
23709  var arrayFromSwallowsNegativeLengths = (function () {
23710    // Detects a Firefox bug in v32
23711    // https://bugzilla.mozilla.org/show_bug.cgi?id=1063993
23712    return valueOrFalseIfThrows(function () {
23713      return Array.from({ length: -1 }).length === 0;
23714    });
23715  }());
23716  var arrayFromHandlesIterables = (function () {
23717    // Detects a bug in Webkit nightly r181886
23718    var arr = Array.from([0].entries());
23719    return arr.length === 1 && isArray(arr[0]) && arr[0][0] === 0 && arr[0][1] === 0;
23720  }());
23721  if (!arrayFromSwallowsNegativeLengths || !arrayFromHandlesIterables) {
23722    overrideNative(Array, 'from', ArrayShims.from);
23723  }
23724  var arrayFromHandlesUndefinedMapFunction = (function () {
23725    // Microsoft Edge v0.11 throws if the mapFn argument is *provided* but undefined,
23726    // but the spec doesn't care if it's provided or not - undefined doesn't throw.
23727    return valueOrFalseIfThrows(function () {
23728      return Array.from([0], void 0);
23729    });
23730  }());
23731  if (!arrayFromHandlesUndefinedMapFunction) {
23732    var origArrayFrom = Array.from;
23733    overrideNative(Array, 'from', function from(items) {
23734      if (arguments.length > 1 && typeof arguments[1] !== 'undefined') {
23735        return ES.Call(origArrayFrom, this, arguments);
23736      } else {
23737        return _call(origArrayFrom, this, items);
23738      }
23739    });
23740  }
23741
23742  var int32sAsOne = -(Math.pow(2, 32) - 1);
23743  var toLengthsCorrectly = function (method, reversed) {
23744    var obj = { length: int32sAsOne };
23745    obj[reversed ? (obj.length >>> 0) - 1 : 0] = true;
23746    return valueOrFalseIfThrows(function () {
23747      _call(method, obj, function () {
23748        // note: in nonconforming browsers, this will be called
23749        // -1 >>> 0 times, which is 4294967295, so the throw matters.
23750        throw new RangeError('should not reach here');
23751      }, []);
23752      return true;
23753    });
23754  };
23755  if (!toLengthsCorrectly(Array.prototype.forEach)) {
23756    var originalForEach = Array.prototype.forEach;
23757    overrideNative(Array.prototype, 'forEach', function forEach(callbackFn) {
23758      return ES.Call(originalForEach, this.length >= 0 ? this : [], arguments);
23759    });
23760  }
23761  if (!toLengthsCorrectly(Array.prototype.map)) {
23762    var originalMap = Array.prototype.map;
23763    overrideNative(Array.prototype, 'map', function map(callbackFn) {
23764      return ES.Call(originalMap, this.length >= 0 ? this : [], arguments);
23765    });
23766  }
23767  if (!toLengthsCorrectly(Array.prototype.filter)) {
23768    var originalFilter = Array.prototype.filter;
23769    overrideNative(Array.prototype, 'filter', function filter(callbackFn) {
23770      return ES.Call(originalFilter, this.length >= 0 ? this : [], arguments);
23771    });
23772  }
23773  if (!toLengthsCorrectly(Array.prototype.some)) {
23774    var originalSome = Array.prototype.some;
23775    overrideNative(Array.prototype, 'some', function some(callbackFn) {
23776      return ES.Call(originalSome, this.length >= 0 ? this : [], arguments);
23777    });
23778  }
23779  if (!toLengthsCorrectly(Array.prototype.every)) {
23780    var originalEvery = Array.prototype.every;
23781    overrideNative(Array.prototype, 'every', function every(callbackFn) {
23782      return ES.Call(originalEvery, this.length >= 0 ? this : [], arguments);
23783    });
23784  }
23785  if (!toLengthsCorrectly(Array.prototype.reduce)) {
23786    var originalReduce = Array.prototype.reduce;
23787    overrideNative(Array.prototype, 'reduce', function reduce(callbackFn) {
23788      return ES.Call(originalReduce, this.length >= 0 ? this : [], arguments);
23789    });
23790  }
23791  if (!toLengthsCorrectly(Array.prototype.reduceRight, true)) {
23792    var originalReduceRight = Array.prototype.reduceRight;
23793    overrideNative(Array.prototype, 'reduceRight', function reduceRight(callbackFn) {
23794      return ES.Call(originalReduceRight, this.length >= 0 ? this : [], arguments);
23795    });
23796  }
23797
23798  var lacksOctalSupport = Number('0o10') !== 8;
23799  var lacksBinarySupport = Number('0b10') !== 2;
23800  var trimsNonWhitespace = _some(nonWS, function (c) {
23801    return Number(c + 0 + c) === 0;
23802  });
23803  if (lacksOctalSupport || lacksBinarySupport || trimsNonWhitespace) {
23804    var OrigNumber = Number;
vendor: 8,715 bytes, lines 23805-24034
23805    var binaryRegex = /^0b[01]+$/i;
23806    var octalRegex = /^0o[0-7]+$/i;
23807    // Note that in IE 8, RegExp.prototype.test doesn't seem to exist: ie, "test" is an own property of regexes. wtf.
23808    var isBinary = binaryRegex.test.bind(binaryRegex);
23809    var isOctal = octalRegex.test.bind(octalRegex);
23810    var toPrimitive = function (O, hint) { // need to replace this with `es-to-primitive/es6`
23811      var result;
23812      if (typeof O.valueOf === 'function') {
23813        result = O.valueOf();
23814        if (Type.primitive(result)) {
23815          return result;
23816        }
23817      }
23818      if (typeof O.toString === 'function') {
23819        result = O.toString();
23820        if (Type.primitive(result)) {
23821          return result;
23822        }
23823      }
23824      throw new TypeError('No default value');
23825    };
23826    var hasNonWS = nonWSregex.test.bind(nonWSregex);
23827    var isBadHex = isBadHexRegex.test.bind(isBadHexRegex);
23828    var NumberShim = (function () {
23829      // this is wrapped in an IIFE because of IE 6-8's wacky scoping issues with named function expressions.
23830      var NumberShim = function Number(value) {
23831        var primValue;
23832        if (arguments.length > 0) {
23833          primValue = Type.primitive(value) ? value : toPrimitive(value, 'number');
23834        } else {
23835          primValue = 0;
23836        }
23837        if (typeof primValue === 'string') {
23838          primValue = ES.Call(trimShim, primValue);
23839          if (isBinary(primValue)) {
23840            primValue = parseInt(_strSlice(primValue, 2), 2);
23841          } else if (isOctal(primValue)) {
23842            primValue = parseInt(_strSlice(primValue, 2), 8);
23843          } else if (hasNonWS(primValue) || isBadHex(primValue)) {
23844            primValue = NaN;
23845          }
23846        }
23847        var receiver = this;
23848        var valueOfSucceeds = valueOrFalseIfThrows(function () {
23849          OrigNumber.prototype.valueOf.call(receiver);
23850          return true;
23851        });
23852        if (receiver instanceof NumberShim && !valueOfSucceeds) {
23853          return new OrigNumber(primValue);
23854        }
23855        return OrigNumber(primValue);
23856      };
23857      return NumberShim;
23858    }());
23859    wrapConstructor(OrigNumber, NumberShim, {});
23860    // this is necessary for ES3 browsers, where these properties are non-enumerable.
23861    defineProperties(NumberShim, {
23862      NaN: OrigNumber.NaN,
23863      MAX_VALUE: OrigNumber.MAX_VALUE,
23864      MIN_VALUE: OrigNumber.MIN_VALUE,
23865      NEGATIVE_INFINITY: OrigNumber.NEGATIVE_INFINITY,
23866      POSITIVE_INFINITY: OrigNumber.POSITIVE_INFINITY
23867    });
23868    /* eslint-disable no-undef, no-global-assign */
23869    Number = NumberShim;
23870    Value.redefine(globals, 'Number', NumberShim);
23871    /* eslint-enable no-undef, no-global-assign */
23872  }
23873
23874  var maxSafeInteger = Math.pow(2, 53) - 1;
23875  defineProperties(Number, {
23876    MAX_SAFE_INTEGER: maxSafeInteger,
23877    MIN_SAFE_INTEGER: -maxSafeInteger,
23878    EPSILON: 2.220446049250313e-16,
23879
23880    parseInt: globals.parseInt,
23881    parseFloat: globals.parseFloat,
23882
23883    isFinite: numberIsFinite,
23884
23885    isInteger: function isInteger(value) {
23886      return numberIsFinite(value) && ES.ToInteger(value) === value;
23887    },
23888
23889    isSafeInteger: function isSafeInteger(value) {
23890      return Number.isInteger(value) && _abs(value) <= Number.MAX_SAFE_INTEGER;
23891    },
23892
23893    isNaN: numberIsNaN
23894  });
23895  // Firefox 37 has a conforming Number.parseInt, but it's not === to the global parseInt (fixed in v40)
23896  defineProperty(Number, 'parseInt', globals.parseInt, Number.parseInt !== globals.parseInt);
23897
23898  // Work around bugs in Array#find and Array#findIndex -- early
23899  // implementations skipped holes in sparse arrays. (Note that the
23900  // implementations of find/findIndex indirectly use shimmed
23901  // methods of Number, so this test has to happen down here.)
23902  /* eslint-disable no-sparse-arrays */
23903  if ([, 1].find(function () { return true; }) === 1) {
23904    overrideNative(Array.prototype, 'find', ArrayPrototypeShims.find);
23905  }
23906  if ([, 1].findIndex(function () { return true; }) !== 0) {
23907    overrideNative(Array.prototype, 'findIndex', ArrayPrototypeShims.findIndex);
23908  }
23909  /* eslint-enable no-sparse-arrays */
23910
23911  var isEnumerableOn = Function.bind.call(Function.bind, Object.prototype.propertyIsEnumerable);
23912  var ensureEnumerable = function ensureEnumerable(obj, prop) {
23913    if (supportsDescriptors && isEnumerableOn(obj, prop)) {
23914      Object.defineProperty(obj, prop, { enumerable: false });
23915    }
23916  };
23917  var sliceArgs = function sliceArgs() {
23918    // per https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
23919    // and https://gist.github.com/WebReflection/4327762cb87a8c634a29
23920    var initial = Number(this);
23921    var len = arguments.length;
23922    var desiredArgCount = len - initial;
23923    var args = new Array(desiredArgCount < 0 ? 0 : desiredArgCount);
23924    for (var i = initial; i < len; ++i) {
23925      args[i - initial] = arguments[i];
23926    }
23927    return args;
23928  };
23929  var assignTo = function assignTo(source) {
23930    return function assignToSource(target, key) {
23931      target[key] = source[key];
23932      return target;
23933    };
23934  };
23935  var assignReducer = function (target, source) {
23936    var sourceKeys = keys(Object(source));
23937    var symbols;
23938    if (ES.IsCallable(Object.getOwnPropertySymbols)) {
23939      symbols = _filter(Object.getOwnPropertySymbols(Object(source)), isEnumerableOn(source));
23940    }
23941    return _reduce(_concat(sourceKeys, symbols || []), assignTo(source), target);
23942  };
23943
23944  var ObjectShims = {
23945    // 19.1.3.1
23946    assign: function (target, source) {
23947      var to = ES.ToObject(target, 'Cannot convert undefined or null to object');
23948      return _reduce(ES.Call(sliceArgs, 1, arguments), assignReducer, to);
23949    },
23950
23951    // Added in WebKit in https://bugs.webkit.org/show_bug.cgi?id=143865
23952    is: function is(a, b) {
23953      return ES.SameValue(a, b);
23954    }
23955  };
23956  var assignHasPendingExceptions = Object.assign && Object.preventExtensions && (function () {
23957    // Firefox 37 still has "pending exception" logic in its Object.assign implementation,
23958    // which is 72% slower than our shim, and Firefox 40's native implementation.
23959    var thrower = Object.preventExtensions({ 1: 2 });
23960    try {
23961      Object.assign(thrower, 'xy');
23962    } catch (e) {
23963      return thrower[1] === 'y';
23964    }
23965  }());
23966  if (assignHasPendingExceptions) {
23967    overrideNative(Object, 'assign', ObjectShims.assign);
23968  }
23969  defineProperties(Object, ObjectShims);
23970
23971  if (supportsDescriptors) {
23972    var ES5ObjectShims = {
23973      // 19.1.3.9
23974      // shim from https://gist.github.com/WebReflection/5593554
23975      setPrototypeOf: (function (Object, magic) {
23976        var set;
23977
23978        var checkArgs = function (O, proto) {
23979          if (!ES.TypeIsObject(O)) {
23980            throw new TypeError('cannot set prototype on a non-object');
23981          }
23982          if (!(proto === null || ES.TypeIsObject(proto))) {
23983            throw new TypeError('can only set prototype to an object or null' + proto);
23984          }
23985        };
23986
23987        var setPrototypeOf = function (O, proto) {
23988          checkArgs(O, proto);
23989          _call(set, O, proto);
23990          return O;
23991        };
23992
23993        try {
23994          // this works already in Firefox and Safari
23995          set = Object.getOwnPropertyDescriptor(Object.prototype, magic).set;
23996          _call(set, {}, null);
23997        } catch (e) {
23998          if (Object.prototype !== {}[magic]) {
23999            // IE < 11 cannot be shimmed
24000            return;
24001          }
24002          // probably Chrome or some old Mobile stock browser
24003          set = function (proto) {
24004            this[magic] = proto;
24005          };
24006          // please note that this will **not** work
24007          // in those browsers that do not inherit
24008          // __proto__ by mistake from Object.prototype
24009          // in these cases we should probably throw an error
24010          // or at least be informed about the issue
24011          setPrototypeOf.polyfill = setPrototypeOf(
24012            setPrototypeOf({}, null),
24013            Object.prototype
24014          ) instanceof Object;
24015          // setPrototypeOf.polyfill === true means it works as meant
24016          // setPrototypeOf.polyfill === false means it's not 100% reliable
24017          // setPrototypeOf.polyfill === undefined
24018          // or
24019          // setPrototypeOf.polyfill ==  null means it's not a polyfill
24020          // which means it works as expected
24021          // we can even delete Object.prototype.__proto__;
24022        }
24023        return setPrototypeOf;
24024      }(Object, '__proto__'))
24025    };
24026
24027    defineProperties(Object, ES5ObjectShims);
24028  }
24029
24030  // Workaround bug in Opera 12 where setPrototypeOf(x, null) doesn't work,
24031  // but Object.create(null) does.
24032  if (Object.setPrototypeOf && Object.getPrototypeOf &&
24033      Object.getPrototypeOf(Object.setPrototypeOf({}, null)) !== null &&
24034      Object.getPrototypeOf(Object.create(null)) === null
vendor: 7,747 bytes, lines 24034-24234
24034) {
24035    (function () {
24036      var FAKENULL = Object.create(null);
24037      var gpo = Object.getPrototypeOf;
24038      var spo = Object.setPrototypeOf;
24039      Object.getPrototypeOf = function (o) {
24040        var result = gpo(o);
24041        return result === FAKENULL ? null : result;
24042      };
24043      Object.setPrototypeOf = function (o, p) {
24044        var proto = p === null ? FAKENULL : p;
24045        return spo(o, proto);
24046      };
24047      Object.setPrototypeOf.polyfill = false;
24048    }());
24049  }
24050
24051  var objectKeysAcceptsPrimitives = !throwsError(function () { return Object.keys('foo'); });
24052  if (!objectKeysAcceptsPrimitives) {
24053    var originalObjectKeys = Object.keys;
24054    overrideNative(Object, 'keys', function keys(value) {
24055      return originalObjectKeys(ES.ToObject(value));
24056    });
24057    keys = Object.keys;
24058  }
24059  var objectKeysRejectsRegex = throwsError(function () { return Object.keys(/a/g); });
24060  if (objectKeysRejectsRegex) {
24061    var regexRejectingObjectKeys = Object.keys;
24062    overrideNative(Object, 'keys', function keys(value) {
24063      if (Type.regex(value)) {
24064        var regexKeys = [];
24065        for (var k in value) {
24066          if (_hasOwnProperty(value, k)) {
24067            _push(regexKeys, k);
24068          }
24069        }
24070        return regexKeys;
24071      }
24072      return regexRejectingObjectKeys(value);
24073    });
24074    keys = Object.keys;
24075  }
24076
24077  if (Object.getOwnPropertyNames) {
24078    var objectGOPNAcceptsPrimitives = !throwsError(function () { return Object.getOwnPropertyNames('foo'); });
24079    if (!objectGOPNAcceptsPrimitives) {
24080      var cachedWindowNames = typeof window === 'object' ? Object.getOwnPropertyNames(window) : [];
24081      var originalObjectGetOwnPropertyNames = Object.getOwnPropertyNames;
24082      overrideNative(Object, 'getOwnPropertyNames', function getOwnPropertyNames(value) {
24083        var val = ES.ToObject(value);
24084        if (_toString(val) === '[object Window]') {
24085          try {
24086            return originalObjectGetOwnPropertyNames(val);
24087          } catch (e) {
24088            // IE bug where layout engine calls userland gOPN for cross-domain `window` objects
24089            return _concat([], cachedWindowNames);
24090          }
24091        }
24092        return originalObjectGetOwnPropertyNames(val);
24093      });
24094    }
24095  }
24096  if (Object.getOwnPropertyDescriptor) {
24097    var objectGOPDAcceptsPrimitives = !throwsError(function () { return Object.getOwnPropertyDescriptor('foo', 'bar'); });
24098    if (!objectGOPDAcceptsPrimitives) {
24099      var originalObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
24100      overrideNative(Object, 'getOwnPropertyDescriptor', function getOwnPropertyDescriptor(value, property) {
24101        return originalObjectGetOwnPropertyDescriptor(ES.ToObject(value), property);
24102      });
24103    }
24104  }
24105  if (Object.seal) {
24106    var objectSealAcceptsPrimitives = !throwsError(function () { return Object.seal('foo'); });
24107    if (!objectSealAcceptsPrimitives) {
24108      var originalObjectSeal = Object.seal;
24109      overrideNative(Object, 'seal', function seal(value) {
24110        if (!ES.TypeIsObject(value)) { return value; }
24111        return originalObjectSeal(value);
24112      });
24113    }
24114  }
24115  if (Object.isSealed) {
24116    var objectIsSealedAcceptsPrimitives = !throwsError(function () { return Object.isSealed('foo'); });
24117    if (!objectIsSealedAcceptsPrimitives) {
24118      var originalObjectIsSealed = Object.isSealed;
24119      overrideNative(Object, 'isSealed', function isSealed(value) {
24120        if (!ES.TypeIsObject(value)) { return true; }
24121        return originalObjectIsSealed(value);
24122      });
24123    }
24124  }
24125  if (Object.freeze) {
24126    var objectFreezeAcceptsPrimitives = !throwsError(function () { return Object.freeze('foo'); });
24127    if (!objectFreezeAcceptsPrimitives) {
24128      var originalObjectFreeze = Object.freeze;
24129      overrideNative(Object, 'freeze', function freeze(value) {
24130        if (!ES.TypeIsObject(value)) { return value; }
24131        return originalObjectFreeze(value);
24132      });
24133    }
24134  }
24135  if (Object.isFrozen) {
24136    var objectIsFrozenAcceptsPrimitives = !throwsError(function () { return Object.isFrozen('foo'); });
24137    if (!objectIsFrozenAcceptsPrimitives) {
24138      var originalObjectIsFrozen = Object.isFrozen;
24139      overrideNative(Object, 'isFrozen', function isFrozen(value) {
24140        if (!ES.TypeIsObject(value)) { return true; }
24141        return originalObjectIsFrozen(value);
24142      });
24143    }
24144  }
24145  if (Object.preventExtensions) {
24146    var objectPreventExtensionsAcceptsPrimitives = !throwsError(function () { return Object.preventExtensions('foo'); });
24147    if (!objectPreventExtensionsAcceptsPrimitives) {
24148      var originalObjectPreventExtensions = Object.preventExtensions;
24149      overrideNative(Object, 'preventExtensions', function preventExtensions(value) {
24150        if (!ES.TypeIsObject(value)) { return value; }
24151        return originalObjectPreventExtensions(value);
24152      });
24153    }
24154  }
24155  if (Object.isExtensible) {
24156    var objectIsExtensibleAcceptsPrimitives = !throwsError(function () { return Object.isExtensible('foo'); });
24157    if (!objectIsExtensibleAcceptsPrimitives) {
24158      var originalObjectIsExtensible = Object.isExtensible;
24159      overrideNative(Object, 'isExtensible', function isExtensible(value) {
24160        if (!ES.TypeIsObject(value)) { return false; }
24161        return originalObjectIsExtensible(value);
24162      });
24163    }
24164  }
24165  if (Object.getPrototypeOf) {
24166    var objectGetProtoAcceptsPrimitives = !throwsError(function () { return Object.getPrototypeOf('foo'); });
24167    if (!objectGetProtoAcceptsPrimitives) {
24168      var originalGetProto = Object.getPrototypeOf;
24169      overrideNative(Object, 'getPrototypeOf', function getPrototypeOf(value) {
24170        return originalGetProto(ES.ToObject(value));
24171      });
24172    }
24173  }
24174
24175  var hasFlags = supportsDescriptors && (function () {
24176    var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, 'flags');
24177    return desc && ES.IsCallable(desc.get);
24178  }());
24179  if (supportsDescriptors && !hasFlags) {
24180    var regExpFlagsGetter = function flags() {
24181      if (!ES.TypeIsObject(this)) {
24182        throw new TypeError('Method called on incompatible type: must be an object.');
24183      }
24184      var result = '';
24185      if (this.global) {
24186        result += 'g';
24187      }
24188      if (this.ignoreCase) {
24189        result += 'i';
24190      }
24191      if (this.multiline) {
24192        result += 'm';
24193      }
24194      if (this.unicode) {
24195        result += 'u';
24196      }
24197      if (this.sticky) {
24198        result += 'y';
24199      }
24200      return result;
24201    };
24202
24203    Value.getter(RegExp.prototype, 'flags', regExpFlagsGetter);
24204  }
24205
24206  var regExpSupportsFlagsWithRegex = supportsDescriptors && valueOrFalseIfThrows(function () {
24207    return String(new RegExp(/a/g, 'i')) === '/a/i';
24208  });
24209  var regExpNeedsToSupportSymbolMatch = hasSymbols && supportsDescriptors && (function () {
24210    // Edge 0.12 supports flags fully, but does not support Symbol.match
24211    var regex = /./;
24212    regex[Symbol.match] = false;
24213    return RegExp(regex) === regex;
24214  }());
24215
24216  var regexToStringIsGeneric = valueOrFalseIfThrows(function () {
24217    return RegExp.prototype.toString.call({ source: 'abc' }) === '/abc/';
24218  });
24219  var regexToStringSupportsGenericFlags = regexToStringIsGeneric && valueOrFalseIfThrows(function () {
24220    return RegExp.prototype.toString.call({ source: 'a', flags: 'b' }) === '/a/b';
24221  });
24222  if (!regexToStringIsGeneric || !regexToStringSupportsGenericFlags) {
24223    var origRegExpToString = RegExp.prototype.toString;
24224    defineProperty(RegExp.prototype, 'toString', function toString() {
24225      var R = ES.RequireObjectCoercible(this);
24226      if (Type.regex(R)) {
24227        return _call(origRegExpToString, R);
24228      }
24229      var pattern = $String(R.source);
24230      var flags = $String(R.flags);
24231      return '/' + pattern + '/' + flags;
24232    }, true);
24233    Value.preserveToString(RegExp.prototype.toString, origRegExpToString);
24234  
vendor: 15,227 bytes, lines 24234-24646
24234}
24235
24236  if (supportsDescriptors && (!regExpSupportsFlagsWithRegex || regExpNeedsToSupportSymbolMatch)) {
24237    var flagsGetter = Object.getOwnPropertyDescriptor(RegExp.prototype, 'flags').get;
24238    var sourceDesc = Object.getOwnPropertyDescriptor(RegExp.prototype, 'source') || {};
24239    var legacySourceGetter = function () {
24240      // prior to it being a getter, it's own + nonconfigurable
24241      return this.source;
24242    };
24243    var sourceGetter = ES.IsCallable(sourceDesc.get) ? sourceDesc.get : legacySourceGetter;
24244
24245    var OrigRegExp = RegExp;
24246    var RegExpShim = (function () {
24247      return function RegExp(pattern, flags) {
24248        var patternIsRegExp = ES.IsRegExp(pattern);
24249        var calledWithNew = this instanceof RegExp;
24250        if (!calledWithNew && patternIsRegExp && typeof flags === 'undefined' && pattern.constructor === RegExp) {
24251          return pattern;
24252        }
24253
24254        var P = pattern;
24255        var F = flags;
24256        if (Type.regex(pattern)) {
24257          P = ES.Call(sourceGetter, pattern);
24258          F = typeof flags === 'undefined' ? ES.Call(flagsGetter, pattern) : flags;
24259          return new RegExp(P, F);
24260        } else if (patternIsRegExp) {
24261          P = pattern.source;
24262          F = typeof flags === 'undefined' ? pattern.flags : flags;
24263        }
24264        return new OrigRegExp(pattern, flags);
24265      };
24266    }());
24267    wrapConstructor(OrigRegExp, RegExpShim, {
24268      $input: true // Chrome < v39 & Opera < 26 have a nonstandard "$input" property
24269    });
24270    /* eslint-disable no-undef, no-global-assign */
24271    RegExp = RegExpShim;
24272    Value.redefine(globals, 'RegExp', RegExpShim);
24273    /* eslint-enable no-undef, no-global-assign */
24274  }
24275
24276  if (supportsDescriptors) {
24277    var regexGlobals = {
24278      input: '$_',
24279      lastMatch: '$&',
24280      lastParen: '$+',
24281      leftContext: '$`',
24282      rightContext: '$\''
24283    };
24284    _forEach(keys(regexGlobals), function (prop) {
24285      if (prop in RegExp && !(regexGlobals[prop] in RegExp)) {
24286        Value.getter(RegExp, regexGlobals[prop], function get() {
24287          return RegExp[prop];
24288        });
24289      }
24290    });
24291  }
24292  addDefaultSpecies(RegExp);
24293
24294  var inverseEpsilon = 1 / Number.EPSILON;
24295  var roundTiesToEven = function roundTiesToEven(n) {
24296    // Even though this reduces down to `return n`, it takes advantage of built-in rounding.
24297    return (n + inverseEpsilon) - inverseEpsilon;
24298  };
24299  var BINARY_32_EPSILON = Math.pow(2, -23);
24300  var BINARY_32_MAX_VALUE = Math.pow(2, 127) * (2 - BINARY_32_EPSILON);
24301  var BINARY_32_MIN_VALUE = Math.pow(2, -126);
24302  var E = Math.E;
24303  var LOG2E = Math.LOG2E;
24304  var LOG10E = Math.LOG10E;
24305  var numberCLZ = Number.prototype.clz;
24306  delete Number.prototype.clz; // Safari 8 has Number#clz
24307
24308  var MathShims = {
24309    acosh: function acosh(value) {
24310      var x = Number(value);
24311      if (numberIsNaN(x) || value < 1) { return NaN; }
24312      if (x === 1) { return 0; }
24313      if (x === Infinity) { return x; }
24314
24315      var xInvSquared = 1 / (x * x);
24316      if (x < 2) {
24317        return _log1p(x - 1 + (_sqrt(1 - xInvSquared) * x));
24318      }
24319      var halfX = x / 2;
24320      return _log1p(halfX + (_sqrt(1 - xInvSquared) * halfX) - 1) + (1 / LOG2E);
24321    },
24322
24323    asinh: function asinh(value) {
24324      var x = Number(value);
24325      if (x === 0 || !globalIsFinite(x)) {
24326        return x;
24327      }
24328
24329      var a = _abs(x);
24330      var aSquared = a * a;
24331      var s = _sign(x);
24332      if (a < 1) {
24333        return s * _log1p(a + (aSquared / (_sqrt(aSquared + 1) + 1)));
24334      }
24335      return s * (_log1p((a / 2) + (_sqrt(1 + (1 / aSquared)) * a / 2) - 1) + (1 / LOG2E));
24336    },
24337
24338    atanh: function atanh(value) {
24339      var x = Number(value);
24340
24341      if (x === 0) { return x; }
24342      if (x === -1) { return -Infinity; }
24343      if (x === 1) { return Infinity; }
24344      if (numberIsNaN(x) || x < -1 || x > 1) {
24345        return NaN;
24346      }
24347
24348      var a = _abs(x);
24349      return _sign(x) * _log1p(2 * a / (1 - a)) / 2;
24350    },
24351
24352    cbrt: function cbrt(value) {
24353      var x = Number(value);
24354      if (x === 0) { return x; }
24355      var negate = x < 0;
24356      var result;
24357      if (negate) { x = -x; }
24358      if (x === Infinity) {
24359        result = Infinity;
24360      } else {
24361        result = _exp(_log(x) / 3);
24362        // from http://en.wikipedia.org/wiki/Cube_root#Numerical_methods
24363        result = ((x / (result * result)) + (2 * result)) / 3;
24364      }
24365      return negate ? -result : result;
24366    },
24367
24368    clz32: function clz32(value) {
24369      // See https://bugs.ecmascript.org/show_bug.cgi?id=2465
24370      var x = Number(value);
24371      var number = ES.ToUint32(x);
24372      if (number === 0) {
24373        return 32;
24374      }
24375      return numberCLZ ? ES.Call(numberCLZ, number) : 31 - _floor(_log(number + 0.5) * LOG2E);
24376    },
24377
24378    cosh: function cosh(value) {
24379      var x = Number(value);
24380      if (x === 0) { return 1; } // +0 or -0
24381      if (numberIsNaN(x)) { return NaN; }
24382      if (!globalIsFinite(x)) { return Infinity; }
24383
24384      var t = _exp(_abs(x) - 1);
24385      return (t + (1 / (t * E * E))) * (E / 2);
24386    },
24387
24388    expm1: function expm1(value) {
24389      var x = Number(value);
24390      if (x === -Infinity) { return -1; }
24391      if (!globalIsFinite(x) || x === 0) { return x; }
24392      if (_abs(x) > 0.5) {
24393        return _exp(x) - 1;
24394      }
24395      // A more precise approximation using Taylor series expansion
24396      // from https://github.com/paulmillr/es6-shim/issues/314#issuecomment-70293986
24397      var t = x;
24398      var sum = 0;
24399      var n = 1;
24400      while (sum + t !== sum) {
24401        sum += t;
24402        n += 1;
24403        t *= x / n;
24404      }
24405      return sum;
24406    },
24407
24408    hypot: function hypot(x, y) {
24409      var result = 0;
24410      var largest = 0;
24411      for (var i = 0; i < arguments.length; ++i) {
24412        var value = _abs(Number(arguments[i]));
24413        if (largest < value) {
24414          result *= (largest / value) * (largest / value);
24415          result += 1;
24416          largest = value;
24417        } else {
24418          result += value > 0 ? (value / largest) * (value / largest) : value;
24419        }
24420      }
24421      return largest === Infinity ? Infinity : largest * _sqrt(result);
24422    },
24423
24424    log2: function log2(value) {
24425      return _log(value) * LOG2E;
24426    },
24427
24428    log10: function log10(value) {
24429      return _log(value) * LOG10E;
24430    },
24431
24432    log1p: _log1p,
24433
24434    sign: _sign,
24435
24436    sinh: function sinh(value) {
24437      var x = Number(value);
24438      if (!globalIsFinite(x) || x === 0) { return x; }
24439
24440      var a = _abs(x);
24441      if (a < 1) {
24442        var u = Math.expm1(a);
24443        return _sign(x) * u * (1 + (1 / (u + 1))) / 2;
24444      }
24445      var t = _exp(a - 1);
24446      return _sign(x) * (t - (1 / (t * E * E))) * (E / 2);
24447    },
24448
24449    tanh: function tanh(value) {
24450      var x = Number(value);
24451      if (numberIsNaN(x) || x === 0) { return x; }
24452      // can exit early at +-20 as JS loses precision for true value at this integer
24453      if (x >= 20) { return 1; }
24454      if (x <= -20) { return -1; }
24455
24456      return (Math.expm1(x) - Math.expm1(-x)) / (_exp(x) + _exp(-x));
24457    },
24458
24459    trunc: function trunc(value) {
24460      var x = Number(value);
24461      return x < 0 ? -_floor(-x) : _floor(x);
24462    },
24463
24464    imul: function imul(x, y) {
24465      // taken from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/imul
24466      var a = ES.ToUint32(x);
24467      var b = ES.ToUint32(y);
24468      var ah = (a >>> 16) & 0xffff;
24469      var al = a & 0xffff;
24470      var bh = (b >>> 16) & 0xffff;
24471      var bl = b & 0xffff;
24472      // the shift by 0 fixes the sign on the high part
24473      // the final |0 converts the unsigned value into a signed value
24474      return (al * bl) + ((((ah * bl) + (al * bh)) << 16) >>> 0) | 0;
24475    },
24476
24477    fround: function fround(x) {
24478      var v = Number(x);
24479      if (v === 0 || v === Infinity || v === -Infinity || numberIsNaN(v)) {
24480        return v;
24481      }
24482      var sign = _sign(v);
24483      var abs = _abs(v);
24484      if (abs < BINARY_32_MIN_VALUE) {
24485        return sign * roundTiesToEven(abs / BINARY_32_MIN_VALUE / BINARY_32_EPSILON) * BINARY_32_MIN_VALUE * BINARY_32_EPSILON;
24486      }
24487      // Veltkamp's splitting (?)
24488      var a = (1 + (BINARY_32_EPSILON / Number.EPSILON)) * abs;
24489      var result = a - (a - abs);
24490      if (result > BINARY_32_MAX_VALUE || numberIsNaN(result)) {
24491        return sign * Infinity;
24492      }
24493      return sign * result;
24494    }
24495  };
24496
24497  var withinULPDistance = function withinULPDistance(result, expected, distance) {
24498    return _abs(1 - (result / expected)) / Number.EPSILON < (distance || 8);
24499  };
24500
24501  defineProperties(Math, MathShims);
24502  // Chrome < 40 sinh returns ∞ for large numbers
24503  defineProperty(Math, 'sinh', MathShims.sinh, Math.sinh(710) === Infinity);
24504  // Chrome < 40 cosh returns ∞ for large numbers
24505  defineProperty(Math, 'cosh', MathShims.cosh, Math.cosh(710) === Infinity);
24506  // IE 11 TP has an imprecise log1p: reports Math.log1p(-1e-17) as 0
24507  defineProperty(Math, 'log1p', MathShims.log1p, Math.log1p(-1e-17) !== -1e-17);
24508  // IE 11 TP has an imprecise asinh: reports Math.asinh(-1e7) as not exactly equal to -Math.asinh(1e7)
24509  defineProperty(Math, 'asinh', MathShims.asinh, Math.asinh(-1e7) !== -Math.asinh(1e7));
24510  // Chrome < 54 asinh returns ∞ for large numbers and should not
24511  defineProperty(Math, 'asinh', MathShims.asinh, Math.asinh(1e+300) === Infinity);
24512  // Chrome < 54 atanh incorrectly returns 0 for large numbers
24513  defineProperty(Math, 'atanh', MathShims.atanh, Math.atanh(1e-300) === 0);
24514  // Chrome 40 has an imprecise Math.tanh with very small numbers
24515  defineProperty(Math, 'tanh', MathShims.tanh, Math.tanh(-2e-17) !== -2e-17);
24516  // Chrome 40 loses Math.acosh precision with high numbers
24517  defineProperty(Math, 'acosh', MathShims.acosh, Math.acosh(Number.MAX_VALUE) === Infinity);
24518  // Chrome < 54 has an inaccurate acosh for EPSILON deltas
24519  defineProperty(Math, 'acosh', MathShims.acosh, !withinULPDistance(Math.acosh(1 + Number.EPSILON), Math.sqrt(2 * Number.EPSILON)));
24520  // Firefox 38 on Windows
24521  defineProperty(Math, 'cbrt', MathShims.cbrt, !withinULPDistance(Math.cbrt(1e-300), 1e-100));
24522  // node 0.11 has an imprecise Math.sinh with very small numbers
24523  defineProperty(Math, 'sinh', MathShims.sinh, Math.sinh(-2e-17) !== -2e-17);
24524  // FF 35 on Linux reports 22025.465794806725 for Math.expm1(10)
24525  var expm1OfTen = Math.expm1(10);
24526  defineProperty(Math, 'expm1', MathShims.expm1, expm1OfTen > 22025.465794806719 || expm1OfTen < 22025.4657948067165168);
24527  // node v12.11 - v12.15 report NaN
24528  defineProperty(Math, 'hypot', MathShims.hypot, Math.hypot(Infinity, NaN) !== Infinity);
24529
24530  var origMathRound = Math.round;
24531  // breaks in e.g. Safari 8, Internet Explorer 11, Opera 12
24532  var roundHandlesBoundaryConditions = Math.round(0.5 - (Number.EPSILON / 4)) === 0 &&
24533    Math.round(-0.5 + (Number.EPSILON / 3.99)) === 1;
24534
24535  // When engines use Math.floor(x + 0.5) internally, Math.round can be buggy for large integers.
24536  // This behavior should be governed by "round to nearest, ties to even mode"
24537  // see http://www.ecma-international.org/ecma-262/6.0/#sec-terms-and-definitions-number-type
24538  // These are the boundary cases where it breaks.
24539  var smallestPositiveNumberWhereRoundBreaks = inverseEpsilon + 1;
24540  var largestPositiveNumberWhereRoundBreaks = (2 * inverseEpsilon) - 1;
24541  var roundDoesNotIncreaseIntegers = [
24542    smallestPositiveNumberWhereRoundBreaks,
24543    largestPositiveNumberWhereRoundBreaks
24544  ].every(function (num) {
24545    return Math.round(num) === num;
24546  });
24547  defineProperty(Math, 'round', function round(x) {
24548    var floor = _floor(x);
24549    var ceil = floor === -1 ? -0 : floor + 1;
24550    return x - floor < 0.5 ? floor : ceil;
24551  }, !roundHandlesBoundaryConditions || !roundDoesNotIncreaseIntegers);
24552  Value.preserveToString(Math.round, origMathRound);
24553
24554  var origImul = Math.imul;
24555  if (Math.imul(0xffffffff, 5) !== -5) {
24556    // Safari 6.1, at least, reports "0" for this value
24557    Math.imul = MathShims.imul;
24558    Value.preserveToString(Math.imul, origImul);
24559  }
24560  if (Math.imul.length !== 2) {
24561    // Safari 8.0.4 has a length of 1
24562    // fixed in https://bugs.webkit.org/show_bug.cgi?id=143658
24563    overrideNative(Math, 'imul', function imul(x, y) {
24564      return ES.Call(origImul, Math, arguments);
24565    });
24566  }
24567
24568  // Promises
24569  // Simplest possible implementation; use a 3rd-party library if you
24570  // want the best possible speed and/or long stack traces.
24571  var PromiseShim = (function () {
24572    var setTimeout = globals.setTimeout;
24573    // some environments don't have setTimeout - no way to shim here.
24574    if (typeof setTimeout !== 'function' && typeof setTimeout !== 'object') { return; }
24575
24576    ES.IsPromise = function (promise) {
24577      if (!ES.TypeIsObject(promise)) {
24578        return false;
24579      }
24580      if (typeof promise._promise === 'undefined') {
24581        return false; // uninitialized, or missing our hidden field.
24582      }
24583      return true;
24584    };
24585
24586    // "PromiseCapability" in the spec is what most promise implementations
24587    // call a "deferred".
24588    var PromiseCapability = function (C) {
24589      if (!ES.IsConstructor(C)) {
24590        throw new TypeError('Bad promise constructor');
24591      }
24592      var capability = this;
24593      var resolver = function (resolve, reject) {
24594        if (capability.resolve !== void 0 || capability.reject !== void 0) {
24595          throw new TypeError('Bad Promise implementation!');
24596        }
24597        capability.resolve = resolve;
24598        capability.reject = reject;
24599      };
24600      // Initialize fields to inform optimizers about the object shape.
24601      capability.resolve = void 0;
24602      capability.reject = void 0;
24603      capability.promise = new C(resolver);
24604      if (!(ES.IsCallable(capability.resolve) && ES.IsCallable(capability.reject))) {
24605        throw new TypeError('Bad promise constructor');
24606      }
24607    };
24608
24609    // find an appropriate setImmediate-alike
24610    var makeZeroTimeout;
24611    if (typeof window !== 'undefined' && ES.IsCallable(window.postMessage)) {
24612      makeZeroTimeout = function () {
24613        // from http://dbaron.org/log/20100309-faster-timeouts
24614        var timeouts = [];
24615        var messageName = 'zero-timeout-message';
24616        var setZeroTimeout = function (fn) {
24617          _push(timeouts, fn);
24618          window.postMessage(messageName, '*');
24619        };
24620        var handleMessage = function (event) {
24621          if (event.source === window && event.data === messageName) {
24622            event.stopPropagation();
24623            if (timeouts.length === 0) { return; }
24624            var fn = _shift(timeouts);
24625            fn();
24626          }
24627        };
24628        window.addEventListener('message', handleMessage, true);
24629        return setZeroTimeout;
24630      };
24631    }
24632    var makePromiseAsap = function () {
24633      // An efficient task-scheduler based on a pre-existing Promise
24634      // implementation, which we can use even if we override the
24635      // global Promise below (in order to workaround bugs)
24636      // https://github.com/Raynos/observ-hash/issues/2#issuecomment-35857671
24637      var P = globals.Promise;
24638      var pr = P && P.resolve && P.resolve();
24639      return pr && function (task) {
24640        return pr.then(task);
24641      };
24642    };
24643    var enqueue = ES.IsCallable(globals.setImmediate) ?
24644      globals.setImmediate :
24645      typeof process === 'object' && process.nextTick ? process.nextTick : makePromiseAsap() ||
24646      (ES.IsCallable(makeZeroTimeout) ? makeZeroTimeout() : function (task) { setTimeout(task, 0); }
vendor: 17,261 bytes, lines 24646-25120
24646); // fallback
24647
24648    // Constants for Promise implementation
24649    var PROMISE_IDENTITY = function (x) { return x; };
24650    var PROMISE_THROWER = function (e) { throw e; };
24651    var PROMISE_PENDING = 0;
24652    var PROMISE_FULFILLED = 1;
24653    var PROMISE_REJECTED = 2;
24654    // We store fulfill/reject handlers and capabilities in a single array.
24655    var PROMISE_FULFILL_OFFSET = 0;
24656    var PROMISE_REJECT_OFFSET = 1;
24657    var PROMISE_CAPABILITY_OFFSET = 2;
24658    // This is used in an optimization for chaining promises via then.
24659    var PROMISE_FAKE_CAPABILITY = {};
24660
24661    var enqueuePromiseReactionJob = function (handler, capability, argument) {
24662      enqueue(function () {
24663        promiseReactionJob(handler, capability, argument);
24664      });
24665    };
24666
24667    var promiseReactionJob = function (handler, promiseCapability, argument) {
24668      var handlerResult, f;
24669      if (promiseCapability === PROMISE_FAKE_CAPABILITY) {
24670        // Fast case, when we don't actually need to chain through to a
24671        // (real) promiseCapability.
24672        return handler(argument);
24673      }
24674      try {
24675        handlerResult = handler(argument);
24676        f = promiseCapability.resolve;
24677      } catch (e) {
24678        handlerResult = e;
24679        f = promiseCapability.reject;
24680      }
24681      f(handlerResult);
24682    };
24683
24684    var fulfillPromise = function (promise, value) {
24685      var _promise = promise._promise;
24686      var length = _promise.reactionLength;
24687      if (length > 0) {
24688        enqueuePromiseReactionJob(
24689          _promise.fulfillReactionHandler0,
24690          _promise.reactionCapability0,
24691          value
24692        );
24693        _promise.fulfillReactionHandler0 = void 0;
24694        _promise.rejectReactions0 = void 0;
24695        _promise.reactionCapability0 = void 0;
24696        if (length > 1) {
24697          for (var i = 1, idx = 0; i < length; i++, idx += 3) {
24698            enqueuePromiseReactionJob(
24699              _promise[idx + PROMISE_FULFILL_OFFSET],
24700              _promise[idx + PROMISE_CAPABILITY_OFFSET],
24701              value
24702            );
24703            promise[idx + PROMISE_FULFILL_OFFSET] = void 0;
24704            promise[idx + PROMISE_REJECT_OFFSET] = void 0;
24705            promise[idx + PROMISE_CAPABILITY_OFFSET] = void 0;
24706          }
24707        }
24708      }
24709      _promise.result = value;
24710      _promise.state = PROMISE_FULFILLED;
24711      _promise.reactionLength = 0;
24712    };
24713
24714    var rejectPromise = function (promise, reason) {
24715      var _promise = promise._promise;
24716      var length = _promise.reactionLength;
24717      if (length > 0) {
24718        enqueuePromiseReactionJob(
24719          _promise.rejectReactionHandler0,
24720          _promise.reactionCapability0,
24721          reason
24722        );
24723        _promise.fulfillReactionHandler0 = void 0;
24724        _promise.rejectReactions0 = void 0;
24725        _promise.reactionCapability0 = void 0;
24726        if (length > 1) {
24727          for (var i = 1, idx = 0; i < length; i++, idx += 3) {
24728            enqueuePromiseReactionJob(
24729              _promise[idx + PROMISE_REJECT_OFFSET],
24730              _promise[idx + PROMISE_CAPABILITY_OFFSET],
24731              reason
24732            );
24733            promise[idx + PROMISE_FULFILL_OFFSET] = void 0;
24734            promise[idx + PROMISE_REJECT_OFFSET] = void 0;
24735            promise[idx + PROMISE_CAPABILITY_OFFSET] = void 0;
24736          }
24737        }
24738      }
24739      _promise.result = reason;
24740      _promise.state = PROMISE_REJECTED;
24741      _promise.reactionLength = 0;
24742    };
24743
24744    var createResolvingFunctions = function (promise) {
24745      var alreadyResolved = false;
24746      var resolve = function (resolution) {
24747        var then;
24748        if (alreadyResolved) { return; }
24749        alreadyResolved = true;
24750        if (resolution === promise) {
24751          return rejectPromise(promise, new TypeError('Self resolution'));
24752        }
24753        if (!ES.TypeIsObject(resolution)) {
24754          return fulfillPromise(promise, resolution);
24755        }
24756        try {
24757          then = resolution.then;
24758        } catch (e) {
24759          return rejectPromise(promise, e);
24760        }
24761        if (!ES.IsCallable(then)) {
24762          return fulfillPromise(promise, resolution);
24763        }
24764        enqueue(function () {
24765          promiseResolveThenableJob(promise, resolution, then);
24766        });
24767      };
24768      var reject = function (reason) {
24769        if (alreadyResolved) { return; }
24770        alreadyResolved = true;
24771        return rejectPromise(promise, reason);
24772      };
24773      return { resolve: resolve, reject: reject };
24774    };
24775
24776    var optimizedThen = function (then, thenable, resolve, reject) {
24777      // Optimization: since we discard the result, we can pass our
24778      // own then implementation a special hint to let it know it
24779      // doesn't have to create it.  (The PROMISE_FAKE_CAPABILITY
24780      // object is local to this implementation and unforgeable outside.)
24781      if (then === Promise$prototype$then) {
24782        _call(then, thenable, resolve, reject, PROMISE_FAKE_CAPABILITY);
24783      } else {
24784        _call(then, thenable, resolve, reject);
24785      }
24786    };
24787    var promiseResolveThenableJob = function (promise, thenable, then) {
24788      var resolvingFunctions = createResolvingFunctions(promise);
24789      var resolve = resolvingFunctions.resolve;
24790      var reject = resolvingFunctions.reject;
24791      try {
24792        optimizedThen(then, thenable, resolve, reject);
24793      } catch (e) {
24794        reject(e);
24795      }
24796    };
24797
24798    var Promise$prototype, Promise$prototype$then;
24799    var Promise = (function () {
24800      var PromiseShim = function Promise(resolver) {
24801        if (!(this instanceof PromiseShim)) {
24802          throw new TypeError('Constructor Promise requires "new"');
24803        }
24804        if (this && this._promise) {
24805          throw new TypeError('Bad construction');
24806        }
24807        // see https://bugs.ecmascript.org/show_bug.cgi?id=2482
24808        if (!ES.IsCallable(resolver)) {
24809          throw new TypeError('not a valid resolver');
24810        }
24811        var promise = emulateES6construct(this, PromiseShim, Promise$prototype, {
24812          _promise: {
24813            result: void 0,
24814            state: PROMISE_PENDING,
24815            // The first member of the "reactions" array is inlined here,
24816            // since most promises only have one reaction.
24817            // We've also exploded the 'reaction' object to inline the
24818            // "handler" and "capability" fields, since both fulfill and
24819            // reject reactions share the same capability.
24820            reactionLength: 0,
24821            fulfillReactionHandler0: void 0,
24822            rejectReactionHandler0: void 0,
24823            reactionCapability0: void 0
24824          }
24825        });
24826        var resolvingFunctions = createResolvingFunctions(promise);
24827        var reject = resolvingFunctions.reject;
24828        try {
24829          resolver(resolvingFunctions.resolve, reject);
24830        } catch (e) {
24831          reject(e);
24832        }
24833        return promise;
24834      };
24835      return PromiseShim;
24836    }());
24837    Promise$prototype = Promise.prototype;
24838
24839    var _promiseAllResolver = function (index, values, capability, remaining) {
24840      var alreadyCalled = false;
24841      return function (x) {
24842        if (alreadyCalled) { return; }
24843        alreadyCalled = true;
24844        values[index] = x;
24845        if ((--remaining.count) === 0) {
24846          var resolve = capability.resolve;
24847          resolve(values); // call w/ this===undefined
24848        }
24849      };
24850    };
24851
24852    var performPromiseAll = function (iteratorRecord, C, resultCapability) {
24853      var it = iteratorRecord.iterator;
24854      var values = [];
24855      var remaining = { count: 1 };
24856      var next, nextValue;
24857      var index = 0;
24858      while (true) {
24859        try {
24860          next = ES.IteratorStep(it);
24861          if (next === false) {
24862            iteratorRecord.done = true;
24863            break;
24864          }
24865          nextValue = next.value;
24866        } catch (e) {
24867          iteratorRecord.done = true;
24868          throw e;
24869        }
24870        values[index] = void 0;
24871        var nextPromise = C.resolve(nextValue);
24872        var resolveElement = _promiseAllResolver(
24873          index,
24874          values,
24875          resultCapability,
24876          remaining
24877        );
24878        remaining.count += 1;
24879        optimizedThen(nextPromise.then, nextPromise, resolveElement, resultCapability.reject);
24880        index += 1;
24881      }
24882      if ((--remaining.count) === 0) {
24883        var resolve = resultCapability.resolve;
24884        resolve(values); // call w/ this===undefined
24885      }
24886      return resultCapability.promise;
24887    };
24888
24889    var performPromiseRace = function (iteratorRecord, C, resultCapability) {
24890      var it = iteratorRecord.iterator;
24891      var next, nextValue, nextPromise;
24892      while (true) {
24893        try {
24894          next = ES.IteratorStep(it);
24895          if (next === false) {
24896            // NOTE: If iterable has no items, resulting promise will never
24897            // resolve; see:
24898            // https://github.com/domenic/promises-unwrapping/issues/75
24899            // https://bugs.ecmascript.org/show_bug.cgi?id=2515
24900            iteratorRecord.done = true;
24901            break;
24902          }
24903          nextValue = next.value;
24904        } catch (e) {
24905          iteratorRecord.done = true;
24906          throw e;
24907        }
24908        nextPromise = C.resolve(nextValue);
24909        optimizedThen(nextPromise.then, nextPromise, resultCapability.resolve, resultCapability.reject);
24910      }
24911      return resultCapability.promise;
24912    };
24913
24914    defineProperties(Promise, {
24915      all: function all(iterable) {
24916        var C = this;
24917        if (!ES.TypeIsObject(C)) {
24918          throw new TypeError('Promise is not object');
24919        }
24920        var capability = new PromiseCapability(C);
24921        var iterator, iteratorRecord;
24922        try {
24923          iterator = ES.GetIterator(iterable);
24924          iteratorRecord = { iterator: iterator, done: false };
24925          return performPromiseAll(iteratorRecord, C, capability);
24926        } catch (e) {
24927          var exception = e;
24928          if (iteratorRecord && !iteratorRecord.done) {
24929            try {
24930              ES.IteratorClose(iterator, true);
24931            } catch (ee) {
24932              exception = ee;
24933            }
24934          }
24935          var reject = capability.reject;
24936          reject(exception);
24937          return capability.promise;
24938        }
24939      },
24940
24941      race: function race(iterable) {
24942        var C = this;
24943        if (!ES.TypeIsObject(C)) {
24944          throw new TypeError('Promise is not object');
24945        }
24946        var capability = new PromiseCapability(C);
24947        var iterator, iteratorRecord;
24948        try {
24949          iterator = ES.GetIterator(iterable);
24950          iteratorRecord = { iterator: iterator, done: false };
24951          return performPromiseRace(iteratorRecord, C, capability);
24952        } catch (e) {
24953          var exception = e;
24954          if (iteratorRecord && !iteratorRecord.done) {
24955            try {
24956              ES.IteratorClose(iterator, true);
24957            } catch (ee) {
24958              exception = ee;
24959            }
24960          }
24961          var reject = capability.reject;
24962          reject(exception);
24963          return capability.promise;
24964        }
24965      },
24966
24967      reject: function reject(reason) {
24968        var C = this;
24969        if (!ES.TypeIsObject(C)) {
24970          throw new TypeError('Bad promise constructor');
24971        }
24972        var capability = new PromiseCapability(C);
24973        var rejectFunc = capability.reject;
24974        rejectFunc(reason); // call with this===undefined
24975        return capability.promise;
24976      },
24977
24978      resolve: function resolve(v) {
24979        // See https://esdiscuss.org/topic/fixing-promise-resolve for spec
24980        var C = this;
24981        if (!ES.TypeIsObject(C)) {
24982          throw new TypeError('Bad promise constructor');
24983        }
24984        if (ES.IsPromise(v)) {
24985          var constructor = v.constructor;
24986          if (constructor === C) {
24987            return v;
24988          }
24989        }
24990        var capability = new PromiseCapability(C);
24991        var resolveFunc = capability.resolve;
24992        resolveFunc(v); // call with this===undefined
24993        return capability.promise;
24994      }
24995    });
24996
24997    defineProperties(Promise$prototype, {
24998      'catch': function (onRejected) {
24999        return this.then(null, onRejected);
25000      },
25001
25002      then: function then(onFulfilled, onRejected) {
25003        var promise = this;
25004        if (!ES.IsPromise(promise)) { throw new TypeError('not a promise'); }
25005        var C = ES.SpeciesConstructor(promise, Promise);
25006        var resultCapability;
25007        var returnValueIsIgnored = arguments.length > 2 && arguments[2] === PROMISE_FAKE_CAPABILITY;
25008        if (returnValueIsIgnored && C === Promise) {
25009          resultCapability = PROMISE_FAKE_CAPABILITY;
25010        } else {
25011          resultCapability = new PromiseCapability(C);
25012        }
25013        // PerformPromiseThen(promise, onFulfilled, onRejected, resultCapability)
25014        // Note that we've split the 'reaction' object into its two
25015        // components, "capabilities" and "handler"
25016        // "capabilities" is always equal to `resultCapability`
25017        var fulfillReactionHandler = ES.IsCallable(onFulfilled) ? onFulfilled : PROMISE_IDENTITY;
25018        var rejectReactionHandler = ES.IsCallable(onRejected) ? onRejected : PROMISE_THROWER;
25019        var _promise = promise._promise;
25020        var value;
25021        if (_promise.state === PROMISE_PENDING) {
25022          if (_promise.reactionLength === 0) {
25023            _promise.fulfillReactionHandler0 = fulfillReactionHandler;
25024            _promise.rejectReactionHandler0 = rejectReactionHandler;
25025            _promise.reactionCapability0 = resultCapability;
25026          } else {
25027            var idx = 3 * (_promise.reactionLength - 1);
25028            _promise[idx + PROMISE_FULFILL_OFFSET] = fulfillReactionHandler;
25029            _promise[idx + PROMISE_REJECT_OFFSET] = rejectReactionHandler;
25030            _promise[idx + PROMISE_CAPABILITY_OFFSET] = resultCapability;
25031          }
25032          _promise.reactionLength += 1;
25033        } else if (_promise.state === PROMISE_FULFILLED) {
25034          value = _promise.result;
25035          enqueuePromiseReactionJob(
25036            fulfillReactionHandler,
25037            resultCapability,
25038            value
25039          );
25040        } else if (_promise.state === PROMISE_REJECTED) {
25041          value = _promise.result;
25042          enqueuePromiseReactionJob(
25043            rejectReactionHandler,
25044            resultCapability,
25045            value
25046          );
25047        } else {
25048          throw new TypeError('unexpected Promise state');
25049        }
25050        return resultCapability.promise;
25051      }
25052    });
25053    // This helps the optimizer by ensuring that methods which take
25054    // capabilities aren't polymorphic.
25055    PROMISE_FAKE_CAPABILITY = new PromiseCapability(Promise);
25056    Promise$prototype$then = Promise$prototype.then;
25057
25058    return Promise;
25059  }());
25060
25061  // Chrome's native Promise has extra methods that it shouldn't have. Let's remove them.
25062  if (globals.Promise) {
25063    delete globals.Promise.accept;
25064    delete globals.Promise.defer;
25065    delete globals.Promise.prototype.chain;
25066  }
25067
25068  if (typeof PromiseShim === 'function') {
25069    // export the Promise constructor.
25070    defineProperties(globals, { Promise: PromiseShim });
25071    // In Chrome 33 (and thereabouts) Promise is defined, but the
25072    // implementation is buggy in a number of ways.  Let's check subclassing
25073    // support to see if we have a buggy implementation.
25074    var promiseSupportsSubclassing = supportsSubclassing(globals.Promise, function (S) {
25075      return S.resolve(42).then(function () {}) instanceof S;
25076    });
25077    var promiseIgnoresNonFunctionThenCallbacks = !throwsError(function () {
25078      return globals.Promise.reject(42).then(null, 5).then(null, noop);
25079    });
25080    var promiseRequiresObjectContext = throwsError(function () { return globals.Promise.call(3, noop); });
25081    // Promise.resolve() was errata'ed late in the ES6 process.
25082    // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1170742
25083    //      https://code.google.com/p/v8/issues/detail?id=4161
25084    // It serves as a proxy for a number of other bugs in early Promise
25085    // implementations.
25086    var promiseResolveBroken = (function (Promise) {
25087      var p = Promise.resolve(5);
25088      p.constructor = {};
25089      var p2 = Promise.resolve(p);
25090      try {
25091        p2.then(null, noop).then(null, noop); // avoid "uncaught rejection" warnings in console
25092      } catch (e) {
25093        return true; // v8 native Promises break here https://code.google.com/p/chromium/issues/detail?id=575314
25094      }
25095      return p === p2; // This *should* be false!
25096    }(globals.Promise));
25097
25098    // Chrome 46 (probably older too) does not retrieve a thenable's .then synchronously
25099    var getsThenSynchronously = supportsDescriptors && (function () {
25100      var count = 0;
25101      // eslint-disable-next-line getter-return
25102      var thenable = Object.defineProperty({}, 'then', { get: function () { count += 1; } });
25103      Promise.resolve(thenable);
25104      return count === 1;
25105    }());
25106
25107    var BadResolverPromise = function BadResolverPromise(executor) {
25108      var p = new Promise(executor);
25109      executor(3, function () {});
25110      this.then = p.then;
25111      this.constructor = BadResolverPromise;
25112    };
25113    BadResolverPromise.prototype = Promise.prototype;
25114    BadResolverPromise.all = Promise.all;
25115    // Chrome Canary 49 (probably older too) has some implementation bugs
25116    var hasBadResolverPromise = valueOrFalseIfThrows(function () {
25117      return !!BadResolverPromise.all([1, 2]);
25118    });
25119
25120    if (
vendor: 16,910 bytes, lines 25120-25625
25120!promiseSupportsSubclassing || !promiseIgnoresNonFunctionThenCallbacks ||
25121        !promiseRequiresObjectContext || promiseResolveBroken ||
25122        !getsThenSynchronously || hasBadResolverPromise) {
25123      /* globals Promise: true */
25124      /* eslint-disable no-undef, no-global-assign */
25125      Promise = PromiseShim;
25126      /* eslint-enable no-undef, no-global-assign */
25127      overrideNative(globals, 'Promise', PromiseShim);
25128    }
25129    if (Promise.all.length !== 1) {
25130      var origAll = Promise.all;
25131      overrideNative(Promise, 'all', function all(iterable) {
25132        return ES.Call(origAll, this, arguments);
25133      });
25134    }
25135    if (Promise.race.length !== 1) {
25136      var origRace = Promise.race;
25137      overrideNative(Promise, 'race', function race(iterable) {
25138        return ES.Call(origRace, this, arguments);
25139      });
25140    }
25141    if (Promise.resolve.length !== 1) {
25142      var origResolve = Promise.resolve;
25143      overrideNative(Promise, 'resolve', function resolve(x) {
25144        return ES.Call(origResolve, this, arguments);
25145      });
25146    }
25147    if (Promise.reject.length !== 1) {
25148      var origReject = Promise.reject;
25149      overrideNative(Promise, 'reject', function reject(r) {
25150        return ES.Call(origReject, this, arguments);
25151      });
25152    }
25153    ensureEnumerable(Promise, 'all');
25154    ensureEnumerable(Promise, 'race');
25155    ensureEnumerable(Promise, 'resolve');
25156    ensureEnumerable(Promise, 'reject');
25157    addDefaultSpecies(Promise);
25158  }
25159
25160  // Map and Set require a true ES5 environment
25161  // Their fast path also requires that the environment preserve
25162  // property insertion order, which is not guaranteed by the spec.
25163  var testOrder = function (a) {
25164    var b = keys(_reduce(a, function (o, k) {
25165      o[k] = true;
25166      return o;
25167    }, {}));
25168    return a.join(':') === b.join(':');
25169  };
25170  var preservesInsertionOrder = testOrder(['z', 'a', 'bb']);
25171  // some engines (eg, Chrome) only preserve insertion order for string keys
25172  var preservesNumericInsertionOrder = testOrder(['z', 1, 'a', '3', 2]);
25173
25174  if (supportsDescriptors) {
25175
25176    var fastkey = function fastkey(key, skipInsertionOrderCheck) {
25177      if (!skipInsertionOrderCheck && !preservesInsertionOrder) {
25178        return null;
25179      }
25180      if (isNullOrUndefined(key)) {
25181        return '^' + ES.ToString(key);
25182      } else if (typeof key === 'string') {
25183        return '$' + key;
25184      } else if (typeof key === 'number') {
25185        // note that -0 will get coerced to "0" when used as a property key
25186        if (!preservesNumericInsertionOrder) {
25187          return 'n' + key;
25188        }
25189        return key;
25190      } else if (typeof key === 'boolean') {
25191        return 'b' + key;
25192      }
25193      return null;
25194    };
25195
25196    var emptyObject = function emptyObject() {
25197      // accomodate some older not-quite-ES5 browsers
25198      return Object.create ? Object.create(null) : {};
25199    };
25200
25201    var addIterableToMap = function addIterableToMap(MapConstructor, map, iterable) {
25202      if (isArray(iterable) || Type.string(iterable)) {
25203        _forEach(iterable, function (entry) {
25204          if (!ES.TypeIsObject(entry)) {
25205            throw new TypeError('Iterator value ' + entry + ' is not an entry object');
25206          }
25207          map.set(entry[0], entry[1]);
25208        });
25209      } else if (iterable instanceof MapConstructor) {
25210        _call(MapConstructor.prototype.forEach, iterable, function (value, key) {
25211          map.set(key, value);
25212        });
25213      } else {
25214        var iter, adder;
25215        if (!isNullOrUndefined(iterable)) {
25216          adder = map.set;
25217          if (!ES.IsCallable(adder)) { throw new TypeError('bad map'); }
25218          iter = ES.GetIterator(iterable);
25219        }
25220        if (typeof iter !== 'undefined') {
25221          while (true) {
25222            var next = ES.IteratorStep(iter);
25223            if (next === false) { break; }
25224            var nextItem = next.value;
25225            try {
25226              if (!ES.TypeIsObject(nextItem)) {
25227                throw new TypeError('Iterator value ' + nextItem + ' is not an entry object');
25228              }
25229              _call(adder, map, nextItem[0], nextItem[1]);
25230            } catch (e) {
25231              ES.IteratorClose(iter, true);
25232              throw e;
25233            }
25234          }
25235        }
25236      }
25237    };
25238    var addIterableToSet = function addIterableToSet(SetConstructor, set, iterable) {
25239      if (isArray(iterable) || Type.string(iterable)) {
25240        _forEach(iterable, function (value) {
25241          set.add(value);
25242        });
25243      } else if (iterable instanceof SetConstructor) {
25244        _call(SetConstructor.prototype.forEach, iterable, function (value) {
25245          set.add(value);
25246        });
25247      } else {
25248        var iter, adder;
25249        if (!isNullOrUndefined(iterable)) {
25250          adder = set.add;
25251          if (!ES.IsCallable(adder)) { throw new TypeError('bad set'); }
25252          iter = ES.GetIterator(iterable);
25253        }
25254        if (typeof iter !== 'undefined') {
25255          while (true) {
25256            var next = ES.IteratorStep(iter);
25257            if (next === false) { break; }
25258            var nextValue = next.value;
25259            try {
25260              _call(adder, set, nextValue);
25261            } catch (e) {
25262              ES.IteratorClose(iter, true);
25263              throw e;
25264            }
25265          }
25266        }
25267      }
25268    };
25269
25270    var collectionShims = {
25271      Map: (function () {
25272
25273        var empty = {};
25274
25275        var MapEntry = function MapEntry(key, value) {
25276          this.key = key;
25277          this.value = value;
25278          this.next = null;
25279          this.prev = null;
25280        };
25281
25282        MapEntry.prototype.isRemoved = function isRemoved() {
25283          return this.key === empty;
25284        };
25285
25286        var isMap = function isMap(map) {
25287          return !!map._es6map;
25288        };
25289
25290        var requireMapSlot = function requireMapSlot(map, method) {
25291          if (!ES.TypeIsObject(map) || !isMap(map)) {
25292            throw new TypeError('Method Map.prototype.' + method + ' called on incompatible receiver ' + ES.ToString(map));
25293          }
25294        };
25295
25296        var MapIterator = function MapIterator(map, kind) {
25297          requireMapSlot(map, '[[MapIterator]]');
25298          this.head = map._head;
25299          this.i = this.head;
25300          this.kind = kind;
25301        };
25302
25303        MapIterator.prototype = {
25304          isMapIterator: true,
25305          next: function next() {
25306            if (!this.isMapIterator) {
25307              throw new TypeError('Not a MapIterator');
25308            }
25309            var i = this.i;
25310            var kind = this.kind;
25311            var head = this.head;
25312            if (typeof this.i === 'undefined') {
25313              return iteratorResult();
25314            }
25315            while (i.isRemoved() && i !== head) {
25316              // back up off of removed entries
25317              i = i.prev;
25318            }
25319            // advance to next unreturned element.
25320            var result;
25321            while (i.next !== head) {
25322              i = i.next;
25323              if (!i.isRemoved()) {
25324                if (kind === 'key') {
25325                  result = i.key;
25326                } else if (kind === 'value') {
25327                  result = i.value;
25328                } else {
25329                  result = [i.key, i.value];
25330                }
25331                this.i = i;
25332                return iteratorResult(result);
25333              }
25334            }
25335            // once the iterator is done, it is done forever.
25336            this.i = void 0;
25337            return iteratorResult();
25338          }
25339        };
25340        addIterator(MapIterator.prototype);
25341
25342        var Map$prototype;
25343        var MapShim = function Map() {
25344          if (!(this instanceof Map)) {
25345            throw new TypeError('Constructor Map requires "new"');
25346          }
25347          if (this && this._es6map) {
25348            throw new TypeError('Bad construction');
25349          }
25350          var map = emulateES6construct(this, Map, Map$prototype, {
25351            _es6map: true,
25352            _head: null,
25353            _map: OrigMap ? new OrigMap() : null,
25354            _size: 0,
25355            _storage: emptyObject()
25356          });
25357
25358          var head = new MapEntry(null, null);
25359          // circular doubly-linked list.
25360          /* eslint no-multi-assign: 1 */
25361          head.next = head.prev = head;
25362          map._head = head;
25363
25364          // Optionally initialize map from iterable
25365          if (arguments.length > 0) {
25366            addIterableToMap(Map, map, arguments[0]);
25367          }
25368          return map;
25369        };
25370        Map$prototype = MapShim.prototype;
25371
25372        Value.getter(Map$prototype, 'size', function () {
25373          if (typeof this._size === 'undefined') {
25374            throw new TypeError('size method called on incompatible Map');
25375          }
25376          return this._size;
25377        });
25378
25379        defineProperties(Map$prototype, {
25380          get: function get(key) {
25381            requireMapSlot(this, 'get');
25382            var entry;
25383            var fkey = fastkey(key, true);
25384            if (fkey !== null) {
25385              // fast O(1) path
25386              entry = this._storage[fkey];
25387              if (entry) {
25388                return entry.value;
25389              } else {
25390                return;
25391              }
25392            }
25393            if (this._map) {
25394              // fast object key path
25395              entry = origMapGet.call(this._map, key);
25396              if (entry) {
25397                return entry.value;
25398              } else {
25399                return;
25400              }
25401            }
25402            var head = this._head;
25403            var i = head;
25404            while ((i = i.next) !== head) {
25405              if (ES.SameValueZero(i.key, key)) {
25406                return i.value;
25407              }
25408            }
25409          },
25410
25411          has: function has(key) {
25412            requireMapSlot(this, 'has');
25413            var fkey = fastkey(key, true);
25414            if (fkey !== null) {
25415              // fast O(1) path
25416              return typeof this._storage[fkey] !== 'undefined';
25417            }
25418            if (this._map) {
25419              // fast object key path
25420              return origMapHas.call(this._map, key);
25421            }
25422            var head = this._head;
25423            var i = head;
25424            while ((i = i.next) !== head) {
25425              if (ES.SameValueZero(i.key, key)) {
25426                return true;
25427              }
25428            }
25429            return false;
25430          },
25431
25432          set: function set(key, value) {
25433            requireMapSlot(this, 'set');
25434            var head = this._head;
25435            var i = head;
25436            var entry;
25437            var fkey = fastkey(key, true);
25438            if (fkey !== null) {
25439              // fast O(1) path
25440              if (typeof this._storage[fkey] !== 'undefined') {
25441                this._storage[fkey].value = value;
25442                return this;
25443              } else {
25444                entry = this._storage[fkey] = new MapEntry(key, value); /* eslint no-multi-assign: 1 */
25445                i = head.prev;
25446                // fall through
25447              }
25448            } else if (this._map) {
25449              // fast object key path
25450              if (origMapHas.call(this._map, key)) {
25451                origMapGet.call(this._map, key).value = value;
25452              } else {
25453                entry = new MapEntry(key, value);
25454                origMapSet.call(this._map, key, entry);
25455                i = head.prev;
25456                // fall through
25457              }
25458            }
25459            while ((i = i.next) !== head) {
25460              if (ES.SameValueZero(i.key, key)) {
25461                i.value = value;
25462                return this;
25463              }
25464            }
25465            entry = entry || new MapEntry(key, value);
25466            if (ES.SameValue(-0, key)) {
25467              entry.key = +0; // coerce -0 to +0 in entry
25468            }
25469            entry.next = this._head;
25470            entry.prev = this._head.prev;
25471            entry.prev.next = entry;
25472            entry.next.prev = entry;
25473            this._size += 1;
25474            return this;
25475          },
25476
25477          'delete': function (key) {
25478            requireMapSlot(this, 'delete');
25479            var head = this._head;
25480            var i = head;
25481            var fkey = fastkey(key, true);
25482            if (fkey !== null) {
25483              // fast O(1) path
25484              if (typeof this._storage[fkey] === 'undefined') {
25485                return false;
25486              }
25487              i = this._storage[fkey].prev;
25488              delete this._storage[fkey];
25489              // fall through
25490            } else if (this._map) {
25491              // fast object key path
25492              if (!origMapHas.call(this._map, key)) {
25493                return false;
25494              }
25495              i = origMapGet.call(this._map, key).prev;
25496              origMapDelete.call(this._map, key);
25497              // fall through
25498            }
25499            while ((i = i.next) !== head) {
25500              if (ES.SameValueZero(i.key, key)) {
25501                i.key = empty;
25502                i.value = empty;
25503                i.prev.next = i.next;
25504                i.next.prev = i.prev;
25505                this._size -= 1;
25506                return true;
25507              }
25508            }
25509            return false;
25510          },
25511
25512          clear: function clear() {
25513            /* eslint no-multi-assign: 1 */
25514            requireMapSlot(this, 'clear');
25515            this._map = OrigMap ? new OrigMap() : null;
25516            this._size = 0;
25517            this._storage = emptyObject();
25518            var head = this._head;
25519            var i = head;
25520            var p = i.next;
25521            while ((i = p) !== head) {
25522              i.key = empty;
25523              i.value = empty;
25524              p = i.next;
25525              i.next = i.prev = head;
25526            }
25527            head.next = head.prev = head;
25528          },
25529
25530          keys: function keys() {
25531            requireMapSlot(this, 'keys');
25532            return new MapIterator(this, 'key');
25533          },
25534
25535          values: function values() {
25536            requireMapSlot(this, 'values');
25537            return new MapIterator(this, 'value');
25538          },
25539
25540          entries: function entries() {
25541            requireMapSlot(this, 'entries');
25542            return new MapIterator(this, 'key+value');
25543          },
25544
25545          forEach: function forEach(callback) {
25546            requireMapSlot(this, 'forEach');
25547            var context = arguments.length > 1 ? arguments[1] : null;
25548            var it = this.entries();
25549            for (var entry = it.next(); !entry.done; entry = it.next()) {
25550              if (context) {
25551                _call(callback, context, entry.value[1], entry.value[0], this);
25552              } else {
25553                callback(entry.value[1], entry.value[0], this);
25554              }
25555            }
25556          }
25557        });
25558        addIterator(Map$prototype, Map$prototype.entries);
25559
25560        return MapShim;
25561      }()),
25562
25563      Set: (function () {
25564        var isSet = function isSet(set) {
25565          return set._es6set && typeof set._storage !== 'undefined';
25566        };
25567        var requireSetSlot = function requireSetSlot(set, method) {
25568          if (!ES.TypeIsObject(set) || !isSet(set)) {
25569            // https://github.com/paulmillr/es6-shim/issues/176
25570            throw new TypeError('Set.prototype.' + method + ' called on incompatible receiver ' + ES.ToString(set));
25571          }
25572        };
25573
25574        // Creating a Map is expensive.  To speed up the common case of
25575        // Sets containing only string or numeric keys, we use an object
25576        // as backing storage and lazily create a full Map only when
25577        // required.
25578        var Set$prototype;
25579        var SetShim = function Set() {
25580          if (!(this instanceof Set)) {
25581            throw new TypeError('Constructor Set requires "new"');
25582          }
25583          if (this && this._es6set) {
25584            throw new TypeError('Bad construction');
25585          }
25586          var set = emulateES6construct(this, Set, Set$prototype, {
25587            _es6set: true,
25588            '[[SetData]]': null,
25589            _storage: emptyObject()
25590          });
25591          if (!set._es6set) {
25592            throw new TypeError('bad set');
25593          }
25594
25595          // Optionally initialize Set from iterable
25596          if (arguments.length > 0) {
25597            addIterableToSet(Set, set, arguments[0]);
25598          }
25599          return set;
25600        };
25601        Set$prototype = SetShim.prototype;
25602
25603        var decodeKey = function (key) {
25604          var k = key;
25605          if (k === '^null') {
25606            return null;
25607          } else if (k === '^undefined') {
25608            return void 0;
25609          } else {
25610            var first = k.charAt(0);
25611            if (first === '$') {
25612              return _strSlice(k, 1);
25613            } else if (first === 'n') {
25614              return +_strSlice(k, 1);
25615            } else if (first === 'b') {
25616              return k === 'btrue';
25617            }
25618          }
25619          return +k;
25620        };
25621        // Switch from the object backing storage to a full Map.
25622        var ensureMap = function ensureMap(set) {
25623          if (!set['[[SetData]]']) {
25624            var m = new collectionShims.Map();
25625            set['[[SetData]]'] = m;
vendor: 9,912 bytes, lines 25626-25886
25626            _forEach(keys(set._storage), function (key) {
25627              var k = decodeKey(key);
25628              m.set(k, k);
25629            });
25630            set['[[SetData]]'] = m;
25631          }
25632          set._storage = null; // free old backing storage
25633        };
25634
25635        Value.getter(SetShim.prototype, 'size', function () {
25636          requireSetSlot(this, 'size');
25637          if (this._storage) {
25638            return keys(this._storage).length;
25639          }
25640          ensureMap(this);
25641          return this['[[SetData]]'].size;
25642        });
25643
25644        defineProperties(SetShim.prototype, {
25645          has: function has(key) {
25646            requireSetSlot(this, 'has');
25647            var fkey;
25648            if (this._storage && (fkey = fastkey(key)) !== null) {
25649              return !!this._storage[fkey];
25650            }
25651            ensureMap(this);
25652            return this['[[SetData]]'].has(key);
25653          },
25654
25655          add: function add(key) {
25656            requireSetSlot(this, 'add');
25657            var fkey;
25658            if (this._storage && (fkey = fastkey(key)) !== null) {
25659              this._storage[fkey] = true;
25660              return this;
25661            }
25662            ensureMap(this);
25663            this['[[SetData]]'].set(key, key);
25664            return this;
25665          },
25666
25667          'delete': function (key) {
25668            requireSetSlot(this, 'delete');
25669            var fkey;
25670            if (this._storage && (fkey = fastkey(key)) !== null) {
25671              var hasFKey = _hasOwnProperty(this._storage, fkey);
25672              return (delete this._storage[fkey]) && hasFKey;
25673            }
25674            ensureMap(this);
25675            return this['[[SetData]]']['delete'](key);
25676          },
25677
25678          clear: function clear() {
25679            requireSetSlot(this, 'clear');
25680            if (this._storage) {
25681              this._storage = emptyObject();
25682            }
25683            if (this['[[SetData]]']) {
25684              this['[[SetData]]'].clear();
25685            }
25686          },
25687
25688          values: function values() {
25689            requireSetSlot(this, 'values');
25690            ensureMap(this);
25691            return new SetIterator(this['[[SetData]]'].values());
25692          },
25693
25694          entries: function entries() {
25695            requireSetSlot(this, 'entries');
25696            ensureMap(this);
25697            return new SetIterator(this['[[SetData]]'].entries());
25698          },
25699
25700          forEach: function forEach(callback) {
25701            requireSetSlot(this, 'forEach');
25702            var context = arguments.length > 1 ? arguments[1] : null;
25703            var entireSet = this;
25704            ensureMap(entireSet);
25705            this['[[SetData]]'].forEach(function (value, key) {
25706              if (context) {
25707                _call(callback, context, key, key, entireSet);
25708              } else {
25709                callback(key, key, entireSet);
25710              }
25711            });
25712          }
25713        });
25714        defineProperty(SetShim.prototype, 'keys', SetShim.prototype.values, true);
25715        addIterator(SetShim.prototype, SetShim.prototype.values);
25716
25717        var SetIterator = function SetIterator(it) {
25718          this.it = it;
25719        };
25720        SetIterator.prototype = {
25721          isSetIterator: true,
25722          next: function next() {
25723            if (!this.isSetIterator) {
25724              throw new TypeError('Not a SetIterator');
25725            }
25726            return this.it.next();
25727          }
25728        };
25729        addIterator(SetIterator.prototype);
25730
25731        return SetShim;
25732      }())
25733    };
25734
25735    var isGoogleTranslate = globals.Set && !Set.prototype['delete'] && Set.prototype.remove && Set.prototype.items && Set.prototype.map && Array.isArray(new Set().keys);
25736    if (isGoogleTranslate) {
25737      // special-case force removal of wildly invalid Set implementation in Google Translate iframes
25738      // see https://github.com/paulmillr/es6-shim/issues/438 / https://twitter.com/ljharb/status/849335573114363904
25739      globals.Set = collectionShims.Set;
25740    }
25741    if (globals.Map || globals.Set) {
25742      // Safari 8, for example, doesn't accept an iterable.
25743      var mapAcceptsArguments = valueOrFalseIfThrows(function () { return new Map([[1, 2]]).get(1) === 2; });
25744      if (!mapAcceptsArguments) {
25745        globals.Map = function Map() {
25746          if (!(this instanceof Map)) {
25747            throw new TypeError('Constructor Map requires "new"');
25748          }
25749          var m = new OrigMap();
25750          if (arguments.length > 0) {
25751            addIterableToMap(Map, m, arguments[0]);
25752          }
25753          delete m.constructor;
25754          Object.setPrototypeOf(m, globals.Map.prototype);
25755          return m;
25756        };
25757        globals.Map.prototype = create(OrigMap.prototype);
25758        defineProperty(globals.Map.prototype, 'constructor', globals.Map, true);
25759        Value.preserveToString(globals.Map, OrigMap);
25760      }
25761      var testMap = new Map();
25762      var mapUsesSameValueZero = (function () {
25763        // Chrome 38-42, node 0.11/0.12, iojs 1/2 also have a bug when the Map has a size > 4
25764        var m = new Map([[1, 0], [2, 0], [3, 0], [4, 0]]);
25765        m.set(-0, m);
25766        return m.get(0) === m && m.get(-0) === m && m.has(0) && m.has(-0);
25767      }());
25768      var mapSupportsChaining = testMap.set(1, 2) === testMap;
25769      if (!mapUsesSameValueZero || !mapSupportsChaining) {
25770        overrideNative(Map.prototype, 'set', function set(k, v) {
25771          _call(origMapSet, this, k === 0 ? 0 : k, v);
25772          return this;
25773        });
25774      }
25775      if (!mapUsesSameValueZero) {
25776        defineProperties(Map.prototype, {
25777          get: function get(k) {
25778            return _call(origMapGet, this, k === 0 ? 0 : k);
25779          },
25780          has: function has(k) {
25781            return _call(origMapHas, this, k === 0 ? 0 : k);
25782          }
25783        }, true);
25784        Value.preserveToString(Map.prototype.get, origMapGet);
25785        Value.preserveToString(Map.prototype.has, origMapHas);
25786      }
25787      var testSet = new Set();
25788      var setUsesSameValueZero = Set.prototype['delete'] && Set.prototype.add && Set.prototype.has && (function (s) {
25789        s['delete'](0);
25790        s.add(-0);
25791        return !s.has(0);
25792      }(testSet));
25793      var setSupportsChaining = testSet.add(1) === testSet;
25794      if (!setUsesSameValueZero || !setSupportsChaining) {
25795        var origSetAdd = Set.prototype.add;
25796        Set.prototype.add = function add(v) {
25797          _call(origSetAdd, this, v === 0 ? 0 : v);
25798          return this;
25799        };
25800        Value.preserveToString(Set.prototype.add, origSetAdd);
25801      }
25802      if (!setUsesSameValueZero) {
25803        var origSetHas = Set.prototype.has;
25804        Set.prototype.has = function has(v) {
25805          return _call(origSetHas, this, v === 0 ? 0 : v);
25806        };
25807        Value.preserveToString(Set.prototype.has, origSetHas);
25808        var origSetDel = Set.prototype['delete'];
25809        Set.prototype['delete'] = function SetDelete(v) {
25810          return _call(origSetDel, this, v === 0 ? 0 : v);
25811        };
25812        Value.preserveToString(Set.prototype['delete'], origSetDel);
25813      }
25814      var mapSupportsSubclassing = supportsSubclassing(globals.Map, function (M) {
25815        var m = new M([]);
25816        // Firefox 32 is ok with the instantiating the subclass but will
25817        // throw when the map is used.
25818        m.set(42, 42);
25819        return m instanceof M;
25820      });
25821      // without Object.setPrototypeOf, subclassing is not possible
25822      var mapFailsToSupportSubclassing = Object.setPrototypeOf && !mapSupportsSubclassing;
25823      var mapRequiresNew = (function () {
25824        try {
25825          return !(globals.Map() instanceof globals.Map);
25826        } catch (e) {
25827          return e instanceof TypeError;
25828        }
25829      }());
25830      if (globals.Map.length !== 0 || mapFailsToSupportSubclassing || !mapRequiresNew) {
25831        globals.Map = function Map() {
25832          if (!(this instanceof Map)) {
25833            throw new TypeError('Constructor Map requires "new"');
25834          }
25835          var m = new OrigMap();
25836          if (arguments.length > 0) {
25837            addIterableToMap(Map, m, arguments[0]);
25838          }
25839          delete m.constructor;
25840          Object.setPrototypeOf(m, Map.prototype);
25841          return m;
25842        };
25843        globals.Map.prototype = OrigMap.prototype;
25844        defineProperty(globals.Map.prototype, 'constructor', globals.Map, true);
25845        Value.preserveToString(globals.Map, OrigMap);
25846      }
25847      var setSupportsSubclassing = supportsSubclassing(globals.Set, function (S) {
25848        var s = new S([]);
25849        s.add(42, 42);
25850        return s instanceof S;
25851      });
25852      // without Object.setPrototypeOf, subclassing is not possible
25853      var setFailsToSupportSubclassing = Object.setPrototypeOf && !setSupportsSubclassing;
25854      var setRequiresNew = (function () {
25855        try {
25856          return !(globals.Set() instanceof globals.Set);
25857        } catch (e) {
25858          return e instanceof TypeError;
25859        }
25860      }());
25861      if (globals.Set.length !== 0 || setFailsToSupportSubclassing || !setRequiresNew) {
25862        var OrigSet = globals.Set;
25863        globals.Set = function Set() {
25864          if (!(this instanceof Set)) {
25865            throw new TypeError('Constructor Set requires "new"');
25866          }
25867          var s = new OrigSet();
25868          if (arguments.length > 0) {
25869            addIterableToSet(Set, s, arguments[0]);
25870          }
25871          delete s.constructor;
25872          Object.setPrototypeOf(s, Set.prototype);
25873          return s;
25874        };
25875        globals.Set.prototype = OrigSet.prototype;
25876        defineProperty(globals.Set.prototype, 'constructor', globals.Set, true);
25877        Value.preserveToString(globals.Set, OrigSet);
25878      }
25879      var newMap = new globals.Map();
25880      var mapIterationThrowsStopIterator = !valueOrFalseIfThrows(function () {
25881        return newMap.keys().next().done;
25882      });
25883      /*
25884        - In Firefox < 23, Map#size is a function.
25885        - In all current Firefox, Set#entries/keys/values & Map#clear do not exist
25886        - https://bugzilla.mozilla.org/show_bug.cgi?id=869996
vendor: 11,903 bytes, lines 25887-26249
25887        - In Firefox 24, Map and Set do not implement forEach
25888        - In Firefox 25 at least, Map and Set are callable without "new"
25889      */
25890      if (
25891        typeof globals.Map.prototype.clear !== 'function' ||
25892        new globals.Set().size !== 0 ||
25893        newMap.size !== 0 ||
25894        typeof globals.Map.prototype.keys !== 'function' ||
25895        typeof globals.Set.prototype.keys !== 'function' ||
25896        typeof globals.Map.prototype.forEach !== 'function' ||
25897        typeof globals.Set.prototype.forEach !== 'function' ||
25898        isCallableWithoutNew(globals.Map) ||
25899        isCallableWithoutNew(globals.Set) ||
25900        typeof newMap.keys().next !== 'function' || // Safari 8
25901        mapIterationThrowsStopIterator || // Firefox 25
25902        !mapSupportsSubclassing
25903      ) {
25904        defineProperties(globals, {
25905          Map: collectionShims.Map,
25906          Set: collectionShims.Set
25907        }, true);
25908      }
25909
25910      if (globals.Set.prototype.keys !== globals.Set.prototype.values) {
25911        // Fixed in WebKit with https://bugs.webkit.org/show_bug.cgi?id=144190
25912        defineProperty(globals.Set.prototype, 'keys', globals.Set.prototype.values, true);
25913      }
25914
25915      // Shim incomplete iterator implementations.
25916      addIterator(Object.getPrototypeOf((new globals.Map()).keys()));
25917      addIterator(Object.getPrototypeOf((new globals.Set()).keys()));
25918
25919      if (functionsHaveNames && globals.Set.prototype.has.name !== 'has') {
25920        // Microsoft Edge v0.11.10074.0 is missing a name on Set#has
25921        var anonymousSetHas = globals.Set.prototype.has;
25922        overrideNative(globals.Set.prototype, 'has', function has(key) {
25923          return _call(anonymousSetHas, this, key);
25924        });
25925      }
25926    }
25927    defineProperties(globals, collectionShims);
25928    addDefaultSpecies(globals.Map);
25929    addDefaultSpecies(globals.Set);
25930  }
25931
25932  var throwUnlessTargetIsObject = function throwUnlessTargetIsObject(target) {
25933    if (!ES.TypeIsObject(target)) {
25934      throw new TypeError('target must be an object');
25935    }
25936  };
25937
25938  // Some Reflect methods are basically the same as
25939  // those on the Object global, except that a TypeError is thrown if
25940  // target isn't an object. As well as returning a boolean indicating
25941  // the success of the operation.
25942  var ReflectShims = {
25943    // Apply method in a functional form.
25944    apply: function apply() {
25945      return ES.Call(ES.Call, null, arguments);
25946    },
25947
25948    // New operator in a functional form.
25949    construct: function construct(constructor, args) {
25950      if (!ES.IsConstructor(constructor)) {
25951        throw new TypeError('First argument must be a constructor.');
25952      }
25953      var newTarget = arguments.length > 2 ? arguments[2] : constructor;
25954      if (!ES.IsConstructor(newTarget)) {
25955        throw new TypeError('new.target must be a constructor.');
25956      }
25957      return ES.Construct(constructor, args, newTarget, 'internal');
25958    },
25959
25960    // When deleting a non-existent or configurable property,
25961    // true is returned.
25962    // When attempting to delete a non-configurable property,
25963    // it will return false.
25964    deleteProperty: function deleteProperty(target, key) {
25965      throwUnlessTargetIsObject(target);
25966      if (supportsDescriptors) {
25967        var desc = Object.getOwnPropertyDescriptor(target, key);
25968
25969        if (desc && !desc.configurable) {
25970          return false;
25971        }
25972      }
25973
25974      // Will return true.
25975      return delete target[key];
25976    },
25977
25978    has: function has(target, key) {
25979      throwUnlessTargetIsObject(target);
25980      return key in target;
25981    }
25982  };
25983
25984  if (Object.getOwnPropertyNames) {
25985    Object.assign(ReflectShims, {
25986      // Basically the result of calling the internal [[OwnPropertyKeys]].
25987      // Concatenating propertyNames and propertySymbols should do the trick.
25988      // This should continue to work together with a Symbol shim
25989      // which overrides Object.getOwnPropertyNames and implements
25990      // Object.getOwnPropertySymbols.
25991      ownKeys: function ownKeys(target) {
25992        throwUnlessTargetIsObject(target);
25993        var keys = Object.getOwnPropertyNames(target);
25994
25995        if (ES.IsCallable(Object.getOwnPropertySymbols)) {
25996          _pushApply(keys, Object.getOwnPropertySymbols(target));
25997        }
25998
25999        return keys;
26000      }
26001    });
26002  }
26003
26004  var callAndCatchException = function ConvertExceptionToBoolean(func) {
26005    return !throwsError(func);
26006  };
26007
26008  if (Object.preventExtensions) {
26009    Object.assign(ReflectShims, {
26010      isExtensible: function isExtensible(target) {
26011        throwUnlessTargetIsObject(target);
26012        return Object.isExtensible(target);
26013      },
26014      preventExtensions: function preventExtensions(target) {
26015        throwUnlessTargetIsObject(target);
26016        return callAndCatchException(function () {
26017          return Object.preventExtensions(target);
26018        });
26019      }
26020    });
26021  }
26022
26023  if (supportsDescriptors) {
26024    var internalGet = function get(target, key, receiver) {
26025      var desc = Object.getOwnPropertyDescriptor(target, key);
26026
26027      if (!desc) {
26028        var parent = Object.getPrototypeOf(target);
26029
26030        if (parent === null) {
26031          return void 0;
26032        }
26033
26034        return internalGet(parent, key, receiver);
26035      }
26036
26037      if ('value' in desc) {
26038        return desc.value;
26039      }
26040
26041      if (desc.get) {
26042        return ES.Call(desc.get, receiver);
26043      }
26044
26045      return void 0;
26046    };
26047
26048    var internalSet = function set(target, key, value, receiver) {
26049      var desc = Object.getOwnPropertyDescriptor(target, key);
26050
26051      if (!desc) {
26052        var parent = Object.getPrototypeOf(target);
26053
26054        if (parent !== null) {
26055          return internalSet(parent, key, value, receiver);
26056        }
26057
26058        desc = {
26059          value: void 0,
26060          writable: true,
26061          enumerable: true,
26062          configurable: true
26063        };
26064      }
26065
26066      if ('value' in desc) {
26067        if (!desc.writable) {
26068          return false;
26069        }
26070
26071        if (!ES.TypeIsObject(receiver)) {
26072          return false;
26073        }
26074
26075        var existingDesc = Object.getOwnPropertyDescriptor(receiver, key);
26076
26077        if (existingDesc) {
26078          return Reflect.defineProperty(receiver, key, {
26079            value: value
26080          });
26081        } else {
26082          return Reflect.defineProperty(receiver, key, {
26083            value: value,
26084            writable: true,
26085            enumerable: true,
26086            configurable: true
26087          });
26088        }
26089      }
26090
26091      if (desc.set) {
26092        _call(desc.set, receiver, value);
26093        return true;
26094      }
26095
26096      return false;
26097    };
26098
26099    Object.assign(ReflectShims, {
26100      defineProperty: function defineProperty(target, propertyKey, attributes) {
26101        throwUnlessTargetIsObject(target);
26102        return callAndCatchException(function () {
26103          return Object.defineProperty(target, propertyKey, attributes);
26104        });
26105      },
26106
26107      getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) {
26108        throwUnlessTargetIsObject(target);
26109        return Object.getOwnPropertyDescriptor(target, propertyKey);
26110      },
26111
26112      // Syntax in a functional form.
26113      get: function get(target, key) {
26114        throwUnlessTargetIsObject(target);
26115        var receiver = arguments.length > 2 ? arguments[2] : target;
26116
26117        return internalGet(target, key, receiver);
26118      },
26119
26120      set: function set(target, key, value) {
26121        throwUnlessTargetIsObject(target);
26122        var receiver = arguments.length > 3 ? arguments[3] : target;
26123
26124        return internalSet(target, key, value, receiver);
26125      }
26126    });
26127  }
26128
26129  if (Object.getPrototypeOf) {
26130    var objectDotGetPrototypeOf = Object.getPrototypeOf;
26131    ReflectShims.getPrototypeOf = function getPrototypeOf(target) {
26132      throwUnlessTargetIsObject(target);
26133      return objectDotGetPrototypeOf(target);
26134    };
26135  }
26136
26137  if (Object.setPrototypeOf && ReflectShims.getPrototypeOf) {
26138    var willCreateCircularPrototype = function (object, lastProto) {
26139      var proto = lastProto;
26140      while (proto) {
26141        if (object === proto) {
26142          return true;
26143        }
26144        proto = ReflectShims.getPrototypeOf(proto);
26145      }
26146      return false;
26147    };
26148
26149    Object.assign(ReflectShims, {
26150      // Sets the prototype of the given object.
26151      // Returns true on success, otherwise false.
26152      setPrototypeOf: function setPrototypeOf(object, proto) {
26153        throwUnlessTargetIsObject(object);
26154        if (proto !== null && !ES.TypeIsObject(proto)) {
26155          throw new TypeError('proto must be an object or null');
26156        }
26157
26158        // If they already are the same, we're done.
26159        if (proto === Reflect.getPrototypeOf(object)) {
26160          return true;
26161        }
26162
26163        // Cannot alter prototype if object not extensible.
26164        if (Reflect.isExtensible && !Reflect.isExtensible(object)) {
26165          return false;
26166        }
26167
26168        // Ensure that we do not create a circular prototype chain.
26169        if (willCreateCircularPrototype(object, proto)) {
26170          return false;
26171        }
26172
26173        Object.setPrototypeOf(object, proto);
26174
26175        return true;
26176      }
26177    });
26178  }
26179  var defineOrOverrideReflectProperty = function (key, shim) {
26180    if (!ES.IsCallable(globals.Reflect[key])) {
26181      defineProperty(globals.Reflect, key, shim);
26182    } else {
26183      var acceptsPrimitives = valueOrFalseIfThrows(function () {
26184        globals.Reflect[key](1);
26185        globals.Reflect[key](NaN);
26186        globals.Reflect[key](true);
26187        return true;
26188      });
26189      if (acceptsPrimitives) {
26190        overrideNative(globals.Reflect, key, shim);
26191      }
26192    }
26193  };
26194  Object.keys(ReflectShims).forEach(function (key) {
26195    defineOrOverrideReflectProperty(key, ReflectShims[key]);
26196  });
26197  var originalReflectGetProto = globals.Reflect.getPrototypeOf;
26198  if (functionsHaveNames && originalReflectGetProto && originalReflectGetProto.name !== 'getPrototypeOf') {
26199    overrideNative(globals.Reflect, 'getPrototypeOf', function getPrototypeOf(target) {
26200      return _call(originalReflectGetProto, globals.Reflect, target);
26201    });
26202  }
26203  if (globals.Reflect.setPrototypeOf) {
26204    if (valueOrFalseIfThrows(function () {
26205      globals.Reflect.setPrototypeOf(1, {});
26206      return true;
26207    })) {
26208      overrideNative(globals.Reflect, 'setPrototypeOf', ReflectShims.setPrototypeOf);
26209    }
26210  }
26211  if (globals.Reflect.defineProperty) {
26212    if (!valueOrFalseIfThrows(function () {
26213      var basic = !globals.Reflect.defineProperty(1, 'test', { value: 1 });
26214      // "extensible" fails on Edge 0.12
26215      var extensible = typeof Object.preventExtensions !== 'function' || !globals.Reflect.defineProperty(Object.preventExtensions({}), 'test', {});
26216      return basic && extensible;
26217    })) {
26218      overrideNative(globals.Reflect, 'defineProperty', ReflectShims.defineProperty);
26219    }
26220  }
26221  if (globals.Reflect.construct) {
26222    if (!valueOrFalseIfThrows(function () {
26223      var F = function F() {};
26224      return globals.Reflect.construct(function () {}, [], F) instanceof F;
26225    })) {
26226      overrideNative(globals.Reflect, 'construct', ReflectShims.construct);
26227    }
26228  }
26229
26230  if (String(new Date(NaN)) !== 'Invalid Date') {
26231    var dateToString = Date.prototype.toString;
26232    var shimmedDateToString = function toString() {
26233      var valueOf = +this;
26234      if (valueOf !== valueOf) {
26235        return 'Invalid Date';
26236      }
26237      return ES.Call(dateToString, this);
26238    };
26239    overrideNative(Date.prototype, 'toString', shimmedDateToString);
26240  }
26241
26242  // Annex B HTML methods
26243  // http://www.ecma-international.org/ecma-262/6.0/#sec-additional-properties-of-the-string.prototype-object
26244  var stringHTMLshims = {
26245    anchor: function anchor(name) { return ES.CreateHTML(this, 'a', 'name', name); },
26246    big: function big() { return ES.CreateHTML(this, 'big', '', ''); },
26247    blink: function blink() { return ES.CreateHTML(this, 'blink', '', ''); },
26248    bold: function bold() { return ES.CreateHTML(this, 'b', '', ''); },
26249    fixed: function fixed() { return ES.CreateHTML(this, 'tt', '', ''); },
26250    fontcolor: function fontcolor(color) { return ES.CreateHTML(this, 'font', 'color', color); },
26251    fontsize: function fontsize(size) { return ES.CreateHTML(this, 'font', 'size', size); },
26252    italics: function italics() { return ES.CreateHTML(this, 'i', '', ''); },
26253    link: function link(url) { return ES.CreateHTML(this, 'a', 'href', url); },
26254    small: function small() { return ES.CreateHTML(this, 'small', '', ''); },
26255    strike: function strike() { return ES.CreateHTML(this, 'strike', '', ''); },
26256    sub: function sub() { return ES.CreateHTML(this, 'sub', '', ''); },
26257    sup: function sub() { return ES.CreateHTML(this, 'sup', '', ''); }
26258  };
26259  _forEach(Object.keys(stringHTMLshims), function (key) {
26260    var method = String.prototype[key];
26261    var shouldOverwrite = false;
26262    if (ES.IsCallable(method)) {
26263      var output = _call(method, '', ' " ');
26264      var quotesCount = _concat([], output.match(/"/g)).length;
26265      shouldOverwrite = output !== output.toLowerCase() || quotesCount > 2;
26266    } else {
26267      shouldOverwrite = true;
26268    }
26269    if (shouldOverwrite) {
26270      overrideNative(String.prototype, key, stringHTMLshims[key]);
26271    }
26272  });
26273
26274  var JSONstringifiesSymbols = (function () {
26275    // Microsoft Edge v0.12 stringifies Symbols incorrectly
26276    if (!hasSymbols) { return false; } // Symbols are not supported
26277    var stringify = typeof JSON === 'object' && typeof JSON.stringify === 'function' ? JSON.stringify : null;
26278    if (!stringify) { return false; } // JSON.stringify is not supported
26279    if (typeof stringify(Symbol()) !== 'undefined') { return true; } // Symbols should become `undefined`
26280    if (stringify([Symbol()]) !== '[null]') { return true; } // Symbols in arrays should become `null`
26281    var obj = { a: Symbol() };
26282    obj[Symbol()] = true;
26283    if (stringify(obj) !== '{}') { return true; } // Symbol-valued keys *and* Symbol-valued properties should be omitted
26284    return false;
26285  }());
26286  var JSONstringifyAcceptsObjectSymbol = valueOrFalseIfThrows(function () {
26287    // Chrome 45 throws on stringifying object symbols
26288    if (!hasSymbols) { return true; } // Symbols are not supported
26289    return JSON.stringify(Object(Symbol())) === '{}' && JSON.stringify([Object(Symbol())]) === '[{}]';
26290  });
26291  if (JSONstringifiesSymbols || !JSONstringifyAcceptsObjectSymbol) {
26292    var origStringify = JSON.stringify;
26293    overrideNative(JSON, 'stringify', function stringify(value) {
26294      if (typeof value === 'symbol') { return; }
26295      var replacer;
26296      if (arguments.length > 1) {
26297        replacer = arguments[1];
26298      }
26299      var args = [value];
26300      if (!isArray(replacer)) {
26301        var replaceFn = ES.IsCallable(replacer) ? replacer : null;
26302        var wrappedReplacer = function (key, val) {
26303          var parsedValue = replaceFn ? _call(replaceFn, this, key, val) : val;
26304          if (typeof parsedValue !== 'symbol') {
26305            if (Type.symbol(parsedValue)) {
26306              return assignTo({})(parsedValue);
26307            } else {
26308              return parsedValue;
26309            }
26310          }
26311        };
26312        args.push(wrappedReplacer);
26313      } else {
26314        // create wrapped replacer that handles an array replacer?
26315        args.push(replacer);
26316      }
26317      if (arguments.length > 2) {
26318        args.push(arguments[2]);
26319      }
26320      return origStringify.apply(this, args);
26321    });
26322  }
26323
26324  return globals;
26325}));
26326
26327(function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?factory(exports):typeof define==="function"&&define.amd?define(["exports"],factory):(global=global||self,factory(global.FormValidation={}))})(this,(function(exports){"use strict";function t(t){var e=t.length;var l=[[0,1,2,3,4,5,6,7,8,9],[0,2,4,6,8,1,3,5,7,9]];var n=0;var r=0;while(e--){r+=l[n][parseInt(t.charAt(e),10)];n=1-n}return r%10===0&&r>0}function t$1(t){var e=t.length;var n=5;for(var r=0;r<e;r++){n=((n||10)*2%11+parseInt(t.charAt(r),10))%10}return n===1}function t$2(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";var n=t.length;var o=e.length;var l=Math.floor(o/2);for(var r=0;r<n;r++){l=((l||o)*2%(o+1)+e.indexOf(t.charAt(r)))%o}return l===1}function t$3(t){var e=[[0,1,2,3,4,5,6,7,8,9],[1,2,3,4,0,6,7,8,9,5],[2,3,4,0,1,7,8,9,5,6],[3,4,0,1,2,8,9,5,6,7],[4,0,1,2,3,9,5,6,7,8],[5,9,8,7,6,0,4,3,2,1],[6,5,9,8,7,1,0,4,3,2],[7,6,5,9,8,2,1,0,4,3],[8,7,6,5,9,3,2,1,0,4],[9,8,7,6,5,4,3,2,1,0]];var n=[[0,1,2,3,4,5,6,7,8,9],[1,5,7,6,2,8,3,0,9,4],[5,8,0,3,7,9,6,1,4,2],[8,9,1,6,0,4,3,5,2,7],[9,4,5,3,1,2,6,8,7,0],[4,2,8,6,5,7,3,9,0,1],[2,7,9,3,8,0,6,4,1,5],[7,0,4,6,9,1,3,2,5,8]];var o=t.reverse();var r=0;for(var _t=0;_t<o.length;_t++){r=e[r][n[_t%8][o[_t]]]}return r===0}var index={luhn:t,mod11And10:t$1,mod37And36:t$2,verhoeff:t$3};function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}
26327function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})));return true}catch(e){return false}}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _possibleConstructorReturn(self,call){if(call&&(typeof call==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function(){};return{s:F,n:function(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]}},e:function(e){throw e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var normalCompletion=true,didErr=false,err;return{s:function(){it=o[Symbol.iterator]()},n:function(){var step=it.next();normalCompletion=step.done;return step},e:function(e){didErr=true;err=e},f:function(){try{if(!normalCompletion&&it.return!=null)it.return()}finally{if(didErr)throw err}}}}function s(){return{fns:{},clear:function clear(){this.fns={}},emit:function emit(s){for(var _len=arguments.length,f=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){f[_key-1]=arguments[_key]}(this.fns[s]||[]).map((function(s){return s.apply(s,f)}))},off:function off(s,f){if(this.fns[s]){var n=this.fns[s].indexOf(f);if(n>=0){this.fns[s].splice(n,1)}}},on:function on(s,f){(this.fns[s]=this.fns[s]||[]).push(f)}}}function t$4(){return{filters:{},add:function add(t,e){(this.filters[t]=this.filters[t]||[]).push(e)},clear:function clear(){this.filters={}},execute:function execute(t,e,i){if(!this.filters[t]||!this.filters[t].length){return e}var s=e;var r=this.filters[t];var l=r.length;for(var _t=0;_t<l;_t++){s=r[_t].apply(s,i)}return s},remove:function remove(t,e){if(this.filters[t]){this.filters[t]=this.filters[t].filter((function(t){return t!==e}))}}}}function e(e,t,r,n){var o=(r.getAttribute("type")||"").toLowerCase();var c=r.tagName.toLowerCase();if(c==="textarea"){return r.value}if(c==="select"){var _e=r;var _t=_e.selectedIndex;return _t>=0?_e.options.item(_t).value:""}if(c==="input"){if("radio"===o||"checkbox"===o){var _e2=n.filter((function(e){return e.checked})).length;return _e2===0?"":_e2+""}else{return r.value}}return""}function r(r,e){var t=Array.isArray(e)?e:[e];var a=r;t.forEach((function(r){a=a.replace("%s",r)}));return a}function s$1(){var s=function s(e){return parseFloat("".concat(e).replace(",","."))};return{validate:function validate(a){var t=a.value;if(t===""){return{valid:true}}var n=Object.assign({},{inclusive:true,message:""},a.options);var l=s(n.min);var o=s(n.max);return n.inclusive?{message:r(a.l10n?n.message||a.l10n.between["default"]:n.message,["".concat(l),"".concat(o)]),valid:parseFloat(t)>=l&&parseFloat(t)<=o}:{message:r(a.l10n?n.message||a.l10n.between.notInclusive:n.message,["".concat(l),"".concat(o)]),valid:parseFloat(t)>l&&parseFloat(t)<o}}}}function t$5(){return{validate:function validate(t){return{valid:true}}}}function t$6(t,n){if("function"===typeof t){return t.apply(this,n)}else if("string"===typeof t){var e=t;if("()"===e.substring(e.length-2)){e=e.substring(0,e.length-2)}var i=e.split(".");var o=i.pop();var f=window;var _iterator=_createForOfIteratorHelper(i),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var _t=_step.value;f=f[_t]}}catch(err){_iterator.e(err)}finally{_iterator.f()}return typeof f[o]==="undefined"?null:f[o].apply(this,n)}}function o(){return{validate:function validate(o){var l=t$6(o.options.callback,[o]);return"boolean"===typeof l?{valid:l}:l}}}function t$7(){return{validate:function validate(t){var o="select"===t.element.tagName.toLowerCase()?t.element.querySelectorAll("option:checked").length:t.elements.filter((function(e){return e.checked})).length;var s=t.options.min?"".concat(t.options.min):"";var n=t.options.max?"".concat(t.options.max):"";var a=t.l10n?t.options.message||t.l10n.choice["default"]:t.options.message;var l=!(s&&o<parseInt(s,10)||n&&o>parseInt(n,10));switch(true){case!!s&&!!n:a=r(t.l10n?t.l10n.choice.between:t.options.message,[s,n]);break;case!!s:a=r(t.l10n?t.l10n.choice.more:t.options.message,s);break;case!!n:a=r(t.l10n?t.l10n.choice.less:t.options.message,n);break}return{message:a,valid:l}}}}var t$8={AMERICAN_EXPRESS:{length:[15],prefix:["34","37"]},DANKORT:{length:[16],prefix:["5019"]},DINERS_CLUB:{length:[14],prefix:["300","301","302","303","304","305","36"]},DINERS_CLUB_US:{length:[16],prefix:["54","55"]},DISCOVER:{length:[16],prefix:["6011","622126","622127","622128","622129","62213","62214","62215","62216","62217","62218","62219","6222","6223","6224","6225","6226","6227","6228","62290","62291","622920","622921","622922","622923","622924","622925","644","645","646","647","648","649","65"]},ELO:{length:[16],prefix:["4011","4312","4389","4514","4573","4576","5041","5066","5067","509","6277","6362","6363","650","6516","6550"]},FORBRUGSFORENINGEN:{length:[16],prefix:["600722"]},JCB:{length:[16],prefix:["3528","3529","353","354","355","356","357","358"]},LASER:{length:[16,17,18,19],prefix:["6304","6706","6771","6709"]},MAESTRO:{length:[12,13,14,15,16,17,18,19],prefix:["5018","5020","5038","5868","6304","6759","6761","6762","6763","6764","6765","6766"]}
26327,MASTERCARD:{length:[16],prefix:["51","52","53","54","55"]},SOLO:{length:[16,18,19],prefix:["6334","6767"]},UNIONPAY:{length:[16,17,18,19],prefix:["622126","622127","622128","622129","62213","62214","62215","62216","62217","62218","62219","6222","6223","6224","6225","6226","6227","6228","62290","62291","622920","622921","622922","622923","622924","622925"]},VISA:{length:[16],prefix:["4"]},VISA_ELECTRON:{length:[16],prefix:["4026","417500","4405","4508","4844","4913","4917"]}};function l(){return{validate:function validate(l){if(l.value===""){return{meta:{type:null},valid:true}}if(/[^0-9-\s]+/.test(l.value)){return{meta:{type:null},valid:false}}var r=l.value.replace(/\D/g,"");if(!t(r)){return{meta:{type:null},valid:false}}for(var _i=0,_Object$keys=Object.keys(t$8);_i<_Object$keys.length;_i++){var _e=_Object$keys[_i];for(var n in t$8[_e].prefix){if(l.value.substr(0,t$8[_e].prefix[n].length)===t$8[_e].prefix[n]&&t$8[_e].length.indexOf(r.length)!==-1){return{meta:{type:_e},valid:true}}}}return{meta:{type:null},valid:false}}}}function t$9(t,e,n,r){if(isNaN(t)||isNaN(e)||isNaN(n)){return false}if(t<1e3||t>9999||e<=0||e>12){return false}var s=[31,t%400===0||t%100!==0&&t%4===0?29:28,31,30,31,30,31,31,30,31,30,31];if(n<=0||n>s[e-1]){return false}if(r===true){var _r=new Date;var _s=_r.getFullYear();var a=_r.getMonth();var u=_r.getDate();return t<_s||t===_s&&e-1<a||t===_s&&e-1===a&&n<u}return true}function n(){var n=function n(t,e,_n){var s=e.indexOf("YYYY");var a=e.indexOf("MM");var l=e.indexOf("DD");if(s===-1||a===-1||l===-1){return null}var o=t.split(" ");var r=o[0].split(_n);if(r.length<3){return null}var c=new Date(parseInt(r[s],10),parseInt(r[a],10)-1,parseInt(r[l],10));if(o.length>1){var _t=o[1].split(":");c.setHours(_t.length>0?parseInt(_t[0],10):0);c.setMinutes(_t.length>1?parseInt(_t[1],10):0);c.setSeconds(_t.length>2?parseInt(_t[2],10):0)}return c};var s=function s(t,e){var n=e.replace(/Y/g,"y").replace(/M/g,"m").replace(/D/g,"d").replace(/:m/g,":M").replace(/:mm/g,":MM").replace(/:S/,":s").replace(/:SS/,":ss");var s=t.getDate();var a=s<10?"0".concat(s):s;var l=t.getMonth()+1;var o=l<10?"0".concat(l):l;var r="".concat(t.getFullYear()).substr(2);var c=t.getFullYear();var i=t.getHours()%12||12;var g=i<10?"0".concat(i):i;var u=t.getHours();var m=u<10?"0".concat(u):u;var d=t.getMinutes();var f=d<10?"0".concat(d):d;var p=t.getSeconds();var h=p<10?"0".concat(p):p;var $={H:"".concat(u),HH:"".concat(m),M:"".concat(d),MM:"".concat(f),d:"".concat(s),dd:"".concat(a),h:"".concat(i),hh:"".concat(g),m:"".concat(l),mm:"".concat(o),s:"".concat(p),ss:"".concat(h),yy:"".concat(r),yyyy:"".concat(c)};return n.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMs])\1?|"[^"]*"|'[^']*'/g,(function(t){return $[t]?$[t]:t.slice(1,t.length-1)}))};return{validate:function validate(a){if(a.value===""){return{meta:{date:null},valid:true}}var l=Object.assign({},{format:a.element&&a.element.getAttribute("type")==="date"?"YYYY-MM-DD":"MM/DD/YYYY",message:""},a.options);var o=a.l10n?a.l10n.date["default"]:l.message;var r$1={message:"".concat(o),meta:{date:null},valid:false};var c=l.format.split(" ");var i=c.length>1?c[1]:null;var g=c.length>2?c[2]:null;var u=a.value.split(" ");var m=u[0];var d=u.length>1?u[1]:null;if(c.length!==u.length){return r$1}var f=l.separator||(m.indexOf("/")!==-1?"/":m.indexOf("-")!==-1?"-":m.indexOf(".")!==-1?".":"/");if(f===null||m.indexOf(f)===-1){return r$1}var p=m.split(f);var h=c[0].split(f);if(p.length!==h.length){return r$1}var $=p[h.indexOf("YYYY")];var M=p[h.indexOf("MM")];var Y=p[h.indexOf("DD")];if(!/^\d+$/.test($)||!/^\d+$/.test(M)||!/^\d+$/.test(Y)||$.length>4||M.length>2||Y.length>2){return r$1}var D=parseInt($,10);var x=parseInt(M,10);var y=parseInt(Y,10);if(!t$9(D,x,y)){return r$1}var I=new Date(D,x-1,y);if(i){var _t2=d.split(":");if(i.split(":").length!==_t2.length){return r$1}var _e=_t2.length>0?_t2[0].length<=2&&/^\d+$/.test(_t2[0])?parseInt(_t2[0],10):-1:0;var _n2=_t2.length>1?_t2[1].length<=2&&/^\d+$/.test(_t2[1])?parseInt(_t2[1],10):-1:0;var _s=_t2.length>2?_t2[2].length<=2&&/^\d+$/.test(_t2[2])?parseInt(_t2[2],10):-1:0;if(_e===-1||_n2===-1||_s===-1){return r$1}if(_s<0||_s>60){return r$1}if(_e<0||_e>=24||g&&_e>12){return r$1}if(_n2<0||_n2>59){return r$1}I.setHours(_e);I.setMinutes(_n2);I.setSeconds(_s)}var O=typeof l.min==="function"?l.min():l.min;var v=O instanceof Date?O:O?n(O,h,f):I;var H=typeof l.max==="function"?l.max():l.max;var T=H instanceof Date?H:H?n(H,h,f):I;var S=O instanceof Date?s(v,l.format):O;var b=H instanceof Date?s(T,l.format):H;switch(true){case!!S&&!b:return{message:r(a.l10n?a.l10n.date.min:o,S),meta:{date:I},valid:I.getTime()>=v.getTime()};case!!b&&!S:return{message:r(a.l10n?a.l10n.date.max:o,b),meta:{date:I},valid:I.getTime()<=T.getTime()};case!!b&&!!S:return{message:r(a.l10n?a.l10n.date.range:o,[S,b]),meta:{date:I},valid:I.getTime()<=T.getTime()&&I.getTime()>=v.getTime()};default:return{message:"".concat(o),meta:{date:I},valid:true}}}}}function o$1(){return{validate:function validate(o){var t="function"===typeof o.options.compare?o.options.compare.call(this):o.options.compare;return{valid:t===""||o.value!==t}}}}function e$1(){return{validate:function validate(e){return{valid:e.value===""||/^\d+$/.test(e.value)}}}}function t$a(){var t=function t(_t3,e){var s=_t3.split(/"/);var l=s.length;var n=[];var r="";for(var _t=0;_t<l;_t++){if(_t%2===0){var _l=s[_t].split(e);var a=_l.length;if(a===1){r+=_l[0]}else{n.push(r+_l[0]);for(var _t2=1;_t2<a-1;_t2++){n.push(_l[_t2])}r=_l[a-1]}}else{r+='"'+s[_t];if(_t<l-1){r+='"'}}}n.push(r);return n};return{validate:function validate(e){if(e.value===""){return{valid:true}}var s=Object.assign({},{multiple:false,separator:/[,;]/},e.options);var l=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@[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])?)*$/;var n=s.multiple===true||"".concat(s.multiple)==="true";if(n){var _n=s.separator||/[,;]/;var r=t(e.value,_n);var a=r.length;for(var _t4=0;_t4<a;_t4++){if(!l.test(r[_t4])){return{valid:false}}}return{valid:true}}else{return{valid:l.test(e.value)}}}}}function e$2(){return{validate:function validate(e){if(e.value===""){return{valid:true}}var t;var i=e.options.extension?e.options.extension.toLowerCase().split(","):null;var s=e.options.type?e.options.type.toLowerCase().split(","):null;var n=window["File"]&&window["FileList"]&&window["FileReader"];if(n){var _n=e.element.files;var o=_n.length;var a=0;if(e.options.maxFiles&&o>parseInt("".concat(e.options.maxFiles),10)){return{meta:{error:"INVALID_MAX_FILES"},valid:false}}if(e.options.minFiles&&o<parseInt("".concat(e.options.minFiles),10)){return{meta:{error:"INVALID_MIN_FILES"},valid:false}}var r={};for(var l=0;l<o;l++){a+=_n[l].size;t=_n[l].name.substr(_n[l].name.lastIndexOf(".")+1);
26327r={ext:t,file:_n[l],size:_n[l].size,type:_n[l].type};if(e.options.minSize&&_n[l].size<parseInt("".concat(e.options.minSize),10)){return{meta:Object.assign({},{error:"INVALID_MIN_SIZE"},r),valid:false}}if(e.options.maxSize&&_n[l].size>parseInt("".concat(e.options.maxSize),10)){return{meta:Object.assign({},{error:"INVALID_MAX_SIZE"},r),valid:false}}if(i&&i.indexOf(t.toLowerCase())===-1){return{meta:Object.assign({},{error:"INVALID_EXTENSION"},r),valid:false}}if(_n[l].type&&s&&s.indexOf(_n[l].type.toLowerCase())===-1){return{meta:Object.assign({},{error:"INVALID_TYPE"},r),valid:false}}}if(e.options.maxTotalSize&&a>parseInt("".concat(e.options.maxTotalSize),10)){return{meta:Object.assign({},{error:"INVALID_MAX_TOTAL_SIZE",totalSize:a},r),valid:false}}if(e.options.minTotalSize&&a<parseInt("".concat(e.options.minTotalSize),10)){return{meta:Object.assign({},{error:"INVALID_MIN_TOTAL_SIZE",totalSize:a},r),valid:false}}}else{t=e.value.substr(e.value.lastIndexOf(".")+1);if(i&&i.indexOf(t.toLowerCase())===-1){return{meta:{error:"INVALID_EXTENSION",ext:t},valid:false}}}return{valid:true}}}}function a(){return{validate:function validate(a){if(a.value===""){return{valid:true}}var s=Object.assign({},{inclusive:true,message:""},a.options);var t=parseFloat("".concat(s.min).replace(",","."));return s.inclusive?{message:r(a.l10n?s.message||a.l10n.greaterThan["default"]:s.message,"".concat(t)),valid:parseFloat(a.value)>=t}:{message:r(a.l10n?s.message||a.l10n.greaterThan.notInclusive:s.message,"".concat(t)),valid:parseFloat(a.value)>t}}}}function o$2(){return{validate:function validate(o){var t="function"===typeof o.options.compare?o.options.compare.call(this):o.options.compare;return{valid:t===""||o.value===t}}}}function a$1(){return{validate:function validate(a){if(a.value===""){return{valid:true}}var e=Object.assign({},{decimalSeparator:".",thousandsSeparator:""},a.options);var t=e.decimalSeparator==="."?"\\.":e.decimalSeparator;var r=e.thousandsSeparator==="."?"\\.":e.thousandsSeparator;var o=new RegExp("^-?[0-9]{1,3}(".concat(r,"[0-9]{3})*(").concat(t,"[0-9]+)?$"));var n=new RegExp(r,"g");var s="".concat(a.value);if(!o.test(s)){return{valid:false}}if(r){s=s.replace(n,"")}if(t){s=s.replace(t,".")}var i=parseFloat(s);return{valid:!isNaN(i)&&isFinite(i)&&Math.floor(i)===i}}}}function d(){return{validate:function validate(d){if(d.value===""){return{valid:true}}var a=Object.assign({},{ipv4:true,ipv6:true},d.options);var e=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\/([0-9]|[1-2][0-9]|3[0-2]))?$/;var s=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*(\/(\d|\d\d|1[0-1]\d|12[0-8]))?$/;switch(true){case a.ipv4&&!a.ipv6:return{message:d.l10n?a.message||d.l10n.ip.ipv4:a.message,valid:e.test(d.value)};case!a.ipv4&&a.ipv6:return{message:d.l10n?a.message||d.l10n.ip.ipv6:a.message,valid:s.test(d.value)};case a.ipv4&&a.ipv6:default:return{message:d.l10n?a.message||d.l10n.ip["default"]:a.message,valid:e.test(d.value)||s.test(d.value)}}}}}function s$2(){return{validate:function validate(s){if(s.value===""){return{valid:true}}var a=Object.assign({},{inclusive:true,message:""},s.options);var l=parseFloat("".concat(a.max).replace(",","."));return a.inclusive?{message:r(s.l10n?a.message||s.l10n.lessThan["default"]:a.message,"".concat(l)),valid:parseFloat(s.value)<=l}:{message:r(s.l10n?a.message||s.l10n.lessThan.notInclusive:a.message,"".concat(l)),valid:parseFloat(s.value)<l}}}}function t$b(){return{validate:function validate(t){var n=!!t.options&&!!t.options.trim;var o=t.value;return{valid:!n&&o!==""||n&&o!==""&&o.trim()!==""}}}}function a$2(){return{validate:function validate(a){if(a.value===""){return{valid:true}}var e=Object.assign({},{decimalSeparator:".",thousandsSeparator:""},a.options);var t="".concat(a.value);if(t.substr(0,1)===e.decimalSeparator){t="0".concat(e.decimalSeparator).concat(t.substr(1))}else if(t.substr(0,2)==="-".concat(e.decimalSeparator)){t="-0".concat(e.decimalSeparator).concat(t.substr(2))}
26327var r=e.decimalSeparator==="."?"\\.":e.decimalSeparator;var s=e.thousandsSeparator==="."?"\\.":e.thousandsSeparator;var i=new RegExp("^-?[0-9]{1,3}(".concat(s,"[0-9]{3})*(").concat(r,"[0-9]+)?$"));var o=new RegExp(s,"g");if(!i.test(t)){return{valid:false}}if(s){t=t.replace(o,"")}if(r){t=t.replace(r,".")}var l=parseFloat(t);return{valid:!isNaN(l)&&isFinite(l)}}}}function r$1(){return{validate:function validate(r){return t$6(r.options.promise,[r])}}}function e$3(){return{validate:function validate(e){if(e.value===""){return{valid:true}}var t=e.options.regexp;if(t instanceof RegExp){return{valid:t.test(e.value)}}else{var n=t.toString();var o=e.options.flags?new RegExp(n,e.options.flags):new RegExp(n);return{valid:o.test(e.value)}}}}}function e$4(e,t){var n=function n(e){return Object.keys(e).map((function(t){return"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e[t]))})).join("&")};return new Promise((function(o,s){var d=Object.assign({},{crossDomain:false,headers:{},method:"GET",params:{}},t);var a=Object.keys(d.params).map((function(e){return"".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(d.params[e]))})).join("&");var r=e.indexOf("?");var c="GET"===d.method?"".concat(e).concat(r?"?":"&").concat(a):e;if(d.crossDomain){var _e=document.createElement("script");var _t="___fetch".concat(Date.now(),"___");window[_t]=function(e){delete window[_t];o(e)};_e.src="".concat(c).concat(r?"&":"?","callback=").concat(_t);_e.async=true;_e.addEventListener("load",(function(){_e.parentNode.removeChild(_e)}));_e.addEventListener("error",(function(){return s}));document.head.appendChild(_e)}else{var _e2=new XMLHttpRequest;_e2.open(d.method,c);_e2.setRequestHeader("X-Requested-With","XMLHttpRequest");if("POST"===d.method){_e2.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}Object.keys(d.headers).forEach((function(t){return _e2.setRequestHeader(t,d.headers[t])}));_e2.addEventListener("load",(function(){o(JSON.parse(this.responseText))}));_e2.addEventListener("error",(function(){return s}));_e2.send(n(d.params))}}))}function a$3(){var a={crossDomain:false,data:{},headers:{},method:"GET",validKey:"valid"};return{validate:function validate(t){if(t.value===""){return Promise.resolve({valid:true})}var s=Object.assign({},a,t.options);var r=s.data;if("function"===typeof s.data){r=s.data.call(this,t)}if("string"===typeof r){r=JSON.parse(r)}r[s.name||t.field]=t.value;var o="function"===typeof s.url?s.url.call(this,t):s.url;return e$4(o,{crossDomain:s.crossDomain,headers:s.headers,method:s.method,params:r}).then((function(e){return Promise.resolve({message:e["message"],meta:e,valid:"".concat(e[s.validKey])==="true"})}))["catch"]((function(e){return Promise.reject({valid:false})}))}}}function e$5(){return{validate:function validate(e){if(e.value===""){return{valid:true}}var a=Object.assign({},{case:"lower"},e.options);var s=(a["case"]||"lower").toLowerCase();return{message:a.message||(e.l10n?"upper"===s?e.l10n.stringCase.upper:e.l10n.stringCase["default"]:a.message),valid:"upper"===s?e.value===e.value.toUpperCase():e.value===e.value.toLowerCase()}}}}function t$c(){var t=function t(e){var t=e.length;for(var s=e.length-1;s>=0;s--){var n=e.charCodeAt(s);if(n>127&&n<=2047){t++}else if(n>2047&&n<=65535){t+=2}if(n>=56320&&n<=57343){s--}}return"".concat(t)};return{validate:function validate(s){var n=Object.assign({},{message:"",trim:false,utf8Bytes:false},s.options);var a=n.trim===true||"".concat(n.trim)==="true"?s.value.trim():s.value;if(a===""){return{valid:true}}var r$1=n.min?"".concat(n.min):"";var l=n.max?"".concat(n.max):"";var i=n.utf8Bytes?t(a):a.length;var g=true;var m=s.l10n?n.message||s.l10n.stringLength["default"]:n.message;if(r$1&&i<parseInt(r$1,10)||l&&i>parseInt(l,10)){g=false}switch(true){case!!r$1&&!!l:m=r(s.l10n?n.message||s.l10n.stringLength.between:n.message,[r$1,l]);break;case!!r$1:m=r(s.l10n?n.message||s.l10n.stringLength.more:n.message,"".concat(parseInt(r$1,10)));break;case!!l:m=r(s.l10n?n.message||s.l10n.stringLength.less:n.message,"".concat(parseInt(l,10)));break}return{message:m,valid:g}}}}function t$d(){var t={allowEmptyProtocol:false,allowLocal:false,protocol:"http, https, ftp"};return{validate:function validate(o){if(o.value===""){return{valid:true}}var a=Object.assign({},t,o.options);var l=a.allowLocal===true||"".concat(a.allowLocal)==="true";var f=a.allowEmptyProtocol===true||"".concat(a.allowEmptyProtocol)==="true";var u=a.protocol.split(",").join("|").replace(/\s/g,"");var e=new RegExp("^"+"(?:(?:"+u+")://)"+(f?"?":"")+"(?:\\S+(?::\\S*)?@)?"+"(?:"+(l?"":"(?!(?: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,}))"+(l?"?":"")+")"+"(?::\\d{2,5})?"+"(?:/[^\\s]*)?$","i");return{valid:e.test(o.value)}}}}function a$4(){return{validate:function validate(a){return{valid:a.value===""||/^(?:[A-Za-z0-9+/]{4}
26327)*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$/.test(a.value)}}}}function a$5(){return{validate:function validate(a){return{valid:a.value===""||/^[a-zA-Z]{6}[a-zA-Z0-9]{2}([a-zA-Z0-9]{3})?$/.test(a.value)}}}}function e$6(){var e=["hex","rgb","rgba","hsl","hsla","keyword"];var a=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","transparent","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"];var r=function r(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)};var l=function l(e){return/^hsl\((\s*(-?\d+)\s*,)(\s*(\b(0?\d{1,2}|100)\b%)\s*,)(\s*(\b(0?\d{1,2}|100)\b%)\s*)\)$/.test(e)};var s=function s(e){return/^hsla\((\s*(-?\d+)\s*,)(\s*(\b(0?\d{1,2}|100)\b%)\s*,){2}(\s*(0?(\.\d+)?|1(\.0+)?)\s*)\)$/.test(e)};var t=function t(e){return a.indexOf(e)>=0};var i=function i(e){return/^rgb\((\s*(\b([01]?\d{1,2}|2[0-4]\d|25[0-5])\b)\s*,){2}(\s*(\b([01]?\d{1,2}|2[0-4]\d|25[0-5])\b)\s*)\)$/.test(e)||/^rgb\((\s*(\b(0?\d{1,2}|100)\b%)\s*,){2}(\s*(\b(0?\d{1,2}|100)\b%)\s*)\)$/.test(e)};var o=function o(e){return/^rgba\((\s*(\b([01]?\d{1,2}|2[0-4]\d|25[0-5])\b)\s*,){3}(\s*(0?(\.\d+)?|1(\.0+)?)\s*)\)$/.test(e)||/^rgba\((\s*(\b(0?\d{1,2}|100)\b%)\s*,){3}(\s*(0?(\.\d+)?|1(\.0+)?)\s*)\)$/.test(e)};return{validate:function validate(a){if(a.value===""){return{valid:true}}var n=typeof a.options.type==="string"?a.options.type.toString().replace(/s/g,"").split(","):a.options.type||e;var _iterator=_createForOfIteratorHelper(n),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var d=_step.value;var _n=d.toLowerCase();if(e.indexOf(_n)===-1){continue}var g=true;switch(_n){case"hex":g=r(a.value);break;case"hsl":g=l(a.value);break;case"hsla":g=s(a.value);break;case"keyword":g=t(a.value);break;case"rgb":g=i(a.value);break;case"rgba":g=o(a.value);break}if(g){return{valid:true}}}}catch(err){_iterator.e(err)}finally{_iterator.f()}return{valid:false}}}}function t$e(){return{validate:function validate(t){if(t.value===""){return{valid:true}}var e=t.value.toUpperCase();if(!/^[0123456789ABCDEFGHJKLMNPQRSTUVWXYZ*@#]{9}$/.test(e)){return{valid:false}}var r=e.split("");var a=r.pop();var n=r.map((function(t){var e=t.charCodeAt(0);switch(true){case t==="*":return 36;case t==="@":return 37;case t==="#":return 38;case e>="A".charCodeAt(0)&&e<="Z".charCodeAt(0):return e-"A".charCodeAt(0)+10;default:return parseInt(t,10)}}));var c=n.map((function(t,e){var r=e%2===0?t:2*t;return Math.floor(r/10)+r%10})).reduce((function(t,e){return t+e}),0);var o=(10-c%10)%10;return{valid:a==="".concat(o)}}}}function e$7(){return{validate:function validate(e){if(e.value===""){return{valid:true}}if(!/^(\d{8}|\d{12}|\d{13}|\d{14})$/.test(e.value)){return{valid:false}}var t=e.value.length;var a=0;var l=t===8?[3,1]:[1,3];for(var r=0;r<t-1;r++){a+=parseInt(e.value.charAt(r),10)*l[r%2]}a=(10-a%10)%10;return{valid:"".concat(a)===e.value.charAt(t-1)}}}}function e$8(){var e={ANDOVER:["10","12"],ATLANTA:["60","67"],AUSTIN:["50","53"],BROOKHAVEN:["01","02","03","04","05","06","11","13","14","16","21","22","23","25","34","51","52","54","5
263275","56","57","58","59","65"],CINCINNATI:["30","32","35","36","37","38","61"],FRESNO:["15","24"],INTERNET:["20","26","27","45","46","47"],KANSAS_CITY:["40","44"],MEMPHIS:["94","95"],OGDEN:["80","90"],PHILADELPHIA:["33","39","41","42","43","48","62","63","64","66","68","71","72","73","74","75","76","77","81","82","83","84","85","86","87","88","91","92","93","98","99"],SMALL_BUSINESS_ADMINISTRATION:["31"]};return{validate:function validate(t){if(t.value===""){return{meta:null,valid:true}}if(!/^[0-9]{2}-?[0-9]{7}$/.test(t.value)){return{meta:null,valid:false}}var a="".concat(t.value.substr(0,2));for(var _t in e){if(e[_t].indexOf(a)!==-1){return{meta:{campus:_t},valid:true}}}return{meta:null,valid:false}}}}function r$2(){return{validate:function validate(r){if(r.value===""){return{valid:true}}var t=r.value.toUpperCase();if(!/^[GRID:]*([0-9A-Z]{2})[-\s]*([0-9A-Z]{5})[-\s]*([0-9A-Z]{10})[-\s]*([0-9A-Z]{1})$/g.test(t)){return{valid:false}}t=t.replace(/\s/g,"").replace(/-/g,"");if("GRID:"===t.substr(0,5)){t=t.substr(5)}return{valid:t$2(t)}}}}function e$9(){return{validate:function validate(e){return{valid:e.value===""||/^[0-9a-fA-F]+$/.test(e.value)}}}}function Z(){var Z={AD:"AD[0-9]{2}[0-9]{4}[0-9]{4}[A-Z0-9]{12}",AE:"AE[0-9]{2}[0-9]{3}[0-9]{16}",AL:"AL[0-9]{2}[0-9]{8}[A-Z0-9]{16}",AO:"AO[0-9]{2}[0-9]{21}",AT:"AT[0-9]{2}[0-9]{5}[0-9]{11}",AZ:"AZ[0-9]{2}[A-Z]{4}[A-Z0-9]{20}",BA:"BA[0-9]{2}[0-9]{3}[0-9]{3}[0-9]{8}[0-9]{2}",BE:"BE[0-9]{2}[0-9]{3}[0-9]{7}[0-9]{2}",BF:"BF[0-9]{2}[0-9]{23}",BG:"BG[0-9]{2}[A-Z]{4}[0-9]{4}[0-9]{2}[A-Z0-9]{8}",BH:"BH[0-9]{2}[A-Z]{4}[A-Z0-9]{14}",BI:"BI[0-9]{2}[0-9]{12}",BJ:"BJ[0-9]{2}[A-Z]{1}[0-9]{23}",BR:"BR[0-9]{2}[0-9]{8}[0-9]{5}[0-9]{10}[A-Z][A-Z0-9]",CH:"CH[0-9]{2}[0-9]{5}[A-Z0-9]{12}",CI:"CI[0-9]{2}[A-Z]{1}[0-9]{23}",CM:"CM[0-9]{2}[0-9]{23}",CR:"CR[0-9]{2}[0-9][0-9]{3}[0-9]{14}",CV:"CV[0-9]{2}[0-9]{21}",CY:"CY[0-9]{2}[0-9]{3}[0-9]{5}[A-Z0-9]{16}",CZ:"CZ[0-9]{2}[0-9]{20}",DE:"DE[0-9]{2}[0-9]{8}[0-9]{10}",DK:"DK[0-9]{2}[0-9]{14}",DO:"DO[0-9]{2}[A-Z0-9]{4}[0-9]{20}",DZ:"DZ[0-9]{2}[0-9]{20}",EE:"EE[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{11}[0-9]{1}",ES:"ES[0-9]{2}[0-9]{4}[0-9]{4}[0-9]{1}[0-9]{1}[0-9]{10}",FI:"FI[0-9]{2}[0-9]{6}[0-9]{7}[0-9]{1}",FO:"FO[0-9]{2}[0-9]{4}[0-9]{9}[0-9]{1}",FR:"FR[0-9]{2}[0-9]{5}[0-9]{5}[A-Z0-9]{11}[0-9]{2}",GB:"GB[0-9]{2}[A-Z]{4}[0-9]{6}[0-9]{8}",GE:"GE[0-9]{2}[A-Z]{2}[0-9]{16}",GI:"GI[0-9]{2}[A-Z]{4}[A-Z0-9]{15}",GL:"GL[0-9]{2}[0-9]{4}[0-9]{9}[0-9]{1}",GR:"GR[0-9]{2}[0-9]{3}[0-9]{4}[A-Z0-9]{16}",GT:"GT[0-9]{2}[A-Z0-9]{4}[A-Z0-9]{20}",HR:"HR[0-9]{2}[0-9]{7}[0-9]{10}",HU:"HU[0-9]{2}[0-9]{3}[0-9]{4}[0-9]{1}[0-9]{15}[0-9]{1}",IE:"IE[0-9]{2}[A-Z]{4}[0-9]{6}[0-9]{8}",IL:"IL[0-9]{2}[0-9]{3}[0-9]{3}[0-9]{13}",IR:"IR[0-9]{2}[0-9]{22}",IS:"IS[0-9]{2}[0-9]{4}[0-9]{2}[0-9]{6}[0-9]{10}",IT:"IT[0-9]{2}[A-Z]{1}[0-9]{5}[0-9]{5}[A-Z0-9]{12}",JO:"JO[0-9]{2}[A-Z]{4}[0-9]{4}[0]{8}[A-Z0-9]{10}",KW:"KW[0-9]{2}[A-Z]{4}[0-9]{22}",KZ:"KZ[0-9]{2}[0-9]{3}[A-Z0-9]{13}",LB:"LB[0-9]{2}[0-9]{4}[A-Z0-9]{20}",LI:"LI[0-9]{2}[0-9]{5}[A-Z0-9]{12}",LT:"LT[0-9]{2}[0-9]{5}[0-9]{11}",LU:"LU[0-9]{2}[0-9]{3}[A-Z0-9]{13}",LV:"LV[0-9]{2}[A-Z]{4}[A-Z0-9]{13}",MC:"MC[0-9]{2}[0-9]{5}[0-9]{5}[A-Z0-9]{11}[0-9]{2}",MD:"MD[0-9]{2}[A-Z0-9]{20}",ME:"ME[0-9]{2}[0-9]{3}[0-9]{13}[0-9]{2}",MG:"MG[0-9]{2}[0-9]{23}",MK:"MK[0-9]{2}[0-9]{3}[A-Z0-9]{10}[0-9]{2}",ML:"ML[0-9]{2}[A-Z]{1}[0-9]{23}",MR:"MR13[0-9]{5}[0-9]{5}[0-9]{11}[0-9]{2}",MT:"MT[0-9]{2}[A-Z]{4}[0-9]{5}[A-Z0-9]{18}",MU:"MU[0-9]{2}[A-Z]{4}[0-9]{2}[0-9]{2}[0-9]{12}[0-9]{3}[A-Z]{3}",MZ:"MZ[0-9]{2}[0-9]{21}",NL:"NL[0-9]{2}[A-Z]{4}[0-9]{10}",NO:"NO[0-9]{2}[0-9]{4}[0-9]{6}[0-9]{1}",PK:"PK[0-9]{2}[A-Z]{4}[A-Z0-9]{16}",PL:"PL[0-9]{2}[0-9]{8}[0-9]{16}",PS:"PS[0-9]{2}[A-Z]{4}[A-Z0-9]{21}",PT:"PT[0-9]{2}[0-9]{4}[0-9]{4}[0-9]{11}[0-9]{2}",QA:"QA[0-9]{2}[A-Z]{4}[A-Z0-9]{21}",RO:"RO[0-9]{2}[A-Z]{4}[A-Z0-9]{16}",RS:"RS[0-9]{2}[0-9]{3}[0-9]{13}[0-9]{2}",SA:"SA[0-9]{2}[0-9]{2}[A-Z0-9]{18}",SE:"SE[0-9]{2}[0-9]{3}[0-9]{16}[0-9]{1}",SI:"SI[0-9]{2}[0-9]{5}[0-9]{8}[0-9]{2}",SK:"SK[0-9]{2}[0-9]{4}[0-9]{6}[0-9]{10}",SM:"SM[0-9]{2}[A-Z]{1}[0-9]{5}[0-9]{5}[A-Z0-9]{12}",SN:"SN[0-9]{2}[A-Z]{1}[0-9]{23}",TL:"TL38[0-9]{3}[0-9]{14}[0-9]{2}",TN:"TN59[0-9]{2}[0-9]{3}[0-9]{13}[0-9]{2}",TR:"TR[0-9]{2}[0-9]{5}[A-Z0-9]{1}[A-Z0-9]{16}",VG:"VG[0-9]{2}[A-Z]{4}[0-9]{16}",XK:"XK[0-9]{2}[0-9]{4}[0-9]{10}[0-9]{2}"};var e=["AT","BE","BG","CH","CY","CZ","DE","DK","EE","ES","FI","FR","GB","GI","GR","HR","HU","IE","IS","IT","LI","LT","LU","LV","MC","MT","NL","NO","PL","PT","RO","SE","SI","SK","SM"];return{validate:function validate(s){if(s.value===""){return{valid:true}}var t=Object.assign({},{message:""},s.options);var a=s.value.replace(/[^a-zA-Z0-9]/g,"").toUpperCase();var r$1=t.country||a.substr(0,2);if(!Z[r$1]){return{message:t.message,valid:false}}if(t.sepa!==undefined){var _A=e.indexOf(r$1)!==-1;if((t.sepa==="true"||t.sepa===true)&&!_A||(t.sepa==="false"||t.sepa===false)&&_A){return{message:t.message,valid:false}}}var n=r(s.l10n?t.message||s.l10n.iban.country:t.message,s.l10n?s.l10n.iban.countries[r$1]:r$1);if(!new RegExp("^".concat(Z[r$1],"$")).test(s.value)){return{message:n,valid:false}}a="".concat(a.substr(4)).concat(a.substr(0,4));a=a.split("").map((function(A){var Z=A.charCodeAt(0);return Z>="A".charCodeAt(0)&&Z<="Z".charCodeAt(0)?Z-"A".charCodeAt(0)+10:A})).join("");var I=parseInt(a.substr(0,1),10);var L=a.length;for(var _A2=1;_A2<L;++_A2){I=(I*10+parseInt(a.substr(_A2,1),10))%97}return{message:n,valid:I===1}}}}function t$f(t){var e=t.replace(/\./g,"");return{meta:{},valid:/^\d{7,8}$/.test(e)}}function t$g(t,r){if(!/^\d{13}$/.test(t)){return false}var e=parseInt(t.substr(0,2),10);var s=parseInt(t.substr(2,2),10);var n=parseInt(t.substr(7,2),10);var a=parseInt(t.substr(12,1),10);if(e>31||s>12){return false}var u=0;for(var _r=0;_r<6;_r++){u+=(7-_r)*(parseInt(t.charAt(_r),10)+parseInt(t.charAt(_r+6),10))}u=11-u%11;if(u===10||u===11){u=0}if(u!==a){return false}switch(r.toUpperCase()){case"BA":return 10<=n&&n<=19;case"MK":return 41<=n&&n<=49;case"ME":return 20<=n&&n<=29;case"RS":return 70<=n&&n<=99;case"SI":return 50<=n&&n<=59;default:return true}}function r$3(r){return{meta:{},valid:t$g(r,"BA")}}function e$a(e){if(!/^\d{10}$/.test(e)&&!/^\d{6}\s\d{3}\s\d{1}$/.test(e)){return{meta:{},valid:false}}var s=e.replace(/\s/g,"");var r=parseInt(s.substr(0,2),10)+1900;var a=parseInt(s.substr(2,2),10);var l=parseInt(s.substr(4,2),10);if(a>40){r+=100;a-=40}else if(a>20){r-=100;a-=20}if(!t$9(r,a,l)){return{meta:{},valid:false}}var i=0;var n=[2,4,8,5,10,9,7,3,6];for(var _t=0;_t<9;_t++){i+=parseInt(s.charAt(_t),10)*n[_t]}i=i%11%10;return{meta:{},valid:"".concat(i)===s.substr(9,1)}}function t$h(t){var e=t.replace(/\D/g,"");if(!/^\d{11}$/.test(e)||/^1{11}|2{11}|3{11}|4{11}|5{11}|6{11}|7{11}|8{11}|9{11}|0{11}$/.test(e)){return{meta:{},valid:false}}var a=0;var r;for(r=0;r<9;r++){a+=(10-r)*parseInt(e.charAt(r),10)}a=11-a%11;if(a===10||a===11){a=0}if("".concat(a)!==e.charAt(9)){return{meta:{},valid:false}}var f=0;for(r=0;r<10;r++){f+=(11-r)*parseInt(e.charAt(r),10)}f=11-f%11;
26327if(f===10||f===11){f=0}return{meta:{},valid:"".concat(f)===e.charAt(10)}}function t$i(t){if(!/^756[.]{0,1}[0-9]{4}[.]{0,1}[0-9]{4}[.]{0,1}[0-9]{2}$/.test(t)){return{meta:{},valid:false}}var e=t.replace(/\D/g,"").substr(3);var r=e.length;var a=r===8?[3,1]:[1,3];var n=0;for(var _t=0;_t<r-1;_t++){n+=parseInt(e.charAt(_t),10)*a[_t%2]}n=10-n%10;return{meta:{},valid:"".concat(n)===e.charAt(r-1)}}function e$b(e){if(!/^\d{7,8}[-]{0,1}[0-9K]$/i.test(e)){return{meta:{},valid:false}}var t=e.replace(/-/g,"");while(t.length<9){t="0".concat(t)}var l=[3,2,7,6,5,4,3,2];var a=0;for(var _e=0;_e<8;_e++){a+=parseInt(t.charAt(_e),10)*l[_e]}a=11-a%11;var r="".concat(a);if(a===11){r="0"}else if(a===10){r="K"}return{meta:{},valid:r===t.charAt(8).toUpperCase()}}function r$4(r){var s=r.trim();if(!/^\d{15}$/.test(s)&&!/^\d{17}[\dXx]{1}$/.test(s)){return{meta:{},valid:false}}var e={11:{0:[0],1:[[0,9],[11,17]],2:[0,28,29]},12:{0:[0],1:[[0,16]],2:[0,21,23,25]},13:{0:[0],1:[[0,5],7,8,21,[23,33],[81,85]],2:[[0,5],[7,9],[23,25],27,29,30,81,83],3:[[0,4],[21,24]],4:[[0,4],6,21,[23,35],81],5:[[0,3],[21,35],81,82],6:[[0,4],[21,38],[81,84]],7:[[0,3],5,6,[21,33]],8:[[0,4],[21,28]],9:[[0,3],[21,30],[81,84]],10:[[0,3],[22,26],28,81,82],11:[[0,2],[21,28],81,82]},14:{0:[0],1:[0,1,[5,10],[21,23],81],2:[[0,3],11,12,[21,27]],3:[[0,3],11,21,22],4:[[0,2],11,21,[23,31],81],5:[[0,2],21,22,24,25,81],6:[[0,3],[21,24]],7:[[0,2],[21,29],81],8:[[0,2],[21,30],81,82],9:[[0,2],[21,32],81],10:[[0,2],[21,34],81,82],11:[[0,2],[21,30],81,82],23:[[0,3],22,23,[25,30],32,33]},15:{0:[0],1:[[0,5],[21,25]],2:[[0,7],[21,23]],3:[[0,4]],4:[[0,4],[21,26],[28,30]],5:[[0,2],[21,26],81],6:[[0,2],[21,27]],7:[[0,3],[21,27],[81,85]],8:[[0,2],[21,26]],9:[[0,2],[21,29],81],22:[[0,2],[21,24]],25:[[0,2],[22,31]],26:[[0,2],[24,27],[29,32],34],28:[0,1,[22,27]],29:[0,[21,23]]},21:{0:[0],1:[[0,6],[11,14],[22,24],81],2:[[0,4],[11,13],24,[81,83]],3:[[0,4],11,21,23,81],4:[[0,4],11,[21,23]],5:[[0,5],21,22],6:[[0,4],24,81,82],7:[[0,3],11,26,27,81,82],8:[[0,4],11,81,82],9:[[0,5],11,21,22],10:[[0,5],11,21,81],11:[[0,3],21,22],12:[[0,2],4,21,23,24,81,82],13:[[0,3],21,22,24,81,82],14:[[0,4],21,22,81]},22:{0:[0],1:[[0,6],12,22,[81,83]],2:[[0,4],11,21,[81,84]],3:[[0,3],22,23,81,82],4:[[0,3],21,22],5:[[0,3],21,23,24,81,82],6:[[0,2],4,5,[21,23],25,81],7:[[0,2],[21,24],81],8:[[0,2],21,22,81,82],24:[[0,6],24,26]},23:{0:[0],1:[[0,12],21,[23,29],[81,84]],2:[[0,8],21,[23,25],27,[29,31],81],3:[[0,7],21,81,82],4:[[0,7],21,22],5:[[0,3],5,6,[21,24]],6:[[0,6],[21,24]],7:[[0,16],22,81],8:[[0,5],11,22,26,28,33,81,82],9:[[0,4],21],10:[[0,5],24,25,81,[83,85]],11:[[0,2],21,23,24,81,82],12:[[0,2],[21,26],[81,83]],27:[[0,4],[21,23]]},31:{0:[0],1:[0,1,[3,10],[12,20]],2:[0,30]},32:{0:[0],1:[[0,7],11,[13,18],24,25],2:[[0,6],11,81,82],3:[[0,5],11,12,[21,24],81,82],4:[[0,2],4,5,11,12,81,82],5:[[0,9],[81,85]],6:[[0,2],11,12,21,23,[81,84]],7:[0,1,3,5,6,[21,24]],8:[[0,4],11,26,[29,31]],9:[[0,3],[21,25],28,81,82],10:[[0,3],11,12,23,81,84,88],11:[[0,2],11,12,[81,83]],12:[[0,4],[81,84]],13:[[0,2],11,[21,24]]},33:{0:[0],1:[[0,6],[8,10],22,27,82,83,85],2:[0,1,[3,6],11,12,25,26,[81,83]],3:[[0,4],22,24,[26,29],81,82],4:[[0,2],11,21,24,[81,83]],5:[[0,3],[21,23]],6:[[0,2],21,24,[81,83]],7:[[0,3],23,26,27,[81,84]],8:[[0,3],22,24,25,81],9:[[0,3],21,22],10:[[0,4],[21,24],81,82],11:[[0,2],[21,27],81]},34:{0:[0],1:[[0,4],11,[21,24],81],2:[[0,4],7,8,[21,23],25],3:[[0,4],11,[21,23]],4:[[0,6],21],5:[[0,4],6,[21,23]],6:[[0,4],21],7:[[0,3],11,21],8:[[0,3],11,[22,28],81],10:[[0,4],[21,24]],11:[[0,3],22,[24,26],81,82],12:[[0,4],21,22,25,26,82],13:[[0,2],[21,24]],14:[[0,2],[21,24]],15:[[0,3],[21,25]],16:[[0,2],[21,23]],17:[[0,2],[21,23]],18:[[0,2],[21,25],81]},35:{0:[0],1:[[0,5],11,[21,25],28,81,82],2:[[0,6],[11,13]],3:[[0,5],22],4:[[0,3],21,[23,30],81],5:[[0,5],21,[24,27],[81,83]],6:[[0,3],[22,29],81],7:[[0,2],[21,25],[81,84]],8:[[0,2],[21,25],81],9:[[0,2],[21,26],81,82]},36:{0:[0],1:[[0,5],11,[21,24]],2:[[0,3],22,81],3:[[0,2],13,[21,23]],4:[[0,3],21,[23,30],81,82],5:[[0,2],21],6:[[0,2],22,81],7:[[0,2],[21,35],81,82],8:[[0,3],[21,30],81],9:[[0,2],[21,26],[81,83]],10:[[0,2],[21,30]],11:[[0,2],[21,30],81]},37:{0:[0],1:[[0,5],12,13,[24,26],81],2:[[0,3],5,[11,14],[81,85]],3:[[0,6],[21,23]],4:[[0,6],81],5:[[0,3],[21,23]],6:[[0,2],[11,13],34,[81,87]],7:[[0,5],24,25,[81,86]],8:[[0,2],11,[26,32],[81,83]],9:[[0,3],11,21,23,82,83],10:[[0,2],[81,83]],11:[[0,3],21,22],12:[[0,3]],13:[[0,2],11,12,[21,29]],14:[[0,2],[21,28],81,82],15:[[0,2],[21,26],81],16:[[0,2],[21,26]],17:[[0,2],[21,28]]},41:{0:[0],1:[[0,6],8,22,[81,85]],2:[[0,5],11,[21,25]],3:[[0,7],11,[22,29],81],4:[[0,4],11,[21,23],25,81,82],5:[[0,3],5,6,22,23,26,27,81],6:[[0,3],11,21,22],7:[[0,4],11,21,[24,28],81,82],8:[[0,4],11,[21,23],25,[81,83]],9:[[0,2],22,23,[26,28]],10:[[0,2],[23,25],81,82],11:[[0,4],[21,23]],12:[[0,2],21,22,24,81,82],13:[[0,3],[21,30],81],14:[[0,3],[21,26],81],15:[[0,3],[21,28]],16:[[0,2],[21,28],81],17:[[0,2],[21,29]],90:[0,1]},42:{0:[0],1:[[0,7],[11,17]],2:[[0,5],22,81],3:[[0,3],[21,25],81],5:[[0,6],[25,29],[81,83]],6:[[0,2],6,7,[24,26],[82,84]],7:[[0,4]],8:[[0,2],4,21,22,81],9:[[0,2],[21,23],81,82,84],10:[[0,3],[22,24],81,83,87],11:[[0,2],[21,27],81,82],12:[[0,2],[21,24],81],13:[[0,3],21,81],28:[[0,2],22,23,[25,28]],90:[0,[4,6],21]},43:{0:[0],1:[[0,5],11,12,21,22,24,81],2:[[0,4],11,21,[23,25],81],3:[[0,2],4,21,81,82],4:[0,1,[5,8],12,[21,24],26,81,82],5:[[0,3],11,[21,25],[27,29],81],6:[[0,3],11,21,23,24,26,81,82],7:[[0,3],[21,26],81],8:[[0,2],11,21,22],9:[[0,3],[21,23],81],10:[[0,3],[21,28],81],11:[[0,3],[21,29]],12:[[0,2],[21,30],81],13:[[0,2],21,22,81,82],31:[0,1,[22,27],30]},44:{0:[0],1:[[0,7],[11,16],83,84],2:[[0,5],21,22,24,29,32,33,81,82],3:[0,1,[3,8]],4:[[0,4]],5:[0,1,[6,15],23,82,83],6:[0,1,[4,8]],7:[0,1,[3,5],81,[83,85]],8:[[0,4],11,23,25,[81,83]],9:[[0,3],23,[81,83]],12:[[0,3],[23,26],83,84],13:[[0,3],[22,24],81],14:[[0,2],[21,24],26,27,81],15:[[0,2],21,23,81],16:[[0,2],[21,25]],17:[[0,2],21,23,81],18:[[0,3],21,23,[25,27],81,82],19:[0],20:[0],51:[[0,3],21,22],52:[[0,3],21,22,24,81],53:[[0,2],[21,23],81]},45:{0:[0],1:[[0,9],[21,27]],2:[[0,5],[21,26]],3:[[0,5],11,12,[21,32]],4:[0,1,[3,6],11,[21,23],81],5:[[0,3],12,21],6:[[0,3],21,81],7:[[0,3],21,22],8:[[0,4],21,81],9:[[0,3],[21,24],81],10:[[0,2],[21,31]],11:[[0,2],[21,23]],12:[[0,2],[21,29],81],13:[[0,2],[21,24],81],14:[[0,2],[21,25],81]},46:{0:[0],1:[0,1,[5,8]],2:[0,1],3:[0,[21,23]],90:[[0,3],[5,7],[21,39]]},50:{0:[0],1:[[0,19]],2:[0,[22,38],[40,43]],3:[0,[81,84]]},51:{0:[0],1:[0,1,[4,8],[12,15],[21,24],29,31,32,[81,84]],3:[[0,4],11,21,22],4:[[0,3],11,21,22],5:[[0,4],21,22,24,25],6:[0,1,3,23,26,[81,83]],7:[0,1,3,4,[22,27],81],8:[[0,2],11,12,[21,24]],9:[[0,4],[21,23]],10:[[0,2],11,24,25,28],11:[[0,2],[11,13],23,24,26,29,32,33,81],13:[[0,4],[21,25],81],14:[[0,2],[21,25]],15:[[0,3],[21,29]],16:[[0,3],[21,23],81],17:[[0,3],[21,25],81],18:[[0,3],[21,27]],19:[[0,3],[21,23]],20:[[0,2],21,22,81],32:[0,[21,33]],33:[0,[21,38]],34:[
263270,1,[22,37]]},52:{0:[0],1:[[0,3],[11,15],[21,23],81],2:[0,1,3,21,22],3:[[0,3],[21,30],81,82],4:[[0,2],[21,25]],5:[[0,2],[21,27]],6:[[0,3],[21,28]],22:[0,1,[22,30]],23:[0,1,[22,28]],24:[0,1,[22,28]],26:[0,1,[22,36]],27:[[0,2],22,23,[25,32]]},53:{0:[0],1:[[0,3],[11,14],21,22,[24,29],81],3:[[0,2],[21,26],28,81],4:[[0,2],[21,28]],5:[[0,2],[21,24]],6:[[0,2],[21,30]],7:[[0,2],[21,24]],8:[[0,2],[21,29]],9:[[0,2],[21,27]],23:[0,1,[22,29],31],25:[[0,4],[22,32]],26:[0,1,[21,28]],27:[0,1,[22,30]],28:[0,1,22,23],29:[0,1,[22,32]],31:[0,2,3,[22,24]],34:[0,[21,23]],33:[0,21,[23,25]],35:[0,[21,28]]},54:{0:[0],1:[[0,2],[21,27]],21:[0,[21,29],32,33],22:[0,[21,29],[31,33]],23:[0,1,[22,38]],24:[0,[21,31]],25:[0,[21,27]],26:[0,[21,27]]},61:{0:[0],1:[[0,4],[11,16],22,[24,26]],2:[[0,4],22],3:[[0,4],[21,24],[26,31]],4:[[0,4],[22,31],81],5:[[0,2],[21,28],81,82],6:[[0,2],[21,32]],7:[[0,2],[21,30]],8:[[0,2],[21,31]],9:[[0,2],[21,29]],10:[[0,2],[21,26]]},62:{0:[0],1:[[0,5],11,[21,23]],2:[0,1],3:[[0,2],21],4:[[0,3],[21,23]],5:[[0,3],[21,25]],6:[[0,2],[21,23]],7:[[0,2],[21,25]],8:[[0,2],[21,26]],9:[[0,2],[21,24],81,82],10:[[0,2],[21,27]],11:[[0,2],[21,26]],12:[[0,2],[21,28]],24:[0,21,[24,29]],26:[0,21,[23,30]],29:[0,1,[21,27]],30:[0,1,[21,27]]},63:{0:[0],1:[[0,5],[21,23]],2:[0,2,[21,25]],21:[0,[21,23],[26,28]],22:[0,[21,24]],23:[0,[21,24]],25:[0,[21,25]],26:[0,[21,26]],27:[0,1,[21,26]],28:[[0,2],[21,23]]},64:{0:[0],1:[0,1,[4,6],21,22,81],2:[[0,3],5,[21,23]],3:[[0,3],[21,24],81],4:[[0,2],[21,25]],5:[[0,2],21,22]},65:{0:[0],1:[[0,9],21],2:[[0,5]],21:[0,1,22,23],22:[0,1,22,23],23:[[0,3],[23,25],27,28],28:[0,1,[22,29]],29:[0,1,[22,29]],30:[0,1,[22,24]],31:[0,1,[21,31]],32:[0,1,[21,27]],40:[0,2,3,[21,28]],42:[[0,2],21,[23,26]],43:[0,1,[21,26]],90:[[0,4]],27:[[0,2],22,23]},71:{0:[0]},81:{0:[0]},82:{0:[0]}};var a=parseInt(s.substr(0,2),10);var n=parseInt(s.substr(2,2),10);var l=parseInt(s.substr(4,2),10);if(!e[a]||!e[a][n]){return{meta:{},valid:false}}var i=false;var u=e[a][n];var o;for(o=0;o<u.length;o++){if(Array.isArray(u[o])&&u[o][0]<=l&&l<=u[o][1]||!Array.isArray(u[o])&&l===u[o]){i=true;break}}if(!i){return{meta:{},valid:false}}var f;if(s.length===18){f=s.substr(6,8)}else{f="19".concat(s.substr(6,6))}var c=parseInt(f.substr(0,4),10);var p=parseInt(f.substr(4,2),10);var d=parseInt(f.substr(6,2),10);if(!t$9(c,p,d)){return{meta:{},valid:false}}if(s.length===18){var _t=[7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2];var _r=0;for(o=0;o<17;o++){_r+=parseInt(s.charAt(o),10)*_t[o]}_r=(12-_r%11)%11;var _e=s.charAt(17).toUpperCase()!=="X"?parseInt(s.charAt(17),10):10;return{meta:{},valid:_e===_r}}return{meta:{},valid:true}}function t$j(t){var e=t.replace(/\./g,"").replace("-","");if(!/^\d{8,16}$/.test(e)){return{meta:{},valid:false}}var r=e.length;var a=[3,7,13,17,19,23,29,37,41,43,47,53,59,67,71];var l=0;for(var _t=r-2;_t>=0;_t--){l+=parseInt(e.charAt(_t),10)*a[_t]}l=l%11;if(l>=2){l=11-l}return{meta:{},valid:"".concat(l)===e.substr(r-1)}}function e$c(e){if(!/^\d{9,10}$/.test(e)){return{meta:{},valid:false}}var r=1900+parseInt(e.substr(0,2),10);var s=parseInt(e.substr(2,2),10)%50%20;var a=parseInt(e.substr(4,2),10);if(e.length===9){if(r>=1980){r-=100}if(r>1953){return{meta:{},valid:false}}}else if(r<1954){r+=100}if(!t$9(r,s,a)){return{meta:{},valid:false}}if(e.length===10){var _t=parseInt(e.substr(0,9),10)%11;if(r<1985){_t=_t%10}return{meta:{},valid:"".concat(_t)===e.substr(9,1)}}return{meta:{},valid:true}}function e$d(e){if(!/^[0-9]{6}[-]{0,1}[0-9]{4}$/.test(e)){return{meta:{},valid:false}}var a=e.replace(/-/g,"");var r=parseInt(a.substr(0,2),10);var s=parseInt(a.substr(2,2),10);var n=parseInt(a.substr(4,2),10);switch(true){case"5678".indexOf(a.charAt(6))!==-1&&n>=58:n+=1800;break;case"0123".indexOf(a.charAt(6))!==-1:case"49".indexOf(a.charAt(6))!==-1&&n>=37:n+=1900;break;default:n+=2e3;break}return{meta:{},valid:t$9(n,s,r)}}function t$k(t){var e=/^[0-9]{8}[-]{0,1}[A-HJ-NP-TV-Z]$/.test(t);var s=/^[XYZ][-]{0,1}[0-9]{7}[-]{0,1}[A-HJ-NP-TV-Z]$/.test(t);var n=/^[A-HNPQS][-]{0,1}[0-9]{7}[-]{0,1}[0-9A-J]$/.test(t);if(!e&&!s&&!n){return{meta:{},valid:false}}var r=t.replace(/-/g,"");var l;var a;var f=true;if(e||s){a="DNI";var _t="XYZ".indexOf(r.charAt(0));if(_t!==-1){r=_t+r.substr(1)+"";a="NIE"}l=parseInt(r.substr(0,8),10);l="TRWAGMYFPDXBNJZSQVHLCKE"[l%23];return{meta:{type:a},valid:l===r.substr(8,1)}}else{l=r.substr(1,7);a="CIF";var _t2=r[0];var _e=r.substr(-1);var _s=0;for(var _t3=0;_t3<l.length;_t3++){if(_t3%2!==0){_s+=parseInt(l[_t3],10)}else{var _e2=""+parseInt(l[_t3],10)*2;_s+=parseInt(_e2[0],10);if(_e2.length===2){_s+=parseInt(_e2[1],10)}}}var _n=_s-Math.floor(_s/10)*10;if(_n!==0){_n=10-_n}if("KQS".indexOf(_t2)!==-1){f=_e==="JABCDEFGHI"[_n]}else if("ABEH".indexOf(_t2)!==-1){f=_e===""+_n}else{f=_e===""+_n||_e==="JABCDEFGHI"[_n]}return{meta:{type:a},valid:f}}}function s$3(s){if(!/^[0-9]{6}[-+A][0-9]{3}[0-9ABCDEFHJKLMNPRSTUVWXY]$/.test(s)){return{meta:{},valid:false}}var r=parseInt(s.substr(0,2),10);var a=parseInt(s.substr(2,2),10);var e=parseInt(s.substr(4,2),10);var n={"+":1800,"-":1900,A:2e3};e=n[s.charAt(6)]+e;if(!t$9(e,a,r)){return{meta:{},valid:false}}var u=parseInt(s.substr(7,3),10);if(u<2){return{meta:{},valid:false}}var i=parseInt(s.substr(0,6)+s.substr(7,3)+"",10);return{meta:{},valid:"0123456789ABCDEFHJKLMNPRSTUVWXY".charAt(i%31)===s.charAt(10)}}function t$l(t){var s=t.toUpperCase();if(!/^(1|2)\d{2}\d{2}(\d{2}|\d[A-Z]|\d{3})\d{2,3}\d{3}\d{2}$/.test(s)){return{meta:{},valid:false}}var e=s.substr(5,2);switch(true){case/^\d{2}$/.test(e):s=t;break;case e==="2A":s="".concat(t.substr(0,5),"19").concat(t.substr(7));break;case e==="2B":s="".concat(t.substr(0,5),"18").concat(t.substr(7));break;default:return{meta:{},valid:false}}var r=97-parseInt(s.substr(0,13),10)%97;var a=r<10?"0".concat(r):"".concat(r);return{meta:{},valid:a===s.substr(13)}}function t$m(t){var e=t.toUpperCase();if(!/^[A-MP-Z]{1,2}[0-9]{6}[0-9A]$/.test(e)){return{meta:{},valid:false}}var s="ABCDEFGHIJKLMNOPQRSTUVWXYZ";var n=e.charAt(0);var r=e.charAt(1);var a=0;var c=e;if(/^[A-Z]$/.test(r)){a+=9*(10+s.indexOf(n));a+=8*(10+s.indexOf(r));c=e.substr(2)}else{a+=9*36;a+=8*(10+s.indexOf(n));c=e.substr(1)}var o=c.length;for(var _t=0;_t<o-1;_t++){a+=(7-_t)*parseInt(c.charAt(_t),10)}var f=a%11;var l=f===0?"0":11-f===10?"A":"".concat(11-f);return{meta:{},valid:l===c.charAt(o-1)}}function o$3(o){return{meta:{},valid:/^[0-9]{11}$/.test(o)&&t$1(o)}}function e$e(e){if(!/^[2-9]\d{11}$/.test(e)){return{meta:{},valid:false}}var r=e.split("").map((function(t){return parseInt(t,10)}));return{meta:{},valid:t$3(r)}}function t$n(t){if(!/^\d{7}[A-W][AHWTX]?$/.test(t)){return{meta:{},valid:false}}var r=function r(t){var r=t;while(r.length<7){r="0".concat(r)}var e="WABCDEFGHIJKLMNOPQRSTUV";var s=0;for(var _t=0;_t<7;_t++){s+=parseInt(r.charAt(_t),10)*(8-_t)}s+=9*e.indexOf(r.substr(7));return e[s%23]};var e=t.length===9&&("A"===t.charAt(8)||"H"===t.charAt(8))?t.charAt(7)===r(t.substr(0,7)+t.substr(8)+""):t.charAt(7)===r(t.substr(0,7));return{meta:{},valid:e}}function e$f(e){if(!/^\d{1,9}$/.test(e)){return{meta:{},valid:false}}return{meta:{},valid:t(e)}}function e$g(e){if(!/^[0-9]{6}[-]{0,1}[0-9]{4}$/.test(e)){return{meta:{},valid:false}}var r=e.replace(/-/g,"");var s=parseInt(r.substr(0,2),10);var a=parseInt(r.substr(2,2),10);var n=parseInt(r.substr(4,2),10);var l=parseInt(r.charAt(9),10);n=l===9?1900+n:(20+l)*100+n;if(!t$9(n,a,s,true)){return{meta:{},valid:false}}var c=[3,2,7,6,5,4,3,2];var i=0;for(var _t=0;_t<8;_t++){i+=parseInt(r.charAt(_t),10)*c[_t]}i=11-i%11;return{meta:{},valid:"".concat(i)===r.charAt(8)}}function e$h(e){var a=e.replace("-","");if(!/^\d{13}$/.test(a)){return{meta:{},valid:false}}var s=a.charAt(6);var r=parseInt(a.substr(0,2),10);var c=parseInt(a.substr(2,2),10);var n=parseInt(a.substr(4,2),10);switch(s){case"1":case"2":case"5":case"6":r+=1900;break;case"3":case"4":case"7":case"8":r+=2e3;break;default:r+=1800;break}
26327if(!t$9(r,c,n)){return{meta:{},valid:false}}var l=[2,3,4,5,6,7,8,9,2,3,4,5];var o=a.length;var i=0;for(var _t=0;_t<o-1;_t++){i+=l[_t]*parseInt(a.charAt(_t),10)}var u=(11-i%11)%10;return{meta:{},valid:"".concat(u)===a.charAt(o-1)}}function r$5(r){if(!/^[0-9]{11}$/.test(r)){return{meta:{},valid:false}}var e=parseInt(r.charAt(0),10);var a=parseInt(r.substr(1,2),10);var s=parseInt(r.substr(3,2),10);var n=parseInt(r.substr(5,2),10);var i=e%2===0?17+e/2:17+(e+1)/2;a=i*100+a;if(!t$9(a,s,n,true)){return{meta:{},valid:false}}var l=[1,2,3,4,5,6,7,8,9,1];var f=0;var u;for(u=0;u<10;u++){f+=parseInt(r.charAt(u),10)*l[u]}f=f%11;if(f!==10){return{meta:{},valid:"".concat(f)===r.charAt(10)}}f=0;l=[3,4,5,6,7,8,9,1,2,3];for(u=0;u<10;u++){f+=parseInt(r.charAt(u),10)*l[u]}f=f%11;if(f===10){f=0}return{meta:{},valid:"".concat(f)===r.charAt(10)}}function e$i(e){if(!/^[0-9]{6}[-]{0,1}[0-9]{5}$/.test(e)){return{meta:{},valid:false}}var r=e.replace(/\D/g,"");var a=parseInt(r.substr(0,2),10);var s=parseInt(r.substr(2,2),10);var n=parseInt(r.substr(4,2),10);n=n+1800+parseInt(r.charAt(6),10)*100;if(!t$9(n,s,a,true)){return{meta:{},valid:false}}var l=0;var i=[10,5,8,4,2,1,6,3,7,9];for(var _t=0;_t<10;_t++){l+=parseInt(r.charAt(_t),10)*i[_t]}l=(l+1)%11%10;return{meta:{},valid:"".concat(l)===r.charAt(10)}}function r$6(r){return{meta:{},valid:t$g(r,"ME")}}function r$7(r){return{meta:{},valid:t$g(r,"MK")}}function O(O){var t=O.toUpperCase();if(!/^[A-Z]{4}\d{6}[A-Z]{6}[0-9A-Z]\d$/.test(t)){return{meta:{},valid:false}}var C=["BACA","BAKA","BUEI","BUEY","CACA","CACO","CAGA","CAGO","CAKA","CAKO","COGE","COGI","COJA","COJE","COJI","COJO","COLA","CULO","FALO","FETO","GETA","GUEI","GUEY","JETA","JOTO","KACA","KACO","KAGA","KAGO","KAKA","KAKO","KOGE","KOGI","KOJA","KOJE","KOJI","KOJO","KOLA","KULO","LILO","LOCA","LOCO","LOKA","LOKO","MAME","MAMO","MEAR","MEAS","MEON","MIAR","MION","MOCO","MOKO","MULA","MULO","NACA","NACO","PEDA","PEDO","PENE","PIPI","PITO","POPO","PUTA","PUTO","QULO","RATA","ROBA","ROBE","ROBO","RUIN","SENO","TETA","VACA","VAGA","VAGO","VAKA","VUEI","VUEY","WUEI","WUEY"];var e=t.substr(0,4);if(C.indexOf(e)>=0){return{meta:{},valid:false}}var s=parseInt(t.substr(4,2),10);var r=parseInt(t.substr(6,2),10);var a=parseInt(t.substr(6,2),10);if(/^[0-9]$/.test(t.charAt(16))){s+=1900}else{s+=2e3}if(!t$9(s,r,a)){return{meta:{},valid:false}}var E=t.charAt(10);if(E!=="H"&&E!=="M"){return{meta:{},valid:false}}var n=t.substr(11,2);var K=["AS","BC","BS","CC","CH","CL","CM","CS","DF","DG","GR","GT","HG","JC","MC","MN","MS","NE","NL","NT","OC","PL","QR","QT","SL","SP","SR","TC","TL","TS","VZ","YN","ZS"];if(K.indexOf(n)===-1){return{meta:{},valid:false}}var i="0123456789ABCDEFGHIJKLMN&OPQRSTUVWXYZ";var L=0;var l=t.length;for(var _A=0;_A<l-1;_A++){L+=(18-_A)*i.indexOf(t.charAt(_A))}L=(10-L%10)%10;return{meta:{},valid:"".concat(L)===t.charAt(l-1)}}function s$4(s){if(!/^\d{12}$/.test(s)){return{meta:{},valid:false}}var e=parseInt(s.substr(0,2),10);var r=parseInt(s.substr(2,2),10);var a=parseInt(s.substr(4,2),10);if(!t$9(e+1900,r,a)&&!t$9(e+2e3,r,a)){return{meta:{},valid:false}}var n=s.substr(6,2);var i=["17","18","19","20","69","70","73","80","81","94","95","96","97"];return{meta:{},valid:i.indexOf(n)===-1}}function e$j(e){if(e.length<8){return{meta:{},valid:false}}var t=e;if(t.length===8){t="0".concat(t)}if(!/^[0-9]{4}[.]{0,1}[0-9]{2}[.]{0,1}[0-9]{3}$/.test(t)){return{meta:{},valid:false}}t=t.replace(/\./g,"");if(parseInt(t,10)===0){return{meta:{},valid:false}}var a=0;var l=t.length;for(var _e=0;_e<l-1;_e++){a+=(9-_e)*parseInt(t.charAt(_e),10)}a=a%11;if(a===10){a=0}return{meta:{},valid:"".concat(a)===t.charAt(l-1)}}function t$o(t){if(!/^\d{11}$/.test(t)){return{meta:{},valid:false}}var r=function r(t){var r=[3,7,6,1,8,9,4,5,2];var e=0;for(var n=0;n<9;n++){e+=r[n]*parseInt(t.charAt(n),10)}return 11-e%11};var e=function e(t){var r=[5,4,3,2,7,6,5,4,3,2];var e=0;for(var n=0;n<10;n++){e+=r[n]*parseInt(t.charAt(n),10)}return 11-e%11};return{meta:{},valid:"".concat(r(t))===t.substr(-2,1)&&"".concat(e(t))===t.substr(-1)}}function t$p(t){if(!/^\d{8}[0-9A-Z]*$/.test(t)){return{meta:{},valid:false}}if(t.length===8){return{meta:{},valid:true}}var e=[3,2,7,6,5,4,3,2];var r=0;for(var _a=0;_a<8;_a++){r+=e[_a]*parseInt(t.charAt(_a),10)}var a=r%11;var n=[6,5,4,3,2,1,1,0,9,8,7][a];var c="KJIHGFEDCBA".charAt(a);return{meta:{},valid:t.charAt(8)==="".concat(n)||t.charAt(8)===c}}function t$q(t){if(!/^[0-9]{11}$/.test(t)){return{meta:{},valid:false}}var e=0;var a=t.length;var r=[1,3,7,9,1,3,7,9,1,3,7];for(var n=0;n<a-1;n++){e+=r[n]*parseInt(t.charAt(n),10)}e=e%10;if(e===0){e=10}e=10-e;return{meta:{},valid:"".concat(e)===t.charAt(a-1)}}function e$k(e){if(!/^[0-9]{13}$/.test(e)){return{meta:{},valid:false}}var a=parseInt(e.charAt(0),10);if(a===0||a===7||a===8){return{meta:{},valid:false}}var r=parseInt(e.substr(1,2),10);var s=parseInt(e.substr(3,2),10);var n=parseInt(e.substr(5,2),10);var i={1:1900,2:1900,3:1800,4:1800,5:2e3,6:2e3};
26327if(n>31&&s>12){return{meta:{},valid:false}}if(a!==9){r=i[a+""]+r;if(!t$9(r,s,n)){return{meta:{},valid:false}}}var l=0;var f=[2,7,9,1,4,6,3,5,8,2,7,9];var o=e.length;for(var _t=0;_t<o-1;_t++){l+=parseInt(e.charAt(_t),10)*f[_t]}l=l%11;if(l===10){l=1}return{meta:{},valid:"".concat(l)===e.charAt(o-1)}}function r$8(r){return{meta:{},valid:t$g(r,"RS")}}function r$9(r){if(!/^[0-9]{10}$/.test(r)&&!/^[0-9]{6}[-|+][0-9]{4}$/.test(r)){return{meta:{},valid:false}}var e=r.replace(/[^0-9]/g,"");var a=parseInt(e.substr(0,2),10)+1900;var n=parseInt(e.substr(2,2),10);var i=parseInt(e.substr(4,2),10);if(!t$9(a,n,i)){return{meta:{},valid:false}}return{meta:{},valid:t(e)}}function r$a(r){return{meta:{},valid:t$g(r,"SI")}}function t$r(t){return{meta:{},valid:/^\d{5}$/.test(t)}}function t$s(t){if(t.length!==13){return{meta:{},valid:false}}var e=0;for(var a=0;a<12;a++){e+=parseInt(t.charAt(a),10)*(13-a)}return{meta:{},valid:(11-e%11)%10===parseInt(t.charAt(12),10)}}function t$t(t){if(t.length!==11){return{meta:{},valid:false}}var e=0;for(var a=0;a<10;a++){e+=parseInt(t.charAt(a),10)}return{meta:{},valid:e%10===parseInt(t.charAt(10),10)}}function t$u(t){var e=t.toUpperCase();if(!/^[A-Z][12][0-9]{8}$/.test(e)){return{meta:{},valid:false}}var a=e.length;var n="ABCDEFGHJKLMNPQRSTUVXYWZIO";var r=n.indexOf(e.charAt(0))+10;var o=Math.floor(r/10)+r%10*(a-1);var s=0;for(var _t=1;_t<a-1;_t++){s+=parseInt(e.charAt(_t),10)*(a-1-_t)}return{meta:{},valid:(o+s+parseInt(e.charAt(a-1),10))%10===0}}function t$v(t){if(!/^\d{8}$/.test(t)){return{meta:{},valid:false}}var e=[2,9,8,7,6,3,4];var a=0;for(var r=0;r<7;r++){a+=parseInt(t.charAt(r),10)*e[r]}a=a%10;if(a>0){a=10-a}return{meta:{},valid:"".concat(a)===t.charAt(7)}}function r$b(r){if(!/^[0-9]{10}[0|1][8|9][0-9]$/.test(r)){return{meta:{},valid:false}}var s=parseInt(r.substr(0,2),10);var a=(new Date).getFullYear()%100;var l=parseInt(r.substr(2,2),10);var n=parseInt(r.substr(4,2),10);s=s>=a?s+1900:s+2e3;if(!t$9(s,l,n)){return{meta:{},valid:false}}return{meta:{},valid:t(r)}}function F(){var F=["AR","BA","BG","BR","CH","CL","CN","CO","CZ","DK","EE","ES","FI","FR","HK","HR","ID","IE","IL","IS","KR","LT","LV","ME","MK","MX","MY","NL","NO","PE","PL","RO","RS","SE","SI","SK","SM","TH","TR","TW","UY","ZA"];return{validate:function validate(P){if(P.value===""){return{valid:true}}var Y=Object.assign({},{message:""},P.options);var Z=P.value.substr(0,2);if("function"===typeof Y.country){Z=Y.country.call(this)}else{Z=Y.country}if(F.indexOf(Z)===-1){return{valid:true}}var G={meta:{},valid:true};switch(Z.toLowerCase()){case"ar":G=t$f(P.value);break;case"ba":G=r$3(P.value);break;case"bg":G=e$a(P.value);break;case"br":G=t$h(P.value);break;case"ch":G=t$i(P.value);break;case"cl":G=e$b(P.value);break;case"cn":G=r$4(P.value);break;case"co":G=t$j(P.value);break;case"cz":G=e$c(P.value);break;case"dk":G=e$d(P.value);break;case"ee":G=r$5(P.value);break;case"es":G=t$k(P.value);break;case"fi":G=s$3(P.value);break;case"fr":G=t$l(P.value);break;case"hk":G=t$m(P.value);break;case"hr":G=o$3(P.value);break;case"id":G=e$e(P.value);break;case"ie":G=t$n(P.value);break;case"il":G=e$f(P.value);break;case"is":G=e$g(P.value);break;case"kr":G=e$h(P.value);break;case"lt":G=r$5(P.value);break;case"lv":G=e$i(P.value);break;case"me":G=r$6(P.value);break;case"mk":G=r$7(P.value);break;case"mx":G=O(P.value);break;case"my":G=s$4(P.value);break;case"nl":G=e$j(P.value);break;case"no":G=t$o(P.value);break;case"pe":G=t$p(P.value);break;case"pl":G=t$q(P.value);break;case"ro":G=e$k(P.value);break;case"rs":G=r$8(P.value);break;case"se":G=r$9(P.value);break;case"si":G=r$a(P.value);break;case"sk":G=e$c(P.value);break;case"sm":G=t$r(P.value);break;case"th":G=t$s(P.value);break;case"tr":G=t$t(P.value);break;case"tw":G=t$u(P.value);break;case"uy":G=t$v(P.value);break;case"za":G=r$b(P.value);break}var V=r(P.l10n?Y.message||P.l10n.id.country:Y.message,P.l10n?P.l10n.id.countries[Z.toUpperCase()]:Z.toUpperCase());return Object.assign({},{message:V},G)}}}function t$w(){return{validate:function validate(t$1){if(t$1.value===""){return{valid:true}}switch(true){case/^\d{15}$/.test(t$1.value):case/^\d{2}-\d{6}-\d{6}-\d{1}$/.test(t$1.value):case/^\d{2}\s\d{6}\s\d{6}\s\d{1}$/.test(t$1.value):return{valid:t(t$1.value.replace(/[^0-9]/g,""))};case/^\d{14}$/.test(t$1.value):case/^\d{16}$/.test(t$1.value):case/^\d{2}-\d{6}-\d{6}(|-\d{2})$/.test(t$1.value):case/^\d{2}\s\d{6}\s\d{6}(|\s\d{2})$/.test(t$1.value):return{valid:true};default:return{valid:false}}}}}function e$l(){return{validate:function validate(e){if(e.value===""){return{valid:true}}if(!/^IMO \d{7}$/i.test(e.value)){return{valid:false}}var t=e.value.replace(/^.*(\d{7})$/,"$1");var r=0;for(var _e=6;_e>=1;_e--){r+=parseInt(t.slice(6-_e,-_e),10)*(_e+1)}return{valid:r%10===parseInt(t.charAt(6),10)}}}}function e$m(){return{validate:function validate(e){if(e.value===""){return{meta:{type:null},valid:true}}var t;switch(true){case/^\d{9}[\dX]$/.test(e.value):case e.value.length===13&&/^(\d+)-(\d+)-(\d+)-([\dX])$/.test(e.value):case e.value.length===13&&/^(\d+)\s(\d+)\s(\d+)\s([\dX])$/.test(e.value):t="ISBN10";break;case/^(978|979)\d{9}[\dX]$/.test(e.value):case e.value.length===17&&/^(978|979)-(\d+)-(\d+)-(\d+)-([\dX])$/.test(e.value):case e.value.length===17&&/^(978|979)\s(\d+)\s(\d+)\s(\d+)\s([\dX])$/.test(e.value):t="ISBN13";break;default:return{meta:{type:null},valid:false}}var a=e.value.replace(/[^0-9X]/gi,"").split("");var l=a.length;var s=0;var d;var u;switch(t){case"ISBN10":s=0;for(d=0;d<l-1;d++){s+=parseInt(a[d],10)*(10-d)}u=11-s%11;if(u===11){u=0}else if(u===10){u="X"}return{meta:{type:t}
26327,valid:"".concat(u)===a[l-1]};case"ISBN13":s=0;for(d=0;d<l-1;d++){s+=d%2===0?parseInt(a[d],10):parseInt(a[d],10)*3}u=10-s%10;if(u===10){u="0"}return{meta:{type:t},valid:"".concat(u)===a[l-1]}}}}}function M(){var M="AF|AX|AL|DZ|AS|AD|AO|AI|AQ|AG|AR|AM|AW|AU|AT|AZ|BS|BH|BD|BB|BY|BE|BZ|BJ|BM|BT|BO|BQ|BA|BW|"+"BV|BR|IO|BN|BG|BF|BI|KH|CM|CA|CV|KY|CF|TD|CL|CN|CX|CC|CO|KM|CG|CD|CK|CR|CI|HR|CU|CW|CY|CZ|DK|DJ|DM|DO|EC|EG|"+"SV|GQ|ER|EE|ET|FK|FO|FJ|FI|FR|GF|PF|TF|GA|GM|GE|DE|GH|GI|GR|GL|GD|GP|GU|GT|GG|GN|GW|GY|HT|HM|VA|HN|HK|HU|IS|"+"IN|ID|IR|IQ|IE|IM|IL|IT|JM|JP|JE|JO|KZ|KE|KI|KP|KR|KW|KG|LA|LV|LB|LS|LR|LY|LI|LT|LU|MO|MK|MG|MW|MY|MV|ML|MT|"+"MH|MQ|MR|MU|YT|MX|FM|MD|MC|MN|ME|MS|MA|MZ|MM|NA|NR|NP|NL|NC|NZ|NI|NE|NG|NU|NF|MP|NO|OM|PK|PW|PS|PA|PG|PY|PE|"+"PH|PN|PL|PT|PR|QA|RE|RO|RU|RW|BL|SH|KN|LC|MF|PM|VC|WS|SM|ST|SA|SN|RS|SC|SL|SG|SX|SK|SI|SB|SO|ZA|GS|SS|ES|LK|"+"SD|SR|SJ|SZ|SE|CH|SY|TW|TJ|TZ|TH|TL|TG|TK|TO|TT|TN|TR|TM|TC|TV|UG|UA|AE|GB|US|UM|UY|UZ|VU|VE|VN|VG|VI|WF|EH|"+"YE|ZM|ZW";return{validate:function validate(t){if(t.value===""){return{valid:true}}var S=t.value.toUpperCase();var A=new RegExp("^("+M+")[0-9A-Z]{10}$");if(!A.test(t.value)){return{valid:false}}var G=S.length;var C="";var T;for(T=0;T<G-1;T++){var _M=S.charCodeAt(T);C+=_M>57?(_M-55).toString():S.charAt(T)}var e="";var B=C.length;var E=B%2!==0?0:1;for(T=0;T<B;T++){e+=parseInt(C[T],10)*(T%2===E?2:1)+""}var N=0;for(T=0;T<e.length;T++){N+=parseInt(e.charAt(T),10)}N=(10-N%10)%10;return{valid:"".concat(N)===S.charAt(G-1)}}}}function e$n(){return{validate:function validate(e){if(e.value===""){return{meta:null,valid:true}}var t;switch(true){case/^M\d{9}$/.test(e.value):case/^M-\d{4}-\d{4}-\d{1}$/.test(e.value):case/^M\s\d{4}\s\d{4}\s\d{1}$/.test(e.value):t="ISMN10";break;case/^9790\d{9}$/.test(e.value):case/^979-0-\d{4}-\d{4}-\d{1}$/.test(e.value):case/^979\s0\s\d{4}\s\d{4}\s\d{1}$/.test(e.value):t="ISMN13";break;default:return{meta:null,valid:false}}var a=e.value;if("ISMN10"===t){a="9790".concat(a.substr(1))}a=a.replace(/[^0-9]/gi,"");var s=0;var l=a.length;var d=[1,3];for(var _e=0;_e<l-1;_e++){s+=parseInt(a.charAt(_e),10)*d[_e%2]}s=(10-s%10)%10;return{meta:{type:t},valid:"".concat(s)===a.charAt(l-1)}}}}function e$o(){return{validate:function validate(e){if(e.value===""){return{valid:true}}if(!/^\d{4}-\d{3}[\dX]$/.test(e.value)){return{valid:false}}var t=e.value.replace(/[^0-9X]/gi,"").split("");var l=t.length;var r=0;if(t[7]==="X"){t[7]="10"}for(var _e=0;_e<l;_e++){r+=parseInt(t[_e],10)*(8-_e)}return{valid:r%11===0}}}}function a$6(){return{validate:function validate(a){return{valid:a.value===""||/^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/.test(a.value)||/^([0-9A-Fa-f]{4}\.){2}([0-9A-Fa-f]{4})$/.test(a.value)}}}}function e$p(){return{validate:function validate(e){if(e.value===""){return{valid:true}}var r=e.value;if(/^[0-9A-F]{15}$/i.test(r)||/^[0-9A-F]{2}[- ][0-9A-F]{6}[- ][0-9A-F]{6}[- ][0-9A-F]$/i.test(r)||/^\d{19}$/.test(r)||/^\d{5}[- ]\d{5}[- ]\d{4}[- ]\d{4}[- ]\d$/.test(r)){var _e=r.charAt(r.length-1).toUpperCase();r=r.replace(/[- ]/g,"");if(r.match(/^\d*$/i)){return{valid:t(r)}}r=r.slice(0,-1);var a="";var i;for(i=1;i<=13;i+=2){a+=(parseInt(r.charAt(i),16)*2).toString(16)}var l=0;for(i=0;i<a.length;i++){l+=parseInt(a.charAt(i),16)}return{valid:l%10===0?_e==="0":_e===((Math.floor((l+10)/10)*10-l)*2).toString(16).toUpperCase()}}if(/^[0-9A-F]{14}$/i.test(r)||/^[0-9A-F]{2}[- ][0-9A-F]{6}[- ][0-9A-F]{6}$/i.test(r)||/^\d{18}$/.test(r)||/^\d{5}[- ]\d{5}[- ]\d{4}[- ]\d{4}$/.test(r)){return{valid:true}}return{valid:false}}}}function e$q(){var e=["AE","BG","BR","CN","CZ","DE","DK","ES","FR","GB","IN","MA","NL","PK","RO","RU","SK","TH","US","VE"];return{validate:function validate(t){if(t.value===""){return{valid:true}}var a=Object.assign({},{message:""},t.options);var d=t.value.trim();var r$1=d.substr(0,2);if("function"===typeof a.country){r$1=a.country.call(this)}else{r$1=a.country}if(!r$1||e.indexOf(r$1.toUpperCase())===-1){return{valid:true}}var c=true;switch(r$1.toUpperCase()){case"AE":c=/^(((\+|00)?971[\s.-]?(\(0\)[\s.-]?)?|0)(\(5(0|2|5|6)\)|5(0|2|5|6)|2|3|4|6|7|9)|60)([\s.-]?[0-9]){7}$/.test(d);break;case"BG":c=/^(0|359|00)(((700|900)[0-9]{5}|((800)[0-9]{5}|(800)[0-9]{4}))|(87|88|89)([0-9]{7})|((2[0-9]{7})|(([3-9][0-9])(([0-9]{6})|([0-9]{5})))))$/.test(d.replace(/\+|\s|-|\/|\(|\)/gi,""));break;case"BR":c=/^(([\d]{4}[-.\s]{1}[\d]{2,3}[-.\s]{1}[\d]{2}[-.\s]{1}[\d]{2})|([\d]{4}[-.\s]{1}[\d]{3}[-.\s]{1}[\d]{4})|((\(?\+?[0-9]{2}\)?\s?)?(\(?\d{2}\)?\s?)?\d{4,5}[-.\s]?\d{4}))$/.test(d);break;case"CN":c=/^((00|\+)?(86(?:-| )))?((\d{11})|(\d{3}[- ]{1}\d{4}[- ]{1}\d{4})|((\d{2,4}[- ]){1}(\d{7,8}|(\d{3,4}[- ]{1}\d{4}))([- ]{1}\d{1,4})?))$/.test(d);break;case"CZ":c=/^(((00)([- ]?)|\+)(420)([- ]?))?((\d{3})([- ]?)){2}(\d{3})$/.test(d);break;case"DE":c=/^(((((((00|\+)49[ \-/]?)|0)[1-9][0-9]{1,4})[ \-/]?)|((((00|\+)49\()|\(0)[1-9][0-9]{1,4}\)[ \-/]?))[0-9]{1,7}([ \-/]?[0-9]{1,5})?)$/.test(d);break;case"DK":c=/^(\+45|0045|\(45\))?\s?[2-9](\s?\d){7}$/.test(d);break;
26327case"ES":c=/^(?:(?:(?:\+|00)34\D?))?(?:5|6|7|8|9)(?:\d\D?){8}$/.test(d);break;case"FR":c=/^(?:(?:(?:\+|00)33[ ]?(?:\(0\)[ ]?)?)|0){1}[1-9]{1}([ .-]?)(?:\d{2}\1?){3}\d{2}$/.test(d);break;case"GB":c=/^\(?(?:(?:0(?:0|11)\)?[\s-]?\(?|\+)44\)?[\s-]?\(?(?:0\)?[\s-]?\(?)?|0)(?:\d{2}\)?[\s-]?\d{4}[\s-]?\d{4}|\d{3}\)?[\s-]?\d{3}[\s-]?\d{3,4}|\d{4}\)?[\s-]?(?:\d{5}|\d{3}[\s-]?\d{3})|\d{5}\)?[\s-]?\d{4,5}|8(?:00[\s-]?11[\s-]?11|45[\s-]?46[\s-]?4\d))(?:(?:[\s-]?(?:x|ext\.?\s?|#)\d+)?)$/.test(d);break;case"IN":c=/((\+?)((0[ -]+)*|(91 )*)(\d{12}|\d{10}))|\d{5}([- ]*)\d{6}/.test(d);break;case"MA":c=/^(?:(?:(?:\+|00)212[\s]?(?:[\s]?\(0\)[\s]?)?)|0){1}(?:5[\s.-]?[2-3]|6[\s.-]?[13-9]){1}[0-9]{1}(?:[\s.-]?\d{2}){3}$/.test(d);break;case"NL":c=/^((\+|00(\s|\s?-\s?)?)31(\s|\s?-\s?)?(\(0\)[-\s]?)?|0)[1-9]((\s|\s?-\s?)?[0-9])((\s|\s?-\s?)?[0-9])((\s|\s?-\s?)?[0-9])\s?[0-9]\s?[0-9]\s?[0-9]\s?[0-9]\s?[0-9]$/gm.test(d);break;case"PK":c=/^0?3[0-9]{2}[0-9]{7}$/.test(d);break;case"RO":c=/^(\+4|)?(07[0-8]{1}[0-9]{1}|02[0-9]{2}|03[0-9]{2}){1}?(\s|\.|-)?([0-9]{3}(\s|\.|-|)){2}$/g.test(d);break;case"RU":c=/^((8|\+7|007)[-./ ]?)?([(/.]?\d{3}[)/.]?[-./ ]?)?[\d\-./ ]{7,10}$/g.test(d);break;case"SK":c=/^(((00)([- ]?)|\+)(421)([- ]?))?((\d{3})([- ]?)){2}(\d{3})$/.test(d);break;case"TH":c=/^0\(?([6|8-9]{2})*-([0-9]{3})*-([0-9]{4})$/.test(d);break;case"VE":c=/^0(?:2(?:12|4[0-9]|5[1-9]|6[0-9]|7[0-8]|8[1-35-8]|9[1-5]|3[45789])|4(?:1[246]|2[46]))\d{7}$/.test(d);break;case"US":default:c=/^(?:(1-?)|(\+1 ?))?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}$/.test(d);break}return{message:r(t.l10n?a.message||t.l10n.phone.country:a.message,t.l10n?t.l10n.phone.countries[r$1]:r$1),valid:c}}}}function e$r(){return{validate:function validate(e){if(e.value===""){return{valid:true}}if(!/^\d{9}$/.test(e.value)){return{valid:false}}var t=0;for(var a=0;a<e.value.length;a+=3){t+=parseInt(e.value.charAt(a),10)*3+parseInt(e.value.charAt(a+1),10)*7+parseInt(e.value.charAt(a+2),10)}return{valid:t!==0&&t%10===0}}}}function t$x(){return{validate:function validate(t){if(t.value===""){return{valid:true}}var e=t.value.toUpperCase();if(!/^[0-9A-Z]{7}$/.test(e)){return{valid:false}}var r=[1,3,1,7,3,9,1];var a=e.length;var l=0;for(var _t=0;_t<a-1;_t++){l+=r[_t]*parseInt(e.charAt(_t),36)}l=(10-l%10)%10;return{valid:"".concat(l)===e.charAt(a-1)}}}}function e$s(){return{validate:function validate(e){return{valid:e.value===""||/^\d{9}$/.test(e.value)&&t(e.value)}}}}function e$t(){return{validate:function validate(e){if(e.value===""){return{valid:true}}var t=e.value.length;var l=0;var r;for(var a=0;a<t;a++){r=parseInt(e.value.charAt(a),10);if(a%2===0){r=r*2;if(r>9){r-=9}}l+=r}return{valid:l%10===0}}}}function e$u(){var e=function e(t,_e){var s=Math.pow(10,_e);var a=t*s;var n;switch(true){case a===0:n=0;break;case a>0:n=1;break;case a<0:n=-1;break}var r=a%1===.5*n;return r?(Math.floor(a)+(n>0?1:0))/s:Math.round(a)/s};var s=function s(t,_s){if(_s===0){return 1}var a="".concat(t).split(".");var n="".concat(_s).split(".");var r=(a.length===1?0:a[1].length)+(n.length===1?0:n[1].length);return e(t-_s*Math.floor(t/_s),r)};return{validate:function validate(e){if(e.value===""){return{valid:true}}var a=parseFloat(e.value);if(isNaN(a)||!isFinite(a)){return{valid:false}}var n=Object.assign({},{baseValue:0,message:"",step:1},e.options);var r$1=s(a-n.baseValue,n.step);return{message:r(e.l10n?n.message||e.l10n.step["default"]:n.message,"".concat(n.step)),valid:r$1===0||r$1===n.step}}}}function s$5(){return{validate:function validate(s){if(s.value===""){return{valid:true}}var A=Object.assign({},{message:""},s.options);var i={3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i};var n=A.version?"".concat(A.version):"all";return{message:A.version?r(s.l10n?A.message||s.l10n.uuid.version:A.message,A.version):s.l10n?s.l10n.uuid["default"]:A.message,valid:null===i[n]?true:i[n].test(s.value)}}}}function t$y(t){var e=t.replace("-","");if(/^AR[0-9]{11}$/.test(e)){e=e.substr(2)}if(!/^[0-9]{11}$/.test(e)){return{meta:{},valid:false}}var r=[5,4,3,2,7,6,5,4,3,2];var a=0;for(var _t=0;_t<10;_t++){a+=parseInt(e.charAt(_t),10)*r[_t]}a=11-a%11;if(a===11){a=0}return{meta:{},valid:"".concat(a)===e.substr(10)}}function t$z(t){var e=t;if(/^ATU[0-9]{8}$/.test(e)){e=e.substr(2)}if(!/^U[0-9]{8}$/.test(e)){return{meta:{},valid:false}}e=e.substr(1);var r=[1,2,1,2,1,2,1];var s=0;var a=0;for(var _t=0;_t<7;_t++){a=parseInt(e.charAt(_t),10)*r[_t];
26327if(a>9){a=Math.floor(a/10)+a%10}s+=a}s=10-(s+4)%10;if(s===10){s=0}return{meta:{},valid:"".concat(s)===e.substr(7,1)}}function t$A(t){var e=t;if(/^BE[0]?[0-9]{9}$/.test(e)){e=e.substr(2)}if(!/^[0]?[0-9]{9}$/.test(e)){return{meta:{},valid:false}}if(e.length===9){e="0".concat(e)}if(e.substr(1,1)==="0"){return{meta:{},valid:false}}var s=parseInt(e.substr(0,8),10)+parseInt(e.substr(8,2),10);return{meta:{},valid:s%97===0}}function r$c(r){var e=r;if(/^BG[0-9]{9,10}$/.test(e)){e=e.substr(2)}if(!/^[0-9]{9,10}$/.test(e)){return{meta:{},valid:false}}var s=0;var n=0;if(e.length===9){for(n=0;n<8;n++){s+=parseInt(e.charAt(n),10)*(n+1)}s=s%11;if(s===10){s=0;for(n=0;n<8;n++){s+=parseInt(e.charAt(n),10)*(n+3)}s=s%11}s=s%10;return{meta:{},valid:"".concat(s)===e.substr(8)}}else{var _r=function _r(r){var e=parseInt(r.substr(0,2),10)+1900;var s=parseInt(r.substr(2,2),10);var n=parseInt(r.substr(4,2),10);if(s>40){e+=100;s-=40}else if(s>20){e-=100;s-=20}if(!t$9(e,s,n)){return false}var a=[2,4,8,5,10,9,7,3,6];var l=0;for(var _t=0;_t<9;_t++){l+=parseInt(r.charAt(_t),10)*a[_t]}l=l%11%10;return"".concat(l)===r.substr(9,1)};var _s=function _s(t){var r=[21,19,17,13,11,9,7,3,1];var e=0;for(var _s2=0;_s2<9;_s2++){e+=parseInt(t.charAt(_s2),10)*r[_s2]}e=e%10;return"".concat(e)===t.substr(9,1)};var _n=function _n(t){var r=[4,3,2,7,6,5,4,3,2];var e=0;for(var _s3=0;_s3<9;_s3++){e+=parseInt(t.charAt(_s3),10)*r[_s3]}e=11-e%11;if(e===10){return false}if(e===11){e=0}return"".concat(e)===t.substr(9,1)};return{meta:{},valid:_r(e)||_s(e)||_n(e)}}}function t$B(t){if(t===""){return{meta:{},valid:true}}var e=t.replace(/[^\d]+/g,"");if(e===""||e.length!==14){return{meta:{},valid:false}}if(e==="00000000000000"||e==="11111111111111"||e==="22222222222222"||e==="33333333333333"||e==="44444444444444"||e==="55555555555555"||e==="66666666666666"||e==="77777777777777"||e==="88888888888888"||e==="99999999999999"){return{meta:{},valid:false}}var r=e.length-2;var a=e.substring(0,r);var l=e.substring(r);var n=0;var i=r-7;var s;for(s=r;s>=1;s--){n+=parseInt(a.charAt(r-s),10)*i--;if(i<2){i=9}}var f=n%11<2?0:11-n%11;if(f!==parseInt(l.charAt(0),10)){return{meta:{},valid:false}}r=r+1;a=e.substring(0,r);n=0;i=r-7;for(s=r;s>=1;s--){n+=parseInt(a.charAt(r-s),10)*i--;if(i<2){i=9}}f=n%11<2?0:11-n%11;return{meta:{},valid:f===parseInt(l.charAt(1),10)}}function t$C(t){var e=t;if(/^CHE[0-9]{9}(MWST|TVA|IVA|TPV)?$/.test(e)){e=e.substr(2)}if(!/^E[0-9]{9}(MWST|TVA|IVA|TPV)?$/.test(e)){return{meta:{},valid:false}}e=e.substr(1);var r=[5,4,3,2,7,6,5,4];var s=0;for(var _t=0;_t<8;_t++){s+=parseInt(e.charAt(_t),10)*r[_t]}s=11-s%11;if(s===10){return{meta:{},valid:false}}if(s===11){s=0}return{meta:{},valid:"".concat(s)===e.substr(8,1)}}function t$D(t){var e=t;if(/^CY[0-5|9][0-9]{7}[A-Z]$/.test(e)){e=e.substr(2)}if(!/^[0-5|9][0-9]{7}[A-Z]$/.test(e)){return{meta:{},valid:false}}if(e.substr(0,2)==="12"){return{meta:{},valid:false}}var r=0;var s={0:1,1:0,2:5,3:7,4:9,5:13,6:15,7:17,8:19,9:21};for(var _t=0;_t<8;_t++){var a=parseInt(e.charAt(_t),10);if(_t%2===0){a=s["".concat(a)]}r+=a}return{meta:{},valid:"".concat("ABCDEFGHIJKLMNOPQRSTUVWXYZ"[r%26])===e.substr(8,1)}}function e$v(e){var r=e;if(/^CZ[0-9]{8,10}$/.test(r)){r=r.substr(2)}if(!/^[0-9]{8,10}$/.test(r)){return{meta:{},valid:false}}var a=0;var s=0;if(r.length===8){if("".concat(r.charAt(0))==="9"){return{meta:{},valid:false}}a=0;for(s=0;s<7;s++){a+=parseInt(r.charAt(s),10)*(8-s)}a=11-a%11;if(a===10){a=0}if(a===11){a=1}return{meta:{},valid:"".concat(a)===r.substr(7,1)}}else if(r.length===9&&"".concat(r.charAt(0))==="6"){a=0;for(s=0;s<7;s++){a+=parseInt(r.charAt(s+1),10)*(8-s)}a=11-a%11;if(a===10){a=0}if(a===11){a=1}a=[8,7,6,5,4,3,2,1,0,9,10][a-1];return{meta:{},valid:"".concat(a)===r.substr(8,1)}}else if(r.length===9||r.length===10){var _e=1900+parseInt(r.substr(0,2),10);var _a=parseInt(r.substr(2,2),10)%50%20;var _s=parseInt(r.substr(4,2),10);if(r.length===9){if(_e>=1980){_e-=100}if(_e>1953){return{meta:{},valid:false}}}else if(_e<1954){_e+=100}if(!t$9(_e,_a,_s)){return{meta:{},valid:false}}if(r.length===10){var _t=parseInt(r.substr(0,9),10)%11;if(_e<1985){_t=_t%10}return{meta:{}
26327,valid:"".concat(_t)===r.substr(9,1)}}return{meta:{},valid:true}}return{meta:{},valid:false}}function e$w(e){var r=e;if(/^DE[0-9]{9}$/.test(r)){r=r.substr(2)}if(!/^[0-9]{9}$/.test(r)){return{meta:{},valid:false}}return{meta:{},valid:t$1(r)}}function t$E(t){var e=t;if(/^DK[0-9]{8}$/.test(e)){e=e.substr(2)}if(!/^[0-9]{8}$/.test(e)){return{meta:{},valid:false}}var r=0;var a=[2,7,6,5,4,3,2,1];for(var _t=0;_t<8;_t++){r+=parseInt(e.charAt(_t),10)*a[_t]}return{meta:{},valid:r%11===0}}function t$F(t){var e=t;if(/^EE[0-9]{9}$/.test(e)){e=e.substr(2)}if(!/^[0-9]{9}$/.test(e)){return{meta:{},valid:false}}var r=0;var a=[3,7,1,3,7,1,3,7,1];for(var _t=0;_t<9;_t++){r+=parseInt(e.charAt(_t),10)*a[_t]}return{meta:{},valid:r%10===0}}function t$G(t){var e=t;if(/^ES[0-9A-Z][0-9]{7}[0-9A-Z]$/.test(e)){e=e.substr(2)}if(!/^[0-9A-Z][0-9]{7}[0-9A-Z]$/.test(e)){return{meta:{},valid:false}}var s=function s(t){var e=parseInt(t.substr(0,8),10);return"".concat("TRWAGMYFPDXBNJZSQVHLCKE"[e%23])===t.substr(8,1)};var r=function r(t){var e=["XYZ".indexOf(t.charAt(0)),t.substr(1)].join("");var s="TRWAGMYFPDXBNJZSQVHLCKE"[parseInt(e,10)%23];return"".concat(s)===t.substr(8,1)};var n=function n(t){var e=t.charAt(0);var s;if("KLM".indexOf(e)!==-1){s=parseInt(t.substr(1,8),10);s="TRWAGMYFPDXBNJZSQVHLCKE"[s%23];return"".concat(s)===t.substr(8,1)}else if("ABCDEFGHJNPQRSUVW".indexOf(e)!==-1){var _e=[2,1,2,1,2,1,2];var _s=0;var _r=0;for(var _n=0;_n<7;_n++){_r=parseInt(t.charAt(_n+1),10)*_e[_n];if(_r>9){_r=Math.floor(_r/10)+_r%10}_s+=_r}_s=10-_s%10;if(_s===10){_s=0}return"".concat(_s)===t.substr(8,1)||"JABCDEFGHI"[_s]===t.substr(8,1)}return false};var a=e.charAt(0);if(/^[0-9]$/.test(a)){return{meta:{type:"DNI"},valid:s(e)}}else if(/^[XYZ]$/.test(a)){return{meta:{type:"NIE"},valid:r(e)}}else{return{meta:{type:"CIF"},valid:n(e)}}}function t$H(t){var e=t;if(/^FI[0-9]{8}$/.test(e)){e=e.substr(2)}if(!/^[0-9]{8}$/.test(e)){return{meta:{},valid:false}}var r=[7,9,10,5,8,4,2,1];var a=0;for(var _t=0;_t<8;_t++){a+=parseInt(e.charAt(_t),10)*r[_t]}return{meta:{},valid:a%11===0}}function e$x(e){var r=e;if(/^FR[0-9A-Z]{2}[0-9]{9}$/.test(r)){r=r.substr(2)}if(!/^[0-9A-Z]{2}[0-9]{9}$/.test(r)){return{meta:{},valid:false}}if(r.substr(2,4)!=="000"){return{meta:{},valid:t(r.substr(2))}}if(/^[0-9]{2}$/.test(r.substr(0,2))){return{meta:{},valid:r.substr(0,2)==="".concat(parseInt(r.substr(2)+"12",10)%97)}}else{var _t="0123456789ABCDEFGHJKLMNPQRSTUVWXYZ";var _e;if(/^[0-9]$/.test(r.charAt(0))){_e=_t.indexOf(r.charAt(0))*24+_t.indexOf(r.charAt(1))-10}else{_e=_t.indexOf(r.charAt(0))*34+_t.indexOf(r.charAt(1))-100}return{meta:{},valid:(parseInt(r.substr(2),10)+1+Math.floor(_e/11))%11===_e%11}}}function t$I(t){var s=t;if(/^GB[0-9]{9}$/.test(s)||/^GB[0-9]{12}$/.test(s)||/^GBGD[0-9]{3}$/.test(s)||/^GBHA[0-9]{3}$/.test(s)||/^GB(GD|HA)8888[0-9]{5}$/.test(s)){s=s.substr(2)}if(!/^[0-9]{9}$/.test(s)&&!/^[0-9]{12}$/.test(s)&&!/^GD[0-9]{3}$/.test(s)&&!/^HA[0-9]{3}$/.test(s)&&!/^(GD|HA)8888[0-9]{5}$/.test(s)){return{meta:{},valid:false}}var e=s.length;if(e===5){var _t=s.substr(0,2);var _e=parseInt(s.substr(2),10);return{meta:{},valid:"GD"===_t&&_e<500||"HA"===_t&&_e>=500}}else if(e===11&&("GD8888"===s.substr(0,6)||"HA8888"===s.substr(0,6))){if("GD"===s.substr(0,2)&&parseInt(s.substr(6,3),10)>=500||"HA"===s.substr(0,2)&&parseInt(s.substr(6,3),10)<500){return{meta:{},valid:false}}return{meta:{},valid:parseInt(s.substr(6,3),10)%97===parseInt(s.substr(9,2),10)}}else if(e===9||e===12){var _t2=[8,7,6,5,4,3,2,10,1];var _e2=0;for(var _r=0;_r<9;_r++){_e2+=parseInt(s.charAt(_r),10)*_t2[_r]}_e2=_e2%97;var r=parseInt(s.substr(0,3),10)>=100?_e2===0||_e2===42||_e2===55:_e2===0;return{meta:{},valid:r}}return{meta:{},valid:true}}function t$J(t){var e=t;if(/^(GR|EL)[0-9]{9}$/.test(e)){e=e.substr(2)}if(!/^[0-9]{9}$/.test(e)){return{meta:{},valid:false}}if(e.length===8){e="0".concat(e)}var r=[256,128,64,32,16,8,4,2];var s=0;for(var _t=0;_t<8;_t++){s+=parseInt(e.charAt(_t),10)*r[_t]}s=s%11%10;return{meta:{},valid:"".concat(s)===e.substr(8,1)}}function e$y(e){var r=e;if(/^HR[0-9]{11}$/.test(r)){r=r.substr(2)}if(!/^[0-9]{11}$/.test(r)){return{meta:{},valid:false}}return{meta:{},valid:t$1(r)}}function t$K(t){var e=t;if(/^HU[0-9]{8}$/.test(e)){e=e.substr(2)}if(!/^[0-9]{8}$/.test(e)){return{meta:{},valid:false}}var r=[9,7,3,1,9,7,3,1];var a=0;for(var _t=0;_t<8;_t++){a+=parseInt(e.charAt(_t),10)*r[_t]}return{meta:{},valid:a%10===0}}function t$L(t){var e=t;if(/^IE[0-9][0-9A-Z*+][0-9]{5}[A-Z]{1,2}$/.test(e)){e=e.substr(2)}if(!/^[0-9][0-9A-Z*+][0-9]{5}[A-Z]{1,2}$/.test(e)){return{meta:{},valid:false}}var r=function r(t){var e=t;while(e.length<7){e="0".concat(e)}var r="WABCDEFGHIJKLMNOPQRSTUV";var s=0;for(var _t=0;_t<7;_t++){s+=parseInt(e.charAt(_t),10)*(8-_t)}s+=9*r.indexOf(e.substr(7));return r[s%23]};if(/^[0-9]+$/.test(e.substr(0,7))){return{meta:{},valid:e.charAt(7)===r("".concat(e.substr(0,7)).concat(e.substr(8)))}}else if("ABCDEFGHIJKLMNOPQRSTUVWXYZ+*".indexOf(e.charAt(1))!==-1){return{meta:{},valid:e.charAt(7)===r("".concat(e.substr(2,5)).concat(e.substr(0,1)))}}return{meta:{},valid:true}}function t$M(t){var e=t;if(/^IS[0-9]{5,6}$/.test(e)){e=e.substr(2)}return{meta:{},valid:/^[0-9]{5,6}$/.test(e)}}function e$z(e){var r=e;if(/^IT[0-9]{11}$/.test(r)){r=r.substr(2)}if(!/^[0-9]{11}$/.test(r)){return{meta:{},valid:false}}if(parseInt(r.substr(0,7),10)===0){return{meta:{},valid:false}}var a=parseInt(r.substr(7,3),10);if(a<1||a>201&&a!==999&&a!==888){return{meta:{},valid:false}}return{meta:{},valid:t(r)}}function t$N(t){var e=t;if(/^LT([0-9]{7}1[0-9]|[0-9]{10}1[0-9])$/.test(e)){e=e.substr(2)}if(!/^([0-9]{7}1[0-9]|[0-9]{10}1[0-9])$/.test(e)){return{meta:{},valid:false}}var r=e.length;var a=0;var l;
26327for(l=0;l<r-1;l++){a+=parseInt(e.charAt(l),10)*(1+l%9)}var f=a%11;if(f===10){a=0;for(l=0;l<r-1;l++){a+=parseInt(e.charAt(l),10)*(1+(l+2)%9)}}f=f%11%10;return{meta:{},valid:"".concat(f)===e.charAt(r-1)}}function t$O(t){var e=t;if(/^LU[0-9]{8}$/.test(e)){e=e.substr(2)}if(!/^[0-9]{8}$/.test(e)){return{meta:{},valid:false}}return{meta:{},valid:"".concat(parseInt(e.substr(0,6),10)%89)===e.substr(6,2)}}function e$A(e){var r=e;if(/^LV[0-9]{11}$/.test(r)){r=r.substr(2)}if(!/^[0-9]{11}$/.test(r)){return{meta:{},valid:false}}var s=parseInt(r.charAt(0),10);var a=r.length;var n=0;var l=[];var i;if(s>3){n=0;l=[9,1,4,8,3,10,2,5,7,6,1];for(i=0;i<a;i++){n+=parseInt(r.charAt(i),10)*l[i]}n=n%11;return{meta:{},valid:n===3}}else{var _e=parseInt(r.substr(0,2),10);var _s=parseInt(r.substr(2,2),10);var f=parseInt(r.substr(4,2),10);f=f+1800+parseInt(r.charAt(6),10)*100;if(!t$9(f,_s,_e)){return{meta:{},valid:false}}n=0;l=[10,5,8,4,2,1,6,3,7,9];for(i=0;i<a-1;i++){n+=parseInt(r.charAt(i),10)*l[i]}n=(n+1)%11%10;return{meta:{},valid:"".concat(n)===r.charAt(a-1)}}}function t$P(t){var e=t;if(/^MT[0-9]{8}$/.test(e)){e=e.substr(2)}if(!/^[0-9]{8}$/.test(e)){return{meta:{},valid:false}}var r=[3,4,6,7,8,9,10,1];var a=0;for(var _t=0;_t<8;_t++){a+=parseInt(e.charAt(_t),10)*r[_t]}return{meta:{},valid:a%37===0}}function t$Q(t){return t.split("").map((function(t){var n=t.charCodeAt(0);return n>=65&&n<=90?n-55:t})).join("").split("").map((function(t){return parseInt(t,10)}))}function n$1(n){var e=t$Q(n);var r=0;var o=e.length;for(var _t=0;_t<o-1;++_t){r=(r+e[_t])*10%97}r+=e[o-1];return r%97===1}function e$B(e){var i=e;if(/^NL[0-9]{9}B[0-9]{2}$/.test(i)){i=i.substr(2)}if(!/^[0-9]{9}B[0-9]{2}$/.test(i)){return{meta:{},valid:false}}var o=i.substr(0,9);return{meta:{},valid:e$j(o).valid||n$1("NL".concat(i))}}function t$R(t){var e=t;if(/^NO[0-9]{9}$/.test(e)){e=e.substr(2)}if(!/^[0-9]{9}$/.test(e)){return{meta:{},valid:false}}var r=[3,2,7,6,5,4,3,2];var s=0;for(var _t=0;_t<8;_t++){s+=parseInt(e.charAt(_t),10)*r[_t]}s=11-s%11;if(s===11){s=0}return{meta:{},valid:"".concat(s)===e.substr(8,1)}}function t$S(t){var e=t;if(/^PL[0-9]{10}$/.test(e)){e=e.substr(2)}if(!/^[0-9]{10}$/.test(e)){return{meta:{},valid:false}}var r=[6,5,7,2,3,4,5,6,7,-1];var a=0;for(var _t=0;_t<10;_t++){a+=parseInt(e.charAt(_t),10)*r[_t]}return{meta:{},valid:a%11===0}}function t$T(t){var e=t;if(/^PT[0-9]{9}$/.test(e)){e=e.substr(2)}if(!/^[0-9]{9}$/.test(e)){return{meta:{},valid:false}}var r=[9,8,7,6,5,4,3,2];var s=0;for(var _t=0;_t<8;_t++){s+=parseInt(e.charAt(_t),10)*r[_t]}s=11-s%11;if(s>9){s=0}return{meta:{},valid:"".concat(s)===e.substr(8,1)}}function t$U(t){var e=t;if(/^RO[1-9][0-9]{1,9}$/.test(e)){e=e.substr(2)}if(!/^[1-9][0-9]{1,9}$/.test(e)){return{meta:{},valid:false}}var s=e.length;var r=[7,5,3,2,1,7,5,3,2].slice(10-s);var l=0;for(var _t=0;_t<s-1;_t++){l+=parseInt(e.charAt(_t),10)*r[_t]}l=10*l%11%10;return{meta:{},valid:"".concat(l)===e.substr(s-1,1)}}function t$V(t){var e=t;if(/^RS[0-9]{9}$/.test(e)){e=e.substr(2)}if(!/^[0-9]{9}$/.test(e)){return{meta:{},valid:false}}var r=10;var a=0;for(var _t=0;_t<8;_t++){a=(parseInt(e.charAt(_t),10)+r)%10;if(a===0){a=10}r=2*a%11}return{meta:{},valid:(r+parseInt(e.substr(8,1),10))%10===1}}function t$W(t){var e=t;if(/^RU([0-9]{10}|[0-9]{12})$/.test(e)){e=e.substr(2)}if(!/^([0-9]{10}|[0-9]{12})$/.test(e)){return{meta:{},valid:false}}var r=0;if(e.length===10){var _t=[2,4,10,3,5,9,4,6,8,0];var s=0;for(r=0;r<10;r++){s+=parseInt(e.charAt(r),10)*_t[r]}s=s%11;if(s>9){s=s%10}return{meta:{},valid:"".concat(s)===e.substr(9,1)}}else if(e.length===12){var _t2=[7,2,4,10,3,5,9,4,6,8,0];var _s=[3,7,2,4,10,3,5,9,4,6,8,0];var a=0;var l=0;for(r=0;r<11;r++){a+=parseInt(e.charAt(r),10)*_t2[r];l+=parseInt(e.charAt(r),10)*_s[r]}a=a%11;if(a>9){a=a%10}l=l%11;if(l>9){l=l%10}return{meta:{},valid:"".concat(a)===e.substr(10,1)&&"".concat(l)===e.substr(11,1)}}return{meta:{},valid:true}}function e$C(e){var r=e;if(/^SE[0-9]{10}01$/.test(r)){r=r.substr(2)}if(!/^[0-9]{10}01$/.test(r)){return{meta:{},valid:false}}r=r.substr(0,10);return{meta:{},valid:t(r)}}function t$X(t){var e=t.match(/^(SI)?([1-9][0-9]{7})$/);if(!e){return{meta:{},valid:false}}var r=e[1]?t.substr(2):t;var a=[8,7,6,5,4,3,2];var s=0;for(var _t=0;_t<7;_t++){s+=parseInt(r.charAt(_t),10)*a[_t]}s=11-s%11;if(s===10){s=0}return{meta:{},valid:"".concat(s)===r.substr(7,1)}}function t$Y(t){var e=t;if(/^SK[1-9][0-9][(2-4)|(6-9)][0-9]{7}$/.test(e)){e=e.substr(2)}if(!/^[1-9][0-9][(2-4)|(6-9)][0-9]{7}$/.test(e)){return{meta:{},valid:false}}return{meta:{},valid:parseInt(e,10)%11===0}}function t$Z(t){var e=t;if(/^VE[VEJPG][0-9]{9}$/.test(e)){e=e.substr(2)}if(!/^[VEJPG][0-9]{9}$/.test(e)){return{meta:{},valid:false}}var r={E:8,G:20,J:12,P:16,V:4};var s=[3,2,7,6,5,4,3,2];var a=r[e.charAt(0)];for(var _t=0;_t<8;_t++){a+=parseInt(e.charAt(_t+1),10)*s[_t]}a=11-a%11;if(a===11||a===10){a=0}return{meta:{},valid:"".concat(a)===e.substr(9,1)}}function t$_(t){var e=t;if(/^ZA4[0-9]{9}$/.test(e)){e=e.substr(2)}return{meta:{},valid:/^4[0-9]{9}$/.test(e)}}function x(){var x=["AR","AT","BE","BG","BR","CH","CY","CZ","DE","DK","EE","EL","ES","FI","FR","GB","GR","HR","HU","IE","IS","IT","LT","LU","LV","MT","NL","NO","PL","PT","RO","RU","RS","SE","SK","SI","VE","ZA"];return{validate:function validate(D){var F=D.value;if(F===""){return{valid:true}}var K=Object.assign({},{message:""},D.options);var N=F.substr(0,2);if("function"===typeof K.country){N=K.country.call(this)}else{N=K.country}if(x.indexOf(N)===-1){return{valid:true}}var P={meta:{},valid:true};switch(N.toLowerCase()){case"ar":P=t$y(F);break;case"at":P=t$z(F);break;case"be":P=t$A(F);break;case"bg":P=r$c(F);break;case"br":P=t$B(F);break;case"ch":P=t$C(F);break;case"cy":P=t$D(F);break;case"cz":P=e$v(F);break;case"de":P=e$w(F);break;case"dk":P=t$E(F);break;case"ee":P=t$F(F);break;case"el":P=t$J(F);break;case"es":P=t$G(F);break;case"fi":P=t$H(F);break;case"fr":P=e$x(F);break;case"gb":P=t$I(F);break;case"gr":P=t$J(F);break;case"hr":P=e$y(F);break;case"hu":P=t$K(F);break;case"ie":P=t$L(F);break;case"is":P=t$M(F);break;case"it":P=e$z(F);break;case"lt":P=t$N(F);break;case"lu":P=t$O(F);break;case"lv":P=e$A(F);break;case"mt":P=t$P(F);break;case"nl":P=e$B(F);break;case"no":P=t$R(F);break;case"pl":P=t$S(F);break;case"pt":P=t$T(F);break;case"ro":P=t$U(F);break;case"rs":P=t$V(F);break;case"ru":P=t$W(F);break;case"se":P=e$C(F);break;case"si":P=t$X(F);break;case"sk":P=t$Y(F);break;case"ve":P=t$Z(F);break;case"za":P=t$_(F);break}var Z=r(D.l10n?K.message||D.l10n.vat.country:K.message,D.l10n?D.l10n.vat.countries[N.toUpperCase()]:N.toUpperCase());return Object.assign({},{message:Z},P)}}}function t$$(){return{validate:function validate(t){if(t.value===""){return{valid:true}}if(!/^[a-hj-npr-z0-9]{8}[0-9xX][a-hj-npr-z0-9]{8}$/i.test(t.value)){return{valid:false}}var e=t.value.toUpperCase();var r={A:1,B:2,C:3,D:4,E:5,F:6,G:7,H:8,J:1,K:2,L:3,M:4,N:5,P:7,R:9,
26327S:2,T:3,U:4,V:5,W:6,X:7,Y:8,Z:9,0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9};var a=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2];var l=e.length;var n=0;for(var _t=0;_t<l;_t++){n+=r["".concat(e.charAt(_t))]*a[_t]}var u="".concat(n%11);if(u==="10"){u="X"}return{valid:u===e.charAt(8)}}}}function s$6(){var s=["AT","BG","BR","CA","CH","CZ","DE","DK","ES","FR","GB","IE","IN","IT","MA","NL","PL","PT","RO","RU","SE","SG","SK","US"];var a=function a(e){var s="[ABCDEFGHIJKLMNOPRSTUWYZ]";var a="[ABCDEFGHKLMNOPQRSTUVWXY]";var t="[ABCDEFGHJKPMNRSTUVWXY]";var r="[ABEHMNPRVWXY]";var u="[ABDEFGHJLNPQRSTUWXYZ]";var c=[new RegExp("^(".concat(s,"{1}").concat(a,"?[0-9]{1,2})(\\s*)([0-9]{1}").concat(u,"{2})$"),"i"),new RegExp("^(".concat(s,"{1}[0-9]{1}").concat(t,"{1})(\\s*)([0-9]{1}").concat(u,"{2})$"),"i"),new RegExp("^(".concat(s,"{1}").concat(a,"{1}?[0-9]{1}").concat(r,"{1})(\\s*)([0-9]{1}").concat(u,"{2})$"),"i"),new RegExp("^(BF1)(\\s*)([0-6]{1}[ABDEFGHJLNPQRST]{1}[ABDEFGHJLNPQRSTUWZYZ]{1})$","i"),/^(GIR)(\s*)(0AA)$/i,/^(BFPO)(\s*)([0-9]{1,4})$/i,/^(BFPO)(\s*)(c\/o\s*[0-9]{1,3})$/i,/^([A-Z]{4}
26327)(\s*)(1ZZ)$/i,/^(AI-2640)$/i];for(var _i=0,_c=c;_i<_c.length;_i++){var _s=_c[_i];if(_s.test(e)){return true}}return false};return{validate:function validate(t){var r$1=Object.assign({},t.options);if(t.value===""||!r$1.country){return{valid:true}}var u=t.value.substr(0,2);if("function"===typeof r$1.country){u=r$1.country.call(this)}else{u=r$1.country}if(!u||s.indexOf(u.toUpperCase())===-1){return{valid:true}}var c=false;u=u.toUpperCase();switch(u){case"AT":c=/^([1-9]{1})(\d{3})$/.test(t.value);break;case"BG":c=/^([1-9]{1}[0-9]{3})$/.test(t.value);break;case"BR":c=/^(\d{2})([.]?)(\d{3})([-]?)(\d{3})$/.test(t.value);break;case"CA":c=/^(?:A|B|C|E|G|H|J|K|L|M|N|P|R|S|T|V|X|Y){1}[0-9]{1}(?:A|B|C|E|G|H|J|K|L|M|N|P|R|S|T|V|W|X|Y|Z){1}\s?[0-9]{1}(?:A|B|C|E|G|H|J|K|L|M|N|P|R|S|T|V|W|X|Y|Z){1}[0-9]{1}$/i.test(t.value);break;case"CH":c=/^([1-9]{1})(\d{3})$/.test(t.value);break;case"CZ":c=/^(\d{3})([ ]?)(\d{2})$/.test(t.value);break;case"DE":c=/^(?!01000|99999)(0[1-9]\d{3}|[1-9]\d{4})$/.test(t.value);break;case"DK":c=/^(DK(-|\s)?)?\d{4}$/i.test(t.value);break;case"ES":c=/^(?:0[1-9]|[1-4][0-9]|5[0-2])\d{3}$/.test(t.value);break;case"FR":c=/^[0-9]{5}$/i.test(t.value);break;case"GB":c=a(t.value);break;case"IN":c=/^\d{3}\s?\d{3}$/.test(t.value);break;case"IE":c=/^(D6W|[ACDEFHKNPRTVWXY]\d{2})\s[0-9ACDEFHKNPRTVWXY]{4}$/.test(t.value);break;case"IT":c=/^(I-|IT-)?\d{5}$/i.test(t.value);break;case"MA":c=/^[1-9][0-9]{4}$/i.test(t.value);break;case"NL":c=/^[1-9][0-9]{3} ?(?!sa|sd|ss)[a-z]{2}$/i.test(t.value);break;case"PL":c=/^[0-9]{2}-[0-9]{3}$/.test(t.value);break;case"PT":c=/^[1-9]\d{3}-\d{3}$/.test(t.value);break;case"RO":c=/^(0[1-8]{1}|[1-9]{1}[0-5]{1})?[0-9]{4}$/i.test(t.value);break;case"RU":c=/^[0-9]{6}$/i.test(t.value);break;case"SE":c=/^(S-)?\d{3}\s?\d{2}$/i.test(t.value);break;case"SG":c=/^([0][1-9]|[1-6][0-9]|[7]([0-3]|[5-9])|[8][0-2])(\d{4})$/i.test(t.value);break;case"SK":c=/^(\d{3})([ ]?)(\d{2})$/.test(t.value);break;case"US":default:c=/^\d{4,5}([-]?\d{4})?$/.test(t.value);break}return{message:r(t.l10n?r$1.message||t.l10n.zipCode.country:r$1.message,t.l10n?t.l10n.zipCode.countries[u]:u),valid:c}}}}var s$7={between:s$1,blank:t$5,callback:o,choice:t$7,creditCard:l,date:n,different:o$1,digits:e$1,emailAddress:t$a,file:e$2,greaterThan:a,identical:o$2,integer:a$1,ip:d,lessThan:s$2,notEmpty:t$b,numeric:a$2,promise:r$1,regexp:e$3,remote:a$3,stringCase:e$5,stringLength:t$c,uri:t$d,base64:a$4,bic:a$5,color:e$6,cusip:t$e,ean:e$7,ein:e$8,grid:r$2,hex:e$9,iban:Z,id:F,imei:t$w,imo:e$l,isbn:e$m,isin:M,ismn:e$n,issn:e$o,mac:a$6,meid:e$p,phone:e$q,rtn:e$r,sedol:t$x,siren:e$s,siret:e$t,step:e$u,uuid:s$5,vat:x,vin:t$$,zipCode:s$6};var l$1=function(){function l(i,s$1){_classCallCheck(this,l);this.elements={};this.ee=s();this.filter=t$4();this.plugins={};this.results=new Map;this.validators={};this.form=i;this.fields=s$1}_createClass(l,[{key:"on",value:function on(e,t){this.ee.on(e,t);return this}},{key:"off",value:function off(e,t){this.ee.off(e,t);return this}},{key:"emit",value:function emit(e){var _this$ee;for(var _len=arguments.length,t=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){t[_key-1]=arguments[_key]}(_this$ee=this.ee).emit.apply(_this$ee,[e].concat(t));return this}},{key:"registerPlugin",value:function registerPlugin(e,t){if(this.plugins[e]){throw new Error("The plguin ".concat(e," is registered"))}t.setCore(this);t.install();this.plugins[e]=t;return this}},{key:"deregisterPlugin",value:function deregisterPlugin(e){var t=this.plugins[e];if(t){t.uninstall()}delete this.plugins[e];return this}},{key:"registerValidator",value:function registerValidator(e,t){if(this.validators[e]){throw new Error("The validator ".concat(e," is registered"))}this.validators[e]=t;return this}},{key:"registerFilter",value:function registerFilter(e,t){this.filter.add(e,t);return this}},{key:"deregisterFilter",value:function deregisterFilter(e,t){this.filter.remove(e,t);return this}},{key:"executeFilter",value:function executeFilter(e,t,i){return this.filter.execute(e,t,i)}},{key:"addField",value:function addField(e,t){var i=Object.assign({},{selector:"",validators:{}},t);this.fields[e]=this.fields[e]?{selector:i.selector||this.fields[e].selector,validators:Object.assign({}
26327,this.fields[e].validators,i.validators)}:i;this.elements[e]=this.queryElements(e);this.emit("core.field.added",{elements:this.elements[e],field:e,options:this.fields[e]});return this}},{key:"removeField",value:function removeField(e){if(!this.fields[e]){throw new Error("The field ".concat(e," validators are not defined. Please ensure the field is added first"))}var t=this.elements[e];var i=this.fields[e];delete this.elements[e];delete this.fields[e];this.emit("core.field.removed",{elements:t,field:e,options:i});return this}},{key:"validate",value:function validate(){var _this=this;this.emit("core.form.validating");return this.filter.execute("validate-pre",Promise.resolve(),[]).then((function(){return Promise.all(Object.keys(_this.fields).map((function(e){return _this.validateField(e)}))).then((function(e){switch(true){case e.indexOf("Invalid")!==-1:_this.emit("core.form.invalid");return Promise.resolve("Invalid");case e.indexOf("NotValidated")!==-1:_this.emit("core.form.notvalidated");return Promise.resolve("NotValidated");default:_this.emit("core.form.valid");return Promise.resolve("Valid")}}))}))}},{key:"validateField",value:function validateField(e){var _this2=this;var t=this.results.get(e);if(t==="Valid"||t==="Invalid"){return Promise.resolve(t)}this.emit("core.field.validating",e);var i=this.elements[e];if(i.length===0){this.emit("core.field.valid",e);return Promise.resolve("Valid")}var s=i[0].getAttribute("type");if("radio"===s||"checkbox"===s||i.length===1){return this.validateElement(e,i[0])}else{return Promise.all(i.map((function(t){return _this2.validateElement(e,t)}))).then((function(t){switch(true){case t.indexOf("Invalid")!==-1:_this2.emit("core.field.invalid",e);_this2.results.set(e,"Invalid");return Promise.resolve("Invalid");case t.indexOf("NotValidated")!==-1:_this2.emit("core.field.notvalidated",e);_this2.results["delete"](e);return Promise.resolve("NotValidated");default:_this2.emit("core.field.valid",e);_this2.results.set(e,"Valid");return Promise.resolve("Valid")}}))}}},{key:"validateElement",value:function validateElement(e,t){var _this3=this;this.results["delete"](e);var i=this.elements[e];var s=this.filter.execute("element-ignored",false,[e,t,i]);if(s){this.emit("core.element.ignored",{element:t,elements:i,field:e});return Promise.resolve("Ignored")}var l=this.fields[e].validators;this.emit("core.element.validating",{element:t,elements:i,field:e});var r=Object.keys(l).map((function(i){return function(){return _this3.executeValidator(e,t,i,l[i])}}));return this.waterfall(r).then((function(s){var l=s.indexOf("Invalid")===-1;_this3.emit("core.element.validated",{element:t,elements:i,field:e,valid:l});var r=t.getAttribute("type");if("radio"===r||"checkbox"===r||i.length===1){_this3.emit(l?"core.field.valid":"core.field.invalid",e)}return Promise.resolve(l?"Valid":"Invalid")}))["catch"]((function(s){_this3.emit("core.element.notvalidated",{element:t,elements:i,field:e});return Promise.resolve(s)}))}},{key:"executeValidator",value:function executeValidator(e,t,i,s){var _this4=this;var l=this.elements[e];var r=this.filter.execute("validator-name",i,[i,e]);s.message=this.filter.execute("validator-message",s.message,[this.locale,e,r]);if(!this.validators[r]||s.enabled===false){this.emit("core.validator.validated",{element:t,elements:l,field:e,result:this.normalizeResult(e,r,{valid:true}),validator:r});return Promise.resolve("Valid")}var a=this.validators[r];var d=this.getElementValue(e,t,r);var o=this.filter.execute("field-should-validate",true,[e,t,d,i]);if(!o){this.emit("core.validator.notvalidated",{element:t,elements:l,field:e,validator:i});return Promise.resolve("NotValidated")}this.emit("core.validator.validating",{element:t,elements:l,field:e,validator:i});var n=a().validate({element:t,elements:l,field:e,l10n:this.localization,options:s,value:d});var h="function"===typeof n["then"];if(h){return n.then((function(s){var r=_this4.normalizeResult(e,i,s);_this4.emit("core.validator.validated",{element:t,elements:l,field:e,result:r,validator:i});return r.valid?"Valid":"Invalid"}))}else{var _s=this.normalizeResult(e,i,n);
26327this.emit("core.validator.validated",{element:t,elements:l,field:e,result:_s,validator:i});return Promise.resolve(_s.valid?"Valid":"Invalid")}}},{key:"getElementValue",value:function getElementValue(e$1,t,s){var l=e(this.form,e$1,t,this.elements[e$1]);return this.filter.execute("field-value",l,[l,e$1,t,s])}},{key:"getElements",value:function getElements(e){return this.elements[e]}},{key:"getFields",value:function getFields(){return this.fields}},{key:"getFormElement",value:function getFormElement(){return this.form}},{key:"getLocale",value:function getLocale(){return this.locale}},{key:"getPlugin",value:function getPlugin(e){return this.plugins[e]}},{key:"updateFieldStatus",value:function updateFieldStatus(e,t,i){var _this5=this;var s=this.elements[e];var l=s[0].getAttribute("type");var r="radio"===l||"checkbox"===l?[s[0]]:s;r.forEach((function(s){return _this5.updateElementStatus(e,s,t,i)}));if(!i){switch(t){case"NotValidated":this.emit("core.field.notvalidated",e);this.results["delete"](e);break;case"Validating":this.emit
26327("core.field.validating",e);this.results["delete"](e);break;case"Valid":this.emit("core.field.valid",e);this.results.set(e,"Valid");break;case"Invalid":this.emit("core.field.invalid",e);this.results.set(e,"Invalid");break}}return this}},{key:"updateElementStatus",value:function updateElementStatus(e,t,i,s){var _this6=this;var l=this.elements[e];var r=this.fields[e].validators;var a=s?[s]:Object.keys(r);switch(i){case"NotValidated":a.forEach((function(i){return _this6.emit("core.validator.notvalidated",{element:t,elements:l,field:e,validator:i})}));this.emit("core.element.notvalidated",{element:t,elements:l,field:e});break;case"Validating":a.forEach((function(i){return _this6.emit("core.validator.validating",{element:t,elements:l,field:e,validator:i})}));this.emit("core.element.validating",{element:t,elements:l,field:e});break;case"Valid":a.forEach((function(i){return _this6.emit("core.validator.validated",{element:t,field:e,result:{message:r[i].message,valid:true},validator:i})}));this.emit("core.element.validated",{element:t,elements:l,field:e,valid:true});break;case"Invalid":a.forEach((function(i){return _this6.emit("core.validator.validated",{element:t,field:e,result:{message:r[i].message,valid:false},validator:i})}));this.emit("core.element.validated",{element:t,elements:l,field:e,valid:false});break}return this}},{key:"resetForm",value:function resetForm(e){var _this7=this;Object.keys(this.fields).forEach((function(t){return _this7.resetField(t,e)}));this.emit("core.form.reset",{reset:e});return this}},{key:"resetField",value:function resetField(e,t){if(t){var _t=this.elements[e];var _i=_t[0].getAttribute("type");_t.forEach((function(e){if("radio"===_i||"checkbox"===_i){e.removeAttribute("selected");e.removeAttribute("checked");e.checked=false}else{e.setAttribute("value","");if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){e.value=""}}}))}this.updateFieldStatus(e,"NotValidated");this.emit("core.field.reset",{field:e,reset:t});return this}},{key:"revalidateField",value:function revalidateField(e){this.updateFieldStatus(e,"NotValidated");return this.validateField(e)}},{key:"disableValidator",value:function disableValidator(e,t){return this.toggleValidator(false,e,t)}},{key:"enableValidator",value:function enableValidator(e,t){return this.toggleValidator(true,e,t)}},{key:"updateValidatorOption",value:function updateValidatorOption(e,t,i,s){if(this.fields[e]&&this.fields[e].validators&&this.fields[e].validators[t]){this.fields[e].validators[t][i]=s}return this}},{key:"setFieldOptions",value:function setFieldOptions(e,t){this.fields[e]=t;return this}},{key:"destroy",value:function destroy(){var _this8=this;Object.keys(this.plugins).forEach((function(e){return _this8.plugins[e].uninstall()}));this.ee.clear();this.filter.clear();this.results.clear();this.plugins={};return this}},{key:"setLocale",value:function setLocale(e,t){this.locale=e;this.localization=t;return this}},{key:"waterfall",value:function waterfall(e){return e.reduce((function(e,t){return e.then((function(e){return t().then((function(t){e.push(t);return e}))}))}),Promise.resolve([]))}},{key:"queryElements",value:function queryElements(e){var t=this.fields[e].selector?"#"===this.fields[e].selector.charAt(0)?'[id="'.concat(this.fields[e].selector.substring(1),'"]'):this.fields[e].selector:'[name="'.concat(e,'"]');return[].slice.call(this.form.querySelectorAll(t))}},{key:"normalizeResult",value:function normalizeResult(e,t,i){var s=this.fields[e].validators[t];return Object.assign({},i,{message:i.message||(s?s.message:"")||(this.localization&&this.localization[t]&&this.localization[t]["default"]?this.localization[t]["default"]:"")||"The field ".concat(e," is not valid")})}},{key:"toggleValidator",value:function toggleValidator(e,t,i){var _this9=this;var s=this.fields[t].validators;if(i&&s&&s[i]){this.fields[t].validators[i].enabled=e}else if(!i){Object.keys(s).forEach((function(i){return _this9.fields[t].validators[i].enabled=e}))}return this.updateFieldStatus(t,"NotValidated",i)}}]);return l}();function r$d(e,t){var i=Object.assign({},{fields:{},locale:"en_US",plugins:{}},t);var r=new l$1(e,i.fields);r.setLocale(i.locale,i.localization);
26327Object.keys(i.plugins).forEach((function(e){return r.registerPlugin(e,i.plugins[e])}));Object.keys(s$7).forEach((function(e){return r.registerValidator(e,s$7[e])}));Object.keys(i.fields).forEach((function(e){return r.addField(e,i.fields[e])}));return r}var t$10=function(){function t(_t){_classCallCheck(this,t);this.opts=_t}_createClass(t,[{key:"setCore",value:function setCore(t){this.core=t;return this}},{key:"install",value:function install(){}},{key:"uninstall",value:function uninstall(){}}]);return t}();var index$1={getFieldValue:e};var e$D=function(_t){_inherits(e,_t);var _super=_createSuper(e);function e(t){var _this;_classCallCheck(this,e);_this=_super.call(this,t);_this.opts=t||{};_this.validatorNameFilter=_this.getValidatorName.bind(_assertThisInitialized(_this));return _this}_createClass(e,[{key:"install",value:function install(){this.core.registerFilter("validator-name",this.validatorNameFilter)}},{key:"uninstall",value:function uninstall(){this.core.deregisterFilter("validator-name",this.validatorNameFilter)}},{key:"getValidatorName",value:function getValidatorName(t,e){return this.opts[t]||t}}]);return e}(t$10);var i=function(_e){_inherits(i,_e);var _super=_createSuper(i);function i(){var _this;_classCallCheck(this,i);_this=_super.call(this,{});_this.elementValidatedHandler=_this.onElementValidated.bind(_assertThisInitialized(_this));_this.fieldValidHandler=_this.onFieldValid.bind(_assertThisInitialized(_this));_this.fieldInvalidHandler=_this.onFieldInvalid.bind(_assertThisInitialized(_this));_this.messageDisplayedHandler=_this.onMessageDisplayed.bind(_assertThisInitialized(_this));return _this}_createClass(i,[{key:"install",value:function install(){this.core.on("core.field.valid",this.fieldValidHandler).on("core.field.invalid",this.fieldInvalidHandler).on("core.element.validated",this.elementValidatedHandler).on("plugins.message.displayed",this.messageDisplayedHandler)}},{key:"uninstall",value:function uninstall(){this.core.off("core.field.valid",this.fieldValidHandler).off("core.field.invalid",this.fieldInvalidHandler).off("core.element.validated",this.elementValidatedHandler).off("plugins.message.displayed",this.messageDisplayedHandler)}},{key:"onElementValidated",value:function onElementValidated(e){if(e.valid){e.element.setAttribute("aria-invalid","false");e.element.removeAttribute("aria-describedby")}}},{key:"onFieldValid",value:function onFieldValid(e){var i=this.core.getElements(e);if(i){i.forEach((function(e){e.setAttribute("aria-invalid","false");e.removeAttribute("aria-describedby")}))}}},{key:"onFieldInvalid",value:function onFieldInvalid(e){var i=this.core.getElements(e);if(i){i.forEach((function(e){return e.setAttribute("aria-invalid","true")}))}}},{key:"onMessageDisplayed",value:function onMessageDisplayed(e){e.messageElement.setAttribute("role","alert");e.messageElement.setAttribute("aria-hidden","false");var i=this.core.getElements(e.field);var t=i.indexOf(e.element);var l="js-fv-".concat(e.field,"-").concat(t,"-").concat(Date.now(),"-message");e.messageElement.setAttribute("id",l);e.element.setAttribute("aria-describedby",l);var a=e.element.getAttribute("type");if("radio"===a||"checkbox"===a){i.forEach((function(e){return e.setAttribute("aria-describedby",l)}))}}}]);return i}(t$10);var t$11=function(_e){_inherits(t,_e);var _super=_createSuper(t);function t(e){var _this;_classCallCheck(this,t);_this=_super.call(this,e);_this.addedFields=new Map;_this.opts=Object.assign({},{html5Input:false,pluginPrefix:"data-fvp-",prefix:"data-fv-"},e);_this.fieldAddedHandler=_this.onFieldAdded.bind(_assertThisInitialized(_this));_this.fieldRemovedHandler=_this.onFieldRemoved.bind(_assertThisInitialized(_this));return _this}_createClass(t,[{key:"install",value:function install(){var _this2=this;this.parsePlugins();var e=this.parseOptions();Object.keys(e).forEach((function(t){if(!_this2.addedFields.has(t)){_this2.addedFields.set(t,true)}_this2.core.addField(t,e[t])}));this.core.on("core.field.added",this.fieldAddedHandler).on("core.field.removed",this.fieldRemovedHandler)}},{key:"uninstall",value:function uninstall(){this.addedFields.clear();this.core.off("core.field.added",this.fieldAddedHandler).off("core.field.removed",this.fieldRemovedHandler)}},{key:"onFieldAdded",value:function onFieldAdded(e){var _this3=this;var t=e.elements;if(!t||t.length===0||this.addedFields.has(e.field)){return}this.addedFields.set(e.field,true);t.forEach((function(t){var s=_this3.parseElement(t);if(!_this3.isEmptyOption(s)){var _t={selector:e.options.selector,validators:Object.assign({},e.options.validators||{},s.validators)};_this3.core.setFieldOptions(e.field,_t)}}))}},{key:"onFieldRemoved",value:function onFieldRemoved(e){if(e.field&&this.addedFields.has(e.field)){this.addedFields["delete"](e.field)}}},{key:"parseOptions",value:function parseOptions(){var _this4=this;var e=this.opts.prefix;var t={};var s=this.core.getFields();var a=this.core.getFormElement();var i=[].slice.call(a.querySelectorAll("[name], [".concat(e,"field]")));
26327i.forEach((function(s){var a=_this4.parseElement(s);if(!_this4.isEmptyOption(a)){var _i=s.getAttribute("name")||s.getAttribute("".concat(e,"field"));t[_i]=Object.assign({},t[_i],a)}}));Object.keys(t).forEach((function(e){Object.keys(t[e].validators).forEach((function(a){t[e].validators[a].enabled=t[e].validators[a].enabled||false;if(s[e]&&s[e].validators&&s[e].validators[a]){Object.assign(t[e].validators[a],s[e].validators[a])}}))}));return Object.assign({},s,t)}},{key:"createPluginInstance",value:function createPluginInstance(e,t){var s=e.split(".");var a=window||this;for(var _e2=0,_t2=s.length;_e2<_t2;_e2++){a=a[s[_e2]]}if(typeof a!=="function"){throw new Error("the plugin ".concat(e," doesn't exist"))}return new a(t)}},{key:"parsePlugins",value:function parsePlugins(){var _this5=this;var e=this.core.getFormElement();var t=new RegExp("^".concat(this.opts.pluginPrefix,"([a-z0-9-]+)(___)*([a-z0-9-]+)*$"));var s=e.attributes.length;var a={};for(var i=0;i<s;i++){var _s=e.attributes[i].name;var n=e.attributes[i].value;var r=t.exec(_s);if(r&&r.length===4){var _e3=this.toCamelCase(r[1]);a[_e3]=Object.assign({},r[3]?_defineProperty({},this.toCamelCase(r[3]),n):{enabled:""===n||"true"===n},a[_e3])}}Object.keys(a).forEach((function(e){var t=a[e];var s=t["enabled"];var i=t["class"];if(s&&i){delete t["enabled"];delete t["clazz"];var _s2=_this5.createPluginInstance(i,t);_this5.core.registerPlugin(e,_s2)}}))}},{key:"isEmptyOption",value:function isEmptyOption(e){var t=e.validators;return Object.keys(t).length===0&&t.constructor===Object}},{key:"parseElement",value:function parseElement(e){var t=new RegExp("^".concat(this.opts.prefix,"([a-z0-9-]+)(___)*([a-z0-9-]+)*$"));var s=e.attributes.length;var a={};var i=e.getAttribute("type");for(var n=0;n<s;n++){var _s3=e.attributes[n].name;var r=e.attributes[n].value;if(this.opts.html5Input){switch(true){case"minlength"===_s3:a["stringLength"]=Object.assign({},{enabled:true,min:parseInt(r,10)},a["stringLength"]);break;case"maxlength"===_s3:a["stringLength"]=Object.assign({},{enabled:true,max:parseInt(r,10)},a["stringLength"]);break;case"pattern"===_s3:a["regexp"]=Object.assign({},{enabled:true,regexp:r},a["regexp"]);break;case"required"===_s3:a["notEmpty"]=Object.assign({},{enabled:true},a["notEmpty"]);break;case"type"===_s3&&"color"===r:a["color"]=Object.assign({},{enabled:true,type:"hex"},a["color"]);break;case"type"===_s3&&"email"===r:a["emailAddress"]=Object.assign({},{enabled:true},a["emailAddress"]);break;case"type"===_s3&&"url"===r:a["uri"]=Object.assign({},{enabled:true},a["uri"]);break;case"type"===_s3&&"range"===r:a["between"]=Object.assign({},{enabled:true,max:parseFloat(e.getAttribute("max")),min:parseFloat(e.getAttribute("min"))},a["between"]);break;case"min"===_s3&&i!=="date"&&i!=="range":a["greaterThan"]=Object.assign({},{enabled:true,min:parseFloat(r)},a["greaterThan"]);break;case"max"===_s3&&i!=="date"&&i!=="range":a["lessThan"]=Object.assign({},{enabled:true,max:parseFloat(r)},a["lessThan"]);break}}var l=t.exec(_s3);
26327if(l&&l.length===4){var _e4=this.toCamelCase(l[1]);a[_e4]=Object.assign({},l[3]?_defineProperty({},this.toCamelCase(l[3]),this.normalizeValue(r)):{enabled:""===r||"true"===r},a[_e4])}}return{validators:a}}},{key:"normalizeValue",value:function normalizeValue(e){return e==="true"?true:e==="false"?false:e}},{key:"toUpperCase",value:function toUpperCase(e){return e.charAt(1).toUpperCase()}},{key:"toCamelCase",value:function toCamelCase(e){return e.replace(/-./g,this.toUpperCase)}}]);return t}(t$10);var o$4=function(_t){_inherits(o,_t);var _super=_createSuper(o);function o(){var _this;_classCallCheck(this,o);_this=_super.call(this,{});_this.onValidHandler=_this.onFormValid.bind(_assertThisInitialized(_this));return _this}_createClass(o,[{key:"install",value:function install(){var t=this.core.getFormElement();if(t.querySelectorAll('[type="submit"][name="submit"]').length){throw new Error("Do not use `submit` for the name attribute of submit button")}this.core.on("core.form.valid",this.onValidHandler)}},{key:"uninstall",value:function uninstall(){this.core.off("core.form.valid",this.onValidHandler)}},{key:"onFormValid",value:function onFormValid(){var t=this.core.getFormElement();if(t instanceof HTMLFormElement){t.submit()}}}]);return o}(t$10);var e$E=function(_t){_inherits(e,_t);var _super=_createSuper(e);function e(t){var _this;_classCallCheck(this,e);_this=_super.call(this,t);_this.opts=t||{};_this.triggerExecutedHandler=_this.onTriggerExecuted.bind(_assertThisInitialized(_this));return _this}_createClass(e,[{key:"install",value:function install(){this.core.on("plugins.trigger.executed",this.triggerExecutedHandler)}},{key:"uninstall",value:function uninstall(){this.core.off("plugins.trigger.executed",this.triggerExecutedHandler)}},{key:"onTriggerExecuted",value:function onTriggerExecuted(t){if(this.opts[t.field]){var _e=this.opts[t.field].split(" ");var _iterator=_createForOfIteratorHelper(_e),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var _t2=_step.value;var _e2=_t2.trim();if(this.opts[_e2]){this.core.revalidateField(_e2)}}}catch(err){_iterator.e(err)}finally{_iterator.f()}}}}]);return e}(t$10);var e$F=function(_t){_inherits(e,_t);var _super=_createSuper(e);function e(t){var _this;_classCallCheck(this,e);_this=_super.call(this,t);_this.opts=Object.assign({},{excluded:e.defaultIgnore},t);_this.ignoreValidationFilter=_this.ignoreValidation.bind(_assertThisInitialized(_this));return _this}_createClass(e,[{key:"install",value:function install(){this.core.registerFilter("element-ignored",this.ignoreValidationFilter)}},{key:"uninstall",value:function uninstall(){this.core.deregisterFilter("element-ignored",this.ignoreValidationFilter)}},{key:"ignoreValidation",value:function ignoreValidation(t,e,i){return this.opts.excluded.apply(this,[t,e,i])}}],[{key:"defaultIgnore",value:function defaultIgnore(t,e,i){var r=!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length);var n=e.getAttribute("disabled");return n===""||n==="disabled"||e.getAttribute("type")==="hidden"||!r}}]);return e}(t$10);var t$12=function(_e){_inherits(t,_e);var _super=_createSuper(t);function t(e){var _this;_classCallCheck(this,t);_this=_super.call(this,e);_this.statuses=new Map;_this.opts=Object.assign({},{onStatusChanged:function onStatusChanged(){}},e);_this.elementValidatingHandler=_this.onElementValidating.bind(_assertThisInitialized(_this));_this.elementValidatedHandler=_this.onElementValidated.bind(_assertThisInitialized(_this));_this.elementNotValidatedHandler=_this.onElementNotValidated.bind(_assertThisInitialized(_this));_this.elementIgnoredHandler=_this.onElementIgnored.bind(_assertThisInitialized(_this));_this.fieldAddedHandler=_this.onFieldAdded.bind(_assertThisInitialized(_this));_this.fieldRemovedHandler=_this.onFieldRemoved.bind(_assertThisInitialized(_this));return _this}_createClass(t,[{key:"install",value:function install(){this.core.on("core.element.validating",this.elementValidatingHandler).on("core.element.validated",this.elementValidatedHandler).on("core.element.notvalidated",this.elementNotValidatedHandler).on("core.element.ignored",this.elementIgnoredH
26327andler).on("core.field.added",this.fieldAddedHandler).on("core.field.removed",this.fieldRemovedHandler)}},{key:"uninstall",value:function uninstall(){this.statuses.clear();this.core.off("core.element.validating",this.elementValidatingHandler).off("core.element.validated",this.elementValidatedHandler).off("core.element.notvalidated",this.elementNotValidatedHandler).off("core.element.ignored",this.elementIgnoredHandler).off("core.field.added",this.fieldAddedHandler).off("core.field.removed",this.fieldRemovedHandler)}},{key:"areFieldsValid",value:function areFieldsValid(){return Array.from(this.statuses.values()).every((function(e){return e==="Valid"||e==="NotValidated"||e==="Ignored"}))}},{key:"getStatuses",value:function getStatuses(){return this.statuses}},{key:"onFieldAdded",value:function onFieldAdded(e){this.statuses.set(e.field,"NotValidated")}},{key:"onFieldRemoved",value:function onFieldRemoved(e){if(this.statuses.has(e.field)){this.statuses["delete"](e.field)}this.opts.onStatusChanged(this.areFieldsValid())}},{key:"onElementValidating",value:function onElementValidating(e){this.statuses.set(e.field,"Validating");this.opts.onStatusChanged(false)}},{key:"onElementValidated",value:function onElementValidated(e){this.statuses.set(e.field,e.valid?"Valid":"Invalid");if(e.valid){this.opts.onStatusChanged(this.areFieldsValid())}else{this.opts.onStatusChanged(false)}}},{key:"onElementNotValidated",value:function onElementNotValidated(e){this.statuses.set(e.field,"NotValidated");this.opts.onStatusChanged(false)}},{key:"onElementIgnored",value:function onElementIgnored(e){this.statuses.set(e.field,"Ignored");this.opts.onStatusChanged(this.areFieldsValid())}}]);return t}(t$10);function s$8(s,a){a.split(" ").forEach((function(a){if(s.classList){s.classList.add(a)}else if(" ".concat(s.className," ").indexOf(" ".concat(a," "))){s.className+=" ".concat(a)}}))}function a$7(s,a){a.split(" ").forEach((function(a){s.classList?s.classList.remove(a):s.className=s.className.replace(a,"")}))}function c(c,e){var t=[];var f=[];Object.keys(e).forEach((function(s){if(s){e[s]?t.push(s):f.push(s)}}));f.forEach((function(s){return a$7(c,s)}));t.forEach((function(a){return s$8(c,a)}))}function e$G(e,t){var l=e.matches||e.webkitMatchesSelector||e["mozMatchesSelector"]||e["msMatchesSelector"];if(l){return l.call(e,t)}var c=[].slice.call(e.parentElement.querySelectorAll(t));return c.indexOf(e)>=0}function t$13(t,l){var c=t;while(c){if(e$G(c,l)){break}c=c.parentElement}return c}var s$9=function(_e){_inherits(s,_e);var _super=_createSuper(s);function s(e){var _this;_classCallCheck(this,s);_this=_super.call(this,e);_this.messages=new Map;_this.defaultContainer=document.createElement("div");_this.opts=Object.assign({},{container:function container(e,t){return _this.defaultContainer}},e);_this.elementIgnoredHandler=_this.onElementIgnored.bind(_assertThisInitialized(_this));_this.fieldAddedHandler=_this.onFieldAdded.bind(_assertThisInitialized(_this));_this.fieldRemovedHandler=_this.onFieldRemoved.bind(_assertThisInitialized(_this));_this.validatorValidatedHandler=_this.onValidatorValidated.bind(_assertThisInitialized(_this));_this.validatorNotValidatedHandler=_this.onValidatorNotValidated.bind(_assertThisInitialized(_this));return _this}_createClass(s,[{key:"install",value:function install(){this.core.getFormElement().appendChild(this.defaultContainer);this.core.on("core.element.ignored",this.elementIgnoredHandler).on("core.field.added",this.fieldAddedHandler).on("core.field.removed",this.fieldRemovedHandler).on("core.validator.validated",this.validatorValidatedHandler).on("core.validator.notvalidated",this.validatorNotValidatedHandler)}},{key:"uninstall",value:function uninstall(){this.core.getFormElement().removeChild(this.defaultContainer);this.messages.forEach((function(e){return e.parentNode.removeChild(e)}));this.messages.clear();this.core.off("core.element.ignored",this.elementIgnoredHandler).off("core.field.added",this.fieldAddedHandler).off("core.field.removed",this.fieldRemovedHandler).off("core.validator.validated",this.validatorValidatedHandler).off("core.validator.notvalidated",this.validatorNotValidatedHandler)}},{key:"onFieldAdded",value:function onFieldAdded(e){var _this2=this;var t=e.elements;if(t){t.forEach((function(e){var t=_this2.messages.get(e);if(t){t.parentNode.removeChild(t);_this2.messages["delete"](e)}}));this.prepareFieldContainer(e.field,t)}}},{key:"onFieldRemoved",value:function onFieldRemoved(e){var _this3=this;if(!e.elements.length||!e.field){return}var t=e.elements[0].getAttribute("type");var s="radio"===t||"checkbox"===t?[e.elements[0]]:e.elements;
26327s.forEach((function(e){if(_this3.messages.has(e)){var _t=_this3.messages.get(e);_t.parentNode.removeChild(_t);_this3.messages["delete"](e)}}))}},{key:"prepareFieldContainer",value:function prepareFieldContainer(e,t){var _this4=this;if(t.length){var _s=t[0].getAttribute("type");if("radio"===_s||"checkbox"===_s){this.prepareElementContainer(e,t[0],t)}else{t.forEach((function(s){return _this4.prepareElementContainer(e,s,t)}))}}}},{key:"prepareElementContainer",value:function prepareElementContainer(e,s,i){var a;if("string"===typeof this.opts.container){var _e2="#"===this.opts.container.charAt(0)?'[id="'.concat(this.opts.container.substring(1),'"]'):this.opts.container;a=this.core.getFormElement().querySelector(_e2)}else{a=this.opts.container(e,s)}var l=document.createElement("div");a.appendChild(l);c(l,{"fv-plugins-message-container":true});this.core.emit("plugins.message.placed",{element:s,elements:i,field:e,messageElement:l});this.messages.set(s,l)}},{key:"getMessage",value:function getMessage(e){return typeof e.message==="string"?e.message:e.message[this.core.getLocale()]}},{key:"onValidatorValidated",value:function onValidatorValidated(e){var s=e.elements;var i=e.element.getAttribute("type");var a="radio"===i||"checkbox"===i?s[0]:e.element;if(this.messages.has(a)){var _s2=this.messages.get(a);var _i=_s2.querySelector('[data-field="'.concat(e.field,'"][data-validator="').concat(e.validator,'"]'));if(!_i&&!e.result.valid){var _i2=document.createElement("div");_i2.innerHTML=this.getMessage(e.result);_i2.setAttribute("data-field",e.field);_i2.setAttribute("data-validator",e.validator);if(this.opts.clazz){c(_i2,_defineProperty({},this.opts.clazz,true))}_s2.appendChild(_i2);this.core.emit("plugins.message.displayed",{element:e.element,field:e.field,message:e.result.message,messageElement:_i2,meta:e.result.meta,validator:e.validator})}else if(_i&&!e.result.valid){_i.innerHTML=this.getMessage(e.result);this.core.emit("plugins.message.displayed",{element:e.element,field:e.field,message:e.result.message,messageElement:_i,meta:e.result.meta,validator:e.validator})}else if(_i&&e.result.valid){_s2.removeChild(_i)}}}},{key:"onValidatorNotValidated",value:function onValidatorNotValidated(e){var t=e.elements;var s=e.element.getAttribute("type");var i="radio"===s||"checkbox"===s?t[0]:e.element;if(this.messages.has(i)){var _t3=this.messages.get(i);var _s3=_t3.querySelector('[data-field="'.concat(e.field,'"][data-validator="').concat(e.validator,'"]'));if(_s3){_t3.removeChild(_s3)}}}},{key:"onElementIgnored",value:function onElementIgnored(e){var t=e.elements;var s=e.element.getAttribute("type");var i="radio"===s||"checkbox"===s?t[0]:e.element;if(this.messages.has(i)){var _t4=this.messages.get(i);var _s4=[].slice.call(_t4.querySelectorAll('[data-field="'.concat(e.field,'"]')));_s4.forEach((function(e){_t4.removeChild(e)}))}}}],[{key:"getClosestContainer",value:function getClosestContainer(e,t,s){var i=e;while(i){if(i===t){break}i=i.parentElement;if(s.test(i.className)){break}}return i}}]);return s}(t$10);var l$2=function(_e){_inherits(l,_e);var _super=_createSuper(l);function l(e){var _this;_classCallCheck(this,l);_this=_super.call(this,e);_this.results=new Map;_this.containers=new Map;_this.opts=Object.assign({},{defaultMessageContainer:true,eleInvalidClass:"",eleValidClass:"",rowClasses:"",rowValidatingClass:""},e);_this.elementIgnoredHandler=_this.onElementIgnored.bind(_assertThisInitialized(_this));_this.elementValidatingHandler=_this.onElementValidating.bind(_assertThisInitialized(_this));_this.elementValidatedHandler=_this.onElementValidated.bind(_assertThisInitialized(_this));_this.elementNotValidatedHandler=_this.onElementNotValidated.bind(_assertThisInitialized(_this));_this.iconPlacedHandler=_this.onIconPlaced.bind(_assertThisInitialized(_this));_this.fieldAddedHandler=_this.onFieldAdded.bind(_assertThisInitialized(_this));_this.fieldRemovedHandler=_this.onFieldRemoved.bind(_assertThisInitialized(_this));_this.messagePlacedHandler=_this.onMessagePlaced.bind(_assertThisInitialized(_this));return _this}_createClass(l,[{key:"install",value:function install(){var _t,_this2=this;c(this.core.getFormElement(),(_t={},_defineProperty(_t,this.opts.formClass,true),_defineProperty(_t,"fv-plugins-framework",true),_t));
26327this.core.on("core.element.ignored",this.elementIgnoredHandler).on("core.element.validating",this.elementValidatingHandler).on("core.element.validated",this.elementValidatedHandler).on("core.element.notvalidated",this.elementNotValidatedHandler).on("plugins.icon.placed",this.iconPlacedHandler).on("core.field.added",this.fieldAddedHandler).on("core.field.removed",this.fieldRemovedHandler);if(this.opts.defaultMessageContainer){this.core.registerPlugin("___frameworkMessage",new s$9({clazz:this.opts.messageClass,container:function container(e,t){var l="string"===typeof _this2.opts.rowSelector?_this2.opts.rowSelector:_this2.opts.rowSelector(e,t);var a=t$13(t,l);return s$9.getClosestContainer(t,a,_this2.opts.rowPattern)}}));this.core.on("plugins.message.placed",this.messagePlacedHandler)}}},{key:"uninstall",value:function uninstall(){var _t2;this.results.clear();this.containers.clear();c(this.core.getFormElement(),(_t2={},_defineProperty(_t2,this.opts.formClass,false),_defineProperty(_t2,"fv-plugins-framework",false),_t2));this.core.off("core.element.ignored",this.elementIgnoredHandler).off("core.element.validating",this.elementValidatingHandler).off("core.element.validated",this.elementValidatedHandler).off("core.element.notvalidated",this.elementNotValidatedHandler).off("plugins.icon.placed",this.iconPlacedHandler).off("core.field.added",this.fieldAddedHandler).off("core.field.removed",this.fieldRemovedHandler);if(this.opts.defaultMessageContainer){this.core.off("plugins.message.placed",this.messagePlacedHandler)}}},{key:"onIconPlaced",value:function onIconPlaced(e){}},{key:"onMessagePlaced",value:function onMessagePlaced(e){}},{key:"onFieldAdded",value:function onFieldAdded(e){var _this3=this;var s=e.elements;if(s){s.forEach((function(e){var s=_this3.containers.get(e);if(s){var _t3;c(s,(_t3={},_defineProperty(_t3,_this3.opts.rowInvalidClass,false),_defineProperty(_t3,_this3.opts.rowValidatingClass,false),_defineProperty(_t3,_this3.opts.rowValidClass,false),_defineProperty(_t3,"fv-plugins-icon-container",false),_t3));_this3.containers["delete"](e)}}));this.prepareFieldContainer(e.field,s)}}},{key:"onFieldRemoved",value:function onFieldRemoved(e){var _this4=this;e.elements.forEach((function(e){var s=_this4.containers.get(e);if(s){var _t4;c(s,(_t4={},_defineProperty(_t4,_this4.opts.rowInvalidClass,false),_defineProperty(_t4,_this4.opts.rowValidatingClass,false),_defineProperty(_t4,_this4.opts.rowValidClass,false),_t4))}}))}},{key:"prepareFieldContainer",value:function prepareFieldContainer(e,t){var _this5=this;if(t.length){var _s=t[0].getAttribute("type");if("radio"===_s||"checkbox"===_s){this.prepareElementContainer(e,t[0])}else{t.forEach((function(t){return _this5.prepareElementContainer(e,t)}))}}}},{key:"prepareElementContainer",value:function prepareElementContainer(e,i){var l="string"===typeof this.opts.rowSelector?this.opts.rowSelector:this.opts.rowSelector(e,i);var a=t$13(i,l);if(a!==i){var _t5;c(a,(_t5={},_defineProperty(_t5,this.opts.rowClasses,true),_defineProperty(_t5,"fv-plugins-icon-container",true),_t5));this.containers.set(i,a)}}},{key:"onElementValidating",value:function onElementValidating(e){var s=e.elements;var i=e.element.getAttribute("type");var l="radio"===i||"checkbox"===i?s[0]:e.element;var a=this.containers.get(l);if(a){var _t6;c(a,(_t6={},_defineProperty(_t6,this.opts.rowInvalidClass,false),_defineProperty(_t6,this.opts.rowValidatingClass,true),_defineProperty(_t6,this.opts.rowValidClass,false),_t6))}}},{key:"onElementNotValidated",value:function onElementNotValidated(e){this.removeClasses(e.element,e.elements)}},{key:"onElementIgnored",value:function onElementIgnored(e){this.removeClasses(e.element,e.elements)}},{key:"removeClasses",value:function removeClasses(e,s){var _t7;var i=e.getAttribute("type");var l="radio"===i||"checkbox"===i?s[0]:e;c(l,(_t7={},_defineProperty(_t7,this.opts.eleValidClass,false),_defineProperty(_t7,this.opts.eleInvalidClass,false),_t7));var a=this.containers.get(l);if(a){var _t8;c(a,(_t8={},_defineProperty(_t8,this.opts.rowInvalidClass,false),_defineProperty(_t8,this.opts.rowValidatingClass,false),_defineProperty(_t8,this.opts.rowValidClass,false),_t8))}}},{key:"onElementValidated",value:function onElementValidated(e){var _this6=this;var s=e.elements;var i=e.element.getAttribute("type");var l="radio"===i||"checkbox"===i?s[0]:e.element;
26327s.forEach((function(s){var _t9;c(s,(_t9={},_defineProperty(_t9,_this6.opts.eleValidClass,e.valid),_defineProperty(_t9,_this6.opts.eleInvalidClass,!e.valid),_t9))}));var a=this.containers.get(l);if(a){if(!e.valid){var _t10;this.results.set(l,false);c(a,(_t10={},_defineProperty(_t10,this.opts.rowInvalidClass,true),_defineProperty(_t10,this.opts.rowValidatingClass,false),_defineProperty(_t10,this.opts.rowValidClass,false),_t10))}else{this.results["delete"](l);var _e2=true;this.containers.forEach((function(t,s){if(t===a&&_this6.results.get(s)===false){_e2=false}}));if(_e2){var _t11;c(a,(_t11={},_defineProperty(_t11,this.opts.rowInvalidClass,false),_defineProperty(_t11,this.opts.rowValidatingClass,false),_defineProperty(_t11,this.opts.rowValidClass,true),_t11))}}}}}]);return l}(t$10);var i$1=function(_e){_inherits(i,_e);var _super=_createSuper(i);function i(e){var _this;_classCallCheck(this,i);_this=_super.call(this,e);_this.icons=new Map;_this.opts=Object.assign({},{invalid:"fv-plugins-icon--invalid",onPlaced:function onPlaced(){},onSet:function onSet(){},valid:"fv-plugins-icon--valid",validating:"fv-plugins-icon--validating"},e);_this.elementValidatingHandler=_this.onElementValidating.bind(_assertThisInitialized(_this));_this.elementValidatedHandler=_this.onElementValidated.bind(_assertThisInitialized(_this));_this.elementNotValidatedHandler=_this.onElementNotValidated.bind(_assertThisInitialized(_this));_this.elementIgnoredHandler=_this.onElementIgnored.bind(_assertThisInitialized(_this));_this.fieldAddedHandler=_this.onFieldAdded.bind(_assertThisInitialized(_this));return _this}_createClass(i,[{key:"install",value:function install(){this.core.on("core.element.validating",this.elementValidatingHandler).on("core.element.validated",this.elementValidatedHandler).on("core.element.notvalidated",this.elementNotValidatedHandler).on("core.element.ignored",this.elementIgnoredHandler).on("core.field.added",this.fieldAddedHandler)}},{key:"uninstall",value:function uninstall(){this.icons.forEach((function(e){return e.parentNode.removeChild(e)}));this.icons.clear();this.core.off("core.element.validating",this.elementValidatingHandler).off("core.element.validated",this.elementValidatedHandler).off("core.element.notvalidated",this.elementNotValidatedHandler).off("core.element.ignored",this.elementIgnoredHandler).off("core.field.added",this.fieldAddedHandler)}},{key:"onFieldAdded",value:function onFieldAdded(e){var _this2=this;var t=e.elements;if(t){t.forEach((function(e){var t=_this2.icons.get(e);if(t){t.parentNode.removeChild(t);_this2.icons["delete"](e)}}));this.prepareFieldIcon(e.field,t)}}},{key:"prepareFieldIcon",value:function prepareFieldIcon(e,t){var _this3=this;if(t.length){var _i=t[0].getAttribute("type");if("radio"===_i||"checkbox"===_i){this.prepareElementIcon(e,t[0])}else{t.forEach((function(t){return _this3.prepareElementIcon(e,t)}))}}}},{key:"prepareElementIcon",value:function prepareElementIcon(e,i){var n=document.createElement("i");n.setAttribute("data-field",e);i.parentNode.insertBefore(n,i.nextSibling);c(n,{"fv-plugins-icon":true});var l={classes:{invalid:this.opts.invalid,valid:this.opts.valid,validating:this.opts.validating},element:i,field:e,iconElement:n};this.core.emit("plugins.icon.placed",l);this.opts.onPlaced(l);this.icons.set(i,n)}},{key:"onElementValidating",value:function onElementValidating(e){var _this$setClasses;var t=this.setClasses(e.field,e.element,e.elements,(_this$setClasses={},_defineProperty(_this$setClasses,this.opts.invalid,false),_defineProperty(_this$setClasses,this.opts.valid,false),_defineProperty(_this$setClasses,this.opts.validating,true),_this$setClasses));var i={element:e.element,field:e.field,iconElement:t,status:"Validating"};this.core.emit("plugins.icon.set",i);this.opts.onSet(i)}},{key:"onElementValidated",value:function onElementValidated(e){var _this$setClasses2;var t=this.setClasses(e.field,e.element,e.elements,(_this$setClasses2={},_defineProperty(_this$setClasses2,this.opts.invalid,!e.valid),_defineProperty(_this$setClasses2,this.opts.valid,e.valid),_defineProperty(_this$setClasses2,this.opts.validating,fal
26327se),_this$setClasses2));var i={element:e.element,field:e.field,iconElement:t,status:e.valid?"Valid":"Invalid"};this.core.emit("plugins.icon.set",i);this.opts.onSet(i)}},{key:"onElementNotValidated",value:function onElementNotValidated(e){var _this$setClasses3;var t=this.setClasses(e.field,e.element,e.elements,(_this$setClasses3={},_defineProperty(_this$setClasses3,this.opts.invalid,false),_defineProperty(_this$setClasses3,this.opts.valid,false),_defineProperty(_this$setClasses3,this.opts.validating,false),_this$setClasses3));var i={element:e.element,field:e.field,iconElement:t,status:"NotValidated"};this.core.emit("plugins.icon.set",i);this.opts.onSet(i)}},{key:"onElementIgnored",value:function onElementIgnored(e){var _this$setClasses4;var t=this.setClasses(e.field,e.element,e.elements,(_this$setClasses4={},_defineProperty(_this$setClasses4,this.opts.invalid,false),_defineProperty(_this$setClasses4,this.opts.valid,false),_defineProperty(_this$setClasses4,this.opts.validating,false),_this$setClasses4));var i={element:e.element,field:e.field,iconElement:t,status:"Ignored"};this.core.emit("plugins.icon.set",i);this.opts.onSet(i)}},{key:"setClasses",value:function setClasses(e,i,n,l){var s=i.getAttribute("type");var d="radio"===s||"checkbox"===s?n[0]:i;if(this.icons.has(d)){var _e2=this.icons.get(d);c(_e2,l);return _e2}else{return null}}}]);return i}(t$10);var i$2=function(_e){_inherits(i,_e);var _super=_createSuper(i);function i(e){var _this;_classCallCheck(this,i);_this=_super.call(this,e);_this.invalidFields=new Map;_this.opts=Object.assign({},{enabled:true},e);_this.validatorHandler=_this.onValidatorValidated.bind(_assertThisInitialized(_this));_this.shouldValidateFilter=_this.shouldValidate.bind(_assertThisInitialized(_this));_this.fieldAddedHandler=_this.onFieldAdded.bind(_assertThisInitialized(_this));_this.elementNotValidatedHandler=_this.onElementNotValidated.bind(_assertThisInitialized(_this));_this.elementValidatingHandler=_this.onElementValidating.bind(_assertThisInitialized(_this));return _this}_createClass(i,[{key:"install",value:function install(){this.core.on("core.validator.validated",this.validatorHandler).on("core.field.added",this.fieldAddedHandler).on("core.element.notvalidated",this.elementNotValidatedHandler).on("core.element.validating",this.elementValidatingHandler).registerFilter("field-should-validate",this.shouldValidateFilter)}},{key:"uninstall",value:function uninstall(){this.invalidFields.clear();this.core.off("core.validator.validated",this.validatorHandler).off("core.field.added",this.fieldAddedHandler).off("core.element.notvalidated",this.elementNotValidatedHandler).off("core.element.validating",this.elementValidatingHandler).deregisterFilter("field-should-validate",this.shouldValidateFilter)}},{key:"shouldValidate",value:function shouldValidate(e,i,t,l){var d=(this.opts.enabled===true||this.opts.enabled[e]===true)&&this.invalidFields.has(i)&&!!this.invalidFields.get(i).length&&this.invalidFields.get(i).indexOf(l)===-1;return!d}},{key:"onValidatorValidated",value:function onValidatorValidated(e){var i=this.invalidFields.has(e.element)?this.invalidFields.get(e.element):[];var t=i.indexOf(e.validator);if(e.result.valid&&t>=0){i.splice(t,1)}else if(!e.result.valid&&t===-1){i.push(e.validator)}this.invalidFields.set(e.element,i)}},{key:"onFieldAdded",value:function onFieldAdded(e){if(e.elements){this.clearInvalidFields(e.elements)}}},{key:"onElementNotValidated",value:function onElementNotValidated(e){this.clearInvalidFields(e.elements)}},{key:"onElementValidating",value:function onElementValidating(e){this.clearInvalidFields(e.elements)}},{key:"clearInvalidFields",value:function clearInvalidFields(e){var _this2=this;e.forEach((function(e){return _this2.invalidFields["delete"](e)}))}}]);return i}(t$10);var e$H=function(_t){_inherits(e,_t);var _super=_createSuper(e);function e(t){var _this;_classCallCheck(this,e);_this=_super.call(this,t);_this.isFormValid=false;_this.opts=Object.assign({},{aspNetButton:false,buttons:function buttons(t){return[].slice.call(t.querySelectorAll('[type="submit"]:not([formnovalidate])'))}},t);_this.submitHandler=_this.handleSubmitEvent.bind(_assertThisInitialized(_this));_this.buttonClickHandler=_this.handleClickEvent.bind(_assertThisInitialized(_this));return _this}_createClass(e,[{key:"install",value:function install(){var _this2=this;if(!(this.core.getFormElement()instanceof HTMLFormElement)){return}var t=this.core.getFormElement();this.submitButtons=this.opts.buttons(t);t.setAttribute("novalidate","novalidate");t.addEventListener("submit",this.submitHandler);this.hiddenClickedEle=document.createElement("input");this.hiddenClickedEle.setAttribute("type","hidden");t.appendChild(this.hiddenClickedEle);this.submitButtons.forEach((function(t){t.addEventListener("click",_this2.buttonClickHandler)}))}},{key:"uninstall",value:function uninstall(){var _this3=this;var t=this.core.getFormElement();if(t instanceof HTMLFormElement){t.removeEventListener("submit",this.submitHandler)}this.submitButtons.forEach((function(t){t.removeEventListener("click",_this3.buttonClickHandler)}));this.hiddenClickedEle.parentElement.removeChild(this.hiddenClickedEle)}},{key:"handleSubmitEvent",value:function handleSubmitEvent(t){this.validateForm(t)}},{key:"handleClickEvent",value:function handleClickEvent(t){var e=t.currentTarget;if(e instanceof HTMLElement){if(this.opts.aspNetButton&&this.isFormValid===true);else{var _e=this.core.getFormElement();_e.removeEventListener("submit",this.submitHandler);this.clickedButton=t.target;var i=this.clickedButton.getAttribute("name");var s=this.clickedButton.getAttribute("value");if(i&&s){this.hiddenClickedEle.setAttribute("name",i);this.hiddenClickedEle.setAttribute("value",s)}this.validateForm(t)}}}},{key:"validateForm",value:function validateForm(t){var _this4=this;t.preventDefault();this.core.validate().then((function(t){if(t==="Valid"&&_this4.opts.aspNetButton&&!_this4.isFormValid&&_this4.clickedButton){_this4.isFormValid=true;_this4.clickedButton.removeEventListener("click",_this4.buttonClickHandler);_this4.clickedButton.click()}}))}}]);return e}(t$10);var i$3=function(_t){_inherits(i,_t);var _super=_createSuper(i);function i(t){var _this;_classCallCheck(this,i);_this=_super.call(this,t);_this.messages=new Map;_this.opts=Object.assign({},{placement:"top",trigger:"click"},t);_this.iconPlacedHandler=_this.onIconPlaced.bind(_assertThisInitialized(_this));_this.validatorValidatedHandler=_this.onValidatorValidated.bind(_assertThisInitialized(_this));_this.elementValidatedHandler=_this.onElementValidated.bind(_assertThisInitialized(_this));_this.documentClickHandler=_this.onDocumentClicked.bind(_assertThisInitialized(_this));return _this}_createClass(i,[{key:"install",value:function install(){this.tip=document.createElement("div");c(this.tip,_defineProperty({"fv-plugins-tooltip":true},"fv-plugins-tooltip--".concat(this.opts.placement),true));document.body.appendChild(this.tip);this.core.on("plugins.icon.placed",this.iconPlacedHandler).on("core.validator.validated",this.validatorValidatedHandler).on("core.element.validated",this.elementValidatedHandler);if("click"===this.opts.trigger){document.addEventListener("click",this.documentClickHandler)}}},{key:"uninstall",value:function uninstall(){this.messages.clear();document.body.removeChild(this.tip);this.core.off("plugins.icon.placed",this.iconPlacedHandler).off("core.validator.validated",this.validatorValidatedHandler).off("core.element.validated",this.elementValidatedHandler);if("click"===this.opts.trigger){document.removeEventListener("click",this.documentClickHandler)}}},{key:"onIconPlaced",value:function onIconPlaced(t){var _this2=this;c(t.iconElement,{"fv-plugins-tooltip-icon":true});switch(this.opts.trigger){case"hover":t.iconElement.addEventListener("mouseenter",(function(e){return _this2.show(t.element,e)}));t.iconElement.addEventListener("mouseleave",(function(t){return _this2.hide()}));break;case"click":default:t.iconElement.addEventListener("click",(function(e){return _this2.show(t.element,e)}));break}}},{key:"onValidatorValidated",value:function onValidatorValidated(t){if(!t.result.valid){var _e2=t.elements;var _i=t.element.getAttribute("type");var s="radio"===_i||"checkbox"===_i?_e2[0]:t.element;var o=typeof t.result.message==="string"?t.result.message:t.result.message[this.core.getLocale()];this.messages.set(s,o)}}},{key:"onElementValidated",value:function onElementValidated(t){if(t.valid){var _e3=t.elements;var _i2=t.element.getAttribute("type");var s="radio"===_i2||"checkbox"===_i2?_e3[0]:t.element;this.messages["delete"](s)}}},{key:"onDocumentClicked",value:function onDocumentClicked(t){this.hide()}},{key:"show",value:function show(t,i){i.preventDefault();i.stopPropagation();if(!this.messages.has(t)){return}c(this.tip,{"fv-plugins-tooltip--hide":false});this.tip.innerHTML='<div class="fv-plugins-tooltip__content">'.concat(this.messages.get(t),"</div>");var s=i.target;var o=s.getBoundingClientRect();var _this$tip$getBounding=this.tip.getBoundingClientRect(),l=_this$tip$getBounding.height,n=_this$tip$getBounding.width;var a=0;var d=0;switch(this.opts.placement){case"bottom":a=o.top+o.height;d=o.left+o.width/2-n/2;break;case"bottom-left":a=o.top+o.height;d=o.left;break;case"bottom-right":a=o.top+o.height;d=o.left+o.width-n;break;case"left":a=o.top+o.height/2-l/2;d=o.left-n;break;case"right":a=o.top+o.height/2-l/2;d=o.left+o.width;break;case"top-left":a=o.top-l;d=o.left;break;case"top-right":a=o.top-l;d=o.left+o.width-n;break;case"top":default:a=o.top-l;d=o.left+o.width/2-n/2;break}var c$1=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;var r=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;a=a+c$1;d=d+r;this.tip.setAttribute("style","top: ".concat(a,"px; left: ").concat(d,"px"))}},{key:"hide",value:function hide(){c(this.tip,{"fv-plugins-tooltip--hide":true})}}]);return i}(t$10);var t$14=function(_e){_inherits(t,_e);var _super=_createSuper(t);function t(e){var _this;_classCallCheck(this,t);_this=_super.call(this,e);_this.handlers=[];_this.timers=new Map;var _t=document.createElement("div");_this.defaultEvent=!("oninput"in _t)?"keyup":"input";_this.opts=Object.assign({},{delay:0,event:_this.defaultEvent,threshold:0},e);_this.fieldAddedHandler=_this.onFieldAdded.bind(_assertThisInitialized(_this));_this.fieldRemovedHandler=_this.onFieldRemoved.bind(_assertThisInitialized(_this));return _this}_createClass(t,[{key:"install",value:function install(){this.core.on("core.field.added",this.fieldAddedHandler).on("core.field.removed",this.fieldRemovedHandler)}},{key:"uninstall",value:function uninstall(){this.handlers.forEac
26327h((function(e){return e.element.removeEventListener(e.event,e.handler)}));this.handlers=[];this.timers.forEach((function(e){return window.clearTimeout(e)}));this.timers.clear();this.core.off("core.field.added",this.fieldAddedHandler).off("core.field.removed",this.fieldRemovedHandler)}},{key:"prepareHandler",value:function prepareHandler(e,t){var _this2=this;t.forEach((function(t){var i=[];if(!!_this2.opts.event&&_this2.opts.event[e]===false){i=[]}else if(!!_this2.opts.event&&!!_this2.opts.event[e]){i=_this2.opts.event[e].split(" ")}else if("string"===typeof _this2.opts.event&&_this2.opts.event!==_this2.defaultEvent){i=_this2.opts.event.split(" ")}else{var _e2=t.getAttribute("type");var s=t.tagName.toLowerCase();var n="radio"===_e2||"checkbox"===_e2||"file"===_e2||"select"===s?"change":_this2.ieVersion>=10&&t.getAttribute("placeholder")?"keyup":_this2.defaultEvent;i=[n]}i.forEach((function(i){var s=function s(i){return _this2.handleEvent(i,e,t)};_this2.handlers.push({element:t,event:i,field:e,handler:s});t.addEventListener(i,s)}))}))}},{key:"handleEvent",value:function handleEvent(e,t,i){var _this3=this;if(this.exceedThreshold(t,i)&&this.core.executeFilter("plugins-trigger-should-validate",true,[t,i])){var s=function s(){return _this3.core.validateElement(t,i).then((function(s){_this3.core.emit("plugins.trigger.executed",{element:i,event:e,field:t})}))};var n=this.opts.delay[t]||this.opts.delay;if(n===0){s()}else{var _e3=this.timers.get(i);if(_e3){window.clearTimeout(_e3)}this.timers.set(i,window.setTimeout(s,n*1e3))}}}},{key:"onFieldAdded",value:function onFieldAdded(e){this.handlers.filter((function(t){return t.field===e.field})).forEach((function(e){return e.element.removeEventListener(e.event,e.handler)}));this.prepareHandler(e.field,e.elements)}},{key:"onFieldRemoved",value:function onFieldRemoved(e){this.handlers.filter((function(t){return t.field===e.field&&e.elements.indexOf(t.element)>=0})).forEach((function(e){return e.element.removeEventListener(e.event,e.handler)}))}},{key:"exceedThreshold",value:function exceedThreshold(e,t){var i=this.opts.threshold[e]===0||this.opts.threshold===0?false:this.opts.threshold[e]||this.opts.threshold;if(!i){return true}var s=t.getAttribute("type");if(["button","checkbox","file","hidden","image","radio","reset","submit"].indexOf(s)!==-1){return true}var n=this.core.getElementValue(e,t);return n.length>=i}}]);return t}(t$10);var index$2={Alias:e$D,Aria:i,Declarative:t$11,DefaultSubmit:o$4,Dependency:e$E,Excluded:e$F,FieldStatus:t$12,Framework:l$2,Icon:i$1,Message:s$9,Sequence:i$2,SubmitButton:e$H,Tooltip:i$3,Trigger:t$14};function s$a(s,t){return s.classList?s.classList.contains(t):new RegExp("(^| )".concat(t,"( |$)"),"gi").test(s.className)}var index$3={call:t$6,classSet:c,closest:t$13,fetch:e$4,format:r,hasClass:s$a,isValidDate:t$9};var p={};exports.Plugin=t$10;exports.algorithms=index;exports.filters=index$1;exports.formValidation=r$d;exports.locales=p;exports.plugins=index$2;exports.utils=index$3;exports.validators=s$7;Object.defineProperty(exports,"__esModule",{value:true})}));
26328(function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?module.exports=factory():typeof define==="function"&&define.amd?define(factory):(global=global||self,global.FormValidation=global.FormValidation||{},global.FormValidation.plugins=global.FormValidation.plugins||{},global.FormValidation.plugins.Bootstrap5=factory())})(this,(function(){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}
26328function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})));return true}catch(e){return false}}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _possibleConstructorReturn(self,call){if(call&&(typeof call==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break}return object}function _get(target,property,receiver){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(receiver)}return desc.value}}return _get(target,property,receiver||target)}var e=FormValidation.utils.classSet;var t=FormValidation.utils.hasClass;var n=FormValidation.plugins.Framework;var l=function(_n){_inherits(l,_n);var _super=_createSuper(l);function l(e){var _this;_classCallCheck(this,l);_this=_super.call(this,Object.assign({},{eleInvalidClass:"is-invalid",eleValidClass:"is-valid",formClass:"fv-plugins-bootstrap5",rowInvalidClass:"fv-plugins-bootstrap5-row-invalid",rowPattern:/^(.*)(col|offset)(-(sm|md|lg|xl))*-[0-9]+(.*)$/,rowSelector:".row",rowValidClass:"fv-plugins-bootstrap5-row-valid"},e));_this.eleValidatedHandler=_this.handleElementValidated.bind(_assertThisInitialized(_this));return _this}_createClass(l,[{key:"install",value:function install(){_get(_getPrototypeOf(l.prototype),"install",this).call(this);this.core.on("core.element.validated",this.eleValidatedHandler)}},{key:"uninstall",value:function uninstall(){_get(_getPrototypeOf(l.prototype),"install",this).call(this);this.core.off("core.element.validated",this.eleValidatedHandler)}},{key:"handleElementValidated",value:function handleElementValidated(n){var l=n.element.getAttribute("type");if(("checkbox"===l||"radio"===l)&&n.elements.length>1&&t(n.element,"form-check-input")){var _l=n.element.parentElement;if(t(_l,"form-check")){e(_l,{"is-invalid":!n.valid,"is-valid":n.valid})}}}},{key:"onIconPlaced",value:function onIconPlaced(n){e(n.element,{"fv-plugins-icon-input":true});var l=n.element.parentElement;if(t(l,"input-group")){l.parentElement.insertBefore(n.iconElement,l.nextSibling);if(n.element.nextElementSibling&&t(n.element.nextElementSibling,"input-group-text")){e(n.iconElement,{"fv-plugins-icon-input-group":true})}}var i=n.element.getAttribute("type");if("checkbox"===i||"radio"===i){var _i=l.parentElement;if(t(l,"form-check")){e(n.iconElement,{"fv-plugins-icon-check":true});l.parentElement.insertBefore(n.iconElement,l.nextSibling)}else if(t(l.parentElement,"form-check")){e(n.iconElement,{"fv-plugins-icon-check":true});_i.parentElement.insertBefore(n.iconElement,_i.nextSibling)}}}},{key:"onMessagePlaced",value:function onMessagePlaced(n){n.messageElement.classList.add("invalid-feedback");var l=n.element.parentElement;if(t(l,"input-group")){l.appendChild(n.messageElement);e(l,{"has-validation":true});return}var i=n.element.getAttribute("type");if(("checkbox"===i||"radio"===i)&&t(n.element,"form-check-input")&&!t(l,"form-check")){n.elements[n.elements.length-1].parentElement.appendChild(n.messageElement)}}}]);return l}(n);return l}));
26329/* ==========================================================
26330 * bootstrap-maxlength.js v1.10.0
26331 *
26332 * Copyright (c) 2013-2021 Maurizio Napoleoni;
26333 *
26334 * Licensed under the terms of the MIT license.
26335 * See: https://github.com/mimo84/bootstrap-maxlength/blob/master/LICENSE
26336 * ========================================================== */
26337/*global  jQuery*/
26338
26339(function ($) {
26340  'use strict';
26341  /**
26342   * We need an event when the elements are destroyed
26343   * because if an input is removed, we have to remove the
26344   * maxlength object associated (if any).
26345   * From:
26346   * http://stackoverflow.com/questions/2200494/jquery-trigger-event-when-an-element-is-removed-from-the-dom
26347   */
26348  if (!$.event.special.destroyed) {
26349    $.event.special.destroyed = {
26350      remove: function (o) {
26351        if (o.handler) {
26352          o.handler();
26353        }
26354      }
26355    };
26356  }
26357
26358
26359  $.fn.extend({
26360    maxlength: function (options, callback) {
26361      var documentBody = $('body'),
26362        defaults = {
26363          showOnReady: false, // true to always show when indicator is ready
26364          alwaysShow: true, // if true the indicator it's always shown.
26365          threshold: 0, // Represents how many chars left are needed to show up the counter
26366          warningClass: 'small form-text text-muted',
26367          limitReachedClass: 'small form-text text-danger',
26368          limitExceededClass: '',
26369          separator: ' / ',
26370          preText: '',
26371          postText: '',
26372          showMaxLength: true,
26373          placement: 'bottom-right-inside',
26374          message: null, // an alternative way to provide the message text
26375          showCharsTyped: true, // show the number of characters typed and not the number of characters remaining
26376          validate: false, // if the browser doesn't support the maxlength attribute, attempt to type more than the indicated chars, will be prevented.
26377          utf8: false, // counts using bytesize rather than length. eg: '£' is counted as 2 characters.
26378          appendToParent: false, // append the indicator to the input field's parent instead of body
26379          twoCharLinebreak: true, // count linebreak as 2 characters to match IE/Chrome textarea validation. As well as DB storage.
26380          customMaxAttribute: null, // null = use maxlength attribute and browser functionality, string = use specified attribute instead.
26381          customMaxClass: 'overmax', // Class to add to the input field when the maxlength is exceeded.
26382          allowOverMax: false, // Form submit validation is handled on your own.  when maxlength has been exceeded 'overmax' class added to element
26383          zIndex: 1099
26384        };
26385
26386      if ($.isFunction(options) && !callback) {
26387        callback = options;
26388        options = {};
26389      }
26390      options = $.extend(defaults, options);
26391
26392
26393      /**
26394       * Return the byte count of the specified character in UTF8 encoding.
26395       * Note: This won't cover UTF-8 characters that are 4 bytes long.
26396       *
26397       * @param input
26398       * @return {number}
26399       */
26400      function utf8CharByteCount(character) {
26401        var c = character.charCodeAt();
26402        // Not c then 0, else c < 128 then 1, else c < 2048 then 2, else 3
26403        return !c ? 0 : c < 128 ? 1 : c < 2048 ? 2 : 3;
26404      }
26405
26406      /**
26407       * Return the length of the specified input in UTF8 encoding.
26408       *
26409       * @param input
26410       * @return {number}
26411       */
26412      function utf8Length(string) {
26413        return string.split("")
26414          .map(utf8CharByteCount)
26415          // Prevent reduce from throwing an error if the string is empty.
26416          .concat(0)
26417          .reduce(function (sum, val) {
26418            return sum + val;
26419          });
26420      }
26421
26422      /**
26423       * Return the length of the specified input.
26424       *
26425       * @param input
26426       * @return {number}
26427       */
26428      function inputLength(input) {
26429        var text = input.val();
26430
26431        if (options.twoCharLinebreak) {
26432          // Count all line breaks as 2 characters
26433          text = text.replace(/\r(?!\n)|\n(?!\r)/g, '\r\n');
26434        } else {
26435          // Remove all double-character (\r\n) linebreaks, so they're counted only once.
26436          text = text.replace(/(?:\r\n|\r|\n)/g, '\n');
26437        }
26438
26439        var currentLength = 0;
26440
26441        if (options.utf8) {
26442          currentLength = utf8Length(text);
26443        } else {
26444          currentLength = text.length;
26445        }
26446
26447        // Remove "C:\fakepath\" from counter when using file input
26448        // Fix https://github.com/mimo84/bootstrap-maxlength/issues/146
26449        if (input.prop("type") === "file" && input.val() !== "") {
26450          currentLength -= 12;
26451        }
26452
26453        return currentLength;
26454      }
26455
26456      /**
26457       * Truncate the text of the specified input.
26458       *
26459       * @param input
26460       * @param limit
26461       */
26462      function truncateChars(input, maxlength) {
26463        var text = input.val();
26464
26465        if (options.twoCharLinebreak) {
26466          text = text.replace(/\r(?!\n)|\n(?!\r)/g, '\r\n');
26467
26468          if (text[text.length - 1] === '\n') {
26469            maxlength -= text.length % 2;
26470          }
26471        }
26472
26473        if (options.utf8) {
26474          var indexedSize = text.split("").map(utf8CharByteCount);
26475          for (
26476            var removedBytes = 0,
26477            bytesPastMax = utf8Length(text) - maxlength; removedBytes < bytesPastMax; removedBytes += indexedSize.pop()
26478          );
26479          maxlength -= (maxlength - indexedSize.length);
26480        }
26481
26482        input.val(text.substr(0, maxlength));
26483      }
26484
26485      /**
26486       * Return true if the indicator should be showing up.
26487       *
26488       * @param input
26489       * @param threshold
26490       * @param maxlength
26491       * @return {number}
26492       */
26493      function charsLeftThreshold(input, threshold, maxlength) {
26494        var output = true;
26495        if (!options.alwaysShow && (maxlength - inputLength(input) > threshold)) {
26496          output = false;
vendor: 4,243 bytes, lines 26497-26621
26497        }
26498        return output;
26499      }
26500
26501      /**
26502       * Returns how many chars are left to complete the fill up of the form.
26503       *
26504       * @param input
26505       * @param maxlength
26506       * @return {number}
26507       */
26508      function remainingChars(input, maxlength) {
26509        var length = maxlength - inputLength(input);
26510        return length;
26511      }
26512
26513      /**
26514       * When called displays the indicator.
26515       *
26516       * @param indicator
26517       */
26518      function showRemaining(currentInput, indicator) {
26519        indicator.css({
26520          display: 'block'
26521        });
26522        currentInput.trigger('maxlength.shown');
26523      }
26524
26525      /**
26526       * When called shows the indicator.
26527       *
26528       * @param indicator
26529       */
26530      function hideRemaining(currentInput, indicator) {
26531
26532        if (options.alwaysShow) {
26533          return;
26534        }
26535
26536        indicator.css({
26537          display: 'none'
26538        });
26539        currentInput.trigger('maxlength.hidden');
26540      }
26541
26542      /**
26543       * This function updates the value in the indicator
26544       *
26545       * @param maxLengthThisInput
26546       * @param typedChars
26547       * @return String
26548       */
26549      function updateMaxLengthHTML(currentInputText, maxLengthThisInput, typedChars) {
26550        var output = '';
26551        if (options.message) {
26552          if (typeof options.message === 'function') {
26553            output = options.message(currentInputText, maxLengthThisInput);
26554          } else {
26555            output = options.message.replace('%charsTyped%', typedChars)
26556              .replace('%charsRemaining%', maxLengthThisInput - typedChars)
26557              .replace('%charsTotal%', maxLengthThisInput);
26558          }
26559        } else {
26560          if (options.preText) {
26561            output += options.preText;
26562          }
26563          if (!options.showCharsTyped) {
26564            output += maxLengthThisInput - typedChars;
26565          } else {
26566            output += typedChars;
26567          }
26568          if (options.showMaxLength) {
26569            output += options.separator + maxLengthThisInput;
26570          }
26571          if (options.postText) {
26572            output += options.postText;
26573          }
26574        }
26575        return output;
26576      }
26577
26578      /**
26579       * This function updates the value of the counter in the indicator.
26580       * Wants as parameters: the number of remaining chars, the element currently managed,
26581       * the maxLength for the current input and the indicator generated for it.
26582       *
26583       * @param remaining
26584       * @param currentInput
26585       * @param maxLengthCurrentInput
26586       * @param maxLengthIndicator
26587       */
26588      function manageRemainingVisibility(remaining, currentInput, maxLengthCurrentInput, maxLengthIndicator) {
26589        if (maxLengthIndicator) {
26590          maxLengthIndicator.html(updateMaxLengthHTML(currentInput.val(), maxLengthCurrentInput, (maxLengthCurrentInput - remaining)));
26591
26592          if (remaining > 0) {
26593            if (charsLeftThreshold(currentInput, options.threshold, maxLengthCurrentInput)) {
26594              showRemaining(currentInput, maxLengthIndicator.removeClass(options.limitReachedClass + ' ' + options.limitExceededClass).addClass(options.warningClass));
26595            } else {
26596              hideRemaining(currentInput, maxLengthIndicator);
26597            }
26598          } else {
26599            if (!options.limitExceededClass) {
26600              showRemaining(currentInput, maxLengthIndicator.removeClass(options.warningClass).addClass(options.limitReachedClass));
26601            } else {
26602              if (remaining === 0) {
26603                showRemaining(currentInput, maxLengthIndicator.removeClass(options.warningClass + ' ' + options.limitExceededClass).addClass(options.limitReachedClass));
26604              } else {
26605                showRemaining(currentInput, maxLengthIndicator.removeClass(options.warningClass + ' ' + options.limitReachedClass).addClass(options.limitExceededClass));
26606              }
26607            }
26608          }
26609        }
26610
26611        if (options.customMaxAttribute) {
26612          // class to use for form validation on custom maxlength attribute
26613          if (remaining < 0) {
26614            currentInput.addClass(options.customMaxClass);
26615          } else {
26616            currentInput.removeClass(options.customMaxClass);
26617          }
26618        }
26619      }
26620
26621      /**
26622       * This function returns an object containing all the
26623       * informations about the position of the current input
26624       *
26625       * @param currentInput
26626       * @return object {bottom height left right top width}
26627       *
26628       */
26629      function getPosition(currentInput) {
26630        var el = currentInput[0];
26631        return $.extend({}, (typeof el.getBoundingClientRect === 'function') ? el.getBoundingClientRect() : {
26632          width: el.offsetWidth,
26633          height: el.offsetHeight
26634        }, currentInput.offset());
26635      }
26636
26637      /**
26638       * This function places the maxLengthIndicator based on placement config object.
26639       *
26640       * @param {object} placement
26641       * @param {$} maxLengthIndicator
26642       * @return null
26643       *
26644       */
26645      function placeWithCSS(placement, maxLengthIndicator) {
26646        if (!placement || !maxLengthIndicator) {
26647          return;
26648        }
26649
26650        var POSITION_KEYS = [
26651          'top',
26652          'bottom',
26653          'left',
26654          'right',
26655          'position'
26656        ];
26657
26658        var cssPos = {};
26659
26660        // filter css properties to position
26661        $.each(POSITION_KEYS, function (i, key) {
26662          var val = options.placement[key];
26663          if (typeof val !== 'undefined') {
26664            cssPos[key] = val;
26665          }
26666        });
26667
26668        maxLengthIndicator.css(cssPos);
26669
26670        return;
26671      }
26672
26673
26674      /**
26675       * This function places the maxLengthIndicator at the
26676       * top / bottom / left / right of the currentInput
26677       *
26678       * @param currentInput
26679       * @param maxLengthIndicator
26680       * @return null
26681       *
26682       */
26683      function place(currentInput, maxLengthIndicator) {
26684        var pos = getPosition(currentInput);
26685
26686        // Supports custom placement handler
26687        if ($.type(options.placement) === 'function') {
26688          options.placement(currentInput, maxLengthIndicator, pos);
26689          return;
26690        }
26691
26692        // Supports custom placement via css positional properties
26693        if ($.isPlainObject(options.placement)) {
26694          placeWithCSS(options.placement, maxLengthIndicator);
26695          return;
26696        }
26697
26698        var inputOuter = currentInput.outerWidth(),
26699          outerWidth = maxLengthIndicator.outerWidth(),
26700          actualWidth = maxLengthIndicator.width(),
26701          actualHeight = maxLengthIndicator.height();
26702
26703        // get the right position if the indicator is appended to the input's parent
26704        if (options.appendToParent) {
26705          pos.top -= currentInput.parent().offset().top;
26706          pos.left -= currentInput.parent().offset().left;
26707        }
26708
26709        switch (options.placement) {
26710          case 'bottom':
26711            maxLengthIndicator.css({
26712              top: pos.top + pos.height,
26713              left: pos.left + pos.width / 2 - actualWidth / 2
26714            });
26715            break;
26716          case 'top':
26717            maxLengthIndicator.css({
26718              top: pos.top - actualHeight,
26719              left: pos.left + pos.width / 2 - actualWidth / 2
26720            });
26721            break;
26722          case 'left':
26723            maxLengthIndicator.css({
26724              top: pos.top + pos.height / 2 - actualHeight / 2,
26725              left: pos.left - actualWidth
26726            });
26727            break;
26728          case 'right':
26729            maxLengthIndicator.css({
26730              top: pos.top + pos.height / 2 - actualHeight / 2,
26731              left: pos.left + pos.width
26732            });
26733            break;
26734          case 'bottom-right':
26735            maxLengthIndicator.css({
26736              top: pos.top + pos.height,
26737              left: pos.left + pos.width
26738            });
26739            break;
26740          case 'top-right':
26741            maxLengthIndicator.css({
26742              top: pos.top - actualHeight,
26743              left: pos.left + inputOuter
26744            });
26745            break;
26746          case 'top-left':
26747            maxLengthIndicator.css({
26748              top: pos.top - actualHeight,
26749              left: pos.left - outerWidth
26750            });
26751            break;
26752          case 'bottom-left':
26753            maxLengthIndicator.css({
26754              top: pos.top + currentInput.outerHeight(),
26755              left: pos.left - outerWidth
26756            });
26757            break;
26758          case 'centered-right':
26759            maxLengthIndicator.css({
26760              top: pos.top + (actualHeight / 2),
26761              left: pos.left + inputOuter - outerWidth - 3
26762            });
26763            break;
26764
26765          // Some more options for placements
26766          case 'bottom-right-inside':
26767            maxLengthIndicator.css({
26768              top: pos.top + pos.height,
26769              left: pos.left + pos.width - outerWidth
26770            });
26771            break;
26772          case 'top-right-inside':
26773            maxLengthIndicator.css({
26774              top: pos.top - actualHeight,
26775              left: pos.left + inputOuter - outerWidth
26776            });
26777            break;
26778          case 'top-left-inside':
26779            maxLengthIndicator.css({
26780              top: pos.top - actualHeight,
26781              left: pos.left
26782            });
26783            break;
26784          case 'bottom-left-inside':
26785            maxLengthIndicator.css({
26786              top: pos.top + currentInput.outerHeight(),
26787              left: pos.left
26788            });
26789            break;
26790        }
26791      }
26792
26793      /**
26794       * This function returns true if the indicator position needs to
26795       * be recalculated when the currentInput changes
26796       *
26797       * @return {boolean}
26798       *
26799       */
26800      function isPlacementMutable() {
26801        return options.placement === 'bottom-right-inside' || options.placement === 'top-right-inside' || typeof options.placement === 'function' || (options.message && typeof options.message === 'function');
26802      }
26803
26804      /**
26805       * This function retrieves the maximum length of currentInput
26806       *
26807       * @param currentInput
26808       * @return {number}
26809       *
26810       */
26811      function getMaxLength(currentInput) {
26812        var max = currentInput.attr('maxlength') || options.customMaxAttribute;
26813
26814        if (options.customMaxAttribute && !options.allowOverMax) {
26815          var custom = currentInput.attr(options.customMaxAttribute);
26816          if (!max || custom < max) {
26817            max = custom;
26818          }
26819        }
26820
26821        if (!max) {
26822          max = currentInput.attr('size');
26823        }
26824        return max;
26825      }
26826
26827      return this.each(function () {
26828
26829        var currentInput = $(this),
26830          maxLengthCurrentInput,
26831          maxLengthIndicator;
26832
26833        $(window).resize(function () {
26834          if (maxLengthIndicator) {
26835            place(currentInput, maxLengthIndicator);
26836          }
26837        });
26838
26839        function firstInit() {
26840          var maxlengthContent = updateMaxLengthHTML(currentInput.val(), maxLengthCurrentInput, '0');
26841          maxLengthCurrentInput = getMaxLength(currentInput);
26842
26843          if (!maxLengthIndicator) {
26844            maxLengthIndicator = $('<span class="bootstrap-maxlength"></span>').css({
26845              display: 'none',
26846              position: 'absolute',
26847              whiteSpace: 'nowrap',
26848              zIndex: options.zIndex
26849            }).html(maxlengthContent);
26850          }
26851
26852          // We need to detect resizes if we are dealing with a textarea:
26853          if (currentInput.is('textarea')) {
26854            currentInput.data('maxlenghtsizex', currentInput.outerWidth());
26855            currentInput.data('maxlenghtsizey', currentInput.outerHeight());
26856
26857            currentInput.mouseup(function () {
26858              if (currentInput.outerWidth() !== currentInput.data('maxlenghtsizex') || currentInput.outerHeight() !== currentInput.data('maxlenghtsizey')) {
26859                place(currentInput, maxLengthIndicator);
26860              }
26861
26862              currentInput.data('maxlenghtsizex', currentInput.outerWidth());
26863              currentInput.data('maxlenghtsizey', currentInput.outerHeight());
26864            });
26865          }
26866
26867          if (options.appendToParent) {
26868            currentInput.parent().append(maxLengthIndicator);
26869            currentInput.parent().css('position', 'relative');
26870          } else {
26871            documentBody.append(maxLengthIndicator);
26872          }
26873
26874          var remaining = remainingChars(currentInput, getMaxLength(currentInput));
26875          manageRemainingVisibility(remaining, currentInput, maxLengthCurrentInput, maxLengthIndicator);
26876          place(currentInput, maxLengthIndicator);
26877        }
26878
26879        if (options.showOnReady) {
26880          currentInput.ready(function () {
26881            firstInit();
26882          });
26883        } else {
26884          currentInput.focus(function () {
26885            firstInit();
26886          });
26887        }
26888
26889        currentInput.on('maxlength.reposition', function () {
26890          place(currentInput, maxLengthIndicator);
26891        });
26892
26893
26894        currentInput.on('destroyed', function () {
26895          if (maxLengthIndicator) {
26896            maxLengthIndicator.remove();
26897          }
26898        });
26899
26900        currentInput.on('blur', function () {
26901          if (maxLengthIndicator && !options.showOnReady) {
26902            maxLengthIndicator.remove();
26903          }
26904        });
26905
26906        currentInput.on('input', function () {
26907          var maxlength = getMaxLength(currentInput),
26908            remaining = remainingChars(currentInput, maxlength),
26909            output = true;
26910
26911          if (options.validate && remaining < 0) {
26912            truncateChars(currentInput, maxlength);
26913            output = false;
vendor: 62,739 bytes, lines 26914-28393
26914          } else {
26915            manageRemainingVisibility(remaining, currentInput, maxLengthCurrentInput, maxLengthIndicator);
26916          }
26917
26918          // if (isPlacementMutable()) {
26919          //   place(currentInput, maxLengthIndicator);
26920          // }
26921
26922          return output;
26923        });
26924      });
26925    }
26926  });
26927}(jQuery));
26928/**
26929* @version: 3.1
26930* @author: Dan Grossman http://www.dangrossman.info/
26931* @copyright: Copyright (c) 2012-2019 Dan Grossman. All rights reserved.
26932* @license: Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php
26933* @website: http://www.daterangepicker.com/
26934*/
26935// Following the UMD template https://github.com/umdjs/umd/blob/master/templates/returnExportsGlobal.js
26936(function (root, factory) {
26937    if (typeof define === 'function' && define.amd) {
26938        // AMD. Make globaly available as well
26939        define(['moment', 'jquery'], function (moment, jquery) {
26940            if (!jquery.fn) jquery.fn = {}; // webpack server rendering
26941            if (typeof moment !== 'function' && moment.hasOwnProperty('default')) moment = moment['default']
26942            return factory(moment, jquery);
26943        });
26944    } else if (typeof module === 'object' && module.exports) {
26945        // Node / Browserify
26946        //isomorphic issue
26947        var jQuery = (typeof window != 'undefined') ? window.jQuery : undefined;
26948        if (!jQuery) {
26949            jQuery = require('jquery');
26950            if (!jQuery.fn) jQuery.fn = {};
26951        }
26952        var moment = (typeof window != 'undefined' && typeof window.moment != 'undefined') ? window.moment : require('moment');
26953        module.exports = factory(moment, jQuery);
26954    } else {
26955        // Browser globals
26956        root.daterangepicker = factory(root.moment, root.jQuery);
26957    }
26958}(this, function(moment, $) {
26959    var DateRangePicker = function(element, options, cb) {
26960
26961        //default settings for options
26962        this.parentEl = 'body';
26963        this.element = $(element);
26964        this.startDate = moment().startOf('day');
26965        this.endDate = moment().endOf('day');
26966        this.minDate = false;
26967        this.maxDate = false;
26968        this.maxSpan = false;
26969        this.autoApply = false;
26970        this.singleDatePicker = false;
26971        this.showDropdowns = false;
26972        this.minYear = moment().subtract(100, 'year').format('YYYY');
26973        this.maxYear = moment().add(100, 'year').format('YYYY');
26974        this.showWeekNumbers = false;
26975        this.showISOWeekNumbers = false;
26976        this.showCustomRangeLabel = true;
26977        this.timePicker = false;
26978        this.timePicker24Hour = false;
26979        this.timePickerIncrement = 1;
26980        this.timePickerSeconds = false;
26981        this.linkedCalendars = true;
26982        this.autoUpdateInput = true;
26983        this.alwaysShowCalendars = false;
26984        this.ranges = {};
26985
26986        this.opens = 'right';
26987        if (this.element.hasClass('pull-right'))
26988            this.opens = 'left';
26989
26990        this.drops = 'down';
26991        if (this.element.hasClass('dropup'))
26992            this.drops = 'up';
26993
26994        this.buttonClasses = 'btn btn-sm';
26995        this.applyButtonClasses = 'btn-primary';
26996        this.cancelButtonClasses = 'btn-default';
26997
26998        this.locale = {
26999            direction: 'ltr',
27000            format: moment.localeData().longDateFormat('L'),
27001            separator: ' - ',
27002            applyLabel: 'Apply',
27003            cancelLabel: 'Cancel',
27004            weekLabel: 'W',
27005            customRangeLabel: 'Custom Range',
27006            daysOfWeek: moment.weekdaysMin(),
27007            monthNames: moment.monthsShort(),
27008            firstDay: moment.localeData().firstDayOfWeek()
27009        };
27010
27011        this.callback = function() { };
27012
27013        //some state information
27014        this.isShowing = false;
27015        this.leftCalendar = {};
27016        this.rightCalendar = {};
27017
27018        //custom options from user
27019        if (typeof options !== 'object' || options === null)
27020            options = {};
27021
27022        //allow setting options with data attributes
27023        //data-api options will be overwritten with custom javascript options
27024        options = $.extend(this.element.data(), options);
27025
27026        //html template for the picker UI
27027        if (typeof options.template !== 'string' && !(options.template instanceof $))
27028            options.template =
27029            '<div class="daterangepicker">' +
27030                '<div class="ranges"></div>' +
27031                '<div class="drp-calendar left">' +
27032                    '<div class="calendar-table"></div>' +
27033                    '<div class="calendar-time"></div>' +
27034                '</div>' +
27035                '<div class="drp-calendar right">' +
27036                    '<div class="calendar-table"></div>' +
27037                    '<div class="calendar-time"></div>' +
27038                '</div>' +
27039                '<div class="drp-buttons">' +
27040                    '<span class="drp-selected"></span>' +
27041                    '<button class="cancelBtn" type="button"></button>' +
27042                    '<button class="applyBtn" disabled="disabled" type="button"></button> ' +
27043                '</div>' +
27044            '</div>';
27045
27046        this.parentEl = (options.parentEl && $(options.parentEl).length) ? $(options.parentEl) : $(this.parentEl);
27047        this.container = $(options.template).appendTo(this.parentEl);
27048
27049        //
27050        // handle all the possible options overriding defaults
27051        //
27052
27053        if (typeof options.locale === 'object') {
27054
27055            if (typeof options.locale.direction === 'string')
27056                this.locale.direction = options.locale.direction;
27057
27058            if (typeof options.locale.format === 'string')
27059                this.locale.format = options.locale.format;
27060
27061            if (typeof options.locale.separator === 'string')
27062                this.locale.separator = options.locale.separator;
27063
27064            if (typeof options.locale.daysOfWeek === 'object')
27065                this.locale.daysOfWeek = options.locale.daysOfWeek.slice();
27066
27067            if (typeof options.locale.monthNames === 'object')
27068              this.locale.monthNames = options.locale.monthNames.slice();
27069
27070            if (typeof options.locale.firstDay === 'number')
27071              this.locale.firstDay = options.locale.firstDay;
27072
27073            if (typeof options.locale.applyLabel === 'string')
27074              this.locale.applyLabel = options.locale.applyLabel;
27075
27076            if (typeof options.locale.cancelLabel === 'string')
27077              this.locale.cancelLabel = options.locale.cancelLabel;
27078
27079            if (typeof options.locale.weekLabel === 'string')
27080              this.locale.weekLabel = options.locale.weekLabel;
27081
27082            if (typeof options.locale.customRangeLabel === 'string'){
27083                //Support unicode chars in the custom range name.
27084                var elem = document.createElement('textarea');
27085                elem.innerHTML = options.locale.customRangeLabel;
27086                var rangeHtml = elem.value;
27087                this.locale.customRangeLabel = rangeHtml;
27088            }
27089        }
27090        this.container.addClass(this.locale.direction);
27091
27092        if (typeof options.startDate === 'string')
27093            this.startDate = moment(options.startDate, this.locale.format);
27094
27095        if (typeof options.endDate === 'string')
27096            this.endDate = moment(options.endDate, this.locale.format);
27097
27098        if (typeof options.minDate === 'string')
27099            this.minDate = moment(options.minDate, this.locale.format);
27100
27101        if (typeof options.maxDate === 'string')
27102            this.maxDate = moment(options.maxDate, this.locale.format);
27103
27104        if (typeof options.startDate === 'object')
27105            this.startDate = moment(options.startDate);
27106
27107        if (typeof options.endDate === 'object')
27108            this.endDate = moment(options.endDate);
27109
27110        if (typeof options.minDate === 'object')
27111            this.minDate = moment(options.minDate);
27112
27113        if (typeof options.maxDate === 'object')
27114            this.maxDate = moment(options.maxDate);
27115
27116        // sanity check for bad options
27117        if (this.minDate && this.startDate.isBefore(this.minDate))
27118            this.startDate = this.minDate.clone();
27119
27120        // sanity check for bad options
27121        if (this.maxDate && this.endDate.isAfter(this.maxDate))
27122            this.endDate = this.maxDate.clone();
27123
27124        if (typeof options.applyButtonClasses === 'string')
27125            this.applyButtonClasses = options.applyButtonClasses;
27126
27127        if (typeof options.applyClass === 'string') //backwards compat
27128            this.applyButtonClasses = options.applyClass;
27129
27130        if (typeof options.cancelButtonClasses === 'string')
27131            this.cancelButtonClasses = options.cancelButtonClasses;
27132
27133        if (typeof options.cancelClass === 'string') //backwards compat
27134            this.cancelButtonClasses = options.cancelClass;
27135
27136        if (typeof options.maxSpan === 'object')
27137            this.maxSpan = options.maxSpan;
27138
27139        if (typeof options.dateLimit === 'object') //backwards compat
27140            this.maxSpan = options.dateLimit;
27141
27142        if (typeof options.opens === 'string')
27143            this.opens = options.opens;
27144
27145        if (typeof options.drops === 'string')
27146            this.drops = options.drops;
27147
27148        if (typeof options.showWeekNumbers === 'boolean')
27149            this.showWeekNumbers = options.showWeekNumbers;
27150
27151        if (typeof options.showISOWeekNumbers === 'boolean')
27152            this.showISOWeekNumbers = options.showISOWeekNumbers;
27153
27154        if (typeof options.buttonClasses === 'string')
27155            this.buttonClasses = options.buttonClasses;
27156
27157        if (typeof options.buttonClasses === 'object')
27158            this.buttonClasses = options.buttonClasses.join(' ');
27159
27160        if (typeof options.showDropdowns === 'boolean')
27161            this.showDropdowns = options.showDropdowns;
27162
27163        if (typeof options.minYear === 'number')
27164            this.minYear = options.minYear;
27165
27166        if (typeof options.maxYear === 'number')
27167            this.maxYear = options.maxYear;
27168
27169        if (typeof options.showCustomRangeLabel === 'boolean')
27170            this.showCustomRangeLabel = options.showCustomRangeLabel;
27171
27172        if (typeof options.singleDatePicker === 'boolean') {
27173            this.singleDatePicker = options.singleDatePicker;
27174            if (this.singleDatePicker)
27175                this.endDate = this.startDate.clone();
27176        }
27177
27178        if (typeof options.timePicker === 'boolean')
27179            this.timePicker = options.timePicker;
27180
27181        if (typeof options.timePickerSeconds === 'boolean')
27182            this.timePickerSeconds = options.timePickerSeconds;
27183
27184        if (typeof options.timePickerIncrement === 'number')
27185            this.timePickerIncrement = options.timePickerIncrement;
27186
27187        if (typeof options.timePicker24Hour === 'boolean')
27188            this.timePicker24Hour = options.timePicker24Hour;
27189
27190        if (typeof options.autoApply === 'boolean')
27191            this.autoApply = options.autoApply;
27192
27193        if (typeof options.autoUpdateInput === 'boolean')
27194            this.autoUpdateInput = options.autoUpdateInput;
27195
27196        if (typeof options.linkedCalendars === 'boolean')
27197            this.linkedCalendars = options.linkedCalendars;
27198
27199        if (typeof options.isInvalidDate === 'function')
27200            this.isInvalidDate = options.isInvalidDate;
27201
27202        if (typeof options.isCustomDate === 'function')
27203            this.isCustomDate = options.isCustomDate;
27204
27205        if (typeof options.alwaysShowCalendars === 'boolean')
27206            this.alwaysShowCalendars = options.alwaysShowCalendars;
27207
27208        // update day names order to firstDay
27209        if (this.locale.firstDay != 0) {
27210            var iterator = this.locale.firstDay;
27211            while (iterator > 0) {
27212                this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift());
27213                iterator--;
27214            }
27215        }
27216
27217        var start, end, range;
27218
27219        //if no start/end dates set, check if an input element contains initial values
27220        if (typeof options.startDate === 'undefined' && typeof options.endDate === 'undefined') {
27221            if ($(this.element).is(':text')) {
27222                var val = $(this.element).val(),
27223                    split = val.split(this.locale.separator);
27224
27225                start = end = null;
27226
27227                if (split.length == 2) {
27228                    start = moment(split[0], this.locale.format);
27229                    end = moment(split[1], this.locale.format);
27230                } else if (this.singleDatePicker && val !== "") {
27231                    start = moment(val, this.locale.format);
27232                    end = moment(val, this.locale.format);
27233                }
27234                if (start !== null && end !== null) {
27235                    this.setStartDate(start);
27236                    this.setEndDate(end);
27237                }
27238            }
27239        }
27240
27241        if (typeof options.ranges === 'object') {
27242            for (range in options.ranges) {
27243
27244                if (typeof options.ranges[range][0] === 'string')
27245                    start = moment(options.ranges[range][0], this.locale.format);
27246                else
27247                    start = moment(options.ranges[range][0]);
27248
27249                if (typeof options.ranges[range][1] === 'string')
27250                    end = moment(options.ranges[range][1], this.locale.format);
27251                else
27252                    end = moment(options.ranges[range][1]);
27253
27254                // If the start or end date exceed those allowed by the minDate or maxSpan
27255                // options, shorten the range to the allowable period.
27256                if (this.minDate && start.isBefore(this.minDate))
27257                    start = this.minDate.clone();
27258
27259                var maxDate = this.maxDate;
27260                if (this.maxSpan && maxDate && start.clone().add(this.maxSpan).isAfter(maxDate))
27261                    maxDate = start.clone().add(this.maxSpan);
27262                if (maxDate && end.isAfter(maxDate))
27263                    end = maxDate.clone();
27264
27265                // If the end of the range is before the minimum or the start of the range is
27266                // after the maximum, don't display this range option at all.
27267                if ((this.minDate && end.isBefore(this.minDate, this.timepicker ? 'minute' : 'day'))
27268                  || (maxDate && start.isAfter(maxDate, this.timepicker ? 'minute' : 'day')))
27269                    continue;
27270
27271                //Support unicode chars in the range names.
27272                var elem = document.createElement('textarea');
27273                elem.innerHTML = range;
27274                var rangeHtml = elem.value;
27275
27276                this.ranges[rangeHtml] = [start, end];
27277            }
27278
27279            var list = '<ul>';
27280            for (range in this.ranges) {
27281                list += '<li data-range-key="' + range + '">' + range + '</li>';
27282            }
27283            if (this.showCustomRangeLabel) {
27284                list += '<li data-range-key="' + this.locale.customRangeLabel + '">' + this.locale.customRangeLabel + '</li>';
27285            }
27286            list += '</ul>';
27287            this.container.find('.ranges').prepend(list);
27288        }
27289
27290        if (typeof cb === 'function') {
27291            this.callback = cb;
27292        }
27293
27294        if (!this.timePicker) {
27295            this.startDate = this.startDate.startOf('day');
27296            this.endDate = this.endDate.endOf('day');
27297            this.container.find('.calendar-time').hide();
27298        }
27299
27300        //can't be used together for now
27301        if (this.timePicker && this.autoApply)
27302            this.autoApply = false;
27303
27304        if (this.autoApply) {
27305            this.container.addClass('auto-apply');
27306        }
27307
27308        if (typeof options.ranges === 'object')
27309            this.container.addClass('show-ranges');
27310
27311        if (this.singleDatePicker) {
27312            this.container.addClass('single');
27313            this.container.find('.drp-calendar.left').addClass('single');
27314            this.container.find('.drp-calendar.left').show();
27315            this.container.find('.drp-calendar.right').hide();
27316            if (!this.timePicker && this.autoApply) {
27317                this.container.addClass('auto-apply');
27318            }
27319        }
27320
27321        if ((typeof options.ranges === 'undefined' && !this.singleDatePicker) || this.alwaysShowCalendars) {
27322            this.container.addClass('show-calendar');
27323        }
27324
27325        this.container.addClass('opens' + this.opens);
27326
27327        //apply CSS classes and labels to buttons
27328        this.container.find('.applyBtn, .cancelBtn').addClass(this.buttonClasses);
27329        if (this.applyButtonClasses.length)
27330            this.container.find('.applyBtn').addClass(this.applyButtonClasses);
27331        if (this.cancelButtonClasses.length)
27332            this.container.find('.cancelBtn').addClass(this.cancelButtonClasses);
27333        this.container.find('.applyBtn').html(this.locale.applyLabel);
27334        this.container.find('.cancelBtn').html(this.locale.cancelLabel);
27335
27336        //
27337        // event listeners
27338        //
27339
27340        this.container.find('.drp-calendar')
27341            .on('click.daterangepicker', '.prev', $.proxy(this.clickPrev, this))
27342            .on('click.daterangepicker', '.next', $.proxy(this.clickNext, this))
27343            .on('mousedown.daterangepicker', 'td.available', $.proxy(this.clickDate, this))
27344            .on('mouseenter.daterangepicker', 'td.available', $.proxy(this.hoverDate, this))
27345            .on('change.daterangepicker', 'select.yearselect', $.proxy(this.monthOrYearChanged, this))
27346            .on('change.daterangepicker', 'select.monthselect', $.proxy(this.monthOrYearChanged, this))
27347            .on('change.daterangepicker', 'select.hourselect,select.minuteselect,select.secondselect,select.ampmselect', $.proxy(this.timeChanged, this));
27348
27349        this.container.find('.ranges')
27350            .on('click.daterangepicker', 'li', $.proxy(this.clickRange, this));
27351
27352        this.container.find('.drp-buttons')
27353            .on('click.daterangepicker', 'button.applyBtn', $.proxy(this.clickApply, this))
27354            .on('click.daterangepicker', 'button.cancelBtn', $.proxy(this.clickCancel, this));
27355
27356        if (this.element.is('input') || this.element.is('button')) {
27357            this.element.on({
27358                'click.daterangepicker': $.proxy(this.show, this),
27359                'focus.daterangepicker': $.proxy(this.show, this),
27360                'keyup.daterangepicker': $.proxy(this.elementChanged, this),
27361                'keydown.daterangepicker': $.proxy(this.keydown, this) //IE 11 compatibility
27362            });
27363        } else {
27364            this.element.on('click.daterangepicker', $.proxy(this.toggle, this));
27365            this.element.on('keydown.daterangepicker', $.proxy(this.toggle, this));
27366        }
27367
27368        //
27369        // if attached to a text input, set the initial value
27370        //
27371
27372        this.updateElement();
27373
27374    };
27375
27376    DateRangePicker.prototype = {
27377
27378        constructor: DateRangePicker,
27379
27380        setStartDate: function(startDate) {
27381            if (typeof startDate === 'string')
27382                this.startDate = moment(startDate, this.locale.format);
27383
27384            if (typeof startDate === 'object')
27385                this.startDate = moment(startDate);
27386
27387            if (!this.timePicker)
27388                this.startDate = this.startDate.startOf('day');
27389
27390            if (this.timePicker && this.timePickerIncrement)
27391                this.startDate.minute(Math.round(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement);
27392
27393            if (this.minDate && this.startDate.isBefore(this.minDate)) {
27394                this.startDate = this.minDate.clone();
27395                if (this.timePicker && this.timePickerIncrement)
27396                    this.startDate.minute(Math.round(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement);
27397            }
27398
27399            if (this.maxDate && this.startDate.isAfter(this.maxDate)) {
27400                this.startDate = this.maxDate.clone();
27401                if (this.timePicker && this.timePickerIncrement)
27402                    this.startDate.minute(Math.floor(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement);
27403            }
27404
27405            if (!this.isShowing)
27406                this.updateElement();
27407
27408            this.updateMonthsInView();
27409        },
27410
27411        setEndDate: function(endDate) {
27412            if (typeof endDate === 'string')
27413                this.endDate = moment(endDate, this.locale.format);
27414
27415            if (typeof endDate === 'object')
27416                this.endDate = moment(endDate);
27417
27418            if (!this.timePicker)
27419                this.endDate = this.endDate.endOf('day');
27420
27421            if (this.timePicker && this.timePickerIncrement)
27422                this.endDate.minute(Math.round(this.endDate.minute() / this.timePickerIncrement) * this.timePickerIncrement);
27423
27424            if (this.endDate.isBefore(this.startDate))
27425                this.endDate = this.startDate.clone();
27426
27427            if (this.maxDate && this.endDate.isAfter(this.maxDate))
27428                this.endDate = this.maxDate.clone();
27429
27430            if (this.maxSpan && this.startDate.clone().add(this.maxSpan).isBefore(this.endDate))
27431                this.endDate = this.startDate.clone().add(this.maxSpan);
27432
27433            this.previousRightTime = this.endDate.clone();
27434
27435            this.container.find('.drp-selected').html(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format));
27436
27437            if (!this.isShowing)
27438                this.updateElement();
27439
27440            this.updateMonthsInView();
27441        },
27442
27443        isInvalidDate: function() {
27444            return false;
27445        },
27446
27447        isCustomDate: function() {
27448            return false;
27449        },
27450
27451        updateView: function() {
27452            if (this.timePicker) {
27453                this.renderTimePicker('left');
27454                this.renderTimePicker('right');
27455                if (!this.endDate) {
27456                    this.container.find('.right .calendar-time select').prop('disabled', true).addClass('disabled');
27457                } else {
27458                    this.container.find('.right .calendar-time select').prop('disabled', false).removeClass('disabled');
27459                }
27460            }
27461            if (this.endDate)
27462                this.container.find('.drp-selected').html(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format));
27463            this.updateMonthsInView();
27464            this.updateCalendars();
27465            this.updateFormInputs();
27466        },
27467
27468        updateMonthsInView: function() {
27469            if (this.endDate) {
27470
27471                //if both dates are visible already, do nothing
27472                if (!this.singleDatePicker && this.leftCalendar.month && this.rightCalendar.month &&
27473                    (this.startDate.format('YYYY-MM') == this.leftCalendar.month.format('YYYY-MM') || this.startDate.format('YYYY-MM') == this.rightCalendar.month.format('YYYY-MM'))
27474                    &&
27475                    (this.endDate.format('YYYY-MM') == this.leftCalendar.month.format('YYYY-MM') || this.endDate.format('YYYY-MM') == this.rightCalendar.month.format('YYYY-MM'))
27476                    ) {
27477                    return;
27478                }
27479
27480                this.leftCalendar.month = this.startDate.clone().date(2);
27481                if (!this.linkedCalendars && (this.endDate.month() != this.startDate.month() || this.endDate.year() != this.startDate.year())) {
27482                    this.rightCalendar.month = this.endDate.clone().date(2);
27483                } else {
27484                    this.rightCalendar.month = this.startDate.clone().date(2).add(1, 'month');
27485                }
27486
27487            } else {
27488                if (this.leftCalendar.month.format('YYYY-MM') != this.startDate.format('YYYY-MM') && this.rightCalendar.month.format('YYYY-MM') != this.startDate.format('YYYY-MM')) {
27489                    this.leftCalendar.month = this.startDate.clone().date(2);
27490                    this.rightCalendar.month = this.startDate.clone().date(2).add(1, 'month');
27491                }
27492            }
27493            if (this.maxDate && this.linkedCalendars && !this.singleDatePicker && this.rightCalendar.month > this.maxDate) {
27494              this.rightCalendar.month = this.maxDate.clone().date(2);
27495              this.leftCalendar.month = this.maxDate.clone().date(2).subtract(1, 'month');
27496            }
27497        },
27498
27499        updateCalendars: function() {
27500
27501            if (this.timePicker) {
27502                var hour, minute, second;
27503                if (this.endDate) {
27504                    hour = parseInt(this.container.find('.left .hourselect').val(), 10);
27505                    minute = parseInt(this.container.find('.left .minuteselect').val(), 10);
27506                    if (isNaN(minute)) {
27507                        minute = parseInt(this.container.find('.left .minuteselect option:last').val(), 10);
27508                    }
27509                    second = this.timePickerSeconds ? parseInt(this.container.find('.left .secondselect').val(), 10) : 0;
27510                    if (!this.timePicker24Hour) {
27511                        var ampm = this.container.find('.left .ampmselect').val();
27512                        if (ampm === 'PM' && hour < 12)
27513                            hour += 12;
27514                        if (ampm === 'AM' && hour === 12)
27515                            hour = 0;
27516                    }
27517                } else {
27518                    hour = parseInt(this.container.find('.right .hourselect').val(), 10);
27519                    minute = parseInt(this.container.find('.right .minuteselect').val(), 10);
27520                    if (isNaN(minute)) {
27521                        minute = parseInt(this.container.find('.right .minuteselect option:last').val(), 10);
27522                    }
27523                    second = this.timePickerSeconds ? parseInt(this.container.find('.right .secondselect').val(), 10) : 0;
27524                    if (!this.timePicker24Hour) {
27525                        var ampm = this.container.find('.right .ampmselect').val();
27526                        if (ampm === 'PM' && hour < 12)
27527                            hour += 12;
27528                        if (ampm === 'AM' && hour === 12)
27529                            hour = 0;
27530                    }
27531                }
27532                this.leftCalendar.month.hour(hour).minute(minute).second(second);
27533                this.rightCalendar.month.hour(hour).minute(minute).second(second);
27534            }
27535
27536            this.renderCalendar('left');
27537            this.renderCalendar('right');
27538
27539            //highlight any predefined range matching the current start and end dates
27540            this.container.find('.ranges li').removeClass('active');
27541            if (this.endDate == null) return;
27542
27543            this.calculateChosenLabel();
27544        },
27545
27546        renderCalendar: function(side) {
27547
27548            //
27549            // Build the matrix of dates that will populate the calendar
27550            //
27551
27552            var calendar = side == 'left' ? this.leftCalendar : this.rightCalendar;
27553            var month = calendar.month.month();
27554            var year = calendar.month.year();
27555            var hour = calendar.month.hour();
27556            var minute = calendar.month.minute();
27557            var second = calendar.month.second();
27558            var daysInMonth = moment([year, month]).daysInMonth();
27559            var firstDay = moment([year, month, 1]);
27560            var lastDay = moment([year, month, daysInMonth]);
27561            var lastMonth = moment(firstDay).subtract(1, 'month').month();
27562            var lastYear = moment(firstDay).subtract(1, 'month').year();
27563            var daysInLastMonth = moment([lastYear, lastMonth]).daysInMonth();
27564            var dayOfWeek = firstDay.day();
27565
27566            //initialize a 6 rows x 7 columns array for the calendar
27567            var calendar = [];
27568            calendar.firstDay = firstDay;
27569            calendar.lastDay = lastDay;
27570
27571            for (var i = 0; i < 6; i++) {
27572                calendar[i] = [];
27573            }
27574
27575            //populate the calendar with date objects
27576            var startDay = daysInLastMonth - dayOfWeek + this.locale.firstDay + 1;
27577            if (startDay > daysInLastMonth)
27578                startDay -= 7;
27579
27580            if (dayOfWeek == this.locale.firstDay)
27581                startDay = daysInLastMonth - 6;
27582
27583            var curDate = moment([lastYear, lastMonth, startDay, 12, minute, second]);
27584
27585            var col, row;
27586            for (var i = 0, col = 0, row = 0; i < 42; i++, col++, curDate = moment(curDate).add(24, 'hour')) {
27587                if (i > 0 && col % 7 === 0) {
27588                    col = 0;
27589                    row++;
27590                }
27591                calendar[row][col] = curDate.clone().hour(hour).minute(minute).second(second);
27592                curDate.hour(12);
27593
27594                if (this.minDate && calendar[row][col].format('YYYY-MM-DD') == this.minDate.format('YYYY-MM-DD') && calendar[row][col].isBefore(this.minDate) && side == 'left') {
27595                    calendar[row][col] = this.minDate.clone();
27596                }
27597
27598                if (this.maxDate && calendar[row][col].format('YYYY-MM-DD') == this.maxDate.format('YYYY-MM-DD') && calendar[row][col].isAfter(this.maxDate) && side == 'right') {
27599                    calendar[row][col] = this.maxDate.clone();
27600                }
27601
27602            }
27603
27604            //make the calendar object available to hoverDate/clickDate
27605            if (side == 'left') {
27606                this.leftCalendar.calendar = calendar;
27607            } else {
27608                this.rightCalendar.calendar = calendar;
27609            }
27610
27611            //
27612            // Display the calendar
27613            //
27614
27615            var minDate = side == 'left' ? this.minDate : this.startDate;
27616            var maxDate = this.maxDate;
27617            var selected = side == 'left' ? this.startDate : this.endDate;
27618            var arrow = this.locale.direction == 'ltr' ? {left: 'chevron-left', right: 'chevron-right'} : {left: 'chevron-right', right: 'chevron-left'};
27619
27620            var html = '<table class="table-condensed">';
27621            html += '<thead>';
27622            html += '<tr>';
27623
27624            // add empty cell for week number
27625            if (this.showWeekNumbers || this.showISOWeekNumbers)
27626                html += '<th></th>';
27627
27628            if ((!minDate || minDate.isBefore(calendar.firstDay)) && (!this.linkedCalendars || side == 'left')) {
27629                html += '<th class="prev available"><span></span></th>';
27630            } else {
27631                html += '<th></th>';
27632            }
27633
27634            var dateHtml = this.locale.monthNames[calendar[1][1].month()] + calendar[1][1].format(" YYYY");
27635
27636            if (this.showDropdowns) {
27637                var currentMonth = calendar[1][1].month();
27638                var currentYear = calendar[1][1].year();
27639                var maxYear = (maxDate && maxDate.year()) || (this.maxYear);
27640                var minYear = (minDate && minDate.year()) || (this.minYear);
27641                var inMinYear = currentYear == minYear;
27642                var inMaxYear = currentYear == maxYear;
27643
27644                var monthHtml = '<select class="monthselect">';
27645                for (var m = 0; m < 12; m++) {
27646                    if ((!inMinYear || (minDate && m >= minDate.month())) && (!inMaxYear || (maxDate && m <= maxDate.month()))) {
27647                        monthHtml += "<option value='" + m + "'" +
27648                            (m === currentMonth ? " selected='selected'" : "") +
27649                            ">" + this.locale.monthNames[m] + "</option>";
27650                    } else {
27651                        monthHtml += "<option value='" + m + "'" +
27652                            (m === currentMonth ? " selected='selected'" : "") +
27653                            " disabled='disabled'>" + this.locale.monthNames[m] + "</option>";
27654                    }
27655                }
27656                monthHtml += "</select>";
27657
27658                var yearHtml = '<select class="yearselect">';
27659                for (var y = minYear; y <= maxYear; y++) {
27660                    yearHtml += '<option value="' + y + '"' +
27661                        (y === currentYear ? ' selected="selected"' : '') +
27662                        '>' + y + '</option>';
27663                }
27664                yearHtml += '</select>';
27665
27666                dateHtml = monthHtml + yearHtml;
27667            }
27668
27669            html += '<th colspan="5" class="month">' + dateHtml + '</th>';
27670            if ((!maxDate || maxDate.isAfter(calendar.lastDay)) && (!this.linkedCalendars || side == 'right' || this.singleDatePicker)) {
27671                html += '<th class="next available"><span></span></th>';
27672            } else {
27673                html += '<th></th>';
27674            }
27675
27676            html += '</tr>';
27677            html += '<tr>';
27678
27679            // add week number label
27680            if (this.showWeekNumbers || this.showISOWeekNumbers)
27681                html += '<th class="week">' + this.locale.weekLabel + '</th>';
27682
27683            $.each(this.locale.daysOfWeek, function(index, dayOfWeek) {
27684                html += '<th>' + dayOfWeek + '</th>';
27685            });
27686
27687            html += '</tr>';
27688            html += '</thead>';
27689            html += '<tbody>';
27690
27691            //adjust maxDate to reflect the maxSpan setting in order to
27692            //grey out end dates beyond the maxSpan
27693            if (this.endDate == null && this.maxSpan) {
27694                var maxLimit = this.startDate.clone().add(this.maxSpan).endOf('day');
27695                if (!maxDate || maxLimit.isBefore(maxDate)) {
27696                    maxDate = maxLimit;
27697                }
27698            }
27699
27700            for (var row = 0; row < 6; row++) {
27701                html += '<tr>';
27702
27703                // add week number
27704                if (this.showWeekNumbers)
27705                    html += '<td class="week">' + calendar[row][0].week() + '</td>';
27706                else if (this.showISOWeekNumbers)
27707                    html += '<td class="week">' + calendar[row][0].isoWeek() + '</td>';
27708
27709                for (var col = 0; col < 7; col++) {
27710
27711                    var classes = [];
27712
27713                    //highlight today's date
27714                    if (calendar[row][col].isSame(new Date(), "day"))
27715                        classes.push('today');
27716
27717                    //highlight weekends
27718                    if (calendar[row][col].isoWeekday() > 5)
27719                        classes.push('weekend');
27720
27721                    //grey out the dates in other months displayed at beginning and end of this calendar
27722                    if (calendar[row][col].month() != calendar[1][1].month())
27723                        classes.push('off', 'ends');
27724
27725                    //don't allow selection of dates before the minimum date
27726                    if (this.minDate && calendar[row][col].isBefore(this.minDate, 'day'))
27727                        classes.push('off', 'disabled');
27728
27729                    //don't allow selection of dates after the maximum date
27730                    if (maxDate && calendar[row][col].isAfter(maxDate, 'day'))
27731                        classes.push('off', 'disabled');
27732
27733                    //don't allow selection of date if a custom function decides it's invalid
27734                    if (this.isInvalidDate(calendar[row][col]))
27735                        classes.push('off', 'disabled');
27736
27737                    //highlight the currently selected start date
27738                    if (calendar[row][col].format('YYYY-MM-DD') == this.startDate.format('YYYY-MM-DD'))
27739                        classes.push('active', 'start-date');
27740
27741                    //highlight the currently selected end date
27742                    if (this.endDate != null && calendar[row][col].format('YYYY-MM-DD') == this.endDate.format('YYYY-MM-DD'))
27743                        classes.push('active', 'end-date');
27744
27745                    //highlight dates in-between the selected dates
27746                    if (this.endDate != null && calendar[row][col] > this.startDate && calendar[row][col] < this.endDate)
27747                        classes.push('in-range');
27748
27749                    //apply custom classes for this date
27750                    var isCustom = this.isCustomDate(calendar[row][col]);
27751                    if (isCustom !== false) {
27752                        if (typeof isCustom === 'string')
27753                            classes.push(isCustom);
27754                        else
27755                            Array.prototype.push.apply(classes, isCustom);
27756                    }
27757
27758                    var cname = '', disabled = false;
27759                    for (var i = 0; i < classes.length; i++) {
27760                        cname += classes[i] + ' ';
27761                        if (classes[i] == 'disabled')
27762                            disabled = true;
27763                    }
27764                    if (!disabled)
27765                        cname += 'available';
27766
27767                    html += '<td class="' + cname.replace(/^\s+|\s+$/g, '') + '" data-title="' + 'r' + row + 'c' + col + '">' + calendar[row][col].date() + '</td>';
27768
27769                }
27770                html += '</tr>';
27771            }
27772
27773            html += '</tbody>';
27774            html += '</table>';
27775
27776            this.container.find('.drp-calendar.' + side + ' .calendar-table').html(html);
27777
27778        },
27779
27780        renderTimePicker: function(side) {
27781
27782            // Don't bother updating the time picker if it's currently disabled
27783            // because an end date hasn't been clicked yet
27784            if (side == 'right' && !this.endDate) return;
27785
27786            var html, selected, minDate, maxDate = this.maxDate;
27787
27788            if (this.maxSpan && (!this.maxDate || this.startDate.clone().add(this.maxSpan).isBefore(this.maxDate)))
27789                maxDate = this.startDate.clone().add(this.maxSpan);
27790
27791            if (side == 'left') {
27792                selected = this.startDate.clone();
27793                minDate = this.minDate;
27794            } else if (side == 'right') {
27795                selected = this.endDate.clone();
27796                minDate = this.startDate;
27797
27798                //Preserve the time already selected
27799                var timeSelector = this.container.find('.drp-calendar.right .calendar-time');
27800                if (timeSelector.html() != '') {
27801
27802                    selected.hour(!isNaN(selected.hour()) ? selected.hour() : timeSelector.find('.hourselect option:selected').val());
27803                    selected.minute(!isNaN(selected.minute()) ? selected.minute() : timeSelector.find('.minuteselect option:selected').val());
27804                    selected.second(!isNaN(selected.second()) ? selected.second() : timeSelector.find('.secondselect option:selected').val());
27805
27806                    if (!this.timePicker24Hour) {
27807                        var ampm = timeSelector.find('.ampmselect option:selected').val();
27808                        if (ampm === 'PM' && selected.hour() < 12)
27809                            selected.hour(selected.hour() + 12);
27810                        if (ampm === 'AM' && selected.hour() === 12)
27811                            selected.hour(0);
27812                    }
27813
27814                }
27815
27816                if (selected.isBefore(this.startDate))
27817                    selected = this.startDate.clone();
27818
27819                if (maxDate && selected.isAfter(maxDate))
27820                    selected = maxDate.clone();
27821
27822            }
27823
27824            //
27825            // hours
27826            //
27827
27828            html = '<select class="hourselect">';
27829
27830            var start = this.timePicker24Hour ? 0 : 1;
27831            var end = this.timePicker24Hour ? 23 : 12;
27832
27833            for (var i = start; i <= end; i++) {
27834                var i_in_24 = i;
27835                if (!this.timePicker24Hour)
27836                    i_in_24 = selected.hour() >= 12 ? (i == 12 ? 12 : i + 12) : (i == 12 ? 0 : i);
27837
27838                var time = selected.clone().hour(i_in_24);
27839                var disabled = false;
27840                if (minDate && time.minute(59).isBefore(minDate))
27841                    disabled = true;
27842                if (maxDate && time.minute(0).isAfter(maxDate))
27843                    disabled = true;
27844
27845                if (i_in_24 == selected.hour() && !disabled) {
27846                    html += '<option value="' + i + '" selected="selected">' + i + '</option>';
27847                } else if (disabled) {
27848                    html += '<option value="' + i + '" disabled="disabled" class="disabled">' + i + '</option>';
27849                } else {
27850                    html += '<option value="' + i + '">' + i + '</option>';
27851                }
27852            }
27853
27854            html += '</select> ';
27855
27856            //
27857            // minutes
27858            //
27859
27860            html += ': <select class="minuteselect">';
27861
27862            for (var i = 0; i < 60; i += this.timePickerIncrement) {
27863                var padded = i < 10 ? '0' + i : i;
27864                var time = selected.clone().minute(i);
27865
27866                var disabled = false;
27867                if (minDate && time.second(59).isBefore(minDate))
27868                    disabled = true;
27869                if (maxDate && time.second(0).isAfter(maxDate))
27870                    disabled = true;
27871
27872                if (selected.minute() == i && !disabled) {
27873                    html += '<option value="' + i + '" selected="selected">' + padded + '</option>';
27874                } else if (disabled) {
27875                    html += '<option value="' + i + '" disabled="disabled" class="disabled">' + padded + '</option>';
27876                } else {
27877                    html += '<option value="' + i + '">' + padded + '</option>';
27878                }
27879            }
27880
27881            html += '</select> ';
27882
27883            //
27884            // seconds
27885            //
27886
27887            if (this.timePickerSeconds) {
27888                html += ': <select class="secondselect">';
27889
27890                for (var i = 0; i < 60; i++) {
27891                    var padded = i < 10 ? '0' + i : i;
27892                    var time = selected.clone().second(i);
27893
27894                    var disabled = false;
27895                    if (minDate && time.isBefore(minDate))
27896                        disabled = true;
27897                    if (maxDate && time.isAfter(maxDate))
27898                        disabled = true;
27899
27900                    if (selected.second() == i && !disabled) {
27901                        html += '<option value="' + i + '" selected="selected">' + padded + '</option>';
27902                    } else if (disabled) {
27903                        html += '<option value="' + i + '" disabled="disabled" class="disabled">' + padded + '</option>';
27904                    } else {
27905                        html += '<option value="' + i + '">' + padded + '</option>';
27906                    }
27907                }
27908
27909                html += '</select> ';
27910            }
27911
27912            //
27913            // AM/PM
27914            //
27915
27916            if (!this.timePicker24Hour) {
27917                html += '<select class="ampmselect">';
27918
27919                var am_html = '';
27920                var pm_html = '';
27921
27922                if (minDate && selected.clone().hour(12).minute(0).second(0).isBefore(minDate))
27923                    am_html = ' disabled="disabled" class="disabled"';
27924
27925                if (maxDate && selected.clone().hour(0).minute(0).second(0).isAfter(maxDate))
27926                    pm_html = ' disabled="disabled" class="disabled"';
27927
27928                if (selected.hour() >= 12) {
27929                    html += '<option value="AM"' + am_html + '>AM</option><option value="PM" selected="selected"' + pm_html + '>PM</option>';
27930                } else {
27931                    html += '<option value="AM" selected="selected"' + am_html + '>AM</option><option value="PM"' + pm_html + '>PM</option>';
27932                }
27933
27934                html += '</select>';
27935            }
27936
27937            this.container.find('.drp-calendar.' + side + ' .calendar-time').html(html);
27938
27939        },
27940
27941        updateFormInputs: function() {
27942
27943            if (this.singleDatePicker || (this.endDate && (this.startDate.isBefore(this.endDate) || this.startDate.isSame(this.endDate)))) {
27944                this.container.find('button.applyBtn').prop('disabled', false);
27945            } else {
27946                this.container.find('button.applyBtn').prop('disabled', true);
27947            }
27948
27949        },
27950
27951        move: function() {
27952            var parentOffset = { top: 0, left: 0 },
27953                containerTop,
27954                drops = this.drops;
27955
27956            var parentRightEdge = $(window).width();
27957            if (!this.parentEl.is('body')) {
27958                parentOffset = {
27959                    top: this.parentEl.offset().top - this.parentEl.scrollTop(),
27960                    left: this.parentEl.offset().left - this.parentEl.scrollLeft()
27961                };
27962                parentRightEdge = this.parentEl[0].clientWidth + this.parentEl.offset().left;
27963            }
27964
27965            switch (drops) {
27966            case 'auto':
27967                containerTop = this.element.offset().top + this.element.outerHeight() - parentOffset.top;
27968                if (containerTop + this.container.outerHeight() >= this.parentEl[0].scrollHeight) {
27969                    containerTop = this.element.offset().top - this.container.outerHeight() - parentOffset.top;
27970                    drops = 'up';
27971                }
27972                break;
27973            case 'up':
27974                containerTop = this.element.offset().top - this.container.outerHeight() - parentOffset.top;
27975                break;
27976            default:
27977                containerTop = this.element.offset().top + this.element.outerHeight() - parentOffset.top;
27978                break;
27979            }
27980
27981            // Force the container to it's actual width
27982            this.container.css({
27983              top: 0,
27984              left: 0,
27985              right: 'auto'
27986            });
27987            var containerWidth = this.container.outerWidth();
27988
27989            this.container.toggleClass('drop-up', drops == 'up');
27990
27991            if (this.opens == 'left') {
27992                var containerRight = parentRightEdge - this.element.offset().left - this.element.outerWidth();
27993                if (containerWidth + containerRight > $(window).width()) {
27994                    this.container.css({
27995                        top: containerTop,
27996                        right: 'auto',
27997                        left: 9
27998                    });
27999                } else {
28000                    this.container.css({
28001                        top: containerTop,
28002                        right: containerRight,
28003                        left: 'auto'
28004                    });
28005                }
28006            } else if (this.opens == 'center') {
28007                var containerLeft = this.element.offset().left - parentOffset.left + this.element.outerWidth() / 2
28008                                        - containerWidth / 2;
28009                if (containerLeft < 0) {
28010                    this.container.css({
28011                        top: containerTop,
28012                        right: 'auto',
28013                        left: 9
28014                    });
28015                } else if (containerLeft + containerWidth > $(window).width()) {
28016                    this.container.css({
28017                        top: containerTop,
28018                        left: 'auto',
28019                        right: 0
28020                    });
28021                } else {
28022                    this.container.css({
28023                        top: containerTop,
28024                        left: containerLeft,
28025                        right: 'auto'
28026                    });
28027                }
28028            } else {
28029                var containerLeft = this.element.offset().left - parentOffset.left;
28030                if (containerLeft + containerWidth > $(window).width()) {
28031                    this.container.css({
28032                        top: containerTop,
28033                        left: 'auto',
28034                        right: 0
28035                    });
28036                } else {
28037                    this.container.css({
28038                        top: containerTop,
28039                        left: containerLeft,
28040                        right: 'auto'
28041                    });
28042                }
28043            }
28044        },
28045
28046        show: function(e) {
28047            if (this.isShowing) return;
28048
28049            // Create a click proxy that is private to this instance of datepicker, for unbinding
28050            this._outsideClickProxy = $.proxy(function(e) { this.outsideClick(e); }, this);
28051
28052            // Bind global datepicker mousedown for hiding and
28053            $(document)
28054              .on('mousedown.daterangepicker', this._outsideClickProxy)
28055              // also support mobile devices
28056              .on('touchend.daterangepicker', this._outsideClickProxy)
28057              // also explicitly play nice with Bootstrap dropdowns, which stopPropagation when clicking them
28058              .on('click.daterangepicker', '[data-toggle=dropdown]', this._outsideClickProxy)
28059              // and also close when focus changes to outside the picker (eg. tabbing between controls)
28060              .on('focusin.daterangepicker', this._outsideClickProxy);
28061
28062            // Reposition the picker if the window is resized while it's open
28063            $(window).on('resize.daterangepicker', $.proxy(function(e) { this.move(e); }, this));
28064
28065            this.oldStartDate = this.startDate.clone();
28066            this.oldEndDate = this.endDate.clone();
28067            this.previousRightTime = this.endDate.clone();
28068
28069            this.updateView();
28070            this.container.show();
28071            this.move();
28072            this.element.trigger('show.daterangepicker', this);
28073            this.isShowing = true;
28074        },
28075
28076        hide: function(e) {
28077            if (!this.isShowing) return;
28078
28079            //incomplete date selection, revert to last values
28080            if (!this.endDate) {
28081                this.startDate = this.oldStartDate.clone();
28082                this.endDate = this.oldEndDate.clone();
28083            }
28084
28085            //if a new date range was selected, invoke the user callback function
28086            if (!this.startDate.isSame(this.oldStartDate) || !this.endDate.isSame(this.oldEndDate))
28087                this.callback(this.startDate.clone(), this.endDate.clone(), this.chosenLabel);
28088
28089            //if picker is attached to a text input, update it
28090            this.updateElement();
28091
28092            $(document).off('.daterangepicker');
28093            $(window).off('.daterangepicker');
28094            this.container.hide();
28095            this.element.trigger('hide.daterangepicker', this);
28096            this.isShowing = false;
28097        },
28098
28099        toggle: function(e) {
28100            if (this.isShowing) {
28101                this.hide();
28102            } else {
28103                this.show();
28104            }
28105        },
28106
28107        outsideClick: function(e) {
28108            var target = $(e.target);
28109            // if the page is clicked anywhere except within the daterangerpicker/button
28110            // itself then call this.hide()
28111            if (
28112                // ie modal dialog fix
28113                e.type == "focusin" ||
28114                target.closest(this.element).length ||
28115                target.closest(this.container).length ||
28116                target.closest('.calendar-table').length
28117                ) return;
28118            this.hide();
28119            this.element.trigger('outsideClick.daterangepicker', this);
28120        },
28121
28122        showCalendars: function() {
28123            this.container.addClass('show-calendar');
28124            this.move();
28125            this.element.trigger('showCalendar.daterangepicker', this);
28126        },
28127
28128        hideCalendars: function() {
28129            this.container.removeClass('show-calendar');
28130            this.element.trigger('hideCalendar.daterangepicker', this);
28131        },
28132
28133        clickRange: function(e) {
28134            var label = e.target.getAttribute('data-range-key');
28135            this.chosenLabel = label;
28136            if (label == this.locale.customRangeLabel) {
28137                this.showCalendars();
28138            } else {
28139                var dates = this.ranges[label];
28140                this.startDate = dates[0];
28141                this.endDate = dates[1];
28142
28143                if (!this.timePicker) {
28144                    this.startDate.startOf('day');
28145                    this.endDate.endOf('day');
28146                }
28147
28148                if (!this.alwaysShowCalendars)
28149                    this.hideCalendars();
28150                this.clickApply();
28151            }
28152        },
28153
28154        clickPrev: function(e) {
28155            var cal = $(e.target).parents('.drp-calendar');
28156            if (cal.hasClass('left')) {
28157                this.leftCalendar.month.subtract(1, 'month');
28158                if (this.linkedCalendars)
28159                    this.rightCalendar.month.subtract(1, 'month');
28160            } else {
28161                this.rightCalendar.month.subtract(1, 'month');
28162            }
28163            this.updateCalendars();
28164        },
28165
28166        clickNext: function(e) {
28167            var cal = $(e.target).parents('.drp-calendar');
28168            if (cal.hasClass('left')) {
28169                this.leftCalendar.month.add(1, 'month');
28170            } else {
28171                this.rightCalendar.month.add(1, 'month');
28172                if (this.linkedCalendars)
28173                    this.leftCalendar.month.add(1, 'month');
28174            }
28175            this.updateCalendars();
28176        },
28177
28178        hoverDate: function(e) {
28179
28180            //ignore dates that can't be selected
28181            if (!$(e.target).hasClass('available')) return;
28182
28183            var title = $(e.target).attr('data-title');
28184            var row = title.substr(1, 1);
28185            var col = title.substr(3, 1);
28186            var cal = $(e.target).parents('.drp-calendar');
28187            var date = cal.hasClass('left') ? this.leftCalendar.calendar[row][col] : this.rightCalendar.calendar[row][col];
28188
28189            //highlight the dates between the start date and the date being hovered as a potential end date
28190            var leftCalendar = this.leftCalendar;
28191            var rightCalendar = this.rightCalendar;
28192            var startDate = this.startDate;
28193            if (!this.endDate) {
28194                this.container.find('.drp-calendar tbody td').each(function(index, el) {
28195
28196                    //skip week numbers, only look at dates
28197                    if ($(el).hasClass('week')) return;
28198
28199                    var title = $(el).attr('data-title');
28200                    var row = title.substr(1, 1);
28201                    var col = title.substr(3, 1);
28202                    var cal = $(el).parents('.drp-calendar');
28203                    var dt = cal.hasClass('left') ? leftCalendar.calendar[row][col] : rightCalendar.calendar[row][col];
28204
28205                    if ((dt.isAfter(startDate) && dt.isBefore(date)) || dt.isSame(date, 'day')) {
28206                        $(el).addClass('in-range');
28207                    } else {
28208                        $(el).removeClass('in-range');
28209                    }
28210
28211                });
28212            }
28213
28214        },
28215
28216        clickDate: function(e) {
28217
28218            if (!$(e.target).hasClass('available')) return;
28219
28220            var title = $(e.target).attr('data-title');
28221            var row = title.substr(1, 1);
28222            var col = title.substr(3, 1);
28223            var cal = $(e.target).parents('.drp-calendar');
28224            var date = cal.hasClass('left') ? this.leftCalendar.calendar[row][col] : this.rightCalendar.calendar[row][col];
28225
28226            //
28227            // this function needs to do a few things:
28228            // * alternate between selecting a start and end date for the range,
28229            // * if the time picker is enabled, apply the hour/minute/second from the select boxes to the clicked date
28230            // * if autoapply is enabled, and an end date was chosen, apply the selection
28231            // * if single date picker mode, and time picker isn't enabled, apply the selection immediately
28232            // * if one of the inputs above the calendars was focused, cancel that manual input
28233            //
28234
28235            if (this.endDate || date.isBefore(this.startDate, 'day')) { //picking start
28236                if (this.timePicker) {
28237                    var hour = parseInt(this.container.find('.left .hourselect').val(), 10);
28238                    if (!this.timePicker24Hour) {
28239                        var ampm = this.container.find('.left .ampmselect').val();
28240                        if (ampm === 'PM' && hour < 12)
28241                            hour += 12;
28242                        if (ampm === 'AM' && hour === 12)
28243                            hour = 0;
28244                    }
28245                    var minute = parseInt(this.container.find('.left .minuteselect').val(), 10);
28246                    if (isNaN(minute)) {
28247                        minute = parseInt(this.container.find('.left .minuteselect option:last').val(), 10);
28248                    }
28249                    var second = this.timePickerSeconds ? parseInt(this.container.find('.left .secondselect').val(), 10) : 0;
28250                    date = date.clone().hour(hour).minute(minute).second(second);
28251                }
28252                this.endDate = null;
28253                this.setStartDate(date.clone());
28254            } else if (!this.endDate && date.isBefore(this.startDate)) {
28255                //special case: clicking the same date for start/end,
28256                //but the time of the end date is before the start date
28257                this.setEndDate(this.startDate.clone());
28258            } else { // picking end
28259                if (this.timePicker) {
28260                    var hour = parseInt(this.container.find('.right .hourselect').val(), 10);
28261                    if (!this.timePicker24Hour) {
28262                        var ampm = this.container.find('.right .ampmselect').val();
28263                        if (ampm === 'PM' && hour < 12)
28264                            hour += 12;
28265                        if (ampm === 'AM' && hour === 12)
28266                            hour = 0;
28267                    }
28268                    var minute = parseInt(this.container.find('.right .minuteselect').val(), 10);
28269                    if (isNaN(minute)) {
28270                        minute = parseInt(this.container.find('.right .minuteselect option:last').val(), 10);
28271                    }
28272                    var second = this.timePickerSeconds ? parseInt(this.container.find('.right .secondselect').val(), 10) : 0;
28273                    date = date.clone().hour(hour).minute(minute).second(second);
28274                }
28275                this.setEndDate(date.clone());
28276                if (this.autoApply) {
28277                  this.calculateChosenLabel();
28278                  this.clickApply();
28279                }
28280            }
28281
28282            if (this.singleDatePicker) {
28283                this.setEndDate(this.startDate);
28284                if (!this.timePicker && this.autoApply)
28285                    this.clickApply();
28286            }
28287
28288            this.updateView();
28289
28290            //This is to cancel the blur event handler if the mouse was in one of the inputs
28291            e.stopPropagation();
28292
28293        },
28294
28295        calculateChosenLabel: function () {
28296            var customRange = true;
28297            var i = 0;
28298            for (var range in this.ranges) {
28299              if (this.timePicker) {
28300                    var format = this.timePickerSeconds ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD HH:mm";
28301                    //ignore times when comparing dates if time picker seconds is not enabled
28302                    if (this.startDate.format(format) == this.ranges[range][0].format(format) && this.endDate.format(format) == this.ranges[range][1].format(format)) {
28303                        customRange = false;
28304                        this.chosenLabel = this.container.find('.ranges li:eq(' + i + ')').addClass('active').attr('data-range-key');
28305                        break;
28306                    }
28307                } else {
28308                    //ignore times when comparing dates if time picker is not enabled
28309                    if (this.startDate.format('YYYY-MM-DD') == this.ranges[range][0].format('YYYY-MM-DD') && this.endDate.format('YYYY-MM-DD') == this.ranges[range][1].format('YYYY-MM-DD')) {
28310                        customRange = false;
28311                        this.chosenLabel = this.container.find('.ranges li:eq(' + i + ')').addClass('active').attr('data-range-key');
28312                        break;
28313                    }
28314                }
28315                i++;
28316            }
28317            if (customRange) {
28318                if (this.showCustomRangeLabel) {
28319                    this.chosenLabel = this.container.find('.ranges li:last').addClass('active').attr('data-range-key');
28320                } else {
28321                    this.chosenLabel = null;
28322                }
28323                this.showCalendars();
28324            }
28325        },
28326
28327        clickApply: function(e) {
28328            this.hide();
28329            this.element.trigger('apply.daterangepicker', this);
28330        },
28331
28332        clickCancel: function(e) {
28333            this.startDate = this.oldStartDate;
28334            this.endDate = this.oldEndDate;
28335            this.hide();
28336            this.element.trigger('cancel.daterangepicker', this);
28337        },
28338
28339        monthOrYearChanged: function(e) {
28340            var isLeft = $(e.target).closest('.drp-calendar').hasClass('left'),
28341                leftOrRight = isLeft ? 'left' : 'right',
28342                cal = this.container.find('.drp-calendar.'+leftOrRight);
28343
28344            // Month must be Number for new moment versions
28345            var month = parseInt(cal.find('.monthselect').val(), 10);
28346            var year = cal.find('.yearselect').val();
28347
28348            if (!isLeft) {
28349                if (year < this.startDate.year() || (year == this.startDate.year() && month < this.startDate.month())) {
28350                    month = this.startDate.month();
28351                    year = this.startDate.year();
28352                }
28353            }
28354
28355            if (this.minDate) {
28356                if (year < this.minDate.year() || (year == this.minDate.year() && month < this.minDate.month())) {
28357                    month = this.minDate.month();
28358                    year = this.minDate.year();
28359                }
28360            }
28361
28362            if (this.maxDate) {
28363                if (year > this.maxDate.year() || (year == this.maxDate.year() && month > this.maxDate.month())) {
28364                    month = this.maxDate.month();
28365                    year = this.maxDate.year();
28366                }
28367            }
28368
28369            if (isLeft) {
28370                this.leftCalendar.month.month(month).year(year);
28371                if (this.linkedCalendars)
28372                    this.rightCalendar.month = this.leftCalendar.month.clone().add(1, 'month');
28373            } else {
28374                this.rightCalendar.month.month(month).year(year);
28375                if (this.linkedCalendars)
28376                    this.leftCalendar.month = this.rightCalendar.month.clone().subtract(1, 'month');
28377            }
28378            this.updateCalendars();
28379        },
28380
28381        timeChanged: function(e) {
28382
28383            var cal = $(e.target).closest('.drp-calendar'),
28384                isLeft = cal.hasClass('left');
28385
28386            var hour = parseInt(cal.find('.hourselect').val(), 10);
28387            var minute = parseInt(cal.find('.minuteselect').val(), 10);
28388            if (isNaN(minute)) {
28389                minute = parseInt(cal.find('.minuteselect option:last').val(), 10);
28390            }
28391            var second = this.timePickerSeconds ? parseInt(cal.find('.secondselect').val(), 10) : 0;
28392
28393            if (!this.timePicker24Hour) {
28394                var ampm = cal.find('.ampmselect').val();
28395                if (ampm === 'PM' && hour < 12)
28396                    hour += 12;
28397                if (ampm === 'AM' && hour === 12)
28398                    hour = 0;
28399            }
28400
28401            if (isLeft) {
28402                var start = this.startDate.clone();
28403                start.hour(hour);
28404                start.minute(minute);
28405                start.second(second);
28406                this.setStartDate(start);
28407                if (this.singleDatePicker) {
28408                    this.endDate = this.startDate.clone();
28409                } else if (this.endDate && this.endDate.format('YYYY-MM-DD') == start.format('YYYY-MM-DD') && this.endDate.isBefore(start)) {
28410                    this.setEndDate(start.clone());
28411                }
28412            } else if (this.endDate) {
28413                var end = this.endDate.clone();
28414                end.hour(hour);
28415                end.minute(minute);
28416                end.second(second);
28417                this.setEndDate(end);
28418            }
28419
28420            //update the calendars so all clickable dates reflect the new time component
28421            this.updateCalendars();
28422
28423            //update the form inputs above the calendars with the new time
28424            this.updateFormInputs();
28425
28426            //re-render the time pickers because changing one selection can affect what's enabled in another
28427            this.renderTimePicker('left');
28428            this.renderTimePicker('right');
28429
28430        },
28431
28432        elementChanged: function() {
28433            if (!this.element.is('input')) return;
28434            if (!this.element.val().length) return;
28435
28436            var dateString = this.element.val().split(this.locale.separator),
28437                start = null,
28438                end = null;
28439
28440            if (dateString.length === 2) {
28441                start = moment(dateString[0], this.locale.format);
28442                end = moment(dateString[1], this.locale.format);
28443            }
28444
28445            if (this.singleDatePicker || start === null || end === null) {
28446                start = moment(this.element.val(), this.locale.format);
28447                end = start;
28448            }
28449
28450            if (!start.isValid() || !end.isValid()) return;
28451
28452            this.setStartDate(start);
28453            this.setEndDate(end);
28454            this.updateView();
28455        },
28456
28457        keydown: function(e) {
28458            //hide on tab or enter
28459            if ((e.keyCode === 9) || (e.keyCode === 13)) {
28460                this.hide();
28461            }
28462
28463            //hide on esc and prevent propagation
28464            if (e.keyCode === 27) {
28465                e.preventDefault();
28466                e.stopPropagation();
28467
28468                this.hide();
28469            }
28470        },
28471
28472        updateElement: function() {
28473            if (this.element.is('input') && this.autoUpdateInput) {
28474                var newValue = this.startDate.format(this.locale.format);
28475                if (!this.singleDatePicker) {
28476                    newValue += this.locale.separator + this.endDate.format(this.locale.format);
28477                }
28478                if (newValue !== this.element.val()) {
28479                    this.element.val(newValue).trigger('change');
28480                }
28481            }
28482        },
28483
28484        remove: function() {
28485            this.container.remove();
28486            this.element.off('.daterangepicker');
28487            this.element.removeData();
28488        }
28489
28490    };
28491
28492    $.fn.daterangepicker = function(options, callback) {
28493        var implementOptions = $.extend(true, {}, $.fn.daterangepicker.defaultOptions, options);
28494        this.each(function() {
28495            var el = $(this);
28496            if (el.data('daterangepicker'))
28497                el.data('daterangepicker').remove();
28498            el.data('daterangepicker', new DateRangePicker(el, implementOptions, callback));
28499        });
28500        return this;
28501    };
28502
28503    return DateRangePicker;
28504
28505}));
28506
28507/*!
28508 * dist/inputmask
28509 * https://github.com/RobinHerbots/Inputmask
28510 * Copyright (c) 2010 - 2021 Robin Herbots
28511 * Licensed under the MIT license
28512 * Version: 5.0.6
28513 */
28514!function(e, t) {
28515    if ("object" == typeof exports && "object" == typeof module) module.exports = t(); else if ("function" == typeof define && define.amd) define([], t); else {
28516        var a = t();
28517        for (var i in a) ("object" == typeof exports ? exports : e)[i] = a[i];
28518    }
28519}(this, (function() {
28520    return function() {
28521        "use strict";
28522        var e = {
28523            4528: function(e) {
28524                e.exports = JSON.parse('{"BACKSPACE":8,"BACKSPACE_SAFARI":127,"DELETE":46,"DOWN":40,"END":35,"ENTER":13,"ESCAPE":27,"HOME":36,"INSERT":45,"LEFT":37,"PAGE_DOWN":34,"PAGE_UP":33,"RIGHT":39,"SPACE":32,"TAB":9,"UP":38,"X":88,"Z":90,"CONTROL":17,"PAUSE/BREAK":19,"WINDOWS_LEFT":91,"WINDOWS_RIGHT":92,"KEY_229":229}');
28525            },
28526            8741: function(e, t) {
28527                Object.defineProperty(t, "__esModule", {
28528                    value: !0
28529                }), t.default = void 0;
28530                var a = !("undefined" == typeof window || !window.document || !window.document.createElement);
28531                t.default = a;
28532            },
28533            3976: function(e, t, a) {
28534                Object.defineProperty(t, "__esModule", {
28535                    value: !0
28536                }), t.default = void 0;
28537                var i, n = (i = a(4528)) && i.__esModule ? i : {
28538                    default: i
28539                };
28540                var r = {
28541                    _maxTestPos: 500,
28542                    placeholder: "_",
28543                    optionalmarker: [ "[", "]" ],
28544                    quantifiermarker: [ "{", "}" ],
28545                    groupmarker: [ "(", ")" ],
28546                    alternatormarker: "|",
28547                    escapeChar: "\\",
28548                    mask: null,
28549                    regex: null,
28550                    oncomplete: function() {},
28551                    onincomplete: function() {},
28552                    oncleared: function() {},
28553                    repeat: 0,
28554                    greedy: !1,
28555                    autoUnmask: !1,
28556                    removeMaskOnSubmit: !1,
28557                    clearMaskOnLostFocus: !0,
28558                    insertMode: !0,
28559                    insertModeVisual: !0,
28560                    clearIncomplete: !1,
28561                    alias: null,
28562                    onKeyDown: function() {},
28563                    onBeforeMask: null,
28564                    onBeforePaste: function(e, t) {
28565                        return "function" == typeof t.onBeforeMask ? t.onBeforeMask.call(this, e, t) : e;
28566                    },
28567                    onBeforeWrite: null,
28568                    onUnMask: null,
28569                    showMaskOnFocus: !0,
28570                    showMaskOnHover: !0,
28571                    onKeyValidation: function() {},
28572                    skipOptionalPartCharacter: " ",
28573                    numericInput: !1,
28574                    rightAlign: !1,
28575                    undoOnEscape: !0,
28576                    radixPoint: "",
28577                    _radixDance: !1,
28578                    groupSeparator: "",
28579                    keepStatic: null,
28580                    positionCaretOnTab: !0,
28581                    tabThrough: !1,
28582                    supportsInputType: [ "text", "tel", "url", "password", "search" ],
28583                    ignorables: [ n.default.BACKSPACE, n.default.TAB, n.default["PAUSE/BREAK"], n.default.ESCAPE, n.default.PAGE_UP, n.default.PAGE_DOWN, n.default.END, n.default.HOME, n.default.LEFT, n.default.UP, n.default.RIGHT, n.default.DOWN, n.default.INSERT, n.default.DELETE, 93, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 0, 229 ],
28584                    isComplete: null,
28585                    preValidation: null,
28586                    postValidation: null,
28587                    staticDefinitionSymbol: void 0,
28588                    jitMasking: !1,
28589                    nullable: !0,
28590                    inputEventOnly: !1,
28591                    noValuePatching: !1,
28592                    positionCaretOnClick: "lvp",
28593                    casing: null,
28594                    inputmode: "text",
28595                    importDataAttributes: !0,
28596                    shiftPositions: !0,
28597                    usePrototypeDefinitions: !0,
28598                    validationEventTimeOut: 3e3
28599                };
28600                t.default = r;
28601            },
28602            7392: function(e, t) {
28603                Object.defineProperty(t, "__esModule", {
28604                    value: !0
28605                }), t.default = void 0;
28606                t.default = {
28607                    9: {
28608                        validator: "[0-9\uff10-\uff19]",
28609                        definitionSymbol: "*"
28610                    },
28611                    a: {
28612                        validator: "[A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",
28613                        definitionSymbol: "*"
28614                    },
28615                    "*": {
28616                        validator: "[0-9\uff10-\uff19A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]"
28617                    }
28618                };
28619            },
28620            253: function(e, t) {
28621                Object.defineProperty(t, "__esModule", {
28622                    value: !0
28623                }), t.default = function(e, t, a) {
28624                    if (void 0 === a) return e.__data ? e.__data[t] : null;
28625                    e.__data = e.__data || {}, e.__data[t] = a;
28626                };
28627            },
28628            3776: function(e, t, a) {
28629                Object.defineProperty(t, "__esModule", {
28630                    value: !0
28631                }), t.on = function(e, t) {
28632                    function a(e, a) {
28633                        n.addEventListener ? n.addEventListener(e, t, !1) : n.attachEvent && n.attachEvent("on" + e, t), 
28634                        i[e] = i[e] || {}, i[e][a] = i[e][a] || [], i[e][a].push(t);
28635                    }
28636                    if (u(this[0])) for (var i = this[0].eventRegistry, n = this[0], r = e.split(" "), o = 0; o < r.length; o++) {
28637                        var s = r[o].split("."), l = s[0], c = s[
vendor: 26,852 bytes, lines 28637-29028
286371] || "global";
28638                        a(l, c);
28639                    }
28640                    return this;
28641                }, t.off = function(e, t) {
28642                    var a, i;
28643                    function n(e, t, n) {
28644                        if (e in a == !0) if (i.removeEventListener ? i.removeEventListener(e, n, !1) : i.detachEvent && i.detachEvent("on" + e, n), 
28645                        "global" === t) for (var r in a[e]) a[e][r].splice(a[e][r].indexOf(n), 1); else a[e][t].splice(a[e][t].indexOf(n), 1);
28646                    }
28647                    function r(e, i) {
28648                        var n, r, o = [];
28649                        if (e.length > 0) if (void 0 === t) for (n = 0, r = a[e][i].length; n < r; n++) o.push({
28650                            ev: e,
28651                            namespace: i && i.length > 0 ? i : "global",
28652                            handler: a[e][i][n]
28653                        }); else o.push({
28654                            ev: e,
28655                            namespace: i && i.length > 0 ? i : "global",
28656                            handler: t
28657                        }); else if (i.length > 0) for (var s in a) for (var l in a[s]) if (l === i) if (void 0 === t) for (n = 0, 
28658                        r = a[s][l].length; n < r; n++) o.push({
28659                            ev: s,
28660                            namespace: l,
28661                            handler: a[s][l][n]
28662                        }); else o.push({
28663                            ev: s,
28664                            namespace: l,
28665                            handler: t
28666                        });
28667                        return o;
28668                    }
28669                    if (u(this[0]) && e) {
28670                        a = this[0].eventRegistry, i = this[0];
28671                        for (var o = e.split(" "), s = 0; s < o.length; s++) for (var l = o[s].split("."), c = r(l[0], l[1]), f = 0, d = c.length; f < d; f++) n(c[f].ev, c[f].namespace, c[f].handler);
28672                    }
28673                    return this;
28674                }, t.trigger = function(e) {
28675                    if (u(this[0])) for (var t = this[0].eventRegistry, a = this[0], i = "string" == typeof e ? e.split(" ") : [ e.type ], r = 0; r < i.length; r++) {
28676                        var s = i[r].split("."), l = s[0], c = s[1] || "global";
28677                        if (void 0 !== document && "global" === c) {
28678                            var f, d, p = {
28679                                bubbles: !0,
28680                                cancelable: !0,
28681                                detail: arguments[1]
28682                            };
28683                            if (document.createEvent) {
28684                                try {
28685                                    switch (l) {
28686                                      case "input":
28687                                        p.inputType = "insertText", f = new InputEvent(l, p);
28688                                        break;
28689
28690                                      default:
28691                                        f = new CustomEvent(l, p);
28692                                    }
28693                                } catch (e) {
28694                                    (f = document.createEvent("CustomEvent")).initCustomEvent(l, p.bubbles, p.cancelable, p.detail);
28695                                }
28696                                e.type && (0, n.default)(f, e), a.dispatchEvent(f);
28697                            } else (f = document.createEventObject()).eventType = l, f.detail = arguments[1], 
28698                            e.type && (0, n.default)(f, e), a.fireEvent("on" + f.eventType, f);
28699                        } else if (void 0 !== t[l]) if (arguments[0] = arguments[0].type ? arguments[0] : o.default.Event(arguments[0]), 
28700                        arguments[0].detail = arguments.slice(1), "global" === c) for (var h in t[l]) for (d = 0; d < t[l][h].length; d++) t[l][h][d].apply(a, arguments); else for (d = 0; d < t[l][c].length; d++) t[l][c][d].apply(a, arguments);
28701                    }
28702                    return this;
28703                }, t.Event = void 0;
28704                var i, n = l(a(600)), r = l(a(9380)), o = l(a(4963)), s = l(a(8741));
28705                function l(e) {
28706                    return e && e.__esModule ? e : {
28707                        default: e
28708                    };
28709                }
28710                function u(e) {
28711                    return e instanceof Element;
28712                }
28713                t.Event = i, "function" == typeof r.default.CustomEvent ? t.Event = i = r.default.CustomEvent : s.default && (t.Event = i = function(e, t) {
28714                    t = t || {
28715                        bubbles: !1,
28716                        cancelable: !1,
28717                        detail: void 0
28718                    };
28719                    var a = document.createEvent("CustomEvent");
28720                    return a.initCustomEvent(e, t.bubbles, t.cancelable, t.detail), a;
28721                }, i.prototype = r.default.Event.prototype);
28722            },
28723            600: function(e, t) {
28724                function a(e) {
28725                    return (a = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
28726                        return typeof e;
28727                    } : function(e) {
28728                        return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
28729                    })(e);
28730                }
28731                Object.defineProperty(t, "__esModule", {
28732                    value: !0
28733                }), t.default = function e() {
28734                    var t, i, n, r, o, s, l = arguments[0] || {}, u = 1, c = arguments.length, f = !1;
28735                    "boolean" == typeof l && (f = l, l = arguments[u] || {}, u++);
28736                    "object" !== a(l) && "function" != typeof l && (l = {});
28737                    for (;u < c; u++) if (null != (t = arguments[u])) for (i in t) n = l[i], r = t[i], 
28738                    l !== r && (f && r && ("[object Object]" === Object.prototype.toString.call(r) || (o = Array.isArray(r))) ? (o ? (o = !1, 
28739                    s = n && Array.isArray(n) ? n : []) : s = n && "[object Object]" === Object.prototype.toString.call(n) ? n : {}, 
28740                    l[i] = e(f, s, r)) : void 0 !== r && (l[i] = r));
28741                    return l;
28742                };
28743            },
28744            4963: function(e, t, a) {
28745                Object.defineProperty(t, "__esModule", {
28746                    value: !0
28747                }), t.default = void 0;
28748                var i = s(a(600)), n = s(a(9380)), r = s(a(253)), o = a(3776);
28749                function s(e) {
28750                    return e && e.__esModule ? e : {
28751                        default: e
28752                    };
28753                }
28754                var l = n.default.document;
28755                function u(e) {
28756                    return e instanceof u ? e : this instanceof u ? void (null != e && e !== n.default && (this[0] = e.nodeName ? e : void 0 !== e[0] && e[0].nodeName ? e[0] : l.querySelector(e), 
28757                    void 0 !== this[0] && null !== this[0] && (this[0].eventRegistry = this[0].eventRegistry || {}))) : new u(e);
28758                }
28759                u.prototype = {
28760                    on: o.on,
28761                    off: o.off,
28762                    trigger: o.trigger
28763                }, u.extend = i.default, u.data = r.default, u.Event = o.Event;
28764                var c = u;
28765                t.default = c;
28766            },
28767            9845: function(e, t, a) {
28768                Object.defineProperty(t, "__esModule", {
28769                    value: !0
28770                }), t.iphone = t.iemobile = t.mobile = t.ie = t.ua = void 0;
28771                var i, n = (i = a(9380)) && i.__esModule ? i : {
28772                    default: i
28773                };
28774                var r = n.default.navigator && n.default.navigator.userAgent || "", o = r.indexOf("MSIE ") > 0 || r.indexOf("Trident/") > 0, s = "ontouchstart" in n.default, l = /iemobile/i.test(r), u = /iphone/i.test(r) && !l;
28775                t.iphone = u, t.iemobile = l, t.mobile = s, t.ie = o, t.ua = r;
28776            },
28777            7184: function(e, t) {
28778                Object.defineProperty(t, "__esModule", {
28779                    value: !0
28780                }), t.default = function(e) {
28781                    return e.replace(a, "\\$1");
28782                };
28783                var a = new RegExp("(\\" + [ "/", ".", "*", "+", "?", "|", "(", ")", "[", "]", "{", "}", "\\", "$", "^" ].join("|\\") + ")", "gim");
28784            },
28785            6030: function(e, t, a) {
28786                Object.defineProperty(t, "__esModule", {
28787                    value: !0
28788                }), t.EventHandlers = void 0;
28789                var i, n = a(8711), r = (i = a(4528)) && i.__esModule ? i : {
28790                    default: i
28791                }, o = a(9845), s = a(7215), l = a(7760), u = a(4713);
28792                var c = {
28793                    keydownEvent: function(e) {
28794                        var t = this.inputmask, a = t.opts, i = t.dependencyLib, c = t.maskset, f = this, d = i(f), p = e.keyCode, h = n.caret.call(t, f), v = a.onKeyDown.call(this, e, n.getBuffer.call(t), h, a);
28795                        if (void 0 !== v) return v;
28796                        if (p === r.default.BACKSPACE || p === r.default.DELETE || o.iphone && p === r.default.BACKSPACE_SAFARI || e.ctrlKey && p === r.default.X && !("oncut" in f)) e.preventDefault(), 
28797                        s.handleRemove.call(t, f, p, h), (0, l.writeBuffer)(f, n.getBuffer.call(t, !0), c.p, e, f.inputmask._valueGet() !== n.getBuffer.call(t).join("")); else if (p === r.default.END || p === r.default.PAGE_DOWN) {
28798                            e.preventDefault();
28799                            var m = n.seekNext.call(t, n.getLastValidPosition.call(t));
28800                            n.caret.call(t, f, e.shiftKey ? h.begin : m, m, !0);
28801                        } else p === r.default.HOME && !e.shiftKey || p === r.default.PAGE_UP ? (e.preventDefault(), 
28802                        n.caret.call(t, f, 0, e.shiftKey ? h.begin : 0, !0)) : a.undoOnEscape && p === r.default.ESCAPE && !0 !== e.altKey ? ((0, 
28803                        l.checkVal)(f, !0, !1, t.undoValue.split("")), d.trigger("click")) : !0 === a.tabThrough && p === r.default.TAB ? !0 === e.shiftKey ? (h.end = n.seekPrevious.call(t, h.end, !0), 
28804                        !0 === u.getTest.call(t, h.end - 1).match.static && h.end--, h.begin = n.seekPrevious.call(t, h.end, !0), 
28805                        h.begin >= 0 && h.end > 0 && (e.preventDefault(), n.caret.call(t, f, h.begin, h.end))) : (h.begin = n.seekNext.call(t, h.begin, !0), 
28806                        h.end = n.seekNext.call(t, h.begin, !0), h.end < c.maskLength && h.end--, h.begin <= c.maskLength && (e.preventDefault(), 
28807                        n.caret.call(t, f, h.begin, h.end))) : e.shiftKey || a.insertModeVisual && !1 === a.insertMode && (p === r.default.RIGHT ? setTimeout((function() {
28808                            var e = n.caret.call(t, f);
28809                            n.caret.call(t, f, e.begin);
28810                        }), 0) : p === r.default.LEFT && setTimeout((function() {
28811                            var e = n.translatePosition.call(t, f.inputmask.caretPos.begin);
28812                            n.translatePosition.call(t, f.inputmask.caretPos.end);
28813                            t.isRTL ? n.caret.call(t, f, e + (e === c.maskLength ? 0 : 1)) : n.caret.call(t, f, e - (0 === e ? 0 : 1));
28814                        }), 0));
28815                        t.ignorable = a.ignorables.includes(p);
28816                    },
28817                    keypressEvent: function(e, t, a, i, o) {
28818                        var u = this.inputmask || this, c = u.opts, f = u.dependencyLib, d = u.maskset, p = u.el, h = f(p), v = e.which || e.charCode || e.keyCode;
28819                        if (!(!0 === t || e.ctrlKey && e.altKey) && (e.ctrlKey || e.metaKey || u.ignorable)) return v === r.default.ENTER && u.undoValue !== u._valueGet(!0) && (u.undoValue = u._valueGet(!0), 
28820                        setTimeout((function() {
28821                            h.trigger("change");
28822                        }), 0)), u.skipInputEvent = !0, !0;
28823                        if (v) {
28824                            44 !== v && 46 !== v || 3 !== e.location || "" === c.radixPoint || (v = c.radixPoint.charCodeAt(0));
28825                            var m, g = t ? {
28826                                begin: o,
28827                                end: o
28828                            } : n.caret.call(u, p), k = String.fromCharCode(v);
28829                            d.writeOutBuffer = !0;
28830                            var y = s.isValid.call(u, g, k, i, void 0, void 0, void 0, t);
28831                            if (!1 !== y && (n.resetMaskSet.call(u, !0), m = void 0 !== y.caret ? y.caret : n.seekNext.call(u, y.pos.begin ? y.pos.begin : y.pos), 
28832                            d.p = m), m = c.numericInput && void 0 === y.caret ? n.seekPrevious.call(u, m) : m, 
28833                            !1 !== a && (setTimeout((function() {
28834                                c.onKeyValidation.call(p, v, y);
28835                            }), 0), d.writeOutBuffer && !1 !== y)) {
28836                                var b = n.getBuffer.call(u);
28837                                (0, l.writeBuffer)(p, b, m, e, !0 !== t);
28838                            }
28839                            if (e.preventDefault(), t) return !1 !== y && (y.forwardPosition = m), y;
28840                        }
28841                    },
28842                    keyupEvent: function(e) {
28843                        var t = this.inputmask;
28844                        !t.isComposing || e.keyCode !== r.default.KEY_229 && e.keyCode !== r.default.ENTER || t.$el.trigger("input");
28845                    },
28846                    pasteEvent: function(e) {
28847                        var t, a = this.inputmask, i = a.opts, r = a._valueGet(!0), o = n.caret.call(a, this);
28848                        a.isRTL && (t = o.end, o.end = o.begin, o.begin = t);
28849                        var s = r.substr(0, o.begin), u = r.substr(o.end, r.length);
28850                        if (s == (a.isRTL ? n.getBufferTemplate.call(a).slice().reverse() : n.getBufferTemplate.call(a)).slice(0, o.begin).join("") && (s = ""), 
28851                        u == (a.isRTL ? n.getBufferTemplate.call(a).slice().reverse() : n.getBufferTemplate.call(a)).slice(o.end).join("") && (u = ""), 
28852                        window.clipboardData && window.clipboardData.getData) r = s + window.clipboardData.getData("Text") + u; else {
28853                            if (!e.clipboardData || !e.clipboardData.getData) return !0;
28854                            r = s + e.clipboardData.getData("text/plain") + u;
28855                        }
28856                        var c = r;
28857                        if ("function" == typeof i.onBeforePaste) {
28858                            if (!1 === (c = i.onBeforePaste.call(a, r, i))) return e.preventDefault();
28859                            c || (c = r);
28860                        }
28861                        return (0, l.checkVal)(this, !0, !1, c.toString().split(""), e), e.preventDefault();
28862                    },
28863                    inputFallBackEvent: function(e) {
28864                        var t = this.inputmask, a = t.opts, i = t.dependencyLib;
28865                        var s = this, f = s.inputmask._valueGet(!0), d = (t.isRTL ? n.getBuffer.call(t).slice().reverse() : n.getBuffer.call(t)).join(""), p = n.caret.call(t, s, void 0, void 0, !0);
28866                        if (d !== f) {
28867                            var h = function(e, i, r) {
28868                                for (var o, s, l, c = e.substr(0, r.begin).split(""), f = e.substr(r.begin).split(""), d = i.substr(0, r.begin).split(""), p = i.substr(r.begin).split(""), h = c.length >= d.length ? c.length : d.length, v = f.length >= p.length ? f.length : p.length, m = "", g = [], k = "~"; c.length < h; ) c.push(k);
28869                                for (;d.length < h; ) d.push(k);
28870                                for (;f.length < v; ) f.unshift(k);
28871                                for (;p.length < v; ) p.unshift(k);
28872                                var y = c.concat(f), b = d.concat(p);
28873                                for (s = 0, o = y.length; s < o; s++) switch (l = u.getPlaceholder.call(t, n.translatePosition.call(t, s)), 
28874                                m) {
28875                                  case "insertText":
28876                                    b[s - 1] === y[s] && r.begin == y.length - 1 && g.push(y[s]), s = o;
28877                                    break;
28878
28879                                  case "insertReplacementText":
28880                                  case "deleteContentBackward":
28881                                    y[s] === k ? r.end++ : s = o;
28882                                    break;
28883
28884                                  default:
28885                                    y[s] !== b[s] && (y[s + 1] !== k && y[s + 1] !== l && void 0 !== y[s + 1] || (b[s] !== l || b[s + 1] !== k) && b[s] !== k ? b[s + 1] === k && b[s] === y[s + 1] ? (m = "insertText", 
28886                                    g.push(y[s]), r.begin--, r.end--) : y[s] !== l && y[s] !== k && (y[s + 1] === k || b[s] !== y[s] && b[s + 1] === y[s + 1]) ? (m = "insertReplacementText", 
28887                                    g.push(y[s]), r.begin--) : y[s] === k ? (m = "deleteContentBackward", (n.isMask.call(t, n.translatePosition.call(t, s), !0) || b[s] === a.radixPoint) && r.end++) : s = o : (m = "insertText", 
28888                                    g.push(y[s]), r.begin--, r.end--));
28889                                }
28890                                return {
28891                                    action: m,
28892                                    data: g,
28893                                    caret: r
28894                                };
28895                            }(f = function(e, a, i) {
28896                                if (o.iemobile) {
28897                                    var r = a.replace(n.getBuffer.call(t).join(""), "");
28898                                    if (1 === r.length) {
28899                                        var s = a.split("");
28900                                        s.splice(i.begin, 0, r), a = s.join("");
28901                                    }
28902                                }
28903                                return a;
28904                            }(0, f, p), d, p);
28905                            switch ((s.inputmask.shadowRoot || s.ownerDocument).activeElement !== s && s.focus(), 
28906                            (0, l.writeBuffer)(s, n.getBuffer.call(t)), n.caret.call(t, s, p.begin, p.end, !0), 
28907                            h.action) {
28908                              case "insertText":
28909                              case "insertReplacementText":
28910                                h.data.forEach((function(e, a) {
28911                                    var n = new i.Event("keypress");
28912                                    n.which = e.charCodeAt(0), t.ignorable = !1, c.keypressEvent.call(s, n);
28913                                })), setTimeout((function() {
28914                                    t.$el.trigger("keyup");
28915                                }), 0);
28916                                break;
28917
28918                              case "deleteContentBackward":
28919                                var v = new i.Event("keydown");
28920                                v.keyCode = r.default.BACKSPACE, c.keydownEvent.call(s, v);
28921                                break;
28922
28923                              default:
28924                                (0, l.applyInputValue)(s, f);
28925                            }
28926                            e.preventDefault();
28927                        }
28928                    },
28929                    compositionendEvent: function(e) {
28930                        var t = this.inputmask;
28931                        t.isComposing = !1, t.$el.trigger("input");
28932                    },
28933                    setValueEvent: function(e) {
28934                        var t = this.inputmask, a = this, i = e && e.detail ? e.detail[0] : arguments[1];
28935                        void 0 === i && (i = a.inputmask._valueGet(!0)), (0, l.applyInputValue)(a, i), (e.detail && void 0 !== e.detail[1] || void 0 !== arguments[2]) && n.caret.call(t, a, e.detail ? e.detail[1] : arguments[2]);
28936                    },
28937                    focusEvent: function(e) {
28938                        var t = this.inputmask, a = t.opts, i = this, r = i.inputmask._valueGet();
28939                        a.showMaskOnFocus && r !== n.getBuffer.call(t).join("") && (0, l.writeBuffer)(i, n.getBuffer.call(t), n.seekNext.call(t, n.getLastValidPosition.call(t))), 
28940                        !0 !== a.positionCaretOnTab || !1 !== t.mouseEnter || s.isComplete.call(t, n.getBuffer.call(t)) && -1 !== n.getLastValidPosition.call(t) || c.clickEvent.apply(i, [ e, !0 ]), 
28941                        t.undoValue = t._valueGet(!0);
28942                    },
28943                    invalidEvent: function(e) {
28944                        this.inputmask.validationEvent = !0;
28945                    },
28946                    mouseleaveEvent: function() {
28947                        var e = this.inputmask, t = e.opts, a = this;
28948                        e.mouseEnter = !1, t.clearMaskOnLostFocus && (a.inputmask.shadowRoot || a.ownerDocument).activeElement !== a && (0, 
28949                        l.HandleNativePlaceholder)(a, e.originalPlaceholder);
28950                    },
28951                    clickEvent: function(e, t) {
28952                        var a = this.inputmask, i = this;
28953                        if ((i.inputmask.shadowRoot || i.ownerDocument).activeElement === i) {
28954                            var r = n.determineNewCaretPosition.call(a, n.caret.call(a, i), t);
28955                            void 0 !== r && n.caret.call(a, i, r);
28956                        }
28957                    },
28958                    cutEvent: function(e) {
28959                        var t = this.inputmask, a = t.maskset, i = this, o = n.caret.call(t, i), u = window.clipboardData || e.clipboardData, c = t.isRTL ? n.getBuffer.call(t).slice(o.end, o.begin) : n.getBuffer.call(t).slice(o.begin, o.end);
28960                        u.setData("text", t.isRTL ? c.reverse().join("") : c.join("")), document.execCommand && document.execCommand("copy"), 
28961                        s.handleRemove.call(t, i, r.default.DELETE, o), (0, l.writeBuffer)(i, n.getBuffer.call(t), a.p, e, t.undoValue !== t._valueGet(!0));
28962                    },
28963                    blurEvent: function(e) {
28964                        var t = this.inputmask, a = t.opts, i = (0, t.dependencyLib)(this), r = this;
28965                        if (r.inputmask) {
28966                            (0, l.HandleNativePlaceholder)(r, t.originalPlaceholder);
28967                            var o = r.inputmask._valueGet(), u = n.getBuffer.call(t).slice();
28968                            "" !== o && (a.clearMaskOnLostFocus && (-1 === n.getLastValidPosition.call(t) && o === n.getBufferTemplate.call(t).join("") ? u = [] : l.clearOptionalTail.call(t, u)), 
28969                            !1 === s.isComplete.call(t, u) && (setTimeout((function() {
28970                                i.trigger("incomplete");
28971                            }), 0), a.clearIncomplete && (n.resetMaskSet.call(t), u = a.clearMaskOnLostFocus ? [] : n.getBufferTemplate.call(t).slice())), 
28972                            (0, l.writeBuffer)(r, u, void 0, e)), t.undoValue !== t._valueGet(!0) && (t.undoValue = t._valueGet(!0), 
28973                            i.trigger("change"));
28974                        }
28975                    },
28976                    mouseenterEvent: function() {
28977                        var e = this.inputmask, t = e.opts, a = this;
28978                        if (e.mouseEnter = !0, (a.inputmask.shadowRoot || a.ownerDocument).activeElement !== a) {
28979                            var i = (e.isRTL ? n.getBufferTemplate.call(e).slice().reverse() : n.getBufferTemplate.call(e)).join("");
28980                            e.placeholder !== i && a.placeholder !== e.originalPlaceholder && (e.originalPlaceholder = a.placeholder), 
28981                            t.showMaskOnHover && (0, l.HandleNativePlaceholder)(a, i);
28982                        }
28983                    },
28984                    submitEvent: function() {
28985                        var e = this.inputmask, t = e.opts;
28986                        e.undoValue !== e._valueGet(!0) && e.$el.trigger("change"), t.clearMaskOnLostFocus && -1 === n.getLastValidPosition.call(e) && e._valueGet && e._valueGet() === n.getBufferTemplate.call(e).join("") && e._valueSet(""), 
28987                        t.clearIncomplete && !1 === s.isComplete.call(e, n.getBuffer.call(e)) && e._valueSet(""), 
28988                        t.removeMaskOnSubmit && (e._valueSet(e.unmaskedvalue(), !0), setTimeout((function() {
28989                            (0, l.writeBuffer)(e.el, n.getBuffer.call(e));
28990                        }), 0));
28991                    },
28992                    resetEvent: function() {
28993                        var e = this.inputmask;
28994                        e.refreshValue = !0, setTimeout((function() {
28995                            (0, l.applyInputValue)(e.el, e._valueGet(!0));
28996                        }), 0);
28997                    }
28998                };
28999                t.EventHandlers = c;
29000            },
29001            9716: function(e, t, a) {
29002                Object.defineProperty(t, "__esModule", {
29003                    value: !0
29004                }), t.EventRuler = void 0;
29005                var i = s(a(2394)), n = s(a(4528)), r = a(8711), o = a(7760);
29006                function s(e) {
29007                    return e && e.__esModule ? e : {
29008                        default: e
29009                    };
29010                }
29011                var l = {
29012                    on: function(e, t, a) {
29013                        var s = e.inputmask.dependencyLib, l = function(t) {
29014                            t.originalEvent && (t = t.originalEvent || t, arguments[0] = t);
29015                            var l, u = this, c = u.inputmask, f = c ? c.opts : void 0;
29016                            if (void 0 === c && "FORM" !== this.nodeName) {
29017                                var d = s.data(u, "_inputmask_opts");
29018                                s(u).off(), d && new i.default(d).mask(u);
29019                            } else {
29020                                if ([ "submit", "reset", "setvalue" ].includes(t.type) || "FORM" === this.nodeName || !(u.disabled || u.readOnly && !("keydown" === t.type && t.ctrlKey && 67 === t.keyCode || !1 === f.tabThrough && t.keyCode === n.default.TAB))) {
29021                                    switch (t.type) {
29022                                      case "input":
29023                                        if (!0 === c.skipInputEvent || t.inputType && "insertCompositionText" === t.inputType) return c.skipInputEvent = !1, 
29024                                        t.preventDefault();
29025                                        break;
29026
29027                                      case "keydown":
29028                                        c.skipKeyPressEvent = !1, c.skipInputEvent = c.isComposing = t.ke
29028yCode === n.default.KEY_229;
29029                                        break;
29030
29031                                      case "keyup":
29032                                      case "compositionend":
29033                                        c.isComposing && (c.skipInputEvent = !1);
29034                                        break;
29035
29036                                      case "keypress":
29037                                        if (!0 === c.skipKeyPressEvent) return t.preventDefault();
29038                                        c.skipKeyPressEvent = !0;
29039                                        break;
29040
29041                                      case "click":
29042                                      case "focus":
29043                                        return c.validationEvent ? (c.validationEvent = !1, e.blur(), (0, o.HandleNativePlaceholder)(e, (c.isRTL ? r.getBufferTemplate.call(c).slice().reverse() : r.getBufferTemplate.call(c)).join("")), 
29044                                        setTimeout((function() {
29045                                            e.focus();
29046                                        }), f.validationEventTimeOut), !1) : (l = arguments, setTimeout((function() {
29047                                            e.inputmask && a.apply(u, l);
29048                                        }), 0), !1);
29049                                    }
29050                                    var p = a.apply(u, arguments);
29051                                    return !1 === p && (t.preventDefault(), t.stopPropagation()), p;
29052                                }
29053                                t.preventDefault();
29054                            }
29055                        };
29056                        [ "submit", "reset" ].includes(t) ? (l = l.bind(e), null !== e.form && s(e.form).on(t, l)) : s(e).on(t, l), 
29057                        e.inputmask.events[t] = e.inputmask.events[t] || [], e.inputmask.events[t].push(l);
29058                    },
29059                    off: function(e, t) {
29060                        if (e.inputmask && e.inputmask.events) {
29061                            var a = e.inputmask.dependencyLib, i = e.inputmask.events;
29062                            for (var n in t && ((i = [])[t] = e.inputmask.events[t]), i) {
29063                                for (var r = i[n]; r.length > 0; ) {
29064                                    var o = r.pop();
29065                                    [ "submit", "reset" ].includes(n) ? null !== e.form && a(e.form).off(n, o) : a(e).off(n, o);
29066                                }
29067                                delete e.inputmask.events[n];
29068                            }
29069                        }
29070                    }
29071                };
29072                t.EventRuler = l;
29073            },
29074            219: function(e, t, a) {
29075                var i = l(a(2394)), n = l(a(4528)), r = l(a(7184)), o = a(8711);
29076                function s(e) {
29077                    return (s = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
29078                        return typeof e;
29079                    } : function(e) {
29080                        return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
29081                    })(e);
29082                }
29083                function l(e) {
29084                    return e && e.__esModule ? e : {
29085                        default: e
29086                    };
29087                }
vendor: 16,584 bytes, lines 29088-29352
29088                var u = i.default.dependencyLib, c = (new Date).getFullYear(), f = {
29089                    d: [ "[1-9]|[12][0-9]|3[01]", Date.prototype.setDate, "day", Date.prototype.getDate ],
29090                    dd: [ "0[1-9]|[12][0-9]|3[01]", Date.prototype.setDate, "day", function() {
29091                        return y(Date.prototype.getDate.call(this), 2);
29092                    } ],
29093                    ddd: [ "" ],
29094                    dddd: [ "" ],
29095                    m: [ "[1-9]|1[012]", Date.prototype.setMonth, "month", function() {
29096                        return Date.prototype.getMonth.call(this) + 1;
29097                    } ],
29098                    mm: [ "0[1-9]|1[012]", Date.prototype.setMonth, "month", function() {
29099                        return y(Date.prototype.getMonth.call(this) + 1, 2);
29100                    } ],
29101                    mmm: [ "" ],
29102                    mmmm: [ "" ],
29103                    yy: [ "[0-9]{2}", Date.prototype.setFullYear, "year", function() {
29104                        return y(Date.prototype.getFullYear.call(this), 2);
29105                    } ],
29106                    yyyy: [ "[0-9]{4}", Date.prototype.setFullYear, "year", function() {
29107                        return y(Date.prototype.getFullYear.call(this), 4);
29108                    } ],
29109                    h: [ "[1-9]|1[0-2]", Date.prototype.setHours, "hours", Date.prototype.getHours ],
29110                    hh: [ "0[1-9]|1[0-2]", Date.prototype.setHours, "hours", function() {
29111                        return y(Date.prototype.getHours.call(this), 2);
29112                    } ],
29113                    hx: [ function(e) {
29114                        return "[0-9]{".concat(e, "}");
29115                    }, Date.prototype.setHours, "hours", function(e) {
29116                        return Date.prototype.getHours;
29117                    } ],
29118                    H: [ "1?[0-9]|2[0-3]", Date.prototype.setHours, "hours", Date.prototype.getHours ],
29119                    HH: [ "0[0-9]|1[0-9]|2[0-3]", Date.prototype.setHours, "hours", function() {
29120                        return y(Date.prototype.getHours.call(this), 2);
29121                    } ],
29122                    Hx: [ function(e) {
29123                        return "[0-9]{".concat(e, "}");
29124                    }, Date.prototype.setHours, "hours", function(e) {
29125                        return function() {
29126                            return y(Date.prototype.getHours.call(this), e);
29127                        };
29128                    } ],
29129                    M: [ "[1-5]?[0-9]", Date.prototype.setMinutes, "minutes", Date.prototype.getMinutes ],
29130                    MM: [ "0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]", Date.prototype.setMinutes, "minutes", function() {
29131                        return y(Date.prototype.getMinutes.call(this), 2);
29132                    } ],
29133                    s: [ "[1-5]?[0-9]", Date.prototype.setSeconds, "seconds", Date.prototype.getSeconds ],
29134                    ss: [ "0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]", Date.prototype.setSeconds, "seconds", function() {
29135                        return y(Date.prototype.getSeconds.call(this), 2);
29136                    } ],
29137                    l: [ "[0-9]{3}", Date.prototype.setMilliseconds, "milliseconds", function() {
29138                        return y(Date.prototype.getMilliseconds.call(this), 3);
29139                    } ],
29140                    L: [ "[0-9]{2}", Date.prototype.setMilliseconds, "milliseconds", function() {
29141                        return y(Date.prototype.getMilliseconds.call(this), 2);
29142                    } ],
29143                    t: [ "[ap]", p, "ampm", h, 1 ],
29144                    tt: [ "[ap]m", p, "ampm", h, 2 ],
29145                    T: [ "[AP]", p, "ampm", h, 1 ],
29146                    TT: [ "[AP]M", p, "ampm", h, 2 ],
29147                    Z: [ "" ],
29148                    o: [ "" ],
29149                    S: [ "" ]
29150                }, d = {
29151                    isoDate: "yyyy-mm-dd",
29152                    isoTime: "HH:MM:ss",
29153                    isoDateTime: "yyyy-mm-dd'T'HH:MM:ss",
29154                    isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"
29155                };
29156                function p(e) {
29157                    e.toLowerCase().includes("p") && this.setHours(this.getHours() + 12);
29158                }
29159                function h() {}
29160                function v(e) {
29161                    var t = new RegExp("\\d+$").exec(e[0]);
29162                    if (t && void 0 !== t[0]) {
29163                        var a = f[e[0][0] + "x"].slice("");
29164                        return a[0] = a[0](t[0]), a[3] = a[3](t[0]), a;
29165                    }
29166                    if (f[e[0]]) return f[e[0]];
29167                }
29168                function m(e) {
29169                    if (!e.tokenizer) {
29170                        var t = [], a = [];
29171                        for (var i in f) if (/\.*x$/.test(i)) {
29172                            var n = i[0] + "\\d+";
29173                            -1 === a.indexOf(n) && a.push(n);
29174                        } else -1 === t.indexOf(i[0]) && t.push(i[0]);
29175                        e.tokenizer = "(" + (a.length > 0 ? a.join("|") + "|" : "") + t.join("+|") + ")+?|.", 
29176                        e.tokenizer = new RegExp(e.tokenizer, "g");
29177                    }
29178                    return e.tokenizer;
29179                }
29180                function g(e, t, a) {
29181                    if (void 0 === e.rawday || !isFinite(e.rawday) && new Date(e.date.getFullYear(), isFinite(e.rawmonth) ? e.month : e.date.getMonth() + 1, 0).getDate() >= e.day || "29" == e.day && !Number.isFinite(e.rawyear) || new Date(e.date.getFullYear(), isFinite(e.rawmonth) ? e.month : e.date.getMonth() + 1, 0).getDate() >= e.day) return t;
29182                    if ("29" == e.day) {
29183                        var i = P(t.pos, a);
29184                        if ("yyyy" === i.targetMatch[0] && t.pos - i.targetMatchIndex == 2) return t.remove = t.pos + 1, 
29185                        t;
29186                    } else if ("02" == e.month && "30" == e.day && void 0 !== t.c) return e.day = "03", 
29187                    e.date.setDate(3), e.date.setMonth(1), t.insert = [ {
29188                        pos: t.pos,
29189                        c: "0"
29190                    }, {
29191                        pos: t.pos + 1,
29192                        c: t.c
29193                    } ], t.caret = o.seekNext.call(this, t.pos + 1), t;
29194                    return !1;
29195                }
29196                function k(e, t, a, i) {
29197                    var n, o, s = "";
29198                    for (m(a).lastIndex = 0; n = m(a).exec(e); ) {
29199                        if (void 0 === t) if (o = v(n)) s += "(" + o[0] + ")"; else switch (n[0]) {
29200                          case "[":
29201                            s += "(";
29202                            break;
29203
29204                          case "]":
29205                            s += ")?";
29206                            break;
29207
29208                          default:
29209                            s += (0, r.default)(n[0]);
29210                        } else if (o = v(n)) if (!0 !== i && o[3]) s += o[3].call(t.date); else o[2] ? s += t["raw" + o[2]] : s += n[0]; else s += n[0];
29211                    }
29212                    return s;
29213                }
29214                function y(e, t, a) {
29215                    for (e = String(e), t = t || 2; e.length < t; ) e = a ? e + "0" : "0" + e;
29216                    return e;
29217                }
29218                function b(e, t, a) {
29219                    var i, n, r, o = {
29220                        date: new Date(1, 0, 1)
29221                    }, l = e;
29222                    function u(e, t, a) {
29223                        if (e[i] = "ampm" === i ? t : t.replace(/[^0-9]/g, "0"), e["raw" + i] = t, void 0 !== r) {
29224                            var n = e[i];
29225                            ("day" === i && 29 === parseInt(n) || "month" === i && 2 === parseInt(n)) && (29 !== parseInt(e.day) || 2 !== parseInt(e.month) || "" !== e.year && void 0 !== e.year || e.date.setFullYear(2012, 1, 29)), 
29226                            "day" === i && 0 === parseInt(n) && (n = 1), "month" === i && (n = parseInt(n)) > 0 && (n -= 1), 
29227                            "year" === i && n.length < 4 && (n = y(n, 4, !0)), "" === n || isNaN(n) || r.call(e.date, n), 
29228                            "ampm" === i && r.call(e.date, n);
29229                        }
29230                    }
29231                    if ("string" == typeof l) {
29232                        for (m(a).lastIndex = 0; n = m(a).exec(t); ) {
29233                            var c = new RegExp("\\d+$").exec(n[0]), d = c ? n[0][0] + "x" : n[0], p = void 0;
29234                            if (c) {
29235                                var h = m(a).lastIndex, v = P(n.index, a);
29236                                m(a).lastIndex = h, p = l.slice(0, l.indexOf(v.nextMatch[0]));
29237                            } else p = l.slice(0, d.length);
29238                            Object.prototype.hasOwnProperty.call(f, d) && (i = f[d][2], r = f[d][1], u(o, p)), 
29239                            l = l.slice(p.length);
29240                        }
29241                        return o;
29242                    }
29243                    if (l && "object" === s(l) && Object.prototype.hasOwnProperty.call(l, "date")) return l;
29244                }
29245                function x(e, t) {
29246                    return k(t.inputFormat, {
29247                        date: e
29248                    }, t);
29249                }
29250                function P(e, t) {
29251                    var a, i, n = 0, r = 0;
29252                    for (m(t).lastIndex = 0; i = m(t).exec(t.inputFormat); ) {
29253                        var o = new RegExp("\\d+$").exec(i[0]);
29254                        if ((n += r = o ? parseInt(o[0]) : i[0].length) >= e) {
29255                            a = i, i = m(t).exec(t.inputFormat);
29256                            break;
29257                        }
29258                    }
29259                    return {
29260                        targetMatchIndex: n - r,
29261                        nextMatch: i,
29262                        targetMatch: a
29263                    };
29264                }
29265                i.default.extendAliases({
29266                    datetime: {
29267                        mask: function(e) {
29268                            return e.numericInput = !1, f.S = e.i18n.ordinalSuffix.join("|"), e.inputFormat = d[e.inputFormat] || e.inputFormat, 
29269                            e.displayFormat = d[e.displayFormat] || e.displayFormat || e.inputFormat, e.outputFormat = d[e.outputFormat] || e.outputFormat || e.inputFormat, 
29270                            e.placeholder = "" !== e.placeholder ? e.placeholder : e.inputFormat.replace(/[[\]]/, ""), 
29271                            e.regex = k(e.inputFormat, void 0, e), e.min = b(e.min, e.inputFormat, e), e.max = b(e.max, e.inputFormat, e), 
29272                            null;
29273                        },
29274                        placeholder: "",
29275                        inputFormat: "isoDateTime",
29276                        displayFormat: void 0,
29277                        outputFormat: void 0,
29278                        min: null,
29279                        max: null,
29280                        skipOptionalPartCharacter: "",
29281                        i18n: {
29282                            dayNames: [ "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" ],
29283                            monthNames: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ],
29284                            ordinalSuffix: [ "st", "nd", "rd", "th" ]
29285                        },
29286                        preValidation: function(e, t, a, i, n, r, o, s) {
29287                            if (s) return !0;
29288                            if (isNaN(a) && e[t] !== a) {
29289                                var l = P(t, n);
29290                                if (l.nextMatch && l.nextMatch[0] === a && l.targetMatch[0].length > 1) {
29291                                    var u = f[l.targetMatch[0]][0];
29292                                    if (new RegExp(u).test("0" + e[t - 1])) return e[t] = e[t - 1], e[t - 1] = "0", 
29293                                    {
29294                                        fuzzy: !0,
29295                                        buffer: e,
29296                                        refreshFromBuffer: {
29297                                            start: t - 1,
29298                                            end: t + 1
29299                                        },
29300                                        pos: t + 1
29301                                    };
29302                                }
29303                            }
29304                            return !0;
29305                        },
29306                        postValidation: function(e, t, a, i, n, r, o, s) {
29307                            var l, u;
29308                            if (o) return !0;
29309                            if (!1 === i && (((l = P(t + 1, n)).targetMatch && l.targetMatchIndex === t && l.targetMatch[0].length > 1 && void 0 !== f[l.targetMatch[0]] || (l = P(t + 2, n)).targetMatch && l.targetMatchIndex === t + 1 && l.targetMatch[0].length > 1 && void 0 !== f[l.targetMatch[0]]) && (u = f[l.targetMatch[0]][0]), 
29310                            void 0 !== u && (void 0 !== r.validPositions[t + 1] && new RegExp(u).test(a + "0") ? (e[t] = a, 
29311                            e[t + 1] = "0", i = {
29312                                pos: t + 2,
29313                                caret: t
29314                            }) : new RegExp(u).test("0" + a) && (e[t] = "0", e[t + 1] = a, i = {
29315                                pos: t + 2
29316                            })), !1 === i)) return i;
29317                            if (i.fuzzy && (e = i.buffer, t = i.pos), (l = P(t, n)).targetMatch && l.targetMatch[0] && void 0 !== f[l.targetMatch[0]]) {
29318                                u = f[l.targetMatch[0]][0];
29319                                var d = e.slice(l.targetMatchIndex, l.targetMatchIndex + l.targetMatch[0].length);
29320                                !1 === new RegExp(u).test(d.join("")) && 2 === l.targetMatch[0].length && r.validPositions[l.targetMatchIndex] && r.validPositions[l.targetMatchIndex + 1] && (r.validPositions[l.targetMatchIndex + 1].input = "0");
29321                            }
29322                            var p = i, h = b(e.join(""), n.inputFormat, n);
29323                            return p && h.date.getTime() == h.date.getTime() && (n.prefillYear && (p = function(e, t, a) {
29324                                if (e.year !== e.rawyear) {
29325                                    var i = c.toString(), n = e.rawyear.replace(/[^0-9]/g, ""), r = i.slice(0, n.length), o = i.slice(n.length);
29326                                    if (2 === n.length && n === r) {
29327                                        var s = new Date(c, e.month - 1, e.day);
29328                                        e.day == s.getDate() && (!a.max || a.max.date.getTime() >= s.getTime()) && (e.date.setFullYear(c), 
29329                                        e.year = i, t.insert = [ {
29330                                            pos: t.pos + 1,
29331                                            c: o[0]
29332                                        }, {
29333                                            pos: t.pos + 2,
29334                                            c: o[1]
29335                                        } ]);
29336                                    }
29337                                }
29338                                return t;
29339                            }(h, p, n)), p = function(e, t, a, i, n) {
29340                                if (!t) return t;
29341                                if (a.min) {
29342                                    if (e.rawyear) {
29343                                        var r, o = e.rawyear.replace(/[^0-9]/g, ""), s = a.min.year.substr(0, o.length);
29344                                        if (o < s) {
29345                                            var l = P(t.pos, a);
29346                                            if (o = e.rawyear.substr(0, t.pos - l.targetMatchIndex + 1).replace(/[^0-9]/g, "0"), 
29347                                            (s = a.min.year.substr(0, o.length)) <= o) return t.remove = l.targetMatchIndex + o.length, 
29348                                            t;
29349                                            if (o = "yyyy" === l.targetMatch[0] ? e.rawyear.substr(1, 1) : e.rawyear.substr(0, 1), 
29350                                            s = a.min.year.substr(2, 1), r = a.max ? a.max.year.substr(2, 1) : o, 1 === o.length && s <= o && o <= r && !0 !== n) return "yyyy" === l.targetMatch[0] ? (t.insert = [ {
29351                                                pos: t.pos + 1,
29352                                                c: o,
29353                                                strict: !0
29354                                            } ], t.caret = t.pos + 2, i.validPositions[t.pos].input = a.min.year[1]) : (t.insert = [ {
29355                                                pos: t.pos + 1,
29356                                                c: a.min.year[1],
29357                                                strict: !0
29358                                            }, {
29359                                                pos: t.pos + 2,
29360                                                c: o,
29361                                                strict: !0
29362                                            } ], t.caret = t.pos + 3, i.validPositions[t.pos].input = a.min.year[0]), t;
29363                                            t = !1;
29364                                        }
29365                                    }
29366                                    for (var u in e) -1 === u.indexOf("raw") && e["raw".concat(u)] && (e[u], e["raw".concat(u)]);
29367                                    t && e.year && e.year === e.rawyear && a.min.date.getTime() == a.min.date.getTime() && (t = a.min.date.getTime() <= e.date.getTime());
29368                                }
29369                                return t && a.max && a.max.date.getTime() == a.max.date.getTime() && (t = a.max.date.getTime() >= e.date.getTime()), 
29370                                t;
29371                            }(h, p = g.call(this, h, p, n), n, r, s)), void 0 !== t && p && i.pos !== t ? {
29372                                buffer: k(n.inputFormat, h, n).split(""),
29373                                refreshFromBuffer: {
29374                                    start: t,
29375                                    end: i.pos
29376                                },
29377                                pos: i.caret || i.pos
29378                            } : p;
29379                        },
29380                        onKeyDown: function(e, t, a, i) {
29381                            e.ctrlKey && e.keyCode === n.default.RIGHT && (this.inputmask._valueSet(x(new Date, i)), 
29382                            u(this).trigger("setvalue"));
29383                        },
29384                        onUnMask: function(e, t, a) {
29385                            return t ? k(a.outputFormat, b(e, a.inputFormat, a), a, !0) : t;
29386                        },
29387                        casing: function(e, t, a, i) {
29388                            return 0 == t.nativeDef.indexOf("[ap]") ? e.toLowerCase() : 0 == t.nativeDef.indexOf("[AP]") ? e.toUpperCase() : e;
29389                        },
29390                        onBeforeMask: function(e, t) {
29391                            return "[object Date]" === Object.prototype.toString.call(e) && (e = x(e, t)), e;
29392                        },
29393                        insertMode: !1,
29394                        shiftPositions: !1,
29395                        keepStatic: !1,
29396                        inputmode: "numeric",
29397                        prefillYear: !0
29398                    }
29399                });
29400            },
29401            3851: function(e, t, a) {
29402                var i, n = (i = a(2394)) && i.__esModule ? i : {
29403                    default: i
29404                }, r = a(8711), o = a(4713);
29405                n.default.extendDefinitions({
29406                    A: {
29407                        validator: "[A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",
29408                        casing: "upper"
29409                    },
29410                    "&": {
29411                        validator: "[0-9A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",
29412                        casing: "upper"
29413                    },
29414                    "#": {
29415                        validator: "[0-9A-Fa-f]",
29416                        casing: "upper"
29417                    }
29418                });
29419                var s = new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]");
29420                function l(e, t, a, i, n) {
29421                    return a - 1 > -1 && "." !== t.buffer[a - 1] ? (e = t.buffer[a - 1] + e, e = a - 2 > -1 && "." !== t.buffer[a - 2] ? t.buffer[a - 2] + e : "0" + e) : e = "00" + e, 
29422                    s.test(e);
29423                }
29424                n.default.extendAliases({
29425                    cssunit: {
29426                        regex: "[+-]?[0-9]+\\.?([0-9]+)?(px|em|rem|ex|%|in|cm|mm|pt|pc)"
29427                    },
29428                    url: {
29429                        regex: "(https?|ftp)://.*",
29430                        autoUnmask: !1,
29431                        keepStatic: !1,
29432                        tabThrough: !0
29433                    },
29434                    ip: {
29435                        mask: "i[i[i]].j[j[j]].k[k[k]].l[l[l]]",
29436                        definitions: {
29437                            i: {
29438                                validator: l
29439                            },
29440                            j: {
29441                                validator: l
29442                            },
29443                            k: {
29444                                validator: l
29445                            },
29446                            l: {
29447                                validator: l
29448                            }
29449                        },
29450                        onUnMask: function(e, t, a) {
29451                            return e;
29452                        },
29453                        inputmode: "numeric"
29454                    },
29455                    email: {
29456                        mask: "*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",
29457                        greedy: !1,
29458                        casing: "lower",
29459                        onBeforePaste: function(e, t) {
29460                            return (e = e.toLowerCase()).replace("mailto:", "");
29461                        },
29462                        definitions: {
29463                            "*": {
29464                                validator: "[0-9\uff11-\uff19A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5!#$%&'*+/=?^_`{|}~-]"
29465                            },
29466                            "-": {
29467                                validator: "[0-9A-Za-z-]"
29468                            }
29469                        },
29470                        onUnMask: function(e, t, a) {
29471                            return e;
29472                        },
29473                        inputmode: "email"
29474                    },
29475                    mac: {
vendor: 40,451 bytes, lines 29476-30074
29476                        mask: "##:##:##:##:##:##"
29477                    },
29478                    vin: {
29479                        mask: "V{13}9{4}",
29480                        definitions: {
29481                            V: {
29482                                validator: "[A-HJ-NPR-Za-hj-npr-z\\d]",
29483                                casing: "upper"
29484                            }
29485                        },
29486                        clearIncomplete: !0,
29487                        autoUnmask: !0
29488                    },
29489                    ssn: {
29490                        mask: "999-99-9999",
29491                        postValidation: function(e, t, a, i, n, s, l) {
29492                            var u = o.getMaskTemplate.call(this, !0, r.getLastValidPosition.call(this), !0, !0);
29493                            return /^(?!219-09-9999|078-05-1120)(?!666|000|9.{2}).{3}-(?!00).{2}-(?!0{4}).{4}$/.test(u.join(""));
29494                        }
29495                    }
29496                });
29497            },
29498            207: function(e, t, a) {
29499                var i = s(a(2394)), n = s(a(4528)), r = s(a(7184)), o = a(8711);
29500                function s(e) {
29501                    return e && e.__esModule ? e : {
29502                        default: e
29503                    };
29504                }
29505                var l = i.default.dependencyLib;
29506                function u(e, t) {
29507                    for (var a = "", n = 0; n < e.length; n++) i.default.prototype.definitions[e.charAt(n)] || t.definitions[e.charAt(n)] || t.optionalmarker[0] === e.charAt(n) || t.optionalmarker[1] === e.charAt(n) || t.quantifiermarker[0] === e.charAt(n) || t.quantifiermarker[1] === e.charAt(n) || t.groupmarker[0] === e.charAt(n) || t.groupmarker[1] === e.charAt(n) || t.alternatormarker === e.charAt(n) ? a += "\\" + e.charAt(n) : a += e.charAt(n);
29508                    return a;
29509                }
29510                function c(e, t, a, i) {
29511                    if (e.length > 0 && t > 0 && (!a.digitsOptional || i)) {
29512                        var n = e.indexOf(a.radixPoint), r = !1;
29513                        a.negationSymbol.back === e[e.length - 1] && (r = !0, e.length--), -1 === n && (e.push(a.radixPoint), 
29514                        n = e.length - 1);
29515                        for (var o = 1; o <= t; o++) isFinite(e[n + o]) || (e[n + o] = "0");
29516                    }
29517                    return r && e.push(a.negationSymbol.back), e;
29518                }
29519                function f(e, t) {
29520                    var a = 0;
29521                    if ("+" === e) {
29522                        for (a in t.validPositions) ;
29523                        a = o.seekNext.call(this, parseInt(a));
29524                    }
29525                    for (var i in t.tests) if ((i = parseInt(i)) >= a) for (var n = 0, r = t.tests[i].length; n < r; n++) if ((void 0 === t.validPositions[i] || "-" === e) && t.tests[i][n].match.def === e) return i + (void 0 !== t.validPositions[i] && "-" !== e ? 1 : 0);
29526                    return a;
29527                }
29528                function d(e, t) {
29529                    var a = -1;
29530                    for (var i in t.validPositions) {
29531                        var n = t.validPositions[i];
29532                        if (n && n.match.def === e) {
29533                            a = parseInt(i);
29534                            break;
29535                        }
29536                    }
29537                    return a;
29538                }
29539                function p(e, t, a, i, n) {
29540                    var r = t.buffer ? t.buffer.indexOf(n.radixPoint) : -1, o = (-1 !== r || i && n.jitMasking) && new RegExp(n.definitions[9].validator).test(e);
29541                    return n._radixDance && -1 !== r && o && null == t.validPositions[r] ? {
29542                        insert: {
29543                            pos: r === a ? r + 1 : r,
29544                            c: n.radixPoint
29545                        },
29546                        pos: a
29547                    } : o;
29548                }
29549                i.default.extendAliases({
29550                    numeric: {
29551                        mask: function(e) {
29552                            e.repeat = 0, e.groupSeparator === e.radixPoint && e.digits && "0" !== e.digits && ("." === e.radixPoint ? e.groupSeparator = "," : "," === e.radixPoint ? e.groupSeparator = "." : e.groupSeparator = ""), 
29553                            " " === e.groupSeparator && (e.skipOptionalPartCharacter = void 0), e.placeholder.length > 1 && (e.placeholder = e.placeholder.charAt(0)), 
29554                            "radixFocus" === e.positionCaretOnClick && "" === e.placeholder && (e.positionCaretOnClick = "lvp");
29555                            var t = "0", a = e.radixPoint;
29556                            !0 === e.numericInput && void 0 === e.__financeInput ? (t = "1", e.positionCaretOnClick = "radixFocus" === e.positionCaretOnClick ? "lvp" : e.positionCaretOnClick, 
29557                            e.digitsOptional = !1, isNaN(e.digits) && (e.digits = 2), e._radixDance = !1, a = "," === e.radixPoint ? "?" : "!", 
29558                            "" !== e.radixPoint && void 0 === e.definitions[a] && (e.definitions[a] = {}, e.definitions[a].validator = "[" + e.radixPoint + "]", 
29559                            e.definitions[a].placeholder = e.radixPoint, e.definitions[a].static = !0, e.definitions[a].generated = !0)) : (e.__financeInput = !1, 
29560                            e.numericInput = !0);
29561                            var i, n = "[+]";
29562                            if (n += u(e.prefix, e), "" !== e.groupSeparator ? (void 0 === e.definitions[e.groupSeparator] && (e.definitions[e.groupSeparator] = {}, 
29563                            e.definitions[e.groupSeparator].validator = "[" + e.groupSeparator + "]", e.definitions[e.groupSeparator].placeholder = e.groupSeparator, 
29564                            e.definitions[e.groupSeparator].static = !0, e.definitions[e.groupSeparator].generated = !0), 
29565                            n += e._mask(e)) : n += "9{+}", void 0 !== e.digits && 0 !== e.digits) {
29566                                var o = e.digits.toString().split(",");
29567                                isFinite(o[0]) && o[1] && isFinite(o[1]) ? n += a + t + "{" + e.digits + "}" : (isNaN(e.digits) || parseInt(e.digits) > 0) && (e.digitsOptional || e.jitMasking ? (i = n + a + t + "{0," + e.digits + "}", 
29568                                e.keepStatic = !0) : n += a + t + "{" + e.digits + "}");
29569                            } else e.inputmode = "numeric";
29570                            return n += u(e.suffix, e), n += "[-]", i && (n = [ i + u(e.suffix, e) + "[-]", n ]), 
29571                            e.greedy = !1, function(e) {
29572                                void 0 === e.parseMinMaxOptions && (null !== e.min && (e.min = e.min.toString().replace(new RegExp((0, 
29573                                r.default)(e.groupSeparator), "g"), ""), "," === e.radixPoint && (e.min = e.min.replace(e.radixPoint, ".")), 
29574                                e.min = isFinite(e.min) ? parseFloat(e.min) : NaN, isNaN(e.min) && (e.min = Number.MIN_VALUE)), 
29575                                null !== e.max && (e.max = e.max.toString().replace(new RegExp((0, r.default)(e.groupSeparator), "g"), ""), 
29576                                "," === e.radixPoint && (e.max = e.max.replace(e.radixPoint, ".")), e.max = isFinite(e.max) ? parseFloat(e.max) : NaN, 
29577                                isNaN(e.max) && (e.max = Number.MAX_VALUE)), e.parseMinMaxOptions = "done");
29578                            }(e), n;
29579                        },
29580                        _mask: function(e) {
29581                            return "(" + e.groupSeparator + "999){+|1}";
29582                        },
29583                        digits: "*",
29584                        digitsOptional: !0,
29585                        enforceDigitsOnBlur: !1,
29586                        radixPoint: ".",
29587                        positionCaretOnClick: "radixFocus",
29588                        _radixDance: !0,
29589                        groupSeparator: "",
29590                        allowMinus: !0,
29591                        negationSymbol: {
29592                            front: "-",
29593                            back: ""
29594                        },
29595                        prefix: "",
29596                        suffix: "",
29597                        min: null,
29598                        max: null,
29599                        SetMaxOnOverflow: !1,
29600                        step: 1,
29601                        inputType: "text",
29602                        unmaskAsNumber: !1,
29603                        roundingFN: Math.round,
29604                        inputmode: "decimal",
29605                        shortcuts: {
29606                            k: "000",
29607                            m: "000000"
29608                        },
29609                        placeholder: "0",
29610                        greedy: !1,
29611                        rightAlign: !0,
29612                        insertMode: !0,
29613                        autoUnmask: !1,
29614                        skipOptionalPartCharacter: "",
29615                        usePrototypeDefinitions: !1,
29616                        definitions: {
29617                            0: {
29618                                validator: p
29619                            },
29620                            1: {
29621                                validator: p,
29622                                definitionSymbol: "9"
29623                            },
29624                            9: {
29625                                validator: "[0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]",
29626                                definitionSymbol: "*"
29627                            },
29628                            "+": {
29629                                validator: function(e, t, a, i, n) {
29630                                    return n.allowMinus && ("-" === e || e === n.negationSymbol.front);
29631                                }
29632                            },
29633                            "-": {
29634                                validator: function(e, t, a, i, n) {
29635                                    return n.allowMinus && e === n.negationSymbol.back;
29636                                }
29637                            }
29638                        },
29639                        preValidation: function(e, t, a, i, n, r, o, s) {
29640                            var l;
29641                            if (!1 !== n.__financeInput && a === n.radixPoint) return !1;
29642                            if (l = n.shortcuts && n.shortcuts[a]) {
29643                                if (l.length > 1) for (var u = [], c = 0; c < l.length; c++) u.push({
29644                                    pos: t + c,
29645                                    c: l[c],
29646                                    strict: !1
29647                                });
29648                                return {
29649                                    insert: u
29650                                };
29651                            }
29652                            var p = e.indexOf(n.radixPoint), h = t;
29653                            if (t = function(e, t, a, i, n) {
29654                                return n._radixDance && n.numericInput && t !== n.negationSymbol.back && e <= a && (a > 0 || t == n.radixPoint) && (void 0 === i.validPositions[e - 1] || i.validPositions[e - 1].input !== n.negationSymbol.back) && (e -= 1), 
29655                                e;
29656                            }(t, a, p, r, n), "-" === a || a === n.negationSymbol.front) {
29657                                if (!0 !== n.allowMinus) return !1;
29658                                var v = !1, m = d("+", r), g = d("-", r);
29659                                return -1 !== m && (v = [ m, g ]), !1 !== v ? {
29660                                    remove: v,
29661                                    caret: h - n.negationSymbol.back.length
29662                                } : {
29663                                    insert: [ {
29664                                        pos: f.call(this, "+", r),
29665                                        c: n.negationSymbol.front,
29666                                        fromIsValid: !0
29667                                    }, {
29668                                        pos: f.call(this, "-", r),
29669                                        c: n.negationSymbol.back,
29670                                        fromIsValid: void 0
29671                                    } ],
29672                                    caret: h + n.negationSymbol.back.length
29673                                };
29674                            }
29675                            if (a === n.groupSeparator) return {
29676                                caret: h
29677                            };
29678                            if (s) return !0;
29679                            if (-1 !== p && !0 === n._radixDance && !1 === i && a === n.radixPoint && void 0 !== n.digits && (isNaN(n.digits) || parseInt(n.digits) > 0) && p !== t) return {
29680                                caret: n._radixDance && t === p - 1 ? p + 1 : p
29681                            };
29682                            if (!1 === n.__financeInput) if (i) {
29683                                if (n.digitsOptional) return {
29684                                    rewritePosition: o.end
29685                                };
29686                                if (!n.digitsOptional) {
29687                                    if (o.begin > p && o.end <= p) return a === n.radixPoint ? {
29688                                        insert: {
29689                                            pos: p + 1,
29690                                            c: "0",
29691                                            fromIsValid: !0
29692                                        },
29693                                        rewritePosition: p
29694                                    } : {
29695                                        rewritePosition: p + 1
29696                                    };
29697                                    if (o.begin < p) return {
29698                                        rewritePosition: o.begin - 1
29699                                    };
29700                                }
29701                            } else if (!n.showMaskOnHover && !n.showMaskOnFocus && !n.digitsOptional && n.digits > 0 && "" === this.__valueGet.call(this.el)) return {
29702                                rewritePosition: p
29703                            };
29704                            return {
29705                                rewritePosition: t
29706                            };
29707                        },
29708                        postValidation: function(e, t, a, i, n, r, o) {
29709                            if (!1 === i) return i;
29710                            if (o) return !0;
29711                            if (null !== n.min || null !== n.max) {
29712                                var s = n.onUnMask(e.slice().reverse().join(""), void 0, l.extend({}, n, {
29713                                    unmaskAsNumber: !0
29714                                }));
29715                                if (null !== n.min && s < n.min && (s.toString().length > n.min.toString().length || s < 0)) return !1;
29716                                if (null !== n.max && s > n.max) return !!n.SetMaxOnOverflow && {
29717                                    refreshFromBuffer: !0,
29718                                    buffer: c(n.max.toString().replace(".", n.radixPoint).split(""), n.digits, n).reverse()
29719                                };
29720                            }
29721                            return i;
29722                        },
29723                        onUnMask: function(e, t, a) {
29724                            if ("" === t && !0 === a.nullable) return t;
29725                            var i = e.replace(a.prefix, "");
29726                            return i = (i = i.replace(a.suffix, "")).replace(new RegExp((0, r.default)(a.groupSeparator), "g"), ""), 
29727                            "" !== a.placeholder.charAt(0) && (i = i.replace(new RegExp(a.placeholder.charAt(0), "g"), "0")), 
29728                            a.unmaskAsNumber ? ("" !== a.radixPoint && -1 !== i.indexOf(a.radixPoint) && (i = i.replace(r.default.call(this, a.radixPoint), ".")), 
29729                            i = (i = i.replace(new RegExp("^" + (0, r.default)(a.negationSymbol.front)), "-")).replace(new RegExp((0, 
29730                            r.default)(a.negationSymbol.back) + "$"), ""), Number(i)) : i;
29731                        },
29732                        isComplete: function(e, t) {
29733                            var a = (t.numericInput ? e.slice().reverse() : e).join("");
29734                            return a = (a = (a = (a = (a = a.replace(new RegExp("^" + (0, r.default)(t.negationSymbol.front)), "-")).replace(new RegExp((0, 
29735                            r.default)(t.negationSymbol.back) + "$"), "")).replace(t.prefix, "")).replace(t.suffix, "")).replace(new RegExp((0, 
29736                            r.default)(t.groupSeparator) + "([0-9]{3})", "g"), "$1"), "," === t.radixPoint && (a = a.replace((0, 
29737                            r.default)(t.radixPoint), ".")), isFinite(a);
29738                        },
29739                        onBeforeMask: function(e, t) {
29740                            var a = t.radixPoint || ",";
29741                            isFinite(t.digits) && (t.digits = parseInt(t.digits)), "number" != typeof e && "number" !== t.inputType || "" === a || (e = e.toString().replace(".", a));
29742                            var i = "-" === e.charAt(0) || e.charAt(0) === t.negationSymbol.front, n = e.split(a), o = n[0].replace(/[^\-0-9]/g, ""), s = n.length > 1 ? n[1].replace(/[^0-9]/g, "") : "", l = n.length > 1;
29743                            e = o + ("" !== s ? a + s : s);
29744                            var u = 0;
29745                            if ("" !== a && (u = t.digitsOptional ? t.digits < s.length ? t.digits : s.length : t.digits, 
29746                            "" !== s || !t.digitsOptional)) {
29747                                var f = Math.pow(10, u || 1);
29748                                e = e.replace((0, r.default)(a), "."), isNaN(parseFloat(e)) || (e = (t.roundingFN(parseFloat(e) * f) / f).toFixed(u)), 
29749                                e = e.toString().replace(".", a);
29750                            }
29751                            if (0 === t.digits && -1 !== e.indexOf(a) && (e = e.substring(0, e.indexOf(a))), 
29752                            null !== t.min || null !== t.max) {
29753                                var d = e.toString().replace(a, ".");
29754                                null !== t.min && d < t.min ? e = t.min.toString().replace(".", a) : null !== t.max && d > t.max && (e = t.max.toString().replace(".", a));
29755                            }
29756                            return i && "-" !== e.charAt(0) && (e = "-" + e), c(e.toString().split(""), u, t, l).join("");
29757                        },
29758                        onBeforeWrite: function(e, t, a, i) {
29759                            function n(e, t) {
29760                                if (!1 !== i.__financeInput || t) {
29761                                    var a = e.indexOf(i.radixPoint);
29762                                    -1 !== a && e.splice(a, 1);
29763                                }
29764                                if ("" !== i.groupSeparator) for (;-1 !== (a = e.indexOf(i.groupSeparator)); ) e.splice(a, 1);
29765                                return e;
29766                            }
29767                            var o, s = function(e, t) {
29768                                var a = new RegExp("(^" + ("" !== t.negationSymbol.front ? (0, r.default)(t.negationSymbol.front) + "?" : "") + (0, 
29769                                r.default)(t.prefix) + ")(.*)(" + (0, r.default)(t.suffix) + ("" != t.negationSymbol.back ? (0, 
29770                                r.default)(t.negationSymbol.back) + "?" : "") + "$)").exec(e.slice().reverse().join("")), i = a ? a[2] : "", n = !1;
29771                                return i && (i = i.split(t.radixPoint.charAt(0))[0], n = new RegExp("^[0" + t.groupSeparator + "]*").exec(i)), 
29772                                !(!n || !(n[0].length > 1 || n[0].length > 0 && n[0].length < i.length)) && n;
29773                            }(t, i);
29774                            if (s) for (var u = t.join("").lastIndexOf(s[0].split("").reverse().join("")) - (s[0] == s.input ? 0 : 1), f = s[0] == s.input ? 1 : 0, d = s[0].length - f; d > 0; d--) delete this.maskset.validPositions[u + d], 
29775                            delete t[u + d];
29776                            if (e) switch (e.type) {
29777                              case "blur":
29778                              case "checkval":
29779                                if (null !== i.min) {
29780                                    var p = i.onUnMask(t.slice().reverse().join(""), void 0, l.extend({}, i, {
29781                                        unmaskAsNumber: !0
29782                                    }));
29783                                    if (null !== i.min && p < i.min) return {
29784                                        refreshFromBuffer: !0,
29785                                        buffer: c(i.min.toString().replace(".", i.radixPoint).split(""), i.digits, i).reverse()
29786                                    };
29787                                }
29788                                if (t[t.length - 1] === i.negationSymbol.front) {
29789                                    var h = new RegExp("(^" + ("" != i.negationSymbol.front ? (0, r.default)(i.negationSymbol.front) + "?" : "") + (0, 
29790                                    r.default)(i.prefix) + ")(.*)(" + (0, r.default)(i.suffix) + ("" != i.negationSymbol.back ? (0, 
29791                                    r.default)(i.negationSymbol.back) + "?" : "") + "$)").exec(n(t.slice(), !0).reverse().join(""));
29792                                    0 == (h ? h[2] : "") && (o = {
29793                                        refreshFromBuffer: !0,
29794                                        buffer: [ 0 ]
29795                                    });
29796                                } else "" !== i.radixPoint && t[0] === i.radixPoint && (o && o.buffer ? o.buffer.shift() : (t.shift(), 
29797                                o = {
29798                                    refreshFromBuffer: !0,
29799                                    buffer: n(t)
29800                                }));
29801                                if (i.enforceDigitsOnBlur) {
29802                                    var v = (o = o || {}) && o.buffer || t.slice().reverse();
29803                                    o.refreshFromBuffer = !0, o.buffer = c(v, i.digits, i, !0).reverse();
29804                                }
29805                            }
29806                            return o;
29807                        },
29808                        onKeyDown: function(e, t, a, i) {
29809                            var r, o = l(this);
29810                            if (e.ctrlKey) switch (e.keyCode) {
29811                              case n.default.UP:
29812                                return this.inputmask.__valueSet.call(this, parseFloat(this.inputmask.unmaskedvalue()) + parseInt(i.step)), 
29813                                o.trigger("setvalue"), !1;
29814
29815                              case n.default.DOWN:
29816                                return this.inputmask.__valueSet.call(this, parseFloat(this.inputmask.unmaskedvalue()) - parseInt(i.step)), 
29817                                o.trigger("setvalue"), !1;
29818                            }
29819                            if (!e.shiftKey && (e.keyCode === n.default.DELETE || e.keyCode === n.default.BACKSPACE || e.keyCode === n.default.BACKSPACE_SAFARI) && a.begin !== t.length) {
29820                                if (t[e.keyCode === n.default.DELETE ? a.begin - 1 : a.end] === i.negationSymbol.front) return r = t.slice().reverse(), 
29821                                "" !== i.negationSymbol.front && r.shift(), "" !== i.negationSymbol.back && r.pop(), 
29822                                o.trigger("setvalue", [ r.join(""), a.begin ]), !1;
29823                                if (!0 === i._radixDance) {
29824                                    var s = t.indexOf(i.radixPoint);
29825                                    if (i.digitsOptional) {
29826                                        if (0 === s) return (r = t.slice().reverse()).pop(), o.trigger("setvalue", [ r.join(""), a.begin >= r.length ? r.length : a.begin ]), 
29827                                        !1;
29828                                    } else if (-1 !== s && (a.begin < s || a.end < s || e.keyCode === n.default.DELETE && a.begin === s)) return a.begin !== a.end || e.keyCode !== n.default.BACKSPACE && e.keyCode !== n.default.BACKSPACE_SAFARI || a.begin++, 
29829                                    (r = t.slice().reverse()).splice(r.length - a.begin, a.begin - a.end + 1), r = c(r, i.digits, i).join(""), 
29830                                    o.trigger("setvalue", [ r, a.begin >= r.length ? s + 1 : a.begin ]), !1;
29831                                }
29832                            }
29833                        }
29834                    },
29835                    currency: {
29836                        prefix: "",
29837                        groupSeparator: ",",
29838                        alias: "numeric",
29839                        digits: 2,
29840                        digitsOptional: !1
29841                    },
29842                    decimal: {
29843                        alias: "numeric"
29844                    },
29845                    integer: {
29846                        alias: "numeric",
29847                        inputmode: "numeric",
29848                        digits: 0
29849                    },
29850                    percentage: {
29851                        alias: "numeric",
29852                        min: 0,
29853                        max: 100,
29854                        suffix: " %",
29855                        digits: 0,
29856                        allowMinus: !1
29857                    },
29858                    indianns: {
29859                        alias: "numeric",
29860                        _mask: function(e) {
29861                            return "(" + e.groupSeparator + "99){*|1}(" + e.groupSeparator + "999){1|1}";
29862                        },
29863                        groupSeparator: ",",
29864                        radixPoint: ".",
29865                        placeholder: "0",
29866                        digits: 2,
29867                        digitsOptional: !1
29868                    }
29869                });
29870            },
29871            9380: function(e, t, a) {
29872                var i;
29873                Object.defineProperty(t, "__esModule", {
29874                    value: !0
29875                }), t.default = void 0;
29876                var n = ((i = a(8741)) && i.__esModule ? i : {
29877                    default: i
29878                }).default ? window : {};
29879                t.default = n;
29880            },
29881            7760: function(e, t, a) {
29882                Object.defineProperty(t, "__esModule", {
29883                    value: !0
29884                }), t.applyInputValue = c, t.clearOptionalTail = f, t.checkVal = d, t.HandleNativePlaceholder = function(e, t) {
29885                    var a = e ? e.inputmask : this;
29886                    if (l.ie) {
29887                        if (e.inputmask._valueGet() !== t && (e.placeholder !== t || "" === e.placeholder)) {
29888                            var i = o.getBuffer.call(a).slice(), n = e.inputmask._valueGet();
29889                            if (n !== t) {
29890                                var r = o.getLastValidPosition.call(a);
29891                                -1 === r && n === o.getBufferTemplate.call(a).join("") ? i = [] : -1 !== r && f.call(a, i), 
29892                                p(e, i);
29893                            }
29894                        }
29895                    } else e.placeholder !== t && (e.placeholder = t, "" === e.placeholder && e.removeAttribute("placeholder"));
29896                }, t.unmaskedvalue = function(e) {
29897                    var t = e ? e.inputmask : this, a = t.opts, i = t.maskset;
29898                    if (e) {
29899                        if (void 0 === e.inputmask) return e.value;
29900                        e.inputmask && e.inputmask.refreshValue && c(e, e.inputmask._valueGet(!0));
29901                    }
29902                    var n = [], r = i.validPositions;
29903                    for (var s in r) r[s] && r[s].match && (1 != r[s].match.static || Array.isArray(i.metadata) && !0 !== r[s].generatedInput) && n.push(r[s].input);
29904                    var l = 0 === n.length ? "" : (t.isRTL ? n.reverse() : n).join("");
29905                    if ("function" == typeof a.onUnMask) {
29906                        var u = (t.isRTL ? o.getBuffer.call(t).slice().reverse() : o.getBuffer.call(t)).join("");
29907                        l = a.onUnMask.call(t, u, l, a);
29908                    }
29909                    return l;
29910                }, t.writeBuffer = p;
29911                var i, n = (i = a(4528)) && i.__esModule ? i : {
29912                    default: i
29913                }, r = a(4713), o = a(8711), s = a(7215), l = a(9845), u = a(6030);
29914                function c(e, t) {
29915                    var a = e ? e.inputmask : this, i = a.opts;
29916                    e.inputmask.refreshValue = !1, "function" == typeof i.onBeforeMask && (t = i.onBeforeMask.call(a, t, i) || t), 
29917                    d(e, !0, !1, t = t.toString().split("")), a.undoValue = a._valueGet(!0), (i.clearMaskOnLostFocus || i.clearIncomplete) && e.inputmask._valueGet() === o.getBufferTemplate.call(a).join("") && -1 === o.getLastValidPosition.call(a) && e.inputmask._valueSet("");
29918                }
29919                function f(e) {
29920                    e.length = 0;
29921                    for (var t, a = r.getMaskTemplate.call(this, !0, 0, !0, void 0, !0); void 0 !== (t = a.shift()); ) e.push(t);
29922                    return e;
29923                }
29924                function d(e, t, a, i, n) {
29925                    var l = e ? e.inputmask : this, c = l.maskset, f = l.opts, d = l.dependencyLib, h = i.slice(), v = "", m = -1, g = void 0, k = f.skipOptionalPartCharacter;
29926                    f.skipOptionalPartCharacter = "", o.resetMaskSet.call(l), c.tests = {}, m = f.radixPoint ? o.determineNewCaretPosition.call(l, {
29927                        begin: 0,
29928                        end: 0
29929                    }, !1, !1 === f.__financeInput ? "radixFocus" : void 0).begin : 0, c.p = m, l.caretPos = {
29930                        begin: m
29931                    };
29932                    var y = [], b = l.caretPos;
29933                    if (h.forEach((function(e, t) {
29934                        if (void 0 !== e) {
29935                            var i = new d.Event("_checkval");
29936                            i.which = e.toString().charCodeAt(0), v += e;
29937                            var n = o.getLastValidPosition.call(l, void 0, !0);
29938                            !function(e, t) {
29939                                for (var a = r.getMaskTemplate.call(l, !0, 0).slice(e, o.seekNext.call(l, e, !1, !1)).join("").replace(/'/g, ""), i = a.indexOf(t); i > 0 && " " === a[i - 1]; ) i--;
29940                                var n = 0 === i && !o.isMask.call(l, e) && (r.getTest.call(l, e).match.nativeDef === t.charAt(0) || !0 === r.getTest.call(l, e).match.static && r.getTest.call(l, e).match.nativeDef === "'" + t.charAt(0) || " " === r.getTest.call(l, e).match.nativeDef && (r.getTest.call(l, e + 1).match.nativeDef === t.charAt(0) || !0 === r.getTest.call(l, e + 1).match.static && r.getTest.call(l, e + 1).match.nativeDef === "'" + t.charAt(0)));
29941                                if (!n && i > 0 && !o.isMask.call(l, e, !1, !0)) {
29942                                    var s = o.seekNext.call(l, e);
29943                                    l.caretPos.begin < s && (l.caretPos = {
29944                                        begin: s
29945                                    });
29946                                }
29947                                return n;
29948                            }(m, v) ? (g = u.EventHandlers.keypressEvent.call(l, i, !0, !1, a, l.caretPos.begin)) && (m = l.caretPos.begin + 1, 
29949                            v = "") : g = u.EventHandlers.keypressEvent.call(l, i, !0, !1, a, n + 1), g ? (void 0 !== g.pos && c.validPositions[g.pos] && !0 === c.validPositions[g.pos].match.static && void 0 === c.validPositions[g.pos].alternation && (y.push(g.pos), 
29950                            l.isRTL || (g.forwardPosition = g.pos + 1)), p.call(l, void 0, o.getBuffer.call(l), g.forwardPosition, i, !1), 
29951                            l.caretPos = {
29952                                begin: g.forwardPosition,
29953                                end: g.forwardPosition
29954                            }, b = l.caretPos) : void 0 === c.validPositions[t] && h[t] === r.getPlaceholder.call(l, t) && o.isMask.call(l, t, !0) ? l.caretPos.begin++ : l.caretPos = b;
29955                        }
29956                    })), y.length > 0) {
29957                        var x, P, E = o.seekNext.call(l, -1, void 0, !1);
29958                        if (!s.isComplete.call(l, o.getBuffer.call(l)) && y.length <= E || s.isComplete.call(l, o.getBuffer.call(l)) && y.length > 0 && y.length !== E && 0 === y[0]) for (var S = E; void 0 !== (x = y.shift()); ) {
29959                            var _ = new d.Event("_checkval");
29960                            if ((P = c.validPositions[x]).generatedInput = !0, _.which = P.input.charCodeAt(0), 
29961                            (g = u.EventHandlers.keypressEvent.call(l, _, !0, !1, a, S)) && void 0 !== g.pos && g.pos !== x && c.validPositions[g.pos] && !0 === c.validPositions[g.pos].match.static) y.push(g.pos); else if (!g) break;
29962                            S++;
29963                        }
29964                    }
29965                    t && p.call(l, e, o.getBuffer.call(l), g ? g.forwardPosition : l.caretPos.begin, n || new d.Event("checkval"), n && "input" === n.type && l.undoValue !== l._valueGet(!0)), 
29966                    f.skipOptionalPartCharacter = k;
29967                }
29968                function p(e, t, a, i, r) {
29969                    var l = e ? e.inputmask : this, u = l.opts, c = l.dependencyLib;
29970                    if (i && "function" == typeof u.onBeforeWrite) {
29971                        var f = u.onBeforeWrite.call(l, i, t, a, u);
29972                        if (f) {
29973                            if (f.refreshFromBuffer) {
29974                                var d = f.refreshFromBuffer;
29975                                s.refreshFromBuffer.call(l, !0 === d ? d : d.start, d.end, f.buffer || t), t = o.getBuffer.call(l, !0);
29976                            }
29977                            void 0 !== a && (a = void 0 !== f.caret ? f.caret : a);
29978                        }
29979                    }
29980                    if (void 0 !== e && (e.inputmask._valueSet(t.join("")), void 0 === a || void 0 !== i && "blur" === i.type || o.caret.call(l, e, a, void 0, void 0, void 0 !== i && "keydown" === i.type && (i.keyCode === n.default.DELETE || i.keyCode === n.default.BACKSPACE)), 
29981                    !0 === r)) {
29982                        var p = c(e), h = e.inputmask._valueGet();
29983                        e.inputmask.skipInputEvent = !0, p.trigger("input"), setTimeout((function() {
29984                            h === o.getBufferTemplate.call(l).join("") ? p.trigger("cleared") : !0 === s.isComplete.call(l, t) && p.trigger("complete");
29985                        }), 0);
29986                    }
29987                }
29988            },
29989            2394: function(e, t, a) {
29990                Object.defineProperty(t, "__esModule", {
29991                    value: !0
29992                }), t.default = void 0, a(7149), a(3194);
29993                var i = a(157), n = m(a(4963)), r = m(a(9380)), o = a(2391), s = a(4713), l = a(8711), u = a(7215), c = a(7760), f = a(9716), d = m(a(7392)), p = m(a(3976)), h = m(a(8741));
29994                function v(e) {
29995                    return (v = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
29996                        return typeof e;
29997                    } : function(e) {
29998                        return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
29999                    })(e);
30000                }
30001                function m(e) {
30002                    return e && e.__esModule ? e : {
30003                        default: e
30004                    };
30005                }
30006                var g = r.default.document, k = "_inputmask_opts";
30007                function y(e, t, a) {
30008                    if (h.default) {
30009                        if (!(this instanceof y)) return new y(e, t, a);
30010                        this.dependencyLib = n.default, this.el = void 0, this.events = {}, this.maskset = void 0, 
30011                        !0 !== a && ("[object Object]" === Object.prototype.toString.call(e) ? t = e : (t = t || {}, 
30012                        e && (t.alias = e)), this.opts = n.default.extend(!0, {}, this.defaults, t), this.noMasksCache = t && void 0 !== t.definitions, 
30013                        this.userOptions = t || {}, b(this.opts.alias, t, this.opts)), this.refreshValue = !1, 
30014                        this.undoValue = void 0, this.$el = void 0, this.skipKeyPressEvent = !1, this.skipInputEvent = !1, 
30015                        this.validationEvent = !1, this.ignorable = !1, this.maxLength, this.mouseEnter = !1, 
30016                        this.originalPlaceholder = void 0, this.isComposing = !1;
30017                    }
30018                }
30019                function b(e, t, a) {
30020                    var i = y.prototype.aliases[e];
30021                    return i ? (i.alias && b(i.alias, void 0, a), n.default.extend(!0, a, i), n.default.extend(!0, a, t), 
30022                    !0) : (null === a.mask && (a.mask = e), !1);
30023                }
30024                y.prototype = {
30025                    dataAttribute: "data-inputmask",
30026                    defaults: p.default,
30027                    definitions: d.default,
30028                    aliases: {},
30029                    masksCache: {},
30030                    get isRTL() {
30031                        return this.opts.isRTL || this.opts.numericInput;
30032                    },
30033                    mask: function(e) {
30034                        var t = this;
30035                        return "string" == typeof e && (e = g.getElementById(e) || g.querySelectorAll(e)), 
30036                        (e = e.nodeName ? [ e ] : Array.isArray(e) ? e : Array.from(e)).forEach((function(e, a) {
30037                            var s = n.default.extend(!0, {}, t.opts);
30038                            if (function(e, t, a, i) {
30039                                function o(t, n) {
30040                                    var o = "" === i ? t : i + "-" + t;
30041                                    null !== (n = void 0 !== n ? n : e.getAttribute(o)) && ("string" == typeof n && (0 === t.indexOf("on") ? n = r.default[n] : "false" === n ? n = !1 : "true" === n && (n = !0)), 
30042                                    a[t] = n);
30043                                }
30044                                if (!0 === t.importDataAttributes) {
30045                                    var s, l, u, c, f = e.getAttribute(i);
30046                                    if (f && "" !== f && (f = f.replace(/'/g, '"'), l = JSON.parse("{" + f + "}")), 
30047                                    l) for (c in u = void 0, l) if ("alias" === c.toLowerCase()) {
30048                                        u = l[c];
30049                                        break;
30050                                    }
30051                                    for (s in o("alias", u), a.alias && b(a.alias, a, t), t) {
30052                                        if (l) for (c in u = void 0, l) if (c.toLowerCase() === s.toLowerCase()) {
30053                                            u = l[c];
30054                                            break;
30055                                        }
30056                                        o(s, u);
30057                                    }
30058                                }
30059                                n.default.extend(!0, t, a), ("rtl" === e.dir || t.rightAlign) && (e.style.textAlign = "right");
30060                                ("rtl" === e.dir || t.numericInput) && (e.dir = "ltr", e.removeAttribute("dir"), 
30061                                t.isRTL = !0);
30062                                return Object.keys(a).length;
30063                            }(e, s, n.default.extend(!0, {}, t.userOptions), t.dataAttribute)) {
30064                                var l = (0, o.generateMaskSet)(s, t.noMasksCache);
30065                                void 0 !== l && (void 0 !== e.inputmask && (e.inputmask.opts.autoUnmask = !0, e.inputmask.remove()), 
30066                                e.inputmask = new y(void 0, void 0, !0), e.inputmask.opts = s, e.inputmask.noMasksCache = t.noMasksCache, 
30067                                e.inputmask.userOptions = n.default.extend(!0, {}, t.userOptions), e.inputmask.el = e, 
30068                                e.inputmask.$el = (0, n.default)(e), e.inputmask.maskset = l, n.default.data(e, k, t.userOptions), 
30069                                i.mask.call(e.inputmask));
30070                            }
30071                        })), e && e[0] && e[0].inputmask || this;
30072                    },
30073                    option: function(e, t) {
30074                        return "string" == typeof e ? this.opts[e] : "object" === v
30074(e) ? (n.default.extend(this.userOptions, e), 
30075                        this.el && !0 !== t && this.mask(this.el), this) : void 0;
30076                    },
30077                    unmaskedvalue: function(e) {
30078                        if (this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache), 
30079                        void 0 === this.el || void 0 !== e) {
30080                            var t = ("function" == typeof this.opts.onBeforeMask && this.opts.onBeforeMask.call(this, e, this.opts) || e).split("");
30081                            c.checkVal.call(this, void 0, !1, !1, t), "function" == typeof this.opts.onBeforeWrite && this.opts.onBeforeWrite.call(this, void 0, l.getBuffer.call(this), 0, this.opts);
30082                        }
30083                        return c.unmaskedvalue.call(this, this.el);
30084                    },
30085                    remove: function() {
30086                        if (this.el) {
30087                            n.default.data(this.el, k, null);
30088                            var e = this.opts.autoUnmask ? (0, c.unmaskedvalue)(this.el) : this._valueGet(this.opts.autoUnmask);
30089                            e !== l.getBufferTemplate.call(this).join("") ? this._valueSet(e, this.opts.autoUnmask) : this._valueSet(""), 
30090                            f.EventRuler.off(this.el), Object.getOwnPropertyDescriptor && Object.getPrototypeOf ? Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.el), "value") && this.__valueGet && Object.defineProperty(this.el, "value", {
30091                                get: this.__valueGet,
30092                                set: this.__valueSet,
30093                                configurable: !0
30094                            }) : g.__lookupGetter__ && this.el.__lookupGetter__("value") && this.__valueGet && (this.el.__defineGetter__("value", this.__valueGet), 
30095                            this.el.__defineSetter__("value", this.__valueSet)), this.el.inputmask = void 0;
30096                        }
30097                        return this.el;
30098                    },
30099                    getemptymask: function() {
30100                        return this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache), 
30101                        l.getBufferTemplate.call(this).join("");
30102                    },
30103                    hasMaskedValue: function() {
30104                        return !this.opts.autoUnmask;
30105                    },
30106                    isComplete: function() {
30107                        return this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache), 
30108                        u.isComplete.call(this, l.getBuffer.call(this));
30109                    },
30110                    getmetadata: function() {
30111                        if (this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache), 
30112                        Array.isArray(this.maskset.metadata)) {
30113                            var e = s.getMaskTemplate.call(this, !0, 0, !1).join("");
30114                            return this.maskset.metadata.forEach((function(t) {
30115                                return t.mask !== e || (e = t, !1);
30116                            })), e;
30117                        }
30118                        return this.maskset.metadata;
30119                    },
30120                    isValid: function(e) {
30121                        if (this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache), 
30122                        e) {
30123                            var t = ("function" == typeof this.opts.onBeforeMask && this.opts.onBeforeMask.call(this, e, this.opts) || e).split("");
30124                            c.checkVal.call(this, void 0, !0, !1, t);
30125                        } else e = this.isRTL ? l.getBuffer.call(this).slice().reverse().join("") : l.getBuffer.call(this).join("");
30126                        for (var a = l.getBuffer.call(this), i = l.determineLastRequiredPosition.call(this), n = a.length - 1; n > i && !l.isMask.call(this, n); n--) ;
30127                        return a.splice(i, n + 1 - i), u.isComplete.call(this, a) && e === (this.isRTL ? l.getBuffer.call(this).slice().reverse().join("") : l.getBuffer.call(this).join(""));
30128                    },
30129                    format: function(e, t) {
30130                        this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache);
30131                        var a = ("function" == typeof this.opts.onBeforeMask && this.opts.onBeforeMask.call(this, e, this.opts) || e).split("");
30132                        c.checkVal.call(this, void 0, !0, !1, a);
30133                        var i = this.isRTL ? l.getBuffer.call(this).slice().reverse().join("") : l.getBuffer.call(this).join("");
30134                        return t ? {
30135                            value: i,
30136                            metadata: this.getmetadata()
30137                        } : i;
30138                    },
30139                    setValue: function(e) {
30140                        this.el && (0, n.default)(this.el).trigger("setvalue", [ e ]);
30141                    },
30142                    analyseMask: o.analyseMask
30143                }, y.extendDefaults = function(e) {
30144                    n.default.extend(!0, y.prototype.defaults, e);
30145                }, y.extendDefinitions = function(e) {
30146                    n.default.extend(!0, y.prototype.definitions, e);
30147                }, y.extendAliases = function(e) {
30148                    n.default.extend(!0, y.prototype.aliases, e);
30149                }, y.format = function(e, t, a) {
30150                    return y(t).format(e, a);
30151                }, y.unmask = function(e, t) {
30152                    return y(t).unmaskedvalue(e);
30153                }, y.isValid = function(e, t) {
30154                    return y(t).isValid(e);
30155                }, y.remove = function(e) {
30156                    "string" == typeof e && (e = g.getElementById(e) || g.querySelectorAll(e)), (e = e.nodeName ? [ e ] : e).forEach((function(e) {
30157                        e.inputmask && e.inputmask.remove();
30158                    }));
30159                }, y.setValue = function(e, t) {
30160                    "string" == typeof e && (e = g.getElementById(e) || g.querySelectorAll(e)), (e = e.nodeName ? [ e ] : e).forEach((function(e) {
30161                        e.inputmask ? e.inputmask.setValue(t) : (0, n.default)(e).trigger("setvalue", [ t ]);
30162                    }));
30163                }, y.dependencyLib = n.default, r.default.Inputmask = y;
30164                var x = y;
30165                t.default = x;
30166            },
30167            5296: function(e, t, a) {
30168                function i(e) {
30169                    return (i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
30170                        return typeof e;
30171                    } : function(e) {
30172                        return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
30173                    })(e);
30174                }
30175                var n = p(a(9380)), r = p(a(2394)), o = p(a(8741));
30176                function s(e, t) {
30177                    return !t || "object" !== i(t) && "function" != typeof t ? function(e) {
30178                        if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
30179                        return e;
30180                    }(e) : t;
30181                }
30182                function l(e) {
30183                    var t = "function" == typeof Map ? new Map : void 0;
30184                    return (l = function(e) {
30185                        if (null === e || (a = e, -1 === Function.toString.call(a).indexOf("[native code]"))) return e;
30186                        var a;
30187                        if ("function" != typeof e) throw new TypeError("Super expression must either be null or a function");
30188                        if (void 0 !== t) {
30189                            if (t.has(e)) return t.get(e);
30190                            t.set(e, i);
30191                        }
30192                        function i() {
30193                            return u(e, arguments, d(this).constructor);
30194                        }
30195                        return i.prototype = Object.create(e.prototype, {
30196                            constructor: {
30197                                value: i,
30198                                enumerable: !1,
30199                                writable: !0,
30200                                configurable: !0
30201                            }
30202                        }), f(i, e);
30203                    })(e);
30204                }
30205                function u(e, t, a) {
30206                    return (u = c() ? Reflect.construct : function(e, t, a) {
30207                        var i = [ null ];
30208                        i.push.apply(i, t);
30209                        var n = new (Function.bind.apply(e, i));
30210                        return a && f(n, a.prototype), n;
30211                    }).apply(null, arguments);
30212                }
30213                function c() {
30214                    if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
30215                    if (Reflect.construct.sham) return !1;
30216                    if ("function" == typeof Proxy) return !0;
30217                    try {
30218                        return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {}))), 
30219                        !0;
30220                    } catch (e) {
30221                        return !1;
30222                    }
30223                }
30224                function f(e, t) {
30225                    return (f = Object.setPrototypeOf || function(e, t) {
30226                        return e.__proto__ = t, e;
30227                    })(e, t);
30228                }
30229                function d(e) {
30230                    return (d = Object.setPrototypeOf ? Object.getPrototypeOf : function(e) {
30231                        return e.__proto__ || Object.getPrototypeOf(e);
30232                    })(e);
30233                }
30234                function p(e) {
30235                    return e && e.__esModule ? e : {
30236                        default: e
30237                    };
30238                }
30239                var h = n.default.document;
30240                if (o.default && h && h.head && h.head.attachShadow && n.default.customElements && void 0 === n.default.customElements.get("input-mask")) {
30241                    var v = function(e) {
30242                        !function(e, t) {
30243                            if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
30244                            e.prototype = Object.create(t && t.prototype, {
30245                                constructor: {
30246                                    value: e,
30247                                    writable: !0,
30248                                    configurable: !0
30249                                }
30250                            }), t && f(e, t);
30251                        }(n, e);
30252                        var t, a, i = (t = n, a = c(), function() {
30253                            var e, i = d(t);
30254                            if (a) {
30255                                var n = d(this).constructor;
30256                                e = Reflect.construct(i, arguments, n);
30257                            } else e = i.apply(this, arguments);
30258                            return s(this, e);
30259                        });
30260                        function n() {
30261                            var e;
30262                            !function(e, t) {
30263                                if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
30264                            }(this, n);
30265                            var t = (e = i.call(this)).getAttributeNames(), a = e.attachShadow({
30266                                mode: "closed"
30267                            }), o = h.createElement("input");
30268                            for (var s in o.type = "text", a.appendChild(o), t) Object.prototype.hasOwnProperty.call(t, s) && o.setAttribute(t[s], e.getAttribute(t[s]));
30269                            var l = new r.default;
30270                            return l.dataAttribute = "", l.mask(o), o.inputmask.shadowRoot = a, e;
30271                        }
30272                        return n;
30273                    }(l(HTMLElement));
30274                    n.default.customElements.define("input-mask", v);
30275                }
30276            },
30277            2391: function(e, t, a) {
30278                Object.defineProperty(t, "__esModule", {
30279                    value: !0
30280                }), t.generateMaskSet = function(e, t) {
30281                    var a;
30282                    function n(e, a, n) {
30283                        var r, o, s = !1;
30284                        if (null !== e && "" !== e || ((s = null !== n.regex) ? e = (e = n.regex).replace(/^(\^)(.*)(\$)$/, "$2") : (s = !0, 
30285                        e = ".*")), 1 === e.length && !1 === n.greedy && 0 !== n.repeat && (n.placeholder = ""), 
30286                        n.repeat > 0 || "*" === n.repeat || "+" === n.repeat) {
30287                            var l = "*" === n.repeat ? 0 : "+" === n.repeat ? 1 : n.repeat;
30288                            e = n.groupmarker[0] + e + n.groupmarker[1] + n.quantifiermarker[0] + l + "," + n.repeat + n.quantifiermarker[1];
30289                        }
30290                        return o = s ? "regex_" + n.regex : n.numericInput ? e.split("").reverse().join("") : e, 
30291                        !1 !== n.keepStatic && (o = "ks_" + o), void 0 === Inputmask.prototype.masksCache[o] || !0 === t ? (r = {
30292                            mask: e,
vendor: 70,107 bytes, lines 30293-31308
30293                            maskToken: Inputmask.prototype.analyseMask(e, s, n),
30294                            validPositions: {},
30295                            _buffer: void 0,
30296                            buffer: void 0,
30297                            tests: {},
30298                            excludes: {},
30299                            metadata: a,
30300                            maskLength: void 0,
30301                            jitOffset: {}
30302                        }, !0 !== t && (Inputmask.prototype.masksCache[o] = r, r = i.default.extend(!0, {}, Inputmask.prototype.masksCache[o]))) : r = i.default.extend(!0, {}, Inputmask.prototype.masksCache[o]), 
30303                        r;
30304                    }
30305                    "function" == typeof e.mask && (e.mask = e.mask(e));
30306                    if (Array.isArray(e.mask)) {
30307                        if (e.mask.length > 1) {
30308                            null === e.keepStatic && (e.keepStatic = !0);
30309                            var r = e.groupmarker[0];
30310                            return (e.isRTL ? e.mask.reverse() : e.mask).forEach((function(t) {
30311                                r.length > 1 && (r += e.groupmarker[1] + e.alternatormarker + e.groupmarker[0]), 
30312                                void 0 !== t.mask && "function" != typeof t.mask ? r += t.mask : r += t;
30313                            })), n(r += e.groupmarker[1], e.mask, e);
30314                        }
30315                        e.mask = e.mask.pop();
30316                    }
30317                    null === e.keepStatic && (e.keepStatic = !1);
30318                    a = e.mask && void 0 !== e.mask.mask && "function" != typeof e.mask.mask ? n(e.mask.mask, e.mask, e) : n(e.mask, e.mask, e);
30319                    return a;
30320                }, t.analyseMask = function(e, t, a) {
30321                    var i, r, o, s, l, u, c = /(?:[?*+]|\{[0-9+*]+(?:,[0-9+*]*)?(?:\|[0-9+*]*)?\})|[^.?*+^${[]()|\\]+|./g, f = /\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g, d = !1, p = new n.default, h = [], v = [], m = !1;
30322                    function g(e, i, n) {
30323                        n = void 0 !== n ? n : e.matches.length;
30324                        var r = e.matches[n - 1];
30325                        if (t) 0 === i.indexOf("[") || d && /\\d|\\s|\\w]/i.test(i) || "." === i ? e.matches.splice(n++, 0, {
30326                            fn: new RegExp(i, a.casing ? "i" : ""),
30327                            static: !1,
30328                            optionality: !1,
30329                            newBlockMarker: void 0 === r ? "master" : r.def !== i,
30330                            casing: null,
30331                            def: i,
30332                            placeholder: void 0,
30333                            nativeDef: i
30334                        }) : (d && (i = i[i.length - 1]), i.split("").forEach((function(t, i) {
30335                            r = e.matches[n - 1], e.matches.splice(n++, 0, {
30336                                fn: /[a-z]/i.test(a.staticDefinitionSymbol || t) ? new RegExp("[" + (a.staticDefinitionSymbol || t) + "]", a.casing ? "i" : "") : null,
30337                                static: !0,
30338                                optionality: !1,
30339                                newBlockMarker: void 0 === r ? "master" : r.def !== t && !0 !== r.static,
30340                                casing: null,
30341                                def: a.staticDefinitionSymbol || t,
30342                                placeholder: void 0 !== a.staticDefinitionSymbol ? t : void 0,
30343                                nativeDef: (d ? "'" : "") + t
30344                            });
30345                        }))), d = !1; else {
30346                            var o = a.definitions && a.definitions[i] || a.usePrototypeDefinitions && Inputmask.prototype.definitions[i];
30347                            o && !d ? e.matches.splice(n++, 0, {
30348                                fn: o.validator ? "string" == typeof o.validator ? new RegExp(o.validator, a.casing ? "i" : "") : new function() {
30349                                    this.test = o.validator;
30350                                } : new RegExp("."),
30351                                static: o.static || !1,
30352                                optionality: !1,
30353                                newBlockMarker: void 0 === r ? "master" : r.def !== (o.definitionSymbol || i),
30354                                casing: o.casing,
30355                                def: o.definitionSymbol || i,
30356                                placeholder: o.placeholder,
30357                                nativeDef: i,
30358                                generated: o.generated
30359                            }) : (e.matches.splice(n++, 0, {
30360                                fn: /[a-z]/i.test(a.staticDefinitionSymbol || i) ? new RegExp("[" + (a.staticDefinitionSymbol || i) + "]", a.casing ? "i" : "") : null,
30361                                static: !0,
30362                                optionality: !1,
30363                                newBlockMarker: void 0 === r ? "master" : r.def !== i && !0 !== r.static,
30364                                casing: null,
30365                                def: a.staticDefinitionSymbol || i,
30366                                placeholder: void 0 !== a.staticDefinitionSymbol ? i : void 0,
30367                                nativeDef: (d ? "'" : "") + i
30368                            }), d = !1);
30369                        }
30370                    }
30371                    function k() {
30372                        if (h.length > 0) {
30373                            if (g(s = h[h.length - 1], r), s.isAlternator) {
30374                                l = h.pop();
30375                                for (var e = 0; e < l.matches.length; e++) l.matches[e].isGroup && (l.matches[e].isGroup = !1);
30376                                h.length > 0 ? (s = h[h.length - 1]).matches.push(l) : p.matches.push(l);
30377                            }
30378                        } else g(p, r);
30379                    }
30380                    function y(e) {
30381                        var t = new n.default(!0);
30382                        return t.openGroup = !1, t.matches = e, t;
30383                    }
30384                    function b() {
30385                        if ((o = h.pop()).openGroup = !1, void 0 !== o) if (h.length > 0) {
30386                            if ((s = h[h.length - 1]).matches.push(o), s.isAlternator) {
30387                                l = h.pop();
30388                                for (var e = 0; e < l.matches.length; e++) l.matches[e].isGroup = !1, l.matches[e].alternatorGroup = !1;
30389                                h.length > 0 ? (s = h[h.length - 1]).matches.push(l) : p.matches.push(l);
30390                            }
30391                        } else p.matches.push(o); else k();
30392                    }
30393                    function x(e) {
30394                        var t = e.pop();
30395                        return t.isQuantifier && (t = y([ e.pop(), t ])), t;
30396                    }
30397                    t && (a.optionalmarker[0] = void 0, a.optionalmarker[1] = void 0);
30398                    for (;i = t ? f.exec(e) : c.exec(e); ) {
30399                        if (r = i[0], t) switch (r.charAt(0)) {
30400                          case "?":
30401                            r = "{0,1}";
30402                            break;
30403
30404                          case "+":
30405                          case "*":
30406                            r = "{" + r + "}";
30407                            break;
30408
30409                          case "|":
30410                            if (0 === h.length) {
30411                                var P = y(p.matches);
30412                                P.openGroup = !0, h.push(P), p.matches = [], m = !0;
30413                            }
30414                        }
30415                        if (d) k(); else switch (r.charAt(0)) {
30416                          case "$":
30417                          case "^":
30418                            t || k();
30419                            break;
30420
30421                          case "(?=":
30422                          case "(?!":
30423                          case "(?<=":
30424                          case "(?<!":
30425                            h.push(new n.default(!0));
30426                            break;
30427
30428                          case a.escapeChar:
30429                            d = !0, t && k();
30430                            break;
30431
30432                          case a.optionalmarker[1]:
30433                          case a.groupmarker[1]:
30434                            b();
30435                            break;
30436
30437                          case a.optionalmarker[0]:
30438                            h.push(new n.default(!1, !0));
30439                            break;
30440
30441                          case a.groupmarker[0]:
30442                            h.push(new n.default(!0));
30443                            break;
30444
30445                          case a.quantifiermarker[0]:
30446                            var E = new n.default(!1, !1, !0), S = (r = r.replace(/[{}]/g, "")).split("|"), _ = S[0].split(","), M = isNaN(_[0]) ? _[0] : parseInt(_[0]), w = 1 === _.length ? M : isNaN(_[1]) ? _[1] : parseInt(_[1]), O = isNaN(S[1]) ? S[1] : parseInt(S[1]);
30447                            "*" !== M && "+" !== M || (M = "*" === w ? 0 : 1), E.quantifier = {
30448                                min: M,
30449                                max: w,
30450                                jit: O
30451                            };
30452                            var T = h.length > 0 ? h[h.length - 1].matches : p.matches;
30453                            if ((i = T.pop()).isAlternator) {
30454                                T.push(i), T = i.matches;
30455                                var C = new n.default(!0), A = T.pop();
30456                                T.push(C), T = C.matches, i = A;
30457                            }
30458                            i.isGroup || (i = y([ i ])), T.push(i), T.push(E);
30459                            break;
30460
30461                          case a.alternatormarker:
30462                            if (h.length > 0) {
30463                                var D = (s = h[h.length - 1]).matches[s.matches.length - 1];
30464                                u = s.openGroup && (void 0 === D.matches || !1 === D.isGroup && !1 === D.isAlternator) ? h.pop() : x(s.matches);
30465                            } else u = x(p.matches);
30466                            if (u.isAlternator) h.push(u); else if (u.alternatorGroup ? (l = h.pop(), u.alternatorGroup = !1) : l = new n.default(!1, !1, !1, !0), 
30467                            l.matches.push(u), h.push(l), u.openGroup) {
30468                                u.openGroup = !1;
30469                                var B = new n.default(!0);
30470                                B.alternatorGroup = !0, h.push(B);
30471                            }
30472                            break;
30473
30474                          default:
30475                            k();
30476                        }
30477                    }
30478                    m && b();
30479                    for (;h.length > 0; ) o = h.pop(), p.matches.push(o);
30480                    p.matches.length > 0 && (!function e(i) {
30481                        i && i.matches && i.matches.forEach((function(n, r) {
30482                            var o = i.matches[r + 1];
30483                            (void 0 === o || void 0 === o.matches || !1 === o.isQuantifier) && n && n.isGroup && (n.isGroup = !1, 
30484                            t || (g(n, a.groupmarker[0], 0), !0 !== n.openGroup && g(n, a.groupmarker[1]))), 
30485                            e(n);
30486                        }));
30487                    }(p), v.push(p));
30488                    (a.numericInput || a.isRTL) && function e(t) {
30489                        for (var i in t.matches = t.matches.reverse(), t.matches) if (Object.prototype.hasOwnProperty.call(t.matches, i)) {
30490                            var n = parseInt(i);
30491                            if (t.matches[i].isQuantifier && t.matches[n + 1] && t.matches[n + 1].isGroup) {
30492                                var r = t.matches[i];
30493                                t.matches.splice(i, 1), t.matches.splice(n + 1, 0, r);
30494                            }
30495                            void 0 !== t.matches[i].matches ? t.matches[i] = e(t.matches[i]) : t.matches[i] = ((o = t.matches[i]) === a.optionalmarker[0] ? o = a.optionalmarker[1] : o === a.optionalmarker[1] ? o = a.optionalmarker[0] : o === a.groupmarker[0] ? o = a.groupmarker[1] : o === a.groupmarker[1] && (o = a.groupmarker[0]), 
30496                            o);
30497                        }
30498                        var o;
30499                        return t;
30500                    }(v[0]);
30501                    return v;
30502                };
30503                var i = r(a(4963)), n = r(a(9695));
30504                function r(e) {
30505                    return e && e.__esModule ? e : {
30506                        default: e
30507                    };
30508                }
30509            },
30510            157: function(e, t, a) {
30511                Object.defineProperty(t, "__esModule", {
30512                    value: !0
30513                }), t.mask = function() {
30514                    var e = this, t = this.opts, a = this.el, i = this.dependencyLib;
30515                    s.EventRuler.off(a);
30516                    var f = function(t, a) {
30517                        "textarea" !== t.tagName.toLowerCase() && a.ignorables.push(n.default.ENTER);
30518                        var l = t.getAttribute("type"), u = "input" === t.tagName.toLowerCase() && a.supportsInputType.includes(l) || t.isContentEditable || "textarea" === t.tagName.toLowerCase();
30519                        if (!u) if ("input" === t.tagName.toLowerCase()) {
30520                            var c = document.createElement("input");
30521                            c.setAttribute("type", l), u = "text" === c.type, c = null;
30522                        } else u = "partial";
30523                        return !1 !== u ? function(t) {
30524                            var n, l;
30525                            function u() {
30526                                return this.inputmask ? this.inputmask.opts.autoUnmask ? this.inputmask.unmaskedvalue() : -1 !== r.getLastValidPosition.call(e) || !0 !== a.nullable ? (this.inputmask.shadowRoot || this.ownerDocument).activeElement === this && a.clearMaskOnLostFocus ? (e.isRTL ? o.clearOptionalTail.call(e, r.getBuffer.call(e).slice()).reverse() : o.clearOptionalTail.call(e, r.getBuffer.call(e).slice())).join("") : n.call(this) : "" : n.call(this);
30527                            }
30528                            function c(e) {
30529                                l.call(this, e), this.inputmask && (0, o.applyInputValue)(this, e);
30530                            }
30531                            if (!t.inputmask.__valueGet) {
30532                                if (!0 !== a.noValuePatching) {
30533                                    if (Object.getOwnPropertyDescriptor) {
30534                                        var f = Object.getPrototypeOf ? Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t), "value") : void 0;
30535                                        f && f.get && f.set ? (n = f.get, l = f.set, Object.defineProperty(t, "value", {
30536                                            get: u,
30537                                            set: c,
30538                                            configurable: !0
30539                                        })) : "input" !== t.tagName.toLowerCase() && (n = function() {
30540                                            return this.textContent;
30541                                        }, l = function(e) {
30542                                            this.textContent = e;
30543                                        }, Object.defineProperty(t, "value", {
30544                                            get: u,
30545                                            set: c,
30546                                            configurable: !0
30547                                        }));
30548                                    } else document.__lookupGetter__ && t.__lookupGetter__("value") && (n = t.__lookupGetter__("value"), 
30549                                    l = t.__lookupSetter__("value"), t.__defineGetter__("value", u), t.__defineSetter__("value", c));
30550                                    t.inputmask.__valueGet = n, t.inputmask.__valueSet = l;
30551                                }
30552                                t.inputmask._valueGet = function(t) {
30553                                    return e.isRTL && !0 !== t ? n.call(this.el).split("").reverse().join("") : n.call(this.el);
30554                                }, t.inputmask._valueSet = function(t, a) {
30555                                    l.call(this.el, null == t ? "" : !0 !== a && e.isRTL ? t.split("").reverse().join("") : t);
30556                                }, void 0 === n && (n = function() {
30557                                    return this.value;
30558                                }, l = function(e) {
30559                                    this.value = e;
30560                                }, function(t) {
30561                                    if (i.valHooks && (void 0 === i.valHooks[t] || !0 !== i.valHooks[t].inputmaskpatch)) {
30562                                        var n = i.valHooks[t] && i.valHooks[t].get ? i.valHooks[t].get : function(e) {
30563                                            return e.value;
30564                                        }, s = i.valHooks[t] && i.valHooks[t].set ? i.valHooks[t].set : function(e, t) {
30565                                            return e.value = t, e;
30566                                        };
30567                                        i.valHooks[t] = {
30568                                            get: function(t) {
30569                                                if (t.inputmask) {
30570                                                    if (t.inputmask.opts.autoUnmask) return t.inputmask.unmaskedvalue();
30571                                                    var i = n(t);
30572                                                    return -1 !== r.getLastValidPosition.call(e, void 0, void 0, t.inputmask.maskset.validPositions) || !0 !== a.nullable ? i : "";
30573                                                }
30574                                                return n(t);
30575                                            },
30576                                            set: function(e, t) {
30577                                                var a = s(e, t);
30578                                                return e.inputmask && (0, o.applyInputValue)(e, t), a;
30579                                            },
30580                                            inputmaskpatch: !0
30581                                        };
30582                                    }
30583                                }(t.type), function(t) {
30584                                    s.EventRuler.on(t, "mouseenter", (function() {
30585                                        var t = this.inputmask._valueGet(!0);
30586                                        t !== (e.isRTL ? r.getBuffer.call(e).reverse() : r.getBuffer.call(e)).join("") && (0, 
30587                                        o.applyInputValue)(this, t);
30588                                    }));
30589                                }(t));
30590                            }
30591                        }(t) : t.inputmask = void 0, u;
30592                    }(a, t);
30593                    if (!1 !== f) {
30594                        e.originalPlaceholder = a.placeholder, e.maxLength = void 0 !== a ? a.maxLength : void 0, 
30595                        -1 === e.maxLength && (e.maxLength = void 0), "inputMode" in a && null === a.getAttribute("inputmode") && (a.inputMode = t.inputmode, 
30596                        a.setAttribute("inputmode", t.inputmode)), !0 === f && (t.showMaskOnFocus = t.showMaskOnFocus && -1 === [ "cc-number", "cc-exp" ].indexOf(a.autocomplete), 
30597                        l.iphone && (t.insertModeVisual = !1), s.EventRuler.on(a, "submit", c.EventHandlers.submitEvent), 
30598                        s.EventRuler.on(a, "reset", c.EventHandlers.resetEvent), s.EventRuler.on(a, "blur", c.EventHandlers.blurEvent), 
30599                        s.EventRuler.on(a, "focus", c.EventHandlers.focusEvent), s.EventRuler.on(a, "invalid", c.EventHandlers.invalidEvent), 
30600                        s.EventRuler.on(a, "click", c.EventHandlers.clickEvent), s.EventRuler.on(a, "mouseleave", c.EventHandlers.mouseleaveEvent), 
30601                        s.EventRuler.on(a, "mouseenter", c.EventHandlers.mouseenterEvent), s.EventRuler.on(a, "paste", c.EventHandlers.pasteEvent), 
30602                        s.EventRuler.on(a, "cut", c.EventHandlers.cutEvent), s.EventRuler.on(a, "complete", t.oncomplete), 
30603                        s.EventRuler.on(a, "incomplete", t.onincomplete), s.EventRuler.on(a, "cleared", t.oncleared), 
30604                        !0 !== t.inputEventOnly && (s.EventRuler.on(a, "keydown", c.EventHandlers.keydownEvent), 
30605                        s.EventRuler.on(a, "keypress", c.EventHandlers.keypressEvent), s.EventRuler.on(a, "keyup", c.EventHandlers.keyupEvent)), 
30606                        (l.mobile || t.inputEventOnly) && a.removeAttribute("maxLength"), s.EventRuler.on(a, "input", c.EventHandlers.inputFallBackEvent), 
30607                        s.EventRuler.on(a, "compositionend", c.EventHandlers.compositionendEvent)), s.EventRuler.on(a, "setvalue", c.EventHandlers.setValueEvent), 
30608                        r.getBufferTemplate.call(e).join(""), e.undoValue = e._valueGet(!0);
30609                        var d = (a.inputmask.shadowRoot || a.ownerDocument).activeElement;
30610                        if ("" !== a.inputmask._valueGet(!0) || !1 === t.clearMaskOnLostFocus || d === a) {
30611                            (0, o.applyInputValue)(a, a.inputmask._valueGet(!0), t);
30612                            var p = r.getBuffer.call(e).slice();
30613                            !1 === u.isComplete.call(e, p) && t.clearIncomplete && r.resetMaskSet.call(e), t.clearMaskOnLostFocus && d !== a && (-1 === r.getLastValidPosition.call(e) ? p = [] : o.clearOptionalTail.call(e, p)), 
30614                            (!1 === t.clearMaskOnLostFocus || t.showMaskOnFocus && d === a || "" !== a.inputmask._valueGet(!0)) && (0, 
30615                            o.writeBuffer)(a, p), d === a && r.caret.call(e, a, r.seekNext.call(e, r.getLastValidPosition.call(e)));
30616                        }
30617                    }
30618                };
30619                var i, n = (i = a(4528)) && i.__esModule ? i : {
30620                    default: i
30621                }, r = a(8711), o = a(7760), s = a(9716), l = a(9845), u = a(7215), c = a(6030);
30622            },
30623            9695: function(e, t) {
30624                Object.defineProperty(t, "__esModule", {
30625                    value: !0
30626                }), t.default = function(e, t, a, i) {
30627                    this.matches = [], this.openGroup = e || !1, this.alternatorGroup = !1, this.isGroup = e || !1, 
30628                    this.isOptional = t || !1, this.isQuantifier = a || !1, this.isAlternator = i || !1, 
30629                    this.quantifier = {
30630                        min: 1,
30631                        max: 1
30632                    };
30633                };
30634            },
30635            3194: function() {
30636                Array.prototype.includes || Object.defineProperty(Array.prototype, "includes", {
30637                    value: function(e, t) {
30638                        if (null == this) throw new TypeError('"this" is null or not defined');
30639                        var a = Object(this), i = a.length >>> 0;
30640                        if (0 === i) return !1;
30641                        for (var n = 0 | t, r = Math.max(n >= 0 ? n : i - Math.abs(n), 0); r < i; ) {
30642                            if (a[r] === e) return !0;
30643                            r++;
30644                        }
30645                        return !1;
30646                    }
30647                });
30648            },
30649            7149: function() {
30650                function e(t) {
30651                    return (e = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
30652                        return typeof e;
30653                    } : function(e) {
30654                        return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
30655                    })(t);
30656                }
30657                "function" != typeof Object.getPrototypeOf && (Object.getPrototypeOf = "object" === e("test".__proto__) ? function(e) {
30658                    return e.__proto__;
30659                } : function(e) {
30660                    return e.constructor.prototype;
30661                });
30662            },
30663            8711: function(e, t, a) {
30664                Object.defineProperty(t, "__esModule", {
30665                    value: !0
30666                }), t.caret = function(e, t, a, i, n) {
30667                    var r, o = this, s = this.opts;
30668                    if (void 0 === t) return "selectionStart" in e && "selectionEnd" in e ? (t = e.selectionStart, 
30669                    a = e.selectionEnd) : window.getSelection ? (r = window.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode !== e && r.commonAncestorContainer !== e || (t = r.startOffset, 
30670                    a = r.endOffset) : document.selection && document.selection.createRange && (r = document.selection.createRange(), 
30671                    t = 0 - r.duplicate().moveStart("character", -e.inputmask._valueGet().length), a = t + r.text.length), 
30672                    {
30673                        begin: i ? t : u.call(o, t),
30674                        end: i ? a : u.call(o, a)
30675                    };
30676                    if (Array.isArray(t) && (a = o.isRTL ? t[0] : t[1], t = o.isRTL ? t[1] : t[0]), 
30677                    void 0 !== t.begin && (a = o.isRTL ? t.begin : t.end, t = o.isRTL ? t.end : t.begin), 
30678                    "number" == typeof t) {
30679                        t = i ? t : u.call(o, t), a = "number" == typeof (a = i ? a : u.call(o, a)) ? a : t;
30680                        var l = parseInt(((e.ownerDocument.defaultView || window).getComputedStyle ? (e.ownerDocument.defaultView || window).getComputedStyle(e, null) : e.currentStyle).fontSize) * a;
30681                        if (e.scrollLeft = l > e.scrollWidth ? l : 0, e.inputmask.caretPos = {
30682                            begin: t,
30683                            end: a
30684                        }, s.insertModeVisual && !1 === s.insertMode && t === a && (n || a++), e === (e.inputmask.shadowRoot || e.ownerDocument).activeElement) if ("setSelectionRange" in e) e.setSelectionRange(t, a); else if (window.getSelection) {
30685                            if (r = document.createRange(), void 0 === e.firstChild || null === e.firstChild) {
30686                                var c = document.createTextNode("");
30687                                e.appendChild(c);
30688                            }
30689                            r.setStart(e.firstChild, t < e.inputmask._valueGet().length ? t : e.inputmask._valueGet().length), 
30690                            r.setEnd(e.firstChild, a < e.inputmask._valueGet().length ? a : e.inputmask._valueGet().length), 
30691                            r.collapse(!0);
30692                            var f = window.getSelection();
30693                            f.removeAllRanges(), f.addRange(r);
30694                        } else e.createTextRange && ((r = e.createTextRange()).collapse(!0), r.moveEnd("character", a), 
30695                        r.moveStart("character", t), r.select());
30696                    }
30697                }, t.determineLastRequiredPosition = function(e) {
30698                    var t, a, r = this, s = this.maskset, l = this.dependencyLib, u = i.getMaskTemplate.call(r, !0, o.call(r), !0, !0), c = u.length, f = o.call(r), d = {}, p = s.validPositions[f], h = void 0 !== p ? p.locator.slice() : void 0;
30699                    for (t = f + 1; t < u.length; t++) a = i.getTestTemplate.call(r, t, h, t - 1), h = a.locator.slice(), 
30700                    d[t] = l.extend(!0, {}, a);
30701                    var v = p && void 0 !== p.alternation ? p.locator[p.alternation] : void 0;
30702                    for (t = c - 1; t > f && (((a = d[t]).match.optionality || a.match.optionalQuantifier && a.match.newBlockMarker || v && (v !== d[t].locator[p.alternation] && 1 != a.match.static || !0 === a.match.static && a.locator[p.alternation] && n.checkAlternationMatch.call(r, a.locator[p.alternation].toString().split(","), v.toString().split(",")) && "" !== i.getTests.call(r, t)[0].def)) && u[t] === i.getPlaceholder.call(r, t, a.match)); t--) c--;
30703                    return e ? {
30704                        l: c,
30705                        def: d[c] ? d[c].match : void 0
30706                    } : c;
30707                }, t.determineNewCaretPosition = function(e, t, a) {
30708                    var n = this, u = this.maskset, c = this.opts;
30709                    t && (n.isRTL ? e.end = e.begin : e.begin = e.end);
30710                    if (e.begin === e.end) {
30711                        switch (a = a || c.positionCaretOnClick) {
30712                          case "none":
30713                            break;
30714
30715                          case "select":
30716                            e = {
30717                                begin: 0,
30718                                end: r.call(n).length
30719                            };
30720                            break;
30721
30722                          case "ignore":
30723                            e.end = e.begin = l.call(n, o.call(n));
30724                            break;
30725
30726                          case "radixFocus":
30727                            if (function(e) {
30728                                if ("" !== c.radixPoint && 0 !== c.digits) {
30729                                    var t = u.validPositions;
30730                                    if (void 0 === t[e] || t[e].input === i.getPlaceholder.call(n, e)) {
30731                                        if (e < l.call(n, -1)) return !0;
30732                                        var a = r.call(n).indexOf(c.radixPoint);
30733                                        if (-1 !== a) {
30734                                            for (var o in t) if (t[o] && a < o && t[o].input !== i.getPlaceholder.call(n, o)) return !1;
30735                                            return !0;
30736                                        }
30737                                    }
30738                                }
30739                                return !1;
30740                            }(e.begin)) {
30741                                var f = r.call(n).join("").indexOf(c.radixPoint);
30742                                e.end = e.begin = c.numericInput ? l.call(n, f) : f;
30743                                break;
30744                            }
30745
30746                          default:
30747                            var d = e.begin, p = o.call(n, d, !0), h = l.call(n, -1 !== p || s.call(n, 0) ? p : -1);
30748                            if (d <= h) e.end = e.begin = s.call(n, d, !1, !0) ? d : l.call(n, d); else {
30749                                var v = u.validPositions[p], m = i.getTestTemplate.call(n, h, v ? v.match.locator : void 0, v), g = i.getPlaceholder.call(n, h, m.match);
30750                                if ("" !== g && r.call(n)[h] !== g && !0 !== m.match.optionalQuantifier && !0 !== m.match.newBlockMarker || !s.call(n, h, c.keepStatic, !0) && m.match.def === g) {
30751                                    var k = l.call(n, h);
30752                                    (d >= k || d === h) && (h = k);
30753                                }
30754                                e.end = e.begin = h;
30755                            }
30756                        }
30757                        return e;
30758                    }
30759                }, t.getBuffer = r, t.getBufferTemplate = function() {
30760                    var e = this.maskset;
30761                    void 0 === e._buffer && (e._buffer = i.getMaskTemplate.call(this, !1, 1), void 0 === e.buffer && (e.buffer = e._buffer.slice()));
30762                    return e._buffer;
30763                }, t.getLastValidPosition = o, t.isMask = s, t.resetMaskSet = function(e) {
30764                    var t = this.maskset;
30765                    t.buffer = void 0, !0 !== e && (t.validPositions = {}, t.p = 0);
30766                }, t.seekNext = l, t.seekPrevious = function(e, t) {
30767                    var a = this, n = e - 1;
30768                    if (e <= 0) return 0;
30769                    for (;n > 0 && (!0 === t && (!0 !== i.getTest.call(a, n).match.newBlockMarker || !s.call(a, n, void 0, !0)) || !0 !== t && !s.call(a, n, void 0, !0)); ) n--;
30770                    return n;
30771                }, t.translatePosition = u;
30772                var i = a(4713), n = a(7215);
30773                function r(e) {
30774                    var t = this.maskset;
30775                    return void 0 !== t.buffer && !0 !== e || (t.buffer = i.getMaskTemplate.call(this, !0, o.call(this), !0), 
30776                    void 0 === t._buffer && (t._buffer = t.buffer.slice())), t.buffer;
30777                }
30778                function o(e, t, a) {
30779                    var i = this.maskset, n = -1, r = -1, o = a || i.validPositions;
30780                    for (var s in void 0 === e && (e = -1), o) {
30781                        var l = parseInt(s);
30782                        o[l] && (t || !0 !== o[l].generatedInput) && (l <= e && (n = l), l >= e && (r = l));
30783                    }
30784                    return -1 === n || n == e ? r : -1 == r || e - n < r - e ? n : r;
30785                }
30786                function s(e, t, a) {
30787                    var n = this, r = this.maskset, o = i.getTestTemplate.call(n, e).match;
30788                    if ("" === o.def && (o = i.getTest.call(n, e).match), !0 !== o.static) return o.fn;
30789                    if (!0 === a && void 0 !== r.validPositions[e] && !0 !== r.validPositions[e].generatedInput) return !0;
30790                    if (!0 !== t && e > -1) {
30791                        if (a) {
30792                            var s = i.getTests.call(n, e);
30793                            return s.length > 1 + ("" === s[s.length - 1].match.def ? 1 : 0);
30794                        }
30795                        var l = i.determineTestTemplate.call(n, e, i.getTests.call(n, e)), u = i.getPlaceholder.call(n, e, l.match);
30796                        return l.match.def !== u;
30797                    }
30798                    return !1;
30799                }
30800                function l(e, t, a) {
30801                    var n = this;
30802                    void 0 === a && (a = !0);
30803                    for (var r = e + 1; "" !== i.getTest.call(n, r).match.def && (!0 === t && (!0 !== i.getTest.call(n, r).match.newBlockMarker || !s.call(n, r, void 0, !0)) || !0 !== t && !s.call(n, r, void 0, a)); ) r++;
30804                    return r;
30805                }
30806                function u(e) {
30807                    var t = this.opts, a = this.el;
30808                    return !this.isRTL || "number" != typeof e || t.greedy && "" === t.placeholder || !a || (e = Math.abs(this._valueGet().length - e)), 
30809                    e;
30810                }
30811            },
30812            4713: function(e, t) {
30813                function a(e, t) {
30814                    var a = (null != e.alternation ? e.mloc[i(e)] : e.locator).join("");
30815                    if ("" !== a) for (;a.length < t; ) a += "0";
30816                    return a;
30817                }
30818                function i(e) {
30819                    var t = e.locator[e.alternation];
30820                    return "string" == typeof t && t.length > 0 && (t = t.split(",")[0]), void 0 !== t ? t.toString() : "";
30821                }
30822                function n(e, t, a) {
30823                    var i = this.opts, n = this.maskset;
30824                    if (void 0 !== (t = t || s.call(this, e).match).placeholder || !0 === a) return "function" == typeof t.placeholder ? t.placeholder(i) : t.placeholder;
30825                    if (!0 === t.static) {
30826                        if (e > -1 && void 0 === n.validPositions[e]) {
30827                            var r, o = u.call(this, e), l = [];
30828                            if (o.length > 1 + ("" === o[o.length - 1].match.def ? 1 : 0)) for (var c = 0; c < o.length; c++) if ("" !== o[c].match.def && !0 !== o[c].match.optionality && !0 !== o[c].match.optionalQuantifier && (!0 === o[c].match.static || void 0 === r || !1 !== o[c].match.fn.test(r.match.def, n, e, !0, i)) && (l.push(o[c]), 
30829                            !0 === o[c].match.static && (r = o[c]), l.length > 1 && /[0-9a-bA-Z]/.test(l[0].match.def))) return i.placeholder.charAt(e % i.placeholder.length);
30830                        }
30831                        return t.def;
30832                    }
30833                    return i.placeholder.charAt(e % i.placeholder.length);
30834                }
30835                function r(e, t, a) {
30836                    return this.maskset.validPositions[e] || o.call(this, e, u.call(this, e, t ? t.slice() : t, a));
30837                }
30838                function o(e, t) {
30839                    var i = this.opts;
30840                    e = e > 0 ? e - 1 : 0;
30841                    for (var n, r, o, l = a(s.call(this, e)), u = 0; u < t.length; u++) {
30842                        var c = t[u];
30843                        n = a(c, l.length);
30844                        var f = Math.abs(n - l);
30845                        (void 0 === r || "" !== n && f < r || o && !i.greedy && o.match.optionality && "master" === o.match.newBlockMarker && (!c.match.optionality || !c.match.newBlockMarker) || o && o.match.optionalQuantifier && !c.match.optionalQuantifier) && (r = f, 
30846                        o = c);
30847                    }
30848                    return o;
30849                }
30850                function s(e, t) {
30851                    var a = this.maskset;
30852                    return a.validPositions[e] ? a.validPositions[e] : (t || u.call(this, e))[0];
30853                }
30854                function l(e, t, a) {
30855                    function i(e) {
30856                        for (var t, a = [], i = -1, n = 0, r = e.length; n < r; n++) if ("-" === e.charAt(n)) for (t = e.charCodeAt(n + 1); ++i < t; ) a.push(String.fromCharCode(i)); else i = e.charCodeAt(n), 
30857                        a.push(e.charAt(n));
30858                        return a.join("");
30859                    }
30860                    return e.match.def === t.match.nativeDef || !(!(a.regex || e.match.fn instanceof RegExp && t.match.fn instanceof RegExp) || !0 === e.match.static || !0 === t.match.static) && -1 !== i(t.match.fn.toString().replace(/[[\]/]/g, "")).indexOf(i(e.match.fn.toString().replace(/[[\]/]/g, "")));
30861                }
30862                function u(e, t, a) {
30863                    var i, n = this, r = this.dependencyLib, s = this.maskset, u = this.opts, c = this.el, f = s.maskToken, d = t ? a : 0, p = t ? t.slice() : [ 0 ], h = [], v = !1, m = t ? t.join("") : "";
30864                    function g(t, a, n, r) {
30865                        function o(n, r, f) {
30866                            function p(e, t) {
30867                                var a = 0 === t.matches.indexOf(e);
30868                                return a || t.matches.every((function(i, n) {
30869                                    return !0 === i.isQuantifier ? a = p(e, t.matches[n - 1]) : Object.prototype.hasOwnProperty.call(i, "matches") && (a = p(e, i)), 
30870                                    !a;
30871                                })), a;
30872                            }
30873                            function k(e, t, a) {
30874                                var i, n;
30875                                if ((s.tests[e] || s.validPositions[e]) && (s.tests[e] || [ s.validPositions[e] ]).every((function(e, r) {
30876                                    if (e.mloc[t]) return i = e, !1;
30877                                    var o = void 0 !== a ? a : e.alternation, s = void 0 !== e.locator[o] ? e.locator[o].toString().indexOf(t) : -1;
30878                                    return (void 0 === n || s < n) && -1 !== s && (i = e, n = s), !0;
30879                                })), i) {
30880                                    var r = i.locator[i.alternation];
30881                                    return (i.mloc[t] || i.mloc[r] || i.locator).slice((void 0 !== a ? a : i.alternation) + 1);
30882                                }
30883                                return void 0 !== a ? k(e, t) : void 0;
30884                            }
30885                            function y(e, t) {
30886                                var a = e.alternation, i = void 0 === t || a === t.alternation && -1 === e.locator[a].toString().indexOf(t.locator[a]);
30887                                if (!i && a > t.alternation) for (var n = t.alternation; n < a; n++) if (e.locator[n] !== t.locator[n]) {
30888                                    a = n, i = !0;
30889                                    break;
30890                                }
30891                                if (i) {
30892                                    e.mloc = e.mloc || {};
30893                                    var r = e.locator[a];
30894                                    if (void 0 !== r) {
30895                                        if ("string" == typeof r && (r = r.split(",")[0]), void 0 === e.mloc[r] && (e.mloc[r] = e.locator.slice()), 
30896                                        void 0 !== t) {
30897                                            for (var o in t.mloc) "string" == typeof o && (o = o.split(",")[0]), void 0 === e.mloc[o] && (e.mloc[o] = t.mloc[o]);
30898                                            e.locator[a] = Object.keys(e.mloc).join(",");
30899                                        }
30900                                        return !0;
30901                                    }
30902                                    e.alternation = void 0;
30903                                }
30904                                return !1;
30905                            }
30906                            function b(e, t) {
30907                                if (e.locator.length !== t.locator.length) return !1;
30908                                for (var a = e.alternation + 1; a < e.locator.length; a++) if (e.locator[a] !== t.locator[a]) return !1;
30909                                return !0;
30910                            }
30911                            if (d > e + u._maxTestPos) throw "Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. " + s.mask;
30912                            if (d === e && void 0 === n.matches) return h.push({
30913                                match: n,
30914                                locator: r.reverse(),
30915                                cd: m,
30916                                mloc: {}
30917                            }), !0;
30918                            if (void 0 !== n.matches) {
30919                                if (n.isGroup && f !== n) {
30920                                    if (n = o(t.matches[t.matches.indexOf(n) + 1], r, f)) return !0;
30921                                } else if (n.isOptional) {
30922                                    var x = n, P = h.length;
30923                                    if (n = g(n, a, r, f)) {
30924                                        if (h.forEach((function(e, t) {
30925                                            t >= P && (e.match.optionality = !0);
30926                                        })), i = h[h.length - 1].match, void 0 !== f || !p(i, x)) return !0;
30927                                        v = !0, d = e;
30928                                    }
30929                                } else if (n.isAlternator) {
30930                                    var E, S = n, _ = [], M = h.slice(), w = r.length, O = !1, T = a.length > 0 ? a.shift() : -1;
30931                                    if (-1 === T || "string" == typeof T) {
30932                                        var C, A = d, D = a.slice(), B = [];
30933                                        if ("string" == typeof T) B = T.split(","); else for (C = 0; C < S.matches.length; C++) B.push(C.toString());
30934                                        if (void 0 !== s.excludes[e]) {
30935                                            for (var j = B.slice(), R = 0, L = s.excludes[e].length; R < L; R++) {
30936                                                var I = s.excludes[e][R].toString().split(":");
30937                                                r.length == I[1] && B.splice(B.indexOf(I[0]), 1);
30938                                            }
30939                                            0 === B.length && (delete s.excludes[e], B = j);
30940                                        }
30941                                        (!0 === u.keepStatic || isFinite(parseInt(u.keepStatic)) && A >= u.keepStatic) && (B = B.slice(0, 1));
30942                                        for (var F = 0; F < B.length; F++) {
30943                                            C = parseInt(B[F]), h = [], a = "string" == typeof T && k(d, C, w) || D.slice();
30944                                            var N = S.matches[C];
30945                                            if (N && o(N, [ C ].concat(r), f)) n = !0; else if (0 === F && (O = !0), N && N.matches && N.matches.length > S.matches[0].matches.length) break;
30946                                            E = h.slice(), d = A, h = [];
30947                                            for (var V = 0; V < E.length; V++) {
30948                                                var G = E[V], H = !1;
30949                                                G.match.jit = G.match.jit || O, G.alternation = G.alternation || w, y(G);
30950                                                for (var K = 0; K < _.length; K++) {
30951                                                    var U = _[K];
30952                                                    if ("string" != typeof T || void 0 !== G.alternation && B.includes(G.locator[G.alternation].toString())) {
30953                                                        if (G.match.nativeDef === U.match.nativeDef) {
30954                                                            H = !0, y(U, G);
30955                                                            break;
30956                                                        }
30957                                                        if (l(G, U, u)) {
30958                                                            y(G, U) && (H = !0, _.splice(_.indexOf(U), 0, G));
30959                                                            break;
30960                                                        }
30961                                                        if (l(U, G, u)) {
30962                                                            y(U, G);
30963                                                            break;
30964                                                        }
30965                                                        if (Q = U, !0 === (W = G).match.static && !0 !== Q.match.static && Q.match.fn.test(W.match.def, s, e, !1, u, !1)) {
30966                                                            b(G, U) || void 0 !== c.inputmask.userOptions.keepStatic ? y(G, U) && (H = !0, _.splice(_.indexOf(U), 0, G)) : u.keepStatic = !0;
30967                                                            break;
30968                                                        }
30969                                                    }
30970                                                }
30971                                                H || _.push(G);
30972                                            }
30973                                        }
30974                                        h = M.concat(_), d = e, v = h.length > 0, n = _.length > 0, a = D.slice();
30975                                    } else n = o(S.matches[T] || t.matches[T], [ T ].concat(r), f);
30976                                    if (n) return !0;
30977                                } else if (n.isQuantifier && f !== t.matches[t.matches.indexOf(n) - 1]) for (var $ = n, z = a.length > 0 ? a.shift() : 0; z < (isNaN($.quantifier.max) ? z + 1 : $.quantifier.max) && d <= e; z++) {
30978                                    var q = t.matches[t.matches.indexOf($) - 1];
30979                                    if (n = o(q, [ z ].concat(r), q)) {
30980                                        if ((i = h[h.length - 1].match).optionalQuantifier = z >= $.quantifier.min, i.jit = (z + 1) * (q.matches.indexOf(i) + 1) > $.quantifier.jit, 
30981                                        i.optionalQuantifier && p(i, q)) {
30982                                            v = !0, d = e;
30983                                            break;
30984                                        }
30985                                        return i.jit && (s.jitOffset[e] = q.matches.length - q.matches.indexOf(i)), !0;
30986                                    }
30987                                } else if (n = g(n, a, r, f)) return !0;
30988                            } else d++;
30989                            var W, Q;
30990                        }
30991                        for (var f = a.length > 0 ? a.shift() : 0; f < t.matches.length; f++) if (!0 !== t.matches[f].isQuantifier) {
30992                            var p = o(t.matches[f], [ f ].concat(n), r);
30993                            if (p && d === e) return p;
30994                            if (d > e) break;
30995                        }
30996                    }
30997                    if (e > -1) {
30998                        if (void 0 === t) {
30999                            for (var k, y = e - 1; void 0 === (k = s.validPositions[y] || s.tests[y]) && y > -1; ) y--;
31000                            void 0 !== k && y > -1 && (p = function(e, t) {
31001                                var a, i = [];
31002                                return Array.isArray(t) || (t = [ t ]), t.length > 0 && (void 0 === t[0].alternation || !0 === u.keepStatic ? 0 === (i = o.call(n, e, t.slice()).locator.slice()).length && (i = t[0].locator.slice()) : t.forEach((function(e) {
31003                                    "" !== e.def && (0 === i.length ? (a = e.alternation, i = e.locator.slice()) : e.locator[a] && -1 === i[a].toString().indexOf(e.locator[a]) && (i[a] += "," + e.locator[a]));
31004                                }))), i;
31005                            }(y, k), m = p.join(""), d = y);
31006                        }
31007                        if (s.tests[e] && s.tests[e][0].cd === m) return s.tests[e];
31008                        for (var b = p.shift(); b < f.length; b++) {
31009                            if (g(f[b], p, [ b ]) && d === e || d > e) break;
31010                        }
31011                    }
31012                    return (0 === h.length || v) && h.push({
31013                        match: {
31014                            fn: null,
31015                            static: !0,
31016                            optionality: !1,
31017                            casing: null,
31018                            def: "",
31019                            placeholder: ""
31020                        },
31021                        locator: [],
31022                        mloc: {},
31023                        cd: m
31024                    }), void 0 !== t && s.tests[e] ? r.extend(!0, [], h) : (s.tests[e] = r.extend(!0, [], h), 
31025                    s.tests[e]);
31026                }
31027                Object.defineProperty(t, "__esModule", {
31028                    value: !0
31029                }), t.determineTestTemplate = o, t.getDecisionTaker = i, t.getMaskTemplate = function(e, t, a, i, s) {
31030                    var l = this, c = this.opts, f = this.maskset, d = c.greedy;
31031                    s && (c.greedy = !1);
31032                    t = t || 0;
31033                    var p, h, v, m, g = [], k = 0;
31034                    do {
31035                        if (!0 === e && f.validPositions[k]) v = s && !0 === f.validPositions[k].match.optionality && void 0 === f.validPositions[k + 1] && (!0 === f.validPositions[k].generatedInput || f.validPositions[k].input == c.skipOptionalPartCharacter && k > 0) ? o.call(l, k, u.call(l, k, p, k - 1)) : f.validPositions[k], 
31036                        h = v.match, p = v.locator.slice(), g.push(!0 === a ? v.input : !1 === a ? h.nativeDef : n.call(l, k, h)); else {
31037                            v = r.call(l, k, p, k - 1), h = v.match, p = v.locator.slice();
31038                            var y = !0 !== i && (!1 !== c.jitMasking ? c.jitMasking : h.jit);
31039                            (m = (m && h.static && h.def !== c.groupSeparator && null === h.fn || f.validPositions[k - 1] && h.static && h.def !== c.groupSeparator && null === h.fn) && f.tests[k] && 1 === f.tests[k].length) || !1 === y || void 0 === y || "number" == typeof y && isFinite(y) && y > k ? g.push(!1 === a ? h.nativeDef : n.call(l, k, h)) : m = !1;
31040                        }
31041                        k++;
31042                    } while (!0 !== h.static || "" !== h.def || t > k);
31043                    "" === g[g.length - 1] && g.pop();
31044                    !1 === a && void 0 !== f.maskLength || (f.maskLength = k - 1);
31045                    return c.greedy = d, g;
31046                }, t.getPlaceholder = n, t.getTest = s, t.getTests = u, t.getTestTemplate = r, t.isSubsetOf = l;
31047            },
31048            7215: function(e, t, a) {
31049                Object.defineProperty(t, "__esModule", {
31050                    value: !0
31051                }), t.alternate = l, t.checkAlternationMatch = function(e, t, a) {
31052                    for (var i, n = this.opts.greedy ? t : t.slice(0, 1), r = !1, o = void 0 !== a ? a.split(",") : [], s = 0; s < o.length; s++) -1 !== (i = e.indexOf(o[s])) && e.splice(i, 1);
31053                    for (var l = 0; l < e.length; l++) if (n.includes(e[l])) {
31054                        r = !0;
31055                        break;
31056                    }
31057                    return r;
31058                }, t.isComplete = c, t.isValid = f, t.refreshFromBuffer = p, t.revalidateMask = v, 
31059                t.handleRemove = function(e, t, a, i, s) {
31060                    var u = this, c = this.maskset, f = this.opts;
31061                    if ((f.numericInput || u.isRTL) && (t === r.default.BACKSPACE ? t = r.default.DELETE : t === r.default.DELETE && (t = r.default.BACKSPACE), 
31062                    u.isRTL)) {
31063                        var d = a.end;
31064                        a.end = a.begin, a.begin = d;
31065                    }
31066                    var p, h = o.getLastValidPosition.call(u, void 0, !0);
31067                    a.end >= o.getBuffer.call(u).length && h >= a.end && (a.end = h + 1);
31068                    t === r.default.BACKSPACE ? a.end - a.begin < 1 && (a.begin = o.seekPrevious.call(u, a.begin)) : t === r.default.DELETE && a.begin === a.end && (a.end = o.isMask.call(u, a.end, !0, !0) ? a.end + 1 : o.seekNext.call(u, a.end) + 1);
31069                    if (!1 !== (p = v.call(u, a))) {
31070                        if (!0 !== i && !1 !== f.keepStatic || null !== f.regex && -1 !== n.getTest.call(u, a.begin).match.def.indexOf("|")) {
31071                            var m = l.call(u, !0);
31072                            if (m) {
31073                                var g = void 0 !== m.caret ? m.caret : m.pos ? o.seekNext.call(u, m.pos.begin ? m.pos.begin : m.pos) : o.getLastValidPosition.call(u, -1, !0);
31074                                (t !== r.default.DELETE || a.begin > g) && a.begin;
31075                            }
31076                        }
31077                        !0 !== i && (c.p = t === r.default.DELETE ? a.begin + p : a.begin, c.p = o.determineNewCaretPosition.call(u, {
31078                            begin: c.p,
31079                            end: c.p
31080                        }, !1).begin);
31081                    }
31082                };
31083                var i, n = a(4713), r = (i = a(4528)) && i.__esModule ? i : {
31084                    default: i
31085                }, o = a(8711), s = a(6030);
31086                function l(e, t, a, i, r, s) {
31087                    var u, c, d, p, h, v, m, g, k, y, b, x = this, P = this.dependencyLib, E = this.opts, S = x.maskset, _ = P.extend(!0, {}, S.validPositions), M = P.extend(!0, {}, S.tests), w = !1, O = !1, T = void 0 !== r ? r : o.getLastValidPosition.call(x);
31088                    if (s && (y = s.begin, b = s.end, s.begin > s.end && (y = s.end, b = s.begin)), 
31089                    -1 === T && void 0 === r) u = 0, c = (p = n.getTest.call(x, u)).alternation; else for (;T >= 0; T--) if ((d = S.validPositions[T]) && void 0 !== d.alternation) {
31090                        if (p && p.locator[d.alternation] !== d.locator[d.alternation]) break;
31091                        u = T, c = S.validPositions[u].alternation, p = d;
31092                    }
31093                    if (void 0 !== c) {
31094                        m = parseInt(u), S.excludes[m] = S.excludes[m] || [], !0 !== e && S.excludes[m].push((0, 
31095                        n.getDecisionTaker)(p) + ":" + p.alternation);
31096                        var C = [], A = -1;
31097                        for (h = m; h < o.getLastValidPosition.call(x, void 0, !0) + 1; h++) -1 === A && e <= h && void 0 !== t && (C.push(t), 
31098                        A = C.length - 1), (v = S.validPositions[h]) && !0 !== v.generatedInput && (void 0 === s || h < y || h >= b) && C.push(v.input), 
31099                        delete S.validPositions[h];
31100                        for (-1 === A && void 0 !== t && (C.push(t), A = C.length - 1); void 0 !== S.excludes[m] && S.excludes[m].length < 10; ) {
31101                            for (S.tests = {}, o.resetMaskSet.call(x, !0), w = !0, h = 0; h < C.length && (g = w.caret || o.getLastValidPosition.call(x, void 0, !0) + 1, 
31102                            k = C[h], w = f.call(x, g, k, !1, i, !0)); h++) h === A && (O = w), 1 == e && w && (O = {
31103                                caretPos: h
31104                            });
31105                            if (w) break;
31106                            if (o.resetMaskSet.call(x), p = n.getTest.call(x, m), S.validPositions = P.extend(!0, {}, _), 
31107                            S.tests = P.extend(!0, {}, M), !S.excludes[m]) {
31108                                O = l.call(x, e, t, a, i, m - 1, s);
31109                                break;
31110                            }
31111                            var D = (0, n.getDecisionTaker)(p);
31112                            if (-1 !== S.excludes[m].indexOf(D + ":" + p.alternation)) {
31113                                O = l.call(x, e, t, a, i, m - 1, s);
31114                                break;
31115                            }
31116                            for (S.excludes[m].push(D + ":" + p.alternation), h = m; h < o.getLastValidPosition.call(x, void 0, !0) + 1; h++) delete S.validPositions[h];
31117                        }
31118                    }
31119                    return O && !1 === E.keepStatic || delete S.excludes[m], O;
31120                }
31121                function u(e, t, a) {
31122                    var i = this.opts, n = this.maskset;
31123                    switch (i.casing || t.casing) {
31124                      case "upper":
31125                        e = e.toUpperCase();
31126                        break;
31127
31128                      case "lower":
31129                        e = e.toLowerCase();
31130                        break;
31131
31132                      case "title":
31133                        var o = n.validPositions[a - 1];
31134                        e = 0 === a || o && o.input === String.fromCharCode(r.default.SPACE) ? e.toUpperCase() : e.toLowerCase();
31135                        break;
31136
31137                      default:
31138                        if ("function" == typeof i.casing) {
31139                            var s = Array.prototype.slice.call(arguments);
31140                            s.push(n.validPositions), e = i.casing.apply(this, s);
31141                        }
31142                    }
31143                    return e;
31144                }
31145                function c(e) {
31146                    var t = this, a = this.opts, i = this.maskset;
31147                    if ("function" == typeof a.isComplete) return a.isComplete(e, a);
31148                    if ("*" !== a.repeat) {
31149                        var r = !1, s = o.determineLastRequiredPosition.call(t, !0), l = o.seekPrevious.call(t, s.l);
31150                        if (void 0 === s.def || s.def.newBlockMarker || s.def.optionality || s.def.optionalQuantifier) {
31151                            r = !0;
31152                            for (var u = 0; u <= l; u++) {
31153                                var c = n.getTestTemplate.call(t, u).match;
31154                                if (!0 !== c.static && void 0 === i.validPositions[u] && !0 !== c.optionality && !0 !== c.optionalQuantifier || !0 === c.static && e[u] !== n.getPlaceholder.call(t, u, c)) {
31155                                    r = !1;
31156                                    break;
31157                                }
31158                            }
31159                        }
31160                        return r;
31161                    }
31162                }
31163                function f(e, t, a, i, r, s, d) {
31164                    var m = this, g = this.dependencyLib, k = this.opts, y = m.maskset;
31165                    function b(e) {
31166                        return m.isRTL ? e.begin - e.end > 1 || e.begin - e.end == 1 : e.end - e.begin > 1 || e.end - e.begin == 1;
31167                    }
31168                    a = !0 === a;
31169                    var x = e;
31170                    function P(e) {
31171                        if (void 0 !== e) {
31172                            if (void 0 !== e.remove && (Array.isArray(e.remove) || (e.remove = [ e.remove ]), 
31173                            e.remove.sort((function(e, t) {
31174                                return t.pos - e.pos;
31175                            })).forEach((function(e) {
31176                                v.call(m, {
31177                                    begin: e,
31178                                    end: e + 1
31179                                });
31180                            })), e.remove = void 0), void 0 !== e.insert && (Array.isArray(e.insert) || (e.insert = [ e.insert ]), 
31181                            e.insert.sort((function(e, t) {
31182                                return e.pos - t.pos;
31183                            })).forEach((function(e) {
31184                                "" !== e.c && f.call(m, e.pos, e.c, void 0 === e.strict || e.strict, void 0 !== e.fromIsValid ? e.fromIsValid : i);
31185                            })), e.insert = void 0), e.refreshFromBuffer && e.buffer) {
31186                                var t = e.refreshFromBuffer;
31187                                p.call(m, !0 === t ? t : t.start, t.end, e.buffer), e.refreshFromBuffer = void 0;
31188                            }
31189                            void 0 !== e.rewritePosition && (x = e.rewritePosition, e = !0);
31190                        }
31191                        return e;
31192                    }
31193                    function E(t, a, r) {
31194                        var s = !1;
31195                        return n.getTests.call(m, t).every((function(l, c) {
31196                            var f = l.match;
31197                            if (o.getBuffer.call(m, !0), !1 !== (s = (!f.jit || void 0 !== y.validPositions[o.seekPrevious.call(m, t)]) && (null != f.fn ? f.fn.test(a, y, t, r, k, b(e)) : (a === f.def || a === k.skipOptionalPartCharacter) && "" !== f.def && {
31198                                c: n.getPlaceholder.call(m, t, f, !0) || f.def,
31199                                pos: t
31200                            }))) {
31201                                var d = void 0 !== s.c ? s.c : a, p = t;
31202                                return d = d === k.skipOptionalPartCharacter && !0 === f.static ? n.getPlaceholder.call(m, t, f, !0) || f.def : d, 
31203                                !0 !== (s = P(s)) && void 0 !== s.pos && s.pos !== t && (p = s.pos), !0 !== s && void 0 === s.pos && void 0 === s.c ? !1 : (!1 === v.call(m, e, g.extend({}, l, {
31204                                    input: u.call(m, d, f, p)
31205                                }), i, p) && (s = !1), !1);
31206                            }
31207                            return !0;
31208                        })), s;
31209                    }
31210                    void 0 !== e.begin && (x = m.isRTL ? e.end : e.begin);
31211                    var S = !0, _ = g.extend(!0, {}, y.validPositions);
31212                    if (!1 === k.keepStatic && void 0 !== y.excludes[x] && !0 !== r && !0 !== i) for (var M = x; M < (m.isRTL ? e.begin : e.end); M++) void 0 !== y.excludes[M] && (y.excludes[M] = void 0, 
31213                    delete y.tests[M]);
31214                    if ("function" == typeof k.preValidation && !0 !== i && !0 !== s && (S = P(S = k.preValidation.call(m, o.getBuffer.call(m), x, t, b(e), k, y, e, a || r))), 
31215                    !0 === S) {
31216                        if (S = E(x, t, a), (!a || !0 === i) && !1 === S && !0 !== s) {
31217                            var w = y.validPositions[x];
31218                            if (!w || !0 !== w.match.static || w.match.def !== t && t !== k.skipOptionalPartCharacter) {
31219                                if (k.insertMode || void 0 === y.validPositions[o.seekNext.call(m, x)] || e.end > x) {
31220                                    var O = !1;
31221                                    if (y.jitOffset[x] && void 0 === y.validPositions[o.seekNext.call(m, x)] && !1 !== (S = f.call(m, x + y.jitOffset[x], t, !0, !0)) && (!0 !== r && (S.caret = x), 
31222                                    O = !0), e.end > x && (y.validPositions[x] = void 0), !O && !o.isMask.call(m, x, k.keepStatic && 0 === x)) for (var T = x + 1, C = o.seekNext.call(m, x, !1, 0 !== x); T <= C; T++) if (!1 !== (S = E(T, t, a))) {
31223                                        S = h.call(m, x, void 0 !== S.pos ? S.pos : T) || S, x = T;
31224                                        break;
31225                                    }
31226                                }
31227                            } else S = {
31228                                caret: o.seekNext.call(m, x)
31229                            };
31230                        }
31231                        !1 !== S || !k.keepStatic || !c.call(m, o.getBuffer.call(m)) && 0 !== x || a || !0 === r ? b(e) && y.tests[x] && y.tests[x].length > 1 && k.keepStatic && !a && !0 !== r && (S = l.call(m, !0)) : S = l.call(m, x, t, a, i, void 0, e), 
31232                        !0 === S && (S = {
31233                            pos: x
31234                        });
31235                    }
31236                    if ("function" == typeof k.postValidation && !0 !== i && !0 !== s) {
31237                        var A = k.postValidation.call(m, o.getBuffer.call(m, !0), void 0 !== e.begin ? m.isRTL ? e.end : e.begin : e, t, S, k, y, a, d);
31238                        void 0 !== A && (S = !0 === A ? S : A);
31239                    }
31240                    S && void 0 === S.pos && (S.pos = x), !1 === S || !0 === s ? (o.resetMaskSet.call(m, !0), 
31241                    y.validPositions = g.extend(!0, {}, _)) : h.call(m, void 0, x, !0);
31242                    var D = P(S);
31243                    void 0 !== m.maxLength && (o.getBuffer.call(m).length > m.maxLength && !i && (o.resetMaskSet.call(m, !0), 
31244                    y.validPositions = g.extend(!0, {}, _), D = !1));
31245                    return D;
31246                }
31247                function d(e, t, a) {
31248                    for (var i = this.maskset, r = !1, o = n.getTests.call(this, e), s = 0; s < o.length; s++) {
31249                        if (o[s].match && (o[s].match.nativeDef === t.match[a.shiftPositions ? "def" : "nativeDef"] && (!a.shiftPositions || !t.match.static) || o[s].match.nativeDef === t.match.nativeDef || a.regex && !o[s].match.static && o[s].match.fn.test(t.input))) {
31250                            r = !0;
31251                            break;
31252                        }
31253                        if (o[s].match && o[s].match.def === t.match.nativeDef) {
31254                            r = void 0;
31255                            break;
31256                        }
31257                    }
31258                    return !1 === r && void 0 !== i.jitOffset[e] && (r = d.call(this, e + i.jitOffset[e], t, a)), 
31259                    r;
31260                }
31261                function p(e, t, a) {
31262                    var i, n, r = this, l = this.maskset, u = this.opts, c = this.dependencyLib, f = u.skipOptionalPartCharacter, d = r.isRTL ? a.slice().reverse() : a;
31263                    if (u.skipOptionalPartCharacter = "", !0 === e) o.resetMaskSet.call(r), l.tests = {}, 
31264                    e = 0, t = a.length, n = o.determineNewCaretPosition.call(r, {
31265                        begin: 0,
31266                        end: 0
31267                    }, !1).begin; else {
31268                        for (i = e; i < t; i++) delete l.validPositions[i];
31269                        n = e;
31270                    }
31271                    var p = new c.Event("keypress");
31272                    for (i = e; i < t; i++) {
31273                        p.which = d[i].toString().charCodeAt(0), r.ignorable = !1;
31274                        var h = s.EventHandlers.keypressEvent.call(r, p, !0, !1, !1, n);
31275                        !1 !== h && void 0 !== h && (n = h.forwardPosition);
31276                    }
31277                    u.skipOptionalPartCharacter = f;
31278                }
31279                function h(e, t, a) {
31280                    var i = this, r = this.maskset, s = this.dependencyLib;
31281                    if (void 0 === e) for (e = t - 1; e > 0 && !r.validPositions[e]; e--) ;
31282                    for (var l = e; l < t; l++) {
31283                        if (void 0 === r.validPositions[l] && !o.isMask.call(i, l, !1)) if (0 == l ? n.getTest.call(i, l) : r.validPositions[l - 1]) {
31284                            var u = n.getTests.call(i, l).slice();
31285                            "" === u[u.length - 1].match.def && u.pop();
31286                            var c, d = n.determineTestTemplate.call(i, l, u);
31287                            if (d && (!0 !== d.match.jit || "master" === d.match.newBlockMarker && (c = r.validPositions[l + 1]) && !0 === c.match.optionalQuantifier) && ((d = s.extend({}, d, {
31288                                input: n.getPlaceholder.call(i, l, d.match, !0) || d.match.def
31289                            })).generatedInput = !0, v.call(i, l, d, !0), !0 !== a)) {
31290                                var p = r.validPositions[t].input;
31291                                return r.validPositions[t] = void 0, f.call(i, t, p, !0, !0);
31292                            }
31293                        }
31294                    }
31295                }
31296                function v(e, t, a, i) {
31297                    var r = this, s = this.maskset, l = this.opts, u = this.dependencyLib;
31298                    function c(e, t, a) {
31299                        var i = t[e];
31300                        if (void 0 !== i && !0 === i.match.static && !0 !== i.match.optionality && (void 0 === t[0] || void 0 === t[0].alternation)) {
31301                            var n = a.begin <= e - 1 ? t[e - 1] && !0 === t[e - 1].match.static && t[e - 1] : t[e - 1], r = a.end > e + 1 ? t[e + 1] && !0 === t[e + 1].match.static && t[e + 1] : t[e + 1];
31302                            return n && r;
31303                        }
31304                        return !1;
31305                    }
31306                    var p = 0, h = void 0 !== e.begin ? e.begin : e, v = void 0 !== e.end ? e.end : e, m = !0;
31307                    if (e.begin > e.end && (h = e.end, v = e.begin), i = void 0 !== i ? i : h, h !== v || l.insertMode && void 0 !== s.validPositions[i] && void 0 === a || void 0 === t) {
31308                        var g, k = u.extend(!0, {}
31308, s.validPositions), y = o.getLastValidPosition.call(r, void 0, !0);
31309                        for (s.p = h, g = y; g >= h; g--) delete s.validPositions[g], void 0 === t && delete s.tests[g + 1];
31310                        var b, x, P = i, E = P;
31311                        for (t && (s.validPositions[i] = u.extend(!0, {}, t), E++, P++), g = t ? v : v - 1; g <= y; g++) {
31312                            if (void 0 !== (b = k[g]) && !0 !== b.generatedInput && (g >= v || g >= h && c(g, k, {
31313                                begin: h,
31314                                end: v
31315                            }))) {
31316                                for (;"" !== n.getTest.call(r, E).match.def; ) {
31317                                    if (!1 !== (x = d.call(r, E, b, l)) || "+" === b.match.def) {
31318                                        "+" === b.match.def && o.getBuffer.call(r, !0);
31319                                        var S = f.call(r, E, b.input, "+" !== b.match.def, !0);
31320                                        if (m = !1 !== S, P = (S.pos || E) + 1, !m && x) break;
31321                                    } else m = !1;
31322                                    if (m) {
31323                                        void 0 === t && b.match.static && g === e.begin && p++;
31324                                        break;
31325                                    }
31326                                    if (!m && E > s.maskLength) break;
31327                                    E++;
31328                                }
31329                                "" == n.getTest.call(r, E).match.def && (m = !1), E = P;
31330                            }
31331                            if (!m) break;
31332                        }
31333                        if (!m) return s.validPositions = u.extend(!0, {}, k), o.resetMaskSet.call(r, !0), 
31334                        !1;
31335                    } else t && n.getTest.call(r, i).match.cd === t.match.cd && (s.validPositions[i] = u.extend(!0, {}, t));
31336                    return o.resetMaskSet.call(r, !0), p;
31337                }
31338            }
31339        }, t = {};
31340        function a(i) {
31341            var n = t[i];
31342            if (void 0 !== n) return n.exports;
31343            var r = t[i] = {
31344                exports: {}
31345            };
31346            return e[i](r, r.exports, a), r.exports;
31347        }
31348        var i = {};
31349        return function() {
31350            var e, t = i;
31351            Object.defineProperty(t, "__esModule", {
31352                value: !0
31353            }), t.default = void 0, a(3851), a(219), a(207), a(5296);
31354            var n = ((e = a(2394)) && e.__esModule ? e : {
31355                default: e
31356            }).default;
31357            t.default = n;
31358        }(), i;
31359    }();
31360}));
31361/*
31362 Input Mask plugin binding
31363 http://github.com/RobinHerbots/jquery.inputmask
31364 Copyright (c) Robin Herbots
31365 Licensed under the MIT license
31366 */
31367(function (factory) {
31368	factory(jQuery, window.Inputmask, window);
31369}
31370(function ($, Inputmask, window) {
31371	$(window.document).ajaxComplete(function (event, xmlHttpRequest, ajaxOptions) {
31372		if ($.inArray("html", ajaxOptions.dataTypes) !== -1) {
31373			$(".inputmask, [data-inputmask], [data-inputmask-mask], [data-inputmask-alias], [data-inputmask-regex]").each(function (ndx, lmnt) {
31374				if (lmnt.inputmask === undefined) {
31375					Inputmask().mask(lmnt);
31376				}
31377			});
31378		}
31379	}).ready(function () {
31380		$(".inputmask, [data-inputmask], [data-inputmask-mask], [data-inputmask-alias],[data-inputmask-regex]").each(function (ndx, lmnt) {
31381			if (lmnt.inputmask === undefined) {
31382				Inputmask().mask(lmnt);
31383			}
31384		});
31385	});
31386}));
31387
31388var tns = (function (){
31389var win = window;
31390
31391var raf = win.requestAnimationFrame
31392  || win.webkitRequestAnimationFrame
31393  || win.mozRequestAnimationFrame
31394  || win.msRequestAnimationFrame
31395  || function(cb) { return setTimeout(cb, 16); };
31396
31397var win$1 = window;
31398
31399var caf = win$1.cancelAnimationFrame
31400  || win$1.mozCancelAnimationFrame
31401  || function(id){ clearTimeout(id); };
31402
31403function extend() {
31404  var obj, name, copy,
31405      target = arguments[0] || {},
31406      i = 1,
31407      length = arguments.length;
31408
31409  for (; i < length; i++) {
31410    if ((obj = arguments[i]) !== null) {
31411      for (name in obj) {
31412        copy = obj[name];
31413
31414        if (target === copy) {
31415          continue;
31416        } else if (copy !== undefined) {
31417          target[name] = copy;
31418        }
31419      }
31420    }
31421  }
31422  return target;
31423}
31424
31425function checkStorageValue (value) {
31426  return ['true', 'false'].indexOf(value) >= 0 ? JSON.parse(value) : value;
31427}
31428
31429function setLocalStorage(storage, key, value, access) {
31430  if (access) {
31431    try { storage.setItem(key, value); } catch (e) {}
31432  }
31433  return value;
31434}
31435
31436function getSlideId() {
31437  var id = window.tnsId;
31438  window.tnsId = !id ? 1 : id + 1;
31439  
31440  return 'tns' + window.tnsId;
31441}
31442
31443function getBody () {
31444  var doc = document,
31445      body = doc.body;
31446
31447  if (!body) {
31448    body = doc.createElement('body');
31449    body.fake = true;
31450  }
31451
31452  return body;
31453}
31454
31455var docElement = document.documentElement;
31456
31457function setFakeBody (body) {
31458  var docOverflow = '';
31459  if (body.fake) {
31460    docOverflow = docElement.style.overflow;
31461    //avoid crashing IE8, if background image is used
31462    body.style.background = '';
31463    //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible
31464    body.style.overflow = docElement.style.overflow = 'hidden';
31465    docElement.appendChild(body);
31466  }
31467
31468  return docOverflow;
31469}
31470
31471function resetFakeBody (body, docOverflow) {
31472  if (body.fake) {
31473    body.remove();
31474    docElement.style.overflow = docOverflow;
31475    // Trigger layout so kinetic scrolling isn't disabled in iOS6+
31476    // eslint-disable-next-line
31477    docElement.offsetHeight;
31478  }
31479}
31480
31481// get css-calc 
31482
31483function calc() {
31484  var doc = document, 
31485      body = getBody(),
31486      docOverflow = setFakeBody(body),
31487      div = doc.createElement('div'), 
31488      result = false;
vendor: 98,832 bytes, lines 31489-34605
31489
31490  body.appendChild(div);
31491  try {
31492    var str = '(10px * 10)',
31493        vals = ['calc' + str, '-moz-calc' + str, '-webkit-calc' + str],
31494        val;
31495    for (var i = 0; i < 3; i++) {
31496      val = vals[i];
31497      div.style.width = val;
31498      if (div.offsetWidth === 100) { 
31499        result = val.replace(str, ''); 
31500        break;
31501      }
31502    }
31503  } catch (e) {}
31504  
31505  body.fake ? resetFakeBody(body, docOverflow) : div.remove();
31506
31507  return result;
31508}
31509
31510// get subpixel support value
31511
31512function percentageLayout() {
31513  // check subpixel layout supporting
31514  var doc = document,
31515      body = getBody(),
31516      docOverflow = setFakeBody(body),
31517      wrapper = doc.createElement('div'),
31518      outer = doc.createElement('div'),
31519      str = '',
31520      count = 70,
31521      perPage = 3,
31522      supported = false;
31523
31524  wrapper.className = "tns-t-subp2";
31525  outer.className = "tns-t-ct";
31526
31527  for (var i = 0; i < count; i++) {
31528    str += '<div></div>';
31529  }
31530
31531  outer.innerHTML = str;
31532  wrapper.appendChild(outer);
31533  body.appendChild(wrapper);
31534
31535  supported = Math.abs(wrapper.getBoundingClientRect().left - outer.children[count - perPage].getBoundingClientRect().left) < 2;
31536
31537  body.fake ? resetFakeBody(body, docOverflow) : wrapper.remove();
31538
31539  return supported;
31540}
31541
31542function mediaquerySupport () {
31543  if (window.matchMedia || window.msMatchMedia) {
31544    return true;
31545  }
31546  
31547  var doc = document,
31548      body = getBody(),
31549      docOverflow = setFakeBody(body),
31550      div = doc.createElement('div'),
31551      style = doc.createElement('style'),
31552      rule = '@media all and (min-width:1px){.tns-mq-test{position:absolute}}',
31553      position;
31554
31555  style.type = 'text/css';
31556  div.className = 'tns-mq-test';
31557
31558  body.appendChild(style);
31559  body.appendChild(div);
31560
31561  if (style.styleSheet) {
31562    style.styleSheet.cssText = rule;
31563  } else {
31564    style.appendChild(doc.createTextNode(rule));
31565  }
31566
31567  position = window.getComputedStyle ? window.getComputedStyle(div).position : div.currentStyle['position'];
31568
31569  body.fake ? resetFakeBody(body, docOverflow) : div.remove();
31570
31571  return position === "absolute";
31572}
31573
31574// create and append style sheet
31575function createStyleSheet (media, nonce) {
31576  // Create the <style> tag
31577  var style = document.createElement("style");
31578  // style.setAttribute("type", "text/css");
31579
31580  // Add a media (and/or media query) here if you'd like!
31581  // style.setAttribute("media", "screen")
31582  // style.setAttribute("media", "only screen and (max-width : 1024px)")
31583  if (media) { style.setAttribute("media", media); }
31584
31585  // Add nonce attribute for Content Security Policy
31586  if (nonce) { style.setAttribute("nonce", nonce); }
31587
31588  // WebKit hack :(
31589  // style.appendChild(document.createTextNode(""));
31590
31591  // Add the <style> element to the page
31592  document.querySelector('head').appendChild(style);
31593
31594  return style.sheet ? style.sheet : style.styleSheet;
31595}
31596
31597// cross browsers addRule method
31598function addCSSRule(sheet, selector, rules, index) {
31599  // return raf(function() {
31600    'insertRule' in sheet ?
31601      sheet.insertRule(selector + '{' + rules + '}', index) :
31602      sheet.addRule(selector, rules, index);
31603  // });
31604}
31605
31606// cross browsers addRule method
31607function removeCSSRule(sheet, index) {
31608  // return raf(function() {
31609    'deleteRule' in sheet ?
31610      sheet.deleteRule(index) :
31611      sheet.removeRule(index);
31612  // });
31613}
31614
31615function getCssRulesLength(sheet) {
31616  var rule = ('insertRule' in sheet) ? sheet.cssRules : sheet.rules;
31617  return rule.length;
31618}
31619
31620function toDegree (y, x) {
31621  return Math.atan2(y, x) * (180 / Math.PI);
31622}
31623
31624function getTouchDirection(angle, range) {
31625  var direction = false,
31626      gap = Math.abs(90 - Math.abs(angle));
31627      
31628  if (gap >= 90 - range) {
31629    direction = 'horizontal';
31630  } else if (gap <= range) {
31631    direction = 'vertical';
31632  }
31633
31634  return direction;
31635}
31636
31637// https://toddmotto.com/ditch-the-array-foreach-call-nodelist-hack/
31638function forEach (arr, callback, scope) {
31639  for (var i = 0, l = arr.length; i < l; i++) {
31640    callback.call(scope, arr[i], i);
31641  }
31642}
31643
31644var classListSupport = 'classList' in document.createElement('_');
31645
31646var hasClass = classListSupport ?
31647    function (el, str) { return el.classList.contains(str); } :
31648    function (el, str) { return el.className.indexOf(str) >= 0; };
31649
31650var addClass = classListSupport ?
31651    function (el, str) {
31652      if (!hasClass(el,  str)) { el.classList.add(str); }
31653    } :
31654    function (el, str) {
31655      if (!hasClass(el,  str)) { el.className += ' ' + str; }
31656    };
31657
31658var removeClass = classListSupport ?
31659    function (el, str) {
31660      if (hasClass(el,  str)) { el.classList.remove(str); }
31661    } :
31662    function (el, str) {
31663      if (hasClass(el, str)) { el.className = el.className.replace(str, ''); }
31664    };
31665
31666function hasAttr(el, attr) {
31667  return el.hasAttribute(attr);
31668}
31669
31670function getAttr(el, attr) {
31671  return el.getAttribute(attr);
31672}
31673
31674function isNodeList(el) {
31675  // Only NodeList has the "item()" function
31676  return typeof el.item !== "undefined"; 
31677}
31678
31679function setAttrs(els, attrs) {
31680  els = (isNodeList(els) || els instanceof Array) ? els : [els];
31681  if (Object.prototype.toString.call(attrs) !== '[object Object]') { return; }
31682
31683  for (var i = els.length; i--;) {
31684    for(var key in attrs) {
31685      els[i].setAttribute(key, attrs[key]);
31686    }
31687  }
31688}
31689
31690function removeAttrs(els, attrs) {
31691  els = (isNodeList(els) || els instanceof Array) ? els : [els];
31692  attrs = (attrs instanceof Array) ? attrs : [attrs];
31693
31694  var attrLength = attrs.length;
31695  for (var i = els.length; i--;) {
31696    for (var j = attrLength; j--;) {
31697      els[i].removeAttribute(attrs[j]);
31698    }
31699  }
31700}
31701
31702function arrayFromNodeList (nl) {
31703  var arr = [];
31704  for (var i = 0, l = nl.length; i < l; i++) {
31705    arr.push(nl[i]);
31706  }
31707  return arr;
31708}
31709
31710function hideElement(el, forceHide) {
31711  if (el.style.display !== 'none') { el.style.display = 'none'; }
31712}
31713
31714function showElement(el, forceHide) {
31715  if (el.style.display === 'none') { el.style.display = ''; }
31716}
31717
31718function isVisible(el) {
31719  return window.getComputedStyle(el).display !== 'none';
31720}
31721
31722function whichProperty(props){
31723  if (typeof props === 'string') {
31724    var arr = [props],
31725        Props = props.charAt(0).toUpperCase() + props.substr(1),
31726        prefixes = ['Webkit', 'Moz', 'ms', 'O'];
31727        
31728    prefixes.forEach(function(prefix) {
31729      if (prefix !== 'ms' || props === 'transform') {
31730        arr.push(prefix + Props);
31731      }
31732    });
31733
31734    props = arr;
31735  }
31736
31737  var el = document.createElement('fakeelement'),
31738      len = props.length;
31739  for(var i = 0; i < props.length; i++){
31740    var prop = props[i];
31741    if( el.style[prop] !== undefined ){ return prop; }
31742  }
31743
31744  return false; // explicit for ie9-
31745}
31746
31747function has3DTransforms(tf){
31748  if (!tf) { return false; }
31749  if (!window.getComputedStyle) { return false; }
31750  
31751  var doc = document,
31752      body = getBody(),
31753      docOverflow = setFakeBody(body),
31754      el = doc.createElement('p'),
31755      has3d,
31756      cssTF = tf.length > 9 ? '-' + tf.slice(0, -9).toLowerCase() + '-' : '';
31757
31758  cssTF += 'transform';
31759
31760  // Add it to the body to get the computed style
31761  body.insertBefore(el, null);
31762
31763  el.style[tf] = 'translate3d(1px,1px,1px)';
31764  has3d = window.getComputedStyle(el).getPropertyValue(cssTF);
31765
31766  body.fake ? resetFakeBody(body, docOverflow) : el.remove();
31767
31768  return (has3d !== undefined && has3d.length > 0 && has3d !== "none");
31769}
31770
31771// get transitionend, animationend based on transitionDuration
31772// @propin: string
31773// @propOut: string, first-letter uppercase
31774// Usage: getEndProperty('WebkitTransitionDuration', 'Transition') => webkitTransitionEnd
31775function getEndProperty(propIn, propOut) {
31776  var endProp = false;
31777  if (/^Webkit/.test(propIn)) {
31778    endProp = 'webkit' + propOut + 'End';
31779  } else if (/^O/.test(propIn)) {
31780    endProp = 'o' + propOut + 'End';
31781  } else if (propIn) {
31782    endProp = propOut.toLowerCase() + 'end';
31783  }
31784  return endProp;
31785}
31786
31787// Test via a getter in the options object to see if the passive property is accessed
31788var supportsPassive = false;
31789try {
31790  var opts = Object.defineProperty({}, 'passive', {
31791    get: function() {
31792      supportsPassive = true;
31793    }
31794  });
31795  window.addEventListener("test", null, opts);
31796} catch (e) {}
31797var passiveOption = supportsPassive ? { passive: true } : false;
31798
31799function addEvents(el, obj, preventScrolling) {
31800  for (var prop in obj) {
31801    var option = ['touchstart', 'touchmove'].indexOf(prop) >= 0 && !preventScrolling ? passiveOption : false;
31802    el.addEventListener(prop, obj[prop], option);
31803  }
31804}
31805
31806function removeEvents(el, obj) {
31807  for (var prop in obj) {
31808    var option = ['touchstart', 'touchmove'].indexOf(prop) >= 0 ? passiveOption : false;
31809    el.removeEventListener(prop, obj[prop], option);
31810  }
31811}
31812
31813function Events() {
31814  return {
31815    topics: {},
31816    on: function (eventName, fn) {
31817      this.topics[eventName] = this.topics[eventName] || [];
31818      this.topics[eventName].push(fn);
31819    },
31820    off: function(eventName, fn) {
31821      if (this.topics[eventName]) {
31822        for (var i = 0; i < this.topics[eventName].length; i++) {
31823          if (this.topics[eventName][i] === fn) {
31824            this.topics[eventName].splice(i, 1);
31825            break;
31826          }
31827        }
31828      }
31829    },
31830    emit: function (eventName, data) {
31831      data.type = eventName;
31832      if (this.topics[eventName]) {
31833        this.topics[eventName].forEach(function(fn) {
31834          fn(data, eventName);
31835        });
31836      }
31837    }
31838  };
31839}
31840
31841function jsTransform(element, attr, prefix, postfix, to, duration, callback) {
31842  var tick = Math.min(duration, 10),
31843      unit = (to.indexOf('%') >= 0) ? '%' : 'px',
31844      to = to.replace(unit, ''),
31845      from = Number(element.style[attr].replace(prefix, '').replace(postfix, '').replace(unit, '')),
31846      positionTick = (to - from) / duration * tick,
31847      running;
31848
31849  setTimeout(moveElement, tick);
31850  function moveElement() {
31851    duration -= tick;
31852    from += positionTick;
31853    element.style[attr] = prefix + from + unit + postfix;
31854    if (duration > 0) { 
31855      setTimeout(moveElement, tick); 
31856    } else {
31857      callback();
31858    }
31859  }
31860}
31861
31862// Object.keys
31863if (!Object.keys) {
31864  Object.keys = function(object) {
31865    var keys = [];
31866    for (var name in object) {
31867      if (Object.prototype.hasOwnProperty.call(object, name)) {
31868        keys.push(name);
31869      }
31870    }
31871    return keys;
31872  };
31873}
31874
31875// ChildNode.remove
31876if(!("remove" in Element.prototype)){
31877  Element.prototype.remove = function(){
31878    if(this.parentNode) {
31879      this.parentNode.removeChild(this);
31880    }
31881  };
31882}
31883
31884var tns = function(options) {
31885  options = extend({
31886    container: '.slider',
31887    mode: 'carousel',
31888    axis: 'horizontal',
31889    items: 1,
31890    gutter: 0,
31891    edgePadding: 0,
31892    fixedWidth: false,
31893    autoWidth: false,
31894    viewportMax: false,
31895    slideBy: 1,
31896    center: false,
31897    controls: true,
31898    controlsPosition: 'top',
31899    controlsText: ['prev', 'next'],
31900    controlsContainer: false,
31901    prevButton: false,
31902    nextButton: false,
31903    nav: true,
31904    navPosition: 'top',
31905    navContainer: false,
31906    navAsThumbnails: false,
31907    arrowKeys: false,
31908    speed: 300,
31909    autoplay: false,
31910    autoplayPosition: 'top',
31911    autoplayTimeout: 5000,
31912    autoplayDirection: 'forward',
31913    autoplayText: ['start', 'stop'],
31914    autoplayHoverPause: false,
31915    autoplayButton: false,
31916    autoplayButtonOutput: true,
31917    autoplayResetOnVisibility: true,
31918    animateIn: 'tns-fadeIn',
31919    animateOut: 'tns-fadeOut',
31920    animateNormal: 'tns-normal',
31921    animateDelay: false,
31922    loop: true,
31923    rewind: false,
31924    autoHeight: false,
31925    responsive: false,
31926    lazyload: false,
31927    lazyloadSelector: '.tns-lazy-img',
31928    touch: true,
31929    mouseDrag: false,
31930    swipeAngle: 15,
31931    nested: false,
31932    preventActionWhenRunning: false,
31933    preventScrollOnTouch: false,
31934    freezable: true,
31935    onInit: false,
31936    useLocalStorage: true,
31937    nonce: false
31938  }, options || {});
31939
31940  var doc = document,
31941      win = window,
31942      KEYS = {
31943        ENTER: 13,
31944        SPACE: 32,
31945        LEFT: 37,
31946        RIGHT: 39
31947      },
31948      tnsStorage = {},
31949      localStorageAccess = options.useLocalStorage;
31950
31951  if (localStorageAccess) {
31952    // check browser version and local storage access
31953    var browserInfo = navigator.userAgent;
31954    var uid = new Date;
31955
31956    try {
31957      tnsStorage = win.localStorage;
31958      if (tnsStorage) {
31959        tnsStorage.setItem(uid, uid);
31960        localStorageAccess = tnsStorage.getItem(uid) == uid;
31961        tnsStorage.removeItem(uid);
31962      } else {
31963        localStorageAccess = false;
31964      }
31965      if (!localStorageAccess) { tnsStorage = {}; }
31966    } catch(e) {
31967      localStorageAccess = false;
31968    }
31969
31970    if (localStorageAccess) {
31971      // remove storage when browser version changes
31972      if (tnsStorage['tnsApp'] && tnsStorage['tnsApp'] !== browserInfo) {
31973        ['tC', 'tPL', 'tMQ', 'tTf', 't3D', 'tTDu', 'tTDe', 'tADu', 'tADe', 'tTE', 'tAE'].forEach(function(item) { tnsStorage.removeItem(item); });
31974      }
31975      // update browserInfo
31976      localStorage['tnsApp'] = browserInfo;
31977    }
31978  }
31979
31980  var CALC = tnsStorage['tC'] ? checkStorageValue(tnsStorage['tC']) : setLocalStorage(tnsStorage, 'tC', calc(), localStorageAccess),
31981      PERCENTAGELAYOUT = tnsStorage['tPL'] ? checkStorageValue(tnsStorage['tPL']) : setLocalStorage(tnsStorage, 'tPL', percentageLayout(), localStorageAccess),
31982      CSSMQ = tnsStorage['tMQ'] ? checkStorageValue(tnsStorage['tMQ']) : setLocalStorage(tnsStorage, 'tMQ', mediaquerySupport(), localStorageAccess),
31983      TRANSFORM = tnsStorage['tTf'] ? checkStorageValue(tnsStorage['tTf']) : setLocalStorage(tnsStorage, 'tTf', whichProperty('transform'), localStorageAccess),
31984      HAS3DTRANSFORMS = tnsStorage['t3D'] ? checkStorageValue(tnsStorage['t3D']) : setLocalStorage(tnsStorage, 't3D', has3DTransforms(TRANSFORM), localStorageAccess),
31985      TRANSITIONDURATION = tnsStorage['tTDu'] ? checkStorageValue(tnsStorage['tTDu']) : setLocalStorage(tnsStorage, 'tTDu', whichProperty('transitionDuration'), localStorageAccess),
31986      TRANSITIONDELAY = tnsStorage['tTDe'] ? checkStorageValue(tnsStorage['tTDe']) : setLocalStorage(tnsStorage, 'tTDe', whichProperty('transitionDelay'), localStorageAccess),
31987      ANIMATIONDURATION = tnsStorage['tADu'] ? checkStorageValue(tnsStorage['tADu']) : setLocalStorage(tnsStorage, 'tADu', whichProperty('animationDuration'), localStorageAccess),
31988      ANIMATIONDELAY = tnsStorage['tADe'] ? checkStorageValue(tnsStorage['tADe']) : setLocalStorage(tnsStorage, 'tADe', whichProperty('animationDelay'), localStorageAccess),
31989      TRANSITIONEND = tnsStorage['tTE'] ? checkStorageValue(tnsStorage['tTE']) : setLocalStorage(tnsStorage, 'tTE', getEndProperty(TRANSITIONDURATION, 'Transition'), localStorageAccess),
31990      ANIMATIONEND = tnsStorage['tAE'] ? checkStorageValue(tnsStorage['tAE']) : setLocalStorage(tnsStorage, 'tAE', getEndProperty(ANIMATIONDURATION, 'Animation'), localStorageAccess);
31991
31992  // get element nodes from selectors
31993  var supportConsoleWarn = win.console && typeof win.console.warn === "function",
31994      tnsList = ['container', 'controlsContainer', 'prevButton', 'nextButton', 'navContainer', 'autoplayButton'],
31995      optionsElements = {};
31996
31997  tnsList.forEach(function(item) {
31998    if (typeof options[item] === 'string') {
31999      var str = options[item],
32000          el = doc.querySelector(str);
32001      optionsElements[item] = str;
32002
32003      if (el && el.nodeName) {
32004        options[item] = el;
32005      } else {
32006        if (supportConsoleWarn) { console.warn('Can\'t find', options[item]); }
32007        return;
32008      }
32009    }
32010  });
32011
32012  // make sure at least 1 slide
32013  if (options.container.children.length < 1) {
32014    if (supportConsoleWarn) { console.warn('No slides found in', options.container); }
32015    return;
32016   }
32017
32018  // update options
32019  var responsive = options.responsive,
32020      nested = options.nested,
32021      carousel = options.mode === 'carousel' ? true : false;
32022
32023  if (responsive) {
32024    // apply responsive[0] to options and remove it
32025    if (0 in responsive) {
32026      options = extend(options, responsive[0]);
32027      delete responsive[0];
32028    }
32029
32030    var responsiveTem = {};
32031    for (var key in responsive) {
32032      var val = responsive[key];
32033      // update responsive
32034      // from: 300: 2
32035      // to:
32036      //   300: {
32037      //     items: 2
32038      //   }
32039      val = typeof val === 'number' ? {items: val} : val;
32040      responsiveTem[key] = val;
32041    }
32042    responsive = responsiveTem;
32043    responsiveTem = null;
32044  }
32045
32046  // update options
32047  function updateOptions (obj) {
32048    for (var key in obj) {
32049      if (!carousel) {
32050        if (key === 'slideBy') { obj[key] = 'page'; }
32051        if (key === 'edgePadding') { obj[key] = false; }
32052        if (key === 'autoHeight') { obj[key] = false; }
32053      }
32054
32055      // update responsive options
32056      if (key === 'responsive') { updateOptions(obj[key]); }
32057    }
32058  }
32059  if (!carousel) { updateOptions(options); }
32060
32061
32062  // === define and set variables ===
32063  if (!carousel) {
32064    options.axis = 'horizontal';
32065    options.slideBy = 'page';
32066    options.edgePadding = false;
32067
32068    var animateIn = options.animateIn,
32069        animateOut = options.animateOut,
32070        animateDelay = options.animateDelay,
32071        animateNormal = options.animateNormal;
32072  }
32073
32074  var horizontal = options.axis === 'horizontal' ? true : false,
32075      outerWrapper = doc.createElement('div'),
32076      innerWrapper = doc.createElement('div'),
32077      middleWrapper,
32078      container = options.container,
32079      containerParent = container.parentNode,
32080      containerHTML = container.outerHTML,
32081      slideItems = container.children,
32082      slideCount = slideItems.length,
32083      breakpointZone,
32084      windowWidth = getWindowWidth(),
32085      isOn = false;
32086  if (responsive) { setBreakpointZone(); }
32087  if (carousel) { container.className += ' tns-vpfix'; }
32088
32089  // fixedWidth: viewport > rightBoundary > indexMax
32090  var autoWidth = options.autoWidth,
32091      fixedWidth = getOption('fixedWidth'),
32092      edgePadding = getOption('edgePadding'),
32093      gutter = getOption('gutter'),
32094      viewport = getViewportWidth(),
32095      center = getOption('center'),
32096      items = !autoWidth ? Math.floor(getOption('items')) : 1,
32097      slideBy = getOption('slideBy'),
32098      viewportMax = options.viewportMax || options.fixedWidthViewportWidth,
32099      arrowKeys = getOption('arrowKeys'),
32100      speed = getOption('speed'),
32101      rewind = options.rewind,
32102      loop = rewind ? false : options.loop,
32103      autoHeight = getOption('autoHeight'),
32104      controls = getOption('controls'),
32105      controlsText = getOption('controlsText'),
32106      nav = getOption('nav'),
32107      touch = getOption('touch'),
32108      mouseDrag = getOption('mouseDrag'),
32109      autoplay = getOption('autoplay'),
32110      autoplayTimeout = getOption('autoplayTimeout'),
32111      autoplayText = getOption('autoplayText'),
32112      autoplayHoverPause = getOption('autoplayHoverPause'),
32113      autoplayResetOnVisibility = getOption('autoplayResetOnVisibility'),
32114      sheet = createStyleSheet(null, getOption('nonce')),
32115      lazyload = options.lazyload,
32116      lazyloadSelector = options.lazyloadSelector,
32117      slidePositions, // collection of slide positions
32118      slideItemsOut = [],
32119      cloneCount = loop ? getCloneCountForLoop() : 0,
32120      slideCountNew = !carousel ? slideCount + cloneCount : slideCount + cloneCount * 2,
32121      hasRightDeadZone = (fixedWidth || autoWidth) && !loop ? true : false,
32122      rightBoundary = fixedWidth ? getRightBoundary() : null,
32123      updateIndexBeforeTransform = (!carousel || !loop) ? true : false,
32124      // transform
32125      transformAttr = horizontal ? 'left' : 'top',
32126      transformPrefix = '',
32127      transformPostfix = '',
32128      // index
32129      getIndexMax = (function () {
32130        if (fixedWidth) {
32131          return function() { return center && !loop ? slideCount - 1 : Math.ceil(- rightBoundary / (fixedWidth + gutter)); };
32132        } else if (autoWidth) {
32133          return function() {
32134            for (var i = 0; i < slideCountNew; i++) {
32135              if (slidePositions[i] >= - rightBoundary) { return i; }
32136            }
32137          };
32138        } else {
32139          return function() {
32140            if (center && carousel && !loop) {
32141              return slideCount - 1;
32142            } else {
32143              return loop || carousel ? Math.max(0, slideCountNew - Math.ceil(items)) : slideCountNew - 1;
32144            }
32145          };
32146        }
32147      })(),
32148      index = getStartIndex(getOption('startIndex')),
32149      indexCached = index,
32150      displayIndex = getCurrentSlide(),
32151      indexMin = 0,
32152      indexMax = !autoWidth ? getIndexMax() : null,
32153      // resize
32154      resizeTimer,
32155      preventActionWhenRunning = options.preventActionWhenRunning,
32156      swipeAngle = options.swipeAngle,
32157      moveDirectionExpected = swipeAngle ? '?' : true,
32158      running = false,
32159      onInit = options.onInit,
32160      events = new Events(),
32161      // id, class
32162      newContainerClasses = ' tns-slider tns-' + options.mode,
32163      slideId = container.id || getSlideId(),
32164      disable = getOption('disable'),
32165      disabled = false,
32166      freezable = options.freezable,
32167      freeze = freezable && !autoWidth ? getFreeze() : false,
32168      frozen = false,
32169      controlsEvents = {
32170        'click': onControlsClick,
32171        'keydown': onControlsKeydown
32172      },
32173      navEvents = {
32174        'click': onNavClick,
32175        'keydown': onNavKeydown
32176      },
32177      hoverEvents = {
32178        'mouseover': mouseoverPause,
32179        'mouseout': mouseoutRestart
32180      },
32181      visibilityEvent = {'visibilitychange': onVisibilityChange},
32182      docmentKeydownEvent = {'keydown': onDocumentKeydown},
32183      touchEvents = {
32184        'touchstart': onPanStart,
32185        'touchmove': onPanMove,
32186        'touchend': onPanEnd,
32187        'touchcancel': onPanEnd
32188      }, dragEvents = {
32189        'mousedown': onPanStart,
32190        'mousemove': onPanMove,
32191        'mouseup': onPanEnd,
32192        'mouseleave': onPanEnd
32193      },
32194      hasControls = hasOption('controls'),
32195      hasNav = hasOption('nav'),
32196      navAsThumbnails = autoWidth ? true : options.navAsThumbnails,
32197      hasAutoplay = hasOption('autoplay'),
32198      hasTouch = hasOption('touch'),
32199      hasMouseDrag = hasOption('mouseDrag'),
32200      slideActiveClass = 'tns-slide-active',
32201      slideClonedClass = 'tns-slide-cloned',
32202      imgCompleteClass = 'tns-complete',
32203      imgEvents = {
32204        'load': onImgLoaded,
32205        'error': onImgFailed
32206      },
32207      imgsComplete,
32208      liveregionCurrent,
32209      preventScroll = options.preventScrollOnTouch === 'force' ? true : false;
32210
32211  // controls
32212  if (hasControls) {
32213    var controlsContainer = options.controlsContainer,
32214        controlsContainerHTML = options.controlsContainer ? options.controlsContainer.outerHTML : '',
32215        prevButton = options.prevButton,
32216        nextButton = options.nextButton,
32217        prevButtonHTML = options.prevButton ? options.prevButton.outerHTML : '',
32218        nextButtonHTML = options.nextButton ? options.nextButton.outerHTML : '',
32219        prevIsButton,
32220        nextIsButton;
32221  }
32222
32223  // nav
32224  if (hasNav) {
32225    var navContainer = options.navContainer,
32226        navContainerHTML = options.navContainer ? options.navContainer.outerHTML : '',
32227        navItems,
32228        pages = autoWidth ? slideCount : getPages(),
32229        pagesCached = 0,
32230        navClicked = -1,
32231        navCurrentIndex = getCurrentNavIndex(),
32232        navCurrentIndexCached = navCurrentIndex,
32233        navActiveClass = 'tns-nav-active',
32234        navStr = 'Carousel Page ',
32235        navStrCurrent = ' (Current Slide)';
32236  }
32237
32238  // autoplay
32239  if (hasAutoplay) {
32240    var autoplayDirection = options.autoplayDirection === 'forward' ? 1 : -1,
32241        autoplayButton = options.autoplayButton,
32242        autoplayButtonHTML = options.autoplayButton ? options.autoplayButton.outerHTML : '',
32243        autoplayHtmlStrings = ['<span class=\'tns-visually-hidden\'>', ' animation</span>'],
32244        autoplayTimer,
32245        animating,
32246        autoplayHoverPaused,
32247        autoplayUserPaused,
32248        autoplayVisibilityPaused;
32249  }
32250
32251  if (hasTouch || hasMouseDrag) {
32252    var initPosition = {},
32253        lastPosition = {},
32254        translateInit,
32255        disX,
32256        disY,
32257        panStart = false,
32258        rafIndex,
32259        getDist = horizontal ?
32260          function(a, b) { return a.x - b.x; } :
32261          function(a, b) { return a.y - b.y; };
32262  }
32263
32264  // disable slider when slidecount <= items
32265  if (!autoWidth) { resetVariblesWhenDisable(disable || freeze); }
32266
32267  if (TRANSFORM) {
32268    transformAttr = TRANSFORM;
32269    transformPrefix = 'translate';
32270
32271    if (HAS3DTRANSFORMS) {
32272      transformPrefix += horizontal ? '3d(' : '3d(0px, ';
32273      transformPostfix = horizontal ? ', 0px, 0px)' : ', 0px)';
32274    } else {
32275      transformPrefix += horizontal ? 'X(' : 'Y(';
32276      transformPostfix = ')';
32277    }
32278
32279  }
32280
32281  if (carousel) { container.className = container.className.replace('tns-vpfix', ''); }
32282  initStructure();
32283  initSheet();
32284  initSliderTransform();
32285
32286  // === COMMON FUNCTIONS === //
32287  function resetVariblesWhenDisable (condition) {
32288    if (condition) {
32289      controls = nav = touch = mouseDrag = arrowKeys = autoplay = autoplayHoverPause = autoplayResetOnVisibility = false;
32290    }
32291  }
32292
32293  function getCurrentSlide () {
32294    var tem = carousel ? index - cloneCount : index;
32295    while (tem < 0) { tem += slideCount; }
32296    return tem%slideCount + 1;
32297  }
32298
32299  function getStartIndex (ind) {
32300    ind = ind ? Math.max(0, Math.min(loop ? slideCount - 1 : slideCount - items, ind)) : 0;
32301    return carousel ? ind + cloneCount : ind;
32302  }
32303
32304  function getAbsIndex (i) {
32305    if (i == null) { i = index; }
32306
32307    if (carousel) { i -= cloneCount; }
32308    while (i < 0) { i += slideCount; }
32309
32310    return Math.floor(i%slideCount);
32311  }
32312
32313  function getCurrentNavIndex () {
32314    var absIndex = getAbsIndex(),
32315        result;
32316
32317    result = navAsThumbnails ? absIndex :
32318      fixedWidth || autoWidth ? Math.ceil((absIndex + 1) * pages / slideCount - 1) :
32319          Math.floor(absIndex / items);
32320
32321    // set active nav to the last one when reaches the right edge
32322    if (!loop && carousel && index === indexMax) { result = pages - 1; }
32323
32324    return result;
32325  }
32326
32327  function getItemsMax () {
32328    // fixedWidth or autoWidth while viewportMax is not available
32329    if (autoWidth || (fixedWidth && !viewportMax)) {
32330      return slideCount - 1;
32331    // most cases
32332    } else {
32333      var str = fixedWidth ? 'fixedWidth' : 'items',
32334          arr = [];
32335
32336      if (fixedWidth || options[str] < slideCount) { arr.push(options[str]); }
32337
32338      if (responsive) {
32339        for (var bp in responsive) {
32340          var tem = responsive[bp][str];
32341          if (tem && (fixedWidth || tem < slideCount)) { arr.push(tem); }
32342        }
32343      }
32344
32345      if (!arr.length) { arr.push(0); }
32346
32347      return Math.ceil(fixedWidth ? viewportMax / Math.min.apply(null, arr) : Math.max.apply(null, arr));
32348    }
32349  }
32350
32351  function getCloneCountForLoop () {
32352    var itemsMax = getItemsMax(),
32353        result = carousel ? Math.ceil((itemsMax * 5 - slideCount)/2) : (itemsMax * 4 - slideCount);
32354    result = Math.max(itemsMax, result);
32355
32356    return hasOption('edgePadding') ? result + 1 : result;
32357  }
32358
32359  function getWindowWidth () {
32360    return win.innerWidth || doc.documentElement.clientWidth || doc.body.clientWidth;
32361  }
32362
32363  function getInsertPosition (pos) {
32364    return pos === 'top' ? 'afterbegin' : 'beforeend';
32365  }
32366
32367  function getClientWidth (el) {
32368    if (el == null) { return; }
32369    var div = doc.createElement('div'), rect, width;
32370    el.appendChild(div);
32371    rect = div.getBoundingClientRect();
32372    width = rect.right - rect.left;
32373    div.remove();
32374    return width || getClientWidth(el.parentNode);
32375  }
32376
32377  function getViewportWidth () {
32378    var gap = edgePadding ? edgePadding * 2 - gutter : 0;
32379    return getClientWidth(containerParent) - gap;
32380  }
32381
32382  function hasOption (item) {
32383    if (options[item]) {
32384      return true;
32385    } else {
32386      if (responsive) {
32387        for (var bp in responsive) {
32388          if (responsive[bp][item]) { return true; }
32389        }
32390      }
32391      return false;
32392    }
32393  }
32394
32395  // get option:
32396  // fixed width: viewport, fixedWidth, gutter => items
32397  // others: window width => all variables
32398  // all: items => slideBy
32399  function getOption (item, ww) {
32400    if (ww == null) { ww = windowWidth; }
32401
32402    if (item === 'items' && fixedWidth) {
32403      return Math.floor((viewport + gutter) / (fixedWidth + gutter)) || 1;
32404
32405    } else {
32406      var result = options[item];
32407
32408      if (responsive) {
32409        for (var bp in responsive) {
32410          // bp: convert string to number
32411          if (ww >= parseInt(bp)) {
32412            if (item in responsive[bp]) { result = responsive[bp][item]; }
32413          }
32414        }
32415      }
32416
32417      if (item === 'slideBy' && result === 'page') { result = getOption('items'); }
32418      if (!carousel && (item === 'slideBy' || item === 'items')) { result = Math.floor(result); }
32419
32420      return result;
32421    }
32422  }
32423
32424  function getSlideMarginLeft (i) {
32425    return CALC ?
32426      CALC + '(' + i * 100 + '% / ' + slideCountNew + ')' :
32427      i * 100 / slideCountNew + '%';
32428  }
32429
32430  function getInnerWrapperStyles (edgePaddingTem, gutterTem, fixedWidthTem, speedTem, autoHeightBP) {
32431    var str = '';
32432
32433    if (edgePaddingTem !== undefined) {
32434      var gap = edgePaddingTem;
32435      if (gutterTem) { gap -= gutterTem; }
32436      str = horizontal ?
32437        'margin: 0 ' + gap + 'px 0 ' + edgePaddingTem + 'px;' :
32438        'margin: ' + edgePaddingTem + 'px 0 ' + gap + 'px 0;';
32439    } else if (gutterTem && !fixedWidthTem) {
32440      var gutterTemUnit = '-' + gutterTem + 'px',
32441          dir = horizontal ? gutterTemUnit + ' 0 0' : '0 ' + gutterTemUnit + ' 0';
32442      str = 'margin: 0 ' + dir + ';';
32443    }
32444
32445    if (!carousel && autoHeightBP && TRANSITIONDURATION && speedTem) { str += getTransitionDurationStyle(speedTem); }
32446    return str;
32447  }
32448
32449  function getContainerWidth (fixedWidthTem, gutterTem, itemsTem) {
32450    if (fixedWidthTem) {
32451      return (fixedWidthTem + gutterTem) * slideCountNew + 'px';
32452    } else {
32453      return CALC ?
32454        CALC + '(' + slideCountNew * 100 + '% / ' + itemsTem + ')' :
32455        slideCountNew * 100 / itemsTem + '%';
32456    }
32457  }
32458
32459  function getSlideWidthStyle (fixedWidthTem, gutterTem, itemsTem) {
32460    var width;
32461
32462    if (fixedWidthTem) {
32463      width = (fixedWidthTem + gutterTem) + 'px';
32464    } else {
32465      if (!carousel) { itemsTem = Math.floor(itemsTem); }
32466      var dividend = carousel ? slideCountNew : itemsTem;
32467      width = CALC ?
32468        CALC + '(100% / ' + dividend + ')' :
32469        100 / dividend + '%';
32470    }
32471
32472    width = 'width:' + width;
32473
32474    // inner slider: overwrite outer slider styles
32475    return nested !== 'inner' ? width + ';' : width + ' !important;';
32476  }
32477
32478  function getSlideGutterStyle (gutterTem) {
32479    var str = '';
32480
32481    // gutter maybe interger || 0
32482    // so can't use 'if (gutter)'
32483    if (gutterTem !== false) {
32484      var prop = horizontal ? 'padding-' : 'margin-',
32485          dir = horizontal ? 'right' : 'bottom';
32486      str = prop +  dir + ': ' + gutterTem + 'px;';
32487    }
32488
32489    return str;
32490  }
32491
32492  function getCSSPrefix (name, num) {
32493    var prefix = name.substring(0, name.length - num).toLowerCase();
32494    if (prefix) { prefix = '-' + prefix + '-'; }
32495
32496    return prefix;
32497  }
32498
32499  function getTransitionDurationStyle (speed) {
32500    return getCSSPrefix(TRANSITIONDURATION, 18) + 'transition-duration:' + speed / 1000 + 's;';
32501  }
32502
32503  function getAnimationDurationStyle (speed) {
32504    return getCSSPrefix(ANIMATIONDURATION, 17) + 'animation-duration:' + speed / 1000 + 's;';
32505  }
32506
32507  function initStructure () {
32508    var classOuter = 'tns-outer',
32509        classInner = 'tns-inner',
32510        hasGutter = hasOption('gutter');
32511
32512    outerWrapper.className = classOuter;
32513    innerWrapper.className = classInner;
32514    outerWrapper.id = slideId + '-ow';
32515    innerWrapper.id = slideId + '-iw';
32516
32517    // set container properties
32518    if (container.id === '') { container.id = slideId; }
32519    newContainerClasses += PERCENTAGELAYOUT || autoWidth ? ' tns-subpixel' : ' tns-no-subpixel';
32520    newContainerClasses += CALC ? ' tns-calc' : ' tns-no-calc';
32521    if (autoWidth) { newContainerClasses += ' tns-autowidth'; }
32522    newContainerClasses += ' tns-' + options.axis;
32523    container.className += newContainerClasses;
32524
32525    // add constrain layer for carousel
32526    if (carousel) {
32527      middleWrapper = doc.createElement('div');
32528      middleWrapper.id = slideId + '-mw';
32529      middleWrapper.className = 'tns-ovh';
32530
32531      outerWrapper.appendChild(middleWrapper);
32532      middleWrapper.appendChild(innerWrapper);
32533    } else {
32534      outerWrapper.appendChild(innerWrapper);
32535    }
32536
32537    if (autoHeight) {
32538      var wp = middleWrapper ? middleWrapper : innerWrapper;
32539      wp.className += ' tns-ah';
32540    }
32541
32542    containerParent.insertBefore(outerWrapper, container);
32543    innerWrapper.appendChild(container);
32544
32545    // add id, class, aria attributes
32546    // before clone slides
32547    forEach(slideItems, function(item, i) {
32548      addClass(item, 'tns-item');
32549      if (!item.id) { item.id = slideId + '-item' + i; }
32550      if (!carousel && animateNormal) { addClass(item, animateNormal); }
32551      setAttrs(item, {
32552        'aria-hidden': 'true',
32553        'tabindex': '-1'
32554      });
32555    });
32556
32557    // ## clone slides
32558    // carousel: n + slides + n
32559    // gallery:      slides + n
32560    if (cloneCount) {
32561      var fragmentBefore = doc.createDocumentFragment(),
32562          fragmentAfter = doc.createDocumentFragment();
32563
32564      for (var j = cloneCount; j--;) {
32565        var num = j%slideCount,
32566            cloneFirst = slideItems[num].cloneNode(true);
32567        addClass(cloneFirst, slideClonedClass);
32568        removeAttrs(cloneFirst, 'id');
32569        fragmentAfter.insertBefore(cloneFirst, fragmentAfter.firstChild);
32570
32571        if (carousel) {
32572          var cloneLast = slideItems[slideCount - 1 - num].cloneNode(true);
32573          addClass(cloneLast, slideClonedClass);
32574          removeAttrs(cloneLast, 'id');
32575          fragmentBefore.appendChild(cloneLast);
32576        }
32577      }
32578
32579      container.insertBefore(fragmentBefore, container.firstChild);
32580      container.appendChild(fragmentAfter);
32581      slideItems = container.children;
32582    }
32583
32584  }
32585
32586  function initSliderTransform () {
32587    // ## images loaded/failed
32588    if (hasOption('autoHeight') || autoWidth || !horizontal) {
32589      var imgs = container.querySelectorAll('img');
32590
32591      // add img load event listener
32592      forEach(imgs, function(img) {
32593        var src = img.src;
32594
32595        if (!lazyload) {
32596          // not data img
32597          if (src && src.indexOf('data:image') < 0) {
32598            img.src = '';
32599            addEvents(img, imgEvents);
32600            addClass(img, 'loading');
32601
32602            img.src = src;
32603          // data img
32604          } else {
32605            imgLoaded(img);
32606          }
32607        }
32608      });
32609
32610      // set imgsComplete
32611      raf(function(){ imgsLoadedCheck(arrayFromNodeList(imgs), function() { imgsComplete = true; }); });
32612
32613      // reset imgs for auto height: check visible imgs only
32614      if (hasOption('autoHeight')) { imgs = getImageArray(index, Math.min(index + items - 1, slideCountNew - 1)); }
32615
32616      lazyload ? initSliderTransformStyleCheck() : raf(function(){ imgsLoadedCheck(arrayFromNodeList(imgs), initSliderTransformStyleCheck); });
32617
32618    } else {
32619      // set container transform property
32620      if (carousel) { doContainerTransformSilent(); }
32621
32622      // update slider tools and events
32623      initTools();
32624      initEvents();
32625    }
32626  }
32627
32628  function initSliderTransformStyleCheck () {
32629    if (autoWidth && slideCount > 1) {
32630      // check styles application
32631      var num = loop ? index : slideCount - 1;
32632
32633      (function stylesApplicationCheck() {
32634        var left = slideItems[num].getBoundingClientRect().left;
32635        var right = slideItems[num - 1].getBoundingClientRect().right;
32636
32637        (Math.abs(left - right) <= 1) ?
32638          initSliderTransformCore() :
32639          setTimeout(function(){ stylesApplicationCheck(); }, 16);
32640      })();
32641
32642    } else {
32643      initSliderTransformCore();
32644    }
32645  }
32646
32647
32648  function initSliderTransformCore () {
32649    // run Fn()s which are rely on image loading
32650    if (!horizontal || autoWidth) {
32651      setSlidePositions();
32652
32653      if (autoWidth) {
32654        rightBoundary = getRightBoundary();
32655        if (freezable) { freeze = getFreeze(); }
32656        indexMax = getIndexMax(); // <= slidePositions, rightBoundary <=
32657        resetVariblesWhenDisable(disable || freeze);
32658      } else {
32659        updateContentWrapperHeight();
32660      }
32661    }
32662
32663    // set container transform property
32664    if (carousel) { doContainerTransformSilent(); }
32665
32666    // update slider tools and events
32667    initTools();
32668    initEvents();
32669  }
32670
32671  function initSheet () {
32672    // gallery:
32673    // set animation classes and left value for gallery slider
32674    if (!carousel) {
32675      for (var i = index, l = index + Math.min(slideCount, items); i < l; i++) {
32676        var item = slideItems[i];
32677        item.style.left = (i - index) * 100 / items + '%';
32678        addClass(item, animateIn);
32679        removeClass(item, animateNormal);
32680      }
32681    }
32682
32683    // #### LAYOUT
32684
32685    // ## INLINE-BLOCK VS FLOAT
32686
32687    // ## PercentageLayout:
32688    // slides: inline-block
32689    // remove blank space between slides by set font-size: 0
32690
32691    // ## Non PercentageLayout:
32692    // slides: float
32693    //         margin-right: -100%
32694    //         margin-left: ~
32695
32696    // Resource: https://docs.google.com/spreadsheets/d/147up245wwTXeQYve3BRSAD4oVcvQmuGsFteJOeA5xNQ/edit?usp=sharing
32697    if (horizontal) {
32698      if (PERCENTAGELAYOUT || autoWidth) {
32699        addCSSRule(sheet, '#' + slideId + ' > .tns-item', 'font-size:' + win.getComputedStyle(slideItems[0]).fontSize + ';', getCssRulesLength(sheet));
32700        addCSSRule(sheet, '#' + slideId, 'font-size:0;', getCssRulesLength(sheet));
32701      } else if (carousel) {
32702        forEach(slideItems, function (slide, i) {
32703          slide.style.marginLeft = getSlideMarginLeft(i);
32704        });
32705      }
32706    }
32707
32708
32709    // ## BASIC STYLES
32710    if (CSSMQ) {
32711      // middle wrapper style
32712      if (TRANSITIONDURATION) {
32713        var str = middleWrapper && options.autoHeight ? getTransitionDurationStyle(options.speed) : '';
32714        addCSSRule(sheet, '#' + slideId + '-mw', str, getCssRulesLength(sheet));
32715      }
32716
32717      // inner wrapper styles
32718      str = getInnerWrapperStyles(options.edgePadding, options.gutter, options.fixedWidth, options.speed, options.autoHeight);
32719      addCSSRule(sheet, '#' + slideId + '-iw', str, getCssRulesLength(sheet));
32720
32721      // container styles
32722      if (carousel) {
32723        str = horizontal && !autoWidth ? 'width:' + getContainerWidth(options.fixedWidth, options.gutter, options.items) + ';' : '';
32724        if (TRANSITIONDURATION) { str += getTransitionDurationStyle(speed); }
32725        addCSSRule(sheet, '#' + slideId, str, getCssRulesLength(sheet));
32726      }
32727
32728      // slide styles
32729      str = horizontal && !autoWidth ? getSlideWidthStyle(options.fixedWidth, options.gutter, options.items) : '';
32730      if (options.gutter) { str += getSlideGutterStyle(options.gutter); }
32731      // set gallery items transition-duration
32732      if (!carousel) {
32733        if (TRANSITIONDURATION) { str += getTransitionDurationStyle(speed); }
32734        if (ANIMATIONDURATION) { str += getAnimationDurationStyle(speed); }
32735      }
32736      if (str) { addCSSRule(sheet, '#' + slideId + ' > .tns-item', str, getCssRulesLength(sheet)); }
32737
32738    // non CSS mediaqueries: IE8
32739    // ## update inner wrapper, container, slides if needed
32740    // set inline styles for inner wrapper & container
32741    // insert stylesheet (one line) for slides only (since slides are many)
32742    } else {
32743      // middle wrapper styles
32744      update_carousel_transition_duration();
32745
32746      // inner wrapper styles
32747      innerWrapper.style.cssText = getInnerWrapperStyles(edgePadding, gutter, fixedWidth, autoHeight);
32748
32749      // container styles
32750      if (carousel && horizontal && !autoWidth) {
32751        container.style.width = getContainerWidth(fixedWidth, gutter, items);
32752      }
32753
32754      // slide styles
32755      var str = horizontal && !autoWidth ? getSlideWidthStyle(fixedWidth, gutter, items) : '';
32756      if (gutter) { str += getSlideGutterStyle(gutter); }
32757
32758      // append to the last line
32759      if (str) { addCSSRule(sheet, '#' + slideId + ' > .tns-item', str, getCssRulesLength(sheet)); }
32760    }
32761
32762    // ## MEDIAQUERIES
32763    if (responsive && CSSMQ) {
32764      for (var bp in responsive) {
32765        // bp: convert string to number
32766        bp = parseInt(bp);
32767
32768        var opts = responsive[bp],
32769            str = '',
32770            middleWrapperStr = '',
32771            innerWrapperStr = '',
32772            containerStr = '',
32773            slideStr = '',
32774            itemsBP = !autoWidth ? getOption('items', bp) : null,
32775            fixedWidthBP = getOption('fixedWidth', bp),
32776            speedBP = getOption('speed', bp),
32777            edgePaddingBP = getOption('edgePadding', bp),
32778            autoHeightBP = getOption('autoHeight', bp),
32779            gutterBP = getOption('gutter', bp);
32780
32781        // middle wrapper string
32782        if (TRANSITIONDURATION && middleWrapper && getOption('autoHeight', bp) && 'speed' in opts) {
32783          middleWrapperStr = '#' + slideId + '-mw{' + getTransitionDurationStyle(speedBP) + '}';
32784        }
32785
32786        // inner wrapper string
32787        if ('edgePadding' in opts || 'gutter' in opts) {
32788          innerWrapperStr = '#' + slideId + '-iw{' + getInnerWrapperStyles(edgePaddingBP, gutterBP, fixedWidthBP, speedBP, autoHeightBP) + '}';
32789        }
32790
32791        // container string
32792        if (carousel && horizontal && !autoWidth && ('fixedWidth' in opts || 'items' in opts || (fixedWidth && 'gutter' in opts))) {
32793          containerStr = 'width:' + getContainerWidth(fixedWidthBP, gutterBP, itemsBP) + ';';
32794        }
32795        if (TRANSITIONDURATION && 'speed' in opts) {
32796          containerStr += getTransitionDurationStyle(speedBP);
32797        }
32798        if (containerStr) {
32799          containerStr = '#' + slideId + '{' + containerStr + '}';
32800        }
32801
32802        // slide string
32803        if ('fixedWidth' in opts || (fixedWidth && 'gutter' in opts) || !carousel && 'items' in opts) {
32804          slideStr += getSlideWidthStyle(fixedWidthBP, gutterBP, itemsBP);
32805        }
32806        if ('gutter' in opts) {
32807          slideStr += getSlideGutterStyle(gutterBP);
32808        }
32809        // set gallery items transition-duration
32810        if (!carousel && 'speed' in opts) {
32811          if (TRANSITIONDURATION) { slideStr += getTransitionDurationStyle(speedBP); }
32812          if (ANIMATIONDURATION) { slideStr += getAnimationDurationStyle(speedBP); }
32813        }
32814        if (slideStr) { slideStr = '#' + slideId + ' > .tns-item{' + slideStr + '}'; }
32815
32816        // add up
32817        str = middleWrapperStr + innerWrapperStr + containerStr + slideStr;
32818
32819        if (str) {
32820          sheet.insertRule('@media (min-width: ' + bp / 16 + 'em) {' + str + '}', sheet.cssRules.length);
32821        }
32822      }
32823    }
32824  }
32825
32826  function initTools () {
32827    // == slides ==
32828    updateSlideStatus();
32829
32830    // == live region ==
32831    outerWrapper.insertAdjacentHTML('afterbegin', '<div class="tns-liveregion tns-visually-hidden" aria-live="polite" aria-atomic="true">slide <span class="current">' + getLiveRegionStr() + '</span>  of ' + slideCount + '</div>');
32832    liveregionCurrent = outerWrapper.querySelector('.tns-liveregion .current');
32833
32834    // == autoplayInit ==
32835    if (hasAutoplay) {
32836      var txt = autoplay ? 'stop' : 'start';
32837      if (autoplayButton) {
32838        setAttrs(autoplayButton, {'data-action': txt});
32839      } else if (options.autoplayButtonOutput) {
32840        outerWrapper.insertAdjacentHTML(getInsertPosition(options.autoplayPosition), '<button type="button" data-action="' + txt + '">' + autoplayHtmlStrings[0] + txt + autoplayHtmlStrings[1] + autoplayText[0] + '</button>');
32841        autoplayButton = outerWrapper.querySelector('[data-action]');
32842      }
32843
32844      // add event
32845      if (autoplayButton) {
32846        addEvents(autoplayButton, {'click': toggleAutoplay});
32847      }
32848
32849      if (autoplay) {
32850        startAutoplay();
32851        if (autoplayHoverPause) { addEvents(container, hoverEvents); }
32852        if (autoplayResetOnVisibility) { addEvents(container, visibilityEvent); }
32853      }
32854    }
32855
32856    // == navInit ==
32857    if (hasNav) {
32858      var initIndex = !carousel ? 0 : cloneCount;
32859      // customized nav
32860      // will not hide the navs in case they're thumbnails
32861      if (navContainer) {
32862        setAttrs(navContainer, {'aria-label': 'Carousel Pagination'});
32863        navItems = navContainer.children;
32864        forEach(navItems, function(item, i) {
32865          setAttrs(item, {
32866            'data-nav': i,
32867            'tabindex': '-1',
32868            'aria-label': navStr + (i + 1),
32869            'aria-controls': slideId,
32870          });
32871        });
32872
32873      // generated nav
32874      } else {
32875        var navHtml = '',
32876            hiddenStr = navAsThumbnails ? '' : 'style="display:none"';
32877        for (var i = 0; i < slideCount; i++) {
32878          // hide nav items by default
32879          navHtml += '<button type="button" data-nav="' + i +'" tabindex="-1" aria-controls="' + slideId + '" ' + hiddenStr + ' aria-label="' + navStr + (i + 1) +'"></button>';
32880        }
32881        navHtml = '<div class="tns-nav" aria-label="Carousel Pagination">' + navHtml + '</div>';
32882        outerWrapper.insertAdjacentHTML(getInsertPosition(options.navPosition), navHtml);
32883
32884        navContainer = outerWrapper.querySelector('.tns-nav');
32885        navItems = navContainer.children;
32886      }
32887
32888      updateNavVisibility();
32889
32890      // add transition
32891      if (TRANSITIONDURATION) {
32892        var prefix = TRANSITIONDURATION.substring(0, TRANSITIONDURATION.length - 18).toLowerCase(),
32893            str = 'transition: all ' + speed / 1000 + 's';
32894
32895        if (prefix) {
32896          str = '-' + prefix + '-' + str;
32897        }
32898
32899        addCSSRule(sheet, '[aria-controls^=' + slideId + '-item]', str, getCssRulesLength(sheet));
32900      }
32901
32902      setAttrs(navItems[navCurrentIndex], {'aria-label': navStr + (navCurrentIndex + 1) + navStrCurrent});
32903      removeAttrs(navItems[navCurrentIndex], 'tabindex');
32904      addClass(navItems[navCurrentIndex], navActiveClass);
32905
32906      // add events
32907      addEvents(navContainer, navEvents);
32908    }
32909
32910
32911
32912    // == controlsInit ==
32913    if (hasControls) {
32914      if (!controlsContainer && (!prevButton || !nextButton)) {
32915        outerWrapper.insertAdjacentHTML(getInsertPosition(options.controlsPosition), '<div class="tns-controls" aria-label="Carousel Navigation" tabindex="0"><button type="button" data-controls="prev" tabindex="-1" aria-controls="' + slideId +'">' + controlsText[0] + '</button><button type="button" data-controls="next" tabindex="-1" aria-controls="' + slideId +'">' + controlsText[1] + '</button></div>');
32916
32917        controlsContainer = outerWrapper.querySelector('.tns-controls');
32918      }
32919
32920      if (!prevButton || !nextButton) {
32921        prevButton = controlsContainer.children[0];
32922        nextButton = controlsContainer.children[1];
32923      }
32924
32925      if (options.controlsContainer) {
32926        setAttrs(controlsContainer, {
32927          'aria-label': 'Carousel Navigation',
32928          'tabindex': '0'
32929        });
32930      }
32931
32932      if (options.controlsContainer || (options.prevButton && options.nextButton)) {
32933        setAttrs([prevButton, nextButton], {
32934          'aria-controls': slideId,
32935          'tabindex': '-1',
32936        });
32937      }
32938
32939      if (options.controlsContainer || (options.prevButton && options.nextButton)) {
32940        setAttrs(prevButton, {'data-controls' : 'prev'});
32941        setAttrs(nextButton, {'data-controls' : 'next'});
32942      }
32943
32944      prevIsButton = isButton(prevButton);
32945      nextIsButton = isButton(nextButton);
32946
32947      updateControlsStatus();
32948
32949      // add events
32950      if (controlsContainer) {
32951        addEvents(controlsContainer, controlsEvents);
32952      } else {
32953        addEvents(prevButton, controlsEvents);
32954        addEvents(nextButton, controlsEvents);
32955      }
32956    }
32957
32958    // hide tools if needed
32959    disableUI();
32960  }
32961
32962  function initEvents () {
32963    // add events
32964    if (carousel && TRANSITIONEND) {
32965      var eve = {};
32966      eve[TRANSITIONEND] = onTransitionEnd;
32967      addEvents(container, eve);
32968    }
32969
32970    if (touch) { addEvents(container, touchEvents, options.preventScrollOnTouch); }
32971    if (mouseDrag) { addEvents(container, dragEvents); }
32972    if (arrowKeys) { addEvents(doc, docmentKeydownEvent); }
32973
32974    if (nested === 'inner') {
32975      events.on('outerResized', function () {
32976        resizeTasks();
32977        events.emit('innerLoaded', info());
32978      });
32979    } else if (responsive || fixedWidth || autoWidth || autoHeight || !horizontal) {
32980      addEvents(win, {'resize': onResize});
32981    }
32982
32983    if (autoHeight) {
32984      if (nested === 'outer') {
32985        events.on('innerLoaded', doAutoHeight);
32986      } else if (!disable) { doAutoHeight(); }
32987    }
32988
32989    doLazyLoad();
32990    if (disable) { disableSlider(); } else if (freeze) { freezeSlider(); }
32991
32992    events.on('indexChanged', additionalUpdates);
32993    if (nested === 'inner') { events.emit('innerLoaded', info()); }
32994    if (typeof onInit === 'function') { onInit(info()); }
32995    isOn = true;
32996  }
32997
32998  function destroy () {
32999    // sheet
33000    sheet.disabled = true;
33001    if (sheet.ownerNode) { sheet.ownerNode.remove(); }
33002
33003    // remove win event listeners
33004    removeEvents(win, {'resize': onResize});
33005
33006    // arrowKeys, controls, nav
33007    if (arrowKeys) { removeEvents(doc, docmentKeydownEvent); }
33008    if (controlsContainer) { removeEvents(controlsContainer, controlsEvents); }
33009    if (navContainer) { removeEvents(navContainer, navEvents); }
33010
33011    // autoplay
33012    removeEvents(container, hoverEvents);
33013    removeEvents(container, visibilityEvent);
33014    if (autoplayButton) { removeEvents(autoplayButton, {'click': toggleAutoplay}); }
33015    if (autoplay) { clearInterval(autoplayTimer); }
33016
33017    // container
33018    if (carousel && TRANSITIONEND) {
33019      var eve = {};
33020      eve[TRANSITIONEND] = onTransitionEnd;
33021      removeEvents(container, eve);
33022    }
33023    if (touch) { removeEvents(container, touchEvents); }
33024    if (mouseDrag) { removeEvents(container, dragEvents); }
33025
33026    // cache Object values in options && reset HTML
33027    var htmlList = [containerHTML, controlsContainerHTML, prevButtonHTML, nextButtonHTML, navContainerHTML, autoplayButtonHTML];
33028
33029    tnsList.forEach(function(item, i) {
33030      var el = item === 'container' ? outerWrapper : options[item];
33031
33032      if (typeof el === 'object' && el) {
33033        var prevEl = el.previousElementSibling ? el.previousElementSibling : false,
33034            parentEl = el.parentNode;
33035        el.outerHTML = htmlList[i];
33036        options[item] = prevEl ? prevEl.nextElementSibling : parentEl.firstElementChild;
33037      }
33038    });
33039
33040
33041    // reset variables
33042    tnsList = animateIn = animateOut = animateDelay = animateNormal = horizontal = outerWrapper = innerWrapper = container = containerParent = containerHTML = slideItems = slideCount = breakpointZone = windowWidth = autoWidth = fixedWidth = edgePadding = gutter = viewport = items = slideBy = viewportMax = arrowKeys = speed = rewind = loop = autoHeight = sheet = lazyload = slidePositions = slideItemsOut = cloneCount = slideCountNew = hasRightDeadZone = rightBoundary = updateIndexBeforeTransform = transformAttr = transformPrefix = transformPostfix = getIndexMax = index = indexCached = indexMin = indexMax = resizeTimer = swipeAngle = moveDirectionExpected = running = onInit = events = newContainerClasses = slideId = disable = disabled = freezable = freeze = frozen = controlsEvents = navEvents = hoverEvents = visibilityEvent = docmentKeydownEvent = touchEvents = dragEvents = hasControls = hasNav = navAsThumbnails = hasAutoplay = hasTouch = hasMouseDrag = slideActiveClass = imgCompleteClass = imgEvents = imgsComplete = controls = controlsText = controlsContainer = controlsContainerHTML = prevButton = nextButton = prevIsButton = nextIsButton = nav = navContainer = navContainerHTML = navItems = pages = pagesCached = navClicked = navCurrentIndex = navCurrentIndexCached = navActiveClass = navStr = navStrCurrent = autoplay = autoplayTimeout = autoplayDirection = autoplayText = autoplayHoverPause = autoplayButton = autoplayButtonHTML = autoplayResetOnVisibility = autoplayHtmlStrings = autoplayTimer = animating = autoplayHoverPaused = autoplayUserPaused = autoplayVisibilityPaused = initPosition = lastPosition = translateInit = disX = disY = panStart = rafIndex = getDist = touch = mouseDrag = null;
33043    // check variables
33044    // [animateIn, animateOut, animateDelay, animateNormal, horizontal, outerWrapper, innerWrapper, container, containerParent, containerHTML, slideItems, slideCount, breakpointZone, windowWidth, autoWidth, fixedWidth, edgePadding, gutter, viewport, items, slideBy, viewportMax, arrowKeys, speed, rewind, loop, autoHeight, sheet, lazyload, slidePositions, slideItemsOut, cloneCount, slideCountNew, hasRightDeadZone, rightBoundary, updateIndexBeforeTransform, transformAttr, transformPrefix, transformPostfix, getIndexMax, index, indexCached, indexMin, indexMax, resizeTimer, swipeAngle, moveDirectionExpected, running, onInit, events, newContainerClasses, slideId, disable, disabled, freezable, freeze, frozen, controlsEvents, navEvents, hoverEvents, visibilityEvent, docmentKeydownEvent, touchEvents, dragEvents, hasControls, hasNav, navAsThumbnails, hasAutoplay, hasTouch, hasMouseDrag, slideActiveClass, imgCompleteClass, imgEvents, imgsComplete, controls, controlsText, controlsContainer, controlsContainerHTML, prevButton, nextButton, prevIsButton, nextIsButton, nav, navContainer, navContainerHTML, navItems, pages, pagesCached, navClicked, navCurrentIndex, navCurrentIndexCached, navActiveClass, navStr, navStrCurrent, autoplay, autoplayTimeout, autoplayDirection, autoplayText, autoplayHoverPause, autoplayButton, autoplayButtonHTML, autoplayResetOnVisibility, autoplayHtmlStrings, autoplayTimer, animating, autoplayHoverPaused, autoplayUserPaused, autoplayVisibilityPaused, initPosition, lastPosition, translateInit, disX, disY, panStart, rafIndex, getDist, touch, mouseDrag ].forEach(function(item) { if (item !== null) { console.log(item); } });
33045
33046    for (var a in this) {
33047      if (a !== 'rebuild') { this[a] = null; }
33048    }
33049    isOn = false;
33050  }
33051
33052// === ON RESIZE ===
33053  // responsive || fixedWidth || autoWidth || !horizontal
33054  function onResize (e) {
33055    raf(function(){ resizeTasks(getEvent(e)); });
33056  }
33057
33058  function resizeTasks (e) {
33059    if (!isOn) { return; }
33060    if (nested === 'outer') { events.emit('outerResized', info(e)); }
33061    windowWidth = getWindowWidth();
33062    var bpChanged,
33063        breakpointZoneTem = breakpointZone,
33064        needContainerTransform = false;
33065
33066    if (responsive) {
33067      setBreakpointZone();
33068      bpChanged = breakpointZoneTem !== breakpointZone;
33069      // if (hasRightDeadZone) { needContainerTransform = true; } // *?
33070      if (bpChanged) { events.emit('newBreakpointStart', info(e)); }
33071    }
33072
33073    var indChanged,
33074        itemsChanged,
33075        itemsTem = items,
33076        disableTem = disable,
33077        freezeTem = freeze,
33078        arrowKeysTem = arrowKeys,
33079        controlsTem = controls,
33080        navTem = nav,
33081        touchTem = touch,
33082        mouseDragTem = mouseDrag,
33083        autoplayTem = autoplay,
33084        autoplayHoverPauseTem = autoplayHoverPause,
33085        autoplayResetOnVisibilityTem = autoplayResetOnVisibility,
33086        indexTem = index;
33087
33088    if (bpChanged) {
33089      var fixedWidthTem = fixedWidth,
33090          autoHeightTem = autoHeight,
33091          controlsTextTem = controlsText,
33092          centerTem = center,
33093          autoplayTextTem = autoplayText;
33094
33095      if (!CSSMQ) {
33096        var gutterTem = gutter,
33097            edgePaddingTem = edgePadding;
33098      }
33099    }
33100
33101    // get option:
33102    // fixed width: viewport, fixedWidth, gutter => items
33103    // others: window width => all variables
33104    // all: items => slideBy
33105    arrowKeys = getOption('arrowKeys');
33106    controls = getOption('controls');
33107    nav = getOption('nav');
33108    touch = getOption('touch');
33109    center = getOption('center');
33110    mouseDrag = getOption('mouseDrag');
33111    autoplay = getOption('autoplay');
33112    autoplayHoverPause = getOption('autoplayHoverPause');
33113    autoplayResetOnVisibility = getOption('autoplayResetOnVisibility');
33114
33115    if (bpChanged) {
33116      disable = getOption('disable');
33117      fixedWidth = getOption('fixedWidth');
33118      speed = getOption('speed');
33119      autoHeight = getOption('autoHeight');
33120      controlsText = getOption('controlsText');
33121      autoplayText = getOption('autoplayText');
33122      autoplayTimeout = getOption('autoplayTimeout');
33123
33124      if (!CSSMQ) {
33125        edgePadding = getOption('edgePadding');
33126        gutter = getOption('gutter');
33127      }
33128    }
33129    // update options
33130    resetVariblesWhenDisable(disable);
33131
33132    viewport = getViewportWidth(); // <= edgePadding, gutter
33133    if ((!horizontal || autoWidth) && !disable) {
33134      setSlidePositions();
33135      if (!horizontal) {
33136        updateContentWrapperHeight(); // <= setSlidePositions
33137        needContainerTransform = true;
33138      }
33139    }
33140    if (fixedWidth || autoWidth) {
33141      rightBoundary = getRightBoundary(); // autoWidth: <= viewport, slidePositions, gutter
33142                                          // fixedWidth: <= viewport, fixedWidth, gutter
33143      indexMax = getIndexMax(); // autoWidth: <= rightBoundary, slidePositions
33144                                // fixedWidth: <= rightBoundary, fixedWidth, gutter
33145    }
33146
33147    if (bpChanged || fixedWidth) {
33148      items = getOption('items');
33149      slideBy = getOption('slideBy');
33150      itemsChanged = items !== itemsTem;
33151
33152      if (itemsChanged) {
33153        if (!fixedWidth && !autoWidth) { indexMax = getIndexMax(); } // <= items
33154        // check index before transform in case
33155        // slider reach the right edge then items become bigger
33156        updateIndex();
33157      }
33158    }
33159
33160    if (bpChanged) {
33161      if (disable !== disableTem) {
33162        if (disable) {
33163          disableSlider();
33164        } else {
33165          enableSlider(); // <= slidePositions, rightBoundary, indexMax
33166        }
33167      }
33168    }
33169
33170    if (freezable && (bpChanged || fixedWidth || autoWidth)) {
33171      freeze = getFreeze(); // <= autoWidth: slidePositions, gutter, viewport, rightBoundary
33172                            // <= fixedWidth: fixedWidth, gutter, rightBoundary
33173                            // <= others: items
33174
33175      if (freeze !== freezeTem) {
33176        if (freeze) {
33177          doContainerTransform(getContainerTransformValue(getStartIndex(0)));
33178          freezeSlider();
33179        } else {
33180          unfreezeSlider();
33181          needContainerTransform = true;
33182        }
33183      }
33184    }
33185
33186    resetVariblesWhenDisable(disable || freeze); // controls, nav, touch, mouseDrag, arrowKeys, autoplay, autoplayHoverPause, autoplayResetOnVisibility
33187    if (!autoplay) { autoplayHoverPause = autoplayResetOnVisibility = false; }
33188
33189    if (arrowKeys !== arrowKeysTem) {
33190      arrowKeys ?
33191        addEvents(doc, docmentKeydownEvent) :
33192        removeEvents(doc, docmentKeydownEvent);
33193    }
33194    if (controls !== controlsTem) {
33195      if (controls) {
33196        if (controlsContainer) {
33197          showElement(controlsContainer);
33198        } else {
33199          if (prevButton) { showElement(prevButton); }
33200          if (nextButton) { showElement(nextButton); }
33201        }
33202      } else {
33203        if (controlsContainer) {
33204          hideElement(controlsContainer);
33205        } else {
33206          if (prevButton) { hideElement(prevButton); }
33207          if (nextButton) { hideElement(nextButton); }
33208        }
33209      }
33210    }
33211    if (nav !== navTem) {
33212      if (nav) {
33213        showElement(navContainer);
33214        updateNavVisibility();
33215      } else {
33216        hideElement(navContainer);
33217      }
33218    }
33219    if (touch !== touchTem) {
33220      touch ?
33221        addEvents(container, touchEvents, options.preventScrollOnTouch) :
33222        removeEvents(container, touchEvents);
33223    }
33224    if (mouseDrag !== mouseDragTem) {
33225      mouseDrag ?
33226        addEvents(container, dragEvents) :
33227        removeEvents(container, dragEvents);
33228    }
33229    if (autoplay !== autoplayTem) {
33230      if (autoplay) {
33231        if (autoplayButton) { showElement(autoplayButton); }
33232        if (!animating && !autoplayUserPaused) { startAutoplay(); }
33233      } else {
33234        if (autoplayButton) { hideElement(autoplayButton); }
33235        if (animating) { stopAutoplay(); }
33236      }
33237    }
33238    if (autoplayHoverPause !== autoplayHoverPauseTem) {
33239      autoplayHoverPause ?
33240        addEvents(container, hoverEvents) :
33241        removeEvents(container, hoverEvents);
33242    }
33243    if (autoplayResetOnVisibility !== autoplayResetOnVisibilityTem) {
33244      autoplayResetOnVisibility ?
33245        addEvents(doc, visibilityEvent) :
33246        removeEvents(doc, visibilityEvent);
33247    }
33248
33249    if (bpChanged) {
33250      if (fixedWidth !== fixedWidthTem || center !== centerTem) { needContainerTransform = true; }
33251
33252      if (autoHeight !== autoHeightTem) {
33253        if (!autoHeight) { innerWrapper.style.height = ''; }
33254      }
33255
33256      if (controls && controlsText !== controlsTextTem) {
33257        prevButton.innerHTML = controlsText[0];
33258        nextButton.innerHTML = controlsText[1];
33259      }
33260
33261      if (autoplayButton && autoplayText !== autoplayTextTem) {
33262        var i = autoplay ? 1 : 0,
33263            html = autoplayButton.innerHTML,
33264            len = html.length - autoplayTextTem[i].length;
33265        if (html.substring(len) === autoplayTextTem[i]) {
33266          autoplayButton.innerHTML = html.substring(0, len) + autoplayText[i];
33267        }
33268      }
33269    } else {
33270      if (center && (fixedWidth || autoWidth)) { needContainerTransform = true; }
33271    }
33272
33273    if (itemsChanged || fixedWidth && !autoWidth) {
33274      pages = getPages();
33275      updateNavVisibility();
33276    }
33277
33278    indChanged = index !== indexTem;
33279    if (indChanged) {
33280      events.emit('indexChanged', info());
33281      needContainerTransform = true;
33282    } else if (itemsChanged) {
33283      if (!indChanged) { additionalUpdates(); }
33284    } else if (fixedWidth || autoWidth) {
33285      doLazyLoad();
33286      updateSlideStatus();
33287      updateLiveRegion();
33288    }
33289
33290    if (itemsChanged && !carousel) { updateGallerySlidePositions(); }
33291
33292    if (!disable && !freeze) {
33293      // non-mediaqueries: IE8
33294      if (bpChanged && !CSSMQ) {
33295        // middle wrapper styles
33296
33297        // inner wrapper styles
33298        if (edgePadding !== edgePaddingTem || gutter !== gutterTem) {
33299          innerWrapper.style.cssText = getInnerWrapperStyles(edgePadding, gutter, fixedWidth, speed, autoHeight);
33300        }
33301
33302        if (horizontal) {
33303          // container styles
33304          if (carousel) {
33305            container.style.width = getContainerWidth(fixedWidth, gutter, items);
33306          }
33307
33308          // slide styles
33309          var str = getSlideWidthStyle(fixedWidth, gutter, items) +
33310                    getSlideGutterStyle(gutter);
33311
33312          // remove the last line and
33313          // add new styles
33314          removeCSSRule(sheet, getCssRulesLength(sheet) - 1);
33315          addCSSRule(sheet, '#' + slideId + ' > .tns-item', str, getCssRulesLength(sheet));
33316        }
33317      }
33318
33319      // auto height
33320      if (autoHeight) { doAutoHeight(); }
33321
33322      if (needContainerTransform) {
33323        doContainerTransformSilent();
33324        indexCached = index;
33325      }
33326    }
33327
33328    if (bpChanged) { events.emit('newBreakpointEnd', info(e)); }
33329  }
33330
33331
33332
33333
33334
33335  // === INITIALIZATION FUNCTIONS === //
33336  function getFreeze () {
33337    if (!fixedWidth && !autoWidth) {
33338      var a = center ? items - (items - 1) / 2 : items;
33339      return  slideCount <= a;
33340    }
33341
33342    var width = fixedWidth ? (fixedWidth + gutter) * slideCount : slidePositions[slideCount],
33343        vp = edgePadding ? viewport + edgePadding * 2 : viewport + gutter;
33344
33345    if (center) {
33346      vp -= fixedWidth ? (viewport - fixedWidth) / 2 : (viewport - (slidePositions[index + 1] - slidePositions[index] - gutter)) / 2;
33347    }
33348
33349    return width <= vp;
33350  }
33351
33352  function setBreakpointZone () {
33353    breakpointZone = 0;
33354    for (var bp in responsive) {
33355      bp = parseInt(bp); // convert string to number
33356      if (windowWidth >= bp) { breakpointZone = bp; }
33357    }
33358  }
33359
33360  // (slideBy, indexMin, indexMax) => index
33361  var updateIndex = (function () {
33362    return loop ?
33363      carousel ?
33364        // loop + carousel
33365        function () {
33366          var leftEdge = indexMin,
33367              rightEdge = indexMax;
33368
33369          leftEdge += slideBy;
33370          rightEdge -= slideBy;
33371
33372          // adjust edges when has edge paddings
33373          // or fixed-width slider with extra space on the right side
33374          if (edgePadding) {
33375            leftEdge += 1;
33376            rightEdge -= 1;
33377          } else if (fixedWidth) {
33378            if ((viewport + gutter)%(fixedWidth + gutter)) { rightEdge -= 1; }
33379          }
33380
33381          if (cloneCount) {
33382            if (index > rightEdge) {
33383              index -= slideCount;
33384            } else if (index < leftEdge) {
33385              index += slideCount;
33386            }
33387          }
33388        } :
33389        // loop + gallery
33390        function() {
33391          if (index > indexMax) {
33392            while (index >= indexMin + slideCount) { index -= slideCount; }
33393          } else if (index < indexMin) {
33394            while (index <= indexMax - slideCount) { index += slideCount; }
33395          }
33396        } :
33397      // non-loop
33398      function() {
33399        index = Math.max(indexMin, Math.min(indexMax, index));
33400      };
33401  })();
33402
33403  function disableUI () {
33404    if (!autoplay && autoplayButton) { hideElement(autoplayButton); }
33405    if (!nav && navContainer) { hideElement(navContainer); }
33406    if (!controls) {
33407      if (controlsContainer) {
33408        hideElement(controlsContainer);
33409      } else {
33410        if (prevButton) { hideElement(prevButton); }
33411        if (nextButton) { hideElement(nextButton); }
33412      }
33413    }
33414  }
33415
33416  function enableUI () {
33417    if (autoplay && autoplayButton) { showElement(autoplayButton); }
33418    if (nav && navContainer) { showElement(navContainer); }
33419    if (controls) {
33420      if (controlsContainer) {
33421        showElement(controlsContainer);
33422      } else {
33423        if (prevButton) { showElement(prevButton); }
33424        if (nextButton) { showElement(nextButton); }
33425      }
33426    }
33427  }
33428
33429  function freezeSlider () {
33430    if (frozen) { return; }
33431
33432    // remove edge padding from inner wrapper
33433    if (edgePadding) { innerWrapper.style.margin = '0px'; }
33434
33435    // add class tns-transparent to cloned slides
33436    if (cloneCount) {
33437      var str = 'tns-transparent';
33438      for (var i = cloneCount; i--;) {
33439        if (carousel) { addClass(slideItems[i], str); }
33440        addClass(slideItems[slideCountNew - i - 1], str);
33441      }
33442    }
33443
33444    // update tools
33445    disableUI();
33446
33447    frozen = true;
33448  }
33449
33450  function unfreezeSlider () {
33451    if (!frozen) { return; }
33452
33453    // restore edge padding for inner wrapper
33454    // for mordern browsers
33455    if (edgePadding && CSSMQ) { innerWrapper.style.margin = ''; }
33456
33457    // remove class tns-transparent to cloned slides
33458    if (cloneCount) {
33459      var str = 'tns-transparent';
33460      for (var i = cloneCount; i--;) {
33461        if (carousel) { removeClass(slideItems[i], str); }
33462        removeClass(slideItems[slideCountNew - i - 1], str);
33463      }
33464    }
33465
33466    // update tools
33467    enableUI();
33468
33469    frozen = false;
33470  }
33471
33472  function disableSlider () {
33473    if (disabled) { return; }
33474
33475    sheet.disabled = true;
33476    container.className = container.className.replace(newContainerClasses.substring(1), '');
33477    removeAttrs(container, ['style']);
33478    if (loop) {
33479      for (var j = cloneCount; j--;) {
33480        if (carousel) { hideElement(slideItems[j]); }
33481        hideElement(slideItems[slideCountNew - j - 1]);
33482      }
33483    }
33484
33485    // vertical slider
33486    if (!horizontal || !carousel) { removeAttrs(innerWrapper, ['style']); }
33487
33488    // gallery
33489    if (!carousel) {
33490      for (var i = index, l = index + slideCount; i < l; i++) {
33491        var item = slideItems[i];
33492        removeAttrs(item, ['style']);
33493        removeClass(item, animateIn);
33494        removeClass(item, animateNormal);
33495      }
33496    }
33497
33498    // update tools
33499    disableUI();
33500
33501    disabled = true;
33502  }
33503
33504  function enableSlider () {
33505    if (!disabled) { return; }
33506
33507    sheet.disabled = false;
33508    container.className += newContainerClasses;
33509    doContainerTransformSilent();
33510
33511    if (loop) {
33512      for (var j = cloneCount; j--;) {
33513        if (carousel) { showElement(slideItems[j]); }
33514        showElement(slideItems[slideCountNew - j - 1]);
33515      }
33516    }
33517
33518    // gallery
33519    if (!carousel) {
33520      for (var i = index, l = index + slideCount; i < l; i++) {
33521        var item = slideItems[i],
33522            classN = i < index + items ? animateIn : animateNormal;
33523        item.style.left = (i - index) * 100 / items + '%';
33524        addClass(item, classN);
33525      }
33526    }
33527
33528    // update tools
33529    enableUI();
33530
33531    disabled = false;
33532  }
33533
33534  function updateLiveRegion () {
33535    var str = getLiveRegionStr();
33536    if (liveregionCurrent.innerHTML !== str) { liveregionCurrent.innerHTML = str; }
33537  }
33538
33539  function getLiveRegionStr () {
33540    var arr = getVisibleSlideRange(),
33541        start = arr[0] + 1,
33542        end = arr[1] + 1;
33543    return start === end ? start + '' : start + ' to ' + end;
33544  }
33545
33546  function getVisibleSlideRange (val) {
33547    if (val == null) { val = getContainerTransformValue(); }
33548    var start = index, end, rangestart, rangeend;
33549
33550    // get range start, range end for autoWidth and fixedWidth
33551    if (center || edgePadding) {
33552      if (autoWidth || fixedWidth) {
33553        rangestart = - (parseFloat(val) + edgePadding);
33554        rangeend = rangestart + viewport + edgePadding * 2;
33555      }
33556    } else {
33557      if (autoWidth) {
33558        rangestart = slidePositions[index];
33559        rangeend = rangestart + viewport;
33560      }
33561    }
33562
33563    // get start, end
33564    // - check auto width
33565    if (autoWidth) {
33566      slidePositions.forEach(function(point, i) {
33567        if (i < slideCountNew) {
33568          if ((center || edgePadding) && point <= rangestart + 0.5) { start = i; }
33569          if (rangeend - point >= 0.5) { end = i; }
33570        }
33571      });
33572
33573    // - check percentage width, fixed width
33574    } else {
33575
33576      if (fixedWidth) {
33577        var cell = fixedWidth + gutter;
33578        if (center || edgePadding) {
33579          start = Math.floor(rangestart/cell);
33580          end = Math.ceil(rangeend/cell - 1);
33581        } else {
33582          end = start + Math.ceil(viewport/cell) - 1;
33583        }
33584
33585      } else {
33586        if (center || edgePadding) {
33587          var a = items - 1;
33588          if (center) {
33589            start -= a / 2;
33590            end = index + a / 2;
33591          } else {
33592            end = index + a;
33593          }
33594
33595          if (edgePadding) {
33596            var b = edgePadding * items / viewport;
33597            start -= b;
33598            end += b;
33599          }
33600
33601          start = Math.floor(start);
33602          end = Math.ceil(end);
33603        } else {
33604          end = start + items - 1;
33605        }
33606      }
33607
33608      start = Math.max(start, 0);
33609      end = Math.min(end, slideCountNew - 1);
33610    }
33611
33612    return [start, end];
33613  }
33614
33615  function doLazyLoad () {
33616    if (lazyload && !disable) {
33617      var arg = getVisibleSlideRange();
33618      arg.push(lazyloadSelector);
33619
33620      getImageArray.apply(null, arg).forEach(function (img) {
33621        if (!hasClass(img, imgCompleteClass)) {
33622          // stop propagation transitionend event to container
33623          var eve = {};
33624          eve[TRANSITIONEND] = function (e) { e.stopPropagation(); };
33625          addEvents(img, eve);
33626
33627          addEvents(img, imgEvents);
33628
33629          // update src
33630          img.src = getAttr(img, 'data-src');
33631
33632          // update srcset
33633          var srcset = getAttr(img, 'data-srcset');
33634          if (srcset) { img.srcset = srcset; }
33635
33636          addClass(img, 'loading');
33637        }
33638      });
33639    }
33640  }
33641
33642  function onImgLoaded (e) {
33643    imgLoaded(getTarget(e));
33644  }
33645
33646  function onImgFailed (e) {
33647    imgFailed(getTarget(e));
33648  }
33649
33650  function imgLoaded (img) {
33651    addClass(img, 'loaded');
33652    imgCompleted(img);
33653  }
33654
33655  function imgFailed (img) {
33656    addClass(img, 'failed');
33657    imgCompleted(img);
33658  }
33659
33660  function imgCompleted (img) {
33661    addClass(img, imgCompleteClass);
33662    removeClass(img, 'loading');
33663    removeEvents(img, imgEvents);
33664  }
33665
33666  function getImageArray (start, end, imgSelector) {
33667    var imgs = [];
33668    if (!imgSelector) { imgSelector = 'img'; }
33669
33670    while (start <= end) {
33671      forEach(slideItems[start].querySelectorAll(imgSelector), function (img) { imgs.push(img); });
33672      start++;
33673    }
33674
33675    return imgs;
33676  }
33677
33678  // check if all visible images are loaded
33679  // and update container height if it's done
33680  function doAutoHeight () {
33681    var imgs = getImageArray.apply(null, getVisibleSlideRange());
33682    raf(function(){ imgsLoadedCheck(imgs, updateInnerWrapperHeight); });
33683  }
33684
33685  function imgsLoadedCheck (imgs, cb) {
33686    // execute callback function if all images are complete
33687    if (imgsComplete) { return cb(); }
33688
33689    // check image classes
33690    imgs.forEach(function (img, index) {
33691      if (!lazyload && img.complete) { imgCompleted(img); } // Check image.complete
33692      if (hasClass(img, imgCompleteClass)) { imgs.splice(index, 1); }
33693    });
33694
33695    // execute callback function if selected images are all complete
33696    if (!imgs.length) { return cb(); }
33697
33698    // otherwise execute this functiona again
33699    raf(function(){ imgsLoadedCheck(imgs, cb); });
33700  }
33701
33702  function additionalUpdates () {
33703    doLazyLoad();
33704    updateSlideStatus();
33705    updateLiveRegion();
33706    updateControlsStatus();
33707    updateNavStatus();
33708  }
33709
33710
33711  function update_carousel_transition_duration () {
33712    if (carousel && autoHeight) {
33713      middleWrapper.style[TRANSITIONDURATION] = speed / 1000 + 's';
33714    }
33715  }
33716
33717  function getMaxSlideHeight (slideStart, slideRange) {
33718    var heights = [];
33719    for (var i = slideStart, l = Math.min(slideStart + slideRange, slideCountNew); i < l; i++) {
33720      heights.push(slideItems[i].offsetHeight);
33721    }
33722
33723    return Math.max.apply(null, heights);
33724  }
33725
33726  // update inner wrapper height
33727  // 1. get the max-height of the visible slides
33728  // 2. set transitionDuration to speed
33729  // 3. update inner wrapper height to max-height
33730  // 4. set transitionDuration to 0s after transition done
33731  function updateInnerWrapperHeight () {
33732    var maxHeight = autoHeight ? getMaxSlideHeight(index, items) : getMaxSlideHeight(cloneCount, slideCount),
33733        wp = middleWrapper ? middleWrapper : innerWrapper;
33734
33735    if (wp.style.height !== maxHeight) { wp.style.height = maxHeight + 'px'; }
33736  }
33737
33738  // get the distance from the top edge of the first slide to each slide
33739  // (init) => slidePositions
33740  function setSlidePositions () {
33741    slidePositions = [0];
33742    var attr = horizontal ? 'left' : 'top',
33743        attr2 = horizontal ? 'right' : 'bottom',
33744        base = slideItems[0].getBoundingClientRect()[attr];
33745
33746    forEach(slideItems, function(item, i) {
33747      // skip the first slide
33748      if (i) { slidePositions.push(item.getBoundingClientRect()[attr] - base); }
33749      // add the end edge
33750      if (i === slideCountNew - 1) { slidePositions.push(item.getBoundingClientRect()[attr2] - base); }
33751    });
33752  }
33753
33754  // update slide
33755  function updateSlideStatus () {
33756    var range = getVisibleSlideRange(),
33757        start = range[0],
33758        end = range[1];
33759
33760    forEach(slideItems, function(item, i) {
33761      // show slides
33762      if (i >= start && i <= end) {
33763        if (hasAttr(item, 'aria-hidden')) {
33764          removeAttrs(item, ['aria-hidden', 'tabindex']);
33765          addClass(item, slideActiveClass);
33766        }
33767      // hide slides
33768      } else {
33769        if (!hasAttr(item, 'aria-hidden')) {
33770          setAttrs(item, {
33771            'aria-hidden': 'true',
33772            'tabindex': '-1'
33773          });
33774          removeClass(item, slideActiveClass);
33775        }
33776      }
33777    });
33778  }
33779
33780  // gallery: update slide position
33781  function updateGallerySlidePositions () {
33782    var l = index + Math.min(slideCount, items);
33783    for (var i = slideCountNew; i--;) {
33784      var item = slideItems[i];
33785
33786      if (i >= index && i < l) {
33787        // add transitions to visible slides when adjusting their positions
33788        addClass(item, 'tns-moving');
33789
33790        item.style.left = (i - index) * 100 / items + '%';
33791        addClass(item, animateIn);
33792        removeClass(item, animateNormal);
33793      } else if (item.style.left) {
33794        item.style.left = '';
33795        addClass(item, animateNormal);
33796        removeClass(item, animateIn);
33797      }
33798
33799      // remove outlet animation
33800      removeClass(item, animateOut);
33801    }
33802
33803    // removing '.tns-moving'
33804    setTimeout(function() {
33805      forEach(slideItems, function(el) {
33806        removeClass(el, 'tns-moving');
33807      });
33808    }, 300);
33809  }
33810
33811  // set tabindex on Nav
33812  function updateNavStatus () {
33813    // get current nav
33814    if (nav) {
33815      navCurrentIndex = navClicked >= 0 ? navClicked : getCurrentNavIndex();
33816      navClicked = -1;
33817
33818      if (navCurrentIndex !== navCurrentIndexCached) {
33819        var navPrev = navItems[navCurrentIndexCached],
33820            navCurrent = navItems[navCurrentIndex];
33821
33822        setAttrs(navPrev, {
33823          'tabindex': '-1',
33824          'aria-label': navStr + (navCurrentIndexCached + 1)
33825        });
33826        removeClass(navPrev, navActiveClass);
33827
33828        setAttrs(navCurrent, {'aria-label': navStr + (navCurrentIndex + 1) + navStrCurrent});
33829        removeAttrs(navCurrent, 'tabindex');
33830        addClass(navCurrent, navActiveClass);
33831
33832        navCurrentIndexCached = navCurrentIndex;
33833      }
33834    }
33835  }
33836
33837  function getLowerCaseNodeName (el) {
33838    return el.nodeName.toLowerCase();
33839  }
33840
33841  function isButton (el) {
33842    return getLowerCaseNodeName(el) === 'button';
33843  }
33844
33845  function isAriaDisabled (el) {
33846    return el.getAttribute('aria-disabled') === 'true';
33847  }
33848
33849  function disEnableElement (isButton, el, val) {
33850    if (isButton) {
33851      el.disabled = val;
33852    } else {
33853      el.setAttribute('aria-disabled', val.toString());
33854    }
33855  }
33856
33857  // set 'disabled' to true on controls when reach the edges
33858  function updateControlsStatus () {
33859    if (!controls || rewind || loop) { return; }
33860
33861    var prevDisabled = (prevIsButton) ? prevButton.disabled : isAriaDisabled(prevButton),
33862        nextDisabled = (nextIsButton) ? nextButton.disabled : isAriaDisabled(nextButton),
33863        disablePrev = (index <= indexMin) ? true : false,
33864        disableNext = (!rewind && index >= indexMax) ? true : false;
33865
33866    if (disablePrev && !prevDisabled) {
33867      disEnableElement(prevIsButton, prevButton, true);
33868    }
33869    if (!disablePrev && prevDisabled) {
33870      disEnableElement(prevIsButton, prevButton, false);
33871    }
33872    if (disableNext && !nextDisabled) {
33873      disEnableElement(nextIsButton, nextButton, true);
33874    }
33875    if (!disableNext && nextDisabled) {
33876      disEnableElement(nextIsButton, nextButton, false);
33877    }
33878  }
33879
33880  // set duration
33881  function resetDuration (el, str) {
33882    if (TRANSITIONDURATION) { el.style[TRANSITIONDURATION] = str; }
33883  }
33884
33885  function getSliderWidth () {
33886    return fixedWidth ? (fixedWidth + gutter) * slideCountNew : slidePositions[slideCountNew];
33887  }
33888
33889  function getCenterGap (num) {
33890    if (num == null) { num = index; }
33891
33892    var gap = edgePadding ? gutter : 0;
33893    return autoWidth ? ((viewport - gap) - (slidePositions[num + 1] - slidePositions[num] - gutter))/2 :
33894      fixedWidth ? (viewport - fixedWidth) / 2 :
33895        (items - 1) / 2;
33896  }
33897
33898  function getRightBoundary () {
33899    var gap = edgePadding ? gutter : 0,
33900        result = (viewport + gap) - getSliderWidth();
33901
33902    if (center && !loop) {
33903      result = fixedWidth ? - (fixedWidth + gutter) * (slideCountNew - 1) - getCenterGap() :
33904        getCenterGap(slideCountNew - 1) - slidePositions[slideCountNew - 1];
33905    }
33906    if (result > 0) { result = 0; }
33907
33908    return result;
33909  }
33910
33911  function getContainerTransformValue (num) {
33912    if (num == null) { num = index; }
33913
33914    var val;
33915    if (horizontal && !autoWidth) {
33916      if (fixedWidth) {
33917        val = - (fixedWidth + gutter) * num;
33918        if (center) { val += getCenterGap(); }
33919      } else {
33920        var denominator = TRANSFORM ? slideCountNew : items;
33921        if (center) { num -= getCenterGap(); }
33922        val = - num * 100 / denominator;
33923      }
33924    } else {
33925      val = - slidePositions[num];
33926      if (center && autoWidth) {
33927        val += getCenterGap();
33928      }
33929    }
33930
33931    if (hasRightDeadZone) { val = Math.max(val, rightBoundary); }
33932
33933    val += (horizontal && !autoWidth && !fixedWidth) ? '%' : 'px';
33934
33935    return val;
33936  }
33937
33938  function doContainerTransformSilent (val) {
33939    resetDuration(container, '0s');
33940    doContainerTransform(val);
33941  }
33942
33943  function doContainerTransform (val) {
33944    if (val == null) { val = getContainerTransformValue(); }
33945    container.style[transformAttr] = transformPrefix + val + transformPostfix;
33946  }
33947
33948  function animateSlide (number, classOut, classIn, isOut) {
33949    var l = number + items;
33950    if (!loop) { l = Math.min(l, slideCountNew); }
33951
33952    for (var i = number; i < l; i++) {
33953        var item = slideItems[i];
33954
33955      // set item positions
33956      if (!isOut) { item.style.left = (i - index) * 100 / items + '%'; }
33957
33958      if (animateDelay && TRANSITIONDELAY) {
33959        item.style[TRANSITIONDELAY] = item.style[ANIMATIONDELAY] = animateDelay * (i - number) / 1000 + 's';
33960      }
33961      removeClass(item, classOut);
33962      addClass(item, classIn);
33963
33964      if (isOut) { slideItemsOut.push(item); }
33965    }
33966  }
33967
33968  // make transfer after click/drag:
33969  // 1. change 'transform' property for mordern browsers
33970  // 2. change 'left' property for legacy browsers
33971  var transformCore = (function () {
33972    return carousel ?
33973      function () {
33974        resetDuration(container, '');
33975        if (TRANSITIONDURATION || !speed) {
33976          // for morden browsers with non-zero duration or
33977          // zero duration for all browsers
33978          doContainerTransform();
33979          // run fallback function manually
33980          // when duration is 0 / container is hidden
33981          if (!speed || !isVisible(container)) { onTransitionEnd(); }
33982
33983        } else {
33984          // for old browser with non-zero duration
33985          jsTransform(container, transformAttr, transformPrefix, transformPostfix, getContainerTransformValue(), speed, onTransitionEnd);
33986        }
33987
33988        if (!horizontal) { updateContentWrapperHeight(); }
33989      } :
33990      function () {
33991        slideItemsOut = [];
33992
33993        var eve = {};
33994        eve[TRANSITIONEND] = eve[ANIMATIONEND] = onTransitionEnd;
33995        removeEvents(slideItems[indexCached], eve);
33996        addEvents(slideItems[index], eve);
33997
33998        animateSlide(indexCached, animateIn, animateOut, true);
33999        animateSlide(index, animateNormal, animateIn);
34000
34001        // run fallback function manually
34002        // when transition or animation not supported / duration is 0
34003        if (!TRANSITIONEND || !ANIMATIONEND || !speed || !isVisible(container)) { onTransitionEnd(); }
34004      };
34005  })();
34006
34007  function render (e, sliderMoved) {
34008    if (updateIndexBeforeTransform) { updateIndex(); }
34009
34010    // render when slider was moved (touch or drag) even though index may not change
34011    if (index !== indexCached || sliderMoved) {
34012      // events
34013      events.emit('indexChanged', info());
34014      events.emit('transitionStart', info());
34015      if (autoHeight) { doAutoHeight(); }
34016
34017      // pause autoplay when click or keydown from user
34018      if (animating && e && ['click', 'keydown'].indexOf(e.type) >= 0) { stopAutoplay(); }
34019
34020      running = true;
34021      transformCore();
34022    }
34023  }
34024
34025  /*
34026   * Transfer prefixed properties to the same format
34027   * CSS: -Webkit-Transform => webkittransform
34028   * JS: WebkitTransform => webkittransform
34029   * @param {string} str - property
34030   *
34031   */
34032  function strTrans (str) {
34033    return str.toLowerCase().replace(/-/g, '');
34034  }
34035
34036  // AFTER TRANSFORM
34037  // Things need to be done after a transfer:
34038  // 1. check index
34039  // 2. add classes to visible slide
34040  // 3. disable controls buttons when reach the first/last slide in non-loop slider
34041  // 4. update nav status
34042  // 5. lazyload images
34043  // 6. update container height
34044  function onTransitionEnd (event) {
34045    // check running on gallery mode
34046    // make sure trantionend/animationend events run only once
34047    if (carousel || running) {
34048      events.emit('transitionEnd', info(event));
34049
34050      if (!carousel && slideItemsOut.length > 0) {
34051        for (var i = 0; i < slideItemsOut.length; i++) {
34052          var item = slideItemsOut[i];
34053          // set item positions
34054          item.style.left = '';
34055
34056          if (ANIMATIONDELAY && TRANSITIONDELAY) {
34057            item.style[ANIMATIONDELAY] = '';
34058            item.style[TRANSITIONDELAY] = '';
34059          }
34060          removeClass(item, animateOut);
34061          addClass(item, animateNormal);
34062        }
34063      }
34064
34065      /* update slides, nav, controls after checking ...
34066       * => legacy browsers who don't support 'event'
34067       *    have to check event first, otherwise event.target will cause an error
34068       * => or 'gallery' mode:
34069       *   + event target is slide item
34070       * => or 'carousel' mode:
34071       *   + event target is container,
34072       *   + event.property is the same with transform attribute
34073       */
34074      if (!event ||
34075          !carousel && event.target.parentNode === container ||
34076          event.target === container && strTrans(event.propertyName) === strTrans(transformAttr)) {
34077
34078        if (!updateIndexBeforeTransform) {
34079          var indexTem = index;
34080          updateIndex();
34081          if (index !== indexTem) {
34082            events.emit('indexChanged', info());
34083
34084            doContainerTransformSilent();
34085          }
34086        }
34087
34088        if (nested === 'inner') { events.emit('innerLoaded', info()); }
34089        running = false;
34090        indexCached = index;
34091      }
34092    }
34093
34094  }
34095
34096  // # ACTIONS
34097  function goTo (targetIndex, e) {
34098    if (freeze) { return; }
34099
34100    // prev slideBy
34101    if (targetIndex === 'prev') {
34102      onControlsClick(e, -1);
34103
34104    // next slideBy
34105    } else if (targetIndex === 'next') {
34106      onControlsClick(e, 1);
34107
34108    // go to exact slide
34109    } else {
34110      if (running) {
34111        if (preventActionWhenRunning) { return; } else { onTransitionEnd(); }
34112      }
34113
34114      var absIndex = getAbsIndex(),
34115          indexGap = 0;
34116
34117      if (targetIndex === 'first') {
34118        indexGap = - absIndex;
34119      } else if (targetIndex === 'last') {
34120        indexGap = carousel ? slideCount - items - absIndex : slideCount - 1 - absIndex;
34121      } else {
34122        if (typeof targetIndex !== 'number') { targetIndex = parseInt(targetIndex); }
34123
34124        if (!isNaN(targetIndex)) {
34125          // from directly called goTo function
34126          if (!e) { targetIndex = Math.max(0, Math.min(slideCount - 1, targetIndex)); }
34127
34128          indexGap = targetIndex - absIndex;
34129        }
34130      }
34131
34132      // gallery: make sure new page won't overlap with current page
34133      if (!carousel && indexGap && Math.abs(indexGap) < items) {
34134        var factor = indexGap > 0 ? 1 : -1;
34135        indexGap += (index + indexGap - slideCount) >= indexMin ? slideCount * factor : slideCount * 2 * factor * -1;
34136      }
34137
34138      index += indexGap;
34139
34140      // make sure index is in range
34141      if (carousel && loop) {
34142        if (index < indexMin) { index += slideCount; }
34143        if (index > indexMax) { index -= slideCount; }
34144      }
34145
34146      // if index is changed, start rendering
34147      if (getAbsIndex(index) !== getAbsIndex(indexCached)) {
34148        render(e);
34149      }
34150
34151    }
34152  }
34153
34154  // on controls click
34155  function onControlsClick (e, dir) {
34156    if (running) {
34157      if (preventActionWhenRunning) { return; } else { onTransitionEnd(); }
34158    }
34159    var passEventObject;
34160
34161    if (!dir) {
34162      e = getEvent(e);
34163      var target = getTarget(e);
34164
34165      while (target !== controlsContainer && [prevButton, nextButton].indexOf(target) < 0) { target = target.parentNode; }
34166
34167      var targetIn = [prevButton, nextButton].indexOf(target);
34168      if (targetIn >= 0) {
34169        passEventObject = true;
34170        dir = targetIn === 0 ? -1 : 1;
34171      }
34172    }
34173
34174    if (rewind) {
34175      if (index === indexMin && dir === -1) {
34176        goTo('last', e);
34177        return;
34178      } else if (index === indexMax && dir === 1) {
34179        goTo('first', e);
34180        return;
34181      }
34182    }
34183
34184    if (dir) {
34185      index += slideBy * dir;
34186      if (autoWidth) { index = Math.floor(index); }
34187      // pass e when click control buttons or keydown
34188      render((passEventObject || (e && e.type === 'keydown')) ? e : null);
34189    }
34190  }
34191
34192  // on nav click
34193  function onNavClick (e) {
34194    if (running) {
34195      if (preventActionWhenRunning) { return; } else { onTransitionEnd(); }
34196    }
34197
34198    e = getEvent(e);
34199    var target = getTarget(e), navIndex;
34200
34201    // find the clicked nav item
34202    while (target !== navContainer && !hasAttr(target, 'data-nav')) { target = target.parentNode; }
34203    if (hasAttr(target, 'data-nav')) {
34204      var navIndex = navClicked = Number(getAttr(target, 'data-nav')),
34205          targetIndexBase = fixedWidth || autoWidth ? navIndex * slideCount / pages : navIndex * items,
34206          targetIndex = navAsThumbnails ? navIndex : Math.min(Math.ceil(targetIndexBase), slideCount - 1);
34207      goTo(targetIndex, e);
34208
34209      if (navCurrentIndex === navIndex) {
34210        if (animating) { stopAutoplay(); }
34211        navClicked = -1; // reset navClicked
34212      }
34213    }
34214  }
34215
34216  // autoplay functions
34217  function setAutoplayTimer () {
34218    autoplayTimer = setInterval(function () {
34219      onControlsClick(null, autoplayDirection);
34220    }, autoplayTimeout);
34221
34222    animating = true;
34223  }
34224
34225  function stopAutoplayTimer () {
34226    clearInterval(autoplayTimer);
34227    animating = false;
34228  }
34229
34230  function updateAutoplayButton (action, txt) {
34231    setAttrs(autoplayButton, {'data-action': action});
34232    autoplayButton.innerHTML = autoplayHtmlStrings[0] + action + autoplayHtmlStrings[1] + txt;
34233  }
34234
34235  function startAutoplay () {
34236    setAutoplayTimer();
34237    if (autoplayButton) { updateAutoplayButton('stop', autoplayText[1]); }
34238  }
34239
34240  function stopAutoplay () {
34241    stopAutoplayTimer();
34242    if (autoplayButton) { updateAutoplayButton('start', autoplayText[0]); }
34243  }
34244
34245  // programaitcally play/pause the slider
34246  function play () {
34247    if (autoplay && !animating) {
34248      startAutoplay();
34249      autoplayUserPaused = false;
34250    }
34251  }
34252  function pause () {
34253    if (animating) {
34254      stopAutoplay();
34255      autoplayUserPaused = true;
34256    }
34257  }
34258
34259  function toggleAutoplay () {
34260    if (animating) {
34261      stopAutoplay();
34262      autoplayUserPaused = true;
34263    } else {
34264      startAutoplay();
34265      autoplayUserPaused = false;
34266    }
34267  }
34268
34269  function onVisibilityChange () {
34270    if (doc.hidden) {
34271      if (animating) {
34272        stopAutoplayTimer();
34273        autoplayVisibilityPaused = true;
34274      }
34275    } else if (autoplayVisibilityPaused) {
34276      setAutoplayTimer();
34277      autoplayVisibilityPaused = false;
34278    }
34279  }
34280
34281  function mouseoverPause () {
34282    if (animating) {
34283      stopAutoplayTimer();
34284      autoplayHoverPaused = true;
34285    }
34286  }
34287
34288  function mouseoutRestart () {
34289    if (autoplayHoverPaused) {
34290      setAutoplayTimer();
34291      autoplayHoverPaused = false;
34292    }
34293  }
34294
34295  // keydown events on document
34296  function onDocumentKeydown (e) {
34297    e = getEvent(e);
34298    var keyIndex = [KEYS.LEFT, KEYS.RIGHT].indexOf(e.keyCode);
34299
34300    if (keyIndex >= 0) {
34301      onControlsClick(e, keyIndex === 0 ? -1 : 1);
34302    }
34303  }
34304
34305  // on key control
34306  function onControlsKeydown (e) {
34307    e = getEvent(e);
34308    var keyIndex = [KEYS.LEFT, KEYS.RIGHT].indexOf(e.keyCode);
34309
34310    if (keyIndex >= 0) {
34311      if (keyIndex === 0) {
34312        if (!prevButton.disabled) { onControlsClick(e, -1); }
34313      } else if (!nextButton.disabled) {
34314        onControlsClick(e, 1);
34315      }
34316    }
34317  }
34318
34319  // set focus
34320  function setFocus (el) {
34321    el.focus();
34322  }
34323
34324  // on key nav
34325  function onNavKeydown (e) {
34326    e = getEvent(e);
34327    var curElement = doc.activeElement;
34328    if (!hasAttr(curElement, 'data-nav')) { return; }
34329
34330    // var code = e.keyCode,
34331    var keyIndex = [KEYS.LEFT, KEYS.RIGHT, KEYS.ENTER, KEYS.SPACE].indexOf(e.keyCode),
34332        navIndex = Number(getAttr(curElement, 'data-nav'));
34333
34334    if (keyIndex >= 0) {
34335      if (keyIndex === 0) {
34336        if (navIndex > 0) { setFocus(navItems[navIndex - 1]); }
34337      } else if (keyIndex === 1) {
34338        if (navIndex < pages - 1) { setFocus(navItems[navIndex + 1]); }
34339      } else {
34340        navClicked = navIndex;
34341        goTo(navIndex, e);
34342      }
34343    }
34344  }
34345
34346  function getEvent (e) {
34347    e = e || win.event;
34348    return isTouchEvent(e) ? e.changedTouches[0] : e;
34349  }
34350  function getTarget (e) {
34351    return e.target || win.event.srcElement;
34352  }
34353
34354  function isTouchEvent (e) {
34355    return e.type.indexOf('touch') >= 0;
34356  }
34357
34358  function preventDefaultBehavior (e) {
34359    e.preventDefault ? e.preventDefault() : e.returnValue = false;
34360  }
34361
34362  function getMoveDirectionExpected () {
34363    return getTouchDirection(toDegree(lastPosition.y - initPosition.y, lastPosition.x - initPosition.x), swipeAngle) === options.axis;
34364  }
34365
34366  function onPanStart (e) {
34367    if (running) {
34368      if (preventActionWhenRunning) { return; } else { onTransitionEnd(); }
34369    }
34370
34371    if (autoplay && animating) { stopAutoplayTimer(); }
34372
34373    panStart = true;
34374    if (rafIndex) {
34375      caf(rafIndex);
34376      rafIndex = null;
34377    }
34378
34379    var $ = getEvent(e);
34380    events.emit(isTouchEvent(e) ? 'touchStart' : 'dragStart', info(e));
34381
34382    if (!isTouchEvent(e) && ['img', 'a'].indexOf(getLowerCaseNodeName(getTarget(e))) >= 0) {
34383      preventDefaultBehavior(e);
34384    }
34385
34386    lastPosition.x = initPosition.x = $.clientX;
34387    lastPosition.y = initPosition.y = $.clientY;
34388    if (carousel) {
34389      translateInit = parseFloat(container.style[transformAttr].replace(transformPrefix, ''));
34390      resetDuration(container, '0s');
34391    }
34392  }
34393
34394  function onPanMove (e) {
34395    if (panStart) {
34396      var $ = getEvent(e);
34397      lastPosition.x = $.clientX;
34398      lastPosition.y = $.clientY;
34399
34400      if (carousel) {
34401        if (!rafIndex) { rafIndex = raf(function(){ panUpdate(e); }); }
34402      } else {
34403        if (moveDirectionExpected === '?') { moveDirectionExpected = getMoveDirectionExpected(); }
34404        if (moveDirectionExpected) { preventScroll = true; }
34405      }
34406
34407      if ((typeof e.cancelable !== 'boolean' || e.cancelable) && preventScroll) {
34408        e.preventDefault();
34409      }
34410    }
34411  }
34412
34413  function panUpdate (e) {
34414    if (!moveDirectionExpected) {
34415      panStart = false;
34416      return;
34417    }
34418    caf(rafIndex);
34419    if (panStart) { rafIndex = raf(function(){ panUpdate(e); }); }
34420
34421    if (moveDirectionExpected === '?') { moveDirectionExpected = getMoveDirectionExpected(); }
34422    if (moveDirectionExpected) {
34423      if (!preventScroll && isTouchEvent(e)) { preventScroll = true; }
34424
34425      try {
34426        if (e.type) { events.emit(isTouchEvent(e) ? 'touchMove' : 'dragMove', info(e)); }
34427      } catch(err) {}
34428
34429      var x = translateInit,
34430          dist = getDist(lastPosition, initPosition);
34431      if (!horizontal || fixedWidth || autoWidth) {
34432        x += dist;
34433        x += 'px';
34434      } else {
34435        var percentageX = TRANSFORM ? dist * items * 100 / ((viewport + gutter) * slideCountNew): dist * 100 / (viewport + gutter);
34436        x += percentageX;
34437        x += '%';
34438      }
34439
34440      container.style[transformAttr] = transformPrefix + x + transformPostfix;
34441    }
34442  }
34443
34444  function onPanEnd (e) {
34445    if (panStart) {
34446      if (rafIndex) {
34447        caf(rafIndex);
34448        rafIndex = null;
34449      }
34450      if (carousel) { resetDuration(container, ''); }
34451      panStart = false;
34452
34453      var $ = getEvent(e);
34454      lastPosition.x = $.clientX;
34455      lastPosition.y = $.clientY;
34456      var dist = getDist(lastPosition, initPosition);
34457
34458      if (Math.abs(dist)) {
34459        // drag vs click
34460        if (!isTouchEvent(e)) {
34461          // prevent "click"
34462          var target = getTarget(e);
34463          addEvents(target, {'click': function preventClick (e) {
34464            preventDefaultBehavior(e);
34465            removeEvents(target, {'click': preventClick});
34466          }});
34467        }
34468
34469        if (carousel) {
34470          rafIndex = raf(function() {
34471            if (horizontal && !autoWidth) {
34472              var indexMoved = - dist * items / (viewport + gutter);
34473              indexMoved = dist > 0 ? Math.floor(indexMoved) : Math.ceil(indexMoved);
34474              index += indexMoved;
34475            } else {
34476              var moved = - (translateInit + dist);
34477              if (moved <= 0) {
34478                index = indexMin;
34479              } else if (moved >= slidePositions[slideCountNew - 1]) {
34480                index = indexMax;
34481              } else {
34482                var i = 0;
34483                while (i < slideCountNew && moved >= slidePositions[i]) {
34484                  index = i;
34485                  if (moved > slidePositions[i] && dist < 0) { index += 1; }
34486                  i++;
34487                }
34488              }
34489            }
34490
34491            render(e, dist);
34492            events.emit(isTouchEvent(e) ? 'touchEnd' : 'dragEnd', info(e));
34493          });
34494        } else {
34495          if (moveDirectionExpected) {
34496            onControlsClick(e, dist > 0 ? -1 : 1);
34497          }
34498        }
34499      }
34500    }
34501
34502    // reset
34503    if (options.preventScrollOnTouch === 'auto') { preventScroll = false; }
34504    if (swipeAngle) { moveDirectionExpected = '?'; }
34505    if (autoplay && !animating) { setAutoplayTimer(); }
34506  }
34507
34508  // === RESIZE FUNCTIONS === //
34509  // (slidePositions, index, items) => vertical_conentWrapper.height
34510  function updateContentWrapperHeight () {
34511    var wp = middleWrapper ? middleWrapper : innerWrapper;
34512    wp.style.height = slidePositions[index + items] - slidePositions[index] + 'px';
34513  }
34514
34515  function getPages () {
34516    var rough = fixedWidth ? (fixedWidth + gutter) * slideCount / viewport : slideCount / items;
34517    return Math.min(Math.ceil(rough), slideCount);
34518  }
34519
34520  /*
34521   * 1. update visible nav items list
34522   * 2. add "hidden" attributes to previous visible nav items
34523   * 3. remove "hidden" attrubutes to new visible nav items
34524   */
34525  function updateNavVisibility () {
34526    if (!nav || navAsThumbnails) { return; }
34527
34528    if (pages !== pagesCached) {
34529      var min = pagesCached,
34530          max = pages,
34531          fn = showElement;
34532
34533      if (pagesCached > pages) {
34534        min = pages;
34535        max = pagesCached;
34536        fn = hideElement;
34537      }
34538
34539      while (min < max) {
34540        fn(navItems[min]);
34541        min++;
34542      }
34543
34544      // cache pages
34545      pagesCached = pages;
34546    }
34547  }
34548
34549  function info (e) {
34550    return {
34551      container: container,
34552      slideItems: slideItems,
34553      navContainer: navContainer,
34554      navItems: navItems,
34555      controlsContainer: controlsContainer,
34556      hasControls: hasControls,
34557      prevButton: prevButton,
34558      nextButton: nextButton,
34559      items: items,
34560      slideBy: slideBy,
34561      cloneCount: cloneCount,
34562      slideCount: slideCount,
34563      slideCountNew: slideCountNew,
34564      index: index,
34565      indexCached: indexCached,
34566      displayIndex: getCurrentSlide(),
34567      navCurrentIndex: navCurrentIndex,
34568      navCurrentIndexCached: navCurrentIndexCached,
34569      pages: pages,
34570      pagesCached: pagesCached,
34571      sheet: sheet,
34572      isOn: isOn,
34573      event: e || {},
34574    };
34575  }
34576
34577  return {
34578    version: '2.9.3',
34579    getInfo: info,
34580    events: events,
34581    goTo: goTo,
34582    play: play,
34583    pause: pause,
34584    isOn: isOn,
34585    updateSliderHeight: updateInnerWrapperHeight,
34586    refresh: initSliderTransform,
34587    destroy: destroy,
34588    rebuild: function() {
34589      return tns(extend(options, optionsElements));
34590    }
34591  };
34592};
34593
34594return tns;
34595})();
34596(function (global, factory) {
34597    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
34598    typeof define === 'function' && define.amd ? define(['exports'], factory) :
34599    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.noUiSlider = {}));
34600}(this, (function (exports) { 'use strict';
34601
34602    exports.PipsMode = void 0;
34603    (function (PipsMode) {
34604        PipsMode["Range"] = "range";
34605        PipsMode["Steps"] = "steps";
vendor: 20,179 bytes, lines 34606-35089
34606        PipsMode["Positions"] = "positions";
34607        PipsMode["Count"] = "count";
34608        PipsMode["Values"] = "values";
34609    })(exports.PipsMode || (exports.PipsMode = {}));
34610    exports.PipsType = void 0;
34611    (function (PipsType) {
34612        PipsType[PipsType["None"] = -1] = "None";
34613        PipsType[PipsType["NoValue"] = 0] = "NoValue";
34614        PipsType[PipsType["LargeValue"] = 1] = "LargeValue";
34615        PipsType[PipsType["SmallValue"] = 2] = "SmallValue";
34616    })(exports.PipsType || (exports.PipsType = {}));
34617    //region Helper Methods
34618    function isValidFormatter(entry) {
34619        return isValidPartialFormatter(entry) && typeof entry.from === "function";
34620    }
34621    function isValidPartialFormatter(entry) {
34622        // partial formatters only need a to function and not a from function
34623        return typeof entry === "object" && typeof entry.to === "function";
34624    }
34625    function removeElement(el) {
34626        el.parentElement.removeChild(el);
34627    }
34628    function isSet(value) {
34629        return value !== null && value !== undefined;
34630    }
34631    // Bindable version
34632    function preventDefault(e) {
34633        e.preventDefault();
34634    }
34635    // Removes duplicates from an array.
34636    function unique(array) {
34637        return array.filter(function (a) {
34638            return !this[a] ? (this[a] = true) : false;
34639        }, {});
34640    }
34641    // Round a value to the closest 'to'.
34642    function closest(value, to) {
34643        return Math.round(value / to) * to;
34644    }
34645    // Current position of an element relative to the document.
34646    function offset(elem, orientation) {
34647        var rect = elem.getBoundingClientRect();
34648        var doc = elem.ownerDocument;
34649        var docElem = doc.documentElement;
34650        var pageOffset = getPageOffset(doc);
34651        // getBoundingClientRect contains left scroll in Chrome on Android.
34652        // I haven't found a feature detection that proves this. Worst case
34653        // scenario on mis-match: the 'tap' feature on horizontal sliders breaks.
34654        if (/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)) {
34655            pageOffset.x = 0;
34656        }
34657        return orientation ? rect.top + pageOffset.y - docElem.clientTop : rect.left + pageOffset.x - docElem.clientLeft;
34658    }
34659    // Checks whether a value is numerical.
34660    function isNumeric(a) {
34661        return typeof a === "number" && !isNaN(a) && isFinite(a);
34662    }
34663    // Sets a class and removes it after [duration] ms.
34664    function addClassFor(element, className, duration) {
34665        if (duration > 0) {
34666            addClass(element, className);
34667            setTimeout(function () {
34668                removeClass(element, className);
34669            }, duration);
34670        }
34671    }
34672    // Limits a value to 0 - 100
34673    function limit(a) {
34674        return Math.max(Math.min(a, 100), 0);
34675    }
34676    // Wraps a variable as an array, if it isn't one yet.
34677    // Note that an input array is returned by reference!
34678    function asArray(a) {
34679        return Array.isArray(a) ? a : [a];
34680    }
34681    // Counts decimals
34682    function countDecimals(numStr) {
34683        numStr = String(numStr);
34684        var pieces = numStr.split(".");
34685        return pieces.length > 1 ? pieces[1].length : 0;
34686    }
34687    // http://youmightnotneedjquery.com/#add_class
34688    function addClass(el, className) {
34689        if (el.classList && !/\s/.test(className)) {
34690            el.classList.add(className);
34691        }
34692        else {
34693            el.className += " " + className;
34694        }
34695    }
34696    // http://youmightnotneedjquery.com/#remove_class
34697    function removeClass(el, className) {
34698        if (el.classList && !/\s/.test(className)) {
34699            el.classList.remove(className);
34700        }
34701        else {
34702            el.className = el.className.replace(new RegExp("(^|\\b)" + className.split(" ").join("|") + "(\\b|$)", "gi"), " ");
34703        }
34704    }
34705    // https://plainjs.com/javascript/attributes/adding-removing-and-testing-for-classes-9/
34706    function hasClass(el, className) {
34707        return el.classList ? el.classList.contains(className) : new RegExp("\\b" + className + "\\b").test(el.className);
34708    }
34709    // https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollY#Notes
34710    function getPageOffset(doc) {
34711        var supportPageOffset = window.pageXOffset !== undefined;
34712        var isCSS1Compat = (doc.compatMode || "") === "CSS1Compat";
34713        var x = supportPageOffset
34714            ? window.pageXOffset
34715            : isCSS1Compat
34716                ? doc.documentElement.scrollLeft
34717                : doc.body.scrollLeft;
34718        var y = supportPageOffset
34719            ? window.pageYOffset
34720            : isCSS1Compat
34721                ? doc.documentElement.scrollTop
34722                : doc.body.scrollTop;
34723        return {
34724            x: x,
34725            y: y
34726        };
34727    }
34728    // we provide a function to compute constants instead
34729    // of accessing window.* as soon as the module needs it
34730    // so that we do not compute anything if not needed
34731    function getActions() {
34732        // Determine the events to bind. IE11 implements pointerEvents without
34733        // a prefix, which breaks compatibility with the IE10 implementation.
34734        return window.navigator.pointerEnabled
34735            ? {
34736                start: "pointerdown",
34737                move: "pointermove",
34738                end: "pointerup"
34739            }
34740            : window.navigator.msPointerEnabled
34741                ? {
34742                    start: "MSPointerDown",
34743                    move: "MSPointerMove",
34744                    end: "MSPointerUp"
34745                }
34746                : {
34747                    start: "mousedown touchstart",
34748                    move: "mousemove touchmove",
34749                    end: "mouseup touchend"
34750                };
34751    }
34752    // https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md
34753    // Issue #785
34754    function getSupportsPassive() {
34755        var supportsPassive = false;
34756        /* eslint-disable */
34757        try {
34758            var opts = Object.defineProperty({}, "passive", {
34759                get: function () {
34760                    supportsPassive = true;
34761                }
34762            });
34763            // @ts-ignore
34764            window.addEventListener("test", null, opts);
34765        }
34766        catch (e) { }
34767        /* eslint-enable */
34768        return supportsPassive;
34769    }
34770    function getSupportsTouchActionNone() {
34771        return window.CSS && CSS.supports && CSS.supports("touch-action", "none");
34772    }
34773    //endregion
34774    //region Range Calculation
34775    // Determine the size of a sub-range in relation to a full range.
34776    function subRangeRatio(pa, pb) {
34777        return 100 / (pb - pa);
34778    }
34779    // (percentage) How many percent is this value of this range?
34780    function fromPercentage(range, value, startRange) {
34781        return (value * 100) / (range[startRange + 1] - range[startRange]);
34782    }
34783    // (percentage) Where is this value on this range?
34784    function toPercentage(range, value) {
34785        return fromPercentage(range, range[0] < 0 ? value + Math.abs(range[0]) : value - range[0], 0);
34786    }
34787    // (value) How much is this percentage on this range?
34788    function isPercentage(range, value) {
34789        return (value * (range[1] - range[0])) / 100 + range[0];
34790    }
34791    function getJ(value, arr) {
34792        var j = 1;
34793        while (value >= arr[j]) {
34794            j += 1;
34795        }
34796        return j;
34797    }
34798    // (percentage) Input a value, find where, on a scale of 0-100, it applies.
34799    function toStepping(xVal, xPct, value) {
34800        if (value >= xVal.slice(-1)[0]) {
34801            return 100;
34802        }
34803        var j = getJ(value, xVal);
34804        var va = xVal[j - 1];
34805        var vb = xVal[j];
34806        var pa = xPct[j - 1];
34807        var pb = xPct[j];
34808        return pa + toPercentage([va, vb], value) / subRangeRatio(pa, pb);
34809    }
34810    // (value) Input a percentage, find where it is on the specified range.
34811    function fromStepping(xVal, xPct, value) {
34812        // There is no range group that fits 100
34813        if (value >= 100) {
34814            return xVal.slice(-1)[0];
34815        }
34816        var j = getJ(value, xPct);
34817        var va = xVal[j - 1];
34818        var vb = xVal[j];
34819        var pa = xPct[j - 1];
34820        var pb = xPct[j];
34821        return isPercentage([va, vb], (value - pa) * subRangeRatio(pa, pb));
34822    }
34823    // (percentage) Get the step that applies at a certain value.
34824    function getStep(xPct, xSteps, snap, value) {
34825        if (value === 100) {
34826            return value;
34827        }
34828        var j = getJ(value, xPct);
34829        var a = xPct[j - 1];
34830        var b = xPct[j];
34831        // If 'snap' is set, steps are used as fixed points on the slider.
34832        if (snap) {
34833            // Find the closest position, a or b.
34834            if (value - a > (b - a) / 2) {
34835                return b;
34836            }
34837            return a;
34838        }
34839        if (!xSteps[j - 1]) {
34840            return value;
34841        }
34842        return xPct[j - 1] + closest(value - xPct[j - 1], xSteps[j - 1]);
34843    }
34844    //endregion
34845    //region Spectrum
34846    var Spectrum = /** @class */ (function () {
34847        function Spectrum(entry, snap, singleStep) {
34848            this.xPct = [];
34849            this.xVal = [];
34850            this.xSteps = [];
34851            this.xNumSteps = [];
34852            this.xHighestCompleteStep = [];
34853            this.xSteps = [singleStep || false];
34854            this.xNumSteps = [false];
34855            this.snap = snap;
34856            var index;
34857            var ordered = [];
34858            // Map the object keys to an array.
34859            Object.keys(entry).forEach(function (index) {
34860                ordered.push([asArray(entry[index]), index]);
34861            });
34862            // Sort all entries by value (numeric sort).
34863            ordered.sort(function (a, b) {
34864                return a[0][0] - b[0][0];
34865            });
34866            // Convert all entries to subranges.
34867            for (index = 0; index < ordered.length; index++) {
34868                this.handleEntryPoint(ordered[index][1], ordered[index][0]);
34869            }
34870            // Store the actual step values.
34871            // xSteps is sorted in the same order as xPct and xVal.
34872            this.xNumSteps = this.xSteps.slice(0);
34873            // Convert all numeric steps to the percentage of the subrange they represent.
34874            for (index = 0; index < this.xNumSteps.length; index++) {
34875                this.handleStepPoint(index, this.xNumSteps[index]);
34876            }
34877        }
34878        Spectrum.prototype.getDistance = function (value) {
34879            var index;
34880            var distances = [];
34881            for (index = 0; index < this.xNumSteps.length - 1; index++) {
34882                // last "range" can't contain step size as it is purely an endpoint.
34883                var step = this.xNumSteps[index];
34884                if (step && (value / step) % 1 !== 0) {
34885                    throw new Error("noUiSlider: 'limit', 'margin' and 'padding' of " +
34886                        this.xPct[index] +
34887                        "% range must be divisible by step.");
34888                }
34889                // Calculate percentual distance in current range of limit, margin or padding
34890                distances[index] = fromPercentage(this.xVal, value, index);
34891            }
34892            return distances;
34893        };
34894        // Calculate the percentual distance over the whole scale of ranges.
34895        // direction: 0 = backwards / 1 = forwards
34896        Spectrum.prototype.getAbsoluteDistance = function (value, distances, direction) {
34897            var xPct_index = 0;
34898            // Calculate range where to start calculation
34899            if (value < this.xPct[this.xPct.length - 1]) {
34900                while (value > this.xPct[xPct_index + 1]) {
34901                    xPct_index++;
34902                }
34903            }
34904            else if (value === this.xPct[this.xPct.length - 1]) {
34905                xPct_index = this.xPct.length - 2;
34906            }
34907            // If looking backwards and the value is exactly at a range separator then look one range further
34908            if (!direction && value === this.xPct[xPct_index + 1]) {
34909                xPct_index++;
34910            }
34911            if (distances === null) {
34912                distances = [];
34913            }
34914            var start_factor;
34915            var rest_factor = 1;
34916            var rest_rel_distance = distances[xPct_index];
34917            var range_pct = 0;
34918            var rel_range_distance = 0;
34919            var abs_distance_counter = 0;
34920            var range_counter = 0;
34921            // Calculate what part of the start range the value is
34922            if (direction) {
34923                start_factor = (value - this.xPct[xPct_index]) / (this.xPct[xPct_index + 1] - this.xPct[xPct_index]);
34924            }
34925            else {
34926                start_factor = (this.xPct[xPct_index + 1] - value) / (this.xPct[xPct_index + 1] - this.xPct[xPct_index]);
34927            }
34928            // Do until the complete distance across ranges is calculated
34929            while (rest_rel_distance > 0) {
34930                // Calculate the percentage of total range
34931                range_pct = this.xPct[xPct_index + 1 + range_counter] - this.xPct[xPct_index + range_counter];
34932                // Detect if the margin, padding or limit is larger then the current range and calculate
34933                if (distances[xPct_index + range_counter] * rest_factor + 100 - start_factor * 100 > 100) {
34934                    // If larger then take the percentual distance of the whole range
34935                    rel_range_distance = range_pct * start_factor;
34936                    // Rest factor of relative percentual distance still to be calculated
34937                    rest_factor = (rest_rel_distance - 100 * start_factor) / distances[xPct_index + range_counter];
34938                    // Set start factor to 1 as for next range it does not apply.
34939                    start_factor = 1;
34940                }
34941                else {
34942                    // If smaller or equal then take the percentual distance of the calculate percentual part of that range
34943                    rel_range_distance = ((distances[xPct_index + range_counter] * range_pct) / 100) * rest_factor;
34944                    // No rest left as the rest fits in current range
34945                    rest_factor = 0;
34946                }
34947                if (direction) {
34948                    abs_distance_counter = abs_distance_counter - rel_range_distance;
34949                    // Limit range to first range when distance becomes outside of minimum range
34950                    if (this.xPct.length + range_counter >= 1) {
34951                        range_counter--;
34952                    }
34953                }
34954                else {
34955                    abs_distance_counter = abs_distance_counter + rel_range_distance;
34956                    // Limit range to last range when distance becomes outside of maximum range
34957                    if (this.xPct.length - range_counter >= 1) {
34958                        range_counter++;
34959                    }
34960                }
34961                // Rest of relative percentual distance still to be calculated
34962                rest_rel_distance = distances[xPct_index + range_counter] * rest_factor;
34963            }
34964            return value + abs_distance_counter;
34965        };
34966        Spectrum.prototype.toStepping = function (value) {
34967            value = toStepping(this.xVal, this.xPct, value);
34968            return value;
34969        };
34970        Spectrum.prototype.fromStepping = function (value) {
34971            return fromStepping(this.xVal, this.xPct, value);
34972        };
34973        Spectrum.prototype.getStep = function (value) {
34974            value = getStep(this.xPct, this.xSteps, this.snap, value);
34975            return value;
34976        };
34977        Spectrum.prototype.getDefaultStep = function (value, isDown, size) {
34978            var j = getJ(value, this.xPct);
34979            // When at the top or stepping down, look at the previous sub-range
34980            if (value === 100 || (isDown && value === this.xPct[j - 1])) {
34981                j = Math.max(j - 1, 1);
34982            }
34983            return (this.xVal[j] - this.xVal[j - 1]) / size;
34984        };
34985        Spectrum.prototype.getNearbySteps = function (value) {
34986            var j = getJ(value, this.xPct);
34987            return {
34988                stepBefore: {
34989                    startValue: this.xVal[j - 2],
34990                    step: this.xNumSteps[j - 2],
34991                    highestStep: this.xHighestCompleteStep[j - 2]
34992                },
34993                thisStep: {
34994                    startValue: this.xVal[j - 1],
34995                    step: this.xNumSteps[j - 1],
34996                    highestStep: this.xHighestCompleteStep[j - 1]
34997                },
34998                stepAfter: {
34999                    startValue: this.xVal[j],
35000                    step: this.xNumSteps[j],
35001                    highestStep: this.xHighestCompleteStep[j]
35002                }
35003            };
35004        };
35005        Spectrum.prototype.countStepDecimals = function () {
35006            var stepDecimals = this.xNumSteps.map(countDecimals);
35007            return Math.max.apply(null, stepDecimals);
35008        };
35009        Spectrum.prototype.hasNoSize = function () {
35010            return this.xVal[0] === this.xVal[this.xVal.length - 1];
35011        };
35012        // Outside testing
35013        Spectrum.prototype.convert = function (value) {
35014            return this.getStep(this.toStepping(value));
35015        };
35016        Spectrum.prototype.handleEntryPoint = function (index, value) {
35017            var percentage;
35018            // Covert min/max syntax to 0 and 100.
35019            if (index === "min") {
35020                percentage = 0;
35021            }
35022            else if (index === "max") {
35023                percentage = 100;
35024            }
35025            else {
35026                percentage = parseFloat(index);
35027            }
35028            // Check for correct input.
35029            if (!isNumeric(percentage) || !isNumeric(value[0])) {
35030                throw new Error("noUiSlider: 'range' value isn't numeric.");
35031            }
35032            // Store values.
35033            this.xPct.push(percentage);
35034            this.xVal.push(value[0]);
35035            var value1 = Number(value[1]);
35036            // NaN will evaluate to false too, but to keep
35037            // logging clear, set step explicitly. Make sure
35038            // not to override the 'step' setting with false.
35039            if (!percentage) {
35040                if (!isNaN(value1)) {
35041                    this.xSteps[0] = value1;
35042                }
35043            }
35044            else {
35045                this.xSteps.push(isNaN(value1) ? false : value1);
35046            }
35047            this.xHighestCompleteStep.push(0);
35048        };
35049        Spectrum.prototype.handleStepPoint = function (i, n) {
35050            // Ignore 'false' stepping.
35051            if (!n) {
35052                return;
35053            }
35054            // Step over zero-length ranges (#948);
35055            if (this.xVal[i] === this.xVal[i + 1]) {
35056                this.xSteps[i] = this.xHighestCompleteStep[i] = this.xVal[i];
35057                return;
35058            }
35059            // Factor to range ratio
35060            this.xSteps[i] =
35061                fromPercentage([this.xVal[i], this.xVal[i + 1]], n, 0) / subRangeRatio(this.xPct[i], this.xPct[i + 1]);
35062            var totalSteps = (this.xVal[i + 1] - this.xVal[i]) / this.xNumSteps[i];
35063            var highestStep = Math.ceil(Number(totalSteps.toFixed(3)) - 1);
35064            var step = this.xVal[i] + this.xNumSteps[i] * highestStep;
35065            this.xHighestCompleteStep[i] = step;
35066        };
35067        return Spectrum;
35068    }());
35069    //endregion
35070    //region Options
35071    /*	Every input option is tested and parsed. This will prevent
35072        endless validation in internal methods. These tests are
35073        structured with an item for every option available. An
35074        option can be marked as required by setting the 'r' flag.
35075        The testing function is provided with three arguments:
35076            - The provided value for the option;
35077            - A reference to the options object;
35078            - The name for the option;
35079
35080        The testing function returns false when an error is detected,
35081        or true when everything is OK. It can also modify the option
35082        object, to make sure all values can be correctly looped elsewhere. */
35083    //region Defaults
35084    var defaultFormatter = {
35085        to: function (value) {
35086            return value === undefined ? "" : value.toFixed(2);
35087        },
35088        from: Number
35089    };
35090    var cssClasses = {
35091        target: "target",
35092        base: "base",
35093        origin: "origin",
35094        handle: "handle",
35095        handleLower: "handle-lower",
35096        handleUpper: "handle-upper",
35097        touchArea: "touch-area",
35098        horizontal: "horizontal",
35099        vertical: "vertical",
35100        background: "background",
35101        connect: "connect",
35102        connects: "connects",
35103        ltr: "ltr",
35104        rtl: "rtl",
35105        textDirectionLtr: "txt-dir-ltr",
35106        textDirectionRtl: "txt-dir-rtl",
35107        draggable: "draggable",
35108        drag: "state-drag",
35109        tap: "state-tap",
35110        active: "active",
35111        tooltip: "tooltip",
35112        pips: "pips",
35113        pipsHorizontal: "pips-horizontal",
35114        pipsVertical: "pips-vertical",
35115        marker: "marker",
35116        markerHorizontal: "marker-horizontal",
35117        markerVertical: "marker-vertical",
35118        markerNormal: "marker-normal",
35119        markerLarge: "marker-large",
35120        markerSub: "marker-sub",
35121        value: "value",
35122        valueHorizontal: "value-horizontal",
35123        valueVertical: "value-vertical",
35124        valueNormal: "value-normal",
35125        valueLarge: "value-large",
35126        valueSub: "value-sub"
35127    };
35128    // Namespaces of internal event listeners
35129    var INTERNAL_EVENT_NS = {
35130        tooltips: ".__tooltips",
35131        aria: ".__aria"
vendor: 7,479 bytes, lines 35131-35320
35131
35132    };
35133    //endregion
35134    function testStep(parsed, entry) {
35135        if (!isNumeric(entry)) {
35136            throw new Error("noUiSlider: 'step' is not numeric.");
35137        }
35138        // The step option can still be used to set stepping
35139        // for linear sliders. Overwritten if set in 'range'.
35140        parsed.singleStep = entry;
35141    }
35142    function testKeyboardPageMultiplier(parsed, entry) {
35143        if (!isNumeric(entry)) {
35144            throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");
35145        }
35146        parsed.keyboardPageMultiplier = entry;
35147    }
35148    function testKeyboardMultiplier(parsed, entry) {
35149        if (!isNumeric(entry)) {
35150            throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");
35151        }
35152        parsed.keyboardMultiplier = entry;
35153    }
35154    function testKeyboardDefaultStep(parsed, entry) {
35155        if (!isNumeric(entry)) {
35156            throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");
35157        }
35158        parsed.keyboardDefaultStep = entry;
35159    }
35160    function testRange(parsed, entry) {
35161        // Filter incorrect input.
35162        if (typeof entry !== "object" || Array.isArray(entry)) {
35163            throw new Error("noUiSlider: 'range' is not an object.");
35164        }
35165        // Catch missing start or end.
35166        if (entry.min === undefined || entry.max === undefined) {
35167            throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");
35168        }
35169        parsed.spectrum = new Spectrum(entry, parsed.snap || false, parsed.singleStep);
35170    }
35171    function testStart(parsed, entry) {
35172        entry = asArray(entry);
35173        // Validate input. Values aren't tested, as the public .val method
35174        // will always provide a valid location.
35175        if (!Array.isArray(entry) || !entry.length) {
35176            throw new Error("noUiSlider: 'start' option is incorrect.");
35177        }
35178        // Store the number of handles.
35179        parsed.handles = entry.length;
35180        // When the slider is initialized, the .val method will
35181        // be called with the start options.
35182        parsed.start = entry;
35183    }
35184    function testSnap(parsed, entry) {
35185        if (typeof entry !== "boolean") {
35186            throw new Error("noUiSlider: 'snap' option must be a boolean.");
35187        }
35188        // Enforce 100% stepping within subranges.
35189        parsed.snap = entry;
35190    }
35191    function testAnimate(parsed, entry) {
35192        if (typeof entry !== "boolean") {
35193            throw new Error("noUiSlider: 'animate' option must be a boolean.");
35194        }
35195        // Enforce 100% stepping within subranges.
35196        parsed.animate = entry;
35197    }
35198    function testAnimationDuration(parsed, entry) {
35199        if (typeof entry !== "number") {
35200            throw new Error("noUiSlider: 'animationDuration' option must be a number.");
35201        }
35202        parsed.animationDuration = entry;
35203    }
35204    function testConnect(parsed, entry) {
35205        var connect = [false];
35206        var i;
35207        // Map legacy options
35208        if (entry === "lower") {
35209            entry = [true, false];
35210        }
35211        else if (entry === "upper") {
35212            entry = [false, true];
35213        }
35214        // Handle boolean options
35215        if (entry === true || entry === false) {
35216            for (i = 1; i < parsed.handles; i++) {
35217                connect.push(entry);
35218            }
35219            connect.push(false);
35220        }
35221        // Reject invalid input
35222        else if (!Array.isArray(entry) || !entry.length || entry.length !== parsed.handles + 1) {
35223            throw new Error("noUiSlider: 'connect' option doesn't match handle count.");
35224        }
35225        else {
35226            connect = entry;
35227        }
35228        parsed.connect = connect;
35229    }
35230    function testOrientation(parsed, entry) {
35231        // Set orientation to an a numerical value for easy
35232        // array selection.
35233        switch (entry) {
35234            case "horizontal":
35235                parsed.ort = 0;
35236                break;
35237            case "vertical":
35238                parsed.ort = 1;
35239                break;
35240            default:
35241                throw new Error("noUiSlider: 'orientation' option is invalid.");
35242        }
35243    }
35244    function testMargin(parsed, entry) {
35245        if (!isNumeric(entry)) {
35246            throw new Error("noUiSlider: 'margin' option must be numeric.");
35247        }
35248        // Issue #582
35249        if (entry === 0) {
35250            return;
35251        }
35252        parsed.margin = parsed.spectrum.getDistance(entry);
35253    }
35254    function testLimit(parsed, entry) {
35255        if (!isNumeric(entry)) {
35256            throw new Error("noUiSlider: 'limit' option must be numeric.");
35257        }
35258        parsed.limit = parsed.spectrum.getDistance(entry);
35259        if (!parsed.limit || parsed.handles < 2) {
35260            throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.");
35261        }
35262    }
35263    function testPadding(parsed, entry) {
35264        var index;
35265        if (!isNumeric(entry) && !Array.isArray(entry)) {
35266            throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");
35267        }
35268        if (Array.isArray(entry) && !(entry.length === 2 || isNumeric(entry[0]) || isNumeric(entry[1]))) {
35269            throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");
35270        }
35271        if (entry === 0) {
35272            return;
35273        }
35274        if (!Array.isArray(entry)) {
35275            entry = [entry, entry];
35276        }
35277        // 'getDistance' returns false for invalid values.
35278        parsed.padding = [parsed.spectrum.getDistance(entry[0]), parsed.spectrum.getDistance(entry[1])];
35279        for (index = 0; index < parsed.spectrum.xNumSteps.length - 1; index++) {
35280            // last "range" can't contain step size as it is purely an endpoint.
35281            if (parsed.padding[0][index] < 0 || parsed.padding[1][index] < 0) {
35282                throw new Error("noUiSlider: 'padding' option must be a positive number(s).");
35283            }
35284        }
35285        var totalPadding = entry[0] + entry[1];
35286        var firstValue = parsed.spectrum.xVal[0];
35287        var lastValue = parsed.spectrum.xVal[parsed.spectrum.xVal.length - 1];
35288        if (totalPadding / (lastValue - firstValue) > 1) {
35289            throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.");
35290        }
35291    }
35292    function testDirection(parsed, entry) {
35293        // Set direction as a numerical value for easy parsing.
35294        // Invert connection for RTL sliders, so that the proper
35295        // handles get the connect/background classes.
35296        switch (entry) {
35297            case "ltr":
35298                parsed.dir = 0;
35299                break;
35300            case "rtl":
35301                parsed.dir = 1;
35302                break;
35303            default:
35304                throw new Error("noUiSlider: 'direction' option was not recognized.");
35305        }
35306    }
35307    function testBehaviour(parsed, entry) {
35308        // Make sure the input is a string.
35309        if (typeof entry !== "string") {
35310            throw new Error("noUiSlider: 'behaviour' must be a string containing options.");
35311        }
35312        // Check if the string contains any keywords.
35313        // None are required.
35314        var tap = entry.indexOf("tap") >= 0;
35315        var drag = entry.indexOf("drag") >= 0;
35316        var fixed = entry.indexOf("fixed") >= 0;
35317        var snap = entry.indexOf("snap") >= 0;
35318        var hover = entry.indexOf("hover") >= 0;
35319        var unconstrained = entry.indexOf("unconstrained") >= 0;
35320        var 
vendor: 2,950 bytes, lines 35320-35397
35320dragAll = entry.indexOf("drag-all") >= 0;
35321        if (fixed) {
35322            if (parsed.handles !== 2) {
35323                throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");
35324            }
35325            // Use margin to enforce fixed state
35326            testMargin(parsed, parsed.start[1] - parsed.start[0]);
35327        }
35328        if (unconstrained && (parsed.margin || parsed.limit)) {
35329            throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");
35330        }
35331        parsed.events = {
35332            tap: tap || snap,
35333            drag: drag,
35334            dragAll: dragAll,
35335            fixed: fixed,
35336            snap: snap,
35337            hover: hover,
35338            unconstrained: unconstrained
35339        };
35340    }
35341    function testTooltips(parsed, entry) {
35342        if (entry === false) {
35343            return;
35344        }
35345        if (entry === true || isValidPartialFormatter(entry)) {
35346            parsed.tooltips = [];
35347            for (var i = 0; i < parsed.handles; i++) {
35348                parsed.tooltips.push(entry);
35349            }
35350        }
35351        else {
35352            entry = asArray(entry);
35353            if (entry.length !== parsed.handles) {
35354                throw new Error("noUiSlider: must pass a formatter for all handles.");
35355            }
35356            entry.forEach(function (formatter) {
35357                if (typeof formatter !== "boolean" && !isValidPartialFormatter(formatter)) {
35358                    throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.");
35359                }
35360            });
35361            parsed.tooltips = entry;
35362        }
35363    }
35364    function testHandleAttributes(parsed, entry) {
35365        if (entry.length !== parsed.handles) {
35366            throw new Error("noUiSlider: must pass a attributes for all handles.");
35367        }
35368        parsed.handleAttributes = entry;
35369    }
35370    function testAriaFormat(parsed, entry) {
35371        if (!isValidPartialFormatter(entry)) {
35372            throw new Error("noUiSlider: 'ariaFormat' requires 'to' method.");
35373        }
35374        parsed.ariaFormat = entry;
35375    }
35376    function testFormat(parsed, entry) {
35377        if (!isValidFormatter(entry)) {
35378            throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.");
35379        }
35380        parsed.format = entry;
35381    }
35382    function testKeyboardSupport(parsed, entry) {
35383        if (typeof entry !== "boolean") {
35384            throw new Error("noUiSlider: 'keyboardSupport' option must be a boolean.");
35385        }
35386        parsed.keyboardSupport = entry;
35387    }
35388    function testDocumentElement(parsed, entry) {
35389        // This is an advanced option. Passed values are used without validation.
35390        parsed.documentElement = entry;
35391    }
35392    function testCssPrefix(parsed, entry) {
35393        if (typeof entry !== "string" && entry !== false) {
35394            throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");
35395        }
35396        parsed.cssPrefix = entry;
35397    }
35398    function testCssClasses(parsed, entry) {
35399        if (typeof entry !== "object") {
35400            throw new Error("noUiSlider: 'cssClasses' must be an object.");
35401        }
35402        if (typeof parsed.cssPrefix === "string") {
35403            parsed.cssClasses = {};
35404            Object.keys(entry).forEach(function (key) {
35405                parsed.cssClasses[key] = parsed.cssPrefix + entry[key];
35406            });
35407        }
35408        else {
35409            parsed.cssClasses = entry;
35410        }
35411    }
35412    // Test all developer settings and parse to assumption-safe values.
35413    function testOptions(options) {
35414        // To prove a fix for #537, freeze options here.
35415        // If the object is modified, an error will be thrown.
35416        // Object.freeze(options);
35417        var parsed = {
35418            margin: null,
35419            limit: null,
35420            padding: null,
35421            animate: true,
35422            animationDuration: 300,
35423            ariaFormat: defaultFormatter,
35424            format: defaultFormatter
35425        };
35426        // Tests are executed in the order they are presented here.
35427        var tests = {
35428            step: { r: false, t: testStep },
35429            keyboardPageMultiplier: { r: false, t: testKeyboardPageMultiplier },
35430            keyboardMultiplier: { r: false, t: testKeyboardMultiplier },
35431            keyboardDefaultStep: { r: false, t: testKeyboardDefaultStep },
35432            start: { r: true, t: testStart },
35433            connect: { r: true, t: testConnect },
35434            direction: { r: true, t: testDirection },
35435            snap: { r: false, t: testSnap },
35436            animate: { r: false, t: testAnimate },
35437            animationDuration: { r: false, t: testAnimationDuration },
35438            range: { r: true, t: testRange },
35439            orientation: { r: false, t: testOrientation },
35440            margin: { r: false, t: testMargin },
35441            limit: { r: false, t: testLimit },
35442            padding: { r: false, t: testPadding },
35443            behaviour: { r: true, t: testBehaviour },
35444            ariaFormat: { r: false, t: testAriaFormat },
35445            format: { r: false, t: testFormat },
35446            tooltips: { r: false, t: testTooltips },
35447            keyboardSupport: { r: true, t: testKeyboardSupport },
35448            documentElement: { r: false, t: testDocumentElement },
35449            cssPrefix: { r: true, t: testCssPrefix },
vendor: 20,790 bytes, lines 35450-35880
35450            cssClasses: { r: true, t: testCssClasses },
35451            handleAttributes: { r: false, t: testHandleAttributes }
35452        };
35453        var defaults = {
35454            connect: false,
35455            direction: "ltr",
35456            behaviour: "tap",
35457            orientation: "horizontal",
35458            keyboardSupport: true,
35459            cssPrefix: "noUi-",
35460            cssClasses: cssClasses,
35461            keyboardPageMultiplier: 5,
35462            keyboardMultiplier: 1,
35463            keyboardDefaultStep: 10
35464        };
35465        // AriaFormat defaults to regular format, if any.
35466        if (options.format && !options.ariaFormat) {
35467            options.ariaFormat = options.format;
35468        }
35469        // Run all options through a testing mechanism to ensure correct
35470        // input. It should be noted that options might get modified to
35471        // be handled properly. E.g. wrapping integers in arrays.
35472        Object.keys(tests).forEach(function (name) {
35473            // If the option isn't set, but it is required, throw an error.
35474            if (!isSet(options[name]) && defaults[name] === undefined) {
35475                if (tests[name].r) {
35476                    throw new Error("noUiSlider: '" + name + "' is required.");
35477                }
35478                return;
35479            }
35480            tests[name].t(parsed, !isSet(options[name]) ? defaults[name] : options[name]);
35481        });
35482        // Forward pips options
35483        parsed.pips = options.pips;
35484        // All recent browsers accept unprefixed transform.
35485        // We need -ms- for IE9 and -webkit- for older Android;
35486        // Assume use of -webkit- if unprefixed and -ms- are not supported.
35487        // https://caniuse.com/#feat=transforms2d
35488        var d = document.createElement("div");
35489        var msPrefix = d.style.msTransform !== undefined;
35490        var noPrefix = d.style.transform !== undefined;
35491        parsed.transformRule = noPrefix ? "transform" : msPrefix ? "msTransform" : "webkitTransform";
35492        // Pips don't move, so we can place them using left/top.
35493        var styles = [
35494            ["left", "top"],
35495            ["right", "bottom"]
35496        ];
35497        parsed.style = styles[parsed.dir][parsed.ort];
35498        return parsed;
35499    }
35500    //endregion
35501    function scope(target, options, originalOptions) {
35502        var actions = getActions();
35503        var supportsTouchActionNone = getSupportsTouchActionNone();
35504        var supportsPassive = supportsTouchActionNone && getSupportsPassive();
35505        // All variables local to 'scope' are prefixed with 'scope_'
35506        // Slider DOM Nodes
35507        var scope_Target = target;
35508        var scope_Base;
35509        var scope_Handles;
35510        var scope_Connects;
35511        var scope_Pips;
35512        var scope_Tooltips;
35513        // Slider state values
35514        var scope_Spectrum = options.spectrum;
35515        var scope_Values = [];
35516        var scope_Locations = [];
35517        var scope_HandleNumbers = [];
35518        var scope_ActiveHandlesCount = 0;
35519        var scope_Events = {};
35520        // Document Nodes
35521        var scope_Document = target.ownerDocument;
35522        var scope_DocumentElement = options.documentElement || scope_Document.documentElement;
35523        var scope_Body = scope_Document.body;
35524        // For horizontal sliders in standard ltr documents,
35525        // make .noUi-origin overflow to the left so the document doesn't scroll.
35526        var scope_DirOffset = scope_Document.dir === "rtl" || options.ort === 1 ? 0 : 100;
35527        // Creates a node, adds it to target, returns the new node.
35528        function addNodeTo(addTarget, className) {
35529            var div = scope_Document.createElement("div");
35530            if (className) {
35531                addClass(div, className);
35532            }
35533            addTarget.appendChild(div);
35534            return div;
35535        }
35536        // Append a origin to the base
35537        function addOrigin(base, handleNumber) {
35538            var origin = addNodeTo(base, options.cssClasses.origin);
35539            var handle = addNodeTo(origin, options.cssClasses.handle);
35540            addNodeTo(handle, options.cssClasses.touchArea);
35541            handle.setAttribute("data-handle", String(handleNumber));
35542            if (options.keyboardSupport) {
35543                // https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
35544                // 0 = focusable and reachable
35545                handle.setAttribute("tabindex", "0");
35546                handle.addEventListener("keydown", function (event) {
35547                    return eventKeydown(event, handleNumber);
35548                });
35549            }
35550            if (options.handleAttributes !== undefined) {
35551                var attributes_1 = options.handleAttributes[handleNumber];
35552                Object.keys(attributes_1).forEach(function (attribute) {
35553                    handle.setAttribute(attribute, attributes_1[attribute]);
35554                });
35555            }
35556            handle.setAttribute("role", "slider");
35557            handle.setAttribute("aria-orientation", options.ort ? "vertical" : "horizontal");
35558            if (handleNumber === 0) {
35559                addClass(handle, options.cssClasses.handleLower);
35560            }
35561            else if (handleNumber === options.handles - 1) {
35562                addClass(handle, options.cssClasses.handleUpper);
35563            }
35564            return origin;
35565        }
35566        // Insert nodes for connect elements
35567        function addConnect(base, add) {
35568            if (!add) {
35569                return false;
35570            }
35571            return addNodeTo(base, options.cssClasses.connect);
35572        }
35573        // Add handles to the slider base.
35574        function addElements(connectOptions, base) {
35575            var connectBase = addNodeTo(base, options.cssClasses.connects);
35576            scope_Handles = [];
35577            scope_Connects = [];
35578            scope_Connects.push(addConnect(connectBase, connectOptions[0]));
35579            // [::::O====O====O====]
35580            // connectOptions = [0, 1, 1, 1]
35581            for (var i = 0; i < options.handles; i++) {
35582                // Keep a list of all added handles.
35583                scope_Handles.push(addOrigin(base, i));
35584                scope_HandleNumbers[i] = i;
35585                scope_Connects.push(addConnect(connectBase, connectOptions[i + 1]));
35586            }
35587        }
35588        // Initialize a single slider.
35589        function addSlider(addTarget) {
35590            // Apply classes and data to the target.
35591            addClass(addTarget, options.cssClasses.target);
35592            if (options.dir === 0) {
35593                addClass(addTarget, options.cssClasses.ltr);
35594            }
35595            else {
35596                addClass(addTarget, options.cssClasses.rtl);
35597            }
35598            if (options.ort === 0) {
35599                addClass(addTarget, options.cssClasses.horizontal);
35600            }
35601            else {
35602                addClass(addTarget, options.cssClasses.vertical);
35603            }
35604            var textDirection = getComputedStyle(addTarget).direction;
35605            if (textDirection === "rtl") {
35606                addClass(addTarget, options.cssClasses.textDirectionRtl);
35607            }
35608            else {
35609                addClass(addTarget, options.cssClasses.textDirectionLtr);
35610            }
35611            return addNodeTo(addTarget, options.cssClasses.base);
35612        }
35613        function addTooltip(handle, handleNumber) {
35614            if (!options.tooltips || !options.tooltips[handleNumber]) {
35615                return false;
35616            }
35617            return addNodeTo(handle.firstChild, options.cssClasses.tooltip);
35618        }
35619        function isSliderDisabled() {
35620            return scope_Target.hasAttribute("disabled");
35621        }
35622        // Disable the slider dragging if any handle is disabled
35623        function isHandleDisabled(handleNumber) {
35624            var handleOrigin = scope_Handles[handleNumber];
35625            return handleOrigin.hasAttribute("disabled");
35626        }
35627        function removeTooltips() {
35628            if (scope_Tooltips) {
35629                removeEvent("update" + INTERNAL_EVENT_NS.tooltips);
35630                scope_Tooltips.forEach(function (tooltip) {
35631                    if (tooltip) {
35632                        removeElement(tooltip);
35633                    }
35634                });
35635                scope_Tooltips = null;
35636            }
35637        }
35638        // The tooltips option is a shorthand for using the 'update' event.
35639        function tooltips() {
35640            removeTooltips();
35641            // Tooltips are added with options.tooltips in original order.
35642            scope_Tooltips = scope_Handles.map(addTooltip);
35643            bindEvent("update" + INTERNAL_EVENT_NS.tooltips, function (values, handleNumber, unencoded) {
35644                if (!scope_Tooltips || !options.tooltips) {
35645                    return;
35646                }
35647                if (scope_Tooltips[handleNumber] === false) {
35648                    return;
35649                }
35650                var formattedValue = values[handleNumber];
35651                if (options.tooltips[handleNumber] !== true) {
35652                    formattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);
35653                }
35654                scope_Tooltips[handleNumber].innerHTML = formattedValue;
35655            });
35656        }
35657        function aria() {
35658            removeEvent("update" + INTERNAL_EVENT_NS.aria);
35659            bindEvent("update" + INTERNAL_EVENT_NS.aria, function (values, handleNumber, unencoded, tap, positions) {
35660                // Update Aria Values for all handles, as a change in one changes min and max values for the next.
35661                scope_HandleNumbers.forEach(function (index) {
35662                    var handle = scope_Handles[index];
35663                    var min = checkHandlePosition(scope_Locations, index, 0, true, true, true);
35664                    var max = checkHandlePosition(scope_Locations, index, 100, true, true, true);
35665                    var now = positions[index];
35666                    // Formatted value for display
35667                    var text = String(options.ariaFormat.to(unencoded[index]));
35668                    // Map to slider range values
35669                    min = scope_Spectrum.fromStepping(min).toFixed(1);
35670                    max = scope_Spectrum.fromStepping(max).toFixed(1);
35671                    now = scope_Spectrum.fromStepping(now).toFixed(1);
35672                    handle.children[0].setAttribute("aria-valuemin", min);
35673                    handle.children[0].setAttribute("aria-valuemax", max);
35674                    handle.children[0].setAttribute("aria-valuenow", now);
35675                    handle.children[0].setAttribute("aria-valuetext", text);
35676                });
35677            });
35678        }
35679        function getGroup(pips) {
35680            // Use the range.
35681            if (pips.mode === exports.PipsMode.Range || pips.mode === exports.PipsMode.Steps) {
35682                return scope_Spectrum.xVal;
35683            }
35684            if (pips.mode === exports.PipsMode.Count) {
35685                if (pips.values < 2) {
35686                    throw new Error("noUiSlider: 'values' (>= 2) required for mode 'count'.");
35687                }
35688                // Divide 0 - 100 in 'count' parts.
35689                var interval = pips.values - 1;
35690                var spread = 100 / interval;
35691                var values = [];
35692                // List these parts and have them handled as 'positions'.
35693                while (interval--) {
35694                    values[interval] = interval * spread;
35695                }
35696                values.push(100);
35697                return mapToRange(values, pips.stepped);
35698            }
35699            if (pips.mode === exports.PipsMode.Positions) {
35700                // Map all percentages to on-range values.
35701                return mapToRange(pips.values, pips.stepped);
35702            }
35703            if (pips.mode === exports.PipsMode.Values) {
35704                // If the value must be stepped, it needs to be converted to a percentage first.
35705                if (pips.stepped) {
35706                    return pips.values.map(function (value) {
35707                        // Convert to percentage, apply step, return to value.
35708                        return scope_Spectrum.fromStepping(scope_Spectrum.getStep(scope_Spectrum.toStepping(value)));
35709                    });
35710                }
35711                // Otherwise, we can simply use the values.
35712                return pips.values;
35713            }
35714            return []; // pips.mode = never
35715        }
35716        function mapToRange(values, stepped) {
35717            return values.map(function (value) {
35718                return scope_Spectrum.fromStepping(stepped ? scope_Spectrum.getStep(value) : value);
35719            });
35720        }
35721        function generateSpread(pips) {
35722            function safeIncrement(value, increment) {
35723                // Avoid floating point variance by dropping the smallest decimal places.
35724                return Number((value + increment).toFixed(7));
35725            }
35726            var group = getGroup(pips);
35727            var indexes = {};
35728            var firstInRange = scope_Spectrum.xVal[0];
35729            var lastInRange = scope_Spectrum.xVal[scope_Spectrum.xVal.length - 1];
35730            var ignoreFirst = false;
35731            var ignoreLast = false;
35732            var prevPct = 0;
35733            // Create a copy of the group, sort it and filter away all duplicates.
35734            group = unique(group.slice().sort(function (a, b) {
35735                return a - b;
35736            }));
35737            // Make sure the range starts with the first element.
35738            if (group[0] !== firstInRange) {
35739                group.unshift(firstInRange);
35740                ignoreFirst = true;
35741            }
35742            // Likewise for the last one.
35743            if (group[group.length - 1] !== lastInRange) {
35744                group.push(lastInRange);
35745                ignoreLast = true;
35746            }
35747            group.forEach(function (current, index) {
35748                // Get the current step and the lower + upper positions.
35749                var step;
35750                var i;
35751                var q;
35752                var low = current;
35753                var high = group[index + 1];
35754                var newPct;
35755                var pctDifference;
35756                var pctPos;
35757                var type;
35758                var steps;
35759                var realSteps;
35760                var stepSize;
35761                var isSteps = pips.mode === exports.PipsMode.Steps;
35762                // When using 'steps' mode, use the provided steps.
35763                // Otherwise, we'll step on to the next subrange.
35764                if (isSteps) {
35765                    step = scope_Spectrum.xNumSteps[index];
35766                }
35767                // Default to a 'full' step.
35768                if (!step) {
35769                    step = high - low;
35770                }
35771                // If high is undefined we are at the last subrange. Make sure it iterates once (#1088)
35772                if (high === undefined) {
35773                    high = low;
35774                }
35775                // Make sure step isn't 0, which would cause an infinite loop (#654)
35776                step = Math.max(step, 0.0000001);
35777                // Find all steps in the subrange.
35778                for (i = low; i <= high; i = safeIncrement(i, step)) {
35779                    // Get the percentage value for the current step,
35780                    // calculate the size for the subrange.
35781                    newPct = scope_Spectrum.toStepping(i);
35782                    pctDifference = newPct - prevPct;
35783                    steps = pctDifference / (pips.density || 1);
35784                    realSteps = Math.round(steps);
35785                    // This ratio represents the amount of percentage-space a point indicates.
35786                    // For a density 1 the points/percentage = 1. For density 2, that percentage needs to be re-divided.
35787                    // Round the percentage offset to an even number, then divide by two
35788                    // to spread the offset on both sides of the range.
35789                    stepSize = pctDifference / realSteps;
35790                    // Divide all points evenly, adding the correct number to this subrange.
35791                    // Run up to <= so that 100% gets a point, event if ignoreLast is set.
35792                    for (q = 1; q <= realSteps; q += 1) {
35793                        // The ratio between the rounded value and the actual size might be ~1% off.
35794                        // Correct the percentage offset by the number of points
35795                        // per subrange. density = 1 will result in 100 points on the
35796                        // full range, 2 for 50, 4 for 25, etc.
35797                        pctPos = prevPct + q * stepSize;
35798                        indexes[pctPos.toFixed(5)] = [scope_Spectrum.fromStepping(pctPos), 0];
35799                    }
35800                    // Determine the point type.
35801                    type = group.indexOf(i) > -1 ? exports.PipsType.LargeValue : isSteps ? exports.PipsType.SmallValue : exports.PipsType.NoValue;
35802                    // Enforce the 'ignoreFirst' option by overwriting the type for 0.
35803                    if (!index && ignoreFirst && i !== high) {
35804                        type = 0;
35805                    }
35806                    if (!(i === high && ignoreLast)) {
35807                        // Mark the 'type' of this point. 0 = plain, 1 = real value, 2 = step value.
35808                        indexes[newPct.toFixed(5)] = [i, type];
35809                    }
35810                    // Update the percentage count.
35811                    prevPct = newPct;
35812                }
35813            });
35814            return indexes;
35815        }
35816        function addMarking(spread, filterFunc, formatter) {
35817            var _a, _b;
35818            var element = scope_Document.createElement("div");
35819            var valueSizeClasses = (_a = {},
35820                _a[exports.PipsType.None] = "",
35821                _a[exports.PipsType.NoValue] = options.cssClasses.valueNormal,
35822                _a[exports.PipsType.LargeValue] = options.cssClasses.valueLarge,
35823                _a[exports.PipsType.SmallValue] = options.cssClasses.valueSub,
35824                _a);
35825            var markerSizeClasses = (_b = {},
35826                _b[exports.PipsType.None] = "",
35827                _b[exports.PipsType.NoValue] = options.cssClasses.markerNormal,
35828                _b[exports.PipsType.LargeValue] = options.cssClasses.markerLarge,
35829                _b[exports.PipsType.SmallValue] = options.cssClasses.markerSub,
35830                _b);
35831            var valueOrientationClasses = [options.cssClasses.valueHorizontal, options.cssClasses.valueVertical];
35832            var markerOrientationClasses = [options.cssClasses.markerHorizontal, options.cssClasses.markerVertical];
35833            addClass(element, options.cssClasses.pips);
35834            addClass(element, options.ort === 0 ? options.cssClasses.pipsHorizontal : options.cssClasses.pipsVertical);
35835            function getClasses(type, source) {
35836                var a = source === options.cssClasses.value;
35837                var orientationClasses = a ? valueOrientationClasses : markerOrientationClasses;
35838                var sizeClasses = a ? valueSizeClasses : markerSizeClasses;
35839                return source + " " + orientationClasses[options.ort] + " " + sizeClasses[type];
35840            }
35841            function addSpread(offset, value, type) {
35842                // Apply the filter function, if it is set.
35843                type = filterFunc ? filterFunc(value, type) : type;
35844                if (type === exports.PipsType.None) {
35845                    return;
35846                }
35847                // Add a marker for every point
35848                var node = addNodeTo(element, false);
35849                node.className = getClasses(type, options.cssClasses.marker);
35850                node.style[options.style] = offset + "%";
35851                // Values are only appended for points marked '1' or '2'.
35852                if (type > exports.PipsType.NoValue) {
35853                    node = addNodeTo(element, false);
35854                    node.className = getClasses(type, options.cssClasses.value);
35855                    node.setAttribute("data-value", String(value));
35856                    node.style[options.style] = offset + "%";
35857                    node.innerHTML = String(formatter.to(value));
35858                }
35859            }
35860            // Append all points.
35861            Object.keys(spread).forEach(function (offset) {
35862                addSpread(offset, spread[offset][0], spread[offset][1]);
35863            });
35864            return element;
35865        }
35866        function removePips() {
35867            if (scope_Pips) {
35868                removeElement(scope_Pips);
35869                scope_Pips = null;
35870            }
35871        }
35872        function pips(pips) {
35873            // Fix #669
35874            removePips();
35875            var spread = generateSpread(pips);
35876            var filter = pips.filter;
35877            var format = pips.format || {
35878                to: function (value) {
35879                    return String(Math.round(value));
35880                }
vendor: 10,347 bytes, lines 35880-36079
35880
35881            };
35882            scope_Pips = scope_Target.appendChild(addMarking(spread, filter, format));
35883            return scope_Pips;
35884        }
35885        // Shorthand for base dimensions.
35886        function baseSize() {
35887            var rect = scope_Base.getBoundingClientRect();
35888            var alt = ("offset" + ["Width", "Height"][options.ort]);
35889            return options.ort === 0 ? rect.width || scope_Base[alt] : rect.height || scope_Base[alt];
35890        }
35891        // Handler for attaching events trough a proxy.
35892        function attachEvent(events, element, callback, data) {
35893            // This function can be used to 'filter' events to the slider.
35894            // element is a node, not a nodeList
35895            var method = function (event) {
35896                var e = fixEvent(event, data.pageOffset, data.target || element);
35897                // fixEvent returns false if this event has a different target
35898                // when handling (multi-) touch events;
35899                if (!e) {
35900                    return false;
35901                }
35902                // doNotReject is passed by all end events to make sure released touches
35903                // are not rejected, leaving the slider "stuck" to the cursor;
35904                if (isSliderDisabled() && !data.doNotReject) {
35905                    return false;
35906                }
35907                // Stop if an active 'tap' transition is taking place.
35908                if (hasClass(scope_Target, options.cssClasses.tap) && !data.doNotReject) {
35909                    return false;
35910                }
35911                // Ignore right or middle clicks on start #454
35912                if (events === actions.start && e.buttons !== undefined && e.buttons > 1) {
35913                    return false;
35914                }
35915                // Ignore right or middle clicks on start #454
35916                if (data.hover && e.buttons) {
35917                    return false;
35918                }
35919                // 'supportsPassive' is only true if a browser also supports touch-action: none in CSS.
35920                // iOS safari does not, so it doesn't get to benefit from passive scrolling. iOS does support
35921                // touch-action: manipulation, but that allows panning, which breaks
35922                // sliders after zooming/on non-responsive pages.
35923                // See: https://bugs.webkit.org/show_bug.cgi?id=133112
35924                if (!supportsPassive) {
35925                    e.preventDefault();
35926                }
35927                e.calcPoint = e.points[options.ort];
35928                // Call the event handler with the event [ and additional data ].
35929                callback(e, data);
35930                return;
35931            };
35932            var methods = [];
35933            // Bind a closure on the target for every event type.
35934            events.split(" ").forEach(function (eventName) {
35935                element.addEventListener(eventName, method, supportsPassive ? { passive: true } : false);
35936                methods.push([eventName, method]);
35937            });
35938            return methods;
35939        }
35940        // Provide a clean event with standardized offset values.
35941        function fixEvent(e, pageOffset, eventTarget) {
35942            // Filter the event to register the type, which can be
35943            // touch, mouse or pointer. Offset changes need to be
35944            // made on an event specific basis.
35945            var touch = e.type.indexOf("touch") === 0;
35946            var mouse = e.type.indexOf("mouse") === 0;
35947            var pointer = e.type.indexOf("pointer") === 0;
35948            var x = 0;
35949            var y = 0;
35950            // IE10 implemented pointer events with a prefix;
35951            if (e.type.indexOf("MSPointer") === 0) {
35952                pointer = true;
35953            }
35954            // Erroneous events seem to be passed in occasionally on iOS/iPadOS after user finishes interacting with
35955            // the slider. They appear to be of type MouseEvent, yet they don't have usual properties set. Ignore
35956            // events that have no touches or buttons associated with them. (#1057, #1079, #1095)
35957            if (e.type === "mousedown" && !e.buttons && !e.touches) {
35958                return false;
35959            }
35960            // The only thing one handle should be concerned about is the touches that originated on top of it.
35961            if (touch) {
35962                // Returns true if a touch originated on the target.
35963                var isTouchOnTarget = function (checkTouch) {
35964                    var target = checkTouch.target;
35965                    return (target === eventTarget ||
35966                        eventTarget.contains(target) ||
35967                        (e.composed && e.composedPath().shift() === eventTarget));
35968                };
35969                // In the case of touchstart events, we need to make sure there is still no more than one
35970                // touch on the target so we look amongst all touches.
35971                if (e.type === "touchstart") {
35972                    var targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);
35973                    // Do not support more than one touch per handle.
35974                    if (targetTouches.length > 1) {
35975                        return false;
35976                    }
35977                    x = targetTouches[0].pageX;
35978                    y = targetTouches[0].pageY;
35979                }
35980                else {
35981                    // In the other cases, find on changedTouches is enough.
35982                    var targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);
35983                    // Cancel if the target touch has not moved.
35984                    if (!targetTouch) {
35985                        return false;
35986                    }
35987                    x = targetTouch.pageX;
35988                    y = targetTouch.pageY;
35989                }
35990            }
35991            pageOffset = pageOffset || getPageOffset(scope_Document);
35992            if (mouse || pointer) {
35993                x = e.clientX + pageOffset.x;
35994                y = e.clientY + pageOffset.y;
35995            }
35996            e.pageOffset = pageOffset;
35997            e.points = [x, y];
35998            e.cursor = mouse || pointer; // Fix #435
35999            return e;
36000        }
36001        // Translate a coordinate in the document to a percentage on the slider
36002        function calcPointToPercentage(calcPoint) {
36003            var location = calcPoint - offset(scope_Base, options.ort);
36004            var proposal = (location * 100) / baseSize();
36005            // Clamp proposal between 0% and 100%
36006            // Out-of-bound coordinates may occur when .noUi-base pseudo-elements
36007            // are used (e.g. contained handles feature)
36008            proposal = limit(proposal);
36009            return options.dir ? 100 - proposal : proposal;
36010        }
36011        // Find handle closest to a certain percentage on the slider
36012        function getClosestHandle(clickedPosition) {
36013            var smallestDifference = 100;
36014            var handleNumber = false;
36015            scope_Handles.forEach(function (handle, index) {
36016                // Disabled handles are ignored
36017                if (isHandleDisabled(index)) {
36018                    return;
36019                }
36020                var handlePosition = scope_Locations[index];
36021                var differenceWithThisHandle = Math.abs(handlePosition - clickedPosition);
36022                // Initial state
36023                var clickAtEdge = differenceWithThisHandle === 100 && smallestDifference === 100;
36024                // Difference with this handle is smaller than the previously checked handle
36025                var isCloser = differenceWithThisHandle < smallestDifference;
36026                var isCloserAfter = differenceWithThisHandle <= smallestDifference && clickedPosition > handlePosition;
36027                if (isCloser || isCloserAfter || clickAtEdge) {
36028                    handleNumber = index;
36029                    smallestDifference = differenceWithThisHandle;
36030                }
36031            });
36032            return handleNumber;
36033        }
36034        // Fire 'end' when a mouse or pen leaves the document.
36035        function documentLeave(event, data) {
36036            if (event.type === "mouseout" &&
36037                event.target.nodeName === "HTML" &&
36038                event.relatedTarget === null) {
36039                eventEnd(event, data);
36040            }
36041        }
36042        // Handle movement on document for handle and range drag.
36043        function eventMove(event, data) {
36044            // Fix #498
36045            // Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).
36046            // https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero
36047            // IE9 has .buttons and .which zero on mousemove.
36048            // Firefox breaks the spec MDN defines.
36049            if (navigator.appVersion.indexOf("MSIE 9") === -1 && event.buttons === 0 && data.buttonsProperty !== 0) {
36050                return eventEnd(event, data);
36051            }
36052            // Check if we are moving up or down
36053            var movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint);
36054            // Convert the movement into a percentage of the slider width/height
36055            var proposal = (movement * 100) / data.baseSize;
36056            moveHandles(movement > 0, proposal, data.locations, data.handleNumbers, data.connect);
36057        }
36058        // Unbind move events on document, call callbacks.
36059        function eventEnd(event, data) {
36060            // The handle is no longer active, so remove the class.
36061            if (data.handle) {
36062                removeClass(data.handle, options.cssClasses.active);
36063                scope_ActiveHandlesCount -= 1;
36064            }
36065            // Unbind the move and end events, which are added on 'start'.
36066            data.listeners.forEach(function (c) {
36067                scope_DocumentElement.removeEventListener(c[0], c[1]);
36068            });
36069            if (scope_ActiveHandlesCount === 0) {
36070                // Remove dragging class.
36071                removeClass(scope_Target, options.cssClasses.drag);
36072                setZindex();
36073                // Remove cursor styles and text-selection events bound to the body.
36074                if (event.cursor) {
36075                    scope_Body.style.cursor = "";
36076                    scope_Body.removeEventListener("selectstart", preventDefault);
36077                }
36078            }
36079            
vendor: 3,556 bytes, lines 36079-36147
36079data.handleNumbers.forEach(function (handleNumber) {
36080                fireEvent("change", handleNumber);
36081                fireEvent("set", handleNumber);
36082                fireEvent("end", handleNumber);
36083            });
36084        }
36085        // Bind move events on document.
36086        function eventStart(event, data) {
36087            // Ignore event if any handle is disabled
36088            if (data.handleNumbers.some(isHandleDisabled)) {
36089                return;
36090            }
36091            var handle;
36092            if (data.handleNumbers.length === 1) {
36093                var handleOrigin = scope_Handles[data.handleNumbers[0]];
36094                handle = handleOrigin.children[0];
36095                scope_ActiveHandlesCount += 1;
36096                // Mark the handle as 'active' so it can be styled.
36097                addClass(handle, options.cssClasses.active);
36098            }
36099            // A drag should never propagate up to the 'tap' event.
36100            event.stopPropagation();
36101            // Record the event listeners.
36102            var listeners = [];
36103            // Attach the move and end events.
36104            var moveEvent = attachEvent(actions.move, scope_DocumentElement, eventMove, {
36105                // The event target has changed so we need to propagate the original one so that we keep
36106                // relying on it to extract target touches.
36107                target: event.target,
36108                handle: handle,
36109                connect: data.connect,
36110                listeners: listeners,
36111                startCalcPoint: event.calcPoint,
36112                baseSize: baseSize(),
36113                pageOffset: event.pageOffset,
36114                handleNumbers: data.handleNumbers,
36115                buttonsProperty: event.buttons,
36116                locations: scope_Locations.slice()
36117            });
36118            var endEvent = attachEvent(actions.end, scope_DocumentElement, eventEnd, {
36119                target: event.target,
36120                handle: handle,
36121                listeners: listeners,
36122                doNotReject: true,
36123                handleNumbers: data.handleNumbers
36124            });
36125            var outEvent = attachEvent("mouseout", scope_DocumentElement, documentLeave, {
36126                target: event.target,
36127                handle: handle,
36128                listeners: listeners,
36129                doNotReject: true,
36130                handleNumbers: data.handleNumbers
36131            });
36132            // We want to make sure we pushed the listeners in the listener list rather than creating
36133            // a new one as it has already been passed to the event handlers.
36134            listeners.push.apply(listeners, moveEvent.concat(endEvent, outEvent));
36135            // Text selection isn't an issue on touch devices,
36136            // so adding cursor styles can be skipped.
36137            if (event.cursor) {
36138                // Prevent the 'I' cursor and extend the range-drag cursor.
36139                scope_Body.style.cursor = getComputedStyle(event.target).cursor;
36140                // Mark the target with a dragging state.
36141                if (scope_Handles.length > 1) {
36142                    addClass(scope_Target, options.cssClasses.drag);
36143                }
36144                // Prevent text selection when dragging the handles.
36145                // In noUiSlider <= 9.2.0, this was handled by calling preventDefault on mouse/touch start/move,
36146                // which is scroll blocking. The selectstart event is supported by FireFox starting from version 52,
36147                // meaning the only holdout is iOS Safari. This doesn't matter: text selection isn't triggered there.
36148                // The 'cursor' flag is false.
36149                // See: http://caniuse.com/#search=selectstart
36150                scope_Body.addEventListener("selectstart", preventDefault, false);
36151            }
36152            data.handleNumbers.forEach(function (handleNumber) {
36153                fireEvent("start", handleNumber);
36154            });
36155        }
36156        // Move closest handle to tapped location.
36157        function eventTap(event) {
36158            // The tap event shouldn't propagate up
36159            event.stopPropagation();
36160            var proposal = calcPointToPercentage(event.calcPoint);
36161            var handleNumber = getClosestHandle(proposal);
36162            // Tackle the case that all handles are 'disabled'.
36163            if (handleNumber === false) {
36164                return;
36165            }
36166            // Flag the slider as it is now in a transitional state.
36167            // Transition takes a configurable amount of ms (default 300). Re-enable the slider after that.
36168            if (!options.events.snap) {
36169                addClassF
vendor: 13,190 bytes, lines 36169-36435
36169or(scope_Target, options.cssClasses.tap, options.animationDuration);
36170            }
36171            setHandle(handleNumber, proposal, true, true);
36172            setZindex();
36173            fireEvent("slide", handleNumber, true);
36174            fireEvent("update", handleNumber, true);
36175            if (!options.events.snap) {
36176                fireEvent("change", handleNumber, true);
36177                fireEvent("set", handleNumber, true);
36178            }
36179            else {
36180                eventStart(event, { handleNumbers: [handleNumber] });
36181            }
36182        }
36183        // Fires a 'hover' event for a hovered mouse/pen position.
36184        function eventHover(event) {
36185            var proposal = calcPointToPercentage(event.calcPoint);
36186            var to = scope_Spectrum.getStep(proposal);
36187            var value = scope_Spectrum.fromStepping(to);
36188            Object.keys(scope_Events).forEach(function (targetEvent) {
36189                if ("hover" === targetEvent.split(".")[0]) {
36190                    scope_Events[targetEvent].forEach(function (callback) {
36191                        callback.call(scope_Self, value);
36192                    });
36193                }
36194            });
36195        }
36196        // Handles keydown on focused handles
36197        // Don't move the document when pressing arrow keys on focused handles
36198        function eventKeydown(event, handleNumber) {
36199            if (isSliderDisabled() || isHandleDisabled(handleNumber)) {
36200                return false;
36201            }
36202            var horizontalKeys = ["Left", "Right"];
36203            var verticalKeys = ["Down", "Up"];
36204            var largeStepKeys = ["PageDown", "PageUp"];
36205            var edgeKeys = ["Home", "End"];
36206            if (options.dir && !options.ort) {
36207                // On an right-to-left slider, the left and right keys act inverted
36208                horizontalKeys.reverse();
36209            }
36210            else if (options.ort && !options.dir) {
36211                // On a top-to-bottom slider, the up and down keys act inverted
36212                verticalKeys.reverse();
36213                largeStepKeys.reverse();
36214            }
36215            // Strip "Arrow" for IE compatibility. https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key
36216            var key = event.key.replace("Arrow", "");
36217            var isLargeDown = key === largeStepKeys[0];
36218            var isLargeUp = key === largeStepKeys[1];
36219            var isDown = key === verticalKeys[0] || key === horizontalKeys[0] || isLargeDown;
36220            var isUp = key === verticalKeys[1] || key === horizontalKeys[1] || isLargeUp;
36221            var isMin = key === edgeKeys[0];
36222            var isMax = key === edgeKeys[1];
36223            if (!isDown && !isUp && !isMin && !isMax) {
36224                return true;
36225            }
36226            event.preventDefault();
36227            var to;
36228            if (isUp || isDown) {
36229                var direction = isDown ? 0 : 1;
36230                var steps = getNextStepsForHandle(handleNumber);
36231                var step = steps[direction];
36232                // At the edge of a slider, do nothing
36233                if (step === null) {
36234                    return false;
36235                }
36236                // No step set, use the default of 10% of the sub-range
36237                if (step === false) {
36238                    step = scope_Spectrum.getDefaultStep(scope_Locations[handleNumber], isDown, options.keyboardDefaultStep);
36239                }
36240                if (isLargeUp || isLargeDown) {
36241                    step *= options.keyboardPageMultiplier;
36242                }
36243                else {
36244                    step *= options.keyboardMultiplier;
36245                }
36246                // Step over zero-length ranges (#948);
36247                step = Math.max(step, 0.0000001);
36248                // Decrement for down steps
36249                step = (isDown ? -1 : 1) * step;
36250                to = scope_Values[handleNumber] + step;
36251            }
36252            else if (isMax) {
36253                // End key
36254                to = options.spectrum.xVal[options.spectrum.xVal.length - 1];
36255            }
36256            else {
36257                // Home key
36258                to = options.spectrum.xVal[0];
36259            }
36260            setHandle(handleNumber, scope_Spectrum.toStepping(to), true, true);
36261            fireEvent("slide", handleNumber);
36262            fireEvent("update", handleNumber);
36263            fireEvent("change", handleNumber);
36264            fireEvent("set", handleNumber);
36265            return false;
36266        }
36267        // Attach events to several slider parts.
36268        function bindSliderEvents(behaviour) {
36269            // Attach the standard drag event to the handles.
36270            if (!behaviour.fixed) {
36271                scope_Handles.forEach(function (handle, index) {
36272                    // These events are only bound to the visual handle
36273                    // element, not the 'real' origin element.
36274                    attachEvent(actions.start, handle.children[0], eventStart, {
36275                        handleNumbers: [index]
36276                    });
36277                });
36278            }
36279            // Attach the tap event to the slider base.
36280            if (behaviour.tap) {
36281                attachEvent(actions.start, scope_Base, eventTap, {});
36282            }
36283            // Fire hover events
36284            if (behaviour.hover) {
36285                attachEvent(actions.move, scope_Base, eventHover, {
36286                    hover: true
36287                });
36288            }
36289            // Make the range draggable.
36290            if (behaviour.drag) {
36291                scope_Connects.forEach(function (connect, index) {
36292                    if (connect === false || index === 0 || index === scope_Connects.length - 1) {
36293                        return;
36294                    }
36295                    var handleBefore = scope_Handles[index - 1];
36296                    var handleAfter = scope_Handles[index];
36297                    var eventHolders = [connect];
36298                    var handlesToDrag = [handleBefore, handleAfter];
36299                    var handleNumbersToDrag = [index - 1, index];
36300                    addClass(connect, options.cssClasses.draggable);
36301                    // When the range is fixed, the entire range can
36302                    // be dragged by the handles. The handle in the first
36303                    // origin will propagate the start event upward,
36304                    // but it needs to be bound manually on the other.
36305                    if (behaviour.fixed) {
36306                        eventHolders.push(handleBefore.children[0]);
36307                        eventHolders.push(handleAfter.children[0]);
36308                    }
36309                    if (behaviour.dragAll) {
36310                        handlesToDrag = scope_Handles;
36311                        handleNumbersToDrag = scope_HandleNumbers;
36312                    }
36313                    eventHolders.forEach(function (eventHolder) {
36314                        attachEvent(actions.start, eventHolder, eventStart, {
36315                            handles: handlesToDrag,
36316                            handleNumbers: handleNumbersToDrag,
36317                            connect: connect
36318                        });
36319                    });
36320                });
36321            }
36322        }
36323        // Attach an event to this slider, possibly including a namespace
36324        function bindEvent(namespacedEvent, callback) {
36325            scope_Events[namespacedEvent] = scope_Events[namespacedEvent] || [];
36326            scope_Events[namespacedEvent].push(callback);
36327            // If the event bound is 'update,' fire it immediately for all handles.
36328            if (namespacedEvent.split(".")[0] === "update") {
36329                scope_Handles.forEach(function (a, index) {
36330                    fireEvent("update", index);
36331                });
36332            }
36333        }
36334        function isInternalNamespace(namespace) {
36335            return namespace === INTERNAL_EVENT_NS.aria || namespace === INTERNAL_EVENT_NS.tooltips;
36336        }
36337        // Undo attachment of event
36338        function removeEvent(namespacedEvent) {
36339            var event = namespacedEvent && namespacedEvent.split(".")[0];
36340            var namespace = event ? namespacedEvent.substring(event.length) : namespacedEvent;
36341            Object.keys(scope_Events).forEach(function (bind) {
36342                var tEvent = bind.split(".")[0];
36343                var tNamespace = bind.substring(tEvent.length);
36344                if ((!event || event === tEvent) && (!namespace || namespace === tNamespace)) {
36345                    // only delete protected internal event if intentional
36346                    if (!isInternalNamespace(tNamespace) || namespace === tNamespace) {
36347                        delete scope_Events[bind];
36348                    }
36349                }
36350            });
36351        }
36352        // External event handling
36353        function fireEvent(eventName, handleNumber, tap) {
36354            Object.keys(scope_Events).forEach(function (targetEvent) {
36355                var eventType = targetEvent.split(".")[0];
36356                if (eventName === eventType) {
36357                    scope_Events[targetEvent].forEach(function (callback) {
36358                        callback.call(
36359                        // Use the slider public API as the scope ('this')
36360                        scope_Self, 
36361                        // Return values as array, so arg_1[arg_2] is always valid.
36362                        scope_Values.map(options.format.to), 
36363                        // Handle index, 0 or 1
36364                        handleNumber, 
36365                        // Un-formatted slider values
36366                        scope_Values.slice(), 
36367                        // Event is fired by tap, true or false
36368                        tap || false, 
36369                        // Left offset of the handle, in relation to the slider
36370                        scope_Locations.slice(), 
36371                        // add the slider public API to an accessible parameter when this is unavailable
36372                        scope_Self);
36373                    });
36374                }
36375            });
36376        }
36377        // Split out the handle positioning logic so the Move event can use it, too
36378        function checkHandlePosition(reference, handleNumber, to, lookBackward, lookForward, getValue) {
36379            var distance;
36380            // For sliders with multiple handles, limit movement to the other handle.
36381            // Apply the margin option by adding it to the handle positions.
36382            if (scope_Handles.length > 1 && !options.events.unconstrained) {
36383                if (lookBackward && handleNumber > 0) {
36384                    distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber - 1], options.margin, false);
36385                    to = Math.max(to, distance);
36386                }
36387                if (lookForward && handleNumber < scope_Handles.length - 1) {
36388                    distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber + 1], options.margin, true);
36389                    to = Math.min(to, distance);
36390                }
36391            }
36392            // The limit option has the opposite effect, limiting handles to a
36393            // maximum distance from another. Limit must be > 0, as otherwise
36394            // handles would be unmovable.
36395            if (scope_Handles.length > 1 && options.limit) {
36396                if (lookBackward && handleNumber > 0) {
36397                    distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber - 1], options.limit, false);
36398                    to = Math.min(to, distance);
36399                }
36400                if (lookForward && handleNumber < scope_Handles.length - 1) {
36401                    distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber + 1], options.limit, true);
36402                    to = Math.max(to, distance);
36403                }
36404            }
36405            // The padding option keeps the handles a certain distance from the
36406            // edges of the slider. Padding must be > 0.
36407            if (options.padding) {
36408                if (handleNumber === 0) {
36409                    distance = scope_Spectrum.getAbsoluteDistance(0, options.padding[0], false);
36410                    to = Math.max(to, distance);
36411                }
36412                if (handleNumber === scope_Handles.length - 1) {
36413                    distance = scope_Spectrum.getAbsoluteDistance(100, options.padding[1], true);
36414                    to = Math.min(to, distance);
36415                }
36416            }
36417            to = scope_Spectrum.getStep(to);
36418            // Limit percentage to the 0 - 100 range
36419            to = limit(to);
36420            // Return false if handle can't move
36421            if (to === reference[handleNumber] && !getValue) {
36422                return false;
36423            }
36424            return to;
36425        }
36426        // Uses slider orientation to create CSS rules. a = base value;
36427        function inRuleOrder(v, a) {
36428            var o = options.ort;
36429            return (o ? a : v) + ", " + (o ? v : a);
36430        }
36431        // Moves handle(s) by a percentage
36432        // (bool, % to move, [% where handle started, ...], [index in scope_Handles, ...])
36433        function moveHandles(upward, proposal, locations, handleNumbers, connect) {
36434            var proposals = locations.slice();
36435            // Store first handle now, so we still have it in case handleNumbers is reversed
36436            var firstHandle = handleNumbers[0];
36437            var b = [!upward, upward];
36438            var f = [upward, !upward];
36439            // Copy handleNumbers so we don't change the dataset
36440            handleNumbers = handleNumbers.slice();
36441            // Check to see which handle is 'leading'.
36442            // If that one can't move the second can't either.
36443            if (upward) {
36444                handleNumbers.reverse();
36445            }
36446            // Step 1: get the maximum percentage that any of the handles can move
36447            if (handleNumbers.length > 1) {
36448                handleNumbers.forEach(function (handleNumber, o) {
36449                    var to = checkHandlePosition(proposals, handleNumber, proposals[handleNumber] + proposal, b[o], f[o], false);
36450                    // Stop if one of the handles can't move.
36451                    if (to === false) {
36452                        proposal = 0;
36453                    }
36454                    else {
36455                        proposal = to - proposals[handleNumber];
36456                        proposals[handleNumber] = to;
36457                    }
36458                });
36459            }
36460            // If using one handle, check backward AND forward
36461            else {
36462                b = f = [true];
36463            }
36464            var state = false;
36465            // Step 2: Try to set the handles with the found percentage
36466            handleNumbers.forEach(function (handleNumber, o) {
36467                state = setHandle(handleNumber, locations[handleNumber] + proposal, b[o], f[o]) || state;
36468            });
36469            // Step 3: If a handle moved, fire events
36470            if (state) {
36471                handleNumbers.forEach(function (handleNumber) {
36472                    fireEvent("update", handleNumber);
36473                    fireEvent("slide", handleNumber);
36474                });
36475                // If target is a connect, then fire drag event
36476                if (connect != undefined) {
36477                    fireEvent("drag", firstHandle);
36478                }
36479            }
36480        }
36481        // Takes a base value and an offset. This offset is used for the connect bar size.
36482        // In the initial design for this feature, the origin element was 1% wide.
36483        // Unfortunately, a rounding bug in Chrome makes it impossible to implement this feature
36484        // in this manner: https://bugs.chromium.org/p/chromium/issues/detail?id=798223
36485        function transformDirection(a, b) {
36486            return options.dir ? 100 - a - b : a;
36487        }
36488        // Updates scope_Locations and scope_Values, updates visual state
36489        function updateHandlePosition(handleNumber, to) {
36490            // Update locations.
36491            scope_Locations[handleNumber] = to;
36492            // Convert the value to the slider stepping/range.
36493            scope_Values[handleNumber] = scope_Spectrum.fromStepping(to);
36494            var translation = 10 * (transformDirection(to, 0) - scope_DirOffset);
36495            var translateRule = "translate(" + inRuleOrder(translation + "%", "0") + ")";
36496            scope_Handles[handleNumber].style[options.transformRule] = translateRule;
36497            updateConnect(handleNumber);
36498            updateConnect(handleNumber + 1);
36499        }
36500        // Handles before the slider middle are stacked later = higher,
36501        // Handles after the middle later is lower
36502        // [[7] [8] .......... | .......... [5] [4]
36503        function setZindex() {
36504            scope_HandleNumbers.forEach(function (handleNumber) {
36505                var dir = scope_Locations[handleNumber] > 50 ? -1 : 1;
36506                var zIndex = 3 + (scope_Handles.length + dir * handleNumber);
36507                scope_Handles[handleNumber].style.zIndex = String(zIndex);
36508            });
36509        }
36510        // Test suggested values and apply margin, step.
36511        // if exactInput is true, don't run checkHandlePosition, then the handle can be placed in between steps (#436)
36512        function setHandle(handleNumber, to, lookBackward, lookForward, exactInput) {
36513            if (!exactInput) {
36514                to = checkHandlePosition(scope_Locations, handleNumber, to, lookBackward, lookForward, false);
36515            }
36516            if (to === false) {
36517                return false;
vendor: 13,763 bytes, lines 36518-36830
36518            }
36519            updateHandlePosition(handleNumber, to);
36520            return true;
36521        }
36522        // Updates style attribute for connect nodes
36523        function updateConnect(index) {
36524            // Skip connects set to false
36525            if (!scope_Connects[index]) {
36526                return;
36527            }
36528            var l = 0;
36529            var h = 100;
36530            if (index !== 0) {
36531                l = scope_Locations[index - 1];
36532            }
36533            if (index !== scope_Connects.length - 1) {
36534                h = scope_Locations[index];
36535            }
36536            // We use two rules:
36537            // 'translate' to change the left/top offset;
36538            // 'scale' to change the width of the element;
36539            // As the element has a width of 100%, a translation of 100% is equal to 100% of the parent (.noUi-base)
36540            var connectWidth = h - l;
36541            var translateRule = "translate(" + inRuleOrder(transformDirection(l, connectWidth) + "%", "0") + ")";
36542            var scaleRule = "scale(" + inRuleOrder(connectWidth / 100, "1") + ")";
36543            scope_Connects[index].style[options.transformRule] =
36544                translateRule + " " + scaleRule;
36545        }
36546        // Parses value passed to .set method. Returns current value if not parse-able.
36547        function resolveToValue(to, handleNumber) {
36548            // Setting with null indicates an 'ignore'.
36549            // Inputting 'false' is invalid.
36550            if (to === null || to === false || to === undefined) {
36551                return scope_Locations[handleNumber];
36552            }
36553            // If a formatted number was passed, attempt to decode it.
36554            if (typeof to === "number") {
36555                to = String(to);
36556            }
36557            to = options.format.from(to);
36558            if (to !== false) {
36559                to = scope_Spectrum.toStepping(to);
36560            }
36561            // If parsing the number failed, use the current value.
36562            if (to === false || isNaN(to)) {
36563                return scope_Locations[handleNumber];
36564            }
36565            return to;
36566        }
36567        // Set the slider value.
36568        function valueSet(input, fireSetEvent, exactInput) {
36569            var values = asArray(input);
36570            var isInit = scope_Locations[0] === undefined;
36571            // Event fires by default
36572            fireSetEvent = fireSetEvent === undefined ? true : fireSetEvent;
36573            // Animation is optional.
36574            // Make sure the initial values were set before using animated placement.
36575            if (options.animate && !isInit) {
36576                addClassFor(scope_Target, options.cssClasses.tap, options.animationDuration);
36577            }
36578            // First pass, without lookAhead but with lookBackward. Values are set from left to right.
36579            scope_HandleNumbers.forEach(function (handleNumber) {
36580                setHandle(handleNumber, resolveToValue(values[handleNumber], handleNumber), true, false, exactInput);
36581            });
36582            var i = scope_HandleNumbers.length === 1 ? 0 : 1;
36583            // Spread handles evenly across the slider if the range has no size (min=max)
36584            if (isInit && scope_Spectrum.hasNoSize()) {
36585                exactInput = true;
36586                scope_Locations[0] = 0;
36587                if (scope_HandleNumbers.length > 1) {
36588                    var space_1 = 100 / (scope_HandleNumbers.length - 1);
36589                    scope_HandleNumbers.forEach(function (handleNumber) {
36590                        scope_Locations[handleNumber] = handleNumber * space_1;
36591                    });
36592                }
36593            }
36594            // Secondary passes. Now that all base values are set, apply constraints.
36595            // Iterate all handles to ensure constraints are applied for the entire slider (Issue #1009)
36596            for (; i < scope_HandleNumbers.length; ++i) {
36597                scope_HandleNumbers.forEach(function (handleNumber) {
36598                    setHandle(handleNumber, scope_Locations[handleNumber], true, true, exactInput);
36599                });
36600            }
36601            setZindex();
36602            scope_HandleNumbers.forEach(function (handleNumber) {
36603                fireEvent("update", handleNumber);
36604                // Fire the event only for handles that received a new value, as per #579
36605                if (values[handleNumber] !== null && fireSetEvent) {
36606                    fireEvent("set", handleNumber);
36607                }
36608            });
36609        }
36610        // Reset slider to initial values
36611        function valueReset(fireSetEvent) {
36612            valueSet(options.start, fireSetEvent);
36613        }
36614        // Set value for a single handle
36615        function valueSetHandle(handleNumber, value, fireSetEvent, exactInput) {
36616            // Ensure numeric input
36617            handleNumber = Number(handleNumber);
36618            if (!(handleNumber >= 0 && handleNumber < scope_HandleNumbers.length)) {
36619                throw new Error("noUiSlider: invalid handle number, got: " + handleNumber);
36620            }
36621            // Look both backward and forward, since we don't want this handle to "push" other handles (#960);
36622            // The exactInput argument can be used to ignore slider stepping (#436)
36623            setHandle(handleNumber, resolveToValue(value, handleNumber), true, true, exactInput);
36624            fireEvent("update", handleNumber);
36625            if (fireSetEvent) {
36626                fireEvent("set", handleNumber);
36627            }
36628        }
36629        // Get the slider value.
36630        function valueGet(unencoded) {
36631            if (unencoded === void 0) { unencoded = false; }
36632            if (unencoded) {
36633                // return a copy of the raw values
36634                return scope_Values.length === 1 ? scope_Values[0] : scope_Values.slice(0);
36635            }
36636            var values = scope_Values.map(options.format.to);
36637            // If only one handle is used, return a single value.
36638            if (values.length === 1) {
36639                return values[0];
36640            }
36641            return values;
36642        }
36643        // Removes classes from the root and empties it.
36644        function destroy() {
36645            // remove protected internal listeners
36646            removeEvent(INTERNAL_EVENT_NS.aria);
36647            removeEvent(INTERNAL_EVENT_NS.tooltips);
36648            Object.keys(options.cssClasses).forEach(function (key) {
36649                removeClass(scope_Target, options.cssClasses[key]);
36650            });
36651            while (scope_Target.firstChild) {
36652                scope_Target.removeChild(scope_Target.firstChild);
36653            }
36654            delete scope_Target.noUiSlider;
36655        }
36656        function getNextStepsForHandle(handleNumber) {
36657            var location = scope_Locations[handleNumber];
36658            var nearbySteps = scope_Spectrum.getNearbySteps(location);
36659            var value = scope_Values[handleNumber];
36660            var increment = nearbySteps.thisStep.step;
36661            var decrement = null;
36662            // If snapped, directly use defined step value
36663            if (options.snap) {
36664                return [
36665                    value - nearbySteps.stepBefore.startValue || null,
36666                    nearbySteps.stepAfter.startValue - value || null
36667                ];
36668            }
36669            // If the next value in this step moves into the next step,
36670            // the increment is the start of the next step - the current value
36671            if (increment !== false) {
36672                if (value + increment > nearbySteps.stepAfter.startValue) {
36673                    increment = nearbySteps.stepAfter.startValue - value;
36674                }
36675            }
36676            // If the value is beyond the starting point
36677            if (value > nearbySteps.thisStep.startValue) {
36678                decrement = nearbySteps.thisStep.step;
36679            }
36680            else if (nearbySteps.stepBefore.step === false) {
36681                decrement = false;
36682            }
36683            // If a handle is at the start of a step, it always steps back into the previous step first
36684            else {
36685                decrement = value - nearbySteps.stepBefore.highestStep;
36686            }
36687            // Now, if at the slider edges, there is no in/decrement
36688            if (location === 100) {
36689                increment = null;
36690            }
36691            else if (location === 0) {
36692                decrement = null;
36693            }
36694            // As per #391, the comparison for the decrement step can have some rounding issues.
36695            var stepDecimals = scope_Spectrum.countStepDecimals();
36696            // Round per #391
36697            if (increment !== null && increment !== false) {
36698                increment = Number(increment.toFixed(stepDecimals));
36699            }
36700            if (decrement !== null && decrement !== false) {
36701                decrement = Number(decrement.toFixed(stepDecimals));
36702            }
36703            return [decrement, increment];
36704        }
36705        // Get the current step size for the slider.
36706        function getNextSteps() {
36707            return scope_HandleNumbers.map(getNextStepsForHandle);
36708        }
36709        // Updatable: margin, limit, padding, step, range, animate, snap
36710        function updateOptions(optionsToUpdate, fireSetEvent) {
36711            // Spectrum is created using the range, snap, direction and step options.
36712            // 'snap' and 'step' can be updated.
36713            // If 'snap' and 'step' are not passed, they should remain unchanged.
36714            var v = valueGet();
36715            var updateAble = [
36716                "margin",
36717                "limit",
36718                "padding",
36719                "range",
36720                "animate",
36721                "snap",
36722                "step",
36723                "format",
36724                "pips",
36725                "tooltips"
36726            ];
36727            // Only change options that we're actually passed to update.
36728            updateAble.forEach(function (name) {
36729                // Check for undefined. null removes the value.
36730                if (optionsToUpdate[name] !== undefined) {
36731                    originalOptions[name] = optionsToUpdate[name];
36732                }
36733            });
36734            var newOptions = testOptions(originalOptions);
36735            // Load new options into the slider state
36736            updateAble.forEach(function (name) {
36737                if (optionsToUpdate[name] !== undefined) {
36738                    options[name] = newOptions[name];
36739                }
36740            });
36741            scope_Spectrum = newOptions.spectrum;
36742            // Limit, margin and padding depend on the spectrum but are stored outside of it. (#677)
36743            options.margin = newOptions.margin;
36744            options.limit = newOptions.limit;
36745            options.padding = newOptions.padding;
36746            // Update pips, removes existing.
36747            if (options.pips) {
36748                pips(options.pips);
36749            }
36750            else {
36751                removePips();
36752            }
36753            // Update tooltips, removes existing.
36754            if (options.tooltips) {
36755                tooltips();
36756            }
36757            else {
36758                removeTooltips();
36759            }
36760            // Invalidate the current positioning so valueSet forces an update.
36761            scope_Locations = [];
36762            valueSet(isSet(optionsToUpdate.start) ? optionsToUpdate.start : v, fireSetEvent);
36763        }
36764        // Initialization steps
36765        function setupSlider() {
36766            // Create the base element, initialize HTML and set classes.
36767            // Add handles and connect elements.
36768            scope_Base = addSlider(scope_Target);
36769            addElements(options.connect, scope_Base);
36770            // Attach user events.
36771            bindSliderEvents(options.events);
36772            // Use the public value method to set the start values.
36773            valueSet(options.start);
36774            if (options.pips) {
36775                pips(options.pips);
36776            }
36777            if (options.tooltips) {
36778                tooltips();
36779            }
36780            aria();
36781        }
36782        setupSlider();
36783        var scope_Self = {
36784            destroy: destroy,
36785            steps: getNextSteps,
36786            on: bindEvent,
36787            off: removeEvent,
36788            get: valueGet,
36789            set: valueSet,
36790            setHandle: valueSetHandle,
36791            reset: valueReset,
36792            // Exposed for unit testing, don't use this in your application.
36793            __moveHandles: function (upward, proposal, handleNumbers) {
36794                moveHandles(upward, proposal, scope_Locations, handleNumbers);
36795            },
36796            options: originalOptions,
36797            updateOptions: updateOptions,
36798            target: scope_Target,
36799            removePips: removePips,
36800            removeTooltips: removeTooltips,
36801            getPositions: function () {
36802                return scope_Locations.slice();
36803            },
36804            getTooltips: function () {
36805                return scope_Tooltips;
36806            },
36807            getOrigins: function () {
36808                return scope_Handles;
36809            },
36810            pips: pips // Issue #594
36811        };
36812        return scope_Self;
36813    }
36814    // Run the standard initializer
36815    function initialize(target, originalOptions) {
36816        if (!target || !target.nodeName) {
36817            throw new Error("noUiSlider: create requires a single element, got: " + target);
36818        }
36819        // Throw an error if the slider was already initialized.
36820        if (target.noUiSlider) {
36821            throw new Error("noUiSlider: Slider was already initialized.");
36822        }
36823        // Test the options and create the slider environment;
36824        var options = testOptions(originalOptions);
36825        var api = scope(target, options, originalOptions);
36826        target.noUiSlider = api;
36827        return api;
36828    }
36829    var nouislider = {
36830        // Exposed for unit testing, don't use this in your application.
36831        __spectrum: Spectrum,
36832        // A reference to the default classes, allows global changes.
36833        // Use the cssClasses option for changes to one slider.
36834        cssClasses: cssClasses,
36835        create: initialize
36836    };
36837
36838    exports.create = initialize;
36839    exports.cssClasses = cssClasses;
36840    exports['default'] = nouislider;
36841
36842    Object.defineProperty(exports, '__esModule', { value: true });
36843
36844})));
36845
36846(function (global, factory) {
36847	typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
36848	typeof define === 'function' && define.amd ? define(factory) :
36849	(global = global || self, global.autosize = factory());
36850}(this, (function () {
36851	var map = typeof Map === "function" ? new Map() : function () {
36852	  var keys = [];
36853	  var values = [];
36854	  return {
36855	    has: function has(key) {
36856	      return keys.indexOf(key) > -1;
36857	    },
36858	    get: function get(key) {
36859	      return values[keys.indexOf(key)];
36860	    },
36861	    set: function set(key, value) {
36862	      if (keys.indexOf(key) === -1) {
36863	        keys.push(key);
36864	        values.push(value);
36865	      }
36866	    },
36867	    "delete": function _delete(key) {
36868	      var index = keys.indexOf(key);
36869
36870	      if (index > -1) {
36871	        keys.splice(index, 1);
36872	        values.splice(index, 1);
36873	      }
36874	    }
36875	  };
36876	}();
36877
36878	var createEvent = function createEvent(name) {
36879	  return new Event(name, {
36880	    bubbles: true
36881	  });
36882	};
36883
36884	try {
36885	  new Event('test');
36886	} catch (e) {
36887	  // IE does not support `new Event()`
36888	  createEvent = function createEvent(name) {
36889	    var evt = document.createEvent('Event');
36890	    evt.initEvent(name, true, false);
36891	    return evt;
36892	  };
36893	}
36894
36895	function assign(ta) {
36896	  if (!ta || !ta.nodeName || ta.nodeName !== 'TEXTAREA' || map.has(ta)) return;
36897	  var heightOffset = null;
36898	  var clientWidth = null;
36899	  var cachedHeight = null;
36900
36901	  function init() {
36902	    var style = window.getComputedStyle(ta, null);
36903
36904	    if (style.resize === 'vertical') {
36905	      ta.style.resize = 'none';
36906	    } else if (style.resize === 'both') {
36907	      ta.style.resize = 'horizontal';
36908	    }
36909
36910	    if (style.boxSizing === 'content-box') {
36911	      heightOffset = -(parseFloat(style.paddingTop) + parseFloat(style.paddingBottom));
36912	    } else {
36913	      heightOffset = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);
36914	    } // Fix when a textarea is not on document body and heightOffset is Not a Number
36915
36916
36917	    if (isNaN(heightOffset)) {
36918	      heightOffset = 0;
36919	    }
36920
36921	    update();
36922	  }
36923
36924	  function changeOverflow(value) {
36925	    {
36926	      // Chrome/Safari-specific fix:
36927	      // When the textarea y-overflow is hidden, Chrome/Safari do not reflow the text to account for the space
36928	      // made available by removing the scrollbar. The following forces the necessary text reflow.
36929	      var width = ta.style.width;
36930	      ta.style.width = '0px'; // Force reflow:
36931	      /* jshint ignore:end */
36932
36933	      ta.style.width = width;
36934	    }
36935	    ta.style.overflowY = value;
36936	  }
36937
36938	  function getParentOverflows(el) {
36939	    var arr = [];
36940
36941	    while (el && el.parentNode && el.parentNode instanceof Element) {
36942	      if (el.parentNode.scrollTop) {
36943	        arr.push({
36944	          node: el.parentNode,
36945	          scrollTop: el.parentNode.scrollTop
36946	        });
36947	      }
36948
36949	      el = el.parentNode;
36950	    }
36951
36952	    return arr;
36953	  }
36954
36955	  function resize() {
36956	    if (ta.scrollHeight === 0) {
36957	      // If the scrollHeight is 0, then the element probably has display:none or is detached from the DOM.
36958	      return;
36959	    }
36960
36961	    var overflows = getParentOverflows(ta);
36962	    var docTop = document.documentElement && document.documentElement.scrollTop; // Needed for Mobile IE (ticket #240)
36963
36964	    ta.style.height = '';
36965	    ta.style.height = ta.scrollHeight + heightOffset + 'px'; // used to check if an update is actually necessary on window.resize
36966
36967	    clientWidth = ta.clientWidth; // prevents scroll-position jumping
36968
36969	    overflows.forEach(function (el) {
36970	      el.node.scrollTop = el.scrollTop;
36971	    });
36972
36973	    if (docTop) {
36974	      document.documentElement.scrollTop = docTop;
36975	    }
36976	  }
36977
vendor: 4,436 bytes, lines 36978-37127
36978	  function update() {
36979	    resize();
36980	    var styleHeight = Math.round(parseFloat(ta.style.height));
36981	    var computed = window.getComputedStyle(ta, null); // Using offsetHeight as a replacement for computed.height in IE, because IE does not account use of border-box
36982
36983	    var actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(computed.height)) : ta.offsetHeight; // The actual height not matching the style height (set via the resize method) indicates that 
36984	    // the max-height has been exceeded, in which case the overflow should be allowed.
36985
36986	    if (actualHeight < styleHeight) {
36987	      if (computed.overflowY === 'hidden') {
36988	        changeOverflow('scroll');
36989	        resize();
36990	        actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;
36991	      }
36992	    } else {
36993	      // Normally keep overflow set to hidden, to avoid flash of scrollbar as the textarea expands.
36994	      if (computed.overflowY !== 'hidden') {
36995	        changeOverflow('hidden');
36996	        resize();
36997	        actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;
36998	      }
36999	    }
37000
37001	    if (cachedHeight !== actualHeight) {
37002	      cachedHeight = actualHeight;
37003	      var evt = createEvent('autosize:resized');
37004
37005	      try {
37006	        ta.dispatchEvent(evt);
37007	      } catch (err) {// Firefox will throw an error on dispatchEvent for a detached element
37008	        // https://bugzilla.mozilla.org/show_bug.cgi?id=889376
37009	      }
37010	    }
37011	  }
37012
37013	  var pageResize = function pageResize() {
37014	    if (ta.clientWidth !== clientWidth) {
37015	      update();
37016	    }
37017	  };
37018
37019	  var destroy = function (style) {
37020	    window.removeEventListener('resize', pageResize, false);
37021	    ta.removeEventListener('input', update, false);
37022	    ta.removeEventListener('keyup', update, false);
37023	    ta.removeEventListener('autosize:destroy', destroy, false);
37024	    ta.removeEventListener('autosize:update', update, false);
37025	    Object.keys(style).forEach(function (key) {
37026	      ta.style[key] = style[key];
37027	    });
37028	    map["delete"](ta);
37029	  }.bind(ta, {
37030	    height: ta.style.height,
37031	    resize: ta.style.resize,
37032	    overflowY: ta.style.overflowY,
37033	    overflowX: ta.style.overflowX,
37034	    wordWrap: ta.style.wordWrap
37035	  });
37036
37037	  ta.addEventListener('autosize:destroy', destroy, false); // IE9 does not fire onpropertychange or oninput for deletions,
37038	  // so binding to onkeyup to catch most of those events.
37039	  // There is no way that I know of to detect something like 'cut' in IE9.
37040
37041	  if ('onpropertychange' in ta && 'oninput' in ta) {
37042	    ta.addEventListener('keyup', update, false);
37043	  }
37044
37045	  window.addEventListener('resize', pageResize, false);
37046	  ta.addEventListener('input', update, false);
37047	  ta.addEventListener('autosize:update', update, false);
37048	  ta.style.overflowX = 'hidden';
37049	  ta.style.wordWrap = 'break-word';
37050	  map.set(ta, {
37051	    destroy: destroy,
37052	    update: update
37053	  });
37054	  init();
37055	}
37056
37057	function destroy(ta) {
37058	  var methods = map.get(ta);
37059
37060	  if (methods) {
37061	    methods.destroy();
37062	  }
37063	}
37064
37065	function update(ta) {
37066	  var methods = map.get(ta);
37067
37068	  if (methods) {
37069	    methods.update();
37070	  }
37071	}
37072
37073	var autosize = null; // Do nothing in Node.js environment and IE8 (or lower)
37074
37075	if (typeof window === 'undefined' || typeof window.getComputedStyle !== 'function') {
37076	  autosize = function autosize(el) {
37077	    return el;
37078	  };
37079
37080	  autosize.destroy = function (el) {
37081	    return el;
37082	  };
37083
37084	  autosize.update = function (el) {
37085	    return el;
37086	  };
37087	} else {
37088	  autosize = function autosize(el, options) {
37089	    if (el) {
37090	      Array.prototype.forEach.call(el.length ? el : [el], function (x) {
37091	        return assign(x);
37092	      });
37093	    }
37094
37095	    return el;
37096	  };
37097
37098	  autosize.destroy = function (el) {
37099	    if (el) {
37100	      Array.prototype.forEach.call(el.length ? el : [el], destroy);
37101	    }
37102
37103	    return el;
37104	  };
37105
37106	  autosize.update = function (el) {
37107	    if (el) {
37108	      Array.prototype.forEach.call(el.length ? el : [el], update);
37109	    }
37110
37111	    return el;
37112	  };
37113	}
37114
37115	var autosize$1 = autosize;
37116
37117	return autosize$1;
37118
37119})));
37120
37121/*!
37122 * clipboard.js v2.0.8
37123 * https://clipboardjs.com/
37124 *
37125 * Licensed MIT © Zeno Rocha
37126 */
37127!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exp
37127orts.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return n={134:function(t,e,n){"use strict";n.d(e,{default:function(){return r}});var e=n(279),i=n.n(e),e=n(370),a=n.n(e),e=n(817),o=n.n(e);function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var l=function(){function e(t){!function(t){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this),this.resolveOptions(t),this.initSelection()}var t,n,r;return t=e,(n=[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"createFakeElement",value:function(){var t="rtl"===document.documentElement.getAttribute("dir");this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[t?"right":"left"]="-9999px";t=window.pageYOffset||document.documentElement.scrollTop;return this.fakeElem.style.top="".concat(t,"px"),this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.fakeElem}},{key:"selectFake",value:function(){var t=this,e=this.createFakeElement();this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.container.appendChild(e),this.selectedText=o()(e),this.copyText(),this.removeFake()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=o()(this.target),this.copyText()}},{key:"copyText",value:function(){var e;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==c(t)||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}])&&u(t.prototype,n),r&&u(t,r),e}();function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}
vendor: 5,127 bytes, line 37127
37127function h(t,e){return(h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function d(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=p(n);return t=r?(t=p(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==s(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function y(t,e){t="data-clipboard-".concat(t);if(e.hasAttribute(t))return e.getAttribute(t)}var r=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(o,i());var t,e,n,r=d(o);function o(t,e){var n;return function(t){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this),(n=r.call(this)).resolveOptions(e),n.listenClick(t),n}return t=o,n=[{key:"isSupported",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof t?[t]:t,e=!!document.queryCommandSupported;return t.forEach(function(t){e=e&&!!document.queryCommandSupported(t)}),e}}],(e=[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===s(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=a()(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){t=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new l({action:this.action(t),target:this.target(t),text:this.text(t),container:this.container,trigger:t,emitter:this})}},{key:"defaultAction",value:function(t){return y("action",t)}},{key:"defaultTarget",value:function(t){t=y("target",t);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(t){return y("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}])&&f(t.prototype,e),n&&f(t,n),o}()},828:function(t){var e;"undefined"==typeof Element||Element.prototype.matches||((e=Element.prototype).matches=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector),t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}},438:function(t,e,n){var a=n(828);function i(t,e,n,r,o){var i=function(e,n,t,r){return function(t){t.delegateTarget=a(t.target,n),t.delegateTarget&&r.call(e,t)}}.apply(this,arguments);return t.addEventListener(n,i,o),{destroy:function(){t.removeEventListener(n,i,o)}}}t.exports=function(t,e,n,r,o){return"function"==typeof t.addEventListener?i.apply(null,arguments):"function"==typeof n?i.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return i(t,e,n,r,o)}))}},879:function(t,n){n.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},n.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||n.node(t[0]))},n.string=function(t){return"string"==typeof t||t instanceof String},n.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},370:function(t,e,n){var l=n(879),s=n(438);t.exports=function(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!l.string(e))throw new TypeError("Second argument must be a String");if(!l.fn(n))throw new TypeError("Third argument must be a Function");if(l.node(t))return c=e,u=n,(a=t).addEventListener(c,u),{destroy:function(){a.removeEventListener(c,u)}};if(l.nodeList(t))return r=t,o=e,i=n,Array.prototype.forEach.call(r,function(t){t.addEventListener(o,i)}),{destroy:function(){Array.prototype.forEach.call(r,function(t){t.removeEventListener(o,i)})}};if(l.string(t))return t=t,e=e,n=n,s(document.body,t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var r,o,i,a,c,u}},817:function(t){t.exports=function(t){var e,n="SELECT"===t.nodeName?(t.focus(),t.value):"INPUT"===t.nodeName||"TEXTAREA"===t.nodeName?((e=t.hasAttribute("readonly"))||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),e||t.removeAttribute("readonly"),t.value):(t.hasAttribute("contenteditable")&&t.focu
37127s(),n=window.getSelection(),(e=document.createRange()).selectNodeContents(t),n.removeAllRanges(),n.addRange(e),n.toString());return n}},279:function(t){function e(){}e.prototype={on:function(t,e,n){var r=this.e||(this.e={});return(r[t]||(r[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var r=this;function o(){r.off(t,o),e.apply(n,arguments)}return o._=e,this.on(t,o,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),r=0,o=n.length;r<o;r++)n[r].fn.apply(n[r].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),r=n[t],o=[];if(r&&e)for(var i=0,a=r.length;i<a;i++)r[i].fn!==e&&r[i].fn._!==e&&o.push(r[i]);return o.length?n[t]=o:delete n[t],this}},t.exports=e,t.exports.TinyEmitter=e}},o={},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r(134).default;function r(t){if(o[t])return o[t].exports;var e=o[t]={exports:{}};return n[t](e,e.exports,r),e.exports}var n,o});
37128/**
37129 * Bootstrap multiselectsplitter plugin
37130 * Version: 1.0.1
37131 * License: MIT
37132 * Homepage: https://github.com/poolerMF/bootstrap-multiselectsplitter
37133 */
37134+function ($) {
37135    'use strict';
37136
37137    // CLASS DEFINITION
37138    // ===============================
37139
37140    var MultiSelectSplitter = function (element, options) {
37141        this.init('multiselectsplitter', element, options);
37142    };
37143
37144    MultiSelectSplitter.DEFAULTS = {
37145        selectSize: null,
37146        maxSelectSize: null,
37147        clearOnFirstChange: false,
37148        onlySameGroup: false,   // only if multiselect
37149        groupCounter: false,    // only if multiselect
37150        maximumSelected: null,  // only if multiselect, integer or function
37151        afterInitialize: null,
37152        maximumAlert: function (maximumSelected) {
37153            alert("Only " + maximumSelected + " values can be selected");
37154        },
37155        createFirstSelect: function (label, $originalSelect) {
37156            return '<option>' + label + '</option>';
37157        },
37158        createSecondSelect: function (label, $firstSelect) {
37159            return '<option>' + label + '</option>';
37160        },
37161        template: '<div class="row" data-multiselectsplitter-wrapper-selector>' +
37162        '<div class="col-xs-6 col-sm-6">' +
37163        '<select class="form-control" data-multiselectsplitter-firstselect-selector></select>' +
37164        '</div>' +
37165        ' <!-- Add the extra clearfix for only the required viewport -->' +
37166        '<div class="col-xs-6 col-sm-6">' +
37167        '<select class="form-control" data-multiselectsplitter-secondselect-selector></select>' +
37168        '</div>' +
37169        '</div>'
37170    };
37171
37172    MultiSelectSplitter.prototype.init = function (type, element, options) {
37173
37174        var self = this;
37175
37176        self.type = type;
37177        self.last$ElementSelected = [];
37178        self.initialized = false;
37179
37180        self.$element = $(element);
37181        self.$element.hide();
37182
37183        self.options = $.extend({}, MultiSelectSplitter.DEFAULTS, options);
37184
37185        // Add template.
37186        self.$element.after(self.options.template);
37187
37188        // Define selected elements.
37189        self.$wrapper = self.$element.next('div[data-multiselectsplitter-wrapper-selector]');
37190        self.$firstSelect = $('select[data-multiselectsplitter-firstselect-selector]', self.$wrapper);
37191        self.$secondSelect = $('select[data-multiselectsplitter-secondselect-selector]', self.$wrapper);
37192
37193        var optgroupCount = 0;
37194        var longestOptionCount = 0;
37195
37196        if (self.$element.find('optgroup').length == 0) {
37197            return;
37198        }
37199
37200        self.$element.find('optgroup').each(function () {
37201
37202            var label = $(this).attr('label');
37203            var $option = $(self.options.createFirstSelect(label, self.$element));
37204
37205            $option.val(label);
37206            $option.attr('data-current-label', $option.text());
37207            self.$firstSelect.append($option);
37208
37209            var currentOptionCount = $(this).find('option').length;
37210
37211            if (currentOptionCount > longestOptionCount) {
37212                longestOptionCount = currentOptionCount;
37213            }
37214            optgroupCount++;
37215        });
37216
37217        // Define $firstSelect and $secondSelect size attribute
37218        var selectSize = Math.max(optgroupCount, longestOptionCount);
37219        selectSize = Math.min(selectSize, 10);
37220        if (self.options.selectSize) {
37221            selectSize = self.options.selectSize;
37222        } else if (self.options.maxSelectSize) {
37223            selectSize = Math.min(selectSize, self.options.maxSelectSize);
37224        }
37225        self.$firstSelect.attr('size', selectSize);
37226        self.$secondSelect.attr('size', selectSize);
37227
37228        // Set multiple
37229        if (self.$element.attr('multiple')) {
37230            self.$secondSelect.attr('multiple', 'multiple');
37231        }
37232
37233        // Set disabled
37234        if (self.$element.is(":disabled")) {
37235            self.disable();
37236        }
37237
37238        // Define events.
37239        self.$firstSelect.on('change', $.proxy(self.updateParentCategory, self));
37240        self.$secondSelect.on('click change', $.proxy(self.updateChildCategory, self));
37241
37242        self.update = function () {
37243            if (self.$element.find('option').length < 1) {
37244                return;
37245            }
37246            var selectedOptions = self.$element.find('option:selected:first');
37247            var selectedGroup;
37248
37249            if (selectedOptions.length) {
37250                selectedGroup = selectedOptions.parent().attr('label');
37251            } else {
37252                selectedGroup = self.$element.find('option:first').parent().attr('label');
37253            }
37254
37255            self.$firstSelect.find('option[value="' + selectedGroup + '"]').prop('selected', true);
37256            self.$firstSelect.trigger('change');
37257        };
37258
37259        self.update();
37260        self.initialized = true;
37261
37262        if (self.options.afterInitialize) {
37263            self.options.afterInitialize(self.$firstSelect, self.$secondSelect);
37264        }
37265    };
37266
37267    MultiSelectSplitter.prototype.disable = function () {
37268        this.$secondSelect.prop('disabled', true);
37269        this.$firstSelect.prop('disabled', true);
37270    };
37271
37272    MultiSelectSplitter.prototype.enable = function () {
37273        this.$secondSelect.prop('disabled', false);
37274        this.$firstSelect.prop('disabled', false);
37275    };
37276
37277    MultiSelectSplitter.prototype.createSecondSelect = function () {
37278
37279        var self = this;
37280
37281        self.$secondSelect.empty();
37282
37283        $.each(self.$element.find('optgroup[label="' + self.$firstSelect.val() + '"] option'), function (index, element) {
37284            var value = $(this).val();
37285            var label = $(this).text();
37286
37287            var $option = $(self.options.createSecondSelect(label, self.$firstSelect));
37288            $option.val(value);
37289
37290            $.each(self.$element.find('option:selected'), function (index, element) {
37291                if ($(element).val() == value) {
37292                    $option.prop('selected', true);
37293                }
37294            });
37295
37296            self.$secondSelect.append($option);
37297        });
37298    };
37299
37300    MultiSelectSplitter.prototype.updateParentCategory = function () {
37301
37302        var self = this;
37303
37304        self.last$ElementSelected = self.$element.find('option:selected');
37305
37306        if (self.options.clearOnFirstChange && self.initialized) {
37307            self.$element.find('option:selected').prop('selected', false);
37308        }
37309
37310        self.createSecondSelect();
37311        self.checkSelected();
37312        self.updateCounter();
37313    };
37314
37315    MultiSelectSplitter.prototype.updateCounter = function () {
37316
37317        var self = this;
37318
37319        if (!self.$element.attr('multiple') || !self.options.groupCounter) {
37320            return;
37321        }
37322
37323        $.each(self.$firstSelect.find('option'), function (index, element) {
37324            var originalLabel = $(element).val();
37325            var text = $(element).data('currentLabel');
37326            var count = self.$element.find('optgroup[label="' + originalLabel + '"] option:selected').length;
37327
37328            if (count > 0) {
37329                text += ' (' + count + ')';
37330            }
37331
37332            $(element).html(text);
37333        });
37334    };
37335
37336    MultiSelectSplitter.prototype.checkSelected = function () {
37337
37338        var self = this;
37339
37340        if (!self.$element.attr('multiple') || !self.options.maximumSelected) {
37341            return;
37342        }
37343
37344        var maximumSelected = 0;
37345
37346        if (typeof self.options.maximumSelected == 'function') {
37347            maximumSelected = self.options.maximumSelected(self.$firstSelect, self.$secondSelect);
37348        } else {
37349            maximumSelected = self.options.maximumSelected;
37350        }
37351
37352        if (maximumSelected < 1) {
37353            return;
37354        }
37355
37356        var $actualElementSelected = self.$element.find('option:selected');
37357
37358        if ($actualElementSelected.length > maximumSelected) {
37359            self.$firstSelect.find('option:selected').prop('selected', false);
37360            self.$secondSelect.find('option:selected').prop('selected', false);
37361
37362            if (self.initialized) {
37363                self.$element.find('option:selected').prop('selected', false);
37364                self.last$ElementSelected.prop('selected', true);
37365            } else {
37366                // after init, there is no last value
37367                $.each(self.$element.find('option:selected'), function (index, element) {
37368                    if (index > maximumSelected - 1) {
37369                        $(element).prop('selected', false);
37370                    }
37371                });
37372            }
37373
37374            var firstSelectedOptGroupLabel = self.last$ElementSelected.first().parent().attr('label');
37375            self.$firstSelect.find('option[value="' + firstSelectedOptGroupLabel + '"]').prop('selected', true);
37376
37377            self.createSecondSelect();
37378            self.options.maximumAlert(maximumSelected);
37379        }
37380    };
37381
37382    MultiSelectSplitter.prototype.basicUpdateChildCategory = function (event, isCtrlKey) {
37383
37384        var self = this;
37385
37386        self.last$ElementSelected = self.$element.find('option:selected');
37387        var childValues = self.$secondSelect.val();
37388
37389        if (!$.isArray(childValues)) {
37390            childValues = [childValues];
37391        }
37392
37393        var parentLabel = self.$firstSelect.val();
37394        var removeActualSelected = false;
37395
37396        if (!self.$element.attr('multiple')) {
37397            removeActualSelected = true;
37398        } else {
37399            if (self.options.onlySameGroup) {
37400                $.each(self.$element.find('option:selected'), function (index, element) {
37401                    if ($(element).parent().attr('label') != parentLabel) {
37402                        removeActualSelected = true;
37403                        return false;
37404                    }
37405                });
37406            } else {
37407                if (!isCtrlKey) {
37408                    removeActualSelected = true;
37409                }
37410            }
37411        }
37412
37413        if (removeActualSelected) {
37414            self.$element.find('option:selected').prop('selected', false);
37415        } else {
37416            $.each(self.$element.find('option:selected'), function (index, element) {
37417                if (parentLabel == $(element).parent().attr('label') && $.inArray($(element).val(), childValues) == -1) {
37418                    $(element).prop('selected', false);
37419                }
37420            });
37421        }
37422
37423        $.each(childValues, function (index, value) {
37424            self.$element.find('option[value="' + value + '"]').prop('selected', true);
37425        });
37426
37427        self.checkSelected();
37428        self.updateCounter();
37429        self.$element.trigger('change'); // Required for external plugins.
37430    };
37431
37432    MultiSelectSplitter.prototype.updateChildCategory = function (event) {
37433        // There is no event.ctrlKey in event "change", so change function is called with timeout
37434        if (event.type == "change") {
37435            this.timeOut = setTimeout($.proxy(function () {
37436                this.basicUpdateChildCategory(event, event.ctrlKey);
37437            }, this), 10);
37438        } else if (event.type == "click") {
37439            clearTimeout(this.timeOut);
37440            this.basicUpdateChildCategory(event, event.ctrlKey)
37441        }
37442    };
37443
37444    MultiSelectSplitter.prototype.destroy = function () {
37445        this.$wrapper.remove();
37446        this.$element.removeData(this.type);
37447        this.$element.show();
37448    };
37449
37450    // PLUGIN DEFINITION
37451    // =========================
37452
37453    function Plugin(option) {
37454        return this.each(function () {
37455            var $this = $(this);
37456            var data = $this.data('multiselectsplitter');
37457            var options = typeof option === 'object' && option;
37458
37459            if (!data && option == 'destroy') {
37460                return;
37461            }
37462            if (!data) {
37463                $this.data('multiselectsplitter', ( data = new MultiSelectSplitter(this, options) ));
37464            }
37465            if (typeof option == 'string') {
37466                data[option]();
37467            }
37468        });
37469    }
37470
37471    $.fn.multiselectsplitter = Plugin;
37472    $.fn.multiselectsplitter.Constructor = MultiSelectSplitter;
37473    $.fn.multiselectsplitter.VERSION = '1.0.1';
37474
37475}(jQuery);
37476/*!
37477 * smooth-scroll v16.1.3
37478 * Animate scrolling to anchor links
37479 * (c) 2020 Chris Ferdinandi
37480 * MIT License
37481 * http://github.com/cferdinandi/smooth-scroll
37482 */
vendor: 9,460 bytes, lines 37482-37780
37482
37483
37484(function (root, factory) {
37485	if (typeof define === 'function' && define.amd) {
37486		define([], (function () {
37487			return factory(root);
37488		}));
37489	} else if (typeof exports === 'object') {
37490		module.exports = factory(root);
37491	} else {
37492		root.SmoothScroll = factory(root);
37493	}
37494})(typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : this, (function (window) {
37495
37496	'use strict';
37497
37498	//
37499	// Default settings
37500	//
37501
37502	var defaults = {
37503
37504		// Selectors
37505		ignore: '[data-scroll-ignore]',
37506		header: null,
37507		topOnEmptyHash: true,
37508
37509		// Speed & Duration
37510		speed: 500,
37511		speedAsDuration: false,
37512		durationMax: null,
37513		durationMin: null,
37514		clip: true,
37515		offset: 0,
37516
37517		// Easing
37518		easing: 'easeInOutCubic',
37519		customEasing: null,
37520
37521		// History
37522		updateURL: true,
37523		popstate: true,
37524
37525		// Custom Events
37526		emitEvents: true
37527
37528	};
37529
37530
37531	//
37532	// Utility Methods
37533	//
37534
37535	/**
37536	 * Check if browser supports required methods
37537	 * @return {Boolean} Returns true if all required methods are supported
37538	 */
37539	var supports = function () {
37540		return (
37541			'querySelector' in document &&
37542			'addEventListener' in window &&
37543			'requestAnimationFrame' in window &&
37544			'closest' in window.Element.prototype
37545		);
37546	};
37547
37548	/**
37549	 * Merge two or more objects together.
37550	 * @param   {Object}   objects  The objects to merge together
37551	 * @returns {Object}            Merged values of defaults and options
37552	 */
37553	var extend = function () {
37554		var merged = {};
37555		Array.prototype.forEach.call(arguments, (function (obj) {
37556			for (var key in obj) {
37557				if (!obj.hasOwnProperty(key)) return;
37558				merged[key] = obj[key];
37559			}
37560		}));
37561		return merged;
37562	};
37563
37564	/**
37565	 * Check to see if user prefers reduced motion
37566	 * @param  {Object} settings Script settings
37567	 */
37568	var reduceMotion = function () {
37569		if ('matchMedia' in window && window.matchMedia('(prefers-reduced-motion)').matches) {
37570			return true;
37571		}
37572		return false;
37573	};
37574
37575	/**
37576	 * Get the height of an element.
37577	 * @param  {Node} elem The element to get the height of
37578	 * @return {Number}    The element's height in pixels
37579	 */
37580	var getHeight = function (elem) {
37581		return parseInt(window.getComputedStyle(elem).height, 10);
37582	};
37583
37584	/**
37585	 * Escape special characters for use with querySelector
37586	 * @author Mathias Bynens
37587	 * @link https://github.com/mathiasbynens/CSS.escape
37588	 * @param {String} id The anchor ID to escape
37589	 */
37590	var escapeCharacters = function (id) {
37591
37592		// Remove leading hash
37593		if (id.charAt(0) === '#') {
37594			id = id.substr(1);
37595		}
37596
37597		var string = String(id);
37598		var length = string.length;
37599		var index = -1;
37600		var codeUnit;
37601		var result = '';
37602		var firstCodeUnit = string.charCodeAt(0);
37603		while (++index < length) {
37604			codeUnit = string.charCodeAt(index);
37605			// Note: there’s no need to special-case astral symbols, surrogate
37606			// pairs, or lone surrogates.
37607
37608			// If the character is NULL (U+0000), then throw an
37609			// `InvalidCharacterError` exception and terminate these steps.
37610			if (codeUnit === 0x0000) {
37611				throw new InvalidCharacterError(
37612					'Invalid character: the input contains U+0000.'
37613				);
37614			}
37615
37616			if (
37617				// If the character is in the range [\1-\1F] (U+0001 to U+001F) or is
37618				// U+007F, […]
37619				(codeUnit >= 0x0001 && codeUnit <= 0x001F) || codeUnit == 0x007F ||
37620				// If the character is the first character and is in the range [0-9]
37621				// (U+0030 to U+0039), […]
37622				(index === 0 && codeUnit >= 0x0030 && codeUnit <= 0x0039) ||
37623				// If the character is the second character and is in the range [0-9]
37624				// (U+0030 to U+0039) and the first character is a `-` (U+002D), […]
37625				(
37626					index === 1 &&
37627					codeUnit >= 0x0030 && codeUnit <= 0x0039 &&
37628					firstCodeUnit === 0x002D
37629				)
37630			) {
37631				// http://dev.w3.org/csswg/cssom/#escape-a-character-as-code-point
37632				result += '\\' + codeUnit.toString(16) + ' ';
37633				continue;
37634			}
37635
37636			// If the character is not handled by one of the above rules and is
37637			// greater than or equal to U+0080, is `-` (U+002D) or `_` (U+005F), or
37638			// is in one of the ranges [0-9] (U+0030 to U+0039), [A-Z] (U+0041 to
37639			// U+005A), or [a-z] (U+0061 to U+007A), […]
37640			if (
37641				codeUnit >= 0x0080 ||
37642				codeUnit === 0x002D ||
37643				codeUnit === 0x005F ||
37644				codeUnit >= 0x0030 && codeUnit <= 0x0039 ||
37645				codeUnit >= 0x0041 && codeUnit <= 0x005A ||
37646				codeUnit >= 0x0061 && codeUnit <= 0x007A
37647			) {
37648				// the character itself
37649				result += string.charAt(index);
37650				continue;
37651			}
37652
37653			// Otherwise, the escaped character.
37654			// http://dev.w3.org/csswg/cssom/#escape-a-character
37655			result += '\\' + string.charAt(index);
37656
37657		}
37658
37659		// Return sanitized hash
37660		return '#' + result;
37661
37662	};
37663
37664	/**
37665	 * Calculate the easing pattern
37666	 * @link https://gist.github.com/gre/1650294
37667	 * @param {String} type Easing pattern
37668	 * @param {Number} time Time animation should take to complete
37669	 * @returns {Number}
37670	 */
37671	var easingPattern = function (settings, time) {
37672		var pattern;
37673
37674		// Default Easing Patterns
37675		if (settings.easing === 'easeInQuad') pattern = time * time; // accelerating from zero velocity
37676		if (settings.easing === 'easeOutQuad') pattern = time * (2 - time); // decelerating to zero velocity
37677		if (settings.easing === 'easeInOutQuad') pattern = time < 0.5 ? 2 * time * time : -1 + (4 - 2 * time) * time; // acceleration until halfway, then deceleration
37678		if (settings.easing === 'easeInCubic') pattern = time * time * time; // accelerating from zero velocity
37679		if (settings.easing === 'easeOutCubic') pattern = (--time) * time * time + 1; // decelerating to zero velocity
37680		if (settings.easing === 'easeInOutCubic') pattern = time < 0.5 ? 4 * time * time * time : (time - 1) * (2 * time - 2) * (2 * time - 2) + 1; // acceleration until halfway, then deceleration
37681		if (settings.easing === 'easeInQuart') pattern = time * time * time * time; // accelerating from zero velocity
37682		if (settings.easing === 'easeOutQuart') pattern = 1 - (--time) * time * time * time; // decelerating to zero velocity
37683		if (settings.easing === 'easeInOutQuart') pattern = time < 0.5 ? 8 * time * time * time * time : 1 - 8 * (--time) * time * time * time; // acceleration until halfway, then deceleration
37684		if (settings.easing === 'easeInQuint') pattern = time * time * time * time * time; // accelerating from zero velocity
37685		if (settings.easing === 'easeOutQuint') pattern = 1 + (--time) * time * time * time * time; // decelerating to zero velocity
37686		if (settings.easing === 'easeInOutQuint') pattern = time < 0.5 ? 16 * time * time * time * time * time : 1 + 16 * (--time) * time * time * time * time; // acceleration until halfway, then deceleration
37687
37688		// Custom Easing Patterns
37689		if (!!settings.customEasing) pattern = settings.customEasing(time);
37690
37691		return pattern || time; // no easing, no acceleration
37692	};
37693
37694	/**
37695	 * Determine the document's height
37696	 * @returns {Number}
37697	 */
37698	var getDocumentHeight = function () {
37699		return Math.max(
37700			document.body.scrollHeight, document.documentElement.scrollHeight,
37701			document.body.offsetHeight, document.documentElement.offsetHeight,
37702			document.body.clientHeight, document.documentElement.clientHeight
37703		);
37704	};
37705
37706	/**
37707	 * Calculate how far to scroll
37708	 * Clip support added by robjtede - https://github.com/cferdinandi/smooth-scroll/issues/405
37709	 * @param {Element} anchor       The anchor element to scroll to
37710	 * @param {Number}  headerHeight Height of a fixed header, if any
37711	 * @param {Number}  offset       Number of pixels by which to offset scroll
37712	 * @param {Boolean} clip         If true, adjust scroll distance to prevent abrupt stops near the bottom of the page
37713	 * @returns {Number}
37714	 */
37715	var getEndLocation = function (anchor, headerHeight, offset, clip) {
37716		var location = 0;
37717		if (anchor.offsetParent) {
37718			do {
37719				location += anchor.offsetTop;
37720				anchor = anchor.offsetParent;
37721			} while (anchor);
37722		}
37723		location = Math.max(location - headerHeight - offset, 0);
37724		if (clip) {
37725			location = Math.min(location, getDocumentHeight() - window.innerHeight);
37726		}
37727 		return location;
37728	};
37729
37730	/**
37731	 * Get the height of the fixed header
37732	 * @param  {Node}   header The header
37733	 * @return {Number}        The height of the header
37734	 */
37735	var getHeaderHeight = function (header) {
37736		return !header ? 0 : (getHeight(header) + header.offsetTop);
37737	};
37738
37739	/**
37740	 * Calculate the speed to use for the animation
37741	 * @param  {Number} distance The distance to travel
37742	 * @param  {Object} settings The plugin settings
37743	 * @return {Number}          How fast to animate
37744	 */
37745	var getSpeed = function (distance, settings) {
37746		var speed = settings.speedAsDuration ? settings.speed : Math.abs(distance / 1000 * settings.speed);
37747		if (settings.durationMax && speed > settings.durationMax) return settings.durationMax;
37748		if (settings.durationMin && speed < settings.durationMin) return settings.durationMin;
37749		return parseInt(speed, 10);
37750	};
37751
37752	var setHistory = function (options) {
37753
37754		// Make sure this should run
37755		if (!history.replaceState || !options.updateURL || history.state) return;
37756
37757		// Get the hash to use
37758		var hash = window.location.hash;
37759		hash = hash ? hash : '';
37760
37761		// Set a default history
37762		history.replaceState(
37763			{
37764				smoothScroll: JSON.stringify(options),
37765				anchor: hash ? hash : window.pageYOffset
37766			},
37767			document.title,
37768			hash ? hash : window.location.href
37769		);
37770
37771	};
37772
37773	/**
37774	 * Update the URL
37775	 * @param  {Node}    anchor  The anchor that was scrolled to
37776	 * @param  {Boolean} isNum   If true, anchor is a number
37777	 * @param  {Object}  options Settings for Smooth Scroll
37778	 */
37779	var updateURL = function (anchor, isNum, options) {
37780
vendor: 9,973 bytes, lines 37781-38125
37781		// Bail if the anchor is a number
37782		if (isNum) return;
37783
37784		// Verify that pushState is supported and the updateURL option is enabled
37785		if (!history.pushState || !options.updateURL) return;
37786
37787		// Update URL
37788		history.pushState(
37789			{
37790				smoothScroll: JSON.stringify(options),
37791				anchor: anchor.id
37792			},
37793			document.title,
37794			anchor === document.documentElement ? '#top' : '#' + anchor.id
37795		);
37796
37797	};
37798
37799	/**
37800	 * Bring the anchored element into focus
37801	 * @param {Node}     anchor      The anchor element
37802	 * @param {Number}   endLocation The end location to scroll to
37803	 * @param {Boolean}  isNum       If true, scroll is to a position rather than an element
37804	 */
37805	var adjustFocus = function (anchor, endLocation, isNum) {
37806
37807		// Is scrolling to top of page, blur
37808		if (anchor === 0) {
37809			document.body.focus();
37810		}
37811
37812		// Don't run if scrolling to a number on the page
37813		if (isNum) return;
37814
37815		// Otherwise, bring anchor element into focus
37816		anchor.focus();
37817		if (document.activeElement !== anchor) {
37818			anchor.setAttribute('tabindex', '-1');
37819			anchor.focus();
37820			anchor.style.outline = 'none';
37821		}
37822		window.scrollTo(0 , endLocation);
37823
37824	};
37825
37826	/**
37827	 * Emit a custom event
37828	 * @param  {String} type    The event type
37829	 * @param  {Object} options The settings object
37830	 * @param  {Node}   anchor  The anchor element
37831	 * @param  {Node}   toggle  The toggle element
37832	 */
37833	var emitEvent = function (type, options, anchor, toggle) {
37834		if (!options.emitEvents || typeof window.CustomEvent !== 'function') return;
37835		var event = new CustomEvent(type, {
37836			bubbles: true,
37837			detail: {
37838				anchor: anchor,
37839				toggle: toggle
37840			}
37841		});
37842		document.dispatchEvent(event);
37843	};
37844
37845
37846	//
37847	// SmoothScroll Constructor
37848	//
37849
37850	var SmoothScroll = function (selector, options) {
37851
37852		//
37853		// Variables
37854		//
37855
37856		var smoothScroll = {}; // Object for public APIs
37857		var settings, anchor, toggle, fixedHeader, eventTimeout, animationInterval;
37858
37859
37860		//
37861		// Methods
37862		//
37863
37864		/**
37865		 * Cancel a scroll-in-progress
37866		 */
37867		smoothScroll.cancelScroll = function (noEvent) {
37868			cancelAnimationFrame(animationInterval);
37869			animationInterval = null;
37870			if (noEvent) return;
37871			emitEvent('scrollCancel', settings);
37872		};
37873
37874		/**
37875		 * Start/stop the scrolling animation
37876		 * @param {Node|Number} anchor  The element or position to scroll to
37877		 * @param {Element}     toggle  The element that toggled the scroll event
37878		 * @param {Object}      options
37879		 */
37880		smoothScroll.animateScroll = function (anchor, toggle, options) {
37881
37882			// Cancel any in progress scrolls
37883			smoothScroll.cancelScroll();
37884
37885			// Local settings
37886			var _settings = extend(settings || defaults, options || {}); // Merge user options with defaults
37887
37888			// Selectors and variables
37889			var isNum = Object.prototype.toString.call(anchor) === '[object Number]' ? true : false;
37890			var anchorElem = isNum || !anchor.tagName ? null : anchor;
37891			if (!isNum && !anchorElem) return;
37892			var startLocation = window.pageYOffset; // Current location on the page
37893			if (_settings.header && !fixedHeader) {
37894				// Get the fixed header if not already set
37895				fixedHeader = document.querySelector(_settings.header);
37896			}
37897			var headerHeight = getHeaderHeight(fixedHeader);
37898			var endLocation = isNum ? anchor : getEndLocation(anchorElem, headerHeight, parseInt((typeof _settings.offset === 'function' ? _settings.offset(anchor, toggle) : _settings.offset), 10), _settings.clip); // Location to scroll to
37899			var distance = endLocation - startLocation; // distance to travel
37900			var documentHeight = getDocumentHeight();
37901			var timeLapsed = 0;
37902			var speed = getSpeed(distance, _settings);
37903			var start, percentage, position;
37904
37905			/**
37906			 * Stop the scroll animation when it reaches its target (or the bottom/top of page)
37907			 * @param {Number} position Current position on the page
37908			 * @param {Number} endLocation Scroll to location
37909			 * @param {Number} animationInterval How much to scroll on this loop
37910			 */
37911			var stopAnimateScroll = function (position, endLocation) {
37912
37913				// Get the current location
37914				var currentLocation = window.pageYOffset;
37915
37916				// Check if the end location has been reached yet (or we've hit the end of the document)
37917				if (position == endLocation || currentLocation == endLocation || ((startLocation < endLocation && window.innerHeight + currentLocation) >= documentHeight)) {
37918
37919					// Clear the animation timer
37920					smoothScroll.cancelScroll(true);
37921
37922					// Bring the anchored element into focus
37923					adjustFocus(anchor, endLocation, isNum);
37924
37925					// Emit a custom event
37926					emitEvent('scrollStop', _settings, anchor, toggle);
37927
37928					// Reset start
37929					start = null;
37930					animationInterval = null;
37931
37932					return true;
37933
37934				}
37935			};
37936
37937			/**
37938			 * Loop scrolling animation
37939			 */
37940			var loopAnimateScroll = function (timestamp) {
37941				if (!start) { start = timestamp; }
37942				timeLapsed += timestamp - start;
37943				percentage = speed === 0 ? 0 : (timeLapsed / speed);
37944				percentage = (percentage > 1) ? 1 : percentage;
37945				position = startLocation + (distance * easingPattern(_settings, percentage));
37946				window.scrollTo(0, Math.floor(position));
37947				if (!stopAnimateScroll(position, endLocation)) {
37948					animationInterval = window.requestAnimationFrame(loopAnimateScroll);
37949					start = timestamp;
37950				}
37951			};
37952
37953			/**
37954			 * Reset position to fix weird iOS bug
37955			 * @link https://github.com/cferdinandi/smooth-scroll/issues/45
37956			 */
37957			if (window.pageYOffset === 0) {
37958				window.scrollTo(0, 0);
37959			}
37960
37961			// Update the URL
37962			updateURL(anchor, isNum, _settings);
37963
37964			// If the user prefers reduced motion, jump to location
37965			if (reduceMotion()) {
37966				adjustFocus(anchor, Math.floor(endLocation), false);
37967				return;
37968			}
37969
37970			// Emit a custom event
37971			emitEvent('scrollStart', _settings, anchor, toggle);
37972
37973			// Start scrolling animation
37974			smoothScroll.cancelScroll(true);
37975			window.requestAnimationFrame(loopAnimateScroll);
37976
37977		};
37978
37979		/**
37980		 * If smooth scroll element clicked, animate scroll
37981		 */
37982		var clickHandler = function (event) {
37983
37984			// Don't run if event was canceled but still bubbled up
37985			// By @mgreter - https://github.com/cferdinandi/smooth-scroll/pull/462/
37986			if (event.defaultPrevented) return;
37987
37988			// Don't run if right-click or command/control + click or shift + click
37989			if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey) return;
37990
37991			// Check if event.target has closest() method
37992			// By @totegi - https://github.com/cferdinandi/smooth-scroll/pull/401/
37993			if (!('closest' in event.target)) return;
37994
37995			// Check if a smooth scroll link was clicked
37996			toggle = event.target.closest(selector);
37997			if (!toggle || toggle.tagName.toLowerCase() !== 'a' || event.target.closest(settings.ignore)) return;
37998
37999			// Only run if link is an anchor and points to the current page
38000			if (toggle.hostname !== window.location.hostname || toggle.pathname !== window.location.pathname || !/#/.test(toggle.href)) return;
38001
38002			// Get an escaped version of the hash
38003			var hash;
38004			try {
38005				hash = escapeCharacters(decodeURIComponent(toggle.hash));
38006			} catch(e) {
38007				hash = escapeCharacters(toggle.hash);
38008			}
38009
38010			// Get the anchored element
38011			var anchor;
38012			if (hash === '#') {
38013				if (!settings.topOnEmptyHash) return;
38014				anchor = document.documentElement;
38015			} else {
38016				anchor = document.querySelector(hash);
38017			}
38018			anchor = !anchor && hash === '#top' ? document.documentElement : anchor;
38019
38020			// If anchored element exists, scroll to it
38021			if (!anchor) return;
38022			event.preventDefault();
38023			setHistory(settings);
38024			smoothScroll.animateScroll(anchor, toggle);
38025
38026		};
38027
38028		/**
38029		 * Animate scroll on popstate events
38030		 */
38031		var popstateHandler = function (event) {
38032
38033			// Stop if history.state doesn't exist (ex. if clicking on a broken anchor link).
38034			// fixes `Cannot read property 'smoothScroll' of null` error getting thrown.
38035			if (history.state === null) return;
38036
38037			// Only run if state is a popstate record for this instantiation
38038			if (!history.state.smoothScroll || history.state.smoothScroll !== JSON.stringify(settings)) return;
38039
38040			// Only run if state includes an anchor
38041
38042			// if (!history.state.anchor && history.state.anchor !== 0) return;
38043
38044			// Get the anchor
38045			var anchor = history.state.anchor;
38046			if (typeof anchor === 'string' && anchor) {
38047				anchor = document.querySelector(escapeCharacters(history.state.anchor));
38048				if (!anchor) return;
38049			}
38050
38051			// Animate scroll to anchor link
38052			smoothScroll.animateScroll(anchor, null, {updateURL: false});
38053
38054		};
38055
38056		/**
38057		 * Destroy the current initialization.
38058		 */
38059		smoothScroll.destroy = function () {
38060
38061			// If plugin isn't already initialized, stop
38062			if (!settings) return;
38063
38064			// Remove event listeners
38065			document.removeEventListener('click', clickHandler, false);
38066			window.removeEventListener('popstate', popstateHandler, false);
38067
38068			// Cancel any scrolls-in-progress
38069			smoothScroll.cancelScroll();
38070
38071			// Reset variables
38072			settings = null;
38073			anchor = null;
38074			toggle = null;
38075			fixedHeader = null;
38076			eventTimeout = null;
38077			animationInterval = null;
38078
38079		};
38080
38081		/**
38082		 * Initialize Smooth Scroll
38083		 * @param {Object} options User settings
38084		 */
38085		var init = function () {
38086
38087			// feature test
38088			if (!supports()) throw 'Smooth Scroll: This browser does not support the required JavaScript methods and browser APIs.';
38089
38090			// Destroy any existing initializations
38091			smoothScroll.destroy();
38092
38093			// Selectors and variables
38094			settings = extend(defaults, options || {}); // Merge user options with defaults
38095			fixedHeader = settings.header ? document.querySelector(settings.header) : null; // Get the fixed header
38096
38097			// When a toggle is clicked, run the click handler
38098			document.addEventListener('click', clickHandler, false);
38099
38100			// If updateURL and popState are enabled, listen for pop events
38101			if (settings.updateURL && settings.popstate) {
38102				window.addEventListener('popstate', popstateHandler, false);
38103			}
38104
38105		};
38106
38107
38108		//
38109		// Initialize plugin
38110		//
38111
38112		init();
38113
38114
38115		//
38116		// Public APIs
38117		//
38118
38119		return smoothScroll;
38120
38121	};
38122
38123	return SmoothScroll;
38124
38125}));
38126
vendor: 187,833 bytes, lines 38127-44141
38127(function webpackUniversalModuleDefinition(root, factory) {
38128	if(typeof exports === 'object' && typeof module === 'object')
38129		module.exports = factory();
38130	else if(typeof define === 'function' && define.amd)
38131		define([], factory);
38132	else {
38133		var a = factory();
38134		for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
38135	}
38136})(self, function() {
38137return /******/ (function() { // webpackBootstrap
38138/******/ 	var __webpack_modules__ = ({
38139
38140/***/ 3099:
38141/***/ (function(module) {
38142
38143module.exports = function (it) {
38144  if (typeof it != 'function') {
38145    throw TypeError(String(it) + ' is not a function');
38146  } return it;
38147};
38148
38149
38150/***/ }),
38151
38152/***/ 6077:
38153/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
38154
38155var isObject = __webpack_require__(111);
38156
38157module.exports = function (it) {
38158  if (!isObject(it) && it !== null) {
38159    throw TypeError("Can't set " + String(it) + ' as a prototype');
38160  } return it;
38161};
38162
38163
38164/***/ }),
38165
38166/***/ 1223:
38167/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
38168
38169var wellKnownSymbol = __webpack_require__(5112);
38170var create = __webpack_require__(30);
38171var definePropertyModule = __webpack_require__(3070);
38172
38173var UNSCOPABLES = wellKnownSymbol('unscopables');
38174var ArrayPrototype = Array.prototype;
38175
38176// Array.prototype[@@unscopables]
38177// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
38178if (ArrayPrototype[UNSCOPABLES] == undefined) {
38179  definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
38180    configurable: true,
38181    value: create(null)
38182  });
38183}
38184
38185// add a key to Array.prototype[@@unscopables]
38186module.exports = function (key) {
38187  ArrayPrototype[UNSCOPABLES][key] = true;
38188};
38189
38190
38191/***/ }),
38192
38193/***/ 1530:
38194/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
38195
38196"use strict";
38197
38198var charAt = __webpack_require__(8710).charAt;
38199
38200// `AdvanceStringIndex` abstract operation
38201// https://tc39.es/ecma262/#sec-advancestringindex
38202module.exports = function (S, index, unicode) {
38203  return index + (unicode ? charAt(S, index).length : 1);
38204};
38205
38206
38207/***/ }),
38208
38209/***/ 5787:
38210/***/ (function(module) {
38211
38212module.exports = function (it, Constructor, name) {
38213  if (!(it instanceof Constructor)) {
38214    throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');
38215  } return it;
38216};
38217
38218
38219/***/ }),
38220
38221/***/ 9670:
38222/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
38223
38224var isObject = __webpack_require__(111);
38225
38226module.exports = function (it) {
38227  if (!isObject(it)) {
38228    throw TypeError(String(it) + ' is not an object');
38229  } return it;
38230};
38231
38232
38233/***/ }),
38234
38235/***/ 4019:
38236/***/ (function(module) {
38237
38238module.exports = typeof ArrayBuffer !== 'undefined' && typeof DataView !== 'undefined';
38239
38240
38241/***/ }),
38242
38243/***/ 260:
38244/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
38245
38246"use strict";
38247
38248var NATIVE_ARRAY_BUFFER = __webpack_require__(4019);
38249var DESCRIPTORS = __webpack_require__(9781);
38250var global = __webpack_require__(7854);
38251var isObject = __webpack_require__(111);
38252var has = __webpack_require__(6656);
38253var classof = __webpack_require__(648);
38254var createNonEnumerableProperty = __webpack_require__(8880);
38255var redefine = __webpack_require__(1320);
38256var defineProperty = __webpack_require__(3070).f;
38257var getPrototypeOf = __webpack_require__(9518);
38258var setPrototypeOf = __webpack_require__(7674);
38259var wellKnownSymbol = __webpack_require__(5112);
38260var uid = __webpack_require__(9711);
38261
38262var Int8Array = global.Int8Array;
38263var Int8ArrayPrototype = Int8Array && Int8Array.prototype;
38264var Uint8ClampedArray = global.Uint8ClampedArray;
38265var Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;
38266var TypedArray = Int8Array && getPrototypeOf(Int8Array);
38267var TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype);
38268var ObjectPrototype = Object.prototype;
38269var isPrototypeOf = ObjectPrototype.isPrototypeOf;
38270
38271var TO_STRING_TAG = wellKnownSymbol('toStringTag');
38272var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
38273// Fixing native typed arrays in Opera Presto crashes the browser, see #595
38274var NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera';
38275var TYPED_ARRAY_TAG_REQIRED = false;
38276var NAME;
38277
38278var TypedArrayConstructorsList = {
38279  Int8Array: 1,
38280  Uint8Array: 1,
38281  Uint8ClampedArray: 1,
38282  Int16Array: 2,
38283  Uint16Array: 2,
38284  Int32Array: 4,
38285  Uint32Array: 4,
38286  Float32Array: 4,
38287  Float64Array: 8
38288};
38289
38290var BigIntArrayConstructorsList = {
38291  BigInt64Array: 8,
38292  BigUint64Array: 8
38293};
38294
38295var isView = function isView(it) {
38296  if (!isObject(it)) return false;
38297  var klass = classof(it);
38298  return klass === 'DataView'
38299    || has(TypedArrayConstructorsList, klass)
38300    || has(BigIntArrayConstructorsList, klass);
38301};
38302
38303var isTypedArray = function (it) {
38304  if (!isObject(it)) return false;
38305  var klass = classof(it);
38306  return has(TypedArrayConstructorsList, klass)
38307    || has(BigIntArrayConstructorsList, klass);
38308};
38309
38310var aTypedArray = function (it) {
38311  if (isTypedArray(it)) return it;
38312  throw TypeError('Target is not a typed array');
38313};
38314
38315var aTypedArrayConstructor = function (C) {
38316  if (setPrototypeOf) {
38317    if (isPrototypeOf.call(TypedArray, C)) return C;
38318  } else for (var ARRAY in TypedArrayConstructorsList) if (has(TypedArrayConstructorsList, NAME)) {
38319    var TypedArrayConstructor = global[ARRAY];
38320    if (TypedArrayConstructor && (C === TypedArrayConstructor || isPrototypeOf.call(TypedArrayConstructor, C))) {
38321      return C;
38322    }
38323  } throw TypeError('Target is not a typed array constructor');
38324};
38325
38326var exportTypedArrayMethod = function (KEY, property, forced) {
38327  if (!DESCRIPTORS) return;
38328  if (forced) for (var ARRAY in TypedArrayConstructorsList) {
38329    var TypedArrayConstructor = global[ARRAY];
38330    if (TypedArrayConstructor && has(TypedArrayConstructor.prototype, KEY)) {
38331      delete TypedArrayConstructor.prototype[KEY];
38332    }
38333  }
38334  if (!TypedArrayPrototype[KEY] || forced) {
38335    redefine(TypedArrayPrototype, KEY, forced ? property
38336      : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property);
38337  }
38338};
38339
38340var exportTypedArrayStaticMethod = function (KEY, property, forced) {
38341  var ARRAY, TypedArrayConstructor;
38342  if (!DESCRIPTORS) return;
38343  if (setPrototypeOf) {
38344    if (forced) for (ARRAY in TypedArrayConstructorsList) {
38345      TypedArrayConstructor = global[ARRAY];
38346      if (TypedArrayConstructor && has(TypedArrayConstructor, KEY)) {
38347        delete TypedArrayConstructor[KEY];
38348      }
38349    }
38350    if (!TypedArray[KEY] || forced) {
38351      // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable
38352      try {
38353        return redefine(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && Int8Array[KEY] || property);
38354      } catch (error) { /* empty */ }
38355    } else return;
38356  }
38357  for (ARRAY in TypedArrayConstructorsList) {
38358    TypedArrayConstructor = global[ARRAY];
38359    if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {
38360      redefine(TypedArrayConstructor, KEY, property);
38361    }
38362  }
38363};
38364
38365for (NAME in TypedArrayConstructorsList) {
38366  if (!global[NAME]) NATIVE_ARRAY_BUFFER_VIEWS = false;
38367}
38368
38369// WebKit bug - typed arrays constructors prototype is Object.prototype
38370if (!NATIVE_ARRAY_BUFFER_VIEWS || typeof TypedArray != 'function' || TypedArray === Function.prototype) {
38371  // eslint-disable-next-line no-shadow -- safe
38372  TypedArray = function TypedArray() {
38373    throw TypeError('Incorrect invocation');
38374  };
38375  if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
38376    if (global[NAME]) setPrototypeOf(global[NAME], TypedArray);
38377  }
38378}
38379
38380if (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) {
38381  TypedArrayPrototype = TypedArray.prototype;
38382  if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
38383    if (global[NAME]) setPrototypeOf(global[NAME].prototype, TypedArrayPrototype);
38384  }
38385}
38386
38387// WebKit bug - one more object in Uint8ClampedArray prototype chain
38388if (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {
38389  setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);
38390}
38391
38392if (DESCRIPTORS && !has(TypedArrayPrototype, TO_STRING_TAG)) {
38393  TYPED_ARRAY_TAG_REQIRED = true;
38394  defineProperty(TypedArrayPrototype, TO_STRING_TAG, { get: function () {
38395    return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;
38396  } });
38397  for (NAME in TypedArrayConstructorsList) if (global[NAME]) {
38398    createNonEnumerableProperty(global[NAME], TYPED_ARRAY_TAG, NAME);
38399  }
38400}
38401
38402module.exports = {
38403  NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,
38404  TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQIRED && TYPED_ARRAY_TAG,
38405  aTypedArray: aTypedArray,
38406  aTypedArrayConstructor: aTypedArrayConstructor,
38407  exportTypedArrayMethod: exportTypedArrayMethod,
38408  exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,
38409  isView: isView,
38410  isTypedArray: isTypedArray,
38411  TypedArray: TypedArray,
38412  TypedArrayPrototype: TypedArrayPrototype
38413};
38414
38415
38416/***/ }),
38417
38418/***/ 3331:
38419/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
38420
38421"use strict";
38422
38423var global = __webpack_require__(7854);
38424var DESCRIPTORS = __webpack_require__(9781);
38425var NATIVE_ARRAY_BUFFER = __webpack_require__(4019);
38426var createNonEnumerableProperty = __webpack_require__(8880);
38427var redefineAll = __webpack_require__(2248);
38428var fails = __webpack_require__(7293);
38429var anInstance = __webpack_require__(5787);
38430var toInteger = __webpack_require__(9958);
38431var toLength = __webpack_require__(7466);
38432var toIndex = __webpack_require__(7067);
38433var IEEE754 = __webpack_require__(1179);
38434var getPrototypeOf = __webpack_require__(9518);
38435var setPrototypeOf = __webpack_require__(7674);
38436var getOwnPropertyNames = __webpack_require__(8006).f;
38437var defineProperty = __webpack_require__(3070).f;
38438var arrayFill = __webpack_require__(1285);
38439var setToStringTag = __webpack_require__(8003);
38440var InternalStateModule = __webpack_require__(9909);
38441
38442var getInternalState = InternalStateModule.get;
38443var setInternalState = InternalStateModule.set;
38444var ARRAY_BUFFER = 'ArrayBuffer';
38445var DATA_VIEW = 'DataView';
38446var PROTOTYPE = 'prototype';
38447var WRONG_LENGTH = 'Wrong length';
38448var WRONG_INDEX = 'Wrong index';
38449var NativeArrayBuffer = global[ARRAY_BUFFER];
38450var $ArrayBuffer = NativeArrayBuffer;
38451var $DataView = global[DATA_VIEW];
38452var $DataViewPrototype = $DataView && $DataView[PROTOTYPE];
38453var ObjectPrototype = Object.prototype;
38454var RangeError = global.RangeError;
38455
38456var packIEEE754 = IEEE754.pack;
38457var unpackIEEE754 = IEEE754.unpack;
38458
38459var packInt8 = function (number) {
38460  return [number & 0xFF];
38461};
38462
38463var packInt16 = function (number) {
38464  return [number & 0xFF, number >> 8 & 0xFF];
38465};
38466
38467var packInt32 = function (number) {
38468  return [number & 0xFF, number >> 8 & 0xFF, number >> 16 & 0xFF, number >> 24 & 0xFF];
38469};
38470
38471var unpackInt32 = function (buffer) {
38472  return buffer[3] << 24 | buffer[2] << 16 | buffer[1] << 8 | buffer[0];
38473};
38474
38475var packFloat32 = function (number) {
38476  return packIEEE754(number, 23, 4);
38477};
38478
38479var packFloat64 = function (number) {
38480  return packIEEE754(number, 52, 8);
38481};
38482
38483var addGetter = function (Constructor, key) {
38484  defineProperty(Constructor[PROTOTYPE], key, { get: function () { return getInternalState(this)[key]; } });
38485};
38486
38487var get = function (view, count, index, isLittleEndian) {
38488  var intIndex = toIndex(index);
38489  var store = getInternalState(view);
38490  if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);
38491  var bytes = getInternalState(store.buffer).bytes;
38492  var start = intIndex + store.byteOffset;
38493  var pack = bytes.slice(start, start + count);
38494  return isLittleEndian ? pack : pack.reverse();
38495};
38496
38497var set = function (view, count, index, conversion, value, isLittleEndian) {
38498  var intIndex = toIndex(index);
38499  var store = getInternalState(view);
38500  if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);
38501  var bytes = getInternalState(store.buffer).bytes;
38502  var start = intIndex + store.byteOffset;
38503  var pack = conversion(+value);
38504  for (var i = 0; i < count; i++) bytes[start + i] = pack[isLittleEndian ? i : count - i - 1];
38505};
38506
38507if (!NATIVE_ARRAY_BUFFER) {
38508  $ArrayBuffer = function ArrayBuffer(length) {
38509    anInstance(this, $ArrayBuffer, ARRAY_BUFFER);
38510    var byteLength = toIndex(length);
38511    setInternalState(this, {
38512      bytes: arrayFill.call(new Array(byteLength), 0),
38513      byteLength: byteLength
38514    });
38515    if (!DESCRIPTORS) this.byteLength = byteLength;
38516  };
38517
38518  $DataView = function DataView(buffer, byteOffset, byteLength) {
38519    anInstance(this, $DataView, DATA_VIEW);
38520    anInstance(buffer, $ArrayBuffer, DATA_VIEW);
38521    var bufferLength = getInternalState(buffer).byteLength;
38522    var offset = toInteger(byteOffset);
38523    if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset');
38524    byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
38525    if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);
38526    setInternalState(this, {
38527      buffer: buffer,
38528      byteLength: byteLength,
38529      byteOffset: offset
38530    });
38531    if (!DESCRIPTORS) {
38532      this.buffer = buffer;
38533      this.byteLength = byteLength;
38534      this.byteOffset = offset;
38535    }
38536  };
38537
38538  if (DESCRIPTORS) {
38539    addGetter($ArrayBuffer, 'byteLength');
38540    addGetter($DataView, 'buffer');
38541    addGetter($DataView, 'byteLength');
38542    addGetter($DataView, 'byteOffset');
38543  }
38544
38545  redefineAll($DataView[PROTOTYPE], {
38546    getInt8: function getInt8(byteOffset) {
38547      return get(this, 1, byteOffset)[0] << 24 >> 24;
38548    },
38549    getUint8: function getUint8(byteOffset) {
38550      return get(this, 1, byteOffset)[0];
38551    },
38552    getInt16: function getInt16(byteOffset /* , littleEndian */) {
38553      var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);
38554      return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
38555    },
38556    getUint16: function getUint16(byteOffset /* , littleEndian */) {
38557      var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);
38558      return bytes[1] << 8 | bytes[0];
38559    },
38560    getInt32: function getInt32(byteOffset /* , littleEndian */) {
38561      return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined));
38562    },
38563    getUint32: function getUint32(byteOffset /* , littleEndian */) {
38564      return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)) >>> 0;
38565    },
38566    getFloat32: function getFloat32(byteOffset /* , littleEndian */) {
38567      return unpackIEEE754(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 23);
38568    },
38569    getFloat64: function getFloat64(byteOffset /* , littleEndian */) {
38570      return unpackIEEE754(get(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 52);
38571    },
38572    setInt8: function setInt8(byteOffset, value) {
38573      set(this, 1, byteOffset, packInt8, value);
38574    },
38575    setUint8: function setUint8(byteOffset, value) {
38576      set(this, 1, byteOffset, packInt8, value);
38577    },
38578    setInt16: function setInt16(byteOffset, value /* , littleEndian */) {
38579      set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);
38580    },
38581    setUint16: function setUint16(byteOffset, value /* , littleEndian */) {
38582      set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);
38583    },
38584    setInt32: function setInt32(byteOffset, value /* , littleEndian */) {
38585      set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);
38586    },
38587    setUint32: function setUint32(byteOffset, value /* , littleEndian */) {
38588      set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);
38589    },
38590    setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {
38591      set(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : undefined);
38592    },
38593    setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {
38594      set(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : undefined);
38595    }
38596  });
38597} else {
38598  /* eslint-disable no-new -- required for testing */
38599  if (!fails(function () {
38600    NativeArrayBuffer(1);
38601  }) || !fails(function () {
38602    new NativeArrayBuffer(-1);
38603  }) || fails(function () {
38604    new NativeArrayBuffer();
38605    new NativeArrayBuffer(1.5);
38606    new NativeArrayBuffer(NaN);
38607    return NativeArrayBuffer.name != ARRAY_BUFFER;
38608  })) {
38609  /* eslint-enable no-new -- required for testing */
38610    $ArrayBuffer = function ArrayBuffer(length) {
38611      anInstance(this, $ArrayBuffer);
38612      return new NativeArrayBuffer(toIndex(length));
38613    };
38614    var ArrayBufferPrototype = $ArrayBuffer[PROTOTYPE] = NativeArrayBuffer[PROTOTYPE];
38615    for (var keys = getOwnPropertyNames(NativeArrayBuffer), j = 0, key; keys.length > j;) {
38616      if (!((key = keys[j++]) in $ArrayBuffer)) {
38617        createNonEnumerableProperty($ArrayBuffer, key, NativeArrayBuffer[key]);
38618      }
38619    }
38620    ArrayBufferPrototype.constructor = $ArrayBuffer;
38621  }
38622
38623  // WebKit bug - the same parent prototype for typed arrays and data view
38624  if (setPrototypeOf && getPrototypeOf($DataViewPrototype) !== ObjectPrototype) {
38625    setPrototypeOf($DataViewPrototype, ObjectPrototype);
38626  }
38627
38628  // iOS Safari 7.x bug
38629  var testView = new $DataView(new $ArrayBuffer(2));
38630  var nativeSetInt8 = $DataViewPrototype.setInt8;
38631  testView.setInt8(0, 2147483648);
38632  testView.setInt8(1, 2147483649);
38633  if (testView.getInt8(0) || !testView.getInt8(1)) redefineAll($DataViewPrototype, {
38634    setInt8: function setInt8(byteOffset, value) {
38635      nativeSetInt8.call(this, byteOffset, value << 24 >> 24);
38636    },
38637    setUint8: function setUint8(byteOffset, value) {
38638      nativeSetInt8.call(this, byteOffset, value << 24 >> 24);
38639    }
38640  }, { unsafe: true });
38641}
38642
38643setToStringTag($ArrayBuffer, ARRAY_BUFFER);
38644setToStringTag($DataView, DATA_VIEW);
38645
38646module.exports = {
38647  ArrayBuffer: $ArrayBuffer,
38648  DataView: $DataView
38649};
38650
38651
38652/***/ }),
38653
38654/***/ 1048:
38655/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
38656
38657"use strict";
38658
38659var toObject = __webpack_require__(7908);
38660var toAbsoluteIndex = __webpack_require__(1400);
38661var toLength = __webpack_require__(7466);
38662
38663var min = Math.min;
38664
38665// `Array.prototype.copyWithin` method implementation
38666// https://tc39.es/ecma262/#sec-array.prototype.copywithin
38667module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
38668  var O = toObject(this);
38669  var len = toLength(O.length);
38670  var to = toAbsoluteIndex(target, len);
38671  var from = toAbsoluteIndex(start, len);
38672  var end = arguments.length > 2 ? arguments[2] : undefined;
38673  var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
38674  var inc = 1;
38675  if (from < to && to < from + count) {
38676    inc = -1;
38677    from += count - 1;
38678    to += count - 1;
38679  }
38680  while (count-- > 0) {
38681    if (from in O) O[to] = O[from];
38682    else delete O[to];
38683    to += inc;
38684    from += inc;
38685  } return O;
38686};
38687
38688
38689/***/ }),
38690
38691/***/ 1285:
38692/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
38693
38694"use strict";
38695
38696var toObject = __webpack_require__(7908);
38697var toAbsoluteIndex = __webpack_require__(1400);
38698var toLength = __webpack_require__(7466);
38699
38700// `Array.prototype.fill` method implementation
38701// https://tc39.es/ecma262/#sec-array.prototype.fill
38702module.exports = function fill(value /* , start = 0, end = @length */) {
38703  var O = toObject(this);
38704  var length = toLength(O.length);
38705  var argumentsLength = arguments.length;
38706  var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);
38707  var end = argumentsLength > 2 ? arguments[2] : undefined;
38708  var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
38709  while (endPos > index) O[index++] = value;
38710  return O;
38711};
38712
38713
38714/***/ }),
38715
38716/***/ 8533:
38717/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
38718
38719"use strict";
38720
38721var $forEach = __webpack_require__(2092).forEach;
38722var arrayMethodIsStrict = __webpack_require__(9341);
38723
38724var STRICT_METHOD = arrayMethodIsStrict('forEach');
38725
38726// `Array.prototype.forEach` method implementation
38727// https://tc39.es/ecma262/#sec-array.prototype.foreach
38728module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
38729  return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
38730} : [].forEach;
38731
38732
38733/***/ }),
38734
38735/***/ 8457:
38736/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
38737
38738"use strict";
38739
38740var bind = __webpack_require__(9974);
38741var toObject = __webpack_require__(7908);
38742var callWithSafeIterationClosing = __webpack_require__(3411);
38743var isArrayIteratorMethod = __webpack_require__(7659);
38744var toLength = __webpack_require__(7466);
38745var createProperty = __webpack_require__(6135);
38746var getIteratorMethod = __webpack_require__(1246);
38747
38748// `Array.from` method implementation
38749// https://tc39.es/ecma262/#sec-array.from
38750module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
38751  var O = toObject(arrayLike);
38752  var C = typeof this == 'function' ? this : Array;
38753  var argumentsLength = arguments.length;
38754  var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
38755  var mapping = mapfn !== undefined;
38756  var iteratorMethod = getIteratorMethod(O);
38757  var index = 0;
38758  var length, result, step, iterator, next, value;
38759  if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);
38760  // if the target is not iterable or it's an array with the default iterator - use a simple case
38761  if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {
38762    iterator = iteratorMethod.call(O);
38763    next = iterator.next;
38764    result = new C();
38765    for (;!(step = next.call(iterator)).done; index++) {
38766      value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
38767      createProperty(result, index, value);
38768    }
38769  } else {
38770    length = toLength(O.length);
38771    result = new C(length);
38772    for (;length > index; index++) {
38773      value = mapping ? mapfn(O[index], index) : O[index];
38774      createProperty(result, index, value);
38775    }
38776  }
38777  result.length = index;
38778  return result;
38779};
38780
38781
38782/***/ }),
38783
38784/***/ 1318:
38785/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
38786
38787var toIndexedObject = __webpack_require__(5656);
38788var toLength = __webpack_require__(7466);
38789var toAbsoluteIndex = __webpack_require__(1400);
38790
38791// `Array.prototype.{ indexOf, includes }` methods implementation
38792var createMethod = function (IS_INCLUDES) {
38793  return function ($this, el, fromIndex) {
38794    var O = toIndexedObject($this);
38795    var length = toLength(O.length);
38796    var index = toAbsoluteIndex(fromIndex, length);
38797    var value;
38798    // Array#includes uses SameValueZero equality algorithm
38799    // eslint-disable-next-line no-self-compare -- NaN check
38800    if (IS_INCLUDES && el != el) while (length > index) {
38801      value = O[index++];
38802      // eslint-disable-next-line no-self-compare -- NaN check
38803      if (value != value) return true;
38804    // Array#indexOf ignores holes, Array#includes - not
38805    } else for (;length > index; index++) {
38806      if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
38807    } return !IS_INCLUDES && -1;
38808  };
38809};
38810
38811module.exports = {
38812  // `Array.prototype.includes` method
38813  // https://tc39.es/ecma262/#sec-array.prototype.includes
38814  includes: createMethod(true),
38815  // `Array.prototype.indexOf` method
38816  // https://tc39.es/ecma262/#sec-array.prototype.indexof
38817  indexOf: createMethod(false)
38818};
38819
38820
38821/***/ }),
38822
38823/***/ 2092:
38824/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
38825
38826var bind = __webpack_require__(9974);
38827var IndexedObject = __webpack_require__(8361);
38828var toObject = __webpack_require__(7908);
38829var toLength = __webpack_require__(7466);
38830var arraySpeciesCreate = __webpack_require__(5417);
38831
38832var push = [].push;
38833
38834// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation
38835var createMethod = function (TYPE) {
38836  var IS_MAP = TYPE == 1;
38837  var IS_FILTER = TYPE == 2;
38838  var IS_SOME = TYPE == 3;
38839  var IS_EVERY = TYPE == 4;
38840  var IS_FIND_INDEX = TYPE == 6;
38841  var IS_FILTER_OUT = TYPE == 7;
38842  var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
38843  return function ($this, callbackfn, that, specificCreate) {
38844    var O = toObject($this);
38845    var self = IndexedObject(O);
38846    var boundFunction = bind(callbackfn, that, 3);
38847    var length = toLength(self.length);
38848    var index = 0;
38849    var create = specificCreate || arraySpeciesCreate;
38850    var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;
38851    var value, result;
38852    for (;length > index; index++) if (NO_HOLES || index in self) {
38853      value = self[index];
38854      result = boundFunction(value, index, O);
38855      if (TYPE) {
38856        if (IS_MAP) target[index] = result; // map
38857        else if (result) switch (TYPE) {
38858          case 3: return true;              // some
38859          case 5: return value;             // find
38860          case 6: return index;             // findIndex
38861          case 2: push.call(target, value); // filter
38862        } else switch (TYPE) {
38863          case 4: return false;             // every
38864          case 7: push.call(target, value); // filterOut
38865        }
38866      }
38867    }
38868    return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
38869  };
38870};
38871
38872module.exports = {
38873  // `Array.prototype.forEach` method
38874  // https://tc39.es/ecma262/#sec-array.prototype.foreach
38875  forEach: createMethod(0),
38876  // `Array.prototype.map` method
38877  // https://tc39.es/ecma262/#sec-array.prototype.map
38878  map: createMethod(1),
38879  // `Array.prototype.filter` method
38880  // https://tc39.es/ecma262/#sec-array.prototype.filter
38881  filter: createMethod(2),
38882  // `Array.prototype.some` method
38883  // https://tc39.es/ecma262/#sec-array.prototype.some
38884  some: createMethod(3),
38885  // `Array.prototype.every` method
38886  // https://tc39.es/ecma262/#sec-array.prototype.every
38887  every: createMethod(4),
38888  // `Array.prototype.find` method
38889  // https://tc39.es/ecma262/#sec-array.prototype.find
38890  find: createMethod(5),
38891  // `Array.prototype.findIndex` method
38892  // https://tc39.es/ecma262/#sec-array.prototype.findIndex
38893  findIndex: createMethod(6),
38894  // `Array.prototype.filterOut` method
38895  // https://github.com/tc39/proposal-array-filtering
38896  filterOut: createMethod(7)
38897};
38898
38899
38900/***/ }),
38901
38902/***/ 6583:
38903/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
38904
38905"use strict";
38906
38907var toIndexedObject = __webpack_require__(5656);
38908var toInteger = __webpack_require__(9958);
38909var toLength = __webpack_require__(7466);
38910var arrayMethodIsStrict = __webpack_require__(9341);
38911
38912var min = Math.min;
38913var nativeLastIndexOf = [].lastIndexOf;
38914var NEGATIVE_ZERO = !!nativeLastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;
38915var STRICT_METHOD = arrayMethodIsStrict('lastIndexOf');
38916var FORCED = NEGATIVE_ZERO || !STRICT_METHOD;
38917
38918// `Array.prototype.lastIndexOf` method implementation
38919// https://tc39.es/ecma262/#sec-array.prototype.lastindexof
38920module.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
38921  // convert -0 to +0
38922  if (NEGATIVE_ZERO) return nativeLastIndexOf.apply(this, arguments) || 0;
38923  var O = toIndexedObject(this);
38924  var length = toLength(O.length);
38925  var index = length - 1;
38926  if (arguments.length > 1) index = min(index, toInteger(arguments[1]));
38927  if (index < 0) index = length + index;
38928  for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;
38929  return -1;
38930} : nativeLastIndexOf;
38931
38932
38933/***/ }),
38934
38935/***/ 1194:
38936/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
38937
38938var fails = __webpack_require__(7293);
38939var wellKnownSymbol = __webpack_require__(5112);
38940var V8_VERSION = __webpack_require__(7392);
38941
38942var SPECIES = wellKnownSymbol('species');
38943
38944module.exports = function (METHOD_NAME) {
38945  // We can't use this feature detection in V8 since it causes
38946  // deoptimization and serious performance degradation
38947  // https://github.com/zloirock/core-js/issues/677
38948  return V8_VERSION >= 51 || !fails(function () {
38949    var array = [];
38950    var constructor = array.constructor = {};
38951    constructor[SPECIES] = function () {
38952      return { foo: 1 };
38953    };
38954    return array[METHOD_NAME](Boolean).foo !== 1;
38955  });
38956};
38957
38958
38959/***/ }),
38960
38961/***/ 9341:
38962/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
38963
38964"use strict";
38965
38966var fails = __webpack_require__(7293);
38967
38968module.exports = function (METHOD_NAME, argument) {
38969  var method = [][METHOD_NAME];
38970  return !!method && fails(function () {
38971    // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing
38972    method.call(null, argument || function () { throw 1; }, 1);
38973  });
38974};
38975
38976
38977/***/ }),
38978
38979/***/ 3671:
38980/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
38981
38982var aFunction = __webpack_require__(3099);
38983var toObject = __webpack_require__(7908);
38984var IndexedObject = __webpack_require__(8361);
38985var toLength = __webpack_require__(7466);
38986
38987// `Array.prototype.{ reduce, reduceRight }` methods implementation
38988var createMethod = function (IS_RIGHT) {
38989  return function (that, callbackfn, argumentsLength, memo) {
38990    aFunction(callbackfn);
38991    var O = toObject(that);
38992    var self = IndexedObject(O);
38993    var length = toLength(O.length);
38994    var index = IS_RIGHT ? length - 1 : 0;
38995    var i = IS_RIGHT ? -1 : 1;
38996    if (argumentsLength < 2) while (true) {
38997      if (index in self) {
38998        memo = self[index];
38999        index += i;
39000        break;
39001      }
39002      index += i;
39003      if (IS_RIGHT ? index < 0 : length <= index) {
39004        throw TypeError('Reduce of empty array with no initial value');
39005      }
39006    }
39007    for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
39008      memo = callbackfn(memo, self[index], index, O);
39009    }
39010    return memo;
39011  };
39012};
39013
39014module.exports = {
39015  // `Array.prototype.reduce` method
39016  // https://tc39.es/ecma262/#sec-array.prototype.reduce
39017  left: createMethod(false),
39018  // `Array.prototype.reduceRight` method
39019  // https://tc39.es/ecma262/#sec-array.prototype.reduceright
39020  right: createMethod(true)
39021};
39022
39023
39024/***/ }),
39025
39026/***/ 5417:
39027/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
39028
39029var isObject = __webpack_require__(111);
39030var isArray = __webpack_require__(3157);
39031var wellKnownSymbol = __webpack_require__(5112);
39032
39033var SPECIES = wellKnownSymbol('species');
39034
39035// `ArraySpeciesCreate` abstract operation
39036// https://tc39.es/ecma262/#sec-arrayspeciescreate
39037module.exports = function (originalArray, length) {
39038  var C;
39039  if (isArray(originalArray)) {
39040    C = originalArray.constructor;
39041    // cross-realm fallback
39042    if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
39043    else if (isObject(C)) {
39044      C = C[SPECIES];
39045      if (C === null) C = undefined;
39046    }
39047  } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
39048};
39049
39050
39051/***/ }),
39052
39053/***/ 3411:
39054/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
39055
39056var anObject = __webpack_require__(9670);
39057var iteratorClose = __webpack_require__(9212);
39058
39059// call something on iterator step with safe closing on error
39060module.exports = function (iterator, fn, value, ENTRIES) {
39061  try {
39062    return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
39063  // 7.4.6 IteratorClose(iterator, completion)
39064  } catch (error) {
39065    iteratorClose(iterator);
39066    throw error;
39067  }
39068};
39069
39070
39071/***/ }),
39072
39073/***/ 7072:
39074/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
39075
39076var wellKnownSymbol = __webpack_require__(5112);
39077
39078var ITERATOR = wellKnownSymbol('iterator');
39079var SAFE_CLOSING = false;
39080
39081try {
39082  var called = 0;
39083  var iteratorWithReturn = {
39084    next: function () {
39085      return { done: !!called++ };
39086    },
39087    'return': function () {
39088      SAFE_CLOSING = true;
39089    }
39090  };
39091  iteratorWithReturn[ITERATOR] = function () {
39092    return this;
39093  };
39094  // eslint-disable-next-line no-throw-literal -- required for testing
39095  Array.from(iteratorWithReturn, function () { throw 2; });
39096} catch (error) { /* empty */ }
39097
39098module.exports = function (exec, SKIP_CLOSING) {
39099  if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
39100  var ITERATION_SUPPORT = false;
39101  try {
39102    var object = {};
39103    object[ITERATOR] = function () {
39104      return {
39105        next: function () {
39106          return { done: ITERATION_SUPPORT = true };
39107        }
39108      };
39109    };
39110    exec(object);
39111  } catch (error) { /* empty */ }
39112  return ITERATION_SUPPORT;
39113};
39114
39115
39116/***/ }),
39117
39118/***/ 4326:
39119/***/ (function(module) {
39120
39121var toString = {}.toString;
39122
39123module.exports = function (it) {
39124  return toString.call(it).slice(8, -1);
39125};
39126
39127
39128/***/ }),
39129
39130/***/ 648:
39131/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
39132
39133var TO_STRING_TAG_SUPPORT = __webpack_require__(1694);
39134var classofRaw = __webpack_require__(4326);
39135var wellKnownSymbol = __webpack_require__(5112);
39136
39137var TO_STRING_TAG = wellKnownSymbol('toStringTag');
39138// ES3 wrong here
39139var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
39140
39141// fallback for IE11 Script Access Denied error
39142var tryGet = function (it, key) {
39143  try {
39144    return it[key];
39145  } catch (error) { /* empty */ }
39146};
39147
39148// getting tag from ES6+ `Object.prototype.toString`
39149module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
39150  var O, tag, result;
39151  return it === undefined ? 'Undefined' : it === null ? 'Null'
39152    // @@toStringTag case
39153    : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
39154    // builtinTag case
39155    : CORRECT_ARGUMENTS ? classofRaw(O)
39156    // ES3 arguments fallback
39157    : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
39158};
39159
39160
39161/***/ }),
39162
39163/***/ 9920:
39164/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
39165
39166var has = __webpack_require__(6656);
39167var ownKeys = __webpack_require__(3887);
39168var getOwnPropertyDescriptorModule = __webpack_require__(1236);
39169var definePropertyModule = __webpack_require__(3070);
39170
39171module.exports = function (target, source) {
39172  var keys = ownKeys(source);
39173  var defineProperty = definePropertyModule.f;
39174  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
39175  for (var i = 0; i < keys.length; i++) {
39176    var key = keys[i];
39177    if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
39178  }
39179};
39180
39181
39182/***/ }),
39183
39184/***/ 8544:
39185/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
39186
39187var fails = __webpack_require__(7293);
39188
39189module.exports = !fails(function () {
39190  function F() { /* empty */ }
39191  F.prototype.constructor = null;
39192  return Object.getPrototypeOf(new F()) !== F.prototype;
39193});
39194
39195
39196/***/ }),
39197
39198/***/ 4994:
39199/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
39200
39201"use strict";
39202
39203var IteratorPrototype = __webpack_require__(3383).IteratorPrototype;
39204var create = __webpack_require__(30);
39205var createPropertyDescriptor = __webpack_require__(9114);
39206var setToStringTag = __webpack_require__(8003);
39207var Iterators = __webpack_require__(7497);
39208
39209var returnThis = function () { return this; };
39210
39211module.exports = function (IteratorConstructor, NAME, next) {
39212  var TO_STRING_TAG = NAME + ' Iterator';
39213  IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });
39214  setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
39215  Iterators[TO_STRING_TAG] = returnThis;
39216  return IteratorConstructor;
39217};
39218
39219
39220/***/ }),
39221
39222/***/ 8880:
39223/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
39224
39225var DESCRIPTORS = __webpack_require__(9781);
39226var definePropertyModule = __webpack_require__(3070);
39227var createPropertyDescriptor = __webpack_require__(9114);
39228
39229module.exports = DESCRIPTORS ? function (object, key, value) {
39230  return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
39231} : function (object, key, value) {
39232  object[key] = value;
39233  return object;
39234};
39235
39236
39237/***/ }),
39238
39239/***/ 9114:
39240/***/ (function(module) {
39241
39242module.exports = function (bitmap, value) {
39243  return {
39244    enumerable: !(bitmap & 1),
39245    configurable: !(bitmap & 2),
39246    writable: !(bitmap & 4),
39247    value: value
39248  };
39249};
39250
39251
39252/***/ }),
39253
39254/***/ 6135:
39255/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
39256
39257"use strict";
39258
39259var toPrimitive = __webpack_require__(7593);
39260var definePropertyModule = __webpack_require__(3070);
39261var createPropertyDescriptor = __webpack_require__(9114);
39262
39263module.exports = function (object, key, value) {
39264  var propertyKey = toPrimitive(key);
39265  if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
39266  else object[propertyKey] = value;
39267};
39268
39269
39270/***/ }),
39271
39272/***/ 654:
39273/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
39274
39275"use strict";
39276
39277var $ = __webpack_require__(2109);
39278var createIteratorConstructor = __webpack_require__(4994);
39279var getPrototypeOf = __webpack_require__(9518);
39280var setPrototypeOf = __webpack_require__(7674);
39281var setToStringTag = __webpack_require__(8003);
39282var createNonEnumerableProperty = __webpack_require__(8880);
39283var redefine = __webpack_require__(1320);
39284var wellKnownSymbol = __webpack_require__(5112);
39285var IS_PURE = __webpack_require__(1913);
39286var Iterators = __webpack_require__(7497);
39287var IteratorsCore = __webpack_require__(3383);
39288
39289var IteratorPrototype = IteratorsCore.IteratorPrototype;
39290var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
39291var ITERATOR = wellKnownSymbol('iterator');
39292var KEYS = 'keys';
39293var VALUES = 'values';
39294var ENTRIES = 'entries';
39295
39296var returnThis = function () { return this; };
39297
39298module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
39299  createIteratorConstructor(IteratorConstructor, NAME, next);
39300
39301  var getIterationMethod = function (KIND) {
39302    if (KIND === DEFAULT && defaultIterator) return defaultIterator;
39303    if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
39304    switch (KIND) {
39305      case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
39306      case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
39307      case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
39308    } return function () { return new IteratorConstructor(this); };
39309  };
39310
39311  var TO_STRING_TAG = NAME + ' Iterator';
39312  var INCORRECT_VALUES_NAME = false;
39313  var IterablePrototype = Iterable.prototype;
39314  var nativeIterator = IterablePrototype[ITERATOR]
39315    || IterablePrototype['@@iterator']
39316    || DEFAULT && IterablePrototype[DEFAULT];
39317  var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
39318  var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
39319  var CurrentIteratorPrototype, methods, KEY;
39320
39321  // fix native
39322  if (anyNativeIterator) {
39323    CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
39324    if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
39325      if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
39326        if (setPrototypeOf) {
39327          setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
39328        } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {
39329          createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);
39330        }
39331      }
39332      // Set @@toStringTag to native iterators
39333      setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
39334      if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;
39335    }
39336  }
39337
39338  // fix Array#{values, @@iterator}.name in V8 / FF
39339  if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
39340    INCORRECT_VALUES_NAME = true;
39341    defaultIterator = function values() { return nativeIterator.call(this); };
39342  }
39343
39344  // define iterator
39345  if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
39346    createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);
39347  }
39348  Iterators[NAME] = defaultIterator;
39349
39350  // export additional methods
39351  if (DEFAULT) {
39352    methods = {
39353      values: getIterationMethod(VALUES),
39354      keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
39355      entries: getIterationMethod(ENTRIES)
39356    };
39357    if (FORCED) for (KEY in methods) {
39358      if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
39359        redefine(IterablePrototype, KEY, methods[KEY]);
39360      }
39361    } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
39362  }
39363
39364  return methods;
39365};
39366
39367
39368/***/ }),
39369
39370/***/ 9781:
39371/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
39372
39373var fails = __webpack_require__(7293);
39374
39375// Detect IE8's incomplete defineProperty implementation
39376module.exports = !fails(function () {
39377  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
39378});
39379
39380
39381/***/ }),
39382
39383/***/ 317:
39384/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
39385
39386var global = __webpack_require__(7854);
39387var isObject = __webpack_require__(111);
39388
39389var document = global.document;
39390// typeof document.createElement is 'object' in old IE
39391var EXISTS = isObject(document) && isObject(document.createElement);
39392
39393module.exports = function (it) {
39394  return EXISTS ? document.createElement(it) : {};
39395};
39396
39397
39398/***/ }),
39399
39400/***/ 8324:
39401/***/ (function(module) {
39402
39403// iterable DOM collections
39404// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
39405module.exports = {
39406  CSSRuleList: 0,
39407  CSSStyleDeclaration: 0,
39408  CSSValueList: 0,
39409  ClientRectList: 0,
39410  DOMRectList: 0,
39411  DOMStringList: 0,
39412  DOMTokenList: 1,
39413  DataTransferItemList: 0,
39414  FileList: 0,
39415  HTMLAllCollection: 0,
39416  HTMLCollection: 0,
39417  HTMLFormElement: 0,
39418  HTMLSelectElement: 0,
39419  MediaList: 0,
39420  MimeTypeArray: 0,
39421  NamedNodeMap: 0,
39422  NodeList: 1,
39423  PaintRequestList: 0,
39424  Plugin: 0,
39425  PluginArray: 0,
39426  SVGLengthList: 0,
39427  SVGNumberList: 0,
39428  SVGPathSegList: 0,
39429  SVGPointList: 0,
39430  SVGStringList: 0,
39431  SVGTransformList: 0,
39432  SourceBufferList: 0,
39433  StyleSheetList: 0,
39434  TextTrackCueList: 0,
39435  TextTrackList: 0,
39436  TouchList: 0
39437};
39438
39439
39440/***/ }),
39441
39442/***/ 8113:
39443/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
39444
39445var getBuiltIn = __webpack_require__(5005);
39446
39447module.exports = getBuiltIn('navigator', 'userAgent') || '';
39448
39449
39450/***/ }),
39451
39452/***/ 7392:
39453/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
39454
39455var global = __webpack_require__(7854);
39456var userAgent = __webpack_require__(8113);
39457
39458var process = global.process;
39459var versions = process && process.versions;
39460var v8 = versions && versions.v8;
39461var match, version;
39462
39463if (v8) {
39464  match = v8.split('.');
39465  version = match[0] + match[1];
39466} else if (userAgent) {
39467  match = userAgent.match(/Edge\/(\d+)/);
39468  if (!match || match[1] >= 74) {
39469    match = userAgent.match(/Chrome\/(\d+)/);
39470    if (match) version = match[1];
39471  }
39472}
39473
39474module.exports = version && +version;
39475
39476
39477/***/ }),
39478
39479/***/ 748:
39480/***/ (function(module) {
39481
39482// IE8- don't enum bug keys
39483module.exports = [
39484  'constructor',
39485  'hasOwnProperty',
39486  'isPrototypeOf',
39487  'propertyIsEnumerable',
39488  'toLocaleString',
39489  'toString',
39490  'valueOf'
39491];
39492
39493
39494/***/ }),
39495
39496/***/ 2109:
39497/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
39498
39499var global = __webpack_require__(7854);
39500var getOwnPropertyDescriptor = __webpack_require__(1236).f;
39501var createNonEnumerableProperty = __webpack_require__(8880);
39502var redefine = __webpack_require__(1320);
39503var setGlobal = __webpack_require__(3505);
39504var copyConstructorProperties = __webpack_require__(9920);
39505var isForced = __webpack_require__(4705);
39506
39507/*
39508  options.target      - name of the target object
39509  options.global      - target is the global object
39510  options.stat        - export as static methods of target
39511  options.proto       - export as prototype methods of target
39512  options.real        - real prototype method for the `pure` version
39513  options.forced      - export even if the native feature is available
39514  options.bind        - bind methods to the target, required for the `pure` version
39515  options.wrap        - wrap constructors to preventing global pollution, required for the `pure` version
39516  options.unsafe      - use the simple assignment of property instead of delete + defineProperty
39517  options.sham        - add a flag to not completely full polyfills
39518  options.enumerable  - export as enumerable property
39519  options.noTargetGet - prevent calling a getter on target
39520*/
39521module.exports = function (options, source) {
39522  var TARGET = options.target;
39523  var GLOBAL = options.global;
39524  var STATIC = options.stat;
39525  var FORCED, target, key, targetProperty, sourceProperty, descriptor;
39526  if (GLOBAL) {
39527    target = global;
39528  } else if (STATIC) {
39529    target = global[TARGET] || setGlobal(TARGET, {});
39530  } else {
39531    target = (global[TARGET] || {}).prototype;
39532  }
39533  if (target) for (key in source) {
39534    sourceProperty = source[key];
39535    if (options.noTargetGet) {
39536      descriptor = getOwnPropertyDescriptor(target, key);
39537      targetProperty = descriptor && descriptor.value;
39538    } else targetProperty = target[key];
39539    FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
39540    // contained in target
39541    if (!FORCED && targetProperty !== undefined) {
39542      if (typeof sourceProperty === typeof targetProperty) continue;
39543      copyConstructorProperties(sourceProperty, targetProperty);
39544    }
39545    // add a flag to not completely full polyfills
39546    if (options.sham || (targetProperty && targetProperty.sham)) {
39547      createNonEnumerableProperty(sourceProperty, 'sham', true);
39548    }
39549    // extend global
39550    redefine(target, key, sourceProperty, options);
39551  }
39552};
39553
39554
39555/***/ }),
39556
39557/***/ 7293:
39558/***/ (function(module) {
39559
39560module.exports = function (exec) {
39561  try {
39562    return !!exec();
39563  } catch (error) {
39564    return true;
39565  }
39566};
39567
39568
39569/***/ }),
39570
39571/***/ 7007:
39572/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
39573
39574"use strict";
39575
39576// TODO: Remove from `core-js@4` since it's moved to entry points
39577__webpack_require__(4916);
39578var redefine = __webpack_require__(1320);
39579var fails = __webpack_require__(7293);
39580var wellKnownSymbol = __webpack_require__(5112);
39581var regexpExec = __webpack_require__(2261);
39582var createNonEnumerableProperty = __webpack_require__(8880);
39583
39584var SPECIES = wellKnownSymbol('species');
39585
39586var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
39587  // #replace needs built-in support for named groups.
39588  // #match works fine because it just return the exec results, even if it has
39589  // a "grops" property.
39590  var re = /./;
39591  re.exec = function () {
39592    var result = [];
39593    result.groups = { a: '7' };
39594    return result;
39595  };
39596  return ''.replace(re, '$<a>') !== '7';
39597});
39598
39599// IE <= 11 replaces $0 with the whole match, as if it was $&
39600// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
39601var REPLACE_KEEPS_$0 = (function () {
39602  return 'a'.replace(/./, '$0') === '$0';
39603})();
39604
39605var REPLACE = wellKnownSymbol('replace');
39606// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
39607var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
39608  if (/./[REPLACE]) {
39609    return /./[REPLACE]('a', '$0') === '';
39610  }
39611  return false;
39612})();
39613
39614// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
39615// Weex JS has frozen built-in prototypes, so use try / catch wrapper
39616var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
39617  // eslint-disable-next-line regexp/no-empty-group -- required for testing
39618  var re = /(?:)/;
39619  var originalExec = re.exec;
39620  re.exec = function () { return originalExec.apply(this, arguments); };
39621  var result = 'ab'.split(re);
39622  return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
39623});
39624
39625module.exports = function (KEY, length, exec, sham) {
39626  var SYMBOL = wellKnownSymbol(KEY);
39627
39628  var DELEGATES_TO_SYMBOL = !fails(function () {
39629    // String methods call symbol-named RegEp methods
39630    var O = {};
39631    O[SYMBOL] = function () { return 7; };
39632    return ''[KEY](O) != 7;
39633  });
39634
39635  var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
39636    // Symbol-named RegExp methods call .exec
39637    var execCalled = false;
39638    var re = /a/;
39639
39640    if (KEY === 'split') {
39641      // We can't use real regex here since it causes deoptimization
39642      // and serious performance degradation in V8
39643      // https://github.com/zloirock/core-js/issues/306
39644      re = {};
39645      // RegExp[@@split] doesn't call the regex's exec method, but first creates
39646      // a new one. We need to return the patched regex when creating the new one.
39647      re.constructor = {};
39648      re.constructor[SPECIES] = function () { return re; };
39649      re.flags = '';
39650      re[SYMBOL] = /./[SYMBOL];
39651    }
39652
39653    re.exec = function () { execCalled = true; return null; };
39654
39655    re[SYMBOL]('');
39656    return !execCalled;
39657  });
39658
39659  if (
39660    !DELEGATES_TO_SYMBOL ||
39661    !DELEGATES_TO_EXEC ||
39662    (KEY === 'replace' && !(
39663      REPLACE_SUPPORTS_NAMED_GROUPS &&
39664      REPLACE_KEEPS_$0 &&
39665      !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
39666    )) ||
39667    (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
39668  ) {
39669    var nativeRegExpMethod = /./[SYMBOL];
39670    var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
39671      if (regexp.exec === regexpExec) {
39672        if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
39673          // The native String method already delegates to @@method (this
39674          // polyfilled function), leasing to infinite recursion.
39675          // We avoid it by directly calling the native @@method method.
39676          return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
39677        }
39678        return { done: true, value: nativeMethod.call(str, regexp, arg2) };
39679      }
39680      return { done: false };
39681    }, {
39682      REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,
39683      REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
39684    });
39685    var stringMethod = methods[0];
39686    var regexMethod = methods[1];
39687
39688    redefine(String.prototype, KEY, stringMethod);
39689    redefine(RegExp.prototype, SYMBOL, length == 2
39690      // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
39691      // 21.2.5.11 RegExp.prototype[@@split](string, limit)
39692      ? function (string, arg) { return regexMethod.call(string, this, arg); }
39693      // 21.2.5.6 RegExp.prototype[@@match](string)
39694      // 21.2.5.9 RegExp.prototype[@@search](string)
39695      : function (string) { return regexMethod.call(string, this); }
39696    );
39697  }
39698
39699  if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
39700};
39701
39702
39703/***/ }),
39704
39705/***/ 9974:
39706/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
39707
39708var aFunction = __webpack_require__(3099);
39709
39710// optional / simple context binding
39711module.exports = function (fn, that, length) {
39712  aFunction(fn);
39713  if (that === undefined) return fn;
39714  switch (length) {
39715    case 0: return function () {
39716      return fn.call(that);
39717    };
39718    case 1: return function (a) {
39719      return fn.call(that, a);
39720    };
39721    case 2: return function (a, b) {
39722      return fn.call(that, a, b);
39723    };
39724    case 3: return function (a, b, c) {
39725      return fn.call(that, a, b, c);
39726    };
39727  }
39728  return function (/* ...args */) {
39729    return fn.apply(that, arguments);
39730  };
39731};
39732
39733
39734/***/ }),
39735
39736/***/ 5005:
39737/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
39738
39739var path = __webpack_require__(857);
39740var global = __webpack_require__(7854);
39741
39742var aFunction = function (variable) {
39743  return typeof variable == 'function' ? variable : undefined;
39744};
39745
39746module.exports = function (namespace, method) {
39747  return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])
39748    : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];
39749};
39750
39751
39752/***/ }),
39753
39754/***/ 1246:
39755/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
39756
39757var classof = __webpack_require__(648);
39758var Iterators = __webpack_require__(7497);
39759var wellKnownSymbol = __webpack_require__(5112);
39760
39761var ITERATOR = wellKnownSymbol('iterator');
39762
39763module.exports = function (it) {
39764  if (it != undefined) return it[ITERATOR]
39765    || it['@@iterator']
39766    || Iterators[classof(it)];
39767};
39768
39769
39770/***/ }),
39771
39772/***/ 8554:
39773/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
39774
39775var anObject = __webpack_require__(9670);
39776var getIteratorMethod = __webpack_require__(1246);
39777
39778module.exports = function (it) {
39779  var iteratorMethod = getIteratorMethod(it);
39780  if (typeof iteratorMethod != 'function') {
39781    throw TypeError(String(it) + ' is not iterable');
39782  } return anObject(iteratorMethod.call(it));
39783};
39784
39785
39786/***/ }),
39787
39788/***/ 647:
39789/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
39790
39791var toObject = __webpack_require__(7908);
39792
39793var floor = Math.floor;
39794var replace = ''.replace;
39795var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g;
39796var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g;
39797
39798// https://tc39.es/ecma262/#sec-getsubstitution
39799module.exports = function (matched, str, position, captures, namedCaptures, replacement) {
39800  var tailPos = position + matched.length;
39801  var m = captures.length;
39802  var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
39803  if (namedCaptures !== undefined) {
39804    namedCaptures = toObject(namedCaptures);
39805    symbols = SUBSTITUTION_SYMBOLS;
39806  }
39807  return replace.call(replacement, symbols, function (match, ch) {
39808    var capture;
39809    switch (ch.charAt(0)) {
39810      case '$': return '$';
39811      case '&': return matched;
39812      case '`': return str.slice(0, position);
39813      case "'": return str.slice(tailPos);
39814      case '<':
39815        capture = namedCaptures[ch.slice(1, -1)];
39816        break;
39817      default: // \d\d?
39818        var n = +ch;
39819        if (n === 0) return match;
39820        if (n > m) {
39821          var f = floor(n / 10);
39822          if (f === 0) return match;
39823          if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
39824          return match;
39825        }
39826        capture = captures[n - 1];
39827    }
39828    return capture === undefined ? '' : capture;
39829  });
39830};
39831
39832
39833/***/ }),
39834
39835/***/ 7854:
39836/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
39837
39838var check = function (it) {
39839  return it && it.Math == Math && it;
39840};
39841
39842// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
39843module.exports =
39844  /* global globalThis -- safe */
39845  check(typeof globalThis == 'object' && globalThis) ||
39846  check(typeof window == 'object' && window) ||
39847  check(typeof self == 'object' && self) ||
39848  check(typeof __webpack_require__.g == 'object' && __webpack_require__.g) ||
39849  // eslint-disable-next-line no-new-func -- fallback
39850  (function () { return this; })() || Function('return this')();
39851
39852
39853/***/ }),
39854
39855/***/ 6656:
39856/***/ (function(module) {
39857
39858var hasOwnProperty = {}.hasOwnProperty;
39859
39860module.exports = function (it, key) {
39861  return hasOwnProperty.call(it, key);
39862};
39863
39864
39865/***/ }),
39866
39867/***/ 3501:
39868/***/ (function(module) {
39869
39870module.exports = {};
39871
39872
39873/***/ }),
39874
39875/***/ 490:
39876/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
39877
39878var getBuiltIn = __webpack_require__(5005);
39879
39880module.exports = getBuiltIn('document', 'documentElement');
39881
39882
39883/***/ }),
39884
39885/***/ 4664:
39886/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
39887
39888var DESCRIPTORS = __webpack_require__(9781);
39889var fails = __webpack_require__(7293);
39890var createElement = __webpack_require__(317);
39891
39892// Thank's IE8 for his funny defineProperty
39893module.exports = !DESCRIPTORS && !fails(function () {
39894  return Object.defineProperty(createElement('div'), 'a', {
39895    get: function () { return 7; }
39896  }).a != 7;
39897});
39898
39899
39900/***/ }),
39901
39902/***/ 1179:
39903/***/ (function(module) {
39904
39905// IEEE754 conversions based on https://github.com/feross/ieee754
39906var abs = Math.abs;
39907var pow = Math.pow;
39908var floor = Math.floor;
39909var log = Math.log;
39910var LN2 = Math.LN2;
39911
39912var pack = function (number, mantissaLength, bytes) {
39913  var buffer = new Array(bytes);
39914  var exponentLength = bytes * 8 - mantissaLength - 1;
39915  var eMax = (1 << exponentLength) - 1;
39916  var eBias = eMax >> 1;
39917  var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0;
39918  var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0;
39919  var index = 0;
39920  var exponent, mantissa, c;
39921  number = abs(number);
39922  // eslint-disable-next-line no-self-compare -- NaN check
39923  if (number != number || number === Infinity) {
39924    // eslint-disable-next-line no-self-compare -- NaN check
39925    mantissa = number != number ? 1 : 0;
39926    exponent = eMax;
39927  } else {
39928    exponent = floor(log(number) / LN2);
39929    if (number * (c = pow(2, -exponent)) < 1) {
39930      exponent--;
39931      c *= 2;
39932    }
39933    if (exponent + eBias >= 1) {
39934      number += rt / c;
39935    } else {
39936      number += rt * pow(2, 1 - eBias);
39937    }
39938    if (number * c >= 2) {
39939      exponent++;
39940      c /= 2;
39941    }
39942    if (exponent + eBias >= eMax) {
39943      mantissa = 0;
39944      exponent = eMax;
39945    } else if (exponent + eBias >= 1) {
39946      mantissa = (number * c - 1) * pow(2, mantissaLength);
39947      exponent = exponent + eBias;
39948    } else {
39949      mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength);
39950      exponent = 0;
39951    }
39952  }
39953  for (; mantissaLength >= 8; buffer[index++] = mantissa & 255, mantissa /= 256, mantissaLength -= 8);
39954  exponent = exponent << mantissaLength | mantissa;
39955  exponentLength += mantissaLength;
39956  for (; exponentLength > 0; buffer[index++] = exponent & 255, exponent /= 256, exponentLength -= 8);
39957  buffer[--index] |= sign * 128;
39958  return buffer;
39959};
39960
39961var unpack = function (buffer, mantissaLength) {
39962  var bytes = buffer.length;
39963  var exponentLength = bytes * 8 - mantissaLength - 1;
39964  var eMax = (1 << exponentLength) - 1;
39965  var eBias = eMax >> 1;
39966  var nBits = exponentLength - 7;
39967  var index = bytes - 1;
39968  var sign = buffer[index--];
39969  var exponent = sign & 127;
39970  var mantissa;
39971  sign >>= 7;
39972  for (; nBits > 0; exponent = exponent * 256 + buffer[index], index--, nBits -= 8);
39973  mantissa = exponent & (1 << -nBits) - 1;
39974  exponent >>= -nBits;
39975  nBits += mantissaLength;
39976  for (; nBits > 0; mantissa = mantissa * 256 + buffer[index], index--, nBits -= 8);
39977  if (exponent === 0) {
39978    exponent = 1 - eBias;
39979  } else if (exponent === eMax) {
39980    return mantissa ? NaN : sign ? -Infinity : Infinity;
39981  } else {
39982    mantissa = mantissa + pow(2, mantissaLength);
39983    exponent = exponent - eBias;
39984  } return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength);
39985};
39986
39987module.exports = {
39988  pack: pack,
39989  unpack: unpack
39990};
39991
39992
39993/***/ }),
39994
39995/***/ 8361:
39996/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
39997
39998var fails = __webpack_require__(7293);
39999var classof = __webpack_require__(4326);
40000
40001var split = ''.split;
40002
40003// fallback for non-array-like ES3 and non-enumerable old V8 strings
40004module.exports = fails(function () {
40005  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
40006  // eslint-disable-next-line no-prototype-builtins -- safe
40007  return !Object('z').propertyIsEnumerable(0);
40008}) ? function (it) {
40009  return classof(it) == 'String' ? split.call(it, '') : Object(it);
40010} : Object;
40011
40012
40013/***/ }),
40014
40015/***/ 9587:
40016/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
40017
40018var isObject = __webpack_require__(111);
40019var setPrototypeOf = __webpack_require__(7674);
40020
40021// makes subclassing work correct for wrapped built-ins
40022module.exports = function ($this, dummy, Wrapper) {
40023  var NewTarget, NewTargetPrototype;
40024  if (
40025    // it can work only with native `setPrototypeOf`
40026    setPrototypeOf &&
40027    // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
40028    typeof (NewTarget = dummy.constructor) == 'function' &&
40029    NewTarget !== Wrapper &&
40030    isObject(NewTargetPrototype = NewTarget.prototype) &&
40031    NewTargetPrototype !== Wrapper.prototype
40032  ) setPrototypeOf($this, NewTargetPrototype);
40033  return $this;
40034};
40035
40036
40037/***/ }),
40038
40039/***/ 2788:
40040/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
40041
40042var store = __webpack_require__(5465);
40043
40044var functionToString = Function.toString;
40045
40046// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
40047if (typeof store.inspectSource != 'function') {
40048  store.inspectSource = function (it) {
40049    return functionToString.call(it);
40050  };
40051}
40052
40053module.exports = store.inspectSource;
40054
40055
40056/***/ }),
40057
40058/***/ 9909:
40059/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
40060
40061var NATIVE_WEAK_MAP = __webpack_require__(8536);
40062var global = __webpack_require__(7854);
40063var isObject = __webpack_require__(111);
40064var createNonEnumerableProperty = __webpack_require__(8880);
40065var objectHas = __webpack_require__(6656);
40066var shared = __webpack_require__(5465);
40067var sharedKey = __webpack_require__(6200);
40068var hiddenKeys = __webpack_require__(3501);
40069
40070var WeakMap = global.WeakMap;
40071var set, get, has;
40072
40073var enforce = function (it) {
40074  return has(it) ? get(it) : set(it, {});
40075};
40076
40077var getterFor = function (TYPE) {
40078  return function (it) {
40079    var state;
40080    if (!isObject(it) || (state = get(it)).type !== TYPE) {
40081      throw TypeError('Incompatible receiver, ' + TYPE + ' required');
40082    } return state;
40083  };
40084};
40085
40086if (NATIVE_WEAK_MAP) {
40087  var store = shared.state || (shared.state = new WeakMap());
40088  var wmget = store.get;
40089  var wmhas = store.has;
40090  var wmset = store.set;
40091  set = function (it, metadata) {
40092    metadata.facade = it;
40093    wmset.call(store, it, metadata);
40094    return metadata;
40095  };
40096  get = function (it) {
40097    return wmget.call(store, it) || {};
40098  };
40099  has = function (it) {
40100    return wmhas.call(store, it);
40101  };
40102} else {
40103  var STATE = sharedKey('state');
40104  hiddenKeys[STATE] = true;
40105  set = function (it, metadata) {
40106    metadata.facade = it;
40107    createNonEnumerableProperty(it, STATE, metadata);
40108    return metadata;
40109  };
40110  get = function (it) {
40111    return objectHas(it, STATE) ? it[STATE] : {};
40112  };
40113  has = function (it) {
40114    return objectHas(it, STATE);
40115  };
40116}
40117
40118module.exports = {
40119  set: set,
40120  get: get,
40121  has: has,
40122  enforce: enforce,
40123  getterFor: getterFor
40124};
40125
40126
40127/***/ }),
40128
40129/***/ 7659:
40130/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
40131
40132var wellKnownSymbol = __webpack_require__(5112);
40133var Iterators = __webpack_require__(7497);
40134
40135var ITERATOR = wellKnownSymbol('iterator');
40136var ArrayPrototype = Array.prototype;
40137
40138// check on default Array iterator
40139module.exports = function (it) {
40140  return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
40141};
40142
40143
40144/***/ }),
40145
40146/***/ 3157:
40147/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
40148
40149var classof = __webpack_require__(4326);
40150
40151// `IsArray` abstract operation
40152// https://tc39.es/ecma262/#sec-isarray
40153module.exports = Array.isArray || function isArray(arg) {
40154  return classof(arg) == 'Array';
40155};
40156
40157
40158/***/ }),
40159
40160/***/ 4705:
40161/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
40162
40163var fails = __webpack_require__(7293);
40164
40165var replacement = /#|\.prototype\./;
40166
40167var isForced = function (feature, detection) {
40168  var value = data[normalize(feature)];
40169  return value == POLYFILL ? true
40170    : value == NATIVE ? false
40171    : typeof detection == 'function' ? fails(detection)
40172    : !!detection;
40173};
40174
40175var normalize = isForced.normalize = function (string) {
40176  return String(string).replace(replacement, '.').toLowerCase();
40177};
40178
40179var data = isForced.data = {};
40180var NATIVE = isForced.NATIVE = 'N';
40181var POLYFILL = isForced.POLYFILL = 'P';
40182
40183module.exports = isForced;
40184
40185
40186/***/ }),
40187
40188/***/ 111:
40189/***/ (function(module) {
40190
40191module.exports = function (it) {
40192  return typeof it === 'object' ? it !== null : typeof it === 'function';
40193};
40194
40195
40196/***/ }),
40197
40198/***/ 1913:
40199/***/ (function(module) {
40200
40201module.exports = false;
40202
40203
40204/***/ }),
40205
40206/***/ 7850:
40207/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
40208
40209var isObject = __webpack_require__(111);
40210var classof = __webpack_require__(4326);
40211var wellKnownSymbol = __webpack_require__(5112);
40212
40213var MATCH = wellKnownSymbol('match');
40214
40215// `IsRegExp` abstract operation
40216// https://tc39.es/ecma262/#sec-isregexp
40217module.exports = function (it) {
40218  var isRegExp;
40219  return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');
40220};
40221
40222
40223/***/ }),
40224
40225/***/ 9212:
40226/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
40227
40228var anObject = __webpack_require__(9670);
40229
40230module.exports = function (iterator) {
40231  var returnMethod = iterator['return'];
40232  if (returnMethod !== undefined) {
40233    return anObject(returnMethod.call(iterator)).value;
40234  }
40235};
40236
40237
40238/***/ }),
40239
40240/***/ 3383:
40241/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
40242
40243"use strict";
40244
40245var fails = __webpack_require__(7293);
40246var getPrototypeOf = __webpack_require__(9518);
40247var createNonEnumerableProperty = __webpack_require__(8880);
40248var has = __webpack_require__(6656);
40249var wellKnownSymbol = __webpack_require__(5112);
40250var IS_PURE = __webpack_require__(1913);
40251
40252var ITERATOR = wellKnownSymbol('iterator');
40253var BUGGY_SAFARI_ITERATORS = false;
40254
40255var returnThis = function () { return this; };
40256
40257// `%IteratorPrototype%` object
40258// https://tc39.es/ecma262/#sec-%iteratorprototype%-object
40259var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
40260
40261if ([].keys) {
40262  arrayIterator = [].keys();
40263  // Safari 8 has buggy iterators w/o `next`
40264  if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
40265  else {
40266    PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
40267    if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
40268  }
40269}
40270
40271var NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {
40272  var test = {};
40273  // FF44- legacy iterators case
40274  return IteratorPrototype[ITERATOR].call(test) !== test;
40275});
40276
40277if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};
40278
40279// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
40280if ((!IS_PURE || NEW_ITERATOR_PROTOTYPE) && !has(IteratorPrototype, ITERATOR)) {
40281  createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);
40282}
40283
40284module.exports = {
40285  IteratorPrototype: IteratorPrototype,
40286  BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
40287};
40288
40289
40290/***/ }),
40291
40292/***/ 7497:
40293/***/ (function(module) {
40294
40295module.exports = {};
40296
40297
40298/***/ }),
40299
40300/***/ 133:
40301/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
40302
40303var fails = __webpack_require__(7293);
40304
40305module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
40306  // Chrome 38 Symbol has incorrect toString conversion
40307  /* global Symbol -- required for testing */
40308  return !String(Symbol());
40309});
40310
40311
40312/***/ }),
40313
40314/***/ 590:
40315/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
40316
40317var fails = __webpack_require__(7293);
40318var wellKnownSymbol = __webpack_require__(5112);
40319var IS_PURE = __webpack_require__(1913);
40320
40321var ITERATOR = wellKnownSymbol('iterator');
40322
40323module.exports = !fails(function () {
40324  var url = new URL('b?a=1&b=2&c=3', 'http://a');
40325  var searchParams = url.searchParams;
40326  var result = '';
40327  url.pathname = 'c%20d';
40328  searchParams.forEach(function (value, key) {
40329    searchParams['delete']('b');
40330    result += key + value;
40331  });
40332  return (IS_PURE && !url.toJSON)
40333    || !searchParams.sort
40334    || url.href !== 'http://a/c%20d?a=1&c=3'
40335    || searchParams.get('c') !== '3'
40336    || String(new URLSearchParams('?a=1')) !== 'a=1'
40337    || !searchParams[ITERATOR]
40338    // throws in Edge
40339    || new URL('https://a@b').username !== 'a'
40340    || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'
40341    // not punycoded in Edge
40342    || new URL('http://тест').host !== 'xn--e1aybc'
40343    // not escaped in Chrome 62-
40344    || new URL('http://a#б').hash !== '#%D0%B1'
40345    // fails in Chrome 66-
40346    || result !== 'a1c3'
40347    // throws in Safari
40348    || new URL('http://x', undefined).host !== 'x';
40349});
40350
40351
40352/***/ }),
40353
40354/***/ 8536:
40355/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
40356
40357var global = __webpack_require__(7854);
40358var inspectSource = __webpack_require__(2788);
40359
40360var WeakMap = global.WeakMap;
40361
40362module.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
40363
40364
40365/***/ }),
40366
40367/***/ 1574:
40368/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
40369
40370"use strict";
40371
40372var DESCRIPTORS = __webpack_require__(9781);
40373var fails = __webpack_require__(7293);
40374var objectKeys = __webpack_require__(1956);
40375var getOwnPropertySymbolsModule = __webpack_require__(5181);
40376var propertyIsEnumerableModule = __webpack_require__(5296);
40377var toObject = __webpack_require__(7908);
40378var IndexedObject = __webpack_require__(8361);
40379
40380var nativeAssign = Object.assign;
40381var defineProperty = Object.defineProperty;
40382
40383// `Object.assign` method
40384// https://tc39.es/ecma262/#sec-object.assign
40385module.exports = !nativeAssign || fails(function () {
40386  // should have correct order of operations (Edge bug)
40387  if (DESCRIPTORS && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', {
40388    enumerable: true,
40389    get: function () {
40390      defineProperty(this, 'b', {
40391        value: 3,
40392        enumerable: false
40393      });
40394    }
40395  }), { b: 2 })).b !== 1) return true;
40396  // should work with symbols and should have deterministic property order (V8 bug)
40397  var A = {};
40398  var B = {};
40399  /* global Symbol -- required for testing */
40400  var symbol = Symbol();
40401  var alphabet = 'abcdefghijklmnopqrst';
40402  A[symbol] = 7;
40403  alphabet.split('').forEach(function (chr) { B[chr] = chr; });
40404  return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
40405}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
40406  var T = toObject(target);
40407  var argumentsLength = arguments.length;
40408  var index = 1;
40409  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
40410  var propertyIsEnumerable = propertyIsEnumerableModule.f;
40411  while (argumentsLength > index) {
40412    var S = IndexedObject(arguments[index++]);
40413    var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
40414    var length = keys.length;
40415    var j = 0;
40416    var key;
40417    while (length > j) {
40418      key = keys[j++];
40419      if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];
40420    }
40421  } return T;
40422} : nativeAssign;
40423
40424
40425/***/ }),
40426
40427/***/ 30:
40428/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
40429
40430var anObject = __webpack_require__(9670);
40431var defineProperties = __webpack_require__(6048);
40432var enumBugKeys = __webpack_require__(748);
40433var hiddenKeys = __webpack_require__(3501);
40434var html = __webpack_require__(490);
40435var documentCreateElement = __webpack_require__(317);
40436var sharedKey = __webpack_require__(6200);
40437
40438var GT = '>';
40439var LT = '<';
40440var PROTOTYPE = 'prototype';
40441var SCRIPT = 'script';
40442var IE_PROTO = sharedKey('IE_PROTO');
40443
40444var EmptyConstructor = function () { /* empty */ };
40445
40446var scriptTag = function (content) {
40447  return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
40448};
40449
40450// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
40451var NullProtoObjectViaActiveX = function (activeXDocument) {
40452  activeXDocument.write(scriptTag(''));
40453  activeXDocument.close();
40454  var temp = activeXDocument.parentWindow.Object;
40455  activeXDocument = null; // avoid memory leak
40456  return temp;
40457};
40458
40459// Create object with fake `null` prototype: use iframe Object with cleared prototype
40460var NullProtoObjectViaIFrame = function () {
40461  // Thrash, waste and sodomy: IE GC bug
40462  var iframe = documentCreateElement('iframe');
40463  var JS = 'java' + SCRIPT + ':';
40464  var iframeDocument;
40465  iframe.style.display = 'none';
40466  html.appendChild(iframe);
40467  // https://github.com/zloirock/core-js/issues/475
40468  iframe.src = String(JS);
40469  iframeDocument = iframe.contentWindow.document;
40470  iframeDocument.open();
40471  iframeDocument.write(scriptTag('document.F=Object'));
40472  iframeDocument.close();
40473  return iframeDocument.F;
40474};
40475
40476// Check for document.domain and active x support
40477// No need to use active x approach when document.domain is not set
40478// see https://github.com/es-shims/es5-shim/issues/150
40479// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
40480// avoid IE GC bug
40481var activeXDocument;
40482var NullProtoObject = function () {
40483  try {
40484    /* global ActiveXObject -- old IE */
40485    activeXDocument = document.domain && new ActiveXObject('htmlfile');
40486  } catch (error) { /* ignore */ }
40487  NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
40488  var length = enumBugKeys.length;
40489  while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
40490  return NullProtoObject();
40491};
40492
40493hiddenKeys[IE_PROTO] = true;
40494
40495// `Object.create` method
40496// https://tc39.es/ecma262/#sec-object.create
40497module.exports = Object.create || function create(O, Properties) {
40498  var result;
40499  if (O !== null) {
40500    EmptyConstructor[PROTOTYPE] = anObject(O);
40501    result = new EmptyConstructor();
40502    EmptyConstructor[PROTOTYPE] = null;
40503    // add "__proto__" for Object.getPrototypeOf polyfill
40504    result[IE_PROTO] = O;
40505  } else result = NullProtoObject();
40506  return Properties === undefined ? result : defineProperties(result, Properties);
40507};
40508
40509
40510/***/ }),
40511
40512/***/ 6048:
40513/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
40514
40515var DESCRIPTORS = __webpack_require__(9781);
40516var definePropertyModule = __webpack_require__(3070);
40517var anObject = __webpack_require__(9670);
40518var objectKeys = __webpack_require__(1956);
40519
40520// `Object.defineProperties` method
40521// https://tc39.es/ecma262/#sec-object.defineproperties
40522module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
40523  anObject(O);
40524  var keys = objectKeys(Properties);
40525  var length = keys.length;
40526  var index = 0;
40527  var key;
40528  while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);
40529  return O;
40530};
40531
40532
40533/***/ }),
40534
40535/***/ 3070:
40536/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
40537
40538var DESCRIPTORS = __webpack_require__(9781);
40539var IE8_DOM_DEFINE = __webpack_require__(4664);
40540var anObject = __webpack_require__(9670);
40541var toPrimitive = __webpack_require__(7593);
40542
40543var nativeDefineProperty = Object.defineProperty;
40544
40545// `Object.defineProperty` method
40546// https://tc39.es/ecma262/#sec-object.defineproperty
40547exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
40548  anObject(O);
40549  P = toPrimitive(P, true);
40550  anObject(Attributes);
40551  if (IE8_DOM_DEFINE) try {
40552    return nativeDefineProperty(O, P, Attributes);
40553  } catch (error) { /* empty */ }
40554  if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
40555  if ('value' in Attributes) O[P] = Attributes.value;
40556  return O;
40557};
40558
40559
40560/***/ }),
40561
40562/***/ 1236:
40563/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
40564
40565var DESCRIPTORS = __webpack_require__(9781);
40566var propertyIsEnumerableModule = __webpack_require__(5296);
40567var createPropertyDescriptor = __webpack_require__(9114);
40568var toIndexedObject = __webpack_require__(5656);
40569var toPrimitive = __webpack_require__(7593);
40570var has = __webpack_require__(6656);
40571var IE8_DOM_DEFINE = __webpack_require__(4664);
40572
40573var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
40574
40575// `Object.getOwnPropertyDescriptor` method
40576// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
40577exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
40578  O = toIndexedObject(O);
40579  P = toPrimitive(P, true);
40580  if (IE8_DOM_DEFINE) try {
40581    return nativeGetOwnPropertyDescriptor(O, P);
40582  } catch (error) { /* empty */ }
40583  if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);
40584};
40585
40586
40587/***/ }),
40588
40589/***/ 8006:
40590/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
40591
40592var internalObjectKeys = __webpack_require__(6324);
40593var enumBugKeys = __webpack_require__(748);
40594
40595var hiddenKeys = enumBugKeys.concat('length', 'prototype');
40596
40597// `Object.getOwnPropertyNames` method
40598// https://tc39.es/ecma262/#sec-object.getownpropertynames
40599exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
40600  return internalObjectKeys(O, hiddenKeys);
40601};
40602
40603
40604/***/ }),
40605
40606/***/ 5181:
40607/***/ (function(__unused_webpack_module, exports) {
40608
40609exports.f = Object.getOwnPropertySymbols;
40610
40611
40612/***/ }),
40613
40614/***/ 9518:
40615/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
40616
40617var has = __webpack_require__(6656);
40618var toObject = __webpack_require__(7908);
40619var sharedKey = __webpack_require__(6200);
40620var CORRECT_PROTOTYPE_GETTER = __webpack_require__(8544);
40621
40622var IE_PROTO = sharedKey('IE_PROTO');
40623var ObjectPrototype = Object.prototype;
40624
40625// `Object.getPrototypeOf` method
40626// https://tc39.es/ecma262/#sec-object.getprototypeof
40627module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {
40628  O = toObject(O);
40629  if (has(O, IE_PROTO)) return O[IE_PROTO];
40630  if (typeof O.constructor == 'function' && O instanceof O.constructor) {
40631    return O.constructor.prototype;
40632  } return O instanceof Object ? ObjectPrototype : null;
40633};
40634
40635
40636/***/ }),
40637
40638/***/ 6324:
40639/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
40640
40641var has = __webpack_require__(6656);
40642var toIndexedObject = __webpack_require__(5656);
40643var indexOf = __webpack_require__(1318).indexOf;
40644var hiddenKeys = __webpack_require__(3501);
40645
40646module.exports = function (object, names) {
40647  var O = toIndexedObject(object);
40648  var i = 0;
40649  var result = [];
40650  var key;
40651  for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
40652  // Don't enum bug & hidden keys
40653  while (names.length > i) if (has(O, key = names[i++])) {
40654    ~indexOf(result, key) || result.push(key);
40655  }
40656  return result;
40657};
40658
40659
40660/***/ }),
40661
40662/***/ 1956:
40663/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
40664
40665var internalObjectKeys = __webpack_require__(6324);
40666var enumBugKeys = __webpack_require__(748);
40667
40668// `Object.keys` method
40669// https://tc39.es/ecma262/#sec-object.keys
40670module.exports = Object.keys || function keys(O) {
40671  return internalObjectKeys(O, enumBugKeys);
40672};
40673
40674
40675/***/ }),
40676
40677/***/ 5296:
40678/***/ (function(__unused_webpack_module, exports) {
40679
40680"use strict";
40681
40682var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
40683var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
40684
40685// Nashorn ~ JDK8 bug
40686var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
40687
40688// `Object.prototype.propertyIsEnumerable` method implementation
40689// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
40690exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
40691  var descriptor = getOwnPropertyDescriptor(this, V);
40692  return !!descriptor && descriptor.enumerable;
40693} : nativePropertyIsEnumerable;
40694
40695
40696/***/ }),
40697
40698/***/ 7674:
40699/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
40700
40701/* eslint-disable no-proto -- safe */
40702var anObject = __webpack_require__(9670);
40703var aPossiblePrototype = __webpack_require__(6077);
40704
40705// `Object.setPrototypeOf` method
40706// https://tc39.es/ecma262/#sec-object.setprototypeof
40707// Works with __proto__ only. Old v8 can't work with null proto objects.
40708module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
40709  var CORRECT_SETTER = false;
40710  var test = {};
40711  var setter;
40712  try {
40713    setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
40714    setter.call(test, []);
40715    CORRECT_SETTER = test instanceof Array;
40716  } catch (error) { /* empty */ }
40717  return function setPrototypeOf(O, proto) {
40718    anObject(O);
40719    aPossiblePrototype(proto);
40720    if (CORRECT_SETTER) setter.call(O, proto);
40721    else O.__proto__ = proto;
40722    return O;
40723  };
40724}() : undefined);
40725
40726
40727/***/ }),
40728
40729/***/ 288:
40730/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
40731
40732"use strict";
40733
40734var TO_STRING_TAG_SUPPORT = __webpack_require__(1694);
40735var classof = __webpack_require__(648);
40736
40737// `Object.prototype.toString` method implementation
40738// https://tc39.es/ecma262/#sec-object.prototype.tostring
40739module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {
40740  return '[object ' + classof(this) + ']';
40741};
40742
40743
40744/***/ }),
40745
40746/***/ 3887:
40747/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
40748
40749var getBuiltIn = __webpack_require__(5005);
40750var getOwnPropertyNamesModule = __webpack_require__(8006);
40751var getOwnPropertySymbolsModule = __webpack_require__(5181);
40752var anObject = __webpack_require__(9670);
40753
40754// all object keys, includes non-enumerable and symbols
40755module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
40756  var keys = getOwnPropertyNamesModule.f(anObject(it));
40757  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
40758  return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
40759};
40760
40761
40762/***/ }),
40763
40764/***/ 857:
40765/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
40766
40767var global = __webpack_require__(7854);
40768
40769module.exports = global;
40770
40771
40772/***/ }),
40773
40774/***/ 2248:
40775/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
40776
40777var redefine = __webpack_require__(1320);
40778
40779module.exports = function (target, src, options) {
40780  for (var key in src) redefine(target, key, src[key], options);
40781  return target;
40782};
40783
40784
40785/***/ }),
40786
40787/***/ 1320:
40788/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
40789
40790var global = __webpack_require__(7854);
40791var createNonEnumerableProperty = __webpack_require__(8880);
40792var has = __webpack_require__(6656);
40793var setGlobal = __webpack_require__(3505);
40794var inspectSource = __webpack_require__(2788);
40795var InternalStateModule = __webpack_require__(9909);
40796
40797var getInternalState = InternalStateModule.get;
40798var enforceInternalState = InternalStateModule.enforce;
40799var TEMPLATE = String(String).split('String');
40800
40801(module.exports = function (O, key, value, options) {
40802  var unsafe = options ? !!options.unsafe : false;
40803  var simple = options ? !!options.enumerable : false;
40804  var noTargetGet = options ? !!options.noTargetGet : false;
40805  var state;
40806  if (typeof value == 'function') {
40807    if (typeof key == 'string' && !has(value, 'name')) {
40808      createNonEnumerableProperty(value, 'name', key);
40809    }
40810    state = enforceInternalState(value);
40811    if (!state.source) {
40812      state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
40813    }
40814  }
40815  if (O === global) {
40816    if (simple) O[key] = value;
40817    else setGlobal(key, value);
40818    return;
40819  } else if (!unsafe) {
40820    delete O[key];
40821  } else if (!noTargetGet && O[key]) {
40822    simple = true;
40823  }
40824  if (simple) O[key] = value;
40825  else createNonEnumerableProperty(O, key, value);
40826// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
40827})(Function.prototype, 'toString', function toString() {
40828  return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
40829});
40830
40831
40832/***/ }),
40833
40834/***/ 7651:
40835/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
40836
40837var classof = __webpack_require__(4326);
40838var regexpExec = __webpack_require__(2261);
40839
40840// `RegExpExec` abstract operation
40841// https://tc39.es/ecma262/#sec-regexpexec
40842module.exports = function (R, S) {
40843  var exec = R.exec;
40844  if (typeof exec === 'function') {
40845    var result = exec.call(R, S);
40846    if (typeof result !== 'object') {
40847      throw TypeError('RegExp exec method returned something other than an Object or null');
40848    }
40849    return result;
40850  }
40851
40852  if (classof(R) !== 'RegExp') {
40853    throw TypeError('RegExp#exec called on incompatible receiver');
40854  }
40855
40856  return regexpExec.call(R, S);
40857};
40858
40859
40860
40861/***/ }),
40862
40863/***/ 2261:
40864/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
40865
40866"use strict";
40867
40868var regexpFlags = __webpack_require__(7066);
40869var stickyHelpers = __webpack_require__(2999);
40870
40871var nativeExec = RegExp.prototype.exec;
40872// This always refers to the native implementation, because the
40873// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
40874// which loads this file before patching the method.
40875var nativeReplace = String.prototype.replace;
40876
40877var patchedExec = nativeExec;
40878
40879var UPDATES_LAST_INDEX_WRONG = (function () {
40880  var re1 = /a/;
40881  var re2 = /b*/g;
40882  nativeExec.call(re1, 'a');
40883  nativeExec.call(re2, 'a');
40884  return re1.lastIndex !== 0 || re2.lastIndex !== 0;
40885})();
40886
40887var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET;
40888
40889// nonparticipating capturing group, copied from es5-shim's String#split patch.
40890// eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing
40891var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
40892
40893var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y;
40894
40895if (PATCH) {
40896  patchedExec = function exec(str) {
40897    var re = this;
40898    var lastIndex, reCopy, match, i;
40899    var sticky = UNSUPPORTED_Y && re.sticky;
40900    var flags = regexpFlags.call(re);
40901    var source = re.source;
40902    var charsAdded = 0;
40903    var strCopy = str;
40904
40905    if (sticky) {
40906      flags = flags.replace('y', '');
40907      if (flags.indexOf('g') === -1) {
40908        flags += 'g';
40909      }
40910
40911      strCopy = String(str).slice(re.lastIndex);
40912      // Support anchored sticky behavior.
40913      if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) {
40914        source = '(?: ' + source + ')';
40915        strCopy = ' ' + strCopy;
40916        charsAdded++;
40917      }
40918      // ^(? + rx + ) is needed, in combination with some str slicing, to
40919      // simulate the 'y' flag.
40920      reCopy = new RegExp('^(?:' + source + ')', flags);
40921    }
40922
40923    if (NPCG_INCLUDED) {
40924      reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
40925    }
40926    if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
40927
40928    match = nativeExec.call(sticky ? reCopy : re, strCopy);
40929
40930    if (sticky) {
40931      if (match) {
40932        match.input = match.input.slice(charsAdded);
40933        match[0] = match[0].slice(charsAdded);
40934        match.index = re.lastIndex;
40935        re.lastIndex += match[0].length;
40936      } else re.lastIndex = 0;
40937    } else if (UPDATES_LAST_INDEX_WRONG && match) {
40938      re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
40939    }
40940    if (NPCG_INCLUDED && match && match.length > 1) {
40941      // Fix browsers whose `exec` methods don't consistently return `undefined`
40942      // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
40943      nativeReplace.call(match[0], reCopy, function () {
40944        for (i = 1; i < arguments.length - 2; i++) {
40945          if (arguments[i] === undefined) match[i] = undefined;
40946        }
40947      });
40948    }
40949
40950    return match;
40951  };
40952}
40953
40954module.exports = patchedExec;
40955
40956
40957/***/ }),
40958
40959/***/ 7066:
40960/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
40961
40962"use strict";
40963
40964var anObject = __webpack_require__(9670);
40965
40966// `RegExp.prototype.flags` getter implementation
40967// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
40968module.exports = function () {
40969  var that = anObject(this);
40970  var result = '';
40971  if (that.global) result += 'g';
40972  if (that.ignoreCase) result += 'i';
40973  if (that.multiline) result += 'm';
40974  if (that.dotAll) result += 's';
40975  if (that.unicode) result += 'u';
40976  if (that.sticky) result += 'y';
40977  return result;
40978};
40979
40980
40981/***/ }),
40982
40983/***/ 2999:
40984/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
40985
40986"use strict";
40987
40988
40989var fails = __webpack_require__(7293);
40990
40991// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
40992// so we use an intermediate function.
40993function RE(s, f) {
40994  return RegExp(s, f);
40995}
40996
40997exports.UNSUPPORTED_Y = fails(function () {
40998  // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
40999  var re = RE('a', 'y');
41000  re.lastIndex = 2;
41001  return re.exec('abcd') != null;
41002});
41003
41004exports.BROKEN_CARET = fails(function () {
41005  // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
41006  var re = RE('^r', 'gy');
41007  re.lastIndex = 2;
41008  return re.exec('str') != null;
41009});
41010
41011
41012/***/ }),
41013
41014/***/ 4488:
41015/***/ (function(module) {
41016
41017// `RequireObjectCoercible` abstract operation
41018// https://tc39.es/ecma262/#sec-requireobjectcoercible
41019module.exports = function (it) {
41020  if (it == undefined) throw TypeError("Can't call method on " + it);
41021  return it;
41022};
41023
41024
41025/***/ }),
41026
41027/***/ 3505:
41028/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
41029
41030var global = __webpack_require__(7854);
41031var createNonEnumerableProperty = __webpack_require__(8880);
41032
41033module.exports = function (key, value) {
41034  try {
41035    createNonEnumerableProperty(global, key, value);
41036  } catch (error) {
41037    global[key] = value;
41038  } return value;
41039};
41040
41041
41042/***/ }),
41043
41044/***/ 6340:
41045/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
41046
41047"use strict";
41048
41049var getBuiltIn = __webpack_require__(5005);
41050var definePropertyModule = __webpack_require__(3070);
41051var wellKnownSymbol = __webpack_require__(5112);
41052var DESCRIPTORS = __webpack_require__(9781);
41053
41054var SPECIES = wellKnownSymbol('species');
41055
41056module.exports = function (CONSTRUCTOR_NAME) {
41057  var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
41058  var defineProperty = definePropertyModule.f;
41059
41060  if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {
41061    defineProperty(Constructor, SPECIES, {
41062      configurable: true,
41063      get: function () { return this; }
41064    });
41065  }
41066};
41067
41068
41069/***/ }),
41070
41071/***/ 8003:
41072/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
41073
41074var defineProperty = __webpack_require__(3070).f;
41075var has = __webpack_require__(6656);
41076var wellKnownSymbol = __webpack_require__(5112);
41077
41078var TO_STRING_TAG = wellKnownSymbol('toStringTag');
41079
41080module.exports = function (it, TAG, STATIC) {
41081  if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
41082    defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });
41083  }
41084};
41085
41086
41087/***/ }),
41088
41089/***/ 6200:
41090/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
41091
41092var shared = __webpack_require__(2309);
41093var uid = __webpack_require__(9711);
41094
41095var keys = shared('keys');
41096
41097module.exports = function (key) {
41098  return keys[key] || (keys[key] = uid(key));
41099};
41100
41101
41102/***/ }),
41103
41104/***/ 5465:
41105/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
41106
41107var global = __webpack_require__(7854);
41108var setGlobal = __webpack_require__(3505);
41109
41110var SHARED = '__core-js_shared__';
41111var store = global[SHARED] || setGlobal(SHARED, {});
41112
41113module.exports = store;
41114
41115
41116/***/ }),
41117
41118/***/ 2309:
41119/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
41120
41121var IS_PURE = __webpack_require__(1913);
41122var store = __webpack_require__(5465);
41123
41124(module.exports = function (key, value) {
41125  return store[key] || (store[key] = value !== undefined ? value : {});
41126})('versions', []).push({
41127  version: '3.9.0',
41128  mode: IS_PURE ? 'pure' : 'global',
41129  copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
41130});
41131
41132
41133/***/ }),
41134
41135/***/ 6707:
41136/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
41137
41138var anObject = __webpack_require__(9670);
41139var aFunction = __webpack_require__(3099);
41140var wellKnownSymbol = __webpack_require__(5112);
41141
41142var SPECIES = wellKnownSymbol('species');
41143
41144// `SpeciesConstructor` abstract operation
41145// https://tc39.es/ecma262/#sec-speciesconstructor
41146module.exports = function (O, defaultConstructor) {
41147  var C = anObject(O).constructor;
41148  var S;
41149  return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);
41150};
41151
41152
41153/***/ }),
41154
41155/***/ 8710:
41156/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
41157
41158var toInteger = __webpack_require__(9958);
41159var requireObjectCoercible = __webpack_require__(4488);
41160
41161// `String.prototype.{ codePointAt, at }` methods implementation
41162var createMethod = function (CONVERT_TO_STRING) {
41163  return function ($this, pos) {
41164    var S = String(requireObjectCoercible($this));
41165    var position = toInteger(pos);
41166    var size = S.length;
41167    var first, second;
41168    if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
41169    first = S.charCodeAt(position);
41170    return first < 0xD800 || first > 0xDBFF || position + 1 === size
41171      || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
41172        ? CONVERT_TO_STRING ? S.charAt(position) : first
41173        : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
41174  };
41175};
41176
41177module.exports = {
41178  // `String.prototype.codePointAt` method
41179  // https://tc39.es/ecma262/#sec-string.prototype.codepointat
41180  codeAt: createMethod(false),
41181  // `String.prototype.at` method
41182  // https://github.com/mathiasbynens/String.prototype.at
41183  charAt: createMethod(true)
41184};
41185
41186
41187/***/ }),
41188
41189/***/ 3197:
41190/***/ (function(module) {
41191
41192"use strict";
41193
41194// based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js
41195var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
41196var base = 36;
41197var tMin = 1;
41198var tMax = 26;
41199var skew = 38;
41200var damp = 700;
41201var initialBias = 72;
41202var initialN = 128; // 0x80
41203var delimiter = '-'; // '\x2D'
41204var regexNonASCII = /[^\0-\u007E]/; // non-ASCII chars
41205var regexSeparators = /[.\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
41206var OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';
41207var baseMinusTMin = base - tMin;
41208var floor = Math.floor;
41209var stringFromCharCode = String.fromCharCode;
41210
41211/**
41212 * Creates an array containing the numeric code points of each Unicode
41213 * character in the string. While JavaScript uses UCS-2 internally,
41214 * this function will convert a pair of surrogate halves (each of which
41215 * UCS-2 exposes as separate characters) into a single code point,
41216 * matching UTF-16.
41217 */
41218var ucs2decode = function (string) {
41219  var output = [];
41220  var counter = 0;
41221  var length = string.length;
41222  while (counter < length) {
41223    var value = string.charCodeAt(counter++);
41224    if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
41225      // It's a high surrogate, and there is a next character.
41226      var extra = string.charCodeAt(counter++);
41227      if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.
41228        output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
41229      } else {
41230        // It's an unmatched surrogate; only append this code unit, in case the
41231        // next code unit is the high surrogate of a surrogate pair.
41232        output.push(value);
41233        counter--;
41234      }
41235    } else {
41236      output.push(value);
41237    }
41238  }
41239  return output;
41240};
41241
41242/**
41243 * Converts a digit/integer into a basic code point.
41244 */
41245var digitToBasic = function (digit) {
41246  //  0..25 map to ASCII a..z or A..Z
41247  // 26..35 map to ASCII 0..9
41248  return digit + 22 + 75 * (digit < 26);
41249};
41250
41251/**
41252 * Bias adaptation function as per section 3.4 of RFC 3492.
41253 * https://tools.ietf.org/html/rfc3492#section-3.4
41254 */
41255var adapt = function (delta, numPoints, firstTime) {
41256  var k = 0;
41257  delta = firstTime ? floor(delta / damp) : delta >> 1;
41258  delta += floor(delta / numPoints);
41259  for (; delta > baseMinusTMin * tMax >> 1; k += base) {
41260    delta = floor(delta / baseMinusTMin);
41261  }
41262  return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
41263};
41264
41265/**
41266 * Converts a string of Unicode symbols (e.g. a domain name label) to a
41267 * Punycode string of ASCII-only symbols.
41268 */
41269// eslint-disable-next-line max-statements -- TODO
41270var encode = function (input) {
41271  var output = [];
41272
41273  // Convert the input in UCS-2 to an array of Unicode code points.
41274  input = ucs2decode(input);
41275
41276  // Cache the length.
41277  var inputLength = input.length;
41278
41279  // Initialize the state.
41280  var n = initialN;
41281  var delta = 0;
41282  var bias = initialBias;
41283  var i, currentValue;
41284
41285  // Handle the basic code points.
41286  for (i = 0; i < input.length; i++) {
41287    currentValue = input[i];
41288    if (currentValue < 0x80) {
41289      output.push(stringFromCharCode(currentValue));
41290    }
41291  }
41292
41293  var basicLength = output.length; // number of basic code points.
41294  var handledCPCount = basicLength; // number of code points that have been handled;
41295
41296  // Finish the basic string with a delimiter unless it's empty.
41297  if (basicLength) {
41298    output.push(delimiter);
41299  }
41300
41301  // Main encoding loop:
41302  while (handledCPCount < inputLength) {
41303    // All non-basic code points < n have been handled already. Find the next larger one:
41304    var m = maxInt;
41305    for (i = 0; i < input.length; i++) {
41306      currentValue = input[i];
41307      if (currentValue >= n && currentValue < m) {
41308        m = currentValue;
41309      }
41310    }
41311
41312    // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, but guard against overflow.
41313    var handledCPCountPlusOne = handledCPCount + 1;
41314    if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
41315      throw RangeError(OVERFLOW_ERROR);
41316    }
41317
41318    delta += (m - n) * handledCPCountPlusOne;
41319    n = m;
41320
41321    for (i = 0; i < input.length; i++) {
41322      currentValue = input[i];
41323      if (currentValue < n && ++delta > maxInt) {
41324        throw RangeError(OVERFLOW_ERROR);
41325      }
41326      if (currentValue == n) {
41327        // Represent delta as a generalized variable-length integer.
41328        var q = delta;
41329        for (var k = base; /* no condition */; k += base) {
41330          var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
41331          if (q < t) break;
41332          var qMinusT = q - t;
41333          var baseMinusT = base - t;
41334          output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT)));
41335          q = floor(qMinusT / baseMinusT);
41336        }
41337
41338        output.push(stringFromCharCode(digitToBasic(q)));
41339        bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
41340        delta = 0;
41341        ++handledCPCount;
41342      }
41343    }
41344
41345    ++delta;
41346    ++n;
41347  }
41348  return output.join('');
41349};
41350
41351module.exports = function (input) {
41352  var encoded = [];
41353  var labels = input.toLowerCase().replace(regexSeparators, '\u002E').split('.');
41354  var i, label;
41355  for (i = 0; i < labels.length; i++) {
41356    label = labels[i];
41357    encoded.push(regexNonASCII.test(label) ? 'xn--' + encode(label) : label);
41358  }
41359  return encoded.join('.');
41360};
41361
41362
41363/***/ }),
41364
41365/***/ 6091:
41366/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
41367
41368var fails = __webpack_require__(7293);
41369var whitespaces = __webpack_require__(1361);
41370
41371var non = '\u200B\u0085\u180E';
41372
41373// check that a method works with the correct list
41374// of whitespaces and has a correct name
41375module.exports = function (METHOD_NAME) {
41376  return fails(function () {
41377    return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;
41378  });
41379};
41380
41381
41382/***/ }),
41383
41384/***/ 3111:
41385/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
41386
41387var requireObjectCoercible = __webpack_require__(4488);
41388var whitespaces = __webpack_require__(1361);
41389
41390var whitespace = '[' + whitespaces + ']';
41391var ltrim = RegExp('^' + whitespace + whitespace + '*');
41392var rtrim = RegExp(whitespace + whitespace + '*$');
41393
41394// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
41395var createMethod = function (TYPE) {
41396  return function ($this) {
41397    var string = String(requireObjectCoercible($this));
41398    if (TYPE & 1) string = string.replace(ltrim, '');
41399    if (TYPE & 2) string = string.replace(rtrim, '');
41400    return string;
41401  };
41402};
41403
41404module.exports = {
41405  // `String.prototype.{ trimLeft, trimStart }` methods
41406  // https://tc39.es/ecma262/#sec-string.prototype.trimstart
41407  start: createMethod(1),
41408  // `String.prototype.{ trimRight, trimEnd }` methods
41409  // https://tc39.es/ecma262/#sec-string.prototype.trimend
41410  end: createMethod(2),
41411  // `String.prototype.trim` method
41412  // https://tc39.es/ecma262/#sec-string.prototype.trim
41413  trim: createMethod(3)
41414};
41415
41416
41417/***/ }),
41418
41419/***/ 1400:
41420/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
41421
41422var toInteger = __webpack_require__(9958);
41423
41424var max = Math.max;
41425var min = Math.min;
41426
41427// Helper for a popular repeating case of the spec:
41428// Let integer be ? ToInteger(index).
41429// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
41430module.exports = function (index, length) {
41431  var integer = toInteger(index);
41432  return integer < 0 ? max(integer + length, 0) : min(integer, length);
41433};
41434
41435
41436/***/ }),
41437
41438/***/ 7067:
41439/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
41440
41441var toInteger = __webpack_require__(9958);
41442var toLength = __webpack_require__(7466);
41443
41444// `ToIndex` abstract operation
41445// https://tc39.es/ecma262/#sec-toindex
41446module.exports = function (it) {
41447  if (it === undefined) return 0;
41448  var number = toInteger(it);
41449  var length = toLength(number);
41450  if (number !== length) throw RangeError('Wrong length or index');
41451  return length;
41452};
41453
41454
41455/***/ }),
41456
41457/***/ 5656:
41458/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
41459
41460// toObject with fallback for non-array-like ES3 strings
41461var IndexedObject = __webpack_require__(8361);
41462var requireObjectCoercible = __webpack_require__(4488);
41463
41464module.exports = function (it) {
41465  return IndexedObject(requireObjectCoercible(it));
41466};
41467
41468
41469/***/ }),
41470
41471/***/ 9958:
41472/***/ (function(module) {
41473
41474var ceil = Math.ceil;
41475var floor = Math.floor;
41476
41477// `ToInteger` abstract operation
41478// https://tc39.es/ecma262/#sec-tointeger
41479module.exports = function (argument) {
41480  return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
41481};
41482
41483
41484/***/ }),
41485
41486/***/ 7466:
41487/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
41488
41489var toInteger = __webpack_require__(9958);
41490
41491var min = Math.min;
41492
41493// `ToLength` abstract operation
41494// https://tc39.es/ecma262/#sec-tolength
41495module.exports = function (argument) {
41496  return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
41497};
41498
41499
41500/***/ }),
41501
41502/***/ 7908:
41503/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
41504
41505var requireObjectCoercible = __webpack_require__(4488);
41506
41507// `ToObject` abstract operation
41508// https://tc39.es/ecma262/#sec-toobject
41509module.exports = function (argument) {
41510  return Object(requireObjectCoercible(argument));
41511};
41512
41513
41514/***/ }),
41515
41516/***/ 4590:
41517/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
41518
41519var toPositiveInteger = __webpack_require__(3002);
41520
41521module.exports = function (it, BYTES) {
41522  var offset = toPositiveInteger(it);
41523  if (offset % BYTES) throw RangeError('Wrong offset');
41524  return offset;
41525};
41526
41527
41528/***/ }),
41529
41530/***/ 3002:
41531/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
41532
41533var toInteger = __webpack_require__(9958);
41534
41535module.exports = function (it) {
41536  var result = toInteger(it);
41537  if (result < 0) throw RangeError("The argument can't be less than 0");
41538  return result;
41539};
41540
41541
41542/***/ }),
41543
41544/***/ 7593:
41545/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
41546
41547var isObject = __webpack_require__(111);
41548
41549// `ToPrimitive` abstract operation
41550// https://tc39.es/ecma262/#sec-toprimitive
41551// instead of the ES6 spec version, we didn't implement @@toPrimitive case
41552// and the second argument - flag - preferred type is a string
41553module.exports = function (input, PREFERRED_STRING) {
41554  if (!isObject(input)) return input;
41555  var fn, val;
41556  if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
41557  if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
41558  if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
41559  throw TypeError("Can't convert object to primitive value");
41560};
41561
41562
41563/***/ }),
41564
41565/***/ 1694:
41566/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
41567
41568var wellKnownSymbol = __webpack_require__(5112);
41569
41570var TO_STRING_TAG = wellKnownSymbol('toStringTag');
41571var test = {};
41572
41573test[TO_STRING_TAG] = 'z';
41574
41575module.exports = String(test) === '[object z]';
41576
41577
41578/***/ }),
41579
41580/***/ 9843:
41581/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
41582
41583"use strict";
41584
41585var $ = __webpack_require__(2109);
41586var global = __webpack_require__(7854);
41587var DESCRIPTORS = __webpack_require__(9781);
41588var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = __webpack_require__(3832);
41589var ArrayBufferViewCore = __webpack_require__(260);
41590var ArrayBufferModule = __webpack_require__(3331);
41591var anInstance = __webpack_require__(5787);
41592var createPropertyDescriptor = __webpack_require__(9114);
41593var createNonEnumerableProperty = __webpack_require__(8880);
41594var toLength = __webpack_require__(7466);
41595var toIndex = __webpack_require__(7067);
41596var toOffset = __webpack_require__(4590);
41597var toPrimitive = __webpack_require__(7593);
41598var has = __webpack_require__(6656);
41599var classof = __webpack_require__(648);
41600var isObject = __webpack_require__(111);
41601var create = __webpack_require__(30);
41602var setPrototypeOf = __webpack_require__(7674);
41603var getOwnPropertyNames = __webpack_require__(8006).f;
41604var typedArrayFrom = __webpack_require__(7321);
41605var forEach = __webpack_require__(2092).forEach;
41606var setSpecies = __webpack_require__(6340);
41607var definePropertyModule = __webpack_require__(3070);
41608var getOwnPropertyDescriptorModule = __webpack_require__(1236);
41609var InternalStateModule = __webpack_require__(9909);
41610var inheritIfRequired = __webpack_require__(9587);
41611
41612var getInternalState = InternalStateModule.get;
41613var setInternalState = InternalStateModule.set;
41614var nativeDefineProperty = definePropertyModule.f;
41615var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
41616var round = Math.round;
41617var RangeError = global.RangeError;
41618var ArrayBuffer = ArrayBufferModule.ArrayBuffer;
41619var DataView = ArrayBufferModule.DataView;
41620var NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;
41621var TYPED_ARRAY_TAG = ArrayBufferViewCore.TYPED_ARRAY_TAG;
41622var TypedArray = ArrayBufferViewCore.TypedArray;
41623var TypedArrayPrototype = ArrayBufferViewCore.TypedArrayPrototype;
41624var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
41625var isTypedArray = ArrayBufferViewCore.isTypedArray;
41626var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';
41627var WRONG_LENGTH = 'Wrong length';
41628
41629var fromList = function (C, list) {
41630  var index = 0;
41631  var length = list.length;
41632  var result = new (aTypedArrayConstructor(C))(length);
41633  while (length > index) result[index] = list[index++];
41634  return result;
41635};
41636
41637var addGetter = function (it, key) {
41638  nativeDefineProperty(it, key, { get: function () {
41639    return getInternalState(this)[key];
41640  } });
41641};
41642
41643var isArrayBuffer = function (it) {
41644  var klass;
41645  return it instanceof ArrayBuffer || (klass = classof(it)) == 'ArrayBuffer' || klass == 'SharedArrayBuffer';
41646};
41647
41648var isTypedArrayIndex = function (target, key) {
41649  return isTypedArray(target)
41650    && typeof key != 'symbol'
41651    && key in target
41652    && String(+key) == String(key);
41653};
41654
41655var wrappedGetOwnPropertyDescriptor = function getOwnPropertyDescriptor(target, key) {
41656  return isTypedArrayIndex(target, key = toPrimitive(key, true))
41657    ? createPropertyDescriptor(2, target[key])
41658    : nativeGetOwnPropertyDescriptor(target, key);
41659};
41660
41661var wrappedDefineProperty = function defineProperty(target, key, descriptor) {
41662  if (isTypedArrayIndex(target, key = toPrimitive(key, true))
41663    && isObject(descriptor)
41664    && has(descriptor, 'value')
41665    && !has(descriptor, 'get')
41666    && !has(descriptor, 'set')
41667    // TODO: add validation descriptor w/o calling accessors
41668    && !descriptor.configurable
41669    && (!has(descriptor, 'writable') || descriptor.writable)
41670    && (!has(descriptor, 'enumerable') || descriptor.enumerable)
41671  ) {
41672    target[key] = descriptor.value;
41673    return target;
41674  } return nativeDefineProperty(target, key, descriptor);
41675};
41676
41677if (DESCRIPTORS) {
41678  if (!NATIVE_ARRAY_BUFFER_VIEWS) {
41679    getOwnPropertyDescriptorModule.f = wrappedGetOwnPropertyDescriptor;
41680    definePropertyModule.f = wrappedDefineProperty;
41681    addGetter(TypedArrayPrototype, 'buffer');
41682    addGetter(TypedArrayPrototype, 'byteOffset');
41683    addGetter(TypedArrayPrototype, 'byteLength');
41684    addGetter(TypedArrayPrototype, 'length');
41685  }
41686
41687  $({ target: 'Object', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, {
41688    getOwnPropertyDescriptor: wrappedGetOwnPropertyDescriptor,
41689    defineProperty: wrappedDefineProperty
41690  });
41691
41692  module.exports = function (TYPE, wrapper, CLAMPED) {
41693    var BYTES = TYPE.match(/\d+$/)[0] / 8;
41694    var CONSTRUCTOR_NAME = TYPE + (CLAMPED ? 'Clamped' : '') + 'Array';
41695    var GETTER = 'get' + TYPE;
41696    var SETTER = 'set' + TYPE;
41697    var NativeTypedArrayConstructor = global[CONSTRUCTOR_NAME];
41698    var TypedArrayConstructor = NativeTypedArrayConstructor;
41699    var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor.prototype;
41700    var exported = {};
41701
41702    var getter = function (that, index) {
41703      var data = getInternalState(that);
41704      return data.view[GETTER](index * BYTES + data.byteOffset, true);
41705    };
41706
41707    var setter = function (that, index, value) {
41708      var data = getInternalState(that);
41709      if (CLAMPED) value = (value = round(value)) < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF;
41710      data.view[SETTER](index * BYTES + data.byteOffset, value, true);
41711    };
41712
41713    var addElement = function (that, index) {
41714      nativeDefineProperty(that, index, {
41715        get: function () {
41716          return getter(this, index);
41717        },
41718        set: function (value) {
41719          return setter(this, index, value);
41720        },
41721        enumerable: true
41722      });
41723    };
41724
41725    if (!NATIVE_ARRAY_BUFFER_VIEWS) {
41726      TypedArrayConstructor = wrapper(function (that, data, offset, $length) {
41727        anInstance(that, TypedArrayConstructor, CONSTRUCTOR_NAME);
41728        var index = 0;
41729        var byteOffset = 0;
41730        var buffer, byteLength, length;
41731        if (!isObject(data)) {
41732          length = toIndex(data);
41733          byteLength = length * BYTES;
41734          buffer = new ArrayBuffer(byteLength);
41735        } else if (isArrayBuffer(data)) {
41736          buffer = data;
41737          byteOffset = toOffset(offset, BYTES);
41738          var $len = data.byteLength;
41739          if ($length === undefined) {
41740            if ($len % BYTES) throw RangeError(WRONG_LENGTH);
41741            byteLength = $len - byteOffset;
41742            if (byteLength < 0) throw RangeError(WRONG_LENGTH);
41743          } else {
41744            byteLength = toLength($length) * BYTES;
41745            if (byteLength + byteOffset > $len) throw RangeError(WRONG_LENGTH);
41746          }
41747          length = byteLength / BYTES;
41748        } else if (isTypedArray(data)) {
41749          return fromList(TypedArrayConstructor, data);
41750        } else {
41751          return typedArrayFrom.call(TypedArrayConstructor, data);
41752        }
41753        setInternalState(that, {
41754          buffer: buffer,
41755          byteOffset: byteOffset,
41756          byteLength: byteLength,
41757          length: length,
41758          view: new DataView(buffer)
41759        });
41760        while (index < length) addElement(that, index++);
41761      });
41762
41763      if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);
41764      TypedArrayConstructorPrototype = TypedArrayConstructor.prototype = create(TypedArrayPrototype);
41765    } else if (TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS) {
41766      TypedArrayConstructor = wrapper(function (dummy, data, typedArrayOffset, $length) {
41767        anInstance(dummy, TypedArrayConstructor, CONSTRUCTOR_NAME);
41768        return inheritIfRequired(function () {
41769          if (!isObject(data)) return new NativeTypedArrayConstructor(toIndex(data));
41770          if (isArrayBuffer(data)) return $length !== undefined
41771            ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES), $length)
41772            : typedArrayOffset !== undefined
41773              ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES))
41774              : new NativeTypedArrayConstructor(data);
41775          if (isTypedArray(data)) return fromList(TypedArrayConstructor, data);
41776          return typedArrayFrom.call(TypedArrayConstructor, data);
41777        }(), dummy, TypedArrayConstructor);
41778      });
41779
41780      if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);
41781      forEach(getOwnPropertyNames(NativeTypedArrayConstructor), function (key) {
41782        if (!(key in TypedArrayConstructor)) {
41783          createNonEnumerableProperty(TypedArrayConstructor, key, NativeTypedArrayConstructor[key]);
41784        }
41785      });
41786      TypedArrayConstructor.prototype = TypedArrayConstructorPrototype;
41787    }
41788
41789    if (TypedArrayConstructorPrototype.constructor !== TypedArrayConstructor) {
41790      createNonEnumerableProperty(TypedArrayConstructorPrototype, 'constructor', TypedArrayConstructor);
41791    }
41792
41793    if (TYPED_ARRAY_TAG) {
41794      createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_TAG, CONSTRUCTOR_NAME);
41795    }
41796
41797    exported[CONSTRUCTOR_NAME] = TypedArrayConstructor;
41798
41799    $({
41800      global: true, forced: TypedArrayConstructor != NativeTypedArrayConstructor, sham: !NATIVE_ARRAY_BUFFER_VIEWS
41801    }, exported);
41802
41803    if (!(BYTES_PER_ELEMENT in TypedArrayConstructor)) {
41804      createNonEnumerableProperty(TypedArrayConstructor, BYTES_PER_ELEMENT, BYTES);
41805    }
41806
41807    if (!(BYTES_PER_ELEMENT in TypedArrayConstructorPrototype)) {
41808      createNonEnumerableProperty(TypedArrayConstructorPrototype, BYTES_PER_ELEMENT, BYTES);
41809    }
41810
41811    setSpecies(CONSTRUCTOR_NAME);
41812  };
41813} else module.exports = function () { /* empty */ };
41814
41815
41816/***/ }),
41817
41818/***/ 3832:
41819/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
41820
41821/* eslint-disable no-new -- required for testing */
41822var global = __webpack_require__(7854);
41823var fails = __webpack_require__(7293);
41824var checkCorrectnessOfIteration = __webpack_require__(7072);
41825var NATIVE_ARRAY_BUFFER_VIEWS = __webpack_require__(260).NATIVE_ARRAY_BUFFER_VIEWS;
41826
41827var ArrayBuffer = global.ArrayBuffer;
41828var Int8Array = global.Int8Array;
41829
41830module.exports = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function () {
41831  Int8Array(1);
41832}) || !fails(function () {
41833  new Int8Array(-1);
41834}) || !checkCorrectnessOfIteration(function (iterable) {
41835  new Int8Array();
41836  new Int8Array(null);
41837  new Int8Array(1.5);
41838  new Int8Array(iterable);
41839}, true) || fails(function () {
41840  // Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill
41841  return new Int8Array(new ArrayBuffer(2), 1, undefined).length !== 1;
41842});
41843
41844
41845/***/ }),
41846
41847/***/ 3074:
41848/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
41849
41850var aTypedArrayConstructor = __webpack_require__(260).aTypedArrayConstructor;
41851var speciesConstructor = __webpack_require__(6707);
41852
41853module.exports = function (instance, list) {
41854  var C = speciesConstructor(instance, instance.constructor);
41855  var index = 0;
41856  var length = list.length;
41857  var result = new (aTypedArrayConstructor(C))(length);
41858  while (length > index) result[index] = list[index++];
41859  return result;
41860};
41861
41862
41863/***/ }),
41864
41865/***/ 7321:
41866/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
41867
41868var toObject = __webpack_require__(7908);
41869var toLength = __webpack_require__(7466);
41870var getIteratorMethod = __webpack_require__(1246);
41871var isArrayIteratorMethod = __webpack_require__(7659);
41872var bind = __webpack_require__(9974);
41873var aTypedArrayConstructor = __webpack_require__(260).aTypedArrayConstructor;
41874
41875module.exports = function from(source /* , mapfn, thisArg */) {
41876  var O = toObject(source);
41877  var argumentsLength = arguments.length;
41878  var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
41879  var mapping = mapfn !== undefined;
41880  var iteratorMethod = getIteratorMethod(O);
41881  var i, length, result, step, iterator, next;
41882  if (iteratorMethod != undefined && !isArrayIteratorMethod(iteratorMethod)) {
41883    iterator = iteratorMethod.call(O);
41884    next = iterator.next;
41885    O = [];
41886    while (!(step = next.call(iterator)).done) {
41887      O.push(step.value);
41888    }
41889  }
41890  if (mapping && argumentsLength > 2) {
41891    mapfn = bind(mapfn, arguments[2], 2);
41892  }
41893  length = toLength(O.length);
41894  result = new (aTypedArrayConstructor(this))(length);
41895  for (i = 0; length > i; i++) {
41896    result[i] = mapping ? mapfn(O[i], i) : O[i];
41897  }
41898  return result;
41899};
41900
41901
41902/***/ }),
41903
41904/***/ 9711:
41905/***/ (function(module) {
41906
41907var id = 0;
41908var postfix = Math.random();
41909
41910module.exports = function (key) {
41911  return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
41912};
41913
41914
41915/***/ }),
41916
41917/***/ 3307:
41918/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
41919
41920var NATIVE_SYMBOL = __webpack_require__(133);
41921
41922module.exports = NATIVE_SYMBOL
41923  /* global Symbol -- safe */
41924  && !Symbol.sham
41925  && typeof Symbol.iterator == 'symbol';
41926
41927
41928/***/ }),
41929
41930/***/ 5112:
41931/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
41932
41933var global = __webpack_require__(7854);
41934var shared = __webpack_require__(2309);
41935var has = __webpack_require__(6656);
41936var uid = __webpack_require__(9711);
41937var NATIVE_SYMBOL = __webpack_require__(133);
41938var USE_SYMBOL_AS_UID = __webpack_require__(3307);
41939
41940var WellKnownSymbolsStore = shared('wks');
41941var Symbol = global.Symbol;
41942var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;
41943
41944module.exports = function (name) {
41945  if (!has(WellKnownSymbolsStore, name)) {
41946    if (NATIVE_SYMBOL && has(Symbol, name)) WellKnownSymbolsStore[name] = Symbol[name];
41947    else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
41948  } return WellKnownSymbolsStore[name];
41949};
41950
41951
41952/***/ }),
41953
41954/***/ 1361:
41955/***/ (function(module) {
41956
41957// a string of all valid unicode whitespaces
41958module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
41959  '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
41960
41961
41962/***/ }),
41963
41964/***/ 8264:
41965/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
41966
41967"use strict";
41968
41969var $ = __webpack_require__(2109);
41970var global = __webpack_require__(7854);
41971var arrayBufferModule = __webpack_require__(3331);
41972var setSpecies = __webpack_require__(6340);
41973
41974var ARRAY_BUFFER = 'ArrayBuffer';
41975var ArrayBuffer = arrayBufferModule[ARRAY_BUFFER];
41976var NativeArrayBuffer = global[ARRAY_BUFFER];
41977
41978// `ArrayBuffer` constructor
41979// https://tc39.es/ecma262/#sec-arraybuffer-constructor
41980$({ global: true, forced: NativeArrayBuffer !== ArrayBuffer }, {
41981  ArrayBuffer: ArrayBuffer
41982});
41983
41984setSpecies(ARRAY_BUFFER);
41985
41986
41987/***/ }),
41988
41989/***/ 2222:
41990/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
41991
41992"use strict";
41993
41994var $ = __webpack_require__(2109);
41995var fails = __webpack_require__(7293);
41996var isArray = __webpack_require__(3157);
41997var isObject = __webpack_require__(111);
41998var toObject = __webpack_require__(7908);
41999var toLength = __webpack_require__(7466);
42000var createProperty = __webpack_require__(6135);
42001var arraySpeciesCreate = __webpack_require__(5417);
42002var arrayMethodHasSpeciesSupport = __webpack_require__(1194);
42003var wellKnownSymbol = __webpack_require__(5112);
42004var V8_VERSION = __webpack_require__(7392);
42005
42006var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
42007var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
42008var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
42009
42010// We can't use this feature detection in V8 since it causes
42011// deoptimization and serious performance degradation
42012// https://github.com/zloirock/core-js/issues/679
42013var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {
42014  var array = [];
42015  array[IS_CONCAT_SPREADABLE] = false;
42016  return array.concat()[0] !== array;
42017});
42018
42019var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
42020
42021var isConcatSpreadable = function (O) {
42022  if (!isObject(O)) return false;
42023  var spreadable = O[IS_CONCAT_SPREADABLE];
42024  return spreadable !== undefined ? !!spreadable : isArray(O);
42025};
42026
42027var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
42028
42029// `Array.prototype.concat` method
42030// https://tc39.es/ecma262/#sec-array.prototype.concat
42031// with adding support of @@isConcatSpreadable and @@species
42032$({ target: 'Array', proto: true, forced: FORCED }, {
42033  // eslint-disable-next-line no-unused-vars -- required for `.length`
42034  concat: function concat(arg) {
42035    var O = toObject(this);
42036    var A = arraySpeciesCreate(O, 0);
42037    var n = 0;
42038    var i, k, length, len, E;
42039    for (i = -1, length = arguments.length; i < length; i++) {
42040      E = i === -1 ? O : arguments[i];
42041      if (isConcatSpreadable(E)) {
42042        len = toLength(E.length);
42043        if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
42044        for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
42045      } else {
42046        if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
42047        createProperty(A, n++, E);
42048      }
42049    }
42050    A.length = n;
42051    return A;
42052  }
42053});
42054
42055
42056/***/ }),
42057
42058/***/ 7327:
42059/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
42060
42061"use strict";
42062
42063var $ = __webpack_require__(2109);
42064var $filter = __webpack_require__(2092).filter;
42065var arrayMethodHasSpeciesSupport = __webpack_require__(1194);
42066
42067var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
42068
42069// `Array.prototype.filter` method
42070// https://tc39.es/ecma262/#sec-array.prototype.filter
42071// with adding support of @@species
42072$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
42073  filter: function filter(callbackfn /* , thisArg */) {
42074    return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
42075  }
42076});
42077
42078
42079/***/ }),
42080
42081/***/ 2772:
42082/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
42083
42084"use strict";
42085
42086var $ = __webpack_require__(2109);
42087var $indexOf = __webpack_require__(1318).indexOf;
42088var arrayMethodIsStrict = __webpack_require__(9341);
42089
42090var nativeIndexOf = [].indexOf;
42091
42092var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;
42093var STRICT_METHOD = arrayMethodIsStrict('indexOf');
42094
42095// `Array.prototype.indexOf` method
42096// https://tc39.es/ecma262/#sec-array.prototype.indexof
42097$({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD }, {
42098  indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
42099    return NEGATIVE_ZERO
42100      // convert -0 to +0
42101      ? nativeIndexOf.apply(this, arguments) || 0
42102      : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);
42103  }
42104});
42105
42106
42107/***/ }),
42108
42109/***/ 6992:
42110/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
42111
42112"use strict";
42113
42114var toIndexedObject = __webpack_require__(5656);
42115var addToUnscopables = __webpack_require__(1223);
42116var Iterators = __webpack_require__(7497);
42117var InternalStateModule = __webpack_require__(9909);
42118var defineIterator = __webpack_require__(654);
42119
42120var ARRAY_ITERATOR = 'Array Iterator';
42121var setInternalState = InternalStateModule.set;
42122var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
42123
42124// `Array.prototype.entries` method
42125// https://tc39.es/ecma262/#sec-array.prototype.entries
42126// `Array.prototype.keys` method
42127// https://tc39.es/ecma262/#sec-array.prototype.keys
42128// `Array.prototype.values` method
42129// https://tc39.es/ecma262/#sec-array.prototype.values
42130// `Array.prototype[@@iterator]` method
42131// https://tc39.es/ecma262/#sec-array.prototype-@@iterator
42132// `CreateArrayIterator` internal method
42133// https://tc39.es/ecma262/#sec-createarrayiterator
42134module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
42135  setInternalState(this, {
42136    type: ARRAY_ITERATOR,
42137    target: toIndexedObject(iterated), // target
42138    index: 0,                          // next index
42139    kind: kind                         // kind
42140  });
42141// `%ArrayIteratorPrototype%.next` method
42142// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
42143}, function () {
42144  var state = getInternalState(this);
42145  var target = state.target;
42146  var kind = state.kind;
42147  var index = state.index++;
42148  if (!target || index >= target.length) {
42149    state.target = undefined;
42150    return { value: undefined, done: true };
42151  }
42152  if (kind == 'keys') return { value: index, done: false };
42153  if (kind == 'values') return { value: target[index], done: false };
42154  return { value: [index, target[index]], done: false };
42155}, 'values');
42156
42157// argumentsList[@@iterator] is %ArrayProto_values%
42158// https://tc39.es/ecma262/#sec-createunmappedargumentsobject
42159// https://tc39.es/ecma262/#sec-createmappedargumentsobject
42160Iterators.Arguments = Iterators.Array;
42161
42162// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
42163addToUnscopables('keys');
42164addToUnscopables('values');
42165addToUnscopables('entries');
42166
42167
42168/***/ }),
42169
42170/***/ 1249:
42171/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
42172
42173"use strict";
42174
42175var $ = __webpack_require__(2109);
42176var $map = __webpack_require__(2092).map;
42177var arrayMethodHasSpeciesSupport = __webpack_require__(1194);
42178
42179var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
42180
42181// `Array.prototype.map` method
42182// https://tc39.es/ecma262/#sec-array.prototype.map
42183// with adding support of @@species
42184$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
42185  map: function map(callbackfn /* , thisArg */) {
42186    return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
42187  }
42188});
42189
42190
42191/***/ }),
42192
42193/***/ 7042:
42194/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
42195
42196"use strict";
42197
42198var $ = __webpack_require__(2109);
42199var isObject = __webpack_require__(111);
42200var isArray = __webpack_require__(3157);
42201var toAbsoluteIndex = __webpack_require__(1400);
42202var toLength = __webpack_require__(7466);
42203var toIndexedObject = __webpack_require__(5656);
42204var createProperty = __webpack_require__(6135);
42205var wellKnownSymbol = __webpack_require__(5112);
42206var arrayMethodHasSpeciesSupport = __webpack_require__(1194);
42207
42208var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');
42209
42210var SPECIES = wellKnownSymbol('species');
42211var nativeSlice = [].slice;
42212var max = Math.max;
42213
42214// `Array.prototype.slice` method
42215// https://tc39.es/ecma262/#sec-array.prototype.slice
42216// fallback for not array-like ES3 strings and DOM objects
42217$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
42218  slice: function slice(start, end) {
42219    var O = toIndexedObject(this);
42220    var length = toLength(O.length);
42221    var k = toAbsoluteIndex(start, length);
42222    var fin = toAbsoluteIndex(end === undefined ? length : end, length);
42223    // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
42224    var Constructor, result, n;
42225    if (isArray(O)) {
42226      Constructor = O.constructor;
42227      // cross-realm fallback
42228      if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {
42229        Constructor = undefined;
42230      } else if (isObject(Constructor)) {
42231        Constructor = Constructor[SPECIES];
42232        if (Constructor === null) Constructor = undefined;
42233      }
42234      if (Constructor === Array || Constructor === undefined) {
42235        return nativeSlice.call(O, k, fin);
42236      }
42237    }
42238    result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));
42239    for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
42240    result.length = n;
42241    return result;
42242  }
42243});
42244
42245
42246/***/ }),
42247
42248/***/ 561:
42249/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
42250
42251"use strict";
42252
42253var $ = __webpack_require__(2109);
42254var toAbsoluteIndex = __webpack_require__(1400);
42255var toInteger = __webpack_require__(9958);
42256var toLength = __webpack_require__(7466);
42257var toObject = __webpack_require__(7908);
42258var arraySpeciesCreate = __webpack_require__(5417);
42259var createProperty = __webpack_require__(6135);
42260var arrayMethodHasSpeciesSupport = __webpack_require__(1194);
42261
42262var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');
42263
42264var max = Math.max;
42265var min = Math.min;
42266var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
42267var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';
42268
42269// `Array.prototype.splice` method
42270// https://tc39.es/ecma262/#sec-array.prototype.splice
42271// with adding support of @@species
42272$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
42273  splice: function splice(start, deleteCount /* , ...items */) {
42274    var O = toObject(this);
42275    var len = toLength(O.length);
42276    var actualStart = toAbsoluteIndex(start, len);
42277    var argumentsLength = arguments.length;
42278    var insertCount, actualDeleteCount, A, k, from, to;
42279    if (argumentsLength === 0) {
42280      insertCount = actualDeleteCount = 0;
42281    } else if (argumentsLength === 1) {
42282      insertCount = 0;
42283      actualDeleteCount = len - actualStart;
42284    } else {
42285      insertCount = argumentsLength - 2;
42286      actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart);
42287    }
42288    if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {
42289      throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);
42290    }
42291    A = arraySpeciesCreate(O, actualDeleteCount);
42292    for (k = 0; k < actualDeleteCount; k++) {
42293      from = actualStart + k;
42294      if (from in O) createProperty(A, k, O[from]);
42295    }
42296    A.length = actualDeleteCount;
42297    if (insertCount < actualDeleteCount) {
42298      for (k = actualStart; k < len - actualDeleteCount; k++) {
42299        from = k + actualDeleteCount;
42300        to = k + insertCount;
42301        if (from in O) O[to] = O[from];
42302        else delete O[to];
42303      }
42304      for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];
42305    } else if (insertCount > actualDeleteCount) {
42306      for (k = len - actualDeleteCount; k > actualStart; k--) {
42307        from = k + actualDeleteCount - 1;
42308        to = k + insertCount - 1;
42309        if (from in O) O[to] = O[from];
42310        else delete O[to];
42311      }
42312    }
42313    for (k = 0; k < insertCount; k++) {
42314      O[k + actualStart] = arguments[k + 2];
42315    }
42316    O.length = len - actualDeleteCount + insertCount;
42317    return A;
42318  }
42319});
42320
42321
42322/***/ }),
42323
42324/***/ 8309:
42325/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
42326
42327var DESCRIPTORS = __webpack_require__(9781);
42328var defineProperty = __webpack_require__(3070).f;
42329
42330var FunctionPrototype = Function.prototype;
42331var FunctionPrototypeToString = FunctionPrototype.toString;
42332var nameRE = /^\s*function ([^ (]*)/;
42333var NAME = 'name';
42334
42335// Function instances `.name` property
42336// https://tc39.es/ecma262/#sec-function-instances-name
42337if (DESCRIPTORS && !(NAME in FunctionPrototype)) {
42338  defineProperty(FunctionPrototype, NAME, {
42339    configurable: true,
42340    get: function () {
42341      try {
42342        return FunctionPrototypeToString.call(this).match(nameRE)[1];
42343      } catch (error) {
42344        return '';
42345      }
42346    }
42347  });
42348}
42349
42350
42351/***/ }),
42352
42353/***/ 489:
42354/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
42355
42356var $ = __webpack_require__(2109);
42357var fails = __webpack_require__(7293);
42358var toObject = __webpack_require__(7908);
42359var nativeGetPrototypeOf = __webpack_require__(9518);
42360var CORRECT_PROTOTYPE_GETTER = __webpack_require__(8544);
42361
42362var FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); });
42363
42364// `Object.getPrototypeOf` method
42365// https://tc39.es/ecma262/#sec-object.getprototypeof
42366$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, {
42367  getPrototypeOf: function getPrototypeOf(it) {
42368    return nativeGetPrototypeOf(toObject(it));
42369  }
42370});
42371
42372
42373
42374/***/ }),
42375
42376/***/ 1539:
42377/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
42378
42379var TO_STRING_TAG_SUPPORT = __webpack_require__(1694);
42380var redefine = __webpack_require__(1320);
42381var toString = __webpack_require__(288);
42382
42383// `Object.prototype.toString` method
42384// https://tc39.es/ecma262/#sec-object.prototype.tostring
42385if (!TO_STRING_TAG_SUPPORT) {
42386  redefine(Object.prototype, 'toString', toString, { unsafe: true });
42387}
42388
42389
42390/***/ }),
42391
42392/***/ 4916:
42393/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
42394
42395"use strict";
42396
42397var $ = __webpack_require__(2109);
42398var exec = __webpack_require__(2261);
42399
42400// `RegExp.prototype.exec` method
42401// https://tc39.es/ecma262/#sec-regexp.prototype.exec
42402$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
42403  exec: exec
42404});
42405
42406
42407/***/ }),
42408
42409/***/ 9714:
42410/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
42411
42412"use strict";
42413
42414var redefine = __webpack_require__(1320);
42415var anObject = __webpack_require__(9670);
42416var fails = __webpack_require__(7293);
42417var flags = __webpack_require__(7066);
42418
42419var TO_STRING = 'toString';
42420var RegExpPrototype = RegExp.prototype;
42421var nativeToString = RegExpPrototype[TO_STRING];
42422
42423var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
42424// FF44- RegExp#toString has a wrong name
42425var INCORRECT_NAME = nativeToString.name != TO_STRING;
42426
42427// `RegExp.prototype.toString` method
42428// https://tc39.es/ecma262/#sec-regexp.prototype.tostring
42429if (NOT_GENERIC || INCORRECT_NAME) {
42430  redefine(RegExp.prototype, TO_STRING, function toString() {
42431    var R = anObject(this);
42432    var p = String(R.source);
42433    var rf = R.flags;
42434    var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf);
42435    return '/' + p + '/' + f;
42436  }, { unsafe: true });
42437}
42438
42439
42440/***/ }),
42441
42442/***/ 8783:
42443/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
42444
42445"use strict";
42446
42447var charAt = __webpack_require__(8710).charAt;
42448var InternalStateModule = __webpack_require__(9909);
42449var defineIterator = __webpack_require__(654);
42450
42451var STRING_ITERATOR = 'String Iterator';
42452var setInternalState = InternalStateModule.set;
42453var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);
42454
42455// `String.prototype[@@iterator]` method
42456// https://tc39.es/ecma262/#sec-string.prototype-@@iterator
42457defineIterator(String, 'String', function (iterated) {
42458  setInternalState(this, {
42459    type: STRING_ITERATOR,
42460    string: String(iterated),
42461    index: 0
42462  });
42463// `%StringIteratorPrototype%.next` method
42464// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
42465}, function next() {
42466  var state = getInternalState(this);
42467  var string = state.string;
42468  var index = state.index;
42469  var point;
42470  if (index >= string.length) return { value: undefined, done: true };
42471  point = charAt(string, index);
42472  state.index += point.length;
42473  return { value: point, done: false };
42474});
42475
42476
42477/***/ }),
42478
42479/***/ 4723:
42480/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
42481
42482"use strict";
42483
42484var fixRegExpWellKnownSymbolLogic = __webpack_require__(7007);
42485var anObject = __webpack_require__(9670);
42486var toLength = __webpack_require__(7466);
42487var requireObjectCoercible = __webpack_require__(4488);
42488var advanceStringIndex = __webpack_require__(1530);
42489var regExpExec = __webpack_require__(7651);
42490
42491// @@match logic
42492fixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {
42493  return [
42494    // `String.prototype.match` method
42495    // https://tc39.es/ecma262/#sec-string.prototype.match
42496    function match(regexp) {
42497      var O = requireObjectCoercible(this);
42498      var matcher = regexp == undefined ? undefined : regexp[MATCH];
42499      return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
42500    },
42501    // `RegExp.prototype[@@match]` method
42502    // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
42503    function (regexp) {
42504      var res = maybeCallNative(nativeMatch, regexp, this);
42505      if (res.done) return res.value;
42506
42507      var rx = anObject(regexp);
42508      var S = String(this);
42509
42510      if (!rx.global) return regExpExec(rx, S);
42511
42512      var fullUnicode = rx.unicode;
42513      rx.lastIndex = 0;
42514      var A = [];
42515      var n = 0;
42516      var result;
42517      while ((result = regExpExec(rx, S)) !== null) {
42518        var matchStr = String(result[0]);
42519        A[n] = matchStr;
42520        if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
42521        n++;
42522      }
42523      return n === 0 ? null : A;
42524    }
42525  ];
42526});
42527
42528
42529/***/ }),
42530
42531/***/ 5306:
42532/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
42533
42534"use strict";
42535
42536var fixRegExpWellKnownSymbolLogic = __webpack_require__(7007);
42537var anObject = __webpack_require__(9670);
42538var toLength = __webpack_require__(7466);
42539var toInteger = __webpack_require__(9958);
42540var requireObjectCoercible = __webpack_require__(4488);
42541var advanceStringIndex = __webpack_require__(1530);
42542var getSubstitution = __webpack_require__(647);
42543var regExpExec = __webpack_require__(7651);
42544
42545var max = Math.max;
42546var min = Math.min;
42547
42548var maybeToString = function (it) {
42549  return it === undefined ? it : String(it);
42550};
42551
42552// @@replace logic
42553fixRegExpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {
42554  var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;
42555  var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;
42556  var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
42557
42558  return [
42559    // `String.prototype.replace` method
42560    // https://tc39.es/ecma262/#sec-string.prototype.replace
42561    function replace(searchValue, replaceValue) {
42562      var O = requireObjectCoercible(this);
42563      var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
42564      return replacer !== undefined
42565        ? replacer.call(searchValue, O, replaceValue)
42566        : nativeReplace.call(String(O), searchValue, replaceValue);
42567    },
42568    // `RegExp.prototype[@@replace]` method
42569    // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
42570    function (regexp, replaceValue) {
42571      if (
42572        (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||
42573        (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1)
42574      ) {
42575        var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
42576        if (res.done) return res.value;
42577      }
42578
42579      var rx = anObject(regexp);
42580      var S = String(this);
42581
42582      var functionalReplace = typeof replaceValue === 'function';
42583      if (!functionalReplace) replaceValue = String(replaceValue);
42584
42585      var global = rx.global;
42586      if (global) {
42587        var fullUnicode = rx.unicode;
42588        rx.lastIndex = 0;
42589      }
42590      var results = [];
42591      while (true) {
42592        var result = regExpExec(rx, S);
42593        if (result === null) break;
42594
42595        results.push(result);
42596        if (!global) break;
42597
42598        var matchStr = String(result[0]);
42599        if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
42600      }
42601
42602      var accumulatedResult = '';
42603      var nextSourcePosition = 0;
42604      for (var i = 0; i < results.length; i++) {
42605        result = results[i];
42606
42607        var matched = String(result[0]);
42608        var position = max(min(toInteger(result.index), S.length), 0);
42609        var captures = [];
42610        // NOTE: This is equivalent to
42611        //   captures = result.slice(1).map(maybeToString)
42612        // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
42613        // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
42614        // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
42615        for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
42616        var namedCaptures = result.groups;
42617        if (functionalReplace) {
42618          var replacerArgs = [matched].concat(captures, position, S);
42619          if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
42620          var replacement = String(replaceValue.apply(undefined, replacerArgs));
42621        } else {
42622          replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
42623        }
42624        if (position >= nextSourcePosition) {
42625          accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
42626          nextSourcePosition = position + matched.length;
42627        }
42628      }
42629      return accumulatedResult + S.slice(nextSourcePosition);
42630    }
42631  ];
42632});
42633
42634
42635/***/ }),
42636
42637/***/ 3123:
42638/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
42639
42640"use strict";
42641
42642var fixRegExpWellKnownSymbolLogic = __webpack_require__(7007);
42643var isRegExp = __webpack_require__(7850);
42644var anObject = __webpack_require__(9670);
42645var requireObjectCoercible = __webpack_require__(4488);
42646var speciesConstructor = __webpack_require__(6707);
42647var advanceStringIndex = __webpack_require__(1530);
42648var toLength = __webpack_require__(7466);
42649var callRegExpExec = __webpack_require__(7651);
42650var regexpExec = __webpack_require__(2261);
42651var fails = __webpack_require__(7293);
42652
42653var arrayPush = [].push;
42654var min = Math.min;
42655var MAX_UINT32 = 0xFFFFFFFF;
42656
42657// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
42658var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); });
42659
42660// @@split logic
42661fixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {
42662  var internalSplit;
42663  if (
42664    'abbc'.split(/(b)*/)[1] == 'c' ||
42665    // eslint-disable-next-line regexp/no-empty-group -- required for testing
42666    'test'.split(/(?:)/, -1).length != 4 ||
42667    'ab'.split(/(?:ab)*/).length != 2 ||
42668    '.'.split(/(.?)(.?)/).length != 4 ||
42669    // eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing
42670    '.'.split(/()()/).length > 1 ||
42671    ''.split(/.?/).length
42672  ) {
42673    // based on es5-shim implementation, need to rework it
42674    internalSplit = function (separator, limit) {
42675      var string = String(requireObjectCoercible(this));
42676      var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
42677      if (lim === 0) return [];
42678      if (separator === undefined) return [string];
42679      // If `separator` is not a regex, use native split
42680      if (!isRegExp(separator)) {
42681        return nativeSplit.call(string, separator, lim);
42682      }
42683      var output = [];
42684      var flags = (separator.ignoreCase ? 'i' : '') +
42685                  (separator.multiline ? 'm' : '') +
42686                  (separator.unicode ? 'u' : '') +
42687                  (separator.sticky ? 'y' : '');
42688      var lastLastIndex = 0;
42689      // Make `global` and avoid `lastIndex` issues by working with a copy
42690      var separatorCopy = new RegExp(separator.source, flags + 'g');
42691      var match, lastIndex, lastLength;
42692      while (match = regexpExec.call(separatorCopy, string)) {
42693        lastIndex = separatorCopy.lastIndex;
42694        if (lastIndex > lastLastIndex) {
42695          output.push(string.slice(lastLastIndex, match.index));
42696          if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));
42697          lastLength = match[0].length;
42698          lastLastIndex = lastIndex;
42699          if (output.length >= lim) break;
42700        }
42701        if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
42702      }
42703      if (lastLastIndex === string.length) {
42704        if (lastLength || !separatorCopy.test('')) output.push('');
42705      } else output.push(string.slice(lastLastIndex));
42706      return output.length > lim ? output.slice(0, lim) : output;
42707    };
42708  // Chakra, V8
42709  } else if ('0'.split(undefined, 0).length) {
42710    internalSplit = function (separator, limit) {
42711      return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);
42712    };
42713  } else internalSplit = nativeSplit;
42714
42715  return [
42716    // `String.prototype.split` method
42717    // https://tc39.es/ecma262/#sec-string.prototype.split
42718    function split(separator, limit) {
42719      var O = requireObjectCoercible(this);
42720      var splitter = separator == undefined ? undefined : separator[SPLIT];
42721      return splitter !== undefined
42722        ? splitter.call(separator, O, limit)
42723        : internalSplit.call(String(O), separator, limit);
42724    },
42725    // `RegExp.prototype[@@split]` method
42726    // https://tc39.es/ecma262/#sec-regexp.prototype-@@split
42727    //
42728    // NOTE: This cannot be properly polyfilled in engines that don't support
42729    // the 'y' flag.
42730    function (regexp, limit) {
42731      var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);
42732      if (res.done) return res.value;
42733
42734      var rx = anObject(regexp);
42735      var S = String(this);
42736      var C = speciesConstructor(rx, RegExp);
42737
42738      var unicodeMatching = rx.unicode;
42739      var flags = (rx.ignoreCase ? 'i' : '') +
42740                  (rx.multiline ? 'm' : '') +
42741                  (rx.unicode ? 'u' : '') +
42742                  (SUPPORTS_Y ? 'y' : 'g');
42743
42744      // ^(? + rx + ) is needed, in combination with some S slicing, to
42745      // simulate the 'y' flag.
42746      var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
42747      var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
42748      if (lim === 0) return [];
42749      if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
42750      var p = 0;
42751      var q = 0;
42752      var A = [];
42753      while (q < S.length) {
42754        splitter.lastIndex = SUPPORTS_Y ? q : 0;
42755        var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));
42756        var e;
42757        if (
42758          z === null ||
42759          (e = min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p
42760        ) {
42761          q = advanceStringIndex(S, q, unicodeMatching);
42762        } else {
42763          A.push(S.slice(p, q));
42764          if (A.length === lim) return A;
42765          for (var i = 1; i <= z.length - 1; i++) {
42766            A.push(z[i]);
42767            if (A.length === lim) return A;
42768          }
42769          q = p = e;
42770        }
42771      }
42772      A.push(S.slice(p));
42773      return A;
42774    }
42775  ];
42776}, !SUPPORTS_Y);
42777
42778
42779/***/ }),
42780
42781/***/ 3210:
42782/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
42783
42784"use strict";
42785
42786var $ = __webpack_require__(2109);
42787var $trim = __webpack_require__(3111).trim;
42788var forcedStringTrimMethod = __webpack_require__(6091);
42789
42790// `String.prototype.trim` method
42791// https://tc39.es/ecma262/#sec-string.prototype.trim
42792$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
42793  trim: function trim() {
42794    return $trim(this);
42795  }
42796});
42797
42798
42799/***/ }),
42800
42801/***/ 2990:
42802/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
42803
42804"use strict";
42805
42806var ArrayBufferViewCore = __webpack_require__(260);
42807var $copyWithin = __webpack_require__(1048);
42808
42809var aTypedArray = ArrayBufferViewCore.aTypedArray;
42810var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
42811
42812// `%TypedArray%.prototype.copyWithin` method
42813// https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin
42814exportTypedArrayMethod('copyWithin', function copyWithin(target, start /* , end */) {
42815  return $copyWithin.call(aTypedArray(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
42816});
42817
42818
42819/***/ }),
42820
42821/***/ 8927:
42822/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
42823
42824"use strict";
42825
42826var ArrayBufferViewCore = __webpack_require__(260);
42827var $every = __webpack_require__(2092).every;
42828
42829var aTypedArray = ArrayBufferViewCore.aTypedArray;
42830var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
42831
42832// `%TypedArray%.prototype.every` method
42833// https://tc39.es/ecma262/#sec-%typedarray%.prototype.every
42834exportTypedArrayMethod('every', function every(callbackfn /* , thisArg */) {
42835  return $every(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
42836});
42837
42838
42839/***/ }),
42840
42841/***/ 3105:
42842/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
42843
42844"use strict";
42845
42846var ArrayBufferViewCore = __webpack_require__(260);
42847var $fill = __webpack_require__(1285);
42848
42849var aTypedArray = ArrayBufferViewCore.aTypedArray;
42850var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
42851
42852// `%TypedArray%.prototype.fill` method
42853// https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill
42854// eslint-disable-next-line no-unused-vars -- required for `.length`
42855exportTypedArrayMethod('fill', function fill(value /* , start, end */) {
42856  return $fill.apply(aTypedArray(this), arguments);
42857});
42858
42859
42860/***/ }),
42861
42862/***/ 5035:
42863/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
42864
42865"use strict";
42866
42867var ArrayBufferViewCore = __webpack_require__(260);
42868var $filter = __webpack_require__(2092).filter;
42869var fromSpeciesAndList = __webpack_require__(3074);
42870
42871var aTypedArray = ArrayBufferViewCore.aTypedArray;
42872var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
42873
42874// `%TypedArray%.prototype.filter` method
42875// https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter
42876exportTypedArrayMethod('filter', function filter(callbackfn /* , thisArg */) {
42877  var list = $filter(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
42878  return fromSpeciesAndList(this, list);
42879});
42880
42881
42882/***/ }),
42883
42884/***/ 7174:
42885/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
42886
42887"use strict";
42888
42889var ArrayBufferViewCore = __webpack_require__(260);
42890var $findIndex = __webpack_require__(2092).findIndex;
42891
42892var aTypedArray = ArrayBufferViewCore.aTypedArray;
42893var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
42894
42895// `%TypedArray%.prototype.findIndex` method
42896// https://tc39.es/ecma262/#sec-%typedarray%.prototype.findindex
42897exportTypedArrayMethod('findIndex', function findIndex(predicate /* , thisArg */) {
42898  return $findIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
42899});
42900
42901
42902/***/ }),
42903
42904/***/ 4345:
42905/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
42906
42907"use strict";
42908
42909var ArrayBufferViewCore = __webpack_require__(260);
42910var $find = __webpack_require__(2092).find;
42911
42912var aTypedArray = ArrayBufferViewCore.aTypedArray;
42913var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
42914
42915// `%TypedArray%.prototype.find` method
42916// https://tc39.es/ecma262/#sec-%typedarray%.prototype.find
42917exportTypedArrayMethod('find', function find(predicate /* , thisArg */) {
42918  return $find(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
42919});
42920
42921
42922/***/ }),
42923
42924/***/ 2846:
42925/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
42926
42927"use strict";
42928
42929var ArrayBufferViewCore = __webpack_require__(260);
42930var $forEach = __webpack_require__(2092).forEach;
42931
42932var aTypedArray = ArrayBufferViewCore.aTypedArray;
42933var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
42934
42935// `%TypedArray%.prototype.forEach` method
42936// https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach
42937exportTypedArrayMethod('forEach', function forEach(callbackfn /* , thisArg */) {
42938  $forEach(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
42939});
42940
42941
42942/***/ }),
42943
42944/***/ 4731:
42945/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
42946
42947"use strict";
42948
42949var ArrayBufferViewCore = __webpack_require__(260);
42950var $includes = __webpack_require__(1318).includes;
42951
42952var aTypedArray = ArrayBufferViewCore.aTypedArray;
42953var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
42954
42955// `%TypedArray%.prototype.includes` method
42956// https://tc39.es/ecma262/#sec-%typedarray%.prototype.includes
42957exportTypedArrayMethod('includes', function includes(searchElement /* , fromIndex */) {
42958  return $includes(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
42959});
42960
42961
42962/***/ }),
42963
42964/***/ 7209:
42965/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
42966
42967"use strict";
42968
42969var ArrayBufferViewCore = __webpack_require__(260);
42970var $indexOf = __webpack_require__(1318).indexOf;
42971
42972var aTypedArray = ArrayBufferViewCore.aTypedArray;
42973var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
42974
42975// `%TypedArray%.prototype.indexOf` method
42976// https://tc39.es/ecma262/#sec-%typedarray%.prototype.indexof
42977exportTypedArrayMethod('indexOf', function indexOf(searchElement /* , fromIndex */) {
42978  return $indexOf(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
42979});
42980
42981
42982/***/ }),
42983
42984/***/ 6319:
42985/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
42986
42987"use strict";
42988
42989var global = __webpack_require__(7854);
42990var ArrayBufferViewCore = __webpack_require__(260);
42991var ArrayIterators = __webpack_require__(6992);
42992var wellKnownSymbol = __webpack_require__(5112);
42993
42994var ITERATOR = wellKnownSymbol('iterator');
42995var Uint8Array = global.Uint8Array;
42996var arrayValues = ArrayIterators.values;
42997var arrayKeys = ArrayIterators.keys;
42998var arrayEntries = ArrayIterators.entries;
42999var aTypedArray = ArrayBufferViewCore.aTypedArray;
43000var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
43001var nativeTypedArrayIterator = Uint8Array && Uint8Array.prototype[ITERATOR];
43002
43003var CORRECT_ITER_NAME = !!nativeTypedArrayIterator
43004  && (nativeTypedArrayIterator.name == 'values' || nativeTypedArrayIterator.name == undefined);
43005
43006var typedArrayValues = function values() {
43007  return arrayValues.call(aTypedArray(this));
43008};
43009
43010// `%TypedArray%.prototype.entries` method
43011// https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries
43012exportTypedArrayMethod('entries', function entries() {
43013  return arrayEntries.call(aTypedArray(this));
43014});
43015// `%TypedArray%.prototype.keys` method
43016// https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys
43017exportTypedArrayMethod('keys', function keys() {
43018  return arrayKeys.call(aTypedArray(this));
43019});
43020// `%TypedArray%.prototype.values` method
43021// https://tc39.es/ecma262/#sec-%typedarray%.prototype.values
43022exportTypedArrayMethod('values', typedArrayValues, !CORRECT_ITER_NAME);
43023// `%TypedArray%.prototype[@@iterator]` method
43024// https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator
43025exportTypedArrayMethod(ITERATOR, typedArrayValues, !CORRECT_ITER_NAME);
43026
43027
43028/***/ }),
43029
43030/***/ 8867:
43031/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
43032
43033"use strict";
43034
43035var ArrayBufferViewCore = __webpack_require__(260);
43036
43037var aTypedArray = ArrayBufferViewCore.aTypedArray;
43038var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
43039var $join = [].join;
43040
43041// `%TypedArray%.prototype.join` method
43042// https://tc39.es/ecma262/#sec-%typedarray%.prototype.join
43043// eslint-disable-next-line no-unused-vars -- required for `.length`
43044exportTypedArrayMethod('join', function join(separator) {
43045  return $join.apply(aTypedArray(this), arguments);
43046});
43047
43048
43049/***/ }),
43050
43051/***/ 7789:
43052/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
43053
43054"use strict";
43055
43056var ArrayBufferViewCore = __webpack_require__(260);
43057var $lastIndexOf = __webpack_require__(6583);
43058
43059var aTypedArray = ArrayBufferViewCore.aTypedArray;
43060var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
43061
43062// `%TypedArray%.prototype.lastIndexOf` method
43063// https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof
43064// eslint-disable-next-line no-unused-vars -- required for `.length`
43065exportTypedArrayMethod('lastIndexOf', function lastIndexOf(searchElement /* , fromIndex */) {
43066  return $lastIndexOf.apply(aTypedArray(this), arguments);
43067});
43068
43069
43070/***/ }),
43071
43072/***/ 3739:
43073/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
43074
43075"use strict";
43076
43077var ArrayBufferViewCore = __webpack_require__(260);
43078var $map = __webpack_require__(2092).map;
43079var speciesConstructor = __webpack_require__(6707);
43080
43081var aTypedArray = ArrayBufferViewCore.aTypedArray;
43082var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
43083var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
43084
43085// `%TypedArray%.prototype.map` method
43086// https://tc39.es/ecma262/#sec-%typedarray%.prototype.map
43087exportTypedArrayMethod('map', function map(mapfn /* , thisArg */) {
43088  return $map(aTypedArray(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) {
43089    return new (aTypedArrayConstructor(speciesConstructor(O, O.constructor)))(length);
43090  });
43091});
43092
43093
43094/***/ }),
43095
43096/***/ 4483:
43097/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
43098
43099"use strict";
43100
43101var ArrayBufferViewCore = __webpack_require__(260);
43102var $reduceRight = __webpack_require__(3671).right;
43103
43104var aTypedArray = ArrayBufferViewCore.aTypedArray;
43105var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
43106
43107// `%TypedArray%.prototype.reduceRicht` method
43108// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduceright
43109exportTypedArrayMethod('reduceRight', function reduceRight(callbackfn /* , initialValue */) {
43110  return $reduceRight(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
43111});
43112
43113
43114/***/ }),
43115
43116/***/ 9368:
43117/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
43118
43119"use strict";
43120
43121var ArrayBufferViewCore = __webpack_require__(260);
43122var $reduce = __webpack_require__(3671).left;
43123
43124var aTypedArray = ArrayBufferViewCore.aTypedArray;
43125var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
43126
43127// `%TypedArray%.prototype.reduce` method
43128// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce
43129exportTypedArrayMethod('reduce', function reduce(callbackfn /* , initialValue */) {
43130  return $reduce(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
43131});
43132
43133
43134/***/ }),
43135
43136/***/ 2056:
43137/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
43138
43139"use strict";
43140
43141var ArrayBufferViewCore = __webpack_require__(260);
43142
43143var aTypedArray = ArrayBufferViewCore.aTypedArray;
43144var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
43145var floor = Math.floor;
43146
43147// `%TypedArray%.prototype.reverse` method
43148// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse
43149exportTypedArrayMethod('reverse', function reverse() {
43150  var that = this;
43151  var length = aTypedArray(that).length;
43152  var middle = floor(length / 2);
43153  var index = 0;
43154  var value;
43155  while (index < middle) {
43156    value = that[index];
43157    that[index++] = that[--length];
43158    that[length] = value;
43159  } return that;
43160});
43161
43162
43163/***/ }),
43164
43165/***/ 3462:
43166/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
43167
43168"use strict";
43169
43170var ArrayBufferViewCore = __webpack_require__(260);
43171var toLength = __webpack_require__(7466);
43172var toOffset = __webpack_require__(4590);
43173var toObject = __webpack_require__(7908);
43174var fails = __webpack_require__(7293);
43175
43176var aTypedArray = ArrayBufferViewCore.aTypedArray;
43177var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
43178
43179var FORCED = fails(function () {
43180  /* global Int8Array -- safe */
43181  new Int8Array(1).set({});
43182});
43183
43184// `%TypedArray%.prototype.set` method
43185// https://tc39.es/ecma262/#sec-%typedarray%.prototype.set
43186exportTypedArrayMethod('set', function set(arrayLike /* , offset */) {
43187  aTypedArray(this);
43188  var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);
43189  var length = this.length;
43190  var src = toObject(arrayLike);
43191  var len = toLength(src.length);
43192  var index = 0;
43193  if (len + offset > length) throw RangeError('Wrong length');
43194  while (index < len) this[offset + index] = src[index++];
43195}, FORCED);
43196
43197
43198/***/ }),
43199
43200/***/ 678:
43201/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
43202
43203"use strict";
43204
43205var ArrayBufferViewCore = __webpack_require__(260);
43206var speciesConstructor = __webpack_require__(6707);
43207var fails = __webpack_require__(7293);
43208
43209var aTypedArray = ArrayBufferViewCore.aTypedArray;
43210var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
43211var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
43212var $slice = [].slice;
43213
43214var FORCED = fails(function () {
43215  /* global Int8Array -- safe */
43216  new Int8Array(1).slice();
43217});
43218
43219// `%TypedArray%.prototype.slice` method
43220// https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice
43221exportTypedArrayMethod('slice', function slice(start, end) {
43222  var list = $slice.call(aTypedArray(this), start, end);
43223  var C = speciesConstructor(this, this.constructor);
43224  var index = 0;
43225  var length = list.length;
43226  var result = new (aTypedArrayConstructor(C))(length);
43227  while (length > index) result[index] = list[index++];
43228  return result;
43229}, FORCED);
43230
43231
43232/***/ }),
43233
43234/***/ 7462:
43235/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
43236
43237"use strict";
43238
43239var ArrayBufferViewCore = __webpack_require__(260);
43240var $some = __webpack_require__(2092).some;
43241
43242var aTypedArray = ArrayBufferViewCore.aTypedArray;
43243var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
43244
43245// `%TypedArray%.prototype.some` method
43246// https://tc39.es/ecma262/#sec-%typedarray%.prototype.some
43247exportTypedArrayMethod('some', function some(callbackfn /* , thisArg */) {
43248  return $some(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
43249});
43250
43251
43252/***/ }),
43253
43254/***/ 3824:
43255/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
43256
43257"use strict";
43258
43259var ArrayBufferViewCore = __webpack_require__(260);
43260
43261var aTypedArray = ArrayBufferViewCore.aTypedArray;
43262var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
43263var $sort = [].sort;
43264
43265// `%TypedArray%.prototype.sort` method
43266// https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort
43267exportTypedArrayMethod('sort', function sort(comparefn) {
43268  return $sort.call(aTypedArray(this), comparefn);
43269});
43270
43271
43272/***/ }),
43273
43274/***/ 5021:
43275/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
43276
43277"use strict";
43278
43279var ArrayBufferViewCore = __webpack_require__(260);
43280var toLength = __webpack_require__(7466);
43281var toAbsoluteIndex = __webpack_require__(1400);
43282var speciesConstructor = __webpack_require__(6707);
43283
43284var aTypedArray = ArrayBufferViewCore.aTypedArray;
43285var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
43286
43287// `%TypedArray%.prototype.subarray` method
43288// https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray
43289exportTypedArrayMethod('subarray', function subarray(begin, end) {
43290  var O = aTypedArray(this);
43291  var length = O.length;
43292  var beginIndex = toAbsoluteIndex(begin, length);
43293  return new (speciesConstructor(O, O.constructor))(
43294    O.buffer,
43295    O.byteOffset + beginIndex * O.BYTES_PER_ELEMENT,
43296    toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - beginIndex)
43297  );
43298});
43299
43300
43301/***/ }),
43302
43303/***/ 2974:
43304/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
43305
43306"use strict";
43307
43308var global = __webpack_require__(7854);
43309var ArrayBufferViewCore = __webpack_require__(260);
43310var fails = __webpack_require__(7293);
43311
43312var Int8Array = global.Int8Array;
43313var aTypedArray = ArrayBufferViewCore.aTypedArray;
43314var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
43315var $toLocaleString = [].toLocaleString;
43316var $slice = [].slice;
43317
43318// iOS Safari 6.x fails here
43319var TO_LOCALE_STRING_BUG = !!Int8Array && fails(function () {
43320  $toLocaleString.call(new Int8Array(1));
43321});
43322
43323var FORCED = fails(function () {
43324  return [1, 2].toLocaleString() != new Int8Array([1, 2]).toLocaleString();
43325}) || !fails(function () {
43326  Int8Array.prototype.toLocaleString.call([1, 2]);
43327});
43328
43329// `%TypedArray%.prototype.toLocaleString` method
43330// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring
43331exportTypedArrayMethod('toLocaleString', function toLocaleString() {
43332  return $toLocaleString.apply(TO_LOCALE_STRING_BUG ? $slice.call(aTypedArray(this)) : aTypedArray(this), arguments);
43333}, FORCED);
43334
43335
43336/***/ }),
43337
43338/***/ 5016:
43339/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
43340
43341"use strict";
43342
43343var exportTypedArrayMethod = __webpack_require__(260).exportTypedArrayMethod;
43344var fails = __webpack_require__(7293);
43345var global = __webpack_require__(7854);
43346
43347var Uint8Array = global.Uint8Array;
43348var Uint8ArrayPrototype = Uint8Array && Uint8Array.prototype || {};
43349var arrayToString = [].toString;
43350var arrayJoin = [].join;
43351
43352if (fails(function () { arrayToString.call({}); })) {
43353  arrayToString = function toString() {
43354    return arrayJoin.call(this);
43355  };
43356}
43357
43358var IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString;
43359
43360// `%TypedArray%.prototype.toString` method
43361// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring
43362exportTypedArrayMethod('toString', arrayToString, IS_NOT_ARRAY_METHOD);
43363
43364
43365/***/ }),
43366
43367/***/ 2472:
43368/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
43369
43370var createTypedArrayConstructor = __webpack_require__(9843);
43371
43372// `Uint8Array` constructor
43373// https://tc39.es/ecma262/#sec-typedarray-objects
43374createTypedArrayConstructor('Uint8', function (init) {
43375  return function Uint8Array(data, byteOffset, length) {
43376    return init(this, data, byteOffset, length);
43377  };
43378});
43379
43380
43381/***/ }),
43382
43383/***/ 4747:
43384/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
43385
43386var global = __webpack_require__(7854);
43387var DOMIterables = __webpack_require__(8324);
43388var forEach = __webpack_require__(8533);
43389var createNonEnumerableProperty = __webpack_require__(8880);
43390
43391for (var COLLECTION_NAME in DOMIterables) {
43392  var Collection = global[COLLECTION_NAME];
43393  var CollectionPrototype = Collection && Collection.prototype;
43394  // some Chrome versions have non-configurable methods on DOMTokenList
43395  if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
43396    createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
43397  } catch (error) {
43398    CollectionPrototype.forEach = forEach;
43399  }
43400}
43401
43402
43403/***/ }),
43404
43405/***/ 3948:
43406/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
43407
43408var global = __webpack_require__(7854);
43409var DOMIterables = __webpack_require__(8324);
43410var ArrayIteratorMethods = __webpack_require__(6992);
43411var createNonEnumerableProperty = __webpack_require__(8880);
43412var wellKnownSymbol = __webpack_require__(5112);
43413
43414var ITERATOR = wellKnownSymbol('iterator');
43415var TO_STRING_TAG = wellKnownSymbol('toStringTag');
43416var ArrayValues = ArrayIteratorMethods.values;
43417
43418for (var COLLECTION_NAME in DOMIterables) {
43419  var Collection = global[COLLECTION_NAME];
43420  var CollectionPrototype = Collection && Collection.prototype;
43421  if (CollectionPrototype) {
43422    // some Chrome versions have non-configurable methods on DOMTokenList
43423    if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
43424      createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
43425    } catch (error) {
43426      CollectionPrototype[ITERATOR] = ArrayValues;
43427    }
43428    if (!CollectionPrototype[TO_STRING_TAG]) {
43429      createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
43430    }
43431    if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
43432      // some Chrome versions have non-configurable methods on DOMTokenList
43433      if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
43434        createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
43435      } catch (error) {
43436        CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
43437      }
43438    }
43439  }
43440}
43441
43442
43443/***/ }),
43444
43445/***/ 1637:
43446/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
43447
43448"use strict";
43449
43450// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
43451__webpack_require__(6992);
43452var $ = __webpack_require__(2109);
43453var getBuiltIn = __webpack_require__(5005);
43454var USE_NATIVE_URL = __webpack_require__(590);
43455var redefine = __webpack_require__(1320);
43456var redefineAll = __webpack_require__(2248);
43457var setToStringTag = __webpack_require__(8003);
43458var createIteratorConstructor = __webpack_require__(4994);
43459var InternalStateModule = __webpack_require__(9909);
43460var anInstance = __webpack_require__(5787);
43461var hasOwn = __webpack_require__(6656);
43462var bind = __webpack_require__(9974);
43463var classof = __webpack_require__(648);
43464var anObject = __webpack_require__(9670);
43465var isObject = __webpack_require__(111);
43466var create = __webpack_require__(30);
43467var createPropertyDescriptor = __webpack_require__(9114);
43468var getIterator = __webpack_require__(8554);
43469var getIteratorMethod = __webpack_require__(1246);
43470var wellKnownSymbol = __webpack_require__(5112);
43471
43472var $fetch = getBuiltIn('fetch');
43473var Headers = getBuiltIn('Headers');
43474var ITERATOR = wellKnownSymbol('iterator');
43475var URL_SEARCH_PARAMS = 'URLSearchParams';
43476var URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';
43477var setInternalState = InternalStateModule.set;
43478var getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS);
43479var getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR);
43480
43481var plus = /\+/g;
43482var sequences = Array(4);
43483
43484var percentSequence = function (bytes) {
43485  return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\da-f]{2}){' + bytes + '})', 'gi'));
43486};
43487
43488var percentDecode = function (sequence) {
43489  try {
43490    return decodeURIComponent(sequence);
43491  } catch (error) {
43492    return sequence;
43493  }
43494};
43495
43496var deserialize = function (it) {
43497  var result = it.replace(plus, ' ');
43498  var bytes = 4;
43499  try {
43500    return decodeURIComponent(result);
43501  } catch (error) {
43502    while (bytes) {
43503      result = result.replace(percentSequence(bytes--), percentDecode);
43504    }
43505    return result;
43506  }
43507};
43508
43509var find = /[!'()~]|%20/g;
43510
43511var replace = {
43512  '!': '%21',
43513  "'": '%27',
43514  '(': '%28',
43515  ')': '%29',
43516  '~': '%7E',
43517  '%20': '+'
43518};
43519
43520var replacer = function (match) {
43521  return replace[match];
43522};
43523
43524var serialize = function (it) {
43525  return encodeURIComponent(it).replace(find, replacer);
43526};
43527
43528var parseSearchParams = function (result, query) {
43529  if (query) {
43530    var attributes = query.split('&');
43531    var index = 0;
43532    var attribute, entry;
43533    while (index < attributes.length) {
43534      attribute = attributes[index++];
43535      if (attribute.length) {
43536        entry = attribute.split('=');
43537        result.push({
43538          key: deserialize(entry.shift()),
43539          value: deserialize(entry.join('='))
43540        });
43541      }
43542    }
43543  }
43544};
43545
43546var updateSearchParams = function (query) {
43547  this.entries.length = 0;
43548  parseSearchParams(this.entries, query);
43549};
43550
43551var validateArgumentsLength = function (passed, required) {
43552  if (passed < required) throw TypeError('Not enough arguments');
43553};
43554
43555var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {
43556  setInternalState(this, {
43557    type: URL_SEARCH_PARAMS_ITERATOR,
43558    iterator: getIterator(getInternalParamsState(params).entries),
43559    kind: kind
43560  });
43561}, 'Iterator', function next() {
43562  var state = getInternalIteratorState(this);
43563  var kind = state.kind;
43564  var step = state.iterator.next();
43565  var entry = step.value;
43566  if (!step.done) {
43567    step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];
43568  } return step;
43569});
43570
43571// `URLSearchParams` constructor
43572// https://url.spec.whatwg.org/#interface-urlsearchparams
43573var URLSearchParamsConstructor = function URLSearchParams(/* init */) {
43574  anInstance(this, URLSearchParamsConstructor, URL_SEARCH_PARAMS);
43575  var init = arguments.length > 0 ? arguments[0] : undefined;
43576  var that = this;
43577  var entries = [];
43578  var iteratorMethod, iterator, next, step, entryIterator, entryNext, first, second, key;
43579
43580  setInternalState(that, {
43581    type: URL_SEARCH_PARAMS,
43582    entries: entries,
43583    updateURL: function () { /* empty */ },
43584    updateSearchParams: updateSearchParams
43585  });
43586
43587  if (init !== undefined) {
43588    if (isObject(init)) {
43589      iteratorMethod = getIteratorMethod(init);
43590      if (typeof iteratorMethod === 'function') {
43591        iterator = iteratorMethod.call(init);
43592        next = iterator.next;
43593        while (!(step = next.call(iterator)).done) {
43594          entryIterator = getIterator(anObject(step.value));
43595          entryNext = entryIterator.next;
43596          if (
43597            (first = entryNext.call(entryIterator)).done ||
43598            (second = entryNext.call(entryIterator)).done ||
43599            !entryNext.call(entryIterator).done
43600          ) throw TypeError('Expected sequence with length 2');
43601          entries.push({ key: first.value + '', value: second.value + '' });
43602        }
43603      } else for (key in init) if (hasOwn(init, key)) entries.push({ key: key, value: init[key] + '' });
43604    } else {
43605      parseSearchParams(entries, typeof init === 'string' ? init.charAt(0) === '?' ? init.slice(1) : init : init + '');
43606    }
43607  }
43608};
43609
43610var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;
43611
43612redefineAll(URLSearchParamsPrototype, {
43613  // `URLSearchParams.prototype.append` method
43614  // https://url.spec.whatwg.org/#dom-urlsearchparams-append
43615  append: function append(name, value) {
43616    validateArgumentsLength(arguments.length, 2);
43617    var state = getInternalParamsState(this);
43618    state.entries.push({ key: name + '', value: value + '' });
43619    state.updateURL();
43620  },
43621  // `URLSearchParams.prototype.delete` method
43622  // https://url.spec.whatwg.org/#dom-urlsearchparams-delete
43623  'delete': function (name) {
43624    validateArgumentsLength(arguments.length, 1);
43625    var state = getInternalParamsState(this);
43626    var entries = state.entries;
43627    var key = name + '';
43628    var index = 0;
43629    while (index < entries.length) {
43630      if (entries[index].key === key) entries.splice(index, 1);
43631      else index++;
43632    }
43633    state.updateURL();
43634  },
43635  // `URLSearchParams.prototype.get` method
43636  // https://url.spec.whatwg.org/#dom-urlsearchparams-get
43637  get: function get(name) {
43638    validateArgumentsLength(arguments.length, 1);
43639    var entries = getInternalParamsState(this).entries;
43640    var key = name + '';
43641    var index = 0;
43642    for (; index < entries.length; index++) {
43643      if (entries[index].key === key) return entries[index].value;
43644    }
43645    return null;
43646  },
43647  // `URLSearchParams.prototype.getAll` method
43648  // https://url.spec.whatwg.org/#dom-urlsearchparams-getall
43649  getAll: function getAll(name) {
43650    validateArgumentsLength(arguments.length, 1);
43651    var entries = getInternalParamsState(this).entries;
43652    var key = name + '';
43653    var result = [];
43654    var index = 0;
43655    for (; index < entries.length; index++) {
43656      if (entries[index].key === key) result.push(entries[index].value);
43657    }
43658    return result;
43659  },
43660  // `URLSearchParams.prototype.has` method
43661  // https://url.spec.whatwg.org/#dom-urlsearchparams-has
43662  has: function has(name) {
43663    validateArgumentsLength(arguments.length, 1);
43664    var entries = getInternalParamsState(this).entries;
43665    var key = name + '';
43666    var index = 0;
43667    while (index < entries.length) {
43668      if (entries[index++].key === key) return true;
43669    }
43670    return false;
43671  },
43672  // `URLSearchParams.prototype.set` method
43673  // https://url.spec.whatwg.org/#dom-urlsearchparams-set
43674  set: function set(name, value) {
43675    validateArgumentsLength(arguments.length, 1);
43676    var state = getInternalParamsState(this);
43677    var entries = state.entries;
43678    var found = false;
43679    var key = name + '';
43680    var val = value + '';
43681    var index = 0;
43682    var entry;
43683    for (; index < entries.length; index++) {
43684      entry = entries[index];
43685      if (entry.key === key) {
43686        if (found) entries.splice(index--, 1);
43687        else {
43688          found = true;
43689          entry.value = val;
43690        }
43691      }
43692    }
43693    if (!found) entries.push({ key: key, value: val });
43694    state.updateURL();
43695  },
43696  // `URLSearchParams.prototype.sort` method
43697  // https://url.spec.whatwg.org/#dom-urlsearchparams-sort
43698  sort: function sort() {
43699    var state = getInternalParamsState(this);
43700    var entries = state.entries;
43701    // Array#sort is not stable in some engines
43702    var slice = entries.slice();
43703    var entry, entriesIndex, sliceIndex;
43704    entries.length = 0;
43705    for (sliceIndex = 0; sliceIndex < slice.length; sliceIndex++) {
43706      entry = slice[sliceIndex];
43707      for (entriesIndex = 0; entriesIndex < sliceIndex; entriesIndex++) {
43708        if (entries[entriesIndex].key > entry.key) {
43709          entries.splice(entriesIndex, 0, entry);
43710          break;
43711        }
43712      }
43713      if (entriesIndex === sliceIndex) entries.push(entry);
43714    }
43715    state.updateURL();
43716  },
43717  // `URLSearchParams.prototype.forEach` method
43718  forEach: function forEach(callback /* , thisArg */) {
43719    var entries = getInternalParamsState(this).entries;
43720    var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined, 3);
43721    var index = 0;
43722    var entry;
43723    while (index < entries.length) {
43724      entry = entries[index++];
43725      boundFunction(entry.value, entry.key, this);
43726    }
43727  },
43728  // `URLSearchParams.prototype.keys` method
43729  keys: function keys() {
43730    return new URLSearchParamsIterator(this, 'keys');
43731  },
43732  // `URLSearchParams.prototype.values` method
43733  values: function values() {
43734    return new URLSearchParamsIterator(this, 'values');
43735  },
43736  // `URLSearchParams.prototype.entries` method
43737  entries: function entries() {
43738    return new URLSearchParamsIterator(this, 'entries');
43739  }
43740}, { enumerable: true });
43741
43742// `URLSearchParams.prototype[@@iterator]` method
43743redefine(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries);
43744
43745// `URLSearchParams.prototype.toString` method
43746// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior
43747redefine(URLSearchParamsPrototype, 'toString', function toString() {
43748  var entries = getInternalParamsState(this).entries;
43749  var result = [];
43750  var index = 0;
43751  var entry;
43752  while (index < entries.length) {
43753    entry = entries[index++];
43754    result.push(serialize(entry.key) + '=' + serialize(entry.value));
43755  } return result.join('&');
43756}, { enumerable: true });
43757
43758setToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);
43759
43760$({ global: true, forced: !USE_NATIVE_URL }, {
43761  URLSearchParams: URLSearchParamsConstructor
43762});
43763
43764// Wrap `fetch` for correct work with polyfilled `URLSearchParams`
43765// https://github.com/zloirock/core-js/issues/674
43766if (!USE_NATIVE_URL && typeof $fetch == 'function' && typeof Headers == 'function') {
43767  $({ global: true, enumerable: true, forced: true }, {
43768    fetch: function fetch(input /* , init */) {
43769      var args = [input];
43770      var init, body, headers;
43771      if (arguments.length > 1) {
43772        init = arguments[1];
43773        if (isObject(init)) {
43774          body = init.body;
43775          if (classof(body) === URL_SEARCH_PARAMS) {
43776            headers = init.headers ? new Headers(init.headers) : new Headers();
43777            if (!headers.has('content-type')) {
43778              headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
43779            }
43780            init = create(init, {
43781              body: createPropertyDescriptor(0, String(body)),
43782              headers: createPropertyDescriptor(0, headers)
43783            });
43784          }
43785        }
43786        args.push(init);
43787      } return $fetch.apply(this, args);
43788    }
43789  });
43790}
43791
43792module.exports = {
43793  URLSearchParams: URLSearchParamsConstructor,
43794  getState: getInternalParamsState
43795};
43796
43797
43798/***/ }),
43799
43800/***/ 285:
43801/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
43802
43803"use strict";
43804
43805// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
43806__webpack_require__(8783);
43807var $ = __webpack_require__(2109);
43808var DESCRIPTORS = __webpack_require__(9781);
43809var USE_NATIVE_URL = __webpack_require__(590);
43810var global = __webpack_require__(7854);
43811var defineProperties = __webpack_require__(6048);
43812var redefine = __webpack_require__(1320);
43813var anInstance = __webpack_require__(5787);
43814var has = __webpack_require__(6656);
43815var assign = __webpack_require__(1574);
43816var arrayFrom = __webpack_require__(8457);
43817var codeAt = __webpack_require__(8710).codeAt;
43818var toASCII = __webpack_require__(3197);
43819var setToStringTag = __webpack_require__(8003);
43820var URLSearchParamsModule = __webpack_require__(1637);
43821var InternalStateModule = __webpack_require__(9909);
43822
43823var NativeURL = global.URL;
43824var URLSearchParams = URLSearchParamsModule.URLSearchParams;
43825var getInternalSearchParamsState = URLSearchParamsModule.getState;
43826var setInternalState = InternalStateModule.set;
43827var getInternalURLState = InternalStateModule.getterFor('URL');
43828var floor = Math.floor;
43829var pow = Math.pow;
43830
43831var INVALID_AUTHORITY = 'Invalid authority';
43832var INVALID_SCHEME = 'Invalid scheme';
43833var INVALID_HOST = 'Invalid host';
43834var INVALID_PORT = 'Invalid port';
43835
43836var ALPHA = /[A-Za-z]/;
43837var ALPHANUMERIC = /[\d+-.A-Za-z]/;
43838var DIGIT = /\d/;
43839var HEX_START = /^(0x|0X)/;
43840var OCT = /^[0-7]+$/;
43841var DEC = /^\d+$/;
43842var HEX = /^[\dA-Fa-f]+$/;
43843/* eslint-disable no-control-regex -- safe */
43844var FORBIDDEN_HOST_CODE_POINT = /[\u0000\t\u000A\u000D #%/:?@[\\]]/;
43845var FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\u0000\t\u000A\u000D #/:?@[\\]]/;
43846var LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g;
43847var TAB_AND_NEW_LINE = /[\t\u000A\u000D]/g;
43848/* eslint-enable no-control-regex -- safe */
43849var EOF;
43850
43851var parseHost = function (url, input) {
43852  var result, codePoints, index;
43853  if (input.charAt(0) == '[') {
43854    if (input.charAt(input.length - 1) != ']') return INVALID_HOST;
43855    result = parseIPv6(input.slice(1, -1));
43856    if (!result) return INVALID_HOST;
43857    url.host = result;
43858  // opaque host
43859  } else if (!isSpecial(url)) {
43860    if (FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(input)) return INVALID_HOST;
43861    result = '';
43862    codePoints = arrayFrom(input);
43863    for (index = 0; index < codePoints.length; index++) {
43864      result += percentEncode(codePoints[index], C0ControlPercentEncodeSet);
43865    }
43866    url.host = result;
43867  } else {
43868    input = toASCII(input);
43869    if (FORBIDDEN_HOST_CODE_POINT.test(input)) return INVALID_HOST;
43870    result = parseIPv4(input);
43871    if (result === null) return INVALID_HOST;
43872    url.host = result;
43873  }
43874};
43875
43876var parseIPv4 = function (input) {
43877  var parts = input.split('.');
43878  var partsLength, numbers, index, part, radix, number, ipv4;
43879  if (parts.length && parts[parts.length - 1] == '') {
43880    parts.pop();
43881  }
43882  partsLength = parts.length;
43883  if (partsLength > 4) return input;
43884  numbers = [];
43885  for (index = 0; index < partsLength; index++) {
43886    part = parts[index];
43887    if (part == '') return input;
43888    radix = 10;
43889    if (part.length > 1 && part.charAt(0) == '0') {
43890      radix = HEX_START.test(part) ? 16 : 8;
43891      part = part.slice(radix == 8 ? 1 : 2);
43892    }
43893    if (part === '') {
43894      number = 0;
43895    } else {
43896      if (!(radix == 10 ? DEC : radix == 8 ? OCT : HEX).test(part)) return input;
43897      number = parseInt(part, radix);
43898    }
43899    numbers.push(number);
43900  }
43901  for (index = 0; index < partsLength; index++) {
43902    number = numbers[index];
43903    if (index == partsLength - 1) {
43904      if (number >= pow(256, 5 - partsLength)) return null;
43905    } else if (number > 255) return null;
43906  }
43907  ipv4 = numbers.pop();
43908  for (index = 0; index < numbers.length; index++) {
43909    ipv4 += numbers[index] * pow(256, 3 - index);
43910  }
43911  return ipv4;
43912};
43913
43914// eslint-disable-next-line max-statements -- TODO
43915var parseIPv6 = function (input) {
43916  var address = [0, 0, 0, 0, 0, 0, 0, 0];
43917  var pieceIndex = 0;
43918  var compress = null;
43919  var pointer = 0;
43920  var value, length, numbersSeen, ipv4Piece, number, swaps, swap;
43921
43922  var char = function () {
43923    return input.charAt(pointer);
43924  };
43925
43926  if (char() == ':') {
43927    if (input.charAt(1) != ':') return;
43928    pointer += 2;
43929    pieceIndex++;
43930    compress = pieceIndex;
43931  }
43932  while (char()) {
43933    if (pieceIndex == 8) return;
43934    if (char() == ':') {
43935      if (compress !== null) return;
43936      pointer++;
43937      pieceIndex++;
43938      compress = pieceIndex;
43939      continue;
43940    }
43941    value = length = 0;
43942    while (length < 4 && HEX.test(char())) {
43943      value = value * 16 + parseInt(char(), 16);
43944      pointer++;
43945      length++;
43946    }
43947    if (char() == '.') {
43948      if (length == 0) return;
43949      pointer -= length;
43950      if (pieceIndex > 6) return;
43951      numbersSeen = 0;
43952      while (char()) {
43953        ipv4Piece = null;
43954        if (numbersSeen > 0) {
43955          if (char() == '.' && numbersSeen < 4) pointer++;
43956          else return;
43957        }
43958        if (!DIGIT.test(char())) return;
43959        while (DIGIT.test(char())) {
43960          number = parseInt(char(), 10);
43961          if (ipv4Piece === null) ipv4Piece = number;
43962          else if (ipv4Piece == 0) return;
43963          else ipv4Piece = ipv4Piece * 10 + number;
43964          if (ipv4Piece > 255) return;
43965          pointer++;
43966        }
43967        address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;
43968        numbersSeen++;
43969        if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++;
43970      }
43971      if (numbersSeen != 4) return;
43972      break;
43973    } else if (char() == ':') {
43974      pointer++;
43975      if (!char()) return;
43976    } else if (char()) return;
43977    address[pieceIndex++] = value;
43978  }
43979  if (compress !== null) {
43980    swaps = pieceIndex - compress;
43981    pieceIndex = 7;
43982    while (pieceIndex != 0 && swaps > 0) {
43983      swap = address[pieceIndex];
43984      address[pieceIndex--] = address[compress + swaps - 1];
43985      address[compress + --swaps] = swap;
43986    }
43987  } else if (pieceIndex != 8) return;
43988  return address;
43989};
43990
43991var findLongestZeroSequence = function (ipv6) {
43992  var maxIndex = null;
43993  var maxLength = 1;
43994  var currStart = null;
43995  var currLength = 0;
43996  var index = 0;
43997  for (; index < 8; index++) {
43998    if (ipv6[index] !== 0) {
43999      if (currLength > maxLength) {
44000        maxIndex = currStart;
44001        maxLength = currLength;
44002      }
44003      currStart = null;
44004      currLength = 0;
44005    } else {
44006      if (currStart === null) currStart = index;
44007      ++currLength;
44008    }
44009  }
44010  if (currLength > maxLength) {
44011    maxIndex = currStart;
44012    maxLength = currLength;
44013  }
44014  return maxIndex;
44015};
44016
44017var serializeHost = function (host) {
44018  var result, index, compress, ignore0;
44019  // ipv4
44020  if (typeof host == 'number') {
44021    result = [];
44022    for (index = 0; index < 4; index++) {
44023      result.unshift(host % 256);
44024      host = floor(host / 256);
44025    } return result.join('.');
44026  // ipv6
44027  } else if (typeof host == 'object') {
44028    result = '';
44029    compress = findLongestZeroSequence(host);
44030    for (index = 0; index < 8; index++) {
44031      if (ignore0 && host[index] === 0) continue;
44032      if (ignore0) ignore0 = false;
44033      if (compress === index) {
44034        result += index ? ':' : '::';
44035        ignore0 = true;
44036      } else {
44037        result += host[index].toString(16);
44038        if (index < 7) result += ':';
44039      }
44040    }
44041    return '[' + result + ']';
44042  } return host;
44043};
44044
44045var C0ControlPercentEncodeSet = {};
44046var fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, {
44047  ' ': 1, '"': 1, '<': 1, '>': 1, '`': 1
44048});
44049var pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, {
44050  '#': 1, '?': 1, '{': 1, '}': 1
44051});
44052var userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, {
44053  '/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\': 1, ']': 1, '^': 1, '|': 1
44054});
44055
44056var percentEncode = function (char, set) {
44057  var code = codeAt(char, 0);
44058  return code > 0x20 && code < 0x7F && !has(set, char) ? char : encodeURIComponent(char);
44059};
44060
44061var specialSchemes = {
44062  ftp: 21,
44063  file: null,
44064  http: 80,
44065  https: 443,
44066  ws: 80,
44067  wss: 443
44068};
44069
44070var isSpecial = function (url) {
44071  return has(specialSchemes, url.scheme);
44072};
44073
44074var includesCredentials = function (url) {
44075  return url.username != '' || url.password != '';
44076};
44077
44078var cannotHaveUsernamePasswordPort = function (url) {
44079  return !url.host || url.cannotBeABaseURL || url.scheme == 'file';
44080};
44081
44082var isWindowsDriveLetter = function (string, normalized) {
44083  var second;
44084  return string.length == 2 && ALPHA.test(string.charAt(0))
44085    && ((second = string.charAt(1)) == ':' || (!normalized && second == '|'));
44086};
44087
44088var startsWithWindowsDriveLetter = function (string) {
44089  var third;
44090  return string.length > 1 && isWindowsDriveLetter(string.slice(0, 2)) && (
44091    string.length == 2 ||
44092    ((third = string.charAt(2)) === '/' || third === '\\' || third === '?' || third === '#')
44093  );
44094};
44095
44096var shortenURLsPath = function (url) {
44097  var path = url.path;
44098  var pathSize = path.length;
44099  if (pathSize && (url.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) {
44100    path.pop();
44101  }
44102};
44103
44104var isSingleDot = function (segment) {
44105  return segment === '.' || segment.toLowerCase() === '%2e';
44106};
44107
44108var isDoubleDot = function (segment) {
44109  segment = segment.toLowerCase();
44110  return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e';
44111};
44112
44113// States:
44114var SCHEME_START = {};
44115var SCHEME = {};
44116var NO_SCHEME = {};
44117var SPECIAL_RELATIVE_OR_AUTHORITY = {};
44118var PATH_OR_AUTHORITY = {};
44119var RELATIVE = {};
44120var RELATIVE_SLASH = {};
44121var SPECIAL_AUTHORITY_SLASHES = {};
44122var SPECIAL_AUTHORITY_IGNORE_SLASHES = {};
44123var AUTHORITY = {};
44124var HOST = {};
44125var HOSTNAME = {};
44126var PORT = {};
44127var FILE = {};
44128var FILE_SLASH = {};
44129var FILE_HOST = {};
44130var PATH_START = {};
44131var PATH = {};
44132var CANNOT_BE_A_BASE_URL_PATH = {};
44133var QUERY = {};
44134var FRAGMENT = {};
44135
44136// eslint-disable-next-line max-statements -- TODO
44137var parseURL = function (url, input, stateOverride, base) {
44138  var state = stateOverride || SCHEME_START;
44139  var pointer = 0;
44140  var buffer = '';
44141  var seenAt = false;
vendor: 20,710 bytes, lines 44142-44760
44142  var seenBracket = false;
44143  var seenPasswordToken = false;
44144  var codePoints, char, bufferCodePoints, failure;
44145
44146  if (!stateOverride) {
44147    url.scheme = '';
44148    url.username = '';
44149    url.password = '';
44150    url.host = null;
44151    url.port = null;
44152    url.path = [];
44153    url.query = null;
44154    url.fragment = null;
44155    url.cannotBeABaseURL = false;
44156    input = input.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, '');
44157  }
44158
44159  input = input.replace(TAB_AND_NEW_LINE, '');
44160
44161  codePoints = arrayFrom(input);
44162
44163  while (pointer <= codePoints.length) {
44164    char = codePoints[pointer];
44165    switch (state) {
44166      case SCHEME_START:
44167        if (char && ALPHA.test(char)) {
44168          buffer += char.toLowerCase();
44169          state = SCHEME;
44170        } else if (!stateOverride) {
44171          state = NO_SCHEME;
44172          continue;
44173        } else return INVALID_SCHEME;
44174        break;
44175
44176      case SCHEME:
44177        if (char && (ALPHANUMERIC.test(char) || char == '+' || char == '-' || char == '.')) {
44178          buffer += char.toLowerCase();
44179        } else if (char == ':') {
44180          if (stateOverride && (
44181            (isSpecial(url) != has(specialSchemes, buffer)) ||
44182            (buffer == 'file' && (includesCredentials(url) || url.port !== null)) ||
44183            (url.scheme == 'file' && !url.host)
44184          )) return;
44185          url.scheme = buffer;
44186          if (stateOverride) {
44187            if (isSpecial(url) && specialSchemes[url.scheme] == url.port) url.port = null;
44188            return;
44189          }
44190          buffer = '';
44191          if (url.scheme == 'file') {
44192            state = FILE;
44193          } else if (isSpecial(url) && base && base.scheme == url.scheme) {
44194            state = SPECIAL_RELATIVE_OR_AUTHORITY;
44195          } else if (isSpecial(url)) {
44196            state = SPECIAL_AUTHORITY_SLASHES;
44197          } else if (codePoints[pointer + 1] == '/') {
44198            state = PATH_OR_AUTHORITY;
44199            pointer++;
44200          } else {
44201            url.cannotBeABaseURL = true;
44202            url.path.push('');
44203            state = CANNOT_BE_A_BASE_URL_PATH;
44204          }
44205        } else if (!stateOverride) {
44206          buffer = '';
44207          state = NO_SCHEME;
44208          pointer = 0;
44209          continue;
44210        } else return INVALID_SCHEME;
44211        break;
44212
44213      case NO_SCHEME:
44214        if (!base || (base.cannotBeABaseURL && char != '#')) return INVALID_SCHEME;
44215        if (base.cannotBeABaseURL && char == '#') {
44216          url.scheme = base.scheme;
44217          url.path = base.path.slice();
44218          url.query = base.query;
44219          url.fragment = '';
44220          url.cannotBeABaseURL = true;
44221          state = FRAGMENT;
44222          break;
44223        }
44224        state = base.scheme == 'file' ? FILE : RELATIVE;
44225        continue;
44226
44227      case SPECIAL_RELATIVE_OR_AUTHORITY:
44228        if (char == '/' && codePoints[pointer + 1] == '/') {
44229          state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
44230          pointer++;
44231        } else {
44232          state = RELATIVE;
44233          continue;
44234        } break;
44235
44236      case PATH_OR_AUTHORITY:
44237        if (char == '/') {
44238          state = AUTHORITY;
44239          break;
44240        } else {
44241          state = PATH;
44242          continue;
44243        }
44244
44245      case RELATIVE:
44246        url.scheme = base.scheme;
44247        if (char == EOF) {
44248          url.username = base.username;
44249          url.password = base.password;
44250          url.host = base.host;
44251          url.port = base.port;
44252          url.path = base.path.slice();
44253          url.query = base.query;
44254        } else if (char == '/' || (char == '\\' && isSpecial(url))) {
44255          state = RELATIVE_SLASH;
44256        } else if (char == '?') {
44257          url.username = base.username;
44258          url.password = base.password;
44259          url.host = base.host;
44260          url.port = base.port;
44261          url.path = base.path.slice();
44262          url.query = '';
44263          state = QUERY;
44264        } else if (char == '#') {
44265          url.username = base.username;
44266          url.password = base.password;
44267          url.host = base.host;
44268          url.port = base.port;
44269          url.path = base.path.slice();
44270          url.query = base.query;
44271          url.fragment = '';
44272          state = FRAGMENT;
44273        } else {
44274          url.username = base.username;
44275          url.password = base.password;
44276          url.host = base.host;
44277          url.port = base.port;
44278          url.path = base.path.slice();
44279          url.path.pop();
44280          state = PATH;
44281          continue;
44282        } break;
44283
44284      case RELATIVE_SLASH:
44285        if (isSpecial(url) && (char == '/' || char == '\\')) {
44286          state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
44287        } else if (char == '/') {
44288          state = AUTHORITY;
44289        } else {
44290          url.username = base.username;
44291          url.password = base.password;
44292          url.host = base.host;
44293          url.port = base.port;
44294          state = PATH;
44295          continue;
44296        } break;
44297
44298      case SPECIAL_AUTHORITY_SLASHES:
44299        state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
44300        if (char != '/' || buffer.charAt(pointer + 1) != '/') continue;
44301        pointer++;
44302        break;
44303
44304      case SPECIAL_AUTHORITY_IGNORE_SLASHES:
44305        if (char != '/' && char != '\\') {
44306          state = AUTHORITY;
44307          continue;
44308        } break;
44309
44310      case AUTHORITY:
44311        if (char == '@') {
44312          if (seenAt) buffer = '%40' + buffer;
44313          seenAt = true;
44314          bufferCodePoints = arrayFrom(buffer);
44315          for (var i = 0; i < bufferCodePoints.length; i++) {
44316            var codePoint = bufferCodePoints[i];
44317            if (codePoint == ':' && !seenPasswordToken) {
44318              seenPasswordToken = true;
44319              continue;
44320            }
44321            var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet);
44322            if (seenPasswordToken) url.password += encodedCodePoints;
44323            else url.username += encodedCodePoints;
44324          }
44325          buffer = '';
44326        } else if (
44327          char == EOF || char == '/' || char == '?' || char == '#' ||
44328          (char == '\\' && isSpecial(url))
44329        ) {
44330          if (seenAt && buffer == '') return INVALID_AUTHORITY;
44331          pointer -= arrayFrom(buffer).length + 1;
44332          buffer = '';
44333          state = HOST;
44334        } else buffer += char;
44335        break;
44336
44337      case HOST:
44338      case HOSTNAME:
44339        if (stateOverride && url.scheme == 'file') {
44340          state = FILE_HOST;
44341          continue;
44342        } else if (char == ':' && !seenBracket) {
44343          if (buffer == '') return INVALID_HOST;
44344          failure = parseHost(url, buffer);
44345          if (failure) return failure;
44346          buffer = '';
44347          state = PORT;
44348          if (stateOverride == HOSTNAME) return;
44349        } else if (
44350          char == EOF || char == '/' || char == '?' || char == '#' ||
44351          (char == '\\' && isSpecial(url))
44352        ) {
44353          if (isSpecial(url) && buffer == '') return INVALID_HOST;
44354          if (stateOverride && buffer == '' && (includesCredentials(url) || url.port !== null)) return;
44355          failure = parseHost(url, buffer);
44356          if (failure) return failure;
44357          buffer = '';
44358          state = PATH_START;
44359          if (stateOverride) return;
44360          continue;
44361        } else {
44362          if (char == '[') seenBracket = true;
44363          else if (char == ']') seenBracket = false;
44364          buffer += char;
44365        } break;
44366
44367      case PORT:
44368        if (DIGIT.test(char)) {
44369          buffer += char;
44370        } else if (
44371          char == EOF || char == '/' || char == '?' || char == '#' ||
44372          (char == '\\' && isSpecial(url)) ||
44373          stateOverride
44374        ) {
44375          if (buffer != '') {
44376            var port = parseInt(buffer, 10);
44377            if (port > 0xFFFF) return INVALID_PORT;
44378            url.port = (isSpecial(url) && port === specialSchemes[url.scheme]) ? null : port;
44379            buffer = '';
44380          }
44381          if (stateOverride) return;
44382          state = PATH_START;
44383          continue;
44384        } else return INVALID_PORT;
44385        break;
44386
44387      case FILE:
44388        url.scheme = 'file';
44389        if (char == '/' || char == '\\') state = FILE_SLASH;
44390        else if (base && base.scheme == 'file') {
44391          if (char == EOF) {
44392            url.host = base.host;
44393            url.path = base.path.slice();
44394            url.query = base.query;
44395          } else if (char == '?') {
44396            url.host = base.host;
44397            url.path = base.path.slice();
44398            url.query = '';
44399            state = QUERY;
44400          } else if (char == '#') {
44401            url.host = base.host;
44402            url.path = base.path.slice();
44403            url.query = base.query;
44404            url.fragment = '';
44405            state = FRAGMENT;
44406          } else {
44407            if (!startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {
44408              url.host = base.host;
44409              url.path = base.path.slice();
44410              shortenURLsPath(url);
44411            }
44412            state = PATH;
44413            continue;
44414          }
44415        } else {
44416          state = PATH;
44417          continue;
44418        } break;
44419
44420      case FILE_SLASH:
44421        if (char == '/' || char == '\\') {
44422          state = FILE_HOST;
44423          break;
44424        }
44425        if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {
44426          if (isWindowsDriveLetter(base.path[0], true)) url.path.push(base.path[0]);
44427          else url.host = base.host;
44428        }
44429        state = PATH;
44430        continue;
44431
44432      case FILE_HOST:
44433        if (char == EOF || char == '/' || char == '\\' || char == '?' || char == '#') {
44434          if (!stateOverride && isWindowsDriveLetter(buffer)) {
44435            state = PATH;
44436          } else if (buffer == '') {
44437            url.host = '';
44438            if (stateOverride) return;
44439            state = PATH_START;
44440          } else {
44441            failure = parseHost(url, buffer);
44442            if (failure) return failure;
44443            if (url.host == 'localhost') url.host = '';
44444            if (stateOverride) return;
44445            buffer = '';
44446            state = PATH_START;
44447          } continue;
44448        } else buffer += char;
44449        break;
44450
44451      case PATH_START:
44452        if (isSpecial(url)) {
44453          state = PATH;
44454          if (char != '/' && char != '\\') continue;
44455        } else if (!stateOverride && char == '?') {
44456          url.query = '';
44457          state = QUERY;
44458        } else if (!stateOverride && char == '#') {
44459          url.fragment = '';
44460          state = FRAGMENT;
44461        } else if (char != EOF) {
44462          state = PATH;
44463          if (char != '/') continue;
44464        } break;
44465
44466      case PATH:
44467        if (
44468          char == EOF || char == '/' ||
44469          (char == '\\' && isSpecial(url)) ||
44470          (!stateOverride && (char == '?' || char == '#'))
44471        ) {
44472          if (isDoubleDot(buffer)) {
44473            shortenURLsPath(url);
44474            if (char != '/' && !(char == '\\' && isSpecial(url))) {
44475              url.path.push('');
44476            }
44477          } else if (isSingleDot(buffer)) {
44478            if (char != '/' && !(char == '\\' && isSpecial(url))) {
44479              url.path.push('');
44480            }
44481          } else {
44482            if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {
44483              if (url.host) url.host = '';
44484              buffer = buffer.charAt(0) + ':'; // normalize windows drive letter
44485            }
44486            url.path.push(buffer);
44487          }
44488          buffer = '';
44489          if (url.scheme == 'file' && (char == EOF || char == '?' || char == '#')) {
44490            while (url.path.length > 1 && url.path[0] === '') {
44491              url.path.shift();
44492            }
44493          }
44494          if (char == '?') {
44495            url.query = '';
44496            state = QUERY;
44497          } else if (char == '#') {
44498            url.fragment = '';
44499            state = FRAGMENT;
44500          }
44501        } else {
44502          buffer += percentEncode(char, pathPercentEncodeSet);
44503        } break;
44504
44505      case CANNOT_BE_A_BASE_URL_PATH:
44506        if (char == '?') {
44507          url.query = '';
44508          state = QUERY;
44509        } else if (char == '#') {
44510          url.fragment = '';
44511          state = FRAGMENT;
44512        } else if (char != EOF) {
44513          url.path[0] += percentEncode(char, C0ControlPercentEncodeSet);
44514        } break;
44515
44516      case QUERY:
44517        if (!stateOverride && char == '#') {
44518          url.fragment = '';
44519          state = FRAGMENT;
44520        } else if (char != EOF) {
44521          if (char == "'" && isSpecial(url)) url.query += '%27';
44522          else if (char == '#') url.query += '%23';
44523          else url.query += percentEncode(char, C0ControlPercentEncodeSet);
44524        } break;
44525
44526      case FRAGMENT:
44527        if (char != EOF) url.fragment += percentEncode(char, fragmentPercentEncodeSet);
44528        break;
44529    }
44530
44531    pointer++;
44532  }
44533};
44534
44535// `URL` constructor
44536// https://url.spec.whatwg.org/#url-class
44537var URLConstructor = function URL(url /* , base */) {
44538  var that = anInstance(this, URLConstructor, 'URL');
44539  var base = arguments.length > 1 ? arguments[1] : undefined;
44540  var urlString = String(url);
44541  var state = setInternalState(that, { type: 'URL' });
44542  var baseState, failure;
44543  if (base !== undefined) {
44544    if (base instanceof URLConstructor) baseState = getInternalURLState(base);
44545    else {
44546      failure = parseURL(baseState = {}, String(base));
44547      if (failure) throw TypeError(failure);
44548    }
44549  }
44550  failure = parseURL(state, urlString, null, baseState);
44551  if (failure) throw TypeError(failure);
44552  var searchParams = state.searchParams = new URLSearchParams();
44553  var searchParamsState = getInternalSearchParamsState(searchParams);
44554  searchParamsState.updateSearchParams(state.query);
44555  searchParamsState.updateURL = function () {
44556    state.query = String(searchParams) || null;
44557  };
44558  if (!DESCRIPTORS) {
44559    that.href = serializeURL.call(that);
44560    that.origin = getOrigin.call(that);
44561    that.protocol = getProtocol.call(that);
44562    that.username = getUsername.call(that);
44563    that.password = getPassword.call(that);
44564    that.host = getHost.call(that);
44565    that.hostname = getHostname.call(that);
44566    that.port = getPort.call(that);
44567    that.pathname = getPathname.call(that);
44568    that.search = getSearch.call(that);
44569    that.searchParams = getSearchParams.call(that);
44570    that.hash = getHash.call(that);
44571  }
44572};
44573
44574var URLPrototype = URLConstructor.prototype;
44575
44576var serializeURL = function () {
44577  var url = getInternalURLState(this);
44578  var scheme = url.scheme;
44579  var username = url.username;
44580  var password = url.password;
44581  var host = url.host;
44582  var port = url.port;
44583  var path = url.path;
44584  var query = url.query;
44585  var fragment = url.fragment;
44586  var output = scheme + ':';
44587  if (host !== null) {
44588    output += '//';
44589    if (includesCredentials(url)) {
44590      output += username + (password ? ':' + password : '') + '@';
44591    }
44592    output += serializeHost(host);
44593    if (port !== null) output += ':' + port;
44594  } else if (scheme == 'file') output += '//';
44595  output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';
44596  if (query !== null) output += '?' + query;
44597  if (fragment !== null) output += '#' + fragment;
44598  return output;
44599};
44600
44601var getOrigin = function () {
44602  var url = getInternalURLState(this);
44603  var scheme = url.scheme;
44604  var port = url.port;
44605  if (scheme == 'blob') try {
44606    return new URL(scheme.path[0]).origin;
44607  } catch (error) {
44608    return 'null';
44609  }
44610  if (scheme == 'file' || !isSpecial(url)) return 'null';
44611  return scheme + '://' + serializeHost(url.host) + (port !== null ? ':' + port : '');
44612};
44613
44614var getProtocol = function () {
44615  return getInternalURLState(this).scheme + ':';
44616};
44617
44618var getUsername = function () {
44619  return getInternalURLState(this).username;
44620};
44621
44622var getPassword = function () {
44623  return getInternalURLState(this).password;
44624};
44625
44626var getHost = function () {
44627  var url = getInternalURLState(this);
44628  var host = url.host;
44629  var port = url.port;
44630  return host === null ? ''
44631    : port === null ? serializeHost(host)
44632    : serializeHost(host) + ':' + port;
44633};
44634
44635var getHostname = function () {
44636  var host = getInternalURLState(this).host;
44637  return host === null ? '' : serializeHost(host);
44638};
44639
44640var getPort = function () {
44641  var port = getInternalURLState(this).port;
44642  return port === null ? '' : String(port);
44643};
44644
44645var getPathname = function () {
44646  var url = getInternalURLState(this);
44647  var path = url.path;
44648  return url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';
44649};
44650
44651var getSearch = function () {
44652  var query = getInternalURLState(this).query;
44653  return query ? '?' + query : '';
44654};
44655
44656var getSearchParams = function () {
44657  return getInternalURLState(this).searchParams;
44658};
44659
44660var getHash = function () {
44661  var fragment = getInternalURLState(this).fragment;
44662  return fragment ? '#' + fragment : '';
44663};
44664
44665var accessorDescriptor = function (getter, setter) {
44666  return { get: getter, set: setter, configurable: true, enumerable: true };
44667};
44668
44669if (DESCRIPTORS) {
44670  defineProperties(URLPrototype, {
44671    // `URL.prototype.href` accessors pair
44672    // https://url.spec.whatwg.org/#dom-url-href
44673    href: accessorDescriptor(serializeURL, function (href) {
44674      var url = getInternalURLState(this);
44675      var urlString = String(href);
44676      var failure = parseURL(url, urlString);
44677      if (failure) throw TypeError(failure);
44678      getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);
44679    }),
44680    // `URL.prototype.origin` getter
44681    // https://url.spec.whatwg.org/#dom-url-origin
44682    origin: accessorDescriptor(getOrigin),
44683    // `URL.prototype.protocol` accessors pair
44684    // https://url.spec.whatwg.org/#dom-url-protocol
44685    protocol: accessorDescriptor(getProtocol, function (protocol) {
44686      var url = getInternalURLState(this);
44687      parseURL(url, String(protocol) + ':', SCHEME_START);
44688    }),
44689    // `URL.prototype.username` accessors pair
44690    // https://url.spec.whatwg.org/#dom-url-username
44691    username: accessorDescriptor(getUsername, function (username) {
44692      var url = getInternalURLState(this);
44693      var codePoints = arrayFrom(String(username));
44694      if (cannotHaveUsernamePasswordPort(url)) return;
44695      url.username = '';
44696      for (var i = 0; i < codePoints.length; i++) {
44697        url.username += percentEncode(codePoints[i], userinfoPercentEncodeSet);
44698      }
44699    }),
44700    // `URL.prototype.password` accessors pair
44701    // https://url.spec.whatwg.org/#dom-url-password
44702    password: accessorDescriptor(getPassword, function (password) {
44703      var url = getInternalURLState(this);
44704      var codePoints = arrayFrom(String(password));
44705      if (cannotHaveUsernamePasswordPort(url)) return;
44706      url.password = '';
44707      for (var i = 0; i < codePoints.length; i++) {
44708        url.password += percentEncode(codePoints[i], userinfoPercentEncodeSet);
44709      }
44710    }),
44711    // `URL.prototype.host` accessors pair
44712    // https://url.spec.whatwg.org/#dom-url-host
44713    host: accessorDescriptor(getHost, function (host) {
44714      var url = getInternalURLState(this);
44715      if (url.cannotBeABaseURL) return;
44716      parseURL(url, String(host), HOST);
44717    }),
44718    // `URL.prototype.hostname` accessors pair
44719    // https://url.spec.whatwg.org/#dom-url-hostname
44720    hostname: accessorDescriptor(getHostname, function (hostname) {
44721      var url = getInternalURLState(this);
44722      if (url.cannotBeABaseURL) return;
44723      parseURL(url, String(hostname), HOSTNAME);
44724    }),
44725    // `URL.prototype.port` accessors pair
44726    // https://url.spec.whatwg.org/#dom-url-port
44727    port: accessorDescriptor(getPort, function (port) {
44728      var url = getInternalURLState(this);
44729      if (cannotHaveUsernamePasswordPort(url)) return;
44730      port = String(port);
44731      if (port == '') url.port = null;
44732      else parseURL(url, port, PORT);
44733    }),
44734    // `URL.prototype.pathname` accessors pair
44735    // https://url.spec.whatwg.org/#dom-url-pathname
44736    pathname: accessorDescriptor(getPathname, function (pathname) {
44737      var url = getInternalURLState(this);
44738      if (url.cannotBeABaseURL) return;
44739      url.path = [];
44740      parseURL(url, pathname + '', PATH_START);
44741    }),
44742    // `URL.prototype.search` accessors pair
44743    // https://url.spec.whatwg.org/#dom-url-search
44744    search: accessorDescriptor(getSearch, function (search) {
44745      var url = getInternalURLState(this);
44746      search = String(search);
44747      if (search == '') {
44748        url.query = null;
44749      } else {
44750        if ('?' == search.charAt(0)) search = search.slice(1);
44751        url.query = '';
44752        parseURL(url, search, QUERY);
44753      }
44754      getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);
44755    }),
44756    // `URL.prototype.searchParams` getter
44757    // https://url.spec.whatwg.org/#dom-url-searchparams
44758    searchParams: accessorDescriptor(getSearchParams),
44759    // `URL.prototype.hash` accessors pair
44760    // https://url.spec.whatwg.org/#dom-url-hash
vendor: 13,774 bytes, lines 44761-45025
44761    hash: accessorDescriptor(getHash, function (hash) {
44762      var url = getInternalURLState(this);
44763      hash = String(hash);
44764      if (hash == '') {
44765        url.fragment = null;
44766        return;
44767      }
44768      if ('#' == hash.charAt(0)) hash = hash.slice(1);
44769      url.fragment = '';
44770      parseURL(url, hash, FRAGMENT);
44771    })
44772  });
44773}
44774
44775// `URL.prototype.toJSON` method
44776// https://url.spec.whatwg.org/#dom-url-tojson
44777redefine(URLPrototype, 'toJSON', function toJSON() {
44778  return serializeURL.call(this);
44779}, { enumerable: true });
44780
44781// `URL.prototype.toString` method
44782// https://url.spec.whatwg.org/#URL-stringification-behavior
44783redefine(URLPrototype, 'toString', function toString() {
44784  return serializeURL.call(this);
44785}, { enumerable: true });
44786
44787if (NativeURL) {
44788  var nativeCreateObjectURL = NativeURL.createObjectURL;
44789  var nativeRevokeObjectURL = NativeURL.revokeObjectURL;
44790  // `URL.createObjectURL` method
44791  // https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL
44792  // eslint-disable-next-line no-unused-vars -- required for `.length`
44793  if (nativeCreateObjectURL) redefine(URLConstructor, 'createObjectURL', function createObjectURL(blob) {
44794    return nativeCreateObjectURL.apply(NativeURL, arguments);
44795  });
44796  // `URL.revokeObjectURL` method
44797  // https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL
44798  // eslint-disable-next-line no-unused-vars -- required for `.length`
44799  if (nativeRevokeObjectURL) redefine(URLConstructor, 'revokeObjectURL', function revokeObjectURL(url) {
44800    return nativeRevokeObjectURL.apply(NativeURL, arguments);
44801  });
44802}
44803
44804setToStringTag(URLConstructor, 'URL');
44805
44806$({ global: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, {
44807  URL: URLConstructor
44808});
44809
44810
44811/***/ })
44812
44813/******/ 	});
44814/************************************************************************/
44815/******/ 	// The module cache
44816/******/ 	var __webpack_module_cache__ = {};
44817/******/ 	
44818/******/ 	// The require function
44819/******/ 	function __webpack_require__(moduleId) {
44820/******/ 		// Check if module is in cache
44821/******/ 		if(__webpack_module_cache__[moduleId]) {
44822/******/ 			return __webpack_module_cache__[moduleId].exports;
44823/******/ 		}
44824/******/ 		// Create a new module (and put it into the cache)
44825/******/ 		var module = __webpack_module_cache__[moduleId] = {
44826/******/ 			// no module.id needed
44827/******/ 			// no module.loaded needed
44828/******/ 			exports: {}
44829/******/ 		};
44830/******/ 	
44831/******/ 		// Execute the module function
44832/******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
44833/******/ 	
44834/******/ 		// Return the exports of the module
44835/******/ 		return module.exports;
44836/******/ 	}
44837/******/ 	
44838/************************************************************************/
44839/******/ 	/* webpack/runtime/define property getters */
44840/******/ 	!function() {
44841/******/ 		// define getter functions for harmony exports
44842/******/ 		__webpack_require__.d = function(exports, definition) {
44843/******/ 			for(var key in definition) {
44844/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
44845/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
44846/******/ 				}
44847/******/ 			}
44848/******/ 		};
44849/******/ 	}();
44850/******/ 	
44851/******/ 	/* webpack/runtime/global */
44852/******/ 	!function() {
44853/******/ 		__webpack_require__.g = (function() {
44854/******/ 			if (typeof globalThis === 'object') return globalThis;
44855/******/ 			try {
44856/******/ 				return this || new Function('return this')();
44857/******/ 			} catch (e) {
44858/******/ 				if (typeof window === 'object') return window;
44859/******/ 			}
44860/******/ 		})();
44861/******/ 	}();
44862/******/ 	
44863/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
44864/******/ 	!function() {
44865/******/ 		__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
44866/******/ 	}();
44867/******/ 	
44868/******/ 	/* webpack/runtime/make namespace object */
44869/******/ 	!function() {
44870/******/ 		// define __esModule on exports
44871/******/ 		__webpack_require__.r = function(exports) {
44872/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
44873/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
44874/******/ 			}
44875/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
44876/******/ 		};
44877/******/ 	}();
44878/******/ 	
44879/************************************************************************/
44880var __webpack_exports__ = {};
44881// This entry need to be wrapped in an IIFE because it need to be in strict mode.
44882!function() {
44883"use strict";
44884// ESM COMPAT FLAG
44885__webpack_require__.r(__webpack_exports__);
44886
44887// EXPORTS
44888__webpack_require__.d(__webpack_exports__, {
44889  "Dropzone": function() { return /* reexport */ Dropzone; },
44890  "default": function() { return /* binding */ dropzone_dist; }
44891});
44892
44893// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
44894var es_array_concat = __webpack_require__(2222);
44895// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.filter.js
44896var es_array_filter = __webpack_require__(7327);
44897// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.index-of.js
44898var es_array_index_of = __webpack_require__(2772);
44899// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.iterator.js
44900var es_array_iterator = __webpack_require__(6992);
44901// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.map.js
44902var es_array_map = __webpack_require__(1249);
44903// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.slice.js
44904var es_array_slice = __webpack_require__(7042);
44905// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.splice.js
44906var es_array_splice = __webpack_require__(561);
44907// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array-buffer.constructor.js
44908var es_array_buffer_constructor = __webpack_require__(8264);
44909// EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.name.js
44910var es_function_name = __webpack_require__(8309);
44911// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-prototype-of.js
44912var es_object_get_prototype_of = __webpack_require__(489);
44913// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.to-string.js
44914var es_object_to_string = __webpack_require__(1539);
44915// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.exec.js
44916var es_regexp_exec = __webpack_require__(4916);
44917// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.to-string.js
44918var es_regexp_to_string = __webpack_require__(9714);
44919// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.iterator.js
44920var es_string_iterator = __webpack_require__(8783);
44921// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.match.js
44922var es_string_match = __webpack_require__(4723);
44923// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.replace.js
44924var es_string_replace = __webpack_require__(5306);
44925// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.split.js
44926var es_string_split = __webpack_require__(3123);
44927// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.trim.js
44928var es_string_trim = __webpack_require__(3210);
44929// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.uint8-array.js
44930var es_typed_array_uint8_array = __webpack_require__(2472);
44931// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.copy-within.js
44932var es_typed_array_copy_within = __webpack_require__(2990);
44933// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.every.js
44934var es_typed_array_every = __webpack_require__(8927);
44935// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.fill.js
44936var es_typed_array_fill = __webpack_require__(3105);
44937// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.filter.js
44938var es_typed_array_filter = __webpack_require__(5035);
44939// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.find.js
44940var es_typed_array_find = __webpack_require__(4345);
44941// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.find-index.js
44942var es_typed_array_find_index = __webpack_require__(7174);
44943// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.for-each.js
44944var es_typed_array_for_each = __webpack_require__(2846);
44945// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.includes.js
44946var es_typed_array_includes = __webpack_require__(4731);
44947// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.index-of.js
44948var es_typed_array_index_of = __webpack_require__(7209);
44949// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.iterator.js
44950var es_typed_array_iterator = __webpack_require__(6319);
44951// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.join.js
44952var es_typed_array_join = __webpack_require__(8867);
44953// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.last-index-of.js
44954var es_typed_array_last_index_of = __webpack_require__(7789);
44955// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.map.js
44956var es_typed_array_map = __webpack_require__(3739);
44957// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.reduce.js
44958var es_typed_array_reduce = __webpack_require__(9368);
44959// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.reduce-right.js
44960var es_typed_array_reduce_right = __webpack_require__(4483);
44961// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.reverse.js
44962var es_typed_array_reverse = __webpack_require__(2056);
44963// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.set.js
44964var es_typed_array_set = __webpack_require__(3462);
44965// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.slice.js
44966var es_typed_array_slice = __webpack_require__(678);
44967// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.some.js
44968var es_typed_array_some = __webpack_require__(7462);
44969// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.sort.js
44970var es_typed_array_sort = __webpack_require__(3824);
44971// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.subarray.js
44972var es_typed_array_subarray = __webpack_require__(5021);
44973// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.to-locale-string.js
44974var es_typed_array_to_locale_string = __webpack_require__(2974);
44975// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.to-string.js
44976var es_typed_array_to_string = __webpack_require__(5016);
44977// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.for-each.js
44978var web_dom_collections_for_each = __webpack_require__(4747);
44979// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.iterator.js
44980var web_dom_collections_iterator = __webpack_require__(3948);
44981// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url.js
44982var web_url = __webpack_require__(285);
44983;// CONCATENATED MODULE: ./src/emitter.js
44984
44985
44986function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
44987
44988function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
44989
44990function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
44991
44992function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
44993
44994function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
44995
44996function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
44997
44998// The Emitter class provides the ability to call `.on()` on Dropzone to listen
44999// to events.
45000// It is strongly based on component's emitter class, and I removed the
45001// functionality because of the dependency hell with different frameworks.
45002var Emitter = /*#__PURE__*/function () {
45003  function Emitter() {
45004    _classCallCheck(this, Emitter);
45005  }
45006
45007  _createClass(Emitter, [{
45008    key: "on",
45009    value: // Add an event listener for given event
45010    function on(event, fn) {
45011      this._callbacks = this._callbacks || {}; // Create namespace for this event
45012
45013      if (!this._callbacks[event]) {
45014        this._callbacks[event] = [];
45015      }
45016
45017      this._callbacks[event].push(fn);
45018
45019      return this;
45020    }
45021  }, {
45022    key: "emit",
45023    value: function emit(event) {
45024      this._callbacks = this._callbacks || {};
45025      var callbacks = this._callbacks[event];
45026
45027      for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
45028        args[_key - 1] = arguments[_key];
45029      }
45030
45031      if (callbacks) {
45032        var _iterator = _createForOfIteratorHelper(callbacks, true),
45033            _step;
45034
45035        try {
45036          for (_iterator.s(); !(_step = _iterator.n()).done;) {
45037            var callback = _step.value;
45038            callback.apply(this, args);
45039          }
45040        } catch (err) {
45041          _iterator.e(err);
45042        } finally {
45043          _iterator.f();
45044        }
45045      } // trigger a corresponding DOM event
45046
45047
45048      if (this.element) {
45049        this.element.dispatchEvent(this.makeEvent("dropzone:" + event, {
45050          args: args
45051        }));
45052      }
45053
45054      return this
vendor: 25,544 bytes, lines 45054-45739
45054;
45055    }
45056  }, {
45057    key: "makeEvent",
45058    value: function makeEvent(eventName, detail) {
45059      var params = {
45060        bubbles: true,
45061        cancelable: true,
45062        detail: detail
45063      };
45064
45065      if (typeof window.CustomEvent === "function") {
45066        return new CustomEvent(eventName, params);
45067      } else {
45068        // IE 11 support
45069        // https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent
45070        var evt = document.createEvent("CustomEvent");
45071        evt.initCustomEvent(eventName, params.bubbles, params.cancelable, params.detail);
45072        return evt;
45073      }
45074    } // Remove event listener for given event. If fn is not provided, all event
45075    // listeners for that event will be removed. If neither is provided, all
45076    // event listeners will be removed.
45077
45078  }, {
45079    key: "off",
45080    value: function off(event, fn) {
45081      if (!this._callbacks || arguments.length === 0) {
45082        this._callbacks = {};
45083        return this;
45084      } // specific event
45085
45086
45087      var callbacks = this._callbacks[event];
45088
45089      if (!callbacks) {
45090        return this;
45091      } // remove all handlers
45092
45093
45094      if (arguments.length === 1) {
45095        delete this._callbacks[event];
45096        return this;
45097      } // remove specific handler
45098
45099
45100      for (var i = 0; i < callbacks.length; i++) {
45101        var callback = callbacks[i];
45102
45103        if (callback === fn) {
45104          callbacks.splice(i, 1);
45105          break;
45106        }
45107      }
45108
45109      return this;
45110    }
45111  }]);
45112
45113  return Emitter;
45114}();
45115
45116
45117;// CONCATENATED MODULE: ./src/preview-template.html
45118// Module
45119var code = "<div class=\"dz-preview dz-file-preview\"> <div class=\"dz-image\"><img data-dz-thumbnail/></div> <div class=\"dz-details\"> <div class=\"dz-size\"><span data-dz-size></span></div> <div class=\"dz-filename\"><span data-dz-name></span></div> </div> <div class=\"dz-progress\"> <span class=\"dz-upload\" data-dz-uploadprogress></span> </div> <div class=\"dz-error-message\"><span data-dz-errormessage></span></div> <div class=\"dz-success-mark\"> <svg width=\"54px\" height=\"54px\" viewBox=\"0 0 54 54\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"> <title>Check</title> <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\"> <path d=\"M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z\" stroke-opacity=\"0.198794158\" stroke=\"#747474\" fill-opacity=\"0.816519475\" fill=\"#FFFFFF\"></path> </g> </svg> </div> <div class=\"dz-error-mark\"> <svg width=\"54px\" height=\"54px\" viewBox=\"0 0 54 54\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"> <title>Error</title> <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\"> <g stroke=\"#747474\" stroke-opacity=\"0.198794158\" fill=\"#FFFFFF\" fill-opacity=\"0.816519475\"> <path d=\"M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z\"></path> </g> </g> </svg> </div> </div> ";
45120// Exports
45121/* harmony default export */ var preview_template = (code);
45122;// CONCATENATED MODULE: ./src/options.js
45123
45124
45125
45126
45127
45128function options_createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = options_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
45129
45130function options_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return options_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return options_arrayLikeToArray(o, minLen); }
45131
45132function options_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
45133
45134
45135
45136var defaultOptions = {
45137  /**
45138   * Has to be specified on elements other than form (or when the form
45139   * doesn't have an `action` attribute). You can also
45140   * provide a function that will be called with `files` and
45141   * must return the url (since `v3.12.0`)
45142   */
45143  url: null,
45144
45145  /**
45146   * Can be changed to `"put"` if necessary. You can also provide a function
45147   * that will be called with `files` and must return the method (since `v3.12.0`).
45148   */
45149  method: "post",
45150
45151  /**
45152   * Will be set on the XHRequest.
45153   */
45154  withCredentials: false,
45155
45156  /**
45157   * The timeout for the XHR requests in milliseconds (since `v4.4.0`).
45158   * If set to null or 0, no timeout is going to be set.
45159   */
45160  timeout: null,
45161
45162  /**
45163   * How many file uploads to process in parallel (See the
45164   * Enqueuing file uploads documentation section for more info)
45165   */
45166  parallelUploads: 2,
45167
45168  /**
45169   * Whether to send multiple files in one request. If
45170   * this it set to true, then the fallback file input element will
45171   * have the `multiple` attribute as well. This option will
45172   * also trigger additional events (like `processingmultiple`). See the events
45173   * documentation section for more information.
45174   */
45175  uploadMultiple: false,
45176
45177  /**
45178   * Whether you want files to be uploaded in chunks to your server. This can't be
45179   * used in combination with `uploadMultiple`.
45180   *
45181   * See [chunksUploaded](#config-chunksUploaded) for the callback to finalise an upload.
45182   */
45183  chunking: false,
45184
45185  /**
45186   * If `chunking` is enabled, this defines whether **every** file should be chunked,
45187   * even if the file size is below chunkSize. This means, that the additional chunk
45188   * form data will be submitted and the `chunksUploaded` callback will be invoked.
45189   */
45190  forceChunking: false,
45191
45192  /**
45193   * If `chunking` is `true`, then this defines the chunk size in bytes.
45194   */
45195  chunkSize: 2000000,
45196
45197  /**
45198   * If `true`, the individual chunks of a file are being uploaded simultaneously.
45199   */
45200  parallelChunkUploads: false,
45201
45202  /**
45203   * Whether a chunk should be retried if it fails.
45204   */
45205  retryChunks: false,
45206
45207  /**
45208   * If `retryChunks` is true, how many times should it be retried.
45209   */
45210  retryChunksLimit: 3,
45211
45212  /**
45213   * The maximum filesize (in bytes) that is allowed to be uploaded.
45214   */
45215  maxFilesize: 256,
45216
45217  /**
45218   * The name of the file param that gets transferred.
45219   * **NOTE**: If you have the option  `uploadMultiple` set to `true`, then
45220   * Dropzone will append `[]` to the name.
45221   */
45222  paramName: "file",
45223
45224  /**
45225   * Whether thumbnails for images should be generated
45226   */
45227  createImageThumbnails: true,
45228
45229  /**
45230   * In MB. When the filename exceeds this limit, the thumbnail will not be generated.
45231   */
45232  maxThumbnailFilesize: 10,
45233
45234  /**
45235   * If `null`, the ratio of the image will be used to calculate it.
45236   */
45237  thumbnailWidth: 120,
45238
45239  /**
45240   * The same as `thumbnailWidth`. If both are null, images will not be resized.
45241   */
45242  thumbnailHeight: 120,
45243
45244  /**
45245   * How the images should be scaled down in case both, `thumbnailWidth` and `thumbnailHeight` are provided.
45246   * Can be either `contain` or `crop`.
45247   */
45248  thumbnailMethod: "crop",
45249
45250  /**
45251   * If set, images will be resized to these dimensions before being **uploaded**.
45252   * If only one, `resizeWidth` **or** `resizeHeight` is provided, the original aspect
45253   * ratio of the file will be preserved.
45254   *
45255   * The `options.transformFile` function uses these options, so if the `transformFile` function
45256   * is overridden, these options don't do anything.
45257   */
45258  resizeWidth: null,
45259
45260  /**
45261   * See `resizeWidth`.
45262   */
45263  resizeHeight: null,
45264
45265  /**
45266   * The mime type of the resized image (before it gets uploaded to the server).
45267   * If `null` the original mime type will be used. To force jpeg, for example, use `image/jpeg`.
45268   * See `resizeWidth` for more information.
45269   */
45270  resizeMimeType: null,
45271
45272  /**
45273   * The quality of the resized images. See `resizeWidth`.
45274   */
45275  resizeQuality: 0.8,
45276
45277  /**
45278   * How the images should be scaled down in case both, `resizeWidth` and `resizeHeight` are provided.
45279   * Can be either `contain` or `crop`.
45280   */
45281  resizeMethod: "contain",
45282
45283  /**
45284   * The base that is used to calculate the **displayed** filesize. You can
45285   * change this to 1024 if you would rather display kibibytes, mebibytes,
45286   * etc... 1024 is technically incorrect, because `1024 bytes` are `1 kibibyte`
45287   * not `1 kilobyte`. You can change this to `1024` if you don't care about
45288   * validity.
45289   */
45290  filesizeBase: 1000,
45291
45292  /**
45293   * If not `null` defines how many files this Dropzone handles. If it exceeds,
45294   * the event `maxfilesexceeded` will be called. The dropzone element gets the
45295   * class `dz-max-files-reached` accordingly so you can provide visual
45296   * feedback.
45297   */
45298  maxFiles: null,
45299
45300  /**
45301   * An optional object to send additional headers to the server. Eg:
45302   * `{ "My-Awesome-Header": "header value" }`
45303   */
45304  headers: null,
45305
45306  /**
45307   * If `true`, the dropzone element itself will be clickable, if `false`
45308   * nothing will be clickable.
45309   *
45310   * You can also pass an HTML element, a CSS selector (for multiple elements)
45311   * or an array of those. In that case, all of those elements will trigger an
45312   * upload when clicked.
45313   */
45314  clickable: true,
45315
45316  /**
45317   * Whether hidden files in directories should be ignored.
45318   */
45319  ignoreHiddenFiles: true,
45320
45321  /**
45322   * The default implementation of `accept` checks the file's mime type or
45323   * extension against this list. This is a comma separated list of mime
45324   * types or file extensions.
45325   *
45326   * Eg.: `image/*,application/pdf,.psd`
45327   *
45328   * If the Dropzone is `clickable` this option will also be used as
45329   * [`accept`](https://developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept)
45330   * parameter on the hidden file input as well.
45331   */
45332  acceptedFiles: null,
45333
45334  /**
45335   * **Deprecated!**
45336   * Use acceptedFiles instead.
45337   */
45338  acceptedMimeTypes: null,
45339
45340  /**
45341   * If false, files will be added to the queue but the queue will not be
45342   * processed automatically.
45343   * This can be useful if you need some additional user input before sending
45344   * files (or if you want want all files sent at once).
45345   * If you're ready to send the file simply call `myDropzone.processQueue()`.
45346   *
45347   * See the [enqueuing file uploads](#enqueuing-file-uploads) documentation
45348   * section for more information.
45349   */
45350  autoProcessQueue: true,
45351
45352  /**
45353   * If false, files added to the dropzone will not be queued by default.
45354   * You'll have to call `enqueueFile(file)` manually.
45355   */
45356  autoQueue: true,
45357
45358  /**
45359   * If `true`, this will add a link to every file preview to remove or cancel (if
45360   * already uploading) the file. The `dictCancelUpload`, `dictCancelUploadConfirmation`
45361   * and `dictRemoveFile` options are used for the wording.
45362   */
45363  addRemoveLinks: false,
45364
45365  /**
45366   * Defines where to display the file previews – if `null` the
45367   * Dropzone element itself is used. Can be a plain `HTMLElement` or a CSS
45368   * selector. The element should have the `dropzone-previews` class so
45369   * the previews are displayed properly.
45370   */
45371  previewsContainer: null,
45372
45373  /**
45374   * Set this to `true` if you don't want previews to be shown.
45375   */
45376  disablePreviews: false,
45377
45378  /**
45379   * This is the element the hidden input field (which is used when clicking on the
45380   * dropzone to trigger file selection) will be appended to. This might
45381   * be important in case you use frameworks to switch the content of your page.
45382   *
45383   * Can be a selector string, or an element directly.
45384   */
45385  hiddenInputContainer: "body",
45386
45387  /**
45388   * If null, no capture type will be specified
45389   * If camera, mobile devices will skip the file selection and choose camera
45390   * If microphone, mobile devices will skip the file selection and choose the microphone
45391   * If camcorder, mobile devices will skip the file selection and choose the camera in video mode
45392   * On apple devices multiple must be set to false.  AcceptedFiles may need to
45393   * be set to an appropriate mime type (e.g. "image/*", "audio/*", or "video/*").
45394   */
45395  capture: null,
45396
45397  /**
45398   * **Deprecated**. Use `renameFile` instead.
45399   */
45400  renameFilename: null,
45401
45402  /**
45403   * A function that is invoked before the file is uploaded to the server and renames the file.
45404   * This function gets the `File` as argument and can use the `file.name`. The actual name of the
45405   * file that gets used during the upload can be accessed through `file.upload.filename`.
45406   */
45407  renameFile: null,
45408
45409  /**
45410   * If `true` the fallback will be forced. This is very useful to test your server
45411   * implementations first and make sure that everything works as
45412   * expected without dropzone if you experience problems, and to test
45413   * how your fallbacks will look.
45414   */
45415  forceFallback: false,
45416
45417  /**
45418   * The text used before any files are dropped.
45419   */
45420  dictDefaultMessage: "Drop files here to upload",
45421
45422  /**
45423   * The text that replaces the default message text it the browser is not supported.
45424   */
45425  dictFallbackMessage: "Your browser does not support drag'n'drop file uploads.",
45426
45427  /**
45428   * The text that will be added before the fallback form.
45429   * If you provide a  fallback element yourself, or if this option is `null` this will
45430   * be ignored.
45431   */
45432  dictFallbackText: "Please use the fallback form below to upload your files like in the olden days.",
45433
45434  /**
45435   * If the filesize is too big.
45436   * `{{filesize}}` and `{{maxFilesize}}` will be replaced with the respective configuration values.
45437   */
45438  dictFileTooBig: "File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",
45439
45440  /**
45441   * If the file doesn't match the file type.
45442   */
45443  dictInvalidFileType: "You can't upload files of this type.",
45444
45445  /**
45446   * If the server response was invalid.
45447   * `{{statusCode}}` will be replaced with the servers status code.
45448   */
45449  dictResponseError: "Server responded with {{statusCode}} code.",
45450
45451  /**
45452   * If `addRemoveLinks` is true, the text to be used for the cancel upload link.
45453   */
45454  dictCancelUpload: "Cancel upload",
45455
45456  /**
45457   * The text that is displayed if an upload was manually canceled
45458   */
45459  dictUploadCanceled: "Upload canceled.",
45460
45461  /**
45462   * If `addRemoveLinks` is true, the text to be used for confirmation when cancelling upload.
45463   */
45464  dictCancelUploadConfirmation: "Are you sure you want to cancel this upload?",
45465
45466  /**
45467   * If `addRemoveLinks` is true, the text to be used to remove a file.
45468   */
45469  dictRemoveFile: "Remove file",
45470
45471  /**
45472   * If this is not null, then the user will be prompted before removing a file.
45473   */
45474  dictRemoveFileConfirmation: null,
45475
45476  /**
45477   * Displayed if `maxFiles` is st and exceeded.
45478   * The string `{{maxFiles}}` will be replaced by the configuration value.
45479   */
45480  dictMaxFilesExceeded: "You can not upload any more files.",
45481
45482  /**
45483   * Allows you to translate the different units. Starting with `tb` for terabytes and going down to
45484   * `b` for bytes.
45485   */
45486  dictFileSizeUnits: {
45487    tb: "TB",
45488    gb: "GB",
45489    mb: "MB",
45490    kb: "KB",
45491    b: "b"
45492  },
45493
45494  /**
45495   * Called when dropzone initialized
45496   * You can add event listeners here
45497   */
45498  init: function init() {},
45499
45500  /**
45501   * Can be an **object** of additional parameters to transfer to the server, **or** a `Function`
45502   * that gets invoked with the `files`, `xhr` and, if it's a chunked upload, `chunk` arguments. In case
45503   * of a function, this needs to return a map.
45504   *
45505   * The default implementation does nothing for normal uploads, but adds relevant information for
45506   * chunked uploads.
45507   *
45508   * This is the same as adding hidden input fields in the form element.
45509   */
45510  params: function params(files, xhr, chunk) {
45511    if (chunk) {
45512      return {
45513        dzuuid: chunk.file.upload.uuid,
45514        dzchunkindex: chunk.index,
45515        dztotalfilesize: chunk.file.size,
45516        dzchunksize: this.options.chunkSize,
45517        dztotalchunkcount: chunk.file.upload.totalChunkCount,
45518        dzchunkbyteoffset: chunk.index * this.options.chunkSize
45519      };
45520    }
45521  },
45522
45523  /**
45524   * A function that gets a [file](https://developer.mozilla.org/en-US/docs/DOM/File)
45525   * and a `done` function as parameters.
45526   *
45527   * If the done function is invoked without arguments, the file is "accepted" and will
45528   * be processed. If you pass an error message, the file is rejected, and the error
45529   * message will be displayed.
45530   * This function will not be called if the file is too big or doesn't match the mime types.
45531   */
45532  accept: function accept(file, done) {
45533    return done();
45534  },
45535
45536  /**
45537   * The callback that will be invoked when all chunks have been uploaded for a file.
45538   * It gets the file for which the chunks have been uploaded as the first parameter,
45539   * and the `done` function as second. `done()` needs to be invoked when everything
45540   * needed to finish the upload process is done.
45541   */
45542  chunksUploaded: function chunksUploaded(file, done) {
45543    done();
45544  },
45545
45546  /**
45547   * Gets called when the browser is not supported.
45548   * The default implementation shows the fallback input field and adds
45549   * a text.
45550   */
45551  fallback: function fallback() {
45552    // This code should pass in IE7... :(
45553    var messageElement;
45554    this.element.className = "".concat(this.element.className, " dz-browser-not-supported");
45555
45556    var _iterator = options_createForOfIteratorHelper(this.element.getElementsByTagName("div"), true),
45557        _step;
45558
45559    try {
45560      for (_iterator.s(); !(_step = _iterator.n()).done;) {
45561        var child = _step.value;
45562
45563        if (/(^| )dz-message($| )/.test(child.className)) {
45564          messageElement = child;
45565          child.className = "dz-message"; // Removes the 'dz-default' class
45566
45567          break;
45568        }
45569      }
45570    } catch (err) {
45571      _iterator.e(err);
45572    } finally {
45573      _iterator.f();
45574    }
45575
45576    if (!messageElement) {
45577      messageElement = Dropzone.createElement('<div class="dz-message"><span></span></div>');
45578      this.element.appendChild(messageElement);
45579    }
45580
45581    var span = messageElement.getElementsByTagName("span")[0];
45582
45583    if (span) {
45584      if (span.textContent != null) {
45585        span.textContent = this.options.dictFallbackMessage;
45586      } else if (span.innerText != null) {
45587        span.innerText = this.options.dictFallbackMessage;
45588      }
45589    }
45590
45591    return this.element.appendChild(this.getFallbackForm());
45592  },
45593
45594  /**
45595   * Gets called to calculate the thumbnail dimensions.
45596   *
45597   * It gets `file`, `width` and `height` (both may be `null`) as parameters and must return an object containing:
45598   *
45599   *  - `srcWidth` & `srcHeight` (required)
45600   *  - `trgWidth` & `trgHeight` (required)
45601   *  - `srcX` & `srcY` (optional, default `0`)
45602   *  - `trgX` & `trgY` (optional, default `0`)
45603   *
45604   * Those values are going to be used by `ctx.drawImage()`.
45605   */
45606  resize: function resize(file, width, height, resizeMethod) {
45607    var info = {
45608      srcX: 0,
45609      srcY: 0,
45610      srcWidth: file.width,
45611      srcHeight: file.height
45612    };
45613    var srcRatio = file.width / file.height; // Automatically calculate dimensions if not specified
45614
45615    if (width == null && height == null) {
45616      width = info.srcWidth;
45617      height = info.srcHeight;
45618    } else if (width == null) {
45619      width = height * srcRatio;
45620    } else if (height == null) {
45621      height = width / srcRatio;
45622    } // Make sure images aren't upscaled
45623
45624
45625    width = Math.min(width, info.srcWidth);
45626    height = Math.min(height, info.srcHeight);
45627    var trgRatio = width / height;
45628
45629    if (info.srcWidth > width || info.srcHeight > height) {
45630      // Image is bigger and needs rescaling
45631      if (resizeMethod === "crop") {
45632        if (srcRatio > trgRatio) {
45633          info.srcHeight = file.height;
45634          info.srcWidth = info.srcHeight * trgRatio;
45635        } else {
45636          info.srcWidth = file.width;
45637          info.srcHeight = info.srcWidth / trgRatio;
45638        }
45639      } else if (resizeMethod === "contain") {
45640        // Method 'contain'
45641        if (srcRatio > trgRatio) {
45642          height = width / srcRatio;
45643        } else {
45644          width = height * srcRatio;
45645        }
45646      } else {
45647        throw new Error("Unknown resizeMethod '".concat(resizeMethod, "'"));
45648      }
45649    }
45650
45651    info.srcX = (file.width - info.srcWidth) / 2;
45652    info.srcY = (file.height - info.srcHeight) / 2;
45653    info.trgWidth = width;
45654    info.trgHeight = height;
45655    return info;
45656  },
45657
45658  /**
45659   * Can be used to transform the file (for example, resize an image if necessary).
45660   *
45661   * The default implementation uses `resizeWidth` and `resizeHeight` (if provided) and resizes
45662   * images according to those dimensions.
45663   *
45664   * Gets the `file` as the first parameter, and a `done()` function as the second, that needs
45665   * to be invoked with the file when the transformation is done.
45666   */
45667  transformFile: function transformFile(file, done) {
45668    if ((this.options.resizeWidth || this.options.resizeHeight) && file.type.match(/image.*/)) {
45669      return this.resizeImage(file, this.options.resizeWidth, this.options.resizeHeight, this.options.resizeMethod, done);
45670    } else {
45671      return done(file);
45672    }
45673  },
45674
45675  /**
45676   * A string that contains the template used for each dropped
45677   * file. Change it to fulfill your needs but make sure to properly
45678   * provide all elements.
45679   *
45680   * If you want to use an actual HTML element instead of providing a String
45681   * as a config option, you could create a div with the id `tpl`,
45682   * put the template inside it and provide the element like this:
45683   *
45684   *     document
45685   *       .querySelector('#tpl')
45686   *       .innerHTML
45687   *
45688   */
45689  previewTemplate: preview_template,
45690
45691  /*
45692   Those functions register themselves to the events on init and handle all
45693   the user interface specific stuff. Overwriting them won't break the upload
45694   but can break the way it's displayed.
45695   You can overwrite them if you don't like the default behavior. If you just
45696   want to add an additional event handler, register it on the dropzone object
45697   and don't overwrite those options.
45698   */
45699  // Those are self explanatory and simply concern the DragnDrop.
45700  drop: function drop(e) {
45701    return this.element.classList.remove("dz-drag-hover");
45702  },
45703  dragstart: function dragstart(e) {},
45704  dragend: function dragend(e) {
45705    return this.element.classList.remove("dz-drag-hover");
45706  },
45707  dragenter: function dragenter(e) {
45708    return this.element.classList.add("dz-drag-hover");
45709  },
45710  dragover: function dragover(e) {
45711    return this.element.classList.add("dz-drag-hover");
45712  },
45713  dragleave: function dragleave(e) {
45714    return this.element.classList.remove("dz-drag-hover");
45715  },
45716  paste: function paste(e) {},
45717  // Called whenever there are no files left in the dropzone anymore, and the
45718  // dropzone should be displayed as if in the initial state.
45719  reset: function reset() {
45720    return this.element.classList.remove("dz-started");
45721  },
45722  // Called when a file is added to the queue
45723  // Receives `file`
45724  addedfile: function addedfile(file) {
45725    var _this = this;
45726
45727    if (this.element === this.previewsContainer) {
45728      this.element.classList.add("dz-started");
45729    }
45730
45731    if (this.previewsContainer && !this.options.disablePreviews) {
45732      file.previewElement = Dropzone.createElement(this.options.previewTemplate.trim());
45733      file.previewTemplate = file.previewElement; // Backwards compatibility
45734
45735      this.previewsContainer.appendChild(file.previewElement);
45736
45737      var _iterator2 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-name]"), true),
45738          _step2;
45739
vendor: 5,964 bytes, lines 45740-45914
45740      try {
45741        for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
45742          var node = _step2.value;
45743          node.textContent = file.name;
45744        }
45745      } catch (err) {
45746        _iterator2.e(err);
45747      } finally {
45748        _iterator2.f();
45749      }
45750
45751      var _iterator3 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-size]"), true),
45752          _step3;
45753
45754      try {
45755        for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
45756          node = _step3.value;
45757          node.innerHTML = this.filesize(file.size);
45758        }
45759      } catch (err) {
45760        _iterator3.e(err);
45761      } finally {
45762        _iterator3.f();
45763      }
45764
45765      if (this.options.addRemoveLinks) {
45766        file._removeLink = Dropzone.createElement("<a class=\"dz-remove\" href=\"javascript:undefined;\" data-dz-remove>".concat(this.options.dictRemoveFile, "</a>"));
45767        file.previewElement.appendChild(file._removeLink);
45768      }
45769
45770      var removeFileEvent = function removeFileEvent(e) {
45771        e.preventDefault();
45772        e.stopPropagation();
45773
45774        if (file.status === Dropzone.UPLOADING) {
45775          return Dropzone.confirm(_this.options.dictCancelUploadConfirmation, function () {
45776            return _this.removeFile(file);
45777          });
45778        } else {
45779          if (_this.options.dictRemoveFileConfirmation) {
45780            return Dropzone.confirm(_this.options.dictRemoveFileConfirmation, function () {
45781              return _this.removeFile(file);
45782            });
45783          } else {
45784            return _this.removeFile(file);
45785          }
45786        }
45787      };
45788
45789      var _iterator4 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-remove]"), true),
45790          _step4;
45791
45792      try {
45793        for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
45794          var removeLink = _step4.value;
45795          removeLink.addEventListener("click", removeFileEvent);
45796        }
45797      } catch (err) {
45798        _iterator4.e(err);
45799      } finally {
45800        _iterator4.f();
45801      }
45802    }
45803  },
45804  // Called whenever a file is removed.
45805  removedfile: function removedfile(file) {
45806    if (file.previewElement != null && file.previewElement.parentNode != null) {
45807      file.previewElement.parentNode.removeChild(file.previewElement);
45808    }
45809
45810    return this._updateMaxFilesReachedClass();
45811  },
45812  // Called when a thumbnail has been generated
45813  // Receives `file` and `dataUrl`
45814  thumbnail: function thumbnail(file, dataUrl) {
45815    if (file.previewElement) {
45816      file.previewElement.classList.remove("dz-file-preview");
45817
45818      var _iterator5 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-thumbnail]"), true),
45819          _step5;
45820
45821      try {
45822        for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
45823          var thumbnailElement = _step5.value;
45824          thumbnailElement.alt = file.name;
45825          thumbnailElement.src = dataUrl;
45826        }
45827      } catch (err) {
45828        _iterator5.e(err);
45829      } finally {
45830        _iterator5.f();
45831      }
45832
45833      return setTimeout(function () {
45834        return file.previewElement.classList.add("dz-image-preview");
45835      }, 1);
45836    }
45837  },
45838  // Called whenever an error occurs
45839  // Receives `file` and `message`
45840  error: function error(file, message) {
45841    if (file.previewElement) {
45842      file.previewElement.classList.add("dz-error");
45843
45844      if (typeof message !== "string" && message.error) {
45845        message = message.error;
45846      }
45847
45848      var _iterator6 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-errormessage]"), true),
45849          _step6;
45850
45851      try {
45852        for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
45853          var node = _step6.value;
45854          node.textContent = message;
45855        }
45856      } catch (err) {
45857        _iterator6.e(err);
45858      } finally {
45859        _iterator6.f();
45860      }
45861    }
45862  },
45863  errormultiple: function errormultiple() {},
45864  // Called when a file gets processed. Since there is a cue, not all added
45865  // files are processed immediately.
45866  // Receives `file`
45867  processing: function processing(file) {
45868    if (file.previewElement) {
45869      file.previewElement.classList.add("dz-processing");
45870
45871      if (file._removeLink) {
45872        return file._removeLink.innerHTML = this.options.dictCancelUpload;
45873      }
45874    }
45875  },
45876  processingmultiple: function processingmultiple() {},
45877  // Called whenever the upload progress gets updated.
45878  // Receives `file`, `progress` (percentage 0-100) and `bytesSent`.
45879  // To get the total number of bytes of the file, use `file.size`
45880  uploadprogress: function uploadprogress(file, progress, bytesSent) {
45881    if (file.previewElement) {
45882      var _iterator7 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-uploadprogress]"), true),
45883          _step7;
45884
45885      try {
45886        for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
45887          var node = _step7.value;
45888          node.nodeName === "PROGRESS" ? node.value = progress : node.style.width = "".concat(progress, "%");
45889        }
45890      } catch (err) {
45891        _iterator7.e(err);
45892      } finally {
45893        _iterator7.f();
45894      }
45895    }
45896  },
45897  // Called whenever the total upload progress gets updated.
45898  // Called with totalUploadProgress (0-100), totalBytes and totalBytesSent
45899  totaluploadprogress: function totaluploadprogress() {},
45900  // Called just before the file is sent. Gets the `xhr` object as second
45901  // parameter, so you can modify it (for example to add a CSRF token) and a
45902  // `formData` object to add additional information.
45903  sending: function sending() {},
45904  sendingmultiple: function sendingmultiple() {},
45905  // When the complete upload is finished and successful
45906  // Receives `file`
45907  success: function success(file) {
45908    if (file.previewElement) {
45909      return file.previewElement.classList.add("dz-success");
45910    }
45911  },
45912  successmultiple: function successmultiple() {},
45913  // When the upload is canceled.
45914  canceled: function canceled(file) {
vendor: 9,519 bytes, lines 45915-46128
45915    return this.emit("error", file, this.options.dictUploadCanceled);
45916  },
45917  canceledmultiple: function canceledmultiple() {},
45918  // When the upload is finished, either with success or an error.
45919  // Receives `file`
45920  complete: function complete(file) {
45921    if (file._removeLink) {
45922      file._removeLink.innerHTML = this.options.dictRemoveFile;
45923    }
45924
45925    if (file.previewElement) {
45926      return file.previewElement.classList.add("dz-complete");
45927    }
45928  },
45929  completemultiple: function completemultiple() {},
45930  maxfilesexceeded: function maxfilesexceeded() {},
45931  maxfilesreached: function maxfilesreached() {},
45932  queuecomplete: function queuecomplete() {},
45933  addedfiles: function addedfiles() {}
45934};
45935/* harmony default export */ var src_options = (defaultOptions);
45936;// CONCATENATED MODULE: ./src/dropzone.js
45937function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
45938
45939
45940
45941
45942
45943
45944
45945
45946
45947
45948
45949
45950
45951
45952
45953
45954
45955
45956
45957
45958
45959
45960
45961
45962
45963
45964
45965
45966
45967
45968
45969
45970
45971
45972
45973
45974
45975
45976
45977
45978
45979
45980
45981
45982
45983
45984
45985function dropzone_createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = dropzone_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
45986
45987function dropzone_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return dropzone_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return dropzone_arrayLikeToArray(o, minLen); }
45988
45989function dropzone_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
45990
45991function dropzone_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
45992
45993function dropzone_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
45994
45995function dropzone_createClass(Constructor, protoProps, staticProps) { if (protoProps) dropzone_defineProperties(Constructor.prototype, protoProps); if (staticProps) dropzone_defineProperties(Constructor, staticProps); return Constructor; }
45996
45997function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
45998
45999function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
46000
46001function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
46002
46003function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
46004
46005function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
46006
46007function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
46008
46009function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
46010
46011
46012
46013
46014var Dropzone = /*#__PURE__*/function (_Emitter) {
46015  _inherits(Dropzone, _Emitter);
46016
46017  var _super = _createSuper(Dropzone);
46018
46019  function Dropzone(el, options) {
46020    var _this;
46021
46022    dropzone_classCallCheck(this, Dropzone);
46023
46024    _this = _super.call(this);
46025    var fallback, left;
46026    _this.element = el; // For backwards compatibility since the version was in the prototype previously
46027
46028    _this.version = Dropzone.version;
46029    _this.clickableElements = [];
46030    _this.listeners = [];
46031    _this.files = []; // All files
46032
46033    if (typeof _this.element === "string") {
46034      _this.element = document.querySelector(_this.element);
46035    } // Not checking if instance of HTMLElement or Element since IE9 is extremely weird.
46036
46037
46038    if (!_this.element || _this.element.nodeType == null) {
46039      throw new Error("Invalid dropzone element.");
46040    }
46041
46042    if (_this.element.dropzone) {
46043      throw new Error("Dropzone already attached.");
46044    } // Now add this dropzone to the instances.
46045
46046
46047    Dropzone.instances.push(_assertThisInitialized(_this)); // Put the dropzone inside the element itself.
46048
46049    _this.element.dropzone = _assertThisInitialized(_this);
46050    var elementOptions = (left = Dropzone.optionsForElement(_this.element)) != null ? left : {};
46051    _this.options = Dropzone.extend({}, src_options, elementOptions, options != null ? options : {});
46052    _this.options.previewTemplate = _this.options.previewTemplate.replace(/\n*/g, ""); // If the browser failed, just call the fallback and leave
46053
46054    if (_this.options.forceFallback || !Dropzone.isBrowserSupported()) {
46055      return _possibleConstructorReturn(_this, _this.options.fallback.call(_assertThisInitialized(_this)));
46056    } // @options.url = @element.getAttribute "action" unless @options.url?
46057
46058
46059    if (_this.options.url == null) {
46060      _this.options.url = _this.element.getAttribute("action");
46061    }
46062
46063    if (!_this.options.url) {
46064      throw new Error("No URL provided.");
46065    }
46066
46067    if (_this.options.acceptedFiles && _this.options.acceptedMimeTypes) {
46068      throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");
46069    }
46070
46071    if (_this.options.uploadMultiple && _this.options.chunking) {
46072      throw new Error("You cannot set both: uploadMultiple and chunking.");
46073    } // Backwards compatibility
46074
46075
46076    if (_this.options.acceptedMimeTypes) {
46077      _this.options.acceptedFiles = _this.options.acceptedMimeTypes;
46078      delete _this.options.acceptedMimeTypes;
46079    } // Backwards compatibility
46080
46081
46082    if (_this.options.renameFilename != null) {
46083      _this.options.renameFile = function (file) {
46084        return _this.options.renameFilename.call(_assertThisInitialized(_this), file.name, file);
46085      };
46086    }
46087
46088    if (typeof _this.options.method === "string") {
46089      _this.options.method = _this.options.method.toUpperCase();
46090    }
46091
46092    if ((fallback = _this.getExistingFallback()) && fallback.parentNode) {
46093      // Remove the fallback
46094      fallback.parentNode.removeChild(fallback);
46095    } // Display previews in the previewsContainer element or the Dropzone element unless explicitly set to false
46096
46097
46098    if (_this.options.previewsContainer !== false) {
46099      if (_this.options.previewsContainer) {
46100        _this.previewsContainer = Dropzone.getElement(_this.options.previewsContainer, "previewsContainer");
46101      } else {
46102        _this.previewsContainer = _this.element;
46103      }
46104    }
46105
46106    if (_this.options.clickable) {
46107      if (_this.options.clickable === true) {
46108        _this.clickableElements = [_this.element];
46109      } else {
46110        _this.clickableElements = Dropzone.getElements(_this.options.clickable, "clickable");
46111      }
46112    }
46113
46114    _this.init();
46115
46116    return _this;
46117  } // Returns all files that have been accepted
46118
46119
46120  dropzone_createClass(Dropzone, [{
46121    key: "getAcceptedFiles",
46122    value: function getAcceptedFiles() {
46123      return this.files.filter(function (file) {
46124        return file.accepted;
46125      }).map(function (file) {
46126        return file;
46127      });
46128    } // Returns all files that have been rejected
vendor: 27,944 bytes, lines 46129-46975
46129    // Not sure when that's going to be useful, but added for completeness.
46130
46131  }, {
46132    key: "getRejectedFiles",
46133    value: function getRejectedFiles() {
46134      return this.files.filter(function (file) {
46135        return !file.accepted;
46136      }).map(function (file) {
46137        return file;
46138      });
46139    }
46140  }, {
46141    key: "getFilesWithStatus",
46142    value: function getFilesWithStatus(status) {
46143      return this.files.filter(function (file) {
46144        return file.status === status;
46145      }).map(function (file) {
46146        return file;
46147      });
46148    } // Returns all files that are in the queue
46149
46150  }, {
46151    key: "getQueuedFiles",
46152    value: function getQueuedFiles() {
46153      return this.getFilesWithStatus(Dropzone.QUEUED);
46154    }
46155  }, {
46156    key: "getUploadingFiles",
46157    value: function getUploadingFiles() {
46158      return this.getFilesWithStatus(Dropzone.UPLOADING);
46159    }
46160  }, {
46161    key: "getAddedFiles",
46162    value: function getAddedFiles() {
46163      return this.getFilesWithStatus(Dropzone.ADDED);
46164    } // Files that are either queued or uploading
46165
46166  }, {
46167    key: "getActiveFiles",
46168    value: function getActiveFiles() {
46169      return this.files.filter(function (file) {
46170        return file.status === Dropzone.UPLOADING || file.status === Dropzone.QUEUED;
46171      }).map(function (file) {
46172        return file;
46173      });
46174    } // The function that gets called when Dropzone is initialized. You
46175    // can (and should) setup event listeners inside this function.
46176
46177  }, {
46178    key: "init",
46179    value: function init() {
46180      var _this2 = this;
46181
46182      // In case it isn't set already
46183      if (this.element.tagName === "form") {
46184        this.element.setAttribute("enctype", "multipart/form-data");
46185      }
46186
46187      if (this.element.classList.contains("dropzone") && !this.element.querySelector(".dz-message")) {
46188        this.element.appendChild(Dropzone.createElement("<div class=\"dz-default dz-message\"><button class=\"dz-button\" type=\"button\">".concat(this.options.dictDefaultMessage, "</button></div>")));
46189      }
46190
46191      if (this.clickableElements.length) {
46192        var setupHiddenFileInput = function setupHiddenFileInput() {
46193          if (_this2.hiddenFileInput) {
46194            _this2.hiddenFileInput.parentNode.removeChild(_this2.hiddenFileInput);
46195          }
46196
46197          _this2.hiddenFileInput = document.createElement("input");
46198
46199          _this2.hiddenFileInput.setAttribute("type", "file");
46200
46201          if (_this2.options.maxFiles === null || _this2.options.maxFiles > 1) {
46202            _this2.hiddenFileInput.setAttribute("multiple", "multiple");
46203          }
46204
46205          _this2.hiddenFileInput.className = "dz-hidden-input";
46206
46207          if (_this2.options.acceptedFiles !== null) {
46208            _this2.hiddenFileInput.setAttribute("accept", _this2.options.acceptedFiles);
46209          }
46210
46211          if (_this2.options.capture !== null) {
46212            _this2.hiddenFileInput.setAttribute("capture", _this2.options.capture);
46213          } // Making sure that no one can "tab" into this field.
46214
46215
46216          _this2.hiddenFileInput.setAttribute("tabindex", "-1"); // Not setting `display="none"` because some browsers don't accept clicks
46217          // on elements that aren't displayed.
46218
46219
46220          _this2.hiddenFileInput.style.visibility = "hidden";
46221          _this2.hiddenFileInput.style.position = "absolute";
46222          _this2.hiddenFileInput.style.top = "0";
46223          _this2.hiddenFileInput.style.left = "0";
46224          _this2.hiddenFileInput.style.height = "0";
46225          _this2.hiddenFileInput.style.width = "0";
46226          Dropzone.getElement(_this2.options.hiddenInputContainer, "hiddenInputContainer").appendChild(_this2.hiddenFileInput);
46227
46228          _this2.hiddenFileInput.addEventListener("change", function () {
46229            var files = _this2.hiddenFileInput.files;
46230
46231            if (files.length) {
46232              var _iterator = dropzone_createForOfIteratorHelper(files, true),
46233                  _step;
46234
46235              try {
46236                for (_iterator.s(); !(_step = _iterator.n()).done;) {
46237                  var file = _step.value;
46238
46239                  _this2.addFile(file);
46240                }
46241              } catch (err) {
46242                _iterator.e(err);
46243              } finally {
46244                _iterator.f();
46245              }
46246            }
46247
46248            _this2.emit("addedfiles", files);
46249
46250            setupHiddenFileInput();
46251          });
46252        };
46253
46254        setupHiddenFileInput();
46255      }
46256
46257      this.URL = window.URL !== null ? window.URL : window.webkitURL; // Setup all event listeners on the Dropzone object itself.
46258      // They're not in @setupEventListeners() because they shouldn't be removed
46259      // again when the dropzone gets disabled.
46260
46261      var _iterator2 = dropzone_createForOfIteratorHelper(this.events, true),
46262          _step2;
46263
46264      try {
46265        for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
46266          var eventName = _step2.value;
46267          this.on(eventName, this.options[eventName]);
46268        }
46269      } catch (err) {
46270        _iterator2.e(err);
46271      } finally {
46272        _iterator2.f();
46273      }
46274
46275      this.on("uploadprogress", function () {
46276        return _this2.updateTotalUploadProgress();
46277      });
46278      this.on("removedfile", function () {
46279        return _this2.updateTotalUploadProgress();
46280      });
46281      this.on("canceled", function (file) {
46282        return _this2.emit("complete", file);
46283      }); // Emit a `queuecomplete` event if all files finished uploading.
46284
46285      this.on("complete", function (file) {
46286        if (_this2.getAddedFiles().length === 0 && _this2.getUploadingFiles().length === 0 && _this2.getQueuedFiles().length === 0) {
46287          // This needs to be deferred so that `queuecomplete` really triggers after `complete`
46288          return setTimeout(function () {
46289            return _this2.emit("queuecomplete");
46290          }, 0);
46291        }
46292      });
46293
46294      var containsFiles = function containsFiles(e) {
46295        if (e.dataTransfer.types) {
46296          // Because e.dataTransfer.types is an Object in
46297          // IE, we need to iterate like this instead of
46298          // using e.dataTransfer.types.some()
46299          for (var i = 0; i < e.dataTransfer.types.length; i++) {
46300            if (e.dataTransfer.types[i] === "Files") return true;
46301          }
46302        }
46303
46304        return false;
46305      };
46306
46307      var noPropagation = function noPropagation(e) {
46308        // If there are no files, we don't want to stop
46309        // propagation so we don't interfere with other
46310        // drag and drop behaviour.
46311        if (!containsFiles(e)) return;
46312        e.stopPropagation();
46313
46314        if (e.preventDefault) {
46315          return e.preventDefault();
46316        } else {
46317          return e.returnValue = false;
46318        }
46319      }; // Create the listeners
46320
46321
46322      this.listeners = [{
46323        element: this.element,
46324        events: {
46325          dragstart: function dragstart(e) {
46326            return _this2.emit("dragstart", e);
46327          },
46328          dragenter: function dragenter(e) {
46329            noPropagation(e);
46330            return _this2.emit("dragenter", e);
46331          },
46332          dragover: function dragover(e) {
46333            // Makes it possible to drag files from chrome's download bar
46334            // http://stackoverflow.com/questions/19526430/drag-and-drop-file-uploads-from-chrome-downloads-bar
46335            // Try is required to prevent bug in Internet Explorer 11 (SCRIPT65535 exception)
46336            var efct;
46337
46338            try {
46339              efct = e.dataTransfer.effectAllowed;
46340            } catch (error) {}
46341
46342            e.dataTransfer.dropEffect = "move" === efct || "linkMove" === efct ? "move" : "copy";
46343            noPropagation(e);
46344            return _this2.emit("dragover", e);
46345          },
46346          dragleave: function dragleave(e) {
46347            return _this2.emit("dragleave", e);
46348          },
46349          drop: function drop(e) {
46350            noPropagation(e);
46351            return _this2.drop(e);
46352          },
46353          dragend: function dragend(e) {
46354            return _this2.emit("dragend", e);
46355          }
46356        } // This is disabled right now, because the browsers don't implement it properly.
46357        // "paste": (e) =>
46358        //   noPropagation e
46359        //   @paste e
46360
46361      }];
46362      this.clickableElements.forEach(function (clickableElement) {
46363        return _this2.listeners.push({
46364          element: clickableElement,
46365          events: {
46366            click: function click(evt) {
46367              // Only the actual dropzone or the message element should trigger file selection
46368              if (clickableElement !== _this2.element || evt.target === _this2.element || Dropzone.elementInside(evt.target, _this2.element.querySelector(".dz-message"))) {
46369                _this2.hiddenFileInput.click(); // Forward the click
46370
46371              }
46372
46373              return true;
46374            }
46375          }
46376        });
46377      });
46378      this.enable();
46379      return this.options.init.call(this);
46380    } // Not fully tested yet
46381
46382  }, {
46383    key: "destroy",
46384    value: function destroy() {
46385      this.disable();
46386      this.removeAllFiles(true);
46387
46388      if (this.hiddenFileInput != null ? this.hiddenFileInput.parentNode : undefined) {
46389        this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput);
46390        this.hiddenFileInput = null;
46391      }
46392
46393      delete this.element.dropzone;
46394      return Dropzone.instances.splice(Dropzone.instances.indexOf(this), 1);
46395    }
46396  }, {
46397    key: "updateTotalUploadProgress",
46398    value: function updateTotalUploadProgress() {
46399      var totalUploadProgress;
46400      var totalBytesSent = 0;
46401      var totalBytes = 0;
46402      var activeFiles = this.getActiveFiles();
46403
46404      if (activeFiles.length) {
46405        var _iterator3 = dropzone_createForOfIteratorHelper(this.getActiveFiles(), true),
46406            _step3;
46407
46408        try {
46409          for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
46410            var file = _step3.value;
46411            totalBytesSent += file.upload.bytesSent;
46412            totalBytes += file.upload.total;
46413          }
46414        } catch (err) {
46415          _iterator3.e(err);
46416        } finally {
46417          _iterator3.f();
46418        }
46419
46420        totalUploadProgress = 100 * totalBytesSent / totalBytes;
46421      } else {
46422        totalUploadProgress = 100;
46423      }
46424
46425      return this.emit("totaluploadprogress", totalUploadProgress, totalBytes, totalBytesSent);
46426    } // @options.paramName can be a function taking one parameter rather than a string.
46427    // A parameter name for a file is obtained simply by calling this with an index number.
46428
46429  }, {
46430    key: "_getParamName",
46431    value: function _getParamName(n) {
46432      if (typeof this.options.paramName === "function") {
46433        return this.options.paramName(n);
46434      } else {
46435        return "".concat(this.options.paramName).concat(this.options.uploadMultiple ? "[".concat(n, "]") : "");
46436      }
46437    } // If @options.renameFile is a function,
46438    // the function will be used to rename the file.name before appending it to the formData
46439
46440  }, {
46441    key: "_renameFile",
46442    value: function _renameFile(file) {
46443      if (typeof this.options.renameFile !== "function") {
46444        return file.name;
46445      }
46446
46447      return this.options.renameFile(file);
46448    } // Returns a form that can be used as fallback if the browser does not support DragnDrop
46449    //
46450    // If the dropzone is already a form, only the input field and button are returned. Otherwise a complete form element is provided.
46451    // This code has to pass in IE7 :(
46452
46453  }, {
46454    key: "getFallbackForm",
46455    value: function getFallbackForm() {
46456      var existingFallback, form;
46457
46458      if (existingFallback = this.getExistingFallback()) {
46459        return existingFallback;
46460      }
46461
46462      var fieldsString = '<div class="dz-fallback">';
46463
46464      if (this.options.dictFallbackText) {
46465        fieldsString += "<p>".concat(this.options.dictFallbackText, "</p>");
46466      }
46467
46468      fieldsString += "<input type=\"file\" name=\"".concat(this._getParamName(0), "\" ").concat(this.options.uploadMultiple ? 'multiple="multiple"' : undefined, " /><input type=\"submit\" value=\"Upload!\"></div>");
46469      var fields = Dropzone.createElement(fieldsString);
46470
46471      if (this.element.tagName !== "FORM") {
46472        form = Dropzone.createElement("<form action=\"".concat(this.options.url, "\" enctype=\"multipart/form-data\" method=\"").concat(this.options.method, "\"></form>"));
46473        form.appendChild(fields);
46474      } else {
46475        // Make sure that the enctype and method attributes are set properly
46476        this.element.setAttribute("enctype", "multipart/form-data");
46477        this.element.setAttribute("method", this.options.method);
46478      }
46479
46480      return form != null ? form : fields;
46481    } // Returns the fallback elements if they exist already
46482    //
46483    // This code has to pass in IE7 :(
46484
46485  }, {
46486    key: "getExistingFallback",
46487    value: function getExistingFallback() {
46488      var getFallback = function getFallback(elements) {
46489        var _iterator4 = dropzone_createForOfIteratorHelper(elements, true),
46490            _step4;
46491
46492        try {
46493          for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
46494            var el = _step4.value;
46495
46496            if (/(^| )fallback($| )/.test(el.className)) {
46497              return el;
46498            }
46499          }
46500        } catch (err) {
46501          _iterator4.e(err);
46502        } finally {
46503          _iterator4.f();
46504        }
46505      };
46506
46507      for (var _i = 0, _arr = ["div", "form"]; _i < _arr.length; _i++) {
46508        var tagName = _arr[_i];
46509        var fallback;
46510
46511        if (fallback = getFallback(this.element.getElementsByTagName(tagName))) {
46512          return fallback;
46513        }
46514      }
46515    } // Activates all listeners stored in @listeners
46516
46517  }, {
46518    key: "setupEventListeners",
46519    value: function setupEventListeners() {
46520      return this.listeners.map(function (elementListeners) {
46521        return function () {
46522          var result = [];
46523
46524          for (var event in elementListeners.events) {
46525            var listener = elementListeners.events[event];
46526            result.push(elementListeners.element.addEventListener(event, listener, false));
46527          }
46528
46529          return result;
46530        }();
46531      });
46532    } // Deactivates all listeners stored in @listeners
46533
46534  }, {
46535    key: "removeEventListeners",
46536    value: function removeEventListeners() {
46537      return this.listeners.map(function (elementListeners) {
46538        return function () {
46539          var result = [];
46540
46541          for (var event in elementListeners.events) {
46542            var listener = elementListeners.events[event];
46543            result.push(elementListeners.element.removeEventListener(event, listener, false));
46544          }
46545
46546          return result;
46547        }();
46548      });
46549    } // Removes all event listeners and cancels all files in the queue or being processed.
46550
46551  }, {
46552    key: "disable",
46553    value: function disable() {
46554      var _this3 = this;
46555
46556      this.clickableElements.forEach(function (element) {
46557        return element.classList.remove("dz-clickable");
46558      });
46559      this.removeEventListeners();
46560      this.disabled = true;
46561      return this.files.map(function (file) {
46562        return _this3.cancelUpload(file);
46563      });
46564    }
46565  }, {
46566    key: "enable",
46567    value: function enable() {
46568      delete this.disabled;
46569      this.clickableElements.forEach(function (element) {
46570        return element.classList.add("dz-clickable");
46571      });
46572      return this.setupEventListeners();
46573    } // Returns a nicely formatted filesize
46574
46575  }, {
46576    key: "filesize",
46577    value: function filesize(size) {
46578      var selectedSize = 0;
46579      var selectedUnit = "b";
46580
46581      if (size > 0) {
46582        var units = ["tb", "gb", "mb", "kb", "b"];
46583
46584        for (var i = 0; i < units.length; i++) {
46585          var unit = units[i];
46586          var cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10;
46587
46588          if (size >= cutoff) {
46589            selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i);
46590            selectedUnit = unit;
46591            break;
46592          }
46593        }
46594
46595        selectedSize = Math.round(10 * selectedSize) / 10; // Cutting of digits
46596      }
46597
46598      return "<strong>".concat(selectedSize, "</strong> ").concat(this.options.dictFileSizeUnits[selectedUnit]);
46599    } // Adds or removes the `dz-max-files-reached` class from the form.
46600
46601  }, {
46602    key: "_updateMaxFilesReachedClass",
46603    value: function _updateMaxFilesReachedClass() {
46604      if (this.options.maxFiles != null && this.getAcceptedFiles().length >= this.options.maxFiles) {
46605        if (this.getAcceptedFiles().length === this.options.maxFiles) {
46606          this.emit("maxfilesreached", this.files);
46607        }
46608
46609        return this.element.classList.add("dz-max-files-reached");
46610      } else {
46611        return this.element.classList.remove("dz-max-files-reached");
46612      }
46613    }
46614  }, {
46615    key: "drop",
46616    value: function drop(e) {
46617      if (!e.dataTransfer) {
46618        return;
46619      }
46620
46621      this.emit("drop", e); // Convert the FileList to an Array
46622      // This is necessary for IE11
46623
46624      var files = [];
46625
46626      for (var i = 0; i < e.dataTransfer.files.length; i++) {
46627        files[i] = e.dataTransfer.files[i];
46628      } // Even if it's a folder, files.length will contain the folders.
46629
46630
46631      if (files.length) {
46632        var items = e.dataTransfer.items;
46633
46634        if (items && items.length && items[0].webkitGetAsEntry != null) {
46635          // The browser supports dropping of folders, so handle items instead of files
46636          this._addFilesFromItems(items);
46637        } else {
46638          this.handleFiles(files);
46639        }
46640      }
46641
46642      this.emit("addedfiles", files);
46643    }
46644  }, {
46645    key: "paste",
46646    value: function paste(e) {
46647      if (__guard__(e != null ? e.clipboardData : undefined, function (x) {
46648        return x.items;
46649      }) == null) {
46650        return;
46651      }
46652
46653      this.emit("paste", e);
46654      var items = e.clipboardData.items;
46655
46656      if (items.length) {
46657        return this._addFilesFromItems(items);
46658      }
46659    }
46660  }, {
46661    key: "handleFiles",
46662    value: function handleFiles(files) {
46663      var _iterator5 = dropzone_createForOfIteratorHelper(files, true),
46664          _step5;
46665
46666      try {
46667        for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
46668          var file = _step5.value;
46669          this.addFile(file);
46670        }
46671      } catch (err) {
46672        _iterator5.e(err);
46673      } finally {
46674        _iterator5.f();
46675      }
46676    } // When a folder is dropped (or files are pasted), items must be handled
46677    // instead of files.
46678
46679  }, {
46680    key: "_addFilesFromItems",
46681    value: function _addFilesFromItems(items) {
46682      var _this4 = this;
46683
46684      return function () {
46685        var result = [];
46686
46687        var _iterator6 = dropzone_createForOfIteratorHelper(items, true),
46688            _step6;
46689
46690        try {
46691          for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
46692            var item = _step6.value;
46693            var entry;
46694
46695            if (item.webkitGetAsEntry != null && (entry = item.webkitGetAsEntry())) {
46696              if (entry.isFile) {
46697                result.push(_this4.addFile(item.getAsFile()));
46698              } else if (entry.isDirectory) {
46699                // Append all files from that directory to files
46700                result.push(_this4._addFilesFromDirectory(entry, entry.name));
46701              } else {
46702                result.push(undefined);
46703              }
46704            } else if (item.getAsFile != null) {
46705              if (item.kind == null || item.kind === "file") {
46706                result.push(_this4.addFile(item.getAsFile()));
46707              } else {
46708                result.push(undefined);
46709              }
46710            } else {
46711              result.push(undefined);
46712            }
46713          }
46714        } catch (err) {
46715          _iterator6.e(err);
46716        } finally {
46717          _iterator6.f();
46718        }
46719
46720        return result;
46721      }();
46722    } // Goes through the directory, and adds each file it finds recursively
46723
46724  }, {
46725    key: "_addFilesFromDirectory",
46726    value: function _addFilesFromDirectory(directory, path) {
46727      var _this5 = this;
46728
46729      var dirReader = directory.createReader();
46730
46731      var errorHandler = function errorHandler(error) {
46732        return __guardMethod__(console, "log", function (o) {
46733          return o.log(error);
46734        });
46735      };
46736
46737      var readEntries = function readEntries() {
46738        return dirReader.readEntries(function (entries) {
46739          if (entries.length > 0) {
46740            var _iterator7 = dropzone_createForOfIteratorHelper(entries, true),
46741                _step7;
46742
46743            try {
46744              for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
46745                var entry = _step7.value;
46746
46747                if (entry.isFile) {
46748                  entry.file(function (file) {
46749                    if (_this5.options.ignoreHiddenFiles && file.name.substring(0, 1) === ".") {
46750                      return;
46751                    }
46752
46753                    file.fullPath = "".concat(path, "/").concat(file.name);
46754                    return _this5.addFile(file);
46755                  });
46756                } else if (entry.isDirectory) {
46757                  _this5._addFilesFromDirectory(entry, "".concat(path, "/").concat(entry.name));
46758                }
46759              } // Recursively call readEntries() again, since browser only handle
46760              // the first 100 entries.
46761              // See: https://developer.mozilla.org/en-US/docs/Web/API/DirectoryReader#readEntries
46762
46763            } catch (err) {
46764              _iterator7.e(err);
46765            } finally {
46766              _iterator7.f();
46767            }
46768
46769            readEntries();
46770          }
46771
46772          return null;
46773        }, errorHandler);
46774      };
46775
46776      return readEntries();
46777    } // If `done()` is called without argument the file is accepted
46778    // If you call it with an error message, the file is rejected
46779    // (This allows for asynchronous validation)
46780    //
46781    // This function checks the filesize, and if the file.type passes the
46782    // `acceptedFiles` check.
46783
46784  }, {
46785    key: "accept",
46786    value: function accept(file, done) {
46787      if (this.options.maxFilesize && file.size > this.options.maxFilesize * 1024 * 1024) {
46788        done(this.options.dictFileTooBig.replace("{{filesize}}", Math.round(file.size / 1024 / 10.24) / 100).replace("{{maxFilesize}}", this.options.maxFilesize));
46789      } else if (!Dropzone.isValidFile(file, this.options.acceptedFiles)) {
46790        done(this.options.dictInvalidFileType);
46791      } else if (this.options.maxFiles != null && this.getAcceptedFiles().length >= this.options.maxFiles) {
46792        done(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}", this.options.maxFiles));
46793        this.emit("maxfilesexceeded", file);
46794      } else {
46795        this.options.accept.call(this, file, done);
46796      }
46797    }
46798  }, {
46799    key: "addFile",
46800    value: function addFile(file) {
46801      var _this6 = this;
46802
46803      file.upload = {
46804        uuid: Dropzone.uuidv4(),
46805        progress: 0,
46806        // Setting the total upload size to file.size for the beginning
46807        // It's actual different than the size to be transmitted.
46808        total: file.size,
46809        bytesSent: 0,
46810        filename: this._renameFile(file) // Not setting chunking information here, because the acutal data — and
46811        // thus the chunks — might change if `options.transformFile` is set
46812        // and does something to the data.
46813
46814      };
46815      this.files.push(file);
46816      file.status = Dropzone.ADDED;
46817      this.emit("addedfile", file);
46818
46819      this._enqueueThumbnail(file);
46820
46821      this.accept(file, function (error) {
46822        if (error) {
46823          file.accepted = false;
46824
46825          _this6._errorProcessing([file], error); // Will set the file.status
46826
46827        } else {
46828          file.accepted = true;
46829
46830          if (_this6.options.autoQueue) {
46831            _this6.enqueueFile(file);
46832          } // Will set .accepted = true
46833
46834        }
46835
46836        _this6._updateMaxFilesReachedClass();
46837      });
46838    } // Wrapper for enqueueFile
46839
46840  }, {
46841    key: "enqueueFiles",
46842    value: function enqueueFiles(files) {
46843      var _iterator8 = dropzone_createForOfIteratorHelper(files, true),
46844          _step8;
46845
46846      try {
46847        for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
46848          var file = _step8.value;
46849          this.enqueueFile(file);
46850        }
46851      } catch (err) {
46852        _iterator8.e(err);
46853      } finally {
46854        _iterator8.f();
46855      }
46856
46857      return null;
46858    }
46859  }, {
46860    key: "enqueueFile",
46861    value: function enqueueFile(file) {
46862      var _this7 = this;
46863
46864      if (file.status === Dropzone.ADDED && file.accepted === true) {
46865        file.status = Dropzone.QUEUED;
46866
46867        if (this.options.autoProcessQueue) {
46868          return setTimeout(function () {
46869            return _this7.processQueue();
46870          }, 0); // Deferring the call
46871        }
46872      } else {
46873        throw new Error("This file can't be queued because it has already been processed or was rejected.");
46874      }
46875    }
46876  }, {
46877    key: "_enqueueThumbnail",
46878    value: function _enqueueThumbnail(file) {
46879      var _this8 = this;
46880
46881      if (this.options.createImageThumbnails && file.type.match(/image.*/) && file.size <= this.options.maxThumbnailFilesize * 1024 * 1024) {
46882        this._thumbnailQueue.push(file);
46883
46884        return setTimeout(function () {
46885          return _this8._processThumbnailQueue();
46886        }, 0); // Deferring the call
46887      }
46888    }
46889  }, {
46890    key: "_processThumbnailQueue",
46891    value: function _processThumbnailQueue() {
46892      var _this9 = this;
46893
46894      if (this._processingThumbnail || this._thumbnailQueue.length === 0) {
46895        return;
46896      }
46897
46898      this._processingThumbnail = true;
46899
46900      var file = this._thumbnailQueue.shift();
46901
46902      return this.createThumbnail(file, this.options.thumbnailWidth, this.options.thumbnailHeight, this.options.thumbnailMethod, true, function (dataUrl) {
46903        _this9.emit("thumbnail", file, dataUrl);
46904
46905        _this9._processingThumbnail = false;
46906        return _this9._processThumbnailQueue();
46907      });
46908    } // Can be called by the user to remove a file
46909
46910  }, {
46911    key: "removeFile",
46912    value: function removeFile(file) {
46913      if (file.status === Dropzone.UPLOADING) {
46914        this.cancelUpload(file);
46915      }
46916
46917      this.files = without(this.files, file);
46918      this.emit("removedfile", file);
46919
46920      if (this.files.length === 0) {
46921        return this.emit("reset");
46922      }
46923    } // Removes all files that aren't currently processed from the list
46924
46925  }, {
46926    key: "removeAllFiles",
46927    value: function removeAllFiles(cancelIfNecessary) {
46928      // Create a copy of files since removeFile() changes the @files array.
46929      if (cancelIfNecessary == null) {
46930        cancelIfNecessary = false;
46931      }
46932
46933      var _iterator9 = dropzone_createForOfIteratorHelper(this.files.slice(), true),
46934          _step9;
46935
46936      try {
46937        for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
46938          var file = _step9.value;
46939
46940          if (file.status !== Dropzone.UPLOADING || cancelIfNecessary) {
46941            this.removeFile(file);
46942          }
46943        }
46944      } catch (err) {
46945        _iterator9.e(err);
46946      } finally {
46947        _iterator9.f();
46948      }
46949
46950      return null;
46951    } // Resizes an image before it gets sent to the server. This function is the default behavior of
46952    // `options.transformFile` if `resizeWidth` or `resizeHeight` are set. The callback is invoked with
46953    // the resized blob.
46954
46955  }, {
46956    key: "resizeImage",
46957    value: function resizeImage(file, width, height, resizeMethod, callback) {
46958      var _this10 = this;
46959
46960      return this.createThumbnail(file, width, height, resizeMethod, true, function (dataUrl, canvas) {
46961        if (canvas == null) {
46962          // The image has not been resized
46963          return callback(file);
46964        } else {
46965          var resizeMimeType = _this10.options.resizeMimeType;
46966
46967          if (resizeMimeType == null) {
46968            resizeMimeType = file.type;
46969          }
46970
46971          var resizedDataURL = canvas.toDataURL(resizeMimeType, _this10.options.resizeQuality);
46972
46973          if (resizeMimeType === "image/jpeg" || resizeMimeType === "image/jpg") {
46974            // Now add the original EXIF information
46975            resizedDataURL = 
vendor: 1,892 bytes, lines 46975-47031
46975ExifRestore.restore(file.dataURL, resizedDataURL);
46976          }
46977
46978          return callback(Dropzone.dataURItoBlob(resizedDataURL));
46979        }
46980      });
46981    }
46982  }, {
46983    key: "createThumbnail",
46984    value: function createThumbnail(file, width, height, resizeMethod, fixOrientation, callback) {
46985      var _this11 = this;
46986
46987      var fileReader = new FileReader();
46988
46989      fileReader.onload = function () {
46990        file.dataURL = fileReader.result; // Don't bother creating a thumbnail for SVG images since they're vector
46991
46992        if (file.type === "image/svg+xml") {
46993          if (callback != null) {
46994            callback(fileReader.result);
46995          }
46996
46997          return;
46998        }
46999
47000        _this11.createThumbnailFromUrl(file, width, height, resizeMethod, fixOrientation, callback);
47001      };
47002
47003      fileReader.readAsDataURL(file);
47004    } // `mockFile` needs to have these attributes:
47005    //
47006    //     { name: 'name', size: 12345, imageUrl: '' }
47007    //
47008    // `callback` will be invoked when the image has been downloaded and displayed.
47009    // `crossOrigin` will be added to the `img` tag when accessing the file.
47010
47011  }, {
47012    key: "displayExistingFile",
47013    value: function displayExistingFile(mockFile, imageUrl, callback, crossOrigin) {
47014      var _this12 = this;
47015
47016      var resizeThumbnail = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
47017      this.emit("addedfile", mockFile);
47018      this.emit("complete", mockFile);
47019
47020      if (!resizeThumbnail) {
47021        this.emit("thumbnail", mockFile, imageUrl);
47022        if (callback) callback();
47023      } else {
47024        var onDone = function onDone(thumbnail) {
47025          _this12.emit("thumbnail", mockFile, thumbnail);
47026
47027          if (callback) callback();
47028        };
47029
47030        mockFile.dataURL = imageUrl;
47031        this.createThumbnailFromUrl(mockFile, this.options.thumbnailWidth, this.options.thumbnailHeight, this.options.resize
vendor: 5,338 bytes, lines 47031-47200
47031Method, this.options.fixOrientation, onDone, crossOrigin);
47032      }
47033    }
47034  }, {
47035    key: "createThumbnailFromUrl",
47036    value: function createThumbnailFromUrl(file, width, height, resizeMethod, fixOrientation, callback, crossOrigin) {
47037      var _this13 = this;
47038
47039      // Not using `new Image` here because of a bug in latest Chrome versions.
47040      // See https://github.com/enyo/dropzone/pull/226
47041      var img = document.createElement("img");
47042
47043      if (crossOrigin) {
47044        img.crossOrigin = crossOrigin;
47045      } // fixOrientation is not needed anymore with browsers handling imageOrientation
47046
47047
47048      fixOrientation = getComputedStyle(document.body)["imageOrientation"] == "from-image" ? false : fixOrientation;
47049
47050      img.onload = function () {
47051        var loadExif = function loadExif(callback) {
47052          return callback(1);
47053        };
47054
47055        if (typeof EXIF !== "undefined" && EXIF !== null && fixOrientation) {
47056          loadExif = function loadExif(callback) {
47057            return EXIF.getData(img, function () {
47058              return callback(EXIF.getTag(this, "Orientation"));
47059            });
47060          };
47061        }
47062
47063        return loadExif(function (orientation) {
47064          file.width = img.width;
47065          file.height = img.height;
47066
47067          var resizeInfo = _this13.options.resize.call(_this13, file, width, height, resizeMethod);
47068
47069          var canvas = document.createElement("canvas");
47070          var ctx = canvas.getContext("2d");
47071          canvas.width = resizeInfo.trgWidth;
47072          canvas.height = resizeInfo.trgHeight;
47073
47074          if (orientation > 4) {
47075            canvas.width = resizeInfo.trgHeight;
47076            canvas.height = resizeInfo.trgWidth;
47077          }
47078
47079          switch (orientation) {
47080            case 2:
47081              // horizontal flip
47082              ctx.translate(canvas.width, 0);
47083              ctx.scale(-1, 1);
47084              break;
47085
47086            case 3:
47087              // 180° rotate left
47088              ctx.translate(canvas.width, canvas.height);
47089              ctx.rotate(Math.PI);
47090              break;
47091
47092            case 4:
47093              // vertical flip
47094              ctx.translate(0, canvas.height);
47095              ctx.scale(1, -1);
47096              break;
47097
47098            case 5:
47099              // vertical flip + 90 rotate right
47100              ctx.rotate(0.5 * Math.PI);
47101              ctx.scale(1, -1);
47102              break;
47103
47104            case 6:
47105              // 90° rotate right
47106              ctx.rotate(0.5 * Math.PI);
47107              ctx.translate(0, -canvas.width);
47108              break;
47109
47110            case 7:
47111              // horizontal flip + 90 rotate right
47112              ctx.rotate(0.5 * Math.PI);
47113              ctx.translate(canvas.height, -canvas.width);
47114              ctx.scale(-1, 1);
47115              break;
47116
47117            case 8:
47118              // 90° rotate left
47119              ctx.rotate(-0.5 * Math.PI);
47120              ctx.translate(-canvas.height, 0);
47121              break;
47122          } // This is a bugfix for iOS' scaling bug.
47123
47124
47125          drawImageIOSFix(ctx, img, resizeInfo.srcX != null ? resizeInfo.srcX : 0, resizeInfo.srcY != null ? resizeInfo.srcY : 0, resizeInfo.srcWidth, resizeInfo.srcHeight, resizeInfo.trgX != null ? resizeInfo.trgX : 0, resizeInfo.trgY != null ? resizeInfo.trgY : 0, resizeInfo.trgWidth, resizeInfo.trgHeight);
47126          var thumbnail = canvas.toDataURL("image/png");
47127
47128          if (callback != null) {
47129            return callback(thumbnail, canvas);
47130          }
47131        });
47132      };
47133
47134      if (callback != null) {
47135        img.onerror = callback;
47136      }
47137
47138      return img.src = file.dataURL;
47139    } // Goes through the queue and processes files if there aren't too many already.
47140
47141  }, {
47142    key: "processQueue",
47143    value: function processQueue() {
47144      var parallelUploads = this.options.parallelUploads;
47145      var processingLength = this.getUploadingFiles().length;
47146      var i = processingLength; // There are already at least as many files uploading than should be
47147
47148      if (processingLength >= parallelUploads) {
47149        return;
47150      }
47151
47152      var queuedFiles = this.getQueuedFiles();
47153
47154      if (!(queuedFiles.length > 0)) {
47155        return;
47156      }
47157
47158      if (this.options.uploadMultiple) {
47159        // The files should be uploaded in one request
47160        return this.processFiles(queuedFiles.slice(0, parallelUploads - processingLength));
47161      } else {
47162        while (i < parallelUploads) {
47163          if (!queuedFiles.length) {
47164            return;
47165          } // Nothing left to process
47166
47167
47168          this.processFile(queuedFiles.shift());
47169          i++;
47170        }
47171      }
47172    } // Wrapper for `processFiles`
47173
47174  }, {
47175    key: "processFile",
47176    value: function processFile(file) {
47177      return this.processFiles([file]);
47178    } // Loads the file, then calls finishedLoading()
47179
47180  }, {
47181    key: "processFiles",
47182    value: function processFiles(files) {
47183      var _iterator10 = dropzone_createForOfIteratorHelper(files, true),
47184          _step10;
47185
47186      try {
47187        for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
47188          var file = _step10.value;
47189          file.processing = true; // Backwards compatibility
47190
47191          file.status = Dropzone.UPLOADING;
47192          this.emit("processing", file);
47193        }
47194      } catch (err) {
47195        _iterator10.e(err);
47196      } finally {
47197        _iterator10.f();
47198      }
47199
47200      if (this.options.uploadMultiple) {
vendor: 20,826 bytes, lines 47201-47815
47201        this.emit("processingmultiple", files);
47202      }
47203
47204      return this.uploadFiles(files);
47205    }
47206  }, {
47207    key: "_getFilesWithXhr",
47208    value: function _getFilesWithXhr(xhr) {
47209      var files;
47210      return files = this.files.filter(function (file) {
47211        return file.xhr === xhr;
47212      }).map(function (file) {
47213        return file;
47214      });
47215    } // Cancels the file upload and sets the status to CANCELED
47216    // **if** the file is actually being uploaded.
47217    // If it's still in the queue, the file is being removed from it and the status
47218    // set to CANCELED.
47219
47220  }, {
47221    key: "cancelUpload",
47222    value: function cancelUpload(file) {
47223      if (file.status === Dropzone.UPLOADING) {
47224        var groupedFiles = this._getFilesWithXhr(file.xhr);
47225
47226        var _iterator11 = dropzone_createForOfIteratorHelper(groupedFiles, true),
47227            _step11;
47228
47229        try {
47230          for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
47231            var groupedFile = _step11.value;
47232            groupedFile.status = Dropzone.CANCELED;
47233          }
47234        } catch (err) {
47235          _iterator11.e(err);
47236        } finally {
47237          _iterator11.f();
47238        }
47239
47240        if (typeof file.xhr !== "undefined") {
47241          file.xhr.abort();
47242        }
47243
47244        var _iterator12 = dropzone_createForOfIteratorHelper(groupedFiles, true),
47245            _step12;
47246
47247        try {
47248          for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
47249            var _groupedFile = _step12.value;
47250            this.emit("canceled", _groupedFile);
47251          }
47252        } catch (err) {
47253          _iterator12.e(err);
47254        } finally {
47255          _iterator12.f();
47256        }
47257
47258        if (this.options.uploadMultiple) {
47259          this.emit("canceledmultiple", groupedFiles);
47260        }
47261      } else if (file.status === Dropzone.ADDED || file.status === Dropzone.QUEUED) {
47262        file.status = Dropzone.CANCELED;
47263        this.emit("canceled", file);
47264
47265        if (this.options.uploadMultiple) {
47266          this.emit("canceledmultiple", [file]);
47267        }
47268      }
47269
47270      if (this.options.autoProcessQueue) {
47271        return this.processQueue();
47272      }
47273    }
47274  }, {
47275    key: "resolveOption",
47276    value: function resolveOption(option) {
47277      if (typeof option === "function") {
47278        for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
47279          args[_key - 1] = arguments[_key];
47280        }
47281
47282        return option.apply(this, args);
47283      }
47284
47285      return option;
47286    }
47287  }, {
47288    key: "uploadFile",
47289    value: function uploadFile(file) {
47290      return this.uploadFiles([file]);
47291    }
47292  }, {
47293    key: "uploadFiles",
47294    value: function uploadFiles(files) {
47295      var _this14 = this;
47296
47297      this._transformFiles(files, function (transformedFiles) {
47298        if (_this14.options.chunking) {
47299          // Chunking is not allowed to be used with `uploadMultiple` so we know
47300          // that there is only __one__file.
47301          var transformedFile = transformedFiles[0];
47302          files[0].upload.chunked = _this14.options.chunking && (_this14.options.forceChunking || transformedFile.size > _this14.options.chunkSize);
47303          files[0].upload.totalChunkCount = Math.ceil(transformedFile.size / _this14.options.chunkSize);
47304        }
47305
47306        if (files[0].upload.chunked) {
47307          // This file should be sent in chunks!
47308          // If the chunking option is set, we **know** that there can only be **one** file, since
47309          // uploadMultiple is not allowed with this option.
47310          var file = files[0];
47311          var _transformedFile = transformedFiles[0];
47312          var startedChunkCount = 0;
47313          file.upload.chunks = [];
47314
47315          var handleNextChunk = function handleNextChunk() {
47316            var chunkIndex = 0; // Find the next item in file.upload.chunks that is not defined yet.
47317
47318            while (file.upload.chunks[chunkIndex] !== undefined) {
47319              chunkIndex++;
47320            } // This means, that all chunks have already been started.
47321
47322
47323            if (chunkIndex >= file.upload.totalChunkCount) return;
47324            startedChunkCount++;
47325            var start = chunkIndex * _this14.options.chunkSize;
47326            var end = Math.min(start + _this14.options.chunkSize, _transformedFile.size);
47327            var dataBlock = {
47328              name: _this14._getParamName(0),
47329              data: _transformedFile.webkitSlice ? _transformedFile.webkitSlice(start, end) : _transformedFile.slice(start, end),
47330              filename: file.upload.filename,
47331              chunkIndex: chunkIndex
47332            };
47333            file.upload.chunks[chunkIndex] = {
47334              file: file,
47335              index: chunkIndex,
47336              dataBlock: dataBlock,
47337              // In case we want to retry.
47338              status: Dropzone.UPLOADING,
47339              progress: 0,
47340              retries: 0 // The number of times this block has been retried.
47341
47342            };
47343
47344            _this14._uploadData(files, [dataBlock]);
47345          };
47346
47347          file.upload.finishedChunkUpload = function (chunk, response) {
47348            var allFinished = true;
47349            chunk.status = Dropzone.SUCCESS; // Clear the data from the chunk
47350
47351            chunk.dataBlock = null; // Leaving this reference to xhr intact here will cause memory leaks in some browsers
47352
47353            chunk.xhr = null;
47354
47355            for (var i = 0; i < file.upload.totalChunkCount; i++) {
47356              if (file.upload.chunks[i] === undefined) {
47357                return handleNextChunk();
47358              }
47359
47360              if (file.upload.chunks[i].status !== Dropzone.SUCCESS) {
47361                allFinished = false;
47362              }
47363            }
47364
47365            if (allFinished) {
47366              _this14.options.chunksUploaded(file, function () {
47367                _this14._finished(files, response, null);
47368              });
47369            }
47370          };
47371
47372          if (_this14.options.parallelChunkUploads) {
47373            for (var i = 0; i < file.upload.totalChunkCount; i++) {
47374              handleNextChunk();
47375            }
47376          } else {
47377            handleNextChunk();
47378          }
47379        } else {
47380          var dataBlocks = [];
47381
47382          for (var _i2 = 0; _i2 < files.length; _i2++) {
47383            dataBlocks[_i2] = {
47384              name: _this14._getParamName(_i2),
47385              data: transformedFiles[_i2],
47386              filename: files[_i2].upload.filename
47387            };
47388          }
47389
47390          _this14._uploadData(files, dataBlocks);
47391        }
47392      });
47393    } /// Returns the right chunk for given file and xhr
47394
47395  }, {
47396    key: "_getChunk",
47397    value: function _getChunk(file, xhr) {
47398      for (var i = 0; i < file.upload.totalChunkCount; i++) {
47399        if (file.upload.chunks[i] !== undefined && file.upload.chunks[i].xhr === xhr) {
47400          return file.upload.chunks[i];
47401        }
47402      }
47403    } // This function actually uploads the file(s) to the server.
47404    // If dataBlocks contains the actual data to upload (meaning, that this could either be transformed
47405    // files, or individual chunks for chunked upload).
47406
47407  }, {
47408    key: "_uploadData",
47409    value: function _uploadData(files, dataBlocks) {
47410      var _this15 = this;
47411
47412      var xhr = new XMLHttpRequest(); // Put the xhr object in the file objects to be able to reference it later.
47413
47414      var _iterator13 = dropzone_createForOfIteratorHelper(files, true),
47415          _step13;
47416
47417      try {
47418        for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
47419          var file = _step13.value;
47420          file.xhr = xhr;
47421        }
47422      } catch (err) {
47423        _iterator13.e(err);
47424      } finally {
47425        _iterator13.f();
47426      }
47427
47428      if (files[0].upload.chunked) {
47429        // Put the xhr object in the right chunk object, so it can be associated later, and found with _getChunk
47430        files[0].upload.chunks[dataBlocks[0].chunkIndex].xhr = xhr;
47431      }
47432
47433      var method = this.resolveOption(this.options.method, files);
47434      var url = this.resolveOption(this.options.url, files);
47435      xhr.open(method, url, true); // Setting the timeout after open because of IE11 issue: https://gitlab.com/meno/dropzone/issues/8
47436
47437      var timeout = this.resolveOption(this.options.timeout, files);
47438      if (timeout) xhr.timeout = this.resolveOption(this.options.timeout, files); // Has to be after `.open()`. See https://github.com/enyo/dropzone/issues/179
47439
47440      xhr.withCredentials = !!this.options.withCredentials;
47441
47442      xhr.onload = function (e) {
47443        _this15._finishedUploading(files, xhr, e);
47444      };
47445
47446      xhr.ontimeout = function () {
47447        _this15._handleUploadError(files, xhr, "Request timedout after ".concat(_this15.options.timeout / 1000, " seconds"));
47448      };
47449
47450      xhr.onerror = function () {
47451        _this15._handleUploadError(files, xhr);
47452      }; // Some browsers do not have the .upload property
47453
47454
47455      var progressObj = xhr.upload != null ? xhr.upload : xhr;
47456
47457      progressObj.onprogress = function (e) {
47458        return _this15._updateFilesUploadProgress(files, xhr, e);
47459      };
47460
47461      var headers = {
47462        Accept: "application/json",
47463        "Cache-Control": "no-cache",
47464        "X-Requested-With": "XMLHttpRequest"
47465      };
47466
47467      if (this.options.headers) {
47468        Dropzone.extend(headers, this.options.headers);
47469      }
47470
47471      for (var headerName in headers) {
47472        var headerValue = headers[headerName];
47473
47474        if (headerValue) {
47475          xhr.setRequestHeader(headerName, headerValue);
47476        }
47477      }
47478
47479      var formData = new FormData(); // Adding all @options parameters
47480
47481      if (this.options.params) {
47482        var additionalParams = this.options.params;
47483
47484        if (typeof additionalParams === "function") {
47485          additionalParams = additionalParams.call(this, files, xhr, files[0].upload.chunked ? this._getChunk(files[0], xhr) : null);
47486        }
47487
47488        for (var key in additionalParams) {
47489          var value = additionalParams[key];
47490
47491          if (Array.isArray(value)) {
47492            // The additional parameter contains an array,
47493            // so lets iterate over it to attach each value
47494            // individually.
47495            for (var i = 0; i < value.length; i++) {
47496              formData.append(key, value[i]);
47497            }
47498          } else {
47499            formData.append(key, value);
47500          }
47501        }
47502      } // Let the user add additional data if necessary
47503
47504
47505      var _iterator14 = dropzone_createForOfIteratorHelper(files, true),
47506          _step14;
47507
47508      try {
47509        for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
47510          var _file = _step14.value;
47511          this.emit("sending", _file, xhr, formData);
47512        }
47513      } catch (err) {
47514        _iterator14.e(err);
47515      } finally {
47516        _iterator14.f();
47517      }
47518
47519      if (this.options.uploadMultiple) {
47520        this.emit("sendingmultiple", files, xhr, formData);
47521      }
47522
47523      this._addFormElementData(formData); // Finally add the files
47524      // Has to be last because some servers (eg: S3) expect the file to be the last parameter
47525
47526
47527      for (var _i3 = 0; _i3 < dataBlocks.length; _i3++) {
47528        var dataBlock = dataBlocks[_i3];
47529        formData.append(dataBlock.name, dataBlock.data, dataBlock.filename);
47530      }
47531
47532      this.submitRequest(xhr, formData, files);
47533    } // Transforms all files with this.options.transformFile and invokes done with the transformed files when done.
47534
47535  }, {
47536    key: "_transformFiles",
47537    value: function _transformFiles(files, done) {
47538      var _this16 = this;
47539
47540      var transformedFiles = []; // Clumsy way of handling asynchronous calls, until I get to add a proper Future library.
47541
47542      var doneCounter = 0;
47543
47544      var _loop = function _loop(i) {
47545        _this16.options.transformFile.call(_this16, files[i], function (transformedFile) {
47546          transformedFiles[i] = transformedFile;
47547
47548          if (++doneCounter === files.length) {
47549            done(transformedFiles);
47550          }
47551        });
47552      };
47553
47554      for (var i = 0; i < files.length; i++) {
47555        _loop(i);
47556      }
47557    } // Takes care of adding other input elements of the form to the AJAX request
47558
47559  }, {
47560    key: "_addFormElementData",
47561    value: function _addFormElementData(formData) {
47562      // Take care of other input elements
47563      if (this.element.tagName === "FORM") {
47564        var _iterator15 = dropzone_createForOfIteratorHelper(this.element.querySelectorAll("input, textarea, select, button"), true),
47565            _step15;
47566
47567        try {
47568          for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
47569            var input = _step15.value;
47570            var inputName = input.getAttribute("name");
47571            var inputType = input.getAttribute("type");
47572            if (inputType) inputType = inputType.toLowerCase(); // If the input doesn't have a name, we can't use it.
47573
47574            if (typeof inputName === "undefined" || inputName === null) continue;
47575
47576            if (input.tagName === "SELECT" && input.hasAttribute("multiple")) {
47577              // Possibly multiple values
47578              var _iterator16 = dropzone_createForOfIteratorHelper(input.options, true),
47579                  _step16;
47580
47581              try {
47582                for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
47583                  var option = _step16.value;
47584
47585                  if (option.selected) {
47586                    formData.append(inputName, option.value);
47587                  }
47588                }
47589              } catch (err) {
47590                _iterator16.e(err);
47591              } finally {
47592                _iterator16.f();
47593              }
47594            } else if (!inputType || inputType !== "checkbox" && inputType !== "radio" || input.checked) {
47595              formData.append(inputName, input.value);
47596            }
47597          }
47598        } catch (err) {
47599          _iterator15.e(err);
47600        } finally {
47601          _iterator15.f();
47602        }
47603      }
47604    } // Invoked when there is new progress information about given files.
47605    // If e is not provided, it is assumed that the upload is finished.
47606
47607  }, {
47608    key: "_updateFilesUploadProgress",
47609    value: function _updateFilesUploadProgress(files, xhr, e) {
47610      if (!files[0].upload.chunked) {
47611        // Handle file uploads without chunking
47612        var _iterator17 = dropzone_createForOfIteratorHelper(files, true),
47613            _step17;
47614
47615        try {
47616          for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) {
47617            var file = _step17.value;
47618
47619            if (file.upload.total && file.upload.bytesSent && file.upload.bytesSent == file.upload.total) {
47620              // If both, the `total` and `bytesSent` have already been set, and
47621              // they are equal (meaning progress is at 100%), we can skip this
47622              // file, since an upload progress shouldn't go down.
47623              continue;
47624            }
47625
47626            if (e) {
47627              file.upload.progress = 100 * e.loaded / e.total;
47628              file.upload.total = e.total;
47629              file.upload.bytesSent = e.loaded;
47630            } else {
47631              // No event, so we're at 100%
47632              file.upload.progress = 100;
47633              file.upload.bytesSent = file.upload.total;
47634            }
47635
47636            this.emit("uploadprogress", file, file.upload.progress, file.upload.bytesSent);
47637          }
47638        } catch (err) {
47639          _iterator17.e(err);
47640        } finally {
47641          _iterator17.f();
47642        }
47643      } else {
47644        // Handle chunked file uploads
47645        // Chunked upload is not compatible with uploading multiple files in one
47646        // request, so we know there's only one file.
47647        var _file2 = files[0]; // Since this is a chunked upload, we need to update the appropriate chunk
47648        // progress.
47649
47650        var chunk = this._getChunk(_file2, xhr);
47651
47652        if (e) {
47653          chunk.progress = 100 * e.loaded / e.total;
47654          chunk.total = e.total;
47655          chunk.bytesSent = e.loaded;
47656        } else {
47657          // No event, so we're at 100%
47658          chunk.progress = 100;
47659          chunk.bytesSent = chunk.total;
47660        } // Now tally the *file* upload progress from its individual chunks
47661
47662
47663        _file2.upload.progress = 0;
47664        _file2.upload.total = 0;
47665        _file2.upload.bytesSent = 0;
47666
47667        for (var i = 0; i < _file2.upload.totalChunkCount; i++) {
47668          if (_file2.upload.chunks[i] && typeof _file2.upload.chunks[i].progress !== "undefined") {
47669            _file2.upload.progress += _file2.upload.chunks[i].progress;
47670            _file2.upload.total += _file2.upload.chunks[i].total;
47671            _file2.upload.bytesSent += _file2.upload.chunks[i].bytesSent;
47672          }
47673        } // Since the process is a percentage, we need to divide by the amount of
47674        // chunks we've used.
47675
47676
47677        _file2.upload.progress = _file2.upload.progress / _file2.upload.totalChunkCount;
47678        this.emit("uploadprogress", _file2, _file2.upload.progress, _file2.upload.bytesSent);
47679      }
47680    }
47681  }, {
47682    key: "_finishedUploading",
47683    value: function _finishedUploading(files, xhr, e) {
47684      var response;
47685
47686      if (files[0].status === Dropzone.CANCELED) {
47687        return;
47688      }
47689
47690      if (xhr.readyState !== 4) {
47691        return;
47692      }
47693
47694      if (xhr.responseType !== "arraybuffer" && xhr.responseType !== "blob") {
47695        response = xhr.responseText;
47696
47697        if (xhr.getResponseHeader("content-type") && ~xhr.getResponseHeader("content-type").indexOf("application/json")) {
47698          try {
47699            response = JSON.parse(response);
47700          } catch (error) {
47701            e = error;
47702            response = "Invalid JSON response from server.";
47703          }
47704        }
47705      }
47706
47707      this._updateFilesUploadProgress(files, xhr);
47708
47709      if (!(200 <= xhr.status && xhr.status < 300)) {
47710        this._handleUploadError(files, xhr, response);
47711      } else {
47712        if (files[0].upload.chunked) {
47713          files[0].upload.finishedChunkUpload(this._getChunk(files[0], xhr), response);
47714        } else {
47715          this._finished(files, response, e);
47716        }
47717      }
47718    }
47719  }, {
47720    key: "_handleUploadError",
47721    value: function _handleUploadError(files, xhr, response) {
47722      if (files[0].status === Dropzone.CANCELED) {
47723        return;
47724      }
47725
47726      if (files[0].upload.chunked && this.options.retryChunks) {
47727        var chunk = this._getChunk(files[0], xhr);
47728
47729        if (chunk.retries++ < this.options.retryChunksLimit) {
47730          this._uploadData(files, [chunk.dataBlock]);
47731
47732          return;
47733        } else {
47734          console.warn("Retried this chunk too often. Giving up.");
47735        }
47736      }
47737
47738      this._errorProcessing(files, response || this.options.dictResponseError.replace("{{statusCode}}", xhr.status), xhr);
47739    }
47740  }, {
47741    key: "submitRequest",
47742    value: function submitRequest(xhr, formData, files) {
47743      if (xhr.readyState != 1) {
47744        console.warn("Cannot send this request because the XMLHttpRequest.readyState is not OPENED.");
47745        return;
47746      }
47747
47748      xhr.send(formData);
47749    } // Called internally when processing is finished.
47750    // Individual callbacks have to be called in the appropriate sections.
47751
47752  }, {
47753    key: "_finished",
47754    value: function _finished(files, responseText, e) {
47755      var _iterator18 = dropzone_createForOfIteratorHelper(files, true),
47756          _step18;
47757
47758      try {
47759        for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) {
47760          var file = _step18.value;
47761          file.status = Dropzone.SUCCESS;
47762          this.emit("success", file, responseText, e);
47763          this.emit("complete", file);
47764        }
47765      } catch (err) {
47766        _iterator18.e(err);
47767      } finally {
47768        _iterator18.f();
47769      }
47770
47771      if (this.options.uploadMultiple) {
47772        this.emit("successmultiple", files, responseText, e);
47773        this.emit("completemultiple", files);
47774      }
47775
47776      if (this.options.autoProcessQueue) {
47777        return this.processQueue();
47778      }
47779    } // Called internally when processing is finished.
47780    // Individual callbacks have to be called in the appropriate sections.
47781
47782  }, {
47783    key: "_errorProcessing",
47784    value: function _errorProcessing(files, message, xhr) {
47785      var _iterator19 = dropzone_createForOfIteratorHelper(files, true),
47786          _step19;
47787
47788      try {
47789        for (_iterator19.s(); !(_step19 = _iterator19.n()).done;) {
47790          var file = _step19.value;
47791          file.status = Dropzone.ERROR;
47792          this.emit("error", file, message, xhr);
47793          this.emit("complete", file);
47794        }
47795      } catch (err) {
47796        _iterator19.e(err);
47797      } finally {
47798        _iterator19.f();
47799      }
47800
47801      if (this.options.uploadMultiple) {
47802        this.emit("errormultiple", files, message, xhr);
47803        this.emit("completemultiple", files);
47804      }
47805
47806      if (this.options.autoProcessQueue) {
47807        return this.processQueue();
47808      }
47809    }
47810  }], [{
47811    key: "initClass",
47812    value: function initClass() {
47813      // Exposing the emitter class, mainly for tests
47814      this.prototype.Emitter = Emitter;
47815      /*
47815
47816       This is a list of all available events you can register on a dropzone object.
47817        You can register an event handler like this:
47818        dropzone.on("dragEnter", function() { });
47819        */
47820
47821      this.prototype.events = ["drop", "dragstart", "dragend", "dragenter", "dragover", "dragleave", "addedfile", "addedfiles", "removedfile", "thumbnail", "error", "errormultiple", "processing", "processingmultiple", "uploadprogress", "totaluploadprogress", "sending", "sendingmultiple", "success", "successmultiple", "canceled", "canceledmultiple", "complete", "completemultiple", "reset", "maxfilesexceeded", "maxfilesreached", "queuecomplete"];
47822      this.prototype._thumbnailQueue = [];
47823      this.prototype._processingThumbnail = false;
47824    } // global utility
47825
47826  }, {
47827    key: "extend",
47828    value: function extend(target) {
47829      for (var _len2 = arguments.length, objects = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
47830        objects[_key2 - 1] = arguments[_key2];
47831      }
47832
47833      for (var _i4 = 0, _objects = objects; _i4 < _objects.length; _i4++) {
47834        var object = _objects[_i4];
47835
47836        for (var key in object) {
47837          var val = object[key];
47838          target[key] = val;
47839        }
47840      }
47841
47842      return target;
47843    }
47844  }, {
47845    key: "uuidv4",
47846    value: function uuidv4() {
47847      return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
47848        var r = Math.random() * 16 | 0,
47849            v = c === "x" ? r : r & 0x3 | 0x8;
47850        return v.toString(16);
47851      });
47852    }
47853  }]);
47854
47855  return Dropzone;
47856}(Emitter);
47857
47858
47859Dropzone.initClass();
47860Dropzone.version = "5.9.2
vendor: 9,117 bytes, lines 47860-48176
47860"; // This is a map of options for your different dropzones. Add configurations
47861// to this object for your different dropzone elemens.
47862//
47863// Example:
47864//
47865//     Dropzone.options.myDropzoneElementId = { maxFilesize: 1 };
47866//
47867// To disable autoDiscover for a specific element, you can set `false` as an option:
47868//
47869//     Dropzone.options.myDisabledElementId = false;
47870//
47871// And in html:
47872//
47873//     <form action="/upload" id="my-dropzone-element-id" class="dropzone"></form>
47874
47875Dropzone.options = {}; // Returns the options for an element or undefined if none available.
47876
47877Dropzone.optionsForElement = function (element) {
47878  // Get the `Dropzone.options.elementId` for this element if it exists
47879  if (element.getAttribute("id")) {
47880    return Dropzone.options[camelize(element.getAttribute("id"))];
47881  } else {
47882    return undefined;
47883  }
47884}; // Holds a list of all dropzone instances
47885
47886
47887Dropzone.instances = []; // Returns the dropzone for given element if any
47888
47889Dropzone.forElement = function (element) {
47890  if (typeof element === "string") {
47891    element = document.querySelector(element);
47892  }
47893
47894  if ((element != null ? element.dropzone : undefined) == null) {
47895    throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");
47896  }
47897
47898  return element.dropzone;
47899}; // Set to false if you don't want Dropzone to automatically find and attach to .dropzone elements.
47900
47901
47902Dropzone.autoDiscover = true; // Looks for all .dropzone elements and creates a dropzone for them
47903
47904Dropzone.discover = function () {
47905  var dropzones;
47906
47907  if (document.querySelectorAll) {
47908    dropzones = document.querySelectorAll(".dropzone");
47909  } else {
47910    dropzones = []; // IE :(
47911
47912    var checkElements = function checkElements(elements) {
47913      return function () {
47914        var result = [];
47915
47916        var _iterator20 = dropzone_createForOfIteratorHelper(elements, true),
47917            _step20;
47918
47919        try {
47920          for (_iterator20.s(); !(_step20 = _iterator20.n()).done;) {
47921            var el = _step20.value;
47922
47923            if (/(^| )dropzone($| )/.test(el.className)) {
47924              result.push(dropzones.push(el));
47925            } else {
47926              result.push(undefined);
47927            }
47928          }
47929        } catch (err) {
47930          _iterator20.e(err);
47931        } finally {
47932          _iterator20.f();
47933        }
47934
47935        return result;
47936      }();
47937    };
47938
47939    checkElements(document.getElementsByTagName("div"));
47940    checkElements(document.getElementsByTagName("form"));
47941  }
47942
47943  return function () {
47944    var result = [];
47945
47946    var _iterator21 = dropzone_createForOfIteratorHelper(dropzones, true),
47947        _step21;
47948
47949    try {
47950      for (_iterator21.s(); !(_step21 = _iterator21.n()).done;) {
47951        var dropzone = _step21.value;
47952
47953        // Create a dropzone unless auto discover has been disabled for specific element
47954        if (Dropzone.optionsForElement(dropzone) !== false) {
47955          result.push(new Dropzone(dropzone));
47956        } else {
47957          result.push(undefined);
47958        }
47959      }
47960    } catch (err) {
47961      _iterator21.e(err);
47962    } finally {
47963      _iterator21.f();
47964    }
47965
47966    return result;
47967  }();
47968}; // Some browsers support drag and drog functionality, but not correctly.
47969//
47970// So I created a blocklist of userAgents. Yes, yes. Browser sniffing, I know.
47971// But what to do when browsers *theoretically* support an API, but crash
47972// when using it.
47973//
47974// This is a list of regular expressions tested against navigator.userAgent
47975//
47976// ** It should only be used on browser that *do* support the API, but
47977// incorrectly **
47978
47979
47980Dropzone.blockedBrowsers = [// The mac os and windows phone version of opera 12 seems to have a problem with the File drag'n'drop API.
47981/opera.*(Macintosh|Windows Phone).*version\/12/i]; // Checks if the browser is supported
47982
47983Dropzone.isBrowserSupported = function () {
47984  var capableBrowser = true;
47985
47986  if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) {
47987    if (!("classList" in document.createElement("a"))) {
47988      capableBrowser = false;
47989    } else {
47990      if (Dropzone.blacklistedBrowsers !== undefined) {
47991        // Since this has been renamed, this makes sure we don't break older
47992        // configuration.
47993        Dropzone.blockedBrowsers = Dropzone.blacklistedBrowsers;
47994      } // The browser supports the API, but may be blocked.
47995
47996
47997      var _iterator22 = dropzone_createForOfIteratorHelper(Dropzone.blockedBrowsers, true),
47998          _step22;
47999
48000      try {
48001        for (_iterator22.s(); !(_step22 = _iterator22.n()).done;) {
48002          var regex = _step22.value;
48003
48004          if (regex.test(navigator.userAgent)) {
48005            capableBrowser = false;
48006            continue;
48007          }
48008        }
48009      } catch (err) {
48010        _iterator22.e(err);
48011      } finally {
48012        _iterator22.f();
48013      }
48014    }
48015  } else {
48016    capableBrowser = false;
48017  }
48018
48019  return capableBrowser;
48020};
48021
48022Dropzone.dataURItoBlob = function (dataURI) {
48023  // convert base64 to raw binary data held in a string
48024  // doesn't handle URLEncoded DataURIs - see SO answer #6850276 for code that does this
48025  var byteString = atob(dataURI.split(",")[1]); // separate out the mime component
48026
48027  var mimeString = dataURI.split(",")[0].split(":")[1].split(";")[0]; // write the bytes of the string to an ArrayBuffer
48028
48029  var ab = new ArrayBuffer(byteString.length);
48030  var ia = new Uint8Array(ab);
48031
48032  for (var i = 0, end = byteString.length, asc = 0 <= end; asc ? i <= end : i >= end; asc ? i++ : i--) {
48033    ia[i] = byteString.charCodeAt(i);
48034  } // write the ArrayBuffer to a blob
48035
48036
48037  return new Blob([ab], {
48038    type: mimeString
48039  });
48040}; // Returns an array without the rejected item
48041
48042
48043var without = function without(list, rejectedItem) {
48044  return list.filter(function (item) {
48045    return item !== rejectedItem;
48046  }).map(function (item) {
48047    return item;
48048  });
48049}; // abc-def_ghi -> abcDefGhi
48050
48051
48052var camelize = function camelize(str) {
48053  return str.replace(/[\-_](\w)/g, function (match) {
48054    return match.charAt(1).toUpperCase();
48055  });
48056}; // Creates an element from string
48057
48058
48059Dropzone.createElement = function (string) {
48060  var div = document.createElement("div");
48061  div.innerHTML = string;
48062  return div.childNodes[0];
48063}; // Tests if given element is inside (or simply is) the container
48064
48065
48066Dropzone.elementInside = function (element, container) {
48067  if (element === container) {
48068    return true;
48069  } // Coffeescript doesn't support do/while loops
48070
48071
48072  while (element = element.parentNode) {
48073    if (element === container) {
48074      return true;
48075    }
48076  }
48077
48078  return false;
48079};
48080
48081Dropzone.getElement = function (el, name) {
48082  var element;
48083
48084  if (typeof el === "string") {
48085    element = document.querySelector(el);
48086  } else if (el.nodeType != null) {
48087    element = el;
48088  }
48089
48090  if (element == null) {
48091    throw new Error("Invalid `".concat(name, "` option provided. Please provide a CSS selector or a plain HTML element."));
48092  }
48093
48094  return element;
48095};
48096
48097Dropzone.getElements = function (els, name) {
48098  var el, elements;
48099
48100  if (els instanceof Array) {
48101    elements = [];
48102
48103    try {
48104      var _iterator23 = dropzone_createForOfIteratorHelper(els, true),
48105          _step23;
48106
48107      try {
48108        for (_iterator23.s(); !(_step23 = _iterator23.n()).done;) {
48109          el = _step23.value;
48110          elements.push(this.getElement(el, name));
48111        }
48112      } catch (err) {
48113        _iterator23.e(err);
48114      } finally {
48115        _iterator23.f();
48116      }
48117    } catch (e) {
48118      elements = null;
48119    }
48120  } else if (typeof els === "string") {
48121    elements = [];
48122
48123    var _iterator24 = dropzone_createForOfIteratorHelper(document.querySelectorAll(els), true),
48124        _step24;
48125
48126    try {
48127      for (_iterator24.s(); !(_step24 = _iterator24.n()).done;) {
48128        el = _step24.value;
48129        elements.push(el);
48130      }
48131    } catch (err) {
48132      _iterator24.e(err);
48133    } finally {
48134      _iterator24.f();
48135    }
48136  } else if (els.nodeType != null) {
48137    elements = [els];
48138  }
48139
48140  if (elements == null || !elements.length) {
48141    throw new Error("Invalid `".concat(name, "` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));
48142  }
48143
48144  return elements;
48145}; // Asks the user the question and calls accepted or rejected accordingly
48146//
48147// The default implementation just uses `window.confirm` and then calls the
48148// appropriate callback.
48149
48150
48151Dropzone.confirm = function (question, accepted, rejected) {
48152  if (window.confirm(question)) {
48153    return accepted();
48154  } else if (rejected != null) {
48155    return rejected();
48156  }
48157}; // Validates the mime type like this:
48158//
48159// https://developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept
48160
48161
48162Dropzone.isValidFile = function (file, acceptedFiles) {
48163  if (!acceptedFiles) {
48164    return true;
48165  } // If there are no accepted mime types, it's OK
48166
48167
48168  acceptedFiles = acceptedFiles.split(",");
48169  var mimeType = file.type;
48170  var baseMimeType = mimeType.replace(/\/.*$/, "");
48171
48172  var _iterator25 = dropzone_createForOfIteratorHelper(acceptedFiles, true),
48173      _step25;
48174
48175  try {
48176    for (_iterator25.s();
vendor: 10,317 bytes, lines 48176-48567
48176 !(_step25 = _iterator25.n()).done;) {
48177      var validType = _step25.value;
48178      validType = validType.trim();
48179
48180      if (validType.charAt(0) === ".") {
48181        if (file.name.toLowerCase().indexOf(validType.toLowerCase(), file.name.length - validType.length) !== -1) {
48182          return true;
48183        }
48184      } else if (/\/\*$/.test(validType)) {
48185        // This is something like a image/* mime type
48186        if (baseMimeType === validType.replace(/\/.*$/, "")) {
48187          return true;
48188        }
48189      } else {
48190        if (mimeType === validType) {
48191          return true;
48192        }
48193      }
48194    }
48195  } catch (err) {
48196    _iterator25.e(err);
48197  } finally {
48198    _iterator25.f();
48199  }
48200
48201  return false;
48202}; // Augment jQuery
48203
48204
48205if (typeof jQuery !== "undefined" && jQuery !== null) {
48206  jQuery.fn.dropzone = function (options) {
48207    return this.each(function () {
48208      return new Dropzone(this, options);
48209    });
48210  };
48211} // Dropzone file status codes
48212
48213
48214Dropzone.ADDED = "added";
48215Dropzone.QUEUED = "queued"; // For backwards compatibility. Now, if a file is accepted, it's either queued
48216// or uploading.
48217
48218Dropzone.ACCEPTED = Dropzone.QUEUED;
48219Dropzone.UPLOADING = "uploading";
48220Dropzone.PROCESSING = Dropzone.UPLOADING; // alias
48221
48222Dropzone.CANCELED = "canceled";
48223Dropzone.ERROR = "error";
48224Dropzone.SUCCESS = "success";
48225/*
48226
48227 Bugfix for iOS 6 and 7
48228 Source: http://stackoverflow.com/questions/11929099/html5-canvas-drawimage-ratio-bug-ios
48229 based on the work of https://github.com/stomita/ios-imagefile-megapixel
48230
48231 */
48232// Detecting vertical squash in loaded image.
48233// Fixes a bug which squash image vertically while drawing into canvas for some images.
48234// This is a bug in iOS6 devices. This function from https://github.com/stomita/ios-imagefile-megapixel
48235
48236var detectVerticalSquash = function detectVerticalSquash(img) {
48237  var iw = img.naturalWidth;
48238  var ih = img.naturalHeight;
48239  var canvas = document.createElement("canvas");
48240  canvas.width = 1;
48241  canvas.height = ih;
48242  var ctx = canvas.getContext("2d");
48243  ctx.drawImage(img, 0, 0);
48244
48245  var _ctx$getImageData = ctx.getImageData(1, 0, 1, ih),
48246      data = _ctx$getImageData.data; // search image edge pixel position in case it is squashed vertically.
48247
48248
48249  var sy = 0;
48250  var ey = ih;
48251  var py = ih;
48252
48253  while (py > sy) {
48254    var alpha = data[(py - 1) * 4 + 3];
48255
48256    if (alpha === 0) {
48257      ey = py;
48258    } else {
48259      sy = py;
48260    }
48261
48262    py = ey + sy >> 1;
48263  }
48264
48265  var ratio = py / ih;
48266
48267  if (ratio === 0) {
48268    return 1;
48269  } else {
48270    return ratio;
48271  }
48272}; // A replacement for context.drawImage
48273// (args are for source and destination).
48274
48275
48276var drawImageIOSFix = function drawImageIOSFix(ctx, img, sx, sy, sw, sh, dx, dy, dw, dh) {
48277  var vertSquashRatio = detectVerticalSquash(img);
48278  return ctx.drawImage(img, sx, sy, sw, sh, dx, dy, dw, dh / vertSquashRatio);
48279}; // Based on MinifyJpeg
48280// Source: http://www.perry.cz/files/ExifRestorer.js
48281// http://elicon.blog57.fc2.com/blog-entry-206.html
48282
48283
48284var ExifRestore = /*#__PURE__*/function () {
48285  function ExifRestore() {
48286    dropzone_classCallCheck(this, ExifRestore);
48287  }
48288
48289  dropzone_createClass(ExifRestore, null, [{
48290    key: "initClass",
48291    value: function initClass() {
48292      this.KEY_STR = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
48293    }
48294  }, {
48295    key: "encode64",
48296    value: function encode64(input) {
48297      var output = "";
48298      var chr1 = undefined;
48299      var chr2 = undefined;
48300      var chr3 = "";
48301      var enc1 = undefined;
48302      var enc2 = undefined;
48303      var enc3 = undefined;
48304      var enc4 = "";
48305      var i = 0;
48306
48307      while (true) {
48308        chr1 = input[i++];
48309        chr2 = input[i++];
48310        chr3 = input[i++];
48311        enc1 = chr1 >> 2;
48312        enc2 = (chr1 & 3) << 4 | chr2 >> 4;
48313        enc3 = (chr2 & 15) << 2 | chr3 >> 6;
48314        enc4 = chr3 & 63;
48315
48316        if (isNaN(chr2)) {
48317          enc3 = enc4 = 64;
48318        } else if (isNaN(chr3)) {
48319          enc4 = 64;
48320        }
48321
48322        output = output + this.KEY_STR.charAt(enc1) + this.KEY_STR.charAt(enc2) + this.KEY_STR.charAt(enc3) + this.KEY_STR.charAt(enc4);
48323        chr1 = chr2 = chr3 = "";
48324        enc1 = enc2 = enc3 = enc4 = "";
48325
48326        if (!(i < input.length)) {
48327          break;
48328        }
48329      }
48330
48331      return output;
48332    }
48333  }, {
48334    key: "restore",
48335    value: function restore(origFileBase64, resizedFileBase64) {
48336      if (!origFileBase64.match("data:image/jpeg;base64,")) {
48337        return resizedFileBase64;
48338      }
48339
48340      var rawImage = this.decode64(origFileBase64.replace("data:image/jpeg;base64,", ""));
48341      var segments = this.slice2Segments(rawImage);
48342      var image = this.exifManipulation(resizedFileBase64, segments);
48343      return "data:image/jpeg;base64,".concat(this.encode64(image));
48344    }
48345  }, {
48346    key: "exifManipulation",
48347    value: function exifManipulation(resizedFileBase64, segments) {
48348      var exifArray = this.getExifArray(segments);
48349      var newImageArray = this.insertExif(resizedFileBase64, exifArray);
48350      var aBuffer = new Uint8Array(newImageArray);
48351      return aBuffer;
48352    }
48353  }, {
48354    key: "getExifArray",
48355    value: function getExifArray(segments) {
48356      var seg = undefined;
48357      var x = 0;
48358
48359      while (x < segments.length) {
48360        seg = segments[x];
48361
48362        if (seg[0] === 255 & seg[1] === 225) {
48363          return seg;
48364        }
48365
48366        x++;
48367      }
48368
48369      return [];
48370    }
48371  }, {
48372    key: "insertExif",
48373    value: function insertExif(resizedFileBase64, exifArray) {
48374      var imageData = resizedFileBase64.replace("data:image/jpeg;base64,", "");
48375      var buf = this.decode64(imageData);
48376      var separatePoint = buf.indexOf(255, 3);
48377      var mae = buf.slice(0, separatePoint);
48378      var ato = buf.slice(separatePoint);
48379      var array = mae;
48380      array = array.concat(exifArray);
48381      array = array.concat(ato);
48382      return array;
48383    }
48384  }, {
48385    key: "slice2Segments",
48386    value: function slice2Segments(rawImageArray) {
48387      var head = 0;
48388      var segments = [];
48389
48390      while (true) {
48391        var length;
48392
48393        if (rawImageArray[head] === 255 & rawImageArray[head + 1] === 218) {
48394          break;
48395        }
48396
48397        if (rawImageArray[head] === 255 & rawImageArray[head + 1] === 216) {
48398          head += 2;
48399        } else {
48400          length = rawImageArray[head + 2] * 256 + rawImageArray[head + 3];
48401          var endPoint = head + length + 2;
48402          var seg = rawImageArray.slice(head, endPoint);
48403          segments.push(seg);
48404          head = endPoint;
48405        }
48406
48407        if (head > rawImageArray.length) {
48408          break;
48409        }
48410      }
48411
48412      return segments;
48413    }
48414  }, {
48415    key: "decode64",
48416    value: function decode64(input) {
48417      var output = "";
48418      var chr1 = undefined;
48419      var chr2 = undefined;
48420      var chr3 = "";
48421      var enc1 = undefined;
48422      var enc2 = undefined;
48423      var enc3 = undefined;
48424      var enc4 = "";
48425      var i = 0;
48426      var buf = []; // remove all characters that are not A-Z, a-z, 0-9, +, /, or =
48427
48428      var base64test = /[^A-Za-z0-9\+\/\=]/g;
48429
48430      if (base64test.exec(input)) {
48431        console.warn("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding.");
48432      }
48433
48434      input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
48435
48436      while (true) {
48437        enc1 = this.KEY_STR.indexOf(input.charAt(i++));
48438        enc2 = this.KEY_STR.indexOf(input.charAt(i++));
48439        enc3 = this.KEY_STR.indexOf(input.charAt(i++));
48440        enc4 = this.KEY_STR.indexOf(input.charAt(i++));
48441        chr1 = enc1 << 2 | enc2 >> 4;
48442        chr2 = (enc2 & 15) << 4 | enc3 >> 2;
48443        chr3 = (enc3 & 3) << 6 | enc4;
48444        buf.push(chr1);
48445
48446        if (enc3 !== 64) {
48447          buf.push(chr2);
48448        }
48449
48450        if (enc4 !== 64) {
48451          buf.push(chr3);
48452        }
48453
48454        chr1 = chr2 = chr3 = "";
48455        enc1 = enc2 = enc3 = enc4 = "";
48456
48457        if (!(i < input.length)) {
48458          break;
48459        }
48460      }
48461
48462      return buf;
48463    }
48464  }]);
48465
48466  return ExifRestore;
48467}();
48468
48469ExifRestore.initClass();
48470/*
48471 * contentloaded.js
48472 *
48473 * Author: Diego Perini (diego.perini at gmail.com)
48474 * Summary: cross-browser wrapper for DOMContentLoaded
48475 * Updated: 20101020
48476 * License: MIT
48477 * Version: 1.2
48478 *
48479 * URL:
48480 * http://javascript.nwbox.com/ContentLoaded/
48481 * http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE
48482 */
48483// @win window reference
48484// @fn function reference
48485
48486var contentLoaded = function contentLoaded(win, fn) {
48487  var done = false;
48488  var top = true;
48489  var doc = win.document;
48490  var root = doc.documentElement;
48491  var add = doc.addEventListener ? "addEventListener" : "attachEvent";
48492  var rem = doc.addEventListener ? "removeEventListener" : "detachEvent";
48493  var pre = doc.addEventListener ? "" : "on";
48494
48495  var init = function init(e) {
48496    if (e.type === "readystatechange" && doc.readyState !== "complete") {
48497      return;
48498    }
48499
48500    (e.type === "load" ? win : doc)[rem](pre + e.type, init, false);
48501
48502    if (!done && (done = true)) {
48503      return fn.call(win, e.type || e);
48504    }
48505  };
48506
48507  var poll = function poll() {
48508    try {
48509      root.doScroll("left");
48510    } catch (e) {
48511      setTimeout(poll, 50);
48512      return;
48513    }
48514
48515    return init("poll");
48516  };
48517
48518  if (doc.readyState !== "complete") {
48519    if (doc.createEventObject && root.doScroll) {
48520      try {
48521        top = !win.frameElement;
48522      } catch (error) {}
48523
48524      if (top) {
48525        poll();
48526      }
48527    }
48528
48529    doc[add](pre + "DOMContentLoaded", init, false);
48530    doc[add](pre + "readystatechange", init, false);
48531    return win[add](pre + "load", init, false);
48532  }
48533}; // As a single function to be able to write tests.
48534
48535
48536Dropzone._autoDiscoverFunction = function () {
48537  if (Dropzone.autoDiscover) {
48538    return Dropzone.discover();
48539  }
48540};
48541
48542contentLoaded(window, Dropzone._autoDiscoverFunction);
48543
48544function __guard__(value, transform) {
48545  return typeof value !== "undefined" && value !== null ? transform(value) : undefined;
48546}
48547
48548function __guardMethod__(obj, methodName, transform) {
48549  if (typeof obj !== "undefined" && obj !== null && typeof obj[methodName] === "function") {
48550    return transform(obj, methodName);
48551  } else {
48552    return undefined;
48553  }
48554}
48555
48556
48557;// CONCATENATED MODULE: ./tool/dropzone.dist.js
48558 /// Make Dropzone a global variable.
48559
48560window.Dropzone = Dropzone;
48561/* harmony default export */ var dropzone_dist = (Dropzone);
48562
48563}();
48564/******/ 	return __webpack_exports__;
48565/******/ })()
48566;
48567});
48567
48568"use strict";
48569
48570//
48571// Dropzone Initialization
48572//
48573
48574// Set Defaults
48575Dropzone.autoDiscover = false;
48576Dropzone.prototype.previewTemplate = `\
48577    <div class="dz-preview dz-file-preview">
48578        <div class="dz-image"><img data-dz-thumbnail /></div>
48579        
48580        <div class="dz-details">
48581            <div class="dz-size"><span data-dz-size></span></div>
48582            <div class="dz-filename"><span data-dz-name></span></div>
48583        </div>
48584
48585        <div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div>
48586
48587        <div class="dz-error-message"><span data-dz-errormessage></span></div>
48588        
48589        <div class="dz-success-mark">
48590            <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
48591                <title>Check</title>
48592                <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
48593                    <path d="M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" stroke-opacity="0.198794158" stroke="#747474" fill-opacity="0.816519475" fill="#FFFFFF"></path>
48594                </g>
48595            </svg>
48596        </div>
48597
48598        <div class="dz-error-mark">
48599            <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
48600                <title>Error</title>
48601                <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
48602                    <g stroke="#747474" stroke-opacity="0.198794158" fill="#FFFFFF" fill-opacity="0.816519475">
48603                    <path d="M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z"></path>
48604                    </g>
48605                </g>
48606            </svg>
48607        </div>
48608    </div>\
48609`;
vendor: 9,125 bytes, lines 48610-48877
48610/*!
48611 * Quill Editor v1.3.7
48612 * https://quilljs.com/
48613 * Copyright (c) 2014, Jason Chen
48614 * Copyright (c) 2013, salesforce.com
48615 */
48616(function webpackUniversalModuleDefinition(root, factory) {
48617	if(typeof exports === 'object' && typeof module === 'object')
48618		module.exports = factory();
48619	else if(typeof define === 'function' && define.amd)
48620		define([], factory);
48621	else if(typeof exports === 'object')
48622		exports["Quill"] = factory();
48623	else
48624		root["Quill"] = factory();
48625})(typeof self !== 'undefined' ? self : this, function() {
48626return /******/ (function(modules) { // webpackBootstrap
48627/******/ 	// The module cache
48628/******/ 	var installedModules = {};
48629/******/
48630/******/ 	// The require function
48631/******/ 	function __webpack_require__(moduleId) {
48632/******/
48633/******/ 		// Check if module is in cache
48634/******/ 		if(installedModules[moduleId]) {
48635/******/ 			return installedModules[moduleId].exports;
48636/******/ 		}
48637/******/ 		// Create a new module (and put it into the cache)
48638/******/ 		var module = installedModules[moduleId] = {
48639/******/ 			i: moduleId,
48640/******/ 			l: false,
48641/******/ 			exports: {}
48642/******/ 		};
48643/******/
48644/******/ 		// Execute the module function
48645/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
48646/******/
48647/******/ 		// Flag the module as loaded
48648/******/ 		module.l = true;
48649/******/
48650/******/ 		// Return the exports of the module
48651/******/ 		return module.exports;
48652/******/ 	}
48653/******/
48654/******/
48655/******/ 	// expose the modules object (__webpack_modules__)
48656/******/ 	__webpack_require__.m = modules;
48657/******/
48658/******/ 	// expose the module cache
48659/******/ 	__webpack_require__.c = installedModules;
48660/******/
48661/******/ 	// define getter function for harmony exports
48662/******/ 	__webpack_require__.d = function(exports, name, getter) {
48663/******/ 		if(!__webpack_require__.o(exports, name)) {
48664/******/ 			Object.defineProperty(exports, name, {
48665/******/ 				configurable: false,
48666/******/ 				enumerable: true,
48667/******/ 				get: getter
48668/******/ 			});
48669/******/ 		}
48670/******/ 	};
48671/******/
48672/******/ 	// getDefaultExport function for compatibility with non-harmony modules
48673/******/ 	__webpack_require__.n = function(module) {
48674/******/ 		var getter = module && module.__esModule ?
48675/******/ 			function getDefault() { return module['default']; } :
48676/******/ 			function getModuleExports() { return module; };
48677/******/ 		__webpack_require__.d(getter, 'a', getter);
48678/******/ 		return getter;
48679/******/ 	};
48680/******/
48681/******/ 	// Object.prototype.hasOwnProperty.call
48682/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
48683/******/
48684/******/ 	// __webpack_public_path__
48685/******/ 	__webpack_require__.p = "";
48686/******/
48687/******/ 	// Load entry module and return exports
48688/******/ 	return __webpack_require__(__webpack_require__.s = 109);
48689/******/ })
48690/************************************************************************/
48691/******/ ([
48692/* 0 */
48693/***/ (function(module, exports, __webpack_require__) {
48694
48695"use strict";
48696
48697Object.defineProperty(exports, "__esModule", { value: true });
48698var container_1 = __webpack_require__(17);
48699var format_1 = __webpack_require__(18);
48700var leaf_1 = __webpack_require__(19);
48701var scroll_1 = __webpack_require__(45);
48702var inline_1 = __webpack_require__(46);
48703var block_1 = __webpack_require__(47);
48704var embed_1 = __webpack_require__(48);
48705var text_1 = __webpack_require__(49);
48706var attributor_1 = __webpack_require__(12);
48707var class_1 = __webpack_require__(32);
48708var style_1 = __webpack_require__(33);
48709var store_1 = __webpack_require__(31);
48710var Registry = __webpack_require__(1);
48711var Parchment = {
48712    Scope: Registry.Scope,
48713    create: Registry.create,
48714    find: Registry.find,
48715    query: Registry.query,
48716    register: Registry.register,
48717    Container: container_1.default,
48718    Format: format_1.default,
48719    Leaf: leaf_1.default,
48720    Embed: embed_1.default,
48721    Scroll: scroll_1.default,
48722    Block: block_1.default,
48723    Inline: inline_1.default,
48724    Text: text_1.default,
48725    Attributor: {
48726        Attribute: attributor_1.default,
48727        Class: class_1.default,
48728        Style: style_1.default,
48729        Store: store_1.default,
48730    },
48731};
48732exports.default = Parchment;
48733
48734
48735/***/ }),
48736/* 1 */
48737/***/ (function(module, exports, __webpack_require__) {
48738
48739"use strict";
48740
48741var __extends = (this && this.__extends) || (function () {
48742    var extendStatics = Object.setPrototypeOf ||
48743        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
48744        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
48745    return function (d, b) {
48746        extendStatics(d, b);
48747        function __() { this.constructor = d; }
48748        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
48749    };
48750})();
48751Object.defineProperty(exports, "__esModule", { value: true });
48752var ParchmentError = /** @class */ (function (_super) {
48753    __extends(ParchmentError, _super);
48754    function ParchmentError(message) {
48755        var _this = this;
48756        message = '[Parchment] ' + message;
48757        _this = _super.call(this, message) || this;
48758        _this.message = message;
48759        _this.name = _this.constructor.name;
48760        return _this;
48761    }
48762    return ParchmentError;
48763}(Error));
48764exports.ParchmentError = ParchmentError;
48765var attributes = {};
48766var classes = {};
48767var tags = {};
48768var types = {};
48769exports.DATA_KEY = '__blot';
48770var Scope;
48771(function (Scope) {
48772    Scope[Scope["TYPE"] = 3] = "TYPE";
48773    Scope[Scope["LEVEL"] = 12] = "LEVEL";
48774    Scope[Scope["ATTRIBUTE"] = 13] = "ATTRIBUTE";
48775    Scope[Scope["BLOT"] = 14] = "BLOT";
48776    Scope[Scope["INLINE"] = 7] = "INLINE";
48777    Scope[Scope["BLOCK"] = 11] = "BLOCK";
48778    Scope[Scope["BLOCK_BLOT"] = 10] = "BLOCK_BLOT";
48779    Scope[Scope["INLINE_BLOT"] = 6] = "INLINE_BLOT";
48780    Scope[Scope["BLOCK_ATTRIBUTE"] = 9] = "BLOCK_ATTRIBUTE";
48781    Scope[Scope["INLINE_ATTRIBUTE"] = 5] = "INLINE_ATTRIBUTE";
48782    Scope[Scope["ANY"] = 15] = "ANY";
48783})(Scope = exports.Scope || (exports.Scope = {}));
48784function create(input, value) {
48785    var match = query(input);
48786    if (match == null) {
48787        throw new ParchmentError("Unable to create " + input + " blot");
48788    }
48789    var BlotClass = match;
48790    var node = 
48791    // @ts-ignore
48792    input instanceof Node || input['nodeType'] === Node.TEXT_NODE ? input : BlotClass.create(value);
48793    return new BlotClass(node, value);
48794}
48795exports.create = create;
48796function find(node, bubble) {
48797    if (bubble === void 0) { bubble = false; }
48798    if (node == null)
48799        return null;
48800    // @ts-ignore
48801    if (node[exports.DATA_KEY] != null)
48802        return node[exports.DATA_KEY].blot;
48803    if (bubble)
48804        return find(node.parentNode, bubble);
48805    return null;
48806}
48807exports.find = find;
48808function query(query, scope) {
48809    if (scope === void 0) { scope = Scope.ANY; }
48810    var match;
48811    if (typeof query === 'string') {
48812        match = types[query] || attributes[query];
48813        // @ts-ignore
48814    }
48815    else if (query instanceof Text || query['nodeType'] === Node.TEXT_NODE) {
48816        match = types['text'];
48817    }
48818    else if (typeof query === 'number') {
48819        if (query & Scope.LEVEL & Scope.BLOCK) {
48820            match = types['block'];
48821        }
48822        else if (query & Scope.LEVEL & Scope.INLINE) {
48823            match = types['inline'];
48824        }
48825    }
48826    else if (query instanceof HTMLElement) {
48827        var names = (query.getAttribute('class') || '').split(/\s+/);
48828        for (var i in names) {
48829            match = classes[names[i]];
48830            if (match)
48831                break;
48832        }
48833        match = match || tags[query.tagName];
48834    }
48835    if (match == null)
48836        return null;
48837    // @ts-ignore
48838    if (scope & Scope.LEVEL & match.scope && scope & Scope.TYPE & match.scope)
48839        return match;
48840    return null;
48841}
48842exports.query = query;
48843function register() {
48844    var Definitions = [];
48845    for (var _i = 0; _i < arguments.length; _i++) {
48846        Definitions[_i] = arguments[_i];
48847    }
48848    if (Definitions.length > 1) {
48849        return Definitions.map(function (d) {
48850            return register(d);
48851        });
48852    }
48853    var Definition = Definitions[0];
48854    if (typeof Definition.blotName !== 'string' && typeof Definition.attrName !== 'string') {
48855        throw new ParchmentError('Invalid definition');
48856    }
48857    else if (Definition.blotName === 'abstract') {
48858        throw new ParchmentError('Cannot register abstract class');
48859    }
48860    types[Definition.blotName || Definition.attrName] = Definition;
48861    if (typeof Definition.keyName === 'string') {
48862        attributes[Definition.keyName] = Definition;
48863    }
48864    else {
48865        if (Definition.className != null) {
48866            classes[Definition.className] = Definition;
48867        }
48868        if (Definition.tagName != null) {
48869            if (Array.isArray(Definition.tagName)) {
48870                Definition.tagName = Definition.tagName.map(function (tagName) {
48871                    return tagName.toUpperCase();
48872                });
48873            }
48874            else {
48875                Definition.tagName = Definition.tagName.toUpperCase();
48876            }
48877            var tagNames = Array.isArray(Definition.tagName) ? Definition.tagName : [Definition.tagName];
vendor: 183,879 bytes, lines 48878-53888
48878            tagNames.forEach(function (tag) {
48879                if (tags[tag] == null || Definition.className == null) {
48880                    tags[tag] = Definition;
48881                }
48882            });
48883        }
48884    }
48885    return Definition;
48886}
48887exports.register = register;
48888
48889
48890/***/ }),
48891/* 2 */
48892/***/ (function(module, exports, __webpack_require__) {
48893
48894var diff = __webpack_require__(51);
48895var equal = __webpack_require__(11);
48896var extend = __webpack_require__(3);
48897var op = __webpack_require__(20);
48898
48899
48900var NULL_CHARACTER = String.fromCharCode(0);  // Placeholder char for embed in diff()
48901
48902
48903var Delta = function (ops) {
48904  // Assume we are given a well formed ops
48905  if (Array.isArray(ops)) {
48906    this.ops = ops;
48907  } else if (ops != null && Array.isArray(ops.ops)) {
48908    this.ops = ops.ops;
48909  } else {
48910    this.ops = [];
48911  }
48912};
48913
48914
48915Delta.prototype.insert = function (text, attributes) {
48916  var newOp = {};
48917  if (text.length === 0) return this;
48918  newOp.insert = text;
48919  if (attributes != null && typeof attributes === 'object' && Object.keys(attributes).length > 0) {
48920    newOp.attributes = attributes;
48921  }
48922  return this.push(newOp);
48923};
48924
48925Delta.prototype['delete'] = function (length) {
48926  if (length <= 0) return this;
48927  return this.push({ 'delete': length });
48928};
48929
48930Delta.prototype.retain = function (length, attributes) {
48931  if (length <= 0) return this;
48932  var newOp = { retain: length };
48933  if (attributes != null && typeof attributes === 'object' && Object.keys(attributes).length > 0) {
48934    newOp.attributes = attributes;
48935  }
48936  return this.push(newOp);
48937};
48938
48939Delta.prototype.push = function (newOp) {
48940  var index = this.ops.length;
48941  var lastOp = this.ops[index - 1];
48942  newOp = extend(true, {}, newOp);
48943  if (typeof lastOp === 'object') {
48944    if (typeof newOp['delete'] === 'number' && typeof lastOp['delete'] === 'number') {
48945      this.ops[index - 1] = { 'delete': lastOp['delete'] + newOp['delete'] };
48946      return this;
48947    }
48948    // Since it does not matter if we insert before or after deleting at the same index,
48949    // always prefer to insert first
48950    if (typeof lastOp['delete'] === 'number' && newOp.insert != null) {
48951      index -= 1;
48952      lastOp = this.ops[index - 1];
48953      if (typeof lastOp !== 'object') {
48954        this.ops.unshift(newOp);
48955        return this;
48956      }
48957    }
48958    if (equal(newOp.attributes, lastOp.attributes)) {
48959      if (typeof newOp.insert === 'string' && typeof lastOp.insert === 'string') {
48960        this.ops[index - 1] = { insert: lastOp.insert + newOp.insert };
48961        if (typeof newOp.attributes === 'object') this.ops[index - 1].attributes = newOp.attributes
48962        return this;
48963      } else if (typeof newOp.retain === 'number' && typeof lastOp.retain === 'number') {
48964        this.ops[index - 1] = { retain: lastOp.retain + newOp.retain };
48965        if (typeof newOp.attributes === 'object') this.ops[index - 1].attributes = newOp.attributes
48966        return this;
48967      }
48968    }
48969  }
48970  if (index === this.ops.length) {
48971    this.ops.push(newOp);
48972  } else {
48973    this.ops.splice(index, 0, newOp);
48974  }
48975  return this;
48976};
48977
48978Delta.prototype.chop = function () {
48979  var lastOp = this.ops[this.ops.length - 1];
48980  if (lastOp && lastOp.retain && !lastOp.attributes) {
48981    this.ops.pop();
48982  }
48983  return this;
48984};
48985
48986Delta.prototype.filter = function (predicate) {
48987  return this.ops.filter(predicate);
48988};
48989
48990Delta.prototype.forEach = function (predicate) {
48991  this.ops.forEach(predicate);
48992};
48993
48994Delta.prototype.map = function (predicate) {
48995  return this.ops.map(predicate);
48996};
48997
48998Delta.prototype.partition = function (predicate) {
48999  var passed = [], failed = [];
49000  this.forEach(function(op) {
49001    var target = predicate(op) ? passed : failed;
49002    target.push(op);
49003  });
49004  return [passed, failed];
49005};
49006
49007Delta.prototype.reduce = function (predicate, initial) {
49008  return this.ops.reduce(predicate, initial);
49009};
49010
49011Delta.prototype.changeLength = function () {
49012  return this.reduce(function (length, elem) {
49013    if (elem.insert) {
49014      return length + op.length(elem);
49015    } else if (elem.delete) {
49016      return length - elem.delete;
49017    }
49018    return length;
49019  }, 0);
49020};
49021
49022Delta.prototype.length = function () {
49023  return this.reduce(function (length, elem) {
49024    return length + op.length(elem);
49025  }, 0);
49026};
49027
49028Delta.prototype.slice = function (start, end) {
49029  start = start || 0;
49030  if (typeof end !== 'number') end = Infinity;
49031  var ops = [];
49032  var iter = op.iterator(this.ops);
49033  var index = 0;
49034  while (index < end && iter.hasNext()) {
49035    var nextOp;
49036    if (index < start) {
49037      nextOp = iter.next(start - index);
49038    } else {
49039      nextOp = iter.next(end - index);
49040      ops.push(nextOp);
49041    }
49042    index += op.length(nextOp);
49043  }
49044  return new Delta(ops);
49045};
49046
49047
49048Delta.prototype.compose = function (other) {
49049  var thisIter = op.iterator(this.ops);
49050  var otherIter = op.iterator(other.ops);
49051  var ops = [];
49052  var firstOther = otherIter.peek();
49053  if (firstOther != null && typeof firstOther.retain === 'number' && firstOther.attributes == null) {
49054    var firstLeft = firstOther.retain;
49055    while (thisIter.peekType() === 'insert' && thisIter.peekLength() <= firstLeft) {
49056      firstLeft -= thisIter.peekLength();
49057      ops.push(thisIter.next());
49058    }
49059    if (firstOther.retain - firstLeft > 0) {
49060      otherIter.next(firstOther.retain - firstLeft);
49061    }
49062  }
49063  var delta = new Delta(ops);
49064  while (thisIter.hasNext() || otherIter.hasNext()) {
49065    if (otherIter.peekType() === 'insert') {
49066      delta.push(otherIter.next());
49067    } else if (thisIter.peekType() === 'delete') {
49068      delta.push(thisIter.next());
49069    } else {
49070      var length = Math.min(thisIter.peekLength(), otherIter.peekLength());
49071      var thisOp = thisIter.next(length);
49072      var otherOp = otherIter.next(length);
49073      if (typeof otherOp.retain === 'number') {
49074        var newOp = {};
49075        if (typeof thisOp.retain === 'number') {
49076          newOp.retain = length;
49077        } else {
49078          newOp.insert = thisOp.insert;
49079        }
49080        // Preserve null when composing with a retain, otherwise remove it for inserts
49081        var attributes = op.attributes.compose(thisOp.attributes, otherOp.attributes, typeof thisOp.retain === 'number');
49082        if (attributes) newOp.attributes = attributes;
49083        delta.push(newOp);
49084
49085        // Optimization if rest of other is just retain
49086        if (!otherIter.hasNext() && equal(delta.ops[delta.ops.length - 1], newOp)) {
49087          var rest = new Delta(thisIter.rest());
49088          return delta.concat(rest).chop();
49089        }
49090
49091      // Other op should be delete, we could be an insert or retain
49092      // Insert + delete cancels out
49093      } else if (typeof otherOp['delete'] === 'number' && typeof thisOp.retain === 'number') {
49094        delta.push(otherOp);
49095      }
49096    }
49097  }
49098  return delta.chop();
49099};
49100
49101Delta.prototype.concat = function (other) {
49102  var delta = new Delta(this.ops.slice());
49103  if (other.ops.length > 0) {
49104    delta.push(other.ops[0]);
49105    delta.ops = delta.ops.concat(other.ops.slice(1));
49106  }
49107  return delta;
49108};
49109
49110Delta.prototype.diff = function (other, index) {
49111  if (this.ops === other.ops) {
49112    return new Delta();
49113  }
49114  var strings = [this, other].map(function (delta) {
49115    return delta.map(function (op) {
49116      if (op.insert != null) {
49117        return typeof op.insert === 'string' ? op.insert : NULL_CHARACTER;
49118      }
49119      var prep = (delta === other) ? 'on' : 'with';
49120      throw new Error('diff() called ' + prep + ' non-document');
49121    }).join('');
49122  });
49123  var delta = new Delta();
49124  var diffResult = diff(strings[0], strings[1], index);
49125  var thisIter = op.iterator(this.ops);
49126  var otherIter = op.iterator(other.ops);
49127  diffResult.forEach(function (component) {
49128    var length = component[1].length;
49129    while (length > 0) {
49130      var opLength = 0;
49131      switch (component[0]) {
49132        case diff.INSERT:
49133          opLength = Math.min(otherIter.peekLength(), length);
49134          delta.push(otherIter.next(opLength));
49135          break;
49136        case diff.DELETE:
49137          opLength = Math.min(length, thisIter.peekLength());
49138          thisIter.next(opLength);
49139          delta['delete'](opLength);
49140          break;
49141        case diff.EQUAL:
49142          opLength = Math.min(thisIter.peekLength(), otherIter.peekLength(), length);
49143          var thisOp = thisIter.next(opLength);
49144          var otherOp = otherIter.next(opLength);
49145          if (equal(thisOp.insert, otherOp.insert)) {
49146            delta.retain(opLength, op.attributes.diff(thisOp.attributes, otherOp.attributes));
49147          } else {
49148            delta.push(otherOp)['delete'](opLength);
49149          }
49150          break;
49151      }
49152      length -= opLength;
49153    }
49154  });
49155  return delta.chop();
49156};
49157
49158Delta.prototype.eachLine = function (predicate, newline) {
49159  newline = newline || '\n';
49160  var iter = op.iterator(this.ops);
49161  var line = new Delta();
49162  var i = 0;
49163  while (iter.hasNext()) {
49164    if (iter.peekType() !== 'insert') return;
49165    var thisOp = iter.peek();
49166    var start = op.length(thisOp) - iter.peekLength();
49167    var index = typeof thisOp.insert === 'string' ?
49168      thisOp.insert.indexOf(newline, start) - start : -1;
49169    if (index < 0) {
49170      line.push(iter.next());
49171    } else if (index > 0) {
49172      line.push(iter.next(index));
49173    } else {
49174      if (predicate(line, iter.next(1).attributes || {}, i) === false) {
49175        return;
49176      }
49177      i += 1;
49178      line = new Delta();
49179    }
49180  }
49181  if (line.length() > 0) {
49182    predicate(line, {}, i);
49183  }
49184};
49185
49186Delta.prototype.transform = function (other, priority) {
49187  priority = !!priority;
49188  if (typeof other === 'number') {
49189    return this.transformPosition(other, priority);
49190  }
49191  var thisIter = op.iterator(this.ops);
49192  var otherIter = op.iterator(other.ops);
49193  var delta = new Delta();
49194  while (thisIter.hasNext() || otherIter.hasNext()) {
49195    if (thisIter.peekType() === 'insert' && (priority || otherIter.peekType() !== 'insert')) {
49196      delta.retain(op.length(thisIter.next()));
49197    } else if (otherIter.peekType() === 'insert') {
49198      delta.push(otherIter.next());
49199    } else {
49200      var length = Math.min(thisIter.peekLength(), otherIter.peekLength());
49201      var thisOp = thisIter.next(length);
49202      var otherOp = otherIter.next(length);
49203      if (thisOp['delete']) {
49204        // Our delete either makes their delete redundant or removes their retain
49205        continue;
49206      } else if (otherOp['delete']) {
49207        delta.push(otherOp);
49208      } else {
49209        // We retain either their retain or insert
49210        delta.retain(length, op.attributes.transform(thisOp.attributes, otherOp.attributes, priority));
49211      }
49212    }
49213  }
49214  return delta.chop();
49215};
49216
49217Delta.prototype.transformPosition = function (index, priority) {
49218  priority = !!priority;
49219  var thisIter = op.iterator(this.ops);
49220  var offset = 0;
49221  while (thisIter.hasNext() && offset <= index) {
49222    var length = thisIter.peekLength();
49223    var nextType = thisIter.peekType();
49224    thisIter.next();
49225    if (nextType === 'delete') {
49226      index -= Math.min(length, index - offset);
49227      continue;
49228    } else if (nextType === 'insert' && (offset < index || !priority)) {
49229      index += length;
49230    }
49231    offset += length;
49232  }
49233  return index;
49234};
49235
49236
49237module.exports = Delta;
49238
49239
49240/***/ }),
49241/* 3 */
49242/***/ (function(module, exports) {
49243
49244'use strict';
49245
49246var hasOwn = Object.prototype.hasOwnProperty;
49247var toStr = Object.prototype.toString;
49248var defineProperty = Object.defineProperty;
49249var gOPD = Object.getOwnPropertyDescriptor;
49250
49251var isArray = function isArray(arr) {
49252	if (typeof Array.isArray === 'function') {
49253		return Array.isArray(arr);
49254	}
49255
49256	return toStr.call(arr) === '[object Array]';
49257};
49258
49259var isPlainObject = function isPlainObject(obj) {
49260	if (!obj || toStr.call(obj) !== '[object Object]') {
49261		return false;
49262	}
49263
49264	var hasOwnConstructor = hasOwn.call(obj, 'constructor');
49265	var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');
49266	// Not own constructor property must be Object
49267	if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
49268		return false;
49269	}
49270
49271	// Own properties are enumerated firstly, so to speed up,
49272	// if last one is own, then all properties are own.
49273	var key;
49274	for (key in obj) { /**/ }
49275
49276	return typeof key === 'undefined' || hasOwn.call(obj, key);
49277};
49278
49279// If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target
49280var setProperty = function setProperty(target, options) {
49281	if (defineProperty && options.name === '__proto__') {
49282		defineProperty(target, options.name, {
49283			enumerable: true,
49284			configurable: true,
49285			value: options.newValue,
49286			writable: true
49287		});
49288	} else {
49289		target[options.name] = options.newValue;
49290	}
49291};
49292
49293// Return undefined instead of __proto__ if '__proto__' is not an own property
49294var getProperty = function getProperty(obj, name) {
49295	if (name === '__proto__') {
49296		if (!hasOwn.call(obj, name)) {
49297			return void 0;
49298		} else if (gOPD) {
49299			// In early versions of node, obj['__proto__'] is buggy when obj has
49300			// __proto__ as an own property. Object.getOwnPropertyDescriptor() works.
49301			return gOPD(obj, name).value;
49302		}
49303	}
49304
49305	return obj[name];
49306};
49307
49308module.exports = function extend() {
49309	var options, name, src, copy, copyIsArray, clone;
49310	var target = arguments[0];
49311	var i = 1;
49312	var length = arguments.length;
49313	var deep = false;
49314
49315	// Handle a deep copy situation
49316	if (typeof target === 'boolean') {
49317		deep = target;
49318		target = arguments[1] || {};
49319		// skip the boolean and the target
49320		i = 2;
49321	}
49322	if (target == null || (typeof target !== 'object' && typeof target !== 'function')) {
49323		target = {};
49324	}
49325
49326	for (; i < length; ++i) {
49327		options = arguments[i];
49328		// Only deal with non-null/undefined values
49329		if (options != null) {
49330			// Extend the base object
49331			for (name in options) {
49332				src = getProperty(target, name);
49333				copy = getProperty(options, name);
49334
49335				// Prevent never-ending loop
49336				if (target !== copy) {
49337					// Recurse if we're merging plain objects or arrays
49338					if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {
49339						if (copyIsArray) {
49340							copyIsArray = false;
49341							clone = src && isArray(src) ? src : [];
49342						} else {
49343							clone = src && isPlainObject(src) ? src : {};
49344						}
49345
49346						// Never move original objects, clone them
49347						setProperty(target, { name: name, newValue: extend(deep, clone, copy) });
49348
49349					// Don't bring in undefined values
49350					} else if (typeof copy !== 'undefined') {
49351						setProperty(target, { name: name, newValue: copy });
49352					}
49353				}
49354			}
49355		}
49356	}
49357
49358	// Return the modified object
49359	return target;
49360};
49361
49362
49363/***/ }),
49364/* 4 */
49365/***/ (function(module, exports, __webpack_require__) {
49366
49367"use strict";
49368
49369
49370Object.defineProperty(exports, "__esModule", {
49371  value: true
49372});
49373exports.default = exports.BlockEmbed = exports.bubbleFormats = undefined;
49374
49375var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
49376
49377var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
49378
49379var _extend = __webpack_require__(3);
49380
49381var _extend2 = _interopRequireDefault(_extend);
49382
49383var _quillDelta = __webpack_require__(2);
49384
49385var _quillDelta2 = _interopRequireDefault(_quillDelta);
49386
49387var _parchment = __webpack_require__(0);
49388
49389var _parchment2 = _interopRequireDefault(_parchment);
49390
49391var _break = __webpack_require__(16);
49392
49393var _break2 = _interopRequireDefault(_break);
49394
49395var _inline = __webpack_require__(6);
49396
49397var _inline2 = _interopRequireDefault(_inline);
49398
49399var _text = __webpack_require__(7);
49400
49401var _text2 = _interopRequireDefault(_text);
49402
49403function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
49404
49405function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
49406
49407function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
49408
49409function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
49410
49411var NEWLINE_LENGTH = 1;
49412
49413var BlockEmbed = function (_Parchment$Embed) {
49414  _inherits(BlockEmbed, _Parchment$Embed);
49415
49416  function BlockEmbed() {
49417    _classCallCheck(this, BlockEmbed);
49418
49419    return _possibleConstructorReturn(this, (BlockEmbed.__proto__ || Object.getPrototypeOf(BlockEmbed)).apply(this, arguments));
49420  }
49421
49422  _createClass(BlockEmbed, [{
49423    key: 'attach',
49424    value: function attach() {
49425      _get(BlockEmbed.prototype.__proto__ || Object.getPrototypeOf(BlockEmbed.prototype), 'attach', this).call(this);
49426      this.attributes = new _parchment2.default.Attributor.Store(this.domNode);
49427    }
49428  }, {
49429    key: 'delta',
49430    value: function delta() {
49431      return new _quillDelta2.default().insert(this.value(), (0, _extend2.default)(this.formats(), this.attributes.values()));
49432    }
49433  }, {
49434    key: 'format',
49435    value: function format(name, value) {
49436      var attribute = _parchment2.default.query(name, _parchment2.default.Scope.BLOCK_ATTRIBUTE);
49437      if (attribute != null) {
49438        this.attributes.attribute(attribute, value);
49439      }
49440    }
49441  }, {
49442    key: 'formatAt',
49443    value: function formatAt(index, length, name, value) {
49444      this.format(name, value);
49445    }
49446  }, {
49447    key: 'insertAt',
49448    value: function insertAt(index, value, def) {
49449      if (typeof value === 'string' && value.endsWith('\n')) {
49450        var block = _parchment2.default.create(Block.blotName);
49451        this.parent.insertBefore(block, index === 0 ? this : this.next);
49452        block.insertAt(0, value.slice(0, -1));
49453      } else {
49454        _get(BlockEmbed.prototype.__proto__ || Object.getPrototypeOf(BlockEmbed.prototype), 'insertAt', this).call(this, index, value, def);
49455      }
49456    }
49457  }]);
49458
49459  return BlockEmbed;
49460}(_parchment2.default.Embed);
49461
49462BlockEmbed.scope = _parchment2.default.Scope.BLOCK_BLOT;
49463// It is important for cursor behavior BlockEmbeds use tags that are block level elements
49464
49465
49466var Block = function (_Parchment$Block) {
49467  _inherits(Block, _Parchment$Block);
49468
49469  function Block(domNode) {
49470    _classCallCheck(this, Block);
49471
49472    var _this2 = _possibleConstructorReturn(this, (Block.__proto__ || Object.getPrototypeOf(Block)).call(this, domNode));
49473
49474    _this2.cache = {};
49475    return _this2;
49476  }
49477
49478  _createClass(Block, [{
49479    key: 'delta',
49480    value: function delta() {
49481      if (this.cache.delta == null) {
49482        this.cache.delta = this.descendants(_parchment2.default.Leaf).reduce(function (delta, leaf) {
49483          if (leaf.length() === 0) {
49484            return delta;
49485          } else {
49486            return delta.insert(leaf.value(), bubbleFormats(leaf));
49487          }
49488        }, new _quillDelta2.default()).insert('\n', bubbleFormats(this));
49489      }
49490      return this.cache.delta;
49491    }
49492  }, {
49493    key: 'deleteAt',
49494    value: function deleteAt(index, length) {
49495      _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'deleteAt', this).call(this, index, length);
49496      this.cache = {};
49497    }
49498  }, {
49499    key: 'formatAt',
49500    value: function formatAt(index, length, name, value) {
49501      if (length <= 0) return;
49502      if (_parchment2.default.query(name, _parchment2.default.Scope.BLOCK)) {
49503        if (index + length === this.length()) {
49504          this.format(name, value);
49505        }
49506      } else {
49507        _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'formatAt', this).call(this, index, Math.min(length, this.length() - index - 1), name, value);
49508      }
49509      this.cache = {};
49510    }
49511  }, {
49512    key: 'insertAt',
49513    value: function insertAt(index, value, def) {
49514      if (def != null) return _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'insertAt', this).call(this, index, value, def);
49515      if (value.length === 0) return;
49516      var lines = value.split('\n');
49517      var text = lines.shift();
49518      if (text.length > 0) {
49519        if (index < this.length() - 1 || this.children.tail == null) {
49520          _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'insertAt', this).call(this, Math.min(index, this.length() - 1), text);
49521        } else {
49522          this.children.tail.insertAt(this.children.tail.length(), text);
49523        }
49524        this.cache = {};
49525      }
49526      var block = this;
49527      lines.reduce(function (index, line) {
49528        block = block.split(index, true);
49529        block.insertAt(0, line);
49530        return line.length;
49531      }, index + text.length);
49532    }
49533  }, {
49534    key: 'insertBefore',
49535    value: function insertBefore(blot, ref) {
49536      var head = this.children.head;
49537      _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'insertBefore', this).call(this, blot, ref);
49538      if (head instanceof _break2.default) {
49539        head.remove();
49540      }
49541      this.cache = {};
49542    }
49543  }, {
49544    key: 'length',
49545    value: function length() {
49546      if (this.cache.length == null) {
49547        this.cache.length = _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'length', this).call(this) + NEWLINE_LENGTH;
49548      }
49549      return this.cache.length;
49550    }
49551  }, {
49552    key: 'moveChildren',
49553    value: function moveChildren(target, ref) {
49554      _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'moveChildren', this).call(this, target, ref);
49555      this.cache = {};
49556    }
49557  }, {
49558    key: 'optimize',
49559    value: function optimize(context) {
49560      _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'optimize', this).call(this, context);
49561      this.cache = {};
49562    }
49563  }, {
49564    key: 'path',
49565    value: function path(index) {
49566      return _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'path', this).call(this, index, true);
49567    }
49568  }, {
49569    key: 'removeChild',
49570    value: function removeChild(child) {
49571      _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'removeChild', this).call(this, child);
49572      this.cache = {};
49573    }
49574  }, {
49575    key: 'split',
49576    value: function split(index) {
49577      var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
49578
49579      if (force && (index === 0 || index >= this.length() - NEWLINE_LENGTH)) {
49580        var clone = this.clone();
49581        if (index === 0) {
49582          this.parent.insertBefore(clone, this);
49583          return this;
49584        } else {
49585          this.parent.insertBefore(clone, this.next);
49586          return clone;
49587        }
49588      } else {
49589        var next = _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'split', this).call(this, index, force);
49590        this.cache = {};
49591        return next;
49592      }
49593    }
49594  }]);
49595
49596  return Block;
49597}(_parchment2.default.Block);
49598
49599Block.blotName = 'block';
49600Block.tagName = 'P';
49601Block.defaultChild = 'break';
49602Block.allowedChildren = [_inline2.default, _parchment2.default.Embed, _text2.default];
49603
49604function bubbleFormats(blot) {
49605  var formats = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
49606
49607  if (blot == null) return formats;
49608  if (typeof blot.formats === 'function') {
49609    formats = (0, _extend2.default)(formats, blot.formats());
49610  }
49611  if (blot.parent == null || blot.parent.blotName == 'scroll' || blot.parent.statics.scope !== blot.statics.scope) {
49612    return formats;
49613  }
49614  return bubbleFormats(blot.parent, formats);
49615}
49616
49617exports.bubbleFormats = bubbleFormats;
49618exports.BlockEmbed = BlockEmbed;
49619exports.default = Block;
49620
49621/***/ }),
49622/* 5 */
49623/***/ (function(module, exports, __webpack_require__) {
49624
49625"use strict";
49626
49627
49628Object.defineProperty(exports, "__esModule", {
49629  value: true
49630});
49631exports.default = exports.overload = exports.expandConfig = undefined;
49632
49633var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
49634
49635var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
49636
49637var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
49638
49639__webpack_require__(50);
49640
49641var _quillDelta = __webpack_require__(2);
49642
49643var _quillDelta2 = _interopRequireDefault(_quillDelta);
49644
49645var _editor = __webpack_require__(14);
49646
49647var _editor2 = _interopRequireDefault(_editor);
49648
49649var _emitter3 = __webpack_require__(8);
49650
49651var _emitter4 = _interopRequireDefault(_emitter3);
49652
49653var _module = __webpack_require__(9);
49654
49655var _module2 = _interopRequireDefault(_module);
49656
49657var _parchment = __webpack_require__(0);
49658
49659var _parchment2 = _interopRequireDefault(_parchment);
49660
49661var _selection = __webpack_require__(15);
49662
49663var _selection2 = _interopRequireDefault(_selection);
49664
49665var _extend = __webpack_require__(3);
49666
49667var _extend2 = _interopRequireDefault(_extend);
49668
49669var _logger = __webpack_require__(10);
49670
49671var _logger2 = _interopRequireDefault(_logger);
49672
49673var _theme = __webpack_require__(34);
49674
49675var _theme2 = _interopRequireDefault(_theme);
49676
49677function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
49678
49679function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
49680
49681function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
49682
49683var debug = (0, _logger2.default)('quill');
49684
49685var Quill = function () {
49686  _createClass(Quill, null, [{
49687    key: 'debug',
49688    value: function debug(limit) {
49689      if (limit === true) {
49690        limit = 'log';
49691      }
49692      _logger2.default.level(limit);
49693    }
49694  }, {
49695    key: 'find',
49696    value: function find(node) {
49697      return node.__quill || _parchment2.default.find(node);
49698    }
49699  }, {
49700    key: 'import',
49701    value: function _import(name) {
49702      if (this.imports[name] == null) {
49703        debug.error('Cannot import ' + name + '. Are you sure it was registered?');
49704      }
49705      return this.imports[name];
49706    }
49707  }, {
49708    key: 'register',
49709    value: function register(path, target) {
49710      var _this = this;
49711
49712      var overwrite = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
49713
49714      if (typeof path !== 'string') {
49715        var name = path.attrName || path.blotName;
49716        if (typeof name === 'string') {
49717          // register(Blot | Attributor, overwrite)
49718          this.register('formats/' + name, path, target);
49719        } else {
49720          Object.keys(path).forEach(function (key) {
49721            _this.register(key, path[key], target);
49722          });
49723        }
49724      } else {
49725        if (this.imports[path] != null && !overwrite) {
49726          debug.warn('Overwriting ' + path + ' with', target);
49727        }
49728        this.imports[path] = target;
49729        if ((path.startsWith('blots/') || path.startsWith('formats/')) && target.blotName !== 'abstract') {
49730          _parchment2.default.register(target);
49731        } else if (path.startsWith('modules') && typeof target.register === 'function') {
49732          target.register();
49733        }
49734      }
49735    }
49736  }]);
49737
49738  function Quill(container) {
49739    var _this2 = this;
49740
49741    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
49742
49743    _classCallCheck(this, Quill);
49744
49745    this.options = expandConfig(container, options);
49746    this.container = this.options.container;
49747    if (this.container == null) {
49748      return debug.error('Invalid Quill container', container);
49749    }
49750    if (this.options.debug) {
49751      Quill.debug(this.options.debug);
49752    }
49753    var html = this.container.innerHTML.trim();
49754    this.container.classList.add('ql-container');
49755    this.container.innerHTML = '';
49756    this.container.__quill = this;
49757    this.root = this.addContainer('ql-editor');
49758    this.root.classList.add('ql-blank');
49759    this.root.setAttribute('data-gramm', false);
49760    this.scrollingContainer = this.options.scrollingContainer || this.root;
49761    this.emitter = new _emitter4.default();
49762    this.scroll = _parchment2.default.create(this.root, {
49763      emitter: this.emitter,
49764      whitelist: this.options.formats
49765    });
49766    this.editor = new _editor2.default(this.scroll);
49767    this.selection = new _selection2.default(this.scroll, this.emitter);
49768    this.theme = new this.options.theme(this, this.options);
49769    this.keyboard = this.theme.addModule('keyboard');
49770    this.clipboard = this.theme.addModule('clipboard');
49771    this.history = this.theme.addModule('history');
49772    this.theme.init();
49773    this.emitter.on(_emitter4.default.events.EDITOR_CHANGE, function (type) {
49774      if (type === _emitter4.default.events.TEXT_CHANGE) {
49775        _this2.root.classList.toggle('ql-blank', _this2.editor.isBlank());
49776      }
49777    });
49778    this.emitter.on(_emitter4.default.events.SCROLL_UPDATE, function (source, mutations) {
49779      var range = _this2.selection.lastRange;
49780      var index = range && range.length === 0 ? range.index : undefined;
49781      modify.call(_this2, function () {
49782        return _this2.editor.update(null, mutations, index);
49783      }, source);
49784    });
49785    var contents = this.clipboard.convert('<div class=\'ql-editor\' style="white-space: normal;">' + html + '<p><br></p></div>');
49786    this.setContents(contents);
49787    this.history.clear();
49788    if (this.options.placeholder) {
49789      this.root.setAttribute('data-placeholder', this.options.placeholder);
49790    }
49791    if (this.options.readOnly) {
49792      this.disable();
49793    }
49794  }
49795
49796  _createClass(Quill, [{
49797    key: 'addContainer',
49798    value: function addContainer(container) {
49799      var refNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
49800
49801      if (typeof container === 'string') {
49802        var className = container;
49803        container = document.createElement('div');
49804        container.classList.add(className);
49805      }
49806      this.container.insertBefore(container, refNode);
49807      return container;
49808    }
49809  }, {
49810    key: 'blur',
49811    value: function blur() {
49812      this.selection.setRange(null);
49813    }
49814  }, {
49815    key: 'deleteText',
49816    value: function deleteText(index, length, source) {
49817      var _this3 = this;
49818
49819      var _overload = overload(index, length, source);
49820
49821      var _overload2 = _slicedToArray(_overload, 4);
49822
49823      index = _overload2[0];
49824      length = _overload2[1];
49825      source = _overload2[3];
49826
49827      return modify.call(this, function () {
49828        return _this3.editor.deleteText(index, length);
49829      }, source, index, -1 * length);
49830    }
49831  }, {
49832    key: 'disable',
49833    value: function disable() {
49834      this.enable(false);
49835    }
49836  }, {
49837    key: 'enable',
49838    value: function enable() {
49839      var enabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
49840
49841      this.scroll.enable(enabled);
49842      this.container.classList.toggle('ql-disabled', !enabled);
49843    }
49844  }, {
49845    key: 'focus',
49846    value: function focus() {
49847      var scrollTop = this.scrollingContainer.scrollTop;
49848      this.selection.focus();
49849      this.scrollingContainer.scrollTop = scrollTop;
49850      this.scrollIntoView();
49851    }
49852  }, {
49853    key: 'format',
49854    value: function format(name, value) {
49855      var _this4 = this;
49856
49857      var source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _emitter4.default.sources.API;
49858
49859      return modify.call(this, function () {
49860        var range = _this4.getSelection(true);
49861        var change = new _quillDelta2.default();
49862        if (range == null) {
49863          return change;
49864        } else if (_parchment2.default.query(name, _parchment2.default.Scope.BLOCK)) {
49865          change = _this4.editor.formatLine(range.index, range.length, _defineProperty({}, name, value));
49866        } else if (range.length === 0) {
49867          _this4.selection.format(name, value);
49868          return change;
49869        } else {
49870          change = _this4.editor.formatText(range.index, range.length, _defineProperty({}, name, value));
49871        }
49872        _this4.setSelection(range, _emitter4.default.sources.SILENT);
49873        return change;
49874      }, source);
49875    }
49876  }, {
49877    key: 'formatLine',
49878    value: function formatLine(index, length, name, value, source) {
49879      var _this5 = this;
49880
49881      var formats = void 0;
49882
49883      var _overload3 = overload(index, length, name, value, source);
49884
49885      var _overload4 = _slicedToArray(_overload3, 4);
49886
49887      index = _overload4[0];
49888      length = _overload4[1];
49889      formats = _overload4[2];
49890      source = _overload4[3];
49891
49892      return modify.call(this, function () {
49893        return _this5.editor.formatLine(index, length, formats);
49894      }, source, index, 0);
49895    }
49896  }, {
49897    key: 'formatText',
49898    value: function formatText(index, length, name, value, source) {
49899      var _this6 = this;
49900
49901      var formats = void 0;
49902
49903      var _overload5 = overload(index, length, name, value, source);
49904
49905      var _overload6 = _slicedToArray(_overload5, 4);
49906
49907      index = _overload6[0];
49908      length = _overload6[1];
49909      formats = _overload6[2];
49910      source = _overload6[3];
49911
49912      return modify.call(this, function () {
49913        return _this6.editor.formatText(index, length, formats);
49914      }, source, index, 0);
49915    }
49916  }, {
49917    key: 'getBounds',
49918    value: function getBounds(index) {
49919      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
49920
49921      var bounds = void 0;
49922      if (typeof index === 'number') {
49923        bounds = this.selection.getBounds(index, length);
49924      } else {
49925        bounds = this.selection.getBounds(index.index, index.length);
49926      }
49927      var containerBounds = this.container.getBoundingClientRect();
49928      return {
49929        bottom: bounds.bottom - containerBounds.top,
49930        height: bounds.height,
49931        left: bounds.left - containerBounds.left,
49932        right: bounds.right - containerBounds.left,
49933        top: bounds.top - containerBounds.top,
49934        width: bounds.width
49935      };
49936    }
49937  }, {
49938    key: 'getContents',
49939    value: function getContents() {
49940      var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
49941      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getLength() - index;
49942
49943      var _overload7 = overload(index, length);
49944
49945      var _overload8 = _slicedToArray(_overload7, 2);
49946
49947      index = _overload8[0];
49948      length = _overload8[1];
49949
49950      return this.editor.getContents(index, length);
49951    }
49952  }, {
49953    key: 'getFormat',
49954    value: function getFormat() {
49955      var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getSelection(true);
49956      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
49957
49958      if (typeof index === 'number') {
49959        return this.editor.getFormat(index, length);
49960      } else {
49961        return this.editor.getFormat(index.index, index.length);
49962      }
49963    }
49964  }, {
49965    key: 'getIndex',
49966    value: function getIndex(blot) {
49967      return blot.offset(this.scroll);
49968    }
49969  }, {
49970    key: 'getLength',
49971    value: function getLength() {
49972      return this.scroll.length();
49973    }
49974  }, {
49975    key: 'getLeaf',
49976    value: function getLeaf(index) {
49977      return this.scroll.leaf(index);
49978    }
49979  }, {
49980    key: 'getLine',
49981    value: function getLine(index) {
49982      return this.scroll.line(index);
49983    }
49984  }, {
49985    key: 'getLines',
49986    value: function getLines() {
49987      var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
49988      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.MAX_VALUE;
49989
49990      if (typeof index !== 'number') {
49991        return this.scroll.lines(index.index, index.length);
49992      } else {
49993        return this.scroll.lines(index, length);
49994      }
49995    }
49996  }, {
49997    key: 'getModule',
49998    value: function getModule(name) {
49999      return this.theme.modules[name];
50000    }
50001  }, {
50002    key: 'getSelection',
50003    value: function getSelection() {
50004      var focus = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
50005
50006      if (focus) this.focus();
50007      this.update(); // Make sure we access getRange with editor in consistent state
50008      return this.selection.getRange()[0];
50009    }
50010  }, {
50011    key: 'getText',
50012    value: function getText() {
50013      var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
50014      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getLength() - index;
50015
50016      var _overload9 = overload(index, length);
50017
50018      var _overload10 = _slicedToArray(_overload9, 2);
50019
50020      index = _overload10[0];
50021      length = _overload10[1];
50022
50023      return this.editor.getText(index, length);
50024    }
50025  }, {
50026    key: 'hasFocus',
50027    value: function hasFocus() {
50028      return this.selection.hasFocus();
50029    }
50030  }, {
50031    key: 'insertEmbed',
50032    value: function insertEmbed(index, embed, value) {
50033      var _this7 = this;
50034
50035      var source = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Quill.sources.API;
50036
50037      return modify.call(this, function () {
50038        return _this7.editor.insertEmbed(index, embed, value);
50039      }, source, index);
50040    }
50041  }, {
50042    key: 'insertText',
50043    value: function insertText(index, text, name, value, source) {
50044      var _this8 = this;
50045
50046      var formats = void 0;
50047
50048      var _overload11 = overload(index, 0, name, value, source);
50049
50050      var _overload12 = _slicedToArray(_overload11, 4);
50051
50052      index = _overload12[0];
50053      formats = _overload12[2];
50054      source = _overload12[3];
50055
50056      return modify.call(this, function () {
50057        return _this8.editor.insertText(index, text, formats);
50058      }, source, index, text.length);
50059    }
50060  }, {
50061    key: 'isEnabled',
50062    value: function isEnabled() {
50063      return !this.container.classList.contains('ql-disabled');
50064    }
50065  }, {
50066    key: 'off',
50067    value: function off() {
50068      return this.emitter.off.apply(this.emitter, arguments);
50069    }
50070  }, {
50071    key: 'on',
50072    value: function on() {
50073      return this.emitter.on.apply(this.emitter, arguments);
50074    }
50075  }, {
50076    key: 'once',
50077    value: function once() {
50078      return this.emitter.once.apply(this.emitter, arguments);
50079    }
50080  }, {
50081    key: 'pasteHTML',
50082    value: function pasteHTML(index, html, source) {
50083      this.clipboard.dangerouslyPasteHTML(index, html, source);
50084    }
50085  }, {
50086    key: 'removeFormat',
50087    value: function removeFormat(index, length, source) {
50088      var _this9 = this;
50089
50090      var _overload13 = overload(index, length, source);
50091
50092      var _overload14 = _slicedToArray(_overload13, 4);
50093
50094      index = _overload14[0];
50095      length = _overload14[1];
50096      source = _overload14[3];
50097
50098      return modify.call(this, function () {
50099        return _this9.editor.removeFormat(index, length);
50100      }, source, index);
50101    }
50102  }, {
50103    key: 'scrollIntoView',
50104    value: function scrollIntoView() {
50105      this.selection.scrollIntoView(this.scrollingContainer);
50106    }
50107  }, {
50108    key: 'setContents',
50109    value: function setContents(delta) {
50110      var _this10 = this;
50111
50112      var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _emitter4.default.sources.API;
50113
50114      return modify.call(this, function () {
50115        delta = new _quillDelta2.default(delta);
50116        var length = _this10.getLength();
50117        var deleted = _this10.editor.deleteText(0, length);
50118        var applied = _this10.editor.applyDelta(delta);
50119        var lastOp = applied.ops[applied.ops.length - 1];
50120        if (lastOp != null && typeof lastOp.insert === 'string' && lastOp.insert[lastOp.insert.length - 1] === '\n') {
50121          _this10.editor.deleteText(_this10.getLength() - 1, 1);
50122          applied.delete(1);
50123        }
50124        var ret = deleted.compose(applied);
50125        return ret;
50126      }, source);
50127    }
50128  }, {
50129    key: 'setSelection',
50130    value: function setSelection(index, length, source) {
50131      if (index == null) {
50132        this.selection.setRange(null, length || Quill.sources.API);
50133      } else {
50134        var _overload15 = overload(index, length, source);
50135
50136        var _overload16 = _slicedToArray(_overload15, 4);
50137
50138        index = _overload16[0];
50139        length = _overload16[1];
50140        source = _overload16[3];
50141
50142        this.selection.setRange(new _selection.Range(index, length), source);
50143        if (source !== _emitter4.default.sources.SILENT) {
50144          this.selection.scrollIntoView(this.scrollingContainer);
50145        }
50146      }
50147    }
50148  }, {
50149    key: 'setText',
50150    value: function setText(text) {
50151      var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _emitter4.default.sources.API;
50152
50153      var delta = new _quillDelta2.default().insert(text);
50154      return this.setContents(delta, source);
50155    }
50156  }, {
50157    key: 'update',
50158    value: function update() {
50159      var source = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _emitter4.default.sources.USER;
50160
50161      var change = this.scroll.update(source); // Will update selection before selection.update() does if text changes
50162      this.selection.update(source);
50163      return change;
50164    }
50165  }, {
50166    key: 'updateContents',
50167    value: function updateContents(delta) {
50168      var _this11 = this;
50169
50170      var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _emitter4.default.sources.API;
50171
50172      return modify.call(this, function () {
50173        delta = new _quillDelta2.default(delta);
50174        return _this11.editor.applyDelta(delta, source);
50175      }, source, true);
50176    }
50177  }]);
50178
50179  return Quill;
50180}();
50181
50182Quill.DEFAULTS = {
50183  bounds: null,
50184  formats: null,
50185  modules: {},
50186  placeholder: '',
50187  readOnly: false,
50188  scrollingContainer: null,
50189  strict: true,
50190  theme: 'default'
50191};
50192Quill.events = _emitter4.default.events;
50193Quill.sources = _emitter4.default.sources;
50194// eslint-disable-next-line no-undef
50195Quill.version =  false ? 'dev' : "1.3.7";
50196
50197Quill.imports = {
50198  'delta': _quillDelta2.default,
50199  'parchment': _parchment2.default,
50200  'core/module': _module2.default,
50201  'core/theme': _theme2.default
50202};
50203
50204function expandConfig(container, userConfig) {
50205  userConfig = (0, _extend2.default)(true, {
50206    container: container,
50207    modules: {
50208      clipboard: true,
50209      keyboard: true,
50210      history: true
50211    }
50212  }, userConfig);
50213  if (!userConfig.theme || userConfig.theme === Quill.DEFAULTS.theme) {
50214    userConfig.theme = _theme2.default;
50215  } else {
50216    userConfig.theme = Quill.import('themes/' + userConfig.theme);
50217    if (userConfig.theme == null) {
50218      throw new Error('Invalid theme ' + userConfig.theme + '. Did you register it?');
50219    }
50220  }
50221  var themeConfig = (0, _extend2.default)(true, {}, userConfig.theme.DEFAULTS);
50222  [themeConfig, userConfig].forEach(function (config) {
50223    config.modules = config.modules || {};
50224    Object.keys(config.modules).forEach(function (module) {
50225      if (config.modules[module] === true) {
50226        config.modules[module] = {};
50227      }
50228    });
50229  });
50230  var moduleNames = Object.keys(themeConfig.modules).concat(Object.keys(userConfig.modules));
50231  var moduleConfig = moduleNames.reduce(function (config, name) {
50232    var moduleClass = Quill.import('modules/' + name);
50233    if (moduleClass == null) {
50234      debug.error('Cannot load ' + name + ' module. Are you sure you registered it?');
50235    } else {
50236      config[name] = moduleClass.DEFAULTS || {};
50237    }
50238    return config;
50239  }, {});
50240  // Special case toolbar shorthand
50241  if (userConfig.modules != null && userConfig.modules.toolbar && userConfig.modules.toolbar.constructor !== Object) {
50242    userConfig.modules.toolbar = {
50243      container: userConfig.modules.toolbar
50244    };
50245  }
50246  userConfig = (0, _extend2.default)(true, {}, Quill.DEFAULTS, { modules: moduleConfig }, themeConfig, userConfig);
50247  ['bounds', 'container', 'scrollingContainer'].forEach(function (key) {
50248    if (typeof userConfig[key] === 'string') {
50249      userConfig[key] = document.querySelector(userConfig[key]);
50250    }
50251  });
50252  userConfig.modules = Object.keys(userConfig.modules).reduce(function (config, name) {
50253    if (userConfig.modules[name]) {
50254      config[name] = userConfig.modules[name];
50255    }
50256    return config;
50257  }, {});
50258  return userConfig;
50259}
50260
50261// Handle selection preservation and TEXT_CHANGE emission
50262// common to modification APIs
50263function modify(modifier, source, index, shift) {
50264  if (this.options.strict && !this.isEnabled() && source === _emitter4.default.sources.USER) {
50265    return new _quillDelta2.default();
50266  }
50267  var range = index == null ? null : this.getSelection();
50268  var oldDelta = this.editor.delta;
50269  var change = modifier();
50270  if (range != null) {
50271    if (index === true) index = range.index;
50272    if (shift == null) {
50273      range = shiftRange(range, change, source);
50274    } else if (shift !== 0) {
50275      range = shiftRange(range, index, shift, source);
50276    }
50277    this.setSelection(range, _emitter4.default.sources.SILENT);
50278  }
50279  if (change.length() > 0) {
50280    var _emitter;
50281
50282    var args = [_emitter4.default.events.TEXT_CHANGE, change, oldDelta, source];
50283    (_emitter = this.emitter).emit.apply(_emitter, [_emitter4.default.events.EDITOR_CHANGE].concat(args));
50284    if (source !== _emitter4.default.sources.SILENT) {
50285      var _emitter2;
50286
50287      (_emitter2 = this.emitter).emit.apply(_emitter2, args);
50288    }
50289  }
50290  return change;
50291}
50292
50293function overload(index, length, name, value, source) {
50294  var formats = {};
50295  if (typeof index.index === 'number' && typeof index.length === 'number') {
50296    // Allow for throwaway end (used by insertText/insertEmbed)
50297    if (typeof length !== 'number') {
50298      source = value, value = name, name = length, length = index.length, index = index.index;
50299    } else {
50300      length = index.length, index = index.index;
50301    }
50302  } else if (typeof length !== 'number') {
50303    source = value, value = name, name = length, length = 0;
50304  }
50305  // Handle format being object, two format name/value strings or excluded
50306  if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') {
50307    formats = name;
50308    source = value;
50309  } else if (typeof name === 'string') {
50310    if (value != null) {
50311      formats[name] = value;
50312    } else {
50313      source = name;
50314    }
50315  }
50316  // Handle optional source
50317  source = source || _emitter4.default.sources.API;
50318  return [index, length, formats, source];
50319}
50320
50321function shiftRange(range, index, length, source) {
50322  if (range == null) return null;
50323  var start = void 0,
50324      end = void 0;
50325  if (index instanceof _quillDelta2.default) {
50326    var _map = [range.index, range.index + range.length].map(function (pos) {
50327      return index.transformPosition(pos, source !== _emitter4.default.sources.USER);
50328    });
50329
50330    var _map2 = _slicedToArray(_map, 2);
50331
50332    start = _map2[0];
50333    end = _map2[1];
50334  } else {
50335    var _map3 = [range.index, range.index + range.length].map(function (pos) {
50336      if (pos < index || pos === index && source === _emitter4.default.sources.USER) return pos;
50337      if (length >= 0) {
50338        return pos + length;
50339      } else {
50340        return Math.max(index, pos + length);
50341      }
50342    });
50343
50344    var _map4 = _slicedToArray(_map3, 2);
50345
50346    start = _map4[0];
50347    end = _map4[1];
50348  }
50349  return new _selection.Range(start, end - start);
50350}
50351
50352exports.expandConfig = expandConfig;
50353exports.overload = overload;
50354exports.default = Quill;
50355
50356/***/ }),
50357/* 6 */
50358/***/ (function(module, exports, __webpack_require__) {
50359
50360"use strict";
50361
50362
50363Object.defineProperty(exports, "__esModule", {
50364  value: true
50365});
50366
50367var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
50368
50369var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
50370
50371var _text = __webpack_require__(7);
50372
50373var _text2 = _interopRequireDefault(_text);
50374
50375var _parchment = __webpack_require__(0);
50376
50377var _parchment2 = _interopRequireDefault(_parchment);
50378
50379function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
50380
50381function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
50382
50383function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
50384
50385function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
50386
50387var Inline = function (_Parchment$Inline) {
50388  _inherits(Inline, _Parchment$Inline);
50389
50390  function Inline() {
50391    _classCallCheck(this, Inline);
50392
50393    return _possibleConstructorReturn(this, (Inline.__proto__ || Object.getPrototypeOf(Inline)).apply(this, arguments));
50394  }
50395
50396  _createClass(Inline, [{
50397    key: 'formatAt',
50398    value: function formatAt(index, length, name, value) {
50399      if (Inline.compare(this.statics.blotName, name) < 0 && _parchment2.default.query(name, _parchment2.default.Scope.BLOT)) {
50400        var blot = this.isolate(index, length);
50401        if (value) {
50402          blot.wrap(name, value);
50403        }
50404      } else {
50405        _get(Inline.prototype.__proto__ || Object.getPrototypeOf(Inline.prototype), 'formatAt', this).call(this, index, length, name, value);
50406      }
50407    }
50408  }, {
50409    key: 'optimize',
50410    value: function optimize(context) {
50411      _get(Inline.prototype.__proto__ || Object.getPrototypeOf(Inline.prototype), 'optimize', this).call(this, context);
50412      if (this.parent instanceof Inline && Inline.compare(this.statics.blotName, this.parent.statics.blotName) > 0) {
50413        var parent = this.parent.isolate(this.offset(), this.length());
50414        this.moveChildren(parent);
50415        parent.wrap(this);
50416      }
50417    }
50418  }], [{
50419    key: 'compare',
50420    value: function compare(self, other) {
50421      var selfIndex = Inline.order.indexOf(self);
50422      var otherIndex = Inline.order.indexOf(other);
50423      if (selfIndex >= 0 || otherIndex >= 0) {
50424        return selfIndex - otherIndex;
50425      } else if (self === other) {
50426        return 0;
50427      } else if (self < other) {
50428        return -1;
50429      } else {
50430        return 1;
50431      }
50432    }
50433  }]);
50434
50435  return Inline;
50436}(_parchment2.default.Inline);
50437
50438Inline.allowedChildren = [Inline, _parchment2.default.Embed, _text2.default];
50439// Lower index means deeper in the DOM tree, since not found (-1) is for embeds
50440Inline.order = ['cursor', 'inline', // Must be lower
50441'underline', 'strike', 'italic', 'bold', 'script', 'link', 'code' // Must be higher
50442];
50443
50444exports.default = Inline;
50445
50446/***/ }),
50447/* 7 */
50448/***/ (function(module, exports, __webpack_require__) {
50449
50450"use strict";
50451
50452
50453Object.defineProperty(exports, "__esModule", {
50454  value: true
50455});
50456
50457var _parchment = __webpack_require__(0);
50458
50459var _parchment2 = _interopRequireDefault(_parchment);
50460
50461function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
50462
50463function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
50464
50465function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
50466
50467function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
50468
50469var TextBlot = function (_Parchment$Text) {
50470  _inherits(TextBlot, _Parchment$Text);
50471
50472  function TextBlot() {
50473    _classCallCheck(this, TextBlot);
50474
50475    return _possibleConstructorReturn(this, (TextBlot.__proto__ || Object.getPrototypeOf(TextBlot)).apply(this, arguments));
50476  }
50477
50478  return TextBlot;
50479}(_parchment2.default.Text);
50480
50481exports.default = TextBlot;
50482
50483/***/ }),
50484/* 8 */
50485/***/ (function(module, exports, __webpack_require__) {
50486
50487"use strict";
50488
50489
50490Object.defineProperty(exports, "__esModule", {
50491  value: true
50492});
50493
50494var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
50495
50496var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
50497
50498var _eventemitter = __webpack_require__(54);
50499
50500var _eventemitter2 = _interopRequireDefault(_eventemitter);
50501
50502var _logger = __webpack_require__(10);
50503
50504var _logger2 = _interopRequireDefault(_logger);
50505
50506function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
50507
50508function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
50509
50510function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
50511
50512function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
50513
50514var debug = (0, _logger2.default)('quill:events');
50515
50516var EVENTS = ['selectionchange', 'mousedown', 'mouseup', 'click'];
50517
50518EVENTS.forEach(function (eventName) {
50519  document.addEventListener(eventName, function () {
50520    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
50521      args[_key] = arguments[_key];
50522    }
50523
50524    [].slice.call(document.querySelectorAll('.ql-container')).forEach(function (node) {
50525      // TODO use WeakMap
50526      if (node.__quill && node.__quill.emitter) {
50527        var _node$__quill$emitter;
50528
50529        (_node$__quill$emitter = node.__quill.emitter).handleDOM.apply(_node$__quill$emitter, args);
50530      }
50531    });
50532  });
50533});
50534
50535var Emitter = function (_EventEmitter) {
50536  _inherits(Emitter, _EventEmitter);
50537
50538  function Emitter() {
50539    _classCallCheck(this, Emitter);
50540
50541    var _this = _possibleConstructorReturn(this, (Emitter.__proto__ || Object.getPrototypeOf(Emitter)).call(this));
50542
50543    _this.listeners = {};
50544    _this.on('error', debug.error);
50545    return _this;
50546  }
50547
50548  _createClass(Emitter, [{
50549    key: 'emit',
50550    value: function emit() {
50551      debug.log.apply(debug, arguments);
50552      _get(Emitter.prototype.__proto__ || Object.getPrototypeOf(Emitter.prototype), 'emit', this).apply(this, arguments);
50553    }
50554  }, {
50555    key: 'handleDOM',
50556    value: function handleDOM(event) {
50557      for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
50558        args[_key2 - 1] = arguments[_key2];
50559      }
50560
50561      (this.listeners[event.type] || []).forEach(function (_ref) {
50562        var node = _ref.node,
50563            handler = _ref.handler;
50564
50565        if (event.target === node || node.contains(event.target)) {
50566          handler.apply(undefined, [event].concat(args));
50567        }
50568      });
50569    }
50570  }, {
50571    key: 'listenDOM',
50572    value: function listenDOM(eventName, node, handler) {
50573      if (!this.listeners[eventName]) {
50574        this.listeners[eventName] = [];
50575      }
50576      this.listeners[eventName].push({ node: node, handler: handler });
50577    }
50578  }]);
50579
50580  return Emitter;
50581}(_eventemitter2.default);
50582
50583Emitter.events = {
50584  EDITOR_CHANGE: 'editor-change',
50585  SCROLL_BEFORE_UPDATE: 'scroll-before-update',
50586  SCROLL_OPTIMIZE: 'scroll-optimize',
50587  SCROLL_UPDATE: 'scroll-update',
50588  SELECTION_CHANGE: 'selection-change',
50589  TEXT_CHANGE: 'text-change'
50590};
50591Emitter.sources = {
50592  API: 'api',
50593  SILENT: 'silent',
50594  USER: 'user'
50595};
50596
50597exports.default = Emitter;
50598
50599/***/ }),
50600/* 9 */
50601/***/ (function(module, exports, __webpack_require__) {
50602
50603"use strict";
50604
50605
50606Object.defineProperty(exports, "__esModule", {
50607  value: true
50608});
50609
50610function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
50611
50612var Module = function Module(quill) {
50613  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
50614
50615  _classCallCheck(this, Module);
50616
50617  this.quill = quill;
50618  this.options = options;
50619};
50620
50621Module.DEFAULTS = {};
50622
50623exports.default = Module;
50624
50625/***/ }),
50626/* 10 */
50627/***/ (function(module, exports, __webpack_require__) {
50628
50629"use strict";
50630
50631
50632Object.defineProperty(exports, "__esModule", {
50633  value: true
50634});
50635var levels = ['error', 'warn', 'log', 'info'];
50636var level = 'warn';
50637
50638function debug(method) {
50639  if (levels.indexOf(method) <= levels.indexOf(level)) {
50640    var _console;
50641
50642    for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
50643      args[_key - 1] = arguments[_key];
50644    }
50645
50646    (_console = console)[method].apply(_console, args); // eslint-disable-line no-console
50647  }
50648}
50649
50650function namespace(ns) {
50651  return levels.reduce(function (logger, method) {
50652    logger[method] = debug.bind(console, method, ns);
50653    return logger;
50654  }, {});
50655}
50656
50657debug.level = namespace.level = function (newLevel) {
50658  level = newLevel;
50659};
50660
50661exports.default = namespace;
50662
50663/***/ }),
50664/* 11 */
50665/***/ (function(module, exports, __webpack_require__) {
50666
50667var pSlice = Array.prototype.slice;
50668var objectKeys = __webpack_require__(52);
50669var isArguments = __webpack_require__(53);
50670
50671var deepEqual = module.exports = function (actual, expected, opts) {
50672  if (!opts) opts = {};
50673  // 7.1. All identical values are equivalent, as determined by ===.
50674  if (actual === expected) {
50675    return true;
50676
50677  } else if (actual instanceof Date && expected instanceof Date) {
50678    return actual.getTime() === expected.getTime();
50679
50680  // 7.3. Other pairs that do not both pass typeof value == 'object',
50681  // equivalence is determined by ==.
50682  } else if (!actual || !expected || typeof actual != 'object' && typeof expected != 'object') {
50683    return opts.strict ? actual === expected : actual == expected;
50684
50685  // 7.4. For all other Object pairs, including Array objects, equivalence is
50686  // determined by having the same number of owned properties (as verified
50687  // with Object.prototype.hasOwnProperty.call), the same set of keys
50688  // (although not necessarily the same order), equivalent values for every
50689  // corresponding key, and an identical 'prototype' property. Note: this
50690  // accounts for both named and indexed properties on Arrays.
50691  } else {
50692    return objEquiv(actual, expected, opts);
50693  }
50694}
50695
50696function isUndefinedOrNull(value) {
50697  return value === null || value === undefined;
50698}
50699
50700function isBuffer (x) {
50701  if (!x || typeof x !== 'object' || typeof x.length !== 'number') return false;
50702  if (typeof x.copy !== 'function' || typeof x.slice !== 'function') {
50703    return false;
50704  }
50705  if (x.length > 0 && typeof x[0] !== 'number') return false;
50706  return true;
50707}
50708
50709function objEquiv(a, b, opts) {
50710  var i, key;
50711  if (isUndefinedOrNull(a) || isUndefinedOrNull(b))
50712    return false;
50713  // an identical 'prototype' property.
50714  if (a.prototype !== b.prototype) return false;
50715  //~~~I've managed to break Object.keys through screwy arguments passing.
50716  //   Converting to array solves the problem.
50717  if (isArguments(a)) {
50718    if (!isArguments(b)) {
50719      return false;
50720    }
50721    a = pSlice.call(a);
50722    b = pSlice.call(b);
50723    return deepEqual(a, b, opts);
50724  }
50725  if (isBuffer(a)) {
50726    if (!isBuffer(b)) {
50727      return false;
50728    }
50729    if (a.length !== b.length) return false;
50730    for (i = 0; i < a.length; i++) {
50731      if (a[i] !== b[i]) return false;
50732    }
50733    return true;
50734  }
50735  try {
50736    var ka = objectKeys(a),
50737        kb = objectKeys(b);
50738  } catch (e) {//happens when one is a string literal and the other isn't
50739    return false;
50740  }
50741  // having the same number of owned properties (keys incorporates
50742  // hasOwnProperty)
50743  if (ka.length != kb.length)
50744    return false;
50745  //the same set of keys (although not necessarily the same order),
50746  ka.sort();
50747  kb.sort();
50748  //~~~cheap key test
50749  for (i = ka.length - 1; i >= 0; i--) {
50750    if (ka[i] != kb[i])
50751      return false;
50752  }
50753  //equivalent values for every corresponding key, and
50754  //~~~possibly expensive deep test
50755  for (i = ka.length - 1; i >= 0; i--) {
50756    key = ka[i];
50757    if (!deepEqual(a[key], b[key], opts)) return false;
50758  }
50759  return typeof a === typeof b;
50760}
50761
50762
50763/***/ }),
50764/* 12 */
50765/***/ (function(module, exports, __webpack_require__) {
50766
50767"use strict";
50768
50769Object.defineProperty(exports, "__esModule", { value: true });
50770var Registry = __webpack_require__(1);
50771var Attributor = /** @class */ (function () {
50772    function Attributor(attrName, keyName, options) {
50773        if (options === void 0) { options = {}; }
50774        this.attrName = attrName;
50775        this.keyName = keyName;
50776        var attributeBit = Registry.Scope.TYPE & Registry.Scope.ATTRIBUTE;
50777        if (options.scope != null) {
50778            // Ignore type bits, force attribute bit
50779            this.scope = (options.scope & Registry.Scope.LEVEL) | attributeBit;
50780        }
50781        else {
50782            this.scope = Registry.Scope.ATTRIBUTE;
50783        }
50784        if (options.whitelist != null)
50785            this.whitelist = options.whitelist;
50786    }
50787    Attributor.keys = function (node) {
50788        return [].map.call(node.attributes, function (item) {
50789            return item.name;
50790        });
50791    };
50792    Attributor.prototype.add = function (node, value) {
50793        if (!this.canAdd(node, value))
50794            return false;
50795        node.setAttribute(this.keyName, value);
50796        return true;
50797    };
50798    Attributor.prototype.canAdd = function (node, value) {
50799        var match = Registry.query(node, Registry.Scope.BLOT & (this.scope | Registry.Scope.TYPE));
50800        if (match == null)
50801            return false;
50802        if (this.whitelist == null)
50803            return true;
50804        if (typeof value === 'string') {
50805            return this.whitelist.indexOf(value.replace(/["']/g, '')) > -1;
50806        }
50807        else {
50808            return this.whitelist.indexOf(value) > -1;
50809        }
50810    };
50811    Attributor.prototype.remove = function (node) {
50812        node.removeAttribute(this.keyName);
50813    };
50814    Attributor.prototype.value = function (node) {
50815        var value = node.getAttribute(this.keyName);
50816        if (this.canAdd(node, value) && value) {
50817            return value;
50818        }
50819        return '';
50820    };
50821    return Attributor;
50822}());
50823exports.default = Attributor;
50824
50825
50826/***/ }),
50827/* 13 */
50828/***/ (function(module, exports, __webpack_require__) {
50829
50830"use strict";
50831
50832
50833Object.defineProperty(exports, "__esModule", {
50834  value: true
50835});
50836exports.default = exports.Code = undefined;
50837
50838var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
50839
50840var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
50841
50842var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
50843
50844var _quillDelta = __webpack_require__(2);
50845
50846var _quillDelta2 = _interopRequireDefault(_quillDelta);
50847
50848var _parchment = __webpack_require__(0);
50849
50850var _parchment2 = _interopRequireDefault(_parchment);
50851
50852var _block = __webpack_require__(4);
50853
50854var _block2 = _interopRequireDefault(_block);
50855
50856var _inline = __webpack_require__(6);
50857
50858var _inline2 = _interopRequireDefault(_inline);
50859
50860var _text = __webpack_require__(7);
50861
50862var _text2 = _interopRequireDefault(_text);
50863
50864function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
50865
50866function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
50867
50868function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
50869
50870function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
50871
50872var Code = function (_Inline) {
50873  _inherits(Code, _Inline);
50874
50875  function Code() {
50876    _classCallCheck(this, Code);
50877
50878    return _possibleConstructorReturn(this, (Code.__proto__ || Object.getPrototypeOf(Code)).apply(this, arguments));
50879  }
50880
50881  return Code;
50882}(_inline2.default);
50883
50884Code.blotName = 'code';
50885Code.tagName = 'CODE';
50886
50887var CodeBlock = function (_Block) {
50888  _inherits(CodeBlock, _Block);
50889
50890  function CodeBlock() {
50891    _classCallCheck(this, CodeBlock);
50892
50893    return _possibleConstructorReturn(this, (CodeBlock.__proto__ || Object.getPrototypeOf(CodeBlock)).apply(this, arguments));
50894  }
50895
50896  _createClass(CodeBlock, [{
50897    key: 'delta',
50898    value: function delta() {
50899      var _this3 = this;
50900
50901      var text = this.domNode.textContent;
50902      if (text.endsWith('\n')) {
50903        // Should always be true
50904        text = text.slice(0, -1);
50905      }
50906      return text.split('\n').reduce(function (delta, frag) {
50907        return delta.insert(frag).insert('\n', _this3.formats());
50908      }, new _quillDelta2.default());
50909    }
50910  }, {
50911    key: 'format',
50912    value: function format(name, value) {
50913      if (name === this.statics.blotName && value) return;
50914
50915      var _descendant = this.descendant(_text2.default, this.length() - 1),
50916          _descendant2 = _slicedToArray(_descendant, 1),
50917          text = _descendant2[0];
50918
50919      if (text != null) {
50920        text.deleteAt(text.length() - 1, 1);
50921      }
50922      _get(CodeBlock.prototype.__proto__ || Object.getPrototypeOf(CodeBlock.prototype), 'format', this).call(this, name, value);
50923    }
50924  }, {
50925    key: 'formatAt',
50926    value: function formatAt(index, length, name, value) {
50927      if (length === 0) return;
50928      if (_parchment2.default.query(name, _parchment2.default.Scope.BLOCK) == null || name === this.statics.blotName && value === this.statics.formats(this.domNode)) {
50929        return;
50930      }
50931      var nextNewline = this.newlineIndex(index);
50932      if (nextNewline < 0 || nextNewline >= index + length) return;
50933      var prevNewline = this.newlineIndex(index, true) + 1;
50934      var isolateLength = nextNewline - prevNewline + 1;
50935      var blot = this.isolate(prevNewline, isolateLength);
50936      var next = blot.next;
50937      blot.format(name, value);
50938      if (next instanceof CodeBlock) {
50939        next.formatAt(0, index - prevNewline + length - isolateLength, name, value);
50940      }
50941    }
50942  }, {
50943    key: 'insertAt',
50944    value: function insertAt(index, value, def) {
50945      if (def != null) return;
50946
50947      var _descendant3 = this.descendant(_text2.default, index),
50948          _descendant4 = _slicedToArray(_descendant3, 2),
50949          text = _descendant4[0],
50950          offset = _descendant4[1];
50951
50952      text.insertAt(offset, value);
50953    }
50954  }, {
50955    key: 'length',
50956    value: function length() {
50957      var length = this.domNode.textContent.length;
50958      if (!this.domNode.textContent.endsWith('\n')) {
50959        return length + 1;
50960      }
50961      return length;
50962    }
50963  }, {
50964    key: 'newlineIndex',
50965    value: function newlineIndex(searchIndex) {
50966      var reverse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
50967
50968      if (!reverse) {
50969        var offset = this.domNode.textContent.slice(searchIndex).indexOf('\n');
50970        return offset > -1 ? searchIndex + offset : -1;
50971      } else {
50972        return this.domNode.textContent.slice(0, searchIndex).lastIndexOf('\n');
50973      }
50974    }
50975  }, {
50976    key: 'optimize',
50977    value: function optimize(context) {
50978      if (!this.domNode.textContent.endsWith('\n')) {
50979        this.appendChild(_parchment2.default.create('text', '\n'));
50980      }
50981      _get(CodeBlock.prototype.__proto__ || Object.getPrototypeOf(CodeBlock.prototype), 'optimize', this).call(this, context);
50982      var next = this.next;
50983      if (next != null && next.prev === this && next.statics.blotName === this.statics.blotName && this.statics.formats(this.domNode) === next.statics.formats(next.domNode)) {
50984        next.optimize(context);
50985        next.moveChildren(this);
50986        next.remove();
50987      }
50988    }
50989  }, {
50990    key: 'replace',
50991    value: function replace(target) {
50992      _get(CodeBlock.prototype.__proto__ || Object.getPrototypeOf(CodeBlock.prototype), 'replace', this).call(this, target);
50993      [].slice.call(this.domNode.querySelectorAll('*')).forEach(function (node) {
50994        var blot = _parchment2.default.find(node);
50995        if (blot == null) {
50996          node.parentNode.removeChild(node);
50997        } else if (blot instanceof _parchment2.default.Embed) {
50998          blot.remove();
50999        } else {
51000          blot.unwrap();
51001        }
51002      });
51003    }
51004  }], [{
51005    key: 'create',
51006    value: function create(value) {
51007      var domNode = _get(CodeBlock.__proto__ || Object.getPrototypeOf(CodeBlock), 'create', this).call(this, value);
51008      domNode.setAttribute('spellcheck', false);
51009      return domNode;
51010    }
51011  }, {
51012    key: 'formats',
51013    value: function formats() {
51014      return true;
51015    }
51016  }]);
51017
51018  return CodeBlock;
51019}(_block2.default);
51020
51021CodeBlock.blotName = 'code-block';
51022CodeBlock.tagName = 'PRE';
51023CodeBlock.TAB = '  ';
51024
51025exports.Code = Code;
51026exports.default = CodeBlock;
51027
51028/***/ }),
51029/* 14 */
51030/***/ (function(module, exports, __webpack_require__) {
51031
51032"use strict";
51033
51034
51035Object.defineProperty(exports, "__esModule", {
51036  value: true
51037});
51038
51039var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
51040
51041var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
51042
51043var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
51044
51045var _quillDelta = __webpack_require__(2);
51046
51047var _quillDelta2 = _interopRequireDefault(_quillDelta);
51048
51049var _op = __webpack_require__(20);
51050
51051var _op2 = _interopRequireDefault(_op);
51052
51053var _parchment = __webpack_require__(0);
51054
51055var _parchment2 = _interopRequireDefault(_parchment);
51056
51057var _code = __webpack_require__(13);
51058
51059var _code2 = _interopRequireDefault(_code);
51060
51061var _cursor = __webpack_require__(24);
51062
51063var _cursor2 = _interopRequireDefault(_cursor);
51064
51065var _block = __webpack_require__(4);
51066
51067var _block2 = _interopRequireDefault(_block);
51068
51069var _break = __webpack_require__(16);
51070
51071var _break2 = _interopRequireDefault(_break);
51072
51073var _clone = __webpack_require__(21);
51074
51075var _clone2 = _interopRequireDefault(_clone);
51076
51077var _deepEqual = __webpack_require__(11);
51078
51079var _deepEqual2 = _interopRequireDefault(_deepEqual);
51080
51081var _extend = __webpack_require__(3);
51082
51083var _extend2 = _interopRequireDefault(_extend);
51084
51085function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
51086
51087function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
51088
51089function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
51090
51091var ASCII = /^[ -~]*$/;
51092
51093var Editor = function () {
51094  function Editor(scroll) {
51095    _classCallCheck(this, Editor);
51096
51097    this.scroll = scroll;
51098    this.delta = this.getDelta();
51099  }
51100
51101  _createClass(Editor, [{
51102    key: 'applyDelta',
51103    value: function applyDelta(delta) {
51104      var _this = this;
51105
51106      var consumeNextNewline = false;
51107      this.scroll.update();
51108      var scrollLength = this.scroll.length();
51109      this.scroll.batchStart();
51110      delta = normalizeDelta(delta);
51111      delta.reduce(function (index, op) {
51112        var length = op.retain || op.delete || op.insert.length || 1;
51113        var attributes = op.attributes || {};
51114        if (op.insert != null) {
51115          if (typeof op.insert === 'string') {
51116            var text = op.insert;
51117            if (text.endsWith('\n') && consumeNextNewline) {
51118              consumeNextNewline = false;
51119              text = text.slice(0, -1);
51120            }
51121            if (index >= scrollLength && !text.endsWith('\n')) {
51122              consumeNextNewline = true;
51123            }
51124            _this.scroll.insertAt(index, text);
51125
51126            var _scroll$line = _this.scroll.line(index),
51127                _scroll$line2 = _slicedToArray(_scroll$line, 2),
51128                line = _scroll$line2[0],
51129                offset = _scroll$line2[1];
51130
51131            var formats = (0, _extend2.default)({}, (0, _block.bubbleFormats)(line));
51132            if (line instanceof _block2.default) {
51133              var _line$descendant = line.descendant(_parchment2.default.Leaf, offset),
51134                  _line$descendant2 = _slicedToArray(_line$descendant, 1),
51135                  leaf = _line$descendant2[0];
51136
51137              formats = (0, _extend2.default)(formats, (0, _block.bubbleFormats)(leaf));
51138            }
51139            attributes = _op2.default.attributes.diff(formats, attributes) || {};
51140          } else if (_typeof(op.insert) === 'object') {
51141            var key = Object.keys(op.insert)[0]; // There should only be one key
51142            if (key == null) return index;
51143            _this.scroll.insertAt(index, key, op.insert[key]);
51144          }
51145          scrollLength += length;
51146        }
51147        Object.keys(attributes).forEach(function (name) {
51148          _this.scroll.formatAt(index, length, name, attributes[name]);
51149        });
51150        return index + length;
51151      }, 0);
51152      delta.reduce(function (index, op) {
51153        if (typeof op.delete === 'number') {
51154          _this.scroll.deleteAt(index, op.delete);
51155          return index;
51156        }
51157        return index + (op.retain || op.insert.length || 1);
51158      }, 0);
51159      this.scroll.batchEnd();
51160      return this.update(delta);
51161    }
51162  }, {
51163    key: 'deleteText',
51164    value: function deleteText(index, length) {
51165      this.scroll.deleteAt(index, length);
51166      return this.update(new _quillDelta2.default().retain(index).delete(length));
51167    }
51168  }, {
51169    key: 'formatLine',
51170    value: function formatLine(index, length) {
51171      var _this2 = this;
51172
51173      var formats = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
51174
51175      this.scroll.update();
51176      Object.keys(formats).forEach(function (format) {
51177        if (_this2.scroll.whitelist != null && !_this2.scroll.whitelist[format]) return;
51178        var lines = _this2.scroll.lines(index, Math.max(length, 1));
51179        var lengthRemaining = length;
51180        lines.forEach(function (line) {
51181          var lineLength = line.length();
51182          if (!(line instanceof _code2.default)) {
51183            line.format(format, formats[format]);
51184          } else {
51185            var codeIndex = index - line.offset(_this2.scroll);
51186            var codeLength = line.newlineIndex(codeIndex + lengthRemaining) - codeIndex + 1;
51187            line.formatAt(codeIndex, codeLength, format, formats[format]);
51188          }
51189          lengthRemaining -= lineLength;
51190        });
51191      });
51192      this.scroll.optimize();
51193      return this.update(new _quillDelta2.default().retain(index).retain(length, (0, _clone2.default)(formats)));
51194    }
51195  }, {
51196    key: 'formatText',
51197    value: function formatText(index, length) {
51198      var _this3 = this;
51199
51200      var formats = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
51201
51202      Object.keys(formats).forEach(function (format) {
51203        _this3.scroll.formatAt(index, length, format, formats[format]);
51204      });
51205      return this.update(new _quillDelta2.default().retain(index).retain(length, (0, _clone2.default)(formats)));
51206    }
51207  }, {
51208    key: 'getContents',
51209    value: function getContents(index, length) {
51210      return this.delta.slice(index, index + length);
51211    }
51212  }, {
51213    key: 'getDelta',
51214    value: function getDelta() {
51215      return this.scroll.lines().reduce(function (delta, line) {
51216        return delta.concat(line.delta());
51217      }, new _quillDelta2.default());
51218    }
51219  }, {
51220    key: 'getFormat',
51221    value: function getFormat(index) {
51222      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
51223
51224      var lines = [],
51225          leaves = [];
51226      if (length === 0) {
51227        this.scroll.path(index).forEach(function (path) {
51228          var _path = _slicedToArray(path, 1),
51229              blot = _path[0];
51230
51231          if (blot instanceof _block2.default) {
51232            lines.push(blot);
51233          } else if (blot instanceof _parchment2.default.Leaf) {
51234            leaves.push(blot);
51235          }
51236        });
51237      } else {
51238        lines = this.scroll.lines(index, length);
51239        leaves = this.scroll.descendants(_parchment2.default.Leaf, index, length);
51240      }
51241      var formatsArr = [lines, leaves].map(function (blots) {
51242        if (blots.length === 0) return {};
51243        var formats = (0, _block.bubbleFormats)(blots.shift());
51244        while (Object.keys(formats).length > 0) {
51245          var blot = blots.shift();
51246          if (blot == null) return formats;
51247          formats = combineFormats((0, _block.bubbleFormats)(blot), formats);
51248        }
51249        return formats;
51250      });
51251      return _extend2.default.apply(_extend2.default, formatsArr);
51252    }
51253  }, {
51254    key: 'getText',
51255    value: function getText(index, length) {
51256      return this.getContents(index, length).filter(function (op) {
51257        return typeof op.insert === 'string';
51258      }).map(function (op) {
51259        return op.insert;
51260      }).join('');
51261    }
51262  }, {
51263    key: 'insertEmbed',
51264    value: function insertEmbed(index, embed, value) {
51265      this.scroll.insertAt(index, embed, value);
51266      return this.update(new _quillDelta2.default().retain(index).insert(_defineProperty({}, embed, value)));
51267    }
51268  }, {
51269    key: 'insertText',
51270    value: function insertText(index, text) {
51271      var _this4 = this;
51272
51273      var formats = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
51274
51275      text = text.replace(/\r\n/g, '\n').replace(/\r/g, '\n');
51276      this.scroll.insertAt(index, text);
51277      Object.keys(formats).forEach(function (format) {
51278        _this4.scroll.formatAt(index, text.length, format, formats[format]);
51279      });
51280      return this.update(new _quillDelta2.default().retain(index).insert(text, (0, _clone2.default)(formats)));
51281    }
51282  }, {
51283    key: 'isBlank',
51284    value: function isBlank() {
51285      if (this.scroll.children.length == 0) return true;
51286      if (this.scroll.children.length > 1) return false;
51287      var block = this.scroll.children.head;
51288      if (block.statics.blotName !== _block2.default.blotName) return false;
51289      if (block.children.length > 1) return false;
51290      return block.children.head instanceof _break2.default;
51291    }
51292  }, {
51293    key: 'removeFormat',
51294    value: function removeFormat(index, length) {
51295      var text = this.getText(index, length);
51296
51297      var _scroll$line3 = this.scroll.line(index + length),
51298          _scroll$line4 = _slicedToArray(_scroll$line3, 2),
51299          line = _scroll$line4[0],
51300          offset = _scroll$line4[1];
51301
51302      var suffixLength = 0,
51303          suffix = new _quillDelta2.default();
51304      if (line != null) {
51305        if (!(line instanceof _code2.default)) {
51306          suffixLength = line.length() - offset;
51307        } else {
51308          suffixLength = line.newlineIndex(offset) - offset + 1;
51309        }
51310        suffix = line.delta().slice(offset, offset + suffixLength - 1).insert('\n');
51311      }
51312      var contents = this.getContents(index, length + suffixLength);
51313      var diff = contents.diff(new _quillDelta2.default().insert(text).concat(suffix));
51314      var delta = new _quillDelta2.default().retain(index).concat(diff);
51315      return this.applyDelta(delta);
51316    }
51317  }, {
51318    key: 'update',
51319    value: function update(change) {
51320      var mutations = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
51321      var cursorIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
51322
51323      var oldDelta = this.delta;
51324      if (mutations.length === 1 && mutations[0].type === 'characterData' && mutations[0].target.data.match(ASCII) && _parchment2.default.find(mutations[0].target)) {
51325        // Optimization for character changes
51326        var textBlot = _parchment2.default.find(mutations[0].target);
51327        var formats = (0, _block.bubbleFormats)(textBlot);
51328        var index = textBlot.offset(this.scroll);
51329        var oldValue = mutations[0].oldValue.replace(_cursor2.default.CONTENTS, '');
51330        var oldText = new _quillDelta2.default().insert(oldValue);
51331        var newText = new _quillDelta2.default().insert(textBlot.value());
51332        var diffDelta = new _quillDelta2.default().retain(index).concat(oldText.diff(newText, cursorIndex));
51333        change = diffDelta.reduce(function (delta, op) {
51334          if (op.insert) {
51335            return delta.insert(op.insert, formats);
51336          } else {
51337            return delta.push(op);
51338          }
51339        }, new _quillDelta2.default());
51340        this.delta = oldDelta.compose(change);
51341      } else {
51342        this.delta = this.getDelta();
51343        if (!change || !(0, _deepEqual2.default)(oldDelta.compose(change), this.delta)) {
51344          change = oldDelta.diff(this.delta, cursorIndex);
51345        }
51346      }
51347      return change;
51348    }
51349  }]);
51350
51351  return Editor;
51352}();
51353
51354function combineFormats(formats, combined) {
51355  return Object.keys(combined).reduce(function (merged, name) {
51356    if (formats[name] == null) return merged;
51357    if (combined[name] === formats[name]) {
51358      merged[name] = combined[name];
51359    } else if (Array.isArray(combined[name])) {
51360      if (combined[name].indexOf(formats[name]) < 0) {
51361        merged[name] = combined[name].concat([formats[name]]);
51362      }
51363    } else {
51364      merged[name] = [combined[name], formats[name]];
51365    }
51366    return merged;
51367  }, {});
51368}
51369
51370function normalizeDelta(delta) {
51371  return delta.reduce(function (delta, op) {
51372    if (op.insert === 1) {
51373      var attributes = (0, _clone2.default)(op.attributes);
51374      delete attributes['image'];
51375      return delta.insert({ image: op.attributes.image }, attributes);
51376    }
51377    if (op.attributes != null && (op.attributes.list === true || op.attributes.bullet === true)) {
51378      op = (0, _clone2.default)(op);
51379      if (op.attributes.list) {
51380        op.attributes.list = 'ordered';
51381      } else {
51382        op.attributes.list = 'bullet';
51383        delete op.attributes.bullet;
51384      }
51385    }
51386    if (typeof op.insert === 'string') {
51387      var text = op.insert.replace(/\r\n/g, '\n').replace(/\r/g, '\n');
51388      return delta.insert(text, op.attributes);
51389    }
51390    return delta.push(op);
51391  }, new _quillDelta2.default());
51392}
51393
51394exports.default = Editor;
51395
51396/***/ }),
51397/* 15 */
51398/***/ (function(module, exports, __webpack_require__) {
51399
51400"use strict";
51401
51402
51403Object.defineProperty(exports, "__esModule", {
51404  value: true
51405});
51406exports.default = exports.Range = undefined;
51407
51408var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
51409
51410var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
51411
51412var _parchment = __webpack_require__(0);
51413
51414var _parchment2 = _interopRequireDefault(_parchment);
51415
51416var _clone = __webpack_require__(21);
51417
51418var _clone2 = _interopRequireDefault(_clone);
51419
51420var _deepEqual = __webpack_require__(11);
51421
51422var _deepEqual2 = _interopRequireDefault(_deepEqual);
51423
51424var _emitter3 = __webpack_require__(8);
51425
51426var _emitter4 = _interopRequireDefault(_emitter3);
51427
51428var _logger = __webpack_require__(10);
51429
51430var _logger2 = _interopRequireDefault(_logger);
51431
51432function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
51433
51434function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
51435
51436function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
51437
51438var debug = (0, _logger2.default)('quill:selection');
51439
51440var Range = function Range(index) {
51441  var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
51442
51443  _classCallCheck(this, Range);
51444
51445  this.index = index;
51446  this.length = length;
51447};
51448
51449var Selection = function () {
51450  function Selection(scroll, emitter) {
51451    var _this = this;
51452
51453    _classCallCheck(this, Selection);
51454
51455    this.emitter = emitter;
51456    this.scroll = scroll;
51457    this.composing = false;
51458    this.mouseDown = false;
51459    this.root = this.scroll.domNode;
51460    this.cursor = _parchment2.default.create('cursor', this);
51461    // savedRange is last non-null range
51462    this.lastRange = this.savedRange = new Range(0, 0);
51463    this.handleComposition();
51464    this.handleDragging();
51465    this.emitter.listenDOM('selectionchange', document, function () {
51466      if (!_this.mouseDown) {
51467        setTimeout(_this.update.bind(_this, _emitter4.default.sources.USER), 1);
51468      }
51469    });
51470    this.emitter.on(_emitter4.default.events.EDITOR_CHANGE, function (type, delta) {
51471      if (type === _emitter4.default.events.TEXT_CHANGE && delta.length() > 0) {
51472        _this.update(_emitter4.default.sources.SILENT);
51473      }
51474    });
51475    this.emitter.on(_emitter4.default.events.SCROLL_BEFORE_UPDATE, function () {
51476      if (!_this.hasFocus()) return;
51477      var native = _this.getNativeRange();
51478      if (native == null) return;
51479      if (native.start.node === _this.cursor.textNode) return; // cursor.restore() will handle
51480      // TODO unclear if this has negative side effects
51481      _this.emitter.once(_emitter4.default.events.SCROLL_UPDATE, function () {
51482        try {
51483          _this.setNativeRange(native.start.node, native.start.offset, native.end.node, native.end.offset);
51484        } catch (ignored) {}
51485      });
51486    });
51487    this.emitter.on(_emitter4.default.events.SCROLL_OPTIMIZE, function (mutations, context) {
51488      if (context.range) {
51489        var _context$range = context.range,
51490            startNode = _context$range.startNode,
51491            startOffset = _context$range.startOffset,
51492            endNode = _context$range.endNode,
51493            endOffset = _context$range.endOffset;
51494
51495        _this.setNativeRange(startNode, startOffset, endNode, endOffset);
51496      }
51497    });
51498    this.update(_emitter4.default.sources.SILENT);
51499  }
51500
51501  _createClass(Selection, [{
51502    key: 'handleComposition',
51503    value: function handleComposition() {
51504      var _this2 = this;
51505
51506      this.root.addEventListener('compositionstart', function () {
51507        _this2.composing = true;
51508      });
51509      this.root.addEventListener('compositionend', function () {
51510        _this2.composing = false;
51511        if (_this2.cursor.parent) {
51512          var range = _this2.cursor.restore();
51513          if (!range) return;
51514          setTimeout(function () {
51515            _this2.setNativeRange(range.startNode, range.startOffset, range.endNode, range.endOffset);
51516          }, 1);
51517        }
51518      });
51519    }
51520  }, {
51521    key: 'handleDragging',
51522    value: function handleDragging() {
51523      var _this3 = this;
51524
51525      this.emitter.listenDOM('mousedown', document.body, function () {
51526        _this3.mouseDown = true;
51527      });
51528      this.emitter.listenDOM('mouseup', document.body, function () {
51529        _this3.mouseDown = false;
51530        _this3.update(_emitter4.default.sources.USER);
51531      });
51532    }
51533  }, {
51534    key: 'focus',
51535    value: function focus() {
51536      if (this.hasFocus()) return;
51537      this.root.focus();
51538      this.setRange(this.savedRange);
51539    }
51540  }, {
51541    key: 'format',
51542    value: function format(_format, value) {
51543      if (this.scroll.whitelist != null && !this.scroll.whitelist[_format]) return;
51544      this.scroll.update();
51545      var nativeRange = this.getNativeRange();
51546      if (nativeRange == null || !nativeRange.native.collapsed || _parchment2.default.query(_format, _parchment2.default.Scope.BLOCK)) return;
51547      if (nativeRange.start.node !== this.cursor.textNode) {
51548        var blot = _parchment2.default.find(nativeRange.start.node, false);
51549        if (blot == null) return;
51550        // TODO Give blot ability to not split
51551        if (blot instanceof _parchment2.default.Leaf) {
51552          var after = blot.split(nativeRange.start.offset);
51553          blot.parent.insertBefore(this.cursor, after);
51554        } else {
51555          blot.insertBefore(this.cursor, nativeRange.start.node); // Should never happen
51556        }
51557        this.cursor.attach();
51558      }
51559      this.cursor.format(_format, value);
51560      this.scroll.optimize();
51561      this.setNativeRange(this.cursor.textNode, this.cursor.textNode.data.length);
51562      this.update();
51563    }
51564  }, {
51565    key: 'getBounds',
51566    value: function getBounds(index) {
51567      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
51568
51569      var scrollLength = this.scroll.length();
51570      index = Math.min(index, scrollLength - 1);
51571      length = Math.min(index + length, scrollLength - 1) - index;
51572      var node = void 0,
51573          _scroll$leaf = this.scroll.leaf(index),
51574          _scroll$leaf2 = _slicedToArray(_scroll$leaf, 2),
51575          leaf = _scroll$leaf2[0],
51576          offset = _scroll$leaf2[1];
51577      if (leaf == null) return null;
51578
51579      var _leaf$position = leaf.position(offset, true);
51580
51581      var _leaf$position2 = _slicedToArray(_leaf$position, 2);
51582
51583      node = _leaf$position2[0];
51584      offset = _leaf$position2[1];
51585
51586      var range = document.createRange();
51587      if (length > 0) {
51588        range.setStart(node, offset);
51589
51590        var _scroll$leaf3 = this.scroll.leaf(index + length);
51591
51592        var _scroll$leaf4 = _slicedToArray(_scroll$leaf3, 2);
51593
51594        leaf = _scroll$leaf4[0];
51595        offset = _scroll$leaf4[1];
51596
51597        if (leaf == null) return null;
51598
51599        var _leaf$position3 = leaf.position(offset, true);
51600
51601        var _leaf$position4 = _slicedToArray(_leaf$position3, 2);
51602
51603        node = _leaf$position4[0];
51604        offset = _leaf$position4[1];
51605
51606        range.setEnd(node, offset);
51607        return range.getBoundingClientRect();
51608      } else {
51609        var side = 'left';
51610        var rect = void 0;
51611        if (node instanceof Text) {
51612          if (offset < node.data.length) {
51613            range.setStart(node, offset);
51614            range.setEnd(node, offset + 1);
51615          } else {
51616            range.setStart(node, offset - 1);
51617            range.setEnd(node, offset);
51618            side = 'right';
51619          }
51620          rect = range.getBoundingClientRect();
51621        } else {
51622          rect = leaf.domNode.getBoundingClientRect();
51623          if (offset > 0) side = 'right';
51624        }
51625        return {
51626          bottom: rect.top + rect.height,
51627          height: rect.height,
51628          left: rect[side],
51629          right: rect[side],
51630          top: rect.top,
51631          width: 0
51632        };
51633      }
51634    }
51635  }, {
51636    key: 'getNativeRange',
51637    value: function getNativeRange() {
51638      var selection = document.getSelection();
51639      if (selection == null || selection.rangeCount <= 0) return null;
51640      var nativeRange = selection.getRangeAt(0);
51641      if (nativeRange == null) return null;
51642      var range = this.normalizeNative(nativeRange);
51643      debug.info('getNativeRange', range);
51644      return range;
51645    }
51646  }, {
51647    key: 'getRange',
51648    value: function getRange() {
51649      var normalized = this.getNativeRange();
51650      if (normalized == null) return [null, null];
51651      var range = this.normalizedToRange(normalized);
51652      return [range, normalized];
51653    }
51654  }, {
51655    key: 'hasFocus',
51656    value: function hasFocus() {
51657      return document.activeElement === this.root;
51658    }
51659  }, {
51660    key: 'normalizedToRange',
51661    value: function normalizedToRange(range) {
51662      var _this4 = this;
51663
51664      var positions = [[range.start.node, range.start.offset]];
51665      if (!range.native.collapsed) {
51666        positions.push([range.end.node, range.end.offset]);
51667      }
51668      var indexes = positions.map(function (position) {
51669        var _position = _slicedToArray(position, 2),
51670            node = _position[0],
51671            offset = _position[1];
51672
51673        var blot = _parchment2.default.find(node, true);
51674        var index = blot.offset(_this4.scroll);
51675        if (offset === 0) {
51676          return index;
51677        } else if (blot instanceof _parchment2.default.Container) {
51678          return index + blot.length();
51679        } else {
51680          return index + blot.index(node, offset);
51681        }
51682      });
51683      var end = Math.min(Math.max.apply(Math, _toConsumableArray(indexes)), this.scroll.length() - 1);
51684      var start = Math.min.apply(Math, [end].concat(_toConsumableArray(indexes)));
51685      return new Range(start, end - start);
51686    }
51687  }, {
51688    key: 'normalizeNative',
51689    value: function normalizeNative(nativeRange) {
51690      if (!contains(this.root, nativeRange.startContainer) || !nativeRange.collapsed && !contains(this.root, nativeRange.endContainer)) {
51691        return null;
51692      }
51693      var range = {
51694        start: { node: nativeRange.startContainer, offset: nativeRange.startOffset },
51695        end: { node: nativeRange.endContainer, offset: nativeRange.endOffset },
51696        native: nativeRange
51697      };
51698      [range.start, range.end].forEach(function (position) {
51699        var node = position.node,
51700            offset = position.offset;
51701        while (!(node instanceof Text) && node.childNodes.length > 0) {
51702          if (node.childNodes.length > offset) {
51703            node = node.childNodes[offset];
51704            offset = 0;
51705          } else if (node.childNodes.length === offset) {
51706            node = node.lastChild;
51707            offset = node instanceof Text ? node.data.length : node.childNodes.length + 1;
51708          } else {
51709            break;
51710          }
51711        }
51712        position.node = node, position.offset = offset;
51713      });
51714      return range;
51715    }
51716  }, {
51717    key: 'rangeToNative',
51718    value: function rangeToNative(range) {
51719      var _this5 = this;
51720
51721      var indexes = range.collapsed ? [range.index] : [range.index, range.index + range.length];
51722      var args = [];
51723      var scrollLength = this.scroll.length();
51724      indexes.forEach(function (index, i) {
51725        index = Math.min(scrollLength - 1, index);
51726        var node = void 0,
51727            _scroll$leaf5 = _this5.scroll.leaf(index),
51728            _scroll$leaf6 = _slicedToArray(_scroll$leaf5, 2),
51729            leaf = _scroll$leaf6[0],
51730            offset = _scroll$leaf6[1];
51731        var _leaf$position5 = leaf.position(offset, i !== 0);
51732
51733        var _leaf$position6 = _slicedToArray(_leaf$position5, 2);
51734
51735        node = _leaf$position6[0];
51736        offset = _leaf$position6[1];
51737
51738        args.push(node, offset);
51739      });
51740      if (args.length < 2) {
51741        args = args.concat(args);
51742      }
51743      return args;
51744    }
51745  }, {
51746    key: 'scrollIntoView',
51747    value: function scrollIntoView(scrollingContainer) {
51748      var range = this.lastRange;
51749      if (range == null) return;
51750      var bounds = this.getBounds(range.index, range.length);
51751      if (bounds == null) return;
51752      var limit = this.scroll.length() - 1;
51753
51754      var _scroll$line = this.scroll.line(Math.min(range.index, limit)),
51755          _scroll$line2 = _slicedToArray(_scroll$line, 1),
51756          first = _scroll$line2[0];
51757
51758      var last = first;
51759      if (range.length > 0) {
51760        var _scroll$line3 = this.scroll.line(Math.min(range.index + range.length, limit));
51761
51762        var _scroll$line4 = _slicedToArray(_scroll$line3, 1);
51763
51764        last = _scroll$line4[0];
51765      }
51766      if (first == null || last == null) return;
51767      var scrollBounds = scrollingContainer.getBoundingClientRect();
51768      if (bounds.top < scrollBounds.top) {
51769        scrollingContainer.scrollTop -= scrollBounds.top - bounds.top;
51770      } else if (bounds.bottom > scrollBounds.bottom) {
51771        scrollingContainer.scrollTop += bounds.bottom - scrollBounds.bottom;
51772      }
51773    }
51774  }, {
51775    key: 'setNativeRange',
51776    value: function setNativeRange(startNode, startOffset) {
51777      var endNode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : startNode;
51778      var endOffset = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : startOffset;
51779      var force = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
51780
51781      debug.info('setNativeRange', startNode, startOffset, endNode, endOffset);
51782      if (startNode != null && (this.root.parentNode == null || startNode.parentNode == null || endNode.parentNode == null)) {
51783        return;
51784      }
51785      var selection = document.getSelection();
51786      if (selection == null) return;
51787      if (startNode != null) {
51788        if (!this.hasFocus()) this.root.focus();
51789        var native = (this.getNativeRange() || {}).native;
51790        if (native == null || force || startNode !== native.startContainer || startOffset !== native.startOffset || endNode !== native.endContainer || endOffset !== native.endOffset) {
51791
51792          if (startNode.tagName == "BR") {
51793            startOffset = [].indexOf.call(startNode.parentNode.childNodes, startNode);
51794            startNode = startNode.parentNode;
51795          }
51796          if (endNode.tagName == "BR") {
51797            endOffset = [].indexOf.call(endNode.parentNode.childNodes, endNode);
51798            endNode = endNode.parentNode;
51799          }
51800          var range = document.createRange();
51801          range.setStart(startNode, startOffset);
51802          range.setEnd(endNode, endOffset);
51803          selection.removeAllRanges();
51804          selection.addRange(range);
51805        }
51806      } else {
51807        selection.removeAllRanges();
51808        this.root.blur();
51809        document.body.focus(); // root.blur() not enough on IE11+Travis+SauceLabs (but not local VMs)
51810      }
51811    }
51812  }, {
51813    key: 'setRange',
51814    value: function setRange(range) {
51815      var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
51816      var source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _emitter4.default.sources.API;
51817
51818      if (typeof force === 'string') {
51819        source = force;
51820        force = false;
51821      }
51822      debug.info('setRange', range);
51823      if (range != null) {
51824        var args = this.rangeToNative(range);
51825        this.setNativeRange.apply(this, _toConsumableArray(args).concat([force]));
51826      } else {
51827        this.setNativeRange(null);
51828      }
51829      this.update(source);
51830    }
51831  }, {
51832    key: 'update',
51833    value: function update() {
51834      var source = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _emitter4.default.sources.USER;
51835
51836      var oldRange = this.lastRange;
51837
51838      var _getRange = this.getRange(),
51839          _getRange2 = _slicedToArray(_getRange, 2),
51840          lastRange = _getRange2[0],
51841          nativeRange = _getRange2[1];
51842
51843      this.lastRange = lastRange;
51844      if (this.lastRange != null) {
51845        this.savedRange = this.lastRange;
51846      }
51847      if (!(0, _deepEqual2.default)(oldRange, this.lastRange)) {
51848        var _emitter;
51849
51850        if (!this.composing && nativeRange != null && nativeRange.native.collapsed && nativeRange.start.node !== this.cursor.textNode) {
51851          this.cursor.restore();
51852        }
51853        var args = [_emitter4.default.events.SELECTION_CHANGE, (0, _clone2.default)(this.lastRange), (0, _clone2.default)(oldRange), source];
51854        (_emitter = this.emitter).emit.apply(_emitter, [_emitter4.default.events.EDITOR_CHANGE].concat(args));
51855        if (source !== _emitter4.default.sources.SILENT) {
51856          var _emitter2;
51857
51858          (_emitter2 = this.emitter).emit.apply(_emitter2, args);
51859        }
51860      }
51861    }
51862  }]);
51863
51864  return Selection;
51865}();
51866
51867function contains(parent, descendant) {
51868  try {
51869    // Firefox inserts inaccessible nodes around video elements
51870    descendant.parentNode;
51871  } catch (e) {
51872    return false;
51873  }
51874  // IE11 has bug with Text nodes
51875  // https://connect.microsoft.com/IE/feedback/details/780874/node-contains-is-incorrect
51876  if (descendant instanceof Text) {
51877    descendant = descendant.parentNode;
51878  }
51879  return parent.contains(descendant);
51880}
51881
51882exports.Range = Range;
51883exports.default = Selection;
51884
51885/***/ }),
51886/* 16 */
51887/***/ (function(module, exports, __webpack_require__) {
51888
51889"use strict";
51890
51891
51892Object.defineProperty(exports, "__esModule", {
51893  value: true
51894});
51895
51896var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
51897
51898var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
51899
51900var _parchment = __webpack_require__(0);
51901
51902var _parchment2 = _interopRequireDefault(_parchment);
51903
51904function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
51905
51906function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
51907
51908function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
51909
51910function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
51911
51912var Break = function (_Parchment$Embed) {
51913  _inherits(Break, _Parchment$Embed);
51914
51915  function Break() {
51916    _classCallCheck(this, Break);
51917
51918    return _possibleConstructorReturn(this, (Break.__proto__ || Object.getPrototypeOf(Break)).apply(this, arguments));
51919  }
51920
51921  _createClass(Break, [{
51922    key: 'insertInto',
51923    value: function insertInto(parent, ref) {
51924      if (parent.children.length === 0) {
51925        _get(Break.prototype.__proto__ || Object.getPrototypeOf(Break.prototype), 'insertInto', this).call(this, parent, ref);
51926      } else {
51927        this.remove();
51928      }
51929    }
51930  }, {
51931    key: 'length',
51932    value: function length() {
51933      return 0;
51934    }
51935  }, {
51936    key: 'value',
51937    value: function value() {
51938      return '';
51939    }
51940  }], [{
51941    key: 'value',
51942    value: function value() {
51943      return undefined;
51944    }
51945  }]);
51946
51947  return Break;
51948}(_parchment2.default.Embed);
51949
51950Break.blotName = 'break';
51951Break.tagName = 'BR';
51952
51953exports.default = Break;
51954
51955/***/ }),
51956/* 17 */
51957/***/ (function(module, exports, __webpack_require__) {
51958
51959"use strict";
51960
51961var __extends = (this && this.__extends) || (function () {
51962    var extendStatics = Object.setPrototypeOf ||
51963        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
51964        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
51965    return function (d, b) {
51966        extendStatics(d, b);
51967        function __() { this.constructor = d; }
51968        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
51969    };
51970})();
51971Object.defineProperty(exports, "__esModule", { value: true });
51972var linked_list_1 = __webpack_require__(44);
51973var shadow_1 = __webpack_require__(30);
51974var Registry = __webpack_require__(1);
51975var ContainerBlot = /** @class */ (function (_super) {
51976    __extends(ContainerBlot, _super);
51977    function ContainerBlot(domNode) {
51978        var _this = _super.call(this, domNode) || this;
51979        _this.build();
51980        return _this;
51981    }
51982    ContainerBlot.prototype.appendChild = function (other) {
51983        this.insertBefore(other);
51984    };
51985    ContainerBlot.prototype.attach = function () {
51986        _super.prototype.attach.call(this);
51987        this.children.forEach(function (child) {
51988            child.attach();
51989        });
51990    };
51991    ContainerBlot.prototype.build = function () {
51992        var _this = this;
51993        this.children = new linked_list_1.default();
51994        // Need to be reversed for if DOM nodes already in order
51995        [].slice
51996            .call(this.domNode.childNodes)
51997            .reverse()
51998            .forEach(function (node) {
51999            try {
52000                var child = makeBlot(node);
52001                _this.insertBefore(child, _this.children.head || undefined);
52002            }
52003            catch (err) {
52004                if (err instanceof Registry.ParchmentError)
52005                    return;
52006                else
52007                    throw err;
52008            }
52009        });
52010    };
52011    ContainerBlot.prototype.deleteAt = function (index, length) {
52012        if (index === 0 && length === this.length()) {
52013            return this.remove();
52014        }
52015        this.children.forEachAt(index, length, function (child, offset, length) {
52016            child.deleteAt(offset, length);
52017        });
52018    };
52019    ContainerBlot.prototype.descendant = function (criteria, index) {
52020        var _a = this.children.find(index), child = _a[0], offset = _a[1];
52021        if ((criteria.blotName == null && criteria(child)) ||
52022            (criteria.blotName != null && child instanceof criteria)) {
52023            return [child, offset];
52024        }
52025        else if (child instanceof ContainerBlot) {
52026            return child.descendant(criteria, offset);
52027        }
52028        else {
52029            return [null, -1];
52030        }
52031    };
52032    ContainerBlot.prototype.descendants = function (criteria, index, length) {
52033        if (index === void 0) { index = 0; }
52034        if (length === void 0) { length = Number.MAX_VALUE; }
52035        var descendants = [];
52036        var lengthLeft = length;
52037        this.children.forEachAt(index, length, function (child, index, length) {
52038            if ((criteria.blotName == null && criteria(child)) ||
52039                (criteria.blotName != null && child instanceof criteria)) {
52040                descendants.push(child);
52041            }
52042            if (child instanceof ContainerBlot) {
52043                descendants = descendants.concat(child.descendants(criteria, index, lengthLeft));
52044            }
52045            lengthLeft -= length;
52046        });
52047        return descendants;
52048    };
52049    ContainerBlot.prototype.detach = function () {
52050        this.children.forEach(function (child) {
52051            child.detach();
52052        });
52053        _super.prototype.detach.call(this);
52054    };
52055    ContainerBlot.prototype.formatAt = function (index, length, name, value) {
52056        this.children.forEachAt(index, length, function (child, offset, length) {
52057            child.formatAt(offset, length, name, value);
52058        });
52059    };
52060    ContainerBlot.prototype.insertAt = function (index, value, def) {
52061        var _a = this.children.find(index), child = _a[0], offset = _a[1];
52062        if (child) {
52063            child.insertAt(offset, value, def);
52064        }
52065        else {
52066            var blot = def == null ? Registry.create('text', value) : Registry.create(value, def);
52067            this.appendChild(blot);
52068        }
52069    };
52070    ContainerBlot.prototype.insertBefore = function (childBlot, refBlot) {
52071        if (this.statics.allowedChildren != null &&
52072            !this.statics.allowedChildren.some(function (child) {
52073                return childBlot instanceof child;
52074            })) {
52075            throw new Registry.ParchmentError("Cannot insert " + childBlot.statics.blotName + " into " + this.statics.blotName);
52076        }
52077        childBlot.insertInto(this, refBlot);
52078    };
52079    ContainerBlot.prototype.length = function () {
52080        return this.children.reduce(function (memo, child) {
52081            return memo + child.length();
52082        }, 0);
52083    };
52084    ContainerBlot.prototype.moveChildren = function (targetParent, refNode) {
52085        this.children.forEach(function (child) {
52086            targetParent.insertBefore(child, refNode);
52087        });
52088    };
52089    ContainerBlot.prototype.optimize = function (context) {
52090        _super.prototype.optimize.call(this, context);
52091        if (this.children.length === 0) {
52092            if (this.statics.defaultChild != null) {
52093                var child = Registry.create(this.statics.defaultChild);
52094                this.appendChild(child);
52095                child.optimize(context);
52096            }
52097            else {
52098                this.remove();
52099            }
52100        }
52101    };
52102    ContainerBlot.prototype.path = function (index, inclusive) {
52103        if (inclusive === void 0) { inclusive = false; }
52104        var _a = this.children.find(index, inclusive), child = _a[0], offset = _a[1];
52105        var position = [[this, index]];
52106        if (child instanceof ContainerBlot) {
52107            return position.concat(child.path(offset, inclusive));
52108        }
52109        else if (child != null) {
52110            position.push([child, offset]);
52111        }
52112        return position;
52113    };
52114    ContainerBlot.prototype.removeChild = function (child) {
52115        this.children.remove(child);
52116    };
52117    ContainerBlot.prototype.replace = function (target) {
52118        if (target instanceof ContainerBlot) {
52119            target.moveChildren(this);
52120        }
52121        _super.prototype.replace.call(this, target);
52122    };
52123    ContainerBlot.prototype.split = function (index, force) {
52124        if (force === void 0) { force = false; }
52125        if (!force) {
52126            if (index === 0)
52127                return this;
52128            if (index === this.length())
52129                return this.next;
52130        }
52131        var after = this.clone();
52132        this.parent.insertBefore(after, this.next);
52133        this.children.forEachAt(index, this.length(), function (child, offset, length) {
52134            child = child.split(offset, force);
52135            after.appendChild(child);
52136        });
52137        return after;
52138    };
52139    ContainerBlot.prototype.unwrap = function () {
52140        this.moveChildren(this.parent, this.next);
52141        this.remove();
52142    };
52143    ContainerBlot.prototype.update = function (mutations, context) {
52144        var _this = this;
52145        var addedNodes = [];
52146        var removedNodes = [];
52147        mutations.forEach(function (mutation) {
52148            if (mutation.target === _this.domNode && mutation.type === 'childList') {
52149                addedNodes.push.apply(addedNodes, mutation.addedNodes);
52150                removedNodes.push.apply(removedNodes, mutation.removedNodes);
52151            }
52152        });
52153        removedNodes.forEach(function (node) {
52154            // Check node has actually been removed
52155            // One exception is Chrome does not immediately remove IFRAMEs
52156            // from DOM but MutationRecord is correct in its reported removal
52157            if (node.parentNode != null &&
52158                // @ts-ignore
52159                node.tagName !== 'IFRAME' &&
52160                document.body.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_CONTAINED_BY) {
52161                return;
52162            }
52163            var blot = Registry.find(node);
52164            if (blot == null)
52165                return;
52166            if (blot.domNode.parentNode == null || blot.domNode.parentNode === _this.domNode) {
52167                blot.detach();
52168            }
52169        });
52170        addedNodes
52171            .filter(function (node) {
52172            return node.parentNode == _this.domNode;
52173        })
52174            .sort(function (a, b) {
52175            if (a === b)
52176                return 0;
52177            if (a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING) {
52178                return 1;
52179            }
52180            return -1;
52181        })
52182            .forEach(function (node) {
52183            var refBlot = null;
52184            if (node.nextSibling != null) {
52185                refBlot = Registry.find(node.nextSibling);
52186            }
52187            var blot = makeBlot(node);
52188            if (blot.next != refBlot || blot.next == null) {
52189                if (blot.parent != null) {
52190                    blot.parent.removeChild(_this);
52191                }
52192                _this.insertBefore(blot, refBlot || undefined);
52193            }
52194        });
52195    };
52196    return ContainerBlot;
52197}(shadow_1.default));
52198function makeBlot(node) {
52199    var blot = Registry.find(node);
52200    if (blot == null) {
52201        try {
52202            blot = Registry.create(node);
52203        }
52204        catch (e) {
52205            blot = Registry.create(Registry.Scope.INLINE);
52206            [].slice.call(node.childNodes).forEach(function (child) {
52207                // @ts-ignore
52208                blot.domNode.appendChild(child);
52209            });
52210            if (node.parentNode) {
52211                node.parentNode.replaceChild(blot.domNode, node);
52212            }
52213            blot.attach();
52214        }
52215    }
52216    return blot;
52217}
52218exports.default = ContainerBlot;
52219
52220
52221/***/ }),
52222/* 18 */
52223/***/ (function(module, exports, __webpack_require__) {
52224
52225"use strict";
52226
52227var __extends = (this && this.__extends) || (function () {
52228    var extendStatics = Object.setPrototypeOf ||
52229        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
52230        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
52231    return function (d, b) {
52232        extendStatics(d, b);
52233        function __() { this.constructor = d; }
52234        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
52235    };
52236})();
52237Object.defineProperty(exports, "__esModule", { value: true });
52238var attributor_1 = __webpack_require__(12);
52239var store_1 = __webpack_require__(31);
52240var container_1 = __webpack_require__(17);
52241var Registry = __webpack_require__(1);
52242var FormatBlot = /** @class */ (function (_super) {
52243    __extends(FormatBlot, _super);
52244    function FormatBlot(domNode) {
52245        var _this = _super.call(this, domNode) || this;
52246        _this.attributes = new store_1.default(_this.domNode);
52247        return _this;
52248    }
52249    FormatBlot.formats = function (domNode) {
52250        if (typeof this.tagName === 'string') {
52251            return true;
52252        }
52253        else if (Array.isArray(this.tagName)) {
52254            return domNode.tagName.toLowerCase();
52255        }
52256        return undefined;
52257    };
52258    FormatBlot.prototype.format = function (name, value) {
52259        var format = Registry.query(name);
52260        if (format instanceof attributor_1.default) {
52261            this.attributes.attribute(format, value);
52262        }
52263        else if (value) {
52264            if (format != null && (name !== this.statics.blotName || this.formats()[name] !== value)) {
52265                this.replaceWith(name, value);
52266            }
52267        }
52268    };
52269    FormatBlot.prototype.formats = function () {
52270        var formats = this.attributes.values();
52271        var format = this.statics.formats(this.domNode);
52272        if (format != null) {
52273            formats[this.statics.blotName] = format;
52274        }
52275        return formats;
52276    };
52277    FormatBlot.prototype.replaceWith = function (name, value) {
52278        var replacement = _super.prototype.replaceWith.call(this, name, value);
52279        this.attributes.copy(replacement);
52280        return replacement;
52281    };
52282    FormatBlot.prototype.update = function (mutations, context) {
52283        var _this = this;
52284        _super.prototype.update.call(this, mutations, context);
52285        if (mutations.some(function (mutation) {
52286            return mutation.target === _this.domNode && mutation.type === 'attributes';
52287        })) {
52288            this.attributes.build();
52289        }
52290    };
52291    FormatBlot.prototype.wrap = function (name, value) {
52292        var wrapper = _super.prototype.wrap.call(this, name, value);
52293        if (wrapper instanceof FormatBlot && wrapper.statics.scope === this.statics.scope) {
52294            this.attributes.move(wrapper);
52295        }
52296        return wrapper;
52297    };
52298    return FormatBlot;
52299}(container_1.default));
52300exports.default = FormatBlot;
52301
52302
52303/***/ }),
52304/* 19 */
52305/***/ (function(module, exports, __webpack_require__) {
52306
52307"use strict";
52308
52309var __extends = (this && this.__extends) || (function () {
52310    var extendStatics = Object.setPrototypeOf ||
52311        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
52312        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
52313    return function (d, b) {
52314        extendStatics(d, b);
52315        function __() { this.constructor = d; }
52316        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
52317    };
52318})();
52319Object.defineProperty(exports, "__esModule", { value: true });
52320var shadow_1 = __webpack_require__(30);
52321var Registry = __webpack_require__(1);
52322var LeafBlot = /** @class */ (function (_super) {
52323    __extends(LeafBlot, _super);
52324    function LeafBlot() {
52325        return _super !== null && _super.apply(this, arguments) || this;
52326    }
52327    LeafBlot.value = function (domNode) {
52328        return true;
52329    };
52330    LeafBlot.prototype.index = function (node, offset) {
52331        if (this.domNode === node ||
52332            this.domNode.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_CONTAINED_BY) {
52333            return Math.min(offset, 1);
52334        }
52335        return -1;
52336    };
52337    LeafBlot.prototype.position = function (index, inclusive) {
52338        var offset = [].indexOf.call(this.parent.domNode.childNodes, this.domNode);
52339        if (index > 0)
52340            offset += 1;
52341        return [this.parent.domNode, offset];
52342    };
52343    LeafBlot.prototype.value = function () {
52344        var _a;
52345        return _a = {}, _a[this.statics.blotName] = this.statics.value(this.domNode) || true, _a;
52346    };
52347    LeafBlot.scope = Registry.Scope.INLINE_BLOT;
52348    return LeafBlot;
52349}(shadow_1.default));
52350exports.default = LeafBlot;
52351
52352
52353/***/ }),
52354/* 20 */
52355/***/ (function(module, exports, __webpack_require__) {
52356
52357var equal = __webpack_require__(11);
52358var extend = __webpack_require__(3);
52359
52360
52361var lib = {
52362  attributes: {
52363    compose: function (a, b, keepNull) {
52364      if (typeof a !== 'object') a = {};
52365      if (typeof b !== 'object') b = {};
52366      var attributes = extend(true, {}, b);
52367      if (!keepNull) {
52368        attributes = Object.keys(attributes).reduce(function (copy, key) {
52369          if (attributes[key] != null) {
52370            copy[key] = attributes[key];
52371          }
52372          return copy;
52373        }, {});
52374      }
52375      for (var key in a) {
52376        if (a[key] !== undefined && b[key] === undefined) {
52377          attributes[key] = a[key];
52378        }
52379      }
52380      return Object.keys(attributes).length > 0 ? attributes : undefined;
52381    },
52382
52383    diff: function(a, b) {
52384      if (typeof a !== 'object') a = {};
52385      if (typeof b !== 'object') b = {};
52386      var attributes = Object.keys(a).concat(Object.keys(b)).reduce(function (attributes, key) {
52387        if (!equal(a[key], b[key])) {
52388          attributes[key] = b[key] === undefined ? null : b[key];
52389        }
52390        return attributes;
52391      }, {});
52392      return Object.keys(attributes).length > 0 ? attributes : undefined;
52393    },
52394
52395    transform: function (a, b, priority) {
52396      if (typeof a !== 'object') return b;
52397      if (typeof b !== 'object') return undefined;
52398      if (!priority) return b;  // b simply overwrites us without priority
52399      var attributes = Object.keys(b).reduce(function (attributes, key) {
52400        if (a[key] === undefined) attributes[key] = b[key];  // null is a valid value
52401        return attributes;
52402      }, {});
52403      return Object.keys(attributes).length > 0 ? attributes : undefined;
52404    }
52405  },
52406
52407  iterator: function (ops) {
52408    return new Iterator(ops);
52409  },
52410
52411  length: function (op) {
52412    if (typeof op['delete'] === 'number') {
52413      return op['delete'];
52414    } else if (typeof op.retain === 'number') {
52415      return op.retain;
52416    } else {
52417      return typeof op.insert === 'string' ? op.insert.length : 1;
52418    }
52419  }
52420};
52421
52422
52423function Iterator(ops) {
52424  this.ops = ops;
52425  this.index = 0;
52426  this.offset = 0;
52427};
52428
52429Iterator.prototype.hasNext = function () {
52430  return this.peekLength() < Infinity;
52431};
52432
52433Iterator.prototype.next = function (length) {
52434  if (!length) length = Infinity;
52435  var nextOp = this.ops[this.index];
52436  if (nextOp) {
52437    var offset = this.offset;
52438    var opLength = lib.length(nextOp)
52439    if (length >= opLength - offset) {
52440      length = opLength - offset;
52441      this.index += 1;
52442      this.offset = 0;
52443    } else {
52444      this.offset += length;
52445    }
52446    if (typeof nextOp['delete'] === 'number') {
52447      return { 'delete': length };
52448    } else {
52449      var retOp = {};
52450      if (nextOp.attributes) {
52451        retOp.attributes = nextOp.attributes;
52452      }
52453      if (typeof nextOp.retain === 'number') {
52454        retOp.retain = length;
52455      } else if (typeof nextOp.insert === 'string') {
52456        retOp.insert = nextOp.insert.substr(offset, length);
52457      } else {
52458        // offset should === 0, length should === 1
52459        retOp.insert = nextOp.insert;
52460      }
52461      return retOp;
52462    }
52463  } else {
52464    return { retain: Infinity };
52465  }
52466};
52467
52468Iterator.prototype.peek = function () {
52469  return this.ops[this.index];
52470};
52471
52472Iterator.prototype.peekLength = function () {
52473  if (this.ops[this.index]) {
52474    // Should never return 0 if our index is being managed correctly
52475    return lib.length(this.ops[this.index]) - this.offset;
52476  } else {
52477    return Infinity;
52478  }
52479};
52480
52481Iterator.prototype.peekType = function () {
52482  if (this.ops[this.index]) {
52483    if (typeof this.ops[this.index]['delete'] === 'number') {
52484      return 'delete';
52485    } else if (typeof this.ops[this.index].retain === 'number') {
52486      return 'retain';
52487    } else {
52488      return 'insert';
52489    }
52490  }
52491  return 'retain';
52492};
52493
52494Iterator.prototype.rest = function () {
52495  if (!this.hasNext()) {
52496    return [];
52497  } else if (this.offset === 0) {
52498    return this.ops.slice(this.index);
52499  } else {
52500    var offset = this.offset;
52501    var index = this.index;
52502    var next = this.next();
52503    var rest = this.ops.slice(this.index);
52504    this.offset = offset;
52505    this.index = index;
52506    return [next].concat(rest);
52507  }
52508};
52509
52510
52511module.exports = lib;
52512
52513
52514/***/ }),
52515/* 21 */
52516/***/ (function(module, exports) {
52517
52518var clone = (function() {
52519'use strict';
52520
52521function _instanceof(obj, type) {
52522  return type != null && obj instanceof type;
52523}
52524
52525var nativeMap;
52526try {
52527  nativeMap = Map;
52528} catch(_) {
52529  // maybe a reference error because no `Map`. Give it a dummy value that no
52530  // value will ever be an instanceof.
52531  nativeMap = function() {};
52532}
52533
52534var nativeSet;
52535try {
52536  nativeSet = Set;
52537} catch(_) {
52538  nativeSet = function() {};
52539}
52540
52541var nativePromise;
52542try {
52543  nativePromise = Promise;
52544} catch(_) {
52545  nativePromise = function() {};
52546}
52547
52548/**
52549 * Clones (copies) an Object using deep copying.
52550 *
52551 * This function supports circular references by default, but if you are certain
52552 * there are no circular references in your object, you can save some CPU time
52553 * by calling clone(obj, false).
52554 *
52555 * Caution: if `circular` is false and `parent` contains circular references,
52556 * your program may enter an infinite loop and crash.
52557 *
52558 * @param `parent` - the object to be cloned
52559 * @param `circular` - set to true if the object to be cloned may contain
52560 *    circular references. (optional - true by default)
52561 * @param `depth` - set to a number if the object is only to be cloned to
52562 *    a particular depth. (optional - defaults to Infinity)
52563 * @param `prototype` - sets the prototype to be used when cloning an object.
52564 *    (optional - defaults to parent prototype).
52565 * @param `includeNonEnumerable` - set to true if the non-enumerable properties
52566 *    should be cloned as well. Non-enumerable properties on the prototype
52567 *    chain will be ignored. (optional - false by default)
52568*/
52569function clone(parent, circular, depth, prototype, includeNonEnumerable) {
52570  if (typeof circular === 'object') {
52571    depth = circular.depth;
52572    prototype = circular.prototype;
52573    includeNonEnumerable = circular.includeNonEnumerable;
52574    circular = circular.circular;
52575  }
52576  // maintain two arrays for circular references, where corresponding parents
52577  // and children have the same index
52578  var allParents = [];
52579  var allChildren = [];
52580
52581  var useBuffer = typeof Buffer != 'undefined';
52582
52583  if (typeof circular == 'undefined')
52584    circular = true;
52585
52586  if (typeof depth == 'undefined')
52587    depth = Infinity;
52588
52589  // recurse this function so we don't reset allParents and allChildren
52590  function _clone(parent, depth) {
52591    // cloning null always returns null
52592    if (parent === null)
52593      return null;
52594
52595    if (depth === 0)
52596      return parent;
52597
52598    var child;
52599    var proto;
52600    if (typeof parent != 'object') {
52601      return parent;
52602    }
52603
52604    if (_instanceof(parent, nativeMap)) {
52605      child = new nativeMap();
52606    } else if (_instanceof(parent, nativeSet)) {
52607      child = new nativeSet();
52608    } else if (_instanceof(parent, nativePromise)) {
52609      child = new nativePromise(function (resolve, reject) {
52610        parent.then(function(value) {
52611          resolve(_clone(value, depth - 1));
52612        }, function(err) {
52613          reject(_clone(err, depth - 1));
52614        });
52615      });
52616    } else if (clone.__isArray(parent)) {
52617      child = [];
52618    } else if (clone.__isRegExp(parent)) {
52619      child = new RegExp(parent.source, __getRegExpFlags(parent));
52620      if (parent.lastIndex) child.lastIndex = parent.lastIndex;
52621    } else if (clone.__isDate(parent)) {
52622      child = new Date(parent.getTime());
52623    } else if (useBuffer && Buffer.isBuffer(parent)) {
52624      if (Buffer.allocUnsafe) {
52625        // Node.js >= 4.5.0
52626        child = Buffer.allocUnsafe(parent.length);
52627      } else {
52628        // Older Node.js versions
52629        child = new Buffer(parent.length);
52630      }
52631      parent.copy(child);
52632      return child;
52633    } else if (_instanceof(parent, Error)) {
52634      child = Object.create(parent);
52635    } else {
52636      if (typeof prototype == 'undefined') {
52637        proto = Object.getPrototypeOf(parent);
52638        child = Object.create(proto);
52639      }
52640      else {
52641        child = Object.create(prototype);
52642        proto = prototype;
52643      }
52644    }
52645
52646    if (circular) {
52647      var index = allParents.indexOf(parent);
52648
52649      if (index != -1) {
52650        return allChildren[index];
52651      }
52652      allParents.push(parent);
52653      allChildren.push(child);
52654    }
52655
52656    if (_instanceof(parent, nativeMap)) {
52657      parent.forEach(function(value, key) {
52658        var keyChild = _clone(key, depth - 1);
52659        var valueChild = _clone(value, depth - 1);
52660        child.set(keyChild, valueChild);
52661      });
52662    }
52663    if (_instanceof(parent, nativeSet)) {
52664      parent.forEach(function(value) {
52665        var entryChild = _clone(value, depth - 1);
52666        child.add(entryChild);
52667      });
52668    }
52669
52670    for (var i in parent) {
52671      var attrs;
52672      if (proto) {
52673        attrs = Object.getOwnPropertyDescriptor(proto, i);
52674      }
52675
52676      if (attrs && attrs.set == null) {
52677        continue;
52678      }
52679      child[i] = _clone(parent[i], depth - 1);
52680    }
52681
52682    if (Object.getOwnPropertySymbols) {
52683      var symbols = Object.getOwnPropertySymbols(parent);
52684      for (var i = 0; i < symbols.length; i++) {
52685        // Don't need to worry about cloning a symbol because it is a primitive,
52686        // like a number or string.
52687        var symbol = symbols[i];
52688        var descriptor = Object.getOwnPropertyDescriptor(parent, symbol);
52689        if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {
52690          continue;
52691        }
52692        child[symbol] = _clone(parent[symbol], depth - 1);
52693        if (!descriptor.enumerable) {
52694          Object.defineProperty(child, symbol, {
52695            enumerable: false
52696          });
52697        }
52698      }
52699    }
52700
52701    if (includeNonEnumerable) {
52702      var allPropertyNames = Object.getOwnPropertyNames(parent);
52703      for (var i = 0; i < allPropertyNames.length; i++) {
52704        var propertyName = allPropertyNames[i];
52705        var descriptor = Object.getOwnPropertyDescriptor(parent, propertyName);
52706        if (descriptor && descriptor.enumerable) {
52707          continue;
52708        }
52709        child[propertyName] = _clone(parent[propertyName], depth - 1);
52710        Object.defineProperty(child, propertyName, {
52711          enumerable: false
52712        });
52713      }
52714    }
52715
52716    return child;
52717  }
52718
52719  return _clone(parent, depth);
52720}
52721
52722/**
52723 * Simple flat clone using prototype, accepts only objects, usefull for property
52724 * override on FLAT configuration object (no nested props).
52725 *
52726 * USE WITH CAUTION! This may not behave as you wish if you do not know how this
52727 * works.
52728 */
52729clone.clonePrototype = function clonePrototype(parent) {
52730  if (parent === null)
52731    return null;
52732
52733  var c = function () {};
52734  c.prototype = parent;
52735  return new c();
52736};
52737
52738// private utility functions
52739
52740function __objToStr(o) {
52741  return Object.prototype.toString.call(o);
52742}
52743clone.__objToStr = __objToStr;
52744
52745function __isDate(o) {
52746  return typeof o === 'object' && __objToStr(o) === '[object Date]';
52747}
52748clone.__isDate = __isDate;
52749
52750function __isArray(o) {
52751  return typeof o === 'object' && __objToStr(o) === '[object Array]';
52752}
52753clone.__isArray = __isArray;
52754
52755function __isRegExp(o) {
52756  return typeof o === 'object' && __objToStr(o) === '[object RegExp]';
52757}
52758clone.__isRegExp = __isRegExp;
52759
52760function __getRegExpFlags(re) {
52761  var flags = '';
52762  if (re.global) flags += 'g';
52763  if (re.ignoreCase) flags += 'i';
52764  if (re.multiline) flags += 'm';
52765  return flags;
52766}
52767clone.__getRegExpFlags = __getRegExpFlags;
52768
52769return clone;
52770})();
52771
52772if (typeof module === 'object' && module.exports) {
52773  module.exports = clone;
52774}
52775
52776
52777/***/ }),
52778/* 22 */
52779/***/ (function(module, exports, __webpack_require__) {
52780
52781"use strict";
52782
52783
52784Object.defineProperty(exports, "__esModule", {
52785  value: true
52786});
52787
52788var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
52789
52790var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
52791
52792var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
52793
52794var _parchment = __webpack_require__(0);
52795
52796var _parchment2 = _interopRequireDefault(_parchment);
52797
52798var _emitter = __webpack_require__(8);
52799
52800var _emitter2 = _interopRequireDefault(_emitter);
52801
52802var _block = __webpack_require__(4);
52803
52804var _block2 = _interopRequireDefault(_block);
52805
52806var _break = __webpack_require__(16);
52807
52808var _break2 = _interopRequireDefault(_break);
52809
52810var _code = __webpack_require__(13);
52811
52812var _code2 = _interopRequireDefault(_code);
52813
52814var _container = __webpack_require__(25);
52815
52816var _container2 = _interopRequireDefault(_container);
52817
52818function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
52819
52820function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
52821
52822function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
52823
52824function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
52825
52826function isLine(blot) {
52827  return blot instanceof _block2.default || blot instanceof _block.BlockEmbed;
52828}
52829
52830var Scroll = function (_Parchment$Scroll) {
52831  _inherits(Scroll, _Parchment$Scroll);
52832
52833  function Scroll(domNode, config) {
52834    _classCallCheck(this, Scroll);
52835
52836    var _this = _possibleConstructorReturn(this, (Scroll.__proto__ || Object.getPrototypeOf(Scroll)).call(this, domNode));
52837
52838    _this.emitter = config.emitter;
52839    if (Array.isArray(config.whitelist)) {
52840      _this.whitelist = config.whitelist.reduce(function (whitelist, format) {
52841        whitelist[format] = true;
52842        return whitelist;
52843      }, {});
52844    }
52845    // Some reason fixes composition issues with character languages in Windows/Chrome, Safari
52846    _this.domNode.addEventListener('DOMNodeInserted', function () {});
52847    _this.optimize();
52848    _this.enable();
52849    return _this;
52850  }
52851
52852  _createClass(Scroll, [{
52853    key: 'batchStart',
52854    value: function batchStart() {
52855      this.batch = true;
52856    }
52857  }, {
52858    key: 'batchEnd',
52859    value: function batchEnd() {
52860      this.batch = false;
52861      this.optimize();
52862    }
52863  }, {
52864    key: 'deleteAt',
52865    value: function deleteAt(index, length) {
52866      var _line = this.line(index),
52867          _line2 = _slicedToArray(_line, 2),
52868          first = _line2[0],
52869          offset = _line2[1];
52870
52871      var _line3 = this.line(index + length),
52872          _line4 = _slicedToArray(_line3, 1),
52873          last = _line4[0];
52874
52875      _get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'deleteAt', this).call(this, index, length);
52876      if (last != null && first !== last && offset > 0) {
52877        if (first instanceof _block.BlockEmbed || last instanceof _block.BlockEmbed) {
52878          this.optimize();
52879          return;
52880        }
52881        if (first instanceof _code2.default) {
52882          var newlineIndex = first.newlineIndex(first.length(), true);
52883          if (newlineIndex > -1) {
52884            first = first.split(newlineIndex + 1);
52885            if (first === last) {
52886              this.optimize();
52887              return;
52888            }
52889          }
52890        } else if (last instanceof _code2.default) {
52891          var _newlineIndex = last.newlineIndex(0);
52892          if (_newlineIndex > -1) {
52893            last.split(_newlineIndex + 1);
52894          }
52895        }
52896        var ref = last.children.head instanceof _break2.default ? null : last.children.head;
52897        first.moveChildren(last, ref);
52898        first.remove();
52899      }
52900      this.optimize();
52901    }
52902  }, {
52903    key: 'enable',
52904    value: function enable() {
52905      var enabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
52906
52907      this.domNode.setAttribute('contenteditable', enabled);
52908    }
52909  }, {
52910    key: 'formatAt',
52911    value: function formatAt(index, length, format, value) {
52912      if (this.whitelist != null && !this.whitelist[format]) return;
52913      _get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'formatAt', this).call(this, index, length, format, value);
52914      this.optimize();
52915    }
52916  }, {
52917    key: 'insertAt',
52918    value: function insertAt(index, value, def) {
52919      if (def != null && this.whitelist != null && !this.whitelist[value]) return;
52920      if (index >= this.length()) {
52921        if (def == null || _parchment2.default.query(value, _parchment2.default.Scope.BLOCK) == null) {
52922          var blot = _parchment2.default.create(this.statics.defaultChild);
52923          this.appendChild(blot);
52924          if (def == null && value.endsWith('\n')) {
52925            value = value.slice(0, -1);
52926          }
52927          blot.insertAt(0, value, def);
52928        } else {
52929          var embed = _parchment2.default.create(value, def);
52930          this.appendChild(embed);
52931        }
52932      } else {
52933        _get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'insertAt', this).call(this, index, value, def);
52934      }
52935      this.optimize();
52936    }
52937  }, {
52938    key: 'insertBefore',
52939    value: function insertBefore(blot, ref) {
52940      if (blot.statics.scope === _parchment2.default.Scope.INLINE_BLOT) {
52941        var wrapper = _parchment2.default.create(this.statics.defaultChild);
52942        wrapper.appendChild(blot);
52943        blot = wrapper;
52944      }
52945      _get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'insertBefore', this).call(this, blot, ref);
52946    }
52947  }, {
52948    key: 'leaf',
52949    value: function leaf(index) {
52950      return this.path(index).pop() || [null, -1];
52951    }
52952  }, {
52953    key: 'line',
52954    value: function line(index) {
52955      if (index === this.length()) {
52956        return this.line(index - 1);
52957      }
52958      return this.descendant(isLine, index);
52959    }
52960  }, {
52961    key: 'lines',
52962    value: function lines() {
52963      var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
52964      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.MAX_VALUE;
52965
52966      var getLines = function getLines(blot, index, length) {
52967        var lines = [],
52968            lengthLeft = length;
52969        blot.children.forEachAt(index, length, function (child, index, length) {
52970          if (isLine(child)) {
52971            lines.push(child);
52972          } else if (child instanceof _parchment2.default.Container) {
52973            lines = lines.concat(getLines(child, index, lengthLeft));
52974          }
52975          lengthLeft -= length;
52976        });
52977        return lines;
52978      };
52979      return getLines(this, index, length);
52980    }
52981  }, {
52982    key: 'optimize',
52983    value: function optimize() {
52984      var mutations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
52985      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
52986
52987      if (this.batch === true) return;
52988      _get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'optimize', this).call(this, mutations, context);
52989      if (mutations.length > 0) {
52990        this.emitter.emit(_emitter2.default.events.SCROLL_OPTIMIZE, mutations, context);
52991      }
52992    }
52993  }, {
52994    key: 'path',
52995    value: function path(index) {
52996      return _get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'path', this).call(this, index).slice(1); // Exclude self
52997    }
52998  }, {
52999    key: 'update',
53000    value: function update(mutations) {
53001      if (this.batch === true) return;
53002      var source = _emitter2.default.sources.USER;
53003      if (typeof mutations === 'string') {
53004        source = mutations;
53005      }
53006      if (!Array.isArray(mutations)) {
53007        mutations = this.observer.takeRecords();
53008      }
53009      if (mutations.length > 0) {
53010        this.emitter.emit(_emitter2.default.events.SCROLL_BEFORE_UPDATE, source, mutations);
53011      }
53012      _get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'update', this).call(this, mutations.concat([])); // pass copy
53013      if (mutations.length > 0) {
53014        this.emitter.emit(_emitter2.default.events.SCROLL_UPDATE, source, mutations);
53015      }
53016    }
53017  }]);
53018
53019  return Scroll;
53020}(_parchment2.default.Scroll);
53021
53022Scroll.blotName = 'scroll';
53023Scroll.className = 'ql-editor';
53024Scroll.tagName = 'DIV';
53025Scroll.defaultChild = 'block';
53026Scroll.allowedChildren = [_block2.default, _block.BlockEmbed, _container2.default];
53027
53028exports.default = Scroll;
53029
53030/***/ }),
53031/* 23 */
53032/***/ (function(module, exports, __webpack_require__) {
53033
53034"use strict";
53035
53036
53037Object.defineProperty(exports, "__esModule", {
53038  value: true
53039});
53040exports.SHORTKEY = exports.default = undefined;
53041
53042var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
53043
53044var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
53045
53046var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
53047
53048var _clone = __webpack_require__(21);
53049
53050var _clone2 = _interopRequireDefault(_clone);
53051
53052var _deepEqual = __webpack_require__(11);
53053
53054var _deepEqual2 = _interopRequireDefault(_deepEqual);
53055
53056var _extend = __webpack_require__(3);
53057
53058var _extend2 = _interopRequireDefault(_extend);
53059
53060var _quillDelta = __webpack_require__(2);
53061
53062var _quillDelta2 = _interopRequireDefault(_quillDelta);
53063
53064var _op = __webpack_require__(20);
53065
53066var _op2 = _interopRequireDefault(_op);
53067
53068var _parchment = __webpack_require__(0);
53069
53070var _parchment2 = _interopRequireDefault(_parchment);
53071
53072var _quill = __webpack_require__(5);
53073
53074var _quill2 = _interopRequireDefault(_quill);
53075
53076var _logger = __webpack_require__(10);
53077
53078var _logger2 = _interopRequireDefault(_logger);
53079
53080var _module = __webpack_require__(9);
53081
53082var _module2 = _interopRequireDefault(_module);
53083
53084function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
53085
53086function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
53087
53088function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
53089
53090function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
53091
53092function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
53093
53094var debug = (0, _logger2.default)('quill:keyboard');
53095
53096var SHORTKEY = /Mac/i.test(navigator.platform) ? 'metaKey' : 'ctrlKey';
53097
53098var Keyboard = function (_Module) {
53099  _inherits(Keyboard, _Module);
53100
53101  _createClass(Keyboard, null, [{
53102    key: 'match',
53103    value: function match(evt, binding) {
53104      binding = normalize(binding);
53105      if (['altKey', 'ctrlKey', 'metaKey', 'shiftKey'].some(function (key) {
53106        return !!binding[key] !== evt[key] && binding[key] !== null;
53107      })) {
53108        return false;
53109      }
53110      return binding.key === (evt.which || evt.keyCode);
53111    }
53112  }]);
53113
53114  function Keyboard(quill, options) {
53115    _classCallCheck(this, Keyboard);
53116
53117    var _this = _possibleConstructorReturn(this, (Keyboard.__proto__ || Object.getPrototypeOf(Keyboard)).call(this, quill, options));
53118
53119    _this.bindings = {};
53120    Object.keys(_this.options.bindings).forEach(function (name) {
53121      if (name === 'list autofill' && quill.scroll.whitelist != null && !quill.scroll.whitelist['list']) {
53122        return;
53123      }
53124      if (_this.options.bindings[name]) {
53125        _this.addBinding(_this.options.bindings[name]);
53126      }
53127    });
53128    _this.addBinding({ key: Keyboard.keys.ENTER, shiftKey: null }, handleEnter);
53129    _this.addBinding({ key: Keyboard.keys.ENTER, metaKey: null, ctrlKey: null, altKey: null }, function () {});
53130    if (/Firefox/i.test(navigator.userAgent)) {
53131      // Need to handle delete and backspace for Firefox in the general case #1171
53132      _this.addBinding({ key: Keyboard.keys.BACKSPACE }, { collapsed: true }, handleBackspace);
53133      _this.addBinding({ key: Keyboard.keys.DELETE }, { collapsed: true }, handleDelete);
53134    } else {
53135      _this.addBinding({ key: Keyboard.keys.BACKSPACE }, { collapsed: true, prefix: /^.?$/ }, handleBackspace);
53136      _this.addBinding({ key: Keyboard.keys.DELETE }, { collapsed: true, suffix: /^.?$/ }, handleDelete);
53137    }
53138    _this.addBinding({ key: Keyboard.keys.BACKSPACE }, { collapsed: false }, handleDeleteRange);
53139    _this.addBinding({ key: Keyboard.keys.DELETE }, { collapsed: false }, handleDeleteRange);
53140    _this.addBinding({ key: Keyboard.keys.BACKSPACE, altKey: null, ctrlKey: null, metaKey: null, shiftKey: null }, { collapsed: true, offset: 0 }, handleBackspace);
53141    _this.listen();
53142    return _this;
53143  }
53144
53145  _createClass(Keyboard, [{
53146    key: 'addBinding',
53147    value: function addBinding(key) {
53148      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
53149      var handler = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
53150
53151      var binding = normalize(key);
53152      if (binding == null || binding.key == null) {
53153        return debug.warn('Attempted to add invalid keyboard binding', binding);
53154      }
53155      if (typeof context === 'function') {
53156        context = { handler: context };
53157      }
53158      if (typeof handler === 'function') {
53159        handler = { handler: handler };
53160      }
53161      binding = (0, _extend2.default)(binding, context, handler);
53162      this.bindings[binding.key] = this.bindings[binding.key] || [];
53163      this.bindings[binding.key].push(binding);
53164    }
53165  }, {
53166    key: 'listen',
53167    value: function listen() {
53168      var _this2 = this;
53169
53170      this.quill.root.addEventListener('keydown', function (evt) {
53171        if (evt.defaultPrevented) return;
53172        var which = evt.which || evt.keyCode;
53173        var bindings = (_this2.bindings[which] || []).filter(function (binding) {
53174          return Keyboard.match(evt, binding);
53175        });
53176        if (bindings.length === 0) return;
53177        var range = _this2.quill.getSelection();
53178        if (range == null || !_this2.quill.hasFocus()) return;
53179
53180        var _quill$getLine = _this2.quill.getLine(range.index),
53181            _quill$getLine2 = _slicedToArray(_quill$getLine, 2),
53182            line = _quill$getLine2[0],
53183            offset = _quill$getLine2[1];
53184
53185        var _quill$getLeaf = _this2.quill.getLeaf(range.index),
53186            _quill$getLeaf2 = _slicedToArray(_quill$getLeaf, 2),
53187            leafStart = _quill$getLeaf2[0],
53188            offsetStart = _quill$getLeaf2[1];
53189
53190        var _ref = range.length === 0 ? [leafStart, offsetStart] : _this2.quill.getLeaf(range.index + range.length),
53191            _ref2 = _slicedToArray(_ref, 2),
53192            leafEnd = _ref2[0],
53193            offsetEnd = _ref2[1];
53194
53195        var prefixText = leafStart instanceof _parchment2.default.Text ? leafStart.value().slice(0, offsetStart) : '';
53196        var suffixText = leafEnd instanceof _parchment2.default.Text ? leafEnd.value().slice(offsetEnd) : '';
53197        var curContext = {
53198          collapsed: range.length === 0,
53199          empty: range.length === 0 && line.length() <= 1,
53200          format: _this2.quill.getFormat(range),
53201          offset: offset,
53202          prefix: prefixText,
53203          suffix: suffixText
53204        };
53205        var prevented = bindings.some(function (binding) {
53206          if (binding.collapsed != null && binding.collapsed !== curContext.collapsed) return false;
53207          if (binding.empty != null && binding.empty !== curContext.empty) return false;
53208          if (binding.offset != null && binding.offset !== curContext.offset) return false;
53209          if (Array.isArray(binding.format)) {
53210            // any format is present
53211            if (binding.format.every(function (name) {
53212              return curContext.format[name] == null;
53213            })) {
53214              return false;
53215            }
53216          } else if (_typeof(binding.format) === 'object') {
53217            // all formats must match
53218            if (!Object.keys(binding.format).every(function (name) {
53219              if (binding.format[name] === true) return curContext.format[name] != null;
53220              if (binding.format[name] === false) return curContext.format[name] == null;
53221              return (0, _deepEqual2.default)(binding.format[name], curContext.format[name]);
53222            })) {
53223              return false;
53224            }
53225          }
53226          if (binding.prefix != null && !binding.prefix.test(curContext.prefix)) return false;
53227          if (binding.suffix != null && !binding.suffix.test(curContext.suffix)) return false;
53228          return binding.handler.call(_this2, range, curContext) !== true;
53229        });
53230        if (prevented) {
53231          evt.preventDefault();
53232        }
53233      });
53234    }
53235  }]);
53236
53237  return Keyboard;
53238}(_module2.default);
53239
53240Keyboard.keys = {
53241  BACKSPACE: 8,
53242  TAB: 9,
53243  ENTER: 13,
53244  ESCAPE: 27,
53245  LEFT: 37,
53246  UP: 38,
53247  RIGHT: 39,
53248  DOWN: 40,
53249  DELETE: 46
53250};
53251
53252Keyboard.DEFAULTS = {
53253  bindings: {
53254    'bold': makeFormatHandler('bold'),
53255    'italic': makeFormatHandler('italic'),
53256    'underline': makeFormatHandler('underline'),
53257    'indent': {
53258      // highlight tab or tab at beginning of list, indent or blockquote
53259      key: Keyboard.keys.TAB,
53260      format: ['blockquote', 'indent', 'list'],
53261      handler: function handler(range, context) {
53262        if (context.collapsed && context.offset !== 0) return true;
53263        this.quill.format('indent', '+1', _quill2.default.sources.USER);
53264      }
53265    },
53266    'outdent': {
53267      key: Keyboard.keys.TAB,
53268      shiftKey: true,
53269      format: ['blockquote', 'indent', 'list'],
53270      // highlight tab or tab at beginning of list, indent or blockquote
53271      handler: function handler(range, context) {
53272        if (context.collapsed && context.offset !== 0) return true;
53273        this.quill.format('indent', '-1', _quill2.default.sources.USER);
53274      }
53275    },
53276    'outdent backspace': {
53277      key: Keyboard.keys.BACKSPACE,
53278      collapsed: true,
53279      shiftKey: null,
53280      metaKey: null,
53281      ctrlKey: null,
53282      altKey: null,
53283      format: ['indent', 'list'],
53284      offset: 0,
53285      handler: function handler(range, context) {
53286        if (context.format.indent != null) {
53287          this.quill.format('indent', '-1', _quill2.default.sources.USER);
53288        } else if (context.format.list != null) {
53289          this.quill.format('list', false, _quill2.default.sources.USER);
53290        }
53291      }
53292    },
53293    'indent code-block': makeCodeBlockHandler(true),
53294    'outdent code-block': makeCodeBlockHandler(false),
53295    'remove tab': {
53296      key: Keyboard.keys.TAB,
53297      shiftKey: true,
53298      collapsed: true,
53299      prefix: /\t$/,
53300      handler: function handler(range) {
53301        this.quill.deleteText(range.index - 1, 1, _quill2.default.sources.USER);
53302      }
53303    },
53304    'tab': {
53305      key: Keyboard.keys.TAB,
53306      handler: function handler(range) {
53307        this.quill.history.cutoff();
53308        var delta = new _quillDelta2.default().retain(range.index).delete(range.length).insert('\t');
53309        this.quill.updateContents(delta, _quill2.default.sources.USER);
53310        this.quill.history.cutoff();
53311        this.quill.setSelection(range.index + 1, _quill2.default.sources.SILENT);
53312      }
53313    },
53314    'list empty enter': {
53315      key: Keyboard.keys.ENTER,
53316      collapsed: true,
53317      format: ['list'],
53318      empty: true,
53319      handler: function handler(range, context) {
53320        this.quill.format('list', false, _quill2.default.sources.USER);
53321        if (context.format.indent) {
53322          this.quill.format('indent', false, _quill2.default.sources.USER);
53323        }
53324      }
53325    },
53326    'checklist enter': {
53327      key: Keyboard.keys.ENTER,
53328      collapsed: true,
53329      format: { list: 'checked' },
53330      handler: function handler(range) {
53331        var _quill$getLine3 = this.quill.getLine(range.index),
53332            _quill$getLine4 = _slicedToArray(_quill$getLine3, 2),
53333            line = _quill$getLine4[0],
53334            offset = _quill$getLine4[1];
53335
53336        var formats = (0, _extend2.default)({}, line.formats(), { list: 'checked' });
53337        var delta = new _quillDelta2.default().retain(range.index).insert('\n', formats).retain(line.length() - offset - 1).retain(1, { list: 'unchecked' });
53338        this.quill.updateContents(delta, _quill2.default.sources.USER);
53339        this.quill.setSelection(range.index + 1, _quill2.default.sources.SILENT);
53340        this.quill.scrollIntoView();
53341      }
53342    },
53343    'header enter': {
53344      key: Keyboard.keys.ENTER,
53345      collapsed: true,
53346      format: ['header'],
53347      suffix: /^$/,
53348      handler: function handler(range, context) {
53349        var _quill$getLine5 = this.quill.getLine(range.index),
53350            _quill$getLine6 = _slicedToArray(_quill$getLine5, 2),
53351            line = _quill$getLine6[0],
53352            offset = _quill$getLine6[1];
53353
53354        var delta = new _quillDelta2.default().retain(range.index).insert('\n', context.format).retain(line.length() - offset - 1).retain(1, { header: null });
53355        this.quill.updateContents(delta, _quill2.default.sources.USER);
53356        this.quill.setSelection(range.index + 1, _quill2.default.sources.SILENT);
53357        this.quill.scrollIntoView();
53358      }
53359    },
53360    'list autofill': {
53361      key: ' ',
53362      collapsed: true,
53363      format: { list: false },
53364      prefix: /^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,
53365      handler: function handler(range, context) {
53366        var length = context.prefix.length;
53367
53368        var _quill$getLine7 = this.quill.getLine(range.index),
53369            _quill$getLine8 = _slicedToArray(_quill$getLine7, 2),
53370            line = _quill$getLine8[0],
53371            offset = _quill$getLine8[1];
53372
53373        if (offset > length) return true;
53374        var value = void 0;
53375        switch (context.prefix.trim()) {
53376          case '[]':case '[ ]':
53377            value = 'unchecked';
53378            break;
53379          case '[x]':
53380            value = 'checked';
53381            break;
53382          case '-':case '*':
53383            value = 'bullet';
53384            break;
53385          default:
53386            value = 'ordered';
53387        }
53388        this.quill.insertText(range.index, ' ', _quill2.default.sources.USER);
53389        this.quill.history.cutoff();
53390        var delta = new _quillDelta2.default().retain(range.index - offset).delete(length + 1).retain(line.length() - 2 - offset).retain(1, { list: value });
53391        this.quill.updateContents(delta, _quill2.default.sources.USER);
53392        this.quill.history.cutoff();
53393        this.quill.setSelection(range.index - length, _quill2.default.sources.SILENT);
53394      }
53395    },
53396    'code exit': {
53397      key: Keyboard.keys.ENTER,
53398      collapsed: true,
53399      format: ['code-block'],
53400      prefix: /\n\n$/,
53401      suffix: /^\s+$/,
53402      handler: function handler(range) {
53403        var _quill$getLine9 = this.quill.getLine(range.index),
53404            _quill$getLine10 = _slicedToArray(_quill$getLine9, 2),
53405            line = _quill$getLine10[0],
53406            offset = _quill$getLine10[1];
53407
53408        var delta = new _quillDelta2.default().retain(range.index + line.length() - offset - 2).retain(1, { 'code-block': null }).delete(1);
53409        this.quill.updateContents(delta, _quill2.default.sources.USER);
53410      }
53411    },
53412    'embed left': makeEmbedArrowHandler(Keyboard.keys.LEFT, false),
53413    'embed left shift': makeEmbedArrowHandler(Keyboard.keys.LEFT, true),
53414    'embed right': makeEmbedArrowHandler(Keyboard.keys.RIGHT, false),
53415    'embed right shift': makeEmbedArrowHandler(Keyboard.keys.RIGHT, true)
53416  }
53417};
53418
53419function makeEmbedArrowHandler(key, shiftKey) {
53420  var _ref3;
53421
53422  var where = key === Keyboard.keys.LEFT ? 'prefix' : 'suffix';
53423  return _ref3 = {
53424    key: key,
53425    shiftKey: shiftKey,
53426    altKey: null
53427  }, _defineProperty(_ref3, where, /^$/), _defineProperty(_ref3, 'handler', function handler(range) {
53428    var index = range.index;
53429    if (key === Keyboard.keys.RIGHT) {
53430      index += range.length + 1;
53431    }
53432
53433    var _quill$getLeaf3 = this.quill.getLeaf(index),
53434        _quill$getLeaf4 = _slicedToArray(_quill$getLeaf3, 1),
53435        leaf = _quill$getLeaf4[0];
53436
53437    if (!(leaf instanceof _parchment2.default.Embed)) return true;
53438    if (key === Keyboard.keys.LEFT) {
53439      if (shiftKey) {
53440        this.quill.setSelection(range.index - 1, range.length + 1, _quill2.default.sources.USER);
53441      } else {
53442        this.quill.setSelection(range.index - 1, _quill2.default.sources.USER);
53443      }
53444    } else {
53445      if (shiftKey) {
53446        this.quill.setSelection(range.index, range.length + 1, _quill2.default.sources.USER);
53447      } else {
53448        this.quill.setSelection(range.index + range.length + 1, _quill2.default.sources.USER);
53449      }
53450    }
53451    return false;
53452  }), _ref3;
53453}
53454
53455function handleBackspace(range, context) {
53456  if (range.index === 0 || this.quill.getLength() <= 1) return;
53457
53458  var _quill$getLine11 = this.quill.getLine(range.index),
53459      _quill$getLine12 = _slicedToArray(_quill$getLine11, 1),
53460      line = _quill$getLine12[0];
53461
53462  var formats = {};
53463  if (context.offset === 0) {
53464    var _quill$getLine13 = this.quill.getLine(range.index - 1),
53465        _quill$getLine14 = _slicedToArray(_quill$getLine13, 1),
53466        prev = _quill$getLine14[0];
53467
53468    if (prev != null && prev.length() > 1) {
53469      var curFormats = line.formats();
53470      var prevFormats = this.quill.getFormat(range.index - 1, 1);
53471      formats = _op2.default.attributes.diff(curFormats, prevFormats) || {};
53472    }
53473  }
53474  // Check for astral symbols
53475  var length = /[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(context.prefix) ? 2 : 1;
53476  this.quill.deleteText(range.index - length, length, _quill2.default.sources.USER);
53477  if (Object.keys(formats).length > 0) {
53478    this.quill.formatLine(range.index - length, length, formats, _quill2.default.sources.USER);
53479  }
53480  this.quill.focus();
53481}
53482
53483function handleDelete(range, context) {
53484  // Check for astral symbols
53485  var length = /^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(context.suffix) ? 2 : 1;
53486  if (range.index >= this.quill.getLength() - length) return;
53487  var formats = {},
53488      nextLength = 0;
53489
53490  var _quill$getLine15 = this.quill.getLine(range.index),
53491      _quill$getLine16 = _slicedToArray(_quill$getLine15, 1),
53492      line = _quill$getLine16[0];
53493
53494  if (context.offset >= line.length() - 1) {
53495    var _quill$getLine17 = this.quill.getLine(range.index + 1),
53496        _quill$getLine18 = _slicedToArray(_quill$getLine17, 1),
53497        next = _quill$getLine18[0];
53498
53499    if (next) {
53500      var curFormats = line.formats();
53501      var nextFormats = this.quill.getFormat(range.index, 1);
53502      formats = _op2.default.attributes.diff(curFormats, nextFormats) || {};
53503      nextLength = next.length();
53504    }
53505  }
53506  this.quill.deleteText(range.index, length, _quill2.default.sources.USER);
53507  if (Object.keys(formats).length > 0) {
53508    this.quill.formatLine(range.index + nextLength - 1, length, formats, _quill2.default.sources.USER);
53509  }
53510}
53511
53512function handleDeleteRange(range) {
53513  var lines = this.quill.getLines(range);
53514  var formats = {};
53515  if (lines.length > 1) {
53516    var firstFormats = lines[0].formats();
53517    var lastFormats = lines[lines.length - 1].formats();
53518    formats = _op2.default.attributes.diff(lastFormats, firstFormats) || {};
53519  }
53520  this.quill.deleteText(range, _quill2.default.sources.USER);
53521  if (Object.keys(formats).length > 0) {
53522    this.quill.formatLine(range.index, 1, formats, _quill2.default.sources.USER);
53523  }
53524  this.quill.setSelection(range.index, _quill2.default.sources.SILENT);
53525  this.quill.focus();
53526}
53527
53528function handleEnter(range, context) {
53529  var _this3 = this;
53530
53531  if (range.length > 0) {
53532    this.quill.scroll.deleteAt(range.index, range.length); // So we do not trigger text-change
53533  }
53534  var lineFormats = Object.keys(context.format).reduce(function (lineFormats, format) {
53535    if (_parchment2.default.query(format, _parchment2.default.Scope.BLOCK) && !Array.isArray(context.format[format])) {
53536      lineFormats[format] = context.format[format];
53537    }
53538    return lineFormats;
53539  }, {});
53540  this.quill.insertText(range.index, '\n', lineFormats, _quill2.default.sources.USER);
53541  // Earlier scroll.deleteAt might have messed up our selection,
53542  // so insertText's built in selection preservation is not reliable
53543  this.quill.setSelection(range.index + 1, _quill2.default.sources.SILENT);
53544  this.quill.focus();
53545  Object.keys(context.format).forEach(function (name) {
53546    if (lineFormats[name] != null) return;
53547    if (Array.isArray(context.format[name])) return;
53548    if (name === 'link') return;
53549    _this3.quill.format(name, context.format[name], _quill2.default.sources.USER);
53550  });
53551}
53552
53553function makeCodeBlockHandler(indent) {
53554  return {
53555    key: Keyboard.keys.TAB,
53556    shiftKey: !indent,
53557    format: { 'code-block': true },
53558    handler: function handler(range) {
53559      var CodeBlock = _parchment2.default.query('code-block');
53560      var index = range.index,
53561          length = range.length;
53562
53563      var _quill$scroll$descend = this.quill.scroll.descendant(CodeBlock, index),
53564          _quill$scroll$descend2 = _slicedToArray(_quill$scroll$descend, 2),
53565          block = _quill$scroll$descend2[0],
53566          offset = _quill$scroll$descend2[1];
53567
53568      if (block == null) return;
53569      var scrollIndex = this.quill.getIndex(block);
53570      var start = block.newlineIndex(offset, true) + 1;
53571      var end = block.newlineIndex(scrollIndex + offset + length);
53572      var lines = block.domNode.textContent.slice(start, end).split('\n');
53573      offset = 0;
53574      lines.forEach(function (line, i) {
53575        if (indent) {
53576          block.insertAt(start + offset, CodeBlock.TAB);
53577          offset += CodeBlock.TAB.length;
53578          if (i === 0) {
53579            index += CodeBlock.TAB.length;
53580          } else {
53581            length += CodeBlock.TAB.length;
53582          }
53583        } else if (line.startsWith(CodeBlock.TAB)) {
53584          block.deleteAt(start + offset, CodeBlock.TAB.length);
53585          offset -= CodeBlock.TAB.length;
53586          if (i === 0) {
53587            index -= CodeBlock.TAB.length;
53588          } else {
53589            length -= CodeBlock.TAB.length;
53590          }
53591        }
53592        offset += line.length + 1;
53593      });
53594      this.quill.update(_quill2.default.sources.USER);
53595      this.quill.setSelection(index, length, _quill2.default.sources.SILENT);
53596    }
53597  };
53598}
53599
53600function makeFormatHandler(format) {
53601  return {
53602    key: format[0].toUpperCase(),
53603    shortKey: true,
53604    handler: function handler(range, context) {
53605      this.quill.format(format, !context.format[format], _quill2.default.sources.USER);
53606    }
53607  };
53608}
53609
53610function normalize(binding) {
53611  if (typeof binding === 'string' || typeof binding === 'number') {
53612    return normalize({ key: binding });
53613  }
53614  if ((typeof binding === 'undefined' ? 'undefined' : _typeof(binding)) === 'object') {
53615    binding = (0, _clone2.default)(binding, false);
53616  }
53617  if (typeof binding.key === 'string') {
53618    if (Keyboard.keys[binding.key.toUpperCase()] != null) {
53619      binding.key = Keyboard.keys[binding.key.toUpperCase()];
53620    } else if (binding.key.length === 1) {
53621      binding.key = binding.key.toUpperCase().charCodeAt(0);
53622    } else {
53623      return null;
53624    }
53625  }
53626  if (binding.shortKey) {
53627    binding[SHORTKEY] = binding.shortKey;
53628    delete binding.shortKey;
53629  }
53630  return binding;
53631}
53632
53633exports.default = Keyboard;
53634exports.SHORTKEY = SHORTKEY;
53635
53636/***/ }),
53637/* 24 */
53638/***/ (function(module, exports, __webpack_require__) {
53639
53640"use strict";
53641
53642
53643Object.defineProperty(exports, "__esModule", {
53644  value: true
53645});
53646
53647var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
53648
53649var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
53650
53651var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
53652
53653var _parchment = __webpack_require__(0);
53654
53655var _parchment2 = _interopRequireDefault(_parchment);
53656
53657var _text = __webpack_require__(7);
53658
53659var _text2 = _interopRequireDefault(_text);
53660
53661function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
53662
53663function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
53664
53665function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
53666
53667function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
53668
53669var Cursor = function (_Parchment$Embed) {
53670  _inherits(Cursor, _Parchment$Embed);
53671
53672  _createClass(Cursor, null, [{
53673    key: 'value',
53674    value: function value() {
53675      return undefined;
53676    }
53677  }]);
53678
53679  function Cursor(domNode, selection) {
53680    _classCallCheck(this, Cursor);
53681
53682    var _this = _possibleConstructorReturn(this, (Cursor.__proto__ || Object.getPrototypeOf(Cursor)).call(this, domNode));
53683
53684    _this.selection = selection;
53685    _this.textNode = document.createTextNode(Cursor.CONTENTS);
53686    _this.domNode.appendChild(_this.textNode);
53687    _this._length = 0;
53688    return _this;
53689  }
53690
53691  _createClass(Cursor, [{
53692    key: 'detach',
53693    value: function detach() {
53694      // super.detach() will also clear domNode.__blot
53695      if (this.parent != null) this.parent.removeChild(this);
53696    }
53697  }, {
53698    key: 'format',
53699    value: function format(name, value) {
53700      if (this._length !== 0) {
53701        return _get(Cursor.prototype.__proto__ || Object.getPrototypeOf(Cursor.prototype), 'format', this).call(this, name, value);
53702      }
53703      var target = this,
53704          index = 0;
53705      while (target != null && target.statics.scope !== _parchment2.default.Scope.BLOCK_BLOT) {
53706        index += target.offset(target.parent);
53707        target = target.parent;
53708      }
53709      if (target != null) {
53710        this._length = Cursor.CONTENTS.length;
53711        target.optimize();
53712        target.formatAt(index, Cursor.CONTENTS.length, name, value);
53713        this._length = 0;
53714      }
53715    }
53716  }, {
53717    key: 'index',
53718    value: function index(node, offset) {
53719      if (node === this.textNode) return 0;
53720      return _get(Cursor.prototype.__proto__ || Object.getPrototypeOf(Cursor.prototype), 'index', this).call(this, node, offset);
53721    }
53722  }, {
53723    key: 'length',
53724    value: function length() {
53725      return this._length;
53726    }
53727  }, {
53728    key: 'position',
53729    value: function position() {
53730      return [this.textNode, this.textNode.data.length];
53731    }
53732  }, {
53733    key: 'remove',
53734    value: function remove() {
53735      _get(Cursor.prototype.__proto__ || Object.getPrototypeOf(Cursor.prototype), 'remove', this).call(this);
53736      this.parent = null;
53737    }
53738  }, {
53739    key: 'restore',
53740    value: function restore() {
53741      if (this.selection.composing || this.parent == null) return;
53742      var textNode = this.textNode;
53743      var range = this.selection.getNativeRange();
53744      var restoreText = void 0,
53745          start = void 0,
53746          end = void 0;
53747      if (range != null && range.start.node === textNode && range.end.node === textNode) {
53748        var _ref = [textNode, range.start.offset, range.end.offset];
53749        restoreText = _ref[0];
53750        start = _ref[1];
53751        end = _ref[2];
53752      }
53753      // Link format will insert text outside of anchor tag
53754      while (this.domNode.lastChild != null && this.domNode.lastChild !== this.textNode) {
53755        this.domNode.parentNode.insertBefore(this.domNode.lastChild, this.domNode);
53756      }
53757      if (this.textNode.data !== Cursor.CONTENTS) {
53758        var text = this.textNode.data.split(Cursor.CONTENTS).join('');
53759        if (this.next instanceof _text2.default) {
53760          restoreText = this.next.domNode;
53761          this.next.insertAt(0, text);
53762          this.textNode.data = Cursor.CONTENTS;
53763        } else {
53764          this.textNode.data = text;
53765          this.parent.insertBefore(_parchment2.default.create(this.textNode), this);
53766          this.textNode = document.createTextNode(Cursor.CONTENTS);
53767          this.domNode.appendChild(this.textNode);
53768        }
53769      }
53770      this.remove();
53771      if (start != null) {
53772        var _map = [start, end].map(function (offset) {
53773          return Math.max(0, Math.min(restoreText.data.length, offset - 1));
53774        });
53775
53776        var _map2 = _slicedToArray(_map, 2);
53777
53778        start = _map2[0];
53779        end = _map2[1];
53780
53781        return {
53782          startNode: restoreText,
53783          startOffset: start,
53784          endNode: restoreText,
53785          endOffset: end
53786        };
53787      }
53788    }
53789  }, {
53790    key: 'update',
53791    value: function update(mutations, context) {
53792      var _this2 = this;
53793
53794      if (mutations.some(function (mutation) {
53795        return mutation.type === 'characterData' && mutation.target === _this2.textNode;
53796      })) {
53797        var range = this.restore();
53798        if (range) context.range = range;
53799      }
53800    }
53801  }, {
53802    key: 'value',
53803    value: function value() {
53804      return '';
53805    }
53806  }]);
53807
53808  return Cursor;
53809}(_parchment2.default.Embed);
53810
53811Cursor.blotName = 'cursor';
53812Cursor.className = 'ql-cursor';
53813Cursor.tagName = 'span';
53814Cursor.CONTENTS = '\uFEFF'; // Zero width no break space
53815
53816
53817exports.default = Cursor;
53818
53819/***/ }),
53820/* 25 */
53821/***/ (function(module, exports, __webpack_require__) {
53822
53823"use strict";
53824
53825
53826Object.defineProperty(exports, "__esModule", {
53827  value: true
53828});
53829
53830var _parchment = __webpack_require__(0);
53831
53832var _parchment2 = _interopRequireDefault(_parchment);
53833
53834var _block = __webpack_require__(4);
53835
53836var _block2 = _interopRequireDefault(_block);
53837
53838function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
53839
53840function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
53841
53842function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
53843
53844function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
53845
53846var Container = function (_Parchment$Container) {
53847  _inherits(Container, _Parchment$Container);
53848
53849  function Container() {
53850    _classCallCheck(this, Container);
53851
53852    return _possibleConstructorReturn(this, (Container.__proto__ || Object.getPrototypeOf(Container)).apply(this, arguments));
53853  }
53854
53855  return Container;
53856}(_parchment2.default.Container);
53857
53858Container.allowedChildren = [_block2.default, _block.BlockEmbed, Container];
53859
53860exports.default = Container;
53861
53862/***/ }),
53863/* 26 */
53864/***/ (function(module, exports, __webpack_require__) {
53865
53866"use strict";
53867
53868
53869Object.defineProperty(exports, "__esModule", {
53870  value: true
53871});
53872exports.ColorStyle = exports.ColorClass = exports.ColorAttributor = undefined;
53873
53874var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
53875
53876var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
53877
53878var _parchment = __webpack_require__(0);
53879
53880var _parchment2 = _interopRequireDefault(_parchment);
53881
53882function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
53883
53884function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
53885
53886function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
53887
53888function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { c
vendor: 17,634 bytes, lines 53888-54391
53888onstructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
53889
53890var ColorAttributor = function (_Parchment$Attributor) {
53891  _inherits(ColorAttributor, _Parchment$Attributor);
53892
53893  function ColorAttributor() {
53894    _classCallCheck(this, ColorAttributor);
53895
53896    return _possibleConstructorReturn(this, (ColorAttributor.__proto__ || Object.getPrototypeOf(ColorAttributor)).apply(this, arguments));
53897  }
53898
53899  _createClass(ColorAttributor, [{
53900    key: 'value',
53901    value: function value(domNode) {
53902      var value = _get(ColorAttributor.prototype.__proto__ || Object.getPrototypeOf(ColorAttributor.prototype), 'value', this).call(this, domNode);
53903      if (!value.startsWith('rgb(')) return value;
53904      value = value.replace(/^[^\d]+/, '').replace(/[^\d]+$/, '');
53905      return '#' + value.split(',').map(function (component) {
53906        return ('00' + parseInt(component).toString(16)).slice(-2);
53907      }).join('');
53908    }
53909  }]);
53910
53911  return ColorAttributor;
53912}(_parchment2.default.Attributor.Style);
53913
53914var ColorClass = new _parchment2.default.Attributor.Class('color', 'ql-color', {
53915  scope: _parchment2.default.Scope.INLINE
53916});
53917var ColorStyle = new ColorAttributor('color', 'color', {
53918  scope: _parchment2.default.Scope.INLINE
53919});
53920
53921exports.ColorAttributor = ColorAttributor;
53922exports.ColorClass = ColorClass;
53923exports.ColorStyle = ColorStyle;
53924
53925/***/ }),
53926/* 27 */
53927/***/ (function(module, exports, __webpack_require__) {
53928
53929"use strict";
53930
53931
53932Object.defineProperty(exports, "__esModule", {
53933  value: true
53934});
53935exports.sanitize = exports.default = undefined;
53936
53937var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
53938
53939var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
53940
53941var _inline = __webpack_require__(6);
53942
53943var _inline2 = _interopRequireDefault(_inline);
53944
53945function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
53946
53947function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
53948
53949function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
53950
53951function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
53952
53953var Link = function (_Inline) {
53954  _inherits(Link, _Inline);
53955
53956  function Link() {
53957    _classCallCheck(this, Link);
53958
53959    return _possibleConstructorReturn(this, (Link.__proto__ || Object.getPrototypeOf(Link)).apply(this, arguments));
53960  }
53961
53962  _createClass(Link, [{
53963    key: 'format',
53964    value: function format(name, value) {
53965      if (name !== this.statics.blotName || !value) return _get(Link.prototype.__proto__ || Object.getPrototypeOf(Link.prototype), 'format', this).call(this, name, value);
53966      value = this.constructor.sanitize(value);
53967      this.domNode.setAttribute('href', value);
53968    }
53969  }], [{
53970    key: 'create',
53971    value: function create(value) {
53972      var node = _get(Link.__proto__ || Object.getPrototypeOf(Link), 'create', this).call(this, value);
53973      value = this.sanitize(value);
53974      node.setAttribute('href', value);
53975      node.setAttribute('rel', 'noopener noreferrer');
53976      node.setAttribute('target', '_blank');
53977      return node;
53978    }
53979  }, {
53980    key: 'formats',
53981    value: function formats(domNode) {
53982      return domNode.getAttribute('href');
53983    }
53984  }, {
53985    key: 'sanitize',
53986    value: function sanitize(url) {
53987      return _sanitize(url, this.PROTOCOL_WHITELIST) ? url : this.SANITIZED_URL;
53988    }
53989  }]);
53990
53991  return Link;
53992}(_inline2.default);
53993
53994Link.blotName = 'link';
53995Link.tagName = 'A';
53996Link.SANITIZED_URL = 'about:blank';
53997Link.PROTOCOL_WHITELIST = ['http', 'https', 'mailto', 'tel'];
53998
53999function _sanitize(url, protocols) {
54000  var anchor = document.createElement('a');
54001  anchor.href = url;
54002  var protocol = anchor.href.slice(0, anchor.href.indexOf(':'));
54003  return protocols.indexOf(protocol) > -1;
54004}
54005
54006exports.default = Link;
54007exports.sanitize = _sanitize;
54008
54009/***/ }),
54010/* 28 */
54011/***/ (function(module, exports, __webpack_require__) {
54012
54013"use strict";
54014
54015
54016Object.defineProperty(exports, "__esModule", {
54017  value: true
54018});
54019
54020var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
54021
54022var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
54023
54024var _keyboard = __webpack_require__(23);
54025
54026var _keyboard2 = _interopRequireDefault(_keyboard);
54027
54028var _dropdown = __webpack_require__(107);
54029
54030var _dropdown2 = _interopRequireDefault(_dropdown);
54031
54032function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
54033
54034function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
54035
54036var optionsCounter = 0;
54037
54038function toggleAriaAttribute(element, attribute) {
54039  element.setAttribute(attribute, !(element.getAttribute(attribute) === 'true'));
54040}
54041
54042var Picker = function () {
54043  function Picker(select) {
54044    var _this = this;
54045
54046    _classCallCheck(this, Picker);
54047
54048    this.select = select;
54049    this.container = document.createElement('span');
54050    this.buildPicker();
54051    this.select.style.display = 'none';
54052    this.select.parentNode.insertBefore(this.container, this.select);
54053
54054    this.label.addEventListener('mousedown', function () {
54055      _this.togglePicker();
54056    });
54057    this.label.addEventListener('keydown', function (event) {
54058      switch (event.keyCode) {
54059        // Allows the "Enter" key to open the picker
54060        case _keyboard2.default.keys.ENTER:
54061          _this.togglePicker();
54062          break;
54063
54064        // Allows the "Escape" key to close the picker
54065        case _keyboard2.default.keys.ESCAPE:
54066          _this.escape();
54067          event.preventDefault();
54068          break;
54069        default:
54070      }
54071    });
54072    this.select.addEventListener('change', this.update.bind(this));
54073  }
54074
54075  _createClass(Picker, [{
54076    key: 'togglePicker',
54077    value: function togglePicker() {
54078      this.container.classList.toggle('ql-expanded');
54079      // Toggle aria-expanded and aria-hidden to make the picker accessible
54080      toggleAriaAttribute(this.label, 'aria-expanded');
54081      toggleAriaAttribute(this.options, 'aria-hidden');
54082    }
54083  }, {
54084    key: 'buildItem',
54085    value: function buildItem(option) {
54086      var _this2 = this;
54087
54088      var item = document.createElement('span');
54089      item.tabIndex = '0';
54090      item.setAttribute('role', 'button');
54091
54092      item.classList.add('ql-picker-item');
54093      if (option.hasAttribute('value')) {
54094        item.setAttribute('data-value', option.getAttribute('value'));
54095      }
54096      if (option.textContent) {
54097        item.setAttribute('data-label', option.textContent);
54098      }
54099      item.addEventListener('click', function () {
54100        _this2.selectItem(item, true);
54101      });
54102      item.addEventListener('keydown', function (event) {
54103        switch (event.keyCode) {
54104          // Allows the "Enter" key to select an item
54105          case _keyboard2.default.keys.ENTER:
54106            _this2.selectItem(item, true);
54107            event.preventDefault();
54108            break;
54109
54110          // Allows the "Escape" key to close the picker
54111          case _keyboard2.default.keys.ESCAPE:
54112            _this2.escape();
54113            event.preventDefault();
54114            break;
54115          default:
54116        }
54117      });
54118
54119      return item;
54120    }
54121  }, {
54122    key: 'buildLabel',
54123    value: function buildLabel() {
54124      var label = document.createElement('span');
54125      label.classList.add('ql-picker-label');
54126      label.innerHTML = _dropdown2.default;
54127      label.tabIndex = '0';
54128      label.setAttribute('role', 'button');
54129      label.setAttribute('aria-expanded', 'false');
54130      this.container.appendChild(label);
54131      return label;
54132    }
54133  }, {
54134    key: 'buildOptions',
54135    value: function buildOptions() {
54136      var _this3 = this;
54137
54138      var options = document.createElement('span');
54139      options.classList.add('ql-picker-options');
54140
54141      // Don't want screen readers to read this until options are visible
54142      options.setAttribute('aria-hidden', 'true');
54143      options.tabIndex = '-1';
54144
54145      // Need a unique id for aria-controls
54146      options.id = 'ql-picker-options-' + optionsCounter;
54147      optionsCounter += 1;
54148      this.label.setAttribute('aria-controls', options.id);
54149
54150      this.options = options;
54151
54152      [].slice.call(this.select.options).forEach(function (option) {
54153        var item = _this3.buildItem(option);
54154        options.appendChild(item);
54155        if (option.selected === true) {
54156          _this3.selectItem(item);
54157        }
54158      });
54159      this.container.appendChild(options);
54160    }
54161  }, {
54162    key: 'buildPicker',
54163    value: function buildPicker() {
54164      var _this4 = this;
54165
54166      [].slice.call(this.select.attributes).forEach(function (item) {
54167        _this4.container.setAttribute(item.name, item.value);
54168      });
54169      this.container.classList.add('ql-picker');
54170      this.label = this.buildLabel();
54171      this.buildOptions();
54172    }
54173  }, {
54174    key: 'escape',
54175    value: function escape() {
54176      var _this5 = this;
54177
54178      // Close menu and return focus to trigger label
54179      this.close();
54180      // Need setTimeout for accessibility to ensure that the browser executes
54181      // focus on the next process thread and after any DOM content changes
54182      setTimeout(function () {
54183        return _this5.label.focus();
54184      }, 1);
54185    }
54186  }, {
54187    key: 'close',
54188    value: function close() {
54189      this.container.classList.remove('ql-expanded');
54190      this.label.setAttribute('aria-expanded', 'false');
54191      this.options.setAttribute('aria-hidden', 'true');
54192    }
54193  }, {
54194    key: 'selectItem',
54195    value: function selectItem(item) {
54196      var trigger = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
54197
54198      var selected = this.container.querySelector('.ql-selected');
54199      if (item === selected) return;
54200      if (selected != null) {
54201        selected.classList.remove('ql-selected');
54202      }
54203      if (item == null) return;
54204      item.classList.add('ql-selected');
54205      this.select.selectedIndex = [].indexOf.call(item.parentNode.children, item);
54206      if (item.hasAttribute('data-value')) {
54207        this.label.setAttribute('data-value', item.getAttribute('data-value'));
54208      } else {
54209        this.label.removeAttribute('data-value');
54210      }
54211      if (item.hasAttribute('data-label')) {
54212        this.label.setAttribute('data-label', item.getAttribute('data-label'));
54213      } else {
54214        this.label.removeAttribute('data-label');
54215      }
54216      if (trigger) {
54217        if (typeof Event === 'function') {
54218          this.select.dispatchEvent(new Event('change'));
54219        } else if ((typeof Event === 'undefined' ? 'undefined' : _typeof(Event)) === 'object') {
54220          // IE11
54221          var event = document.createEvent('Event');
54222          event.initEvent('change', true, true);
54223          this.select.dispatchEvent(event);
54224        }
54225        this.close();
54226      }
54227    }
54228  }, {
54229    key: 'update',
54230    value: function update() {
54231      var option = void 0;
54232      if (this.select.selectedIndex > -1) {
54233        var item = this.container.querySelector('.ql-picker-options').children[this.select.selectedIndex];
54234        option = this.select.options[this.select.selectedIndex];
54235        this.selectItem(item);
54236      } else {
54237        this.selectItem(null);
54238      }
54239      var isActive = option != null && option !== this.select.querySelector('option[selected]');
54240      this.label.classList.toggle('ql-active', isActive);
54241    }
54242  }]);
54243
54244  return Picker;
54245}();
54246
54247exports.default = Picker;
54248
54249/***/ }),
54250/* 29 */
54251/***/ (function(module, exports, __webpack_require__) {
54252
54253"use strict";
54254
54255
54256Object.defineProperty(exports, "__esModule", {
54257  value: true
54258});
54259
54260var _parchment = __webpack_require__(0);
54261
54262var _parchment2 = _interopRequireDefault(_parchment);
54263
54264var _quill = __webpack_require__(5);
54265
54266var _quill2 = _interopRequireDefault(_quill);
54267
54268var _block = __webpack_require__(4);
54269
54270var _block2 = _interopRequireDefault(_block);
54271
54272var _break = __webpack_require__(16);
54273
54274var _break2 = _interopRequireDefault(_break);
54275
54276var _container = __webpack_require__(25);
54277
54278var _container2 = _interopRequireDefault(_container);
54279
54280var _cursor = __webpack_require__(24);
54281
54282var _cursor2 = _interopRequireDefault(_cursor);
54283
54284var _embed = __webpack_require__(35);
54285
54286var _embed2 = _interopRequireDefault(_embed);
54287
54288var _inline = __webpack_require__(6);
54289
54290var _inline2 = _interopRequireDefault(_inline);
54291
54292var _scroll = __webpack_require__(22);
54293
54294var _scroll2 = _interopRequireDefault(_scroll);
54295
54296var _text = __webpack_require__(7);
54297
54298var _text2 = _interopRequireDefault(_text);
54299
54300var _clipboard = __webpack_require__(55);
54301
54302var _clipboard2 = _interopRequireDefault(_clipboard);
54303
54304var _history = __webpack_require__(42);
54305
54306var _history2 = _interopRequireDefault(_history);
54307
54308var _keyboard = __webpack_require__(23);
54309
54310var _keyboard2 = _interopRequireDefault(_keyboard);
54311
54312function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
54313
54314_quill2.default.register({
54315  'blots/block': _block2.default,
54316  'blots/block/embed': _block.BlockEmbed,
54317  'blots/break': _break2.default,
54318  'blots/container': _container2.default,
54319  'blots/cursor': _cursor2.default,
54320  'blots/embed': _embed2.default,
54321  'blots/inline': _inline2.default,
54322  'blots/scroll': _scroll2.default,
54323  'blots/text': _text2.default,
54324
54325  'modules/clipboard': _clipboard2.default,
54326  'modules/history': _history2.default,
54327  'modules/keyboard': _keyboard2.default
54328});
54329
54330_parchment2.default.register(_block2.default, _break2.default, _cursor2.default, _inline2.default, _scroll2.default, _text2.default);
54331
54332exports.default = _quill2.default;
54333
54334/***/ }),
54335/* 30 */
54336/***/ (function(module, exports, __webpack_require__) {
54337
54338"use strict";
54339
54340Object.defineProperty(exports, "__esModule", { value: true });
54341var Registry = __webpack_require__(1);
54342var ShadowBlot = /** @class */ (function () {
54343    function ShadowBlot(domNode) {
54344        this.domNode = domNode;
54345        // @ts-ignore
54346        this.domNode[Registry.DATA_KEY] = { blot: this };
54347    }
54348    Object.defineProperty(ShadowBlot.prototype, "statics", {
54349        // Hack for accessing inherited static methods
54350        get: function () {
54351            return this.constructor;
54352        },
54353        enumerable: true,
54354        configurable: true
54355    });
54356    ShadowBlot.create = function (value) {
54357        if (this.tagName == null) {
54358            throw new Registry.ParchmentError('Blot definition missing tagName');
54359        }
54360        var node;
54361        if (Array.isArray(this.tagName)) {
54362            if (typeof value === 'string') {
54363                value = value.toUpperCase();
54364                if (parseInt(value).toString() === value) {
54365                    value = parseInt(value);
54366                }
54367            }
54368            if (typeof value === 'number') {
54369                node = document.createElement(this.tagName[value - 1]);
54370            }
54371            else if (this.tagName.indexOf(value) > -1) {
54372                node = document.createElement(value);
54373            }
54374            else {
54375                node = document.createElement(this.tagName[0]);
54376            }
54377        }
54378        else {
54379            node = document.createElement(this.tagName);
54380        }
54381        if (this.className) {
54382            node.classList.add(this.className);
54383        }
54384        return node;
54385    };
54386    ShadowBlot.prototype.attach = function () {
54387        if (this.parent != null) {
54388            this.scroll = this.parent.scroll;
54389        }
54390    };
54391    ShadowBlot.prototype.clone = function () {
vendor: 24,653 bytes, lines 54392-55055
54392        var domNode = this.domNode.cloneNode(false);
54393        return Registry.create(domNode);
54394    };
54395    ShadowBlot.prototype.detach = function () {
54396        if (this.parent != null)
54397            this.parent.removeChild(this);
54398        // @ts-ignore
54399        delete this.domNode[Registry.DATA_KEY];
54400    };
54401    ShadowBlot.prototype.deleteAt = function (index, length) {
54402        var blot = this.isolate(index, length);
54403        blot.remove();
54404    };
54405    ShadowBlot.prototype.formatAt = function (index, length, name, value) {
54406        var blot = this.isolate(index, length);
54407        if (Registry.query(name, Registry.Scope.BLOT) != null && value) {
54408            blot.wrap(name, value);
54409        }
54410        else if (Registry.query(name, Registry.Scope.ATTRIBUTE) != null) {
54411            var parent = Registry.create(this.statics.scope);
54412            blot.wrap(parent);
54413            parent.format(name, value);
54414        }
54415    };
54416    ShadowBlot.prototype.insertAt = function (index, value, def) {
54417        var blot = def == null ? Registry.create('text', value) : Registry.create(value, def);
54418        var ref = this.split(index);
54419        this.parent.insertBefore(blot, ref);
54420    };
54421    ShadowBlot.prototype.insertInto = function (parentBlot, refBlot) {
54422        if (refBlot === void 0) { refBlot = null; }
54423        if (this.parent != null) {
54424            this.parent.children.remove(this);
54425        }
54426        var refDomNode = null;
54427        parentBlot.children.insertBefore(this, refBlot);
54428        if (refBlot != null) {
54429            refDomNode = refBlot.domNode;
54430        }
54431        if (this.domNode.parentNode != parentBlot.domNode ||
54432            this.domNode.nextSibling != refDomNode) {
54433            parentBlot.domNode.insertBefore(this.domNode, refDomNode);
54434        }
54435        this.parent = parentBlot;
54436        this.attach();
54437    };
54438    ShadowBlot.prototype.isolate = function (index, length) {
54439        var target = this.split(index);
54440        target.split(length);
54441        return target;
54442    };
54443    ShadowBlot.prototype.length = function () {
54444        return 1;
54445    };
54446    ShadowBlot.prototype.offset = function (root) {
54447        if (root === void 0) { root = this.parent; }
54448        if (this.parent == null || this == root)
54449            return 0;
54450        return this.parent.children.offset(this) + this.parent.offset(root);
54451    };
54452    ShadowBlot.prototype.optimize = function (context) {
54453        // TODO clean up once we use WeakMap
54454        // @ts-ignore
54455        if (this.domNode[Registry.DATA_KEY] != null) {
54456            // @ts-ignore
54457            delete this.domNode[Registry.DATA_KEY].mutations;
54458        }
54459    };
54460    ShadowBlot.prototype.remove = function () {
54461        if (this.domNode.parentNode != null) {
54462            this.domNode.parentNode.removeChild(this.domNode);
54463        }
54464        this.detach();
54465    };
54466    ShadowBlot.prototype.replace = function (target) {
54467        if (target.parent == null)
54468            return;
54469        target.parent.insertBefore(this, target.next);
54470        target.remove();
54471    };
54472    ShadowBlot.prototype.replaceWith = function (name, value) {
54473        var replacement = typeof name === 'string' ? Registry.create(name, value) : name;
54474        replacement.replace(this);
54475        return replacement;
54476    };
54477    ShadowBlot.prototype.split = function (index, force) {
54478        return index === 0 ? this : this.next;
54479    };
54480    ShadowBlot.prototype.update = function (mutations, context) {
54481        // Nothing to do by default
54482    };
54483    ShadowBlot.prototype.wrap = function (name, value) {
54484        var wrapper = typeof name === 'string' ? Registry.create(name, value) : name;
54485        if (this.parent != null) {
54486            this.parent.insertBefore(wrapper, this.next);
54487        }
54488        wrapper.appendChild(this);
54489        return wrapper;
54490    };
54491    ShadowBlot.blotName = 'abstract';
54492    return ShadowBlot;
54493}());
54494exports.default = ShadowBlot;
54495
54496
54497/***/ }),
54498/* 31 */
54499/***/ (function(module, exports, __webpack_require__) {
54500
54501"use strict";
54502
54503Object.defineProperty(exports, "__esModule", { value: true });
54504var attributor_1 = __webpack_require__(12);
54505var class_1 = __webpack_require__(32);
54506var style_1 = __webpack_require__(33);
54507var Registry = __webpack_require__(1);
54508var AttributorStore = /** @class */ (function () {
54509    function AttributorStore(domNode) {
54510        this.attributes = {};
54511        this.domNode = domNode;
54512        this.build();
54513    }
54514    AttributorStore.prototype.attribute = function (attribute, value) {
54515        // verb
54516        if (value) {
54517            if (attribute.add(this.domNode, value)) {
54518                if (attribute.value(this.domNode) != null) {
54519                    this.attributes[attribute.attrName] = attribute;
54520                }
54521                else {
54522                    delete this.attributes[attribute.attrName];
54523                }
54524            }
54525        }
54526        else {
54527            attribute.remove(this.domNode);
54528            delete this.attributes[attribute.attrName];
54529        }
54530    };
54531    AttributorStore.prototype.build = function () {
54532        var _this = this;
54533        this.attributes = {};
54534        var attributes = attributor_1.default.keys(this.domNode);
54535        var classes = class_1.default.keys(this.domNode);
54536        var styles = style_1.default.keys(this.domNode);
54537        attributes
54538            .concat(classes)
54539            .concat(styles)
54540            .forEach(function (name) {
54541            var attr = Registry.query(name, Registry.Scope.ATTRIBUTE);
54542            if (attr instanceof attributor_1.default) {
54543                _this.attributes[attr.attrName] = attr;
54544            }
54545        });
54546    };
54547    AttributorStore.prototype.copy = function (target) {
54548        var _this = this;
54549        Object.keys(this.attributes).forEach(function (key) {
54550            var value = _this.attributes[key].value(_this.domNode);
54551            target.format(key, value);
54552        });
54553    };
54554    AttributorStore.prototype.move = function (target) {
54555        var _this = this;
54556        this.copy(target);
54557        Object.keys(this.attributes).forEach(function (key) {
54558            _this.attributes[key].remove(_this.domNode);
54559        });
54560        this.attributes = {};
54561    };
54562    AttributorStore.prototype.values = function () {
54563        var _this = this;
54564        return Object.keys(this.attributes).reduce(function (attributes, name) {
54565            attributes[name] = _this.attributes[name].value(_this.domNode);
54566            return attributes;
54567        }, {});
54568    };
54569    return AttributorStore;
54570}());
54571exports.default = AttributorStore;
54572
54573
54574/***/ }),
54575/* 32 */
54576/***/ (function(module, exports, __webpack_require__) {
54577
54578"use strict";
54579
54580var __extends = (this && this.__extends) || (function () {
54581    var extendStatics = Object.setPrototypeOf ||
54582        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
54583        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
54584    return function (d, b) {
54585        extendStatics(d, b);
54586        function __() { this.constructor = d; }
54587        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
54588    };
54589})();
54590Object.defineProperty(exports, "__esModule", { value: true });
54591var attributor_1 = __webpack_require__(12);
54592function match(node, prefix) {
54593    var className = node.getAttribute('class') || '';
54594    return className.split(/\s+/).filter(function (name) {
54595        return name.indexOf(prefix + "-") === 0;
54596    });
54597}
54598var ClassAttributor = /** @class */ (function (_super) {
54599    __extends(ClassAttributor, _super);
54600    function ClassAttributor() {
54601        return _super !== null && _super.apply(this, arguments) || this;
54602    }
54603    ClassAttributor.keys = function (node) {
54604        return (node.getAttribute('class') || '').split(/\s+/).map(function (name) {
54605            return name
54606                .split('-')
54607                .slice(0, -1)
54608                .join('-');
54609        });
54610    };
54611    ClassAttributor.prototype.add = function (node, value) {
54612        if (!this.canAdd(node, value))
54613            return false;
54614        this.remove(node);
54615        node.classList.add(this.keyName + "-" + value);
54616        return true;
54617    };
54618    ClassAttributor.prototype.remove = function (node) {
54619        var matches = match(node, this.keyName);
54620        matches.forEach(function (name) {
54621            node.classList.remove(name);
54622        });
54623        if (node.classList.length === 0) {
54624            node.removeAttribute('class');
54625        }
54626    };
54627    ClassAttributor.prototype.value = function (node) {
54628        var result = match(node, this.keyName)[0] || '';
54629        var value = result.slice(this.keyName.length + 1); // +1 for hyphen
54630        return this.canAdd(node, value) ? value : '';
54631    };
54632    return ClassAttributor;
54633}(attributor_1.default));
54634exports.default = ClassAttributor;
54635
54636
54637/***/ }),
54638/* 33 */
54639/***/ (function(module, exports, __webpack_require__) {
54640
54641"use strict";
54642
54643var __extends = (this && this.__extends) || (function () {
54644    var extendStatics = Object.setPrototypeOf ||
54645        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
54646        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
54647    return function (d, b) {
54648        extendStatics(d, b);
54649        function __() { this.constructor = d; }
54650        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
54651    };
54652})();
54653Object.defineProperty(exports, "__esModule", { value: true });
54654var attributor_1 = __webpack_require__(12);
54655function camelize(name) {
54656    var parts = name.split('-');
54657    var rest = parts
54658        .slice(1)
54659        .map(function (part) {
54660        return part[0].toUpperCase() + part.slice(1);
54661    })
54662        .join('');
54663    return parts[0] + rest;
54664}
54665var StyleAttributor = /** @class */ (function (_super) {
54666    __extends(StyleAttributor, _super);
54667    function StyleAttributor() {
54668        return _super !== null && _super.apply(this, arguments) || this;
54669    }
54670    StyleAttributor.keys = function (node) {
54671        return (node.getAttribute('style') || '').split(';').map(function (value) {
54672            var arr = value.split(':');
54673            return arr[0].trim();
54674        });
54675    };
54676    StyleAttributor.prototype.add = function (node, value) {
54677        if (!this.canAdd(node, value))
54678            return false;
54679        // @ts-ignore
54680        node.style[camelize(this.keyName)] = value;
54681        return true;
54682    };
54683    StyleAttributor.prototype.remove = function (node) {
54684        // @ts-ignore
54685        node.style[camelize(this.keyName)] = '';
54686        if (!node.getAttribute('style')) {
54687            node.removeAttribute('style');
54688        }
54689    };
54690    StyleAttributor.prototype.value = function (node) {
54691        // @ts-ignore
54692        var value = node.style[camelize(this.keyName)];
54693        return this.canAdd(node, value) ? value : '';
54694    };
54695    return StyleAttributor;
54696}(attributor_1.default));
54697exports.default = StyleAttributor;
54698
54699
54700/***/ }),
54701/* 34 */
54702/***/ (function(module, exports, __webpack_require__) {
54703
54704"use strict";
54705
54706
54707Object.defineProperty(exports, "__esModule", {
54708  value: true
54709});
54710
54711var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
54712
54713function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
54714
54715var Theme = function () {
54716  function Theme(quill, options) {
54717    _classCallCheck(this, Theme);
54718
54719    this.quill = quill;
54720    this.options = options;
54721    this.modules = {};
54722  }
54723
54724  _createClass(Theme, [{
54725    key: 'init',
54726    value: function init() {
54727      var _this = this;
54728
54729      Object.keys(this.options.modules).forEach(function (name) {
54730        if (_this.modules[name] == null) {
54731          _this.addModule(name);
54732        }
54733      });
54734    }
54735  }, {
54736    key: 'addModule',
54737    value: function addModule(name) {
54738      var moduleClass = this.quill.constructor.import('modules/' + name);
54739      this.modules[name] = new moduleClass(this.quill, this.options.modules[name] || {});
54740      return this.modules[name];
54741    }
54742  }]);
54743
54744  return Theme;
54745}();
54746
54747Theme.DEFAULTS = {
54748  modules: {}
54749};
54750Theme.themes = {
54751  'default': Theme
54752};
54753
54754exports.default = Theme;
54755
54756/***/ }),
54757/* 35 */
54758/***/ (function(module, exports, __webpack_require__) {
54759
54760"use strict";
54761
54762
54763Object.defineProperty(exports, "__esModule", {
54764  value: true
54765});
54766
54767var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
54768
54769var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
54770
54771var _parchment = __webpack_require__(0);
54772
54773var _parchment2 = _interopRequireDefault(_parchment);
54774
54775var _text = __webpack_require__(7);
54776
54777var _text2 = _interopRequireDefault(_text);
54778
54779function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
54780
54781function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
54782
54783function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
54784
54785function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
54786
54787var GUARD_TEXT = '\uFEFF';
54788
54789var Embed = function (_Parchment$Embed) {
54790  _inherits(Embed, _Parchment$Embed);
54791
54792  function Embed(node) {
54793    _classCallCheck(this, Embed);
54794
54795    var _this = _possibleConstructorReturn(this, (Embed.__proto__ || Object.getPrototypeOf(Embed)).call(this, node));
54796
54797    _this.contentNode = document.createElement('span');
54798    _this.contentNode.setAttribute('contenteditable', false);
54799    [].slice.call(_this.domNode.childNodes).forEach(function (childNode) {
54800      _this.contentNode.appendChild(childNode);
54801    });
54802    _this.leftGuard = document.createTextNode(GUARD_TEXT);
54803    _this.rightGuard = document.createTextNode(GUARD_TEXT);
54804    _this.domNode.appendChild(_this.leftGuard);
54805    _this.domNode.appendChild(_this.contentNode);
54806    _this.domNode.appendChild(_this.rightGuard);
54807    return _this;
54808  }
54809
54810  _createClass(Embed, [{
54811    key: 'index',
54812    value: function index(node, offset) {
54813      if (node === this.leftGuard) return 0;
54814      if (node === this.rightGuard) return 1;
54815      return _get(Embed.prototype.__proto__ || Object.getPrototypeOf(Embed.prototype), 'index', this).call(this, node, offset);
54816    }
54817  }, {
54818    key: 'restore',
54819    value: function restore(node) {
54820      var range = void 0,
54821          textNode = void 0;
54822      var text = node.data.split(GUARD_TEXT).join('');
54823      if (node === this.leftGuard) {
54824        if (this.prev instanceof _text2.default) {
54825          var prevLength = this.prev.length();
54826          this.prev.insertAt(prevLength, text);
54827          range = {
54828            startNode: this.prev.domNode,
54829            startOffset: prevLength + text.length
54830          };
54831        } else {
54832          textNode = document.createTextNode(text);
54833          this.parent.insertBefore(_parchment2.default.create(textNode), this);
54834          range = {
54835            startNode: textNode,
54836            startOffset: text.length
54837          };
54838        }
54839      } else if (node === this.rightGuard) {
54840        if (this.next instanceof _text2.default) {
54841          this.next.insertAt(0, text);
54842          range = {
54843            startNode: this.next.domNode,
54844            startOffset: text.length
54845          };
54846        } else {
54847          textNode = document.createTextNode(text);
54848          this.parent.insertBefore(_parchment2.default.create(textNode), this.next);
54849          range = {
54850            startNode: textNode,
54851            startOffset: text.length
54852          };
54853        }
54854      }
54855      node.data = GUARD_TEXT;
54856      return range;
54857    }
54858  }, {
54859    key: 'update',
54860    value: function update(mutations, context) {
54861      var _this2 = this;
54862
54863      mutations.forEach(function (mutation) {
54864        if (mutation.type === 'characterData' && (mutation.target === _this2.leftGuard || mutation.target === _this2.rightGuard)) {
54865          var range = _this2.restore(mutation.target);
54866          if (range) context.range = range;
54867        }
54868      });
54869    }
54870  }]);
54871
54872  return Embed;
54873}(_parchment2.default.Embed);
54874
54875exports.default = Embed;
54876
54877/***/ }),
54878/* 36 */
54879/***/ (function(module, exports, __webpack_require__) {
54880
54881"use strict";
54882
54883
54884Object.defineProperty(exports, "__esModule", {
54885  value: true
54886});
54887exports.AlignStyle = exports.AlignClass = exports.AlignAttribute = undefined;
54888
54889var _parchment = __webpack_require__(0);
54890
54891var _parchment2 = _interopRequireDefault(_parchment);
54892
54893function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
54894
54895var config = {
54896  scope: _parchment2.default.Scope.BLOCK,
54897  whitelist: ['right', 'center', 'justify']
54898};
54899
54900var AlignAttribute = new _parchment2.default.Attributor.Attribute('align', 'align', config);
54901var AlignClass = new _parchment2.default.Attributor.Class('align', 'ql-align', config);
54902var AlignStyle = new _parchment2.default.Attributor.Style('align', 'text-align', config);
54903
54904exports.AlignAttribute = AlignAttribute;
54905exports.AlignClass = AlignClass;
54906exports.AlignStyle = AlignStyle;
54907
54908/***/ }),
54909/* 37 */
54910/***/ (function(module, exports, __webpack_require__) {
54911
54912"use strict";
54913
54914
54915Object.defineProperty(exports, "__esModule", {
54916  value: true
54917});
54918exports.BackgroundStyle = exports.BackgroundClass = undefined;
54919
54920var _parchment = __webpack_require__(0);
54921
54922var _parchment2 = _interopRequireDefault(_parchment);
54923
54924var _color = __webpack_require__(26);
54925
54926function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
54927
54928var BackgroundClass = new _parchment2.default.Attributor.Class('background', 'ql-bg', {
54929  scope: _parchment2.default.Scope.INLINE
54930});
54931var BackgroundStyle = new _color.ColorAttributor('background', 'background-color', {
54932  scope: _parchment2.default.Scope.INLINE
54933});
54934
54935exports.BackgroundClass = BackgroundClass;
54936exports.BackgroundStyle = BackgroundStyle;
54937
54938/***/ }),
54939/* 38 */
54940/***/ (function(module, exports, __webpack_require__) {
54941
54942"use strict";
54943
54944
54945Object.defineProperty(exports, "__esModule", {
54946  value: true
54947});
54948exports.DirectionStyle = exports.DirectionClass = exports.DirectionAttribute = undefined;
54949
54950var _parchment = __webpack_require__(0);
54951
54952var _parchment2 = _interopRequireDefault(_parchment);
54953
54954function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
54955
54956var config = {
54957  scope: _parchment2.default.Scope.BLOCK,
54958  whitelist: ['rtl']
54959};
54960
54961var DirectionAttribute = new _parchment2.default.Attributor.Attribute('direction', 'dir', config);
54962var DirectionClass = new _parchment2.default.Attributor.Class('direction', 'ql-direction', config);
54963var DirectionStyle = new _parchment2.default.Attributor.Style('direction', 'direction', config);
54964
54965exports.DirectionAttribute = DirectionAttribute;
54966exports.DirectionClass = DirectionClass;
54967exports.DirectionStyle = DirectionStyle;
54968
54969/***/ }),
54970/* 39 */
54971/***/ (function(module, exports, __webpack_require__) {
54972
54973"use strict";
54974
54975
54976Object.defineProperty(exports, "__esModule", {
54977  value: true
54978});
54979exports.FontClass = exports.FontStyle = undefined;
54980
54981var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
54982
54983var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
54984
54985var _parchment = __webpack_require__(0);
54986
54987var _parchment2 = _interopRequireDefault(_parchment);
54988
54989function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
54990
54991function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
54992
54993function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
54994
54995function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
54996
54997var config = {
54998  scope: _parchment2.default.Scope.INLINE,
54999  whitelist: ['serif', 'monospace']
55000};
55001
55002var FontClass = new _parchment2.default.Attributor.Class('font', 'ql-font', config);
55003
55004var FontStyleAttributor = function (_Parchment$Attributor) {
55005  _inherits(FontStyleAttributor, _Parchment$Attributor);
55006
55007  function FontStyleAttributor() {
55008    _classCallCheck(this, FontStyleAttributor);
55009
55010    return _possibleConstructorReturn(this, (FontStyleAttributor.__proto__ || Object.getPrototypeOf(FontStyleAttributor)).apply(this, arguments));
55011  }
55012
55013  _createClass(FontStyleAttributor, [{
55014    key: 'value',
55015    value: function value(node) {
55016      return _get(FontStyleAttributor.prototype.__proto__ || Object.getPrototypeOf(FontStyleAttributor.prototype), 'value', this).call(this, node).replace(/["']/g, '');
55017    }
55018  }]);
55019
55020  return FontStyleAttributor;
55021}(_parchment2.default.Attributor.Style);
55022
55023var FontStyle = new FontStyleAttributor('font', 'font-family', config);
55024
55025exports.FontStyle = FontStyle;
55026exports.FontClass = FontClass;
55027
55028/***/ }),
55029/* 40 */
55030/***/ (function(module, exports, __webpack_require__) {
55031
55032"use strict";
55033
55034
55035Object.defineProperty(exports, "__esModule", {
55036  value: true
55037});
55038exports.SizeStyle = exports.SizeClass = undefined;
55039
55040var _parchment = __webpack_require__(0);
55041
55042var _parchment2 = _interopRequireDefault(_parchment);
55043
55044function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
55045
55046var SizeClass = new _parchment2.default.Attributor.Class('size', 'ql-size', {
55047  scope: _parchment2.default.Scope.INLINE,
55048  whitelist: ['small', 'large', 'huge']
55049});
55050var SizeStyle = new _parchment2.default.Attributor.Style('size', 'font-size', {
55051  scope: _parchment2.default.Scope.INLINE,
55052  whitelist: ['10px', '18px', '32px']
55053});
55054
55055exports.SizeClass = SizeClass;
vendor: 33,293 bytes, lines 55056-55969
55056exports.SizeStyle = SizeStyle;
55057
55058/***/ }),
55059/* 41 */
55060/***/ (function(module, exports, __webpack_require__) {
55061
55062"use strict";
55063
55064
55065module.exports = {
55066  'align': {
55067    '': __webpack_require__(76),
55068    'center': __webpack_require__(77),
55069    'right': __webpack_require__(78),
55070    'justify': __webpack_require__(79)
55071  },
55072  'background': __webpack_require__(80),
55073  'blockquote': __webpack_require__(81),
55074  'bold': __webpack_require__(82),
55075  'clean': __webpack_require__(83),
55076  'code': __webpack_require__(58),
55077  'code-block': __webpack_require__(58),
55078  'color': __webpack_require__(84),
55079  'direction': {
55080    '': __webpack_require__(85),
55081    'rtl': __webpack_require__(86)
55082  },
55083  'float': {
55084    'center': __webpack_require__(87),
55085    'full': __webpack_require__(88),
55086    'left': __webpack_require__(89),
55087    'right': __webpack_require__(90)
55088  },
55089  'formula': __webpack_require__(91),
55090  'header': {
55091    '1': __webpack_require__(92),
55092    '2': __webpack_require__(93)
55093  },
55094  'italic': __webpack_require__(94),
55095  'image': __webpack_require__(95),
55096  'indent': {
55097    '+1': __webpack_require__(96),
55098    '-1': __webpack_require__(97)
55099  },
55100  'link': __webpack_require__(98),
55101  'list': {
55102    'ordered': __webpack_require__(99),
55103    'bullet': __webpack_require__(100),
55104    'check': __webpack_require__(101)
55105  },
55106  'script': {
55107    'sub': __webpack_require__(102),
55108    'super': __webpack_require__(103)
55109  },
55110  'strike': __webpack_require__(104),
55111  'underline': __webpack_require__(105),
55112  'video': __webpack_require__(106)
55113};
55114
55115/***/ }),
55116/* 42 */
55117/***/ (function(module, exports, __webpack_require__) {
55118
55119"use strict";
55120
55121
55122Object.defineProperty(exports, "__esModule", {
55123  value: true
55124});
55125exports.getLastChangeIndex = exports.default = undefined;
55126
55127var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
55128
55129var _parchment = __webpack_require__(0);
55130
55131var _parchment2 = _interopRequireDefault(_parchment);
55132
55133var _quill = __webpack_require__(5);
55134
55135var _quill2 = _interopRequireDefault(_quill);
55136
55137var _module = __webpack_require__(9);
55138
55139var _module2 = _interopRequireDefault(_module);
55140
55141function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
55142
55143function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
55144
55145function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
55146
55147function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
55148
55149var History = function (_Module) {
55150  _inherits(History, _Module);
55151
55152  function History(quill, options) {
55153    _classCallCheck(this, History);
55154
55155    var _this = _possibleConstructorReturn(this, (History.__proto__ || Object.getPrototypeOf(History)).call(this, quill, options));
55156
55157    _this.lastRecorded = 0;
55158    _this.ignoreChange = false;
55159    _this.clear();
55160    _this.quill.on(_quill2.default.events.EDITOR_CHANGE, function (eventName, delta, oldDelta, source) {
55161      if (eventName !== _quill2.default.events.TEXT_CHANGE || _this.ignoreChange) return;
55162      if (!_this.options.userOnly || source === _quill2.default.sources.USER) {
55163        _this.record(delta, oldDelta);
55164      } else {
55165        _this.transform(delta);
55166      }
55167    });
55168    _this.quill.keyboard.addBinding({ key: 'Z', shortKey: true }, _this.undo.bind(_this));
55169    _this.quill.keyboard.addBinding({ key: 'Z', shortKey: true, shiftKey: true }, _this.redo.bind(_this));
55170    if (/Win/i.test(navigator.platform)) {
55171      _this.quill.keyboard.addBinding({ key: 'Y', shortKey: true }, _this.redo.bind(_this));
55172    }
55173    return _this;
55174  }
55175
55176  _createClass(History, [{
55177    key: 'change',
55178    value: function change(source, dest) {
55179      if (this.stack[source].length === 0) return;
55180      var delta = this.stack[source].pop();
55181      this.stack[dest].push(delta);
55182      this.lastRecorded = 0;
55183      this.ignoreChange = true;
55184      this.quill.updateContents(delta[source], _quill2.default.sources.USER);
55185      this.ignoreChange = false;
55186      var index = getLastChangeIndex(delta[source]);
55187      this.quill.setSelection(index);
55188    }
55189  }, {
55190    key: 'clear',
55191    value: function clear() {
55192      this.stack = { undo: [], redo: [] };
55193    }
55194  }, {
55195    key: 'cutoff',
55196    value: function cutoff() {
55197      this.lastRecorded = 0;
55198    }
55199  }, {
55200    key: 'record',
55201    value: function record(changeDelta, oldDelta) {
55202      if (changeDelta.ops.length === 0) return;
55203      this.stack.redo = [];
55204      var undoDelta = this.quill.getContents().diff(oldDelta);
55205      var timestamp = Date.now();
55206      if (this.lastRecorded + this.options.delay > timestamp && this.stack.undo.length > 0) {
55207        var delta = this.stack.undo.pop();
55208        undoDelta = undoDelta.compose(delta.undo);
55209        changeDelta = delta.redo.compose(changeDelta);
55210      } else {
55211        this.lastRecorded = timestamp;
55212      }
55213      this.stack.undo.push({
55214        redo: changeDelta,
55215        undo: undoDelta
55216      });
55217      if (this.stack.undo.length > this.options.maxStack) {
55218        this.stack.undo.shift();
55219      }
55220    }
55221  }, {
55222    key: 'redo',
55223    value: function redo() {
55224      this.change('redo', 'undo');
55225    }
55226  }, {
55227    key: 'transform',
55228    value: function transform(delta) {
55229      this.stack.undo.forEach(function (change) {
55230        change.undo = delta.transform(change.undo, true);
55231        change.redo = delta.transform(change.redo, true);
55232      });
55233      this.stack.redo.forEach(function (change) {
55234        change.undo = delta.transform(change.undo, true);
55235        change.redo = delta.transform(change.redo, true);
55236      });
55237    }
55238  }, {
55239    key: 'undo',
55240    value: function undo() {
55241      this.change('undo', 'redo');
55242    }
55243  }]);
55244
55245  return History;
55246}(_module2.default);
55247
55248History.DEFAULTS = {
55249  delay: 1000,
55250  maxStack: 100,
55251  userOnly: false
55252};
55253
55254function endsWithNewlineChange(delta) {
55255  var lastOp = delta.ops[delta.ops.length - 1];
55256  if (lastOp == null) return false;
55257  if (lastOp.insert != null) {
55258    return typeof lastOp.insert === 'string' && lastOp.insert.endsWith('\n');
55259  }
55260  if (lastOp.attributes != null) {
55261    return Object.keys(lastOp.attributes).some(function (attr) {
55262      return _parchment2.default.query(attr, _parchment2.default.Scope.BLOCK) != null;
55263    });
55264  }
55265  return false;
55266}
55267
55268function getLastChangeIndex(delta) {
55269  var deleteLength = delta.reduce(function (length, op) {
55270    length += op.delete || 0;
55271    return length;
55272  }, 0);
55273  var changeIndex = delta.length() - deleteLength;
55274  if (endsWithNewlineChange(delta)) {
55275    changeIndex -= 1;
55276  }
55277  return changeIndex;
55278}
55279
55280exports.default = History;
55281exports.getLastChangeIndex = getLastChangeIndex;
55282
55283/***/ }),
55284/* 43 */
55285/***/ (function(module, exports, __webpack_require__) {
55286
55287"use strict";
55288
55289
55290Object.defineProperty(exports, "__esModule", {
55291  value: true
55292});
55293exports.default = exports.BaseTooltip = undefined;
55294
55295var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
55296
55297var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
55298
55299var _extend = __webpack_require__(3);
55300
55301var _extend2 = _interopRequireDefault(_extend);
55302
55303var _quillDelta = __webpack_require__(2);
55304
55305var _quillDelta2 = _interopRequireDefault(_quillDelta);
55306
55307var _emitter = __webpack_require__(8);
55308
55309var _emitter2 = _interopRequireDefault(_emitter);
55310
55311var _keyboard = __webpack_require__(23);
55312
55313var _keyboard2 = _interopRequireDefault(_keyboard);
55314
55315var _theme = __webpack_require__(34);
55316
55317var _theme2 = _interopRequireDefault(_theme);
55318
55319var _colorPicker = __webpack_require__(59);
55320
55321var _colorPicker2 = _interopRequireDefault(_colorPicker);
55322
55323var _iconPicker = __webpack_require__(60);
55324
55325var _iconPicker2 = _interopRequireDefault(_iconPicker);
55326
55327var _picker = __webpack_require__(28);
55328
55329var _picker2 = _interopRequireDefault(_picker);
55330
55331var _tooltip = __webpack_require__(61);
55332
55333var _tooltip2 = _interopRequireDefault(_tooltip);
55334
55335function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
55336
55337function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
55338
55339function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
55340
55341function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
55342
55343var ALIGNS = [false, 'center', 'right', 'justify'];
55344
55345var COLORS = ["#000000", "#e60000", "#ff9900", "#ffff00", "#008a00", "#0066cc", "#9933ff", "#ffffff", "#facccc", "#ffebcc", "#ffffcc", "#cce8cc", "#cce0f5", "#ebd6ff", "#bbbbbb", "#f06666", "#ffc266", "#ffff66", "#66b966", "#66a3e0", "#c285ff", "#888888", "#a10000", "#b26b00", "#b2b200", "#006100", "#0047b2", "#6b24b2", "#444444", "#5c0000", "#663d00", "#666600", "#003700", "#002966", "#3d1466"];
55346
55347var FONTS = [false, 'serif', 'monospace'];
55348
55349var HEADERS = ['1', '2', '3', false];
55350
55351var SIZES = ['small', false, 'large', 'huge'];
55352
55353var BaseTheme = function (_Theme) {
55354  _inherits(BaseTheme, _Theme);
55355
55356  function BaseTheme(quill, options) {
55357    _classCallCheck(this, BaseTheme);
55358
55359    var _this = _possibleConstructorReturn(this, (BaseTheme.__proto__ || Object.getPrototypeOf(BaseTheme)).call(this, quill, options));
55360
55361    var listener = function listener(e) {
55362      if (!document.body.contains(quill.root)) {
55363        return document.body.removeEventListener('click', listener);
55364      }
55365      if (_this.tooltip != null && !_this.tooltip.root.contains(e.target) && document.activeElement !== _this.tooltip.textbox && !_this.quill.hasFocus()) {
55366        _this.tooltip.hide();
55367      }
55368      if (_this.pickers != null) {
55369        _this.pickers.forEach(function (picker) {
55370          if (!picker.container.contains(e.target)) {
55371            picker.close();
55372          }
55373        });
55374      }
55375    };
55376    quill.emitter.listenDOM('click', document.body, listener);
55377    return _this;
55378  }
55379
55380  _createClass(BaseTheme, [{
55381    key: 'addModule',
55382    value: function addModule(name) {
55383      var module = _get(BaseTheme.prototype.__proto__ || Object.getPrototypeOf(BaseTheme.prototype), 'addModule', this).call(this, name);
55384      if (name === 'toolbar') {
55385        this.extendToolbar(module);
55386      }
55387      return module;
55388    }
55389  }, {
55390    key: 'buildButtons',
55391    value: function buildButtons(buttons, icons) {
55392      buttons.forEach(function (button) {
55393        var className = button.getAttribute('class') || '';
55394        className.split(/\s+/).forEach(function (name) {
55395          if (!name.startsWith('ql-')) return;
55396          name = name.slice('ql-'.length);
55397          if (icons[name] == null) return;
55398          if (name === 'direction') {
55399            button.innerHTML = icons[name][''] + icons[name]['rtl'];
55400          } else if (typeof icons[name] === 'string') {
55401            button.innerHTML = icons[name];
55402          } else {
55403            var value = button.value || '';
55404            if (value != null && icons[name][value]) {
55405              button.innerHTML = icons[name][value];
55406            }
55407          }
55408        });
55409      });
55410    }
55411  }, {
55412    key: 'buildPickers',
55413    value: function buildPickers(selects, icons) {
55414      var _this2 = this;
55415
55416      this.pickers = selects.map(function (select) {
55417        if (select.classList.contains('ql-align')) {
55418          if (select.querySelector('option') == null) {
55419            fillSelect(select, ALIGNS);
55420          }
55421          return new _iconPicker2.default(select, icons.align);
55422        } else if (select.classList.contains('ql-background') || select.classList.contains('ql-color')) {
55423          var format = select.classList.contains('ql-background') ? 'background' : 'color';
55424          if (select.querySelector('option') == null) {
55425            fillSelect(select, COLORS, format === 'background' ? '#ffffff' : '#000000');
55426          }
55427          return new _colorPicker2.default(select, icons[format]);
55428        } else {
55429          if (select.querySelector('option') == null) {
55430            if (select.classList.contains('ql-font')) {
55431              fillSelect(select, FONTS);
55432            } else if (select.classList.contains('ql-header')) {
55433              fillSelect(select, HEADERS);
55434            } else if (select.classList.contains('ql-size')) {
55435              fillSelect(select, SIZES);
55436            }
55437          }
55438          return new _picker2.default(select);
55439        }
55440      });
55441      var update = function update() {
55442        _this2.pickers.forEach(function (picker) {
55443          picker.update();
55444        });
55445      };
55446      this.quill.on(_emitter2.default.events.EDITOR_CHANGE, update);
55447    }
55448  }]);
55449
55450  return BaseTheme;
55451}(_theme2.default);
55452
55453BaseTheme.DEFAULTS = (0, _extend2.default)(true, {}, _theme2.default.DEFAULTS, {
55454  modules: {
55455    toolbar: {
55456      handlers: {
55457        formula: function formula() {
55458          this.quill.theme.tooltip.edit('formula');
55459        },
55460        image: function image() {
55461          var _this3 = this;
55462
55463          var fileInput = this.container.querySelector('input.ql-image[type=file]');
55464          if (fileInput == null) {
55465            fileInput = document.createElement('input');
55466            fileInput.setAttribute('type', 'file');
55467            fileInput.setAttribute('accept', 'image/png, image/gif, image/jpeg, image/bmp, image/x-icon');
55468            fileInput.classList.add('ql-image');
55469            fileInput.addEventListener('change', function () {
55470              if (fileInput.files != null && fileInput.files[0] != null) {
55471                var reader = new FileReader();
55472                reader.onload = function (e) {
55473                  var range = _this3.quill.getSelection(true);
55474                  _this3.quill.updateContents(new _quillDelta2.default().retain(range.index).delete(range.length).insert({ image: e.target.result }), _emitter2.default.sources.USER);
55475                  _this3.quill.setSelection(range.index + 1, _emitter2.default.sources.SILENT);
55476                  fileInput.value = "";
55477                };
55478                reader.readAsDataURL(fileInput.files[0]);
55479              }
55480            });
55481            this.container.appendChild(fileInput);
55482          }
55483          fileInput.click();
55484        },
55485        video: function video() {
55486          this.quill.theme.tooltip.edit('video');
55487        }
55488      }
55489    }
55490  }
55491});
55492
55493var BaseTooltip = function (_Tooltip) {
55494  _inherits(BaseTooltip, _Tooltip);
55495
55496  function BaseTooltip(quill, boundsContainer) {
55497    _classCallCheck(this, BaseTooltip);
55498
55499    var _this4 = _possibleConstructorReturn(this, (BaseTooltip.__proto__ || Object.getPrototypeOf(BaseTooltip)).call(this, quill, boundsContainer));
55500
55501    _this4.textbox = _this4.root.querySelector('input[type="text"]');
55502    _this4.listen();
55503    return _this4;
55504  }
55505
55506  _createClass(BaseTooltip, [{
55507    key: 'listen',
55508    value: function listen() {
55509      var _this5 = this;
55510
55511      this.textbox.addEventListener('keydown', function (event) {
55512        if (_keyboard2.default.match(event, 'enter')) {
55513          _this5.save();
55514          event.preventDefault();
55515        } else if (_keyboard2.default.match(event, 'escape')) {
55516          _this5.cancel();
55517          event.preventDefault();
55518        }
55519      });
55520    }
55521  }, {
55522    key: 'cancel',
55523    value: function cancel() {
55524      this.hide();
55525    }
55526  }, {
55527    key: 'edit',
55528    value: function edit() {
55529      var mode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'link';
55530      var preview = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
55531
55532      this.root.classList.remove('ql-hidden');
55533      this.root.classList.add('ql-editing');
55534      if (preview != null) {
55535        this.textbox.value = preview;
55536      } else if (mode !== this.root.getAttribute('data-mode')) {
55537        this.textbox.value = '';
55538      }
55539      this.position(this.quill.getBounds(this.quill.selection.savedRange));
55540      this.textbox.select();
55541      this.textbox.setAttribute('placeholder', this.textbox.getAttribute('data-' + mode) || '');
55542      this.root.setAttribute('data-mode', mode);
55543    }
55544  }, {
55545    key: 'restoreFocus',
55546    value: function restoreFocus() {
55547      var scrollTop = this.quill.scrollingContainer.scrollTop;
55548      this.quill.focus();
55549      this.quill.scrollingContainer.scrollTop = scrollTop;
55550    }
55551  }, {
55552    key: 'save',
55553    value: function save() {
55554      var value = this.textbox.value;
55555      switch (this.root.getAttribute('data-mode')) {
55556        case 'link':
55557          {
55558            var scrollTop = this.quill.root.scrollTop;
55559            if (this.linkRange) {
55560              this.quill.formatText(this.linkRange, 'link', value, _emitter2.default.sources.USER);
55561              delete this.linkRange;
55562            } else {
55563              this.restoreFocus();
55564              this.quill.format('link', value, _emitter2.default.sources.USER);
55565            }
55566            this.quill.root.scrollTop = scrollTop;
55567            break;
55568          }
55569        case 'video':
55570          {
55571            value = extractVideoUrl(value);
55572          } // eslint-disable-next-line no-fallthrough
55573        case 'formula':
55574          {
55575            if (!value) break;
55576            var range = this.quill.getSelection(true);
55577            if (range != null) {
55578              var index = range.index + range.length;
55579              this.quill.insertEmbed(index, this.root.getAttribute('data-mode'), value, _emitter2.default.sources.USER);
55580              if (this.root.getAttribute('data-mode') === 'formula') {
55581                this.quill.insertText(index + 1, ' ', _emitter2.default.sources.USER);
55582              }
55583              this.quill.setSelection(index + 2, _emitter2.default.sources.USER);
55584            }
55585            break;
55586          }
55587        default:
55588      }
55589      this.textbox.value = '';
55590      this.hide();
55591    }
55592  }]);
55593
55594  return BaseTooltip;
55595}(_tooltip2.default);
55596
55597function extractVideoUrl(url) {
55598  var match = url.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/) || url.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);
55599  if (match) {
55600    return (match[1] || 'https') + '://www.youtube.com/embed/' + match[2] + '?showinfo=0';
55601  }
55602  if (match = url.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/)) {
55603    // eslint-disable-line no-cond-assign
55604    return (match[1] || 'https') + '://player.vimeo.com/video/' + match[2] + '/';
55605  }
55606  return url;
55607}
55608
55609function fillSelect(select, values) {
55610  var defaultValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
55611
55612  values.forEach(function (value) {
55613    var option = document.createElement('option');
55614    if (value === defaultValue) {
55615      option.setAttribute('selected', 'selected');
55616    } else {
55617      option.setAttribute('value', value);
55618    }
55619    select.appendChild(option);
55620  });
55621}
55622
55623exports.BaseTooltip = BaseTooltip;
55624exports.default = BaseTheme;
55625
55626/***/ }),
55627/* 44 */
55628/***/ (function(module, exports, __webpack_require__) {
55629
55630"use strict";
55631
55632Object.defineProperty(exports, "__esModule", { value: true });
55633var LinkedList = /** @class */ (function () {
55634    function LinkedList() {
55635        this.head = this.tail = null;
55636        this.length = 0;
55637    }
55638    LinkedList.prototype.append = function () {
55639        var nodes = [];
55640        for (var _i = 0; _i < arguments.length; _i++) {
55641            nodes[_i] = arguments[_i];
55642        }
55643        this.insertBefore(nodes[0], null);
55644        if (nodes.length > 1) {
55645            this.append.apply(this, nodes.slice(1));
55646        }
55647    };
55648    LinkedList.prototype.contains = function (node) {
55649        var cur, next = this.iterator();
55650        while ((cur = next())) {
55651            if (cur === node)
55652                return true;
55653        }
55654        return false;
55655    };
55656    LinkedList.prototype.insertBefore = function (node, refNode) {
55657        if (!node)
55658            return;
55659        node.next = refNode;
55660        if (refNode != null) {
55661            node.prev = refNode.prev;
55662            if (refNode.prev != null) {
55663                refNode.prev.next = node;
55664            }
55665            refNode.prev = node;
55666            if (refNode === this.head) {
55667                this.head = node;
55668            }
55669        }
55670        else if (this.tail != null) {
55671            this.tail.next = node;
55672            node.prev = this.tail;
55673            this.tail = node;
55674        }
55675        else {
55676            node.prev = null;
55677            this.head = this.tail = node;
55678        }
55679        this.length += 1;
55680    };
55681    LinkedList.prototype.offset = function (target) {
55682        var index = 0, cur = this.head;
55683        while (cur != null) {
55684            if (cur === target)
55685                return index;
55686            index += cur.length();
55687            cur = cur.next;
55688        }
55689        return -1;
55690    };
55691    LinkedList.prototype.remove = function (node) {
55692        if (!this.contains(node))
55693            return;
55694        if (node.prev != null)
55695            node.prev.next = node.next;
55696        if (node.next != null)
55697            node.next.prev = node.prev;
55698        if (node === this.head)
55699            this.head = node.next;
55700        if (node === this.tail)
55701            this.tail = node.prev;
55702        this.length -= 1;
55703    };
55704    LinkedList.prototype.iterator = function (curNode) {
55705        if (curNode === void 0) { curNode = this.head; }
55706        // TODO use yield when we can
55707        return function () {
55708            var ret = curNode;
55709            if (curNode != null)
55710                curNode = curNode.next;
55711            return ret;
55712        };
55713    };
55714    LinkedList.prototype.find = function (index, inclusive) {
55715        if (inclusive === void 0) { inclusive = false; }
55716        var cur, next = this.iterator();
55717        while ((cur = next())) {
55718            var length = cur.length();
55719            if (index < length ||
55720                (inclusive && index === length && (cur.next == null || cur.next.length() !== 0))) {
55721                return [cur, index];
55722            }
55723            index -= length;
55724        }
55725        return [null, 0];
55726    };
55727    LinkedList.prototype.forEach = function (callback) {
55728        var cur, next = this.iterator();
55729        while ((cur = next())) {
55730            callback(cur);
55731        }
55732    };
55733    LinkedList.prototype.forEachAt = function (index, length, callback) {
55734        if (length <= 0)
55735            return;
55736        var _a = this.find(index), startNode = _a[0], offset = _a[1];
55737        var cur, curIndex = index - offset, next = this.iterator(startNode);
55738        while ((cur = next()) && curIndex < index + length) {
55739            var curLength = cur.length();
55740            if (index > curIndex) {
55741                callback(cur, index - curIndex, Math.min(length, curIndex + curLength - index));
55742            }
55743            else {
55744                callback(cur, 0, Math.min(curLength, index + length - curIndex));
55745            }
55746            curIndex += curLength;
55747        }
55748    };
55749    LinkedList.prototype.map = function (callback) {
55750        return this.reduce(function (memo, cur) {
55751            memo.push(callback(cur));
55752            return memo;
55753        }, []);
55754    };
55755    LinkedList.prototype.reduce = function (callback, memo) {
55756        var cur, next = this.iterator();
55757        while ((cur = next())) {
55758            memo = callback(memo, cur);
55759        }
55760        return memo;
55761    };
55762    return LinkedList;
55763}());
55764exports.default = LinkedList;
55765
55766
55767/***/ }),
55768/* 45 */
55769/***/ (function(module, exports, __webpack_require__) {
55770
55771"use strict";
55772
55773var __extends = (this && this.__extends) || (function () {
55774    var extendStatics = Object.setPrototypeOf ||
55775        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
55776        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
55777    return function (d, b) {
55778        extendStatics(d, b);
55779        function __() { this.constructor = d; }
55780        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
55781    };
55782})();
55783Object.defineProperty(exports, "__esModule", { value: true });
55784var container_1 = __webpack_require__(17);
55785var Registry = __webpack_require__(1);
55786var OBSERVER_CONFIG = {
55787    attributes: true,
55788    characterData: true,
55789    characterDataOldValue: true,
55790    childList: true,
55791    subtree: true,
55792};
55793var MAX_OPTIMIZE_ITERATIONS = 100;
55794var ScrollBlot = /** @class */ (function (_super) {
55795    __extends(ScrollBlot, _super);
55796    function ScrollBlot(node) {
55797        var _this = _super.call(this, node) || this;
55798        _this.scroll = _this;
55799        _this.observer = new MutationObserver(function (mutations) {
55800            _this.update(mutations);
55801        });
55802        _this.observer.observe(_this.domNode, OBSERVER_CONFIG);
55803        _this.attach();
55804        return _this;
55805    }
55806    ScrollBlot.prototype.detach = function () {
55807        _super.prototype.detach.call(this);
55808        this.observer.disconnect();
55809    };
55810    ScrollBlot.prototype.deleteAt = function (index, length) {
55811        this.update();
55812        if (index === 0 && length === this.length()) {
55813            this.children.forEach(function (child) {
55814                child.remove();
55815            });
55816        }
55817        else {
55818            _super.prototype.deleteAt.call(this, index, length);
55819        }
55820    };
55821    ScrollBlot.prototype.formatAt = function (index, length, name, value) {
55822        this.update();
55823        _super.prototype.formatAt.call(this, index, length, name, value);
55824    };
55825    ScrollBlot.prototype.insertAt = function (index, value, def) {
55826        this.update();
55827        _super.prototype.insertAt.call(this, index, value, def);
55828    };
55829    ScrollBlot.prototype.optimize = function (mutations, context) {
55830        var _this = this;
55831        if (mutations === void 0) { mutations = []; }
55832        if (context === void 0) { context = {}; }
55833        _super.prototype.optimize.call(this, context);
55834        // We must modify mutations directly, cannot make copy and then modify
55835        var records = [].slice.call(this.observer.takeRecords());
55836        // Array.push currently seems to be implemented by a non-tail recursive function
55837        // so we cannot just mutations.push.apply(mutations, this.observer.takeRecords());
55838        while (records.length > 0)
55839            mutations.push(records.pop());
55840        // TODO use WeakMap
55841        var mark = function (blot, markParent) {
55842            if (markParent === void 0) { markParent = true; }
55843            if (blot == null || blot === _this)
55844                return;
55845            if (blot.domNode.parentNode == null)
55846                return;
55847            // @ts-ignore
55848            if (blot.domNode[Registry.DATA_KEY].mutations == null) {
55849                // @ts-ignore
55850                blot.domNode[Registry.DATA_KEY].mutations = [];
55851            }
55852            if (markParent)
55853                mark(blot.parent);
55854        };
55855        var optimize = function (blot) {
55856            // Post-order traversal
55857            if (
55858            // @ts-ignore
55859            blot.domNode[Registry.DATA_KEY] == null ||
55860                // @ts-ignore
55861                blot.domNode[Registry.DATA_KEY].mutations == null) {
55862                return;
55863            }
55864            if (blot instanceof container_1.default) {
55865                blot.children.forEach(optimize);
55866            }
55867            blot.optimize(context);
55868        };
55869        var remaining = mutations;
55870        for (var i = 0; remaining.length > 0; i += 1) {
55871            if (i >= MAX_OPTIMIZE_ITERATIONS) {
55872                throw new Error('[Parchment] Maximum optimize iterations reached');
55873            }
55874            remaining.forEach(function (mutation) {
55875                var blot = Registry.find(mutation.target, true);
55876                if (blot == null)
55877                    return;
55878                if (blot.domNode === mutation.target) {
55879                    if (mutation.type === 'childList') {
55880                        mark(Registry.find(mutation.previousSibling, false));
55881                        [].forEach.call(mutation.addedNodes, function (node) {
55882                            var child = Registry.find(node, false);
55883                            mark(child, false);
55884                            if (child instanceof container_1.default) {
55885                                child.children.forEach(function (grandChild) {
55886                                    mark(grandChild, false);
55887                                });
55888                            }
55889                        });
55890                    }
55891                    else if (mutation.type === 'attributes') {
55892                        mark(blot.prev);
55893                    }
55894                }
55895                mark(blot);
55896            });
55897            this.children.forEach(optimize);
55898            remaining = [].slice.call(this.observer.takeRecords());
55899            records = remaining.slice();
55900            while (records.length > 0)
55901                mutations.push(records.pop());
55902        }
55903    };
55904    ScrollBlot.prototype.update = function (mutations, context) {
55905        var _this = this;
55906        if (context === void 0) { context = {}; }
55907        mutations = mutations || this.observer.takeRecords();
55908        // TODO use WeakMap
55909        mutations
55910            .map(function (mutation) {
55911            var blot = Registry.find(mutation.target, true);
55912            if (blot == null)
55913                return null;
55914            // @ts-ignore
55915            if (blot.domNode[Registry.DATA_KEY].mutations == null) {
55916                // @ts-ignore
55917                blot.domNode[Registry.DATA_KEY].mutations = [mutation];
55918                return blot;
55919            }
55920            else {
55921                // @ts-ignore
55922                blot.domNode[Registry.DATA_KEY].mutations.push(mutation);
55923                return null;
55924            }
55925        })
55926            .forEach(function (blot) {
55927            if (blot == null ||
55928                blot === _this ||
55929                //@ts-ignore
55930                blot.domNode[Registry.DATA_KEY] == null)
55931                return;
55932            // @ts-ignore
55933            blot.update(blot.domNode[Registry.DATA_KEY].mutations || [], context);
55934        });
55935        // @ts-ignore
55936        if (this.domNode[Registry.DATA_KEY].mutations != null) {
55937            // @ts-ignore
55938            _super.prototype.update.call(this, this.domNode[Registry.DATA_KEY].mutations, context);
55939        }
55940        this.optimize(mutations, context);
55941    };
55942    ScrollBlot.blotName = 'scroll';
55943    ScrollBlot.defaultChild = 'block';
55944    ScrollBlot.scope = Registry.Scope.BLOCK_BLOT;
55945    ScrollBlot.tagName = 'DIV';
55946    return ScrollBlot;
55947}(container_1.default));
55948exports.default = ScrollBlot;
55949
55950
55951/***/ }),
55952/* 46 */
55953/***/ (function(module, exports, __webpack_require__) {
55954
55955"use strict";
55956
55957var __extends = (this && this.__extends) || (function () {
55958    var extendStatics = Object.setPrototypeOf ||
55959        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
55960        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
55961    return function (d, b) {
55962        extendStatics(d, b);
55963        function __() { this.constructor = d; }
55964        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
55965    };
55966})();
55967Object.defineProperty(exports, "__esModule", { value: true });
55968var format_1 = __webpack_require__(18);
55969var Registry = __webpack_require__(1);
vendor: 63,723 bytes, lines 55970-57837
55970// Shallow object comparison
55971function isEqual(obj1, obj2) {
55972    if (Object.keys(obj1).length !== Object.keys(obj2).length)
55973        return false;
55974    // @ts-ignore
55975    for (var prop in obj1) {
55976        // @ts-ignore
55977        if (obj1[prop] !== obj2[prop])
55978            return false;
55979    }
55980    return true;
55981}
55982var InlineBlot = /** @class */ (function (_super) {
55983    __extends(InlineBlot, _super);
55984    function InlineBlot() {
55985        return _super !== null && _super.apply(this, arguments) || this;
55986    }
55987    InlineBlot.formats = function (domNode) {
55988        if (domNode.tagName === InlineBlot.tagName)
55989            return undefined;
55990        return _super.formats.call(this, domNode);
55991    };
55992    InlineBlot.prototype.format = function (name, value) {
55993        var _this = this;
55994        if (name === this.statics.blotName && !value) {
55995            this.children.forEach(function (child) {
55996                if (!(child instanceof format_1.default)) {
55997                    child = child.wrap(InlineBlot.blotName, true);
55998                }
55999                _this.attributes.copy(child);
56000            });
56001            this.unwrap();
56002        }
56003        else {
56004            _super.prototype.format.call(this, name, value);
56005        }
56006    };
56007    InlineBlot.prototype.formatAt = function (index, length, name, value) {
56008        if (this.formats()[name] != null || Registry.query(name, Registry.Scope.ATTRIBUTE)) {
56009            var blot = this.isolate(index, length);
56010            blot.format(name, value);
56011        }
56012        else {
56013            _super.prototype.formatAt.call(this, index, length, name, value);
56014        }
56015    };
56016    InlineBlot.prototype.optimize = function (context) {
56017        _super.prototype.optimize.call(this, context);
56018        var formats = this.formats();
56019        if (Object.keys(formats).length === 0) {
56020            return this.unwrap(); // unformatted span
56021        }
56022        var next = this.next;
56023        if (next instanceof InlineBlot && next.prev === this && isEqual(formats, next.formats())) {
56024            next.moveChildren(this);
56025            next.remove();
56026        }
56027    };
56028    InlineBlot.blotName = 'inline';
56029    InlineBlot.scope = Registry.Scope.INLINE_BLOT;
56030    InlineBlot.tagName = 'SPAN';
56031    return InlineBlot;
56032}(format_1.default));
56033exports.default = InlineBlot;
56034
56035
56036/***/ }),
56037/* 47 */
56038/***/ (function(module, exports, __webpack_require__) {
56039
56040"use strict";
56041
56042var __extends = (this && this.__extends) || (function () {
56043    var extendStatics = Object.setPrototypeOf ||
56044        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
56045        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
56046    return function (d, b) {
56047        extendStatics(d, b);
56048        function __() { this.constructor = d; }
56049        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
56050    };
56051})();
56052Object.defineProperty(exports, "__esModule", { value: true });
56053var format_1 = __webpack_require__(18);
56054var Registry = __webpack_require__(1);
56055var BlockBlot = /** @class */ (function (_super) {
56056    __extends(BlockBlot, _super);
56057    function BlockBlot() {
56058        return _super !== null && _super.apply(this, arguments) || this;
56059    }
56060    BlockBlot.formats = function (domNode) {
56061        var tagName = Registry.query(BlockBlot.blotName).tagName;
56062        if (domNode.tagName === tagName)
56063            return undefined;
56064        return _super.formats.call(this, domNode);
56065    };
56066    BlockBlot.prototype.format = function (name, value) {
56067        if (Registry.query(name, Registry.Scope.BLOCK) == null) {
56068            return;
56069        }
56070        else if (name === this.statics.blotName && !value) {
56071            this.replaceWith(BlockBlot.blotName);
56072        }
56073        else {
56074            _super.prototype.format.call(this, name, value);
56075        }
56076    };
56077    BlockBlot.prototype.formatAt = function (index, length, name, value) {
56078        if (Registry.query(name, Registry.Scope.BLOCK) != null) {
56079            this.format(name, value);
56080        }
56081        else {
56082            _super.prototype.formatAt.call(this, index, length, name, value);
56083        }
56084    };
56085    BlockBlot.prototype.insertAt = function (index, value, def) {
56086        if (def == null || Registry.query(value, Registry.Scope.INLINE) != null) {
56087            // Insert text or inline
56088            _super.prototype.insertAt.call(this, index, value, def);
56089        }
56090        else {
56091            var after = this.split(index);
56092            var blot = Registry.create(value, def);
56093            after.parent.insertBefore(blot, after);
56094        }
56095    };
56096    BlockBlot.prototype.update = function (mutations, context) {
56097        if (navigator.userAgent.match(/Trident/)) {
56098            this.build();
56099        }
56100        else {
56101            _super.prototype.update.call(this, mutations, context);
56102        }
56103    };
56104    BlockBlot.blotName = 'block';
56105    BlockBlot.scope = Registry.Scope.BLOCK_BLOT;
56106    BlockBlot.tagName = 'P';
56107    return BlockBlot;
56108}(format_1.default));
56109exports.default = BlockBlot;
56110
56111
56112/***/ }),
56113/* 48 */
56114/***/ (function(module, exports, __webpack_require__) {
56115
56116"use strict";
56117
56118var __extends = (this && this.__extends) || (function () {
56119    var extendStatics = Object.setPrototypeOf ||
56120        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
56121        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
56122    return function (d, b) {
56123        extendStatics(d, b);
56124        function __() { this.constructor = d; }
56125        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
56126    };
56127})();
56128Object.defineProperty(exports, "__esModule", { value: true });
56129var leaf_1 = __webpack_require__(19);
56130var EmbedBlot = /** @class */ (function (_super) {
56131    __extends(EmbedBlot, _super);
56132    function EmbedBlot() {
56133        return _super !== null && _super.apply(this, arguments) || this;
56134    }
56135    EmbedBlot.formats = function (domNode) {
56136        return undefined;
56137    };
56138    EmbedBlot.prototype.format = function (name, value) {
56139        // super.formatAt wraps, which is what we want in general,
56140        // but this allows subclasses to overwrite for formats
56141        // that just apply to particular embeds
56142        _super.prototype.formatAt.call(this, 0, this.length(), name, value);
56143    };
56144    EmbedBlot.prototype.formatAt = function (index, length, name, value) {
56145        if (index === 0 && length === this.length()) {
56146            this.format(name, value);
56147        }
56148        else {
56149            _super.prototype.formatAt.call(this, index, length, name, value);
56150        }
56151    };
56152    EmbedBlot.prototype.formats = function () {
56153        return this.statics.formats(this.domNode);
56154    };
56155    return EmbedBlot;
56156}(leaf_1.default));
56157exports.default = EmbedBlot;
56158
56159
56160/***/ }),
56161/* 49 */
56162/***/ (function(module, exports, __webpack_require__) {
56163
56164"use strict";
56165
56166var __extends = (this && this.__extends) || (function () {
56167    var extendStatics = Object.setPrototypeOf ||
56168        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
56169        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
56170    return function (d, b) {
56171        extendStatics(d, b);
56172        function __() { this.constructor = d; }
56173        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
56174    };
56175})();
56176Object.defineProperty(exports, "__esModule", { value: true });
56177var leaf_1 = __webpack_require__(19);
56178var Registry = __webpack_require__(1);
56179var TextBlot = /** @class */ (function (_super) {
56180    __extends(TextBlot, _super);
56181    function TextBlot(node) {
56182        var _this = _super.call(this, node) || this;
56183        _this.text = _this.statics.value(_this.domNode);
56184        return _this;
56185    }
56186    TextBlot.create = function (value) {
56187        return document.createTextNode(value);
56188    };
56189    TextBlot.value = function (domNode) {
56190        var text = domNode.data;
56191        // @ts-ignore
56192        if (text['normalize'])
56193            text = text['normalize']();
56194        return text;
56195    };
56196    TextBlot.prototype.deleteAt = function (index, length) {
56197        this.domNode.data = this.text = this.text.slice(0, index) + this.text.slice(index + length);
56198    };
56199    TextBlot.prototype.index = function (node, offset) {
56200        if (this.domNode === node) {
56201            return offset;
56202        }
56203        return -1;
56204    };
56205    TextBlot.prototype.insertAt = function (index, value, def) {
56206        if (def == null) {
56207            this.text = this.text.slice(0, index) + value + this.text.slice(index);
56208            this.domNode.data = this.text;
56209        }
56210        else {
56211            _super.prototype.insertAt.call(this, index, value, def);
56212        }
56213    };
56214    TextBlot.prototype.length = function () {
56215        return this.text.length;
56216    };
56217    TextBlot.prototype.optimize = function (context) {
56218        _super.prototype.optimize.call(this, context);
56219        this.text = this.statics.value(this.domNode);
56220        if (this.text.length === 0) {
56221            this.remove();
56222        }
56223        else if (this.next instanceof TextBlot && this.next.prev === this) {
56224            this.insertAt(this.length(), this.next.value());
56225            this.next.remove();
56226        }
56227    };
56228    TextBlot.prototype.position = function (index, inclusive) {
56229        if (inclusive === void 0) { inclusive = false; }
56230        return [this.domNode, index];
56231    };
56232    TextBlot.prototype.split = function (index, force) {
56233        if (force === void 0) { force = false; }
56234        if (!force) {
56235            if (index === 0)
56236                return this;
56237            if (index === this.length())
56238                return this.next;
56239        }
56240        var after = Registry.create(this.domNode.splitText(index));
56241        this.parent.insertBefore(after, this.next);
56242        this.text = this.statics.value(this.domNode);
56243        return after;
56244    };
56245    TextBlot.prototype.update = function (mutations, context) {
56246        var _this = this;
56247        if (mutations.some(function (mutation) {
56248            return mutation.type === 'characterData' && mutation.target === _this.domNode;
56249        })) {
56250            this.text = this.statics.value(this.domNode);
56251        }
56252    };
56253    TextBlot.prototype.value = function () {
56254        return this.text;
56255    };
56256    TextBlot.blotName = 'text';
56257    TextBlot.scope = Registry.Scope.INLINE_BLOT;
56258    return TextBlot;
56259}(leaf_1.default));
56260exports.default = TextBlot;
56261
56262
56263/***/ }),
56264/* 50 */
56265/***/ (function(module, exports, __webpack_require__) {
56266
56267"use strict";
56268
56269
56270var elem = document.createElement('div');
56271elem.classList.toggle('test-class', false);
56272if (elem.classList.contains('test-class')) {
56273  var _toggle = DOMTokenList.prototype.toggle;
56274  DOMTokenList.prototype.toggle = function (token, force) {
56275    if (arguments.length > 1 && !this.contains(token) === !force) {
56276      return force;
56277    } else {
56278      return _toggle.call(this, token);
56279    }
56280  };
56281}
56282
56283if (!String.prototype.startsWith) {
56284  String.prototype.startsWith = function (searchString, position) {
56285    position = position || 0;
56286    return this.substr(position, searchString.length) === searchString;
56287  };
56288}
56289
56290if (!String.prototype.endsWith) {
56291  String.prototype.endsWith = function (searchString, position) {
56292    var subjectString = this.toString();
56293    if (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > subjectString.length) {
56294      position = subjectString.length;
56295    }
56296    position -= searchString.length;
56297    var lastIndex = subjectString.indexOf(searchString, position);
56298    return lastIndex !== -1 && lastIndex === position;
56299  };
56300}
56301
56302if (!Array.prototype.find) {
56303  Object.defineProperty(Array.prototype, "find", {
56304    value: function value(predicate) {
56305      if (this === null) {
56306        throw new TypeError('Array.prototype.find called on null or undefined');
56307      }
56308      if (typeof predicate !== 'function') {
56309        throw new TypeError('predicate must be a function');
56310      }
56311      var list = Object(this);
56312      var length = list.length >>> 0;
56313      var thisArg = arguments[1];
56314      var value;
56315
56316      for (var i = 0; i < length; i++) {
56317        value = list[i];
56318        if (predicate.call(thisArg, value, i, list)) {
56319          return value;
56320        }
56321      }
56322      return undefined;
56323    }
56324  });
56325}
56326
56327document.addEventListener("DOMContentLoaded", function () {
56328  // Disable resizing in Firefox
56329  document.execCommand("enableObjectResizing", false, false);
56330  // Disable automatic linkifying in IE11
56331  document.execCommand("autoUrlDetect", false, false);
56332});
56333
56334/***/ }),
56335/* 51 */
56336/***/ (function(module, exports) {
56337
56338/**
56339 * This library modifies the diff-patch-match library by Neil Fraser
56340 * by removing the patch and match functionality and certain advanced
56341 * options in the diff function. The original license is as follows:
56342 *
56343 * ===
56344 *
56345 * Diff Match and Patch
56346 *
56347 * Copyright 2006 Google Inc.
56348 * http://code.google.com/p/google-diff-match-patch/
56349 *
56350 * Licensed under the Apache License, Version 2.0 (the "License");
56351 * you may not use this file except in compliance with the License.
56352 * You may obtain a copy of the License at
56353 *
56354 *   http://www.apache.org/licenses/LICENSE-2.0
56355 *
56356 * Unless required by applicable law or agreed to in writing, software
56357 * distributed under the License is distributed on an "AS IS" BASIS,
56358 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
56359 * See the License for the specific language governing permissions and
56360 * limitations under the License.
56361 */
56362
56363
56364/**
56365 * The data structure representing a diff is an array of tuples:
56366 * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]
56367 * which means: delete 'Hello', add 'Goodbye' and keep ' world.'
56368 */
56369var DIFF_DELETE = -1;
56370var DIFF_INSERT = 1;
56371var DIFF_EQUAL = 0;
56372
56373
56374/**
56375 * Find the differences between two texts.  Simplifies the problem by stripping
56376 * any common prefix or suffix off the texts before diffing.
56377 * @param {string} text1 Old string to be diffed.
56378 * @param {string} text2 New string to be diffed.
56379 * @param {Int} cursor_pos Expected edit position in text1 (optional)
56380 * @return {Array} Array of diff tuples.
56381 */
56382function diff_main(text1, text2, cursor_pos) {
56383  // Check for equality (speedup).
56384  if (text1 == text2) {
56385    if (text1) {
56386      return [[DIFF_EQUAL, text1]];
56387    }
56388    return [];
56389  }
56390
56391  // Check cursor_pos within bounds
56392  if (cursor_pos < 0 || text1.length < cursor_pos) {
56393    cursor_pos = null;
56394  }
56395
56396  // Trim off common prefix (speedup).
56397  var commonlength = diff_commonPrefix(text1, text2);
56398  var commonprefix = text1.substring(0, commonlength);
56399  text1 = text1.substring(commonlength);
56400  text2 = text2.substring(commonlength);
56401
56402  // Trim off common suffix (speedup).
56403  commonlength = diff_commonSuffix(text1, text2);
56404  var commonsuffix = text1.substring(text1.length - commonlength);
56405  text1 = text1.substring(0, text1.length - commonlength);
56406  text2 = text2.substring(0, text2.length - commonlength);
56407
56408  // Compute the diff on the middle block.
56409  var diffs = diff_compute_(text1, text2);
56410
56411  // Restore the prefix and suffix.
56412  if (commonprefix) {
56413    diffs.unshift([DIFF_EQUAL, commonprefix]);
56414  }
56415  if (commonsuffix) {
56416    diffs.push([DIFF_EQUAL, commonsuffix]);
56417  }
56418  diff_cleanupMerge(diffs);
56419  if (cursor_pos != null) {
56420    diffs = fix_cursor(diffs, cursor_pos);
56421  }
56422  diffs = fix_emoji(diffs);
56423  return diffs;
56424};
56425
56426
56427/**
56428 * Find the differences between two texts.  Assumes that the texts do not
56429 * have any common prefix or suffix.
56430 * @param {string} text1 Old string to be diffed.
56431 * @param {string} text2 New string to be diffed.
56432 * @return {Array} Array of diff tuples.
56433 */
56434function diff_compute_(text1, text2) {
56435  var diffs;
56436
56437  if (!text1) {
56438    // Just add some text (speedup).
56439    return [[DIFF_INSERT, text2]];
56440  }
56441
56442  if (!text2) {
56443    // Just delete some text (speedup).
56444    return [[DIFF_DELETE, text1]];
56445  }
56446
56447  var longtext = text1.length > text2.length ? text1 : text2;
56448  var shorttext = text1.length > text2.length ? text2 : text1;
56449  var i = longtext.indexOf(shorttext);
56450  if (i != -1) {
56451    // Shorter text is inside the longer text (speedup).
56452    diffs = [[DIFF_INSERT, longtext.substring(0, i)],
56453             [DIFF_EQUAL, shorttext],
56454             [DIFF_INSERT, longtext.substring(i + shorttext.length)]];
56455    // Swap insertions for deletions if diff is reversed.
56456    if (text1.length > text2.length) {
56457      diffs[0][0] = diffs[2][0] = DIFF_DELETE;
56458    }
56459    return diffs;
56460  }
56461
56462  if (shorttext.length == 1) {
56463    // Single character string.
56464    // After the previous speedup, the character can't be an equality.
56465    return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]];
56466  }
56467
56468  // Check to see if the problem can be split in two.
56469  var hm = diff_halfMatch_(text1, text2);
56470  if (hm) {
56471    // A half-match was found, sort out the return data.
56472    var text1_a = hm[0];
56473    var text1_b = hm[1];
56474    var text2_a = hm[2];
56475    var text2_b = hm[3];
56476    var mid_common = hm[4];
56477    // Send both pairs off for separate processing.
56478    var diffs_a = diff_main(text1_a, text2_a);
56479    var diffs_b = diff_main(text1_b, text2_b);
56480    // Merge the results.
56481    return diffs_a.concat([[DIFF_EQUAL, mid_common]], diffs_b);
56482  }
56483
56484  return diff_bisect_(text1, text2);
56485};
56486
56487
56488/**
56489 * Find the 'middle snake' of a diff, split the problem in two
56490 * and return the recursively constructed diff.
56491 * See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.
56492 * @param {string} text1 Old string to be diffed.
56493 * @param {string} text2 New string to be diffed.
56494 * @return {Array} Array of diff tuples.
56495 * @private
56496 */
56497function diff_bisect_(text1, text2) {
56498  // Cache the text lengths to prevent multiple calls.
56499  var text1_length = text1.length;
56500  var text2_length = text2.length;
56501  var max_d = Math.ceil((text1_length + text2_length) / 2);
56502  var v_offset = max_d;
56503  var v_length = 2 * max_d;
56504  var v1 = new Array(v_length);
56505  var v2 = new Array(v_length);
56506  // Setting all elements to -1 is faster in Chrome & Firefox than mixing
56507  // integers and undefined.
56508  for (var x = 0; x < v_length; x++) {
56509    v1[x] = -1;
56510    v2[x] = -1;
56511  }
56512  v1[v_offset + 1] = 0;
56513  v2[v_offset + 1] = 0;
56514  var delta = text1_length - text2_length;
56515  // If the total number of characters is odd, then the front path will collide
56516  // with the reverse path.
56517  var front = (delta % 2 != 0);
56518  // Offsets for start and end of k loop.
56519  // Prevents mapping of space beyond the grid.
56520  var k1start = 0;
56521  var k1end = 0;
56522  var k2start = 0;
56523  var k2end = 0;
56524  for (var d = 0; d < max_d; d++) {
56525    // Walk the front path one step.
56526    for (var k1 = -d + k1start; k1 <= d - k1end; k1 += 2) {
56527      var k1_offset = v_offset + k1;
56528      var x1;
56529      if (k1 == -d || (k1 != d && v1[k1_offset - 1] < v1[k1_offset + 1])) {
56530        x1 = v1[k1_offset + 1];
56531      } else {
56532        x1 = v1[k1_offset - 1] + 1;
56533      }
56534      var y1 = x1 - k1;
56535      while (x1 < text1_length && y1 < text2_length &&
56536             text1.charAt(x1) == text2.charAt(y1)) {
56537        x1++;
56538        y1++;
56539      }
56540      v1[k1_offset] = x1;
56541      if (x1 > text1_length) {
56542        // Ran off the right of the graph.
56543        k1end += 2;
56544      } else if (y1 > text2_length) {
56545        // Ran off the bottom of the graph.
56546        k1start += 2;
56547      } else if (front) {
56548        var k2_offset = v_offset + delta - k1;
56549        if (k2_offset >= 0 && k2_offset < v_length && v2[k2_offset] != -1) {
56550          // Mirror x2 onto top-left coordinate system.
56551          var x2 = text1_length - v2[k2_offset];
56552          if (x1 >= x2) {
56553            // Overlap detected.
56554            return diff_bisectSplit_(text1, text2, x1, y1);
56555          }
56556        }
56557      }
56558    }
56559
56560    // Walk the reverse path one step.
56561    for (var k2 = -d + k2start; k2 <= d - k2end; k2 += 2) {
56562      var k2_offset = v_offset + k2;
56563      var x2;
56564      if (k2 == -d || (k2 != d && v2[k2_offset - 1] < v2[k2_offset + 1])) {
56565        x2 = v2[k2_offset + 1];
56566      } else {
56567        x2 = v2[k2_offset - 1] + 1;
56568      }
56569      var y2 = x2 - k2;
56570      while (x2 < text1_length && y2 < text2_length &&
56571             text1.charAt(text1_length - x2 - 1) ==
56572             text2.charAt(text2_length - y2 - 1)) {
56573        x2++;
56574        y2++;
56575      }
56576      v2[k2_offset] = x2;
56577      if (x2 > text1_length) {
56578        // Ran off the left of the graph.
56579        k2end += 2;
56580      } else if (y2 > text2_length) {
56581        // Ran off the top of the graph.
56582        k2start += 2;
56583      } else if (!front) {
56584        var k1_offset = v_offset + delta - k2;
56585        if (k1_offset >= 0 && k1_offset < v_length && v1[k1_offset] != -1) {
56586          var x1 = v1[k1_offset];
56587          var y1 = v_offset + x1 - k1_offset;
56588          // Mirror x2 onto top-left coordinate system.
56589          x2 = text1_length - x2;
56590          if (x1 >= x2) {
56591            // Overlap detected.
56592            return diff_bisectSplit_(text1, text2, x1, y1);
56593          }
56594        }
56595      }
56596    }
56597  }
56598  // Diff took too long and hit the deadline or
56599  // number of diffs equals number of characters, no commonality at all.
56600  return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]];
56601};
56602
56603
56604/**
56605 * Given the location of the 'middle snake', split the diff in two parts
56606 * and recurse.
56607 * @param {string} text1 Old string to be diffed.
56608 * @param {string} text2 New string to be diffed.
56609 * @param {number} x Index of split point in text1.
56610 * @param {number} y Index of split point in text2.
56611 * @return {Array} Array of diff tuples.
56612 */
56613function diff_bisectSplit_(text1, text2, x, y) {
56614  var text1a = text1.substring(0, x);
56615  var text2a = text2.substring(0, y);
56616  var text1b = text1.substring(x);
56617  var text2b = text2.substring(y);
56618
56619  // Compute both diffs serially.
56620  var diffs = diff_main(text1a, text2a);
56621  var diffsb = diff_main(text1b, text2b);
56622
56623  return diffs.concat(diffsb);
56624};
56625
56626
56627/**
56628 * Determine the common prefix of two strings.
56629 * @param {string} text1 First string.
56630 * @param {string} text2 Second string.
56631 * @return {number} The number of characters common to the start of each
56632 *     string.
56633 */
56634function diff_commonPrefix(text1, text2) {
56635  // Quick check for common null cases.
56636  if (!text1 || !text2 || text1.charAt(0) != text2.charAt(0)) {
56637    return 0;
56638  }
56639  // Binary search.
56640  // Performance analysis: http://neil.fraser.name/news/2007/10/09/
56641  var pointermin = 0;
56642  var pointermax = Math.min(text1.length, text2.length);
56643  var pointermid = pointermax;
56644  var pointerstart = 0;
56645  while (pointermin < pointermid) {
56646    if (text1.substring(pointerstart, pointermid) ==
56647        text2.substring(pointerstart, pointermid)) {
56648      pointermin = pointermid;
56649      pointerstart = pointermin;
56650    } else {
56651      pointermax = pointermid;
56652    }
56653    pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);
56654  }
56655  return pointermid;
56656};
56657
56658
56659/**
56660 * Determine the common suffix of two strings.
56661 * @param {string} text1 First string.
56662 * @param {string} text2 Second string.
56663 * @return {number} The number of characters common to the end of each string.
56664 */
56665function diff_commonSuffix(text1, text2) {
56666  // Quick check for common null cases.
56667  if (!text1 || !text2 ||
56668      text1.charAt(text1.length - 1) != text2.charAt(text2.length - 1)) {
56669    return 0;
56670  }
56671  // Binary search.
56672  // Performance analysis: http://neil.fraser.name/news/2007/10/09/
56673  var pointermin = 0;
56674  var pointermax = Math.min(text1.length, text2.length);
56675  var pointermid = pointermax;
56676  var pointerend = 0;
56677  while (pointermin < pointermid) {
56678    if (text1.substring(text1.length - pointermid, text1.length - pointerend) ==
56679        text2.substring(text2.length - pointermid, text2.length - pointerend)) {
56680      pointermin = pointermid;
56681      pointerend = pointermin;
56682    } else {
56683      pointermax = pointermid;
56684    }
56685    pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);
56686  }
56687  return pointermid;
56688};
56689
56690
56691/**
56692 * Do the two texts share a substring which is at least half the length of the
56693 * longer text?
56694 * This speedup can produce non-minimal diffs.
56695 * @param {string} text1 First string.
56696 * @param {string} text2 Second string.
56697 * @return {Array.<string>} Five element Array, containing the prefix of
56698 *     text1, the suffix of text1, the prefix of text2, the suffix of
56699 *     text2 and the common middle.  Or null if there was no match.
56700 */
56701function diff_halfMatch_(text1, text2) {
56702  var longtext = text1.length > text2.length ? text1 : text2;
56703  var shorttext = text1.length > text2.length ? text2 : text1;
56704  if (longtext.length < 4 || shorttext.length * 2 < longtext.length) {
56705    return null;  // Pointless.
56706  }
56707
56708  /**
56709   * Does a substring of shorttext exist within longtext such that the substring
56710   * is at least half the length of longtext?
56711   * Closure, but does not reference any external variables.
56712   * @param {string} longtext Longer string.
56713   * @param {string} shorttext Shorter string.
56714   * @param {number} i Start index of quarter length substring within longtext.
56715   * @return {Array.<string>} Five element Array, containing the prefix of
56716   *     longtext, the suffix of longtext, the prefix of shorttext, the suffix
56717   *     of shorttext and the common middle.  Or null if there was no match.
56718   * @private
56719   */
56720  function diff_halfMatchI_(longtext, shorttext, i) {
56721    // Start with a 1/4 length substring at position i as a seed.
56722    var seed = longtext.substring(i, i + Math.floor(longtext.length / 4));
56723    var j = -1;
56724    var best_common = '';
56725    var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;
56726    while ((j = shorttext.indexOf(seed, j + 1)) != -1) {
56727      var prefixLength = diff_commonPrefix(longtext.substring(i),
56728                                           shorttext.substring(j));
56729      var suffixLength = diff_commonSuffix(longtext.substring(0, i),
56730                                           shorttext.substring(0, j));
56731      if (best_common.length < suffixLength + prefixLength) {
56732        best_common = shorttext.substring(j - suffixLength, j) +
56733            shorttext.substring(j, j + prefixLength);
56734        best_longtext_a = longtext.substring(0, i - suffixLength);
56735        best_longtext_b = longtext.substring(i + prefixLength);
56736        best_shorttext_a = shorttext.substring(0, j - suffixLength);
56737        best_shorttext_b = shorttext.substring(j + prefixLength);
56738      }
56739    }
56740    if (best_common.length * 2 >= longtext.length) {
56741      return [best_longtext_a, best_longtext_b,
56742              best_shorttext_a, best_shorttext_b, best_common];
56743    } else {
56744      return null;
56745    }
56746  }
56747
56748  // First check if the second quarter is the seed for a half-match.
56749  var hm1 = diff_halfMatchI_(longtext, shorttext,
56750                             Math.ceil(longtext.length / 4));
56751  // Check again based on the third quarter.
56752  var hm2 = diff_halfMatchI_(longtext, shorttext,
56753                             Math.ceil(longtext.length / 2));
56754  var hm;
56755  if (!hm1 && !hm2) {
56756    return null;
56757  } else if (!hm2) {
56758    hm = hm1;
56759  } else if (!hm1) {
56760    hm = hm2;
56761  } else {
56762    // Both matched.  Select the longest.
56763    hm = hm1[4].length > hm2[4].length ? hm1 : hm2;
56764  }
56765
56766  // A half-match was found, sort out the return data.
56767  var text1_a, text1_b, text2_a, text2_b;
56768  if (text1.length > text2.length) {
56769    text1_a = hm[0];
56770    text1_b = hm[1];
56771    text2_a = hm[2];
56772    text2_b = hm[3];
56773  } else {
56774    text2_a = hm[0];
56775    text2_b = hm[1];
56776    text1_a = hm[2];
56777    text1_b = hm[3];
56778  }
56779  var mid_common = hm[4];
56780  return [text1_a, text1_b, text2_a, text2_b, mid_common];
56781};
56782
56783
56784/**
56785 * Reorder and merge like edit sections.  Merge equalities.
56786 * Any edit section can move as long as it doesn't cross an equality.
56787 * @param {Array} diffs Array of diff tuples.
56788 */
56789function diff_cleanupMerge(diffs) {
56790  diffs.push([DIFF_EQUAL, '']);  // Add a dummy entry at the end.
56791  var pointer = 0;
56792  var count_delete = 0;
56793  var count_insert = 0;
56794  var text_delete = '';
56795  var text_insert = '';
56796  var commonlength;
56797  while (pointer < diffs.length) {
56798    switch (diffs[pointer][0]) {
56799      case DIFF_INSERT:
56800        count_insert++;
56801        text_insert += diffs[pointer][1];
56802        pointer++;
56803        break;
56804      case DIFF_DELETE:
56805        count_delete++;
56806        text_delete += diffs[pointer][1];
56807        pointer++;
56808        break;
56809      case DIFF_EQUAL:
56810        // Upon reaching an equality, check for prior redundancies.
56811        if (count_delete + count_insert > 1) {
56812          if (count_delete !== 0 && count_insert !== 0) {
56813            // Factor out any common prefixies.
56814            commonlength = diff_commonPrefix(text_insert, text_delete);
56815            if (commonlength !== 0) {
56816              if ((pointer - count_delete - count_insert) > 0 &&
56817                  diffs[pointer - count_delete - count_insert - 1][0] ==
56818                  DIFF_EQUAL) {
56819                diffs[pointer - count_delete - count_insert - 1][1] +=
56820                    text_insert.substring(0, commonlength);
56821              } else {
56822                diffs.splice(0, 0, [DIFF_EQUAL,
56823                                    text_insert.substring(0, commonlength)]);
56824                pointer++;
56825              }
56826              text_insert = text_insert.substring(commonlength);
56827              text_delete = text_delete.substring(commonlength);
56828            }
56829            // Factor out any common suffixies.
56830            commonlength = diff_commonSuffix(text_insert, text_delete);
56831            if (commonlength !== 0) {
56832              diffs[pointer][1] = text_insert.substring(text_insert.length -
56833                  commonlength) + diffs[pointer][1];
56834              text_insert = text_insert.substring(0, text_insert.length -
56835                  commonlength);
56836              text_delete = text_delete.substring(0, text_delete.length -
56837                  commonlength);
56838            }
56839          }
56840          // Delete the offending records and add the merged ones.
56841          if (count_delete === 0) {
56842            diffs.splice(pointer - count_insert,
56843                count_delete + count_insert, [DIFF_INSERT, text_insert]);
56844          } else if (count_insert === 0) {
56845            diffs.splice(pointer - count_delete,
56846                count_delete + count_insert, [DIFF_DELETE, text_delete]);
56847          } else {
56848            diffs.splice(pointer - count_delete - count_insert,
56849                count_delete + count_insert, [DIFF_DELETE, text_delete],
56850                [DIFF_INSERT, text_insert]);
56851          }
56852          pointer = pointer - count_delete - count_insert +
56853                    (count_delete ? 1 : 0) + (count_insert ? 1 : 0) + 1;
56854        } else if (pointer !== 0 && diffs[pointer - 1][0] == DIFF_EQUAL) {
56855          // Merge this equality with the previous one.
56856          diffs[pointer - 1][1] += diffs[pointer][1];
56857          diffs.splice(pointer, 1);
56858        } else {
56859          pointer++;
56860        }
56861        count_insert = 0;
56862        count_delete = 0;
56863        text_delete = '';
56864        text_insert = '';
56865        break;
56866    }
56867  }
56868  if (diffs[diffs.length - 1][1] === '') {
56869    diffs.pop();  // Remove the dummy entry at the end.
56870  }
56871
56872  // Second pass: look for single edits surrounded on both sides by equalities
56873  // which can be shifted sideways to eliminate an equality.
56874  // e.g: A<ins>BA</ins>C -> <ins>AB</ins>AC
56875  var changes = false;
56876  pointer = 1;
56877  // Intentionally ignore the first and last element (don't need checking).
56878  while (pointer < diffs.length - 1) {
56879    if (diffs[pointer - 1][0] == DIFF_EQUAL &&
56880        diffs[pointer + 1][0] == DIFF_EQUAL) {
56881      // This is a single edit surrounded by equalities.
56882      if (diffs[pointer][1].substring(diffs[pointer][1].length -
56883          diffs[pointer - 1][1].length) == diffs[pointer - 1][1]) {
56884        // Shift the edit over the previous equality.
56885        diffs[pointer][1] = diffs[pointer - 1][1] +
56886            diffs[pointer][1].substring(0, diffs[pointer][1].length -
56887                                        diffs[pointer - 1][1].length);
56888        diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1];
56889        diffs.splice(pointer - 1, 1);
56890        changes = true;
56891      } else if (diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) ==
56892          diffs[pointer + 1][1]) {
56893        // Shift the edit over the next equality.
56894        diffs[pointer - 1][1] += diffs[pointer + 1][1];
56895        diffs[pointer][1] =
56896            diffs[pointer][1].substring(diffs[pointer + 1][1].length) +
56897            diffs[pointer + 1][1];
56898        diffs.splice(pointer + 1, 1);
56899        changes = true;
56900      }
56901    }
56902    pointer++;
56903  }
56904  // If shifts were made, the diff needs reordering and another shift sweep.
56905  if (changes) {
56906    diff_cleanupMerge(diffs);
56907  }
56908};
56909
56910
56911var diff = diff_main;
56912diff.INSERT = DIFF_INSERT;
56913diff.DELETE = DIFF_DELETE;
56914diff.EQUAL = DIFF_EQUAL;
56915
56916module.exports = diff;
56917
56918/*
56919 * Modify a diff such that the cursor position points to the start of a change:
56920 * E.g.
56921 *   cursor_normalize_diff([[DIFF_EQUAL, 'abc']], 1)
56922 *     => [1, [[DIFF_EQUAL, 'a'], [DIFF_EQUAL, 'bc']]]
56923 *   cursor_normalize_diff([[DIFF_INSERT, 'new'], [DIFF_DELETE, 'xyz']], 2)
56924 *     => [2, [[DIFF_INSERT, 'new'], [DIFF_DELETE, 'xy'], [DIFF_DELETE, 'z']]]
56925 *
56926 * @param {Array} diffs Array of diff tuples
56927 * @param {Int} cursor_pos Suggested edit position. Must not be out of bounds!
56928 * @return {Array} A tuple [cursor location in the modified diff, modified diff]
56929 */
56930function cursor_normalize_diff (diffs, cursor_pos) {
56931  if (cursor_pos === 0) {
56932    return [DIFF_EQUAL, diffs];
56933  }
56934  for (var current_pos = 0, i = 0; i < diffs.length; i++) {
56935    var d = diffs[i];
56936    if (d[0] === DIFF_DELETE || d[0] === DIFF_EQUAL) {
56937      var next_pos = current_pos + d[1].length;
56938      if (cursor_pos === next_pos) {
56939        return [i + 1, diffs];
56940      } else if (cursor_pos < next_pos) {
56941        // copy to prevent side effects
56942        diffs = diffs.slice();
56943        // split d into two diff changes
56944        var split_pos = cursor_pos - current_pos;
56945        var d_left = [d[0], d[1].slice(0, split_pos)];
56946        var d_right = [d[0], d[1].slice(split_pos)];
56947        diffs.splice(i, 1, d_left, d_right);
56948        return [i + 1, diffs];
56949      } else {
56950        current_pos = next_pos;
56951      }
56952    }
56953  }
56954  throw new Error('cursor_pos is out of bounds!')
56955}
56956
56957/*
56958 * Modify a diff such that the edit position is "shifted" to the proposed edit location (cursor_position).
56959 *
56960 * Case 1)
56961 *   Check if a naive shift is possible:
56962 *     [0, X], [ 1, Y] -> [ 1, Y], [0, X]    (if X + Y === Y + X)
56963 *     [0, X], [-1, Y] -> [-1, Y], [0, X]    (if X + Y === Y + X) - holds same result
56964 * Case 2)
56965 *   Check if the following shifts are possible:
56966 *     [0, 'pre'], [ 1, 'prefix'] -> [ 1, 'pre'], [0, 'pre'], [ 1, 'fix']
56967 *     [0, 'pre'], [-1, 'prefix'] -> [-1, 'pre'], [0, 'pre'], [-1, 'fix']
56968 *         ^            ^
56969 *         d          d_next
56970 *
56971 * @param {Array} diffs Array of diff tuples
56972 * @param {Int} cursor_pos Suggested edit position. Must not be out of bounds!
56973 * @return {Array} Array of diff tuples
56974 */
56975function fix_cursor (diffs, cursor_pos) {
56976  var norm = cursor_normalize_diff(diffs, cursor_pos);
56977  var ndiffs = norm[1];
56978  var cursor_pointer = norm[0];
56979  var d = ndiffs[cursor_pointer];
56980  var d_next = ndiffs[cursor_pointer + 1];
56981
56982  if (d == null) {
56983    // Text was deleted from end of original string,
56984    // cursor is now out of bounds in new string
56985    return diffs;
56986  } else if (d[0] !== DIFF_EQUAL) {
56987    // A modification happened at the cursor location.
56988    // This is the expected outcome, so we can return the original diff.
56989    return diffs;
56990  } else {
56991    if (d_next != null && d[1] + d_next[1] === d_next[1] + d[1]) {
56992      // Case 1)
56993      // It is possible to perform a naive shift
56994      ndiffs.splice(cursor_pointer, 2, d_next, d)
56995      return merge_tuples(ndiffs, cursor_pointer, 2)
56996    } else if (d_next != null && d_next[1].indexOf(d[1]) === 0) {
56997      // Case 2)
56998      // d[1] is a prefix of d_next[1]
56999      // We can assume that d_next[0] !== 0, since d[0] === 0
57000      // Shift edit locations..
57001      ndiffs.splice(cursor_pointer, 2, [d_next[0], d[1]], [0, d[1]]);
57002      var suffix = d_next[1].slice(d[1].length);
57003      if (suffix.length > 0) {
57004        ndiffs.splice(cursor_pointer + 2, 0, [d_next[0], suffix]);
57005      }
57006      return merge_tuples(ndiffs, cursor_pointer, 3)
57007    } else {
57008      // Not possible to perform any modification
57009      return diffs;
57010    }
57011  }
57012}
57013
57014/*
57015 * Check diff did not split surrogate pairs.
57016 * Ex. [0, '\uD83D'], [-1, '\uDC36'], [1, '\uDC2F'] -> [-1, '\uD83D\uDC36'], [1, '\uD83D\uDC2F']
57017 *     '\uD83D\uDC36' === '🐶', '\uD83D\uDC2F' === '🐯'
57018 *
57019 * @param {Array} diffs Array of diff tuples
57020 * @return {Array} Array of diff tuples
57021 */
57022function fix_emoji (diffs) {
57023  var compact = false;
57024  var starts_with_pair_end = function(str) {
57025    return str.charCodeAt(0) >= 0xDC00 && str.charCodeAt(0) <= 0xDFFF;
57026  }
57027  var ends_with_pair_start = function(str) {
57028    return str.charCodeAt(str.length-1) >= 0xD800 && str.charCodeAt(str.length-1) <= 0xDBFF;
57029  }
57030  for (var i = 2; i < diffs.length; i += 1) {
57031    if (diffs[i-2][0] === DIFF_EQUAL && ends_with_pair_start(diffs[i-2][1]) &&
57032        diffs[i-1][0] === DIFF_DELETE && starts_with_pair_end(diffs[i-1][1]) &&
57033        diffs[i][0] === DIFF_INSERT && starts_with_pair_end(diffs[i][1])) {
57034      compact = true;
57035
57036      diffs[i-1][1] = diffs[i-2][1].slice(-1) + diffs[i-1][1];
57037      diffs[i][1] = diffs[i-2][1].slice(-1) + diffs[i][1];
57038
57039      diffs[i-2][1] = diffs[i-2][1].slice(0, -1);
57040    }
57041  }
57042  if (!compact) {
57043    return diffs;
57044  }
57045  var fixed_diffs = [];
57046  for (var i = 0; i < diffs.length; i += 1) {
57047    if (diffs[i][1].length > 0) {
57048      fixed_diffs.push(diffs[i]);
57049    }
57050  }
57051  return fixed_diffs;
57052}
57053
57054/*
57055 * Try to merge tuples with their neigbors in a given range.
57056 * E.g. [0, 'a'], [0, 'b'] -> [0, 'ab']
57057 *
57058 * @param {Array} diffs Array of diff tuples.
57059 * @param {Int} start Position of the first element to merge (diffs[start] is also merged with diffs[start - 1]).
57060 * @param {Int} length Number of consecutive elements to check.
57061 * @return {Array} Array of merged diff tuples.
57062 */
57063function merge_tuples (diffs, start, length) {
57064  // Check from (start-1) to (start+length).
57065  for (var i = start + length - 1; i >= 0 && i >= start - 1; i--) {
57066    if (i + 1 < diffs.length) {
57067      var left_d = diffs[i];
57068      var right_d = diffs[i+1];
57069      if (left_d[0] === right_d[1]) {
57070        diffs.splice(i, 2, [left_d[0], left_d[1] + right_d[1]]);
57071      }
57072    }
57073  }
57074  return diffs;
57075}
57076
57077
57078/***/ }),
57079/* 52 */
57080/***/ (function(module, exports) {
57081
57082exports = module.exports = typeof Object.keys === 'function'
57083  ? Object.keys : shim;
57084
57085exports.shim = shim;
57086function shim (obj) {
57087  var keys = [];
57088  for (var key in obj) keys.push(key);
57089  return keys;
57090}
57091
57092
57093/***/ }),
57094/* 53 */
57095/***/ (function(module, exports) {
57096
57097var supportsArgumentsClass = (function(){
57098  return Object.prototype.toString.call(arguments)
57099})() == '[object Arguments]';
57100
57101exports = module.exports = supportsArgumentsClass ? supported : unsupported;
57102
57103exports.supported = supported;
57104function supported(object) {
57105  return Object.prototype.toString.call(object) == '[object Arguments]';
57106};
57107
57108exports.unsupported = unsupported;
57109function unsupported(object){
57110  return object &&
57111    typeof object == 'object' &&
57112    typeof object.length == 'number' &&
57113    Object.prototype.hasOwnProperty.call(object, 'callee') &&
57114    !Object.prototype.propertyIsEnumerable.call(object, 'callee') ||
57115    false;
57116};
57117
57118
57119/***/ }),
57120/* 54 */
57121/***/ (function(module, exports) {
57122
57123'use strict';
57124
57125var has = Object.prototype.hasOwnProperty
57126  , prefix = '~';
57127
57128/**
57129 * Constructor to create a storage for our `EE` objects.
57130 * An `Events` instance is a plain object whose properties are event names.
57131 *
57132 * @constructor
57133 * @api private
57134 */
57135function Events() {}
57136
57137//
57138// We try to not inherit from `Object.prototype`. In some engines creating an
57139// instance in this way is faster than calling `Object.create(null)` directly.
57140// If `Object.create(null)` is not supported we prefix the event names with a
57141// character to make sure that the built-in object properties are not
57142// overridden or used as an attack vector.
57143//
57144if (Object.create) {
57145  Events.prototype = Object.create(null);
57146
57147  //
57148  // This hack is needed because the `__proto__` property is still inherited in
57149  // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.
57150  //
57151  if (!new Events().__proto__) prefix = false;
57152}
57153
57154/**
57155 * Representation of a single event listener.
57156 *
57157 * @param {Function} fn The listener function.
57158 * @param {Mixed} context The context to invoke the listener with.
57159 * @param {Boolean} [once=false] Specify if the listener is a one-time listener.
57160 * @constructor
57161 * @api private
57162 */
57163function EE(fn, context, once) {
57164  this.fn = fn;
57165  this.context = context;
57166  this.once = once || false;
57167}
57168
57169/**
57170 * Minimal `EventEmitter` interface that is molded against the Node.js
57171 * `EventEmitter` interface.
57172 *
57173 * @constructor
57174 * @api public
57175 */
57176function EventEmitter() {
57177  this._events = new Events();
57178  this._eventsCount = 0;
57179}
57180
57181/**
57182 * Return an array listing the events for which the emitter has registered
57183 * listeners.
57184 *
57185 * @returns {Array}
57186 * @api public
57187 */
57188EventEmitter.prototype.eventNames = function eventNames() {
57189  var names = []
57190    , events
57191    , name;
57192
57193  if (this._eventsCount === 0) return names;
57194
57195  for (name in (events = this._events)) {
57196    if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);
57197  }
57198
57199  if (Object.getOwnPropertySymbols) {
57200    return names.concat(Object.getOwnPropertySymbols(events));
57201  }
57202
57203  return names;
57204};
57205
57206/**
57207 * Return the listeners registered for a given event.
57208 *
57209 * @param {String|Symbol} event The event name.
57210 * @param {Boolean} exists Only check if there are listeners.
57211 * @returns {Array|Boolean}
57212 * @api public
57213 */
57214EventEmitter.prototype.listeners = function listeners(event, exists) {
57215  var evt = prefix ? prefix + event : event
57216    , available = this._events[evt];
57217
57218  if (exists) return !!available;
57219  if (!available) return [];
57220  if (available.fn) return [available.fn];
57221
57222  for (var i = 0, l = available.length, ee = new Array(l); i < l; i++) {
57223    ee[i] = available[i].fn;
57224  }
57225
57226  return ee;
57227};
57228
57229/**
57230 * Calls each of the listeners registered for a given event.
57231 *
57232 * @param {String|Symbol} event The event name.
57233 * @returns {Boolean} `true` if the event had listeners, else `false`.
57234 * @api public
57235 */
57236EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
57237  var evt = prefix ? prefix + event : event;
57238
57239  if (!this._events[evt]) return false;
57240
57241  var listeners = this._events[evt]
57242    , len = arguments.length
57243    , args
57244    , i;
57245
57246  if (listeners.fn) {
57247    if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);
57248
57249    switch (len) {
57250      case 1: return listeners.fn.call(listeners.context), true;
57251      case 2: return listeners.fn.call(listeners.context, a1), true;
57252      case 3: return listeners.fn.call(listeners.context, a1, a2), true;
57253      case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;
57254      case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;
57255      case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
57256    }
57257
57258    for (i = 1, args = new Array(len -1); i < len; i++) {
57259      args[i - 1] = arguments[i];
57260    }
57261
57262    listeners.fn.apply(listeners.context, args);
57263  } else {
57264    var length = listeners.length
57265      , j;
57266
57267    for (i = 0; i < length; i++) {
57268      if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);
57269
57270      switch (len) {
57271        case 1: listeners[i].fn.call(listeners[i].context); break;
57272        case 2: listeners[i].fn.call(listeners[i].context, a1); break;
57273        case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;
57274        case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;
57275        default:
57276          if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {
57277            args[j - 1] = arguments[j];
57278          }
57279
57280          listeners[i].fn.apply(listeners[i].context, args);
57281      }
57282    }
57283  }
57284
57285  return true;
57286};
57287
57288/**
57289 * Add a listener for a given event.
57290 *
57291 * @param {String|Symbol} event The event name.
57292 * @param {Function} fn The listener function.
57293 * @param {Mixed} [context=this] The context to invoke the listener with.
57294 * @returns {EventEmitter} `this`.
57295 * @api public
57296 */
57297EventEmitter.prototype.on = function on(event, fn, context) {
57298  var listener = new EE(fn, context || this)
57299    , evt = prefix ? prefix + event : event;
57300
57301  if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++;
57302  else if (!this._events[evt].fn) this._events[evt].push(listener);
57303  else this._events[evt] = [this._events[evt], listener];
57304
57305  return this;
57306};
57307
57308/**
57309 * Add a one-time listener for a given event.
57310 *
57311 * @param {String|Symbol} event The event name.
57312 * @param {Function} fn The listener function.
57313 * @param {Mixed} [context=this] The context to invoke the listener with.
57314 * @returns {EventEmitter} `this`.
57315 * @api public
57316 */
57317EventEmitter.prototype.once = function once(event, fn, context) {
57318  var listener = new EE(fn, context || this, true)
57319    , evt = prefix ? prefix + event : event;
57320
57321  if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++;
57322  else if (!this._events[evt].fn) this._events[evt].push(listener);
57323  else this._events[evt] = [this._events[evt], listener];
57324
57325  return this;
57326};
57327
57328/**
57329 * Remove the listeners of a given event.
57330 *
57331 * @param {String|Symbol} event The event name.
57332 * @param {Function} fn Only remove the listeners that match this function.
57333 * @param {Mixed} context Only remove the listeners that have this context.
57334 * @param {Boolean} once Only remove one-time listeners.
57335 * @returns {EventEmitter} `this`.
57336 * @api public
57337 */
57338EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {
57339  var evt = prefix ? prefix + event : event;
57340
57341  if (!this._events[evt]) return this;
57342  if (!fn) {
57343    if (--this._eventsCount === 0) this._events = new Events();
57344    else delete this._events[evt];
57345    return this;
57346  }
57347
57348  var listeners = this._events[evt];
57349
57350  if (listeners.fn) {
57351    if (
57352         listeners.fn === fn
57353      && (!once || listeners.once)
57354      && (!context || listeners.context === context)
57355    ) {
57356      if (--this._eventsCount === 0) this._events = new Events();
57357      else delete this._events[evt];
57358    }
57359  } else {
57360    for (var i = 0, events = [], length = listeners.length; i < length; i++) {
57361      if (
57362           listeners[i].fn !== fn
57363        || (once && !listeners[i].once)
57364        || (context && listeners[i].context !== context)
57365      ) {
57366        events.push(listeners[i]);
57367      }
57368    }
57369
57370    //
57371    // Reset the array, or remove it completely if we have no more listeners.
57372    //
57373    if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;
57374    else if (--this._eventsCount === 0) this._events = new Events();
57375    else delete this._events[evt];
57376  }
57377
57378  return this;
57379};
57380
57381/**
57382 * Remove all listeners, or those of the specified event.
57383 *
57384 * @param {String|Symbol} [event] The event name.
57385 * @returns {EventEmitter} `this`.
57386 * @api public
57387 */
57388EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
57389  var evt;
57390
57391  if (event) {
57392    evt = prefix ? prefix + event : event;
57393    if (this._events[evt]) {
57394      if (--this._eventsCount === 0) this._events = new Events();
57395      else delete this._events[evt];
57396    }
57397  } else {
57398    this._events = new Events();
57399    this._eventsCount = 0;
57400  }
57401
57402  return this;
57403};
57404
57405//
57406// Alias methods names because people roll like that.
57407//
57408EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
57409EventEmitter.prototype.addListener = EventEmitter.prototype.on;
57410
57411//
57412// This function doesn't apply anymore.
57413//
57414EventEmitter.prototype.setMaxListeners = function setMaxListeners() {
57415  return this;
57416};
57417
57418//
57419// Expose the prefix.
57420//
57421EventEmitter.prefixed = prefix;
57422
57423//
57424// Allow `EventEmitter` to be imported as module namespace.
57425//
57426EventEmitter.EventEmitter = EventEmitter;
57427
57428//
57429// Expose the module.
57430//
57431if ('undefined' !== typeof module) {
57432  module.exports = EventEmitter;
57433}
57434
57435
57436/***/ }),
57437/* 55 */
57438/***/ (function(module, exports, __webpack_require__) {
57439
57440"use strict";
57441
57442
57443Object.defineProperty(exports, "__esModule", {
57444  value: true
57445});
57446exports.matchText = exports.matchSpacing = exports.matchNewline = exports.matchBlot = exports.matchAttributor = exports.default = undefined;
57447
57448var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
57449
57450var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
57451
57452var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
57453
57454var _extend2 = __webpack_require__(3);
57455
57456var _extend3 = _interopRequireDefault(_extend2);
57457
57458var _quillDelta = __webpack_require__(2);
57459
57460var _quillDelta2 = _interopRequireDefault(_quillDelta);
57461
57462var _parchment = __webpack_require__(0);
57463
57464var _parchment2 = _interopRequireDefault(_parchment);
57465
57466var _quill = __webpack_require__(5);
57467
57468var _quill2 = _interopRequireDefault(_quill);
57469
57470var _logger = __webpack_require__(10);
57471
57472var _logger2 = _interopRequireDefault(_logger);
57473
57474var _module = __webpack_require__(9);
57475
57476var _module2 = _interopRequireDefault(_module);
57477
57478var _align = __webpack_require__(36);
57479
57480var _background = __webpack_require__(37);
57481
57482var _code = __webpack_require__(13);
57483
57484var _code2 = _interopRequireDefault(_code);
57485
57486var _color = __webpack_require__(26);
57487
57488var _direction = __webpack_require__(38);
57489
57490var _font = __webpack_require__(39);
57491
57492var _size = __webpack_require__(40);
57493
57494function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
57495
57496function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
57497
57498function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
57499
57500function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
57501
57502function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
57503
57504var debug = (0, _logger2.default)('quill:clipboard');
57505
57506var DOM_KEY = '__ql-matcher';
57507
57508var CLIPBOARD_CONFIG = [[Node.TEXT_NODE, matchText], [Node.TEXT_NODE, matchNewline], ['br', matchBreak], [Node.ELEMENT_NODE, matchNewline], [Node.ELEMENT_NODE, matchBlot], [Node.ELEMENT_NODE, matchSpacing], [Node.ELEMENT_NODE, matchAttributor], [Node.ELEMENT_NODE, matchStyles], ['li', matchIndent], ['b', matchAlias.bind(matchAlias, 'bold')], ['i', matchAlias.bind(matchAlias, 'italic')], ['style', matchIgnore]];
57509
57510var ATTRIBUTE_ATTRIBUTORS = [_align.AlignAttribute, _direction.DirectionAttribute].reduce(function (memo, attr) {
57511  memo[attr.keyName] = attr;
57512  return memo;
57513}, {});
57514
57515var STYLE_ATTRIBUTORS = [_align.AlignStyle, _background.BackgroundStyle, _color.ColorStyle, _direction.DirectionStyle, _font.FontStyle, _size.SizeStyle].reduce(function (memo, attr) {
57516  memo[attr.keyName] = attr;
57517  return memo;
57518}, {});
57519
57520var Clipboard = function (_Module) {
57521  _inherits(Clipboard, _Module);
57522
57523  function Clipboard(quill, options) {
57524    _classCallCheck(this, Clipboard);
57525
57526    var _this = _possibleConstructorReturn(this, (Clipboard.__proto__ || Object.getPrototypeOf(Clipboard)).call(this, quill, options));
57527
57528    _this.quill.root.addEventListener('paste', _this.onPaste.bind(_this));
57529    _this.container = _this.quill.addContainer('ql-clipboard');
57530    _this.container.setAttribute('contenteditable', true);
57531    _this.container.setAttribute('tabindex', -1);
57532    _this.matchers = [];
57533    CLIPBOARD_CONFIG.concat(_this.options.matchers).forEach(function (_ref) {
57534      var _ref2 = _slicedToArray(_ref, 2),
57535          selector = _ref2[0],
57536          matcher = _ref2[1];
57537
57538      if (!options.matchVisual && matcher === matchSpacing) return;
57539      _this.addMatcher(selector, matcher);
57540    });
57541    return _this;
57542  }
57543
57544  _createClass(Clipboard, [{
57545    key: 'addMatcher',
57546    value: function addMatcher(selector, matcher) {
57547      this.matchers.push([selector, matcher]);
57548    }
57549  }, {
57550    key: 'convert',
57551    value: function convert(html) {
57552      if (typeof html === 'string') {
57553        this.container.innerHTML = html.replace(/\>\r?\n +\</g, '><'); // Remove spaces between tags
57554        return this.convert();
57555      }
57556      var formats = this.quill.getFormat(this.quill.selection.savedRange.index);
57557      if (formats[_code2.default.blotName]) {
57558        var text = this.container.innerText;
57559        this.container.innerHTML = '';
57560        return new _quillDelta2.default().insert(text, _defineProperty({}, _code2.default.blotName, formats[_code2.default.blotName]));
57561      }
57562
57563      var _prepareMatching = this.prepareMatching(),
57564          _prepareMatching2 = _slicedToArray(_prepareMatching, 2),
57565          elementMatchers = _prepareMatching2[0],
57566          textMatchers = _prepareMatching2[1];
57567
57568      var delta = traverse(this.container, elementMatchers, textMatchers);
57569      // Remove trailing newline
57570      if (deltaEndsWith(delta, '\n') && delta.ops[delta.ops.length - 1].attributes == null) {
57571        delta = delta.compose(new _quillDelta2.default().retain(delta.length() - 1).delete(1));
57572      }
57573      debug.log('convert', this.container.innerHTML, delta);
57574      this.container.innerHTML = '';
57575      return delta;
57576    }
57577  }, {
57578    key: 'dangerouslyPasteHTML',
57579    value: function dangerouslyPasteHTML(index, html) {
57580      var source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _quill2.default.sources.API;
57581
57582      if (typeof index === 'string') {
57583        this.quill.setContents(this.convert(index), html);
57584        this.quill.setSelection(0, _quill2.default.sources.SILENT);
57585      } else {
57586        var paste = this.convert(html);
57587        this.quill.updateContents(new _quillDelta2.default().retain(index).concat(paste), source);
57588        this.quill.setSelection(index + paste.length(), _quill2.default.sources.SILENT);
57589      }
57590    }
57591  }, {
57592    key: 'onPaste',
57593    value: function onPaste(e) {
57594      var _this2 = this;
57595
57596      if (e.defaultPrevented || !this.quill.isEnabled()) return;
57597      var range = this.quill.getSelection();
57598      var delta = new _quillDelta2.default().retain(range.index);
57599      var scrollTop = this.quill.scrollingContainer.scrollTop;
57600      this.container.focus();
57601      this.quill.selection.update(_quill2.default.sources.SILENT);
57602      setTimeout(function () {
57603        delta = delta.concat(_this2.convert()).delete(range.length);
57604        _this2.quill.updateContents(delta, _quill2.default.sources.USER);
57605        // range.length contributes to delta.length()
57606        _this2.quill.setSelection(delta.length() - range.length, _quill2.default.sources.SILENT);
57607        _this2.quill.scrollingContainer.scrollTop = scrollTop;
57608        _this2.quill.focus();
57609      }, 1);
57610    }
57611  }, {
57612    key: 'prepareMatching',
57613    value: function prepareMatching() {
57614      var _this3 = this;
57615
57616      var elementMatchers = [],
57617          textMatchers = [];
57618      this.matchers.forEach(function (pair) {
57619        var _pair = _slicedToArray(pair, 2),
57620            selector = _pair[0],
57621            matcher = _pair[1];
57622
57623        switch (selector) {
57624          case Node.TEXT_NODE:
57625            textMatchers.push(matcher);
57626            break;
57627          case Node.ELEMENT_NODE:
57628            elementMatchers.push(matcher);
57629            break;
57630          default:
57631            [].forEach.call(_this3.container.querySelectorAll(selector), function (node) {
57632              // TODO use weakmap
57633              node[DOM_KEY] = node[DOM_KEY] || [];
57634              node[DOM_KEY].push(matcher);
57635            });
57636            break;
57637        }
57638      });
57639      return [elementMatchers, textMatchers];
57640    }
57641  }]);
57642
57643  return Clipboard;
57644}(_module2.default);
57645
57646Clipboard.DEFAULTS = {
57647  matchers: [],
57648  matchVisual: true
57649};
57650
57651function applyFormat(delta, format, value) {
57652  if ((typeof format === 'undefined' ? 'undefined' : _typeof(format)) === 'object') {
57653    return Object.keys(format).reduce(function (delta, key) {
57654      return applyFormat(delta, key, format[key]);
57655    }, delta);
57656  } else {
57657    return delta.reduce(function (delta, op) {
57658      if (op.attributes && op.attributes[format]) {
57659        return delta.push(op);
57660      } else {
57661        return delta.insert(op.insert, (0, _extend3.default)({}, _defineProperty({}, format, value), op.attributes));
57662      }
57663    }, new _quillDelta2.default());
57664  }
57665}
57666
57667function computeStyle(node) {
57668  if (node.nodeType !== Node.ELEMENT_NODE) return {};
57669  var DOM_KEY = '__ql-computed-style';
57670  return node[DOM_KEY] || (node[DOM_KEY] = window.getComputedStyle(node));
57671}
57672
57673function deltaEndsWith(delta, text) {
57674  var endText = "";
57675  for (var i = delta.ops.length - 1; i >= 0 && endText.length < text.length; --i) {
57676    var op = delta.ops[i];
57677    if (typeof op.insert !== 'string') break;
57678    endText = op.insert + endText;
57679  }
57680  return endText.slice(-1 * text.length) === text;
57681}
57682
57683function isLine(node) {
57684  if (node.childNodes.length === 0) return false; // Exclude embed blocks
57685  var style = computeStyle(node);
57686  return ['block', 'list-item'].indexOf(style.display) > -1;
57687}
57688
57689function traverse(node, elementMatchers, textMatchers) {
57690  // Post-order
57691  if (node.nodeType === node.TEXT_NODE) {
57692    return textMatchers.reduce(function (delta, matcher) {
57693      return matcher(node, delta);
57694    }, new _quillDelta2.default());
57695  } else if (node.nodeType === node.ELEMENT_NODE) {
57696    return [].reduce.call(node.childNodes || [], function (delta, childNode) {
57697      var childrenDelta = traverse(childNode, elementMatchers, textMatchers);
57698      if (childNode.nodeType === node.ELEMENT_NODE) {
57699        childrenDelta = elementMatchers.reduce(function (childrenDelta, matcher) {
57700          return matcher(childNode, childrenDelta);
57701        }, childrenDelta);
57702        childrenDelta = (childNode[DOM_KEY] || []).reduce(function (childrenDelta, matcher) {
57703          return matcher(childNode, childrenDelta);
57704        }, childrenDelta);
57705      }
57706      return delta.concat(childrenDelta);
57707    }, new _quillDelta2.default());
57708  } else {
57709    return new _quillDelta2.default();
57710  }
57711}
57712
57713function matchAlias(format, node, delta) {
57714  return applyFormat(delta, format, true);
57715}
57716
57717function matchAttributor(node, delta) {
57718  var attributes = _parchment2.default.Attributor.Attribute.keys(node);
57719  var classes = _parchment2.default.Attributor.Class.keys(node);
57720  var styles = _parchment2.default.Attributor.Style.keys(node);
57721  var formats = {};
57722  attributes.concat(classes).concat(styles).forEach(function (name) {
57723    var attr = _parchment2.default.query(name, _parchment2.default.Scope.ATTRIBUTE);
57724    if (attr != null) {
57725      formats[attr.attrName] = attr.value(node);
57726      if (formats[attr.attrName]) return;
57727    }
57728    attr = ATTRIBUTE_ATTRIBUTORS[name];
57729    if (attr != null && (attr.attrName === name || attr.keyName === name)) {
57730      formats[attr.attrName] = attr.value(node) || undefined;
57731    }
57732    attr = STYLE_ATTRIBUTORS[name];
57733    if (attr != null && (attr.attrName === name || attr.keyName === name)) {
57734      attr = STYLE_ATTRIBUTORS[name];
57735      formats[attr.attrName] = attr.value(node) || undefined;
57736    }
57737  });
57738  if (Object.keys(formats).length > 0) {
57739    delta = applyFormat(delta, formats);
57740  }
57741  return delta;
57742}
57743
57744function matchBlot(node, delta) {
57745  var match = _parchment2.default.query(node);
57746  if (match == null) return delta;
57747  if (match.prototype instanceof _parchment2.default.Embed) {
57748    var embed = {};
57749    var value = match.value(node);
57750    if (value != null) {
57751      embed[match.blotName] = value;
57752      delta = new _quillDelta2.default().insert(embed, match.formats(node));
57753    }
57754  } else if (typeof match.formats === 'function') {
57755    delta = applyFormat(delta, match.blotName, match.formats(node));
57756  }
57757  return delta;
57758}
57759
57760function matchBreak(node, delta) {
57761  if (!deltaEndsWith(delta, '\n')) {
57762    delta.insert('\n');
57763  }
57764  return delta;
57765}
57766
57767function matchIgnore() {
57768  return new _quillDelta2.default();
57769}
57770
57771function matchIndent(node, delta) {
57772  var match = _parchment2.default.query(node);
57773  if (match == null || match.blotName !== 'list-item' || !deltaEndsWith(delta, '\n')) {
57774    return delta;
57775  }
57776  var indent = -1,
57777      parent = node.parentNode;
57778  while (!parent.classList.contains('ql-clipboard')) {
57779    if ((_parchment2.default.query(parent) || {}).blotName === 'list') {
57780      indent += 1;
57781    }
57782    parent = parent.parentNode;
57783  }
57784  if (indent <= 0) return delta;
57785  return delta.compose(new _quillDelta2.default().retain(delta.length() - 1).retain(1, { indent: indent }));
57786}
57787
57788function matchNewline(node, delta) {
57789  if (!deltaEndsWith(delta, '\n')) {
57790    if (isLine(node) || delta.length() > 0 && node.nextSibling && isLine(node.nextSibling)) {
57791      delta.insert('\n');
57792    }
57793  }
57794  return delta;
57795}
57796
57797function matchSpacing(node, delta) {
57798  if (isLine(node) && node.nextElementSibling != null && !deltaEndsWith(delta, '\n\n')) {
57799    var nodeHeight = node.offsetHeight + parseFloat(computeStyle(node).marginTop) + parseFloat(computeStyle(node).marginBottom);
57800    if (node.nextElementSibling.offsetTop > node.offsetTop + nodeHeight * 1.5) {
57801      delta.insert('\n');
57802    }
57803  }
57804  return delta;
57805}
57806
57807function matchStyles(node, delta) {
57808  var formats = {};
57809  var style = node.style || {};
57810  if (style.fontStyle && computeStyle(node).fontStyle === 'italic') {
57811    formats.italic = true;
57812  }
57813  if (style.fontWeight && (computeStyle(node).fontWeight.startsWith('bold') || parseInt(computeStyle(node).fontWeight) >= 700)) {
57814    formats.bold = true;
57815  }
57816  if (Object.keys(formats).length > 0) {
57817    delta = applyFormat(delta, formats);
57818  }
57819  if (parseFloat(style.textIndent || 0) > 0) {
57820    // Could be 0.5in
57821    delta = new _quillDelta2.default().insert('\t').concat(delta);
57822  }
57823  return delta;
57824}
57825
57826function matchText(node, delta) {
57827  var text = node.data;
57828  // Word represents empty line with <o:p>&nbsp;</o:p>
57829  if (node.parentNode.tagName === 'O:P') {
57830    return delta.insert(text.trim());
57831  }
57832  if (text.trim().length === 0 && node.parentNode.classList.contains('ql-clipboard')) {
57833    return delta;
57834  }
57835  if (!computeStyle(node.parentNode).whiteSpace.startsWith('pre')) {
57836    // eslint-disable-next-line func-style
57837    var replacer = function replacer(collapse, match) {
vendor: 107,389 bytes, lines 57838-60171
57838      match = match.replace(/[^\u00a0]/g, ''); // \u00a0 is nbsp;
57839      return match.length < 1 && collapse ? ' ' : match;
57840    };
57841    text = text.replace(/\r\n/g, ' ').replace(/\n/g, ' ');
57842    text = text.replace(/\s\s+/g, replacer.bind(replacer, true)); // collapse whitespace
57843    if (node.previousSibling == null && isLine(node.parentNode) || node.previousSibling != null && isLine(node.previousSibling)) {
57844      text = text.replace(/^\s+/, replacer.bind(replacer, false));
57845    }
57846    if (node.nextSibling == null && isLine(node.parentNode) || node.nextSibling != null && isLine(node.nextSibling)) {
57847      text = text.replace(/\s+$/, replacer.bind(replacer, false));
57848    }
57849  }
57850  return delta.insert(text);
57851}
57852
57853exports.default = Clipboard;
57854exports.matchAttributor = matchAttributor;
57855exports.matchBlot = matchBlot;
57856exports.matchNewline = matchNewline;
57857exports.matchSpacing = matchSpacing;
57858exports.matchText = matchText;
57859
57860/***/ }),
57861/* 56 */
57862/***/ (function(module, exports, __webpack_require__) {
57863
57864"use strict";
57865
57866
57867Object.defineProperty(exports, "__esModule", {
57868  value: true
57869});
57870
57871var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
57872
57873var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
57874
57875var _inline = __webpack_require__(6);
57876
57877var _inline2 = _interopRequireDefault(_inline);
57878
57879function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
57880
57881function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
57882
57883function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
57884
57885function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
57886
57887var Bold = function (_Inline) {
57888  _inherits(Bold, _Inline);
57889
57890  function Bold() {
57891    _classCallCheck(this, Bold);
57892
57893    return _possibleConstructorReturn(this, (Bold.__proto__ || Object.getPrototypeOf(Bold)).apply(this, arguments));
57894  }
57895
57896  _createClass(Bold, [{
57897    key: 'optimize',
57898    value: function optimize(context) {
57899      _get(Bold.prototype.__proto__ || Object.getPrototypeOf(Bold.prototype), 'optimize', this).call(this, context);
57900      if (this.domNode.tagName !== this.statics.tagName[0]) {
57901        this.replaceWith(this.statics.blotName);
57902      }
57903    }
57904  }], [{
57905    key: 'create',
57906    value: function create() {
57907      return _get(Bold.__proto__ || Object.getPrototypeOf(Bold), 'create', this).call(this);
57908    }
57909  }, {
57910    key: 'formats',
57911    value: function formats() {
57912      return true;
57913    }
57914  }]);
57915
57916  return Bold;
57917}(_inline2.default);
57918
57919Bold.blotName = 'bold';
57920Bold.tagName = ['STRONG', 'B'];
57921
57922exports.default = Bold;
57923
57924/***/ }),
57925/* 57 */
57926/***/ (function(module, exports, __webpack_require__) {
57927
57928"use strict";
57929
57930
57931Object.defineProperty(exports, "__esModule", {
57932  value: true
57933});
57934exports.addControls = exports.default = undefined;
57935
57936var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
57937
57938var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
57939
57940var _quillDelta = __webpack_require__(2);
57941
57942var _quillDelta2 = _interopRequireDefault(_quillDelta);
57943
57944var _parchment = __webpack_require__(0);
57945
57946var _parchment2 = _interopRequireDefault(_parchment);
57947
57948var _quill = __webpack_require__(5);
57949
57950var _quill2 = _interopRequireDefault(_quill);
57951
57952var _logger = __webpack_require__(10);
57953
57954var _logger2 = _interopRequireDefault(_logger);
57955
57956var _module = __webpack_require__(9);
57957
57958var _module2 = _interopRequireDefault(_module);
57959
57960function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
57961
57962function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
57963
57964function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
57965
57966function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
57967
57968function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
57969
57970var debug = (0, _logger2.default)('quill:toolbar');
57971
57972var Toolbar = function (_Module) {
57973  _inherits(Toolbar, _Module);
57974
57975  function Toolbar(quill, options) {
57976    _classCallCheck(this, Toolbar);
57977
57978    var _this = _possibleConstructorReturn(this, (Toolbar.__proto__ || Object.getPrototypeOf(Toolbar)).call(this, quill, options));
57979
57980    if (Array.isArray(_this.options.container)) {
57981      var container = document.createElement('div');
57982      addControls(container, _this.options.container);
57983      quill.container.parentNode.insertBefore(container, quill.container);
57984      _this.container = container;
57985    } else if (typeof _this.options.container === 'string') {
57986      _this.container = document.querySelector(_this.options.container);
57987    } else {
57988      _this.container = _this.options.container;
57989    }
57990    if (!(_this.container instanceof HTMLElement)) {
57991      var _ret;
57992
57993      return _ret = debug.error('Container required for toolbar', _this.options), _possibleConstructorReturn(_this, _ret);
57994    }
57995    _this.container.classList.add('ql-toolbar');
57996    _this.controls = [];
57997    _this.handlers = {};
57998    Object.keys(_this.options.handlers).forEach(function (format) {
57999      _this.addHandler(format, _this.options.handlers[format]);
58000    });
58001    [].forEach.call(_this.container.querySelectorAll('button, select'), function (input) {
58002      _this.attach(input);
58003    });
58004    _this.quill.on(_quill2.default.events.EDITOR_CHANGE, function (type, range) {
58005      if (type === _quill2.default.events.SELECTION_CHANGE) {
58006        _this.update(range);
58007      }
58008    });
58009    _this.quill.on(_quill2.default.events.SCROLL_OPTIMIZE, function () {
58010      var _this$quill$selection = _this.quill.selection.getRange(),
58011          _this$quill$selection2 = _slicedToArray(_this$quill$selection, 1),
58012          range = _this$quill$selection2[0]; // quill.getSelection triggers update
58013
58014
58015      _this.update(range);
58016    });
58017    return _this;
58018  }
58019
58020  _createClass(Toolbar, [{
58021    key: 'addHandler',
58022    value: function addHandler(format, handler) {
58023      this.handlers[format] = handler;
58024    }
58025  }, {
58026    key: 'attach',
58027    value: function attach(input) {
58028      var _this2 = this;
58029
58030      var format = [].find.call(input.classList, function (className) {
58031        return className.indexOf('ql-') === 0;
58032      });
58033      if (!format) return;
58034      format = format.slice('ql-'.length);
58035      if (input.tagName === 'BUTTON') {
58036        input.setAttribute('type', 'button');
58037      }
58038      if (this.handlers[format] == null) {
58039        if (this.quill.scroll.whitelist != null && this.quill.scroll.whitelist[format] == null) {
58040          debug.warn('ignoring attaching to disabled format', format, input);
58041          return;
58042        }
58043        if (_parchment2.default.query(format) == null) {
58044          debug.warn('ignoring attaching to nonexistent format', format, input);
58045          return;
58046        }
58047      }
58048      var eventName = input.tagName === 'SELECT' ? 'change' : 'click';
58049      input.addEventListener(eventName, function (e) {
58050        var value = void 0;
58051        if (input.tagName === 'SELECT') {
58052          if (input.selectedIndex < 0) return;
58053          var selected = input.options[input.selectedIndex];
58054          if (selected.hasAttribute('selected')) {
58055            value = false;
58056          } else {
58057            value = selected.value || false;
58058          }
58059        } else {
58060          if (input.classList.contains('ql-active')) {
58061            value = false;
58062          } else {
58063            value = input.value || !input.hasAttribute('value');
58064          }
58065          e.preventDefault();
58066        }
58067        _this2.quill.focus();
58068
58069        var _quill$selection$getR = _this2.quill.selection.getRange(),
58070            _quill$selection$getR2 = _slicedToArray(_quill$selection$getR, 1),
58071            range = _quill$selection$getR2[0];
58072
58073        if (_this2.handlers[format] != null) {
58074          _this2.handlers[format].call(_this2, value);
58075        } else if (_parchment2.default.query(format).prototype instanceof _parchment2.default.Embed) {
58076          value = prompt('Enter ' + format);
58077          if (!value) return;
58078          _this2.quill.updateContents(new _quillDelta2.default().retain(range.index).delete(range.length).insert(_defineProperty({}, format, value)), _quill2.default.sources.USER);
58079        } else {
58080          _this2.quill.format(format, value, _quill2.default.sources.USER);
58081        }
58082        _this2.update(range);
58083      });
58084      // TODO use weakmap
58085      this.controls.push([format, input]);
58086    }
58087  }, {
58088    key: 'update',
58089    value: function update(range) {
58090      var formats = range == null ? {} : this.quill.getFormat(range);
58091      this.controls.forEach(function (pair) {
58092        var _pair = _slicedToArray(pair, 2),
58093            format = _pair[0],
58094            input = _pair[1];
58095
58096        if (input.tagName === 'SELECT') {
58097          var option = void 0;
58098          if (range == null) {
58099            option = null;
58100          } else if (formats[format] == null) {
58101            option = input.querySelector('option[selected]');
58102          } else if (!Array.isArray(formats[format])) {
58103            var value = formats[format];
58104            if (typeof value === 'string') {
58105              value = value.replace(/\"/g, '\\"');
58106            }
58107            option = input.querySelector('option[value="' + value + '"]');
58108          }
58109          if (option == null) {
58110            input.value = ''; // TODO make configurable?
58111            input.selectedIndex = -1;
58112          } else {
58113            option.selected = true;
58114          }
58115        } else {
58116          if (range == null) {
58117            input.classList.remove('ql-active');
58118          } else if (input.hasAttribute('value')) {
58119            // both being null should match (default values)
58120            // '1' should match with 1 (headers)
58121            var isActive = formats[format] === input.getAttribute('value') || formats[format] != null && formats[format].toString() === input.getAttribute('value') || formats[format] == null && !input.getAttribute('value');
58122            input.classList.toggle('ql-active', isActive);
58123          } else {
58124            input.classList.toggle('ql-active', formats[format] != null);
58125          }
58126        }
58127      });
58128    }
58129  }]);
58130
58131  return Toolbar;
58132}(_module2.default);
58133
58134Toolbar.DEFAULTS = {};
58135
58136function addButton(container, format, value) {
58137  var input = document.createElement('button');
58138  input.setAttribute('type', 'button');
58139  input.classList.add('ql-' + format);
58140  if (value != null) {
58141    input.value = value;
58142  }
58143  container.appendChild(input);
58144}
58145
58146function addControls(container, groups) {
58147  if (!Array.isArray(groups[0])) {
58148    groups = [groups];
58149  }
58150  groups.forEach(function (controls) {
58151    var group = document.createElement('span');
58152    group.classList.add('ql-formats');
58153    controls.forEach(function (control) {
58154      if (typeof control === 'string') {
58155        addButton(group, control);
58156      } else {
58157        var format = Object.keys(control)[0];
58158        var value = control[format];
58159        if (Array.isArray(value)) {
58160          addSelect(group, format, value);
58161        } else {
58162          addButton(group, format, value);
58163        }
58164      }
58165    });
58166    container.appendChild(group);
58167  });
58168}
58169
58170function addSelect(container, format, values) {
58171  var input = document.createElement('select');
58172  input.classList.add('ql-' + format);
58173  values.forEach(function (value) {
58174    var option = document.createElement('option');
58175    if (value !== false) {
58176      option.setAttribute('value', value);
58177    } else {
58178      option.setAttribute('selected', 'selected');
58179    }
58180    input.appendChild(option);
58181  });
58182  container.appendChild(input);
58183}
58184
58185Toolbar.DEFAULTS = {
58186  container: null,
58187  handlers: {
58188    clean: function clean() {
58189      var _this3 = this;
58190
58191      var range = this.quill.getSelection();
58192      if (range == null) return;
58193      if (range.length == 0) {
58194        var formats = this.quill.getFormat();
58195        Object.keys(formats).forEach(function (name) {
58196          // Clean functionality in existing apps only clean inline formats
58197          if (_parchment2.default.query(name, _parchment2.default.Scope.INLINE) != null) {
58198            _this3.quill.format(name, false);
58199          }
58200        });
58201      } else {
58202        this.quill.removeFormat(range, _quill2.default.sources.USER);
58203      }
58204    },
58205    direction: function direction(value) {
58206      var align = this.quill.getFormat()['align'];
58207      if (value === 'rtl' && align == null) {
58208        this.quill.format('align', 'right', _quill2.default.sources.USER);
58209      } else if (!value && align === 'right') {
58210        this.quill.format('align', false, _quill2.default.sources.USER);
58211      }
58212      this.quill.format('direction', value, _quill2.default.sources.USER);
58213    },
58214    indent: function indent(value) {
58215      var range = this.quill.getSelection();
58216      var formats = this.quill.getFormat(range);
58217      var indent = parseInt(formats.indent || 0);
58218      if (value === '+1' || value === '-1') {
58219        var modifier = value === '+1' ? 1 : -1;
58220        if (formats.direction === 'rtl') modifier *= -1;
58221        this.quill.format('indent', indent + modifier, _quill2.default.sources.USER);
58222      }
58223    },
58224    link: function link(value) {
58225      if (value === true) {
58226        value = prompt('Enter link URL:');
58227      }
58228      this.quill.format('link', value, _quill2.default.sources.USER);
58229    },
58230    list: function list(value) {
58231      var range = this.quill.getSelection();
58232      var formats = this.quill.getFormat(range);
58233      if (value === 'check') {
58234        if (formats['list'] === 'checked' || formats['list'] === 'unchecked') {
58235          this.quill.format('list', false, _quill2.default.sources.USER);
58236        } else {
58237          this.quill.format('list', 'unchecked', _quill2.default.sources.USER);
58238        }
58239      } else {
58240        this.quill.format('list', value, _quill2.default.sources.USER);
58241      }
58242    }
58243  }
58244};
58245
58246exports.default = Toolbar;
58247exports.addControls = addControls;
58248
58249/***/ }),
58250/* 58 */
58251/***/ (function(module, exports) {
58252
58253module.exports = "<svg viewbox=\"0 0 18 18\"> <polyline class=\"ql-even ql-stroke\" points=\"5 7 3 9 5 11\"></polyline> <polyline class=\"ql-even ql-stroke\" points=\"13 7 15 9 13 11\"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>";
58254
58255/***/ }),
58256/* 59 */
58257/***/ (function(module, exports, __webpack_require__) {
58258
58259"use strict";
58260
58261
58262Object.defineProperty(exports, "__esModule", {
58263  value: true
58264});
58265
58266var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
58267
58268var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
58269
58270var _picker = __webpack_require__(28);
58271
58272var _picker2 = _interopRequireDefault(_picker);
58273
58274function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
58275
58276function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
58277
58278function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
58279
58280function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
58281
58282var ColorPicker = function (_Picker) {
58283  _inherits(ColorPicker, _Picker);
58284
58285  function ColorPicker(select, label) {
58286    _classCallCheck(this, ColorPicker);
58287
58288    var _this = _possibleConstructorReturn(this, (ColorPicker.__proto__ || Object.getPrototypeOf(ColorPicker)).call(this, select));
58289
58290    _this.label.innerHTML = label;
58291    _this.container.classList.add('ql-color-picker');
58292    [].slice.call(_this.container.querySelectorAll('.ql-picker-item'), 0, 7).forEach(function (item) {
58293      item.classList.add('ql-primary');
58294    });
58295    return _this;
58296  }
58297
58298  _createClass(ColorPicker, [{
58299    key: 'buildItem',
58300    value: function buildItem(option) {
58301      var item = _get(ColorPicker.prototype.__proto__ || Object.getPrototypeOf(ColorPicker.prototype), 'buildItem', this).call(this, option);
58302      item.style.backgroundColor = option.getAttribute('value') || '';
58303      return item;
58304    }
58305  }, {
58306    key: 'selectItem',
58307    value: function selectItem(item, trigger) {
58308      _get(ColorPicker.prototype.__proto__ || Object.getPrototypeOf(ColorPicker.prototype), 'selectItem', this).call(this, item, trigger);
58309      var colorLabel = this.label.querySelector('.ql-color-label');
58310      var value = item ? item.getAttribute('data-value') || '' : '';
58311      if (colorLabel) {
58312        if (colorLabel.tagName === 'line') {
58313          colorLabel.style.stroke = value;
58314        } else {
58315          colorLabel.style.fill = value;
58316        }
58317      }
58318    }
58319  }]);
58320
58321  return ColorPicker;
58322}(_picker2.default);
58323
58324exports.default = ColorPicker;
58325
58326/***/ }),
58327/* 60 */
58328/***/ (function(module, exports, __webpack_require__) {
58329
58330"use strict";
58331
58332
58333Object.defineProperty(exports, "__esModule", {
58334  value: true
58335});
58336
58337var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
58338
58339var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
58340
58341var _picker = __webpack_require__(28);
58342
58343var _picker2 = _interopRequireDefault(_picker);
58344
58345function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
58346
58347function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
58348
58349function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
58350
58351function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
58352
58353var IconPicker = function (_Picker) {
58354  _inherits(IconPicker, _Picker);
58355
58356  function IconPicker(select, icons) {
58357    _classCallCheck(this, IconPicker);
58358
58359    var _this = _possibleConstructorReturn(this, (IconPicker.__proto__ || Object.getPrototypeOf(IconPicker)).call(this, select));
58360
58361    _this.container.classList.add('ql-icon-picker');
58362    [].forEach.call(_this.container.querySelectorAll('.ql-picker-item'), function (item) {
58363      item.innerHTML = icons[item.getAttribute('data-value') || ''];
58364    });
58365    _this.defaultItem = _this.container.querySelector('.ql-selected');
58366    _this.selectItem(_this.defaultItem);
58367    return _this;
58368  }
58369
58370  _createClass(IconPicker, [{
58371    key: 'selectItem',
58372    value: function selectItem(item, trigger) {
58373      _get(IconPicker.prototype.__proto__ || Object.getPrototypeOf(IconPicker.prototype), 'selectItem', this).call(this, item, trigger);
58374      item = item || this.defaultItem;
58375      this.label.innerHTML = item.innerHTML;
58376    }
58377  }]);
58378
58379  return IconPicker;
58380}(_picker2.default);
58381
58382exports.default = IconPicker;
58383
58384/***/ }),
58385/* 61 */
58386/***/ (function(module, exports, __webpack_require__) {
58387
58388"use strict";
58389
58390
58391Object.defineProperty(exports, "__esModule", {
58392  value: true
58393});
58394
58395var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
58396
58397function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
58398
58399var Tooltip = function () {
58400  function Tooltip(quill, boundsContainer) {
58401    var _this = this;
58402
58403    _classCallCheck(this, Tooltip);
58404
58405    this.quill = quill;
58406    this.boundsContainer = boundsContainer || document.body;
58407    this.root = quill.addContainer('ql-tooltip');
58408    this.root.innerHTML = this.constructor.TEMPLATE;
58409    if (this.quill.root === this.quill.scrollingContainer) {
58410      this.quill.root.addEventListener('scroll', function () {
58411        _this.root.style.marginTop = -1 * _this.quill.root.scrollTop + 'px';
58412      });
58413    }
58414    this.hide();
58415  }
58416
58417  _createClass(Tooltip, [{
58418    key: 'hide',
58419    value: function hide() {
58420      this.root.classList.add('ql-hidden');
58421    }
58422  }, {
58423    key: 'position',
58424    value: function position(reference) {
58425      var left = reference.left + reference.width / 2 - this.root.offsetWidth / 2;
58426      // root.scrollTop should be 0 if scrollContainer !== root
58427      var top = reference.bottom + this.quill.root.scrollTop;
58428      this.root.style.left = left + 'px';
58429      this.root.style.top = top + 'px';
58430      this.root.classList.remove('ql-flip');
58431      var containerBounds = this.boundsContainer.getBoundingClientRect();
58432      var rootBounds = this.root.getBoundingClientRect();
58433      var shift = 0;
58434      if (rootBounds.right > containerBounds.right) {
58435        shift = containerBounds.right - rootBounds.right;
58436        this.root.style.left = left + shift + 'px';
58437      }
58438      if (rootBounds.left < containerBounds.left) {
58439        shift = containerBounds.left - rootBounds.left;
58440        this.root.style.left = left + shift + 'px';
58441      }
58442      if (rootBounds.bottom > containerBounds.bottom) {
58443        var height = rootBounds.bottom - rootBounds.top;
58444        var verticalShift = reference.bottom - reference.top + height;
58445        this.root.style.top = top - verticalShift + 'px';
58446        this.root.classList.add('ql-flip');
58447      }
58448      return shift;
58449    }
58450  }, {
58451    key: 'show',
58452    value: function show() {
58453      this.root.classList.remove('ql-editing');
58454      this.root.classList.remove('ql-hidden');
58455    }
58456  }]);
58457
58458  return Tooltip;
58459}();
58460
58461exports.default = Tooltip;
58462
58463/***/ }),
58464/* 62 */
58465/***/ (function(module, exports, __webpack_require__) {
58466
58467"use strict";
58468
58469
58470Object.defineProperty(exports, "__esModule", {
58471  value: true
58472});
58473
58474var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
58475
58476var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
58477
58478var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
58479
58480var _extend = __webpack_require__(3);
58481
58482var _extend2 = _interopRequireDefault(_extend);
58483
58484var _emitter = __webpack_require__(8);
58485
58486var _emitter2 = _interopRequireDefault(_emitter);
58487
58488var _base = __webpack_require__(43);
58489
58490var _base2 = _interopRequireDefault(_base);
58491
58492var _link = __webpack_require__(27);
58493
58494var _link2 = _interopRequireDefault(_link);
58495
58496var _selection = __webpack_require__(15);
58497
58498var _icons = __webpack_require__(41);
58499
58500var _icons2 = _interopRequireDefault(_icons);
58501
58502function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
58503
58504function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
58505
58506function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
58507
58508function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
58509
58510var TOOLBAR_CONFIG = [[{ header: ['1', '2', '3', false] }], ['bold', 'italic', 'underline', 'link'], [{ list: 'ordered' }, { list: 'bullet' }], ['clean']];
58511
58512var SnowTheme = function (_BaseTheme) {
58513  _inherits(SnowTheme, _BaseTheme);
58514
58515  function SnowTheme(quill, options) {
58516    _classCallCheck(this, SnowTheme);
58517
58518    if (options.modules.toolbar != null && options.modules.toolbar.container == null) {
58519      options.modules.toolbar.container = TOOLBAR_CONFIG;
58520    }
58521
58522    var _this = _possibleConstructorReturn(this, (SnowTheme.__proto__ || Object.getPrototypeOf(SnowTheme)).call(this, quill, options));
58523
58524    _this.quill.container.classList.add('ql-snow');
58525    return _this;
58526  }
58527
58528  _createClass(SnowTheme, [{
58529    key: 'extendToolbar',
58530    value: function extendToolbar(toolbar) {
58531      toolbar.container.classList.add('ql-snow');
58532      this.buildButtons([].slice.call(toolbar.container.querySelectorAll('button')), _icons2.default);
58533      this.buildPickers([].slice.call(toolbar.container.querySelectorAll('select')), _icons2.default);
58534      this.tooltip = new SnowTooltip(this.quill, this.options.bounds);
58535      if (toolbar.container.querySelector('.ql-link')) {
58536        this.quill.keyboard.addBinding({ key: 'K', shortKey: true }, function (range, context) {
58537          toolbar.handlers['link'].call(toolbar, !context.format.link);
58538        });
58539      }
58540    }
58541  }]);
58542
58543  return SnowTheme;
58544}(_base2.default);
58545
58546SnowTheme.DEFAULTS = (0, _extend2.default)(true, {}, _base2.default.DEFAULTS, {
58547  modules: {
58548    toolbar: {
58549      handlers: {
58550        link: function link(value) {
58551          if (value) {
58552            var range = this.quill.getSelection();
58553            if (range == null || range.length == 0) return;
58554            var preview = this.quill.getText(range);
58555            if (/^\S+@\S+\.\S+$/.test(preview) && preview.indexOf('mailto:') !== 0) {
58556              preview = 'mailto:' + preview;
58557            }
58558            var tooltip = this.quill.theme.tooltip;
58559            tooltip.edit('link', preview);
58560          } else {
58561            this.quill.format('link', false);
58562          }
58563        }
58564      }
58565    }
58566  }
58567});
58568
58569var SnowTooltip = function (_BaseTooltip) {
58570  _inherits(SnowTooltip, _BaseTooltip);
58571
58572  function SnowTooltip(quill, bounds) {
58573    _classCallCheck(this, SnowTooltip);
58574
58575    var _this2 = _possibleConstructorReturn(this, (SnowTooltip.__proto__ || Object.getPrototypeOf(SnowTooltip)).call(this, quill, bounds));
58576
58577    _this2.preview = _this2.root.querySelector('a.ql-preview');
58578    return _this2;
58579  }
58580
58581  _createClass(SnowTooltip, [{
58582    key: 'listen',
58583    value: function listen() {
58584      var _this3 = this;
58585
58586      _get(SnowTooltip.prototype.__proto__ || Object.getPrototypeOf(SnowTooltip.prototype), 'listen', this).call(this);
58587      this.root.querySelector('a.ql-action').addEventListener('click', function (event) {
58588        if (_this3.root.classList.contains('ql-editing')) {
58589          _this3.save();
58590        } else {
58591          _this3.edit('link', _this3.preview.textContent);
58592        }
58593        event.preventDefault();
58594      });
58595      this.root.querySelector('a.ql-remove').addEventListener('click', function (event) {
58596        if (_this3.linkRange != null) {
58597          var range = _this3.linkRange;
58598          _this3.restoreFocus();
58599          _this3.quill.formatText(range, 'link', false, _emitter2.default.sources.USER);
58600          delete _this3.linkRange;
58601        }
58602        event.preventDefault();
58603        _this3.hide();
58604      });
58605      this.quill.on(_emitter2.default.events.SELECTION_CHANGE, function (range, oldRange, source) {
58606        if (range == null) return;
58607        if (range.length === 0 && source === _emitter2.default.sources.USER) {
58608          var _quill$scroll$descend = _this3.quill.scroll.descendant(_link2.default, range.index),
58609              _quill$scroll$descend2 = _slicedToArray(_quill$scroll$descend, 2),
58610              link = _quill$scroll$descend2[0],
58611              offset = _quill$scroll$descend2[1];
58612
58613          if (link != null) {
58614            _this3.linkRange = new _selection.Range(range.index - offset, link.length());
58615            var preview = _link2.default.formats(link.domNode);
58616            _this3.preview.textContent = preview;
58617            _this3.preview.setAttribute('href', preview);
58618            _this3.show();
58619            _this3.position(_this3.quill.getBounds(_this3.linkRange));
58620            return;
58621          }
58622        } else {
58623          delete _this3.linkRange;
58624        }
58625        _this3.hide();
58626      });
58627    }
58628  }, {
58629    key: 'show',
58630    value: function show() {
58631      _get(SnowTooltip.prototype.__proto__ || Object.getPrototypeOf(SnowTooltip.prototype), 'show', this).call(this);
58632      this.root.removeAttribute('data-mode');
58633    }
58634  }]);
58635
58636  return SnowTooltip;
58637}(_base.BaseTooltip);
58638
58639SnowTooltip.TEMPLATE = ['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>', '<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">', '<a class="ql-action"></a>', '<a class="ql-remove"></a>'].join('');
58640
58641exports.default = SnowTheme;
58642
58643/***/ }),
58644/* 63 */
58645/***/ (function(module, exports, __webpack_require__) {
58646
58647"use strict";
58648
58649
58650Object.defineProperty(exports, "__esModule", {
58651  value: true
58652});
58653
58654var _core = __webpack_require__(29);
58655
58656var _core2 = _interopRequireDefault(_core);
58657
58658var _align = __webpack_require__(36);
58659
58660var _direction = __webpack_require__(38);
58661
58662var _indent = __webpack_require__(64);
58663
58664var _blockquote = __webpack_require__(65);
58665
58666var _blockquote2 = _interopRequireDefault(_blockquote);
58667
58668var _header = __webpack_require__(66);
58669
58670var _header2 = _interopRequireDefault(_header);
58671
58672var _list = __webpack_require__(67);
58673
58674var _list2 = _interopRequireDefault(_list);
58675
58676var _background = __webpack_require__(37);
58677
58678var _color = __webpack_require__(26);
58679
58680var _font = __webpack_require__(39);
58681
58682var _size = __webpack_require__(40);
58683
58684var _bold = __webpack_require__(56);
58685
58686var _bold2 = _interopRequireDefault(_bold);
58687
58688var _italic = __webpack_require__(68);
58689
58690var _italic2 = _interopRequireDefault(_italic);
58691
58692var _link = __webpack_require__(27);
58693
58694var _link2 = _interopRequireDefault(_link);
58695
58696var _script = __webpack_require__(69);
58697
58698var _script2 = _interopRequireDefault(_script);
58699
58700var _strike = __webpack_require__(70);
58701
58702var _strike2 = _interopRequireDefault(_strike);
58703
58704var _underline = __webpack_require__(71);
58705
58706var _underline2 = _interopRequireDefault(_underline);
58707
58708var _image = __webpack_require__(72);
58709
58710var _image2 = _interopRequireDefault(_image);
58711
58712var _video = __webpack_require__(73);
58713
58714var _video2 = _interopRequireDefault(_video);
58715
58716var _code = __webpack_require__(13);
58717
58718var _code2 = _interopRequireDefault(_code);
58719
58720var _formula = __webpack_require__(74);
58721
58722var _formula2 = _interopRequireDefault(_formula);
58723
58724var _syntax = __webpack_require__(75);
58725
58726var _syntax2 = _interopRequireDefault(_syntax);
58727
58728var _toolbar = __webpack_require__(57);
58729
58730var _toolbar2 = _interopRequireDefault(_toolbar);
58731
58732var _icons = __webpack_require__(41);
58733
58734var _icons2 = _interopRequireDefault(_icons);
58735
58736var _picker = __webpack_require__(28);
58737
58738var _picker2 = _interopRequireDefault(_picker);
58739
58740var _colorPicker = __webpack_require__(59);
58741
58742var _colorPicker2 = _interopRequireDefault(_colorPicker);
58743
58744var _iconPicker = __webpack_require__(60);
58745
58746var _iconPicker2 = _interopRequireDefault(_iconPicker);
58747
58748var _tooltip = __webpack_require__(61);
58749
58750var _tooltip2 = _interopRequireDefault(_tooltip);
58751
58752var _bubble = __webpack_require__(108);
58753
58754var _bubble2 = _interopRequireDefault(_bubble);
58755
58756var _snow = __webpack_require__(62);
58757
58758var _snow2 = _interopRequireDefault(_snow);
58759
58760function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
58761
58762_core2.default.register({
58763  'attributors/attribute/direction': _direction.DirectionAttribute,
58764
58765  'attributors/class/align': _align.AlignClass,
58766  'attributors/class/background': _background.BackgroundClass,
58767  'attributors/class/color': _color.ColorClass,
58768  'attributors/class/direction': _direction.DirectionClass,
58769  'attributors/class/font': _font.FontClass,
58770  'attributors/class/size': _size.SizeClass,
58771
58772  'attributors/style/align': _align.AlignStyle,
58773  'attributors/style/background': _background.BackgroundStyle,
58774  'attributors/style/color': _color.ColorStyle,
58775  'attributors/style/direction': _direction.DirectionStyle,
58776  'attributors/style/font': _font.FontStyle,
58777  'attributors/style/size': _size.SizeStyle
58778}, true);
58779
58780_core2.default.register({
58781  'formats/align': _align.AlignClass,
58782  'formats/direction': _direction.DirectionClass,
58783  'formats/indent': _indent.IndentClass,
58784
58785  'formats/background': _background.BackgroundStyle,
58786  'formats/color': _color.ColorStyle,
58787  'formats/font': _font.FontClass,
58788  'formats/size': _size.SizeClass,
58789
58790  'formats/blockquote': _blockquote2.default,
58791  'formats/code-block': _code2.default,
58792  'formats/header': _header2.default,
58793  'formats/list': _list2.default,
58794
58795  'formats/bold': _bold2.default,
58796  'formats/code': _code.Code,
58797  'formats/italic': _italic2.default,
58798  'formats/link': _link2.default,
58799  'formats/script': _script2.default,
58800  'formats/strike': _strike2.default,
58801  'formats/underline': _underline2.default,
58802
58803  'formats/image': _image2.default,
58804  'formats/video': _video2.default,
58805
58806  'formats/list/item': _list.ListItem,
58807
58808  'modules/formula': _formula2.default,
58809  'modules/syntax': _syntax2.default,
58810  'modules/toolbar': _toolbar2.default,
58811
58812  'themes/bubble': _bubble2.default,
58813  'themes/snow': _snow2.default,
58814
58815  'ui/icons': _icons2.default,
58816  'ui/picker': _picker2.default,
58817  'ui/icon-picker': _iconPicker2.default,
58818  'ui/color-picker': _colorPicker2.default,
58819  'ui/tooltip': _tooltip2.default
58820}, true);
58821
58822exports.default = _core2.default;
58823
58824/***/ }),
58825/* 64 */
58826/***/ (function(module, exports, __webpack_require__) {
58827
58828"use strict";
58829
58830
58831Object.defineProperty(exports, "__esModule", {
58832  value: true
58833});
58834exports.IndentClass = undefined;
58835
58836var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
58837
58838var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
58839
58840var _parchment = __webpack_require__(0);
58841
58842var _parchment2 = _interopRequireDefault(_parchment);
58843
58844function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
58845
58846function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
58847
58848function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
58849
58850function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
58851
58852var IdentAttributor = function (_Parchment$Attributor) {
58853  _inherits(IdentAttributor, _Parchment$Attributor);
58854
58855  function IdentAttributor() {
58856    _classCallCheck(this, IdentAttributor);
58857
58858    return _possibleConstructorReturn(this, (IdentAttributor.__proto__ || Object.getPrototypeOf(IdentAttributor)).apply(this, arguments));
58859  }
58860
58861  _createClass(IdentAttributor, [{
58862    key: 'add',
58863    value: function add(node, value) {
58864      if (value === '+1' || value === '-1') {
58865        var indent = this.value(node) || 0;
58866        value = value === '+1' ? indent + 1 : indent - 1;
58867      }
58868      if (value === 0) {
58869        this.remove(node);
58870        return true;
58871      } else {
58872        return _get(IdentAttributor.prototype.__proto__ || Object.getPrototypeOf(IdentAttributor.prototype), 'add', this).call(this, node, value);
58873      }
58874    }
58875  }, {
58876    key: 'canAdd',
58877    value: function canAdd(node, value) {
58878      return _get(IdentAttributor.prototype.__proto__ || Object.getPrototypeOf(IdentAttributor.prototype), 'canAdd', this).call(this, node, value) || _get(IdentAttributor.prototype.__proto__ || Object.getPrototypeOf(IdentAttributor.prototype), 'canAdd', this).call(this, node, parseInt(value));
58879    }
58880  }, {
58881    key: 'value',
58882    value: function value(node) {
58883      return parseInt(_get(IdentAttributor.prototype.__proto__ || Object.getPrototypeOf(IdentAttributor.prototype), 'value', this).call(this, node)) || undefined; // Don't return NaN
58884    }
58885  }]);
58886
58887  return IdentAttributor;
58888}(_parchment2.default.Attributor.Class);
58889
58890var IndentClass = new IdentAttributor('indent', 'ql-indent', {
58891  scope: _parchment2.default.Scope.BLOCK,
58892  whitelist: [1, 2, 3, 4, 5, 6, 7, 8]
58893});
58894
58895exports.IndentClass = IndentClass;
58896
58897/***/ }),
58898/* 65 */
58899/***/ (function(module, exports, __webpack_require__) {
58900
58901"use strict";
58902
58903
58904Object.defineProperty(exports, "__esModule", {
58905  value: true
58906});
58907
58908var _block = __webpack_require__(4);
58909
58910var _block2 = _interopRequireDefault(_block);
58911
58912function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
58913
58914function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
58915
58916function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
58917
58918function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
58919
58920var Blockquote = function (_Block) {
58921  _inherits(Blockquote, _Block);
58922
58923  function Blockquote() {
58924    _classCallCheck(this, Blockquote);
58925
58926    return _possibleConstructorReturn(this, (Blockquote.__proto__ || Object.getPrototypeOf(Blockquote)).apply(this, arguments));
58927  }
58928
58929  return Blockquote;
58930}(_block2.default);
58931
58932Blockquote.blotName = 'blockquote';
58933Blockquote.tagName = 'blockquote';
58934
58935exports.default = Blockquote;
58936
58937/***/ }),
58938/* 66 */
58939/***/ (function(module, exports, __webpack_require__) {
58940
58941"use strict";
58942
58943
58944Object.defineProperty(exports, "__esModule", {
58945  value: true
58946});
58947
58948var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
58949
58950var _block = __webpack_require__(4);
58951
58952var _block2 = _interopRequireDefault(_block);
58953
58954function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
58955
58956function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
58957
58958function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
58959
58960function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
58961
58962var Header = function (_Block) {
58963  _inherits(Header, _Block);
58964
58965  function Header() {
58966    _classCallCheck(this, Header);
58967
58968    return _possibleConstructorReturn(this, (Header.__proto__ || Object.getPrototypeOf(Header)).apply(this, arguments));
58969  }
58970
58971  _createClass(Header, null, [{
58972    key: 'formats',
58973    value: function formats(domNode) {
58974      return this.tagName.indexOf(domNode.tagName) + 1;
58975    }
58976  }]);
58977
58978  return Header;
58979}(_block2.default);
58980
58981Header.blotName = 'header';
58982Header.tagName = ['H1', 'H2', 'H3', 'H4', 'H5', 'H6'];
58983
58984exports.default = Header;
58985
58986/***/ }),
58987/* 67 */
58988/***/ (function(module, exports, __webpack_require__) {
58989
58990"use strict";
58991
58992
58993Object.defineProperty(exports, "__esModule", {
58994  value: true
58995});
58996exports.default = exports.ListItem = undefined;
58997
58998var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
58999
59000var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
59001
59002var _parchment = __webpack_require__(0);
59003
59004var _parchment2 = _interopRequireDefault(_parchment);
59005
59006var _block = __webpack_require__(4);
59007
59008var _block2 = _interopRequireDefault(_block);
59009
59010var _container = __webpack_require__(25);
59011
59012var _container2 = _interopRequireDefault(_container);
59013
59014function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
59015
59016function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
59017
59018function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
59019
59020function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
59021
59022function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
59023
59024var ListItem = function (_Block) {
59025  _inherits(ListItem, _Block);
59026
59027  function ListItem() {
59028    _classCallCheck(this, ListItem);
59029
59030    return _possibleConstructorReturn(this, (ListItem.__proto__ || Object.getPrototypeOf(ListItem)).apply(this, arguments));
59031  }
59032
59033  _createClass(ListItem, [{
59034    key: 'format',
59035    value: function format(name, value) {
59036      if (name === List.blotName && !value) {
59037        this.replaceWith(_parchment2.default.create(this.statics.scope));
59038      } else {
59039        _get(ListItem.prototype.__proto__ || Object.getPrototypeOf(ListItem.prototype), 'format', this).call(this, name, value);
59040      }
59041    }
59042  }, {
59043    key: 'remove',
59044    value: function remove() {
59045      if (this.prev == null && this.next == null) {
59046        this.parent.remove();
59047      } else {
59048        _get(ListItem.prototype.__proto__ || Object.getPrototypeOf(ListItem.prototype), 'remove', this).call(this);
59049      }
59050    }
59051  }, {
59052    key: 'replaceWith',
59053    value: function replaceWith(name, value) {
59054      this.parent.isolate(this.offset(this.parent), this.length());
59055      if (name === this.parent.statics.blotName) {
59056        this.parent.replaceWith(name, value);
59057        return this;
59058      } else {
59059        this.parent.unwrap();
59060        return _get(ListItem.prototype.__proto__ || Object.getPrototypeOf(ListItem.prototype), 'replaceWith', this).call(this, name, value);
59061      }
59062    }
59063  }], [{
59064    key: 'formats',
59065    value: function formats(domNode) {
59066      return domNode.tagName === this.tagName ? undefined : _get(ListItem.__proto__ || Object.getPrototypeOf(ListItem), 'formats', this).call(this, domNode);
59067    }
59068  }]);
59069
59070  return ListItem;
59071}(_block2.default);
59072
59073ListItem.blotName = 'list-item';
59074ListItem.tagName = 'LI';
59075
59076var List = function (_Container) {
59077  _inherits(List, _Container);
59078
59079  _createClass(List, null, [{
59080    key: 'create',
59081    value: function create(value) {
59082      var tagName = value === 'ordered' ? 'OL' : 'UL';
59083      var node = _get(List.__proto__ || Object.getPrototypeOf(List), 'create', this).call(this, tagName);
59084      if (value === 'checked' || value === 'unchecked') {
59085        node.setAttribute('data-checked', value === 'checked');
59086      }
59087      return node;
59088    }
59089  }, {
59090    key: 'formats',
59091    value: function formats(domNode) {
59092      if (domNode.tagName === 'OL') return 'ordered';
59093      if (domNode.tagName === 'UL') {
59094        if (domNode.hasAttribute('data-checked')) {
59095          return domNode.getAttribute('data-checked') === 'true' ? 'checked' : 'unchecked';
59096        } else {
59097          return 'bullet';
59098        }
59099      }
59100      return undefined;
59101    }
59102  }]);
59103
59104  function List(domNode) {
59105    _classCallCheck(this, List);
59106
59107    var _this2 = _possibleConstructorReturn(this, (List.__proto__ || Object.getPrototypeOf(List)).call(this, domNode));
59108
59109    var listEventHandler = function listEventHandler(e) {
59110      if (e.target.parentNode !== domNode) return;
59111      var format = _this2.statics.formats(domNode);
59112      var blot = _parchment2.default.find(e.target);
59113      if (format === 'checked') {
59114        blot.format('list', 'unchecked');
59115      } else if (format === 'unchecked') {
59116        blot.format('list', 'checked');
59117      }
59118    };
59119
59120    domNode.addEventListener('touchstart', listEventHandler);
59121    domNode.addEventListener('mousedown', listEventHandler);
59122    return _this2;
59123  }
59124
59125  _createClass(List, [{
59126    key: 'format',
59127    value: function format(name, value) {
59128      if (this.children.length > 0) {
59129        this.children.tail.format(name, value);
59130      }
59131    }
59132  }, {
59133    key: 'formats',
59134    value: function formats() {
59135      // We don't inherit from FormatBlot
59136      return _defineProperty({}, this.statics.blotName, this.statics.formats(this.domNode));
59137    }
59138  }, {
59139    key: 'insertBefore',
59140    value: function insertBefore(blot, ref) {
59141      if (blot instanceof ListItem) {
59142        _get(List.prototype.__proto__ || Object.getPrototypeOf(List.prototype), 'insertBefore', this).call(this, blot, ref);
59143      } else {
59144        var index = ref == null ? this.length() : ref.offset(this);
59145        var after = this.split(index);
59146        after.parent.insertBefore(blot, after);
59147      }
59148    }
59149  }, {
59150    key: 'optimize',
59151    value: function optimize(context) {
59152      _get(List.prototype.__proto__ || Object.getPrototypeOf(List.prototype), 'optimize', this).call(this, context);
59153      var next = this.next;
59154      if (next != null && next.prev === this && next.statics.blotName === this.statics.blotName && next.domNode.tagName === this.domNode.tagName && next.domNode.getAttribute('data-checked') === this.domNode.getAttribute('data-checked')) {
59155        next.moveChildren(this);
59156        next.remove();
59157      }
59158    }
59159  }, {
59160    key: 'replace',
59161    value: function replace(target) {
59162      if (target.statics.blotName !== this.statics.blotName) {
59163        var item = _parchment2.default.create(this.statics.defaultChild);
59164        target.moveChildren(item);
59165        this.appendChild(item);
59166      }
59167      _get(List.prototype.__proto__ || Object.getPrototypeOf(List.prototype), 'replace', this).call(this, target);
59168    }
59169  }]);
59170
59171  return List;
59172}(_container2.default);
59173
59174List.blotName = 'list';
59175List.scope = _parchment2.default.Scope.BLOCK_BLOT;
59176List.tagName = ['OL', 'UL'];
59177List.defaultChild = 'list-item';
59178List.allowedChildren = [ListItem];
59179
59180exports.ListItem = ListItem;
59181exports.default = List;
59182
59183/***/ }),
59184/* 68 */
59185/***/ (function(module, exports, __webpack_require__) {
59186
59187"use strict";
59188
59189
59190Object.defineProperty(exports, "__esModule", {
59191  value: true
59192});
59193
59194var _bold = __webpack_require__(56);
59195
59196var _bold2 = _interopRequireDefault(_bold);
59197
59198function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
59199
59200function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
59201
59202function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
59203
59204function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
59205
59206var Italic = function (_Bold) {
59207  _inherits(Italic, _Bold);
59208
59209  function Italic() {
59210    _classCallCheck(this, Italic);
59211
59212    return _possibleConstructorReturn(this, (Italic.__proto__ || Object.getPrototypeOf(Italic)).apply(this, arguments));
59213  }
59214
59215  return Italic;
59216}(_bold2.default);
59217
59218Italic.blotName = 'italic';
59219Italic.tagName = ['EM', 'I'];
59220
59221exports.default = Italic;
59222
59223/***/ }),
59224/* 69 */
59225/***/ (function(module, exports, __webpack_require__) {
59226
59227"use strict";
59228
59229
59230Object.defineProperty(exports, "__esModule", {
59231  value: true
59232});
59233
59234var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
59235
59236var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
59237
59238var _inline = __webpack_require__(6);
59239
59240var _inline2 = _interopRequireDefault(_inline);
59241
59242function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
59243
59244function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
59245
59246function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
59247
59248function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
59249
59250var Script = function (_Inline) {
59251  _inherits(Script, _Inline);
59252
59253  function Script() {
59254    _classCallCheck(this, Script);
59255
59256    return _possibleConstructorReturn(this, (Script.__proto__ || Object.getPrototypeOf(Script)).apply(this, arguments));
59257  }
59258
59259  _createClass(Script, null, [{
59260    key: 'create',
59261    value: function create(value) {
59262      if (value === 'super') {
59263        return document.createElement('sup');
59264      } else if (value === 'sub') {
59265        return document.createElement('sub');
59266      } else {
59267        return _get(Script.__proto__ || Object.getPrototypeOf(Script), 'create', this).call(this, value);
59268      }
59269    }
59270  }, {
59271    key: 'formats',
59272    value: function formats(domNode) {
59273      if (domNode.tagName === 'SUB') return 'sub';
59274      if (domNode.tagName === 'SUP') return 'super';
59275      return undefined;
59276    }
59277  }]);
59278
59279  return Script;
59280}(_inline2.default);
59281
59282Script.blotName = 'script';
59283Script.tagName = ['SUB', 'SUP'];
59284
59285exports.default = Script;
59286
59287/***/ }),
59288/* 70 */
59289/***/ (function(module, exports, __webpack_require__) {
59290
59291"use strict";
59292
59293
59294Object.defineProperty(exports, "__esModule", {
59295  value: true
59296});
59297
59298var _inline = __webpack_require__(6);
59299
59300var _inline2 = _interopRequireDefault(_inline);
59301
59302function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
59303
59304function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
59305
59306function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
59307
59308function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
59309
59310var Strike = function (_Inline) {
59311  _inherits(Strike, _Inline);
59312
59313  function Strike() {
59314    _classCallCheck(this, Strike);
59315
59316    return _possibleConstructorReturn(this, (Strike.__proto__ || Object.getPrototypeOf(Strike)).apply(this, arguments));
59317  }
59318
59319  return Strike;
59320}(_inline2.default);
59321
59322Strike.blotName = 'strike';
59323Strike.tagName = 'S';
59324
59325exports.default = Strike;
59326
59327/***/ }),
59328/* 71 */
59329/***/ (function(module, exports, __webpack_require__) {
59330
59331"use strict";
59332
59333
59334Object.defineProperty(exports, "__esModule", {
59335  value: true
59336});
59337
59338var _inline = __webpack_require__(6);
59339
59340var _inline2 = _interopRequireDefault(_inline);
59341
59342function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
59343
59344function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
59345
59346function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
59347
59348function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
59349
59350var Underline = function (_Inline) {
59351  _inherits(Underline, _Inline);
59352
59353  function Underline() {
59354    _classCallCheck(this, Underline);
59355
59356    return _possibleConstructorReturn(this, (Underline.__proto__ || Object.getPrototypeOf(Underline)).apply(this, arguments));
59357  }
59358
59359  return Underline;
59360}(_inline2.default);
59361
59362Underline.blotName = 'underline';
59363Underline.tagName = 'U';
59364
59365exports.default = Underline;
59366
59367/***/ }),
59368/* 72 */
59369/***/ (function(module, exports, __webpack_require__) {
59370
59371"use strict";
59372
59373
59374Object.defineProperty(exports, "__esModule", {
59375  value: true
59376});
59377
59378var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
59379
59380var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
59381
59382var _parchment = __webpack_require__(0);
59383
59384var _parchment2 = _interopRequireDefault(_parchment);
59385
59386var _link = __webpack_require__(27);
59387
59388function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
59389
59390function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
59391
59392function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
59393
59394function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
59395
59396var ATTRIBUTES = ['alt', 'height', 'width'];
59397
59398var Image = function (_Parchment$Embed) {
59399  _inherits(Image, _Parchment$Embed);
59400
59401  function Image() {
59402    _classCallCheck(this, Image);
59403
59404    return _possibleConstructorReturn(this, (Image.__proto__ || Object.getPrototypeOf(Image)).apply(this, arguments));
59405  }
59406
59407  _createClass(Image, [{
59408    key: 'format',
59409    value: function format(name, value) {
59410      if (ATTRIBUTES.indexOf(name) > -1) {
59411        if (value) {
59412          this.domNode.setAttribute(name, value);
59413        } else {
59414          this.domNode.removeAttribute(name);
59415        }
59416      } else {
59417        _get(Image.prototype.__proto__ || Object.getPrototypeOf(Image.prototype), 'format', this).call(this, name, value);
59418      }
59419    }
59420  }], [{
59421    key: 'create',
59422    value: function create(value) {
59423      var node = _get(Image.__proto__ || Object.getPrototypeOf(Image), 'create', this).call(this, value);
59424      if (typeof value === 'string') {
59425        node.setAttribute('src', this.sanitize(value));
59426      }
59427      return node;
59428    }
59429  }, {
59430    key: 'formats',
59431    value: function formats(domNode) {
59432      return ATTRIBUTES.reduce(function (formats, attribute) {
59433        if (domNode.hasAttribute(attribute)) {
59434          formats[attribute] = domNode.getAttribute(attribute);
59435        }
59436        return formats;
59437      }, {});
59438    }
59439  }, {
59440    key: 'match',
59441    value: function match(url) {
59442      return (/\.(jpe?g|gif|png)$/.test(url) || /^data:image\/.+;base64/.test(url)
59443      );
59444    }
59445  }, {
59446    key: 'sanitize',
59447    value: function sanitize(url) {
59448      return (0, _link.sanitize)(url, ['http', 'https', 'data']) ? url : '//:0';
59449    }
59450  }, {
59451    key: 'value',
59452    value: function value(domNode) {
59453      return domNode.getAttribute('src');
59454    }
59455  }]);
59456
59457  return Image;
59458}(_parchment2.default.Embed);
59459
59460Image.blotName = 'image';
59461Image.tagName = 'IMG';
59462
59463exports.default = Image;
59464
59465/***/ }),
59466/* 73 */
59467/***/ (function(module, exports, __webpack_require__) {
59468
59469"use strict";
59470
59471
59472Object.defineProperty(exports, "__esModule", {
59473  value: true
59474});
59475
59476var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
59477
59478var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
59479
59480var _block = __webpack_require__(4);
59481
59482var _link = __webpack_require__(27);
59483
59484var _link2 = _interopRequireDefault(_link);
59485
59486function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
59487
59488function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
59489
59490function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
59491
59492function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
59493
59494var ATTRIBUTES = ['height', 'width'];
59495
59496var Video = function (_BlockEmbed) {
59497  _inherits(Video, _BlockEmbed);
59498
59499  function Video() {
59500    _classCallCheck(this, Video);
59501
59502    return _possibleConstructorReturn(this, (Video.__proto__ || Object.getPrototypeOf(Video)).apply(this, arguments));
59503  }
59504
59505  _createClass(Video, [{
59506    key: 'format',
59507    value: function format(name, value) {
59508      if (ATTRIBUTES.indexOf(name) > -1) {
59509        if (value) {
59510          this.domNode.setAttribute(name, value);
59511        } else {
59512          this.domNode.removeAttribute(name);
59513        }
59514      } else {
59515        _get(Video.prototype.__proto__ || Object.getPrototypeOf(Video.prototype), 'format', this).call(this, name, value);
59516      }
59517    }
59518  }], [{
59519    key: 'create',
59520    value: function create(value) {
59521      var node = _get(Video.__proto__ || Object.getPrototypeOf(Video), 'create', this).call(this, value);
59522      node.setAttribute('frameborder', '0');
59523      node.setAttribute('allowfullscreen', true);
59524      node.setAttribute('src', this.sanitize(value));
59525      return node;
59526    }
59527  }, {
59528    key: 'formats',
59529    value: function formats(domNode) {
59530      return ATTRIBUTES.reduce(function (formats, attribute) {
59531        if (domNode.hasAttribute(attribute)) {
59532          formats[attribute] = domNode.getAttribute(attribute);
59533        }
59534        return formats;
59535      }, {});
59536    }
59537  }, {
59538    key: 'sanitize',
59539    value: function sanitize(url) {
59540      return _link2.default.sanitize(url);
59541    }
59542  }, {
59543    key: 'value',
59544    value: function value(domNode) {
59545      return domNode.getAttribute('src');
59546    }
59547  }]);
59548
59549  return Video;
59550}(_block.BlockEmbed);
59551
59552Video.blotName = 'video';
59553Video.className = 'ql-video';
59554Video.tagName = 'IFRAME';
59555
59556exports.default = Video;
59557
59558/***/ }),
59559/* 74 */
59560/***/ (function(module, exports, __webpack_require__) {
59561
59562"use strict";
59563
59564
59565Object.defineProperty(exports, "__esModule", {
59566  value: true
59567});
59568exports.default = exports.FormulaBlot = undefined;
59569
59570var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
59571
59572var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
59573
59574var _embed = __webpack_require__(35);
59575
59576var _embed2 = _interopRequireDefault(_embed);
59577
59578var _quill = __webpack_require__(5);
59579
59580var _quill2 = _interopRequireDefault(_quill);
59581
59582var _module = __webpack_require__(9);
59583
59584var _module2 = _interopRequireDefault(_module);
59585
59586function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
59587
59588function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
59589
59590function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
59591
59592function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
59593
59594var FormulaBlot = function (_Embed) {
59595  _inherits(FormulaBlot, _Embed);
59596
59597  function FormulaBlot() {
59598    _classCallCheck(this, FormulaBlot);
59599
59600    return _possibleConstructorReturn(this, (FormulaBlot.__proto__ || Object.getPrototypeOf(FormulaBlot)).apply(this, arguments));
59601  }
59602
59603  _createClass(FormulaBlot, null, [{
59604    key: 'create',
59605    value: function create(value) {
59606      var node = _get(FormulaBlot.__proto__ || Object.getPrototypeOf(FormulaBlot), 'create', this).call(this, value);
59607      if (typeof value === 'string') {
59608        window.katex.render(value, node, {
59609          throwOnError: false,
59610          errorColor: '#f00'
59611        });
59612        node.setAttribute('data-value', value);
59613      }
59614      return node;
59615    }
59616  }, {
59617    key: 'value',
59618    value: function value(domNode) {
59619      return domNode.getAttribute('data-value');
59620    }
59621  }]);
59622
59623  return FormulaBlot;
59624}(_embed2.default);
59625
59626FormulaBlot.blotName = 'formula';
59627FormulaBlot.className = 'ql-formula';
59628FormulaBlot.tagName = 'SPAN';
59629
59630var Formula = function (_Module) {
59631  _inherits(Formula, _Module);
59632
59633  _createClass(Formula, null, [{
59634    key: 'register',
59635    value: function register() {
59636      _quill2.default.register(FormulaBlot, true);
59637    }
59638  }]);
59639
59640  function Formula() {
59641    _classCallCheck(this, Formula);
59642
59643    var _this2 = _possibleConstructorReturn(this, (Formula.__proto__ || Object.getPrototypeOf(Formula)).call(this));
59644
59645    if (window.katex == null) {
59646      throw new Error('Formula module requires KaTeX.');
59647    }
59648    return _this2;
59649  }
59650
59651  return Formula;
59652}(_module2.default);
59653
59654exports.FormulaBlot = FormulaBlot;
59655exports.default = Formula;
59656
59657/***/ }),
59658/* 75 */
59659/***/ (function(module, exports, __webpack_require__) {
59660
59661"use strict";
59662
59663
59664Object.defineProperty(exports, "__esModule", {
59665  value: true
59666});
59667exports.default = exports.CodeToken = exports.CodeBlock = undefined;
59668
59669var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
59670
59671var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
59672
59673var _parchment = __webpack_require__(0);
59674
59675var _parchment2 = _interopRequireDefault(_parchment);
59676
59677var _quill = __webpack_require__(5);
59678
59679var _quill2 = _interopRequireDefault(_quill);
59680
59681var _module = __webpack_require__(9);
59682
59683var _module2 = _interopRequireDefault(_module);
59684
59685var _code = __webpack_require__(13);
59686
59687var _code2 = _interopRequireDefault(_code);
59688
59689function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
59690
59691function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
59692
59693function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
59694
59695function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
59696
59697var SyntaxCodeBlock = function (_CodeBlock) {
59698  _inherits(SyntaxCodeBlock, _CodeBlock);
59699
59700  function SyntaxCodeBlock() {
59701    _classCallCheck(this, SyntaxCodeBlock);
59702
59703    return _possibleConstructorReturn(this, (SyntaxCodeBlock.__proto__ || Object.getPrototypeOf(SyntaxCodeBlock)).apply(this, arguments));
59704  }
59705
59706  _createClass(SyntaxCodeBlock, [{
59707    key: 'replaceWith',
59708    value: function replaceWith(block) {
59709      this.domNode.textContent = this.domNode.textContent;
59710      this.attach();
59711      _get(SyntaxCodeBlock.prototype.__proto__ || Object.getPrototypeOf(SyntaxCodeBlock.prototype), 'replaceWith', this).call(this, block);
59712    }
59713  }, {
59714    key: 'highlight',
59715    value: function highlight(_highlight) {
59716      var text = this.domNode.textContent;
59717      if (this.cachedText !== text) {
59718        if (text.trim().length > 0 || this.cachedText == null) {
59719          this.domNode.innerHTML = _highlight(text);
59720          this.domNode.normalize();
59721          this.attach();
59722        }
59723        this.cachedText = text;
59724      }
59725    }
59726  }]);
59727
59728  return SyntaxCodeBlock;
59729}(_code2.default);
59730
59731SyntaxCodeBlock.className = 'ql-syntax';
59732
59733var CodeToken = new _parchment2.default.Attributor.Class('token', 'hljs', {
59734  scope: _parchment2.default.Scope.INLINE
59735});
59736
59737var Syntax = function (_Module) {
59738  _inherits(Syntax, _Module);
59739
59740  _createClass(Syntax, null, [{
59741    key: 'register',
59742    value: function register() {
59743      _quill2.default.register(CodeToken, true);
59744      _quill2.default.register(SyntaxCodeBlock, true);
59745    }
59746  }]);
59747
59748  function Syntax(quill, options) {
59749    _classCallCheck(this, Syntax);
59750
59751    var _this2 = _possibleConstructorReturn(this, (Syntax.__proto__ || Object.getPrototypeOf(Syntax)).call(this, quill, options));
59752
59753    if (typeof _this2.options.highlight !== 'function') {
59754      throw new Error('Syntax module requires highlight.js. Please include the library on the page before Quill.');
59755    }
59756    var timer = null;
59757    _this2.quill.on(_quill2.default.events.SCROLL_OPTIMIZE, function () {
59758      clearTimeout(timer);
59759      timer = setTimeout(function () {
59760        _this2.highlight();
59761        timer = null;
59762      }, _this2.options.interval);
59763    });
59764    _this2.highlight();
59765    return _this2;
59766  }
59767
59768  _createClass(Syntax, [{
59769    key: 'highlight',
59770    value: function highlight() {
59771      var _this3 = this;
59772
59773      if (this.quill.selection.composing) return;
59774      this.quill.update(_quill2.default.sources.USER);
59775      var range = this.quill.getSelection();
59776      this.quill.scroll.descendants(SyntaxCodeBlock).forEach(function (code) {
59777        code.highlight(_this3.options.highlight);
59778      });
59779      this.quill.update(_quill2.default.sources.SILENT);
59780      if (range != null) {
59781        this.quill.setSelection(range, _quill2.default.sources.SILENT);
59782      }
59783    }
59784  }]);
59785
59786  return Syntax;
59787}(_module2.default);
59788
59789Syntax.DEFAULTS = {
59790  highlight: function () {
59791    if (window.hljs == null) return null;
59792    return function (text) {
59793      var result = window.hljs.highlightAuto(text);
59794      return result.value;
59795    };
59796  }(),
59797  interval: 1000
59798};
59799
59800exports.CodeBlock = SyntaxCodeBlock;
59801exports.CodeToken = CodeToken;
59802exports.default = Syntax;
59803
59804/***/ }),
59805/* 76 */
59806/***/ (function(module, exports) {
59807
59808module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>";
59809
59810/***/ }),
59811/* 77 */
59812/***/ (function(module, exports) {
59813
59814module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>";
59815
59816/***/ }),
59817/* 78 */
59818/***/ (function(module, exports) {
59819
59820module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>";
59821
59822/***/ }),
59823/* 79 */
59824/***/ (function(module, exports) {
59825
59826module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>";
59827
59828/***/ }),
59829/* 80 */
59830/***/ (function(module, exports) {
59831
59832module.exports = "<svg viewbox=\"0 0 18 18\"> <g class=\"ql-fill ql-color-label\"> <polygon points=\"6 6.868 6 6 5 6 5 7 5.942 7 6 6.868\"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points=\"6.817 5 6 5 6 6 6.38 6 6.817 5\"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points=\"4 11.439 4 11 3 11 3 12 3.755 12 4 11.439\"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points=\"4.63 10 4 10 4 11 4.192 11 4.63 10\"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points=\"13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174\"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points=\"12 6.868 12 6 11.62 6 12 6.868\"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points=\"12.933 9 13 9 13 8 12.495 8 12.933 9\"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points=\"5.5 13 9 5 12.5 13\"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>";
59833
59834/***/ }),
59835/* 81 */
59836/***/ (function(module, exports) {
59837
59838module.exports = "<svg viewbox=\"0 0 18 18\"> <rect class=\"ql-fill ql-stroke\" height=3 width=3 x=4 y=5></rect> <rect class=\"ql-fill ql-stroke\" height=3 width=3 x=11 y=5></rect> <path class=\"ql-even ql-fill ql-stroke\" d=M7,8c0,4.031-3,5-3,5></path> <path class=\"ql-even ql-fill ql-stroke\" d=M14,8c0,4.031-3,5-3,5></path> </svg>";
59839
59840/***/ }),
59841/* 82 */
59842/***/ (function(module, exports) {
59843
59844module.exports = "<svg viewbox=\"0 0 18 18\"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>";
59845
59846/***/ }),
59847/* 83 */
59848/***/ (function(module, exports) {
59849
59850module.exports = "<svg class=\"\" viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>";
59851
59852/***/ }),
59853/* 84 */
59854/***/ (function(module, exports) {
59855
59856module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=\"ql-color-label ql-stroke ql-transparent\" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points=\"5.5 11 9 3 12.5 11\"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>";
59857
59858/***/ }),
59859/* 85 */
59860/***/ (function(module, exports) {
59861
59862module.exports = "<svg viewbox=\"0 0 18 18\"> <polygon class=\"ql-stroke ql-fill\" points=\"3 11 5 9 3 7 3 11\"></polygon> <line class=\"ql-stroke ql-fill\" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>";
59863
59864/***/ }),
59865/* 86 */
59866/***/ (function(module, exports) {
59867
59868module.exports = "<svg viewbox=\"0 0 18 18\"> <polygon class=\"ql-stroke ql-fill\" points=\"15 12 13 10 15 8 15 12\"></polygon> <line class=\"ql-stroke ql-fill\" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>";
59869
59870/***/ }),
59871/* 87 */
59872/***/ (function(module, exports) {
59873
59874module.exports = "<svg viewbox=\"0 0 18 18\"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>";
59875
59876/***/ }),
59877/* 88 */
59878/***/ (function(module, exports) {
59879
59880module.exports = "<svg viewbox=\"0 0 18 18\"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>";
59881
59882/***/ }),
59883/* 89 */
59884/***/ (function(module, exports) {
59885
59886module.exports = "<svg viewbox=\"0 0 18 18\"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>";
59887
59888/***/ }),
59889/* 90 */
59890/***/ (function(module, exports) {
59891
59892module.exports = "<svg viewbox=\"0 0 18 18\"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform=\"translate(24 18) rotate(-180)\"/> </svg>";
59893
59894/***/ }),
59895/* 91 */
59896/***/ (function(module, exports) {
59897
59898module.exports = "<svg viewbox=\"0 0 18 18\"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>";
59899
59900/***/ }),
59901/* 92 */
59902/***/ (function(module, exports) {
59903
59904module.exports = "<svg viewBox=\"0 0 18 18\"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>";
59905
59906/***/ }),
59907/* 93 */
59908/***/ (function(module, exports) {
59909
59910module.exports = "<svg viewBox=\"0 0 18 18\"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>";
59911
59912/***/ }),
59913/* 94 */
59914/***/ (function(module, exports) {
59915
59916module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>";
59917
59918/***/ }),
59919/* 95 */
59920/***/ (function(module, exports) {
59921
59922module.exports = "<svg viewbox=\"0 0 18 18\"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class=\"ql-even ql-fill\" points=\"5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12\"></polyline> </svg>";
59923
59924/***/ }),
59925/* 96 */
59926/***/ (function(module, exports) {
59927
59928module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=\"ql-fill ql-stroke\" points=\"3 7 3 11 5 9 3 7\"></polyline> </svg>";
59929
59930/***/ }),
59931/* 97 */
59932/***/ (function(module, exports) {
59933
59934module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points=\"5 7 5 11 3 9 5 7\"></polyline> </svg>";
59935
59936/***/ }),
59937/* 98 */
59938/***/ (function(module, exports) {
59939
59940module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class=\"ql-even ql-stroke\" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class=\"ql-even ql-stroke\" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>";
59941
59942/***/ }),
59943/* 99 */
59944/***/ (function(module, exports) {
59945
59946module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class=\"ql-stroke ql-thin\" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class=\"ql-stroke ql-thin\" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class=\"ql-stroke ql-thin\" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>";
59947
59948/***/ }),
59949/* 100 */
59950/***/ (function(module, exports) {
59951
59952module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>";
59953
59954/***/ }),
59955/* 101 */
59956/***/ (function(module, exports) {
59957
59958module.exports = "<svg class=\"\" viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points=\"3 4 4 5 6 3\"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points=\"3 14 4 15 6 13\"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points=\"3 9 4 10 6 8\"></polyline> </svg>";
59959
59960/***/ }),
59961/* 102 */
59962/***/ (function(module, exports) {
59963
59964module.exports = "<svg viewbox=\"0 0 18 18\"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>";
59965
59966/***/ }),
59967/* 103 */
59968/***/ (function(module, exports) {
59969
59970module.exports = "<svg viewbox=\"0 0 18 18\"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>";
59971
59972/***/ }),
59973/* 104 */
59974/***/ (function(module, exports) {
59975
59976module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=\"ql-stroke ql-thin\" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>";
59977
59978/***/ }),
59979/* 105 */
59980/***/ (function(module, exports) {
59981
59982module.exports = "<svg viewbox=\"0 0 18 18\"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>";
59983
59984/***/ }),
59985/* 106 */
59986/***/ (function(module, exports) {
59987
59988module.exports = "<svg viewbox=\"0 0 18 18\"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>";
59989
59990/***/ }),
59991/* 107 */
59992/***/ (function(module, exports) {
59993
59994module.exports = "<svg viewbox=\"0 0 18 18\"> <polygon class=ql-stroke points=\"7 11 9 13 11 11 7 11\"></polygon> <polygon class=ql-stroke points=\"7 7 9 5 11 7 7 7\"></polygon> </svg>";
59995
59996/***/ }),
59997/* 108 */
59998/***/ (function(module, exports, __webpack_require__) {
59999
60000"use strict";
60001
60002
60003Object.defineProperty(exports, "__esModule", {
60004  value: true
60005});
60006exports.default = exports.BubbleTooltip = undefined;
60007
60008var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
60009
60010var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
60011
60012var _extend = __webpack_require__(3);
60013
60014var _extend2 = _interopRequireDefault(_extend);
60015
60016var _emitter = __webpack_require__(8);
60017
60018var _emitter2 = _interopRequireDefault(_emitter);
60019
60020var _base = __webpack_require__(43);
60021
60022var _base2 = _interopRequireDefault(_base);
60023
60024var _selection = __webpack_require__(15);
60025
60026var _icons = __webpack_require__(41);
60027
60028var _icons2 = _interopRequireDefault(_icons);
60029
60030function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
60031
60032function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
60033
60034function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
60035
60036function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
60037
60038var TOOLBAR_CONFIG = [['bold', 'italic', 'link'], [{ header: 1 }, { header: 2 }, 'blockquote']];
60039
60040var BubbleTheme = function (_BaseTheme) {
60041  _inherits(BubbleTheme, _BaseTheme);
60042
60043  function BubbleTheme(quill, options) {
60044    _classCallCheck(this, BubbleTheme);
60045
60046    if (options.modules.toolbar != null && options.modules.toolbar.container == null) {
60047      options.modules.toolbar.container = TOOLBAR_CONFIG;
60048    }
60049
60050    var _this = _possibleConstructorReturn(this, (BubbleTheme.__proto__ || Object.getPrototypeOf(BubbleTheme)).call(this, quill, options));
60051
60052    _this.quill.container.classList.add('ql-bubble');
60053    return _this;
60054  }
60055
60056  _createClass(BubbleTheme, [{
60057    key: 'extendToolbar',
60058    value: function extendToolbar(toolbar) {
60059      this.tooltip = new BubbleTooltip(this.quill, this.options.bounds);
60060      this.tooltip.root.appendChild(toolbar.container);
60061      this.buildButtons([].slice.call(toolbar.container.querySelectorAll('button')), _icons2.default);
60062      this.buildPickers([].slice.call(toolbar.container.querySelectorAll('select')), _icons2.default);
60063    }
60064  }]);
60065
60066  return BubbleTheme;
60067}(_base2.default);
60068
60069BubbleTheme.DEFAULTS = (0, _extend2.default)(true, {}, _base2.default.DEFAULTS, {
60070  modules: {
60071    toolbar: {
60072      handlers: {
60073        link: function link(value) {
60074          if (!value) {
60075            this.quill.format('link', false);
60076          } else {
60077            this.quill.theme.tooltip.edit();
60078          }
60079        }
60080      }
60081    }
60082  }
60083});
60084
60085var BubbleTooltip = function (_BaseTooltip) {
60086  _inherits(BubbleTooltip, _BaseTooltip);
60087
60088  function BubbleTooltip(quill, bounds) {
60089    _classCallCheck(this, BubbleTooltip);
60090
60091    var _this2 = _possibleConstructorReturn(this, (BubbleTooltip.__proto__ || Object.getPrototypeOf(BubbleTooltip)).call(this, quill, bounds));
60092
60093    _this2.quill.on(_emitter2.default.events.EDITOR_CHANGE, function (type, range, oldRange, source) {
60094      if (type !== _emitter2.default.events.SELECTION_CHANGE) return;
60095      if (range != null && range.length > 0 && source === _emitter2.default.sources.USER) {
60096        _this2.show();
60097        // Lock our width so we will expand beyond our offsetParent boundaries
60098        _this2.root.style.left = '0px';
60099        _this2.root.style.width = '';
60100        _this2.root.style.width = _this2.root.offsetWidth + 'px';
60101        var lines = _this2.quill.getLines(range.index, range.length);
60102        if (lines.length === 1) {
60103          _this2.position(_this2.quill.getBounds(range));
60104        } else {
60105          var lastLine = lines[lines.length - 1];
60106          var index = _this2.quill.getIndex(lastLine);
60107          var length = Math.min(lastLine.length() - 1, range.index + range.length - index);
60108          var _bounds = _this2.quill.getBounds(new _selection.Range(index, length));
60109          _this2.position(_bounds);
60110        }
60111      } else if (document.activeElement !== _this2.textbox && _this2.quill.hasFocus()) {
60112        _this2.hide();
60113      }
60114    });
60115    return _this2;
60116  }
60117
60118  _createClass(BubbleTooltip, [{
60119    key: 'listen',
60120    value: function listen() {
60121      var _this3 = this;
60122
60123      _get(BubbleTooltip.prototype.__proto__ || Object.getPrototypeOf(BubbleTooltip.prototype), 'listen', this).call(this);
60124      this.root.querySelector('.ql-close').addEventListener('click', function () {
60125        _this3.root.classList.remove('ql-editing');
60126      });
60127      this.quill.on(_emitter2.default.events.SCROLL_OPTIMIZE, function () {
60128        // Let selection be restored by toolbar handlers before repositioning
60129        setTimeout(function () {
60130          if (_this3.root.classList.contains('ql-hidden')) return;
60131          var range = _this3.quill.getSelection();
60132          if (range != null) {
60133            _this3.position(_this3.quill.getBounds(range));
60134          }
60135        }, 1);
60136      });
60137    }
60138  }, {
60139    key: 'cancel',
60140    value: function cancel() {
60141      this.show();
60142    }
60143  }, {
60144    key: 'position',
60145    value: function position(reference) {
60146      var shift = _get(BubbleTooltip.prototype.__proto__ || Object.getPrototypeOf(BubbleTooltip.prototype), 'position', this).call(this, reference);
60147      var arrow = this.root.querySelector('.ql-tooltip-arrow');
60148      arrow.style.marginLeft = '';
60149      if (shift === 0) return shift;
60150      arrow.style.marginLeft = -1 * shift - arrow.offsetWidth / 2 + 'px';
60151    }
60152  }]);
60153
60154  return BubbleTooltip;
60155}(_base.BaseTooltip);
60156
60157BubbleTooltip.TEMPLATE = ['<span class="ql-tooltip-arrow"></span>', '<div class="ql-tooltip-editor">', '<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">', '<a class="ql-close"></a>', '</div>'].join('');
60158
60159exports.BubbleTooltip = BubbleTooltip;
60160exports.default = BubbleTheme;
60161
60162/***/ }),
60163/* 109 */
60164/***/ (function(module, exports, __webpack_require__) {
60165
60166module.exports = __webpack_require__(63);
60167
60168
60169/***/ })
60170/******/ ])["default"];
60171});
vendor: 8,038 bytes, lines 60171-60181
60171
60172/**
60173 * Tagify (v 4.7.2) - tags input component
60174 * By Yair Even-Or
60175 * Don't sell this code. (c)
60176 * https://github.com/yairEO/tagify
60177 */
60178
60179!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){"use strict";function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}var e;"".trim||(String.prototype.trim=function(){return this.replace(/^[\s]+|[\s]+$/g,"")}),window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),n=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var o=arguments[1],r=0;r<n;){var i=e[r];if(t.call(o,i,r,e))return r;r++}return-1},configurable:!0,writable:!0}),Array.prototype.includes||(Array.prototype.includes=function(t){return!!~this.indexOf(t)}),Array.prototype.some||(Array.prototype.some=function(t,e){if(null==this)throw new TypeError("Array.prototype.some called on null or undefined");if("function"!=typeof t)throw new TypeError;for(var n=Object(this),o=n.length>>>0,r=0;r<o;r++)if(r in n&&t.call(e,n[r],r,n))return!0;return!1}),String.prototype.includes||(String.prototype.includes=function(t,e){return"number"!=typeof e&&(e=0),!(e+t.length>this.length)&&-1!==this.indexOf(t,e)}),"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),o=1;o<arguments.length;o++){var r=arguments[o];if(null!=r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])}return n},writable:!0,configurable:!0}),t.prototype=window.Event.prototype,"function"!=typeof window.CustomEvent&&(window.CustomEvent=t),Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(t){var e=this;if(!document.documentElement.contains(e))return null;do{if(e.matches(t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}),document.execCommand("AutoUrlDetect",!1,!1),
60180/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */
60181"document"in self&&((!("classList"in document.createElement("_"))||document.createElementNS&&!("classList"in document.createElementNS("http://www.w3.org/2000/svg","g")))&&function(t){if("Element"in t){var e="classList",n=t.Element.prototype,o=Object,r=String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")},i=Array.prototype.indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1},c=function(t,e){this.name=t,this.code=DOMException[t],this.message=e},s=function(t,e){if(""===e)throw new c("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(e))throw new c("INVALID_CHARACTER_ERR","The token must not contain space characters.");return i.call(t,e)},u=function(t){for(var e=r.call(t.getAttribute("class")||""),n=e?e.split(/\s+/):[],o=0,i=n.length;o<i;o++)this.push(n[o]);this._updateClassName=function(){t.setAttribute("class",this.toString())}},l=u.prototype=[],a=function(){return new u(this)};if(c.prototype=Error.prototype,l.item=function(t){return this[t]||null},l.contains=function(t){return~s(this,t+"")},l.add=function(){var t,e=arguments,n=0,o=e.length,r=!1;do{t=e[n]+"",~s(this,t)||(this.push(t),r=!0)}while(++n<o);r&&this._updateClassName()},l.remove=function(){var t,e,n=arguments,o=0,r=n.length,i=!1;do{for(t=n[o]+"",e=s(this,t);~e;)this.splice(e,1),i=!0,e=s(this,t)}while(++o<r);i&&this._updateClassName()},l.toggle=function(t,e){var n=this.contains(t),o=n?!0!==e&&"remove":!1!==e&&"add";return o&&this[o](t),!0===e||!1===e?e:!n},l.replace=function(t,e){var n=s(t+"");~n&&(this.splice(n,1,e),this._updateClassName())},l.toString=function(){return this.join(" ")},o.defineProperty){var f={get:a,enumerable:!0,configurable:!0};try{o.defineProperty(n,e,f)}catch(t){void 0!==t.number&&-2146823252!==t.number||(f.enumerable=!1,o.defineProperty(n,e,f))}}else o.prototype.__defineGetter__&&n.__defineGetter__(e,a)}}(self),function(){var t=document.createElement("_");if(t.classList.add("c1","c2"),!t.classList.contains("c2")){var e=function(t){var e=DOMTokenList.prototype[t];DOMTokenList.prototype[t]=function(t){var n,o=arguments.length;for(n=0;n<o;n++)t=arguments[n],e.call(this,t)}};e("add"),e("remove")}if(t.classList.toggle("c3",!1),t.classList.contains("c3")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return 1 in arguments&&!this.contains(t)==!e?e:n.call(this,t)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(t,e){var n=this.toString().split(" "),o=n.indexOf(t+"");~o&&(n=n.slice(o),this.remove.apply(this,n),this.add(e),this.add.apply(this,n.slice(1)))}),t=null}()),e=function(){function t(t){var e=this.constructor;return this.then((function(n){return e.resolve(t()).then((function(){return n}))}),(function(n){return e.resolve(t()).then((function(){return e.reject(n)}))}))}function e(t){return new this((function(e,n){if(!t||void 0===t.length)return n(new TypeError(typeof t+" "+t+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var o=Array.prototype.slice.call(t);if(0===o.length)return e([]);var r=o.length;function i(t,n){if(n&&("object"==typeof n||"function"==typeof n)){var c=n.then;if("function"==typeof c)return void c.call(n,(function(e){i(t,e)}),(function(n){o[t]={status:"rejected",reason:n},0==--r&&e(o)}))}o[t]={status:"fulfilled",value:n},0==--r&&e(o)}for(var c=0;c<o.length;c++)i(c,o[c])}))}var n=setTimeout;function o(t){return Boolean(t&&void 0!==t.length)}function r(){}function i(t){if(!(this instanceof i))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],f(t,this)}function c(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,i._immediateFn((function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var o;try{o=n(t._value)}catch(t){return void u(e.promise,t)}s(e.promise,o)}else(1===t._state?s:u)(e.promise,t._value)}))):t._deferreds.push(e)}function s(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof i)return t._state=3,t._value=e,void l(t);if("function"==typeof n)return void f((o=n,r=e,function(){o.apply(r,arguments)}),t)}t._state=1,t._value=e,l(t)}catch(e){u(t,e)}var o,r}function u(t,e){t._state=2,t._value=e,l(t)}function l(t){2===t._state&&0===t._deferreds.length&&i._immediateFn((function(){t._handled||i._unhandledRejectionFn(t._value)}));for(var e=0,n=t._deferreds.length;e<n;e++)c(t,t._deferreds[e]);t._deferreds=null}function a(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function f(t,e){var n=!1;try{t((function(t){n||(n=!0,s(e,t))}),(function(t){n||(n=!0,u(e,t))}))}catch(t){if(n)return;n=!0,u(e,t)}}i.prototype.catch=function(t){return this.then(null,t)},i.prototype.then=function(t,e){var n=new this.constructor(r);return c(this,new a(t,e,n)),n},i.prototype.finally=t,i.all=function(t){return new i((function(e,n){if(!o(t))return n(new TypeError("Promise.all accepts an array"));var r=Array.prototype.slice.call(t);if(0===r.length)return e([]);var i=r.length;function c(t,o){try{if(o&&("object"==typeof o||"function"==typeof o)){var s=o.then;if("function"==typeof s)return void s.call(o,(function(e){c(t,e)}),n)}r[t]=o,0==--i&&e(r)}catch(t){n(t)}}for(var s=0;s<r.length;s++)c(s,r[s])}))},i.allSettled=e,i.resolve=function(t){return t&&"object"==typeof t&&t.constructor===i?t:new i((function(e){e(t)}))}
60181,i.reject=function(t){return new i((function(e,n){n(t)}))},i.race=function(t){return new i((function(e,n){if(!o(t))return n(new TypeError("Promise.race accepts an array"));for(var r=0,c=t.length;r<c;r++)i.resolve(t[r]).then(e,n)}))},i._immediateFn="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){n(t,0)},i._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};var p=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}();"function"!=typeof p.Promise?p.Promise=i:p.Promise.prototype.finally?p.Promise.allSettled||(p.Promise.allSettled=e):p.Promise.prototype.finally=t},"object"==typeof exports&&"undefined"!=typeof module?e():"function"==typeof define&&define.amd?define(e):e()}));
60182
60183/**
60184 * Tagify (v 4.7.2) - tags input component
60185 * By Yair Even-Or
60186 * Don't sell this code. (c)
60187 * https://github.com/yairEO/tagify
60188 */
60189
60190!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Tagify=e()}(this,(function(){"use strict";function t(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function e(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,s)}return i}function i(i){for(var s=1;s<arguments.length;s++){var a=null!=arguments[s]?arguments[s]:{};s%2?e(Object(a),!0).forEach((function(e){t(i,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(a)):e(Object(a)).forEach((function(t){Object.defineProperty(i,t,Object.getOwnPropertyDescriptor(a,t))}))}return i}const s=(t,e,i,s)=>(t=""+t,e=""+e,s&&(t=t.trim(),e=e.trim()),i?t==e:t.toLowerCase()==e.toLowerCase());function a(t,e){var i,s={};for(i in t)e.indexOf(i)<0&&(s[i]=t[i]);return s}function n(t){var e=document.createElement("div");return t.replace(/\&#?[0-9a-z]+;/gi,(function(t){return e.innerHTML=t,e.innerText}))}function o(t,e){for(e=e||"previous";t=t[e+"Sibling"];)if(3==t.nodeType)return t}function r(t){return"string"==typeof t?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/`|'/g,"&#039;"):t}function l(t){var e=Object.prototype.toString.call(t).split(" ")[1].slice(0,-1);return t===Object(t)&&"Array"!=e&&"Function"!=e&&"RegExp"!=e&&"HTMLUnknownElement"!=e}function d(t,e,i){function s(t,e){for(var i in e)if(e.hasOwnProperty(i)){if(l(e[i])){l(t[i])?s(t[i],e[i]):t[i]=Object.assign({},e[i]);continue}if(Array.isArray(e[i])){t[i]=Object.assign([],e[i]);continue}t[i]=e[i]}}return t instanceof Object||(t={}),s(t,e),i&&s(t,i),t}function h(t){return String.prototype.normalize?"string"==typeof t?t.normalize("NFD").replace(/[\u0300-\u036f]/g,""):void 0:t}var g=()=>/(?=.*chrome)(?=.*android)/i.test(navigator.userAgent);var p={delimiters:",",pattern:null,tagTextProp:"value",maxTags:1/0,callbacks:{},addTagOnBlur:!0,duplicates:!1,whitelist:[],blacklist:[],enforceWhitelist:!1,userInput:!0,keepInvalidTags:!1,mixTagsAllowedAfter:/,|\.|\:|\s/,mixTagsInterpolator:["[[","]]"],backspace:!0,skipInvalid:!1,pasteAsTags:!0,editTags:{clicks:2,keepInvalid:!0},transformTag:()=>{},trim:!0,a11y:{focusableTags:!1},mixMode:{insertAfterTag:" "},autoComplete:{enabled:!0,rightKey:!1},classNames:{namespace:"tagify",mixMode:"tagify--mix",selectMode:"tagify--select",input:"tagify__input",focus:"tagify--focus",tag:"tagify__tag",tagNoAnimation:"tagify--noAnim",tagInvalid:"tagify--invalid",tagNotAllowed:"tagify--notAllowed",inputInvalid:"tagify__input--invalid",tagX:"tagify__tag__removeBtn",tagText:"tagify__tag-text",dropdown:"tagify__dropdown",dropdownWrapper:"tagify__dropdown__wrapper",dropdownItem:"tagify__dropdown__item",dropdownItemActive:"tagify__dropdown__item--active",dropdownInital:"tagify__dropdown--initial",scopeLoading:"tagify--loading",tagLoading:"tagify__tag--loading",tagEditing:"tagify__tag--editable",tagFlash:"tagify__tag--flash",tagHide:"tagify__tag--hide",hasMaxTags:"tagify--hasMaxTags",hasNoTags:"tagify--noTags",empty:"tagify--empty"},dropdown:{classname:"",enabled:2,maxItems:10,searchKeys:["value","searchBy"],fuzzySearch:!0,caseSensitive:!1,accentedSearch:!0,highlightFirst:!1,closeOnSelect:!0,clearOnSelect:!0,position:"all",appendTarget:null},hooks:{beforeRemoveTag:()=>Promise.resolve(),beforePaste:()=>Promise.resolve(),suggestionClick:()=>Promise.resolve()}};function c(){this.dropdown={};for(let t in this._dropdown)this.dropdown[t]="function"==typeof this._dropdown[t]?this._dropdown[t].bind(this):this._dropdown[t];this.settings.dropdown.enabled>=0&&this.dropdown.init()}
60190var u,m={init(){this.DOM.dropdown=this.parseTemplate("dropdown",[this.settings]),this.DOM.dropdown.content=this.DOM.dropdown.querySelector(this.settings.classNames.dropdownWrapperSelector)},show(t){var e,i,a,n=this.settings,o="mix"==n.mode&&!n.enforceWhitelist,r=!n.whitelist||!n.whitelist.length,d="manual"==n.dropdown.position;if(t=void 0===t?this.state.inputText:t,(!r||o||n.templates.dropdownItemNoMatch)&&!1!==n.dropdown.enable&&!this.state.isLoading){if(clearTimeout(this.dropdownHide__bindEventsTimeout),this.suggestedListItems=this.dropdown.filterListItems(t),t&&!this.suggestedListItems.length&&(this.trigger("dropdown:noMatch",t),n.templates.dropdownItemNoMatch&&(a=n.templates.dropdownItemNoMatch.call(this,{value:t}))),!a){if(this.suggestedListItems.length)t&&o&&!this.state.editing.scope&&!s(this.suggestedListItems[0].value,t)&&this.suggestedListItems.unshift({value:t});else{if(!t||!o||this.state.editing.scope)return this.input.autocomplete.suggest.call(this),void this.dropdown.hide();this.suggestedListItems=[{value:t}]}i=""+(l(e=this.suggestedListItems[0])?e.value:e),n.autoComplete&&i&&0==i.indexOf(t)&&this.input.autocomplete.suggest.call(this,e)}this.dropdown.fill(a),n.dropdown.highlightFirst&&this.dropdown.highlightOption(this.DOM.dropdown.content.children[0]),this.state.dropdown.visible||setTimeout(this.dropdown.events.binding.bind(this)),this.state.dropdown.visible=t||!0,this.state.dropdown.query=t,this.setStateSelection(),d||setTimeout((()=>{this.dropdown.position(),this.dropdown.render()})),setTimeout((()=>{this.trigger("dropdown:show",this.DOM.dropdown)}))}},hide(t){var e=this.DOM,i=e.scope,s=e.dropdown,a="manual"==this.settings.dropdown.position&&!t;if(s&&document.body.contains(s)&&!a)return window.removeEventListener("resize",this.dropdown.position),this.dropdown.events.binding.call(this,!1),i.setAttribute("aria-expanded",!1),s.parentNode.removeChild(s),setTimeout((()=>{this.state.dropdown.visible=!1}),100),this.state.dropdown.query=this.state.ddItemData=this.state.ddItemElm=this.state.selection=null,this.state.tag&&this.state.tag.value.length&&(this.state.flaggedTags[this.state.tag.baseOffset]=this.state.tag),this.trigger("dropdown:hide",s),this},toggle(t){this.dropdown[this.state.dropdown.visible&&!t?"hide":"show"]()},render(){var t,e,i,s=(t=this.DOM.dropdown,(i=t.cloneNode(!0)).style.cssText="position:fixed; top:-9999px; opacity:0",document.body.appendChild(i),e=i.clientHeight,i.parentNode.removeChild(i),e),a=this.settings;return this.DOM.scope.setAttribute("aria-expanded",!0),document.body.contains(this.DOM.dropdown)||(this.DOM.dropdown.classList.add(a.classNames.dropdownInital),this.dropdown.position(s),a.dropdown.appendTarget.appendChild(this.DOM.dropdown),setTimeout((()=>this.DOM.dropdown.classList.remove(a.classNames.dropdownInital)))),this},fill(t){var e;t="string"==typeof t?t:this.dropdown.createListHTML(t||this.suggestedListItems),this.DOM.dropdown.content.innerHTML=(e=t)?e.replace(/\>[\r\n ]+\</g,"><").replace(/(<.*?>)|\s+/g,((t,e)=>e||" ")):""},refilter(t){t=t||this.state.dropdown.query||"",this.suggestedListItems=this.dropdown.filterListItems(t),this.dropdown.fill(),this.suggestedListItems.length||this.dropdown.hide(),this.trigger("dropdown:updated",this.DOM.dropdown)},position(t){var e=this.settings.dropdown;if("manual"!=e.position){var i,s,a,n,o,r,l=this.DOM.dropdown,d=e.placeAbove,h=document.documentElement.clientHeight,g=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0)>480?e.position:"all",p=this.DOM["input"==g?"input":"scope"];t=t||l.clientHeight,this.state.dropdown.visible&&("text"==g?(a=(i=this.getCaretGlobalPosition()).bottom,s=i.top,n=i.left,o="auto"):(r=function(t){for(var e=0,i=0;t;)e+=t.offsetLeft||0,i+=t.offsetTop||0,t=t.parentNode;return{left:e,top:i}}(this.settings.dropdown.appendTarget),s=(i=p.getBoundingClientRect()).top-r.top,a=i.bottom-1-r.top,n=i.left-r.left,o=i.width+"px"),s=Math.floor(s),a=Math.ceil(a),d=void 0===d?h-i.bottom<t:d,l.style.cssText="left:"+(n+window.pageXOffset)+"px; width:"+o+";"+(d?"top: "+(s+window.pageYOffset)+"px":"top: "+(a+window.pageYOffset)+"px"),l.setAttribute("placement",d?"top":"bottom"),l.setAttribute("position",g))}},events:{binding(t=!0){var e=this.dropdown.events.callbacks,i=this.listeners.dropdown=this.listeners.dropdown||{position:this.dropdown.position.bind(this),onKeyDown:e.onKeyDown.bind(this),onMouseOver:e.onMouseOver.bind(this),onMouseLeave:e.onMouseLeave.bind(this),onClick:e.onClick.bind(this),onScroll:e.onScroll.bind(this)},s=t?"addEventListener":"removeEventListener";"manual"!=this.settings.dropdown.position&&(window[s]("resize",i.position),window[s]("keydown",i.onKeyDown)),this.DOM.dropdown[s]("mouseover",i.onMouseOver),this.DOM.dropdown[s]("mouseleave",i.onMouseLeave),this.DOM.dropdown[s]("mousedown",i.onClick),this.DOM.dropdown.content[s]("scroll",i.onScroll)},callbacks:{onKeyDown(t){var e=this.DOM.dropdown.querySelector(this.settings.classNames.dropdownItemActiveSelector),i=this.dropdown.getSuggestionDataByNode(e);switch(t.key){case"ArrowDown":case"ArrowUp":case"Down":case"Up":var s;t.preventDefault(),e&&(e=e[("ArrowUp"==t.key||"Up"==t.key?"previous":"next")+"ElementSibling"]),e||(s=this.DOM.dropdown.content.children,e=s["ArrowUp"==t.key||"Up"==t.key?s.length-1:0]),i=this.dropdown.getSuggestionDataByNode(e),this.dropdown.highlightOption(e,!0);break;case"Escape":case"Esc":this.dropdown.hide();break;case"ArrowRight":if(this.state.actions.ArrowLeft)return;case"Tab":if("mix"!=this.settings.mode&&e&&!this.settings.autoComplete.rightKey&&!this.state.editing){t.preventDefault();var a=this.dropdown.getMappedValue(i);return this.input.autocomplete.set.call(this,a),!1}return!0;case"Enter":t.preventDefault(),this.settings.hooks.suggestionClick(t,{tagify:this,tagData:i,suggestionElm:e}).then((()=>
60190{if(e)return this.dropdown.selectOption(e);this.dropdown.hide(),"mix"!=this.settings.mode&&this.addTags(this.state.inputText.trim(),!0)})).catch((t=>t));break;case"Backspace":{if("mix"==this.settings.mode||this.state.editing.scope)return;let t=this.state.inputText.trim();""!=t&&8203!=t.charCodeAt(0)||(!0===this.settings.backspace?this.removeTags():"edit"==this.settings.backspace&&setTimeout(this.editTag.bind(this),0))}}},onMouseOver(t){var e=t.target.closest(this.settings.classNames.dropdownItemSelector);e&&this.dropdown.highlightOption(e)},onMouseLeave(t){this.dropdown.highlightOption()},onClick(t){if(0==t.button&&t.target!=this.DOM.dropdown&&t.target!=this.DOM.dropdown.content){var e=t.target.closest(this.settings.classNames.dropdownItemSelector),i=this.dropdown.getSuggestionDataByNode(e);this.state.actions.selectOption=!0,setTimeout((()=>this.state.actions.selectOption=!1),50),this.settings.hooks.suggestionClick(t,{tagify:this,tagData:i,suggestionElm:e}).then((()=>{e?this.dropdown.selectOption(e):this.dropdown.hide()})).catch((t=>t))}},onScroll(t){var e=t.target,i=e.scrollTop/(e.scrollHeight-e.parentNode.clientHeight)*100;this.trigger("dropdown:scroll",{percentage:Math.round(i)})}}},getSuggestionDataByNode(t){var e=t?+t.getAttribute("tagifySuggestionIdx"):-1;return this.suggestedListItems[e]||null},highlightOption(t,e){var i,s=this.settings.classNames.dropdownItemActive;if(this.state.ddItemElm&&(this.state.ddItemElm.classList.remove(s),this.state.ddItemElm.removeAttribute("aria-selected")),!t)return this.state.ddItemData=null,this.state.ddItemElm=null,void this.input.autocomplete.suggest.call(this);i=this.suggestedListItems[this.getNodeIndex(t)],this.state.ddItemData=i,this.state.ddItemElm=t,t.classList.add(s),t.setAttribute("aria-selected",!0),e&&(t.parentNode.scrollTop=t.clientHeight+t.offsetTop-t.parentNode.clientHeight),this.settings.autoComplete&&(this.input.autocomplete.suggest.call(this,i),this.dropdown.position())},selectOption(t){var e,i=this.settings.dropdown,s=i.clearOnSelect,a=i.closeOnSelect;if(!t)return e=this.addTags(this.state.inputText,!0),void(a&&this.dropdown.hide());var n=t.getAttribute("tagifySuggestionIdx"),o=this.suggestedListItems[+n];this.trigger("dropdown:select",{data:o,elm:t}),n&&o?(this.state.editing?this.onEditTagDone(null,d({__isValid:!0},o)):e=this["mix"==this.settings.mode?"addMixTags":"addTags"]([o],s),this.DOM.input.parentNode&&(setTimeout((()=>{this.DOM.input.focus(),this.toggleFocusClass(!0),this.placeCaretAfterNode(e)})),a?setTimeout(this.dropdown.hide.bind(this)):this.dropdown.refilter())):this.dropdown.hide()},selectAll(){return this.suggestedListItems.length=0,this.dropdown.hide(),this.addTags(this.dropdown.filterListItems(""),!0),this},filterListItems(t,e){var i,s,a,n,o,r=this.settings,d=r.dropdown,g=(e=e||{},t="select"==r.mode&&this.value.length&&this.value[0][r.tagTextProp]==t?"":t,[]),p=r.whitelist,c=d.maxItems||1/0,u=d.searchKeys,m=0;if(!t||!u.length)return(r.duplicates?p:p.filter((t=>!this.isTagDuplicate(l(t)?t.value:t)))).slice(0,c);function v(t,e){return e.toLowerCase().split(" ").every((e=>t.includes(e.toLowerCase())))}for(o=d.caseSensitive?""+t:(""+t).toLowerCase();m<p.length;m++){i=p[m]instanceof Object?p[m]:{value:p[m]};let t=!Object.keys(i).some((t=>u.includes(t)))?["value"]:u;if(d.fuzzySearch&&!e.exact?(a=t.reduce(((t,e)=>t+" "+(i[e]||"")),"").toLowerCase(),d.accentedSearch&&(a=h(a),o=h(o)),s=v(a,o)):s=t.some((t=>{var s=""+(i[t]||"");return d.accentedSearch&&(s=h(s),o=h(o)),d.caseSensitive||(s=s.toLowerCase()),e.exact?s==o:0==s.indexOf(o)})),n=!r.duplicates&&this.isTagDuplicate(l(i)?i.value:i),s&&!n&&c--&&g.push(i),0==c)break}return g},getMappedValue(t){var e=this.settings.dropdown.mapValueTo;return e?"function"==typeof e?e(t):t[e]||t.value:t.value},createListHTML(t){return d([],t).map(((t,e)=>{"string"!=typeof t&&"number"!=typeof t||(t={value:t});var i=this.dropdown.getMappedValue(t);t.value=i&&"string"==typeof i?r(i):i;var s=this.settings.templates.dropdownItem.apply(this,[t,this]);return s=s.replace(/\s*tagifySuggestionIdx=(["'])(.*?)\1/gim,"").replace(">",` tagifySuggestionIdx="${e}">`)})).join("")}},v={empty:"empty",exceed:"number of tags exceeded",pattern:"pattern mismatch",duplicate:"already exists",notAllowed:"not allowed"},f={wrapper:(t,e)=>`<tags class="${e.classNames.namespace} ${e.mode?`${e.classNames[e.mode+"Mode"]}`:""} ${t.className}"\n                    ${e.readonly?"readonly":""}\n                    ${e.disabled?"disabled":""}\n                    ${e.required?"required":""}\n                    tabIndex="-1">
60190\n            <span ${!e.readonly&&e.userInput?"contenteditable":""} tabIndex="0" data-placeholder="${e.placeholder||"&#8203;"}" aria-placeholder="${e.placeholder||""}"\n                class="${e.classNames.input}"\n                role="textbox"\n                aria-autocomplete="both"\n                aria-multiline="${"mix"==e.mode}"></span>\n        </tags>`,tag(t,e){var i=this.settings;return`<tag title="${t.title||t.value}"\n                    contenteditable='false'\n                    spellcheck='false'\n                    tabIndex="${i.a11y.focusableTags?0:-1}"\n                    class="${i.classNames.tag} ${t.class||""}"\n                    ${this.getAttributes(t)}>\n            <x title='' class="${i.classNames.tagX}" role='button' aria-label='remove tag'></x>\n            <div>\n                <span class="${i.classNames.tagText}">${t[i.tagTextProp]||t.value}</span>\n            </div>\n        </tag>`},dropdown(t){var e=t.dropdown,i="manual"==e.position,s=`${t.classNames.dropdown}`;return`<div class="${i?"":s} ${e.classname}" role="listbox" aria-labelledby="dropdown">\n                    <div class="${t.classNames.dropdownWrapper}"></div>\n                </div>`},dropdownItem(t,e){return`<div ${this.getAttributes(t)}\n                    class='${this.settings.classNames.dropdownItem} ${t.class?t.class:""}'\n                    tabindex="0"\n                    role="option">${t.value}</div>`},dropdownItemNoMatch:null};var T={customBinding(){this.customEventsList.forEach((t=>{this.on(t,this.settings.callbacks[t])}))},binding(t=!0){var e,i=this.events.callbacks,s=t?"addEventListener":"removeEventListener";if(!this.state.mainEvents||!t)for(var a in this.state.mainEvents=t,t&&!this.listeners.main&&(this.events.bindGlobal.call(this),this.settings.isJQueryPlugin&&jQuery(this.DOM.originalInput).on("tagify.removeAllTags",this.removeAllTags.bind(this))),e=this.listeners.main=this.listeners.main||{focus:["input",i.onFocusBlur.bind(this)],keydown:["input",i.onKeydown.bind(this)],click:["scope",i.onClickScope.bind(this)],dblclick:["scope",i.onDoubleClickScope.bind(this)],paste:["input",i.onPaste.bind(this)]})this.DOM[e[a][0]][s](a,e[a][1])},bindGlobal(t){var e,i=this.events.callbacks,s=t?"removeEventListener":"addEventListener";if(t||!this.listeners.global)for(e of(this.listeners.global=this.listeners&&this.listeners.global||[{type:this.isIE?"keydown":"input",target:this.DOM.input,cb:i[this.isIE?"onInputIE":"onInput"].bind(this)},{type:"keydown",target:window,cb:i.onWindowKeyDown.bind(this)},{type:"blur",target:this.DOM.input,cb:i.onFocusBlur.bind(this)}],this.listeners.global))e.target[s](e.type,e.cb)},unbindGlobal(){this.events.bindGlobal.call(this,!0)},callbacks:{onFocusBlur(t){var e=t.target?this.trim(t.target.textContent):"",i=this.settings,s=t.type,a=i.dropdown.enabled>=0,n={relatedTarget:t.relatedTarget},o=this.state.actions.selectOption&&(a||!i.dropdown.closeOnSelect),r=this.state.actions.addNew&&a,l=t.relatedTarget&&t.relatedTarget.classList.contains(i.classNames.tag)&&this.DOM.scope.contains(t.relatedTarget);if("blur"==s){if(t.relatedTarget===this.DOM.scope)return this.dropdown.hide(),void this.DOM.input.focus();this.postUpdate(),this.triggerChangeEvent()}if(!o&&!r)if(this.state.hasFocus="focus"==s&&+new Date,this.toggleFocusClass(this.state.hasFocus),"mix"!=i.mode){if("focus"==s)return this.trigger("focus",n),void(0!==i.dropdown.enabled&&i.userInput||this.dropdown.show());"blur"==s&&(this.trigger("blur",n),this.loading(!1),"select"==this.settings.mode&&l&&(e=""),("select"==this.settings.mode&&e?!this.value.length||this.value[0].value!=e:e&&!this.state.actions.selectOption&&i.addTagOnBlur)&&this.addTags(e,!0),"select"!=this.settings.mode||e||this.removeTags()),this.DOM.input.removeAttribute("style"),this.dropdown.hide()}else"focus"==s?this.trigger("focus",n):"blur"==t.type&&(this.trigger("blur",n),this.loading(!1),this.dropdown.hide(),this.state.dropdown.visible=void 0,this.setStateSelection())},onWindowKeyDown(t){var e,i=document.activeElement;if(i.classList.contains(this.settings.classNames.tag)&&this.DOM.scope.contains(document.activeElement))switch(e=i.nextElementSibling,t.key){case"Backspace":this.removeTags(i),(e||this.DOM.input).focus();break;case"Enter":setTimeout(this.editTag.bind(this),0,i)}},onKeydown(t){"select"==this.settings.mode&&this.settings.enforceWhitelist&&this.value.length&&t.preventDefault();var e=this.trim(t.target.textContent);if(this.trigger("keydown",{originalEvent:this.cloneEvent(t)}),"mix"==this.settings.mode){switch(t.key){case"Left":case"ArrowLeft":this.state.actions.ArrowLeft=!0;break;case"Delete":case"Backspace":if(this.state.editing)return;var i,s,a,r=document.getSelection(),l="Delete"==t.key&&r.anchorOffset==(r.anchorNode.length||0),d=1==r.anchorNode.nodeType||!r.anchorOffset&&r.anchorNode.previousElementSibling,h=n(this.DOM.input.innerHTML),p=this.getTagElms();if("edit"==this.settings.backspace&&d)return i=1==r.anchorNode.nodeType?null:r.anchorNode.previousElementSibling,setTimeout(this.editTag.bind(this),0,i),void t.preventDefault();if(g()&&d)return a=o(d),d.hasAttribute("readonly")||d.remove(),this.DOM.input.focus(),void setTimeout((()=>{this.placeCaretAfterNode(a),this.DOM.input.click()}));if("BR"==r.anchorNode.nodeName)return;if((l||d)&&1==r.anchorNode.nodeType?s=0==r.anchorOffset?l?p[0]:null:p[r.anchorOffset-1]:l?s=r.anchorNode.nextElementSibling:d&&(s=d),3==r.anchorNode.nodeType&&!r.anchorNode.nodeValue&&r.anchorNode.previousElementSibling&&t.preventDefault(),(d||l)&&!this.settings.backspace)return void t.preventDefault();if("Range"!=r.type&&!r.anchorOffset&&r.anchorNode==this.DOM.input&&"Delete"!=t.key)return void t.preventDefault();if("Range"!=r.type&&s&&s.hasAttribute("readonly"))return void this.placeCaretAfterNode(o(s));clearTimeout(u),u=setTimeout((()=>{var t=document.getSelection(),e=n(this.DOM.input.innerHTML),i=!l&&t.anchorNode.previousElementSibling;if(!g()&&e.length>=h.length&&i&&!i.hasAttribute("readonly")&&(this.removeTags(i),this.fixFirefoxLastTagNoCaret(),2==this.DOM.input.children.length&&"BR"==this.DOM.input.children[1].tagName))return this.DOM.input.innerHTML="",this.value.length=0,!0;this.value=[].map.call(p,((t,e)=>{var i=this.tagData(t);
60190if(t.parentNode||i.readonly)return i;this.trigger("remove",{tag:t,index:e,data:i})})).filter((t=>t))}),20)}return!0}switch(t.key){case"Backspace":"select"==this.settings.mode&&this.settings.enforceWhitelist?this.removeTags():this.state.dropdown.visible&&"manual"!=this.settings.dropdown.position||""!=e&&8203!=e.charCodeAt(0)||(!0===this.settings.backspace?this.removeTags():"edit"==this.settings.backspace&&setTimeout(this.editTag.bind(this),0));break;case"Esc":case"Escape":if(this.state.dropdown.visible)return;t.target.blur();break;case"Down":case"ArrowDown":this.state.dropdown.visible||this.dropdown.show();break;case"ArrowRight":{let t=this.state.inputSuggestion||this.state.ddItemData;if(t&&this.settings.autoComplete.rightKey)return void this.addTags([t],!0);break}case"Tab":{let i="select"==this.settings.mode;if(!e||i)return!0;t.preventDefault()}case"Enter":if(this.state.dropdown.visible||229==t.keyCode)return;t.preventDefault(),setTimeout((()=>{this.state.actions.selectOption||this.addTags(e,!0)}))}},onInput(t){if("mix"==this.settings.mode)return this.events.callbacks.onMixTagsInput.call(this,t);var e=this.input.normalize.call(this),i=e.length>=this.settings.dropdown.enabled,s={value:e,inputElm:this.DOM.input};s.isValid=this.validateTag({value:e}),this.state.inputText!=e&&(this.input.set.call(this,e,!1),-1!=e.search(this.settings.delimiters)?this.addTags(e)&&this.input.set.call(this):this.settings.dropdown.enabled>=0&&this.dropdown[i?"show":"hide"](e),this.trigger("input",s))},onMixTagsInput(t){var e,i,s,a,n,o,r,l,h=this.settings,p=this.value.length,c=this.getTagElms(),u=document.createDocumentFragment(),m=window.getSelection().getRangeAt(0),v=[].map.call(c,(t=>this.tagData(t).value));if("deleteContentBackward"==t.inputType&&g()&&this.events.callbacks.onKeydown.call(this,{target:t.target,key:"Backspace"}),this.value.slice().forEach((t=>{t.readonly&&!v.includes(t.value)&&u.appendChild(this.createTagElem(t))})),u.childNodes.length&&(m.insertNode(u),this.setRangeAtStartEnd(!1,u.lastChild)),c.length!=p)return this.value=[].map.call(this.getTagElms(),(t=>this.tagData(t))),void this.update({withoutChangeEvent:!0});if(this.hasMaxTags())return!0;if(window.getSelection&&(o=window.getSelection()).rangeCount>0&&3==o.anchorNode.nodeType){if((m=o.getRangeAt(0).cloneRange()).collapse(!0),m.setStart(o.focusNode,0),s=(e=m.toString().slice(0,m.endOffset)).split(h.pattern).length-1,(i=e.match(h.pattern))&&(a=e.slice(e.lastIndexOf(i[i.length-1]))),a){if(this.state.actions.ArrowLeft=!1,this.state.tag={prefix:a.match(h.pattern)[0],value:a.replace(h.pattern,"")},this.state.tag.baseOffset=o.baseOffset-this.state.tag.value.length,l=this.state.tag.value.match(h.delimiters))return this.state.tag.value=this.state.tag.value.replace(h.delimiters,""),this.state.tag.delimiters=l[0],this.addTags(this.state.tag.value,h.dropdown.clearOnSelect),void this.dropdown.hide();n=this.state.tag.value.length>=h.dropdown.enabled;try{r=(r=this.state.flaggedTags[this.state.tag.baseOffset]).prefix==this.state.tag.prefix&&r.value[0]==this.state.tag.value[0],this.state.flaggedTags[this.state.tag.baseOffset]&&!this.state.tag.value&&delete this.state.flaggedTags[this.state.tag.baseOffset]}catch(t){}(r||s<this.state.mixMode.matchedPatternCount)&&(n=!1)}else this.state.flaggedTags={};this.state.mixMode.matchedPatternCount=s}setTimeout((()=>{this.update({withoutChangeEvent:!0}),this.trigger("input",d({},this.state.tag,{textContent:this.DOM.input.textContent})),this.state.tag&&this.dropdown[n?"show":"hide"](this.state.tag.value)}),10)},onInputIE(t){var e=this;setTimeout((function(){e.events.callbacks.onInput.call(e,t)}))},onClickScope(t){var e=this.settings,i=t.target.closest("."+e.classNames.tag),s=+new Date-this.state.hasFocus;if(t.target!=this.DOM.scope){if(!t.target.classList.contains(e.classNames.tagX))return i?(this.trigger("click",{tag:i,index:this.getNodeIndex(i),data:this.tagData(i),originalEvent:this.cloneEvent(t)}),void(1!==e.editTags&&1!==e.editTags.clicks||this.events.callbacks.onDoubleClickScope.call(this,t))):void(t.target==this.DOM.input&&("mix"==e.mode&&this.fixFirefoxLastTagNoCaret(),s>500)?this.state.dropdown.visible?this.dropdown.hide():0===e.dropdown.enabled&&"mix"!=e.mode&&this.dropdown.show():"select"==e.mode&&!this.state.dropdown.visible&&this.dropdown.show());this.removeTags(t.target.parentNode)}else this.state.hasFocus||this.DOM.input.focus()},onPaste(t){t.preventDefault();var e,i,s=this.settings;if("select"==s.mode&&s.enforceWhitelist||!s.userInput)return!1;
60190s.readonly||(e=t.clipboardData||window.clipboardData,i=e.getData("Text"),s.hooks.beforePaste(t,{tagify:this,pastedText:i,clipboardData:e}).then((e=>{void 0===e&&(e=i),e&&(this.injectAtCaret(e,window.getSelection().getRangeAt(0)),"mix"==this.settings.mode?this.events.callbacks.onMixTagsInput.call(this,t):this.settings.pasteAsTags?this.addTags(e,!0):this.state.inputText=e)})).catch((t=>t)))},onEditTagInput(t,e){var i=t.closest("."+this.settings.classNames.tag),s=this.getNodeIndex(i),a=this.tagData(i),n=this.input.normalize.call(this,t),o=i.innerHTML!=i.__tagifyTagData.__originalHTML,r=this.validateTag({[this.settings.tagTextProp]:n});o||!0!==t.originalIsValid||(r=!0),i.classList.toggle(this.settings.classNames.tagInvalid,!0!==r),a.__isValid=r,i.title=!0===r?a.title||a.value:r,n.length>=this.settings.dropdown.enabled&&(this.state.editing&&(this.state.editing.value=n),this.dropdown.show(n)),this.trigger("edit:input",{tag:i,index:s,data:d({},this.value[s],{newValue:n}),originalEvent:this.cloneEvent(e)})},onEditTagFocus(t){this.state.editing={scope:t,input:t.querySelector("[contenteditable]")}},onEditTagBlur(t){if(this.state.hasFocus||this.toggleFocusClass(),this.DOM.scope.contains(t)){var e,i,s=this.settings,a=t.closest("."+s.classNames.tag),n=this.input.normalize.call(this,t),o=this.tagData(a).__originalData,r=a.innerHTML!=a.__tagifyTagData.__originalHTML,l=this.validateTag({[s.tagTextProp]:n});if(n)if(r){if(e=this.hasMaxTags(),i=this.getWhitelistItem(n)||d({},o,{[s.tagTextProp]:n,value:n,__isValid:l}),s.transformTag.call(this,i,o),!0!==(l=!e&&this.validateTag({[s.tagTextProp]:i[s.tagTextProp]}))){if(this.trigger("invalid",{data:i,tag:a,message:l}),s.editTags.keepInvalid)return;s.keepInvalidTags?i.__isValid=l:i=o}else s.keepInvalidTags&&(delete i.title,delete i["aria-invalid"],delete i.class);this.onEditTagDone(a,i)}else this.onEditTagDone(a,o);else this.onEditTagDone(a)}},onEditTagkeydown(t,e){switch(this.trigger("edit:keydown",{originalEvent:this.cloneEvent(t)}),t.key){case"Esc":case"Escape":e.innerHTML=e.__tagifyTagData.__originalHTML;case"Enter":case"Tab":t.preventDefault(),t.target.blur()}},onDoubleClickScope(t){var e,i,s=t.target.closest("."+this.settings.classNames.tag),a=this.settings;s&&a.userInput&&(e=s.classList.contains(this.settings.classNames.tagEditing),i=s.hasAttribute("readonly"),"select"==a.mode||a.readonly||e||i||!this.settings.editTags||this.editTag(s),this.toggleFocusClass(!0),this.trigger("dblclick",{tag:s,index:this.getNodeIndex(s),data:this.tagData(s)}))}}};function w(t,e){return t?t.previousElementSibling&&t.previousElementSibling.classList.contains("tagify")?(console.warn("Tagify: ","input element is already Tagified",t),this):(d(this,function(t){var e=document.createTextNode("");function i(t,i,s){s&&i.split(/\s+/g).forEach((i=>e[t+"EventListener"].call(e,i,s)))}return{off(t,e){return i("remove",t,e),this},on(t,e){return e&&"function"==typeof e&&i("add",t,e),this},trigger(i,s,a){var n;if(a=a||{cloneData:!0},i)if(t.settings.isJQueryPlugin)"remove"==i&&(i="removeTag"),jQuery(t.DOM.originalInput).triggerHandler(i,[s]);else{try{var o="object"==typeof s?s:{value:s};if((o=a.cloneData?d({},o):o).tagify=this,s instanceof Object)for(var r in s)s[r]instanceof HTMLElement&&(o[r]=s[r]);n=new CustomEvent(i,{detail:o})}catch(t){console.warn(t)}e.dispatchEvent(n)}}}}(this)),this.isFirefox="undefined"!=typeof InstallTrigger,this.isIE=window.document.documentMode,this.applySettings(t,e||{}),this.state={inputText:"",editing:!1,actions:{},mixMode:{},dropdown:{},flaggedTags:{}},this.value=[],this.listeners={},this.DOM={},this.build(t),c.call(this),this.getCSSVars(),this.loadOriginalValues(),this.events.customBinding.call(this),this.events.binding.call(this),void(t.autofocus&&this.DOM.input.focus())):(console.warn("Tagify: ","input element not found",t),this)}return w.prototype={_dropdown:m,customEventsList:["change","add","remove","invalid","input","click","keydown","focus","blur","edit:input","edit:beforeUpdate","edit:updated","edit:start","edit:keydown","dropdown:show","dropdown:hide","dropdown:select","dropdown:updated","dropdown:no
60190Match","dropdown:scroll"],dataProps:["__isValid","__removed","__originalData","__originalHTML","__tagId"],trim(t){return this.settings.trim&&t&&"string"==typeof t?t.trim():t},parseHTML:function(t){return(new DOMParser).parseFromString(t.trim(),"text/html").body.firstElementChild},templates:f,parseTemplate(t,e){return t=this.settings.templates[t]||t,this.parseHTML(t.apply(this,e))},set whitelist(t){this.settings.whitelist=t&&Array.isArray(t)?t:[]},get whitelist(){return this.settings.whitelist},applySettings(t,e){p.templates=this.templates;var s=this.settings=d({},p,e);s.disabled=t.hasAttribute("disabled"),s.readonly=t.hasAttribute("readonly"),s.placeholder=t.getAttribute("placeholder")||s.placeholder||"",s.required=t.hasAttribute("required");for(let t in s.classNames)Object.defineProperty(s.classNames,t+"Selector",{get(){return"."+this[t].split(" ")[0]}});if(this.isIE&&(s.autoComplete=!1),["whitelist","blacklist"].forEach((e=>{var i=t.getAttribute("data-"+e);i&&(i=i.split(s.delimiters))instanceof Array&&(s[e]=i)})),"autoComplete"in e&&!l(e.autoComplete)&&(s.autoComplete=p.autoComplete,s.autoComplete.enabled=e.autoComplete),"mix"==s.mode&&(s.autoComplete.rightKey=!0,s.delimiters=e.delimiters||null,s.tagTextProp&&!s.dropdown.searchKeys.includes(s.tagTextProp)&&s.dropdown.searchKeys.push(s.tagTextProp)),t.pattern)try{s.pattern=new RegExp(t.pattern)}catch(t){}if(this.settings.delimiters)try{s.delimiters=new RegExp(this.settings.delimiters,"g")}catch(t){}this.TEXTS=i(i({},v),s.texts||{}),"select"!=s.mode&&s.userInput||(s.dropdown.enabled=0),s.dropdown.appendTarget=e.dropdown&&e.dropdown.appendTarget?e.dropdown.appendTarget:document.body},getAttributes(t){var e,i=this.getCustomAttributes(t),s="";for(e in i)s+=" "+e+(void 0!==t[e]?`="${i[e]}"`:"");return s},getCustomAttributes(t){if(!l(t))return"";var e,i={};for(e in t)"__"!=e.slice(0,2)&&"class"!=e&&t.hasOwnProperty(e)&&void 0!==t[e]&&(i[e]=r(t[e]));return i},setStateSelection(){var t=window.getSelection(),e={anchorOffset:t.anchorOffset,anchorNode:t.anchorNode,range:t.getRangeAt&&t.rangeCount&&t.getRangeAt(0)};return this.state.selection=e,e},getCaretGlobalPosition(){const t=document.getSelection();if(t.rangeCount){const e=t.getRangeAt(0),i=e.startContainer,s=e.startOffset;let a,n;if(s>0)return n=document.createRange(),n.setStart(i,s-1),n.setEnd(i,s),a=n.getBoundingClientRect(),{left:a.right,top:a.top,bottom:a.bottom};if(i.getBoundingClientRect)return i.getBoundingClientRect()}return{left:-9999,top:-9999}},getCSSVars(){var t=getComputedStyle(this.DOM.scope,null);var e;this.CSSVars={tagHideTransition:(({value:t,unit:e})=>"s"==e?1e3*t:t)(function(t){if(!t)return{};var e=(t=t.trim().split(" ")[0]).split(/\d+/g).filter((t=>t)).pop().trim();return{value:+t.split(e).filter((t=>t))[0].trim(),unit:e}}((e="tag-hide-transition",t.getPropertyValue("--"+e))))}},build(t){var e=this.DOM;this.settings.mixMode.integrated?(e.originalInput=null,e.scope=t,e.input=t):(e.originalInput=t,e.scope=this.parseTemplate("wrapper",[t,this.settings]),e.input=e.scope.querySelector(this.settings.classNames.inputSelector),t.parentNode.insertBefore(e.scope,t))},destroy(){this.events.unbindGlobal.call(this),this.DOM.scope.parentNode.removeChild(this.DOM.scope),this.dropdown.hide(!0),clearTimeout(this.dropdownHide__bindEventsTimeout)},loadOriginalValues(t){var e,i=this.settings;if(void 0===t&&(t=i.mixMode.integrated?this.DOM.input.textContent:this.DOM.originalInput.value),this.removeAllTags({withoutChangeEvent:!0}),t)if("mix"==i.mode)this.parseMixTags(t.trim()),(e=this.DOM.input.lastChild)&&"BR"==e.tagName||this.DOM.input.insertAdjacentHTML("beforeend","<br>");else{try{JSON.parse(t)instanceof Array&&(t=JSON.parse(t))}catch(t){}this.addTags(t).forEach((t=>t&&t.classList.add(i.classNames.tagNoAnimation)))}else this.postUpdate();this.state.lastOriginalValueReported=i.mixMode.integrated?"":this.DOM.originalInput.value,this.state.loadedOriginalValues=!0},cloneEvent(t){var e={};for(var i in t)e[i]=t[i];return e},loading(t){return this.state.isLoading=t,this.DOM.scope.classList[t?"add":"remove"](this.settings.classNames.scopeLoading),this},tagLoading(t,e){return t&&t.classList[e?"add":"remove"](this.settings.classNames.tagLoading),this},toggleClass(t,e){"string"==typeof t&&this.DOM.scope.classList.toggle(t,e)},toggleFocusClass(t){this.toggleClass(this.settings.classNames.focus,!!t)},triggerChangeEvent:function(){if(!this.settings.mixMode.integrated){var t=this.DOM.originalInput,e=this.state.lastOriginalValueReported!==t.value,i=new CustomEvent("change",{bubbles:!0});e&&(this.state.lastOriginalValueReported=t.value,i.simulated=!0,t._valueTracker&&t._valueTracker.setValue(Math.random()),t.dis
60190patchEvent(i),this.trigger("change",this.state.lastOriginalValueReported),t.value=this.state.lastOriginalValueReported)}},events:T,fixFirefoxLastTagNoCaret(){},placeCaretAfterNode(t){if(t&&t.parentNode){var e=t.nextSibling,i=window.getSelection(),s=i.getRangeAt(0);i.rangeCount&&(s.setStartBefore(e||t),s.setEndBefore(e||t),i.removeAllRanges(),i.addRange(s))}},insertAfterTag(t,e){if(e=e||this.settings.mixMode.insertAfterTag,t&&t.parentNode&&e)return e="string"==typeof e?document.createTextNode(e):e,t.parentNode.insertBefore(e,t.nextSibling),e},editTag(t,e){t=t||this.getLastTag(),e=e||{},this.dropdown.hide();var i=this.settings;function s(){return t.querySelector(i.classNames.tagTextSelector)}var a=s(),n=this.getNodeIndex(t),o=this.tagData(t),r=this.events.callbacks,l=this,h=!0;if(a){if(!(o instanceof Object&&"editable"in o)||o.editable)return a.setAttribute("contenteditable",!0),t.classList.add(i.classNames.tagEditing),this.tagData(t,{__originalData:d({},o),__originalHTML:t.innerHTML}),a.addEventListener("focus",r.onEditTagFocus.bind(this,t)),a.addEventListener("blur",(function(){setTimeout((()=>r.onEditTagBlur.call(l,s())))})),a.addEventListener("input",r.onEditTagInput.bind(this,a)),a.addEventListener("keydown",(e=>r.onEditTagkeydown.call(this,e,t))),a.focus(),this.setRangeAtStartEnd(!1,a),e.skipValidation||(h=this.editTagToggleValidity(t)),a.originalIsValid=h,this.trigger("edit:start",{tag:t,index:n,data:o,isValid:h}),this}else console.warn("Cannot find element in Tag template: .",i.classNames.tagTextSelector)},editTagToggleValidity(t,e){var i;if(e=e||this.tagData(t))return(i=!("__isValid"in e)||!0===e.__isValid)||this.removeTagsFromValue(t),this.update(),t.classList.toggle(this.settings.classNames.tagNotAllowed,!i),e.__isValid;console.warn("tag has no data: ",t,e)},onEditTagDone(t,e){e=e||{};var i={tag:t=t||this.state.editing.scope,index:this.getNodeIndex(t),previousData:this.tagData(t),data:e};this.trigger("edit:beforeUpdate",i,{cloneData:!1}),this.state.editing=!1,delete e.__originalData,delete e.__originalHTML,t&&e[this.settings.tagTextProp]?(t=this.replaceTag(t,e),this.editTagToggleValidity(t,e),this.settings.a11y.focusableTags&&t.focus()):t&&this.removeTags(t),this.trigger("edit:updated",i),this.dropdown.hide(),this.settings.keepInvalidTags&&this.reCheckInvalidTags()},replaceTag(t,e){e&&e.value||(e=t.__tagifyTagData),e.__isValid&&1!=e.__isValid&&d(e,this.getInvalidTagAttrs(e,e.__isValid));var i=this.createTagElem(e);return t.parentNode.replaceChild(i,t),this.updateValueByDOMTags(),i},updateValueByDOMTags(){this.value.length=0,[].forEach.call(this.getTagElms(),(t=>{t.classList.contains(this.settings.classNames.tagNotAllowed.split(" ")[0])||this.value.push(this.tagData(t))})),this.update()},setRangeAtStartEnd(t,e){t="number"==typeof t?t:!!t,e=(e=e||this.DOM.input).lastChild||e;var i=document.getSelection();try{i.rangeCount>=1&&["Start","End"].forEach((s=>i.getRangeAt(0)["set"+s](e,t||e.length)))}catch(t){console.warn("Tagify: ",t)}},injectAtCaret(t,e){if(e=e||this.state.selection.range)return"string"==typeof t&&(t=document.createTextNode(t)),e.deleteContents(),e.insertNode(t),this.setRangeAtStartEnd(!1,t),this.updateValueByDOMTags(),this.update(),this},input:{set(t="",e=!0){var i=this.settings.dropdown.closeOnSelect;this.state.inputText=t,e&&(this.DOM.input.innerHTML=r(""+t)),!t&&i&&this.dropdown.hide.bind(this),this.input.autocomplete.suggest.call(this),this.input.validate.call(this)},validate(){var t=!this.state.inputText||!0===this.validateTag({value:this.state.inputText});return this.DOM.input.classList.toggle(this.settings.classNames.inputInvalid,!t),t},normalize(t){var e=t||this.DOM.input,i=[];e.childNodes.forEach((t=>3==t.nodeType&&i.push(t.nodeValue))),i=i.join("\n");try{i=i.replace(/(?:\r\n|\r|\n)/g,this.settings.delimiters.source.charAt(0))}catch(t){}return i=i.replace(/\s/g," "),this.settings.trim&&(i=i.replace(/^\s+/,"")),i},autocomplete:{suggest(t){if(this.settings.autoComplete.enabled){"string"==typeof(t=t||{})&&(t={value:t});var e=t.value?""+t.value:"",i=e.substr(0,this.state.inputText.length).toLowerCase(),s=e.substring(this.state.inputText.length);e&&this.state.inputText&&i==this.state.inputText.toLowerCase()?(this.DOM.input.setAttribute("data-suggest",s),this.state.inputSuggestion=t):(this.DOM.input.removeAttribute("data-suggest"),delete this.state.inputSuggestion)}},set(t){var e=this.DOM.input.getAttribute("data-suggest"),i=t||(e?this.state.inputText+e:null);return!!i&&("mix"==this.settings.mode?this.replaceTextWithNode(document.createTextNode(this.state.tag.prefix+i)):(this.input.set.call(this,i),this.setRangeAtStartEnd()),this.input.autocomplete.suggest.call(this),this.dropdown.hide(),!0)}}},getTagIdx(t){return this.value.findIndex((e=>e.__tagId==(t||{}).__tagId))},getNodeIndex(t){var e=0;if(t)for(;t=t.previousElementSibling;)e++;return e},getTagElms(...t){var e="."+[...this.settings.classNames.tag.split(" "),...t].join(".");return[].slice.call(this.DOM.scope.querySelectorAll(e))}
60190,getLastTag(){var t=this.DOM.scope.querySelectorAll(`${this.settings.classNames.tagSelector}:not(.${this.settings.classNames.tagHide}):not([readonly])`);return t[t.length-1]},tagData:(t,e,i)=>t?(e&&(t.__tagifyTagData=i?e:d({},t.__tagifyTagData||{},e)),t.__tagifyTagData):(console.warn("tag elment doesn't exist",t,e),e),isTagDuplicate(t,e){var i=this.settings;return"select"!=i.mode&&this.value.reduce(((a,n)=>s(this.trim(""+t),n.value,e||i.dropdown.caseSensitive)?a+1:a),0)},getTagIndexByValue(t){var e=[];return this.getTagElms().forEach(((i,a)=>{s(this.trim(i.textContent),t,this.settings.dropdown.caseSensitive)&&e.push(a)})),e},getTagElmByValue(t){var e=this.getTagIndexByValue(t)[0];return this.getTagElms()[e]},flashTag(t){t&&(t.classList.add(this.settings.classNames.tagFlash),setTimeout((()=>{t.classList.remove(this.settings.classNames.tagFlash)}),100))},isTagBlacklisted(t){return t=this.trim(t.toLowerCase()),this.settings.blacklist.filter((e=>(""+e).toLowerCase()==t)).length},isTagWhitelisted(t){return!!this.getWhitelistItem(t)},getWhitelistItem(t,e,i){e=e||"value";var a,n=this.settings;return(i=i||n.whitelist).some((i=>{var o="string"==typeof i?i:i[e]||i.value;if(s(o,t,n.dropdown.caseSensitive,n.trim))return a="string"==typeof i?{value:i}:i,!0})),a||"value"!=e||"value"==n.tagTextProp||(a=this.getWhitelistItem(t,n.tagTextProp,i)),a},validateTag(t){var e=this.settings,i="value"in t?"value":e.tagTextProp,s=this.trim(t[i]+"");return(t[i]+"").trim()?e.pattern&&e.pattern instanceof RegExp&&!e.pattern.test(s)?this.TEXTS.pattern:!e.duplicates&&this.isTagDuplicate(s,this.state.editing)?this.TEXTS.duplicate:this.isTagBlacklisted(s)||e.enforceWhitelist&&!this.isTagWhitelisted(s)?this.TEXTS.notAllowed:!e.validate||e.validate(t):this.TEXTS.empty},getInvalidTagAttrs(t,e){return{"aria-invalid":!0,class:`${t.class||""} ${this.settings.classNames.tagNotAllowed}`.trim(),title:e}},hasMaxTags(){return this.value.length>=this.settings.maxTags&&this.TEXTS.exceed},setReadonly(t,e){var i=this.settings;document.activeElement.blur(),i[e||"readonly"]=t,this.DOM.scope[(t?"set":"remove")+"Attribute"](e||"readonly",!0),"mix"==i.mode&&(this.DOM.input.contentEditable=!t)},setDisabled(t){this.setReadonly(t,"disabled")},normalizeTags(t){var e=this.settings,i=e.whitelist,s=e.delimiters,a=e.mode,n=e.tagTextProp;e.enforceWhitelist;var o=[],r=!!i&&i[0]instanceof Object,l=t instanceof Array,d=t=>(t+"").split(s).filter((t=>t)).map((t=>({[n]:this.trim(t),value:this.trim(t)})));if("number"==typeof t&&(t=t.toString()),"string"==typeof t){if(!t.trim())return[];t=d(t)}else l&&(t=[].concat(...t.map((t=>t.value?t:d(t)))));return r&&(t.forEach((t=>{var e=o.map((t=>t.value)),i=this.dropdown.filterListItems.call(this,t[n],{exact:!0});this.settings.duplicates||(i=i.filter((t=>!e.includes(t.value))));var s=i.length>1?this.getWhitelistItem(t[n],n,i):i[0];s&&s instanceof Object?o.push(s):"mix"!=a&&(null==t.value&&(t.value=t[n]),o.push(t))})),t=o),t},parseMixTags(t){var e=this.settings,i=e.mixTagsInterpolator,s=e.duplicates,a=e.transformTag,n=e.enforceWhitelist,o=e.maxTags,r=e.tagTextProp,l=[];return t=t.split(i[0]).map(((t,e)=>{var d,h,g,p=t.split(i[1]),c=p[0],u=l.length==o;try{if(c==+c)throw Error;h=JSON.parse(c)}catch(t){h=this.normalizeTags(c)[0]||{value:c}}if(u||!(p.length>1)||n&&!this.isTagWhitelisted(h.value)||!s&&this.isTagDuplicate(h.value)){if(t)return e?i[0]+t:t}else a.call(this,h),h[d=h[r]?r:"value"]=this.trim(h[d]),g=this.createTagElem(h),l.push(h),g.classList.add(this.settings.classNames.tagNoAnimation),p[0]=g.outerHTML,this.value.push(h);return p.join("")})).join(""),this.DOM.input.innerHTML=t,this.DOM.input.appendChild(document.createTextNode("")),this.DOM.input.normalize(),this.getTagElms().forEach(((t,e)=>this.tagData(t,l[e]))),this.update({withoutChangeEvent:!0}),t},replaceTextWithNode(t,e){if(this.state.tag||e){e=e||this.state.tag.prefix+this.state.tag.value;var i,s,a=window.getSelection(),n=a.anchorNode,o=this.state.tag.delimiters?this.state.tag.delimiters.length:0;return n.splitText(a.anchorOffset-o),i=n.nodeValue.lastIndexOf(e),s=n.splitText(i),t&&n.parentNode.replaceChild(t,s),!0}},selectTag(t,e){var i=this.settings;if(!i.enforceWhitelist||this.isTagWhitelisted(e.value)){this.input.set.call(this,e[i.tagTextProp||"value"],!0),this.state.actions.selectOption&&setTimeout(this.setRangeAtStartEnd.bind(this));
60190var s=this.getLastTag();return s?this.replaceTag(s,e):this.appendTag(t),i.enforceWhitelist&&this.DOM.input.removeAttribute("contenteditable"),this.value[0]=e,this.trigger("add",{tag:t,data:e}),this.update(),[t]}},addEmptyTag(t){var e=d({value:""},t||{}),i=this.createTagElem(e);this.tagData(i,e),this.appendTag(i),this.editTag(i,{skipValidation:!0})},addTags(t,e,i=this.settings.skipInvalid){var s=[],a=this.settings,n=document.createDocumentFragment();return t&&0!=t.length?(t=this.normalizeTags(t),"mix"==a.mode?this.addMixTags(t):("select"==a.mode&&(e=!1),this.DOM.input.removeAttribute("style"),t.forEach((t=>{var e,o={},r=Object.assign({},t,{value:t.value+""});if((t=Object.assign({},r)).__isValid=this.hasMaxTags()||this.validateTag(t),a.transformTag.call(this,t),!0!==t.__isValid){if(i)return;d(o,this.getInvalidTagAttrs(t,t.__isValid),{__preInvalidData:r}),t.__isValid==this.TEXTS.duplicate&&this.flashTag(this.getTagElmByValue(t.value))}if(t.readonly&&(o["aria-readonly"]=!0),e=this.createTagElem(t,o),s.push(e),"select"==a.mode)return this.selectTag(e,t);n.appendChild(e),t.__isValid&&!0===t.__isValid?(this.value.push(t),this.trigger("add",{tag:e,index:this.value.length-1,data:t})):(this.trigger("invalid",{data:t,index:this.value.length,tag:e,message:t.__isValid}),a.keepInvalidTags||setTimeout((()=>this.removeTags(e,!0)),1e3)),this.dropdown.position()})),this.appendTag(n),this.update(),t.length&&e&&this.input.set.call(this),this.dropdown.refilter(),s)):("select"==a.mode&&this.removeAllTags(),s)},addMixTags(t){if((t=this.normalizeTags(t))[0].prefix||this.state.tag)return this.prefixedTextToTag(t[0]);"string"==typeof t&&(t=[{value:t}]);var e=!!this.state.selection,i=document.createDocumentFragment();return t.forEach((t=>{var e=this.createTagElem(t);i.appendChild(e),this.insertAfterTag(e)})),e?this.injectAtCaret(i):(this.DOM.input.focus(),(e=this.setStateSelection()).range.setStart(this.DOM.input,e.range.endOffset),e.range.setEnd(this.DOM.input,e.range.endOffset),this.DOM.input.appendChild(i),this.updateValueByDOMTags(),this.update()),i},prefixedTextToTag(t){var e,i=this.settings,s=this.state.tag.delimiters;if(i.transformTag.call(this,t),t.prefix=t.prefix||this.state.tag?this.state.tag.prefix:(i.pattern.source||i.pattern)[0],e=this.createTagElem(t),this.replaceTextWithNode(e)||this.DOM.input.appendChild(e),setTimeout((()=>e.classList.add(this.settings.classNames.tagNoAnimation)),300),this.value.push(t),this.update(),!s){var a=this.insertAfterTag(e)||e;this.placeCaretAfterNode(a)}return this.state.tag=null,this.trigger("add",d({},{tag:e},{data:t})),e},appendTag(t){var e=this.DOM,i=e.scope.lastElementChild;i===e.input?e.scope.insertBefore(t,i):e.scope.appendChild(t)},createTagElem(t,e){t.__tagId=([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)));var s,a=d({},t,i({value:r(t.value+"")},e));return function(t){for(var e,i=document.createNodeIterator(t,NodeFilter.SHOW_TEXT,null,!1);e=i.nextNode();)e.textContent.trim()||e.parentNode.removeChild(e)}(s=this.parseTemplate("tag",[a])),this.tagData(s,t),s},reCheckInvalidTags(){var t=this.settings;this.getTagElms(t.classNames.tagNotAllowed).forEach(((t,e)=>{var i=this.tagData(t),s=this.hasMaxTags(),a=this.validateTag(i);if(!0===a&&!s)return i=i.__preInvalidData?i.__preInvalidData:{value:i.value},this.replaceTag(t,i);t.title=s||a}))},removeTags(t,e,i){var s;t=t&&t instanceof HTMLElement?[t]:t instanceof Array?t:t?[t]:[this.getLastTag()],s=t.reduce(((t,e)=>(e&&"string"==typeof e&&(e=this.getTagElmByValue(e)),e&&this.tagData(e)&&t.push({node:e,idx:this.getTagIdx(this.tagData(e)),data:this.tagData(e,{__removed:!0})}),t)),[]),i="number"==typeof i?i:this.CSSVars.tagHideTransition,"select"==this.settings.mode&&(i=0,this.input.set.call(this)),1==s.length&&s[0].node.classList.contains(this.settings.classNames.tagNotAllowed)&&(e=!0),s.length&&this.settings.hooks.beforeRemoveTag(s,{tagify:this}).then((()=>{function t(t){t.node.parentNode&&(t.node.parentNode.removeChild(t.node),e?this.settings.keepInvalidTags&&this.trigger("remove",{tag:t.node,index:t.idx}):(this.trigger("remove",{tag:t.node,index:t.idx,data:t.data}),this.dropdown.refilter(),this.dropdown.position(),this.DOM.input.normalize(),this.settings.keepInvalidTags&&this.reCheckInvalidTags()))}i&&i>10&&1==s.length?function(e){e.node.style.width=parseFloat(window.getComputedStyle(e.node).width)+"px",document.body.clientTop,e.node.classList.add(this.settings.classNames.tagHide),setTimeout(t.bind(this),i,e)}
60190.call(this,s[0]):s.forEach(t.bind(this)),e||(this.removeTagsFromValue(s.map((t=>t.node))),this.update(),"select"==this.settings.mode&&this.DOM.input.setAttribute("contenteditable",!0))})).catch((t=>{}))},removeTagsFromDOM(){[].slice.call(this.getTagElms()).forEach((t=>t.parentNode.removeChild(t)))},removeTagsFromValue(t){(t=Array.isArray(t)?t:[t]).forEach((t=>{var e=this.tagData(t),i=this.getTagIdx(e);i>-1&&this.value.splice(i,1)}))},removeAllTags(t){t=t||{},this.value=[],"mix"==this.settings.mode?this.DOM.input.innerHTML="":this.removeTagsFromDOM(),this.dropdown.position(),"select"==this.settings.mode&&this.input.set.call(this),this.update(t)},postUpdate(){var t=this.settings.classNames,e="mix"==this.settings.mode?this.settings.mixMode.integrated?this.DOM.input.textContent:this.DOM.originalInput.value:this.value.length;this.toggleClass(t.hasMaxTags,this.value.length>=this.settings.maxTags),this.toggleClass(t.hasNoTags,!this.value.length),this.toggleClass(t.empty,!e)},update(t){var e=this.DOM.originalInput;this.settings.mixMode.integrated||(e.value=this.getInputValue()),this.postUpdate(),!(t||{}).withoutChangeEvent&&this.state.loadedOriginalValues&&this.triggerChangeEvent()},getInputValue(){var t=this.getCleanValue();return"mix"==this.settings.mode?this.getMixedTagsAsString(t):t.length?this.settings.originalInputValueFormat?this.settings.originalInputValueFormat(t):JSON.stringify(t):""},getCleanValue(t){return e=t||this.value,i=this.dataProps,e&&Array.isArray(e)&&e.map((t=>a(t,i)));var e,i},getMixedTagsAsString(){var t="",e=this,i=this.settings.mixTagsInterpolator;return this.DOM.input.childNodes.forEach((s=>{if(1==s.nodeType){const n=e.tagData(s);if(s.classList.contains(e.settings.classNames.tag)&&n){if(n.__removed)return;return void(t+=i[0]+JSON.stringify(a(n,e.dataProps))+i[1])}"BR"!=s.tagName||s.parentNode!=e.DOM.input&&1!=s.parentNode.childNodes.length?"DIV"!=s.tagName&&"P"!=s.tagName||(t+="\r\n",!s.children.length&&s.textContent&&(t+=s.textContent)):t+="\r\n"}else t+=s.textContent})),t}},w.prototype.removeTag=w.prototype.removeTags,w}));
60191
vendor: 17,728 bytes, lines 60192-60667
60192/*
60193 * Toastr
60194 * Copyright 2012-2015
60195 * Authors: John Papa, Hans Fjällemark, and Tim Ferrell.
60196 * All Rights Reserved.
60197 * Use, reproduction, distribution, and modification of this code is subject to the terms and
60198 * conditions of the MIT license, available at http://www.opensource.org/licenses/mit-license.php
60199 *
60200 * ARIA Support: Greta Krafsig
60201 *
60202 * Project: https://github.com/CodeSeven/toastr
60203 */
60204/* global define */
60205(function (define) {
60206    define(['jquery'], function ($) {
60207        return (function () {
60208            var $container;
60209            var listener;
60210            var toastId = 0;
60211            var toastType = {
60212                error: 'error',
60213                info: 'info',
60214                success: 'success',
60215                warning: 'warning'
60216            };
60217
60218            var toastr = {
60219                clear: clear,
60220                remove: remove,
60221                error: error,
60222                getContainer: getContainer,
60223                info: info,
60224                options: {},
60225                subscribe: subscribe,
60226                success: success,
60227                version: '2.1.4',
60228                warning: warning
60229            };
60230
60231            var previousToast;
60232
60233            return toastr;
60234
60235            ////////////////
60236
60237            function error(message, title, optionsOverride) {
60238                return notify({
60239                    type: toastType.error,
60240                    iconClass: getOptions().iconClasses.error,
60241                    message: message,
60242                    optionsOverride: optionsOverride,
60243                    title: title
60244                });
60245            }
60246
60247            function getContainer(options, create) {
60248                if (!options) { options = getOptions(); }
60249                $container = $('#' + options.containerId);
60250                if ($container.length) {
60251                    return $container;
60252                }
60253                if (create) {
60254                    $container = createContainer(options);
60255                }
60256                return $container;
60257            }
60258
60259            function info(message, title, optionsOverride) {
60260                return notify({
60261                    type: toastType.info,
60262                    iconClass: getOptions().iconClasses.info,
60263                    message: message,
60264                    optionsOverride: optionsOverride,
60265                    title: title
60266                });
60267            }
60268
60269            function subscribe(callback) {
60270                listener = callback;
60271            }
60272
60273            function success(message, title, optionsOverride) {
60274                return notify({
60275                    type: toastType.success,
60276                    iconClass: getOptions().iconClasses.success,
60277                    message: message,
60278                    optionsOverride: optionsOverride,
60279                    title: title
60280                });
60281            }
60282
60283            function warning(message, title, optionsOverride) {
60284                return notify({
60285                    type: toastType.warning,
60286                    iconClass: getOptions().iconClasses.warning,
60287                    message: message,
60288                    optionsOverride: optionsOverride,
60289                    title: title
60290                });
60291            }
60292
60293            function clear($toastElement, clearOptions) {
60294                var options = getOptions();
60295                if (!$container) { getContainer(options); }
60296                if (!clearToast($toastElement, options, clearOptions)) {
60297                    clearContainer(options);
60298                }
60299            }
60300
60301            function remove($toastElement) {
60302                var options = getOptions();
60303                if (!$container) { getContainer(options); }
60304                if ($toastElement && $(':focus', $toastElement).length === 0) {
60305                    removeToast($toastElement);
60306                    return;
60307                }
60308                if ($container.children().length) {
60309                    $container.remove();
60310                }
60311            }
60312
60313            // internal functions
60314
60315            function clearContainer (options) {
60316                var toastsToClear = $container.children();
60317                for (var i = toastsToClear.length - 1; i >= 0; i--) {
60318                    clearToast($(toastsToClear[i]), options);
60319                }
60320            }
60321
60322            function clearToast ($toastElement, options, clearOptions) {
60323                var force = clearOptions && clearOptions.force ? clearOptions.force : false;
60324                if ($toastElement && (force || $(':focus', $toastElement).length === 0)) {
60325                    $toastElement[options.hideMethod]({
60326                        duration: options.hideDuration,
60327                        easing: options.hideEasing,
60328                        complete: function () { removeToast($toastElement); }
60329                    });
60330                    return true;
60331                }
60332                return false;
60333            }
60334
60335            function createContainer(options) {
60336                $container = $('<div/>')
60337                    .attr('id', options.containerId)
60338                    .addClass(options.positionClass);
60339
60340                $container.appendTo($(options.target));
60341                return $container;
60342            }
60343
60344            function getDefaults() {
60345                return {
60346                    tapToDismiss: true,
60347                    toastClass: 'toast',
60348                    containerId: 'toast-container',
60349                    debug: false,
60350
60351                    showMethod: 'fadeIn', //fadeIn, slideDown, and show are built into jQuery
60352                    showDuration: 300,
60353                    showEasing: 'swing', //swing and linear are built into jQuery
60354                    onShown: undefined,
60355                    hideMethod: 'fadeOut',
60356                    hideDuration: 1000,
60357                    hideEasing: 'swing',
60358                    onHidden: undefined,
60359                    closeMethod: false,
60360                    closeDuration: false,
60361                    closeEasing: false,
60362                    closeOnHover: true,
60363
60364                    extendedTimeOut: 1000,
60365                    iconClasses: {
60366                        error: 'toast-error',
60367                        info: 'toast-info',
60368                        success: 'toast-success',
60369                        warning: 'toast-warning'
60370                    },
60371                    iconClass: 'toast-info',
60372                    positionClass: 'toast-top-right',
60373                    timeOut: 5000, // Set timeOut and extendedTimeOut to 0 to make it sticky
60374                    titleClass: 'toast-title',
60375                    messageClass: 'toast-message',
60376                    escapeHtml: false,
60377                    target: 'body',
60378                    closeHtml: '<button type="button">&times;</button>',
60379                    closeClass: 'toast-close-button',
60380                    newestOnTop: true,
60381                    preventDuplicates: false,
60382                    progressBar: false,
60383                    progressClass: 'toast-progress',
60384                    rtl: false
60385                };
60386            }
60387
60388            function publish(args) {
60389                if (!listener) { return; }
60390                listener(args);
60391            }
60392
60393            function notify(map) {
60394                var options = getOptions();
60395                var iconClass = map.iconClass || options.iconClass;
60396
60397                if (typeof (map.optionsOverride) !== 'undefined') {
60398                    options = $.extend(options, map.optionsOverride);
60399                    iconClass = map.optionsOverride.iconClass || iconClass;
60400                }
60401
60402                if (shouldExit(options, map)) { return; }
60403
60404                toastId++;
60405
60406                $container = getContainer(options, true);
60407
60408                var intervalId = null;
60409                var $toastElement = $('<div/>');
60410                var $titleElement = $('<div/>');
60411                var $messageElement = $('<div/>');
60412                var $progressElement = $('<div/>');
60413                var $closeElement = $(options.closeHtml);
60414                var progressBar = {
60415                    intervalId: null,
60416                    hideEta: null,
60417                    maxHideTime: null
60418                };
60419                var response = {
60420                    toastId: toastId,
60421                    state: 'visible',
60422                    startTime: new Date(),
60423                    options: options,
60424                    map: map
60425                };
60426
60427                personalizeToast();
60428
60429                displayToast();
60430
60431                handleEvents();
60432
60433                publish(response);
60434
60435                if (options.debug && console) {
60436                    console.log(response);
60437                }
60438
60439                return $toastElement;
60440
60441                function escapeHtml(source) {
60442                    if (source == null) {
60443                        source = '';
60444                    }
60445
60446                    return source
60447                        .replace(/&/g, '&amp;')
60448                        .replace(/"/g, '&quot;')
60449                        .replace(/'/g, '&#39;')
60450                        .replace(/</g, '&lt;')
60451                        .replace(/>/g, '&gt;');
60452                }
60453
60454                function personalizeToast() {
60455                    setIcon();
60456                    setTitle();
60457                    setMessage();
60458                    setCloseButton();
60459                    setProgressBar();
60460                    setRTL();
60461                    setSequence();
60462                    setAria();
60463                }
60464
60465                function setAria() {
60466                    var ariaValue = '';
60467                    switch (map.iconClass) {
60468                        case 'toast-success':
60469                        case 'toast-info':
60470                            ariaValue =  'polite';
60471                            break;
60472                        default:
60473                            ariaValue = 'assertive';
60474                    }
60475                    $toastElement.attr('aria-live', ariaValue);
60476                }
60477
60478                function handleEvents() {
60479                    if (options.closeOnHover) {
60480                        $toastElement.hover(stickAround, delayedHideToast);
60481                    }
60482
60483                    if (!options.onclick && options.tapToDismiss) {
60484                        $toastElement.click(hideToast);
60485                    }
60486
60487                    if (options.closeButton && $closeElement) {
60488                        $closeElement.click(function (event) {
60489                            if (event.stopPropagation) {
60490                                event.stopPropagation();
60491                            } else if (event.cancelBubble !== undefined && event.cancelBubble !== true) {
60492                                event.cancelBubble = true;
60493                            }
60494
60495                            if (options.onCloseClick) {
60496                                options.onCloseClick(event);
60497                            }
60498
60499                            hideToast(true);
60500                        });
60501                    }
60502
60503                    if (options.onclick) {
60504                        $toastElement.click(function (event) {
60505                            options.onclick(event);
60506                            hideToast();
60507                        });
60508                    }
60509                }
60510
60511                function displayToast() {
60512                    $toastElement.hide();
60513
60514                    $toastElement[options.showMethod](
60515                        {duration: options.showDuration, easing: options.showEasing, complete: options.onShown}
60516                    );
60517
60518                    if (options.timeOut > 0) {
60519                        intervalId = setTimeout(hideToast, options.timeOut);
60520                        progressBar.maxHideTime = parseFloat(options.timeOut);
60521                        progressBar.hideEta = new Date().getTime() + progressBar.maxHideTime;
60522                        if (options.progressBar) {
60523                            progressBar.intervalId = setInterval(updateProgress, 10);
60524                        }
60525                    }
60526                }
60527
60528                function setIcon() {
60529                    if (map.iconClass) {
60530                        $toastElement.addClass(options.toastClass).addClass(iconClass);
60531                    }
60532                }
60533
60534                function setSequence() {
60535                    if (options.newestOnTop) {
60536                        $container.prepend($toastElement);
60537                    } else {
60538                        $container.append($toastElement);
60539                    }
60540                }
60541
60542                function setTitle() {
60543                    if (map.title) {
60544                        var suffix = map.title;
60545                        if (options.escapeHtml) {
60546                            suffix = escapeHtml(map.title);
60547                        }
60548                        $titleElement.append(suffix).addClass(options.titleClass);
60549                        $toastElement.append($titleElement);
60550                    }
60551                }
60552
60553                function setMessage() {
60554                    if (map.message) {
60555                        var suffix = map.message;
60556                        if (options.escapeHtml) {
60557                            suffix = escapeHtml(map.message);
60558                        }
60559                        $messageElement.append(suffix).addClass(options.messageClass);
60560                        $toastElement.append($messageElement);
60561                    }
60562                }
60563
60564                function setCloseButton() {
60565                    if (options.closeButton) {
60566                        $closeElement.addClass(options.closeClass).attr('role', 'button');
60567                        $toastElement.prepend($closeElement);
60568                    }
60569                }
60570
60571                function setProgressBar() {
60572                    if (options.progressBar) {
60573                        $progressElement.addClass(options.progressClass);
60574                        $toastElement.prepend($progressElement);
60575                    }
60576                }
60577
60578                function setRTL() {
60579                    if (options.rtl) {
60580                        $toastElement.addClass('rtl');
60581                    }
60582                }
60583
60584                function shouldExit(options, map) {
60585                    if (options.preventDuplicates) {
60586                        if (map.message === previousToast) {
60587                            return true;
60588                        } else {
60589                            previousToast = map.message;
60590                        }
60591                    }
60592                    return false;
60593                }
60594
60595                function hideToast(override) {
60596                    var method = override && options.closeMethod !== false ? options.closeMethod : options.hideMethod;
60597                    var duration = override && options.closeDuration !== false ?
60598                        options.closeDuration : options.hideDuration;
60599                    var easing = override && options.closeEasing !== false ? options.closeEasing : options.hideEasing;
60600                    if ($(':focus', $toastElement).length && !override) {
60601                        return;
60602                    }
60603                    clearTimeout(progressBar.intervalId);
60604                    return $toastElement[method]({
60605                        duration: duration,
60606                        easing: easing,
60607                        complete: function () {
60608                            removeToast($toastElement);
60609                            clearTimeout(intervalId);
60610                            if (options.onHidden && response.state !== 'hidden') {
60611                                options.onHidden();
60612                            }
60613                            response.state = 'hidden';
60614                            response.endTime = new Date();
60615                            publish(response);
60616                        }
60617                    });
60618                }
60619
60620                function delayedHideToast() {
60621                    if (options.timeOut > 0 || options.extendedTimeOut > 0) {
60622                        intervalId = setTimeout(hideToast, options.extendedTimeOut);
60623                        progressBar.maxHideTime = parseFloat(options.extendedTimeOut);
60624                        progressBar.hideEta = new Date().getTime() + progressBar.maxHideTime;
60625                    }
60626                }
60627
60628                function stickAround() {
60629                    clearTimeout(intervalId);
60630                    progressBar.hideEta = 0;
60631                    $toastElement.stop(true, true)[options.showMethod](
60632                        {duration: options.showDuration, easing: options.showEasing}
60633                    );
60634                }
60635
60636                function updateProgress() {
60637                    var percentage = ((progressBar.hideEta - (new Date().getTime())) / progressBar.maxHideTime) * 100;
60638                    $progressElement.width(percentage + '%');
60639                }
60640            }
60641
60642            function getOptions() {
60643                return $.extend({}, getDefaults(), toastr.options);
60644            }
60645
60646            function removeToast($toastElement) {
60647                if (!$container) { $container = getContainer(); }
60648                if ($toastElement.is(':visible')) {
60649                    return;
60650                }
60651                $toastElement.remove();
60652                $toastElement = null;
60653                if ($container.children().length === 0) {
60654                    $container.remove();
60655                    previousToast = undefined;
60656                }
60657            }
60658
60659        })();
60660    });
60661}(typeof define === 'function' && define.amd ? define : function (deps, factory) {
60662    if (typeof module !== 'undefined' && module.exports) { //Node
60663        module.exports = factory(require('jquery'));
60664    } else {
60665        window.toastr = factory(window.jQuery);
60666    }
60667}));
60668
60669/*!
60670 * ApexCharts v3.28.3
60671 * (c) 2018-2021 ApexCharts
60672 * Released under the MIT License.
60673 */
60674!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).ApexCharts=e()}(this,(function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function a(t,e,a){return e&&i(t.prototype,e),a&&i(t,a),t}function s(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function r(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function o(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};
60674e%2?r(Object(i),!0).forEach((function(e){s(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function h(t,e){return(h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,a=l(t);if(e){var s=l(this).constructor;i=Reflect.construct(a,arguments,s)}else i=a.apply(this,arguments);return c(this,i)}}function g(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return u(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return u(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,a=new Array(e);i<e;i++)a[i]=t[i];return a}var p=function(){function i(){e(this,i)}return a(i,[{key:"shadeRGBColor",value:function(t,e){var i=e.split(","),a=t<0?0:255,s=t<0?-1*t:t,r=parseInt(i[0].slice(4),10),o=parseInt(i[1],10),n=parseInt(i[2],10);return"rgb("+(Math.round((a-r)*s)+r)+","+(Math.round((a-o)*s)+o)+","+(Math.round((a-n)*s)+n)+")"}},{key:"shadeHexColor",value:function(t,e){var i=parseInt(e.slice(1),16),a=t<0?0:255,s=t<0?-1*t:t,r=i>>16,o=i>>8&255,n=255&i;return"#"+(16777216+65536*(Math.round((a-r)*s)+r)+256*(Math.round((a-o)*s)+o)+(Math.round((a-n)*s)+n)).toString(16).slice(1)}},{key:"shadeColor",value:function(t,e){return i.isColorHex(e)?this.shadeHexColor(t,e):this.shadeRGBColor(t,e)}}],[{key:"bind",value:function(t,e){return function(){return t.apply(e,arguments)}}},{key:"isObject",value:function(e){return e&&"object"===t(e)&&!Array.isArray(e)&&null!=e}},{key:"listToArray",value:function(t){var e,i=[];for(e=0;e<t.length;e++)i[e]=t[e];return i}},{key:"extend",value:function(t,e){var i=this;"function"!=typeof Object.assign&&(Object.assign=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var a=arguments[i];if(null!=a)for(var s in a)a.hasOwnProperty(s)&&(e[s]=a[s])}return e});var a=Object.assign({},t);return this.isObject(t)&&this.isObject(e)&&Object.keys(e).forEach((function(r){i.isObject(e[r])&&r in t?a[r]=i.extend(t[r],e[r]):Object.assign(a,s({},r,e[r]))})),a}},{key:"extendArray",value:function(t,e){var a=[];return t.map((function(t){a.push(i.extend(e,t))})),t=a}},{key:"monthMod",value:function(t){return t%12}},{key:"clone",value:function(e){if("[object Array]"===Object.prototype.toString.call(e)){for(var i=[],a=0;a<e.length;a++)i[a]=this.clone(e[a]);return i}if("[object Null]"===Object.prototype.toString.call(e))return null;if("[object Date]"===Object.prototype.toString.call(e))return e;if("object"===t(e)){var s={};for(var r in e)e.hasOwnProperty(r)&&(s[r]=this.clone(e[r]));return s}return e}},{key:"log10",value:function(t){return Math.log(t)/Math.LN10}}
vendor: 14,694 bytes, line 60674
60674,{key:"roundToBase10",value:function(t){return Math.pow(10,Math.floor(Math.log10(t)))}},{key:"roundToBase",value:function(t,e){return Math.pow(e,Math.floor(Math.log(t)/Math.log(e)))}},{key:"parseNumber",value:function(t){return null===t?t:parseFloat(t)}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(t){var e=String(t).split(/[eE]/);if(1===e.length)return e[0];var i="",a=t<0?"-":"",s=e[0].replace(".",""),r=Number(e[1])+1;if(r<0){for(i=a+"0.";r++;)i+="0";return i+s.replace(/^-/,"")}for(r-=s.length;r--;)i+="0";return s+i}},{key:"getDimensions",value:function(t){var e=getComputedStyle(t,null),i=t.clientHeight,a=t.clientWidth;return i-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),[a-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),i]}},{key:"getBoundingClientRect",value:function(t){var e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:t.clientWidth,height:t.clientHeight,x:e.left,y:e.top}}},{key:"getLargestStringFromArr",value:function(t){return t.reduce((function(t,e){return Array.isArray(e)&&(e=e.reduce((function(t,e){return t.length>e.length?t:e}))),t.length>e.length?t:e}),0)}},{key:"hexToRgba",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==t.substring(0,1)&&(t="#999999");var i=t.replace("#","");i=i.match(new RegExp("(.{"+i.length/3+"})","g"));for(var a=0;a<i.length;a++)i[a]=parseInt(1===i[a].length?i[a]+i[a]:i[a],16);return void 0!==e&&i.push(e),"rgba("+i.join(",")+")"}},{key:"getOpacityFromRGBA",value:function(t){return parseFloat(t.replace(/^.*,(.+)\)/,"$1"))}},{key:"rgb2hex",value:function(t){return(t=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===t.length?"#"+("0"+parseInt(t[1],10).toString(16)).slice(-2)+("0"+parseInt(t[2],10).toString(16)).slice(-2)+("0"+parseInt(t[3],10).toString(16)).slice(-2):""}},{key:"isColorHex",value:function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(t)}},{key:"getPolygonPos",value:function(t,e){for(var i=[],a=2*Math.PI/e,s=0;s<e;s++){var r={};r.x=t*Math.sin(s*a),r.y=-t*Math.cos(s*a),i.push(r)}return i}},{key:"polarToCartesian",value:function(t,e,i,a){var s=(a-90)*Math.PI/180;return{x:t+i*Math.cos(s),y:e+i*Math.sin(s)}}},{key:"escapeString",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",i=t.toString().slice();return i=i.replace(/[` ~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/gi,e)}},{key:"negToZero",value:function(t){return t<0?0:t}},{key:"moveIndexInArray",value:function(t,e,i){if(i>=t.length)for(var a=i-t.length+1;a--;)t.push(void 0);return t.splice(i,0,t.splice(e,1)[0]),t}},{key:"extractNumber",value:function(t){return parseFloat(t.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}},{key:"setELstyles",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t.style.key=e[i])}},{key:"isNumber",value:function(t){return!isNaN(t)&&parseFloat(Number(t))===t&&!isNaN(parseInt(t,10))}},{key:"isFloat",value:function(t){return Number(t)===t&&t%1!=0}},{key:"isSafari",value:function(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}},{key:"isFirefox",value:function(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1}},{key:"isIE11",value:function(){if(-1!==window.navigator.userAgent.indexOf("MSIE")||window.navigator.appVersion.indexOf("Trident/")>-1)return!0}},{key:"isIE",value:function(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(t.indexOf("Trident/")>0){var i=t.indexOf("rv:");return parseInt(t.substring(i+3,t.indexOf(".",i)),10)}var a=t.indexOf("Edge/");return a>0&&parseInt(t.substring(a+5,t.indexOf(".",a)),10)}}]),i}(),f=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w,this.setEasingFunctions()}return a(t,[{key:"setEasingFunctions",value:function(){var t;if(!this.w.globals.easing){switch(this.w.config.chart.animations.easing){case"linear":t="-";break;case"easein":t="<";break;case"easeout":t=">";break;case"easeinout":t="<>";break;case"swing":t=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1};break;case"bounce":t=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};break;case"elastic":t=function(t){return t===!!t?t:Math.pow(2,-10*t)*Math.sin((t-.075)*(2*Math.PI)/.3)+1};break;default:t="<>"}this.w.globals.easing=t}}},{key:"animateLine",value:function(t,e,i,a){t.attr(e).animate(a).attr(i)}},{key:"animateMarker",value:function(t,e,i,a,s,r){e||(e=0),t.attr({r:e,width:e,height:e}).animate(a,s).attr({r:i,width:i.width,height:i.height}).afterAll((function(){r()}))}},{key:"animateCircle",value:function(t,e,i,a,s){t.attr({r:e.r,cx:e.cx,cy:e.cy}).animate(a,s).attr({r:i.r,cx:i.cx,cy:i.cy})}},{key:"animateRect",value:function(t,e,i,a,s){t.attr(e).animate(a).attr(i).afterAll((function(){return s()}))}},{key:"animatePathsGradually",value:function(t){var e=t.el,i=t.realIndex,a=t.j,s=t.fill,r=t.pathFrom,o=t.pathTo,n=t.speed,l=t.delay,h=this.w,c=0;h.config.chart.animations.animateGradually.enabled&&(c=h.config.chart.animations.animateGradually.delay),h.config.chart.animations.dynamicAnimation.enabled&&h.globals.dataChanged&&"bar"!==h.config.chart.type&&(c=0),this.morphSVG(e,i,a,"line"!==h.config.chart.type||h.globals.comboCharts?s:"stroke",r,o,n,l*c)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach((function(t){t.el.classList.remove("apexcharts-element-hidden")}))}},{key:"animationCompleted",value:function(t){var e=this.w;e.globals.animationEnded||(e.globals.animationEnded=!0,this.showDelayedElements(),"function"==typeof e.config.chart.events.animationEnd&&e.config.chart.events.animationEnd(this.ctx,{el:t,w:e}))}},{key:"morphSVG",value:function(t,e,i,a,s,r,o,n){var l=this,h=this.w;s||(s=t.attr("pathFrom")),r||(r=t.attr("pathTo"));var c=function(t){return"radar"===h.config.chart.type&&(o=1),"M 0 ".concat(h.globals.gridHeight)};(!s||s.indexOf("undefined")>-1||s.indexOf("NaN")>-1)&&(s=c()),(!r||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=c()),h.globals.shouldAnimate||(o=1),t.plot(s).animate(1,h.globals.easing,n).plot(s).animate(o,h.globals.easing,n).plot(r).afterAll((function(){p.isNumber(i)?i===h.globals.series[h.globals.maxValsInArrayIndex].length-2&&h.globals.shouldAnimate&&l.animationCompleted(t):"none"!==a&&h.globals.shouldAnimate&&(!h.globals.comboCharts&&e===h.globals.series.length-1||h.globals.comboCharts)&&l.animationCompleted(t),l.showDelayedElements()}))}}]),t}(),x=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w}return a(t,[{key:"getDefaultFilter",value:function(t,e){var i=this.w;t.unfilter(!0),(new window.SVG.Filter).size("120%","180%","-5%","-40%"),"none"!==i.config.states.normal.filter?this.applyFilter(t,e,i.config.states.normal.filter.type,i.config.states.normal.filter.value):i.config.chart.dropShadow.enabled&&this.dropShadow(t,i.config.chart.dropShadow,e)}},{key:"addNormalFilter",value:function(t,e){var i=this.w;i.config.chart.dropShadow.enabled&&!t.node.classList.contains("apexcharts-marker")&&this.dropShadow(t,i.config.chart.dropShadow,e)}},{key:"addLightenFilter",value:function(t,e,i){var a=this,s=this.w,r=i.intensity;t.unfilter(!0);new window.SVG.Filter;t.filter((function(t){var i=s.config.chart.dropShadow;(i.enabled?a.addShadow(t,e,i):t).componentTransfer({rgb:{type:"linear",slope:1.5,intercept:r}})})),t.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(t.filterer.node)}},{key:"addDarkenFilter",value:function(t,e,i){var a=this,s=this.w,r=i.intensity;t.unfilter(!0);new window.SVG.Filter;t.filter((function(t){var i=s.config.chart.dropShadow;(i.enabled?a.addShadow(t,e,i):t).componentTransfer({rgb:{type:"linear",slope:r}})})),t.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(t.filterer.node)}},{key:"applyFilter",value:function(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;switch(i){case"none":this.addNormalFilter(t,e);break;case"lighten":this.addLightenFilter(t,e,{intensity:a});break;case"darken":this.addDarkenFilter(t,e,{intensity:a})}}},{key:"addShadow",value:function(t,e,i){var a=i.blur,s=i.top,r=i.left,o=i.color,n=i.opacity,l=t.flood(Array.isArray(o)?o[e]:o,n).composite(t.sourceAlpha,"in").offset(r,s).gaussianBlur(a).merge(t.source);return t.blend(t.source,l)}},{key:"dropShadow",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=e.top,s=e.left,r=e.blur,o=e.color,n=e.opacity,l=e.noUserSpaceOnUse,h=this.w;return t.unfilter(!0),p.isIE()&&"radialBar"===h.config.chart.type||(o=Array.isArray(o)?o[i]:o,t.filter((function(t){var e=null;e=p.isSafari()||p.isFirefox()||p.isIE()?t.flood(o,n).composite(t.sourceAlpha,"in").offset(s,a).gaussianBlur(r):t.flood(o,n).composite(t.sourceAlpha,"in").offset(s,a).gaussianBlur(r).merge(t.source),t.blend(t.source,e)})),l||t.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(t.filterer.node)),t}},{key:"setSelectionFilter",value:function(t,e,i){var a=this.w;if(void 0!==a.globals.selectedDataPoints[e]&&a.globals.selectedDataPoints[e].indexOf(i)>-1){t.node.setAttribute("selected",!0);var s=a.config.states.active.filter;"none"!==s&&this.applyFilter(t,e,s.type,s.value)}}},{key:"_scaleFilterSize",value:function(t){!function(e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}]),t}(),b=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w}return a(t,[{key:"drawLine",value:function(t,e,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,n=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt",l=this.w,h=l.globals.dom.Paper.line().attr({x1:t,y1:e,x2:i,y2:a,stroke:s,"stroke-dasharray":r,"stroke-width":o,"stroke-linecap":n});return h}},{key:"drawRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,n=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,h=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,c=this.w,d=c.globals.dom.Paper.rect();return d.attr({x:t,y:e,width:i>0?i:0,height:a>0?a:0,rx:s,ry:s,opacity:o,"stroke-width":null!==n?n:0,stroke:null!==l?l:"none","stroke-dasharray":h}),d.node.setAttribute("fill",r),d}},{key:"drawPolygon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none",s=this.w,r=s.globals.dom.Paper.polygon(t).attr({fill:a,stroke:e,"stroke-width":i});return r}},{key:"drawCircle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w;t<0&&(t=0);var a=i.globals.dom.Paper.circle(2*t);return null!==e&&a.attr(e),a}},{key:"drawPath",value:function(t){var e=t.d,i=void 0===e?"":e,a=t.stroke,s=void 0===a?"#a8a8a8":a,r=t.strokeWidth,o=void 0===r?1:r,n=t.fill,l=t.fillOpacity,h=void 0===l?1:l,c=t.strokeOpacity,d=void 0===c?1:c,g=t.classes,u=t.strokeLinecap,p=void 0===u?null:u,f=t.strokeDashArray,x=void 0===f?0:f,b=this.w;return null===p&&(p=b.config.stroke.lineCap),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 ".concat(b.globals.gridHeight)),b.globals.dom.Paper.path(i).attr({fill:n,"fill-opacity":h,stroke:s,"stroke-opacity":d,"stroke-linecap":p,"stroke-width":o,"stroke-dasharray":x,class:g})}},{key:"group",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,i=e.globals.dom.Paper.group();return null!==t&&i.attr(t),i}},{key:"move",value:function(t,e){var i=["M",t,e].join(" ");return i}},{key:"line",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=null;return null===i?a=["L",t,e].join(" "):"H"===i?a=["H",t].join(" "):"V"===i&&(a=["V",e].join(" ")),a}},{key:"curve",value:function(t,e,i,a,s,r){var o=["C",t,e,i,a,s,r].join(" ");return o}},{key:"quadraticCurve",value:function(t,e,i,a){return["Q",t,e,i,a].join(" ")}},{key:"arc",value:function(t,e,i,a,s,r,o){var n=arguments.length>7&&void 0!==arguments[7]&&arguments[7],l="A";n&&(l="a");var h=[l,t,e,i,a,s,r,o].join(" ");return h}},{key:"renderPaths",value:function(t){var e,i=t.j,a=t.realIndex,s=t.pathFrom,r=t.pathTo,n=t.stroke,l=t.strokeWidth,h=t.strokeLinecap,c=t.fill,d=t.animationDelay,g=t.initialSpeed,u=t.dataChangeSpeed,p=t.className,b=t.shouldClipToGrid,m=void 0===b||b,v=t.bindEventsOnPaths,y=void 0===v||v,w=t.drawShadow,k=void 0===w||w,A=this.w,S=new x(this.ctx),C=new f(this.ctx),L=this.w.config.chart.animations.enabled,P=L&&this.w.config.chart.animations.dynamicAnimation.enabled,T=!!(L&&!A.globals.resized||P&&A.globals.dataChanged&&A.globals.shouldAnimate);T?e=s:(e=r,A.globals.animationEnded=!0);var M=A.config.stroke.dashArray,I=0;I=Array.isArray(M)?M[a]:A.config.stroke.dashArray;var z=this.drawPath({d:e,stroke:n,strokeWidth:l,fill:c,fillOpacity:1,classes:p,strokeLinecap:h,strokeDashArray:I});if(z.attr("index",a),m&&z.attr({"clip-path":"url(#gridRectMask".concat(A.globals.cuid,")")}),"none"!==A.config.states.normal.filter.type)S.getDefaultFilter(z,a);else if(A.config.chart.dropShadow.enabled&&k&&(!A.config.chart.dropShadow.enabledOnSeries||A.config.chart.dropShadow.enabledOnSeries&&-1!==A.config.chart.dropShadow.enabledOnSeries.indexOf(a))){var X=A.config.chart.dropShadow;S.dropShadow(z,X,a)}y&&(z.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,z)),z.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,z)),z.node.addEventListener("mousedown",this.pathMouseDown.bind(this,z))),z.attr({pathTo:r,pathFrom:s});var E={el:z,j:i,realIndex:a,pathFrom:s,pathTo:r,fill:c,strokeWidth:l,delay:d};return!L||A.globals.resized||A.globals.dataChanged?!A.globals.resized&&A.globals.dataChanged||C.showDelayedElements():C.animatePathsGradually(o(o({},E),{},{speed:g})),A.globals.dataChanged&&P&&T&&C.animatePathsGradually(o(o({},E),{},{speed:u})),z}}
vendor: 4,156 bytes, line 60674
60674,{key:"drawPattern",value:function(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=this.w,o=r.globals.dom.Paper.pattern(e,i,(function(r){"horizontalLines"===t?r.line(0,0,i,0).stroke({color:a,width:s+1}):"verticalLines"===t?r.line(0,0,0,e).stroke({color:a,width:s+1}):"slantedLines"===t?r.line(0,0,e,i).stroke({color:a,width:s}):"squares"===t?r.rect(e,i).fill("none").stroke({color:a,width:s}):"circles"===t&&r.circle(e).fill("none").stroke({color:a,width:s})}));return o}},{key:"drawGradient",value:function(t,e,i,a,s){var r,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,h=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,c=this.w;e.length<9&&0===e.indexOf("#")&&(e=p.hexToRgba(e,a)),i.length<9&&0===i.indexOf("#")&&(i=p.hexToRgba(i,s));var d=0,g=1,u=1,f=null;null!==n&&(d=void 0!==n[0]?n[0]/100:0,g=void 0!==n[1]?n[1]/100:1,u=void 0!==n[2]?n[2]/100:1,f=void 0!==n[3]?n[3]/100:null);var x=!("donut"!==c.config.chart.type&&"pie"!==c.config.chart.type&&"polarArea"!==c.config.chart.type&&"bubble"!==c.config.chart.type);if(r=null===l||0===l.length?c.globals.dom.Paper.gradient(x?"radial":"linear",(function(t){t.at(d,e,a),t.at(g,i,s),t.at(u,i,s),null!==f&&t.at(f,e,a)})):c.globals.dom.Paper.gradient(x?"radial":"linear",(function(t){(Array.isArray(l[h])?l[h]:l).forEach((function(e){t.at(e.offset/100,e.color,e.opacity)}))})),x){var b=c.globals.gridWidth/2,m=c.globals.gridHeight/2;"bubble"!==c.config.chart.type?r.attr({gradientUnits:"userSpaceOnUse",cx:b,cy:m,r:o}):r.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?r.from(0,0).to(0,1):"diagonal"===t?r.from(0,0).to(1,1):"horizontal"===t?r.from(0,1).to(1,1):"diagonal2"===t&&r.from(1,0).to(0,1);return r}},{key:"drawText",value:function(t){var e,i=t.x,a=t.y,s=t.text,r=t.textAnchor,o=t.fontSize,n=t.fontFamily,l=t.fontWeight,h=t.foreColor,c=t.opacity,d=t.cssClass,g=void 0===d?"":d,u=t.isPlainText,p=void 0===u||u,f=this.w;return void 0===s&&(s=""),r||(r="start"),h&&h.length||(h=f.config.chart.foreColor),n=n||f.config.chart.fontFamily,l=l||"regular",(e=Array.isArray(s)?f.globals.dom.Paper.text((function(t){for(var e=0;e<s.length;e++)0===e?t.tspan(s[e]):t.tspan(s[e]).newLine()})):p?f.globals.dom.Paper.plain(s):f.globals.dom.Paper.text((function(t){return t.tspan(s)}))).attr({x:i,y:a,"text-anchor":r,"dominant-baseline":"auto","font-size":o,"font-family":n,"font-weight":l,fill:h,class:"apexcharts-text "+g}),e.node.style.fontFamily=n,e.node.style.opacity=c,e}},{key:"drawMarker",value:function(t,e,i){t=t||0;var a=i.pSize||0,s=null;if("square"===i.shape||"rect"===i.shape){var r=void 0===i.pRadius?a/2:i.pRadius;null!==e&&a||(a=0,r=0);var o=1.2*a+r,n=this.drawRect(o,o,o,o,r);n.attr({x:t-o/2,y:e-o/2,cx:t,cy:e,class:i.class?i.class:"",fill:i.pointFillColor,"fill-opacity":i.pointFillOpacity?i.pointFillOpacity:1,stroke:i.pointStrokeColor,"stroke-width":i.pointStrokeWidth?i.pointStrokeWidth:0,"stroke-opacity":i.pointStrokeOpacity?i.pointStrokeOpacity:1}),s=n}else"circle"!==i.shape&&i.shape||(p.isNumber(e)||(a=0,e=0),s=this.drawCircle(a,{cx:t,cy:e,class:i.class?i.class:"",stroke:i.pointStrokeColor,fill:i.pointFillColor,"fill-opacity":i.pointFillOpacity?i.pointFillOpacity:1,"stroke-width":i.pointStrokeWidth?i.pointStrokeWidth:0,"stroke-opacity":i.pointStrokeOpacity?i.pointStrokeOpacity:1}));return s}},{key:"pathMouseEnter",value:function(t,e){var i=this.w,a=new x(this.ctx),s=parseInt(t.node.getAttribute("index"),10),r=parseInt(t.node.getAttribute("j"),10);if("function"==typeof i.config.chart.events.dataPointMouseEnter&&i.config.chart.events.dataPointMouseEnter(e,this.ctx,{seriesIndex:s,dataPointIndex:r,w:i}),this.ctx.events.fireEvent("dataPointMouseEnter",[e,this.ctx,{seriesIndex:s,dataPointIndex:r,w:i}]),("none"===i.config.states.active.filter.type||"true"!==t.node.getAttribute("selected"))&&"none"!==i.config.states.hover.filter.type&&"none"!==i.config.states.active.filter.type&&!i.globals.isTouchDevice){var o=i.config.states.hover.f
vendor: 15,069 bytes, line 60674
60674ilter;a.applyFilter(t,s,o.type,o.value)}}},{key:"pathMouseLeave",value:function(t,e){var i=this.w,a=new x(this.ctx),s=parseInt(t.node.getAttribute("index"),10),r=parseInt(t.node.getAttribute("j"),10);"function"==typeof i.config.chart.events.dataPointMouseLeave&&i.config.chart.events.dataPointMouseLeave(e,this.ctx,{seriesIndex:s,dataPointIndex:r,w:i}),this.ctx.events.fireEvent("dataPointMouseLeave",[e,this.ctx,{seriesIndex:s,dataPointIndex:r,w:i}]),"none"!==i.config.states.active.filter.type&&"true"===t.node.getAttribute("selected")||"none"!==i.config.states.hover.filter.type&&a.getDefaultFilter(t,s)}},{key:"pathMouseDown",value:function(t,e){var i=this.w,a=new x(this.ctx),s=parseInt(t.node.getAttribute("index"),10),r=parseInt(t.node.getAttribute("j"),10),o="false";if("true"===t.node.getAttribute("selected")){if(t.node.setAttribute("selected","false"),i.globals.selectedDataPoints[s].indexOf(r)>-1){var n=i.globals.selectedDataPoints[s].indexOf(r);i.globals.selectedDataPoints[s].splice(n,1)}}else{if(!i.config.states.active.allowMultipleDataPointsSelection&&i.globals.selectedDataPoints.length>0){i.globals.selectedDataPoints=[];var l=i.globals.dom.Paper.select(".apexcharts-series path").members,h=i.globals.dom.Paper.select(".apexcharts-series circle, .apexcharts-series rect").members,c=function(t){Array.prototype.forEach.call(t,(function(t){t.node.setAttribute("selected","false"),a.getDefaultFilter(t,s)}))};c(l),c(h)}t.node.setAttribute("selected","true"),o="true",void 0===i.globals.selectedDataPoints[s]&&(i.globals.selectedDataPoints[s]=[]),i.globals.selectedDataPoints[s].push(r)}if("true"===o){var d=i.config.states.active.filter;"none"!==d&&a.applyFilter(t,s,d.type,d.value)}else"none"!==i.config.states.active.filter.type&&a.getDefaultFilter(t,s);"function"==typeof i.config.chart.events.dataPointSelection&&i.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}),e&&this.ctx.events.fireEvent("dataPointSelection",[e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}])}},{key:"rotateAroundCenter",value:function(t){var e=t.getBBox();return{x:e.x+e.width/2,y:e.y+e.height/2}}},{key:"getTextRects",value:function(t,e,i,a){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=this.w,o=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:i,foreColor:"#fff",opacity:0});a&&o.attr("transform",a),r.globals.dom.Paper.add(o);var n=o.bbox();return s||(n=o.node.getBoundingClientRect()),o.remove(),{width:n.width,height:n.height}}},{key:"placeTextWithEllipsis",value:function(t,e,i){if("function"==typeof t.getComputedTextLength&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=i/1.1)){for(var a=e.length-3;a>0;a-=3)if(t.getSubStringLength(0,a)<=i/1.1)return void(t.textContent=e.substring(0,a)+"...");t.textContent="."}}}],[{key:"setAttrs",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}}]),t}(),m=function(){function t(i){e(this,t),this.w=i.w,this.annoCtx=i}return a(t,[{key:"setOrientations",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w;if("vertical"===t.label.orientation){var a=null!==e?e:0,s=i.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(a,"']"));if(null!==s){var r=s.getBoundingClientRect();s.setAttribute("x",parseFloat(s.getAttribute("x"))-r.height+4),"top"===t.label.position?s.setAttribute("y",parseFloat(s.getAttribute("y"))+r.width):s.setAttribute("y",parseFloat(s.getAttribute("y"))-r.width);var o=this.annoCtx.graphics.rotateAroundCenter(s),n=o.x,l=o.y;s.setAttribute("transform","rotate(-90 ".concat(n," ").concat(l,")"))}}}},{key:"addBackgroundToAnno",value:function(t,e){var i=this.w;if(!t||!e.label.text||e.label.text&&!e.label.text.trim())return null;var a=i.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),s=t.getBoundingClientRect(),r=e.label.style.padding.left,o=e.label.style.padding.right,n=e.label.style.padding.top,l=e.label.style.padding.bottom;"vertical"===e.label.orientation&&(n=e.label.style.padding.left,l=e.label.style.padding.right,r=e.label.style.padding.top,o=e.label.style.padding.bottom);var h=s.left-a.left-r,c=s.top-a.top-n,d=this.annoCtx.graphics.drawRect(h-i.globals.barPadForNumericAxis,c,s.width+r+o,s.height+n+l,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&d.node.classList.add(e.id),d}},{key:"annotationsBackground",value:function(){var t=this,e=this.w,i=function(i,a,s){var r=e.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(a,"']"));if(r){var o=r.parentNode,n=t.addBackgroundToAnno(r,i);n&&o.insertBefore(n.node,r)}};e.config.annotations.xaxis.map((function(t,e){i(t,e,"xaxis")})),e.config.annotations.yaxis.map((function(t,e){i(t,e,"yaxis")})),e.config.annotations.points.map((function(t,e){i(t,e,"point")}))}},{key:"getStringX",value:function(t){var e=this.w,i=t;e.config.xaxis.convertedCatToNumeric&&e.globals.categoryLabels.length&&(t=e.globals.categoryLabels.indexOf(t)+1);var a=e.globals.labels.indexOf(t),s=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child("+(a+1)+")");return s&&(i=parseFloat(s.getAttribute("x"))),i}}]),t}(),v=function(){function t(i){e(this,t),this.w=i.w,this.annoCtx=i,this.invertAxis=this.annoCtx.invertAxis}return a(t,[{key:"addXaxisAnnotation",value:function(t,e,i){var a=this.w,s=this.invertAxis?a.globals.minY:a.globals.minX,r=this.invertAxis?a.globals.maxY:a.globals.maxX,o=this.invertAxis?a.globals.yRange[0]:a.globals.xRange,n=(t.x-s)/(o/a.globals.gridWidth);this.annoCtx.inversedReversedAxis&&(n=(r-t.x)/(o/a.globals.gridWidth));var l=t.label.text;"category"!==a.config.xaxis.type&&!a.config.xaxis.convertedCatToNumeric||this.invertAxis||a.globals.dataFormatXNumeric||(n=this.annoCtx.helpers.getStringX(t.x));var h=t.strokeDashArray;if(p.isNumber(n)){if(null===t.x2||void 0===t.x2){var c=this.annoCtx.graphics.drawLine(n+t.offsetX,0+t.offsetY,n+t.offsetX,a.globals.gridHeight+t.offsetY,t.borderColor,h,t.borderWidth);e.appendChild(c.node),t.id&&c.node.classList.add(t.id)}else{var d=(t.x2-s)/(o/a.globals.gridWidth);if(this.annoCtx.inversedReversedAxis&&(d=(r-t.x2)/(o/a.globals.gridWidth)),"category"!==a.config.xaxis.type&&!a.config.xaxis.convertedCatToNumeric||this.invertAxis||a.globals.dataFormatXNumeric||(d=this.annoCtx.helpers.getStringX(t.x2)),d<n){var g=n;n=d,d=g}var u=this.annoCtx.graphics.drawRect(n+t.offsetX,0+t.offsetY,d-n,a.globals.gridHeight+t.offsetY,0,t.fillColor,t.opacity,1,t.borderColor,h);u.node.classList.add("apexcharts-annotation-rect"),u.attr("clip-path","url(#gridRectMask".concat(a.globals.cuid,")")),e.appendChild(u.node),t.id&&u.node.classList.add(t.id)}var f="top"===t.label.position?4:a.globals.gridHeight,x=this.annoCtx.graphics.getTextRects(l,parseFloat(t.label.style.fontSize)),b=this.annoCtx.graphics.drawText({x:n+t.label.offsetX,y:f+t.label.offsetY-("vertical"===t.label.orientation?"top"===t.label.position?x.width/2-12:-x.width/2:0),text:l,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-xaxis-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});b.attr({rel:i}),e.appendChild(b.node),this.annoCtx.helpers.setOrientations(t,i)}}},{key:"drawXAxisAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-xaxis-annotations"});return e.config.annotations.xaxis.map((function(e,a){t.addXaxisAnnotation(e,i.node,a)})),i}}]),t}(),y=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w}return a(t,[{key:"getStackedSeriesTotals",value:function(){var t=this.w,e=[];if(0===t.globals.series.length)return e;for(var i=0;i<t.globals.series[t.globals.maxValsInArrayIndex].length;i++){for(var a=0,s=0;s<t.globals.series.length;s++)void 0!==t.globals.series[s][i]&&(a+=t.globals.series[s][i]);e.push(a)}return t.globals.stackedSeriesTotals=e,e}},{key:"getSeriesTotalByIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return null===t?this.w.config.series.reduce((function(t,e){return t+e}),0):this.w.globals.series[t].reduce((function(t,e){return t+e}),0)}},{key:"isSeriesNull",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===t?this.w.config.series.filter((function(t){return null!==t})):this.w.config.series[t].data.filter((function(t){return null!==t}))).length}},{key:"seriesHaveSameValues",value:function(t){return this.w.globals.series[t].every((function(t,e,i){return t===i[0]}))}},{key:"getCategoryLabels",value:function(t){var e=this.w,i=t.slice();return e.config.xaxis.convertedCatToNumeric&&(i=t.map((function(t,i){return e.config.xaxis.labels.formatter(t-e.globals.minX+1)}))),i}},{key:"getLargestSeries",value:function(){var t=this.w;t.globals.maxValsInArrayIndex=t.globals.series.map((function(t){return t.length})).indexOf(Math.max.apply(Math,t.globals.series.map((function(t){return t.length}))))}},{key:"getLargestMarkerSize",value:function(){var t=this.w,e=0;return t.globals.markers.size.forEach((function(t){e=Math.max(e,t)})),t.globals.markers.largestSize=e,e}},{key:"getSeriesTotals",value:function(){var t=this.w;t.globals.seriesTotals=t.globals.series.map((function(t,e){var i=0;if(Array.isArray(t))for(var a=0;a<t.length;a++)i+=t[a];else i+=t;return i}))}},{key:"getSeriesTotalsXRange",value:function(t,e){var i=this.w;return i.globals.series.map((function(a,s){for(var r=0,o=0;o<a.length;o++)i.globals.seriesX[s][o]>t&&i.globals.seriesX[s][o]<e&&(r+=a[o]);return r}))}},{key:"getPercentSeries",value:function(){var t=this.w;t.globals.seriesPercent=t.globals.series.map((function(e,i){var a=[];if(Array.isArray(e))for(var s=0;s<e.length;s++){var r=t.globals.stackedSeriesTotals[s],o=0;r&&(o=100*e[s]/r),a.push(o)}else{var n=100*e/t.globals.seriesTotals.reduce((function(t,e){return t+e}),0);a.push(n)}return a}))}},{key:"getCalculatedRatios",value:function(){var t,e,i,a,s=this.w.globals,r=[],o=0,n=[],l=.1,h=0;if(s.yRange=[],s.isMultipleYAxis)for(var c=0;c<s.minYArr.length;c++)s.yRange.push(Math.abs(s.minYArr[c]-s.maxYArr[c])),n.push(0);else s.yRange.push(Math.abs(s.minY-s.maxY));s.xRange=Math.abs(s.maxX-s.minX),s.zRange=Math.abs(s.maxZ-s.minZ);for(var d=0;d<s.yRange.length;d++)r.push(s.yRange[d]/s.gridHeight);if(e=s.xRange/s.gridWidth,i=Math.abs(s.initialMaxX-s.initialMinX)/s.gridWidth,t=s.yRange/s.gridWidth,a=s.xRange/s.gridHeight,(o=s.zRange/s.gridHeight*16)||(o=1),s.minY!==Number.MIN_VALUE&&0!==Math.abs(s.minY)&&(s.hasNegs=!0),s.isMultipleYAxis){n=[];for(var g=0;g<r.length;g++)n.push(-s.minYArr[g]/r[g])}else n.push(-s.minY/r[0]),s.minY!==Number.MIN_VALUE&&0!==Math.abs(s.minY)&&(l=-s.minY/t,h=s.minX/e);return{yRatio:r,invertedYRatio:t,zRatio:o,xRatio:e,initialXRatio:i,invertedXRatio:a,baseLineInvertedY:l,baseLineY:n,baseLineX:h}}},{key:"getLogSeries",value:function(t){var e=this,i=this.w;return i.globals.seriesLog=t.map((function(t,a){return i.config.yaxis[a]&&i.config.yaxis[a].logarithmic?t.map((function(t){return null===t?null:e.getLogVal(t,a)})):t})),i.globals.invalidLogScale?t:i.globals.seriesLog}},{key:"getLogVal",value:function(t,e){var i=this.w;return(Math.log(t)-Math.log(i.globals.minYArr[e]))/(Math.log(i.globals.maxYArr[e])-Math.log(i.globals.minYArr[e]))}},{key:"getLogYRatios",value:function(t){var e=this,i=this.w,a=this.w.globals;return a.yLogRatio=t.slice(),a.logYRange=a.yRange.map((function(t,s){if(i.config.yaxis[s]&&e.w.config.yaxis[s].logarithmic){var r,o=-Number.MAX_VALUE,n=Number.MIN_VALUE;return a.seriesLog.forEach((function(t,e){t.forEach((function(t){i.config.yaxis[e]&&i.config.yaxis[e].logarithmic&&(o=Math.max(t,o),n=Math.min(t,n))}))})),r=Math.pow(a.yRange[s],Math.abs(n-o)/a.yRange[s]),a.yLogRatio[s]=r/a.gridHeight,r}})),a.invalidLogScale?t.slice():a.yLogRatio}}],[{key:"checkComboSeries",value:function(t){var e=!1,i=0,a=0;return t.length&&void 0!==t[0].type&&t.forEach((function(t){"bar"!==t.type&&"column"!==t.type&&"candlestick"!==t.type&&"boxPlot"!==t.type||i++,void 0!==t.type&&a++})),a>1&&(e=!0),{comboBarCount:i,comboCharts:e}}},{key:"extendArrayProps",value:function(t,e,i){return e.yaxis&&(e=t.extendYAxis(e,i)),e.annotations&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),e.annotations.xaxis&&(e=t.extendXAxisAnnotations(e)),e.annotations.points&&(e=t.extendPointAnnotations(e))),e}}]),t}(),w=function(){function t(i){e(this,t),this.w=i.w,this.annoCtx=i}return a(t,[{key:"addYaxisAnnotation",value:function(t,e,i){var a,s=this.w,r=t.strokeDashArray,o=this._getY1Y2("y1",t),n=t.label.text;if(null===t.y2||void 0===t.y2){var l=this.annoCtx.graphics.drawLine(0+t.offsetX,o+t.offsetY,this._getYAxisAnnotationWidth(t),o+t.offsetY,t.borderColor,r,t.borderWidth);e.appendChild(l.node),t.id&&l.node.classList.add(t.id)}else{if((a=this._getY1Y2("y2",t))>o){var h=o;o=a,a=h}var c=this.annoCtx.graphics.drawRect(0+t.offsetX,a+t.offsetY,this._getYAxisAnnotationWidth(t),o-a,0,t.fillColor,t.opacity,1,t.borderColor,r);c.node.classList.add("apexcharts-annotation-rect"),c.attr("clip-path","url(#gridRectMask".concat(s.globals.cuid,")")),e.appendChild(c.node),t.id&&c.node.classList.add(t.id)}var d="right"===t.label.position?s.globals.gridWidth:0,g=this.annoCtx.graphics.drawText({x:d+t.label.offsetX,y:(a||o)+t.label.offsetY-3,text:n,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});g.attr({rel:i}),e.appendChild(g.node)}},{key:"_getY1Y2",value:function(t,e){var i,a="y1"===t?e.y:e.y2,s=this.w;if(this.annoCtx.invertAxis){var r=s.globals.labels.indexOf(a);s.config.xaxis.convertedCatToNumeric&&(r=s.globals.categoryLabels.indexOf(a));var o=s.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child("+(r+1)+")");o&&(i=parseFloat(o.getAttribute("y")))}else{var n;if(s.config.yaxis[e.yAxisIndex].logarithmic)n=(a=new y(this.annoCtx.ctx).getLogVal(a,e.yAxisIndex))/s.globals.yLogRatio[e.yAxisIndex];else n=(a-s.globals.minYArr[e.yAxisIndex])/(s.globals.yRange[e.yAxisIndex]/s.globals.gridHeight);i=s.globals.gridHeight-n,s.config.yaxis[e.yAxisIndex]&&s.config.yaxis[e.yAxisIndex].reversed&&(i=n)}return i}},{key:"_getYAxisAnnotationWidth",value:function(t){var e=this.w;e.globals.gridWidth;return(t.width.indexOf("%")>-1?e.globals.gridWidth*parseInt(t.width,10)/100:parseInt(t.width,10))+t.offsetX}},{key:"drawYAxisAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return e.config.annotations.yaxis.map((function(e,a){t.addYaxisAnnotation(e,i.node,a)})),i}}]),t}(),k=function(){function t(i){e(this,t),this.w=i.w,this.annoCtx=i}
60674return a(t,[{key:"addPointAnnotation",value:function(t,e,i){var a=this.w,s=0,r=0,o=0;this.annoCtx.invertAxis&&console.warn("Point annotation is not supported in horizontal bar charts.");var n=parseFloat(t.y);if("string"==typeof t.x){var l=a.globals.labels.indexOf(t.x);a.config.xaxis.convertedCatToNumeric&&(l=a.globals.categoryLabels.indexOf(t.x)),s=this.annoCtx.helpers.getStringX(t.x),null===t.y&&(n=a.globals.series[t.seriesIndex][l])}else s=(t.x-a.globals.minX)/(a.globals.xRange/a.globals.gridWidth);for(var h,c=[],d=0,g=0;g<=t.seriesIndex;g++){var u=a.config.yaxis[g].seriesName;if(u)for(var f=g+1;f<=t.seriesIndex;f++)a.config.yaxis[f].seriesName===u&&-1===c.indexOf(u)&&(d++,c.push(u))}if(a.config.yaxis[t.yAxisIndex].logarithmic){h=(n=new y(this.annoCtx.ctx).getLogVal(n,t.yAxisIndex))/a.globals.yLogRatio[t.yAxisIndex]}else{var x=t.yAxisIndex+d;h=(n-a.globals.minYArr[x])/(a.globals.yRange[x]/a.globals.gridHeight)}if(r=a.globals.gridHeight-h-parseFloat(t.label.style.fontSize)-t.marker.size,o=a.globals.gridHeight-h,a.config.yaxis[t.yAxisIndex]&&a.config.yaxis[t.yAxisIndex].reversed&&(r=h+parseFloat(t.label.style.fontSize)+t.marker.size,o=h),p.isNumber(s)){var b={pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radius,class:"apexcharts-point-annotation-marker ".concat(t.marker.cssClass," ").concat(t.id?t.id:"")},m=this.annoCtx.graphics.drawMarker(s+t.marker.offsetX,o+t.marker.offsetY,b);e.appendChild(m.node);var v=t.label.text?t.label.text:"",w=this.annoCtx.graphics.drawText({x:s+t.label.offsetX,y:r+t.label.offsetY,text:v,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});if(w.attr({rel:i}),e.appendChild(w.node),t.customSVG.SVG){var k=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});k.attr({transform:"translate(".concat(s+t.customSVG.offsetX,", ").concat(r+t.customSVG.offsetY,")")}),k.node.innerHTML=t.customSVG.SVG,e.appendChild(k.node)}if(t.image.path){var A=t.image.width?t.image.width:20,S=t.image.height?t.image.height:20;this.annoCtx.addImage({x:s+t.image.offsetX-A/2,y:r+t.image.offsetY-S/2,width:A,height:S,path:t.image.path,appendTo:".apexcharts-point-annotations"})}}}},{key:"drawPointAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return e.config.annotations.points.map((function(e,a){t.addPointAnnotation(e,i.node,a)})),i}}]),t}();var A={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},S=function(){function t(){e(this,t),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,tickAmount:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={x:0,y:null,yAxisIndex:0,seriesIndex:0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,radius:2,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return a(t,[{key:"init",value:function(){return{annotations:{position:"front",yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,easing:"easeinout",speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"transparent",locales:[A],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.35},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0},stacked:!1,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",dateFormatter:function(t){return new Date(t).toDateString()}},png:{filename:void 0},svg:{filename:void 0}},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,rangeBarOverlap:!0,rangeBarGroupRows:!1,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal"}},bubble:{
vendor: 5,016 bytes, line 60674
60674minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(t){return t}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(t){return t+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)/t.globals.series.length+"%"}}}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(t){return t}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(t){return t}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(t){return null!==t?t:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],labels:{colors:void 0,useSeriesColors:!1},markers:{width:12,height:12,strokeWidth:0,fillColors:void 0,strokeColor:"#fff",radius:12,customHTML:void 0,offsetX:0,offsetY:0,onClick:void 0},itemMargin:{horizontal:5,vertical:2},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",width:8,height:8,radius:2,offsetX:0,offsetY:0,onClick:void 0,onDblClick:void 0,showNullDataPoints:!0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{normal:{filter:{type:"none",value:0}},hover:{filter:{type:"lighten",value:.1}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken",value:.5}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0
vendor: 36,936 bytes, line 60674
60674},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(t){return t?t+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.4}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"light",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),t}(),C=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w,this.graphics=new b(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new m(this),this.xAxisAnnotations=new v(this),this.yAxisAnnotations=new w(this),this.pointsAnnotations=new k(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return a(t,[{key:"drawAxesAnnotations",value:function(){var t=this.w;if(t.globals.axisCharts){for(var e=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),a=this.pointsAnnotations.drawPointAnnotations(),s=t.config.chart.animations.enabled,r=[e,i,a],o=[i.node,e.node,a.node],n=0;n<3;n++)t.globals.dom.elGraphical.add(r[n]),!s||t.globals.resized||t.globals.dataChanged||"scatter"!==t.config.chart.type&&"bubble"!==t.config.chart.type&&t.globals.dataPoints>1&&o[n].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:o[n],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var t=this;this.w.config.annotations.images.map((function(e,i){t.addImage(e,i)}))}},{key:"drawTextAnnos",value:function(){var t=this;this.w.config.annotations.texts.map((function(e,i){t.addText(e,i)}))}},{key:"addXaxisAnnotation",value:function(t,e,i){this.xAxisAnnotations.addXaxisAnnotation(t,e,i)}},{key:"addYaxisAnnotation",value:function(t,e,i){this.yAxisAnnotations.addYaxisAnnotation(t,e,i)}},{key:"addPointAnnotation",value:function(t,e,i){this.pointsAnnotations.addPointAnnotation(t,e,i)}},{key:"addText",value:function(t,e){var i=t.x,a=t.y,s=t.text,r=t.textAnchor,o=t.foreColor,n=t.fontSize,l=t.fontFamily,h=t.fontWeight,c=t.cssClass,d=t.backgroundColor,g=t.borderWidth,u=t.strokeDashArray,p=t.borderRadius,f=t.borderColor,x=t.appendTo,b=void 0===x?".apexcharts-annotations":x,m=t.paddingLeft,v=void 0===m?4:m,y=t.paddingRight,w=void 0===y?4:y,k=t.paddingBottom,A=void 0===k?2:k,S=t.paddingTop,C=void 0===S?2:S,L=this.w,P=this.graphics.drawText({x:i,y:a,text:s,textAnchor:r||"start",fontSize:n||"12px",fontWeight:h||"regular",fontFamily:l||L.config.chart.fontFamily,foreColor:o||L.config.chart.foreColor,cssClass:c}),T=L.globals.dom.baseEl.querySelector(b);T&&T.appendChild(P.node);var M=P.bbox();if(s){var I=this.graphics.drawRect(M.x-v,M.y-C,M.width+v+w,M.height+A+C,p,d||"transparent",1,g,f,u);T.insertBefore(I.node,P.node)}}},{key:"addImage",value:function(t,e){var i=this.w,a=t.path,s=t.x,r=void 0===s?0:s,o=t.y,n=void 0===o?0:o,l=t.width,h=void 0===l?20:l,c=t.height,d=void 0===c?20:c,g=t.appendTo,u=void 0===g?".apexcharts-annotations":g,p=i.globals.dom.Paper.image(a);p.size(h,d).move(r,n);var f=i.globals.dom.baseEl.querySelector(u);f&&f.appendChild(p.node)}},{key:"addXaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}},{key:"addYaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}},{key:"addPointAnnotationExternal",value:function(t,e,i){return void 0===this.invertAxis&&(this.invertAxis=i.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}},{key:"addAnnotationExternal",value:function(t){var e=t.params,i=t.pushToMemory,a=t.context,s=t.type,r=t.contextMethod,o=a,n=o.w,l=n.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations")),h=l.childNodes.length+1,c=new S,d=Object.assign({},"xaxis"===s?c.xAxisAnnotation:"yaxis"===s?c.yAxisAnnotation:c.pointAnnotation),g=p.extend(d,e);switch(s){case"xaxis":this.addXaxisAnnotation(g,l,h);break;case"yaxis":this.addYaxisAnnotation(g,l,h);break;case"point":this.addPointAnnotation(g,l,h)}var u=n.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(h,"']")),f=this.helpers.addBackgroundToAnno(u,g);return f&&l.insertBefore(f.node,u),i&&n.globals.memory.methodsToExec.push({context:o,id:g.id?g.id:p.randomId(),method:r,label:"addAnnotation",params:e}),a}},{key:"clearAnnotations",value:function(t){var e=t.w,i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations");e.globals.memory.methodsToExec.map((function(t,i){"addText"!==t.label&&"addAnnotation"!==t.label||e.globals.memory.methodsToExec.splice(i,1)})),i=p.listToArray(i),Array.prototype.forEach.call(i,(function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}))}},{key:"removeAnnotation",value:function(t,e){var i=t.w,a=i.globals.dom.baseEl.querySelectorAll(".".concat(e));a&&(i.globals.memory.methodsToExec.map((function(t,a){t.id===e&&i.globals.memory.methodsToExec.splice(a,1)})),Array.prototype.forEach.call(a,(function(t){t.parentElement.removeChild(t)})))}}]),t}(),L=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w,this.opts=null,this.seriesIndex=0}return a(t,[{key:"clippedImgArea",value:function(t){var e=this.w,i=e.config,a=parseInt(e.globals.gridWidth,10),s=parseInt(e.globals.gridHeight,10),r=a>s?a:s,o=t.image,n=0,l=0;void 0===t.width&&void 0===t.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(n=i.fill.image.width+1,l=i.fill.image.height):(n=r+1,l=r):(n=t.width,l=t.height);var h=document.createElementNS(e.globals.SVGNS,"pattern");b.setAttrs(h,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:n+"px",height:l+"px"});var c=document.createElementNS(e.globals.SVGNS,"image");h.appendChild(c),c.setAttributeNS(window.SVG.xlink,"href",o),b.setAttrs(c,{x:0,y:0,preserveAspectRatio:"none",width:n+"px",height:l+"px"}),c.style.opacity=t.opacity,e.globals.dom.elDefs.node.appendChild(h)}},{key:"getSeriesIndex",value:function(t){var e=this.w;return("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||"heatmap"===e.config.chart.type||"treemap"===e.config.chart.type?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.globals.series.length,this.seriesIndex}},{key:"fillPath",value:function(t){var e=this.w;this.opts=t;var i,a,s,r=this.w.config;this.seriesIndex=this.getSeriesIndex(t);var o=this.getFillColors()[this.seriesIndex];void 0!==e.globals.seriesColors[this.seriesIndex]&&(o=e.globals.seriesColors[this.seriesIndex]),"function"==typeof o&&(o=o({seriesIndex:this.seriesIndex,dataPointIndex:t.dataPointIndex,value:t.value,w:e}));var n=this.getFillType(this.seriesIndex),l=Array.isArray(r.fill.opacity)?r.fill.opacity[this.seriesIndex]:r.fill.opacity;t.color&&(o=t.color);var h=o;if(-1===o.indexOf("rgb")?o.length<9&&(h=p.hexToRgba(o,l)):o.indexOf("rgba")>-1&&(l=p.getOpacityFromRGBA(o)),t.opacity&&(l=t.opacity),"pattern"===n&&(a=this.handlePatternFill(a,o,l,h)),"gradient"===n&&(s=this.handleGradientFill(o,l,this.seriesIndex)),"image"===n){var c=r.fill.image.src,d=t.patternID?t.patternID:"";this.clippedImgArea({opacity:l,image:Array.isArray(c)?t.seriesNumber<c.length?c[t.seriesNumber]:c[0]:c,width:t.width?t.width:void 0,height:t.height?t.height:void 0,patternUnits:t.patternUnits,patternID:"pattern".concat(e.globals.cuid).concat(t.seriesNumber+1).concat(d)}),i="url(#pattern".concat(e.globals.cuid).concat(t.seriesNumber+1).concat(d,")")}else i="gradient"===n?s:"pattern"===n?a:h;return t.solid&&(i=h),i}},{key:"getFillType",value:function(t){var e=this.w;return Array.isArray(e.config.fill.type)?e.config.fill.type[t]:e.config.fill.type}},{key:"getFillColors",value:function(){var t=this.w,e=t.config,i=this.opts,a=[];return t.globals.comboCharts?"line"===t.config.series[this.seriesIndex].type?Array.isArray(t.globals.stroke.colors)?a=t.globals.stroke.colors:a.push(t.globals.stroke.colors):Array.isArray(t.globals.fill.colors)?a=t.globals.fill.colors:a.push(t.globals.fill.colors):"line"===e.chart.type?Array.isArray(t.globals.stroke.colors)?a=t.globals.stroke.colors:a.push(t.globals.stroke.colors):Array.isArray(t.globals.fill.colors)?a=t.globals.fill.colors:a.push(t.globals.fill.colors),void 0!==i.fillColors&&(a=[],Array.isArray(i.fillColors)?a=i.fillColors.slice():a.push(i.fillColors)),a}},{key:"handlePatternFill",value:function(t,e,i,a){var s=this.w.config,r=this.opts,o=new b(this.ctx),n=void 0===s.fill.pattern.strokeWidth?Array.isArray(s.stroke.width)?s.stroke.width[this.seriesIndex]:s.stroke.width:Array.isArray(s.fill.pattern.strokeWidth)?s.fill.pattern.strokeWidth[this.seriesIndex]:s.fill.pattern.strokeWidth,l=e;Array.isArray(s.fill.pattern.style)?t=void 0!==s.fill.pattern.style[r.seriesNumber]?o.drawPattern(s.fill.pattern.style[r.seriesNumber],s.fill.pattern.width,s.fill.pattern.height,l,n,i):a:t=o.drawPattern(s.fill.pattern.style,s.fill.pattern.width,s.fill.pattern.height,l,n,i);return t}},{key:"handleGradientFill",value:function(t,e,i){var a,s=this.w.config,r=this.opts,o=new b(this.ctx),n=new p,l=s.fill.gradient.type,h=t,c=void 0===s.fill.gradient.opacityFrom?e:Array.isArray(s.fill.gradient.opacityFrom)?s.fill.gradient.opacityFrom[i]:s.fill.gradient.opacityFrom;h.indexOf("rgba")>-1&&(c=p.getOpacityFromRGBA(h));var d=void 0===s.fill.gradient.opacityTo?e:Array.isArray(s.fill.gradient.opacityTo)?s.fill.gradient.opacityTo[i]:s.fill.gradient.opacityTo;if(void 0===s.fill.gradient.gradientToColors||0===s.fill.gradient.gradientToColors.length)a="dark"===s.fill.gradient.shade?n.shadeColor(-1*parseFloat(s.fill.gradient.shadeIntensity),t.indexOf("rgb")>-1?p.rgb2hex(t):t):n.shadeColor(parseFloat(s.fill.gradient.shadeIntensity),t.indexOf("rgb")>-1?p.rgb2hex(t):t);else if(s.fill.gradient.gradientToColors[r.seriesNumber]){var g=s.fill.gradient.gradientToColors[r.seriesNumber];a=g,g.indexOf("rgba")>-1&&(d=p.getOpacityFromRGBA(g))}else a=t;if(s.fill.gradient.inverseColors){var u=h;h=a,a=u}return h.indexOf("rgb")>-1&&(h=p.rgb2hex(h)),a.indexOf("rgb")>-1&&(a=p.rgb2hex(a)),o.drawGradient(l,h,a,c,d,r.size,s.fill.gradient.stops,s.fill.gradient.colorStops,i)}}]),t}(),P=function(){function t(i,a){e(this,t),this.ctx=i,this.w=i.w}return a(t,[{key:"setGlobalMarkerSize",value:function(){var t=this.w;if(t.globals.markers.size=Array.isArray(t.config.markers.size)?t.config.markers.size:[t.config.markers.size],t.globals.markers.size.length>0){if(t.globals.markers.size.length<t.globals.series.length+1)for(var e=0;e<=t.globals.series.length;e++)void 0===t.globals.markers.size[e]&&t.globals.markers.size.push(t.globals.markers.size[0])}else t.globals.markers.size=t.config.series.map((function(e){return t.config.markers.size}))}},{key:"plotChartMarkers",value:function(t,e,i,a){var s,r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=this.w,n=e,l=t,h=null,c=new b(this.ctx);if((o.globals.markers.size[e]>0||r)&&(h=c.group({class:r?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(o.globals.cuid,")")),Array.isArray(l.x))for(var d=0;d<l.x.length;d++){var g=i;1===i&&0===d&&(g=0),1===i&&1===d&&(g=1);var u="apexcharts-marker";"line"!==o.config.chart.type&&"area"!==o.config.chart.type||o.globals.comboCharts||o.config.tooltip.intersect||(u+=" no-pointer-events");var f=Array.isArray(o.config.markers.size)?o.globals.markers.size[e]>0:o.config.markers.size>0;if(f||r){p.isNumber(l.y[d])?u+=" w".concat(p.randomId()):u="apexcharts-nullpoint";var m=this.getMarkerConfig(u,e,g);o.config.series[n].data[g]&&(o.config.series[n].data[g].fillColor&&(m.pointFillColor=o.config.series[n].data[g].fillColor),o.config.series[n].data[g].strokeColor&&(m.pointStrokeColor=o.config.series[n].data[g].strokeColor)),a&&(m.pSize=a),(s=c.drawMarker(l.x[d],l.y[d],m)).attr("rel",g),s.attr("j",g),s.attr("index",e),s.node.setAttribute("default-marker-size",m.pSize);var v=new x(this.ctx);v.setSelectionFilter(s,e,g),this.addEvents(s),h&&h.add(s)}else void 0===o.globals.pointsArray[e]&&(o.globals.pointsArray[e]=[]),o.globals.pointsArray[e].push([l.x[d],l.y[d]])}return h}},{key:"getMarkerConfig",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=this.getMarkerStyle(e),r=a.globals.markers.size[e],o=a.config.markers;return null!==i&&o.discrete.length&&o.discrete.map((function(t){t.seriesIndex===e&&t.dataPointIndex===i&&(s.pointStrokeColor=t.strokeColor,s.pointFillColor=t.fillColor,r=t.size,s.pointShape=t.shape)})),{pSize:r,pRadius:o.radius,width:Array.isArray(o.width)?o.width[e]:o.width,height:Array.isArray(o.height)?o.height[e]:o.height,pointStrokeWidth:Array.isArray(o.strokeWidth)?o.strokeWidth[e]:o.strokeWidth,pointStrokeColor:s.pointStrokeColor,pointFillColor:s.pointFillColor,shape:s.pointShape||(Array.isArray(o.shape)?o.shape[e]:o.shape),class:t,pointStrokeOpacity:Array.isArray(o.strokeOpacity)?o.strokeOpacity[e]:o.strokeOpacity,pointStrokeDashArray:Array.isArray(o.strokeDashArray)?o.strokeDashArray[e]:o.strokeDashArray,pointFillOpacity:Array.isArray(o.fillOpacity)?o.fillOpacity[e]:o.fillOpacity,seriesIndex:e}}},{key:"addEvents",value:function(t){var e=this.w,i=new b(this.ctx);t.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",i.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",i.pathMouseDown.bind(this.ctx,t),{passive:!0})}},{key:"getMarkerStyle",value:function(t){var e=this.w,i=e.globals.markers.colors,a=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(a)?a[t]:a,pointFillColor:Array.isArray(i)?i[t]:i}}}]),t}(),T=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled}return a(t,[{key:"draw",value:function(t,e,i){var a=this.w,s=new b(this.ctx),r=i.realIndex,o=i.pointsPos,n=i.zRatio,l=i.elParent,h=s.group({class:"apexcharts-series-markers apexcharts-series-".concat(a.config.chart.type)});if(h.attr("clip-path","url(#gridRectMarkerMask".concat(a.globals.cuid,")")),Array.isArray(o.x))for(var c=0;c<o.x.length;c++){var d=e+1,g=!0;0===e&&0===c&&(d=0),0===e&&1===c&&(d=1);var u=0,p=a.globals.markers.size[r];if(n!==1/0){p=a.globals.seriesZ[r][d]/n;var f=a.config.plotOptions.bubble;f.minBubbleRadius&&p<f.minBubbleRadius&&(p=f.minBubbleRadius),f.maxBubbleRadius&&p>f.maxBubbleRadius&&(p=f.maxBubbleRadius)}a.config.chart.animations.enabled||(u=p);var x=o.x[c],m=o.y[c];if(u=u||0,null!==m&&void 0!==a.globals.series[r][d]||(g=!1),g){var v=this.drawPoint(x,m,u,p,r,d,e);h.add(v)}l.add(h)}}},{key:"drawPoint",value:function(t,e,i,a,s,r,o){var n,l=this.w,h=s,c=new f(this.ctx),d=new x(this.ctx),g=new L(this.ctx),u=new P(this.ctx),p=new b(this.ctx),m=u.getMarkerConfig("apexcharts-marker",h),v=g.fillPath({seriesNumber:s,dataPointIndex:r,patternUnits:"objectBoundingBox",value:l.globals.series[s][o]});if("circle"===m.shape?n=p.drawCircle(i):"square"!==m.shape&&"rect"!==m.shape||(n=p.drawRect(0,0,m.width-m.pointStrokeWidth/2,m.height-m.pointStrokeWidth/2,m.pRadius)),l.config.series[h].data[r]&&l.config.series[h].data[r].fillColor&&(v=l.config.series[h].data[r].fillColor),n.attr({x:t-m.width/2-m.pointStrokeWidth/2,y:e-m.height/2-m.pointStrokeWidth/2,cx:t,cy:e,fill:v,"fill-opacity":m.pointFillOpacity,stroke:m.pointStrokeColor,r:a,"stroke-width":m.pointStrokeWidth,"stroke-dasharray":m.pointStrokeDashArray,"stroke-opacity":m.pointStrokeOpacity}),l.config.chart.dropShadow.enabled){var y=l.config.chart.dropShadow;d.dropShadow(n,y,s)}if(!this.initialAnim||l.globals.dataChanged||l.globals.resized)l.globals.animationEnded=!0;else{var w=l.config.chart.animations.speed;c.animateMarker(n,0,"circle"===m.shape?a:{width:m.width,height:m.height},w,l.globals.easing,(function(){window.setTimeout((function(){c.animationCompleted(n)}),100)}))}if(l.globals.dataChanged&&"circle"===m.shape)if(this.dynamicAnim){var k,A,S,C,T=l.config.chart.animations.dynamicAnimation.speed;null!=(C=l.globals.previousPaths[s]&&l.globals.previousPaths[s][o])&&(k=C.x,A=C.y,S=void 0!==C.r?C.r:a);for(var M=0;M<l.globals.collapsedSeries.length;M++)l.globals.collapsedSeries[M].index===s&&(T=1,a=0);0===t&&0===e&&(a=0),c.animateCircle(n,{cx:k,cy:A,r:S},{cx:t,cy:e,r:a},T,l.globals.easing)}else n.attr({r:a});return n.attr({rel:r,j:r,index:s,"default-marker-size":a}),d.setSelectionFilter(n,s,r),u.addEvents(n),n.node.classList.add("apexcharts-marker"),n}},{key:"centerTextInBubble",value:function(t){var e=this.w;return{y:t+=parseInt(e.config.dataLabels.style.fontSize,10)/4}}}]),t}(),M=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w}return a(t,[{key:"dataLabelsCorrection",value:function(t,e,i,a,s,r,o){var n=this.w,l=!1,h=new b(this.ctx).getTextRects(i,o),c=h.width,d=h.height;e<0&&(e=0),e>n.globals.gridHeight+d&&(e=n.globals.gridHeight+d/2),void 0===n.globals.dataLabelsRects[a]&&(n.globals.dataLabelsRects[a]=[]),n.globals.dataLabelsRects[a].push({x:t,y:e,width:c,height:d});var g=n.globals.dataLabelsRects[a].length-2,u=void 0!==n.globals.lastDrawnDataLabelsIndexes[a]?n.globals.lastDrawnDataLabelsIndexes[a][n.globals.lastDrawnDataLabelsIndexes[a].length-1]:0;if(void 0!==n.globals.dataLabelsRects[a][g]){var p=n.globals.dataLabelsRects[a][u];(t>p.x+p.width+2||e>p.y+p.height+2||t+c<p.x)&&(l=!0)}return(0===s||r)&&(l=!0),{x:t,y:e,textRects:h,drawnextLabel:l}}},{key:"drawDataLabel",value:function(t,e,i){var a=this,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2,r=this.w,o=new b(this.ctx),n=r.config.dataLabels,l=0,h=0,c=i,d=null;if(!n.enabled||!Array.isArray(t.x))return d;d=o.group({class:"apexcharts-data-labels"});for(var g=0;g<t.x.length;g++)if(l=t.x[g]+n.offsetX,h=t.y[g]+n.offsetY+s,!isNaN(l)){1===i&&0===g&&(c=0),1===i&&1===g&&(c=1);var u=r.globals.series[e][c],p="",f=function(t){return r.config.dataLabels.formatter(t,{ctx:a.ctx,seriesIndex:e,dataPointIndex:c,w:r})};if("bubble"===r.config.chart.type){p=f(u=r.globals.seriesZ[e][c]),h=t.y[g];var x=new T(this.ctx),m=x.centerTextInBubble(h,e,c);h=m.y}else void 0!==u&&(p=f(u));this.plotDataLabelsText({x:l,y:h,text:p,i:e,j:c,parent:d,offsetCorrection:!0,dataLabelsConfig:r.config.dataLabels})}return d}},{key:"plotDataLabelsText",value:function(t){var e=this.w,i=new b(this.ctx),a=t.x,s=t.y,r=t.i,o=t.j,n=t.text,l=t.textAnchor,h=t.fontSize,c=t.parent,d=t.dataLabelsConfig,g=t.color,u=t.alwaysDrawDataLabel,p=t.offsetCorrection;if(!(Array.isArray(e.config.dataLabels.enabledOnSeries)&&e.config.dataLabels.enabledOnSeries.indexOf(r)<0)){var f={x:a,y:s,drawnextLabel:!0};p&&(f=this.dataLabelsCorrection(a,s,n,r,o,u,parseInt(d.style.fontSize,10))),e.globals.zoomed||(a=f.x,s=f.y),f.textRects&&(a<-10-f.textRects.width||a>e.globals.gridWidth+f.textRects.width+10)&&(n="");var m=e.globals.dataLabels.style.colors[r];(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(m=e.globals.dataLabels.style.colors[o]),"function"==typeof m&&(m=m({series:e.globals.series,seriesIndex:r,dataPointIndex:o,w:e})),g&&(m=g);var v=d.offsetX,y=d.offsetY;if("bar"!==e.config.chart.type&&"rangeBar"!==e.config.chart.type||(v=0,y=0),f.drawnextLabel){var w=i.drawText({width:100,height:parseInt(d.style.fontSize,10),x:a+v,y:s+y,foreColor:m,textAnchor:l||d.textAnchor,text:n,fontSize:h||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"});if(w.attr({class:"apexcharts-datalabel",cx:a,cy:s}),d.dropShadow.enabled){var k=d.dropShadow;new x(this.ctx).dropShadow(w,k)}c.add(w),void 0===e.globals.lastDrawnDataLabelsIndexes[r]&&(e.globals.lastDrawnDataLabelsIndexes[r]=[]),e.globals.lastDrawnDataLabelsIndexes[r].push(o)}}}},{key:"addBackgroundToDataLabel",value:function(t,e){var i=this.w,a=i.config.dataLabels.background,s=a.padding,r=a.padding/2,o=e.width,n=e.height,l=new b(this.ctx).drawRect(e.x-s,e.y-r/2,o+2*s,n+r,a.borderRadius,"transparent"===i.config.chart.background?"#fff":i.config.chart.background,a.opacity,a.borderWidth,a.borderColor);a.dropShadow.enabled&&new x(this.ctx).dropShadow(l,a.dropShadow);return l}},{key:"dataLabelsBackground",value:function(){var t=this.w;if("bubble"!==t.config.chart.type)for(var e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),i=0;i<e.length;i++){var a=e[i],s=a.getBBox(),r=null;if(s.width&&s.height&&(r=this.addBackgroundToDataLabel(a,s)),r){a.parentNode.insertBefore(r.node,a);var o=a.getAttribute("fill");t.config.chart.animations.enabled&&!t.globals.resized&&!t.globals.dataChanged?r.animate().attr({fill:o}):r.attr({fill:o}),a.setAttribute("fill",t.config.dataLabels.background.foreColor)}}}},{key:"bringForward",value:function(){for(var t=this.w,e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels"),i=t.globals.dom.baseEl.querySelector(".apexcharts-plot-series:last-child"),a=0;a<e.length;a++)i&&i.insertBefore(e[a],i.nextSibling)}}]),t}(),I=function(){function t(i){e(this,t),this.w=i.w,this.barCtx=i}return a(t,[{key:"handleBarDataLabels",value:function(t){var e=t.x,i=t.y,a=t.y1,s=t.y2,r=t.i,o=t.j,n=t.realIndex,l=t.series,h=t.barHeight,c=t.barWidth,d=t.barYPosition,g=t.visibleSeries,u=t.renderedPath,p=this.w,f=new b(this.barCtx.ctx),x=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[n]:this.barCtx.strokeWidth,m=e+parseFloat(c*g),v=i+parseFloat(h*g);p.globals.isXNumeric&&!p.globals.isBarHorizontal&&(m=e+parseFloat(c*(g+1)),v=i+parseFloat(h*(g+1))-x);var y=e,w=i,k={},A=p.config.dataLabels,S=this.barCtx.barOptions.dataLabels;void 0!==d&&this.barCtx.isTimelineBar&&(v=d,w=d);var C=A.offsetX,L=A.offsetY,P={width:0,height:0};if(p.config.dataLabels.enabled){var T=this.barCtx.series[r][o];P=f.getTextRects(p.globals.yLabelFormatters[0](T),parseFloat(A.style.fontSize))}var M={x:e,y:i,i:r,j:o,renderedPath:u,bcx:m,bcy:v,barHeight:h,barWidth:c,textRects:P,strokeWidth:x,dataLabelsX:y,dataLabelsY:w,barDataLabelsConfig:S,offX:C,offY:L};return k=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(M):this.calculateColumnsDataLabelsPosition(M),u.attr({cy:k.bcy,cx:k.bcx,j:o,val:l[r][o],barHeight:h,barWidth:c}),this.drawCalculatedDataLabels({x:k.dataLabelsX,y:k.dataLabelsY,val:this.barCtx.isTimelineBar?[a,s]:l[r][o],i:n,j:o,barWidth:c,barHeight:h,textRects:P,dataLabelsConfig:A})}},{key:"calculateColumnsDataLabelsPosition",value:function(t){var e,i=this.w,a=t.i,s=t.j,r=t.y,o=t.bcx,n=t.barWidth,l=t.barHeight,h=t.textRects,c=t.dataLabelsY,d=t.barDataLabelsConfig,g=t.strokeWidth,u=t.offX,p=t.offY;l=Math.abs(l);var f="vertical"===i.config.plotOptions.bar.dataLabels.orientation;o-=g/2;var x=i.globals.gridWidth/i.globals.dataPoints;if(e=i.globals.isXNumeric?o-n/2+u:o-x+n/2+u,f){e=e+h.height/2-g/2-2}var b=this.barCtx.series[a][s]<0,m=r;switch(this.barCtx.isReversed&&(m=r-l+(b?2*l:0),r-=l),d.position){case"center":c=f?b?m+l/2+p:m+l/2-p:b?m-l/2+h.height/2+p:m+l/2+h.height/2-p;break;case"bottom":c=f?b?m+l+p:m+l-p:b?m-l+h.height+g+p:m+l-h.height/2+g-p;break;case"top":c=f?b?m+p:m-p:b?m-h.height/2-p:m+h.height+p}return i.config.chart.stacked||(c<0?c=0+g:c+h.height/3>i.globals.gridHeight&&(c=i.globals.gridHeight-g)),{bcx:o,bcy:r,dataLabelsX:e,dataLabelsY:c}}},{key:"calculateBarsDataLabelsPosition",value:function(t){var e=this.w,i=t.x,a=t.i,s=t.j,r=t.bcy,o=t.barHeight,n=t.barWidth,l=t.textRects,h=t.dataLabelsX,c=t.strokeWidth,d=t.barDataLabelsConfig,g=t.offX,u=t.offY,p=e.globals.gridHeight/e.globals.dataPoints;n=Math.abs(n);var f=r-(this.barCtx.isTimelineBar?0:p)+o/2+l.height/2+u-3,x=this.barCtx.series[a][s]<0,b=i;switch(this.barCtx.isReversed&&(b=i+n-(x?2*n:0),i=e.globals.gridWidth-n),d.position){case"center":h=x?b+n/2-g:Math.max(l.width/2,b-n/2)+g;break;case"bottom":h=x?b+n-c-Math.round(l.width/2)-g:b-n+c+Math.round(l.width/2)+g;break;case"top":h=x?b-c+Math.round(l.width/2)-g:b-c-Math.round(l.width/2)+g}return e.config.chart.stacked||(h<0?h=h+l.width+c:h+l.width/2>e.globals.gridWidth&&(h=e.globals.gridWidth-l.width-c)),{bcx:i,bcy:r,dataLabelsX:h,dataLabelsY:f}}},{key:"drawCalculatedDataLabels",value:function(t){var e=t.x,i=t.y,a=t.val,s=t.i,r=t.j,n=t.textRects,l=t.barHeight,h=t.barWidth,c=t.dataLabelsConfig,d=this.w,g="rotate(0)";"vertical"===d.config.plotOptions.bar.dataLabels.orientation&&(g="rotate(-90, ".concat(e,", ").concat(i,")"));var u=new M(this.barCtx.ctx),p=new b(this.barCtx.ctx),f=c.formatter,x=null,m=d.globals.collapsedSeriesIndices.indexOf(s)>-1;if(c.enabled&&!m){x=p.group({class:"apexcharts-data-labels",transform:g});var v="";void 0!==a&&(v=f(a,{seriesIndex:s,dataPointIndex:r,w:d}));var y=d.globals.series[s][r]<0,w=d.config.plotOptions.bar.dataLabels.position;if("vertical"===d.config.plotOptions.bar.dataLabels.orientation&&("top"===w&&(c.textAnchor=y?"end":"start"),"center"===w&&(c.textAnchor="middle"),"bottom"===w&&(c.textAnchor=y?"end":"start")),this.barCtx.isTimelineBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels)h<p.getTextRects(v,parseFloat(c.style.fontSize)).width&&(v="");d.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&(this.barCtx.isHorizontal?(h>0&&n.width/1.6>h||h<0&&n.width/1.6<h)&&(v=""):n.height/1.6>l&&(v=""));var k=o({},c);this.barCtx.isHorizontal&&a<0&&("start"===c.textAnchor?k.textAnchor="end":"end"===c.textAnchor&&(k.textAnchor="start")),u.plotDataLabelsText({x:e,y:i,text:v,i:s,j:r,parent:x,dataLabelsConfig:k,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return x}}]),t}(),z=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w,this.legendInactiveClass="legend-mouseover-inactive"}return a(t,[{key:"getAllSeriesEls",value:function(){return this.w.globals.dom.baseEl.getElementsByClassName("apexcharts-series")}},{key:"getSeriesByName",value:function(t){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner .apexcharts-series[seriesName='".concat(p.escapeString(t),"']"))}},{key:"isSeriesHidden",value:function(t){var e=this.getSeriesByName(t),i=parseInt(e.getAttribute("data:realIndex"),10);return{isHidden:e.classList.contains("apexcharts-series-collapsed"),realIndex:i}}},{key:"addCollapsedClassToSeries",value:function(t,e){var i=this.w;function a(i){for(var a=0;a<i.length;a++)i[a].index===e&&t.node.classList.add("apexcharts-series-collapsed")}a(i.globals.collapsedSeries),a(i.globals.ancillaryCollapsedSeries)}},{key:"toggleSeries",value:function(t){var e=this.isSeriesHidden(t);return this.ctx.legend.legendHelpers.toggleDataSeries(e.realIndex,e.isHidden),e.isHidden}},{key:"showSeries",value:function(t){var e=this.isSeriesHidden(t);e.isHidden&&this.ctx.legend.legendHelpers.toggleDataSeries(e.realIndex,!0)}},{key:"hideSeries",value:function(t){var e=this.isSeriesHidden(t);e.isHidden||this.ctx.legend.legendHelpers.toggleDataSeries(e.realIndex,!1)}},{key:"resetSeries",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w,s=p.clone(a.globals.initialSeries);a.globals.previousPaths=[],i?(a.globals.collapsedSeries=[],a.globals.ancillaryCollapsedSeries=[],a.globals.collapsedSeriesIndices=[],a.globals.ancillaryCollapsedSeriesIndices=[]):s=this.emptyCollapsedSeries(s),a.config.series=s,t&&(e&&(a.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(s,a.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(t){for(var e=this.w,i=0;i<t.length;i++)e.globals.collapsedSeriesIndices.indexOf(i)>-1&&(t[i].data=[]);return t}},{key:"toggleSeriesOnHover",value:function(t,e){var i=this.w,a=i.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels");if("mousemove"===t.type){var s=parseInt(e.getAttribute("rel"),10)-1,r=null,o=null;i.globals.axisCharts||"radialBar"===i.config.chart.type?i.globals.axisCharts?(r=i.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(s,"']")),o=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(s,"']"))):r=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(s+1,"']")):r=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(s+1,"'] path"));for(var n=0;n<a.length;n++)a[n].classList.add(this.legendInactiveClass);null!==r&&(i.globals.axisCharts||r.parentNode.classList.remove(this.legendInactiveClass),r.classList.remove(this.legendInactiveClass),null!==o&&o.classList.remove(this.legendInactiveClass))}else if("mouseout"===t.type)for(var l=0;l<a.length;l++)a[l].classList.remove(this.legendInactiveClass)}},{key:"highlightRangeInSeries",value:function(t,e){var i=this,a=this.w,s=a.globals.dom.baseEl.getElementsByClassName("apexcharts-heatmap-rect"),r=function(t){for(var e=0;e<s.length;e++)s[e].classList[t](i.legendInactiveClass)};if("mousemove"===t.type){var o=parseInt(e.getAttribute("rel"),10)-1;r("add"),function(t){for(var e=0;e<s.length;e++){var a=parseInt(s[e].getAttribute("val"),10);a>=t.from&&a<=t.to&&s[e].classList.remove(i.legendInactiveClass)}}(a.config.plotOptions.heatmap.colorScale.ranges[o])}else"mouseout"===t.type&&r("remove")}},{key:"getActiveConfigSeriesIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc",i=this.w,a=0;if(i.config.series.length>1)for(var s=i.config.series.map((function(e,a){var s=!1;return t&&(s="bar"===i.config.series[a].type||"column"===i.config.series[a].type),e.data&&e.data.length>0&&!s?a:-1})),r="asc"===e?0:s.length-1;"asc"===e?r<s.length:r>=0;"asc"===e?r++:r--)if(-1!==s[r]){a=s[r];break}return a}},{key:"getPreviousPaths",value:function(){var t=this.w;function e(e,i,a){for(var s=e[i].childNodes,r={type:a,paths:[],realIndex:e[i].getAttribute("data:realIndex")},o=0;o<s.length;o++)if(s[o].hasAttribute("pathTo")){var n=s[o].getAttribute("pathTo");r.paths.push({d:n})}t.globals.previousPaths.push(r)}t.globals.previousPaths=[];["line","area","bar","rangebar","candlestick","radar"].forEach((function(i){for(var a,s=(a=i,t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(a,"-series .apexcharts-series"))),r=0;r<s.length;r++)e(s,r,i)})),this.handlePrevBubbleScatterPaths("bubble"),this.handlePrevBubbleScatterPaths("scatter");var i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t.config.chart.type," .apexcharts-series"));if(i.length>0)for(var a=function(e){for(var i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(e,"'] rect")),a=[],s=function(t){var e=function(e){return i[t].getAttribute(e)},s={x:parseFloat(e("x")),y:parseFloat(e("y")),width:parseFloat(e("width")),height:parseFloat(e("height"))};a.push({rect:s,color:i[t].getAttribute("color")})},r=0;r<i.length;r++)s(r);t.globals.previousPaths.push(a)},s=0;s<i.length;s++)a(s);t.globals.axisCharts||(t.globals.previousPaths=t.globals.series)}},{key:"handlePrevBubbleScatterPaths",value:function(t){var e=this.w,i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t,"-series .apexcharts-series"));if(i.length>0)for(var a=0;a<i.length;a++){for(var s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t,"-series .apexcharts-series[data\\:realIndex='").concat(a,"'] circle")),r=[],o=0;o<s.length;o++)r.push({x:s[o].getAttribute("cx"),y:s[o].getAttribute("cy"),r:s[o].getAttribute("r")});e.globals.previousPaths.push(r)}}},{key:"clearPreviousPaths",value:function(){var t=this.w;t.globals.previousPaths=[],t.globals.allSeriesCollapsed=!1}},{key:"handleNoData",value:function(){var t=this.w,e=t.config.noData,i=new b(this.ctx),a=t.globals.svgWidth/2,s=t.globals.svgHeight/2,r="middle";if(t.globals.noData=!0,t.globals.animationEnded=!0,"left"===e.align?(a=10,r="start"):"right"===e.align&&(a=t.globals.svgWidth-10,r="end"),"top"===e.verticalAlign?s=50:"bottom"===e.verticalAlign&&(s=t.globals.svgHeight-50),a+=e.offsetX,s=s+parseInt(e.style.fontSize,10)+2+e.offsetY,void 0!==e.text&&""!==e.text){var o=i.drawText({x:a,y:s,text:e.text,textAnchor:r,fontSize:e.style.fontSize,fontFamily:e.style.fontFamily,foreColor:e.style.color,opacity:1,class:"apexcharts-text-nodata"});t.globals.dom.Paper.add(o)}}},{key:"setNullSeriesToZeroValues",value:function(t){for(var e=this.w,i=0;i<t.length;i++)if(0===t[i].length)for(var a=0;a<t[e.globals.maxValsInArrayIndex].length;a++)t[i].push(0);return t}},{key:"hasAllSeriesEqualX",value:function(){for(var t=!0,e=this.w,i=this.filteredSeriesX(),a=0;a<i.length-1;a++)if(i[a][0]!==i[a+1][0]){t=!1;break}return e.globals.allSeriesHasEqualX=t,t}},{key:"filteredSeriesX",value:function(){var t=this.w.globals.seriesX.map((function(t){return t.length>0?t:[]}));return t}}]),t}(),X=function(){function t(i){e(this,t),this.w=i.w,this.barCtx=i}return a(t,[{key:"initVariables",value:function(t){var e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var i=0;i<t.length;i++)if(t[i].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[i].length),e.globals.isXNumeric)for(var a=0;a<t[i].length;a++)e.globals.seriesX[i][a]>e.globals.minX&&e.globals.seriesX[i][a]<e.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=e.globals.dataPoints;0===this.barCtx.seriesLen&&(this.barCtx.seriesLen=1),this.barCtx.zeroSerieses=[],this.barCtx.radiusOnSeriesNumber=t.length-1,e.globals.comboCharts||this.checkZeroSeries({series:t})}},{key:"initialPositions",value:function(){var t,e,i,a,s,r,o,n,l=this.w,h=l.globals.dataPoints;this.barCtx.isTimelineBar&&(h=l.globals.labels.length);var c=this.barCtx.seriesLen;if(l.config.plotOptions.bar.rangeBarGroupRows&&(c=1),this.barCtx.isHorizontal)s=(i=l.globals.gridHeight/h)/c,l.globals.isXNumeric&&(s=(i=l.globals.gridHeight/this.barCtx.totalItems)/this.barCtx.seriesLen),s=s*parseInt(this.barCtx.barOptions.barHeight,10)/100,n=this.barCtx.baseLineInvertedY+l.globals.padHorizontal+(this.barCtx.isReversed?l.globals.gridWidth:0)-(this.barCtx.isReversed?2*this.barCtx.baseLineInvertedY:0),e=(i-s*this.barCtx.seriesLen)/2;else{if(a=l.globals.gridWidth/this.barCtx.visibleItems,l.config.xaxis.convertedCatToNumeric&&(a=l.globals.gridWidth/l.globals.dataPoints),r=a/this.barCtx.seriesLen*parseInt(this.barCtx.barOptions.columnWidth,10)/100,l.globals.isXNumeric){var d=this.barCtx.xRatio;l.config.xaxis.convertedCatToNumeric&&(d=this.barCtx.initialXRatio),l.globals.minXDiff&&.5!==l.globals.minXDiff&&l.globals.minXDiff/d>0&&(a=l.globals.minXDiff/d),(r=a/this.barCtx.seriesLen*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(r=1)}o=l.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.yaxisIndex]-(this.barCtx.isReversed?l.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.yaxisIndex]:0),t=l.globals.padHorizontal+(a-r*this.barCtx.seriesLen)/2}return{x:t,y:e,yDivision:i,xDivision:a,barHeight:s,barWidth:r,zeroH:o,zeroW:n}}}
60674,{key:"getPathFillColor",value:function(t,e,i,a){var s=this.w,r=new L(this.barCtx.ctx),o=null,n=this.barCtx.barOptions.distributed?i:e;this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((function(a){t[e][i]>=a.from&&t[e][i]<=a.to&&(o=a.color)}));return s.config.series[e].data[i]&&s.config.series[e].data[i].fillColor&&(o=s.config.series[e].data[i].fillColor),r.fillPath({seriesNumber:this.barCtx.barOptions.distributed?n:a,dataPointIndex:i,color:o,value:t[e][i]})}},{key:"getStrokeWidth",value:function(t,e,i){var a=0,s=this.w;return void 0===this.barCtx.series[t][e]||null===this.barCtx.series[t][e]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,s.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[i]:this.barCtx.strokeWidth)),a}},{key:"barBackground",value:function(t){var e=t.j,i=t.i,a=t.x1,s=t.x2,r=t.y1,o=t.y2,n=t.elSeries,l=this.w,h=new b(this.barCtx.ctx),c=new z(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&c===i){e>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(e-=this.barCtx.barOptions.colors.backgroundBarColors.length);var d=this.barCtx.barOptions.colors.backgroundBarColors[e],g=h.drawRect(void 0!==a?a:0,void 0!==r?r:0,void 0!==s?s:l.globals.gridWidth,void 0!==o?o:l.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,d,this.barCtx.barOptions.colors.backgroundBarOpacity);n.add(g),g.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(t){var e=t.barWidth,i=t.barXPosition,a=t.yRatio,s=t.y1,r=t.y2,o=t.strokeWidth,n=t.series,l=t.realIndex,h=t.i,c=t.j,d=t.w,g=new b(this.barCtx.ctx);(o=Array.isArray(o)?o[l]:o)||(o=0);var u={barWidth:e,strokeWidth:o,yRatio:a,barXPosition:i,y1:s,y2:r},p=this.getRoundedBars(d,u,n,h,c),f=i,x=i+e,m=g.move(f,s),v=g.move(f,s),y=g.line(x-o,s);return d.globals.previousPaths.length>0&&(v=this.barCtx.getPreviousPath(l,c,!1)),m=m+g.line(f,p.y2)+p.pathWithRadius+g.line(x-o,p.y2)+y+y+"z",v=v+g.line(f,s)+y+y+y+y+y+g.line(f,s),d.config.chart.stacked&&(this.barCtx.yArrj.push(p.y2),this.barCtx.yArrjF.push(Math.abs(s-p.y2)),this.barCtx.yArrjVal.push(this.barCtx.series[h][c])),{pathTo:m,pathFrom:v}}},{key:"getBarpaths",value:function(t){var e=t.barYPosition,i=t.barHeight,a=t.x1,s=t.x2,r=t.strokeWidth,o=t.series,n=t.realIndex,l=t.i,h=t.j,c=t.w,d=new b(this.barCtx.ctx);(r=Array.isArray(r)?r[n]:r)||(r=0);var g={barHeight:i,strokeWidth:r,barYPosition:e,x2:s,x1:a},u=this.getRoundedBars(c,g,o,l,h),p=d.move(a,e),f=d.move(a,e);c.globals.previousPaths.length>0&&(f=this.barCtx.getPreviousPath(n,h,!1));var x=e,m=e+i,v=d.line(a,m-r);return p=p+d.line(u.x2,x)+u.pathWithRadius+d.line(u.x2,m-r)+v+v+"z",f=f+d.line(a,x)+v+v+v+v+v+d.line(a,x),c.config.chart.stacked&&(this.barCtx.xArrj.push(u.x2),this.barCtx.xArrjF.push(Math.abs(a-u.x2)),this.barCtx.xArrjVal.push(this.barCtx.series[l][h])),{pathTo:p,pathFrom:f}}},{key:"getRoundedBars",value:function(t,e,i,a,s){var r=new b(this.barCtx.ctx),o=0,n=t.config.plotOptions.bar.borderRadius,l=Array.isArray(n);l?o=n[a>n.length-1?n.length-1:a]:o=n;if(t.config.chart.stacked&&i.length>1&&a!==this.barCtx.radiusOnSeriesNumber&&!l&&(o=0),this.barCtx.isHorizontal){var h="",c=e.x2;if(Math.abs(e.x1-e.x2)<o&&(o=Math.abs(e.x1-e.x2)),void 0!==i[a][s]||null!==i[a][s]){var d=this.barCtx.isReversed?i[a][s]>0:i[a][s]<0;d&&(o*=-1),c-=o,h=r.quadraticCurve(c+o,e.barYPosition,c+o,e.barYPosition+(d?-1*o:o))+r.line(c+o,e.barYPosition+e.barHeight-e.strokeWidth-(d?-1*o:o))+r.quadraticCurve(c+o,e.barYPosition+e.barHeight-e.strokeWidth,c,e.barYPosition+e.barHeight-e.strokeWidth)}return{pathWithRadius:h,x2:c}}var g="",u=e.y2;if(Math.abs(e.y1-e.y2)<o&&(o=Math.abs(e.y1-e.y2)),void 0!==i[a][s]||null!==i[a][s]){var p=i[a][s]<0;p&&(o*=-1),u+=o,g=r.quadraticCurve(e.barXPosition,u-o,e.barXPosition+(p?-1*o:o),u-o)+r.line(e.barXPosition+e.barWidth-e.strokeWidth-(p?-1*o:o),u-o)+r.quadraticCurve(e.barXPosition+e.barWidth-e.strokeWidth,u-o,e.barXPosition+e.barWidth-e.strokeWidth,u)}return{pathWithRadius:g,y2:u}}},{key:"checkZeroSeries",value:function(t){for(var e=t.series,i=this.w,a=0;a<e.length;a++){for(var s=0,r=0;r<e[i.globals.maxValsInArrayIndex].length;r++)s+=e[a][r];0===s&&this.barCtx.zeroSerieses.push(a)}for(var o=e.length-1;o>=0;o--)this.barCtx.zeroSerieses.indexOf(o)>-1&&o===this.radiusOnSeriesNumber&&(this.barCtx.radiusOnSeriesNumber-=1);for(var n=e.length-1;n>=0;n--)i.globals.collapsedSeriesIndices.indexOf(this.barCtx.radiusOnSeriesNumber)>-1&&(this.barCtx.radiusOnSeriesNumber-=1)}},{key:"getXForValue",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=i?e:null;return null!=t&&(a=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),a}},{key:"getYForValue",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=i?e:null;return null!=t&&(a=e-t/this.barCtx.yRatio[this.barCtx.yaxisIndex]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[this.barCtx.yaxisIndex]:0)),a}}
vendor: 10,226 bytes, line 60674
60674,{key:"getGoalValues",value:function(t,e,i,a,r){var o=this,n=this.w,l=[];return n.globals.seriesGoals[a]&&n.globals.seriesGoals[a][r]&&Array.isArray(n.globals.seriesGoals[a][r])&&n.globals.seriesGoals[a][r].forEach((function(a){var r;l.push((s(r={},t,"x"===t?o.getXForValue(a.value,e,!1):o.getYForValue(a.value,i,!1)),s(r,"attrs",a),r))})),l}},{key:"drawGoalLine",value:function(t){var e=t.barXPosition,i=t.barYPosition,a=t.goalX,s=t.goalY,r=t.barWidth,o=t.barHeight,n=new b(this.barCtx.ctx),l=n.group({className:"apexcharts-bar-goals-groups"}),h=null;return this.barCtx.isHorizontal?Array.isArray(a)&&a.forEach((function(t){var e=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:o/2,a=i+e+o/2;h=n.drawLine(t.x,a-2*e,t.x,a,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),l.add(h)})):Array.isArray(s)&&s.forEach((function(t){var i=void 0!==t.attrs.strokeWidth?t.attrs.strokeWidth:r/2,a=e+i+r/2;h=n.drawLine(a-2*i,t.y,a,t.y,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeHeight?t.attrs.strokeHeight:2,t.attrs.strokeLineCap),l.add(h)})),l}}]),t}(),E=function(){function t(i,a){e(this,t),this.ctx=i,this.w=i.w;var s=this.w;this.barOptions=s.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=s.config.stroke.width,this.isNullValue=!1,this.isTimelineBar="datetime"===s.config.xaxis.type&&s.globals.seriesRangeBarTimeline.length,this.xyRatios=a,null!==this.xyRatios&&(this.xRatio=a.xRatio,this.initialXRatio=a.initialXRatio,this.yRatio=a.yRatio,this.invertedXRatio=a.invertedXRatio,this.invertedYRatio=a.invertedYRatio,this.baseLineY=a.baseLineY,this.baseLineInvertedY=a.baseLineInvertedY),this.yaxisIndex=0,this.seriesLen=0,this.barHelpers=new X(this)}return a(t,[{key:"draw",value:function(t,e){var i=this.w,a=new b(this.ctx),s=new y(this.ctx,i);t=s.getLogSeries(t),this.series=t,this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);var r=a.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering.");for(var n=0,l=0;n<t.length;n++,l++){var h,c,d,g,u=void 0,f=void 0,x=[],m=[],v=i.globals.comboCharts?e[n]:n,w=a.group({class:"apexcharts-series",rel:n+1,seriesName:p.escapeString(i.globals.seriesNames[v]),"data:realIndex":v});this.ctx.series.addCollapsedClassToSeries(w,v),t[n].length>0&&(this.visibleI=this.visibleI+1);var k=0,A=0;this.yRatio.length>1&&(this.yaxisIndex=v),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var S=this.barHelpers.initialPositions();f=S.y,k=S.barHeight,c=S.yDivision,g=S.zeroW,u=S.x,A=S.barWidth,h=S.xDivision,d=S.zeroH,this.horizontal||m.push(u+A/2);for(var C=a.group({class:"apexcharts-datalabels","data:realIndex":v}),L=a.group({class:"apexcharts-bar-goals-markers",style:"pointer-events: none"}),P=0;P<i.globals.dataPoints;P++){var T=this.barHelpers.getStrokeWidth(n,P,v),M=null,I={indexes:{i:n,j:P,realIndex:v,bc:l},x:u,y:f,strokeWidth:T,elSeries:w};this.isHorizontal?(M=this.drawBarPaths(o(o({},I),{},{barHeight:k,zeroW:g,yDivision:c})),A=this.series[n][P]/this.invertedYRatio):(M=this.drawColumnPaths(o(o({},I),{},{xDivision:h,barWidth:A,zeroH:d})),k=this.series[n][P]/this.yRatio[this.yaxisIndex]);var z=this.barHelpers.drawGoalLine({barXPosition:M.barXPosition,barYPosition:M.barYPosition,goalX:M.goalX,goalY:M.goalY,barHeight:k,barWidth:A});z&&L.add(z),f=M.y,u=M.x,P>0&&m.push(u+A/2),x.push(f);var X=this.barHelpers.getPathFillColor(t,n,P,v);this.renderSeries({realIndex:v,pathFill:X,j:P,i:n,pathFrom:M.pathFrom,pathTo:M.pathTo,strokeWidth:T,elSeries:w,x:u,y:f,series:t,barHeight:k,barWidth:A,elDataLabelsWrap:C,elGoalsMarkers:L,visibleSeries:this.visibleI,type:"bar"})}i.globals.seriesXvalues[v]=m,i.globals.seriesYvalues[v]=x,r.add(w)}return r}},{key:"renderSeries",value:function(t){var e=t.realIndex,i=t.pathFill,a=t.lineFill,s=t.j,r=t.i,o=t.pathFrom,n=t.pathTo,l=t.strokeWidth,h=t.elSeries,c=t.x,d=t.y,g=t.y1,u=t.y2,p=t.series,f=t.barHeight,m=t.barWidth,v=t.barYPosition,y=t.elDataLabelsWrap,w=t.elGoalsMarkers,k=t.visibleSeries,A=t.type,S=this.w,C=new b(this.ctx);a||(a=this.barOptions.distributed?S.globals.stroke.colors[s]:S.globals.stroke.colors[e]),S.config.series[r].data[s]&&S.config.series[r].data[s].strokeColor&&(a=S.config.series[r].data[s].strokeColor),this.isNullValue&&(i="none");var L=s/S.config.chart.animations.animateGradually.delay*(S.config.chart.animations.speed/S.globals.dataPoints)/2.4,P=C.renderPaths({i:r,j:s,realIndex:e,pathFrom:o,pathTo:n,stroke:a,strokeWidth:l,strokeLineCap:S.config.stroke.lineCap,fill:i,animationDelay:L,initialSpeed:S.config.chart.animations.speed,dataChangeSpeed:S.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(A,"-area")});P.attr("clip-path","url(#gridRectMask".concat(S.globals.cuid,")"));var T=S.config.forecastDataPoints;T.count>0&&s>=S.globals.dataPoints-T.count&&(P.node.setAttribute("stroke-dasharray",T.dashArray),P.node.setAttribute("stroke-width",T.strokeWidth),P.node.setAttribute("fill-opacity",T.fillOpacity)),void 0!==g&&void 0!==u&&(P.attr("data-range-y1",g),P.attr("data-range-y2",u)),new x(this.ctx).setSelectionFilter(P,e,s),h.add(P);var M=new I(this).handleBarDataLabels({x:c,y:d,y1:g,y2:u,i:r,j:s,series:p,realIndex:e,barHeight:f,barWidth:m,barYPosition:v,renderedPath:P,visibleSeries:k});return null!==M&&y.add(M),h.add(y),w&&h.add(w),h}},{key:"drawBarPaths",value:function(t){var e=t.indexes,i=t.barHeight,a=t.strokeWidth,s=t.zeroW,r=t.x,o=t.y,n=t.yDivision,l=t.elSeries,h=this.w,c=e.i,d=e.j;h.globals.isXNumeric&&(o=(h.globals.seriesX[c][d]-h.globals.minX)/this.invertedXRatio-i);var g=o+i*this.visibleI;r=this.barHelpers.getXForValue(this.series[c][d],s);var u=this.barHelpers.getBarpaths({barYPosition:g,barHeight:i,x1:s,x2:r,strokeWidth:a,series:this.series,realIndex:e.realIndex,i:c,j:d,w:h});return h.globals.isXNumeric||(o+=n),this.barHelpers.barBackground({j:d,i:c,y1:g-i*this.visibleI,y2:i*this.seriesLen,elSeries:l}),{pathTo:u.pathTo,pathFrom:u.pathFrom,x:r,y:o,goalX:this.barHelpers.getGoalValues("x",s,null,c,d),barYPosition:g}}},{key:"drawColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.y,s=t.xDivision,r=t.barWidth,o=t.zeroH,n=t.strokeWidth,l=t.elSeries,h=this.w,c=e.realIndex,d=e.i,g=e.j,u=e.bc;if(h.globals.isXNumeric){var p=c;h.globals.seriesX[c].length||(p=h.globals.maxValsInArrayIndex),i=(h.globals.seriesX[p][g]-h.globals.minX)/this.xRatio-r*this.seriesLen/2}var f=i+r*this.visibleI;a=this.barHelpers.getYForValue(this.series[d][g],o);var x=this.barHelpers.getColumnPaths({barXPosition:f,barWidth:r,y1:o,y2:a,strokeWidth:n,series:this.series,realIndex:e.realIndex,i:d,j:g,w:h});return h.globals.isXNumeric||(i+=s),this.barHelpers.barBackground({bc:u,j:g,i:d,x1:f-n/2-r*this.visibleI,x2:r*this.seriesLen+n/2,elSeries:l}),{pathTo:x.pathTo,pathFrom:x.pathFrom,x:i,y:a,goalY:this.barHelpers.getGoalValues("y",null,o,d,g),barXPosition:f}}},{key:"getPreviousPath",value:function(t,e){for(var i,a=this.w,s=0;s<a.globals.previousPaths.length;s++){var r=a.globals.previousPaths[s];r.paths&&r.paths.length>0&&parseInt(r.realIndex,10)===parseInt(t,10)&&void 0!==a.globals.previousPaths[s].paths[e]&&(i=a.globals.previousPaths[s].paths[e].d)}return i}}]),t}(),Y=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}return a(t,[{key:"isValidDate",value:function(t){return!isNaN(this.parseDate(t))}},{key:"getTimeStamp",value:function(t){return Date.parse(t)?this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toISOString().substr(0,25)).getTime():new Date(t).getTime():t}},{key:"getDate",value:function(t){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toUTCString()):new Date(t)}},{key:"parseDate",value:function(t){var e=Date.parse(t);if(!isNaN(e))return this.getTimeStamp(t);var i=Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "));return i=this.getTimeStamp(i)}},{key:"parseDateWithTimezone",value:function(t){return Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "))}},{key:"formatDate",value:function(t,e){var i=this.w.globals.locale,a=this.w.config.xaxis.labels.datetimeUTC,s=["\0"].concat(g(i.months)),r=["\x01"].concat(g(i.shortMonths)),o=["\x02"].concat(g(i.days)),n=["\x03"].concat(g(i.shortDays));function l(t,e){var i=t+"";for(e=e||2;i.length<e;)i="0"+i;return i}var h=a?t.getUTCFullYear():t.getFullYear();e=(e=(e=e.replace(/(^|[^\\])yyyy+/g,"$1"+h)).replace(/(^|[^\\])yy/g,"$1"+h.toString().substr(2,2))).replace(/(^|[^\\])y/g,"$1"+h);var c=(a?t.getUTCMonth():t.getMonth())+1;e=(e=(e=(e=e.replace(/(^|[^\\])MMMM+/g,"$1"+s[0])).replace(/(^|[^\\])MMM/g,"$1"+r[0])).replace(/(^|[^\\])MM/g,"$1"+l(c))).replace(/(^|[^\\])M/g,"$1"+c);var d=a?t.getUTCDate():t.getDate();e=(e=(e=(e=e.replace(/(^|[^\\])dddd+/g,"$1"+o[0])).replace(/(^|[^\\])ddd/g,"$1"+n[0])).replace(/(^|[^\\])dd/g,"$1"+l(d))).replace(/(^|[^\\])d/g,"$1"+d);var u=a?t.getUTCHours():t.getHours(),p=u>12?u-12:0===u?12:u;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+l(u))).replace(/(^|[^\\])H/g,"$1"+u)).replace(/(^|[^\\])hh+/g,"$1"+l(p))).replace(/(^|[^\\])h/g,"$1"+p);var f=a?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(f))).replace(/(^|[^\\])m/g,"$1"+f);var x=a?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(x))).replace(/(^|[^\\])s/g,"$1"+x);var b=a?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(b,3)),b=Math.round(b/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(b)),b=Math.round(b/10);var m=u<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+b)).replace(/(^|[^\\])TT+/g,"$1"+m)).replace(/(^|[^\\])T/g,"$1"+m.charAt(0));var v=m.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+v)).replace(/(^|[^\\])t/g,"$1"+v.charAt(0));var y=-t.getTimezoneOffset(),w=a||!y?"Z":y>0?"+":"-";if(!a){var k=(y=Math.abs(y))%60;w+=l(Math.floor(y/60))+":"+l(k)}e=e.replace(/(^|[^\\])K/g,"$1"+w);var A=(a?t.getUTCDay():t.getDay())+1;
vendor: 11,297 bytes, line 60674
60674return e=(e=(e=(e=(e=e.replace(new RegExp(o[0],"g"),o[A])).replace(new RegExp(n[0],"g"),n[A])).replace(new RegExp(s[0],"g"),s[c])).replace(new RegExp(r[0],"g"),r[c])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(t,e,i){var a=this.w;void 0!==a.config.xaxis.min&&(t=a.config.xaxis.min),void 0!==a.config.xaxis.max&&(e=a.config.xaxis.max);var s=this.getDate(t),r=this.getDate(e),o=this.formatDate(s,"yyyy MM dd HH mm ss fff").split(" "),n=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(o[6],10),maxMillisecond:parseInt(n[6],10),minSecond:parseInt(o[5],10),maxSecond:parseInt(n[5],10),minMinute:parseInt(o[4],10),maxMinute:parseInt(n[4],10),minHour:parseInt(o[3],10),maxHour:parseInt(n[3],10),minDate:parseInt(o[2],10),maxDate:parseInt(n[2],10),minMonth:parseInt(o[1],10)-1,maxMonth:parseInt(n[1],10)-1,minYear:parseInt(o[0],10),maxYear:parseInt(n[0],10)}}},{key:"isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"calculcateLastDaysOfMonth",value:function(t,e,i){return this.determineDaysOfMonths(t,e)-i}},{key:"determineDaysOfYear",value:function(t){var e=365;return this.isLeapYear(t)&&(e=366),e}},{key:"determineRemainingDaysOfYear",value:function(t,e,i){var a=this.daysCntOfYear[e]+i;return e>1&&this.isLeapYear()&&a++,a}},{key:"determineDaysOfMonths",value:function(t,e){var i=30;switch(t=p.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(i=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:i=31}return i}}]),t}(),F=function(t){n(s,t);var i=d(s);function s(){return e(this,s),i.apply(this,arguments)}return a(s,[{key:"draw",value:function(t,e){var i=this.w,a=new b(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=i.globals.seriesRangeStart,this.seriesRangeEnd=i.globals.seriesRangeEnd,this.barHelpers.initVariables(t);for(var s=a.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),r=0;r<t.length;r++){var n,l,h,c=void 0,d=void 0,g=void 0,u=i.globals.comboCharts?e[r]:r,f=a.group({class:"apexcharts-series",seriesName:p.escapeString(i.globals.seriesNames[u]),rel:r+1,"data:realIndex":u});t[r].length>0&&(this.visibleI=this.visibleI+1);var x=0,m=0;this.yRatio.length>1&&(this.yaxisIndex=u);var v=this.barHelpers.initialPositions();d=v.y,h=v.zeroW,c=v.x,m=v.barWidth,n=v.xDivision,l=v.zeroH;for(var y=a.group({class:"apexcharts-datalabels","data:realIndex":u}),w=a.group({class:"apexcharts-rangebar-goals-markers",style:"pointer-events: none"}),k=0;k<i.globals.dataPoints;k++){var A=this.barHelpers.getStrokeWidth(r,k,u),S=this.seriesRangeStart[r][k],C=this.seriesRangeEnd[r][k],L=null,P=null,T={x:c,y:d,strokeWidth:A,elSeries:f};if(g=v.yDivision,x=v.barHeight,this.isHorizontal){P=d+x*this.visibleI;var M=this.seriesLen;i.config.plotOptions.bar.rangeBarGroupRows&&(M=1);var I=(g-x*M)/2;if(void 0===i.config.series[r].data[k])break;if(this.isTimelineBar&&i.config.series[r].data[k].x){var z=this.detectOverlappingBars({i:r,j:k,barYPosition:P,srty:I,barHeight:x,yDivision:g,initPositions:v});x=z.barHeight,P=z.barYPosition}m=(L=this.drawRangeBarPaths(o({indexes:{i:r,j:k,realIndex:u},barHeight:x,barYPosition:P,zeroW:h,yDivision:g,y1:S,y2:C},T))).barWidth}else x=(L=this.drawRangeColumnPaths(o({indexes:{i:r,j:k,realIndex:u},zeroH:l,barWidth:m,xDivision:n},T))).barHeight;var X=this.barHelpers.drawGoalLine({barXPosition:L.barXPosition,barYPosition:P,goalX:L.goalX,goalY:L.goalY,barHeight:x,barWidth:m});X&&w.add(X),d=L.y,c=L.x;var E=this.barHelpers.getPathFillColor(t,r,k,u),Y=i.globals.stroke.colors[u];this.renderSeries({realIndex:u,pathFill:E,lineFill:Y,j:k,i:r,x:c,y:d,y1:S,y2:C,pathFrom:L.pathFrom,pathTo:L.pathTo,strokeWidth:A,elSeries:f,series:t,barHeight:x,barYPosition:P,barWidth:m,elDataLabelsWrap:y,elGoalsMarkers:w,visibleSeries:this.visibleI,type:"rangebar"})}s.add(f)}return s}},{key:"detectOverlappingBars",value:function(t){var e=t.i,i=t.j,a=t.barYPosition,s=t.srty,r=t.barHeight,o=t.yDivision,n=t.initPositions,l=this.w,h=[],c=l.config.series[e].data[i].rangeName,d=l.config.series[e].data[i].x,g=l.globals.labels.indexOf(d),u=l.globals.seriesRangeBarTimeline[e].findIndex((function(t){return t.x===d&&t.overlaps.length>0}));return a=l.config.plotOptions.bar.rangeBarGroupRows?s+o*g:s+r*this.visibleI+o*g,u>-1&&!l.config.plotOptions.bar.rangeBarOverlap&&(h=l.globals.seriesRangeBarTimeline[e][u].overlaps).indexOf(c)>-1&&(a=(r=n.barHeight/h.length)*this.visibleI+o*(100-parseInt(this.barOptions.barHeight,10))/100/2+r*(this.visibleI+h.indexOf(c))+o*g),{barYPosition:a,barHeight:r}}},{key:"drawRangeColumnPaths",value:function(t){var e=t.indexes,i=t.x;t.strokeWidth;var a=t.xDivision,s=t.barWidth,r=t.zeroH,o=this.w,n=e.i,l=e.j,h=this.yRatio[this.yaxisIndex],c=e.realIndex,d=this.getRangeValue(c,l),g=Math.min(d.start,d.end),u=Math.max(d.start,d.end);o.globals.isXNumeric&&(i=(o.globals.seriesX[n][l]-o.globals.minX)/this.xRatio-s/2);var p=i+s*this.visibleI;void 0===this.series[n][l]||null===this.series[n][l]?g=r:(g=r-g/h,u=r-u/h);var f=Math.abs(u-g),x=this.barHelpers.getColumnPaths({barXPosition:p,barWidth:s,y1:g,y2:u,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:e.realIndex,i:c,j:l,w:o});return o.globals.isXNumeric||(i+=a),{pathTo:x.pathTo,pathFrom:x.pathFrom,barHeight:f,x:i,y:u,goalY:this.barHelpers.getGoalValues("y",null,r,n,l),barXPosition:p}}},{key:"drawRangeBarPaths",value:function(t){var e=t.indexes,i=t.y,a=t.y1,s=t.y2,r=t.yDivision,o=t.barHeight,n=t.barYPosition,l=t.zeroW,h=this.w,c=l+a/this.invertedYRatio,d=l+s/this.invertedYRatio,g=Math.abs(d-c),u=this.barHelpers.getBarpaths({barYPosition:n,barHeight:o,x1:c,x2:d,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:e.realIndex,realIndex:e.realIndex,j:e.j,w:h});return h.globals.isXNumeric||(i+=r),{pathTo:u.pathTo,pathFrom:u.pathFrom,barWidth:g,x:d,goalX:this.barHelpers.getGoalValues("x",l,null,e.realIndex,e.j),y:i}}},{key:"getRangeValue",value:function(t,e){var i=this.w;return{start:i.globals.seriesRangeStart[t][e],end:i.globals.seriesRangeEnd[t][e]}}},{key:"getTooltipValues",value:function(t){var e=t.ctx,i=t.seriesIndex,a=t.dataPointIndex,s=t.y1,r=t.y2,o=t.w,n=o.globals.seriesRangeStart[i][a],l=o.globals.seriesRangeEnd[i][a],h=o.globals.labels[a],c=o.config.series[i].name?o.config.series[i].name:"",d=o.config.tooltip.y.formatter,g=o.config.tooltip.y.title.formatter,u={w:o,seriesIndex:i,dataPointIndex:a,start:n,end:l};"function"==typeof g&&(c=g(c,u)),Number.isFinite(s)&&Number.isFinite(r)&&(n=s,l=r,o.config.series[i].data[a].x&&(h=o.config.series[i].data[a].x+":"),"function"==typeof d&&(h=d(h,u)));var p="",f="",x=o.globals.colors[i];if(void 0===o.config.tooltip.x.formatter)if("datetime"===o.config.xaxis.type){var b=new Y(e);p=b.formatDate(b.getDate(n),o.config.tooltip.x.format),f=b.formatDate(b.getDate(l),o.config.tooltip.x.format)}else p=n,f=l;else p=o.config.tooltip.x.formatter(n),f=o.config.tooltip.x.formatter(l);return{start:n,end:l,startVal:p,endVal:f,ylabel:h,color:x,seriesName:c}}},{key:"buildCustomTooltipHTML",value:function(t){var e=t.color,i=t.seriesName;return'<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: '+e+'">'+(i||"")+'</span></div><div> <span class="category">'+t.ylabel+' </span> <span class="value start-value">'+t.start+'</span> <span class="separator">-</span> <span class="value end-value">'+t.end+"</span></div></div>"}}]),s}(E),R=function(){function t(i){e(this,t),this.opts=i}return a(t,[{key:"line",value:function(){return{chart:{animations:{easing:"swing"}},dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(t){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0;return p.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"bar",value:function(){return{chart:{stacked:!1,animations:{easing:"swing"}},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square",radius:2,size:8}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"candlestick",value:function(){var t=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,s=e.w;return t._getBoxTooltip(s,i,a,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var t=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,s=e.w;return t._getBoxTooltip(s,i,a,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:5,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(t,e){e.ctx;var i=e.seriesIndex,a=e.dataPointIndex,s=e.w,r=s.globals.seriesRangeStart[i][a];return s.globals.seriesRangeEnd[i][a]-r},background:{enabled:!1},style:{colors:["#fff"]}},tooltip:{shared:!1,followCursor:!0,custom:function(t){return t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?function(t){var e=new F(t.ctx,null),i=e.getTooltipValues(t),a=i.color,s=i.seriesName,r=i.ylabel,o=i.startVal,n=i.endVal;return e.buildCustomTooltipHTML({color:a,seriesName:s,ylabel:r,start:o,end:n})}(t):function(t){var e=new F(t.ctx,null),i=e.getTooltipValues(t),a=i.color,s=i.seriesName,r=i.ylabel,o=i.start,n=i.end;return e.buildCustomTooltipHTML({color:a,seriesName:s,ylabel:r,start:o,end:n})}(t)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"area",value:function(){return{stroke:{width:4},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"brush",value:function(t){return p.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;var e=t.dataLabels.formatter;return t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})),"bar"===t.chart.type&&(t.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t}),t}},{key:"convertCatToNumeric",value:function(t){return t.xaxis.convertedCatToNumeric=!0,t}}
vendor: 32,125 bytes, line 60674
60674,{key:"convertCatToNumericXaxis",value:function(t,e,i){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(t){return p.isNumber(t)?Math.floor(t):t};var a=t.xaxis.labels.formatter,s=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return i&&i.length&&(s=i.map((function(t){return Array.isArray(t)?t:String(t)}))),s&&s.length&&(t.xaxis.labels.formatter=function(t){return p.isNumber(t)?a(s[Math.floor(t)-1]):a(t)}),t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square",size:10,offsetY:2}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"polarArea",value:function(){return this.opts.yaxis[0].tickAmount=this.opts.yaxis[0].tickAmount?this.opts.yaxis[0].tickAmount:6,{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:3,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1},xaxis:{labels:{formatter:function(t){return t},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0}}}},{key:"_getBoxTooltip",value:function(t,e,i,a,s){var r=t.globals.seriesCandleO[e][i],o=t.globals.seriesCandleH[e][i],n=t.globals.seriesCandleM[e][i],l=t.globals.seriesCandleL[e][i],h=t.globals.seriesCandleC[e][i];return t.config.series[e].type&&t.config.series[e].type!==s?'<div class="apexcharts-custom-tooltip">\n          '.concat(t.config.series[e].name?t.config.series[e].name:"series-"+(e+1),": <strong>").concat(t.globals.series[e][i],"</strong>\n        </div>"):'<div class="apexcharts-tooltip-box apexcharts-tooltip-'.concat(t.config.chart.type,'">')+"<div>".concat(a[0],': <span class="value">')+r+"</span></div>"+"<div>".concat(a[1],': <span class="value">')+o+"</span></div>"+(n?"<div>".concat(a[2],': <span class="value">')+n+"</span></div>":"")+"<div>".concat(a[3],': <span class="value">')+l+"</span></div>"+"<div>".concat(a[4],': <span class="value">')+h+"</span></div></div>"}}]),t}(),H=function(){function i(t){e(this,i),this.opts=t}return a(i,[{key:"init",value:function(e){var i=e.responsiveOverride,a=this.opts,s=new S,r=new R(a);this.chartType=a.chart.type,"histogram"===this.chartType&&(a.chart.type="bar",a=p.extend({plotOptions:{bar:{columnWidth:"99.99%"}}},a)),a=this.extendYAxis(a),a=this.extendAnnotations(a);var o=s.init(),n={};if(a&&"object"===t(a)){var l={};l=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","histogram","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(a.chart.type)?r[a.chart.type]():r.line(),a.chart.brush&&a.chart.brush.enabled&&(l=r.brush(l)),a.chart.stacked&&"100%"===a.chart.stackType&&(a=r.stacked100(a)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(a),a.xaxis=a.xaxis||window.Apex.xaxis||{},i||(a.xaxis.convertedCatToNumeric=!1),((a=this.checkForCatToNumericXAxis(this.chartType,l,a)).chart.sparkline&&a.chart.sparkline.enabled||window.Apex.chart&&window.Apex.chart.sparkline&&window.Apex.chart.sparkline.enabled)&&(l=r.sparkline(l)),n=p.extend(o,l)}var h=p.extend(n,window.Apex);return o=p.extend(h,a),o=this.handleUserInputErrors(o)}},{key:"checkForCatToNumericXAxis",value:function(t,e,i){var a=new R(i),s="bar"===t&&i.plotOptions&&i.plotOptions.bar&&i.plotOptions.bar.horizontal,r="pie"===t||"polarArea"===t||"donut"===t||"radar"===t||"radialBar"===t||"heatmap"===t,o="datetime"!==i.xaxis.type&&"numeric"!==i.xaxis.type,n=i.xaxis.tickPlacement?i.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return s||r||!o||"between"===n||(i=a.convertCatToNumeric(i)),i}},{key:"extendYAxis",value:function(t,e){var i=new S;(void 0===t.yaxis||!t.yaxis||Array.isArray(t.yaxis)&&0===t.yaxis.length)&&(t.yaxis={}),t.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(t.yaxis=p.extend(t.yaxis,window.Apex.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[p.extend(i.yAxis,t.yaxis)]:t.yaxis=p.extendArray(t.yaxis,i.yAxis);var a=!1;t.yaxis.forEach((function(t){t.logarithmic&&(a=!0)}));var s=t.series;return e&&!s&&(s=e.config.series),a&&s.length!==t.yaxis.length&&s.length&&(t.yaxis=s.map((function(e,a){if(e.name||(s[a].name="series-".concat(a+1)),t.yaxis[a])return t.yaxis[a].seriesName=s[a].name,t.yaxis[a];var r=p.extend(i.yAxis,t.yaxis[0]);return r.show=!1,r}))),a&&s.length>1&&s.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes. Please make sure to equalize both."),t}},{key:"extendAnnotations",value:function(t){return void 0===t.annotations&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),t=this.extendPointAnnotations(t)}},{key:"extendYAxisAnnotations",value:function(t){var e=new S;return t.annotations.yaxis=p.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}},{key:"extendXAxisAnnotations",value:function(t){var e=new S;return t.annotations.xaxis=p.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}},{key:"extendPointAnnotations",value:function(t){var e=new S;return t.annotations.points=p.extendArray(void 0!==t.annotations.points?t.annotations.points:[],e.pointAnnotation),t}},{key:"checkForDarkTheme",value:function(t){t.theme&&"dark"===t.theme.mode&&(t.tooltip||(t.tooltip={}),"light"!==t.tooltip.theme&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.chart.background||(t.chart.background="#424242"),t.theme.palette||(t.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(t){var e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===e.chart.type&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"!==e.chart.type&&"rangeBar"!==e.chart.type||e.tooltip.shared&&"barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),"candlestick"!==e.chart.type&&"boxPlot"!==e.chart.type||e.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(e.chart.type," chart is not supported.")),e.yaxis[0].reversed=!1),e.chart.group&&0===e.yaxis[0].labels.minWidth&&console.warn("It looks like you have multiple charts in synchronization. You must provide yaxis.labels.minWidth which must be EQUAL for all grouped charts to prevent incorrect behaviour."),Array.isArray(e.stroke.width)&&"line"!==e.chart.type&&"area"!==e.chart.type&&(console.warn("stroke.width option accepts array only for line and area charts. Reverted back to Number"),e.stroke.width=e.stroke.width[0]),e}}]),i}(),D=function(){function t(){e(this,t)}return a(t,[{key:"initGlobalVars",value:function(t){t.series=[],t.seriesCandleO=[],t.seriesCandleH=[],t.seriesCandleM=[],t.seriesCandleL=[],t.seriesCandleC=[],t.seriesRangeStart=[],t.seriesRangeEnd=[],t.seriesRangeBarTimeline=[],t.seriesPercent=[],t.seriesGoals=[],t.seriesX=[],t.seriesZ=[],t.seriesNames=[],t.seriesTotals=[],t.seriesLog=[],t.seriesColors=[],t.stackedSeriesTotals=[],t.seriesXvalues=[],t.seriesYvalues=[],t.labels=[],t.categoryLabels=[],t.timescaleLabels=[],t.noLabelsProvided=!1,t.resizeTimer=null,t.selectionResizeTimer=null,t.delayedElements=[],t.pointsArray=[],t.dataLabelsRects=[],t.isXNumeric=!1,t.xaxisLabelsCount=0,t.skipLastTimelinelabel=!1,t.skipFirstTimelinelabel=!1,t.isDataXYZ=!1,t.isMultiLineX=!1,t.isMultipleYAxis=!1,t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE,t.minYArr=[],t.maxYArr=[],t.maxX=-Number.MAX_VALUE,t.minX=Number.MAX_VALUE,t.initialMaxX=-Number.MAX_VALUE,t.initialMinX=Number.MAX_VALUE,t.maxDate=0,t.minDate=Number.MAX_VALUE,t.minZ=Number.MAX_VALUE,t.maxZ=-Number.MAX_VALUE,t.minXDiff=Number.MAX_VALUE,t.yAxisScale=[],t.xAxisScale=null,t.xAxisTicksPositions=[],t.yLabelsCoords=[],t.yTitleCoords=[],t.barPadForNumericAxis=0,t.padHorizontal=0,t.xRange=0,t.yRange=[],t.zRange=0,t.dataPoints=0,t.xTickAmount=0}},{key:"globalVars",value:function(t){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],goldenPadding:35,invalidLogScale:!1,ignoreYAxisIndexes:[],yAxisSameScaleIndices:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:"zoom"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.zoom&&t.chart.zoom.enabled,panEnabled:"pan"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.pan,selectionEnabled:"selection"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,easing:null,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null}}},{key:"init",value:function(t){var e=this.globalVars(t);return this.initGlobalVars(e),e.initialConfig=p.extend({},t),e.initialSeries=p.clone(t.series),e.lastXAxis=p.clone(e.initialConfig.xaxis),e.lastYAxis=p.clone(e.initialConfig.yaxis),e}}]),t}(),N=function(){function t(i){e(this,t),this.opts=i}return a(t,[{key:"init",value:function(){var t=new H(this.opts).init({responsiveOverride:!1});return{config:t,globals:(new D).init(t)}}}]),t}(),O=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new y(this.ctx)}return a(t,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var t=this.w.config.series.slice(),e=new z(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&null!==t[this.activeSeriesIndex].data[0]&&void 0!==t[this.activeSeriesIndex].data[0].x&&null!==t[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var t=this.w.config.series.slice(),e=new z(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&void 0!==t[this.activeSeriesIndex].data[0]&&null!==t[this.activeSeriesIndex].data[0]&&t[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(t,e){for(var i=this.w.config,a=this.w.globals,s="boxPlot"===i.chart.type||"boxPlot"===i.series[e].type,r=0;r<t[e].data.length;r++)if(void 0!==t[e].data[r][1]&&(Array.isArray(t[e].data[r][1])&&4===t[e].data[r][1].length&&!s?this.twoDSeries.push(p.parseNumber(t[e].data[r][1][3])):t[e].data[r].length>=5?this.twoDSeries.push(p.parseNumber(t[e].data[r][4])):this.twoDSeries.push(p.parseNumber(t[e].data[r][1])),a.dataFormatXNumeric=!0),"datetime"===i.xaxis.type){var o=new Date(t[e].data[r][0]);o=new Date(o).getTime(),this.twoDSeriesX.push(o)}else this.twoDSeriesX.push(t[e].data[r][0]);for(var n=0;n<t[e].data.length;n++)void 0!==t[e].data[n][2]&&(this.threeDSeries.push(t[e].data[n][2]),a.isDataXYZ=!0)}},{key:"handleFormatXY",value:function(t,e){var i=this.w.config,a=this.w.globals,s=new Y(this.ctx),r=e;a.collapsedSeriesIndices.indexOf(e)>-1&&(r=this.activeSeriesIndex);for(var o=0;o<t[e].data.length;o++)void 0!==t[e].data[o].y&&(Array.isArray(t[e].data[o].y)?this.twoDSeries.push(p.parseNumber(t[e].data[o].y[t[e].data[o].y.length-1])):this.twoDSeries.push(p.parseNumber(t[e].data[o].y))),void 0!==t[e].data[o].goals&&Array.isArray(t[e].data[o].goals)?(void 0===this.seriesGoals[e]&&(this.seriesGoals[e]=[]),this.seriesGoals[e].push(t[e].data[o].goals)):(void 0===this.seriesGoals[e]&&(this.seriesGoals[e]=[]),this.seriesGoals[e].push(null));for(var n=0;n<t[r].data.length;n++){var l="string"==typeof t[r].data[n].x,h=Array.isArray(t[r].data[n].x),c=!h&&!!s.isValidDate(t[r].data[n].x.toString());if(l||c)if(l||i.xaxis.convertedCatToNumeric){var d=a.isBarHorizontal&&a.isRangeData;"datetime"!==i.xaxis.type||d?(this.fallbackToCategory=!0,this.twoDSeriesX.push(t[r].data[n].x)):this.twoDSeriesX.push(s.parseDate(t[r].data[n].x))}else"datetime"===i.xaxis.type?this.twoDSeriesX.push(s.parseDate(t[r].data[n].x.toString())):(a.dataFormatXNumeric=!0,a.isXNumeric=!0,this.twoDSeriesX.push(parseFloat(t[r].data[n].x)));else h?(this.fallbackToCategory=!0,this.twoDSeriesX.push(t[r].data[n].x)):(a.isXNumeric=!0,a.dataFormatXNumeric=!0,this.twoDSeriesX.push(t[r].data[n].x))}if(t[e].data[0]&&void 0!==t[e].data[0].z){for(var g=0;g<t[e].data.length;g++)this.threeDSeries.push(t[e].data[g].z);a.isDataXYZ=!0}}},{key:"handleRangeData",value:function(t,e){var i=this.w.config,a=this.w.globals,s={};return this.isFormat2DArray()?s=this.handleRangeDataFormat("array",t,e):this.isFormatXY()&&(s=this.handleRangeDataFormat("xy",t,e)),a.seriesRangeStart.push(s.start),a.seriesRangeEnd.push(s.end),"datetime"===i.xaxis.type&&a.seriesRangeBarTimeline.push(s.rangeUniques),a.seriesRangeBarTimeline.forEach((function(t,e){t&&t.forEach((function(t,e){t.y.forEach((function(e,i){for(var a=0;a<t.y.length;a++)if(i!==a){var s=e.y1,r=e.y2,o=t.y[a].y1;s<=t.y[a].y2&&o<=r&&(t.overlaps.indexOf(e.rangeName)<0&&t.overlaps.push(e.rangeName),t.overlaps.indexOf(t.y[a].rangeName)<0&&t.overlaps.push(t.y[a].rangeName))}}))}))})),s}},{key:"handleCandleStickBoxData",value:function(t,e){var i=this.w.globals,a={};return this.isFormat2DArray()?a=this.handleCandleStickBoxDataFormat("array",t,e):this.isFormatXY()&&(a=this.handleCandleStickBoxDataFormat("xy",t,e)),i.seriesCandleO[e]=a.o,i.seriesCandleH[e]=a.h,i.seriesCandleM[e]=a.m,i.seriesCandleL[e]=a.l,i.seriesCandleC[e]=a.c,a}},{key:"handleRangeDataFormat",value:function(t,e,i){var a=[],s=[],r=e[i].data.filter((function(t,e,i){return e===i.findIndex((function(e){return e.x===t.x}))})).map((function(t,e){return{x:t.x,overlaps:[],y:[]}})),o="Please provide [Start, End] values in valid format. Read more https://apexcharts.com/docs/series/#rangecharts",n=new z(this.ctx).getActiveConfigSeriesIndex();if("array"===t){if(2!==e[n].data[0][1].length)throw new Error(o);for(var l=0;l<e[i].data.length;l++)a.push(e[i].data[l][1][0]),s.push(e[i].data[l][1][1])}else if("xy"===t){if(2!==e[n].data[0].y.length)throw new Error(o);for(var h=function(t){var o=p.randomId(),n=e[i].data[t].x,l={y1:e[i].data[t].y[0],y2:e[i].data[t].y[1],rangeName:o};e[i].data[t].rangeName=o;var h=r.findIndex((function(t){return t.x===n}));r[h].y.push(l),a.push(l.y1),s.push(l.y2)},c=0;c<e[i].data.length;c++)h(c)}return{start:a,end:s,rangeUniques:r}}},{key:"handleCandleStickBoxDataFormat",value:function(t,e,i){var a=this.w,s="boxPlot"===a.config.chart.type||"boxPlot"===a.config.series[i].type,r=[],o=[],n=[],l=[],h=[];if("array"===t)if(s&&6===e[i].data[0].length||!s&&5===e[i].data[0].length)for(var c=0;c<e[i].data.length;c++)r.push(e[i].data[c][1]),o.push(e[i].data[c][2]),s?(n.push(e[i].data[c][3]),l.push(e[i].data[c][4]),h.push(e[i].data[c][5])):(l.push(e[i].data[c][3]),h.push(e[i].data[c][4]));else for(var d=0;d<e[i].data.length;d++)Array.isArray(e[i].data[d][1])&&(r.push(e[i].data[d][1][0]),o.push(e[i].data[d][1][1]),s?(n.push(e[i].data[d][1][2]),l.push(e[i].data[d][1][3]),h.push(e[i].data[d][1][4])):(l.push(e[i].data[d][1][2]),h.push(e[i].data[d][1][3])));else if("xy"===t)for(var g=0;g<e[i].data.length;g++)Array.isArray(e[i].data[g].y)&&(r.push(e[i].data[g].y[0]),o.push(e[i].data[g].y[1]),s?(n.push(e[i].data[g].y[2]),l.push(e[i].data[g].y[3]),h.push(e[i].data[g].y[4])):(l.push(e[i].data[g].y[2]),h.push(e[i].data[g].y[3])));return{o:r,h:o,m:n,l:l,c:h}}},{key:"parseDataAxisCharts",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.ctx,a=this.w.config,s=this.w.globals,r=new Y(i),o=a.labels.length>0?a.labels.slice():a.xaxis.categories.slice();s.isTimelineBar="rangeBar"===a.chart.type&&"datetime"===a.xaxis.type;for(var n=function(){for(var t=0;t<o.length;t++)if("string"==typeof o[t]){if(!r.isValidDate(o[t]))throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date");e.twoDSeriesX.push(r.parseDate(o[t]))}else e.twoDSeriesX.push(o[t])},l=0;l<t.length;l++){if(this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],void 0===t[l].data)return void console.error("It is a possibility that you may have not included 'data' property in series.");if("rangeBar"!==a.chart.type&&"rangeArea"!==a.chart.type&&"rangeBar"!==t[l].type&&"rangeArea"!==t[l].type||(s.isRangeData=!0,this.handleRangeData(t,l)),this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(t,l):this.isFormatXY()&&this.handleFormatXY(t,l),"candlestick"!==a.chart.type&&"candlestick"!==t[l].type&&"boxPlot"!==a.chart.type&&"boxPlot"!==t[l].type||this.handleCandleStickBoxData(t,l),s.series.push(this.twoDSeries),s.labels.push(this.twoDSeriesX),s.seriesX.push(this.twoDSeriesX),s.seriesGoals=this.seriesGoals,l!==this.activeSeriesIndex||this.fallbackToCategory||(s.isXNumeric=!0);else{"datetime"===a.xaxis.type?(s.isXNumeric=!0,n(),s.seriesX.push(this.twoDSeriesX)):"numeric"===a.xaxis.type&&(s.isXNumeric=!0,o.length>0&&(this.twoDSeriesX=o,s.seriesX.push(this.twoDSeriesX))),s.labels.push(this.twoDSeriesX);var h=t[l].data.map((function(t){return p.parseNumber(t)}));s.series.push(h)}s.seriesZ.push(this.threeDSeries),void 0!==t[l].name?s.seriesNames.push(t[l].name):s.seriesNames.push("series-"+parseInt(l+1,10)),void 0!==t[l].color?s.seriesColors.push(t[l].color):s.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(t){var e=this.w.globals,i=this.w.config;e.series=t.slice(),e.seriesNames=i.labels.slice();for(var a=0;a<e.series.length;a++)void 0===e.seriesNames[a]&&e.seriesNames.push("series-"+(a+1));return this.w}},{key:"handleExternalLabelsData",value:function(t){var e=this.w.config,i=this.w.globals;if(e.xaxis.categories.length>0)i.labels=e.xaxis.categories;else if(e.labels.length>0)i.labels=e.labels.slice();else if(this.fallbackToCategory){if(i.labels=i.labels[0],i.seriesRangeBarTimeline.length&&(i.seriesRangeBarTimeline.map((function(t){t.forEach((function(t){i.labels.indexOf(t.x)<0&&t.x&&i.labels.push(t.x)}))})),i.labels=i.labels.filter((function(t,e,i){return i.indexOf(t)===e}))),e.xaxis.convertedCatToNumeric)new R(e).convertCatToNumericXaxis(e,this.ctx,i.seriesX[0]),this._generateExternalLabels(t)}else this._generateExternalLabels(t)}},{key:"_generateExternalLabels",value:function(t){var e=this.w.globals,i=this.w.config,a=[];if(e.axisCharts){if(e.series.length>0)for(var s=0;s<e.series[e.maxValsInArrayIndex].length;s++)a.push(s+1);e.seriesX=[];for(var r=0;r<t.length;r++)e.seriesX.push(a);e.isXNumeric=!0}if(0===a.length){a=e.axisCharts?[]:e.series.map((function(t,e){return e+1}));for(var o=0;o<t.length;o++)e.seriesX.push(a)}e.labels=a,i.xaxis.convertedCatToNumeric&&(e.categoryLabels=a.map((function(t){return i.xaxis.labels.formatter(t)}))),e.noLabelsProvided=!0}},{key:"parseData",value:function(t){var e=this.w,i=e.config,a=e.globals;if(this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.ctx.core.resetGlobals(),this.ctx.core.isMultipleY(),a.axisCharts?this.parseDataAxisCharts(t):this.parseDataNonAxisCharts(t),this.coreUtils.getLargestSeries(),"bar"===i.chart.type&&i.chart.stacked){var s=new z(this.ctx);a.series=s.setNullSeriesToZeroValues(a.series)}this.coreUtils.getSeriesTotals(),a.axisCharts&&this.coreUtils.getStackedSeriesTotals(),this.coreUtils.getPercentSeries(),a.dataFormatXNumeric||a.isXNumeric&&("numeric"!==i.xaxis.type||0!==i.labels.length||0!==i.xaxis.categories.length)||this.handleExternalLabelsData(t);for(var r=this.coreUtils.getCategoryLabels(a.labels),o=0;o<r.length;o++)if(Array.isArray(r[o])){a.isMultiLineX=!0;break}}},{key:"excludeCollapsedSeriesInYAxis",value:function(){var t=this,e=this.w;e.globals.ignoreYAxisIndexes=e.globals.collapsedSeries.map((function(i,a){if(t.w.globals.isMultipleYAxis&&!e.config.chart.stacked)return i.index}))}}]),t}(),W=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w,this.tooltipKeyFormat="dd MMM"}return a(t,[{key:"xLabelFormat",value:function(t,e,i,a){var s=this.w;if("datetime"===s.config.xaxis.type&&void 0===s.config.xaxis.labels.formatter&&void 0===s.config.tooltip.x.formatter){var r=new Y(this.ctx);return r.formatDate(r.getDate(e),s.config.tooltip.x.format)}return t(e,i,a)}},{key:"defaultGeneralFormatter",value:function(t){return Array.isArray(t)?t.map((function(t){return t})):t}},{key:"defaultYFormatter",value:function(t,e,i){var a=this.w;return p.isNumber(t)&&(t=0!==a.globals.yValueDecimal?t.toFixed(void 0!==e.decimalsInFloat?e.decimalsInFloat:a.globals.yValueDecimal):a.globals.maxYArr[i]-a.globals.minYArr[i]<5?t.toFixed(1):t.toFixed(0)),t}},{key:"setLabelFormatters",value:function(){var t=this,e=this.w;return e.globals.xaxisTooltipFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttKeyFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttZFormatter=function(t){return t},e.globals.legendFormatter=function(e){return t.defaultGeneralFormatter(e)},void 0!==e.config.xaxis.labels.formatter?e.globals.xLabelFormatter=e.config.xaxis.labels.formatter:e.globals.xLabelFormatter=function(t){if(p.isNumber(t)){if(!e.config.xaxis.convertedCatToNumeric&&"numeric"===e.config.xaxis.type){if(p.isNumber(e.config.xaxis.decimalsInFloat))return t.toFixed(e.config.xaxis.decimalsInFloat);var i=e.globals.maxX-e.globals.minX;return i>0&&i<100?t.toFixed(1):t.toFixed(0)}if(e.globals.isBarHorizontal)if(e.globals.maxY-e.globals.minYArr<4)return t.toFixed(1);return t.toFixed(0)}return t},"function"==typeof e.config.tooltip.x.formatter?e.globals.ttKeyFormatter=e.config.tooltip.x.formatter:e.globals.ttKeyFormatter=e.globals.xLabelFormatter,"function"==typeof e.config.xaxis.tooltip.formatter&&(e.globals.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||void 0!==e.config.tooltip.y.formatter)&&(e.globals.ttVal=e.config.tooltip.y),void 0!==e.config.tooltip.z.formatter&&(e.globals.ttZFormatter=e.config.tooltip.z.formatter),void 0!==e.config.legend.formatter&&(e.globals.legendFormatter=e.config.legend.formatter),e.config.yaxis.forEach((function(i,a){void 0!==i.labels.formatter?e.globals.yLabelFormatters[a]=i.labels.formatter:e.globals.yLabelFormatters[a]=function(s){return e.globals.xyCharts?Array.isArray(s)?s.map((function(e){return t.defaultYFormatter(e,i,a)})):t.defaultYFormatter(s,i,a):s}})),e.globals}},{key:"heatmapLabelFormatters",value:function(){var t=this.w;if("heatmap"===t.config.chart.type){t.globals.yAxisScale[0].result=t.globals.seriesNames.slice();var e=t.globals.seriesNames.reduce((function(t,e){return t.length>e.length?t:e}),0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}]),t}(),B=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w}return a(t,[{key:"getLabel",value:function(t,e,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",o=this.w,n=void 0===t[a]?"":t[a],l=n,h=o.globals.xLabelFormatter,c=o.config.xaxis.labels.formatter,d=!1,g=new W(this.ctx),u=n;l=g.xLabelFormat(h,n,u,{i:a,dateFormatter:new Y(this.ctx).formatDate,w:o}),void 0!==c&&(l=c(n,t[a],{i:a,dateFormatter:new Y(this.ctx).formatDate,w:o}));var p=function(t){var i=null;return e.forEach((function(t){"month"===t.unit?i="year":"day"===t.unit?i="month":"hour"===t.unit?i="day":"minute"===t.unit&&(i="hour")})),i===t};e.length>0?(d=p(e[a].unit),i=e[a].position,l=e[a].value):"datetime"===o.config.xaxis.type&&void 0===c&&(l=""),void 0===l&&(l=""),l=Array.isArray(l)?l:l.toString();var f=new b(this.ctx),x={};x=o.globals.rotateXLabels?f.getTextRects(l,parseInt(r,10),null,"rotate(".concat(o.config.xaxis.labels.rotate," 0 0)"),!1):f.getTextRects(l,parseInt(r,10));var m=!o.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(l)&&(0===l.indexOf("NaN")||0===l.toLowerCase().indexOf("invalid")||l.toLowerCase().indexOf("infinity")>=0||s.indexOf(l)>=0&&m)&&(l=""),{x:i,text:l,textRect:x,isBold:d}}},{key:"checkLabelBasedOnTickamount",value:function(t,e,i){var a=this.w,s=a.config.xaxis.tickAmount;return"dataPoints"===s&&(s=Math.round(a.globals.gridWidth/120)),s>i||t%Math.round(i/(s+1))==0||(e.text=""),e}},{key:"checkForOverflowingLabels",value:function(t,e,i,a,s){var r=this.w;if(0===t&&r.globals.skipFirstTimelinelabel&&(e.text=""),t===i-1&&r.globals.skipLastTimelinelabel&&(e.text=""),r.config.xaxis.labels.hideOverlappingLabels&&a.length>0){var o=s[s.length-1];e.x<o.textRect.width/(r.globals.rotateXLabels?Math.abs(r.config.xaxis.labels.rotate)/12:1.01)+o.x&&(e.text="")}return e}},{key:"checkForReversedLabels",value:function(t,e){var i=this.w;return i.config.yaxis[t]&&i.config.yaxis[t].reversed&&e.reverse(),e}},{key:"isYAxisHidden",value:function(t){var e=this.w,i=new y(this.ctx);return!e.config.yaxis[t].show||!e.config.yaxis[t].showForNullSeries&&i.isSeriesNull(t)&&-1===e.globals.collapsedSeriesIndices.indexOf(t)}},{key:"getYAxisForeColor",value:function(t,e){var i=this.w;return Array.isArray(t)&&i.globals.yAxisScale[e]&&this.ctx.theme.pushExtraColors(t,i.globals.yAxisScale[e].result.length,!1),t}},{key:"drawYAxisTicks",value:function(t,e,i,a,s,r,o){var n=this.w,l=new b(this.ctx),h=n.globals.translateY;if(a.show&&e>0){!0===n.config.yaxis[s].opposite&&(t+=a.width);for(var c=e;c>=0;c--){var d=h+e/10+n.config.yaxis[s].labels.offsetY-1;n.globals.isBarHorizontal&&(d=r*c),"heatmap"===n.config.chart.type&&(d+=r/2);var g=l.drawLine(t+i.offsetX-a.width+a.offsetX,d+a.offsetY,t+i.offsetX+a.offsetX,d+a.offsetY,a.color);o.add(g),h+=r}}}}]),t}(),V=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w}return a(t,[{key:"scaleSvgNode",value:function(t,e){var i=parseFloat(t.getAttributeNS(null,"width")),a=parseFloat(t.getAttributeNS(null,"height"));t.setAttributeNS(null,"width",i*e),t.setAttributeNS(null,"height",a*e),t.setAttributeNS(null,"viewBox","0 0 "+i+" "+a)}},{key:"fixSvgStringForIe11",value:function(t){if(!p.isIE11())return t;var e=0,i=t.replace(/xmlns="http:\/\/www.w3.org\/2000\/svg"/g,(function(t){return 2===++e?'xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.dev"':t}));return i=(i=i.replace(/xmlns:NS\d+=""/g,"")).replace(/NS\d+:(\w+:\w+=")/g,"$1")}},{key:"getSvgString",value:function(t){var e=this.w.globals.dom.Paper.svg();if(1!==t){var i=this.w.globals.dom.Paper.node.cloneNode(!0);this.scaleSvgNode(i,t),e=(new XMLSerializer).serializeToString(i)}return this.fixSvgStringForIe11(e)}},{key:"cleanup",value:function(){var t=this.w,e=t.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),i=t.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(a,(function(t){t.setAttribute("width",0)})),e&&e[0]&&(e[0].setAttribute("x",-500),e[0].setAttribute("x1",-500),e[0].setAttribute("x2",-500)),i&&i[0]&&(i[0].setAttribute("y",-100),i[0].setAttribute("y1",-100),i[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){this.cleanup();var t=this.getSvgString(),e=new Blob([t],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(e)}},{key:"dataURI",value:function(t){var e=this;return new Promise((function(i){var a=e.w,s=t?t.scale||t.width/a.globals.svgWidth:1;e.cleanup();var r=document.createElement("canvas");r.width=a.globals.svgWidth*s,r.height=parseInt(a.globals.dom.elWrap.style.height,10)*s;var o="transparent"===a.config.chart.background?"#fff":a.config.chart.background,n=r.getContext("2d");n.fillStyle=o,n.fillRect(0,0,r.width*s,r.height*s);var l=e.getSvgString(s);if(window.canvg&&p.isIE11()){var h=window.canvg.Canvg.fromString(n,l,{ignoreClear:!0,ignoreDimensions:!0});h.start();var c=r.msToBlob();h.stop(),i({blob:c})}else{var d="data:image/svg+xml,"+encodeURIComponent(l),g=new Image;g.crossOrigin="anonymous",g.onload=function(){if(n.drawImage(g,0,0),r.msToBlob){var t=r.msToBlob();i({blob:t})}else{var e=r.toDataURL("image/png");i({imgURI:e})}},g.src=d}}))}},{key:"exportToSVG",value:function(){this.triggerDownload(this.svgUrl(),this.w.config.chart.toolbar.export.svg.f
vendor: 10,784 bytes, line 60674
60674ilename,".svg")}},{key:"exportToPng",value:function(){var t=this;this.dataURI().then((function(e){var i=e.imgURI,a=e.blob;a?navigator.msSaveOrOpenBlob(a,t.w.globals.chartID+".png"):t.triggerDownload(i,t.w.config.chart.toolbar.export.png.filename,".png")}))}},{key:"exportToCSV",value:function(t){var e=this,i=t.series,a=t.columnDelimiter,s=t.lineDelimiter,r=void 0===s?"\n":s,o=this.w,n=[],l=[],h="data:text/csv;charset=utf-8,\ufeff",c=new O(this.ctx),d=new B(this.ctx),g=function(t){var i="";if(o.globals.axisCharts){if("category"===o.config.xaxis.type||o.config.xaxis.convertedCatToNumeric)if(o.globals.isBarHorizontal){var s=o.globals.yLabelFormatters[0],r=new z(e.ctx).getActiveConfigSeriesIndex();i=s(o.globals.labels[t],{seriesIndex:r,dataPointIndex:t,w:o})}else i=d.getLabel(o.globals.labels,o.globals.timescaleLabels,0,t).text;"datetime"===o.config.xaxis.type&&(o.config.xaxis.categories.length?i=o.config.xaxis.categories[t]:o.config.labels.length&&(i=o.config.labels[t]))}else i=o.config.labels[t];return Array.isArray(i)&&(i=i.join(" ")),p.isNumber(i)?i:i.split(a).join("")};n.push(o.config.chart.toolbar.export.csv.headerCategory),i.map((function(t,e){var i=t.name?t.name:"series-".concat(e);o.globals.axisCharts&&n.push(i.split(a).join("")?i.split(a).join(""):"series-".concat(e))})),o.globals.axisCharts||(n.push(o.config.chart.toolbar.export.csv.headerValue),l.push(n.join(a))),i.map((function(t,e){o.globals.axisCharts?function(t,e){if(n.length&&0===e&&l.push(n.join(a)),t.data&&t.data.length)for(var s=0;s<t.data.length;s++){n=[];var r=g(s);if(r||(c.isFormatXY()?r=i[e].data[s].x:c.isFormat2DArray()&&(r=i[e].data[s]?i[e].data[s][0]:"")),0===e){n.push((d=r,"datetime"===o.config.xaxis.type&&String(d).length>=10?o.config.chart.toolbar.export.csv.dateFormatter(r):p.isNumber(r)?r:r.split(a).join("")));for(var h=0;h<o.globals.series.length;h++)n.push(o.globals.series[h][s])}("candlestick"===o.config.chart.type||t.type&&"candlestick"===t.type)&&(n.pop(),n.push(o.globals.seriesCandleO[e][s]),n.push(o.globals.seriesCandleH[e][s]),n.push(o.globals.seriesCandleL[e][s]),n.push(o.globals.seriesCandleC[e][s])),("boxPlot"===o.config.chart.type||t.type&&"boxPlot"===t.type)&&(n.pop(),n.push(o.globals.seriesCandleO[e][s]),n.push(o.globals.seriesCandleH[e][s]),n.push(o.globals.seriesCandleM[e][s]),n.push(o.globals.seriesCandleL[e][s]),n.push(o.globals.seriesCandleC[e][s])),"rangeBar"===o.config.chart.type&&(n.pop(),n.push(o.globals.seriesRangeStart[e][s]),n.push(o.globals.seriesRangeEnd[e][s])),n.length&&l.push(n.join(a))}var d}(t,e):((n=[]).push(o.globals.labels[e].split(a).join("")),n.push(o.globals.series[e]),l.push(n.join(a)))})),h+=l.join(r),this.triggerDownload(encodeURI(h),o.config.chart.toolbar.export.csv.filename,".csv")}},{key:"triggerDownload",value:function(t,e,i){var a=document.createElement("a");a.href=t,a.download=(e||this.w.globals.chartID)+i,document.body.appendChild(a),a.click(),document.body.removeChild(a)}}]),t}(),G=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w;var a=this.w;this.axesUtils=new B(i),this.xaxisLabels=a.globals.labels.slice(),a.globals.timescaleLabels.length>0&&!a.globals.isBarHorizontal&&(this.xaxisLabels=a.globals.timescaleLabels.slice()),a.config.xaxis.overwriteCategories&&(this.xaxisLabels=a.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===a.config.xaxis.position?this.offY=0:this.offY=a.globals.gridHeight+1,this.offY=this.offY+a.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===a.config.chart.type&&a.config.plotOptions.bar.horizontal,this.xaxisFontSize=a.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=a.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=a.config.xaxis.labels.style.colors,this.xaxisBorderWidth=a.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=a.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=a.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=a.config.xaxis.axisBorder.height,this.yaxis=a.config.yaxis[0]}return a(t,[{key:"drawXaxis",value:function(){var t,e=this,i=this.w,a=new b(this.ctx),s=a.group({class:"apexcharts-xaxis",transform:"translate(".concat(i.config.xaxis.offsetX,", ").concat(i.config.xaxis.offsetY,")")}),r=a.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(i.globals.translateXAxisX,", ").concat(i.globals.translateXAxisY,")")});s.add(r);for(var o=i.globals.padHorizontal,n=[],l=0;l<this.xaxisLabels.length;l++)n.push(this.xaxisLabels[l]);var h=n.length;if(i.globals.isXNumeric){var c=h>1?h-1:h;t=i.globals.gridWidth/c,o=o+t/2+i.config.xaxis.labels.offsetX}else t=i.globals.gridWidth/n.length,o=o+t+i.config.xaxis.labels.offsetX;for(var d=function(s){var l=o-t/2+i.config.xaxis.labels.offsetX;0===s&&1===h&&t/2===o&&1===i.globals.dataPoints&&(l=i.globals.gridWidth/2);var c=e.axesUtils.getLabel(n,i.globals.timescaleLabels,l,s,e.drawnLabels,e.xaxisFontSize),d=28;i.globals.rotateXLabels&&(d=22);if((c=void 0!==i.config.xaxis.tickAmount&&"dataPoints"!==i.config.xaxis.tickAmount&&"datetime"!==i.config.xaxis.type?e.axesUtils.checkLabelBasedOnTickamount(s,c,h):e.axesUtils.checkForOverflowingLabels(s,c,h,e.drawnLabels,e.drawnLabelsRects)).text&&i.globals.xaxisLabelsCount++,i.config.xaxis.labels.show){var g=a.drawText({x:c.x,y:e.offY+i.config.xaxis.labels.offsetY+d-("top"===i.config.xaxis.position?i.globals.xAxisHeight+i.config.xaxis.axisTicks.height-2:0),text:c.text,textAnchor:"middle",fontWeight:c.isBold?600:i.config.xaxis.labels.style.fontWeight,fontSize:e.xaxisFontSize,fontFamily:e.xaxisFontFamily,foreColor:Array.isArray(e.xaxisForeColors)?i.config.xaxis.convertedCatToNumeric?e.xaxisForeColors[i.globals.minX+s-1]:e.xaxisForeColors[s]:e.xaxisForeColors,isPlainText:!1,cssClass:"apexcharts-xaxis-label "+i.config.xaxis.labels.style.cssClass});r.add(g);var u=document.createElementNS(i.globals.SVGNS,"title");u.textContent=Array.isArray(c.text)?c.text.join(" "):c.text,g.node.appendChild(u),""!==c.text&&(e.drawnLabels.push(c.text),e.drawnLabelsRects.push(c))}o+=t},g=0;g<=h-1;g++)d(g);if(void 0!==i.config.xaxis.title.text){var u=a.group({class:"apexcharts-xaxis-title"}),p=a.drawText({x:i.globals.gridWidth/2+i.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+i.globals.xAxisLabelsHeight+i.config.xaxis.title.offsetY,text:i.config.xaxis.title.text,textAnchor:"middle",fontSize:i.config.xaxis.title.style.fontSize,fontFamily:i.config.xaxis.title.style.fontFamily,fontWeight:i.config.xaxis.title.style.fontWeight,foreColor:i.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+i.config.xaxis.title.style.cssClass});u.add(p),s.add(u)}if(i.config.xaxis.axisBorder.show){var f=i.globals.barPadForNumericAxis,x=a.drawLine(i.globals.padHorizontal+i.config.xaxis.axisBorder.offsetX-f,this.offY,this.xaxisBorderWidth+f,this.offY,i.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);s.add(x)}return s}},{key:"drawXaxisInversed",value:function(t){var e,i,a=this,s=this.w,r=new b(this.ctx),o=s.config.yaxis[0].opposite?s.globals.translateYAxisX[t]:0,n=r.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:t}),l=r.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g",transform:"translate("+o+", 0)"});n.add(l);var h=[];if(s.config.yaxis[t].show)for(var c=0;c<this.xaxisLabels.length;c++)h.push(this.xaxisLabels[c]);e=s.globals.gridHeight/h.length,i=-e/2.2;var d=s.globals.yLabelFormatters[0],g=s.config.yaxis[0].labels;if(g.show)for(var u=function(o){var n=void 0===h[o]?"":h[o];n=d(n,{seriesIndex:t,dataPointIndex:o,w:s});var c=a.axesUtils.getYAxisForeColor(g.style.colors,t),u=0;Array.isArray(n)&&(u=n.length/2*parseInt(g.style.fontSize,10));var p=r.drawText({x:g.offsetX-15,y:i+e+g.offsetY-u,text:n,textAnchor:a.yaxis.opposite?"start":"end",foreColor:Array.isArray(c)?c[o]:c,fontSize:g.style.fontSize,fontFamily:g.style.fontFamily,fontWeight:g.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+g.style.cssClass});l.add(p);var f=document.createElementNS(s.globals.SVGNS,"title");if(f.textContent=Array.isArray(n)?n.join(" "):n,p.node.appendChild(f),0!==s.config.yaxis[t].labels.rotate){var x=r.rotateAroundCenter(p.node);p.node.setAttribute("transform","rotate(".concat(s.config.yaxis[t].labels.rotate," 0 ").concat(x.y,")"))}i+=e},p=0;p<=h.length-1;p++)u(p);if(void 0!==s.config.yaxis[0].title.text){var f=r.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+o+", 0)"}),x=r.drawText({x:0,y:s.globals.gridHeight/2,text:s.config.yaxis[0].title.text,textAnchor:"middle",foreColor:s.config.yaxis[0].title.style.color,fontSize:s.config.yaxis[0].title.style.fontSize,fontWeight:s.config.yaxis[0].title.style.fontWeight,fontFamily:s.config.yaxis[0].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+s.config.yaxis[0].title.style.cssClass});f.add(x),n.add(f)}var m=0;this.isCategoryBarHorizontal&&s.config.yaxis[0].opposite&&(m=s.globals.gridWidth);var v=s.config.xaxis.axisBorder;if(v.show){var y=r.drawLine(s.globals.padHorizontal+v.offsetX+m,1+v.offsetY,s.globals.padHorizontal+v.offsetX+m,s.globals.gridHeight+v.offsetY,v.color,0);n.add(y)}return s.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(m,h.length,s.config.yaxis[0].axisBorder,s.config.yaxis[0].axisTicks,0,e,n),n}},{key:"drawXaxisTicks",value:function(t,e){var i=this.w,a=t;if(!(t<0||t-2>i.globals.gridWidth)){var s=this.offY+i.config.xaxis.axisTicks.offsetY,r=s+i.config.xaxis.axisTicks.height;if("top"===i.config.xaxis.position&&(r=s-i.config.xaxis.axisTicks.height),i.config.xaxis.axisTicks.show){var o=new b(this.ctx).drawLine(t+i.config.xaxis.axisTicks.offsetX,s+i.config.xaxis.offsetY,a+i.config.xaxis.axisTicks.offsetX,r+i.config.xaxis.offsetY,i.config.xaxis.axisTicks.color);e.add(o),o.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var t=this.w,e=[],i=this.xaxisLabels.length,a=t.globals.padHorizontal;if(t.globals.timescaleLabels.length>0)for(var s=0;s<i;s++)a=this.xaxisLabels[s].position,e.push(a);else for(var r=i,o=0;o<r;o++){var n=r;t.globals.isXNumeric&&"bar"!==t.config.chart.type&&(n-=1),a+=t.globals.gridWidth/n,e.push(a)}return e}},{key:"xAxisLabelCorrections",value:function(){var t=this.w,e=new b(this.ctx),i=t.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g"),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-texts-g text"),s=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-inversed text"),r=t.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text tspan");if(t.globals.rotateXLabels||t.config.xaxis.labels.rotateAlways)for(var o=0;o<a.length;
vendor: 10,611 bytes, line 60674
60674o++){var n=e.rotateAroundCenter(a[o]);n.y=n.y-1,n.x=n.x+1,a[o].setAttribute("transform","rotate(".concat(t.config.xaxis.labels.rotate," ").concat(n.x," ").concat(n.y,")")),a[o].setAttribute("text-anchor","end");i.setAttribute("transform","translate(0, ".concat(-10,")"));var l=a[o].childNodes;t.config.xaxis.labels.trim&&Array.prototype.forEach.call(l,(function(i){e.placeTextWithEllipsis(i,i.textContent,t.globals.xAxisLabelsHeight-("bottom"===t.config.legend.position?20:10))}))}else!function(){for(var i=t.globals.gridWidth/(t.globals.labels.length+1),s=0;s<a.length;s++){var r=a[s].childNodes;t.config.xaxis.labels.trim&&"datetime"!==t.config.xaxis.type&&Array.prototype.forEach.call(r,(function(t){e.placeTextWithEllipsis(t,t.textContent,i)}))}}();if(s.length>0){var h=s[s.length-1].getBBox(),c=s[0].getBBox();h.x<-20&&s[s.length-1].parentNode.removeChild(s[s.length-1]),c.x+c.width>t.globals.gridWidth&&!t.globals.isBarHorizontal&&s[0].parentNode.removeChild(s[0]);for(var d=0;d<r.length;d++)e.placeTextWithEllipsis(r[d],r[d].textContent,t.config.yaxis[0].labels.maxWidth-2*parseFloat(t.config.yaxis[0].title.style.fontSize)-20)}}}]),t}(),_=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w;var a=this.w;this.xaxisLabels=a.globals.labels.slice(),this.axesUtils=new B(i),this.isTimelineBar="datetime"===a.config.xaxis.type&&a.globals.seriesRangeBarTimeline.length,a.globals.timescaleLabels.length>0&&(this.xaxisLabels=a.globals.timescaleLabels.slice())}return a(t,[{key:"drawGridArea",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,i=new b(this.ctx);null===t&&(t=i.group({class:"apexcharts-grid"}));var a=i.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.globals.gridHeight,"transparent"),s=i.drawLine(e.globals.padHorizontal,e.globals.gridHeight,e.globals.gridWidth,e.globals.gridHeight,"transparent");return t.add(s),t.add(a),t}},{key:"drawGrid",value:function(){var t=null;return this.w.globals.axisCharts&&(t=this.renderGrid(),this.drawGridArea(t.el)),t}},{key:"createGridMask",value:function(){var t=this.w,e=t.globals,i=new b(this.ctx),a=Array.isArray(t.config.stroke.width)?0:t.config.stroke.width;if(Array.isArray(t.config.stroke.width)){var s=0;t.config.stroke.width.forEach((function(t){s=Math.max(s,t)})),a=s}e.dom.elGridRectMask=document.createElementNS(e.SVGNS,"clipPath"),e.dom.elGridRectMask.setAttribute("id","gridRectMask".concat(e.cuid)),e.dom.elGridRectMarkerMask=document.createElementNS(e.SVGNS,"clipPath"),e.dom.elGridRectMarkerMask.setAttribute("id","gridRectMarkerMask".concat(e.cuid)),e.dom.elForecastMask=document.createElementNS(e.SVGNS,"clipPath"),e.dom.elForecastMask.setAttribute("id","forecastMask".concat(e.cuid)),e.dom.elNonForecastMask=document.createElementNS(e.SVGNS,"clipPath"),e.dom.elNonForecastMask.setAttribute("id","nonForecastMask".concat(e.cuid));var r=t.config.chart.type,o=0,n=0;("bar"===r||"rangeBar"===r||"candlestick"===r||"boxPlot"===r||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&(o=t.config.grid.padding.left,n=t.config.grid.padding.right,e.barPadForNumericAxis>o&&(o=e.barPadForNumericAxis,n=e.barPadForNumericAxis)),e.dom.elGridRect=i.drawRect(-a/2-o-2,-a/2,e.gridWidth+a+n+o+4,e.gridHeight+a,0,"#fff"),new y(this).getLargestMarkerSize();var l=t.globals.markers.largestSize+1;e.dom.elGridRectMarker=i.drawRect(2*-l,2*-l,e.gridWidth+4*l,e.gridHeight+4*l,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);var h=e.dom.baseEl.querySelector("defs");h.appendChild(e.dom.elGridRectMask),h.appendChild(e.dom.elForecastMask),h.appendChild(e.dom.elNonForecastMask),h.appendChild(e.dom.elGridRectMarkerMask)}},{key:"_drawGridLines",value:function(t){var e=t.i,i=t.x1,a=t.y1,s=t.x2,r=t.y2,o=t.xCount,n=t.parent,l=this.w;0===e&&l.globals.skipFirstTimelinelabel||e===o-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||"radar"===l.config.chart.type||(l.config.grid.xaxis.lines.show&&this._drawGridLine({x1:i,y1:a,x2:s,y2:r,parent:n}),new G(this.ctx).drawXaxisTicks(i,this.elg))}},{key:"_drawGridLine",value:function(t){var e=t.x1,i=t.y1,a=t.x2,s=t.y2,r=t.parent,o=this.w,n=r.node.classList.contains("apexcharts-gridlines-horizontal"),l=o.config.grid.strokeDashArray,h=o.globals.barPadForNumericAxis,c=new b(this).drawLine(e-(n?h:0),i,a+(n?h:0),s,o.config.grid.borderColor,l);c.node.classList.add("apexcharts-gridline"),r.add(c)}},{key:"_drawGridBandRect",value:function(t){var e=t.c,i=t.x1,a=t.y1,s=t.x2,r=t.y2,o=t.type,n=this.w,l=new b(this.ctx),h=n.globals.barPadForNumericAxis;if("column"!==o||"datetime"!==n.config.xaxis.type){var c=n.config.grid[o].colors[e],d=l.drawRect(i-("row"===o?h:0),a,s+("row"===o?2*h:0),r,0,c,n.config.grid[o].opacity);this.elg.add(d),d.attr("clip-path","url(#gridRectMask".concat(n.globals.cuid,")")),d.node.classList.add("apexcharts-grid-".concat(o))}}},{key:"_drawXYLines",value:function(t){var e=this,i=t.xCount,a=t.tickAmount,s=this.w;if(s.config.grid.xaxis.lines.show||s.config.xaxis.axisTicks.show){var r,o=s.globals.padHorizontal,n=s.globals.gridHeight;s.globals.timescaleLabels.length?function(t){for(var a=t.xC,s=t.x1,r=t.y1,o=t.x2,n=t.y2,l=0;l<a;l++)s=e.xaxisLabels[l].position,o=e.xaxisLabels[l].position,e._drawGridLines({i:l,x1:s,y1:r,x2:o,y2:n,xCount:i,parent:e.elgridLinesV})}({xC:i,x1:o,y1:0,x2:r,y2:n}):(s.globals.isXNumeric&&(i=s.globals.xAxisScale.result.length),s.config.xaxis.convertedCatToNumeric&&(i=s.globals.xaxisLabelsCount),function(t){var a=t.xC,r=t.x1,o=t.y1,n=t.x2,l=t.y2;if(void 0!==s.config.xaxis.tickAmount&&"dataPoints"!==s.config.xaxis.tickAmount)s.globals.dom.baseEl.querySelectorAll(".apexcharts-text.apexcharts-xaxis-label tspan:not(:empty)").forEach((function(t,a){var s=t.getBBox();e._drawGridLines({i:a,x1:s.x+s.width/2,y1:o,x2:s.x+s.width/2,y2:l,xCount:i,parent:e.elgridLinesV})}));else for(var h=0;h<a+(s.globals.isXNumeric?0:1);h++)0===h&&1===a&&1===s.globals.dataPoints&&(n=r=s.globals.gridWidth/2),e._drawGridLines({i:h,x1:r,y1:o,x2:n,y2:l,xCount:i,parent:e.elgridLinesV}),n=r+=s.globals.gridWidth/(s.globals.isXNumeric?a-1:a)}({xC:i,x1:o,y1:0,x2:r,y2:n}))}if(s.config.grid.yaxis.lines.show){var l=0,h=0,c=s.globals.gridWidth,d=a+1;this.isTimelineBar&&(d=s.globals.labels.length);for(var g=0;g<d+(this.isTimelineBar?1:0);g++)this._drawGridLine({x1:0,y1:l,x2:c,y2:h,parent:this.elgridLinesH}),h=l+=s.globals.gridHeight/(this.isTimelineBar?d:a)}}},{key:"_drawInvertedXYLines",value:function(t){var e=t.xCount,i=this.w;if(i.config.grid.xaxis.lines.show||i.config.xaxis.axisTicks.show)for(var a,s=i.globals.padHorizontal,r=i.globals.gridHeight,o=0;o<e+1;o++){i.config.grid.xaxis.lines.show&&this._drawGridLine({x1:s,y1:0,x2:a,y2:r,parent:this.elgridLinesV}),new G(this.ctx).drawXaxisTicks(s,this.elg),a=s=s+i.globals.gridWidth/e+.3}if(i.config.grid.yaxis.lines.show)for(var n=0,l=0,h=i.globals.gridWidth,c=0;c<i.globals.dataPoints+1;c++)this._drawGridLine({x1:0,y1:n,x2:h,y2:l,parent:this.elgridLinesH}),l=n+=i.globals.gridHeight/i.globals.dataPoints}},{key:"renderGrid",value:function(){var t=this.w,e=new b(this.ctx);this.elg=e.group({class:"apexcharts-grid"}),this.elgridLinesH=e.group({class:"apexcharts-gridlines-horizontal"}),this.elgridLinesV=e.group({class:"apexcharts-gridlines-vertical"}),this.elg.add(this.elgridLinesH),this.elg.add(this.elgridLinesV),t.config.grid.show||(this.elgridLinesV.hide(),this.elgridLinesH.hide());for(var i,a=t.globals.yAxisScale.length?t.globals.yAxisScale[0].result.length-1:5,s=0;s<t.globals.series.length&&(void 0!==t.globals.yAxisScale[s]&&(a=t.globals.yAxisScale[s].result.length-1),!(a>2));s++);return!t.globals.isBarHorizontal||this.isTimelineBar?(i=this.xaxisLabels.length,this.isTimelineBar&&(a=t.globals.labels.length,t.config.xaxis.tickAmount&&t.config.xaxis.labels.formatter&&(i=t.config.xaxis.tickAmount)),this._drawXYLines({xCount:i,tickAmount:a})):(i=a,a=t.globals.xTickAmount,this._drawInvertedXYLines({xCount:i,tickAmount:a})),this.drawGridBands(i,a),{el:this.elg,xAxisTickWidth:t.globals.gridWidth/i}}},{key:"drawGridBands",value:function(t,e){var i=this.w;if(void 0!==i.config.grid.row.colors&&i.config.grid.row.colors.length>0)for(var a=0,s=i.globals.gridHeight/e,r=i.globals.gridWidth,o=0,n=0;o<e;o++,n++)n>=i.config.grid.row.colors.length&&(n=0),this._drawGridBandRect({c:n,x1:0,y1:a,x2:r,y2:s,type:"row"}),a+=i.globals.gridHeight/e;if(void 0!==i.config.grid.column.colors&&i.config.grid.column.colors.length>0)for(var l=i.globals.isBarHorizontal||"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric?t:t-1,h=i.globals.padHorizontal,c=i.globals.padHorizontal+i.globals.gridWidth/l,d=i.globals.gridHeight,g=0,u=0;g<t;g++,u++)u>=i.config.grid.column.colors.length&&(u=0),this._drawGridBandRect({c:u,x1:h,y1:0,x2:c,y2:d,type:"column"}),h+=i.globals.gridWidth/l}}]),t}(),j=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w}return a(t,[{key:"niceScale",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4?arguments[4]:void 0,r=this.w,o=Math.abs(e-t);if("dataPoints"===(i=this._adjustTicksForSmallRange(i,a,o))&&(i=r.globals.dataPoints-1),t===Number.MIN_VALUE&&0===e||!p.isNumber(t)&&!p.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE){t=0,e=i;var n=this.linearScale(t,e,i);return n}t>e?(console.warn("axis.min cannot be greater than axis.max"),e=t+.1):t===e&&(t=0===t?0:t-.5,e=0===e?2:e+.5);var l=[];o<1&&s&&("candlestick"===r.config.chart.type||"candlestick"===r.config.series[a].type||"boxPlot"===r.config.chart.type||"boxPlot"===r.config.series[a].type||r.globals.isRangeData)&&(e*=1.01);var h=i+1;h<2?h=2:h>2&&(h-=2);var c=o/h,d=Math.floor(p.log10(c)),g=Math.pow(10,d),u=Math.round(c/g);u<1&&(u=1);var f=u*g,x=f*Math.floor(t/f),b=f*Math.ceil(e/f),m=x;if(s&&o>2){for(;l.push(m),!((m+=f)>b););return{result:l,niceMin:l[0],niceMax:l[l.length-1]}}var v=t;(l=[]).push(v);for(var y=Math.abs(e-t)/i,w=0;w<=i;w++)v+=y,l.push(v);return l[l.length-2]>=e&&l.pop(),{result:l,niceMin:l[0],niceMax:l[l.length-1]}}},{key:"linearScale",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=arguments.length>3?arguments[3]:void 0,s=Math.abs(e-t);"dataPoints"===(i=this._adjustTicksForSmallRange(i,a,s))&&(i=this.w.globals.dataPoints-1);var r=s/i;i===Number.MAX_VALUE&&(i=10,r=1);for(var o=[],n=t;i>=0;)o.push(n),n+=r,i-=1;return{result:o,niceMin:o[0],niceMax:o[o.length-1]}}},{key:"logarithmicScale",value:function(t){for(var e=[],i=Math.ceil(Math.log10(t))+1,a=0;a<i;
vendor: 4,183 bytes, line 60674
60674a++)e.push(Math.pow(10,a));return{result:e,niceMin:e[0],niceMax:e[e.length-1]}}},{key:"_adjustTicksForSmallRange",value:function(t,e,i){var a=t;if(void 0!==e&&this.w.config.yaxis[e].labels.formatter&&void 0===this.w.config.yaxis[e].tickAmount){var s=this.w.config.yaxis[e].labels.formatter(1);p.isNumber(Number(s))&&!p.isFloat(s)&&(a=Math.ceil(i))}return a<t?a:t}},{key:"setYScaleForIndex",value:function(t,e,i){var a=this.w.globals,s=this.w.config,r=a.isBarHorizontal?s.xaxis:s.yaxis[t];void 0===a.yAxisScale[t]&&(a.yAxisScale[t]=[]);var o=Math.abs(i-e);if(r.logarithmic&&o<=5&&(a.invalidLogScale=!0),r.logarithmic&&o>5)a.allSeriesCollapsed=!1,a.yAxisScale[t]=this.logarithmicScale(i);else if(i!==-Number.MAX_VALUE&&p.isNumber(i))if(a.allSeriesCollapsed=!1,void 0===r.min&&void 0===r.max||r.forceNiceScale){var n=void 0===s.yaxis[t].max&&void 0===s.yaxis[t].min||s.yaxis[t].forceNiceScale;a.yAxisScale[t]=this.niceScale(e,i,r.tickAmount?r.tickAmount:o<5&&o>1?o+1:5,t,n)}else a.yAxisScale[t]=this.linearScale(e,i,r.tickAmount,t);else a.yAxisScale[t]=this.linearScale(0,5,5)}},{key:"setXScale",value:function(t,e){var i=this.w,a=i.globals,s=i.config.xaxis,r=Math.abs(e-t);return e!==-Number.MAX_VALUE&&p.isNumber(e)?a.xAxisScale=this.linearScale(t,e,s.tickAmount?s.tickAmount:r<5&&r>1?r+1:5,0):a.xAxisScale=this.linearScale(0,5,5),a.xAxisScale}},{key:"setMultipleYScales",value:function(){var t=this,e=this.w.globals,i=this.w.config,a=e.minYArr.concat([]),s=e.maxYArr.concat([]),r=[];i.yaxis.forEach((function(e,o){var n=o;i.series.forEach((function(t,i){t.name===e.seriesName&&(n=i,o!==i?r.push({index:i,similarIndex:o,alreadyExists:!0}):r.push({index:i}))}));var l=a[n],h=s[n];t.setYScaleForIndex(o,l,h)})),this.sameScaleInMultipleAxes(a,s,r)}},{key:"sameScaleInMultipleAxes",value:function(t,e,i){var a=this,s=this.w.config,r=this.w.globals,o=[];i.forEach((function(t){t.alreadyExists&&(void 0===o[t.index]&&(o[t.index]=[]),o[t.index].push(t.index),o[t.index].push(t.similarIndex))})),r.yAxisSameScaleIndices=o,o.forEach((function(t,e){o.forEach((function(i,a){var s,r;e!==a&&(s=t,r=i,s.filter((function(t){return-1!==r.indexOf(t)}))).length>0&&(o[e]=o[e].concat(o[a]))}))}));var n=o.map((function(t){return t.filter((function(e,i){return t.indexOf(e)===i}))})).map((function(t){return t.sort()}));o=o.filter((function(t){return!!t}));var l=n.slice(),h=l.map((function(t){return JSON.stringify(t)}));l=l.filter((function(t,e){return h.indexOf(JSON.stringify(t))===e}));var c=[],d=[];t.forEach((function(t,i){l.forEach((function(a,s){a.indexOf(i)>-1&&(void 0===c[s]&&(c[s]=[],d[s]=[]),c[s].push({key:i,value:t}),d[s].push({key:i,value:e[i]}))}))}));var g=Array.apply(null,Array(l.length)).map(Number.prototype.valueOf,Number.MIN_VALUE),u=Array.apply(null,Array(l.length)).map(Number.prototype.valueOf,-Number.MAX_VALUE);c.forEach((function(t,e){t.forEach((function(t,i){g[e]=Math.min(t.value,g[e])}))})),d.forEach((function(t,e){t.forEach((function(t,i){u[e]=Math.max(t.value,u[e])}))})),t.forEach((function(t,e){d.forEach((function(t,i){var o=g[i],n=u[i];s.chart.stacked&&(n=0,t.forEach((function(t,e){t.value!==-Number.MAX_VALUE&&(n+=t.value),o!==Number.MIN_VALUE&&(o+=c[i][e].value)}))),t.forEach((function(i,l){t[l].key===e&&(void 0!==s.yaxis[e].min&&(o="function"==typeof s.yaxis[e].min?s.yaxis[e].min(r.minY):s.yaxis[e].min),void 0!==s.yaxis[e].max&&(n="function"==typeof s.yaxis[e].max?s.yaxis[e].max(r.maxY):s.yaxis[e].max),a.setYScaleForIndex(e,o,n))}))}))}))}},{key:"autoScaleY",value:function(t,e,i){t||(t=this);var a=t.w;if(a.globals.isMultipleYAxis||a.globals.collapsedSeries.length)return console.warn("autoScaleYaxis is not supported in a multi-yaxis chart."),e;var s=a.globals.seriesX[0],r=a.config.chart.stacked;return e.forEach((function(t,o){for(var n=0,l=0;l<s.length;l++)if(s[l]>=i.xaxis.min){n=l;break}var h,c,d=a.globals.minYArr[o],g=a.globals.maxYArr[o],u=a.globals.stackedSeriesTotals;a.globals.series.forEach((function(o,l){var p=o[n];r?(p=u[n],h=c=p,u.forEach((function(t,e){s[e]<=i.xaxis.max&&s[e]>=i.xaxis.min&&(t>c&&null!==t&&(c=t),o[e]<h&&null!==o[e]&&(h=o[e]))}))):(h=c=p,o.forEach((function(t,e){if(s[e]<=i.xaxis.max&&s[e]>=i.xaxis.min){var r=t,o=t;
vendor: 8,841 bytes, line 60674
60674a.globals.series.forEach((function(i,a){null!==t&&(r=Math.min(i[e],r),o=Math.max(i[e],o))})),o>c&&null!==o&&(c=o),r<h&&null!==r&&(h=r)}}))),void 0===h&&void 0===c&&(h=d,c=g),(c*=c<0?.9:1.1)<0&&c<g&&(c=g),(h*=h<0?1.1:.9)<0&&h>d&&(h=d),e.length>1?(e[l].min=void 0===t.min?h:t.min,e[l].max=void 0===t.max?c:t.max):(e[0].min=void 0===t.min?h:t.min,e[0].max=void 0===t.max?c:t.max)}))})),e}}]),t}(),U=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w,this.scales=new j(i)}return a(t,[{key:"init",value:function(){this.setYRange(),this.setXRange(),this.setZRange()}},{key:"getMinYMaxY",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.w.config,r=this.w.globals,o=-Number.MAX_VALUE,n=Number.MIN_VALUE;null===a&&(a=t+1);var l=r.series,h=l,c=l;"candlestick"===s.chart.type?(h=r.seriesCandleL,c=r.seriesCandleH):"boxPlot"===s.chart.type?(h=r.seriesCandleO,c=r.seriesCandleC):r.isRangeData&&(h=r.seriesRangeStart,c=r.seriesRangeEnd);for(var d=t;d<a;d++){r.dataPoints=Math.max(r.dataPoints,l[d].length);for(var g=0;g<r.series[d].length;g++){var u=l[d][g];null!==u&&p.isNumber(u)?(void 0!==c[d][g]&&(o=Math.max(o,c[d][g])),void 0!==h[d][g]&&(e=Math.min(e,h[d][g]),i=Math.max(i,h[d][g])),"candlestick"!==this.w.config.chart.type&&"boxPlot"!==this.w.config.chart.type||(void 0!==r.seriesCandleC[d][g]&&(o=Math.max(o,r.seriesCandleO[d][g]),o=Math.max(o,r.seriesCandleH[d][g]),o=Math.max(o,r.seriesCandleL[d][g]),o=Math.max(o,r.seriesCandleC[d][g]),"boxPlot"===this.w.config.chart.type&&(o=Math.max(o,r.seriesCandleM[d][g]))),!s.series[d].type||"candlestick"===s.series[d].type&&"boxPlot"===s.series[d].type||(o=Math.max(o,r.series[d][g]),e=Math.min(e,r.series[d][g])),i=o),r.seriesGoals[d]&&r.seriesGoals[d][g]&&Array.isArray(r.seriesGoals[d][g])&&r.seriesGoals[d][g].forEach((function(t){n!==Number.MIN_VALUE&&(n=Math.min(n,t.value),e=n),o=Math.max(o,t.value),i=o})),p.isFloat(u)&&(u=p.noExponents(u),r.yValueDecimal=Math.max(r.yValueDecimal,u.toString().split(".")[1].length)),n>h[d][g]&&h[d][g]<0&&(n=h[d][g])):r.hasNullValues=!0}}return"rangeBar"===s.chart.type&&r.seriesRangeStart.length&&r.isBarHorizontal&&"datetime"===s.xaxis.type&&(n=e),"bar"===s.chart.type&&(n<0&&o<0&&(o=0),n===Number.MIN_VALUE&&(n=0)),{minY:n,maxY:o,lowestY:e,highestY:i}}},{key:"setYRange",value:function(){var t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;var i=Number.MAX_VALUE;if(t.isMultipleYAxis)for(var a=0;a<t.series.length;a++){var s=this.getMinYMaxY(a,i,null,a+1);t.minYArr.push(s.minY),t.maxYArr.push(s.maxY),i=s.lowestY}var r=this.getMinYMaxY(0,i,null,t.series.length);if(t.minY=r.minY,t.maxY=r.maxY,i=r.lowestY,e.chart.stacked&&this._setStackedMinMax(),("line"===e.chart.type||"area"===e.chart.type||"candlestick"===e.chart.type||"boxPlot"===e.chart.type||"rangeBar"===e.chart.type&&!t.isBarHorizontal)&&t.minY===Number.MIN_VALUE&&i!==-Number.MAX_VALUE&&i!==t.maxY){var o=t.maxY-i;(i>=0&&i<=10||void 0!==e.yaxis[0].min||void 0!==e.yaxis[0].max)&&(o=0),t.minY=i-5*o/100,i>0&&t.minY<0&&(t.minY=0),t.maxY=t.maxY+5*o/100}if(e.yaxis.forEach((function(e,i){void 0!==e.max&&("number"==typeof e.max?t.maxYArr[i]=e.max:"function"==typeof e.max&&(t.maxYArr[i]=e.max(t.isMultipleYAxis?t.maxYArr[i]:t.maxY)),t.maxY=t.maxYArr[i]),void 0!==e.min&&("number"==typeof e.min?t.minYArr[i]=e.min:"function"==typeof e.min&&(t.minYArr[i]=e.min(t.isMultipleYAxis?t.minYArr[i]===Number.MIN_VALUE?0:t.minYArr[i]:t.minY)),t.minY=t.minYArr[i])})),t.isBarHorizontal){["min","max"].forEach((function(i){void 0!==e.xaxis[i]&&"number"==typeof e.xaxis[i]&&("min"===i?t.minY=e.xaxis[i]:t.maxY=e.xaxis[i])}))}return t.isMultipleYAxis?(this.scales.setMultipleYScales(),t.minY=i,t.yAxisScale.forEach((function(e,i){t.minYArr[i]=e.niceMin,t.maxYArr[i]=e.niceMax}))):(this.scales.setYScaleForIndex(0,t.minY,t.maxY),t.minY=t.yAxisScale[0].niceMin,t.maxY=t.yAxisScale[0].niceMax,t.minYArr[0]=t.yAxisScale[0].niceMin,t.maxYArr[0]=t.yAxisScale[0].niceMax),{minY:t.minY,maxY:t.maxY,minYArr:t.minYArr,maxYArr:t.maxYArr,yAxisScale:t.yAxisScale}}},{key:"setXRange",value:function(){var t=this.w.globals,e=this.w.config,i="numeric"===e.xaxis.type||"datetime"===e.xaxis.type||"category"===e.xaxis.type&&!t.noLabelsProvided||t.noLabelsProvided||t.isXNumeric;if(t.isXNumeric&&function(){for(var e=0;e<t.series.length;e++)if(t.labels[e])for(var i=0;i<t.labels[e].length;i++)null!==t.labels[e][i]&&p.isNumber(t.labels[e][i])&&(t.maxX=Math.max(t.maxX,t.labels[e][i]),t.initialMaxX=Math.max(t.maxX,t.labels[e][i]),t.minX=Math.min(t.minX,t.labels[e][i]),t.initialMinX=Math.min(t.minX,t.labels[e][i]))}(),t.noLabelsProvided&&0===e.xaxis.categories.length&&(t.maxX=t.labels[t.labels.length-1],t.initialMaxX=t.labels[t.labels.length-1],t.minX=1,t.initialMinX=1),t.isXNumeric||t.noLabelsProvided||t.dataFormatXNumeric){var a;if(void 0===e.xaxis.tickAmount?(a=Math.round(t.svgWidth/150),"numeric"===e.xaxis.type&&t.dataPoints<30&&(a=t.dataPoints-1),a>t.dataPoints&&0!==t.dataPoints&&(a=t.dataPoints-1)):"dataPoints"===e.xaxis.tickAmount?(t.series.length>1&&(a=t.series[t.maxValsInArrayIndex].length-1),t.isXNumeric&&(a=t.maxX-t.minX-1)):a=e.xaxis.tickAmount,t.xTickAmount=a,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!t.dataFormatXNumeric){for(var s=[],r=t.minX-1;r<t.maxX;r++)s.push(r+1);t.xAxisScale={result:s,niceMin:s[0],niceMax:s[s.length-1]}}else t.xAxisScale=this.scales.setXScale(t.minX,t.maxX);else t.xAxisScale=this.scales.linearScale(1,a,a),t.noLabelsProvided&&t.labels.length>0&&(t.xAxisScale=this.scales.linearScale(1,t.labels.length,a-1),t.seriesX=t.labels.slice());i&&(t.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&t.labels.length&&(t.xTickAmount=t.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}},{key:"setZRange",value:function(){var t=this.w.globals;if(t.isDataXYZ)for(var e=0;e<t.series.length;e++)if(void 0!==t.seriesZ[e])for(var i=0;i<t.seriesZ[e].length;i++)null!==t.seriesZ[e][i]&&p.isNumber(t.seriesZ[e][i])&&(t.maxZ=Math.max(t.maxZ,t.seriesZ[e][i]),t.minZ=Math.min(t.minZ,t.seriesZ[e][i]))}},{key:"_handleSingleDataPoint",value:function(){var t=this.w.globals,e=this.w.config;if(t.minX===t.maxX){var i=new Y(this.ctx);if("datetime"===e.xaxis.type){var a=i.getDate(t.minX);a.setUTCDate(a.getDate()-2),t.minX=new Date(a).getTime();var s=i.getDate(t.maxX);s.setUTCDate(s.getDate()+2),t.maxX=new Date(s).getTime()}else("numeric"===e.xaxis.type||"category"===e.xaxis.type&&!t.noLabelsProvided)&&(t.minX=t.minX-2,t.initialMinX=t.minX,t.maxX=t.maxX+2,t.initialMaxX=t.maxX)}}},{key:"_getMinXDiff",value:function(){var t=this.w.globals;t.isXNumeric&&t.seriesX.forEach((function(e,i){1===e.length&&e.push(t.seriesX[t.maxValsInArrayIndex][t.seriesX[t.maxValsInArrayIndex].length-1]);var a=e.slice();a.sort((function(t,e){return t-e})),a.forEach((function(e,i){if(i>0){var s=e-a[i-1];s>0&&(t.minXDiff=Math.min(s,t.minXDiff))}})),1===t.dataPoints&&t.minXDiff===Number.MAX_VALUE&&(t.minXDiff=.5)}))}},{key:"_setStackedMinMax",value:function(){var t=this.w.globals,e=[],i=[];if(t.series.length)for(var a=0;a<t.series[t.maxValsInArrayIndex].length;a++)for(var s=0,r=0,o=0;o<t.series.length;o++)null!==t.series[o][a]&&p.isNumber(t.series[o][a])&&(t.series[o][a]>0?s=s+parseFloat(t.series[o][a])+1e-4:r+=parseFloat(t.series[o][a])),o===t.series.length-1&&(e.push(s),i.push(r));for(var n=0;n<e.length;n++)t.maxY=Math.max(t.maxY,e[n]),t.minY=Math.min(t.minY,i[n])}}]),t}(),q=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w;var a=this.w;this.xaxisFontSize=a.config.xaxis.labels.style.fontSize,this.axisFontFamily=a.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=a.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal="bar"===a.config.chart.type&&a.config.plotOptions.bar.horizontal,this.xAxisoffX=0,"bottom"===a.config.xaxis.position&&(this.xAxisoffX=a.globals.gridHeight),this.drawnLabels=[],this.axesUtils=new B(i)}return a(t,[{key:"drawYaxis",value:function(t){var e=this,i=this.w,a=new b(this.ctx),s=i.config.yaxis[t].labels.style,r=s.fontSize,o=s.fontFamily,n=s.fontWeight,l=a.group({class:"apexcharts-yaxis",rel:t,transform:"translate("+i.globals.translateYAxisX[t]+", 0)"});if(this.axesUtils.isYAxisHidden(t))return l;var h=a.group({class:"apexcharts-yaxis-texts-g"});l.add(h);var c=i.globals.yAxisScale[t].result.length-1,d=i.globals.gridHeight/c,g=i.globals.translateY,u=i.globals.yLabelFormatters[t],p=i.globals.yAxisScale[t].result.slice();
vendor: 5,148 bytes, line 60674
60674p=this.axesUtils.checkForReversedLabels(t,p);var f="";if(i.config.yaxis[t].labels.show)for(var x=function(l){var x=p[l];x=u(x,l,i);var b=i.config.yaxis[t].labels.padding;i.config.yaxis[t].opposite&&0!==i.config.yaxis.length&&(b*=-1);var m=e.axesUtils.getYAxisForeColor(s.colors,t),v=a.drawText({x:b,y:g+c/10+i.config.yaxis[t].labels.offsetY+1,text:x,textAnchor:i.config.yaxis[t].opposite?"start":"end",fontSize:r,fontFamily:o,fontWeight:n,foreColor:Array.isArray(m)?m[l]:m,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+s.cssClass});l===c&&(f=v),h.add(v);var y=document.createElementNS(i.globals.SVGNS,"title");if(y.textContent=Array.isArray(x)?x.join(" "):x,v.node.appendChild(y),0!==i.config.yaxis[t].labels.rotate){var w=a.rotateAroundCenter(f.node),k=a.rotateAroundCenter(v.node);v.node.setAttribute("transform","rotate(".concat(i.config.yaxis[t].labels.rotate," ").concat(w.x," ").concat(k.y,")"))}g+=d},m=c;m>=0;m--)x(m);if(void 0!==i.config.yaxis[t].title.text){var v=a.group({class:"apexcharts-yaxis-title"}),y=0;i.config.yaxis[t].opposite&&(y=i.globals.translateYAxisX[t]);var w=a.drawText({x:y,y:i.globals.gridHeight/2+i.globals.translateY+i.config.yaxis[t].title.offsetY,text:i.config.yaxis[t].title.text,textAnchor:"end",foreColor:i.config.yaxis[t].title.style.color,fontSize:i.config.yaxis[t].title.style.fontSize,fontWeight:i.config.yaxis[t].title.style.fontWeight,fontFamily:i.config.yaxis[t].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+i.config.yaxis[t].title.style.cssClass});v.add(w),l.add(v)}var k=i.config.yaxis[t].axisBorder,A=31+k.offsetX;if(i.config.yaxis[t].opposite&&(A=-31-k.offsetX),k.show){var S=a.drawLine(A,i.globals.translateY+k.offsetY-2,A,i.globals.gridHeight+i.globals.translateY+k.offsetY+2,k.color,0,k.width);l.add(S)}return i.config.yaxis[t].axisTicks.show&&this.axesUtils.drawYAxisTicks(A,c,k,i.config.yaxis[t].axisTicks,t,d,l),l}},{key:"drawYaxisInversed",value:function(t){var e=this.w,i=new b(this.ctx),a=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),s=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});a.add(s);var r=e.globals.yAxisScale[t].result.length-1,o=e.globals.gridWidth/r+.1,n=o+e.config.xaxis.labels.offsetX,l=e.globals.xLabelFormatter,h=e.globals.yAxisScale[t].result.slice(),c=e.globals.timescaleLabels;c.length>0&&(this.xaxisLabels=c.slice(),r=(h=c.slice()).length),h=this.axesUtils.checkForReversedLabels(t,h);var d=c.length;if(e.config.xaxis.labels.show)for(var g=d?0:r;d?g<d:g>=0;d?g++:g--){var u=h[g];u=l(u,g,e);var p=e.globals.gridWidth+e.globals.padHorizontal-(n-o+e.config.xaxis.labels.offsetX);if(c.length){var f=this.axesUtils.getLabel(h,c,p,g,this.drawnLabels,this.xaxisFontSize);p=f.x,u=f.text,this.drawnLabels.push(f.text),0===g&&e.globals.skipFirstTimelinelabel&&(u=""),g===h.length-1&&e.globals.skipLastTimelinelabel&&(u="")}var x=i.drawText({x:p,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-("top"===e.config.xaxis.position?e.globals.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:u,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label "+e.config.xaxis.labels.style.cssClass});s.add(x),x.tspan(u);var m=document.createElementNS(e.globals.SVGNS,"title");m.textContent=u,x.node.appendChild(m),n+=o}return this.inversedYAxisTitleText(a),this.inversedYAxisBorder(a),a}},{key:"inversedYAxisBorder",value:function(t){var e=this.w,i=new b(this.ctx),a=e.config.xaxis.axisBorder;if(a.show){var s=0;"bar"===e.config.chart.type&&e.globals.isXNumeric&&(s-=15);var r=i.drawLine(e.globals.padHorizontal+s+a.offsetX,this.xAxisoffX,e.globals.gridWidth,this.xAxisoffX,a.color,0,a.height);t.add(r)}}},{key:"inversedYAxisTitleText",value:function(t){var e=this.w,i=new b(this.ctx);if(void 0!==e.config.xaxis.title.text){var a=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),s=i.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+e.config.xaxis.title.style.cssClass});a.add(s),t.add(a)}}},{key:"yAxisTitleRotate",value:function(t,e){var i=this.w,a=new b(this.ctx),s={width:0,height:0},r={width:0,height:0},o=i.globals.dom.baseEl.querySelector(" .apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-texts-g"));null!==o&&(s=o.getBoundingClientRect());var n=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-title text"));if(null!==n&&(r=n.getBoundingClientRect()),null!==n){var l=this.xPaddingForYAxisTitle(t,s,r,e);n.setAttribute("x",l.xPos-(e?10:0))}
vendor: 5,534 bytes, line 60674
60674if(null!==n){var h=a.rotateAroundCenter(n);n.setAttribute("transform","rotate(".concat(e?-1*i.config.yaxis[t].title.rotate:i.config.yaxis[t].title.rotate," ").concat(h.x," ").concat(h.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(t,e,i,a){var s=this.w,r=0,o=0,n=10;return void 0===s.config.yaxis[t].title.text||t<0?{xPos:o,padd:0}:(a?(o=e.width+s.config.yaxis[t].title.offsetX+i.width/2+n/2,0===(r+=1)&&(o-=n/2)):(o=-1*e.width+s.config.yaxis[t].title.offsetX+n/2+i.width/2,s.globals.isBarHorizontal&&(n=25,o=-1*e.width-s.config.yaxis[t].title.offsetX-n)),{xPos:o,padd:n})}},{key:"setYAxisXPosition",value:function(t,e){var i=this.w,a=0,s=0,r=18,o=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.map((function(n,l){var h=i.globals.ignoreYAxisIndexes.indexOf(l)>-1||!n.show||n.floating||0===t[l].width,c=t[l].width+e[l].width;n.opposite?i.globals.isBarHorizontal?(s=i.globals.gridWidth+i.globals.translateX-1,i.globals.translateYAxisX[l]=s-n.labels.offsetX):(s=i.globals.gridWidth+i.globals.translateX+o,h||(o=o+c+20),i.globals.translateYAxisX[l]=s-n.labels.offsetX+20):(a=i.globals.translateX-r,h||(r=r+c+20),i.globals.translateYAxisX[l]=a+n.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var t=this.w,e=t.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis");(e=p.listToArray(e)).forEach((function(e,i){var a=t.config.yaxis[i];if(a&&void 0!==a.labels.align){var s=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-texts-g")),r=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-label"));r=p.listToArray(r);var o=s.getBoundingClientRect();"left"===a.labels.align?(r.forEach((function(t,e){t.setAttribute("text-anchor","start")})),a.opposite||s.setAttribute("transform","translate(-".concat(o.width,", 0)"))):"center"===a.labels.align?(r.forEach((function(t,e){t.setAttribute("text-anchor","middle")})),s.setAttribute("transform","translate(".concat(o.width/2*(a.opposite?1:-1),", 0)"))):"right"===a.labels.align&&(r.forEach((function(t,e){t.setAttribute("text-anchor","end")})),a.opposite&&s.setAttribute("transform","translate(".concat(o.width,", 0)")))}}))}}]),t}(),Z=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w,this.documentEvent=p.bind(this.documentEvent,this)}return a(t,[{key:"addEventListener",value:function(t,e){var i=this.w;i.globals.events.hasOwnProperty(t)?i.globals.events[t].push(e):i.globals.events[t]=[e]}},{key:"removeEventListener",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){var a=i.globals.events[t].indexOf(e);-1!==a&&i.globals.events[t].splice(a,1)}}},{key:"fireEvent",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){e&&e.length||(e=[]);for(var a=i.globals.events[t],s=a.length,r=0;r<s;r++)a[r].apply(null,e)}}},{key:"setupEventHandlers",value:function(){var t=this,e=this.w,i=this.ctx,a=e.globals.dom.baseEl.querySelector(e.globals.chartClass);this.ctx.eventList.forEach((function(t){a.addEventListener(t,(function(t){var a=Object.assign({},e,{seriesIndex:e.globals.capturedSeriesIndex,dataPointIndex:e.globals.capturedDataPointIndex});"mousemove"===t.type||"touchmove"===t.type?"function"==typeof e.config.chart.events.mouseMove&&e.config.chart.events.mouseMove(t,i,a):"mouseleave"===t.type||"touchleave"===t.type?"function"==typeof e.config.chart.events.mouseLeave&&e.config.chart.events.mouseLeave(t,i,a):("mouseup"===t.type&&1===t.which||"touchend"===t.type)&&("function"==typeof e.config.chart.events.click&&e.config.chart.events.click(t,i,a),i.ctx.events.fireEvent("click",[t,i,a]))}),{capture:!1,passive:!0})})),this.ctx.eventList.forEach((function(i){e.globals.dom.baseEl.addEventListener(i,t.documentEvent,{passive:!0})})),this.ctx.core.setupBrushHandler()}},{key:"documentEvent",value:function(t){var e=this.w,i=t.target.className;if("click"===t.type){var a=e.globals.dom.baseEl.querySelector(".apexcharts-menu");a&&a.classList.contains("apexcharts-menu-open")&&"apexcharts-menu-icon"!==i&&a.classList.remove("apexcharts-menu-open")}e.globals.clientX="touchmove"===t.type?t.touches[0].clientX:t.clientX,e.globals.clientY="touchmove"===t.type?t.touches[0].clientY:t.clientY}}]),t}(),$=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w}return a(t,[{key:"setCurrentLocaleValues",value:function(t){var e=this.w.config.chart.locales;window.Apex.chart&&window.Apex.chart.locales&&window.Apex.chart.locales.length>0&&(e=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=e.filter((function(e){return e.name===t}))[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var a=p.extend(A,i);this.w.globals.locale=a.options}}]),t}(),J=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w}return a(t,[{key:"drawAxis",value:function(t,e){var i,a,s=this.w.globals,r=this.w.config,o=new G(this.ctx),n=new q(this.ctx);s.axisCharts&&"radar"!==t&&(s.isBarHorizontal?(a=n.drawYaxisInversed(0),i=o.drawXaxisInversed(0),s.dom.elGraphical.add(i),s.dom.elGraphical.add(a)):(i=o.drawXaxis(),s.dom.elGraphical.add(i),r.yaxis.map((function(t,e){-1===s.ignoreYAxisIndexes.indexOf(e)&&(a=n.drawYaxis(e),s.dom.Paper.add(a))}))))}}]),t}(),Q=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w}return a(t,[{key:"drawXCrosshairs",value:function(){var t=this.w,e=new b(this.ctx),i=new x(this.ctx),a=t.config.xaxis.crosshairs.fill.gradient,s=t.config.xaxis.crosshairs.dropShadow,r=t.config.xaxis.crosshairs.fill.type,o=a.colorFrom,n=a.c
vendor: 1,080 bytes, line 60674
60674olorTo,l=a.opacityFrom,h=a.opacityTo,c=a.stops,d=s.enabled,g=s.left,u=s.top,f=s.blur,m=s.color,v=s.opacity,y=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){"gradient"===r&&(y=e.drawGradient("vertical",o,n,l,h,null,c,null));var w=e.drawRect();1===t.config.xaxis.crosshairs.width&&(w=e.drawLine());var k=t.globals.gridHeight;(!p.isNumber(k)||k<0)&&(k=0);var A=t.config.xaxis.crosshairs.width;(!p.isNumber(A)||A<0)&&(A=0),w.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:k,width:A,height:k,fill:y,filter:"none","fill-opacity":t.config.xaxis.crosshairs.opacity,stroke:t.config.xaxis.crosshairs.stroke.color,"stroke-width":t.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":t.config.xaxis.crosshairs.stroke.dashArray}),d&&(w=i.dropShadow(w,{left:g,top:u,blur:f,color:m,opacity:v})),t.globals.dom.elGraphical.add(w)}}},{key:"drawYCrosshairs",value:function(){var t=this.w,e=new b(this.ctx),i=t.config.yaxis[0].crosshairs,a=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){var s=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,
vendor: 4,808 bytes, line 60674
60674i.stroke.dashArray,i.stroke.width);s.attr({class:"apexcharts-ycrosshairs"}),t.globals.dom.elGraphical.add(s)}var r=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,0,0);r.attr({class:"apexcharts-ycrosshairs-hidden"}),t.globals.dom.elGraphical.add(r)}}]),t}(),K=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w}return a(t,[{key:"checkResponsiveConfig",value:function(t){var e=this,i=this.w,a=i.config;if(0!==a.responsive.length){var s=a.responsive.slice();s.sort((function(t,e){return t.breakpoint>e.breakpoint?1:e.breakpoint>t.breakpoint?-1:0})).reverse();var r=new H({}),o=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=s[0].breakpoint,o=window.innerWidth>0?window.innerWidth:screen.width;if(o>a){var n=y.extendArrayProps(r,i.globals.initialConfig,i);t=p.extend(n,t),t=p.extend(i.config,t),e.overrideResponsiveOptions(t)}else for(var l=0;l<s.length;l++)o<s[l].breakpoint&&(t=y.extendArrayProps(r,s[l].options,i),t=p.extend(i.config,t),e.overrideResponsiveOptions(t))};if(t){var n=y.extendArrayProps(r,t,i);n=p.extend(i.config,n),o(n=p.extend(n,t))}else o({})}}},{key:"overrideResponsiveOptions",value:function(t){var e=new H(t).init({responsiveOverride:!0});this.w.config=e}}]),t}(),tt=function(){function t(i){e(this,t),this.ctx=i,this.colors=[],this.w=i.w;var a=this.w;this.isColorFn=!1,this.isHeatmapDistributed="treemap"===a.config.chart.type&&a.config.plotOptions.treemap.distributed||"heatmap"===a.config.chart.type&&a.config.plotOptions.heatmap.distributed,this.isBarDistributed=a.config.plotOptions.bar.distributed&&("bar"===a.config.chart.type||"rangeBar"===a.config.chart.type)}return a(t,[{key:"init",value:function(){this.setDefaultColors()}},{key:"setDefaultColors",value:function(){var t=this,e=this.w,i=new p;if(e.globals.dom.elWrap.classList.add("apexcharts-theme-".concat(e.config.theme.mode)),void 0===e.config.colors?e.globals.colors=this.predefined():(e.globals.colors=e.config.colors,Array.isArray(e.config.colors)&&e.config.colors.length>0&&"function"==typeof e.config.colors[0]&&(e.globals.colors=e.config.series.map((function(i,a){var s=e.config.colors[a];return s||(s=e.config.colors[0]),"function"==typeof s?(t.isColorFn=!0,s({value:e.globals.axisCharts?e.globals.series[a][0]?e.globals.series[a][0]:0:e.globals.series[a],seriesIndex:a,dataPointIndex:a,w:e})):s})))),e.globals.seriesColors.map((function(t,i){t&&(e.globals.colors[i]=t)})),e.config.theme.monochrome.enabled){var a=[],s=e.globals.series.length;(this.isBarDistributed||this.isHeatmapDistributed)&&(s=e.globals.series[0].length*e.globals.series.length);for(var r=e.config.theme.monochrome.color,o=1/(s/e.config.theme.monochrome.shadeIntensity),n=e.config.theme.monochrome.shadeTo,l=0,h=0;h<s;h++){var c=void 0;"dark"===n?(c=i.shadeColor(-1*l,r),l+=o):(c=i.shadeColor(l,r),l+=o),a.push(c)}e.globals.colors=a.slice()}var d=e.globals.colors.slice();this.pushExtraColors(e.globals.colors);["fill","stroke"].forEach((function(i){void 0===e.config[i].colors?e.globals[i].colors=t.isColorFn?e.config.colors:d:e.globals[i].colors=e.config[i].colors.slice(),t.pushExtraColors(e.globals[i].colors)})),void 0===e.config.dataLabels.style.colors?e.globals.dataLabels.style.colors=d:e.globals.dataLabels.style.colors=e.config.dataLabels.style.colors.slice(),this.pushExtraColors(e.globals.dataLabels.style.colors,50),void 0===e.config.plotOptions.radar.polygons.fill.colors?e.globals.radarPolygons.fill.colors=["dark"===e.config.theme.mode?"#424242":"none"]:e.globals.radarPolygons.fill.colors=e.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(e.globals.radarPolygons.fill.colors,20),void 0===e.config.markers.colors?e.globals.markers.colors=d:e.globals.markers.colors=e.config.markers.colors.slice(),this.pushExtraColors(e.globals.markers.colors)}},{key:"pushExtraColors",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=e||a.globals.series.length;if(null===i&&(i=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===a.config.chart.type&&a.config.plotOptions.heatmap.colorScale.inverse),i&&a.globals.series.length&&(s=a.globals.series[a.globals.maxValsInArrayIndex].length*a.globals.series.length),t.length<s)for(var r=s-t.length,o=0;o<r;o++)t.push(t[o])}},{key:"updateThemeOptions",value:function(t){t.chart=t.chart||{},t.tooltip=t.tooltip||{};var e=t.theme.mode||"light",i=t.theme.palette?t.theme.palette:"dark"===e?"palette4":"palette1",a=t.chart.foreColor?t.chart.foreColor:"dark"===e?"#f6f7f8":"#373d3f";return t.tooltip.theme=e,t.chart.foreColor=a,t.theme.palette=i,t}},{key:"predefined",value:function(){switch(this.w.config.theme.palette){case"palette1":this.colors=["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"];break;case"palette2":this.colors=["#3f51b5","#03a9f4","#4caf50","#f9ce1d","#F
60674F9800"];break;case"palette3":this.colors=["#33b2df","#546E7A","#d4526e","#13d8aa","#A5978B"];break;case"palette4":this.colors=["#4ecdc4","#c7f464","#81D4FA","#fd6a6a","#546E7A"];break;case"palette5":this.colors=["#2b908f","#f9a3a4","#90ee7e","#fa4443","#69d2e7"];break;case"palette6":this.colors=["#449DD1","#F86624","#EA3546","#662E9B","#C5D86D"];break;case"palette7":this.colors=["#D7263D","#1B998B","#2E294E","#F46036","#E2C044"];break;case"palette8":this.colors=["#662E9B","#F86624","#F9C80E","#EA3546","#43BCCD"];break;case"palette9":this.colors=["#5C4742","#A5978B","#8D5B4C","#5A2A27","#C4BBAF"];break;case"palette10":this.colors=["#A300D6","#7D02EB","#5653FE","#2983FF","#00B1F2"];break;default:this.colors=["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"]}return this.colors}}]),t}(),et=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w}return a(t,[{key:"draw",value:function(){this.drawTitleSubtitle("title"),this.drawTitleSubtitle("subtitle")}},{key:"drawTitleSubtitle",value:function(t){var e=this.w,i="title"===t?e.config.title:e.config.subtitle,a=e.globals.svgWidth/2,s=i.offsetY,r="middle";if("left"===i.align?(a=10,r="start"):"right"===i.align&&(a=e.globals.svgWidth-10,r="end"),a+=i.offsetX,s=s+parseInt(i.style.fontSize,10)+i.margin/2,void 0!==i.text){var o=new b(this.ctx).drawText({x:a,y:s,text:i.text,textAnchor:r,fontSize:i.style.fontSize,fontFamily:i.style.fontFamily,fontWeight:i.style.fontWeight,foreColor:i.style.color,opacity:1});o.node.setAttribute("class","apexcharts-".concat(t,"-text")),e.globals.dom.Paper.add(o)}}}]),t}(),it=function(){function t(i){e(this,t),this.w=i.w,this.dCtx=i}return a(t,[{key:"getTitleSubtitleCoords",value:function(t){var e=this.w,i=0,a=0,s="title"===t?e.config.title.floating:e.config.subtitle.floating,r=e.globals.dom.baseEl.querySelector(".apexcharts-".concat(t,"-text"));if(null!==r&&!s){var o=r.getBoundingClientRect();i=o.width,a=e.globals.axisCharts?o.height+5:o.height}return{width:i,height:a}}},{key:"getLegendsRect",value:function(){var t=this.w,e=t.globals.dom.baseEl.querySelector(".apexcharts-legend");t.config.legend.height||"top"!==t.config.legend.position&&"bottom"!==t.config.legend.position||(e.style.maxHeight=t.globals.svgHeight/2+"px");var i=Object.assign({},p.getBoundingClientRect(e));return null!==e&&!t.config.legend.floating&&t.config.legend.show?this.dCtx.lgRect={x:i.x,y:i.y,height:i.height,width:0===i.height?0:i.width}:this.dCtx.lgRect={x:0,y:0,height:0,width:0},"left"!==t.config.legend.position&&"right"!==t.config.legend.position||1.5*this.dCtx.lgRect.width>t.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getLargestStringFromMultiArr",value:function(t,e){var i=t;if(this.w.globals.isMultiLineX){var a=e.map((function(t,e){return Array.isArray(t)?t.length:1})),s=Math.max.apply(Math,g(a));i=e[a.indexOf(s)]}return i}}]),t}(),at=function(){function t(i){e(this,t),this.w=i.w,this.dCtx=i}return a(t,[{key:"getxAxisLabelsCoords",value:function(){var t,e=this.w,i=e.globals.labels.slice();if(e.config.xaxis.convertedCatToNumeric&&0===i.length&&(i=e.globals.categoryLabels),e.globals.timescaleLabels.length>0){var a=this.getxAxisTimeScaleLabelsCoords();t={width:a.width,height:a.height},e.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==e.config.legend.position&&"right"!==e.config.legend.position||e.config.legend.floating?0:this.dCtx.lgRect.width;var s=e.globals.xLabelFormatter,r=p.getLargestStringFromArr(i),o=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,i);
vendor: 30,997 bytes, line 60674
60674e.globals.isBarHorizontal&&(o=r=e.globals.yAxisScale[0].result.reduce((function(t,e){return t.length>e.length?t:e}),0));var n=new W(this.dCtx.ctx),l=r;r=n.xLabelFormat(s,r,l,{i:void 0,dateFormatter:new Y(this.dCtx.ctx).formatDate,w:e}),o=n.xLabelFormat(s,o,l,{i:void 0,dateFormatter:new Y(this.dCtx.ctx).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&void 0===r||""===String(r).trim())&&(o=r="1");var h=new b(this.dCtx.ctx),c=h.getTextRects(r,e.config.xaxis.labels.style.fontSize),d=c;if(r!==o&&(d=h.getTextRects(o,e.config.xaxis.labels.style.fontSize)),(t={width:c.width>=d.width?c.width:d.width,height:c.height>=d.height?c.height:d.height}).width*i.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==e.config.xaxis.labels.rotate||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.globals.rotateXLabels=!0;var g=function(t){return h.getTextRects(t,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,"rotate(".concat(e.config.xaxis.labels.rotate," 0 0)"),!1)};c=g(r),r!==o&&(d=g(o)),t.height=(c.height>d.height?c.height:d.height)/1.5,t.width=c.width>d.width?c.width:d.width}}else e.globals.rotateXLabels=!1}return e.config.xaxis.labels.show||(t={width:0,height:0}),{width:t.width,height:t.height}}},{key:"getxAxisTitleCoords",value:function(){var t=this.w,e=0,i=0;if(void 0!==t.config.xaxis.title.text){var a=new b(this.dCtx.ctx).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=a.width,i=a.height}return{width:e,height:i}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var t,e=this.w;this.dCtx.timescaleLabels=e.globals.timescaleLabels.slice();var i=this.dCtx.timescaleLabels.map((function(t){return t.value})),a=i.reduce((function(t,e){return void 0===t?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):t.length>e.length?t:e}),0);return 1.05*(t=new b(this.dCtx.ctx).getTextRects(a,e.config.xaxis.labels.style.fontSize)).width*i.length>e.globals.gridWidth&&0!==e.config.xaxis.labels.rotate&&(e.globals.overlappingXLabels=!0),t}},{key:"additionalPaddingXLabels",value:function(t){var e=this,i=this.w,a=i.globals,s=i.config,r=s.xaxis.type,o=t.width;a.skipLastTimelinelabel=!1,a.skipFirstTimelinelabel=!1;var n=i.config.yaxis[0].opposite&&i.globals.isBarHorizontal,l=function(t,n){(function(t){return-1!==a.collapsedSeriesIndices.indexOf(t)})(n)||function(t){if(e.dCtx.timescaleLabels&&e.dCtx.timescaleLabels.length){var n=e.dCtx.timescaleLabels[0],l=e.dCtx.timescaleLabels[e.dCtx.timescaleLabels.length-1].position+o/1.75-e.dCtx.yAxisWidthRight,h=n.position-o/1.75+e.dCtx.yAxisWidthLeft,c="right"===i.config.legend.position&&e.dCtx.lgRect.width>0?e.dCtx.lgRect.width:0;l>a.svgWidth-a.translateX-c&&(a.skipLastTimelinelabel=!0),h<-(t.show&&!t.floating||"bar"!==s.chart.type&&"candlestick"!==s.chart.type&&"rangeBar"!==s.chart.type&&"boxPlot"!==s.chart.type?10:o/1.75)&&(a.skipFirstTimelinelabel=!0)}else"datetime"===r?e.dCtx.gridPad.right<o&&!a.rotateXLabels&&(a.skipLastTimelinelabel=!0):"datetime"!==r&&e.dCtx.gridPad.right<o/2-e.dCtx.yAxisWidthRight&&!a.rotateXLabels&&!i.config.xaxis.labels.trim&&("between"!==i.config.xaxis.tickPlacement||i.globals.isBarHorizontal)&&(e.dCtx.xPadRight=o/2+1)}(t)};s.yaxis.forEach((function(t,i){n?(e.dCtx.gridPad.left<o&&(e.dCtx.xPadLeft=o/2+1),e.dCtx.xPadRight=o/2+1):l(t,i)}))}}]),t}(),st=function(){function t(i){e(this,t),this.w=i.w,this.dCtx=i}return a(t,[{key:"getyAxisLabelsCoords",value:function(){var t=this,e=this.w,i=[],a=10,s=new B(this.dCtx.ctx);return e.config.yaxis.map((function(r,o){var n=e.globals.yAxisScale[o],l=0;if(!s.isYAxisHidden(o)&&r.labels.show&&void 0!==r.labels.minWidth&&(l=r.labels.minWidth),!s.isYAxisHidden(o)&&r.labels.show&&n.result.length){var h=e.globals.yLabelFormatters[o],c=n.niceMin===Number.MIN_VALUE?0:n.niceMin,d=String(c).length>String(n.niceMax).length?c:n.niceMax,g=h(d,{seriesIndex:o,dataPointIndex:-1,w:e}),u=g;if(void 0!==g&&0!==g.length||(g=d),e.globals.isBarHorizontal){a=0;var f=e.globals.labels.slice();g=h(g=p.getLargestStringFromArr(f),{seriesIndex:o,dataPointIndex:-1,w:e}),u=t.dCtx.dimHelpers.getLargestStringFromMultiArr(g,f)}var x=new b(t.dCtx.ctx),m="rotate(".concat(r.labels.rotate," 0 0)"),v=x.getTextRects(g,r.labels.style.fontSize,r.labels.style.fontFamily,m,!1),y=v;g!==u&&(y=x.getTextRects(u,r.labels.style.fontSize,r.labels.style.fontFamily,m,!1)),i.push({width:(l>y.width||l>v.width?l:y.width>v.width?y.width:v.width)+a,height:y.height>v.height?y.height:v.height})}else i.push({width:0,height:0})})),i}},{key:"getyAxisTitleCoords",value:function(){var t=this,e=this.w,i=[];return e.config.yaxis.map((function(e,a){if(e.show&&void 0!==e.title.text){var s=new b(t.dCtx.ctx),r="rotate(".concat(e.title.rotate," 0 0)"),o=s.getTextRects(e.title.text,e.title.style.fontSize,e.title.style.fontFamily,r,!1);i.push({width:o.width,height:o.height})}else i.push({width:0,height:0})})),i}},{key:"getTotalYAxisWidth",value:function(){var t=this.w,e=0,i=0,a=0,s=t.globals.yAxisScale.length>1?10:0,r=new B(this.dCtx.ctx),o=function(o,n){var l=t.config.yaxis[n].floating,h=0;o.width>0&&!l?(h=o.width+s,function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1}(n)&&(h=h-o.width-s)):h=l||r.isYAxisHidden(n)?0:5,t.config.yaxis[n].opposite?a+=h:i+=h,e+=h};return t.globals.yLabelsCoords.map((function(t,e){o(t,e)})),t.globals.yTitleCoords.map((function(t,e){o(t,e)})),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.globals.yLabelsCoords[0].width+t.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=a,e}}]),t}(),rt=function(){function t(i){e(this,t),this.w=i.w,this.dCtx=i}return a(t,[{key:"gridPadForColumnsInNumericAxis",value:function(t){var e=this.w;if(e.globals.noData||e.globals.allSeriesCollapsed)return 0;var i=function(t){return"bar"===t||"rangeBar"===t||"candlestick"===t||"boxPlot"===t},a=e.config.chart.type,s=0,r=i(a)?e.config.series.length:1;if(e.globals.comboBarCount>0&&(r=e.globals.comboBarCount),e.globals.collapsedSeries.forEach((function(t){i(t.type)&&(r-=1)})),e.config.chart.stacked&&(r=1),(i(a)||e.globals.comboBarCount>0)&&e.globals.isXNumeric&&!e.globals.isBarHorizontal&&r>0){var o,n,l=Math.abs(e.globals.initialMaxX-e.globals.initialMinX);l<=3&&(l=e.globals.dataPoints),o=l/t,e.globals.minXDiff&&e.globals.minXDiff/o>0&&(n=e.globals.minXDiff/o),n>t/2&&(n/=2),(s=n/r*parseInt(e.config.plotOptions.bar.columnWidth,10)/100)<1&&(s=1),s=s/(r>1?1:1.5)+5,e.globals.barPadForNumericAxis=s}return s}},{key:"gridPadFortitleSubtitle",value:function(){var t=this,e=this.w,i=e.globals,a=this.dCtx.isSparkline||!e.globals.axisCharts?0:10;["title","subtitle"].forEach((function(i){void 0!==e.config[i].text?a+=e.config[i].margin:a+=t.dCtx.isSparkline||!e.globals.axisCharts?0:5})),!e.config.legend.show||"bottom"!==e.config.legend.position||e.config.legend.floating||e.globals.axisCharts||(a+=10);var s=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),r=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");i.gridHeight=i.gridHeight-s.height-r.height-a,i.translateY=i.translateY+s.height+r.height+a}},{key:"setGridXPosForDualYAxis",value:function(t,e){var i=this.w,a=new B(this.dCtx.ctx);i.config.yaxis.map((function(s,r){-1!==i.globals.ignoreYAxisIndexes.indexOf(r)||s.floating||a.isYAxisHidden(r)||(s.opposite&&(i.globals.translateX=i.globals.translateX-(e[r].width+t[r].width)-parseInt(i.config.yaxis[r].labels.style.fontSize,10)/1.2-12),i.globals.translateX<2&&(i.globals.translateX=2))}))}}]),t}(),ot=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new it(this),this.dimYAxis=new st(this),this.dimXAxis=new at(this),this.dimGrid=new rt(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return a(t,[{key:"plotCoords",value:function(){var t=this.w.globals;this.lgRect=this.dimHelpers.getLegendsRect(),t.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),t.gridHeight=t.gridHeight-this.gridPad.top-this.gridPad.bottom,t.gridWidth=t.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var e=this.dimGrid.gridPadForColumnsInNumericAxis(t.gridWidth);t.gridWidth=t.gridWidth-2*e,t.translateX=t.translateX+this.gridPad.left+this.xPadLeft+(e>0?e+4:0),t.translateY=t.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var t=this,e=this.w,i=e.globals,a=this.dimYAxis.getyAxisLabelsCoords(),s=this.dimYAxis.getyAxisTitleCoords();e.globals.yLabelsCoords=[],e.globals.yTitleCoords=[],e.config.yaxis.map((function(t,i){e.globals.yLabelsCoords.push({width:a[i].width,index:i}),e.globals.yTitleCoords.push({width:s[i].width,index:i})})),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var r=this.dimXAxis.getxAxisLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(r,o),i.translateXAxisY=e.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=e.globals.rotateXLabels&&e.globals.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(e.config.xaxis.labels.style.fontSize,10)/1.5*-1),i.translateXAxisY=i.translateXAxisY+e.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+e.config.xaxis.labels.offsetX;var n=this.yAxisWidth,l=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight-o.height,i.xAxisLabelsWidth=this.xAxisWidth,i.xAxisHeight=this.xAxisHeight;var h=10;("radar"===e.config.chart.type||this.isSparkline)&&(n=0,l=i.goldenPadding),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===e.config.chart.type)&&(n=0,l=0,h=0),this.isSparkline||this.dimXAxis.additionalPaddingXLabels(r);var c=function(){i.translateX=n,i.gridHeight=i.svgHeight-t.lgRect.height-l-(t.isSparkline||"treemap"===e.config.chart.type?0:e.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-n};switch("top"===e.config.xaxis.position&&(h=i.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case"bottom":i.translateY=h,c();break;case"top":i.translateY=this.lgRect.height+h,c();break;case"left":i.translateY=h,i.translateX=this.lgRect.width+n,i.gridHeight=i.svgHeight-l-12,i.gridWidth=i.svgWidth-this.lgRect.width-n;break;case"right":i.translateY=h,i.translateX=n,i.gridHeight=i.svgHeight-l-12,i.gridWidth=i.svgWidth-this.lgRect.width-n-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(s,a),new q(this.ctx).setYAxisXPosition(a,s)}},{key:"setDimensionsForNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=t.config,a=0;t.config.legend.show&&!t.config.legend.floating&&(a=20);var s="pie"===i.chart.type||"polarArea"===i.chart.type||"donut"===i.chart.type?"pie":"radialBar",r=i.plotOptions[s].offsetY,o=i.plotOptions[s].offsetX;if(!i.legend.show||i.legend.floating)return e.gridHeight=e.svgHeight-i.grid.padding.left+i.grid.padding.right,e.gridWidth=e.gridHeight,e.translateY=r,void(e.translateX=o+(e.svgWidth-e.gridWidth)/2);switch(i.legend.position){case"bottom":e.gridHeight=e.svgHeight-this.lgRect.height-e.goldenPadding,e.gridWidth=e.svgWidth,e.translateY=r-10,e.translateX=o+(e.svgWidth-e.gridWidth)/2;break;case"top":e.gridHeight=e.svgHeight-this.lgRect.height-e.goldenPadding,e.gridWidth=e.svgWidth,e.translateY=this.lgRect.height+r+10,e.translateX=o+(e.svgWidth-e.gridWidth)/2;break;case"left":e.gridWidth=e.svgWidth-this.lgRect.width-a,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=o+this.lgRect.width+a;break;case"right":e.gridWidth=e.svgWidth-this.lgRect.width-a-5,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=o+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(t,e){var i=this.w;this.xAxisHeight=(t.height+e.height)*(i.globals.isMultiLineX?1.2:i.globals.LINE_HEIGHT_RATIO)+(i.globals.rotateXLabels?22:10),this.xAxisWidth=t.width,this.xAxisHeight-e.height>i.config.xaxis.labels.maxHeight&&(this.xAxisHeight=i.config.xaxis.labels.maxHeight),i.config.xaxis.labels.minHeight&&this.xAxisHeight<i.config.xaxis.labels.minHeight&&(this.xAxisHeight=i.config.xaxis.labels.minHeight),i.config.xaxis.floating&&(this.xAxisHeight=0);var a=0,s=0;i.config.yaxis.forEach((function(t){a+=t.labels.minWidth,s+=t.labels.maxWidth})),this.yAxisWidth<a&&(this.yAxisWidth=a),this.yAxisWidth>s&&(this.yAxisWidth=s)}}]),t}(),nt=function(){function t(i){e(this,t),this.w=i.w,this.lgCtx=i}return a(t,[{key:"getLegendStyles",value:function(){var t=document.createElement("style");t.setAttribute("type","text/css");var e=document.createTextNode("\t\n    \t\n      .apexcharts-legend {\t\n        display: flex;\t\n        overflow: auto;\t\n        padding: 0 10px;\t\n      }\t\n      .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\t\n        flex-wrap: wrap\t\n      }\t\n      .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\t\n        flex-direction: column;\t\n        bottom: 0;\t\n      }\t\n      .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\t\n        justify-content: flex-start;\t\n      }\t\n      .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\t\n        justify-content: center;  \t\n      }\t\n      .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\t\n        justify-content: flex-end;\t\n      }\t\n      .apexcharts-legend-series {\t\n        cursor: pointer;\t\n        line-height: normal;\t\n      }\t\n      .apexcharts-legend.apx-legend-position-bottom .apexcharts-legend-series, .apexcharts-legend.apx-legend-position-top .apexcharts-legend-series{\t\n        display: flex;\t\n        align-items: center;\t\n      }\t\n      .apexcharts-legend-text {\t\n        position: relative;\t\n        font-size: 14px;\t\n      }\t\n      .apexcharts-legend-text *, .apexcharts-legend-marker * {\t\n        pointer-events: none;\t\n      }\t\n      .apexcharts-legend-marker {\t\n        position: relative;\t\n        display: inline-block;\t\n        cursor: pointer;\t\n        margin-right: 3px;\t\n        border-style: solid;\n      }\t\n      \t\n      .apexcharts-legend.apexcharts-align-right .apexcharts-legend-series, .apexcharts-legend.apexcharts-align-left .apexcharts-legend-series{\t\n        display: inline-block;\t\n      }\t\n      .apexcharts-legend-series.apexcharts-no-click {\t\n        cursor: auto;\t\n      }\t\n      .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\t\n        display: none !important;\t\n      }\t\n      .apexcharts-inactive-legend {\t\n        opacity: 0.45;\t\n      }");return t.appendChild(e),t}},{key:"getLegendBBox",value:function(){var t=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),e=t.width;return{clwh:t.height,clww:e}}},{key:"appendToForeignObject",value:function(){var t=this.w.globals;t.dom.elLegendForeign=document.createElementNS(t.SVGNS,"foreignObject");var e=t.dom.elLegendForeign;e.setAttribute("x",0),e.setAttribute("y",0),e.setAttribute("width",t.svgWidth),e.setAttribute("height",t.svgHeight),t.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),e.appendChild(t.dom.elLegendWrap),e.appendChild(this.getLegendStyles()),t.dom.Paper.node.insertBefore(e,t.dom.elGraphical.node)}},{key:"toggleDataSeries",value:function(t,e){var i=this,a=this.w;if(a.globals.axisCharts||"radialBar"===a.config.chart.type){a.globals.resized=!0;var s=null,r=null;if(a.globals.risingSeries=[],a.globals.axisCharts?(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(t,"']")),r=parseInt(s.getAttribute("data:realIndex"),10)):(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(t+1,"']")),r=parseInt(s.getAttribute("rel"),10)-1),e)[{cs:a.globals.collapsedSeries,csi:a.globals.collapsedSeriesIndices},{cs:a.globals.ancillaryCollapsedSeries,csi:a.globals.ancillaryCollapsedSeriesIndices}].forEach((function(t){i.riseCollapsedSeries(t.cs,t.csi,r)}));else this.hideSeries({seriesEl:s,realIndex:r})}else{var o=a.globals.dom.Paper.select(" .apexcharts-series[rel='".concat(t+1,"'] path")),n=a.config.chart.type;if("pie"===n||"polarArea"===n||"donut"===n){var l=a.config.plotOptions.pie.donut.labels;new b(this.lgCtx.ctx).pathMouseDown(o.members[0],null),this.lgCtx.ctx.pie.printDataLabelsInner(o.members[0].node,l)}o.fire("click")}}},{key:"hideSeries",value:function(t){var e=t.seriesEl,i=t.realIndex,a=this.w,s=p.clone(a.config.series);if(a.globals.axisCharts){var r=!1;if(a.config.yaxis[i]&&a.config.yaxis[i].show&&a.config.yaxis[i].showAlways&&(r=!0,a.globals.ancillaryCollapsedSeriesIndices.indexOf(i)<0&&(a.globals.ancillaryCollapsedSeries.push({index:i,data:s[i].data.slice(),type:e.parentNode.className.baseVal.split("-")[1]}),a.globals.ancillaryCollapsedSeriesIndices.push(i))),!r){a.globals.collapsedSeries.push({index:i,data:s[i].data.slice(),type:e.parentNode.className.baseVal.split("-")[1]}),a.globals.collapsedSeriesIndices.push(i);var o=a.globals.risingSeries.indexOf(i);a.globals.risingSeries.splice(o,1)}}else a.globals.collapsedSeries.push({index:i,data:s[i]}),a.globals.collapsedSeriesIndices.push(i);for(var n=e.childNodes,l=0;l<n.length;l++)n[l].classList.contains("apexcharts-series-markers-wrap")&&(n[l].classList.contains("apexcharts-hide")?n[l].classList.remove("apexcharts-hide"):n[l].classList.add("apexcharts-hide"));a.globals.allSeriesCollapsed=a.globals.collapsedSeries.length===a.config.series.length,s=this._getSeriesBasedOnCollapsedState(s),this.lgCtx.ctx.updateHelpers._updateSeries(s,a.config.chart.animations.dynamicAnimation.enabled)}},{key:"riseCollapsedSeries",value:function(t,e,i){var a=this.w,s=p.clone(a.config.series);if(t.length>0){for(var r=0;r<t.length;r++)t[r].index===i&&(a.globals.axisCharts?(s[i].data=t[r].data.slice(),t.splice(r,1),e.splice(r,1),a.globals.risingSeries.push(i)):(s[i]=t[r].data,t.splice(r,1),e.splice(r,1),a.globals.risingSeries.push(i)));s=this._getSeriesBasedOnCollapsedState(s),this.lgCtx.ctx.updateHelpers._updateSeries(s,a.config.chart.animations.dynamicAnimation.enabled)}}},{key:"_getSeriesBasedOnCollapsedState",value:function(t){var e=this.w;return e.globals.axisCharts?t.forEach((function(i,a){e.globals.collapsedSeriesIndices.indexOf(a)>-1&&(t[a].data=[])})):t.forEach((function(i,a){e.globals.collapsedSeriesIndices.indexOf(a)>-1&&(t[a]=0)})),t}}]),t}(),lt=function(){function t(i,a){e(this,t),this.ctx=i,this.w=i.w,this.onLegendClick=this.onLegendClick.bind(this),this.onLegendHovered=this.onLegendHovered.bind(this),this.isBarsDistributed="bar"===this.w.config.chart.type&&this.w.config.plotOptions.bar.distributed&&1===this.w.config.series.length,this.legendHelpers=new nt(this)}return a(t,[{key:"init",value:function(){var t=this.w,e=t.globals,i=t.config;if((i.legend.showForSingleSeries&&1===e.series.length||this.isBarsDistributed||e.series.length>1||!e.axisCharts)&&i.legend.show){for(;e.dom.elLegendWrap.firstChild;)e.dom.elLegendWrap.removeChild(e.dom.elLegendWrap.firstChild);this.drawLegends(),p.isIE11()?document.getElementsByTagName("head")[0].appendChild(this.legendHelpers.getLegendStyles()):this.legendHelpers.appendToForeignObject(),"bottom"===i.legend.position||"top"===i.legend.position?this.legendAlignHorizontal():"right"!==i.legend.position&&"left"!==i.legend.position||this.legendAlignVertical()}}},{key:"drawLegends",value:function(){var t=this,e=this.w,i=e.config.legend.fontFamily,a=e.globals.seriesNames,s=e.globals.colors.slice();if("heatmap"===e.config.chart.type){var r=e.config.plotOptions.heatmap.colorScale.ranges;a=r.map((function(t){return t.name?t.name:t.from+" - "+t.to})),s=r.map((function(t){return t.color}))}else this.isBarsDistributed&&(a=e.globals.labels.slice());e.config.legend.customLegendItems.length&&(a=e.config.legend.customLegendItems);for(var o=e.globals.legendFormatter,n=e.config.legend.inverseOrder,l=n?a.length-1:0;n?l>=0:l<=a.length-1;n?l--:l++){var h=o(a[l],{seriesIndex:l,w:e}),c=!1,d=!1;if(e.globals.collapsedSeries.length>0)for(var g=0;g<e.globals.collapsedSeries.length;g++)e.globals.collapsedSeries[g].index===l&&(c=!0);if(e.globals.ancillaryCollapsedSeriesIndices.length>0)for(var u=0;u<e.globals.ancillaryCollapsedSeriesIndices.length;u++)e.globals.ancillaryCollapsedSeriesIndices[u]===l&&(d=!0);var f=document.createElement("span");f.classList.add("apexcharts-legend-marker");var x=e.config.legend.markers.offsetX,m=e.config.legend.markers.offsetY,v=e.config.legend.markers.height,w=e.config.legend.markers.width,k=e.config.legend.markers.strokeWidth,A=e.config.legend.markers.strokeColor,S=e.config.legend.markers.radius,C=f.style;C.background=s[l],C.color=s[l],C.setProperty("background",s[l],"important"),e.config.legend.markers.fillColors&&e.config.legend.markers.fillColors[l]&&(C.background=e.config.legend.markers.fillColors[l]),void 0!==e.globals.seriesColors[l]&&(C.background=e.globals.seriesColors[l],C.color=e.globals.seriesColors[l]),C.height=Array.isArray(v)?parseFloat(v[l])+"px":parseFloat(v)+"px",C.width=Array.isArray(w)?parseFloat(w[l])+"px":parseFloat(w)+"px",C.left=(Array.isArray(x)?parseFloat(x[l]):parseFloat(x))+"px",C.top=(Array.isArray(m)?parseFloat(m[l]):parseFloat(m))+"px",C.borderWidth=Array.isArray(k)?k[l]:k,C.borderColor=Array.isArray(A)?A[l]:A,C.borderRadius=Array.isArray(S)?parseFloat(S[l])+"px":parseFloat(S)+"px",e.config.legend.markers.customHTML&&(Array.isArray(e.config.legend.markers.customHTML)?e.config.legend.markers.customHTML[l]&&(f.innerHTML=e.config.legend.markers.customHTML[l]()):f.innerHTML=e.config.legend.markers.customHTML()),b.setAttrs(f,{rel:l+1,"data:collapsed":c||d}),(c||d)&&f.classList.add("apexcharts-inactive-legend");var L=document.createElement("div"),P=document.createElement("span");P.classList.add("apexcharts-legend-text"),P.innerHTML=Array.isArray(h)?h.join(" "):h;var T=e.config.legend.labels.useSeriesColors?e.globals.colors[l]:e.config.legend.labels.colors;T||(T=e.config.chart.foreColor),P.style.color=T,P.style.fontSize=parseFloat(e.config.legend.fontSize)+"px",P.style.fontWeight=e.config.legend.fontWeight,P.style.fontFamily=i||e.config.chart.fontFamily,b.setAttrs(P,{rel:l+1,i:l,"data:default-text":encodeURIComponent(h),"data:collapsed":c||d}),L.appendChild(f),L.appendChild(P);var M=new y(this.ctx);if(!e.config.legend.showForZeroSeries)0===M.getSeriesTotalByIndex(l)&&M.seriesHaveSameValues(l)&&!M.isSeriesNull(l)&&-1===e.globals.collapsedSeriesIndices.indexOf(l)&&-1===e.globals.ancillaryCollapsedSeriesIndices.indexOf(l)&&L.classList.add("apexcharts-hidden-zero-series");e.config.legend.showForNullSeries||M.isSeriesNull(l)&&-1===e.globals.collapsedSeriesIndices.indexOf(l)&&-1===e.globals.ancillaryCollapsedSeriesIndices.indexOf(l)&&L.classList.add("apexcharts-hidden-null-series"),e.globals.dom.elLegendWrap.appendChild(L),e.globals.dom.elLegendWrap.classList.add("apexcharts-align-".concat(e.config.legend.horizontalAlign)),e.globals.dom.elLegendWrap.classList.add("apx-legend-position-"+e.config.legend.position),L.classList.add("apexcharts-legend-series"),L.style.margin="".concat(e.config.legend.itemMargin.vertical,"px ").concat(e.config.legend.itemMargin.horizontal,"px"),e.globals.dom.elLegendWrap.style.width=e.config.legend.width?e.config.legend.width+"px":"",e.globals.dom.elLegendWrap.style.height=e.config.legend.height?e.config.legend.height+"px":"",b.setAttrs(L,{rel:l+1,seriesName:p.escapeString(a[l]),"data:collapsed":c||d}),(c||d)&&L.classList.add("apexcharts-inactive-legend"),e.config.legend.onItemClick.toggleDataSeries||L.classList.add("apexcharts-no-click")}e.globals.dom.elWrap.addEventListener("click",t.onLegendClick,!0),e.config.legend.onItemHover.highlightDataSeries&&0===e.config.legend.customLegendItems.length&&(e.globals.dom.elWrap.addEventListener("mousemove",t.onLegendHovered,!0),e.globals.dom.elWrap.addEventListener("mouseout",t.onLegendHovered,!0))}},{key:"setLegendWrapXY",value:function(t,e){var i=this.w,a=i.globals.dom.baseEl.querySelector(".apexcharts-legend"),s=a.getBoundingClientRect(),r=0,o=0;if("bottom"===i.config.legend.position)o+=i.globals.svgHeight-s.height/2;else if("top"===i.config.legend.position){var n=new ot(this.ctx),l=n.dimHelpers.getTitleSubtitleCoords("title").height,h=n.dimHelpers.getTitleSubtitleCoords("subtitle").height;o=o+(l>0?l-10:0)+(h>0?h-10:0)}a.style.position="absolute",r=r+t+i.config.legend.offsetX,o=o+e+i.config.legend.offsetY,a.style.left=r+"px",a.style.top=o+"px","bottom"===i.config.legend.position?(a.style.top="auto",a.style.bottom=5-i.config.legend.offsetY+"px"):"right"===i.config.legend.position&&(a.style.left="auto",a.style.right=25+i.config.legend.offsetX+"px");["width","height"].forEach((function(t){a.style[t]&&(a.style[t]=parseInt(i.config.legend[t],10)+"px")}))}},{key:"legendAlignHorizontal",value:function(){var t=this.w;t.globals.dom.baseEl.querySelector(".apexcharts-legend").style.right=0;var e=this.legendHelpers.getLegendBBox(),i=new ot(this.ctx),a=i.dimHelpers.getTitleSubtitleCoords("title"),s=i.dimHelpers.getTitleSubtitleCoords("subtitle"),r=0;"bottom"===t.config.legend.position?r=-e.clwh/1.8:"top"===t.config.legend.position&&(r=a.height+s.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(20,r)}},{key:"legendAlignVertical",value:function(){var t=this.w,e=this.legendHelpers.getLegendBBox(),i=0;"left"===t.config.legend.position&&(i=20),"right"===t.config.legend.position&&(i=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(i,20)}},{key:"onLegendHovered",value:function(t){var e=this.w,i=t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker");if("heatmap"===e.config.chart.type||this.isBarsDistributed){if(i){var a=parseInt(t.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,a,this.w]),new z(this.ctx).highlightRangeInSeries(t,t.target)}}else!t.target.classList.contains("apexcharts-inactive-legend")&&i&&new z(this.ctx).toggleSeriesOnHover(t,t.target)}},{key:"onLegendClick",value:function(t){var e=this.w;if(!e.config.legend.customLegendItems.length&&(t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker"))){var i=parseInt(t.target.getAttribute("rel"),10)-1,a="true"===t.target.getAttribute("data:collapsed"),s=this.w.config.chart.events.legendClick;"function"==typeof s&&s(this.ctx,i,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,i,this.w]);var r=this.w.config.legend.markers.onClick;"function"==typeof r&&t.target.classList.contains("apexcharts-legend-marker")&&(r(this.ctx,i,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,i,this.w])),"treemap"!==e.config.chart.type&&"heatmap"!==e.config.chart.type&&!this.isBarsDistributed&&e.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(i,a)}}}]),t}(),ht=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w;var a=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=a.globals.minX,this.maxX=a.globals.maxX}return a(t,[{key:"createToolbar",value:function(){var t=this,e=this.w,i=function(){return document.createElement("div")},a=i();if(a.setAttribute("class","apexcharts-toolbar"),a.style.top=e.config.chart.toolbar.offsetY+"px",a.style.right=3-e.config.chart.toolbar.offsetX+"px",e.globals.dom.elWrap.appendChild(a),this.elZoom=i(),this.elZoomIn=i(),this.elZoomOut=i(),this.elPan=i(),this.elSelection=i(),this.elZoomReset=i(),this.elMenuIcon=i(),this.elMenu=i(),this.elCustomIcons=[],this.t=e.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var s=0;s<this.t.customIcons.length;s++)this.elCustomIcons.push(i());var r=[],o=function(i,a,s){var o=i.toLowerCase();t.t[o]&&e.config.chart.zoom.enabled&&r.push({el:a,icon:"string"==typeof t.t[o]?t.t[o]:s,title:t.localeValues[i],class:"apexcharts-".concat(o,"-icon")})};o("zoomIn",this.elZoomIn,'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n    <path d="M0 0h24v24H0z" fill="none"/>\n    <path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>\n</svg>\n'),o("zoomOut",this.elZoomOut,'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n    <path d="M0 0h24v24H0z" fill="none"/>\n    <path d="M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>\n</svg>\n');var n=function(i){t.t[i]&&e.config.chart[i].enabled&&r.push({el:"zoom"===i?t.elZoom:t.elSelection,icon:"string"==typeof t.t[i]?t.t[i]:"zoom"===i?'<svg xmlns="http://www.w3.org/2000/svg" fill="#000000" height="24" viewBox="0 0 24 24" width="24">\n    <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/>\n    <path d="M0 0h24v24H0V0z" fill="none"/>\n    <path d="M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"/>\n</svg>':'<svg fill="#6E8192" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">\n    <path d="M0 0h24v24H0z" fill="none"/>\n    <path d="M3 5h2V3c-1.1 0-2 .9-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2z"/>\n</svg>',title:t.localeValues["zoom"===i?"selectionZoom":"selection"],class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(i,"-icon")})};n("zoom"),n("selection"),this.t.pan&&e.config.chart.zoom.enabled&&r.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#000000" height="24" viewBox="0 0 24 24" width="24">\n    <defs>\n        <path d="M0 0h24v24H0z" id="a"/>\n    </defs>\n    <clipPath id="b">\n        <use overflow="visible" xlink:href="#a"/>\n    </clipPath>\n    <path clip-path="url(#b)" d="M23 5.5V20c0 2.2-1.8 4-4 4h-7.3c-1.08 
606740-2.1-.43-2.85-1.19L1 14.83s1.26-1.23 1.3-1.25c.22-.19.49-.29.79-.29.22 0 .42.06.6.16.04.01 4.31 2.46 4.31 2.46V4c0-.83.67-1.5 1.5-1.5S11 3.17 11 4v7h1V1.5c0-.83.67-1.5 1.5-1.5S15 .67 15 1.5V11h1V2.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V11h1V5.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5z"/>\n</svg>',title:this.localeValues.pan,class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),o("reset",this.elZoomReset,'<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">\n    <path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>\n    <path d="M0 0h24v24H0z" fill="none"/>\n</svg>'),this.t.download&&r.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var l=0;l<this.elCustomIcons.length;l++)r.push({el:this.elCustomIcons[l],icon:this.t.customIcons[l].icon,title:this.t.customIcons[l].title,index:this.t.customIcons[l].index,class:"apexcharts-toolbar-custom-icon "+this.t.customIcons[l].class});r.forEach((function(t,e){t.index&&p.moveIndexInArray(r,e,t.index)}));for(var h=0;h<r.length;h++)b.setAttrs(r[h].el,{class:r[h].class,title:r[h].title}),r[h].el.innerHTML=r[h].icon,a.appendChild(r[h].el);this._createHamburgerMenu(a),e.globals.zoomEnabled?this.elZoom.classList.add(this.selectedClass):e.globals.panEnabled?this.elPan.classList.add(this.selectedClass):e.globals.selectionEnabled&&this.elSelection.classList.add(this.selectedClass),this.addToolbarEventListeners()}},{key:"_createHamburgerMenu",value:function(t){this.elMenuItems=[],t.appendChild(this.elMenu),b.setAttrs(this.elMenu,{class:"apexcharts-menu"});var e=[{name:"exportSVG",title:this.localeValues.exportToSVG},{name:"exportPNG",title:this.localeValues.exportToPNG},{name:"exportCSV",title:this.localeValues.exportToCSV}];this.w.globals.allSeriesHasEqualX||e.splice(2,1);for(var i=0;i<e.length;i++)this.elMenuItems.push(document.createElement("div")),this.elMenuItems[i].innerHTML=e[i].title,b.setAttrs(this.elMenuItems[i],{class:"apexcharts-menu-item ".concat(e[i].name),title:e[i].title}),this.elMenu.appendChild(this.elMenuItems[i])}},{key:"addToolbarEventListeners",value:function(){var t=this;this.elZoomReset.addEventListener("click",this.handleZoomReset.bind(this)),this.elSelection.addEventListener("click",this.toggleZoomSelection.bind(this,"selection")),this.elZoom.addEventListener("click",this.toggleZoomSelection.bind(this,"zoom")),this.elZoomIn.addEventListener("click",this.handleZoomIn.bind(this)),this.elZoomOut.addEventListener("click",this.handleZoomOut.bind(this)),this.elPan.addEventListener("click",this.togglePanning.bind(this)),this.elMenuIcon.addEventListener("click",this.toggleMenu.bind(this)),this.elMenuItems.forEach((function(e){e.classList.contains("exportSVG")?e.addEventListener("click",t.handleDownload.bind(t,"svg")):e.classList.contains("exportPNG")?e.addEventListener("click",t.handleDownload.bind(t,"png")):e.classList.contains("exportCSV")&&e.addEventListener("click",t.handleDownload.bind(t,"csv"))}));for(var e=0;e<this.t.customIcons.length;e++)this.elCustomIcons[e].addEventListener("click",this.t.customIcons[e].click.bind(this,this.ctx,this.ctx.w))}},{key:"toggleZoomSelection",value:function(t){this.ctx.getSyncedCharts().forEach((function(e){e.ctx.toolbar.toggleOtherControls();var i="selection"===t?e.ctx.toolbar.elSelection:e.ctx.toolbar.elZoom,a="selection"===t?"selectionEnabled":"zoomEnabled";e.w.globals[a]=!e.w.globals[a],i.classList.contains(e.ctx.toolbar.selectedClass)?i.classList.remove(e.ctx.toolbar.selectedClass):i.classList.add(e.ctx.toolbar.selectedClass)}))}},{key:"getToolbarIconsReference",value:function(){var t=this.w;this.elZoom||(this.elZoom=t.globals.dom.baseEl.querySelector(".apexcharts-zoom-icon")),this.elPan||(this.elPan=t.globals.dom.baseEl.querySelector(".apexcharts-pan-icon")),this.elSelection||(this.elSelection=t.globals.dom.baseEl.querySelector(".apexcharts-selection-icon"))}},{key:"enableZoomPanFromToolbar",value:function(t){this.toggleOtherControls(),"pan"===t?this.w.globals.panEnabled=!0:this.w.globals.zoomEnabled=!0;var e="pan"===t?this.elPan:this.elZoom,i="pan"===t?this.elZoom:this.elPan;e&&e.classList.add(this.selectedClass),i&&i.classList.remove(this.selectedClass)}},{key:"togglePanning",value:function(){this.ctx.getSyncedCharts().forEac
vendor: 11,150 bytes, line 60674
60674h((function(t){t.ctx.toolbar.toggleOtherControls(),t.w.globals.panEnabled=!t.w.globals.panEnabled,t.ctx.toolbar.elPan.classList.contains(t.ctx.toolbar.selectedClass)?t.ctx.toolbar.elPan.classList.remove(t.ctx.toolbar.selectedClass):t.ctx.toolbar.elPan.classList.add(t.ctx.toolbar.selectedClass)}))}},{key:"toggleOtherControls",value:function(){var t=this,e=this.w;e.globals.panEnabled=!1,e.globals.zoomEnabled=!1,e.globals.selectionEnabled=!1,this.getToolbarIconsReference(),[this.elPan,this.elSelection,this.elZoom].forEach((function(e){e&&e.classList.remove(t.selectedClass)}))}},{key:"handleZoomIn",value:function(){var t=this.w;t.globals.isTimelineBar&&(this.minX=t.globals.minY,this.maxX=t.globals.maxY);var e=(this.minX+this.maxX)/2,i=(this.minX+e)/2,a=(this.maxX+e)/2,s=this._getNewMinXMaxX(i,a);t.globals.disableZoomIn||this.zoomUpdateOptions(s.minX,s.maxX)}},{key:"handleZoomOut",value:function(){var t=this.w;if(t.globals.isTimelineBar&&(this.minX=t.globals.minY,this.maxX=t.globals.maxY),!("datetime"===t.config.xaxis.type&&new Date(this.minX).getUTCFullYear()<1e3)){var e=(this.minX+this.maxX)/2,i=this.minX-(e-this.minX),a=this.maxX-(e-this.maxX),s=this._getNewMinXMaxX(i,a);t.globals.disableZoomOut||this.zoomUpdateOptions(s.minX,s.maxX)}}},{key:"_getNewMinXMaxX",value:function(t,e){var i=this.w.config.xaxis.convertedCatToNumeric;return{minX:i?Math.floor(t):t,maxX:i?Math.floor(e):e}}},{key:"zoomUpdateOptions",value:function(t,e){var i=this.w;if(void 0!==t||void 0!==e){if(!(i.config.xaxis.convertedCatToNumeric&&(t<1&&(t=1,e=i.globals.dataPoints),e-t<2))){var a={min:t,max:e},s=this.getBeforeZoomRange(a);s&&(a=s.xaxis);var r={xaxis:a},o=p.clone(i.globals.initialConfig.yaxis);if(i.config.chart.zoom.autoScaleYaxis)o=new j(this.ctx).autoScaleY(this.ctx,o,{xaxis:a});i.config.chart.group||(r.yaxis=o),this.w.globals.zoomed=!0,this.ctx.updateHelpers._updateOptions(r,!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(a,o)}}else this.handleZoomReset()}},{key:"zoomCallback",value:function(t,e){"function"==typeof this.ev.zoomed&&this.ev.zoomed(this.ctx,{xaxis:t,yaxis:e})}},{key:"getBeforeZoomRange",value:function(t,e){var i=null;return"function"==typeof this.ev.beforeZoom&&(i=this.ev.beforeZoom(this,{xaxis:t,yaxis:e})),i}},{key:"toggleMenu",value:function(){var t=this;window.setTimeout((function(){t.elMenu.classList.contains("apexcharts-menu-open")?t.elMenu.classList.remove("apexcharts-menu-open"):t.elMenu.classList.add("apexcharts-menu-open")}),0)}},{key:"handleDownload",value:function(t){var e=this.w,i=new V(this.ctx);switch(t){case"svg":i.exportToSVG(this.ctx);break;case"png":i.exportToPng(this.ctx);break;case"csv":i.exportToCSV({series:e.config.series,columnDelimiter:e.config.chart.toolbar.export.csv.columnDelimiter})}}},{key:"handleZoomReset",value:function(t){this.ctx.getSyncedCharts().forEach((function(t){var e=t.w;if(e.globals.lastXAxis.min=void 0,e.globals.lastXAxis.max=void 0,t.updateHelpers.revertDefaultAxisMinMax(),"function"==typeof e.config.chart.events.beforeResetZoom){var i=e.config.chart.events.beforeResetZoom(t,e);i&&t.updateHelpers.revertDefaultAxisMinMax(i)}"function"==typeof e.config.chart.events.zoomed&&t.ctx.toolbar.zoomCallback({min:e.config.xaxis.min,max:e.config.xaxis.max}),e.globals.zoomed=!1;var a=t.ctx.series.emptyCollapsedSeries(p.clone(e.globals.initialSeries));t.updateHelpers._updateSeries(a,e.config.chart.animations.dynamicAnimation.enabled)}))}},{key:"destroy",value:function(){this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elZoomReset=null,this.elMenuIcon=null}}]),t}(),ct=function(t){n(s,t);var i=d(s);function s(t){var a;return e(this,s),(a=i.call(this,t)).ctx=t,a.w=t.w,a.dragged=!1,a.graphics=new b(a.ctx),a.eventList=["mousedown","mouseleave","mousemove","touchstart","touchmove","mouseup","touchend"],a.clientX=0,a.clientY=0,a.startX=0,a.endX=0,a.dragX=0,a.startY=0,a.endY=0,a.dragY=0,a.moveDirection="none",a}return a(s,[{key:"init",value:function(t){var e=this,i=t.xyRatios,a=this.w,s=this;this.xyRatios=i,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.gridRect=a.globals.dom.baseEl.querySelector(".apexcharts-grid"),this.zoomRect.node.classList.add("apexcharts-zoom-rect"),this.selectionRect.node.classList.add("apexcharts-selection-rect"),a.globals.dom.elGraphical.add(this.zoomRect),a.globals.dom.elGraphical.add(this.selectionRect),"x"===a.config.chart.selection.type?this.slDraggableRect=this.selectionRect.draggable({minX:0,minY:0,maxX:a.globals.gridWidth,maxY:a.globals.gridHeight}).on("dragmove",this.selectionDragging.bind(this,"dragging")):"y"===a.config.chart.selection.type?this.slDraggableRect=this.selectionRect.draggable({minX:0,maxX:a.globals.gridWidth}).on("dragmove",this.selectionDragging.bind(this,"dragging")):this.slDraggableRect=this.selectionRect.draggable().on("dragmove",this.selectionDragging.bind(this,"dragging")),this.preselectedSelection(),this.hoverArea=a.globals.dom.baseEl.querySelector("".concat(a.globals.chartClass," .apexcharts-svg")),this.hoverArea.classList.add("apexcharts-zoomable"),this.eventList.forEach((function(t){e.hoverArea.addEventListener(t,s.svgMouseEvents.bind(s,i),{capture:!1,passive:!0})}))}},{key:"destroy",value:function(){this.slDraggableRect&&(this.slDraggableRect.draggable(!1),this.slDraggableRect.off(),this.selectionRect.off()),this.selectionRect=null,this.zoomRect=null,this.gridRect=null}},{key:"svgMouseEvents",value:function(t,e){var i=this.w,a=this,s=this.ctx.toolbar,r=i.globals.zoomEnabled?i.config.chart.zoom.type:i.config.chart.selection.type,o=i.config.chart.toolbar.autoSelected;e.shiftKey?(this.shiftWasPressed=!0,s.enableZoomPanFromToolbar("pan"===o?"zoom":"pan")):this.shiftWasPressed&&(s.enableZoomPanFromToolbar(o),this.shiftWasPressed=!1);var n=e.target.classList;if(!(n.contains("apexcharts-selection-rect")||n.contains("apexcharts-legend-marker")||n.contains("apexcharts-legend-text")||e.target.parentNode.classList.contains("apexcharts-toolbar"))){if(a.clientX="touchmove"===e.type||"touchstart"===e.type?e.touches[0].clientX:"touchend"===e.type?e.changedTouches[0].clientX:e.clientX,a.clientY="touchmove"===e.type||"touchstart"===e.type?e.touches[0].clientY:"touchend"===e.type?e.changedTouches[0].clientY:e.clientY,"mousedown"===e.type&&1===e.which){var l=a.gridRect.getBoundingClientRect();a.startX=a.clientX-l.left,a.startY=a.clientY-l.top,a.dragged=!1,a.w.globals.mousedown=!0}if(("mousemove"===e.type&&1===e.which||"touchmove"===e.type)&&(a.dragged=!0,i.globals.panEnabled?(i.globals.selection=null,a.w.globals.mousedown&&a.panDragging({context:a,zoomtype:r,xyRatios:t})):(a.w.globals.mousedown&&i.globals.zoomEnabled||a.w.globals.mousedown&&i.globals.selectionEnabled)&&(a.selection=a.selectionDrawing({context:a,zoomtype:r}))),"mouseup"===e.type||"touchend"===e.type||"mouseleave"===e.type){var h=a.gridRect.getBoundingClientRect();a.w.globals.mousedown&&(a.endX=a.clientX-h.left,a.endY=a.clientY-h.top,a.dragX=Math.abs(a.endX-a.startX),a.dragY=Math.abs(a.endY-a.startY),(i.globals.zoomEnabled||i.globals.selectionEnabled)&&a.selectionDrawn({context:a,zoomtype:r}),i.globals.panEnabled&&i.config.xaxis.convertedCatToNumeric&&a.delayedPanScrolled()),i.globals.zoomEnabled&&a.hideSelectionRect(this.selectionRect),a.dragged=!1,a.w.globals.mousedown=!1}this.makeSelectionRectDraggable()}}},{key:"makeSelectionRectDraggable",value:function(){var t=this.w;if(this.selectionRect){var e=this.selectionRect.node.getBoundingClientRect();e.width>0&&e.height>0&&this.slDraggableRect.selectize({points:"l, r",pointSize:8,pointType:"rect"}).resize({constraint:{minX:0,minY:0,maxX:t.globals.gridWidth,maxY:t.globals.gridHeight}}).on("resizing",this.selectionDragging.bind(this,"resizing"))}}},{key:"preselectedSelection",value:function(){var t=this.w,e=this.xyRatios;if(!t.globals.zoomEnabled)if(void 0!==t.globals.selection&&null!==t.globals.selection)this.drawSelectionRect(t.globals.selection);else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){var i=(t.config.chart.selection.xaxis.min-t.globals.minX)/e.xRatio,a={x:i,y:0,width:t.globals.gridWidth-(t.globals.maxX-t.config.chart.selection.xaxis.max)/e.xRatio-i,height:t.globals.gridHeight,translateX:0,translateY:0,selectionEnabled:!0};this.drawSelectionRect(a),this.makeSelectionRectDraggable(),"function"==typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(t){var e=t.x,i=t.y,a=t.width,s=t.height,r=t.translateX,o=void 0===r?0:r,n=t.translateY,l=void 0===n?0:n,h=this.w,c=this.zoomRect,d=this.selectionRect;if(this.dragged||null!==h.globals.selection){var g={transform:"translate("+o+", "+l+")"};h.globals.zoomEnabled&&this.dragged&&(a<0&&(a=1),c.attr({x:e,y:i,width:a,height:s,fill:h.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":h.config.chart.zoom.zoomedArea.fill.opacity,stroke:h.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":h.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":h.config.chart.zoom.zoomedArea.stroke.opacity}),b.setAttrs(c.node,g)),h.globals.selectionEnabled&&(d.attr({x:e,y:i,width:a>0?a:0,height:s>0?s:0,fill:h.config.chart.selection.fill.color,"fill-opacity":h.config.chart.selection.fill.opacity,stroke:h.config.chart.selection.stroke.color,"stroke-width":h.config.chart.selection.stroke.width,"stroke-dasharray":h.config.chart.selection.stroke.dashArray,"stroke-opacity":h.config.chart.selection.stroke.opacity}),b.setAttrs(d.node,g))}}},{key:"hideSelectionRect",value:function(t){t&&t.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,s=e,r=this.gridRect.getBoundingClientRect(),o=s.startX-1,n=s.startY,l=!1,h=!1,c=s.clientX-r.left-o,d=s.clientY-r.top-n,g={};return Math.abs(c+o)>a.globals.gridWidth?c=a.globals.gridWidth-o:s.clientX-r.left<0&&(c=o),o>s.clientX-r.left&&(l=!0,c=Math.abs(c)),n>s.clientY-r.top&&(h=!0,d=Math.abs(d)),g="x"===i?{x:l?o-c:o,y:0,width:c,height:a.globals.gridHeight}:"y"===i?{x:0,y:h?n-d:n,width:a.globals.gridWidth,height:d}:{x:l?o-c:o,y:h?n-d:n,width:c,height:d},s.drawSelectionRect(g),s.selectionDragging("resizing"),g}},{key:"selectionDragging",value:function(t,e){var i=this,a=this.w,s=this.xyRatios,r=this.selectionRect,o=0;"resizing"===t&&(o=30);var n=function(t){return parseFloat(r.node.getAttribute(t))},l={x:n("x"),y:n("y"),width:n("width"),height:n("height")};a.globals.selection=l,"function"==typeof a.config.chart.events.selection&&a.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var t=i.gridRect.getBoundingClientRect(),e=r.node.getBoundingClientRect(),o={xaxis:{min:a.globals.xAxisScale.niceMin+(e.left-t.left)*s.xRatio,max:a.globals.xAxisScale.niceMin+(e.right-t.left)*s.xRatio},yaxis:{min:a.globals.yAxisScale[0].niceMin+(t.bottom-e.bottom)*s.yRatio[0],max:a.globals.yAxisScale[0].niceMax-(e.top-t.top)*s.yRatio[0]}};
vendor: 5,118 bytes, line 60674
60674a.config.chart.events.selection(i.ctx,o),a.config.chart.brush.enabled&&void 0!==a.config.chart.events.brushScrolled&&a.config.chart.events.brushScrolled(i.ctx,o)}),o))}},{key:"selectionDrawn",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,s=e,r=this.xyRatios,o=this.ctx.toolbar;if(s.startX>s.endX){var n=s.startX;s.startX=s.endX,s.endX=n}if(s.startY>s.endY){var l=s.startY;s.startY=s.endY,s.endY=l}var h=void 0,c=void 0;a.globals.isTimelineBar?(h=a.globals.yAxisScale[0].niceMin+s.startX*r.invertedYRatio,c=a.globals.yAxisScale[0].niceMin+s.endX*r.invertedYRatio):(h=a.globals.xAxisScale.niceMin+s.startX*r.xRatio,c=a.globals.xAxisScale.niceMin+s.endX*r.xRatio);var d=[],g=[];if(a.config.yaxis.forEach((function(t,e){d.push(a.globals.yAxisScale[e].niceMax-r.yRatio[e]*s.startY),g.push(a.globals.yAxisScale[e].niceMax-r.yRatio[e]*s.endY)})),s.dragged&&(s.dragX>10||s.dragY>10)&&h!==c)if(a.globals.zoomEnabled){var u=p.clone(a.globals.initialConfig.yaxis),f=p.clone(a.globals.initialConfig.xaxis);if(a.globals.zoomed=!0,a.config.xaxis.convertedCatToNumeric&&(h=Math.floor(h),c=Math.floor(c),h<1&&(h=1,c=a.globals.dataPoints),c-h<2&&(c=h+1)),"xy"!==i&&"x"!==i||(f={min:h,max:c}),"xy"!==i&&"y"!==i||u.forEach((function(t,e){u[e].min=g[e],u[e].max=d[e]})),a.config.chart.zoom.autoScaleYaxis){var x=new j(s.ctx);u=x.autoScaleY(s.ctx,u,{xaxis:f})}if(o){var b=o.getBeforeZoomRange(f,u);b&&(f=b.xaxis?b.xaxis:f,u=b.yaxis?b.yaxis:u)}var m={xaxis:f};a.config.chart.group||(m.yaxis=u),s.ctx.updateHelpers._updateOptions(m,!1,s.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof a.config.chart.events.zoomed&&o.zoomCallback(f,u)}else if(a.globals.selectionEnabled){var v,y=null;v={min:h,max:c},"xy"!==i&&"y"!==i||(y=p.clone(a.config.yaxis)).forEach((function(t,e){y[e].min=g[e],y[e].max=d[e]})),a.globals.selection=s.selection,"function"==typeof a.config.chart.events.selection&&a.config.chart.events.selection(s.ctx,{xaxis:v,yaxis:y})}}},{key:"panDragging",value:function(t){var e=t.context,i=this.w,a=e;if(void 0!==i.globals.lastClientPosition.x){var s=i.globals.lastClientPosition.x-a.clientX,r=i.globals.lastClientPosition.y-a.clientY;Math.abs(s)>Math.abs(r)&&s>0?this.moveDirection="left":Math.abs(s)>Math.abs(r)&&s<0?this.moveDirection="right":Math.abs(r)>Math.abs(s)&&r>0?this.moveDirection="up":Math.abs(r)>Math.abs(s)&&r<0&&(this.moveDirection="down")}i.globals.lastClientPosition={x:a.clientX,y:a.clientY};var o=i.globals.isTimelineBar?i.globals.minY:i.globals.minX,n=i.globals.isTimelineBar?i.globals.maxY:i.globals.maxX;i.config.xaxis.convertedCatToNumeric||a.panScrolled(o,n)}},{key:"delayedPanScrolled",value:function(){var t=this.w,e=t.globals.minX,i=t.globals.maxX,a=(t.globals.maxX-t.globals.minX)/2;"left"===this.moveDirection?(e=t.globals.minX+a,i=t.globals.maxX+a):"right"===this.moveDirection&&(e=t.globals.minX-a,i=t.globals.maxX-a),e=Math.floor(e),i=Math.floor(i),this.updateScrolledChart({xaxis:{min:e,max:i}},e,i)}},{key:"panScrolled",value:function(t,e){var i=this.w,a=this.xyRatios,s=p.clone(i.globals.initialConfig.yaxis),r=a.xRatio,o=i.globals.minX,n=i.globals.maxX;i.globals.isTimelineBar&&(r=a.invertedYRatio,o=i.globals.minY,n=i.globals.maxY),"left"===this.moveDirection?(t=o+i.globals.gridWidth/15*r,e=n+i.globals.gridWidth/15*r):"right"===this.moveDirection&&(t=o-i.globals.gridWidth/15*r,e=n-i.globals.gridWidth/15*r),i.globals.isTimelineBar||(t<i.globals.initialMinX||e>i.globals.initialMaxX)&&(t=o,e=n);var l={min:t,max:e};i.config.chart.zoom.autoScaleYaxis&&(s=new j(this.ctx).autoScaleY(this.ctx,s,{xaxis:l}));var h={xaxis:{min:t,max:e}};i.config.chart.group||(h.yaxis=s),this.updateScrolledChart(h,t,e)}},{key:"updateScrolledChart",value:function(t,e,i){var a=this.w;this.ctx.updateHelpers._updateOptions(t,!1,!1),"function"==typeof a.config.chart.events.scrolled&&a.config.chart.events.scrolled(this.ctx,{xaxis:{min:e,max:i}})}}]),s}(ht),dt=function(){function t(i){e(this,t),this.w=i.w,this.ttCtx=i,this.ctx=i.ctx}return a(t,[{key:"getNearestValues",value:function(t){var e=t.hoverArea,i=t.elGrid,a=t.clientX,s=t.clientY,r=this.w,o=r.globals.gridWidth,n=r.globals.gridHeight,l=o/(r.globals.dataPoints-1),h=n/r.globals.dataPoints,c=i.getBoundingClientRect(),d=this.hasBars();!r.globals.comboCharts&&!d||r.config.xaxis.convertedCatToNumeric||(l=o/r.globals.dataPoints);var g=a-c.left-r.globals.barPadForNumericAxis,u=s-c.top;g<0||u<0||g>r.globals.gridWidth||u>r.globals.gridHeight?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):r.globals.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):r.globals.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));var f=Math.round(g/l),x=Math.floor(u/h);d&&!r.config.xaxis.convertedCatToNumeric&&(f=Math.ceil(g/l),f-=1);for(var b,m=null,v=null,y=[],w=0;w<r.globals.seriesXvalues.length;w++)y.push([r.globals.seriesXvalues[w][0]-1e-6].concat(r.globals.seriesXvalues[w]));return y=y.map((function(t){return t.filter((function(t){return t}))})),b=r.globals.seriesYvalues.map((function(t){return t.filter((function(t){return p.isNumber(t)}))}
vendor: 29,900 bytes, line 60674
60674)),r.globals.isXNumeric&&(m=(v=this.closestInMultiArray(g,u,y,b)).index,f=v.j,null!==m&&(y=r.globals.seriesXvalues[m],f=(v=this.closestInArray(g,y)).index)),r.globals.capturedSeriesIndex=null===m?-1:m,(!f||f<1)&&(f=0),r.globals.isBarHorizontal?r.globals.capturedDataPointIndex=x:r.globals.capturedDataPointIndex=f,{capturedSeries:m,j:r.globals.isBarHorizontal?x:f,hoverX:g,hoverY:u}}},{key:"closestInMultiArray",value:function(t,e,i,a){var s=this.w,r=0,o=null,n=-1;s.globals.series.length>1?r=this.getFirstActiveXArray(i):o=0;var l=a[r][0],h=i[r][0],c=Math.abs(t-h),d=Math.abs(e-l),g=d+c;return a.map((function(s,r){s.map((function(s,l){var h=Math.abs(e-a[r][l]),u=Math.abs(t-i[r][l]),p=u+h;p<g&&(g=p,c=u,d=h,o=r,n=l)}))})),{index:o,j:n}}},{key:"getFirstActiveXArray",value:function(t){for(var e=0,i=t.map((function(t,e){return t.length>0?e:-1})),a=0;a<i.length;a++)if(-1!==i[a]){e=i[a];break}return e}},{key:"closestInArray",value:function(t,e){for(var i=e[0],a=null,s=Math.abs(t-i),r=0;r<e.length;r++){var o=Math.abs(t-e[r]);o<s&&(s=o,a=r)}return{index:a}}},{key:"isXoverlap",value:function(t){var e=[],i=this.w.globals.seriesX.filter((function(t){return void 0!==t[0]}));if(i.length>0)for(var a=0;a<i.length-1;a++)void 0!==i[a][t]&&void 0!==i[a+1][t]&&i[a][t]!==i[a+1][t]&&e.push("unEqual");return 0===e.length}},{key:"isInitialSeriesSameLen",value:function(){for(var t=!0,e=this.w.globals.initialSeries,i=0;i<e.length-1;i++)if(e[i].data.length!==e[i+1].data.length){t=!1;break}return t}},{key:"getBarsHeight",value:function(t){return g(t).reduce((function(t,e){return t+e.getBBox().height}),0)}},{key:"getElMarkers",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(" .apexcharts-series-markers")}},{key:"getAllMarkers",value:function(){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(t=g(t)).sort((function(t,e){return Number(e.getAttribute("data:realIndex"))<Number(t.getAttribute("data:realIndex"))?0:-1}));var e=[];return t.forEach((function(t){e.push(t.querySelector(".apexcharts-marker"))})),e}},{key:"hasMarkers",value:function(){return this.getElMarkers().length>0}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series,  .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(t){var e=this.w,i=e.config.markers.hover.size;return void 0===i&&(i=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(t){var e=this.w,i=this.ttCtx;0===i.allTooltipSeriesGroups.length&&(i.allTooltipSeriesGroups=e.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var a=i.allTooltipSeriesGroups,s=0;s<a.length;s++)"enable"===t?(a[s].classList.add("apexcharts-active"),a[s].style.display=e.config.tooltip.items.display):(a[s].classList.remove("apexcharts-active"),a[s].style.display="none")}}]),t}(),gt=function(){function t(i){e(this,t),this.w=i.w,this.ctx=i.ctx,this.ttCtx=i,this.tooltipUtil=new dt(i)}return a(t,[{key:"drawSeriesTexts",value:function(t){var e=t.shared,i=void 0===e||e,a=t.ttItems,s=t.i,r=void 0===s?0:s,o=t.j,n=void 0===o?null:o,l=t.y1,h=t.y2,c=t.e,d=this.w;void 0!==d.config.tooltip.custom?this.handleCustomTooltip({i:r,j:n,y1:l,y2:h,w:d}):this.toggleActiveInactiveSeries(i);var g=this.getValuesToPrint({i:r,j:n});this.printLabels({i:r,j:n,values:g,ttItems:a,shared:i,e:c});var u=this.ttCtx.getElTooltip();this.ttCtx.tooltipRect.ttWidth=u.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=u.getBoundingClientRect().height}},{key:"printLabels",value:function(t){var e,i=this,a=t.i,s=t.j,r=t.values,n=t.ttItems,l=t.shared,h=t.e,c=this.w,d=[],g=function(t){return c.globals.seriesGoals[t]&&c.globals.seriesGoals[t][s]&&Array.isArray(c.globals.seriesGoals[t][s])},u=r.xVal,p=r.zVal,f=r.xAxisTTVal,x="",b=c.globals.colors[a];null!==s&&c.config.plotOptions.bar.distributed&&(b=c.globals.colors[s]);for(var m=function(t,r){var m=i.getFormatters(a);x=i.getSeriesName({fn:m.yLbTitleFormatter,index:a,seriesIndex:a,j:s}),"treemap"===c.config.chart.type&&(x=m.yLbTitleFormatter(String(c.config.series[a].data[s].x),{series:c.globals.series,seriesIndex:a,dataPointIndex:s,w:c}));var v=c.config.tooltip.inverseOrder?r:t;if(c.globals.axisCharts){var y=function(t){return m.yLbFormatter(c.globals.series[t][s],{series:c.globals.series,seriesIndex:t,dataPointIndex:s,w:c})};l?(m=i.getFormatters(v),x=i.getSeriesName({fn:m.yLbTitleFormatter,index:v,seriesIndex:a,j:s}),b=c.globals.colors[v],e=y(v),g(v)&&(d=c.globals.seriesGoals[v][s].map((function(t){return{attrs:t,val:m.yLbFormatter(t.value,{seriesIndex:v,dataPointIndex:s,w:c})}})))):(h&&h.target&&h.target.getAttribute("fill")&&(b=h.target.getAttribute("fill")),e=y(a),g(a)&&Array.isArray(c.globals.seriesGoals[a][s])&&(d=c.globals.seriesGoals[a][s].map((function(t){return{attrs:t,val:m.yLbFormatter(t.value,{seriesIndex:a,dataPointIndex:s,w:c})}}))))}null===s&&(e=m.yLbFormatter(c.globals.series[a],o(o({},c),{},{seriesIndex:a,dataPointIndex:a}))),i.DOMHandling({i:a,t:v,j:s,ttItems:n,values:{val:e,goalVals:d,xVal:u,xAxisTTVal:f,zVal:p},seriesName:x,shared:l,pColor:b})},v=0,y=c.globals.series.length-1;v<c.globals.series.length;v++,y--)m(v,y)}},{key:"getFormatters",value:function(t){var e,i=this.w,a=i.globals.yLabelFormatters[t];return void 0!==i.globals.ttVal?Array.isArray(i.globals.ttVal)?(a=i.globals.ttVal[t]&&i.globals.ttVal[t].formatter,e=i.globals.ttVal[t]&&i.globals.ttVal[t].title&&i.globals.ttVal[t].title.formatter):(a=i.globals.ttVal.formatter,"function"==typeof i.globals.ttVal.title.formatter&&(e=i.globals.ttVal.title.formatter)):e=i.config.tooltip.y.title.formatter,"function"!=typeof a&&(a=i.globals.yLabelFormatters[0]?i.globals.yLabelFormatters[0]:function(t){return t}),"function"!=typeof e&&(e=function(t){return t}),{yLbFormatter:a,yLbTitleFormatter:e}}},{key:"getSeriesName",value:function(t){var e=t.fn,i=t.index,a=t.seriesIndex,s=t.j,r=this.w;return e(String(r.globals.seriesNames[i]),{series:r.globals.series,seriesIndex:a,dataPointIndex:s,w:r})}},{key:"DOMHandling",value:function(t){t.i;var e=t.t,i=t.j,a=t.ttItems,s=t.values,r=t.seriesName,o=t.shared,n=t.pColor,l=this.w,h=this.ttCtx,c=s.val,d=s.goalVals,g=s.xVal,u=s.xAxisTTVal,p=s.zVal,f=null;f=a[e].children,l.config.tooltip.fillSeriesColor&&(a[e].style.backgroundColor=n,f[0].style.display="none"),h.showTooltipTitle&&(null===h.tooltipTitle&&(h.tooltipTitle=l.globals.dom.baseEl.querySelector(".apexcharts-tooltip-title")),h.tooltipTitle.innerHTML=g),h.blxaxisTooltip&&(h.xaxisTooltipText.innerHTML=""!==u?u:g);var x=a[e].querySelector(".apexcharts-tooltip-text-y-label");x&&(x.innerHTML=r||"");var b=a[e].querySelector(".apexcharts-tooltip-text-y-value");b&&(b.innerHTML=void 0!==c?c:""),f[0]&&f[0].classList.contains("apexcharts-tooltip-marker")&&(l.config.tooltip.marker.fillColors&&Array.isArray(l.config.tooltip.marker.fillColors)&&(n=l.config.tooltip.marker.fillColors[e]),f[0].style.backgroundColor=n),l.config.tooltip.marker.show||(f[0].style.display="none");var m=a[e].querySelector(".apexcharts-tooltip-text-goals-label"),v=a[e].querySelector(".apexcharts-tooltip-text-goals-value");if(d.length&&l.globals.seriesGoals[e]){var y=function(){var t="<div >",e="<div>";d.forEach((function(i,a){t+=' <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: '.concat(i.attrs.strokeColor,'; height: 3px; border-radius: 0; top: 5px;"></span> ').concat(i.attrs.name,"</div>"),e+="<div>".concat(i.val,"</div>")})),m.innerHTML=t+"</div>",v.innerHTML=e+"</div>"};o?l.globals.seriesGoals[e][i]&&Array.isArray(l.globals.seriesGoals[e][i])?y():(m.innerHTML="",v.innerHTML=""):y()}else m.innerHTML="",v.innerHTML="";null!==p&&(a[e].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,a[e].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==p?p:"");o&&f[0]&&(null==c||l.globals.collapsedSeriesIndices.indexOf(e)>-1?f[0].parentNode.style.display="none":f[0].parentNode.style.display=l.config.tooltip.items.display)}},{key:"toggleActiveInactiveSeries",value:function(t){var e=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var i=e.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group");i&&(i.classList.add("apexcharts-active"),i.style.display=e.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(t){var e=t.i,i=t.j,a=this.w,s=this.ctx.series.filteredSeriesX(),r="",o="",n=null,l=null,h={series:a.globals.series,seriesIndex:e,dataPointIndex:i,w:a},c=a.globals.ttZFormatter;null===i?l=a.globals.series[e]:a.globals.isXNumeric&&"treemap"!==a.config.chart.type?(r=s[e][i],0===s[e].length&&(r=s[this.tooltipUtil.getFirstActiveXArray(s)][i])):r=void 0!==a.globals.labels[i]?a.globals.labels[i]:"";var d=r;a.globals.isXNumeric&&"datetime"===a.config.xaxis.type?r=new W(this.ctx).xLabelFormat(a.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new Y(this.ctx).formatDate,w:this.w}):r=a.globals.isBarHorizontal?a.globals.yLabelFormatters[0](d,h):a.globals.xLabelFormatter(d,h);return void 0!==a.config.tooltip.x.formatter&&(r=a.globals.ttKeyFormatter(d,h)),a.globals.seriesZ.length>0&&a.globals.seriesZ[e].length>0&&(n=c(a.globals.seriesZ[e][i],a)),o="function"==typeof a.config.xaxis.tooltip.formatter?a.globals.xaxisTooltipFormatter(d,h):r,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(r)?r.join(" "):r,xAxisTTVal:Array.isArray(o)?o.join(" "):o,zVal:n}}},{key:"handleCustomTooltip",value:function(t){var e=t.i,i=t.j,a=t.y1,s=t.y2,r=t.w,o=this.ttCtx.getElTooltip(),n=r.config.tooltip.custom;Array.isArray(n)&&n[e]&&(n=n[e]),o.innerHTML=n({ctx:this.ctx,series:r.globals.series,seriesIndex:e,dataPointIndex:i,y1:a,y2:s,w:r})}}]),t}(),ut=function(){function t(i){e(this,t),this.ttCtx=i,this.ctx=i.ctx,this.w=i.w}return a(t,[{key:"moveXCrosshairs",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.ttCtx,a=this.w,s=i.getElXCrosshairs(),r=t-i.xcrosshairsWidth/2,o=a.globals.labels.slice().length;if(null!==e&&(r=a.globals.gridWidth/o*e),null!==s&&(s.setAttribute("x",r),s.setAttribute("x1",r),s.setAttribute("x2",r),s.setAttribute("y2",a.globals.gridHeight),s.classList.add("apexcharts-active")),r<0&&(r=0),r>a.globals.gridWidth&&(r=a.globals.gridWidth),i.blxaxisTooltip){var n=r;"tickWidth"!==a.config.xaxis.crosshairs.width&&"barWidth"!==a.config.xaxis.crosshairs.width||(n=r+i.xcrosshairsWidth/2),this.moveXAxisTooltip(n)}}},{key:"moveYCrosshairs",value:function(t){var e=this.ttCtx;null!==e.ycrosshairs&&b.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&b.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}},{key:"moveXAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip){i.xaxisTooltip.classList.add("apexcharts-active");var a=i.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.globals.translateY+1+e.config.xaxis.offsetY;if(t-=i.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(t)){t+=e.globals.translateX;var s;s=new b(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=s.width+"px",i.xaxisTooltip.style.left=t+"px",i.xaxisTooltip.style.top=a+"px"}}}},{key:"moveYAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;null===i.yaxisTTEls&&(i.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var a=parseInt(i.ycrosshairsHidden.getAttribute("y1"),10),s=e.globals.translateY+a,r=i.yaxisTTEls[t].getBoundingClientRect().height,o=e.globals.translateYAxisX[t]-2;e.config.yaxis[t].opposite&&(o-=26),s-=r/2,-1===e.globals.ignoreYAxisIndexes.indexOf(t)?(i.yaxisTTEls[t].classList.add("apexcharts-active"),i.yaxisTTEls[t].style.top=s+"px",i.yaxisTTEls[t].style.left=o+e.config.yaxis[t].tooltip.offsetX+"px"):i.yaxisTTEls[t].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=this.ttCtx,r=s.getElTooltip(),o=s.tooltipRect,n=null!==i?parseFloat(i):1,l=parseFloat(t)+n+5,h=parseFloat(e)+n/2;if(l>a.globals.gridWidth/2&&(l=l-o.ttWidth-n-15),l>a.globals.gridWidth-o.ttWidth-10&&(l=a.globals.gridWidth-o.ttWidth),l<-20&&(l=-20),a.config.tooltip.followCursor){var c=s.getElGrid(),d=c.getBoundingClientRect();h=s.e.clientY+a.globals.translateY-d.top-o.ttHeight/2}else a.globals.isBarHorizontal?h-=o.ttHeight:(o.ttHeight/2+h>a.globals.gridHeight&&(h=a.globals.gridHeight-o.ttHeight+a.globals.translateY),h<0&&(h=0));isNaN(l)||(l+=a.globals.translateX,r.style.left=l+"px",r.style.top=h+"px")}},{key:"moveMarkers",value:function(t,e){var i=this.w,a=this.ttCtx;if(i.globals.markers.size[t]>0)for(var s=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-marker")),r=0;r<s.length;r++)parseInt(s[r].getAttribute("rel"),10)===e&&(a.marker.resetPointsSize(),a.marker.enlargeCurrentPoint(e,s[r]));else a.marker.resetPointsSize(),this.moveDynamicPointOnHover(e,t)}},{key:"moveDynamicPointOnHover",value:function(t,e){var i,a,s=this.w,r=this.ttCtx,o=s.globals.pointsArray,n=r.tooltipUtil.getHoverMarkerSize(e),l=s.config.series[e].type;if(!l||"column"!==l&&"candlestick"!==l&&"boxPlot"!==l){i=o[e][t][0],a=o[e][t][1]?o[e][t][1]:0;var h=s.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-series-markers circle"));h&&a<s.globals.gridHeight&&a>0&&(h.setAttribute("r",n),h.setAttribute("cx",i),h.setAttribute("cy",a)),this.moveXCrosshairs(i),r.fixedTooltip||this.moveTooltip(i,a,n)}}},{key:"moveDynamicPointsOnHover",value:function(t){var e,i=this.ttCtx,a=i.w,s=0,r=0,o=a.globals.pointsArray;e=new z(this.ctx).getActiveConfigSeriesIndex(!0);var n=i.tooltipUtil.getHoverMarkerSize(e);o[e]&&(s=o[e][t][0],r=o[e][t][1]);var l=i.tooltipUtil.getAllMarkers();if(null!==l)for(var h=0;h<a.globals.series.length;h++){var c=o[h];if(a.globals.comboCharts&&void 0===c&&l.splice(h,0,null),c&&c.length){var d=o[h][t][1];l[h].setAttribute("cx",s),null!==d&&!isNaN(d)&&d<a.globals.gridHeight&&d>0?(l[h]&&l[h].setAttribute("r",n),l[h]&&l[h].setAttribute("cy",d)):l[h]&&l[h].setAttribute("r",0)}}if(this.moveXCrosshairs(s),!i.fixedTooltip){var g=r||a.globals.gridHeight;this.moveTooltip(s,g,n)}}},{key:"moveStickyTooltipOverBars",value:function(t){var e=this.w,i=this.ttCtx,a=e.globals.columnSeries?e.globals.columnSeries.length:e.globals.series.length,s=a>=2&&a%2==0?Math.floor(a/2):Math.floor(a/2)+1;e.globals.isBarHorizontal&&(s=new z(this.ctx).getActiveConfigSeriesIndex(!1,"desc")+1);var r=e.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(s,"'] path[j='").concat(t,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(s,"'] path[j='").concat(t,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(s,"'] path[j='").concat(t,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(s,"'] path[j='").concat(t,"']")),o=r?parseFloat(r.getAttribute("cx")):0,n=r?parseFloat(r.getAttribute("cy")):0,l=r?parseFloat(r.getAttribute("barWidth")):0,h=r?parseFloat(r.getAttribute("barHeight")):0,c=i.getElGrid().getBoundingClientRect();if(e.globals.isXNumeric?(o-=a%2!=0?l/2:0,r&&(r.classList.contains("apexcharts-candlestick-area")||r.classList.contains("apexcharts-boxPlot-area"))&&e.globals.comboCharts&&(o-=l/2)):e.globals.isBarHorizontal||(o=i.xAxisTicksPositions[t-1]+i.dataPointsDividedWidth/2,isNaN(o)&&(o=i.xAxisTicksPositions[t]-i.dataPointsDividedWidth/2)),e.globals.isBarHorizontal?n+=h/3:n=i.e.clientY-c.top-i.tooltipRect.ttHeight/2,e.globals.isBarHorizontal||this.moveXCrosshairs(o),!i.fixedTooltip){var d=n||e.globals.gridHeight;this.moveTooltip(o,d)}}}]),t}(),pt=function(){function t(i){e(this,t),this.w=i.w,this.ttCtx=i,this.ctx=i.ctx,this.tooltipPosition=new ut(i)}return a(t,[{key:"drawDynamicPoints",value:function(){var t=this.w,e=new b(this.ctx),i=new P(this.ctx),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series");a=g(a),t.config.chart.stacked&&a.sort((function(t,e){return parseFloat(t.getAttribute("data:realIndex"))-parseFloat(e.getAttribute("data:realIndex"))}));for(var s=0;s<a.length;s++){var r=a[s].querySelector(".apexcharts-series-markers-wrap");if(null!==r){var o=void 0,n="apexcharts-marker w".concat((Math.random()+1).toString(36).substring(4));"line"!==t.config.chart.type&&"area"!==t.config.chart.type||t.globals.comboCharts||t.config.tooltip.intersect||(n+=" no-pointer-events");var l=i.getMarkerConfig(n,s);(o=e.drawMarker(0,0,l)).node.setAttribute("default-marker-size",0);var h=document.createElementNS(t.globals.SVGNS,"g");h.classList.add("apexcharts-series-markers"),h.appendChild(o.node),r.appendChild(h)}}}},{key:"enlargeCurrentPoint",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.w;"bubble"!==s.config.chart.type&&this.newPointSize(t,e);var r=e.getAttribute("cx"),o=e.getAttribute("cy");if(null!==i&&null!==a&&(r=i,o=a),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if("radar"===s.config.chart.type){var n=this.ttCtx.getElGrid(),l=n.getBoundingClientRect();r=this.ttCtx.e.clientX-l.left}this.tooltipPosition.moveTooltip(r,o,s.config.markers.hover.size)}}},{key:"enlargePoints",value:function(t){for(var e=this.w,i=this,a=this.ttCtx,s=t,r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),o=e.config.markers.hover.size,n=0;n<r.length;n++){var l=r[n].getAttribute("rel"),h=r[n].getAttribute("index");if(void 0===o&&(o=e.globals.markers.size[h]+e.config.markers.hover.sizeOffset),s===parseInt(l,10)){i.newPointSize(s,r[n]);var c=r[n].getAttribute("cx"),d=r[n].getAttribute("cy");i.tooltipPosition.moveXCrosshairs(c),a.fixedTooltip||i.tooltipPosition.moveTooltip(c,d,o)}else i.oldPointSize(r[n])}}},{key:"newPointSize",value:function(t,e){var i=this.w,a=i.config.markers.hover.size,s=0===t?e.parentNode.firstChild:e.parentNode.lastChild;if("0"!==s.getAttribute("default-marker-size")){var r=parseInt(s.getAttribute("index"),10);void 0===a&&(a=i.globals.markers.size[r]+i.config.markers.hover.sizeOffset),a<0&&(a=0),s.setAttribute("r",a)}}},{key:"oldPointSize",value:function(t){var e=parseFloat(t.getAttribute("default-marker-size"));t.setAttribute("r",e)}},{key:"resetPointsSize",value:function(){for(var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),e=0;e<t.length;e++){var i=parseFloat(t[e].getAttribute("default-marker-size"));p.isNumber(i)&&i>=0?t[e].setAttribute("r",i):t[e].setAttribute("r",0)}}}]),t}(),ft=function(){function t(i){e(this,t),this.w=i.w,this.ttCtx=i}return a(t,[{key:"getAttr",value:function(t,e){return parseFloat(t.target.getAttribute(e))}},{key:"handleHeatTreeTooltip",value:function(t){var e=t.e,i=t.opt,a=t.x,s=t.y,r=t.type,o=this.ttCtx,n=this.w;if(e.target.classList.contains("apexcharts-".concat(r,"-rect"))){var l=this.getAttr(e,"i"),h=this.getAttr(e,"j"),c=this.getAttr(e,"cx"),d=this.getAttr(e,"cy"),g=this.getAttr(e,"width"),u=this.getAttr(e,"height");if(o.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:l,j:h,shared:!1,e:e}),n.globals.capturedSeriesIndex=l,n.globals.capturedDataPointIndex=h,a=c+o.tooltipRect.ttWidth/2+g,s=d+o.tooltipRect.ttHeight/2-u/2,o.tooltipPosition.moveXCrosshairs(c+g/2),a>n.globals.gridWidth/2&&(a=c-o.tooltipRect.ttWidth/2+g),o.w.config.tooltip.followCursor){var p=n.globals.dom.elWrap.getBoundingClientRect();a=n.globals.clientX-p.left-o.tooltipRect.ttWidth/2,s=n.globals.clientY-p.top-o.tooltipRect.ttHeight-5}}return{x:a,y:s}}},{key:"handleMarkerTooltip",value:function(t){var e,i,a=t.e,s=t.opt,r=t.x,o=t.y,n=this.w,l=this.ttCtx;if(a.target.classList.contains("apexcharts-marker")){var h=parseInt(s.paths.getAttribute("cx"),10),c=parseInt(s.paths.getAttribute("cy"),10),d=parseFloat(s.paths.getAttribute("val"));if(i=parseInt(s.paths.getAttribute("rel"),10),e=parseInt(s.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var g=p.findAncestor(s.paths,"apexcharts-series");g&&(e=parseInt(g.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:e,j:i,shared:!l.showOnIntersect&&n.config.tooltip.shared,e:a}),"mouseup"===a.type&&l.markerClick(a,e,i),n.globals.capturedSeriesIndex=e,n.globals.capturedDataPointIndex=i,r=h,o=c+n.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var u=l.getElGrid().getBoundingClientRect();o=l.e.clientY+n.globals.translateY-u.top}d<0&&(o=c),l.marker.enlargeCurrentPoint(i,s.paths,r,o)}return{x:r,y:o}}},{key:"handleBarTooltip",value:function(t){var e,i,a=t.e,s=t.opt,r=this.w,o=this.ttCtx,n=o.getElTooltip(),l=0,h=0,c=0,d=this.getBarTooltipXY({e:a,opt:s});e=d.i;var g=d.barHeight,u=d.j;r.globals.capturedSeriesIndex=e,r.globals.capturedDataPointIndex=u,r.globals.isBarHorizontal&&o.tooltipUtil.hasBars()||!r.config.tooltip.shared?(h=d.x,c=d.y,i=Array.isArray(r.config.stroke.width)?r.config.stroke.width[e]:r.config.stroke.width,l=h):r.globals.comboCharts||r.config.tooltip.shared||(l/=2),isNaN(c)?c=r.globals.svgHeight-o.tooltipRect.ttHeight:c<0&&(c=0);var p=parseInt(s.paths.parentNode.getAttribute("data:realIndex"),10),f=r.globals.isMultipleYAxis?r.config.yaxis[p]&&r.config.yaxis[p].reversed:r.config.yaxis[0].reversed;if(h+o.tooltipRect.ttWidth>r.globals.gridWidth&&!f?h-=o.tooltipRect.ttWidth:h<0&&(h=0),o.w.config.tooltip.followCursor){var x=o.getElGrid().getBoundingClientRect();c=o.e.clientY-x.top}null===o.tooltip&&(o.tooltip=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),r.config.tooltip.shared||(r.globals.comboBarCount>0?o.tooltipPosition.moveXCrosshairs(l+i/2):o.tooltipPosition.moveXCrosshairs(l)),!o.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&o.tooltipUtil.hasBars())&&(f&&(h-=o.tooltipRect.ttWidth)<0&&(h=0),n.style.left=h+r.globals.translateX+"px",!f||r.globals.isBarHorizontal&&o.tooltipUtil.hasBars()||(c=c+g-2*(r.globals.series[e][u]<0?g:0)),o.tooltipRect.ttHeight+c>r.globals.gridHeight?(c=r.globals.gridHeight-o.tooltipRect.ttHeight+r.globals.translateY,n.style.top=c+"px"):n.style.top=c+r.globals.translateY-o.tooltipRect.ttHeight/2+"px")}},{key:"getBarTooltipXY",value:function(t){var e=t.e,i=t.opt,a=this.w,s=null,r=this.ttCtx,o=0,n=0,l=0,h=0,c=0,d=e.target.classList;if(d.contains("apexcharts-bar-area")||d.contains("apexcharts-candlestick-area")||d.contains("apexcharts-boxPlot-area")||d.contains("apexcharts-rangebar-area")){var g=e.target,u=g.getBoundingClientRect(),p=i.elGrid.getBoundingClientRect(),f=u.height;c=u.height;var x=u.width,b=parseInt(g.getAttribute("cx"),10),m=parseInt(g.getAttribute("cy"),10);h=parseFloat(g.getAttribute("barWidth"));var v="touchmove"===e.type?e.touches[0].clientX:e.clientX;s=parseInt(g.getAttribute("j"),10),o=parseInt(g.parentNode.getAttribute("rel"),10)-1;var y=g.getAttribute("data-range-y1"),w=g.getAttribute("data-range-y2");a.globals.comboCharts&&(o=parseInt(g.parentNode.getAttribute("data:realIndex"),10)),r.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:o,j:s,y1:y?parseInt(y,10):null,y2:w?parseInt(w,10):null,shared:!r.showOnIntersect&&a.config.tooltip.shared,e:e}),a.config.tooltip.followCursor?a.globals.isBarHorizontal?(n=v-p.left+15,l=m-r.dataPointsDividedHeight+f/2-r.tooltipRect.ttHeight/2):(n=a.globals.isXNumeric?b-x/2:b-r.dataPointsDividedWidth+x/2,l=e.clientY-p.top-r.tooltipRect.ttHeight/2-15):a.globals.isBarHorizontal?((n=b)<r.xyRatios.baseLineInvertedY&&(n=b-r.tooltipRect.ttWidth),l=m-r.dataPointsDividedHeight+f/2-r.tooltipRect.ttHeight/2):(n=a.globals.isXNumeric?b-x/2:b-r.dataPointsDividedWidth+x/2,l=m)}return{x:n,y:l,barHeight:c,barWidth:h,i:o,j:s}}}]),t}(),xt=function(){function t(i){e(this,t),this.w=i.w,this.ttCtx=i}return a(t,[{key:"drawXaxisTooltip",value:function(){var t=this.w,e=this.ttCtx,i="bottom"===t.config.xaxis.position;e.xaxisOffY=i?t.globals.gridHeight+1:-t.globals.xAxisHeight-t.config.xaxis.axisTicks.height+3;var a=i?"apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom":"apexcharts-xaxistooltip apexcharts-xaxistooltip-top",s=t.globals.dom.elWrap;e.blxaxisTooltip&&(null===t.globals.dom.baseEl.querySelector(".apexcharts-xaxistooltip")&&(e.xaxisTooltip=document.createElement("div"),e.xaxisTooltip.setAttribute("class",a+" apexcharts-theme-"+t.config.tooltip.theme),s.appendChild(e.xaxisTooltip),e.xaxisTooltipText=document.createElement("div"),e.xaxisTooltipText.classList.add("apexcharts-xaxistooltip-text"),e.xaxisTooltipText.style.fontFamily=t.config.xaxis.tooltip.style.fontFamily||t.config.chart.fontFamily,e.xaxisTooltipText.style.fontSize=t.config.xaxis.tooltip.style.fontSize,e.xaxisTooltip.appendChild(e.xaxisTooltipText)))}},{key:"drawYaxisTooltip",value:function(){for(var t=this.w,e=this.ttCtx,i=function(i){var a=t.config.yaxis[i].opposite||t.config.yaxis[i].crosshairs.opposite;e.yaxisOffX=a?t.globals.gridWidth+1:1;var s="apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(i,a?" apexcharts-yaxistooltip-right":" apexcharts-yaxistooltip-left");t.globals.yAxisSameScaleIndices.map((function(e,a){e.map((function(e,a){a===i&&(s+=t.config.yaxis[a].show?" ":" apexcharts-yaxistooltip-hidden")}))}));var r=t.globals.dom.elWrap;null===t.globals.dom.baseEl.querySelector(".apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(i))&&(e.yaxisTooltip=document.createElement("div"),e.yaxisTooltip.setAttribute("class",s+" apexcharts-theme-"+t.config.tooltip.theme),r.appendChild(e.yaxisTooltip),0===i&&(e.yaxisTooltipText=[]),e.yaxisTooltipText[i]=document.createElement("div"),e.yaxisTooltipText[i].classList.add("apexcharts-yaxistooltip-text"),e.yaxisTooltip.appendChild(e.yaxisTooltipText[i]))},a=0;a<t.config.yaxis.length;a++)i(a)}},{key:"setXCrosshairWidth",value:function(){var t=this.w,e=this.ttCtx,i=e.getElXCrosshairs();if(e.xcrosshairsWidth=parseInt(t.config.xaxis.crosshairs.width,10),t.globals.comboCharts){var a=t.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(null!==a&&"barWidth"===t.config.xaxis.crosshairs.width){var s=parseFloat(a.getAttribute("barWidth"));e.xcrosshairsWidth=s}else if("tickWidth"===t.config.xaxis.crosshairs.width){var r=t.globals.labels.length;e.xcrosshairsWidth=t.globals.gridWidth/r}}else if("tickWidth"===t.config.xaxis.crosshairs.width){var o=t.globals.labels.length;e.xcrosshairsWidth=t.globals.gridWidth/o}else if("barWidth"===t.config.xaxis.crosshairs.width){var n=t.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(null!==n){var l=parseFloat(n.getAttribute("barWidth"));e.xcrosshairsWidth=l}else e.xcrosshairsWidth=1}t.globals.isBarHorizontal&&(e.xcrosshairsWidth=0),null!==i&&e.xcrosshairsWidth>0&&i.setAttribute("width",e.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var t=this.w,e=this.ttCtx;e.ycrosshairs=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(t,e,i){var a=this.ttCtx,s=this.w,r=s.globals.yLabelFormatters[t];if(a.yaxisTooltips[t]){var o=a.getElGrid().getBoundingClientRect(),n=(e-o.top)*i.yRatio[t],l=s.globals.maxYArr[t]-s.globals.minYArr[t],h=s.globals.minYArr[t]+(l-n);a.tooltipPosition.moveYCrosshairs(e-o.top),a.yaxisTooltipText[t].innerHTML=r(h),a.tooltipPosition.moveYAxisTooltip(t)}}}]),t}(),bt=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w;var a=this.w;this.tConfig=a.config.tooltip,this.tooltipUtil=new dt(this),this.tooltipLabels=new gt(this),this.tooltipPosition=new ut(this),this.marker=new pt(this),this.intersect=new ft(this),this.axesTooltip=new xt(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!a.globals.isBarHorizontal&&this.tConfig.shared}return a(t,[{key:"getElTooltip",value:function(t){return t||(t=this),t.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip")}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(t){var e=this.w;this.xyRatios=t,this.blxaxisTooltip=e.config.xaxis.tooltip.enabled&&e.globals.axisCharts,this.yaxisTooltips=e.config.yaxis.map((function(t,i){return!!(t.show&&t.tooltip.enabled&&e.globals.axisCharts)})),this.allTooltipSeriesGroups=[],e.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),i.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),e.globals.dom.elWrap.appendChild(i),e.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var a=new G(this.ctx);this.xAxisTicksPositions=a.getXAxisTicksPositions()}if(!e.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==e.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),0!==e.config.markers.size&&0!==e.globals.markers.largestSize||this.marker.drawDynamicPoints(this),e.globals.collapsedSeries.length!==e.globals.series.length){this.dataPointsDividedHeight=e.globals.gridHeight/e.globals.dataPoints,this.dataPointsDividedWidth=e.globals.gridWidth/e.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var s=e.globals.series.length;
vendor: 8,228 bytes, line 60674
60674(e.globals.xyCharts||e.globals.comboCharts)&&this.tConfig.shared&&(s=this.showOnIntersect?1:e.globals.series.length),this.legendLabels=e.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(s),this.addSVGEvents()}}},{key:"createTTElements",value:function(t){for(var e=this,i=this.w,a=[],s=this.getElTooltip(),r=function(r){var o=document.createElement("div");o.classList.add("apexcharts-tooltip-series-group"),o.style.order=i.config.tooltip.inverseOrder?t-r:r+1,e.tConfig.shared&&e.tConfig.enabledOnSeries&&Array.isArray(e.tConfig.enabledOnSeries)&&e.tConfig.enabledOnSeries.indexOf(r)<0&&o.classList.add("apexcharts-tooltip-series-group-hidden");var n=document.createElement("span");n.classList.add("apexcharts-tooltip-marker"),n.style.backgroundColor=i.globals.colors[r],o.appendChild(n);var l=document.createElement("div");l.classList.add("apexcharts-tooltip-text"),l.style.fontFamily=e.tConfig.style.fontFamily||i.config.chart.fontFamily,l.style.fontSize=e.tConfig.style.fontSize,["y","goals","z"].forEach((function(t){var e=document.createElement("div");e.classList.add("apexcharts-tooltip-".concat(t,"-group"));var i=document.createElement("span");i.classList.add("apexcharts-tooltip-text-".concat(t,"-label")),e.appendChild(i);var a=document.createElement("span");a.classList.add("apexcharts-tooltip-text-".concat(t,"-value")),e.appendChild(a),l.appendChild(e)})),o.appendChild(l),s.appendChild(o),a.push(o)},o=0;o<t;o++)r(o);return a}},{key:"addSVGEvents",value:function(){var t=this.w,e=t.config.chart.type,i=this.getElTooltip(),a=!("bar"!==e&&"candlestick"!==e&&"boxPlot"!==e&&"rangeBar"!==e),s="area"===e||"line"===e||"scatter"===e||"bubble"===e||"radar"===e,r=t.globals.dom.Paper.node,o=this.getElGrid();o&&(this.seriesBound=o.getBoundingClientRect());var n,l=[],h=[],c={hoverArea:r,elGrid:o,tooltipEl:i,tooltipY:l,tooltipX:h,ttItems:this.ttItems};if(t.globals.axisCharts&&(s?n=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker"):a?n=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-boxPlot-area, .apexcharts-series .apexcharts-rangebar-area"):"heatmap"!==e&&"treemap"!==e||(n=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap")),n&&n.length))for(var d=0;d<n.length;d++)l.push(n[d].getAttribute("cy")),h.push(n[d].getAttribute("cx"));if(t.globals.xyCharts&&!this.showOnIntersect||t.globals.comboCharts&&!this.showOnIntersect||a&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([r],c);else if(a&&!t.globals.comboCharts||s&&this.showOnIntersect)this.addDatapointEventsListeners(c);else if(!t.globals.axisCharts||"heatmap"===e||"treemap"===e){var g=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series");this.addPathsEventListeners(g,c)}if(this.showOnIntersect){var u=t.globals.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker");u.length>0&&this.addPathsEventListeners(u,c),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(c)}}},{key:"drawFixedTooltipRect",value:function(){var t=this.w,e=this.getElTooltip(),i=e.getBoundingClientRect(),a=i.width+10,s=i.height+10,r=this.tConfig.fixed.offsetX,o=this.tConfig.fixed.offsetY,n=this.tConfig.fixed.position.toLowerCase();return n.indexOf("right")>-1&&(r=r+t.globals.svgWidth-a+10),n.indexOf("bottom")>-1&&(o=o+t.globals.svgHeight-s-10),e.style.left=r+"px",e.style.top=o+"px",{x:r,y:o,ttWidth:a,ttHeight:s}}},{key:"addDatapointEventsListeners",value:function(t){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(e,t)}},{key:"addPathsEventListeners",value:function(t,e){for(var i=this,a=function(a){var s={paths:t[a],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map((function(e){return t[a].addEventListener(e,i.seriesHover.bind(i,s),{capture:!1,passive:!0})}))},s=0;s<t.length;s++)a(s)}},{key:"seriesHover",value:function(t,e){var i=this,a=[],s=this.w;s.config.chart.group&&(a=this.ctx.getGroupedCharts()),s.globals.axisCharts&&(s.globals.minX===-1/0&&s.globals.maxX===1/0||0===s.globals.dataPoints)||(a.length?a.forEach((function(a){var s=i.getElTooltip(a),r={paths:t.paths,tooltipEl:s,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:a.w.globals.tooltip.ttItems};a.w.globals.minX===i.w.globals.minX&&a.w.globals.maxX===i.w.globals.maxX&&a.w.globals.tooltip.seriesHoverByContext({chartCtx:a,ttCtx:a.w.globals.tooltip,opt:r,e:e})})):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e:e}))}},{key:"seriesHoverByContext",value:function(t){var e=t.chartCtx,i=t.ttCtx,a=t.opt,s=t.e,r=e.w,o=this.getElTooltip();(i.tooltipRect={x:0,y:0,ttWidth:o.getBoundingClientRect().width,ttHeight:o.getBoundingClientRect().height},i.e=s,!i.tooltipUtil.hasBars()||r.globals.comboCharts||i.isBarShared)||this.tConfig.onDatasetHover.highlightDataSeries&&new z(e).toggleSeriesOnHover(s,s.target.parentNode);i.fixedTooltip&&i.drawFixedTooltipRect(),r.globals.axisCharts?i.axisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect})}},{key:"axisChartsTooltips",value:function(t){var e,i,a=t.e,s=t.opt,r=this.w,o=s.elGrid.getBoundingClientRect(),n="touchmove"===a.type?a.touches[0].clientX:a.clientX,l="touchmove"===a.type?a.touches[0].clientY:a.clientY;if(this.clientY=l,this.clientX=n,r.globals.capturedSeriesIndex=-1,r.globals.capturedDataPointIndex=-1,l<o.top||l>o.top+o.height)this.handleMouseOut(s);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!r.config.tooltip.shared){var h=parseInt(s.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(h)<0)return void this.handleMouseOut(s)}var c=this.getElTooltip(),d=this.getElXCrosshairs(),g=r.globals.xyCharts||"bar"===r.config.chart.type&&!r.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||r.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===a.type||"touchmove"===a.type||"mouseup"===a.type){null!==d&&d.classList.add("apexcharts-active");var u=this.yaxisTooltips.filter((function(t){return!0===t}));if(null!==this.ycrosshairs&&u.length&&this.ycrosshairs.classList.add("apexcharts-active"),g&&!this.showOnIntersect)this.handleStickyTooltip(a,n,l,s);else if("heatmap"===r.config.chart.type||"treemap"===r.config.chart.type){var p=this.intersect.handleHeatTreeTooltip({e:a,opt:s,x:e,y:i,type:r.config.chart.type});e=p.x,i=p.y,c.style.left=e+"px",c.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:a,opt:s}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:a,opt:s,x:e,y:i});if(this.yaxisTooltips.length)for(var f=0;f<r.config.yaxis.length;f++)this.axesTooltip.drawYaxisTooltipText(f,l,this.xyRatios);s.tooltipEl.classList.add("apexcharts-active")}else"mouseout"!==a.type&&"touchend"!==a.type||this.handleMouseOut(s)}}},{key:"nonAxisChartsTooltips",value:function(t){var e=t.e,i=t.opt,a=t.tooltipRect,s=this.w,r=i.paths.getAttribute("rel"),o=this.getElTooltip(),n=s.globals.dom.elWrap.getBoundingClientRect();if("mousemove"===e.type||"touchmove"===e.type){o.classList.add("apexcharts-active"),this.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:parseInt(r,10)-1,shared:!1});var l=s.globals.clientX-n.left-a.ttWidth/2,h=s.globals.clientY-n.top-a.ttHeight-10;if(o.style.left=l+"px",o.style.top=h+"px",s.config.legend.tooltipHoverFormatter){var c=r-1,d=(0,s.config.legend.tooltipHoverFormatter)(this.legendLabels[c].getAttribute("data:default-text"),{seriesIndex:c,dataPointIndex:c,w:s});this.legendLabels[c].innerHTML=d}}else"mouseout"!==e.type&&"touchend"!==e.type||(o.classList.remove("apexcharts-active"),s.config.legend.tooltipHoverFormatter&&this.legendLabels.forEac
60674h((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)})))}},{key:"handleStickyTooltip",value:function(t,e,i,a){var s=this.w,r=this.tooltipUtil.getNearestValues({context:this,hoverArea:a.hoverArea,elGrid:a.elGrid,clientX:e,clientY:i}),o=r.j,n=r.capturedSeries;r.hoverX<0||r.hoverX>s.globals.gridWidth?this.handleMouseOut(a):null!==n?this.handleStickyCapturedSeries(t,n,a,o):(this.tooltipUtil.isXoverlap(o)||s.globals.isBarHorizontal)&&this.create(t,this,0,o,a.ttItems)}},{key:"handleStickyCapturedSeries",value:function(t,e,i,a){var s=this.w;null===s.globals.series[e][a]?this.handleMouseOut(i):void 0!==s.globals.series[e][a]?this.tConfig.shared&&this.tooltipUtil.isXoverlap(a)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,a,i.ttItems):this.create(t,this,e,a,i.ttItems,!1):this.tooltipUtil.isXoverlap(a)&&this.create(t,this,0,a,i.ttItems)}},{key:"deactivateHoverFilter",value:function(){for(var t=this.w,e=new b(this.ctx),i=t.globals.dom.Paper.select(".apexcharts-bar-area"),a=0;a<i.length;a++)e.pathMouseLeave(i[a])}},{key:"handleMouseOut",value:function(t){var e=this.w,i=this.getElXCrosshairs();if(t.tooltipEl.classList.remove("apexcharts-active"),this.deactivateHoverFilter(),"bubble"!==e.config.chart.type&&this.marker.resetPointsSize(),null!==i&&i.classList.remove("apexcharts-active"),null!==this.ycrosshairs&&this.ycrosshairs.classList.remove("apexcharts-active"),this.blxaxisTooltip&&this.xaxisTooltip.classList.remove("apexcharts-active"),this.yaxisTooltips.length){null===this.yaxisTTEls&&(this.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));for(var a=0;a<this.yaxisTTEls.length;a++)this.yaxisTTEls[a].classList.remove("apexcharts-active")}
vendor: 4,532 bytes, line 60674
60674e.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)}))}},{key:"markerClick",value:function(t,e,i){var a=this.w;"function"==typeof a.config.chart.events.markerClick&&a.config.chart.events.markerClick(t,this.ctx,{seriesIndex:e,dataPointIndex:i,w:a}),this.ctx.events.fireEvent("markerClick",[t,this.ctx,{seriesIndex:e,dataPointIndex:i,w:a}])}},{key:"create",value:function(t,e,i,a,s){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=this.w,n=e;"mouseup"===t.type&&this.markerClick(t,i,a),null===r&&(r=this.tConfig.shared);var l=this.tooltipUtil.hasMarkers(),h=this.tooltipUtil.getElBars();if(o.config.legend.tooltipHoverFormatter){var c=o.config.legend.tooltipHoverFormatter,d=Array.from(this.legendLabels);d.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)}));for(var g=0;g<d.length;g++){var u=d[g],p=parseInt(u.getAttribute("i"),10),f=decodeURIComponent(u.getAttribute("data:default-text")),x=c(f,{seriesIndex:r?p:i,dataPointIndex:a,w:o});if(r)u.innerHTML=o.globals.collapsedSeriesIndices.indexOf(p)<0?x:f;else if(u.innerHTML=p===i?x:f,i===p)break}}if(r){if(n.tooltipLabels.drawSeriesTexts({ttItems:s,i:i,j:a,shared:!this.showOnIntersect&&this.tConfig.shared}),l&&(o.globals.markers.largestSize>0?n.marker.enlargePoints(a):n.tooltipPosition.moveDynamicPointsOnHover(a)),this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(h),this.barSeriesHeight>0)){var m=new b(this.ctx),v=o.globals.dom.Paper.select(".apexcharts-bar-area[j='".concat(a,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(a);for(var y=0;y<v.length;y++)m.pathMouseEnter(v[y])}}else n.tooltipLabels.drawSeriesTexts({shared:!1,ttItems:s,i:i,j:a}),this.tooltipUtil.hasBars()&&n.tooltipPosition.moveStickyTooltipOverBars(a),l&&n.tooltipPosition.moveMarkers(i,a)}}]),t}(),mt=function(t){n(s,t);var i=d(s);function s(){return e(this,s),i.apply(this,arguments)}return a(s,[{key:"draw",value:function(t,e){var i=this,a=this.w;this.graphics=new b(this.ctx),this.bar=new E(this.ctx,this.xyRatios);var s=new y(this.ctx,a);t=s.getLogSeries(t),this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),"100%"===a.config.chart.stackType&&(t=a.globals.seriesPercent.slice()),this.series=t,this.totalItems=0,this.prevY=[],this.prevX=[],this.prevYF=[],this.prevXF=[],this.prevYVal=[],this.prevXVal=[],this.xArrj=[],this.xArrjF=[],this.xArrjVal=[],this.yArrj=[],this.yArrjF=[],this.yArrjVal=[];for(var r=0;r<t.length;r++)t[r].length>0&&(this.totalItems+=t[r].length);for(var n=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),l=0,h=0,c=function(s,r){var c=void 0,d=void 0,g=void 0,u=void 0,f=[],x=[],b=a.globals.comboCharts?e[s]:s;i.yRatio.length>1&&(i.yaxisIndex=b),i.isReversed=a.config.yaxis[i.yaxisIndex]&&a.config.yaxis[i.yaxisIndex].reversed;var m=i.graphics.group({class:"apexcharts-series",seriesName:p.escapeString(a.globals.seriesNames[b]),rel:s+1,"data:realIndex":b});i.ctx.series.addCollapsedClassToSeries(m,b);var v=i.graphics.group({class:"apexcharts-datalabels","data:realIndex":b}),y=0,w=0,k=i.initialPositions(l,h,c,d,g,u);h=k.y,y=k.barHeight,d=k.yDivision,u=k.zeroW,l=k.x,w=k.barWidth,c=k.xDivision,g=k.zeroH,i.yArrj=[],i.yArrjF=[],i.yArrjVal=[],i.xArrj=[],i.xArrjF=[],i.xArrjVal=[],1===i.prevY.length&&i.prevY[0].every((function(t){return isNaN(t)}))&&(i.prevY[0]=i.prevY[0].map((function(t){return g})),i.prevYF[0]=i.prevYF[0].map((function(t){return 0})));for(var A=0;A<a.globals.dataPoints;A++){var S=i.barHelpers.getStrokeWidth(s,A,b),C={indexes:{i:s,j:A,realIndex:b,bc:r},strokeWidth:S,x:l,y:h,elSeries:m},L=null;i.isHorizontal?(L=i.drawStackedBarPaths(o(o({},C),{},{zeroW:u,barHeight:y,yDivision:d})),w=i.series[s][A]/i.invertedYRatio):(L=i.drawStackedColumnPaths(o(o({},C),{},{xDivision:c,barWidth:w,zeroH:g})),y=i.series[s][A]/i.yRatio[i.yaxisIndex]),h=L.y,l=L.x,f.push(l),x.push(h);var P=i.barHelpers.getPathFillColor(t,s,A,b);m=i.renderSeries({realIndex:b,pathFill:P,j:A,i:s,pathFrom:L.pathFrom,pathTo:L.pathTo,strokeWidth:S,elSeries:m,x:l,y:h,series:t,barHeight:y,barWidth:w,elDataLabelsWrap:v,type:"bar",visibleSeries:0})}a.globals.seriesXvalues[b]=f,a.globals.seriesYvalues[b]=x,i.prevY.push(i.yArrj),i.prevYF.push(i.yArrjF),i.prevYVal.push(i.yArrjVal),i.prevX.push(i.xArrj),i.prevXF.push(i.xArrjF),i.prevXVal.push(i.xArrjVal),n.add(m)},d=0,g=0;d<t.length;d++,g++)c(d,g);return n}}
60674,{key:"initialPositions",value:function(t,e,i,a,s,r){var o,n,l=this.w;return this.isHorizontal?(o=(o=a=l.globals.gridHeight/l.globals.dataPoints)*parseInt(l.config.plotOptions.bar.barHeight,10)/100,r=this.baseLineInvertedY+l.globals.padHorizontal+(this.isReversed?l.globals.gridWidth:0)-(this.isReversed?2*this.baseLineInvertedY:0),e=(a-o)/2):(n=i=l.globals.gridWidth/l.globals.dataPoints,n=l.globals.isXNumeric&&l.globals.dataPoints>1?(i=l.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:n*parseInt(l.config.plotOptions.bar.columnWidth,10)/100,s=this.baseLineY[this.yaxisIndex]+(this.isReversed?l.globals.gridHeight:0)-(this.isReversed?2*this.baseLineY[this.yaxisIndex]:0),t=l.globals.padHorizontal+(i-n)/2),{x:t,y:e,yDivision:a,xDivision:i,barHeight:o,barWidth:n,zeroH:s,zeroW:r}}},{key:"drawStackedBarPaths",value:function(t){for(var e,i=t.indexes,a=t.barHeight,s=t.strokeWidth,r=t.zeroW,o=t.x,n=t.y,l=t.yDivision,h=t.elSeries,c=this.w,d=n,g=i.i,u=i.j,p=0,f=0;f<this.prevXF.length;f++)p+=this.prevXF[f][u];if(g>0){var x=r;this.prevXVal[g-1][u]<0?x=this.series[g][u]>=0?this.prevX[g-1][u]+p-2*(this.isReversed?p:0):this.prevX[g-1][u]:this.prevXVal[g-1][u]>=0&&(x=this.series[g][u]>=0?this.prevX[g-1][u]:this.prevX[g-1][u]-p+2*(this.isReversed?p:0)),e=x}else e=r;o=null===this.series[g][u]?e:e+this.series[g][u]/this.invertedYRatio-2*(this.isReversed?this.series[g][u]/this.invertedYRatio:0);var b=this.barHelpers.getBarpaths({barYPosition:d,barHeight:a,x1:e,x2:o,strokeWidth:s,series:this.series,realIndex:i.realIndex,i:g,j:u,w:c});return this.barHelpers.barBackground({j:u,i:g,y1:d,y2:a,elSeries:h}),n+=l,{pathTo:b.pathTo,pathFrom:b.pathFrom,x:o,y:n}}},{key:"drawStackedColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.y,s=t.xDivision,r=t.barWidth,o=t.zeroH;t.strokeWidth;var n=t.elSeries,l=this.w,h=e.i,c=e.j,d=e.bc;if(l.globals.isXNumeric){var g=l.globals.seriesX[h][c];g||(g=0),i=(g-l.globals.minX)/this.xRatio-r/2}for(var u,p=i,f=0,x=0;x<this.prevYF.length;x++)f+=isNaN(this.prevYF[x][c])?0:this.prevYF[x][c];if(h>0&&!l.globals.isXNumeric||h>0&&l.globals.isXNumeric&&l.globals.seriesX[h-1][c]===l.globals.seriesX[h][c]){var b,m,v=Math.min(this.yRatio.length+1,h+1);if(void 0!==this.prevY[h-1])for(var y=1;y<v;y++)if(!isNaN(this.prevY[h-y][c])){m=this.prevY[h-y][c];break}for(var w=1;w<v;w++){if(this.prevYVal[h-w][c]<0){b=this.series[h][c]>=0?m-f+2*(this.isReversed?f:0):m;break}if(this.prevYVal[h-w][c]>=0){b=this.series[h][c]>=0?m:m+f-2*(this.isReversed?f:0);break}}void 0===b&&(b=l.globals.gridHeight),u=this.prevYF[0].every((function(t){return 0===t}))&&this.prevYF.slice(1,h).every((function(t){return t.every((function(t){return isNaN(t)}))}))?l.globals.gridHeight-o:b}else u=l.globals.gridHeight-o;a=u-this.series[h][c]/this.yRatio[this.yaxisIndex]+2*(this.isReversed?this.series[h][c]/this.yRatio[this.yaxisIndex]:0);var k=this.barHelpers.getColumnPaths({barXPosition:p,barWidth:r,y1:u,y2:a,yRatio:this.yRatio[this.yaxisIndex],strokeWidth:this.strokeWidth,series:this.series,realIndex:e.realIndex,i:h,j:c,w:l});return this.barHelpers.barBackground({bc:d,j:c,i:h,x1:p,x2:r,elSeries:n}),i+=s,{pathTo:k.pathTo,pathFrom:k.pathFrom,x:l.globals.isXNumeric?i-s:i,y:a}}}]),s}(E),vt=function(t){n(s,t);var i=d(s);function s(){return e(this,s),i.apply(this,arguments)}return a(s,[{key:"draw",value:function(t,e){var i=this,a=this.w,s=new b(this.ctx),r=new L(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot;var o=new y(this.ctx,a);t=o.getLogSeries(t),this.series=t,this.yRatio=o.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);for(var n=s.group({class:"apexcharts-".concat(a.config.chart.type,"-series apexcharts-plot-series")}),l=function(o){i.isBoxPlot="boxPlot"===a.config.chart.type||"boxPlot"===a.config.series[o].type;var l,h,c=void 0,d=void 0,g=[],u=[],f=a.globals.comboCharts?e[o]:o,x=s.group({class:"apexcharts-series",seriesName:p.escapeString(a.globals.seriesNames[f]),rel:o+1,"data:realIndex":f});t[o].length>0&&(i.visibleI=i.visibleI+1);var b,m;i.yRatio.length>1&&(i.yaxisIndex=f);var v=i.barHelpers.initialPositions();d=v.y,b=v.barHeight,c=v.x,m=v.barWidth,l=v.xDivision,h=v.zeroH,u.push(c+m/2);for(var y=s.group({class:"apexcharts-datalabels","data:realIndex":f}),w=function(e){var s=i.barHelpers.getStrokeWidth(o,e,f),n=i.drawBoxPaths({indexes:{i:o,j:e,realIndex:f},x:c,y:d,xDivision:l,barWidth:m,zeroH:h,strokeWidth:s,elSeries:x});d=n.y,c=n.x,e>0&&u.push(c+m/2),g.push(d),n.pathTo.forEach((function(l,h){var g=!i.isBoxPlot&&i.candlestickOptions.wick.useFillColor?n.color[h]:a.globals.stroke.colors[o],u=r.fillPath({seriesNumber:f,dataPointIndex:e,color:n.color[h],value:t[o][e]});i.renderSeries({realIndex:f,pathFill:u,lineFill:g,j:e,i:o,pathFrom:n.pathFrom,pathTo:l,strokeWidth:s,elSeries:x,x:c,y:d,series:t,barHeight:b,barWidth:m,elDataLabelsWrap:y,visibleSeries:i.visibleI,type:a.config.chart.type})}))},k=0;k<a.globals.dataPoints;k++)w(k);a.globals.seriesXvalues[f]=u,a.globals.seriesYvalues[f]=g,n.add(x)},h=0;h<t.length;h++)l(h);return n}},{key:"drawBoxPaths",value:function(t){var e=t.indexes,i=t.x;t.y;var a=t.xDivision,s=t.barWidth,r=t.zeroH,o=t.strokeWidth,n=this.w,l=new b(this.ctx),h=e.i,c=e.j,d=!0,g=n.config.plotOptions.candlestick.colors.upward,u=n.config.plotOptions.candlestick.colors.downward,p="";this.isBoxPlot&&(p=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var f=this.yRatio[this.yaxisIndex],x=e.realIndex,m=this.getOHLCValue(x,c),v=r,y=r;m.o>m.c&&(d=!1);var w=Math.min(m.o,m.c),k=Math.max(m.o,m.c),A=m.m;
vendor: 6,693 bytes, line 60674
60674n.globals.isXNumeric&&(i=(n.globals.seriesX[x][c]-n.globals.minX)/this.xRatio-s/2);var S=i+s*this.visibleI;void 0===this.series[h][c]||null===this.series[h][c]?(w=r,k=r):(w=r-w/f,k=r-k/f,v=r-m.h/f,y=r-m.l/f,A=r-m.m/f);var C=l.move(S,r),L=l.move(S+s/2,w);return n.globals.previousPaths.length>0&&(L=this.getPreviousPath(x,c,!0)),C=this.isBoxPlot?[l.move(S,w)+l.line(S+s/2,w)+l.line(S+s/2,v)+l.line(S+s/4,v)+l.line(S+s-s/4,v)+l.line(S+s/2,v)+l.line(S+s/2,w)+l.line(S+s,w)+l.line(S+s,A)+l.line(S,A)+l.line(S,w+o/2),l.move(S,A)+l.line(S+s,A)+l.line(S+s,k)+l.line(S+s/2,k)+l.line(S+s/2,y)+l.line(S+s-s/4,y)+l.line(S+s/4,y)+l.line(S+s/2,y)+l.line(S+s/2,k)+l.line(S,k)+l.line(S,A)+"z"]:[l.move(S,k)+l.line(S+s/2,k)+l.line(S+s/2,v)+l.line(S+s/2,k)+l.line(S+s,k)+l.line(S+s,w)+l.line(S+s/2,w)+l.line(S+s/2,y)+l.line(S+s/2,w)+l.line(S,w)+l.line(S,k-o/2)],L+=l.move(S,w),n.globals.isXNumeric||(i+=a),{pathTo:C,pathFrom:L,x:i,y:k,barXPosition:S,color:this.isBoxPlot?p:d?[g]:[u]}}},{key:"getOHLCValue",value:function(t,e){var i=this.w;return{o:this.isBoxPlot?i.globals.seriesCandleH[t][e]:i.globals.seriesCandleO[t][e],h:this.isBoxPlot?i.globals.seriesCandleO[t][e]:i.globals.seriesCandleH[t][e],m:i.globals.seriesCandleM[t][e],l:this.isBoxPlot?i.globals.seriesCandleC[t][e]:i.globals.seriesCandleL[t][e],c:this.isBoxPlot?i.globals.seriesCandleL[t][e]:i.globals.seriesCandleC[t][e]}}}]),s}(E),yt=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w}return a(t,[{key:"checkColorRange",value:function(){var t=this.w,e=!1,i=t.config.plotOptions[t.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map((function(t,i){t.from<=0&&(e=!0)})),e}},{key:"getShadeColor",value:function(t,e,i,a){var s=this.w,r=1,o=s.config.plotOptions[t].shadeIntensity,n=this.determineColor(t,e,i);s.globals.hasNegs||a?r=s.config.plotOptions[t].reverseNegativeShade?n.percent<0?n.percent/100*(1.25*o):(1-n.percent/100)*(1.25*o):n.percent<=0?1-(1+n.percent/100)*o:(1-n.percent/100)*o:(r=1-n.percent/100,"treemap"===t&&(r=(1-n.percent/100)*(1.25*o)));var l=n.color,h=new p;return s.config.plotOptions[t].enableShades&&(l="dark"===this.w.config.theme.mode?p.hexToRgba(h.shadeColor(-1*r,n.color),s.config.fill.opacity):p.hexToRgba(h.shadeColor(r,n.color),s.config.fill.opacity)),{color:l,colorProps:n}}},{key:"determineColor",value:function(t,e,i){var a=this.w,s=a.globals.series[e][i],r=a.config.plotOptions[t],o=r.colorScale.inverse?i:e;a.config.plotOptions[t].distributed&&(o=i);var n=a.globals.colors[o],l=null,h=Math.min.apply(Math,g(a.globals.series[e])),c=Math.max.apply(Math,g(a.globals.series[e]));r.distributed||"heatmap"!==t||(h=a.globals.minY,c=a.globals.maxY),void 0!==r.colorScale.min&&(h=r.colorScale.min<a.globals.minY?r.colorScale.min:a.globals.minY,c=r.colorScale.max>a.globals.maxY?r.colorScale.max:a.globals.maxY);var d=Math.abs(c)+Math.abs(h),u=100*s/(0===d?d-1e-6:d);r.colorScale.ranges.length>0&&r.colorScale.ranges.map((function(t,e){if(s>=t.from&&s<=t.to){n=t.color,l=t.foreColor?t.foreColor:null,h=t.from,c=t.to;var i=Math.abs(c)+Math.abs(h);u=100*s/(0===i?i-1e-6:i)}}));return{color:n,foreColor:l,percent:u}}},{key:"calculateDataLabels",value:function(t){var e=t.text,i=t.x,a=t.y,s=t.i,r=t.j,o=t.colorProps,n=t.fontSize,l=this.w.config.dataLabels,h=new b(this.ctx),c=new M(this.ctx),d=null;if(l.enabled){d=h.group({class:"apexcharts-data-labels"});var g=l.offsetX,u=l.offsetY,p=i+g,f=a+parseFloat(l.style.fontSize)/3+u;c.plotDataLabelsText({x:p,y:f,text:e,i:s,j:r,color:o.foreColor,parent:d,fontSize:n,dataLabelsConfig:l})}return d}},{key:"addListeners",value:function(t){var e=new b(this.ctx);t.node.addEventListener("mouseenter",e.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",e.pathMouseLeave.bind(this,t)),t.node.addEventListener("mousedown",e.pathMouseDown.bind(this,t))}}]),t}(),wt=function(){function t(i,a){e(this,t),this.ctx=i,this.w=i.w,this.xRatio=a.xRatio,this.yRatio=a.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new yt(i),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return a(t,[{key:"draw",value:function(t){var e=this.w,i=new b(this.ctx),a=i.group({class:"apexcharts-heatmap"});a.attr("clip-path","url(#gridRectMask".concat(e.globals.cuid,")"));var s=e.globals.gridWidth/e.globals.dataPoints,r=e.globals.gridHeight/e.globals.series.length,o=0,n=!1;this.negRange=this.helpers.checkColorRange();var l=t.slice();e.config.yaxis[0].reversed&&(n=!0,l.reverse());for(var h=n?0:l.length-1;n?h<l.length:h>=0;n?h++:h--){var c=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:p.escapeString(e.globals.seriesNames[h]),rel:h+1,"data:realIndex":h});if(this.ctx.series.addCollapsedClassToSeries(c,h),e.config.chart.dropShadow.enabled){var d=e.config.chart.dropShadow;new x(this.ctx).dropShadow(c,d,h)}for(var g=0,u=e.config.plotOptions.heatmap.shadeIntensity,f=0;f<l[h].length;f++){var m=this.helpers.getShadeColor(e.config.chart.type,h,f,this.negRange),v=m.color,y=m.colorProps;if("image"===e.config.fill.type)v=new L(this.ctx).fillPath({seriesNumber:h,dataPointIndex:f,opacity:e.globals.hasNegs?y.percent<0?1-(1+y.percent/100):u+y.percent/100:y.percent/100,patternID:p.randomId(),width:e.config.fill.image.width?e.config.fill.image.width:s,height:e.config.fill.image.height?e.config.fill.image.height:r});var w=this.rectRadius,k=i.drawRect(g,o,s,r,w);if(k.attr({cx:g,cy:o}),k.node.classList.add("apexcharts-heatmap-rect"),c.add(k),k.attr({fill:v,i:h,index:h,j:f,val:l[h][f],"stroke-width":this.strokeWidth,stroke:e.config.plotOptions.heatmap.useFillColorAsStroke?v:e.globals.stroke.colors[0],color:v}),this.helpers.addListeners(k),e.config.chart.animations.enabled&&!e.globals.dataChanged){var A=1;e.globals.resized||(A=e.config.chart.animations.speed),this.animateHeatMap(k,g,o,s,r,A)}if(e.globals.dataChanged){var S=1;if(this.dynamicAnim.enabled&&e.globals.shouldAnimate){S=this.dynamicAnim.speed;var C=e.globals.previousPaths[h]&&e.globals.previousPaths[h][f]&&e.globals.previousPaths[h][f].color;C||(C="rgba(255, 255, 255, 0)"),this.animateHeatColor(k,p.isColorHex(C)?C:p.rgb2hex(C),p.isColorHex(v)?v:p.rgb2hex(v),S)}}var P=(0,e.config.dataLabels.formatter)(e.globals.series[h][f],{value:e.globals.series[h][f],seriesIndex:h,dataPointIndex:f,w:e}),T=this.helpers.calculateDataLabels({text:P,x:g+s/2,y:o+r/2,i:h,j:f,colorProps:y,series:l});null!==T&&c.add(T),g+=s}o+=r,a.add(c)}var M=e.globals.yAxisScale[0].result.slice();e.config.yaxis[0].reversed?M.unshift(""):M.push(""),e.globals.yAxisScale[0].result=M;var I=e.globals.gridHeight/e.globals.series.length;return e.config.yaxis[0].labels.offsetY=-I/2,a}}
vendor: 6,370 bytes, line 60674
60674,{key:"animateHeatMap",value:function(t,e,i,a,s,r){var o=new f(this.ctx);o.animateRect(t,{x:e+a/2,y:i+s/2,width:0,height:0},{x:e,y:i,width:a,height:s},r,(function(){o.animationCompleted(t)}))}},{key:"animateHeatColor",value:function(t,e,i,a){t.attr({fill:e}).animate(a).attr({fill:i})}}]),t}(),kt=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w}return a(t,[{key:"drawYAxisTexts",value:function(t,e,i,a){var s=this.w,r=s.config.yaxis[0],o=s.globals.yLabelFormatters[0];return new b(this.ctx).drawText({x:t+r.labels.offsetX,y:e+r.labels.offsetY,text:o(a,i),textAnchor:"middle",fontSize:r.labels.style.fontSize,fontFamily:r.labels.style.fontFamily,foreColor:Array.isArray(r.labels.style.colors)?r.labels.style.colors[i]:r.labels.style.colors})}}]),t}(),At=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w;var a=this.w;this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animBeginArr=[0],this.animDur=0,this.donutDataLabels=this.w.config.plotOptions.pie.donut.labels,this.lineColorArr=void 0!==a.globals.stroke.colors?a.globals.stroke.colors:a.globals.colors,this.defaultSize=Math.min(a.globals.gridWidth,a.globals.gridHeight),this.centerY=this.defaultSize/2,this.centerX=a.globals.gridWidth/2,"radialBar"===a.config.chart.type?this.fullAngle=360:this.fullAngle=Math.abs(a.config.plotOptions.pie.endAngle-a.config.plotOptions.pie.startAngle),this.initialAngle=a.config.plotOptions.pie.startAngle%this.fullAngle,a.globals.radialSize=this.defaultSize/2.05-a.config.stroke.width-(a.config.chart.sparkline.enabled?0:a.config.chart.dropShadow.blur),this.donutSize=a.globals.radialSize*parseInt(a.config.plotOptions.pie.donut.size,10)/100,this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSectorAngleArr=[]}return a(t,[{key:"draw",value:function(t){var e=this,i=this.w,a=new b(this.ctx);if(this.ret=a.group({class:"apexcharts-pie"}),i.globals.noData)return this.ret;for(var s=0,r=0;r<t.length;r++)s+=p.negToZero(t[r]);var o=[],n=a.group();0===s&&(s=1e-5),t.forEach((function(t){e.maxY=Math.max(e.maxY,t)})),i.config.yaxis[0].max&&(this.maxY=i.config.yaxis[0].max),"back"===i.config.grid.position&&"polarArea"===this.chartType&&this.drawPolarElements(this.ret);for(var l=0;l<t.length;l++){var h=this.fullAngle*p.negToZero(t[l])/s;o.push(h),"polarArea"===this.chartType?(o[l]=this.fullAngle/t.length,this.sliceSizes.push(i.globals.radialSize*t[l]/this.maxY)):this.sliceSizes.push(i.globals.radialSize)}if(i.globals.dataChanged){for(var c,d=0,g=0;g<i.globals.previousPaths.length;g++)d+=p.negToZero(i.globals.previousPaths[g]);for(var u=0;u<i.globals.previousPaths.length;u++)c=this.fullAngle*p.negToZero(i.globals.previousPaths[u])/d,this.prevSectorAngleArr.push(c)}this.donutSize<0&&(this.donutSize=0);var f=i.config.plotOptions.pie.customScale,x=i.globals.gridWidth/2,m=i.globals.gridHeight/2,v=x-i.globals.gridWidth/2*f,y=m-i.globals.gridHeight/2*f;if("donut"===this.chartType){var w=a.drawCircle(this.donutSize);w.attr({cx:this.centerX,cy:this.centerY,fill:i.config.plotOptions.pie.donut.background?i.config.plotOptions.pie.donut.background:"transparent"}),n.add(w)}var k=this.drawArcs(o,t);if(this.sliceLabels.forEach((function(t){k.add(t)})),n.attr({transform:"translate(".concat(v,", ").concat(y,") scale(").concat(f,")")}),n.add(k),this.ret.add(n),this.donutDataLabels.show){var A=this.renderInnerDataLabels(this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show,translateX:v,translateY:y});this.ret.add(A)}return"front"===i.config.grid.position&&"polarArea"===this.chartType&&this.drawPolarElements(this.ret),this.ret}},{key:"drawArcs",value:function(t,e){var i=this.w,a=new x(this.ctx),s=new b(this.ctx),r=new L(this.ctx),o=s.group({class:"apexcharts-slices"}),n=this.initialAngle,l=this.initialAngle,h=this.initialAngle,c=this.initialAngle;this.strokeWidth=i.config.stroke.show?i.config.stroke.width:0;for(var d=0;d<t.length;d++){var g=s.group({class:"apexcharts-series apexcharts-pie-series",seriesName:p.escapeString(i.globals.seriesNames[d]),rel:d+1,"data:realIndex":d});o.add(g),l=c,h=(n=h)+t[d],c=l+this.prevSectorAngleArr[d];var u=h<n?this.fullAngle+h-n:h-n,f=r.fillPath({seriesNumber:d,size:this.sliceSizes[d],value:e[d]}),m=this.getChangedPath(l,c),v=s.drawPath({d:m,stroke:Array.isArray(this.lineColorArr)?this.lineColorArr[d]:this.lineColorArr,strokeWidth:0,fill:f,fillOpacity:i.config.fill.opacity,classes:"apexcharts-pie-area apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(d)});if(v.attr({index:0,j:d}),a.setSelectionFilter(v,0,d),i.config.chart.dropShadow.enabled){var y=i.config.chart.dropShadow;a.dropShadow(v,y,d)}this.addListeners(v,this.donutDataLabels),b.setAttrs(v.node,{"data:angle":u,"data:startAngle":n,"data:strokeWidth":this.strokeWidth,"data:value":e[d]});var w={x:0,y:0};"pie"===this.chartType||"polarArea"===this.chartType?w=p.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize/1.25+i.config.plotOptions.pie.dataLabels.offset,(n+u/2)%this.fullAngle):"donut"===this.chartType&&(w=p.polarToCartesian(this.centerX,this.centerY,(i.globals.radialSize+this.donutSize)/2+i.config.plotOptions.pie.dataLabels.offset,(n+u/2)%this.fullAngle)),g.add(v);var k=0;if(!this.initialAnim||i.globals.resized||i.globals.dataChanged?this.animBeginArr.push(0):(0===(k=u/this.fullAngle*i.config.chart.animations.speed)&&(k=1),this.animDur=k+this.animDur,this.animBeginArr.push(this.animDur)),this.dynamicAnim&&i.globals.dataChanged?this.animatePaths(v,{size:this.sliceSizes[d],endAngle:h,startAngle:n,prevStartAngle:l,prevEndAngle:c,animateStartingPos:!0,i:d,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:i.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(v,{size:this.sliceSizes[d],endAngle:h,startAngle:n,i:d,totalItems:t.length-1,animBeginArr:this.animBeginArr,dur:k}),i.config.plotOptions.pie.expandOnClick&&"polarArea"!==this.chartType&&v.click(this.pieClicked.bind(this,d)),void 0!==i.globals.selectedDataPoints[0]&&i.globals.selectedDataPoints[0].indexOf(d)>-1&&this.pieClicked(d),i.config.dataLabels.enabled){var A=w.x,S=w.y,C=100*u/this.fullAngle+"%";if(0!==u&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabel<t[d]){var P=i.config.dataLabels.formatter;
vendor: 6,597 bytes, line 60674
60674void 0!==P&&(C=P(i.globals.seriesPercent[d][0],{seriesIndex:d,w:i}));var T=i.globals.dataLabels.style.colors[d],M=s.group({class:"apexcharts-datalabels"}),I=s.drawText({x:A,y:S,text:C,textAnchor:"middle",fontSize:i.config.dataLabels.style.fontSize,fontFamily:i.config.dataLabels.style.fontFamily,fontWeight:i.config.dataLabels.style.fontWeight,foreColor:T});if(M.add(I),i.config.dataLabels.dropShadow.enabled){var z=i.config.dataLabels.dropShadow;a.dropShadow(I,z)}I.node.classList.add("apexcharts-pie-label"),i.config.chart.animations.animate&&!1===i.globals.resized&&(I.node.classList.add("apexcharts-pie-label-delay"),I.node.style.animationDelay=i.config.chart.animations.speed/940+"s"),this.sliceLabels.push(M)}}}return o}},{key:"addListeners",value:function(t,e){var i=new b(this.ctx);t.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this,t)),t.node.addEventListener("mouseleave",this.revertDataLabelsInner.bind(this,t.node,e)),t.node.addEventListener("mousedown",i.pathMouseDown.bind(this,t)),this.donutDataLabels.total.showAlways||(t.node.addEventListener("mouseenter",this.printDataLabelsInner.bind(this,t.node,e)),t.node.addEventListener("mousedown",this.printDataLabelsInner.bind(this,t.node,e)))}},{key:"animatePaths",value:function(t,e){var i=this.w,a=e.endAngle<e.startAngle?this.fullAngle+e.endAngle-e.startAngle:e.endAngle-e.startAngle,s=a,r=e.startAngle,o=e.startAngle;void 0!==e.prevStartAngle&&void 0!==e.prevEndAngle&&(r=e.prevEndAngle,s=e.prevEndAngle<e.prevStartAngle?this.fullAngle+e.prevEndAngle-e.prevStartAngle:e.prevEndAngle-e.prevStartAngle),e.i===i.config.series.length-1&&(a+o>this.fullAngle?e.endAngle=e.endAngle-(a+o):a+o<this.fullAngle&&(e.endAngle=e.endAngle+(this.fullAngle-(a+o)))),a===this.fullAngle&&(a=this.fullAngle-.01),this.animateArc(t,r,o,a,s,e)}},{key:"animateArc",value:function(t,e,i,a,s,r){var o,n=this,l=this.w,h=new f(this.ctx),c=r.size;(isNaN(e)||isNaN(s))&&(e=i,s=a,r.dur=0);var d=a,g=i,u=e<i?this.fullAngle+e-i:e-i;l.globals.dataChanged&&r.shouldSetPrevPaths&&r.prevEndAngle&&(o=n.getPiePath({me:n,startAngle:r.prevStartAngle,angle:r.prevEndAngle<r.prevStartAngle?this.fullAngle+r.prevEndAngle-r.prevStartAngle:r.prevEndAngle-r.prevStartAngle,size:c}),t.attr({d:o})),0!==r.dur?t.animate(r.dur,l.globals.easing,r.animBeginArr[r.i]).afterAll((function(){"pie"!==n.chartType&&"donut"!==n.chartType&&"polarArea"!==n.chartType||this.animate(l.config.chart.animations.dynamicAnimation.speed).attr({"stroke-width":n.strokeWidth}),r.i===l.config.series.length-1&&h.animationCompleted(t)})).during((function(l){d=u+(a-u)*l,r.animateStartingPos&&(d=s+(a-s)*l,g=e-s+(i-(e-s))*l),o=n.getPiePath({me:n,startAngle:g,angle:d,size:c}),t.node.setAttribute("data:pathOrig",o),t.attr({d:o})})):(o=n.getPiePath({me:n,startAngle:g,angle:a,size:c}),r.isTrack||(l.globals.animationEnded=!0),t.node.setAttribute("data:pathOrig",o),t.attr({d:o,"stroke-width":n.strokeWidth}))}},{key:"pieClicked",value:function(t){var e,i=this.w,a=this,s=a.sliceSizes[t]+(i.config.plotOptions.pie.expandOnClick?4:0),r=i.globals.dom.Paper.select(".apexcharts-".concat(a.chartType.toLowerCase(),"-slice-").concat(t)).members[0];if("true"!==r.attr("data:pieClicked")){var o=i.globals.dom.baseEl.getElementsByClassName("apexcharts-pie-area");Array.prototype.forEach.call(o,(function(t){t.setAttribute("data:pieClicked","false");var e=t.getAttribute("data:pathOrig");t.setAttribute("d",e)})),r.attr("data:pieClicked","true");var n=parseInt(r.attr("data:startAngle"),10),l=parseInt(r.attr("data:angle"),10);e=a.getPiePath({me:a,startAngle:n,angle:l,size:s}),360!==l&&r.plot(e)}else{r.attr({"data:pieClicked":"false"}),this.revertDataLabelsInner(r.node,this.donutDataLabels);var h=r.attr("data:pathOrig");r.attr({d:h})}}},{key:"getChangedPath",value:function(t,e){var i="";return this.dynamicAnim&&this.w.globals.dataChanged&&(i=this.getPiePath({me:this,startAngle:t,angle:e-t,size:this.size})),i}},{key:"getPiePath",value:function(t){var e=t.me,i=t.startAngle,a=t.angle,s=t.size,r=i,o=Math.PI*(r-90)/180,n=a+i;Math.ceil(n)>=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(n=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(n)>this.fullAngle&&(n-=this.fullAngle);var l=Math.PI*(n-90)/180,h=e.centerX+s*Math.cos(o),c=e.centerY+s*Math.sin(o),d=e.centerX+s*Math.cos(l),g=e.centerY+s*Math.sin(l),u=p.polarToCartesian(e.centerX,e.centerY,e.donutSize,n),f=p.polarToCartesian(e.centerX,e.centerY,e.donutSize,r),x=a>180?1:0,b=["M",h,c,"A",s,s,0,x,1,d,g];return"donut"===e.chartType?[].concat(b,["L",u.x,u.y,"A",e.donutSize,e.donutSize,0,x,0,f.x,f.y,"L",h,c,"z"]).join(" "):"pie"===e.chartType||"polarArea"===e.chartType?[].concat(b,["L",e.centerX,e.centerY,"L",h,c]).join(" "):[].concat(b).join(" ")}},{key:"drawPolarElements",value:function(t){var e=this.w,i=new j(this.ctx),a=new b(this.ctx),s=new kt(this.ctx),r=a.group(),o=a.group(),n=i.niceScale(0,Math.ceil(this.maxY),e.config.yaxis[0].tickAmount,0,!0),l=n.result.reverse(),h=n.result.length;this.maxY=n.niceMax;for(var c=e.globals.radialSize,d=c/(h-1),g=0;g<h-1;g++){var u=a.drawCircle(c);if(u.attr({cx:this.centerX,cy:this.centerY,fill:"none","stroke-width":e.config.plotOptions.polarArea.rings.strokeWidth,stroke:e.config.plotOptions.polarArea.rings.strokeColor}),e.config.yaxis[0].show){var p=s.drawYAxisTexts(this.centerX,this.centerY-c+parseInt(e.config.yaxis[0].labels.style.fontSize,10)/2,g,l[g]);o.add(p)}r.add(u),c-=d}this.drawSpokes(t),t.add(r),t.add(o)}},{key:"renderInnerDataLabels",value:function(t,e){var i=this.w,a=new b(this.ctx),s=a.group({class:"apexcharts-datalabels-group",transform:"translate(".concat(e.translateX?e.translateX:0,", ").concat(e.translateY?e.translateY:0,") scale(").concat(i.config.plotOptions.pie.customScale,")")}),r=t.total.show;s.node.style.opacity=e.opacity;var o,n,l=e.centerX,h=e.centerY;o=void 0===t.name.color?i.globals.colors[0]:t.name.color;var c=t.name.fontSize,d=t.name.fontFamily,g=t.value.fontWeight;n=void 0===t.value.color?i.config.chart.foreColor:t.value.color;var u=t.value.formatter,p="",f="";if(r?(o=t.total.color,c=t.total.fontSize,d=t.total.fontFamily,g=t.total.fontWeight,f=t.total.label,p=t.total.formatter(i)):1===i.globals.series.length&&(p=u(i.globals.series[0],i),f=i.globals.seriesNames[0]),f&&(f=t.name.formatter(f,t.total.show,i)),t.name.show){var x=a.drawText({x:l,y:h+parseFloat(t.name.offsetY),text:f,textAnchor:"middle",foreColor:o,fontSize:c,fontWeight:g,fontFamily:d});x.node.classList.add("apexcharts-datalabel-label"),s.add(x)}
vendor: 11,967 bytes, line 60674
60674if(t.value.show){var m=t.name.show?parseFloat(t.value.offsetY)+16:t.value.offsetY,v=a.drawText({x:l,y:h+m,text:p,textAnchor:"middle",foreColor:n,fontWeight:t.value.fontWeight,fontSize:t.value.fontSize,fontFamily:t.value.fontFamily});v.node.classList.add("apexcharts-datalabel-value"),s.add(v)}return s}},{key:"printInnerLabels",value:function(t,e,i,a){var s,r=this.w;a?s=void 0===t.name.color?r.globals.colors[parseInt(a.parentNode.getAttribute("rel"),10)-1]:t.name.color:r.globals.series.length>1&&t.total.show&&(s=t.total.color);var o=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),n=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,t.value.formatter)(i,r),a||"function"!=typeof t.total.formatter||(i=t.total.formatter(r));var l=e===t.total.label;e=t.name.formatter(e,l,r),null!==o&&(o.textContent=e),null!==n&&(n.textContent=i),null!==o&&(o.style.fill=s)}},{key:"printDataLabelsInner",value:function(t,e){var i=this.w,a=t.getAttribute("data:value"),s=i.globals.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(e,s,a,t);var r=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==r&&(r.style.opacity=1)}},{key:"drawSpokes",value:function(t){var e=this,i=this.w,a=new b(this.ctx),s=i.config.plotOptions.polarArea.spokes;if(0!==s.strokeWidth){for(var r=[],o=360/i.globals.series.length,n=0;n<i.globals.series.length;n++)r.push(p.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize,i.config.plotOptions.pie.startAngle+o*n));r.forEach((function(i,r){var o=a.drawLine(i.x,i.y,e.centerX,e.centerY,Array.isArray(s.connectorColors)?s.connectorColors[r]:s.connectorColors);t.add(o)}))}}},{key:"revertDataLabelsInner",value:function(t,e,i){var a=this,s=this.w,r=s.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group"),o=!1,n=s.globals.dom.baseEl.getElementsByClassName("apexcharts-pie-area"),l=function(t){var i=t.makeSliceOut,s=t.printLabel;Array.prototype.forEach.call(n,(function(t){"true"===t.getAttribute("data:pieClicked")&&(i&&(o=!0),s&&a.printDataLabelsInner(t,e))}))};if(l({makeSliceOut:!0,printLabel:!1}),e.total.show&&s.globals.series.length>1)o&&!e.total.showAlways?l({makeSliceOut:!1,printLabel:!0}):this.printInnerLabels(e,e.total.label,e.total.formatter(s));else if(l({makeSliceOut:!1,printLabel:!0}),!o)if(s.globals.selectedDataPoints.length&&s.globals.series.length>1)if(s.globals.selectedDataPoints[0].length>0){var h=s.globals.selectedDataPoints[0],c=s.globals.dom.baseEl.querySelector(".apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(h));this.printDataLabelsInner(c,e)}else r&&s.globals.selectedDataPoints.length&&0===s.globals.selectedDataPoints[0].length&&(r.style.opacity=0);else r&&s.globals.series.length>1&&(r.style.opacity=0)}}]),t}(),St=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0;var a=this.w;this.graphics=new b(this.ctx),this.lineColorArr=void 0!==a.globals.stroke.colors?a.globals.stroke.colors:a.globals.colors,this.defaultSize=a.globals.svgHeight<a.globals.svgWidth?a.globals.gridHeight+1.5*a.globals.goldenPadding:a.globals.gridWidth,this.isLog=a.config.yaxis[0].logarithmic,this.coreUtils=new y(this.ctx),this.maxValue=this.isLog?this.coreUtils.getLogVal(a.globals.maxY,0):a.globals.maxY,this.minValue=this.isLog?this.coreUtils.getLogVal(this.w.globals.minY,0):a.globals.minY,this.polygons=a.config.plotOptions.radar.polygons,this.strokeWidth=a.config.stroke.show?a.config.stroke.width:0,this.size=this.defaultSize/2.1-this.strokeWidth-a.config.chart.dropShadow.blur,a.config.xaxis.labels.show&&(this.size=this.size-a.globals.xAxisLabelsWidth/1.75),void 0!==a.config.plotOptions.radar.size&&(this.size=a.config.plotOptions.radar.size),this.dataRadiusOfPercent=[],this.dataRadius=[],this.angleArr=[],this.yaxisLabelsTextsPos=[]}return a(t,[{key:"draw",value:function(t){var e=this,i=this.w,a=new L(this.ctx),s=[],r=new M(this.ctx);t.length&&(this.dataPointsLen=t[i.globals.maxValsInArrayIndex].length),this.disAngle=2*Math.PI/this.dataPointsLen;var n=i.globals.gridWidth/2,l=i.globals.gridHeight/2,h=n+i.config.plotOptions.radar.offsetX,c=l+i.config.plotOptions.radar.offsetY,d=this.graphics.group({class:"apexcharts-radar-series apexcharts-plot-series",transform:"translate(".concat(h||0,", ").concat(c||0,")")}),g=[],u=null,f=null;if(this.yaxisLabels=this.graphics.group({class:"apexcharts-yaxis"}),t.forEach((function(t,n){var l=t.length===i.globals.dataPoints,h=e.graphics.group().attr({class:"apexcharts-series","data:longestSeries":l,seriesName:p.escapeString(i.globals.seriesNames[n]),rel:n+1,"data:realIndex":n});e.dataRadiusOfPercent[n]=[],e.dataRadius[n]=[],e.angleArr[n]=[],t.forEach((function(t,i){var a=Math.abs(e.maxValue-e.minValue);t+=Math.abs(e.minValue),e.isLog&&(t=e.coreUtils.getLogVal(t,0)),e.dataRadiusOfPercent[n][i]=t/a,e.dataRadius[n][i]=e.dataRadiusOfPercent[n][i]*e.size,e.angleArr[n][i]=i*e.disAngle})),g=e.getDataPointsPos(e.dataRadius[n],e.angleArr[n]);var c=e.createPaths(g,{x:0,y:0});u=e.graphics.group({class:"apexcharts-series-markers-wrap apexcharts-element-hidden"}),f=e.graphics.group({class:"apexcharts-datalabels","data:realIndex":n}),i.globals.delayedElements.push({el:u.node,index:n});var d={i:n,realIndex:n,animationDelay:n,initialSpeed:i.config.chart.animations.speed,dataChangeSpeed:i.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-radar",shouldClipToGrid:!1,bindEventsOnPaths:!1,stroke:i.globals.stroke.colors[n],strokeLineCap:i.config.stroke.lineCap},b=null;i.globals.previousPaths.length>0&&(b=e.getPreviousPath(n));for(var m=0;m<c.linePathsTo.length;m++){var v=e.graphics.renderPaths(o(o({},d),{},{pathFrom:null===b?c.linePathsFrom[m]:b,pathTo:c.linePathsTo[m],strokeWidth:Array.isArray(e.strokeWidth)?e.strokeWidth[n]:e.strokeWidth,fill:"none",drawShadow:!1}));h.add(v);var y=a.fillPath({seriesNumber:n}),w=e.graphics.renderPaths(o(o({},d),{},{pathFrom:null===b?c.areaPathsFrom[m]:b,pathTo:c.areaPathsTo[m],strokeWidth:0,fill:y,drawShadow:!1}));if(i.config.chart.dropShadow.enabled){var k=new x(e.ctx),A=i.config.chart.dropShadow;k.dropShadow(w,Object.assign({},A,{noUserSpaceOnUse:!0}),n)}h.add(w)}t.forEach((function(t,a){var s=new P(e.ctx).getMarkerConfig("apexcharts-marker",n,a),l=e.graphics.drawMarker(g[a].x,g[a].y,s);l.attr("rel",a),l.attr("j",a),l.attr("index",n),l.node.setAttribute("default-marker-size",s.pSize);var c=e.graphics.group({class:"apexcharts-series-markers"});c&&c.add(l),u.add(c),h.add(u);var d=i.config.dataLabels;if(d.enabled){var p=d.formatter(i.globals.series[n][a],{seriesIndex:n,dataPointIndex:a,w:i});r.plotDataLabelsText({x:g[a].x,y:g[a].y,text:p,textAnchor:"middle",i:n,j:n,parent:f,offsetCorrection:!1,dataLabelsConfig:o({},d)})}h.add(f)})),s.push(h)})),this.drawPolygons({parent:d}),i.config.xaxis.labels.show){var b=this.drawXAxisTexts();d.add(b)}return s.forEach((function(t){d.add(t)})),d.add(this.yaxisLabels),d}},{key:"drawPolygons",value:function(t){for(var e=this,i=this.w,a=t.parent,s=new kt(this.ctx),r=i.globals.yAxisScale[0].result.reverse(),o=r.length,n=[],l=this.size/(o-1),h=0;h<o;h++)n[h]=l*h;n.reverse();var c=[],d=[];n.forEach((function(t,i){var a=p.getPolygonPos(t,e.dataPointsLen),s="";a.forEach((function(t,a){if(0===i){var r=e.graphics.drawLine(t.x,t.y,0,0,Array.isArray(e.polygons.connectorColors)?e.polygons.connectorColors[a]:e.polygons.connectorColors);d.push(r)}0===a&&e.yaxisLabelsTextsPos.push({x:t.x,y:t.y}),s+=t.x+","+t.y+" "})),c.push(s)})),c.forEach((function(t,s){var r=e.polygons.strokeColors,o=e.polygons.strokeWidth,n=e.graphics.drawPolygon(t,Array.isArray(r)?r[s]:r,Array.isArray(o)?o[s]:o,i.globals.radarPolygons.fill.colors[s]);a.add(n)})),d.forEach((function(t){a.add(t)})),i.config.yaxis[0].show&&this.yaxisLabelsTextsPos.forEach((function(t,i){var a=s.drawYAxisTexts(t.x,t.y,i,r[i]);e.yaxisLabels.add(a)}))}},{key:"drawXAxisTexts",value:function(){var t=this,e=this.w,i=e.config.xaxis.labels,a=this.graphics.group({class:"apexcharts-xaxis"}),s=p.getPolygonPos(this.size,this.dataPointsLen);return e.globals.labels.forEach((function(r,n){var l=e.config.xaxis.labels.formatter,h=new M(t.ctx);if(s[n]){var c=t.getTextPos(s[n],t.size),d=l(r,{seriesIndex:-1,dataPointIndex:n,w:e});h.plotDataLabelsText({x:c.newX,y:c.newY,text:d,textAnchor:c.textAnchor,i:n,j:n,parent:a,color:Array.isArray(i.style.colors)&&i.style.colors[n]?i.style.colors[n]:"#a8a8a8",dataLabelsConfig:o({textAnchor:c.textAnchor,dropShadow:{enabled:!1}},i),offsetCorrection:!1})}})),a}},{key:"createPaths",value:function(t,e){var i=this,a=[],s=[],r=[],o=[];if(t.length){s=[this.graphics.move(e.x,e.y)],o=[this.graphics.move(e.x,e.y)];var n=this.graphics.move(t[0].x,t[0].y),l=this.graphics.move(t[0].x,t[0].y);t.forEach((function(e,a){n+=i.graphics.line(e.x,e.y),l+=i.graphics.line(e.x,e.y),a===t.length-1&&(n+="Z",l+="Z")})),a.push(n),r.push(l)}return{linePathsFrom:s,linePathsTo:a,areaPathsFrom:o,areaPathsTo:r}}},{key:"getTextPos",value:function(t,e){var i="middle",a=t.x,s=t.y;return Math.abs(t.x)>=10?t.x>0?(i="start",a+=10):t.x<0&&(i="end",a-=10):i="middle",Math.abs(t.y)>=e-10&&(t.y<0?s-=10:t.y>0&&(s+=10)),{textAnchor:i,newX:a,newY:s}}},{key:"getPreviousPath",value:function(t){for(var e=this.w,i=null,a=0;a<e.globals.previousPaths.length;a++){var s=e.globals.previousPaths[a];s.paths.length>0&&parseInt(s.realIndex,10)===parseInt(t,10)&&void 0!==e.globals.previousPaths[a].paths[0]&&(i=e.globals.previousPaths[a].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;t=t||[],e=e||[];for(var a=[],s=0;s<i;s++){var r={};r.x=t[s]*Math.sin(e[s]),r.y=-t[s]*Math.cos(e[s]),a.push(r)}return a}}]),t}(),Ct=function(t){n(s,t);var i=d(s);function s(t){var a;e(this,s),(a=i.call(this,t)).ctx=t,a.w=t.w,a.animBeginArr=[0],a.animDur=0;var r=a.w;return a.startAngle=r.config.plotOptions.radialBar.startAngle,a.endAngle=r.config.plotOptions.radialBar.endAngle,a.totalAngle=Math.abs(r.config.plotOptions.radialBar.endAngle-r.config.plotOptions.radialBar.startAngle),a.trackStartAngle=r.config.plotOptions.radialBar.track.startAngle,a.trackEndAngle=r.config.plotOptions.radialBar.track.endAngle,a.radialDataLabels=r.config.plotOptions.radialBar.dataLabels,a.trackStartAngle||(a.trackStartAngle=a.startAngle),a.trackEndAngle||(a.trackEndAngle=a.endAngle),360===a.endAngle&&(a.endAngle=359.99),a.margin=parseInt(r.config.plotOptions.radialBar.track.margin,10),a}return a(s,[{key:"draw",value:function(t){var e=this.w,i=new b(this.ctx),a=i.group({class:"apexcharts-radialbar"});if(e.globals.noData)return a;var s=i.group(),r=this.defaultSize/2,o=e.globals.gridWidth/2,n=this.defaultSize/2.05;e.config.chart.sparkline.enabled||(n=n-e.config.stroke.width-e.config.chart.dropShadow.blur);var l=e.globals.fill.colors;if(e.config.plotOptions.radialBar.track.show){var h=this.drawTracks({size:n,centerX:o,centerY:r,colorArr:l,series:t});s.add(h)}var c=this.drawArcs({size:n,centerX:o,centerY:r,colorArr:l,series:t}),d=360;e.config.plotOptions.radialBar.startAngle<0&&(d=this.totalAngle);var g=(360-d)/360;if(e.globals.radialSize=n-n*g,this.radialDataLabels.value.show){var u=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);e.globals.radialSize+=u*g}return s.add(c.g),"front"===e.config.plotOptions.radialBar.hollow.position&&(c.g.add(c.elHollow),c.dataLabels&&c.g.add(c.dataLabels)),a.add(s),a}},{key:"drawTracks",value:function(t){var e=this.w,i=new b(this.ctx),a=i.group({class:"apexcharts-tracks"}),s=new x(this.ctx),r=new L(this.ctx),o=this.getStrokeWidth(t);t.size=t.size-o/2;for(var n=0;n<t.series.length;n++){var l=i.group({class:"apexcharts-radialbar-track apexcharts-track"});a.add(l),l.attr({rel:n+1}),t.size=t.size-o-this.margin;
vendor: 7,464 bytes, line 60674
60674var h=e.config.plotOptions.radialBar.track,c=r.fillPath({seriesNumber:0,size:t.size,fillColors:Array.isArray(h.background)?h.background[n]:h.background,solid:!0}),d=this.trackStartAngle,g=this.trackEndAngle;Math.abs(g)+Math.abs(d)>=360&&(g=360-Math.abs(this.startAngle)-.1);var u=i.drawPath({d:"",stroke:c,strokeWidth:o*parseInt(h.strokeWidth,10)/100,fill:"none",strokeOpacity:h.opacity,classes:"apexcharts-radialbar-area"});if(h.dropShadow.enabled){var p=h.dropShadow;s.dropShadow(u,p)}l.add(u),u.attr("id","apexcharts-radialbarTrack-"+n),this.animatePaths(u,{centerX:t.centerX,centerY:t.centerY,endAngle:g,startAngle:d,size:t.size,i:n,totalItems:2,animBeginArr:0,dur:0,isTrack:!0,easing:e.globals.easing})}return a}},{key:"drawArcs",value:function(t){var e=this.w,i=new b(this.ctx),a=new L(this.ctx),s=new x(this.ctx),r=i.group(),o=this.getStrokeWidth(t);t.size=t.size-o/2;var n=e.config.plotOptions.radialBar.hollow.background,l=t.size-o*t.series.length-this.margin*t.series.length-o*parseInt(e.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,h=l-e.config.plotOptions.radialBar.hollow.margin;void 0!==e.config.plotOptions.radialBar.hollow.image&&(n=this.drawHollowImage(t,r,l,n));var c=this.drawHollow({size:h,centerX:t.centerX,centerY:t.centerY,fill:n||"transparent"});if(e.config.plotOptions.radialBar.hollow.dropShadow.enabled){var d=e.config.plotOptions.radialBar.hollow.dropShadow;s.dropShadow(c,d)}var g=1;!this.radialDataLabels.total.show&&e.globals.series.length>1&&(g=0);var u=null;this.radialDataLabels.show&&(u=this.renderInnerDataLabels(this.radialDataLabels,{hollowSize:l,centerX:t.centerX,centerY:t.centerY,opacity:g})),"back"===e.config.plotOptions.radialBar.hollow.position&&(r.add(c),u&&r.add(u));var f=!1;e.config.plotOptions.radialBar.inverseOrder&&(f=!0);for(var m=f?t.series.length-1:0;f?m>=0:m<t.series.length;f?m--:m++){var v=i.group({class:"apexcharts-series apexcharts-radial-series",seriesName:p.escapeString(e.globals.seriesNames[m])});r.add(v),v.attr({rel:m+1,"data:realIndex":m}),this.ctx.series.addCollapsedClassToSeries(v,m),t.size=t.size-o-this.margin;var y=a.fillPath({seriesNumber:m,size:t.size,value:t.series[m]}),w=this.startAngle,k=void 0,A=p.negToZero(t.series[m]>100?100:t.series[m])/100,S=Math.round(this.totalAngle*A)+this.startAngle,C=void 0;e.globals.dataChanged&&(k=this.startAngle,C=Math.round(this.totalAngle*p.negToZero(e.globals.previousPaths[m])/100)+k),Math.abs(S)+Math.abs(w)>=360&&(S-=.01),Math.abs(C)+Math.abs(k)>=360&&(C-=.01);var P=S-w,T=Array.isArray(e.config.stroke.dashArray)?e.config.stroke.dashArray[m]:e.config.stroke.dashArray,M=i.drawPath({d:"",stroke:y,strokeWidth:o,fill:"none",fillOpacity:e.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+m,strokeDashArray:T});if(b.setAttrs(M.node,{"data:angle":P,"data:value":t.series[m]}),e.config.chart.dropShadow.enabled){var I=e.config.chart.dropShadow;s.dropShadow(M,I,m)}s.setSelectionFilter(M,0,m),this.addListeners(M,this.radialDataLabels),v.add(M),M.attr({index:0,j:m});var z=0;!this.initialAnim||e.globals.resized||e.globals.dataChanged||(z=(S-w)/360*e.config.chart.animations.speed,this.animDur=z/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur)),e.globals.dataChanged&&(z=(S-w)/360*e.config.chart.animations.dynamicAnimation.speed,this.animDur=z/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur)),this.animatePaths(M,{centerX:t.centerX,centerY:t.centerY,endAngle:S,startAngle:w,prevEndAngle:C,prevStartAngle:k,size:t.size,i:m,totalItems:2,animBeginArr:this.animBeginArr,dur:z,shouldSetPrevPaths:!0,easing:e.globals.easing})}return{g:r,elHollow:c,dataLabels:u}}},{key:"drawHollow",value:function(t){var e=new b(this.ctx).drawCircle(2*t.size);return e.attr({class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill}),e}},{key:"drawHollowImage",value:function(t,e,i,a){var s=this.w,r=new L(this.ctx),o=p.randomId(),n=s.config.plotOptions.radialBar.hollow.image;if(s.config.plotOptions.radialBar.hollow.imageClipped)r.clippedImgArea({width:i,height:i,image:n,patternID:"pattern".concat(s.globals.cuid).concat(o)}),a="url(#pattern".concat(s.globals.cuid).concat(o,")");else{var l=s.config.plotOptions.radialBar.hollow.imageWidth,h=s.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===l&&void 0===h){var c=s.globals.dom.Paper.image(n).loaded((function(e){this.move(t.centerX-e.width/2+s.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-e.height/2+s.config.plotOptions.radialBar.hollow.imageOffsetY)}));e.add(c)}else{var d=s.globals.dom.Paper.image(n).loaded((function(e){this.move(t.centerX-l/2+s.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-h/2+s.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,h)}));e.add(d)}}return a}},{key:"getStrokeWidth",value:function(t){var e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}}]),s}(At),Lt=function(){function t(i){e(this,t),this.w=i.w,this.lineCtx=i}return a(t,[{key:"sameValueSeriesFix",value:function(t,e){var i=this.w;if("line"===i.config.chart.type&&("gradient"===i.config.fill.type||"gradient"===i.config.fill.type[t])&&new y(this.lineCtx.ctx,i).seriesHaveSameValues(t)){var a=e[t].slice();a[a.length-1]=a[a.length-1]+1e-6,e[t]=a}return e}},{key:"calculatePoints",value:function(t){var e=t.series,i=t.realIndex,a=t.x,s=t.y,r=t.i,o=t.j,n=t.prevY,l=this.w,h=[],c=[];if(0===o){var d=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;l.globals.isXNumeric&&(d=(l.globals.seriesX[i][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),h.push(d),c.push(p.isNumber(e[r][0])?n+l.config.markers.offsetY:null),h.push(a+l.config.markers.offsetX),c.push(p.isNumber(e[r][o+1])?s+l.config.markers.offsetY:null)}else h.push(a+l.config.markers.offsetX),c.push(p.isNumber(e[r][o+1])?s+l.config.markers.offsetY:null);return{x:h,y:c}}},{key:"checkPreviousPaths",value:function(t){for(var e=t.pathFromLine,i=t.pathFromArea,a=t.realIndex,s=this.w,r=0;r<s.globals.previousPaths.length;r++){var o=s.globals.previousPaths[r];("line"===o.type||"area"===o.type)&&o.paths.length>0&&parseInt(o.realIndex,10)===parseInt(a,10)&&("line"===o.type?(this.lineCtx.appendPathFrom=!1,e=s.globals.previousPaths[r].paths[0].d):"area"===o.type&&(this.lineCtx.appendPathFrom=!1,i=s.globals.previousPaths[r].paths[0].d,s.config.stroke.show&&s.globals.previousPaths[r].paths[1]&&(e=s.globals.previousPaths[r].paths[1].d)))}return{pathFromLine:e,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(t){var e=t.i,i=t.series,a=t.prevY,s=t.lineYPosition,r=this.w;if(void 0!==i[e][0])a=(s=r.config.chart.stacked&&e>0?this.lineCtx.prevSeriesY[e-1][0]:this.lineCtx.zeroY)-i[e][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]+2*(this.lineCtx.isReversed?i[e][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]:0);else if(r.config.chart.stacked&&e>0&&void 0===i[e][0])for(var o=e-1;o>=0;o--)if(null!==i[o][0]&&void 0!==i[o][0]){a=s=this.lineCtx.prevSeriesY[o][0];break}return{prevY:a,lineYPosition:s}}}]),t}(),Pt=function(){function t(i,a,s){e(this,t),this.ctx=i,this.w=i.w,this.xyRatios=a,this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||s,this.scatter=new T(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Lt(this),this.markers=new P(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}
vendor: 5,335 bytes, line 60674
60674return a(t,[{key:"draw",value:function(t,e,i){var a=this.w,s=new b(this.ctx),r=a.globals.comboCharts?e:a.config.chart.type,o=s.group({class:"apexcharts-".concat(r,"-series apexcharts-plot-series")}),n=new y(this.ctx,a);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,t=n.getLogSeries(t),this.yRatio=n.getLogYRatios(this.yRatio);for(var l=[],h=0;h<t.length;h++){t=this.lineHelpers.sameValueSeriesFix(h,t);var c=a.globals.comboCharts?i[h]:h;this._initSerieVariables(t,h,c);var d=[],g=[],u=a.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,c),a.globals.isXNumeric&&a.globals.seriesX.length>0&&(u=(a.globals.seriesX[c][0]-a.globals.minX)/this.xRatio),g.push(u);var p,f=u,x=f,m=this.zeroY;m=this.lineHelpers.determineFirstPrevY({i:h,series:t,prevY:m,lineYPosition:0}).prevY,d.push(m),p=m;var v=this._calculatePathsFrom({series:t,i:h,realIndex:c,prevX:x,prevY:m}),w=this._iterateOverDataPoints({series:t,realIndex:c,i:h,x:u,y:1,pX:f,pY:p,pathsFrom:v,linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:g,yArrj:d});this._handlePaths({type:r,realIndex:c,i:h,paths:w}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),l.push(this.elSeries)}if(a.config.chart.stacked)for(var k=l.length;k>0;k--)o.add(l[k-1]);else for(var A=0;A<l.length;A++)o.add(l[A]);return o}},{key:"_initSerieVariables",value:function(t,e,i){var a=this.w,s=new b(this.ctx);this.xDivision=a.globals.gridWidth/(a.globals.dataPoints-("on"===a.config.xaxis.tickPlacement?1:0)),this.strokeWidth=Array.isArray(a.config.stroke.width)?a.config.stroke.width[i]:a.config.stroke.width,this.yRatio.length>1&&(this.yaxisIndex=i),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed,this.zeroY=a.globals.gridHeight-this.baseLineY[this.yaxisIndex]-(this.isReversed?a.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[this.yaxisIndex]:0),this.areaBottomY=this.zeroY,(this.zeroY>a.globals.gridHeight||"end"===a.config.plotOptions.area.fillTo)&&(this.areaBottomY=a.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=s.group({class:"apexcharts-series",seriesName:p.escapeString(a.globals.seriesNames[i])}),this.elPointsMain=s.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),this.elDataLabelsWrap=s.group({class:"apexcharts-datalabels","data:realIndex":i});var r=t[e].length===a.globals.dataPoints;this.elSeries.attr({"data:longestSeries":r,rel:e+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(t){var e,i,a,s,r=t.series,o=t.i,n=t.realIndex,l=t.prevX,h=t.prevY,c=this.w,d=new b(this.ctx);if(null===r[o][0]){for(var g=0;g<r[o].length;g++)if(null!==r[o][g]){l=this.xDivision*g,h=this.zeroY-r[o][g]/this.yRatio[this.yaxisIndex],e=d.move(l,h),i=d.move(l,this.areaBottomY);break}}else e=d.move(l,h),i=d.move(l,this.areaBottomY)+d.line(l,h);if(a=d.move(-1,this.zeroY)+d.line(-1,this.zeroY),s=d.move(-1,this.zeroY)+d.line(-1,this.zeroY),c.globals.previousPaths.length>0){var u=this.lineHelpers.checkPreviousPaths({pathFromLine:a,pathFromArea:s,realIndex:n});a=u.pathFromLine,s=u.pathFromArea}return{prevX:l,prevY:h,linePath:e,areaPath:i,pathFromLine:a,pathFromArea:s}}},{key:"_handlePaths",value:function(t){var e=t.type,i=t.realIndex,a=t.i,s=t.paths,r=this.w,n=new b(this.ctx),l=new L(this.ctx);this.prevSeriesY.push(s.yArrj),r.globals.seriesXvalues[i]=s.xArrj,r.globals.seriesYvalues[i]=s.yArrj;var h=r.config.forecastDataPoints;if(h.count>0){var c=r.globals.seriesXvalues[i][r.globals.seriesXvalues[i].length-h.count-1],d=n.drawRect(c,0,r.globals.gridWidth,r.globals.gridHeight,0);r.globals.dom.elForecastMask.appendChild(d.node);var g=n.drawRect(0,0,c,r.globals.gridHeight,0);r.globals.dom.elNonForecastMask.appendChild(g.node)}this.pointsChart||r.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var u={i:a,realIndex:i,animationDelay:a,initialSpeed:r.config.chart.animations.speed,dataChangeSpeed:r.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(e)};if("area"===e)for(var p=l.fillPath({seriesNumber:i}),f=0;f<s.areaPaths.length;f++){var x=n.renderPaths(o(o({},u),{},{pathFrom:s.pathFromArea,pathTo:s.areaPaths[f],stroke:"none",strokeWidth:0,strokeLineCap:null,fill:p}));this.elSeries.add(x)}if(r.config.stroke.show&&!this.pointsChart){var m=null;m="line"===e?l.fillPath({seriesNumber:i,i:a}):r.globals.stroke.colors[i];for(var v=0;v<s.linePaths.length;v++){var y=o(o({},u),{},{pathFrom:s.pathFromLine,pathTo:s.linePaths[v],stroke:m,strokeWidth:this.strokeWidth,strokeLineCap:r.config.stroke.lineCap,fill:"none"}),w=n.renderPaths(y);if(this.elSeries.add(w),h.count>0){var k=n.renderPaths(y);k.node.setAttribute("stroke-dasharray",h.dashArray),h.strokeWidth&&k.node.setAttribute("stroke-width",h.strokeWidth),this.elSeries.add(k),k.attr("clip-path","url(#forecastMask".concat(r.globals.cuid,")")),w.attr("clip-path","url(#nonForecastMask".concat(r.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(t){for(var e=t.series,i=t.realIndex,a=t.i,s=t.x,r=t.y,o=t.pX,n=t.pY,l=t.pathsFrom,h=t.linePaths,c=t.areaPaths,d=t.seriesIndex,g=t.lineYPosition,u=t.xArrj,f=t.yArrj,x=this.w,m=new b(this.ctx),v=this.yRatio,y=l.prevY,
vendor: 32,091 bytes, line 60674
60674w=l.linePath,k=l.areaPath,A=l.pathFromLine,S=l.pathFromArea,C=p.isNumber(x.globals.minYArr[i])?x.globals.minYArr[i]:x.globals.minY,L=x.globals.dataPoints>1?x.globals.dataPoints-1:x.globals.dataPoints,P=0;P<L;P++){var T=void 0===e[a][P+1]||null===e[a][P+1];if(x.globals.isXNumeric){var M=x.globals.seriesX[i][P+1];void 0===x.globals.seriesX[i][P+1]&&(M=x.globals.seriesX[i][L-1]),s=(M-x.globals.minX)/this.xRatio}else s+=this.xDivision;if(x.config.chart.stacked)if(a>0&&x.globals.collapsedSeries.length<x.config.series.length-1){g=this.prevSeriesY[function(t){for(var e=t,i=0;i<x.globals.series.length;i++)if(x.globals.collapsedSeriesIndices.indexOf(t)>-1){e--;break}return e>=0?e:0}(a-1)][P+1]}else g=this.zeroY;else g=this.zeroY;r=T?g-C/v[this.yaxisIndex]+2*(this.isReversed?C/v[this.yaxisIndex]:0):g-e[a][P+1]/v[this.yaxisIndex]+2*(this.isReversed?e[a][P+1]/v[this.yaxisIndex]:0),u.push(s),f.push(r);var I=this.lineHelpers.calculatePoints({series:e,x:s,y:r,realIndex:i,i:a,j:P,prevY:y}),z=this._createPaths({series:e,i:a,realIndex:i,j:P,x:s,y:r,pX:o,pY:n,linePath:w,areaPath:k,linePaths:h,areaPaths:c,seriesIndex:d});c=z.areaPaths,h=z.linePaths,o=z.pX,n=z.pY,k=z.areaPath,w=z.linePath,this.appendPathFrom&&(A+=m.line(s,this.zeroY),S+=m.line(s,this.zeroY)),this.handleNullDataPoints(e,I,a,P,i),this._handleMarkersAndLabels({pointsPos:I,series:e,x:s,y:r,prevY:y,i:a,j:P,realIndex:i})}return{yArrj:f,xArrj:u,pathFromArea:S,areaPaths:c,pathFromLine:A,linePaths:h}}},{key:"_handleMarkersAndLabels",value:function(t){var e=t.pointsPos;t.series,t.x,t.y,t.prevY;var i=t.i,a=t.j,s=t.realIndex,r=this.w,o=new M(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,a,{realIndex:s,pointsPos:e,zRatio:this.zRatio,elParent:this.elPointsMain});else{r.globals.series[i].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var n=this.markers.plotChartMarkers(e,s,a+1);null!==n&&this.elPointsMain.add(n)}var l=o.drawDataLabel(e,s,a+1,null);null!==l&&this.elDataLabelsWrap.add(l)}},{key:"_createPaths",value:function(t){var e=t.series,i=t.i,a=t.realIndex,s=t.j,r=t.x,o=t.y,n=t.pX,l=t.pY,h=t.linePath,c=t.areaPath,d=t.linePaths,g=t.areaPaths,u=t.seriesIndex,p=this.w,f=new b(this.ctx),x=p.config.stroke.curve,m=this.areaBottomY;if(Array.isArray(p.config.stroke.curve)&&(x=Array.isArray(u)?p.config.stroke.curve[u[i]]:p.config.stroke.curve[i]),"smooth"===x){var v=.35*(r-n);p.globals.hasNullValues?(null!==e[i][s]&&(null!==e[i][s+1]?(h=f.move(n,l)+f.curve(n+v,l,r-v,o,r+1,o),c=f.move(n+1,l)+f.curve(n+v,l,r-v,o,r+1,o)+f.line(r,m)+f.line(n,m)+"z"):(h=f.move(n,l),c=f.move(n,l)+"z")),d.push(h),g.push(c)):(h+=f.curve(n+v,l,r-v,o,r,o),c+=f.curve(n+v,l,r-v,o,r,o)),n=r,l=o,s===e[i].length-2&&(c=c+f.curve(n,l,r,o,r,m)+f.move(r,o)+"z",p.globals.hasNullValues||(d.push(h),g.push(c)))}else{if(null===e[i][s+1]){h+=f.move(r,o);var y=p.globals.isXNumeric?(p.globals.seriesX[a][s]-p.globals.minX)/this.xRatio:r-this.xDivision;c=c+f.line(y,m)+f.move(r,o)+"z"}null===e[i][s]&&(h+=f.move(r,o),c+=f.move(r,m)),"stepline"===x?(h=h+f.line(r,null,"H")+f.line(null,o,"V"),c=c+f.line(r,null,"H")+f.line(null,o,"V")):"straight"===x&&(h+=f.line(r,o),c+=f.line(r,o)),s===e[i].length-2&&(c=c+f.line(r,m)+f.move(r,o)+"z",d.push(h),g.push(c))}return{linePaths:d,areaPaths:g,pX:n,pY:l,linePath:h,areaPath:c}}},{key:"handleNullDataPoints",value:function(t,e,i,a,s){var r=this.w;if(null===t[i][a]&&r.config.markers.showNullDataPoints||1===t[i].length){var o=this.markers.plotChartMarkers(e,s,a+1,this.strokeWidth-r.config.markers.strokeWidth/2,!0);null!==o&&this.elPointsMain.add(o)}}}]),t}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function t(e,i,a,s){this.xoffset=e,this.yoffset=i,this.height=s,this.width=a,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(t){var e,i=[],a=this.xoffset,s=this.yoffset,o=r(t)/this.height,n=r(t)/this.width;if(this.width>=this.height)for(e=0;e<t.length;e++)i.push([a,s,a+o,s+t[e]/o]),s+=t[e]/o;else for(e=0;e<t.length;e++)i.push([a,s,a+t[e]/n,s+n]),a+=t[e]/n;return i},this.cutArea=function(e){var i;if(this.width>=this.height){var a=e/this.height,s=this.width-a;i=new t(this.xoffset+a,this.yoffset,s,this.height)}else{var r=e/this.width,o=this.height-r;i=new t(this.xoffset,this.yoffset+r,this.width,o)}return i}}function e(e,a,s,o,n){return o=void 0===o?0:o,n=void 0===n?0:n,function(t){var e,i,a=[];for(e=0;e<t.length;e++)for(i=0;i<t[e].length;i++)a.push(t[e][i]);return a}(i(function(t,e){var i,a=[],s=e/r(t);for(i=0;i<t.length;i++)a[i]=t[i]*s;return a}(e,a*s),[],new t(o,n,a,s),[]))}function i(t,e,s,o){var n,l,h;if(0!==t.length)return n=s.shortestEdge(),function(t,e,i){var s;if(0===t.length)return!0;(s=t.slice()).push(e);var r=a(t,i),o=a(s,i);return r>=o}(e,l=t[0],n)?(e.push(l),i(t.slice(1),e,s,o)):(h=s.cutArea(r(e),o),o.push(s.getCoordinates(e)),i(t,[],h,o)),o;o.push(s.getCoordinates(e))}function a(t,e){var i=Math.min.apply(Math,t),a=Math.max.apply(Math,t),s=r(t);return Math.max(Math.pow(e,2)*a/Math.pow(s,2),Math.pow(s,2)/(Math.pow(e,2)*i))}function s(t){return t&&t.constructor===Array}function r(t){var e,i=0;for(e=0;e<t.length;e++)i+=t[e];return i}function o(t){var e,i=0;if(s(t[0]))for(e=0;e<t.length;e++)i+=o(t[e]);else i=r(t);return i}return function t(i,a,r,n,l){n=void 0===n?0:n,l=void 0===l?0:l;var h,c,d=[],g=[];if(s(i[0])){for(c=0;c<i.length;c++)d[c]=o(i[c]);for(h=e(d,a,r,n,l),c=0;c<i.length;c++)g.push(t(i[c],h[c][2]-h[c][0],h[c][3]-h[c][1],h[c][0],h[c][1]))}else g=e(i,a,r,n,l);return g}}();var Tt,Mt,It=function(){function t(i,a){e(this,t),this.ctx=i,this.w=i.w,this.strokeWidth=this.w.config.stroke.width,this.helpers=new yt(i),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[]}return a(t,[{key:"draw",value:function(t){var e=this,i=this.w,a=new b(this.ctx),s=new L(this.ctx),r=a.group({class:"apexcharts-treemap"});if(i.globals.noData)return r;var o=[];return t.forEach((function(t){var e=t.map((function(t){return Math.abs(t)}));o.push(e)})),this.negRange=this.helpers.checkColorRange(),i.config.series.forEach((function(t,i){t.data.forEach((function(t){Array.isArray(e.labels[i])||(e.labels[i]=[]),e.labels[i].push(t.x)}))})),window.TreemapSquared.generate(o,i.globals.gridWidth,i.globals.gridHeight).forEach((function(o,n){var l=a.group({class:"apexcharts-series apexcharts-treemap-series",seriesName:p.escapeString(i.globals.seriesNames[n]),rel:n+1,"data:realIndex":n});if(i.config.chart.dropShadow.enabled){var h=i.config.chart.dropShadow;new x(e.ctx).dropShadow(r,h,n)}var c=a.group({class:"apexcharts-data-labels"});o.forEach((function(r,o){var h=r[0],c=r[1],d=r[2],g=r[3],u=a.drawRect(h,c,d-h,g-c,0,"#fff",1,e.strokeWidth,i.config.plotOptions.treemap.useFillColorAsStroke?f:i.globals.stroke.colors[n]);u.attr({cx:h,cy:c,index:n,i:n,j:o,width:d-h,height:g-c});var p=e.helpers.getShadeColor(i.config.chart.type,n,o,e.negRange),f=p.color;void 0!==i.config.series[n].data[o]&&i.config.series[n].data[o].fillColor&&(f=i.config.series[n].data[o].fillColor);var x=s.fillPath({color:f,seriesNumber:n,dataPointIndex:o});u.node.classList.add("apexcharts-treemap-rect"),u.attr({fill:x}),e.helpers.addListeners(u);var b={x:h+(d-h)/2,y:c+(g-c)/2,width:0,height:0},m={x:h,y:c,width:d-h,height:g-c};if(i.config.chart.animations.enabled&&!i.globals.dataChanged){var v=1;i.globals.resized||(v=i.config.chart.animations.speed),e.animateTreemap(u,b,m,v)}if(i.globals.dataChanged){var y=1;e.dynamicAnim.enabled&&i.globals.shouldAnimate&&(y=e.dynamicAnim.speed,i.globals.previousPaths[n]&&i.globals.previousPaths[n][o]&&i.globals.previousPaths[n][o].rect&&(b=i.globals.previousPaths[n][o].rect),e.animateTreemap(u,b,m,y))}var w=e.getFontSize(r),k=i.config.dataLabels.formatter(e.labels[n][o],{value:i.globals.series[n][o],seriesIndex:n,dataPointIndex:o,w:i}),A=e.helpers.calculateDataLabels({text:k,x:(h+d)/2,y:(c+g)/2+e.strokeWidth/2+w/3,i:n,j:o,colorProps:p,fontSize:w,series:t});i.config.dataLabels.enabled&&A&&e.rotateToFitLabel(A,k,h,c,d,g),l.add(u),null!==A&&l.add(A)})),l.add(c),r.add(l)})),r}},{key:"getFontSize",value:function(t){var e=this.w;var i,a,s,r,o=function t(e){var i,a=0;if(Array.isArray(e[0]))for(i=0;i<e.length;i++)a+=t(e[i]);else for(i=0;i<e.length;i++)a+=e[i].length;return a}(this.labels)/function t(e){var i,a=0;if(Array.isArray(e[0]))for(i=0;i<e.length;i++)a+=t(e[i]);else for(i=0;i<e.length;i++)a+=1;return a}(this.labels);return i=t[2]-t[0],a=t[3]-t[1],s=i*a,r=Math.pow(s,.5),Math.min(r/o,parseInt(e.config.dataLabels.style.fontSize,10))}},{key:"rotateToFitLabel",value:function(t,e,i,a,s,r){var o=new b(this.ctx),n=o.getTextRects(e);if(n.width+5>s-i&&n.width<=r-a){var l=o.rotateAroundCenter(t.node);t.node.setAttribute("transform","rotate(-90 ".concat(l.x," ").concat(l.y,")"))}}},{key:"animateTreemap",value:function(t,e,i,a){var s=new f(this.ctx);s.animateRect(t,{x:e.x,y:e.y,width:e.width,height:e.height},{x:i.x,y:i.y,width:i.width,height:i.height},a,(function(){s.animationCompleted(t)}))}}]),t}(),zt=86400,Xt=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return a(t,[{key:"calculateTimeScaleTicks",value:function(t,e){var i=this,a=this.w;if(a.globals.allSeriesCollapsed)return a.globals.labels=[],a.globals.timescaleLabels=[],[];var s=new Y(this.ctx),r=(e-t)/864e5;this.determineInterval(r),a.globals.disableZoomIn=!1,a.globals.disableZoomOut=!1,r<.00011574074074074075?a.globals.disableZoomIn=!0:r>5e4&&(a.globals.disableZoomOut=!0);var n=s.getTimeUnitsfromTimestamp(t,e,this.utc),l=a.globals.gridWidth/r,h=l/24,c=h/60,d=c/60,g=Math.floor(24*r),u=Math.floor(1440*r),p=Math.floor(r*zt),f=Math.floor(r),x=Math.floor(r/30),b=Math.floor(r/365),m={minMillisecond:n.minMillisecond,minSecond:n.minSecond,minMinute:n.minMinute,minHour:n.minHour,minDate:n.minDate,minMonth:n.minMonth,minYear:n.minYear},v={firstVal:m,currentMillisecond:m.minMillisecond,currentSecond:m.minSecond,currentMinute:m.minMinute,currentHour:m.minHour,currentMonthDate:m.minDate,currentDate:m.minDate,currentMonth:m.minMonth,currentYear:m.minYear,daysWidthOnXAxis:l,hoursWidthOnXAxis:h,minutesWidthOnXAxis:c,secondsWidthOnXAxis:d,numberOfSeconds:p,numberOfMinutes:u,numberOfHours:g,numberOfDays:f,numberOfMonths:x,numberOfYears:b};switch(this.tickInterval){case"years":this.generateYearScale(v);break;case"months":case"half_year":this.generateMonthScale(v);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(v);break;case"hours":this.generateHourScale(v);break;case"minutes_fives":case"minutes":this.generateMinuteScale(v);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(v)}var y=this.timeScaleArray.map((function(t){var e={position:t.position,unit:t.unit,year:t.year,day:t.day?t.day:1,hour:t.hour?t.hour:0,month:t.month+1};return"month"===t.unit?o(o({},e),{},{day:1,value:t.value+1}):"day"===t.unit||"hour"===t.unit?o(o({},e),{},{value:t.value}):"minute"===t.unit?o(o({},e),{},{value:t.value,minute:t.value}):"second"===t.unit?o(o({},e),{},{value:t.value,minute:t.minute,second:t.second}):t}));return y.filter((function(t){var e=1,s=Math.ceil(a.globals.gridWidth/120),r=t.value;void 0!==a.config.xaxis.tickAmount&&(s=a.config.xaxis.tickAmount),y.length>s&&(e=Math.floor(y.length/s));var o=!1,n=!1;switch(i.tickInterval){case"years":"year"===t.unit&&(o=!0);break;case"half_year":e=7,"year"===t.unit&&(o=!0);break;case"months":e=1,"year"===t.unit&&(o=!0);break;case"months_fortnight":e=15,"year"!==t.unit&&"month"!==t.unit||(o=!0),30===r&&(n=!0);break;case"months_days":e=10,"month"===t.unit&&(o=!0),30===r&&(n=!0);break;case"week_days":e=8,"month"===t.unit&&(o=!0);break;case"days":e=1,"month"===t.unit&&(o=!0);break;case"hours":"day"===t.unit&&(o=!0);break;case"minutes_fives":r%5!=0&&(n=!0);break;case"seconds_tens":r%10!=0&&(n=!0);break;case"seconds_fives":r%5!=0&&(n=!0)}if("hours"===i.tickInterval||"minutes_fives"===i.tickInterval||"seconds_tens"===i.tickInterval||"seconds_fives"===i.tickInterval){if(!n)return!0}else if((r%e==0||o)&&!n)return!0}))}},{key:"recalcDimensionsBasedOnFormat",value:function(t,e){var i=this.w,a=this.formatDates(t),s=this.removeOverlappingTS(a);i.globals.timescaleLabels=s.slice(),new ot(this.ctx).plotCoords()}},{key:"determineInterval",value:function(t){var e=24*t,i=60*e;switch(!0){case t/365>5:this.tickInterval="years";break;case t>800:this.tickInterval="half_year";break;case t>180:this.tickInterval="months";break;case t>90:this.tickInterval="months_fortnight";break;case t>60:this.tickInterval="months_days";break;case t>30:this.tickInterval="week_days";break;case t>2:this.tickInterval="days";break;case e>2.4:this.tickInterval="hours";break;case i>15:this.tickInterval="minutes_fives";break;case i>5:this.tickInterval="minutes";break;case i>1:this.tickInterval="seconds_tens";break;case 60*i>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(t){var e=t.firstVal,i=t.currentMonth,a=t.currentYear,s=t.daysWidthOnXAxis,r=t.numberOfYears,o=e.minYear,n=0,l=new Y(this.ctx),h="year";if(e.minDate>1||e.minMonth>0){var c=l.determineRemainingDaysOfYear(e.minYear,e.minMonth,e.minDate);n=(l.determineDaysOfYear(e.minYear)-c+1)*s,o=e.minYear+1,this.timeScaleArray.push({position:n,value:o,unit:h,year:o,month:p.monthMod(i+1)})}else 1===e.minDate&&0===e.minMonth&&this.timeScaleArray.push({position:n,value:o,unit:h,year:a,month:p.monthMod(i+1)});for(var d=o,g=n,u=0;u<r;u++)d++,g=l.determineDaysOfYear(d-1)*s+g,this.timeScaleArray.push({position:g,value:d,unit:h,year:d,month:1})}},{key:"generateMonthScale",value:function(t){var e=t.firstVal,i=t.currentMonthDate,a=t.currentMonth,s=t.currentYear,r=t.daysWidthOnXAxis,o=t.numberOfMonths,n=a,l=0,h=new Y(this.ctx),c="month",d=0;if(e.minDate>1){l=(h.determineDaysOfMonths(a+1,e.minYear)-i+1)*r,n=p.monthMod(a+1);var g=s+d,u=p.monthMod(n),f=n;0===n&&(c="year",f=g,u=1,g+=d+=1),this.timeScaleArray.push({position:l,value:f,unit:c,year:g,month:u})}else this.timeScaleArray.push({position:l,value:n,unit:c,year:s,month:p.monthMod(a)});for(var x=n+1,b=l,m=0,v=1;m<o;m++,v++){0===(x=p.monthMod(x))?(c="year",d+=1):c="month";var y=this._getYear(s,x,d);b=h.determineDaysOfMonths(x,y)*r+b;var w=0===x?y:x;this.timeScaleArray.push({position:b,value:w,unit:c,year:y,month:0===x?1:x}),x++}}},{key:"generateDayScale",value:function(t){var e=t.firstVal,i=t.currentMonth,a=t.currentYear,s=t.hoursWidthOnXAxis,r=t.numberOfDays,o=new Y(this.ctx),n="day",l=e.minDate+1,h=l,c=function(t,e,i){return t>o.determineDaysOfMonths(e+1,i)?(h=1,n="month",g=e+=1,e):e},d=(24-e.minHour)*s,g=l,u=c(h,i,a);0===e.minHour&&1===e.minDate?(d=0,g=p.monthMod(e.minMonth),n="month",h=e.minDate,r++):1!==e.minDate&&0===e.minHour&&0===e.minMinute&&(d=0,l=e.minDate,g=l,u=c(h=l,i,a)),this.timeScaleArray.push({position:d,value:g,unit:n,year:this._getYear(a,u,0),month:p.monthMod(u),day:h});for(var f=d,x=0;x<r;x++){n="day",u=c(h+=1,u,this._getYear(a,u,0));var b=this._getYear(a,u,0);f=24*s+f;var m=1===h?p.monthMod(u):h;this.timeScaleArray.push({position:f,value:m,unit:n,year:b,month:p.monthMod(u),day:m})}}},{key:"generateHourScale",value:function(t){var e=t.firstVal,i=t.currentDate,a=t.currentMonth,s=t.currentYear,r=t.minutesWidthOnXAxis,o=t.numberOfHours,n=new Y(this.ctx),l="hour",h=function(t,e){return t>n.determineDaysOfMonths(e+1,s)&&(x=1,e+=1),{month:e,date:x}},c=function(t,e){return t>n.determineDaysOfMonths(e+1,s)?e+=1:e},d=60-(e.minMinute+e.minSecond/60),g=d*r,u=e.minHour+1,f=u+1;60===d&&(g=0,f=(u=e.minHour)+1);var x=i,b=c(x,a);this.timeScaleArray.push({position:g,value:u,unit:l,day:x,hour:f,year:s,month:p.monthMod(b)});for(var m=g,v=0;v<o;v++){if(l="hour",f>=24)f=0,l="day",b=h(x+=1,b).month,b=c(x,b);var y=this._getYear(s,b,0);m=0===f&&0===v?d*r:60*r+m;var w=0===f?x:f;this.timeScaleArray.push({position:m,value:w,unit:l,hour:f,day:x,year:y,month:p.monthMod(b)}),f++}}},{key:"generateMinuteScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,s=t.currentHour,r=t.currentDate,o=t.currentMonth,n=t.currentYear,l=t.minutesWidthOnXAxis,h=t.secondsWidthOnXAxis,c=t.numberOfMinutes,d=a+1,g=r,u=o,f=n,x=s,b=(60-i-e/1e3)*h,m=0;m<c;m++)d>=60&&(d=0,24===(x+=1)&&(x=0)),this.timeScaleArray.push({position:b,value:d,unit:"minute",hour:x,minute:d,day:g,year:this._getYear(f,u,0),month:p.monthMod(u)}),b+=l,d++}},{key:"generateSecondScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,s=t.currentHour,r=t.currentDate,o=t.currentMonth,n=t.currentYear,l=t.secondsWidthOnXAxis,h=t.numberOfSeconds,c=i+1,d=a,g=r,u=o,f=n,x=s,b=(1e3-e)/1e3*l,m=0;m<h;m++)c>=60&&(c=0,++d>=60&&(d=0,24===++x&&(x=0))),this.timeScaleArray.push({position:b,value:c,unit:"second",hour:x,minute:d,second:c,day:g,year:this._getYear(f,u,0),month:p.monthMod(u)}),b+=l,c++}},{key:"createRawDateString",value:function(t,e){var i=t.year;return 0===t.month&&(t.month=1),i+="-"+("0"+t.month.toString()).slice(-2),"day"===t.unit?i+="day"===t.unit?"-"+("0"+e).slice(-2):"-01":i+="-"+("0"+(t.day?t.day:"1")).slice(-2),"hour"===t.unit?i+="hour"===t.unit?"T"+("0"+e).slice(-2):"T00":i+="T"+("0"+(t.hour?t.hour:"0")).slice(-2),"minute"===t.unit?i+=":"+("0"+e).slice(-2):i+=":"+(t.minute?("0"+t.minute).slice(-2):"00"),"second"===t.unit?i+=":"+("0"+e).slice(-2):i+=":00",this.utc&&(i+=".000Z"),i}},{key:"formatDates",value:function(t){var e=this,i=this.w;return t.map((function(t){var a=t.value.toString(),s=new Y(e.ctx),r=e.createRawDateString(t,a),o=s.getDate(s.parseDate(r));if(e.utc||(o=s.getDate(s.parseDateWithTimezone(r))),void 0===i.config.xaxis.labels.format){var n="dd MMM",l=i.config.xaxis.labels.datetimeFormatter;"year"===t.unit&&(n=l.year),"month"===t.unit&&(n=l.month),"day"===t.unit&&(n=l.day),"hour"===t.unit&&(n=l.hour),"minute"===t.unit&&(n=l.minute),"second"===t.unit&&(n=l.second),a=s.formatDate(o,n)}else a=s.formatDate(o,i.config.xaxis.labels.format);return{dateString:r,position:t.position,value:a,unit:t.unit,year:t.year,month:t.month}}))}},{key:"removeOverlappingTS",value:function(t){var e,i=this,a=new b(this.ctx),s=!1;t.length>0&&t[0].value&&t.every((function(e){return e.value.length===t[0].value.length}))&&(s=!0,e=a.getTextRects(t[0].value).width);var r=0,o=t.map((function(o,n){if(n>0&&i.w.config.xaxis.labels.hideOverlappingLabels){var l=s?e:a.getTextRects(t[r].value).width,h=t[r].position;return o.position>h+l+10?(r=n,o):null}return o}));return o=o.filter((function(t){return null!==t}))}},{key:"_getYear",value:function(t,e,i){return t+Math.floor(e/12)+i}}]),t}(),Et=function(){function t(i,a){e(this,t),this.ctx=a,this.w=a.w,this.el=i}return a(t,[{key:"setupElements",value:function(){var t=this.w.globals,e=this.w.config,i=e.chart.type;t.axisCharts=["line","area","bar","rangeBar","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].indexOf(i)>-1,t.xyCharts=["line","area","bar","rangeBar","candlestick","boxPlot","scatter","bubble"].indexOf(i)>-1,t.isBarHorizontal=("bar"===e.chart.type||"rangeBar"===e.chart.type)&&e.plotOptions.bar.horizontal,t.chartClass=".apexcharts"+t.chartID,t.dom.baseEl=this.el,t.dom.elWrap=document.createElement("div"),b.setAttrs(t.dom.elWrap,{id:t.chartClass.substring(1),class:"apexcharts-canvas "+t.chartClass.substring(1)}),this.el.appendChild(t.dom.elWrap),t.dom.Paper=new window.SVG.Doc(t.dom.elWrap),t.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(e.chart.offsetX,", ").concat(e.chart.offsetY,")")}),t.dom.Paper.node.style.background=e.chart.background,this.setSVGDimensions(),t.dom.elGraphical=t.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),t.dom.elAnnotations=t.dom.Paper.group().attr({class:"apexcharts-annotations"}),t.dom.elDefs=t.dom.Paper.defs(),t.dom.elLegendWrap=document.createElement("div"),t.dom.elLegendWrap.classList.add("apexcharts-legend"),t.dom.elWrap.appendChild(t.dom.elLegendWrap),t.dom.Paper.add(t.dom.elGraphical),t.dom.elGraphical.add(t.dom.elDefs)}},{key:"plotChartType",value:function(t,e){var i=this.w,a=i.config,s=i.globals,r={series:[],i:[]},o={series:[],i:[]},n={series:[],i:[]},l={series:[],i:[]},h={series:[],i:[]},c={series:[],i:[]},d={series:[],i:[]};s.series.map((function(e,g){var u=0;void 0!==t[g].type?("column"===t[g].type||"bar"===t[g].type?(s.series.length>1&&a.plotOptions.bar.horizontal&&console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"),h.series.push(e),h.i.push(g),u++,i.globals.columnSeries=h.series):"area"===t[g].type?(o.series.push(e),o.i.push(g),u++):"line"===t[g].type?(r.series.push(e),r.i.push(g),u++):"scatter"===t[g].type?(n.series.push(e),n.i.push(g)):"bubble"===t[g].type?(l.series.push(e),l.i.push(g),u++):"candlestick"===t[g].type?(c.series.push(e),c.i.push(g),u++):"boxPlot"===t[g].type?(d.series.push(e),d.i.push(g),u++):console.warn("You have specified an unrecognized chart type. Available types for this property are line/area/column/bar/scatter/bubble"),u>1&&(s.comboCharts=!0)):(r.series.push(e),r.i.push(g))}));var g=new Pt(this.ctx,e),u=new vt(this.ctx,e);this.ctx.pie=new At(this.ctx);var p=new Ct(this.ctx);this.ctx.rangeBar=new F(this.ctx,e);var f=new St(this.ctx),x=[];if(s.comboCharts){if(o.series.length>0&&x.push(g.draw(o.series,"area",o.i)),h.series.length>0)if(i.config.chart.stacked){var b=new mt(this.ctx,e);x.push(b.draw(h.series,h.i))}else this.ctx.bar=new E(this.ctx,e),x.push(this.ctx.bar.draw(h.series,h.i));if(r.series.length>0&&x.push(g.draw(r.series,"line",r.i)),c.series.length>0&&x.push(u.draw(c.series,c.i)),d.series.length>0&&x.push(u.draw(d.series,d.i)),n.series.length>0){var m=new Pt(this.ctx,e,!0);x.push(m.draw(n.series,"scatter",n.i))}if(l.series.length>0){var v=new Pt(this.ctx,e,!0);x.push(v.draw(l.series,"bubble",l.i))}}else switch(a.chart.type){case"line":x=g.draw(s.series,"line");break;case"area":x=g.draw(s.series,"area");break;case"bar":if(a.chart.stacked)x=new mt(this.ctx,e).draw(s.series);else this.ctx.bar=new E(this.ctx,e),x=this.ctx.bar.draw(s.series);break;case"candlestick":x=new vt(this.ctx,e).draw(s.series);break;case"boxPlot":x=new vt(this.ctx,e).draw(s.series);break;case"rangeBar":x=this.ctx.rangeBar.draw(s.series);break;case"heatmap":x=new wt(this.ctx,e).draw(s.series);break;case"treemap":x=new It(this.ctx,e).draw(s.series);break;case"pie":case"donut":case"polarArea":x=this.ctx.pie.draw(s.series);break;case"radialBar":x=p.draw(s.series);break;case"radar":x=f.draw(s.series);break;default:x=g.draw(s.series)}return x}},{key:"setSVGDimensions",value:function(){var t=this.w.globals,e=this.w.config;t.svgWidth=e.chart.width,t.svgHeight=e.chart.height;var i=p.getDimensions(this.el),a=e.chart.width.toString().split(/[0-9]+/g).pop();"%"===a?p.isNumber(i[0])&&(0===i[0].width&&(i=p.getDimensions(this.el.parentNode)),t.svgWidth=i[0]*parseInt(e.chart.width,10)/100):"px"!==a&&""!==a||(t.svgWidth=parseInt(e.chart.width,10));var s=e.chart.height.toString().split(/[0-9]+/g).pop();if("auto"!==t.svgHeight&&""!==t.svgHeight)if("%"===s){var r=p.getDimensions(this.el.parentNode);t.svgHeight=r[1]*parseInt(e.chart.height,10)/100}else t.svgHeight=parseInt(e.chart.height,10);else t.axisCharts?t.svgHeight=t.svgWidth/1.61:t.svgHeight=t.svgWidth/1.2;if(t.svgWidth<0&&(t.svgWidth=0),t.svgHeight<0&&(t.svgHeight=0),b.setAttrs(t.dom.Paper.node,{width:t.svgWidth,height:t.svgHeight}),"%"!==s){var o=e.chart.sparkline.enabled?0:t.axisCharts?e.chart.parentHeightOffset:0;t.dom.Paper.node.parentNode.parentNode.style.minHeight=t.svgHeight+o+"px"}t.dom.elWrap.style.width=t.svgWidth+"px",t.dom.elWrap.style.height=t.svgHeight+"px"}},{key:"shiftGraphPosition",value:function(){var t=this.w.globals,e=t.translateY,i={transform:"translate("+t.translateX+", "+e+")"};b.setAttrs(t.dom.elGraphical.node,i)}},{key:"resizeNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=0,a=t.config.chart.sparkline.enabled?1:15;a+=t.config.grid.padding.bottom,"top"!==t.config.legend.position&&"bottom"!==t.config.legend.position||!t.config.legend.show||t.config.legend.floating||(i=new lt(this.ctx).legendHelpers.getLegendBBox().clwh+10);var s=t.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),r=2.05*t.globals.radialSize;if(s&&!t.config.chart.sparkline.enabled){var o=p.getBoundingClientRect(s);r=o.bottom;var n=o.bottom-o.top;r=Math.max(2.05*t.globals.radialSize,n)}var l=r+e.translateY+i+a;e.dom.elLegendForeign&&e.dom.elLegendForeign.setAttribute("height",l),e.dom.elWrap.style.height=l+"px",b.setAttrs(e.dom.Paper.node,{height:l}),e.dom.Paper.node.parentNode.parentNode.style.minHeight=l+"px"}},{key:"coreCalculations",value:function(){new U(this.ctx).init()}},{key:"resetGlobals",value:function(){var t=this,e=function(){return t.w.config.series.map((function(t){return[]}))},i=new D,a=this.w.globals;i.initGlobalVars(a),a.seriesXvalues=e(),a.seriesYvalues=e()}},{key:"isMultipleY",value:function(){if(this.w.config.yaxis.constructor===Array&&this.w.config.yaxis.length>1)return this.w.globals.isMultipleYAxis=!0,!0}},{key:"xySettings",value:function(){var t=null,e=this.w;if(e.globals.axisCharts){if("back"===e.config.xaxis.crosshairs.position)new Q(this.ctx).drawXCrosshairs();if("back"===e.config.yaxis[0].crosshairs.position)new Q(this.ctx).drawYCrosshairs();if("datetime"===e.config.xaxis.type&&void 0===e.config.xaxis.labels.formatter){this.ctx.timeScale=new Xt(this.ctx);var i=[];isFinite(e.globals.minX)&&isFinite(e.globals.maxX)&&!e.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minX,e.globals.maxX):e.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minY,e.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}t=new y(this.ctx).getCalculatedRatios()}return t}},{key:"updateSourceChart",value:function(t){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var t=this,e=this.w;if(e.config.chart.brush.enabled&&"function"!=typeof e.config.chart.events.selection){var i=e.config.chart.brush.targets||[e.config.chart.brush.target];i.forEach((function(e){var i=ApexCharts.getChartByID(e);i.w.globals.brushSource=t.ctx,"function"!=typeof i.w.config.chart.events.zoomed&&(i.w.config.chart.events.zoomed=function(){t.updateSourceChart(i)}),"function"!=typeof i.w.config.chart.events.scrolled&&(i.w.config.chart.events.scrolled=function(){t.updateSourceChart(i)})})),e.config.chart.events.selection=function(t,a){i.forEach((function(t){var i=ApexCharts.getChartByID(t),s=p.clone(e.config.yaxis);if(e.config.chart.brush.autoScaleYaxis&&1===i.w.globals.series.length){var r=new j(i);s=r.autoScaleY(i,s,a)}var n=i.w.config.yaxis.reduce((function(t,e,a){return[].concat(g(t),[o(o({},i.w.config.yaxis[a]),{},{min:s[0].min,max:s[0].max})])}),[]);i.ctx.updateHelpers._updateOptions({xaxis:{min:a.xaxis.min,max:a.xaxis.max},yaxis:n},!1,!1,!1,!1)}))}}}}]),t}(),Yt=function(){function i(t){e(this,i),this.ctx=t,this.w=t.w}return a(i,[{key:"_updateOptions",value:function(e){var i=this,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],n=[this.ctx];r&&(n=this.ctx.getSyncedCharts()),this.ctx.w.globals.isExecCalled&&(n=[this.ctx],this.ctx.w.globals.isExecCalled=!1),n.forEach((function(r){var n=r.w;return n.globals.shouldAnimate=s,a||(n.globals.resized=!0,n.globals.dataChanged=!0,s&&r.series.getPreviousPaths()),e&&"object"===t(e)&&(r.config=new H(e),e=y.extendArrayProps(r.config,e,n),r.w.globals.chartID!==i.ctx.w.globals.chartID&&delete e.series,n.config=p.extend(n.config,e),o&&(n.globals.lastXAxis=e.xaxis?p.clone(e.xaxis):[],n.globals.lastYAxis=e.yaxis?p.clone(e.yaxis):[],n.globals.initialConfig=p.extend({},n.config),n.globals.initialSeries=p.clone(n.config.series))),r.update(e)}))}},{key:"_updateSeries",value:function(t,e){var i,a=this,s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.w;return r.globals.shouldAnimate=e,r.globals.dataChanged=!0,e&&this.ctx.series.getPreviousPaths(),r.globals.axisCharts?(0===(i=t.map((function(t,e){return a._extendSeries(t,e)}))).length&&(i=[{data:[]}]),r.config.series=i):r.config.series=t.slice(),s&&(r.globals.initialSeries=p.clone(r.config.series)),this.ctx.update()}},{key:"_extendSeries",value:function(t,e){var i=this.w,a=i.config.series[e];return o(o({},i.config.series[e]),{},{name:t.name?t.name:a&&a.name,color:t.color?t.color:a&&a.color,type:t.type?t.type:a&&a.type,data:t.data?t.data:a&&a.data})}},{key:"toggleDataPointSelection",value:function(t,e){var i=this.w,a=null,s=".apexcharts-series[data\\:realIndex='".concat(t,"']");return i.globals.axisCharts?a=i.globals.dom.Paper.select("".concat(s," path[j='").concat(e,"'], ").concat(s," circle[j='").concat(e,"'], ").concat(s," rect[j='").concat(e,"']")).members[0]:void 0===e&&(a=i.globals.dom.Paper.select("".concat(s," path[j='").concat(t,"']")).members[0],"pie"!==i.config.chart.type&&"polarArea"!==i.config.chart.type&&"donut"!==i.config.chart.type||this.ctx.pie.pieClicked(t)),a?(new b(this.ctx).pathMouseDown(a,null),a.node?a.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(t){var e=this.w;if(["min","max"].forEach((function(i){void 0!==t.xaxis[i]&&(e.config.xaxis[i]=t.xaxis[i],e.globals.lastXAxis[i]=t.xaxis[i])})),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric){var i=new R(t);t=i.convertCatToNumericXaxis(t,this.ctx)}return t}},{key:"forceYAxisUpdate",value:function(t){var e=this.w;return e.config.chart.stacked&&"100%"===e.config.chart.stackType&&(Array.isArray(t.yaxis)?t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})):(t.yaxis.min=0,t.yaxis.max=100)),t}},{key:"revertDefaultAxisMinMax",value:function(t){var e=this,i=this.w,a=i.globals.lastXAxis,s=i.globals.lastYAxis;t&&t.xaxis&&(a=t.xaxis),t&&t.yaxis&&(s=t.yaxis),i.config.xaxis.min=a.min,i.config.xaxis.max=a.max;var r=function(t){void 0!==s[t]&&(i.config.yaxis[t].min=s[t].min,i.config.yaxis[t].max=s[t].max)};i.config.yaxis.map((function(t,a){i.globals.zoomed||void 0!==s[a]?r(a):void 0!==e.ctx.opts.yaxis[a]&&(t.min=e.ctx.opts.yaxis[a].min,t.max=e.ctx.opts.yaxis[a].max)}))}}]),i}();Tt="undefined"!=typeof window?window:void 0,Mt=function(e,i){var a=(void 0!==this?this:e).SVG=function(t){if(a.supported)return t=new a.Doc(t),a.parser.draw||a.prepare(),t};if(a.ns="http://www.w3.org/2000/svg",a.xmlns="http://www.w3.org/2000/xmlns/",a.xlink="http://www.w3.org/1999/xlink",a.svgjs="http://svgjs.dev",a.supported=!0,!a.supported)return!1;a.did=1e3,a.eid=function(t){return"Svgjs"+d(t)+a.did++},a.create=function(t){var e=i.createElementNS(this.ns,t);return e.setAttribute("id",this.eid(t)),e},a.extend=function(){var t,e;e=(t=[].slice.call(arguments)).pop();for(var i=t.length-1;i>=0;i--)if(t[i])for(var s in e)t[i].prototype[s]=e[s];a.Set&&a.Set.inherit&&a.Set.inherit()},a.invent=function(t){var e="function"==typeof t.create?t.create:function(){this.constructor.call(this,a.create(t.create))};return t.inherit&&(e.prototype=new t.inherit),t.extend&&a.extend(e,t.extend),t.construct&&a.extend(t.parent||a.Container,t.construct),e},a.adopt=function(t){return t?t.instance?t.instance:((i="svg"==t.nodeName?t.parentNode instanceof e.SVGElement?new a.Nested:new a.Doc:"linearGradient"==t.nodeName?new a.Gradient("linear"):"radialGradient"==t.nodeName?new a.Gradient("radial"):a[d(t.nodeName)]?new(a[d(t.nodeName)]):new a.Element(t)).type=t.nodeName,i.node=t,t.instance=i,i instanceof a.Doc&&i.namespace().defs(),i.setData(JSON.parse(t.getAttribute("svgjs:data"))||{}),i):null;var i},a.prepare=function(){var t=i.getElementsByTagName("body")[0],e=(t?new a.Doc(t):a.adopt(i.documentElement).nested()).size(2,0);a.parser={body:t||i.documentElement,draw:e.style("opacity:0;position:absolute;
60674left:-100%;top:-100%;overflow:hidden").node,poly:e.polyline().node,path:e.path().node,native:a.create("svg")}},a.parser={native:a.create("svg")},i.addEventListener("DOMContentLoaded",(function(){a.parser.draw||a.prepare()}),!1),a.regex={numberAndUnit:/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,hex:/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,rgb:/rgb\((\d+),(\d+),(\d+)\)/,reference:/#([a-z0-9\-_]+)/i,transforms:/\)\s*,?\s*/,whitespace:/\s/g,isHex:/^#[a-f0-9]{3,6}$/i,isRgb:/^rgb\(/,isCss:/[^:]+:[^;]+;?/,isBlank:/^(\s+)?$/,isNumber:/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,isPercent:/^-?[\d\.]+%$/,isImage:/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,delimiter:/[\s,]+/,hyphen:/([^e])\-/gi,pathLetters:/[MLHVCSQTAZ]/gi,isPathLetter:/[MLHVCSQTAZ]/i,numbersWithDots:/((\d?\.\d+(?:e[+-]?\d+)?)((?:\.\d+(?:e[+-]?\d+)?)+))+/gi,dots:/\./g},a.utils={map:function(t,e){for(var i=t.length,a=[],s=0;s<i;s++)a.push(e(t[s]));return a},filter:function(t,e){for(var i=t.length,a=[],s=0;s<i;s++)e(t[s])&&a.push(t[s]);return a},filterSVGElements:function(t){return this.filter(t,(function(t){return t instanceof e.SVGElement}))}},a.defaults={attrs:{"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","font-size":16,"font-family":"Helvetica, Arial, sans-serif","text-anchor":"start"}},a.Color=function(e){var i,s;this.r=0,this.g=0,this.b=0,e&&("string"==typeof e?a.regex.isRgb.test(e)?(i=a.regex.rgb.exec(e.replace(a.regex.whitespace,"")),this.r=parseInt(i[1]),this.g=parseInt(i[2]),this.b=parseInt(i[3])):a.regex.isHex.test(e)&&(i=a.regex.hex.exec(4==(s=e).length?["#",s.substring(1,2),s.substring(1,2),s.substring(2,3),s.substring(2,3),s.substring(3,4),s.substring(3,4)].join(""):s),this.r=parseInt(i[1],16),this.g=parseInt(i[2],16),this.b=parseInt(i[3],16)):"object"===t(e)&&(this.r=e.r,this.g=e.g,this.b=e.b))},a.extend(a.Color,{toString:function(){return this.toHex()},toHex:function(){return"#"+g(this.r)+g(this.g)+g(this.b)},toRgb:function(){return"rgb("+[this.r,this.g,this.b].join()+")"},brightness:function(){return this.r/255*.3+this.g/255*.59+this.b/255*.11},morph:function(t){return this.destination=new a.Color(t),this},at:function(t){return this.destination?(t=t<0?0:t>1?1:t,new a.Color({r:~~(this.r+(this.destination.r-this.r)*t),g:~~(this.g+(this.destination.g-this.g)*t),b:~~(this.b+(this.destination.b-this.b)*t)})):this}}),a.Color.test=function(t){return t+="",a.regex.isHex.test(t)||a.regex.isRgb.test(t)},a.Color.isRgb=function(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b},a.Color.isColor=function(t){return a.Color.isRgb(t)||a.Color.test(t)},a.Array=function(t,e){0==(t=(t||[]).valueOf()).length&&e&&(t=e.valueOf()),this.value=this.parse(t)},a.extend(a.Array,{toString:function(){return this.value.join(" ")},valueOf:function(){return this.value},parse:function(t){return t=t.valueOf(),Array.isArray(t)?t:this.split(t)}}),a.PointArray=function(t,e){a.Array.call(this,t,e||[[0,0]])},a.PointArray.prototype=new a.Array,a.PointArray.prototype.constructor=a.PointArray;for(var s={M:function(t,e,i){return e.x=i.x=t[0],e.y=i.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},Z:function(t,e,i){return e.x=i.x,e.y=i.y,["Z"]}},r="mlhvqtcsaz".split(""),o=0,n=r.length;o<n;++o)s[r[o]]=function(t){return function(e,i,a){if("H"==t)e[0]=e[0]+i.x;else if("V"==t)e[0]=e[0]+i.y;else if("A"==t)e[5]=e[5]+i.x,e[6]=e[6]+i.y;else for(var r=0,o=e.length;r<o;++r)e[r]=e[r]+(r%2?i.y:i.x);return s[t](e,i,a)}}(r[o].toUpperCase());a.PathArray=function(t,e){a.Array.call(this,t,e||[["M",0,0]])},a.PathArray.prototype=new a.Array,a.PathArray.prototype.constructor=a.PathArray,a.extend(a.PathArray,{toString:function(){return function(t){for(var e=0,i=t.length,a="";e<i;e++)a+=t[e][0],null!=t[e][1]&&(a+=t[e][1],null!=t[e][2]&&(a+=" ",a+=t[e][2],null!=t[e][3]&&(a+=" ",a+=t[e][3],a+=" ",a+=t[e][4],null!=t[e][5]&&(a+=" ",a+=t[e][5],a+=" ",a+=t[e][6],null!=t[e][7]&&
vendor: 11,597 bytes, line 60674
60674(a+=" ",a+=t[e][7])))));return a+" "}(this.value)},move:function(t,e){var i=this.bbox();return i.x,i.y,this},at:function(t){if(!this.destination)return this;for(var e=this.value,i=this.destination.value,s=[],r=new a.PathArray,o=0,n=e.length;o<n;o++){s[o]=[e[o][0]];for(var l=1,h=e[o].length;l<h;l++)s[o][l]=e[o][l]+(i[o][l]-e[o][l])*t;"A"===s[o][0]&&(s[o][4]=+(0!=s[o][4]),s[o][5]=+(0!=s[o][5]))}return r.value=s,r},parse:function(t){if(t instanceof a.PathArray)return t.valueOf();var e,i={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0};t="string"==typeof t?t.replace(a.regex.numbersWithDots,h).replace(a.regex.pathLetters," $& ").replace(a.regex.hyphen,"$1 -").trim().split(a.regex.delimiter):t.reduce((function(t,e){return[].concat.call(t,e)}),[]);var r=[],o=new a.Point,n=new a.Point,l=0,c=t.length;do{a.regex.isPathLetter.test(t[l])?(e=t[l],++l):"M"==e?e="L":"m"==e&&(e="l"),r.push(s[e].call(null,t.slice(l,l+=i[e.toUpperCase()]).map(parseFloat),o,n))}while(c>l);return r},bbox:function(){return a.parser.draw||a.prepare(),a.parser.path.setAttribute("d",this.toString()),a.parser.path.getBBox()}}),a.Number=a.invent({create:function(t,e){this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(a.regex.numberAndUnit))&&(this.value=parseFloat(e[1]),"%"==e[5]?this.value/=100:"s"==e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof a.Number&&(this.value=t.valueOf(),this.unit=t.unit)},extend:{toString:function(){return("%"==this.unit?~~(1e8*this.value)/1e6:"s"==this.unit?this.value/1e3:this.value)+this.unit},toJSON:function(){return this.toString()},valueOf:function(){return this.value},plus:function(t){return t=new a.Number(t),new a.Number(this+t,this.unit||t.unit)},minus:function(t){return t=new a.Number(t),new a.Number(this-t,this.unit||t.unit)},times:function(t){return t=new a.Number(t),new a.Number(this*t,this.unit||t.unit)},divide:function(t){return t=new a.Number(t),new a.Number(this/t,this.unit||t.unit)},to:function(t){var e=new a.Number(this);return"string"==typeof t&&(e.unit=t),e},morph:function(t){return this.destination=new a.Number(t),t.relative&&(this.destination.value+=this.value),this},at:function(t){return this.destination?new a.Number(this.destination).minus(this).times(t).plus(this):this}}}),a.Element=a.invent({create:function(t){this._stroke=a.defaults.attrs.stroke,this._event=null,this.dom={},(this.node=t)&&(this.type=t.nodeName,this.node.instance=this,this._stroke=t.getAttribute("stroke")||this._stroke)},extend:{x:function(t){return this.attr("x",t)},y:function(t){return this.attr("y",t)},cx:function(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)},cy:function(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)},move:function(t,e){return this.x(t).y(e)},center:function(t,e){return this.cx(t).cy(e)},width:function(t){return this.attr("width",t)},height:function(t){return this.attr("height",t)},size:function(t,e){var i=u(this,t,e);return this.width(new a.Number(i.width)).height(new a.Number(i.height))},clone:function(t){this.writeDataToDom();var e=x(this.node.cloneNode(!0));return t?t.add(e):this.after(e),e},remove:function(){return this.parent()&&this.parent().removeElement(this),this},replace:function(t){return this.after(t).remove(),t},addTo:function(t){return t.put(this)},putIn:function(t){return t.add(this)},id:function(t){return this.attr("id",t)},show:function(){return this.style("display","")},hide:function(){return this.style("display","none")},visible:function(){return"none"!=this.style("display")},toString:function(){return this.attr("id")},classes:function(){var t=this.attr("class");return null==t?[]:t.trim().split(a.regex.delimiter)},hasClass:function(t){return-1!=this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){var e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!=t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)},reference:function(t){return a.get(this.attr(t))},parent:function(t){var i=this;if(!i.node.parentNode)return null;if(i=a.adopt(i.node.parentNode),!t)return i;for(;i&&i.node instanceof e.SVGElement;){if("string"==typeof t?i.matches(t):i instanceof t)return i;if(!i.node.parentNode||"#document"==i.node.parentNode.nodeName)return null;i=a.adopt(i.node.parentNode)}},doc:function(){return this instanceof a.Doc?this:this.parent(a.Doc)},parents:function(t){var e=[],i=this;do{if(!(i=i.parent(t))||!i.node)break;e.push(i)}while(i.parent);return e},matches:function(t){return function(t,e){return(t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||t.oMatchesSelector).call(t,e)}(this.node,t)},native:function(){return this.node},svg:function(t){var e=i.createElement("svg");if(!(t&&this instanceof a.Parent))return e.appendChild(t=i.createElement("svg")),this.writeDataToDom(),t.appendChild(this.node.cloneNode(!0)),e.innerHTML.replace(/^<svg>/,"").replace(/<\/svg>$/,"");e.innerHTML="<svg>"+t.replace(/\n/,"").replace(/<([\w:-]+)([^<]+?)\/>/g,"<$1$2></$1>")+"</svg>";for(var s=0,r=e.firstChild.childNodes.length;s<r;s++)this.node.appendChild(e.firstChild.firstChild);return this},writeDataToDom:function(){return(this.each||this.lines)&&(this.each?this:this.lines()).each((function(){this.writeDataToDom()})),this.node.removeAttribute("svgjs:data"),Object.keys(this.dom).length&&this.node.setAttribute("svgjs:data",JSON.stringify(this.dom)),this},setData:function(t){return this.dom=t,this},is:function(t){return function(t,e){return t instanceof e}(this,t)}}}),a.easing={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)}},a.morph=function(t){return function(e,i){return new a.MorphObj(e,i).at(t)}},a.Situation=a.invent({create:function(t){this.init=!1,this.reversed=!1,this.reversing=!1,this.duration=new a.Number(t.duration).valueOf(),this.delay=new a.Number(t.delay).valueOf(),this.start=+new Date+this.delay,this.finish=this.start+this.duration,this.ease=t.ease,this.loop=0,this.loops=!1,this.animations={},this.attrs={},this.styles={},this.transforms=[],this.once={}}}),a.FX=a.invent({create:function(t){this._target=t,this.situations=[],this.active=!1,this.situation=null,this.paused=!1,this.lastPos=0,this.pos=0,this.absPos=0,this._speed=1},extend:{animate:function(e,i,s){"object"===t(e)&&(i=e.ease,s=e.delay,e=e.duration);var r=new a.Situation({duration:e||1e3,delay:s||0,ease:a.easing[i||"-"]||i});return this.queue(r),this},target:function(t){return t&&t instanceof a.Element?(this._target=t,this):this._target},timeToAbsPos:function(t){return(t-this.situation.start)/(this.situation.duration/this._speed)},absPosToTime:function(t){return this.situation.duration/this._speed*t+this.situation.start},startAnimFrame:function(){this.stopAnimFrame(),this.animationFrame=e.requestAnimationFrame(function(){this.step()}.bind(this))},stopAnimFrame:function(){e.cancelAnimationFrame(this.animationFrame)},start:function(){return!this.active&&this.situation&&(this.active=!0,this.startCurrent()),this},startCurrent:function(){return this.situation.start=+new Date+this.situation.delay/this._speed,this.situation.finish=this.situation.start+this.situation.duration/this._speed,this.initAnimations().step()},queue:function(t){return("function"==typeof t||t instanceof a.Situation)&&this.situations.push(t),this.situation||(this.situation=this.situations.shift()),this},dequeue:function(){return this.stop(),this.situation=this.situations.shift(),this.situation&&(this.situation instanceof a.Situation?this.start():this.situation.call(this)),this},initAnimations:function(){var t,e=this.situation;if(e.init)return this;for(var i in e.animations){t=this.target()[i](),Array.isArray(t)||(t=[t]),Array.isArray(e.animations[i])||(e.animations[i]=[e.animations[i]]);for(var s=t.length;s--;)e.animations[i][s]instanceof a.Number&&(t[s]=new a.Number(t[s])),e.animations[i][s]=t[s].morph(e.animations[i][s])}for(var i in e.attrs)e.attrs[i]=new a.MorphObj(this.target().attr(i),e.attrs[i]);for(var i in e.styles)e.styles[i]=new a.MorphObj(this.target().style(i),e.styles[i]);return e.initialTransformation=this.target().matrixify(),e.init=!0,this},clearQueue:function(){return this.situations=[],this},clearCurrent:function(){return this.situation=null,this},stop:function(t,e){var i=this.active;return this.active=!1,e&&this.clearQueue(),t&&this.situation&&(!i&&this.startCurrent(),this.atEnd()),this.stopAnimFrame(),this.clearCurrent()},after:function(t){var e=this.last();return this.target().on("finished.fx",(function i(a){a.detail.situation==e&&(t.call(this,e),this.off("finished.fx",i))})),this._callStart()},during:function(t){var e=this.last(),i=function(i){i.detail.situation==e&&t.call(this,i.detail.pos,a.morph(i.detail.pos),i.detail.eased,e)};return this.target().off("during.fx",i).on("during.fx",i),this.after((function(){this.off("during.fx",i)})),this._callStart()},afterAll:function(t){var e=function e(i){t.call(this),this.off("allfinished.fx",e)};return this.target().off("allfinished.fx",e).on("allfinished.fx",e),this._callStart()},last:function(){return this.situations.length?this.situations[this.situations.length-1]:this.situation},add:function(t,e,i){return this.last()[i||"animations"][t]=e,this._callStart()},step:function(t){var e,i,a;t||(this.absPos=this.timeToAbsPos(+new Date)),!1!==this.situation.loops?(e=Math.max(this.absPos,0),i=Math.floor(e),!0===this.situation.loops||i<this.situation.loops?(this.pos=e-i,a=this.situation.loop,this.situation.loop=i):(this.absPos=this.situation.loops,this.pos=1,a=this.situation.loop-1,this.situation.loop=this.situation.loops),this.situation.reversing&&(this.situation.reversed=this.situation.reversed!=Boolean((this.situation.loop-a)%2))):(this.absPos=Math.min(this.absPos,1),this.pos=this.absPos),this.pos<0&&(this.pos=0),this.situation.reversed&&(this.pos=1-this.pos);var s=this.situation.ease(this.pos);for(var r in this.situation.once)r>this.lastPos&&r<=s&&(this.situation.once[r].call(this.target(),this.pos,s),delete this.situation.once[r]);return this.active&&this.target().fire("during",{pos:this.pos,eased:s,fx:this,situation:this.situation}),this.situation?(this.eachAt(),1==this.pos&&!this.situation.reversed||this.situation.reversed&&0==this.pos?(this.stopAnimFrame(),this.target().fire("finished",{fx:this,situation:this.situation}),this.situations.length||(this.target().fire("allfinished"),this.situations.length||(this.target().off(".fx"),this.active=!1)),this.active?this.dequeue():this.clearCurrent()):!this.paused&&this.active&&this.startAnimFrame(),this.lastPos=s,this):this},eachAt:function(){var t,e=this,i=this.target(),s=this.situation;for(var r in s.animations)t=[].concat(s.animations[r]).map((function(t){return"string"!=typeof t&&t.at?t.at(s.ease(e.pos),e.pos):t})),i[r].apply(i,t);for(var r in s.attrs)t=[r].concat(s.attrs[r]).map((function(t){return"string"!=typeof t&&t.at?t.at(s.ease(e.pos),e.pos):t})),i.attr.apply(i,t);for(var r in s.styles)t=[r].concat(s.styles[r]).map((function(t){return"string"!=typeof t&&t.at?t.at(s.ease(e.pos),e.pos):t})),i.style.apply(i,t);if(s.transforms.length){t=s.initialTransformation,r=0;for(var o=s.transforms.length;r<o;r++){var n=s.transforms[r];n instanceof a.Matrix?t=n.relative?t.multiply((new a.Matrix).morph(n).at(s.ease(this.pos))):t.morph(n).at(s.ease(this.pos)):(n.relative||n.und
vendor: 9,077 bytes, line 60674
60674o(t.extract()),t=t.multiply(n.at(s.ease(this.pos))))}i.matrix(t)}return this},once:function(t,e,i){var a=this.last();return i||(t=a.ease(t)),a.once[t]=e,this},_callStart:function(){return setTimeout(function(){this.start()}.bind(this),0),this}},parent:a.Element,construct:{animate:function(t,e,i){return(this.fx||(this.fx=new a.FX(this))).animate(t,e,i)},delay:function(t){return(this.fx||(this.fx=new a.FX(this))).delay(t)},stop:function(t,e){return this.fx&&this.fx.stop(t,e),this},finish:function(){return this.fx&&this.fx.finish(),this}}}),a.MorphObj=a.invent({create:function(t,e){return a.Color.isColor(e)?new a.Color(t).morph(e):a.regex.delimiter.test(t)?a.regex.pathLetters.test(t)?new a.PathArray(t).morph(e):new a.Array(t).morph(e):a.regex.numberAndUnit.test(e)?new a.Number(t).morph(e):(this.value=t,void(this.destination=e))},extend:{at:function(t,e){return e<1?this.value:this.destination},valueOf:function(){return this.value}}}),a.extend(a.FX,{attr:function(e,i,a){if("object"===t(e))for(var s in e)this.attr(s,e[s]);else this.add(e,i,"attrs");return this},plot:function(t,e,i,a){return 4==arguments.length?this.plot([t,e,i,a]):this.add("plot",new(this.target().morphArray)(t))}}),a.Box=a.invent({create:function(e,i,s,r){if(!("object"!==t(e)||e instanceof a.Element))return a.Box.call(this,null!=e.left?e.left:e.x,null!=e.top?e.top:e.y,e.width,e.height);4==arguments.length&&(this.x=e,this.y=i,this.width=s,this.height=r),b(this)}}),a.BBox=a.invent({create:function(t){if(a.Box.apply(this,[].slice.call(arguments)),t instanceof a.Element){var e;try{if(!i.documentElement.contains){for(var s=t.node;s.parentNode;)s=s.parentNode;if(s!=i)throw new Error("Element not in the dom")}e=t.node.getBBox()}catch(i){if(t instanceof a.Shape){a.parser.draw||a.prepare();var r=t.clone(a.parser.draw.instance).show();e=r.node.getBBox(),r.remove()}else e={x:t.node.clientLeft,y:t.node.clientTop,width:t.node.clientWidth,height:t.node.clientHeight}}a.Box.call(this,e)}},inherit:a.Box,parent:a.Element,construct:{bbox:function(){return new a.BBox(this)}}}),a.BBox.prototype.constructor=a.BBox,a.Matrix=a.invent({create:function(e){var i=f([1,0,0,1,0,0]);e=null===e?i:e instanceof a.Element?e.matrixify():"string"==typeof e?f(e.split(a.regex.delimiter).map(parseFloat)):6==arguments.length?f([].slice.call(arguments)):Array.isArray(e)?f(e):e&&"object"===t(e)?e:i;for(var s=v.length-1;s>=0;--s)this[v[s]]=null!=e[v[s]]?e[v[s]]:i[v[s]]},extend:{extract:function(){var t=p(this,0,1);p(this,1,0);var e=180/Math.PI*Math.atan2(t.y,t.x)-90;return{x:this.e,y:this.f,transformedX:(this.e*Math.cos(e*Math.PI/180)+this.f*Math.sin(e*Math.PI/180))/Math.sqrt(this.a*this.a+this.b*this.b),transformedY:(this.f*Math.cos(e*Math.PI/180)+this.e*Math.sin(-e*Math.PI/180))/Math.sqrt(this.c*this.c+this.d*this.d),rotation:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f,matrix:new a.Matrix(this)}},clone:function(){return new a.Matrix(this)},morph:function(t){return this.destination=new a.Matrix(t),this},multiply:function(t){return new a.Matrix(this.native().multiply(function(t){return t instanceof a.Matrix||(t=new a.Matrix(t)),t}(t).native()))},inverse:function(){return new a.Matrix(this.native().inverse())},translate:function(t,e){return new a.Matrix(this.native().translate(t||0,e||0))},native:function(){for(var t=a.parser.native.createSVGMatrix(),e=v.length-1;e>=0;e--)t[v[e]]=this[v[e]];return t},toString:function(){return"matrix("+m(this.a)+","+m(this.b)+","+m(this.c)+","+m(this.d)+","+m(this.e)+","+m(this.f)+")"}},parent:a.Element,construct:{ctm:function(){return new a.Matrix(this.node.getCTM())},screenCTM:function(){if(this instanceof a.Nested){var t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new a.Matrix(e)}return new a.Matrix(this.node.getScreenCTM())}}}),a.Point=a.invent({create:function(e,i){var a;a=Array.isArray(e)?{x:e[0],y:e[1]}:"object"===t(e)?{x:e.x,y:e.y}:null!=e?{x:e,y:null!=i?i:e}:{x:0,y:0},this.x=a.x,this.y=a.y},extend:{clone:function(){return new a.Point(this)},morph:function(t,e){return this.destination=new a.Point(t,e),this}}}),a.extend(a.Element,{point:function(t,e){return new a.Point(t,e).transform(this.screenCTM().inverse())}}),a.extend(a.Element,{attr:function(e,i,s){if(null==e){for(e={},s=(i=this.node.attributes).length-1;s>=0;s--)e[i[s].nodeName]=a.regex.isNumber.test(i[s].nodeValue)?parseFloat(i[s].nodeValue):i[s].nodeValue;return e}if("object"===t(e))for(var r in e)this.attr(r,e[r]);else if(null===i)this.node.removeAttribute(e);else{if(null==i)return null==(i=this.node.getAttribute(e))?a.defaults.attrs[e]:a.regex.isNumber.test(i)?parseFloat(i):i;"stroke-width"==e?this.attr("stroke",parseFloat(i)>0?this._stroke:null):"stroke"==e&&(this._stroke=i),"fill"!=e&&"stroke"!=e||(a.regex.isImage.test(i)&&(i=this.doc().defs().image(i,0,0)),i instanceof a.Image&&(i=this.doc().defs().pattern(0,0,(function(){this.add(i)})))),"number"==typeof i?i=new a.Number(i):a.Color.isColor(i)?i=new a.Color(i):Array.isArray(i)&&(i=new a.Array(i)),"leading"==e?this.leading&&this.leading(i):"string"==typeof s?this.node.setAttributeNS(s,e,i.toString()):this.node.setAttribute(e,i.toString()),!this.rebuild||"font-size"!=e&&"x"!=e||this.rebuild(e,i)}return this}}),a.extend(a.Element,{transform:function(e,i){var s;return"object"!==t(e)?(s=new a.Matrix(this).extract(),"string"==typeof e?s[e]:s):(s=new a.Matrix(this),i=!!i||!!e.relative,null!=e.a&&(s=i?s.multiply(new a.Matrix(e)):new a.Matrix(e)),this.attr("transform",s))}}),a.extend(a.Element,{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(a.regex.transforms).slice(0,-1).map((function(t){var e=t.trim().split("(");return[e[0],e[1].split(a.regex.delimiter).map((function(t){return parseFloat(t)}))]})).reduce((function(t,e){return"matrix"==e[0]?t.multiply(f(e[1])):t[e[0]].apply(t,e[1])}),new a.Matrix)},toParent:function(t){if(this==t)return this;var e=this.screenCTM(),i=t.screenCTM().inverse();return this.addTo(t).untransform().transform(i.multiply(e)),this},toDoc:function(){return this.toParent(this.doc())}}),a.Transformation=a.invent({create:function(e,i){if(arguments.length>1&&"boolean"!=typeof i)return this.constructor.call(this,[].slice.call(arguments));if(Array.isArray(e))for(var a=0,s=this.arguments.length;a<s;++a)this[this.arguments[a]]=e[a];else if(e&&"object"===t(e))for(a=0,s=this.arguments.length;a<s;++a)this[this.arguments[a]]=e[this.arguments[a]];this.inversed=!1,!0===i&&(this.inversed=!0)}}),a.Translate=a.invent({parent:a.Matrix,inherit:a.Transformation,create:function(t,e){this.constructor.apply(this,[].slice.call(arguments))},extend:{arguments:["transformedX","transformedY"],method:"translate"}}),a.extend(a.Element,{style:function(e,i){if(0==arguments.length)return this.node.style.cssText||"";if(arguments.length<2)if("object"===t(e))for(var s in e)this.style(s,e[s]);else{if(!a.regex.isCss.test(e))return this.node.style[c(e)];for(e=e.split(/\s*;\s*/).filter((function(t){return!!t})).map((function(t){return t.split(/\s*:\s*/)}));i=e.pop();)this.style(i[0],i[1])}else this.node.style[c(e)]=null===i||a.regex.isBlank.test(i)?"":i;return this}}),a.Parent=a.invent({create:function(t){this.constructor.call(this,t)},inherit:a.Element,extend:{children:function(){return a.utils.map(a.utils.filterSVGElements(this.node.childNodes),(function(t){return a.adopt(t)}))},add:function(t,e){return null==e?this.node.appendChild(t.node):t.node!=this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this},put:function(t,e){return this.add(t,e),t},has:function(t){return this.index(t)>=0},index:function(t){return[].slice.call(this.node.childNodes).indexOf(t.node)},get:function(t){return a.adopt(this.node.childNodes[t])},first:function(){return this.get(0)},last:function(){return this.get(this.node.childNodes.length-1)},each:function(t,e){for(var i=this.children(),s=0,r=i.length;s<r;s++)i[s]instanceof a.Element&&t.apply(i[s],[s,i]),e&&i[s]instanceof a.Container&&i[s].each(t,e);return this},removeElement:function(t){return this.node.removeChild(t.node),this},clear:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return delete this._defs,this},defs:function(){return this.doc().defs()}}}),a.extend(a.Parent,{ungroup:function(t,e){return 0===e||this instanceof a.Defs||this.node==a.parser.draw||(t=t||(this instanceof a.Doc?this:this.parent(a.Parent)),e=e||1/0,this.each((function(){return this instanceof a.Defs?this:this instanceof a.Parent?this.ungroup(t,e-1):this.toParent(t)})),this.node.firstChild||this.remove()),this},flatten:function(t,e){return this.ungroup(t,e)}}),a.Container=a.invent({create:function(t){this.constructor.call(this,t)},inherit:a.Parent}),a.ViewBox=a.invent({parent:a.Container,construct:{}}),["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","touchstart","touchmove","touchleave","touchend","touchcancel"].forEach((function(t){a.Element.prototype[t]=function(e){return a.on(this.node,t,e),this}})),a.listeners=[],a.handlerMap=[],a.listenerId=0,a.on=function(t,e,
vendor: 13,088 bytes, line 60674
60674i,s,r){var o=i.bind(s||t.instance||t),n=(a.handlerMap.indexOf(t)+1||a.handlerMap.push(t))-1,l=e.split(".")[0],h=e.split(".")[1]||"*";a.listeners[n]=a.listeners[n]||{},a.listeners[n][l]=a.listeners[n][l]||{},a.listeners[n][l][h]=a.listeners[n][l][h]||{},i._svgjsListenerId||(i._svgjsListenerId=++a.listenerId),a.listeners[n][l][h][i._svgjsListenerId]=o,t.addEventListener(l,o,r||{passive:!0})},a.off=function(t,e,i){var s=a.handlerMap.indexOf(t),r=e&&e.split(".")[0],o=e&&e.split(".")[1],n="";if(-1!=s)if(i){if("function"==typeof i&&(i=i._svgjsListenerId),!i)return;a.listeners[s][r]&&a.listeners[s][r][o||"*"]&&(t.removeEventListener(r,a.listeners[s][r][o||"*"][i],!1),delete a.listeners[s][r][o||"*"][i])}else if(o&&r){if(a.listeners[s][r]&&a.listeners[s][r][o]){for(var l in a.listeners[s][r][o])a.off(t,[r,o].join("."),l);delete a.listeners[s][r][o]}}else if(o)for(var h in a.listeners[s])for(var n in a.listeners[s][h])o===n&&a.off(t,[h,o].join("."));else if(r){if(a.listeners[s][r]){for(var n in a.listeners[s][r])a.off(t,[r,n].join("."));delete a.listeners[s][r]}}else{for(var h in a.listeners[s])a.off(t,h);delete a.listeners[s],delete a.handlerMap[s]}},a.extend(a.Element,{on:function(t,e,i,s){return a.on(this.node,t,e,i,s),this},off:function(t,e){return a.off(this.node,t,e),this},fire:function(t,i){return t instanceof e.Event?this.node.dispatchEvent(t):this.node.dispatchEvent(t=new a.CustomEvent(t,{detail:i,cancelable:!0})),this._event=t,this},event:function(){return this._event}}),a.Defs=a.invent({create:"defs",inherit:a.Container}),a.G=a.invent({create:"g",inherit:a.Container,extend:{x:function(t){return null==t?this.transform("x"):this.transform({x:t-this.x()},!0)}},construct:{group:function(){return this.put(new a.G)}}}),a.Doc=a.invent({create:function(t){t&&("svg"==(t="string"==typeof t?i.getElementById(t):t).nodeName?this.constructor.call(this,t):(this.constructor.call(this,a.create("svg")),t.appendChild(this.node),this.size("100%","100%")),this.namespace().defs())},inherit:a.Container,extend:{namespace:function(){return this.attr({xmlns:a.ns,version:"1.1"}).attr("xmlns:xlink",a.xlink,a.xmlns).attr("xmlns:svgjs",a.svgjs,a.xmlns)},defs:function(){var t;return this._defs||((t=this.node.getElementsByTagName("defs")[0])?this._defs=a.adopt(t):this._defs=new a.Defs,this.node.appendChild(this._defs.node)),this._defs},parent:function(){return this.node.parentNode&&"#document"!=this.node.parentNode.nodeName?this.node.parentNode:null},remove:function(){return this.parent()&&this.parent().removeChild(this.node),this},clear:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return delete this._defs,a.parser.draw&&!a.parser.draw.parentNode&&this.node.appendChild(a.parser.draw),this},clone:function(t){this.writeDataToDom();var e=this.node,i=x(e.cloneNode(!0));return t?(t.node||t).appendChild(i.node):e.parentNode.insertBefore(i.node,e.nextSibling),i}}}),a.extend(a.Element,{}),a.Gradient=a.invent({create:function(t){this.constructor.call(this,a.create(t+"Gradient")),this.type=t},inherit:a.Container,extend:{at:function(t,e,i){return this.put(new a.Stop).update(t,e,i)},update:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this},fill:function(){return"url(#"+this.id()+")"},toString:function(){return this.fill()},attr:function(t,e,i){return"transform"==t&&(t="gradientTransform"),a.Container.prototype.attr.call(this,t,e,i)}},construct:{gradient:function(t,e){return this.defs().gradient(t,e)}}}),a.extend(a.Gradient,a.FX,{from:function(t,e){return"radial"==(this._target||this).type?this.attr({fx:new a.Number(t),fy:new a.Number(e)}):this.attr({x1:new a.Number(t),y1:new a.Number(e)})},to:function(t,e){return"radial"==(this._target||this).type?this.attr({cx:new a.Number(t),cy:new a.Number(e)}):this.attr({x2:new a.Number(t),y2:new a.Number(e)})}}),a.extend(a.Defs,{gradient:function(t,e){return this.put(new a.Gradient(t)).update(e)}}),a.Stop=a.invent({create:"stop",inherit:a.Element,extend:{update:function(t){return("number"==typeof t||t instanceof a.Number)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new a.Number(t.offset)),this}}}),a.Pattern=a.invent({create:"pattern",inherit:a.Container,extend:{fill:function(){return"url(#"+this.id()+")"},update:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this},toString:function(){return this.fill()},attr:function(t,e,i){return"transform"==t&&(t="patternTransform"),a.Container.prototype.attr.call(this,t,e,i)}},construct:{pattern:function(t,e,i){return this.defs().pattern(t,e,i)}}}),a.extend(a.Defs,{pattern:function(t,e,i){return this.put(new a.Pattern).update(i).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}}),a.Shape=a.invent({create:function(t){this.constructor.call(this,t)},inherit:a.Element}),a.Symbol=a.invent({create:"symbol",inherit:a.Container,construct:{symbol:function(){return this.put(new a.Symbol)}}}),a.Use=a.invent({create:"use",inherit:a.Shape,extend:{element:function(t,e){return this.attr("href",(e||"")+"#"+t,a.xlink)}},construct:{use:function(t,e){return this.put(new a.Use).element(t,e)}}}),a.Rect=a.invent({create:"rect",inherit:a.Shape,construct:{rect:function(t,e){return this.put(new a.Rect).size(t,e)}}}),a.Circle=a.invent({create:"circle",inherit:a.Shape,construct:{circle:function(t){return this.put(new a.Circle).rx(new a.Number(t).divide(2)).move(0,0)}}}),a.extend(a.Circle,a.FX,{rx:function(t){return this.attr("r",t)},ry:function(t){return this.rx(t)}}),a.Ellipse=a.invent({create:"ellipse",inherit:a.Shape,construct:{ellipse:function(t,e){return this.put(new a.Ellipse).size(t,e).move(0,0)}}}),a.extend(a.Ellipse,a.Rect,a.FX,{rx:function(t){return this.attr("rx",t)},ry:function(t){return this.attr("ry",t)}}),a.extend(a.Circle,a.Ellipse,{x:function(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())},y:function(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())},cx:function(t){return null==t?this.attr("cx"):this.attr("cx",t)},cy:function(t){return null==t?this.attr("cy"):this.attr("cy",t)},width:function(t){return null==t?2*this.rx():this.rx(new a.Number(t).divide(2))},height:function(t){return null==t?2*this.ry():this.ry(new a.Number(t).divide(2))},size:function(t,e){var i=u(this,t,e);return this.rx(new a.Number(i.width).divide(2)).ry(new a.Number(i.height).divide(2))}}),a.Line=a.invent({create:"line",inherit:a.Shape,extend:{array:function(){return new a.PointArray([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])},plot:function(t,e,i,s){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:i,y2:s}:new a.PointArray(t).toLine(),this.attr(t))},move:function(t,e){return this.attr(this.array().move(t,e).toLine())},size:function(t,e){var i=u(this,t,e);return this.attr(this.array().size(i.width,i.height).toLine())}},construct:{line:function(t,e,i,s){return a.Line.prototype.plot.apply(this.put(new a.Line),null!=t?[t,e,i,s]:[0,0,0,0])}}}),a.Polyline=a.invent({create:"polyline",inherit:a.Shape,construct:{polyline:function(t){return this.put(new a.Polyline).plot(t||new a.PointArray)}}}),a.Polygon=a.invent({create:"polygon",inherit:a.Shape,construct:{polygon:function(t){return this.put(new a.Polygon).plot(t||new a.PointArray)}}}),a.extend(a.Polyline,a.Polygon,{array:function(){return this._array||(this._array=new a.PointArray(this.attr("points")))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new a.PointArray(t))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},size:function(t,e){var i=u(this,t,e);return this.attr("points",this.array().size(i.width,i.height))}}),a.extend(a.Line,a.Polyline,a.Polygon,{morphArray:a.PointArray,x:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)},y:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)},width:function(t){var e=this.bbox();return null==t?e.width:this.size(t,e.height)},height:function(t){var e=this.bbox();return null==t?e.height:this.size(e.width,t)}}),a.Path=a.invent({create:"path",inherit:a.Shape,extend:{morphArray:a.PathArray,array:function(){return this._array||(this._array=new a.PathArray(this.attr("d")))},plot:function(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new a.PathArray(t))},clear:function(){return delete this._array,this}},construct:{path:function(t){return this.put(new a.Path).plot(t||new a.PathArray)}}}),a.Image=a.invent({create:"image",inherit:a.Shape,extend:{load:function(t){if(!t)return this;var i=this,s=new e.Image;return a.on(s,"load",(function(){a.off(s);var e=i.parent(a.Pattern);null!==e&&(0==i.width()&&0==i.height()&&i.size(s.width,s.height),e&&0==e.width()&&0==e.height()&&e.size(i.width(),i.height()),"function"==typeof i._loaded&&i._loaded.call(i,{width:s.width,height:s.height,ratio:s.width/s.height,url:t}))})),a.on(s,"error",(function(t){a.off(s),"function"==typeof i._error&&i._error.call(i,t)})),this.attr("href",s.src=this.src=t,a.xlink)},loaded:function(t){return this._loaded=t,this},error:function(t){return this._error=t,this}},construct:{image:function(t,e,i){return this.put(new a.Image).load(t).size(e||0,i||e||0)}}}),a.Text=a.invent({create:function(){this.constructor.call(this,a.create("text")),this.dom.leading=new a.Number(1.3),this._rebuild=!0,this._build=!1,this.attr("font-family",a.defaults.attrs["font-family"])},inherit:a.Shape,extend:{x:function(t){return null==t?this.attr("x"):this.attr("x",t)},text:function(t){if(void 0===t){t="";for(var e=this.node.childNodes,i=0,s=e.length;i<s;++i)0!=i&&3!=e[i].nodeType&&1==a.adopt(e[i]).dom.newLined&&(t+="\n"),t+=e[i].textContent;return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else{i=0;for(var r=(t=t.split("\n")).length;i<r;i++)this.tspan(t[i]).newLine()}return this.build(!1).rebuild()},size:function(t){return this.attr("font-size",t).rebuild()},leading:function(t){return null==t?this.dom.leading:(this.dom.leading=new a.Number(t),this.rebuild())},lines:function(){var t=(this.textPath&&this.textPath()||this).node,e=a.utils.map(a.utils.filterSVGElements(t.childNodes),(function(t){return a.adopt(t)}));return new a.Set(e)},rebuild:function(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){var e=this,i=0,s=this.dom.leading*new a.Number(this.attr("font-size"));this.lines().each((function(){this.dom.newLined&&(e.textPath()||this.attr("x",e.attr("x")),"\n"==this.text()?i+=s:(this.attr("dy",s+i),i=0))})),this.fire("rebuild")}return this},build:function(t){return this._build=!!t,this},setData:function(t){return this.dom=t,this.dom.leading=new a.Number(t.leading||1.3),this}},construct:{text:function(t){return this.put(new a.Text).text(t)},plain:function(t){return this.put(new a.Text).plain(t)}}}),a.Tspan=a.invent({create:"tspan",inherit:a.Shape,extend:{text:function(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?t.call(this,this):this.plain(t),this)},dx:function(t){return this.attr("dx",t)},dy:function(t){return this.attr("dy",t)},newLine:function(){var t=this.parent(a.Text);return this.dom.newLined=!0,this.dy(t.dom.leading*t.attr("font-size")).attr("x",t.x())}}}),a.extend(a.Text,a.Tspan,{plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(i.createTextNode(t)),this},tspan:function(t){var e=(this.textPath&&this.textPath()||this).node,i=new a.Tspan;return!1===this._build&&this.clear(),e.appendChild(i.node),i.text(t)},clear:function(){for(var t=(this.textPath&&this.textPath()||this).node;t.hasChildNodes();)t.removeChild(t.lastChild);return this},length:function(){return this.node.getComputedTextLength()}}),a.TextPath=a.invent({create:"textPath",inherit:a.Parent,parent:a.Text,construct:{morphArray:a.PathArray,array:function(){var t=this.track();return t?t.array():null},plot:function(t){var e=this.track(),i=null;return e&&(i=e.plot(t)),null==t?i:this},track:function(){var t=this.textPath();if(t)return t.reference("href")},textPath:function(){if(this.node.firstChild&&"textPath"==this.node.firstChild.nodeName)return a.adopt(this.node.firstChild)}}}),a.Nested=a.invent({create:function(){this.constructor.call(this,a.create("svg")),this.style("overflow","visible")},inherit:a.Container,construct:{nested:function(){return this.put(new a.Nested)}}});var l={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"==e?t:t+"-"+e}};function h(t,e,i,s){return i+s.replace(a.regex.dots," .")}function c(t){return t.toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()}))}function d(t){return t.charAt(0).toUpperCase()+t.slice(1)}function g(t){var e=t.toString(16);return 1==e.length?"0"+e:e}function u(t,e,i){if(null==e||null==i){var a=t.bbox();null==e?e=a.width/a.height*i:null==i&&(i=a.height/a.width*e)}return{width:e,height:i}}
vendor: 4,389 bytes, lines 60674-60677
60674function p(t,e,i){return{x:e*t.a+i*t.c+0,y:e*t.b+i*t.d+0}}function f(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}function x(t){for(var i=t.childNodes.length-1;i>=0;i--)t.childNodes[i]instanceof e.SVGElement&&x(t.childNodes[i]);return a.adopt(t).id(a.eid(t.nodeName))}function b(t){return null==t.x&&(t.x=0,t.y=0,t.width=0,t.height=0),t.w=t.width,t.h=t.height,t.x2=t.x+t.width,t.y2=t.y+t.height,t.cx=t.x+t.width/2,t.cy=t.y+t.height/2,t}function m(t){return Math.abs(t)>1e-37?t:0}["fill","stroke"].forEach((function(t){var e={};e[t]=function(e){if(void 0===e)return this;if("string"==typeof e||a.Color.isRgb(e)||e&&"function"==typeof e.fill)this.attr(t,e);else for(var i=l[t].length-1;i>=0;i--)null!=e[l[t][i]]&&this.attr(l.prefix(t,l[t][i]),e[l[t][i]]);return this},a.extend(a.Element,a.FX,e)})),a.extend(a.Element,a.FX,{translate:function(t,e){return this.transform({x:t,y:e})},matrix:function(t){return this.attr("transform",new a.Matrix(6==arguments.length?[].slice.call(arguments):t))},opacity:function(t){return this.attr("opacity",t)},dx:function(t){return this.x(new a.Number(t).plus(this instanceof a.FX?0:this.x()),!0)},dy:function(t){return this.y(new a.Number(t).plus(this instanceof a.FX?0:this.y()),!0)}}),a.extend(a.Path,{length:function(){return this.node.getTotalLength()},pointAt:function(t){return this.node.getPointAtLength(t)}}),a.Set=a.invent({create:function(t){Array.isArray(t)?this.members=t:this.clear()},extend:{add:function(){for(var t=[].slice.call(arguments),e=0,i=t.length;e<i;e++)this.members.push(t[e]);return this},remove:function(t){var e=this.index(t);return e>-1&&this.members.splice(e,1),this},each:function(t){for(var e=0,i=this.members.length;e<i;e++)t.apply(this.members[e],[e,this.members]);return this},clear:function(){return this.members=[],this},length:function(){return this.members.length},has:function(t){return this.index(t)>=0},index:function(t){return this.members.indexOf(t)},get:function(t){return this.members[t]},first:function(){return this.get(0)},last:function(){return this.get(this.members.length-1)},valueOf:function(){return this.members}},construct:{set:function(t){return new a.Set(t)}}}),a.FX.Set=a.invent({create:function(t){this.set=t}}),a.Set.inherit=function(){var t=[];for(var e in a.Shape.prototype)"function"==typeof a.Shape.prototype[e]&&"function"!=typeof a.Set.prototype[e]&&t.push(e);for(var e in t.forEach((function(t){a.Set.prototype[t]=function(){for(var e=0,i=this.members.length;e<i;e++)this.members[e]&&"function"==typeof this.members[e][t]&&this.members[e][t].apply(this.members[e],arguments);return"animate"==t?this.fx||(this.fx=new a.FX.Set(this)):this}})),t=[],a.FX.prototype)"function"==typeof a.FX.prototype[e]&&"function"!=typeof a.FX.Set.prototype[e]&&t.push(e);t.forEach((function(t){a.FX.Set.prototype[t]=function(){for(var e=0,i=this.set.members.length;e<i;e++)this.set.members[e].fx[t].apply(this.set.members[e].fx,arguments);return this}}))},a.extend(a.Element,{}),a.extend(a.Element,{remember:function(e,i){if("object"===t(arguments[0]))for(var a in e)this.remember(a,e[a]);else{if(1==arguments.length)return this.memory()[e];this.memory()[e]=i}return this},forget:function(){if(0==arguments.length)this._memory={};else for(var t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory||(this._memory={})}}),a.get=function(t){var e=i.getElementById(function(t){var e=(t||"").toString().match(a.regex.reference);if(e)return e[1]}(t)||t);return a.adopt(e)},a.select=function(t,e){return new a.Set(a.utils.map((e||i).querySelectorAll(t),(function(t){return a.adopt(t)})))},a.extend(a.Parent,{select:function(t){return a.select(t,this.node)}});var v="abcdef".split("");if("function"!=typeof e.CustomEvent){var y=function(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var a=i.createEvent("CustomEvent");return a.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),a};y.prototype=e.Event.prototype,a.CustomEvent=y}else a.CustomEvent=e.CustomEvent;return a},"function"==typeof define&&define.amd?define((function(){return Mt(Tt,Tt.document)})):"object"===("undefined"==typeof exports?"undefined":t(exports))&&"undefined"!=typeof module?module.exports=Tt.document?Mt(Tt,Tt.document):function(t){return Mt(t,t.document)}:Tt.SVG=Mt(Tt,Tt.document),
60675/*! svg.filter.js - v2.0.2 - 2016-02-24
60676  * https://github.com/wout/svg.filter.js
60677  
vendor: 5,354 bytes, lines 60677-60678
60677* Copyright (c) 2016 Wout Fierens; Licensed MIT */
60678function(){SVG.Filter=SVG.invent({create:"filter",inherit:SVG.Parent,extend:{source:"SourceGraphic",sourceAlpha:"SourceAlpha",background:"BackgroundImage",backgroundAlpha:"BackgroundAlpha",fill:"FillPaint",stroke:"StrokePaint",autoSetIn:!0,put:function(t,e){return this.add(t,e),!t.attr("in")&&this.autoSetIn&&t.attr("in",this.source),t.attr("result")||t.attr("result",t),t},blend:function(t,e,i){return this.put(new SVG.BlendEffect(t,e,i))},colorMatrix:function(t,e){return this.put(new SVG.ColorMatrixEffect(t,e))},convolveMatrix:function(t){return this.put(new SVG.ConvolveMatrixEffect(t))},componentTransfer:function(t){return this.put(new SVG.ComponentTransferEffect(t))},composite:function(t,e,i){return this.put(new SVG.CompositeEffect(t,e,i))},flood:function(t,e){return this.put(new SVG.FloodEffect(t,e))},offset:function(t,e){return this.put(new SVG.OffsetEffect(t,e))},image:function(t){return this.put(new SVG.ImageEffect(t))},merge:function(){var t=[void 0];for(var e in arguments)t.push(arguments[e]);return this.put(new(SVG.MergeEffect.bind.apply(SVG.MergeEffect,t)))},gaussianBlur:function(t,e){return this.put(new SVG.GaussianBlurEffect(t,e))},morphology:function(t,e){return this.put(new SVG.MorphologyEffect(t,e))},diffuseLighting:function(t,e,i){return this.put(new SVG.DiffuseLightingEffect(t,e,i))},displacementMap:function(t,e,i,a,s){return this.put(new SVG.DisplacementMapEffect(t,e,i,a,s))},specularLighting:function(t,e,i,a){return this.put(new SVG.SpecularLightingEffect(t,e,i,a))},tile:function(){return this.put(new SVG.TileEffect)},turbulence:function(t,e,i,a,s){return this.put(new SVG.TurbulenceEffect(t,e,i,a,s))},toString:function(){return"url(#"+this.attr("id")+")"}}}),SVG.extend(SVG.Defs,{filter:function(t){var e=this.put(new SVG.Filter);return"function"==typeof t&&t.call(e,e),e}}),SVG.extend(SVG.Container,{filter:function(t){return this.defs().filter(t)}}),SVG.extend(SVG.Element,SVG.G,SVG.Nested,{filter:function(t){return this.filterer=t instanceof SVG.Element?t:this.doc().filter(t),this.doc()&&this.filterer.doc()!==this.doc()&&this.doc().defs().add(this.filterer),this.attr("filter",this.filterer),this.filterer},unfilter:function(t){return this.filterer&&!0===t&&this.filterer.remove(),delete this.filterer,this.attr("filter",null)}}),SVG.Effect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(t){return null==t?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",t)},result:function(t){return null==t?this.attr("result"):this.attr("result",t)},toString:function(){return this.result()}}}),SVG.ParentEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Parent,extend:{in:function(t){return null==t?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",t)},result:function(t){return null==t?this.attr("result"):this.attr("result",t)},toString:function(){return this.result()}}});var t={blend:function(t,e){return this.parent()&&this.parent().blend(this,t,e)},colorMatrix:function(t,e){return this.parent()&&this.parent().colorMatrix(t,e).in(this)},convolveMatrix:function(t){return this.parent()&&this.parent().convolveMatrix(t).in(this)},componentTransfer:function(t){return this.parent()&&this.parent().componentTransfer(t).in(this)},composite:function(t,e){return this.parent()&&this.parent().composite(this,t,e)},flood:function(t,e){return this.parent()&&this.parent().flood(t,e)},offset:function(t,e){return this.parent()&&this.parent().offset(t,e).in(this)},image:function(t){return this.parent()&&this.parent().image(t)},merge:function(){return this.parent()&&this.parent().merge.apply(this.parent(),[this].concat(arguments))},gaussianBlur:function(t,e){return this.parent()&&this.parent().gaussianBlur(t,e).in(this)},morphology:function(t,e){return this.parent()&&this.parent().morphology(t,e).in(this)},diffuseLighting:function(t,e,i){return this.parent()&&this.parent().diffuseLighting(t,e,i).in(this)},displacementMap:function(t,e,i,a){return this.parent()&&this.parent().displacementMap(this,t,e,i,a)},specularLighting:function(t,e,i,a){return this.parent()&&this.parent().specularLighting(t,e,i,a).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,i,a,s){return this.parent()&&this.parent().turbulence(t,e,i,a,s).in(this)}};SVG.extend(SVG.Effect,t),SVG.extend(SVG.ParentEffect,t),SVG.ChildEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(t){this.attr("in",t)}}});var e={blend:function(t,e,i){this.attr({in:t,in2:e,mode:i||"normal"})},colorMatrix:function(t,e){"matrix"==t&&(e=s(e)),this.attr({type:t,values:void 0===e?null:e})},convolveMatrix:function(t){t=s(t),this.attr({order:Math.sqrt(t.split(" ").length),kernelMatrix:t})},composite:function(t,e,i){this.attr({in:t,in2:e,operator:i})},flood:function(t,e){this.attr("flood-color",t),null!=e&&this.attr("flood-opacity",e)},offset:function(t,e){this.attr({dx:t,dy:e})},image:function(t){this.attr("href",t,SVG.xlink)},displacementMap:function(t,e,i,a,s){this.attr({in:t,in2:e,scale:i,xChannelSelector:a,yChannelSelector:s})},gaussianBlur:function(t,e){null!=t||null!=e?this.attr("stdDeviation",
vendor: 7,497 bytes, lines 60678-60681
60678r(Array.prototype.slice.call(arguments))):this.attr("stdDeviation","0 0")},morphology:function(t,e){this.attr({operator:t,radius:e})},tile:function(){},turbulence:function(t,e,i,a,s){this.attr({numOctaves:e,seed:i,stitchTiles:a,baseFrequency:t,type:s})}},i={merge:function(){var t;if(arguments[0]instanceof SVG.Set){var e=this;arguments[0].each((function(t){this instanceof SVG.MergeNode?e.put(this):(this instanceof SVG.Effect||this instanceof SVG.ParentEffect)&&e.put(new SVG.MergeNode(this))}))}else{t=Array.isArray(arguments[0])?arguments[0]:arguments;for(var i=0;i<t.length;i++)t[i]instanceof SVG.MergeNode?this.put(t[i]):this.put(new SVG.MergeNode(t[i]))}},componentTransfer:function(t){if(this.rgb=new SVG.Set,["r","g","b","a"].forEach(function(t){this[t]=new(SVG["Func"+t.toUpperCase()])("identity"),this.rgb.add(this[t]),this.node.appendChild(this[t].node)}.bind(this)),t)for(var e in t.rgb&&(["r","g","b"].forEach(function(e){this[e].attr(t.rgb)}.bind(this)),delete t.rgb),t)this[e].attr(t[e])},diffuseLighting:function(t,e,i){this.attr({surfaceScale:t,diffuseConstant:e,kernelUnitLength:i})},specularLighting:function(t,e,i,a){this.attr({surfaceScale:t,diffuseConstant:e,specularExponent:i,kernelUnitLength:a})}},a={distantLight:function(t,e){this.attr({azimuth:t,elevation:e})},pointLight:function(t,e,i){this.attr({x:t,y:e,z:i})},spotLight:function(t,e,i,a,s,r){this.attr({x:t,y:e,z:i,pointsAtX:a,pointsAtY:s,pointsAtZ:r})},mergeNode:function(t){this.attr("in",t)}};function s(t){return Array.isArray(t)&&(t=new SVG.Array(t)),t.toString().replace(/^\s+/,"").replace(/\s+$/,"").replace(/\s+/g," ")}function r(t){if(!Array.isArray(t))return t;for(var e=0,i=t.length,a=[];e<i;e++)a.push(t[e]);return a.join(" ")}function o(){var t=function(){};for(var e in"function"==typeof arguments[arguments.length-1]&&(t=arguments[arguments.length-1],Array.prototype.splice.call(arguments,arguments.length-1,1)),arguments)for(var i in arguments[e])t(arguments[e][i],i,arguments[e])}["r","g","b","a"].forEach((function(t){a["Func"+t.toUpperCase()]=function(t){switch(this.attr("type",t),t){case"table":this.attr("tableValues",arguments[1]);break;case"linear":this.attr("slope",arguments[1]),this.attr("intercept",arguments[2]);break;case"gamma":this.attr("amplitude",arguments[1]),this.attr("exponent",arguments[2]),this.attr("offset",arguments[2])}}})),o(e,(function(t,e){var i=e.charAt(0).toUpperCase()+e.slice(1);SVG[i+"Effect"]=SVG.invent({create:function(){this.constructor.call(this,SVG.create("fe"+i)),t.apply(this,arguments),this.result(this.attr("id")+"Out")},inherit:SVG.Effect,extend:{}})})),o(i,(function(t,e){var i=e.charAt(0).toUpperCase()+e.slice(1);SVG[i+"Effect"]=SVG.invent({create:function(){this.constructor.call(this,SVG.create("fe"+i)),t.apply(this,arguments),this.result(this.attr("id")+"Out")},inherit:SVG.ParentEffect,extend:{}})})),o(a,(function(t,e){var i=e.charAt(0).toUpperCase()+e.slice(1);SVG[i]=SVG.invent({create:function(){this.constructor.call(this,SVG.create("fe"+i)),t.apply(this,arguments)},inherit:SVG.ChildEffect,extend:{}})})),SVG.extend(SVG.MergeEffect,{in:function(t){return t instanceof SVG.MergeNode?this.add(t,0):this.add(new SVG.MergeNode(t),0),this}}),SVG.extend(SVG.CompositeEffect,SVG.BlendEffect,SVG.DisplacementMapEffect,{in2:function(t){return null==t?this.parent()&&this.parent().select('[result="'+this.attr("in2")+'"]').get(0)||this.attr("in2"):this.attr("in2",t)}}),SVG.filter={sepiatone:[.343,.669,.119,0,0,.249,.626,.13,0,0,.172,.334,.111,0,0,0,0,0,1,0]}}.call(void 0),function(){function t(t,s,r,o,n,l,h){for(var c=t.slice(s,r||h),d=o.slice(n,l||h),g=0,u={pos:[0,0],start:[0,0]},p={pos:[0,0],start:[0,0]};;){if(c[g]=e.call(u,c[g]),d[g]=e.call(p,d[g]),c[g][0]!=d[g][0]||"M"==c[g][0]||"A"==c[g][0]&&(c[g][4]!=d[g][4]||c[g][5]!=d[g][5])?(Array.prototype.splice.apply(c,[g,1].concat(a.call(u,c[g]))),Array.prototype.splice.apply(d,[g,1].concat(a.call(p,d[g])))):(c[g]=i.call(u,c[g]),d[g]=i.call(p,d[g])),++g==c.length&&g==d.length)break;g==c.length&&c.push(["C",u.pos[0],u.pos[1],u.pos[0],u.pos[1],u.pos[0],u.pos[1]]),g==d.length&&d.push(["C",p.pos[0],p.pos[1],p.pos[0],p.pos[1],p.pos[0],p.pos[1]])}return{start:c,dest:d}}function e(t){switch(t[0]){case"z":case"Z":t[0]="L",t[1]=this.start[0],t[2]=this.start[1];break;case"H":t[0]="L",t[2]=this.pos[1];break;case"V":t[0]="L",t[2]=t[1],t[1]=this.pos[0];break;case"T":t[0]="Q",t[3]=t[1],t[4]=t[2],t[1]=this.reflection[1],t[2]=this.reflection[0];break;case"S":t[0]="C",t[6]=t[4],t[5]=t[3],t[4]=t[2],t[3]=t[1],t[2]=this.reflection[1],t[1]=this.reflection[0]}return t}function i(t){var e=t.length;return this.pos=[t[e-2],t[e-1]],-1!="SCQT".indexOf(t[0])&&(this.reflection=[2*this.pos[0]-t[e-4],2*this.pos[1]-t[e-3]]),t}function a(t){var e=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],e;case"L":t[5]=t[3]=t[1],t[6]=t[4]=t[2],t[1]=this.pos[0],t[2]=this.pos[1];break;case"Q":t[6]=t[4],t[5]=t[3],t[4]=1*t[4]/3+2*t[2]/3,t[3]=1*t[3]/3+2*t[1]/3,t[2]=1*this.pos[1]/3+2*t[2]/3,t[1]=1*this.pos[0]/3+2*t[1]/3;break;case"A":t=(e=function(t,e){var i,a,s,r,o,n,l,h,c,d,g,u,p,f,x,b,m,v,y,w,k,A,S,C,L,P,T=Math.abs(e[1]),M=Math.abs(e[2]),I=e[3]%360,z=e[4],X=e[5],E=e[6],Y=e[7],F=new SVG.Point(t),R=new SVG.Point(E,Y),H=[];if(0===T||0===M||F.x===R.x&&F.y===R.y)return[["C",F.x,F.y,R.x,R.y,R.x,R.y]];i=new SVG.Point((F.x-R.x)/2,(F.y-R.y)/2).transform((new SVG.Matrix).rotate(I)),(a=i.x*i.x/(T*T)+i.y*i.y/(M*M))>1&&(T*=a=Math.sqrt(a),M*=a);s=(new SVG.Matrix).rotate(I).scale(1/T,1/M).rotate(-I),F=F.transform(s),R=R.transform(s),r=[R.x-F.x,R.y-F.y],n=r[0]*r[0]+r[1]*r[1],o=Math.sqrt(n),r[0]/=o,r[1]/=o,l=n<4?Math.sqrt(1-n/4):0,z===X&&(l*=-1);h=new SVG.Point((R.x+F.x)/2+l*-r[1],(R.y+F.y)/2+l*r[0]),c=new SVG.Point(F.x-h.x,F.y-h.y),d=new SVG.Point(R.x-h.x,R.y-h.y),g=Math.acos(c.x/Math.sqrt(c.x*c.x+c.y*c.y)),c.y<0&&(g*=-1);u=Math.acos(d.x/Math.sqrt(d.x*d.x+d.y*d.y)),d.y<0&&(u*=-1);X&&g>u&&(u+=2*Math.PI);!X&&g<u&&(u-=2*Math.PI);for(f=Math.ceil(2*Math.abs(g-u)/Math.PI),b=[],m=g,p=(u-g)/f,x=4*Math.tan(p/4)/3,k=0;k<=f;k++)y=Math.cos(m),v=Math.sin(m),w=new SVG.Point(h.x+y,h.y+v),b[k]=[new SVG.Point(w.x+x*v,w.y-x*y),w,new SVG.Point(w.x-x*v,w.y+x*y)],m+=p;for(b[0][0]=b[0][1].clone(),b[b.length-1][2]=b[b.length-1][1].clone(),s=(new SVG.Matrix).rotate(I).scale(T,M).rotate(-I),k=0,A=b.length;k<A;k++)b[k][0]=b[k][0].transform(s),b[k][1]=b[k][1].transform(s),b[k][2]=b[k][2].transform(s);for(k=1,A=b.length;k<A;k++)S=(w=b[k-1][2]).x,C=w.y,L=(w=b[k][0]).x,P=w.y,E=(w=b[k][1]).x,Y=w.y,H.push(["C",S,C,L,P,E,Y]);return H}(this.pos,t))[0]}return t[0]="C",this.pos=[t[5],t[6]],this.reflection=[2*t[5]-t[3],2*t[6]-t[4]],e}function s(t,e){if(!1===e)return!1;for(var i=e,a=t.length;i<a;++i)if("M"==t[i][0])return i;return!1}SVG.extend(SVG.PathArray,{morph:function(e){for(var i=this.value,a=this.parse(e),r=0,o=0,n=!1,l=!1;!1!==r||!1!==o;){var h;n=s(i,!1!==r&&r+1),l=s(a,!1!==o&&o+1),!1===r&&(r=0==(h=new SVG.PathArray(c.start).bbox()).height||0==h.width?i.push(i[0])-1:i.push(["M",h.x+h.width/2,h.y+h.height/2])-1),!1===o&&(o=0==(h=new SVG.PathArray(c.dest).bbox()).height||0==h.width?a.push(a[0])-1:a.push(["M",h.x+h.width/2,h.y+h.height/2])-1);var c=t(i,r,n,a,o,l);i=i.slice(0,r).concat(c.start,!1===n?[]:i.slice(n)),a=a.slice(0,o).concat(c.dest,!1===l?[]:a.slice(l)),r=!1!==n&&r+c.start.length,o=!1!==l&&o+c.dest.length}return this.value=i,this.destination=new SVG.PathArray,this.destination.value=a,this}})}(),
60679/*! svg.draggable.js - v2.2.2 - 2019-01-08
60680  * https://github.com/svgdotjs/svg.draggable.js
60681  
vendor: 18,146 bytes, lines 60681-60682
60681* Copyright (c) 2019 Wout Fierens; Licensed MIT */
60682function(){function t(t){t.remember("_draggable",this),this.el=t}t.prototype.init=function(t,e){var i=this;this.constraint=t,this.value=e,this.el.on("mousedown.drag",(function(t){i.start(t)})),this.el.on("touchstart.drag",(function(t){i.start(t)}))},t.prototype.transformPoint=function(t,e){var i=(t=t||window.event).changedTouches&&t.changedTouches[0]||t;return this.p.x=i.clientX-(e||0),this.p.y=i.clientY,this.p.matrixTransform(this.m)},t.prototype.getBBox=function(){var t=this.el.bbox();return this.el instanceof SVG.Nested&&(t=this.el.rbox()),(this.el instanceof SVG.G||this.el instanceof SVG.Use||this.el instanceof SVG.Nested)&&(t.x=this.el.x(),t.y=this.el.y()),t},t.prototype.start=function(t){if("click"!=t.type&&"mousedown"!=t.type&&"mousemove"!=t.type||1==(t.which||t.buttons)){var e=this;if(this.el.fire("beforedrag",{event:t,handler:this}),!this.el.event().defaultPrevented){t.preventDefault(),t.stopPropagation(),this.parent=this.parent||this.el.parent(SVG.Nested)||this.el.parent(SVG.Doc),this.p=this.parent.node.createSVGPoint(),this.m=this.el.node.getScreenCTM().inverse();var i,a=this.getBBox();if(this.el instanceof SVG.Text)switch(i=this.el.node.getComputedTextLength(),this.el.attr("text-anchor")){case"middle":i/=2;break;case"start":i=0}this.startPoints={point:this.transformPoint(t,i),box:a,transform:this.el.transform()},SVG.on(window,"mousemove.drag",(function(t){e.drag(t)})),SVG.on(window,"touchmove.drag",(function(t){e.drag(t)})),SVG.on(window,"mouseup.drag",(function(t){e.end(t)})),SVG.on(window,"touchend.drag",(function(t){e.end(t)})),this.el.fire("dragstart",{event:t,p:this.startPoints.point,m:this.m,handler:this})}}},t.prototype.drag=function(t){var e=this.getBBox(),i=this.transformPoint(t),a=this.startPoints.box.x+i.x-this.startPoints.point.x,s=this.startPoints.box.y+i.y-this.startPoints.point.y,r=this.constraint,o=i.x-this.startPoints.point.x,n=i.y-this.startPoints.point.y;if(this.el.fire("dragmove",{event:t,p:i,m:this.m,handler:this}),this.el.event().defaultPrevented)return i;if("function"==typeof r){var l=r.call(this.el,a,s,this.m);"boolean"==typeof l&&(l={x:l,y:l}),!0===l.x?this.el.x(a):!1!==l.x&&this.el.x(l.x),!0===l.y?this.el.y(s):!1!==l.y&&this.el.y(l.y)}else"object"==typeof r&&(null!=r.minX&&a<r.minX?o=(a=r.minX)-this.startPoints.box.x:null!=r.maxX&&a>r.maxX-e.width&&(o=(a=r.maxX-e.width)-this.startPoints.box.x),null!=r.minY&&s<r.minY?n=(s=r.minY)-this.startPoints.box.y:null!=r.maxY&&s>r.maxY-e.height&&(n=(s=r.maxY-e.height)-this.startPoints.box.y),null!=r.snapToGrid&&(a-=a%r.snapToGrid,s-=s%r.snapToGrid,o-=o%r.snapToGrid,n-=n%r.snapToGrid),this.el instanceof SVG.G?this.el.matrix(this.startPoints.transform).transform({x:o,y:n},!0):this.el.move(a,s));return i},t.prototype.end=function(t){var e=this.drag(t);this.el.fire("dragend",{event:t,p:e,m:this.m,handler:this}),SVG.off(window,"mousemove.drag"),SVG.off(window,"touchmove.drag"),SVG.off(window,"mouseup.drag"),SVG.off(window,"touchend.drag")},SVG.extend(SVG.Element,{draggable:function(e,i){"function"!=typeof e&&"object"!=typeof e||(i=e,e=!0);var a=this.remember("_draggable")||new t(this);return(e=void 0===e||e)?a.init(i||{},e):(this.off("mousedown.drag"),this.off("touchstart.drag")),this}})}.call(void 0),function(){function t(t){this.el=t,t.remember("_selectHandler",this),this.pointSelection={isSelected:!1},this.rectSelection={isSelected:!1},this.pointsList={lt:[0,0],rt:["width",0],rb:["width","height"],lb:[0,"height"],t:["width",0],r:["width","height"],b:["width","height"],l:[0,"height"]},this.pointCoord=function(t,e,i){var a="string"!=typeof t?t:e[t];return i?a/2:a},this.pointCoords=function(t,e){var i=this.pointsList[t];return{x:this.pointCoord(i[0],e,"t"===t||"b"===t),y:this.pointCoord(i[1],e,"r"===t||"l"===t)}}}t.prototype.init=function(t,e){var i=this.el.bbox();this.options={};var a=this.el.selectize.defaults.points;for(var s in this.el.selectize.defaults)this.options[s]=this.el.selectize.defaults[s],void 0!==e[s]&&(this.options[s]=e[s]);var r=["points","pointsExclude"];for(var s in r){var o=this.options[r[s]];"string"==typeof o?o=o.length>0?o.split(/\s*,\s*/i):[]:"boolean"==typeof o&&"points"===r[s]&&(o=o?a:[]),this.options[r[s]]=o}this.options.points=[a,this.options.points].reduce((function(t,e){return t.filter((function(t){return e.indexOf(t)>-1}))})),this.options.points=[this.options.points,this.options.pointsExclude].reduce((function(t,e){return t.filter((function(t){return e.indexOf(t)<0}))})),this.parent=this.el.parent(),this.nested=this.nested||this.parent.group(),this.nested.matrix(new SVG.Matrix(this.el).translate(i.x,i.y)),this.options.deepSelect&&-1!==["line","polyline","polygon"].indexOf(this.el.type)?this.selectPoints(t):this.selectRect(t),this.observe(),this.cleanup()},t.prototype.selectPoints=function(t){return this.pointSelection.isSelected=t,this.pointSelection.set||(this.pointSelection.set=this.parent.set(),this.drawPoints()),this},t.prototype.getPointArray=function(){var t=this.el.bbox();return this.el.array().valueOf().map((function(e){return[e[0]-t.x,e[1]-t.y]}))},t.prototype.drawPoints=function(){for(var t=this,e=this.getPointArray(),i=0,a=e.length;i<a;++i){var s=function(e){return function(i){(i=i||window.event).preventDefault?i.preventDefault():i.returnValue=!1,i.stopPropagation();var a=i.pageX||i.touches[0].pageX,s=i.pageY||i.touches[0].pageY;t.el.fire("point",{x:a,y:s,i:e,event:i})}}(i),r=this.drawPoint(e[i][0],e[i][1]).addClass(this.options.classPoints).addClass(this.options.classPoints+"_point").on("touchstart",s).on("mousedown",s);this.pointSelection.set.add(r)}},t.prototype.drawPoint=function(t,e){var i=this.options.pointType;switch(i){case"circle":return this.drawCircle(t,e);case"rect":return this.drawRect(t,e);default:if("function"==typeof i)return i.call(this,t,e);throw new Error("Unknown "+i+" point type!")}},t.prototype.drawCircle=function(t,e){return this.nested.circle(this.options.pointSize).center(t,e)},t.prototype.drawRect=function(t,e){return this.nested.rect(this.options.pointSize,this.options.pointSize).center(t,e)},t.prototype.updatePointSelection=function(){var t=this.getPointArray();this.pointSelection.set.each((function(e){this.cx()===t[e][0]&&this.cy()===t[e][1]||this.center(t[e][0],t[e][1])}))},t.prototype.updateRectSelection=function(){var t=this,e=this.el.bbox();if(this.rectSelection.set.get(0).attr({width:e.width,height:e.height}),this.options.points.length&&this.options.points.map((function(i,a){var s=t.pointCoords(i,e);t.rectSelection.set.get(a+1).center(s.x,s.y)})),this.options.rotationPoint){var i=this.rectSelection.set.length();this.rectSelection.set.get(i-1).center(e.width/2,20)}},t.prototype.selectRect=function(t){var e=this,i=this.el.bbox();function a(t){return function(i){(i=i||window.event).preventDefault?i.preventDefault():i.returnValue=!1,i.stopPropagation();var a=i.pageX||i.touches[0].pageX,s=i.pageY||i.touches[0].pageY;e.el.fire(t,{x:a,y:s,event:i})}}if(this.rectSelection.isSelected=t,this.rectSelection.set=this.rectSelection.set||this.parent.set(),this.rectSelection.set.get(0)||this.rectSelection.set.add(this.nested.rect(i.width,i.height).addClass(this.options.classRect)),this.options.points.length&&this.rectSelection.set.length()<2){this.options.points.map((function(t,s){var r=e.pointCoords(t,i),o=e.drawPoint(r.x,r.y).attr("class",e.options.classPoints+"_"+t).on("mousedown",a(t)).on("touchstart",a(t));e.rectSelection.set.add(o)})),this.rectSelection.set.each((function(){this.addClass(e.options.classPoints)}))}if(this.options.rotationPoint&&(this.options.points&&!this.rectSelection.set.get(9)||!this.options.points&&!this.rectSelection.set.get(1))){var s=function(t){(t=t||window.event).preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation();var i=t.pageX||t.touches[0].pageX,a=t.pageY||t.touches[0].pageY;e.el.fire("rot",{x:i,y:a,event:t})},r=this.drawPoint(i.width/2,20).attr("class",this.options.classPoints+"_rot").on("touchstart",s).on("mousedown",s);this.rectSelection.set.add(r)}},t.prototype.handler=function(){var t=this.el.bbox();this.nested.matrix(new SVG.Matrix(this.el).translate(t.x,t.y)),this.rectSelection.isSelected&&this.updateRectSelection(),this.pointSelection.isSelected&&this.updatePointSelection()},t.prototype.observe=function(){var t=this;if(MutationObserver)if(this.rectSelection.isSelected||this.pointSelection.isSelected)this.observerInst=this.observerInst||new MutationObserver((function(){t.handler()})),this.observerInst.observe(this.el.node,{attributes:!0});else try{this.observerInst.disconnect(),delete this.observerInst}catch(t){}else this.el.off("DOMAttrModified.select"),(this.rectSelection.isSelected||this.pointSelection.isSelected)&&this.el.on("DOMAttrModified.select",(function(){t.handler()}))},t.prototype.cleanup=function(){!this.rectSelection.isSelected&&this.rectSelection.set&&(this.rectSelection.set.each((function(){this.remove()})),this.rectSelection.set.clear(),delete this.rectSelection.set),!this.pointSelection.isSelected&&this.pointSelection.set&&(this.pointSelection.set.each((function(){this.remove()})),this.pointSelection.set.clear(),delete this.pointSelection.set),this.pointSelection.isSelected||this.rectSelection.isSelected||(this.nested.remove(),delete this.nested)},SVG.extend(SVG.Element,{selectize:function(e,i){return"object"==typeof e&&(i=e,e=!0),(this.remember("_selectHandler")||new t(this)).init(void 0===e||e,i||{}),this}}),SVG.Element.prototype.selectize.defaults={points:["lt","rt","rb","lb","t","r","b","l"],pointsExclude:[],classRect:"svg_select_boundingRect",classPoints:"svg_select_points",pointSize:7,rotationPoint:!0,deepSelect:!1,pointType:"circle"}}(),function(){(function(){function t(t){t.remember("_resizeHandler",this),this.el=t,this.parameters={},this.lastUpdateCall=null,this.p=t.doc().node.createSVGPoint()}t.prototype.transformPoint=function(t,e,i){return this.p.x=t-(this.offset.x-window.pageXOffset),this.p.y=e-(this.offset.y-window.pageYOffset),this.p.matrixTransform(i||this.m)},t.prototype._extractPosition=function(t){return{x:null!=t.clientX?t.clientX:t.touches[0].clientX,y:null!=t.clientY?t.clientY:t.touches[0].clientY}},t.prototype.init=function(t){var e=this;if(this.stop(),"stop"!==t){for(var i in this.options={},this.el.resize.defaults)this.options[i]=this.el.resize.defaults[i],void 0!==t[i]&&(this.options[i]=t[i]);this.el.on("lt.resize",(function(t){e.resize(t||window.event)})),this.el.on("rt.resize",(function(t){e.resize(t||window.event)})),this.el.on("rb.resize",(function(t){e.resize(t||window.event)})),this.el.on("lb.resize",(function(t){e.resize(t||window.event)})),this.el.on("t.resize",(function(t){e.resize(t||window.event)})),this.el.on("r.resize",(function(t){e.resize(t||window.event)})),this.el.on("b.resize",(function(t){e.resize(t||window.event)})),this.el.on("l.resize",(function(t){e.resize(t||window.event)})),this.el.on("rot.resize",(function(t){e.resize(t||window.event)})),this.el.on("point.resize",(function(t){e.resize(t||window.event)})),this.update()}},t.prototype.stop=function(){return this.el.off("lt.resize"),this.el.off("rt.resize"),this.el.off("rb.resize"),this.el.off("lb.resize"),this.el.off("t.resize"),this.el.off("r.resize"),this.el.off("b.resize"),this.el.off("l.resize"),this.el.off("rot.resize"),this.el.off("point.resize"),this},t.prototype.resize=function(t){var e=this;this.m=this.el.node.getScreenCTM().inverse(),this.offset={x:window.pageXOffset,y:window.pageYOffset};var i=this._extractPosition(t.detail.event);if(this.parameters={type:this.el.type,p:this.transformPoint(i.x,i.y),x:t.detail.x,y:t.detail.y,box:this.el.bbox(),rotation:this.el.transform().rotation},"text"===this.el.type&&(this.parameters.fontSize=this.el.attr()["font-size"]),void 0!==t.detail.i){var a=this.el.array().valueOf();this.parameters.i=t.detail.i,this.parameters.pointCoords=[a[t.detail.i][0],a[t.detail.i][1]]}switch(t.type){case"lt":this.calc=function(t,e){var i=this.snapToGrid(t,e);if(this.parameters.box.width-i[0]>0&&this.parameters.box.height-i[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x+i[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-i[0]);i=this.checkAspectRatio(i),this.el.move(this.parameters.box.x+i[0],this.parameters.box.y+i[1]).size(this.parameters.box.width-i[0],this.parameters.box.height-i[1])}};break;case"rt":this.calc=function(t,e){var i=this.snapToGrid(t,e,2);if(this.parameters.box.width+i[0]>0&&this.parameters.box.height-i[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x-i[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+i[0]);i=this.checkAspectRatio(i,!0),this.el.move(this.parameters.box.x,this.parameters.box.y+i[1]).size(this.parameters.box.width+i[0],this.parameters.box.height-i[1])}};break;case"rb":this.calc=function(t,e){var i=this.snapToGrid(t,e,0);if(this.parameters.box.width+i[0]>0&&this.parameters.box.height+i[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x-i[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+i[0]);i=this.checkAspectRatio(i),this.el.move(this.parameters.box.x,this.parameters.box.y).size(this.parameters.box.width+i[0],this.parameters.box.height+i[1])}};break;case"lb":this.calc=function(t,e){var i=this.snapToGrid(t,e,1);if(this.parameters.box.width-i[0]>0&&this.parameters.box.height+i[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x+i[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-i[0]);i=this.checkAspectRatio(i,!0),this.el.move(this.parameters.box.x+i[0],this.parameters.box.y).size(this.parameters.box.width-i[0],this.parameters.box.height+i[1])}};break;case"t":this.calc=function(t,e){var i=this.snapToGrid(t,e,2);if(this.parameters.box.height-i[1]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y+i[1]).height(this.parameters.box.height-i[1])}};break;case"r":this.calc=function(t,e){var i=this.snapToGrid(t,e,0);if(this.parameters.box.width+i[0]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y).width(this.parameters.box.width+i[0])}};break;case"b":this.calc=function(t,e){var i=this.snapToGrid(t,e,0);if(this.parameters.box.height+i[1]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y).height(this.parameters.box.height+i[1])}};break;case"l":this.calc=function(t,e){var i=this.snapToGrid(t,e,1);if(this.parameters.box.width-i[0]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x+i[0],this.parameters.box.y).width(this.parameters.box.width-i[0])}};break;case"rot":this.calc=function(t,e){var i=t+this.parameters.p.x,a=e+this.parameters.p.y,s=Math.atan2(this.parameters.p.y-this.parameters.box.y-this.parameters.box.height/2,this.parameters.p.x-this.parameters.box.x-this.parameters.box.width/2),r=Math.atan2(a-this.parameters.box.y-this.parameters.box.height/2,i-this.parameters.box.x-this.parameters.box.width/2),o=this.parameters.rotation+180*(r-s)/Math.PI+this.options.snapToAngle/2;this.el.center(this.parameters.box.cx,this.parameters.box.cy).rotate(o-o%this.options.snapToAngle,this.parameters.box.cx,this.parameters.box.cy)};break;case"point":this.calc=function(t,e){var i=this.snapToGrid(t,e,this.parameters.pointCoords[0],this.parameters.pointCoords[1]),a=this.el.array().valueOf();a[this.parameters.i][0]=this.parameters.pointCoords[0]+i[0],a[this.parameters.i][1]=this.parameters.pointCoords[1]+i[1],this.el.plot(a)}}this.el.fire("resizestart",{dx:this.parameters.x,dy:this.parameters.y,event:t}),SVG.on(window,"touchmove.resize",(function(t){e.update(t||window.event)})),SVG.on(window,"touchend.resize",(function(){e.done()})),SVG.on(window,"mousemove.resize",(function(t){e.update(t||window.event)})),SVG.on(window,"mouseup.resize",(function(){e.done()}))},t.prototype.update=function(t){if(t){var e=this._extractPosition(t),i=this.transformPoint(e.x,e.y),a=i.x-this.parameters.p.x,s=i.y-this.parameters.p.y;this.lastUpdateCall=[a,s],this.calc(a,s),this.el.fire("resizing",{dx:a,dy:s,event:t})}else this.lastUpdateCall&&this.calc(this.lastUpdateCall[0],this.lastUpdateCall[1])},t.prototype.done=function(){this.lastUpdateCall=null,SVG.off(window,"mousemove.resize"),SVG.off(window,"mouseup.resize"),SVG.off(window,"touchmove.resize"),SVG.off(window,"touchend.resize"),this.el.fire("resizedone")},t.prototype.snapToGrid=function(t,e,i,a){var s;return void 0!==a?s=[(i+t)%this.options.snapToGrid,(a+e)%this.options.snapToGrid]:(i=null==i?3:i,s=[(this.parameters.box.x+t+(1&i?0:this.parameters.box.width))%this.options.snapToGrid,(this.parameters.box.y+e+(2&i?0:this.parameters.box.height))%this.options.snapToGrid]),t<0&&(s[0]-=this.options.snapToGrid),e<0&&(s[1]-=this.options.snapToGrid),t-=Math.abs(s[0])<this.options.snapToGrid/2?s[0]:s[0]-(t<0?-this.options.snapToGrid:this.options.snapToGrid),e-=Math.abs(s[1])<this.options.snapToGrid/2?s[1]:s[1]-(e<0?-this.options.snapToGrid:this.options.snapToGrid),this.constraintToBox(t,e,i,a)},t.prototype.constraintToBox=function(t,e,i,a){var s,r,o=this.options.constraint||{};return void 0!==a?(s=i,r=a):(s=this.parameters.box.x+(1&i?0:this.parameters.box.width),r=this.parameters.box.y+(2&i?0:this.parameters.box.height)),void 0!==o.minX&&s+t<o.minX&&(t=o.minX-s),void 0!==o.maxX&&s+t>o.maxX&&(t=o.maxX-s),void 0!==o.minY&&r+e<o.minY&&(e=o.minY-r),void 0!==o.maxY&&r+e>o.maxY&&(e=o.maxY-r),[t,e]},t.prototype.checkAspectRatio=function(t,e){if(!this.options.saveAspectRatio)return t;var i=t.slice(),a=this.parameters.box.width/this.parameters.box.height,s=this.parameters.box.width+t[0],r=this.parameters.box.height-t[1],o=s/r;return o<a?(i[1]=s/a-this.parameters.box.height,e&&(i[1]=-i[1])):o>a&&(i[0]=this.parameters.box.width-r*a,e&&(i[0]=-i[0])),i},SVG.extend(SVG.Element,{resize:function(e){return(this.remember("_resizeHandler")||new t(this)).init(e||{}),this}}),SVG.Element.prototype.resize.defaults={snapToAngle:.1,snapToGrid:1,constraint:{},saveAspectRatio:!1}}).call(this)}()
60682;!function(t,e){void 0===e&&(e={});var i=e.insertAt;if(t&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===i&&a.firstChild?a.insertBefore(s,a.firstChild):a.appendChild(s),s.styleSheet?s.styleSheet.cssText=t:s.appendChild(document.createTextNode(t))}}('.apexcharts-canvas {\n  position: relative;\n  user-select: none;\n  /* cannot give overflow: hidden as it will crop tooltips which overflow outside chart area */\n}\n\n\n/* scrollbar is not visible by default for legend, hence forcing the visibility */\n.apexcharts-canvas ::-webkit-scrollbar {\n  -webkit-appearance: none;\n  width: 6px;\n}\n\n.apexcharts-canvas ::-webkit-scrollbar-thumb {\n  border-radius: 4px;\n  background-color: rgba(0, 0, 0, .5);\n  box-shadow: 0 0 1px rgba(255, 255, 255, .5);\n  -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5);\n}\n\n\n.apexcharts-inner {\n  position: relative;\n}\n\n.apexcharts-text tspan {\n  font-family: inherit;\n}\n\n.legend-mouseover-inactive {\n  transition: 0.15s ease all;\n  opacity: 0.20;\n}\n\n.apexcharts-series-collapsed {\n  opacity: 0;\n}\n\n.apexcharts-tooltip {\n  border-radius: 5px;\n  box-shadow: 2px 2px 6px -4px #999;\n  cursor: default;\n  font-size: 14px;\n  left: 62px;\n  opacity: 0;\n  pointer-events: none;\n  position: absolute;\n  top: 20px;\n  display: flex;\n  flex-direction: column;\n  overflow: hidden;\n  white-space: nowrap;\n  z-index: 12;\n  transition: 0.15s ease all;\n}\n\n.apexcharts-tooltip.apexcharts-active {\n  opacity: 1;\n  transition: 0.15s ease all;\n}\n\n.apexcharts-tooltip.apexcharts-theme-light {\n  border: 1px solid #e3e3e3;\n  background: rgba(255, 255, 255, 0.96);\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark {\n  color: #fff;\n  background: rgba(30, 30, 30, 0.8);\n}\n\n.apexcharts-tooltip * {\n  font-family: inherit;\n}\n\n\n.apexcharts-tooltip-title {\n  padding: 6px;\n  font-size: 15px;\n  margin-bottom: 4px;\n}\n\n.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {\n  background: #ECEFF1;\n  border-bottom: 1px solid #ddd;\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {\n  background: rgba(0, 0, 0, 0.7);\n  border-bottom: 1px solid #333;\n}\n\n.apexcharts-tooltip-text-y-value,\n.apexcharts-tooltip-text-goals-value,\n.apexcharts-tooltip-text-z-value {\n  display: inline-block;\n  font-weight: 600;\n  margin-left: 5px;\n}\n\n.apexcharts-tooltip-text-y-label:empty,\n.apexcharts-tooltip-text-y-value:empty,\n.apexcharts-tooltip-text-goals-label:empty,\n.apexcharts-tooltip-text-goals-value:empty,\n.apexcharts-tooltip-text-z-value:empty {\n  display: none;\n}\n\n.apexcharts-tooltip-text-y-value,\n.apexcharts-tooltip-text-goals-value,\n.apexcharts-tooltip-text-z-value {\n  font-weight: 600;\n}\n\n.apexcharts-tooltip-text-goals-label, \n.apexcharts-tooltip-text-goals-value {\n  padding: 6px 0 5px;\n}\n\n.apexcharts-tooltip-goals-group, \n.apexcharts-tooltip-text-goals-label, \n.apexcharts-tooltip-text-goals-value {\n  display: flex;\n}\n.apexcharts-tooltip-text-goals-label:not(:empty),\n.apexcharts-tooltip-text-goals-value:not(:empty) {\n  margin-top: -6px;\n}\n\n.apexcharts-tooltip-marker {\n  width: 12px;\n  height: 12px;\n  position: relative;\n  top: 0px;\n  margin-right: 10px;\n  border-radius: 50%;\n}\n\n.apexcharts-tooltip-series-group {\n  padding: 0 10px;\n  display: none;\n  text-align: left;\n  justify-content: left;\n  align-items: center;\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {\n  opacity: 1;\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active,\n.apexcharts-tooltip-series-group:last-child {\n  padding-bottom: 4px;\n}\n\n.apexcharts-tooltip-series-group-hidden {\n  opacity: 0;\n  height: 0;\n  line-height: 0;\n  padding: 0 !important;\n}\n\n.apexcharts-tooltip-y-group {\n  padding: 6px 0 5px;\n}\n\n.apexcharts-tooltip-box, .apexcharts-custom-tooltip {\n  padding: 4px 8px;\n}\n\n.apexcharts-tooltip-boxPlot {\n  display: flex;\n  flex-direction: column-reverse;\n}\n\n.apexcharts-tooltip-box>div {\n  margin: 4px 0;\n}\n\n.apexcharts-tooltip-box span.value {\n  font-weight: bold;\n}\n\n.apexcharts-tooltip-rangebar {\n  padding: 5px 8px;\n}\n\n.apexcharts-tooltip-rangebar .category {\n  font-weight: 600;\n  color: #777;\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n  font-weight: bold;\n  display: block;\n  margin-bottom: 5px;\n}\n\n.apexcharts-xaxistooltip {\n  opacity: 0;\n  padding: 9px 10px;\n  pointer-events: none;\n  color: #373d3f;\n  font-size: 13px;\n  text-align: center;\n  border-radius: 2px;\n  position: absolute;\n  z-index: 10;\n  background: #ECEFF1;\n  border: 1px solid #90A4AE;\n  transition: 0.15s ease all;\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n  background: rgba(0, 0, 0, 0.7);\n  border: 1px solid rgba(0, 0, 0, 0.5);\n  color: #fff;\n}\n\n.apexcharts-xaxistooltip:after,\n.apexcharts-xaxistooltip:before {\n  left: 50%;\n  border: solid transparent;\n  content: " ";\n  height: 0;\n  width: 0;\n  position: absolute;\n  pointer-events: none;\n}\n\n.apexcharts-xaxistooltip:after {\n  border-color: rgba(236, 239, 241, 0);\n  border-width: 6px;\n  margin-left: -6px;\n}\n\n.apexcharts-xaxistooltip:before {\n  border-color: rgba(144, 164, 174, 0);\n  border-width: 7px;\n  margin-left: -7px;\n}\n\n.apexcharts-xaxistooltip-bottom:after,\n.apexcharts-xaxistooltip-bottom:before {\n  bottom: 100%;\n}\n\n.apexcharts-xaxistooltip-top:after,\n.apexcharts-xaxistooltip-top:before {\n  top: 100%;\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n  border-bottom-color: #ECEFF1;\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n  border-bottom-color: #90A4AE;\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after {\n  border-bottom-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n  border-bottom-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip-top:after {\n  border-top-color: #ECEFF1\n}\n\n.apexcharts-xaxistooltip-top:before {\n  border-top-color: #90A4AE;\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after {\n  border-top-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n  border-top-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n  opacity: 1;\n  transition: 0.15s ease all;\n}\n\n.apexcharts-yaxistooltip {\n  opacity: 0;\n  padding: 4px 10px;\n  pointer-events: none;\n  color: #373d3f;\n  font-size: 13px;\n  text-align: center;\n  border-radius: 2px;\n  position: absolute;\n  z-index: 10;\n  background: #ECEFF1;\n  border: 1px solid #90A4AE;\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n  background: rgba(0, 0, 0, 0.7);\n  border: 1px solid rgba(0, 0, 0, 0.5);\n  color: #fff;\n}\n\n.apexcharts-yaxistooltip:after,\n.apexcharts-yaxistooltip:before {\n  top: 50%;\n  border: solid transparent;\n  content: " ";\n  height: 0;\n  width: 0;\n  position: absolute;\n  pointer-events: none;\n}\n\n.apexcharts-yaxistooltip:after {\n  border-color: rgba(236, 239, 241, 0);\n  border-width: 6px;\n  margin-top: -6px;\n}\n\n.apexcharts-yaxistooltip:before {\n  border-color: rgba(144, 164, 174, 0);\n  border-width: 7px;\n  margin-top: -7px;\n}\n\n.apexcharts-yaxistooltip-left:after,\n.apexcharts-yaxistooltip-left:before {\n  left: 100%;\n}\n\n.apexcharts-yaxistooltip-right:after,\n.apexcharts-yaxistooltip-right:before {\n  right: 100%;\n}\n\n.apexcharts-yaxistooltip-left:after {\n  border-left-color: #ECEFF1;\n}\n\n.apexcharts-yaxistooltip-left:before {\n  border-left-color: #90A4AE;\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after {\n  border-left-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n  border-left-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip-right:after {\n  border-right-color: #ECEFF1;\n}\n\n.apexcharts-yaxistooltip-right:before {\n  border-right-color: #90A4AE;\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after {\n  border-right-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n  border-right-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n  opacity: 1;\n}\n\n.apexcharts-yaxistooltip-hidden {\n  display: none;\n}
60682\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n  pointer-events: none;\n  opacity: 0;\n  transition: 0.15s ease all;\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n  opacity: 1;\n  transition: 0.15s ease all;\n}\n\n.apexcharts-ycrosshairs-hidden {\n  opacity: 0;\n}\n\n.apexcharts-selection-rect {\n  cursor: move;\n}\n\n.svg_select_boundingRect, .svg_select_points_rot {\n  pointer-events: none;\n  opacity: 0;\n  visibility: hidden;\n}\n.apexcharts-selection-rect + g .svg_select_boundingRect,\n.apexcharts-selection-rect + g .svg_select_points_rot {\n  opacity: 0;\n  visibility: hidden;\n}\n\n.apexcharts-selection-rect + g .svg_select_points_l,\n.apexcharts-selection-rect + g .svg_select_points_r {\n  cursor: ew-resize;\n  opacity: 1;\n  visibility: visible;\n}\n\n.svg_select_points {\n  fill: #efefef;\n  stroke: #333;\n  rx: 2;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n  cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n  cursor: move\n}\n\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon,\n.apexcharts-reset-icon,\n.apexcharts-pan-icon,\n.apexcharts-selection-icon,\n.apexcharts-menu-icon,\n.apexcharts-toolbar-custom-icon {\n  cursor: pointer;\n  width: 20px;\n  height: 20px;\n  line-height: 24px;\n  color: #6E8192;\n  text-align: center;\n}\n\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-menu-icon svg {\n  fill: #6E8192;\n}\n\n.apexcharts-selection-icon svg {\n  fill: #444;\n  transform: scale(0.76)\n}\n\n.apexcharts-theme-dark .apexcharts-zoom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomin-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomout-icon svg,\n.apexcharts-theme-dark .apexcharts-reset-icon svg,\n.apexcharts-theme-dark .apexcharts-pan-icon svg,\n.apexcharts-theme-dark .apexcharts-selection-icon svg,\n.apexcharts-theme-dark .apexcharts-menu-icon svg,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg {\n  fill: #f3f4f5;\n}\n\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg {\n  fill: #008FFB;\n}\n\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg,\n.apexcharts-theme-light .apexcharts-reset-icon:hover svg,\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg {\n  fill: #333;\n}\n\n.apexcharts-selection-icon,\n.apexcharts-menu-icon {\n  position: relative;\n}\n\n.apexcharts-reset-icon {\n  margin-left: 5px;\n}\n\n.apexcharts-zoom-icon,\n.apexcharts-reset-icon,\n.apexcharts-menu-icon {\n  transform: scale(0.85);\n}\n\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n  transform: scale(0.7)\n}\n\n.apexcharts-zoomout-icon {\n  margin-right: 3px;\n}\n\n.apexcharts-pan-icon {\n  transform: scale(0.62);\n  position: relative;\n  left: 1px;\n  top: 0px;\n}\n\n.apexcharts-pan-icon svg {\n  fill: #fff;\n  stroke: #6E8192;\n  stroke-width: 2;\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n  stroke: #008FFB;\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n  stroke: #333;\n}\n\n.apexcharts-toolbar {\n  position: absolute;\n  z-index: 11;\n  max-width: 176px;\n  text-align: right;\n  border-radius: 3px;\n  padding: 0px 6px 2px 6px;\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n}\n\n.apexcharts-menu {\n  background: #fff;\n  position: absolute;\n  top: 100%;\n  border: 1px solid #ddd;\n  border-radius: 3px;\n  padding: 3px;\n  right: 10px;\n  opacity: 0;\n  min-width: 110px;\n  transition: 0.15s ease all;\n  pointer-events: none;\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n  opacity: 1;\n  pointer-events: all;\n  transition: 0.15s ease all;\n}\n\n.apexcharts-menu-item {\n  padding: 6px 7px;\n  font-size: 12px;\n  cursor: pointer;\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n  background: #eee;\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n  background: rgba(0, 0, 0, 0.7);\n  color: #fff;\n}\n\n@media screen and (min-width: 768px) {\n  .apexcharts-canvas:hover .apexcharts-toolbar {\n    opacity: 1;\n  }\n}\n\n.apexcharts-datalabel.apexcharts-element-hidden {\n  opacity: 0;\n}\n\n.apexcharts-pie-label,\n.apexcharts-datalabels,\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value {\n  cursor: default;\n  pointer-events: none;\n}\n\n.apexcharts-pie-label-delay {\n  opacity: 0;\n  animation-name: opaque;\n  animation-duration: 0.3s;\n  animation-fill-mode: forwards;\n  animation-timing-function: ease;\n}\n\n.apexcharts-canvas .apexcharts-element-hidden {\n  opacity: 0;\n}\n\n.apexcharts-hide .apexcharts-series-points {\n  opacity: 0;\n}\n\n.apexcharts-gridline,\n.apexcharts-annotation-rect,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-line,\n.apexcharts-zoom-rect,\n.apexcharts-toolbar svg,\n.apexcharts-area-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,\n.apexcharts-line-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,\n.apexcharts-radar-series path,\n.apexcharts-radar-series polygon {\n  pointer-events: none;\n}\n\n\n/* markers */\n\n.apexcharts-marker {\n  transition: 0.15s ease all;\n}\n\n@keyframes opaque {\n  0% {\n    opacity: 0;\n  }\n  100% {\n    opacity: 1;\n  }\n}\n\n\n/* Resize generated styles */\n\n@keyframes resizeanim {\n  from {\n    opacity: 0;\n  }\n  to {\n    opacity: 0;\n  }\n}\n\n.resize-triggers {\n  animation: 1ms resizeanim;\n  visibility: hidden;\n  opacity: 0;\n}\n\n.resize-triggers,\n.resize-triggers>div,\n.contract-trigger:before {\n  content: " ";\n  display: block;\n  position: absolute;\n  top: 0;\n  left: 0;\n  height: 100%;\n  width: 100%;\n  overflow: hidden;\n}\n\n.resize-triggers>div {\n  background: #eee;\n  overflow: auto;\n}\n\n.contract-trigger:before {\n  width: 200%;\n  height: 200%;\n}'),function(){function t(t){var e=t.__resizeTriggers__,i=e.firstElementChild,a=e.lastElementChild,s=i?i.firstElementChild:null;a&&(a.scrollLeft=a.scrollWidth,a.scrollTop=a.scrollHeight),s&&(s.style.width=i.offsetWidth+1+"px",s.style.height=i.offsetHeight+1+"px"),i&&(i.scrollLeft=i.scrollWidth,i.scrollTop=i.scrollHeight)}function e(e){var i=this;t(this),this.__resizeRAF__&&r(this.__resizeRAF__),this.__resizeRAF__=s((function(){(function(t){return t.offsetWidth!=t.__resizeLast__.width||t.offsetHeight!=t.__resizeLast__.height})(i)&&(i.__resizeLast__.width=i.offsetWidth,i.__resizeLast__.height=i.offsetHeight,i.__resizeListeners__.forEach((function(t){t.call(e)})))}
60682))}var i,a,s=(i=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(t){return window.setTimeout(t,20)},function(t){return i(t)}),r=(a=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout,function(t){return a(t)}),o=!1,n="animationstart",l="Webkit Moz O ms".split(" "),h="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),c=document.createElement("fakeelement");if(void 0!==c.style.animationName&&(o=!0),!1===o)for(var d=0;d<l.length;d++)if(void 0!==c.style[l[d]+"AnimationName"]){n=h[d];break}window.addResizeListener=function(i,a){i.__resizeTriggers__||("static"==getComputedStyle(i).position&&(i.style.position="relative"),i.__resizeLast__={},i.__resizeListeners__=[],(i.__resizeTriggers__=document.createElement("div")).className="resize-triggers",i.__resizeTriggers__.innerHTML='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>',i.appendChild(i.__resizeTriggers__),t(i),i.addEventListener("scroll",e,!0),n&&i.__resizeTriggers__.addEventListener(n,(function(e){"resizeanim"==e.animationName&&t(i)}))),i.__resizeListeners__.push(a)},window.removeResizeListener=function(t,i){t&&(t.__resizeListeners__.splice(t.__resizeListeners__.indexOf(i),1),t.__resizeListeners__.length||(t.removeEventListener("scroll",e),t.__resizeTriggers__.parentNode&&(t.__resizeTriggers__=!t.removeChild(t.__resizeTriggers__))))}}(),void 0===window.Apex&&(window.Apex={});var Ft=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w}return a(t,[{key:"initModules",value:function(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend"],this.ctx.animations=new f(this.ctx),this.ctx.axes=new J(this.ctx),this.ctx.core=new Et(this.ctx.el,this.ctx),this.ctx.config=new H({}),this.ctx.data=new O(this.ctx),this.ctx.grid=new _(this.ctx),this.ctx.graphics=new b(this.ctx),this.ctx.coreUtils=new y(this.ctx),this.ctx.crosshairs=new Q(this.ctx),this.ctx.events=new Z(this.ctx),this.ctx.exports=new V(this.ctx),this.ctx.localization=new $(this.ctx),this.ctx.options=new S,this.ctx.responsive=new K(this.ctx),this.ctx.series=new z(this.ctx),this.ctx.theme=new tt(this.ctx),this.ctx.formatters=new W(this.ctx),this.ctx.titleSubtitle=new et(this.ctx),this.ctx.legend=new lt(this.ctx),this.ctx.toolbar=new ht(this.ctx),this.ctx.dimensions=new ot(this.ctx),this.ctx.updateHelpers=new Yt(this.ctx),this.ctx.zoomPanSelection=new ct(this.ctx),this.ctx.w.globals.tooltip=new bt(this.ctx)}}]),t}(),Rt=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w}return a(t,[{key:"clear",value:function(t){var e=t.isUpdating;this.ctx.zoomPanSelection&&this.ctx.zoomPanSelection.destroy(),this.ctx.toolbar&&this.ctx.toolbar.destroy(),this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx.zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx.toolbar=null,this.ctx.localization=null,this.ctx.w.globals.tooltip=null,this.clearDomElements({isUpdating:e})}},{key:"killSVG",value:function(t){t.each((function(t,e){this.removeClass("*"),this.off(),this.stop()}),!0),t.ungroup(),t.clear()}},{key:"clearDomElements",value:function(t){var e=this,i=t.isUpdating,a=this.w.globals.dom.Paper.node;a.parentNode&&a.parentNode.parentNode&&!i&&(a.parentNode.parentNode.style.minHeight="unset");var s=this.w.globals.dom.baseEl;s&&this.ctx.eventList.forEach((function(t){s.removeEventListener(t,e.ctx.events.documentEvent)}));var r=this.w.globals.dom;if(null!==this.ctx.el)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(r.Paper),r.Paper.remove(),r.elWrap=null,r.elGraphical=null,r.elAnnotations=null,r.elLegendWrap=null,r.baseEl=null,r.elGridRect=null,r.elGridRectMask=null,r.elGridRectMarkerMask=null,r.elForecastMask=null,r.elNonForecastMask=null,r.elDefs=null}}]),t}();return function(){function t(i,a){e(this,t),this.opts=a,this.ctx=this,this.w=new N(a).init(),this.el=i,this.w.globals.cuid=p.randomId(),this.w.globals.chartID=this.w.config.chart.id?p.escapeString(this.w.config.chart.id):this.w.globals.cuid,new Ft(this).initModules(),this.create=p.bind(this.create,this),this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this)}return a(t,[{key:"render",value:function(){var t=this;return new Promise((function(e,i){if(null!==t.el){void 0===Apex._chartInstances&&(Apex._chartInstances=[]),t.w.config.chart.id&&Apex._chartInstances.push({id:t.w.globals.chartID,group:t.w.config.chart.group,chart:t}),t.setLocale(t.w.config.chart.defaultLocale);var a=t.w.config.chart.events.beforeMount;"function"==typeof a&&a(t,t.w),t.events.fireEvent("beforeMount",[t,t.w]),window.addEventListener("resize",t.windowResizeHandler),window.addResizeListener(t.el.parentNode,t.parentResizeHandler);var s=t.create(t.w.config.series,{});if(!s)return e(t);t.mount(s).then((function(){"function"==typeof t.w.config.chart.events.mou
vendor: 4,313 bytes, line 60682
60682nted&&t.w.config.chart.events.mounted(t,t.w),t.events.fireEvent("mounted",[t,t.w]),e(s)})).catch((function(t){i(t)}))}else i(new Error("Element not found"))}))}},{key:"create",value:function(t,e){var i=this.w;new Ft(this).initModules();var a=this.w.globals;(a.noData=!1,a.animationEnded=!1,this.responsive.checkResponsiveConfig(e),i.config.xaxis.convertedCatToNumeric)&&new R(i.config).convertCatToNumericXaxis(i.config,this.ctx);if(null===this.el)return a.animationEnded=!0,null;if(this.core.setupElements(),"treemap"===i.config.chart.type&&(i.config.grid.show=!1,i.config.yaxis[0].show=!1),0===a.svgWidth)return a.animationEnded=!0,null;var s=y.checkComboSeries(t);a.comboCharts=s.comboCharts,a.comboBarCount=s.comboBarCount;var r=t.every((function(t){return t.data&&0===t.data.length}));(0===t.length||r)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(t),this.theme.init(),new P(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),a.noData&&a.collapsedSeries.length!==a.series.length&&!i.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),a.axisCharts&&(this.core.coreCalculations(),"category"!==i.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=i.globals.minX,this.ctx.toolbar.maxX=i.globals.maxX),this.formatters.heatmapLabelFormatters(),this.dimensions.plotCoords();var o=this.core.xySettings();this.grid.createGridMask();var n=this.core.plotChartType(t,o),l=new M(this);l.bringForward(),i.config.dataLabels.background.enabled&&l.dataLabelsBackground(),this.core.shiftGraphPosition();var h={plot:{left:i.globals.translateX,top:i.globals.translateY,width:i.globals.gridWidth,height:i.globals.gridHeight}};return{elGraph:n,xyRatios:o,elInner:i.globals.dom.elGraphical,dimensions:h}}},{key:"mount",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=this,a=i.w;return new Promise((function(s,r){if(null===i.el)return r(new Error("Not enough data to display or target element not found"));(null===e||a.globals.allSeriesCollapsed)&&i.series.handleNoData(),"treemap"!==a.config.chart.type&&i.axes.drawAxis(a.config.chart.type,e.xyRatios),i.grid=new _(i);var o=i.grid.drawGrid();i.annotations=new C(i),i.annotations.drawImageAnnos(),i.annotations.drawTextAnnos(),"back"===a.config.grid.position&&o&&a.globals.dom.elGraphical.add(o.el);var n=new G(t.ctx),l=new q(t.ctx);if(null!==o&&(n.xAxisLabelCorrections(o.xAxisTickWidth),l.setYAxisTextAlignments(),a.config.yaxis.map((function(t,e){-1===a.globals.ignoreYAxisIndexes.indexOf(e)&&l.yAxisTitleRotate(e,t.opposite)}))),"back"===a.config.annotations.position&&(a.globals.dom.Paper.add(a.globals.dom.elAnnotations),i.annotations.drawAxesAnnotations()),Array.isArray(e.elGraph))for(var h=0;h<e.elGraph.length;h++)a.globals.dom.elGraphical.add(e.elGraph[h]);else a.globals.dom.elGraphical.add(e.elGraph);if("front"===a.config.grid.position&&o&&a.globals.dom.elGraphical.add(o.el),"front"===a.config.xaxis.crosshairs.position&&i.crosshairs.drawXCrosshairs(),"front"===a.config.yaxis[0].crosshairs.position&&i.crosshairs.drawYCrosshairs(),"front"===a.config.annotations.position&&(a.globals.dom.Paper.add(a.globals.dom.elAnnotations),i.annotations.drawAxesAnnotations()),!a.globals.noData){if(a.config.tooltip.enabled&&!a.globals.noData&&i.w.globals.tooltip.drawTooltip(e.xyRatios),a.globals.axisCharts&&(a.globals.isXNumeric||a.config.xaxis.convertedCatToNumeric||a.globals.isTimelineBar))(a.config.chart.zoom.enabled||a.config.chart.selection&&a.config.chart.selection.enabled||a.config.chart.pan&&a.config.chart.pan.enabled)&&i.zoomPanSelection.init({xyRatios:e.xyRatios});else{var c=a.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach((function(t){c[t]=!1}))}a.config.chart.toolbar.show&&!a.globals.allSeriesCollapsed&&i.toolbar.createToolbar()}a.globals.memory.methodsToExec.length>0&&a.globals.memory.methodsToExec.forEach((function(t){t.method(t.params,!1,t.context)})),a.globals.axisCharts||a.globals.noData||i.core.resizeNonAxisCharts(),s(i)}))}},{key:"destroy",value:function(){window.removeEventListener("resize",this.windowResizeHandler),window.removeResizeListener(this.el.parentNode,this.parentResizeHandler);var t=this.w.config.chart.id;
vendor: 7,453 bytes, lines 60682-60709
60682t&&Apex._chartInstances.forEach((function(e,i){e.id===p.escapeString(t)&&Apex._chartInstances.splice(i,1)})),new Rt(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=this.w;return o.globals.selection=void 0,t.series&&(this.series.resetSeries(!1,!0,!1),t.series.length&&t.series[0].data&&(t.series=t.series.map((function(t,i){return e.updateHelpers._extendSeries(t,i)}))),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),o.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,i,a,s,r)}},{key:"updateSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,i)}},{key:"appendSeries",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w.config.series.slice();return a.push(t),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(a,e,i)}},{key:"appendData",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this;i.w.globals.dataChanged=!0,i.series.getPreviousPaths();for(var a=i.w.config.series.slice(),s=0;s<a.length;s++)if(null!==t[s]&&void 0!==t[s])for(var r=0;r<t[s].data.length;r++)a[s].data.push(t[s].data[r]);return i.w.config.series=a,e&&(i.w.globals.initialSeries=p.clone(i.w.config.series)),this.update()}},{key:"update",value:function(t){var e=this;return new Promise((function(i,a){new Rt(e.ctx).clear({isUpdating:!0});var s=e.create(e.w.config.series,t);if(!s)return i(e);e.mount(s).then((function(){"function"==typeof e.w.config.chart.events.updated&&e.w.config.chart.events.updated(e,e.w),e.events.fireEvent("updated",[e,e.w]),e.w.globals.isDirty=!0,i(e)})).catch((function(t){a(t)}))}))}},{key:"getSyncedCharts",value:function(){var t=this.getGroupedCharts(),e=[this];return t.length&&(e=[],t.forEach((function(t){e.push(t)}))),e}},{key:"getGroupedCharts",value:function(){var t=this;return Apex._chartInstances.filter((function(t){if(t.group)return!0})).map((function(e){return t.w.config.chart.group===e.group?e.chart:t}))}},{key:"toggleSeries",value:function(t){return this.series.toggleSeries(t)}},{key:"showSeries",value:function(t){this.series.showSeries(t)}},{key:"hideSeries",value:function(t){this.series.hideSeries(t)}},{key:"resetSeries",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.series.resetSeries(t,e)}},{key:"addEventListener",value:function(t,e){this.events.addEventListener(t,e)}},{key:"removeEventListener",value:function(t,e){this.events.removeEventListener(t,e)}},{key:"addXaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addXaxisAnnotationExternal(t,e,a)}},{key:"addYaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addYaxisAnnotationExternal(t,e,a)}},{key:"addPointAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addPointAnnotationExternal(t,e,a)}},{key:"clearAnnotations",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=this;t&&(e=t),e.annotations.clearAnnotations(e)}},{key:"removeAnnotation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=this;e&&(i=e),i.annotations.removeAnnotation(i,t)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}},{key:"getHighestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=new U(this.ctx);return e.getMinYMaxY(t).highestY}},{key:"getLowestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=new U(this.ctx);return e.getMinYMaxY(t).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(t,e){return this.updateHelpers.toggleDataPointSelection(t,e)}},{key:"zoomX",value:function(t,e){this.ctx.toolbar.zoomUpdateOptions(t,e)}},{key:"setLocale",value:function(t){this.localization.setCurrentLocaleValues(t)}},{key:"dataURI",value:function(t){return new V(this.ctx).dataURI(t)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var t=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout((function(){t.w.globals.resized=!0,t.w.globals.dataChanged=!1,t.ctx.update()}),150)}},{key:"_windowResizeHandler",value:function(){var t=this.w.config.chart.redrawOnWindowResize;"function"==typeof t&&(t=t()),t&&this._windowResize()}}],[{key:"getChartByID",value:function(t){var e=p.escapeString(t),i=Apex._chartInstances.filter((function(t){return t.id===e}))[0];return i&&i.chart}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),i=0;i<e.length;i++){new t(e[i],JSON.parse(e[i].getAttribute("data-options"))).render()}}},{key:"exec",value:function(t,e){var i=this.getChartByID(t);if(i){i.w.globals.isExecCalled=!0;var a=null;if(-1!==i.publicMethods.indexOf(e)){for(var s=arguments.length,r=new Array(s>2?s-2:0),o=2;o<s;o++)r[o-2]=arguments[o];a=i[e].apply(i,r)}return a}}},{key:"merge",value:function(t,e){return p.extend(t,e)}}]),t}()}));
60683
60684/*!
60685 * Chart.js v3.5.1
60686 * https://www.chartjs.org
60687 * (c) 2021 Chart.js Contributors
60688 * Released under the MIT License
60689 */
60690(function (global, factory) {
60691typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
60692typeof define === 'function' && define.amd ? define(factory) :
60693(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Chart = factory());
60694}(this, (function () { 'use strict';
60695
60696function fontString(pixelSize, fontStyle, fontFamily) {
60697  return fontStyle + ' ' + pixelSize + 'px ' + fontFamily;
60698}
60699const requestAnimFrame = (function() {
60700  if (typeof window === 'undefined') {
60701    return function(callback) {
60702      return callback();
60703    };
60704  }
60705  return window.requestAnimationFrame;
60706}());
60707function throttled(fn, thisArg, updateFn) {
60708  const updateArgs = updateFn || ((args) => Array.prototype.slice.call(args));
60709  let ticking = false;
vendor: 6,497 bytes, lines 60710-60973
60710  let args = [];
60711  return function(...rest) {
60712    args = updateArgs(rest);
60713    if (!ticking) {
60714      ticking = true;
60715      requestAnimFrame.call(window, () => {
60716        ticking = false;
60717        fn.apply(thisArg, args);
60718      });
60719    }
60720  };
60721}
60722function debounce(fn, delay) {
60723  let timeout;
60724  return function() {
60725    if (delay) {
60726      clearTimeout(timeout);
60727      timeout = setTimeout(fn, delay);
60728    } else {
60729      fn();
60730    }
60731    return delay;
60732  };
60733}
60734const _toLeftRightCenter = (align) => align === 'start' ? 'left' : align === 'end' ? 'right' : 'center';
60735const _alignStartEnd = (align, start, end) => align === 'start' ? start : align === 'end' ? end : (start + end) / 2;
60736const _textX = (align, left, right, rtl) => {
60737  const check = rtl ? 'left' : 'right';
60738  return align === check ? right : align === 'center' ? (left + right) / 2 : left;
60739};
60740
60741class Animator {
60742  constructor() {
60743    this._request = null;
60744    this._charts = new Map();
60745    this._running = false;
60746    this._lastDate = undefined;
60747  }
60748  _notify(chart, anims, date, type) {
60749    const callbacks = anims.listeners[type];
60750    const numSteps = anims.duration;
60751    callbacks.forEach(fn => fn({
60752      chart,
60753      initial: anims.initial,
60754      numSteps,
60755      currentStep: Math.min(date - anims.start, numSteps)
60756    }));
60757  }
60758  _refresh() {
60759    const me = this;
60760    if (me._request) {
60761      return;
60762    }
60763    me._running = true;
60764    me._request = requestAnimFrame.call(window, () => {
60765      me._update();
60766      me._request = null;
60767      if (me._running) {
60768        me._refresh();
60769      }
60770    });
60771  }
60772  _update(date = Date.now()) {
60773    const me = this;
60774    let remaining = 0;
60775    me._charts.forEach((anims, chart) => {
60776      if (!anims.running || !anims.items.length) {
60777        return;
60778      }
60779      const items = anims.items;
60780      let i = items.length - 1;
60781      let draw = false;
60782      let item;
60783      for (; i >= 0; --i) {
60784        item = items[i];
60785        if (item._active) {
60786          if (item._total > anims.duration) {
60787            anims.duration = item._total;
60788          }
60789          item.tick(date);
60790          draw = true;
60791        } else {
60792          items[i] = items[items.length - 1];
60793          items.pop();
60794        }
60795      }
60796      if (draw) {
60797        chart.draw();
60798        me._notify(chart, anims, date, 'progress');
60799      }
60800      if (!items.length) {
60801        anims.running = false;
60802        me._notify(chart, anims, date, 'complete');
60803        anims.initial = false;
60804      }
60805      remaining += items.length;
60806    });
60807    me._lastDate = date;
60808    if (remaining === 0) {
60809      me._running = false;
60810    }
60811  }
60812  _getAnims(chart) {
60813    const charts = this._charts;
60814    let anims = charts.get(chart);
60815    if (!anims) {
60816      anims = {
60817        running: false,
60818        initial: true,
60819        items: [],
60820        listeners: {
60821          complete: [],
60822          progress: []
60823        }
60824      };
60825      charts.set(chart, anims);
60826    }
60827    return anims;
60828  }
60829  listen(chart, event, cb) {
60830    this._getAnims(chart).listeners[event].push(cb);
60831  }
60832  add(chart, items) {
60833    if (!items || !items.length) {
60834      return;
60835    }
60836    this._getAnims(chart).items.push(...items);
60837  }
60838  has(chart) {
60839    return this._getAnims(chart).items.length > 0;
60840  }
60841  start(chart) {
60842    const anims = this._charts.get(chart);
60843    if (!anims) {
60844      return;
60845    }
60846    anims.running = true;
60847    anims.start = Date.now();
60848    anims.duration = anims.items.reduce((acc, cur) => Math.max(acc, cur._duration), 0);
60849    this._refresh();
60850  }
60851  running(chart) {
60852    if (!this._running) {
60853      return false;
60854    }
60855    const anims = this._charts.get(chart);
60856    if (!anims || !anims.running || !anims.items.length) {
60857      return false;
60858    }
60859    return true;
60860  }
60861  stop(chart) {
60862    const anims = this._charts.get(chart);
60863    if (!anims || !anims.items.length) {
60864      return;
60865    }
60866    const items = anims.items;
60867    let i = items.length - 1;
60868    for (; i >= 0; --i) {
60869      items[i].cancel();
60870    }
60871    anims.items = [];
60872    this._notify(chart, anims, Date.now(), 'complete');
60873  }
60874  remove(chart) {
60875    return this._charts.delete(chart);
60876  }
60877}
60878var animator = new Animator();
60879
60880/*!
60881 * @kurkle/color v0.1.9
60882 * https://github.com/kurkle/color#readme
60883 * (c) 2020 Jukka Kurkela
60884 * Released under the MIT License
60885 */
60886const map$1 = {0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, A: 10, B: 11, C: 12, D: 13, E: 14, F: 15, a: 10, b: 11, c: 12, d: 13, e: 14, f: 15};
60887const hex = '0123456789ABCDEF';
60888const h1 = (b) => hex[b & 0xF];
60889const h2 = (b) => hex[(b & 0xF0) >> 4] + hex[b & 0xF];
60890const eq = (b) => (((b & 0xF0) >> 4) === (b & 0xF));
60891function isShort(v) {
60892	return eq(v.r) && eq(v.g) && eq(v.b) && eq(v.a);
60893}
60894function hexParse(str) {
60895	var len = str.length;
60896	var ret;
60897	if (str[0] === '#') {
60898		if (len === 4 || len === 5) {
60899			ret = {
60900				r: 255 & map$1[str[1]] * 17,
60901				g: 255 & map$1[str[2]] * 17,
60902				b: 255 & map$1[str[3]] * 17,
60903				a: len === 5 ? map$1[str[4]] * 17 : 255
60904			};
60905		} else if (len === 7 || len === 9) {
60906			ret = {
60907				r: map$1[str[1]] << 4 | map$1[str[2]],
60908				g: map$1[str[3]] << 4 | map$1[str[4]],
60909				b: map$1[str[5]] << 4 | map$1[str[6]],
60910				a: len === 9 ? (map$1[str[7]] << 4 | map$1[str[8]]) : 255
60911			};
60912		}
60913	}
60914	return ret;
60915}
60916function hexString(v) {
60917	var f = isShort(v) ? h1 : h2;
60918	return v
60919		? '#' + f(v.r) + f(v.g) + f(v.b) + (v.a < 255 ? f(v.a) : '')
60920		: v;
60921}
60922function round(v) {
60923	return v + 0.5 | 0;
60924}
60925const lim = (v, l, h) => Math.max(Math.min(v, h), l);
60926function p2b(v) {
60927	return lim(round(v * 2.55), 0, 255);
60928}
60929function n2b(v) {
60930	return lim(round(v * 255), 0, 255);
60931}
60932function b2n(v) {
60933	return lim(round(v / 2.55) / 100, 0, 1);
60934}
60935function n2p(v) {
60936	return lim(round(v * 100), 0, 100);
60937}
60938const RGB_RE = /^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;
60939function rgbParse(str) {
60940	const m = RGB_RE.exec(str);
60941	let a = 255;
60942	let r, g, b;
60943	if (!m) {
60944		return;
60945	}
60946	if (m[7] !== r) {
60947		const v = +m[7];
60948		a = 255 & (m[8] ? p2b(v) : v * 255);
60949	}
60950	r = +m[1];
60951	g = +m[3];
60952	b = +m[5];
60953	r = 255 & (m[2] ? p2b(r) : r);
60954	g = 255 & (m[4] ? p2b(g) : g);
60955	b = 255 & (m[6] ? p2b(b) : b);
60956	return {
60957		r: r,
60958		g: g,
60959		b: b,
60960		a: a
60961	};
60962}
60963function rgbString(v) {
60964	return v && (
60965		v.a < 255
60966			? `rgba(${v.r}, ${v.g}, ${v.b}, ${b2n(v.a)})`
60967			: `rgb(${v.r}, ${v.g}, ${v.b})`
60968	);
60969}
60970const HUE_RE = /^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;
60971function hsl2rgbn(h, s, l) {
60972	const a = s * Math.min(l, 1 - l);
60973	const f = (n, k = (n + h / 30) % 12) =>
vendor: 5,222 bytes, lines 60973-61262
60973 l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);
60974	return [f(0), f(8), f(4)];
60975}
60976function hsv2rgbn(h, s, v) {
60977	const f = (n, k = (n + h / 60) % 6) => v - v * s * Math.max(Math.min(k, 4 - k, 1), 0);
60978	return [f(5), f(3), f(1)];
60979}
60980function hwb2rgbn(h, w, b) {
60981	const rgb = hsl2rgbn(h, 1, 0.5);
60982	let i;
60983	if (w + b > 1) {
60984		i = 1 / (w + b);
60985		w *= i;
60986		b *= i;
60987	}
60988	for (i = 0; i < 3; i++) {
60989		rgb[i] *= 1 - w - b;
60990		rgb[i] += w;
60991	}
60992	return rgb;
60993}
60994function rgb2hsl(v) {
60995	const range = 255;
60996	const r = v.r / range;
60997	const g = v.g / range;
60998	const b = v.b / range;
60999	const max = Math.max(r, g, b);
61000	const min = Math.min(r, g, b);
61001	const l = (max + min) / 2;
61002	let h, s, d;
61003	if (max !== min) {
61004		d = max - min;
61005		s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
61006		h = max === r
61007			? ((g - b) / d) + (g < b ? 6 : 0)
61008			: max === g
61009				? (b - r) / d + 2
61010				: (r - g) / d + 4;
61011		h = h * 60 + 0.5;
61012	}
61013	return [h | 0, s || 0, l];
61014}
61015function calln(f, a, b, c) {
61016	return (
61017		Array.isArray(a)
61018			? f(a[0], a[1], a[2])
61019			: f(a, b, c)
61020	).map(n2b);
61021}
61022function hsl2rgb(h, s, l) {
61023	return calln(hsl2rgbn, h, s, l);
61024}
61025function hwb2rgb(h, w, b) {
61026	return calln(hwb2rgbn, h, w, b);
61027}
61028function hsv2rgb(h, s, v) {
61029	return calln(hsv2rgbn, h, s, v);
61030}
61031function hue(h) {
61032	return (h % 360 + 360) % 360;
61033}
61034function hueParse(str) {
61035	const m = HUE_RE.exec(str);
61036	let a = 255;
61037	let v;
61038	if (!m) {
61039		return;
61040	}
61041	if (m[5] !== v) {
61042		a = m[6] ? p2b(+m[5]) : n2b(+m[5]);
61043	}
61044	const h = hue(+m[2]);
61045	const p1 = +m[3] / 100;
61046	const p2 = +m[4] / 100;
61047	if (m[1] === 'hwb') {
61048		v = hwb2rgb(h, p1, p2);
61049	} else if (m[1] === 'hsv') {
61050		v = hsv2rgb(h, p1, p2);
61051	} else {
61052		v = hsl2rgb(h, p1, p2);
61053	}
61054	return {
61055		r: v[0],
61056		g: v[1],
61057		b: v[2],
61058		a: a
61059	};
61060}
61061function rotate(v, deg) {
61062	var h = rgb2hsl(v);
61063	h[0] = hue(h[0] + deg);
61064	h = hsl2rgb(h);
61065	v.r = h[0];
61066	v.g = h[1];
61067	v.b = h[2];
61068}
61069function hslString(v) {
61070	if (!v) {
61071		return;
61072	}
61073	const a = rgb2hsl(v);
61074	const h = a[0];
61075	const s = n2p(a[1]);
61076	const l = n2p(a[2]);
61077	return v.a < 255
61078		? `hsla(${h}, ${s}%, ${l}%, ${b2n(v.a)})`
61079		: `hsl(${h}, ${s}%, ${l}%)`;
61080}
61081const map$1$1 = {
61082	x: 'dark',
61083	Z: 'light',
61084	Y: 're',
61085	X: 'blu',
61086	W: 'gr',
61087	V: 'medium',
61088	U: 'slate',
61089	A: 'ee',
61090	T: 'ol',
61091	S: 'or',
61092	B: 'ra',
61093	C: 'lateg',
61094	D: 'ights',
61095	R: 'in',
61096	Q: 'turquois',
61097	E: 'hi',
61098	P: 'ro',
61099	O: 'al',
61100	N: 'le',
61101	M: 'de',
61102	L: 'yello',
61103	F: 'en',
61104	K: 'ch',
61105	G: 'arks',
61106	H: 'ea',
61107	I: 'ightg',
61108	J: 'wh'
61109};
61110const names = {
61111	OiceXe: 'f0f8ff',
61112	antiquewEte: 'faebd7',
61113	aqua: 'ffff',
61114	aquamarRe: '7fffd4',
61115	azuY: 'f0ffff',
61116	beige: 'f5f5dc',
61117	bisque: 'ffe4c4',
61118	black: '0',
61119	blanKedOmond: 'ffebcd',
61120	Xe: 'ff',
61121	XeviTet: '8a2be2',
61122	bPwn: 'a52a2a',
61123	burlywood: 'deb887',
61124	caMtXe: '5f9ea0',
61125	KartYuse: '7fff00',
61126	KocTate: 'd2691e',
61127	cSO: 'ff7f50',
61128	cSnflowerXe: '6495ed',
61129	cSnsilk: 'fff8dc',
61130	crimson: 'dc143c',
61131	cyan: 'ffff',
61132	xXe: '8b',
61133	xcyan: '8b8b',
61134	xgTMnPd: 'b8860b',
61135	xWay: 'a9a9a9',
61136	xgYF: '6400',
61137	xgYy: 'a9a9a9',
61138	xkhaki: 'bdb76b',
61139	xmagFta: '8b008b',
61140	xTivegYF: '556b2f',
61141	xSange: 'ff8c00',
61142	xScEd: '9932cc',
61143	xYd: '8b0000',
61144	xsOmon: 'e9967a',
61145	xsHgYF: '8fbc8f',
61146	xUXe: '483d8b',
61147	xUWay: '2f4f4f',
61148	xUgYy: '2f4f4f',
61149	xQe: 'ced1',
61150	xviTet: '9400d3',
61151	dAppRk: 'ff1493',
61152	dApskyXe: 'bfff',
61153	dimWay: '696969',
61154	dimgYy: '696969',
61155	dodgerXe: '1e90ff',
61156	fiYbrick: 'b22222',
61157	flSOwEte: 'fffaf0',
61158	foYstWAn: '228b22',
61159	fuKsia: 'ff00ff',
61160	gaRsbSo: 'dcdcdc',
61161	ghostwEte: 'f8f8ff',
61162	gTd: 'ffd700',
61163	gTMnPd: 'daa520',
61164	Way: '808080',
61165	gYF: '8000',
61166	gYFLw: 'adff2f',
61167	gYy: '808080',
61168	honeyMw: 'f0fff0',
61169	hotpRk: 'ff69b4',
61170	RdianYd: 'cd5c5c',
61171	Rdigo: '4b0082',
61172	ivSy: 'fffff0',
61173	khaki: 'f0e68c',
61174	lavFMr: 'e6e6fa',
61175	lavFMrXsh: 'fff0f5',
61176	lawngYF: '7cfc00',
61177	NmoncEffon: 'fffacd',
61178	ZXe: 'add8e6',
61179	ZcSO: 'f08080',
61180	Zcyan: 'e0ffff',
61181	ZgTMnPdLw: 'fafad2',
61182	ZWay: 'd3d3d3',
61183	ZgYF: '90ee90',
61184	ZgYy: 'd3d3d3',
61185	ZpRk: 'ffb6c1',
61186	ZsOmon: 'ffa07a',
61187	ZsHgYF: '20b2aa',
61188	ZskyXe: '87cefa',
61189	ZUWay: '778899',
61190	ZUgYy: '778899',
61191	ZstAlXe: 'b0c4de',
61192	ZLw: 'ffffe0',
61193	lime: 'ff00',
61194	limegYF: '32cd32',
61195	lRF: 'faf0e6',
61196	magFta: 'ff00ff',
61197	maPon: '800000',
61198	VaquamarRe: '66cdaa',
61199	VXe: 'cd',
61200	VScEd: 'ba55d3',
61201	VpurpN: '9370db',
61202	VsHgYF: '3cb371',
61203	VUXe: '7b68ee',
61204	VsprRggYF: 'fa9a',
61205	VQe: '48d1cc',
61206	VviTetYd: 'c71585',
61207	midnightXe: '191970',
61208	mRtcYam: 'f5fffa',
61209	mistyPse: 'ffe4e1',
61210	moccasR: 'ffe4b5',
61211	navajowEte: 'ffdead',
61212	navy: '80',
61213	Tdlace: 'fdf5e6',
61214	Tive: '808000',
61215	TivedBb: '6b8e23',
61216	Sange: 'ffa500',
61217	SangeYd: 'ff4500',
61218	ScEd: 'da70d6',
61219	pOegTMnPd: 'eee8aa',
61220	pOegYF: '98fb98',
61221	pOeQe: 'afeeee',
61222	pOeviTetYd: 'db7093',
61223	papayawEp: 'ffefd5',
61224	pHKpuff: 'ffdab9',
61225	peru: 'cd853f',
61226	pRk: 'ffc0cb',
61227	plum: 'dda0dd',
61228	powMrXe: 'b0e0e6',
61229	purpN: '800080',
61230	YbeccapurpN: '663399',
61231	Yd: 'ff0000',
61232	Psybrown: 'bc8f8f',
61233	PyOXe: '4169e1',
61234	saddNbPwn: '8b4513',
61235	sOmon: 'fa8072',
61236	sandybPwn: 'f4a460',
61237	sHgYF: '2e8b57',
61238	sHshell: 'fff5ee',
61239	siFna: 'a0522d',
61240	silver: 'c0c0c0',
61241	skyXe: '87ceeb',
61242	UXe: '6a5acd',
61243	UWay: '708090',
61244	UgYy: '708090',
61245	snow: 'fffafa',
61246	sprRggYF: 'ff7f',
61247	stAlXe: '4682b4',
61248	tan: 'd2b48c',
61249	teO: '8080',
61250	tEstN: 'd8bfd8',
61251	tomato: 'ff6347',
61252	Qe: '40e0d0',
61253	viTet: 'ee82ee',
61254	JHt: 'f5deb3',
61255	wEte: 'ffffff',
61256	wEtesmoke: 'f5f5f5',
61257	Lw: 'ffff00',
61258	LwgYF: '9acd32'
61259};
61260function unpack() {
61261	const unpacked = {};
61262	const keys = Object.keys(names);
vendor: 31,903 bytes, lines 61263-62379
61263	const tkeys = Object.keys(map$1$1);
61264	let i, j, k, ok, nk;
61265	for (i = 0; i < keys.length; i++) {
61266		ok = nk = keys[i];
61267		for (j = 0; j < tkeys.length; j++) {
61268			k = tkeys[j];
61269			nk = nk.replace(k, map$1$1[k]);
61270		}
61271		k = parseInt(names[ok], 16);
61272		unpacked[nk] = [k >> 16 & 0xFF, k >> 8 & 0xFF, k & 0xFF];
61273	}
61274	return unpacked;
61275}
61276let names$1;
61277function nameParse(str) {
61278	if (!names$1) {
61279		names$1 = unpack();
61280		names$1.transparent = [0, 0, 0, 0];
61281	}
61282	const a = names$1[str.toLowerCase()];
61283	return a && {
61284		r: a[0],
61285		g: a[1],
61286		b: a[2],
61287		a: a.length === 4 ? a[3] : 255
61288	};
61289}
61290function modHSL(v, i, ratio) {
61291	if (v) {
61292		let tmp = rgb2hsl(v);
61293		tmp[i] = Math.max(0, Math.min(tmp[i] + tmp[i] * ratio, i === 0 ? 360 : 1));
61294		tmp = hsl2rgb(tmp);
61295		v.r = tmp[0];
61296		v.g = tmp[1];
61297		v.b = tmp[2];
61298	}
61299}
61300function clone$1(v, proto) {
61301	return v ? Object.assign(proto || {}, v) : v;
61302}
61303function fromObject(input) {
61304	var v = {r: 0, g: 0, b: 0, a: 255};
61305	if (Array.isArray(input)) {
61306		if (input.length >= 3) {
61307			v = {r: input[0], g: input[1], b: input[2], a: 255};
61308			if (input.length > 3) {
61309				v.a = n2b(input[3]);
61310			}
61311		}
61312	} else {
61313		v = clone$1(input, {r: 0, g: 0, b: 0, a: 1});
61314		v.a = n2b(v.a);
61315	}
61316	return v;
61317}
61318function functionParse(str) {
61319	if (str.charAt(0) === 'r') {
61320		return rgbParse(str);
61321	}
61322	return hueParse(str);
61323}
61324class Color {
61325	constructor(input) {
61326		if (input instanceof Color) {
61327			return input;
61328		}
61329		const type = typeof input;
61330		let v;
61331		if (type === 'object') {
61332			v = fromObject(input);
61333		} else if (type === 'string') {
61334			v = hexParse(input) || nameParse(input) || functionParse(input);
61335		}
61336		this._rgb = v;
61337		this._valid = !!v;
61338	}
61339	get valid() {
61340		return this._valid;
61341	}
61342	get rgb() {
61343		var v = clone$1(this._rgb);
61344		if (v) {
61345			v.a = b2n(v.a);
61346		}
61347		return v;
61348	}
61349	set rgb(obj) {
61350		this._rgb = fromObject(obj);
61351	}
61352	rgbString() {
61353		return this._valid ? rgbString(this._rgb) : this._rgb;
61354	}
61355	hexString() {
61356		return this._valid ? hexString(this._rgb) : this._rgb;
61357	}
61358	hslString() {
61359		return this._valid ? hslString(this._rgb) : this._rgb;
61360	}
61361	mix(color, weight) {
61362		const me = this;
61363		if (color) {
61364			const c1 = me.rgb;
61365			const c2 = color.rgb;
61366			let w2;
61367			const p = weight === w2 ? 0.5 : weight;
61368			const w = 2 * p - 1;
61369			const a = c1.a - c2.a;
61370			const w1 = ((w * a === -1 ? w : (w + a) / (1 + w * a)) + 1) / 2.0;
61371			w2 = 1 - w1;
61372			c1.r = 0xFF & w1 * c1.r + w2 * c2.r + 0.5;
61373			c1.g = 0xFF & w1 * c1.g + w2 * c2.g + 0.5;
61374			c1.b = 0xFF & w1 * c1.b + w2 * c2.b + 0.5;
61375			c1.a = p * c1.a + (1 - p) * c2.a;
61376			me.rgb = c1;
61377		}
61378		return me;
61379	}
61380	clone() {
61381		return new Color(this.rgb);
61382	}
61383	alpha(a) {
61384		this._rgb.a = n2b(a);
61385		return this;
61386	}
61387	clearer(ratio) {
61388		const rgb = this._rgb;
61389		rgb.a *= 1 - ratio;
61390		return this;
61391	}
61392	greyscale() {
61393		const rgb = this._rgb;
61394		const val = round(rgb.r * 0.3 + rgb.g * 0.59 + rgb.b * 0.11);
61395		rgb.r = rgb.g = rgb.b = val;
61396		return this;
61397	}
61398	opaquer(ratio) {
61399		const rgb = this._rgb;
61400		rgb.a *= 1 + ratio;
61401		return this;
61402	}
61403	negate() {
61404		const v = this._rgb;
61405		v.r = 255 - v.r;
61406		v.g = 255 - v.g;
61407		v.b = 255 - v.b;
61408		return this;
61409	}
61410	lighten(ratio) {
61411		modHSL(this._rgb, 2, ratio);
61412		return this;
61413	}
61414	darken(ratio) {
61415		modHSL(this._rgb, 2, -ratio);
61416		return this;
61417	}
61418	saturate(ratio) {
61419		modHSL(this._rgb, 1, ratio);
61420		return this;
61421	}
61422	desaturate(ratio) {
61423		modHSL(this._rgb, 1, -ratio);
61424		return this;
61425	}
61426	rotate(deg) {
61427		rotate(this._rgb, deg);
61428		return this;
61429	}
61430}
61431function index_esm(input) {
61432	return new Color(input);
61433}
61434
61435const isPatternOrGradient = (value) => value instanceof CanvasGradient || value instanceof CanvasPattern;
61436function color(value) {
61437  return isPatternOrGradient(value) ? value : index_esm(value);
61438}
61439function getHoverColor(value) {
61440  return isPatternOrGradient(value)
61441    ? value
61442    : index_esm(value).saturate(0.5).darken(0.1).hexString();
61443}
61444
61445function noop() {}
61446const uid = (function() {
61447  let id = 0;
61448  return function() {
61449    return id++;
61450  };
61451}());
61452function isNullOrUndef(value) {
61453  return value === null || typeof value === 'undefined';
61454}
61455function isArray(value) {
61456  if (Array.isArray && Array.isArray(value)) {
61457    return true;
61458  }
61459  const type = Object.prototype.toString.call(value);
61460  if (type.substr(0, 7) === '[object' && type.substr(-6) === 'Array]') {
61461    return true;
61462  }
61463  return false;
61464}
61465function isObject(value) {
61466  return value !== null && Object.prototype.toString.call(value) === '[object Object]';
61467}
61468const isNumberFinite = (value) => (typeof value === 'number' || value instanceof Number) && isFinite(+value);
61469function finiteOrDefault(value, defaultValue) {
61470  return isNumberFinite(value) ? value : defaultValue;
61471}
61472function valueOrDefault(value, defaultValue) {
61473  return typeof value === 'undefined' ? defaultValue : value;
61474}
61475const toPercentage = (value, dimension) =>
61476  typeof value === 'string' && value.endsWith('%') ?
61477    parseFloat(value) / 100
61478    : value / dimension;
61479const toDimension = (value, dimension) =>
61480  typeof value === 'string' && value.endsWith('%') ?
61481    parseFloat(value) / 100 * dimension
61482    : +value;
61483function callback(fn, args, thisArg) {
61484  if (fn && typeof fn.call === 'function') {
61485    return fn.apply(thisArg, args);
61486  }
61487}
61488function each(loopable, fn, thisArg, reverse) {
61489  let i, len, keys;
61490  if (isArray(loopable)) {
61491    len = loopable.length;
61492    if (reverse) {
61493      for (i = len - 1; i >= 0; i--) {
61494        fn.call(thisArg, loopable[i], i);
61495      }
61496    } else {
61497      for (i = 0; i < len; i++) {
61498        fn.call(thisArg, loopable[i], i);
61499      }
61500    }
61501  } else if (isObject(loopable)) {
61502    keys = Object.keys(loopable);
61503    len = keys.length;
61504    for (i = 0; i < len; i++) {
61505      fn.call(thisArg, loopable[keys[i]], keys[i]);
61506    }
61507  }
61508}
61509function _elementsEqual(a0, a1) {
61510  let i, ilen, v0, v1;
61511  if (!a0 || !a1 || a0.length !== a1.length) {
61512    return false;
61513  }
61514  for (i = 0, ilen = a0.length; i < ilen; ++i) {
61515    v0 = a0[i];
61516    v1 = a1[i];
61517    if (v0.datasetIndex !== v1.datasetIndex || v0.index !== v1.index) {
61518      return false;
61519    }
61520  }
61521  return true;
61522}
61523function clone(source) {
61524  if (isArray(source)) {
61525    return source.map(clone);
61526  }
61527  if (isObject(source)) {
61528    const target = Object.create(null);
61529    const keys = Object.keys(source);
61530    const klen = keys.length;
61531    let k = 0;
61532    for (; k < klen; ++k) {
61533      target[keys[k]] = clone(source[keys[k]]);
61534    }
61535    return target;
61536  }
61537  return source;
61538}
61539function isValidKey(key) {
61540  return ['__proto__', 'prototype', 'constructor'].indexOf(key) === -1;
61541}
61542function _merger(key, target, source, options) {
61543  if (!isValidKey(key)) {
61544    return;
61545  }
61546  const tval = target[key];
61547  const sval = source[key];
61548  if (isObject(tval) && isObject(sval)) {
61549    merge(tval, sval, options);
61550  } else {
61551    target[key] = clone(sval);
61552  }
61553}
61554function merge(target, source, options) {
61555  const sources = isArray(source) ? source : [source];
61556  const ilen = sources.length;
61557  if (!isObject(target)) {
61558    return target;
61559  }
61560  options = options || {};
61561  const merger = options.merger || _merger;
61562  for (let i = 0; i < ilen; ++i) {
61563    source = sources[i];
61564    if (!isObject(source)) {
61565      continue;
61566    }
61567    const keys = Object.keys(source);
61568    for (let k = 0, klen = keys.length; k < klen; ++k) {
61569      merger(keys[k], target, source, options);
61570    }
61571  }
61572  return target;
61573}
61574function mergeIf(target, source) {
61575  return merge(target, source, {merger: _mergerIf});
61576}
61577function _mergerIf(key, target, source) {
61578  if (!isValidKey(key)) {
61579    return;
61580  }
61581  const tval = target[key];
61582  const sval = source[key];
61583  if (isObject(tval) && isObject(sval)) {
61584    mergeIf(tval, sval);
61585  } else if (!Object.prototype.hasOwnProperty.call(target, key)) {
61586    target[key] = clone(sval);
61587  }
61588}
61589function _deprecated(scope, value, previous, current) {
61590  if (value !== undefined) {
61591    console.warn(scope + ': "' + previous +
61592			'" is deprecated. Please use "' + current + '" instead');
61593  }
61594}
61595const emptyString = '';
61596const dot = '.';
61597function indexOfDotOrLength(key, start) {
61598  const idx = key.indexOf(dot, start);
61599  return idx === -1 ? key.length : idx;
61600}
61601function resolveObjectKey(obj, key) {
61602  if (key === emptyString) {
61603    return obj;
61604  }
61605  let pos = 0;
61606  let idx = indexOfDotOrLength(key, pos);
61607  while (obj && idx > pos) {
61608    obj = obj[key.substr(pos, idx - pos)];
61609    pos = idx + 1;
61610    idx = indexOfDotOrLength(key, pos);
61611  }
61612  return obj;
61613}
61614function _capitalize(str) {
61615  return str.charAt(0).toUpperCase() + str.slice(1);
61616}
61617const defined = (value) => typeof value !== 'undefined';
61618const isFunction = (value) => typeof value === 'function';
61619const setsEqual = (a, b) => {
61620  if (a.size !== b.size) {
61621    return false;
61622  }
61623  for (const item of a) {
61624    if (!b.has(item)) {
61625      return false;
61626    }
61627  }
61628  return true;
61629};
61630
61631const overrides = Object.create(null);
61632const descriptors = Object.create(null);
61633function getScope$1(node, key) {
61634  if (!key) {
61635    return node;
61636  }
61637  const keys = key.split('.');
61638  for (let i = 0, n = keys.length; i < n; ++i) {
61639    const k = keys[i];
61640    node = node[k] || (node[k] = Object.create(null));
61641  }
61642  return node;
61643}
61644function set(root, scope, values) {
61645  if (typeof scope === 'string') {
61646    return merge(getScope$1(root, scope), values);
61647  }
61648  return merge(getScope$1(root, ''), scope);
61649}
61650class Defaults {
61651  constructor(_descriptors) {
61652    this.animation = undefined;
61653    this.backgroundColor = 'rgba(0,0,0,0.1)';
61654    this.borderColor = 'rgba(0,0,0,0.1)';
61655    this.color = '#666';
61656    this.datasets = {};
61657    this.devicePixelRatio = (context) => context.chart.platform.getDevicePixelRatio();
61658    this.elements = {};
61659    this.events = [
61660      'mousemove',
61661      'mouseout',
61662      'click',
61663      'touchstart',
61664      'touchmove'
61665    ];
61666    this.font = {
61667      family: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
61668      size: 12,
61669      style: 'normal',
61670      lineHeight: 1.2,
61671      weight: null
61672    };
61673    this.hover = {};
61674    this.hoverBackgroundColor = (ctx, options) => getHoverColor(options.backgroundColor);
61675    this.hoverBorderColor = (ctx, options) => getHoverColor(options.borderColor);
61676    this.hoverColor = (ctx, options) => getHoverColor(options.color);
61677    this.indexAxis = 'x';
61678    this.interaction = {
61679      mode: 'nearest',
61680      intersect: true
61681    };
61682    this.maintainAspectRatio = true;
61683    this.onHover = null;
61684    this.onClick = null;
61685    this.parsing = true;
61686    this.plugins = {};
61687    this.responsive = true;
61688    this.scale = undefined;
61689    this.scales = {};
61690    this.showLine = true;
61691    this.describe(_descriptors);
61692  }
61693  set(scope, values) {
61694    return set(this, scope, values);
61695  }
61696  get(scope) {
61697    return getScope$1(this, scope);
61698  }
61699  describe(scope, values) {
61700    return set(descriptors, scope, values);
61701  }
61702  override(scope, values) {
61703    return set(overrides, scope, values);
61704  }
61705  route(scope, name, targetScope, targetName) {
61706    const scopeObject = getScope$1(this, scope);
61707    const targetScopeObject = getScope$1(this, targetScope);
61708    const privateName = '_' + name;
61709    Object.defineProperties(scopeObject, {
61710      [privateName]: {
61711        value: scopeObject[name],
61712        writable: true
61713      },
61714      [name]: {
61715        enumerable: true,
61716        get() {
61717          const local = this[privateName];
61718          const target = targetScopeObject[targetName];
61719          if (isObject(local)) {
61720            return Object.assign({}, target, local);
61721          }
61722          return valueOrDefault(local, target);
61723        },
61724        set(value) {
61725          this[privateName] = value;
61726        }
61727      }
61728    });
61729  }
61730}
61731var defaults = new Defaults({
61732  _scriptable: (name) => !name.startsWith('on'),
61733  _indexable: (name) => name !== 'events',
61734  hover: {
61735    _fallback: 'interaction'
61736  },
61737  interaction: {
61738    _scriptable: false,
61739    _indexable: false,
61740  }
61741});
61742
61743const PI = Math.PI;
61744const TAU = 2 * PI;
61745const PITAU = TAU + PI;
61746const INFINITY = Number.POSITIVE_INFINITY;
61747const RAD_PER_DEG = PI / 180;
61748const HALF_PI = PI / 2;
61749const QUARTER_PI = PI / 4;
61750const TWO_THIRDS_PI = PI * 2 / 3;
61751const log10 = Math.log10;
61752const sign = Math.sign;
61753function niceNum(range) {
61754  const roundedRange = Math.round(range);
61755  range = almostEquals(range, roundedRange, range / 1000) ? roundedRange : range;
61756  const niceRange = Math.pow(10, Math.floor(log10(range)));
61757  const fraction = range / niceRange;
61758  const niceFraction = fraction <= 1 ? 1 : fraction <= 2 ? 2 : fraction <= 5 ? 5 : 10;
61759  return niceFraction * niceRange;
61760}
61761function _factorize(value) {
61762  const result = [];
61763  const sqrt = Math.sqrt(value);
61764  let i;
61765  for (i = 1; i < sqrt; i++) {
61766    if (value % i === 0) {
61767      result.push(i);
61768      result.push(value / i);
61769    }
61770  }
61771  if (sqrt === (sqrt | 0)) {
61772    result.push(sqrt);
61773  }
61774  result.sort((a, b) => a - b).pop();
61775  return result;
61776}
61777function isNumber(n) {
61778  return !isNaN(parseFloat(n)) && isFinite(n);
61779}
61780function almostEquals(x, y, epsilon) {
61781  return Math.abs(x - y) < epsilon;
61782}
61783function almostWhole(x, epsilon) {
61784  const rounded = Math.round(x);
61785  return ((rounded - epsilon) <= x) && ((rounded + epsilon) >= x);
61786}
61787function _setMinAndMaxByKey(array, target, property) {
61788  let i, ilen, value;
61789  for (i = 0, ilen = array.length; i < ilen; i++) {
61790    value = array[i][property];
61791    if (!isNaN(value)) {
61792      target.min = Math.min(target.min, value);
61793      target.max = Math.max(target.max, value);
61794    }
61795  }
61796}
61797function toRadians(degrees) {
61798  return degrees * (PI / 180);
61799}
61800function toDegrees(radians) {
61801  return radians * (180 / PI);
61802}
61803function _decimalPlaces(x) {
61804  if (!isNumberFinite(x)) {
61805    return;
61806  }
61807  let e = 1;
61808  let p = 0;
61809  while (Math.round(x * e) / e !== x) {
61810    e *= 10;
61811    p++;
61812  }
61813  return p;
61814}
61815function getAngleFromPoint(centrePoint, anglePoint) {
61816  const distanceFromXCenter = anglePoint.x - centrePoint.x;
61817  const distanceFromYCenter = anglePoint.y - centrePoint.y;
61818  const radialDistanceFromCenter = Math.sqrt(distanceFromXCenter * distanceFromXCenter + distanceFromYCenter * distanceFromYCenter);
61819  let angle = Math.atan2(distanceFromYCenter, distanceFromXCenter);
61820  if (angle < (-0.5 * PI)) {
61821    angle += TAU;
61822  }
61823  return {
61824    angle,
61825    distance: radialDistanceFromCenter
61826  };
61827}
61828function distanceBetweenPoints(pt1, pt2) {
61829  return Math.sqrt(Math.pow(pt2.x - pt1.x, 2) + Math.pow(pt2.y - pt1.y, 2));
61830}
61831function _angleDiff(a, b) {
61832  return (a - b + PITAU) % TAU - PI;
61833}
61834function _normalizeAngle(a) {
61835  return (a % TAU + TAU) % TAU;
61836}
61837function _angleBetween(angle, start, end, sameAngleIsFullCircle) {
61838  const a = _normalizeAngle(angle);
61839  const s = _normalizeAngle(start);
61840  const e = _normalizeAngle(end);
61841  const angleToStart = _normalizeAngle(s - a);
61842  const angleToEnd = _normalizeAngle(e - a);
61843  const startToAngle = _normalizeAngle(a - s);
61844  const endToAngle = _normalizeAngle(a - e);
61845  return a === s || a === e || (sameAngleIsFullCircle && s === e)
61846    || (angleToStart > angleToEnd && startToAngle < endToAngle);
61847}
61848function _limitValue(value, min, max) {
61849  return Math.max(min, Math.min(max, value));
61850}
61851function _int16Range(value) {
61852  return _limitValue(value, -32768, 32767);
61853}
61854
61855function toFontString(font) {
61856  if (!font || isNullOrUndef(font.size) || isNullOrUndef(font.family)) {
61857    return null;
61858  }
61859  return (font.style ? font.style + ' ' : '')
61860		+ (font.weight ? font.weight + ' ' : '')
61861		+ font.size + 'px '
61862		+ font.family;
61863}
61864function _measureText(ctx, data, gc, longest, string) {
61865  let textWidth = data[string];
61866  if (!textWidth) {
61867    textWidth = data[string] = ctx.measureText(string).width;
61868    gc.push(string);
61869  }
61870  if (textWidth > longest) {
61871    longest = textWidth;
61872  }
61873  return longest;
61874}
61875function _longestText(ctx, font, arrayOfThings, cache) {
61876  cache = cache || {};
61877  let data = cache.data = cache.data || {};
61878  let gc = cache.garbageCollect = cache.garbageCollect || [];
61879  if (cache.font !== font) {
61880    data = cache.data = {};
61881    gc = cache.garbageCollect = [];
61882    cache.font = font;
61883  }
61884  ctx.save();
61885  ctx.font = font;
61886  let longest = 0;
61887  const ilen = arrayOfThings.length;
61888  let i, j, jlen, thing, nestedThing;
61889  for (i = 0; i < ilen; i++) {
61890    thing = arrayOfThings[i];
61891    if (thing !== undefined && thing !== null && isArray(thing) !== true) {
61892      longest = _measureText(ctx, data, gc, longest, thing);
61893    } else if (isArray(thing)) {
61894      for (j = 0, jlen = thing.length; j < jlen; j++) {
61895        nestedThing = thing[j];
61896        if (nestedThing !== undefined && nestedThing !== null && !isArray(nestedThing)) {
61897          longest = _measureText(ctx, data, gc, longest, nestedThing);
61898        }
61899      }
61900    }
61901  }
61902  ctx.restore();
61903  const gcLen = gc.length / 2;
61904  if (gcLen > arrayOfThings.length) {
61905    for (i = 0; i < gcLen; i++) {
61906      delete data[gc[i]];
61907    }
61908    gc.splice(0, gcLen);
61909  }
61910  return longest;
61911}
61912function _alignPixel(chart, pixel, width) {
61913  const devicePixelRatio = chart.currentDevicePixelRatio;
61914  const halfWidth = width !== 0 ? Math.max(width / 2, 0.5) : 0;
61915  return Math.round((pixel - halfWidth) * devicePixelRatio) / devicePixelRatio + halfWidth;
61916}
61917function clearCanvas(canvas, ctx) {
61918  ctx = ctx || canvas.getContext('2d');
61919  ctx.save();
61920  ctx.resetTransform();
61921  ctx.clearRect(0, 0, canvas.width, canvas.height);
61922  ctx.restore();
61923}
61924function drawPoint(ctx, options, x, y) {
61925  let type, xOffset, yOffset, size, cornerRadius;
61926  const style = options.pointStyle;
61927  const rotation = options.rotation;
61928  const radius = options.radius;
61929  let rad = (rotation || 0) * RAD_PER_DEG;
61930  if (style && typeof style === 'object') {
61931    type = style.toString();
61932    if (type === '[object HTMLImageElement]' || type === '[object HTMLCanvasElement]') {
61933      ctx.save();
61934      ctx.translate(x, y);
61935      ctx.rotate(rad);
61936      ctx.drawImage(style, -style.width / 2, -style.height / 2, style.width, style.height);
61937      ctx.restore();
61938      return;
61939    }
61940  }
61941  if (isNaN(radius) || radius <= 0) {
61942    return;
61943  }
61944  ctx.beginPath();
61945  switch (style) {
61946  default:
61947    ctx.arc(x, y, radius, 0, TAU);
61948    ctx.closePath();
61949    break;
61950  case 'triangle':
61951    ctx.moveTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);
61952    rad += TWO_THIRDS_PI;
61953    ctx.lineTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);
61954    rad += TWO_THIRDS_PI;
61955    ctx.lineTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);
61956    ctx.closePath();
61957    break;
61958  case 'rectRounded':
61959    cornerRadius = radius * 0.516;
61960    size = radius - cornerRadius;
61961    xOffset = Math.cos(rad + QUARTER_PI) * size;
61962    yOffset = Math.sin(rad + QUARTER_PI) * size;
61963    ctx.arc(x - xOffset, y - yOffset, cornerRadius, rad - PI, rad - HALF_PI);
61964    ctx.arc(x + yOffset, y - xOffset, cornerRadius, rad - HALF_PI, rad);
61965    ctx.arc(x + xOffset, y + yOffset, cornerRadius, rad, rad + HALF_PI);
61966    ctx.arc(x - yOffset, y + xOffset, cornerRadius, rad + HALF_PI, rad + PI);
61967    ctx.closePath();
61968    break;
61969  case 'rect':
61970    if (!rotation) {
61971      size = Math.SQRT1_2 * radius;
61972      ctx.rect(x - size, y - size, 2 * size, 2 * size);
61973      break;
61974    }
61975    rad += QUARTER_PI;
61976  case 'rectRot':
61977    xOffset = Math.cos(rad) * radius;
61978    yOffset = Math.sin(rad) * radius;
61979    ctx.moveTo(x - xOffset, y - yOffset);
61980    ctx.lineTo(x + yOffset, y - xOffset);
61981    ctx.lineTo(x + xOffset, y + yOffset);
61982    ctx.lineTo(x - yOffset, y + xOffset);
61983    ctx.closePath();
61984    break;
61985  case 'crossRot':
61986    rad += QUARTER_PI;
61987  case 'cross':
61988    xOffset = Math.cos(rad) * radius;
61989    yOffset = Math.sin(rad) * radius;
61990    ctx.moveTo(x - xOffset, y - yOffset);
61991    ctx.lineTo(x + xOffset, y + yOffset);
61992    ctx.moveTo(x + yOffset, y - xOffset);
61993    ctx.lineTo(x - yOffset, y + xOffset);
61994    break;
61995  case 'star':
61996    xOffset = Math.cos(rad) * radius;
61997    yOffset = Math.sin(rad) * radius;
61998    ctx.moveTo(x - xOffset, y - yOffset);
61999    ctx.lineTo(x + xOffset, y + yOffset);
62000    ctx.moveTo(x + yOffset, y - xOffset);
62001    ctx.lineTo(x - yOffset, y + xOffset);
62002    rad += QUARTER_PI;
62003    xOffset = Math.cos(rad) * radius;
62004    yOffset = Math.sin(rad) * radius;
62005    ctx.moveTo(x - xOffset, y - yOffset);
62006    ctx.lineTo(x + xOffset, y + yOffset);
62007    ctx.moveTo(x + yOffset, y - xOffset);
62008    ctx.lineTo(x - yOffset, y + xOffset);
62009    break;
62010  case 'line':
62011    xOffset = Math.cos(rad) * radius;
62012    yOffset = Math.sin(rad) * radius;
62013    ctx.moveTo(x - xOffset, y - yOffset);
62014    ctx.lineTo(x + xOffset, y + yOffset);
62015    break;
62016  case 'dash':
62017    ctx.moveTo(x, y);
62018    ctx.lineTo(x + Math.cos(rad) * radius, y + Math.sin(rad) * radius);
62019    break;
62020  }
62021  ctx.fill();
62022  if (options.borderWidth > 0) {
62023    ctx.stroke();
62024  }
62025}
62026function _isPointInArea(point, area, margin) {
62027  margin = margin || 0.5;
62028  return !area || (point && point.x > area.left - margin && point.x < area.right + margin &&
62029		point.y > area.top - margin && point.y < area.bottom + margin);
62030}
62031function clipArea(ctx, area) {
62032  ctx.save();
62033  ctx.beginPath();
62034  ctx.rect(area.left, area.top, area.right - area.left, area.bottom - area.top);
62035  ctx.clip();
62036}
62037function unclipArea(ctx) {
62038  ctx.restore();
62039}
62040function _steppedLineTo(ctx, previous, target, flip, mode) {
62041  if (!previous) {
62042    return ctx.lineTo(target.x, target.y);
62043  }
62044  if (mode === 'middle') {
62045    const midpoint = (previous.x + target.x) / 2.0;
62046    ctx.lineTo(midpoint, previous.y);
62047    ctx.lineTo(midpoint, target.y);
62048  } else if (mode === 'after' !== !!flip) {
62049    ctx.lineTo(previous.x, target.y);
62050  } else {
62051    ctx.lineTo(target.x, previous.y);
62052  }
62053  ctx.lineTo(target.x, target.y);
62054}
62055function _bezierCurveTo(ctx, previous, target, flip) {
62056  if (!previous) {
62057    return ctx.lineTo(target.x, target.y);
62058  }
62059  ctx.bezierCurveTo(
62060    flip ? previous.cp1x : previous.cp2x,
62061    flip ? previous.cp1y : previous.cp2y,
62062    flip ? target.cp2x : target.cp1x,
62063    flip ? target.cp2y : target.cp1y,
62064    target.x,
62065    target.y);
62066}
62067function renderText(ctx, text, x, y, font, opts = {}) {
62068  const lines = isArray(text) ? text : [text];
62069  const stroke = opts.strokeWidth > 0 && opts.strokeColor !== '';
62070  let i, line;
62071  ctx.save();
62072  ctx.font = font.string;
62073  setRenderOpts(ctx, opts);
62074  for (i = 0; i < lines.length; ++i) {
62075    line = lines[i];
62076    if (stroke) {
62077      if (opts.strokeColor) {
62078        ctx.strokeStyle = opts.strokeColor;
62079      }
62080      if (!isNullOrUndef(opts.strokeWidth)) {
62081        ctx.lineWidth = opts.strokeWidth;
62082      }
62083      ctx.strokeText(line, x, y, opts.maxWidth);
62084    }
62085    ctx.fillText(line, x, y, opts.maxWidth);
62086    decorateText(ctx, x, y, line, opts);
62087    y += font.lineHeight;
62088  }
62089  ctx.restore();
62090}
62091function setRenderOpts(ctx, opts) {
62092  if (opts.translation) {
62093    ctx.translate(opts.translation[0], opts.translation[1]);
62094  }
62095  if (!isNullOrUndef(opts.rotation)) {
62096    ctx.rotate(opts.rotation);
62097  }
62098  if (opts.color) {
62099    ctx.fillStyle = opts.color;
62100  }
62101  if (opts.textAlign) {
62102    ctx.textAlign = opts.textAlign;
62103  }
62104  if (opts.textBaseline) {
62105    ctx.textBaseline = opts.textBaseline;
62106  }
62107}
62108function decorateText(ctx, x, y, line, opts) {
62109  if (opts.strikethrough || opts.underline) {
62110    const metrics = ctx.measureText(line);
62111    const left = x - metrics.actualBoundingBoxLeft;
62112    const right = x + metrics.actualBoundingBoxRight;
62113    const top = y - metrics.actualBoundingBoxAscent;
62114    const bottom = y + metrics.actualBoundingBoxDescent;
62115    const yDecoration = opts.strikethrough ? (top + bottom) / 2 : bottom;
62116    ctx.strokeStyle = ctx.fillStyle;
62117    ctx.beginPath();
62118    ctx.lineWidth = opts.decorationWidth || 2;
62119    ctx.moveTo(left, yDecoration);
62120    ctx.lineTo(right, yDecoration);
62121    ctx.stroke();
62122  }
62123}
62124function addRoundedRectPath(ctx, rect) {
62125  const {x, y, w, h, radius} = rect;
62126  ctx.arc(x + radius.topLeft, y + radius.topLeft, radius.topLeft, -HALF_PI, PI, true);
62127  ctx.lineTo(x, y + h - radius.bottomLeft);
62128  ctx.arc(x + radius.bottomLeft, y + h - radius.bottomLeft, radius.bottomLeft, PI, HALF_PI, true);
62129  ctx.lineTo(x + w - radius.bottomRight, y + h);
62130  ctx.arc(x + w - radius.bottomRight, y + h - radius.bottomRight, radius.bottomRight, HALF_PI, 0, true);
62131  ctx.lineTo(x + w, y + radius.topRight);
62132  ctx.arc(x + w - radius.topRight, y + radius.topRight, radius.topRight, 0, -HALF_PI, true);
62133  ctx.lineTo(x + radius.topLeft, y);
62134}
62135
62136function _lookup(table, value, cmp) {
62137  cmp = cmp || ((index) => table[index] < value);
62138  let hi = table.length - 1;
62139  let lo = 0;
62140  let mid;
62141  while (hi - lo > 1) {
62142    mid = (lo + hi) >> 1;
62143    if (cmp(mid)) {
62144      lo = mid;
62145    } else {
62146      hi = mid;
62147    }
62148  }
62149  return {lo, hi};
62150}
62151const _lookupByKey = (table, key, value) =>
62152  _lookup(table, value, index => table[index][key] < value);
62153const _rlookupByKey = (table, key, value) =>
62154  _lookup(table, value, index => table[index][key] >= value);
62155function _filterBetween(values, min, max) {
62156  let start = 0;
62157  let end = values.length;
62158  while (start < end && values[start] < min) {
62159    start++;
62160  }
62161  while (end > start && values[end - 1] > max) {
62162    end--;
62163  }
62164  return start > 0 || end < values.length
62165    ? values.slice(start, end)
62166    : values;
62167}
62168const arrayEvents = ['push', 'pop', 'shift', 'splice', 'unshift'];
62169function listenArrayEvents(array, listener) {
62170  if (array._chartjs) {
62171    array._chartjs.listeners.push(listener);
62172    return;
62173  }
62174  Object.defineProperty(array, '_chartjs', {
62175    configurable: true,
62176    enumerable: false,
62177    value: {
62178      listeners: [listener]
62179    }
62180  });
62181  arrayEvents.forEach((key) => {
62182    const method = '_onData' + _capitalize(key);
62183    const base = array[key];
62184    Object.defineProperty(array, key, {
62185      configurable: true,
62186      enumerable: false,
62187      value(...args) {
62188        const res = base.apply(this, args);
62189        array._chartjs.listeners.forEach((object) => {
62190          if (typeof object[method] === 'function') {
62191            object[method](...args);
62192          }
62193        });
62194        return res;
62195      }
62196    });
62197  });
62198}
62199function unlistenArrayEvents(array, listener) {
62200  const stub = array._chartjs;
62201  if (!stub) {
62202    return;
62203  }
62204  const listeners = stub.listeners;
62205  const index = listeners.indexOf(listener);
62206  if (index !== -1) {
62207    listeners.splice(index, 1);
62208  }
62209  if (listeners.length > 0) {
62210    return;
62211  }
62212  arrayEvents.forEach((key) => {
62213    delete array[key];
62214  });
62215  delete array._chartjs;
62216}
62217function _arrayUnique(items) {
62218  const set = new Set();
62219  let i, ilen;
62220  for (i = 0, ilen = items.length; i < ilen; ++i) {
62221    set.add(items[i]);
62222  }
62223  if (set.size === ilen) {
62224    return items;
62225  }
62226  return Array.from(set);
62227}
62228
62229function _isDomSupported() {
62230  return typeof window !== 'undefined' && typeof document !== 'undefined';
62231}
62232function _getParentNode(domNode) {
62233  let parent = domNode.parentNode;
62234  if (parent && parent.toString() === '[object ShadowRoot]') {
62235    parent = parent.host;
62236  }
62237  return parent;
62238}
62239function parseMaxStyle(styleValue, node, parentProperty) {
62240  let valueInPixels;
62241  if (typeof styleValue === 'string') {
62242    valueInPixels = parseInt(styleValue, 10);
62243    if (styleValue.indexOf('%') !== -1) {
62244      valueInPixels = valueInPixels / 100 * node.parentNode[parentProperty];
62245    }
62246  } else {
62247    valueInPixels = styleValue;
62248  }
62249  return valueInPixels;
62250}
62251const getComputedStyle = (element) => window.getComputedStyle(element, null);
62252function getStyle(el, property) {
62253  return getComputedStyle(el).getPropertyValue(property);
62254}
62255const positions = ['top', 'right', 'bottom', 'left'];
62256function getPositionedStyle(styles, style, suffix) {
62257  const result = {};
62258  suffix = suffix ? '-' + suffix : '';
62259  for (let i = 0; i < 4; i++) {
62260    const pos = positions[i];
62261    result[pos] = parseFloat(styles[style + '-' + pos + suffix]) || 0;
62262  }
62263  result.width = result.left + result.right;
62264  result.height = result.top + result.bottom;
62265  return result;
62266}
62267const useOffsetPos = (x, y, target) => (x > 0 || y > 0) && (!target || !target.shadowRoot);
62268function getCanvasPosition(evt, canvas) {
62269  const e = evt.native || evt;
62270  const touches = e.touches;
62271  const source = touches && touches.length ? touches[0] : e;
62272  const {offsetX, offsetY} = source;
62273  let box = false;
62274  let x, y;
62275  if (useOffsetPos(offsetX, offsetY, e.target)) {
62276    x = offsetX;
62277    y = offsetY;
62278  } else {
62279    const rect = canvas.getBoundingClientRect();
62280    x = source.clientX - rect.left;
62281    y = source.clientY - rect.top;
62282    box = true;
62283  }
62284  return {x, y, box};
62285}
62286function getRelativePosition$1(evt, chart) {
62287  const {canvas, currentDevicePixelRatio} = chart;
62288  const style = getComputedStyle(canvas);
62289  const borderBox = style.boxSizing === 'border-box';
62290  const paddings = getPositionedStyle(style, 'padding');
62291  const borders = getPositionedStyle(style, 'border', 'width');
62292  const {x, y, box} = getCanvasPosition(evt, canvas);
62293  const xOffset = paddings.left + (box && borders.left);
62294  const yOffset = paddings.top + (box && borders.top);
62295  let {width, height} = chart;
62296  if (borderBox) {
62297    width -= paddings.width + borders.width;
62298    height -= paddings.height + borders.height;
62299  }
62300  return {
62301    x: Math.round((x - xOffset) / width * canvas.width / currentDevicePixelRatio),
62302    y: Math.round((y - yOffset) / height * canvas.height / currentDevicePixelRatio)
62303  };
62304}
62305function getContainerSize(canvas, width, height) {
62306  let maxWidth, maxHeight;
62307  if (width === undefined || height === undefined) {
62308    const container = _getParentNode(canvas);
62309    if (!container) {
62310      width = canvas.clientWidth;
62311      height = canvas.clientHeight;
62312    } else {
62313      const rect = container.getBoundingClientRect();
62314      const containerStyle = getComputedStyle(container);
62315      const containerBorder = getPositionedStyle(containerStyle, 'border', 'width');
62316      const containerPadding = getPositionedStyle(containerStyle, 'padding');
62317      width = rect.width - containerPadding.width - containerBorder.width;
62318      height = rect.height - containerPadding.height - containerBorder.height;
62319      maxWidth = parseMaxStyle(containerStyle.maxWidth, container, 'clientWidth');
62320      maxHeight = parseMaxStyle(containerStyle.maxHeight, container, 'clientHeight');
62321    }
62322  }
62323  return {
62324    width,
62325    height,
62326    maxWidth: maxWidth || INFINITY,
62327    maxHeight: maxHeight || INFINITY
62328  };
62329}
62330const round1 = v => Math.round(v * 10) / 10;
62331function getMaximumSize(canvas, bbWidth, bbHeight, aspectRatio) {
62332  const style = getComputedStyle(canvas);
62333  const margins = getPositionedStyle(style, 'margin');
62334  const maxWidth = parseMaxStyle(style.maxWidth, canvas, 'clientWidth') || INFINITY;
62335  const maxHeight = parseMaxStyle(style.maxHeight, canvas, 'clientHeight') || INFINITY;
62336  const containerSize = getContainerSize(canvas, bbWidth, bbHeight);
62337  let {width, height} = containerSize;
62338  if (style.boxSizing === 'content-box') {
62339    const borders = getPositionedStyle(style, 'border', 'width');
62340    const paddings = getPositionedStyle(style, 'padding');
62341    width -= paddings.width + borders.width;
62342    height -= paddings.height + borders.height;
62343  }
62344  width = Math.max(0, width - margins.width);
62345  height = Math.max(0, aspectRatio ? Math.floor(width / aspectRatio) : height - margins.height);
62346  width = round1(Math.min(width, maxWidth, containerSize.maxWidth));
62347  height = round1(Math.min(height, maxHeight, containerSize.maxHeight));
62348  if (width && !height) {
62349    height = round1(width / 2);
62350  }
62351  return {
62352    width,
62353    height
62354  };
62355}
62356function retinaScale(chart, forceRatio, forceStyle) {
62357  const pixelRatio = forceRatio || 1;
62358  const deviceHeight = Math.floor(chart.height * pixelRatio);
62359  const deviceWidth = Math.floor(chart.width * pixelRatio);
62360  chart.height = deviceHeight / pixelRatio;
62361  chart.width = deviceWidth / pixelRatio;
62362  const canvas = chart.canvas;
62363  if (canvas.style && (forceStyle || (!canvas.style.height && !canvas.style.width))) {
62364    canvas.style.height = `${chart.height}px`;
62365    canvas.style.width = `${chart.width}px`;
62366  }
62367  if (chart.currentDevicePixelRatio !== pixelRatio
62368      || canvas.height !== deviceHeight
62369      || canvas.width !== deviceWidth) {
62370    chart.currentDevicePixelRatio = pixelRatio;
62371    canvas.height = deviceHeight;
62372    canvas.width = deviceWidth;
62373    chart.ctx.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);
62374    return true;
62375  }
62376  return false;
62377}
62378const supportsEventListenerOptions = (function() {
62379  let passiveSupported = false;
62380  try {
62381    const options = {
62382      get passive() {
62383        passiveSupported = true;
62384        return false;
62385      }
62386    };
62387    window.addEventListener('test', null, options);
62388    window.removeEventListener('test', null, options);
62389  } catch (e) {
62390  }
62391  return passiveSupported;
62392}());
62393function readUsedSize(element, property) {
62394  const value = getStyle(element, property);
62395  const matches = value && value.match(/^(\d+)(\.\d+)?px$/);
62396  return matches ? +matches[1] : undefined;
62397}
62398
62399function getRelativePosition(e, chart) {
62400  if ('native' in e) {
62401    return {
62402      x: e.x,
62403      y: e.y
62404    };
62405  }
62406  return getRelativePosition$1(e, chart);
62407}
62408function evaluateAllVisibleItems(chart, handler) {
62409  const metasets = chart.getSortedVisibleDatasetMetas();
62410  let index, data, element;
62411  for (let i = 0, ilen = metasets.length; i < ilen; ++i) {
62412    ({index, data} = metasets[i]);
62413    for (let j = 0, jlen = data.length; j < jlen; ++j) {
62414      element = data[j];
62415      if (!element.skip) {
62416        handler(element, index, j);
62417      }
62418    }
62419  }
62420}
62421function binarySearch(metaset, axis, value, intersect) {
62422  const {controller, data, _sorted} = metaset;
62423  const iScale = controller._cachedMeta.iScale;
62424  if (iScale && axis === iScale.axis && _sorted && data.length) {
62425    const lookupMethod = iScale._reversePixels ? _rlookupByKey : _lookupByKey;
62426    if (!intersect) {
62427      return lookupMethod(data, axis, value);
62428    } else if (controller._sharedOptions) {
62429      const el = data[0];
62430      const range = typeof el.getRange === 'function' && el.getRange(axis);
62431      if (range) {
62432        const start = lookupMethod(data, axis, value - range);
62433        const end = lookupMethod(data, axis, value + range);
62434        return {lo: start.lo, hi: end.hi};
62435      }
62436    }
62437  }
62438  return {lo: 0, hi: data.length - 1};
62439}
62440function optimizedEvaluateItems(chart, axis, position, handler, intersect) {
62441  const metasets = chart.getSortedVisibleDatasetMetas();
62442  const value = position[axis];
62443  for (let i = 0, ilen = metasets.length; i < ilen; ++i) {
62444    const {index, data} = metasets[i];
62445    const {lo, hi} = binarySearch(metasets[i], axis, value, intersect);
62446    for (let j = lo; j <= hi; ++j) {
62447      const element = data[j];
62448      if (!element.skip) {
62449        handler(element, index, j);
62450      }
62451    }
62452  }
62453}
62454function getDistanceMetricForAxis(axis) {
62455  const useX = axis.indexOf('x') !== -1;
62456  const useY = axis.indexOf('y') !== -1;
62457  return function(pt1, pt2) {
62458    const deltaX = useX ? Math.abs(pt1.x - pt2.x) : 0;
62459    const deltaY = useY ? Math.abs(pt1.y - pt2.y) : 0;
62460    return Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2));
62461  };
62462}
62463function getIntersectItems(chart, position, axis, useFinalPosition) {
62464  const items = [];
62465  if (!_isPointInArea(position, chart.chartArea, chart._minPadding)) {
62466    return items;
62467  }
62468  const evaluationFunc = function(element, datasetIndex, index) {
62469    if (element.inRange(position.x, position.y, useFinalPosition)) {
62470      items.push({element, datasetIndex, index});
62471    }
62472  };
62473  optimizedEvaluateItems(chart, axis, position, evaluationFunc, true);
62474  return items;
62475}
62476function getNearestItems(chart, position, axis, intersect, useFinalPosition) {
62477  const distanceMetric = getDistanceMetricForAxis(axis);
62478  let minDistance = Number.POSITIVE_INFINITY;
62479  let items = [];
62480  if (!_isPointInArea(position, chart.chartArea, chart._minPadding)) {
62481    return items;
62482  }
62483  const evaluationFunc = function(element, datasetIndex, index) {
62484    if (intersect && !element.inRange(position.x, position.y, useFinalPosition)) {
62485      return;
62486    }
62487    const center = element.getCenterPoint(useFinalPosition);
62488    if (!_isPointInArea(center, chart.chartArea, chart._minPadding) && !element.inRange(position.x, position.y, useFinalPosition)) {
62489      return;
62490    }
62491    const distance = distanceMetric(position, center);
62492    if (distance < minDistance) {
62493      items = [{element, datasetIndex, index}];
62494      minDistance = distance;
62495    } else if (distance === minDistance) {
62496      items.push({element, datasetIndex, index});
62497    }
62498  };
62499  optimizedEvaluateItems(chart, axis, position, evaluationFunc);
62500  return items;
62501}
62502function getAxisItems(chart, e, options, useFinalPosition) {
vendor: 50,360 bytes, lines 62503-64138
62503  const position = getRelativePosition(e, chart);
62504  const items = [];
62505  const axis = options.axis;
62506  const rangeMethod = axis === 'x' ? 'inXRange' : 'inYRange';
62507  let intersectsItem = false;
62508  evaluateAllVisibleItems(chart, (element, datasetIndex, index) => {
62509    if (element[rangeMethod](position[axis], useFinalPosition)) {
62510      items.push({element, datasetIndex, index});
62511    }
62512    if (element.inRange(position.x, position.y, useFinalPosition)) {
62513      intersectsItem = true;
62514    }
62515  });
62516  if (options.intersect && !intersectsItem) {
62517    return [];
62518  }
62519  return items;
62520}
62521var Interaction = {
62522  modes: {
62523    index(chart, e, options, useFinalPosition) {
62524      const position = getRelativePosition(e, chart);
62525      const axis = options.axis || 'x';
62526      const items = options.intersect
62527        ? getIntersectItems(chart, position, axis, useFinalPosition)
62528        : getNearestItems(chart, position, axis, false, useFinalPosition);
62529      const elements = [];
62530      if (!items.length) {
62531        return [];
62532      }
62533      chart.getSortedVisibleDatasetMetas().forEach((meta) => {
62534        const index = items[0].index;
62535        const element = meta.data[index];
62536        if (element && !element.skip) {
62537          elements.push({element, datasetIndex: meta.index, index});
62538        }
62539      });
62540      return elements;
62541    },
62542    dataset(chart, e, options, useFinalPosition) {
62543      const position = getRelativePosition(e, chart);
62544      const axis = options.axis || 'xy';
62545      let items = options.intersect
62546        ? getIntersectItems(chart, position, axis, useFinalPosition) :
62547        getNearestItems(chart, position, axis, false, useFinalPosition);
62548      if (items.length > 0) {
62549        const datasetIndex = items[0].datasetIndex;
62550        const data = chart.getDatasetMeta(datasetIndex).data;
62551        items = [];
62552        for (let i = 0; i < data.length; ++i) {
62553          items.push({element: data[i], datasetIndex, index: i});
62554        }
62555      }
62556      return items;
62557    },
62558    point(chart, e, options, useFinalPosition) {
62559      const position = getRelativePosition(e, chart);
62560      const axis = options.axis || 'xy';
62561      return getIntersectItems(chart, position, axis, useFinalPosition);
62562    },
62563    nearest(chart, e, options, useFinalPosition) {
62564      const position = getRelativePosition(e, chart);
62565      const axis = options.axis || 'xy';
62566      return getNearestItems(chart, position, axis, options.intersect, useFinalPosition);
62567    },
62568    x(chart, e, options, useFinalPosition) {
62569      options.axis = 'x';
62570      return getAxisItems(chart, e, options, useFinalPosition);
62571    },
62572    y(chart, e, options, useFinalPosition) {
62573      options.axis = 'y';
62574      return getAxisItems(chart, e, options, useFinalPosition);
62575    }
62576  }
62577};
62578
62579const LINE_HEIGHT = new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);
62580const FONT_STYLE = new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);
62581function toLineHeight(value, size) {
62582  const matches = ('' + value).match(LINE_HEIGHT);
62583  if (!matches || matches[1] === 'normal') {
62584    return size * 1.2;
62585  }
62586  value = +matches[2];
62587  switch (matches[3]) {
62588  case 'px':
62589    return value;
62590  case '%':
62591    value /= 100;
62592    break;
62593  }
62594  return size * value;
62595}
62596const numberOrZero$1 = v => +v || 0;
62597function _readValueToProps(value, props) {
62598  const ret = {};
62599  const objProps = isObject(props);
62600  const keys = objProps ? Object.keys(props) : props;
62601  const read = isObject(value)
62602    ? objProps
62603      ? prop => valueOrDefault(value[prop], value[props[prop]])
62604      : prop => value[prop]
62605    : () => value;
62606  for (const prop of keys) {
62607    ret[prop] = numberOrZero$1(read(prop));
62608  }
62609  return ret;
62610}
62611function toTRBL(value) {
62612  return _readValueToProps(value, {top: 'y', right: 'x', bottom: 'y', left: 'x'});
62613}
62614function toTRBLCorners(value) {
62615  return _readValueToProps(value, ['topLeft', 'topRight', 'bottomLeft', 'bottomRight']);
62616}
62617function toPadding(value) {
62618  const obj = toTRBL(value);
62619  obj.width = obj.left + obj.right;
62620  obj.height = obj.top + obj.bottom;
62621  return obj;
62622}
62623function toFont(options, fallback) {
62624  options = options || {};
62625  fallback = fallback || defaults.font;
62626  let size = valueOrDefault(options.size, fallback.size);
62627  if (typeof size === 'string') {
62628    size = parseInt(size, 10);
62629  }
62630  let style = valueOrDefault(options.style, fallback.style);
62631  if (style && !('' + style).match(FONT_STYLE)) {
62632    console.warn('Invalid font style specified: "' + style + '"');
62633    style = '';
62634  }
62635  const font = {
62636    family: valueOrDefault(options.family, fallback.family),
62637    lineHeight: toLineHeight(valueOrDefault(options.lineHeight, fallback.lineHeight), size),
62638    size,
62639    style,
62640    weight: valueOrDefault(options.weight, fallback.weight),
62641    string: ''
62642  };
62643  font.string = toFontString(font);
62644  return font;
62645}
62646function resolve(inputs, context, index, info) {
62647  let cacheable = true;
62648  let i, ilen, value;
62649  for (i = 0, ilen = inputs.length; i < ilen; ++i) {
62650    value = inputs[i];
62651    if (value === undefined) {
62652      continue;
62653    }
62654    if (context !== undefined && typeof value === 'function') {
62655      value = value(context);
62656      cacheable = false;
62657    }
62658    if (index !== undefined && isArray(value)) {
62659      value = value[index % value.length];
62660      cacheable = false;
62661    }
62662    if (value !== undefined) {
62663      if (info && !cacheable) {
62664        info.cacheable = false;
62665      }
62666      return value;
62667    }
62668  }
62669}
62670function _addGrace(minmax, grace) {
62671  const {min, max} = minmax;
62672  return {
62673    min: min - Math.abs(toDimension(grace, min)),
62674    max: max + toDimension(grace, max)
62675  };
62676}
62677
62678const STATIC_POSITIONS = ['left', 'top', 'right', 'bottom'];
62679function filterByPosition(array, position) {
62680  return array.filter(v => v.pos === position);
62681}
62682function filterDynamicPositionByAxis(array, axis) {
62683  return array.filter(v => STATIC_POSITIONS.indexOf(v.pos) === -1 && v.box.axis === axis);
62684}
62685function sortByWeight(array, reverse) {
62686  return array.sort((a, b) => {
62687    const v0 = reverse ? b : a;
62688    const v1 = reverse ? a : b;
62689    return v0.weight === v1.weight ?
62690      v0.index - v1.index :
62691      v0.weight - v1.weight;
62692  });
62693}
62694function wrapBoxes(boxes) {
62695  const layoutBoxes = [];
62696  let i, ilen, box, pos, stack, stackWeight;
62697  for (i = 0, ilen = (boxes || []).length; i < ilen; ++i) {
62698    box = boxes[i];
62699    ({position: pos, options: {stack, stackWeight = 1}} = box);
62700    layoutBoxes.push({
62701      index: i,
62702      box,
62703      pos,
62704      horizontal: box.isHorizontal(),
62705      weight: box.weight,
62706      stack: stack && (pos + stack),
62707      stackWeight
62708    });
62709  }
62710  return layoutBoxes;
62711}
62712function buildStacks(layouts) {
62713  const stacks = {};
62714  for (const wrap of layouts) {
62715    const {stack, pos, stackWeight} = wrap;
62716    if (!stack || !STATIC_POSITIONS.includes(pos)) {
62717      continue;
62718    }
62719    const _stack = stacks[stack] || (stacks[stack] = {count: 0, placed: 0, weight: 0, size: 0});
62720    _stack.count++;
62721    _stack.weight += stackWeight;
62722  }
62723  return stacks;
62724}
62725function setLayoutDims(layouts, params) {
62726  const stacks = buildStacks(layouts);
62727  const {vBoxMaxWidth, hBoxMaxHeight} = params;
62728  let i, ilen, layout;
62729  for (i = 0, ilen = layouts.length; i < ilen; ++i) {
62730    layout = layouts[i];
62731    const {fullSize} = layout.box;
62732    const stack = stacks[layout.stack];
62733    const factor = stack && layout.stackWeight / stack.weight;
62734    if (layout.horizontal) {
62735      layout.width = factor ? factor * vBoxMaxWidth : fullSize && params.availableWidth;
62736      layout.height = hBoxMaxHeight;
62737    } else {
62738      layout.width = vBoxMaxWidth;
62739      layout.height = factor ? factor * hBoxMaxHeight : fullSize && params.availableHeight;
62740    }
62741  }
62742  return stacks;
62743}
62744function buildLayoutBoxes(boxes) {
62745  const layoutBoxes = wrapBoxes(boxes);
62746  const fullSize = sortByWeight(layoutBoxes.filter(wrap => wrap.box.fullSize), true);
62747  const left = sortByWeight(filterByPosition(layoutBoxes, 'left'), true);
62748  const right = sortByWeight(filterByPosition(layoutBoxes, 'right'));
62749  const top = sortByWeight(filterByPosition(layoutBoxes, 'top'), true);
62750  const bottom = sortByWeight(filterByPosition(layoutBoxes, 'bottom'));
62751  const centerHorizontal = filterDynamicPositionByAxis(layoutBoxes, 'x');
62752  const centerVertical = filterDynamicPositionByAxis(layoutBoxes, 'y');
62753  return {
62754    fullSize,
62755    leftAndTop: left.concat(top),
62756    rightAndBottom: right.concat(centerVertical).concat(bottom).concat(centerHorizontal),
62757    chartArea: filterByPosition(layoutBoxes, 'chartArea'),
62758    vertical: left.concat(right).concat(centerVertical),
62759    horizontal: top.concat(bottom).concat(centerHorizontal)
62760  };
62761}
62762function getCombinedMax(maxPadding, chartArea, a, b) {
62763  return Math.max(maxPadding[a], chartArea[a]) + Math.max(maxPadding[b], chartArea[b]);
62764}
62765function updateMaxPadding(maxPadding, boxPadding) {
62766  maxPadding.top = Math.max(maxPadding.top, boxPadding.top);
62767  maxPadding.left = Math.max(maxPadding.left, boxPadding.left);
62768  maxPadding.bottom = Math.max(maxPadding.bottom, boxPadding.bottom);
62769  maxPadding.right = Math.max(maxPadding.right, boxPadding.right);
62770}
62771function updateDims(chartArea, params, layout, stacks) {
62772  const {pos, box} = layout;
62773  const maxPadding = chartArea.maxPadding;
62774  if (!isObject(pos)) {
62775    if (layout.size) {
62776      chartArea[pos] -= layout.size;
62777    }
62778    const stack = stacks[layout.stack] || {size: 0, count: 1};
62779    stack.size = Math.max(stack.size, layout.horizontal ? box.height : box.width);
62780    layout.size = stack.size / stack.count;
62781    chartArea[pos] += layout.size;
62782  }
62783  if (box.getPadding) {
62784    updateMaxPadding(maxPadding, box.getPadding());
62785  }
62786  const newWidth = Math.max(0, params.outerWidth - getCombinedMax(maxPadding, chartArea, 'left', 'right'));
62787  const newHeight = Math.max(0, params.outerHeight - getCombinedMax(maxPadding, chartArea, 'top', 'bottom'));
62788  const widthChanged = newWidth !== chartArea.w;
62789  const heightChanged = newHeight !== chartArea.h;
62790  chartArea.w = newWidth;
62791  chartArea.h = newHeight;
62792  return layout.horizontal
62793    ? {same: widthChanged, other: heightChanged}
62794    : {same: heightChanged, other: widthChanged};
62795}
62796function handleMaxPadding(chartArea) {
62797  const maxPadding = chartArea.maxPadding;
62798  function updatePos(pos) {
62799    const change = Math.max(maxPadding[pos] - chartArea[pos], 0);
62800    chartArea[pos] += change;
62801    return change;
62802  }
62803  chartArea.y += updatePos('top');
62804  chartArea.x += updatePos('left');
62805  updatePos('right');
62806  updatePos('bottom');
62807}
62808function getMargins(horizontal, chartArea) {
62809  const maxPadding = chartArea.maxPadding;
62810  function marginForPositions(positions) {
62811    const margin = {left: 0, top: 0, right: 0, bottom: 0};
62812    positions.forEach((pos) => {
62813      margin[pos] = Math.max(chartArea[pos], maxPadding[pos]);
62814    });
62815    return margin;
62816  }
62817  return horizontal
62818    ? marginForPositions(['left', 'right'])
62819    : marginForPositions(['top', 'bottom']);
62820}
62821function fitBoxes(boxes, chartArea, params, stacks) {
62822  const refitBoxes = [];
62823  let i, ilen, layout, box, refit, changed;
62824  for (i = 0, ilen = boxes.length, refit = 0; i < ilen; ++i) {
62825    layout = boxes[i];
62826    box = layout.box;
62827    box.update(
62828      layout.width || chartArea.w,
62829      layout.height || chartArea.h,
62830      getMargins(layout.horizontal, chartArea)
62831    );
62832    const {same, other} = updateDims(chartArea, params, layout, stacks);
62833    refit |= same && refitBoxes.length;
62834    changed = changed || other;
62835    if (!box.fullSize) {
62836      refitBoxes.push(layout);
62837    }
62838  }
62839  return refit && fitBoxes(refitBoxes, chartArea, params, stacks) || changed;
62840}
62841function setBoxDims(box, left, top, width, height) {
62842  box.top = top;
62843  box.left = left;
62844  box.right = left + width;
62845  box.bottom = top + height;
62846  box.width = width;
62847  box.height = height;
62848}
62849function placeBoxes(boxes, chartArea, params, stacks) {
62850  const userPadding = params.padding;
62851  let {x, y} = chartArea;
62852  for (const layout of boxes) {
62853    const box = layout.box;
62854    const stack = stacks[layout.stack] || {count: 1, placed: 0, weight: 1};
62855    const weight = (layout.stackWeight / stack.weight) || 1;
62856    if (layout.horizontal) {
62857      const width = chartArea.w * weight;
62858      const height = stack.size || box.height;
62859      if (defined(stack.start)) {
62860        y = stack.start;
62861      }
62862      if (box.fullSize) {
62863        setBoxDims(box, userPadding.left, y, params.outerWidth - userPadding.right - userPadding.left, height);
62864      } else {
62865        setBoxDims(box, chartArea.left + stack.placed, y, width, height);
62866      }
62867      stack.start = y;
62868      stack.placed += width;
62869      y = box.bottom;
62870    } else {
62871      const height = chartArea.h * weight;
62872      const width = stack.size || box.width;
62873      if (defined(stack.start)) {
62874        x = stack.start;
62875      }
62876      if (box.fullSize) {
62877        setBoxDims(box, x, userPadding.top, width, params.outerHeight - userPadding.bottom - userPadding.top);
62878      } else {
62879        setBoxDims(box, x, chartArea.top + stack.placed, width, height);
62880      }
62881      stack.start = x;
62882      stack.placed += height;
62883      x = box.right;
62884    }
62885  }
62886  chartArea.x = x;
62887  chartArea.y = y;
62888}
62889defaults.set('layout', {
62890  padding: {
62891    top: 0,
62892    right: 0,
62893    bottom: 0,
62894    left: 0
62895  }
62896});
62897var layouts = {
62898  addBox(chart, item) {
62899    if (!chart.boxes) {
62900      chart.boxes = [];
62901    }
62902    item.fullSize = item.fullSize || false;
62903    item.position = item.position || 'top';
62904    item.weight = item.weight || 0;
62905    item._layers = item._layers || function() {
62906      return [{
62907        z: 0,
62908        draw(chartArea) {
62909          item.draw(chartArea);
62910        }
62911      }];
62912    };
62913    chart.boxes.push(item);
62914  },
62915  removeBox(chart, layoutItem) {
62916    const index = chart.boxes ? chart.boxes.indexOf(layoutItem) : -1;
62917    if (index !== -1) {
62918      chart.boxes.splice(index, 1);
62919    }
62920  },
62921  configure(chart, item, options) {
62922    item.fullSize = options.fullSize;
62923    item.position = options.position;
62924    item.weight = options.weight;
62925  },
62926  update(chart, width, height, minPadding) {
62927    if (!chart) {
62928      return;
62929    }
62930    const padding = toPadding(chart.options.layout.padding);
62931    const availableWidth = Math.max(width - padding.width, 0);
62932    const availableHeight = Math.max(height - padding.height, 0);
62933    const boxes = buildLayoutBoxes(chart.boxes);
62934    const verticalBoxes = boxes.vertical;
62935    const horizontalBoxes = boxes.horizontal;
62936    each(chart.boxes, box => {
62937      if (typeof box.beforeLayout === 'function') {
62938        box.beforeLayout();
62939      }
62940    });
62941    const visibleVerticalBoxCount = verticalBoxes.reduce((total, wrap) =>
62942      wrap.box.options && wrap.box.options.display === false ? total : total + 1, 0) || 1;
62943    const params = Object.freeze({
62944      outerWidth: width,
62945      outerHeight: height,
62946      padding,
62947      availableWidth,
62948      availableHeight,
62949      vBoxMaxWidth: availableWidth / 2 / visibleVerticalBoxCount,
62950      hBoxMaxHeight: availableHeight / 2
62951    });
62952    const maxPadding = Object.assign({}, padding);
62953    updateMaxPadding(maxPadding, toPadding(minPadding));
62954    const chartArea = Object.assign({
62955      maxPadding,
62956      w: availableWidth,
62957      h: availableHeight,
62958      x: padding.left,
62959      y: padding.top
62960    }, padding);
62961    const stacks = setLayoutDims(verticalBoxes.concat(horizontalBoxes), params);
62962    fitBoxes(boxes.fullSize, chartArea, params, stacks);
62963    fitBoxes(verticalBoxes, chartArea, params, stacks);
62964    if (fitBoxes(horizontalBoxes, chartArea, params, stacks)) {
62965      fitBoxes(verticalBoxes, chartArea, params, stacks);
62966    }
62967    handleMaxPadding(chartArea);
62968    placeBoxes(boxes.leftAndTop, chartArea, params, stacks);
62969    chartArea.x += chartArea.w;
62970    chartArea.y += chartArea.h;
62971    placeBoxes(boxes.rightAndBottom, chartArea, params, stacks);
62972    chart.chartArea = {
62973      left: chartArea.left,
62974      top: chartArea.top,
62975      right: chartArea.left + chartArea.w,
62976      bottom: chartArea.top + chartArea.h,
62977      height: chartArea.h,
62978      width: chartArea.w,
62979    };
62980    each(boxes.chartArea, (layout) => {
62981      const box = layout.box;
62982      Object.assign(box, chart.chartArea);
62983      box.update(chartArea.w, chartArea.h);
62984    });
62985  }
62986};
62987
62988function _createResolver(scopes, prefixes = [''], rootScopes = scopes, fallback, getTarget = () => scopes[0]) {
62989  if (!defined(fallback)) {
62990    fallback = _resolve('_fallback', scopes);
62991  }
62992  const cache = {
62993    [Symbol.toStringTag]: 'Object',
62994    _cacheable: true,
62995    _scopes: scopes,
62996    _rootScopes: rootScopes,
62997    _fallback: fallback,
62998    _getTarget: getTarget,
62999    override: (scope) => _createResolver([scope, ...scopes], prefixes, rootScopes, fallback),
63000  };
63001  return new Proxy(cache, {
63002    deleteProperty(target, prop) {
63003      delete target[prop];
63004      delete target._keys;
63005      delete scopes[0][prop];
63006      return true;
63007    },
63008    get(target, prop) {
63009      return _cached(target, prop,
63010        () => _resolveWithPrefixes(prop, prefixes, scopes, target));
63011    },
63012    getOwnPropertyDescriptor(target, prop) {
63013      return Reflect.getOwnPropertyDescriptor(target._scopes[0], prop);
63014    },
63015    getPrototypeOf() {
63016      return Reflect.getPrototypeOf(scopes[0]);
63017    },
63018    has(target, prop) {
63019      return getKeysFromAllScopes(target).includes(prop);
63020    },
63021    ownKeys(target) {
63022      return getKeysFromAllScopes(target);
63023    },
63024    set(target, prop, value) {
63025      const storage = target._storage || (target._storage = getTarget());
63026      storage[prop] = value;
63027      delete target[prop];
63028      delete target._keys;
63029      return true;
63030    }
63031  });
63032}
63033function _attachContext(proxy, context, subProxy, descriptorDefaults) {
63034  const cache = {
63035    _cacheable: false,
63036    _proxy: proxy,
63037    _context: context,
63038    _subProxy: subProxy,
63039    _stack: new Set(),
63040    _descriptors: _descriptors(proxy, descriptorDefaults),
63041    setContext: (ctx) => _attachContext(proxy, ctx, subProxy, descriptorDefaults),
63042    override: (scope) => _attachContext(proxy.override(scope), context, subProxy, descriptorDefaults)
63043  };
63044  return new Proxy(cache, {
63045    deleteProperty(target, prop) {
63046      delete target[prop];
63047      delete proxy[prop];
63048      return true;
63049    },
63050    get(target, prop, receiver) {
63051      return _cached(target, prop,
63052        () => _resolveWithContext(target, prop, receiver));
63053    },
63054    getOwnPropertyDescriptor(target, prop) {
63055      return target._descriptors.allKeys
63056        ? Reflect.has(proxy, prop) ? {enumerable: true, configurable: true} : undefined
63057        : Reflect.getOwnPropertyDescriptor(proxy, prop);
63058    },
63059    getPrototypeOf() {
63060      return Reflect.getPrototypeOf(proxy);
63061    },
63062    has(target, prop) {
63063      return Reflect.has(proxy, prop);
63064    },
63065    ownKeys() {
63066      return Reflect.ownKeys(proxy);
63067    },
63068    set(target, prop, value) {
63069      proxy[prop] = value;
63070      delete target[prop];
63071      return true;
63072    }
63073  });
63074}
63075function _descriptors(proxy, defaults = {scriptable: true, indexable: true}) {
63076  const {_scriptable = defaults.scriptable, _indexable = defaults.indexable, _allKeys = defaults.allKeys} = proxy;
63077  return {
63078    allKeys: _allKeys,
63079    scriptable: _scriptable,
63080    indexable: _indexable,
63081    isScriptable: isFunction(_scriptable) ? _scriptable : () => _scriptable,
63082    isIndexable: isFunction(_indexable) ? _indexable : () => _indexable
63083  };
63084}
63085const readKey = (prefix, name) => prefix ? prefix + _capitalize(name) : name;
63086const needsSubResolver = (prop, value) => isObject(value) && prop !== 'adapters';
63087function _cached(target, prop, resolve) {
63088  let value = target[prop];
63089  if (defined(value)) {
63090    return value;
63091  }
63092  value = resolve();
63093  if (defined(value)) {
63094    target[prop] = value;
63095  }
63096  return value;
63097}
63098function _resolveWithContext(target, prop, receiver) {
63099  const {_proxy, _context, _subProxy, _descriptors: descriptors} = target;
63100  let value = _proxy[prop];
63101  if (isFunction(value) && descriptors.isScriptable(prop)) {
63102    value = _resolveScriptable(prop, value, target, receiver);
63103  }
63104  if (isArray(value) && value.length) {
63105    value = _resolveArray(prop, value, target, descriptors.isIndexable);
63106  }
63107  if (needsSubResolver(prop, value)) {
63108    value = _attachContext(value, _context, _subProxy && _subProxy[prop], descriptors);
63109  }
63110  return value;
63111}
63112function _resolveScriptable(prop, value, target, receiver) {
63113  const {_proxy, _context, _subProxy, _stack} = target;
63114  if (_stack.has(prop)) {
63115    throw new Error('Recursion detected: ' + Array.from(_stack).join('->') + '->' + prop);
63116  }
63117  _stack.add(prop);
63118  value = value(_context, _subProxy || receiver);
63119  _stack.delete(prop);
63120  if (isObject(value)) {
63121    value = createSubResolver(_proxy._scopes, _proxy, prop, value);
63122  }
63123  return value;
63124}
63125function _resolveArray(prop, value, target, isIndexable) {
63126  const {_proxy, _context, _subProxy, _descriptors: descriptors} = target;
63127  if (defined(_context.index) && isIndexable(prop)) {
63128    value = value[_context.index % value.length];
63129  } else if (isObject(value[0])) {
63130    const arr = value;
63131    const scopes = _proxy._scopes.filter(s => s !== arr);
63132    value = [];
63133    for (const item of arr) {
63134      const resolver = createSubResolver(scopes, _proxy, prop, item);
63135      value.push(_attachContext(resolver, _context, _subProxy && _subProxy[prop], descriptors));
63136    }
63137  }
63138  return value;
63139}
63140function resolveFallback(fallback, prop, value) {
63141  return isFunction(fallback) ? fallback(prop, value) : fallback;
63142}
63143const getScope = (key, parent) => key === true ? parent
63144  : typeof key === 'string' ? resolveObjectKey(parent, key) : undefined;
63145function addScopes(set, parentScopes, key, parentFallback) {
63146  for (const parent of parentScopes) {
63147    const scope = getScope(key, parent);
63148    if (scope) {
63149      set.add(scope);
63150      const fallback = resolveFallback(scope._fallback, key, scope);
63151      if (defined(fallback) && fallback !== key && fallback !== parentFallback) {
63152        return fallback;
63153      }
63154    } else if (scope === false && defined(parentFallback) && key !== parentFallback) {
63155      return null;
63156    }
63157  }
63158  return false;
63159}
63160function createSubResolver(parentScopes, resolver, prop, value) {
63161  const rootScopes = resolver._rootScopes;
63162  const fallback = resolveFallback(resolver._fallback, prop, value);
63163  const allScopes = [...parentScopes, ...rootScopes];
63164  const set = new Set();
63165  set.add(value);
63166  let key = addScopesFromKey(set, allScopes, prop, fallback || prop);
63167  if (key === null) {
63168    return false;
63169  }
63170  if (defined(fallback) && fallback !== prop) {
63171    key = addScopesFromKey(set, allScopes, fallback, key);
63172    if (key === null) {
63173      return false;
63174    }
63175  }
63176  return _createResolver(Array.from(set), [''], rootScopes, fallback,
63177    () => subGetTarget(resolver, prop, value));
63178}
63179function addScopesFromKey(set, allScopes, key, fallback) {
63180  while (key) {
63181    key = addScopes(set, allScopes, key, fallback);
63182  }
63183  return key;
63184}
63185function subGetTarget(resolver, prop, value) {
63186  const parent = resolver._getTarget();
63187  if (!(prop in parent)) {
63188    parent[prop] = {};
63189  }
63190  const target = parent[prop];
63191  if (isArray(target) && isObject(value)) {
63192    return value;
63193  }
63194  return target;
63195}
63196function _resolveWithPrefixes(prop, prefixes, scopes, proxy) {
63197  let value;
63198  for (const prefix of prefixes) {
63199    value = _resolve(readKey(prefix, prop), scopes);
63200    if (defined(value)) {
63201      return needsSubResolver(prop, value)
63202        ? createSubResolver(scopes, proxy, prop, value)
63203        : value;
63204    }
63205  }
63206}
63207function _resolve(key, scopes) {
63208  for (const scope of scopes) {
63209    if (!scope) {
63210      continue;
63211    }
63212    const value = scope[key];
63213    if (defined(value)) {
63214      return value;
63215    }
63216  }
63217}
63218function getKeysFromAllScopes(target) {
63219  let keys = target._keys;
63220  if (!keys) {
63221    keys = target._keys = resolveKeysFromAllScopes(target._scopes);
63222  }
63223  return keys;
63224}
63225function resolveKeysFromAllScopes(scopes) {
63226  const set = new Set();
63227  for (const scope of scopes) {
63228    for (const key of Object.keys(scope).filter(k => !k.startsWith('_'))) {
63229      set.add(key);
63230    }
63231  }
63232  return Array.from(set);
63233}
63234
63235const EPSILON = Number.EPSILON || 1e-14;
63236const getPoint = (points, i) => i < points.length && !points[i].skip && points[i];
63237const getValueAxis = (indexAxis) => indexAxis === 'x' ? 'y' : 'x';
63238function splineCurve(firstPoint, middlePoint, afterPoint, t) {
63239  const previous = firstPoint.skip ? middlePoint : firstPoint;
63240  const current = middlePoint;
63241  const next = afterPoint.skip ? middlePoint : afterPoint;
63242  const d01 = distanceBetweenPoints(current, previous);
63243  const d12 = distanceBetweenPoints(next, current);
63244  let s01 = d01 / (d01 + d12);
63245  let s12 = d12 / (d01 + d12);
63246  s01 = isNaN(s01) ? 0 : s01;
63247  s12 = isNaN(s12) ? 0 : s12;
63248  const fa = t * s01;
63249  const fb = t * s12;
63250  return {
63251    previous: {
63252      x: current.x - fa * (next.x - previous.x),
63253      y: current.y - fa * (next.y - previous.y)
63254    },
63255    next: {
63256      x: current.x + fb * (next.x - previous.x),
63257      y: current.y + fb * (next.y - previous.y)
63258    }
63259  };
63260}
63261function monotoneAdjust(points, deltaK, mK) {
63262  const pointsLen = points.length;
63263  let alphaK, betaK, tauK, squaredMagnitude, pointCurrent;
63264  let pointAfter = getPoint(points, 0);
63265  for (let i = 0; i < pointsLen - 1; ++i) {
63266    pointCurrent = pointAfter;
63267    pointAfter = getPoint(points, i + 1);
63268    if (!pointCurrent || !pointAfter) {
63269      continue;
63270    }
63271    if (almostEquals(deltaK[i], 0, EPSILON)) {
63272      mK[i] = mK[i + 1] = 0;
63273      continue;
63274    }
63275    alphaK = mK[i] / deltaK[i];
63276    betaK = mK[i + 1] / deltaK[i];
63277    squaredMagnitude = Math.pow(alphaK, 2) + Math.pow(betaK, 2);
63278    if (squaredMagnitude <= 9) {
63279      continue;
63280    }
63281    tauK = 3 / Math.sqrt(squaredMagnitude);
63282    mK[i] = alphaK * tauK * deltaK[i];
63283    mK[i + 1] = betaK * tauK * deltaK[i];
63284  }
63285}
63286function monotoneCompute(points, mK, indexAxis = 'x') {
63287  const valueAxis = getValueAxis(indexAxis);
63288  const pointsLen = points.length;
63289  let delta, pointBefore, pointCurrent;
63290  let pointAfter = getPoint(points, 0);
63291  for (let i = 0; i < pointsLen; ++i) {
63292    pointBefore = pointCurrent;
63293    pointCurrent = pointAfter;
63294    pointAfter = getPoint(points, i + 1);
63295    if (!pointCurrent) {
63296      continue;
63297    }
63298    const iPixel = pointCurrent[indexAxis];
63299    const vPixel = pointCurrent[valueAxis];
63300    if (pointBefore) {
63301      delta = (iPixel - pointBefore[indexAxis]) / 3;
63302      pointCurrent[`cp1${indexAxis}`] = iPixel - delta;
63303      pointCurrent[`cp1${valueAxis}`] = vPixel - delta * mK[i];
63304    }
63305    if (pointAfter) {
63306      delta = (pointAfter[indexAxis] - iPixel) / 3;
63307      pointCurrent[`cp2${indexAxis}`] = iPixel + delta;
63308      pointCurrent[`cp2${valueAxis}`] = vPixel + delta * mK[i];
63309    }
63310  }
63311}
63312function splineCurveMonotone(points, indexAxis = 'x') {
63313  const valueAxis = getValueAxis(indexAxis);
63314  const pointsLen = points.length;
63315  const deltaK = Array(pointsLen).fill(0);
63316  const mK = Array(pointsLen);
63317  let i, pointBefore, pointCurrent;
63318  let pointAfter = getPoint(points, 0);
63319  for (i = 0; i < pointsLen; ++i) {
63320    pointBefore = pointCurrent;
63321    pointCurrent = pointAfter;
63322    pointAfter = getPoint(points, i + 1);
63323    if (!pointCurrent) {
63324      continue;
63325    }
63326    if (pointAfter) {
63327      const slopeDelta = pointAfter[indexAxis] - pointCurrent[indexAxis];
63328      deltaK[i] = slopeDelta !== 0 ? (pointAfter[valueAxis] - pointCurrent[valueAxis]) / slopeDelta : 0;
63329    }
63330    mK[i] = !pointBefore ? deltaK[i]
63331      : !pointAfter ? deltaK[i - 1]
63332      : (sign(deltaK[i - 1]) !== sign(deltaK[i])) ? 0
63333      : (deltaK[i - 1] + deltaK[i]) / 2;
63334  }
63335  monotoneAdjust(points, deltaK, mK);
63336  monotoneCompute(points, mK, indexAxis);
63337}
63338function capControlPoint(pt, min, max) {
63339  return Math.max(Math.min(pt, max), min);
63340}
63341function capBezierPoints(points, area) {
63342  let i, ilen, point, inArea, inAreaPrev;
63343  let inAreaNext = _isPointInArea(points[0], area);
63344  for (i = 0, ilen = points.length; i < ilen; ++i) {
63345    inAreaPrev = inArea;
63346    inArea = inAreaNext;
63347    inAreaNext = i < ilen - 1 && _isPointInArea(points[i + 1], area);
63348    if (!inArea) {
63349      continue;
63350    }
63351    point = points[i];
63352    if (inAreaPrev) {
63353      point.cp1x = capControlPoint(point.cp1x, area.left, area.right);
63354      point.cp1y = capControlPoint(point.cp1y, area.top, area.bottom);
63355    }
63356    if (inAreaNext) {
63357      point.cp2x = capControlPoint(point.cp2x, area.left, area.right);
63358      point.cp2y = capControlPoint(point.cp2y, area.top, area.bottom);
63359    }
63360  }
63361}
63362function _updateBezierControlPoints(points, options, area, loop, indexAxis) {
63363  let i, ilen, point, controlPoints;
63364  if (options.spanGaps) {
63365    points = points.filter((pt) => !pt.skip);
63366  }
63367  if (options.cubicInterpolationMode === 'monotone') {
63368    splineCurveMonotone(points, indexAxis);
63369  } else {
63370    let prev = loop ? points[points.length - 1] : points[0];
63371    for (i = 0, ilen = points.length; i < ilen; ++i) {
63372      point = points[i];
63373      controlPoints = splineCurve(
63374        prev,
63375        point,
63376        points[Math.min(i + 1, ilen - (loop ? 0 : 1)) % ilen],
63377        options.tension
63378      );
63379      point.cp1x = controlPoints.previous.x;
63380      point.cp1y = controlPoints.previous.y;
63381      point.cp2x = controlPoints.next.x;
63382      point.cp2y = controlPoints.next.y;
63383      prev = point;
63384    }
63385  }
63386  if (options.capBezierPoints) {
63387    capBezierPoints(points, area);
63388  }
63389}
63390
63391const atEdge = (t) => t === 0 || t === 1;
63392const elasticIn = (t, s, p) => -(Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * TAU / p));
63393const elasticOut = (t, s, p) => Math.pow(2, -10 * t) * Math.sin((t - s) * TAU / p) + 1;
63394const effects = {
63395  linear: t => t,
63396  easeInQuad: t => t * t,
63397  easeOutQuad: t => -t * (t - 2),
63398  easeInOutQuad: t => ((t /= 0.5) < 1)
63399    ? 0.5 * t * t
63400    : -0.5 * ((--t) * (t - 2) - 1),
63401  easeInCubic: t => t * t * t,
63402  easeOutCubic: t => (t -= 1) * t * t + 1,
63403  easeInOutCubic: t => ((t /= 0.5) < 1)
63404    ? 0.5 * t * t * t
63405    : 0.5 * ((t -= 2) * t * t + 2),
63406  easeInQuart: t => t * t * t * t,
63407  easeOutQuart: t => -((t -= 1) * t * t * t - 1),
63408  easeInOutQuart: t => ((t /= 0.5) < 1)
63409    ? 0.5 * t * t * t * t
63410    : -0.5 * ((t -= 2) * t * t * t - 2),
63411  easeInQuint: t => t * t * t * t * t,
63412  easeOutQuint: t => (t -= 1) * t * t * t * t + 1,
63413  easeInOutQuint: t => ((t /= 0.5) < 1)
63414    ? 0.5 * t * t * t * t * t
63415    : 0.5 * ((t -= 2) * t * t * t * t + 2),
63416  easeInSine: t => -Math.cos(t * HALF_PI) + 1,
63417  easeOutSine: t => Math.sin(t * HALF_PI),
63418  easeInOutSine: t => -0.5 * (Math.cos(PI * t) - 1),
63419  easeInExpo: t => (t === 0) ? 0 : Math.pow(2, 10 * (t - 1)),
63420  easeOutExpo: t => (t === 1) ? 1 : -Math.pow(2, -10 * t) + 1,
63421  easeInOutExpo: t => atEdge(t) ? t : t < 0.5
63422    ? 0.5 * Math.pow(2, 10 * (t * 2 - 1))
63423    : 0.5 * (-Math.pow(2, -10 * (t * 2 - 1)) + 2),
63424  easeInCirc: t => (t >= 1) ? t : -(Math.sqrt(1 - t * t) - 1),
63425  easeOutCirc: t => Math.sqrt(1 - (t -= 1) * t),
63426  easeInOutCirc: t => ((t /= 0.5) < 1)
63427    ? -0.5 * (Math.sqrt(1 - t * t) - 1)
63428    : 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1),
63429  easeInElastic: t => atEdge(t) ? t : elasticIn(t, 0.075, 0.3),
63430  easeOutElastic: t => atEdge(t) ? t : elasticOut(t, 0.075, 0.3),
63431  easeInOutElastic(t) {
63432    const s = 0.1125;
63433    const p = 0.45;
63434    return atEdge(t) ? t :
63435      t < 0.5
63436        ? 0.5 * elasticIn(t * 2, s, p)
63437        : 0.5 + 0.5 * elasticOut(t * 2 - 1, s, p);
63438  },
63439  easeInBack(t) {
63440    const s = 1.70158;
63441    return t * t * ((s + 1) * t - s);
63442  },
63443  easeOutBack(t) {
63444    const s = 1.70158;
63445    return (t -= 1) * t * ((s + 1) * t + s) + 1;
63446  },
63447  easeInOutBack(t) {
63448    let s = 1.70158;
63449    if ((t /= 0.5) < 1) {
63450      return 0.5 * (t * t * (((s *= (1.525)) + 1) * t - s));
63451    }
63452    return 0.5 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2);
63453  },
63454  easeInBounce: t => 1 - effects.easeOutBounce(1 - t),
63455  easeOutBounce(t) {
63456    const m = 7.5625;
63457    const d = 2.75;
63458    if (t < (1 / d)) {
63459      return m * t * t;
63460    }
63461    if (t < (2 / d)) {
63462      return m * (t -= (1.5 / d)) * t + 0.75;
63463    }
63464    if (t < (2.5 / d)) {
63465      return m * (t -= (2.25 / d)) * t + 0.9375;
63466    }
63467    return m * (t -= (2.625 / d)) * t + 0.984375;
63468  },
63469  easeInOutBounce: t => (t < 0.5)
63470    ? effects.easeInBounce(t * 2) * 0.5
63471    : effects.easeOutBounce(t * 2 - 1) * 0.5 + 0.5,
63472};
63473
63474function _pointInLine(p1, p2, t, mode) {
63475  return {
63476    x: p1.x + t * (p2.x - p1.x),
63477    y: p1.y + t * (p2.y - p1.y)
63478  };
63479}
63480function _steppedInterpolation(p1, p2, t, mode) {
63481  return {
63482    x: p1.x + t * (p2.x - p1.x),
63483    y: mode === 'middle' ? t < 0.5 ? p1.y : p2.y
63484    : mode === 'after' ? t < 1 ? p1.y : p2.y
63485    : t > 0 ? p2.y : p1.y
63486  };
63487}
63488function _bezierInterpolation(p1, p2, t, mode) {
63489  const cp1 = {x: p1.cp2x, y: p1.cp2y};
63490  const cp2 = {x: p2.cp1x, y: p2.cp1y};
63491  const a = _pointInLine(p1, cp1, t);
63492  const b = _pointInLine(cp1, cp2, t);
63493  const c = _pointInLine(cp2, p2, t);
63494  const d = _pointInLine(a, b, t);
63495  const e = _pointInLine(b, c, t);
63496  return _pointInLine(d, e, t);
63497}
63498
63499const intlCache = new Map();
63500function getNumberFormat(locale, options) {
63501  options = options || {};
63502  const cacheKey = locale + JSON.stringify(options);
63503  let formatter = intlCache.get(cacheKey);
63504  if (!formatter) {
63505    formatter = new Intl.NumberFormat(locale, options);
63506    intlCache.set(cacheKey, formatter);
63507  }
63508  return formatter;
63509}
63510function formatNumber(num, locale, options) {
63511  return getNumberFormat(locale, options).format(num);
63512}
63513
63514const getRightToLeftAdapter = function(rectX, width) {
63515  return {
63516    x(x) {
63517      return rectX + rectX + width - x;
63518    },
63519    setWidth(w) {
63520      width = w;
63521    },
63522    textAlign(align) {
63523      if (align === 'center') {
63524        return align;
63525      }
63526      return align === 'right' ? 'left' : 'right';
63527    },
63528    xPlus(x, value) {
63529      return x - value;
63530    },
63531    leftForLtr(x, itemWidth) {
63532      return x - itemWidth;
63533    },
63534  };
63535};
63536const getLeftToRightAdapter = function() {
63537  return {
63538    x(x) {
63539      return x;
63540    },
63541    setWidth(w) {
63542    },
63543    textAlign(align) {
63544      return align;
63545    },
63546    xPlus(x, value) {
63547      return x + value;
63548    },
63549    leftForLtr(x, _itemWidth) {
63550      return x;
63551    },
63552  };
63553};
63554function getRtlAdapter(rtl, rectX, width) {
63555  return rtl ? getRightToLeftAdapter(rectX, width) : getLeftToRightAdapter();
63556}
63557function overrideTextDirection(ctx, direction) {
63558  let style, original;
63559  if (direction === 'ltr' || direction === 'rtl') {
63560    style = ctx.canvas.style;
63561    original = [
63562      style.getPropertyValue('direction'),
63563      style.getPropertyPriority('direction'),
63564    ];
63565    style.setProperty('direction', direction, 'important');
63566    ctx.prevTextDirection = original;
63567  }
63568}
63569function restoreTextDirection(ctx, original) {
63570  if (original !== undefined) {
63571    delete ctx.prevTextDirection;
63572    ctx.canvas.style.setProperty('direction', original[0], original[1]);
63573  }
63574}
63575
63576function propertyFn(property) {
63577  if (property === 'angle') {
63578    return {
63579      between: _angleBetween,
63580      compare: _angleDiff,
63581      normalize: _normalizeAngle,
63582    };
63583  }
63584  return {
63585    between: (n, s, e) => n >= Math.min(s, e) && n <= Math.max(e, s),
63586    compare: (a, b) => a - b,
63587    normalize: x => x
63588  };
63589}
63590function normalizeSegment({start, end, count, loop, style}) {
63591  return {
63592    start: start % count,
63593    end: end % count,
63594    loop: loop && (end - start + 1) % count === 0,
63595    style
63596  };
63597}
63598function getSegment(segment, points, bounds) {
63599  const {property, start: startBound, end: endBound} = bounds;
63600  const {between, normalize} = propertyFn(property);
63601  const count = points.length;
63602  let {start, end, loop} = segment;
63603  let i, ilen;
63604  if (loop) {
63605    start += count;
63606    end += count;
63607    for (i = 0, ilen = count; i < ilen; ++i) {
63608      if (!between(normalize(points[start % count][property]), startBound, endBound)) {
63609        break;
63610      }
63611      start--;
63612      end--;
63613    }
63614    start %= count;
63615    end %= count;
63616  }
63617  if (end < start) {
63618    end += count;
63619  }
63620  return {start, end, loop, style: segment.style};
63621}
63622function _boundSegment(segment, points, bounds) {
63623  if (!bounds) {
63624    return [segment];
63625  }
63626  const {property, start: startBound, end: endBound} = bounds;
63627  const count = points.length;
63628  const {compare, between, normalize} = propertyFn(property);
63629  const {start, end, loop, style} = getSegment(segment, points, bounds);
63630  const result = [];
63631  let inside = false;
63632  let subStart = null;
63633  let value, point, prevValue;
63634  const startIsBefore = () => between(startBound, prevValue, value) && compare(startBound, prevValue) !== 0;
63635  const endIsBefore = () => compare(endBound, value) === 0 || between(endBound, prevValue, value);
63636  const shouldStart = () => inside || startIsBefore();
63637  const shouldStop = () => !inside || endIsBefore();
63638  for (let i = start, prev = start; i <= end; ++i) {
63639    point = points[i % count];
63640    if (point.skip) {
63641      continue;
63642    }
63643    value = normalize(point[property]);
63644    if (value === prevValue) {
63645      continue;
63646    }
63647    inside = between(value, startBound, endBound);
63648    if (subStart === null && shouldStart()) {
63649      subStart = compare(value, startBound) === 0 ? i : prev;
63650    }
63651    if (subStart !== null && shouldStop()) {
63652      result.push(normalizeSegment({start: subStart, end: i, loop, count, style}));
63653      subStart = null;
63654    }
63655    prev = i;
63656    prevValue = value;
63657  }
63658  if (subStart !== null) {
63659    result.push(normalizeSegment({start: subStart, end, loop, count, style}));
63660  }
63661  return result;
63662}
63663function _boundSegments(line, bounds) {
63664  const result = [];
63665  const segments = line.segments;
63666  for (let i = 0; i < segments.length; i++) {
63667    const sub = _boundSegment(segments[i], line.points, bounds);
63668    if (sub.length) {
63669      result.push(...sub);
63670    }
63671  }
63672  return result;
63673}
63674function findStartAndEnd(points, count, loop, spanGaps) {
63675  let start = 0;
63676  let end = count - 1;
63677  if (loop && !spanGaps) {
63678    while (start < count && !points[start].skip) {
63679      start++;
63680    }
63681  }
63682  while (start < count && points[start].skip) {
63683    start++;
63684  }
63685  start %= count;
63686  if (loop) {
63687    end += start;
63688  }
63689  while (end > start && points[end % count].skip) {
63690    end--;
63691  }
63692  end %= count;
63693  return {start, end};
63694}
63695function solidSegments(points, start, max, loop) {
63696  const count = points.length;
63697  const result = [];
63698  let last = start;
63699  let prev = points[start];
63700  let end;
63701  for (end = start + 1; end <= max; ++end) {
63702    const cur = points[end % count];
63703    if (cur.skip || cur.stop) {
63704      if (!prev.skip) {
63705        loop = false;
63706        result.push({start: start % count, end: (end - 1) % count, loop});
63707        start = last = cur.stop ? end : null;
63708      }
63709    } else {
63710      last = end;
63711      if (prev.skip) {
63712        start = end;
63713      }
63714    }
63715    prev = cur;
63716  }
63717  if (last !== null) {
63718    result.push({start: start % count, end: last % count, loop});
63719  }
63720  return result;
63721}
63722function _computeSegments(line, segmentOptions) {
63723  const points = line.points;
63724  const spanGaps = line.options.spanGaps;
63725  const count = points.length;
63726  if (!count) {
63727    return [];
63728  }
63729  const loop = !!line._loop;
63730  const {start, end} = findStartAndEnd(points, count, loop, spanGaps);
63731  if (spanGaps === true) {
63732    return splitByStyles(line, [{start, end, loop}], points, segmentOptions);
63733  }
63734  const max = end < start ? end + count : end;
63735  const completeLoop = !!line._fullLoop && start === 0 && end === count - 1;
63736  return splitByStyles(line, solidSegments(points, start, max, completeLoop), points, segmentOptions);
63737}
63738function splitByStyles(line, segments, points, segmentOptions) {
63739  if (!segmentOptions || !segmentOptions.setContext || !points) {
63740    return segments;
63741  }
63742  return doSplitByStyles(line, segments, points, segmentOptions);
63743}
63744function doSplitByStyles(line, segments, points, segmentOptions) {
63745  const baseStyle = readStyle(line.options);
63746  const count = points.length;
63747  const result = [];
63748  let start = segments[0].start;
63749  let i = start;
63750  for (const segment of segments) {
63751    let prevStyle = baseStyle;
63752    let prev = points[start % count];
63753    let style;
63754    for (i = start + 1; i <= segment.end; i++) {
63755      const pt = points[i % count];
63756      style = readStyle(segmentOptions.setContext({
63757        type: 'segment',
63758        p0: prev,
63759        p1: pt,
63760        p0DataIndex: (i - 1) % count,
63761        p1DataIndex: i % count,
63762        datasetIndex: line._datasetIndex
63763      }));
63764      if (styleChanged(style, prevStyle)) {
63765        result.push({start: start, end: i - 1, loop: segment.loop, style: prevStyle});
63766        prevStyle = style;
63767        start = i - 1;
63768      }
63769      prev = pt;
63770      prevStyle = style;
63771    }
63772    if (start < i - 1) {
63773      result.push({start, end: i - 1, loop: segment.loop, style});
63774      start = i - 1;
63775    }
63776  }
63777  return result;
63778}
63779function readStyle(options) {
63780  return {
63781    backgroundColor: options.backgroundColor,
63782    borderCapStyle: options.borderCapStyle,
63783    borderDash: options.borderDash,
63784    borderDashOffset: options.borderDashOffset,
63785    borderJoinStyle: options.borderJoinStyle,
63786    borderWidth: options.borderWidth,
63787    borderColor: options.borderColor
63788  };
63789}
63790function styleChanged(style, prevStyle) {
63791  return prevStyle && JSON.stringify(style) !== JSON.stringify(prevStyle);
63792}
63793
63794var helpers = /*#__PURE__*/Object.freeze({
63795__proto__: null,
63796easingEffects: effects,
63797color: color,
63798getHoverColor: getHoverColor,
63799noop: noop,
63800uid: uid,
63801isNullOrUndef: isNullOrUndef,
63802isArray: isArray,
63803isObject: isObject,
63804isFinite: isNumberFinite,
63805finiteOrDefault: finiteOrDefault,
63806valueOrDefault: valueOrDefault,
63807toPercentage: toPercentage,
63808toDimension: toDimension,
63809callback: callback,
63810each: each,
63811_elementsEqual: _elementsEqual,
63812clone: clone,
63813_merger: _merger,
63814merge: merge,
63815mergeIf: mergeIf,
63816_mergerIf: _mergerIf,
63817_deprecated: _deprecated,
63818resolveObjectKey: resolveObjectKey,
63819_capitalize: _capitalize,
63820defined: defined,
63821isFunction: isFunction,
63822setsEqual: setsEqual,
63823toFontString: toFontString,
63824_measureText: _measureText,
63825_longestText: _longestText,
63826_alignPixel: _alignPixel,
63827clearCanvas: clearCanvas,
63828drawPoint: drawPoint,
63829_isPointInArea: _isPointInArea,
63830clipArea: clipArea,
63831unclipArea: unclipArea,
63832_steppedLineTo: _steppedLineTo,
63833_bezierCurveTo: _bezierCurveTo,
63834renderText: renderText,
63835addRoundedRectPath: addRoundedRectPath,
63836_lookup: _lookup,
63837_lookupByKey: _lookupByKey,
63838_rlookupByKey: _rlookupByKey,
63839_filterBetween: _filterBetween,
63840listenArrayEvents: listenArrayEvents,
63841unlistenArrayEvents: unlistenArrayEvents,
63842_arrayUnique: _arrayUnique,
63843_createResolver: _createResolver,
63844_attachContext: _attachContext,
63845_descriptors: _descriptors,
63846splineCurve: splineCurve,
63847splineCurveMonotone: splineCurveMonotone,
63848_updateBezierControlPoints: _updateBezierControlPoints,
63849_isDomSupported: _isDomSupported,
63850_getParentNode: _getParentNode,
63851getStyle: getStyle,
63852getRelativePosition: getRelativePosition$1,
63853getMaximumSize: getMaximumSize,
63854retinaScale: retinaScale,
63855supportsEventListenerOptions: supportsEventListenerOptions,
63856readUsedSize: readUsedSize,
63857fontString: fontString,
63858requestAnimFrame: requestAnimFrame,
63859throttled: throttled,
63860debounce: debounce,
63861_toLeftRightCenter: _toLeftRightCenter,
63862_alignStartEnd: _alignStartEnd,
63863_textX: _textX,
63864_pointInLine: _pointInLine,
63865_steppedInterpolation: _steppedInterpolation,
63866_bezierInterpolation: _bezierInterpolation,
63867formatNumber: formatNumber,
63868toLineHeight: toLineHeight,
63869_readValueToProps: _readValueToProps,
63870toTRBL: toTRBL,
63871toTRBLCorners: toTRBLCorners,
63872toPadding: toPadding,
63873toFont: toFont,
63874resolve: resolve,
63875_addGrace: _addGrace,
63876PI: PI,
63877TAU: TAU,
63878PITAU: PITAU,
63879INFINITY: INFINITY,
63880RAD_PER_DEG: RAD_PER_DEG,
63881HALF_PI: HALF_PI,
63882QUARTER_PI: QUARTER_PI,
63883TWO_THIRDS_PI: TWO_THIRDS_PI,
63884log10: log10,
63885sign: sign,
63886niceNum: niceNum,
63887_factorize: _factorize,
63888isNumber: isNumber,
63889almostEquals: almostEquals,
63890almostWhole: almostWhole,
63891_setMinAndMaxByKey: _setMinAndMaxByKey,
63892toRadians: toRadians,
63893toDegrees: toDegrees,
63894_decimalPlaces: _decimalPlaces,
63895getAngleFromPoint: getAngleFromPoint,
63896distanceBetweenPoints: distanceBetweenPoints,
63897_angleDiff: _angleDiff,
63898_normalizeAngle: _normalizeAngle,
63899_angleBetween: _angleBetween,
63900_limitValue: _limitValue,
63901_int16Range: _int16Range,
63902getRtlAdapter: getRtlAdapter,
63903overrideTextDirection: overrideTextDirection,
63904restoreTextDirection: restoreTextDirection,
63905_boundSegment: _boundSegment,
63906_boundSegments: _boundSegments,
63907_computeSegments: _computeSegments
63908});
63909
63910class BasePlatform {
63911  acquireContext(canvas, aspectRatio) {}
63912  releaseContext(context) {
63913    return false;
63914  }
63915  addEventListener(chart, type, listener) {}
63916  removeEventListener(chart, type, listener) {}
63917  getDevicePixelRatio() {
63918    return 1;
63919  }
63920  getMaximumSize(element, width, height, aspectRatio) {
63921    width = Math.max(0, width || element.width);
63922    height = height || element.height;
63923    return {
63924      width,
63925      height: Math.max(0, aspectRatio ? Math.floor(width / aspectRatio) : height)
63926    };
63927  }
63928  isAttached(canvas) {
63929    return true;
63930  }
63931}
63932
63933class BasicPlatform extends BasePlatform {
63934  acquireContext(item) {
63935    return item && item.getContext && item.getContext('2d') || null;
63936  }
63937}
63938
63939const EXPANDO_KEY = '$chartjs';
63940const EVENT_TYPES = {
63941  touchstart: 'mousedown',
63942  touchmove: 'mousemove',
63943  touchend: 'mouseup',
63944  pointerenter: 'mouseenter',
63945  pointerdown: 'mousedown',
63946  pointermove: 'mousemove',
63947  pointerup: 'mouseup',
63948  pointerleave: 'mouseout',
63949  pointerout: 'mouseout'
63950};
63951const isNullOrEmpty = value => value === null || value === '';
63952function initCanvas(canvas, aspectRatio) {
63953  const style = canvas.style;
63954  const renderHeight = canvas.getAttribute('height');
63955  const renderWidth = canvas.getAttribute('width');
63956  canvas[EXPANDO_KEY] = {
63957    initial: {
63958      height: renderHeight,
63959      width: renderWidth,
63960      style: {
63961        display: style.display,
63962        height: style.height,
63963        width: style.width
63964      }
63965    }
63966  };
63967  style.display = style.display || 'block';
63968  style.boxSizing = style.boxSizing || 'border-box';
63969  if (isNullOrEmpty(renderWidth)) {
63970    const displayWidth = readUsedSize(canvas, 'width');
63971    if (displayWidth !== undefined) {
63972      canvas.width = displayWidth;
63973    }
63974  }
63975  if (isNullOrEmpty(renderHeight)) {
63976    if (canvas.style.height === '') {
63977      canvas.height = canvas.width / (aspectRatio || 2);
63978    } else {
63979      const displayHeight = readUsedSize(canvas, 'height');
63980      if (displayHeight !== undefined) {
63981        canvas.height = displayHeight;
63982      }
63983    }
63984  }
63985  return canvas;
63986}
63987const eventListenerOptions = supportsEventListenerOptions ? {passive: true} : false;
63988function addListener(node, type, listener) {
63989  node.addEventListener(type, listener, eventListenerOptions);
63990}
63991function removeListener(chart, type, listener) {
63992  chart.canvas.removeEventListener(type, listener, eventListenerOptions);
63993}
63994function fromNativeEvent(event, chart) {
63995  const type = EVENT_TYPES[event.type] || event.type;
63996  const {x, y} = getRelativePosition$1(event, chart);
63997  return {
63998    type,
63999    chart,
64000    native: event,
64001    x: x !== undefined ? x : null,
64002    y: y !== undefined ? y : null,
64003  };
64004}
64005function createAttachObserver(chart, type, listener) {
64006  const canvas = chart.canvas;
64007  const container = canvas && _getParentNode(canvas);
64008  const element = container || canvas;
64009  const observer = new MutationObserver(entries => {
64010    const parent = _getParentNode(element);
64011    entries.forEach(entry => {
64012      for (let i = 0; i < entry.addedNodes.length; i++) {
64013        const added = entry.addedNodes[i];
64014        if (added === element || added === parent) {
64015          listener(entry.target);
64016        }
64017      }
64018    });
64019  });
64020  observer.observe(document, {childList: true, subtree: true});
64021  return observer;
64022}
64023function createDetachObserver(chart, type, listener) {
64024  const canvas = chart.canvas;
64025  const container = canvas && _getParentNode(canvas);
64026  if (!container) {
64027    return;
64028  }
64029  const observer = new MutationObserver(entries => {
64030    entries.forEach(entry => {
64031      for (let i = 0; i < entry.removedNodes.length; i++) {
64032        if (entry.removedNodes[i] === canvas) {
64033          listener();
64034          break;
64035        }
64036      }
64037    });
64038  });
64039  observer.observe(container, {childList: true});
64040  return observer;
64041}
64042const drpListeningCharts = new Map();
64043let oldDevicePixelRatio = 0;
64044function onWindowResize() {
64045  const dpr = window.devicePixelRatio;
64046  if (dpr === oldDevicePixelRatio) {
64047    return;
64048  }
64049  oldDevicePixelRatio = dpr;
64050  drpListeningCharts.forEach((resize, chart) => {
64051    if (chart.currentDevicePixelRatio !== dpr) {
64052      resize();
64053    }
64054  });
64055}
64056function listenDevicePixelRatioChanges(chart, resize) {
64057  if (!drpListeningCharts.size) {
64058    window.addEventListener('resize', onWindowResize);
64059  }
64060  drpListeningCharts.set(chart, resize);
64061}
64062function unlistenDevicePixelRatioChanges(chart) {
64063  drpListeningCharts.delete(chart);
64064  if (!drpListeningCharts.size) {
64065    window.removeEventListener('resize', onWindowResize);
64066  }
64067}
64068function createResizeObserver(chart, type, listener) {
64069  const canvas = chart.canvas;
64070  const container = canvas && _getParentNode(canvas);
64071  if (!container) {
64072    return;
64073  }
64074  const resize = throttled((width, height) => {
64075    const w = container.clientWidth;
64076    listener(width, height);
64077    if (w < container.clientWidth) {
64078      listener();
64079    }
64080  }, window);
64081  const observer = new ResizeObserver(entries => {
64082    const entry = entries[0];
64083    const width = entry.contentRect.width;
64084    const height = entry.contentRect.height;
64085    if (width === 0 && height === 0) {
64086      return;
64087    }
64088    resize(width, height);
64089  });
64090  observer.observe(container);
64091  listenDevicePixelRatioChanges(chart, resize);
64092  return observer;
64093}
64094function releaseObserver(chart, type, observer) {
64095  if (observer) {
64096    observer.disconnect();
64097  }
64098  if (type === 'resize') {
64099    unlistenDevicePixelRatioChanges(chart);
64100  }
64101}
64102function createProxyAndListen(chart, type, listener) {
64103  const canvas = chart.canvas;
64104  const proxy = throttled((event) => {
64105    if (chart.ctx !== null) {
64106      listener(fromNativeEvent(event, chart));
64107    }
64108  }, chart, (args) => {
64109    const event = args[0];
64110    return [event, event.offsetX, event.offsetY];
64111  });
64112  addListener(canvas, type, proxy);
64113  return proxy;
64114}
64115class DomPlatform extends BasePlatform {
64116  acquireContext(canvas, aspectRatio) {
64117    const context = canvas && canvas.getContext && canvas.getContext('2d');
64118    if (context && context.canvas === canvas) {
64119      initCanvas(canvas, aspectRatio);
64120      return context;
64121    }
64122    return null;
64123  }
64124  releaseContext(context) {
64125    const canvas = context.canvas;
64126    if (!canvas[EXPANDO_KEY]) {
64127      return false;
64128    }
64129    const initial = canvas[EXPANDO_KEY].initial;
64130    ['height', 'width'].forEach((prop) => {
64131      const value = initial[prop];
64132      if (isNullOrUndef(value)) {
64133        canvas.removeAttribute(prop);
64134      } else {
64135        canvas.setAttribute(prop, value);
64136      }
64137    });
64138    const style = initial.style || {};
64139    Object.keys(style).forEach((key) => {
64140      canvas.style[key] = style[key];
64141    });
64142    canvas.width = canvas.width;
64143    delete canvas[EXPANDO_KEY];
64144    return true;
64145  }
64146  addEventListener(chart, type, listener) {
64147    this.removeEventListener(chart, type);
64148    const proxies = chart.$proxies || (chart.$proxies = {});
64149    const handlers = {
64150      attach: createAttachObserver,
64151      detach: createDetachObserver,
64152      resize: createResizeObserver
64153    };
64154    const handler = handlers[type] || createProxyAndListen;
64155    proxies[type] = handler(chart, type, listener);
64156  }
64157  removeEventListener(chart, type) {
64158    const proxies = chart.$proxies || (chart.$proxies = {});
64159    const proxy = proxies[type];
64160    if (!proxy) {
64161      return;
64162    }
64163    const handlers = {
64164      attach: releaseObserver,
64165      detach: releaseObserver,
64166      resize: releaseObserver
64167    };
64168    const handler = handlers[type] || removeListener;
64169    handler(chart, type, proxy);
64170    proxies[type] = undefined;
64171  }
64172  getDevicePixelRatio() {
64173    return window.devicePixelRatio;
64174  }
64175  getMaximumSize(canvas, width, height, aspectRatio) {
64176    return getMaximumSize(canvas, width, height, aspectRatio);
64177  }
64178  isAttached(canvas) {
64179    const container = _getParentNode(canvas);
64180    return !!(container && container.isConnected);
64181  }
64182}
64183
64184function _detectPlatform(canvas) {
64185  if (!_isDomSupported() || (typeof OffscreenCanvas !== 'undefined' && canvas instanceof OffscreenCanvas)) {
64186    return BasicPlatform;
64187  }
64188  return DomPlatform;
64189}
64190
64191var platforms = /*#__PURE__*/Object.freeze({
64192__proto__: null,
64193_detectPlatform: _detectPlatform,
64194BasePlatform: BasePlatform,
64195BasicPlatform: BasicPlatform,
64196DomPlatform: DomPlatform
64197});
64198
64199const transparent = 'transparent';
64200const interpolators = {
64201  boolean(from, to, factor) {
64202    return factor > 0.5 ? to : from;
64203  },
64204  color(from, to, factor) {
64205    const c0 = color(from || transparent);
64206    const c1 = c0.valid && color(to || transparent);
64207    return c1 && c1.valid
64208      ? c1.mix(c0, factor).hexString()
64209      : to;
64210  },
64211  number(from, to, factor) {
64212    return from + (to - from) * factor;
64213  }
64214};
64215class Animation {
64216  constructor(cfg, target, prop, to) {
64217    const currentValue = target[prop];
64218    to = resolve([cfg.to, to, currentValue, cfg.from]);
64219    const from = resolve([cfg.from, currentValue, to]);
64220    this._active = true;
64221    this._fn = cfg.fn || interpolators[cfg.type || typeof from];
64222    this._easing = effects[cfg.easing] || effects.linear;
64223    this._start = Math.floor(Date.now() + (cfg.delay || 0));
64224    this._duration = this._total = Math.floor(cfg.duration);
64225    this._loop = !!cfg.loop;
64226    this._target = target;
64227    this._prop = prop;
64228    this._from = from;
64229    this._to = to;
64230    this._promises = undefined;
64231  }
64232  active() {
64233    return this._active;
64234  }
64235  update(cfg, to, date) {
64236    const me = this;
64237    if (me._active) {
64238      me._notify(false);
64239      const currentValue = me._target[me._prop];
64240      const elapsed = date - me._start;
64241      const remain = me._duration - elapsed;
64242      me._start = date;
64243      me._duration = Math.floor(Math.max(remain, cfg.duration));
64244      me._total += elapsed;
64245      me._loop = !!cfg.loop;
64246      me._to = resolve([cfg.to, to, currentValue, cfg.from]);
64247      me._from = resolve([cfg.from, currentValue, to]);
64248    }
64249  }
64250  cancel() {
64251    const me = this;
64252    if (me._active) {
64253      me.tick(Date.now());
64254      me._active = false;
64255      me._notify(false);
64256    }
64257  }
64258  tick(date) {
64259    const me = this;
64260    const elapsed = date - me._start;
64261    const duration = me._duration;
64262    const prop = me._prop;
64263    const from = me._from;
64264    const loop = me._loop;
64265    const to = me._to;
64266    let factor;
64267    me._active = from !== to && (loop || (elapsed < duration));
64268    if (!me._active) {
64269      me._target[prop] = to;
64270      me._notify(true);
64271      return;
64272    }
64273    if (elapsed < 0) {
64274      me._target[prop] = from;
64275      return;
64276    }
64277    factor = (elapsed / duration) % 2;
64278    factor = loop && factor > 1 ? 2 - factor : factor;
64279    factor = me._easing(Math.min(1, Math.max(0, factor)));
64280    me._target[prop] = me._fn(from, to, factor);
64281  }
64282  wait() {
64283    const promises = this._promises || (this._promises = []);
64284    return new Promise((res, rej) => {
64285      promises.push({res, rej});
64286    });
64287  }
64288  _notify(resolved) {
64289    const method = resolved ? 'res' : 'rej';
64290    const promises = this._promises || [];
64291    for (let i = 0; i < promises.length; i++) {
64292      promises[i][method]();
64293    }
64294  }
64295}
64296
64297const numbers = ['x', 'y', 'borderWidth', 'radius', 'tension'];
64298const colors = ['color', 'borderColor', 'backgroundColor'];
64299defaults.set('animation', {
64300  delay: undefined,
64301  duration: 1000,
64302  easing: 'easeOutQuart',
64303  fn: undefined,
64304  from: undefined,
64305  loop: undefined,
64306  to: undefined,
64307  type: undefined,
64308});
64309const animationOptions = Object.keys(defaults.animation);
64310defaults.describe('animation', {
64311  _fallback: false,
64312  _indexable: false,
64313  _scriptable: (name) => name !== 'onProgress' && name !== 'onComplete' && name !== 'fn',
64314});
64315defaults.set('animations', {
64316  colors: {
64317    type: 'color',
64318    properties: colors
64319  },
64320  numbers: {
64321    type: 'number',
64322    properties: numbers
64323  },
64324});
64325defaults.describe('animations', {
64326  _fallback: 'animation',
64327});
64328defaults.set('transitions', {
64329  active: {
64330    animation: {
64331      duration: 400
64332    }
64333  },
64334  resize: {
64335    animation: {
64336      duration: 0
64337    }
64338  },
64339  show: {
64340    animations: {
64341      colors: {
64342        from: 'transparent'
64343      },
64344      visible: {
64345        type: 'boolean',
64346        duration: 0
64347      },
64348    }
64349  },
64350  hide: {
64351    animations: {
64352      colors: {
64353        to: 'transparent'
64354      },
64355      visible: {
64356        type: 'boolean',
64357        easing: 'linear',
64358        fn: v => v | 0
64359      },
64360    }
64361  }
64362});
64363class Animations {
64364  constructor(chart, config) {
64365    this._chart = chart;
64366    this._properties = new Map();
64367    this.configure(config);
64368  }
64369  configure(config) {
64370    if (!isObject(config)) {
64371      return;
64372    }
64373    const animatedProps = this._properties;
vendor: 5,414 bytes, lines 64374-64574
64374    Object.getOwnPropertyNames(config).forEach(key => {
64375      const cfg = config[key];
64376      if (!isObject(cfg)) {
64377        return;
64378      }
64379      const resolved = {};
64380      for (const option of animationOptions) {
64381        resolved[option] = cfg[option];
64382      }
64383      (isArray(cfg.properties) && cfg.properties || [key]).forEach((prop) => {
64384        if (prop === key || !animatedProps.has(prop)) {
64385          animatedProps.set(prop, resolved);
64386        }
64387      });
64388    });
64389  }
64390  _animateOptions(target, values) {
64391    const newOptions = values.options;
64392    const options = resolveTargetOptions(target, newOptions);
64393    if (!options) {
64394      return [];
64395    }
64396    const animations = this._createAnimations(options, newOptions);
64397    if (newOptions.$shared) {
64398      awaitAll(target.options.$animations, newOptions).then(() => {
64399        target.options = newOptions;
64400      }, () => {
64401      });
64402    }
64403    return animations;
64404  }
64405  _createAnimations(target, values) {
64406    const animatedProps = this._properties;
64407    const animations = [];
64408    const running = target.$animations || (target.$animations = {});
64409    const props = Object.keys(values);
64410    const date = Date.now();
64411    let i;
64412    for (i = props.length - 1; i >= 0; --i) {
64413      const prop = props[i];
64414      if (prop.charAt(0) === '$') {
64415        continue;
64416      }
64417      if (prop === 'options') {
64418        animations.push(...this._animateOptions(target, values));
64419        continue;
64420      }
64421      const value = values[prop];
64422      let animation = running[prop];
64423      const cfg = animatedProps.get(prop);
64424      if (animation) {
64425        if (cfg && animation.active()) {
64426          animation.update(cfg, value, date);
64427          continue;
64428        } else {
64429          animation.cancel();
64430        }
64431      }
64432      if (!cfg || !cfg.duration) {
64433        target[prop] = value;
64434        continue;
64435      }
64436      running[prop] = animation = new Animation(cfg, target, prop, value);
64437      animations.push(animation);
64438    }
64439    return animations;
64440  }
64441  update(target, values) {
64442    if (this._properties.size === 0) {
64443      Object.assign(target, values);
64444      return;
64445    }
64446    const animations = this._createAnimations(target, values);
64447    if (animations.length) {
64448      animator.add(this._chart, animations);
64449      return true;
64450    }
64451  }
64452}
64453function awaitAll(animations, properties) {
64454  const running = [];
64455  const keys = Object.keys(properties);
64456  for (let i = 0; i < keys.length; i++) {
64457    const anim = animations[keys[i]];
64458    if (anim && anim.active()) {
64459      running.push(anim.wait());
64460    }
64461  }
64462  return Promise.all(running);
64463}
64464function resolveTargetOptions(target, newOptions) {
64465  if (!newOptions) {
64466    return;
64467  }
64468  let options = target.options;
64469  if (!options) {
64470    target.options = newOptions;
64471    return;
64472  }
64473  if (options.$shared) {
64474    target.options = options = Object.assign({}, options, {$shared: false, $animations: {}});
64475  }
64476  return options;
64477}
64478
64479function scaleClip(scale, allowedOverflow) {
64480  const opts = scale && scale.options || {};
64481  const reverse = opts.reverse;
64482  const min = opts.min === undefined ? allowedOverflow : 0;
64483  const max = opts.max === undefined ? allowedOverflow : 0;
64484  return {
64485    start: reverse ? max : min,
64486    end: reverse ? min : max
64487  };
64488}
64489function defaultClip(xScale, yScale, allowedOverflow) {
64490  if (allowedOverflow === false) {
64491    return false;
64492  }
64493  const x = scaleClip(xScale, allowedOverflow);
64494  const y = scaleClip(yScale, allowedOverflow);
64495  return {
64496    top: y.end,
64497    right: x.end,
64498    bottom: y.start,
64499    left: x.start
64500  };
64501}
64502function toClip(value) {
64503  let t, r, b, l;
64504  if (isObject(value)) {
64505    t = value.top;
64506    r = value.right;
64507    b = value.bottom;
64508    l = value.left;
64509  } else {
64510    t = r = b = l = value;
64511  }
64512  return {
64513    top: t,
64514    right: r,
64515    bottom: b,
64516    left: l,
64517    disabled: value === false
64518  };
64519}
64520function getSortedDatasetIndices(chart, filterVisible) {
64521  const keys = [];
64522  const metasets = chart._getSortedDatasetMetas(filterVisible);
64523  let i, ilen;
64524  for (i = 0, ilen = metasets.length; i < ilen; ++i) {
64525    keys.push(metasets[i].index);
64526  }
64527  return keys;
64528}
64529function applyStack(stack, value, dsIndex, options) {
64530  const keys = stack.keys;
64531  const singleMode = options.mode === 'single';
64532  let i, ilen, datasetIndex, otherValue;
64533  if (value === null) {
64534    return;
64535  }
64536  for (i = 0, ilen = keys.length; i < ilen; ++i) {
64537    datasetIndex = +keys[i];
64538    if (datasetIndex === dsIndex) {
64539      if (options.all) {
64540        continue;
64541      }
64542      break;
64543    }
64544    otherValue = stack.values[datasetIndex];
64545    if (isNumberFinite(otherValue) && (singleMode || (value === 0 || sign(value) === sign(otherValue)))) {
64546      value += otherValue;
64547    }
64548  }
64549  return value;
64550}
64551function convertObjectDataToArray(data) {
64552  const keys = Object.keys(data);
64553  const adata = new Array(keys.length);
64554  let i, ilen, key;
64555  for (i = 0, ilen = keys.length; i < ilen; ++i) {
64556    key = keys[i];
64557    adata[i] = {
64558      x: key,
64559      y: data[key]
64560    };
64561  }
64562  return adata;
64563}
64564function isStacked(scale, meta) {
64565  const stacked = scale && scale.options.stacked;
64566  return stacked || (stacked === undefined && meta.stack !== undefined);
64567}
64568function getStackKey(indexScale, valueScale, meta) {
64569  return `${indexScale.id}.${valueScale.id}.${meta.stack || meta.type}`;
64570}
64571function getUserBounds(scale) {
64572  const {min, max, minDefined, maxDefined} = scale.getUserBounds();
64573  return {
64574    min: minDefined ? min : Number.NEGATIVE_INFINITY,
64575    max: maxDefined ? max : Number.POSITIVE_INFINITY
64576  };
64577}
64578function getOrCreateStack(stacks, stackKey, indexValue) {
64579  const subStack = stacks[stackKey] || (stacks[stackKey] = {});
64580  return subStack[indexValue] || (subStack[indexValue] = {});
64581}
64582function getLastIndexInStack(stack, vScale, positive) {
64583  for (const meta of vScale.getMatchingVisibleMetas('bar').reverse()) {
64584    const value = stack[meta.index];
64585    if ((positive && value > 0) || (!positive && value < 0)) {
64586      return meta.index;
64587    }
64588  }
64589  return null;
64590}
64591function updateStacks(controller, parsed) {
64592  const {chart, _cachedMeta: meta} = controller;
64593  const stacks = chart._stacks || (chart._stacks = {});
64594  const {iScale, vScale, index: datasetIndex} = meta;
64595  const iAxis = iScale.axis;
64596  const vAxis = vScale.axis;
64597  const key = getStackKey(iScale, vScale, meta);
64598  const ilen = parsed.length;
64599  let stack;
64600  for (let i = 0; i < ilen; ++i) {
64601    const item = parsed[i];
64602    const {[iAxis]: index, [vAxis]: value} = item;
64603    const itemStacks = item._stacks || (item._stacks = {});
64604    stack = itemStacks[vAxis] = getOrCreateStack(stacks, key, index);
64605    stack[datasetIndex] = value;
64606    stack._top = getLastIndexInStack(stack, vScale, true);
64607    stack._bottom = getLastIndexInStack(stack, vScale, false);
64608  }
64609}
64610function getFirstScaleId(chart, axis) {
64611  const scales = chart.scales;
64612  return Object.keys(scales).filter(key => scales[key].axis === axis).shift();
64613}
64614function createDatasetContext(parent, index) {
64615  return Object.assign(Object.create(parent),
64616    {
64617      active: false,
64618      dataset: undefined,
64619      datasetIndex: index,
64620      index,
64621      mode: 'default',
64622      type: 'dataset'
64623    }
64624  );
64625}
64626function createDataContext(parent, index, element) {
64627  return Object.assign(Object.create(parent), {
64628    active: false,
64629    dataIndex: index,
64630    parsed: undefined,
64631    raw: undefined,
64632    element,
64633    index,
64634    mode: 'default',
64635    type: 'data'
64636  });
64637}
64638function clearStacks(meta, items) {
64639  const datasetIndex = meta.controller.index;
64640  const axis = meta.vScale && meta.vScale.axis;
64641  if (!axis) {
64642    return;
64643  }
64644  items = items || meta._parsed;
64645  for (const parsed of items) {
64646    const stacks = parsed._stacks;
64647    if (!stacks || stacks[axis] === undefined || stacks[axis][datasetIndex] === undefined) {
64648      return;
64649    }
64650    delete stacks[axis][datasetIndex];
64651  }
64652}
64653const isDirectUpdateMode = (mode) => mode === 'reset' || mode === 'none';
64654const cloneIfNotShared = (cached, shared) => shared ? cached : Object.assign({}, cached);
64655class DatasetController {
64656  constructor(chart, datasetIndex) {
64657    this.chart = chart;
64658    this._ctx = chart.ctx;
64659    this.index = datasetIndex;
64660    this._cachedDataOpts = {};
64661    this._cachedMeta = this.getMeta();
64662    this._type = this._cachedMeta.type;
64663    this.options = undefined;
64664    this._parsing = false;
64665    this._data = undefined;
64666    this._objectData = undefined;
64667    this._sharedOptions = undefined;
64668    this._drawStart = undefined;
64669    this._drawCount = undefined;
64670    this.enableOptionSharing = false;
64671    this.$context = undefined;
64672    this._syncList = [];
64673    this.initialize();
64674  }
64675  initialize() {
64676    const me = this;
64677    const meta = me._cachedMeta;
64678    me.configure();
64679    me.linkScales();
64680    meta._stacked = isStacked(meta.vScale, meta);
64681    me.addElements();
64682  }
64683  updateIndex(datasetIndex) {
64684    if (this.index !== datasetIndex) {
64685      clearStacks(this._cachedMeta);
64686    }
64687    this.index = datasetIndex;
64688  }
64689  linkScales() {
64690    const me = this;
64691    const chart = me.chart;
64692    const meta = me._cachedMeta;
64693    const dataset = me.getDataset();
64694    const chooseId = (axis, x, y, r) => axis === 'x' ? x : axis === 'r' ? r : y;
64695    const xid = meta.xAxisID = valueOrDefault(dataset.xAxisID, getFirstScaleId(chart, 'x'));
64696    const yid = meta.yAxisID = valueOrDefault(dataset.yAxisID, getFirstScaleId(chart, 'y'));
64697    const rid = meta.rAxisID = valueOrDefault(dataset.rAxisID, getFirstScaleId(chart, 'r'));
64698    const indexAxis = meta.indexAxis;
64699    const iid = meta.iAxisID = chooseId(indexAxis, xid, yid, rid);
64700    const vid = meta.vAxisID = chooseId(indexAxis, yid, xid, rid);
64701    meta.xScale = me.getScaleForId(xid);
64702    meta.yScale = me.getScaleForId(yid);
64703    meta.rScale = me.getScaleForId(rid);
64704    meta.iScale = me.getScaleForId(iid);
64705    meta.vScale = me.getScaleForId(vid);
64706  }
64707  getDataset() {
64708    return this.chart.data.datasets[this.index];
64709  }
64710  getMeta() {
64711    return this.chart.getDatasetMeta(this.index);
64712  }
64713  getScaleForId(scaleID) {
64714    return this.chart.scales[scaleID];
64715  }
64716  _getOtherScale(scale) {
64717    const meta = this._cachedMeta;
64718    return scale === meta.iScale
64719      ? meta.vScale
64720      : meta.iScale;
64721  }
64722  reset() {
64723    this._update('reset');
64724  }
64725  _destroy() {
64726    const meta = this._cachedMeta;
64727    if (this._data) {
64728      unlistenArrayEvents(this._data, this);
64729    }
64730    if (meta._stacked) {
64731      clearStacks(meta);
64732    }
64733  }
64734  _dataCheck() {
64735    const me = this;
64736    const dataset = me.getDataset();
64737    const data = dataset.data || (dataset.data = []);
64738    const _data = me._data;
64739    if (isObject(data)) {
64740      me._data = convertObjectDataToArray(data);
64741    } else if (_data !== data) {
64742      if (_data) {
64743        unlistenArrayEvents(_data, me);
64744        const meta = me._cachedMeta;
64745        clearStacks(meta);
64746        meta._parsed = [];
64747      }
64748      if (data && Object.isExtensible(data)) {
64749        listenArrayEvents(data, me);
64750      }
64751      me._syncList = [];
64752      me._data = data;
64753    }
64754  }
64755  addElements() {
64756    const me = this;
64757    const meta = me._cachedMeta;
64758    me._dataCheck();
64759    if (me.datasetElementType) {
64760      meta.dataset = new me.datasetElementType();
64761    }
64762  }
64763  buildOrUpdateElements(resetNewElements) {
64764    const me = this;
64765    const meta = me._cachedMeta;
64766    const dataset = me.getDataset();
64767    let stackChanged = false;
vendor: 4,891 bytes, lines 64768-64912
64768    me._dataCheck();
64769    const oldStacked = meta._stacked;
64770    meta._stacked = isStacked(meta.vScale, meta);
64771    if (meta.stack !== dataset.stack) {
64772      stackChanged = true;
64773      clearStacks(meta);
64774      meta.stack = dataset.stack;
64775    }
64776    me._resyncElements(resetNewElements);
64777    if (stackChanged || oldStacked !== meta._stacked) {
64778      updateStacks(me, meta._parsed);
64779    }
64780  }
64781  configure() {
64782    const me = this;
64783    const config = me.chart.config;
64784    const scopeKeys = config.datasetScopeKeys(me._type);
64785    const scopes = config.getOptionScopes(me.getDataset(), scopeKeys, true);
64786    me.options = config.createResolver(scopes, me.getContext());
64787    me._parsing = me.options.parsing;
64788  }
64789  parse(start, count) {
64790    const me = this;
64791    const {_cachedMeta: meta, _data: data} = me;
64792    const {iScale, _stacked} = meta;
64793    const iAxis = iScale.axis;
64794    let sorted = start === 0 && count === data.length ? true : meta._sorted;
64795    let prev = start > 0 && meta._parsed[start - 1];
64796    let i, cur, parsed;
64797    if (me._parsing === false) {
64798      meta._parsed = data;
64799      meta._sorted = true;
64800      parsed = data;
64801    } else {
64802      if (isArray(data[start])) {
64803        parsed = me.parseArrayData(meta, data, start, count);
64804      } else if (isObject(data[start])) {
64805        parsed = me.parseObjectData(meta, data, start, count);
64806      } else {
64807        parsed = me.parsePrimitiveData(meta, data, start, count);
64808      }
64809      const isNotInOrderComparedToPrev = () => cur[iAxis] === null || (prev && cur[iAxis] < prev[iAxis]);
64810      for (i = 0; i < count; ++i) {
64811        meta._parsed[i + start] = cur = parsed[i];
64812        if (sorted) {
64813          if (isNotInOrderComparedToPrev()) {
64814            sorted = false;
64815          }
64816          prev = cur;
64817        }
64818      }
64819      meta._sorted = sorted;
64820    }
64821    if (_stacked) {
64822      updateStacks(me, parsed);
64823    }
64824  }
64825  parsePrimitiveData(meta, data, start, count) {
64826    const {iScale, vScale} = meta;
64827    const iAxis = iScale.axis;
64828    const vAxis = vScale.axis;
64829    const labels = iScale.getLabels();
64830    const singleScale = iScale === vScale;
64831    const parsed = new Array(count);
64832    let i, ilen, index;
64833    for (i = 0, ilen = count; i < ilen; ++i) {
64834      index = i + start;
64835      parsed[i] = {
64836        [iAxis]: singleScale || iScale.parse(labels[index], index),
64837        [vAxis]: vScale.parse(data[index], index)
64838      };
64839    }
64840    return parsed;
64841  }
64842  parseArrayData(meta, data, start, count) {
64843    const {xScale, yScale} = meta;
64844    const parsed = new Array(count);
64845    let i, ilen, index, item;
64846    for (i = 0, ilen = count; i < ilen; ++i) {
64847      index = i + start;
64848      item = data[index];
64849      parsed[i] = {
64850        x: xScale.parse(item[0], index),
64851        y: yScale.parse(item[1], index)
64852      };
64853    }
64854    return parsed;
64855  }
64856  parseObjectData(meta, data, start, count) {
64857    const {xScale, yScale} = meta;
64858    const {xAxisKey = 'x', yAxisKey = 'y'} = this._parsing;
64859    const parsed = new Array(count);
64860    let i, ilen, index, item;
64861    for (i = 0, ilen = count; i < ilen; ++i) {
64862      index = i + start;
64863      item = data[index];
64864      parsed[i] = {
64865        x: xScale.parse(resolveObjectKey(item, xAxisKey), index),
64866        y: yScale.parse(resolveObjectKey(item, yAxisKey), index)
64867      };
64868    }
64869    return parsed;
64870  }
64871  getParsed(index) {
64872    return this._cachedMeta._parsed[index];
64873  }
64874  getDataElement(index) {
64875    return this._cachedMeta.data[index];
64876  }
64877  applyStack(scale, parsed, mode) {
64878    const chart = this.chart;
64879    const meta = this._cachedMeta;
64880    const value = parsed[scale.axis];
64881    const stack = {
64882      keys: getSortedDatasetIndices(chart, true),
64883      values: parsed._stacks[scale.axis]
64884    };
64885    return applyStack(stack, value, meta.index, {mode});
64886  }
64887  updateRangeFromParsed(range, scale, parsed, stack) {
64888    const parsedValue = parsed[scale.axis];
64889    let value = parsedValue === null ? NaN : parsedValue;
64890    const values = stack && parsed._stacks[scale.axis];
64891    if (stack && values) {
64892      stack.values = values;
64893      range.min = Math.min(range.min, value);
64894      range.max = Math.max(range.max, value);
64895      value = applyStack(stack, parsedValue, this._cachedMeta.index, {all: true});
64896    }
64897    range.min = Math.min(range.min, value);
64898    range.max = Math.max(range.max, value);
64899  }
64900  getMinMax(scale, canStack) {
64901    const me = this;
64902    const meta = me._cachedMeta;
64903    const _parsed = meta._parsed;
64904    const sorted = meta._sorted && scale === meta.iScale;
64905    const ilen = _parsed.length;
64906    const otherScale = me._getOtherScale(scale);
64907    const stack = canStack && meta._stacked && {keys: getSortedDatasetIndices(me.chart, true), values: null};
64908    const range = {min: Number.POSITIVE_INFINITY, max: Number.NEGATIVE_INFINITY};
64909    const {min: otherMin, max: otherMax} = getUserBounds(otherScale);
64910    let i, value, parsed, otherValue;
64911    function _skip() {
64912      parsed = _parsed[i];
64913      value = parsed[scale.axis];
64914      otherValue = parsed[otherScale.axis];
64915      return !isNumberFinite(value) || otherMin > otherValue || otherMax < otherValue;
64916    }
64917    for (i = 0; i < ilen; ++i) {
64918      if (_skip()) {
64919        continue;
64920      }
64921      me.updateRangeFromParsed(range, scale, parsed, stack);
64922      if (sorted) {
64923        break;
64924      }
64925    }
64926    if (sorted) {
64927      for (i = ilen - 1; i >= 0; --i) {
64928        if (_skip()) {
64929          continue;
64930        }
64931        me.updateRangeFromParsed(range, scale, parsed, stack);
64932        break;
64933      }
64934    }
64935    return range;
64936  }
64937  getAllParsedValues(scale) {
64938    const parsed = this._cachedMeta._parsed;
64939    const values = [];
64940    let i, ilen, value;
64941    for (i = 0, ilen = parsed.length; i < ilen; ++i) {
64942      value = parsed[i][scale.axis];
64943      if (isNumberFinite(value)) {
64944        values.push(value);
64945      }
64946    }
64947    return values;
64948  }
64949  getMaxOverflow() {
64950    return false;
64951  }
64952  getLabelAndValue(index) {
64953    const me = this;
64954    const meta = me._cachedMeta;
64955    const iScale = meta.iScale;
64956    const vScale = meta.vScale;
64957    const parsed = me.getParsed(index);
64958    return {
64959      label: iScale ? '' + iScale.getLabelForValue(parsed[iScale.axis]) : '',
64960      value: vScale ? '' + vScale.getLabelForValue(parsed[vScale.axis]) : ''
64961    };
64962  }
64963  _update(mode) {
64964    const me = this;
64965    const meta = me._cachedMeta;
64966    me.configure();
64967    me._cachedDataOpts = {};
64968    me.update(mode || 'default');
64969    meta._clip = toClip(valueOrDefault(me.options.clip, defaultClip(meta.xScale, meta.yScale, me.getMaxOverflow())));
64970  }
64971  update(mode) {}
64972  draw() {
64973    const me = this;
64974    const ctx = me._ctx;
64975    const chart = me.chart;
64976    const meta = me._cachedMeta;
64977    const elements = meta.data || [];
64978    const area = chart.chartArea;
64979    const active = [];
64980    const start = me._drawStart || 0;
64981    const count = me._drawCount || (elements.length - start);
64982    let i;
64983    if (meta.dataset) {
64984      meta.dataset.draw(ctx, area, start, count);
64985    }
64986    for (i = start; i < start + count; ++i) {
64987      const element = elements[i];
64988      if (element.hidden) {
64989        continue;
64990      }
64991      if (element.active) {
64992        active.push(element);
64993      } else {
64994        element.draw(ctx, area);
64995      }
64996    }
64997    for (i = 0; i < active.length; ++i) {
64998      active[i].draw(ctx, area);
64999    }
65000  }
65001  getStyle(index, active) {
65002    const mode = active ? 'active' : 'default';
65003    return index === undefined && this._cachedMeta.dataset
65004      ? this.resolveDatasetElementOptions(mode)
65005      : this.resolveDataElementOptions(index || 0, mode);
65006  }
65007  getContext(index, active, mode) {
65008    const me = this;
65009    const dataset = me.getDataset();
65010    let context;
65011    if (index >= 0 && index < me._cachedMeta.data.length) {
65012      const element = me._cachedMeta.data[index];
65013      context = element.$context ||
65014        (element.$context = createDataContext(me.getContext(), index, element));
65015      context.parsed = me.getParsed(index);
65016      context.raw = dataset.data[index];
65017      context.index = context.dataIndex = index;
65018    } else {
65019      context = me.$context ||
65020        (me.$context = createDatasetContext(me.chart.getContext(), me.index));
65021      context.dataset = dataset;
65022      context.index = context.datasetIndex = me.index;
65023    }
65024    context.active = !!active;
65025    context.mode = mode;
65026    return context;
65027  }
65028  resolveDatasetElementOptions(mode) {
65029    return this._resolveElementOptions(this.datasetElementType.id, mode);
65030  }
65031  resolveDataElementOptions(index, mode) {
65032    return this._resolveElementOptions(this.dataElementType.id, mode, index);
65033  }
65034  _resolveElementOptions(elementType, mode = 'default', index) {
65035    const me = this;
65036    const active = mode === 'active';
65037    const cache = me._cachedDataOpts;
65038    const cacheKey = elementType + '-' + mode;
65039    const cached = cache[cacheKey];
65040    const sharing = me.enableOptionSharing && defined(index);
65041    if (cached) {
65042      return cloneIfNotShared(cached, sharing);
65043    }
65044    const config = me.chart.config;
65045    const scopeKeys = config.datasetElementScopeKeys(me._type, elementType);
65046    const prefixes = active ? [`${elementType}Hover`, 'hover', elementType, ''] : [elementType, ''];
65047    const scopes = config.getOptionScopes(me.getDataset(), scopeKeys);
65048    const names = Object.keys(defaults.elements[elementType]);
65049    const context = () => me.getContext(index, active);
65050    const values = config.resolveNamedOptions(scopes, names, context, prefixes);
65051    if (values.$shared) {
65052      values.$shared = sharing;
65053      cache[cacheKey] = Object.freeze(cloneIfNotShared(values, sharing));
65054    }
65055    return values;
65056  }
65057  _resolveAnimations(index, transition, active) {
65058    const me = this;
65059    const chart = me.chart;
65060    const cache = me._cachedDataOpts;
65061    const cacheKey = `animation-${transition}`;
65062    const cached = cache[cacheKey];
65063    if (cached) {
65064      return cached;
65065    }
65066    let options;
65067    if (chart.options.animation !== false) {
65068      const config = me.chart.config;
65069      const scopeKeys = config.datasetAnimationScopeKeys(me._type, transition);
65070      const scopes = config.getOptionScopes(me.getDataset(), scopeKeys);
65071      options = config.createResolver(scopes, me.getContext(index, active, transition));
65072    }
65073    const animations = new Animations(chart, options && options.animations);
65074    if (options && options._cacheable) {
65075      cache[cacheKey] = Object.freeze(animations);
65076    }
65077    return animations;
65078  }
65079  getSharedOptions(options) {
65080    if (!options.$shared) {
65081      return;
65082    }
65083    return this._sharedOptions || (this._sharedOptions = Object.assign({}, options));
65084  }
65085  includeOptions(mode, sharedOptions) {
65086    return !sharedOptions || isDirectUpdateMode(mode) || this.chart._animationsDisabled;
65087  }
65088  updateElement(element, index, properties, mode) {
65089    if (isDirectUpdateMode(mode)) {
65090      Object.assign(element, properties);
65091    } else {
65092      this._resolveAnimations(index, mode).update(element, properties);
65093    }
65094  }
65095  updateSharedOptions(sharedOptions, mode, newOptions) {
65096    if (sharedOptions && !isDirectUpdateMode(mode)) {
65097      this._resolveAnimations(undefined, mode).update(sharedOptions, newOptions);
65098    }
65099  }
65100  _setStyle(element, index, mode, active) {
65101    element.active = active;
65102    const options = this.getStyle(index, active);
65103    this._resolveAnimations(index, mode, active).update(element, {
65104      options: (!active && this.getSharedOptions(options)) || options
65105    });
65106  }
65107  removeHoverStyle(element, datasetIndex, index) {
65108    this._setStyle(element, index, 'active', false);
65109  }
65110  setHoverStyle(element, datasetIndex, index) {
65111    this._setStyle(element, index, 'active', true);
65112  }
65113  _removeDatasetHoverStyle() {
65114    const element = this._cachedMeta.dataset;
65115    if (element) {
65116      this._setStyle(element, undefined, 'active', false);
65117    }
65118  }
65119  _setDatasetHoverStyle() {
65120    const element = this._cachedMeta.dataset;
65121    if (element) {
65122      this._setStyle(element, undefined, 'active', true);
65123    }
65124  }
65125  _resyncElements(resetNewElements) {
65126    const me = this;
65127    const data = me._data;
65128    const elements = me._cachedMeta.data;
65129    for (const [method, arg1, arg2] of me._syncList) {
65130      me[method](arg1, arg2);
65131    }
65132    me._syncList = [];
65133    const numMeta = elements.length;
65134    const numData = data.length;
65135    const count = Math.min(numData, numMeta);
65136    if (count) {
65137      me.parse(0, count);
65138    }
65139    if (numData > numMeta) {
65140      me._insertElements(numMeta, numData - numMeta, resetNewElements);
65141    } else if (numData < numMeta) {
65142      me._removeElements(numData, numMeta - numData);
65143    }
65144  }
65145  _insertElements(start, count, resetNewElements = true) {
65146    const me = this;
65147    const meta = me._cachedMeta;
65148    const data = meta.data;
65149    const end = start + count;
65150    let i;
65151    const move = (arr) => {
65152      arr.length += count;
65153      for (i = arr.length - 1; i >= end; i--) {
65154        arr[i] = arr[i - count];
65155      }
65156    };
65157    move(data);
65158    for (i = start; i < end; ++i) {
65159      data[i] = new me.dataElementType();
65160    }
65161    if (me._parsing) {
65162      move(meta._parsed);
65163    }
65164    me.parse(start, count);
65165    if (resetNewElements) {
65166      me.updateElements(data, start, count, 'reset');
65167    }
65168  }
65169  updateElements(element, start, count, mode) {}
65170  _removeElements(start, count) {
65171    const me = this;
65172    const meta = me._cachedMeta;
65173    if (me._parsing) {
65174      const removed = meta._parsed.splice(start, count);
65175      if (meta._stacked) {
65176        clearStacks(meta, removed);
65177      }
65178    }
65179    meta.data.splice(start, count);
65180  }
65181  _sync(args) {
65182    if (this._parsing) {
65183      this._syncList.push(args);
65184    } else {
65185      const [method, arg1, arg2] = args;
65186      this[method](arg1, arg2);
65187    }
65188  }
65189  _onDataPush() {
65190    const count = arguments.length;
65191    this._sync(['_insertElements', this.getDataset().data.length - count, count]);
65192  }
65193  _onDataPop() {
65194    this._sync(['_removeElements', this._cachedMeta.data.length - 1, 1]);
65195  }
65196  _onDataShift() {
65197    this._sync(['_removeElements', 0, 1]);
65198  }
65199  _onDataSplice(start, count) {
65200    this._sync(['_removeElements', start, count]);
65201    this._sync(['_insertElements', start, arguments.length - 2]);
65202  }
65203  _onDataUnshift() {
65204    this._sync(['_insertElements', 0, arguments.length]);
65205  }
65206}
65207DatasetController.defaults = {};
65208DatasetController.prototype.datasetElementType = null;
65209DatasetController.prototype.dataElementType = null;
65210
65211class Element {
65212  constructor() {
65213    this.x = undefined;
65214    this.y = undefined;
65215    this.active = false;
65216    this.options = undefined;
65217    this.$animations = undefined;
65218  }
65219  tooltipPosition(useFinalPosition) {
65220    const {x, y} = this.getProps(['x', 'y'], useFinalPosition);
65221    return {x, y};
65222  }
65223  hasValue() {
65224    return isNumber(this.x) && isNumber(this.y);
65225  }
65226  getProps(props, final) {
65227    const me = this;
65228    const anims = this.$animations;
65229    if (!final || !anims) {
65230      return me;
65231    }
65232    const ret = {};
65233    props.forEach(prop => {
65234      ret[prop] = anims[prop] && anims[prop].active() ? anims[prop]._to : me
vendor: 8,604 bytes, lines 65234-65522
65234[prop];
65235    });
65236    return ret;
65237  }
65238}
65239Element.defaults = {};
65240Element.defaultRoutes = undefined;
65241
65242const formatters = {
65243  values(value) {
65244    return isArray(value) ? value : '' + value;
65245  },
65246  numeric(tickValue, index, ticks) {
65247    if (tickValue === 0) {
65248      return '0';
65249    }
65250    const locale = this.chart.options.locale;
65251    let notation;
65252    let delta = tickValue;
65253    if (ticks.length > 1) {
65254      const maxTick = Math.max(Math.abs(ticks[0].value), Math.abs(ticks[ticks.length - 1].value));
65255      if (maxTick < 1e-4 || maxTick > 1e+15) {
65256        notation = 'scientific';
65257      }
65258      delta = calculateDelta(tickValue, ticks);
65259    }
65260    const logDelta = log10(Math.abs(delta));
65261    const numDecimal = Math.max(Math.min(-1 * Math.floor(logDelta), 20), 0);
65262    const options = {notation, minimumFractionDigits: numDecimal, maximumFractionDigits: numDecimal};
65263    Object.assign(options, this.options.ticks.format);
65264    return formatNumber(tickValue, locale, options);
65265  },
65266  logarithmic(tickValue, index, ticks) {
65267    if (tickValue === 0) {
65268      return '0';
65269    }
65270    const remain = tickValue / (Math.pow(10, Math.floor(log10(tickValue))));
65271    if (remain === 1 || remain === 2 || remain === 5) {
65272      return formatters.numeric.call(this, tickValue, index, ticks);
65273    }
65274    return '';
65275  }
65276};
65277function calculateDelta(tickValue, ticks) {
65278  let delta = ticks.length > 3 ? ticks[2].value - ticks[1].value : ticks[1].value - ticks[0].value;
65279  if (Math.abs(delta) >= 1 && tickValue !== Math.floor(tickValue)) {
65280    delta = tickValue - Math.floor(tickValue);
65281  }
65282  return delta;
65283}
65284var Ticks = {formatters};
65285
65286defaults.set('scale', {
65287  display: true,
65288  offset: false,
65289  reverse: false,
65290  beginAtZero: false,
65291  bounds: 'ticks',
65292  grace: 0,
65293  grid: {
65294    display: true,
65295    lineWidth: 1,
65296    drawBorder: true,
65297    drawOnChartArea: true,
65298    drawTicks: true,
65299    tickLength: 8,
65300    tickWidth: (_ctx, options) => options.lineWidth,
65301    tickColor: (_ctx, options) => options.color,
65302    offset: false,
65303    borderDash: [],
65304    borderDashOffset: 0.0,
65305    borderWidth: 1
65306  },
65307  title: {
65308    display: false,
65309    text: '',
65310    padding: {
65311      top: 4,
65312      bottom: 4
65313    }
65314  },
65315  ticks: {
65316    minRotation: 0,
65317    maxRotation: 50,
65318    mirror: false,
65319    textStrokeWidth: 0,
65320    textStrokeColor: '',
65321    padding: 3,
65322    display: true,
65323    autoSkip: true,
65324    autoSkipPadding: 3,
65325    labelOffset: 0,
65326    callback: Ticks.formatters.values,
65327    minor: {},
65328    major: {},
65329    align: 'center',
65330    crossAlign: 'near',
65331    showLabelBackdrop: false,
65332    backdropColor: 'rgba(255, 255, 255, 0.75)',
65333    backdropPadding: 2,
65334  }
65335});
65336defaults.route('scale.ticks', 'color', '', 'color');
65337defaults.route('scale.grid', 'color', '', 'borderColor');
65338defaults.route('scale.grid', 'borderColor', '', 'borderColor');
65339defaults.route('scale.title', 'color', '', 'color');
65340defaults.describe('scale', {
65341  _fallback: false,
65342  _scriptable: (name) => !name.startsWith('before') && !name.startsWith('after') && name !== 'callback' && name !== 'parser',
65343  _indexable: (name) => name !== 'borderDash' && name !== 'tickBorderDash',
65344});
65345defaults.describe('scales', {
65346  _fallback: 'scale',
65347});
65348defaults.describe('scale.ticks', {
65349  _scriptable: (name) => name !== 'backdropPadding' && name !== 'callback',
65350  _indexable: (name) => name !== 'backdropPadding',
65351});
65352
65353function autoSkip(scale, ticks) {
65354  const tickOpts = scale.options.ticks;
65355  const ticksLimit = tickOpts.maxTicksLimit || determineMaxTicks(scale);
65356  const majorIndices = tickOpts.major.enabled ? getMajorIndices(ticks) : [];
65357  const numMajorIndices = majorIndices.length;
65358  const first = majorIndices[0];
65359  const last = majorIndices[numMajorIndices - 1];
65360  const newTicks = [];
65361  if (numMajorIndices > ticksLimit) {
65362    skipMajors(ticks, newTicks, majorIndices, numMajorIndices / ticksLimit);
65363    return newTicks;
65364  }
65365  const spacing = calculateSpacing(majorIndices, ticks, ticksLimit);
65366  if (numMajorIndices > 0) {
65367    let i, ilen;
65368    const avgMajorSpacing = numMajorIndices > 1 ? Math.round((last - first) / (numMajorIndices - 1)) : null;
65369    skip(ticks, newTicks, spacing, isNullOrUndef(avgMajorSpacing) ? 0 : first - avgMajorSpacing, first);
65370    for (i = 0, ilen = numMajorIndices - 1; i < ilen; i++) {
65371      skip(ticks, newTicks, spacing, majorIndices[i], majorIndices[i + 1]);
65372    }
65373    skip(ticks, newTicks, spacing, last, isNullOrUndef(avgMajorSpacing) ? ticks.length : last + avgMajorSpacing);
65374    return newTicks;
65375  }
65376  skip(ticks, newTicks, spacing);
65377  return newTicks;
65378}
65379function determineMaxTicks(scale) {
65380  const offset = scale.options.offset;
65381  const tickLength = scale._tickSize();
65382  const maxScale = scale._length / tickLength + (offset ? 0 : 1);
65383  const maxChart = scale._maxLength / tickLength;
65384  return Math.floor(Math.min(maxScale, maxChart));
65385}
65386function calculateSpacing(majorIndices, ticks, ticksLimit) {
65387  const evenMajorSpacing = getEvenSpacing(majorIndices);
65388  const spacing = ticks.length / ticksLimit;
65389  if (!evenMajorSpacing) {
65390    return Math.max(spacing, 1);
65391  }
65392  const factors = _factorize(evenMajorSpacing);
65393  for (let i = 0, ilen = factors.length - 1; i < ilen; i++) {
65394    const factor = factors[i];
65395    if (factor > spacing) {
65396      return factor;
65397    }
65398  }
65399  return Math.max(spacing, 1);
65400}
65401function getMajorIndices(ticks) {
65402  const result = [];
65403  let i, ilen;
65404  for (i = 0, ilen = ticks.length; i < ilen; i++) {
65405    if (ticks[i].major) {
65406      result.push(i);
65407    }
65408  }
65409  return result;
65410}
65411function skipMajors(ticks, newTicks, majorIndices, spacing) {
65412  let count = 0;
65413  let next = majorIndices[0];
65414  let i;
65415  spacing = Math.ceil(spacing);
65416  for (i = 0; i < ticks.length; i++) {
65417    if (i === next) {
65418      newTicks.push(ticks[i]);
65419      count++;
65420      next = majorIndices[count * spacing];
65421    }
65422  }
65423}
65424function skip(ticks, newTicks, spacing, majorStart, majorEnd) {
65425  const start = valueOrDefault(majorStart, 0);
65426  const end = Math.min(valueOrDefault(majorEnd, ticks.length), ticks.length);
65427  let count = 0;
65428  let length, i, next;
65429  spacing = Math.ceil(spacing);
65430  if (majorEnd) {
65431    length = majorEnd - majorStart;
65432    spacing = length / Math.floor(length / spacing);
65433  }
65434  next = start;
65435  while (next < 0) {
65436    count++;
65437    next = Math.round(start + count * spacing);
65438  }
65439  for (i = Math.max(start, 0); i < end; i++) {
65440    if (i === next) {
65441      newTicks.push(ticks[i]);
65442      count++;
65443      next = Math.round(start + count * spacing);
65444    }
65445  }
65446}
65447function getEvenSpacing(arr) {
65448  const len = arr.length;
65449  let i, diff;
65450  if (len < 2) {
65451    return false;
65452  }
65453  for (diff = arr[0], i = 1; i < len; ++i) {
65454    if (arr[i] - arr[i - 1] !== diff) {
65455      return false;
65456    }
65457  }
65458  return diff;
65459}
65460
65461const reverseAlign = (align) => align === 'left' ? 'right' : align === 'right' ? 'left' : align;
65462const offsetFromEdge = (scale, edge, offset) => edge === 'top' || edge === 'left' ? scale[edge] + offset : scale[edge] - offset;
65463function sample(arr, numItems) {
65464  const result = [];
65465  const increment = arr.length / numItems;
65466  const len = arr.length;
65467  let i = 0;
65468  for (; i < len; i += increment) {
65469    result.push(arr[Math.floor(i)]);
65470  }
65471  return result;
65472}
65473function getPixelForGridLine(scale, index, offsetGridLines) {
65474  const length = scale.ticks.length;
65475  const validIndex = Math.min(index, length - 1);
65476  const start = scale._startPixel;
65477  const end = scale._endPixel;
65478  const epsilon = 1e-6;
65479  let lineValue = scale.getPixelForTick(validIndex);
65480  let offset;
65481  if (offsetGridLines) {
65482    if (length === 1) {
65483      offset = Math.max(lineValue - start, end - lineValue);
65484    } else if (index === 0) {
65485      offset = (scale.getPixelForTick(1) - lineValue) / 2;
65486    } else {
65487      offset = (lineValue - scale.getPixelForTick(validIndex - 1)) / 2;
65488    }
65489    lineValue += validIndex < index ? offset : -offset;
65490    if (lineValue < start - epsilon || lineValue > end + epsilon) {
65491      return;
65492    }
65493  }
65494  return lineValue;
65495}
65496function garbageCollect(caches, length) {
65497  each(caches, (cache) => {
65498    const gc = cache.gc;
65499    const gcLen = gc.length / 2;
65500    let i;
65501    if (gcLen > length) {
65502      for (i = 0; i < gcLen; ++i) {
65503        delete cache.data[gc[i]];
65504      }
65505      gc.splice(0, gcLen);
65506    }
65507  });
65508}
65509function getTickMarkLength(options) {
65510  return options.drawTicks ? options.tickLength : 0;
65511}
65512function getTitleHeight(options, fallback) {
65513  if (!options.display) {
65514    return 0;
65515  }
65516  const font = toFont(options.font, fallback);
65517  const padding = toPadding(options.padding);
65518  const lines = isArray(options.text) ? options.text.length : 1;
65519  return (lines * font.lineHeight) + padding.height;
65520}
65521function createScaleContext(parent, scale) {
65522  return 
vendor: 2,853 bytes, lines 65522-65615
65522Object.assign(Object.create(parent), {
65523    scale,
65524    type: 'scale'
65525  });
65526}
65527function createTickContext(parent, index, tick) {
65528  return Object.assign(Object.create(parent), {
65529    tick,
65530    index,
65531    type: 'tick'
65532  });
65533}
65534function titleAlign(align, position, reverse) {
65535  let ret = _toLeftRightCenter(align);
65536  if ((reverse && position !== 'right') || (!reverse && position === 'right')) {
65537    ret = reverseAlign(ret);
65538  }
65539  return ret;
65540}
65541function titleArgs(scale, offset, position, align) {
65542  const {top, left, bottom, right, chart} = scale;
65543  const {chartArea, scales} = chart;
65544  let rotation = 0;
65545  let maxWidth, titleX, titleY;
65546  const height = bottom - top;
65547  const width = right - left;
65548  if (scale.isHorizontal()) {
65549    titleX = _alignStartEnd(align, left, right);
65550    if (isObject(position)) {
65551      const positionAxisID = Object.keys(position)[0];
65552      const value = position[positionAxisID];
65553      titleY = scales[positionAxisID].getPixelForValue(value) + height - offset;
65554    } else if (position === 'center') {
65555      titleY = (chartArea.bottom + chartArea.top) / 2 + height - offset;
65556    } else {
65557      titleY = offsetFromEdge(scale, position, offset);
65558    }
65559    maxWidth = right - left;
65560  } else {
65561    if (isObject(position)) {
65562      const positionAxisID = Object.keys(position)[0];
65563      const value = position[positionAxisID];
65564      titleX = scales[positionAxisID].getPixelForValue(value) - width + offset;
65565    } else if (position === 'center') {
65566      titleX = (chartArea.left + chartArea.right) / 2 - width + offset;
65567    } else {
65568      titleX = offsetFromEdge(scale, position, offset);
65569    }
65570    titleY = _alignStartEnd(align, bottom, top);
65571    rotation = position === 'left' ? -HALF_PI : HALF_PI;
65572  }
65573  return {titleX, titleY, maxWidth, rotation};
65574}
65575class Scale extends Element {
65576  constructor(cfg) {
65577    super();
65578    this.id = cfg.id;
65579    this.type = cfg.type;
65580    this.options = undefined;
65581    this.ctx = cfg.ctx;
65582    this.chart = cfg.chart;
65583    this.top = undefined;
65584    this.bottom = undefined;
65585    this.left = undefined;
65586    this.right = undefined;
65587    this.width = undefined;
65588    this.height = undefined;
65589    this._margins = {
65590      left: 0,
65591      right: 0,
65592      top: 0,
65593      bottom: 0
65594    };
65595    this.maxWidth = undefined;
65596    this.maxHeight = undefined;
65597    this.paddingTop = undefined;
65598    this.paddingBottom = undefined;
65599    this.paddingLeft = undefined;
65600    this.paddingRight = undefined;
65601    this.axis = undefined;
65602    this.labelRotation = undefined;
65603    this.min = undefined;
65604    this.max = undefined;
65605    this._range = undefined;
65606    this.ticks = [];
65607    this._gridLineItems = null;
65608    this._labelItems = null;
65609    this._labelSizes = null;
65610    this._length = 0;
65611    this._maxLength = 0;
65612    this._longestTextCache = {};
65613    this._startPixel = undefined;
65614    this._endPixel = undefined;
65615    this._reversePixels = false;
65616    this._userMax = undefined;
65617    this._userMin = undefined;
65618    this._suggestedMax = undefined;
65619    this._suggestedMin = undefined;
65620    this._ticksLength = 0;
65621    this._borderValue = 0;
65622    this._cache = {};
65623    this._dataLimitsCached = false;
65624    this.$context = undefined;
65625  }
65626  init(options) {
65627    const me = this;
65628    me.options = options.setContext(me.getContext());
65629    me.axis = options.axis;
65630    me._userMin = me.parse(options.min);
65631    me._userMax = me.parse(options.max);
65632    me._suggestedMin = me.parse(options.suggestedMin);
65633    me._suggestedMax = me.parse(options.suggestedMax);
65634  }
65635  parse(raw, index) {
65636    return raw;
65637  }
65638  getUserBounds() {
65639    let {_userMin, _userMax, _suggestedMin, _suggestedMax} = this;
65640    _userMin = finiteOrDefault(_userMin, Number.POSITIVE_INFINITY);
65641    _userMax = finiteOrDefault(_userMax, Number.NEGATIVE_INFINITY);
65642    _suggestedMin = finiteOrDefault(_suggestedMin, Number.POSITIVE_INFINITY);
65643    _suggestedMax = finiteOrDefault(_suggestedMax, Number.NEGATIVE_INFINITY);
65644    return {
65645      min: finiteOrDefault(_userMin, _suggestedMin),
65646      max: finiteOrDefault(_userMax, _suggestedMax),
65647      minDefined: isNumberFinite(_userMin),
65648      maxDefined: isNumberFinite(_userMax)
65649    };
65650  }
65651  getMinMax(canStack) {
65652    const me = this;
65653    let {min, max, minDefined, maxDefined} = me.getUserBounds();
65654    let range;
65655    if (minDefined && maxDefined) {
65656      return {min, max};
65657    }
65658    const metas = me.getMatchingVisibleMetas();
65659    for (let i = 0, ilen = metas.length; i < ilen; ++i) {
65660      range = metas[i].controller.getMinMax(me, canStack);
65661      if (!minDefined) {
65662        min = Math.min(min, range.min);
65663      }
65664      if (!maxDefined) {
65665        max = Math.max(max, range.max);
65666      }
65667    }
65668    return {
65669      min: finiteOrDefault(min, finiteOrDefault(max, min)),
65670      max: finiteOrDefault(max, finiteOrDefault(min, max))
65671    };
65672  }
65673  getPadding() {
65674    const me = this;
65675    return {
65676      left: me.paddingLeft || 0,
65677      top: me.paddingTop || 0,
65678      right: me.paddingRight || 0,
65679      bottom: me.paddingBottom || 0
65680    };
65681  }
65682  getTicks() {
65683    return this.ticks;
65684  }
65685  getLabels() {
65686    const data = this.chart.data;
65687    return this.options.labels || (this.isHorizontal() ? data.xLabels : data.yLabels) || data.labels || [];
65688  }
65689  beforeLayout() {
65690    this._cache = {};
65691    this._dataLimitsCached = false;
65692  }
65693  beforeUpdate() {
65694    callback(this.options.beforeUpdate, [this]);
65695  }
65696  update(maxWidth, maxHeight, margins) {
65697    const me = this;
65698    const tickOpts = me.options.ticks;
65699    const sampleSize = tickOpts.sampleSize;
65700    me.beforeUpdate();
65701    me.maxWidth = maxWidth;
65702    me.maxHeight = maxHeight;
65703    me._margins = margins = Object.assign({
65704      left: 0,
65705      right: 0,
65706      top: 0,
65707      bottom: 0
65708    }, margins);
65709    me.ticks = null;
65710    me._labelSizes = null;
65711    me._gridLineItems = null;
65712    me._labelItems = null;
65713    me.beforeSetDimensions();
65714    me.setDimensions();
65715    me.afterSetDimensions();
65716    me._maxLength = me.isHorizontal()
65717      ? me.width + margins.left + margins.right
65718      : me.height + margins.top + margins.bottom;
65719    if (!me._dataLimitsCached) {
65720      me.beforeDataLimits();
65721      me.determineDataLimits();
65722      me.afterDataLimits();
65723      me._range = _addGrace(me, me.options.grace);
65724      me._dataLimitsCached = true;
65725    }
65726    me.beforeBuildTicks();
65727    me.ticks = me.buildTicks() || [];
65728    me.afterBuildTicks();
65729    const samplingEnabled = sampleSize < me.ticks.length;
65730    me._convertTicksToLabels(samplingEnabled ? sample(me.ticks, sampleSize) : me.ticks);
65731    me.configure();
65732    me.beforeCalculateLabelRotation();
65733    me.calculateLabelRotation();
65734    me.afterCalculateLabelRotation();
65735    if (tickOpts.display && (tickOpts.autoSkip || tickOpts.source === 'auto')) {
65736      me.ticks = autoSkip(me, me.ticks);
65737      me._labelSizes = null;
65738    }
65739    if (samplingEnabled) {
65740      me._convertTicksToLabels(me.ticks);
65741    }
65742    me.beforeFit();
65743    me.fit();
65744    me.afterFit();
65745    me.afterUpdate();
65746  }
65747  configure() {
65748    const me = this;
65749    let reversePixels = me.options.reverse;
65750    let startPixel, endPixel;
65751    if (me.isHorizontal()) {
65752      startPixel = me.left;
65753      endPixel = me.right;
65754    } else {
65755      startPixel = me.top;
65756      endPixel = me.bottom;
65757      reversePixels = !reversePixels;
65758    }
65759    me._startPixel = startPixel;
65760    me._endPixel = endPixel;
65761    me._reversePixels = reversePixels;
65762    me._length = endPixel - startPixel;
65763    me._alignToPixels = me.options.alignToPixels;
65764  }
65765  afterUpdate() {
65766    callback(this.options.afterUpdate, [this]);
65767  }
65768  beforeSetDimensions() {
65769    callback(this.options.beforeSetDimensions, [this]);
65770  }
65771  setDimensions() {
65772    const me = this;
65773    if (me.isHorizontal()) {
65774      me.width = me.maxWidth;
65775      me.left = 0;
65776      me.right = me.width;
65777    } else {
65778      me.height = me.maxHeight;
65779      me.top = 0;
65780      me.bottom = me.height;
65781    }
65782    me.paddingLeft = 0;
65783    me.paddingTop = 0;
65784    me.paddingRight = 0;
65785    me.paddingBottom = 0;
65786  }
65787  afterSetDimensions() {
65788    callback(this.options.afterSetDimensions, [this]);
65789  }
65790  _callHooks(name) {
65791    const me = this;
65792    me.chart.notifyPlugins(name, me.getContext());
65793    callback(me.options[name], [me]);
65794  }
65795  beforeDataLimits() {
65796    this._callHooks('beforeDataLimits');
65797  }
65798  determineDataLimits() {}
65799  afterDataLimits() {
65800    this._callHooks('afterDataLimits');
65801  }
65802  beforeBuildTicks() {
65803    this._callHooks('beforeBuildTicks');
65804  }
65805  buildTicks() {
65806    return [];
65807  }
65808  afterBuildTicks() {
65809    this._callHooks('afterBuildTicks');
65810  }
65811  beforeTickToLabelConversion() {
65812    callback(this.options.beforeTickToLabelConversion, [this]);
65813  }
65814  generateTickLabels(ticks) {
65815    const me = this;
65816    const tickOpts = me.options.ticks;
65817    let i, ilen, tick;
65818    for (i = 0, ilen = ticks.length; i < ilen; i++) {
65819      tick = ticks[i];
65820      tick.label = callback(tickOpts.callback, [tick.value, i, ticks], me);
65821    }
65822  }
65823  afterTickToLabelConversion() {
65824    callback(this.options.afterTickToLabelConversion, [this]);
65825  }
65826  beforeCalculateLabelRotation() {
65827    callback(this.options.beforeCalculateLabelRotation, [this]);
65828  }
65829  calculateLabelRotation() {
65830    const me = this;
65831    const options = me.options;
65832    const tickOpts = options.ticks;
65833    const numTicks = me.ticks.length;
65834    const minRotation = tickOpts.minRotation || 0;
65835    const maxRotation = tickOpts.maxRotation;
65836    let labelRotation = minRotation;
65837    let tickWidth, maxHeight, maxLabelDiagonal;
65838    if (!me._isVisible() || !tickOpts.display || minRotation >= maxRotation || numTicks <= 1 || !me.isHorizontal()) {
65839      me.labelRotation = minRotation;
65840      return;
65841    }
65842    const labelSizes = me._getLabelSizes();
65843    const maxLabelWidth = labelSizes.widest.width;
65844    const maxLabelHeight = labelSizes.highest.height;
65845    const maxWidth = _limitValue(me.chart.width - maxLabelWidth, 0, me.maxWidth);
65846    tickWidth = options.offset ? me.maxWidth / numTicks : maxWidth / (numTicks - 1);
65847    if (maxLabelWidth + 6 > tickWidth) {
65848      tickWidth = maxWidth / (numTicks - (options.offset ? 0.5 : 1));
65849      maxHeight = me.maxHeight - getTickMarkLength(options.grid)
65850				- tickOpts.padding - getTitleHeight(options.title, me.chart.options.font);
65851      maxLabelDiagonal = Math.sqrt(maxLabelWidth * maxLabelWidth + maxLabelHeight * maxLabelHeight);
65852      labelRotation = toDegrees(Math.min(
65853        Math.asin(_limitValue((labelSizes.highest.height + 6) / tickWidth, -1, 1)),
65854        Math.asin(_limitValue(maxHeight / maxLabelDiagonal, -1, 1)) - Math.asin(_limitValue(maxLabelHeight / maxLabelDiagonal, -1, 1))
65855      ));
65856      labelRotation = Math.max(minRotation, Math.min(maxRotation, labelRotation));
65857    }
65858    me.labelRotation = labelRotation;
65859  }
65860  afterCalculateLabelRotation() {
65861    callback(this.options.afterCalculateLabelRotation, [this]);
65862  }
65863  beforeFit() {
65864    callback(this.options.beforeFit, [this]);
65865  }
65866  fit() {
65867    const me = this;
65868    const minSize = {
65869      width: 0,
65870      height: 0
65871    };
65872    const {chart, options: {ticks: tickOpts, title: titleOpts, grid: gridOpts}} = me;
65873    const display = me._isVisible();
65874    const isHorizontal = me.isHorizontal();
65875    if (display) {
65876      const titleHeight = getTitleHeight(titleOpts, chart.options.font);
65877      if (isHorizontal) {
65878        minSize.width = me.maxWidth;
65879        minSize.height = getTickMarkLength(gridOpts) + titleHeight;
65880      } else {
65881        minSize.height = me.maxHeight;
65882        minSize.width = getTickMarkLength(gridOpts) + titleHeight;
65883      }
65884      if (tickOpts.display && me.ticks.length) {
65885        const {first, last, widest, highest} = me._getLabelSizes();
65886        const tickPadding = tickOpts.padding * 2;
65887        const angleRadians = toRadians(me.labelRotation);
65888        const cos = Math.cos(angleRadians);
65889        const sin = Math.sin(angleRadians);
65890        if (isHorizontal) {
65891          const labelHeight = tickOpts.mirror ? 0 : sin * widest.width + cos * highest.height;
65892          minSize.height = Math.min(me.maxHeight, minSize.height + labelHeight + tickPadding);
65893        } else {
65894          const labelWidth = tickOpts.mirror ? 0 : cos * widest.width + sin * highest.height;
65895          minSize.width = Math.min(me.maxWidth, minSize.width + labelWidth + tickPadding);
65896        }
65897        me._calculatePadding(first, last, sin, cos);
65898      }
65899    }
65900    me._handleMargins();
65901    if (isHorizontal) {
65902      me.width = me._length = chart.width - me._margins.left - me._margins.right;
65903      me.height = minSize.height;
65904    } else {
65905      me.width = minSize.width;
65906      me.height = me._length = chart.height - me._margins.top - me._margins.bottom;
65907    }
65908  }
65909  _calculatePadding(first, last, sin, cos) {
65910    const me = this;
65911    const {ticks: {align, padding}, position} = me.options;
65912    const isRotated = me.labelRotation !== 0;
65913    const labelsBelowTicks = position !== 'top' && me.axis === 'x';
65914    if (me.isHorizontal()) {
65915      const offsetLeft = me.getPixelForTick(0) - me.left;
65916      const offsetRight = me.right - me.getPixelForTick(me.ticks.length - 1);
65917      let paddingLeft = 0;
65918      let paddingRight = 0;
65919      if (isRotated) {
65920        if (labelsBelowTicks) {
65921          paddingLeft = cos * first.width;
65922          paddingRight = sin * last.height;
65923        } else {
65924          paddingLeft = sin * first.height;
65925          paddingRight = cos * last.width;
65926        }
65927      } else if (align === 'start') {
65928        paddingRight = last.width;
65929      } else if (align === 'end') {
vendor: 16,384 bytes, lines 65930-66413
65930        paddingLeft = first.width;
65931      } else {
65932        paddingLeft = first.width / 2;
65933        paddingRight = last.width / 2;
65934      }
65935      me.paddingLeft = Math.max((paddingLeft - offsetLeft + padding) * me.width / (me.width - offsetLeft), 0);
65936      me.paddingRight = Math.max((paddingRight - offsetRight + padding) * me.width / (me.width - offsetRight), 0);
65937    } else {
65938      let paddingTop = last.height / 2;
65939      let paddingBottom = first.height / 2;
65940      if (align === 'start') {
65941        paddingTop = 0;
65942        paddingBottom = first.height;
65943      } else if (align === 'end') {
65944        paddingTop = last.height;
65945        paddingBottom = 0;
65946      }
65947      me.paddingTop = paddingTop + padding;
65948      me.paddingBottom = paddingBottom + padding;
65949    }
65950  }
65951  _handleMargins() {
65952    const me = this;
65953    if (me._margins) {
65954      me._margins.left = Math.max(me.paddingLeft, me._margins.left);
65955      me._margins.top = Math.max(me.paddingTop, me._margins.top);
65956      me._margins.right = Math.max(me.paddingRight, me._margins.right);
65957      me._margins.bottom = Math.max(me.paddingBottom, me._margins.bottom);
65958    }
65959  }
65960  afterFit() {
65961    callback(this.options.afterFit, [this]);
65962  }
65963  isHorizontal() {
65964    const {axis, position} = this.options;
65965    return position === 'top' || position === 'bottom' || axis === 'x';
65966  }
65967  isFullSize() {
65968    return this.options.fullSize;
65969  }
65970  _convertTicksToLabels(ticks) {
65971    const me = this;
65972    me.beforeTickToLabelConversion();
65973    me.generateTickLabels(ticks);
65974    let i, ilen;
65975    for (i = 0, ilen = ticks.length; i < ilen; i++) {
65976      if (isNullOrUndef(ticks[i].label)) {
65977        ticks.splice(i, 1);
65978        ilen--;
65979        i--;
65980      }
65981    }
65982    me.afterTickToLabelConversion();
65983  }
65984  _getLabelSizes() {
65985    const me = this;
65986    let labelSizes = me._labelSizes;
65987    if (!labelSizes) {
65988      const sampleSize = me.options.ticks.sampleSize;
65989      let ticks = me.ticks;
65990      if (sampleSize < ticks.length) {
65991        ticks = sample(ticks, sampleSize);
65992      }
65993      me._labelSizes = labelSizes = me._computeLabelSizes(ticks, ticks.length);
65994    }
65995    return labelSizes;
65996  }
65997  _computeLabelSizes(ticks, length) {
65998    const {ctx, _longestTextCache: caches} = this;
65999    const widths = [];
66000    const heights = [];
66001    let widestLabelSize = 0;
66002    let highestLabelSize = 0;
66003    let i, j, jlen, label, tickFont, fontString, cache, lineHeight, width, height, nestedLabel;
66004    for (i = 0; i < length; ++i) {
66005      label = ticks[i].label;
66006      tickFont = this._resolveTickFontOptions(i);
66007      ctx.font = fontString = tickFont.string;
66008      cache = caches[fontString] = caches[fontString] || {data: {}, gc: []};
66009      lineHeight = tickFont.lineHeight;
66010      width = height = 0;
66011      if (!isNullOrUndef(label) && !isArray(label)) {
66012        width = _measureText(ctx, cache.data, cache.gc, width, label);
66013        height = lineHeight;
66014      } else if (isArray(label)) {
66015        for (j = 0, jlen = label.length; j < jlen; ++j) {
66016          nestedLabel = label[j];
66017          if (!isNullOrUndef(nestedLabel) && !isArray(nestedLabel)) {
66018            width = _measureText(ctx, cache.data, cache.gc, width, nestedLabel);
66019            height += lineHeight;
66020          }
66021        }
66022      }
66023      widths.push(width);
66024      heights.push(height);
66025      widestLabelSize = Math.max(width, widestLabelSize);
66026      highestLabelSize = Math.max(height, highestLabelSize);
66027    }
66028    garbageCollect(caches, length);
66029    const widest = widths.indexOf(widestLabelSize);
66030    const highest = heights.indexOf(highestLabelSize);
66031    const valueAt = (idx) => ({width: widths[idx] || 0, height: heights[idx] || 0});
66032    return {
66033      first: valueAt(0),
66034      last: valueAt(length - 1),
66035      widest: valueAt(widest),
66036      highest: valueAt(highest),
66037      widths,
66038      heights,
66039    };
66040  }
66041  getLabelForValue(value) {
66042    return value;
66043  }
66044  getPixelForValue(value, index) {
66045    return NaN;
66046  }
66047  getValueForPixel(pixel) {}
66048  getPixelForTick(index) {
66049    const ticks = this.ticks;
66050    if (index < 0 || index > ticks.length - 1) {
66051      return null;
66052    }
66053    return this.getPixelForValue(ticks[index].value);
66054  }
66055  getPixelForDecimal(decimal) {
66056    const me = this;
66057    if (me._reversePixels) {
66058      decimal = 1 - decimal;
66059    }
66060    const pixel = me._startPixel + decimal * me._length;
66061    return _int16Range(me._alignToPixels ? _alignPixel(me.chart, pixel, 0) : pixel);
66062  }
66063  getDecimalForPixel(pixel) {
66064    const decimal = (pixel - this._startPixel) / this._length;
66065    return this._reversePixels ? 1 - decimal : decimal;
66066  }
66067  getBasePixel() {
66068    return this.getPixelForValue(this.getBaseValue());
66069  }
66070  getBaseValue() {
66071    const {min, max} = this;
66072    return min < 0 && max < 0 ? max :
66073      min > 0 && max > 0 ? min :
66074      0;
66075  }
66076  getContext(index) {
66077    const me = this;
66078    const ticks = me.ticks || [];
66079    if (index >= 0 && index < ticks.length) {
66080      const tick = ticks[index];
66081      return tick.$context ||
66082				(tick.$context = createTickContext(me.getContext(), index, tick));
66083    }
66084    return me.$context ||
66085			(me.$context = createScaleContext(me.chart.getContext(), me));
66086  }
66087  _tickSize() {
66088    const me = this;
66089    const optionTicks = me.options.ticks;
66090    const rot = toRadians(me.labelRotation);
66091    const cos = Math.abs(Math.cos(rot));
66092    const sin = Math.abs(Math.sin(rot));
66093    const labelSizes = me._getLabelSizes();
66094    const padding = optionTicks.autoSkipPadding || 0;
66095    const w = labelSizes ? labelSizes.widest.width + padding : 0;
66096    const h = labelSizes ? labelSizes.highest.height + padding : 0;
66097    return me.isHorizontal()
66098      ? h * cos > w * sin ? w / cos : h / sin
66099      : h * sin < w * cos ? h / cos : w / sin;
66100  }
66101  _isVisible() {
66102    const display = this.options.display;
66103    if (display !== 'auto') {
66104      return !!display;
66105    }
66106    return this.getMatchingVisibleMetas().length > 0;
66107  }
66108  _computeGridLineItems(chartArea) {
66109    const me = this;
66110    const axis = me.axis;
66111    const chart = me.chart;
66112    const options = me.options;
66113    const {grid, position} = options;
66114    const offset = grid.offset;
66115    const isHorizontal = me.isHorizontal();
66116    const ticks = me.ticks;
66117    const ticksLength = ticks.length + (offset ? 1 : 0);
66118    const tl = getTickMarkLength(grid);
66119    const items = [];
66120    const borderOpts = grid.setContext(me.getContext());
66121    const axisWidth = borderOpts.drawBorder ? borderOpts.borderWidth : 0;
66122    const axisHalfWidth = axisWidth / 2;
66123    const alignBorderValue = function(pixel) {
66124      return _alignPixel(chart, pixel, axisWidth);
66125    };
66126    let borderValue, i, lineValue, alignedLineValue;
66127    let tx1, ty1, tx2, ty2, x1, y1, x2, y2;
66128    if (position === 'top') {
66129      borderValue = alignBorderValue(me.bottom);
66130      ty1 = me.bottom - tl;
66131      ty2 = borderValue - axisHalfWidth;
66132      y1 = alignBorderValue(chartArea.top) + axisHalfWidth;
66133      y2 = chartArea.bottom;
66134    } else if (position === 'bottom') {
66135      borderValue = alignBorderValue(me.top);
66136      y1 = chartArea.top;
66137      y2 = alignBorderValue(chartArea.bottom) - axisHalfWidth;
66138      ty1 = borderValue + axisHalfWidth;
66139      ty2 = me.top + tl;
66140    } else if (position === 'left') {
66141      borderValue = alignBorderValue(me.right);
66142      tx1 = me.right - tl;
66143      tx2 = borderValue - axisHalfWidth;
66144      x1 = alignBorderValue(chartArea.left) + axisHalfWidth;
66145      x2 = chartArea.right;
66146    } else if (position === 'right') {
66147      borderValue = alignBorderValue(me.left);
66148      x1 = chartArea.left;
66149      x2 = alignBorderValue(chartArea.right) - axisHalfWidth;
66150      tx1 = borderValue + axisHalfWidth;
66151      tx2 = me.left + tl;
66152    } else if (axis === 'x') {
66153      if (position === 'center') {
66154        borderValue = alignBorderValue((chartArea.top + chartArea.bottom) / 2 + 0.5);
66155      } else if (isObject(position)) {
66156        const positionAxisID = Object.keys(position)[0];
66157        const value = position[positionAxisID];
66158        borderValue = alignBorderValue(me.chart.scales[positionAxisID].getPixelForValue(value));
66159      }
66160      y1 = chartArea.top;
66161      y2 = chartArea.bottom;
66162      ty1 = borderValue + axisHalfWidth;
66163      ty2 = ty1 + tl;
66164    } else if (axis === 'y') {
66165      if (position === 'center') {
66166        borderValue = alignBorderValue((chartArea.left + chartArea.right) / 2);
66167      } else if (isObject(position)) {
66168        const positionAxisID = Object.keys(position)[0];
66169        const value = position[positionAxisID];
66170        borderValue = alignBorderValue(me.chart.scales[positionAxisID].getPixelForValue(value));
66171      }
66172      tx1 = borderValue - axisHalfWidth;
66173      tx2 = tx1 - tl;
66174      x1 = chartArea.left;
66175      x2 = chartArea.right;
66176    }
66177    const limit = valueOrDefault(options.ticks.maxTicksLimit, ticksLength);
66178    const step = Math.max(1, Math.ceil(ticksLength / limit));
66179    for (i = 0; i < ticksLength; i += step) {
66180      const optsAtIndex = grid.setContext(me.getContext(i));
66181      const lineWidth = optsAtIndex.lineWidth;
66182      const lineColor = optsAtIndex.color;
66183      const borderDash = grid.borderDash || [];
66184      const borderDashOffset = optsAtIndex.borderDashOffset;
66185      const tickWidth = optsAtIndex.tickWidth;
66186      const tickColor = optsAtIndex.tickColor;
66187      const tickBorderDash = optsAtIndex.tickBorderDash || [];
66188      const tickBorderDashOffset = optsAtIndex.tickBorderDashOffset;
66189      lineValue = getPixelForGridLine(me, i, offset);
66190      if (lineValue === undefined) {
66191        continue;
66192      }
66193      alignedLineValue = _alignPixel(chart, lineValue, lineWidth);
66194      if (isHorizontal) {
66195        tx1 = tx2 = x1 = x2 = alignedLineValue;
66196      } else {
66197        ty1 = ty2 = y1 = y2 = alignedLineValue;
66198      }
66199      items.push({
66200        tx1,
66201        ty1,
66202        tx2,
66203        ty2,
66204        x1,
66205        y1,
66206        x2,
66207        y2,
66208        width: lineWidth,
66209        color: lineColor,
66210        borderDash,
66211        borderDashOffset,
66212        tickWidth,
66213        tickColor,
66214        tickBorderDash,
66215        tickBorderDashOffset,
66216      });
66217    }
66218    me._ticksLength = ticksLength;
66219    me._borderValue = borderValue;
66220    return items;
66221  }
66222  _computeLabelItems(chartArea) {
66223    const me = this;
66224    const axis = me.axis;
66225    const options = me.options;
66226    const {position, ticks: optionTicks} = options;
66227    const isHorizontal = me.isHorizontal();
66228    const ticks = me.ticks;
66229    const {align, crossAlign, padding, mirror} = optionTicks;
66230    const tl = getTickMarkLength(options.grid);
66231    const tickAndPadding = tl + padding;
66232    const hTickAndPadding = mirror ? -padding : tickAndPadding;
66233    const rotation = -toRadians(me.labelRotation);
66234    const items = [];
66235    let i, ilen, tick, label, x, y, textAlign, pixel, font, lineHeight, lineCount, textOffset;
66236    let textBaseline = 'middle';
66237    if (position === 'top') {
66238      y = me.bottom - hTickAndPadding;
66239      textAlign = me._getXAxisLabelAlignment();
66240    } else if (position === 'bottom') {
66241      y = me.top + hTickAndPadding;
66242      textAlign = me._getXAxisLabelAlignment();
66243    } else if (position === 'left') {
66244      const ret = me._getYAxisLabelAlignment(tl);
66245      textAlign = ret.textAlign;
66246      x = ret.x;
66247    } else if (position === 'right') {
66248      const ret = me._getYAxisLabelAlignment(tl);
66249      textAlign = ret.textAlign;
66250      x = ret.x;
66251    } else if (axis === 'x') {
66252      if (position === 'center') {
66253        y = ((chartArea.top + chartArea.bottom) / 2) + tickAndPadding;
66254      } else if (isObject(position)) {
66255        const positionAxisID = Object.keys(position)[0];
66256        const value = position[positionAxisID];
66257        y = me.chart.scales[positionAxisID].getPixelForValue(value) + tickAndPadding;
66258      }
66259      textAlign = me._getXAxisLabelAlignment();
66260    } else if (axis === 'y') {
66261      if (position === 'center') {
66262        x = ((chartArea.left + chartArea.right) / 2) - tickAndPadding;
66263      } else if (isObject(position)) {
66264        const positionAxisID = Object.keys(position)[0];
66265        const value = position[positionAxisID];
66266        x = me.chart.scales[positionAxisID].getPixelForValue(value);
66267      }
66268      textAlign = me._getYAxisLabelAlignment(tl).textAlign;
66269    }
66270    if (axis === 'y') {
66271      if (align === 'start') {
66272        textBaseline = 'top';
66273      } else if (align === 'end') {
66274        textBaseline = 'bottom';
66275      }
66276    }
66277    const labelSizes = me._getLabelSizes();
66278    for (i = 0, ilen = ticks.length; i < ilen; ++i) {
66279      tick = ticks[i];
66280      label = tick.label;
66281      const optsAtIndex = optionTicks.setContext(me.getContext(i));
66282      pixel = me.getPixelForTick(i) + optionTicks.labelOffset;
66283      font = me._resolveTickFontOptions(i);
66284      lineHeight = font.lineHeight;
66285      lineCount = isArray(label) ? label.length : 1;
66286      const halfCount = lineCount / 2;
66287      const color = optsAtIndex.color;
66288      const strokeColor = optsAtIndex.textStrokeColor;
66289      const strokeWidth = optsAtIndex.textStrokeWidth;
66290      if (isHorizontal) {
66291        x = pixel;
66292        if (position === 'top') {
66293          if (crossAlign === 'near' || rotation !== 0) {
66294            textOffset = -lineCount * lineHeight + lineHeight / 2;
66295          } else if (crossAlign === 'center') {
66296            textOffset = -labelSizes.highest.height / 2 - halfCount * lineHeight + lineHeight;
66297          } else {
66298            textOffset = -labelSizes.highest.height + lineHeight / 2;
66299          }
66300        } else {
66301          if (crossAlign === 'near' || rotation !== 0) {
66302            textOffset = lineHeight / 2;
66303          } else if (crossAlign === 'center') {
66304            textOffset = labelSizes.highest.height / 2 - halfCount * lineHeight;
66305          } else {
66306            textOffset = labelSizes.highest.height - lineCount * lineHeight;
66307          }
66308        }
66309        if (mirror) {
66310          textOffset *= -1;
66311        }
66312      } else {
66313        y = pixel;
66314        textOffset = (1 - lineCount) * lineHeight / 2;
66315      }
66316      let backdrop;
66317      if (optsAtIndex.showLabelBackdrop) {
66318        const labelPadding = toPadding(optsAtIndex.backdropPadding);
66319        const height = labelSizes.heights[i];
66320        const width = labelSizes.widths[i];
66321        let top = y + textOffset - labelPadding.top;
66322        let left = x - labelPadding.left;
66323        switch (textBaseline) {
66324        case 'middle':
66325          top -= height / 2;
66326          break;
66327        case 'bottom':
66328          top -= height;
66329          break;
66330        }
66331        switch (textAlign) {
66332        case 'center':
66333          left -= width / 2;
66334          break;
66335        case 'right':
66336          left -= width;
66337          break;
66338        }
66339        backdrop = {
66340          left,
66341          top,
66342          width: width + labelPadding.width,
66343          height: height + labelPadding.height,
66344          color: optsAtIndex.backdropColor,
66345        };
66346      }
66347      items.push({
66348        rotation,
66349        label,
66350        font,
66351        color,
66352        strokeColor,
66353        strokeWidth,
66354        textOffset,
66355        textAlign,
66356        textBaseline,
66357        translation: [x, y],
66358        backdrop,
66359      });
66360    }
66361    return items;
66362  }
66363  _getXAxisLabelAlignment() {
66364    const me = this;
66365    const {position, ticks} = me.options;
66366    const rotation = -toRadians(me.labelRotation);
66367    if (rotation) {
66368      return position === 'top' ? 'left' : 'right';
66369    }
66370    let align = 'center';
66371    if (ticks.align === 'start') {
66372      align = 'left';
66373    } else if (ticks.align === 'end') {
66374      align = 'right';
66375    }
66376    return align;
66377  }
66378  _getYAxisLabelAlignment(tl) {
66379    const me = this;
66380    const {position, ticks: {crossAlign, mirror, padding}} = me.options;
66381    const labelSizes = me._getLabelSizes();
66382    const tickAndPadding = tl + padding;
66383    const widest = labelSizes.widest.width;
66384    let textAlign;
66385    let x;
66386    if (position === 'left') {
66387      if (mirror) {
66388        x = me.right + padding;
66389        if (crossAlign === 'near') {
66390          textAlign = 'left';
66391        } else if (crossAlign === 'center') {
66392          textAlign = 'center';
66393          x += (widest / 2);
66394        } else {
66395          textAlign = 'right';
66396          x += widest;
66397        }
66398      } else {
66399        x = me.right - tickAndPadding;
66400        if (crossAlign === 'near') {
66401          textAlign = 'right';
66402        } else if (crossAlign === 'center') {
66403          textAlign = 'center';
66404          x -= (widest / 2);
66405        } else {
66406          textAlign = 'left';
66407          x = me.left;
66408        }
66409      }
66410    } else if (position === 'right') {
66411      if (mirror) {
66412        x = me.left + padding;
66413        if (crossAlign === 'near
66413') {
66414          textAlign = 'right';
66415        } else if (crossAlign === 'center') {
66416          textAlign = 'center';
66417          x -= (widest / 2);
66418        } else {
66419          textAlign = 'left';
66420          x -= widest;
66421        }
66422      } else {
66423        x = me.left + tickAndPadding;
66424        if (crossAlign === 'near') {
66425          textAlign = 'left';
66426        } else if (crossAlign === 'center') {
66427          textAlign = 'center';
66428          x += widest / 2;
66429        } else {
66430          textAlign = 'right';
66431          x = me.right;
66432        }
66433      }
66434    } else {
66435      textAlign = 'right';
66436    }
66437    return {textAlign, x};
66438  }
66439  _computeLabelArea() {
66440    const me = this;
66441    if (me.options.ticks.mirror) {
66442      return;
66443    }
66444    const chart = me.chart;
66445    const position = me.options.position;
66446    if (position === 'left' || position === 'right') {
66447      return {top: 0, left: me.left, bottom: chart.height, right: me.right};
66448    } if (position === 'top' || position === 'bottom') {
66449      return {top: me.top, left: 0, bottom: me.bottom, right: chart.width};
66450    }
66451  }
66452  drawBackground() {
66453    const {ctx, options: {backgroundColor}, left, top, width, height} = this;
66454    if (backgroundColor) {
66455      ctx.save();
66456      ctx.fillStyle = backgroundColor;
66457      ctx.fillRect(left, top, width, height);
66458      ctx.restore();
66459    }
66460  }
66461  getLineWidthForValue(value) {
66462    const me = this;
66463    const grid = me.options.grid;
66464    if (!me._isVisible() || !grid.display) {
66465      return 0;
66466    }
66467    const ticks = me.ticks;
66468    const index = ticks.findIndex(t => t.value === value);
66469    if (index >= 0) {
66470      const opts = grid.setContext(me.getContext(index));
66471      return opts.lineWidth;
66472    }
66473    return 0;
66474  }
66475  drawGrid(chartArea) {
66476    const me = this;
66477    const grid = me.options.grid;
66478    const ctx = me.ctx;
66479    const items = me._gridLineItems || (me._gridLineItems = me._computeGridLineItems(chartArea));
66480    let i, ilen;
66481    const drawLine = (p1, p2, style) => {
66482      if (!style.width || !style.color) {
66483        return;
66484      }
66485      ctx.save();
66486      ctx.lineWidth = style.width;
66487      ctx.strokeStyle = style.color;
66488      ctx.setLineDash(style.borderDash || []);
66489      ctx.lineDashOffset = style.borderDashOffset;
66490      ctx.beginPath();
66491      ctx.moveTo(p1.x, p1.y);
66492      ctx.lineTo(p2.x, p2.y);
66493      ctx.stroke();
66494      ctx.restore();
66495    };
66496    if (grid.display) {
66497      for (i = 0, ilen = items.length; i < ilen; ++i) {
66498        const item = items[i];
66499        if (grid.drawOnChartArea) {
66500          drawLine(
66501            {x: item.x1, y: item.y1},
66502            {x: item.x2, y: item.y2},
66503            item
66504          );
66505        }
66506        if (grid.drawTicks) {
66507          drawLine(
66508            {x: item.tx1, y: item.ty1},
66509            {x: item.tx2, y: item.ty2},
66510            {
66511              color: item.tickColor,
66512              width: item.tickWidth,
66513              borderDash: item.tickBorderDash,
66514              borderDashOffset: item.tickBorderDashOffset
66515            }
66516          );
66517        }
66518      }
66519    }
66520  }
66521  drawBorder() {
66522    const me = this;
66523    const {chart, ctx, options: {grid}} = me;
66524    const borderOpts = grid.setContext(me.getContext());
66525    const axisWidth = grid.drawBorder ? borderOpts.borderWidth : 0;
66526    if (!axisWidth) {
66527      return;
66528    }
66529    const lastLineWidth = grid.setContext(me.getContext(0)).lineWidth;
66530    const borderValue = me._borderValue;
66531    let x1, x2, y1, y2;
66532    if (me.isHorizontal()) {
66533      x1 = _alignPixel(chart, me.left, axisWidth) - axisWidth / 2;
66534      x2 = _alignPixel(chart, me.right, lastLineWidth) + lastLineWidth / 2;
66535      y1 = y2 = borderValue;
66536    } else {
66537      y1 = _alignPixel(chart, me.top, axisWidth) - axisWidth / 2;
66538      y2 = _alignPixel(chart, me.bottom, lastLineWidth) + lastLineWidth / 2;
66539      x1 = x2 = borderValue;
66540    }
66541    ctx.save();
66542    ctx.lineWidth = borderOpts.borderWidth;
66543    ctx.strokeStyle = borderOpts.borderColor;
66544    ctx.beginPath();
66545    ctx.moveTo(x1, y1);
66546    ctx.lineTo(x2, y2);
66547    ctx.stroke();
66548    ctx.restore();
66549  }
66550  drawLabels(chartArea) {
66551    const me = this;
66552    const optionTicks = me.options.ticks;
66553    if (!optionTicks.display) {
66554      return;
66555    }
66556    const ctx = me.ctx;
66557    const area = me._computeLabelArea();
66558    if (area) {
66559      clipArea(ctx, area);
66560    }
66561    const items = me._labelItems || (me._labelItems = me._computeLabelItems(chartArea));
66562    let i, ilen;
66563    for (i = 0, ilen = items.length; i < ilen; ++i) {
66564      const item = items[i];
66565      const tickFont = item.font;
66566      const label = item.label;
66567      if (item.backdrop) {
66568        ctx.fillStyle = item.backdrop.color;
66569        ctx.fillRect(item.backdrop.left, item.backdrop.top, item.backdrop.width, item.backdrop.height);
66570      }
66571      let y = item.textOffset;
66572      renderText(ctx, label, 0, y, tickFont, item);
66573    }
66574    if (area) {
66575      unclipArea(ctx);
66576    }
66577  }
66578  drawTitle() {
66579    const {ctx, options: {position, title, reverse}} = this;
66580    if (!title.display) {
66581      return;
66582    }
66583    const font = toFont(title.font);
66584    const padding = toPadding(title.padding);
66585    const align = title.align;
66586    let offset = font.lineHeight / 2;
66587    if (position === 'bottom' || position === 'center' || isObject(position)) {
66588      offset += padding.bottom;
66589      if (isArray(title.text)) {
66590        offset += font.lineHeight * (title.text.length - 1);
66591      }
66592    } else {
66593      offset += padding.top;
66594    }
66595    const {titleX, titleY, maxWidth, rotation} = titleArgs(this, offset, position, align);
66596    renderText(ctx, title.text, 0, 0, font, {
66597      color: title.color,
66598      maxWidth,
66599      rotation,
66600      textAlign: titleAlign(align, position, reverse),
66601      textBaseline: 'middle',
66602      translation: [titleX, titleY],
66603    });
66604  }
66605  draw(chartArea) {
66606    const me = this;
66607    if (!me._isVisible()) {
66608      return;
66609    }
66610    me.drawBackground();
66611    me.drawGrid(chartArea);
66612    me.drawBorder();
66613    me.drawTitle();
66614    me.drawLabels(chartArea);
66615  }
66616  _layers() {
66617    const me = this;
66618    const opts = me.options;
66619    const tz = opts.ticks && opts.ticks.z || 0;
66620    const gz = valueOrDefault(opts.grid && opts.grid.z, -1);
66621    if (!me._isVisible() || me.draw !== Scale.prototype.draw) {
66622      return [{
66623        z: tz,
66624        draw(chartArea) {
66625          me.draw(chartArea);
66626        }
66627      }];
66628    }
66629    return [{
66630      z: gz,
66631      draw(chartArea) {
66632        me.drawBackground();
66633        me.drawGrid(chartArea);
66634        me.drawTitle();
66635      }
66636    }, {
66637      z: gz + 1,
66638      draw() {
66639        me.drawBorder();
66640      }
66641    }, {
66642      z: tz,
66643      draw(chartArea) {
66644        me.drawLabels(chartArea);
66645      }
66646    }];
66647  }
66648  getMatchingVisibleMetas(type) {
66649    const me = this;
66650    const metas = me.chart.getSortedVisibleDatasetMetas();
66651    const axisID = me.axis + 'AxisID';
66652    const result = [];
66653    let i, ilen;
66654    for (i = 0, ilen = metas.length; i < ilen; ++i) {
66655      const meta = metas[i];
66656      if (meta[axisID] === me.id && (!type || meta.type === type)) {
66657        result.push(meta);
66658      }
66659    }
66660    return result;
66661  }
66662  _resolveTickFontOptions(index) {
66663    const opts = this.options.ticks.setContext(this.getContext(index));
66664    return toFont(opts.font);
66665  }
66666  _maxDigits() {
66667    const me = this;
66668    const fontSize = me._resolveTickFontOptions(0).lineHeight;
66669    return (me.isHorizontal() ? me.width : me.height) / fontSize;
66670  }
66671}
66672
66673class TypedRegistry {
66674  constructor(type, scope, override) {
66675    this.type = type;
66676    this.scope = scope;
66677    this.override = override;
66678    this.items = Object.create(null);
66679  }
66680  isForType(type) {
66681    return Object.prototype.isPrototypeOf.call(this.type.prototype, type.prototype);
66682  }
66683  register(item) {
66684    const me = this;
66685    const proto = Object.getPrototypeOf(item);
66686    let parentScope;
66687    if (isIChartComponent(proto)) {
66688      parentScope = me.register(proto);
66689    }
66690    const items = me.items;
66691    const id = item.id;
66692    const scope = me.scope + '.' + id;
66693    if (!id) {
66694      throw new Error('class does not have id: ' + item);
66695    }
66696    if (id in items) {
66697      return scope;
66698    }
66699    items[id] = item;
66700    registerDefaults(item, scope, parentScope);
66701    if (me.override) {
66702      defaults.override(item.id, item.overrides);
66703    }
66704    return scope;
66705  }
66706  get(id) {
66707    return this.items[id];
66708  }
66709  unregister(item) {
66710    const items = this.items;
66711    const id = item.id;
66712    const scope = this.scope;
66713    if (id in items) {
66714      delete items[id];
66715    }
66716    if (scope && id in defaults[scope]) {
66717      delete defaults[scope][id];
66718      if (this.override) {
66719        delete overrides[id];
66720      }
66721    }
66722  }
66723}
66724function registerDefaults(item, scope, parentScope) {
66725  const itemDefaults = merge(Object.create(null), [
66726    parentScope ? defaults.get(parentScope) : {},
66727    defaults.get(scope),
66728    item.defaults
66729  ]);
66730  defaults.set(scope, itemDefaults);
66731  if (item.defaultRoutes) {
66732    routeDefaults(scope, item.defaultRoutes);
66733  }
66734  if (item.descriptors) {
66735    defaults.describe(scope, item.descriptors);
66736  }
66737}
66738function routeDefaults(scope, routes) {
66739  Object.keys(routes).forEach(property => {
66740    const propertyParts = property.split('.');
66741    const sourceName = propertyParts.pop();
66742    const sourceScope = [scope].concat(propertyParts).join('.');
66743    const parts = routes[property].split('.');
66744    const targetName = parts.pop();
66745    const targetScope = parts.join('.');
66746    defaults.route(sourceScope, sourceName, targetScope, targetName);
66747  });
66748}
66749function isIChartComponent(proto) {
66750  return 'id' in proto && 'defaults' in proto;
66751}
66752
66753class Registry {
66754  constructor() {
66755    this.controllers = new TypedRegistry(DatasetController, 'datasets', true);
66756    this.elements = new TypedRegistry(Element, 'elements');
66757    this.plugins = new TypedRegistry(Object, 'plugins');
66758    this.scales = new TypedRegistry(Scale, 'scales');
66759    this._typedRegistries = [this.controllers, this.scales, this.elements];
66760  }
66761  add(...args) {
66762    this._each('register', args);
66763  }
66764  remove(...args) {
66765    this._each('unregister', args);
66766  }
66767  addControllers(...args) {
66768    this._each('register', args, this.controllers);
66769  }
66770  addElements(...args) {
66771    this._each('register', args, this.elements);
66772  }
66773  addPlugins(...args) {
66774    this._each('register', args, this.plugins);
66775  }
66776  addScales(...args) {
66777    this._each('register', args, this.scales);
66778  }
66779  getController(id) {
66780    return this._get(id, this.controllers, 'controller');
66781  }
66782  getElement(id) {
66783    return this._get(id, this.elements, 'element');
66784  }
66785  getPlugin(id) {
66786    return this._get(id, this.plugins, 'plugin');
66787  }
66788  getScale(id) {
66789    return this._get(id, this.scales, 'scale');
66790  }
66791  removeControllers(...args) {
66792    this._each('unregister', args, this.controllers);
66793  }
66794  removeElements(...args) {
66795    this._each('unregister', args, this.elements);
66796  }
66797  removePlugins(...args) {
66798    this._each('unregister', args, this.plugins);
66799  }
66800  removeScales(...args) {
66801    this._each('unregister', args, this.scales);
66802  }
66803  _each(method, args, typedRegistry) {
66804    const me = this;
vendor: 15,216 bytes, lines 66805-67299
66805    [...args].forEach(arg => {
66806      const reg = typedRegistry || me._getRegistryForType(arg);
66807      if (typedRegistry || reg.isForType(arg) || (reg === me.plugins && arg.id)) {
66808        me._exec(method, reg, arg);
66809      } else {
66810        each(arg, item => {
66811          const itemReg = typedRegistry || me._getRegistryForType(item);
66812          me._exec(method, itemReg, item);
66813        });
66814      }
66815    });
66816  }
66817  _exec(method, registry, component) {
66818    const camelMethod = _capitalize(method);
66819    callback(component['before' + camelMethod], [], component);
66820    registry[method](component);
66821    callback(component['after' + camelMethod], [], component);
66822  }
66823  _getRegistryForType(type) {
66824    for (let i = 0; i < this._typedRegistries.length; i++) {
66825      const reg = this._typedRegistries[i];
66826      if (reg.isForType(type)) {
66827        return reg;
66828      }
66829    }
66830    return this.plugins;
66831  }
66832  _get(id, typedRegistry, type) {
66833    const item = typedRegistry.get(id);
66834    if (item === undefined) {
66835      throw new Error('"' + id + '" is not a registered ' + type + '.');
66836    }
66837    return item;
66838  }
66839}
66840var registry = new Registry();
66841
66842class PluginService {
66843  constructor() {
66844    this._init = [];
66845  }
66846  notify(chart, hook, args, filter) {
66847    const me = this;
66848    if (hook === 'beforeInit') {
66849      me._init = me._createDescriptors(chart, true);
66850      me._notify(me._init, chart, 'install');
66851    }
66852    const descriptors = filter ? me._descriptors(chart).filter(filter) : me._descriptors(chart);
66853    const result = me._notify(descriptors, chart, hook, args);
66854    if (hook === 'destroy') {
66855      me._notify(descriptors, chart, 'stop');
66856      me._notify(me._init, chart, 'uninstall');
66857    }
66858    return result;
66859  }
66860  _notify(descriptors, chart, hook, args) {
66861    args = args || {};
66862    for (const descriptor of descriptors) {
66863      const plugin = descriptor.plugin;
66864      const method = plugin[hook];
66865      const params = [chart, args, descriptor.options];
66866      if (callback(method, params, plugin) === false && args.cancelable) {
66867        return false;
66868      }
66869    }
66870    return true;
66871  }
66872  invalidate() {
66873    if (!isNullOrUndef(this._cache)) {
66874      this._oldCache = this._cache;
66875      this._cache = undefined;
66876    }
66877  }
66878  _descriptors(chart) {
66879    if (this._cache) {
66880      return this._cache;
66881    }
66882    const descriptors = this._cache = this._createDescriptors(chart);
66883    this._notifyStateChanges(chart);
66884    return descriptors;
66885  }
66886  _createDescriptors(chart, all) {
66887    const config = chart && chart.config;
66888    const options = valueOrDefault(config.options && config.options.plugins, {});
66889    const plugins = allPlugins(config);
66890    return options === false && !all ? [] : createDescriptors(chart, plugins, options, all);
66891  }
66892  _notifyStateChanges(chart) {
66893    const previousDescriptors = this._oldCache || [];
66894    const descriptors = this._cache;
66895    const diff = (a, b) => a.filter(x => !b.some(y => x.plugin.id === y.plugin.id));
66896    this._notify(diff(previousDescriptors, descriptors), chart, 'stop');
66897    this._notify(diff(descriptors, previousDescriptors), chart, 'start');
66898  }
66899}
66900function allPlugins(config) {
66901  const plugins = [];
66902  const keys = Object.keys(registry.plugins.items);
66903  for (let i = 0; i < keys.length; i++) {
66904    plugins.push(registry.getPlugin(keys[i]));
66905  }
66906  const local = config.plugins || [];
66907  for (let i = 0; i < local.length; i++) {
66908    const plugin = local[i];
66909    if (plugins.indexOf(plugin) === -1) {
66910      plugins.push(plugin);
66911    }
66912  }
66913  return plugins;
66914}
66915function getOpts(options, all) {
66916  if (!all && options === false) {
66917    return null;
66918  }
66919  if (options === true) {
66920    return {};
66921  }
66922  return options;
66923}
66924function createDescriptors(chart, plugins, options, all) {
66925  const result = [];
66926  const context = chart.getContext();
66927  for (let i = 0; i < plugins.length; i++) {
66928    const plugin = plugins[i];
66929    const id = plugin.id;
66930    const opts = getOpts(options[id], all);
66931    if (opts === null) {
66932      continue;
66933    }
66934    result.push({
66935      plugin,
66936      options: pluginOpts(chart.config, plugin, opts, context)
66937    });
66938  }
66939  return result;
66940}
66941function pluginOpts(config, plugin, opts, context) {
66942  const keys = config.pluginScopeKeys(plugin);
66943  const scopes = config.getOptionScopes(opts, keys);
66944  return config.createResolver(scopes, context, [''], {scriptable: false, indexable: false, allKeys: true});
66945}
66946
66947function getIndexAxis(type, options) {
66948  const datasetDefaults = defaults.datasets[type] || {};
66949  const datasetOptions = (options.datasets || {})[type] || {};
66950  return datasetOptions.indexAxis || options.indexAxis || datasetDefaults.indexAxis || 'x';
66951}
66952function getAxisFromDefaultScaleID(id, indexAxis) {
66953  let axis = id;
66954  if (id === '_index_') {
66955    axis = indexAxis;
66956  } else if (id === '_value_') {
66957    axis = indexAxis === 'x' ? 'y' : 'x';
66958  }
66959  return axis;
66960}
66961function getDefaultScaleIDFromAxis(axis, indexAxis) {
66962  return axis === indexAxis ? '_index_' : '_value_';
66963}
66964function axisFromPosition(position) {
66965  if (position === 'top' || position === 'bottom') {
66966    return 'x';
66967  }
66968  if (position === 'left' || position === 'right') {
66969    return 'y';
66970  }
66971}
66972function determineAxis(id, scaleOptions) {
66973  if (id === 'x' || id === 'y') {
66974    return id;
66975  }
66976  return scaleOptions.axis || axisFromPosition(scaleOptions.position) || id.charAt(0).toLowerCase();
66977}
66978function mergeScaleConfig(config, options) {
66979  const chartDefaults = overrides[config.type] || {scales: {}};
66980  const configScales = options.scales || {};
66981  const chartIndexAxis = getIndexAxis(config.type, options);
66982  const firstIDs = Object.create(null);
66983  const scales = Object.create(null);
66984  Object.keys(configScales).forEach(id => {
66985    const scaleConf = configScales[id];
66986    const axis = determineAxis(id, scaleConf);
66987    const defaultId = getDefaultScaleIDFromAxis(axis, chartIndexAxis);
66988    const defaultScaleOptions = chartDefaults.scales || {};
66989    firstIDs[axis] = firstIDs[axis] || id;
66990    scales[id] = mergeIf(Object.create(null), [{axis}, scaleConf, defaultScaleOptions[axis], defaultScaleOptions[defaultId]]);
66991  });
66992  config.data.datasets.forEach(dataset => {
66993    const type = dataset.type || config.type;
66994    const indexAxis = dataset.indexAxis || getIndexAxis(type, options);
66995    const datasetDefaults = overrides[type] || {};
66996    const defaultScaleOptions = datasetDefaults.scales || {};
66997    Object.keys(defaultScaleOptions).forEach(defaultID => {
66998      const axis = getAxisFromDefaultScaleID(defaultID, indexAxis);
66999      const id = dataset[axis + 'AxisID'] || firstIDs[axis] || axis;
67000      scales[id] = scales[id] || Object.create(null);
67001      mergeIf(scales[id], [{axis}, configScales[id], defaultScaleOptions[defaultID]]);
67002    });
67003  });
67004  Object.keys(scales).forEach(key => {
67005    const scale = scales[key];
67006    mergeIf(scale, [defaults.scales[scale.type], defaults.scale]);
67007  });
67008  return scales;
67009}
67010function initOptions(config) {
67011  const options = config.options || (config.options = {});
67012  options.plugins = valueOrDefault(options.plugins, {});
67013  options.scales = mergeScaleConfig(config, options);
67014}
67015function initData(data) {
67016  data = data || {};
67017  data.datasets = data.datasets || [];
67018  data.labels = data.labels || [];
67019  return data;
67020}
67021function initConfig(config) {
67022  config = config || {};
67023  config.data = initData(config.data);
67024  initOptions(config);
67025  return config;
67026}
67027const keyCache = new Map();
67028const keysCached = new Set();
67029function cachedKeys(cacheKey, generate) {
67030  let keys = keyCache.get(cacheKey);
67031  if (!keys) {
67032    keys = generate();
67033    keyCache.set(cacheKey, keys);
67034    keysCached.add(keys);
67035  }
67036  return keys;
67037}
67038const addIfFound = (set, obj, key) => {
67039  const opts = resolveObjectKey(obj, key);
67040  if (opts !== undefined) {
67041    set.add(opts);
67042  }
67043};
67044class Config {
67045  constructor(config) {
67046    this._config = initConfig(config);
67047    this._scopeCache = new Map();
67048    this._resolverCache = new Map();
67049  }
67050  get platform() {
67051    return this._config.platform;
67052  }
67053  get type() {
67054    return this._config.type;
67055  }
67056  set type(type) {
67057    this._config.type = type;
67058  }
67059  get data() {
67060    return this._config.data;
67061  }
67062  set data(data) {
67063    this._config.data = initData(data);
67064  }
67065  get options() {
67066    return this._config.options;
67067  }
67068  set options(options) {
67069    this._config.options = options;
67070  }
67071  get plugins() {
67072    return this._config.plugins;
67073  }
67074  update() {
67075    const config = this._config;
67076    this.clearCache();
67077    initOptions(config);
67078  }
67079  clearCache() {
67080    this._scopeCache.clear();
67081    this._resolverCache.clear();
67082  }
67083  datasetScopeKeys(datasetType) {
67084    return cachedKeys(datasetType,
67085      () => [[
67086        `datasets.${datasetType}`,
67087        ''
67088      ]]);
67089  }
67090  datasetAnimationScopeKeys(datasetType, transition) {
67091    return cachedKeys(`${datasetType}.transition.${transition}`,
67092      () => [
67093        [
67094          `datasets.${datasetType}.transitions.${transition}`,
67095          `transitions.${transition}`,
67096        ],
67097        [
67098          `datasets.${datasetType}`,
67099          ''
67100        ]
67101      ]);
67102  }
67103  datasetElementScopeKeys(datasetType, elementType) {
67104    return cachedKeys(`${datasetType}-${elementType}`,
67105      () => [[
67106        `datasets.${datasetType}.elements.${elementType}`,
67107        `datasets.${datasetType}`,
67108        `elements.${elementType}`,
67109        ''
67110      ]]);
67111  }
67112  pluginScopeKeys(plugin) {
67113    const id = plugin.id;
67114    const type = this.type;
67115    return cachedKeys(`${type}-plugin-${id}`,
67116      () => [[
67117        `plugins.${id}`,
67118        ...plugin.additionalOptionScopes || [],
67119      ]]);
67120  }
67121  _cachedScopes(mainScope, resetCache) {
67122    const _scopeCache = this._scopeCache;
67123    let cache = _scopeCache.get(mainScope);
67124    if (!cache || resetCache) {
67125      cache = new Map();
67126      _scopeCache.set(mainScope, cache);
67127    }
67128    return cache;
67129  }
67130  getOptionScopes(mainScope, keyLists, resetCache) {
67131    const {options, type} = this;
67132    const cache = this._cachedScopes(mainScope, resetCache);
67133    const cached = cache.get(keyLists);
67134    if (cached) {
67135      return cached;
67136    }
67137    const scopes = new Set();
67138    keyLists.forEach(keys => {
67139      if (mainScope) {
67140        scopes.add(mainScope);
67141        keys.forEach(key => addIfFound(scopes, mainScope, key));
67142      }
67143      keys.forEach(key => addIfFound(scopes, options, key));
67144      keys.forEach(key => addIfFound(scopes, overrides[type] || {}, key));
67145      keys.forEach(key => addIfFound(scopes, defaults, key));
67146      keys.forEach(key => addIfFound(scopes, descriptors, key));
67147    });
67148    const array = Array.from(scopes);
67149    if (array.length === 0) {
67150      array.push(Object.create(null));
67151    }
67152    if (keysCached.has(keyLists)) {
67153      cache.set(keyLists, array);
67154    }
67155    return array;
67156  }
67157  chartOptionScopes() {
67158    const {options, type} = this;
67159    return [
67160      options,
67161      overrides[type] || {},
67162      defaults.datasets[type] || {},
67163      {type},
67164      defaults,
67165      descriptors
67166    ];
67167  }
67168  resolveNamedOptions(scopes, names, context, prefixes = ['']) {
67169    const result = {$shared: true};
67170    const {resolver, subPrefixes} = getResolver(this._resolverCache, scopes, prefixes);
67171    let options = resolver;
67172    if (needContext(resolver, names)) {
67173      result.$shared = false;
67174      context = isFunction(context) ? context() : context;
67175      const subResolver = this.createResolver(scopes, context, subPrefixes);
67176      options = _attachContext(resolver, context, subResolver);
67177    }
67178    for (const prop of names) {
67179      result[prop] = options[prop];
67180    }
67181    return result;
67182  }
67183  createResolver(scopes, context, prefixes = [''], descriptorDefaults) {
67184    const {resolver} = getResolver(this._resolverCache, scopes, prefixes);
67185    return isObject(context)
67186      ? _attachContext(resolver, context, undefined, descriptorDefaults)
67187      : resolver;
67188  }
67189}
67190function getResolver(resolverCache, scopes, prefixes) {
67191  let cache = resolverCache.get(scopes);
67192  if (!cache) {
67193    cache = new Map();
67194    resolverCache.set(scopes, cache);
67195  }
67196  const cacheKey = prefixes.join();
67197  let cached = cache.get(cacheKey);
67198  if (!cached) {
67199    const resolver = _createResolver(scopes, prefixes);
67200    cached = {
67201      resolver,
67202      subPrefixes: prefixes.filter(p => !p.toLowerCase().includes('hover'))
67203    };
67204    cache.set(cacheKey, cached);
67205  }
67206  return cached;
67207}
67208function needContext(proxy, names) {
67209  const {isScriptable, isIndexable} = _descriptors(proxy);
67210  for (const prop of names) {
67211    if ((isScriptable(prop) && isFunction(proxy[prop]))
67212      || (isIndexable(prop) && isArray(proxy[prop]))) {
67213      return true;
67214    }
67215  }
67216  return false;
67217}
67218
67219var version = "3.5.1";
67220
67221const KNOWN_POSITIONS = ['top', 'bottom', 'left', 'right', 'chartArea'];
67222function positionIsHorizontal(position, axis) {
67223  return position === 'top' || position === 'bottom' || (KNOWN_POSITIONS.indexOf(position) === -1 && axis === 'x');
67224}
67225function compare2Level(l1, l2) {
67226  return function(a, b) {
67227    return a[l1] === b[l1]
67228      ? a[l2] - b[l2]
67229      : a[l1] - b[l1];
67230  };
67231}
67232function onAnimationsComplete(context) {
67233  const chart = context.chart;
67234  const animationOptions = chart.options.animation;
67235  chart.notifyPlugins('afterRender');
67236  callback(animationOptions && animationOptions.onComplete, [context], chart);
67237}
67238function onAnimationProgress(context) {
67239  const chart = context.chart;
67240  const animationOptions = chart.options.animation;
67241  callback(animationOptions && animationOptions.onProgress, [context], chart);
67242}
67243function getCanvas(item) {
67244  if (_isDomSupported() && typeof item === 'string') {
67245    item = document.getElementById(item);
67246  } else if (item && item.length) {
67247    item = item[0];
67248  }
67249  if (item && item.canvas) {
67250    item = item.canvas;
67251  }
67252  return item;
67253}
67254const instances = {};
67255const getChart = (key) => {
67256  const canvas = getCanvas(key);
67257  return Object.values(instances).filter((c) => c.canvas === canvas).pop();
67258};
67259class Chart {
67260  constructor(item, userConfig) {
67261    const me = this;
67262    const config = this.config = new Config(userConfig);
67263    const initialCanvas = getCanvas(item);
67264    const existingChart = getChart(initialCanvas);
67265    if (existingChart) {
67266      throw new Error(
67267        'Canvas is already in use. Chart with ID \'' + existingChart.id + '\'' +
67268				' must be destroyed before the canvas can be reused.'
67269      );
67270    }
67271    const options = config.createResolver(config.chartOptionScopes(), me.getContext());
67272    this.platform = new (config.platform || _detectPlatform(initialCanvas))();
67273    const context = me.platform.acquireContext(initialCanvas, options.aspectRatio);
67274    const canvas = context && context.canvas;
67275    const height = canvas && canvas.height;
67276    const width = canvas && canvas.width;
67277    this.id = uid();
67278    this.ctx = context;
67279    this.canvas = canvas;
67280    this.width = width;
67281    this.height = height;
67282    this._options = options;
67283    this._aspectRatio = this.aspectRatio;
67284    this._layers = [];
67285    this._metasets = [];
67286    this._stacks = undefined;
67287    this.boxes = [];
67288    this.currentDevicePixelRatio = undefined;
67289    this.chartArea = undefined;
67290    this._active = [];
67291    this._lastEvent = undefined;
67292    this._listeners = {};
67293    this._responsiveListeners = undefined;
67294    this._sortedMetasets = [];
67295    this.scales = {};
67296    this._plugins = new PluginService();
67297    this.$proxies = {};
67298    this._hiddenIndices = {};
67299    this.attached = false;
67300    this._animationsDisabled = undefined;
67301    this.$context = undefined;
67302    this._doResize = debounce(() => this.update('resize'), options.resizeDelay || 0);
67303    instances[me.id] = me;
67304    if (!context || !canvas) {
67305      console.error("Failed to create chart: can't acquire context from the given item");
67306      return;
67307    }
67308    animator.listen(me, 'complete', onAnimationsComplete);
67309    animator.listen(me, 'progress', onAnimationProgress);
67310    me._initialize();
67311    if (me.attached) {
67312      me.update();
67313    }
67314  }
67315  get aspectRatio() {
67316    const {options: {aspectRatio, maintainAspectRatio}, width, height, _aspectRatio} = this;
67317    if (!isNullOrUndef(aspectRatio)) {
67318      return aspectRatio;
67319    }
67320    if (maintainAspectRatio && _aspectRatio) {
67321      return _aspectRatio;
67322    }
67323    return height ? width / height : null;
67324  }
67325  get data() {
67326    return this.config.data;
67327  }
67328  set data(data) {
67329    this.config.data = data;
67330  }
67331  get options() {
67332    return this._options;
67333  }
67334  set options(options) {
67335    this.config.options = options;
67336  }
67337  _initialize() {
67338    const me = this;
67339    me.notifyPlugins('beforeInit');
67340    if (me.options.responsive) {
67341      me.resize();
67342    } else {
67343      retinaScale(me, me.options.devicePixelRatio);
67344    }
67345    me.bindEvents();
67346    me.notifyPlugins('afterInit');
67347    return me;
67348  }
67349  clear() {
67350    clearCanvas(this.canvas, this.ctx);
67351    return this;
67352  }
67353  stop() {
67354    animator.stop(this);
67355    return this;
67356  }
67357  resize(width, height) {
67358    if (!animator.running(this)) {
67359      this._resize(width, height);
67360    } else {
67361      this._resizeBeforeDraw = {width, height};
67362    }
67363  }
67364  _resize(width, height) {
67365    const me = this;
67366    const options = me.options;
67367    const canvas = me.canvas;
67368    const aspectRatio = options.maintainAspectRatio && me.aspectRatio;
67369    const newSize = me.platform.getMaximumSize(canvas, width, height, aspectRatio);
67370    const newRatio = options.devicePixelRatio || me.platform.getDevicePixelRatio();
67371    me.width = newSize.width;
67372    me.height = newSize.height;
67373    me._aspectRatio = me.aspectRatio;
67374    if (!retinaScale(me, newRatio, true)) {
67375      return;
67376    }
67377    me.notifyPlugins('resize', {size: newSize});
67378    callback(options.onResize, [me, newSize], me);
67379    if (me.attached) {
67380      if (me._doResize()) {
67381        me.render();
67382      }
67383    }
67384  }
67385  ensureScalesHaveIDs() {
67386    const options = this.options;
67387    const scalesOptions = options.scales || {};
67388    each(scalesOptions, (axisOptions, axisID) => {
67389      axisOptions.id = axisID;
67390    });
67391  }
67392  buildOrUpdateScales() {
67393    const me = this;
67394    const options = me.options;
67395    const scaleOpts = options.scales;
67396    const scales = me.scales;
67397    const updated = Object.keys(scales).reduce((obj, id) => {
67398      obj[id] = false;
67399      return obj;
67400    }, {});
67401    let items = [];
67402    if (scaleOpts) {
67403      items = items.concat(
67404        Object.keys(scaleOpts).map((id) => {
67405          const scaleOptions = scaleOpts[id];
67406          const axis = determineAxis(id, scaleOptions);
67407          const isRadial = axis === 'r';
67408          const isHorizontal = axis === 'x';
67409          return {
67410            options: scaleOptions,
67411            dposition: isRadial ? 'chartArea' : isHorizontal ? 'bottom' : 'left',
67412            dtype: isRadial ? 'radialLinear' : isHorizontal ? 'category' : 'linear'
67413          };
67414        })
67415      );
67416    }
67417    each(items, (item) => {
67418      const scaleOptions = item.options;
67419      const id = scaleOptions.id;
67420      const axis = determineAxis(id, scaleOptions);
67421      const scaleType = valueOrDefault(scaleOptions.type, item.dtype);
67422      if (scaleOptions.position === undefined || positionIsHorizontal(scaleOptions.position, axis) !== positionIsHorizontal(item.dposition)) {
67423        scaleOptions.position = item.dposition;
67424      }
67425      updated[id] = true;
67426      let scale = null;
67427      if (id in scales && scales[id].type === scaleType) {
67428        scale = scales[id];
67429      } else {
67430        const scaleClass = registry.getScale(scaleType);
67431        scale = new scaleClass({
67432          id,
67433          type: scaleType,
67434          ctx: me.ctx,
67435          chart: me
67436        });
67437        scales[scale.id] = scale;
67438      }
67439      scale.init(scaleOptions, options);
67440    });
67441    each(updated, (hasUpdated, id) => {
67442      if (!hasUpdated) {
67443        delete scales[id];
67444      }
67445    });
67446    each(scales, (scale) => {
67447      layouts.configure(me, scale, scale.options);
67448      layouts.addBox(me, scale);
67449    });
67450  }
67451  _updateMetasets() {
67452    const me = this;
67453    const metasets = me._metasets;
67454    const numData = me.data.datasets.length;
67455    const numMeta = metasets.length;
67456    metasets.sort((a, b) => a.index - b.index);
67457    if (numMeta > numData) {
67458      for (let i = numData; i < numMeta; ++i) {
67459        me._destroyDatasetMeta(i);
67460      }
67461      metasets.splice(numData, numMeta - numData);
67462    }
67463    me._sortedMetasets = metasets.slice(0).sort(compare2Level('order', 'index'));
67464  }
67465  _removeUnreferencedMetasets() {
67466    const me = this;
67467    const {_metasets: metasets, data: {datasets}} = me;
67468    if (metasets.length > datasets.length) {
67469      delete me._stacks;
67470    }
67471    metasets.forEach((meta, index) => {
67472      if (datasets.filter(x => x === meta._dataset).length === 0) {
67473        me._destroyDatasetMeta(index);
67474      }
67475    });
67476  }
67477  buildOrUpdateControllers() {
67478    const me = this;
67479    const newControllers = [];
67480    const datasets = me.data.datasets;
67481    let i, ilen;
67482    me._removeUnreferencedMetasets();
67483    for (i = 0, ilen = datasets.length; i < ilen; i++) {
67484      const dataset = datasets[i];
67485      let meta = me.getDatasetMeta(i);
67486      const type = dataset.type || me.config.type;
67487      if (meta.type && meta.type !== type) {
67488        me._destroyDatasetMeta(i);
67489        meta = me.getDatasetMeta(i);
67490      }
67491      meta.type = type;
67492      meta.indexAxis = dataset.indexAxis || getIndexAxis(type, me.options);
67493      meta.order = dataset.order || 0;
67494      meta.index = i;
67495      meta.label = '' + dataset.label;
67496      meta.visible = me.isDatasetVisible(i);
67497      if (meta.controller) {
67498        meta.controller.updateIndex(i);
67499        meta.controller.linkScales();
67500      } else {
67501        const ControllerClass = registry.getController(type);
67502        const {datasetElementType, dataElementType} = defaults.datasets[type];
67503        Object.assign(ControllerClass.prototype, {
67504          dataElementType: registry.getElement(dataElementType),
67505          datasetElementType: datasetElementType && registry.getElement(datasetElementType)
67506        });
67507        meta.controller = new ControllerClass(me, i);
67508        newControllers.push(meta.controller);
67509      }
67510    }
67511    me._updateMetasets();
67512    return newControllers;
67513  }
67514  _resetElements() {
67515    const me = this;
67516    each(me.data.datasets, (dataset, datasetIndex) => {
67517      me.getDatasetMeta(datasetIndex).controller.reset();
67518    }, me);
67519  }
67520  reset() {
67521    this._resetElements();
67522    this.notifyPlugins('reset');
67523  }
67524  update(mode) {
67525    const me = this;
67526    const config = me.config;
67527    config.update();
67528    me._options = config.createResolver(config.chartOptionScopes(), me.getContext());
67529    each(me.scales, (scale) => {
67530      layouts.removeBox(me, scale);
67531    });
67532    const animsDisabled = me._animationsDisabled = !me.options.animation;
67533    me.ensureScalesHaveIDs();
67534    me.buildOrUpdateScales();
67535    const existingEvents = new Set(Object.keys(me._listeners));
67536    const newEvents = new Set(me.options.events);
67537    if (!setsEqual(existingEvents, newEvents) || !!this._responsiveListeners !== me.options.responsive) {
67538      me.unbindEvents();
67539      me.bindEvents();
67540    }
67541    me._plugins.invalidate();
67542    if (me.notifyPlugins('beforeUpdate', {mode, cancelable: true}) === false) {
67543      return;
67544    }
67545    const newControllers = me.buildOrUpdateControllers();
67546    me.notifyPlugins('beforeElementsUpdate');
67547    let minPadding = 0;
67548    for (let i = 0, ilen = me.data.datasets.length; i < ilen; i++) {
67549      const {controller} = me.getDatasetMeta(i);
67550      const reset = !animsDisabled && newControllers.indexOf(controller) === -1;
67551      controller.buildOrUpdateElements(reset);
67552      minPadding = Math.max(+controller.getMaxOverflow(), minPadding);
67553    }
67554    me._minPadding = minPadding;
67555    me._updateLayout(minPadding);
67556    if (!animsDisabled) {
67557      each(newControllers, (controller) => {
67558        controller.reset();
67559      });
67560    }
67561    me._updateDatasets(mode);
67562    me.notifyPlugins('afterUpdate', {mode});
67563    me._layers.sort(compare2Level('z', '_idx'));
67564    if (me._lastEvent) {
67565      me._eventHandler(me._lastEvent, true);
67566    }
67567    me.render();
67568  }
67569  _updateLayout(minPadding) {
67570    const me = this;
67571    if (me.notifyPlugins('beforeLayout', {cancelable: true}) === false) {
67572      return;
67573    }
67574    layouts.update(me, me.width, me.height, minPadding);
67575    const area = me.chartArea;
67576    const noArea = area.width <= 0 || area.height <= 0;
67577    me._layers = [];
67578    each(me.boxes, (box) => {
67579      if (noArea && box.position === 'chartArea') {
67580        return;
67581      }
67582      if (box.configure) {
67583        box.configure();
67584      }
67585      me._layers.push(...box._layers());
67586    }, me);
67587    me._layers.forEach((item, index) => {
67588      item._idx = index;
67589    });
67590    me.notifyPlugins('afterLayout');
67591  }
67592  _updateDatasets(mode) {
67593    const me = this;
67594    const isFunction = typeof mode === 'function';
67595    if (me.notifyPlugins('beforeDatasetsUpdate', {mode, cancelable: true}) === false) {
67596      return;
67597    }
67598    for (let i = 0, ilen = me.data.datasets.length; i < ilen; ++i) {
67599      me._updateDataset(i, isFunction ? mode({datasetIndex: i}) : mode);
67600    }
67601    me.notifyPlugins('afterDatasetsUpdate', {mode});
67602  }
67603  _updateDataset(index, mode) {
67604    const me = this;
67605    const meta = me.getDatasetMeta(index);
67606    const args = {meta, index, mode, cancelable: true};
67607    if (me.notifyPlugins('beforeDatasetUpdate', args) === false) {
67608      return;
67609    }
67610    meta.controller._update(mode);
67611    args.cancelable = false;
67612    me.notifyPlugins('afterDatasetUpdate', args);
67613  }
67614  render() {
67615    const me = this;
67616    if (me.notifyPlugins('beforeRender', {cancelable: true}) === false) {
67617      return;
67618    }
67619    if (animator.has(me)) {
67620      if (me.attached && !animator.running(me)) {
67621        animator.start(me);
67622      }
67623    } else {
67624      me.draw();
67625      onAnimationsComplete({chart: me});
67626    }
67627  }
67628  draw() {
67629    const me = this;
67630    let i;
67631    if (me._resizeBeforeDraw) {
67632      const {width, height} = me._resizeBeforeDraw;
67633      me._resize(width, height);
67634      me._resizeBeforeDraw = null;
67635    }
67636    me.clear();
67637    if (me.width <= 0 || me.height <= 0) {
67638      return;
67639    }
67640    if (me.notifyPlugins('beforeDraw', {cancelable: true}) === false) {
67641      return;
67642    }
67643    const layers = me._layers;
67644    for (i = 0; i < layers.length && layers[i].z <= 0; ++i) {
67645      layers[i].draw(me.chartArea);
67646    }
67647    me._drawDatasets();
67648    for (; i < layers.length; ++i) {
67649      layers[i].draw(me.chartArea);
67650    }
67651    me.notifyPlugins('afterDraw');
67652  }
67653  _getSortedDatasetMetas(filterVisible) {
67654    const me = this;
67655    const metasets = me._sortedMetasets;
67656    const result = [];
67657    let i, ilen;
67658    for (i = 0, ilen = metasets.length; i < ilen; ++i) {
67659      const meta = metasets[i];
67660      if (!filterVisible || meta.visible) {
67661        result.push(meta);
67662      }
67663    }
67664    return result;
67665  }
67666  getSortedVisibleDatasetMetas() {
67667    return this._getSortedDatasetMetas(true);
67668  }
67669  _drawDatasets() {
67670    const me = this;
67671    if (me.notifyPlugins('beforeDatasetsDraw', {cancelable: true}) === false) {
67672      return;
67673    }
67674    const metasets = me.getSortedVisibleDatasetMetas();
67675    for (let i = metasets.length - 1; i >= 0; --i) {
67676      me._drawDataset(metasets[i]);
67677    }
67678    me.notifyPlugins('afterDatasetsDraw');
67679  }
67680  _drawDataset(meta) {
67681    const me = this;
67682    const ctx = me.ctx;
67683    const clip = meta._clip;
67684    const useClip = !clip.disabled;
67685    const area = me.chartArea;
67686    const args = {
67687      meta,
67688      index: meta.index,
67689      cancelable: true
67690    };
67691    if (me.notifyPlugins('beforeDatasetDraw', args) === false) {
67692      return;
67693    }
67694    if (useClip) {
67695      clipArea(ctx, {
67696        left: clip.left === false ? 0 : area.left - clip.left,
67697        right: clip.right === false ? me.width : area.right + clip.right,
67698        top: clip.top === false ? 0 : area.top - clip.top,
67699        bottom: clip.bottom === false ? me.height : area.bottom + clip.bottom
67700      });
67701    }
67702    meta.controller.draw();
67703    if (useClip) {
67704      unclipArea(ctx);
67705    }
67706    args.cancelable = false;
67707    me.notifyPlugins('afterDatasetDraw', args);
67708  }
67709  getElementsAtEventForMode(e, mode, options, useFinalPosition) {
67710    const method = Interaction.modes[mode];
67711    if (typeof method === 'function') {
67712      return method(this, e, options, useFinalPosition);
67713    }
67714    return [];
67715  }
67716  getDatasetMeta(datasetIndex) {
67717    const me = this;
67718    const dataset = me.data.datasets[datasetIndex];
67719    const metasets = me._metasets;
67720    let meta = metasets.filter(x => x && x._dataset === dataset).pop();
67721    if (!meta) {
67722      meta = {
67723        type: null,
67724        data: [],
67725        dataset: null,
67726        controller: null,
67727        hidden: null,
67728        xAxisID: null,
67729        yAxisID: null,
67730        order: dataset && dataset.order || 0,
67731        index: datasetIndex,
67732        _dataset: dataset,
67733        _parsed: [],
67734        _sorted: false
67735      };
67736      metasets.push(meta);
67737    }
67738    return meta;
67739  }
67740  getContext() {
67741    return this.$context || (this.$context = {chart: this, type: 'chart'});
67742  }
67743  getVisibleDatasetCount() {
67744    return this.getSortedVisibleDatasetMetas().length;
67745  }
67746  isDatasetVisible(datasetIndex) {
67747    const dataset = this.data.datasets[datasetIndex];
67748    if (!dataset) {
67749      return false;
67750    }
67751    const meta = this.getDatasetMeta(datasetIndex);
67752    return typeof meta.hidden === 'boolean' ? !meta.hidden : !dataset.hidden;
67753  }
67754  setDatasetVisibility(datasetIndex, visible) {
67755    const meta = this.getDatasetMeta(datasetIndex);
67756    meta.hidden = !visible;
67757  }
67758  toggleDataVisibility(index) {
67759    this._hiddenIndices[index] = !this._hiddenIndices[index];
67760  }
67761  getDataVisibility(index) {
67762    return !this._hiddenIndices[index];
67763  }
67764  _updateVisibility(datasetIndex, dataIndex, visible) {
67765    const me = this;
67766    const mode = visible ? 'show' : 'hide';
67767    const meta = me.getDatasetMeta(datasetIndex);
67768    const anims = meta.controller._resolveAnimations(undefined, mode);
67769    if (defined(dataIndex)) {
67770      meta.data[dataIndex].hidden = !visible;
67771      me.update();
67772    } else {
67773      me.setDatasetVisibility(datasetIndex, visible);
67774      anims.update(meta, {visible});
67775      me.update((ctx) => ctx.datasetIndex === datasetIndex ? mode : undefined);
67776    }
67777  }
67778  hide(datasetIndex, dataIndex) {
67779    this._updateVisibility(datasetIndex, dataIndex, false);
67780  }
67781  show(datasetIndex, dataIndex) {
67782    this._updateVisibility(datasetIndex, dataIndex, true);
67783  }
67784  _destroyDatasetMeta(datasetIndex) {
67785    const me = this;
67786    const meta = me._metasets && me._metasets[datasetIndex];
67787    if (meta && meta.controller) {
67788      meta.controller._destroy();
67789      delete me._metasets[datasetIndex];
67790    }
67791  }
67792  destroy() {
67793    const me = this;
67794    const {canvas, ctx} = me;
67795    let i, ilen;
67796    me.stop();
67797    animator.remove(me);
67798    for (i = 0, ilen = me.data.datasets.length; i < ilen; ++i) {
67799      me._destroyDatasetMeta(i);
67800    }
67801    me.config.clearCache();
67802    if (canvas) {
67803      me.unbindEvents();
67804      clearCanvas(canvas, ctx);
67805      me.platform.releaseContext(ctx);
67806      me.canvas = null;
67807      me.ctx = null;
67808    }
67809    me.notifyPlugins('destroy');
67810    delete instances[me.id];
67811  }
67812  toBase64Image(...args) {
67813    return this.canvas.toDataURL(...args);
67814  }
67815  bindEvents() {
67816    this.bindUserEvents();
67817    if (this.options.responsive) {
67818      this.bindResponsiveEvents();
67819    } else {
67820      this.attached = true;
67821    }
67822  }
67823  bindUserEvents() {
67824    const me = this;
67825    const listeners = me._listeners;
67826    const platform = me.platform;
67827    const _add = (type, listener) => {
67828      platform.addEventListener(me, type, listener);
67829      listeners[type] = listener;
67830    };
67831    const listener = function(e, x, y) {
67832      e.offsetX = x;
67833      e.offsetY = y;
67834      me._eventHandler(e);
67835    };
67836    each(me.options.events, (type) => _add(type, listener));
67837  }
67838  bindResponsiveEvents() {
67839    const me = this;
67840    if (!me._responsiveListeners) {
67841      me._responsiveListeners = {};
67842    }
67843    const listeners = me._responsiveListeners;
67844    const platform = me.platform;
67845    const _add = (type, listener) => {
67846      platform.addEventListener(me, type, listener);
67847      listeners[type] = listener;
67848    };
67849    const _remove = (type, listener) => {
67850      if (listeners[type]) {
67851        platform.removeEventListener(me, type, listener);
67852        delete listeners[type];
67853      }
67854    };
67855    const listener = (width, height) => {
67856      if (me.canvas) {
67857        me.resize(width, height);
67858      }
67859    };
67860    let detached;
67861    const attached = () => {
67862      _remove('attach', attached);
67863      me.attached = true;
67864      me.resize();
67865      _add('resize', listener);
67866      _add('detach', detached);
67867    };
67868    detached = () => {
67869      me.attached = false;
67870      _remove('resize', listener);
67871      _add('attach', attached);
67872    };
67873    if (platform.isAttached(me.canvas)) {
67874      attached();
67875    } else {
67876      detached();
67877    }
67878  }
67879  unbindEvents() {
67880    const me = this;
67881    each(me._listeners, (listener, type) => {
67882      me.platform.removeEventListener(me, type, listener);
67883    });
67884    me._listeners = {};
67885    each(me._responsiveListeners, (listener, type) => {
67886      me.platform.removeEventListener(me, type, listener);
67887    });
67888    me._responsiveListeners = undefined;
67889  }
67890  updateHoverStyle(items, mode, enabled) {
67891    const prefix = enabled ? 'set' : 'remove';
67892    let meta, item, i, ilen;
67893    if (mode === 'dataset') {
67894      meta = this.getDatasetMeta(items[0].datasetIndex);
67895      meta.controller['_' + prefix + 'DatasetHoverStyle']();
67896    }
67897    for (i = 0, ilen = items.length; i < ilen; ++i) {
67898      item = items[i];
67899      const controller = item && this.getDatasetMeta(item.datasetIndex).controller;
67900      if (controller) {
67901        controller[prefix + 'HoverStyle'](item.element, item.datasetIndex, item.index);
67902      }
67903    }
67904  }
67905  getActiveElements() {
67906    return this._active || [];
67907  }
67908  setActiveElements(activeElements) {
67909    const me = this;
67910    const lastActive = me._active || [];
67911    const active = activeElements.map(({datasetIndex, index}) => {
67912      const meta = me.getDatasetMeta(datasetIndex);
67913      if (!meta) {
67914        throw new Error('No dataset found at index ' + datasetIndex);
67915      }
67916      return {
67917        datasetIndex,
67918        element: meta.data[index],
67919        index,
67920      };
67921    });
67922    const changed = !_elementsEqual(active, lastActive);
67923    if (changed) {
67924      me._active = active;
67925      me._updateHoverStyles(active, lastActive);
67926    }
67927  }
67928  notifyPlugins(hook, args, filter) {
67929    return this._plugins.notify(this, hook, args, filter);
67930  }
67931  _updateHoverStyles(active, lastActive, replay) {
67932    const me = this;
67933    const hoverOptions = me.options.hover;
67934    const diff = (a, b) => a.filter(x => !b.some(y => x.datasetIndex === y.datasetIndex && x.index === y.index));
67935    const deactivated = diff(lastActive, active);
67936    const activated = replay ? active : diff(active, lastActive);
67937    if (deactivated.length) {
67938      me.updateHoverStyle(deactivated, hoverOptions.mode, false);
67939    }
67940    if (activated.length && hoverOptions.mode) {
67941      me.updateHoverStyle(activated, hoverOptions.mode, true);
67942    }
67943  }
67944  _eventHandler(e, replay) {
67945    const me = this;
67946    const args = {event: e, replay, cancelable: true};
67947    const eventFilter = (plugin) => (plugin.options.events || this.options.events).includes(e.type);
67948    if (me.notifyPlugins('beforeEvent', args, eventFilter) === false) {
67949      return;
67950    }
67951    const changed = me._handleEvent(e, replay);
67952    args.cancelable = false;
67953    me.notifyPlugins('afterEvent', args, eventFilter);
67954    if (changed || args.changed) {
67955      me.render();
67956    }
67957    return me;
67958  }
67959  _handleEvent(e, replay) {
67960    const me = this;
67961    const {_active: lastActive = [], options} = me;
67962    const hoverOptions = options.hover;
67963    const useFinalPosition = replay;
67964    let active = [];
67965    let changed = false;
67966    let lastEvent = null;
67967    if (e.type !== 'mouseout') {
67968      active = me.getElementsAtEventForMode(e, hoverOptions.mode, hoverOptions, useFinalPosition);
67969      lastEvent = e.type === 'click' ? me._lastEvent : e;
67970    }
67971    me._lastEvent = null;
67972    if (_isPointInArea(e, me.chartArea, me._minPadding)) {
67973      callback(options.onHover, [e, active, me], me);
67974      if (e.type === 'mouseup' || e.type === 'click' || e.type === 'contextmenu') {
67975        callback(options.onClick, [e, active, me], me);
67976      }
67977    }
67978    changed = !_elementsEqual(active, lastActive);
67979    if (changed || replay) {
67980      me._active = active;
67981      me._updateHoverStyles(active, lastActive, replay);
67982    }
67983    me._lastEvent = lastEvent;
67984    return changed;
67985  }
67986}
67987const invalidatePlugins = () => each(Chart.instances, (chart) => chart._plugins.invalidate());
67988const enumerable = true;
67989Object.defineProperties(Chart, {
67990  defaults: {
67991    enumerable,
67992    value: defaults
67993  },
67994  instances: {
67995    enumerable,
67996    value: instances
67997  },
67998  overrides: {
67999    enumerable,
68000    value: overrides
68001  },
68002  registry: {
68003    enumerable,
68004    value: registry
68005  },
68006  version: {
68007    enumerable,
68008    value: version
68009  },
68010  getChart: {
68011    enumerable,
68012    value: getChart
68013  },
68014  register: {
68015    enumerable,
68016    value: (...items) => {
68017      registry.add(...items);
68018      invalidatePlugins();
68019    }
68020  },
68021  unregister: {
68022    enumerable,
68023    value: (...items) => {
68024      registry.remove(...items);
68025      invalidatePlugins();
68026    }
68027  }
68028});
68029
68030function abstract() {
68031  throw new Error('This method is not implemented: Check that a complete date adapter is provided.');
68032}
68033class DateAdapter {
68034  constructor(options) {
68035    this.options = options || {};
68036  }
68037  formats() {
68038    return abstract();
68039  }
68040  parse(value, format) {
68041    return abstract();
68042  }
68043  format(timestamp, format) {
68044    return abstract();
68045  }
68046  add(timestamp, amount, unit) {
68047    return abstract();
68048  }
68049  diff(a, b, unit) {
68050    return abstract();
68051  }
68052  startOf(timestamp, unit, weekday) {
68053    return abstract();
68054  }
68055  endOf(timestamp, unit) {
68056    return abstract();
68057  }
68058}
68059DateAdapter.override = function(members) {
68060  Object.assign(DateAdapter.prototype, members);
68061};
68062var _adapters = {
68063  _date: DateAdapter
68064};
68065
68066function getAllScaleValues(scale) {
68067  if (!scale._cache.$bar) {
68068    const metas = scale.getMatchingVisibleMetas('bar');
68069    let values = [];
68070    for (let i = 0, ilen = metas.length; i < ilen; i++) {
68071      values = values.concat(metas[i].controller.getAllParsedValues(scale));
68072    }
68073    scale._cache.$bar = _arrayUnique(values.sort((a, b) => a - b));
68074  }
68075  return scale._cache.$bar;
68076}
68077function computeMinSampleSize(scale) {
68078  const values = getAllScaleValues(scale);
68079  let min = scale._length;
68080  let i, ilen, curr, prev;
68081  const updateMinAndPrev = () => {
68082    if (curr === 32767 || curr === -32768) {
68083      return;
68084    }
68085    if (defined(prev)) {
68086      min = Math.min(min, Math.abs(curr - prev) || min);
68087    }
68088    prev = curr;
68089  };
68090  for (i = 0, ilen = values.length; i < ilen; ++i) {
68091    curr = scale.getPixelForValue(values[i]);
68092    updateMinAndPrev();
68093  }
68094  prev = undefined;
68095  for (i = 0, ilen = scale.ticks.length; i < ilen; ++i) {
68096    curr = scale.getPixelForTick(i);
68097    updateMinAndPrev();
68098  }
68099  return min;
68100}
68101function computeFitCategoryTraits(index, ruler, options, stackCount) {
68102  const thickness = options.barThickness;
68103  let size, ratio;
68104  if (isNullOrUndef(thickness)) {
68105    size = ruler.min * options.categoryPercentage;
68106    ratio = options.barPercentage;
68107  } else {
68108    size = thickness * stackCount;
68109    ratio = 1;
68110  }
68111  return {
68112    chunk: size / stackCount,
68113    ratio,
68114    start: ruler.pixels[index] - (size / 2)
68115  };
68116}
68117function computeFlexCategoryTraits(index, ruler, options, stackCount) {
68118  const pixels = ruler.pixels;
68119  const curr = pixels[index];
68120  let prev = index > 0 ? pixels[index - 1] : null;
68121  let next = index < pixels.length - 1 ? pixels[index + 1] : null;
68122  const percent = options.categoryPercentage;
68123  if (prev === null) {
68124    prev = curr - (next === null ? ruler.end - ruler.start : next - curr);
68125  }
68126  if (next === null) {
68127    next = curr + curr - prev;
68128  }
68129  const start = curr - (curr - Math.min(prev, next)) / 2 * percent;
68130  const size = Math.abs(next - prev) / 2 * percent;
68131  return {
68132    chunk: size / stackCount,
68133    ratio: options.barPercentage,
68134    start
68135  };
68136}
68137function parseFloatBar(entry, item, vScale, i) {
68138  const startValue = vScale.parse(entry[0], i);
68139  const endValue = vScale.parse(entry[1], i);
68140  const min = Math.min(startValue, endValue);
68141  const max = Math.max(startValue, endValue);
68142  let barStart = min;
68143  let barEnd = max;
68144  if (Math.abs(min) > Math.abs(max)) {
68145    barStart = max;
68146    barEnd = min;
68147  }
vendor: 4,075 bytes, lines 68148-68287
68148  item[vScale.axis] = barEnd;
68149  item._custom = {
68150    barStart,
68151    barEnd,
68152    start: startValue,
68153    end: endValue,
68154    min,
68155    max
68156  };
68157}
68158function parseValue(entry, item, vScale, i) {
68159  if (isArray(entry)) {
68160    parseFloatBar(entry, item, vScale, i);
68161  } else {
68162    item[vScale.axis] = vScale.parse(entry, i);
68163  }
68164  return item;
68165}
68166function parseArrayOrPrimitive(meta, data, start, count) {
68167  const iScale = meta.iScale;
68168  const vScale = meta.vScale;
68169  const labels = iScale.getLabels();
68170  const singleScale = iScale === vScale;
68171  const parsed = [];
68172  let i, ilen, item, entry;
68173  for (i = start, ilen = start + count; i < ilen; ++i) {
68174    entry = data[i];
68175    item = {};
68176    item[iScale.axis] = singleScale || iScale.parse(labels[i], i);
68177    parsed.push(parseValue(entry, item, vScale, i));
68178  }
68179  return parsed;
68180}
68181function isFloatBar(custom) {
68182  return custom && custom.barStart !== undefined && custom.barEnd !== undefined;
68183}
68184function barSign(size, vScale, actualBase) {
68185  if (size !== 0) {
68186    return sign(size);
68187  }
68188  return (vScale.isHorizontal() ? 1 : -1) * (vScale.min >= actualBase ? 1 : -1);
68189}
68190function borderProps(properties) {
68191  let reverse, start, end, top, bottom;
68192  if (properties.horizontal) {
68193    reverse = properties.base > properties.x;
68194    start = 'left';
68195    end = 'right';
68196  } else {
68197    reverse = properties.base < properties.y;
68198    start = 'bottom';
68199    end = 'top';
68200  }
68201  if (reverse) {
68202    top = 'end';
68203    bottom = 'start';
68204  } else {
68205    top = 'start';
68206    bottom = 'end';
68207  }
68208  return {start, end, reverse, top, bottom};
68209}
68210function setBorderSkipped(properties, options, stack, index) {
68211  let edge = options.borderSkipped;
68212  const res = {};
68213  if (!edge) {
68214    properties.borderSkipped = res;
68215    return;
68216  }
68217  const {start, end, reverse, top, bottom} = borderProps(properties);
68218  if (edge === 'middle' && stack) {
68219    properties.enableBorderRadius = true;
68220    if ((stack._top || 0) === index) {
68221      edge = top;
68222    } else if ((stack._bottom || 0) === index) {
68223      edge = bottom;
68224    } else {
68225      res[parseEdge(bottom, start, end, reverse)] = true;
68226      edge = top;
68227    }
68228  }
68229  res[parseEdge(edge, start, end, reverse)] = true;
68230  properties.borderSkipped = res;
68231}
68232function parseEdge(edge, a, b, reverse) {
68233  if (reverse) {
68234    edge = swap(edge, a, b);
68235    edge = startEnd(edge, b, a);
68236  } else {
68237    edge = startEnd(edge, a, b);
68238  }
68239  return edge;
68240}
68241function swap(orig, v1, v2) {
68242  return orig === v1 ? v2 : orig === v2 ? v1 : orig;
68243}
68244function startEnd(v, start, end) {
68245  return v === 'start' ? start : v === 'end' ? end : v;
68246}
68247class BarController extends DatasetController {
68248  parsePrimitiveData(meta, data, start, count) {
68249    return parseArrayOrPrimitive(meta, data, start, count);
68250  }
68251  parseArrayData(meta, data, start, count) {
68252    return parseArrayOrPrimitive(meta, data, start, count);
68253  }
68254  parseObjectData(meta, data, start, count) {
68255    const {iScale, vScale} = meta;
68256    const {xAxisKey = 'x', yAxisKey = 'y'} = this._parsing;
68257    const iAxisKey = iScale.axis === 'x' ? xAxisKey : yAxisKey;
68258    const vAxisKey = vScale.axis === 'x' ? xAxisKey : yAxisKey;
68259    const parsed = [];
68260    let i, ilen, item, obj;
68261    for (i = start, ilen = start + count; i < ilen; ++i) {
68262      obj = data[i];
68263      item = {};
68264      item[iScale.axis] = iScale.parse(resolveObjectKey(obj, iAxisKey), i);
68265      parsed.push(parseValue(resolveObjectKey(obj, vAxisKey), item, vScale, i));
68266    }
68267    return parsed;
68268  }
68269  updateRangeFromParsed(range, scale, parsed, stack) {
68270    super.updateRangeFromParsed(range, scale, parsed, stack);
68271    const custom = parsed._custom;
68272    if (custom && scale === this._cachedMeta.vScale) {
68273      range.min = Math.min(range.min, custom.min);
68274      range.max = Math.max(range.max, custom.max);
68275    }
68276  }
68277  getMaxOverflow() {
68278    return 0;
68279  }
68280  getLabelAndValue(index) {
68281    const me = this;
68282    const meta = me._cachedMeta;
68283    const {iScale, vScale} = meta;
68284    const parsed = me.getParsed(index);
68285    const custom = parsed._custom;
68286    const value = isFloatBar(custom)
68287      ? '[' + custom.start + ', ' + custom.end + ']'
68288      : '' + vScale.getLabelForValue(parsed[vScale.axis]);
68289    return {
68290      label: '' + iScale.getLabelForValue(parsed[iScale.axis]),
68291      value
68292    };
68293  }
68294  initialize() {
68295    const me = this;
68296    me.enableOptionSharing = true;
68297    super.initialize();
68298    const meta = me._cachedMeta;
68299    meta.stack = me.getDataset().stack;
68300  }
68301  update(mode) {
68302    const me = this;
68303    const meta = me._cachedMeta;
68304    me.updateElements(meta.data, 0, meta.data.length, mode);
68305  }
68306  updateElements(bars, start, count, mode) {
68307    const me = this;
68308    const reset = mode === 'reset';
68309    const {index, _cachedMeta: {vScale}} = me;
68310    const base = vScale.getBasePixel();
68311    const horizontal = vScale.isHorizontal();
68312    const ruler = me._getRuler();
68313    const firstOpts = me.resolveDataElementOptions(start, mode);
68314    const sharedOptions = me.getSharedOptions(firstOpts);
68315    const includeOptions = me.includeOptions(mode, sharedOptions);
68316    me.updateSharedOptions(sharedOptions, mode, firstOpts);
68317    for (let i = start; i < start + count; i++) {
68318      const parsed = me.getParsed(i);
68319      const vpixels = reset || isNullOrUndef(parsed[vScale.axis]) ? {base, head: base} : me._calculateBarValuePixels(i);
68320      const ipixels = me._calculateBarIndexPixels(i, ruler);
68321      const stack = (parsed._stacks || {})[vScale.axis];
68322      const properties = {
68323        horizontal,
68324        base: vpixels.base,
68325        enableBorderRadius: !stack || isFloatBar(parsed._custom) || (index === stack._top || index === stack._bottom),
68326        x: horizontal ? vpixels.head : ipixels.center,
68327        y: horizontal ? ipixels.center : vpixels.head,
68328        height: horizontal ? ipixels.size : Math.abs(vpixels.size),
68329        width: horizontal ? Math.abs(vpixels.size) : ipixels.size
68330      };
68331      if (includeOptions) {
68332        properties.options = sharedOptions || me.resolveDataElementOptions(i, bars[i].active ? 'active' : mode);
68333      }
68334      setBorderSkipped(properties, properties.options || bars[i].options, stack, index);
68335      me.updateElement(bars[i], i, properties, mode);
68336    }
68337  }
68338  _getStacks(last, dataIndex) {
68339    const me = this;
68340    const meta = me._cachedMeta;
68341    const iScale = meta.iScale;
68342    const metasets = iScale.getMatchingVisibleMetas(me._type);
68343    const stacked = iScale.options.stacked;
68344    const ilen = metasets.length;
68345    const stacks = [];
68346    let i, item;
68347    for (i = 0; i < ilen; ++i) {
68348      item = metasets[i];
68349      if (!item.controller.options.grouped) {
68350        continue;
68351      }
68352      if (typeof dataIndex !== 'undefined') {
68353        const val = item.controller.getParsed(dataIndex)[
68354          item.controller._cachedMeta.vScale.axis
68355        ];
68356        if (isNullOrUndef(val) || isNaN(val)) {
68357          continue;
68358        }
68359      }
68360      if (stacked === false || stacks.indexOf(item.stack) === -1 ||
68361				(stacked === undefined && item.stack === undefined)) {
68362        stacks.push(item.stack);
68363      }
68364      if (item.index === last) {
68365        break;
68366      }
68367    }
68368    if (!stacks.length) {
68369      stacks.push(undefined);
68370    }
68371    return stacks;
68372  }
68373  _getStackCount(index) {
68374    return this._getStacks(undefined, index).length;
68375  }
68376  _getStackIndex(datasetIndex, name, dataIndex) {
68377    const stacks = this._getStacks(datasetIndex, dataIndex);
68378    const index = (name !== undefined)
68379      ? stacks.indexOf(name)
68380      : -1;
68381    return (index === -1)
68382      ? stacks.length - 1
68383      : index;
68384  }
68385  _getRuler() {
68386    const me = this;
68387    const opts = me.options;
68388    const meta = me._cachedMeta;
68389    const iScale = meta.iScale;
68390    const pixels = [];
68391    let i, ilen;
68392    for (i = 0, ilen = meta.data.length; i < ilen; ++i) {
68393      pixels.push(iScale.getPixelForValue(me.getParsed(i)[iScale.axis], i));
68394    }
68395    const barThickness = opts.barThickness;
68396    const min = barThickness || computeMinSampleSize(iScale);
68397    return {
68398      min,
68399      pixels,
68400      start: iScale._startPixel,
68401      end: iScale._endPixel,
68402      stackCount: me._getStackCount(),
68403      scale: iScale,
68404      grouped: opts.grouped,
68405      ratio: barThickness ? 1 : opts.categoryPercentage * opts.barPercentage
68406    };
68407  }
68408  _calculateBarValuePixels(index) {
68409    const me = this;
68410    const {_cachedMeta: {vScale, _stacked}, options: {base: baseValue, minBarLength}} = me;
68411    const actualBase = baseValue || 0;
68412    const parsed = me.getParsed(index);
68413    const custom = parsed._custom;
68414    const floating = isFloatBar(custom);
68415    let value = parsed[vScale.axis];
68416    let start = 0;
68417    let length = _stacked ? me.applyStack(vScale, parsed, _stacked) : value;
68418    let head, size;
68419    if (length !== value) {
68420      start = length - value;
68421      length = value;
68422    }
68423    if (floating) {
68424      value = custom.barStart;
68425      length = custom.barEnd - custom.barStart;
68426      if (value !== 0 && sign(value) !== sign(custom.barEnd)) {
68427        start = 0;
68428      }
68429      start += value;
68430    }
68431    const startValue = !isNullOrUndef(baseValue) && !floating ? baseValue : start;
68432    let base = vScale.getPixelForValue(startValue);
68433    if (me.chart.getDataVisibility(index)) {
68434      head = vScale.getPixelForValue(start + length);
68435    } else {
68436      head = base;
68437    }
68438    size = head - base;
68439    if (Math.abs(size) < minBarLength) {
68440      size = barSign(size, vScale, actualBase) * minBarLength;
68441      if (value === actualBase) {
68442        base -= size / 2;
68443      }
68444      head = base + size;
68445    }
68446    if (base === vScale.getPixelForValue(actualBase)) {
68447      const halfGrid = sign(size) * vScale.getLineWidthForValue(actualBase) / 2;
68448      base += halfGrid;
68449      size -= halfGrid;
68450    }
68451    return {
68452      size,
68453      base,
68454      head,
68455      center: head + size / 2
68456    };
68457  }
68458  _calculateBarIndexPixels(index, ruler) {
68459    const me = this;
68460    const scale = ruler.scale;
68461    const options = me.options;
68462    const skipNull = options.skipNull;
68463    const maxBarThickness = valueOrDefault(options.maxBarThickness, Infinity);
68464    let center, size;
68465    if (ruler.grouped) {
68466      const stackCount = skipNull ? me._getStackCount(index) : ruler.stackCount;
68467      const range = options.barThickness === 'flex'
68468        ? computeFlexCategoryTraits(index, ruler, options, stackCount)
68469        : computeFitCategoryTraits(index, ruler, options, stackCount);
68470      const stackIndex = me._getStackIndex(me.index, me._cachedMeta.stack, skipNull ? index : undefined);
68471      center = range.start + (range.chunk * stackIndex) + (range.chunk / 2);
68472      size = Math.min(maxBarThickness, range.chunk * range.ratio);
68473    } else {
68474      center = scale.getPixelForValue(me.getParsed(index)[scale.axis], index);
68475      size = Math.min(maxBarThickness, ruler.min * ruler.ratio);
68476    }
68477    return {
68478      base: center - size / 2,
68479      head: center + size / 2,
68480      center,
68481      size
68482    };
68483  }
68484  draw() {
68485    const me = this;
68486    const meta = me._cachedMeta;
68487    const vScale = meta.vScale;
68488    const rects = meta.data;
68489    const ilen = rects.length;
68490    let i = 0;
68491    for (; i < ilen; ++i) {
68492      if (me.getParsed(i)[vScale.axis] !== null) {
68493        rects[i].draw(me._ctx);
68494      }
68495    }
68496  }
68497}
68498BarController.id = 'bar';
68499BarController.defaults = {
68500  datasetElementType: false,
68501  dataElementType: 'bar',
68502  categoryPercentage: 0.8,
68503  barPercentage: 0.9,
68504  grouped: true,
68505  animations: {
68506    numbers: {
68507      type: 'number',
68508      properties: ['x', 'y', 'base', 'width', 'height']
68509    }
68510  }
68511};
68512BarController.overrides = {
68513  scales: {
68514    _index_: {
68515      type: 'category',
68516      offset: true,
68517      grid: {
68518        offset: true
68519      }
68520    },
68521    _value_: {
68522      type: 'linear',
68523      beginAtZero: true,
68524    }
68525  }
68526};
68527
68528class BubbleController extends DatasetController {
68529  initialize() {
68530    this.enableOptionSharing = true;
68531    super.initialize();
68532  }
68533  parseObjectData(meta, data, start, count) {
68534    const {xScale, yScale} = meta;
68535    const {xAxisKey = 'x', yAxisKey = 'y'} = this._parsing;
68536    const parsed = [];
68537    let i, ilen, item;
68538    for (i = start, ilen = start + count; i < ilen; ++i) {
68539      item = data[i];
68540      parsed.push({
68541        x: xScale.parse(resolveObjectKey(item, xAxisKey), i),
68542        y: yScale.parse(resolveObjectKey(item, yAxisKey), i),
68543        _custom: item && item.r && +item.r
68544      });
68545    }
68546    return parsed;
68547  }
68548  getMaxOverflow() {
68549    const {data, _parsed} = this._cachedMeta;
68550    let max = 0;
68551    for (let i = data.length - 1; i >= 0; --i) {
68552      max = Math.max(max, data[i].size() / 2, _parsed[i]._custom);
68553    }
68554    return max > 0 && max;
68555  }
68556  getLabelAndValue(index) {
68557    const me = this;
68558    const meta = me._cachedMeta;
68559    const {xScale, yScale} = meta;
68560    const parsed = me.getParsed(index);
68561    const x = xScale.getLabelForValue(parsed.x);
68562    const y = yScale.getLabelForValue(parsed.y);
68563    const r = parsed._custom;
68564    return {
68565      label: meta.label,
68566      value: '(' + x + ', ' + y + (r ? ', ' + r : '') + ')'
68567    };
68568  }
68569  update(mode) {
68570    const me = this;
68571    const points = me._cachedMeta.data;
68572    me.updateElements(points, 0, points.length, mode);
68573  }
68574  updateElements(points, start, count, mode) {
68575    const me = this;
68576    const reset = mode === 'reset';
68577    const {iScale, vScale}
vendor: 5,384 bytes, lines 68577-68732
68577 = me._cachedMeta;
68578    const firstOpts = me.resolveDataElementOptions(start, mode);
68579    const sharedOptions = me.getSharedOptions(firstOpts);
68580    const includeOptions = me.includeOptions(mode, sharedOptions);
68581    const iAxis = iScale.axis;
68582    const vAxis = vScale.axis;
68583    for (let i = start; i < start + count; i++) {
68584      const point = points[i];
68585      const parsed = !reset && me.getParsed(i);
68586      const properties = {};
68587      const iPixel = properties[iAxis] = reset ? iScale.getPixelForDecimal(0.5) : iScale.getPixelForValue(parsed[iAxis]);
68588      const vPixel = properties[vAxis] = reset ? vScale.getBasePixel() : vScale.getPixelForValue(parsed[vAxis]);
68589      properties.skip = isNaN(iPixel) || isNaN(vPixel);
68590      if (includeOptions) {
68591        properties.options = me.resolveDataElementOptions(i, point.active ? 'active' : mode);
68592        if (reset) {
68593          properties.options.radius = 0;
68594        }
68595      }
68596      me.updateElement(point, i, properties, mode);
68597    }
68598    me.updateSharedOptions(sharedOptions, mode, firstOpts);
68599  }
68600  resolveDataElementOptions(index, mode) {
68601    const parsed = this.getParsed(index);
68602    let values = super.resolveDataElementOptions(index, mode);
68603    if (values.$shared) {
68604      values = Object.assign({}, values, {$shared: false});
68605    }
68606    const radius = values.radius;
68607    if (mode !== 'active') {
68608      values.radius = 0;
68609    }
68610    values.radius += valueOrDefault(parsed && parsed._custom, radius);
68611    return values;
68612  }
68613}
68614BubbleController.id = 'bubble';
68615BubbleController.defaults = {
68616  datasetElementType: false,
68617  dataElementType: 'point',
68618  animations: {
68619    numbers: {
68620      type: 'number',
68621      properties: ['x', 'y', 'borderWidth', 'radius']
68622    }
68623  }
68624};
68625BubbleController.overrides = {
68626  scales: {
68627    x: {
68628      type: 'linear'
68629    },
68630    y: {
68631      type: 'linear'
68632    }
68633  },
68634  plugins: {
68635    tooltip: {
68636      callbacks: {
68637        title() {
68638          return '';
68639        }
68640      }
68641    }
68642  }
68643};
68644
68645function getRatioAndOffset(rotation, circumference, cutout) {
68646  let ratioX = 1;
68647  let ratioY = 1;
68648  let offsetX = 0;
68649  let offsetY = 0;
68650  if (circumference < TAU) {
68651    const startAngle = rotation;
68652    const endAngle = startAngle + circumference;
68653    const startX = Math.cos(startAngle);
68654    const startY = Math.sin(startAngle);
68655    const endX = Math.cos(endAngle);
68656    const endY = Math.sin(endAngle);
68657    const calcMax = (angle, a, b) => _angleBetween(angle, startAngle, endAngle, true) ? 1 : Math.max(a, a * cutout, b, b * cutout);
68658    const calcMin = (angle, a, b) => _angleBetween(angle, startAngle, endAngle, true) ? -1 : Math.min(a, a * cutout, b, b * cutout);
68659    const maxX = calcMax(0, startX, endX);
68660    const maxY = calcMax(HALF_PI, startY, endY);
68661    const minX = calcMin(PI, startX, endX);
68662    const minY = calcMin(PI + HALF_PI, startY, endY);
68663    ratioX = (maxX - minX) / 2;
68664    ratioY = (maxY - minY) / 2;
68665    offsetX = -(maxX + minX) / 2;
68666    offsetY = -(maxY + minY) / 2;
68667  }
68668  return {ratioX, ratioY, offsetX, offsetY};
68669}
68670class DoughnutController extends DatasetController {
68671  constructor(chart, datasetIndex) {
68672    super(chart, datasetIndex);
68673    this.enableOptionSharing = true;
68674    this.innerRadius = undefined;
68675    this.outerRadius = undefined;
68676    this.offsetX = undefined;
68677    this.offsetY = undefined;
68678  }
68679  linkScales() {}
68680  parse(start, count) {
68681    const data = this.getDataset().data;
68682    const meta = this._cachedMeta;
68683    let i, ilen;
68684    for (i = start, ilen = start + count; i < ilen; ++i) {
68685      meta._parsed[i] = +data[i];
68686    }
68687  }
68688  _getRotation() {
68689    return toRadians(this.options.rotation - 90);
68690  }
68691  _getCircumference() {
68692    return toRadians(this.options.circumference);
68693  }
68694  _getRotationExtents() {
68695    let min = TAU;
68696    let max = -TAU;
68697    const me = this;
68698    for (let i = 0; i < me.chart.data.datasets.length; ++i) {
68699      if (me.chart.isDatasetVisible(i)) {
68700        const controller = me.chart.getDatasetMeta(i).controller;
68701        const rotation = controller._getRotation();
68702        const circumference = controller._getCircumference();
68703        min = Math.min(min, rotation);
68704        max = Math.max(max, rotation + circumference);
68705      }
68706    }
68707    return {
68708      rotation: min,
68709      circumference: max - min,
68710    };
68711  }
68712  update(mode) {
68713    const me = this;
68714    const chart = me.chart;
68715    const {chartArea} = chart;
68716    const meta = me._cachedMeta;
68717    const arcs = meta.data;
68718    const spacing = me.getMaxBorderWidth() + me.getMaxOffset(arcs) + me.options.spacing;
68719    const maxSize = Math.max((Math.min(chartArea.width, chartArea.height) - spacing) / 2, 0);
68720    const cutout = Math.min(toPercentage(me.options.cutout, maxSize), 1);
68721    const chartWeight = me._getRingWeight(me.index);
68722    const {circumference, rotation} = me._getRotationExtents();
68723    const {ratioX, ratioY, offsetX, offsetY} = getRatioAndOffset(rotation, circumference, cutout);
68724    const maxWidth = (chartArea.width - spacing) / ratioX;
68725    const maxHeight = (chartArea.height - spacing) / ratioY;
68726    const maxRadius = Math.max(Math.min(maxWidth, maxHeight) / 2, 0);
68727    const outerRadius = toDimension(me.options.radius, maxRadius);
68728    const innerRadius = Math.max(outerRadius * cutout, 0);
68729    const radiusLength = (outerRadius - innerRadius) / me._getVisibleDatasetWeightTotal();
68730    me.offsetX = offsetX * outerRadius;
68731    me.offsetY = offsetY * outerRadius;
68732    meta.total = me.calculateTotal();
68733    me.outerRadius = outerRadius - radiusLength * me._getRingWeightOffset(me.index);
68734    me.innerRadius = Math.max(me.outerRadius - radiusLength * chartWeight, 0);
68735    me.updateElements(arcs, 0, arcs.length, mode);
68736  }
68737  _circumference(i, reset) {
68738    const me = this;
68739    const opts = me.options;
68740    const meta = me._cachedMeta;
68741    const circumference = me._getCircumference();
68742    if ((reset && opts.animation.animateRotate) || !this.chart.getDataVisibility(i) || meta._parsed[i] === null || meta.data[i].hidden) {
68743      return 0;
68744    }
68745    return me.calculateCircumference(meta._parsed[i] * circumference / TAU);
68746  }
68747  updateElements(arcs, start, count, mode) {
68748    const me = this;
68749    const reset = mode === 'reset';
68750    const chart = me.chart;
68751    const chartArea = chart.chartArea;
68752    const opts = chart.options;
68753    const animationOpts = opts.animation;
68754    const centerX = (chartArea.left + chartArea.right) / 2;
68755    const centerY = (chartArea.top + chartArea.bottom) / 2;
68756    const animateScale = reset && animationOpts.animateScale;
68757    const innerRadius = animateScale ? 0 : me.innerRadius;
68758    const outerRadius = animateScale ? 0 : me.outerRadius;
68759    const firstOpts = me.resolveDataElementOptions(start, mode);
68760    const sharedOptions = me.getSharedOptions(firstOpts);
68761    const includeOptions = me.includeOptions(mode, sharedOptions);
68762    let startAngle = me._getRotation();
68763    let i;
68764    for (i = 0; i < start; ++i) {
68765      startAngle += me._circumference(i, reset);
68766    }
68767    for (i = start; i < start + count; ++i) {
68768      const circumference = me._circumference(i, reset);
68769      const arc = arcs[i];
68770      const properties = {
68771        x: centerX + me.offsetX,
68772        y: centerY + me.offsetY,
68773        startAngle,
68774        endAngle: startAngle + circumference,
68775        circumference,
68776        outerRadius,
68777        innerRadius
68778      };
68779      if (includeOptions) {
68780        properties.options = sharedOptions || me.resolveDataElementOptions(i, arc.active ? 'active' : mode);
68781      }
68782      startAngle += circumference;
68783      me.updateElement(arc, i, properties, mode);
68784    }
68785    me.updateSharedOptions(sharedOptions, mode, firstOpts);
68786  }
68787  calculateTotal() {
68788    const meta = this._cachedMeta;
68789    const metaData = meta.data;
68790    let total = 0;
68791    let i;
68792    for (i = 0; i < metaData.length; i++) {
68793      const value = meta._parsed[i];
68794      if (value !== null && !isNaN(value) && this.chart.getDataVisibility(i) && !metaData[i].hidden) {
68795        total += Math.abs(value);
68796      }
68797    }
68798    return total;
68799  }
68800  calculateCircumference(value) {
68801    const total = this._cachedMeta.total;
68802    if (total > 0 && !isNaN(value)) {
68803      return TAU * (Math.abs(value) / total);
68804    }
68805    return 0;
68806  }
68807  getLabelAndValue(index) {
68808    const me = this;
68809    const meta = me._cachedMeta;
68810    const chart = me.chart;
68811    const labels = chart.data.labels || [];
68812    const value = formatNumber(meta._parsed[index], chart.options.locale);
68813    return {
68814      label: labels[index] || '',
68815      value,
68816    };
68817  }
68818  getMaxBorderWidth(arcs) {
68819    const me = this;
68820    let max = 0;
68821    const chart = me.chart;
68822    let i, ilen, meta, controller, options;
68823    if (!arcs) {
68824      for (i = 0, ilen = chart.data.datasets.length; i < ilen; ++i) {
68825        if (chart.isDatasetVisible(i)) {
68826          meta = chart.getDatasetMeta(i);
68827          arcs = meta.data;
68828          controller = meta.controller;
68829          if (controller !== me) {
68830            controller.configure();
68831          }
68832          break;
68833        }
68834      }
68835    }
68836    if (!arcs) {
68837      return 0;
68838    }
68839    for (i = 0, ilen = arcs.length; i < ilen; ++i) {
68840      options = controller.resolveDataElementOptions(i);
68841      if (options.borderAlign !== 'inner') {
68842        max = Math.max(max, options.borderWidth || 0, options.hoverBorderWidth || 0);
68843      }
68844    }
68845    return max;
68846  }
68847  getMaxOffset(arcs) {
68848    let max = 0;
68849    for (let i = 0, ilen = arcs.length; i < ilen; ++i) {
68850      const options = this.resolveDataElementOptions(i);
68851      max = Math.max(max, options.offset || 0, options.hoverOffset || 0);
68852    }
68853    return max;
68854  }
68855  _getRingWeightOffset(datasetIndex) {
68856    let ringWeightOffset = 0;
68857    for (let i = 0; i < datasetIndex; ++i) {
68858      if (this.chart.isDatasetVisible(i)) {
68859        ringWeightOffset += this._getRingWeight(i);
68860      }
68861    }
68862    return ringWeightOffset;
68863  }
68864  _getRingWeight(datasetIndex) {
68865    return Math.max(valueOrDefault(this.chart.data.datasets[datasetIndex].weight, 1), 0
vendor: 8,398 bytes, lines 68865-69124
68865);
68866  }
68867  _getVisibleDatasetWeightTotal() {
68868    return this._getRingWeightOffset(this.chart.data.datasets.length) || 1;
68869  }
68870}
68871DoughnutController.id = 'doughnut';
68872DoughnutController.defaults = {
68873  datasetElementType: false,
68874  dataElementType: 'arc',
68875  animation: {
68876    animateRotate: true,
68877    animateScale: false
68878  },
68879  animations: {
68880    numbers: {
68881      type: 'number',
68882      properties: ['circumference', 'endAngle', 'innerRadius', 'outerRadius', 'startAngle', 'x', 'y', 'offset', 'borderWidth', 'spacing']
68883    },
68884  },
68885  cutout: '50%',
68886  rotation: 0,
68887  circumference: 360,
68888  radius: '100%',
68889  spacing: 0,
68890  indexAxis: 'r',
68891};
68892DoughnutController.descriptors = {
68893  _scriptable: (name) => name !== 'spacing',
68894  _indexable: (name) => name !== 'spacing',
68895};
68896DoughnutController.overrides = {
68897  aspectRatio: 1,
68898  plugins: {
68899    legend: {
68900      labels: {
68901        generateLabels(chart) {
68902          const data = chart.data;
68903          if (data.labels.length && data.datasets.length) {
68904            const {labels: {pointStyle}} = chart.legend.options;
68905            return data.labels.map((label, i) => {
68906              const meta = chart.getDatasetMeta(0);
68907              const style = meta.controller.getStyle(i);
68908              return {
68909                text: label,
68910                fillStyle: style.backgroundColor,
68911                strokeStyle: style.borderColor,
68912                lineWidth: style.borderWidth,
68913                pointStyle: pointStyle,
68914                hidden: !chart.getDataVisibility(i),
68915                index: i
68916              };
68917            });
68918          }
68919          return [];
68920        }
68921      },
68922      onClick(e, legendItem, legend) {
68923        legend.chart.toggleDataVisibility(legendItem.index);
68924        legend.chart.update();
68925      }
68926    },
68927    tooltip: {
68928      callbacks: {
68929        title() {
68930          return '';
68931        },
68932        label(tooltipItem) {
68933          let dataLabel = tooltipItem.label;
68934          const value = ': ' + tooltipItem.formattedValue;
68935          if (isArray(dataLabel)) {
68936            dataLabel = dataLabel.slice();
68937            dataLabel[0] += value;
68938          } else {
68939            dataLabel += value;
68940          }
68941          return dataLabel;
68942        }
68943      }
68944    }
68945  }
68946};
68947
68948class LineController extends DatasetController {
68949  initialize() {
68950    this.enableOptionSharing = true;
68951    super.initialize();
68952  }
68953  update(mode) {
68954    const me = this;
68955    const meta = me._cachedMeta;
68956    const {dataset: line, data: points = [], _dataset} = meta;
68957    const animationsDisabled = me.chart._animationsDisabled;
68958    let {start, count} = getStartAndCountOfVisiblePoints(meta, points, animationsDisabled);
68959    me._drawStart = start;
68960    me._drawCount = count;
68961    if (scaleRangesChanged(meta)) {
68962      start = 0;
68963      count = points.length;
68964    }
68965    line._datasetIndex = me.index;
68966    line._decimated = !!_dataset._decimated;
68967    line.points = points;
68968    const options = me.resolveDatasetElementOptions(mode);
68969    if (!me.options.showLine) {
68970      options.borderWidth = 0;
68971    }
68972    options.segment = me.options.segment;
68973    me.updateElement(line, undefined, {
68974      animated: !animationsDisabled,
68975      options
68976    }, mode);
68977    me.updateElements(points, start, count, mode);
68978  }
68979  updateElements(points, start, count, mode) {
68980    const me = this;
68981    const reset = mode === 'reset';
68982    const {iScale, vScale, _stacked} = me._cachedMeta;
68983    const firstOpts = me.resolveDataElementOptions(start, mode);
68984    const sharedOptions = me.getSharedOptions(firstOpts);
68985    const includeOptions = me.includeOptions(mode, sharedOptions);
68986    const iAxis = iScale.axis;
68987    const vAxis = vScale.axis;
68988    const spanGaps = me.options.spanGaps;
68989    const maxGapLength = isNumber(spanGaps) ? spanGaps : Number.POSITIVE_INFINITY;
68990    const directUpdate = me.chart._animationsDisabled || reset || mode === 'none';
68991    let prevParsed = start > 0 && me.getParsed(start - 1);
68992    for (let i = start; i < start + count; ++i) {
68993      const point = points[i];
68994      const parsed = me.getParsed(i);
68995      const properties = directUpdate ? point : {};
68996      const nullData = isNullOrUndef(parsed[vAxis]);
68997      const iPixel = properties[iAxis] = iScale.getPixelForValue(parsed[iAxis], i);
68998      const vPixel = properties[vAxis] = reset || nullData ? vScale.getBasePixel() : vScale.getPixelForValue(_stacked ? me.applyStack(vScale, parsed, _stacked) : parsed[vAxis], i);
68999      properties.skip = isNaN(iPixel) || isNaN(vPixel) || nullData;
69000      properties.stop = i > 0 && (parsed[iAxis] - prevParsed[iAxis]) > maxGapLength;
69001      properties.parsed = parsed;
69002      if (includeOptions) {
69003        properties.options = sharedOptions || me.resolveDataElementOptions(i, point.active ? 'active' : mode);
69004      }
69005      if (!directUpdate) {
69006        me.updateElement(point, i, properties, mode);
69007      }
69008      prevParsed = parsed;
69009    }
69010    me.updateSharedOptions(sharedOptions, mode, firstOpts);
69011  }
69012  getMaxOverflow() {
69013    const me = this;
69014    const meta = me._cachedMeta;
69015    const dataset = meta.dataset;
69016    const border = dataset.options && dataset.options.borderWidth || 0;
69017    const data = meta.data || [];
69018    if (!data.length) {
69019      return border;
69020    }
69021    const firstPoint = data[0].size(me.resolveDataElementOptions(0));
69022    const lastPoint = data[data.length - 1].size(me.resolveDataElementOptions(data.length - 1));
69023    return Math.max(border, firstPoint, lastPoint) / 2;
69024  }
69025  draw() {
69026    const meta = this._cachedMeta;
69027    meta.dataset.updateControlPoints(this.chart.chartArea, meta.iScale.axis);
69028    super.draw();
69029  }
69030}
69031LineController.id = 'line';
69032LineController.defaults = {
69033  datasetElementType: 'line',
69034  dataElementType: 'point',
69035  showLine: true,
69036  spanGaps: false,
69037};
69038LineController.overrides = {
69039  scales: {
69040    _index_: {
69041      type: 'category',
69042    },
69043    _value_: {
69044      type: 'linear',
69045    },
69046  }
69047};
69048function getStartAndCountOfVisiblePoints(meta, points, animationsDisabled) {
69049  const pointCount = points.length;
69050  let start = 0;
69051  let count = pointCount;
69052  if (meta._sorted) {
69053    const {iScale, _parsed} = meta;
69054    const axis = iScale.axis;
69055    const {min, max, minDefined, maxDefined} = iScale.getUserBounds();
69056    if (minDefined) {
69057      start = _limitValue(Math.min(
69058        _lookupByKey(_parsed, iScale.axis, min).lo,
69059        animationsDisabled ? pointCount : _lookupByKey(points, axis, iScale.getPixelForValue(min)).lo),
69060      0, pointCount - 1);
69061    }
69062    if (maxDefined) {
69063      count = _limitValue(Math.max(
69064        _lookupByKey(_parsed, iScale.axis, max).hi + 1,
69065        animationsDisabled ? 0 : _lookupByKey(points, axis, iScale.getPixelForValue(max)).hi + 1),
69066      start, pointCount) - start;
69067    } else {
69068      count = pointCount - start;
69069    }
69070  }
69071  return {start, count};
69072}
69073function scaleRangesChanged(meta) {
69074  const {xScale, yScale, _scaleRanges} = meta;
69075  const newRanges = {
69076    xmin: xScale.min,
69077    xmax: xScale.max,
69078    ymin: yScale.min,
69079    ymax: yScale.max
69080  };
69081  if (!_scaleRanges) {
69082    meta._scaleRanges = newRanges;
69083    return true;
69084  }
69085  const changed = _scaleRanges.xmin !== xScale.min
69086		|| _scaleRanges.xmax !== xScale.max
69087		|| _scaleRanges.ymin !== yScale.min
69088		|| _scaleRanges.ymax !== yScale.max;
69089  Object.assign(_scaleRanges, newRanges);
69090  return changed;
69091}
69092
69093class PolarAreaController extends DatasetController {
69094  constructor(chart, datasetIndex) {
69095    super(chart, datasetIndex);
69096    this.innerRadius = undefined;
69097    this.outerRadius = undefined;
69098  }
69099  getLabelAndValue(index) {
69100    const me = this;
69101    const meta = me._cachedMeta;
69102    const chart = me.chart;
69103    const labels = chart.data.labels || [];
69104    const value = formatNumber(meta._parsed[index].r, chart.options.locale);
69105    return {
69106      label: labels[index] || '',
69107      value,
69108    };
69109  }
69110  update(mode) {
69111    const arcs = this._cachedMeta.data;
69112    this._updateRadius();
69113    this.updateElements(arcs, 0, arcs.length, mode);
69114  }
69115  _updateRadius() {
69116    const me = this;
69117    const chart = me.chart;
69118    const chartArea = chart.chartArea;
69119    const opts = chart.options;
69120    const minSize = Math.min(chartArea.right - chartArea.left, chartArea.bottom - chartArea.top);
69121    const outerRadius = Math.max(minSize / 2, 0);
69122    const innerRadius = Math.max(opts.cutoutPercentage ? (outerRadius / 100) * (opts.cutoutPercentage) : 1, 0);
69123    const radiusLength = (outerRadius - innerRadius) / chart.getVisibleDatasetCount();
69124    me.outerRadius = outerRadius - (radiusLength * me.index);
69125    me.innerRadius = me.outerRadius - radiusLength;
69126  }
69127  updateElements(arcs, start, count, mode) {
69128    const me = this;
69129    const reset = mode === 'reset';
69130    const chart = me.chart;
69131    const dataset = me.getDataset();
69132    const opts = chart.options;
69133    const animationOpts = opts.animation;
69134    const scale = me._cachedMeta.rScale;
69135    const centerX = scale.xCenter;
69136    const centerY = scale.yCenter;
69137    const datasetStartAngle = scale.getIndexAngle(0) - 0.5 * PI;
69138    let angle = datasetStartAngle;
69139    let i;
69140    const defaultAngle = 360 / me.countVisibleElements();
69141    for (i = 0; i < start; ++i) {
69142      angle += me._computeAngle(i, mode, defaultAngle);
69143    }
69144    for (i = start; i < start + count; i++) {
69145      const arc = arcs[i];
69146      let startAngle = angle;
69147      let endAngle = angle + me._computeAngle(i, mode, defaultAngle);
69148      let outerRadius = chart.getDataVisibility(i) ? scale.getDistanceFromCenterForValue(dataset.data[i]) : 0;
69149      angle = endAngle;
69150      if (reset) {
69151        if (animationOpts.animateScale) {
69152          outerRadius = 0;
69153        }
69154        if (animationOpts.animateRotate) {
69155          startAngle = endAngle = datasetStartAngle;
69156        }
69157      }
69158      const properties = {
69159        x: centerX,
69160        y: centerY,
69161        innerRadius: 0,
69162        outerRadius,
69163        startAngle,
69164        endAngle,
69165        options: me.resolveDataElementOptions(i, arc.active ? 'active' : mode)
69166      };
69167      me.updateElement(arc, i, properties, mode);
69168    }
69169  }
69170  countVisibleElements() {
69171    const dataset = this.getDataset();
69172    const meta = this._cachedMeta;
69173    let count = 0;
69174    meta.data.forEach((element, index) => {
69175      if (!isNaN(dataset.data[index]) && this.chart.getDataVisibility(index)) {
69176        count++;
69177      }
69178    });
69179    return count;
69180  }
69181  _computeAngle(index, mode, defaultAngle) {
69182    return this.chart.getDataVisibility(index)
69183      ? toRadians(this.resolveDataElementOptions(index, mode).angle || defaultAngle)
69184      : 0;
69185  }
69186}
69187PolarAreaController.id = 'polarArea';
69188PolarAreaController.defaults = {
69189  dataElementType: 'arc',
69190  animation: {
69191    animateRotate: true,
69192    animateScale: true
69193  },
69194  animations: {
69195    numbers: {
69196      type: 'number',
69197      properties: ['x', 'y', 'startAngle', 'endAngle', 'innerRadius', 'outerRadius']
69198    },
69199  },
69200  indexAxis: 'r',
69201  startAngle: 0,
69202};
69203PolarAreaController.overrides = {
69204  aspectRatio: 1,
69205  plugins: {
69206    legend: {
69207      labels: {
69208        generateLabels(chart) {
69209          const data = chart.data;
69210          if (data.labels.length && data.datasets.length) {
69211            const {labels: {pointStyle}} = chart.legend.options;
69212            return data.labels.map((label, i) => {
69213              const meta = chart.getDatasetMeta(0);
69214              const style = meta.controller.getStyle(i);
69215              return {
69216                text: label,
69217                fillStyle: style.backgroundColor,
69218                strokeStyle: style.borderColor,
69219                lineWidth: style.borderWidth,
69220                pointStyle: pointStyle,
69221                hidden: !chart.getDataVisibility(i),
69222                index: i
69223              };
69224            });
69225          }
69226          return [];
69227        }
69228      },
69229      onClick(e, legendItem, legend) {
69230        legend.chart.toggleDataVisibility(legendItem.index);
69231        legend.chart.update();
69232      }
69233    },
69234    tooltip: {
69235      callbacks: {
69236        title() {
69237          return '';
69238        },
69239        label(context) {
69240          return context.chart.data.labels[context.dataIndex] + ': ' + context.formattedValue;
69241        }
69242      }
69243    }
69244  },
69245  scales: {
69246    r: {
69247      type: 'radialLinear',
69248      angleLines: {
69249        display: false
69250      },
69251      beginAtZero: true,
69252      grid: {
69253        circular: true
69254      },
69255      pointLabels: {
69256        display: false
69257      },
69258      startAngle: 0
69259    }
69260  }
69261};
69262
69263class PieController extends DoughnutController {
69264}
69265PieController.id = 'pie';
69266PieController.defaults = {
69267  cutout: 0,
69268  rotation: 0,
69269  circumference: 360,
69270  radius: '100%'
69271};
69272
69273class RadarController extends DatasetController {
69274  getLabelAndValue(index) {
69275    const me = this;
69276    const vScale = me._cachedMeta.vScale;
69277    const parsed = me.getParsed(index);
69278    return {
69279      label: vScale.getLabels()[index],
69280      value: '' + vScale.getLabelForValue(parsed[vScale.axis])
69281    };
69282  }
69283  update(mode) {
69284    const me = this;
69285    const meta = me._cachedMeta;
69286    const line = meta.dataset;
69287    const points = meta.data || [];
69288    const labels = meta.iScale.getLabels();
69289    line.points = points;
69290    if (mode !== 'resize') {
69291      const options = me.resolveDatasetElementOptions(mode);
69292      if (!me.options.showLine) {
69293        options.borderWidth = 0;
69294      }
69295      const properties = {
69296        _loop: true,
69297        _fullLoop: labels.length === points.length,
69298        options
69299      };
69300      me.updateElement(line, undefined, properties, mode);
69301    }
69302    me.updateElements(points, 0, points.length, mode);
69303  }
69304  updateElements(points, start, count, mode) {
69305    const me = this;
69306    const dataset = me.getDataset();
69307    const scale = me._cachedMeta.rScale;
69308    const reset = mode === 'reset';
69309    for (let i = start; i < start + count; i++) {
69310      const point = points[i];
69311      const options = me.resolveDataElementOptions(i, point.active ? 'active' : mode);
69312      const pointPosition = scale.getPointPositionForValue(i, dataset.data[i]);
69313      const x = reset ? scale.xCenter : pointPosition.x;
69314      const y = reset ? scale.yCenter : pointPosition.y;
69315      const properties = {
69316        x,
69317        y,
69318        angle: pointPosition.angle,
69319        skip: isNaN(x) || isNaN(y),
69320        options
69321      };
69322      me.updateElement(point, i, properties, mode);
69323    }
69324  }
69325}
69326RadarController.id = 'radar';
69327RadarController.defaults = {
69328  datasetElementType: 'line',
69329  dataElementType: 'point',
69330  indexAxis: 'r',
69331  showLine: true,
69332  elements: {
69333    line: {
69334      fill: 'start'
69335    }
69336  },
69337};
69338RadarController.overrides = {
69339  aspectRatio: 1,
69340  scales: {
69341    r: {
69342      type: 'radialLinear',
69343    }
69344  }
69345};
69346
69347class ScatterController extends LineController {
69348}
69349ScatterController.id = 'scatter';
69350ScatterController.defaults = {
69351  showLine: false,
69352  fill: false
69353};
69354ScatterController.overrides = {
69355  interaction: {
69356    mode: 'point'
69357  },
69358  plugins: {
69359    tooltip: {
69360      callbacks: {
69361        title() {
69362          return '';
69363        },
69364        label(item) {
69365          return '(' + item.label + ', ' + item.formattedValue + ')';
69366        }
69367      }
69368    }
69369  },
69370  scales: {
69371    x: {
69372      type: 'linear'
69373    },
69374    y: {
69375      type: 'linear'
69376    }
69377  }
69378};
69379
vendor: 32,099 bytes, lines 69380-70367
69380var controllers = /*#__PURE__*/Object.freeze({
69381__proto__: null,
69382BarController: BarController,
69383BubbleController: BubbleController,
69384DoughnutController: DoughnutController,
69385LineController: LineController,
69386PolarAreaController: PolarAreaController,
69387PieController: PieController,
69388RadarController: RadarController,
69389ScatterController: ScatterController
69390});
69391
69392function clipArc(ctx, element, endAngle) {
69393  const {startAngle, pixelMargin, x, y, outerRadius, innerRadius} = element;
69394  let angleMargin = pixelMargin / outerRadius;
69395  ctx.beginPath();
69396  ctx.arc(x, y, outerRadius, startAngle - angleMargin, endAngle + angleMargin);
69397  if (innerRadius > pixelMargin) {
69398    angleMargin = pixelMargin / innerRadius;
69399    ctx.arc(x, y, innerRadius, endAngle + angleMargin, startAngle - angleMargin, true);
69400  } else {
69401    ctx.arc(x, y, pixelMargin, endAngle + HALF_PI, startAngle - HALF_PI);
69402  }
69403  ctx.closePath();
69404  ctx.clip();
69405}
69406function toRadiusCorners(value) {
69407  return _readValueToProps(value, ['outerStart', 'outerEnd', 'innerStart', 'innerEnd']);
69408}
69409function parseBorderRadius$1(arc, innerRadius, outerRadius, angleDelta) {
69410  const o = toRadiusCorners(arc.options.borderRadius);
69411  const halfThickness = (outerRadius - innerRadius) / 2;
69412  const innerLimit = Math.min(halfThickness, angleDelta * innerRadius / 2);
69413  const computeOuterLimit = (val) => {
69414    const outerArcLimit = (outerRadius - Math.min(halfThickness, val)) * angleDelta / 2;
69415    return _limitValue(val, 0, Math.min(halfThickness, outerArcLimit));
69416  };
69417  return {
69418    outerStart: computeOuterLimit(o.outerStart),
69419    outerEnd: computeOuterLimit(o.outerEnd),
69420    innerStart: _limitValue(o.innerStart, 0, innerLimit),
69421    innerEnd: _limitValue(o.innerEnd, 0, innerLimit),
69422  };
69423}
69424function rThetaToXY(r, theta, x, y) {
69425  return {
69426    x: x + r * Math.cos(theta),
69427    y: y + r * Math.sin(theta),
69428  };
69429}
69430function pathArc(ctx, element, offset, spacing, end) {
69431  const {x, y, startAngle: start, pixelMargin, innerRadius: innerR} = element;
69432  const outerRadius = Math.max(element.outerRadius + spacing + offset - pixelMargin, 0);
69433  const innerRadius = innerR > 0 ? innerR + spacing + offset + pixelMargin : 0;
69434  let spacingOffset = 0;
69435  const alpha = end - start;
69436  if (spacing) {
69437    const noSpacingInnerRadius = innerR > 0 ? innerR - spacing : 0;
69438    const noSpacingOuterRadius = outerRadius > 0 ? outerRadius - spacing : 0;
69439    const avNogSpacingRadius = (noSpacingInnerRadius + noSpacingOuterRadius) / 2;
69440    const adjustedAngle = avNogSpacingRadius !== 0 ? (alpha * avNogSpacingRadius) / (avNogSpacingRadius + spacing) : alpha;
69441    spacingOffset = (alpha - adjustedAngle) / 2;
69442  }
69443  const beta = Math.max(0.001, alpha * outerRadius - offset / PI) / outerRadius;
69444  const angleOffset = (alpha - beta) / 2;
69445  const startAngle = start + angleOffset + spacingOffset;
69446  const endAngle = end - angleOffset - spacingOffset;
69447  const {outerStart, outerEnd, innerStart, innerEnd} = parseBorderRadius$1(element, innerRadius, outerRadius, endAngle - startAngle);
69448  const outerStartAdjustedRadius = outerRadius - outerStart;
69449  const outerEndAdjustedRadius = outerRadius - outerEnd;
69450  const outerStartAdjustedAngle = startAngle + outerStart / outerStartAdjustedRadius;
69451  const outerEndAdjustedAngle = endAngle - outerEnd / outerEndAdjustedRadius;
69452  const innerStartAdjustedRadius = innerRadius + innerStart;
69453  const innerEndAdjustedRadius = innerRadius + innerEnd;
69454  const innerStartAdjustedAngle = startAngle + innerStart / innerStartAdjustedRadius;
69455  const innerEndAdjustedAngle = endAngle - innerEnd / innerEndAdjustedRadius;
69456  ctx.beginPath();
69457  ctx.arc(x, y, outerRadius, outerStartAdjustedAngle, outerEndAdjustedAngle);
69458  if (outerEnd > 0) {
69459    const pCenter = rThetaToXY(outerEndAdjustedRadius, outerEndAdjustedAngle, x, y);
69460    ctx.arc(pCenter.x, pCenter.y, outerEnd, outerEndAdjustedAngle, endAngle + HALF_PI);
69461  }
69462  const p4 = rThetaToXY(innerEndAdjustedRadius, endAngle, x, y);
69463  ctx.lineTo(p4.x, p4.y);
69464  if (innerEnd > 0) {
69465    const pCenter = rThetaToXY(innerEndAdjustedRadius, innerEndAdjustedAngle, x, y);
69466    ctx.arc(pCenter.x, pCenter.y, innerEnd, endAngle + HALF_PI, innerEndAdjustedAngle + Math.PI);
69467  }
69468  ctx.arc(x, y, innerRadius, endAngle - (innerEnd / innerRadius), startAngle + (innerStart / innerRadius), true);
69469  if (innerStart > 0) {
69470    const pCenter = rThetaToXY(innerStartAdjustedRadius, innerStartAdjustedAngle, x, y);
69471    ctx.arc(pCenter.x, pCenter.y, innerStart, innerStartAdjustedAngle + Math.PI, startAngle - HALF_PI);
69472  }
69473  const p8 = rThetaToXY(outerStartAdjustedRadius, startAngle, x, y);
69474  ctx.lineTo(p8.x, p8.y);
69475  if (outerStart > 0) {
69476    const pCenter = rThetaToXY(outerStartAdjustedRadius, outerStartAdjustedAngle, x, y);
69477    ctx.arc(pCenter.x, pCenter.y, outerStart, startAngle - HALF_PI, outerStartAdjustedAngle);
69478  }
69479  ctx.closePath();
69480}
69481function drawArc(ctx, element, offset, spacing) {
69482  const {fullCircles, startAngle, circumference} = element;
69483  let endAngle = element.endAngle;
69484  if (fullCircles) {
69485    pathArc(ctx, element, offset, spacing, startAngle + TAU);
69486    for (let i = 0; i < fullCircles; ++i) {
69487      ctx.fill();
69488    }
69489    if (!isNaN(circumference)) {
69490      endAngle = startAngle + circumference % TAU;
69491      if (circumference % TAU === 0) {
69492        endAngle += TAU;
69493      }
69494    }
69495  }
69496  pathArc(ctx, element, offset, spacing, endAngle);
69497  ctx.fill();
69498  return endAngle;
69499}
69500function drawFullCircleBorders(ctx, element, inner) {
69501  const {x, y, startAngle, pixelMargin, fullCircles} = element;
69502  const outerRadius = Math.max(element.outerRadius - pixelMargin, 0);
69503  const innerRadius = element.innerRadius + pixelMargin;
69504  let i;
69505  if (inner) {
69506    clipArc(ctx, element, startAngle + TAU);
69507  }
69508  ctx.beginPath();
69509  ctx.arc(x, y, innerRadius, startAngle + TAU, startAngle, true);
69510  for (i = 0; i < fullCircles; ++i) {
69511    ctx.stroke();
69512  }
69513  ctx.beginPath();
69514  ctx.arc(x, y, outerRadius, startAngle, startAngle + TAU);
69515  for (i = 0; i < fullCircles; ++i) {
69516    ctx.stroke();
69517  }
69518}
69519function drawBorder(ctx, element, offset, spacing, endAngle) {
69520  const {options} = element;
69521  const inner = options.borderAlign === 'inner';
69522  if (!options.borderWidth) {
69523    return;
69524  }
69525  if (inner) {
69526    ctx.lineWidth = options.borderWidth * 2;
69527    ctx.lineJoin = 'round';
69528  } else {
69529    ctx.lineWidth = options.borderWidth;
69530    ctx.lineJoin = 'bevel';
69531  }
69532  if (element.fullCircles) {
69533    drawFullCircleBorders(ctx, element, inner);
69534  }
69535  if (inner) {
69536    clipArc(ctx, element, endAngle);
69537  }
69538  pathArc(ctx, element, offset, spacing, endAngle);
69539  ctx.stroke();
69540}
69541class ArcElement extends Element {
69542  constructor(cfg) {
69543    super();
69544    this.options = undefined;
69545    this.circumference = undefined;
69546    this.startAngle = undefined;
69547    this.endAngle = undefined;
69548    this.innerRadius = undefined;
69549    this.outerRadius = undefined;
69550    this.pixelMargin = 0;
69551    this.fullCircles = 0;
69552    if (cfg) {
69553      Object.assign(this, cfg);
69554    }
69555  }
69556  inRange(chartX, chartY, useFinalPosition) {
69557    const point = this.getProps(['x', 'y'], useFinalPosition);
69558    const {angle, distance} = getAngleFromPoint(point, {x: chartX, y: chartY});
69559    const {startAngle, endAngle, innerRadius, outerRadius, circumference} = this.getProps([
69560      'startAngle',
69561      'endAngle',
69562      'innerRadius',
69563      'outerRadius',
69564      'circumference'
69565    ], useFinalPosition);
69566    const rAdjust = this.options.spacing / 2;
69567    const betweenAngles = circumference >= TAU || _angleBetween(angle, startAngle, endAngle);
69568    const withinRadius = (distance >= innerRadius + rAdjust && distance <= outerRadius + rAdjust);
69569    return (betweenAngles && withinRadius);
69570  }
69571  getCenterPoint(useFinalPosition) {
69572    const {x, y, startAngle, endAngle, innerRadius, outerRadius} = this.getProps([
69573      'x',
69574      'y',
69575      'startAngle',
69576      'endAngle',
69577      'innerRadius',
69578      'outerRadius',
69579      'circumference',
69580    ], useFinalPosition);
69581    const {offset, spacing} = this.options;
69582    const halfAngle = (startAngle + endAngle) / 2;
69583    const halfRadius = (innerRadius + outerRadius + spacing + offset) / 2;
69584    return {
69585      x: x + Math.cos(halfAngle) * halfRadius,
69586      y: y + Math.sin(halfAngle) * halfRadius
69587    };
69588  }
69589  tooltipPosition(useFinalPosition) {
69590    return this.getCenterPoint(useFinalPosition);
69591  }
69592  draw(ctx) {
69593    const me = this;
69594    const {options, circumference} = me;
69595    const offset = (options.offset || 0) / 2;
69596    const spacing = (options.spacing || 0) / 2;
69597    me.pixelMargin = (options.borderAlign === 'inner') ? 0.33 : 0;
69598    me.fullCircles = circumference > TAU ? Math.floor(circumference / TAU) : 0;
69599    if (circumference === 0 || me.innerRadius < 0 || me.outerRadius < 0) {
69600      return;
69601    }
69602    ctx.save();
69603    let radiusOffset = 0;
69604    if (offset) {
69605      radiusOffset = offset / 2;
69606      const halfAngle = (me.startAngle + me.endAngle) / 2;
69607      ctx.translate(Math.cos(halfAngle) * radiusOffset, Math.sin(halfAngle) * radiusOffset);
69608      if (me.circumference >= PI) {
69609        radiusOffset = offset;
69610      }
69611    }
69612    ctx.fillStyle = options.backgroundColor;
69613    ctx.strokeStyle = options.borderColor;
69614    const endAngle = drawArc(ctx, me, radiusOffset, spacing);
69615    drawBorder(ctx, me, radiusOffset, spacing, endAngle);
69616    ctx.restore();
69617  }
69618}
69619ArcElement.id = 'arc';
69620ArcElement.defaults = {
69621  borderAlign: 'center',
69622  borderColor: '#fff',
69623  borderRadius: 0,
69624  borderWidth: 2,
69625  offset: 0,
69626  spacing: 0,
69627  angle: undefined,
69628};
69629ArcElement.defaultRoutes = {
69630  backgroundColor: 'backgroundColor'
69631};
69632
69633function setStyle(ctx, options, style = options) {
69634  ctx.lineCap = valueOrDefault(style.borderCapStyle, options.borderCapStyle);
69635  ctx.setLineDash(valueOrDefault(style.borderDash, options.borderDash));
69636  ctx.lineDashOffset = valueOrDefault(style.borderDashOffset, options.borderDashOffset);
69637  ctx.lineJoin = valueOrDefault(style.borderJoinStyle, options.borderJoinStyle);
69638  ctx.lineWidth = valueOrDefault(style.borderWidth, options.borderWidth);
69639  ctx.strokeStyle = valueOrDefault(style.borderColor, options.borderColor);
69640}
69641function lineTo(ctx, previous, target) {
69642  ctx.lineTo(target.x, target.y);
69643}
69644function getLineMethod(options) {
69645  if (options.stepped) {
69646    return _steppedLineTo;
69647  }
69648  if (options.tension || options.cubicInterpolationMode === 'monotone') {
69649    return _bezierCurveTo;
69650  }
69651  return lineTo;
69652}
69653function pathVars(points, segment, params = {}) {
69654  const count = points.length;
69655  const {start: paramsStart = 0, end: paramsEnd = count - 1} = params;
69656  const {start: segmentStart, end: segmentEnd} = segment;
69657  const start = Math.max(paramsStart, segmentStart);
69658  const end = Math.min(paramsEnd, segmentEnd);
69659  const outside = paramsStart < segmentStart && paramsEnd < segmentStart || paramsStart > segmentEnd && paramsEnd > segmentEnd;
69660  return {
69661    count,
69662    start,
69663    loop: segment.loop,
69664    ilen: end < start && !outside ? count + end - start : end - start
69665  };
69666}
69667function pathSegment(ctx, line, segment, params) {
69668  const {points, options} = line;
69669  const {count, start, loop, ilen} = pathVars(points, segment, params);
69670  const lineMethod = getLineMethod(options);
69671  let {move = true, reverse} = params || {};
69672  let i, point, prev;
69673  for (i = 0; i <= ilen; ++i) {
69674    point = points[(start + (reverse ? ilen - i : i)) % count];
69675    if (point.skip) {
69676      continue;
69677    } else if (move) {
69678      ctx.moveTo(point.x, point.y);
69679      move = false;
69680    } else {
69681      lineMethod(ctx, prev, point, reverse, options.stepped);
69682    }
69683    prev = point;
69684  }
69685  if (loop) {
69686    point = points[(start + (reverse ? ilen : 0)) % count];
69687    lineMethod(ctx, prev, point, reverse, options.stepped);
69688  }
69689  return !!loop;
69690}
69691function fastPathSegment(ctx, line, segment, params) {
69692  const points = line.points;
69693  const {count, start, ilen} = pathVars(points, segment, params);
69694  const {move = true, reverse} = params || {};
69695  let avgX = 0;
69696  let countX = 0;
69697  let i, point, prevX, minY, maxY, lastY;
69698  const pointIndex = (index) => (start + (reverse ? ilen - index : index)) % count;
69699  const drawX = () => {
69700    if (minY !== maxY) {
69701      ctx.lineTo(avgX, maxY);
69702      ctx.lineTo(avgX, minY);
69703      ctx.lineTo(avgX, lastY);
69704    }
69705  };
69706  if (move) {
69707    point = points[pointIndex(0)];
69708    ctx.moveTo(point.x, point.y);
69709  }
69710  for (i = 0; i <= ilen; ++i) {
69711    point = points[pointIndex(i)];
69712    if (point.skip) {
69713      continue;
69714    }
69715    const x = point.x;
69716    const y = point.y;
69717    const truncX = x | 0;
69718    if (truncX === prevX) {
69719      if (y < minY) {
69720        minY = y;
69721      } else if (y > maxY) {
69722        maxY = y;
69723      }
69724      avgX = (countX * avgX + x) / ++countX;
69725    } else {
69726      drawX();
69727      ctx.lineTo(x, y);
69728      prevX = truncX;
69729      countX = 0;
69730      minY = maxY = y;
69731    }
69732    lastY = y;
69733  }
69734  drawX();
69735}
69736function _getSegmentMethod(line) {
69737  const opts = line.options;
69738  const borderDash = opts.borderDash && opts.borderDash.length;
69739  const useFastPath = !line._decimated && !line._loop && !opts.tension && opts.cubicInterpolationMode !== 'monotone' && !opts.stepped && !borderDash;
69740  return useFastPath ? fastPathSegment : pathSegment;
69741}
69742function _getInterpolationMethod(options) {
69743  if (options.stepped) {
69744    return _steppedInterpolation;
69745  }
69746  if (options.tension || options.cubicInterpolationMode === 'monotone') {
69747    return _bezierInterpolation;
69748  }
69749  return _pointInLine;
69750}
69751function strokePathWithCache(ctx, line, start, count) {
69752  let path = line._path;
69753  if (!path) {
69754    path = line._path = new Path2D();
69755    if (line.path(path, start, count)) {
69756      path.closePath();
69757    }
69758  }
69759  setStyle(ctx, line.options);
69760  ctx.stroke(path);
69761}
69762function strokePathDirect(ctx, line, start, count) {
69763  const {segments, options} = line;
69764  const segmentMethod = _getSegmentMethod(line);
69765  for (const segment of segments) {
69766    setStyle(ctx, options, segment.style);
69767    ctx.beginPath();
69768    if (segmentMethod(ctx, line, segment, {start, end: start + count - 1})) {
69769      ctx.closePath();
69770    }
69771    ctx.stroke();
69772  }
69773}
69774const usePath2D = typeof Path2D === 'function';
69775function draw(ctx, line, start, count) {
69776  if (usePath2D && line.segments.length === 1) {
69777    strokePathWithCache(ctx, line, start, count);
69778  } else {
69779    strokePathDirect(ctx, line, start, count);
69780  }
69781}
69782class LineElement extends Element {
69783  constructor(cfg) {
69784    super();
69785    this.animated = true;
69786    this.options = undefined;
69787    this._loop = undefined;
69788    this._fullLoop = undefined;
69789    this._path = undefined;
69790    this._points = undefined;
69791    this._segments = undefined;
69792    this._decimated = false;
69793    this._pointsUpdated = false;
69794    this._datasetIndex = undefined;
69795    if (cfg) {
69796      Object.assign(this, cfg);
69797    }
69798  }
69799  updateControlPoints(chartArea, indexAxis) {
69800    const me = this;
69801    const options = me.options;
69802    if ((options.tension || options.cubicInterpolationMode === 'monotone') && !options.stepped && !me._pointsUpdated) {
69803      const loop = options.spanGaps ? me._loop : me._fullLoop;
69804      _updateBezierControlPoints(me._points, options, chartArea, loop, indexAxis);
69805      me._pointsUpdated = true;
69806    }
69807  }
69808  set points(points) {
69809    const me = this;
69810    me._points = points;
69811    delete me._segments;
69812    delete me._path;
69813    me._pointsUpdated = false;
69814  }
69815  get points() {
69816    return this._points;
69817  }
69818  get segments() {
69819    return this._segments || (this._segments = _computeSegments(this, this.options.segment));
69820  }
69821  first() {
69822    const segments = this.segments;
69823    const points = this.points;
69824    return segments.length && points[segments[0].start];
69825  }
69826  last() {
69827    const segments = this.segments;
69828    const points = this.points;
69829    const count = segments.length;
69830    return count && points[segments[count - 1].end];
69831  }
69832  interpolate(point, property) {
69833    const me = this;
69834    const options = me.options;
69835    const value = point[property];
69836    const points = me.points;
69837    const segments = _boundSegments(me, {property, start: value, end: value});
69838    if (!segments.length) {
69839      return;
69840    }
69841    const result = [];
69842    const _interpolate = _getInterpolationMethod(options);
69843    let i, ilen;
69844    for (i = 0, ilen = segments.length; i < ilen; ++i) {
69845      const {start, end} = segments[i];
69846      const p1 = points[start];
69847      const p2 = points[end];
69848      if (p1 === p2) {
69849        result.push(p1);
69850        continue;
69851      }
69852      const t = Math.abs((value - p1[property]) / (p2[property] - p1[property]));
69853      const interpolated = _interpolate(p1, p2, t, options.stepped);
69854      interpolated[property] = point[property];
69855      result.push(interpolated);
69856    }
69857    return result.length === 1 ? result[0] : result;
69858  }
69859  pathSegment(ctx, segment, params) {
69860    const segmentMethod = _getSegmentMethod(this);
69861    return segmentMethod(ctx, this, segment, params);
69862  }
69863  path(ctx, start, count) {
69864    const me = this;
69865    const segments = me.segments;
69866    const segmentMethod = _getSegmentMethod(me);
69867    let loop = me._loop;
69868    start = start || 0;
69869    count = count || (me.points.length - start);
69870    for (const segment of segments) {
69871      loop &= segmentMethod(ctx, me, segment, {start, end: start + count - 1});
69872    }
69873    return !!loop;
69874  }
69875  draw(ctx, chartArea, start, count) {
69876    const me = this;
69877    const options = me.options || {};
69878    const points = me.points || [];
69879    if (!points.length || !options.borderWidth) {
69880      return;
69881    }
69882    ctx.save();
69883    draw(ctx, me, start, count);
69884    ctx.restore();
69885    if (me.animated) {
69886      me._pointsUpdated = false;
69887      me._path = undefined;
69888    }
69889  }
69890}
69891LineElement.id = 'line';
69892LineElement.defaults = {
69893  borderCapStyle: 'butt',
69894  borderDash: [],
69895  borderDashOffset: 0,
69896  borderJoinStyle: 'miter',
69897  borderWidth: 3,
69898  capBezierPoints: true,
69899  cubicInterpolationMode: 'default',
69900  fill: false,
69901  spanGaps: false,
69902  stepped: false,
69903  tension: 0,
69904};
69905LineElement.defaultRoutes = {
69906  backgroundColor: 'backgroundColor',
69907  borderColor: 'borderColor'
69908};
69909LineElement.descriptors = {
69910  _scriptable: true,
69911  _indexable: (name) => name !== 'borderDash' && name !== 'fill',
69912};
69913
69914function inRange$1(el, pos, axis, useFinalPosition) {
69915  const options = el.options;
69916  const {[axis]: value} = el.getProps([axis], useFinalPosition);
69917  return (Math.abs(pos - value) < options.radius + options.hitRadius);
69918}
69919class PointElement extends Element {
69920  constructor(cfg) {
69921    super();
69922    this.options = undefined;
69923    this.parsed = undefined;
69924    this.skip = undefined;
69925    this.stop = undefined;
69926    if (cfg) {
69927      Object.assign(this, cfg);
69928    }
69929  }
69930  inRange(mouseX, mouseY, useFinalPosition) {
69931    const options = this.options;
69932    const {x, y} = this.getProps(['x', 'y'], useFinalPosition);
69933    return ((Math.pow(mouseX - x, 2) + Math.pow(mouseY - y, 2)) < Math.pow(options.hitRadius + options.radius, 2));
69934  }
69935  inXRange(mouseX, useFinalPosition) {
69936    return inRange$1(this, mouseX, 'x', useFinalPosition);
69937  }
69938  inYRange(mouseY, useFinalPosition) {
69939    return inRange$1(this, mouseY, 'y', useFinalPosition);
69940  }
69941  getCenterPoint(useFinalPosition) {
69942    const {x, y} = this.getProps(['x', 'y'], useFinalPosition);
69943    return {x, y};
69944  }
69945  size(options) {
69946    options = options || this.options || {};
69947    let radius = options.radius || 0;
69948    radius = Math.max(radius, radius && options.hoverRadius || 0);
69949    const borderWidth = radius && options.borderWidth || 0;
69950    return (radius + borderWidth) * 2;
69951  }
69952  draw(ctx, area) {
69953    const me = this;
69954    const options = me.options;
69955    if (me.skip || options.radius < 0.1 || !_isPointInArea(me, area, me.size(options) / 2)) {
69956      return;
69957    }
69958    ctx.strokeStyle = options.borderColor;
69959    ctx.lineWidth = options.borderWidth;
69960    ctx.fillStyle = options.backgroundColor;
69961    drawPoint(ctx, options, me.x, me.y);
69962  }
69963  getRange() {
69964    const options = this.options || {};
69965    return options.radius + options.hitRadius;
69966  }
69967}
69968PointElement.id = 'point';
69969PointElement.defaults = {
69970  borderWidth: 1,
69971  hitRadius: 1,
69972  hoverBorderWidth: 1,
69973  hoverRadius: 4,
69974  pointStyle: 'circle',
69975  radius: 3,
69976  rotation: 0
69977};
69978PointElement.defaultRoutes = {
69979  backgroundColor: 'backgroundColor',
69980  borderColor: 'borderColor'
69981};
69982
69983function getBarBounds(bar, useFinalPosition) {
69984  const {x, y, base, width, height} = bar.getProps(['x', 'y', 'base', 'width', 'height'], useFinalPosition);
69985  let left, right, top, bottom, half;
69986  if (bar.horizontal) {
69987    half = height / 2;
69988    left = Math.min(x, base);
69989    right = Math.max(x, base);
69990    top = y - half;
69991    bottom = y + half;
69992  } else {
69993    half = width / 2;
69994    left = x - half;
69995    right = x + half;
69996    top = Math.min(y, base);
69997    bottom = Math.max(y, base);
69998  }
69999  return {left, top, right, bottom};
70000}
70001function skipOrLimit(skip, value, min, max) {
70002  return skip ? 0 : _limitValue(value, min, max);
70003}
70004function parseBorderWidth(bar, maxW, maxH) {
70005  const value = bar.options.borderWidth;
70006  const skip = bar.borderSkipped;
70007  const o = toTRBL(value);
70008  return {
70009    t: skipOrLimit(skip.top, o.top, 0, maxH),
70010    r: skipOrLimit(skip.right, o.right, 0, maxW),
70011    b: skipOrLimit(skip.bottom, o.bottom, 0, maxH),
70012    l: skipOrLimit(skip.left, o.left, 0, maxW)
70013  };
70014}
70015function parseBorderRadius(bar, maxW, maxH) {
70016  const {enableBorderRadius} = bar.getProps(['enableBorderRadius']);
70017  const value = bar.options.borderRadius;
70018  const o = toTRBLCorners(value);
70019  const maxR = Math.min(maxW, maxH);
70020  const skip = bar.borderSkipped;
70021  const enableBorder = enableBorderRadius || isObject(value);
70022  return {
70023    topLeft: skipOrLimit(!enableBorder || skip.top || skip.left, o.topLeft, 0, maxR),
70024    topRight: skipOrLimit(!enableBorder || skip.top || skip.right, o.topRight, 0, maxR),
70025    bottomLeft: skipOrLimit(!enableBorder || skip.bottom || skip.left, o.bottomLeft, 0, maxR),
70026    bottomRight: skipOrLimit(!enableBorder || skip.bottom || skip.right, o.bottomRight, 0, maxR)
70027  };
70028}
70029function boundingRects(bar) {
70030  const bounds = getBarBounds(bar);
70031  const width = bounds.right - bounds.left;
70032  const height = bounds.bottom - bounds.top;
70033  const border = parseBorderWidth(bar, width / 2, height / 2);
70034  const radius = parseBorderRadius(bar, width / 2, height / 2);
70035  return {
70036    outer: {
70037      x: bounds.left,
70038      y: bounds.top,
70039      w: width,
70040      h: height,
70041      radius
70042    },
70043    inner: {
70044      x: bounds.left + border.l,
70045      y: bounds.top + border.t,
70046      w: width - border.l - border.r,
70047      h: height - border.t - border.b,
70048      radius: {
70049        topLeft: Math.max(0, radius.topLeft - Math.max(border.t, border.l)),
70050        topRight: Math.max(0, radius.topRight - Math.max(border.t, border.r)),
70051        bottomLeft: Math.max(0, radius.bottomLeft - Math.max(border.b, border.l)),
70052        bottomRight: Math.max(0, radius.bottomRight - Math.max(border.b, border.r)),
70053      }
70054    }
70055  };
70056}
70057function inRange(bar, x, y, useFinalPosition) {
70058  const skipX = x === null;
70059  const skipY = y === null;
70060  const skipBoth = skipX && skipY;
70061  const bounds = bar && !skipBoth && getBarBounds(bar, useFinalPosition);
70062  return bounds
70063		&& (skipX || x >= bounds.left && x <= bounds.right)
70064		&& (skipY || y >= bounds.top && y <= bounds.bottom);
70065}
70066function hasRadius(radius) {
70067  return radius.topLeft || radius.topRight || radius.bottomLeft || radius.bottomRight;
70068}
70069function addNormalRectPath(ctx, rect) {
70070  ctx.rect(rect.x, rect.y, rect.w, rect.h);
70071}
70072function inflateRect(rect, amount, refRect = {}) {
70073  const x = rect.x !== refRect.x ? -amount : 0;
70074  const y = rect.y !== refRect.y ? -amount : 0;
70075  const w = (rect.x + rect.w !== refRect.x + refRect.w ? amount : 0) - x;
70076  const h = (rect.y + rect.h !== refRect.y + refRect.h ? amount : 0) - y;
70077  return {
70078    x: rect.x + x,
70079    y: rect.y + y,
70080    w: rect.w + w,
70081    h: rect.h + h,
70082    radius: rect.radius
70083  };
70084}
70085class BarElement extends Element {
70086  constructor(cfg) {
70087    super();
70088    this.options = undefined;
70089    this.horizontal = undefined;
70090    this.base = undefined;
70091    this.width = undefined;
70092    this.height = undefined;
70093    if (cfg) {
70094      Object.assign(this, cfg);
70095    }
70096  }
70097  draw(ctx) {
70098    const options = this.options;
70099    const {inner, outer} = boundingRects(this);
70100    const addRectPath = hasRadius(outer.radius) ? addRoundedRectPath : addNormalRectPath;
70101    const inflateAmount = 0.33;
70102    ctx.save();
70103    if (outer.w !== inner.w || outer.h !== inner.h) {
70104      ctx.beginPath();
70105      addRectPath(ctx, inflateRect(outer, inflateAmount, inner));
70106      ctx.clip();
70107      addRectPath(ctx, inflateRect(inner, -inflateAmount, outer));
70108      ctx.fillStyle = options.borderColor;
70109      ctx.fill('evenodd');
70110    }
70111    ctx.beginPath();
70112    addRectPath(ctx, inflateRect(inner, inflateAmount, outer));
70113    ctx.fillStyle = options.backgroundColor;
70114    ctx.fill();
70115    ctx.restore();
70116  }
70117  inRange(mouseX, mouseY, useFinalPosition) {
70118    return inRange(this, mouseX, mouseY, useFinalPosition);
70119  }
70120  inXRange(mouseX, useFinalPosition) {
70121    return inRange(this, mouseX, null, useFinalPosition);
70122  }
70123  inYRange(mouseY, useFinalPosition) {
70124    return inRange(this, null, mouseY, useFinalPosition);
70125  }
70126  getCenterPoint(useFinalPosition) {
70127    const {x, y, base, horizontal} = this.getProps(['x', 'y', 'base', 'horizontal'], useFinalPosition);
70128    return {
70129      x: horizontal ? (x + base) / 2 : x,
70130      y: horizontal ? y : (y + base) / 2
70131    };
70132  }
70133  getRange(axis) {
70134    return axis === 'x' ? this.width / 2 : this.height / 2;
70135  }
70136}
70137BarElement.id = 'bar';
70138BarElement.defaults = {
70139  borderSkipped: 'start',
70140  borderWidth: 0,
70141  borderRadius: 0,
70142  enableBorderRadius: true,
70143  pointStyle: undefined
70144};
70145BarElement.defaultRoutes = {
70146  backgroundColor: 'backgroundColor',
70147  borderColor: 'borderColor'
70148};
70149
70150var elements = /*#__PURE__*/Object.freeze({
70151__proto__: null,
70152ArcElement: ArcElement,
70153LineElement: LineElement,
70154PointElement: PointElement,
70155BarElement: BarElement
70156});
70157
70158function lttbDecimation(data, start, count, availableWidth, options) {
70159  const samples = options.samples || availableWidth;
70160  if (samples >= count) {
70161    return data.slice(start, start + count);
70162  }
70163  const decimated = [];
70164  const bucketWidth = (count - 2) / (samples - 2);
70165  let sampledIndex = 0;
70166  const endIndex = start + count - 1;
70167  let a = start;
70168  let i, maxAreaPoint, maxArea, area, nextA;
70169  decimated[sampledIndex++] = data[a];
70170  for (i = 0; i < samples - 2; i++) {
70171    let avgX = 0;
70172    let avgY = 0;
70173    let j;
70174    const avgRangeStart = Math.floor((i + 1) * bucketWidth) + 1 + start;
70175    const avgRangeEnd = Math.min(Math.floor((i + 2) * bucketWidth) + 1, count) + start;
70176    const avgRangeLength = avgRangeEnd - avgRangeStart;
70177    for (j = avgRangeStart; j < avgRangeEnd; j++) {
70178      avgX += data[j].x;
70179      avgY += data[j].y;
70180    }
70181    avgX /= avgRangeLength;
70182    avgY /= avgRangeLength;
70183    const rangeOffs = Math.floor(i * bucketWidth) + 1 + start;
70184    const rangeTo = Math.min(Math.floor((i + 1) * bucketWidth) + 1, count) + start;
70185    const {x: pointAx, y: pointAy} = data[a];
70186    maxArea = area = -1;
70187    for (j = rangeOffs; j < rangeTo; j++) {
70188      area = 0.5 * Math.abs(
70189        (pointAx - avgX) * (data[j].y - pointAy) -
70190        (pointAx - data[j].x) * (avgY - pointAy)
70191      );
70192      if (area > maxArea) {
70193        maxArea = area;
70194        maxAreaPoint = data[j];
70195        nextA = j;
70196      }
70197    }
70198    decimated[sampledIndex++] = maxAreaPoint;
70199    a = nextA;
70200  }
70201  decimated[sampledIndex++] = data[endIndex];
70202  return decimated;
70203}
70204function minMaxDecimation(data, start, count, availableWidth) {
70205  let avgX = 0;
70206  let countX = 0;
70207  let i, point, x, y, prevX, minIndex, maxIndex, startIndex, minY, maxY;
70208  const decimated = [];
70209  const endIndex = start + count - 1;
70210  const xMin = data[start].x;
70211  const xMax = data[endIndex].x;
70212  const dx = xMax - xMin;
70213  for (i = start; i < start + count; ++i) {
70214    point = data[i];
70215    x = (point.x - xMin) / dx * availableWidth;
70216    y = point.y;
70217    const truncX = x | 0;
70218    if (truncX === prevX) {
70219      if (y < minY) {
70220        minY = y;
70221        minIndex = i;
70222      } else if (y > maxY) {
70223        maxY = y;
70224        maxIndex = i;
70225      }
70226      avgX = (countX * avgX + point.x) / ++countX;
70227    } else {
70228      const lastIndex = i - 1;
70229      if (!isNullOrUndef(minIndex) && !isNullOrUndef(maxIndex)) {
70230        const intermediateIndex1 = Math.min(minIndex, maxIndex);
70231        const intermediateIndex2 = Math.max(minIndex, maxIndex);
70232        if (intermediateIndex1 !== startIndex && intermediateIndex1 !== lastIndex) {
70233          decimated.push({
70234            ...data[intermediateIndex1],
70235            x: avgX,
70236          });
70237        }
70238        if (intermediateIndex2 !== startIndex && intermediateIndex2 !== lastIndex) {
70239          decimated.push({
70240            ...data[intermediateIndex2],
70241            x: avgX
70242          });
70243        }
70244      }
70245      if (i > 0 && lastIndex !== startIndex) {
70246        decimated.push(data[lastIndex]);
70247      }
70248      decimated.push(point);
70249      prevX = truncX;
70250      countX = 0;
70251      minY = maxY = y;
70252      minIndex = maxIndex = startIndex = i;
70253    }
70254  }
70255  return decimated;
70256}
70257function cleanDecimatedDataset(dataset) {
70258  if (dataset._decimated) {
70259    const data = dataset._data;
70260    delete dataset._decimated;
70261    delete dataset._data;
70262    Object.defineProperty(dataset, 'data', {value: data});
70263  }
70264}
70265function cleanDecimatedData(chart) {
70266  chart.data.datasets.forEach((dataset) => {
70267    cleanDecimatedDataset(dataset);
70268  });
70269}
70270function getStartAndCountOfVisiblePointsSimplified(meta, points) {
70271  const pointCount = points.length;
70272  let start = 0;
70273  let count;
70274  const {iScale} = meta;
70275  const {min, max, minDefined, maxDefined} = iScale.getUserBounds();
70276  if (minDefined) {
70277    start = _limitValue(_lookupByKey(points, iScale.axis, min).lo, 0, pointCount - 1);
70278  }
70279  if (maxDefined) {
70280    count = _limitValue(_lookupByKey(points, iScale.axis, max).hi + 1, start, pointCount) - start;
70281  } else {
70282    count = pointCount - start;
70283  }
70284  return {start, count};
70285}
70286var plugin_decimation = {
70287  id: 'decimation',
70288  defaults: {
70289    algorithm: 'min-max',
70290    enabled: false,
70291  },
70292  beforeElementsUpdate: (chart, args, options) => {
70293    if (!options.enabled) {
70294      cleanDecimatedData(chart);
70295      return;
70296    }
70297    const availableWidth = chart.width;
70298    chart.data.datasets.forEach((dataset, datasetIndex) => {
70299      const {_data, indexAxis} = dataset;
70300      const meta = chart.getDatasetMeta(datasetIndex);
70301      const data = _data || dataset.data;
70302      if (resolve([indexAxis, chart.options.indexAxis]) === 'y') {
70303        return;
70304      }
70305      if (meta.type !== 'line') {
70306        return;
70307      }
70308      const xAxis = chart.scales[meta.xAxisID];
70309      if (xAxis.type !== 'linear' && xAxis.type !== 'time') {
70310        return;
70311      }
70312      if (chart.options.parsing) {
70313        return;
70314      }
70315      let {start, count} = getStartAndCountOfVisiblePointsSimplified(meta, data);
70316      const threshold = options.threshold || 4 * availableWidth;
70317      if (count <= threshold) {
70318        cleanDecimatedDataset(dataset);
70319        return;
70320      }
70321      if (isNullOrUndef(_data)) {
70322        dataset._data = data;
70323        delete dataset.data;
70324        Object.defineProperty(dataset, 'data', {
70325          configurable: true,
70326          enumerable: true,
70327          get: function() {
70328            return this._decimated;
70329          },
70330          set: function(d) {
70331            this._data = d;
70332          }
70333        });
70334      }
70335      let decimated;
70336      switch (options.algorithm) {
70337      case 'lttb':
70338        decimated = lttbDecimation(data, start, count, availableWidth, options);
70339        break;
70340      case 'min-max':
70341        decimated = minMaxDecimation(data, start, count, availableWidth);
70342        break;
70343      default:
70344        throw new Error(`Unsupported decimation algorithm '${options.algorithm}'`);
70345      }
70346      dataset._decimated = decimated;
70347    });
70348  },
70349  destroy(chart) {
70350    cleanDecimatedData(chart);
70351  }
70352};
70353
70354function getLineByIndex(chart, index) {
70355  const meta = chart.getDatasetMeta(index);
70356  const visible = meta && chart.isDatasetVisible(index);
70357  return visible ? meta.dataset : null;
70358}
70359function parseFillOption(line) {
70360  const options = line.options;
70361  const fillOption = options.fill;
70362  let fill = valueOrDefault(fillOption && fillOption.target, fillOption);
70363  if (fill === undefined) {
70364    fill = !!options.backgroundColor;
70365  }
70366  if (fill === false || fill === null) {
70367    return false;
70368  }
70369  if (fill === true) {
70370    return 'origin';
70371  }
70372  return fill;
70373}
70374function decodeFill(line, index, count) {
70375  const fill = parseFillOption(line);
70376  if (isObject(fill)) {
70377    return isNaN(fill.value) ? false : fill;
70378  }
70379  let target = parseFloat(fill);
70380  if (isNumberFinite(target) && Math.floor(target) === target) {
70381    if (fill[0] === '-' || fill[0] === '+') {
70382      target = index + target;
70383    }
70384    if (target === index || target < 0 || target >= count) {
70385      return false;
70386    }
70387    return target;
70388  }
70389  return ['origin', 'start', 'end', 'stack', 'shape'].indexOf(fill) >= 0 && fill;
70390}
70391function computeLinearBoundary(source) {
70392  const {scale = {}, fill} = source;
70393  let target = null;
70394  let horizontal;
70395  if (fill === 'start') {
70396    target = scale.bottom;
70397  } else if (fill === 'end') {
70398    target = scale.top;
70399  } else if (isObject(fill)) {
70400    target = scale.getPixelForValue(fill.value);
70401  } else if (scale.getBasePixel) {
70402    target = scale.getBasePixel();
70403  }
70404  if (isNumberFinite(target)) {
70405    horizontal = scale.isHorizontal();
70406    return {
70407      x: horizontal ? target : null,
70408      y: horizontal ? null : target
70409    };
70410  }
70411  return null;
70412}
70413class simpleArc {
70414  constructor(opts) {
70415    this.x = opts.x;
70416    this.y = opts.y;
70417    this.radius = opts.radius;
70418  }
70419  pathSegment(ctx, bounds, opts) {
70420    const {x, y, radius} = this;
70421    bounds = bounds || {start: 0, end: TAU};
70422    ctx.arc(x, y, radius, bounds.end, bounds.start, true);
70423    return !opts.bounds;
70424  }
70425  interpolate(point) {
70426    const {x, y, radius} = this;
70427    const angle = point.angle;
70428    return {
70429      x: x + Math.cos(angle) * radius,
70430      y: y + Math.sin(angle) * radius,
70431      angle
70432    };
70433  }
70434}
70435function computeCircularBoundary(source) {
70436  const {scale, fill} = source;
70437  const options = scale.options;
70438  const length = scale.getLabels().length;
70439  const target = [];
70440  const start = options.reverse ? scale.max : scale.min;
70441  const end = options.reverse ? scale.min : scale.max;
70442  let i, center, value;
70443  if (fill === 'start') {
70444    value = start;
70445  } else if (fill === 'end') {
70446    value = end;
70447  } else if (isObject(fill)) {
70448    value = fill.value;
70449  } else {
70450    value = scale.getBaseValue();
70451  }
70452  if (options.grid.circular) {
70453    center = scale.getPointPositionForValue(0, start);
70454    return new simpleArc({
70455      x: center.x,
70456      y: center.y,
70457      radius: scale.getDistanceFromCenterForValue(value)
70458    });
70459  }
70460  for (i = 0; i < length; ++i) {
70461    target.push(scale.getPointPositionForValue(i, value));
70462  }
70463  return target;
70464}
70465function computeBoundary(source) {
70466  const scale = source.scale || {};
70467  if (scale.getPointPositionForValue) {
70468    return computeCircularBoundary(source);
70469  }
70470  return computeLinearBoundary(source);
70471}
70472function findSegmentEnd(start, end, points) {
70473  for (;end > start; end--) {
70474    const point = points[end];
70475    if (!isNaN(point.x) && !isNaN(point.y)) {
70476      break;
70477    }
70478  }
70479  return end;
70480}
70481function pointsFromSegments(boundary, line) {
70482  const {x = null, y = null} = boundary || {};
70483  const linePoints = line.points;
70484  const points = [];
70485  line.segments.forEach(({start, end}) => {
70486    end = findSegmentEnd(start, end, linePoints);
70487    const first = linePoints[start];
70488    const last = linePoints[end];
70489    if (y !== null) {
70490      points.push({x: first.x, y});
70491      points.push({x: last.x, y});
70492    } else if (x !== null) {
70493      points.push({x, y: first.y});
70494      points.push({x, y: last.y});
70495    }
70496  });
70497  return points;
70498}
70499function buildStackLine(source) {
70500  const {chart, scale, index, line} = source;
70501  const points = [];
70502  const segments = line.segments;
70503  const sourcePoints = line.points;
70504  const linesBelow = getLinesBelow(chart, index);
70505  linesBelow.push(createBoundaryLine({x: null, y: scale.bottom}, line));
70506  for (let i = 0; i < segments.length; i++) {
70507    const segment = segments[i];
70508    for (let j = segment.start; j <= segment.end; j++) {
70509      addPointsBelow(points, sourcePoints[j], linesBelow);
70510    }
70511  }
70512  return new LineElement({points, options: {}});
70513}
70514const isLineAndNotInHideAnimation = (meta) => meta.type === 'line' && !meta.hidden;
70515function getLinesBelow(chart, index) {
70516  const below = [];
70517  const metas = chart.getSortedVisibleDatasetMetas();
70518  for (let i = 0; i < metas.length; i++) {
70519    const meta = metas[i];
70520    if (meta.index === index) {
70521      break;
70522    }
70523    if (isLineAndNotInHideAnimation(meta)) {
70524      below.unshift(meta.dataset);
70525    }
70526  }
70527  return below;
70528}
70529function addPointsBelow(points, sourcePoint, linesBelow) {
70530  const postponed = [];
70531  for (let j = 0; j < linesBelow.length; j++) {
70532    const line = linesBelow[j];
70533    const {first, last, point} = findPoint(line, sourcePoint, 'x');
70534    if (!point || (first && last)) {
70535      continue;
70536    }
70537    if (first) {
70538      postponed.unshift(point);
70539    } else {
70540      points.push(point);
70541      if (!last) {
70542        break;
70543      }
70544    }
70545  }
70546  points.push(...postponed);
70547}
70548function findPoint(line, sourcePoint, property) {
70549  const point = line.interpolate(sourcePoint, property);
70550  if (!point) {
70551    return {};
70552  }
70553  const pointValue = point[property];
70554  const segments = line.segments;
70555  const linePoints = line.points;
70556  let first = false;
vendor: 4,569 bytes, lines 70557-70723
70557  let last = false;
70558  for (let i = 0; i < segments.length; i++) {
70559    const segment = segments[i];
70560    const firstValue = linePoints[segment.start][property];
70561    const lastValue = linePoints[segment.end][property];
70562    if (pointValue >= firstValue && pointValue <= lastValue) {
70563      first = pointValue === firstValue;
70564      last = pointValue === lastValue;
70565      break;
70566    }
70567  }
70568  return {first, last, point};
70569}
70570function getTarget(source) {
70571  const {chart, fill, line} = source;
70572  if (isNumberFinite(fill)) {
70573    return getLineByIndex(chart, fill);
70574  }
70575  if (fill === 'stack') {
70576    return buildStackLine(source);
70577  }
70578  if (fill === 'shape') {
70579    return true;
70580  }
70581  const boundary = computeBoundary(source);
70582  if (boundary instanceof simpleArc) {
70583    return boundary;
70584  }
70585  return createBoundaryLine(boundary, line);
70586}
70587function createBoundaryLine(boundary, line) {
70588  let points = [];
70589  let _loop = false;
70590  if (isArray(boundary)) {
70591    _loop = true;
70592    points = boundary;
70593  } else {
70594    points = pointsFromSegments(boundary, line);
70595  }
70596  return points.length ? new LineElement({
70597    points,
70598    options: {tension: 0},
70599    _loop,
70600    _fullLoop: _loop
70601  }) : null;
70602}
70603function resolveTarget(sources, index, propagate) {
70604  const source = sources[index];
70605  let fill = source.fill;
70606  const visited = [index];
70607  let target;
70608  if (!propagate) {
70609    return fill;
70610  }
70611  while (fill !== false && visited.indexOf(fill) === -1) {
70612    if (!isNumberFinite(fill)) {
70613      return fill;
70614    }
70615    target = sources[fill];
70616    if (!target) {
70617      return false;
70618    }
70619    if (target.visible) {
70620      return fill;
70621    }
70622    visited.push(fill);
70623    fill = target.fill;
70624  }
70625  return false;
70626}
70627function _clip(ctx, target, clipY) {
70628  ctx.beginPath();
70629  target.path(ctx);
70630  ctx.lineTo(target.last().x, clipY);
70631  ctx.lineTo(target.first().x, clipY);
70632  ctx.closePath();
70633  ctx.clip();
70634}
70635function getBounds(property, first, last, loop) {
70636  if (loop) {
70637    return;
70638  }
70639  let start = first[property];
70640  let end = last[property];
70641  if (property === 'angle') {
70642    start = _normalizeAngle(start);
70643    end = _normalizeAngle(end);
70644  }
70645  return {property, start, end};
70646}
70647function _getEdge(a, b, prop, fn) {
70648  if (a && b) {
70649    return fn(a[prop], b[prop]);
70650  }
70651  return a ? a[prop] : b ? b[prop] : 0;
70652}
70653function _segments(line, target, property) {
70654  const segments = line.segments;
70655  const points = line.points;
70656  const tpoints = target.points;
70657  const parts = [];
70658  for (const segment of segments) {
70659    let {start, end} = segment;
70660    end = findSegmentEnd(start, end, points);
70661    const bounds = getBounds(property, points[start], points[end], segment.loop);
70662    if (!target.segments) {
70663      parts.push({
70664        source: segment,
70665        target: bounds,
70666        start: points[start],
70667        end: points[end]
70668      });
70669      continue;
70670    }
70671    const targetSegments = _boundSegments(target, bounds);
70672    for (const tgt of targetSegments) {
70673      const subBounds = getBounds(property, tpoints[tgt.start], tpoints[tgt.end], tgt.loop);
70674      const fillSources = _boundSegment(segment, points, subBounds);
70675      for (const fillSource of fillSources) {
70676        parts.push({
70677          source: fillSource,
70678          target: tgt,
70679          start: {
70680            [property]: _getEdge(bounds, subBounds, 'start', Math.max)
70681          },
70682          end: {
70683            [property]: _getEdge(bounds, subBounds, 'end', Math.min)
70684          }
70685        });
70686      }
70687    }
70688  }
70689  return parts;
70690}
70691function clipBounds(ctx, scale, bounds) {
70692  const {top, bottom} = scale.chart.chartArea;
70693  const {property, start, end} = bounds || {};
70694  if (property === 'x') {
70695    ctx.beginPath();
70696    ctx.rect(start, top, end - start, bottom - top);
70697    ctx.clip();
70698  }
70699}
70700function interpolatedLineTo(ctx, target, point, property) {
70701  const interpolatedPoint = target.interpolate(point, property);
70702  if (interpolatedPoint) {
70703    ctx.lineTo(interpolatedPoint.x, interpolatedPoint.y);
70704  }
70705}
70706function _fill(ctx, cfg) {
70707  const {line, target, property, color, scale} = cfg;
70708  const segments = _segments(line, target, property);
70709  for (const {source: src, target: tgt, start, end} of segments) {
70710    const {style: {backgroundColor = color} = {}} = src;
70711    const notShape = target !== true;
70712    ctx.save();
70713    ctx.fillStyle = backgroundColor;
70714    clipBounds(ctx, scale, notShape && getBounds(property, start, end));
70715    ctx.beginPath();
70716    const lineLoop = !!line.pathSegment(ctx, src);
70717    let loop;
70718    if (notShape) {
70719      if (lineLoop) {
70720        ctx.closePath();
70721      } else {
70722        interpolatedLineTo(ctx, target, end, property);
70723      }
70724      const targetLoop = !!target.pathSegment(ctx, tgt, {move: lineLoop, reverse: true});
70725      loop = lineLoop && targetLoop;
70726      if (!loop) {
70727        interpolatedLineTo(ctx, target, start, property);
70728      }
70729    }
70730    ctx.closePath();
70731    ctx.fill(loop ? 'evenodd' : 'nonzero');
70732    ctx.restore();
70733  }
70734}
70735function doFill(ctx, cfg) {
70736  const {line, target, above, below, area, scale} = cfg;
70737  const property = line._loop ? 'angle' : cfg.axis;
70738  ctx.save();
70739  if (property === 'x' && below !== above) {
70740    _clip(ctx, target, area.top);
70741    _fill(ctx, {line, target, color: above, scale, property});
70742    ctx.restore();
70743    ctx.save();
70744    _clip(ctx, target, area.bottom);
70745  }
70746  _fill(ctx, {line, target, color: below, scale, property});
70747  ctx.restore();
70748}
70749function drawfill(ctx, source, area) {
70750  const target = getTarget(source);
70751  const {line, scale, axis} = source;
70752  const lineOpts = line.options;
70753  const fillOption = lineOpts.fill;
70754  const color = lineOpts.backgroundColor;
70755  const {above = color, below = color} = fillOption || {};
70756  if (target && line.points.length) {
70757    clipArea(ctx, area);
70758    doFill(ctx, {line, target, above, below, area, scale, axis});
70759    unclipArea(ctx);
70760  }
70761}
70762var plugin_filler = {
70763  id: 'filler',
70764  afterDatasetsUpdate(chart, _args, options) {
70765    const count = (chart.data.datasets || []).length;
70766    const sources = [];
70767    let meta, i, line, source;
70768    for (i = 0; i < count; ++i) {
70769      meta = chart.getDatasetMeta(i);
70770      line = meta.dataset;
70771      source = null;
70772      if (line && line.options && line instanceof LineElement) {
70773        source = {
70774          visible: chart.isDatasetVisible(i),
70775          index: i,
70776          fill: decodeFill(line, i, count),
70777          chart,
70778          axis: meta.controller.options.indexAxis,
70779          scale: meta.vScale,
70780          line,
70781        };
70782      }
70783      meta.$filler = source;
70784      sources.push(source);
70785    }
70786    for (i = 0; i < count; ++i) {
70787      source = sources[i];
70788      if (!source || source.fill === false) {
70789        continue;
70790      }
70791      source.fill = resolveTarget(sources, i, options.propagate);
70792    }
70793  },
70794  beforeDraw(chart, _args, options) {
70795    const draw = options.drawTime === 'beforeDraw';
70796    const metasets = chart.getSortedVisibleDatasetMetas();
70797    const area = chart.chartArea;
70798    for (let i = metasets.length - 1; i >= 0; --i) {
70799      const source = metasets[i].$filler;
70800      if (!source) {
70801        continue;
70802      }
70803      source.line.updateControlPoints(area, source.axis);
70804      if (draw) {
70805        drawfill(chart.ctx, source, area);
70806      }
70807    }
70808  },
70809  beforeDatasetsDraw(chart, _args, options) {
70810    if (options.drawTime !== 'beforeDatasetsDraw') {
70811      return;
70812    }
70813    const metasets = chart.getSortedVisibleDatasetMetas();
70814    for (let i = metasets.length - 1; i >= 0; --i) {
70815      const source = metasets[i].$filler;
70816      if (source) {
70817        drawfill(chart.ctx, source, chart.chartArea);
70818      }
70819    }
70820  },
70821  beforeDatasetDraw(chart, args, options) {
70822    const source = args.meta.$filler;
70823    if (!source || source.fill === false || options.drawTime !== 'beforeDatasetDraw') {
70824      return;
70825    }
70826    drawfill(chart.ctx, source, chart.chartArea);
70827  },
70828  defaults: {
70829    propagate: true,
70830    drawTime: 'beforeDatasetDraw'
70831  }
70832};
70833
70834const getBoxSize = (labelOpts, fontSize) => {
70835  let {boxHeight = fontSize, boxWidth = fontSize} = labelOpts;
70836  if (labelOpts.usePointStyle) {
70837    boxHeight = Math.min(boxHeight, fontSize);
70838    boxWidth = Math.min(boxWidth, fontSize);
70839  }
70840  return {
70841    boxWidth,
70842    boxHeight,
70843    itemHeight: Math.max(fontSize, boxHeight)
70844  };
70845};
70846const itemsEqual = (a, b) => a !== null && b !== null && a.datasetIndex === b.datasetIndex && a.index === b.index;
70847class Legend extends Element {
70848  constructor(config) {
70849    super();
70850    this._added = false;
70851    this.legendHitBoxes = [];
70852    this._hoveredItem = null;
70853    this.doughnutMode = false;
70854    this.chart = config.chart;
70855    this.options = config.options;
70856    this.ctx = config.ctx;
70857    this.legendItems = undefined;
70858    this.columnSizes = undefined;
70859    this.lineWidths = undefined;
70860    this.maxHeight = undefined;
70861    this.maxWidth = undefined;
70862    this.top = undefined;
70863    this.bottom = undefined;
70864    this.left = undefined;
70865    this.right = undefined;
70866    this.height = undefined;
70867    this.width = undefined;
70868    this._margins = undefined;
70869    this.position = undefined;
70870    this.weight = undefined;
70871    this.fullSize = undefined;
70872  }
70873  update(maxWidth, maxHeight, margins) {
70874    const me = this;
70875    me.maxWidth = maxWidth;
70876    me.maxHeight = maxHeight;
70877    me._margins = margins;
70878    me.setDimensions();
70879    me.buildLabels();
70880    me.fit();
70881  }
70882  setDimensions() {
70883    const me = this;
70884    if (me.isHorizontal()) {
70885      me.width = me.maxWidth;
70886      me.left = me._margins.left;
70887      me.right = me.width;
70888    } else {
70889      me.height = me.maxHeight;
70890      me.top = me._margins.top;
70891      me.bottom = me.height;
70892    }
70893  }
70894  buildLabels() {
70895    const me = this;
70896    const labelOpts = me.options.labels || {};
70897    let legendItems = callback(labelOpts.generateLabels, [me.chart], me) || [];
70898    if (labelOpts.filter) {
70899      legendItems = legendItems.filter((item) => labelOpts.filter(item, me.chart.data));
70900    }
70901    if (labelOpts.sort) {
70902      legendItems = legendItems.sort((a, b) => labelOpts.sort(a, b, me.chart.data));
70903    }
70904    if (me.options.reverse) {
70905      legendItems.reverse();
70906    }
70907    me.legendItems = legendItems;
70908  }
70909  fit() {
70910    const me = this;
70911    const {options, ctx} = me;
70912    if (!options.display) {
70913      me.width = me.height = 0;
70914      return;
70915    }
70916    const labelOpts = options.labels;
70917    const labelFont = toFont(labelOpts.font);
70918    const fontSize = labelFont.size;
70919    const titleHeight = me._computeTitleHeight();
70920    const {boxWidth, itemHeight} = getBoxSize(labelOpts, fontSize);
70921    let width, height;
70922    ctx.font = labelFont.string;
70923    if (me.isHorizontal()) {
70924      width = me.maxWidth;
70925      height = me._fitRows(titleHeight, fontSize, boxWidth, itemHeight) + 10;
70926    } else {
70927      height = me.maxHeight;
70928      width = me._fitCols(titleHeight, fontSize, boxWidth, itemHeight) + 10;
70929    }
70930    me.width = Math.min(width, options.maxWidth || me.maxWidth);
70931    me.height = Math.min(height, options.maxHeight || me.maxHeight);
70932  }
70933  _fitRows(titleHeight, fontSize, boxWidth, itemHeight) {
70934    const me = this;
70935    const {ctx, maxWidth, options: {labels: {padding}}} = me;
70936    const hitboxes = me.legendHitBoxes = [];
70937    const lineWidths = me.lineWidths = [0];
70938    const lineHeight = itemHeight + padding;
70939    let totalHeight = titleHeight;
70940    ctx.textAlign = 'left';
70941    ctx.textBaseline = 'middle';
70942    let row = -1;
70943    let top = -lineHeight;
70944    me.legendItems.forEach((legendItem, i) => {
70945      const itemWidth = boxWidth + (fontSize / 2) + ctx.measureText(legendItem.text).width;
70946      if (i === 0 || lineWidths[lineWidths.length - 1] + itemWidth + 2 * padding > maxWidth) {
70947        totalHeight += lineHeight;
70948        lineWidths[lineWidths.length - (i > 0 ? 0 : 1)] = 0;
70949        top += lineHeight;
70950        row++;
70951      }
70952      hitboxes[i] = {left: 0, top, row, width: itemWidth, height: itemHeight};
70953      lineWidths[lineWidths.length - 1] += itemWidth + padding;
70954    });
70955    return totalHeight;
70956  }
70957  _fitCols(titleHeight, fontSize, boxWidth, itemHeight) {
70958    const me = this;
70959    const {ctx, maxHeight, options: {labels: {padding}}} = me;
70960    const hitboxes = me.legendHitBoxes = [];
70961    const columnSizes = me.columnSizes = [];
70962    const heightLimit = maxHeight - titleHeight;
70963    let totalWidth = padding;
70964    let currentColWidth = 0;
70965    let currentColHeight = 0;
70966    let left = 0;
70967    let col = 0;
70968    me.legendItems.forEach((legendItem, i) => {
70969      const itemWidth = boxWidth + (fontSize / 2) + ctx.measureText(legendItem.text).width;
70970      if (i > 0 && currentColHeight + itemHeight + 2 * padding > heightLimit) {
70971        totalWidth += currentColWidth + padding;
70972        columnSizes.push({width: currentColWidth, height: currentColHeight});
70973        left += currentColWidth + padding;
70974        col++;
70975        currentColWidth = currentColHeight = 0;
70976      }
70977      hitboxes[i] = {left, top: currentColHeight, col, width: itemWidth, height: itemHeight};
70978      currentColWidth = Math.max(currentColWidth, itemWidth);
70979      currentColHeight += itemHeight + padding;
70980    });
70981    totalWidth += currentColWidth;
70982    columnSizes.push({width: currentColWidth, height: currentColHeight});
70983    return totalWidth;
70984  }
70985  adjustHitBoxes() {
70986    const me = this;
70987    if (!me.options.display) {
70988      return;
70989    }
70990    const titleHeight = me._computeTitleHeight();
70991    const {legendHitBoxes: hitboxes, options: {align, labels: {padding}, rtl}} = me;
70992    const rtlHelper = getRtlAdapter(rtl, me.left, me.width);
70993    if (this.isHorizontal()) {
70994      let row = 0;
70995      let left = _alignStartEnd(align, me.left + padding, me.right - me.lineWidths[row]);
70996      for (const hitbox of hitboxes) {
70997        if (row !== hitbox.row) {
70998          row = hitbox.row;
70999          left = _alignStartEnd(align, me.left + padding, me.right - me.lineWidths[row]);
71000        }
71001        hitbox.top += me.top + titleHeight + padding;
71002        hitbox.left = rtlHelper.leftForLtr(rtlHelper.x(left), hitbox.width);
71003        left += hitbox.width + padding;
71004      }
71005    } else {
71006      let col = 0;
71007      let top = _alignStartEnd(align, me.top + titleHeight + padding, me.bottom - me.columnSizes[col].height);
71008      for (const hitbox of hitboxes) {
71009        if (hitbox.col !== col) {
71010          col = hitbox.col;
71011          top = _alignStartEnd(align, me.top + titleHeight + padding, me.bottom - me.columnSizes[col].height);
71012        }
71013        hitbox.top = top;
71014        hitbox.left += me.left + padding;
71015        hitbox.left = rtlHelper.leftForLtr(rtlHelper.x(hitbox.left), hitbox.width);
71016        top += hitbox.height + padding;
71017      }
71018    }
71019  }
71020  isHorizontal() {
71021    return this.options.position === 'top' || this.options.position === 'bottom';
71022  }
71023  draw() {
71024    const me = this;
71025    if (me.options.display) {
71026      const ctx = me.ctx;
71027      clipArea(ctx, me);
71028      me._draw();
71029      unclipArea(ctx);
71030    }
71031  }
71032  _draw() {
71033    const me = this;
71034    const {options: opts, columnSizes, lineWidths, ctx} = me;
71035    const {align, labels: labelOpts} = opts;
71036    const defaultColor = defaults.color;
71037    const rtlHelper = getRtlAdapter(opts.rtl, me.left, me.width);
71038    const labelFont = toFont(labelOpts.font);
71039    const {color: fontColor, padding} = labelOpts;
71040    const fontSize = labelFont.size;
71041    const halfFontSize = fontSize / 2;
71042    let cursor;
71043    me.drawTitle();
71044    ctx.textAlign = rtlHelper.textAlign('left');
71045    ctx.textBaseline = 'middle';
71046    ctx.lineWidth = 0.5;
71047    ctx.font = labelFont.string;
71048    const {boxWidth, boxHeight, itemHeight} = getBoxSize(labelOpts, fontSize);
71049    const drawLegendBox = function(x, y, legendItem) {
71050      if (isNaN(boxWidth) || boxWidth <= 0 || isNaN(boxHeight) || boxHeight < 0) {
71051        return;
71052      }
71053      ctx.save();
71054      const lineWidth = valueOrDefault(legendItem.lineWidth, 1);
71055      ctx.fillStyle = valueOrDefault(legendItem.fillStyle, defaultColor);
71056      ctx.lineCap = valueOrDefault(legendItem.lineCap, 'butt');
71057      ctx.lineDashOffset = valueOrDefault(legendItem.lineDashOffset, 0);
71058      ctx.lineJoin = valueOrDefault(legendItem.lineJoin, 'miter');
71059      ctx.lineWidth = lineWidth;
71060      ctx.strokeStyle = valueOrDefault(legendItem.strokeStyle, defaultColor);
71061      ctx.setLineDash(valueOrDefault(legendItem.lineDash, []));
71062      if (labelOpts.usePointStyle) {
71063        const drawOptions = {
71064          radius: boxWidth * Math.SQRT2 / 2,
71065          pointStyle: legendItem.pointStyle,
71066          rotation: legendItem.rotation,
71067          borderWidth: lineWidth
71068        };
71069        const centerX = rtlHelper.xPlus(x, boxWidth / 2);
71070        const centerY = y + halfFontSize;
71071        drawPoint(ctx, drawOptions, centerX, centerY);
71072      } else {
71073        const yBoxTop = y + Math.max((fontSize - boxHeight) / 2, 0);
71074        const xBoxLeft = rtlHelper.leftForLtr(x, boxWidth);
71075        const borderRadius = toTRBLCorners(legendItem.borderRadius);
71076        ctx.beginPath();
71077        if (Object.values(borderRadius).some(v => v !== 0)) {
71078          addRoundedRectPath(ctx, {
71079            x: xBoxLeft,
71080            y: yBoxTop,
71081            w: boxWidth,
71082            h: boxHeight,
71083            radius: borderRadius,
71084          });
71085        } else {
71086          ctx.rect(xBoxLeft, yBoxTop, boxWidth, boxHeight);
71087        }
71088        ctx.fill();
71089        if (lineWidth !== 0) {
71090          ctx.stroke();
71091        }
71092      }
71093      ctx.restore();
71094    };
71095    const fillText = function(x, y, legendItem) {
71096      renderText(ctx, legendItem.text, x, y + (itemHeight / 2), labelFont, {
71097        strikethrough: legendItem.hidden,
71098        textAlign: rtlHelper.textAlign(legendItem.textAlign)
71099      });
71100    };
71101    const isHorizontal = me.isHorizontal();
71102    const titleHeight = this._computeTitleHeight();
71103    if (isHorizontal) {
71104      cursor = {
71105        x: _alignStartEnd(align, me.left + padding, me.right - lineWidths[0]),
71106        y: me.top + padding + titleHeight,
71107        line: 0
71108      };
71109    } else {
71110      cursor = {
71111        x: me.left + padding,
71112        y: _alignStartEnd(align, me.top + titleHeight + padding, me.bottom - columnSizes[0].height),
71113        line: 0
71114      };
71115    }
71116    overrideTextDirection(me.ctx, opts.textDirection);
71117    const lineHeight = itemHeight + padding;
71118    me.legendItems.forEach((legendItem, i) => {
71119      ctx.strokeStyle = legendItem.fontColor || fontColor;
71120      ctx.fillStyle = legendItem.fontColor || fontColor;
71121      const textWidth = ctx.measureText(legendItem.text).width;
71122      const textAlign = rtlHelper.textAlign(legendItem.textAlign || (legendItem.textAlign = labelOpts.textAlign));
71123      const width = boxWidth + halfFontSize + textWidth;
71124      let x = cursor.x;
71125      let y = cursor.y;
71126      rtlHelper.setWidth(me.width);
71127      if (isHorizontal) {
71128        if (i > 0 && x + width + padding > me.right) {
71129          y = cursor.y += lineHeight;
71130          cursor.line++;
71131          x = cursor.x = _alignStartEnd(align, me.left + padding, me.right - lineWidths[cursor.line]);
71132        }
71133      } else if (i > 0 && y + lineHeight > me.bottom) {
71134        x = cursor.x = x + columnSizes[cursor.line].width + padding;
71135        cursor.line++;
71136        y = cursor.y = _alignStartEnd(align, me.top + titleHeight + padding, me.bottom - columnSizes[cursor.line].height);
71137      }
71138      const realX = rtlHelper.x(x);
71139      drawLegendBox(realX, y, legendItem);
71140      x = _textX(textAlign, x + boxWidth + halfFontSize, isHorizontal ? x + width : me.right, opts.rtl);
71141      fillText(rtlHelper.x(x), y, legendItem);
71142      if (isHorizontal) {
71143        cursor.x += width + padding;
71144      } else {
71145        cursor.y += lineHeight;
71146      }
71147    });
71148    restoreTextDirection(me.ctx, opts.textDirection);
71149  }
71150  drawTitle() {
71151    const me = this;
71152    const opts = me.options;
71153    const titleOpts = opts.title;
71154    const titleFont = toFont(titleOpts.font);
71155    const titlePadding = toPadding(titleOpts.padding);
71156    if (!titleOpts.display) {
71157      return;
71158    }
71159    const rtlHelper = getRtlAdapter(opts.rtl, me.left, me.width);
71160    const ctx = me.ctx;
71161    const position = titleOpts.position;
71162    const halfFontSize = titleFont.size / 2;
71163    const topPaddingPlusHalfFontSize = titlePadding.top + halfFontSize;
71164    let y;
71165    let left = me.left;
71166    let maxWidth = me.width;
71167    if (this.isHorizontal()) {
71168      maxWidth = Math.max(...me.lineWidths);
71169      y = me.top + topPaddingPlusHalfFontSize;
71170      left = _alignStartEnd(opts.align, left, me.right - maxWidth);
71171    } else {
71172      const maxHeight = me.columnSizes.reduce((acc, size) => Math.max(acc, size.height), 0);
71173      y = topPaddingPlusHalfFontSize + _alignStartEnd(opts.align, me.top, me.bottom - maxHeight - opts.labels.padding - me._computeTitleHeight());
71174    }
71175    const x = _alignStartEnd(position, left, left + maxWidth);
71176    ctx.textAlign = rtlHelper.textAlign(_toLeftRightCenter(position));
71177    ctx.textBaseline = 'middle';
71178    ctx.strokeStyle = titleOpts.color;
71179    ctx.fillStyle = titleOpts.color;
71180    ctx.font = titleFont.string;
71181    renderText(ctx, titleOpts.text, x, y, titleFont);
71182  }
71183  _computeTitleHeight() {
71184    const titleOpts = this.options.title;
71185    const titleFont = toFont(titleOpts.font);
71186    const titlePadding = toPadding(titleOpts.padding);
71187    return titleOpts.display ? titleFont.lineHeight + titlePadding.height : 0;
71188  }
71189  _getLegendItemAt(x, y) {
71190    const me = this;
71191    let i, hitBox, lh;
71192    if (x >= me.left && x <= me.right && y >= me.top && y <= me.bottom) {
71193      lh = me.legendHitBoxes;
71194      for (i = 0; i < lh.length; ++i) {
71195        hitBox = lh[i];
71196        if (x >= hitBox.left && x <= hitBox.left + hitBox.width && y >= hitBox.top && y <= hitBox.top + hitBox.height) {
71197          return me.legendItems[i];
71198        }
71199      }
71200    }
71201    return null;
71202  }
71203  handleEvent(e) {
71204    const me = this;
71205    const opts = me.options;
71206    if (!isListened(e.type, opts)) {
71207      return;
71208    }
71209    const hoveredItem = me._getLegendItemAt(e.x, e.y);
71210    if (e.type === 'mousemove') {
71211      const previous = me._hoveredItem;
71212      const sameItem = itemsEqual(previous, hoveredItem);
71213      if (previous && !sameItem) {
71214        callback(opts.onLeave, [e, previous, me], me);
71215      }
71216      me._hoveredItem = hoveredItem;
71217      if (hoveredItem && !sameItem) {
71218        callback(opts.onHover, [e, hoveredItem, me], me);
71219      }
71220    } else if (hoveredItem) {
71221      callback(opts.onClick, [e, hoveredItem, me], me);
71222    }
71223  }
71224}
71225function isListened(type, opts) {
71226  if (type === 'mousemove' && (opts.onHover || opts.onLeave)) {
71227    return true;
71228  }
71229  if (opts.onClick && (type === 'click' || type === 'mouseup')) {
71230    return true;
71231  }
71232  return false;
vendor: 14,194 bytes, lines 71233-71745
71233}
71234var plugin_legend = {
71235  id: 'legend',
71236  _element: Legend,
71237  start(chart, _args, options) {
71238    const legend = chart.legend = new Legend({ctx: chart.ctx, options, chart});
71239    layouts.configure(chart, legend, options);
71240    layouts.addBox(chart, legend);
71241  },
71242  stop(chart) {
71243    layouts.removeBox(chart, chart.legend);
71244    delete chart.legend;
71245  },
71246  beforeUpdate(chart, _args, options) {
71247    const legend = chart.legend;
71248    layouts.configure(chart, legend, options);
71249    legend.options = options;
71250  },
71251  afterUpdate(chart) {
71252    const legend = chart.legend;
71253    legend.buildLabels();
71254    legend.adjustHitBoxes();
71255  },
71256  afterEvent(chart, args) {
71257    if (!args.replay) {
71258      chart.legend.handleEvent(args.event);
71259    }
71260  },
71261  defaults: {
71262    display: true,
71263    position: 'top',
71264    align: 'center',
71265    fullSize: true,
71266    reverse: false,
71267    weight: 1000,
71268    onClick(e, legendItem, legend) {
71269      const index = legendItem.datasetIndex;
71270      const ci = legend.chart;
71271      if (ci.isDatasetVisible(index)) {
71272        ci.hide(index);
71273        legendItem.hidden = true;
71274      } else {
71275        ci.show(index);
71276        legendItem.hidden = false;
71277      }
71278    },
71279    onHover: null,
71280    onLeave: null,
71281    labels: {
71282      color: (ctx) => ctx.chart.options.color,
71283      boxWidth: 40,
71284      padding: 10,
71285      generateLabels(chart) {
71286        const datasets = chart.data.datasets;
71287        const {labels: {usePointStyle, pointStyle, textAlign, color}} = chart.legend.options;
71288        return chart._getSortedDatasetMetas().map((meta) => {
71289          const style = meta.controller.getStyle(usePointStyle ? 0 : undefined);
71290          const borderWidth = toPadding(style.borderWidth);
71291          return {
71292            text: datasets[meta.index].label,
71293            fillStyle: style.backgroundColor,
71294            fontColor: color,
71295            hidden: !meta.visible,
71296            lineCap: style.borderCapStyle,
71297            lineDash: style.borderDash,
71298            lineDashOffset: style.borderDashOffset,
71299            lineJoin: style.borderJoinStyle,
71300            lineWidth: (borderWidth.width + borderWidth.height) / 4,
71301            strokeStyle: style.borderColor,
71302            pointStyle: pointStyle || style.pointStyle,
71303            rotation: style.rotation,
71304            textAlign: textAlign || style.textAlign,
71305            borderRadius: 0,
71306            datasetIndex: meta.index
71307          };
71308        }, this);
71309      }
71310    },
71311    title: {
71312      color: (ctx) => ctx.chart.options.color,
71313      display: false,
71314      position: 'center',
71315      text: '',
71316    }
71317  },
71318  descriptors: {
71319    _scriptable: (name) => !name.startsWith('on'),
71320    labels: {
71321      _scriptable: (name) => !['generateLabels', 'filter', 'sort'].includes(name),
71322    }
71323  },
71324};
71325
71326class Title extends Element {
71327  constructor(config) {
71328    super();
71329    this.chart = config.chart;
71330    this.options = config.options;
71331    this.ctx = config.ctx;
71332    this._padding = undefined;
71333    this.top = undefined;
71334    this.bottom = undefined;
71335    this.left = undefined;
71336    this.right = undefined;
71337    this.width = undefined;
71338    this.height = undefined;
71339    this.position = undefined;
71340    this.weight = undefined;
71341    this.fullSize = undefined;
71342  }
71343  update(maxWidth, maxHeight) {
71344    const me = this;
71345    const opts = me.options;
71346    me.left = 0;
71347    me.top = 0;
71348    if (!opts.display) {
71349      me.width = me.height = me.right = me.bottom = 0;
71350      return;
71351    }
71352    me.width = me.right = maxWidth;
71353    me.height = me.bottom = maxHeight;
71354    const lineCount = isArray(opts.text) ? opts.text.length : 1;
71355    me._padding = toPadding(opts.padding);
71356    const textSize = lineCount * toFont(opts.font).lineHeight + me._padding.height;
71357    if (me.isHorizontal()) {
71358      me.height = textSize;
71359    } else {
71360      me.width = textSize;
71361    }
71362  }
71363  isHorizontal() {
71364    const pos = this.options.position;
71365    return pos === 'top' || pos === 'bottom';
71366  }
71367  _drawArgs(offset) {
71368    const {top, left, bottom, right, options} = this;
71369    const align = options.align;
71370    let rotation = 0;
71371    let maxWidth, titleX, titleY;
71372    if (this.isHorizontal()) {
71373      titleX = _alignStartEnd(align, left, right);
71374      titleY = top + offset;
71375      maxWidth = right - left;
71376    } else {
71377      if (options.position === 'left') {
71378        titleX = left + offset;
71379        titleY = _alignStartEnd(align, bottom, top);
71380        rotation = PI * -0.5;
71381      } else {
71382        titleX = right - offset;
71383        titleY = _alignStartEnd(align, top, bottom);
71384        rotation = PI * 0.5;
71385      }
71386      maxWidth = bottom - top;
71387    }
71388    return {titleX, titleY, maxWidth, rotation};
71389  }
71390  draw() {
71391    const me = this;
71392    const ctx = me.ctx;
71393    const opts = me.options;
71394    if (!opts.display) {
71395      return;
71396    }
71397    const fontOpts = toFont(opts.font);
71398    const lineHeight = fontOpts.lineHeight;
71399    const offset = lineHeight / 2 + me._padding.top;
71400    const {titleX, titleY, maxWidth, rotation} = me._drawArgs(offset);
71401    renderText(ctx, opts.text, 0, 0, fontOpts, {
71402      color: opts.color,
71403      maxWidth,
71404      rotation,
71405      textAlign: _toLeftRightCenter(opts.align),
71406      textBaseline: 'middle',
71407      translation: [titleX, titleY],
71408    });
71409  }
71410}
71411function createTitle(chart, titleOpts) {
71412  const title = new Title({
71413    ctx: chart.ctx,
71414    options: titleOpts,
71415    chart
71416  });
71417  layouts.configure(chart, title, titleOpts);
71418  layouts.addBox(chart, title);
71419  chart.titleBlock = title;
71420}
71421var plugin_title = {
71422  id: 'title',
71423  _element: Title,
71424  start(chart, _args, options) {
71425    createTitle(chart, options);
71426  },
71427  stop(chart) {
71428    const titleBlock = chart.titleBlock;
71429    layouts.removeBox(chart, titleBlock);
71430    delete chart.titleBlock;
71431  },
71432  beforeUpdate(chart, _args, options) {
71433    const title = chart.titleBlock;
71434    layouts.configure(chart, title, options);
71435    title.options = options;
71436  },
71437  defaults: {
71438    align: 'center',
71439    display: false,
71440    font: {
71441      weight: 'bold',
71442    },
71443    fullSize: true,
71444    padding: 10,
71445    position: 'top',
71446    text: '',
71447    weight: 2000
71448  },
71449  defaultRoutes: {
71450    color: 'color'
71451  },
71452  descriptors: {
71453    _scriptable: true,
71454    _indexable: false,
71455  },
71456};
71457
71458const map = new WeakMap();
71459var plugin_subtitle = {
71460  id: 'subtitle',
71461  start(chart, _args, options) {
71462    const title = new Title({
71463      ctx: chart.ctx,
71464      options,
71465      chart
71466    });
71467    layouts.configure(chart, title, options);
71468    layouts.addBox(chart, title);
71469    map.set(chart, title);
71470  },
71471  stop(chart) {
71472    layouts.removeBox(chart, map.get(chart));
71473    map.delete(chart);
71474  },
71475  beforeUpdate(chart, _args, options) {
71476    const title = map.get(chart);
71477    layouts.configure(chart, title, options);
71478    title.options = options;
71479  },
71480  defaults: {
71481    align: 'center',
71482    display: false,
71483    font: {
71484      weight: 'normal',
71485    },
71486    fullSize: true,
71487    padding: 0,
71488    position: 'top',
71489    text: '',
71490    weight: 1500
71491  },
71492  defaultRoutes: {
71493    color: 'color'
71494  },
71495  descriptors: {
71496    _scriptable: true,
71497    _indexable: false,
71498  },
71499};
71500
71501const positioners = {
71502  average(items) {
71503    if (!items.length) {
71504      return false;
71505    }
71506    let i, len;
71507    let x = 0;
71508    let y = 0;
71509    let count = 0;
71510    for (i = 0, len = items.length; i < len; ++i) {
71511      const el = items[i].element;
71512      if (el && el.hasValue()) {
71513        const pos = el.tooltipPosition();
71514        x += pos.x;
71515        y += pos.y;
71516        ++count;
71517      }
71518    }
71519    return {
71520      x: x / count,
71521      y: y / count
71522    };
71523  },
71524  nearest(items, eventPosition) {
71525    if (!items.length) {
71526      return false;
71527    }
71528    let x = eventPosition.x;
71529    let y = eventPosition.y;
71530    let minDistance = Number.POSITIVE_INFINITY;
71531    let i, len, nearestElement;
71532    for (i = 0, len = items.length; i < len; ++i) {
71533      const el = items[i].element;
71534      if (el && el.hasValue()) {
71535        const center = el.getCenterPoint();
71536        const d = distanceBetweenPoints(eventPosition, center);
71537        if (d < minDistance) {
71538          minDistance = d;
71539          nearestElement = el;
71540        }
71541      }
71542    }
71543    if (nearestElement) {
71544      const tp = nearestElement.tooltipPosition();
71545      x = tp.x;
71546      y = tp.y;
71547    }
71548    return {
71549      x,
71550      y
71551    };
71552  }
71553};
71554function pushOrConcat(base, toPush) {
71555  if (toPush) {
71556    if (isArray(toPush)) {
71557      Array.prototype.push.apply(base, toPush);
71558    } else {
71559      base.push(toPush);
71560    }
71561  }
71562  return base;
71563}
71564function splitNewlines(str) {
71565  if ((typeof str === 'string' || str instanceof String) && str.indexOf('\n') > -1) {
71566    return str.split('\n');
71567  }
71568  return str;
71569}
71570function createTooltipItem(chart, item) {
71571  const {element, datasetIndex, index} = item;
71572  const controller = chart.getDatasetMeta(datasetIndex).controller;
71573  const {label, value} = controller.getLabelAndValue(index);
71574  return {
71575    chart,
71576    label,
71577    parsed: controller.getParsed(index),
71578    raw: chart.data.datasets[datasetIndex].data[index],
71579    formattedValue: value,
71580    dataset: controller.getDataset(),
71581    dataIndex: index,
71582    datasetIndex,
71583    element
71584  };
71585}
71586function getTooltipSize(tooltip, options) {
71587  const ctx = tooltip._chart.ctx;
71588  const {body, footer, title} = tooltip;
71589  const {boxWidth, boxHeight} = options;
71590  const bodyFont = toFont(options.bodyFont);
71591  const titleFont = toFont(options.titleFont);
71592  const footerFont = toFont(options.footerFont);
71593  const titleLineCount = title.length;
71594  const footerLineCount = footer.length;
71595  const bodyLineItemCount = body.length;
71596  const padding = toPadding(options.padding);
71597  let height = padding.height;
71598  let width = 0;
71599  let combinedBodyLength = body.reduce((count, bodyItem) => count + bodyItem.before.length + bodyItem.lines.length + bodyItem.after.length, 0);
71600  combinedBodyLength += tooltip.beforeBody.length + tooltip.afterBody.length;
71601  if (titleLineCount) {
71602    height += titleLineCount * titleFont.lineHeight
71603			+ (titleLineCount - 1) * options.titleSpacing
71604			+ options.titleMarginBottom;
71605  }
71606  if (combinedBodyLength) {
71607    const bodyLineHeight = options.displayColors ? Math.max(boxHeight, bodyFont.lineHeight) : bodyFont.lineHeight;
71608    height += bodyLineItemCount * bodyLineHeight
71609			+ (combinedBodyLength - bodyLineItemCount) * bodyFont.lineHeight
71610			+ (combinedBodyLength - 1) * options.bodySpacing;
71611  }
71612  if (footerLineCount) {
71613    height += options.footerMarginTop
71614			+ footerLineCount * footerFont.lineHeight
71615			+ (footerLineCount - 1) * options.footerSpacing;
71616  }
71617  let widthPadding = 0;
71618  const maxLineWidth = function(line) {
71619    width = Math.max(width, ctx.measureText(line).width + widthPadding);
71620  };
71621  ctx.save();
71622  ctx.font = titleFont.string;
71623  each(tooltip.title, maxLineWidth);
71624  ctx.font = bodyFont.string;
71625  each(tooltip.beforeBody.concat(tooltip.afterBody), maxLineWidth);
71626  widthPadding = options.displayColors ? (boxWidth + 2) : 0;
71627  each(body, (bodyItem) => {
71628    each(bodyItem.before, maxLineWidth);
71629    each(bodyItem.lines, maxLineWidth);
71630    each(bodyItem.after, maxLineWidth);
71631  });
71632  widthPadding = 0;
71633  ctx.font = footerFont.string;
71634  each(tooltip.footer, maxLineWidth);
71635  ctx.restore();
71636  width += padding.width;
71637  return {width, height};
71638}
71639function determineYAlign(chart, size) {
71640  const {y, height} = size;
71641  if (y < height / 2) {
71642    return 'top';
71643  } else if (y > (chart.height - height / 2)) {
71644    return 'bottom';
71645  }
71646  return 'center';
71647}
71648function doesNotFitWithAlign(xAlign, chart, options, size) {
71649  const {x, width} = size;
71650  const caret = options.caretSize + options.caretPadding;
71651  if (xAlign === 'left' && x + width + caret > chart.width) {
71652    return true;
71653  }
71654  if (xAlign === 'right' && x - width - caret < 0) {
71655    return true;
71656  }
71657}
71658function determineXAlign(chart, options, size, yAlign) {
71659  const {x, width} = size;
71660  const {width: chartWidth, chartArea: {left, right}} = chart;
71661  let xAlign = 'center';
71662  if (yAlign === 'center') {
71663    xAlign = x <= (left + right) / 2 ? 'left' : 'right';
71664  } else if (x <= width / 2) {
71665    xAlign = 'left';
71666  } else if (x >= chartWidth - width / 2) {
71667    xAlign = 'right';
71668  }
71669  if (doesNotFitWithAlign(xAlign, chart, options, size)) {
71670    xAlign = 'center';
71671  }
71672  return xAlign;
71673}
71674function determineAlignment(chart, options, size) {
71675  const yAlign = options.yAlign || determineYAlign(chart, size);
71676  return {
71677    xAlign: options.xAlign || determineXAlign(chart, options, size, yAlign),
71678    yAlign
71679  };
71680}
71681function alignX(size, xAlign) {
71682  let {x, width} = size;
71683  if (xAlign === 'right') {
71684    x -= width;
71685  } else if (xAlign === 'center') {
71686    x -= (width / 2);
71687  }
71688  return x;
71689}
71690function alignY(size, yAlign, paddingAndSize) {
71691  let {y, height} = size;
71692  if (yAlign === 'top') {
71693    y += paddingAndSize;
71694  } else if (yAlign === 'bottom') {
71695    y -= height + paddingAndSize;
71696  } else {
71697    y -= (height / 2);
71698  }
71699  return y;
71700}
71701function getBackgroundPoint(options, size, alignment, chart) {
71702  const {caretSize, caretPadding, cornerRadius} = options;
71703  const {xAlign, yAlign} = alignment;
71704  const paddingAndSize = caretSize + caretPadding;
71705  const radiusAndPadding = cornerRadius + caretPadding;
71706  let x = alignX(size, xAlign);
71707  const y = alignY(size, yAlign, paddingAndSize);
71708  if (yAlign === 'center') {
71709    if (xAlign === 'left') {
71710      x += paddingAndSize;
71711    } else if (xAlign === 'right') {
71712      x -= paddingAndSize;
71713    }
71714  } else if (xAlign === 'left') {
71715    x -= radiusAndPadding;
71716  } else if (xAlign === 'right') {
71717    x += radiusAndPadding;
71718  }
71719  return {
71720    x: _limitValue(x, 0, chart.width - size.width),
71721    y: _limitValue(y, 0, chart.height - size.height)
71722  };
71723}
71724function getAlignedX(tooltip, align, options) {
71725  const padding = toPadding(options.padding);
71726  return align === 'center'
71727    ? tooltip.x + tooltip.width / 2
71728    : align === 'right'
71729      ? tooltip.x + tooltip.width - padding.right
71730      : tooltip.x + padding.left;
71731}
71732function getBeforeAfterBodyLines(callback) {
71733  return pushOrConcat([], splitNewlines(callback));
71734}
71735function createTooltipContext(parent, tooltip, tooltipItems) {
71736  return Object.assign(Object.create(parent), {
71737    tooltip,
71738    tooltipItems,
71739    type: 'tooltip'
71740  });
71741}
71742function overrideCallbacks(callbacks, context) {
71743  const override = context && context.dataset && context.dataset.tooltip && context.dataset.tooltip.callbacks;
71744  return override ? callbacks.override(override) : callbacks;
71745}
71746class Tooltip extends Element {
71747  constructor(config) {
71748    super();
71749    this.opacity = 0;
71750    this._active = [];
71751    this._chart = config._chart;
71752    this._eventPosition = undefined;
71753    this._size = undefined;
71754    this._cachedAnimations = undefined;
71755    this._tooltipItems = [];
71756    this.$animations = undefined;
71757    this.$context = undefined;
71758    this.options = config.options;
71759    this.dataPoints = undefined;
71760    this.title = undefined;
71761    this.beforeBody = undefined;
71762    this.body = undefined;
71763    this.afterBody = undefined;
71764    this.footer = undefined;
71765    this.xAlign = undefined;
71766    this.yAlign = undefined;
71767    this.x = undefined;
71768    this.y = undefined;
71769    this.height = undefined;
71770    this.width = undefined;
71771    this.caretX = undefined;
71772    this.caretY = undefined;
71773    this.labelColors = undefined;
71774    this.labelPointStyles = undefined;
71775    this.labelTextColors = undefined;
71776  }
71777  initialize(options) {
71778    this.options = options;
71779    this._cachedAnimations = undefined;
71780    this.$context = undefined;
71781  }
71782  _resolveAnimations() {
71783    const me = this;
71784    const cached = me._cachedAnimations;
71785    if (cached) {
71786      return cached;
71787    }
71788    const chart = me._chart;
71789    const options = me.options.setContext(me.getContext());
71790    const opts = options.enabled && chart.options.animation && options.animations;
71791    const animations = new Animations(me._chart, opts);
71792    if (opts._cacheable) {
71793      me._cachedAnimations = Object.freeze(animations);
71794    }
71795    return animations;
71796  }
71797  getContext() {
71798    const me = this;
71799    return me.$context ||
71800			(me.$context = createTooltipContext(me._chart.getContext(), me, me._tooltipItems));
71801  }
71802  getTitle(context, options) {
71803    const me = this;
71804    const {callbacks} = options;
71805    const beforeTitle = callbacks.beforeTitle.apply(me, [context]);
71806    const title = callbacks.title.apply(me, [context]);
71807    const afterTitle = callbacks.afterTitle.apply(me, [context]);
71808    let lines = [];
71809    lines = pushOrConcat(lines, splitNewlines(beforeTitle));
71810    lines = pushOrConcat(lines, splitNewlines(title));
71811    lines = pushOrConcat(lines, splitNewlines(afterTitle));
71812    return lines;
71813  }
71814  getBeforeBody(tooltipItems, options) {
71815    return getBeforeAfterBodyLines(options.callbacks.beforeBody.apply(this, [tooltipItems]));
71816  }
71817  getBody(tooltipItems, options) {
71818    const me = this;
71819    const {callbacks} = options;
71820    const bodyItems = [];
71821    each(tooltipItems, (context) => {
71822      const bodyItem = {
71823        before: [],
71824        lines: [],
71825        after: []
71826      };
71827      const scoped = overrideCallbacks(callbacks, context);
71828      pushOrConcat(bodyItem.before, splitNewlines(scoped.beforeLabel.call(me, context)));
71829      pushOrConcat(bodyItem.lines, scoped.label.call(me, context));
71830      pushOrConcat(bodyItem.after, splitNewlines(scoped.afterLabel.call(me, context)));
71831      bodyItems.push(bodyItem);
71832    });
71833    return bodyItems;
71834  }
71835  getAfterBody(tooltipItems, options) {
71836    return getBeforeAfterBodyLines(options.callbacks.afterBody.apply(this, [tooltipItems]));
71837  }
71838  getFooter(tooltipItems, options) {
71839    const me = this;
71840    const {callbacks} = options;
71841    const beforeFooter = callbacks.beforeFooter.apply(me, [tooltipItems]);
71842    const footer = callbacks.footer.apply(me, [tooltipItems]);
71843    const afterFooter = callbacks.afterFooter.apply(me, [tooltipItems]);
71844    let lines = [];
71845    lines = pushOrConcat(lines, splitNewlines(beforeFooter));
71846    lines = pushOrConcat(lines, splitNewlines(footer));
71847    lines = pushOrConcat(lines, splitNewlines(afterFooter));
71848    return lines;
71849  }
71850  _createItems(options) {
71851    const me = this;
71852    const active = me._active;
71853    const data = me._chart.data;
71854    const labelColors = [];
71855    const labelPointStyles = [];
71856    const labelTextColors = [];
71857    let tooltipItems = [];
71858    let i, len;
71859    for (i = 0, len = active.length; i < len; ++i) {
71860      tooltipItems.push(createTooltipItem(me._chart, active[i]));
71861    }
71862    if (options.filter) {
71863      tooltipItems = tooltipItems.filter((element, index, array) => options.filter(element, index, array, data));
71864    }
71865    if (options.itemSort) {
71866      tooltipItems = tooltipItems.sort((a, b) => options.itemSort(a, b, data));
71867    }
71868    each(tooltipItems, (context) => {
71869      const scoped = overrideCallbacks(options.callbacks, context);
71870      labelColors.push(scoped.labelColor.call(me, context));
71871      labelPointStyles.push(scoped.labelPointStyle.call(me, context));
71872      labelTextColors.push(scoped.labelTextColor.call(me, context));
71873    });
71874    me.labelColors = labelColors;
71875    me.labelPointStyles = labelPointStyles;
71876    me.labelTextColors = labelTextColors;
71877    me.dataPoints = tooltipItems;
71878    return tooltipItems;
71879  }
71880  update(changed, replay) {
71881    const me = this;
71882    const options = me.options.setContext(me.getContext());
71883    const active = me._active;
71884    let properties;
71885    let tooltipItems = [];
71886    if (!active.length) {
71887      if (me.opacity !== 0) {
71888        properties = {
71889          opacity: 0
71890        };
71891      }
71892    } else {
71893      const position = positioners[options.position].call(me, active, me._eventPosition);
71894      tooltipItems = me._createItems(options);
71895      me.title = me.getTitle(tooltipItems, options);
71896      me.beforeBody = me.getBeforeBody(tooltipItems, options);
71897      me.body = me.getBody(tooltipItems, options);
71898      me.afterBody = me.getAfterBody(tooltipItems, options);
71899      me.footer = me.getFooter(tooltipItems, options);
71900      const size = me._size = getTooltipSize(me, options);
71901      const positionAndSize = Object.assign({}, position, size);
71902      const alignment = determineAlignment(me._chart, options, positionAndSize);
vendor: 4,650 bytes, lines 71903-72031
71903      const backgroundPoint = getBackgroundPoint(options, positionAndSize, alignment, me._chart);
71904      me.xAlign = alignment.xAlign;
71905      me.yAlign = alignment.yAlign;
71906      properties = {
71907        opacity: 1,
71908        x: backgroundPoint.x,
71909        y: backgroundPoint.y,
71910        width: size.width,
71911        height: size.height,
71912        caretX: position.x,
71913        caretY: position.y
71914      };
71915    }
71916    me._tooltipItems = tooltipItems;
71917    me.$context = undefined;
71918    if (properties) {
71919      me._resolveAnimations().update(me, properties);
71920    }
71921    if (changed && options.external) {
71922      options.external.call(me, {chart: me._chart, tooltip: me, replay});
71923    }
71924  }
71925  drawCaret(tooltipPoint, ctx, size, options) {
71926    const caretPosition = this.getCaretPosition(tooltipPoint, size, options);
71927    ctx.lineTo(caretPosition.x1, caretPosition.y1);
71928    ctx.lineTo(caretPosition.x2, caretPosition.y2);
71929    ctx.lineTo(caretPosition.x3, caretPosition.y3);
71930  }
71931  getCaretPosition(tooltipPoint, size, options) {
71932    const {xAlign, yAlign} = this;
71933    const {cornerRadius, caretSize} = options;
71934    const {x: ptX, y: ptY} = tooltipPoint;
71935    const {width, height} = size;
71936    let x1, x2, x3, y1, y2, y3;
71937    if (yAlign === 'center') {
71938      y2 = ptY + (height / 2);
71939      if (xAlign === 'left') {
71940        x1 = ptX;
71941        x2 = x1 - caretSize;
71942        y1 = y2 + caretSize;
71943        y3 = y2 - caretSize;
71944      } else {
71945        x1 = ptX + width;
71946        x2 = x1 + caretSize;
71947        y1 = y2 - caretSize;
71948        y3 = y2 + caretSize;
71949      }
71950      x3 = x1;
71951    } else {
71952      if (xAlign === 'left') {
71953        x2 = ptX + cornerRadius + (caretSize);
71954      } else if (xAlign === 'right') {
71955        x2 = ptX + width - cornerRadius - caretSize;
71956      } else {
71957        x2 = this.caretX;
71958      }
71959      if (yAlign === 'top') {
71960        y1 = ptY;
71961        y2 = y1 - caretSize;
71962        x1 = x2 - caretSize;
71963        x3 = x2 + caretSize;
71964      } else {
71965        y1 = ptY + height;
71966        y2 = y1 + caretSize;
71967        x1 = x2 + caretSize;
71968        x3 = x2 - caretSize;
71969      }
71970      y3 = y1;
71971    }
71972    return {x1, x2, x3, y1, y2, y3};
71973  }
71974  drawTitle(pt, ctx, options) {
71975    const me = this;
71976    const title = me.title;
71977    const length = title.length;
71978    let titleFont, titleSpacing, i;
71979    if (length) {
71980      const rtlHelper = getRtlAdapter(options.rtl, me.x, me.width);
71981      pt.x = getAlignedX(me, options.titleAlign, options);
71982      ctx.textAlign = rtlHelper.textAlign(options.titleAlign);
71983      ctx.textBaseline = 'middle';
71984      titleFont = toFont(options.titleFont);
71985      titleSpacing = options.titleSpacing;
71986      ctx.fillStyle = options.titleColor;
71987      ctx.font = titleFont.string;
71988      for (i = 0; i < length; ++i) {
71989        ctx.fillText(title[i], rtlHelper.x(pt.x), pt.y + titleFont.lineHeight / 2);
71990        pt.y += titleFont.lineHeight + titleSpacing;
71991        if (i + 1 === length) {
71992          pt.y += options.titleMarginBottom - titleSpacing;
71993        }
71994      }
71995    }
71996  }
71997  _drawColorBox(ctx, pt, i, rtlHelper, options) {
71998    const me = this;
71999    const labelColors = me.labelColors[i];
72000    const labelPointStyle = me.labelPointStyles[i];
72001    const {boxHeight, boxWidth} = options;
72002    const bodyFont = toFont(options.bodyFont);
72003    const colorX = getAlignedX(me, 'left', options);
72004    const rtlColorX = rtlHelper.x(colorX);
72005    const yOffSet = boxHeight < bodyFont.lineHeight ? (bodyFont.lineHeight - boxHeight) / 2 : 0;
72006    const colorY = pt.y + yOffSet;
72007    if (options.usePointStyle) {
72008      const drawOptions = {
72009        radius: Math.min(boxWidth, boxHeight) / 2,
72010        pointStyle: labelPointStyle.pointStyle,
72011        rotation: labelPointStyle.rotation,
72012        borderWidth: 1
72013      };
72014      const centerX = rtlHelper.leftForLtr(rtlColorX, boxWidth) + boxWidth / 2;
72015      const centerY = colorY + boxHeight / 2;
72016      ctx.strokeStyle = options.multiKeyBackground;
72017      ctx.fillStyle = options.multiKeyBackground;
72018      drawPoint(ctx, drawOptions, centerX, centerY);
72019      ctx.strokeStyle = labelColors.borderColor;
72020      ctx.fillStyle = labelColors.backgroundColor;
72021      drawPoint(ctx, drawOptions, centerX, centerY);
72022    } else {
72023      ctx.lineWidth = labelColors.borderWidth || 1;
72024      ctx.strokeStyle = labelColors.borderColor;
72025      ctx.setLineDash(labelColors.borderDash || []);
72026      ctx.lineDashOffset = labelColors.borderDashOffset || 0;
72027      const outerX = rtlHelper.leftForLtr(rtlColorX, boxWidth);
72028      const innerX = rtlHelper.leftForLtr(rtlHelper.xPlus(rtlColorX, 1), boxWidth - 2);
72029      const borderRadius = toTRBLCorners(labelColors.borderRadius);
72030      if (Object.values(borderRadius).some(v => v !== 0)) {
72031        ctx.beginPath();
vendor: 4,217 bytes, lines 72032-72145
72032        ctx.fillStyle = options.multiKeyBackground;
72033        addRoundedRectPath(ctx, {
72034          x: outerX,
72035          y: colorY,
72036          w: boxWidth,
72037          h: boxHeight,
72038          radius: borderRadius,
72039        });
72040        ctx.fill();
72041        ctx.stroke();
72042        ctx.fillStyle = labelColors.backgroundColor;
72043        ctx.beginPath();
72044        addRoundedRectPath(ctx, {
72045          x: innerX,
72046          y: colorY + 1,
72047          w: boxWidth - 2,
72048          h: boxHeight - 2,
72049          radius: borderRadius,
72050        });
72051        ctx.fill();
72052      } else {
72053        ctx.fillStyle = options.multiKeyBackground;
72054        ctx.fillRect(outerX, colorY, boxWidth, boxHeight);
72055        ctx.strokeRect(outerX, colorY, boxWidth, boxHeight);
72056        ctx.fillStyle = labelColors.backgroundColor;
72057        ctx.fillRect(innerX, colorY + 1, boxWidth - 2, boxHeight - 2);
72058      }
72059    }
72060    ctx.fillStyle = me.labelTextColors[i];
72061  }
72062  drawBody(pt, ctx, options) {
72063    const me = this;
72064    const {body} = me;
72065    const {bodySpacing, bodyAlign, displayColors, boxHeight, boxWidth} = options;
72066    const bodyFont = toFont(options.bodyFont);
72067    let bodyLineHeight = bodyFont.lineHeight;
72068    let xLinePadding = 0;
72069    const rtlHelper = getRtlAdapter(options.rtl, me.x, me.width);
72070    const fillLineOfText = function(line) {
72071      ctx.fillText(line, rtlHelper.x(pt.x + xLinePadding), pt.y + bodyLineHeight / 2);
72072      pt.y += bodyLineHeight + bodySpacing;
72073    };
72074    const bodyAlignForCalculation = rtlHelper.textAlign(bodyAlign);
72075    let bodyItem, textColor, lines, i, j, ilen, jlen;
72076    ctx.textAlign = bodyAlign;
72077    ctx.textBaseline = 'middle';
72078    ctx.font = bodyFont.string;
72079    pt.x = getAlignedX(me, bodyAlignForCalculation, options);
72080    ctx.fillStyle = options.bodyColor;
72081    each(me.beforeBody, fillLineOfText);
72082    xLinePadding = displayColors && bodyAlignForCalculation !== 'right'
72083      ? bodyAlign === 'center' ? (boxWidth / 2 + 1) : (boxWidth + 2)
72084      : 0;
72085    for (i = 0, ilen = body.length; i < ilen; ++i) {
72086      bodyItem = body[i];
72087      textColor = me.labelTextColors[i];
72088      ctx.fillStyle = textColor;
72089      each(bodyItem.before, fillLineOfText);
72090      lines = bodyItem.lines;
72091      if (displayColors && lines.length) {
72092        me._drawColorBox(ctx, pt, i, rtlHelper, options);
72093        bodyLineHeight = Math.max(bodyFont.lineHeight, boxHeight);
72094      }
72095      for (j = 0, jlen = lines.length; j < jlen; ++j) {
72096        fillLineOfText(lines[j]);
72097        bodyLineHeight = bodyFont.lineHeight;
72098      }
72099      each(bodyItem.after, fillLineOfText);
72100    }
72101    xLinePadding = 0;
72102    bodyLineHeight = bodyFont.lineHeight;
72103    each(me.afterBody, fillLineOfText);
72104    pt.y -= bodySpacing;
72105  }
72106  drawFooter(pt, ctx, options) {
72107    const me = this;
72108    const footer = me.footer;
72109    const length = footer.length;
72110    let footerFont, i;
72111    if (length) {
72112      const rtlHelper = getRtlAdapter(options.rtl, me.x, me.width);
72113      pt.x = getAlignedX(me, options.footerAlign, options);
72114      pt.y += options.footerMarginTop;
72115      ctx.textAlign = rtlHelper.textAlign(options.footerAlign);
72116      ctx.textBaseline = 'middle';
72117      footerFont = toFont(options.footerFont);
72118      ctx.fillStyle = options.footerColor;
72119      ctx.font = footerFont.string;
72120      for (i = 0; i < length; ++i) {
72121        ctx.fillText(footer[i], rtlHelper.x(pt.x), pt.y + footerFont.lineHeight / 2);
72122        pt.y += footerFont.lineHeight + options.footerSpacing;
72123      }
72124    }
72125  }
72126  drawBackground(pt, ctx, tooltipSize, options) {
72127    const {xAlign, yAlign} = this;
72128    const {x, y} = pt;
72129    const {width, height} = tooltipSize;
72130    const radius = options.cornerRadius;
72131    ctx.fillStyle = options.backgroundColor;
72132    ctx.strokeStyle = options.borderColor;
72133    ctx.lineWidth = options.borderWidth;
72134    ctx.beginPath();
72135    ctx.moveTo(x + radius, y);
72136    if (yAlign === 'top') {
72137      this.drawCaret(pt, ctx, tooltipSize, options);
72138    }
72139    ctx.lineTo(x + width - radius, y);
72140    ctx.quadraticCurveTo(x + width, y, x + width, y + radius);
72141    if (yAlign === 'center' && xAlign === 'right') {
72142      this.drawCaret(pt, ctx, tooltipSize, options);
72143    }
72144    ctx.lineTo(x + width, y + height - radius);
72145    ctx.quadraticCurveTo(x + width, y + height, x + width - radiu
72145s, y + height);
72146    if (yAlign === 'bottom') {
72147      this.drawCaret(pt, ctx, tooltipSize, options);
72148    }
72149    ctx.lineTo(x + radius, y + height);
72150    ctx.quadraticCurveTo(x, y + height, x, y + height - radius);
72151    if (yAlign === 'center' && xAlign === 'left') {
72152      this.drawCaret(pt, ctx, tooltipSize, options);
72153    }
72154    ctx.lineTo(x, y + radius);
72155    ctx.quadraticCurveTo(x, y, x + radius, y);
72156    ctx.closePath();
72157    ctx.fill();
72158    if (options.borderWidth > 0) {
72159      ctx.stroke();
72160    }
72161  }
72162  _updateAnimationTarget(options) {
72163    const me = this;
72164    const chart = me._chart;
72165    const anims = me.$animations;
72166    const animX = anims && anims.x;
72167    const animY = anims && anims.y;
72168    if (animX || animY) {
72169      const position = positioners[options.position].call(me, me._active, me._eventPosition);
72170      if (!position) {
72171        return;
72172      }
72173      const size = me._size = getTooltipSize(me, options);
72174      const positionAndSize = Object.assign({}, position, me._size);
72175      const alignment = determineAlignment(chart, options, positionAndSize);
72176      const point = getBackgroundPoint(options, positionAndSize, alignment, chart);
72177      if (animX._to !== point.x || animY._to !== point.y) {
72178        me.xAlign = alignment.xAlign;
72179        me.yAlign = alignment.yAlign;
72180        me.width = size.width;
72181        me.height = size.height;
72182        me.caretX = position.x;
72183        me.caretY = position.y;
72184        me._resolveAnimations().update(me, point);
72185      }
72186    }
72187  }
72188  draw(ctx) {
72189    const me = this;
72190    const options = me.options.setContext(me.getContext());
72191    let opacity = me.opacity;
72192    if (!opacity) {
72193      return;
72194    }
72195    me._updateAnimationTarget(options);
72196    const tooltipSize = {
72197      width: me.width,
72198      height: me.height
72199    };
72200    const pt = {
72201      x: me.x,
72202      y: me.y
72203    };
72204    opacity = Math.abs(opacity) < 1e-3 ? 0 : opacity;
72205    const padding = toPadding(options.padding);
72206    const hasTooltipContent = me.title.length || me.beforeBody.length || me.body.length || me.afterBody.length || me.footer.length;
72207    if (options.enabled && hasTooltipContent) {
72208      ctx.save();
72209      ctx.globalAlpha = opacity;
72210      me.drawBackground(pt, ctx, tooltipSize, options);
72211      overrideTextDirection(ctx, options.textDirection);
72212      pt.y += padding.top;
72213      me.drawTitle(pt, ctx, options);
72214      me.drawBody(pt, ctx, options);
72215      me.drawFooter(pt, ctx, options);
72216      restoreTextDirection(ctx, options.textDirection);
72217      ctx.restore();
72218    }
72219  }
72220  getActiveElements() {
72221    return this._active || [];
72222  }
72223  setActiveElements(activeElements, eventPosition) {
72224    const me = this;
72225    const lastActive = me._active;
72226    const active = activeElements.map(({datasetIndex, index}) => {
72227      const meta = me._chart.getDatasetMeta(datasetIndex);
72228      if (!meta) {
72229        throw new Error('Cannot find a dataset at index ' + datasetIndex);
72230      }
72231      return {
72232        datasetIndex,
72233        element: meta.data[index],
72234        index,
72235      };
72236    });
72237    const changed = !_elementsEqual(lastActive, active);
72238    const positionChanged = me._positionChanged(active, eventPosition);
72239    if (changed || positionChanged) {
72240      me._active = active;
72241      me._eventPosition = eventPosition;
72242      me.update(true);
72243    }
72244  }
72245  handleEvent(e, replay) {
72246    const me = this;
72247    const options = me.options;
72248    const lastActive = me._active || [];
72249    let changed = false;
72250    let active = [];
72251    if (e.type !== 'mouseout') {
72252      active = me._chart.getElementsAtEventForMode(e, options.mode, options, replay);
72253      if (options.reverse) {
72254        active.reverse();
72255      }
72256    }
72257    const positionChanged = me._positionChanged(active, e);
72258    changed = replay || !_elementsEqual(active, lastActive) || positionChanged;
72259    if (changed) {
72260      me._active = active;
72261      if (options.enabled || options.external) {
72262        me._eventPosition = {
72263          x: e.x,
72264          y: e.y
72265        };
72266        me.update(true, replay);
72267      }
72268    }
72269    return changed;
72270  }
72271  _positionChanged(active, e) {
72272    const {caretX, caretY, options} = this;
72273    const position = positioners[options.position].call(this, active, e);
72274    return position !== false && (caretX !== position.x || caretY !== position.y);
72275  }
72276}
72277Tooltip.positioners = positioners;
72278var plugin_tooltip = {
72279  id: 'tooltip',
72280  _element: Tooltip,
72281  positioners,
72282  afterInit(chart, _args, options) {
72283    if (options) {
72284      chart.tooltip = new Tooltip({_chart: chart, options});
72285    }
72286  },
72287  beforeUpdate(chart, _args, options) {
72288    if (chart.tooltip) {
72289      chart.tooltip.initialize(options);
72290    }
72291  },
72292  reset(chart, _args, options) {
72293    if (chart.tooltip) {
72294      chart.tooltip.initialize(options);
72295    }
72296  },
72297  afterDraw(chart) {
72298    const tooltip = chart.tooltip;
72299    const args = {
72300      tooltip
72301    };
72302    if (chart.notifyPlugins('beforeTooltipDraw', args) === false) {
72303      return;
72304    }
72305    if (tooltip) {
72306      tooltip.draw(chart.ctx);
72307    }
72308    chart.notifyPlugins('afterTooltipDraw', args);
72309  },
72310  afterEvent(chart, args) {
72311    if (chart.tooltip) {
72312      const useFinalPosition = args.replay;
72313      if (chart.tooltip.handleEvent(args.event, useFinalPosition)) {
72314        args.changed = true;
72315      }
72316    }
72317  },
72318  defaults: {
72319    enabled: true,
72320    external: null,
72321    position: 'average',
72322    backgroundColor: 'rgba(0,0,0,0.8)',
72323    titleColor: '#fff',
72324    titleFont: {
72325      weight: 'bold',
72326    },
72327    titleSpacing: 2,
72328    titleMarginBottom: 6,
72329    titleAlign: 'left',
72330    bodyColor: '#fff',
72331    bodySpacing: 2,
72332    bodyFont: {
72333    },
72334    bodyAlign: 'left',
72335    footerColor: '#fff',
72336    footerSpacing: 2,
72337    footerMarginTop: 6,
72338    footerFont: {
72339      weight: 'bold',
72340    },
72341    footerAlign: 'left',
72342    padding: 6,
72343    caretPadding: 2,
72344    caretSize: 5,
72345    cornerRadius: 6,
72346    boxHeight: (ctx, opts) => opts.bodyFont.size,
72347    boxWidth: (ctx, opts) => opts.bodyFont.size,
72348    multiKeyBackground: '#fff',
72349    displayColors: true,
72350    borderColor: 'rgba(0,0,0,0)',
72351    borderWidth: 0,
72352    animation: {
72353      duration: 400,
72354      easing: 'easeOutQuart',
72355    },
72356    animations: {
72357      numbers: {
72358        type: 'number',
72359        properties: ['x', 'y', 'width', 'height', 'caretX', 'caretY'],
72360      },
72361      opacity: {
72362        easing: 'linear',
72363        duration: 200
72364      }
72365    },
72366    callbacks: {
72367      beforeTitle: noop,
72368      title(tooltipItems) {
72369        if (tooltipItems.length > 0) {
72370          const item = tooltipItems[0];
72371          const labels = item.chart.data.labels;
72372          const labelCount = labels ? labels.length : 0;
72373          if (this && this.options && this.options.mode === 'dataset') {
72374            return item.dataset.label || '';
72375          } else if (item.label) {
72376            return item.label;
72377          } else if (labelCount > 0 && item.dataIndex < labelCount) {
72378            return labels[item.dataIndex];
72379          }
72380        }
72381        return '';
72382      },
72383      afterTitle: noop,
72384      beforeBody: noop,
72385      beforeLabel: noop,
72386      label(tooltipItem) {
72387        if (this && this.options && this.options.mode === 'dataset') {
72388          return tooltipItem.label + ': ' + tooltipItem.formattedValue || tooltipItem.formattedValue;
72389        }
72390        let label = tooltipItem.dataset.label || '';
72391        if (label) {
72392          label += ': ';
72393        }
72394        const value = tooltipItem.formattedValue;
72395        if (!isNullOrUndef(value)) {
72396          label += value;
72397        }
72398        return label;
72399      },
72400      labelColor(tooltipItem) {
72401        const meta = tooltipItem.chart.getDatasetMeta(tooltipItem.datasetIndex);
72402        const options = meta.controller.getStyle(tooltipItem.dataIndex);
72403        return {
72404          borderColor: options.borderColor,
72405          backgroundColor: options.backgroundColor,
72406          borderWidth: options.borderWidth,
72407          borderDash: options.borderDash,
72408          borderDashOffset: options.borderDashOffset,
72409          borderRadius: 0,
72410        };
72411      },
72412      labelTextColor() {
72413        return this.options.bodyColor;
72414      },
72415      labelPointStyle(tooltipItem) {
72416        const meta = tooltipItem.chart.getDatasetMeta(tooltipItem.datasetIndex);
72417        const options = meta.controller.getStyle(tooltipItem.dataIndex);
72418        return {
72419          pointStyle: options.pointStyle,
72420          rotation: options.rotation,
72421        };
72422      },
72423      afterLabel: noop,
72424      afterBody: noop,
72425      beforeFooter: noop,
72426      footer: noop,
72427      afterFooter: noop
72428    }
72429  },
72430  defaultRoutes: {
72431    bodyFont: 'font',
72432    footerFont: 'font',
72433    titleFont: 'font'
72434  },
72435  descriptors: {
72436    _scriptable: (name) => name !== 'filter' && name !== 'itemSort' && name !== 'external',
72437    _indexable: false,
72438    callbacks: {
72439      _scriptable: false,
72440      _indexable: false,
72441    },
72442    animation: {
72443      _fallback: false
72444    },
72445    animations: {
72446      _fallback: 'animation'
72447    }
72448  },
72449  additionalOptionScopes: ['interaction']
72450};
72451
72452var plugins = /*#__PURE__*/Object.freeze({
72453__proto__: null,
72454Decimation: plugin_decimation,
72455Filler: plugin_filler,
72456Legend: plugin_legend,
72457SubTitle: plugin_subtitle,
72458Title: plugin_title,
72459Tooltip: plugin_tooltip
72460});
72461
72462const addIfString = (labels, raw, index) => typeof raw === 'string'
72463  ? labels.push(raw) - 1
72464  : isNaN(raw) ? null : index;
72465function findOrAddLabel(labels, raw, index) {
72466  const first = labels.indexOf(raw);
72467  if (first === -1) {
72468    return addIfString(labels, raw, index);
72469  }
72470  const last = labels.lastIndexOf(raw);
72471  return first !== last ? index : first;
72472}
72473const validIndex = (index, max) => index === null ? null : _limitValue(Math.round(index), 0, max);
72474class CategoryScale extends Scale {
72475  constructor(cfg) {
72476    super(cfg);
72477    this._startValue = undefined;
72478    this._valueRange = 0;
72479  }
72480  parse(raw, index) {
72481    if (isNullOrUndef(raw)) {
72482      return null;
72483    }
72484    const labels = this.getLabels();
72485    index = isFinite(index) && labels[index] === raw ? index
72486      : findOrAddLabel(labels, raw, valueOrDefault(index, raw));
72487    return validIndex(index, labels.length - 1);
72488  }
72489  determineDataLimits() {
72490    const me = this;
72491    const {minDefined, maxDefined} = me.getUserBounds();
72492    let {min, max} = me.getMinMax(true);
72493    if (me.options.bounds === 'ticks') {
72494      if (!minDefined) {
72495        min = 0;
72496      }
72497      if (!maxDefined) {
72498        max = me.getLabels().length - 1;
72499      }
72500    }
72501    me.min = min;
72502    me.max = max;
72503  }
72504  buildTicks() {
72505    const me = this;
72506    const min = me.min;
72507    const max = me.max;
72508    const offset = me.options.offset;
72509    const ticks = [];
72510    let labels = me.getLabels();
72511    labels = (min === 0 && max === labels.length - 1) ? labels : labels.slice(min, max + 1);
72512    me._valueRange = Math.max(labels.length - (offset ? 0 : 1), 1);
72513    me._startValue = me.min - (offset ? 0.5 : 0);
72514    for (let value = min; value <= max; value++) {
72515      ticks.push({value});
72516    }
72517    return ticks;
72518  }
72519  getLabelForValue(value) {
72520    const me = this;
72521    const labels = me.getLabels();
72522    if (value >= 0 && value < labels.length) {
72523      return labels[value];
72524    }
72525    return value;
72526  }
72527  configure() {
72528    const me = this;
72529    super.configure();
72530    if (!me.isHorizontal()) {
72531      me._reversePixels = !me._reversePixels;
72532    }
72533  }
72534  getPixelForValue(value) {
72535    const me = this;
72536    if (typeof value !== 'number') {
72537      value = me.parse(value);
72538    }
72539    return value === null ? NaN : me.getPixelForDecimal((value - me._startValue) / me._valueRange);
72540  }
72541  getPixelForTick(index) {
72542    const me = this;
72543    const ticks = me.ticks;
72544    if (index < 0 || index > ticks.length - 1) {
72545      return null;
72546    }
72547    return me.getPixelForValue(ticks[index].value);
72548  }
72549  getValueForPixel(pixel) {
72550    const me = this;
72551    return Math.round(me._startValue + me.getDecimalForPixel(pixel) * me._valueRange);
72552  }
72553  getBasePixel() {
72554    return this.bottom;
72555  }
72556}
72557CategoryScale.id = 'category';
72558CategoryScale.defaults = {
72559  ticks: {
72560    callback: CategoryScale.prototype.getLabelForValue
72561  }
72562};
72563
72564function generateTicks$1(generationOptions, dataRange) {
72565  const ticks = [];
72566  const MIN_SPACING = 1e-14;
72567  const {bounds, step, min, max, precision, count, maxTicks, maxDigits, includeBounds} = generationOptions;
72568  const unit = step || 1;
72569  const maxSpaces = maxTicks - 1;
72570  const {min: rmin, max: rmax} = dataRange;
72571  const minDefined = !isNullOrUndef(min);
72572  const maxDefined = !isNullOrUndef(max);
72573  const countDefined = !isNullOrUndef(count);
vendor: 3,953 bytes, lines 72574-72692
72574  const minSpacing = (rmax - rmin) / (maxDigits + 1);
72575  let spacing = niceNum((rmax - rmin) / maxSpaces / unit) * unit;
72576  let factor, niceMin, niceMax, numSpaces;
72577  if (spacing < MIN_SPACING && !minDefined && !maxDefined) {
72578    return [{value: rmin}, {value: rmax}];
72579  }
72580  numSpaces = Math.ceil(rmax / spacing) - Math.floor(rmin / spacing);
72581  if (numSpaces > maxSpaces) {
72582    spacing = niceNum(numSpaces * spacing / maxSpaces / unit) * unit;
72583  }
72584  if (!isNullOrUndef(precision)) {
72585    factor = Math.pow(10, precision);
72586    spacing = Math.ceil(spacing * factor) / factor;
72587  }
72588  if (bounds === 'ticks') {
72589    niceMin = Math.floor(rmin / spacing) * spacing;
72590    niceMax = Math.ceil(rmax / spacing) * spacing;
72591  } else {
72592    niceMin = rmin;
72593    niceMax = rmax;
72594  }
72595  if (minDefined && maxDefined && step && almostWhole((max - min) / step, spacing / 1000)) {
72596    numSpaces = Math.round(Math.min((max - min) / spacing, maxTicks));
72597    spacing = (max - min) / numSpaces;
72598    niceMin = min;
72599    niceMax = max;
72600  } else if (countDefined) {
72601    niceMin = minDefined ? min : niceMin;
72602    niceMax = maxDefined ? max : niceMax;
72603    numSpaces = count - 1;
72604    spacing = (niceMax - niceMin) / numSpaces;
72605  } else {
72606    numSpaces = (niceMax - niceMin) / spacing;
72607    if (almostEquals(numSpaces, Math.round(numSpaces), spacing / 1000)) {
72608      numSpaces = Math.round(numSpaces);
72609    } else {
72610      numSpaces = Math.ceil(numSpaces);
72611    }
72612  }
72613  const decimalPlaces = Math.max(
72614    _decimalPlaces(spacing),
72615    _decimalPlaces(niceMin)
72616  );
72617  factor = Math.pow(10, isNullOrUndef(precision) ? decimalPlaces : precision);
72618  niceMin = Math.round(niceMin * factor) / factor;
72619  niceMax = Math.round(niceMax * factor) / factor;
72620  let j = 0;
72621  if (minDefined) {
72622    if (includeBounds && niceMin !== min) {
72623      ticks.push({value: min});
72624      if (niceMin < min) {
72625        j++;
72626      }
72627      if (almostEquals(Math.round((niceMin + j * spacing) * factor) / factor, min, relativeLabelSize(min, minSpacing, generationOptions))) {
72628        j++;
72629      }
72630    } else if (niceMin < min) {
72631      j++;
72632    }
72633  }
72634  for (; j < numSpaces; ++j) {
72635    ticks.push({value: Math.round((niceMin + j * spacing) * factor) / factor});
72636  }
72637  if (maxDefined && includeBounds && niceMax !== max) {
72638    if (almostEquals(ticks[ticks.length - 1].value, max, relativeLabelSize(max, minSpacing, generationOptions))) {
72639      ticks[ticks.length - 1].value = max;
72640    } else {
72641      ticks.push({value: max});
72642    }
72643  } else if (!maxDefined || niceMax === max) {
72644    ticks.push({value: niceMax});
72645  }
72646  return ticks;
72647}
72648function relativeLabelSize(value, minSpacing, {horizontal, minRotation}) {
72649  const rad = toRadians(minRotation);
72650  const ratio = (horizontal ? Math.sin(rad) : Math.cos(rad)) || 0.001;
72651  const length = 0.75 * minSpacing * ('' + value).length;
72652  return Math.min(minSpacing / ratio, length);
72653}
72654class LinearScaleBase extends Scale {
72655  constructor(cfg) {
72656    super(cfg);
72657    this.start = undefined;
72658    this.end = undefined;
72659    this._startValue = undefined;
72660    this._endValue = undefined;
72661    this._valueRange = 0;
72662  }
72663  parse(raw, index) {
72664    if (isNullOrUndef(raw)) {
72665      return null;
72666    }
72667    if ((typeof raw === 'number' || raw instanceof Number) && !isFinite(+raw)) {
72668      return null;
72669    }
72670    return +raw;
72671  }
72672  handleTickRangeOptions() {
72673    const me = this;
72674    const {beginAtZero} = me.options;
72675    const {minDefined, maxDefined} = me.getUserBounds();
72676    let {min, max} = me;
72677    const setMin = v => (min = minDefined ? min : v);
72678    const setMax = v => (max = maxDefined ? max : v);
72679    if (beginAtZero) {
72680      const minSign = sign(min);
72681      const maxSign = sign(max);
72682      if (minSign < 0 && maxSign < 0) {
72683        setMax(0);
72684      } else if (minSign > 0 && maxSign > 0) {
72685        setMin(0);
72686      }
72687    }
72688    if (min === max) {
72689      let offset = 1;
72690      if (max >= Number.MAX_SAFE_INTEGER || min <= Number.MIN_SAFE_INTEGER) {
72691        offset = Math.abs(max * 0.05);
72692      }
72693      setMax(max + offset);
72694      if (!beginAtZero) {
72695        setMin(min - offset);
72696      }
72697    }
72698    me.min = min;
72699    me.max = max;
72700  }
72701  getTickLimit() {
72702    const me = this;
72703    const tickOpts = me.options.ticks;
72704    let {maxTicksLimit, stepSize} = tickOpts;
72705    let maxTicks;
72706    if (stepSize) {
72707      maxTicks = Math.ceil(me.max / stepSize) - Math.floor(me.min / stepSize) + 1;
72708    } else {
72709      maxTicks = me.computeTickLimit();
72710      maxTicksLimit = maxTicksLimit || 11;
72711    }
72712    if (maxTicksLimit) {
72713      maxTicks = Math.min(maxTicksLimit, maxTicks);
72714    }
72715    return maxTicks;
72716  }
72717  computeTickLimit() {
72718    return Number.POSITIVE_INFINITY;
72719  }
72720  buildTicks() {
72721    const me = this;
72722    const opts = me.options;
72723    const tickOpts = opts.ticks;
72724    let maxTicks = me.getTickLimit();
72725    maxTicks = Math.max(2, maxTicks);
72726    const numericGeneratorOptions = {
72727      maxTicks,
72728      bounds: opts.bounds,
72729      min: opts.min,
72730      max: opts.max,
72731      precision: tickOpts.precision,
72732      step: tickOpts.stepSize,
72733      count: tickOpts.count,
72734      maxDigits: me._maxDigits(),
72735      horizontal: me.isHorizontal(),
72736      minRotation: tickOpts.minRotation || 0,
72737      includeBounds: tickOpts.includeBounds !== false
72738    };
72739    const dataRange = me._range || me;
72740    const ticks = generateTicks$1(numericGeneratorOptions, dataRange);
72741    if (opts.bounds === 'ticks') {
72742      _setMinAndMaxByKey(ticks, me, 'value');
72743    }
72744    if (opts.reverse) {
72745      ticks.reverse();
72746      me.start = me.max;
72747      me.end = me.min;
72748    } else {
72749      me.start = me.min;
72750      me.end = me.max;
72751    }
72752    return ticks;
72753  }
72754  configure() {
72755    const me = this;
72756    const ticks = me.ticks;
72757    let start = me.min;
72758    let end = me.max;
72759    super.configure();
72760    if (me.options.offset && ticks.length) {
72761      const offset = (end - start) / Math.max(ticks.length - 1, 1) / 2;
72762      start -= offset;
72763      end += offset;
72764    }
72765    me._startValue = start;
72766    me._endValue = end;
72767    me._valueRange = end - start;
72768  }
72769  getLabelForValue(value) {
72770    return formatNumber(value, this.chart.options.locale);
72771  }
72772}
72773
72774class LinearScale extends LinearScaleBase {
72775  determineDataLimits() {
72776    const me = this;
72777    const {min, max} = me.getMinMax(true);
72778    me.min = isNumberFinite(min) ? min : 0;
72779    me.max = isNumberFinite(max) ? max : 1;
72780    me.handleTickRangeOptions();
72781  }
72782  computeTickLimit() {
72783    const me = this;
72784    const horizontal = me.isHorizontal();
72785    const length = horizontal ? me.width : me.height;
72786    const minRotation = toRadians(me.options.ticks.minRotation);
72787    const ratio = (horizontal ? Math.sin(minRotation) : Math.cos(minRotation)) || 0.001;
72788    const tickFont = me._resolveTickFontOptions(0);
72789    return Math.ceil(length / Math.min(40, tickFont.lineHeight / ratio));
72790  }
72791  getPixelForValue(value) {
72792    return value === null ? NaN : this.getPixelForDecimal((value - this._startValue) / this._valueRange);
72793  }
72794  getValueForPixel(pixel) {
72795    return this._startValue + this.getDecimalForPixel(pixel) * this._valueRange;
72796  }
72797}
72798LinearScale.id = 'linear';
72799LinearScale.defaults = {
72800  ticks: {
72801    callback: Ticks.formatters.numeric
72802  }
72803};
72804
72805function isMajor(tickVal) {
72806  const remain = tickVal / (Math.pow(10, Math.floor(log10(tickVal))));
72807  return remain === 1;
72808}
72809function generateTicks(generationOptions, dataRange) {
72810  const endExp = Math.floor(log10(dataRange.max));
72811  const endSignificand = Math.ceil(dataRange.max / Math.pow(10, endExp));
72812  const ticks = [];
72813  let tickVal = finiteOrDefault(generationOptions.min, Math.pow(10, Math.floor(log10(dataRange.min))));
72814  let exp = Math.floor(log10(tickVal));
72815  let significand = Math.floor(tickVal / Math.pow(10, exp));
72816  let precision = exp < 0 ? Math.pow(10, Math.abs(exp)) : 1;
72817  do {
72818    ticks.push({value: tickVal, major: isMajor(tickVal)});
72819    ++significand;
72820    if (significand === 10) {
72821      significand = 1;
72822      ++exp;
72823      precision = exp >= 0 ? 1 : precision;
72824    }
72825    tickVal = Math.round(significand * Math.pow(10, exp) * precision) / precision;
72826  } while (exp < endExp || (exp === endExp && significand < endSignificand));
72827  const lastTick = finiteOrDefault(generationOptions.max, tickVal);
72828  ticks.push({value: lastTick, major: isMajor(tickVal)});
72829  return ticks;
72830}
72831class LogarithmicScale extends Scale {
72832  constructor(cfg) {
72833    super(cfg);
72834    this.start = undefined;
72835    this.end = undefined;
72836    this._startValue = undefined;
72837    this._valueRange = 0;
72838  }
72839  parse(raw, index) {
72840    const value = LinearScaleBase.prototype.parse.apply(this, [raw, index]);
72841    if (value === 0) {
72842      this._zero = true;
72843      return undefined;
72844    }
72845    return isNumberFinite(value) && value > 0 ? value : null;
72846  }
72847  determineDataLimits() {
72848    const me = this;
72849    const {min, max} = me.getMinMax(true);
72850    me.min = isNumberFinite(min) ? Math.max(0, min) : null;
72851    me.max = isNumberFinite(max) ? Math.max(0, max) : null;
72852    if (me.options.beginAtZero) {
72853      me._zero = true;
72854    }
72855    me.handleTickRangeOptions();
72856  }
72857  handleTickRangeOptions() {
72858    const me = this;
72859    const {minDefined, maxDefined} = me.getUserBounds();
72860    let min = me.min;
72861    let max = me.max;
72862    const setMin = v => (min = minDefined ? min : v);
72863    const setMax = v => (max = maxDefined ? max : v);
72864    const exp = (v, m) => Math.pow(10, Math.floor(log10(v)) + m);
72865    if (min === max) {
72866      if (min <= 0) {
72867        setMin(1);
72868        setMax(10);
72869      } else {
72870        setMin(exp(min, -1));
72871        setMax(exp(max, +1));
72872      }
72873    }
72874    if (min <= 0) {
72875      setMin(exp(max, -1));
72876    }
72877    if (max <= 0) {
72878      setMax(exp(min, +1));
72879    }
72880    if (me._zero && me.min !== me._suggestedMin && min === exp(me.min, 0)) {
72881      setMin(exp(min, -1));
72882    }
72883    me.min = min;
72884    me.max = max;
72885  }
72886  buildTicks() {
72887    const me = this;
72888    const opts = me.options;
72889    const generationOptions = {
72890      min: me._userMin,
72891      max: me._userMax
72892    };
72893    const ticks = generateTicks(generationOptions, me);
72894    if (opts.bounds === 'ticks') {
72895      _setMinAndMaxByKey(ticks, me, 'value');
72896    }
72897    if (opts.reverse) {
72898      ticks.reverse();
72899      me.start = me.max;
72900      me.end = me.min;
72901    } else {
72902      me.start = me.min;
72903      me.end = me.max;
72904    }
72905    return ticks;
72906  }
72907  getLabelForValue(value) {
72908    return value === undefined ? '0' : formatNumber(value, this.chart.options.locale);
72909  }
72910  configure() {
72911    const me = this;
72912    const start = me.min;
72913    super.configure();
72914    me._startValue = log10(start);
72915    me._valueRange = log10(me.max) - log10(start);
72916  }
72917  getPixelForValue(value) {
72918    const me = this;
72919    if (value === undefined || value === 0) {
72920      value = me.min;
72921    }
72922    if (value === null || isNaN(value)) {
72923      return NaN;
72924    }
72925    return me.getPixelForDecimal(value === me.min
72926      ? 0
72927      : (log10(value) - me._startValue) / me._valueRange);
72928  }
72929  getValueForPixel(pixel) {
72930    const me = this;
72931    const decimal = me.getDecimalForPixel(pixel);
72932    return Math.pow(10, me._startValue + decimal * me._valueRange);
72933  }
72934}
72935LogarithmicScale.id = 'logarithmic';
72936LogarithmicScale.defaults = {
72937  ticks: {
72938    callback: Ticks.formatters.logarithmic,
72939    major: {
72940      enabled: true
72941    }
72942  }
72943};
72944
72945function getTickBackdropHeight(opts) {
72946  const tickOpts = opts.ticks;
72947  if (tickOpts.display && opts.display) {
72948    const padding = toPadding(tickOpts.backdropPadding);
72949    return valueOrDefault(tickOpts.font && tickOpts.font.size, defaults.font.size) + padding.height;
72950  }
72951  return 0;
72952}
72953function measureLabelSize(ctx, font, label) {
72954  label = isArray(label) ? label : [label];
72955  return {
72956    w: _longestText(ctx, font.string, label),
72957    h: label.length * font.lineHeight
72958  };
72959}
72960function determineLimits(angle, pos, size, min, max) {
72961  if (angle === min || angle === max) {
72962    return {
72963      start: pos - (size / 2),
72964      end: pos + (size / 2)
72965    };
72966  } else if (angle < min || angle > max) {
72967    return {
72968      start: pos - size,
72969      end: pos
72970    };
72971  }
72972  return {
72973    start: pos,
72974    end: pos + size
72975  };
72976}
72977function fitWithPointLabels(scale) {
72978  const furthestLimits = {
72979    l: 0,
72980    r: scale.width,
72981    t: 0,
72982    b: scale.height - scale.paddingTop
72983  };
72984  const furthestAngles = {};
72985  const labelSizes = [];
72986  const padding = [];
72987  const valueCount = scale.getLabels().length;
72988  for (let i = 0; i < valueCount; i++) {
72989    const opts = scale.options.pointLabels.setContext(scale.getPointLabelContext(i));
72990    padding[i] = opts.padding;
72991    const pointPosition = scale.getPointPosition(i, scale.drawingArea + padding[i]);
72992    const plFont = toFont(opts.font);
72993    const textSize = measureLabelSize(scale.ctx, plFont, scale._pointLabels[i]);
72994    labelSizes[i] = textSize;
72995    const angleRadians = scale.getIndexAngle(i);
72996    const angle = toDegrees(angleRadians);
72997    const hLimits = determineLimits(angle, pointPosition.x, textSize.w, 0, 180);
72998    const vLimits = determineLimits(angle, pointPosition.y, textSize.h, 90, 270);
72999    if (hLimits.start < furthestLimits.l) {
73000      furthestLimits.l = hLimits.start;
73001      furthestAngles.l = angleRadians;
73002    }
73003    if (hLimits.end > furthestLimits.r) {
73004      furthestLimits.r = hLimits.end;
73005      furthestAngles.r = angleRadians;
73006    }
73007    if (vLimits.start < furthestLimits.t) {
73008      furthestLimits.t = vLimits.start;
73009      furthestAngles.t = angleRadians;
73010    }
73011    if (vLimits.end > furthestLimits.b) {
73012      furthestLimits.b = vLimits.end;
73013      furthestAngles.b = angleRadians;
73014    }
73015  }
73016  scale._setReductions(scale.drawingArea, furthestLimits, furthestAngles);
73017  scale._pointLabelItems = buildPointLabelItems(scale, labelSizes, padding);
73018}
73019function buildPointLabelItems(scale, labelSizes, padding) {
73020  const items = [];
73021  const valueCount = scale.getLabels().length;
73022  const opts = scale.options;
73023  const tickBackdropHeight = getTickBackdropHeight(opts);
73024  const outerDistance = scale.getDistanceFromCenterForValue(opts.ticks.reverse ? scale.min : scale.max);
73025  for (let i = 0; i < valueCount; i++) {
73026    const extra = (i === 0 ? tickBackdropHeight / 2 : 0);
73027    const pointLabelPosition = scale.getPointPosition(i, outerDistance + extra + padding[i]);
73028    const angle = toDegrees(scale.getIndexAngle(i));
73029    const size = labelSizes[i];
73030    const y = yForAngle(pointLabelPosition.y, size.h, angle);
73031    const textAlign = getTextAlignForAngle(angle);
73032    const left = leftForTextAlign(pointLabelPosition.x, size.w, textAlign);
73033    items.push({
73034      x: pointLabelPosition.x,
73035      y,
73036      textAlign,
73037      left,
73038      top: y,
73039      right: left + size.w,
73040      bottom: y + size.h
73041    });
73042  }
73043  return items;
73044}
73045function getTextAlignForAngle(angle) {
73046  if (angle === 0 || angle === 180) {
73047    return 'center';
73048  } else if (angle < 180) {
73049    return 'left';
73050  }
73051  return 'right';
73052}
73053function leftForTextAlign(x, w, align) {
73054  if (align === 'right') {
73055    x -= w;
73056  } else if (align === 'center') {
73057    x -= (w / 2);
73058  }
73059  return x;
73060}
73061function yForAngle(y, h, angle) {
73062  if (angle === 90 || angle === 270) {
73063    y -= (h / 2);
73064  } else if (angle > 270 || angle < 90) {
73065    y -= h;
73066  }
73067  return y;
73068}
73069function drawPointLabels(scale, labelCount) {
73070  const {ctx, options: {pointLabels}} = scale;
73071  for (let i = labelCount - 1; i >= 0; i--) {
73072    const optsAtIndex = pointLabels.setContext(scale.getPointLabelContext(i));
73073    const plFont = toFont(optsAtIndex.font);
73074    const {x, y, textAlign, left, top, right, bottom} = scale._pointLabelItems[i];
73075    const {backdropColor} = optsAtIndex;
73076    if (!isNullOrUndef(backdropColor)) {
73077      const padding = toPadding(optsAtIndex.backdropPadding);
73078      ctx.fillStyle = backdropColor;
73079      ctx.fillRect(left - padding.left, top - padding.top, right - left + padding.width, bottom - top + padding.height);
73080    }
73081    renderText(
73082      ctx,
73083      scale._pointLabels[i],
73084      x,
73085      y + (plFont.lineHeight / 2),
73086      plFont,
73087      {
73088        color: optsAtIndex.color,
73089        textAlign: textAlign,
73090        textBaseline: 'middle'
73091      }
73092    );
73093  }
73094}
73095function pathRadiusLine(scale, radius, circular, labelCount) {
73096  const {ctx} = scale;
73097  if (circular) {
73098    ctx.arc(scale.xCenter, scale.yCenter, radius, 0, TAU);
73099  } else {
73100    let pointPosition = scale.getPointPosition(0, radius);
73101    ctx.moveTo(pointPosition.x, pointPosition.y);
73102    for (let i = 1; i < labelCount; i++) {
73103      pointPosition = scale.getPointPosition(i, radius);
73104      ctx.lineTo(pointPosition.x, pointPosition.y);
73105    }
73106  }
73107}
73108function drawRadiusLine(scale, gridLineOpts, radius, labelCount) {
73109  const ctx = scale.ctx;
73110  const circular = gridLineOpts.circular;
73111  const {color, lineWidth} = gridLineOpts;
73112  if ((!circular && !labelCount) || !color || !lineWidth || radius < 0) {
73113    return;
73114  }
73115  ctx.save();
73116  ctx.strokeStyle = color;
73117  ctx.lineWidth = lineWidth;
73118  ctx.setLineDash(gridLineOpts.borderDash);
73119  ctx.lineDashOffset = gridLineOpts.borderDashOffset;
73120  ctx.beginPath();
73121  pathRadiusLine(scale, radius, circular, labelCount);
73122  ctx.closePath();
73123  ctx.stroke();
73124  ctx.restore();
73125}
73126function numberOrZero(param) {
73127  return isNumber(param) ? param : 0;
73128}
73129function createPointLabelContext(parent, index, label) {
73130  return Object.assign(Object.create(parent), {
73131    label,
73132    index,
73133    type: 'pointLabel'
73134  });
73135}
73136class RadialLinearScale extends LinearScaleBase {
73137  constructor(cfg) {
73138    super(cfg);
73139    this.xCenter = undefined;
73140    this.yCenter = undefined;
73141    this.drawingArea = undefined;
73142    this._pointLabels = [];
73143    this._pointLabelItems = [];
73144  }
73145  setDimensions() {
73146    const me = this;
73147    me.width = me.maxWidth;
73148    me.height = me.maxHeight;
73149    me.paddingTop = getTickBackdropHeight(me.options) / 2;
73150    me.xCenter = Math.floor(me.width / 2);
73151    me.yCenter = Math.floor((me.height - me.paddingTop) / 2);
73152    me.drawingArea = Math.min(me.height - me.paddingTop, me.width) / 2;
73153  }
73154  determineDataLimits() {
73155    const me = this;
73156    const {min, max} = me.getMinMax(false);
73157    me.min = isNumberFinite(min) && !isNaN(min) ? min : 0;
73158    me.max = isNumberFinite(max) && !isNaN(max) ? max : 0;
73159    me.handleTickRangeOptions();
73160  }
73161  computeTickLimit() {
73162    return Math.ceil(this.drawingArea / getTickBackdropHeight(this.options));
73163  }
73164  generateTickLabels(ticks) {
73165    const me = this;
73166    LinearScaleBase.prototype.generateTickLabels.call(me, ticks);
73167    me._pointLabels = me.getLabels().map((value, index) => {
73168      const label = callback(me.options.pointLabels.callback, [value, index], me);
73169      return label || label === 0 ? label : '';
73170    });
73171  }
73172  fit() {
73173    const me = this;
73174    const opts = me.options;
73175    if (opts.display && opts.pointLabels.display) {
73176      fitWithPointLabels(me);
73177    } else {
73178      me.setCenterPoint(0, 0, 0, 0);
73179    }
73180  }
73181  _setReductions(largestPossibleRadius, furthestLimits, furthestAngles) {
73182    const me = this;
73183    let radiusReductionLeft = furthestLimits.l / Math.sin(furthestAngles.l);
73184    let radiusReductionRight = Math.max(furthestLimits.r - me.width, 0) / Math.sin(furthestAngles.r);
73185    let radiusReductionTop = -furthestLimits.t / Math.cos(furthestAngles.t);
73186    let radiusReductionBottom = -Math.max(furthestLimits.b - (me.height - me.paddingTop), 0) / Math.cos(furthestAngles.b);
73187    radiusReductionLeft = numberOrZero(radiusReductionLeft);
73188    radiusReductionRight = numberOrZero(radiusReductionRight);
73189    radiusReductionTop = numberOrZero(radiusReductionTop);
73190    radiusReductionBottom = numberOrZero(radiusReductionBottom);
73191    me.drawingArea = Math.max(largestPossibleRadius / 2, Math.min(
73192      Math.floor(largestPossibleRadius - (radiusReductionLeft + radiusReductionRight) / 2),
73193      Math.floor(largestPossibleRadius - (radiusReductionTop + radiusReductionBottom) / 2)));
73194    me.setCenterPoint(radiusReductionLeft, radiusReductionRight, radiusReductionTop, radiusReductionBottom);
73195  }
73196  setCenterPoint(leftMovement, rightMovement, topMovement, bottomMovement) {
73197    const me = this;
73198    const maxRight = me.width - rightMovement - me.drawingArea;
73199    const maxLeft = leftMovement + me.drawingArea;
73200    const maxTop = topMovement + me.drawingArea;
73201    const maxBottom = (me.height - me.paddingTop) - bottomMovement - me.drawingArea;
73202    me.xCenter = Math.floor(((maxLeft + maxRight) / 2) + me.left);
73203    me.yCenter = Math.floor(((maxTop + maxBottom) / 2) + me.top + me.paddingTop);
73204  }
73205  getIndexAngle(index) {
73206    const angleMultiplier = TAU / this.getLabels().length;
73207    const startAngle = this.options.startAngle || 0;
73208    return _normalizeAngle(index * angleMultiplier + toRadians(startAngle));
73209  }
73210  getDistanceFromCenterForValue(value) {
73211    const me = this;
73212    if (isNullOrUndef(value)) {
73213      return NaN;
73214    }
73215    const scalingFactor = me.drawingArea / (me.max - me.min);
73216    if (me.options.reverse) {
73217      return (me.max - value) * scalingFactor;
73218    }
73219    return (value - me.min) * scalingFactor;
73220  }
73221  getValueForDistanceFromCenter(distance) {
73222    if (isNullOrUndef(distance)) {
73223      return NaN;
73224    }
73225    const me = this;
73226    const scaledDistance = distance / (me.drawingArea / (me.max - me.min));
73227    return me.options.reverse ? me.max - scaledDistance : me.min + scaledDistance;
73228  }
73229  getPointLabelContext(index) {
73230    const me = this;
73231    const pointLabels = me._pointLabels || [];
73232    if (index >= 0 && index < pointLabels.length) {
73233      const pointLabel = pointLabels[index];
73234      return createPointLabelContext(me.getContext(), index, pointLabel);
73235    }
73236  }
73237  getPointPosition(index, distanceFromCenter) {
73238    const me = this;
73239    const angle = me.getIndexAngle(index) - HALF_PI;
73240    return {
73241      x: Math.cos(angle) * distanceFromCenter + me.xCenter,
73242      y: Math.sin(angle) * distanceFromCenter + me.yCenter,
73243      angle
73244    };
73245  }
73246  getPointPositionForValue(index, value) {
73247    return this.getPointPosition(index, this.getDistanceFromCenterForValue(value));
73248  }
73249  getBasePosition(index) {
73250    return this.getPointPositionForValue(index || 0, this.getBaseValue());
73251  }
73252  getPointLabelPosition(index) {
73253    const {left, top, right, bottom} = this._pointLabelItems[index];
73254    return {
73255      left,
73256      top,
73257      right,
73258      bottom,
73259    };
73260  }
vendor: 7,375 bytes, lines 73261-73517
73261  drawBackground() {
73262    const me = this;
73263    const {backgroundColor, grid: {circular}} = me.options;
73264    if (backgroundColor) {
73265      const ctx = me.ctx;
73266      ctx.save();
73267      ctx.beginPath();
73268      pathRadiusLine(me, me.getDistanceFromCenterForValue(me._endValue), circular, me.getLabels().length);
73269      ctx.closePath();
73270      ctx.fillStyle = backgroundColor;
73271      ctx.fill();
73272      ctx.restore();
73273    }
73274  }
73275  drawGrid() {
73276    const me = this;
73277    const ctx = me.ctx;
73278    const opts = me.options;
73279    const {angleLines, grid} = opts;
73280    const labelCount = me.getLabels().length;
73281    let i, offset, position;
73282    if (opts.pointLabels.display) {
73283      drawPointLabels(me, labelCount);
73284    }
73285    if (grid.display) {
73286      me.ticks.forEach((tick, index) => {
73287        if (index !== 0) {
73288          offset = me.getDistanceFromCenterForValue(tick.value);
73289          const optsAtIndex = grid.setContext(me.getContext(index - 1));
73290          drawRadiusLine(me, optsAtIndex, offset, labelCount);
73291        }
73292      });
73293    }
73294    if (angleLines.display) {
73295      ctx.save();
73296      for (i = me.getLabels().length - 1; i >= 0; i--) {
73297        const optsAtIndex = angleLines.setContext(me.getPointLabelContext(i));
73298        const {color, lineWidth} = optsAtIndex;
73299        if (!lineWidth || !color) {
73300          continue;
73301        }
73302        ctx.lineWidth = lineWidth;
73303        ctx.strokeStyle = color;
73304        ctx.setLineDash(optsAtIndex.borderDash);
73305        ctx.lineDashOffset = optsAtIndex.borderDashOffset;
73306        offset = me.getDistanceFromCenterForValue(opts.ticks.reverse ? me.min : me.max);
73307        position = me.getPointPosition(i, offset);
73308        ctx.beginPath();
73309        ctx.moveTo(me.xCenter, me.yCenter);
73310        ctx.lineTo(position.x, position.y);
73311        ctx.stroke();
73312      }
73313      ctx.restore();
73314    }
73315  }
73316  drawBorder() {}
73317  drawLabels() {
73318    const me = this;
73319    const ctx = me.ctx;
73320    const opts = me.options;
73321    const tickOpts = opts.ticks;
73322    if (!tickOpts.display) {
73323      return;
73324    }
73325    const startAngle = me.getIndexAngle(0);
73326    let offset, width;
73327    ctx.save();
73328    ctx.translate(me.xCenter, me.yCenter);
73329    ctx.rotate(startAngle);
73330    ctx.textAlign = 'center';
73331    ctx.textBaseline = 'middle';
73332    me.ticks.forEach((tick, index) => {
73333      if (index === 0 && !opts.reverse) {
73334        return;
73335      }
73336      const optsAtIndex = tickOpts.setContext(me.getContext(index));
73337      const tickFont = toFont(optsAtIndex.font);
73338      offset = me.getDistanceFromCenterForValue(me.ticks[index].value);
73339      if (optsAtIndex.showLabelBackdrop) {
73340        ctx.font = tickFont.string;
73341        width = ctx.measureText(tick.label).width;
73342        ctx.fillStyle = optsAtIndex.backdropColor;
73343        const padding = toPadding(optsAtIndex.backdropPadding);
73344        ctx.fillRect(
73345          -width / 2 - padding.left,
73346          -offset - tickFont.size / 2 - padding.top,
73347          width + padding.width,
73348          tickFont.size + padding.height
73349        );
73350      }
73351      renderText(ctx, tick.label, 0, -offset, tickFont, {
73352        color: optsAtIndex.color,
73353      });
73354    });
73355    ctx.restore();
73356  }
73357  drawTitle() {}
73358}
73359RadialLinearScale.id = 'radialLinear';
73360RadialLinearScale.defaults = {
73361  display: true,
73362  animate: true,
73363  position: 'chartArea',
73364  angleLines: {
73365    display: true,
73366    lineWidth: 1,
73367    borderDash: [],
73368    borderDashOffset: 0.0
73369  },
73370  grid: {
73371    circular: false
73372  },
73373  startAngle: 0,
73374  ticks: {
73375    showLabelBackdrop: true,
73376    callback: Ticks.formatters.numeric
73377  },
73378  pointLabels: {
73379    backdropColor: undefined,
73380    backdropPadding: 2,
73381    display: true,
73382    font: {
73383      size: 10
73384    },
73385    callback(label) {
73386      return label;
73387    },
73388    padding: 5
73389  }
73390};
73391RadialLinearScale.defaultRoutes = {
73392  'angleLines.color': 'borderColor',
73393  'pointLabels.color': 'color',
73394  'ticks.color': 'color'
73395};
73396RadialLinearScale.descriptors = {
73397  angleLines: {
73398    _fallback: 'grid'
73399  }
73400};
73401
73402const INTERVALS = {
73403  millisecond: {common: true, size: 1, steps: 1000},
73404  second: {common: true, size: 1000, steps: 60},
73405  minute: {common: true, size: 60000, steps: 60},
73406  hour: {common: true, size: 3600000, steps: 24},
73407  day: {common: true, size: 86400000, steps: 30},
73408  week: {common: false, size: 604800000, steps: 4},
73409  month: {common: true, size: 2.628e9, steps: 12},
73410  quarter: {common: false, size: 7.884e9, steps: 4},
73411  year: {common: true, size: 3.154e10}
73412};
73413const UNITS = (Object.keys(INTERVALS));
73414function sorter(a, b) {
73415  return a - b;
73416}
73417function parse(scale, input) {
73418  if (isNullOrUndef(input)) {
73419    return null;
73420  }
73421  const adapter = scale._adapter;
73422  const {parser, round, isoWeekday} = scale._parseOpts;
73423  let value = input;
73424  if (typeof parser === 'function') {
73425    value = parser(value);
73426  }
73427  if (!isNumberFinite(value)) {
73428    value = typeof parser === 'string'
73429      ? adapter.parse(value, parser)
73430      : adapter.parse(value);
73431  }
73432  if (value === null) {
73433    return null;
73434  }
73435  if (round) {
73436    value = round === 'week' && (isNumber(isoWeekday) || isoWeekday === true)
73437      ? adapter.startOf(value, 'isoWeek', isoWeekday)
73438      : adapter.startOf(value, round);
73439  }
73440  return +value;
73441}
73442function determineUnitForAutoTicks(minUnit, min, max, capacity) {
73443  const ilen = UNITS.length;
73444  for (let i = UNITS.indexOf(minUnit); i < ilen - 1; ++i) {
73445    const interval = INTERVALS[UNITS[i]];
73446    const factor = interval.steps ? interval.steps : Number.MAX_SAFE_INTEGER;
73447    if (interval.common && Math.ceil((max - min) / (factor * interval.size)) <= capacity) {
73448      return UNITS[i];
73449    }
73450  }
73451  return UNITS[ilen - 1];
73452}
73453function determineUnitForFormatting(scale, numTicks, minUnit, min, max) {
73454  for (let i = UNITS.length - 1; i >= UNITS.indexOf(minUnit); i--) {
73455    const unit = UNITS[i];
73456    if (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= numTicks - 1) {
73457      return unit;
73458    }
73459  }
73460  return UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];
73461}
73462function determineMajorUnit(unit) {
73463  for (let i = UNITS.indexOf(unit) + 1, ilen = UNITS.length; i < ilen; ++i) {
73464    if (INTERVALS[UNITS[i]].common) {
73465      return UNITS[i];
73466    }
73467  }
73468}
73469function addTick(ticks, time, timestamps) {
73470  if (!timestamps) {
73471    ticks[time] = true;
73472  } else if (timestamps.length) {
73473    const {lo, hi} = _lookup(timestamps, time);
73474    const timestamp = timestamps[lo] >= time ? timestamps[lo] : timestamps[hi];
73475    ticks[timestamp] = true;
73476  }
73477}
73478function setMajorTicks(scale, ticks, map, majorUnit) {
73479  const adapter = scale._adapter;
73480  const first = +adapter.startOf(ticks[0].value, majorUnit);
73481  const last = ticks[ticks.length - 1].value;
73482  let major, index;
73483  for (major = first; major <= last; major = +adapter.add(major, 1, majorUnit)) {
73484    index = map[major];
73485    if (index >= 0) {
73486      ticks[index].major = true;
73487    }
73488  }
73489  return ticks;
73490}
73491function ticksFromTimestamps(scale, values, majorUnit) {
73492  const ticks = [];
73493  const map = {};
73494  const ilen = values.length;
73495  let i, value;
73496  for (i = 0; i < ilen; ++i) {
73497    value = values[i];
73498    map[value] = i;
73499    ticks.push({
73500      value,
73501      major: false
73502    });
73503  }
73504  return (ilen === 0 || !majorUnit) ? ticks : setMajorTicks(scale, ticks, map, majorUnit);
73505}
73506class TimeScale extends Scale {
73507  constructor(props) {
73508    super(props);
73509    this._cache = {
73510      data: [],
73511      labels: [],
73512      all: []
73513    };
73514    this._unit = 'day';
73515    this._majorUnit = undefined;
73516    this._offsets = {};
73517    this._normalized = false;
73518    this._parseOpts = undefined;
73519  }
73520  init(scaleOpts, opts) {
73521    const time = scaleOpts.time || (scaleOpts.time = {});
73522    const adapter = this._adapter = new _adapters._date(scaleOpts.adapters.date);
73523    mergeIf(time.displayFormats, adapter.formats());
73524    this._parseOpts = {
73525      parser: time.parser,
73526      round: time.round,
73527      isoWeekday: time.isoWeekday
73528    };
73529    super.init(scaleOpts);
73530    this._normalized = opts.normalized;
73531  }
73532  parse(raw, index) {
73533    if (raw === undefined) {
73534      return null;
73535    }
73536    return parse(this, raw);
73537  }
73538  beforeLayout() {
73539    super.beforeLayout();
73540    this._cache = {
73541      data: [],
73542      labels: [],
73543      all: []
73544    };
73545  }
73546  determineDataLimits() {
73547    const me = this;
73548    const options = me.options;
73549    const adapter = me._adapter;
73550    const unit = options.time.unit || 'day';
73551    let {min, max, minDefined, maxDefined} = me.getUserBounds();
73552    function _applyBounds(bounds) {
73553      if (!minDefined && !isNaN(bounds.min)) {
73554        min = Math.min(min, bounds.min);
73555      }
73556      if (!maxDefined && !isNaN(bounds.max)) {
73557        max = Math.max(max, bounds.max);
73558      }
73559    }
73560    if (!minDefined || !maxDefined) {
73561      _applyBounds(me._getLabelBounds());
73562      if (options.bounds !== 'ticks' || options.ticks.source !== 'labels') {
73563        _applyBounds(me.getMinMax(false));
73564      }
73565    }
73566    min = isNumberFinite(min) && !isNaN(min) ? min : +adapter.startOf(Date.now(), unit);
73567    max = isNumberFinite(max) && !isNaN(max) ? max : +adapter.endOf(Date.now(), unit) + 1;
73568    me.min = Math.min(min, max - 1);
73569    me.max = Math.max(min + 1, max);
73570  }
73571  _getLabelBounds() {
73572    const arr = this.getLabelTimestamps();
73573    let min = Number.POSITIVE_INFINITY;
73574    let max = Number.NEGATIVE_INFINITY;
73575    if (arr.length) {
73576      min = arr[0];
73577      max = arr[arr.length - 1];
73578    }
73579    return {min, max};
73580  }
73581  buildTicks() {
73582    const me = this;
73583    const options = me.options;
73584    const timeOpts = options.time;
73585    const tickOpts = options.ticks;
73586    const timestamps = tickOpts.source === 'labels' ? me.getLabelTimestamps() : me._generate();
73587    if (options.bounds === 'ticks' && timestamps.length) {
73588      me.min = me._userMin || timestamps[0];
73589      me.max = me._userMax || timestamps[timestamps.length - 1];
73590    }
73591    const min = me.min;
73592    const max = me.max;
73593    const ticks = _filterBetween(timestamps, min, max);
73594    me._unit = timeOpts.unit || (tickOpts.autoSkip
73595      ? determineUnitForAutoTicks(timeOpts.minUnit, me.min, me.max, me._getLabelCapacity(min))
73596      : determineUnitForFormatting(me, ticks.length, timeOpts.minUnit, me.min, me.max));
73597    me._majorUnit = !tickOpts.major.enabled || me._unit === 'year' ? undefined
73598      : determineMajorUnit(me._unit);
73599    me.initOffsets(timestamps);
73600    if (options.reverse) {
73601      ticks.reverse();
73602    }
73603    return ticksFromTimestamps(me, ticks, me._majorUnit);
73604  }
73605  initOffsets(timestamps) {
73606    const me = this;
73607    let start = 0;
73608    let end = 0;
73609    let first, last;
73610    if (me.options.offset && timestamps.length) {
73611      first = me.getDecimalForValue(timestamps[0]);
73612      if (timestamps.length === 1) {
73613        start = 1 - first;
73614      } else {
73615        start = (me.getDecimalForValue(timestamps[1]) - first) / 2;
73616      }
73617      last = me.getDecimalForValue(timestamps[timestamps.length - 1]);
73618      if (timestamps.length === 1) {
73619        end = last;
73620      } else {
73621        end = (last - me.getDecimalForValue(timestamps[timestamps.length - 2])) / 2;
73622      }
73623    }
73624    const limit = timestamps.length < 3 ? 0.5 : 0.25;
73625    start = _limitValue(start, 0, limit);
73626    end = _limitValue(end, 0, limit);
73627    me._offsets = {start, end, factor: 1 / (start + 1 + end)};
73628  }
73629  _generate() {
73630    const me = this;
73631    const adapter = me._adapter;
73632    const min = me.min;
73633    const max = me.max;
73634    const options = me.options;
73635    const timeOpts = options.time;
73636    const minor = timeOpts.unit || determineUnitForAutoTicks(timeOpts.minUnit, min, max, me._getLabelCapacity(min));
73637    const stepSize = valueOrDefault(timeOpts.stepSize, 1);
73638    const weekday = minor === 'week' ? timeOpts.isoWeekday : false;
73639    const hasWeekday = isNumber(weekday) || weekday === true;
73640    const ticks = {};
73641    let first = min;
73642    let time, count;
73643    if (hasWeekday) {
73644      first = +adapter.startOf(first, 'isoWeek', weekday);
73645    }
73646    first = +adapter.startOf(first, hasWeekday ? 'day' : minor);
73647    if (adapter.diff(max, min, minor) > 100000 * stepSize) {
73648      throw new Error(min + ' and ' + max + ' are too far apart with stepSize of ' + stepSize + ' ' + minor);
73649    }
73650    const timestamps = options.ticks.source === 'data' && me.getDataTimestamps();
73651    for (time = first, count = 0; time < max; time = +adapter.add(time, stepSize, minor), count++) {
73652      addTick(ticks, time, timestamps);
73653    }
73654    if (time === max || options.bounds === 'ticks' || count === 1) {
73655      addTick(ticks, time, timestamps);
73656    }
73657    return Object.keys(ticks).sort((a, b) => a - b).map(x => +x);
73658  }
73659  getLabelForValue(value) {
73660    const me = this;
73661    const adapter = me._adapter;
73662    const timeOpts = me.options.time;
73663    if (timeOpts.tooltipFormat) {
73664      return adapter.format(value, timeOpts.tooltipFormat);
73665    }
73666    return adapter.format(value, timeOpts.displayFormats.datetime);
73667  }
73668  _tickFormatFunction(time, index, ticks, format) {
73669    const me = this;
73670    const options = me.options;
73671    const formats = options.time.displayFormats;
73672    const unit = me._unit;
73673    const majorUnit = me._majorUnit;
73674    const minorFormat = unit && formats[unit];
73675    const majorFormat = majorUnit && formats[majorUnit];
73676    const tick = ticks[index];
73677    const major = majorUnit && majorFormat && tick && tick.major;
73678    const label = me._adapter.format(time, format || (major ? majorFormat : minorFormat));
73679    const formatter = options.ticks.callback;
73680    return formatter ? callback(formatter, [label, index, ticks], me) : label;
73681  }
73682  generateTickLabels(ticks) {
73683    let i, ilen, tick;
73684    for (i = 0, ilen = ticks.length; i < ilen; ++i) {
73685      tick = ticks[i];
73686      tick.label = this._tickFormatFunction(tick.value, i, ticks);
73687    }
73688  }
73689  getDecimalForValue(value) {
73690    const me = this;
73691    return value === null ? NaN : (value - me.min) / (me.max - me.min);
73692  }
73693  getPixelForValue(value) {
73694    const me = this;
73695    const offsets = me._offsets;
73696    const pos = me.getDecimalForValue(value);
73697    return me.getPixelForDecimal((offsets.start + pos) * offsets.factor);
73698  }
73699  getValueForPixel(pixel) {
73700    const me = this;
73701    const offsets = me._offsets;
73702    const pos = me.getDecimalForPixel(pixel) / offsets.factor - offsets.end;
73703    return me.min + pos * (me.max - me.min);
73704  }
73705  _getLabelSize(label) {
73706    const me = this;
73707    const ticksOpts = me.options.ticks;
73708    const tickLabelWidth = me.ctx.measureText(label).width;
73709    const angle = toRadians(me.isHorizontal() ? ticksOpts.maxRotation : ticksOpts.minRotation);
73710    const cosRotation = Math.cos(angle);
73711    const sinRotation = Math.sin(angle);
73712    const tickFontSize = me._resolveTickFontOptions(0).size;
73713    return {
73714      w: (tickLabelWidth * cosRotation) + (tickFontSize * sinRotation),
73715      h: (tickLabelWidth * sinRotation) + (tickFontSize * cosRotation)
73716    };
73717  }
73718  _getLabelCapacity(exampleTime) {
73719    const me = this;
73720    const timeOpts = me.options.time;
73721    const displayFormats = timeOpts.displayFormats;
73722    const format = displayFormats[timeOpts.unit] || displayFormats.millisecond;
73723    const exampleLabel = me._tickFormatFunction(exampleTime, 0, ticksFromTimestamps(me, [exampleTime], me._majorUnit), format);
73724    const size = me._getLabelSize(exampleLabel);
73725    const capacity = Math.floor(me.isHorizontal() ? me.width / size.w : me.height / size.h) - 1;
73726    return capacity > 0 ? capacity : 1;
73727  }
73728  getDataTimestamps() {
73729    const me = this;
73730    let timestamps = me._cache.data || [];
73731    let i, ilen;
73732    if (timestamps.length) {
73733      return timestamps;
73734    }
73735    const metas = me.getMatchingVisibleMetas();
73736    if (me._normalized && metas.length) {
73737      return (me._cache.data = metas[0].controller.getAllParsedValues(me));
73738    }
73739    for (i = 0, ilen = metas.length; i < ilen; ++i) {
73740      timestamps = timestamps.concat(metas[i].controller.getAllParsedValues(me));
73741    }
73742    return (me._cache.data = me.normalize(timestamps));
73743  }
73744  getLabelTimestamps() {
73745    const me = this;
73746    const timestamps = me._cache.labels || [];
73747    let i, ilen;
73748    if (timestamps.length) {
73749      return timestamps;
73750    }
73751    const labels = me.getLabels();
73752    for (i = 0, ilen = labels.length; i < ilen; ++i) {
73753      timestamps.push(parse(me, labels[i]));
73754    }
73755    return (me._cache.labels = me._normalized ? timestamps : me.normalize(timestamps));
73756  }
73757  normalize(values) {
73758    return _arrayUnique(values.sort(sorter));
73759  }
73760}
73761TimeScale.id = 'time';
73762TimeScale.defaults = {
73763  bounds: 'data',
73764  adapters: {},
73765  time: {
73766    parser: false,
73767    unit: false,
73768    round: false,
73769    isoWeekday: false,
73770    minUnit: 'millisecond',
73771    displayFormats: {}
73772  },
73773  ticks: {
73774    source: 'auto',
73775    major: {
73776      enabled: false
73777    }
73778  }
73779};
73780
73781function interpolate(table, val, reverse) {
73782  let lo = 0;
73783  let hi = table.length - 1;
73784  let prevSource, nextSource, prevTarget, nextTarget;
73785  if (reverse) {
73786    if (val >= table[lo].pos && val <= table[hi].pos) {
73787      ({lo, hi} = _lookupByKey(table, 'pos', val));
73788    }
73789    ({pos: prevSource, time: prevTarget} = table[lo]);
73790    ({pos: nextSource, time: nextTarget} = table[hi]);
73791  } else {
73792    if (val >= table[lo].time && val <= table[hi].time) {
73793      ({lo, hi} = _lookupByKey(table, 'time', val));
73794    }
73795    ({time: prevSource, pos: prevTarget} = table[lo]);
73796    ({time: nextSource, pos: nextTarget} = table[hi]);
73797  }
73798  const span = nextSource - prevSource;
73799  return span ? prevTarget + (nextTarget - prevTarget) * (val - prevSource) / span : prevTarget;
73800}
73801class TimeSeriesScale extends TimeScale {
73802  constructor(props) {
73803    super(props);
73804    this._table = [];
73805    this._minPos = undefined;
73806    this._tableRange = undefined;
73807  }
73808  initOffsets() {
73809    const me = this;
73810    const timestamps = me._getTimestampsForTable();
73811    const table = me._table = me.buildLookupTable(timestamps);
73812    me._minPos = interpolate(table, me.min);
73813    me._tableRange = interpolate(table, me.max) - me._minPos;
73814    super.initOffsets(timestamps);
73815  }
73816  buildLookupTable(timestamps) {
73817    const {min, max} = this;
73818    const items = [];
73819    const table = [];
73820    let i, ilen, prev, curr, next;
73821    for (i = 0, ilen = timestamps.length; i < ilen; ++i) {
73822      curr = timestamps[i];
73823      if (curr >= min && curr <= max) {
73824        items.push(curr);
73825      }
73826    }
73827    if (items.length < 2) {
73828      return [
73829        {time: min, pos: 0},
73830        {time: max, pos: 1}
73831      ];
73832    }
73833    for (i = 0, ilen = items.length; i < ilen; ++i) {
73834      next = items[i + 1];
73835      prev = items[i - 1];
73836      curr = items[i];
73837      if (Math.round((next + prev) / 2) !== curr) {
73838        table.push({time: curr, pos: i / (ilen - 1)});
73839      }
73840    }
73841    return table;
73842  }
73843  _getTimestampsForTable() {
73844    const me = this;
73845    let timestamps = me._cache.all || [];
73846    if (timestamps.length) {
73847      return timestamps;
73848    }
73849    const data = me.getDataTimestamps();
73850    const label = me.getLabelTimestamps();
73851    if (data.length && label.length) {
73852      timestamps = me.normalize(data.concat(label));
73853    } else {
73854      timestamps = data.length ? data : label;
73855    }
73856    timestamps = me._cache.all = timestamps;
73857    return timestamps;
73858  }
73859  getDecimalForValue(value) {
73860    return (interpolate(this._table, value) - this._minPos) / this._tableRange;
73861  }
73862  getValueForPixel(pixel) {
73863    const me = this;
73864    const offsets = me._offsets;
73865    const decimal = me.getDecimalForPixel(pixel) / offsets.factor - offsets.end;
73866    return interpolate(me._table, decimal * me._tableRange + me._minPos, true);
73867  }
73868}
73869TimeSeriesScale.id = 'timeseries';
73870TimeSeriesScale.defaults = TimeScale.defaults;
73871
73872var scales = /*#__PURE__*/Object.freeze({
73873__proto__: null,
73874CategoryScale: CategoryScale,
73875LinearScale: LinearScale,
73876LogarithmicScale: LogarithmicScale,
73877RadialLinearScale: RadialLinearScale,
73878TimeScale: TimeScale,
73879TimeSeriesScale: TimeSeriesScale
73880});
73881
73882Chart.register(controllers, scales, elements, plugins);
73883Chart.helpers = {...helpers};
73884Chart._adapters = _adapters;
73885Chart.Animation = Animation;
73886Chart.Animations = Animations;
73887Chart.animator = animator;
73888Chart.controllers = registry.controllers.items;
73889Chart.DatasetController = DatasetController;
73890Chart.Element = Element;
73891Chart.elements = elements;
73892Chart.Interaction = Interaction;
73893Chart.layouts = layouts;
73894Chart.platforms = platforms;
73895Chart.Scale = Scale;
73896Chart.Ticks = Ticks;
73897Object.assign(Chart, controllers, scales, elements, plugins, platforms);
73898Chart.Chart = Chart;
73899if (typeof window !== 'undefined') {
73900  window.Chart = Chart;
73901}
73902
73903return Chart;
73904
73905})));
73906
73907(function (global, factory) {
73908    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
73909    typeof define === 'function' && define.amd ? define(['exports'], factory) :
73910    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.countUp = {}));
73911}(this, (function (exports) { 'use strict';
73912
73913    var __assign = (undefined && undefined.__assign) || function () {
73914        __assign = Object.assign || function(t) {
73915            for (var s, i = 1, n = arguments.length; i < n; i++) {
73916                s = arguments[i];
73917                for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
73918                    t[p] = s[p];
73919            }
73920            return t;
73921        };
73922        return __assign.apply(this, arguments);
73923    };
73924    // playground: stackblitz.com/edit/countup-typescript
73925    var CountUp = /** @class */ (function () {
73926        function CountUp(target, endVal, options) {
73927            var _this = this;
73928            this.target = target;
73929            this.endVal = endVal;
73930            this.options = options;
73931            this.version = '2.0.8';
73932            this.defaults = {
73933                startVal: 0,
73934                decimalPlaces: 0,
73935                duration: 2,
73936                useEasing: true,
73937                useGrouping: true,
73938                smartEasingThreshold: 999,
73939                smartEasingAmount: 333,
73940                separator: ',',
73941                decimal: '.',
73942                prefix: '',
73943                suffix: ''
73944            };
73945            this.finalEndVal = null; // for smart easing
73946            this.useEasing = true;
73947            this.countDown = false;
73948            this.error = '';
73949            this.startVal = 0;
73950            this.paused = true;
73951            this.count = function (timestamp) {
73952                if (!_this.startTime) {
73953                    _this.startTime = timestamp;
73954                }
73955                var progress = timestamp - _this.startTime;
73956                _this.remaining = _this.duration - progress;
73957                // to ease or not to ease
73958                if (_this.useEasing) {
73959                    if (_this.countDown) {
73960                        _this.frameVal = _this.startVal - _this.easingFn(progress, 0, _this.startVal - _this.endVal, _this.duration);
73961                    }
73962                    else {
73963                        _this.frameVal = _this.easingFn(progress, _this.startVal, _this.endVal - _this.startVal, _this.duration);
73964                    }
73965                }
73966                else {
73967                    if (_this.countDown) {
73968                        _this.frameVal = _this.startVal - ((_this.startVal - _this.endVal) * (progress / _this.duration));
73969                    }
73970                    else {
73971                        _this.frameVal = _this.startVal + (_this.endVal - _this.startVal) * (progress / _this.duration);
73972                    }
73973                }
73974                // don't go past endVal since progress can exceed duration in the last frame
73975                if (_this.countDown) {
73976                    _this.frameVal = (_this.frameVal < _this.endVal) ? _this.endVal : _this.frameVal;
73977                }
73978                else {
73979                    _this.frameVal = (_this.frameVal > _this.endVal) ? _this.endVal : _this.frameVal;
73980                }
73981                // decimal
73982                _this.frameVal = Number(_this.frameVal.toFixed(_this.options.decimalPlaces));
73983                // format and print value
73984                _this.printValue(_this.frameVal);
73985                // whether to continue
73986                if (progress < _this.duration) {
73987                    _this.rAF = requestAnimationFrame(_this.count);
73988                }
73989                else if (_this.finalEndVal !== null) {
73990                    // smart easing
73991                    _this.update(_this.finalEndVal);
73992                }
73993                else {
73994                    if (_this.callback) {
73995                        _this.callback();
73996                    }
73997                }
73998            };
73999            // default format and easing functions
74000            this.formatNumber = function (num) {
74001                var neg = (num < 0) ? '-' : '';
74002                var result, x1, x2, x3;
74003                result = Math.abs(num).toFixed(_this.options.decimalPlaces);
74004                result += '';
74005                var x = result.split('.');
74006                x1 = x[0];
74007                x2 = x.length > 1 ? _this.options.decimal + x[1] : '';
74008                if (_this.options.useGrouping) {
74009                    x3 = '';
74010                    for (var i = 0, len = x1.length; i < len; ++i) {
74011                        if (i !== 0 && (i % 3) === 0) {
74012                            x3 = _this.options.separator + x3;
74013                        }
74014                        x3 = x1[len - i - 1] + x3;
74015                    }
74016                    x1 = x3;
74017                }
74018                // optional numeral substitution
74019                if (_this.options.numerals && _this.options.numerals.length) {
74020                    x1 = x1.replace(/[0-9]/g, function (w) { return _this.options.numerals[+w]; });
74021                    x2 = x2.replace(/[0-9]/g, function (w) { return _this.options.numerals[+w]; });
74022                }
74023                return neg + _this.options.prefix + x1 + x2 + _this.options.suffix;
74024            };
74025            this.easeOutExpo = function (t, b, c, d) {
74026                return c * (-Math.pow(2, -10 * t / d) + 1) * 1024 / 1023 + b;
74027            };
74028            this.options = __assign(__assign({}, this.defaults), options);
74029            this.formattingFn = (this.options.formattingFn) ?
74030                this.options.formattingFn : this.formatNumber;
74031            this.easingFn = (this.options.easingFn) ?
74032                this.options.easingFn : this.easeOutExpo;
74033            this.startVal = this.validateValue(this.options.startVal);
74034            this.frameVal = this.startVal;
74035            this.endVal = this.validateValue(endVal);
74036            this.options.decimalPlaces = Math.max(this.options.decimalPlaces);
74037            this.resetDuration();
74038            this.options.separator = String(this.options.separator);
74039            this.useEasing = this.options.useEasing;
74040            if (this.options.separator === '') {
74041                this.options.useGrouping = false;
74042            }
74043            this.el = (typeof target === 'string') ? document.getElementById(target) : target;
74044            if (this.el) {
74045                this.printValue(this.startVal);
74046            }
74047            else {
74048                this.error = '[CountUp] target is null or undefined';
74049            }
74050        }
74051        // determines where easing starts and whether to count down or up
74052        CountUp.prototype.determineDirectionAndSmartEasing = function () {
74053            var end = (this.finalEndVal) ? this.finalEndVal : this.endVal;
74054            this.countDown = (this.startVal > end);
74055            var animateAmount = end - this.startVal;
74056            if (Math.abs(animateAmount) > this.options.smartEasingThreshold) {
74057                this.finalEndVal = end;
74058                var up = (this.countDown) ? 1 : -1;
74059                this.endVal = end + (up * this.options.smartEasingAmount);
74060                this.duration = this.duration / 2;
74061            }
74062            else {
74063                this.endVal = end;
74064                this.finalEndVal = null;
74065            }
74066            if (this.finalEndVal) {
74067                this.useEasing = false;
74068            }
74069            else {
74070                this.useEasing = this.options.useEasing;
74071            }
74072        };
74073        // start animation
74074        CountUp.prototype.start = function (callback) {
74075            if (this.error) {
74076                return;
74077            }
74078            this.callback = callback;
74079            if (this.duration > 0) {
74080                this.determineDirectionAndSmartEasing();
74081                this.paused = false;
74082                this.rAF = requestAnimationFrame(this.count);
74083            }
74084            else {
74085                this.printValue(this.endVal);
74086            }
74087        };
74088        // pause/resume animation
74089        CountUp.prototype.pauseResume = function () {
74090            if (!this.paused) {
74091                cancelAnimationFrame(this.rAF);
74092            }
74093            else {
74094                this.startTime = null;
74095                this.duration = this.remaining;
74096                this.startVal = this.frameVal;
74097                this.determineDirectionAndSmartEasing();
74098                this.rAF = requestAnimationFrame(this.count);
74099            }
74100            this.paused = !this.paused;
74101        };
74102        // reset to startVal so animation can be run again
74103        CountUp.prototype.reset = function () {
74104            cancelAnimationFrame(this.rAF);
74105            this.paused = true;
74106            this.resetDuration();
74107            this.startVal = this.validateValue(this.options.startVal);
74108            this.frameVal = this.startVal;
74109            this.printValue(this.startVal);
74110        };
74111        // pass a new endVal and start animation
74112        CountUp.prototype.update = function (newEndVal) {
74113            cancelAnimationFrame(this.rAF);
74114            this.startTime = null;
74115            this.endVal = this.validateValue(newEndVal);
74116            if (this.endVal === this.frameVal) {
74117                return;
74118            }
74119            this.startVal = this.frameVal;
74120            if (!this.finalEndVal) {
74121                this.resetDuration();
74122            }
74123            this.finalEndVal = null;
74124            this.determineDirectionAndSmartEasing();
74125            this.rAF = requestAnimationFrame(this.count);
74126        };
74127        CountUp.prototype.printValue = function (val) {
74128            var result = this.formattingFn(val);
74129            if (this.el.tagName === 'INPUT') {
74130                var input = this.el;
74131                input.value = result;
74132            }
74133            else if (this.el.tagName === 'text' || this.el.tagName === 'tspan') {
74134                this.el.textContent = result;
74135            }
74136            else {
74137                this.el.innerHTML = result;
74138            }
74139        };
74140        CountUp.prototype.ensureNumber = function (n) {
74141            return (typeof n === 'number' && !isNaN(n));
74142        };
74143        CountUp.prototype.validateValue = function (value) {
74144            var newValue = Number(value);
74145            if (!this.ensureNumber(newValue)) {
74146                this.error = "[CountUp] invalid start or end value: " + value;
74147                return null;
74148            }
74149            else {
74150                return newValue;
74151            }
74152        };
74153        CountUp.prototype.resetDuration = function () {
74154            this.startTime = null;
74155            this.duration = Number(this.options.duration) * 1000;
74156            this.remaining = this.duration;
74157        };
74158        return CountUp;
74159    }());
74160
74161    exports.CountUp = CountUp;
74162
74163    Object.defineProperty(exports, '__esModule', { value: true });
74164
74165})));
74166
74167(function(t){function z(){for(var a=0;a<g.length;a++)g[a][0](g[a][1]);g=[];m=!1}function n(a,b){g.push([a,b]);m||(m=!0,A(z,0))}function B(a,b){function c(a){p(b,a)}function h(a){k(b,a)}try{a(c,h)}catch(d){h(d)}}
74167function u(a){var b=a.owner,c=b.state_,b=b.data_,h=a[c];a=a.then;if("function"===typeof h){c=l;try{b=h(b)}catch(d){k(a,d)}}v(a,b)||(c===l&&p(a,b),c===q&&k(a,b))}function v(a,b){var c;try{if(a===b)throw new TypeError("A promises callback cannot return that same promise.");if(b&&("function"===
74168typeof b||"object"===typeof b)){var h=b.then;if("function"===typeof h)return h.call(b,function(d){c||(c=!0,b!==d?p(a,d):w(a,d))},function(b){c||(c=!0,k(a,b))}),!0}}catch(d){return c||k(a,d),!0}return!1}function p(a,b){a!==b&&v(a,b)||w(a,b)}function w(a,b){a.state_===r&&(a.state_=x,a.data_=b,n(C,a))}function k(a,b){a.state_===r&&(a.state_=x,a.data_=b,n(D,a))}function y(a){var b=a.then_;a.then_=void 0;for(a=0;a<b.length;a++)u(b[a])}function C(a){a.state_=l;y(a)}function D(a){a.state_=q;y(a)}function e(a){if("function"!==
74169typeof a)throw new TypeError("Promise constructor takes a function argument");if(!1===this instanceof e)throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this.then_=[];B(a,this)}var f=t.Promise,s=f&&"resolve"in f&&"reject"in f&&"all"in f&&"race"in f&&function(){var a;new f(function(b){a=b});return"function"===typeof a}();"undefined"!==typeof exports&&exports?(exports.Promise=s?f:e,exports.Polyfill=e):"function"==
74170typeof define&&define.amd?define(function(){return s?f:e}):s||(t.Promise=e);var r="pending",x="sealed",l="fulfilled",q="rejected",E=function(){},A="undefined"!==typeof setImmediate?setImmediate:setTimeout,g=[],m;e.prototype={constructor:e,state_:r,then_:null,data_:void 0,then:function(a,b){var c={owner:this,then:new this.constructor(E),fulfilled:a,rejected:b};this.state_===l||this.state_===q?n(u,c):this.then_.push(c);return c.then},"catch":function(a){return this.then(null,a)}};e.all=function(a){if("[object Array]"!==
74171Object.prototype.toString.call(a))throw new TypeError("You must pass an array to Promise.all().");return new this(function(b,c){function h(a){e++;return function(c){d[a]=c;--e||b(d)}}for(var d=[],e=0,f=0,g;f<a.length;f++)(g=a[f])&&"function"===typeof g.then?g.then(h(f),c):d[f]=g;e||b(d)})};e.race=function(a){if("[object Array]"!==Object.prototype.toString.call(a))throw new TypeError("You must pass an array to Promise.race().");return new this(function(b,c){for(var e=0,d;e<a.length;e++)(d=a[e])&&"function"===
74172typeof d.then?d.then(b,c):b(d)})};e.resolve=function(a){return a&&"object"===typeof a&&a.constructor===this?a:new this(function(b){b(a)})};e.reject=function(a){return new this(function(b,c){c(a)})}})("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this);
74173
74174!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Sweetalert2=t()}(this,function(){"use strict";const l=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),t="SweetAlert2:",o=e=>e.charAt(0).toUpperCase()+e.slice(1),a=e=>Array.prototype.slice.call(e),s=e=>{console.warn("".concat(t," ").concat("object"==typeof e?e.join(" "):e))},r=e=>{console.error("".concat(t," ").concat(e))},n=[],i=(e,t)=>{t='"'.concat(e,'" is deprecated and will be removed in the next major release. Please use "').concat(t,'" instead.'),n.includes(t)||(n.push(t),s(t))},c=e=>"function"==typeof e?e():e,u=e=>e&&"function"==typeof e.toPromise,d=e=>u(e)?e.toPromise():Promise.resolve(e),p=e=>e&&Promise.resolve(e)===e,m=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);var e=e=>{const t={};for(const n in e)t[e[n]]="swal2-"+e[n];return t};const h=e(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","to
74174p-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"]),g=e(["success","warning","info","question","error"]),b=()=>document.body.querySelector(".".concat(h.container)),f=e=>{const t=b();return t?t.querySelector(e):null},y=e=>f(".".concat(e)),v=()=>y(h.popup),w=()=>y(h.icon),C=()=>y(h.title),k=()=>y(h["html-container"]),A=()=>y(h.image),B=()=>y(h["progress-steps"]),x=()=>y(h["validation-message"]),P=()=>f(".".concat(h.actions," .").concat(h.confirm)),E=()=>f(".".concat(h.actions," .").concat(h.deny));const S=()=>f(".".concat(h.loader)),T=()=>f(".".concat(h.actions," .").concat(h.cancel)),L=()=>y(h.actions),O=()=>y(h.footer),j=()=>y(h["timer-progress-bar"]),D=()=>y(h.close),I=()=>{const e=a(v().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((e,t)=>(e=parseInt(e.getAttribute("tabindex")),(t=parseInt(t.getAttribute("tabindex")))<e?1:e<t?-1:0));var t=a(v().querySelectorAll('\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')).filter(e=>"-1"!==e.getAttribute("tabindex"));return(t=>{const n=[];for(let e=0;e<t.length;e++)-1===n.indexOf(t[e])&&n.push(t[e]);return n})(e.concat(t)).filter(e=>G(e))},M=()=>!H()&&!document.body.classList.contains(h["no-backdrop"]),H=()=>document.body.classList.contains(h["toast-shown"]);const q={previousBodyPadding:null},V=(t,e)=>{if(t.textContent="",e){const n=new DOMParser,o=n.parseFromString(e,"text/html");a(o.querySelector("head").childNodes).forEach(e=>{t.appendChild(e)}),a(o.querySelector("body").childNodes).forEach(e=>{t.appendChild(e)})}},N=(t,e)=>{if(!e)return!1;var n=e.split(/\s+/);for(let e=0;e<n.length;e++)if(!t.classList.contains(n[e]))return!1;return!0},U=(e,t,n)=>{var o,i;if(o=e,i=t,a(o.classList).forEach(e=>{Object.values(h).includes(e)||Object.values(g).includes(e)||Object.values(i.showClass).includes(e)||o.classList.remove(e)}),t.customClass&&t.customClass[n]){if("string"!=typeof t.customClass[n]&&!t.customClass[n].forEach)return s("Invalid type of customClass.".concat(n,'! Expected string or iterable object, got "').concat(typeof t.customClass[n],'"'));W(e,t.customClass[n])}},F=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return K(e,h[t]);case"checkbox":return e.querySelector(".".concat(h.checkbox," input"));case"radio":return e.querySelector(".".concat(h.radio," input:checked"))||e.querySelector(".".concat(h.radio," input:first-child"));case"range":return e.querySelector(".".concat(h.range," input"));default:return K(e,h.input)}},R=e=>{var t;e.focus(),"file"!==e.type&&(t=e.value,e.value="",e.value=t)},z=(e,t,n)=>{e&&t&&(t="string"==typeof t?t.split(/\s+/).filter(Boolean):t).forEach(t=>{e.forEach?e.forEach(e=>{n?e.classList.add(t):e.classList.remove(t)}):n?e.classList.add(t):e.classList.remove(t)})},W=(e,t)=>{z(e,t,!0)},_=(e,t)=>{z(e,t,!1)},K=(t,n)=>{for(let e=0;e<t.childNodes.length;e++)if(N(t.childNodes[e],n))return t.childNodes[e]},Y=(e,t,n)=>{(n=n==="".concat(parseInt(n))?parseInt(n):n)||0===parseInt(n)?e.style[t]="number"==typeof n?"".concat(n,"px"):n:e.style.removeProperty(t)},Z=(e,t="flex")=>{e.style.display=t},J=e=>{e.style.display="none"},X=(e,t,n,o)=>{const i=e.querySelector(t);i&&(i.style[n]=o)},$=(e,t,n)=>{t?Z(e,n):J(e)},G=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),Q=()=>!G(P())&&!G(E())&&!G(T()),ee=e=>!!(e.scrollHeight>e.clientHeight),te=e=>{const t=window.getComputedStyle(e);var n=parseFloat(t.getPropertyValue("animation-duration")||"0"),e=parseFloat(t.getPropertyValue("transition-duration")||"0");return 0<n||0<e},ne=(e,t=!1)=>{const n=j();G(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition="width ".concat(e/1e3,"s linear"),n.style.width="0%"},10))},oe=()=>"undefined"==typeof window||"undefined"==typeof document,ie='\n <div aria-labelledby="'.concat(h.title,'" aria-describedby="').concat(h["html-container"],'" class="').concat(h.popup,'" tabindex="-1">\n   <button type="button" class="').concat(h.close,'"></button>\n   <ul class="').concat(h["progress-steps"],'"></ul>\n   <div class="').concat(h.icon,'"></div>\n   <img class="').concat(h.image,'" />\n   <h2 class="').concat(h.title,'" id="').concat(h.title,'"></h2>\n   <div class="').concat(h["html-container"],'" id="').concat(h["html-container"],'"></div>\n   <input class="').concat(h.input,'" />\n   <input type="file" class="').concat(h.file,'" />\n   <div class="').concat(h.range,'">\n     <input type="range" />\n     <output></output>\n   </div>\n   <select class="').concat(h.select,'"></select>\n   <div class="').concat(h.radio,'"></div>
74174\n   <label for="').concat(h.checkbox,'" class="').concat(h.checkbox,'">\n     <input type="checkbox" />\n     <span class="').concat(h.label,'"></span>\n   </label>\n   <textarea class="').concat(h.textarea,'"></textarea>\n   <div class="').concat(h["validation-message"],'" id="').concat(h["validation-message"],'"></div>\n   <div class="').concat(h.actions,'">\n     <div class="').concat(h.loader,'"></div>\n     <button type="button" class="').concat(h.confirm,'"></button>\n     <button type="button" class="').concat(h.deny,'"></button>\n     <button type="button" class="').concat(h.cancel,'"></button>\n   </div>\n   <div class="').concat(h.footer,'"></div>\n   <div class="').concat(h["timer-progress-bar-container"],'">\n     <div class="').concat(h["timer-progress-bar"],'"></div>\n   </div>\n </div>\n').replace(/(^|\n)\s*/g,""),ae=()=>{ln.isVisible()&&ln.resetValidationMessage()},se=e=>{var t=(()=>{const e=b();return!!e&&(e.remove(),_([document.documentElement,document.body],[h["no-backdrop"],h["toast-shown"],h["has-column"]]),!0)})();if(oe())r("SweetAlert2 requires document to initialize");else{const n=document.createElement("div");n.className=h.container,t&&W(n,h["no-transition"]),V(n,ie);const o="string"==typeof(t=e.target)?document.querySelector(t):t;o.appendChild(n),(e=>{const t=v();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),e=o,"rtl"===window.getComputedStyle(e).direction&&W(b(),h.rtl),(()=>{const e=v(),t=K(e,h.input),n=K(e,h.file),o=e.querySelector(".".concat(h.range," input")),i=e.querySelector(".".concat(h.range," output")),a=K(e,h.select),s=e.querySelector(".".concat(h.checkbox," input")),r=K(e,h.textarea);t.oninput=ae,n.onchange=ae,a.onchange=ae,s.onchange=ae,r.oninput=ae,o.oninput=()=>{ae(),i.value=o.value},o.onchange=()=>{ae(),o.nextSibling.value=o.value}})()}},re=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?ce(e,t):e&&V(t,e)},ce=(e,t)=>{e.jquery?le(t,e):V(t,e.toString())},le=(t,n)=>{if(t.textContent="",0 in n)for(let e=0;e in n;e++)t.appendChild(n[e].cloneNode(!0));else t.appendChild(n.cloneNode(!0))},ue=(()=>{if(oe())return!1;var e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&void 0!==e.style[n])return t[n];return!1})(),de=(e,t)=>{const n=L();var o=S(),i=P(),a=E(),s=T();(t.showConfirmButton||t.showDenyButton||t.showCancelButton?Z:J)(n),U(n,t,"actions"),pe(i,"confirm",t),pe(a,"deny",t),pe(s,"cancel",t),function(e,t,n,o){if(!o.buttonsStyling)return _([e,t,n],h.styled);W([e,t,n],h.styled),o.confirmButtonColor&&(e.style.backgroundColor=o.confirmButtonColor,W(e,h["default-outline"]));o.denyButtonColor&&(t.style.backgroundColor=o.denyButtonColor,W(t,h["default-outline"]));o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,W(n,h["default-outline"]))}(i,a,s,t),t.reverseButtons&&(n.insertBefore(s,o),n.insertBefore(a,o),n.insertBefore(i,o)),V(o,t.loaderHtml),U(o,t,"loader")};function pe(e,t,n){$(e,n["show".concat(o(t),"Button")],"inline-block"),V(e,n["".concat(t,"ButtonText")]),e.setAttribute("aria-label",n["".concat(t,"ButtonAriaLabel")]),e.className=h[t],U(e,n,"".concat(t,"Button")),W(e,n["".concat(t,"ButtonClass")])}const me=(e,t)=>{var n,o,i=b();i&&(o=i,"string"==typeof(n=t.backdrop)?o.style.background=n:n||W([document.documentElement,document.body],h["no-backdrop"]),o=i,(n=t.position)in h?W(o,h[n]):(s('The "position" parameter is not valid, defaulting to "center"'),W(o,h.center)),n=i,!(o=t.grow)||"string"!=typeof o||(o="grow-".concat(o))in h&&W(n,h[o]),U(i,t,"container"))};var he={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const ge=["input","file","range","select","radio","checkbox","textarea"],be=e=>{if(!ke[e.input])return r('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(e.input,'"'));var t=Ce(e.input);const n=ke[e.input](t,e);Z(n),setTimeout(()=>{R(n)})},fe=(e,t)=>
74174{const n=F(v(),e);if(n){(t=>{for(let e=0;e<t.attributes.length;e++){var n=t.attributes[e].name;["type","value","style"].includes(n)||t.removeAttribute(n)}})(n);for(const o in t)n.setAttribute(o,t[o])}},ye=e=>{var t=Ce(e.input);e.customClass&&W(t,e.customClass.input)},ve=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},we=(e,t,n)=>{if(n.inputLabel){e.id=h.input;const i=document.createElement("label");var o=h["input-label"];i.setAttribute("for",e.id),i.className=o,W(i,n.customClass.inputLabel),i.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",i)}},Ce=e=>{e=h[e]||h.input;return K(v(),e)},ke={};ke.text=ke.email=ke.password=ke.number=ke.tel=ke.url=(e,t)=>("string"==typeof t.inputValue||"number"==typeof t.inputValue?e.value=t.inputValue:p(t.inputValue)||s('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(typeof t.inputValue,'"')),we(e,e,t),ve(e,t),e.type=t.input,e),ke.file=(e,t)=>(we(e,e,t),ve(e,t),e),ke.range=(e,t)=>{const n=e.querySelector("input"),o=e.querySelector("output");return n.value=t.inputValue,n.type=t.input,o.value=t.inputValue,we(n,e,t),e},ke.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");V(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return we(e,e,t),e},ke.radio=e=>(e.textContent="",e),ke.checkbox=(e,t)=>{const n=F(v(),"checkbox");n.value=1,n.id=h.checkbox,n.checked=Boolean(t.inputValue);var o=e.querySelector("span");return V(o,t.inputPlaceholder),e},ke.textarea=(n,e)=>{n.value=e.inputValue,ve(n,e),we(n,n,e);return setTimeout(()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(v()).width);new MutationObserver(()=>{var e,e=n.offsetWidth+(e=n,parseInt(window.getComputedStyle(e).marginLeft)+parseInt(window.getComputedStyle(e).marginRight));e>t?v().style.width="".concat(e,"px"):v().style.width=null}).observe(n,{attributes:!0,attributeFilter:["style"]})}}),n};const Ae=(e,t)=>
74174{const n=k();U(n,t,"htmlContainer"),t.html?(re(t.html,n),Z(n,"block")):t.text?(n.textContent=t.text,Z(n,"block")):J(n),((e,o)=>{const i=v();e=he.innerParams.get(e);const a=!e||o.input!==e.input;ge.forEach(e=>{var t=h[e];const n=K(i,t);fe(e,o.inputAttributes),n.className=t,a&&J(n)}),o.input&&(a&&be(o),ye(o))})(e,t)},Be=(e,t)=>{for(const n in g)t.icon!==n&&_(e,g[n]);W(e,g[t.icon]),Ee(e,t),xe(),U(e,t,"icon")},xe=()=>{const e=v();var t=window.getComputedStyle(e).getPropertyValue("background-color");const n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e<n.length;e++)n[e].style.backgroundColor=t},Pe=(e,t)=>{var n;e.textContent="",t.iconHtml?V(e,Se(t.iconHtml)):"success"===t.icon?V(e,'\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    '):"error"===t.icon?V(e,'\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    '):(n={question:"?",warning:"!",info:"i"},V(e,Se(n[t.icon])))},Ee=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])X(e,n,"backgroundColor",t.iconColor);X(e,".swal2-success-ring","borderColor",t.iconColor)}},Se=e=>'<div class="'.concat(h["icon-content"],'">').concat(e,"</div>"),Te=(e,o)=>{const i=B();if(!o.progressSteps||0===o.progressSteps.length)return J(i);Z(i),i.textContent="",o.currentProgressStep>=o.progressSteps.length&&s("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),o.progressSteps.forEach((e,t)=>{var n,e=(n=e,e=document.createElement("li"),W(e,h["progress-step"]),V(e,n),e);i.appendChild(e),t===o.currentProgressStep&&W(e,h["active-progress-step"]),t!==o.progressSteps.length-1&&(t=(e=>{const t=document.createElement("li");return W(t,h["progress-step-line"]),e.progressStepsDistance&&(t.style.width=e.progressStepsDistance),t})(o),i.appendChild(t))})},Le=(e,t)=>{e.className="".concat(h.popup," ").concat(G(e)?t.showClass.popup:""),t.toast?(W([document.documentElement,document.body],h["toast-shown"]),W(e,h.toast)):W(e,h.modal),U(e,t,"popup"),"string"==typeof t.customClass&&W(e,t.customClass),t.icon&&W(e,h["icon-".concat(t.icon)])},Oe=(e,t)=>{var n,o,i;(e=>{var t=b();const n=v();e.toast?(Y(t,"width",e.width),n.style.width="100%",n.insertBefore(S(),w())):Y(n,"width",e.width),Y(n,"padding",e.padding),e.background&&(n.style.background=e.background),J(x()),Le(n,e)})(t),me(0,t),Te(0,t),i=e,n=t,o=he.innerParams.get(i),i=w(),o&&n.icon===o.icon?(Pe(i,n),Be(i,n)):n.icon||n.iconHtml?n.icon&&-1===Object.keys(g).indexOf(n.icon)?(r('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(n.icon,'"')),J(i)):(Z(i),Pe(i,n),Be(i,n),W(i,n.showClass.icon)):J(i),(e=>{const t=A();if(!e.imageUrl)return J(t);Z(t,""),t.setAttribute("src",e.imageUrl),t.setAttribute("alt",e.imageAlt),Y(t,"width",e.imageWidth),Y(t,"height",e.imageHeight),t.className=h.image,U(t,e,"image")})(t),(e=>{const t=C();$(t,e.title||e.titleText,"block"),e.title&&re(e.title,t),e.titleText&&(t.innerText=e.titleText),U(t,e,"title")})(t),(e=>{const t=D();V(t,e.closeButtonHtml),U(t,e,"closeButton"),$(t,e.showCloseButton),t.setAttribute("aria-label",e.closeButtonAriaLabel)})(t),Ae(e,t),de(0,t),i=t,e=O(),$(e,i.footer),i.footer&&re(i.footer,e),U(e,i,"footer"),"function"==typeof t.didRender&&t.didRender(v())};const je=()=>P()&&P().click();const De=e=>{let t=v();t||ln.fire(),t=v();var n=S();H()?J(w()):Ie(t,e),Z(n),t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()},Ie=(e,t)=>{var n=L();const o=S();!t&&G(P())&&(t=P()),Z(n),t&&(J(t),o.setAttribute("data-button-to-replace",t.className)),o.parentNode.insertBefore(o,t),W([e,n],h.loading)},Me={},He=o=>new Promise(e=>{if(!o)return e();var t=window.scrollX,n=window.scrollY;Me.restoreFocusTimeout=setTimeout(()=>{Me.previousActiveElement&&Me.previousActiveElement.focus?(Me.previousActiveElement.focus(),Me.previousActiveElement=null):document.body&&document.body.focus(),e()},100),window.scrollTo(t,n)});const qe=()=>{if(Me.timeout)return(()=>{const e=j();var t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";var n=parseInt(window.getComputedStyle(e).width),n=parseInt(t/n*100);e.style.removeProperty("transition"),e.style.width="".concat(n,"%")})(),Me.timeout.stop()},Ve=()=>{if(Me.timeout){var e=Me.timeout.start();return ne(e),e}};let Ne=!1;const Ue={};const Fe=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const o in Ue){var n=e.getAttribute(o);if(n)return void Ue[o].fire({template:n})}},Re={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"&times;",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose
74174:void 0,didDestroy:void 0,scrollbarPadding:!0},ze=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],We={},_e=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Ke=e=>Object.prototype.hasOwnProperty.call(Re,e);const Ye=e=>We[e],Ze=e=>{!e.backdrop&&e.allowOutsideClick&&s('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const o in e)n=o,Ke(n)||s('Unknown parameter "'.concat(n,'"')),e.toast&&(t=o,_e.includes(t)&&s('The parameter "'.concat(t,'" is incompatible with toasts'))),t=o,Ye(t)&&i(t,Ye(t));var t,n};var Je=Object.freeze({isValidParameter:Ke,isUpdatableParameter:e=>-1!==ze.indexOf(e),isDeprecatedParameter:Ye,argsToParams:n=>{const o={};return"object"!=typeof n[0]||m(n[0])?["title","html","icon"].forEach((e,t)=>{t=n[t];"string"==typeof t||m(t)?o[e]=t:void 0!==t&&r("Unexpected type of ".concat(e,'! Expected "string" or "Element", got ').concat(typeof t))}):Object.assign(o,n[0]),o},isVisible:()=>G(v()),clickConfirm:je,clickDeny:()=>E()&&E().click(),clickCancel:()=>T()&&T().click(),getContainer:b,getPopup:v,getTitle:C,getHtmlContainer:k,getImage:A,getIcon:w,getInputLabel:()=>y(h["input-label"]),getCloseButton:D,getActions:L,getConfirmButton:P,getDe
74174nyButton:E,getCancelButton:T,getLoader:S,getFooter:O,getTimerProgressBar:j,getFocusableElements:I,getValidationMessage:x,isLoading:()=>v().hasAttribute("data-loading"),fire:function(...e){return new this(...e)},mixin:function(n){class e extends this{_main(e,t){return super._main(e,Object.assign({},n,t))}}return e},showLoading:De,enableLoading:De,getTimerLeft:()=>Me.timeout&&Me.timeout.getTimerLeft(),stopTimer:qe,resumeTimer:Ve,toggleTimer:()=>{var e=Me.timeout;return e&&(e.running?qe:Ve)()},increaseTimer:e=>{if(Me.timeout){e=Me.timeout.increase(e);return ne(e,!0),e}},isTimerRunning:()=>Me.timeout&&Me.timeout.isRunning(),bindClickHandler:function(e="data-swal-template"){Ue[e]=this,Ne||(document.body.addEventListener("click",Fe),Ne=!0)}});function Xe(){var e=he.innerParams.get(this);if(e){const t=he.domCache.get(this);J(t.loader),H()?e.icon&&Z(w()):(e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));if(t.length)Z(t[0],"inline-block");else if(Q())J(e.actions)})(t),_([t.popup,t.actions],h.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}}const $e=()=>{null===q.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(q.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(q.previousBodyPadding+(()=>{const e=document.createElement("div");e.className=h["scrollbar-measure"],document.body.appendChild(e);var t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})(),"px"))},Ge=()=>{navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)||v().scrollHeight>window.innerHeight-44&&(b().style.paddingBottom="".concat(44,"px"))},Qe=()=>{const e=b();let t;e.ontouchstart=e=>{t=et(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},et=e=>{var t=e.target,n=b();return!tt(e)&&!nt(e)&&(t===n||!(ee(n)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||ee(k())&&k().contains(t)))},tt=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,nt=e=>e.touches&&1<e.touches.length,ot=()=>{const e=a(document.body.children);e.forEach(e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")})};var it={swalPromiseResolve:new WeakMap};function at(e,t,n,o){H()?ct(e,o):(He(n).then(()=>ct(e,o)),Me.keydownTarget.removeEventListener("keydown",Me.keydownHandler,{capture:Me.keydownListenerCapture}),Me.keydownHandlerAdded=!1),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),M()&&(null!==q.previousBodyPadding&&(document.body.style.paddingRight="".concat(q.previousBodyPadding,"px"),q.previousBodyPadding=null),N(document.body,h.iosfix)&&(t=parseInt(document.body.style.top,10),_(document.body,h.iosfix),document.body.style.top="",document.body.scrollTop=-1*t),ot()),_([document.documentElement,document.body],[h.shown,h["height-auto"],h["no-backdrop"],h["toast-shown"]])}function st(e){var t=v();if(t){e=void 0!==(o=e)?Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},o):{isConfirmed:!1,isDenied:!1,isDismissed:!0};var n=he.innerParams.get(this);if(n&&!N(t,n.hideClass.popup)){const i=it.swalPromiseResolve.get(this);_(t,n.showClass.popup),W(t,n.hideClass.popup);var o=b();_(o,n.showClass.backdrop),W(o,n.hideClass.backdrop),((e,t,n)=>{const o=b(),i=ue&&te(t);if(typeof n.willClose==="function")n.willClose(t);if(i)rt(e,t,o,n.returnFocus,n.didClose);else at(e,o,n.returnFocus,n.didClose)})(this,t,n),i(e)}}}const rt=(e,t,n,o,i)=>{Me.swalCloseEventFinishedCallback=at.bind(null,e,n,o,i),t.addEventListener(ue,function(e){e.target===t&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback)})},ct=(e,t)=>{setTimeout(()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy()})};function lt(e,t,n){const o=he.domCache.get(e);
74174t.forEach(e=>{o[e].disabled=n})}function ut(e,t){if(!e)return!1;if("radio"===e.type){const n=e.parentNode.parentNode,o=n.querySelectorAll("input");for(let e=0;e<o.length;e++)o[e].disabled=t}else e.disabled=t}class dt{constructor(e,t){this.callback=e,this.remaining=t,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date-this.started),this.remaining}increase(e){var t=this.running;return t&&this.stop(),this.remaining+=e,t&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}var pt={email:(e,t)=>/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),url:(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL")};function mt(e){var t,n;(t=e).inputValidator||Object.keys(pt).forEach(e=>{t.input===e&&(t.inputValidator=pt[e])}),e.showLoaderOnConfirm&&!e.preConfirm&&s("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),(n=e).target&&("string"!=typeof n.target||document.querySelector(n.target))&&("string"==typeof n.target||n.target.appendChild)||(s('Target parameter is not valid, defaulting to "body"'),n.target="body"),"string"==typeof e.title&&(e.title=e.title.split("\n").join("<br />")),se(e)}const ht=["swal-title","swal-html","swal-footer"],gt=e=>{e="string"==typeof e.template?document.querySelector(e.template):e.template;if(!e)return{};e=e.content;return kt(e),Object.assign(bt(e),ft(e),yt(e),vt(e),wt(e),Ct(e,ht))},bt=e=>{const o={};return a(e.querySelectorAll("swal-param")).forEach(e=>{At(e,["name","value"]);var t=e.getAttribute("name");let n=e.getAttribute("value");"boolean"==typeof Re[t]&&"false"===n&&(n=!1),"object"==typeof Re[t]&&(n=JSON.parse(n)),o[t]=n}),o},ft=e=>{const n={};return a(e.querySelectorAll("swal-button")).forEach(e=>{At(e,["type","color","aria-label"]);var t=e.getAttribute("type");n["".concat(t,"ButtonText")]=e.innerHTML,n["show".concat(o(t),"Button")]=!0,e.hasAttribute("color")&&(n["".concat(t,"ButtonColor")]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(n["".concat(t,"ButtonAriaLabel")]=e.getAttribute("aria-label"))}),n},yt=e=>{const t={},n=e.querySelector("swal-image");return n&&(At(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt"))),t},vt=e=>{const t={},n=e.querySelector("swal-icon");return n&&(At(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},wt=e=>{const n={},t=e.querySelector("swal-input");t&&(At(t,["type","label","placeholder","value"]),n.input=t.getAttribute("type")||"text",t.hasAttribute("label")&&(n.inputLabel=t.getAttribute("label")),t.hasAttribute("placeholder")&&(n.inputPlaceholder=t.getAttribute("placeholder")),t.hasAttribute("value")&&(n.inputValue=t.getAttribute("value")));e=e.querySelectorAll("swal-input-option");return e.length&&(n.inputOptions={},a(e).forEach(e=>{At(e,["value"]);var t=e.getAttribute("value"),e=e.innerHTML;n.inputOptions[t]=e})),n},Ct=(e,t)=>{const n={};for(const o in t){const i=t[o],a=e.querySelector(i);a&&(At(a,[]),n[i.replace(/^swal-/,"")]=a.innerHTML.trim())}return n},kt=e=>{const t=ht.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);a(e.children).forEach(e=>{e=e.tagName.toLowerCase();-1===t.indexOf(e)&&s("Unrecognized element <".concat(e,">"))})},At=(t,n)=>
74174{a(t.attributes).forEach(e=>{-1===n.indexOf(e.name)&&s(['Unrecognized attribute "'.concat(e.name,'" on <').concat(t.tagName.toLowerCase(),">."),"".concat(n.length?"Allowed attributes are: ".concat(n.join(", ")):"To set the value, use HTML within the element.")])})},Bt=e=>{const t=b(),n=v();"function"==typeof e.willOpen&&e.willOpen(n);var o=window.getComputedStyle(document.body).overflowY;St(t,n,e),setTimeout(()=>{Pt(t,n)},10),M()&&(Et(t,e.scrollbarPadding,o),(()=>{const e=a(document.body.children);e.forEach(e=>{e===b()||e.contains(b())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))})})()),H()||Me.previousActiveElement||(Me.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout(()=>e.didOpen(n)),_(t,h["no-transition"])},xt=e=>{const t=v();if(e.target===t){const n=b();t.removeEventListener(ue,xt),n.style.overflowY="auto"}},Pt=(e,t)=>{ue&&te(t)?(e.style.overflowY="hidden",t.addEventListener(ue,xt)):e.style.overflowY="auto"},Et=(e,t,n)=>{var o;(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&1<navigator.maxTouchPoints)&&!N(document.body,h.iosfix)&&(o=document.body.scrollTop,document.body.style.top="".concat(-1*o,"px"),W(document.body,h.iosfix),Qe(),Ge()),t&&"hidden"!==n&&$e(),setTimeout(()=>{e.scrollTop=0})}
74174,St=(e,t,n)=>{W(e,n.showClass.backdrop),t.style.setProperty("opacity","0","important"),Z(t,"grid"),setTimeout(()=>{W(t,n.showClass.popup),t.style.removeProperty("opacity")},10),W([document.documentElement,document.body],h.shown),n.heightAuto&&n.backdrop&&!n.toast&&W([document.documentElement,document.body],h["height-auto"])},Tt=e=>e.checked?1:0,Lt=e=>e.checked?e.value:null,Ot=e=>e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,jt=(t,n)=>{const o=v(),i=e=>It[n.input](o,Mt(e),n);u(n.inputOptions)||p(n.inputOptions)?(De(P()),d(n.inputOptions).then(e=>{t.hideLoading(),i(e)})):"object"==typeof n.inputOptions?i(n.inputOptions):r("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof n.inputOptions))},Dt=(t,n)=>{const o=t.getInput();J(o),d(n.inputValue).then(e=>{o.value="number"===n.input?parseFloat(e)||0:"".concat(e),Z(o),o.focus(),t.hideLoading()}).catch(e=>{r("Error in inputValue promise: ".concat(e)),o.value="",Z(o),o.focus(),t.hideLoading()})},It={select:(e,t,i)=>{const a=K(e,h.select),s=(e,t,n)=>{const o=document.createElement("option");o.value=n,V(o,t),o.selected=Ht(n,i.inputValue),e.appendChild(o)};t.forEach(e=>{var t=e[0];const n=e[1];if(Array.isArray(n)){const o=document.createElement("optgroup");o.label=t,o.disabled=!1,a.appendChild(o),n.forEach(e=>s(o,e[1],e[0]))}else s(a,n,t)}),a.focus()},radio:(e,t,a)=>{const s=K(e,h.radio);t.forEach(e=>{var t=e[0],e=e[1];const n=document.createElement("input"),o=document.createElement("label");n.type="radio",n.name=h.radio,n.value=t,Ht(t,a.inputValue)&&(n.checked=!0);const i=document.createElement("span");V(i,e),i.className=h.label,o.appendChild(n),o.appendChild(i),s.appendChild(o)});const n=s.querySelectorAll("input");n.length&&n[0].focus()}},Mt=n=>{const o=[];return"undefined"!=typeof Map&&n instanceof Map?n.forEach((e,t)=>{let n=e;"object"==typeof n&&(n=Mt(n)),o.push([t,n])}):Object.keys(n).forEach(e=>{let t=n[e];"object"==typeof t&&(t=Mt(t)),o.push([e,t])}),o},Ht=(e,t)=>t&&t.toString()===e.toString(),qt=(e,t)=>{var n=he.innerParams.get(e),o=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return Tt(n);case"radio":return Lt(n);case"file":return Ot(n);default:return t.inputAutoTrim?n.value.trim():n.value}})(e,n);n.inputValidator?Vt(e,o,t):e.getInput().checkValidity()?("deny"===t?Nt:Ft)(e,o):(e.enableButtons(),e.showValidationMessage(n.validationMessage))},Vt=(t,n,o)=>{const e=he.innerParams.get(t);t.disableInput();const i=Promise.resolve().then(()=>d(e.inputValidator(n,e.validationMessage)));i.then(e=>{t.enableButtons(),t.enableInput(),e?t.showValidationMessage(e):("deny"===o?Nt:Ft)(t,n)})},Nt=(t,n)=>{const e=he.innerParams.get(t||void 0);if(e.showLoaderOnDeny&&De(E()),e.preDeny){const o=Promise.resolve().then(()=>d(e.preDeny(n,e.validationMessage)));o.then(e=>{!1===e?t.hideLoading():t.closePopup({isDenied:!0,value:void 0===e?n:e})})}else t.closePopup({isDenied:!0,value:n})},Ut=(e,t)=>{e.closePopup({isConfirmed:!0,value:t})},Ft=(t,n)=>{const e=he.innerParams.get(t||void 0);if(e.showLoaderOnConfirm&&De(),e.preConfirm){t.resetValidationMessage();const o=Promise.resolve().then(()=>d(e.preConfirm(n,e.validationMessage)));o.then(e=>{G(x())||!1===e?t.hideLoading():Ut(t,void 0===e?n:e)})}else Ut(t,n)},Rt=(e,t,n)=>{const o=I();if(o.length)return(t+=n)===o.length?t=0:-1===t&&(t=o.length-1),o[t].focus();v().focus()},zt=["ArrowRight","ArrowDown"],Wt=["ArrowLeft","ArrowUp"],_t=(e,t,n)=>{var o=he.innerParams.get(e);o&&(o.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Kt(e,t,o):"Tab"===t.key?Yt(t,o):[...zt,...Wt].includes(t.key)?Zt(t.key):"Escape"===t.key&&Jt(t,o,n))},Kt=(e,t,n)=>{t.isComposing||t.target&&e.getInput()&&t.target.outerHTML===e.getInput().outerHTML&&(["textarea","file"].includes(n.input)||(je(),t.preventDefault()))},Yt=(e,t)=>{var n=e.target,o=I();let i=-1;for(let e=0;e<o.length;e++)if(n===o[e]){i=e;break}e.shiftKey?Rt(0,i,-1):Rt(0,i,1),e.stopPropagation(),e.preventDefault()},Zt=e=>{const t=P(),n=E(),o=T();if([t,n,o].includes(document.activeElement)){e=zt.includes(e)?"nextElementSibling":"previousElementSibling";const i=document.activeElement[e];i&&i.focus()}},Jt=(e,t,n)=>{c(t.allowEscapeKey)&&(e.preventDefault(),n(l.esc))},Xt=(t,e,n)=>{e.popup.onclick=()=>{var e=he.innerParams.get(t);e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton||e.timer||e.input||n(l.close)}};let $t=!1;const Gt=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&($t=!0)}}},Qt=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,e.target!==t.popup&&!t.popup.contains(e.target)||($t=!0)}}},en=(n,o,i)=>{o.container.onclick=e=>{var t=he.innerParams.get(n);$t?$t=!1:e.target===o.container&&c(t.allowOutsideClick)&&i(l.backdrop)}};const tn=(e,t,n)=>{var o=j();J(o),t.timer&&(e.timeout=new dt(()=>{n("timer"),delete e.timeout},t.timer),t.timerProgressBar&&(Z(o),setTimeout(()=>{e.timeout&&e.timeout.running&&ne(t.timer)})))},nn=(e,t)=>{if(!t.toast)return c(t.allowEnterKey)?void(on(e,t)||Rt(0,-1,1)):an()},on=(e,t)=>t.focusDeny&&G(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&G(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!G(e.confirmButton))&&(e.confirmButton.focus(),!0),an=()=>{document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};const sn=e=>{for(const t in e)e[t]=new WeakMap};
74174e=Object.freeze({hideLoading:Xe,disableLoading:Xe,getInput:function(e){var t=he.innerParams.get(e||this);return(e=he.domCache.get(e||this))?F(e.popup,t.input):null},close:st,closePopup:st,closeModal:st,closeToast:st,enableButtons:function(){lt(this,["confirmButton","denyButton","cancelButton"],!1)},disableButtons:function(){lt(this,["confirmButton","denyButton","cancelButton"],!0)},enableInput:function(){return ut(this.getInput(),!1)},disableInput:function(){return ut(this.getInput(),!0)},showValidationMessage:function(e){const t=he.domCache.get(this);var n=he.innerParams.get(this);V(t.validationMessage,e),t.validationMessage.className=h["validation-message"],n.customClass&&n.customClass.validationMessage&&W(t.validationMessage,n.customClass.validationMessage),Z(t.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedby",h["validation-message"]),R(o),W(o,h.inputerror))},resetValidationMessage:function(){var e=he.domCache.get(this);e.validationMessage&&J(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),_(t,h.inputerror))},getProgressSteps:function(){return he.domCache.get(this).progressSteps},_main:function(e,t={}){Ze(Object.assign({},t,e)),Me.currentInstance&&(Me.currentInstance._destroy(),M()&&ot()),Me.currentInstance=this,mt(e=((e,t)=>{const n=gt(e),o=Object.assign({},Re,t,n,e);return o.showClass=Object.assign({},Re.showClass,o.showClass),o.hideClass=Object.assign({},Re.hideClass,o.hideClass),o})(e,t)),Object.freeze(e),Me.timeout&&(Me.timeout.stop(),delete Me.timeout),clearTimeout(Me.restoreFocusTimeout);var s,r,c,t=(e=>{const t={popup:v(),container:b(),actions:L(),confirmButton:P(),denyButton:E(),cancelButton:T(),loader:S(),closeButton:D(),validationMessage:x(),progressSteps:B()};return he.domCache.set(e,t),t})(this);return Oe(this,e),he.innerParams.set(this,e),s=this,r=t,c=e,new Promise(e=>{const t=e=>{s.closePopup({isDismissed:!0,dismiss:e})};var n,o,i,a;it.swalPromiseResolve.set(s,e),r.confirmButton.onclick=()=>(e=>{var t=he.innerParams.get(e);e.disableButtons(),t.input?qt(e,"confirm"):Ft(e,!0)})(s),r.denyButton.onclick=()=>(e=>{var t=he.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?qt(e,"deny"):Nt(e,!1)})(s),r.cancelButton.onclick=()=>((e,t)=>{e.disableButtons(),t(l.cancel)})(s,t),r.closeButton.onclick=()=>t(l.close),n=s,a=r,e=t,he.innerParams.get(n).toast?Xt(n,a,e):(Gt(a),Qt(a),en(n,a,e)),o=s,a=Me,e=c,i=t,a.keydownTarget&&a.keydownHandlerAdded&&(a.keydownTarget.removeEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!1),e.toast||(a.keydownHandler=e=>_t(o,e,i),a.keydownTarget=e.keydownListenerCapture?window:v(),a.keydownListenerCapture=e.keydownListenerCapture,a.keydownTarget.addEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!0),e=s,"select"===(a=c).input||"radio"===a.input?jt(e,a):["text","email","number","tel","textarea"].includes(a.input)&&(u(a.inputValue)||p(a.inputValue))&&(De(P()),Dt(e,a)),Bt(c),tn(Me,c,t),nn(r,c),setTimeout(()=>{r.container.scrollTop=0})})},update:function(t){var e=v(),n=he.innerParams.get(this);if(!e||N(e,n.hideClass.popup))return s("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.");const o={};Object.keys(t).forEach(e=>{ln.isUpdatableParameter(e)?o[e]=t[e]:s('Invalid parameter to update: "'.concat(e,'". 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'))}),n=Object.assign({},n,o),Oe(this,n),he.innerParams.set(this,n),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})},_destroy:function(){var e=he.domCache.get(this);const t=he.innerParams.get(this);t&&(e.popup&&Me.swalCloseEventFinishedCallback&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback),Me.deferDisposalTimer&&(clearTimeout(
74174Me.deferDisposalTimer),delete Me.deferDisposalTimer),"function"==typeof t.didDestroy&&t.didDestroy(),delete this.params,delete Me.keydownHandler,delete Me.keydownTarget,sn(he),sn(it),delete Me.currentInstance)}});let rn;class cn{constructor(...e){"undefined"!=typeof window&&(rn=this,e=Object.freeze(this.constructor.argsToParams(e)),Object.defineProperties(this,{params:{value:e,writable:!1,enumerable:!0,configurable:!0}}),e=this._main(this.params),he.promise.set(this,e))}then(e){const t=he.promise.get(this);return t.then(e)}finally(e){const t=he.promise.get(this);return t.finally(e)}}Object.assign(cn.prototype,e),Object.assign(cn,Je),Object.keys(e).forEach(t=>{cn[t]=function(...e){if(rn)return rn[t](...e)}}),cn.DismissReason=l,cn.version="11.1.5";const ln=cn;return ln.default=ln,ln}),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2);
74175"use strict";
74176
74177//
74178// SweetAlert2 Initialization
74179//
74180
74181// Set Defaults
74182swal.mixin({
74183	width: 400,
74184	heightAuto: false,
74185	padding: '2.5rem',
74186	buttonsStyling: false,
74187	confirmButtonClass: 'btn btn-success',
74188	confirmButtonColor: null,
74189	cancelButtonClass: 'btn btn-secondary',
74190	cancelButtonColor: null
74191});

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.