CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
Path: blob/main/_static/jquery-3.2.1.js
Views: 494
/*!1* jQuery JavaScript Library v3.2.12* https://jquery.com/3*4* Includes Sizzle.js5* https://sizzlejs.com/6*7* Copyright JS Foundation and other contributors8* Released under the MIT license9* https://jquery.org/license10*11* Date: 2017-03-20T18:59Z12*/13( function( global, factory ) {1415"use strict";1617if ( typeof module === "object" && typeof module.exports === "object" ) {1819// For CommonJS and CommonJS-like environments where a proper `window`20// is present, execute the factory and get jQuery.21// For environments that do not have a `window` with a `document`22// (such as Node.js), expose a factory as module.exports.23// This accentuates the need for the creation of a real `window`.24// e.g. var jQuery = require("jquery")(window);25// See ticket #14549 for more info.26module.exports = global.document ?27factory( global, true ) :28function( w ) {29if ( !w.document ) {30throw new Error( "jQuery requires a window with a document" );31}32return factory( w );33};34} else {35factory( global );36}3738// Pass this if window is not defined yet39} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) {4041// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.142// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode43// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common44// enough that all such attempts are guarded in a try block.45"use strict";4647var arr = [];4849var document = window.document;5051var getProto = Object.getPrototypeOf;5253var slice = arr.slice;5455var concat = arr.concat;5657var push = arr.push;5859var indexOf = arr.indexOf;6061var class2type = {};6263var toString = class2type.toString;6465var hasOwn = class2type.hasOwnProperty;6667var fnToString = hasOwn.toString;6869var ObjectFunctionString = fnToString.call( Object );7071var support = {};72737475function DOMEval( code, doc ) {76doc = doc || document;7778var script = doc.createElement( "script" );7980script.text = code;81doc.head.appendChild( script ).parentNode.removeChild( script );82}83/* global Symbol */84// Defining this global in .eslintrc.json would create a danger of using the global85// unguarded in another place, it seems safer to define global only for this module86878889var90version = "3.2.1",9192// Define a local copy of jQuery93jQuery = function( selector, context ) {9495// The jQuery object is actually just the init constructor 'enhanced'96// Need init if jQuery is called (just allow error to be thrown if not included)97return new jQuery.fn.init( selector, context );98},99100// Support: Android <=4.0 only101// Make sure we trim BOM and NBSP102rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,103104// Matches dashed string for camelizing105rmsPrefix = /^-ms-/,106rdashAlpha = /-([a-z])/g,107108// Used by jQuery.camelCase as callback to replace()109fcamelCase = function( all, letter ) {110return letter.toUpperCase();111};112113jQuery.fn = jQuery.prototype = {114115// The current version of jQuery being used116jquery: version,117118constructor: jQuery,119120// The default length of a jQuery object is 0121length: 0,122123toArray: function() {124return slice.call( this );125},126127// Get the Nth element in the matched element set OR128// Get the whole matched element set as a clean array129get: function( num ) {130131// Return all the elements in a clean array132if ( num == null ) {133return slice.call( this );134}135136// Return just the one element from the set137return num < 0 ? this[ num + this.length ] : this[ num ];138},139140// Take an array of elements and push it onto the stack141// (returning the new matched element set)142pushStack: function( elems ) {143144// Build a new jQuery matched element set145var ret = jQuery.merge( this.constructor(), elems );146147// Add the old object onto the stack (as a reference)148ret.prevObject = this;149150// Return the newly-formed element set151return ret;152},153154// Execute a callback for every element in the matched set.155each: function( callback ) {156return jQuery.each( this, callback );157},158159map: function( callback ) {160return this.pushStack( jQuery.map( this, function( elem, i ) {161return callback.call( elem, i, elem );162} ) );163},164165slice: function() {166return this.pushStack( slice.apply( this, arguments ) );167},168169first: function() {170return this.eq( 0 );171},172173last: function() {174return this.eq( -1 );175},176177eq: function( i ) {178var len = this.length,179j = +i + ( i < 0 ? len : 0 );180return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );181},182183end: function() {184return this.prevObject || this.constructor();185},186187// For internal use only.188// Behaves like an Array's method, not like a jQuery method.189push: push,190sort: arr.sort,191splice: arr.splice192};193194jQuery.extend = jQuery.fn.extend = function() {195var options, name, src, copy, copyIsArray, clone,196target = arguments[ 0 ] || {},197i = 1,198length = arguments.length,199deep = false;200201// Handle a deep copy situation202if ( typeof target === "boolean" ) {203deep = target;204205// Skip the boolean and the target206target = arguments[ i ] || {};207i++;208}209210// Handle case when target is a string or something (possible in deep copy)211if ( typeof target !== "object" && !jQuery.isFunction( target ) ) {212target = {};213}214215// Extend jQuery itself if only one argument is passed216if ( i === length ) {217target = this;218i--;219}220221for ( ; i < length; i++ ) {222223// Only deal with non-null/undefined values224if ( ( options = arguments[ i ] ) != null ) {225226// Extend the base object227for ( name in options ) {228src = target[ name ];229copy = options[ name ];230231// Prevent never-ending loop232if ( target === copy ) {233continue;234}235236// Recurse if we're merging plain objects or arrays237if ( deep && copy && ( jQuery.isPlainObject( copy ) ||238( copyIsArray = Array.isArray( copy ) ) ) ) {239240if ( copyIsArray ) {241copyIsArray = false;242clone = src && Array.isArray( src ) ? src : [];243244} else {245clone = src && jQuery.isPlainObject( src ) ? src : {};246}247248// Never move original objects, clone them249target[ name ] = jQuery.extend( deep, clone, copy );250251// Don't bring in undefined values252} else if ( copy !== undefined ) {253target[ name ] = copy;254}255}256}257}258259// Return the modified object260return target;261};262263jQuery.extend( {264265// Unique for each copy of jQuery on the page266expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),267268// Assume jQuery is ready without the ready module269isReady: true,270271error: function( msg ) {272throw new Error( msg );273},274275noop: function() {},276277isFunction: function( obj ) {278return jQuery.type( obj ) === "function";279},280281isWindow: function( obj ) {282return obj != null && obj === obj.window;283},284285isNumeric: function( obj ) {286287// As of jQuery 3.0, isNumeric is limited to288// strings and numbers (primitives or objects)289// that can be coerced to finite numbers (gh-2662)290var type = jQuery.type( obj );291return ( type === "number" || type === "string" ) &&292293// parseFloat NaNs numeric-cast false positives ("")294// ...but misinterprets leading-number strings, particularly hex literals ("0x...")295// subtraction forces infinities to NaN296!isNaN( obj - parseFloat( obj ) );297},298299isPlainObject: function( obj ) {300var proto, Ctor;301302// Detect obvious negatives303// Use toString instead of jQuery.type to catch host objects304if ( !obj || toString.call( obj ) !== "[object Object]" ) {305return false;306}307308proto = getProto( obj );309310// Objects with no prototype (e.g., `Object.create( null )`) are plain311if ( !proto ) {312return true;313}314315// Objects with prototype are plain iff they were constructed by a global Object function316Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;317return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString;318},319320isEmptyObject: function( obj ) {321322/* eslint-disable no-unused-vars */323// See https://github.com/eslint/eslint/issues/6125324var name;325326for ( name in obj ) {327return false;328}329return true;330},331332type: function( obj ) {333if ( obj == null ) {334return obj + "";335}336337// Support: Android <=2.3 only (functionish RegExp)338return typeof obj === "object" || typeof obj === "function" ?339class2type[ toString.call( obj ) ] || "object" :340typeof obj;341},342343// Evaluates a script in a global context344globalEval: function( code ) {345DOMEval( code );346},347348// Convert dashed to camelCase; used by the css and data modules349// Support: IE <=9 - 11, Edge 12 - 13350// Microsoft forgot to hump their vendor prefix (#9572)351camelCase: function( string ) {352return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );353},354355each: function( obj, callback ) {356var length, i = 0;357358if ( isArrayLike( obj ) ) {359length = obj.length;360for ( ; i < length; i++ ) {361if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {362break;363}364}365} else {366for ( i in obj ) {367if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {368break;369}370}371}372373return obj;374},375376// Support: Android <=4.0 only377trim: function( text ) {378return text == null ?379"" :380( text + "" ).replace( rtrim, "" );381},382383// results is for internal usage only384makeArray: function( arr, results ) {385var ret = results || [];386387if ( arr != null ) {388if ( isArrayLike( Object( arr ) ) ) {389jQuery.merge( ret,390typeof arr === "string" ?391[ arr ] : arr392);393} else {394push.call( ret, arr );395}396}397398return ret;399},400401inArray: function( elem, arr, i ) {402return arr == null ? -1 : indexOf.call( arr, elem, i );403},404405// Support: Android <=4.0 only, PhantomJS 1 only406// push.apply(_, arraylike) throws on ancient WebKit407merge: function( first, second ) {408var len = +second.length,409j = 0,410i = first.length;411412for ( ; j < len; j++ ) {413first[ i++ ] = second[ j ];414}415416first.length = i;417418return first;419},420421grep: function( elems, callback, invert ) {422var callbackInverse,423matches = [],424i = 0,425length = elems.length,426callbackExpect = !invert;427428// Go through the array, only saving the items429// that pass the validator function430for ( ; i < length; i++ ) {431callbackInverse = !callback( elems[ i ], i );432if ( callbackInverse !== callbackExpect ) {433matches.push( elems[ i ] );434}435}436437return matches;438},439440// arg is for internal usage only441map: function( elems, callback, arg ) {442var length, value,443i = 0,444ret = [];445446// Go through the array, translating each of the items to their new values447if ( isArrayLike( elems ) ) {448length = elems.length;449for ( ; i < length; i++ ) {450value = callback( elems[ i ], i, arg );451452if ( value != null ) {453ret.push( value );454}455}456457// Go through every key on the object,458} else {459for ( i in elems ) {460value = callback( elems[ i ], i, arg );461462if ( value != null ) {463ret.push( value );464}465}466}467468// Flatten any nested arrays469return concat.apply( [], ret );470},471472// A global GUID counter for objects473guid: 1,474475// Bind a function to a context, optionally partially applying any476// arguments.477proxy: function( fn, context ) {478var tmp, args, proxy;479480if ( typeof context === "string" ) {481tmp = fn[ context ];482context = fn;483fn = tmp;484}485486// Quick check to determine if target is callable, in the spec487// this throws a TypeError, but we will just return undefined.488if ( !jQuery.isFunction( fn ) ) {489return undefined;490}491492// Simulated bind493args = slice.call( arguments, 2 );494proxy = function() {495return fn.apply( context || this, args.concat( slice.call( arguments ) ) );496};497498// Set the guid of unique handler to the same of original handler, so it can be removed499proxy.guid = fn.guid = fn.guid || jQuery.guid++;500501return proxy;502},503504now: Date.now,505506// jQuery.support is not used in Core but other projects attach their507// properties to it so it needs to exist.508support: support509} );510511if ( typeof Symbol === "function" ) {512jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];513}514515// Populate the class2type map516jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),517function( i, name ) {518class2type[ "[object " + name + "]" ] = name.toLowerCase();519} );520521function isArrayLike( obj ) {522523// Support: real iOS 8.2 only (not reproducible in simulator)524// `in` check used to prevent JIT error (gh-2145)525// hasOwn isn't used here due to false negatives526// regarding Nodelist length in IE527var length = !!obj && "length" in obj && obj.length,528type = jQuery.type( obj );529530if ( type === "function" || jQuery.isWindow( obj ) ) {531return false;532}533534return type === "array" || length === 0 ||535typeof length === "number" && length > 0 && ( length - 1 ) in obj;536}537var Sizzle =538/*!539* Sizzle CSS Selector Engine v2.3.3540* https://sizzlejs.com/541*542* Copyright jQuery Foundation and other contributors543* Released under the MIT license544* https://jquery.org/license545*546* Date: 2016-08-08547*/548(function( window ) {549550var i,551support,552Expr,553getText,554isXML,555tokenize,556compile,557select,558outermostContext,559sortInput,560hasDuplicate,561562// Local document vars563setDocument,564document,565docElem,566documentIsHTML,567rbuggyQSA,568rbuggyMatches,569matches,570contains,571572// Instance-specific data573expando = "sizzle" + 1 * new Date(),574preferredDoc = window.document,575dirruns = 0,576done = 0,577classCache = createCache(),578tokenCache = createCache(),579compilerCache = createCache(),580sortOrder = function( a, b ) {581if ( a === b ) {582hasDuplicate = true;583}584return 0;585},586587// Instance methods588hasOwn = ({}).hasOwnProperty,589arr = [],590pop = arr.pop,591push_native = arr.push,592push = arr.push,593slice = arr.slice,594// Use a stripped-down indexOf as it's faster than native595// https://jsperf.com/thor-indexof-vs-for/5596indexOf = function( list, elem ) {597var i = 0,598len = list.length;599for ( ; i < len; i++ ) {600if ( list[i] === elem ) {601return i;602}603}604return -1;605},606607booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",608609// Regular expressions610611// https://www.w3.org/TR/css3-selectors/#whitespace612whitespace = "[\\x20\\t\\r\\n\\f]",613614// https://www.w3.org/TR/CSS21/syndata.html#value-def-identifier615identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+",616617// Attribute selectors: https://www.w3.org/TR/selectors/#attribute-selectors618attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +619// Operator (capture 2)620"*([*^$|!~]?=)" + whitespace +621// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"622"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +623"*\\]",624625pseudos = ":(" + identifier + ")(?:\\((" +626// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:627// 1. quoted (capture 3; capture 4 or capture 5)628"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +629// 2. simple (capture 6)630"((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +631// 3. anything else (capture 2)632".*" +633")\\)|)",634635// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter636rwhitespace = new RegExp( whitespace + "+", "g" ),637rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),638639rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),640rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),641642rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),643644rpseudo = new RegExp( pseudos ),645ridentifier = new RegExp( "^" + identifier + "$" ),646647matchExpr = {648"ID": new RegExp( "^#(" + identifier + ")" ),649"CLASS": new RegExp( "^\\.(" + identifier + ")" ),650"TAG": new RegExp( "^(" + identifier + "|[*])" ),651"ATTR": new RegExp( "^" + attributes ),652"PSEUDO": new RegExp( "^" + pseudos ),653"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +654"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +655"*(\\d+)|))" + whitespace + "*\\)|)", "i" ),656"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),657// For use in libraries implementing .is()658// We use this for POS matching in `select`659"needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +660whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )661},662663rinputs = /^(?:input|select|textarea|button)$/i,664rheader = /^h\d$/i,665666rnative = /^[^{]+\{\s*\[native \w/,667668// Easily-parseable/retrievable ID or TAG or CLASS selectors669rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,670671rsibling = /[+~]/,672673// CSS escapes674// https://www.w3.org/TR/CSS21/syndata.html#escaped-characters675runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),676funescape = function( _, escaped, escapedWhitespace ) {677var high = "0x" + escaped - 0x10000;678// NaN means non-codepoint679// Support: Firefox<24680// Workaround erroneous numeric interpretation of +"0x"681return high !== high || escapedWhitespace ?682escaped :683high < 0 ?684// BMP codepoint685String.fromCharCode( high + 0x10000 ) :686// Supplemental Plane codepoint (surrogate pair)687String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );688},689690// CSS string/identifier serialization691// https://drafts.csswg.org/cssom/#common-serializing-idioms692rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,693fcssescape = function( ch, asCodePoint ) {694if ( asCodePoint ) {695696// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER697if ( ch === "\0" ) {698return "\uFFFD";699}700701// Control characters and (dependent upon position) numbers get escaped as code points702return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";703}704705// Other potentially-special ASCII characters get backslash-escaped706return "\\" + ch;707},708709// Used for iframes710// See setDocument()711// Removing the function wrapper causes a "Permission Denied"712// error in IE713unloadHandler = function() {714setDocument();715},716717disabledAncestor = addCombinator(718function( elem ) {719return elem.disabled === true && ("form" in elem || "label" in elem);720},721{ dir: "parentNode", next: "legend" }722);723724// Optimize for push.apply( _, NodeList )725try {726push.apply(727(arr = slice.call( preferredDoc.childNodes )),728preferredDoc.childNodes729);730// Support: Android<4.0731// Detect silently failing push.apply732arr[ preferredDoc.childNodes.length ].nodeType;733} catch ( e ) {734push = { apply: arr.length ?735736// Leverage slice if possible737function( target, els ) {738push_native.apply( target, slice.call(els) );739} :740741// Support: IE<9742// Otherwise append directly743function( target, els ) {744var j = target.length,745i = 0;746// Can't trust NodeList.length747while ( (target[j++] = els[i++]) ) {}748target.length = j - 1;749}750};751}752753function Sizzle( selector, context, results, seed ) {754var m, i, elem, nid, match, groups, newSelector,755newContext = context && context.ownerDocument,756757// nodeType defaults to 9, since context defaults to document758nodeType = context ? context.nodeType : 9;759760results = results || [];761762// Return early from calls with invalid selector or context763if ( typeof selector !== "string" || !selector ||764nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {765766return results;767}768769// Try to shortcut find operations (as opposed to filters) in HTML documents770if ( !seed ) {771772if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {773setDocument( context );774}775context = context || document;776777if ( documentIsHTML ) {778779// If the selector is sufficiently simple, try using a "get*By*" DOM method780// (excepting DocumentFragment context, where the methods don't exist)781if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {782783// ID selector784if ( (m = match[1]) ) {785786// Document context787if ( nodeType === 9 ) {788if ( (elem = context.getElementById( m )) ) {789790// Support: IE, Opera, Webkit791// TODO: identify versions792// getElementById can match elements by name instead of ID793if ( elem.id === m ) {794results.push( elem );795return results;796}797} else {798return results;799}800801// Element context802} else {803804// Support: IE, Opera, Webkit805// TODO: identify versions806// getElementById can match elements by name instead of ID807if ( newContext && (elem = newContext.getElementById( m )) &&808contains( context, elem ) &&809elem.id === m ) {810811results.push( elem );812return results;813}814}815816// Type selector817} else if ( match[2] ) {818push.apply( results, context.getElementsByTagName( selector ) );819return results;820821// Class selector822} else if ( (m = match[3]) && support.getElementsByClassName &&823context.getElementsByClassName ) {824825push.apply( results, context.getElementsByClassName( m ) );826return results;827}828}829830// Take advantage of querySelectorAll831if ( support.qsa &&832!compilerCache[ selector + " " ] &&833(!rbuggyQSA || !rbuggyQSA.test( selector )) ) {834835if ( nodeType !== 1 ) {836newContext = context;837newSelector = selector;838839// qSA looks outside Element context, which is not what we want840// Thanks to Andrew Dupont for this workaround technique841// Support: IE <=8842// Exclude object elements843} else if ( context.nodeName.toLowerCase() !== "object" ) {844845// Capture the context ID, setting it first if necessary846if ( (nid = context.getAttribute( "id" )) ) {847nid = nid.replace( rcssescape, fcssescape );848} else {849context.setAttribute( "id", (nid = expando) );850}851852// Prefix every selector in the list853groups = tokenize( selector );854i = groups.length;855while ( i-- ) {856groups[i] = "#" + nid + " " + toSelector( groups[i] );857}858newSelector = groups.join( "," );859860// Expand context for sibling selectors861newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||862context;863}864865if ( newSelector ) {866try {867push.apply( results,868newContext.querySelectorAll( newSelector )869);870return results;871} catch ( qsaError ) {872} finally {873if ( nid === expando ) {874context.removeAttribute( "id" );875}876}877}878}879}880}881882// All others883return select( selector.replace( rtrim, "$1" ), context, results, seed );884}885886/**887* Create key-value caches of limited size888* @returns {function(string, object)} Returns the Object data after storing it on itself with889* property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)890* deleting the oldest entry891*/892function createCache() {893var keys = [];894895function cache( key, value ) {896// Use (key + " ") to avoid collision with native prototype properties (see Issue #157)897if ( keys.push( key + " " ) > Expr.cacheLength ) {898// Only keep the most recent entries899delete cache[ keys.shift() ];900}901return (cache[ key + " " ] = value);902}903return cache;904}905906/**907* Mark a function for special use by Sizzle908* @param {Function} fn The function to mark909*/910function markFunction( fn ) {911fn[ expando ] = true;912return fn;913}914915/**916* Support testing using an element917* @param {Function} fn Passed the created element and returns a boolean result918*/919function assert( fn ) {920var el = document.createElement("fieldset");921922try {923return !!fn( el );924} catch (e) {925return false;926} finally {927// Remove from its parent by default928if ( el.parentNode ) {929el.parentNode.removeChild( el );930}931// release memory in IE932el = null;933}934}935936/**937* Adds the same handler for all of the specified attrs938* @param {String} attrs Pipe-separated list of attributes939* @param {Function} handler The method that will be applied940*/941function addHandle( attrs, handler ) {942var arr = attrs.split("|"),943i = arr.length;944945while ( i-- ) {946Expr.attrHandle[ arr[i] ] = handler;947}948}949950/**951* Checks document order of two siblings952* @param {Element} a953* @param {Element} b954* @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b955*/956function siblingCheck( a, b ) {957var cur = b && a,958diff = cur && a.nodeType === 1 && b.nodeType === 1 &&959a.sourceIndex - b.sourceIndex;960961// Use IE sourceIndex if available on both nodes962if ( diff ) {963return diff;964}965966// Check if b follows a967if ( cur ) {968while ( (cur = cur.nextSibling) ) {969if ( cur === b ) {970return -1;971}972}973}974975return a ? 1 : -1;976}977978/**979* Returns a function to use in pseudos for input types980* @param {String} type981*/982function createInputPseudo( type ) {983return function( elem ) {984var name = elem.nodeName.toLowerCase();985return name === "input" && elem.type === type;986};987}988989/**990* Returns a function to use in pseudos for buttons991* @param {String} type992*/993function createButtonPseudo( type ) {994return function( elem ) {995var name = elem.nodeName.toLowerCase();996return (name === "input" || name === "button") && elem.type === type;997};998}9991000/**1001* Returns a function to use in pseudos for :enabled/:disabled1002* @param {Boolean} disabled true for :disabled; false for :enabled1003*/1004function createDisabledPseudo( disabled ) {10051006// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable1007return function( elem ) {10081009// Only certain elements can match :enabled or :disabled1010// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled1011// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled1012if ( "form" in elem ) {10131014// Check for inherited disabledness on relevant non-disabled elements:1015// * listed form-associated elements in a disabled fieldset1016// https://html.spec.whatwg.org/multipage/forms.html#category-listed1017// https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled1018// * option elements in a disabled optgroup1019// https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled1020// All such elements have a "form" property.1021if ( elem.parentNode && elem.disabled === false ) {10221023// Option elements defer to a parent optgroup if present1024if ( "label" in elem ) {1025if ( "label" in elem.parentNode ) {1026return elem.parentNode.disabled === disabled;1027} else {1028return elem.disabled === disabled;1029}1030}10311032// Support: IE 6 - 111033// Use the isDisabled shortcut property to check for disabled fieldset ancestors1034return elem.isDisabled === disabled ||10351036// Where there is no isDisabled, check manually1037/* jshint -W018 */1038elem.isDisabled !== !disabled &&1039disabledAncestor( elem ) === disabled;1040}10411042return elem.disabled === disabled;10431044// Try to winnow out elements that can't be disabled before trusting the disabled property.1045// Some victims get caught in our net (label, legend, menu, track), but it shouldn't1046// even exist on them, let alone have a boolean value.1047} else if ( "label" in elem ) {1048return elem.disabled === disabled;1049}10501051// Remaining elements are neither :enabled nor :disabled1052return false;1053};1054}10551056/**1057* Returns a function to use in pseudos for positionals1058* @param {Function} fn1059*/1060function createPositionalPseudo( fn ) {1061return markFunction(function( argument ) {1062argument = +argument;1063return markFunction(function( seed, matches ) {1064var j,1065matchIndexes = fn( [], seed.length, argument ),1066i = matchIndexes.length;10671068// Match elements found at the specified indexes1069while ( i-- ) {1070if ( seed[ (j = matchIndexes[i]) ] ) {1071seed[j] = !(matches[j] = seed[j]);1072}1073}1074});1075});1076}10771078/**1079* Checks a node for validity as a Sizzle context1080* @param {Element|Object=} context1081* @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value1082*/1083function testContext( context ) {1084return context && typeof context.getElementsByTagName !== "undefined" && context;1085}10861087// Expose support vars for convenience1088support = Sizzle.support = {};10891090/**1091* Detects XML nodes1092* @param {Element|Object} elem An element or a document1093* @returns {Boolean} True iff elem is a non-HTML XML node1094*/1095isXML = Sizzle.isXML = function( elem ) {1096// documentElement is verified for cases where it doesn't yet exist1097// (such as loading iframes in IE - #4833)1098var documentElement = elem && (elem.ownerDocument || elem).documentElement;1099return documentElement ? documentElement.nodeName !== "HTML" : false;1100};11011102/**1103* Sets document-related variables once based on the current document1104* @param {Element|Object} [doc] An element or document object to use to set the document1105* @returns {Object} Returns the current document1106*/1107setDocument = Sizzle.setDocument = function( node ) {1108var hasCompare, subWindow,1109doc = node ? node.ownerDocument || node : preferredDoc;11101111// Return early if doc is invalid or already selected1112if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {1113return document;1114}11151116// Update global variables1117document = doc;1118docElem = document.documentElement;1119documentIsHTML = !isXML( document );11201121// Support: IE 9-11, Edge1122// Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)1123if ( preferredDoc !== document &&1124(subWindow = document.defaultView) && subWindow.top !== subWindow ) {11251126// Support: IE 11, Edge1127if ( subWindow.addEventListener ) {1128subWindow.addEventListener( "unload", unloadHandler, false );11291130// Support: IE 9 - 10 only1131} else if ( subWindow.attachEvent ) {1132subWindow.attachEvent( "onunload", unloadHandler );1133}1134}11351136/* Attributes1137---------------------------------------------------------------------- */11381139// Support: IE<81140// Verify that getAttribute really returns attributes and not properties1141// (excepting IE8 booleans)1142support.attributes = assert(function( el ) {1143el.className = "i";1144return !el.getAttribute("className");1145});11461147/* getElement(s)By*1148---------------------------------------------------------------------- */11491150// Check if getElementsByTagName("*") returns only elements1151support.getElementsByTagName = assert(function( el ) {1152el.appendChild( document.createComment("") );1153return !el.getElementsByTagName("*").length;1154});11551156// Support: IE<91157support.getElementsByClassName = rnative.test( document.getElementsByClassName );11581159// Support: IE<101160// Check if getElementById returns elements by name1161// The broken getElementById methods don't pick up programmatically-set names,1162// so use a roundabout getElementsByName test1163support.getById = assert(function( el ) {1164docElem.appendChild( el ).id = expando;1165return !document.getElementsByName || !document.getElementsByName( expando ).length;1166});11671168// ID filter and find1169if ( support.getById ) {1170Expr.filter["ID"] = function( id ) {1171var attrId = id.replace( runescape, funescape );1172return function( elem ) {1173return elem.getAttribute("id") === attrId;1174};1175};1176Expr.find["ID"] = function( id, context ) {1177if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {1178var elem = context.getElementById( id );1179return elem ? [ elem ] : [];1180}1181};1182} else {1183Expr.filter["ID"] = function( id ) {1184var attrId = id.replace( runescape, funescape );1185return function( elem ) {1186var node = typeof elem.getAttributeNode !== "undefined" &&1187elem.getAttributeNode("id");1188return node && node.value === attrId;1189};1190};11911192// Support: IE 6 - 7 only1193// getElementById is not reliable as a find shortcut1194Expr.find["ID"] = function( id, context ) {1195if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {1196var node, i, elems,1197elem = context.getElementById( id );11981199if ( elem ) {12001201// Verify the id attribute1202node = elem.getAttributeNode("id");1203if ( node && node.value === id ) {1204return [ elem ];1205}12061207// Fall back on getElementsByName1208elems = context.getElementsByName( id );1209i = 0;1210while ( (elem = elems[i++]) ) {1211node = elem.getAttributeNode("id");1212if ( node && node.value === id ) {1213return [ elem ];1214}1215}1216}12171218return [];1219}1220};1221}12221223// Tag1224Expr.find["TAG"] = support.getElementsByTagName ?1225function( tag, context ) {1226if ( typeof context.getElementsByTagName !== "undefined" ) {1227return context.getElementsByTagName( tag );12281229// DocumentFragment nodes don't have gEBTN1230} else if ( support.qsa ) {1231return context.querySelectorAll( tag );1232}1233} :12341235function( tag, context ) {1236var elem,1237tmp = [],1238i = 0,1239// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too1240results = context.getElementsByTagName( tag );12411242// Filter out possible comments1243if ( tag === "*" ) {1244while ( (elem = results[i++]) ) {1245if ( elem.nodeType === 1 ) {1246tmp.push( elem );1247}1248}12491250return tmp;1251}1252return results;1253};12541255// Class1256Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {1257if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {1258return context.getElementsByClassName( className );1259}1260};12611262/* QSA/matchesSelector1263---------------------------------------------------------------------- */12641265// QSA and matchesSelector support12661267// matchesSelector(:active) reports false when true (IE9/Opera 11.5)1268rbuggyMatches = [];12691270// qSa(:focus) reports false when true (Chrome 21)1271// We allow this because of a bug in IE8/9 that throws an error1272// whenever `document.activeElement` is accessed on an iframe1273// So, we allow :focus to pass through QSA all the time to avoid the IE error1274// See https://bugs.jquery.com/ticket/133781275rbuggyQSA = [];12761277if ( (support.qsa = rnative.test( document.querySelectorAll )) ) {1278// Build QSA regex1279// Regex strategy adopted from Diego Perini1280assert(function( el ) {1281// Select is set to empty string on purpose1282// This is to test IE's treatment of not explicitly1283// setting a boolean content attribute,1284// since its presence should be enough1285// https://bugs.jquery.com/ticket/123591286docElem.appendChild( el ).innerHTML = "<a id='" + expando + "'></a>" +1287"<select id='" + expando + "-\r\\' msallowcapture=''>" +1288"<option selected=''></option></select>";12891290// Support: IE8, Opera 11-12.161291// Nothing should be selected when empty strings follow ^= or $= or *=1292// The test attribute must be unknown in Opera but "safe" for WinRT1293// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section1294if ( el.querySelectorAll("[msallowcapture^='']").length ) {1295rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );1296}12971298// Support: IE81299// Boolean attributes and "value" are not treated correctly1300if ( !el.querySelectorAll("[selected]").length ) {1301rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );1302}13031304// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+1305if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {1306rbuggyQSA.push("~=");1307}13081309// Webkit/Opera - :checked should return selected option elements1310// https://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked1311// IE8 throws error here and will not see later tests1312if ( !el.querySelectorAll(":checked").length ) {1313rbuggyQSA.push(":checked");1314}13151316// Support: Safari 8+, iOS 8+1317// https://bugs.webkit.org/show_bug.cgi?id=1368511318// In-page `selector#id sibling-combinator selector` fails1319if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {1320rbuggyQSA.push(".#.+[+~]");1321}1322});13231324assert(function( el ) {1325el.innerHTML = "<a href='' disabled='disabled'></a>" +1326"<select disabled='disabled'><option/></select>";13271328// Support: Windows 8 Native Apps1329// The type and name attributes are restricted during .innerHTML assignment1330var input = document.createElement("input");1331input.setAttribute( "type", "hidden" );1332el.appendChild( input ).setAttribute( "name", "D" );13331334// Support: IE81335// Enforce case-sensitivity of name attribute1336if ( el.querySelectorAll("[name=d]").length ) {1337rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );1338}13391340// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)1341// IE8 throws error here and will not see later tests1342if ( el.querySelectorAll(":enabled").length !== 2 ) {1343rbuggyQSA.push( ":enabled", ":disabled" );1344}13451346// Support: IE9-11+1347// IE's :disabled selector does not pick up the children of disabled fieldsets1348docElem.appendChild( el ).disabled = true;1349if ( el.querySelectorAll(":disabled").length !== 2 ) {1350rbuggyQSA.push( ":enabled", ":disabled" );1351}13521353// Opera 10-11 does not throw on post-comma invalid pseudos1354el.querySelectorAll("*,:x");1355rbuggyQSA.push(",.*:");1356});1357}13581359if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||1360docElem.webkitMatchesSelector ||1361docElem.mozMatchesSelector ||1362docElem.oMatchesSelector ||1363docElem.msMatchesSelector) )) ) {13641365assert(function( el ) {1366// Check to see if it's possible to do matchesSelector1367// on a disconnected node (IE 9)1368support.disconnectedMatch = matches.call( el, "*" );13691370// This should fail with an exception1371// Gecko does not error, returns false instead1372matches.call( el, "[s!='']:x" );1373rbuggyMatches.push( "!=", pseudos );1374});1375}13761377rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );1378rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );13791380/* Contains1381---------------------------------------------------------------------- */1382hasCompare = rnative.test( docElem.compareDocumentPosition );13831384// Element contains another1385// Purposefully self-exclusive1386// As in, an element does not contain itself1387contains = hasCompare || rnative.test( docElem.contains ) ?1388function( a, b ) {1389var adown = a.nodeType === 9 ? a.documentElement : a,1390bup = b && b.parentNode;1391return a === bup || !!( bup && bup.nodeType === 1 && (1392adown.contains ?1393adown.contains( bup ) :1394a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 161395));1396} :1397function( a, b ) {1398if ( b ) {1399while ( (b = b.parentNode) ) {1400if ( b === a ) {1401return true;1402}1403}1404}1405return false;1406};14071408/* Sorting1409---------------------------------------------------------------------- */14101411// Document order sorting1412sortOrder = hasCompare ?1413function( a, b ) {14141415// Flag for duplicate removal1416if ( a === b ) {1417hasDuplicate = true;1418return 0;1419}14201421// Sort on method existence if only one input has compareDocumentPosition1422var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;1423if ( compare ) {1424return compare;1425}14261427// Calculate position if both inputs belong to the same document1428compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?1429a.compareDocumentPosition( b ) :14301431// Otherwise we know they are disconnected14321;14331434// Disconnected nodes1435if ( compare & 1 ||1436(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {14371438// Choose the first element that is related to our preferred document1439if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {1440return -1;1441}1442if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {1443return 1;1444}14451446// Maintain original order1447return sortInput ?1448( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :14490;1450}14511452return compare & 4 ? -1 : 1;1453} :1454function( a, b ) {1455// Exit early if the nodes are identical1456if ( a === b ) {1457hasDuplicate = true;1458return 0;1459}14601461var cur,1462i = 0,1463aup = a.parentNode,1464bup = b.parentNode,1465ap = [ a ],1466bp = [ b ];14671468// Parentless nodes are either documents or disconnected1469if ( !aup || !bup ) {1470return a === document ? -1 :1471b === document ? 1 :1472aup ? -1 :1473bup ? 1 :1474sortInput ?1475( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :14760;14771478// If the nodes are siblings, we can do a quick check1479} else if ( aup === bup ) {1480return siblingCheck( a, b );1481}14821483// Otherwise we need full lists of their ancestors for comparison1484cur = a;1485while ( (cur = cur.parentNode) ) {1486ap.unshift( cur );1487}1488cur = b;1489while ( (cur = cur.parentNode) ) {1490bp.unshift( cur );1491}14921493// Walk down the tree looking for a discrepancy1494while ( ap[i] === bp[i] ) {1495i++;1496}14971498return i ?1499// Do a sibling check if the nodes have a common ancestor1500siblingCheck( ap[i], bp[i] ) :15011502// Otherwise nodes in our document sort first1503ap[i] === preferredDoc ? -1 :1504bp[i] === preferredDoc ? 1 :15050;1506};15071508return document;1509};15101511Sizzle.matches = function( expr, elements ) {1512return Sizzle( expr, null, null, elements );1513};15141515Sizzle.matchesSelector = function( elem, expr ) {1516// Set document vars if needed1517if ( ( elem.ownerDocument || elem ) !== document ) {1518setDocument( elem );1519}15201521// Make sure that attribute selectors are quoted1522expr = expr.replace( rattributeQuotes, "='$1']" );15231524if ( support.matchesSelector && documentIsHTML &&1525!compilerCache[ expr + " " ] &&1526( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&1527( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {15281529try {1530var ret = matches.call( elem, expr );15311532// IE 9's matchesSelector returns false on disconnected nodes1533if ( ret || support.disconnectedMatch ||1534// As well, disconnected nodes are said to be in a document1535// fragment in IE 91536elem.document && elem.document.nodeType !== 11 ) {1537return ret;1538}1539} catch (e) {}1540}15411542return Sizzle( expr, document, null, [ elem ] ).length > 0;1543};15441545Sizzle.contains = function( context, elem ) {1546// Set document vars if needed1547if ( ( context.ownerDocument || context ) !== document ) {1548setDocument( context );1549}1550return contains( context, elem );1551};15521553Sizzle.attr = function( elem, name ) {1554// Set document vars if needed1555if ( ( elem.ownerDocument || elem ) !== document ) {1556setDocument( elem );1557}15581559var fn = Expr.attrHandle[ name.toLowerCase() ],1560// Don't get fooled by Object.prototype properties (jQuery #13807)1561val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?1562fn( elem, name, !documentIsHTML ) :1563undefined;15641565return val !== undefined ?1566val :1567support.attributes || !documentIsHTML ?1568elem.getAttribute( name ) :1569(val = elem.getAttributeNode(name)) && val.specified ?1570val.value :1571null;1572};15731574Sizzle.escape = function( sel ) {1575return (sel + "").replace( rcssescape, fcssescape );1576};15771578Sizzle.error = function( msg ) {1579throw new Error( "Syntax error, unrecognized expression: " + msg );1580};15811582/**1583* Document sorting and removing duplicates1584* @param {ArrayLike} results1585*/1586Sizzle.uniqueSort = function( results ) {1587var elem,1588duplicates = [],1589j = 0,1590i = 0;15911592// Unless we *know* we can detect duplicates, assume their presence1593hasDuplicate = !support.detectDuplicates;1594sortInput = !support.sortStable && results.slice( 0 );1595results.sort( sortOrder );15961597if ( hasDuplicate ) {1598while ( (elem = results[i++]) ) {1599if ( elem === results[ i ] ) {1600j = duplicates.push( i );1601}1602}1603while ( j-- ) {1604results.splice( duplicates[ j ], 1 );1605}1606}16071608// Clear input after sorting to release objects1609// See https://github.com/jquery/sizzle/pull/2251610sortInput = null;16111612return results;1613};16141615/**1616* Utility function for retrieving the text value of an array of DOM nodes1617* @param {Array|Element} elem1618*/1619getText = Sizzle.getText = function( elem ) {1620var node,1621ret = "",1622i = 0,1623nodeType = elem.nodeType;16241625if ( !nodeType ) {1626// If no nodeType, this is expected to be an array1627while ( (node = elem[i++]) ) {1628// Do not traverse comment nodes1629ret += getText( node );1630}1631} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {1632// Use textContent for elements1633// innerText usage removed for consistency of new lines (jQuery #11153)1634if ( typeof elem.textContent === "string" ) {1635return elem.textContent;1636} else {1637// Traverse its children1638for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {1639ret += getText( elem );1640}1641}1642} else if ( nodeType === 3 || nodeType === 4 ) {1643return elem.nodeValue;1644}1645// Do not include comment or processing instruction nodes16461647return ret;1648};16491650Expr = Sizzle.selectors = {16511652// Can be adjusted by the user1653cacheLength: 50,16541655createPseudo: markFunction,16561657match: matchExpr,16581659attrHandle: {},16601661find: {},16621663relative: {1664">": { dir: "parentNode", first: true },1665" ": { dir: "parentNode" },1666"+": { dir: "previousSibling", first: true },1667"~": { dir: "previousSibling" }1668},16691670preFilter: {1671"ATTR": function( match ) {1672match[1] = match[1].replace( runescape, funescape );16731674// Move the given value to match[3] whether quoted or unquoted1675match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );16761677if ( match[2] === "~=" ) {1678match[3] = " " + match[3] + " ";1679}16801681return match.slice( 0, 4 );1682},16831684"CHILD": function( match ) {1685/* matches from matchExpr["CHILD"]16861 type (only|nth|...)16872 what (child|of-type)16883 argument (even|odd|\d*|\d*n([+-]\d+)?|...)16894 xn-component of xn+y argument ([+-]?\d*n|)16905 sign of xn-component16916 x of xn-component16927 sign of y-component16938 y of y-component1694*/1695match[1] = match[1].toLowerCase();16961697if ( match[1].slice( 0, 3 ) === "nth" ) {1698// nth-* requires argument1699if ( !match[3] ) {1700Sizzle.error( match[0] );1701}17021703// numeric x and y parameters for Expr.filter.CHILD1704// remember that false/true cast respectively to 0/11705match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );1706match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );17071708// other types prohibit arguments1709} else if ( match[3] ) {1710Sizzle.error( match[0] );1711}17121713return match;1714},17151716"PSEUDO": function( match ) {1717var excess,1718unquoted = !match[6] && match[2];17191720if ( matchExpr["CHILD"].test( match[0] ) ) {1721return null;1722}17231724// Accept quoted arguments as-is1725if ( match[3] ) {1726match[2] = match[4] || match[5] || "";17271728// Strip excess characters from unquoted arguments1729} else if ( unquoted && rpseudo.test( unquoted ) &&1730// Get excess from tokenize (recursively)1731(excess = tokenize( unquoted, true )) &&1732// advance to the next closing parenthesis1733(excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {17341735// excess is a negative index1736match[0] = match[0].slice( 0, excess );1737match[2] = unquoted.slice( 0, excess );1738}17391740// Return only captures needed by the pseudo filter method (type and argument)1741return match.slice( 0, 3 );1742}1743},17441745filter: {17461747"TAG": function( nodeNameSelector ) {1748var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();1749return nodeNameSelector === "*" ?1750function() { return true; } :1751function( elem ) {1752return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;1753};1754},17551756"CLASS": function( className ) {1757var pattern = classCache[ className + " " ];17581759return pattern ||1760(pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&1761classCache( className, function( elem ) {1762return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );1763});1764},17651766"ATTR": function( name, operator, check ) {1767return function( elem ) {1768var result = Sizzle.attr( elem, name );17691770if ( result == null ) {1771return operator === "!=";1772}1773if ( !operator ) {1774return true;1775}17761777result += "";17781779return operator === "=" ? result === check :1780operator === "!=" ? result !== check :1781operator === "^=" ? check && result.indexOf( check ) === 0 :1782operator === "*=" ? check && result.indexOf( check ) > -1 :1783operator === "$=" ? check && result.slice( -check.length ) === check :1784operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :1785operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :1786false;1787};1788},17891790"CHILD": function( type, what, argument, first, last ) {1791var simple = type.slice( 0, 3 ) !== "nth",1792forward = type.slice( -4 ) !== "last",1793ofType = what === "of-type";17941795return first === 1 && last === 0 ?17961797// Shortcut for :nth-*(n)1798function( elem ) {1799return !!elem.parentNode;1800} :18011802function( elem, context, xml ) {1803var cache, uniqueCache, outerCache, node, nodeIndex, start,1804dir = simple !== forward ? "nextSibling" : "previousSibling",1805parent = elem.parentNode,1806name = ofType && elem.nodeName.toLowerCase(),1807useCache = !xml && !ofType,1808diff = false;18091810if ( parent ) {18111812// :(first|last|only)-(child|of-type)1813if ( simple ) {1814while ( dir ) {1815node = elem;1816while ( (node = node[ dir ]) ) {1817if ( ofType ?1818node.nodeName.toLowerCase() === name :1819node.nodeType === 1 ) {18201821return false;1822}1823}1824// Reverse direction for :only-* (if we haven't yet done so)1825start = dir = type === "only" && !start && "nextSibling";1826}1827return true;1828}18291830start = [ forward ? parent.firstChild : parent.lastChild ];18311832// non-xml :nth-child(...) stores cache data on `parent`1833if ( forward && useCache ) {18341835// Seek `elem` from a previously-cached index18361837// ...in a gzip-friendly way1838node = parent;1839outerCache = node[ expando ] || (node[ expando ] = {});18401841// Support: IE <9 only1842// Defend against cloned attroperties (jQuery gh-1709)1843uniqueCache = outerCache[ node.uniqueID ] ||1844(outerCache[ node.uniqueID ] = {});18451846cache = uniqueCache[ type ] || [];1847nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];1848diff = nodeIndex && cache[ 2 ];1849node = nodeIndex && parent.childNodes[ nodeIndex ];18501851while ( (node = ++nodeIndex && node && node[ dir ] ||18521853// Fallback to seeking `elem` from the start1854(diff = nodeIndex = 0) || start.pop()) ) {18551856// When found, cache indexes on `parent` and break1857if ( node.nodeType === 1 && ++diff && node === elem ) {1858uniqueCache[ type ] = [ dirruns, nodeIndex, diff ];1859break;1860}1861}18621863} else {1864// Use previously-cached element index if available1865if ( useCache ) {1866// ...in a gzip-friendly way1867node = elem;1868outerCache = node[ expando ] || (node[ expando ] = {});18691870// Support: IE <9 only1871// Defend against cloned attroperties (jQuery gh-1709)1872uniqueCache = outerCache[ node.uniqueID ] ||1873(outerCache[ node.uniqueID ] = {});18741875cache = uniqueCache[ type ] || [];1876nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];1877diff = nodeIndex;1878}18791880// xml :nth-child(...)1881// or :nth-last-child(...) or :nth(-last)?-of-type(...)1882if ( diff === false ) {1883// Use the same loop as above to seek `elem` from the start1884while ( (node = ++nodeIndex && node && node[ dir ] ||1885(diff = nodeIndex = 0) || start.pop()) ) {18861887if ( ( ofType ?1888node.nodeName.toLowerCase() === name :1889node.nodeType === 1 ) &&1890++diff ) {18911892// Cache the index of each encountered element1893if ( useCache ) {1894outerCache = node[ expando ] || (node[ expando ] = {});18951896// Support: IE <9 only1897// Defend against cloned attroperties (jQuery gh-1709)1898uniqueCache = outerCache[ node.uniqueID ] ||1899(outerCache[ node.uniqueID ] = {});19001901uniqueCache[ type ] = [ dirruns, diff ];1902}19031904if ( node === elem ) {1905break;1906}1907}1908}1909}1910}19111912// Incorporate the offset, then check against cycle size1913diff -= last;1914return diff === first || ( diff % first === 0 && diff / first >= 0 );1915}1916};1917},19181919"PSEUDO": function( pseudo, argument ) {1920// pseudo-class names are case-insensitive1921// https://www.w3.org/TR/selectors/#pseudo-classes1922// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters1923// Remember that setFilters inherits from pseudos1924var args,1925fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||1926Sizzle.error( "unsupported pseudo: " + pseudo );19271928// The user may use createPseudo to indicate that1929// arguments are needed to create the filter function1930// just as Sizzle does1931if ( fn[ expando ] ) {1932return fn( argument );1933}19341935// But maintain support for old signatures1936if ( fn.length > 1 ) {1937args = [ pseudo, pseudo, "", argument ];1938return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?1939markFunction(function( seed, matches ) {1940var idx,1941matched = fn( seed, argument ),1942i = matched.length;1943while ( i-- ) {1944idx = indexOf( seed, matched[i] );1945seed[ idx ] = !( matches[ idx ] = matched[i] );1946}1947}) :1948function( elem ) {1949return fn( elem, 0, args );1950};1951}19521953return fn;1954}1955},19561957pseudos: {1958// Potentially complex pseudos1959"not": markFunction(function( selector ) {1960// Trim the selector passed to compile1961// to avoid treating leading and trailing1962// spaces as combinators1963var input = [],1964results = [],1965matcher = compile( selector.replace( rtrim, "$1" ) );19661967return matcher[ expando ] ?1968markFunction(function( seed, matches, context, xml ) {1969var elem,1970unmatched = matcher( seed, null, xml, [] ),1971i = seed.length;19721973// Match elements unmatched by `matcher`1974while ( i-- ) {1975if ( (elem = unmatched[i]) ) {1976seed[i] = !(matches[i] = elem);1977}1978}1979}) :1980function( elem, context, xml ) {1981input[0] = elem;1982matcher( input, null, xml, results );1983// Don't keep the element (issue #299)1984input[0] = null;1985return !results.pop();1986};1987}),19881989"has": markFunction(function( selector ) {1990return function( elem ) {1991return Sizzle( selector, elem ).length > 0;1992};1993}),19941995"contains": markFunction(function( text ) {1996text = text.replace( runescape, funescape );1997return function( elem ) {1998return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;1999};2000}),20012002// "Whether an element is represented by a :lang() selector2003// is based solely on the element's language value2004// being equal to the identifier C,2005// or beginning with the identifier C immediately followed by "-".2006// The matching of C against the element's language value is performed case-insensitively.2007// The identifier C does not have to be a valid language name."2008// https://www.w3.org/TR/selectors/#lang-pseudo2009"lang": markFunction( function( lang ) {2010// lang value must be a valid identifier2011if ( !ridentifier.test(lang || "") ) {2012Sizzle.error( "unsupported lang: " + lang );2013}2014lang = lang.replace( runescape, funescape ).toLowerCase();2015return function( elem ) {2016var elemLang;2017do {2018if ( (elemLang = documentIsHTML ?2019elem.lang :2020elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {20212022elemLang = elemLang.toLowerCase();2023return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;2024}2025} while ( (elem = elem.parentNode) && elem.nodeType === 1 );2026return false;2027};2028}),20292030// Miscellaneous2031"target": function( elem ) {2032var hash = window.location && window.location.hash;2033return hash && hash.slice( 1 ) === elem.id;2034},20352036"root": function( elem ) {2037return elem === docElem;2038},20392040"focus": function( elem ) {2041return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);2042},20432044// Boolean properties2045"enabled": createDisabledPseudo( false ),2046"disabled": createDisabledPseudo( true ),20472048"checked": function( elem ) {2049// In CSS3, :checked should return both checked and selected elements2050// https://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked2051var nodeName = elem.nodeName.toLowerCase();2052return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);2053},20542055"selected": function( elem ) {2056// Accessing this property makes selected-by-default2057// options in Safari work properly2058if ( elem.parentNode ) {2059elem.parentNode.selectedIndex;2060}20612062return elem.selected === true;2063},20642065// Contents2066"empty": function( elem ) {2067// https://www.w3.org/TR/selectors/#empty-pseudo2068// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),2069// but not by others (comment: 8; processing instruction: 7; etc.)2070// nodeType < 6 works because attributes (2) do not appear as children2071for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {2072if ( elem.nodeType < 6 ) {2073return false;2074}2075}2076return true;2077},20782079"parent": function( elem ) {2080return !Expr.pseudos["empty"]( elem );2081},20822083// Element/input types2084"header": function( elem ) {2085return rheader.test( elem.nodeName );2086},20872088"input": function( elem ) {2089return rinputs.test( elem.nodeName );2090},20912092"button": function( elem ) {2093var name = elem.nodeName.toLowerCase();2094return name === "input" && elem.type === "button" || name === "button";2095},20962097"text": function( elem ) {2098var attr;2099return elem.nodeName.toLowerCase() === "input" &&2100elem.type === "text" &&21012102// Support: IE<82103// New HTML5 attribute values (e.g., "search") appear with elem.type === "text"2104( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );2105},21062107// Position-in-collection2108"first": createPositionalPseudo(function() {2109return [ 0 ];2110}),21112112"last": createPositionalPseudo(function( matchIndexes, length ) {2113return [ length - 1 ];2114}),21152116"eq": createPositionalPseudo(function( matchIndexes, length, argument ) {2117return [ argument < 0 ? argument + length : argument ];2118}),21192120"even": createPositionalPseudo(function( matchIndexes, length ) {2121var i = 0;2122for ( ; i < length; i += 2 ) {2123matchIndexes.push( i );2124}2125return matchIndexes;2126}),21272128"odd": createPositionalPseudo(function( matchIndexes, length ) {2129var i = 1;2130for ( ; i < length; i += 2 ) {2131matchIndexes.push( i );2132}2133return matchIndexes;2134}),21352136"lt": createPositionalPseudo(function( matchIndexes, length, argument ) {2137var i = argument < 0 ? argument + length : argument;2138for ( ; --i >= 0; ) {2139matchIndexes.push( i );2140}2141return matchIndexes;2142}),21432144"gt": createPositionalPseudo(function( matchIndexes, length, argument ) {2145var i = argument < 0 ? argument + length : argument;2146for ( ; ++i < length; ) {2147matchIndexes.push( i );2148}2149return matchIndexes;2150})2151}2152};21532154Expr.pseudos["nth"] = Expr.pseudos["eq"];21552156// Add button/input type pseudos2157for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {2158Expr.pseudos[ i ] = createInputPseudo( i );2159}2160for ( i in { submit: true, reset: true } ) {2161Expr.pseudos[ i ] = createButtonPseudo( i );2162}21632164// Easy API for creating new setFilters2165function setFilters() {}2166setFilters.prototype = Expr.filters = Expr.pseudos;2167Expr.setFilters = new setFilters();21682169tokenize = Sizzle.tokenize = function( selector, parseOnly ) {2170var matched, match, tokens, type,2171soFar, groups, preFilters,2172cached = tokenCache[ selector + " " ];21732174if ( cached ) {2175return parseOnly ? 0 : cached.slice( 0 );2176}21772178soFar = selector;2179groups = [];2180preFilters = Expr.preFilter;21812182while ( soFar ) {21832184// Comma and first run2185if ( !matched || (match = rcomma.exec( soFar )) ) {2186if ( match ) {2187// Don't consume trailing commas as valid2188soFar = soFar.slice( match[0].length ) || soFar;2189}2190groups.push( (tokens = []) );2191}21922193matched = false;21942195// Combinators2196if ( (match = rcombinators.exec( soFar )) ) {2197matched = match.shift();2198tokens.push({2199value: matched,2200// Cast descendant combinators to space2201type: match[0].replace( rtrim, " " )2202});2203soFar = soFar.slice( matched.length );2204}22052206// Filters2207for ( type in Expr.filter ) {2208if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||2209(match = preFilters[ type ]( match ))) ) {2210matched = match.shift();2211tokens.push({2212value: matched,2213type: type,2214matches: match2215});2216soFar = soFar.slice( matched.length );2217}2218}22192220if ( !matched ) {2221break;2222}2223}22242225// Return the length of the invalid excess2226// if we're just parsing2227// Otherwise, throw an error or return tokens2228return parseOnly ?2229soFar.length :2230soFar ?2231Sizzle.error( selector ) :2232// Cache the tokens2233tokenCache( selector, groups ).slice( 0 );2234};22352236function toSelector( tokens ) {2237var i = 0,2238len = tokens.length,2239selector = "";2240for ( ; i < len; i++ ) {2241selector += tokens[i].value;2242}2243return selector;2244}22452246function addCombinator( matcher, combinator, base ) {2247var dir = combinator.dir,2248skip = combinator.next,2249key = skip || dir,2250checkNonElements = base && key === "parentNode",2251doneName = done++;22522253return combinator.first ?2254// Check against closest ancestor/preceding element2255function( elem, context, xml ) {2256while ( (elem = elem[ dir ]) ) {2257if ( elem.nodeType === 1 || checkNonElements ) {2258return matcher( elem, context, xml );2259}2260}2261return false;2262} :22632264// Check against all ancestor/preceding elements2265function( elem, context, xml ) {2266var oldCache, uniqueCache, outerCache,2267newCache = [ dirruns, doneName ];22682269// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching2270if ( xml ) {2271while ( (elem = elem[ dir ]) ) {2272if ( elem.nodeType === 1 || checkNonElements ) {2273if ( matcher( elem, context, xml ) ) {2274return true;2275}2276}2277}2278} else {2279while ( (elem = elem[ dir ]) ) {2280if ( elem.nodeType === 1 || checkNonElements ) {2281outerCache = elem[ expando ] || (elem[ expando ] = {});22822283// Support: IE <9 only2284// Defend against cloned attroperties (jQuery gh-1709)2285uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});22862287if ( skip && skip === elem.nodeName.toLowerCase() ) {2288elem = elem[ dir ] || elem;2289} else if ( (oldCache = uniqueCache[ key ]) &&2290oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {22912292// Assign to newCache so results back-propagate to previous elements2293return (newCache[ 2 ] = oldCache[ 2 ]);2294} else {2295// Reuse newcache so results back-propagate to previous elements2296uniqueCache[ key ] = newCache;22972298// A match means we're done; a fail means we have to keep checking2299if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {2300return true;2301}2302}2303}2304}2305}2306return false;2307};2308}23092310function elementMatcher( matchers ) {2311return matchers.length > 1 ?2312function( elem, context, xml ) {2313var i = matchers.length;2314while ( i-- ) {2315if ( !matchers[i]( elem, context, xml ) ) {2316return false;2317}2318}2319return true;2320} :2321matchers[0];2322}23232324function multipleContexts( selector, contexts, results ) {2325var i = 0,2326len = contexts.length;2327for ( ; i < len; i++ ) {2328Sizzle( selector, contexts[i], results );2329}2330return results;2331}23322333function condense( unmatched, map, filter, context, xml ) {2334var elem,2335newUnmatched = [],2336i = 0,2337len = unmatched.length,2338mapped = map != null;23392340for ( ; i < len; i++ ) {2341if ( (elem = unmatched[i]) ) {2342if ( !filter || filter( elem, context, xml ) ) {2343newUnmatched.push( elem );2344if ( mapped ) {2345map.push( i );2346}2347}2348}2349}23502351return newUnmatched;2352}23532354function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {2355if ( postFilter && !postFilter[ expando ] ) {2356postFilter = setMatcher( postFilter );2357}2358if ( postFinder && !postFinder[ expando ] ) {2359postFinder = setMatcher( postFinder, postSelector );2360}2361return markFunction(function( seed, results, context, xml ) {2362var temp, i, elem,2363preMap = [],2364postMap = [],2365preexisting = results.length,23662367// Get initial elements from seed or context2368elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),23692370// Prefilter to get matcher input, preserving a map for seed-results synchronization2371matcherIn = preFilter && ( seed || !selector ) ?2372condense( elems, preMap, preFilter, context, xml ) :2373elems,23742375matcherOut = matcher ?2376// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,2377postFinder || ( seed ? preFilter : preexisting || postFilter ) ?23782379// ...intermediate processing is necessary2380[] :23812382// ...otherwise use results directly2383results :2384matcherIn;23852386// Find primary matches2387if ( matcher ) {2388matcher( matcherIn, matcherOut, context, xml );2389}23902391// Apply postFilter2392if ( postFilter ) {2393temp = condense( matcherOut, postMap );2394postFilter( temp, [], context, xml );23952396// Un-match failing elements by moving them back to matcherIn2397i = temp.length;2398while ( i-- ) {2399if ( (elem = temp[i]) ) {2400matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);2401}2402}2403}24042405if ( seed ) {2406if ( postFinder || preFilter ) {2407if ( postFinder ) {2408// Get the final matcherOut by condensing this intermediate into postFinder contexts2409temp = [];2410i = matcherOut.length;2411while ( i-- ) {2412if ( (elem = matcherOut[i]) ) {2413// Restore matcherIn since elem is not yet a final match2414temp.push( (matcherIn[i] = elem) );2415}2416}2417postFinder( null, (matcherOut = []), temp, xml );2418}24192420// Move matched elements from seed to results to keep them synchronized2421i = matcherOut.length;2422while ( i-- ) {2423if ( (elem = matcherOut[i]) &&2424(temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {24252426seed[temp] = !(results[temp] = elem);2427}2428}2429}24302431// Add elements to results, through postFinder if defined2432} else {2433matcherOut = condense(2434matcherOut === results ?2435matcherOut.splice( preexisting, matcherOut.length ) :2436matcherOut2437);2438if ( postFinder ) {2439postFinder( null, results, matcherOut, xml );2440} else {2441push.apply( results, matcherOut );2442}2443}2444});2445}24462447function matcherFromTokens( tokens ) {2448var checkContext, matcher, j,2449len = tokens.length,2450leadingRelative = Expr.relative[ tokens[0].type ],2451implicitRelative = leadingRelative || Expr.relative[" "],2452i = leadingRelative ? 1 : 0,24532454// The foundational matcher ensures that elements are reachable from top-level context(s)2455matchContext = addCombinator( function( elem ) {2456return elem === checkContext;2457}, implicitRelative, true ),2458matchAnyContext = addCombinator( function( elem ) {2459return indexOf( checkContext, elem ) > -1;2460}, implicitRelative, true ),2461matchers = [ function( elem, context, xml ) {2462var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (2463(checkContext = context).nodeType ?2464matchContext( elem, context, xml ) :2465matchAnyContext( elem, context, xml ) );2466// Avoid hanging onto element (issue #299)2467checkContext = null;2468return ret;2469} ];24702471for ( ; i < len; i++ ) {2472if ( (matcher = Expr.relative[ tokens[i].type ]) ) {2473matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];2474} else {2475matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );24762477// Return special upon seeing a positional matcher2478if ( matcher[ expando ] ) {2479// Find the next relative operator (if any) for proper handling2480j = ++i;2481for ( ; j < len; j++ ) {2482if ( Expr.relative[ tokens[j].type ] ) {2483break;2484}2485}2486return setMatcher(2487i > 1 && elementMatcher( matchers ),2488i > 1 && toSelector(2489// If the preceding token was a descendant combinator, insert an implicit any-element `*`2490tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })2491).replace( rtrim, "$1" ),2492matcher,2493i < j && matcherFromTokens( tokens.slice( i, j ) ),2494j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),2495j < len && toSelector( tokens )2496);2497}2498matchers.push( matcher );2499}2500}25012502return elementMatcher( matchers );2503}25042505function matcherFromGroupMatchers( elementMatchers, setMatchers ) {2506var bySet = setMatchers.length > 0,2507byElement = elementMatchers.length > 0,2508superMatcher = function( seed, context, xml, results, outermost ) {2509var elem, j, matcher,2510matchedCount = 0,2511i = "0",2512unmatched = seed && [],2513setMatched = [],2514contextBackup = outermostContext,2515// We must always have either seed elements or outermost context2516elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),2517// Use integer dirruns iff this is the outermost matcher2518dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),2519len = elems.length;25202521if ( outermost ) {2522outermostContext = context === document || context || outermost;2523}25242525// Add elements passing elementMatchers directly to results2526// Support: IE<9, Safari2527// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id2528for ( ; i !== len && (elem = elems[i]) != null; i++ ) {2529if ( byElement && elem ) {2530j = 0;2531if ( !context && elem.ownerDocument !== document ) {2532setDocument( elem );2533xml = !documentIsHTML;2534}2535while ( (matcher = elementMatchers[j++]) ) {2536if ( matcher( elem, context || document, xml) ) {2537results.push( elem );2538break;2539}2540}2541if ( outermost ) {2542dirruns = dirrunsUnique;2543}2544}25452546// Track unmatched elements for set filters2547if ( bySet ) {2548// They will have gone through all possible matchers2549if ( (elem = !matcher && elem) ) {2550matchedCount--;2551}25522553// Lengthen the array for every element, matched or not2554if ( seed ) {2555unmatched.push( elem );2556}2557}2558}25592560// `i` is now the count of elements visited above, and adding it to `matchedCount`2561// makes the latter nonnegative.2562matchedCount += i;25632564// Apply set filters to unmatched elements2565// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`2566// equals `i`), unless we didn't visit _any_ elements in the above loop because we have2567// no element matchers and no seed.2568// Incrementing an initially-string "0" `i` allows `i` to remain a string only in that2569// case, which will result in a "00" `matchedCount` that differs from `i` but is also2570// numerically zero.2571if ( bySet && i !== matchedCount ) {2572j = 0;2573while ( (matcher = setMatchers[j++]) ) {2574matcher( unmatched, setMatched, context, xml );2575}25762577if ( seed ) {2578// Reintegrate element matches to eliminate the need for sorting2579if ( matchedCount > 0 ) {2580while ( i-- ) {2581if ( !(unmatched[i] || setMatched[i]) ) {2582setMatched[i] = pop.call( results );2583}2584}2585}25862587// Discard index placeholder values to get only actual matches2588setMatched = condense( setMatched );2589}25902591// Add matches to results2592push.apply( results, setMatched );25932594// Seedless set matches succeeding multiple successful matchers stipulate sorting2595if ( outermost && !seed && setMatched.length > 0 &&2596( matchedCount + setMatchers.length ) > 1 ) {25972598Sizzle.uniqueSort( results );2599}2600}26012602// Override manipulation of globals by nested matchers2603if ( outermost ) {2604dirruns = dirrunsUnique;2605outermostContext = contextBackup;2606}26072608return unmatched;2609};26102611return bySet ?2612markFunction( superMatcher ) :2613superMatcher;2614}26152616compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {2617var i,2618setMatchers = [],2619elementMatchers = [],2620cached = compilerCache[ selector + " " ];26212622if ( !cached ) {2623// Generate a function of recursive functions that can be used to check each element2624if ( !match ) {2625match = tokenize( selector );2626}2627i = match.length;2628while ( i-- ) {2629cached = matcherFromTokens( match[i] );2630if ( cached[ expando ] ) {2631setMatchers.push( cached );2632} else {2633elementMatchers.push( cached );2634}2635}26362637// Cache the compiled function2638cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );26392640// Save selector and tokenization2641cached.selector = selector;2642}2643return cached;2644};26452646/**2647* A low-level selection function that works with Sizzle's compiled2648* selector functions2649* @param {String|Function} selector A selector or a pre-compiled2650* selector function built with Sizzle.compile2651* @param {Element} context2652* @param {Array} [results]2653* @param {Array} [seed] A set of elements to match against2654*/2655select = Sizzle.select = function( selector, context, results, seed ) {2656var i, tokens, token, type, find,2657compiled = typeof selector === "function" && selector,2658match = !seed && tokenize( (selector = compiled.selector || selector) );26592660results = results || [];26612662// Try to minimize operations if there is only one selector in the list and no seed2663// (the latter of which guarantees us context)2664if ( match.length === 1 ) {26652666// Reduce context if the leading compound selector is an ID2667tokens = match[0] = match[0].slice( 0 );2668if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&2669context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) {26702671context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];2672if ( !context ) {2673return results;26742675// Precompiled matchers will still verify ancestry, so step up a level2676} else if ( compiled ) {2677context = context.parentNode;2678}26792680selector = selector.slice( tokens.shift().value.length );2681}26822683// Fetch a seed set for right-to-left matching2684i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;2685while ( i-- ) {2686token = tokens[i];26872688// Abort if we hit a combinator2689if ( Expr.relative[ (type = token.type) ] ) {2690break;2691}2692if ( (find = Expr.find[ type ]) ) {2693// Search, expanding context for leading sibling combinators2694if ( (seed = find(2695token.matches[0].replace( runescape, funescape ),2696rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context2697)) ) {26982699// If seed is empty or no tokens remain, we can return early2700tokens.splice( i, 1 );2701selector = seed.length && toSelector( tokens );2702if ( !selector ) {2703push.apply( results, seed );2704return results;2705}27062707break;2708}2709}2710}2711}27122713// Compile and execute a filtering function if one is not provided2714// Provide `match` to avoid retokenization if we modified the selector above2715( compiled || compile( selector, match ) )(2716seed,2717context,2718!documentIsHTML,2719results,2720!context || rsibling.test( selector ) && testContext( context.parentNode ) || context2721);2722return results;2723};27242725// One-time assignments27262727// Sort stability2728support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;27292730// Support: Chrome 14-35+2731// Always assume duplicates if they aren't passed to the comparison function2732support.detectDuplicates = !!hasDuplicate;27332734// Initialize against the default document2735setDocument();27362737// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)2738// Detached nodes confoundingly follow *each other*2739support.sortDetached = assert(function( el ) {2740// Should return 1, but returns 4 (following)2741return el.compareDocumentPosition( document.createElement("fieldset") ) & 1;2742});27432744// Support: IE<82745// Prevent attribute/property "interpolation"2746// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx2747if ( !assert(function( el ) {2748el.innerHTML = "<a href='#'></a>";2749return el.firstChild.getAttribute("href") === "#" ;2750}) ) {2751addHandle( "type|href|height|width", function( elem, name, isXML ) {2752if ( !isXML ) {2753return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );2754}2755});2756}27572758// Support: IE<92759// Use defaultValue in place of getAttribute("value")2760if ( !support.attributes || !assert(function( el ) {2761el.innerHTML = "<input/>";2762el.firstChild.setAttribute( "value", "" );2763return el.firstChild.getAttribute( "value" ) === "";2764}) ) {2765addHandle( "value", function( elem, name, isXML ) {2766if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {2767return elem.defaultValue;2768}2769});2770}27712772// Support: IE<92773// Use getAttributeNode to fetch booleans when getAttribute lies2774if ( !assert(function( el ) {2775return el.getAttribute("disabled") == null;2776}) ) {2777addHandle( booleans, function( elem, name, isXML ) {2778var val;2779if ( !isXML ) {2780return elem[ name ] === true ? name.toLowerCase() :2781(val = elem.getAttributeNode( name )) && val.specified ?2782val.value :2783null;2784}2785});2786}27872788return Sizzle;27892790})( window );2791279227932794jQuery.find = Sizzle;2795jQuery.expr = Sizzle.selectors;27962797// Deprecated2798jQuery.expr[ ":" ] = jQuery.expr.pseudos;2799jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;2800jQuery.text = Sizzle.getText;2801jQuery.isXMLDoc = Sizzle.isXML;2802jQuery.contains = Sizzle.contains;2803jQuery.escapeSelector = Sizzle.escape;28042805280628072808var dir = function( elem, dir, until ) {2809var matched = [],2810truncate = until !== undefined;28112812while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {2813if ( elem.nodeType === 1 ) {2814if ( truncate && jQuery( elem ).is( until ) ) {2815break;2816}2817matched.push( elem );2818}2819}2820return matched;2821};282228232824var siblings = function( n, elem ) {2825var matched = [];28262827for ( ; n; n = n.nextSibling ) {2828if ( n.nodeType === 1 && n !== elem ) {2829matched.push( n );2830}2831}28322833return matched;2834};283528362837var rneedsContext = jQuery.expr.match.needsContext;2838283928402841function nodeName( elem, name ) {28422843return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();28442845};2846var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );2847284828492850var risSimple = /^.[^:#\[\.,]*$/;28512852// Implement the identical functionality for filter and not2853function winnow( elements, qualifier, not ) {2854if ( jQuery.isFunction( qualifier ) ) {2855return jQuery.grep( elements, function( elem, i ) {2856return !!qualifier.call( elem, i, elem ) !== not;2857} );2858}28592860// Single element2861if ( qualifier.nodeType ) {2862return jQuery.grep( elements, function( elem ) {2863return ( elem === qualifier ) !== not;2864} );2865}28662867// Arraylike of elements (jQuery, arguments, Array)2868if ( typeof qualifier !== "string" ) {2869return jQuery.grep( elements, function( elem ) {2870return ( indexOf.call( qualifier, elem ) > -1 ) !== not;2871} );2872}28732874// Simple selector that can be filtered directly, removing non-Elements2875if ( risSimple.test( qualifier ) ) {2876return jQuery.filter( qualifier, elements, not );2877}28782879// Complex selector, compare the two sets, removing non-Elements2880qualifier = jQuery.filter( qualifier, elements );2881return jQuery.grep( elements, function( elem ) {2882return ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1;2883} );2884}28852886jQuery.filter = function( expr, elems, not ) {2887var elem = elems[ 0 ];28882889if ( not ) {2890expr = ":not(" + expr + ")";2891}28922893if ( elems.length === 1 && elem.nodeType === 1 ) {2894return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];2895}28962897return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {2898return elem.nodeType === 1;2899} ) );2900};29012902jQuery.fn.extend( {2903find: function( selector ) {2904var i, ret,2905len = this.length,2906self = this;29072908if ( typeof selector !== "string" ) {2909return this.pushStack( jQuery( selector ).filter( function() {2910for ( i = 0; i < len; i++ ) {2911if ( jQuery.contains( self[ i ], this ) ) {2912return true;2913}2914}2915} ) );2916}29172918ret = this.pushStack( [] );29192920for ( i = 0; i < len; i++ ) {2921jQuery.find( selector, self[ i ], ret );2922}29232924return len > 1 ? jQuery.uniqueSort( ret ) : ret;2925},2926filter: function( selector ) {2927return this.pushStack( winnow( this, selector || [], false ) );2928},2929not: function( selector ) {2930return this.pushStack( winnow( this, selector || [], true ) );2931},2932is: function( selector ) {2933return !!winnow(2934this,29352936// If this is a positional/relative selector, check membership in the returned set2937// so $("p:first").is("p:last") won't return true for a doc with two "p".2938typeof selector === "string" && rneedsContext.test( selector ) ?2939jQuery( selector ) :2940selector || [],2941false2942).length;2943}2944} );294529462947// Initialize a jQuery object294829492950// A central reference to the root jQuery(document)2951var rootjQuery,29522953// A simple way to check for HTML strings2954// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)2955// Strict HTML recognition (#11290: must start with <)2956// Shortcut simple #id case for speed2957rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,29582959init = jQuery.fn.init = function( selector, context, root ) {2960var match, elem;29612962// HANDLE: $(""), $(null), $(undefined), $(false)2963if ( !selector ) {2964return this;2965}29662967// Method init() accepts an alternate rootjQuery2968// so migrate can support jQuery.sub (gh-2101)2969root = root || rootjQuery;29702971// Handle HTML strings2972if ( typeof selector === "string" ) {2973if ( selector[ 0 ] === "<" &&2974selector[ selector.length - 1 ] === ">" &&2975selector.length >= 3 ) {29762977// Assume that strings that start and end with <> are HTML and skip the regex check2978match = [ null, selector, null ];29792980} else {2981match = rquickExpr.exec( selector );2982}29832984// Match html or make sure no context is specified for #id2985if ( match && ( match[ 1 ] || !context ) ) {29862987// HANDLE: $(html) -> $(array)2988if ( match[ 1 ] ) {2989context = context instanceof jQuery ? context[ 0 ] : context;29902991// Option to run scripts is true for back-compat2992// Intentionally let the error be thrown if parseHTML is not present2993jQuery.merge( this, jQuery.parseHTML(2994match[ 1 ],2995context && context.nodeType ? context.ownerDocument || context : document,2996true2997) );29982999// HANDLE: $(html, props)3000if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {3001for ( match in context ) {30023003// Properties of context are called as methods if possible3004if ( jQuery.isFunction( this[ match ] ) ) {3005this[ match ]( context[ match ] );30063007// ...and otherwise set as attributes3008} else {3009this.attr( match, context[ match ] );3010}3011}3012}30133014return this;30153016// HANDLE: $(#id)3017} else {3018elem = document.getElementById( match[ 2 ] );30193020if ( elem ) {30213022// Inject the element directly into the jQuery object3023this[ 0 ] = elem;3024this.length = 1;3025}3026return this;3027}30283029// HANDLE: $(expr, $(...))3030} else if ( !context || context.jquery ) {3031return ( context || root ).find( selector );30323033// HANDLE: $(expr, context)3034// (which is just equivalent to: $(context).find(expr)3035} else {3036return this.constructor( context ).find( selector );3037}30383039// HANDLE: $(DOMElement)3040} else if ( selector.nodeType ) {3041this[ 0 ] = selector;3042this.length = 1;3043return this;30443045// HANDLE: $(function)3046// Shortcut for document ready3047} else if ( jQuery.isFunction( selector ) ) {3048return root.ready !== undefined ?3049root.ready( selector ) :30503051// Execute immediately if ready is not present3052selector( jQuery );3053}30543055return jQuery.makeArray( selector, this );3056};30573058// Give the init function the jQuery prototype for later instantiation3059init.prototype = jQuery.fn;30603061// Initialize central reference3062rootjQuery = jQuery( document );306330643065var rparentsprev = /^(?:parents|prev(?:Until|All))/,30663067// Methods guaranteed to produce a unique set when starting from a unique set3068guaranteedUnique = {3069children: true,3070contents: true,3071next: true,3072prev: true3073};30743075jQuery.fn.extend( {3076has: function( target ) {3077var targets = jQuery( target, this ),3078l = targets.length;30793080return this.filter( function() {3081var i = 0;3082for ( ; i < l; i++ ) {3083if ( jQuery.contains( this, targets[ i ] ) ) {3084return true;3085}3086}3087} );3088},30893090closest: function( selectors, context ) {3091var cur,3092i = 0,3093l = this.length,3094matched = [],3095targets = typeof selectors !== "string" && jQuery( selectors );30963097// Positional selectors never match, since there's no _selection_ context3098if ( !rneedsContext.test( selectors ) ) {3099for ( ; i < l; i++ ) {3100for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {31013102// Always skip document fragments3103if ( cur.nodeType < 11 && ( targets ?3104targets.index( cur ) > -1 :31053106// Don't pass non-elements to Sizzle3107cur.nodeType === 1 &&3108jQuery.find.matchesSelector( cur, selectors ) ) ) {31093110matched.push( cur );3111break;3112}3113}3114}3115}31163117return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );3118},31193120// Determine the position of an element within the set3121index: function( elem ) {31223123// No argument, return index in parent3124if ( !elem ) {3125return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;3126}31273128// Index in selector3129if ( typeof elem === "string" ) {3130return indexOf.call( jQuery( elem ), this[ 0 ] );3131}31323133// Locate the position of the desired element3134return indexOf.call( this,31353136// If it receives a jQuery object, the first element is used3137elem.jquery ? elem[ 0 ] : elem3138);3139},31403141add: function( selector, context ) {3142return this.pushStack(3143jQuery.uniqueSort(3144jQuery.merge( this.get(), jQuery( selector, context ) )3145)3146);3147},31483149addBack: function( selector ) {3150return this.add( selector == null ?3151this.prevObject : this.prevObject.filter( selector )3152);3153}3154} );31553156function sibling( cur, dir ) {3157while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}3158return cur;3159}31603161jQuery.each( {3162parent: function( elem ) {3163var parent = elem.parentNode;3164return parent && parent.nodeType !== 11 ? parent : null;3165},3166parents: function( elem ) {3167return dir( elem, "parentNode" );3168},3169parentsUntil: function( elem, i, until ) {3170return dir( elem, "parentNode", until );3171},3172next: function( elem ) {3173return sibling( elem, "nextSibling" );3174},3175prev: function( elem ) {3176return sibling( elem, "previousSibling" );3177},3178nextAll: function( elem ) {3179return dir( elem, "nextSibling" );3180},3181prevAll: function( elem ) {3182return dir( elem, "previousSibling" );3183},3184nextUntil: function( elem, i, until ) {3185return dir( elem, "nextSibling", until );3186},3187prevUntil: function( elem, i, until ) {3188return dir( elem, "previousSibling", until );3189},3190siblings: function( elem ) {3191return siblings( ( elem.parentNode || {} ).firstChild, elem );3192},3193children: function( elem ) {3194return siblings( elem.firstChild );3195},3196contents: function( elem ) {3197if ( nodeName( elem, "iframe" ) ) {3198return elem.contentDocument;3199}32003201// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only3202// Treat the template element as a regular one in browsers that3203// don't support it.3204if ( nodeName( elem, "template" ) ) {3205elem = elem.content || elem;3206}32073208return jQuery.merge( [], elem.childNodes );3209}3210}, function( name, fn ) {3211jQuery.fn[ name ] = function( until, selector ) {3212var matched = jQuery.map( this, fn, until );32133214if ( name.slice( -5 ) !== "Until" ) {3215selector = until;3216}32173218if ( selector && typeof selector === "string" ) {3219matched = jQuery.filter( selector, matched );3220}32213222if ( this.length > 1 ) {32233224// Remove duplicates3225if ( !guaranteedUnique[ name ] ) {3226jQuery.uniqueSort( matched );3227}32283229// Reverse order for parents* and prev-derivatives3230if ( rparentsprev.test( name ) ) {3231matched.reverse();3232}3233}32343235return this.pushStack( matched );3236};3237} );3238var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g );3239324032413242// Convert String-formatted options into Object-formatted ones3243function createOptions( options ) {3244var object = {};3245jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {3246object[ flag ] = true;3247} );3248return object;3249}32503251/*3252* Create a callback list using the following parameters:3253*3254* options: an optional list of space-separated options that will change how3255* the callback list behaves or a more traditional option object3256*3257* By default a callback list will act like an event callback list and can be3258* "fired" multiple times.3259*3260* Possible options:3261*3262* once: will ensure the callback list can only be fired once (like a Deferred)3263*3264* memory: will keep track of previous values and will call any callback added3265* after the list has been fired right away with the latest "memorized"3266* values (like a Deferred)3267*3268* unique: will ensure a callback can only be added once (no duplicate in the list)3269*3270* stopOnFalse: interrupt callings when a callback returns false3271*3272*/3273jQuery.Callbacks = function( options ) {32743275// Convert options from String-formatted to Object-formatted if needed3276// (we check in cache first)3277options = typeof options === "string" ?3278createOptions( options ) :3279jQuery.extend( {}, options );32803281var // Flag to know if list is currently firing3282firing,32833284// Last fire value for non-forgettable lists3285memory,32863287// Flag to know if list was already fired3288fired,32893290// Flag to prevent firing3291locked,32923293// Actual callback list3294list = [],32953296// Queue of execution data for repeatable lists3297queue = [],32983299// Index of currently firing callback (modified by add/remove as needed)3300firingIndex = -1,33013302// Fire callbacks3303fire = function() {33043305// Enforce single-firing3306locked = locked || options.once;33073308// Execute callbacks for all pending executions,3309// respecting firingIndex overrides and runtime changes3310fired = firing = true;3311for ( ; queue.length; firingIndex = -1 ) {3312memory = queue.shift();3313while ( ++firingIndex < list.length ) {33143315// Run callback and check for early termination3316if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&3317options.stopOnFalse ) {33183319// Jump to end and forget the data so .add doesn't re-fire3320firingIndex = list.length;3321memory = false;3322}3323}3324}33253326// Forget the data if we're done with it3327if ( !options.memory ) {3328memory = false;3329}33303331firing = false;33323333// Clean up if we're done firing for good3334if ( locked ) {33353336// Keep an empty list if we have data for future add calls3337if ( memory ) {3338list = [];33393340// Otherwise, this object is spent3341} else {3342list = "";3343}3344}3345},33463347// Actual Callbacks object3348self = {33493350// Add a callback or a collection of callbacks to the list3351add: function() {3352if ( list ) {33533354// If we have memory from a past run, we should fire after adding3355if ( memory && !firing ) {3356firingIndex = list.length - 1;3357queue.push( memory );3358}33593360( function add( args ) {3361jQuery.each( args, function( _, arg ) {3362if ( jQuery.isFunction( arg ) ) {3363if ( !options.unique || !self.has( arg ) ) {3364list.push( arg );3365}3366} else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) {33673368// Inspect recursively3369add( arg );3370}3371} );3372} )( arguments );33733374if ( memory && !firing ) {3375fire();3376}3377}3378return this;3379},33803381// Remove a callback from the list3382remove: function() {3383jQuery.each( arguments, function( _, arg ) {3384var index;3385while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {3386list.splice( index, 1 );33873388// Handle firing indexes3389if ( index <= firingIndex ) {3390firingIndex--;3391}3392}3393} );3394return this;3395},33963397// Check if a given callback is in the list.3398// If no argument is given, return whether or not list has callbacks attached.3399has: function( fn ) {3400return fn ?3401jQuery.inArray( fn, list ) > -1 :3402list.length > 0;3403},34043405// Remove all callbacks from the list3406empty: function() {3407if ( list ) {3408list = [];3409}3410return this;3411},34123413// Disable .fire and .add3414// Abort any current/pending executions3415// Clear all callbacks and values3416disable: function() {3417locked = queue = [];3418list = memory = "";3419return this;3420},3421disabled: function() {3422return !list;3423},34243425// Disable .fire3426// Also disable .add unless we have memory (since it would have no effect)3427// Abort any pending executions3428lock: function() {3429locked = queue = [];3430if ( !memory && !firing ) {3431list = memory = "";3432}3433return this;3434},3435locked: function() {3436return !!locked;3437},34383439// Call all callbacks with the given context and arguments3440fireWith: function( context, args ) {3441if ( !locked ) {3442args = args || [];3443args = [ context, args.slice ? args.slice() : args ];3444queue.push( args );3445if ( !firing ) {3446fire();3447}3448}3449return this;3450},34513452// Call all the callbacks with the given arguments3453fire: function() {3454self.fireWith( this, arguments );3455return this;3456},34573458// To know if the callbacks have already been called at least once3459fired: function() {3460return !!fired;3461}3462};34633464return self;3465};346634673468function Identity( v ) {3469return v;3470}3471function Thrower( ex ) {3472throw ex;3473}34743475function adoptValue( value, resolve, reject, noValue ) {3476var method;34773478try {34793480// Check for promise aspect first to privilege synchronous behavior3481if ( value && jQuery.isFunction( ( method = value.promise ) ) ) {3482method.call( value ).done( resolve ).fail( reject );34833484// Other thenables3485} else if ( value && jQuery.isFunction( ( method = value.then ) ) ) {3486method.call( value, resolve, reject );34873488// Other non-thenables3489} else {34903491// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:3492// * false: [ value ].slice( 0 ) => resolve( value )3493// * true: [ value ].slice( 1 ) => resolve()3494resolve.apply( undefined, [ value ].slice( noValue ) );3495}34963497// For Promises/A+, convert exceptions into rejections3498// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in3499// Deferred#then to conditionally suppress rejection.3500} catch ( value ) {35013502// Support: Android 4.0 only3503// Strict mode functions invoked without .call/.apply get global-object context3504reject.apply( undefined, [ value ] );3505}3506}35073508jQuery.extend( {35093510Deferred: function( func ) {3511var tuples = [35123513// action, add listener, callbacks,3514// ... .then handlers, argument index, [final state]3515[ "notify", "progress", jQuery.Callbacks( "memory" ),3516jQuery.Callbacks( "memory" ), 2 ],3517[ "resolve", "done", jQuery.Callbacks( "once memory" ),3518jQuery.Callbacks( "once memory" ), 0, "resolved" ],3519[ "reject", "fail", jQuery.Callbacks( "once memory" ),3520jQuery.Callbacks( "once memory" ), 1, "rejected" ]3521],3522state = "pending",3523promise = {3524state: function() {3525return state;3526},3527always: function() {3528deferred.done( arguments ).fail( arguments );3529return this;3530},3531"catch": function( fn ) {3532return promise.then( null, fn );3533},35343535// Keep pipe for back-compat3536pipe: function( /* fnDone, fnFail, fnProgress */ ) {3537var fns = arguments;35383539return jQuery.Deferred( function( newDefer ) {3540jQuery.each( tuples, function( i, tuple ) {35413542// Map tuples (progress, done, fail) to arguments (done, fail, progress)3543var fn = jQuery.isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];35443545// deferred.progress(function() { bind to newDefer or newDefer.notify })3546// deferred.done(function() { bind to newDefer or newDefer.resolve })3547// deferred.fail(function() { bind to newDefer or newDefer.reject })3548deferred[ tuple[ 1 ] ]( function() {3549var returned = fn && fn.apply( this, arguments );3550if ( returned && jQuery.isFunction( returned.promise ) ) {3551returned.promise()3552.progress( newDefer.notify )3553.done( newDefer.resolve )3554.fail( newDefer.reject );3555} else {3556newDefer[ tuple[ 0 ] + "With" ](3557this,3558fn ? [ returned ] : arguments3559);3560}3561} );3562} );3563fns = null;3564} ).promise();3565},3566then: function( onFulfilled, onRejected, onProgress ) {3567var maxDepth = 0;3568function resolve( depth, deferred, handler, special ) {3569return function() {3570var that = this,3571args = arguments,3572mightThrow = function() {3573var returned, then;35743575// Support: Promises/A+ section 2.3.3.3.33576// https://promisesaplus.com/#point-593577// Ignore double-resolution attempts3578if ( depth < maxDepth ) {3579return;3580}35813582returned = handler.apply( that, args );35833584// Support: Promises/A+ section 2.3.13585// https://promisesaplus.com/#point-483586if ( returned === deferred.promise() ) {3587throw new TypeError( "Thenable self-resolution" );3588}35893590// Support: Promises/A+ sections 2.3.3.1, 3.53591// https://promisesaplus.com/#point-543592// https://promisesaplus.com/#point-753593// Retrieve `then` only once3594then = returned &&35953596// Support: Promises/A+ section 2.3.43597// https://promisesaplus.com/#point-643598// Only check objects and functions for thenability3599( typeof returned === "object" ||3600typeof returned === "function" ) &&3601returned.then;36023603// Handle a returned thenable3604if ( jQuery.isFunction( then ) ) {36053606// Special processors (notify) just wait for resolution3607if ( special ) {3608then.call(3609returned,3610resolve( maxDepth, deferred, Identity, special ),3611resolve( maxDepth, deferred, Thrower, special )3612);36133614// Normal processors (resolve) also hook into progress3615} else {36163617// ...and disregard older resolution values3618maxDepth++;36193620then.call(3621returned,3622resolve( maxDepth, deferred, Identity, special ),3623resolve( maxDepth, deferred, Thrower, special ),3624resolve( maxDepth, deferred, Identity,3625deferred.notifyWith )3626);3627}36283629// Handle all other returned values3630} else {36313632// Only substitute handlers pass on context3633// and multiple values (non-spec behavior)3634if ( handler !== Identity ) {3635that = undefined;3636args = [ returned ];3637}36383639// Process the value(s)3640// Default process is resolve3641( special || deferred.resolveWith )( that, args );3642}3643},36443645// Only normal processors (resolve) catch and reject exceptions3646process = special ?3647mightThrow :3648function() {3649try {3650mightThrow();3651} catch ( e ) {36523653if ( jQuery.Deferred.exceptionHook ) {3654jQuery.Deferred.exceptionHook( e,3655process.stackTrace );3656}36573658// Support: Promises/A+ section 2.3.3.3.4.13659// https://promisesaplus.com/#point-613660// Ignore post-resolution exceptions3661if ( depth + 1 >= maxDepth ) {36623663// Only substitute handlers pass on context3664// and multiple values (non-spec behavior)3665if ( handler !== Thrower ) {3666that = undefined;3667args = [ e ];3668}36693670deferred.rejectWith( that, args );3671}3672}3673};36743675// Support: Promises/A+ section 2.3.3.3.13676// https://promisesaplus.com/#point-573677// Re-resolve promises immediately to dodge false rejection from3678// subsequent errors3679if ( depth ) {3680process();3681} else {36823683// Call an optional hook to record the stack, in case of exception3684// since it's otherwise lost when execution goes async3685if ( jQuery.Deferred.getStackHook ) {3686process.stackTrace = jQuery.Deferred.getStackHook();3687}3688window.setTimeout( process );3689}3690};3691}36923693return jQuery.Deferred( function( newDefer ) {36943695// progress_handlers.add( ... )3696tuples[ 0 ][ 3 ].add(3697resolve(36980,3699newDefer,3700jQuery.isFunction( onProgress ) ?3701onProgress :3702Identity,3703newDefer.notifyWith3704)3705);37063707// fulfilled_handlers.add( ... )3708tuples[ 1 ][ 3 ].add(3709resolve(37100,3711newDefer,3712jQuery.isFunction( onFulfilled ) ?3713onFulfilled :3714Identity3715)3716);37173718// rejected_handlers.add( ... )3719tuples[ 2 ][ 3 ].add(3720resolve(37210,3722newDefer,3723jQuery.isFunction( onRejected ) ?3724onRejected :3725Thrower3726)3727);3728} ).promise();3729},37303731// Get a promise for this deferred3732// If obj is provided, the promise aspect is added to the object3733promise: function( obj ) {3734return obj != null ? jQuery.extend( obj, promise ) : promise;3735}3736},3737deferred = {};37383739// Add list-specific methods3740jQuery.each( tuples, function( i, tuple ) {3741var list = tuple[ 2 ],3742stateString = tuple[ 5 ];37433744// promise.progress = list.add3745// promise.done = list.add3746// promise.fail = list.add3747promise[ tuple[ 1 ] ] = list.add;37483749// Handle state3750if ( stateString ) {3751list.add(3752function() {37533754// state = "resolved" (i.e., fulfilled)3755// state = "rejected"3756state = stateString;3757},37583759// rejected_callbacks.disable3760// fulfilled_callbacks.disable3761tuples[ 3 - i ][ 2 ].disable,37623763// progress_callbacks.lock3764tuples[ 0 ][ 2 ].lock3765);3766}37673768// progress_handlers.fire3769// fulfilled_handlers.fire3770// rejected_handlers.fire3771list.add( tuple[ 3 ].fire );37723773// deferred.notify = function() { deferred.notifyWith(...) }3774// deferred.resolve = function() { deferred.resolveWith(...) }3775// deferred.reject = function() { deferred.rejectWith(...) }3776deferred[ tuple[ 0 ] ] = function() {3777deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments );3778return this;3779};37803781// deferred.notifyWith = list.fireWith3782// deferred.resolveWith = list.fireWith3783// deferred.rejectWith = list.fireWith3784deferred[ tuple[ 0 ] + "With" ] = list.fireWith;3785} );37863787// Make the deferred a promise3788promise.promise( deferred );37893790// Call given func if any3791if ( func ) {3792func.call( deferred, deferred );3793}37943795// All done!3796return deferred;3797},37983799// Deferred helper3800when: function( singleValue ) {3801var38023803// count of uncompleted subordinates3804remaining = arguments.length,38053806// count of unprocessed arguments3807i = remaining,38083809// subordinate fulfillment data3810resolveContexts = Array( i ),3811resolveValues = slice.call( arguments ),38123813// the master Deferred3814master = jQuery.Deferred(),38153816// subordinate callback factory3817updateFunc = function( i ) {3818return function( value ) {3819resolveContexts[ i ] = this;3820resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;3821if ( !( --remaining ) ) {3822master.resolveWith( resolveContexts, resolveValues );3823}3824};3825};38263827// Single- and empty arguments are adopted like Promise.resolve3828if ( remaining <= 1 ) {3829adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject,3830!remaining );38313832// Use .then() to unwrap secondary thenables (cf. gh-3000)3833if ( master.state() === "pending" ||3834jQuery.isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {38353836return master.then();3837}3838}38393840// Multiple arguments are aggregated like Promise.all array elements3841while ( i-- ) {3842adoptValue( resolveValues[ i ], updateFunc( i ), master.reject );3843}38443845return master.promise();3846}3847} );384838493850// These usually indicate a programmer mistake during development,3851// warn about them ASAP rather than swallowing them by default.3852var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;38533854jQuery.Deferred.exceptionHook = function( error, stack ) {38553856// Support: IE 8 - 9 only3857// Console exists when dev tools are open, which can happen at any time3858if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {3859window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack );3860}3861};38623863386438653866jQuery.readyException = function( error ) {3867window.setTimeout( function() {3868throw error;3869} );3870};38713872387338743875// The deferred used on DOM ready3876var readyList = jQuery.Deferred();38773878jQuery.fn.ready = function( fn ) {38793880readyList3881.then( fn )38823883// Wrap jQuery.readyException in a function so that the lookup3884// happens at the time of error handling instead of callback3885// registration.3886.catch( function( error ) {3887jQuery.readyException( error );3888} );38893890return this;3891};38923893jQuery.extend( {38943895// Is the DOM ready to be used? Set to true once it occurs.3896isReady: false,38973898// A counter to track how many items to wait for before3899// the ready event fires. See #67813900readyWait: 1,39013902// Handle when the DOM is ready3903ready: function( wait ) {39043905// Abort if there are pending holds or we're already ready3906if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {3907return;3908}39093910// Remember that the DOM is ready3911jQuery.isReady = true;39123913// If a normal DOM Ready event fired, decrement, and wait if need be3914if ( wait !== true && --jQuery.readyWait > 0 ) {3915return;3916}39173918// If there are functions bound, to execute3919readyList.resolveWith( document, [ jQuery ] );3920}3921} );39223923jQuery.ready.then = readyList.then;39243925// The ready event handler and self cleanup method3926function completed() {3927document.removeEventListener( "DOMContentLoaded", completed );3928window.removeEventListener( "load", completed );3929jQuery.ready();3930}39313932// Catch cases where $(document).ready() is called3933// after the browser event has already occurred.3934// Support: IE <=9 - 10 only3935// Older IE sometimes signals "interactive" too soon3936if ( document.readyState === "complete" ||3937( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {39383939// Handle it asynchronously to allow scripts the opportunity to delay ready3940window.setTimeout( jQuery.ready );39413942} else {39433944// Use the handy event callback3945document.addEventListener( "DOMContentLoaded", completed );39463947// A fallback to window.onload, that will always work3948window.addEventListener( "load", completed );3949}39503951395239533954// Multifunctional method to get and set values of a collection3955// The value/s can optionally be executed if it's a function3956var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {3957var i = 0,3958len = elems.length,3959bulk = key == null;39603961// Sets many values3962if ( jQuery.type( key ) === "object" ) {3963chainable = true;3964for ( i in key ) {3965access( elems, fn, i, key[ i ], true, emptyGet, raw );3966}39673968// Sets one value3969} else if ( value !== undefined ) {3970chainable = true;39713972if ( !jQuery.isFunction( value ) ) {3973raw = true;3974}39753976if ( bulk ) {39773978// Bulk operations run against the entire set3979if ( raw ) {3980fn.call( elems, value );3981fn = null;39823983// ...except when executing function values3984} else {3985bulk = fn;3986fn = function( elem, key, value ) {3987return bulk.call( jQuery( elem ), value );3988};3989}3990}39913992if ( fn ) {3993for ( ; i < len; i++ ) {3994fn(3995elems[ i ], key, raw ?3996value :3997value.call( elems[ i ], i, fn( elems[ i ], key ) )3998);3999}4000}4001}40024003if ( chainable ) {4004return elems;4005}40064007// Gets4008if ( bulk ) {4009return fn.call( elems );4010}40114012return len ? fn( elems[ 0 ], key ) : emptyGet;4013};4014var acceptData = function( owner ) {40154016// Accepts only:4017// - Node4018// - Node.ELEMENT_NODE4019// - Node.DOCUMENT_NODE4020// - Object4021// - Any4022return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );4023};40244025402640274028function Data() {4029this.expando = jQuery.expando + Data.uid++;4030}40314032Data.uid = 1;40334034Data.prototype = {40354036cache: function( owner ) {40374038// Check if the owner object already has a cache4039var value = owner[ this.expando ];40404041// If not, create one4042if ( !value ) {4043value = {};40444045// We can accept data for non-element nodes in modern browsers,4046// but we should not, see #8335.4047// Always return an empty object.4048if ( acceptData( owner ) ) {40494050// If it is a node unlikely to be stringify-ed or looped over4051// use plain assignment4052if ( owner.nodeType ) {4053owner[ this.expando ] = value;40544055// Otherwise secure it in a non-enumerable property4056// configurable must be true to allow the property to be4057// deleted when data is removed4058} else {4059Object.defineProperty( owner, this.expando, {4060value: value,4061configurable: true4062} );4063}4064}4065}40664067return value;4068},4069set: function( owner, data, value ) {4070var prop,4071cache = this.cache( owner );40724073// Handle: [ owner, key, value ] args4074// Always use camelCase key (gh-2257)4075if ( typeof data === "string" ) {4076cache[ jQuery.camelCase( data ) ] = value;40774078// Handle: [ owner, { properties } ] args4079} else {40804081// Copy the properties one-by-one to the cache object4082for ( prop in data ) {4083cache[ jQuery.camelCase( prop ) ] = data[ prop ];4084}4085}4086return cache;4087},4088get: function( owner, key ) {4089return key === undefined ?4090this.cache( owner ) :40914092// Always use camelCase key (gh-2257)4093owner[ this.expando ] && owner[ this.expando ][ jQuery.camelCase( key ) ];4094},4095access: function( owner, key, value ) {40964097// In cases where either:4098//4099// 1. No key was specified4100// 2. A string key was specified, but no value provided4101//4102// Take the "read" path and allow the get method to determine4103// which value to return, respectively either:4104//4105// 1. The entire cache object4106// 2. The data stored at the key4107//4108if ( key === undefined ||4109( ( key && typeof key === "string" ) && value === undefined ) ) {41104111return this.get( owner, key );4112}41134114// When the key is not a string, or both a key and value4115// are specified, set or extend (existing objects) with either:4116//4117// 1. An object of properties4118// 2. A key and value4119//4120this.set( owner, key, value );41214122// Since the "set" path can have two possible entry points4123// return the expected data based on which path was taken[*]4124return value !== undefined ? value : key;4125},4126remove: function( owner, key ) {4127var i,4128cache = owner[ this.expando ];41294130if ( cache === undefined ) {4131return;4132}41334134if ( key !== undefined ) {41354136// Support array or space separated string of keys4137if ( Array.isArray( key ) ) {41384139// If key is an array of keys...4140// We always set camelCase keys, so remove that.4141key = key.map( jQuery.camelCase );4142} else {4143key = jQuery.camelCase( key );41444145// If a key with the spaces exists, use it.4146// Otherwise, create an array by matching non-whitespace4147key = key in cache ?4148[ key ] :4149( key.match( rnothtmlwhite ) || [] );4150}41514152i = key.length;41534154while ( i-- ) {4155delete cache[ key[ i ] ];4156}4157}41584159// Remove the expando if there's no more data4160if ( key === undefined || jQuery.isEmptyObject( cache ) ) {41614162// Support: Chrome <=35 - 454163// Webkit & Blink performance suffers when deleting properties4164// from DOM nodes, so set to undefined instead4165// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)4166if ( owner.nodeType ) {4167owner[ this.expando ] = undefined;4168} else {4169delete owner[ this.expando ];4170}4171}4172},4173hasData: function( owner ) {4174var cache = owner[ this.expando ];4175return cache !== undefined && !jQuery.isEmptyObject( cache );4176}4177};4178var dataPriv = new Data();41794180var dataUser = new Data();4181418241834184// Implementation Summary4185//4186// 1. Enforce API surface and semantic compatibility with 1.9.x branch4187// 2. Improve the module's maintainability by reducing the storage4188// paths to a single mechanism.4189// 3. Use the same single mechanism to support "private" and "user" data.4190// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)4191// 5. Avoid exposing implementation details on user objects (eg. expando properties)4192// 6. Provide a clear path for implementation upgrade to WeakMap in 201441934194var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,4195rmultiDash = /[A-Z]/g;41964197function getData( data ) {4198if ( data === "true" ) {4199return true;4200}42014202if ( data === "false" ) {4203return false;4204}42054206if ( data === "null" ) {4207return null;4208}42094210// Only convert to a number if it doesn't change the string4211if ( data === +data + "" ) {4212return +data;4213}42144215if ( rbrace.test( data ) ) {4216return JSON.parse( data );4217}42184219return data;4220}42214222function dataAttr( elem, key, data ) {4223var name;42244225// If nothing was found internally, try to fetch any4226// data from the HTML5 data-* attribute4227if ( data === undefined && elem.nodeType === 1 ) {4228name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();4229data = elem.getAttribute( name );42304231if ( typeof data === "string" ) {4232try {4233data = getData( data );4234} catch ( e ) {}42354236// Make sure we set the data so it isn't changed later4237dataUser.set( elem, key, data );4238} else {4239data = undefined;4240}4241}4242return data;4243}42444245jQuery.extend( {4246hasData: function( elem ) {4247return dataUser.hasData( elem ) || dataPriv.hasData( elem );4248},42494250data: function( elem, name, data ) {4251return dataUser.access( elem, name, data );4252},42534254removeData: function( elem, name ) {4255dataUser.remove( elem, name );4256},42574258// TODO: Now that all calls to _data and _removeData have been replaced4259// with direct calls to dataPriv methods, these can be deprecated.4260_data: function( elem, name, data ) {4261return dataPriv.access( elem, name, data );4262},42634264_removeData: function( elem, name ) {4265dataPriv.remove( elem, name );4266}4267} );42684269jQuery.fn.extend( {4270data: function( key, value ) {4271var i, name, data,4272elem = this[ 0 ],4273attrs = elem && elem.attributes;42744275// Gets all values4276if ( key === undefined ) {4277if ( this.length ) {4278data = dataUser.get( elem );42794280if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {4281i = attrs.length;4282while ( i-- ) {42834284// Support: IE 11 only4285// The attrs elements can be null (#14894)4286if ( attrs[ i ] ) {4287name = attrs[ i ].name;4288if ( name.indexOf( "data-" ) === 0 ) {4289name = jQuery.camelCase( name.slice( 5 ) );4290dataAttr( elem, name, data[ name ] );4291}4292}4293}4294dataPriv.set( elem, "hasDataAttrs", true );4295}4296}42974298return data;4299}43004301// Sets multiple values4302if ( typeof key === "object" ) {4303return this.each( function() {4304dataUser.set( this, key );4305} );4306}43074308return access( this, function( value ) {4309var data;43104311// The calling jQuery object (element matches) is not empty4312// (and therefore has an element appears at this[ 0 ]) and the4313// `value` parameter was not undefined. An empty jQuery object4314// will result in `undefined` for elem = this[ 0 ] which will4315// throw an exception if an attempt to read a data cache is made.4316if ( elem && value === undefined ) {43174318// Attempt to get data from the cache4319// The key will always be camelCased in Data4320data = dataUser.get( elem, key );4321if ( data !== undefined ) {4322return data;4323}43244325// Attempt to "discover" the data in4326// HTML5 custom data-* attrs4327data = dataAttr( elem, key );4328if ( data !== undefined ) {4329return data;4330}43314332// We tried really hard, but the data doesn't exist.4333return;4334}43354336// Set the data...4337this.each( function() {43384339// We always store the camelCased key4340dataUser.set( this, key, value );4341} );4342}, null, value, arguments.length > 1, null, true );4343},43444345removeData: function( key ) {4346return this.each( function() {4347dataUser.remove( this, key );4348} );4349}4350} );435143524353jQuery.extend( {4354queue: function( elem, type, data ) {4355var queue;43564357if ( elem ) {4358type = ( type || "fx" ) + "queue";4359queue = dataPriv.get( elem, type );43604361// Speed up dequeue by getting out quickly if this is just a lookup4362if ( data ) {4363if ( !queue || Array.isArray( data ) ) {4364queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );4365} else {4366queue.push( data );4367}4368}4369return queue || [];4370}4371},43724373dequeue: function( elem, type ) {4374type = type || "fx";43754376var queue = jQuery.queue( elem, type ),4377startLength = queue.length,4378fn = queue.shift(),4379hooks = jQuery._queueHooks( elem, type ),4380next = function() {4381jQuery.dequeue( elem, type );4382};43834384// If the fx queue is dequeued, always remove the progress sentinel4385if ( fn === "inprogress" ) {4386fn = queue.shift();4387startLength--;4388}43894390if ( fn ) {43914392// Add a progress sentinel to prevent the fx queue from being4393// automatically dequeued4394if ( type === "fx" ) {4395queue.unshift( "inprogress" );4396}43974398// Clear up the last queue stop function4399delete hooks.stop;4400fn.call( elem, next, hooks );4401}44024403if ( !startLength && hooks ) {4404hooks.empty.fire();4405}4406},44074408// Not public - generate a queueHooks object, or return the current one4409_queueHooks: function( elem, type ) {4410var key = type + "queueHooks";4411return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {4412empty: jQuery.Callbacks( "once memory" ).add( function() {4413dataPriv.remove( elem, [ type + "queue", key ] );4414} )4415} );4416}4417} );44184419jQuery.fn.extend( {4420queue: function( type, data ) {4421var setter = 2;44224423if ( typeof type !== "string" ) {4424data = type;4425type = "fx";4426setter--;4427}44284429if ( arguments.length < setter ) {4430return jQuery.queue( this[ 0 ], type );4431}44324433return data === undefined ?4434this :4435this.each( function() {4436var queue = jQuery.queue( this, type, data );44374438// Ensure a hooks for this queue4439jQuery._queueHooks( this, type );44404441if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {4442jQuery.dequeue( this, type );4443}4444} );4445},4446dequeue: function( type ) {4447return this.each( function() {4448jQuery.dequeue( this, type );4449} );4450},4451clearQueue: function( type ) {4452return this.queue( type || "fx", [] );4453},44544455// Get a promise resolved when queues of a certain type4456// are emptied (fx is the type by default)4457promise: function( type, obj ) {4458var tmp,4459count = 1,4460defer = jQuery.Deferred(),4461elements = this,4462i = this.length,4463resolve = function() {4464if ( !( --count ) ) {4465defer.resolveWith( elements, [ elements ] );4466}4467};44684469if ( typeof type !== "string" ) {4470obj = type;4471type = undefined;4472}4473type = type || "fx";44744475while ( i-- ) {4476tmp = dataPriv.get( elements[ i ], type + "queueHooks" );4477if ( tmp && tmp.empty ) {4478count++;4479tmp.empty.add( resolve );4480}4481}4482resolve();4483return defer.promise( obj );4484}4485} );4486var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source;44874488var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );448944904491var cssExpand = [ "Top", "Right", "Bottom", "Left" ];44924493var isHiddenWithinTree = function( elem, el ) {44944495// isHiddenWithinTree might be called from jQuery#filter function;4496// in that case, element will be second argument4497elem = el || elem;44984499// Inline style trumps all4500return elem.style.display === "none" ||4501elem.style.display === "" &&45024503// Otherwise, check computed style4504// Support: Firefox <=43 - 454505// Disconnected elements can have computed display: none, so first confirm that elem is4506// in the document.4507jQuery.contains( elem.ownerDocument, elem ) &&45084509jQuery.css( elem, "display" ) === "none";4510};45114512var swap = function( elem, options, callback, args ) {4513var ret, name,4514old = {};45154516// Remember the old values, and insert the new ones4517for ( name in options ) {4518old[ name ] = elem.style[ name ];4519elem.style[ name ] = options[ name ];4520}45214522ret = callback.apply( elem, args || [] );45234524// Revert the old values4525for ( name in options ) {4526elem.style[ name ] = old[ name ];4527}45284529return ret;4530};45314532453345344535function adjustCSS( elem, prop, valueParts, tween ) {4536var adjusted,4537scale = 1,4538maxIterations = 20,4539currentValue = tween ?4540function() {4541return tween.cur();4542} :4543function() {4544return jQuery.css( elem, prop, "" );4545},4546initial = currentValue(),4547unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),45484549// Starting value computation is required for potential unit mismatches4550initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&4551rcssNum.exec( jQuery.css( elem, prop ) );45524553if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {45544555// Trust units reported by jQuery.css4556unit = unit || initialInUnit[ 3 ];45574558// Make sure we update the tween properties later on4559valueParts = valueParts || [];45604561// Iteratively approximate from a nonzero starting point4562initialInUnit = +initial || 1;45634564do {45654566// If previous iteration zeroed out, double until we get *something*.4567// Use string for doubling so we don't accidentally see scale as unchanged below4568scale = scale || ".5";45694570// Adjust and apply4571initialInUnit = initialInUnit / scale;4572jQuery.style( elem, prop, initialInUnit + unit );45734574// Update scale, tolerating zero or NaN from tween.cur()4575// Break the loop if scale is unchanged or perfect, or if we've just had enough.4576} while (4577scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations4578);4579}45804581if ( valueParts ) {4582initialInUnit = +initialInUnit || +initial || 0;45834584// Apply relative offset (+=/-=) if specified4585adjusted = valueParts[ 1 ] ?4586initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :4587+valueParts[ 2 ];4588if ( tween ) {4589tween.unit = unit;4590tween.start = initialInUnit;4591tween.end = adjusted;4592}4593}4594return adjusted;4595}459645974598var defaultDisplayMap = {};45994600function getDefaultDisplay( elem ) {4601var temp,4602doc = elem.ownerDocument,4603nodeName = elem.nodeName,4604display = defaultDisplayMap[ nodeName ];46054606if ( display ) {4607return display;4608}46094610temp = doc.body.appendChild( doc.createElement( nodeName ) );4611display = jQuery.css( temp, "display" );46124613temp.parentNode.removeChild( temp );46144615if ( display === "none" ) {4616display = "block";4617}4618defaultDisplayMap[ nodeName ] = display;46194620return display;4621}46224623function showHide( elements, show ) {4624var display, elem,4625values = [],4626index = 0,4627length = elements.length;46284629// Determine new display value for elements that need to change4630for ( ; index < length; index++ ) {4631elem = elements[ index ];4632if ( !elem.style ) {4633continue;4634}46354636display = elem.style.display;4637if ( show ) {46384639// Since we force visibility upon cascade-hidden elements, an immediate (and slow)4640// check is required in this first loop unless we have a nonempty display value (either4641// inline or about-to-be-restored)4642if ( display === "none" ) {4643values[ index ] = dataPriv.get( elem, "display" ) || null;4644if ( !values[ index ] ) {4645elem.style.display = "";4646}4647}4648if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) {4649values[ index ] = getDefaultDisplay( elem );4650}4651} else {4652if ( display !== "none" ) {4653values[ index ] = "none";46544655// Remember what we're overwriting4656dataPriv.set( elem, "display", display );4657}4658}4659}46604661// Set the display of the elements in a second loop to avoid constant reflow4662for ( index = 0; index < length; index++ ) {4663if ( values[ index ] != null ) {4664elements[ index ].style.display = values[ index ];4665}4666}46674668return elements;4669}46704671jQuery.fn.extend( {4672show: function() {4673return showHide( this, true );4674},4675hide: function() {4676return showHide( this );4677},4678toggle: function( state ) {4679if ( typeof state === "boolean" ) {4680return state ? this.show() : this.hide();4681}46824683return this.each( function() {4684if ( isHiddenWithinTree( this ) ) {4685jQuery( this ).show();4686} else {4687jQuery( this ).hide();4688}4689} );4690}4691} );4692var rcheckableType = ( /^(?:checkbox|radio)$/i );46934694var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]+)/i );46954696var rscriptType = ( /^$|\/(?:java|ecma)script/i );4697469846994700// We have to close these tags to support XHTML (#13200)4701var wrapMap = {47024703// Support: IE <=9 only4704option: [ 1, "<select multiple='multiple'>", "</select>" ],47054706// XHTML parsers do not magically insert elements in the4707// same way that tag soup parsers do. So we cannot shorten4708// this by omitting <tbody> or other required elements.4709thead: [ 1, "<table>", "</table>" ],4710col: [ 2, "<table><colgroup>", "</colgroup></table>" ],4711tr: [ 2, "<table><tbody>", "</tbody></table>" ],4712td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],47134714_default: [ 0, "", "" ]4715};47164717// Support: IE <=9 only4718wrapMap.optgroup = wrapMap.option;47194720wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;4721wrapMap.th = wrapMap.td;472247234724function getAll( context, tag ) {47254726// Support: IE <=9 - 11 only4727// Use typeof to avoid zero-argument method invocation on host objects (#15151)4728var ret;47294730if ( typeof context.getElementsByTagName !== "undefined" ) {4731ret = context.getElementsByTagName( tag || "*" );47324733} else if ( typeof context.querySelectorAll !== "undefined" ) {4734ret = context.querySelectorAll( tag || "*" );47354736} else {4737ret = [];4738}47394740if ( tag === undefined || tag && nodeName( context, tag ) ) {4741return jQuery.merge( [ context ], ret );4742}47434744return ret;4745}474647474748// Mark scripts as having already been evaluated4749function setGlobalEval( elems, refElements ) {4750var i = 0,4751l = elems.length;47524753for ( ; i < l; i++ ) {4754dataPriv.set(4755elems[ i ],4756"globalEval",4757!refElements || dataPriv.get( refElements[ i ], "globalEval" )4758);4759}4760}476147624763var rhtml = /<|&#?\w+;/;47644765function buildFragment( elems, context, scripts, selection, ignored ) {4766var elem, tmp, tag, wrap, contains, j,4767fragment = context.createDocumentFragment(),4768nodes = [],4769i = 0,4770l = elems.length;47714772for ( ; i < l; i++ ) {4773elem = elems[ i ];47744775if ( elem || elem === 0 ) {47764777// Add nodes directly4778if ( jQuery.type( elem ) === "object" ) {47794780// Support: Android <=4.0 only, PhantomJS 1 only4781// push.apply(_, arraylike) throws on ancient WebKit4782jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );47834784// Convert non-html into a text node4785} else if ( !rhtml.test( elem ) ) {4786nodes.push( context.createTextNode( elem ) );47874788// Convert html into DOM nodes4789} else {4790tmp = tmp || fragment.appendChild( context.createElement( "div" ) );47914792// Deserialize a standard representation4793tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();4794wrap = wrapMap[ tag ] || wrapMap._default;4795tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];47964797// Descend through wrappers to the right content4798j = wrap[ 0 ];4799while ( j-- ) {4800tmp = tmp.lastChild;4801}48024803// Support: Android <=4.0 only, PhantomJS 1 only4804// push.apply(_, arraylike) throws on ancient WebKit4805jQuery.merge( nodes, tmp.childNodes );48064807// Remember the top-level container4808tmp = fragment.firstChild;48094810// Ensure the created nodes are orphaned (#12392)4811tmp.textContent = "";4812}4813}4814}48154816// Remove wrapper from fragment4817fragment.textContent = "";48184819i = 0;4820while ( ( elem = nodes[ i++ ] ) ) {48214822// Skip elements already in the context collection (trac-4087)4823if ( selection && jQuery.inArray( elem, selection ) > -1 ) {4824if ( ignored ) {4825ignored.push( elem );4826}4827continue;4828}48294830contains = jQuery.contains( elem.ownerDocument, elem );48314832// Append to fragment4833tmp = getAll( fragment.appendChild( elem ), "script" );48344835// Preserve script evaluation history4836if ( contains ) {4837setGlobalEval( tmp );4838}48394840// Capture executables4841if ( scripts ) {4842j = 0;4843while ( ( elem = tmp[ j++ ] ) ) {4844if ( rscriptType.test( elem.type || "" ) ) {4845scripts.push( elem );4846}4847}4848}4849}48504851return fragment;4852}485348544855( function() {4856var fragment = document.createDocumentFragment(),4857div = fragment.appendChild( document.createElement( "div" ) ),4858input = document.createElement( "input" );48594860// Support: Android 4.0 - 4.3 only4861// Check state lost if the name is set (#11217)4862// Support: Windows Web Apps (WWA)4863// `name` and `type` must use .setAttribute for WWA (#14901)4864input.setAttribute( "type", "radio" );4865input.setAttribute( "checked", "checked" );4866input.setAttribute( "name", "t" );48674868div.appendChild( input );48694870// Support: Android <=4.1 only4871// Older WebKit doesn't clone checked state correctly in fragments4872support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;48734874// Support: IE <=11 only4875// Make sure textarea (and checkbox) defaultValue is properly cloned4876div.innerHTML = "<textarea>x</textarea>";4877support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;4878} )();4879var documentElement = document.documentElement;4880488148824883var4884rkeyEvent = /^key/,4885rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,4886rtypenamespace = /^([^.]*)(?:\.(.+)|)/;48874888function returnTrue() {4889return true;4890}48914892function returnFalse() {4893return false;4894}48954896// Support: IE <=9 only4897// See #13393 for more info4898function safeActiveElement() {4899try {4900return document.activeElement;4901} catch ( err ) { }4902}49034904function on( elem, types, selector, data, fn, one ) {4905var origFn, type;49064907// Types can be a map of types/handlers4908if ( typeof types === "object" ) {49094910// ( types-Object, selector, data )4911if ( typeof selector !== "string" ) {49124913// ( types-Object, data )4914data = data || selector;4915selector = undefined;4916}4917for ( type in types ) {4918on( elem, type, selector, data, types[ type ], one );4919}4920return elem;4921}49224923if ( data == null && fn == null ) {49244925// ( types, fn )4926fn = selector;4927data = selector = undefined;4928} else if ( fn == null ) {4929if ( typeof selector === "string" ) {49304931// ( types, selector, fn )4932fn = data;4933data = undefined;4934} else {49354936// ( types, data, fn )4937fn = data;4938data = selector;4939selector = undefined;4940}4941}4942if ( fn === false ) {4943fn = returnFalse;4944} else if ( !fn ) {4945return elem;4946}49474948if ( one === 1 ) {4949origFn = fn;4950fn = function( event ) {49514952// Can use an empty set, since event contains the info4953jQuery().off( event );4954return origFn.apply( this, arguments );4955};49564957// Use same guid so caller can remove using origFn4958fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );4959}4960return elem.each( function() {4961jQuery.event.add( this, types, fn, data, selector );4962} );4963}49644965/*4966* Helper functions for managing events -- not part of the public interface.4967* Props to Dean Edwards' addEvent library for many of the ideas.4968*/4969jQuery.event = {49704971global: {},49724973add: function( elem, types, handler, data, selector ) {49744975var handleObjIn, eventHandle, tmp,4976events, t, handleObj,4977special, handlers, type, namespaces, origType,4978elemData = dataPriv.get( elem );49794980// Don't attach events to noData or text/comment nodes (but allow plain objects)4981if ( !elemData ) {4982return;4983}49844985// Caller can pass in an object of custom data in lieu of the handler4986if ( handler.handler ) {4987handleObjIn = handler;4988handler = handleObjIn.handler;4989selector = handleObjIn.selector;4990}49914992// Ensure that invalid selectors throw exceptions at attach time4993// Evaluate against documentElement in case elem is a non-element node (e.g., document)4994if ( selector ) {4995jQuery.find.matchesSelector( documentElement, selector );4996}49974998// Make sure that the handler has a unique ID, used to find/remove it later4999if ( !handler.guid ) {5000handler.guid = jQuery.guid++;5001}50025003// Init the element's event structure and main handler, if this is the first5004if ( !( events = elemData.events ) ) {5005events = elemData.events = {};5006}5007if ( !( eventHandle = elemData.handle ) ) {5008eventHandle = elemData.handle = function( e ) {50095010// Discard the second event of a jQuery.event.trigger() and5011// when an event is called after a page has unloaded5012return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?5013jQuery.event.dispatch.apply( elem, arguments ) : undefined;5014};5015}50165017// Handle multiple events separated by a space5018types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];5019t = types.length;5020while ( t-- ) {5021tmp = rtypenamespace.exec( types[ t ] ) || [];5022type = origType = tmp[ 1 ];5023namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();50245025// There *must* be a type, no attaching namespace-only handlers5026if ( !type ) {5027continue;5028}50295030// If event changes its type, use the special event handlers for the changed type5031special = jQuery.event.special[ type ] || {};50325033// If selector defined, determine special event api type, otherwise given type5034type = ( selector ? special.delegateType : special.bindType ) || type;50355036// Update special based on newly reset type5037special = jQuery.event.special[ type ] || {};50385039// handleObj is passed to all event handlers5040handleObj = jQuery.extend( {5041type: type,5042origType: origType,5043data: data,5044handler: handler,5045guid: handler.guid,5046selector: selector,5047needsContext: selector && jQuery.expr.match.needsContext.test( selector ),5048namespace: namespaces.join( "." )5049}, handleObjIn );50505051// Init the event handler queue if we're the first5052if ( !( handlers = events[ type ] ) ) {5053handlers = events[ type ] = [];5054handlers.delegateCount = 0;50555056// Only use addEventListener if the special events handler returns false5057if ( !special.setup ||5058special.setup.call( elem, data, namespaces, eventHandle ) === false ) {50595060if ( elem.addEventListener ) {5061elem.addEventListener( type, eventHandle );5062}5063}5064}50655066if ( special.add ) {5067special.add.call( elem, handleObj );50685069if ( !handleObj.handler.guid ) {5070handleObj.handler.guid = handler.guid;5071}5072}50735074// Add to the element's handler list, delegates in front5075if ( selector ) {5076handlers.splice( handlers.delegateCount++, 0, handleObj );5077} else {5078handlers.push( handleObj );5079}50805081// Keep track of which events have ever been used, for event optimization5082jQuery.event.global[ type ] = true;5083}50845085},50865087// Detach an event or set of events from an element5088remove: function( elem, types, handler, selector, mappedTypes ) {50895090var j, origCount, tmp,5091events, t, handleObj,5092special, handlers, type, namespaces, origType,5093elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );50945095if ( !elemData || !( events = elemData.events ) ) {5096return;5097}50985099// Once for each type.namespace in types; type may be omitted5100types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];5101t = types.length;5102while ( t-- ) {5103tmp = rtypenamespace.exec( types[ t ] ) || [];5104type = origType = tmp[ 1 ];5105namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();51065107// Unbind all events (on this namespace, if provided) for the element5108if ( !type ) {5109for ( type in events ) {5110jQuery.event.remove( elem, type + types[ t ], handler, selector, true );5111}5112continue;5113}51145115special = jQuery.event.special[ type ] || {};5116type = ( selector ? special.delegateType : special.bindType ) || type;5117handlers = events[ type ] || [];5118tmp = tmp[ 2 ] &&5119new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );51205121// Remove matching events5122origCount = j = handlers.length;5123while ( j-- ) {5124handleObj = handlers[ j ];51255126if ( ( mappedTypes || origType === handleObj.origType ) &&5127( !handler || handler.guid === handleObj.guid ) &&5128( !tmp || tmp.test( handleObj.namespace ) ) &&5129( !selector || selector === handleObj.selector ||5130selector === "**" && handleObj.selector ) ) {5131handlers.splice( j, 1 );51325133if ( handleObj.selector ) {5134handlers.delegateCount--;5135}5136if ( special.remove ) {5137special.remove.call( elem, handleObj );5138}5139}5140}51415142// Remove generic event handler if we removed something and no more handlers exist5143// (avoids potential for endless recursion during removal of special event handlers)5144if ( origCount && !handlers.length ) {5145if ( !special.teardown ||5146special.teardown.call( elem, namespaces, elemData.handle ) === false ) {51475148jQuery.removeEvent( elem, type, elemData.handle );5149}51505151delete events[ type ];5152}5153}51545155// Remove data and the expando if it's no longer used5156if ( jQuery.isEmptyObject( events ) ) {5157dataPriv.remove( elem, "handle events" );5158}5159},51605161dispatch: function( nativeEvent ) {51625163// Make a writable jQuery.Event from the native event object5164var event = jQuery.event.fix( nativeEvent );51655166var i, j, ret, matched, handleObj, handlerQueue,5167args = new Array( arguments.length ),5168handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [],5169special = jQuery.event.special[ event.type ] || {};51705171// Use the fix-ed jQuery.Event rather than the (read-only) native event5172args[ 0 ] = event;51735174for ( i = 1; i < arguments.length; i++ ) {5175args[ i ] = arguments[ i ];5176}51775178event.delegateTarget = this;51795180// Call the preDispatch hook for the mapped type, and let it bail if desired5181if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {5182return;5183}51845185// Determine handlers5186handlerQueue = jQuery.event.handlers.call( this, event, handlers );51875188// Run delegates first; they may want to stop propagation beneath us5189i = 0;5190while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {5191event.currentTarget = matched.elem;51925193j = 0;5194while ( ( handleObj = matched.handlers[ j++ ] ) &&5195!event.isImmediatePropagationStopped() ) {51965197// Triggered event must either 1) have no namespace, or 2) have namespace(s)5198// a subset or equal to those in the bound event (both can have no namespace).5199if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {52005201event.handleObj = handleObj;5202event.data = handleObj.data;52035204ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||5205handleObj.handler ).apply( matched.elem, args );52065207if ( ret !== undefined ) {5208if ( ( event.result = ret ) === false ) {5209event.preventDefault();5210event.stopPropagation();5211}5212}5213}5214}5215}52165217// Call the postDispatch hook for the mapped type5218if ( special.postDispatch ) {5219special.postDispatch.call( this, event );5220}52215222return event.result;5223},52245225handlers: function( event, handlers ) {5226var i, handleObj, sel, matchedHandlers, matchedSelectors,5227handlerQueue = [],5228delegateCount = handlers.delegateCount,5229cur = event.target;52305231// Find delegate handlers5232if ( delegateCount &&52335234// Support: IE <=95235// Black-hole SVG <use> instance trees (trac-13180)5236cur.nodeType &&52375238// Support: Firefox <=425239// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)5240// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click5241// Support: IE 11 only5242// ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)5243!( event.type === "click" && event.button >= 1 ) ) {52445245for ( ; cur !== this; cur = cur.parentNode || this ) {52465247// Don't check non-elements (#13208)5248// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)5249if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) {5250matchedHandlers = [];5251matchedSelectors = {};5252for ( i = 0; i < delegateCount; i++ ) {5253handleObj = handlers[ i ];52545255// Don't conflict with Object.prototype properties (#13203)5256sel = handleObj.selector + " ";52575258if ( matchedSelectors[ sel ] === undefined ) {5259matchedSelectors[ sel ] = handleObj.needsContext ?5260jQuery( sel, this ).index( cur ) > -1 :5261jQuery.find( sel, this, null, [ cur ] ).length;5262}5263if ( matchedSelectors[ sel ] ) {5264matchedHandlers.push( handleObj );5265}5266}5267if ( matchedHandlers.length ) {5268handlerQueue.push( { elem: cur, handlers: matchedHandlers } );5269}5270}5271}5272}52735274// Add the remaining (directly-bound) handlers5275cur = this;5276if ( delegateCount < handlers.length ) {5277handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );5278}52795280return handlerQueue;5281},52825283addProp: function( name, hook ) {5284Object.defineProperty( jQuery.Event.prototype, name, {5285enumerable: true,5286configurable: true,52875288get: jQuery.isFunction( hook ) ?5289function() {5290if ( this.originalEvent ) {5291return hook( this.originalEvent );5292}5293} :5294function() {5295if ( this.originalEvent ) {5296return this.originalEvent[ name ];5297}5298},52995300set: function( value ) {5301Object.defineProperty( this, name, {5302enumerable: true,5303configurable: true,5304writable: true,5305value: value5306} );5307}5308} );5309},53105311fix: function( originalEvent ) {5312return originalEvent[ jQuery.expando ] ?5313originalEvent :5314new jQuery.Event( originalEvent );5315},53165317special: {5318load: {53195320// Prevent triggered image.load events from bubbling to window.load5321noBubble: true5322},5323focus: {53245325// Fire native event if possible so blur/focus sequence is correct5326trigger: function() {5327if ( this !== safeActiveElement() && this.focus ) {5328this.focus();5329return false;5330}5331},5332delegateType: "focusin"5333},5334blur: {5335trigger: function() {5336if ( this === safeActiveElement() && this.blur ) {5337this.blur();5338return false;5339}5340},5341delegateType: "focusout"5342},5343click: {53445345// For checkbox, fire native event so checked state will be right5346trigger: function() {5347if ( this.type === "checkbox" && this.click && nodeName( this, "input" ) ) {5348this.click();5349return false;5350}5351},53525353// For cross-browser consistency, don't fire native .click() on links5354_default: function( event ) {5355return nodeName( event.target, "a" );5356}5357},53585359beforeunload: {5360postDispatch: function( event ) {53615362// Support: Firefox 20+5363// Firefox doesn't alert if the returnValue field is not set.5364if ( event.result !== undefined && event.originalEvent ) {5365event.originalEvent.returnValue = event.result;5366}5367}5368}5369}5370};53715372jQuery.removeEvent = function( elem, type, handle ) {53735374// This "if" is needed for plain objects5375if ( elem.removeEventListener ) {5376elem.removeEventListener( type, handle );5377}5378};53795380jQuery.Event = function( src, props ) {53815382// Allow instantiation without the 'new' keyword5383if ( !( this instanceof jQuery.Event ) ) {5384return new jQuery.Event( src, props );5385}53865387// Event object5388if ( src && src.type ) {5389this.originalEvent = src;5390this.type = src.type;53915392// Events bubbling up the document may have been marked as prevented5393// by a handler lower down the tree; reflect the correct value.5394this.isDefaultPrevented = src.defaultPrevented ||5395src.defaultPrevented === undefined &&53965397// Support: Android <=2.3 only5398src.returnValue === false ?5399returnTrue :5400returnFalse;54015402// Create target properties5403// Support: Safari <=6 - 7 only5404// Target should not be a text node (#504, #13143)5405this.target = ( src.target && src.target.nodeType === 3 ) ?5406src.target.parentNode :5407src.target;54085409this.currentTarget = src.currentTarget;5410this.relatedTarget = src.relatedTarget;54115412// Event type5413} else {5414this.type = src;5415}54165417// Put explicitly provided properties onto the event object5418if ( props ) {5419jQuery.extend( this, props );5420}54215422// Create a timestamp if incoming event doesn't have one5423this.timeStamp = src && src.timeStamp || jQuery.now();54245425// Mark it as fixed5426this[ jQuery.expando ] = true;5427};54285429// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding5430// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html5431jQuery.Event.prototype = {5432constructor: jQuery.Event,5433isDefaultPrevented: returnFalse,5434isPropagationStopped: returnFalse,5435isImmediatePropagationStopped: returnFalse,5436isSimulated: false,54375438preventDefault: function() {5439var e = this.originalEvent;54405441this.isDefaultPrevented = returnTrue;54425443if ( e && !this.isSimulated ) {5444e.preventDefault();5445}5446},5447stopPropagation: function() {5448var e = this.originalEvent;54495450this.isPropagationStopped = returnTrue;54515452if ( e && !this.isSimulated ) {5453e.stopPropagation();5454}5455},5456stopImmediatePropagation: function() {5457var e = this.originalEvent;54585459this.isImmediatePropagationStopped = returnTrue;54605461if ( e && !this.isSimulated ) {5462e.stopImmediatePropagation();5463}54645465this.stopPropagation();5466}5467};54685469// Includes all common event props including KeyEvent and MouseEvent specific props5470jQuery.each( {5471altKey: true,5472bubbles: true,5473cancelable: true,5474changedTouches: true,5475ctrlKey: true,5476detail: true,5477eventPhase: true,5478metaKey: true,5479pageX: true,5480pageY: true,5481shiftKey: true,5482view: true,5483"char": true,5484charCode: true,5485key: true,5486keyCode: true,5487button: true,5488buttons: true,5489clientX: true,5490clientY: true,5491offsetX: true,5492offsetY: true,5493pointerId: true,5494pointerType: true,5495screenX: true,5496screenY: true,5497targetTouches: true,5498toElement: true,5499touches: true,55005501which: function( event ) {5502var button = event.button;55035504// Add which for key events5505if ( event.which == null && rkeyEvent.test( event.type ) ) {5506return event.charCode != null ? event.charCode : event.keyCode;5507}55085509// Add which for click: 1 === left; 2 === middle; 3 === right5510if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) {5511if ( button & 1 ) {5512return 1;5513}55145515if ( button & 2 ) {5516return 3;5517}55185519if ( button & 4 ) {5520return 2;5521}55225523return 0;5524}55255526return event.which;5527}5528}, jQuery.event.addProp );55295530// Create mouseenter/leave events using mouseover/out and event-time checks5531// so that event delegation works in jQuery.5532// Do the same for pointerenter/pointerleave and pointerover/pointerout5533//5534// Support: Safari 7 only5535// Safari sends mouseenter too often; see:5536// https://bugs.chromium.org/p/chromium/issues/detail?id=4702585537// for the description of the bug (it existed in older Chrome versions as well).5538jQuery.each( {5539mouseenter: "mouseover",5540mouseleave: "mouseout",5541pointerenter: "pointerover",5542pointerleave: "pointerout"5543}, function( orig, fix ) {5544jQuery.event.special[ orig ] = {5545delegateType: fix,5546bindType: fix,55475548handle: function( event ) {5549var ret,5550target = this,5551related = event.relatedTarget,5552handleObj = event.handleObj;55535554// For mouseenter/leave call the handler if related is outside the target.5555// NB: No relatedTarget if the mouse left/entered the browser window5556if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {5557event.type = handleObj.origType;5558ret = handleObj.handler.apply( this, arguments );5559event.type = fix;5560}5561return ret;5562}5563};5564} );55655566jQuery.fn.extend( {55675568on: function( types, selector, data, fn ) {5569return on( this, types, selector, data, fn );5570},5571one: function( types, selector, data, fn ) {5572return on( this, types, selector, data, fn, 1 );5573},5574off: function( types, selector, fn ) {5575var handleObj, type;5576if ( types && types.preventDefault && types.handleObj ) {55775578// ( event ) dispatched jQuery.Event5579handleObj = types.handleObj;5580jQuery( types.delegateTarget ).off(5581handleObj.namespace ?5582handleObj.origType + "." + handleObj.namespace :5583handleObj.origType,5584handleObj.selector,5585handleObj.handler5586);5587return this;5588}5589if ( typeof types === "object" ) {55905591// ( types-object [, selector] )5592for ( type in types ) {5593this.off( type, selector, types[ type ] );5594}5595return this;5596}5597if ( selector === false || typeof selector === "function" ) {55985599// ( types [, fn] )5600fn = selector;5601selector = undefined;5602}5603if ( fn === false ) {5604fn = returnFalse;5605}5606return this.each( function() {5607jQuery.event.remove( this, types, fn, selector );5608} );5609}5610} );561156125613var56145615/* eslint-disable max-len */56165617// See https://github.com/eslint/eslint/issues/32295618rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,56195620/* eslint-enable */56215622// Support: IE <=10 - 11, Edge 12 - 135623// In IE/Edge using regex groups here causes severe slowdowns.5624// See https://connect.microsoft.com/IE/feedback/details/1736512/5625rnoInnerhtml = /<script|<style|<link/i,56265627// checked="checked" or checked5628rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,5629rscriptTypeMasked = /^true\/(.*)/,5630rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;56315632// Prefer a tbody over its parent table for containing new rows5633function manipulationTarget( elem, content ) {5634if ( nodeName( elem, "table" ) &&5635nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {56365637return jQuery( ">tbody", elem )[ 0 ] || elem;5638}56395640return elem;5641}56425643// Replace/restore the type attribute of script elements for safe DOM manipulation5644function disableScript( elem ) {5645elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;5646return elem;5647}5648function restoreScript( elem ) {5649var match = rscriptTypeMasked.exec( elem.type );56505651if ( match ) {5652elem.type = match[ 1 ];5653} else {5654elem.removeAttribute( "type" );5655}56565657return elem;5658}56595660function cloneCopyEvent( src, dest ) {5661var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;56625663if ( dest.nodeType !== 1 ) {5664return;5665}56665667// 1. Copy private data: events, handlers, etc.5668if ( dataPriv.hasData( src ) ) {5669pdataOld = dataPriv.access( src );5670pdataCur = dataPriv.set( dest, pdataOld );5671events = pdataOld.events;56725673if ( events ) {5674delete pdataCur.handle;5675pdataCur.events = {};56765677for ( type in events ) {5678for ( i = 0, l = events[ type ].length; i < l; i++ ) {5679jQuery.event.add( dest, type, events[ type ][ i ] );5680}5681}5682}5683}56845685// 2. Copy user data5686if ( dataUser.hasData( src ) ) {5687udataOld = dataUser.access( src );5688udataCur = jQuery.extend( {}, udataOld );56895690dataUser.set( dest, udataCur );5691}5692}56935694// Fix IE bugs, see support tests5695function fixInput( src, dest ) {5696var nodeName = dest.nodeName.toLowerCase();56975698// Fails to persist the checked state of a cloned checkbox or radio button.5699if ( nodeName === "input" && rcheckableType.test( src.type ) ) {5700dest.checked = src.checked;57015702// Fails to return the selected option to the default selected state when cloning options5703} else if ( nodeName === "input" || nodeName === "textarea" ) {5704dest.defaultValue = src.defaultValue;5705}5706}57075708function domManip( collection, args, callback, ignored ) {57095710// Flatten any nested arrays5711args = concat.apply( [], args );57125713var fragment, first, scripts, hasScripts, node, doc,5714i = 0,5715l = collection.length,5716iNoClone = l - 1,5717value = args[ 0 ],5718isFunction = jQuery.isFunction( value );57195720// We can't cloneNode fragments that contain checked, in WebKit5721if ( isFunction ||5722( l > 1 && typeof value === "string" &&5723!support.checkClone && rchecked.test( value ) ) ) {5724return collection.each( function( index ) {5725var self = collection.eq( index );5726if ( isFunction ) {5727args[ 0 ] = value.call( this, index, self.html() );5728}5729domManip( self, args, callback, ignored );5730} );5731}57325733if ( l ) {5734fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );5735first = fragment.firstChild;57365737if ( fragment.childNodes.length === 1 ) {5738fragment = first;5739}57405741// Require either new content or an interest in ignored elements to invoke the callback5742if ( first || ignored ) {5743scripts = jQuery.map( getAll( fragment, "script" ), disableScript );5744hasScripts = scripts.length;57455746// Use the original fragment for the last item5747// instead of the first because it can end up5748// being emptied incorrectly in certain situations (#8070).5749for ( ; i < l; i++ ) {5750node = fragment;57515752if ( i !== iNoClone ) {5753node = jQuery.clone( node, true, true );57545755// Keep references to cloned scripts for later restoration5756if ( hasScripts ) {57575758// Support: Android <=4.0 only, PhantomJS 1 only5759// push.apply(_, arraylike) throws on ancient WebKit5760jQuery.merge( scripts, getAll( node, "script" ) );5761}5762}57635764callback.call( collection[ i ], node, i );5765}57665767if ( hasScripts ) {5768doc = scripts[ scripts.length - 1 ].ownerDocument;57695770// Reenable scripts5771jQuery.map( scripts, restoreScript );57725773// Evaluate executable scripts on first document insertion5774for ( i = 0; i < hasScripts; i++ ) {5775node = scripts[ i ];5776if ( rscriptType.test( node.type || "" ) &&5777!dataPriv.access( node, "globalEval" ) &&5778jQuery.contains( doc, node ) ) {57795780if ( node.src ) {57815782// Optional AJAX dependency, but won't run scripts if not present5783if ( jQuery._evalUrl ) {5784jQuery._evalUrl( node.src );5785}5786} else {5787DOMEval( node.textContent.replace( rcleanScript, "" ), doc );5788}5789}5790}5791}5792}5793}57945795return collection;5796}57975798function remove( elem, selector, keepData ) {5799var node,5800nodes = selector ? jQuery.filter( selector, elem ) : elem,5801i = 0;58025803for ( ; ( node = nodes[ i ] ) != null; i++ ) {5804if ( !keepData && node.nodeType === 1 ) {5805jQuery.cleanData( getAll( node ) );5806}58075808if ( node.parentNode ) {5809if ( keepData && jQuery.contains( node.ownerDocument, node ) ) {5810setGlobalEval( getAll( node, "script" ) );5811}5812node.parentNode.removeChild( node );5813}5814}58155816return elem;5817}58185819jQuery.extend( {5820htmlPrefilter: function( html ) {5821return html.replace( rxhtmlTag, "<$1></$2>" );5822},58235824clone: function( elem, dataAndEvents, deepDataAndEvents ) {5825var i, l, srcElements, destElements,5826clone = elem.cloneNode( true ),5827inPage = jQuery.contains( elem.ownerDocument, elem );58285829// Fix IE cloning issues5830if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&5831!jQuery.isXMLDoc( elem ) ) {58325833// We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/25834destElements = getAll( clone );5835srcElements = getAll( elem );58365837for ( i = 0, l = srcElements.length; i < l; i++ ) {5838fixInput( srcElements[ i ], destElements[ i ] );5839}5840}58415842// Copy the events from the original to the clone5843if ( dataAndEvents ) {5844if ( deepDataAndEvents ) {5845srcElements = srcElements || getAll( elem );5846destElements = destElements || getAll( clone );58475848for ( i = 0, l = srcElements.length; i < l; i++ ) {5849cloneCopyEvent( srcElements[ i ], destElements[ i ] );5850}5851} else {5852cloneCopyEvent( elem, clone );5853}5854}58555856// Preserve script evaluation history5857destElements = getAll( clone, "script" );5858if ( destElements.length > 0 ) {5859setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );5860}58615862// Return the cloned set5863return clone;5864},58655866cleanData: function( elems ) {5867var data, elem, type,5868special = jQuery.event.special,5869i = 0;58705871for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {5872if ( acceptData( elem ) ) {5873if ( ( data = elem[ dataPriv.expando ] ) ) {5874if ( data.events ) {5875for ( type in data.events ) {5876if ( special[ type ] ) {5877jQuery.event.remove( elem, type );58785879// This is a shortcut to avoid jQuery.event.remove's overhead5880} else {5881jQuery.removeEvent( elem, type, data.handle );5882}5883}5884}58855886// Support: Chrome <=35 - 45+5887// Assign undefined instead of using delete, see Data#remove5888elem[ dataPriv.expando ] = undefined;5889}5890if ( elem[ dataUser.expando ] ) {58915892// Support: Chrome <=35 - 45+5893// Assign undefined instead of using delete, see Data#remove5894elem[ dataUser.expando ] = undefined;5895}5896}5897}5898}5899} );59005901jQuery.fn.extend( {5902detach: function( selector ) {5903return remove( this, selector, true );5904},59055906remove: function( selector ) {5907return remove( this, selector );5908},59095910text: function( value ) {5911return access( this, function( value ) {5912return value === undefined ?5913jQuery.text( this ) :5914this.empty().each( function() {5915if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {5916this.textContent = value;5917}5918} );5919}, null, value, arguments.length );5920},59215922append: function() {5923return domManip( this, arguments, function( elem ) {5924if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {5925var target = manipulationTarget( this, elem );5926target.appendChild( elem );5927}5928} );5929},59305931prepend: function() {5932return domManip( this, arguments, function( elem ) {5933if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {5934var target = manipulationTarget( this, elem );5935target.insertBefore( elem, target.firstChild );5936}5937} );5938},59395940before: function() {5941return domManip( this, arguments, function( elem ) {5942if ( this.parentNode ) {5943this.parentNode.insertBefore( elem, this );5944}5945} );5946},59475948after: function() {5949return domManip( this, arguments, function( elem ) {5950if ( this.parentNode ) {5951this.parentNode.insertBefore( elem, this.nextSibling );5952}5953} );5954},59555956empty: function() {5957var elem,5958i = 0;59595960for ( ; ( elem = this[ i ] ) != null; i++ ) {5961if ( elem.nodeType === 1 ) {59625963// Prevent memory leaks5964jQuery.cleanData( getAll( elem, false ) );59655966// Remove any remaining nodes5967elem.textContent = "";5968}5969}59705971return this;5972},59735974clone: function( dataAndEvents, deepDataAndEvents ) {5975dataAndEvents = dataAndEvents == null ? false : dataAndEvents;5976deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;59775978return this.map( function() {5979return jQuery.clone( this, dataAndEvents, deepDataAndEvents );5980} );5981},59825983html: function( value ) {5984return access( this, function( value ) {5985var elem = this[ 0 ] || {},5986i = 0,5987l = this.length;59885989if ( value === undefined && elem.nodeType === 1 ) {5990return elem.innerHTML;5991}59925993// See if we can take a shortcut and just use innerHTML5994if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&5995!wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {59965997value = jQuery.htmlPrefilter( value );59985999try {6000for ( ; i < l; i++ ) {6001elem = this[ i ] || {};60026003// Remove element nodes and prevent memory leaks6004if ( elem.nodeType === 1 ) {6005jQuery.cleanData( getAll( elem, false ) );6006elem.innerHTML = value;6007}6008}60096010elem = 0;60116012// If using innerHTML throws an exception, use the fallback method6013} catch ( e ) {}6014}60156016if ( elem ) {6017this.empty().append( value );6018}6019}, null, value, arguments.length );6020},60216022replaceWith: function() {6023var ignored = [];60246025// Make the changes, replacing each non-ignored context element with the new content6026return domManip( this, arguments, function( elem ) {6027var parent = this.parentNode;60286029if ( jQuery.inArray( this, ignored ) < 0 ) {6030jQuery.cleanData( getAll( this ) );6031if ( parent ) {6032parent.replaceChild( elem, this );6033}6034}60356036// Force callback invocation6037}, ignored );6038}6039} );60406041jQuery.each( {6042appendTo: "append",6043prependTo: "prepend",6044insertBefore: "before",6045insertAfter: "after",6046replaceAll: "replaceWith"6047}, function( name, original ) {6048jQuery.fn[ name ] = function( selector ) {6049var elems,6050ret = [],6051insert = jQuery( selector ),6052last = insert.length - 1,6053i = 0;60546055for ( ; i <= last; i++ ) {6056elems = i === last ? this : this.clone( true );6057jQuery( insert[ i ] )[ original ]( elems );60586059// Support: Android <=4.0 only, PhantomJS 1 only6060// .get() because push.apply(_, arraylike) throws on ancient WebKit6061push.apply( ret, elems.get() );6062}60636064return this.pushStack( ret );6065};6066} );6067var rmargin = ( /^margin/ );60686069var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );60706071var getStyles = function( elem ) {60726073// Support: IE <=11 only, Firefox <=30 (#15098, #14150)6074// IE throws on elements created in popups6075// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"6076var view = elem.ownerDocument.defaultView;60776078if ( !view || !view.opener ) {6079view = window;6080}60816082return view.getComputedStyle( elem );6083};6084608560866087( function() {60886089// Executing both pixelPosition & boxSizingReliable tests require only one layout6090// so they're executed at the same time to save the second computation.6091function computeStyleTests() {60926093// This is a singleton, we need to execute it only once6094if ( !div ) {6095return;6096}60976098div.style.cssText =6099"box-sizing:border-box;" +6100"position:relative;display:block;" +6101"margin:auto;border:1px;padding:1px;" +6102"top:1%;width:50%";6103div.innerHTML = "";6104documentElement.appendChild( container );61056106var divStyle = window.getComputedStyle( div );6107pixelPositionVal = divStyle.top !== "1%";61086109// Support: Android 4.0 - 4.3 only, Firefox <=3 - 446110reliableMarginLeftVal = divStyle.marginLeft === "2px";6111boxSizingReliableVal = divStyle.width === "4px";61126113// Support: Android 4.0 - 4.3 only6114// Some styles come back with percentage values, even though they shouldn't6115div.style.marginRight = "50%";6116pixelMarginRightVal = divStyle.marginRight === "4px";61176118documentElement.removeChild( container );61196120// Nullify the div so it wouldn't be stored in the memory and6121// it will also be a sign that checks already performed6122div = null;6123}61246125var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal,6126container = document.createElement( "div" ),6127div = document.createElement( "div" );61286129// Finish early in limited (non-browser) environments6130if ( !div.style ) {6131return;6132}61336134// Support: IE <=9 - 11 only6135// Style of cloned element affects source element cloned (#8908)6136div.style.backgroundClip = "content-box";6137div.cloneNode( true ).style.backgroundClip = "";6138support.clearCloneStyle = div.style.backgroundClip === "content-box";61396140container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" +6141"padding:0;margin-top:1px;position:absolute";6142container.appendChild( div );61436144jQuery.extend( support, {6145pixelPosition: function() {6146computeStyleTests();6147return pixelPositionVal;6148},6149boxSizingReliable: function() {6150computeStyleTests();6151return boxSizingReliableVal;6152},6153pixelMarginRight: function() {6154computeStyleTests();6155return pixelMarginRightVal;6156},6157reliableMarginLeft: function() {6158computeStyleTests();6159return reliableMarginLeftVal;6160}6161} );6162} )();616361646165function curCSS( elem, name, computed ) {6166var width, minWidth, maxWidth, ret,61676168// Support: Firefox 51+6169// Retrieving style before computed somehow6170// fixes an issue with getting wrong values6171// on detached elements6172style = elem.style;61736174computed = computed || getStyles( elem );61756176// getPropertyValue is needed for:6177// .css('filter') (IE 9 only, #12537)6178// .css('--customProperty) (#3144)6179if ( computed ) {6180ret = computed.getPropertyValue( name ) || computed[ name ];61816182if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {6183ret = jQuery.style( elem, name );6184}61856186// A tribute to the "awesome hack by Dean Edwards"6187// Android Browser returns percentage for some values,6188// but width seems to be reliably pixels.6189// This is against the CSSOM draft spec:6190// https://drafts.csswg.org/cssom/#resolved-values6191if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {61926193// Remember the original values6194width = style.width;6195minWidth = style.minWidth;6196maxWidth = style.maxWidth;61976198// Put in the new values to get a computed value out6199style.minWidth = style.maxWidth = style.width = ret;6200ret = computed.width;62016202// Revert the changed values6203style.width = width;6204style.minWidth = minWidth;6205style.maxWidth = maxWidth;6206}6207}62086209return ret !== undefined ?62106211// Support: IE <=9 - 11 only6212// IE returns zIndex value as an integer.6213ret + "" :6214ret;6215}621662176218function addGetHookIf( conditionFn, hookFn ) {62196220// Define the hook, we'll check on the first run if it's really needed.6221return {6222get: function() {6223if ( conditionFn() ) {62246225// Hook not needed (or it's not possible to use it due6226// to missing dependency), remove it.6227delete this.get;6228return;6229}62306231// Hook needed; redefine it so that the support test is not executed again.6232return ( this.get = hookFn ).apply( this, arguments );6233}6234};6235}623662376238var62396240// Swappable if display is none or starts with table6241// except "table", "table-cell", or "table-caption"6242// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display6243rdisplayswap = /^(none|table(?!-c[ea]).+)/,6244rcustomProp = /^--/,6245cssShow = { position: "absolute", visibility: "hidden", display: "block" },6246cssNormalTransform = {6247letterSpacing: "0",6248fontWeight: "400"6249},62506251cssPrefixes = [ "Webkit", "Moz", "ms" ],6252emptyStyle = document.createElement( "div" ).style;62536254// Return a css property mapped to a potentially vendor prefixed property6255function vendorPropName( name ) {62566257// Shortcut for names that are not vendor prefixed6258if ( name in emptyStyle ) {6259return name;6260}62616262// Check for vendor prefixed names6263var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),6264i = cssPrefixes.length;62656266while ( i-- ) {6267name = cssPrefixes[ i ] + capName;6268if ( name in emptyStyle ) {6269return name;6270}6271}6272}62736274// Return a property mapped along what jQuery.cssProps suggests or to6275// a vendor prefixed property.6276function finalPropName( name ) {6277var ret = jQuery.cssProps[ name ];6278if ( !ret ) {6279ret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;6280}6281return ret;6282}62836284function setPositiveNumber( elem, value, subtract ) {62856286// Any relative (+/-) values have already been6287// normalized at this point6288var matches = rcssNum.exec( value );6289return matches ?62906291// Guard against undefined "subtract", e.g., when used as in cssHooks6292Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :6293value;6294}62956296function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {6297var i,6298val = 0;62996300// If we already have the right measurement, avoid augmentation6301if ( extra === ( isBorderBox ? "border" : "content" ) ) {6302i = 4;63036304// Otherwise initialize for horizontal or vertical properties6305} else {6306i = name === "width" ? 1 : 0;6307}63086309for ( ; i < 4; i += 2 ) {63106311// Both box models exclude margin, so add it if we want it6312if ( extra === "margin" ) {6313val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );6314}63156316if ( isBorderBox ) {63176318// border-box includes padding, so remove it if we want content6319if ( extra === "content" ) {6320val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );6321}63226323// At this point, extra isn't border nor margin, so remove border6324if ( extra !== "margin" ) {6325val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );6326}6327} else {63286329// At this point, extra isn't content, so add padding6330val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );63316332// At this point, extra isn't content nor padding, so add border6333if ( extra !== "padding" ) {6334val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );6335}6336}6337}63386339return val;6340}63416342function getWidthOrHeight( elem, name, extra ) {63436344// Start with computed style6345var valueIsBorderBox,6346styles = getStyles( elem ),6347val = curCSS( elem, name, styles ),6348isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";63496350// Computed unit is not pixels. Stop here and return.6351if ( rnumnonpx.test( val ) ) {6352return val;6353}63546355// Check for style in case a browser which returns unreliable values6356// for getComputedStyle silently falls back to the reliable elem.style6357valueIsBorderBox = isBorderBox &&6358( support.boxSizingReliable() || val === elem.style[ name ] );63596360// Fall back to offsetWidth/Height when value is "auto"6361// This happens for inline elements with no explicit setting (gh-3571)6362if ( val === "auto" ) {6363val = elem[ "offset" + name[ 0 ].toUpperCase() + name.slice( 1 ) ];6364}63656366// Normalize "", auto, and prepare for extra6367val = parseFloat( val ) || 0;63686369// Use the active box-sizing model to add/subtract irrelevant styles6370return ( val +6371augmentWidthOrHeight(6372elem,6373name,6374extra || ( isBorderBox ? "border" : "content" ),6375valueIsBorderBox,6376styles6377)6378) + "px";6379}63806381jQuery.extend( {63826383// Add in style property hooks for overriding the default6384// behavior of getting and setting a style property6385cssHooks: {6386opacity: {6387get: function( elem, computed ) {6388if ( computed ) {63896390// We should always get a number back from opacity6391var ret = curCSS( elem, "opacity" );6392return ret === "" ? "1" : ret;6393}6394}6395}6396},63976398// Don't automatically add "px" to these possibly-unitless properties6399cssNumber: {6400"animationIterationCount": true,6401"columnCount": true,6402"fillOpacity": true,6403"flexGrow": true,6404"flexShrink": true,6405"fontWeight": true,6406"lineHeight": true,6407"opacity": true,6408"order": true,6409"orphans": true,6410"widows": true,6411"zIndex": true,6412"zoom": true6413},64146415// Add in properties whose names you wish to fix before6416// setting or getting the value6417cssProps: {6418"float": "cssFloat"6419},64206421// Get and set the style property on a DOM Node6422style: function( elem, name, value, extra ) {64236424// Don't set styles on text and comment nodes6425if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {6426return;6427}64286429// Make sure that we're working with the right name6430var ret, type, hooks,6431origName = jQuery.camelCase( name ),6432isCustomProp = rcustomProp.test( name ),6433style = elem.style;64346435// Make sure that we're working with the right name. We don't6436// want to query the value if it is a CSS custom property6437// since they are user-defined.6438if ( !isCustomProp ) {6439name = finalPropName( origName );6440}64416442// Gets hook for the prefixed version, then unprefixed version6443hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];64446445// Check if we're setting a value6446if ( value !== undefined ) {6447type = typeof value;64486449// Convert "+=" or "-=" to relative numbers (#7345)6450if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {6451value = adjustCSS( elem, name, ret );64526453// Fixes bug #92376454type = "number";6455}64566457// Make sure that null and NaN values aren't set (#7116)6458if ( value == null || value !== value ) {6459return;6460}64616462// If a number was passed in, add the unit (except for certain CSS properties)6463if ( type === "number" ) {6464value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );6465}64666467// background-* props affect original clone's values6468if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {6469style[ name ] = "inherit";6470}64716472// If a hook was provided, use that value, otherwise just set the specified value6473if ( !hooks || !( "set" in hooks ) ||6474( value = hooks.set( elem, value, extra ) ) !== undefined ) {64756476if ( isCustomProp ) {6477style.setProperty( name, value );6478} else {6479style[ name ] = value;6480}6481}64826483} else {64846485// If a hook was provided get the non-computed value from there6486if ( hooks && "get" in hooks &&6487( ret = hooks.get( elem, false, extra ) ) !== undefined ) {64886489return ret;6490}64916492// Otherwise just get the value from the style object6493return style[ name ];6494}6495},64966497css: function( elem, name, extra, styles ) {6498var val, num, hooks,6499origName = jQuery.camelCase( name ),6500isCustomProp = rcustomProp.test( name );65016502// Make sure that we're working with the right name. We don't6503// want to modify the value if it is a CSS custom property6504// since they are user-defined.6505if ( !isCustomProp ) {6506name = finalPropName( origName );6507}65086509// Try prefixed name followed by the unprefixed name6510hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];65116512// If a hook was provided get the computed value from there6513if ( hooks && "get" in hooks ) {6514val = hooks.get( elem, true, extra );6515}65166517// Otherwise, if a way to get the computed value exists, use that6518if ( val === undefined ) {6519val = curCSS( elem, name, styles );6520}65216522// Convert "normal" to computed value6523if ( val === "normal" && name in cssNormalTransform ) {6524val = cssNormalTransform[ name ];6525}65266527// Make numeric if forced or a qualifier was provided and val looks numeric6528if ( extra === "" || extra ) {6529num = parseFloat( val );6530return extra === true || isFinite( num ) ? num || 0 : val;6531}65326533return val;6534}6535} );65366537jQuery.each( [ "height", "width" ], function( i, name ) {6538jQuery.cssHooks[ name ] = {6539get: function( elem, computed, extra ) {6540if ( computed ) {65416542// Certain elements can have dimension info if we invisibly show them6543// but it must have a current display style that would benefit6544return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&65456546// Support: Safari 8+6547// Table columns in Safari have non-zero offsetWidth & zero6548// getBoundingClientRect().width unless display is changed.6549// Support: IE <=11 only6550// Running getBoundingClientRect on a disconnected node6551// in IE throws an error.6552( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?6553swap( elem, cssShow, function() {6554return getWidthOrHeight( elem, name, extra );6555} ) :6556getWidthOrHeight( elem, name, extra );6557}6558},65596560set: function( elem, value, extra ) {6561var matches,6562styles = extra && getStyles( elem ),6563subtract = extra && augmentWidthOrHeight(6564elem,6565name,6566extra,6567jQuery.css( elem, "boxSizing", false, styles ) === "border-box",6568styles6569);65706571// Convert to pixels if value adjustment is needed6572if ( subtract && ( matches = rcssNum.exec( value ) ) &&6573( matches[ 3 ] || "px" ) !== "px" ) {65746575elem.style[ name ] = value;6576value = jQuery.css( elem, name );6577}65786579return setPositiveNumber( elem, value, subtract );6580}6581};6582} );65836584jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,6585function( elem, computed ) {6586if ( computed ) {6587return ( parseFloat( curCSS( elem, "marginLeft" ) ) ||6588elem.getBoundingClientRect().left -6589swap( elem, { marginLeft: 0 }, function() {6590return elem.getBoundingClientRect().left;6591} )6592) + "px";6593}6594}6595);65966597// These hooks are used by animate to expand properties6598jQuery.each( {6599margin: "",6600padding: "",6601border: "Width"6602}, function( prefix, suffix ) {6603jQuery.cssHooks[ prefix + suffix ] = {6604expand: function( value ) {6605var i = 0,6606expanded = {},66076608// Assumes a single number if not a string6609parts = typeof value === "string" ? value.split( " " ) : [ value ];66106611for ( ; i < 4; i++ ) {6612expanded[ prefix + cssExpand[ i ] + suffix ] =6613parts[ i ] || parts[ i - 2 ] || parts[ 0 ];6614}66156616return expanded;6617}6618};66196620if ( !rmargin.test( prefix ) ) {6621jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;6622}6623} );66246625jQuery.fn.extend( {6626css: function( name, value ) {6627return access( this, function( elem, name, value ) {6628var styles, len,6629map = {},6630i = 0;66316632if ( Array.isArray( name ) ) {6633styles = getStyles( elem );6634len = name.length;66356636for ( ; i < len; i++ ) {6637map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );6638}66396640return map;6641}66426643return value !== undefined ?6644jQuery.style( elem, name, value ) :6645jQuery.css( elem, name );6646}, name, value, arguments.length > 1 );6647}6648} );664966506651function Tween( elem, options, prop, end, easing ) {6652return new Tween.prototype.init( elem, options, prop, end, easing );6653}6654jQuery.Tween = Tween;66556656Tween.prototype = {6657constructor: Tween,6658init: function( elem, options, prop, end, easing, unit ) {6659this.elem = elem;6660this.prop = prop;6661this.easing = easing || jQuery.easing._default;6662this.options = options;6663this.start = this.now = this.cur();6664this.end = end;6665this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );6666},6667cur: function() {6668var hooks = Tween.propHooks[ this.prop ];66696670return hooks && hooks.get ?6671hooks.get( this ) :6672Tween.propHooks._default.get( this );6673},6674run: function( percent ) {6675var eased,6676hooks = Tween.propHooks[ this.prop ];66776678if ( this.options.duration ) {6679this.pos = eased = jQuery.easing[ this.easing ](6680percent, this.options.duration * percent, 0, 1, this.options.duration6681);6682} else {6683this.pos = eased = percent;6684}6685this.now = ( this.end - this.start ) * eased + this.start;66866687if ( this.options.step ) {6688this.options.step.call( this.elem, this.now, this );6689}66906691if ( hooks && hooks.set ) {6692hooks.set( this );6693} else {6694Tween.propHooks._default.set( this );6695}6696return this;6697}6698};66996700Tween.prototype.init.prototype = Tween.prototype;67016702Tween.propHooks = {6703_default: {6704get: function( tween ) {6705var result;67066707// Use a property on the element directly when it is not a DOM element,6708// or when there is no matching style property that exists.6709if ( tween.elem.nodeType !== 1 ||6710tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {6711return tween.elem[ tween.prop ];6712}67136714// Passing an empty string as a 3rd parameter to .css will automatically6715// attempt a parseFloat and fallback to a string if the parse fails.6716// Simple values such as "10px" are parsed to Float;6717// complex values such as "rotate(1rad)" are returned as-is.6718result = jQuery.css( tween.elem, tween.prop, "" );67196720// Empty strings, null, undefined and "auto" are converted to 0.6721return !result || result === "auto" ? 0 : result;6722},6723set: function( tween ) {67246725// Use step hook for back compat.6726// Use cssHook if its there.6727// Use .style if available and use plain properties where available.6728if ( jQuery.fx.step[ tween.prop ] ) {6729jQuery.fx.step[ tween.prop ]( tween );6730} else if ( tween.elem.nodeType === 1 &&6731( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||6732jQuery.cssHooks[ tween.prop ] ) ) {6733jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );6734} else {6735tween.elem[ tween.prop ] = tween.now;6736}6737}6738}6739};67406741// Support: IE <=9 only6742// Panic based approach to setting things on disconnected nodes6743Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {6744set: function( tween ) {6745if ( tween.elem.nodeType && tween.elem.parentNode ) {6746tween.elem[ tween.prop ] = tween.now;6747}6748}6749};67506751jQuery.easing = {6752linear: function( p ) {6753return p;6754},6755swing: function( p ) {6756return 0.5 - Math.cos( p * Math.PI ) / 2;6757},6758_default: "swing"6759};67606761jQuery.fx = Tween.prototype.init;67626763// Back compat <1.8 extension point6764jQuery.fx.step = {};67656766676767686769var6770fxNow, inProgress,6771rfxtypes = /^(?:toggle|show|hide)$/,6772rrun = /queueHooks$/;67736774function schedule() {6775if ( inProgress ) {6776if ( document.hidden === false && window.requestAnimationFrame ) {6777window.requestAnimationFrame( schedule );6778} else {6779window.setTimeout( schedule, jQuery.fx.interval );6780}67816782jQuery.fx.tick();6783}6784}67856786// Animations created synchronously will run synchronously6787function createFxNow() {6788window.setTimeout( function() {6789fxNow = undefined;6790} );6791return ( fxNow = jQuery.now() );6792}67936794// Generate parameters to create a standard animation6795function genFx( type, includeWidth ) {6796var which,6797i = 0,6798attrs = { height: type };67996800// If we include width, step value is 1 to do all cssExpand values,6801// otherwise step value is 2 to skip over Left and Right6802includeWidth = includeWidth ? 1 : 0;6803for ( ; i < 4; i += 2 - includeWidth ) {6804which = cssExpand[ i ];6805attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;6806}68076808if ( includeWidth ) {6809attrs.opacity = attrs.width = type;6810}68116812return attrs;6813}68146815function createTween( value, prop, animation ) {6816var tween,6817collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ),6818index = 0,6819length = collection.length;6820for ( ; index < length; index++ ) {6821if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {68226823// We're done with this property6824return tween;6825}6826}6827}68286829function defaultPrefilter( elem, props, opts ) {6830var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,6831isBox = "width" in props || "height" in props,6832anim = this,6833orig = {},6834style = elem.style,6835hidden = elem.nodeType && isHiddenWithinTree( elem ),6836dataShow = dataPriv.get( elem, "fxshow" );68376838// Queue-skipping animations hijack the fx hooks6839if ( !opts.queue ) {6840hooks = jQuery._queueHooks( elem, "fx" );6841if ( hooks.unqueued == null ) {6842hooks.unqueued = 0;6843oldfire = hooks.empty.fire;6844hooks.empty.fire = function() {6845if ( !hooks.unqueued ) {6846oldfire();6847}6848};6849}6850hooks.unqueued++;68516852anim.always( function() {68536854// Ensure the complete handler is called before this completes6855anim.always( function() {6856hooks.unqueued--;6857if ( !jQuery.queue( elem, "fx" ).length ) {6858hooks.empty.fire();6859}6860} );6861} );6862}68636864// Detect show/hide animations6865for ( prop in props ) {6866value = props[ prop ];6867if ( rfxtypes.test( value ) ) {6868delete props[ prop ];6869toggle = toggle || value === "toggle";6870if ( value === ( hidden ? "hide" : "show" ) ) {68716872// Pretend to be hidden if this is a "show" and6873// there is still data from a stopped show/hide6874if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {6875hidden = true;68766877// Ignore all other no-op show/hide data6878} else {6879continue;6880}6881}6882orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );6883}6884}68856886// Bail out if this is a no-op like .hide().hide()6887propTween = !jQuery.isEmptyObject( props );6888if ( !propTween && jQuery.isEmptyObject( orig ) ) {6889return;6890}68916892// Restrict "overflow" and "display" styles during box animations6893if ( isBox && elem.nodeType === 1 ) {68946895// Support: IE <=9 - 11, Edge 12 - 136896// Record all 3 overflow attributes because IE does not infer the shorthand6897// from identically-valued overflowX and overflowY6898opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];68996900// Identify a display type, preferring old show/hide data over the CSS cascade6901restoreDisplay = dataShow && dataShow.display;6902if ( restoreDisplay == null ) {6903restoreDisplay = dataPriv.get( elem, "display" );6904}6905display = jQuery.css( elem, "display" );6906if ( display === "none" ) {6907if ( restoreDisplay ) {6908display = restoreDisplay;6909} else {69106911// Get nonempty value(s) by temporarily forcing visibility6912showHide( [ elem ], true );6913restoreDisplay = elem.style.display || restoreDisplay;6914display = jQuery.css( elem, "display" );6915showHide( [ elem ] );6916}6917}69186919// Animate inline elements as inline-block6920if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) {6921if ( jQuery.css( elem, "float" ) === "none" ) {69226923// Restore the original display value at the end of pure show/hide animations6924if ( !propTween ) {6925anim.done( function() {6926style.display = restoreDisplay;6927} );6928if ( restoreDisplay == null ) {6929display = style.display;6930restoreDisplay = display === "none" ? "" : display;6931}6932}6933style.display = "inline-block";6934}6935}6936}69376938if ( opts.overflow ) {6939style.overflow = "hidden";6940anim.always( function() {6941style.overflow = opts.overflow[ 0 ];6942style.overflowX = opts.overflow[ 1 ];6943style.overflowY = opts.overflow[ 2 ];6944} );6945}69466947// Implement show/hide animations6948propTween = false;6949for ( prop in orig ) {69506951// General show/hide setup for this element animation6952if ( !propTween ) {6953if ( dataShow ) {6954if ( "hidden" in dataShow ) {6955hidden = dataShow.hidden;6956}6957} else {6958dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } );6959}69606961// Store hidden/visible for toggle so `.stop().toggle()` "reverses"6962if ( toggle ) {6963dataShow.hidden = !hidden;6964}69656966// Show elements before animating them6967if ( hidden ) {6968showHide( [ elem ], true );6969}69706971/* eslint-disable no-loop-func */69726973anim.done( function() {69746975/* eslint-enable no-loop-func */69766977// The final step of a "hide" animation is actually hiding the element6978if ( !hidden ) {6979showHide( [ elem ] );6980}6981dataPriv.remove( elem, "fxshow" );6982for ( prop in orig ) {6983jQuery.style( elem, prop, orig[ prop ] );6984}6985} );6986}69876988// Per-property setup6989propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );6990if ( !( prop in dataShow ) ) {6991dataShow[ prop ] = propTween.start;6992if ( hidden ) {6993propTween.end = propTween.start;6994propTween.start = 0;6995}6996}6997}6998}69997000function propFilter( props, specialEasing ) {7001var index, name, easing, value, hooks;70027003// camelCase, specialEasing and expand cssHook pass7004for ( index in props ) {7005name = jQuery.camelCase( index );7006easing = specialEasing[ name ];7007value = props[ index ];7008if ( Array.isArray( value ) ) {7009easing = value[ 1 ];7010value = props[ index ] = value[ 0 ];7011}70127013if ( index !== name ) {7014props[ name ] = value;7015delete props[ index ];7016}70177018hooks = jQuery.cssHooks[ name ];7019if ( hooks && "expand" in hooks ) {7020value = hooks.expand( value );7021delete props[ name ];70227023// Not quite $.extend, this won't overwrite existing keys.7024// Reusing 'index' because we have the correct "name"7025for ( index in value ) {7026if ( !( index in props ) ) {7027props[ index ] = value[ index ];7028specialEasing[ index ] = easing;7029}7030}7031} else {7032specialEasing[ name ] = easing;7033}7034}7035}70367037function Animation( elem, properties, options ) {7038var result,7039stopped,7040index = 0,7041length = Animation.prefilters.length,7042deferred = jQuery.Deferred().always( function() {70437044// Don't match elem in the :animated selector7045delete tick.elem;7046} ),7047tick = function() {7048if ( stopped ) {7049return false;7050}7051var currentTime = fxNow || createFxNow(),7052remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),70537054// Support: Android 2.3 only7055// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)7056temp = remaining / animation.duration || 0,7057percent = 1 - temp,7058index = 0,7059length = animation.tweens.length;70607061for ( ; index < length; index++ ) {7062animation.tweens[ index ].run( percent );7063}70647065deferred.notifyWith( elem, [ animation, percent, remaining ] );70667067// If there's more to do, yield7068if ( percent < 1 && length ) {7069return remaining;7070}70717072// If this was an empty animation, synthesize a final progress notification7073if ( !length ) {7074deferred.notifyWith( elem, [ animation, 1, 0 ] );7075}70767077// Resolve the animation and report its conclusion7078deferred.resolveWith( elem, [ animation ] );7079return false;7080},7081animation = deferred.promise( {7082elem: elem,7083props: jQuery.extend( {}, properties ),7084opts: jQuery.extend( true, {7085specialEasing: {},7086easing: jQuery.easing._default7087}, options ),7088originalProperties: properties,7089originalOptions: options,7090startTime: fxNow || createFxNow(),7091duration: options.duration,7092tweens: [],7093createTween: function( prop, end ) {7094var tween = jQuery.Tween( elem, animation.opts, prop, end,7095animation.opts.specialEasing[ prop ] || animation.opts.easing );7096animation.tweens.push( tween );7097return tween;7098},7099stop: function( gotoEnd ) {7100var index = 0,71017102// If we are going to the end, we want to run all the tweens7103// otherwise we skip this part7104length = gotoEnd ? animation.tweens.length : 0;7105if ( stopped ) {7106return this;7107}7108stopped = true;7109for ( ; index < length; index++ ) {7110animation.tweens[ index ].run( 1 );7111}71127113// Resolve when we played the last frame; otherwise, reject7114if ( gotoEnd ) {7115deferred.notifyWith( elem, [ animation, 1, 0 ] );7116deferred.resolveWith( elem, [ animation, gotoEnd ] );7117} else {7118deferred.rejectWith( elem, [ animation, gotoEnd ] );7119}7120return this;7121}7122} ),7123props = animation.props;71247125propFilter( props, animation.opts.specialEasing );71267127for ( ; index < length; index++ ) {7128result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );7129if ( result ) {7130if ( jQuery.isFunction( result.stop ) ) {7131jQuery._queueHooks( animation.elem, animation.opts.queue ).stop =7132jQuery.proxy( result.stop, result );7133}7134return result;7135}7136}71377138jQuery.map( props, createTween, animation );71397140if ( jQuery.isFunction( animation.opts.start ) ) {7141animation.opts.start.call( elem, animation );7142}71437144// Attach callbacks from options7145animation7146.progress( animation.opts.progress )7147.done( animation.opts.done, animation.opts.complete )7148.fail( animation.opts.fail )7149.always( animation.opts.always );71507151jQuery.fx.timer(7152jQuery.extend( tick, {7153elem: elem,7154anim: animation,7155queue: animation.opts.queue7156} )7157);71587159return animation;7160}71617162jQuery.Animation = jQuery.extend( Animation, {71637164tweeners: {7165"*": [ function( prop, value ) {7166var tween = this.createTween( prop, value );7167adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );7168return tween;7169} ]7170},71717172tweener: function( props, callback ) {7173if ( jQuery.isFunction( props ) ) {7174callback = props;7175props = [ "*" ];7176} else {7177props = props.match( rnothtmlwhite );7178}71797180var prop,7181index = 0,7182length = props.length;71837184for ( ; index < length; index++ ) {7185prop = props[ index ];7186Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];7187Animation.tweeners[ prop ].unshift( callback );7188}7189},71907191prefilters: [ defaultPrefilter ],71927193prefilter: function( callback, prepend ) {7194if ( prepend ) {7195Animation.prefilters.unshift( callback );7196} else {7197Animation.prefilters.push( callback );7198}7199}7200} );72017202jQuery.speed = function( speed, easing, fn ) {7203var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {7204complete: fn || !fn && easing ||7205jQuery.isFunction( speed ) && speed,7206duration: speed,7207easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing7208};72097210// Go to the end state if fx are off7211if ( jQuery.fx.off ) {7212opt.duration = 0;72137214} else {7215if ( typeof opt.duration !== "number" ) {7216if ( opt.duration in jQuery.fx.speeds ) {7217opt.duration = jQuery.fx.speeds[ opt.duration ];72187219} else {7220opt.duration = jQuery.fx.speeds._default;7221}7222}7223}72247225// Normalize opt.queue - true/undefined/null -> "fx"7226if ( opt.queue == null || opt.queue === true ) {7227opt.queue = "fx";7228}72297230// Queueing7231opt.old = opt.complete;72327233opt.complete = function() {7234if ( jQuery.isFunction( opt.old ) ) {7235opt.old.call( this );7236}72377238if ( opt.queue ) {7239jQuery.dequeue( this, opt.queue );7240}7241};72427243return opt;7244};72457246jQuery.fn.extend( {7247fadeTo: function( speed, to, easing, callback ) {72487249// Show any hidden elements after setting opacity to 07250return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show()72517252// Animate to the value specified7253.end().animate( { opacity: to }, speed, easing, callback );7254},7255animate: function( prop, speed, easing, callback ) {7256var empty = jQuery.isEmptyObject( prop ),7257optall = jQuery.speed( speed, easing, callback ),7258doAnimation = function() {72597260// Operate on a copy of prop so per-property easing won't be lost7261var anim = Animation( this, jQuery.extend( {}, prop ), optall );72627263// Empty animations, or finishing resolves immediately7264if ( empty || dataPriv.get( this, "finish" ) ) {7265anim.stop( true );7266}7267};7268doAnimation.finish = doAnimation;72697270return empty || optall.queue === false ?7271this.each( doAnimation ) :7272this.queue( optall.queue, doAnimation );7273},7274stop: function( type, clearQueue, gotoEnd ) {7275var stopQueue = function( hooks ) {7276var stop = hooks.stop;7277delete hooks.stop;7278stop( gotoEnd );7279};72807281if ( typeof type !== "string" ) {7282gotoEnd = clearQueue;7283clearQueue = type;7284type = undefined;7285}7286if ( clearQueue && type !== false ) {7287this.queue( type || "fx", [] );7288}72897290return this.each( function() {7291var dequeue = true,7292index = type != null && type + "queueHooks",7293timers = jQuery.timers,7294data = dataPriv.get( this );72957296if ( index ) {7297if ( data[ index ] && data[ index ].stop ) {7298stopQueue( data[ index ] );7299}7300} else {7301for ( index in data ) {7302if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {7303stopQueue( data[ index ] );7304}7305}7306}73077308for ( index = timers.length; index--; ) {7309if ( timers[ index ].elem === this &&7310( type == null || timers[ index ].queue === type ) ) {73117312timers[ index ].anim.stop( gotoEnd );7313dequeue = false;7314timers.splice( index, 1 );7315}7316}73177318// Start the next in the queue if the last step wasn't forced.7319// Timers currently will call their complete callbacks, which7320// will dequeue but only if they were gotoEnd.7321if ( dequeue || !gotoEnd ) {7322jQuery.dequeue( this, type );7323}7324} );7325},7326finish: function( type ) {7327if ( type !== false ) {7328type = type || "fx";7329}7330return this.each( function() {7331var index,7332data = dataPriv.get( this ),7333queue = data[ type + "queue" ],7334hooks = data[ type + "queueHooks" ],7335timers = jQuery.timers,7336length = queue ? queue.length : 0;73377338// Enable finishing flag on private data7339data.finish = true;73407341// Empty the queue first7342jQuery.queue( this, type, [] );73437344if ( hooks && hooks.stop ) {7345hooks.stop.call( this, true );7346}73477348// Look for any active animations, and finish them7349for ( index = timers.length; index--; ) {7350if ( timers[ index ].elem === this && timers[ index ].queue === type ) {7351timers[ index ].anim.stop( true );7352timers.splice( index, 1 );7353}7354}73557356// Look for any animations in the old queue and finish them7357for ( index = 0; index < length; index++ ) {7358if ( queue[ index ] && queue[ index ].finish ) {7359queue[ index ].finish.call( this );7360}7361}73627363// Turn off finishing flag7364delete data.finish;7365} );7366}7367} );73687369jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) {7370var cssFn = jQuery.fn[ name ];7371jQuery.fn[ name ] = function( speed, easing, callback ) {7372return speed == null || typeof speed === "boolean" ?7373cssFn.apply( this, arguments ) :7374this.animate( genFx( name, true ), speed, easing, callback );7375};7376} );73777378// Generate shortcuts for custom animations7379jQuery.each( {7380slideDown: genFx( "show" ),7381slideUp: genFx( "hide" ),7382slideToggle: genFx( "toggle" ),7383fadeIn: { opacity: "show" },7384fadeOut: { opacity: "hide" },7385fadeToggle: { opacity: "toggle" }7386}, function( name, props ) {7387jQuery.fn[ name ] = function( speed, easing, callback ) {7388return this.animate( props, speed, easing, callback );7389};7390} );73917392jQuery.timers = [];7393jQuery.fx.tick = function() {7394var timer,7395i = 0,7396timers = jQuery.timers;73977398fxNow = jQuery.now();73997400for ( ; i < timers.length; i++ ) {7401timer = timers[ i ];74027403// Run the timer and safely remove it when done (allowing for external removal)7404if ( !timer() && timers[ i ] === timer ) {7405timers.splice( i--, 1 );7406}7407}74087409if ( !timers.length ) {7410jQuery.fx.stop();7411}7412fxNow = undefined;7413};74147415jQuery.fx.timer = function( timer ) {7416jQuery.timers.push( timer );7417jQuery.fx.start();7418};74197420jQuery.fx.interval = 13;7421jQuery.fx.start = function() {7422if ( inProgress ) {7423return;7424}74257426inProgress = true;7427schedule();7428};74297430jQuery.fx.stop = function() {7431inProgress = null;7432};74337434jQuery.fx.speeds = {7435slow: 600,7436fast: 200,74377438// Default speed7439_default: 4007440};744174427443// Based off of the plugin by Clint Helfers, with permission.7444// https://web.archive.org/web/20100324014747/https://blindsignals.com/index.php/2009/07/jquery-delay/7445jQuery.fn.delay = function( time, type ) {7446time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;7447type = type || "fx";74487449return this.queue( type, function( next, hooks ) {7450var timeout = window.setTimeout( next, time );7451hooks.stop = function() {7452window.clearTimeout( timeout );7453};7454} );7455};745674577458( function() {7459var input = document.createElement( "input" ),7460select = document.createElement( "select" ),7461opt = select.appendChild( document.createElement( "option" ) );74627463input.type = "checkbox";74647465// Support: Android <=4.3 only7466// Default value for a checkbox should be "on"7467support.checkOn = input.value !== "";74687469// Support: IE <=11 only7470// Must access selectedIndex to make default options select7471support.optSelected = opt.selected;74727473// Support: IE <=11 only7474// An input loses its value after becoming a radio7475input = document.createElement( "input" );7476input.value = "t";7477input.type = "radio";7478support.radioValue = input.value === "t";7479} )();748074817482var boolHook,7483attrHandle = jQuery.expr.attrHandle;74847485jQuery.fn.extend( {7486attr: function( name, value ) {7487return access( this, jQuery.attr, name, value, arguments.length > 1 );7488},74897490removeAttr: function( name ) {7491return this.each( function() {7492jQuery.removeAttr( this, name );7493} );7494}7495} );74967497jQuery.extend( {7498attr: function( elem, name, value ) {7499var ret, hooks,7500nType = elem.nodeType;75017502// Don't get/set attributes on text, comment and attribute nodes7503if ( nType === 3 || nType === 8 || nType === 2 ) {7504return;7505}75067507// Fallback to prop when attributes are not supported7508if ( typeof elem.getAttribute === "undefined" ) {7509return jQuery.prop( elem, name, value );7510}75117512// Attribute hooks are determined by the lowercase version7513// Grab necessary hook if one is defined7514if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {7515hooks = jQuery.attrHooks[ name.toLowerCase() ] ||7516( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );7517}75187519if ( value !== undefined ) {7520if ( value === null ) {7521jQuery.removeAttr( elem, name );7522return;7523}75247525if ( hooks && "set" in hooks &&7526( ret = hooks.set( elem, value, name ) ) !== undefined ) {7527return ret;7528}75297530elem.setAttribute( name, value + "" );7531return value;7532}75337534if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {7535return ret;7536}75377538ret = jQuery.find.attr( elem, name );75397540// Non-existent attributes return null, we normalize to undefined7541return ret == null ? undefined : ret;7542},75437544attrHooks: {7545type: {7546set: function( elem, value ) {7547if ( !support.radioValue && value === "radio" &&7548nodeName( elem, "input" ) ) {7549var val = elem.value;7550elem.setAttribute( "type", value );7551if ( val ) {7552elem.value = val;7553}7554return value;7555}7556}7557}7558},75597560removeAttr: function( elem, value ) {7561var name,7562i = 0,75637564// Attribute names can contain non-HTML whitespace characters7565// https://html.spec.whatwg.org/multipage/syntax.html#attributes-27566attrNames = value && value.match( rnothtmlwhite );75677568if ( attrNames && elem.nodeType === 1 ) {7569while ( ( name = attrNames[ i++ ] ) ) {7570elem.removeAttribute( name );7571}7572}7573}7574} );75757576// Hooks for boolean attributes7577boolHook = {7578set: function( elem, value, name ) {7579if ( value === false ) {75807581// Remove boolean attributes when set to false7582jQuery.removeAttr( elem, name );7583} else {7584elem.setAttribute( name, name );7585}7586return name;7587}7588};75897590jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {7591var getter = attrHandle[ name ] || jQuery.find.attr;75927593attrHandle[ name ] = function( elem, name, isXML ) {7594var ret, handle,7595lowercaseName = name.toLowerCase();75967597if ( !isXML ) {75987599// Avoid an infinite loop by temporarily removing this function from the getter7600handle = attrHandle[ lowercaseName ];7601attrHandle[ lowercaseName ] = ret;7602ret = getter( elem, name, isXML ) != null ?7603lowercaseName :7604null;7605attrHandle[ lowercaseName ] = handle;7606}7607return ret;7608};7609} );76107611761276137614var rfocusable = /^(?:input|select|textarea|button)$/i,7615rclickable = /^(?:a|area)$/i;76167617jQuery.fn.extend( {7618prop: function( name, value ) {7619return access( this, jQuery.prop, name, value, arguments.length > 1 );7620},76217622removeProp: function( name ) {7623return this.each( function() {7624delete this[ jQuery.propFix[ name ] || name ];7625} );7626}7627} );76287629jQuery.extend( {7630prop: function( elem, name, value ) {7631var ret, hooks,7632nType = elem.nodeType;76337634// Don't get/set properties on text, comment and attribute nodes7635if ( nType === 3 || nType === 8 || nType === 2 ) {7636return;7637}76387639if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {76407641// Fix name and attach hooks7642name = jQuery.propFix[ name ] || name;7643hooks = jQuery.propHooks[ name ];7644}76457646if ( value !== undefined ) {7647if ( hooks && "set" in hooks &&7648( ret = hooks.set( elem, value, name ) ) !== undefined ) {7649return ret;7650}76517652return ( elem[ name ] = value );7653}76547655if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {7656return ret;7657}76587659return elem[ name ];7660},76617662propHooks: {7663tabIndex: {7664get: function( elem ) {76657666// Support: IE <=9 - 11 only7667// elem.tabIndex doesn't always return the7668// correct value when it hasn't been explicitly set7669// https://web.archive.org/web/20141116233347/https://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/7670// Use proper attribute retrieval(#12072)7671var tabindex = jQuery.find.attr( elem, "tabindex" );76727673if ( tabindex ) {7674return parseInt( tabindex, 10 );7675}76767677if (7678rfocusable.test( elem.nodeName ) ||7679rclickable.test( elem.nodeName ) &&7680elem.href7681) {7682return 0;7683}76847685return -1;7686}7687}7688},76897690propFix: {7691"for": "htmlFor",7692"class": "className"7693}7694} );76957696// Support: IE <=11 only7697// Accessing the selectedIndex property7698// forces the browser to respect setting selected7699// on the option7700// The getter ensures a default option is selected7701// when in an optgroup7702// eslint rule "no-unused-expressions" is disabled for this code7703// since it considers such accessions noop7704if ( !support.optSelected ) {7705jQuery.propHooks.selected = {7706get: function( elem ) {77077708/* eslint no-unused-expressions: "off" */77097710var parent = elem.parentNode;7711if ( parent && parent.parentNode ) {7712parent.parentNode.selectedIndex;7713}7714return null;7715},7716set: function( elem ) {77177718/* eslint no-unused-expressions: "off" */77197720var parent = elem.parentNode;7721if ( parent ) {7722parent.selectedIndex;77237724if ( parent.parentNode ) {7725parent.parentNode.selectedIndex;7726}7727}7728}7729};7730}77317732jQuery.each( [7733"tabIndex",7734"readOnly",7735"maxLength",7736"cellSpacing",7737"cellPadding",7738"rowSpan",7739"colSpan",7740"useMap",7741"frameBorder",7742"contentEditable"7743], function() {7744jQuery.propFix[ this.toLowerCase() ] = this;7745} );77467747774877497750// Strip and collapse whitespace according to HTML spec7751// https://html.spec.whatwg.org/multipage/infrastructure.html#strip-and-collapse-whitespace7752function stripAndCollapse( value ) {7753var tokens = value.match( rnothtmlwhite ) || [];7754return tokens.join( " " );7755}775677577758function getClass( elem ) {7759return elem.getAttribute && elem.getAttribute( "class" ) || "";7760}77617762jQuery.fn.extend( {7763addClass: function( value ) {7764var classes, elem, cur, curValue, clazz, j, finalValue,7765i = 0;77667767if ( jQuery.isFunction( value ) ) {7768return this.each( function( j ) {7769jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );7770} );7771}77727773if ( typeof value === "string" && value ) {7774classes = value.match( rnothtmlwhite ) || [];77757776while ( ( elem = this[ i++ ] ) ) {7777curValue = getClass( elem );7778cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );77797780if ( cur ) {7781j = 0;7782while ( ( clazz = classes[ j++ ] ) ) {7783if ( cur.indexOf( " " + clazz + " " ) < 0 ) {7784cur += clazz + " ";7785}7786}77877788// Only assign if different to avoid unneeded rendering.7789finalValue = stripAndCollapse( cur );7790if ( curValue !== finalValue ) {7791elem.setAttribute( "class", finalValue );7792}7793}7794}7795}77967797return this;7798},77997800removeClass: function( value ) {7801var classes, elem, cur, curValue, clazz, j, finalValue,7802i = 0;78037804if ( jQuery.isFunction( value ) ) {7805return this.each( function( j ) {7806jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );7807} );7808}78097810if ( !arguments.length ) {7811return this.attr( "class", "" );7812}78137814if ( typeof value === "string" && value ) {7815classes = value.match( rnothtmlwhite ) || [];78167817while ( ( elem = this[ i++ ] ) ) {7818curValue = getClass( elem );78197820// This expression is here for better compressibility (see addClass)7821cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );78227823if ( cur ) {7824j = 0;7825while ( ( clazz = classes[ j++ ] ) ) {78267827// Remove *all* instances7828while ( cur.indexOf( " " + clazz + " " ) > -1 ) {7829cur = cur.replace( " " + clazz + " ", " " );7830}7831}78327833// Only assign if different to avoid unneeded rendering.7834finalValue = stripAndCollapse( cur );7835if ( curValue !== finalValue ) {7836elem.setAttribute( "class", finalValue );7837}7838}7839}7840}78417842return this;7843},78447845toggleClass: function( value, stateVal ) {7846var type = typeof value;78477848if ( typeof stateVal === "boolean" && type === "string" ) {7849return stateVal ? this.addClass( value ) : this.removeClass( value );7850}78517852if ( jQuery.isFunction( value ) ) {7853return this.each( function( i ) {7854jQuery( this ).toggleClass(7855value.call( this, i, getClass( this ), stateVal ),7856stateVal7857);7858} );7859}78607861return this.each( function() {7862var className, i, self, classNames;78637864if ( type === "string" ) {78657866// Toggle individual class names7867i = 0;7868self = jQuery( this );7869classNames = value.match( rnothtmlwhite ) || [];78707871while ( ( className = classNames[ i++ ] ) ) {78727873// Check each className given, space separated list7874if ( self.hasClass( className ) ) {7875self.removeClass( className );7876} else {7877self.addClass( className );7878}7879}78807881// Toggle whole class name7882} else if ( value === undefined || type === "boolean" ) {7883className = getClass( this );7884if ( className ) {78857886// Store className if set7887dataPriv.set( this, "__className__", className );7888}78897890// If the element has a class name or if we're passed `false`,7891// then remove the whole classname (if there was one, the above saved it).7892// Otherwise bring back whatever was previously saved (if anything),7893// falling back to the empty string if nothing was stored.7894if ( this.setAttribute ) {7895this.setAttribute( "class",7896className || value === false ?7897"" :7898dataPriv.get( this, "__className__" ) || ""7899);7900}7901}7902} );7903},79047905hasClass: function( selector ) {7906var className, elem,7907i = 0;79087909className = " " + selector + " ";7910while ( ( elem = this[ i++ ] ) ) {7911if ( elem.nodeType === 1 &&7912( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) {7913return true;7914}7915}79167917return false;7918}7919} );79207921792279237924var rreturn = /\r/g;79257926jQuery.fn.extend( {7927val: function( value ) {7928var hooks, ret, isFunction,7929elem = this[ 0 ];79307931if ( !arguments.length ) {7932if ( elem ) {7933hooks = jQuery.valHooks[ elem.type ] ||7934jQuery.valHooks[ elem.nodeName.toLowerCase() ];79357936if ( hooks &&7937"get" in hooks &&7938( ret = hooks.get( elem, "value" ) ) !== undefined7939) {7940return ret;7941}79427943ret = elem.value;79447945// Handle most common string cases7946if ( typeof ret === "string" ) {7947return ret.replace( rreturn, "" );7948}79497950// Handle cases where value is null/undef or number7951return ret == null ? "" : ret;7952}79537954return;7955}79567957isFunction = jQuery.isFunction( value );79587959return this.each( function( i ) {7960var val;79617962if ( this.nodeType !== 1 ) {7963return;7964}79657966if ( isFunction ) {7967val = value.call( this, i, jQuery( this ).val() );7968} else {7969val = value;7970}79717972// Treat null/undefined as ""; convert numbers to string7973if ( val == null ) {7974val = "";79757976} else if ( typeof val === "number" ) {7977val += "";79787979} else if ( Array.isArray( val ) ) {7980val = jQuery.map( val, function( value ) {7981return value == null ? "" : value + "";7982} );7983}79847985hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];79867987// If set returns undefined, fall back to normal setting7988if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) {7989this.value = val;7990}7991} );7992}7993} );79947995jQuery.extend( {7996valHooks: {7997option: {7998get: function( elem ) {79998000var val = jQuery.find.attr( elem, "value" );8001return val != null ?8002val :80038004// Support: IE <=10 - 11 only8005// option.text throws exceptions (#14686, #14858)8006// Strip and collapse whitespace8007// https://html.spec.whatwg.org/#strip-and-collapse-whitespace8008stripAndCollapse( jQuery.text( elem ) );8009}8010},8011select: {8012get: function( elem ) {8013var value, option, i,8014options = elem.options,8015index = elem.selectedIndex,8016one = elem.type === "select-one",8017values = one ? null : [],8018max = one ? index + 1 : options.length;80198020if ( index < 0 ) {8021i = max;80228023} else {8024i = one ? index : 0;8025}80268027// Loop through all the selected options8028for ( ; i < max; i++ ) {8029option = options[ i ];80308031// Support: IE <=9 only8032// IE8-9 doesn't update selected after form reset (#2551)8033if ( ( option.selected || i === index ) &&80348035// Don't return options that are disabled or in a disabled optgroup8036!option.disabled &&8037( !option.parentNode.disabled ||8038!nodeName( option.parentNode, "optgroup" ) ) ) {80398040// Get the specific value for the option8041value = jQuery( option ).val();80428043// We don't need an array for one selects8044if ( one ) {8045return value;8046}80478048// Multi-Selects return an array8049values.push( value );8050}8051}80528053return values;8054},80558056set: function( elem, value ) {8057var optionSet, option,8058options = elem.options,8059values = jQuery.makeArray( value ),8060i = options.length;80618062while ( i-- ) {8063option = options[ i ];80648065/* eslint-disable no-cond-assign */80668067if ( option.selected =8068jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -18069) {8070optionSet = true;8071}80728073/* eslint-enable no-cond-assign */8074}80758076// Force browsers to behave consistently when non-matching value is set8077if ( !optionSet ) {8078elem.selectedIndex = -1;8079}8080return values;8081}8082}8083}8084} );80858086// Radios and checkboxes getter/setter8087jQuery.each( [ "radio", "checkbox" ], function() {8088jQuery.valHooks[ this ] = {8089set: function( elem, value ) {8090if ( Array.isArray( value ) ) {8091return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );8092}8093}8094};8095if ( !support.checkOn ) {8096jQuery.valHooks[ this ].get = function( elem ) {8097return elem.getAttribute( "value" ) === null ? "on" : elem.value;8098};8099}8100} );81018102810381048105// Return jQuery for attributes-only inclusion810681078108var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/;81098110jQuery.extend( jQuery.event, {81118112trigger: function( event, data, elem, onlyHandlers ) {81138114var i, cur, tmp, bubbleType, ontype, handle, special,8115eventPath = [ elem || document ],8116type = hasOwn.call( event, "type" ) ? event.type : event,8117namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : [];81188119cur = tmp = elem = elem || document;81208121// Don't do events on text and comment nodes8122if ( elem.nodeType === 3 || elem.nodeType === 8 ) {8123return;8124}81258126// focus/blur morphs to focusin/out; ensure we're not firing them right now8127if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {8128return;8129}81308131if ( type.indexOf( "." ) > -1 ) {81328133// Namespaced trigger; create a regexp to match event type in handle()8134namespaces = type.split( "." );8135type = namespaces.shift();8136namespaces.sort();8137}8138ontype = type.indexOf( ":" ) < 0 && "on" + type;81398140// Caller can pass in a jQuery.Event object, Object, or just an event type string8141event = event[ jQuery.expando ] ?8142event :8143new jQuery.Event( type, typeof event === "object" && event );81448145// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)8146event.isTrigger = onlyHandlers ? 2 : 3;8147event.namespace = namespaces.join( "." );8148event.rnamespace = event.namespace ?8149new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) :8150null;81518152// Clean up the event in case it is being reused8153event.result = undefined;8154if ( !event.target ) {8155event.target = elem;8156}81578158// Clone any incoming data and prepend the event, creating the handler arg list8159data = data == null ?8160[ event ] :8161jQuery.makeArray( data, [ event ] );81628163// Allow special events to draw outside the lines8164special = jQuery.event.special[ type ] || {};8165if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {8166return;8167}81688169// Determine event propagation path in advance, per W3C events spec (#9951)8170// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)8171if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {81728173bubbleType = special.delegateType || type;8174if ( !rfocusMorph.test( bubbleType + type ) ) {8175cur = cur.parentNode;8176}8177for ( ; cur; cur = cur.parentNode ) {8178eventPath.push( cur );8179tmp = cur;8180}81818182// Only add window if we got to document (e.g., not plain obj or detached DOM)8183if ( tmp === ( elem.ownerDocument || document ) ) {8184eventPath.push( tmp.defaultView || tmp.parentWindow || window );8185}8186}81878188// Fire handlers on the event path8189i = 0;8190while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {81918192event.type = i > 1 ?8193bubbleType :8194special.bindType || type;81958196// jQuery handler8197handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] &&8198dataPriv.get( cur, "handle" );8199if ( handle ) {8200handle.apply( cur, data );8201}82028203// Native handler8204handle = ontype && cur[ ontype ];8205if ( handle && handle.apply && acceptData( cur ) ) {8206event.result = handle.apply( cur, data );8207if ( event.result === false ) {8208event.preventDefault();8209}8210}8211}8212event.type = type;82138214// If nobody prevented the default action, do it now8215if ( !onlyHandlers && !event.isDefaultPrevented() ) {82168217if ( ( !special._default ||8218special._default.apply( eventPath.pop(), data ) === false ) &&8219acceptData( elem ) ) {82208221// Call a native DOM method on the target with the same name as the event.8222// Don't do default actions on window, that's where global variables be (#6170)8223if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) {82248225// Don't re-trigger an onFOO event when we call its FOO() method8226tmp = elem[ ontype ];82278228if ( tmp ) {8229elem[ ontype ] = null;8230}82318232// Prevent re-triggering of the same event, since we already bubbled it above8233jQuery.event.triggered = type;8234elem[ type ]();8235jQuery.event.triggered = undefined;82368237if ( tmp ) {8238elem[ ontype ] = tmp;8239}8240}8241}8242}82438244return event.result;8245},82468247// Piggyback on a donor event to simulate a different one8248// Used only for `focus(in | out)` events8249simulate: function( type, elem, event ) {8250var e = jQuery.extend(8251new jQuery.Event(),8252event,8253{8254type: type,8255isSimulated: true8256}8257);82588259jQuery.event.trigger( e, null, elem );8260}82618262} );82638264jQuery.fn.extend( {82658266trigger: function( type, data ) {8267return this.each( function() {8268jQuery.event.trigger( type, data, this );8269} );8270},8271triggerHandler: function( type, data ) {8272var elem = this[ 0 ];8273if ( elem ) {8274return jQuery.event.trigger( type, data, elem, true );8275}8276}8277} );827882798280jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +8281"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +8282"change select submit keydown keypress keyup contextmenu" ).split( " " ),8283function( i, name ) {82848285// Handle event binding8286jQuery.fn[ name ] = function( data, fn ) {8287return arguments.length > 0 ?8288this.on( name, null, data, fn ) :8289this.trigger( name );8290};8291} );82928293jQuery.fn.extend( {8294hover: function( fnOver, fnOut ) {8295return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );8296}8297} );82988299830083018302support.focusin = "onfocusin" in window;830383048305// Support: Firefox <=448306// Firefox doesn't have focus(in | out) events8307// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=6877878308//8309// Support: Chrome <=48 - 49, Safari <=9.0 - 9.18310// focus(in | out) events fire after focus & blur events,8311// which is spec violation - https://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order8312// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=4498578313if ( !support.focusin ) {8314jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {83158316// Attach a single capturing handler on the document while someone wants focusin/focusout8317var handler = function( event ) {8318jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );8319};83208321jQuery.event.special[ fix ] = {8322setup: function() {8323var doc = this.ownerDocument || this,8324attaches = dataPriv.access( doc, fix );83258326if ( !attaches ) {8327doc.addEventListener( orig, handler, true );8328}8329dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );8330},8331teardown: function() {8332var doc = this.ownerDocument || this,8333attaches = dataPriv.access( doc, fix ) - 1;83348335if ( !attaches ) {8336doc.removeEventListener( orig, handler, true );8337dataPriv.remove( doc, fix );83388339} else {8340dataPriv.access( doc, fix, attaches );8341}8342}8343};8344} );8345}8346var location = window.location;83478348var nonce = jQuery.now();83498350var rquery = ( /\?/ );8351835283538354// Cross-browser xml parsing8355jQuery.parseXML = function( data ) {8356var xml;8357if ( !data || typeof data !== "string" ) {8358return null;8359}83608361// Support: IE 9 - 11 only8362// IE throws on parseFromString with invalid input.8363try {8364xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );8365} catch ( e ) {8366xml = undefined;8367}83688369if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {8370jQuery.error( "Invalid XML: " + data );8371}8372return xml;8373};837483758376var8377rbracket = /\[\]$/,8378rCRLF = /\r?\n/g,8379rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,8380rsubmittable = /^(?:input|select|textarea|keygen)/i;83818382function buildParams( prefix, obj, traditional, add ) {8383var name;83848385if ( Array.isArray( obj ) ) {83868387// Serialize array item.8388jQuery.each( obj, function( i, v ) {8389if ( traditional || rbracket.test( prefix ) ) {83908391// Treat each array item as a scalar.8392add( prefix, v );83938394} else {83958396// Item is non-scalar (array or object), encode its numeric index.8397buildParams(8398prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]",8399v,8400traditional,8401add8402);8403}8404} );84058406} else if ( !traditional && jQuery.type( obj ) === "object" ) {84078408// Serialize object item.8409for ( name in obj ) {8410buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );8411}84128413} else {84148415// Serialize scalar item.8416add( prefix, obj );8417}8418}84198420// Serialize an array of form elements or a set of8421// key/values into a query string8422jQuery.param = function( a, traditional ) {8423var prefix,8424s = [],8425add = function( key, valueOrFunction ) {84268427// If value is a function, invoke it and use its return value8428var value = jQuery.isFunction( valueOrFunction ) ?8429valueOrFunction() :8430valueOrFunction;84318432s[ s.length ] = encodeURIComponent( key ) + "=" +8433encodeURIComponent( value == null ? "" : value );8434};84358436// If an array was passed in, assume that it is an array of form elements.8437if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {84388439// Serialize the form elements8440jQuery.each( a, function() {8441add( this.name, this.value );8442} );84438444} else {84458446// If traditional, encode the "old" way (the way 1.3.2 or older8447// did it), otherwise encode params recursively.8448for ( prefix in a ) {8449buildParams( prefix, a[ prefix ], traditional, add );8450}8451}84528453// Return the resulting serialization8454return s.join( "&" );8455};84568457jQuery.fn.extend( {8458serialize: function() {8459return jQuery.param( this.serializeArray() );8460},8461serializeArray: function() {8462return this.map( function() {84638464// Can add propHook for "elements" to filter or add form elements8465var elements = jQuery.prop( this, "elements" );8466return elements ? jQuery.makeArray( elements ) : this;8467} )8468.filter( function() {8469var type = this.type;84708471// Use .is( ":disabled" ) so that fieldset[disabled] works8472return this.name && !jQuery( this ).is( ":disabled" ) &&8473rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&8474( this.checked || !rcheckableType.test( type ) );8475} )8476.map( function( i, elem ) {8477var val = jQuery( this ).val();84788479if ( val == null ) {8480return null;8481}84828483if ( Array.isArray( val ) ) {8484return jQuery.map( val, function( val ) {8485return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };8486} );8487}84888489return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };8490} ).get();8491}8492} );849384948495var8496r20 = /%20/g,8497rhash = /#.*$/,8498rantiCache = /([?&])_=[^&]*/,8499rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,85008501// #7653, #8125, #8152: local protocol detection8502rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,8503rnoContent = /^(?:GET|HEAD)$/,8504rprotocol = /^\/\//,85058506/* Prefilters8507* 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)8508* 2) These are called:8509* - BEFORE asking for a transport8510* - AFTER param serialization (s.data is a string if s.processData is true)8511* 3) key is the dataType8512* 4) the catchall symbol "*" can be used8513* 5) execution will start with transport dataType and THEN continue down to "*" if needed8514*/8515prefilters = {},85168517/* Transports bindings8518* 1) key is the dataType8519* 2) the catchall symbol "*" can be used8520* 3) selection will start with transport dataType and THEN go to "*" if needed8521*/8522transports = {},85238524// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression8525allTypes = "*/".concat( "*" ),85268527// Anchor tag for parsing the document origin8528originAnchor = document.createElement( "a" );8529originAnchor.href = location.href;85308531// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport8532function addToPrefiltersOrTransports( structure ) {85338534// dataTypeExpression is optional and defaults to "*"8535return function( dataTypeExpression, func ) {85368537if ( typeof dataTypeExpression !== "string" ) {8538func = dataTypeExpression;8539dataTypeExpression = "*";8540}85418542var dataType,8543i = 0,8544dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];85458546if ( jQuery.isFunction( func ) ) {85478548// For each dataType in the dataTypeExpression8549while ( ( dataType = dataTypes[ i++ ] ) ) {85508551// Prepend if requested8552if ( dataType[ 0 ] === "+" ) {8553dataType = dataType.slice( 1 ) || "*";8554( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );85558556// Otherwise append8557} else {8558( structure[ dataType ] = structure[ dataType ] || [] ).push( func );8559}8560}8561}8562};8563}85648565// Base inspection function for prefilters and transports8566function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {85678568var inspected = {},8569seekingTransport = ( structure === transports );85708571function inspect( dataType ) {8572var selected;8573inspected[ dataType ] = true;8574jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {8575var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );8576if ( typeof dataTypeOrTransport === "string" &&8577!seekingTransport && !inspected[ dataTypeOrTransport ] ) {85788579options.dataTypes.unshift( dataTypeOrTransport );8580inspect( dataTypeOrTransport );8581return false;8582} else if ( seekingTransport ) {8583return !( selected = dataTypeOrTransport );8584}8585} );8586return selected;8587}85888589return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );8590}85918592// A special extend for ajax options8593// that takes "flat" options (not to be deep extended)8594// Fixes #98878595function ajaxExtend( target, src ) {8596var key, deep,8597flatOptions = jQuery.ajaxSettings.flatOptions || {};85988599for ( key in src ) {8600if ( src[ key ] !== undefined ) {8601( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];8602}8603}8604if ( deep ) {8605jQuery.extend( true, target, deep );8606}86078608return target;8609}86108611/* Handles responses to an ajax request:8612* - finds the right dataType (mediates between content-type and expected dataType)8613* - returns the corresponding response8614*/8615function ajaxHandleResponses( s, jqXHR, responses ) {86168617var ct, type, finalDataType, firstDataType,8618contents = s.contents,8619dataTypes = s.dataTypes;86208621// Remove auto dataType and get content-type in the process8622while ( dataTypes[ 0 ] === "*" ) {8623dataTypes.shift();8624if ( ct === undefined ) {8625ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" );8626}8627}86288629// Check if we're dealing with a known content-type8630if ( ct ) {8631for ( type in contents ) {8632if ( contents[ type ] && contents[ type ].test( ct ) ) {8633dataTypes.unshift( type );8634break;8635}8636}8637}86388639// Check to see if we have a response for the expected dataType8640if ( dataTypes[ 0 ] in responses ) {8641finalDataType = dataTypes[ 0 ];8642} else {86438644// Try convertible dataTypes8645for ( type in responses ) {8646if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) {8647finalDataType = type;8648break;8649}8650if ( !firstDataType ) {8651firstDataType = type;8652}8653}86548655// Or just use first one8656finalDataType = finalDataType || firstDataType;8657}86588659// If we found a dataType8660// We add the dataType to the list if needed8661// and return the corresponding response8662if ( finalDataType ) {8663if ( finalDataType !== dataTypes[ 0 ] ) {8664dataTypes.unshift( finalDataType );8665}8666return responses[ finalDataType ];8667}8668}86698670/* Chain conversions given the request and the original response8671* Also sets the responseXXX fields on the jqXHR instance8672*/8673function ajaxConvert( s, response, jqXHR, isSuccess ) {8674var conv2, current, conv, tmp, prev,8675converters = {},86768677// Work with a copy of dataTypes in case we need to modify it for conversion8678dataTypes = s.dataTypes.slice();86798680// Create converters map with lowercased keys8681if ( dataTypes[ 1 ] ) {8682for ( conv in s.converters ) {8683converters[ conv.toLowerCase() ] = s.converters[ conv ];8684}8685}86868687current = dataTypes.shift();86888689// Convert to each sequential dataType8690while ( current ) {86918692if ( s.responseFields[ current ] ) {8693jqXHR[ s.responseFields[ current ] ] = response;8694}86958696// Apply the dataFilter if provided8697if ( !prev && isSuccess && s.dataFilter ) {8698response = s.dataFilter( response, s.dataType );8699}87008701prev = current;8702current = dataTypes.shift();87038704if ( current ) {87058706// There's only work to do if current dataType is non-auto8707if ( current === "*" ) {87088709current = prev;87108711// Convert response if prev dataType is non-auto and differs from current8712} else if ( prev !== "*" && prev !== current ) {87138714// Seek a direct converter8715conv = converters[ prev + " " + current ] || converters[ "* " + current ];87168717// If none found, seek a pair8718if ( !conv ) {8719for ( conv2 in converters ) {87208721// If conv2 outputs current8722tmp = conv2.split( " " );8723if ( tmp[ 1 ] === current ) {87248725// If prev can be converted to accepted input8726conv = converters[ prev + " " + tmp[ 0 ] ] ||8727converters[ "* " + tmp[ 0 ] ];8728if ( conv ) {87298730// Condense equivalence converters8731if ( conv === true ) {8732conv = converters[ conv2 ];87338734// Otherwise, insert the intermediate dataType8735} else if ( converters[ conv2 ] !== true ) {8736current = tmp[ 0 ];8737dataTypes.unshift( tmp[ 1 ] );8738}8739break;8740}8741}8742}8743}87448745// Apply converter (if not an equivalence)8746if ( conv !== true ) {87478748// Unless errors are allowed to bubble, catch and return them8749if ( conv && s.throws ) {8750response = conv( response );8751} else {8752try {8753response = conv( response );8754} catch ( e ) {8755return {8756state: "parsererror",8757error: conv ? e : "No conversion from " + prev + " to " + current8758};8759}8760}8761}8762}8763}8764}87658766return { state: "success", data: response };8767}87688769jQuery.extend( {87708771// Counter for holding the number of active queries8772active: 0,87738774// Last-Modified header cache for next request8775lastModified: {},8776etag: {},87778778ajaxSettings: {8779url: location.href,8780type: "GET",8781isLocal: rlocalProtocol.test( location.protocol ),8782global: true,8783processData: true,8784async: true,8785contentType: "application/x-www-form-urlencoded; charset=UTF-8",87868787/*8788timeout: 0,8789data: null,8790dataType: null,8791username: null,8792password: null,8793cache: null,8794throws: false,8795traditional: false,8796headers: {},8797*/87988799accepts: {8800"*": allTypes,8801text: "text/plain",8802html: "text/html",8803xml: "application/xml, text/xml",8804json: "application/json, text/javascript"8805},88068807contents: {8808xml: /\bxml\b/,8809html: /\bhtml/,8810json: /\bjson\b/8811},88128813responseFields: {8814xml: "responseXML",8815text: "responseText",8816json: "responseJSON"8817},88188819// Data converters8820// Keys separate source (or catchall "*") and destination types with a single space8821converters: {88228823// Convert anything to text8824"* text": String,88258826// Text to html (true = no transformation)8827"text html": true,88288829// Evaluate text as a json expression8830"text json": JSON.parse,88318832// Parse text as xml8833"text xml": jQuery.parseXML8834},88358836// For options that shouldn't be deep extended:8837// you can add your own custom options here if8838// and when you create one that shouldn't be8839// deep extended (see ajaxExtend)8840flatOptions: {8841url: true,8842context: true8843}8844},88458846// Creates a full fledged settings object into target8847// with both ajaxSettings and settings fields.8848// If target is omitted, writes into ajaxSettings.8849ajaxSetup: function( target, settings ) {8850return settings ?88518852// Building a settings object8853ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :88548855// Extending ajaxSettings8856ajaxExtend( jQuery.ajaxSettings, target );8857},88588859ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),8860ajaxTransport: addToPrefiltersOrTransports( transports ),88618862// Main method8863ajax: function( url, options ) {88648865// If url is an object, simulate pre-1.5 signature8866if ( typeof url === "object" ) {8867options = url;8868url = undefined;8869}88708871// Force options to be an object8872options = options || {};88738874var transport,88758876// URL without anti-cache param8877cacheURL,88788879// Response headers8880responseHeadersString,8881responseHeaders,88828883// timeout handle8884timeoutTimer,88858886// Url cleanup var8887urlAnchor,88888889// Request state (becomes false upon send and true upon completion)8890completed,88918892// To know if global events are to be dispatched8893fireGlobals,88948895// Loop variable8896i,88978898// uncached part of the url8899uncached,89008901// Create the final options object8902s = jQuery.ajaxSetup( {}, options ),89038904// Callbacks context8905callbackContext = s.context || s,89068907// Context for global events is callbackContext if it is a DOM node or jQuery collection8908globalEventContext = s.context &&8909( callbackContext.nodeType || callbackContext.jquery ) ?8910jQuery( callbackContext ) :8911jQuery.event,89128913// Deferreds8914deferred = jQuery.Deferred(),8915completeDeferred = jQuery.Callbacks( "once memory" ),89168917// Status-dependent callbacks8918statusCode = s.statusCode || {},89198920// Headers (they are sent all at once)8921requestHeaders = {},8922requestHeadersNames = {},89238924// Default abort message8925strAbort = "canceled",89268927// Fake xhr8928jqXHR = {8929readyState: 0,89308931// Builds headers hashtable if needed8932getResponseHeader: function( key ) {8933var match;8934if ( completed ) {8935if ( !responseHeaders ) {8936responseHeaders = {};8937while ( ( match = rheaders.exec( responseHeadersString ) ) ) {8938responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ];8939}8940}8941match = responseHeaders[ key.toLowerCase() ];8942}8943return match == null ? null : match;8944},89458946// Raw string8947getAllResponseHeaders: function() {8948return completed ? responseHeadersString : null;8949},89508951// Caches the header8952setRequestHeader: function( name, value ) {8953if ( completed == null ) {8954name = requestHeadersNames[ name.toLowerCase() ] =8955requestHeadersNames[ name.toLowerCase() ] || name;8956requestHeaders[ name ] = value;8957}8958return this;8959},89608961// Overrides response content-type header8962overrideMimeType: function( type ) {8963if ( completed == null ) {8964s.mimeType = type;8965}8966return this;8967},89688969// Status-dependent callbacks8970statusCode: function( map ) {8971var code;8972if ( map ) {8973if ( completed ) {89748975// Execute the appropriate callbacks8976jqXHR.always( map[ jqXHR.status ] );8977} else {89788979// Lazy-add the new callbacks in a way that preserves old ones8980for ( code in map ) {8981statusCode[ code ] = [ statusCode[ code ], map[ code ] ];8982}8983}8984}8985return this;8986},89878988// Cancel the request8989abort: function( statusText ) {8990var finalText = statusText || strAbort;8991if ( transport ) {8992transport.abort( finalText );8993}8994done( 0, finalText );8995return this;8996}8997};89988999// Attach deferreds9000deferred.promise( jqXHR );90019002// Add protocol if not provided (prefilters might expect it)9003// Handle falsy url in the settings object (#10093: consistency with old signature)9004// We also use the url parameter if available9005s.url = ( ( url || s.url || location.href ) + "" )9006.replace( rprotocol, location.protocol + "//" );90079008// Alias method option to type as per ticket #120049009s.type = options.method || options.type || s.method || s.type;90109011// Extract dataTypes list9012s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ];90139014// A cross-domain request is in order when the origin doesn't match the current origin.9015if ( s.crossDomain == null ) {9016urlAnchor = document.createElement( "a" );90179018// Support: IE <=8 - 11, Edge 12 - 139019// IE throws exception on accessing the href property if url is malformed,9020// e.g. https://example.com:80x/9021try {9022urlAnchor.href = s.url;90239024// Support: IE <=8 - 11 only9025// Anchor's host property isn't correctly set when s.url is relative9026urlAnchor.href = urlAnchor.href;9027s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==9028urlAnchor.protocol + "//" + urlAnchor.host;9029} catch ( e ) {90309031// If there is an error parsing the URL, assume it is crossDomain,9032// it can be rejected by the transport if it is invalid9033s.crossDomain = true;9034}9035}90369037// Convert data if not already a string9038if ( s.data && s.processData && typeof s.data !== "string" ) {9039s.data = jQuery.param( s.data, s.traditional );9040}90419042// Apply prefilters9043inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );90449045// If request was aborted inside a prefilter, stop there9046if ( completed ) {9047return jqXHR;9048}90499050// We can fire global events as of now if asked to9051// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)9052fireGlobals = jQuery.event && s.global;90539054// Watch for a new set of requests9055if ( fireGlobals && jQuery.active++ === 0 ) {9056jQuery.event.trigger( "ajaxStart" );9057}90589059// Uppercase the type9060s.type = s.type.toUpperCase();90619062// Determine if request has content9063s.hasContent = !rnoContent.test( s.type );90649065// Save the URL in case we're toying with the If-Modified-Since9066// and/or If-None-Match header later on9067// Remove hash to simplify url manipulation9068cacheURL = s.url.replace( rhash, "" );90699070// More options handling for requests with no content9071if ( !s.hasContent ) {90729073// Remember the hash so we can put it back9074uncached = s.url.slice( cacheURL.length );90759076// If data is available, append data to url9077if ( s.data ) {9078cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data;90799080// #9682: remove data so that it's not used in an eventual retry9081delete s.data;9082}90839084// Add or update anti-cache param if needed9085if ( s.cache === false ) {9086cacheURL = cacheURL.replace( rantiCache, "$1" );9087uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached;9088}90899090// Put hash and anti-cache on the URL that will be requested (gh-1732)9091s.url = cacheURL + uncached;90929093// Change '%20' to '+' if this is encoded form body content (gh-2658)9094} else if ( s.data && s.processData &&9095( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) {9096s.data = s.data.replace( r20, "+" );9097}90989099// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.9100if ( s.ifModified ) {9101if ( jQuery.lastModified[ cacheURL ] ) {9102jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );9103}9104if ( jQuery.etag[ cacheURL ] ) {9105jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );9106}9107}91089109// Set the correct header, if data is being sent9110if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {9111jqXHR.setRequestHeader( "Content-Type", s.contentType );9112}91139114// Set the Accepts header for the server, depending on the dataType9115jqXHR.setRequestHeader(9116"Accept",9117s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?9118s.accepts[ s.dataTypes[ 0 ] ] +9119( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :9120s.accepts[ "*" ]9121);91229123// Check for headers option9124for ( i in s.headers ) {9125jqXHR.setRequestHeader( i, s.headers[ i ] );9126}91279128// Allow custom headers/mimetypes and early abort9129if ( s.beforeSend &&9130( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {91319132// Abort if not done already and return9133return jqXHR.abort();9134}91359136// Aborting is no longer a cancellation9137strAbort = "abort";91389139// Install callbacks on deferreds9140completeDeferred.add( s.complete );9141jqXHR.done( s.success );9142jqXHR.fail( s.error );91439144// Get transport9145transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );91469147// If no transport, we auto-abort9148if ( !transport ) {9149done( -1, "No Transport" );9150} else {9151jqXHR.readyState = 1;91529153// Send global event9154if ( fireGlobals ) {9155globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );9156}91579158// If request was aborted inside ajaxSend, stop there9159if ( completed ) {9160return jqXHR;9161}91629163// Timeout9164if ( s.async && s.timeout > 0 ) {9165timeoutTimer = window.setTimeout( function() {9166jqXHR.abort( "timeout" );9167}, s.timeout );9168}91699170try {9171completed = false;9172transport.send( requestHeaders, done );9173} catch ( e ) {91749175// Rethrow post-completion exceptions9176if ( completed ) {9177throw e;9178}91799180// Propagate others as results9181done( -1, e );9182}9183}91849185// Callback for when everything is done9186function done( status, nativeStatusText, responses, headers ) {9187var isSuccess, success, error, response, modified,9188statusText = nativeStatusText;91899190// Ignore repeat invocations9191if ( completed ) {9192return;9193}91949195completed = true;91969197// Clear timeout if it exists9198if ( timeoutTimer ) {9199window.clearTimeout( timeoutTimer );9200}92019202// Dereference transport for early garbage collection9203// (no matter how long the jqXHR object will be used)9204transport = undefined;92059206// Cache response headers9207responseHeadersString = headers || "";92089209// Set readyState9210jqXHR.readyState = status > 0 ? 4 : 0;92119212// Determine if successful9213isSuccess = status >= 200 && status < 300 || status === 304;92149215// Get response data9216if ( responses ) {9217response = ajaxHandleResponses( s, jqXHR, responses );9218}92199220// Convert no matter what (that way responseXXX fields are always set)9221response = ajaxConvert( s, response, jqXHR, isSuccess );92229223// If successful, handle type chaining9224if ( isSuccess ) {92259226// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.9227if ( s.ifModified ) {9228modified = jqXHR.getResponseHeader( "Last-Modified" );9229if ( modified ) {9230jQuery.lastModified[ cacheURL ] = modified;9231}9232modified = jqXHR.getResponseHeader( "etag" );9233if ( modified ) {9234jQuery.etag[ cacheURL ] = modified;9235}9236}92379238// if no content9239if ( status === 204 || s.type === "HEAD" ) {9240statusText = "nocontent";92419242// if not modified9243} else if ( status === 304 ) {9244statusText = "notmodified";92459246// If we have data, let's convert it9247} else {9248statusText = response.state;9249success = response.data;9250error = response.error;9251isSuccess = !error;9252}9253} else {92549255// Extract error from statusText and normalize for non-aborts9256error = statusText;9257if ( status || !statusText ) {9258statusText = "error";9259if ( status < 0 ) {9260status = 0;9261}9262}9263}92649265// Set data for the fake xhr object9266jqXHR.status = status;9267jqXHR.statusText = ( nativeStatusText || statusText ) + "";92689269// Success/Error9270if ( isSuccess ) {9271deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );9272} else {9273deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );9274}92759276// Status-dependent callbacks9277jqXHR.statusCode( statusCode );9278statusCode = undefined;92799280if ( fireGlobals ) {9281globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",9282[ jqXHR, s, isSuccess ? success : error ] );9283}92849285// Complete9286completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );92879288if ( fireGlobals ) {9289globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );92909291// Handle the global AJAX counter9292if ( !( --jQuery.active ) ) {9293jQuery.event.trigger( "ajaxStop" );9294}9295}9296}92979298return jqXHR;9299},93009301getJSON: function( url, data, callback ) {9302return jQuery.get( url, data, callback, "json" );9303},93049305getScript: function( url, callback ) {9306return jQuery.get( url, undefined, callback, "script" );9307}9308} );93099310jQuery.each( [ "get", "post" ], function( i, method ) {9311jQuery[ method ] = function( url, data, callback, type ) {93129313// Shift arguments if data argument was omitted9314if ( jQuery.isFunction( data ) ) {9315type = type || callback;9316callback = data;9317data = undefined;9318}93199320// The url can be an options object (which then must have .url)9321return jQuery.ajax( jQuery.extend( {9322url: url,9323type: method,9324dataType: type,9325data: data,9326success: callback9327}, jQuery.isPlainObject( url ) && url ) );9328};9329} );933093319332jQuery._evalUrl = function( url ) {9333return jQuery.ajax( {9334url: url,93359336// Make this explicit, since user can override this through ajaxSetup (#11264)9337type: "GET",9338dataType: "script",9339cache: true,9340async: false,9341global: false,9342"throws": true9343} );9344};934593469347jQuery.fn.extend( {9348wrapAll: function( html ) {9349var wrap;93509351if ( this[ 0 ] ) {9352if ( jQuery.isFunction( html ) ) {9353html = html.call( this[ 0 ] );9354}93559356// The elements to wrap the target around9357wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );93589359if ( this[ 0 ].parentNode ) {9360wrap.insertBefore( this[ 0 ] );9361}93629363wrap.map( function() {9364var elem = this;93659366while ( elem.firstElementChild ) {9367elem = elem.firstElementChild;9368}93699370return elem;9371} ).append( this );9372}93739374return this;9375},93769377wrapInner: function( html ) {9378if ( jQuery.isFunction( html ) ) {9379return this.each( function( i ) {9380jQuery( this ).wrapInner( html.call( this, i ) );9381} );9382}93839384return this.each( function() {9385var self = jQuery( this ),9386contents = self.contents();93879388if ( contents.length ) {9389contents.wrapAll( html );93909391} else {9392self.append( html );9393}9394} );9395},93969397wrap: function( html ) {9398var isFunction = jQuery.isFunction( html );93999400return this.each( function( i ) {9401jQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html );9402} );9403},94049405unwrap: function( selector ) {9406this.parent( selector ).not( "body" ).each( function() {9407jQuery( this ).replaceWith( this.childNodes );9408} );9409return this;9410}9411} );941294139414jQuery.expr.pseudos.hidden = function( elem ) {9415return !jQuery.expr.pseudos.visible( elem );9416};9417jQuery.expr.pseudos.visible = function( elem ) {9418return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );9419};94209421942294239424jQuery.ajaxSettings.xhr = function() {9425try {9426return new window.XMLHttpRequest();9427} catch ( e ) {}9428};94299430var xhrSuccessStatus = {94319432// File protocol always yields status code 0, assume 20094330: 200,94349435// Support: IE <=9 only9436// #1450: sometimes IE returns 1223 when it should be 20494371223: 2049438},9439xhrSupported = jQuery.ajaxSettings.xhr();94409441support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );9442support.ajax = xhrSupported = !!xhrSupported;94439444jQuery.ajaxTransport( function( options ) {9445var callback, errorCallback;94469447// Cross domain only allowed if supported through XMLHttpRequest9448if ( support.cors || xhrSupported && !options.crossDomain ) {9449return {9450send: function( headers, complete ) {9451var i,9452xhr = options.xhr();94539454xhr.open(9455options.type,9456options.url,9457options.async,9458options.username,9459options.password9460);94619462// Apply custom fields if provided9463if ( options.xhrFields ) {9464for ( i in options.xhrFields ) {9465xhr[ i ] = options.xhrFields[ i ];9466}9467}94689469// Override mime type if needed9470if ( options.mimeType && xhr.overrideMimeType ) {9471xhr.overrideMimeType( options.mimeType );9472}94739474// X-Requested-With header9475// For cross-domain requests, seeing as conditions for a preflight are9476// akin to a jigsaw puzzle, we simply never set it to be sure.9477// (it can always be set on a per-request basis or even using ajaxSetup)9478// For same-domain requests, won't change header if already provided.9479if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) {9480headers[ "X-Requested-With" ] = "XMLHttpRequest";9481}94829483// Set headers9484for ( i in headers ) {9485xhr.setRequestHeader( i, headers[ i ] );9486}94879488// Callback9489callback = function( type ) {9490return function() {9491if ( callback ) {9492callback = errorCallback = xhr.onload =9493xhr.onerror = xhr.onabort = xhr.onreadystatechange = null;94949495if ( type === "abort" ) {9496xhr.abort();9497} else if ( type === "error" ) {94989499// Support: IE <=9 only9500// On a manual native abort, IE9 throws9501// errors on any property access that is not readyState9502if ( typeof xhr.status !== "number" ) {9503complete( 0, "error" );9504} else {9505complete(95069507// File: protocol always yields status 0; see #8605, #142079508xhr.status,9509xhr.statusText9510);9511}9512} else {9513complete(9514xhrSuccessStatus[ xhr.status ] || xhr.status,9515xhr.statusText,95169517// Support: IE <=9 only9518// IE9 has no XHR2 but throws on binary (trac-11426)9519// For XHR2 non-text, let the caller handle it (gh-2498)9520( xhr.responseType || "text" ) !== "text" ||9521typeof xhr.responseText !== "string" ?9522{ binary: xhr.response } :9523{ text: xhr.responseText },9524xhr.getAllResponseHeaders()9525);9526}9527}9528};9529};95309531// Listen to events9532xhr.onload = callback();9533errorCallback = xhr.onerror = callback( "error" );95349535// Support: IE 9 only9536// Use onreadystatechange to replace onabort9537// to handle uncaught aborts9538if ( xhr.onabort !== undefined ) {9539xhr.onabort = errorCallback;9540} else {9541xhr.onreadystatechange = function() {95429543// Check readyState before timeout as it changes9544if ( xhr.readyState === 4 ) {95459546// Allow onerror to be called first,9547// but that will not handle a native abort9548// Also, save errorCallback to a variable9549// as xhr.onerror cannot be accessed9550window.setTimeout( function() {9551if ( callback ) {9552errorCallback();9553}9554} );9555}9556};9557}95589559// Create the abort callback9560callback = callback( "abort" );95619562try {95639564// Do send the request (this may raise an exception)9565xhr.send( options.hasContent && options.data || null );9566} catch ( e ) {95679568// #14683: Only rethrow if this hasn't been notified as an error yet9569if ( callback ) {9570throw e;9571}9572}9573},95749575abort: function() {9576if ( callback ) {9577callback();9578}9579}9580};9581}9582} );95839584958595869587// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)9588jQuery.ajaxPrefilter( function( s ) {9589if ( s.crossDomain ) {9590s.contents.script = false;9591}9592} );95939594// Install script dataType9595jQuery.ajaxSetup( {9596accepts: {9597script: "text/javascript, application/javascript, " +9598"application/ecmascript, application/x-ecmascript"9599},9600contents: {9601script: /\b(?:java|ecma)script\b/9602},9603converters: {9604"text script": function( text ) {9605jQuery.globalEval( text );9606return text;9607}9608}9609} );96109611// Handle cache's special case and crossDomain9612jQuery.ajaxPrefilter( "script", function( s ) {9613if ( s.cache === undefined ) {9614s.cache = false;9615}9616if ( s.crossDomain ) {9617s.type = "GET";9618}9619} );96209621// Bind script tag hack transport9622jQuery.ajaxTransport( "script", function( s ) {96239624// This transport only deals with cross domain requests9625if ( s.crossDomain ) {9626var script, callback;9627return {9628send: function( _, complete ) {9629script = jQuery( "<script>" ).prop( {9630charset: s.scriptCharset,9631src: s.url9632} ).on(9633"load error",9634callback = function( evt ) {9635script.remove();9636callback = null;9637if ( evt ) {9638complete( evt.type === "error" ? 404 : 200, evt.type );9639}9640}9641);96429643// Use native DOM manipulation to avoid our domManip AJAX trickery9644document.head.appendChild( script[ 0 ] );9645},9646abort: function() {9647if ( callback ) {9648callback();9649}9650}9651};9652}9653} );96549655965696579658var oldCallbacks = [],9659rjsonp = /(=)\?(?=&|$)|\?\?/;96609661// Default jsonp settings9662jQuery.ajaxSetup( {9663jsonp: "callback",9664jsonpCallback: function() {9665var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );9666this[ callback ] = true;9667return callback;9668}9669} );96709671// Detect, normalize options and install callbacks for jsonp requests9672jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {96739674var callbackName, overwritten, responseContainer,9675jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?9676"url" :9677typeof s.data === "string" &&9678( s.contentType || "" )9679.indexOf( "application/x-www-form-urlencoded" ) === 0 &&9680rjsonp.test( s.data ) && "data"9681);96829683// Handle iff the expected data type is "jsonp" or we have a parameter to set9684if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {96859686// Get callback name, remembering preexisting value associated with it9687callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?9688s.jsonpCallback() :9689s.jsonpCallback;96909691// Insert callback into url or form data9692if ( jsonProp ) {9693s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );9694} else if ( s.jsonp !== false ) {9695s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;9696}96979698// Use data converter to retrieve json after script execution9699s.converters[ "script json" ] = function() {9700if ( !responseContainer ) {9701jQuery.error( callbackName + " was not called" );9702}9703return responseContainer[ 0 ];9704};97059706// Force json dataType9707s.dataTypes[ 0 ] = "json";97089709// Install callback9710overwritten = window[ callbackName ];9711window[ callbackName ] = function() {9712responseContainer = arguments;9713};97149715// Clean-up function (fires after converters)9716jqXHR.always( function() {97179718// If previous value didn't exist - remove it9719if ( overwritten === undefined ) {9720jQuery( window ).removeProp( callbackName );97219722// Otherwise restore preexisting value9723} else {9724window[ callbackName ] = overwritten;9725}97269727// Save back as free9728if ( s[ callbackName ] ) {97299730// Make sure that re-using the options doesn't screw things around9731s.jsonpCallback = originalSettings.jsonpCallback;97329733// Save the callback name for future use9734oldCallbacks.push( callbackName );9735}97369737// Call if it was a function and we have a response9738if ( responseContainer && jQuery.isFunction( overwritten ) ) {9739overwritten( responseContainer[ 0 ] );9740}97419742responseContainer = overwritten = undefined;9743} );97449745// Delegate to script9746return "script";9747}9748} );97499750975197529753// Support: Safari 8 only9754// In Safari 8 documents created via document.implementation.createHTMLDocument9755// collapse sibling forms: the second one becomes a child of the first one.9756// Because of that, this security measure has to be disabled in Safari 8.9757// https://bugs.webkit.org/show_bug.cgi?id=1373379758support.createHTMLDocument = ( function() {9759var body = document.implementation.createHTMLDocument( "" ).body;9760body.innerHTML = "<form></form><form></form>";9761return body.childNodes.length === 2;9762} )();976397649765// Argument "data" should be string of html9766// context (optional): If specified, the fragment will be created in this context,9767// defaults to document9768// keepScripts (optional): If true, will include scripts passed in the html string9769jQuery.parseHTML = function( data, context, keepScripts ) {9770if ( typeof data !== "string" ) {9771return [];9772}9773if ( typeof context === "boolean" ) {9774keepScripts = context;9775context = false;9776}97779778var base, parsed, scripts;97799780if ( !context ) {97819782// Stop scripts or inline event handlers from being executed immediately9783// by using document.implementation9784if ( support.createHTMLDocument ) {9785context = document.implementation.createHTMLDocument( "" );97869787// Set the base href for the created document9788// so any parsed elements with URLs9789// are based on the document's URL (gh-2965)9790base = context.createElement( "base" );9791base.href = document.location.href;9792context.head.appendChild( base );9793} else {9794context = document;9795}9796}97979798parsed = rsingleTag.exec( data );9799scripts = !keepScripts && [];98009801// Single tag9802if ( parsed ) {9803return [ context.createElement( parsed[ 1 ] ) ];9804}98059806parsed = buildFragment( [ data ], context, scripts );98079808if ( scripts && scripts.length ) {9809jQuery( scripts ).remove();9810}98119812return jQuery.merge( [], parsed.childNodes );9813};981498159816/**9817* Load a url into a page9818*/9819jQuery.fn.load = function( url, params, callback ) {9820var selector, type, response,9821self = this,9822off = url.indexOf( " " );98239824if ( off > -1 ) {9825selector = stripAndCollapse( url.slice( off ) );9826url = url.slice( 0, off );9827}98289829// If it's a function9830if ( jQuery.isFunction( params ) ) {98319832// We assume that it's the callback9833callback = params;9834params = undefined;98359836// Otherwise, build a param string9837} else if ( params && typeof params === "object" ) {9838type = "POST";9839}98409841// If we have elements to modify, make the request9842if ( self.length > 0 ) {9843jQuery.ajax( {9844url: url,98459846// If "type" variable is undefined, then "GET" method will be used.9847// Make value of this field explicit since9848// user can override it through ajaxSetup method9849type: type || "GET",9850dataType: "html",9851data: params9852} ).done( function( responseText ) {98539854// Save response for use in complete callback9855response = arguments;98569857self.html( selector ?98589859// If a selector was specified, locate the right elements in a dummy div9860// Exclude scripts to avoid IE 'Permission Denied' errors9861jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :98629863// Otherwise use the full result9864responseText );98659866// If the request succeeds, this function gets "data", "status", "jqXHR"9867// but they are ignored because response was set above.9868// If it fails, this function gets "jqXHR", "status", "error"9869} ).always( callback && function( jqXHR, status ) {9870self.each( function() {9871callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );9872} );9873} );9874}98759876return this;9877};98789879988098819882// Attach a bunch of functions for handling common AJAX events9883jQuery.each( [9884"ajaxStart",9885"ajaxStop",9886"ajaxComplete",9887"ajaxError",9888"ajaxSuccess",9889"ajaxSend"9890], function( i, type ) {9891jQuery.fn[ type ] = function( fn ) {9892return this.on( type, fn );9893};9894} );98959896989798989899jQuery.expr.pseudos.animated = function( elem ) {9900return jQuery.grep( jQuery.timers, function( fn ) {9901return elem === fn.elem;9902} ).length;9903};99049905990699079908jQuery.offset = {9909setOffset: function( elem, options, i ) {9910var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,9911position = jQuery.css( elem, "position" ),9912curElem = jQuery( elem ),9913props = {};99149915// Set position first, in-case top/left are set even on static elem9916if ( position === "static" ) {9917elem.style.position = "relative";9918}99199920curOffset = curElem.offset();9921curCSSTop = jQuery.css( elem, "top" );9922curCSSLeft = jQuery.css( elem, "left" );9923calculatePosition = ( position === "absolute" || position === "fixed" ) &&9924( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1;99259926// Need to be able to calculate position if either9927// top or left is auto and position is either absolute or fixed9928if ( calculatePosition ) {9929curPosition = curElem.position();9930curTop = curPosition.top;9931curLeft = curPosition.left;99329933} else {9934curTop = parseFloat( curCSSTop ) || 0;9935curLeft = parseFloat( curCSSLeft ) || 0;9936}99379938if ( jQuery.isFunction( options ) ) {99399940// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)9941options = options.call( elem, i, jQuery.extend( {}, curOffset ) );9942}99439944if ( options.top != null ) {9945props.top = ( options.top - curOffset.top ) + curTop;9946}9947if ( options.left != null ) {9948props.left = ( options.left - curOffset.left ) + curLeft;9949}99509951if ( "using" in options ) {9952options.using.call( elem, props );99539954} else {9955curElem.css( props );9956}9957}9958};99599960jQuery.fn.extend( {9961offset: function( options ) {99629963// Preserve chaining for setter9964if ( arguments.length ) {9965return options === undefined ?9966this :9967this.each( function( i ) {9968jQuery.offset.setOffset( this, options, i );9969} );9970}99719972var doc, docElem, rect, win,9973elem = this[ 0 ];99749975if ( !elem ) {9976return;9977}99789979// Return zeros for disconnected and hidden (display: none) elements (gh-2310)9980// Support: IE <=11 only9981// Running getBoundingClientRect on a9982// disconnected node in IE throws an error9983if ( !elem.getClientRects().length ) {9984return { top: 0, left: 0 };9985}99869987rect = elem.getBoundingClientRect();99889989doc = elem.ownerDocument;9990docElem = doc.documentElement;9991win = doc.defaultView;99929993return {9994top: rect.top + win.pageYOffset - docElem.clientTop,9995left: rect.left + win.pageXOffset - docElem.clientLeft9996};9997},99989999position: function() {10000if ( !this[ 0 ] ) {10001return;10002}1000310004var offsetParent, offset,10005elem = this[ 0 ],10006parentOffset = { top: 0, left: 0 };1000710008// Fixed elements are offset from window (parentOffset = {top:0, left: 0},10009// because it is its only offset parent10010if ( jQuery.css( elem, "position" ) === "fixed" ) {1001110012// Assume getBoundingClientRect is there when computed position is fixed10013offset = elem.getBoundingClientRect();1001410015} else {1001610017// Get *real* offsetParent10018offsetParent = this.offsetParent();1001910020// Get correct offsets10021offset = this.offset();10022if ( !nodeName( offsetParent[ 0 ], "html" ) ) {10023parentOffset = offsetParent.offset();10024}1002510026// Add offsetParent borders10027parentOffset = {10028top: parentOffset.top + jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ),10029left: parentOffset.left + jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true )10030};10031}1003210033// Subtract parent offsets and element margins10034return {10035top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),10036left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )10037};10038},1003910040// This method will return documentElement in the following cases:10041// 1) For the element inside the iframe without offsetParent, this method will return10042// documentElement of the parent window10043// 2) For the hidden or detached element10044// 3) For body or html element, i.e. in case of the html node - it will return itself10045//10046// but those exceptions were never presented as a real life use-cases10047// and might be considered as more preferable results.10048//10049// This logic, however, is not guaranteed and can change at any point in the future10050offsetParent: function() {10051return this.map( function() {10052var offsetParent = this.offsetParent;1005310054while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) {10055offsetParent = offsetParent.offsetParent;10056}1005710058return offsetParent || documentElement;10059} );10060}10061} );1006210063// Create scrollLeft and scrollTop methods10064jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {10065var top = "pageYOffset" === prop;1006610067jQuery.fn[ method ] = function( val ) {10068return access( this, function( elem, method, val ) {1006910070// Coalesce documents and windows10071var win;10072if ( jQuery.isWindow( elem ) ) {10073win = elem;10074} else if ( elem.nodeType === 9 ) {10075win = elem.defaultView;10076}1007710078if ( val === undefined ) {10079return win ? win[ prop ] : elem[ method ];10080}1008110082if ( win ) {10083win.scrollTo(10084!top ? val : win.pageXOffset,10085top ? val : win.pageYOffset10086);1008710088} else {10089elem[ method ] = val;10090}10091}, method, val, arguments.length );10092};10093} );1009410095// Support: Safari <=7 - 9.1, Chrome <=37 - 4910096// Add the top/left cssHooks using jQuery.fn.position10097// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=2908410098// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=58934710099// getComputedStyle returns percent when specified for top/left/bottom/right;10100// rather than make the css module depend on the offset module, just check for it here10101jQuery.each( [ "top", "left" ], function( i, prop ) {10102jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,10103function( elem, computed ) {10104if ( computed ) {10105computed = curCSS( elem, prop );1010610107// If curCSS returns percentage, fallback to offset10108return rnumnonpx.test( computed ) ?10109jQuery( elem ).position()[ prop ] + "px" :10110computed;10111}10112}10113);10114} );101151011610117// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods10118jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {10119jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name },10120function( defaultExtra, funcName ) {1012110122// Margin is only for outerHeight, outerWidth10123jQuery.fn[ funcName ] = function( margin, value ) {10124var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),10125extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );1012610127return access( this, function( elem, type, value ) {10128var doc;1012910130if ( jQuery.isWindow( elem ) ) {1013110132// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)10133return funcName.indexOf( "outer" ) === 0 ?10134elem[ "inner" + name ] :10135elem.document.documentElement[ "client" + name ];10136}1013710138// Get document width or height10139if ( elem.nodeType === 9 ) {10140doc = elem.documentElement;1014110142// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],10143// whichever is greatest10144return Math.max(10145elem.body[ "scroll" + name ], doc[ "scroll" + name ],10146elem.body[ "offset" + name ], doc[ "offset" + name ],10147doc[ "client" + name ]10148);10149}1015010151return value === undefined ?1015210153// Get width or height on the element, requesting but not forcing parseFloat10154jQuery.css( elem, type, extra ) :1015510156// Set width or height on the element10157jQuery.style( elem, type, value, extra );10158}, type, chainable ? margin : undefined, chainable );10159};10160} );10161} );101621016310164jQuery.fn.extend( {1016510166bind: function( types, data, fn ) {10167return this.on( types, null, data, fn );10168},10169unbind: function( types, fn ) {10170return this.off( types, null, fn );10171},1017210173delegate: function( selector, types, data, fn ) {10174return this.on( types, selector, data, fn );10175},10176undelegate: function( selector, types, fn ) {1017710178// ( namespace ) or ( selector, types [, fn] )10179return arguments.length === 1 ?10180this.off( selector, "**" ) :10181this.off( types, selector || "**", fn );10182}10183} );1018410185jQuery.holdReady = function( hold ) {10186if ( hold ) {10187jQuery.readyWait++;10188} else {10189jQuery.ready( true );10190}10191};10192jQuery.isArray = Array.isArray;10193jQuery.parseJSON = JSON.parse;10194jQuery.nodeName = nodeName;1019510196101971019810199// Register as a named AMD module, since jQuery can be concatenated with other10200// files that may use define, but not via a proper concatenation script that10201// understands anonymous AMD modules. A named AMD is safest and most robust10202// way to register. Lowercase jquery is used because AMD module names are10203// derived from file names, and jQuery is normally delivered in a lowercase10204// file name. Do this after creating the global so that if an AMD module wants10205// to call noConflict to hide this version of jQuery, it will work.1020610207// Note that for maximum portability, libraries that are not jQuery should10208// declare themselves as anonymous modules, and avoid setting a global if an10209// AMD loader is present. jQuery is a special case. For more information, see10210// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon1021110212if ( typeof define === "function" && define.amd ) {10213define( "jquery", [], function() {10214return jQuery;10215} );10216}1021710218102191022010221var1022210223// Map over jQuery in case of overwrite10224_jQuery = window.jQuery,1022510226// Map over the $ in case of overwrite10227_$ = window.$;1022810229jQuery.noConflict = function( deep ) {10230if ( window.$ === jQuery ) {10231window.$ = _$;10232}1023310234if ( deep && window.jQuery === jQuery ) {10235window.jQuery = _jQuery;10236}1023710238return jQuery;10239};1024010241// Expose jQuery and $ identifiers, even in AMD10242// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)10243// and CommonJS for browser emulators (#13566)10244if ( !noGlobal ) {10245window.jQuery = window.$ = jQuery;10246}1024710248102491025010251return jQuery;10252} );102531025410255