PageSourceSearch

https://www.zeta-producer.com/assets/bundle.js?v=639258325182615459

js zeta-producer.com collected 2026-09-24 22:34:47 UTC 688,737 bytes, 19,574 lines download raw bytes

vendor: 10,355 bytes, lines 1-397
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";
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;
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;
vendor: 5,310 bytes, lines 398-620
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)
vendor: 4,122 bytes, lines 621-745
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
vendor: 4,517 bytes, lines 881-1050
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
vendor: 4,218 bytes, lines 1198-1335
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
vendor: 4,713 bytes, lines 1336-1458
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;
vendor: 21,038 bytes, lines 1634-2385
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};
vendor: 6,098 bytes, lines 2386-2611
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 ],
vendor: 6,762 bytes, lines 2612-2828
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};
vendor: 8,643 bytes, lines 2829-3145
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
vendor: 32,112 bytes, lines 3146-4367
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
vendor: 4,195 bytes, lines 4368-4526
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
vendor: 21,011 bytes, lines 4527-5319
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
vendor: 4,336 bytes, lines 5320-5458
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
vendor: 4,157 bytes, lines 5459-5598
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
vendor: 12,992 bytes, lines 5727-6212
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
vendor: 4,139 bytes, lines 6213-6377
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 = [],
vendor: 29,564 bytes, lines 6378-7394
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
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
vendor: 4,381 bytes, lines 7395-7554
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
vendor: 17,315 bytes, lines 7555-8252
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/
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
vendor: 9,931 bytes, lines 8253-8656
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		}
vendor: 14,184 bytes, lines 8657-9158
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
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
vendor: 9,519 bytes, lines 9159-9534
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
vendor: 38,110 bytes, lines 9535-10910
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 Make sure Zeta Producer uses an own Alias for jQuery, which still points to  
10885 the correct version after a user loads in an additional jQuery version 
10886*/
10887var $z = jQuery;
10888
10889/*!
10890 * jQuery Browser Plugin 0.1.0
10891 * https://github.com/gabceb/jquery-browser-plugin
10892 *
10893 * Original jquery-browser code Copyright 2005, 2015 jQuery Foundation, Inc. and other contributors
10894 * http://jquery.org/license
10895 *
10896 * Modifications Copyright 2015 Gabriel Cebrian
10897 * https://github.com/gabceb
10898 *
10899 * Released under the MIT license
10900 *
10901 * Date: 05-07-2015
10902 */
10903/*global window: false */
10904
10905(function (factory) {
10906  if (typeof define === 'function' && define.amd) {
10907    // AMD. Register as an anonymous module.
10908    define(['jquery'], function ($) {
10909      return factory($);
10910    });
10911  } else if (typeof module === 'object' && typeof module.exports === 'object') {
10912    // Node-like environment
10913    module.exports = factory(require('jquery'));
10914  } else {
10915    // Browser globals
10916    factory(window.jQuery);
10917  }
10918}(function(jQuery) {
10919  "use strict";
10920
10921  function uaMatch( ua ) {
10922    // If an UA is not provided, default to the current browser UA.
10923    if ( ua === undefined ) {
10924      ua = window.navigator.userAgent;
10925    }
10926    ua = ua.toLowerCase();
10927
10928    var match = /(edge)\/([\w.]+)/.exec( ua ) ||
10929        /(opr)[\/]([\w.]+)/.exec( ua ) ||
10930        /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
10931        /(iemobile)[\/]([\w.]+)/.exec( ua ) ||
10932        /(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec( ua ) ||
10933        /(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec( ua ) ||
10934        /(webkit)[ \/]([\w.]+)/.exec( ua ) ||
10935        /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) ||
10936        /(msie) ([\w.]+)/.exec( ua ) ||
10937        ua.indexOf("trident") >= 0 && /(rv)(?::| )([\w.]+)/.exec( ua ) ||
10938        ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) ||
10939        [];
10940
10941    var platform_match = /(ipad)/.exec( ua ) ||
10942        /(ipod)/.exec( ua ) ||
10943        /(windows phone)/.exec( ua ) ||
10944        /(iphone)/.exec( ua ) ||
10945        /(kindle)/.exec( ua ) ||
10946        /(silk)/.exec( ua ) ||
10947        /(android)/.exec( ua ) ||
10948        /(win)/.exec( ua ) ||
10949        /(mac)/.exec( ua ) ||
10950        /(linux)/.exec( ua ) ||
10951        /(cros)/.exec( ua ) ||
10952        /(playbook)/.exec( ua ) ||
10953        /(bb)/.exec( ua ) ||
10954        /(blackberry)/.exec( ua ) ||
10955        [];
10956
10957    var browser = {},
10958        matched = {
10959          browser: match[ 5 ] || match[ 3 ] || match[ 1 ] || "",
10960          version: match[ 2 ] || match[ 4 ] || "0",
10961          versionNumber: match[ 4 ] || match[ 2 ] || "0",
10962          platform: platform_match[ 0 ] || ""
10963        };
10964
10965    if ( matched.browser ) {
10966      browser[ matched.browser ] = true;
10967      browser.version = matched.version;
10968      browser.versionNumber = parseInt(matched.versionNumber, 10);
10969    }
10970
10971    if ( matched.platform ) {
10972      browser[ matched.platform ] = true;
10973    }
10974
10975    // These are all considered mobile platforms, meaning they run a mobile browser
10976    if ( browser.android || browser.bb || browser.blackberry || browser.ipad || browser.iphone ||
10977      browser.ipod || browser.kindle || browser.playbook || browser.silk || browser[ "windows phone" ]) {
10978      browser.mobile = true;
10979    }
10980
10981    // These are all considered desktop platforms, meaning they run a desktop browser
10982    if ( browser.cros || browser.mac || browser.linux || browser.win ) {
10983      browser.desktop = true;
10984    }
10985
10986    // Chrome, Opera 15+ and Safari are webkit based browsers
10987    if ( browser.chrome || browser.opr || browser.safari ) {
10988      browser.webkit = true;
10989    }
10990
10991    // IE11 has a new token so we will assign it msie to avoid breaking changes
10992    if ( browser.rv || browser.iemobile) {
10993      var ie = "msie";
10994
10995      matched.browser = ie;
10996      browser[ie] = true;
10997    }
10998
10999    // Edge is officially known as Microsoft Edge, so rewrite the key to match
11000    if ( browser.edge ) {
11001      delete browser.edge;
11002      var msedge = "msedge";
11003
11004      matched.browser = msedge;
11005      browser[msedge] = true;
11006    }
11007
11008    // Blackberry browsers are marked as Safari on BlackBerry
11009    if ( browser.safari && browser.blackberry ) {
11010      var blackberry = "blackberry";
11011
11012      matched.browser = blackberry;
11013      browser[blackberry] = true;
11014    }
11015
11016    // Playbook browsers are marked as Safari on Playbook
11017    if ( browser.safari && browser.playbook ) {
11018      var playbook = "playbook";
11019
11020      matched.browser = playbook;
11021      browser[playbook] = true;
11022    }
11023
11024    // BB10 is a newer OS version of BlackBerry
11025    if ( browser.bb ) {
11026      var bb = "blackberry";
11027
11028      matched.browser = bb;
11029      browser[bb] = true;
11030    }
11031
11032    // Opera 15+ are identified as opr
11033    if ( browser.opr ) {
11034      var opera = "opera";
11035
11036      matched.browser = opera;
11037      browser[opera] = true;
11038    }
11039
11040    // Stock Android browsers are marked as Safari on Android.
11041    if ( browser.safari && browser.android ) {
11042      var android = "android";
11043
11044      matched.browser = android;
11045      browser[android] = true;
11046    }
11047
11048    // Kindle browsers are marked as Safari on Kindle
11049    if ( browser.safari && browser.kindle ) {
11050      var kindle = "kindle";
11051
11052      matched.browser = kindle;
11053      browser[kindle] = true;
11054    }
11055
11056     // Kindle Silk browsers are marked as Safari on Kindle
11057    if ( browser.safari && browser.silk ) {
11058      var silk = "silk";
11059
11060      matched.browser = silk;
11061      browser[silk] = true;
11062    }
11063
11064    // Assign the name and platform variable
11065    browser.name = matched.browser;
11066    browser.platform = matched.platform;
11067    return browser;
11068  }
11069
11070  // Run the matching process, also assign the function to the returned object
11071  // for manual, jQuery-free use if desired
11072  window.jQBrowser = uaMatch( window.navigator.userAgent );
11073  window.jQBrowser.uaMatch = uaMatch;
11074
11075 // Only assign to jQuery.browser if jQuery is loaded
11076  if ( typeof $z !== 'undefined' ) {
11077	$z.browser = window.jQBrowser;
11078  }
11079  else if ( typeof jQuery !== 'undefined' ){
11080	jQuery.browser = window.jQBrowser;
11081  }
11082  
11083  return window.jQBrowser;
11084}));
11085/*!
11086 * jQuery Migrate - v3.3.2 - 2020-11-17T23:22Z
11087 * Copyright OpenJS Foundation and other contributors
11088 */
11089( function( factory ) {
11090	"use strict";
11091
11092	if ( typeof define === "function" && define.amd ) {
11093
11094		// AMD. Register as an anonymous module.
11095		define( [ "jquery" ], function( jQuery ) {
11096			return factory( jQuery, window );
11097		} );
11098	} else if ( typeof module === "object" && module.exports ) {
11099
11100		// Node/CommonJS
11101		// eslint-disable-next-line no-undef
11102		module.exports = factory( require( "jquery" ), window );
11103	} else {
11104
11105		// Browser globals
11106		factory( jQuery, window );
11107	}
11108} )( function( jQuery, window ) {
11109"use strict";
11110
11111jQuery.migrateVersion = "3.3.2";
11112
11113// Returns 0 if v1 == v2, -1 if v1 < v2, 1 if v1 > v2
11114function compareVersions( v1, v2 ) {
11115	var i,
11116		rVersionParts = /^(\d+)\.(\d+)\.(\d+)/,
11117		v1p = rVersionParts.exec( v1 ) || [ ],
11118		v2p = rVersionParts.exec( v2 ) || [ ];
11119
11120	for ( i = 1; i <= 3; i++ ) {
11121		if ( +v1p[ i ] > +v2p[ i ] ) {
11122			return 1;
11123		}
11124		if ( +v1p[ i ] < +v2p[ i ] ) {
11125			return -1;
11126		}
11127	}
11128	return 0;
11129}
11130
11131function jQueryVersionSince( version ) {
11132	return compareVersions( jQuery.fn.jquery, version ) >= 0;
11133}
11134
11135( function() {
11136
11137	// Support: IE9 only
11138	// IE9 only creates console object when dev tools are first opened
11139	// IE9 console is a host object, callable but doesn't have .apply()
11140	if ( !window.console || !window.console.log ) {
11141		return;
11142	}
11143
11144	// Need jQuery 3.0.0+ and no older Migrate loaded
11145	if ( !jQuery || !jQueryVersionSince( "3.0.0" ) ) {
11146		window.console.log( "JQMIGRATE: jQuery 3.0.0+ REQUIRED" );
11147	}
11148	if ( jQuery.migrateWarnings ) {
11149		window.console.log( "JQMIGRATE: Migrate plugin loaded multiple times" );
11150	}
11151
11152	// Show a message on the console so devs know we're active
11153	window.console.log( "JQMIGRATE: Migrate is installed" +
11154		( jQuery.migrateMute ? "" : " with logging active" ) +
11155		", version " + jQuery.migrateVersion );
11156
11157} )();
11158
11159var warnedAbout = {};
11160
11161// By default each warning is only reported once.
11162jQuery.migrateDeduplicateWarnings = true;
11163
11164// List of warnings already given; public read only
11165jQuery.migrateWarnings = [];
11166
11167// Set to false to disable traces that appear with warnings
11168if ( jQuery.migrateTrace === undefined ) {
11169	jQuery.migrateTrace = true;
11170}
11171
11172// Forget any warnings we've already given; public
11173jQuery.migrateReset = function() {
11174	warnedAbout = {};
11175	jQuery.migrateWarnings.length = 0;
11176};
11177
11178function migrateWarn( msg ) {
11179	var console = window.console;
11180	if ( !jQuery.migrateDeduplicateWarnings || !warnedAbout[ msg ] ) {
11181		warnedAbout[ msg ] = true;
11182		jQuery.migrateWarnings.push( msg );
11183		if ( console && console.warn && !jQuery.migrateMute ) {
11184			console.warn( "JQMIGRATE: " + msg );
11185			if ( jQuery.migrateTrace && console.trace ) {
11186				console.trace();
11187			}
11188		}
11189	}
11190}
11191
11192function migrateWarnProp( obj, prop, value, msg ) {
11193	Object.defineProperty( obj, prop, {
11194		configurable: true,
11195		enumerable: true,
11196		get: function() {
11197			migrateWarn( msg );
11198			return value;
11199		},
11200		set: function( newValue ) {
11201			migrateWarn( msg );
11202			value = newValue;
11203		}
11204	} );
11205}
11206
11207function migrateWarnFunc( obj, prop, newFunc, msg ) {
11208	obj[ prop ] = function() {
11209		migrateWarn( msg );
11210		return newFunc.apply( this, arguments );
11211	};
11212}
11213
11214if ( window.document.compatMode === "BackCompat" ) {
11215
11216	// JQuery has never supported or tested Quirks Mode
11217	migrateWarn( "jQuery is not compatible with Quirks Mode" );
11218}
11219
11220var findProp,
11221	class2type = {},
11222	oldInit = jQuery.fn.init,
11223	oldFind = jQuery.find,
11224
11225	rattrHashTest = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,
11226	rattrHashGlob = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,
11227
11228	// Support: Android <=4.0 only
11229	// Make sure we trim BOM and NBSP
11230	rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
11231
11232jQuery.fn.init = function( arg1 ) {
11233	var args = Array.prototype.slice.call( arguments );
11234
11235	if ( typeof arg1 === "string" && arg1 === "#" ) {
11236
11237		// JQuery( "#" ) is a bogus ID selector, but it returned an empty set before jQuery 3.0
11238		migrateWarn( "jQuery( '#' ) is not a valid selector" );
11239		args[ 0 ] = [];
11240	}
11241
11242	return oldInit.apply( this, args );
11243};
11244jQuery.fn.init.prototype = jQuery.fn;
11245
11246jQuery.find = function( selector ) {
11247	var args = Array.prototype.slice.call( arguments );
11248
11249	// Support: PhantomJS 1.x
11250	// String#match fails to match when used with a //g RegExp, only on some strings
11251	if ( typeof selector === "string" && rattrHashTest.test( selector ) ) {
11252
11253		// The nonstandard and undocumented unquoted-hash was removed in jQuery 1.12.0
11254		// First see if qS thinks it's a valid selector, if so avoid a false positive
11255		try {
11256			window.document.querySelector( selector );
11257		} catch ( err1 ) {
11258
11259			// Didn't *look* valid to qSA, warn and try quoting what we think is the value
11260			selector = selector.replace( rattrHashGlob, function( _, attr, op, value ) {
11261				return "[" + attr + op + "\"" + value + "\"]";
11262			} );
11263
11264			// If the regexp *may* have created an invalid selector, don't update it
11265			// Note that there may be false alarms if selector uses jQuery extensions
11266			try {
11267				window.document.querySelector( selector );
11268				migrateWarn( "Attribute selector with '#' must be quoted: " + args[ 0 ] );
11269				args[ 0 ] = selector;
11270			} catch ( err2 ) {
11271				migrateWarn( "Attribute selector with '#' was not fixed: " + args[ 0 ] );
11272			}
11273		}
11274	}
11275
11276	return oldFind.apply( this, args );
11277};
11278
11279// Copy properties attached to original jQuery.find method (e.g. .attr, .isXML)
11280for ( findProp in oldFind ) {
11281	if ( Object.prototype.hasOwnProperty.call( oldFind, findProp ) ) {
11282		jQuery.find[ findProp ] = oldFind[ findProp ];
11283	}
11284}
11285
11286// The number of elements contained in the matched element set
11287migrateWarnFunc( jQuery.fn, "size", function() {
11288	return this.length;
11289},
11290"jQuery.fn.size() is deprecated and removed; use the .length property" );
11291
11292migrateWarnFunc( jQuery, "parseJSON", function() {
11293	return JSON.parse.apply( null, arguments );
11294},
11295"jQuery.parseJSON is deprecated; use JSON.parse" );
11296
11297migrateWarnFunc( jQuery, "holdReady", jQuery.holdReady,
11298	"jQuery.holdReady is deprecated" );
11299
11300migrateWarnFunc( jQuery, "unique", jQuery.uniqueSort,
11301	"jQuery.unique is deprecated; use jQuery.uniqueSort" );
11302
11303// Now jQuery.expr.pseudos is the standard incantation
11304migrateWarnProp( jQuery.expr, "filters", jQuery.expr.pseudos,
11305	"jQuery.expr.filters is deprecated; use jQuery.expr.pseudos" );
11306migrateWarnProp( jQuery.expr, ":", jQuery.expr.pseudos,
11307	"jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos" );
11308
11309// Prior to jQuery 3.1.1 there were internal refs so we don't warn there
11310if ( jQueryVersionSince( "3.1.1" ) ) {
11311	migrateWarnFunc( jQuery, "trim", function( text ) {
11312		return text == null ?
11313			"" :
11314			( text + "" ).replace( rtrim, "" );
11315	},
11316	"jQuery.trim is deprecated; use String.prototype.trim" );
11317}
11318
11319// Prior to jQuery 3.2 there were internal refs so we don't warn there
11320if ( jQueryVersionSince( "3.2.0" ) ) {
11321	migrateWarnFunc( jQuery, "nodeName", function( elem, name ) {
11322		return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
11323	},
11324	"jQuery.nodeName is deprecated" );
11325
11326	migrateWarnFunc( jQuery, "isArray", Array.isArray,
11327		"jQuery.isArray is deprecated; use Array.isArray"
11328	);
11329}
11330
11331if ( jQueryVersionSince( "3.3.0" ) ) {
11332
11333	migrateWarnFunc( jQuery, "isNumeric", function( obj ) {
11334
11335			// As of jQuery 3.0, isNumeric is limited to
11336			// strings and numbers (primitives or objects)
11337			// that can be coerced to finite numbers (gh-2662)
11338			var type = typeof obj;
11339			return ( type === "number" || type === "string" ) &&
11340
11341				// parseFloat NaNs numeric-cast false positives ("")
11342				// ...but misinterprets leading-number strings, e.g. hex literals ("0x...")
11343				// subtraction forces infinities to NaN
11344				!isNaN( obj - parseFloat( obj ) );
11345		},
11346		"jQuery.isNumeric() is deprecated"
11347	);
11348
11349	// Populate the class2type map
11350	jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".
11351		split( " " ),
11352	function( _, name ) {
11353		class2type[ "[object " + name + "]" ] = name.toLowerCase();
11354	} );
11355
11356	migrateWarnFunc( jQuery, "type", function( obj ) {
11357		if ( obj == null ) {
11358			return obj + "";
11359		}
11360
11361		// Support: Android <=2.3 only (functionish RegExp)
11362		return typeof obj === "object" || typeof obj === "function" ?
11363			class2type[ Object.prototype.toString.call( obj ) ] || "object" :
11364			typeof obj;
11365	},
11366	"jQuery.type is deprecated" );
11367
11368	migrateWarnFunc( jQuery, "isFunction",
11369		function( obj ) {
11370			return typeof obj === "function";
11371		},
11372		"jQuery.isFunction() is deprecated" );
11373
11374	migrateWarnFunc( jQuery, "isWindow",
11375		function( obj ) {
11376			return obj != null && obj === obj.window;
11377		},
11378		"jQuery.isWindow() is deprecated"
11379	);
11380}
11381
11382// Support jQuery slim which excludes the ajax module
11383if ( jQuery.ajax ) {
11384
11385var oldAjax = jQuery.ajax,
11386	rjsonp = /(=)\?(?=&|$)|\?\?/;
11387
11388jQuery.ajax = function( ) {
11389	var jQXHR = oldAjax.apply( this, arguments );
11390
11391	// Be sure we got a jQXHR (e.g., not sync)
11392	if ( jQXHR.promise ) {
11393		migrateWarnFunc( jQXHR, "success", jQXHR.done,
11394			"jQXHR.success is deprecated and removed" );
11395		migrateWarnFunc( jQXHR, "error", jQXHR.fail,
11396			"jQXHR.error is deprecated and removed" );
11397		migrateWarnFunc( jQXHR, "complete", jQXHR.always,
11398			"jQXHR.complete is deprecated and removed" );
11399	}
11400
11401	return jQXHR;
11402};
11403
11404// Only trigger the logic in jQuery <4 as the JSON-to-JSONP auto-promotion
11405// behavior is gone in jQuery 4.0 and as it has security implications, we don't
11406// want to restore the legacy behavior.
11407if ( !jQueryVersionSince( "4.0.0" ) ) {
11408
11409	// Register this prefilter before the jQuery one. Otherwise, a promoted
11410	// request is transformed into one with the script dataType and we can't
11411	// catch it anymore.
11412	jQuery.ajaxPrefilter( "+json", function( s ) {
11413
11414		// Warn if JSON-to-JSONP auto-promotion happens.
11415		if ( s.jsonp !== false && ( rjsonp.test( s.url ) ||
11416				typeof s.data === "string" &&
11417				( s.contentType || "" )
11418					.indexOf( "application/x-www-form-urlencoded" ) === 0 &&
11419				rjsonp.test( s.data )
11420		) ) {
11421			migrateWarn( "JSON-to-JSONP auto-promotion is deprecated" );
11422		}
11423	} );
11424}
11425
11426}
11427
11428var oldRemoveAttr = jQuery.fn.removeAttr,
11429	oldToggleClass = jQuery.fn.toggleClass,
11430	rmatchNonSpace = /\S+/g;
11431
11432jQuery.fn.removeAttr = function( name ) {
11433	var self = this;
11434
11435	jQuery.each( name.match( rmatchNonSpace ), function( _i, attr ) {
11436		if ( jQuery.expr.match.bool.test( attr ) ) {
11437			migrateWarn( "jQuery.fn.removeAttr no longer sets boolean properties: " + attr );
11438			self.prop( attr, false );
11439		}
11440	} );
11441
11442	return oldRemoveAttr.apply( this, arguments );
11443};
11444
11445jQuery.fn.toggleClass = function( state ) {
11446
11447	// Only deprecating no-args or single boolean arg
11448	if ( state !== undefined && typeof state !== "boolean" ) {
11449		return oldToggleClass.apply( this, arguments );
11450	}
11451
11452	migrateWarn( "jQuery.fn.toggleClass( boolean ) is deprecated" );
11453
11454	// Toggle entire class name of each element
11455	return this.each( function() {
11456		var className = this.getAttribute && this.getAttribute( "class" ) || "";
11457
11458		if ( className ) {
11459			jQuery.data( this, "__className__", className );
11460		}
11461
11462		// If the element has a class name or if we're passed `false`,
11463		// then remove the whole classname (if there was one, the above saved it).
11464		// Otherwise bring back whatever was previously saved (if anything),
11465		// falling back to the empty string if nothing was stored.
11466		if ( this.setAttribute ) {
11467			this.setAttribute( "class",
11468				className || state === false ?
11469				"" :
11470				jQuery.data( this, "__className__" ) || ""
11471			);
11472		}
11473	} );
11474};
11475
11476function camelCase( string ) {
11477	return string.replace( /-([a-z])/g, function( _, letter ) {
11478		return letter.toUpperCase();
11479	} );
11480}
11481
11482var oldFnCss,
11483	internalSwapCall = false,
11484	ralphaStart = /^[a-z]/,
11485
11486	// The regex visualized:
11487	//
11488	//                         /----------\
11489	//                        |            |    /-------\
11490	//                        |  / Top  \  |   |         |
11491	//         /--- Border ---+-| Right  |-+---+- Width -+---\
11492	//        |                 | Bottom |                    |
11493	//        |                  \ Left /                     |
11494	//        |                                               |
11495	//        |                              /----------\     |
11496	//        |          /-------------\    |            |    |- END
11497	//        |         |               |   |  / Top  \  |    |
11498	//        |         |  / Margin  \  |   | | Right  | |    |
11499	//        |---------+-|           |-+---+-| Bottom |-+----|
11500	//        |            \ Padding /         \ Left /       |
11501	// BEGIN -|                                               |
11502	//        |                /---------\                    |
11503	//        |               |           |                   |
11504	//        |               |  / Min \  |    / Width  \     |
11505	//         \--------------+-|       |-+---|          |---/
11506	//                           \ Max /       \ Height /
11507	rautoPx = /^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;
11508
11509// If this version of jQuery has .swap(), don't false-alarm on internal uses
11510if ( jQuery.swap ) {
11511	jQuery.each( [ "height", "width", "reliableMarginRight" ], function( _, name ) {
11512		var oldHook = jQuery.cssHooks[ name ] && jQuery.cssHooks[ name ].get;
11513
11514		if ( oldHook ) {
11515			jQuery.cssHooks[ name ].get = function() {
11516				var ret;
11517
11518				internalSwapCall = true;
11519				ret = oldHook.apply( this, arguments );
11520				internalSwapCall = false;
11521				return ret;
11522			};
11523		}
11524	} );
11525}
11526
11527jQuery.swap = function( elem, options, callback, args ) {
11528	var ret, name,
11529		old = {};
11530
11531	if ( !internalSwapCall ) {
11532		migrateWarn( "jQuery.swap() is undocumented and deprecated" );
11533	}
11534
11535	// Remember the old values, and insert the new ones
11536	for ( name in options ) {
11537		old[ name ] = elem.style[ name ];
11538		elem.style[ name ] = options[ name ];
11539	}
11540
11541	ret = callback.apply( elem, args || [] );
11542
11543	// Revert the old values
11544	for ( name in options ) {
11545		elem.style[ name ] = old[ name ];
11546	}
11547
11548	return ret;
11549};
11550
11551if ( jQueryVersionSince( "3.4.0" ) && typeof Proxy !== "undefined" ) {
11552
11553	jQuery.cssProps = new Proxy( jQuery.cssProps || {}, {
11554		set: function() {
11555			migrateWarn( "JQMIGRATE: jQuery.cssProps is deprecated" );
11556			return Reflect.set.apply( this, arguments );
11557		}
11558	} );
11559}
11560
11561// Create a dummy jQuery.cssNumber if missing. It won't be used by jQuery but
11562// it will prevent code adding new keys to it unconditionally from crashing.
11563if ( !jQuery.cssNumber ) {
11564	jQuery.cssNumber = {};
11565}
11566
11567function isAutoPx( prop ) {
11568
11569	// The first test is used to ensure that:
11570	// 1. The prop starts with a lowercase letter (as we uppercase it for the second regex).
11571	// 2. The prop is not empty.
11572	return ralphaStart.test( prop ) &&
11573		rautoPx.test( prop[ 0 ].toUpperCase() + prop.slice( 1 ) );
11574}
11575
11576oldFnCss = jQuery.fn.css;
11577
11578jQuery.fn.css = function( name, value ) {
11579	var camelName,
11580		origThis = this;
11581	if ( name && typeof name === "object" && !Array.isArray( name ) ) {
11582		jQuery.each( name, function( n, v ) {
11583			jQuery.fn.css.call( origThis, n, v );
11584		} );
11585		return this;
11586	}
11587	if ( typeof value === "number" ) {
11588		camelName = camelCase( name );
11589		if ( !isAutoPx( camelName ) && !jQuery.cssNumber[ camelName ] ) {
11590			migrateWarn( "Number-typed values are deprecated for jQuery.fn.css( \"" +
11591				name + "\", value )" );
11592		}
11593	}
11594
11595	return oldFnCss.apply( this, arguments );
11596};
11597
11598var oldData = jQuery.data;
11599
11600jQuery.data = function( elem, name, value ) {
11601	var curData, sameKeys, key;
11602
11603	// Name can be an object, and each entry in the object is meant to be set as data
11604	if ( name && typeof name === "object" && arguments.length === 2 ) {
11605		curData = jQuery.hasData( elem ) && oldData.call( this, elem );
11606		sameKeys = {};
11607		for ( key in name ) {
11608			if ( key !== camelCase( key ) ) {
11609				migrateWarn( "jQuery.data() always sets/gets camelCased names: " + key );
11610				curData[ key ] = name[ key ];
11611			} else {
11612				sameKeys[ key ] = name[ key ];
11613			}
11614		}
11615
11616		oldData.call( this, elem, sameKeys );
11617
11618		return name;
11619	}
11620
11621	// If the name is transformed, look for the un-transformed name in the data object
11622	if ( name && typeof name === "string" && name !== camelCase( name ) ) {
11623		curData = jQuery.hasData( elem ) && oldData.call( this, elem );
11624		if ( curData && name in curData ) {
11625			migrateWarn( "jQuery.data() always sets/gets camelCased names: " + name );
11626			if ( arguments.length > 2 ) {
11627				curData[ name ] = value;
11628			}
11629			return curData[ name ];
11630		}
11631	}
11632
11633	return oldData.apply( this, arguments );
11634};
11635
11636// Support jQuery slim which excludes the effects module
11637if ( jQuery.fx ) {
11638
11639var intervalValue, intervalMsg,
11640	oldTweenRun = jQuery.Tween.prototype.run,
11641	linearEasing = function( pct ) {
11642		return pct;
11643	};
11644
11645jQuery.Tween.prototype.run = function( ) {
11646	if ( jQuery.easing[ this.easing ].length > 1 ) {
11647		migrateWarn(
11648			"'jQuery.easing." + this.easing.toString() + "' should use only one argument"
11649		);
11650
11651		jQuery.easing[ this.easing ] = linearEasing;
11652	}
11653
11654	oldTweenRun.apply( this, arguments );
11655};
11656
11657intervalValue = jQuery.fx.interval || 13;
11658intervalMsg = "jQuery.fx.interval is deprecated";
11659
11660// Support: IE9, Android <=4.4
11661// Avoid false positives on browsers that lack rAF
11662// Don't warn if document is hidden, jQuery uses setTimeout (#292)
11663if ( window.requestAnimationFrame ) {
11664	Object.defineProperty( jQuery.fx, "interval", {
11665		configurable: true,
11666		enumerable: true,
11667		get: function() {
11668			if ( !window.document.hidden ) {
11669				migrateWarn( intervalMsg );
11670			}
11671			return intervalValue;
11672		},
11673		set: function( newValue ) {
11674			migrateWarn( intervalMsg );
11675			intervalValue = newValue;
11676		}
11677	} );
11678}
11679
11680}
11681
11682var oldLoad = jQuery.fn.load,
11683	oldEventAdd = jQuery.event.add,
11684	originalFix = jQuery.event.fix;
11685
11686jQuery.event.props = [];
11687jQuery.event.fixHooks = {};
11688
11689migrateWarnProp( jQuery.event.props, "concat", jQuery.event.props.concat,
11690	"jQuery.event.props.concat() is deprecated and removed" );
11691
11692jQuery.event.fix = function( originalEvent ) {
11693	var event,
11694		type = originalEvent.type,
11695		fixHook = this.fixHooks[ type ],
11696		props = jQuery.event.props;
11697
11698	if ( props.length ) {
11699		migrateWarn( "jQuery.event.props are deprecated and removed: " + props.join() );
11700		while ( props.length ) {
11701			jQuery.event.addProp( props.pop() );
11702		}
11703	}
11704
11705	if ( fixHook && !fixHook._migrated_ ) {
11706		fixHook._migrated_ = true;
11707		migrateWarn( "jQuery.event.fixHooks are deprecated and removed: " + type );
11708		if ( ( props = fixHook.props ) && props.length ) {
11709			while ( props.length ) {
11710				jQuery.event.addProp( props.pop() );
11711			}
11712		}
11713	}
11714
11715	event = originalFix.call( this, originalEvent );
11716
11717	return fixHook && fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
11718};
11719
11720jQuery.event.add = function( elem, types ) {
11721
11722	// This misses the multiple-types case but that seems awfully rare
11723	if ( elem === window && types === "load" && window.document.readyState === "complete" ) {
11724		migrateWarn( "jQuery(window).on('load'...) called after load event occurred" );
11725	}
11726	return oldEventAdd.apply( this, arguments );
11727};
11728
11729jQuery.each( [ "load", "unload", "error" ], function( _, name ) {
11730
11731	jQuery.fn[ name ] = function() {
11732		var args = Array.prototype.slice.call( arguments, 0 );
11733
11734		// If this is an ajax load() the first arg should be the string URL;
11735		// technically this could also be the "Anything" arg of the event .load()
11736		// which just goes to show why this dumb signature has been deprecated!
11737		// jQuery custom builds that exclude the Ajax module justifiably die here.
11738		if ( name === "load" && typeof args[ 0 ] === "string" ) {
11739			return oldLoad.apply( this, args );
11740		}
11741
11742		migrateWarn( "jQuery.fn." + name + "() is deprecated" );
11743
11744		args.splice( 0, 0, name );
11745		if ( arguments.length ) {
11746			return this.on.apply( this, args );
11747		}
11748
11749		// Use .triggerHandler here because:
11750		// - load and unload events don't need to bubble, only applied to window or image
11751		// - error event should not bubble to window, although it does pre-1.7
11752		// See http://bugs.jquery.com/ticket/11820
11753		this.triggerHandler.apply( this, args );
11754		return this;
11755	};
11756
11757} );
11758
11759jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +
11760	"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
11761	"change select submit keydown keypress keyup contextmenu" ).split( " " ),
11762	function( _i, name ) {
11763
11764	// Handle event binding
11765	jQuery.fn[ name ] = function( data, fn ) {
11766		migrateWarn( "jQuery.fn." + name + "() event shorthand is deprecated" );
11767		return arguments.length > 0 ?
11768			this.on( name, null, data, fn ) :
11769			this.trigger( name );
11770	};
11771} );
11772
11773// Trigger "ready" event only once, on document ready
11774jQuery( function() {
11775	jQuery( window.document ).triggerHandler( "ready" );
11776} );
11777
11778jQuery.event.special.ready = {
11779	setup: function() {
11780		if ( this === window.document ) {
11781			migrateWarn( "'ready' event is deprecated" );
11782		}
11783	}
11784};
11785
11786jQuery.fn.extend( {
11787
11788	bind: function( types, data, fn ) {
11789		migrateWarn( "jQuery.fn.bind() is deprecated" );
11790		return this.on( types, null, data, fn );
11791	},
11792	unbind: function( types, fn ) {
11793		migrateWarn( "jQuery.fn.unbind() is deprecated" );
11794		return this.off( types, null, fn );
11795	},
11796	delegate: function( selector, types, data, fn ) {
11797		migrateWarn( "jQuery.fn.delegate() is deprecated" );
11798		return this.on( types, selector, data, fn );
11799	},
11800	undelegate: function( selector, types, fn ) {
11801		migrateWarn( "jQuery.fn.undelegate() is deprecated" );
11802		return arguments.length === 1 ?
11803			this.off( selector, "**" ) :
11804			this.off( types, selector || "**", fn );
11805	},
11806	hover: function( fnOver, fnOut ) {
11807		migrateWarn( "jQuery.fn.hover() is deprecated" );
11808		return this.on( "mouseenter", fnOver ).on( "mouseleave", fnOut || fnOver );
11809	}
11810} );
11811
11812var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,
11813	origHtmlPrefilter = jQuery.htmlPrefilter,
11814	makeMarkup = function( html ) {
11815		var doc = window.document.implementation.createHTMLDocument( "" );
11816		doc.body.innerHTML = html;
11817		return doc.body && doc.body.innerHTML;
11818	},
11819	warnIfChanged = function( html ) {
11820		var changed = html.replace( rxhtmlTag, "<$1></$2>" );
11821		if ( changed !== html && makeMarkup( html ) !== makeMarkup( changed ) ) {
11822			migrateWarn( "HTML tags must be properly nested and closed: " + html );
11823		}
11824	};
11825
11826jQuery.UNSAFE_restoreLegacyHtmlPrefilter = function() {
11827	jQuery.htmlPrefilter = function( html ) {
11828		warnIfChanged( html );
11829		return html.replace( rxhtmlTag, "<$1></$2>" );
11830	};
11831};
11832
11833jQuery.htmlPrefilter = function( html ) {
11834	warnIfChanged( html );
11835	return origHtmlPrefilter( html );
11836};
11837
11838var oldOffset = jQuery.fn.offset;
11839
11840jQuery.fn.offset = function() {
11841	var elem = this[ 0 ];
11842
11843	if ( elem && ( !elem.nodeType || !elem.getBoundingClientRect ) ) {
11844		migrateWarn( "jQuery.fn.offset() requires a valid DOM element" );
11845		return arguments.length ? this : undefined;
11846	}
11847
11848	return oldOffset.apply( this, arguments );
11849};
11850
11851// Support jQuery slim which excludes the ajax module
11852// The jQuery.param patch is about respecting `jQuery.ajaxSettings.traditional`
11853// so it doesn't make sense for the slim build.
11854if ( jQuery.ajax ) {
11855
11856var oldParam = jQuery.param;
11857
11858jQuery.param = function( data, traditional ) {
11859	var ajaxTraditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
11860
11861	if ( traditional === undefined && ajaxTraditional ) {
11862
11863		migrateWarn( "jQuery.param() no longer uses jQuery.ajaxSettings.traditional" );
11864		traditional = ajaxTraditional;
11865	}
11866
11867	return oldParam.call( this, data, traditional );
11868};
11869
11870}
11871
11872var oldSelf = jQuery.fn.andSelf || jQuery.fn.addBack;
11873
11874jQuery.fn.andSelf = function() {
11875	migrateWarn( "jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()" );
11876	return oldSelf.apply( this, arguments );
11877};
11878
11879// Support jQuery slim which excludes the deferred module in jQuery 4.0+
11880if ( jQuery.Deferred ) {
11881
11882var oldDeferred = jQuery.Deferred,
11883	tuples = [
11884
11885		// Action, add listener, callbacks, .then handlers, final state
11886		[ "resolve", "done", jQuery.Callbacks( "once memory" ),
11887			jQuery.Callbacks( "once memory" ), "resolved" ],
11888		[ "reject", "fail", jQuery.Callbacks( "once memory" ),
11889			jQuery.Callbacks( "once memory" ), "rejected" ],
11890		[ "notify", "progress", jQuery.Callbacks( "memory" ),
11891			jQuery.Callbacks( "memory" ) ]
11892	];
11893
11894jQuery.Deferred = function( func ) {
11895	var deferred = oldDeferred(),
11896		promise = deferred.promise();
11897
11898	deferred.pipe = promise.pipe = function( /* fnDone, fnFail, fnProgress */ ) {
11899		var fns = arguments;
11900
11901		migrateWarn( "deferred.pipe() is deprecated" );
11902
11903		return jQuery.Deferred( function( newDefer ) {
11904			jQuery.each( tuples, function( i, tuple ) {
11905				var fn = typeof fns[ i ] === "function" && fns[ i ];
11906
11907				// Deferred.done(function() { bind to newDefer or newDefer.resolve })
11908				// deferred.fail(function() { bind to newDefer or newDefer.reject })
11909				// deferred.progress(function() { bind to newDefer or newDefer.notify })
11910				deferred[ tuple[ 1 ] ]( function() {
11911					var returned = fn && fn.apply( this, arguments );
11912					if ( returned && typeof returned.promise === "function" ) {
11913						returned.promise()
11914							.done( newDefer.resolve )
11915							.fail( newDefer.reject )
11916							.progress( newDefer.notify );
11917					} else {
11918						newDefer[ tuple[ 0 ] + "With" ](
11919							this === promise ? newDefer.promise() : this,
11920							fn ? [ returned ] : arguments
11921						);
11922					}
11923				} );
11924			} );
11925			fns = null;
11926		} ).promise();
11927
11928	};
11929
11930	if ( func ) {
11931		func.call( deferred, deferred );
11932	}
11933
11934	return deferred;
11935};
11936
11937// Preserve handler of uncaught exceptions in promise chains
11938jQuery.Deferred.exceptionHook = oldDeferred.exceptionHook;
11939
11940}
11941
11942return jQuery;
11943} );
11944
11945/*! ***
11946
11947	!!! DIE DATEI ZPCOOKIECONSENT.JS NIE DIREKT BEARBEITEN !!! 
11948	
11949	Diese Datei wird automatisch mit Babel "transpiled" um IE-Kompatibilität herzustellen.
11950	Die bearbeitbare Datei liegt in: 
11951	
11952	Development/Source/Packaging/Widgets/zpcookieconsent/zpcookieconsent-src.js
11953	
11954*** */
11955"use strict";
11956"use strict";
11957
11958/*! $Id$ */
11959
11960// @codekit-prepend quiet "hinweis.js";
11961
11962// globals
11963var zpCustomConsentServices, type_attr, zp_consent_whitelist, zp_consentlang, zp_consent_strings, zp_consent_categories, zp_consent_settings, zp_consent_ids_by_category, zp_consent_categories_de, zp_consent_pos, zp_consent_theme, blockiframes, zp_consent_usedids, zp_consent_privacypage, zp_consent_privacylinkt, zp_consent_imprintpage, zp_consent_imprintlinkt, zp_consent_buttontitle_accept, zp_consent_buttontitle_essential, zp_consent_bgcolor_accept, zp_consent_textcolor_accept, zp_consent_bgcolor_essential, zp_consent_textcolor_gen, zp_consent_linkcolor_gen, zp_consent_textcolor_essential, zp_consent_bgcolor_save, zp_consent_textcolor_save, zp_consent_buttontitle, zp_consent_description, zp_consent_title, fallbackOpener;
11964var consentStorage = {};
11965var zpconsent = {};
11966var zp_consent_local_blocklist = ["assets/js/webfont/1.6.28/webfont.js"];
11967var zp_gaconsent_ids = ["zp_consent_ga", "zp_consent_gmaps", "zp_consent_gtm", "zp_consent_yt", "zp_consent_gadsense", "zp_consent_googlefonts", "zp_consent_googlerecaptcha", "zp_consent_gtranslate"];
11968var zp_custom_settings = [];
11969
11970//var zp_consent_local_blocklist = []; 
11971// use localStorage or cookies?
11972var supports_html5_storage = does_support_html5_storage();
11973
11974// begin google consent v2 default denied
11975var dataLayer = window.dataLayer || [];
11976function gtag() {
11977  dataLayer.push(arguments);
11978}
11979gtag('consent', 'default', {
11980  'ad_user_data': 'denied',
11981  'ad_personalization': 'denied',
11982  'ad_storage': 'denied',
11983  'analytics_storage': 'denied',
11984  'wait_for_update': 2500
11985});
11986// end google consent v2 default denied
11987
11988function initcontent() {
11989  zpconsent.read_cookie = function (name) {
11990    // read from localStorage
11991    if (supports_html5_storage) {
11992      //console.log("LocalStorage supported and used to read cookies!");
11993      let result = JSON.parse(localStorage.getItem(name));
11994      return result;
11995    }
11996
11997    //let result = document.cookie.match(new RegExp(name + '=([^;]+)'));
11998    let result = decodeURIComponent(document.cookie).match(new RegExp('zp_consent=([^;]+)'));
11999    result && (result = JSON.parse(result[1]));
12000    if (result) {
12001      //console.log("Cookie result: ", result[name]);
12002      return result[name];
12003    } else {
12004      return null;
12005    }
12006  };
12007
12008  // if user accepted all cookies, we proactively set google consent v2
12009  if (zpconsent.read_cookie('zp_consent_all')) {
12010    //console.log("✅ granting google consent as all accepted");
12011    googleConsentv2('granted');
12012  }
12013  type_attr = 'text/zpconsent';
12014  zp_consent_whitelist = ["//js.stripe.com", "//code.jquery.com", "//localhost", "//127.0.0.", "chrome-extension://", "//cdn.sitesearch360.com", "//js.sitesearch360.com"];
12015  zp_consentlang = document.getElementsByTagName("html")[0].getAttribute("lang") || "de";
12016  zp_consentlang = zp_consentlang.toLowerCase();
12017  if (zp_consentlang.substring(0, 2) !== "de") {
12018    zp_consentlang = "en";
12019  } else {
12020    // in case someone set the lang attribute to e.g. "zp_consentlang = "de-DE" or such
12021    zp_consentlang = "de";
12022  }
12023  zp_consent_strings = {
12024    "consent_title_de": "Datenschutzeinstellungen",
12025    "consent_title_en": "Privacy-Settings",
12026    "consent_descr_de": "<p>Auf dieser Website werden Cookies genutzt. Sie können alle Cookies akzeptieren oder nur bestimmte auswählen. Sie können diese Einstellungen jederzeit ändern.</p>",
12027    "consent_descr_en": "<p>
12027This website uses cookies. You can accept all cookies or select individual cookies. These settings can be changed at any time.</p>",
12028    "title_settings_de": "Cookie-Einstellungen",
12029    "title_settings_en": "Cookie-Settings",
12030    "button_accept_de": "Alle akzeptieren",
12031    "button_accept_en": "Accept all",
12032    "button_loadiframe_de": "IFrame laden",
12033    "button_loadiframe_en": "Load iframe",
12034    "button_loadfont_de": "Schriften laden",
12035    "button_loadfont_en": "Load fonts",
12036    "button_accept_essential_de": "Alle ablehnen",
12037    "button_accept_essential_en": "Deny all",
12038    "button_save_de": "Speichern",
12039    "button_save_en": "Save",
12040    "button_activate_de": "Cookie aktivieren",
12041    "button_activate_en": "Activate cookie",
12042    "show_info_de": "Informationen anzeigen",
12043    "hide_info_de": "Informationen ausblenden",
12044    "show_info_en": "Show information",
12045    "hide_info_en": "Hide information",
12046    "imprint_de": "Impressum",
12047    "imprint_en": "Imprint",
12048    "policy_de": "Datenschutzerklärung",
12049    "policy_en": "Privacy-Terms",
12050    "name_label_de": "Name: ",
12051    "name_label_en": "Name: ",
12052    "anbieter_label_de": "Anbieter: ",
12053    "anbieter_label_en": "Supplier: ",
12054    "descr_label_de": "Beschreibung: ",
12055    "descr_label_en": "Description: ",
12056    "blocked_info_de": "<div class=\"zpconsentinfo\"><h3>Deaktivierter Inhalt!</h3><p>Aktivieren Sie das Cookie <b>%s</b> um diesen Inhalt anzuzeigen!</p>%d<p class=\"butt\"><a href=\"#\" data-consentid=\"%id\" class=\"button default activate\"><span>%b</span></a></p></div>",
12057    "blocked_info_en": "<div class=\"zpconsentinfo\"><h3>Deactivated content!</h3><p>Activate cookie <b>%s</b> to view the content!</p>%d<p class=\"butt\"><a href=\"#\" data-consentid=\"%id\" class=\"default activate\"><span>%b</span></a></p></div>",
12058    "blocked_info_notactive_de": "Aktivieren Sie alle Cookies per Klick auf &quot;<strong>Alle akzeptieren</strong>&quot; um diesen Inhalt anzuzeigen.",
12059    "blocked_info_notactive_en": "Activate all cookies by clicking on &quot;<strong>Accept all</strong>&quot; to view the content.",
12060    "blocked_unknown_de": "<div class=\"zpconsentinfo\"><h3>Deaktiviertes Script!</h3><p>Aktivieren Sie alle Cookies per Klick auf &quot;<strong>Alle akzeptieren</strong>&quot; um diesen Inhalt anzuzeigen.</p>%a Unbekannt<br /> URL: <span style=\"-ms-word-break: break-all; word-break: break-all;\">%u</span>%b</div>",
12061    "blocked_unknown_en": "<div class=\"zpconsentinfo\"><h3>Deactivated script!</h3><p>Activate all cookies by clicking on &quot;<strong>Accept all</strong>&quot; to view the content.</p>%a unknown<br /> URL: <span style=\"-ms-word-break: break-all; word-break: break-all;\">%u</span>%b</div>",
12062    "blocked_iframe_de": "<div class=\"zpconsentinfo iframe\"><h3>Deaktiviertes IFrame!</h3><p>Laden Sie externe Inhalte per Klick auf &quot;<strong>%t</strong>&quot;.</p>%a Unbekannt<br />URL: <span style=\"-ms-word-break: break-all; word-break: break-all;\">%u</span>%b<p><span class=\"smallprint\">Durch Klick auf den Button erklären Sie sich damit einverstanden, dass Ihnen externe Inhalte angezeigt werden. Damit könnten personenbezogene Daten an Drittplattformen übermittelt werden. Mehr dazu hier: <a %dsu>%dst</a>.</span></p></div>",
12063    "blocked_iframe_en": "<div class=\"zpconsentinfo iframe\"><h3>Deactivated iframe!</h3><p>Load external content with a click on &quot;<strong>%t</strong>&quot;.</p>%a Unknown<br />URL: <span style=\"-ms-word-break: break-all; word-break: break-all;\">%u</span>%b<p><span class=\"smallprint\">By klicking the button, you agree that external data is loaded. This could transmit personal data to third-party platforms. More about this here: <a %dsu>%dst</a>.</span></p></div>",
12064    "blocked_font_de": "<div class=\"zpconsentinfo gfont\"><h3>Ungeladene Schriftarten!</h3><p>Laden Sie externe Schriftarten per Klick auf &quot;<strong>%t</strong>&quot;.</p>%d %b<p><span class=\"smallprint\">Durch Klick auf den Button erklären Sie sich damit einverstanden, dass externe Schriftarten geladen werden. Dadurch könnten personenbezogene Daten an Google übermittelt werden.</span></p></div>",
12065    "blocked_font_en": "<div class=\"zpconsentinfo gfont\"><h3>Inactive fonts!</h3><p>Load external fonts with a click on &quot;<strong>%t</strong>&quot;.</p>%d %b<p><span class=\"smallprint\">By klicking the button, you agree that external fonts are loaded. This could transmit personal data to Google.</span></p></div>",
12066    "blocked_recptcha_de": "<div class=\"zpconsentinfo recaptcha\"><h3>Ungeladenes, benötigtes Script!</h3><p>Um dieses Formular absenden zu können, laden Sie das Script per Klick auf &quot;<strong>%t</strong>&quot;.</p>%d %b<p><span class=\"smallprint\">Durch Klick auf den Button erklären Sie sich damit einverstanden, dass reCAPTCHA geladen wird. Dadurch könnten personenbezogene Daten an Google übermittelt werden.</span></p></div>",
12067    "blocked_recptcha_en": "<div class=\"zpconsentinfo gfont\"><h3>Deactivated, required script!</h3><p>In order to submit this form, load the script with a click on &quot;<strong>%t</strong>&quot;.</p>%d %b<p><span class=\"smallprint\">By klicking the button, you agree that external reCAPTCHA is loaded. This could transmit personal data to Google.</span></p></div>"
12068  };
12069  zp_consent_categories = {
12070    " Essenziell": {
12071      "show_switch": false,
12072      "name_de": " Essenziell",
12073      "description_de": "<p class=\"description\">Sind für die einwandfreie Funktion der Website erforderlich.</p>"
12074    },
12075    "Externe Medien": {
12076      "name_de": "Externe Medien",
12077      "description_de": "<p class=\"description\">Inhalte von externen Plattformen wie YouTube, Vimeo etc.</p>"
12078    },
12079    "Statistiken": {
12080      "name_de": "Statistiken",
12081      "description_de": "<p class=\"description\">
12081Helfen zu verstehen, wie Sie diese Website nutzen.</p>"
12082    },
12083    "Marketing": {
12084      "name_de": "Marketing",
12085      "description_de": "<p class=\"description\">Werden von Anbietern verwendet, um personalisierte Werbung anzuzeigen.</p>"
12086    },
12087    " Essential": {
12088      "show_switch": false,
12089      "name_en": " Essential",
12090      "description_en": "<p class=\"description\">Are necessary for the proper function of the website.</p>"
12091    },
12092    "External Media": {
12093      "name_en": "External Media",
12094      "description_en": "<p class=\"description\">Content from third party platforms like YouTube, Vimeo etc.</p>"
12095    },
12096    "Statistics": {
12097      "name_en": "Statistics",
12098      "description_en": "<p class=\"description\">Help us understand how you use out site.</p>"
12099    },
12100    "Marketing_EN": {
12101      "name_en": "Marketing",
12102      "description_en": "<p class=\"description\">Are used by third-parties to display personalized ads.</p>"
12103    }
12104  };
12105  zp_consent_settings = {
12106    "zp_consent_zp": {
12107      "name": "–",
12108      "anbieter_de": "Eigentümer dieser Website",
12109      "anbieter_en": "Owner of this website",
12110      "policy_de": "",
12111      "policy_en": "",
12112      "category_de": " Essenziell",
12113      "category_en": " Essential",
12114      "description_de": "<p class=\"description\">Diverse Session-Cookies oder z.B. Ihre Cookie-Einstellungen.</p>",
12115      "description_en": "<p class=\"description\">Various session cookies or i.e. your cookie-consent-settings.</p>",
12116      "type": "iframe"
12117    },
12118    "zp_consent_yt": {
12119      "name": "YouTube Video",
12120      "anbieter_de": "YouTube",
12121      "anbieter_en": "YouTube",
12122      "poster_image": "https://img.youtube.com/vi/{@videoid}/maxresdefault.jpg",
12123      "policy_de": "https://policies.google.com/privacy?hl=de",
12124      "policy_en": "https://policies.google.com/privacy",
12125      "category_de": "Externe Medien",
12126      "category_en": "External Media",
12127      "description_de": "<p class=\"description\">Videos von YouTube.</p>",
12128      "description_en": "<p class=\"description\">Videos from YouTube.</p>",
12129      "type": "iframe",
12130      "url_pattern": ["//www\.youtube-nocookie\.com/", "//www\.youtube\.com/"]
12131    },
12132    "zp_consent_vimeo": {
12133      "name": "Vimeo Video",
12134      "anbieter_de": "Vimeo",
12135      "anbieter_en": "Vimeo",
12136      "poster_image": "assets/stock-images/video-placeholder.svg",
12137      "policy_de": "https://vimeo.com/de/features/video-privacy",
12138      "policy_en": "https://vimeo.com/features/video-privacy",
12139      "category_de": "Externe Medien",
12140      "category_en": "External Media",
12141      "description_de": "<p class=\"description\">Videos von Vimeo.</p>",
12142      "description_en": "<p class=\"description\">Videos from Vimeo.</p>",
12143      "type": "iframe",
12144      "url_pattern": ["//player\.vimeo\.com/"]
12145    },
12146    "zp_consent_gmaps": {
12147      "name": "Google Maps",
12148      "anbieter_de": "Google",
12149      "anbieter_en": "Google",
12150      "poster_image": "assets/stock-images/GoogleMapsPreview.png",
12151      "policy_de": "https://policies.google.com/privacy?hl=de",
12152      "policy_en": "https://policies.google.com/privacy",
12153      "category_de": "Externe Medien",
12154      "category_en": "External Media",
12155      "description_de": "<p class=\"description\">Karten von Google Maps.</p>",
12156      "description_en": "<p class=\"description\">Maps from Google Maps.</p>",
12157      "type": "iframe",
12158      "url_pattern": ["//maps\.google\.com/", "//www\.google\.com/maps/"]
12159    },
12160    "zp_consent_soundcloud": {
12161      "name": "Soundcloud",
12162      "anbieter_de": "Soundcloud",
12163      "anbieter_en": "Soundcloud",
12164      "policy_de": "https://soundcloud.com/pages/privacy",
12165      "policy_en": "https://soundcloud.com/pages/privacy",
12166      "category_de": "Externe Medien",
12167      "category_en": "External Media",
12168      "description_de": "<p class=\"description\">Audio von Soundcloud.</p>",
12169      "description_en": "<p class=\"description\">Audio from Soundcloud</p>",
12170      "type": "iframe",
12171      "url_pattern": ["soundcloud\.com/player/"]
12172    },
12173    "zp_consent_spotify_if": {
12174      "name": "Spotify",
12175      "anbieter_de": "Spotify",
12176      "anbieter_en": "Spotify",
12177      "policy_de": "https://support.spotify.com/de/article/data-rights-and-privacy-settings/",
12178      "policy_en": "https://www.spotify.com/us/legal/privacy-policy/",
12179      "category_de": "Externe Medien",
12180      "category_en": "External Media",
12181      "description_de": "<p class=\"description\">Eingebettete Inhalte von Spotify.</p>",
12182      "description_en": "<p class=\"description\">Embedded content from Spotify.</p>",
12183      "type": "iframe",
12184      "url_pattern": ["//open\.spotify\.com/embed/", "//podcasters\.spotify\.com/.*/embed/"]
12185    },
12186    "zp_consent_ga": {
12187      "name": "Google Analytics",
12188      "anbieter_de": "Google LLC",
12189      "anbieter_en": "Google LLC",
12190      "policy_de": "https://policies.google.com/privacy?hl=de",
12191      "policy_en": "https://policies.google.com/privacy",
12192      "category_de": "Statistiken",
12193      "category_en": "Statistics",
12194      "description_de": "<p class=\"description\">Website-Analyse und Tracking mit Google Analytics.</p>",
12195      "description_en": "<p class=\"description\">Website analytics and tracking with Google Analytics.</p>",
12196      "type": "script",
12197      "url_pattern": ["//www\.google-analytics\.com/analytics\.js", "//www\.googletagmanager\.com/gtag/js\\?id="]
12198    },
12199    "zp_consent_clarity": {
12200      "name": "Microsoft Clarity",
12201      "anbieter_de": "Microsoft Corporation",
12202      "anbieter_en": "Microsoft Corporation",
12203      "policy_de": "https://privacy.microsoft.com/de-de/privacystatement",
12204      "policy_en": "https://privacy.microsoft.com/en-us/privacystatement",
12205      "category_de": "Statistiken",
12206      "category_en": "Statistics",
12207      "description_de": "<p class=\"description\">Website-Analyse und Tracking mit Microsoft Clarity.</p>",
12208      "description_en": "<p class=\"description\">Website analytics and tracking with Microsoft Clarity.</p>",
12209      "type": "script",
12210      "url_pattern": ["//www\.clarity\.ms/tag/"]
12211    },
12212    "zp_consent_matomo": {
12213      "name": "Matomo",
12214      "anbieter_de": "Matomo",
12215      "anbieter_en": "Matomo",
12216      "policy_de": "https://matomo.org/privacy-policy/",
12217      "policy_en": "https://matomo.org/privacy-policy/",
12218      "category_de": "Statistiken",
12219      "category_en": "Statistics",
12220      "description_de": "<p class=\"description\">Website-Analyse und Tracking mit Matomo.</p>",
12221      "description_en": "<p class=\"description\">Website analytics and tracking with Matomo.</p>",
12222      "type": "script",
12223      "url_pattern": ["/piwik\.js", "/matomo\.js"]
12224    },
12225    "zp_consent_gtm": {
12226      "name": "Google Tag Manager",
12227      "anbieter_de": "Google LLC",
12228      "anbieter_en": "Google LLC",
12229      "policy_de": "https://policies.google.com/privacy?hl=de",
12230      "policy_en": "https://policies.google.com/privacy",
12231      "category_de": "Marketing",
12232      "category_en": "Marketing_EN",
12233      "description_de": "<p class=\"description\">Website-Analyse und Tracking mit Google Tag Manager.</p>",
12234      "description_en": "<p class=\"description\">Website analytics and tracking with Google Tag Manager.</p>",
12235      "type": "script",
12236      "url_pattern": ["//www\.googletagmanager\.com/ns\.html", "//www\.googletagmanager\.com/gtm\.js"]
12237    },
12238    "zp_consent_gadsense": {
12239      "name": "Google AdSense",
12240      "anbieter_de": "Google LLC",
12241      "anbieter_en": "Google LLC",
12242      "policy_de": "https://policies.google.com/privacy?hl=de",
12243      "policy_en": "https://policies.google.com/privacy",
12244      "category_de": "Marketing",
12245      "category_en": "Marketing_EN",
12246      "description_de": "<p class=\"description\">Werbung von Google AdSense.</p>",
12247      "description_en": "<p class=\"description\">Ads by Google AdSense.</p>",
12248      "type": "script",
12249      "url_pattern": ["//pagead2\.googlesyndication\.com/pagead/", "//tpc\.googlesyndication\.com/sodar/", "//googleads\.g\.doubleclick.net"]
12250    },
12251    "zp_consent_twitter": {
12252      "name": "Twitter",
12253      "anbieter_de": "Twitter",
12254      "anbieter_en": "Twitter",
12255      "policy_de": "https://twitter.com/de/privacy",
12256      "policy_en": "https://twitter.com/privacy",
12257      "category_de": "Externe Medien",
12258      "category_en": "External Media",
12259      "description_de": "<p class=\"description\">Twitter-Button.</p>",
12260      "description_en": "<p class=\"description\">Twitter-Button.</p>",
12261      "type": "script",
12262      "url_pattern": ["//platform\.twitter\.com/widgets\.js"],
12263      "warning_target": ".twitter-share-button"
12264    },
12265    "zp_consent_fbpixel": {
12266      "name": "Facebook Pixel",
12267      "anbieter_de": "Facebook Ireland Limited",
12268      "anbieter_en": "Facebook Ireland Limited",
12269      "policy_de": "https://www.facebook.com/policies/cookies",
12270      "policy_en": "https://www.facebook.com/policies/cookies",
12271      "category_de": "Marketing",
12272      "category_en": "Marketing_EN",
12273      "description_de": "<p class=\"description\">Website-Analyse und Tracking mit Facebook-Pixel.</p>",
12274      "description_en": "<p class=\"description\">Website analytics, ad targeting, and ad measurement with facebook-pixel.</p>",
12275      "type": "script",
12276      "url_pattern": ["connect\.facebook\.net.*/fbevents\.js", "//www\.facebook\.com/tr\\?id="]
12277    },
12278    "zp_consent_fbcomments": {
12279      "name": "Facebook Kommentare",
12280      "anbieter_de": "Facebook Ireland Limited",
12281      "anbieter_en": "Facebook Ireland Limited",
12282      "policy_de": "https://www.facebook.com/policies/cookies",
12283      "policy_en": "https://www.facebook.com/policies/cookies",
12284      "category_de": "Externe Medien",
12285      "category_en": "External Media",
12286      "description_de": "<p class=\"description\">Seite kommentieren über Facebook.</p>",
12287      "description_en": "<p class=\"description\">Comment page via Facebook.</p>",
12288      "type": "script",
12289      "url_pattern": ["connect\.facebook\.net.*/all\.js"],
12290      "warning_target": ".fb-comments"
12291    },
12292    "zp_consent_fbplugin": {
12293      "name": "Facebook Plugins",
12294      "anbieter_de": "Facebook Ireland Limited",
12295      "anbieter_en": "Facebook Ireland Limited",
12296      "poster_image": "",
12297      "policy_de": "https://www.facebook.com/policies/cookies",
12298      "policy_en": "https://www.facebook.com/policies/cookies",
12299      "category_de": "Externe Medien",
12300      "category_en": "External Media",
12301      "description_de": "<p class=\"description\">Facebook-Plugins, wie z.B. Facebook Seiten-Plugin.</p>",
12302      "description_en": "<p class=\"description\">Facebook-Plugins, like e.g. facebook-page-plugin.</p>",
12303      "type": "iframe",
12304      "url_pattern": ["facebook\.com/plugins/[^comments]"]
12305    },
12306    "zp_consent_disq": {
12307      "name": "Disqus",
12308      "anbieter_de": "Disqus, Inc.",
12309      "anbieter_en": "Disqus, Inc.",
12310      "policy_de": "https://help.disqus.com/en/articles/1717103-disqus-privacy-policy",
12311      "policy_en": "https://help.disqus.com/en/articles/1717103-disqus-privacy-policy",
12312      "category_de": "Externe Medien",
12313      "category_en": "External Media",
12314      "description_de": "<p class=\"description\">Live Kommentare und Diskussionen mit Disqus.</p>",
12315      "description_en": "<p class=\"description\">Live comments and discussion using Disqus.</p>",
12316      "type": "script",
12317      "url_pattern": ["disqus\.com/embed\.js", "disquscdn\.com/", "disqus\.com/\\?ref_noscript"],
12318      "warning_target": "#disqus_thread"
12319    },
12320    "zp_consent_smartsupp": {
12321      "name": "SmartSupp live chat",
12322      "anbieter_de": "Smartsupp.com",
12323      "anbieter_en": "Smartsupp.com",
12324      "policy_de": "https://www.smartsupp.com/help/privacy/",
12325      "policy_en": "https://www.smartsupp.com/help/privacy/",
12326      "category_de": "Externe Medien",
12327      "category_en": "External Media",
12328      "description_de": "<p class=\"description\">Chat mit dem Websitebetreiber.</p>",
12329      "description_en": "<p class=\"description\">Chat with us.</p>",
12330      "type": "script",
12331      "url_pattern": ["//www\.smartsuppchat\.com/"]
12332    },
12333    "zp_consent_userlike": {
12334      "name": "Userlike live chat",
12335      "anbieter_de": "www.userlike.com",
12336      "anbieter_en": "www.userlike.com",
12337      "policy_de": "https://www.userlike.com/de/terms#privacy-policy",
12338      "policy_en": "https://www.userlike.com/en/terms#privacy-policy",
12339      "category_de": "Externe Medien",
12340      "category_en": "External Media",
12341      "description_de": "<p class=\"description\">Chat mit dem Websitebetreiber.</p>",
12342      "description_en": "<p class=\"description\">Chat with us.</p>",
12343      "type": "script",
12344      "url_pattern": ["//userlike-cdn-widgets\."]
12345    },
12346    "zp_consent_instagram": {
12347      "name": "Instagram",
12348      "anbieter_de": "instagram.com",
12349      "anbieter_en": "instagram.com",
12350      "policy_de": "https://help.instagram.com/519522125107875",
12351      "policy_en": "https://www.smartsupp.com/help/privacy/",
12352      "category_de": "Externe Medien",
12353      "category_en": "External Media",
12354      "description_de": "<p class=\"description\">Eingebetteter Instagram-Feed.</p>",
12355      "description_en": "<p class=\"description\">Embedded Instagram-Feed.</p>",
12356      "type": "script",
12357      "url_pattern": ["//www\.instagram\.com/embed\.js"],
12358      "warning_target": ".instagram-media[data-instgrm-permalink]"
12359    },
12360    "zp_consent_elfsight": {
12361      "name": "Elfsight Widgets",
12362      "anbieter_de": "elfsight.com",
12363      "anbieter_en": "elfsight.com",
12364      "policy_de": "https://elfsight.com/privacy-policy/",
12365      "policy_en": "https://elfsight.com/privacy-policy/",
12366      "category_de": "Externe Medien",
12367      "category_en": "External Media",
12368      "description_de": "<p class=\"description\">Diverse Widgets um externe Medien darzustellen.</p>",
12369      "description_en": "<p class=\"description\">Various widgets to display external media.</p>",
12370      "type": "script",
12371      "url_pattern": ["//apps\.elfsight\.com/", "//elfsightcdn\.com/"]
12372    },
12373    "zp_consent_opentable": {
12374      "name": "Open Table",
12375      "anbieter_de": "opentable.de",
12376      "anbieter_en": "opentable.com",
12377      "policy_de": "https://www.opentable.de/legal/privacy-policy",
12378      "policy_en": "https://www.opentable.com/legal/privacy-policy",
12379      "category_de": "Externe Medien",
12380      "category_en": "External Media",
12381      "description_de": "<p class=\"description\">Restaurant-Reservierungen.</p>",
12382      "description_en": "<p class=\"description\">Restaurant reservations.</p>",
12383      "type": "script",
12384      "url_pattern": ["//www\.opentable\.de/widget/", "//www\.opentable\.com/widget/"]
12385    },
12386    "zp_consent_mailchimp": {
12387      "name": "Mailchimp",
12388      "anbieter_de": "mailchimp.com",
12389      "anbieter_en": "mailchimp.com",
12390      "policy_de": "https://mailchimp.com/legal/privacy/",
12391      "policy_en": "https://mailchimp.com/legal/privacy/",
12392      "category_de": "Marketing",
12393      "category_en": "Marketing_EN",
12394      "description_de": "<p class=\"description\">E-Mail Newsletter.</p>",
12395      "description_en": "<p class=\"description\">Email newsletters.</p>",
12396      "type": "script",
12397      "url_pattern": ["//cdn-images\.mailchimp\.com/embedcode/", "//s3\.amazonaws\.com/downloads\.mailchimp\.com/js/"]
12398    },
12399    "zp_consent_werkenntdenbesten": {
12400      "name": "Wer kennt den Besten",
12401      "anbieter_de": "werkenntdenbesten.de",
12402      "anbieter_en": "werkenntdenbesten.de",
12403      "policy_de": "https://www.werkenntdenbesten.de/datenschutz",
12404      "policy_en": "https://www.werkenntdenbesten.de/datenschutz",
12405      "category_de": "Externe Medien",
12406      "category_en": "External Media",
12407      "description_de": "<p class=\"description\">Bewertungsportal.</p>",
12408      "description_en": "<p class=\"description\">Ratings.</p>",
12409      "type": "script",
12410      "url_pattern": ["//download\.werkenntdenbesten\.de/"]
12411    },
12412    "zp_consent_dirs21": {
12413      "name": "DIRS21",
12414      "anbieter_de": "dirs21.de",
12415      "anbieter_en": "dirs21.de",
12416      "policy_de": "https://www.dirs21.de/disclaimer",
12417      "policy_en": "https://www.dirs21.de/disclaimer",
12418      "category_de": "Externe Medien",
12419      "category_en": "External Media",
12420      "description_de": "<p class=\"description\">Onlinebuchung, Channelmanagement und Marketing für Hotels und Gastronomie.</p>",
12421      "description_en": "<p class=\"description\">Web-based reservations and channel mangement system.</p>",
12422      "type": "script",
12423      "url_pattern": ["//js-sdk\.dirs21\.de/"],
12424      "warning_target": "#d21-quickbook"
12425    },
12426    "zp_consent_fewochannel": {
12427      "name": "Fewo-Channelmanager",
12428      "anbieter_de": "SECRA Bookings GmbH",
12429      "anbieter_en": "SECRA Bookings GmbH",
12430      "policy_de": "https://www.fewo-channelmanager.de/datenschutz",
12431      "policy_en": "https://www.fewo-channelmanager.de/data-privacy",
12432      "category_de": "Externe Medien",
12433      "category_en": "External Media",
12434      "description_de": "<p class=\"description\">Multi-Channel-Distribution von Ferienwohnungen &amp; Ferienhäusern.</p>",
12435      "description_en": "<p class=\"description\">Multi-channel distribution of vacation condos and vacation houses.</p>",
12436      "type": "script",
12437      "url_pattern": ["\.fewo-channelmanager\.de/integration/v2/js/object/"]
12438    },
12439    "zp_consent_formstack": {
12440      "name": "Formstack",
12441      "anbieter_de": "formstack.com",
12442      "anbieter_en": "formstack.com",
12443      "policy_de": "https://www.formstack.com/privacy",
12444      "policy_en": "https://www.formstack.com/privacy",
12445      "category_de": "Externe Medien",
12446      "category_en": "External Media",
12447      "description_de": "<p class=\"description\">Website-Formulare.</p>",
12448      "description_en": "<p class=\"description\">Website-Forms.</p>",
12449      "type": "script",
12450      "url_pattern": ["\.formstack\.com/forms/"]
12451    },
12452    "zp_consent_tawkto": {
12453      "name": "Tawk.to live chat",
12454      "anbieter_de": "Tawk.to",
12455      "anbieter_en": "Tawk.to",
12456      "policy_de": "https://www.tawk.to/privacy-policy/",
12457      "policy_en": "https://www.tawk.to/privacy-policy/",
12458      "category_de": "Externe Medien",
12459      "category_en": "External Media",
12460      "description_de": "<p class=\"description\">Chat mit dem Websitebetreiber.</p>",
12461      "description_en": "<p class=\"description\">Chat with us.</p>",
12462      "type": "script",
12463      "url_pattern": ["//embed\.tawk\.to/"]
12464    },
12465    "zp_consent_lautfm": {
12466      "name": "Laut.fm User Generated Radio",
12467      "anbieter_de": "Laut AG",
12468      "anbieter_en": "Laut AG",
12469      "policy_de": "https://laut.fm/pages/privacy",
12470      "policy_en": "https://laut.fm/pages/privacy",
12471      "category_de": "Externe Medien",
12472      "category_en": "External Media",
12473      "description_de": "<p class=\"description\">User Generated Radio.</p>",
12474      "description_en": "<p class=\"description\">User Generated Radio.</p>",
12475      "type": "script",
12476      "url_pattern": ["//api\.laut\.fm/"]
12477    },
12478    "zp_consent_provenexpert": {
12479      "name": "Proven Expert",
12480      "anbieter_de": "Expert Systems AG",
12481      "anbieter_en": "Expert Systems AG",
12482      "policy_de": "https://www.provenexpert.com/de-de/datenschutzbestimmungen/",
12483      "policy_en": "https://www.provenexpert.com/en-gb/privacy-policy/",
12484      "category_de": "Externe Medien",
12485      "category_en": "External Media",
12486      "description_de": "<p class=\"description\">Bewertungsportal.</p>",
12487      "description_en": "<p class=\"description\">Ratings.</p>",
12488      "type": "script",
12489      "url_pattern": ["//www\.provenexpert\.com/", "//s\.provenexpert\.net/seals/"]
12490    },
12491    "zp_consent_osmaps": {
12492      "name": "OpenStreetMap",
12493      "anbieter_de": "OpenStreetMap",
12494      "anbieter_en": "OpenStreetMap",
12495      "policy_de": "https://wiki.osmfoundation.org/wiki/Privacy_Policy",
12496      "policy_en": "https://wiki.osmfoundation.org/wiki/Privacy_Policy",
12497      "category_de": "Externe Medien",
12498      "category_en": "External Media",
12499      "description_de": "<p class=\"description\">Eingebettete Karten von OpenStreetMap.</p>",
12500      "description_en": "<p class=\"description\">Embedded maps from OpenStreetMap.</p>",
12501      "type": "iframe",
12502      "url_pattern": ["//openstreetmap\.org/export/embed\.", "//www\.openstreetmap\.org/export/embed\."]
12503    },
12504    "zp_consent_googlefonts": {
12505      "name": "Google Fonts",
12506      "anbieter_de": "Google",
12507      "anbieter_en": "Google",
12508      "policy_de": "https://policies.google.com/privacy?hl=de",
12509      "policy_en": "https://policies.google.com/privacy",
12510      "category_de": "Externe Medien",
12511      "category_en": "External Media",
12512      "description_de": "<p class=\"description\">Schriftarten, die zur Gestaltung dieser Website genutzt werden.</p>",
12513      "description_en": "<p class=\"description\">Fonts used for the design of this website.</p>",
12514      "type": "script",
12515      "url_pattern": ["assets/js/webfont/1\.6\.28/webfont\.js", "//fonts\.googleapis\.com/", "//fonts\.gstatic\.com/", "//fonts\.googleapis\.com/css"]
12516    },
12517    "zp_consent_bookingtime": {
12518      "name": "Bookingtime",
12519      "anbieter_de": "bookingtime GmbH",
12520      "anbieter_en": "bookingtime GmbH",
12521      "policy_de": "https://www.onlinetermine.com/datenschutz",
12522      "policy_en": "https://www.booking-time.com/privacy",
12523      "category_de": "Externe Medien",
12524      "category_en": "External Media",
12525      "description_de": "<p class=\"description\">Online Terminverwaltung.</p>",
12526      "description_en": "<p class=\"description\">Online appointments.</p>",
12527      "type": "script",
12528      "url_pattern": ["//satellite\.booking-time\.com"]
12529    },
12530    "zp_consent_googlerecaptcha": {
12531      "name": "Google reCAPTCHA",
12532      "anbieter_de": "Google",
12533      "anbieter_en": "Google",
12534      "policy_de": "https://policies.google.com/privacy?hl=de",
12535      "policy_en": "https://policies.google.com/privacy",
12536      "category_de": "Externe Medien",
12537      "category_en": "External Media",
12538      "description_de": "<p class=\"description\">reCAPTCHA wird genutzt um ein automatisiertes Versenden von Formularen zu verhindern.</p>",
12539      "description_en": "<p class=\"description\">reCAPTCHA is used to prevent automated form-submission.</p>",
12540      "type": "script",
12541      "url_pattern": ["//www\.google\.com/recaptcha/", "//www\.gstatic\.com/recaptcha/"]
12542    },
12543    "zp_consent_tockify": {
12544      "name": "Tockify Calendars",
12545      "anbieter_de": "Tockify",
12546      "anbieter_en": "Tockify",
12547      "policy_de": "https://tockify.com/i/docs/company/privacy",
12548      "policy_en": "https://tockify.com/i/docs/company/privacy",
12549      "category_de": "Externe Medien",
12550      "category_en": "External Media",
12551      "description_de": "<p class=\"description\">Tockify Website Kalender.</p>",
12552      "description_en": "<p class=\"description\">Tockify Website Calendars.</p>",
12553      "type": "script",
12554      "url_pattern": ["//public\.tockify\.com/browser/embed\.js"]
12555    },
12556    "zp_consent_igroove": {
12557      "name": "iGroove",
12558      "anbieter_de": "iGroove AG",
12559      "anbieter_en": "iGroove AG",
12560      "policy_de": "https://www.igroovemusic.com/terms",
12561      "policy_en": "https://www.igroovemusic.com/terms?lang=en",
12562      "category_de": "Externe Medien",
12563      "category_en": "External Media",
12564      "description_de": "<p class=\"description\">iGroove Musikvertrieb und Promotion.</p>",
12565      "description_en": "<p class=\"description\">iGroove music distribution and promotion.</p>",
12566      "type": "script",
12567      "url_pattern": ["//app\.igroovenext\.com/user-widget/generate\.js", "//app\.igroovemusic\.com/show-release-widget"],
12568      "warning_target": ".igroove-artist-widget"
12569    },
12570    "zp_consent_aidaform": {
12571      "name": "Aidaform Formulare",
12572      "anbieter_de": "Aidaform",
12573      "anbieter_en": "Aidaform",
12574      "policy_de": "https://de.aidaform.com/privacy-policy.html",
12575      "policy_en": "https://aidaform.com/privacy-policy.html",
12576      "category_de": "Externe Medien",
12577      "category_en": "External Media",
12578      "description_de": "<p class=\"description\">Online Formulare.</p>",
12579      "description_en": "<p class=\"description\">Online Forms.</p>",
12580      "type": "script",
12581      "url_pattern": ["//embed\.aidaform\.com/embed\.js"]
12582    },
12583    "zp_consent_ratedo": {
12584      "name": "Ratedo Kundenbewertungen",
12585      "anbieter_de": "Ratedo",
12586      "anbieter_en": "Ratedo",
12587      "policy_de": "https://www.ratedo.de/datenschutz",
12588      "policy_en": "https://de.aidaform.com/privacy-policy.html",
12589      "category_de": "Externe Medien",
12590      "category_en": "External Media",
12591      "description_de": "<p class=\"description\">Kundenbewertungen.</p>",
12592      "description_en": "<p class=\"description\">Customer-Ratings.</p>",
12593      "type": "script",
12594      "url_pattern": ["//www\.ratedo\.de/js/widgets/"]
12595    },
12596    "zp_consent_calendarappde": {
12597      "name": "Calendarapp.de Belegungskalender",
12598      "anbieter_de": "Calendarapp.de | Tool Loft UG",
12599      "anbieter_en": "Calendarapp.de | Tool Loft UG",
12600      "policy_de": "https://calendarapp.de/seite/datenschutz/",
12601      "policy_en": "https://calendarapp.de/en/seite/privacy-policy/",
12602      "category_de": "Externe Medien",
12603      "category_en": "External Media",
12604      "description_de": "<p class=\"description\">Belegungskalender.</p>",
12605      "description_en": "<p class=\"description\">Booking Calendar.</p>",
12606      "type": "script",
12607      "url_pattern": ["//app\.calendarapp\.de/loadcal\.php"]
12608    },
12609    "zp_consent_gtranslate": {
12610      "name": "Google Translate",
12611      "anbieter_de": "Google",
12612      "anbieter_en": "Google",
12613      "policy_de": "https://policies.google.com/privacy?hl=de",
12614      "policy_en": "https://policies.google.com/privacy",
12615      "category_de": "Externe Medien",
12616      "category_en": "External Media",
12617      "description_de": "<p class=\"description\">Google Übersetzer.</p>",
12618      "description_en": "<p class=\"description\">Google Translator.</p>",
12619      "type": "script",
12620      "url_pattern": ["//translate.google.com/translate_a/element\.js"]
12621    },
12622    "zp_consent_klicktipp": {
12623      "name": "KlickTipp Marketing Automation",
12624      "anbieter_de": "Klick-Tipp Limited",
12625      "anbieter_en": "Klick-Tipp Limited",
12626      "policy_de": "https://www.klicktipp.com/datenschutzerklarung/",
12627      "policy_en": "https://www.klicktipp.com/datenschutzerklarung/",
12628      "category_de": "Marketing",
12629      "category_en": "Marketing_EN",
12630      "description_de": "<p class=\"description\">KlickTipp Marketing Automation.</p>",
12631      "description_en": "<p class=\"description\">KlickTipp Marketing Automation.</p>",
12632      "type": "script",
12633      "url_pattern": ["//assets\.klicktipp\.com/userimages/"]
12634    },
12635    "zp_kundennote": {
12636      "name": "Kundennote Bewertungen",
12637      "anbieter_de": "muto websolutions e.U.",
12638      "anbieter_en": "muto websolutions e.U.",
12639      "policy_de": "https://kundennote.com/datenschutzerklaerung/",
12640      "policy_en": "https://kundennote.com/datenschutzerklaerung/",
12641      "category_de": "Marketing",
12642      "category_en": "Marketing_EN",
12643      "description_de": "<p class=\"description\">Bewertungen für Ihr Unternehmen sammeln.</p>",
12644      "description_en": "<p class=\"description\">Collect ratings for your enterprise.</p>",
12645      "type": "script",
12646      "url_pattern": ["//kundennote\.com/app/widget/"]
12647    },
12648    "zp_consent_trackboxx": {
12649      "name": "Trackboxx",
12650      "anbieter_de": "Trackboxx",
12651      "anbieter_en": "Trackboxx",
12652      "policy_de": "https://trackboxx.com/datenschutzerklaerung/",
12653      "policy_en": "https://trackboxx.com/en/privacy-policy/",
12654      "category_de": "Statistiken",
12655      "category_en": "Statistics",
12656      "description_de": "<p class=\"description\">Website-Analyse und Tracking mit Trackboxx.</p>",
12657      "description_en": "<p class=\"description\">Website analytics and tracking with Trackboxx.</p>",
12658      "type": "script",
12659      "url_pattern": ["//cdn\.trackboxx\.info/p/"],
12660      "OFF_warning_target": '[data-areaname="Standard"] .zpContainer:last'
12661    },
12662    "zp_consent_pretix": {
12663      "name": "Pretix Ticket-Shop",
12664      "anbieter_de": "rami.io GmbH",
12665      "anbieter_en": "rami.io GmbH",
12666      "policy_de": "https://pretix.eu/about/de/privacy",
12667      "policy_en": "https://pretix.eu/about/en/privacy",
12668      "category_de": "Externe Medien",
12669      "category_en": "External Media",
12670      "description_de": "<p class=\"description\">Ticket-Shop für Konferenzen, Festivals, Messen, ...</p>",
12671      "description_en": "<p class=\"description\">Reinventing ticket sales for conferences, festivals, exhibitions, ...</p>",
12672      "type": "script",
12673      "url_pattern": ["//pretix\.eu/"],
12674      "warning_target": "pretix-widget"
12675    },
12676    "zp_consent_golocal": {
12677      "name": "Golocal Bewertungen",
12678      "anbieter_de": "GoLocal GmbH & Co. KG",
12679      "anbieter_en": "GoLocal GmbH & Co. KG",
12680      "policy_de": "https://www.golocal.de/privacy/",
12681      "policy_en": "https://www.golocal.de/privacy/",
12682      "category_de": "Externe Medien",
12683      "category_en": "External Media",
12684      "description_de": "<p class=\"description\">Bewertungen und Empfehlungen…</p>",
12685      "description_en": "<p class=\"description\">Ratings and recommendations…</p>",
12686      "type": "script",
12687      "url_pattern": ["//www\.golocal\.de/widget"]
12688    },
12689    "zp_consent_chatbase": {
12690      "name": "Chatbase | Custom ChatGPT for your data",
12691      "anbieter_de": "Chatbase.co",
12692      "anbieter_en": "Chatbase.co",
12693      "policy_de": "https://www.chatbase.co/privacy",
12694      "policy_en": "https://www.chatbase.co/privacy",
12695      "category_de": "Externe Medien",
12696      "category_en": "External Media",
12697      "description_de": "<p class=\"description\">Kundenspezifische Chatbots…</p>",
12698      "description_en": "<p class=\"description\">Custom Chatbots…</p>",
12699      "type": "script",
12700      "url_pattern": ["//www\.chatbase\.co/embed\.min\.js", "//www\.chatbase\.co/chatbot-iframe/"]
12701    },
12702    "zp_consent_onlineradiobox": {
12703      "name": "Online Radio Box",
12704      "anbieter_de": "Online Radio Box sp.z.o.o.",
12705      "anbieter_en": "Online Radio Box sp.z.o.o.",
12706      "policy_de": "https://onlineradiobox.com/privacy?cs=de.metropol",
12707      "policy_en": "https://onlineradiobox.com/privacy?cs=en.metropol",
12708      "category_de": "Externe Medien",
12709      "category_en": "External Media",
12710      "description_de": "<p class=\"description\">Online Radio.</p>",
12711      "description_en": "<p class=\"description\">Online Radio.</p>",
12712      "type": "script",
12713      "url_pattern": ["//ecdn\.onlineradiobox\.com/js/"],
12714      "warning_target": ".orbL"
12715    },
12716    "zp_consent_tucalendi": {
12717      "name": "Tucalendi Online Terminkalender",
12718      "anbieter_de": "TuCalendi, Inc.",
12719      "anbieter_en": "TuCalendi, Inc.",
12720      "policy_de": "https://www.tucalendi.com/de/privatsphaere",
12721      "policy_en": "https://www.tucalendi.com/en/privacy",
12722      "category_de": "Externe Medien",
12723      "category_en": "External Media",
12724      "description_de": "<p class=\"description\">Online Terminkalender.</p>",
12725      "description_en": "<p class=\"description\">Online Calendar.</p>",
12726      "type": "script",
12727      "url_pattern": ["//widgets\.tucalendi\.com/"]
12728    },
12729    "zp_consent_leadinfo": {
12730      "name": "Leadinfo Lead-Generierung",
12731      "anbieter_de": "Leadinfo B.V.",
12732      "anbieter_en": "Leadinfo B.V.",
12733      "policy_de": "https://www.leadinfo.com/de/rechtliches/datenschutz/",
12734      "policy_en": "https://www.leadinfo.com/en/legal/privacy/",
12735      "category_de": "Externe Medien",
12736      "category_en": "External Media",
12737      "description_de": "<p class=\"description\">Lead-Generierung.</p>",
12738      "description_en": "<p class=\"description\">Lead Generation</p>",
12739      "type": "script",
12740      "url_pattern": ["//cdn\.leadinfo\.eu/"]
12741    },
12742    "zp_consent_trustlocal": {
12743      "name": "Trustlocal",
12744      "anbieter_de": "Trustlocal DACH GmbH",
12745      "anbieter_en": "Trustlocal DACH GmbH",
12746      "policy_de": "https://trustlocal.de/datenschutz/",
12747      "policy_en": "https://trustlocal.de/datenschutz/",
12748      "category_de": "Externe Medien",
12749      "category_en": "External Media",
12750      "description_de": "<p class=\"description\">Finden Sie die besten Dienstleister</p>",
12751      "description_en": "<p class=\"description\">Finden Sie die besten Dienstleister</p>",
12752      "type": "script",
12753      "url_pattern": ["//static\.trustlocal\.de/widget/"],
12754      "warning_target": ".trustoo-widget"
12755    },
12756    "zp_consent_drflex": {
12757      "name": "Dr. Flex",
12758      "anbieter_de": "Dr. Flex GmbH",
12759      "anbieter_en": "Dr. Flex GmbH",
12760      "policy_de": "https://dr-flex.de/datenschutz",
12761      "policy_en": "https://dr-flex.de/datenschutz",
12762      "category_de": "Externe Medien",
12763      "category_en": "External Media",
12764      "description_de": "<p class=\"description\">Online-Terminvergabe für Ärzte.</p>",
12765      "description_en": "<p class=\"description\">Online appointment scheduling for doctors.</p>",
12766      "type": "script",
12767      "url_pattern": ["//dr-flex\.de/embed\.js"]
12768    },
12769    "zp_consent_videolyser": {
12770      "name": "Videolyser",
12771      "anbieter_de": "Videolyser",
12772      "anbieter_en": "Videolyser",
12773      "policy_de": "https://www.videolyser.de/datenschutz.php",
12774      "policy_en": "https://www.videolyser.de/datenschutz.php",
12775      "category_de": "Externe Medien",
12776      "category_en": "External Media",
12777      "description_de": "<p class=\"description\">Video Hosting aus Deutschland für alle Unternehmer - DSGVO konform.</p>",
12778      "description_en": "<p class=\"description\">Video Hosting from Deutschland.</p>",
12779      "type": "iframe",
12780      "url_pattern": ["//www\.videolyser\.de/"]
12781    }
12782  };
12783
12784  // add users custom services via json.file, if any
12785  //console.log("Custom Services: ", zpCustomConsentServices);
12786  if (zpCustomConsentServices && !zpCustomConsentServices.hasOwnProperty('disabled')) {
12787    // store custom ids in array to later add to list of used ids
12788    for (const key of Object.keys(zpCustomConsentServices)) {
12789      zp_custom_settings.push(key);
12790    }
12791    $z.extend(zp_consent_settings, zpCustomConsentServices);
12792  }
12793  zp_consent_ids_by_category = Object.keys(zp_consent_settings).sort(function (a, b) {
12794    var textA = zp_consent_settings[a].category_de.toLowerCase() + zp_consent_settings[a].name.toLowerCase();
12795    var textB = zp_consent_settings[b].category_de.toLowerCase() + zp_consent_settings[b].name.toLowerCase();
12796    return textA < textB ? -1 : textA > textB ? 1 : 0;
12797  });
12798  zp_consent_categories_de = [];
12799  for (var key in zp_consent_settings) {
12800    var cat = zp_consent_settings[key].category_de;
12801    if (zp_consent_categories_de.indexOf(cat) == -1) {
12802      zp_consent_categories_de.push(cat);
12803    }
12804  }
12805  function setScriptContent(node, consent_type) {
12806    if (zpconsent.read_cookie('zp_consent_all') || node.getAttribute("type") == type_attr) {
12807      return;
12808    }
12809    // if page is loaded by screenshot helper in templates build-script, exit early to not show consent-popup
12810    if (navigator.webdriver && window.location.hostname == "localhost" && (window.location.pathname == "/index.html" || window.location.pathname == "/index.php")) {
12811      return;
12812    }
12813
12814    // No consent-popup for screenshot generator.
12815    if ('URLSearchParams' in window && new URLSearchParams(window.location.search).get('for-zp-screenshot') === 'true') {
12816      return;
12817    }
12818
12819    // loop through zp_consent_yt.url_pattern to find out consent-id
12820    var currentSrc = "";
12821    if (consent_type === 'noscript') {
12822      currentSrc = 'noscript';
12823    } else if (consent_type === 'link') {
12824      currentSrc = node.getAttribute("href") || null;
12825    } else {
12826      currentSrc = node.getAttribute("src");
12827    } //debug.log("    " + new Date().getTime() + ' addedNode: ', node);
12828
12829    if (currentSrc) {
12830      var found = false;
12831      currentSrc = currentSrc.toLowerCase();
12832
12833      // check if currentURL matches a local URL which needs to be checked
12834      var checkInternal = false;
12835      for (let i in zp_consent_local_blocklist) {
12836        if (currentSrc.indexOf(zp_consent_local_blocklist[i].toLowerCase()) !== -1) {
12837          // blacklisted local url
12838          checkInternal = true;
12839          break;
12840        }
12841      }
12842      if (!urlIsExternal(currentSrc) && !checkInternal) {
12843        // only block external code, where urls start with https:// or http:// - do not block relative URLs
12844        debug.log("🚀 CurrentSrc is local: " + currentSrc + ' (' + consent_type + ')');
12845        return;
12846      }
12847      debug.log("🚀 CurrentSrc: " + currentSrc + ' (' + consent_type + ')');
12848      loop1:
12849      // für alle dienste warnungen mit "akzeptieren"-Buttons anzeigen
12850      for (let key in zp_consent_settings) {
12851        // debug.log("✅ Checking type: " + zp_consent_settings[key].type + " / Src: " + currentSrc);
12852        if (zp_consent_settings[key].type !== "script" && zp_consent_settings[key].type !== "iframe") {
12853          continue;
12854        }
12855        if (zp_consent_settings[key].url_pattern) {
12856          for (let i in zp_consent_whitelist) {
12857            if (currentSrc.indexOf(zp_consent_whitelist[i].toLowerCase()) !== -1) {
12858              // whitelisted url
12859              found = true;
12860              debug.log("🚀 URL <" + currentSrc + "> is whitelisted");
12861              break loop1;
12862            }
12863          }
12864          //debug.log("🚀 URL <" + currentSrc + "> is NOT whitelisted");
12865
12866          var urlpattern = zp_consent_settings[key].url_pattern;
12867          var warning_target = zp_consent_settings[key].warning_target;
12868          for (let i in urlpattern) {
12869            // if ( consent_type !== 'noscript' && currentSrc.indexOf(urlpattern[i].toLowerCase()) !== -1 ){
12870            if (consent_type !== 'noscript' && new RegExp(urlpattern[i], "i").test(currentSrc)) {
12871              // if no consent was given, disable script
12872              if (!zpconsent.read_cookie(key) && !(consent_type === "link" && node.rel !== "stylesheet")) {
12873                debug.log("🛑 BLOCKING consent_type: " + consent_type + " | ID: " + key + " | URL: " + urlpattern[i]);
12874                var tmpSrc;
12875                if (consent_type === "script") {
12876                  node.setAttribute('type', type_attr);
12877                }
12878                if (consent_type === "link") {
12879                  //node.setAttribute('rel', type_attr);
12880                  //tmpSrc = node.getAttribute("href");
12881                  //node.removeAttribute('href');
12882                  node.remove();
12883                } else {
12884                  tmpSrc = node.getAttribute("src");
12885                  node.removeAttribute('src');
12886                }
12887                node.setAttribute('data-consentid', key);
12888                node.setAttribute('data-src', tmpSrc);
12889
12890                // indicate blocked content
12891                var category = zp_consent_settings[key]['category_' + zp_consentlang];
12892                var displaycategory = zp_consent_categories[category]['name_' + zp_consentlang];
12893                var consentInfo = displaycategory + ' &gt; ' + zp_consent_settings[key].name;
12894                var anbieter = zp_consent_strings['anbieter_label_' + zp_consentlang] + zp_consent_settings[key]['anbieter_' + zp_consentlang] + '<br />';
12895                var descr = '<i>' + zp_consent_settings[key]['description_' + zp_consentlang] + '</i>';
12896                var policy = '<a target="policy" href="' + zp_consent_settings[key]['policy_' + zp_consentlang] + '">' + zp_consent_strings['policy_' + zp_consentlang] + '</a>';
12897                var description = anbieter + descr + policy;
12898                var output = zp_consent_strings['blocked_info_' + zp_consentlang].replace('%s', consentInfo);
12899                output = output.replace('%id', key);
12900                output = output.replace('%b', zp_consent_strings['button_activate_' + zp_consentlang]);
12901                output = output.replace('%d', description);
12902                debug.log("✅ Unblock-Output: " + output);
12903                if (key == "zp_consent_googlerecaptcha") {
12904                  // insert custom warning
12905                  let lfButton = '<p class="butt"><a href="#" data-consentid="zp_consent_googlerecaptcha" role="button" class="default activate button"><span>' + zp_consent_strings['button_activate_' + zp_consentlang] + '</span></a></p>';
12906                  output = zp_consent_strings['blocked_recptcha_' + zp_consentlang].replace('%s', consentInfo);
12907                  output = output.replace('%id', key);
12908                  output = output.replace('%a', anbieter);
12909                  output = output.replace('%d', description);
12910                  output = output.replace('%t', zp_consent_strings['button_activate_' + zp_consentlang]);
12911                  output = output.replace('%b', lfButton);
12912
12913                  // disable the form, so the user doesn't start to fill, which would be lost after a reload withe reCAPTCHA activated
12914                  $z(document).ready(function () {
12915                    $z("form.zpusesrecaptcha input, form.zpusesrecaptcha textarea, form.zpusesrecaptcha select").prop("disabled", true);
12916                  });
12917                }
12918                if (consent_type === "iframe") {
12919                  warning_target = $z(node);
12920                  if (key == 'zp_consent_vimeo') {
12921                    warning_target = $z(node).parents(".zpvideo");
12922                    if ($z(node).parents(".zpvideo").length) {
12923                      // ZP vimeo widget
12924                      warning_target = $z(node).parents(".zpvideo");
12925                    } else if ($z(node).parent().attr("class") !== "zpvideo" && $z(node).parent().prop("tagName") == "DIV" && $z(node).parent().attr("style")) {
12926                      // vimeo might include an additional div if "responsive"-Option is selected when getting 
12927                      // the sharing-code and that div causes a gap due to padding
12928                      // the div is hard to recognize. Example: <div style="padding:56.25% 0 0 0;position:relative;">
12929                      warning_target = $z(node).parent();
12930                    }
12931                  }
12932                  warning_target.replaceWith(output);
12933                } else if (node && node.parentNode && node.parentNode.nodeName !== "HEAD") {
12934                  if (warning_target && $z(warning_target).length) {
12935                    $z(warning_target).replaceWith(output);
12936                    acceptButtons();
12937                  } else {
12938                    warning_target = $z(node);
12939                    $z(warning_target).replaceWith(output);
12940                    acceptButtons();
12941                  }
12942                } else {
12943                  if (key == "zp_consent_googlefonts") {
12944                    debug.log("✅ Unblock-Notice: " + consent_type + " | ID: " + key + " | URL: " + urlpattern[i]);
12945                    // insert custom warning
12946                    let lfButton = '<p class="butt"><a href="#" data-consentid="zp_consent_googlefonts" role="button" class="default activate button"><span>' + zp_consent_strings['button_loadfont_' + zp_consentlang] + '</span></a></p>';
12947                    output = zp_consent_strings['blocked_font_' + zp_consentlang].replace('%s', consentInfo);
12948                    output = output.replace('%id', key);
12949                    output = output.replace('%a', anbieter);
12950                    output = output.replace('%d', description);
12951                    output = output.replace('%t', zp_consent_strings['button_loadfont_' + zp_consentlang]);
12952                    output = output.replace('%b', lfButton);
12953                    //output = output.replace('%b', ifButtons );
12954
12955                    $z(document).ready(function () {
12956                      $z('[data-areaname="Standard"] .zpContainer:last').append(output);
12957                      acceptButtons();
12958                    });
12959                  } else {
12960                    $z(document).ready(function () {
12961                      if (warning_target && $z(warning_target).length) {
12962                        debug.log("✅ Unblock-Notice: " + consent_type + " | ID: " + key + " | URL: " + urlpattern[i]);
12963                        $z(warning_target).replaceWith(output);
12964                        acceptButtons();
12965                      }
12966                    });
12967                  }
12968                }
12969              } else {
12970                debug.log("✅ NOT BLOCKING consent_type: " + consent_type + " | ID: " + key + " | URL: " + urlpattern[i]);
12971                if (zp_gaconsent_ids.indexOf(key) !== -1) {
12972                  // fire google consent v2 for google services
12973                  debug.log("   and granting google consent");
12974                  googleConsentv2('granted');
12975                }
12976              }
12977              found = true;
12978              break loop1;
12979            } else if (consent_type === 'noscript' && new RegExp(urlpattern[i], "i").test(node.outerHTML)) {
12980              debug.log("🛑 NOSCRIPT MATCH: ", node.innerHTML); // iframe source needs to be searched for occurance of url
12981              if (!zpconsent.read_cookie(key)) {
12982                node.innerHTML = "";
12983                node.setAttribute('data-consentid', key);
12984              }
12985              found = true;
12986              break loop1;
12987            }
12988          }
12989        }
12990      }
12991      if (!found && (consent_type == "script" || consent_type == "link" && node.rel == "stylesheet") && !zpconsent.read_cookie('zp_consent_all')) {
12992        // disable external script not found in consent-list
12993        debug.log("🛑 BLOCKING unknnown consent_type: " + consent_type + " | ID: unknown | URL: " + currentSrc);
12994        if (consent_type === "script") {
12995          node.setAttribute('type', type_attr);
12996        }
12997        if (consent_type === "link") {
12998          //node.setAttribute('rel', type_attr);
12999          //tmpSrc = node.getAttribute("href");
13000          //node.removeAttribute('href');
13001          node.remove();
13002        } else {
13003          tmpSrc = node.getAttribute("src");
13004          node.removeAttribute('src');
13005        }
13006        node.setAttribute('data-consentid', 'zp_consent_unknown');
13007        node.setAttribute('data-src', tmpSrc);
13008        if ($z(node).parents('body').length) {
13009          // insert warning, if node is child of body (not head)
13010          anbieter = zp_consent_strings['anbieter_label_' + zp_consentlang];
13011          var buttons = '<p class="butt"><button data-consent-id="zp_consent_unknown" class="default activate">' + zp_consent_strings['button_accept_' + zp_consentlang] + '</button></p>';
13012          output = zp_consent_strings['blocked_unknown_' + zp_consentlang].replace('%s', consentInfo);
13013          output = output.replace('%a', anbieter);
13014          output = output.replace('%u', tmpSrc);
13015          output = output.replace('%b', buttons);
13016          $z(output).insertBefore(node);
13017          //  TODO FIXME: wire up the accept all button
13018          setTimeout(function () {
13019            $z('button[data-consent-id="zp_consent_unknown"].activate').on('click', function (e) {
13020              debug.log("Accept All Button clicked!!!");
13021              e.preventDefault();
13022              acceptAll();
13023            });
13024          }, 50);
13025        }
13026      } else if (!found && consent_type == "iframe" && !blockiframes && !zpconsent.read_cookie('zp_consent_all')) {
13027        // disable external iframe not found in consent-list
13028        debug.log("🛑 BLOCKING consent_type: " + consent_type + " | ID: unknown | URL: " + currentSrc);
13029        tmpSrc = node.getAttribute("src");
13030        node.removeAttribute('src');
13031        node.setAttribute('data-consentid', 'zp_consent_iframe');
13032        node.setAttribute('data-src', tmpSrc);
13033        node.setAttribute('data-height', node.getAttribute("height"));
13034        node.setAttribute('height', '0');
13035        var rewrittennode = $z(node).parent().html();
13036        var $node = $z(node).parent().html(rewrittennode);
13037        if ($node.parents('body').length) {
13038          // insert warning, if node is child of body (not head)
13039          anbieter = zp_consent_strings['anbieter_label_' + zp_consentlang];
13040          var ifButtons = '<p class="butt"><button data-consent-id="zp_consent_iframe" class="default activate">' + zp_consent_strings['button_loadiframe_' + zp_consentlang] + '</button></p>';
13041          output = zp_consent_strings['blocked_iframe_' + zp_consentlang].replace('%s', consentInfo);
13042          output = output.replace('%a', anbieter);
13043          output = output.replace('%u', tmpSrc);
13044          output = output.replace('%t', zp_consent_strings['button_loadiframe_' + zp_consentlang]);
13045          output = output.replace('%b', ifButtons);
13046          $z(output).insertBefore($node.find("iframe"));
13047          // wire up the accept all button
13048          setTimeout(function () {
13049            $node.find('button[data-consent-id="zp_consent_iframe"].activate').on('click', function (e) {
13050              e.preventDefault();
13051              $node.find('iframe').attr('src', $node.find('iframe').attr('data-src'));
13052              $node.find('iframe').attr('height', $node.find('iframe').attr('data-height'));
13053              $node.find('.zpconsentinfo').remove();
13054            });
13055          }, 50);
13056        }
13057      }
13058    }
13059
13060    // workaround for firefox which is loading external scripts also after they've been rewritten by the mutationObserver
13061    // see: https://medium.com/snips-ai/how-to-block-third-party-scripts-with-a-few-lines-of-javascript-f0b08b9c4c0
13062    const beforeScriptExecuteListener = function (event) {
13063      // Prevent only marked scripts from executing
13064      if (node.getAttribute('type') === type_attr) {
13065        debug.log("🛑 BLOCKING Script in Firefox: ", node);
13066        event.preventDefault();
13067      }
13068      node.removeEventListener('beforescriptexecute', beforeScriptExecuteListener);
13069    };
13070    node.addEventListener('beforescriptexecute', beforeScriptExecuteListener);
13071  }
13072  const targetNode = document.getElementsByTagName("html")[0];
13073  const config = {
13074    attributes: false,
13075    childList: true,
13076    subtree: true
13077  };
13078  const callback = function (mutationsList) {
13079    //debug.log('mutationsList: ', mutationsList)
13080    // check scripts in direct nodes
13081    //for(let mutation of mutationsList) {
13082    for (var i = 0; i < mutationsList.length; i++) {
13083      var mutation = mutationsList[i];
13084      //debug.log('mutation.target.nodeName: ' + mutation.target.nodeName + ' | Mutation: ' , mutation.addedNodes)
13085      //debug.log('mutation: ', mutation.addedNodes)
13086      if (mutation.target.nodeName == "SCRIPT") {
13087        //setScriptContent(mutation.target);
13088      }
13089
13090      // check scripts in child nodes 
13091      //for(let addedNode of mutation.addedNodes) {
13092      for (var j = 0; j < mutation.addedNodes.length; j++) {
13093        var addedNode = mutation.addedNodes[j];
13094        if (addedNode.tagName) {
13095          //debug.log("    addedNode type: " + addedNode.nodeType + " | tagName: " + addedNode.tagName );
13096        }
13097        if (addedNode.nodeType === 1 && (addedNode.tagName === 'SCRIPT' || addedNode.tagName === 'NOSCRIPT' || addedNode.tagName === 'IFRAME' || addedNode.tagName === 'LINK')) {
13098          //debug.log("    addedNode: " + addedNode.outerHTML );
13099          //debug.log("✅ addedNode type: " + addedNode.nodeType + " | tagName: " + addedNode.tagName + " | addedNode: " +  addedNode.outerHTML);
13100          setScriptContent(addedNode, addedNode.tagName.toLowerCase());
13101        }
13102      }
13103
13104      // check scripts in child nodes 
13105      /*
13106      for(let addedNode of mutation.ad
13106dedNodes) {
13107      	debug.log("    addedNode: " + addedNode.outerHTML )
13108      	var n = addedNode.outerHTML;
13109      	if ( n && n.indexOf("<script") !== -1 ){
13110      		setScriptContent(addedNode);
13111      	}
13112      }
13113      */
13114    }
13115  };
13116
13117  const observer = new MutationObserver(callback);
13118  observer.observe(targetNode, config);
13119
13120  // rewrite dynamically created scripts
13121  const createElementBackup = document.createElement;
13122  document.createElement = function () {
13123    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
13124      args[_key] = arguments[_key];
13125    }
13126    //debug.log("Create Element: ", args);
13127    // If this is not a script tag, bypass
13128    if (args[0].toLowerCase() !== 'script') return createElementBackup.bind(document)(...args);
13129    const scriptElt = createElementBackup.bind(document)(...args);
13130    const originalSetAttribute = scriptElt.setAttribute.bind(scriptElt);
13131
13132    // Define getters / setters to ensure that the script type is properly set
13133    Object.defineProperties(scriptElt, {
13134      'src': {
13135        get() {
13136          return scriptElt.getAttribute('src');
13137        },
13138        set(value) {
13139          //debug.log('☠️ Script-Element Tag:' + scriptElt.tagName.toLowerCase() + ' | src: ' + value);
13140          var consentid = isOnBlacklist(value, scriptElt.type);
13141          if (consentid) {
13142            originalSetAttribute('type', type_attr);
13143            originalSetAttribute('data-src', value);
13144            originalSetAttribute('data-consentid', consentid);
13145            scriptElt.removeAttribute('src');
13146
13147            // indicate blocked content
13148            var warning_target = zp_consent_settings[consentid].warning_target;
13149            var category = zp_consent_settings[consentid]['category_' + zp_consentlang];
13150            var displaycategory = zp_consent_categories[category]['name_' + zp_consentlang];
13151            var consentInfo = displaycategory + ' &gt; ' + zp_consent_settings[consentid].name;
13152            var anbieter = zp_consent_strings['anbieter_label_' + zp_consentlang] + zp_consent_settings[consentid]['anbieter_' + zp_consentlang] + '<br />';
13153            var descr = zp_consent_strings['descr_label_' + zp_consentlang] + zp_consent_settings[consentid]['description_' + zp_consentlang] + '<br />';
13154            var policy = '<a target="policy" href="' + zp_consent_settings[consentid]['policy_' + zp_consentlang] + '">' + zp_consent_strings['policy_' + zp_consentlang] + '</a>';
13155            var description = anbieter + descr + policy;
13156            var output = zp_consent_strings['blocked_info_' + zp_consentlang].replace('%s', consentInfo);
13157            output = output.replace('%id', consentid);
13158            output = output.replace('%b', zp_consent_strings['button_activate_' + zp_consentlang]);
13159            output = output.replace('%d', description);
13160
13161            //debug.log('☠️  Warning Target: ' + warning_target + ' | Warning Output: ' + output);
13162
13163            if (warning_target) {
13164              $z(document).ready(function () {
13165                debug.log('☠️  Injecting Warning for ' + consentid);
13166                $z(warning_target).replaceWith(output);
13167                acceptButtons();
13168              });
13169            }
13170          } else {
13171            originalSetAttribute('src', value);
13172          }
13173          return;
13174        }
13175      },
13176      'type': {
13177        set(value) {
13178          const typeValue = isOnBlacklist(scriptElt.src, scriptElt.type) ? type_attr : value;
13179          originalSetAttribute('type', typeValue);
13180          return;
13181        }
13182      }
13183    });
13184
13185    // Monkey patch the setAttribute function so that the setter is called instead.
13186    // Otherwise, setAttribute('type', 'whatever') will bypass our custom descriptors!
13187    scriptElt.setAttribute = function (name, value) {
13188      if (name === 'type' || name === 'src') scriptElt[name] = value;else HTMLScriptElement.prototype.setAttribute.call(scriptElt, name, value);
13189    };
13190    return scriptElt;
13191  };
13192  function isOnBlacklist(src) {
13193    if (!src || zpconsent.read_cookie('zp_consent_all')) {
13194      return false;
13195    }
13196    src = src.toString().toLowerCase();
13197    loop1: for (let key in zp_consent_settings) {
13198      if (zp_consent_settings[key].type !== "script" && zp_consent_settings[key].type !== "iframe") {
13199        continue;
13200      }
13201      if (zp_consent_settings[key].url_pattern) {
13202        for (let i in zp_consent_whitelist) {
13203          if (src.indexOf(zp_consent_whitelist[i].toLowerCase()) !== -1) {
13204            // whitelisted url
13205            return false;
13206          }
13207        }
13208        var urlpattern = zp_consent_settings[key].url_pattern;
13209        for (let i in urlpattern) {
13210          if (new RegExp(urlpattern[i], "i").test(src)) {
13211            // if ( src.indexOf(urlpattern[i].toLowerCase()) !== -1 ){
13212            // if no consent was given, disable script
13213            if (!zpconsent.read_cookie(key)) {
13214              debug.log('🛑 BLOCKING dynamic-content | ID: ' + key + ' | URL: ' + src);
13215              return key;
13216            }
13217            break loop1;
13218          }
13219        }
13220      }
13221    }
13222    return false;
13223  }
13224  function setConsent(consent_id, value) {
13225    if (zp_consent_usedids && zp_consent_usedids.indexOf(consent_id) == -1) {
13226      // only store settings for services the user has enabled
13227      return;
13228    }
13229    //console.log("setConsent() consent_id: " + consent_id + " / value: " + value);
13230    if (consent_id !== "zp_consent_all" && value == false) {
13231      // since an individual value changed to false, we need to unset "Accept All"-Status
13232      consentStorage.zp_consent_all = false;
13233    }
13234    consentStorage[consent_id] = value;
13235
13236    // check if category switch indicates correctly
13237    var category_de = $z('#consent input.consent:not(.consentcategory)[name="' + consent_id + '"]').attr('data-category-de');
13238    var settingsInCategory = $z('#consent input.consent:not(.consentcategory)[data-category-de="' + category_de + '"]').length;
13239    var allSettingsInCategoryOn = $z('#consent input.consent:not(.consentcategory)[data-category-de="' + category_de + '"]:checked').length;
13240    if (allSettingsInCategoryOn == 0) {
13241      //debug.log("All Settings in " + category_de + " off!");
13242      $z('#consent input.consent.consentcategory[data-category-de="' + category_de + '"]').prop("checked", false).removeClass("partial");
13243    } else if (allSettingsInCategoryOn == settingsInCategory) {
13244      // all are on
13245      //debug.log("All Settings in " + category_de + " on!");
13246      $z('#consent input.consent.consentcategory[data-category-de="' + category_de + '"]').prop("checked", true).removeClass("partial");
13247    } else {
13248      $z('#consent input.consent.consentcategory[data-category-de="' + category_de + '"]').prop("checked", true).addClass("partial");
13249    }
13250
13251    //debug.log("Consent set: " + consent_id + "(" + category_de + "): " + value + " | allSettingsInCategoryOn: " + allSettingsInCategoryOn + " | settingsInCategory: " + settingsInCategory);
13252  }
13253
13254  function acceptButtons() {
13255    $z('.zpconsentinfo a.activate').off('click.accept');
13256    $z('.zpconsentinfo a.activate').on('click.accept', function (e) {
13257      e.preventDefault();
13258      var consentid = $(this).attr('data-consentid');
13259      if (consentid) {
13260        setConsent(consentid, true);
13261        saveConsent();
13262      }
13263    });
13264  }
13265  function set_cookie(name, value) {
13266    if (!name || name == "") {
13267      return;
13268    }
13269
13270    // update settings object
13271    consentStorage[name] = value;
13272
13273    // store in localStorage
13274    if (supports_html5_storage) {
13275      localStorage.setItem(name, JSON.stringify(value));
13276      return;
13277    }
13278    var date = new Date();
13279    date.setTime(date.getTime() + 30 * 24 * 60 * 60 * 1000); // expire 30 days from today
13280    var cookiestring = 'zp_consent=' + (encodeURIComponent(JSON.stringify(consentStorage)) || '') + '; path=/' + '; expires=' + date.toUTCString();
13281    var secureCookies = window.location.protocol == 'https:' ? true : false;
13282    if (secureCookies) {
13283      cookiestring += '; samesite=none; secure';
13284    }
13285    debug.log("Consent secureCookies: " + secureCookies + " / cookiestring: " + decodeURIComponent(cookiestring).replace(/,/g, ", "));
13286
13287    // set HTTP-Cookie to circumvent safari 7 day limit
13288    var pathToRoot = $z("html").attr("data-ptr") || "";
13289    //console.log("Set HTTP-Cookies to: ", JSON.stringify(consentStorage) );
13290
13291    // if loaded from real server and not in browser preview, set http cookie
13292    if (window.location.href.indexOf("/external-preview/") == -1) {
13293      $z.ajax({
13294        type: 'POST',
13295        cache: false,
13296        //url: pathToRoot + 'assets/php/cc/cookiemonster.php?cookiename=zp_consent&cookievalue=' + encodeURI(JSON.stringify(consentStorage)),
13297        url: pathToRoot + 'assets/php/cc/cookiemonster.php',
13298        data: {
13299          samesite: secureCookies,
13300          cookiename: "zp_consent",
13301          cookievalue: encodeURIComponent(JSON.stringify(consentStorage))
13302        },
13303        timeout: 5000,
13304        dataType: "json",
13305        success: function success(data) {
13306          debug.log("Consent HTTP-Cookie-Result: ", data);
13307          // check if http-cookie was set properly via PHP and set normal cookie as fallback, if not
13308          if (!data.hasOwnProperty("success") || !data.success || (document.cookie + "").indexOf("zp_consent") == -1) {
13309            debug.log("HTTP-Cookie failed, setting browser-cookie to: " + cookiestring);
13310            document.cookie = cookiestring;
13311          }
13312          setTimeout(function () {
13313            // give the http cookies a little time and reload the page after 100ms
13314            debug.log("Reloading page with new cookies");
13315            location.reload(true);
13316          }, 100);
13317        },
13318        error: function error(xhr, status, _error) {
13319          if (status == "timeout") {
13320            console.error("Timeout setting HTTP-Cookies");
13321          } else {
13322            console.error("☠️ Fehler beim setzen des Consent HTTP-Cookies " + n
13322ame + "=" + value + " / Status: " + status + " (" + _error + ")", xhr);
13323          }
13324          document.cookie = cookiestring;
13325          setTimeout(function () {
13326            // give the http cookies a little time and reload the page after 100ms
13327            debug.log("Reloading page with new cookies");
13328            location.reload(true);
13329          }, 100);
13330        }
13331      });
13332    } else {
13333      document.cookie = cookiestring;
13334      setTimeout(function () {
13335        // give the http cookies a little time and reload the page after 100ms
13336        debug.log("Reloading page with new cookies");
13337        location.reload(true);
13338      }, 100);
13339    }
13340  }
13341  function urlIsExternal(url) {
13342    if ((url.indexOf("https://") == 0 || url.indexOf("http://") == 0 || url.indexOf("//") == 0) && url.indexOf(window.location.protocol + "//" + window.location.hostname) !== 0) {
13343      return true;
13344    } else {
13345      return false;
13346    }
13347  }
13348  function saveConsent() {
13349    debug.log("saveConsent()");
13350
13351    /*
13352    for (let key in consentStorage) {
13353    	debug.log("Save cookie key: " + key + " / value: " + consentStorage[key]);
13354    	set_cookie(key, consentStorage[key]);
13355    }
13356    */
13357    // set cookie which indicates, the user has saved once and this is not a first time visit
13358    set_cookie("zp_consent_zp", true);
13359  }
13360  function acceptAll() {
13361    // set cookie to remember we accept all, so we can also load unknown scripts, not listed in consent settings
13362    consentStorage.zp_consent_all = true;
13363
13364    //setConsent('zp_consent_all', true, false);	
13365    $z("#consent input.consent").prop("checked", true).trigger("change");
13366    saveConsent();
13367  }
13368  function denyAll() {
13369    // set cookie to remember we accept all, so we can also load unknown scripts, not listed in consent settings
13370    consentStorage.zp_consent_all = false;
13371    for (let key in consentStorage) {
13372      consentStorage[key] = false;
13373    }
13374    $z("#consent input.consent").prop("checked", false).trigger("change");
13375    saveConsent();
13376  }
13377  zpconsent.openConsent = function () {
13378    let firstTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
13379    // key-shortcuts
13380    $z('body').off('keydown.consent');
13381    $z('body').on('keydown.consent', function (e) {
13382      // add key-shortcuts to overlay
13383      if (e && e.originalEvent && e.originalEvent.repeat) {
13384        // avoid retriggering this due to keyboard autorepeat
13385        return;
13386      }
13387      debug.log("Keydown on keycode: " + e.which);
13388      var inputIsFocused = $("input:focus").length > 0 ? true : false;
13389      if (!firstTime && e.which == 27 && !inputIsFocused) {
13390        e.preventDefault();
13391        // close overlay on ESC
13392        closeConsent(false);
13393      } else if (e.which == 13 && !inputIsFocused) {
13394        e.preventDefault();
13395        // accept all cookies and close overlay on RETURN
13396        $z('#consent button.default').animate({
13397          opacity: .5
13398        }, 150);
13399        $z('#consent button.default').animate({
13400          opacity: 1
13401        }, 150);
13402        $z('#consent button.default').animate({
13403          opacity: .5
13404        }, 150);
13405        $z('#consent button.default').animate({
13406          opacity: 1
13407        }, 150, function () {
13408          acceptAll();
13409          closeConsent(false);
13410        });
13411      }
13412    });
13413
13414    // get window height and set max-height for consent, so content doesn't get 
13415    // covered by the safari URL-Bar on mobile
13416    $z('#consent').css('max-height', window.innerHeight - 20 + "px");
13417
13418    // hide close boxes, so user has to explicitly save on his first visit
13419    if (firstTime) {
13420      $z('#consent a.close, #consent form').hide();
13421      $z('#consent div.buttons a.settings').show().css('display', 'block');
13422      // hide save button on firstTime visite
13423      $z('div.buttons button.save').hide();
13424    } else {
13425      $z('#consent a.close, #consent form, div.buttons button.save').show();
13426      $z('#consent div.buttons a.settings').hide();
13427    }
13428
13429    // open overlay only if not already visible (.backdrop is added when opened)
13430    if (!$z('#consent').hasClass("backdrop")) {
13431      $z('#consenttoggle').addClass('hidden');
13432      $z('#consent').slideToggle(400, function () {
13433        $z('#consent').removeClass("hidden").addClass("backdrop");
13434      });
13435    }
13436  };
13437  function closeConsent() {
13438    let reload = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
13439    $z('body').off('keydown.consent'); // remove key-shortcuts from overlay
13440    $z('#consenttoggle').removeClass('hidden');
13441    $z('#consent').slideToggle(400, function () {
13442      $z('#consent').addClass("hidden").removeClass("backdrop");
13443      if (reload) {
13444        setTimeout(function () {
13445          // give the http cookies a little time and reload the page after 100ms
13446          location.reload(true);
13447        }, 100);
13448      }
13449    });
13450  }
13451
13452  // handle consent settings and overlay
13453  $z(document).ready(function () {
13454    var ptrfallback = "/";
13455    if (window.location && window.location.pathname.indexOf("/external-preview/") == 0) {
13456      // we're in the zp browser-preview
13457      ptrfallback = "";
13458    }
13459    // get widget settings
13460    var pathToRoot = $z("html").attr("data-ptr");
13461    if (typeof pathToRoot === typeof undefined || pathToRoot === false) {
13462      pathToRoot = ptrfallback;
13463    }
13464    $z.ajax({
13465      type: 'GET',
13466      cache: false,
13467      url: pathToRoot + 'assets/consentsettings.json',
13468      timeout: 3000,
13469      dataType: "json",
13470      success: function (data) {
13471        debug.log("Widget-Prefs Result: ", data);
13472        zp_consent_theme = data.theme;
13473        blockiframes = data.blockiframes === '1' ? true : false;
13474        zp_consent_bgcolor_accept = data["zp_consent_bgcolor_accept"];
13475        zp_consent_textcolor_accept = data["zp_consent_textcolor_accept"];
13476        zp_consent_bgcolor_essential = data["zp_consent_bgcolor_essential"];
13477        zp_consent_textcolor_essential = data["zp_consent_textcolor_essential"];
13478        zp_consent_textcolor_gen = data["zp_consent_textcolor_gen"];
13479        zp_consent_linkcolor_gen = data["zp_consent_linkcolor_gen"];
13480        zp_consent_bgcolor_save = data["zp_consent_bgcolor_save"];
13481        zp_consent_textcolor_save = data["zp_consent_textcolor_save"];
13482        zp_consent_pos = data.zp_consent_pos;
13483        zp_consent_usedids = data.zp_consent_ids;
13484        zp_consent_privacypage = data["privacypage_" + zp_consentlang] || "";
13485        zp_consent_privacylinkt = data["ds_linktext_" + zp_consentlang] || zp_consent_strings['policy_' + zp_consentlang];
13486        zp_consent_imprintpage = data["imprintpage_" + zp_consentlang] || "";
13487        zp_consent_imprintlinkt = data["im_linktext_" + zp_consentlang] || zp_consent_strings['imprint_' + zp_consentlang];
13488        zp_consent_buttontitle_accept = data["zp_consent_buttontitle_accept_" + zp_consentlang] || "";
13489        zp_consent_buttontitle_essential = data["zp_consent_buttontitle_essential_" + zp_consentlang] || "";
13490        zp_consent_buttontitle = data["zp_consent_buttontitle_" + zp_consentlang] || "";
13491        zp_consent_description = data["zp_consent_description_" + zp_consentlang] || zp_consent_strings['consent_descr_' + zp_consentlang];
13492        zp_consent_title = data["zp_consent_title_" + zp_consentlang] || zp_consent_strings['consent_title_' + zp_consentlang];
13493
13494        // add custom services to zp_consent_usedids
13495        if (zpCustomConsentServices && Object.keys(zpCustomConsentServices).length) {
13496          zp_consent_usedids = zp_consent_usedids.concat(zp_custom_settings);
13497        }
13498
13499        // generate consent form elements
13500        generateConsent();
13501        if (!blockiframes) {
13502          reenableIframes();
13503        } else {
13504          initIframeWarnings();
13505        }
13506
13507        // "COOKIE AKTIVIEREN"-Buttons für bekannte Dienste, die aber in den Widget-Settings deaktiviert sind ersetzen durch "ALLE AKZEPTIEREN"
13508        fixActivateButtons();
13509      },
13510      error: function (xhr, status, error) {
13511        if (status == "timeout") {
13512          return;
13513        }
13514        console.error("Fehler beim lesen der Consent-Widget-Einstellungen: " + status + " " + error, xhr);
13515
13516        // set sane defaults, if user settings are missing
13517        zp_consent_theme = "light";
13518        blockiframes = true;
13519        zp_consent_pos = "bottom_middle";
13520        zp_consent_usedids = ["zp_consent_disq", "zp_consent_fbcomments", "zp_consent_fbpixel", "zp_consent_fbplugin", "zp_consent_ga", "zp_consent_gmaps", "zp_consent_gtm", "zp_consent_twitter", "zp_consent_vimeo", "zp_consent_yt"];
13521        zp_consent_privacypage = 'href="#"';
13522        zp_consent_privacylinkt = zp_consent_strings['policy_' + zp_consentlang];
13523        zp_consent_imprintpage = 'href="#"';
13524        zp_consent_imprintlinkt = zp_consent_strings['imprint_' + zp_consentlang];
13525        zp_consent_buttontitle_accept = "";
13526        zp_consent_buttontitle_essential = "";
13527        zp_consent_bgcolor_accept = "";
13528        zp_consent_textcolor_accept = "";
13529        zp_consent_bgcolor_essential = "";
13530        zp_consent_textcolor_essential = "";
13531        zp_consent_textcolor_gen = "";
13532        zp_consent_linkcolor_gen = "";
13533        zp_consent_buttontitle = "";
13534        zp_consent_description = "";
13535        zp_consent_title = "";
13536
13537        // add custom services to zp_consent_usedids
13538        if (zp_custom_settings && zp_custom_settings.length) {
13539          zp_consent_usedids = zp_consent_usedids.concat(zp_custom_settings);
13540        }
13541        generateConsent();
13542      }
13543    });
13544    function generateConsent() {
13545      // if page is loaded by screenshot helper in templates build-script, exit early to not show consent-popup
13546      if (navigator.webdriver && window.location.hostname == "localhost" && (window.location.pathname == "/index.html" || window.location.pathname == "/index.php")) {
13547        return;
13548      }
13549
13550      // No consent-popup for screenshot generator.
13551      if ('URLSearchParams' in window && new URLSearchParams(window.location.search).get('for-zp-screenshot') === 'true') {
13552        return;
13553      }
13554      var consentHiddenLabelStyle = 'position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;';
13555      function escapeConsentHtml(value) {
13556        return String(value == null ? "" : value).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
13557      }
13558      function hiddenConsentLabel(value) {
13559        return '<span style="' + consentHiddenLabelStyle + '">' + escapeConsentHtml(value) + '</span>';
13560      }
13561      var policylink = "";
13562      var imprintlink = "";
13563      if (zp_consent_privacypage !== "") {
13564        policylink = '<a ' + zp_consent_privacypage + '>' + zp_consent_privacylinkt + '</a>';
13565      }
13566      if (zp_consent_imprintpage !== "") {
13567        imprintlink = '<a ' + zp_consent_imprintpage + '>' + zp_consent_imprintlinkt + '</a>';
13568      }
13569      if (zp_consent_privacypage !== "" && zp_consent_imprintpage !== "") {
13570        policylink = policylink + ' | ';
13571      }
13572
13573      // inject text color styles from widget into head if set
13574      if (zp_consent_textcolor_gen && zp_consent_textcolor_gen !== "" && zp_consent_textcolor_gen !== "transparent" || zp_consent_linkcolor_gen && zp_consent_linkcolor_gen !== "" && zp_consent_linkcolor_gen !== "transparent") {
13575        var head = document.getElementsByTagName('head')[0],
13576          style = document.createElement('style'),
13577          headstyle = '';
13578        if (zp_consent_textcolor_gen && zp_consent_textcolor_gen !== "" && zp_consent_textcolor_gen !== "transparent") {
13579          headstyle += '#consent, #consent.dark, #consent.darknoborder, #consent.light, #consent.lightnoborder{color: ' + zp_consent_textcolor_gen + ';}';
13580        }
13581        if (zp_consent_linkcolor_gen && zp_consent_linkcolor_gen !== "" && zp_consent_linkcolor_gen !== "transparent") {
13582          headstyle += '#consent a:not(.close), #consent.dark a:not(.close), #consent.light a:not(.close),#consent.darknoborder a:not(.close), #consent.lightnoborder a:not(.close)';
13583          headstyle += '{color: ' + zp_consent_linkcolor_gen + ' !important;}';
13584        }
13585        var rules = document.createTextNode(headstyle.replace(/\s+/g, ' '));
13586        if (style.styleSheet) {
13587          style.styleSheet.cssText = rules.nodeValue;
13588        } else {
13589          style.appendChild(rules);
13590        }
13591        head.appendChild(style);
13592      }
13593
13594      // add content overlay
13595      $z("body").append('<div id="consent" class="hidden' + ' ' + zp_consent_theme + '"><a class="close" title="Schließen / Close" href="#off">✕</a><h3>' + zp_consent_title + '</h3>' + zp_consent_description + '<div class="buttons">\
13596				 <button style="color: ' + zp_consent_textcolor_essential + '; background-color: ' + zp_consent_bgcolor_essential + ';" class="deny">' + zp_consent_buttontitle_essential + '</button> \
13597				 <button style="color: ' + zp_consent_textcolor_accept + '; background-color: ' + zp_consent_bgcolor_accept + ';" class="default accept">' + zp_consent_buttontitle_accept + '</button> \
13598				 <button style="color: ' + zp_consent_textcolor_save + '; background-color: ' + zp_consent_bgcolor_save + ';" class="save">' + zp_consent_strings['button_save_' + zp_consentlang] + '</button>\
13599				 <br /><a href="#" role="button" class="settings"><i class="fa fa-gear fr-deletable"></i> ' + zp_consent_strings['title_settings_' + zp_consentlang] + '</a></div>' + '<form></form><div id="zpconsentlinks">' + policylink + imprintlink + '</div></div>');
13600      if (!zp_consent_buttontitle) {
13601        $z("body").append('<div id="consenttoggle" class="screenonly ' + zp_consent_theme + ' ' + zp_consent_pos + '"><a href="#" title="' + zp_consent_strings['consent_title_' + zp_consentlang] + '" class="toggleconsent"><svg viewBox="0 0 48 48" width="48" height="48"><g stroke-linecap="square" stroke-linejoin="miter" stroke-width="2" fill="#333333" stroke="#333333"><path data-color="color-2" fill="#F2F2F2" stroke-miterlimit="10" d="M26.062,5 C28.177,3.133,30.955,2,34,2c6.627,0,12,5.373,12,12c0,3.077-1.147,5.879-3.041,8"></path> <circle fill="#E7E7E7" stroke="#333333" stroke-miterlimit="10" cx="20" cy="28" r="18"></circle> <circle fill="none" stroke="#333333" stroke-miterlimit="10" cx="22" cy="18" r="1"></circle> <circle data-color="color-2" fill="none" stroke-miterlimit="10" cx="35" cy="10" r="1"></circle> <circle fill="none" stroke="#333333" stroke-miterlimit="10" cx="11" cy="24" r="1"></circle> <circle fill="none" stroke="#333333" stroke-miterlimit="10" cx="30" cy="31" r="1"></circle> <circle fill="none" stroke="#333333" stroke-miterlimit="10" cx="20" cy="29" r="1"></circle> <circle fill="none" stroke="#333333" stroke-miterlimit="10" cx="15" cy="38" r="1"></circle> <circle fill="#333333" cx="22" cy="18" r="1"></circle> <circle data-color="color-2" data-stroke="none" cx="35" cy="10" r="1" stroke="none"></circle> <circle fill="#333333" cx="11" cy="24" r="1"></circle> <circle fill="#333333" cx="30" cy="31" r="1"></circle> <circle fill="#333333" cx="20" cy="29" r="1"></circle> <circle fill="#333333" cx="15" cy="38" r="1"></circle></g></svg></a></div>');
13602      } else {
13603        $z("body").append('<div id="consenttoggle" class="screenonly textonly ' + zp_consent_theme + ' ' + zp_consent_pos + '"><a href="#" title="' + zp_consent_strings['consent_title_' + zp_consentlang] + '" role="button" class="toggleconsent">' + zp_consent_buttontitle + '</a></div>');
13604      }
13605
13606      // fill the form with checkboxes for all consent_ids
13607      debug.log("Generating Consent-Form");
13608      var currentCategory = "";
13609      for (var theid in zp_consent_ids_by_category) {
13610        var id = zp_consent_ids_by_category[theid];
13611        var category = zp_consent_settings[id]['category_' + zp_consentlang];
13612        var category_de = zp_consent_settings[id]['category_de'];
13613        var displaycategory = zp_consent_categories[category]['name_' + zp_consentlang];
13614        var alwaysdisplay = zp_consent_categories[category].hasOwnProperty('show_switch') ? !zp_consent_categories[category].show_switch : false;
13615        if (!alwaysdisplay && zp_consent_usedids && zp_consent_usedids.indexOf(id) == -1) {
13616          continue;
13617        }
13618        var anbieter = zp_consent_settings[id]['anbieter_' + zp_consentlang];
13619        var name = zp_consent_settings[id].name;
13620        var descr = zp_consent_settings[id]['description_' + zp_consentlang];
13621        //debug.log("Category: >" + category + "< | Consentlang: " + zp_consentlang, zp_consent_categories[category]);
13622        var catdescription = zp_consent_categories[category]['description_' + zp_consentlang];
13623        var showswitch = zp_consent_categories[category].hasOwnProperty("show_switch") ? zp_consent_categories[category].show_switch : true;
13624        var policy = zp_consent_settings[id]['policy_' + zp_consentlang];
13625        var categorySwitchLabel = displaycategory;
13626        var serviceSwitchLabel = displaycategory + ': ' + name;
13627        if (currentCategory !== category) {
13628          currentCategory = category;
13629          if (showswitch) {
13630            $z('#consent form').append('<div class="cat" data-category-de="' + category_de + '"><label class="switch consentcategory"><input data-category-de="' + category_de + '" class="consent consentcategory ' + category + '" type="checkbox" name="' + category + '" aria-label="' + escapeConsentHtml(categorySwitchLabel) + '"><span class="slider round"></span>' + hiddenConsentLabel(categorySwitchLabel) + '</label><h4>' + displaycategory + '</h4>' + catdescription + '<p class="center"><a class="showconsentinfo" href="#">' + zp_consent_strings['show_info_' + zp_consentlang] + '</a></p></div>');
13631          } else {
13632            $z('#consent form').append('<div class="cat" data-category-de="' + category_de + '"><h4>' + category + '</h4>' + catdescription + '<p class="center"><a class="showconsentinfo" href="#">' + zp_consent_strings['show_info_' + zp_consentlang] + '</a></p></div>');
13633          }
13634        }
13635        if (showswitch) {
13636          $z('#consent form div[data-category-de="' + category_de + '"]').append('<div>' + zp_consent_strings['name_label_' + zp_consentlang] + name + ' <label class="switch"><input data-category-de="' + category_de + '" class="consent ' + id + '" type="checkbox" name="' + id + '" aria-label="' + escapeConsentHtml(serviceSwitchLabel) + '"><span class="slider round"></span>' + hiddenConsentLabel(serviceSwitchLabel) + '</label><p>' + zp_consent_strings['anbieter_label_' + zp_consentlang] + anbieter + '</p>' + descr + '<p class="policylink"><a target="policy" href="' + policy + '">' + zp_consent_strings['policy_' + zp_consentlang] + '</a></p></div>');
13637        } else {
13638          $z('#consent form div[data-category-de="' + category_de + '"]').append('<div>' + zp_consent_strings['name_label_' + zp_consentlang] + name + '<p>' + zp_consent_strings['anbieter_label_' + zp_consentlang] + anbieter + '</p>' + descr + '<p class="policylink"><a ' + zp_consent_privacypage + '>' + zp_consent_strings['policy_' + zp_consentlang] + '</a></p></div>');
13639        }
13640      }
13641
13642      // wire up button to toggle consent form display
13643      $z('a.toggleconsent').on("click", function (e) {
13644        e.preventDefault();
13645        zpconsent.openConsent();
13646      });
13647
13648      // wire up close-button to close content-overlay
13649      $z('#consent a.close').on("click", function (e) {
13650        e.preventDefault();
13651        closeConsent();
13652      });
13653
13654      // wire up cookie-settings-link
13655      $z('#consent div.buttons a.settings').off("click.zpconsentsettings");
13656      $z('#consent div.buttons a.settings').on("click.zpconsentsettings", function (e) {
13657        e.preventDefault();
13658        // show save button
13659        $z('div.buttons button.save').show();
13660        $z('#consent form, #consent div.buttons a.settings').toggle(400);
13661      });
13662
13663      // wire up accept all / save buttons
13664      $z('#consent div.buttons button').off("click.zpconsent");
13665      $z('#consent div.buttons button').on("click.zpconsent", function (e) {
13666        e.preventDefault();
13667        // accept all button
13668        if ($z(this).hasClass('accept')) {
13669          acceptAll();
13670          closeConsent(false);
13671        }
13672        // deny all button (accept essential
13673        if ($z(this).hasClass('deny')) {
13674          denyAll();
13675          closeConsent(false);
13676        }
13677        // save settings button
13678        if ($z(this).hasClass('save')) {
13679          saveConsent();
13680          closeConsent(false);
13681        }
13682      });
13683      // sync checkbox state with cookies
13684      for (let key in zp_consent_settings) {
13685        //debug.log(key, zp_consent_settings[key]);
13686        if (zpconsent.read_cookie(key)) {
13687          $z("#consent input:not(.consentcategory).consent." + key).prop("checked", true);
13688          setConsent(key, true);
13689        } else {
13690          $z("#consent input:not(.consentcategory).consent." + key).prop("checked", false);
13691          setConsent(key, false);
13692        }
13693      }
13694      if (zpconsent.read_cookie('zp_consent_all')) {
13695        consentStorage['zp_consent_all'] = true;
13696      } else {
13697        consentStorage['zp_consent_all'] = false;
13698      }
13699
13700      // set checked status for category checkboxes
13701      $z("#consent input.consentcategory").each(function () {
13702        var currentCategory = $z(this).attr('data-category-de');
13703        var checked = false;
13704        $z(this).parents('form').first().find('input:not(.consentcategory)[data-category-de="' + currentCategory + '"]').each(function () {
13705          if ($z(this).prop("checked")) {
13706            checked = true;
13707            return false;
13708          }
13709        });
13710        $z(this).prop("checked", checked);
13711      });
13712
13713      // set consent via checkboxes
13714      $z("#consent input.consent").on("change", function () {
13715        debug.log("Input changed: ", $z(this));
13716        if ($z(this).hasClass('consentcategory')) {
13717          // enable whole category
13718          var currentCategory = $z(this).attr('data-category-de');
13719          var checked = $z(this).prop("checked");
13720          $z(this).parents('form').first().find('input:not(.consentcategory)[data-category-de="' + currentCategory + '"]').each(function () {
13721            debug.log("Category clicked: " + $z(this).attr("name"));
13722            // when turning on, we only turn on the items, the user has enabled
13723            $z(this).prop("checked", checked);
13724            if (checked) {
13725              setConsent($z(this).attr("name"), checked);
13726            }
13727          });
13728          // when turning off, we turn all items of the category no matter if user has enabled them or not
13729          if (!checked) {
13730            // unset setting/cookie to remember we accept all, so we can also load unknown scripts, not listed in consent settings
13731            consentStorage.zp_consent_all = false;
13732            for (let key in zp_consent_settings) {
13733              var cat = zp_consent_settings[key].category_de;
13734              if (cat == currentCategory) {
13735                setConsent(key, checked);
13736              }
13737            }
13738          }
13739        } else {
13740          // enable single ID
13741          setConsent($z(this).attr("name"), $z(this).prop("checked"));
13742        }
13743      });
13744
13745      // show more consent info
13746      $z('#consent a.showconsentinfo').on("click", function (e) {
13747        e.preventDefault();
13748        var thishtml = $z(this).html() || "";
13749
13750        // reset linktext of all categories
13751        $z('#consent a.showconsentinfo').html(zp_consent_strings['show_info_' + zp_consentlang]);
13752
13753        // replace displayed linktext of clicked category		
13754        if (thishtml.indexOf(zp_consent_strings['show_info_' + zp_consentlang]) !== -1) {
13755          $z(this).html(zp_consent_strings['hide_info_' + zp_consentlang]);
13756        }
13757        if (thishtml.indexOf(zp_consent_strings['hide_info_' + zp_consentlang]) !== -1) {
13758          $z(this).html(zp_consent_strings['show_info_' + zp_consentlang]);
13759        }
13760        var clickedCategory = $z(this).parents("div.cat").attr("data-category-de") || "";
13761        // hide previously opened info
13762        $z('#consent div.cat:not([data-category-de="' + clickedCategory + '"]) > div:visible').slideUp();
13763
13764        // show info for current category
13765        $z(this).parents('div').first().find("div").slideToggle();
13766      });
13767    }
13768    function reenableIframes() {
13769      // if set to not block iFrames, restore already blocked ones (blocked before user prefs could be read)
13770      $z('iframe[data-consentid="zp_consent_iframe"]').each(function () {
13771        debug.log("✅ unblock iframe: ", this);
13772        $z(this).attr('src', $z(this).attr('data-src'));
13773        $z(this).attr('height', $z(this).attr('data-height'));
13774        $z(this).parent().find('.zpconsentinfo').remove();
13775      });
13776    }
13777    function initIframeWarnings() {
13778      // replace text placeholders in warnings with user-prefs
13779      $z('.zpconsentinfo.iframe span.smallprint').each(function () {
13780        debug.log("✅ unblock iframe: ", this);
13781        var currHtml = $z(this).html();
13782        currHtml = currHtml.replace("%dsu", zp_consent_privacypage);
13783        currHtml = currHtml.replace("%dst", zp_consent_privacylinkt);
13784        $z(this).html(currHtml);
13785      });
13786    }
13787    function fixActivateButtons() {
13788      // "COOKIE AKTIVIEREN"-Buttons für bekannte Dienste, die aber in den Widget
13788-Settings deaktiviert sind ersetzen durch "ALLE AKZEPTIEREN"
13789      $z('.zpconsentinfo p.butt a.button.activate').each(function () {
13790        var cid = $z(this).attr("data-consentid");
13791        if (zp_consent_usedids && zp_consent_usedids.indexOf(cid) == -1) {
13792          var $buttonParent = $z(this).parent();
13793          debug.warn("Consent ID " + cid + " used in button not found in active services!");
13794          // replace the buttonwith an "accept all" button
13795          var replacedButton = '<button data-consent-id="zp_consent_unknown" class="default activate">' + zp_consent_strings['button_accept_' + zp_consentlang] + '</button>';
13796          $buttonParent.html(replacedButton);
13797          // replace first paragraph "Aktivieren Sie das Cookie Externe Medien > Google Maps um diesen Inhalt anzuzeigen!"
13798          $buttonParent.parents(".zpconsentinfo").find('p').first().html(zp_consent_strings['blocked_info_notactive_' + zp_consentlang]);
13799
13800          // wire up the accept all button
13801          $buttonParent.find('button[data-consent-id="zp_consent_unknown"].activate').on('click', function (e) {
13802            e.preventDefault();
13803            acceptAll();
13804            setTimeout(function () {
13805              // give the http cookies a little time and reload the page after 100ms
13806              location.reload(true);
13807            }, 100);
13808          });
13809        }
13810      });
13811    }
13812
13813    // wire up accept buttons in content deactivated notices
13814    acceptButtons();
13815  });
13816}
13817function zpHasClass(el, className) {
13818  return el.classList ? el.classList.contains(className) : new RegExp('\\b' + className + '\\b').test(el.className);
13819}
13820function does_support_html5_storage() {
13821  // do not use for now:
13822  return false;
13823  /*
13824  try {
13825  	return 'localStorage' in window && window['localStorage'] !== null;
13826  } catch (e) {
13827  	return false;
13828  }
13829  */
13830}
13831
13832function googleConsentv2(action) {
13833  // console.log("✅ Google Consent V2 action = " + action);
13834  if (action !== "denied" && action !== "granted") {
13835    return;
13836  }
13837  gtag('consent', 'update', {
13838    ad_user_data: action,
13839    ad_personalization: action,
13840    ad_storage: action,
13841    analytics_storage: action
13842  });
13843}
13844if (!zpHasClass(document.getElementsByTagName("html")[0], "zppreview")) {
13845  initcontent();
13846  if (!zpconsent.read_cookie("zp_consent_zp")) {
13847    // .load might not fire if page is cached, so we fallback with this
13848    fallbackOpener = window.setTimeout(function () {
13849      debug.log("Delayed Opener as load didn't fire within 10 seconds");
13850      zpconsent.openConsent(true);
13851    }, 10000);
13852    $z(window).off("load.zpconsent");
13853    $z(window).on("load.zpconsent", function () {
13854      //alert("Window load!");
13855      window.clearTimeout(fallbackOpener);
13856      window.setTimeout(function () {
13857        zpconsent.openConsent(true);
13858      }, 500);
13859    });
13860  }
13861}
13862
13863/* ===================================================
13864 * bootstrap-transition.js v2.1.1
13865 * http://twitter.github.com/bootstrap/javascript.html#transitions
13866 * ===================================================
13867 * Copyright 2012 Twitter, Inc.
13868 *
13869 * Licensed under the Apache License, Version 2.0 (the "License");
13870 * you may not use this file except in compliance with the License.
13871 * You may obtain a copy of the License at
13872 *
13873 * http://www.apache.org/licenses/LICENSE-2.0
13874 *
13875 * Unless required by applicable law or agreed to in writing, software
13876 * distributed under the License is distributed on an "AS IS" BASIS,
13877 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13878 * See the License for the specific language governing permissions and
13879 * limitations under the License.
13880 * ========================================================== */
13881
13882
13883!function ($) {
13884
13885  $(function () {
13886
13887    "use strict"; // jshint ;_;
13888
13889
13890    /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
13891     * ======================================================= */
13892
13893    $.support.transition = (function () {
13894
13895      var transitionEnd = (function () {
13896
13897        var el = document.createElement('bootstrap')
13898          , transEndEventNames = {
13899               'WebkitTransition' : 'webkitTransitionEnd'
13900            ,  'MozTransition'    : 'transitionend'
13901            ,  'OTransition'      : 'oTransitionEnd otransitionend'
13902            ,  'transition'       : 'transitionend'
13903            }
13904          , name
13905
13906        for (name in transEndEventNames){
13907          if (el.style[name] !== undefined) {
13908            return transEndEventNames[name]
13909          }
13910        }
13911
13912      }())
13913
13914      return transitionEnd && {
13915        end: transitionEnd
13916      }
13917
13918    })()
13919
13920  })
13921
13922}(window.jQuery);/* ==========================================================
13923 * bootstrap-alert.js v2.1.1
13924 * http://twitter.github.com/bootstrap/javascript.html#alerts
13925 * ==========================================================
13926 * Copyright 2012 Twitter, Inc.
13927 *
13928 * Licensed under the Apache License, Version 2.0 (the "License");
13929 * you may not use this file except in compliance with the License.
13930 * You may obtain a copy of the License at
13931 *
13932 * http://www.apache.org/licenses/LICENSE-2.0
13933 *
13934 * Unless required by applicable law or agreed to in writing, software
13935 * distributed under the License is distributed on an "AS IS" BASIS,
13936 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13937 * See the License for the specific language governing permissions and
13938 * limitations under the License.
13939 * ========================================================== */
13940
13941
13942!function ($) {
13943
13944  "use strict"; // jshint ;_;
13945
13946
13947 /* ALERT CLASS DEFINITION
13948  * ====================== */
13949
13950  var dismiss = '[data-dismiss="alert"]'
13951    , Alert = function (el) {
13952        $(el).on('click', dismiss, this.close)
13953      }
13954
13955  Alert.prototype.close = function (e) {
13956    var $this = $(this)
13957      , selector = $this.attr('data-target')
13958      , $parent
13959
13960    if (!selector) {
13961      selector = $this.attr('href')
13962      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
13963    }
13964
13965    $parent = $(selector)
13966
13967    e && e.preventDefault()
13968
13969    $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
13970
13971    $parent.trigger(e = $.Event('close'))
13972
13973    if (e.isDefaultPrevented()) return
13974
13975    $parent.removeClass('in')
13976
13977    function removeElement() {
13978      $parent
13979        .trigger('closed')
13980        .remove()
13981    }
13982
13983    $.support.transition && $parent.hasClass('fade') ?
13984      $parent.on($.support.transition.end, removeElement) :
13985      removeElement()
13986  }
13987
13988
13989 /* ALERT PLUGIN DEFINITION
13990  * ======================= */
13991
13992  $.fn.alert = function (option) {
13993    return this.each(function () {
13994      var $this = $(this)
13995        , data = $this.data('alert')
13996      if (!data) $this.data('alert', (data = new Alert(this)))
13997      if (typeof option == 'string') data[option].call($this)
13998    })
13999  }
14000
14001  $.fn.alert.Constructor = Alert
14002
14003
14004 /* ALERT DATA-API
14005  * ============== */
14006
14007  $(function () {
14008    $('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
14009  })
14010
14011}(window.jQuery);/* ============================================================
14012 * bootstrap-button.js v2.1.1
14013 * http://twitter.github.com/bootstrap/javascript.html#buttons
14014 * ============================================================
14015 * Copyright 2012 Twitter, Inc.
14016 *
14017 * Licensed under the Apache License, Version 2.0 (the "License");
14018 * you may not use this file except in compliance with the License.
14019 * You may obtain a copy of the License at
14020 *
14021 * http://www.apache.org/licenses/LICENSE-2.0
14022 *
14023 * Unless required by applicable law or agreed to in writing, software
14024 * distributed under the License is distributed on an "AS IS" BASIS,
14025 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14026 * See the License for the specific language governing permissions and
14027 * limitations under the License.
14028 * ============================================================ */
14029
14030
14031!function ($) {
14032
14033  "use strict"; // jshint ;_;
14034
14035
14036 /* BUTTON PUBLIC CLASS DEFINITION
14037  * ============================== */
14038
14039  var Button = function (element, options) {
14040    this.$element = $(element)
14041    this.options = $.extend({}, $.fn.button.defaults, options)
14042  }
14043
14044  Button.prototype.setState = function (state) {
14045    var d = 'disabled'
14046      , $el = this.$element
14047      , data = $el.data()
14048      , val = $el.is('input') ? 'val' : 'html'
14049
14050    state = state + 'Text'
14051    data.resetText || $el.data('resetText', $el[val]())
14052
14053    $el[val](data[state] || this.options[state])
14054
14055    // push to event loop to allow forms to submit
14056    setTimeout(function () {
14057      state == 'loadingText' ?
14058        $el.addClass(d).attr(d, d) :
14059        $el.removeClass(d).removeAttr(d)
14060    }, 0)
14061  }
14062
14063  Button.prototype.toggle = function () {
14064    var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
14065
14066    $parent && $parent
14067      .find('.active')
14068      .removeClass('active')
14069
14070    this.$element.toggleClass('active')
14071  }
14072
14073
14074 /* BUTTON PLUGIN DEFINITION
14075  * ======================== */
14076
14077  $.fn.button = function (option) {
14078    return this.each(function () {
14079      var $this = $(this)
14080        , data = $this.data('button')
14081        , options = typeof option == 'object' && option
14082      if (!data) $this.data('button', (data = new Button(this, options)))
14083      if (option == 'toggle') data.toggle()
14084      else if (option) data.setState(option)
14085    })
14086  }
14087
14088  $.fn.button.defaults = {
14089    loadingText: 'loading...'
14090  }
14091
14092  $.fn.button.Constructor = Button
14093
14094
14095 /* BUTTON DATA-API
14096  * =============== */
14097
14098  $(function () {
14099    $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
14100      var $btn = $(e.target)
14101      if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
14102      $btn.button('toggle')
14103    })
14104  })
14105
14106}(window.jQuery);/* ==========================================================
14107 * bootstrap-carousel.js v2.1.1
14108 * http://twitter.github.com/bootstrap/javascript.html#carousel
14109 * ==========================================================
14110 * Copyright 2012 Twitter, Inc.
14111 *
14112 * Licensed under the Apache License, Version 2.0 (the "License");
14113 * you may not use this file except in compliance with the License.
14114 * You may obtain a copy of the License at
14115 *
14116 * http://www.apache.org/licenses/LICENSE-2.0
14117 *
14118 * Unless required by applicable law or agreed to in writing, software
14119 * distributed under the License is distributed on an "AS IS" BASIS,
14120 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14121 * See the License for the specific language governing permissions and
14122 * limitations under the License.
14123 * ========================================================== */
14124
14125
14126!function ($) {
14127
14128  "use strict"; // jshint ;_;
14129
14130
14131 /* CAROUSEL CLASS DEFINITION
14132  * ========================= */
14133
14134  var Carousel = function (element, options) {
14135    this.$element = $(element)
14136    this.options = options
14137    this.options.slide && this.slide(this.options.slide)
14138    this.options.pause == 'hover' && this.$element
14139      .on('mouseenter', $.proxy(this.pause, this))
14140      .on('mouseleave', $.proxy(this.cycle, this))
14141  }
14142
14143  Carousel.prototype = {
14144
14145    cycle: function (e) {
14146      if (!e) this.paused = false
14147      this.options.interval
14148        && !this.paused
14149        && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
14150      return this
14151    }
14152
14153  , to: function (pos) {
14154      var $active = this.$element.find('.item.active')
14155        , children = $active.parent().children()
14156        , activePos = children.index($active)
14157        , that = this
14158
14159      if (pos > (children.length - 1) || pos < 0) return
14160
14161      if (this.sliding) {
14162        return this.$element.one('slid', function () {
14163          that.to(pos)
14164        })
14165      }
14166
14167      if (activePos == pos) {
14168        return this.pause().cycle()
14169      }
14170
14171      return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos]))
14172    }
14173
14174  , pause: function (e) {
14175      if (!e) this.paused = true
14176      if (this.$element.find('.next, .prev').length && $.support.transition.end) {
14177        this.$element.trigger($.support.transition.end)
14178        this.cycle()
14179      }
14180      clearInterval(this.interval)
14181      this.interval = null
14182      return this
14183    }
14184
14185  , next: function () {
14186      if (this.sliding) return
14187      return this.slide('next')
14188    }
14189
14190  , prev: function () {
14191      if (this.sliding) return
14192      return this.slide('prev')
14193    }
14194
14195  , slide: function (type, next) {
14196      var $active = this.$element.find('.item.active')
14197        , $next = next || $active[type]()
14198        , isCycling = this.interval
14199        , direction = type == 'next' ? 'left' : 'right'
14200        , fallback  = type == 'next' ? 'first' : 'last'
14201        , that = this
14202        , e = $.Event('slide', {
14203            relatedTarget: $next[0]
14204          })
14205
14206      this.sliding = true
14207
14208      isCycling && this.pause()
14209
14210      $next = $next.length ? $next : this.$element.find('.item')[fallback]()
14211
14212      if ($next.hasClass('active')) return
14213
14214      if ($.support.transition && this.$element.hasClass('slide')) {
14215        this.$element.trigger(e)
14216        if (e.isDefaultPrevented()) return
14217        $next.addClass(type)
14218        $next[0].offsetWidth // force reflow
14219        $active.addClass(direction)
14220        $next.addClass(direction)
14221        this.$element.one($.support.transition.end, function () {
14222          $next.removeClass([type, direction].join(' ')).addClass('active')
14223          $active.removeClass(['active', direction].join(' '))
14224          that.sliding = false
14225          setTimeout(function () { that.$element.trigger('slid') }, 0)
14226        })
14227      } else {
14228        this.$element.trigger(e)
14229        if (e.isDefaultPrevented()) return
14230        $active.removeClass('active')
14231        $next.addClass('active')
14232        this.sliding = false
14233        this.$element.trigger('slid')
14234      }
14235
14236      isCycling && this.cycle()
14237
14238      return this
14239    }
14240
14241  }
14242
14243
14244 /* CAROUSEL PLUGIN DEFINITION
14245  * ========================== */
14246
14247  $.fn.carousel = function (option) {
14248    return this.each(function () {
14249      var $this = $(this)
14250        , data = $this.data('carousel')
14251        , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
14252        , action = typeof option == 'string' ? option : options.slide
14253      if (!data) $this.data('carousel', (data = new Carousel(this, options)))
14254      if (typeof option == 'number') data.to(option)
14255      else if (action) data[action]()
14256      else if (options.interval) data.cycle()
14257    })
14258  }
14259
14260  $.fn.carousel.defaults = {
14261    interval: 5000
14262  , pause: 'hover'
14263  }
14264
14265  $.fn.carousel.Constructor = Carousel
14266
14267
14268 /* CAROUSEL DATA-API
14269  * ================= */
14270
14271  $(function () {
14272    $('body').on('click.carousel.data-api', '[data-slide]', function ( e ) {
14273      var $this = $(this), href
14274        , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
14275        , options = !$target.data('modal') && $.extend({}, $target.data(), $this.data())
14276      $target.carousel(options)
14277      e.preventDefault()
14278    })
14279  })
14280
14281}(window.jQuery);/* =============================================================
14282 * bootstrap-collapse.js v2.1.1
14283 * http://twitter.github.com/bootstrap/javascript.html#collapse
14284 * =============================================================
14285 * Copyright 2012 Twitter, Inc.
14286 *
14287 * Licensed under the Apache License, Version 2.0 (the "License");
14288 * you may not use this file except in compliance with the License.
14289 * You may obtain a copy of the License at
14290 *
14291 * http://www.apache.org/licenses/LICENSE-2.0
14292 *
14293 * Unless required by applicable law or agreed to in writing, software
14294 * distributed under the License is distributed on an "AS IS" BASIS,
14295 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14296 * See the License for the specific language governing permissions and
14297 * limitations under the License.
14298 * ============================================================ */
14299
14300
14301!function ($) {
14302
14303  "use strict"; // jshint ;_;
14304
14305
14306 /* COLLAPSE PUBLIC CLASS DEFINITION
14307  * ================================ */
14308
14309  var Collapse = function (element, options) {
14310    this.$element = $(element)
14311    this.options = $.extend({}, $.fn.collapse.defaults, options)
14312
14313    if (this.options.parent) {
14314      this.$parent = $(this.options.parent)
14315    }
14316
14317    this.options.toggle && this.toggle()
14318  }
14319
14320  Collapse.prototype = {
14321
14322    constructor: Collapse
14323
14324  , dimension: function () {
14325      var hasWidth = this.$element.hasClass('width')
14326      return hasWidth ? 'width' : 'height'
14327    }
14328
14329  , show: function () {
14330      var dimension
14331        , scroll
14332        , actives
14333        , hasData
14334
14335      if (this.transitioning) return
14336
14337      dimension = this.dimension()
14338      scroll = $.camelCase(['scroll', dimension].join('-'))
14339      actives = this.$parent && this.$parent.find('> .accordion-group > .in')
14340
14341      if (actives && actives.length) {
14342        hasData = actives.data('collapse')
14343        if (hasData && hasData.transitioning) return
14344        actives.collapse('hide')
14345        hasData || actives.data('collapse', null)
14346      }
14347
14348      this.$element[dimension](0)
14349      this.transition('addClass', $.Event('show'), 'shown')
14350      $.support.transition && this.$element[dimension](this.$element[0][scroll])
14351    }
14352
14353  , hide: function () {
14354      var dimension
14355      if (this.transitioning) return
14356      dimension = this.dimension()
14357      this.reset(this.$element[dimension]())
14358      this.transition('removeClass', $.Event('hide'), 'hidden')
14359      this.$element[dimension](0)
14360    }
14361
14362  , reset: function (size) {
14363      var dimension = this.dimension()
14364
14365      this.$element
14366        .removeClass('collapse')
14367        [dimension](size || 'auto')
14368        [0].offsetWidth
14369
14370      this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
14371
14372      return this
14373    }
14374
14375  , transition: function (method, startEvent, completeEvent) {
14376      var that = this
14377        , complete = function () {
14378            if (startEvent.type == 'show') that.reset()
14379            that.transitioning = 0
14380            that.$element.trigger(completeEvent)
14381          }
14382
14383      this.$element.trigger(startEvent)
14384
14385      if (startEvent.isDefaultPrevented()) return
14386
14387      this.transitioning = 1
14388
14389      this.$element[method]('in')
14390
14391      $.support.transition && this.$element.hasClass('collapse') ?
14392        this.$element.one($.support.transition.end, complete) :
14393        complete()
14394    }
14395
14396  , toggle: function () {
14397      this[this.$element.hasClass('in') ? 'hide' : 'show']()
14398    }
14399
14400  }
14401
14402
14403 /* COLLAPSIBLE PLUGIN DEFINITION
14404  * ============================== */
14405
14406  $.fn.collapse = function (option) {
14407    return this.each(function () {
14408      var $this = $(this)
14409        , data = $this.data('collapse')
14410        , options = typeof option == 'object' && option
14411      if (!data) $this.data('collapse', (data = new Collapse(this, options)))
14412      if (typeof option == 'string') data[option]()
14413    })
14414  }
14415
14416  $.fn.collapse.defaults = {
14417    toggle: true
14418  }
14419
14420  $.fn.collapse.Constructor = Collapse
14421
14422
14423 /* COLLAPSIBLE DATA-API
14424  * ==================== */
14425
14426  $(function () {
14427    $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
14428      var $this = $(this), href
14429        , target = $this.attr('data-target')
14430          || e.preventDefault()
14431          || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
14432        , option = $(target).data('collapse') ? 'toggle' : $this.data()
14433      $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
14434      $(target).collapse(option)
14435    })
14436  })
14437
14438}(window.jQuery);/* ============================================================
14439 * bootstrap-dropdown.js v2.1.1
14440 * http://twitter.github.com/bootstrap/javascript.html#dropdowns
14441 * ============================================================
14442 * Copyright 2012 Twitter, Inc.
14443 *
14444 * Licensed under the Apache License, Version 2.0 (the "License");
14445 * you may not use this file except in compliance with the License.
14446 * You may obtain a copy of the License at
14447 *
14448 * http://www.apache.org/licenses/LICENSE-2.0
14449 *
14450 * Unless required by applicable law or agreed to in writing, software
14451 * distributed under the License is distributed on an "AS IS" BASIS,
14452 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14453 * See the License for the specific language governing permissions and
14454 * limitations under the License.
14455 * ============================================================ */
14456
14457
14458!function ($) {
14459
14460  "use strict"; // jshint ;_;
14461
14462
14463 /* DROPDOWN CLASS DEFINITION
14464  * ========================= */
14465
14466  var toggle = '[data-toggle=dropdown]'
14467    , Dropdown = function (element) {
14468        var $el = $(element).on('click.dropdown.data-api', this.toggle)
14469        $('html').on('click.dropdown.data-api', function () {
14470          $el.parent().removeClass('open')
14471        })
14472      }
14473
14474  Dropdown.prototype = {
14475
14476    constructor: Dropdown
14477
14478  , toggle: function (e) {
14479      var $this = $(this)
14480        , $parent
14481        , isActive
14482
14483      if ($this.is('.disabled, :disabled')) return
14484
14485      $parent = getParent($this)
14486
14487      isActive = $parent.hasClass('open')
14488
14489      clearMenus()
14490
14491      if (!isActive) {
14492        $parent.toggleClass('open')
14493        $this.focus()
14494      }
14495
14496      return false
14497    }
14498
14499  , keydown: function (e) {
14500      var $this
14501        , $items
14502        , $active
14503        , $parent
14504        , isActive
14505        , index
14506
14507      if (!/(38|40|27)/.test(e.keyCode)) return
14508
14509      $this = $(this)
14510
14511      e.preventDefault()
14512      e.stopPropagation()
14513
14514      if ($this.is('.disabled, :disabled')) return
14515
14516      $parent = getParent($this)
14517
14518      isActive = $parent.hasClass('open')
14519
14520      if (!isActive || (isActive && e.keyCode == 27)) return $this.click()
14521
14522      $items = $('[role=menu] li:not(.divider) a', $parent)
14523
14524      if (!$items.length) return
14525
14526      index = $items.index($items.filter(':focus'))
14527
14528      if (e.keyCode == 38 && index > 0) index--                                        // up
14529      if (e.keyCode == 40 && index < $items.length - 1) index++                        // down
14530      if (!~index) index = 0
14531
14532      $items
14533        .eq(index)
14534        .focus()
14535    }
14536
14537  }
14538
14539  function clearMenus() {
14540    getParent($(toggle))
14541      .removeClass('open')
14542  }
14543
14544  function getParent($this) {
14545    var selector = $this.attr('data-target')
14546      , $parent
14547
14548    if (!selector) {
14549      selector = $this.attr('href')
14550      selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
14551    }
14552
14553    $parent = $(selector)
14554    $parent.length || ($parent = $this.parent())
14555
14556    return $parent
14557  }
14558
14559
14560  /* DROPDOWN PLUGIN DEFINITION
14561   * ========================== */
14562
14563  $.fn.dropdown = function (option) {
14564    return this.each(function () {
14565      var $this = $(this)
14566        , data = $this.data('dropdown')
14567      if (!data) $this.data('dropdown', (data = new Dropdown(this)))
14568      if (typeof option == 'string') data[option].call($this)
14569    })
14570  }
14571
14572  $.fn.dropdown.Constructor = Dropdown
14573
14574
14575  /* APPLY TO STANDARD DROPDOWN ELEMENTS
14576   * =================================== */
14577
14578  $(function () {
14579    $('html')
14580      .on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus)
14581    $('body')
14582      .on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
14583      .on('click.dropdown.data-api touchstart.dropdown.data-api'  , toggle, Dropdown.prototype.toggle)
14584      .on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
14585  })
14586
14587}(window.jQuery);/* =========================================================
14588 * bootstrap-modal.js v2.1.1
14589 * http://twitter.github.com/bootstrap/javascript.html#modals
14590 * =========================================================
14591 * Copyright 2012 Twitter, Inc.
14592 *
14593 * Licensed under the Apache License, Version 2.0 (the "License");
14594 * you may not use this file except in compliance with the License.
14595 * You may obtain a copy of the License at
14596 *
14597 * http://www.apache.org/licenses/LICENSE-2.0
14598 *
14599 * Unless required by applicable law or agreed to in writing, software
14600 * distributed under the License is distributed on an "AS IS" BASIS,
14601 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14602 * See the License for the specific language governing permissions and
14603 * limitations under the License.
14604 * ========================================================= */
14605
14606
14607!function ($) {
14608
14609  "use strict"; // jshint ;_;
14610
14611
14612 /* MODAL CLASS DEFINITION
14613  * ====================== */
14614
14615  var Modal = function (element, options) {
14616    this.options = options
14617    this.$element = $(element)
14618      .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
14619    this.options.remote && this.$element.find('.modal-body').load(this.options.remote)
14620  }
14621
14622  Modal.prototype = {
14623
14624      constructor: Modal
14625
14626    , toggle: function () {
14627        return this[!this.isShown ? 'show' : 'hide']()
14628      }
14629
14630    , show: function () {
14631        var that = this
14632          , e = $.Event('show')
14633
14634        this.$element.trigger(e)
14635
14636        if (this.isShown || e.isDefaultPrevented()) return
14637
14638        $('body').addClass('modal-open')
14639
14640        this.isShown = true
14641
14642        this.escape()
14643
14644        this.backdrop(function () {
14645          var transition = $.support.transition && that.$element.hasClass('fade')
14646
14647          if (!that.$element.parent().length) {
14648            that.$element.appendTo(document.body) //don't move modals dom position
14649          }
14650
14651          that.$element
14652            .show()
14653
14654          if (transition) {
14655            that.$element[0].offsetWidth // force reflow
14656          }
14657
14658          that.$element
14659            .addClass('in')
14660            .attr('aria-hidden', false)
14661            .focus()
14662
14663          that.enforceFocus()
14664
14665          transition ?
14666            that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
14667            that.$element.trigger('shown')
14668
14669        })
14670      }
14671
14672    , hide: function (e) {
14673        e && e.preventDefault()
14674
14675        var that = this
14676
14677        e = $.Event('hide')
14678
14679        this.$element.trigger(e)
14680
14681        if (!this.isShown || e.isDefaultPrevented()) return
14682
14683        this.isShown = false
14684
14685        $('body').removeClass('modal-open')
14686
14687        this.escape()
14688
14689        $(document).off('focusin.modal')
14690
14691        this.$element
14692          .removeClass('in')
14693          .attr('aria-hidden', true)
14694
14695        $.support.transition && this.$element.hasClass('fade') ?
14696          this.hideWithTransition() :
14697          this.hideModal()
14698      }
14699
14700    , enforceFocus: function () {
14701        var that = this
14702        $(document).on('focusin.modal', function (e) {
14703          if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
14704            that.$element.focus()
14705          }
14706        })
14707      }
14708
14709    , escape: function () {
14710        var that = this
14711        if (this.isShown && this.options.keyboard) {
14712          this.$element.on('keyup.dismiss.modal', function ( e ) {
14713            e.which == 27 && that.hide()
14714          })
14715        } else if (!this.isShown) {
14716          this.$element.off('keyup.dismiss.modal')
14717        }
14718      }
14719
14720    , hideWithTransition: function () {
14721        var that = this
14722          , timeout = setTimeout(function () {
14723              that.$element.off($.support.transition.end)
14724              that.hideModal()
14725            }, 500)
14726
14727        this.$element.one($.support.transition.end, function () {
14728          clearTimeout(timeout)
14729          that.hideModal()
14730        })
14731      }
14732
14733    , hideModal: function (that) {
14734        this.$element
14735          .hide()
14736          .trigger('hidden')
14737
14738        this.backdrop()
14739      }
14740
14741    , removeBackdrop: function () {
14742        this.$backdrop.remove()
14743        this.$backdrop = null
14744      }
14745
14746    , backdrop: function (callback) {
14747        var that = this
14748          , animate = this.$element.hasClass('fade') ? 'fade' : ''
14749
14750        if (this.isShown && this.options.backdrop) {
14751          var doAnimate = $.support.transition && animate
14752
14753          this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
14754            .appendTo(document.body)
14755
14756          if (this.options.backdrop != 'static') {
14757            this.$backdrop.click($.proxy(this.hide, this))
14758          }
14759
14760          if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
14761
14762          this.$backdrop.addClass('in')
14763
14764          doAnimate ?
14765            this.$backdrop.one($.support.transition.end, callback) :
14766            callback()
14767
14768        } else if (!this.isShown && this.$backdrop) {
14769          this.$backdrop.removeClass('in')
14770
14771          $.support.transition && this.$element.hasClass('fade')?
14772            this.$backdrop.one($.support.transition.end, $.proxy(this.removeBackdrop, this)) :
14773            this.removeBackdrop()
14774
14775        } else if (callback) {
14776          callback()
14777        }
14778      }
14779  }
14780
14781
14782 /* MODAL PLUGIN DEFINITION
14783  * ======================= */
14784
14785  $.fn.modal = function (option) {
14786    return this.each(function () {
14787      var $this = $(this)
14788        , data = $this.data('modal')
14789        , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
14790      if (!data) $this.data('modal', (data = new Modal(this, options)))
14791      if (typeof option == 'string') data[option]()
14792      else if (options.show) data.show()
14793    })
14794  }
14795
14796  $.fn.modal.defaults = {
14797      backdrop: true
14798    , keyboard: true
14799    , show: true
14800  }
14801
14802  $.fn.modal.Constructor = Modal
14803
14804
14805 /* MODAL DATA-API
14806  * ============== */
14807
14808  $(function () {
14809    $('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) {
14810      var $this = $(this)
14811        , href = $this.attr('href')
14812        , $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
14813        , option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
14814
14815      e.preventDefault()
14816
14817      $target
14818        .modal(option)
14819        .one('hide', function () {
14820          $this.focus()
14821        })
14822    })
14823  })
14824
14825}(window.jQuery);/* ===========================================================
14826 * bootstrap-tooltip.js v2.1.1
14827 * http://twitter.github.com/bootstrap/javascript.html#tooltips
14828 * Inspired by the original jQuery.tipsy by Jason Frame
14829 * ===========================================================
14830 * Copyright 2012 Twitter, Inc.
14831 *
14832 * Licensed under the Apache License, Version 2.0 (the "License");
14833 * you may not use this file except in compliance with the License.
14834 * You may obtain a copy of the License at
14835 *
14836 * http://www.apache.org/licenses/LICENSE-2.0
14837 *
14838 * Unless required by applicable law or agreed to in writing, software
14839 * distributed under the License is distributed on an "AS IS" BASIS,
14840 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14841 * See the License for the specific language governing permissions and
14842 * limitations under the License.
14843 * ========================================================== */
14844
14845
14846!function ($) {
14847
14848  "use strict"; // jshint ;_;
14849
14850
14851 /* TOOLTIP PUBLIC CLASS DEFINITION
14852  * =============================== */
14853
14854  var Tooltip = function (element, options) {
14855    this.init('tooltip', element, options)
14856  }
14857
14858  Tooltip.prototype = {
14859
14860    constructor: Tooltip
14861
14862  , init: function (type, element, options) {
14863      var eventIn
14864        , eventOut
14865
14866      this.type = type
14867      this.$element = $(element)
14868      this.options = this.getOptions(options)
14869      this.enabled = true
14870
14871      if (this.options.trigger == 'click') {
14872        this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
14873      } else if (this.options.trigger != 'manual') {
14874        eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus'
14875        eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur'
14876        this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
14877        this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
14878      }
14879
14880      this.options.selector ?
14881        (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
14882        this.fixTitle()
14883    }
14884
14885  , getOptions: function (options) {
14886      options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data())
14887
14888      if (options.delay && typeof options.delay == 'number') {
14889        options.delay = {
14890          show: options.delay
14891        , hide: options.delay
14892        }
14893      }
14894
14895      return options
14896    }
14897
14898  , enter: function (e) {
14899      var self = $(e.currentTarget)[this.type](this._options).data(this.type)
14900
14901      if (!self.options.delay || !self.options.delay.show) return self.show()
14902
14903      clearTimeout(this.timeout)
14904      self.hoverState = 'in'
14905      this.timeout = setTimeout(function() {
14906        if (self.hoverState == 'in') self.show()
14907      }, self.options.delay.show)
14908    }
14909
14910  , leave: function (e) {
14911      var self = $(e.currentTarget)[this.type](this._options).data(this.type)
14912
14913      if (this.timeout) clearTimeout(this.timeout)
14914      if (!self.options.delay || !self.options.delay.hide) return self.hide()
14915
14916      self.hoverState = 'out'
14917      this.timeout = setTimeout(function() {
14918        if (self.hoverState == 'out') self.hide()
14919      }, self.options.delay.hide)
14920    }
14921
14922  , show: function () {
14923      var $tip
14924        , inside
14925        , pos
14926        , actualWidth
14927        , actualHeight
14928        , placement
14929        , tp
14930
14931      if (this.hasContent() && this.enabled) {
14932        $tip = this.tip()
14933        this.setContent()
14934
14935        if (this.options.animation) {
14936          $tip.addClass('fade')
14937        }
14938
14939        placement = typeof this.options.placement == 'function' ?
14940          this.options.placement.call(this, $tip[0], this.$element[0]) :
14941          this.options.placement
14942
14943        inside = /in/.test(placement)
14944
14945        $tip
14946          .remove()
14947          .css({ top: 0, left: 0, display: 'block' })
14948          .appendTo(inside ? this.$element : document.body)
14949
14950        pos = this.getPosition(inside)
14951
14952        actualWidth = $tip[0].offsetWidth
14953        actualHeight = $tip[0].offsetHeight
14954
14955        switch (inside ? placement.split(' ')[1] : placement) {
14956          case 'bottom':
14957            tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
14958            break
14959          case 'top':
14960            tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
14961            break
14962          case 'left':
14963            tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
14964            break
14965          case 'right':
14966            tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
14967            break
14968        }
14969
14970        $tip
14971          .css(tp)
14972          .addClass(placement)
14973          .addClass('in')
14974      }
14975    }
14976
14977  , setContent: function () {
14978      var $tip = this.tip()
14979        , title = this.getTitle()
14980
14981      $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
14982      $tip.removeClass('fade in top bottom left right')
14983    }
14984
14985  , hide: function () {
14986      var that = this
14987        , $tip = this.tip()
14988
14989      $tip.removeClass('in')
14990
14991      function removeWithAnimation() {
14992        var timeout = setTimeout(function () {
14993          $tip.off($.support.transition.end).remove()
14994        }, 500)
14995
14996        $tip.one($.support.transition.end, function () {
14997          clearTimeout(timeout)
14998          $tip.remove()
14999        })
15000      }
15001
15002      $.support.transition && this.$tip.hasClass('fade') ?
15003        removeWithAnimation() :
15004        $tip.remove()
15005
15006      return this
15007    }
15008
15009  , fixTitle: function () {
15010      var $e = this.$element
15011      if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
15012        $e.attr('data-original-title', $e.attr('title') || '').removeAttr('title')
15013      }
15014    }
15015
15016  , hasContent: function () {
15017      return this.getTitle()
15018    }
15019
15020  , getPosition: function (inside) {
15021      return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), {
15022        width: this.$element[0].offsetWidth
15023      , height: this.$element[0].offsetHeight
15024      })
15025    }
15026
15027  , getTitle: function () {
15028      var title
15029        , $e = this.$element
15030        , o = this.options
15031
15032      title = $e.attr('data-original-title')
15033        || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)
15034
15035      return title
15036    }
15037
15038  , tip: function () {
15039      return this.$tip = this.$tip || $(this.options.template)
15040    }
15041
15042  , validate: function () {
15043      if (!this.$element[0].parentNode) {
15044        this.hide()
15045        this.$element = null
15046        this.options = null
15047      }
15048    }
15049
15050  , enable: function () {
15051      this.enabled = true
15052    }
15053
15054  , disable: function () {
15055      this.enabled = false
15056    }
15057
15058  , toggleEnabled: function () {
15059      this.enabled = !this.enabled
15060    }
15061
15062  , toggle: function () {
15063      this[this.tip().hasClass('in') ? 'hide' : 'show']()
15064    }
15065
15066  , destroy: function () {
15067      this.hide().$element.off('.' + this.type).removeData(this.type)
15068    }
15069
15070  }
15071
15072
15073 /* TOOLTIP PLUGIN DEFINITION
15074  * ========================= */
15075
15076  $.fn.tooltip = function ( option ) {
15077    return this.each(function () {
15078      var $this = $(this)
15079        , data = $this.data('tooltip')
15080        , options = typeof option == 'object' && option
15081      if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))
15082      if (typeof option == 'string') data[option]()
15083    })
15084  }
15085
15086  $.fn.tooltip.Constructor = Tooltip
15087
15088  $.fn.tooltip.defaults = {
15089    animation: true
15090  , placement: 'top'
15091  , selector: false
15092  , template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
15093  , trigger: 'hover'
15094  , title: ''
15095  , delay: 0
15096  , html: true
15097  }
15098
15099}(window.jQuery);
15100/* ===========================================================
15101 * bootstrap-popover.js v2.1.1
15102 * http://twitter.github.com/bootstrap/javascript.html#popovers
15103 * ===========================================================
15104 * Copyright 2012 Twitter, Inc.
15105 *
15106 * Licensed under the Apache License, Version 2.0 (the "License");
15107 * you may not use this file except in compliance with the License.
15108 * You may obtain a copy of the License at
15109 *
15110 * http://www.apache.org/licenses/LICENSE-2.0
15111 *
15112 * Unless required by applicable law or agreed to in writing, software
15113 * distributed under the License is distributed on an "AS IS" BASIS,
15114 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15115 * See the License for the specific language governing permissions and
15116 * limitations under the License.
15117 * =========================================================== */
15118
15119
15120!function ($) {
15121
15122  "use strict"; // jshint ;_;
15123
15124
15125 /* POPOVER PUBLIC CLASS DEFINITION
15126  * =============================== */
15127
15128  var Popover = function (element, options) {
15129    this.init('popover', element, options)
15130  }
15131
15132
15133  /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
15134     ========================================== */
15135
15136  Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
15137
15138    constructor: Popover
15139
15140  , setContent: function () {
15141      var $tip = this.tip()
15142        , title = this.getTitle()
15143        , content = this.getContent()
15144
15145      $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
15146      $tip.find('.popover-content > *')[this.options.html ? 'html' : 'text'](content)
15147
15148      $tip.removeClass('fade top bottom left right in')
15149    }
15150
15151  , hasContent: function () {
15152      return this.getTitle() || this.getContent()
15153    }
15154
15155  , getContent: function () {
15156      var content
15157        , $e = this.$element
15158        , o = this.options
15159
15160      content = $e.attr('data-content')
15161        || (typeof o.content == 'function' ? o.content.call($e[0]) :  o.content)
15162
15163      return content
15164    }
15165
15166  , tip: function () {
15167      if (!this.$tip) {
15168        this.$tip = $(this.options.template)
15169      }
15170      return this.$tip
15171    }
15172
15173  , destroy: function () {
15174      this.hide().$element.off('.' + this.type).removeData(this.type)
15175    }
15176
15177  })
15178
15179
15180 /* POPOVER PLUGIN DEFINITION
15181  * ======================= */
15182
15183  $.fn.popover = function (option) {
15184    return this.each(function () {
15185      var $this = $(this)
15186        , data = $this.data('popover')
15187        , options = typeof option == 'object' && option
15188      if (!data) $this.data('popover', (data = new Popover(this, options)))
15189      if (typeof option == 'string') data[option]()
15190    })
15191  }
15192
15193  $.fn.popover.Constructor = Popover
15194
15195  $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
15196    placement: 'right'
15197  , trigger: 'click'
15198  , content: ''
15199  , template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'
15200  })
15201
15202}(window.jQuery);/* =============================================================
15203 * bootstrap-scrollspy.js v2.1.1
15204 * http://twitter.github.com/bootstrap/javascript.html#scrollspy
15205 * =============================================================
15206 * Copyright 2012 Twitter, Inc.
15207 *
15208 * Licensed under the Apache License, Version 2.0 (the "License");
15209 * you may not use this file except in compliance with the License.
15210 * You may obtain a copy of the License at
15211 *
15212 * http://www.apache.org/licenses/LICENSE-2.0
15213 *
15214 * Unless required by applicable law or agreed to in writing, software
15215 * distributed under the License is distributed on an "AS IS" BASIS,
15216 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15217 * See the License for the specific language governing permissions and
15218 * limitations under the License.
15219 * ============================================================== */
15220
15221
15222!function ($) {
15223
15224  "use strict"; // jshint ;_;
15225
15226
15227 /* SCROLLSPY CLASS DEFINITION
15228  * ========================== */
15229
15230  function ScrollSpy(element, options) {
15231    var process = $.proxy(this.process, this)
15232      , $element = $(element).is('body') ? $(window) : $(element)
15233      , href
15234    this.options = $.extend({}, $.fn.scrollspy.defaults, options)
15235    this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process)
15236    this.selector = (this.options.target
15237      || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
15238      || '') + ' .nav li > a'
15239    this.$body = $('body')
15240    this.refresh()
15241    this.process()
15242  }
15243
15244  ScrollSpy.prototype = {
15245
15246      constructor: ScrollSpy
15247
15248    , refresh: function () {
15249        var self = this
15250          , $targets
15251
15252        this.offsets = $([])
15253        this.targets = $([])
15254
15255        $targets = this.$body
15256          .find(this.selector)
15257          .map(function () {
15258            var $el = $(this)
15259              , href = $el.data('target') || $el.attr('href')
15260              , $href = /^#\w/.test(href) && $(href)
15261            return ( $href
15262              && $href.length
15263              && [[ $href.position().top, href ]] ) || null
15264          })
15265          .sort(function (a, b) { return a[0] - b[0] })
15266          .each(function () {
15267            self.offsets.push(this[0])
15268            self.targets.push(this[1])
15269          })
15270      }
15271
15272    , process: function () {
15273        var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
15274          , scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
15275          , maxScroll = scrollHeight - this.$scrollElement.height()
15276          , offsets = this.offsets
15277          , targets = this.targets
15278          , activeTarget = this.activeTarget
15279          , i
15280
15281        if (scrollTop >= maxScroll) {
15282          return activeTarget != (i = targets.last()[0])
15283            && this.activate ( i )
15284        }
15285
15286        for (i = offsets.length; i--;) {
15287          activeTarget != targets[i]
15288            && scrollTop >= offsets[i]
15289            && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
15290            && this.activate( targets[i] )
15291        }
15292      }
15293
15294    , activate: function (target) {
15295        var active
15296          , selector
15297
15298        this.activeTarget = target
15299
15300        $(this.selector)
15301          .parent('.active')
15302          .removeClass('active')
15303
15304        selector = this.selector
15305          + '[data-target="' + target + '"],'
15306          + this.selector + '[href="' + target + '"]'
15307
15308        active = $(selector)
15309          .parent('li')
15310          .addClass('active')
15311
15312        if (active.parent('.dropdown-menu').length)  {
15313          active = active.closest('li.dropdown').addClass('active')
15314        }
15315
15316        active.trigger('activate')
15317      }
15318
15319  }
15320
15321
15322 /* SCROLLSPY PLUGIN DEFINITION
15323  * =========================== */
15324
15325  $.fn.scrollspy = function (option) {
15326    return this.each(function () {
15327      var $this = $(this)
15328        , data = $this.data('scrollspy')
15329        , options = typeof option == 'object' && option
15330      if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))
15331      if (typeof option == 'string') data[option]()
15332    })
15333  }
15334
15335  $.fn.scrollspy.Constructor = ScrollSpy
15336
15337  $.fn.scrollspy.defaults = {
15338    offset: 10
15339  }
15340
15341
15342 /* SCROLLSPY DATA-API
15343  * ================== */
15344
15345  $(window).on('load', function () {
15346    $('[data-spy="scroll"]').each(function () {
15347      var $spy = $(this)
15348      $spy.scrollspy($spy.data())
15349    })
15350  })
15351
15352}(window.jQuery);/* ========================================================
15353 * bootstrap-tab.js v2.1.1
15354 * http://twitter.github.com/bootstrap/javascript.html#tabs
15355 * ========================================================
15356 * Copyright 2012 Twitter, Inc.
15357 *
15358 * Licensed under the Apache License, Version 2.0 (the "License");
15359 * you may not use this file except in compliance with the License.
15360 * You may obtain a copy of the License at
15361 *
15362 * http://www.apache.org/licenses/LICENSE-2.0
15363 *
15364 * Unless required by applicable law or agreed to in writing, software
15365 * distributed under the License is distributed on an "AS IS" BASIS,
15366 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15367 * See the License for the specific language governing permissions and
15368 * limitations under the License.
15369 * ======================================================== */
15370
15371
15372!function ($) {
15373
15374  "use strict"; // jshint ;_;
15375
15376
15377 /* TAB CLASS DEFINITION
15378  * ==================== */
15379
15380  var Tab = function (element) {
15381    this.element = $(element)
15382  }
15383
15384  Tab.prototype = {
15385
15386    constructor: Tab
15387
15388  , show: function () {
15389      var $this = this.element
15390        , $ul = $this.closest('ul:not(.dropdown-menu)')
15391        , selector = $this.attr('data-target')
15392        , previous
15393        , $target
15394        , e
15395
15396      if (!selector) {
15397        selector = $this.attr('href')
15398        selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
15399      }
15400
15401      if ( $this.parent('li').hasClass('active') ) return
15402
15403      previous = $ul.find('.active a').last()[0]
15404
15405      e = $.Event('show', {
15406        relatedTarget: previous
15407      })
15408
15409      $this.trigger(e)
15410
15411      if (e.isDefaultPrevented()) return
15412
15413      $target = $(selector)
15414
15415      this.activate($this.parent('li'), $ul)
15416      this.activate($target, $target.parent(), function () {
15417        $this.trigger({
15418          type: 'shown'
15419        , relatedTarget: previous
15420        })
15421      })
15422    }
15423
15424  , activate: function ( element, container, callback) {
15425      var $active = container.find('> .active')
15426        , transition = callback
15427            && $.support.transition
15428            && $active.hasClass('fade')
15429
15430      function next() {
15431        $active
15432          .removeClass('active')
15433          .find('> .dropdown-menu > .active')
15434          .removeClass('active')
15435
15436        element.addClass('active')
15437
15438        if (transition) {
15439          element[0].offsetWidth // reflow for transition
15440          element.addClass('in')
15441        } else {
15442          element.removeClass('fade')
15443        }
15444
15445        if ( element.parent('.dropdown-menu') ) {
15446          element.closest('li.dropdown').addClass('active')
15447        }
15448
15449        callback && callback()
15450      }
15451
15452      transition ?
15453        $active.one($.support.transition.end, next) :
15454        next()
15455
15456      $active.removeClass('in')
15457    }
15458  }
15459
15460
15461 /* TAB PLUGIN DEFINITION
15462  * ===================== */
15463
15464  $.fn.tab = function ( option ) {
15465    return this.each(function () {
15466      var $this = $(this)
15467        , data = $this.data('tab')
15468      if (!data) $this.data('tab', (data = new Tab(this)))
15469      if (typeof option == 'string') data[option]()
15470    })
15471  }
15472
15473  $.fn.tab.Constructor = Tab
15474
15475
15476 /* TAB DATA-API
15477  * ============ */
15478
15479  $(function () {
15480    $('body').on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
15481      e.preventDefault()
15482      $(this).tab('show')
15483    })
15484  })
15485
15486}(window.jQuery);/* =============================================================
15487 * bootstrap-typeahead.js v2.1.1
15488 * http://twitter.github.com/bootstrap/javascript.html#typeahead
15489 * =============================================================
15490 * Copyright 2012 Twitter, Inc.
15491 *
15492 * Licensed under the Apache License, Version 2.0 (the "License");
15493 * you may not use this file except in compliance with the License.
15494 * You may obtain a copy of the License at
15495 *
15496 * http://www.apache.org/licenses/LICENSE-2.0
15497 *
15498 * Unless required by applicable law or agreed to in writing, software
15499 * distributed under the License is distributed on an "AS IS" BASIS,
15500 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15501 * See the License for the specific language governing permissions and
15502 * limitations under the License.
15503 * ============================================================ */
15504
15505
15506!function($){
15507
15508  "use strict"; // jshint ;_;
15509
15510
15511 /* TYPEAHEAD PUBLIC CLASS DEFINITION
15512  * ================================= */
15513
15514  var Typeahead = function (element, options) {
15515    this.$element = $(element)
15516    this.options = $.extend({}, $.fn.typeahead.defaults, options)
15517    this.matcher = this.options.matcher || this.matcher
15518    this.sorter = this.options.sorter || this.sorter
15519    this.highlighter = this.options.highlighter || this.highlighter
15520    this.updater = this.options.updater || this.updater
15521    this.$menu = $(this.options.menu).appendTo('body')
15522    this.source = this.options.source
15523    this.shown = false
15524    this.listen()
15525  }
15526
15527  Typeahead.prototype = {
15528
15529    constructor: Typeahead
15530
15531  , select: function () {
15532      var val = this.$menu.find('.active').attr('data-value')
15533      this.$element
15534        .val(this.updater(val))
15535        .change()
15536      return this.hide()
15537    }
15538
15539  , updater: function (item) {
15540      return item
15541    }
15542
15543  , show: function () {
15544      var pos = $.extend({}, this.$element.offset(), {
15545        height: this.$element[0].offsetHeight
15546      })
15547
15548      this.$menu.css({
15549        top: pos.top + pos.height
15550      , left: pos.left
15551      })
15552
15553      this.$menu.show()
15554      this.shown = true
15555      return this
15556    }
15557
15558  , hide: function () {
15559      this.$menu.hide()
15560      this.shown = false
15561      return this
15562    }
15563
15564  , lookup: function (event) {
15565      var items
15566
15567      this.query = this.$element.val()
15568
15569      if (!this.query || this.query.length < this.options.minLength) {
15570        return this.shown ? this.hide() : this
15571      }
15572
15573      items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source
15574
15575      return items ? this.process(items) : this
15576    }
15577
15578  , process: function (items) {
15579      var that = this
15580
15581      items = $.grep(items, function (item) {
15582        return that.matcher(item)
15583      })
15584
15585      items = this.sorter(items)
15586
15587      if (!items.length) {
15588        return this.shown ? this.hide() : this
15589      }
15590
15591      return this.render(items.slice(0, this.options.items)).show()
15592    }
15593
15594  , matcher: function (item) {
15595      return ~item.toLowerCase().indexOf(this.query.toLowerCase())
15596    }
15597
15598  , sorter: function (items) {
15599      var beginswith = []
15600        , caseSensitive = []
15601        , caseInsensitive = []
15602        , item
15603
15604      while (item = items.shift()) {
15605        if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
15606        else if (~item.indexOf(this.query)) caseSensitive.push(item)
15607        else caseInsensitive.push(item)
15608      }
15609
15610      return beginswith.concat(caseSensitive, caseInsensitive)
15611    }
15612
15613  , highlighter: function (item) {
15614      var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
15615      return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
15616        return '<strong>' + match + '</strong>'
15617      })
15618    }
15619
15620  , render: function (items) {
15621      var that = this
15622
15623      items = $(items).map(function (i, item) {
15624        i = $(that.options.item).attr('data-value', item)
15625        i.find('a').html(that.highlighter(item))
15626        return i[0]
15627      })
15628
15629      items.first().addClass('active')
15630      this.$menu.html(items)
15631      return this
15632    }
15633
15634  , next: function (event) {
15635      var active = this.$menu.find('.active').removeClass('active')
15636        , next = active.next()
15637
15638      if (!next.length) {
15639        next = $(this.$menu.find('li')[0])
15640      }
15641
15642      next.addClass('active')
15643    }
15644
15645  , prev: function (event) {
15646      var active = this.$menu.find('.active').removeClass('active')
15647        , prev = active.prev()
15648
15649      if (!prev.length) {
15650        prev = this.$menu.find('li').last()
15651      }
15652
15653      prev.addClass('active')
15654    }
15655
15656  , listen: function () {
15657      this.$element
15658        .on('blur',     $.proxy(this.blur, this))
15659        .on('keypress', $.proxy(this.keypress, this))
15660        .on('keyup',    $.proxy(this.keyup, this))
15661
15662      if ($.browser.chrome || $.browser.webkit || $.browser.msie) {
15663        this.$element.on('keydown', $.proxy(this.keydown, this))
15664      }
15665
15666      this.$menu
15667        .on('click', $.proxy(this.click, this))
15668        .on('mouseenter', 'li', $.proxy(this.mouseenter, this))
15669    }
15670
15671  , move: function (e) {
15672      if (!this.shown) return
15673
15674      switch(e.keyCode) {
15675        case 9: // tab
15676        case 13: // enter
15677        case 27: // escape
15678          e.preventDefault()
15679          break
15680
15681        case 38: // up arrow
15682          e.preventDefault()
15683          this.prev()
15684          break
15685
15686        case 40: // down arrow
15687          e.preventDefault()
15688          this.next()
15689          break
15690      }
15691
15692      e.stopPropagation()
15693    }
15694
15695  , keydown: function (e) {
15696      this.suppressKeyPressRepeat = !~$.inArray(e.keyCode, [40,38,9,13,27])
15697      this.move(e)
15698    }
15699
15700  , keypress: function (e) {
15701      if (this.suppressKeyPressRepeat) return
15702      this.move(e)
15703    }
15704
15705  , keyup: function (e) {
15706      switch(e.keyCode) {
15707        case 40: // down arrow
15708        case 38: // up arrow
15709          break
15710
15711        case 9: // tab
15712        case 13: // enter
15713          if (!this.shown) return
15714          this.select()
15715          break
15716
15717        case 27: // escape
15718          if (!this.shown) return
15719          this.hide()
15720          break
15721
15722        default:
15723          this.lookup()
15724      }
15725
15726      e.stopPropagation()
15727      e.preventDefault()
15728  }
15729
15730  , blur: function (e) {
15731      var that = this
15732      setTimeout(function () { that.hide() }, 150)
15733    }
15734
15735  , click: function (e) {
15736      e.stopPropagation()
15737      e.preventDefault()
15738      this.select()
15739    }
15740
15741  , mouseenter: function (e) {
15742      this.$menu.find('.active').removeClass('active')
15743      $(e.currentTarget).addClass('active')
15744    }
15745
15746  }
15747
15748
15749  /* TYPEAHEAD PLUGIN DEFINITION
15750   * =========================== */
15751
15752  $.fn.typeahead = function (option) {
15753    return this.each(function () {
15754      var $this = $(this)
15755        , data = $this.data('typeahead')
15756        , options = typeof option == 'object' && option
15757      if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
15758      if (typeof option == 'string') data[option]()
15759    })
15760  }
15761
15762  $.fn.typeahead.defaults = {
15763    source: []
15764  , items: 8
15765  , menu: '<ul class="typeahead dropdown-menu"></ul>'
15766  , item: '<li><a href="#"></a></li>'
15767  , minLength: 1
15768  }
15769
15770  $.fn.typeahead.Constructor = Typeahead
15771
15772
15773 /*   TYPEAHEAD DATA-API
15774  * ================== */
15775
15776  $(function () {
15777    $('body').on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
15778      var $this = $(this)
15779      if ($this.data('typeahead')) return
15780      e.preventDefault()
15781      $this.typeahead($this.data())
15782    })
15783  })
15784
15785}(window.jQuery);
15786/* ==========================================================
15787 * bootstrap-affix.js v2.1.1
15788 * http://twitter.github.com/bootstrap/javascript.html#affix
15789 * ==========================================================
15790 * Copyright 2012 Twitter, Inc.
15791 *
15792 * Licensed under the Apache License, Version 2.0 (the "License");
15793 * you may not use this file except in compliance with the License.
15794 * You may obtain a copy of the License at
15795 *
15796 * http://www.apache.org/licenses/LICENSE-2.0
15797 *
15798 * Unless required by applicable law or agreed to in writing, software
15799 * distributed under the License is distributed on an "AS IS" BASIS,
15800 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15801 * See the License for the specific language governing permissions and
15802 * limitations under the License.
15803 * ========================================================== */
15804
15805
15806!function ($) {
15807
15808  "use strict"; // jshint ;_;
15809
15810
15811 /* AFFIX CLASS DEFINITION
15812  * ====================== */
15813
15814  var Affix = function (element, options) {
15815    this.options = $.extend({}, $.fn.affix.defaults, options)
15816    this.$window = $(window).on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
15817    this.$element = $(element)
15818    this.checkPosition()
15819  }
15820
15821  Affix.prototype.checkPosition = function () {
15822    if (!this.$element.is(':visible')) return
15823
15824    var scrollHeight = $(document).height()
15825      , scrollTop = this.$window.scrollTop()
15826      , position = this.$element.offset()
15827      , offset = this.options.offset
15828      , offsetBottom = offset.bottom
15829      , offsetTop = offset.top
15830      , reset = 'affix affix-top affix-bottom'
15831      , affix
15832
15833    if (typeof offset != 'object') offsetBottom = offsetTop = offset
15834    if (typeof offsetTop == 'function') offsetTop = offset.top()
15835    if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
15836
15837    affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ?
15838      false    : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ?
15839      'bottom' : offsetTop != null && scrollTop <= offsetTop ?
15840      'top'    : false
15841
15842    if (this.affixed === affix) return
15843
15844    this.affixed = affix
15845    this.unpin = affix == 'bottom' ? position.top - scrollTop : null
15846
15847    this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : ''))
15848  }
15849
15850
15851 /* AFFIX PLUGIN DEFINITION
15852  * ======================= */
15853
15854  $.fn.affix = function (option) {
15855    return this.each(function () {
15856      var $this = $(this)
15857        , data = $this.data('affix')
15858        , options = typeof option == 'object' && option
15859      if (!data) $this.data('affix', (data = new Affix(this, options)))
15860      if (typeof option == 'string') data[option]()
15861    })
15862  }
15863
15864  $.fn.affix.Constructor = Affix
15865
15866  $.fn.affix.defaults = {
15867    offset: 0
15868  }
15869
15870
15871 /* AFFIX DATA-API
15872  * ============== */
15873
15874  $(window).on('load', function () {
15875    $('[data-spy="affix"]').each(function () {
15876      var $spy = $(this)
15877        , data = $spy.data()
15878
15879      data.offset = data.offset || {}
15880
15881      data.offsetBottom && (data.offset.bottom = data.offsetBottom)
15882      data.offsetTop && (data.offset.top = data.offsetTop)
15883
15884      $spy.affix(data)
15885    })
15886  })
15887
15888
15889}(window.jQuery);
15890/*!
15891 * $Id$
15892 * Copyright Zeta Software GmbH
15893 */
15894/* jshint strict: false, mgetparultistr: true, smarttabs:true, jquery:true, devel:true */
15895
15896document.documentElement.className = document.documentElement.className.replace(/no-js/g, 'js');
15897
15898var nualc = navigator.userAgent.toLowerCase();
15899
15900$z.support.placeholder = (function(){
15901    var i = document.createElement('input');
15902    return 'placeholder' in i;
15903})();
15904$z.support.IntersectionObserver = 'IntersectionObserver' in window;
15905$z.support.beforeprint = 'onbeforeprint' in window;
15906
15907var isDebug = false;
15908$z.migrateMute = true;
15909if (document.getElementsByTagName("html")[0].getAttribute("data-zpdebug") == "true") {
15910  isDebug = true;
15911  $z.migrateMute = false;
15912}
15913// logs to the browser-console with a timestamp
15914function setDebug(isDebug=false) {		
15915		var timestamp = function(){};
15916		timestamp.toString = function(){
15917			var ts = new Date();
15918			var pad = "000";
15919			var ms = ts.getMilliseconds().toString();
15920			var timestamp = ts.toLocaleTimeString("de-DE") + "." + pad.substring(0,pad.length - ms.length) + ms + ": ";
15921
15922			return timestamp;    
15923		};
15924		
15925		if (isDebug) {
15926			window.debug = {
15927			  log:   window.console.log.bind(window.console, '%s', timestamp),
15928			  error: window.console.error.bind(window.console, '%s', timestamp),
15929			  info:  window.console.info.bind(window.console, '%s', timestamp),
15930			  warn:  window.console.warn.bind(window.console, '%s', timestamp)
15931			};
15932		} else {
15933			var __no_op = function() {};
15934
15935			window.debug = {
15936			  log: __no_op,
15937			  error: __no_op,
15938			  warn: __no_op,
15939			  info: __no_op
15940			}
15941		}
15942}
15943setDebug(isDebug);
15944
15945// display nice notifications in a lightbox
15946function zpalert(oArg={}){
15947	var title =  oArg.hasOwnProperty('title') ? oArg.title : 'Hinweis';
15948	var text =   oArg.hasOwnProperty('text') ? oArg.text : 'Ein Fehler ist aufgetreten!';
15949	var button = oArg.hasOwnProperty('button') ? oArg.button : true;
15950	var icon =   oArg.hasOwnProperty('icon') ? oArg.icon : 'info';
15951	
15952	var iconEl = "";
15953	
15954	switch ( icon ) {
15955		case "info":
15956			iconEl = '<i class="fa fa-exclamation-circle" aria-hidden="true"></i> ';
15957			break;
15958		
15959		case "warning":
15960			iconEl = iconEl = '<i class="fa fa-exclamation-triangle" aria-hidden="true"></i>';
15961			break;
15962		
15963		default:
15964			iconEl = '<i class="fa ' + faiconclass + '" aria-hidden="true"></i>';
15965	}
15966	
15967	var buttonEl = "";
15968	if ( button ){
15969		buttonEl = '<a href="#" class="button primary closezpalert"><span>OK</span></a>';
15970	}
15971	var titleEl = "";
15972	if ( title ){
15973		titleEl = '<h3 style="margin: 0 0 1rem 0;">' + iconEl + title + '</h3>';
15974	}
15975	$z.fancybox(
15976		'<div class="zpalert" style="min-width: 320px; box-sizing: border-box;">\
15977			' + titleEl + '<p>' + text + '</p><p class="buttons" style="text-align: right;">' + buttonEl + '</p>\
15978		</div>',
15979		{
15980			'showCloseButton'	: false,
15981			'autoDimensions'	: true,
15982			'width'         	: 'auto',
15983			'height'        	: 'auto',
15984			'transitionIn'		: 'fade',
15985			'transitionOut'		: 'fade',
15986			'padding'			: 20,
15987			'opacity'			: false,
15988			'overlayColor'		: '#000',
15989			'overlayOpacity'	: 0.7,
15990			'onComplete'		: function(){
15991				$z('.closezpalert').on('click', function(e){
15992					e.preventDefault();
15993					e.stopPropagation();
15994					$z.fancybox.close();
15995				});
15996			},
15997			'onStart'			:function(){
15998				$z('#fancybox-content').css('background', '#fff').css('color','#333');
15999			}
16000		}
16001	);
16002}
16003
16004// function to preload images
16005function zpPreloadImage(url)
16006{
16007    var img=new Image();
16008    img.src=url;
16009}
16010
16011// add classes to nav menus which help to decide wether hierarchies collapse left or right
16012function zpIsLeftOrRight(navselector){
16013	navselector = typeof navselector !== 'undefined' ? navselector : "ul.nav > li";
16014	$z(navselector).each(function(i,o){
16015		var current = $z(this);
16016		var elwidth = current.width();
16017		var elleft = current.offset().left;
16018		var elmiddle = elleft + (elwidth / 2);
16019		var helperClass = "zpisleft";
16020		
16021		if ( elmiddle >= $z(document).width()/2 ){
16022			helperClass = "zpisright";
16023		}
16024		current.removeClass('zpisleft zpisright');
16025		current.addClass(helperClass);
16026	});
16027}
16028
16029// get a parameter from the querystring by name
16030function zpGetParameterByName(name, url) {
16031    if (!url) url = window.location.href;
16032    name = name.replace(/[\[\]]/g, "\\$&");
16033    var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
16034        results = regex.exec(url);
16035    if (!results) return null;
16036    if (!results[2]) return '';
16037    return decodeURIComponent(results[2].replace(/\+/g, " "));
16038}
16039// add or update a QueryString Parameter in a URL
16040function zpUpdateQueryStringParameter(uri, key, value) {
16041	var re = new RegExp("([?&])" + key + "=.*?(&|$)", "i");
16042	var separator = uri.indexOf('?') !== -1 ? "&" : "?";
16043	if (uri.match(re)) {
16044		// update parameter
16045		return uri.replace(re, '$1' + key + "=" + value + '$2');
16046	}
16047	else {
16048		// add parameter
16049		if ( typeof(value) !== "undefined" && value !== "" ){
16050			return uri + separator + key + "=" + value;
16051		}
16052	}
16053}
16054
16055function zpTextOverflow(e, filler){
16056	filler = typeof filler !== 'undefined' ? filler : "…";
16057	
16058	$z(e).each(function(d){
16059		var wordcount = 0;
16060		var nodes = $z(this).find("*");
16061		var nodecount = nodes.length;
16062		var done = false;
16063		
16064		while ( !done && $z(this).overflown() && nodecount >= 0 ){
16065			//console.log(Date.now() + " Article No.:" + d + " Nodecount: " + nodecount);
16066			if ( nodecount > 0 ){
16067				var chtml = $z(nodes).eq(nodecount-1).html();
16068				var target = $z(nodes).eq(nodecount-1);
16069			}
16070			else{
16071				var chtml = $z(this).html();
16072				var target = $z(this);
16073			}
16074			var words = chtml.split(" ");
16075			
16076			for (i = words.length; i >= 0; i--){
16077				if ( i == words.length ){ // only runs this in the first iteration of the for loop
16078					// schnell an die richtige Wortanzahl rantasten, wenn mehr als 7 wörter durschsucht werden müssen.
16079					while ( i >=2 && $z(this).overflown() ){
16080						i = parseInt(i / 2);
16081						//console.log("    " + Date.now() + " Wordsestimate: " + i);
16082						$z(target).html(words.slice(0,i).join(" ") + filler);
16083					}
16084					i = i * 2;
16085				}
16086				//console.log("    Wordcount: " + i );
16087				if ( i > 0 ) {
16088					$z(target).html(words.slice(0,i).join(" ") + filler);
16089				}
16090				else{
16091					$z(target).remove();
16092				}
16093				if (!$z(this).overflown()){
16094					done = true;
16095					break;
16096				}
16097			}
16098			nodecount--;
16099		}
16100	});
16101};
16102
16103//
16104// Debounce calls to "callback" routine so that multiple calls
16105// made to the event handler before the expiration of "delay" are
16106// coalesced into a single call to "callback". Also causes the
16107// wait period to be reset upon receipt of a call to the
16108// debounced routine.
16109//
16110function zpdebounce(delay, callback) {
16111    if (typeof(delay)==='undefined') delay = 250;
16112    var timeout = null;
16113    return function () {
16114        //
16115        // if a timeout has been registered before then
16116        // cancel it so that we can setup a fresh timeout
16117        //
16118        if (timeout) {
16119            clearTimeout(timeout);
16120        }
16121        var args = arguments;
16122        timeout = setTimeout(function () {
16123            callback.apply(null, args);
16124            timeout = null;
16125        }, delay);
16126    };
16127}
16128//
16129// Throttle calls to "callback" routine and ensure that it
16130// is not invoked any more often than "delay" milliseconds.
16131// http://blogorama.nerdworks.in/javascriptfunctionthrottlingan/
16132//
16133function zpthrottle(delay, callback) {
16134	if (typeof(delay)==='undefined') delay = 250;
16135    var timeout = null;
16136    var previousCall = new Date().getTime();
16137    return function() {
16138        var time = new Date().getTime();
16139
16140        //
16141        // if "delay" milliseconds have expired since
16142        // the previous call then propagate this call to
16143        // "callback"
16144        //
16145        if ((time - previousCall) >= delay) {
16146            previousCall = time;
16147            callback.apply(null, arguments);
16148            
16149             // make sure callback is called again in case event ended before timer elapsed
16150	    	if (timeout) {
16151				clearTimeout(timeout);
16152			}
16153			timeout = setTimeout(function () {
16154				callback.apply(null, arguments);
16155				timeout = null;
16156			}, delay);
16157        }
16158    };
16159}
16160
16161function trace(s) {
16162  try { console.log(s); } catch (e) { alert(s); }
16163}
16164
16165// test for touch device
16166function is_touch_device() {
16167	if ( $("html").attr("data-whatintent") == "mouse" ){
16168		var touch = false;
16169	}
16170	else if( $("html").attr("data-whatintent") == "touch" ){
16171		var touch = true;
16172	}
16173	else{
16174	    // in the responsive preview, we set the touch class manually, so we also need to check tor that, so we can simulate
16175		var touch = 'ontouchstart' in window || navigator.maxTouchPoints || $z('body').hasClass('touch');
16176	}
16177	
16178	return touch;
16179}
16180
16181
16182
16183// Helper for Nav-Menues with hover effects to make them work via alternating clicks
16184// 1st Click will open the Submenues, 2nd Click will load the link associated with the clicked element
16185function hoverToClickMenu(element, breakpointMobileMenu, instancenumber, triangleMode) { 
16186	//var listenEvent = 'ontouchend' in document.documentElement ? "touchend" : "click";
16187	var listenEvent = "click";
16188		
16189	// The stock browser on Android 4.X can't cancel touchend events and will thus always fire an additional click event, so we need to revert to click events StS 2015-02-24
16190	if ( nualc.indexOf("android 4") > -1 && nualc.indexOf("chrome") === -1 ) {
16191		listenEvent = "click";
16192	}
16193	
16194	/* clean up added styles after the user resizes the browser window and might reach desktop resolution */
16195	if ( instancenumber == 1 && (breakpointMobileMenu !== undefined || triangleMode)  ) {
16196			var menuResizeTimer;
16197			
16198			var clearAddedStyles = function(){
16199				if( $z('#nav.on, nav.on').length > 0 ){
16200					// skip if mobile menu us currently shown, so it is not dismissed when scrolling
16201					// https://community.zeta-producer.com/thread/19257-mobiles-menü-klappt-zu/
16202					return;
16203				}
16204				if (  triangleMode || $z(window).width() > parseInt(breakpointMobileMenu) ){					
16205					$z(".hoverToClickMenuAdded").children("ul").css({'display' : '', 'visibility' : ''});
16206					$z(".hoverToClickMenuAdded").removeClass("clicked").removeClass("open").removeClass("hoverToClickMenuAdded");
16207				}
16208			};
16209			
16210			$z(window).on("resize", function(e) {
16211				clearTimeout(menuResizeTimer);
16212				menuResizeTimer = setTimeout(clearAddedStyles, 250);
16213			});
16214	}
16215
16216	var firstClick = function(element, event) {
16217		var event = event || window.event;
16218		var mobileMenu = false;
16219		if ( breakpointMobileMenu !== undefined && $z(window).width() <= parseInt(breakpointMobileMenu) ){
16220			triangleMode = true;
16221			mobileMenu = true;
16222		}
16223		else if ( !is_touch_device() && breakpointMobileMenu !== undefined && listenEvent == "click" && $z(window).width() > parseInt(breakpointMobileMenu) ) {
16224			// we're NOT displaying a mobile menu on non-touch devices, so return and don't modify the click behavior
16225			return true;
16226		}
16227		
16228		if ( triangleMode ){
16229			if ( (event.pageX - $z(element).offset().left) <= parseInt($z(element).css("padding-left")) || (event.pageX - $z(element).offset().left) > (parseInt($z(element).css("padding-left")) + $z(element).width() -6) ){
16230				// user clicked on triangle to the left or right of a link
16231				var hasVisibleChilds = $z(element).parent().children("ul").css("display") == "block" && $z(element).parent().children("ul").css("visibility") == "visible";
16232				//var hasVisibleChilds = $z(element).parent().children("ul").is(":visible") && $z(element).parent().children("ul").css("visibility") !== "hidden";
16233				if ( hasVisibleChilds && ($z(element).parent().hasClass("open") ||  $z(element).parent().hasClass("active")) ){
16234					$z(element).attr('aria-expanded', 'false');
16235					$z(element).parent().removeClass("clicked").removeClass("open").addClass("closed");
16236					$z(element).parent().children("ul").css({'display' : 'none', 'visibility' : ''});
16237					
16238					// remove manually set classes and styles on mouseout, so a consecutive mouseover on non touch devices will trigger the open state again
16239					if ( !is_touch_device() ){
16240						$z(element).parent().prevAll(".clicked").off("mouseleave.nav");
16241						$z(element).parent().off("mouseleave.nav");
16242						$z(element).parent().on("mouseleave.nav", function(e){
16243							// return if mobile menu is active
16244							if ( $z(element).parents("nav.on").length || $z(element).parents("#nav.on").length || mobileMenu ){
16245								//console.log("Mobile menu is didplayed. Returning early. breakpointMobileMenu: " + breakpointMobileMenu);
16246								return;
16247							}
16248							$z(element).parent().removeClass("hoverToClickMenuAdded").removeClass("clicked").removeClass("open").removeClass("closed");
16249							$z(element).parent().children("ul").css({'display' : '', 'visibility' : ''});
16250						});
16251					}
16252				}
16253				else{
16254					$z(element).attr('aria-expanded', 'true');
16255					$z(element).parent().addClass("hoverToClickMenuAdded").removeClass("closed").addClass("clicked").addClass("open");
16256					$z(element).parent().children("ul").css({'display' : 'block', 'visibility' : 'visible'});
16257				}
16258				event.preventDefault();
16259				return false;
16260			}	
16261			else{
16262				// user clicked directly on link, so we load the url immediately
16263				return true;
16264			}
16265		}
16266		else{
16267			var otherMenus = $z(element).parent().prevAll(".clicked").add($z(element).parent().nextAll(".clicked"));
16268			otherMenus.removeClass("clicked").removeClass("open");
16269			otherMenus.find("ul").css({'display' : '', 'visibility' : ''});
16270			otherMenus.find(".clicked").removeClass("clicked");
16271			otherMenus.find(".open").removeClass("open");
16272			otherMenus.find(".hoverToClickMenuAdded").removeClass("hoverToClickMenuAdded");
16273			var hasVisibleChilds = $z(element).parent().children("ul").css("display") == "block" && $z(element).parent().children("ul").css("visibility") == "visible";
16274		
16275			if ( $z(element).parent().hasClass("clicked") || hasVisibleChilds ){ // TODO ZP13 check layouts for incompatibilities due to commenting out this: || ($z(element).parent().children("xul").css("display") == "block" && $z(element).parent().children("xul").css("visibility") == "visible") ) {
16276				// element has been clicked before, so now we fire a click
16277				return true;
16278			}
16279			// element has been clicked for the first time, so we do not fire a click and only show submenues
16280		
16281			// add ".open" classname to parent li element so we can style it if we want
16282			$z(element).parent().addClass("clicked").addClass("open");
16283			// in case suckerfish is used
16284			$z(element).parent().children("ul").css({'display' : 'block', 'visibility' : 'visible'});
16285			return false;
16286		}
16287	};
16288	$z(element).off("click touchend");
16289	$z(element).on( listenEvent , function(event) {
16290		var firstClickResult = firstClick($z(this), event);
16291		if ( !firstClickResult ){
16292			event.preventDefault();
16293		}
16294		return firstClickResult;
16295	});
16296}
16297
16298// For IE8 and earlier version which don't have native support for Date.now.
16299if (!Date.now) {
16300  Date.now = function() {
16301    return new Date().valueOf();
16302  };
16303}
16304
16305// polyfill for array.find (native substitute for underscrote _.find
16306// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find
16307if (!Array.prototype.find && Object.defineProperty) {
16308  Object.defineProperty(Array.prototype, 'find', {
16309	value: function(predicate) {
16310	 'use strict';
16311	 if (this == null) {
16312	   throw new TypeError('Array.prototype.find called on null or undefined');
16313	 }
16314	 if (typeof predicate !== 'function') {
16315	   throw new TypeError('predicate must be a function');
16316	 }
16317	 var list = Object(this);
16318	 var length = list.length >>> 0;
16319	 var thisArg = arguments[1];
16320	 var value;
16321
16322	 for (var i = 0; i < length; i++) {
16323	   value = list[i];
16324	   if (predicate.call(thisArg, value, i, list)) {
16325		 return value;
16326	   }
16327	 }
16328	 return undefined;
16329	}
16330  });
16331}
16332
16333// lets us define css classes which only apply after all assets are loaded
16334window.addEventListener("load", (event) => {
16335	document.body.classList.add("loaded");
16336});
16337
16338// helper for pseudo masonrty layout via css columns
16339function getColumnsNumber(el){
16340    var $el = $(el),
16341        width = $el.innerWidth(),
16342        paddingLeft, paddingRight, columnWidth, columnGap, columnsNumber;
16343
16344    paddingLeft = parseInt( $el.css('padding-left'), 10 );
16345    paddingRight = parseInt( $el.css('padding-right'), 10 );
16346
16347    $.each(['-webkit-','-moz-',''], function(i, prefix){
16348        var _width = parseInt( $el.css(prefix+'column-width'), 10 );
16349        var _gap =   parseInt( $el.css(prefix+'column-gap'), 10 );
16350        if (!isNaN(_width)) columnWidth = _width;
16351        if (!isNaN(_gap))   columnGap = _gap;
16352    });
16353
16354    columnsNumber = Math.floor( (width - paddingLeft - paddingRight) / (columnWidth + columnGap) );
16355    if (isNaN(columnsNumber) || columnsNumber < 1) columnsNumber = 1;
16356    return columnsNumber;
16357}
16358function reorderMasonry(el){
16359	function sortByOrder(a, b) {
16360	  const startA = parseInt($(a).data('order')) || Number.MAX_VALUE;
16361	  const startB = parseInt($(b).data('order')) || Number.MAX_VALUE;
16362	  return startA === startB ? 0 : startA > startB ? 1 : -1;
16363	}
16364	
16365	var   _wrapper = $z(el),
16366		  _cards = _wrapper.find(".gallery-item").sort(sortByOrder),
16367		  //_cols = Number(_wrapper.css("column-count")),
16368		  _cols = getColumnsNumber(_wrapper),
16369		  _out = [],
16370		  _col = 0;
16371
16372	// if no. of cols hasn't changed, do nothing		  
16373	if ( _cols == parseInt(_wrapper.attr('data-cols')) ){
16374		return;
16375	}
16376		  
16377	while(_col < _cols) {
16378		for (var i = 0; i < _cards.length; i += _cols) {
16379			var _val = _cards[i + _col];
16380			if (_val !== undefined)
16381				_out.push(_val);
16382		}
16383		_col++;
16384	}
16385	_wrapper.html(_out);
16386	_wrapper.attr("data-cols", _cols);
16387}
16388				
16389$z(document).ready(function () {
16390	var url = window.location.href;
16391	var responsivePreview = false;
16392	var pvmode = zpGetParameterByName("responsivepreview", url); //url.searchParams.get("responsivepreview");
16393	if ( pvmode ){
16394		responsivePreview = true;
16395		window.location = window.location.origin + "/supplemental-external-previewing/index.html?url=" + url;
16396		//alert("Responsive-Preview Reload");
16397	}
16398	
16399	if ( $z(".zpgrid").length === 0 ){
16400		// we have a layout that was not modified for ZP13 i.e. a copied Layout from Version 12.5 or earlier
16401		// layouts not modified have no div with class .zpgrid, so we append the class to the document body
16402		$z('.zparea[data-areaname="Standard"], .zparea[data-areaname="Banner"], .zparea[data-areaname="Footer"]').addClass("zpgrid copiedlayout");
16403	}
16404
16405	//define some helper css classes
16406	$z("html").removeClass("no-js");
16407	$z("html, body").addClass("js");
16408	// recognize IE (since IE10 doesn't support conditional comments anymore)
16409	// removed in jQuery 1.9, so be careful!
16410	if ( $z.browser.msie || !!navigator.userAgent.match(/Trident.*rv\:11\./) ) {
16411		$z("html").removeClass("notie");
16412		$z("html").addClass("ie");
16413		$z("html").addClass("ie" + parseInt($z.browser.version, 10));
16414	}
16415	else if( !!navigator.userAgent.match(/Edge\/\d\d/) ){
16416		$z("html").addClass("edge");
16417	}
16418	else if ($z.browser.mozilla){
16419		$z("html").addClass("mozilla");
16420	}
16421	else if ($z.browser.chrome){
16422		$z("html").addClass("chrome");
16423	}
16424	else if ($z.browser.safari && !navigator.appVersion.match(/Chrome\//) ){
16425		$z("html").addClass("safari");
16426		if ( navigator.appVersion.match(/version\/(\d+)/i) ){
16427			$z("html").addClass("safari" + navigator.appVersion.match(/version\/(\d+)/i)[1]);
16428		}
16429	}
16430	
16431	// detect object-fit css support
16432	if ( document.createElement("detect").style.objectFit === "" ) {
16433		$z("body").addClass("objectfit");
16434	}
16435	
16436	// system prefers reduced motion (used i.e. to switch off animations in css)
16437	if ( window.matchMedia && window.matchMedia( "(prefers-reduced-motion: reduce)" ).matches ){
16438		$z("body:not(.zppreview)").addClass("zpreducemotion");
16439	}
16440	
16441	// add a top-padding to html5 audio because firefox has a time indicator implemented as a bubble which would be cut off due to our overflow hidden grid system
16442	if ($z.browser.mozilla){
16443		$z("audio").animate({paddingTop: '+=12px'}, 0); // we only use .animate() here, as that is a convenient way to be able to add values to (possibly) existing values
16444	}
16445	
16446	if ( is_touch_device() ) {
16447		// add .touch class to body if we run on a touch device, so we can use the class in css (used e.g. in ONLINE-CMS)
16448		$z("body").removeClass("notouch");
16449		$z("body").addClass("touch");
16450		
16451		// fix for hover menues (which contain submenues) to make them work on touch devices
16452		var breakpointmobilemenu = $z(".clickhovermenu").data("breakpointmobilemenu");
16453		var trianglemode = $z(".clickhovermenu").data("trianglemode") || false;
16454		$z(".touchhovermenu li:has(li) > a").each(function(i){
16455			hoverToClickMenu(this, breakpointmobilemenu, i, trianglemode);
16456		});
16457	}
16458	else{
16459		// In case we want to substitute hover with click menues on non touch devices too
16460		$z("body").removeClass("touch");
16461		$z("body").addClass("notouch");
16462		var breakpointmobilemenu = $z(".clickhovermenu").data("breakpointmobilemenu");
16463		var trianglemode = $z(".clickhovermenu").data("trianglemode") || false;
16464		$z(".clickhovermenu li:has(li) > a").each(function(i){
16465			hoverToClickMenu(this, breakpointmobilemenu, i, trianglemode);
16466		});
16467	}
16468		
16469	// make sure, the mobile menu is closed, if a link to an article on the same page is clicked
16470	$z('#nav ul li a:not(#mobilenavtoggle), nav ul li a:not(#mobilenavtoggle), div.nav-collapse ul li a:not(#mobilenavtoggle):not(.btn-navbar)').on('click.closeafterclick', function(e){
16471	//$('.nav-collapse ul li a').on('click', function(e){
16472		//console.log("Clicked on nav. defaultPrevented: " + e.isDefaultPrevented() + " ", e);
16473		if ( !e.isDefaultPrevented() && $z(".btn-navbar[data-toggle], #mobilenavtoggle").is(":visible") ){
16474			$z('.btn-navbar[data-toggle], #mobilenavtoggle').trigger("click");
16475		}
16476	});
16477	
16478	// set correct dimensions for breakout elements which in CSS are only approximated due to problems with browsers handling scrollbars differently when using vw/vh
16479	function setBreakout(){
16480		var bodyWidth = $z("body").outerWidth();
16481		// any widget
16482		$z(".supportsbreakout body:not(.withnews) .zpBreakout:not(.hasNews):not(.zpwBild.left):not(.zpwBild.right)").css("width",bodyWidth+"px").css("padding-left", "0").css("margin-left","calc(-" + bodyWidth/2 + "px + 50% )");
16483		$z("body.supportsbreakout:not(.withnews) .zpBreakout:not(.hasNews):not(.zpwBild.left):not(.zpwBild.right)").css("width",bodyWidth+"px").css("padding-left", "0").css("margin-left","calc(-" + bodyWidth/2 + "px + 50% )");
16484		// image widget
16485		$z(".supportsbreakout body:not(.withnews) .zpColumn.c12 .zpwBild.zpBreakout:not(.hasNews), body.supportsbreakout:not(.withnews) .zpColumn.c12 .zpwBild.zpBreakout:not(.hasNews)").each( function(index, value){
16486			// adjust css of image wrapper
16487			$z(this).css("width",bodyWidth+"px").css("padding-left", "0").css("margin-left","calc(-" + bodyWidth/2 + "px + 50% )")
16488			// set image width to browser-window-width, so it also enlarges if necessary
16489			$z(this).find('img.singleImage').css('width', bodyWidth + 'px').css('max-width','none');
16490			// set width of image description to column-width and horizontally center it
16491			var columnWidth = parseInt($z(this).parent('.zpColumnItem').width()) + "px";
16492			$z(this).find('.imagedescription').css("max-width", columnWidth).css("margin-left", "auto").css("margin-right", "auto");
16493		});
16494	}
16495	
16496	setBreakout();
16497	
16498	window.focalImages = function(){
16499		var minScreenWidth = 640; // breakpoint mobil
16500		
16501		$z('.zpContainer.zpfocal, .zpfixedbg.zpfocal, .zppagebg.zpfocal, img.zpfocal, li.zpfocal, img.zpflexgalfocal').each(function(){
16502			if ( $z(document).width() > minScreenWidth ){
16503				//return;
16504			}
16505			var imageObject = $z(this);
16506			//console.log("focalImages() on: ", imageObject);
16507			
16508			if ( imageObject[0].complete === false ){
16509				//console.log("focalImages imageObject incomplete: ", imageObject[0]);
16510				// image isn't loaded yet and dimensions in the dom are unknown (partent dimensions), so setup a listener for when it is loaded and then set the focal point
16511				// btw: imageObject[0] converts the jQuery-Object to a plain JS-Object
16512				imageObject[0].onload = function (){
16513					//console.log("focalImages imageObject complete: ", imageObject[0]);
16514					setFocalPoint(imageObject);
16515				}
16516			}
16517			else{
16518				// image is loaded already or node doesn't suport .complete, so we can set focus point immediately
16519				setFocalPoint(imageObject);
16520			}
16521		});
16522		
16523		function setFocalPoint($image){
16524			// math taken from https://css-tricks.com/focusing-background-image-precise-location-percentages/
16525			iw = $image.outerWidth();  								// bounding box width of scaled responsive image
16526			ih = $image.outerHeight(); 								// bounding box height of scaled responsive image
16527			// for flexbox galeries, we need to take dimensions from the parent
16528			if ($image.hasClass('zpflexgalfocal')){
16529				iw = $image.parent().outerWidth();  								// bounding box width of scaled responsive image
16530				ih = $image.parent().outerHeight(); 		
16531			}
16532			
16533			inw =  parseInt($image.attr("data-image-w")) || 0; 	// bgimage original width
16534			inh =  parseInt($image.attr("data-image-h")) || 0; 	// bgimage original height
16535			ifx =  parseInt($image.attr("data-focus-x")) || 50;	// desired focus point X as percentage from original image 
16536			ify =  parseInt($image.attr("data-focus-y")) || 50;	// desired focus point X as percentage from original image 
16537			
16538			scaleH = ih / inh;
16539			zW = parseFloat( (inw * scaleH) / iw ); 				// horizontal factor for focus as bg-position  
16540			bgx = zW !== 1 ? ( (ifx - 50) * zW/(zW-1) + 50 ) : ifx;		
16541
16542			scaleW = iw / inw;
16543			zH = parseFloat( (inh * scaleW) / ih ); 				// vertical factor for focus as bg-position  
16544			bgy = zH !== 1 ? ( (ify - 50) * zH/(zH-1) + 50 ) : ify;
16545		
16546			//console.log(`bgx: ${bgx} / bgy: ${bgy} / zH: ${zH} / zW: ${zW} / ifx: ${ifx} / ify: ${ify}`);
16547			//console.log(`Focal image - this.outerWidth: ${iw} / this.outerHeight ${ih} / scaleH/scaleW: ${scaleH}/${scaleW} / bgy/bgy: ${bgx}/${bgy}`);
16548			
16549			// auf min. 0 und max. 100 limitieren
16550			scaledFocusX = parseInt(bgx);
16551			if ( scaledFocusX > 100 ){
16552				scaledFocusX = 100;
16553			}
16554			if ( scaledFocusX < 0 ){
16555				scaledFocusX = 0;
16556			}
16557			scaledFocusY = parseInt(bgy);
16558			if ( scaledFocusY > 100 ){
16559				scaledFocusY = 100;
16560			}
16561			if ( scaledFocusY < 0 ){
16562				scaledFocusY = 0;
16563			}
16564			// set inline styles with important to override layout css				
16565			var crule = scaledFocusX.toString() + "% " + scaledFocusY.toString() + '%';
16566			//console.log(`Set inline styles (${crule}) for: `, $z($image)[0]);
16567			//console.log("focalImages() x/y: " + scaledFocusX.toString() + "/" + scaledFocusY.toString() + " - iw/ih: " + iw + "/" + ih + " - complete: " + $image[0].complete, $image);
16568			$z($image)[0].style.setProperty('background-position', crule, 'important');
16569			$z($image)[0].style.setProperty('object-position',     crule, 'important');
16570			
16571			//console.log("Get inline styles for: ", $z($image)[0].style);		
16572			//$image.attr('style', "background-position: " + scaledFocusX + "% " + scaledFocusY + "%" + " !important;" + "object-position: " + scaledFocusX + "% " + scaledFocusY + "% !important; ");
16573		}
16574	}
16575	focalImages();
16576	
16577	/*
16578	// reorder masonry galleries
16579	$z('.zpImageGallery.columngal').each(function (){
16580		reorderMasonry($z(this));
16581	});
16582	*/
16583	
16584	$z(window).on("resize", zpdebounce(100, function(event) {
16585		setBreakout();
16586		focalImages();
16587		// set some helper classnames on first level menu items to assist dropdown positioning
16588		zpIsLeftOrRight();
16589		/*
16590		// reorder masonry galleries
16591		$z('.zpImageGallery.columngal').each(function (){
16592			reorderMasonry($z(this));
16593		});
16594		*/
16595	}));
16596	
16597	// animate Containers on Scroll
16598	function isElementInViewport (el) {
16599		//special bonus for those using jQuery
16600		if (el instanceof jQuery) {
16601			el = el[0];
16602		}
16603		
16604		var rect = el.getBoundingClientRect();
16605
16606		//document.documentElement.clientHeight is a fallback for IE8
16607		return ( (rect.top >= 0 && rect.top <= (window.innerHeight || document.documentElement.clientHeight) ) || (rect.bottom >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight)) );
16608	}
16609	
16610	var lastScrollTop = 0;
16611	// ugly hack to execute this late, so all the doc ready code from widgeds already ran
16612	var delay = 10;
16613	if ( $z('body#poster-responsive').length ){
16614		delay = 100;
16615	}
16616	setTimeout(function() {
16617		var hasAnimatableContent = $z("body:not(.zpreducemotion) .zpanimate").length;	
16618		if ( hasAnimatableContent ){
16619			if ( $z.support.IntersectionObserver ){
16620				var zpanimCallback = function(entries, observer) { 
16621					entries.forEach(function(entry) {
16622						if ( entry.isIntersecting ){
16623							// console.log("IntersectionObserver. Element became visible: ", entry.target);
16624							observer.unobserve(entry.target);
16625							$z(entry.target).find(".zpanimate").addBack().addClass("show");
16626						}
16627					});
16628				};
16629				var zpanimObserver = new IntersectionObserver(zpanimCallback, {rootMargin: '0px', threshold: 0});
16630			}
16631			
16632			// store current body overeflow so we can later reset to this
16633			var bodyOverflow = $z("body").css("overflow") || "";
16634			var bodyOverflowX = $z("body").css("overflow-x") || "";
16635		
16636			// wrap animatable content in wrapper with overflow hidden to prevent scrollbars due to content shifted to the right
16637			$z('body:not(.zpreducemotion) .zpanimate.slideleft, \
16638				body:not(.zpreducemotion) .zpanimate.floatin, \
16639				body:not(.zpreducemotion) .zpanimate.zoomout').each(function(i, el){   
16640				var currentElement = $z(this);
16641				var inlineStyles = "";
16642				var rowRightPadding = 0;
16643				
16644				if ( currentElement.hasClass("zpColumn") ){
16645					// effects in columns need different wrapper css due to different parent styles
16646					inlineStyles += "margin: 0 !important;";
16647					inlineStyles += "padding: 0 !important;";
16648					if ( currentElement.find(".zpWideImage").length ) {
16649						// if the column contains a breakout image (desoign block), we need to modify the width by adding the right padding of the row
16650						//rowRightPadding = parseInt(currentElement.parents(".zpRow").css("padding-right"));
16651						debug.log("zpanimate: Adding extra padding to animated column width of " + rowRightPadding);
16652					}
16653				} else{
16654					inlineStyles += "padding-left:" + $z(this).css("padding-left") + " !important;";
16655					if ( !currentElement.hasClass("zpBreakout") ){
16656						inlineStyles += "margin-left: auto !important;";
16657						inlineStyles += "margin-right: auto !important;";
16658					}
16659					else{
16660						inlineStyles += "margin-left:" + $z(this).css("margin-left") + ";";
16661						inlineStyles += "margin-right" + $z(this).css("margin-right") + ";";;
16662					}
16663					inlineStyles += "padding-top: 0 !important;";
16664					inlineStyles += "padding-bottom: 0 !important;";
16665				}
16666				// in order to avoid errors due to JS returning rounded values, we use parseInt
16667				// IntersectionObserver might not recognize an element if the width contains fractions like e.g. 152.543px
16668				if ( window.getComputedStyle(this).width && !isNaN(parseInt(window.getComputedStyle(this).width)) ){
16669					inlineStyles += " width:" + (parseInt(window.getComputedStyle(this).width) + rowRightPadding) + "px;";
16670				}
16671				
16672				// remove margins from current element since they'll be applied to wrapper by the zpContainer/zpRow class css
16673				currentElement.css("margin-top", "0px");
16674				currentElement.css("margin-bottom", "0px");
16675				// depending if current Element is zpRow or zpContainer, use propper className in wrapper too, so the correct CSS applies to the wrapper
16676				var currentElementClass = "zpContainer";
16677				
16678				var currentContainerId = ''; // we set the wrapper to the same IDs, so the inline CSS applies to the wrappers too 
16679				var currentRowId = '';		 // and keeps margins etc. set in the "Darstellungs-Tab"
16680				var currentColumnId = '';
16681				var columnWidthClass = '';
16682				if ( currentElement.hasClass("zpContainer") ){
16683					currentContainerId = ' data-container-id="' + currentElement.attr("data-zpleid") + '"';
16684				}
16685				if ( currentElement.hasClass("zpRow") ){
16686					currentRowId = ' data-row-id="' + currentElement.attr("data-row-id") + '"';
16687					currentElementClass = "zpRow";
16688				}
16689				if ( currentElement.hasClass("zpColumn") ){
16690					currentColumnId = ' data-column-id="' + currentElement.attr("data-column-id") + '"';
16691					currentElementClass = " zpColumn";
16692					// currentElementClass = currentElement.attr("class");
16693					// add column class (i.e. c1 to c12) from current column so the width is set properly
16694					columnWidthClass = currentElement.attr("class").match(/c[1-9][0-2]?/); 
16695					currentElementClass += " " + columnWidthClass;
16696					// add wideImage class in case such a design block is animated
16697					currentElementClass += " " + currentElement.attr("class").match(/zpWideImage/); 
16698					//console.warn("anim Current Element (" + currentColumnId + ") width: " + currentElement.width());
16699				}
16700				if ( currentElement.hasClass("floatin") ){
16701					currentElementClass += " floatin";
16702				}
16703				if ( currentElement.hasClass("zpBreakout") ){
16704					currentElementClass += " zpBreakout";
16705				}
16706				// remove inline-scripts from ZP search-page as these destroy the dom during animation
16707				var currentScript = currentElement.find('script.zpsearchinlinescript').text();
16708				currentElement.find('script.zpsearchinlinescript').remove();
16709				currentElement.removeClass(columnWidthClass).css("width", "100%").wrap('<div' + currentContainerId + currentRowId + currentColumnId + ' class="zpanimatewrap ' + currentElementClass + '" style="' + inlineStyles + '">');
16710				
16711				//console.warn("anim Current Wrap (" + currentColumnId + ") width: " + currentElement.parent().width());
16712				
16713				// unwrap the content again after the animation finished to make sure it properly displays and doesn't get disturbed by the wrapper
16714				currentElement.off("webkitTransitionEnd.zpaniwrap otransitionend.zpaniwrap oTransitionEnd.zpaniwrap msTransitionEnd.zpaniwrap transitionend.zpaniwrap animationend.zpaniwrap" );
16715				currentElement.on( "webkitTransitionEnd.zpaniwrap otransitionend.zpaniwrap oTransitionEnd.zpaniwrap msTransitionEnd.zpaniwrap transitionend.zpaniwrap animationend.zpaniwrap", function(event) {
16716					if ( event && event.currentTarget == event.target ){
16717						//console.log(new Date().toISOString() + ": transitionEnd() Event:", event);
16718						if ( currentElement.parent().hasClass("zpanimatewrap") ){
16719							currentElement.addClass("played").unwrap(); // .played is used to avoid animations playing again if el is unwrapped
16720						}
16721						currentElement.addClass(columnWidthClass);
16722						// reset added CSS – width and margins
16723						currentElement.css("width", "");
16724						currentElement.css("margin-top", "");
16725						currentElement.css("margin-bottom", "");	
16726					}
16727				});
16728			}); ;
16729			
16730			function doAnimations(e){
16731				var delay = 0;
16732				var st = $z(this).scrollTop();
16733				if (st > lastScrollTop){
16734					var scrollDirection = "down";
16735				}
16736				else{
16737					var scrollDirection = "up";
16738				}
16739				lastScrollTop = st;
16740				$z("body:not(.zpreducemotion) .zpanimate:not(.zppreview)").each(function(i, el){
16741					// find children with position fixed and hide them because they'd be positioned wrong
16742					var fixedChilds = $z(el).find('*').filter(function(){
16743						var $this = $(this);
16744						//return $this.css('position') == 'relative';
16745						return $this.css('position') == 'fixed';
16746					});
16747					fixedChilds.hide();
16748					
16749					$z(el).off("webkitTransitionEnd.zpaniend otransitionend.zpaniend oTransitionEnd.zpaniend msTransitionEnd.zpaniend transitionend.zpaniend animationend.zpaniend" );
16750					$z(el).on( "webkitTransitionEnd.zpaniend otransitionend.zpaniend oTransitionEnd.zpaniend msTransitionEnd.zpaniend transitionend.zpaniend animationend.zpaniend", function(event) {
16751						if ( event && event.currentTarget == event.target ){
16752							// remove animation classes so that fixed Widgets (e.g. Reservierungs-Popup) are placed correctly
16753							$z(el).removeClass("zpanimate show played slideleft slideright fadein floatin zoomout pulse");
16754							// show fixed children again
16755							fixedChilds.fadeIn();
16756							// set breakout dimensions
16757							setBreakout();
16758						}
16759					});
16760					
16761					var viewportTestElement = el;
16762					// FYI: el is a Dom-Object, not a jQuery-Object
16763					if ( el.className.indexOf("floatin") !== -1 ){
16764						// Elements with Effect "Einschweben" have a translateY(50%) applied, so we need to get the proper .top coordinates of the parent-wrapper in order to find out if it's in viewport
16765						viewportTestElement = el.parentElement;
16766					}
16767					
16768					if ( $z.support.IntersectionObserver ){
16769						zpanimObserver.observe(viewportTestElement);
16770					}
16771					else{
16772						if ( isElementInViewport(viewportTestElement) ) {
16773							if ( ! $z(this).hasClass("show")){
16774								var currentElement = $z(this);
16775								// animate consecutively visible elements via setTimeout, so the elements are animated consecutive and not at the same time 
16776								if ( typeof this.timeoutId !== 'undefined' ) {
16777									clearTimeout(this.timeoutId);
16778								}
16779								this.timeoutId = setTimeout(function() { 
16780									currentElement.addClass("show");
16781								}, delay);
16782								delay += 250;
16783							}
16784						}
16785						else{
16786							// reset delay once we reach an element out of viewport, so once this reaches viewport, it isn't animated with delay
16787							delay = 0;
16788						}
16789					}
16790				});
16791			}
16792			
16793			if ( $z('body').hasClass('loaded') ){
16794				// window is already loaded, so call doAnimation once as the window.load event won't triger it
16795				doAnimations();
16796			}
16797	
16798			$z(window).off('load.zpanim scroll.zpanim');
16799			if ( $z.support.IntersectionObserver ){
16800				$z(window).on('load.zpanim', doAnimations); 
16801			}
16802			else{
16803				$z(window).on('scroll.zpanim', zpthrottle(50, doAnimations));
16804			}
16805	
16806		}
16807	}, delay);
16808	
16809	// set some helper classnames on first level menu items to assist dropdown positioning
16810	zpIsLeftOrRight();
16811		
16812	// wire up xmenu language selection
16813	function setLanguageSelectWidth(element){
16814		// find the width of the selected element and set the width of the select accordingly, so the selected element will never be cut off
16815		var text = $z(element).find("option:selected").text() || "";
16816		$z('a.xmenulink').css("vertical-align","top");
16817		var itemwrapper = $z('i.zpextralang').attr('data-itemwrapper').split(',') || ["",""];
16818		var $link = $('<a class="xmenulink">').html(text);
16819		$link.insertBefore('i.zpextralang');
16820		
16821		// set styles, so it displays properly and width is calculated correctly
16822		$z('i.zpextralang').css('color', $link.css('color'));
16823		$z('i.zpextralang').css('line-height', $link.css('line-height'));
16824		$z('i.zpextralang').css('padding', $link.css('padding'));
16825		$z('i.zpextralang').css('margin-left', $link.css('margin-left'));
16826		$z('i.zpextralang').css('margin-top', $link.css('margin-top'));
16827		$z('i.zpextralang').css('margin-bottom', $link.css('margin-bottom'));
16828		$z('i.zpextralang').css('border-width', $link.css('border-width'));
16829		$z('i.zpextralang').css('border-style', $link.css('border-style'));
16830		
16831		$z(element).css('font-family', $link.css('font-family'));
16832		$z(element).css('font-size', $link.css('font-size'));
16833		$z(element).css('font-weight', $link.css('font-weight'));
16834		$z(element).css('font-style', $link.css('font-style'));
16835		$z(element).css('font-style', $link.css('font-style'));
16836		$z(element).css('text-shadow', $link.css('text-shadow'));
16837		$z(element).css('color', $link.css('color'));
16838		$z(element).css('text-decoration', $link.css('text-decoration'));
16839		
16840		// measure link-width
16841		var width = parseInt($link.innerWidth()) + 10;// + 5;
16842		// remove link-element we only temporarily inserted to measure
16843		$link.remove();
16844		
16845		var arrowWidth = .5 *1.4142;// ".5rem"; //parseInt($z(element).css("padding-right")) || 0;
16846		//$z(element).css("width", "calc( "+ width + "px + " + arrowWidth + "rem)");
16847		$z(element).css("width", "calc( "+ width + "px + 1ch)");
16848	}
16849	$z('#zpextralang').each(function(){
16850		// set select width to width of selected option
16851		setLanguageSelectWidth(this); //$z('a.xmenulink').last();
16852	});
16853
16854	$z('#zpextralang').on("change", function(){
16855		var url = this.value;
16856		if ( url ){
16857			//setLanguageSelectWidth(this);
16858			// go to the respective url
16859			window.location.href = url;
16860		}
16861	});   
16862	
16863	// highlight searchstrings if aplicable 
16864	var searchstr = zpGetParameterByName("q") || "";
16865
16866	if ( searchstr && searchstr !== "" ){
16867		debug.log("Marking searchstring: " + searchstr);
16868		searchstr = searchstr.replace(/\+/g, " ");
16869		// mark the string except in search results .restitle and .SO-SiteSearchResult
16870		$('.zparea[data-areaname="Standard"], .zparea[data-areaname="News"]').mark(searchstr, {"className": "zpsearchmatch", "exclude": [".zpwSuche", ".zpwSuche *", ".zpwShop-_Suche *", "nav *", ".nav *"]});
16871	
16872		// scroll first marked match into view (bottom of window due to fixed headers)
16873		var firstMatch = $z('.zpsearchmatch');
16874		if ( firstMatch.length ){
16875			$z(firstMatch)[0].scrollIntoView({
16876				behavior: "smooth", // or "auto" or "instant"
16877				block: "end", 
16878				inline: "nearest"
16879			});
16880		}
16881	}
16882	
16883});
16884
16885// define zp Namespace for later use in individual widgets
16886// define zp Namespace for later use in individual widgets if not only defined
16887if ( typeof(zp)==="undefined" ){
16888	var zp = {  
16889	}; // end zp
16890}
16891// test HTML5 field-type support and store it in zp.html5support
16892zp.html5support = {number: false, email: false, tel: false, url: false, date: false, time: false, color: false, search: false};
16893var tester = document.createElement('input');
16894for(var i in zp.html5support){
16895	// Use try/catch because IE9 throws "Invalid Argument" when trying to use unsupported input types
16896	try {
16897		tester.type = i;
16898		if(tester.type === i){
16899			zp.html5support[i] = true;
16900		}
16901	} catch (e){}
16902}
16903
16904(function($){
16905	// make $z.unique also work on arrays and not only DOM-Elements (without this, we have a problem with the EventCalendars in Chrome)
16906	// http://stackoverflow.com/a/7366133
16907    var _old = $.unique;
16908    $.unique = function(arr){
16909        // do the default behavior only if we got an array of elements
16910        if ( arr.length == 0  || !!arr[0].nodeType){
16911            return _old.apply(this,arguments);
16912        }
16913        else {
16914            // reduce the array to contain no dupes via grep/inArray
16915            return $.grep(arr,function(v,k){
16916                return $.inArray(v,arr) === k;
16917            });
16918        }
16919    };
16920    
16921    // custom function to shorten and suffix text with _filler_ to make it fit its container - StS 2016-10-27
16922    // call it like this: $z(".mySelector").fitText();
16923    $.fn.fitText = function( filler ){
16924    	filler = typeof filler !== 'undefined' ? filler : "…";
16925    	
16926		zpTextOverflow(this, filler);
16927	
16928		return this;
16929	}
16930	
16931	// custom function to find out if content of an element is overflowing 
16932	$.fn.overflown=function(direction){
16933		if (typeof(direction)==='undefined') direction = "any";
16934		var e=this[0];
16935		var buffer = 4; // needs to be greater than value + buffer to be considered overflown. Compensates Browser rounding-bugs(cough, IE)…
16936		if ( typeof e !== "undefined" ){
16937			switch(direction) {
16938				case "x":
16939					return e.scrollWidth>(e.clientWidth+buffer);
16940					break;
16941				case "y":
16942					return e.scrollHeight>(e.clientHeight+buffer);
16943					break;
16944				default:
16945					return e.scrollHeight>(e.clientHeight+buffer)||e.scrollWidth>(e.clientWidth+buffer);
16946			}
16947		}
16948		else{
16949			return false;
16950		}
16951	}
16952    
16953})($z);
16954
16955/*!
16956  stickybits - Stickybits is a lightweight alternative to `position: sticky` polyfills
16957  @version v3.6.1
16958  @link https://github.com/dollarshaveclub/stickybits#readme
16959  @author Jeff Wainwright <[email protected]> (https://jeffry.in)
16960  @license MIT
16961*/
16962!function(t){"function"==typeof define&&define.amd?define(t):t()}(function(){"use strict";var s=function(){function t(t,s){var e=void 0!==s?s:{};this.version="3.6.1",this.userAgent=window.navigator.userAgent||"no `userAgent` provided by the browser",this.props={customStickyChangeNumber:e.customStickyChangeNumber||null,noStyles:e.noStyles||!1,stickyBitStickyOffset:e.stickyBitStickyOffset||0,parentClass:e.parentClass||"js-stickybit-parent",scrollEl:"string"==typeof e.scrollEl?document.querySelector(e.scrollEl):e.scrollEl||window,stickyClass:e.stickyClass||"js-is-sticky",stuckClass:e.stuckClass||"js-is-stuck",stickyChangeClass:e.stickyChangeClass||"js-is-sticky--change",useStickyClasse
16962s:e.useStickyClasses||!1,useFixed:e.useFixed||!1,useGetBoundingClientRect:e.useGetBoundingClientRect||!1,verticalPosition:e.verticalPosition||"top"},this.props.positionVal=this.definePosition()||"fixed",this.instances=[];var i=this.props,n=i.positionVal,o=i.verticalPosition,r=i.noStyles,a=i.stickyBitStickyOffset,l=i.useStickyClasses,c="top"!==o||r?"":a+"px",f="fixed"!==n?n:"";this.els="string"==typeof t?document.querySelectorAll(t):t,"length"in this.els||(this.els=[this.els]);for(var u=0;u<this.els.length;u++){var p=this.els[u];if(p.style[o]=c,p.style.position=f,"fixed"===n||l){var h=this.addInstance(p,this.props);this.instances.push(h)}}}var s=t.prototype;return s.definePosition=function(){var t;if(this.props.useFixed)t="fixed";else{for(var s=["","-o-","-webkit-","-moz-","-ms-"],e=document.head.style,i=0;i<s.length;i+=1)e.position=s[i]+"sticky";t=e.position?e.position:"fixed",e.position=""}return t},s.addInstance=function(t,s){var e=this,i={el:t,parent:t.parentNode,props:s};this.isWin=this.props.scrollEl===window;var n=this.isWin?window:this.getClosestParent(i.el,i.props.scrollEl);return this.computeScrollOffsets(i),i.parent.className+=" "+s.parentClass,i.state="default",i.stateContainer=function(){return e.manageState(i)},n.addEventListener("scroll",i.stateContainer),i},s.getClosestParent=function(t,s){var e=s,i=t;if(i.parentElement===e)return e;for(;i.parentElement!==e;)i=i.parentElement;return e},s.getTopPosition=function(t){if(this.props.useGetBoundingClientRect)return t.getBoundingClientRect().top+(this.props.scrollEl.pageYOffset||document.documentElement.scrollTop);for(var s=0;s=t.offsetTop+s,t=t.offsetParent;);return s},s.computeScrollOffsets=function(t){var s=t,e=s.props,i=s.el,n=s.parent,o=!this.isWin&&"fixed"===e.positionVal,r="bottom"!==e.verticalPosition,a=o?this.getTopPosition(e.scrollEl):0,l=o?this.getTopPosition(n)-a:this.getTopPosition(n),c=null!==e.customStickyChangeNumber?e.customStickyChangeNumber:i.offsetHeight,f=l+n.offsetHeight;return s.offset=a+e.stickyBitStickyOffset,s.stickyStart=r?l-s.offset:0,s.stickyChange=s.stickyStart+c,s.stickyStop=r?f-(i.offsetHeight+s.offset):f-window.innerHeight,s},s.toggleClasses=function(t,s,e){var i=t,n=i.className.split(" ");e&&-1===n.indexOf(e)&&n.push(e);var o=n.indexOf(s);-1!==o&&n.splice(o,1),i.className=n.join(" ")},s.manageState=function(t){var s=t,e=s.el,i=s.props,n=s.state,o=s.stickyStart,r=s.stickyChange,a=s.stickyStop,l=e.style,c=i.noStyles,f=i.positionVal,u=i.scrollEl,p=i.stickyClass,h=i.stickyChangeClass,d=i.stuckClass,y=i.verticalPosition,k="bottom"!==y,g=function(t){t()},m=this.isWin&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame)||g,v=this.toggleClasses,C=this.isWin?window.scrollY||window.pageYOffset:u.scrollTop,w=k&&C<=o&&("sticky"===n||"stuck"===n),S=a<=C&&"sticky"===n;o<C&&C<a&&("default"===n||"stuck"===n)?(s.state="sticky",m(function(){v(e,d,p),l.position=f,c||(l.bottom="",l[y]=i.stickyBitStickyOffset+"px")})):w?(s.state="default",m(function(){v(e,p),v(e,d),"fixed"===f&&(l.position="")})):S&&(s.state="stuck",m(function(){v(e,p,d),"fixed"!==f||c||(l.top="",l.bottom="0",l.position="absolute")}));var b=r<=C&&C<=a;return C<r/2||a<C?m(function(){v(e,h)}):b&&m(function(){v(e,"stub",h)}),s},s.update=function(t){void 0===t&&(t=null);for(var s=0;s<this.instances.length;s+=1){var e=this.instances[s];if(this.computeScrollOffsets(e),t)for(var i in t)e.props[i]=t[i]}return this},s.removeInstance=function(t){var s=t.el,e=t.props,i=this.toggleClasses;s.style.position="",s.style[e.verticalPosition]="",i(s,e.stickyClass),i(s,e.stuckClass),i(s.parentNode,e.parentClass)},s.cleanup=function(){for(var t=0;t<this.instances.length;t+=1){var s=this.instances[t];s.props.scrollEl.removeEventListener("scroll",s.stateContainer),this.removeInstance(s)}this.manageState=!1,this.instances=[]},t}();if("undefined"!=typeof window){var t=window.$z||window.$||window.jQuery||window.Zepto;t&&(t.fn.stickybits=function(t){return new s(this,t)})}});
16963
16964// Highlight strings in text 
16965/*!***************************************************
16966* mark.js v9.0.0
16967* https://markjs.io/
16968* Copyright (c) 2014–2018, Julian Kühnel
16969* Released under the MIT license https://git.io/vwTVl
16970*****************************************************/
16971!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):e.Mark=t(e.jQuery)}(this,function(e){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}e=e&&e.hasOwnProperty("default")?e.default:e;var a=
16972/* */
16973function(){function e(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5e3;n(this,e),this.ctx=t,this.iframes=r,this.exclude=o,this.iframesTimeout=i}return o(e,[{key:"getContexts",value:function(){var e=[];return(void 0!==this.ctx&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:"string"==typeof this.ctx?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEac
vendor: 6,112 bytes, lines 16973-16975
16973h(function(t){var n=e.filter(function(e){return e.contains(t)}).length>0;-1!==e.indexOf(t)||n||e.push(t)}),e}},{key:"getIframeContents",value:function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};try{var o=e.contentWindow;if(n=o.document,!o||!n)throw new Error("iframe inaccessible")}catch(e){r()}n&&t(n)}},{key:"isIframeBlank",value:function(e){var t="about:blank",n=e.getAttribute("src").trim();return e.contentWindow.location.href===t&&n!==t&&n}},{key:"observeIframeLoad",value:function(e,t,n){var r=this,o=!1,i=null,a=function a(){if(!o){o=!0,clearTimeout(i);try{r.isIframeBlank(e)||(e.removeEventListener("load",a),r.getIframeContents(e,t,n))}catch(e){n()}}};e.addEventListener("load",a),i=setTimeout(a,this.iframesTimeout)}},{key:"onIframeReady",value:function(e,t,n){try{"complete"===e.contentWindow.document.readyState?this.isIframeBlank(e)?this.observeIframeLoad(e,t,n):this.getIframeContents(e,t,n):this.observeIframeLoad(e,t,n)}catch(e){n()}}},{key:"waitForIframes",value:function(e,t){var n=this,r=0;this.forEachIframe(e,function(){return!0},function(e){r++,n.waitForIframes(e.querySelector("html"),function(){--r||t()})},function(e){e||t()})}},{key:"forEachIframe",value:function(t,n,r){var o=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},a=t.querySelectorAll("iframe"),s=a.length,c=0;a=Array.prototype.slice.call(a);var u=function(){--s<=0&&i(c)};s||u(),a.forEach(function(t){e.matches(t,o.exclude)?u():o.onIframeReady(t,function(e){n(t)&&(c++,r(e)),u()},u)})}},{key:"createIterator",value:function(e,t,n){return document.createNodeIterator(e,t,n,!1)}},{key:"createInstanceOnIframe",value:function(t){return new e(t.querySelector("html"),this.iframes)}},{key:"compareNodeIframe",value:function(e,t,n){if(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_PRECEDING){if(null===t)return!0;if(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)return!0}return!1}},{key:"getIteratorNode",value:function(e){var t=e.previousNode();return{prevNode:t,node:null===t?e.nextNode():e.nextNode()&&e.nextNode()}}},{key:"checkIframeFilter",value:function(e,t,n,r){var o=!1,i=!1;return r.forEach(function(e,t){e.val===n&&(o=t,i=e.handled)}),this.compareNodeIframe(e,t,n)?(!1!==o||i?!1===o||i||(r[o].handled=!0):r.push({val:n,handled:!0}),!0):(!1===o&&r.push({val:n,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(e,t,n,r){var o=this;e.forEach(function(e){e.handled||o.getIframeContents(e.val,function(e){o.createInstanceOnIframe(e).forEachNode(t,n,r)})})}},{key:"iterateThroughNodes",value:function(e,t,n,r,o){for(var i,a,s,c=this,u=this.createIterator(t,e,r),l=[],h=[];s=void 0,s=c.getIteratorNode(u),a=s.prevNode,i=s.node;)this.iframes&&this.forEachIframe(t,function(e){return c.checkIframeFilter(i,a,e,l)},function(t){c.createInstanceOnIframe(t).forEachNode(e,function(e){return h.push(e)},r)}),h.push(i);h.forEach(function(e){n(e)}),this.iframes&&this.handleOpenIframes(l,e,n,r),o()}},{key:"forEachNode",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},i=this.getContexts(),a=i.length;a||o(),i.forEach(function(i){var s=function(){r.iterateThroughNodes(e,i,t,n,function(){--a<=0&&o()})};r.iframes?r.waitForIframes(i,s):s()})}}],[{key:"matches",value:function(e,t){var n="string"==typeof t?[t]:t,r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(r){var o=!1;return n.every(function(t){return!r.call(e,t)||(o=!0,!1)}),o}return!1}}]),e}(),s=
16974/* */
16975function(){function e(t){n(this,e),this.opt=i({},{diacritics:!0,synonyms:{},accuracy:"partially",caseSensitive:!1,ignoreJoiners:!1,ignorePunctuation:[],wildcards:"disabled"},t)}return o(e,[{key:"create",value:function(e){return"disabled"!==this.opt.wildcards&&(e=this.setupWildcardsRegExp(e)),e=this.escapeStr(e),Object.keys(this.opt.synonyms).length&&(e=this.createSynonymsRegExp(e)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),this.opt.diacritics&&(e=this.createDiacriticsRegExp(e)),e=this.createMergedBlanksRegExp(e),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.createJoinersRegExp(e)),"disabled"!==this.opt.wildcards&&(e=this.createWildcardsRegExp(e)),e=this.createAccuracyRegExp(e),new RegExp(e,"gm".concat(this.opt.caseSensitive?"":"i"))}},{key:"sortByLength",value:function(e){return e.sort(function(e,t){return e.length===t.length?e>t?1:-1:t.length-e.length})}},{key:"escapeStr",value:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}},{key:"createSynonymsRegExp",value:function(e){var t=this,n=this.opt.synonyms,r=this.opt.caseSensitive?"":"i",o=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(var i in n)if(n.hasOwnProperty(i)){var a=Array.isArray(n[i])?n[i]:[n[i]];a.unshift(i),(a=this.sortByLength(a).map(function(e){return"disabled"!==t.opt.wildcards&&(e=t.setupWildcardsRegExp(e)),e=t.escapeStr(e)}).filter(function(e){return""!==e})).length>1&&(e=e.replace(new RegExp("(".concat(a.map(function(e){return t.escapeStr(e)}).join("|"),")"),"gm".concat(r)),o+"(".concat(a.map(function(e){return t.processSynonyms(e)}).join("|"),")")+o))}return e}},{key:"processSynonyms",value:function(e){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),e}},{key:"setupWildcardsRegExp",value:function(e){return(e=e.replace(/(?:\\)*\?/g,function(e){return"\\"===e.charAt(0)?"?":"�"})).replace(/(?:\\)*\*/g,function(e){return"\\"===e.charAt(0)?"*":"�"})}},{key:"createWildcardsRegExp",value:function(e){var t="withSpaces"===this.opt.wildcards;return e.replace(/\u0001/g,t?"[\\S\\s]?":"\\S?").replace(/\u0002/g,t?"[\\S\\s]*?":"\\S*")}},{key:"setupIgnoreJoinersRegExp",value:function(e){return e.replace(/[^(|)\\]/g,function(e,t,n){var r=n.charAt(t+1);return/[(|)\\]/.test(r)||""===r?e:e+"\0"})}},{key:"createJoinersRegExp",value:function(e){var t=[],n=this.opt.ignorePunctuation;return Array.isArray(n)&&n.length&&t.push(this.escapeStr(n.join(""))),this.opt.ignoreJoiners&&t.pu
16975sh("\\u00ad\\u200b\\u200c\\u200d"),t.length?e.split(/\u0000+/).join("[".concat(t.join(""),"]*")):e}},{key:"createDiacriticsRegExp",value:function(e){var t=this.opt.caseSensitive?"":"i",n=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"],r=[];return e.split("").forEach(function(o){n.every(function(n){if(-1!==n.indexOf(o)){if(r.indexOf(n)>-1)return!1;e=e.replace(new RegExp("[".concat(n,"]"),"gm".concat(t)),"[".concat(n,"]")),r.push(n)}return!0})}),e}},{key:"createMergedBlanksRegExp",value:function(e){return e.replace(/[\s]+/gim,"[\\s]+")}},{key:"createAccuracyRegExp",value:function(e){var t=this,n=this.opt.accuracy,r="string"==typeof n?n:n.value,o="string"==typeof n?[]:n.limiters,i="";
16975switch(o.forEach(function(e){i+="|".concat(t.escapeStr(e))}),r){case"partially":default:return"()(".concat(e,")");case"complementary":return i="\\s"+(i||this.escapeStr("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿")),"()([^".concat(i,"]*").concat(e,"[^").concat(i,"]*)");case"exactly":return"(^|\\s".concat(i,")(").concat(e,")(?=$|\\s").concat(i,")")}}}]),e}(),c=
16976/* */
16977function(){function e(t){n(this,e),this.ctx=t,this.ie=!1;var r=window.navigator.userAgent;(r.indexOf("MSIE")>-1||r.indexOf("Trident")>-1)&&(this.ie=!0)}return o(e,[{key:"log",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"debug",r=this.opt.log;this.opt.debug&&"object"===t(r)&&"function"==typeof r[n]&&r[n]("mark.js: ".concat(e))}},{key:"getSeparatedKeywords",value:function(e){var t=this,n=[];return e.forEach(function(e){t.opt.separateWordSearch?e.split(" ").forEach(function(e){e.trim()&&-1===n.indexOf(e)&&n.push(e)}):e.trim()&&-1===n.indexOf(e)&&n.push(e)}),{keywords:n.sort(function(e,t){return t.length-e.length}),length:n.length}}},{key:"isNumeric",value:function(e){return Number(parseFloat(e))==e}},{key:"checkRanges",value:function(e){var t=this;if(!Array.isArray(e)||"[object Object]"!==Object.prototype.toString.call(e[0]))return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(e),[];var n=[],r=0;return e.sort(function(e,t){return e.start-t.start}).forEach(function(e){var o=t.callNoMatchOnInvalidRanges(e,r),i=o.start,a=o.end;o.valid&&(e.start=i,e.length=a-i,n.push(e),r=a)}),n}},{key:"callNoMatchOnInvalidRanges",value:function(e,t){var n,r,o=!1;return e&&void 0!==e.start?(r=(n=parseInt(e.start,10))+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&r-t>0&&r-n>0?o=!0:(this.log("Ignoring invalid or overlapping range: "+"".concat(JSON.stringify(e))),this.opt.noMatch(e))):(this.log("Ignoring invalid range: ".concat(JSON.stringify(e))),this.opt.noMatch(e)),{start:n,end:r,valid:o}}},{key:"checkWhitespaceRanges",value:function(e,t,n){var r,o=!0,i=n.length,a=t-i,s=parseInt(e.start,10)-a;return(r=(s=s>i?i:s)+parseInt(e.length,10))>i&&(r=i,this.log("End range automatically set to the max value of ".concat(i))),s<0||r-s<0||s>i||r>i?(o=!1,this.log("Invalid range: ".concat(JSON.stringify(e))),this.opt.noMatch(e)):""===n.substring(s,r).replace(/\s+/g,"")&&(o=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:s,end:r,valid:o}}},{key:"getTextNodes",value:function(e){var t=this,n="",r=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,function(e){r.push({start:n.length,end:(n+=e.textContent).length,node:e})},function(e){return t.matchesExclude(e.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},function(){e({value:n,nodes:r})})}},{key:"matchesExclude",value:function(e){return a.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}},{key:"wrapRangeInTextNode",value:function(e,t,n){var r=this.opt.element?this.opt.element:"mark",o=e.splitText(t),i=o.splitText(n-t),a=document.createElement(r);return a.setAttribute("data-markjs","true"),this.opt.className&&a.setAttribute("class",this.opt.className),a.textContent=o.textContent,o.parentNode.replaceChild(a,o),i}},{key:"wrapRangeInMappedTextNode",value:function(e,t,n,r,o){var i=this;e.nodes.every(function(a,s){var c=e.nodes[s+1];if(void 0===c||c.start>t){if(!r(a.node))return!1;var u=t-a.start,l=(n>a.end?a.end:n)-a.start,h=e.value.substr(0,a.start),f=e.value.substr(l+a.start);if(a.node=i.wrapRangeInTextNode(a.node,u,l),e.value=h+f,e.nodes.forEach(function(t,n){n>=s&&(e.nodes[n].start>0&&n!==s&&(e.nodes[n].start-=l),e.nodes[n].end-=l)}),n-=l,o(a.node.previousSibling,a.start),!(n>a.end))return!1;t=a.end}return!0})}},{key:"wrapGroups",value:function(e,t,n,r){return r((e=this.wrapRangeInTextNode(e,t,t+n)).previousSibling),e}},{key:"separateGroups",value:function(e,t,n,r,o){for(var i=t.length,a=1;a<i;a++){var s=e.textContent.indexOf(t[a]);t[a]&&s>-1&&r(t[a],e)&&(e=this.wrapGroups(e,s,t[a].length,o))}return e}},{key:"wrapMatches",value:function(e,t,n,r,o){var i=this,a=0===t?0:t+1;
16977this.getTextNodes(function(t){t.nodes.forEach(function(t){var o;for(t=t.node;null!==(o=e.exec(t.textContent))&&""!==o[a];){if(i.opt.separateGroups)t=i.separateGroups(t,o,a,n,r);else{if(!n(o[a],t))continue;var s=o.index;if(0!==a)for(var c=1;c<a;c++)s+=o[c].length;t=i.wrapGroups(t,s,o[a].length,r)}e.lastIndex=0}}),o()})}},{key:"wrapMatchesAcrossElements",value:function(e,t,n,r,o){var i=this,a=0===t?0:t+1;this.getTextNodes(function(t){for(var s;null!==(s=e.exec(t.value))&&""!==s[a];){var c=s.index;if(0!==a)for(var u=1;u<a;u++)c+=s[u].length;var l=c+s[a].length;i.wrapRangeInMappedTextNode(t,c,l,function(e){return n(s[a],e)},function(t,n){e.lastIndex=n,r(t)})}o()})}},{key:"wrapRangeFromIndex",value:function(e,t,n,r){var o=this;this.getTextNodes(function(i){var a=i.value.length;e.forEach(function(e,r){var s=o.checkWhitespaceRanges(e,a,i.value),c=s.start,u=s.end;s.valid&&o.wrapRangeInMappedTextNode(i,c,u,function(n){return t(n,e,i.value.substring(c,u),r)},function(t){n(t,e)})}),r()})}},{key:"unwrapMatches",value:function(e){for(var t=e.parentNode,n=document.createDocumentFragment();e.firstChild;)n.appendChild(e.removeChild(e.firstChild));t.replaceChild(n,e),this.ie?this.normalizeTextNode(t):t.normalize()}},{key:"normalizeTextNode",value:function(e){if(e){if(3===e.nodeType)for(;e.nextSibling&&3===e.nextSibling.nodeType;)e.nodeValue+=e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);else this.normalizeTextNode(e.firstChild);this.normalizeTextNode(e.nextSibling)}}},{key:"markRegExp",value:function(e,t){var n=this;this.opt=t,this.log('Searching with expression "'.concat(e,'"'));var r=0,o="wrapMatches";this.opt.acrossElements&&(o="wrapMatchesAcrossElements"),this[o](e,this.opt.ignoreGroups,function(e,t){return n.opt.filter(t,e,r)},function(e){r++,n.opt.each(e)},function(){0===r&&n.opt.noMatch(e),n.opt.done(r)})}},{key:"mark",value:function(e,t){var n=this;this.opt=t;var r=0,o="wrapMatches",i=this.getSeparatedKeywords("string"==typeof e?[e]:e),a=i.keywords,c=i.length;this.opt.acrossElements&&(o="wrapMatchesAcrossElements"),0===c?this.opt.done(r):function e(t){var i=new s(n.opt).create(t),u=0;n.log('Searching with expression "'.concat(i,'"')),n[o](i,1,function(e,o){return n.opt.filter(o,t,r,u)},function(e){u++,r++,n.opt.each(e)},function(){0===u&&n.opt.noMatch(t),a[c-1]===t?n.opt.done(r):e(a[a.indexOf(t)+1])})}(a[0])}},{key:"markRanges",value:function(e,t){var n=this;this.opt=t;var r=0,o=this.checkRanges(e);o&&o.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(o)),this.wrapRangeFromIndex(o,function(e,t,r,o){return n.opt.filter(e,t,r,o)},function(e,t){r++,n.opt.each(e,t)},function(){n.opt.done(r)})):this.opt.done(r)}},{key:"unmark",value:function(e){var t=this;this.opt=e;var n=this.opt.element?this.opt.element:"*";n+="[data-markjs]",this.opt.className&&(n+=".".concat(this.opt.className)),this.log('Removal selector "'.concat(n,'"')),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,function(e){t.unwrapMatches(e)},function(e){var r=a.matches(e,n),o=t.matchesExclude(e);return!r||o?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}},{key:"opt",set:function(e){this._opt=i({},{element:"",className:"",exclude:[],iframes:!1,iframesTimeout:5e3,separateWordSearch:!0,acrossElements:!1,ignoreGroups:0,each:function(){},noMatch:function(){},filter:function(){return!0},done:function(){},debug:!1,log:window.console},e)},get:function(){return this._opt}},{key:"iterator",get:function(){return new a(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}}]),e}();return e.fn.mark=function(e,t){return new c(this.get()).mark(e,t),this},e.fn.markRegExp=function(e,t){return new c(this.get()).markRegExp(e,t),this},e.fn.markRanges=function(e,t){return new c(this.get()).markRanges(e,t),this},e.fn.unmark=function(e){return new c(this.get()).unmark(e),this},e});
16978
16979
16980
16981
16982/*!
16983 * END $Id$ 
16984 */
16985
16986
16987
16988/*! $Id: imagegallery.js 2025-10-02 12:23:58 +0200 Stefan S  67bd7d5759455c5dd5dab64d3e16e5aaffe6f537 $ */
16989
16990/** 
16991* jQuery Plugin to add basic "swipe" support on touch-enabled devices
16992*
16993* @author Yair Even Or
16994* @version 1.0.0 (March 20, 2013)
16995*/
16996
16997(function($){
16998	"use strict";
16999
17000    $.event.special.swipe = {
17001        setup: function(){
17002            $(this).on('touchstart', $.event.special.swipe.handler);
17003        },
17004
17005        teardown: function(){
17006            $(this).off('touchstart', $.event.special.swipe.handler);
17007        },
17008
17009        handler: function(event){
17010            var args = [].slice.call( arguments, 1 ), // clone arguments array, remove original event from cloned array
17011                touches = event.originalEvent.touches,
17012                startX, startY,
17013                deltaX = 0, deltaY = 0,
17014                that = this;
17015
17016            event = $.event.fix(event);
17017
17018            if( touches.length == 1 ){
17019                startX = touches[0].pageX;
17020                startY = touches[0].pageY;
17021                this.addEventListener('touchmove', onTouchMove, false);
17022            }
17023
17024            function cancelTouch(){
17025                that.removeEventListener('touchmove', onTouchMove);
17026                startX = startY = null;
17027            }
17028
17029            function onTouchMove(e){
17030                //e.preventDefault();
17031
17032                var Dx = startX - e.touches[0].pageX,
17033                    Dy = startY - e.touches[0].pageY;
17034
17035                if( Math.abs(Dx) >= 50 ){
17036                    cancelTouch();
17037                    deltaX = (Dx > 0) ? -1 : 1;
17038                }
17039                else if( Math.abs(Dy) >= 20 ){
17040                    cancelTouch();
17041                    deltaY = (Dy > 0) ? 1 : -1;
17042                }
17043
17044                event.type = 'swipe';
17045                args.unshift(event, deltaX, deltaY); // add back the new event to the front of the arguments with the delatas
17046                return ($.event.dispatch || $.event.handle).apply(that, args);
17047            }
17048        }
17049    };
17050})($z);
17051
17052/*! 
17053 * ZP Image-Gallery Widget
17054 * Copyright $Date:   2025-10-02 12:23:58 +0200 $ Zeta Software GmbH
17055 */
17056 
17057 // This code depends on jquery.fancybox css and js being loded via the global "_Shared"-Widget.
17058
17059// define zp Namespace for later use in individual widgets if not only defined
17060if ( typeof(zp)==="undefined" ){
17061	var zp = {};
17062}
17063
17064$z(document).ready(function () {
17065	zp.ImageGallery = function (){
17066		this.root = null;
17067		this.numbershow = true;
17068		this.template = "";
17069		this.titleshow = false;
17070		this.htmltitle = "";
17071		this.articleid = "";
17072		this.kind = "gallery";
17073		this.width = 200;
17074		this.height = 150;
17075		this.bordercolor = "silver";
17076		this.borderwidth = 0;
17077		this.margin = 10;
17078		this.overlaycolor = "black";
17079		this.titleposition = "over"; /* inside, over - not supported by us: outside*/
17080		this.transition = "elastic"; /* elastic, fade, none */
17081		this.slideshow = false;
17082		this.slideshowinterval = 5000;
17083		this.slideshowtimer = 0;
17084		this.lang = "de";
17085		//this.easing = "swing";
17086		//this.changefade = "fast";
17087		var igal = this;
17088	
17089		this.init = function (elemid){
17090			function showHideNavButtons(){
17091				// hide pev/next links when at beginning or end of pages
17092				if ( currentPage == 1 ){
17093					$z(igal.root + " .zppaging a.zppprev").addClass("off");
17094				}
17095				else if ( currentPage == numPages ) {
17096					$z(igal.root + " .zppaging a.zppnext").addClass("off");
17097				}
17098			}
17099
17100			if(!($z.fancybox)){
17101				trace("Fehler: Fancybox ist nicht geladen");
17102			}
17103		
17104			igal.root = elemid;
17105			igal.ispaging = $z(igal.root).attr("data-ispaging")=="true"?true:false;
17106			igal.imageeffect = $z(igal.root).attr("data-imageeffect") || ""
17107			igal.prevtext = $z(igal.root).data("prevtext");
17108			igal.nextext = $z(igal.root).data("nexttext");
17109			igal.pagetext = $z(igal.root).data("pagetext");
17110			igal.numbershow = $z(igal.root).data("numbershow")!==0?true:false;
17111			igal.template = $z(igal.root).data("template");
17112			igal.titleshow = $z(igal.root).data("titleshow")!==0?true:false;
17113			igal.htmltitle = $z(igal.root).data("htmltitle");
17114			igal.kind = $z(igal.root).data("kind");
17115			igal.articleid = $z(igal.root).data("article-id");
17116			igal.bordercompensatedwWidth = $z(igal.root).data("bordercompensatedwWidth");
17117			igal.width = $z(igal.root).data("width");
17118			if ( parseInt(igal.width) ){
17119				igal.width = igal.width + "px";
17120			}
17121			igal.height = $z(igal.root).data("height");
17122			if ( parseInt(igal.height) ){
17123				igal.height = igal.height + "px";
17124			}
17125			
17126			if ( igal.ispaging ){
17127				var currentPage = 1;
17128				igal.imagesperpage = parseInt($z(igal.root).data("imagesperpage"));
17129				var data = JSON.parse($z("#article-full-json-"+igal.articleid).html());	
17130				var numImages = data.images.length;
17131				var numPages = igal.imagesperpage > 0 ? Math.ceil(numImages / igal.imagesperpage) : 1;
17132			
17133				// check if url contains bookmarked parameters pointing to a specific page
17134				if ( numPages > 1 && document.location.hash === "#a"+igal.articleid && parseInt(zpGetParameterByName("page")) > 0 ){
17135					currentPage = parseInt(zpGetParameterByName("page"));
17136					if ( currentPage > numPages ){
17137						currentPage = numPages;
17138					}
17139					else if ( currentPage < 1 ){
17140						currentPage = 1;
17141					}
17142				}
17143			
17144				// render the gallery with paging
17145				$("noscript#"+igal.articleid).replaceWith(renderGallery(data, currentPage, igal.imagesperpage, igal.articleid, igal.imageeffect));
17146						
17147				if ( numPages > 1 ){
17148					var currentPageText = igal.pagetext.replace("{0}", '<span class="pageno">' + currentPage + '</span>').replace("{1}", numPages);
17149				
17150					$(igal.root).append('<div class="zppaging"><span class="zppprev"><a class="zppprev" href="#a'+igal.articleid+'">' + igal.prevtext + '</a></span>' + currentPageText +' <span class="zppnext"><a class="zppnext" href="#a'+igal.articleid+'">' + igal.nextext + '</a></span> </div>');
17151				
17152					showHideNavButtons();
17153				
17154					$z(igal.root + " .zppaging a").off("click");
17155					$z(igal.root + " .zppaging a").on("click", function(e){
17156						//e.preventDefault();
17157			
17158						$z(igal.root + " .zppaging a").removeClass("off");
17159				
17160						if ( $z(this).hasClass("zppprev") ){
17161							if ( currentPage > 1 ){
17162								currentPage = currentPage - 1;
17163							}
17164						}
17165						else if ( $z(this).hasClass("zppnext") ){
17166							if ( currentPage < numPages ){
17167								currentPage = currentPage + 1;
17168							}
17169						}
17170						// update pagenumber in paging text
17171						$z(igal.root + " .zppaging span.pageno").html(currentPage);
17172						// URL in Browser-Adressleiste aktualisieren, ohne dass der Browser die Seite lädt und zur Sprungmarke scrollt
17173						if (history.pushState){
17174							window.history.pushState("object or string", "Title", window.location.pathname + "?page=" + currentPage + "#a" + igal.articleid);
17175						}
17176			
17177						showHideNavButtons();
17178			
17179						$(igal.root + ' .gallery-item').remove();
17180						$(igal.root).prepend(renderGallery(data, currentPage, igal.imagesperpage, igal.articleid, igal.imageeffect));
17181						// initialize fancybox with the new images
17182						fancy();
17183						// also init focal images again
17184						focalImages();
17185					});
17186				}
17187			}
17188		
17189		
17190			// make it more responsive, as it used to be always fill layout width and cut off by news columns
17191			if ( igal.height == "auto" && $z(igal.root).hasClass("zpSlideshow") ){
17192				igal.width = "auto";
17193				var factor = $z(igal.root).data("maxheight") / $z(igal.root).data("width");
17194				var newwidth = $z(igal.root).parent().parent().width();
17195				var newhight = Math.round(newwidth * factor);
17196				$z(igal.root).parent().width(newwidth + 2).height(newhight + 6);
17197				$z(igal.root).width(newwidth + 2).height(newhight + 6);
17198				$z(igal.root + " .slide").width(newwidth).height(newhight + 4).css({"paddingRight":"2px", "paddingBottom":"2px"});
17199				$z(igal.root + " .slide .caption").width(newwidth - 2);
17200			}
17201			igal.bordercolor = $z(igal.root).data("bordercolor");
17202			igal.borderwidth = $z(igal.root).data("borderwidth");
17203			igal.margin = $z(igal.root).data("margin");
17204			igal.marginhor = parseInt(igal.margin)-4; // -4px compensates for space between inline-block elements https://css-tricks.com/fighting-the-space-between-inline-block-elements/
17205			igal.titleposition = $z(igal.root).data("titleposition");
17206			igal.zoom = $z(igal.root).data("transition");
17207			igal.transition = $z(igal.root).data("inner-transition");
17208		
17209			if (igal.transition === "none") {
17210				igal.changeFade = 0;
17211			} else {
17212				igal.changeFade = 100;
17213			}
17214
17215			igal.slideshow = $z(igal.root).data("slideshow")!==0?true:false;
17216			igal.slideshowinterval = $z(igal.root).data("slideshowinterval") * 1000;
17217			igal.slideshowtimer = 0;
17218			igal.lang = $z(igal.root).data("lang");
17219		
17220			// also init focal images again
17221			//setTimeout(function(){focalImages()}, 110);
17222			
17223			// init fancybox lightboxes 
17224			fancy();
17225			
17226			// also init focal images again
17227			focalImages();
17228		
17229			function fancy(){
17230				// do not use the "elastic" transition if user prefers reduced motion 
17231				if ( igal.zoom == "elastic" && window.matchMedia && window.matchMedia( "(prefers-reduced-motion: reduce)" ).matches ){
17232					igal.zoom = 'none';
17233				}	
17234				$z(igal.root + " .fancybox:not(.svg)").fancybox({
17235					'type':'image',
17236					'hideOnContentClick': true,
17237					'padding': 0,	//Space between FancyBox wrapper and content
17238					'margin': 30,	//Space between viewport and FancyBox wrapper
17239					'cyclic' 		: !igal.ispaging, 
17240					'centerOnScroll': true,
17241					'changeSpeed'	: 0, 
17242					'changeFade'	: igal.changeFade,
17243					'speedIn'		: 300,
17244					'speedOut'		: 300,
17245					'transitionIn'	: igal.zoom,
17246					'transitionOut'	: igal.zoom, 
17247					'easingIn'		: 'easeOutCubic', 
17248					'easingOut'		: 'easeInCubic', 
17249					'titleShow'		: igal.titleshow,
17250					'overlayColor'	: igal.overlaycolor,
17251					'overlayOpacity': 0.85,
17252					'titlePosition'	: igal.titleposition,
17253					'titleFormat'	: function(title, currentArray, currentIndex) {
17254						if ( typeof igal.htmltitle != 'undefined' && igal.htmltitle !== null && igal.htmltitle !== "" ){
17255							// single image
17256							title = igal.htmltitle;
17257						}
17258						else{
17259							// slideshow or gallery where data-attr ist set with the anchor
17260							var htmlTitle = $z(igal.root + " .fancybox").eq(currentIndex).data("htmltitle");
17261							if ( htmlTitle && htmlTitle != "" ){
17262								title = safe_decodeURI(htmlTitle);
17263							}
17264						}
17265						// add a classname to links in the lightbox
17266						title = title.replace(/<a href/g,'<a class="zpigaltitlelb" href');
17267						if ( currentArray.length > 1 && igal.numbershow ){
17268							if ( igal.lang === "en" ){
17269								return '<span id="fancybox-title-over">Image ' +  (currentIndex + 1) + ' of ' + currentArray.length + (title ? ": " + title : "") + '</span>';
17270							}
17271							else{
17272								return '<span id="fancybox-title-over">Bild ' +  (currentIndex + 1) + ' von ' + currentArray.length + (title ? ": " + title : "") + '</span>';
17273							}
17274					
17275						}
17276						else{
17277							return '<span id="fancybox-title-over">' + title + '</span>';
17278						}
17279					},
17280					'onComplete'		: function(){
17281						//if user set slideshow = 1 then play slideshow
17282						if ( igal.slideshow ){
17283							igal.slideshowtimer = setInterval($z.fancybox.next, igal.slideshowinterval);
17284						}
17285						// add swipe to fancybox
17286						$z("#fancybox-wrap").off("swipe");
17287						$z("#fancybox-wrap").on("swipe", function onSwipe(e, Dx, Dy){
17288							if ( Dx < 0 ){ // swipeLeft
17289								$z.fancybox.next();
17290							}
17291							else if ( Dx > 0 ){ // swipeRight
17292								$z.fancybox.prev();
17293							}
17294						});	
17295					},
17296					'onCleanup'		: function(){
17297						//if user set slideshow = 1 then stop slideshow on close of fancybox
17298						if ( igal.slideshow ){
17299							clearInterval(igal.slideshowtimer);
17300						}
17301					}
17302				});
17303				$z(igal.root + " .fancybox.svg").fancybox({
17304					'type':'iframe',
17305					'width':'100%',
17306					'height':'100%',
17307					'hideOnContentClick': true,
17308					'padding': 0,	//Space between FancyBox wrapper and content
17309					'margin': 30,	//Space between viewport and FancyBox wrapper
17310					'cyclic' 		: !igal.ispaging, 
17311					'centerOnScroll': true,
17312					'changeSpeed'	: 0, 
17313					'changeFade'	: igal.changeFade,
17314					'speedIn'		: 300,
17315					'speedOut'		: 300,
17316					'transitionIn'	: igal.zoom,
17317					'transitionOut'	: igal.zoom, 
17318					'easingIn'		: 'easeOutCubic', 
17319					'easingOut'		: 'easeInCubic', 
17320					'titleShow'		: igal.titleshow,
17321					'overlayColor'	: igal.overlaycolor,
17322					'overlayOpacity': 0.85,
17323					'titlePosition'	: igal.titleposition,
17324					'titleFormat'	: function(title, currentArray, currentIndex) {
17325						if ( typeof igal.htmltitle != 'undefined' && igal.htmltitle !== null && igal.htmltitle !== "" ){
17326							// single image
17327							title = igal.htmltitle;
17328						}
17329						else{
17330							// slideshow or gallery where data-attr ist set with the anchor
17331							var htmlTitle = $z(igal.root + " .fancybox").eq(currentIndex).data("htmltitle");
17332							if ( htmlTitle && htmlTitle != "" ){
17333								title = safe_decodeURI(htmlTitle);
17334							}
17335						}
17336						// add a classname to links in the lightbox
17337						title = title.replace(/<a href/g,'<a class="zpigaltitlelb" href');
17338						if ( currentArray.length > 1 && igal.numbershow ){
17339							if ( igal.lang === "en" ){
17340								return '<span id="fancybox-title-over">Image ' +  (currentIndex + 1) + ' of ' + currentArray.length + (title ? ": " + title : "") + '</span>';
17341							}
17342							else{
17343								return '<span id="fancybox-title-over">Bild ' +  (currentIndex + 1) + ' von ' + currentArray.length + (title ? ": " + title : "") + '</span>';
17344							}
17345					
17346						}
17347						else{
17348							return '<span id="fancybox-title-over">' + title + '</span>';
17349						}
17350					},
17351					'onComplete'		: function(){
17352						//if user set slideshow = 1 then play slideshow
17353						if ( igal.slideshow ){
17354							igal.slideshowtimer = setInterval($z.fancybox.next, igal.slideshowinterval);
17355						}
17356						// add swipe to fancybox
17357						$z("#fancybox-wrap").off("swipe");
17358						$z("#fancybox-wrap").on("swipe", function onSwipe(e, Dx, Dy){
17359							if ( Dx < 0 ){ // swipeLeft
17360								$z.fancybox.next();
17361							}
17362							else if ( Dx > 0 ){ // swipeRight
17363								$z.fancybox.prev();
17364							}
17365						});	
17366					},
17367					'onCleanup'		: function(){
17368						//if user set slideshow = 1 then stop slideshow on close of fancybox
17369						if ( igal.slideshow ){
17370							clearInterval(igal.slideshowtimer);
17371						}
17372					}
17373				});
17374			}
17375		
17376			// style the fancybox anchors
17377			var head = document.getElementsByTagName('head')[0],
17378			style = document.createElement('style');
17379		
17380			if ( igal.kind === "singleimage" ){
17381				var mystyles = "	.zpColumnItem:not(:last-child) " + igal.root + "{overflow: hidden;";
17382				mystyles += " width: " + igal.width + "; float: none !important; margin-bottom: 5px;";
17383				mystyles += "}\n";
17384			}
17385			else{
17386				var mystyles = "	" + igal.root + "{overflow: hidden;";
17387				if (igal.kind === "singleimageleft"){
17388					mystyles += " width: " + igal.width + "; min-height: " + igal.height + "; float: left; margin-right: 20px; margin-bottom: 5px;";
17389				}
17390				else if (igal.kind === "singleimageright"){
17391					mystyles += " width: " + igal.width + "; min-height: " + igal.height + "; float: right; margin-left: 20px; margin-bottom: 5px;";
17392				}
17393				else if (igal.kind === "singleimagecenter"){
17394					mystyles += " width: " + igal.width + "; float: none !important; margin: 0 auto 5px auto;";
17395				}
17396				else if (igal.kind === "singleimager"){
17397					mystyles += " width: " + igal.width + "; float: none !important; margin: 0 0 5px auto;";
17398				}
17399				mystyles += "}\n";
17400			}
17401			mystyles += igal.root + "[data-kind=singleimage] > a { \
17402				margin: 0 !important; \
17403			}\n";	
17404
17405			mystyles += igal.root + "[data-kind='singleimage'] > a, " + igal.root + "[data-kind='singleimage'] .slide > a { \
17406					width: " + igal.width + "; \
17407					height: " + igal.height + "; \
17408					box-sizing: border-box; \
17409					margin: 0 " + igal.marginhor + "px " + igal.margin + "px 0;";
17410				
17411		
17412			if ( igal.bordercolor == "default" ){
17413				mystyles += "";
17414			}
17415			else if ( igal.bordercolor !== "transparent" ){
17416				mystyles += "	border: " + igal.borderwidth + "px solid " + igal.bordercolor + "; box-sizing: border-box;";
17417			}
17418			else{
17419				mystyles += "	border: none " + ";";
17420			}
17421		
17422			mystyles += "		padding: 0px; \
17423					display: inline-block; \
17424					text-align: center; \
17425					vertical-align: middle; \
17426					overflow: hidden; \
17427				}";
17428	
17429				//we need to switch borders off, since they would possibly be cut off anyway when portrait and landscape imgs are mi
17429xed and imgs will be cropped
17430				mystyles += igal.root +" > a img { \
17431					border: none !important;}";
17432							
17433			var rules = document.createTextNode(mystyles.replace(/\s+/g,' '));
17434			style.type = 'text/css';
17435			if(style.styleSheet){
17436					style.styleSheet.cssText = rules.nodeValue;
17437			}
17438			else{
17439				style.appendChild(rules);
17440			}
17441			head.appendChild(style);
17442		};
17443		
17444		function safe_decodeURI(uri){
17445			return decodeURI(uri.replace(/%(?![0-9a-fA-F][0-9a-fA-F]+)/g, '%25'));
17446		};
17447	
17448		function renderGallery(data, page, imagesPerPage, articleid, effectclass){
17449			var result = "";
17450		
17451			for (i = (page*imagesPerPage)-imagesPerPage; i < data.images.length; i++ ){
17452				if ( imagesPerPage > 0 && i >= (page * imagesPerPage) ){
17453					break;
17454				}
17455				var image = data.images[i];
17456			
17457				result += '<div class="gallery-item ' + image.thumbTitlePosition + '">';
17458				result += '	<a class="fancybox zpnolayoutlinkstyles" href="' + image.imagePath + '" title="' + image.description + '" data-htmltitle="' + encodeURI(image.encodedDescription) + '" data-fancybox-group="g' + igal.articleid + '" aria-label="Bild in Lightbox öffnen (open image in lightbox)">';
17459				if (igal.template == "flex"){
17460					result += '	<img class="zpflexgalfocal' + effectclass + '" src="' + image.thumbPath + '" title="' + image.description + '" data-focus-x="' + image.focusx + '" data-focus-y="' + image.focusy + '" data-image-w="' + image.imagew+ '" data-image-h="' + image.imageh + '" alt="' + image.altText + '" />';
17461				}
17462				else{
17463					result += '	<img class="zpflexgalfocal' + effectclass + '" src="' + image.thumbPath + '" width="' + image.width + '" title="' + image.description + '" data-focus-x="' + image.focusx + '" data-focus-y="' + image.focusy + '" data-image-w="' + image.imagew+ '" data-image-h="' + image.imageh + '" alt="' + image.altText + '" />';
17464				}
17465				result += '	</a>';
17466				if ( safe_decodeURI(image.encodedDescription) ){
17467					result += '	<div class="zpiacaption ' + image.thumbTitlePosition + '"><span>' + safe_decodeURI(image.encodedDescription) + ' &nbsp;</span></div>';
17468				}
17469				result += '</div>';
17470			}
17471			if ( imagesPerPage > 0 && i == data.images.length ){
17472				result += '<div class="gallery-item last"></div>';
17473			}
17474
17475			return result;
17476		}
17477	};
17478	
17479	zp.Slideshow = function (){
17480		this.root = null;
17481		this.slideshowinterval = 5000;
17482		this.pauseonhover = true;
17483		var sshow = this;
17484	
17485		this.init = function (elemid){
17486			sshow.root = elemid;
17487			sshow.slideshowinterval = $z(sshow.root).data("slideshowinterval") * 1000;
17488			sshow.pauseonhover = $z(sshow.root).data("pauseonhover")!==0?true:false;
17489			// hide all slides except first
17490			$z(elemid + ' div.slide:not(:first)').css("opacity", "0");
17491			// start the slideshow
17492			sshow.slideshow = setInterval( function() { sshow.slideSwitch(elemid); }, sshow.slideshowinterval );
17493			// handle swipes
17494			$z(sshow.root).on("swipe", function onSwipe(e, Dx, Dy){
17495				if ( Dx !== 0 ){  //horizontalSwipe
17496					// reset the slider auto play timer
17497					clearInterval(sshow.slideshow);
17498					sshow.slideshow = setInterval( function() { sshow.slideSwitch(elemid); }, sshow.slideshowinterval );
17499				}
17500				if ( Dx < 0 ){ // swipeLeft
17501					sshow.slideSwitch(elemid, "next");
17502				}
17503				else if ( Dx > 0 ){ // swipeRight
17504					sshow.slideSwitch(elemid, "prev");
17505				}
17506			});
17507			// handle arrow keys
17508			$z(sshow.root).on("hover", function() {
17509				if (sshow.pauseonhover){
17510					clearInterval(sshow.slideshow);
17511				}
17512				$z(document).keydown(function(event) {
17513					// 37 = left arrow - 39 = right arrow
17514					if ( event.which === 37 ){
17515						sshow.slideSwitch(elemid, "prev");
17516					}
17517					else if ( event.which === 39 ){
17518						sshow.slideSwitch(elemid, "next");
17519					}
17520				});
17521			}, function() {
17522				// unbind the keydown handler on mouseleave
17523				 $z(document).off("keydown");
17524				// restart the slideshow
17525				if (sshow.pauseonhover){
17526					sshow.slideshow = setInterval( function() { sshow.slideSwitch(elemid); }, sshow.slideshowinterval );
17527				}
17528			});
17529		};
17530	
17531		this.slideSwitch = function (elemid, direction) {
17532			direction = typeof direction !== 'undefined' ? direction : 'next';
17533	
17534			var $active = $z(elemid + ' div.slide.active');
17535			if ( $active.length === 0 ){ $active = $z(elemid + ' div.slide:first');}
17536			var $next;
17537			if ( direction === "next" ){
17538				$next = $active.next(".slide").length ? $active.next(".slide") : $z(elemid + ' div.slide:first');
17539			}
17540			else if ( direction === "prev" ){
17541				$next = $active.prev(".slide").length ? $active.prev(".slide") : $z(elemid + ' div.slide:last');
17542			}
17543
17544			$active.addClass('last-active')
17545				.css({"z-index": 101});
17546
17547			$next.css({"opacity": "0.0"})
17548					.addClass('active')
17549					.css({"z-index": 102}) 
17550					.animate({"opacity": "1.0"}, 500, function() {
17551							$active.removeClass('active last-active')
17552							.css({"z-index": "100", "opacity": "0"});
17553			});
17554		};
17555	};
17556
17557	// initialize each zpImageGallery
17558	$z(".zpImageGallery[id]").each(function (){
17559		new zp.ImageGallery().init("#" + this.id.toString());
17560	});
17561	
17562	//play each zpSlideshow (part of zpImageGallery)
17563	$z(".zpSlideshow[id]").each(function (){
17564		new zp.Slideshow().init("#" + this.id.toString());
17565	});
17566	
17567	// handle special design-blocks (grosses bild links/rechts
17568	$z(document).ready(function() {
17569		$z('.zpwBild.zpWideImageLeft').parents('.zpContainer').addClass('zpWideImageLeft');
17570		$z('.zpwBild.zpWideImageRight').parents('.zpContainer').addClass('zpWideImageRight');
17571		$z('.zpwBild.zpWideImageLeft, .zpwBild.zpWideImageRight').parents('.zpRow').addClass('zpWideImage');
17572		$z('.zpwBild.zpWideImageLeft, .zpwBild.zpWideImageRight').parents('.zpColumn').addClass('zpWideImage');
17573	});
17574});
17575
17576$z(window).on('load', function() {		
17577	var fadeduration = 300;
17578	var zoomEvent = "click";
17579	var zoomThreshold = 1.2;
17580	
17581	var zoomInCallback = function(){
17582		$z(this).addClass("zoomed");
17583		var currentContainer = $z(this).parents("div.zoomable");
17584		var currentImage = currentContainer.find("img:first");
17585		var borderRadius = currentImage.css("border-radius");
17586		var border = currentImage.css("border");
17587		var boxShadow = currentImage.css("box-shadow");
17588		
17589		// add image styles to container, so that image styles are inherited from the image
17590		currentContainer.css("border-radius", borderRadius);
17591		currentContainer.css("border", border);
17592		currentContainer.css("box-shadow", boxShadow);
17593	};
17594	var zoomOutCallback = function(){
17595		$z(this).removeClass("zoomed");
17596		var currentContainer = $z(this).parents("div.zoomable");
17597		// remove image styles from container after a delay (fadeduration), so animations can finish
17598		setTimeout(function() { 
17599			currentContainer.css("border-radius", "");
17600			currentContainer.css("border", "");
17601			currentContainer.css("box-shadow", "");	
17602		},fadeduration);
17603	};
17604	
17605	// zoomed product images	
17606	$z('.zpwBild .productimage.zoomable').each(function(e){
17607		var that = $(this);
17608		var currentImage = that.find("img:first");
17609		var displayedWidth = parseInt(currentImage.css("width"));
17610		var zoomUrl = that.attr("data-zoom");
17611		
17612		
17613		if ( zoomUrl ){
17614			// only zoom if image in data-zoom is wider than currently displayed image
17615			var zoomImg = new Image();
17616			zoomImg.src = zoomUrl;
17617			zoomImg.onload = function() {
17618				if ( displayedWidth * zoomThreshold < zoomImg.naturalWidth ){
17619					that.zoom({onZoomIn: zoomInCallback, onZoomOut: zoomOutCallback, duration: fadeduration, on: zoomEvent, url: zoomUrl});
17620				}
17621			};
17622		} else {
17623			// only zoom if image is actually wider than already displayed
17624			currentImage.eq(0).onload = function(){
17625				if ( displayedWidth * zoomThreshold < that.find("img:first").get(0).naturalWidth ){
17626					that.zoom({onZoomIn: zoomInCallback, onZoomOut: zoomOutCallback, duration: fadeduration, on: zoomEvent});
17627				}
17628			};
17629		}
17630	});
17631	// trigger mouseover on image which is overlayed by zoom-image
17632	$z('.zpwBild .productimage.zoomable').each(function(e){
17633		$z(this).off('mouseenter.zoomable');
17634		$z(this).on('mouseenter.zoomable', function(e){
17635			$(this).find("img:first").addClass('hover');
17636		});
17637		$z(this).off('mouseleave.zoomable');
17638		$z(this).on('mouseleave.zoomable', function(e){
17639			$(this).find("img:first").removeClass('hover');
17640		});
17641	});	
17642});
17643
17644/*! $Id$ */
17645
17646$z(document).ready(function () {
17647	function setImageBreakout(){
17648		var bodyWidth = $z("body").outerWidth();
17649		// image widget
17650		$z(".supportsbreakout body:not(.withnews) .zpColumn .zpwBild.zpBreakout.left:not(.hasNews), body.supportsbreakout:not(.withnews) .zpColumn .zpwBild.zpBreakout.left:not(.hasNews)").each( function(index, value){
17651			// adjust css of image wrapper
17652			// // $z(this).css("width",bodyWidth+"px").css("padding-left", "0").css("margin-left","calc(-" + bodyWidth/2 + "px + 50% )")
17653			//var offset = $z(this).offset().left;
17654			var offset = $z(this).css("margin-left","0").css("margin-right", "0").css("width", "").offset().left;
17655			//console.warn("Breakout IMG offset: " + offset);
17656			$z(this).css({
17657				"padding": "0",
17658				"margin-left": "-" + offset + "px",
17659				"margin-right": "-15px",
17660				"margin-bottom": "0",
17661				"border-radius": "" 
17662			});
17663			
17664			// set image width to browser-window-width, so it also enlarges if necessary
17665			// // $z(this).find('img.singleImage').css('width', bodyWidth + 'px').css('max-width','none');
17666			
17667			// set width of image description to column-width and horizontally center it
17668			var columnWidth = parseInt($z(this).parent('.zpColumnItem').width()) + "px";
17669			$z(this).find('.imagedescription').css("max-width", columnWidth).css("margin-left", "auto").css("margin-right", "auto");
17670		});
17671		
17672		$z(".supportsbreakout body:not(.withnews) .zpColumn .zpwBild.zpBreakout.right:not(.hasNews), body.supportsbreakout:not(.withnews) .zpColumn .zpwBild.zpBreakout.right:not(.hasNews)").each( function(index, value){
17673			// adjust css of image wrapper
17674			// // $z(this).css("width",bodyWidth+"px").css("padding-left", "0").css("margin-left","calc(-" + bodyWidth/2 + "px + 50% )")
17675			var offset = bodyWidth - ( $z(this).css("margin-left","0").css("margin-right", "0").css("width", "").offset().left + $z(this).width() );
17676			$z(this).css({
17677				"padding": "0",
17678				"margin-right": "-" + offset + "px",
17679				"margin-left": "-15px",
17680				"margin-bottom": "0",
17681				"border-radius": "" 
17682			});
17683			
17684			// set image width to browser-window-width, so it also enlarges if necessary
17685			// // $z(this).find('img.singleImage').css('width', bodyWidth + 'px').css('max-width','none');
17686			
17687			// set width of image description to column-width and horizontally center it
17688			var columnWidth = parseInt($z(this).parent('.zpColumnItem').width()) + "px";
17689			$z(this).find('.imagedescription').css("max-width", columnWidth).css("margin-left", "auto").css("margin-right", "auto");
17690		});
17691		
17692		// make sure parent column has no top/bottom padding
17693		$z("body:not(.withnews):not(#addspecificity) .zpColumn:has(.zpwBild.zpBreakout)").css({
17694			"margin-top": "0px",
17695			"margin-bottom": "0px"
17696		});
17697	}
17698	
17699	// if we have breakout images, take care of them at load and resize
17700	if ( $z('.zpwBild.zpBreakout').length > 0 ){
17701		var resizeTimeout = null;
17702		$z(window).on("resize", zpthrottle(200, function(event) {
17703			var event = event || window.event;
17704			if ( event && $z(event.target.nodeType).length == 0 ){// enable window.resize only for the window object (resizing elements might also trigger window.resize) which doesn't have a nodeType
17705				setImageBreakout();
17706			}
17707		}));
17708		setImageBreakout();
17709	}
17710});
17711/*!
17712	Zoom 1.7.18
17713	license: MIT
17714	http://www.jacklmoore.com/zoom
17715*/
17716// used in singleImage and shop "articleDetails"!
17717(function ($) {
17718	var defaults = {
17719		url: false,
17720		callback: false,
17721		target: false,
17722		duration: 120,
17723		on: 'mouseover', // other options: grab, click, toggle
17724		touch: true, // enables a touch fallback
17725		onZoomIn: false,
17726		onZoomOut: false,
17727		magnify: 1
17728	};
17729
17730	// Core Zoom Logic, independent of event listeners.
17731	$.zoom = function(target, source, img, magnify) {
17732		var targetHeight,
17733			targetWidth,
17734			sourceHeight,
17735			sourceWidth,
17736			xRatio,
17737			yRatio,
17738			offset,
17739			$target = $(target),
17740			position = $target.css('position'),
17741			$source = $(source);
17742			
17743			// Added by StS: cancel zoom if zoom image is not as wide as original image's container
17744			if ( $source.outerWidth() > img.width){
17745				//return;
17746			}
17747
17748		// The parent element needs positioning so that the zoomed element can be correctly positioned within.
17749		target.style.position = /(absolute|fixed)/.test(position) ? position : 'relative';
17750		target.style.overflow = 'hidden';
17751		img.style.width = img.style.height = '';
17752
17753		$(img)
17754			.addClass('zoomImg')
17755			.css({
17756				position: 'absolute',
17757				top: 0,
17758				left: 0,
17759				opacity: 0,
17760				width: img.width * magnify,
vendor: 5,088 bytes, lines 17761-17941
17761				height: img.height * magnify,
17762				border: 'none',
17763				maxWidth: 'none',
17764				maxHeight: 'none'
17765			})
17766			.appendTo(target);
17767
17768		return {
17769			init: function() {
17770				targetWidth = $target.outerWidth();
17771				targetHeight = $target.outerHeight();
17772
17773				if (source === target) {
17774					sourceWidth = targetWidth;
17775					sourceHeight = targetHeight;
17776				} else {
17777					sourceWidth = $source.outerWidth();
17778					sourceHeight = $source.outerHeight();
17779				}
17780
17781				xRatio = (img.width - targetWidth) / sourceWidth;
17782				yRatio = (img.height - targetHeight) / sourceHeight;
17783
17784				offset = $source.offset();
17785			},
17786			move: function (e) {
17787				var left = (e.pageX - offset.left),
17788					top = (e.pageY - offset.top);
17789
17790				top = Math.max(Math.min(top, sourceHeight), 0);
17791				left = Math.max(Math.min(left, sourceWidth), 0);
17792
17793				img.style.left = (left * -xRatio) + 'px';
17794				img.style.top = (top * -yRatio) + 'px';
17795			}
17796		};
17797	};
17798
17799	$.fn.zoom = function (options) {
17800		return this.each(function () {
17801			var
17802			settings = $.extend({}, defaults, options || {}),
17803			//target will display the zoomed image
17804			target = settings.target && $(settings.target)[0] || this,
17805			//source will provide zoom location info (thumbnail)
17806			source = this,
17807			$source = $(source),
17808			img = document.createElement('img'),
17809			$img = $(img),
17810			mousemove = 'mousemove.zoom',
17811			clicked = false,
17812			touched = false;
17813
17814			// If a url wasn't specified, look for an image element.
17815			if (!settings.url) {
17816				var srcElement = source.querySelector('img');
17817				if (srcElement) {
17818					settings.url = srcElement.getAttribute('data-src') || srcElement.currentSrc || srcElement.src;
17819				}
17820				if (!settings.url) {
17821					return;
17822				}
17823			}
17824
17825			$source.one('zoom.destroy', function(position, overflow){
17826				$source.off(".zoom");
17827				target.style.position = position;
17828				target.style.overflow = overflow;
17829				img.onload = null;
17830				$img.remove();
17831			}.bind(this, target.style.position, target.style.overflow));
17832
17833			img.onload = function () {
17834				var zoom = $.zoom(target, source, img, settings.magnify);
17835
17836				function start(e) {
17837					zoom.init();
17838					zoom.move(e);
17839
17840					// Skip the fade-in for IE8 and lower since it chokes on fading-in
17841					// and changing position based on mousemovement at the same time.
17842					$img.stop()
17843					.fadeTo($.support.opacity ? settings.duration : 0, 1, typeof settings.onZoomIn === "function" ? settings.onZoomIn.call(img) : false);
17844				}
17845
17846				function stop() {
17847					$img.stop()
17848					.fadeTo(settings.duration, 0, typeof settings.onZoomOut === "function" ? settings.onZoomOut.call(img) : false);
17849				}
17850
17851				// Mouse events
17852				if (settings.on === 'grab') {
17853					$source
17854						.on('mousedown.zoom',
17855							function (e) {
17856								if (e.which === 1) {
17857									$(document).one('mouseup.zoom',
17858										function () {
17859											stop();
17860
17861											$(document).off(mousemove, zoom.move);
17862										}
17863									);
17864
17865									start(e);
17866
17867									$(document).on(mousemove, zoom.move);
17868
17869									e.preventDefault();
17870								}
17871							}
17872						);
17873				} else if (settings.on === 'click') {
17874					$source.on('click.zoom',
17875						function (e) {
17876							if (clicked) {
17877								// bubble the event up to the document to trigger the unbind.
17878								return;
17879							} else {
17880								clicked = true;
17881								start(e);
17882								$(document).on(mousemove, zoom.move);
17883								$(document).one('click.zoom',
17884									function () {
17885										stop();
17886										clicked = false;
17887										$(document).off(mousemove, zoom.move);
17888									}
17889								);
17890								return false;
17891							}
17892						}
17893					);
17894				} else if (settings.on === 'toggle') {
17895					$source.on('click.zoom',
17896						function (e) {
17897							if (clicked) {
17898								stop();
17899							} else {
17900								start(e);
17901							}
17902							clicked = !clicked;
17903						}
17904					);
17905				} else if (settings.on === 'mouseover') {
17906					zoom.init(); // Preemptively call init because IE7 will fire the mousemove handler before the hover handler.
17907
17908					$source
17909						.on('mouseenter.zoom', start)
17910						.on('mouseleave.zoom', stop)
17911						.on(mousemove, zoom.move);
17912				}
17913
17914				// Touch fallback
17915				if (settings.touch) {
17916					if (settings.on !== 'click'){ //added by sseiz to improve page scrolling possibilities
17917						$source.on('touchstart.zoom', function (e) {
17918							e.preventDefault();
17919							if (touched) {
17920								touched = false;
17921								stop();
17922							} else {
17923								touched = true;
17924								start( e.originalEvent.touches[0] || e.originalEvent.changedTouches[0] );
17925							}
17926						})
17927					}
17928					$source.on('touchmove.zoom', function (e) {
17929						if (clicked) {
17930							e.preventDefault();
17931						}
17932						zoom.move( e.originalEvent.touches[0] || e.originalEvent.changedTouches[0] );
17933					})
17934					if (settings.on !== 'click'){	//added by sseiz to improve page scrolling possibilities
17935						$source.on('touchend.zoom', function (e) {
17936							e.preventDefault();
17937							if (touched) {
17938								touched = false;
17939								stop();
17940							}
17941						});
vendor: 54,492 bytes, lines 17942-19143
17942					}
17943				}
17944				
17945				if (typeof settings.callback === "function") {
17946					settings.callback.call(img);
17947				}
17948			};
17949
17950			img.src = settings.url;
17951		});
17952	};
17953
17954	$.fn.zoom.defaults = defaults;
17955}($z));
17956
17957/*! 
17958 * jQuery FlexSlider v2.7.2
17959 * Copyright 2012 WooThemes
17960 * Contributing Author: Tyler Smith
17961 * Edit only original file in: widgets/singleheader/ and then run dist.sh */
17962;
17963(function ($) {
17964
17965  var focused = true;
17966
17967  //FlexSlider: Object Instance
17968  $.flexslider = function(el, options) {
17969    var slider = $(el);
17970
17971    // making variables public
17972
17973    //if rtl value was not passed and html is in rtl..enable it by default.
17974    if(typeof options.rtl=='undefined' && $('html').attr('dir')=='rtl'){
17975      options.rtl=true;
17976    }
17977    slider.vars = $.extend({}, $.flexslider.defaults, options);
17978
17979    var namespace = slider.vars.namespace,
17980        msGesture = window.navigator && window.navigator.msPointerEnabled && window.MSGesture,
17981        touch = (( "ontouchstart" in window ) || msGesture || window.DocumentTouch && document instanceof DocumentTouch) && slider.vars.touch,
17982        // deprecating this idea, as devices are being released with both of these events
17983        eventType = "click touchend MSPointerUp keyup",
17984        watchedEvent = "",
17985        watchedEventClearTimer,
17986        vertical = slider.vars.direction === "vertical",
17987        reverse = slider.vars.reverse,
17988        carousel = (slider.vars.itemWidth > 0),
17989        fade = slider.vars.animation === "fade",
17990        asNav = slider.vars.asNavFor !== "",
17991        methods = {};
17992
17993    // Store a reference to the slider object
17994    $.data(el, "flexslider", slider);
17995
17996    // Private slider methods
17997    methods = {
17998      init: function() {
17999        slider.animating = false;
18000        // Get current slide and make sure it is a number
18001        slider.currentSlide = parseInt( ( slider.vars.startAt ? slider.vars.startAt : 0), 10 );
18002        if ( isNaN( slider.currentSlide ) ) { slider.currentSlide = 0; }
18003        slider.animatingTo = slider.currentSlide;
18004        slider.atEnd = (slider.currentSlide === 0 || slider.currentSlide === slider.last);
18005        slider.containerSelector = slider.vars.selector.substr(0,slider.vars.selector.search(' '));
18006        slider.slides = $(slider.vars.selector, slider);
18007        slider.container = $(slider.containerSelector, slider);
18008        slider.count = slider.slides.length;
18009        // SYNC:
18010        slider.syncExists = $(slider.vars.sync).length > 0;
18011        // SLIDE:
18012        if (slider.vars.animation === "slide") { slider.vars.animation = "swing"; }
18013        slider.prop = (vertical) ? "top" : ( slider.vars.rtl ? "marginRight" : "marginLeft" );
18014        slider.args = {};
18015        // SLIDESHOW:
18016        slider.manualPause = false;
18017        slider.stopped = false;
18018        //PAUSE WHEN INVISIBLE
18019        slider.started = false;
18020        slider.startTimeout = null;
18021        // TOUCH/USECSS:
18022        slider.transitions = !slider.vars.video && !fade && slider.vars.useCSS && (function() {
18023          var obj = document.createElement('div'),
18024              props = ['perspectiveProperty', 'WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective'];
18025          for (var i in props) {
18026            if ( obj.style[ props[i] ] !== undefined ) {
18027              slider.pfx = props[i].replace('Perspective','').toLowerCase();
18028              slider.prop = "-" + slider.pfx + "-transform";
18029              return true;
18030            }
18031          }
18032          return false;
18033        }());
18034        slider.isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
18035        slider.ensureAnimationEnd = '';
18036        // CONTROLSCONTAINER:
18037        if (slider.vars.controlsContainer !== "") slider.controlsContainer = $(slider.vars.controlsContainer).length > 0 && $(slider.vars.controlsContainer);
18038        // MANUAL:
18039        if (slider.vars.manualControls !== "") slider.manualControls = $(slider.vars.manualControls).length > 0 && $(slider.vars.manualControls);
18040
18041        // CUSTOM DIRECTION NAV:
18042        if (slider.vars.customDirectionNav !== "") slider.customDirectionNav = $(slider.vars.customDirectionNav).length === 2 && $(slider.vars.customDirectionNav);
18043
18044        // RANDOMIZE:
18045        if (slider.vars.randomize) {
18046          slider.slides.sort(function() { return (Math.round(Math.random())-0.5); });
18047          slider.container.empty().append(slider.slides);
18048        }
18049
18050        slider.doMath();
18051
18052        // INIT
18053        slider.setup("init");
18054
18055        // CONTROLNAV:
18056        if (slider.vars.controlNav) { methods.controlNav.setup(); }
18057
18058        // DIRECTIONNAV:
18059        if (slider.vars.directionNav) { methods.directionNav.setup(); }
18060
18061        // KEYBOARD:
18062        if (slider.vars.keyboard && ($(slider.containerSelector).length === 1 || slider.vars.multipleKeyboard)) {
18063          $(document).on('keyup', function(event) {
18064            var keycode = event.keyCode;
18065            if (!slider.animating && (keycode === 39 || keycode === 37)) {
18066              var target = (slider.vars.rtl?
18067                                ((keycode === 37) ? slider.getTarget('next') :
18068                                (keycode === 39) ? slider.getTarget('prev') : false)
18069                                :
18070                                ((keycode === 39) ? slider.getTarget('next') :
18071                                (keycode === 37) ? slider.getTarget('prev') : false)
18072                                )
18073                                ;
18074              slider.flexAnimate(target, slider.vars.pauseOnAction);
18075            }
18076          });
18077        }
18078        // MOUSEWHEEL:
18079        if (slider.vars.mousewheel) {
18080          slider.on('mousewheel', function(event, delta, deltaX, deltaY) {
18081            event.preventDefault();
18082            var target = (delta < 0) ? slider.getTarget('next') : slider.getTarget('prev');
18083            slider.flexAnimate(target, slider.vars.pauseOnAction);
18084          });
18085        }
18086
18087        // PAUSEPLAY
18088        if (slider.vars.pausePlay) { methods.pausePlay.setup(); }
18089
18090        //PAUSE WHEN INVISIBLE
18091        if (slider.vars.slideshow && slider.vars.pauseInvisible) { methods.pauseInvisible.init(); }
18092
18093        // SLIDSESHOW
18094        if (slider.vars.slideshow) {
18095          if (slider.vars.pauseOnHover) {
18096            slider.on("hover", function() {
18097              if (!slider.manualPlay && !slider.manualPause) { slider.pause(); }
18098            }, function() {
18099              if (!slider.manualPause && !slider.manualPlay && !slider.stopped) { slider.play(); }
18100            });
18101          }
18102          // initialize animation
18103          //If we're visible, or we don't use PageVisibility API
18104          if(!slider.vars.pauseInvisible || !methods.pauseInvisible.isHidden()) {
18105            (slider.vars.initDelay > 0) ? slider.startTimeout = setTimeout(slider.play, slider.vars.initDelay) : slider.play();
18106          }
18107        }
18108
18109        // ASNAV:
18110        if (asNav) { methods.asNav.setup(); }
18111
18112        // TOUCH
18113        if (touch && slider.vars.touch) { methods.touch(); }
18114
18115        // FADE&&SMOOTHHEIGHT || SLIDE:
18116        if (!fade || (fade && slider.vars.smoothHeight)) { $(window).on("resize orientationchange focus", methods.resize); }
18117
18118        slider.find("img").attr("draggable", "false");
18119
18120        // API: start() Callback
18121        setTimeout(function(){
18122          slider.vars.start(slider);
18123        }, 200);
18124      },
18125      asNav: {
18126        setup: function() {
18127          slider.asNav = true;
18128          slider.animatingTo = Math.floor(slider.currentSlide/slider.move);
18129          slider.currentItem = slider.currentSlide;
18130          slider.slides.removeClass(namespace + "active-slide").eq(slider.currentItem).addClass(namespace + "active-slide");
18131          if(!msGesture){
18132              slider.slides.on(eventType, function(e){
18133                e.preventDefault();
18134                var $slide = $(this),
18135                    target = $slide.index();
18136                var posFromX;
18137                if(slider.vars.rtl){
18138                  posFromX = -1*($slide.offset().right - $(slider).scrollLeft()); // Find position of slide relative to right of slider container
18139                }
18140                else
18141                {
18142                  posFromX = $slide.offset().left - $(slider).scrollLeft(); // Find position of slide relative to left of slider container
18143                }
18144                if( posFromX <= 0 && $slide.hasClass( namespace + 'active-slide' ) ) {
18145                  slider.flexAnimate(slider.getTarget("prev"), true);
18146                } else if (!$(slider.vars.asNavFor).data('flexslider').animating && !$slide.hasClass(namespace + "active-slide")) {
18147                  slider.direction = (slider.currentItem < target) ? "next" : "prev";
18148                  slider.flexAnimate(target, slider.vars.pauseOnAction, false, true, true);
18149                }
18150              });
18151          }else{
18152              el._slider = slider;
18153              slider.slides.each(function (){
18154                  var that = this;
18155                  that._gesture = new MSGesture();
18156                  that._gesture.target = that;
18157                  that.addEventListener("MSPointerDown", function (e){
18158                      e.preventDefault();
18159                      if(e.currentTarget._gesture) {
18160                        e.currentTarget._gesture.addPointer(e.pointerId);
18161                      }
18162                  }, false);
18163                  that.addEventListener("MSGestureTap", function (e){
18164                      e.preventDefault();
18165                      var $slide = $(this),
18166                          target = $slide.index();
18167                      if (!$(slider.vars.asNavFor).data('flexslider').animating && !$slide.hasClass('active')) {
18168                          slider.direction = (slider.currentItem < target) ? "next" : "prev";
18169                          slider.flexAnimate(target, slider.vars.pauseOnAction, false, true, true);
18170                      }
18171                  });
18172              });
18173          }
18174        }
18175      },
18176      controlNav: {
18177        setup: function() {
18178          if (!slider.manualControls) {
18179            methods.controlNav.setupPaging();
18180          } else { // MANUALCONTROLS:
18181            methods.controlNav.setupManual();
18182          }
18183        },
18184        setupPaging: function() {
18185          var type = (slider.vars.controlNav === "thumbnails") ? 'control-thumbs' : 'control-paging',
18186              j = 1,
18187              item,
18188              slide;
18189
18190          slider.controlNavScaffold = $('<ol class="'+ namespace + 'control-nav ' + namespace + type + '"></ol>');
18191
18192          if (slider.pagingCount > 1) {
18193            for (var i = 0; i < slider.pagingCount; i++) {
18194              slide = slider.slides.eq(i);
18195
18196              if ( undefined === slide.attr( 'data-thumb-alt' ) ) { 
18197                slide.attr( 'data-thumb-alt', '' ); 
18198              }
18199              
18200              item = $( '<a></a>' ).attr( 'href', '#' ).text( j );
18201              if ( slider.vars.controlNav === "thumbnails" ) {
18202                item = $( '<img/>' ).attr( 'src', slide.attr( 'data-thumb' ) );
18203              }
18204              
18205              if ( '' !== slide.attr( 'data-thumb-alt' ) ) {
18206                item.attr( 'alt', slide.attr( 'data-thumb-alt' ) );
18207              }
18208
18209              if ( 'thumbnails' === slider.vars.controlNav && true === slider.vars.thumbCaptions ) {
18210                var captn = slide.attr( 'data-thumbcaption' );
18211                if ( '' !== captn && undefined !== captn ) { 
18212                  var caption = $('<span></span>' ).addClass( namespace + 'caption' ).text( captn );
18213                  item.append( caption );
18214                }
18215              }
18216              
18217              var liElement = $( '<li>' );
18218              item.appendTo( liElement );
18219              liElement.append( '</li>' );
18220
18221              slider.controlNavScaffold.append(liElement);
18222              j++;
18223
18224            }
18225          }
18226
18227          // CONTROLSCONTAINER:
18228          (slider.controlsContainer) ? $(slider.controlsContainer).append(slider.controlNavScaffold) : slider.append(slider.controlNavScaffold);
18229          methods.controlNav.set();
18230
18231          methods.controlNav.active();
18232		  // slider.controlNavScaffold.delegate('a, img', eventType, function(event) {
18233          slider.controlNavScaffold.on(eventType, 'a, img', function(event) {
18234            event.preventDefault();
18235
18236            if (watchedEvent === "" || watchedEvent === event.type) {
18237              var $this = $(this),
18238                  target = slider.controlNav.index($this);
18239
18240              if (!$this.hasClass(namespace + 'active')) {
18241                slider.direction = (target > slider.currentSlide) ? "next" : "prev";
18242                slider.flexAnimate(target, slider.vars.pauseOnAction);
18243              }
18244            }
18245
18246            // setup flags to prevent event duplication
18247            if (watchedEvent === "") {
18248              watchedEvent = event.type;
18249            }
18250            methods.setToClearWatchedEvent();
18251
18252          });
18253        },
18254        setupManual: function() {
18255          slider.controlNav = slider.manualControls;
18256          methods.controlNav.active();
18257
18258          slider.controlNav.on(eventType, function(event) {
18259            event.preventDefault();
18260
18261            if (watchedEvent === "" || watchedEvent === event.type) {
18262              var $this = $(this),
18263                  target = slider.controlNav.index($this);
18264
18265              if (!$this.hasClass(namespace + 'active')) {
18266                (target > slider.currentSlide) ? slider.direction = "next" : slider.direction = "prev";
18267                slider.flexAnimate(target, slider.vars.pauseOnAction);
18268              }
18269            }
18270
18271            // setup flags to prevent event duplication
18272            if (watchedEvent === "") {
18273              watchedEvent = event.type;
18274            }
18275            methods.setToClearWatchedEvent();
18276          });
18277        },
18278        set: function() {
18279          var selector = (slider.vars.controlNav === "thumbnails") ? 'img' : 'a';
18280          slider.controlNav = $('.' + namespace + 'control-nav li ' + selector, (slider.controlsContainer) ? slider.controlsContainer : slider);
18281        },
18282        active: function() {
18283          slider.controlNav.removeClass(namespace + "active").eq(slider.animatingTo).addClass(namespace + "active");
18284        },
18285        update: function(action, pos) {
18286          if (slider.pagingCount > 1 && action === "add") {
18287            slider.controlNavScaffold.append($('<li><a href="#">' + slider.count + '</a></li>'));
18288          } else if (slider.pagingCount === 1) {
18289            slider.controlNavScaffold.find('li').remove();
18290          } else {
18291            slider.controlNav.eq(pos).closest('li').remove();
18292          }
18293          methods.controlNav.set();
18294          (slider.pagingCount > 1 && slider.pagingCount !== slider.controlNav.length) ? slider.update(pos, action) : methods.controlNav.active();
18295        }
18296      },
18297      directionNav: {
18298        setup: function() {
18299          var directionNavScaffold = $('<ul class="' + namespace + 'direction-nav"><li class="' + namespace + 'nav-prev"><a class="' + namespace + 'prev" href="#">' + slider.vars.prevText + '</a></li><li class="' + namespace + 'nav-next"><a class="' + namespace + 'next" href="#">' + slider.vars.nextText + '</a></li></ul>');
18300
18301          // CUSTOM DIRECTION NAV:
18302          if (slider.customDirectionNav) {
18303            slider.directionNav = slider.customDirectionNav;
18304          // CONTROLSCONTAINER:
18305          } else if (slider.controlsContainer) {
18306            $(slider.controlsContainer).append(directionNavScaffold);
18307            slider.directionNav = $('.' + namespace + 'direction-nav li a', slider.controlsContainer);
18308          } else {
18309            slider.append(directionNavScaffold);
18310            slider.directionNav = $('.' + namespace + 'direction-nav li a', slider);
18311          }
18312
18313          methods.directionNav.update();
18314
18315          slider.directionNav.on(eventType, function(event) {
18316            event.preventDefault();
18317            var target;
18318
18319            if (watchedEvent === "" || watchedEvent === event.type) {
18320              target = ($(this).hasClass(namespace + 'next')) ? slider.getTarget('next') : slider.getTarget('prev');
18321              slider.flexAnimate(target, slider.vars.pauseOnAction);
18322            }
18323
18324            // setup flags to prevent event duplication
18325            if (watchedEvent === "") {
18326              watchedEvent = event.type;
18327            }
18328            methods.setToClearWatchedEvent();
18329          });
18330        },
18331        update: function() {
18332          var disabledClass = namespace + 'disabled';
18333          if (slider.pagingCount === 1) {
18334            slider.directionNav.addClass(disabledClass).attr('tabindex', '-1');
18335          } else if (!slider.vars.animationLoop) {
18336            if (slider.animatingTo === 0) {
18337              slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "prev").addClass(disabledClass).attr('tabindex', '-1');
18338            } else if (slider.animatingTo === slider.last) {
18339              slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "next").addClass(disabledClass).attr('tabindex', '-1');
18340            } else {
18341              slider.directionNav.removeClass(disabledClass).removeAttr('tabindex');
18342            }
18343          } else {
18344            slider.directionNav.removeClass(disabledClass).removeAttr('tabindex');
18345          }
18346        }
18347      },
18348      pausePlay: {
18349        setup: function() {
18350          var pausePlayScaffold = $('<div class="' + namespace + 'pauseplay"><a href="#"></a></div>');
18351
18352          // CONTROLSCONTAINER:
18353          if (slider.controlsContainer) {
18354            slider.controlsContainer.append(pausePlayScaffold);
18355            slider.pausePlay = $('.' + namespace + 'pauseplay a', slider.controlsContainer);
18356          } else {
18357            slider.append(pausePlayScaffold);
18358            slider.pausePlay = $('.' + namespace + 'pauseplay a', slider);
18359          }
18360
18361          methods.pausePlay.update((slider.vars.slideshow) ? namespace + 'pause' : namespace + 'play');
18362
18363          slider.pausePlay.on(eventType, function(event) {
18364            event.preventDefault();
18365
18366            if (watchedEvent === "" || watchedEvent === event.type) {
18367              if ($(this).hasClass(namespace + 'pause')) {
18368                slider.manualPause = true;
18369                slider.manualPlay = false;
18370                slider.pause();
18371              } else {
18372                slider.manualPause = false;
18373                slider.manualPlay = true;
18374                slider.play();
18375              }
18376            }
18377
18378            // setup flags to prevent event duplication
18379            if (watchedEvent === "") {
18380              watchedEvent = event.type;
18381            }
18382            methods.setToClearWatchedEvent();
18383          });
18384        },
18385        update: function(state) {
18386          (state === "play") ? slider.pausePlay.removeClass(namespace + 'pause').addClass(namespace + 'play').html(slider.vars.playText) : slider.pausePlay.removeClass(namespace + 'play').addClass(namespace + 'pause').html(slider.vars.pauseText);
18387        }
18388      },
18389      touch: function() {
18390        var startX,
18391          startY,
18392          offset,
18393          cwidth,
18394          dx,
18395          startT,
18396          onTouchStart,
18397          onTouchMove,
18398          onTouchEnd,
18399          scrolling = false,
18400          localX = 0,
18401          localY = 0,
18402          accDx = 0;
18403
18404        if(!msGesture){
18405            onTouchStart = function(e) {
18406              if (slider.animating) {
18407                e.preventDefault();
18408              } else if ( ( window.navigator.msPointerEnabled ) || e.touches.length === 1 ) {
18409                slider.pause();
18410                // CAROUSEL:
18411                cwidth = (vertical) ? slider.h : slider. w;
18412                startT = Number(new Date());
18413                // CAROUSEL:
18414
18415                // Local vars for X and Y points.
18416                localX = e.touches[0].pageX;
18417                localY = e.touches[0].pageY;
18418
18419                offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 :
18420                         (carousel && reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
18421                         (carousel && slider.currentSlide === slider.last) ? slider.limit :
18422                         (carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide :
18423                         (reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth;
18424                startX = (vertical) ? localY : localX;
18425                startY = (vertical) ? localX : localY;
18426                el.addEventListener('touchmove', onTouchMove, false);
18427                el.addEventListener('touchend', onTouchEnd, false);
18428              }
18429            };
18430
18431            onTouchMove = function(e) {
18432              // Local vars for X and Y points.
18433
18434              localX = e.touches[0].pageX;
18435              localY = e.touches[0].pageY;
18436
18437              dx = (vertical) ? startX - localY : (slider.vars.rtl?-1:1)*(startX - localX);
18438              scrolling = (vertical) ? (Math.abs(dx) < Math.abs(localX - startY)) : (Math.abs(dx) < Math.abs(localY - startY));
18439              var fxms = 500;
18440
18441              if ( ! scrolling || Number( new Date() ) - startT > fxms ) {
18442                e.preventDefault();
18443                if (!fade && slider.transitions) {
18444                  if (!slider.vars.animationLoop) {
18445                    dx = dx/((slider.currentSlide === 0 && dx < 0 || slider.currentSlide === slider.last && dx > 0) ? (Math.abs(dx)/cwidth+2) : 1);
18446                  }
18447                  slider.setProps(offset + dx, "setTouch");
18448                }
18449              }
18450            };
18451
18452            onTouchEnd = function(e) {
18453              // finish the touch by undoing the touch session
18454              el.removeEventListener('touchmove', onTouchMove, false);
18455
18456              if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) {
18457                var updateDx = (reverse) ? -dx : dx,
18458                    target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev');
18459
18460                if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) {
18461                  slider.flexAnimate(target, slider.vars.pauseOnAction);
18462                } else {
18463                  if (!fade) { slider.flexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true); }
18464                }
18465              }
18466              el.removeEventListener('touchend', onTouchEnd, false);
18467
18468              startX = null;
18469              startY = null;
18470              dx = null;
18471              offset = null;
18472            };
18473
18474            el.addEventListener('touchstart', onTouchStart, false);
18475        }else{
18476            el.style.msTouchAction = "none";
18477            el._gesture = new MSGesture();
18478            el._gesture.target = el;
18479            el.addEventListener("MSPointerDown", onMSPointerDown, false);
18480            el._slider = slider;
18481            el.addEventListener("MSGestureChange", onMSGestureChange, false);
18482            el.addEventListener("MSGestureEnd", onMSGestureEnd, false);
18483
18484            function onMSPointerDown(e){
18485                e.stopPropagation();
18486                if (slider.animating) {
18487                    e.preventDefault();
18488                }else{
18489                    slider.pause();
18490                    el._gesture.addPointer(e.pointerId);
18491                    accDx = 0;
18492                    cwidth = (vertical) ? slider.h : slider. w;
18493                    startT = Number(new Date());
18494                    // CAROUSEL:
18495
18496                    offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 :
18497                        (carousel && reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
18498                            (carousel && slider.currentSlide === slider.last) ? slider.limit :
18499                                (carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide :
18500                                    (reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth;
18501                }
18502            }
18503
18504            function onMSGestureChange(e) {
18505                e.stopPropagation();
18506                var slider = e.target._slider;
18507                if(!slider){
18508                    return;
18509                }
18510                var transX = -e.translationX,
18511                    transY = -e.translationY;
18512
18513                //Accumulate translations.
18514                accDx = accDx + ((vertical) ? transY : transX);
18515                dx = (slider.vars.rtl?-1:1)*accDx;
18516                scrolling = (vertical) ? (Math.abs(accDx) < Math.abs(-transX)) : (Math.abs(accDx) < Math.abs(-transY));
18517
18518                if(e.detail === e.MSGESTURE_FLAG_INERTIA){
18519                    setImmediate(function (){
18520                        el._gesture.stop();
18521                    });
18522
18523                    return;
18524                }
18525
18526                if (!scrolling || Number(new Date()) - startT > 500) {
18527                    e.preventDefault();
18528                    if (!fade && slider.transitions) {
18529                        if (!slider.vars.animationLoop) {
18530                            dx = accDx / ((slider.currentSlide === 0 && accDx < 0 || slider.currentSlide === slider.last && accDx > 0) ? (Math.abs(accDx) / cwidth + 2) : 1);
18531                        }
18532                        slider.setProps(offset + dx, "setTouch");
18533                    }
18534                }
18535            }
18536
18537            function onMSGestureEnd(e) {
18538                e.stopPropagation();
18539                var slider = e.target._slider;
18540                if(!slider){
18541                    return;
18542                }
18543                if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) {
18544                    var updateDx = (reverse) ? -dx : dx,
18545                        target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev');
18546
18547                    if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) {
18548                        slider.flexAnimate(target, slider.vars.pauseOnAction);
18549                    } else {
18550                        if (!fade) { slider.flexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true); }
18551                    }
18552                }
18553
18554                startX = null;
18555                startY = null;
18556                dx = null;
18557                offset = null;
18558                accDx = 0;
18559            }
18560        }
18561      },
18562      resize: function() {
18563        if (!slider.animating && slider.is(':visible')) {
18564          if (!carousel) { slider.doMath(); }
18565
18566          if (fade) {
18567            // SMOOTH HEIGHT:
18568            methods.smoothHeight();
18569          } else if (carousel) { //CAROUSEL:
18570            slider.slides.width(slider.computedW);
18571            slider.update(slider.pagingCount);
18572            slider.setProps();
18573          }
18574          else if (vertical) { //VERTICAL:
18575            slider.viewport.height(slider.h);
18576            slider.setProps(slider.h, "setTotal");
18577          } else {
18578            // SMOOTH HEIGHT:
18579            if (slider.vars.smoothHeight) { methods.smoothHeight(); }
18580            slider.newSlides.width(slider.computedW);
18581            slider.setProps(slider.computedW, "setTotal");
18582          }
18583        }
18584      },
18585      smoothHeight: function(dur) {
18586        if (!vertical || fade) {
18587          var $obj = (fade) ? slider : slider.viewport;
18588          (dur) ? $obj.animate({"height": slider.slides.eq(slider.animatingTo).innerHeight()}, dur) : $obj.innerHeight(slider.slides.eq(slider.animatingTo).innerHeight());
18589        }
18590      },
18591      sync: function(action) {
18592        var $obj = $(slider.vars.sync).data("flexslider"),
18593            target = slider.animatingTo;
18594
18595        switch (action) {
18596          case "animate": $obj.flexAnimate(target, slider.vars.pauseOnAction, false, true); break;
18597          case "play": if (!$obj.playing && !$obj.asNav) { $obj.play(); } break;
18598          case "pause": $obj.pause(); break;
18599        }
18600      },
18601      uniqueID: function($clone) {
18602        // Append _clone to current level and children elements with id attributes
18603        $clone.filter( '[id]' ).add($clone.find( '[id]' )).each(function() {
18604          var $this = $(this);
18605          $this.attr( 'id', $this.attr( 'id' ) + '_clone' );
18606        });
18607        return $clone;
18608      },
18609      pauseInvisible: {
18610        visProp: null,
18611        init: function() {
18612          var visProp = methods.pauseInvisible.getHiddenProp();
18613          if (visProp) {
18614            var evtname = visProp.replace(/[H|h]idden/,'') + 'visibilitychange';
18615            document.addEventListener(evtname, function() {
18616              if (methods.pauseInvisible.isHidden()) {
18617                if(slider.startTimeout) {
18618                  clearTimeout(slider.startTimeout); //If clock is ticking, stop timer and prevent from starting while invisible
18619                } else {
18620                  slider.pause(); //Or just pause
18621                }
18622              }
18623              else {
18624                if(slider.started) {
18625                  slider.play(); //Initiated before, just play
18626                } else {
18627                  if (slider.vars.initDelay > 0) {
18628                    setTimeout(slider.play, slider.vars.initDelay);
18629                  } else {
18630                    slider.play(); //Didn't init before: simply init or wait for it
18631                  }
18632                }
18633              }
18634            });
18635          }
18636        },
18637        isHidden: function() {
18638          var prop = methods.pauseInvisible.getHiddenProp();
18639          if (!prop) {
18640            return false;
18641          }
18642          return document[prop];
18643        },
18644        getHiddenProp: function() {
18645          var prefixes = ['webkit','moz','ms','o'];
18646          // if 'hidden' is natively supported just return it
18647          if ('hidden' in document) {
18648            return 'hidden';
18649          }
18650          // otherwise loop over all the known prefixes until we find one
18651          for ( var i = 0; i < prefixes.length; i++ ) {
18652              if ((prefixes[i] + 'Hidden') in document) {
18653                return prefixes[i] + 'Hidden';
18654              }
18655          }
18656          // otherwise it's not supported
18657          return null;
18658        }
18659      },
18660      setToClearWatchedEvent: function() {
18661        clearTimeout(watchedEventClearTimer);
18662        watchedEventClearTimer = setTimeout(function() {
18663          watchedEvent = "";
18664        }, 3000);
18665      }
18666    };
18667
18668    // public methods
18669    slider.flexAnimate = function(target, pause, override, withSync, fromNav) {
18670      if (!slider.vars.animationLoop && target !== slider.currentSlide) {
18671        slider.direction = (target > slider.currentSlide) ? "next" : "prev";
18672      }
18673
18674      if (asNav && slider.pagingCount === 1) slider.direction = (slider.currentItem < target) ? "next" : "prev";
18675
18676      if (!slider.animating && (slider.canAdvance(target, fromNav) || override) && slider.is(":visible")) {
18677        if (asNav && withSync) {
18678          var master = $(slider.vars.asNavFor).data('flexslider');
18679          slider.atEnd = target === 0 || target === slider.count - 1;
18680          master.flexAnimate(target, true, false, true, fromNav);
18681          slider.direction = (slider.currentItem < target) ? "next" : "prev";
18682          master.direction = slider.direction;
18683
18684          if (Math.ceil((target + 1)/slider.visible) - 1 !== slider.currentSlide && target !== 0) {
18685            slider.currentItem = target;
18686            slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide");
18687            target = Math.floor(target/slider.visible);
18688          } else {
18689            slider.currentItem = target;
18690            slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide");
18691            return false;
18692          }
18693        }
18694
18695        slider.animating = true;
18696        slider.animatingTo = target;
18697
18698        // SLIDESHOW:
18699        if (pause) { slider.pause(); }
18700
18701        // API: before() animation Callback
18702        slider.vars.before(slider);
18703
18704        // SYNC:
18705        if (slider.syncExists && !fromNav) { methods.sync("animate"); }
18706
18707        // CONTROLNAV
18708        if (slider.vars.controlNav) { methods.controlNav.active(); }
18709
18710        // !CAROUSEL:
18711        // CANDIDATE: slide active class (for add/remove slide)
18712        if (!carousel) { slider.slides.removeClass(namespace + 'active-slide').eq(target).addClass(namespace + 'active-slide'); }
18713
18714        // INFINITE LOOP:
18715        // CANDIDATE: atEnd
18716        slider.atEnd = target === 0 || target === slider.last;
18717
18718        // DIRECTIONNAV:
18719        if (slider.vars.directionNav) { methods.directionNav.update(); }
18720
18721        if (target === slider.last) {
18722          // API: end() of cycle Callback
18723          slider.vars.end(slider);
18724          // SLIDESHOW && !INFINITE LOOP:
18725          if (!slider.vars.animationLoop) { slider.pause(); }
18726        }
18727
18728        // SLIDE:
18729        if (!fade) {
18730          var dimension = (vertical) ? slider.slides.filter(':first').height() : slider.computedW,
18731              margin, slideString, calcNext;
18732
18733          // INFINITE LOOP / REVERSE:
18734          if (carousel) {
18735            margin = slider.vars.itemMargin;
18736            calcNext = ((slider.itemW + margin) * slider.move) * slider.animatingTo;
18737            slideString = (calcNext > slider.limit && slider.visible !== 1) ? slider.limit : calcNext;
18738          } else if (slider.currentSlide === 0 && target === slider.count - 1 && slider.vars.animationLoop && slider.direction !== "next") {
18739            slideString = (reverse) ? (slider.count + slider.cloneOffset) * dimension : 0;
18740          } else if (slider.currentSlide === slider.last && target === 0 && slider.vars.animationLoop && slider.direction !== "prev") {
18741            slideString = (reverse) ? 0 : (slider.count + 1) * dimension;
18742          } else {
18743            slideString = (reverse) ? ((slider.count - 1) - target + slider.cloneOffset) * dimension : (target + slider.cloneOffset) * dimension;
18744          }
18745          slider.setProps(slideString, "", slider.vars.animationSpeed);
18746          if (slider.transitions) {
18747            if (!slider.vars.animationLoop || !slider.atEnd) {
18748              slider.animating = false;
18749              slider.currentSlide = slider.animatingTo;
18750            }
18751
18752            // Unbind previous transitionEnd events and re-bind new transitionEnd event
18753            slider.container.off("webkitTransitionEnd transitionend");
18754            slider.container.on("webkitTransitionEnd transitionend", function() {
18755              clearTimeout(slider.ensureAnimationEnd);
18756              slider.wrapup(dimension);
18757            });
18758
18759            // Insurance for the ever-so-fickle transitionEnd event
18760            clearTimeout(slider.ensureAnimationEnd);
18761            slider.ensureAnimationEnd = setTimeout(function() {
18762              slider.wrapup(dimension);
18763            }, slider.vars.animationSpeed + 100);
18764
18765          } else {
18766            slider.container.animate(slider.args, slider.vars.animationSpeed, slider.vars.easing, function(){
18767              slider.wrapup(dimension);
18768            });
18769          }
18770        } else { // FADE:
18771          if (!touch) {
18772            slider.slides.eq(slider.currentSlide).css({"zIndex": 1}).animate({"opacity": 0}, slider.vars.animationSpeed, slider.vars.easing);
18773            slider.slides.eq(target).css({"zIndex": 2}).animate({"opacity": 1}, slider.vars.animationSpeed, slider.vars.easing, slider.wrapup);
18774          } else {
18775            slider.slides.eq(slider.currentSlide).css({ "opacity": 0, "zIndex": 1 });
18776            slider.slides.eq(target).css({ "opacity": 1, "zIndex": 2 });
18777            slider.wrapup(dimension);
18778          }
18779        }
18780        // SMOOTH HEIGHT:
18781        if (slider.vars.smoothHeight) { methods.smoothHeight(slider.vars.animationSpeed); }
18782      }
18783    };
18784    slider.wrapup = function(dimension) {
18785      // SLIDE:
18786      if (!fade && !carousel) {
18787        if (slider.currentSlide === 0 && slider.animatingTo === slider.last && slider.vars.animationLoop) {
18788          slider.setProps(dimension, "jumpEnd");
18789        } else if (slider.currentSlide === slider.last && slider.animatingTo === 0 && slider.vars.animationLoop) {
18790          slider.setProps(dimension, "jumpStart");
18791        }
18792      }
18793      slider.animating = false;
18794      slider.currentSlide = slider.animatingTo;
18795      // API: after() animation Callback
18796      slider.vars.after(slider);
18797    };
18798
18799    // SLIDESHOW:
18800    slider.animateSlides = function() {
18801      if (!slider.animating && focused ) { slider.flexAnimate(slider.getTarget("next")); }
18802    };
18803    // SLIDESHOW:
18804    slider.pause = function() {
18805      clearInterval(slider.animatedSlides);
18806      slider.animatedSlides = null;
18807      slider.playing = false;
18808      // PAUSEPLAY:
18809      if (slider.vars.pausePlay) { methods.pausePlay.update("play"); }
18810      // SYNC:
18811      if (slider.syncExists) { methods.sync("pause"); }
18812    };
18813    // SLIDESHOW:
18814    slider.play = function() {
18815      if (slider.playing) { clearInterval(slider.animatedSlides); }
18816      slider.animatedSlides = slider.animatedSlides || setInterval(slider.animateSlides, slider.vars.slideshowSpeed);
18817      slider.started = slider.playing = true;
18818      // PAUSEPLAY:
18819      if (slider.vars.pausePlay) { methods.pausePlay.update("pause"); }
18820      // SYNC:
18821      if (slider.syncExists) { methods.sync("play"); }
18822    };
18823    // STOP:
18824    slider.stop = function () {
18825      slider.pause();
18826      slider.stopped = true;
18827    };
18828    slider.canAdvance = function(target, fromNav) {
18829      // ASNAV:
18830      var last = (asNav) ? slider.pagingCount - 1 : slider.last;
18831      return (fromNav) ? true :
18832             (asNav && slider.currentItem === slider.count - 1 && target === 0 && slider.direction === "prev") ? true :
18833             (asNav && slider.currentItem === 0 && target === slider.pagingCount - 1 && slider.direction !== "next") ? false :
18834             (target === slider.currentSlide && !asNav) ? false :
18835             (slider.vars.animationLoop) ? true :
18836             (slider.atEnd && slider.currentSlide === 0 && target === last && slider.direction !== "next") ? false :
18837             (slider.atEnd && slider.currentSlide === last && target === 0 && slider.direction === "next") ? false :
18838             true;
18839    };
18840    slider.getTarget = function(dir) {
18841      slider.direction = dir;
18842      if (dir === "next") {
18843        return (slider.currentSlide === slider.last) ? 0 : slider.currentSlide + 1;
18844      } else {
18845        return (slider.currentSlide === 0) ? slider.last : slider.currentSlide - 1;
18846      }
18847    };
18848
18849    // SLIDE:
18850    slider.setProps = function(pos, special, dur) {
18851      var target = (function() {
18852        var posCheck = (pos) ? pos : ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo,
18853            posCalc = (function() {
18854              if (carousel) {
18855                return (special === "setTouch") ? pos :
18856                       (reverse && slider.animatingTo === slider.last) ? 0 :
18857                       (reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
18858                       (slider.animatingTo === slider.last) ? slider.limit : posCheck;
18859              } else {
18860                switch (special) {
18861                  case "setTotal": return (reverse) ? ((slider.count - 1) - slider.currentSlide + slider.cloneOffset) * pos : (slider.currentSlide + slider.cloneOffset) * pos;
18862                  case "setTouch": return (reverse) ? pos : pos;
18863                  case "jumpEnd": return (reverse) ? pos : slider.count * pos;
18864                  case "jumpStart": return (reverse) ? slider.count * pos : pos;
18865                  default: return pos;
18866                }
18867              }
18868            }());
18869
18870            return (posCalc * ((slider.vars.rtl)?1:-1)) + "px";
18871          }());
18872
18873      if (slider.transitions) {
18874        if (slider.isFirefox) {
18875          target = (vertical) ? "translate3d(0," + target + ",0)" : "translate3d(" + (parseInt(target)+'px') + ",0,0)";
18876        } else {
18877          target = (vertical) ? "translate3d(0," + target + ",0)" : "translate3d(" + ((slider.vars.rtl?-1:1)*parseInt(target)+'px') + ",0,0)";
18878        }
18879        dur = (dur !== undefined) ? (dur/1000) + "s" : "0s";
18880        slider.container.css("-" + slider.pfx + "-transition-duration", dur);
18881         slider.container.css("transition-duration", dur);
18882      }
18883
18884      slider.args[slider.prop] = target;
18885      if (slider.transitions || dur === undefined) { slider.container.css(slider.args); }
18886
18887      slider.container.css('transform',target);
18888    };
18889
18890    slider.setup = function(type) {
18891      // SLIDE:
18892      if (!fade) {
18893        var sliderOffset, arr;
18894
18895        if (type === "init") {
18896          slider.viewport = $('<div class="' + namespace + 'viewport"></div>').css({"overflow": "hidden", "position": "relative"}).appendTo(slider).append(slider.container);
18897          // INFINITE LOOP:
18898          slider.cloneCount = 0;
18899          slider.cloneOffset = 0;
18900          // REVERSE:
18901          if (reverse) {
18902            arr = $.makeArray(slider.slides).reverse();
18903            slider.slides = $(arr);
18904            slider.container.empty().append(slider.slides);
18905          }
18906        }
18907        // INFINITE LOOP && !CAROUSEL:
18908        if (slider.vars.animationLoop && !carousel) {
18909          slider.cloneCount = 2;
18910          slider.cloneOffset = 1;
18911          // clear out old clones
18912          if (type !== "init") { slider.container.find('.clone').remove(); }
18913          slider.container.append(methods.uniqueID(slider.slides.first().clone().addClass('clone')).attr('aria-hidden', 'true'))
18914                          .prepend(methods.uniqueID(slider.slides.last().clone().addClass('clone')).attr('aria-hidden', 'true'));
18915        }
18916        slider.newSlides = $(slider.vars.selector, slider);
18917
18918        sliderOffset = (reverse) ? slider.count - 1 - slider.currentSlide + slider.cloneOffset : slider.currentSlide + slider.cloneOffset;
18919        // VERTICAL:
18920        if (vertical && !carousel) {
18921          slider.container.height((slider.count + slider.cloneCount) * 200 + "%").css("position", "absolute").width("100%");
18922          setTimeout(function(){
18923            slider.newSlides.css({"display": "block"});
18924            slider.doMath();
18925            slider.viewport.height(slider.h);
18926            slider.setProps(sliderOffset * slider.h, "init");
18927          }, (type === "init") ? 100 : 0);
18928        } else {
18929          slider.container.width((slider.count + slider.cloneCount) * 200 + "%");
18930          slider.setProps(sliderOffset * slider.computedW, "init");
18931          setTimeout(function(){
18932            slider.doMath();
18933          if(slider.vars.rtl){
18934            if (slider.isFirefox) {
18935              slider.newSlides.css({"width": slider.computedW, "marginRight" : slider.computedM, "float": "right", "display": "block"});
18936            } else {
18937              slider.newSlides.css({"width": slider.computedW, "marginRight" : slider.computedM, "float": "left", "display": "block"});
18938            }
18939              
18940           }
18941            else{
18942              slider.newSlides.css({"width": slider.computedW, "marginRight" : slider.computedM, "float": "left", "display": "block"});
18943            }
18944            // SMOOTH HEIGHT:
18945            if (slider.vars.smoothHeight) { methods.smoothHeight(); }
18946          }, (type === "init") ? 100 : 0);
18947        }
18948      } else { // FADE:
18949        if(slider.vars.rtl){
18950          slider.slides.css({"width": "100%", "float": 'right', "marginLeft": "-100%", "position": "relative"});
18951        }
18952        else{
18953          slider.slides.css({"width": "100%", "float": 'left', "marginRight": "-100%", "position": "relative"});
18954        }
18955        if (type === "init") {
18956          if (!touch) {
18957            //slider.slides.eq(slider.currentSlide).fadeIn(slider.vars.animationSpeed, slider.vars.easing);
18958            if (slider.vars.fadeFirstSlide == false) {
18959              slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).eq(slider.currentSlide).css({"zIndex": 2}).css({"opacity": 1});
18960            } else {
18961              slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).eq(slider.currentSlide).css({"zIndex": 2}).animate({"opacity": 1},slider.vars.animationSpeed,slider.vars.easing);
18962            }
18963          } else {
18964            slider.slides.css({ "opacity": 0, "display": "block", "webkitTransition": "opacity " + slider.vars.animationSpeed / 1000 + "s ease", "zIndex": 1 }).eq(slider.currentSlide).css({ "opacity": 1, "zIndex": 2});
18965          }
18966        }
18967        // SMOOTH HEIGHT:
18968        if (slider.vars.smoothHeight) { methods.smoothHeight(); }
18969      }
18970      // !CAROUSEL:
18971      // CANDIDATE: active slide
18972      if (!carousel) { slider.slides.removeClass(namespace + "active-slide").eq(slider.currentSlide).addClass(namespace + "active-slide"); }
18973
18974      //FlexSlider: init() Callback
18975      slider.vars.init(slider);
18976    };
18977
18978    slider.doMath = function() {
18979      var slide = slider.slides.first(),
18980          slideMargin = slider.vars.itemMargin,
18981          minItems = slider.vars.minItems,
18982          maxItems = slider.vars.maxItems;
18983
18984      slider.w = (slider.viewport===undefined) ? slider.width() : slider.viewport.width();
18985      if (slider.isFirefox) { slider.w = slider.width(); }
18986      slider.h = slide.height();
18987      slider.boxPadding = slide.outerWidth() - slide.width();
18988
18989      // CAROUSEL:
18990      if (carousel) {
18991        slider.itemT = slider.vars.itemWidth + slideMargin;
18992        slider.itemM = slideMargin;
18993        slider.minW = (minItems) ? minItems * slider.itemT : slider.w;
18994        slider.maxW = (maxItems) ? (maxItems * slider.itemT) - slideMargin : slider.w;
18995        slider.itemW = (slider.minW > slider.w) ? (slider.w - (slideMargin * (minItems - 1)))/minItems :
18996                       (slider.maxW < slider.w) ? (slider.w - (slideMargin * (maxItems - 1)))/maxItems :
18997                       (slider.vars.itemWidth > slider.w) ? slider.w : slider.vars.itemWidth;
18998
18999        slider.visible = Math.floor(slider.w/(slider.itemW));
19000        slider.move = (slider.vars.move > 0 && slider.vars.move < slider.visible ) ? slider.vars.move : slider.visible;
19001        slider.pagingCount = Math.ceil(((slider.count - slider.visible)/slider.move) + 1);
19002        slider.last =  slider.pagingCount - 1;
19003        slider.limit = (slider.pagingCount === 1) ? 0 :
19004                       (slider.vars.itemWidth > slider.w) ? (slider.itemW * (slider.count - 1)) + (slideMargin * (slider.count - 1)) : ((slider.itemW + slideMargin) * slider.count) - slider.w - slideMargin;
19005      } else {
19006        slider.itemW = slider.w;
19007        slider.itemM = slideMargin;
19008        slider.pagingCount = slider.count;
19009        slider.last = slider.count - 1;
19010      }
19011      slider.computedW = slider.itemW - slider.boxPadding;
19012      slider.computedM = slider.itemM;
19013    };
19014
19015    slider.update = function(pos, action) {
19016      slider.doMath();
19017
19018      // update currentSlide and slider.animatingTo if necessary
19019      if (!carousel) {
19020        if (pos < slider.currentSlide) {
19021          slider.currentSlide += 1;
19022        } else if (pos <= slider.currentSlide && pos !== 0) {
19023          slider.currentSlide -= 1;
19024        }
19025        slider.animatingTo = slider.currentSlide;
19026      }
19027
19028      // update controlNav
19029      if (slider.vars.controlNav && !slider.manualControls) {
19030        if ((action === "add" && !carousel) || slider.pagingCount > slider.controlNav.length) {
19031          methods.controlNav.update("add");
19032        } else if ((action === "remove" && !carousel) || slider.pagingCount < slider.controlNav.length) {
19033          if (carousel && slider.currentSlide > slider.last) {
19034            slider.currentSlide -= 1;
19035            slider.animatingTo -= 1;
19036          }
19037          methods.controlNav.update("remove", slider.last);
19038        }
19039      }
19040      // update directionNav
19041      if (slider.vars.directionNav) { methods.directionNav.update(); }
19042
19043    };
19044
19045    slider.addSlide = function(obj, pos) {
19046      var $obj = $(obj);
19047
19048      slider.count += 1;
19049      slider.last = slider.count - 1;
19050
19051      // append new slide
19052      if (vertical && reverse) {
19053        (pos !== undefined) ? slider.slides.eq(slider.count - pos).after($obj) : slider.container.prepend($obj);
19054      } else {
19055        (pos !== undefined) ? slider.slides.eq(pos).before($obj) : slider.container.append($obj);
19056      }
19057
19058      // update currentSlide, animatingTo, controlNav, and directionNav
19059      slider.update(pos, "add");
19060
19061      // update slider.slides
19062      slider.slides = $(slider.vars.selector + ':not(.clone)', slider);
19063      // re-setup the slider to accomdate new slide
19064      slider.setup();
19065
19066      //FlexSlider: added() Callback
19067      slider.vars.added(slider);
19068    };
19069    slider.removeSlide = function(obj) {
19070      var pos = (isNaN(obj)) ? slider.slides.index($(obj)) : obj;
19071
19072      // update count
19073      slider.count -= 1;
19074      slider.last = slider.count - 1;
19075
19076      // remove slide
19077      if (isNaN(obj)) {
19078        $(obj, slider.slides).remove();
19079      } else {
19080        (vertical && reverse) ? slider.slides.eq(slider.last).remove() : slider.slides.eq(obj).remove();
19081      }
19082
19083      // update currentSlide, animatingTo, controlNav, and directionNav
19084      slider.doMath();
19085      slider.update(pos, "remove");
19086
19087      // update slider.slides
19088      slider.slides = $(slider.vars.selector + ':not(.clone)', slider);
19089      // re-setup the slider to accomdate new slide
19090      slider.setup();
19091
19092      // FlexSlider: removed() Callback
19093      slider.vars.removed(slider);
19094    };
19095
19096    //FlexSlider: Initialize
19097    methods.init();
19098  };
19099
19100  // Ensure the slider isn't focussed if the window loses focus.
19101  $( window ).on("blur",  function ( e ) {
19102    focused = false;
19103  }).on("focus",  function ( e ) {
19104    focused = true;
19105  });
19106
19107  //FlexSlider: Default Settings
19108  $.flexslider.defaults = {
19109    namespace: "flex-",             //{NEW} String: Prefix string attached to the class of every element generated by the plugin
19110    selector: ".slides > li",       //{NEW} Selector: Must match a simple pattern. '{container} > {slide}' -- Ignore pattern at your own peril
19111    animation: "fade",              //String: Select your animation type, "fade" or "slide"
19112    easing: "swing",                //{NEW} String: Determines the easing method used in jQuery transitions. jQuery easing plugin is supported!
19113    direction: "horizontal",        //String: Select the sliding direction, "horizontal" or "vertical"
19114    reverse: false,                 //{NEW} Boolean: Reverse the animation direction
19115    animationLoop: true,            //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end
19116    smoothHeight: false,            //{NEW} Boolean: Allow height of the slider to animate smoothly in horizontal mode
19117    startAt: 0,                     //Integer: The slide that the slider should start on. Array notation (0 = first slide)
19118    slideshow: true,                //Boolean: Animate slider automatically
19119    slideshowSpeed: 7000,           //Integer: Set the speed of the slideshow cycling, in milliseconds
19120    animationSpeed: 600,            //Integer: Set the speed of animations, in milliseconds
19121    initDelay: 0,                   //{NEW} Integer: Set an initialization delay, in milliseconds
19122    randomize: false,               //Boolean: Randomize slide order
19123    fadeFirstSlide: true,           //Boolean: Fade in the first slide when animation type is "fade"
19124    thumbCaptions: false,           //Boolean: Whether or not to put captions on thumbnails when using the "thumbnails" controlNav.
19125
19126    // Usability features
19127    pauseOnAction: true,            //Boolean: Pause the slideshow when interacting with control elements, highly recommended.
19128    pauseOnHover: false,            //Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering
19129    pauseInvisible: true,       //{NEW} Boolean: Pause the slideshow when tab is invisible, resume when visible. Provides better UX, lower CPU usage.
19130    useCSS: true,                   //{NEW} Boolean: Slider will use CSS3 transitions if available
19131    touch: true,                    //{NEW} Boolean: Allow touch swipe navigation of the slider on touch-enabled devices
19132    video: false,                   //{NEW} Boolean: If using video in the slider, will prevent CSS3 3D Transforms to avoid graphical glitches
19133
19134    // Primary Controls
19135    controlNav: true,               //Boolean: Create navigation for paging control of each slide? Note: Leave true for manualControls usage
19136    directionNav: true,             //Boolean: Create navigation for previous/next navigation? (true/false)
19137    prevText: "Previous",           //String: Set the text for the "previous" directionNav item
19138    nextText: "Next",               //String: Set the text for the "next" directionNav item
19139
19140    // Secondary Navigation
19141    keyboard: true,                 //Boolean: Allow slider navigating via keyboard left/right keys
19142    multipleKeyboard: false,        //{NEW} Boolean: Allow keyboard navigation to affect multiple sliders. Default behavior cuts out keyboard navigation with more than one slider present.
19143    mousewheel: false,              //{UPDATED} Boolean: Requires jquery.mousewheel.js (https://github.com/brandonaaron/jquery-mousewheel) - Allows slider navigating via mousewheel
19144    pausePlay: false,               //Boolean: Create pause/play dynamic element
19145    pauseText: "Pause",             //String: Set the text for the "pause" pausePlay item
19146    playText: "Play",               //String: Set the text for the "play" pausePlay item
19147
19148    // Special properties
19149    controlsContainer: "",          //{UPDATED} jQuery Object/Selector: Declare which container the navigation elements should be appended too. Default container is the FlexSlider element. Example use would be $(".flexslider-container"). Property is ignored if given element is not found.
19150    manualControls: "",             //{UPDATED} jQuery Object/Selector: Declare custom control navigation. Examples would be $(".flex-control-nav li") or "#tabs-nav li img", etc. The number of elements in your controlNav should match the number of slides/tabs.
19151    customDirectionNav: "",         //{NEW} jQuery Object/Selector: Custom prev / next button. Must be two jQuery elements. In order to make the events work they have to have the classes "prev" and "next" (plus namespace)
19152    sync: "",                       //{NEW} Selector: Mirror the actions performed on this slider with another slider. Use with care.
19153    asNavFor: "",                   //{NEW} Selector: Internal property exposed for turning the slider into a thumbnail navigation for another slider
19154
19155    // Carousel Options
19156    itemWidth: 0,                   //{NEW} Integer: Box-model width of individual carousel items, including horizontal borders and padding.
19157    itemMargin: 0,                  //{NEW} Integer: Margin between carousel items.
19158    minItems: 1,                    //{NEW} Integer: Minimum number of carousel items that should be visible. Items will resize fluidly when below this.
19159    maxItems: 0,                    //{NEW} Integer: Maxmimum number of carousel items that should be visible. Items will resize fluidly when above this limit.
19160    move: 0,                        //{NEW} Integer: Number of carousel items that should move on animation. If 0, slider will move all visible items.
19161    allowOneSlide: true,           //{NEW} Boolean: Whether or not to allow a slider comprised of a single slide
19162
19163    // Browser Specific
19164    isFirefox: false,             // {NEW} Boolean: Set to true when Firefox is the browser used.
19165
19166    // Callback API
19167    start: function(){},            //Callback: function(slider) - Fires when the slider loads the first slide
19168    before: function(){},           //Callback: function(slider) - Fires asynchronously with each slider animation
19169    after: function(){},            //Callback: function(slider) - Fires after each slider animation completes
19170    end: function(){},              //Callback: function(slider) - Fires when the slider reaches the last slide (asynchronous)
19171    added: function(){},            //{NEW} Callback: function(slider) - Fires after a slide is added
19172    removed: function(){},           //{NEW} Callback: function(slider) - Fires after a slide is removed
19173    init: function() {},             //{NEW} Callback: function(slider) - Fires after the slider is initially setup
19174  rtl: false             //{NEW} Boolean: Whether or not to enable RTL mode
19175  };
19176
19177  //FlexSlider: Plugin Function
19178  $.fn.flexslider = function(options) {
19179    if (options === undefined) { options = {}; }
19180
19181    if (typeof options === "object") {
19182      return this.each(function() {
19183        var $this = $(this),
19184            selector = (options.selector) ? options.selector : ".slides > li",
19185            $slides = $this.find(selector);
19186
19187      if ( ( $slides.length === 1 && options.allowOneSlide === false ) || $slides.length === 0 ) {
19188          $slides.fadeIn(400);
19189          if (options.start) { options.start($this); }
19190        } else if ($this.data('flexslider') === undefined) {
19191          new $.flexslider(this, options);
19192        }
19193      });
19194    } else {
19195      // Helper strings to quickly perform functions on the slider
19196      var $slider = $(this).data('flexslider');
19197      switch (options) {
19198        case "play": $slider.play(); break;
19199        case "pause": $slider.pause(); break;
19200        case "stop": $slider.stop(); break;
19201        case "next": $slider.flexAnimate($slider.getTarget("next"), true); break;
19202        case "prev":
19203        case "previous": $slider.flexAnimate($slider.getTarget("prev"), true); break;
19204        default: if (typeof options === "number") { $slider.flexAnimate(options, true); }
19205      }
19206    }
19207  };
19208})($z);
19209/*! 
19210 * $Id$
19211 * Copyright Zeta Software GmbH
19212 */
19213$z(document).ready(function () {
19214	function hideLabel(theField){
19215		// Check for HTML5-Fieldtypes which fill the field with widgets, so the placeholder text isn't visible
19216		var fieldsWithoutPlaceholder = ["date","time","color"];
19217		var fieldType = $z(theField).attr("type");
19218		if ( fieldsWithoutPlaceholder.indexOf(fieldType) !== -1 ){  
19219			// current field type was found in array of field types we want to ignore
19220			// check if the browser supports the current field type and if so, return false so we don't hide the label
19221			var i = document.createElement("input");
19222			i.setAttribute("type", fieldType);
19223			if (i.type !== "text"){
19224				return false;
19225			}	
19226		}
19227		
19228		if ( $z(theField).attr("placeholder") !== "" && $z(theField).attr("placeholder") !== undefined ){
19229			// placeholder attribute is set, so we hide the label
19230			return true;
19231		}
19232		return false;
19233	}
19234	
19235	$z(".SO-SiteSearchForm.autohidelabels").each(function(){
19236		var theForm = $z(this);
19237		// show placeholders if JS is on (we had hidden them in CSS to not show both, labels and placeholders
19238		theForm.addClass("placeholder");
19239		// hide labels of empty fields
19240		theForm.find("input.typetext, textarea").filter(function() { return $z(this).val() == ""; }).each(function(){
19241			if ( $z.support.placeholder && hideLabel($z(this)) ){
19242				$z(this).parent().addClass("nolabel");
19243			}
19244		});
19245		// when something is typed into an input text field or when it is being emtied, show the label again
19246		theForm.find("input.typetext, textarea").off("keyup");
19247		theForm.find("input.typetext, textarea").on("keyup", function(){
19248			if( $z(this).val() !== "" ){
19249				$z(this).parent().removeClass("nolabel");
19250			}
19251			else{
19252				$z(this).parent().addClass("nolabel");
19253			}
19254		});
19255		theForm.find("input.typetext, textarea").off("blur");
19256		theForm.find("input.typetext, textarea").on("blur", function(){
19257			if( $z(this).val() !== "" ){
19258				$z(this).parent().removeClass("nolabel");
19259			}
19260			else{
19261				$z(this).parent().addClass("nolabel");
19262			}
19263		})
19264	});
19265
19266	// show search string in textfield
19267	var tmpSearchstring = zpGetParameterByName("q", document.location.href);
19268	if ( document.getElementById("zpsearchengine") ){
19269		// fill search page searchfield with searchsting
19270		document.getElementById("zpsearchengine").q2.value = tmpSearchstring;
19271		// focus search page searchfield
19272		document.getElementById("zpsearchengine").q2.focus({ preventScroll: true });
19273	}
19274});
19275/*! 
19276 * ZP FAQ Widget
19277 * Copyright $Date$ Zeta Software GmbH
19278 */
19279
19280// define zp Namespace for later use in individual widgets if not only defined
19281if ( typeof(zp)==="undefined" ){
19282	var zp = {};
19283}
19284
19285$z(document).ready(function () {
19286	zp.Faq = function (){
19287		this.root = null;
19288
19289		var faq = this;
19290
19291		this.init = function (elemid, elementindex){
19292			faq.root = elemid;
19293	
19294			// define some styles based on settings received in data-attribute
19295			var head = document.getElementsByTagName('head')[0],
19296				style = document.createElement('style'),
19297				mystyles =  '.zpSO-faq-question span:before { content:"+"; display:inline-block; width:20px; }'
19298						  + '.zpSO-faq-question-selected a { font-weight:bold; }'
19299						  + '.zpSO-faq-question-selected span:before { content:"-"; }';	
19300	
19301			// inject styles 
19302			var rules = document.createTextNode(mystyles.replace(/\s+/g,' '));
19303			style.type = 'text/css';
19304			if(style.styleSheet){
19305					style.styleSheet.cssText = rules.nodeValue;
19306			}
19307			else{
19308				style.appendChild(rules);
19309			}
19310			if ( elementindex == 0 ){ //only append styles once
19311				head.appendChild(style);
19312			}
19313		
19314			$z(faq.root + " > a").on("click", function(e){
19315				e.preventDefault();
19316				var myID = $z(faq.root).attr("id");
19317				$z(faq.root).toggleClass('zpSO-faq-question-selected');
19318				$z('#zpSO-faq-answer' + myID).slideToggle('fast');
19319				// URL in Browser-Adressleiste aktualisieren, ohne dass der Browser die Seite lädt und zur Sprungmarke scrollt
19320				if (history.pushState){
19321					window.history.pushState("object or string", "Title", window.location.pathname + "#a" + myID);
19322				}
19323			});
19324	
19325		};
19326	};
19327
19328	// initialize FAQs
19329	$z("p.zpSO-faq-question[id]").each(function (i){
19330		new zp.Faq().init("#" + this.id.toString(), i);
19331	});
19332	
19333	// show faq if we deep-linked to it
19334	if ( window.location.hash ){
19335	 $z("#" + window.location.hash.substring(2)).toggleClass("zpSO-faq-question-selected");
19336	 $z("#zpSO-faq-answer" + window.location.hash.substring(2)).slideToggle('fast');
19337	}
19338});
19339
19340
19341
19342/*! 
19343 * ZP Tabs Widget
19344 * $Id$
19345 * Copyright Zeta Software GmbH
19346 */
19347
19348// define zp Namespace for later use in individual widgets if not only defined
19349if ( typeof(zp)==="undefined" ){
19350	var zp = {};
19351}
19352
19353$z(document).ready(function () {
19354	zp.Tabs = function (){
19355		this.root = null;
19356		this.bgcoloractive = "#ffffff";
19357		this.bgcolorinactive = "#f7f7f7";
19358		this.textcoloractive = "#5e5e5e";
19359		this.textcolorinactive = "#777777";
19360		this.bordercolor = "#e7e7e7";
19361	
19362		var tabs = this;
19363
19364		// globals
19365		var $active, $content, $mobilecontent, $links, clonedidprefix = "m";
19366	
19367		this.init = function (elemid){
19368			tabs.root = elemid;
19369		
19370			var tabBreakpoint = 319;
19371		
19372	
19373			// add class if container width is below tabBreakpoint, so the element is also responsive to its own width and not only the viewport
19374			var tabwidth = 0;
19375			if ( $z(window).width() > tabBreakpoint ){
19376				// we only calculate tabwidth if TABs are displayed normally (> tabBreakpoint)
19377				$z("div" + tabs.root + ".zpTABs ul.zpTABs li.tab").each( function(){ tabwidth += $z(this).outerWidth();});
19378			}
19379			$z( window ).on("resize", function() {
19380			  tabs.beresponsive(tabBreakpoint, tabwidth);
19381			});
19382			tabs.beresponsive(tabBreakpoint, tabwidth);
19383	
19384			tabs.bgcoloractive = $z(tabs.root).data("bgcoloractive") || tabs.bgcoloractive;
19385			tabs.bgcolorinactive = $z(tabs.root).data("bgcolorinactive") || tabs.bgcolorinactive;
19386			tabs.textcoloractive = $z(tabs.root).data("textcoloractive") || tabs.textcoloractive;
19387			tabs.textcolorinactive = $z(tabs.root).data("textcolorinactive") || tabs.textcolorinactive;
19388			tabs.bordercolor = $z(tabs.root).data("bordercolor") || tabs.bordercolor;
19389	
19390			// define some styles based on settings received in data-attribute
19391			var head = document.getElementsByTagName('head')[0],
19392			style = document.createElement('style'),
19393			mystyles =  "    div" + tabs.root + ".zpTABs > ul.zpTABs > li{ color: " + tabs.textcolorinactive + "; background-color: " + tabs.bgcolorinactive +"; border-color: " + tabs.bordercolor + ";}";
19394			mystyles += "    div" + tabs.root + ".zpTABs > ul.zpTABs > li a.zpTABs{ color: " + tabs.textcolorinactive + " !important;}";
19395			mystyles += "    div" + tabs.root + ".zpTABs > ul.zpTABs > li a.zpTABs:hover{ color: " + tabs.textcolorinactive + " !important;}";
19396			mystyles += "    div" + tabs.root + ".zpTABs > ul.zpTABs >
19396 li.active{ color: " + tabs.textcoloractive + "; background-color: " + tabs.bgcoloractive +"; border-color: " + tabs.bordercolor +";}";
19397			mystyles += "    div" + tabs.root + ".zpTABs > ul.zpTABs > li.acc{ color: " + tabs.textcoloractive + "; background-color: " + tabs.bgcoloractive +"; border-color: " + tabs.bordercolor +";}";
19398			mystyles += "    div" + tabs.root + ".zpTABs > ul.zpTABs > li.active a.zpTABs{ color: " + tabs.textcoloractive + " !important;}";
19399			mystyles += "    div" + tabs.root + ".zpTABs > ul.zpTABs > li.active a.zpTABs:hover{ color: " + tabs.textcoloractive + " !important;}";
19400			mystyles += "    div" + tabs.root + ".zpTABs > ul.zpTABs > li.tab.active::after{ border-color: " + tabs.bordercolor + ";}";
19401			mystyles += "    div" + tabs.root + ".zpTABs > ul.zpTABs > li.tab.active::before{ border-color: " + tabs.bordercolor + ";}";
19402			mystyles += "    div" + tabs.root + ".zpTABs > ul.zpTABs > li.acc > *:not(a){ color: " + tabs.textcoloractive + ";}";
19403	
19404			mystyles += "    div" + tabs.root + ".zpTABs > div.active{ border-color: " + tabs.bordercolor + "; background-color: " + tabs.bgcoloractive +";}";
19405			mystyles += "    div" + tabs.root + ".zpTABs > div.active > *:not(a){ color: " + tabs.textcoloractive + ";}";
19406	
19407	
19408			// inject styles 
19409			var rules = document.createTextNode(mystyles.replace(/\s+/g,' '));
19410			style.type = 'text/css';
19411			if(style.styleSheet){
19412					style.styleSheet.cssText = rules.nodeValue;
19413			}
19414			else{
19415				style.appendChild(rules);
19416			}
19417			head.appendChild(style);
19418		
19419			$z(elemid + ' ul.zpTABs').each(function(){
19420				var currenttab = this;
19421				var numtabs = $z(this).find('li.tab a.zpTABs').length;
19422				var lastclass = "";
19423		
19424				/*
19425				$z(this).find('li.tab:not(.accordion) a.zpTABs').each(function(i){
19426					if ( i === numtabs ){ // last iteration
19427						lastclass = " last";
19428					}
19429					$content = $z("div[data-tabid='" + $z(this).attr('href').substr(1) + "']");
19430					$clone = $content.clone().insertAfter($z(this).parent());
19431					$clone.wrapInner('<li data-tabid="' + $z(this).attr('href').substr(1) + clonedidprefix + '" class="touchonly acc' + lastclass + '" />').children().unwrap();
19432					// suffix all id's in cloned element with m
19433					$z(this).parent().next().find("[id]").each(function(){
19434						this.id = this.id + clonedidprefix;
19435					});
19436					// suffix all for attribs of labels in cloned element with m
19437					$z(this).parent().next().find("[for]").each(function(){
19438						$z(this).attr("for", $z(this).attr("for")+clonedidprefix);
19439					});
19440				});
19441				*/
19442		
19443				// http://blog.ha-com.com/2012/06/09/ein-jquery-tab-tutorial/
19444				// Fuer jeden Satz Tabs wollen wir verfolgen welcher
19445				// Tab aktiv ist und der ihm zugeordnete Inhalt
19446				//var $active, $content, $mobilecontent, 
19447				$links = $z(this).find('a.zpTABs');
19448		
19449				// make selecting tabs based on the url#hash work also via other relative urls which don't cause a page reload
19450				var that = this;
19451				$z(window).off('hashchange.zptabs'+elemid);
19452				$z(window).on('hashchange.zptabs'+elemid, function(){
19453					tabs.setActiveTabFromHash(that, tabs.root);
19454				});
19455		
19456				// on init, set active tab if url contains hash to the tab
19457				tabs.setActiveTabFromHash(that, tabs.root);
19458		
19459				// Binde den click event handler ein 
19460				$z("a.zpTABs", this).off();
19461				$z("a.zpTABs", this).on("click", function(event){
19462					// click event verschlucken
19463					event.preventDefault();
19464					var isAccordion = $z("div" + tabs.root ).hasClass("accordion") || $z("div" + tabs.root ).hasClass("small");
19465					var isAutocloose = $z("div" + tabs.root + ".accordion > ul.zpTABs").hasClass("autoclose");
19466					
19467					// URL in Browser-Adressleiste aktualisieren, ohne dass der Browser die Seite lädt und zur Sprungmarke scrollt
19468					if (history.pushState){
19469						window.history.pushState("object or string", "Title", window.location.pathname + $z(this).attr("href"));
19470					}
19471				
19472					if ( numtabs && numtabs < 2 && !isAccordion ){
19473						// wenn nur ein TAB im Widget definiert ist, soll der Click keine weiteren Auswirkungen haben
19474						return;
19475					}
19476			
19477					// Aktualisiere die Variablen mit dem neuen Link und Inhalt
19478					$active = $z(this);
19479					$content = $z("div[data-tabid='" + $active.attr('href').substr(1)  + "']");
19480					$mobilecontent = $z("li[data-tabid='" + $active.attr('href').substr(1) + clonedidprefix + "']");
19481							
19482					debug.log("ZP-Tabs autoclose: " + isAutocloose + " / pageY: " + event.pageY + " / click: ", $(this));
19483						
19484					if ( isAccordion ){
19485						// memorize current X scroll and Y click position before dom is changed
19486						var currentX = window.scrollX || 0;
19487						var elemY = $active[0].getBoundingClientRect().top || 0;
19488						
19489						$z("li", that).removeClass('noani');
19490						setTimeout(function() {
19491							// close other accordions
19492							$z(elemid + ' ul.zpTABs.autoclose li.accordion.active').removeClass("active");
19493							// open clicked accordion 
19494							$active.parent().toggleClass('active');
19495							$mobilecontent.toggleClass('active');
19496							
19497							if ( isAutocloose ){
19498								// keep accordion head at Y location (no scroll due to toggled content)
19499								var diffY = elemY - $active[0].getBoundingClientRect().top;
19500								window.scrollTo(currentX, window.scrollY - diffY);
19501							}
19502						}, 5);
19503					}
19504					else{
19505						// Mache alle Tabs inaktiv
19506						$z("div" + tabs.root + ".zpTABs *").removeClass('active');
19507						// Setze den Tab und seinen Inhalt (desktop und mobil) aktiv
19508						$active.parent().addClass('active');
19509						$content.addClass('active');
19510						$mobilecontent.addClass('active');
19511					}
19512				});
19513			});
19514	
19515		};
19516	
19517		this.setActiveTabFromHash = function(currentTab, tabsRoot){
19518			$active = $z(currentTab).find("a.zpTABs[href='" + window.location.hash + "']");
19519			if ( $active.length  ){
19520				$z("div" + tabsRoot + ".zpTABs *").removeClass('active');
19521			
19522				$content = $z("div[data-tabid='" + $active.attr('href').substr(1) + "']");
19523				$mobilecontent = $z("li[data-tabid='" + $active.attr('href').substr(1) + clonedidprefix + "']");
19524				$content.addClass("active");
19525			
19526				$z($active).parent().addClass('active noani');
19527				$mobilecontent.addClass("active noani");
19528			}
19529		
19530			return;
19531		};
19532
19533		this.beresponsive = function (tabBreakpoint, tabwidth){
19534			var containerwidth = $z("div" + tabs.root + ".zpTABs").outerWidth();
19535			if ( $z(window).width() > tabBreakpoint && tabwidth === 0 ){
19536				// tabwidth was never set, because page was loaded on a smallscreen (< tabBreakpoint), we need to recalculate tab-width while displayed normally (> tabBreakpoint sans .small class)
19537				$z("div" + tabs.root + ".zpTABs:not(.accordion)").removeClass("small");
19538				$z("div" + tabs.root + ".zpTABs:not(.accordion) ul.zpTABs li.tab").each( function(){ tabwidth += $z(this).outerWidth();});
19539			}
19540			if ( $z(window).width() > tabBreakpoint && containerwidth < tabwidth ){
19541				$z("div" + tabs.root + ".zpTABs:not(.accordion)").addClass("small smallcontainer");
19542			}
19543			else if ( $z(window).width() < tabBreakpoint ){
19544				$z("div" + tabs.root + ".zpTABs:not(.accordion)").addClass("small");
19545			}
19546			else{
19547				$z("div" + tabs.root + ".zpTABs:not(.accordion)").removeClass("small");
19548			}
19549		};
19550
19551
19552	};
19553
19554	// initialize TABs
19555	$z("div.zpTABs[id]").each(function (){
19556		new zp.Tabs().init("#" + this.id.toString());
19557	});
19558	
19559	// accordion widget
19560	$z('div.zpAccordion .accordion-heading').on("click", function( event ){
19561		event.preventDefault();
19562		$z(this).parent().find(".accordion-content").slideToggle("fast");
19563		$z(this).parent().toggleClass("active");
19564	});
19565});
19566
19567!function(c){var d,s,n,i,e,h,a,o,r,f,t,l,u,p=0,g={},b=[],y=0,w={},x=[],m=null,v=new Image,I=/\.(jpg|gif|png|bmp|jpeg|webp|jxl)(.*)?$/i,O=/[^\.]\.(swf)\s*$/i,C=1,M=0,j="",k=!1,S=c.extend(c("<div/>")[0],{prop:0}),P=c.browser.msie&&c.browser.version<7&&!window.XMLHttpRequest,Q=function(){s.hide(),v.onerror=v.onload=null,m&&m.abort(),d.empty()},T=function(){if(!1===g.onError(b,p,g))return s.hide(),void(k=!1);g.titleShow=!1,g.width="auto",g.height="auto",d.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>'),E()},B=function(){var i,t,e,n,a,o,r=b[p];if(Q(),g=c.extend({},c.fn.fancybox.defaults,void 0===c(r).data("fancybox")?g:c(r).data("fancybox")),!1!==(o=g.onStart(b,p,g)))if("object"==typeof o&&(g=c.extend(g,o)),e=g.title||(r.nodeName?c(r).attr("title"):r.title)||"",r.nodeName&&!g.orig&&(g.orig=c(r).children("img:first").length?c(r).children("img:first"):c(r)),""===e&&g.orig&&g.titleFromAlt&&(e=g.orig.attr("alt")),i=g.href||(r.nodeName?c(r).attr("href"):r.href)||null,(/^(?:javascript)/i.test(i)||"#"==i)&&(i=null),g.type?(t=g.type,i||(i=g.content)):g.content?t="html":i&&(t=i.match(I)?"image":i.match(O)?"swf":c(r).hasClass("iframe")?"iframe":0===i.indexOf("#")?"inline":"ajax"),t)switch("inline"==t&&(r=i.substr(i.indexOf("#")),t=0<c(r).length?"inline":"ajax"),g.type=t,g.href=i,g.title=e,g.autoDimensions&&("html"==g.type||"inline"==g.type||"ajax"==g.type?(g.width="auto",g.height="auto"):g.autoDimensions=!1),g.modal&&(g.overlayShow=!0,g.hideOnOverlayClick=!1,g.hideOnContentClick=!1,g.enableEscapeButton=!1,g.showCloseButton=!1),g.padding=parseInt(g.padding,10),g.margin=parseInt(g.margin,10),d.css("padding",g.padding+g.margin),c(".fancybox-inline-tmp").off("fancybox-cancel").on("fancybox-change",function(){c(this).replaceWith(h.children())}),t){case"html":d.html(g.content),E();break;case"inline":if(!0===c(r).parent().is("#fancybox-content"))return void(k=!1);c('<div class="fancybox-inline-tmp" />').hide().insertBefore(c(r)).on("fancybox-cleanup",function(){c(this).replaceWith(h.children())}).on("fancybox-cancel",function(){c(this).replaceWith(d.children())}),c(r).appendTo(d),E();break;case"image":k=!1,c.fancybox.showActivity(),(v=new Image).onerror=function(){T()},v.onload=function(){k=!0,v.onerror=v.onload=null,A()},v.src=i;break;case"swf":g.scrolling="no",n='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+g.width+'" height="'+g.height+'"><param name="movie" value="'+i+'"></param>',a="",c.each(g.swf,function(t,e){n+='<param name="'+t+'" value="'+e+'"></param>',a+=" "+t+'="'+e+'"'}),n+='<embed src="'+i+'" type="application/x-shockwave-flash" width="'+g.width+'" height="'+g.height+'"'+a+"></embed></object>",d.html(n),E();break;case"ajax":k=!1,c.fancybox.showActivity(),g.ajax.win=g.ajax.success,m=c.ajax(c.extend({},g.ajax,{url:i,data:g.ajax.data||{},error:function(t,e,n){0<t.status&&T()},success:function(t,e,n){if(200==("object"==typeof n?n:m).status){if("function"==typeof g.ajax.win){if(!1===(o=g.ajax.win(i,t,e,n)))return void s.hide();"string"!=typeof o&&"object"!=typeof o||(t=o)}d.html(t),E()}}}));break;case"iframe":D()}else T();else k=!1},E=function(){var t=g.width,e=g.height;t=-1<t.toString().indexOf("%")?parseInt((c(window).width()-2*g.margin)*parseFloat(t)/100,10)+"px":"auto"==t?"auto":t+"px",e=-1<e.toString().indexOf("%")?parseInt((c(window).height()-2*g.margin)*parseFloat(e)/100,10)+"px":"auto"==e?"auto":e+"px",d.wrapInner('<div style="width:'+t+";height:"+e+";overflow: "+("auto"==g.scrolling?"auto":"yes"==g.scrolling?"scroll":"hidden")+';position:relative;"></div>'),g.width=d.width(),g.height=d.height(),D()},A=function(){g.width=v.width,g.height=v.height,c("<img />").attr({id:"fancybox-img",src:v.src,alt:g.title}).appendTo(d),D()},D=function(){var t,e;return s.hide(),i.is(":visible")&&!1===w.onCleanup(x,y,w)?(c(".fancybox-inline-tmp").trigger("fancybox-cancel"),void(k=!1)):(k=!0,c(h.add(n)).off(),c(window).off("resize.fb scroll.fb"),c(document).off("keydown.fb"),i.is(":visible")&&"outside"!==w.titlePosition&&i.css("height",i.height()),x=b,y=p,(w=g).overlayShow?(n.css({"background-color":w.overlayColor,opacity:w.overlayOpacity,cursor:w.hideOnOverlayClick?"pointer":"auto",height:c(document).height()}),n.is(":visible")||(P&&c("select:not(#fancybox-tmp select)").filter(function(){return"hidden"!==this.style.visibility}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"}),n.show())):n.hide(),u=H(),F(),i.is(":visible")?(c(a.add(r).add(f)).hide(),t=i.position(),l={top:t.top,left
19567:t.left,width:i.width(),height:i.height()},e=l.width==u.width&&l.height==u.height,void h.fadeTo(w.changeFade,.3,function(){var t=function(){h.html(d.contents()).fadeTo(w.changeFade,1,N)};c(".fancybox-inline-tmp").trigger("fancybox-change"),h.empty().removeAttr("filter").css({"border-width":w.padding,width:u.width-2*w.padding,height:g.autoDimensions?"auto":u.height-M-2*w.padding}),e?t():(S.prop=0,c(S).animate({prop:1},{duration:w.changeSpeed,easing:w.easingChange,step:q,complete:t}))})):(i.removeAttr("style"),h.css("border-width",w.padding),"elastic"==w.transitionIn?(l=R(),h.html(d.contents()),i.show(),w.opacity&&(u.opacity=0),S.prop=0,void c(S).animate({prop:1},{duration:w.speedIn,easing:w.easingIn,step:q,complete:N})):("inside"==w.titlePosition&&0<M&&o.show(),h.css({width:u.width-2*w.padding,height:g.autoDimensions?"auto":u.height-M-2*w.padding}).html(d.contents()),void i.css(u).fadeIn("none"==w.transitionIn?0:w.speedIn,N))))},F=function(){var t;if(j=w.title||"",M=0,o.empty().removeAttr("style").removeClass(),!1!==w.titleShow)if((j=typeof w.titleFormat === "function"?w.titleFormat(j,x,y,w):!(!(t=j)||!t.length)&&("float"==w.titlePosition?'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+t+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+w.titlePosition+'">'+t+"</div>"))&&""!==j){switch(o.addClass("fancybox-title-"+w.titlePosition).html(j).appendTo("body").show(),w.titlePosition){case"inside":o.css({width:u.width-2*w.padding,marginLeft:w.padding,marginRight:w.padding}),M=o.outerHeight(!0),o.appendTo(e),u.height+=M;break;case"over":o.css({marginLeft:w.padding,width:u.width-2*w.padding,bottom:w.padding}).appendTo(e);break;case"float":o.css("left",-1*parseInt((o.width()-u.width-40)/2,10)).appendTo(i);break;default:o.css({width:u.width-2*w.padding,paddingLeft:w.padding,paddingRight:w.padding}).appendTo(i)}o.hide()}else o.hide();else o.hide()},N=function(){c.support.opacity||(h.css('filter', ""),i.css('filter', "")),g.autoDimensions&&h.css("height","auto"),i.css("height","auto"),j&&j.length&&o.show(),w.showCloseButton&&a.show(),function(){if((w.enableEscapeButton||w.enableKeyboardNav)&&c(document).on("keydown.fb",function(t){27==t.keyCode&&w.enableEscapeButton?(t.preventDefault(),c.fancybox.close()):37!=t.keyCode&&39!=t.keyCode||!w.enableKeyboardNav||"INPUT"===t.target.tagName||"TEXTAREA"===t.target.tagName||"SELECT"===t.target.tagName||(t.preventDefault(),c.fancybox[37==t.keyCode?"prev":"next"]())}),!w.showNavArrows)return r.hide(),f.hide();(w.cyclic&&1<x.length||0!==y)&&r.show(),(w.cyclic&&1<x.length||y!=x.length-1)&&f.show()}(),w.hideOnContentClick&&h.on("click",c.fancybox.close),w.hideOnOverlayClick&&n.on("click",c.fancybox.close),c(window).on("resize.fb",c.fancybox.resize),w.centerOnScroll&&c(window).on("scroll.fb",c.fancybox.center),"iframe"==w.type&&c('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" '+(c.browser.msie?'allowtransparency="true""':"")+' scrolling="'+g.scrolling+'" src="'+w.href+'"></iframe>').appendTo(h),i.show(),k=!1,c.fancybox.center(),w.onComplete(x,y,w),L()},L=function(){var t;x.length-1>y&&void 0!==(t=x[y+1].href)&&t.match(I)&&((new Image).src=t),0<y&&void 0!==(t=x[y-1].href)&&t.match(I)&&((new Image).src=t)},q=function(t){var e={width:parseInt(l.width+(u.width-l.width)*t,10),height:parseInt(l.height+(u.height-l.height)*t,10),top:parseInt(l.top+(u.top-l.top)*t,10),left:parseInt(l.left+(u.left-l.left)*t,10)};void 0!==u.opacity&&(e.opacity=t<.5?.5:t),i.css(e),h.css({width:e.width-2*w.padding,height:e.height-M*t-2*w.padding})},z=function(){return[c(window).width()-2*w.margin,c(window).height()-2*w.margin,c(document).scrollLeft()+w.margin,c(document).scrollTop()+w.margin]},H=function(){var t,e=z(),n={},i=w.autoScale,a=2*w.padding;return-1<w.width.toString().indexOf("%")?n.width=parseInt(e[0]*parseFloat(w.width)/100,10):n.width=w.width+a,-1<w.height.toString().indexOf("%")?n.height=parseInt(e[1]*parseFloat(w.height)/100,10):n.height=w.height+a,i&&(n.width>e[0]||n.height>e[1])&&("image"==g.type||"swf"==g.type?(t=w.width/w.height,n.width>e[0]&&(n.width=e[0],n.height=parseInt((n.width-a)/t+a,10)),n.height>e[1]&&(n.height=e[1],n.width=parseInt((n.height-a)*t+a,10))):(n.width=Math.min(n.width,e[0]),n.height=Math.min(n.height,e[1]))),n.top=parseInt(Math.max(e[3]-20,e[3]+.5*(e[1]-n.height-40)),10),n.left=parseInt(Math.max(e[2]-20,e[2]+.5*(e[0]-n.width-40)),10),n},R=function(){var t,e,n,i,a=!!g.orig&&c(g.orig);return a&&a.length?((i=(n=a).offset()).top+=parseInt(n.css("paddingTop"),10)||0,i.left+=parseInt(n.css("paddingLeft"),10)||0,i.top+=parseInt(n.css("border-top-width"),10)||0,i.left+=parseInt(n.css("border-left-width"),10)||0,i.width=n.width(),i.height=n.height(),{width:(t=i).width+2*w.padding,height:t.height+2*w.padding,top:t.top-w.padding-20,left
19567:t.left-w.padding-20}):(e=z(),{width:2*w.padding,height:2*w.padding,top:parseInt(e[3]+.5*e[1],10),left:parseInt(e[2]+.5*e[0],10)})},K=function(){s.is(":visible")?(c("div",s).css("top",-40*C+"px"),C=(C+1)%12):clearInterval(t)};c.fn.fancybox=function(t){return c(this).length&&c(this).data("fancybox",c.extend({},t,c.metadata?c(this).metadata():{})).off("click.fb").on("click.fb",function(t){if(t.preventDefault(),!k){k=!0,c(this).trigger("blur"),b=[],p=0;var e=c(this).attr("data-fancybox-group")||"";e&&""!=e&&"nofollow"!==e?(b=c("a[data-fancybox-group="+e+"], area[data-fancybox-group="+e+"]"),p=b.index(this)):b.push(this),B()}}),this},c.fancybox=function(t){var e;if(!k){if(k=!0,e=void 0!==arguments[1]?arguments[1]:{},b=[],p=parseInt(e.index,10)||0,c.isArray(t)){for(var n=0,i=t.length;n<i;n++)"object"==typeof t[n]?c(t[n]).data("fancybox",c.extend({},e,t[n])):t[n]=c({}).data("fancybox",c.extend({content:t[n]},e));b=jQuery.merge(b,t)}else"object"==typeof t?c(t).data("fancybox",c.extend({},e,t)):t=c({}).data("fancybox",c.extend({content:t},e)),b.push(t);(p>b.length||p<0)&&(p=0),B()}},c.fancybox.showActivity=function(){clearInterval(t),s.show(),t=setInterval(K,66)},c.fancybox.hideActivity=function(){s.hide()},c.fancybox.next=function(){return c.fancybox.pos(y+1)},c.fancybox.prev=function(){return c.fancybox.pos(y-1)},c.fancybox.pos=function(t){k||(t=parseInt(t),b=x,-1<t&&t<x.length?(p=t,B()):w.cyclic&&1<x.length&&(p=t>=x.length?0:x.length-1,B()))},c.fancybox.cancel=function(){k||(k=!0,c(".fancybox-inline-tmp").trigger("fancybox-cancel"),Q(),g.onCancel(b,p,g),k=!1)},c.fancybox.close=function(){if(!k&&!i.is(":hidden"))if(k=!0,w&&!1===w.onCleanup(x,y,w))k=!1;else if(Q(),c(a.add(r).add(f)).hide(),c(h.add(n)).off(),c(window).off("resize.fb scroll.fb"),c(document).off("keydown.fb"),h.find("iframe").attr("src",P&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank"),"inside"!==w.titlePosition&&o.empty(),i.stop(),"elastic"==w.transitionOut){l=R();var t=i.position();u={top:t.top,left:t.left,width:i.width(),height:i.height()},w.opacity&&(u.opacity=1),o.empty().hide(),S.prop=1,c(S).animate({prop:0},{duration:w.speedOut,easing:w.easingOut,step:q,complete:e})}else i.fadeOut("none"==w.transitionOut?0:w.speedOut,e);function e(){n.fadeOut("fast"),o.empty().hide(),i.hide(),c(".fancybox-inline-tmp").trigger("fancybox-cleanup"),h.empty(),w.onClosed(x,y,w),x=g=[],y=p=0,w=g={},k=!1}},c.fancybox.resize=function(){n.is(":visible")&&n.css("height",c(document).height()),c.fancybox.center(!0)},c.fancybox.center=function(){var t,e;k||(e=!0===arguments[0]?1:0,t=z(),!e&&(i.width()>t[0]||i.height()>t[1])||i.stop().animate({top:parseInt(Math.max(t[3]-20,t[3]+.5*(t[1]-h.height()-40)-w.padding)),left:parseInt(Math.max(t[2]-20,t[2]+.5*(t[0]-h.width()-40)-w.padding))},"number"==typeof arguments[0]?arguments[0]:200))},c.fancybox.init=function(){c("#fancybox-wrap").length||(c("body").append(d=c('<div id="fancybox-tmp"></div>'),s=c('<div id="fancybox-loading"><div></div></div>'),n=c('<div id="fancybox-overlay"></div>'),i=c('<div id="fancybox-wrap"></div>')),(e=c('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(i)).append(h=c('<div id="fancybox-content"></div>'),a=c('<a id="fancybox-close"></a>'),o=c('<div id="fancybox-title"></div>'),r=c('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span><span class="zp-sronly">Voriges Bild (prev. image)</span></a>'),f=c('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span><span class="zp-sronly">Nächstes Bild (next image)</span></a>')),a.on("click", c.fancybox.close),s.on("click", c.fancybox.cancel),r.on("click", function(t){t.preventDefault(),c.fancybox.prev()}),f.on("click", function(t){t.preventDefault(),c.fancybox.next()}),c.fn.mousewheel&&i.on("mousewheel.fb",function(t,e){k?t.preventDefault():0!=c(t.target).get(0).clientHeight&&c(t.target).get(0).scrollHeight!==c(t.target).get(0).clientHeight||(t.preventDefault(),c.fancybox[0<e?"prev":"next"]())}),c.support.opacity||i.addClass("fancybox-ie"),P&&(s.addClass("fancybox-ie6"),i.addClass("fancybox-ie6"),c('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(e)))},c.fn.fancybox.defaults={padding:10,margin:40,opacity:!1,modal:!1,cyclic:!1,scrolling:"auto",width:560,height:340,autoScale:!0,autoDimensions:!0,centerOnScroll:!1,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:!0,hideOnContentClick:!1,overlayShow:!0,overlayOpacity:.7,overlayColor:"#777",titleShow:!0,titlePosition:"float",titleFormat:null,titleFromAlt:!1,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:!0,showNavArrows:!0,enableEscapeButton:!0,enableKeyboardNav:!0,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}},c(document).ready(function(){c.fancybox.init()})}($z),jQuery.easing.jswing=jQuery.easing.swing,jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(t,e,n,i,a){return jQuery.easing[jQuery.easing.def](t,e,n,i,a)},easeInQuad:function(t,e,n,i,a){return i*(e/=a)*e+n},easeOutQuad:function(t,e,n,i,a){return-i*(e/=a)*(e-2)+n},easeInOutQuad:function(t,e,n,i,a){return(e/=a/2)<1?i/2*e*e+n:-i/2*(--e*(e-2)-1)+n},easeInCubic:function(t,e,n,i,a){return i*(e/=a)*e*e+n},easeOutCubic:function(t,e,n,i,a){return i*((e=e/a-1)*e*e+1)+n},easeInOutCubic:function(t,e,n,i,a){return(e/=a/2)<1?i/2*e*e*e+n:i/2*((e-=2)*e*e+2)+n},easeInQuart:function(t,e,n,i,a){return i*(e/=a)*e*e*e+n},easeOutQuart:function(t,e,n,i,a){return-i*((e=e/a-1)*e*e*e-1)+n},easeInOutQuart:function(t,e,n,i,a){return(e/=a/2)<1?i/2*e*e*e*e+n:-i/2*((e-=2)*e*e*e-2)+n},easeInQuint:function(t,e,n,i,a){return i*(e/=a)*e*e*e*e+n},easeOutQuint:function(t,e,n,i,a){return i*((e=e/a-1)*e*e*e*e+1)+n},easeInOutQuint:function(t,e,n,i,a){return(e/=a/2)<1?i/2*e*e*e*e*e+n:i/2*((e-=2)*e*e*e*e+2)+n},easeInSine:function(t,e,n,i,a){return-i*Math.cos(e/a*(Math.PI/2))+i+n},easeOutSine:function(t,e,n,i,a){return i*Math.sin(e/a*(Math.PI/2))+n},easeInOutSine:function(t,e,n,i,a){return-i/2*(Math.cos(Math.PI*e/a)-1)+n},easeInExpo:function(t,e,n,i,a){return 0==e?n:i*Math.pow(2,10*(e/a-1))+n},easeOutExpo:function(t,e,n,i,a){return e==a?n+i:i*(1-Math.pow(2,-10*e/a))+n},easeInOutExpo:function(t,e,n,i,a){return 0==e?n:e==a?n+i:(e/=a/2)<1?i/2*Math.pow(2,10*(e-1))+n:i/2*(2-Math.pow(2,-10*--e))+n},easeInCirc:function(t,e,n,i,a){return-i*(Math.sqrt(1-(e/=a)*e)-1)+n},easeOutCirc:function(t,e,n,i,a){return i*Math.sqrt(1-(e=e/a-1)*e)+n},easeInOutCirc:function(t,e,n,i,a){return(e/=a/2)<1?-i/2*(Math.sqrt(1-e*e)-1)+n:i/2*(Math.sqrt(1-(e-=2)*e)+1)+n},easeInElastic:function(t,e,n,i,a){var o=1.70158,r=0,c=i;if(0==e)return n;if(1==(e/=a))return n+i;if(r||(r=.3*a),c<Math.abs(i)){c=i;o=r/4}else o=r/(2*Math.PI)*Math.asin(i/c);return-c*Math.pow(2,10*(e-=1))*Math.sin((e*a-o)*(2*Math.PI)/r)+n},easeOutElastic:function(t,e,n,i,a){var o=1.70158,r=0,c=i;if(0==e)return n;if(1==(e/=a))return n+i;if(r||(r=.3*a),c<Math.abs(i)){c=i;o=r/4}else o=r/(2*Math.PI)*Math.asin(i/c);return c*Math.pow(2,-10*e)*Math.sin((e*a-o)*(2*Math.PI)/r)+i+n},easeInOutElastic:function(t,e,n,i,a){var o=1.70158,r=0,c=i;if(0==e)return n;if(2==(e/=a/2))return n+i;if(r||(r=a*(.3*1.5)),c<Math.abs(i)){c=i;o=r/4}else o=r/(2*Math.PI)*Math.asin(i/c);return e<1?c*Math.pow(2,10*(e-=1))*Math.sin((e*a-o)*(2*Math.PI)/r)*-.5+n:c*Math.pow(2,-10*(e-=1))*Math.sin((e*a-o)*(2*Math.PI)/r)*.5+i+n},easeInBack:function(t,e,n,i,a,o){return null==o&&(o=1.70158),i*(e/=a)*e*((o+1)*e-o)+n},easeOutBack:function(t,e,n,i,a,o){return null==o&&(o=1.70158),i*((e=e/a-1)*e*((o+1)*e+o)+1)+n},easeInOutBack:function(t,e,n,i,a,o){return null==o&&(o=1.70158),(e/=a/2)<1?i/2*(e*e*((1+(o*=1.525))*e-o))+n:i/2*((e-=2)*e*((1+(o*=1.525))*e+o)+2)+n},easeInBounce:function(t,e,n,i,a){return i-jQuery.easing.easeOutBounce(t,a-e,0,i,a)+n},easeOutBounce:function(t,e,n,i,a){return(e/=a)<1/2.75?i*(7.5625*e*e)+n:e<2/2.75?i*(7.5625*(e-=1.5/2.75)*e+.75)+n:e<2.5/2.75?i*(7.5625*(e-=2.25/2.75)*e+.9375)+n:i*(7.5625*(e-=2.625/2.75)*e+.984375)+n},easeInOutBounce:function(t,e,n,i,a){return e<a/2?.5*jQuery.easing.easeInBounce(t,2*e,0,i,a)+n:.5*jQuery.easing.easeOutBounce(t,2*e-a,0,i,a)+.5*i+n}});
19568/**
19569 * what-input - A global utility for tracking the current input method (mouse, keyboard or touch).
19570 * @version v5.2.12
19571 * @link https://github.com/ten1seven/what-input
19572 * @license MIT
19573 */
19574!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("whatInput",[],t):"object"==typeof exports?exp
vendor: 4,367 bytes, line 19574
19574orts.whatInput=t():e.whatInput=t()}(this,function(){return i={},n.m=o=[function(e,t){"use strict";e.exports=function(){if("undefined"==typeof document||"undefined"==typeof window)return{ask:function(){return"initial"},element:function(){return null},ignoreKeys:function(){},specificKeys:function(){},registerOnChange:function(){},unRegisterOnChange:function(){}};var t=document.documentElement,n=null,u="initial",s=u,o=Date.now(),i=!1,d=["button","input","select","textarea"],r=[],c=[16,17,18,91,93],w=[],p={keydown:"keyboard",keyup:"keyboard",mousedown:"mouse",mousemove:"mouse",MSPointerDown:"pointer",MSPointerMove:"pointer",pointerdown:"pointer",pointermove:"pointer",touchstart:"touch",touchend:"touch"},a=!1,f={x:null,y:null},l={2:"touch",3:"touch",4:"mouse"},m=!1;try{var e=Object.defineProperty({},"passive",{get:function(){m=!0}});window.addEventListener("test",null,e)}catch(e){}var h=function(){var e=!m||{passive:!0,capture:!0};document.addEventListener("DOMContentLoaded",v,!0),window.PointerEvent?(window.addEventListener("pointerdown",y,!0),window.addEventListener("pointermove",E,!0)):window.MSPointerEvent?(window.addEventListener("MSPointerDown",y,!0),window.addEventListener("MSPointerMove",E,!0)):(window.addEventListener("mousedown",y,!0),window.addEventListener("mousemove",E,!0),"ontouchstart"in window&&(window.addEventListener("touchstart",y,e),window.addEventListener("touchend",y,!0))),window.addEventListener(O(),E,e),window.addEventListener("keydown",y,!0),window.addEventListener("keyup",y,!0),window.addEventListener("focusin",L,!0),window.addEventListener("focusout",b,!0)},v=function(){if(i=!("false"===t.getAttribute("data-whatpersist")||"false"===document.body.getAttribute("data-whatpersist")))try{window.sessionStorage.getItem("what-input")&&(u=window.sessionStorage.getItem("what-input")),window.sessionStorage.getItem("what-intent")&&(s=window.sessionStorage.getItem("what-intent"))}catch(e){}g("input"),g("intent")},y=function(e){var t=e.which,n=p[e.type];"pointer"===n&&(n=S(e));var o=!w.length&&-1===c.indexOf(t),i=w.length&&-1!==w.indexOf(t),r="keyboard"===n&&t&&(o||i)||"mouse"===n||"touch"===n;if(M(n)&&(r=!1),r&&u!==n&&(x("input",u=n),g("input")),r&&s!==n){var a=document.activeElement;a&&a.nodeName&&(-1===d.indexOf(a.nodeName.toLowerCase())||"button"===a.nodeName.toLowerCase()&&!C(a,"form"))&&(x("intent",s=n),g("intent"))}},g=function(e){t.setAttribute("data-what"+e,"input"===e?u:s),k(e)},E=function(e){var t=p[e.type];"pointer"===t&&(t=S(e)),A(e),(!a&&!M(t)||a&&"wheel"===e.type||"mousewheel"===e.type||"DOMMouseScroll"===e.type)&&s!==t&&(x("intent",s=t),g("intent"))},L=function(e){e.target.nodeName?(n=e.target.nodeName.toLowerCase(),t.setAttribute("data-whatelement",n),e.target.classList&&e.target.classList.length&&t.setAttribute("data-whatclasses",e.target.classList.toString().replace(" ",","))):b()},b=function(){n=null,t.removeAttribute("data-whatelement"),t.removeAttribute("data-whatclasses")},x=function(e,t){if(i)try{window.sessionStorage.setItem("what-"+e,t)}catch(e){}},S=function(e){return"number"==typeof e.pointerType?l[e.pointerType]:"pen"===e.pointerType?"touch":e.pointerType},M=function(e){var t=Date.now(),n="mouse"===e&&"touch"===u&&t-o<200;return o=t,n},O=function(){return"onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll"},k=function(e){for(var t=0,n=r.length;t<n;t++)r[t].type===e&&r[t].fn.call(void 0,"input"===e?u:s)},A=function(e){f.x!==e.screenX||f.y!==e.screenY?(a=!1,f.x=e.screenX,f.y=e.screenY):a=!0},C=function(e,t){var n=window.Element.prototype;if(n.matches||(n.matches=n.msMatchesSelector||n.webkitMatchesSelector),n.closest)return e.closest(t);do{if(e.matches(t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null};return"addEventListener"in window&&Array.prototype.indexOf&&(p[O()]="mouse",h()),{ask:function(e){return"intent"===e?s:u},element:function(){return n},ignoreKeys:function(e){c=e},specificKeys:function(e){w=e},registerOnChange:function(e,t){r.push({fn:e,type:t||"input"})},unRegisterOnChange:function(e){var t=function(e){for(var t=0,n=r.length;t<n;t++)if(r[t].fn===e)return t}(e);!t&&0!==t||r.splice(t,1)},clearStorage:function(){window.sessionStorage.clear()}}}()}],n.c=i,n.p="",n(0);function n(e){if(i[e])return i[e].exports;var t=i[e]={exports:{},id:e,loaded:!1};
19574return o[e].call(t.exports,t,t.exports,n),t.loaded=!0,t.exports}var o,i});

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.