1/******/ (function(modules) { // webpackBootstrap 2/******/ // The module cache 3/******/ var installedModules = {}; 4/******/ 5/******/ // The require function 6/******/ function __webpack_require__(moduleId) { 7/******/ 8/******/ // Check if module is in cache 9/******/ if(installedModules[moduleId]) { 10/******/ return installedModules[moduleId].exports; 11/******/ } 12/******/ // Create a new module (and put it into the cache) 13/******/ var module = installedModules[moduleId] = { 14/******/ i: moduleId, 15/******/ l: false, 16/******/ exports: {} 17/******/ }; 18/******/ 19/******/ // Execute the module function 20/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21/******/ 22/******/ // Flag the module as loaded 23/******/ module.l = true; 24/******/ 25/******/ // Return the exports of the module 26/******/ return module.exports; 27/******/ } 28/******/ 29/******/ 30/******/ // expose the modules object (__webpack_modules__) 31/******/ __webpack_require__.m = modules; 32/******/ 33/******/ // expose the module cache 34/******/ __webpack_require__.c = installedModules; 35/******/ 36/******/ // define getter function for harmony exports 37/******/ __webpack_require__.d = function(exports, name, getter) { 38/******/ if(!__webpack_require__.o(exports, name)) { 39/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); 40/******/ } 41/******/ }; 42/******/ 43/******/ // define __esModule on exports 44/******/ __webpack_require__.r = function(exports) { 45/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 46/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 47/******/ } 48/******/ Object.defineProperty(exports, '__esModule', { value: true }); 49/******/ }; 50/******/ 51/******/ // create a fake namespace object 52/******/ // mode & 1: value is a module id, require it 53/******/ // mode & 2: merge all properties of value into the ns 54/******/ // mode & 4: return value when already ns object 55/******/ // mode & 8|1: behave like require 56/******/ __webpack_require__.t = function(value, mode) { 57/******/ if(mode & 1) value = __webpack_require__(value); 58/******/ if(mode & 8) return value; 59/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; 60/******/ var ns = Object.create(null); 61/******/ __webpack_require__.r(ns); 62/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); 63/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); 64/******/ return ns; 65/******/ }; 66/******/ 67/******/ // getDefaultExport function for compatibility with non-harmony modules 68/******/ __webpack_require__.n = function(module) { 69/******/ var getter = module && module.__esModule ? 70/******/ function getDefault() { return module['default']; } : 71/******/ function getModuleExports() { return module; }; 72/******/ __webpack_require__.d(getter, 'a', getter); 73/******/ return getter; 74/******/ }; 75/******/ 76/******/ // Object.prototype.hasOwnProperty.call 77/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 78/******/ 79/******/ // __webpack_public_path__ 80/******/ __webpack_require__.p = ""; 81/******/ 82/******/ 83/******/ // Load entry module and return exports 84/******/ return __webpack_require__(__webpack_require__.s = 443); 85/******/ }) 86/************************************************************************/ 87/******/ ({ 88 89/***/ 0: 90/***/ (function(module, exports, __webpack_require__) { 91 92/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["$"] = __webpack_require__(20); 93/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(3))) 94 95/***/ }), 96 97/***/ 20: 98/***/ (function(module, exports, __webpack_require__) { 99 100var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! 101 * jQuery JavaScript Library v3.5.1 102 * https://jquery.com/ 103 * 104 * Includes Sizzle.js 105 * https://sizzlejs.com/ 106 * 107 * Copyright JS Foundation and other contributors 108 * Released under the MIT license 109 * https://jquery.org/license 110 * 111 * Date: 2020-05-04T22:49Z 112 */ 113( function( global, factory ) { 114 115 "use strict"; 116 117 if ( true && typeof module.exports === "object" ) { 118 119 // For CommonJS and CommonJS-like environments where a proper `window` 120 // is present, execute the factory and get jQuery. 121 // For environments that do not have a `window` with a `document` 122 // (such as Node.js), expose a factory as module.exports. 123 // This accentuates the need for the creation of a real `window`. 124 // e.g. var jQuery = require("jquery")(window); 125 // See ticket #14549 for more info. 126 module.exports = global.document ? 127 factory( global, true ) : 128 function( w ) { 129 if ( !w.document ) { 130 throw new Error( "jQuery requires a window with a document" ); 131 } 132 return factory( w ); 133 }; 134 } else { 135 factory( global ); 136 } 137 138// Pass this if window is not defined yet 139} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { 140 141// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 142// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode 143// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), str
vendor: 5,155 bytes, lines 143-357
143ict mode should be common 144// enough that all such attempts are guarded in a try block. 145"use strict"; 146 147var arr = []; 148 149var getProto = Object.getPrototypeOf; 150 151var slice = arr.slice; 152 153var flat = arr.flat ? function( array ) { 154 return arr.flat.call( array ); 155} : function( array ) { 156 return arr.concat.apply( [], array ); 157}; 158 159 160var push = arr.push; 161 162var indexOf = arr.indexOf; 163 164var class2type = {}; 165 166var toString = class2type.toString; 167 168var hasOwn = class2type.hasOwnProperty; 169 170var fnToString = hasOwn.toString; 171 172var ObjectFunctionString = fnToString.call( Object ); 173 174var support = {}; 175 176var isFunction = function isFunction( obj ) { 177 178 // Support: Chrome <=57, Firefox <=52 179 // In some browsers, typeof returns "function" for HTML <object> elements 180 // (i.e., `typeof document.createElement( "object" ) === "function"`). 181 // We don't want to classify *any* DOM node as a function. 182 return typeof obj === "function" && typeof obj.nodeType !== "number"; 183 }; 184 185 186var isWindow = function isWindow( obj ) { 187 return obj != null && obj === obj.window; 188 }; 189 190 191var document = window.document; 192 193 194 195 var preservedScriptAttributes = { 196 type: true, 197 src: true, 198 nonce: true, 199 noModule: true 200 }; 201 202 function DOMEval( code, node, doc ) { 203 doc = doc || document; 204 205 var i, val, 206 script = doc.createElement( "script" ); 207 208 script.text = code; 209 if ( node ) { 210 for ( i in preservedScriptAttributes ) { 211 212 // Support: Firefox 64+, Edge 18+ 213 // Some browsers don't support the "nonce" property on scripts. 214 // On the other hand, just using `getAttribute` is not enough as 215 // the `nonce` attribute is reset to an empty string whenever it 216 // becomes browsing-context connected. 217 // See https://github.com/whatwg/html/issues/2369 218 // See https://html.spec.whatwg.org/#nonce-attributes 219 // The `node.getAttribute` check was added for the sake of 220 // `jQuery.globalEval` so that it can fake a nonce-containing node 221 // via an object. 222 val = node[ i ] || node.getAttribute && node.getAttribute( i ); 223 if ( val ) { 224 script.setAttribute( i, val ); 225 } 226 } 227 } 228 doc.head.appendChild( script ).parentNode.removeChild( script ); 229 } 230 231 232function toType( obj ) { 233 if ( obj == null ) { 234 return obj + ""; 235 } 236 237 // Support: Android <=2.3 only (functionish RegExp) 238 return typeof obj === "object" || typeof obj === "function" ? 239 class2type[ toString.call( obj ) ] || "object" : 240 typeof obj; 241} 242/* global Symbol */ 243// Defining this global in .eslintrc.json would create a danger of using the global 244// unguarded in another place, it seems safer to define global only for this module 245 246 247 248var 249 version = "3.5.1", 250 251 // Define a local copy of jQuery 252 jQuery = function( selector, context ) { 253 254 // The jQuery object is actually just the init constructor 'enhanced' 255 // Need init if jQuery is called (just allow error to be thrown if not included) 256 return new jQuery.fn.init( selector, context ); 257 }; 258 259jQuery.fn = jQuery.prototype = { 260 261 // The current version of jQuery being used 262 jquery: version, 263 264 constructor: jQuery, 265 266 // The default length of a jQuery object is 0 267 length: 0, 268 269 toArray: function() { 270 return slice.call( this ); 271 }, 272 273 // Get the Nth element in the matched element set OR 274 // Get the whole matched element set as a clean array 275 get: function( num ) { 276 277 // Return all the elements in a clean array 278 if ( num == null ) { 279 return slice.call( this ); 280 } 281 282 // Return just the one element from the set 283 return num < 0 ? this[ num + this.length ] : this[ num ]; 284 }, 285 286 // Take an array of elements and push it onto the stack 287 // (returning the new matched element set) 288 pushStack: function( elems ) { 289 290 // Build a new jQuery matched element set 291 var ret = jQuery.merge( this.constructor(), elems ); 292 293 // Add the old object onto the stack (as a reference) 294 ret.prevObject = this; 295 296 // Return the newly-formed element set 297 return ret; 298 }, 299 300 // Execute a callback for every element in the matched set. 301 each: function( callback ) { 302 return jQuery.each( this, callback ); 303 }, 304 305 map: function( callback ) { 306 return this.pushStack( jQuery.map( this, function( elem, i ) { 307 return callback.call( elem, i, elem ); 308 } ) ); 309 }, 310 311 slice: function() { 312 return this.pushStack( slice.apply( this, arguments ) ); 313 }, 314 315 first: function() { 316 return this.eq( 0 ); 317 }, 318 319 last: function() { 320 return this.eq( -1 ); 321 }, 322 323 even: function() { 324 return this.pushStack( jQuery.grep( this, function( _elem, i ) { 325 return ( i + 1 ) % 2; 326 } ) ); 327 }, 328 329 odd: function() { 330 return this.pushStack( jQuery.grep( this, function( _elem, i ) { 331 return i % 2; 332 } ) ); 333 }, 334 335 eq: function( i ) { 336 var len = this.length, 337 j = +i + ( i < 0 ? len : 0 ); 338 return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); 339 }, 340 341 end: function() { 342 return this.prevObject || this.constructor(); 343 }, 344 345 // For internal use only. 346 // Behaves like an Array's method, not like a jQuery method. 347 push: push, 348 sort: arr.sort, 349 splice: arr.splice 350}; 351 352jQuery.extend = jQuery.fn.extend = function() { 353 var options, name, src, copy, copyIsArray, clone, 354 target = arguments[ 0 ] || {}, 355 i = 1, 356 length = arguments.length, 357 deep = false;
vendor: 4,654 bytes, lines 358-564
358 359 // Handle a deep copy situation 360 if ( typeof target === "boolean" ) { 361 deep = target; 362 363 // Skip the boolean and the target 364 target = arguments[ i ] || {}; 365 i++; 366 } 367 368 // Handle case when target is a string or something (possible in deep copy) 369 if ( typeof target !== "object" && !isFunction( target ) ) { 370 target = {}; 371 } 372 373 // Extend jQuery itself if only one argument is passed 374 if ( i === length ) { 375 target = this; 376 i--; 377 } 378 379 for ( ; i < length; i++ ) { 380 381 // Only deal with non-null/undefined values 382 if ( ( options = arguments[ i ] ) != null ) { 383 384 // Extend the base object 385 for ( name in options ) { 386 copy = options[ name ]; 387 388 // Prevent Object.prototype pollution 389 // Prevent never-ending loop 390 if ( name === "__proto__" || target === copy ) { 391 continue; 392 } 393 394 // Recurse if we're merging plain objects or arrays 395 if ( deep && copy && ( jQuery.isPlainObject( copy ) || 396 ( copyIsArray = Array.isArray( copy ) ) ) ) { 397 src = target[ name ]; 398 399 // Ensure proper type for the source value 400 if ( copyIsArray && !Array.isArray( src ) ) { 401 clone = []; 402 } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) { 403 clone = {}; 404 } else { 405 clone = src; 406 } 407 copyIsArray = false; 408 409 // Never move original objects, clone them 410 target[ name ] = jQuery.extend( deep, clone, copy ); 411 412 // Don't bring in undefined values 413 } else if ( copy !== undefined ) { 414 target[ name ] = copy; 415 } 416 } 417 } 418 } 419 420 // Return the modified object 421 return target; 422}; 423 424jQuery.extend( { 425 426 // Unique for each copy of jQuery on the page 427 expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), 428 429 // Assume jQuery is ready without the ready module 430 isReady: true, 431 432 error: function( msg ) { 433 throw new Error( msg ); 434 }, 435 436 noop: function() {}, 437 438 isPlainObject: function( obj ) { 439 var proto, Ctor; 440 441 // Detect obvious negatives 442 // Use toString instead of jQuery.type to catch host objects 443 if ( !obj || toString.call( obj ) !== "[object Object]" ) { 444 return false; 445 } 446 447 proto = getProto( obj ); 448 449 // Objects with no prototype (e.g., `Object.create( null )`) are plain 450 if ( !proto ) { 451 return true; 452 } 453 454 // Objects with prototype are plain iff they were constructed by a global Object function 455 Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; 456 return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; 457 }, 458 459 isEmptyObject: function( obj ) { 460 var name; 461 462 for ( name in obj ) { 463 return false; 464 } 465 return true; 466 }, 467 468 // Evaluates a script in a provided context; falls back to the global one 469 // if not specified. 470 globalEval: function( code, options, doc ) { 471 DOMEval( code, { nonce: options && options.nonce }, doc ); 472 }, 473 474 each: function( obj, callback ) { 475 var length, i = 0; 476 477 if ( isArrayLike( obj ) ) { 478 length = obj.length; 479 for ( ; i < length; i++ ) { 480 if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { 481 break; 482 } 483 } 484 } else { 485 for ( i in obj ) { 486 if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { 487 break; 488 } 489 } 490 } 491 492 return obj; 493 }, 494 495 // results is for internal usage only 496 makeArray: function( arr, results ) { 497 var ret = results || []; 498 499 if ( arr != null ) { 500 if ( isArrayLike( Object( arr ) ) ) { 501 jQuery.merge( ret, 502 typeof arr === "string" ? 503 [ arr ] : arr 504 ); 505 } else { 506 push.call( ret, arr ); 507 } 508 } 509 510 return ret; 511 }, 512 513 inArray: function( elem, arr, i ) { 514 return arr == null ? -1 : indexOf.call( arr, elem, i ); 515 }, 516 517 // Support: Android <=4.0 only, PhantomJS 1 only 518 // push.apply(_, arraylike) throws on ancient WebKit 519 merge: function( first, second ) { 520 var len = +second.length, 521 j = 0, 522 i = first.length; 523 524 for ( ; j < len; j++ ) { 525 first[ i++ ] = second[ j ]; 526 } 527 528 first.length = i; 529 530 return first; 531 }, 532 533 grep: function( elems, callback, invert ) { 534 var callbackInverse, 535 matches = [], 536 i = 0, 537 length = elems.length, 538 callbackExpect = !invert; 539 540 // Go through the array, only saving the items 541 // that pass the validator function 542 for ( ; i < length; i++ ) { 543 callbackInverse = !callback( elems[ i ], i ); 544 if ( callbackInverse !== callbackExpect ) { 545 matches.push( elems[ i ] ); 546 } 547 } 548 549 return matches; 550 }, 551 552 // arg is for internal usage only 553 map: function( elems, callback, arg ) { 554 var length, value, 555 i = 0, 556 ret = []; 557 558 // Go through the array, translating each of the items to their new values 559 if ( isArrayLike( elems ) ) { 560 length = elems.length; 561 for ( ; i < length; i++ ) { 562 value = callback( elems[ i ], i, arg ); 563 564 if ( value != null ) {
vendor: 1,491 bytes, lines 565-627
565 ret.push( value ); 566 } 567 } 568 569 // Go through every key on the object, 570 } else { 571 for ( i in elems ) { 572 value = callback( elems[ i ], i, arg ); 573 574 if ( value != null ) { 575 ret.push( value ); 576 } 577 } 578 } 579 580 // Flatten any nested arrays 581 return flat( ret ); 582 }, 583 584 // A global GUID counter for objects 585 guid: 1, 586 587 // jQuery.support is not used in Core but other projects attach their 588 // properties to it so it needs to exist. 589 support: support 590} ); 591 592if ( typeof Symbol === "function" ) { 593 jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; 594} 595 596// Populate the class2type map 597jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), 598function( _i, name ) { 599 class2type[ "[object " + name + "]" ] = name.toLowerCase(); 600} ); 601 602function isArrayLike( obj ) { 603 604 // Support: real iOS 8.2 only (not reproducible in simulator) 605 // `in` check used to prevent JIT error (gh-2145) 606 // hasOwn isn't used here due to false negatives 607 // regarding Nodelist length in IE 608 var length = !!obj && "length" in obj && obj.length, 609 type = toType( obj ); 610 611 if ( isFunction( obj ) || isWindow( obj ) ) { 612 return false; 613 } 614 615 return type === "array" || length === 0 || 616 typeof length === "number" && length > 0 && ( length - 1 ) in obj; 617} 618var Sizzle = 619/*! 620 * Sizzle CSS Selector Engine v2.3.5 621 * https://sizzlejs.com/ 622 * 623 * Copyright JS Foundation and other contributors 624 * Released under the MIT license 625 * https://js.foundation/ 626 * 627 * Date: 2020-03-14
vendor: 16,386 bytes, lines 627-1210
627 628 */ 629( function( window ) { 630var i, 631 support, 632 Expr, 633 getText, 634 isXML, 635 tokenize, 636 compile, 637 select, 638 outermostContext, 639 sortInput, 640 hasDuplicate, 641 642 // Local document vars 643 setDocument, 644 document, 645 docElem, 646 documentIsHTML, 647 rbuggyQSA, 648 rbuggyMatches, 649 matches, 650 contains, 651 652 // Instance-specific data 653 expando = "sizzle" + 1 * new Date(), 654 preferredDoc = window.document, 655 dirruns = 0, 656 done = 0, 657 classCache = createCache(), 658 tokenCache = createCache(), 659 compilerCache = createCache(), 660 nonnativeSelectorCache = createCache(), 661 sortOrder = function( a, b ) { 662 if ( a === b ) { 663 hasDuplicate = true; 664 } 665 return 0; 666 }, 667 668 // Instance methods 669 hasOwn = ( {} ).hasOwnProperty, 670 arr = [], 671 pop = arr.pop, 672 pushNative = arr.push, 673 push = arr.push, 674 slice = arr.slice, 675 676 // Use a stripped-down indexOf as it's faster than native 677 // https://jsperf.com/thor-indexof-vs-for/5 678 indexOf = function( list, elem ) { 679 var i = 0, 680 len = list.length; 681 for ( ; i < len; i++ ) { 682 if ( list[ i ] === elem ) { 683 return i; 684 } 685 } 686 return -1; 687 }, 688 689 booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" + 690 "ismap|loop|multiple|open|readonly|required|scoped", 691 692 // Regular expressions 693 694 // http://www.w3.org/TR/css3-selectors/#whitespace 695 whitespace = "[\\x20\\t\\r\\n\\f]", 696 697 // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram 698 identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + 699 "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", 700 701 // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors 702 attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + 703 704 // Operator (capture 2) 705 "*([*^$|!~]?=)" + whitespace + 706 707 // "Attribute values must be CSS identifiers [capture 5] 708 // or strings [capture 3 or capture 4]" 709 "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + 710 whitespace + "*\\]", 711 712 pseudos = ":(" + identifier + ")(?:\\((" + 713 714 // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: 715 // 1. quoted (capture 3; capture 4 or capture 5) 716 "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + 717 718 // 2. simple (capture 6) 719 "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + 720 721 // 3. anything else (capture 2) 722 ".*" + 723 ")\\)|)", 724 725 // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter 726 rwhitespace = new RegExp( whitespace + "+", "g" ), 727 rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + 728 whitespace + "+$", "g" ), 729 730 rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), 731 rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + 732 "*" ), 733 rdescend = new RegExp( whitespace + "|>" ), 734 735 rpseudo = new RegExp( pseudos ), 736 ridentifier = new RegExp( "^" + identifier + "$" ), 737 738 matchExpr = { 739 "ID": new RegExp( "^#(" + identifier + ")" ), 740 "CLASS": new RegExp( "^\\.(" + identifier + ")" ), 741 "TAG": new RegExp( "^(" + identifier + "|[*])" ), 742 "ATTR": new RegExp( "^" + attributes ), 743 "PSEUDO": new RegExp( "^" + pseudos ), 744 "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + 745 whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + 746 whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), 747 "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), 748 749 // For use in libraries implementing .is() 750 // We use this for POS matching in `select` 751 "needsContext": new RegExp( "^" + whitespace + 752 "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + 753 "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) 754 }, 755 756 rhtml = /HTML$/i, 757 rinputs = /^(?:input|select|textarea|button)$/i, 758 rheader = /^h\d$/i, 759 760 rnative = /^[^{]+\{\s*\[native \w/, 761 762 // Easily-parseable/retrievable ID or TAG or CLASS selectors 763 rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, 764 765 rsibling = /[+~]/, 766 767 // CSS escapes 768 // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters 769 runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g" ), 770 funescape = function( escape, nonHex ) { 771 var high = "0x" + escape.slice( 1 ) - 0x10000; 772 773 return nonHex ? 774 775 // Strip the backslash prefix from a non-hex escape sequence 776 nonHex : 777 778 // Replace a hexadecimal escape sequence with the encoded Unicode code point 779 // Support: IE <=11+ 780 // For values outside the Basic Multilingual Plane (BMP), manually construct a 781 // surrogate pair 782 high < 0 ? 783 String.fromCharCode( high + 0x10000 ) : 784 String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); 785 }, 786 787 // CSS string/identifier serialization 788 // https://drafts.csswg.org/cssom/#common-serializing-idioms 789 rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, 790 fcssescape = function( ch, asCodePoint ) { 791 if ( asCodePoint ) { 792 793 // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER 794 if ( ch === "\0" ) { 795 return "\uFFFD"; 796 } 797 798 // Control characters and (dependent upon position) numbers get escaped as code points 799 return ch.slice( 0, -1 ) + "\\" + 800 ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; 801 } 802 803 // Other potentially-special ASCII characters get backslash-escaped 804 return "\\" + ch; 805 }, 806 807 // Used for iframes 808 // See setDocument() 809 // Removing the function wrapper causes a "Permission Denied" 810 // error in IE 811 unloadHandler = function() { 812 setDocument(); 813 }, 814 815 inDisabledFieldset = addCombinator( 816 function( elem ) { 817 return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset"; 818 }, 819 { dir: "parentNode", next: "legend" } 820 ); 821 822// Optimize for push.apply( _, NodeList ) 823try { 824 push.apply( 825 ( arr = slice.call( preferredDoc.childNodes ) ), 826 preferredDoc.childNodes 827 ); 828 829 // Support: Android<4.0 830 // Detect silently failing push.apply 831 // eslint-disable-next-line no-unused-expressions 832 arr[ preferredDoc.childNodes.length ].nodeType; 833} catch ( e ) { 834 push = { apply: arr.length ? 835 836 // Leverage slice if possible 837 function( target, els ) { 838 pushNative.apply( target, slice.call( els ) ); 839 } : 840 841 // Support: IE<9 842 // Otherwise append directly 843 function( target, els ) { 844 var j = target.length, 845 i = 0; 846 847 // Can't trust NodeList.length 848 while ( ( target[ j++ ] = els[ i++ ] ) ) {} 849 target.length = j - 1; 850 } 851 }; 852} 853 854function Sizzle( selector, context, results, seed ) { 855 var m, i, elem, nid, match, groups, newSelector, 856 newContext = context && context.ownerDocument, 857 858 // nodeType defaults to 9, since context defaults to document 859 nodeType = context ? context.nodeType : 9; 860 861 results = results || []; 862 863 // Return early from calls with invalid selector or context 864 if ( typeof selector !== "string" || !selector || 865 nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { 866 867 return results; 868 } 869 870 // Try to shortcut find operations (as opposed to filters) in HTML documents 871 if ( !seed ) { 872 setDocument( context ); 873 context = context || document; 874 875 if ( documentIsHTML ) { 876 877 // If the selector is sufficiently simple, try using a "get*By*" DOM method 878 // (excepting DocumentFragment context, where the methods don't exist) 879 if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) { 880 881 // ID selector 882 if ( ( m = match[ 1 ] ) ) { 883 884 // Document context 885 if ( nodeType === 9 ) { 886 if ( ( elem = context.getElementById( m ) ) ) { 887 888 // Support: IE, Opera, Webkit 889 // TODO: identify versions 890 // getElementById can match elements by name instead of ID 891 if ( elem.id === m ) { 892 results.push( elem ); 893 return results; 894 } 895 } else { 896 return results; 897 } 898 899 // Element context 900 } else { 901 902 // Support: IE, Opera, Webkit 903 // TODO: identify versions 904 // getElementById can match elements by name instead of ID 905 if ( newContext && ( elem = newContext.getElementById( m ) ) && 906 contains( context, elem ) && 907 elem.id === m ) { 908 909 results.push( elem ); 910 return results; 911 } 912 } 913 914 // Type selector 915 } else if ( match[ 2 ] ) { 916 push.apply( results, context.getElementsByTagName( selector ) ); 917 return results; 918 919 // Class selector 920 } else if ( ( m = match[ 3 ] ) && support.getElementsByClassName && 921 context.getElementsByClassName ) { 922 923 push.apply( results, context.getElementsByClassName( m ) ); 924 return results; 925 } 926 } 927 928 // Take advantage of querySelectorAll 929 if ( support.qsa && 930 !nonnativeSelectorCache[ selector + " " ] && 931 ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) && 932 933 // Support: IE 8 only 934 // Exclude object elements 935 ( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) { 936 937 newSelector = selector; 938 newContext = context; 939 940 // qSA considers elements outside a scoping root when evaluating child or 941 // descendant combinators, which is not what we want. 942 // In such cases, we work around the behavior by prefixing every selector in the 943 // list with an ID selector referencing the scope context. 944 // The technique has to be used as well when a leading combinator is used 945 // as such selectors are not recognized by querySelectorAll. 946 // Thanks to Andrew Dupont for this technique. 947 if ( nodeType === 1 && 948 ( rdescend.test( selector ) || rcombinators.test( selector ) ) ) { 949 950 // Expand context for sibling selectors 951 newContext = rsibling.test( selector ) && testContext( context.parentNode ) || 952 context; 953 954 // We can use :scope instead of the ID hack if the browser 955 // supports it & if we're not changing the context. 956 if ( newContext !== context || !support.scope ) { 957 958 // Capture the context ID, setting it first if necessary 959 if ( ( nid = context.getAttribute( "id" ) ) ) { 960 nid = nid.replace( rcssescape, fcssescape ); 961 } else { 962 context.setAttribute( "id", ( nid = expando ) ); 963 } 964 } 965 966 // Prefix every selector in the list 967 groups = tokenize( selector ); 968 i = groups.length; 969 while ( i-- ) { 970 groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " + 971 toSelector( groups[ i ] ); 972 } 973 newSelector = groups.join( "," ); 974 } 975 976 try { 977 push.apply( results, 978 newContext.querySelectorAll( newSelector ) 979 ); 980 return results; 981 } catch ( qsaError ) { 982 nonnativeSelectorCache( selector, true ); 983 } finally { 984 if ( nid === expando ) { 985 context.removeAttribute( "id" ); 986 } 987 } 988 } 989 } 990 } 991 992 // All others 993 return select( selector.replace( rtrim, "$1" ), context, results, seed ); 994} 995 996/** 997 * Create key-value caches of limited size 998 * @returns {function(string, object)} Returns the Object data after storing it on itself with 999 * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) 1000 * deleting the oldest entry 1001 */ 1002function createCache() { 1003 var keys = []; 1004 1005 function cache( key, value ) { 1006 1007 // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) 1008 if ( keys.push( key + " " ) > Expr.cacheLength ) { 1009 1010 // Only keep the most recent entries 1011 delete cache[ keys.shift() ]; 1012 } 1013 return ( cache[ key + " " ] = value ); 1014 } 1015 return cache; 1016} 1017 1018/** 1019 * Mark a function for special use by Sizzle 1020 * @param {Function} fn The function to mark 1021 */ 1022function markFunction( fn ) { 1023 fn[ expando ] = true; 1024 return fn; 1025} 1026 1027/** 1028 * Support testing using an element 1029 * @param {Function} fn Passed the created element and returns a boolean result 1030 */ 1031function assert( fn ) { 1032 var el = document.createElement( "fieldset" ); 1033 1034 try { 1035 return !!fn( el ); 1036 } catch ( e ) { 1037 return false; 1038 } finally { 1039 1040 // Remove from its parent by default 1041 if ( el.parentNode ) { 1042 el.parentNode.removeChild( el ); 1043 } 1044 1045 // release memory in IE 1046 el = null; 1047 } 1048} 1049 1050/** 1051 * Adds the same handler for all of the specified attrs 1052 * @param {String} attrs Pipe-separated list of attributes 1053 * @param {Function} handler The method that will be applied 1054 */ 1055function addHandle( attrs, handler ) { 1056 var arr = attrs.split( "|" ), 1057 i = arr.length; 1058 1059 while ( i-- ) { 1060 Expr.attrHandle[ arr[ i ] ] = handler; 1061 } 1062} 1063 1064/** 1065 * Checks document order of two siblings 1066 * @param {Element} a 1067 * @param {Element} b 1068 * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b 1069 */ 1070function siblingCheck( a, b ) { 1071 var cur = b && a, 1072 diff = cur && a.nodeType === 1 && b.nodeType === 1 && 1073 a.sourceIndex - b.sourceIndex; 1074 1075 // Use IE sourceIndex if available on both nodes 1076 if ( diff ) { 1077 return diff; 1078 } 1079 1080 // Check if b follows a 1081 if ( cur ) { 1082 while ( ( cur = cur.nextSibling ) ) { 1083 if ( cur === b ) { 1084 return -1; 1085 } 1086 } 1087 } 1088 1089 return a ? 1 : -1; 1090} 1091 1092/** 1093 * Returns a function to use in pseudos for input types 1094 * @param {String} type 1095 */ 1096function createInputPseudo( type ) { 1097 return function( elem ) { 1098 var name = elem.nodeName.toLowerCase(); 1099 return name === "input" && elem.type === type; 1100 }; 1101} 1102 1103/** 1104 * Returns a function to use in pseudos for buttons 1105 * @param {String} type 1106 */ 1107function createButtonPseudo( type ) { 1108 return function( elem ) { 1109 var name = elem.nodeName.toLowerCase(); 1110 return ( name === "input" || name === "button" ) && elem.type === type; 1111 }; 1112} 1113 1114/** 1115 * Returns a function to use in pseudos for :enabled/:disabled 1116 * @param {Boolean} disabled true for :disabled; false for :enabled 1117 */ 1118function createDisabledPseudo( disabled ) { 1119 1120 // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable 1121 return function( elem ) { 1122 1123 // Only certain elements can match :enabled or :disabled 1124 // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled 1125 // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled 1126 if ( "form" in elem ) { 1127 1128 // Check for inherited disabledness on relevant non-disabled elements: 1129 // * listed form-associated elements in a disabled fieldset 1130 // https://html.spec.whatwg.org/multipage/forms.html#category-listed 1131 // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled 1132 // * option elements in a disabled optgroup 1133 // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled 1134 // All such elements have a "form" property. 1135 if ( elem.parentNode && elem.disabled === false ) { 1136 1137 // Option elements defer to a parent optgroup if present 1138 if ( "label" in elem ) { 1139 if ( "label" in elem.parentNode ) { 1140 return elem.parentNode.disabled === disabled; 1141 } else { 1142 return elem.disabled === disabled; 1143 } 1144 } 1145 1146 // Support: IE 6 - 11 1147 // Use the isDisabled shortcut property to check for disabled fieldset ancestors 1148 return elem.isDisabled === disabled || 1149 1150 // Where there is no isDisabled, check manually 1151 /* jshint -W018 */ 1152 elem.isDisabled !== !disabled && 1153 inDisabledFieldset( elem ) === disabled; 1154 } 1155 1156 return elem.disabled === disabled; 1157 1158 // Try to winnow out elements that can't be disabled before trusting the disabled property. 1159 // Some victims get caught in our net (label, legend, menu, track), but it shouldn't 1160 // even exist on them, let alone have a boolean value. 1161 } else if ( "label" in elem ) { 1162 return elem.disabled === disabled; 1163 } 1164 1165 // Remaining elements are neither :enabled nor :disabled 1166 return false; 1167 }; 1168} 1169 1170/** 1171 * Returns a function to use in pseudos for positionals 1172 * @param {Function} fn 1173 */ 1174function createPositionalPseudo( fn ) { 1175 return markFunction( function( argument ) { 1176 argument = +argument; 1177 return markFunction( function( seed, matches ) { 1178 var j, 1179 matchIndexes = fn( [], seed.length, argument ), 1180 i = matchIndexes.length; 1181 1182 // Match elements found at the specified indexes 1183 while ( i-- ) { 1184 if ( seed[ ( j = matchIndexes[ i ] ) ] ) { 1185 seed[ j ] = !( matches[ j ] = seed[ j ] ); 1186 } 1187 } 1188 } ); 1189 } ); 1190} 1191 1192/** 1193 * Checks a node for validity as a Sizzle context 1194 * @param {Element|Object=} context 1195 * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value 1196 */ 1197function testContext( context ) { 1198 return context && typeof context.getElementsByTagName !== "undefined" && context; 1199} 1200 1201// Expose support vars for convenience 1202support = Sizzle.support = {}; 1203 1204/** 1205 * Detects XML nodes 1206 * @param {Element|Object} elem An element or a document 1207 * @returns {Boolean} True iff elem is a non-HTML XML node 1208 */ 1209isXML = Sizzle.isXML = function( elem ) { 1210 var namespace = elem
1210.namespaceURI, 1211 docElem =
vendor: 54,357 bytes, lines 1211-3125
1211 ( elem.ownerDocument || elem ).documentElement; 1212 1213 // Support: IE <=8 1214 // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes 1215 // https://bugs.jquery.com/ticket/4833 1216 return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" ); 1217}; 1218 1219/** 1220 * Sets document-related variables once based on the current document 1221 * @param {Element|Object} [doc] An element or document object to use to set the document 1222 * @returns {Object} Returns the current document 1223 */ 1224setDocument = Sizzle.setDocument = function( node ) { 1225 var hasCompare, subWindow, 1226 doc = node ? node.ownerDocument || node : preferredDoc; 1227 1228 // Return early if doc is invalid or already selected 1229 // Support: IE 11+, Edge 17 - 18+ 1230 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 1231 // two documents; shallow comparisons work. 1232 // eslint-disable-next-line eqeqeq 1233 if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) { 1234 return document; 1235 } 1236 1237 // Update global variables 1238 document = doc; 1239 docElem = document.documentElement; 1240 documentIsHTML = !isXML( document ); 1241 1242 // Support: IE 9 - 11+, Edge 12 - 18+ 1243 // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) 1244 // Support: IE 11+, Edge 17 - 18+ 1245 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 1246 // two documents; shallow comparisons work. 1247 // eslint-disable-next-line eqeqeq 1248 if ( preferredDoc != document && 1249 ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) { 1250 1251 // Support: IE 11, Edge 1252 if ( subWindow.addEventListener ) { 1253 subWindow.addEventListener( "unload", unloadHandler, false ); 1254 1255 // Support: IE 9 - 10 only 1256 } else if ( subWindow.attachEvent ) { 1257 subWindow.attachEvent( "onunload", unloadHandler ); 1258 } 1259 } 1260 1261 // Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only, 1262 // Safari 4 - 5 only, Opera <=11.6 - 12.x only 1263 // IE/Edge & older browsers don't support the :scope pseudo-class. 1264 // Support: Safari 6.0 only 1265 // Safari 6.0 supports :scope but it's an alias of :root there. 1266 support.scope = assert( function( el ) { 1267 docElem.appendChild( el ).appendChild( document.createElement( "div" ) ); 1268 return typeof el.querySelectorAll !== "undefined" && 1269 !el.querySelectorAll( ":scope fieldset div" ).length; 1270 } ); 1271 1272 /* Attributes 1273 ---------------------------------------------------------------------- */ 1274 1275 // Support: IE<8 1276 // Verify that getAttribute really returns attributes and not properties 1277 // (excepting IE8 booleans) 1278 support.attributes = assert( function( el ) { 1279 el.className = "i"; 1280 return !el.getAttribute( "className" ); 1281 } ); 1282 1283 /* getElement(s)By* 1284 ---------------------------------------------------------------------- */ 1285 1286 // Check if getElementsByTagName("*") returns only elements 1287 support.getElementsByTagName = assert( function( el ) { 1288 el.appendChild( document.createComment( "" ) ); 1289 return !el.getElementsByTagName( "*" ).length; 1290 } ); 1291 1292 // Support: IE<9 1293 support.getElementsByClassName = rnative.test( document.getElementsByClassName ); 1294 1295 // Support: IE<10 1296 // Check if getElementById returns elements by name 1297 // The broken getElementById methods don't pick up programmatically-set names, 1298 // so use a roundabout getElementsByName test 1299 support.getById = assert( function( el ) { 1300 docElem.appendChild( el ).id = expando; 1301 return !document.getElementsByName || !document.getElementsByName( expando ).length; 1302 } ); 1303 1304 // ID filter and find 1305 if ( support.getById ) { 1306 Expr.filter[ "ID" ] = function( id ) { 1307 var attrId = id.replace( runescape, funescape ); 1308 return function( elem ) { 1309 return elem.getAttribute( "id" ) === attrId; 1310 }; 1311 }; 1312 Expr.find[ "ID" ] = function( id, context ) { 1313 if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { 1314 var elem = context.getElementById( id ); 1315 return elem ? [ elem ] : []; 1316 } 1317 }; 1318 } else { 1319 Expr.filter[ "ID" ] = function( id ) { 1320 var attrId = id.replace( runescape, funescape ); 1321 return function( elem ) { 1322 var node = typeof elem.getAttributeNode !== "undefined" && 1323 elem.getAttributeNode( "id" ); 1324 return node && node.value === attrId; 1325 }; 1326 }; 1327 1328 // Support: IE 6 - 7 only 1329 // getElementById is not reliable as a find shortcut 1330 Expr.find[ "ID" ] = function( id, context ) { 1331 if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { 1332 var node, i, elems, 1333 elem = context.getElementById( id ); 1334 1335 if ( elem ) { 1336 1337 // Verify the id attribute 1338 node = elem.getAttributeNode( "id" ); 1339 if ( node && node.value === id ) { 1340 return [ elem ]; 1341 } 1342 1343 // Fall back on getElementsByName 1344 elems = context.getElementsByName( id ); 1345 i = 0; 1346 while ( ( elem = elems[ i++ ] ) ) { 1347 node = elem.getAttributeNode( "id" ); 1348 if ( node && node.value === id ) { 1349 return [ elem ]; 1350 } 1351 } 1352 } 1353 1354 return []; 1355 } 1356 }; 1357 } 1358 1359 // Tag 1360 Expr.find[ "TAG" ] = support.getElementsByTagName ? 1361 function( tag, context ) { 1362 if ( typeof context.getElementsByTagName !== "undefined" ) { 1363 return context.getElementsByTagName( tag ); 1364 1365 // DocumentFragment nodes don't have gEBTN 1366 } else if ( support.qsa ) { 1367 return context.querySelectorAll( tag ); 1368 } 1369 } : 1370 1371 function( tag, context ) { 1372 var elem, 1373 tmp = [], 1374 i = 0, 1375 1376 // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too 1377 results = context.getElementsByTagName( tag ); 1378 1379 // Filter out possible comments 1380 if ( tag === "*" ) { 1381 while ( ( elem = results[ i++ ] ) ) { 1382 if ( elem.nodeType === 1 ) { 1383 tmp.push( elem ); 1384 } 1385 } 1386 1387 return tmp; 1388 } 1389 return results; 1390 }; 1391 1392 // Class 1393 Expr.find[ "CLASS" ] = support.getElementsByClassName && function( className, context ) { 1394 if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { 1395 return context.getElementsByClassName( className ); 1396 } 1397 }; 1398 1399 /* QSA/matchesSelector 1400 ---------------------------------------------------------------------- */ 1401 1402 // QSA and matchesSelector support 1403 1404 // matchesSelector(:active) reports false when true (IE9/Opera 11.5) 1405 rbuggyMatches = []; 1406 1407 // qSa(:focus) reports false when true (Chrome 21) 1408 // We allow this because of a bug in IE8/9 that throws an error 1409 // whenever `document.activeElement` is accessed on an iframe 1410 // So, we allow :focus to pass through QSA all the time to avoid the IE error 1411 // See https://bugs.jquery.com/ticket/13378 1412 rbuggyQSA = []; 1413 1414 if ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) { 1415 1416 // Build QSA regex 1417 // Regex strategy adopted from Diego Perini 1418 assert( function( el ) { 1419 1420 var input; 1421 1422 // Select is set to empty string on purpose 1423 // This is to test IE's treatment of not explicitly 1424 // setting a boolean content attribute, 1425 // since its presence should be enough 1426 // https://bugs.jquery.com/ticket/12359 1427 docElem.appendChild( el ).innerHTML = "<a id='" + expando + "'></a>" + 1428 "<select id='" + expando + "-\r\\' msallowcapture=''>" + 1429 "<option selected=''></option></select>"; 1430 1431 // Support: IE8, Opera 11-12.16 1432 // Nothing should be selected when empty strings follow ^= or $= or *= 1433 // The test attribute must be unknown in Opera but "safe" for WinRT 1434 // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section 1435 if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) { 1436 rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); 1437 } 1438 1439 // Support: IE8 1440 // Boolean attributes and "value" are not treated correctly 1441 if ( !el.querySelectorAll( "[selected]" ).length ) { 1442 rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); 1443 } 1444 1445 // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ 1446 if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { 1447 rbuggyQSA.push( "~=" ); 1448 } 1449 1450 // Support: IE 11+, Edge 15 - 18+ 1451 // IE 11/Edge don't find elements on a `[name='']` query in some cases. 1452 // Adding a temporary attribute to the document before the selection works 1453 // around the issue. 1454 // Interestingly, IE 10 & older don't seem to have the issue. 1455 input = document.createElement( "input" ); 1456 input.setAttribute( "name", "" ); 1457 el.appendChild( input ); 1458 if ( !el.querySelectorAll( "[name='']" ).length ) { 1459 rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" + 1460 whitespace + "*(?:''|\"\")" ); 1461 } 1462 1463 // Webkit/Opera - :checked should return selected option elements 1464 // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked 1465 // IE8 throws error here and will not see later tests 1466 if ( !el.querySelectorAll( ":checked" ).length ) { 1467 rbuggyQSA.push( ":checked" ); 1468 } 1469 1470 // Support: Safari 8+, iOS 8+ 1471 // https://bugs.webkit.org/show_bug.cgi?id=136851 1472 // In-page `selector#id sibling-combinator selector` fails 1473 if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { 1474 rbuggyQSA.push( ".#.+[+~]" ); 1475 } 1476 1477 // Support: Firefox <=3.6 - 5 only 1478 // Old Firefox doesn't throw on a badly-escaped identifier. 1479 el.querySelectorAll( "\\\f" ); 1480 rbuggyQSA.push( "[\\r\\n\\f]" ); 1481 } ); 1482 1483 assert( function( el ) { 1484 el.innerHTML = "<a href='' disabled='disabled'></a>" + 1485 "<select disabled='disabled'><option/></select>"; 1486 1487 // Support: Windows 8 Native Apps 1488 // The type and name attributes are restricted during .innerHTML assignment 1489 var input = document.createElement( "input" ); 1490 input.setAttribute( "type", "hidden" ); 1491 el.appendChild( input ).setAttribute( "name", "D" ); 1492 1493 // Support: IE8 1494 // Enforce case-sensitivity of name attribute 1495 if ( el.querySelectorAll( "[name=d]" ).length ) { 1496 rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); 1497 } 1498 1499 // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) 1500 // IE8 throws error here and will not see later tests 1501 if ( el.querySelectorAll( ":enabled" ).length !== 2 ) { 1502 rbuggyQSA.push( ":enabled", ":disabled" ); 1503 } 1504 1505 // Support: IE9-11+ 1506 // IE's :disabled selector does not pick up the children of disabled fieldsets 1507 docElem.appendChild( el ).disabled = true; 1508 if ( el.querySelectorAll( ":disabled" ).length !== 2 ) { 1509 rbuggyQSA.push( ":enabled", ":disabled" ); 1510 } 1511 1512 // Support: Opera 10 - 11 only 1513 // Opera 10-11 does not throw on post-comma invalid pseudos 1514 el.querySelectorAll( "*,:x" ); 1515 rbuggyQSA.push( ",.*:" ); 1516 } ); 1517 } 1518 1519 if ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches || 1520 docElem.webkitMatchesSelector || 1521 docElem.mozMatchesSelector || 1522 docElem.oMatchesSelector || 1523 docElem.msMatchesSelector ) ) ) ) { 1524 1525 assert( function( el ) { 1526 1527 // Check to see if it's possible to do matchesSelector 1528 // on a disconnected node (IE 9) 1529 support.disconnectedMatch = matches.call( el, "*" ); 1530 1531 // This should fail with an exception 1532 // Gecko does not error, returns false instead 1533 matches.call( el, "[s!='']:x" ); 1534 rbuggyMatches.push( "!=", pseudos ); 1535 } ); 1536 } 1537 1538 rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) ); 1539 rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) ); 1540 1541 /* Contains 1542 ---------------------------------------------------------------------- */ 1543 hasCompare = rnative.test( docElem.compareDocumentPosition ); 1544 1545 // Element contains another 1546 // Purposefully self-exclusive 1547 // As in, an element does not contain itself 1548 contains = hasCompare || rnative.test( docElem.contains ) ? 1549 function( a, b ) { 1550 var adown = a.nodeType === 9 ? a.documentElement : a, 1551 bup = b && b.parentNode; 1552 return a === bup || !!( bup && bup.nodeType === 1 && ( 1553 adown.contains ? 1554 adown.contains( bup ) : 1555 a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 1556 ) ); 1557 } : 1558 function( a, b ) { 1559 if ( b ) { 1560 while ( ( b = b.parentNode ) ) { 1561 if ( b === a ) { 1562 return true; 1563 } 1564 } 1565 } 1566 return false; 1567 }; 1568 1569 /* Sorting 1570 ---------------------------------------------------------------------- */ 1571 1572 // Document order sorting 1573 sortOrder = hasCompare ? 1574 function( a, b ) { 1575 1576 // Flag for duplicate removal 1577 if ( a === b ) { 1578 hasDuplicate = true; 1579 return 0; 1580 } 1581 1582 // Sort on method existence if only one input has compareDocumentPosition 1583 var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; 1584 if ( compare ) { 1585 return compare; 1586 } 1587 1588 // Calculate position if both inputs belong to the same document 1589 // Support: IE 11+, Edge 17 - 18+ 1590 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 1591 // two documents; shallow comparisons work. 1592 // eslint-disable-next-line eqeqeq 1593 compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ? 1594 a.compareDocumentPosition( b ) : 1595 1596 // Otherwise we know they are disconnected 1597 1; 1598 1599 // Disconnected nodes 1600 if ( compare & 1 || 1601 ( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) { 1602 1603 // Choose the first element that is related to our preferred document 1604 // Support: IE 11+, Edge 17 - 18+ 1605 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 1606 // two documents; shallow comparisons work. 1607 // eslint-disable-next-line eqeqeq 1608 if ( a == document || a.ownerDocument == preferredDoc && 1609 contains( preferredDoc, a ) ) { 1610 return -1; 1611 } 1612 1613 // Support: IE 11+, Edge 17 - 18+ 1614 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 1615 // two documents; shallow comparisons work. 1616 // eslint-disable-next-line eqeqeq 1617 if ( b == document || b.ownerDocument == preferredDoc && 1618 contains( preferredDoc, b ) ) { 1619 return 1; 1620 } 1621 1622 // Maintain original order 1623 return sortInput ? 1624 ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : 1625 0; 1626 } 1627 1628 return compare & 4 ? -1 : 1; 1629 } : 1630 function( a, b ) { 1631 1632 // Exit early if the nodes are identical 1633 if ( a === b ) { 1634 hasDuplicate = true; 1635 return 0; 1636 } 1637 1638 var cur, 1639 i = 0, 1640 aup = a.parentNode, 1641 bup = b.parentNode, 1642 ap = [ a ], 1643 bp = [ b ]; 1644 1645 // Parentless nodes are either documents or disconnected 1646 if ( !aup || !bup ) { 1647 1648 // Support: IE 11+, Edge 17 - 18+ 1649 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 1650 // two documents; shallow comparisons work. 1651 /* eslint-disable eqeqeq */ 1652 return a == document ? -1 : 1653 b == document ? 1 : 1654 /* eslint-enable eqeqeq */ 1655 aup ? -1 : 1656 bup ? 1 : 1657 sortInput ? 1658 ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : 1659 0; 1660 1661 // If the nodes are siblings, we can do a quick check 1662 } else if ( aup === bup ) { 1663 return siblingCheck( a, b ); 1664 } 1665 1666 // Otherwise we need full lists of their ancestors for comparison 1667 cur = a; 1668 while ( ( cur = cur.parentNode ) ) { 1669 ap.unshift( cur ); 1670 } 1671 cur = b; 1672 while ( ( cur = cur.parentNode ) ) { 1673 bp.unshift( cur ); 1674 } 1675 1676 // Walk down the tree looking for a discrepancy 1677 while ( ap[ i ] === bp[ i ] ) { 1678 i++; 1679 } 1680 1681 return i ? 1682 1683 // Do a sibling check if the nodes have a common ancestor 1684 siblingCheck( ap[ i ], bp[ i ] ) : 1685 1686 // Otherwise nodes in our document sort first 1687 // Support: IE 11+, Edge 17 - 18+ 1688 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 1689 // two documents; shallow comparisons work. 1690 /* eslint-disable eqeqeq */ 1691 ap[ i ] == preferredDoc ? -1 : 1692 bp[ i ] == preferredDoc ? 1 : 1693 /* eslint-enable eqeqeq */ 1694 0; 1695 }; 1696 1697 return document; 1698}; 1699 1700Sizzle.matches = function( expr, elements ) { 1701 return Sizzle( expr, null, null, elements ); 1702}; 1703 1704Sizzle.matchesSelector = function( elem, expr ) { 1705 setDocument( elem ); 1706 1707 if ( support.matchesSelector && documentIsHTML && 1708 !nonnativeSelectorCache[ expr + " " ] && 1709 ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && 1710 ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { 1711 1712 try { 1713 var ret = matches.call( elem, expr ); 1714 1715 // IE 9's matchesSelector returns false on disconnected nodes 1716 if ( ret || support.disconnectedMatch || 1717 1718 // As well, disconnected nodes are said to be in a document 1719 // fragment in IE 9 1720 elem.document && elem.document.nodeType !== 11 ) { 1721 return ret; 1722 } 1723 } catch ( e ) { 1724 nonnativeSelectorCache( expr, true ); 1725 } 1726 } 1727 1728 return Sizzle( expr, document, null, [ elem ] ).length > 0; 1729}; 1730 1731Sizzle.contains = function( context, elem ) { 1732 1733 // Set document vars if needed 1734 // Support: IE 11+, Edge 17 - 18+ 1735 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 1736 // two documents; shallow comparisons work. 1737 // eslint-disable-next-line eqeqeq 1738 if ( ( context.ownerDocument || context ) != document ) { 1739 setDocument( context ); 1740 } 1741 return contains( context, elem ); 1742}; 1743 1744Sizzle.attr = function( elem, name ) { 1745 1746 // Set document vars if needed 1747 // Support: IE 11+, Edge 17 - 18+ 1748 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 1749 // two documents; shallow comparisons work. 1750 // eslint-disable-next-line eqeqeq 1751 if ( ( elem.ownerDocument || elem ) != document ) { 1752 setDocument( elem ); 1753 } 1754 1755 var fn = Expr.attrHandle[ name.toLowerCase() ], 1756 1757 // Don't get fooled by Object.prototype properties (jQuery #13807) 1758 val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? 1759 fn( elem, name, !documentIsHTML ) : 1760 undefined; 1761 1762 return val !== undefined ? 1763 val : 1764 support.attributes || !documentIsHTML ? 1765 elem.getAttribute( name ) : 1766 ( val = elem.getAttributeNode( name ) ) && val.specified ? 1767 val.value : 1768 null; 1769}; 1770 1771Sizzle.escape = function( sel ) { 1772 return ( sel + "" ).replace( rcssescape, fcssescape ); 1773}; 1774 1775Sizzle.error = function( msg ) { 1776 throw new Error( "Syntax error, unrecognized expression: " + msg ); 1777}; 1778 1779/** 1780 * Document sorting and removing duplicates 1781 * @param {ArrayLike} results 1782 */ 1783Sizzle.uniqueSort = function( results ) { 1784 var elem, 1785 duplicates = [], 1786 j = 0, 1787 i = 0; 1788 1789 // Unless we *know* we can detect duplicates, assume their presence 1790 hasDuplicate = !support.detectDuplicates; 1791 sortInput = !support.sortStable && results.slice( 0 ); 1792 results.sort( sortOrder ); 1793 1794 if ( hasDuplicate ) { 1795 while ( ( elem = results[ i++ ] ) ) { 1796 if ( elem === results[ i ] ) { 1797 j = duplicates.push( i ); 1798 } 1799 } 1800 while ( j-- ) { 1801 results.splice( duplicates[ j ], 1 ); 1802 } 1803 } 1804 1805 // Clear input after sorting to release objects 1806 // See https://github.com/jquery/sizzle/pull/225 1807 sortInput = null; 1808 1809 return results; 1810}; 1811 1812/** 1813 * Utility function for retrieving the text value of an array of DOM nodes 1814 * @param {Array|Element} elem 1815 */ 1816getText = Sizzle.getText = function( elem ) { 1817 var node, 1818 ret = "", 1819 i = 0, 1820 nodeType = elem.nodeType; 1821 1822 if ( !nodeType ) { 1823 1824 // If no nodeType, this is expected to be an array 1825 while ( ( node = elem[ i++ ] ) ) { 1826 1827 // Do not traverse comment nodes 1828 ret += getText( node ); 1829 } 1830 } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { 1831 1832 // Use textContent for elements 1833 // innerText usage removed for consistency of new lines (jQuery #11153) 1834 if ( typeof elem.textContent === "string" ) { 1835 return elem.textContent; 1836 } else { 1837 1838 // Traverse its children 1839 for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { 1840 ret += getText( elem ); 1841 } 1842 } 1843 } else if ( nodeType === 3 || nodeType === 4 ) { 1844 return elem.nodeValue; 1845 } 1846 1847 // Do not include comment or processing instruction nodes 1848 1849 return ret; 1850}; 1851 1852Expr = Sizzle.selectors = { 1853 1854 // Can be adjusted by the user 1855 cacheLength: 50, 1856 1857 createPseudo: markFunction, 1858 1859 match: matchExpr, 1860 1861 attrHandle: {}, 1862 1863 find: {}, 1864 1865 relative: { 1866 ">": { dir: "parentNode", first: true }, 1867 " ": { dir: "parentNode" }, 1868 "+": { dir: "previousSibling", first: true }, 1869 "~": { dir: "previousSibling" } 1870 }, 1871 1872 preFilter: { 1873 "ATTR": function( match ) { 1874 match[ 1 ] = match[ 1 ].replace( runescape, funescape ); 1875 1876 // Move the given value to match[3] whether quoted or unquoted 1877 match[ 3 ] = ( match[ 3 ] || match[ 4 ] || 1878 match[ 5 ] || "" ).replace( runescape, funescape ); 1879 1880 if ( match[ 2 ] === "~=" ) { 1881 match[ 3 ] = " " + match[ 3 ] + " "; 1882 } 1883 1884 return match.slice( 0, 4 ); 1885 }, 1886 1887 "CHILD": function( match ) { 1888 1889 /* matches from matchExpr["CHILD"] 1890 1 type (only|nth|...) 1891 2 what (child|of-type) 1892 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) 1893 4 xn-component of xn+y argument ([+-]?\d*n|) 1894 5 sign of xn-component 1895 6 x of xn-component 1896 7 sign of y-component 1897 8 y of y-component 1898 */ 1899 match[ 1 ] = match[ 1 ].toLowerCase(); 1900 1901 if ( match[ 1 ].slice( 0, 3 ) === "nth" ) { 1902 1903 // nth-* requires argument 1904 if ( !match[ 3 ] ) { 1905 Sizzle.error( match[ 0 ] ); 1906 } 1907 1908 // numeric x and y parameters for Expr.filter.CHILD 1909 // remember that false/true cast respectively to 0/1 1910 match[ 4 ] = +( match[ 4 ] ? 1911 match[ 5 ] + ( match[ 6 ] || 1 ) : 1912 2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) ); 1913 match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" ); 1914 1915 // other types prohibit arguments 1916 } else if ( match[ 3 ] ) { 1917 Sizzle.error( match[ 0 ] ); 1918 } 1919 1920 return match; 1921 }, 1922 1923 "PSEUDO": function( match ) { 1924 var excess, 1925 unquoted = !match[ 6 ] && match[ 2 ]; 1926 1927 if ( matchExpr[ "CHILD" ].test( match[ 0 ] ) ) { 1928 return null; 1929 } 1930 1931 // Accept quoted arguments as-is 1932 if ( match[ 3 ] ) { 1933 match[ 2 ] = match[ 4 ] || match[ 5 ] || ""; 1934 1935 // Strip excess characters from unquoted arguments 1936 } else if ( unquoted && rpseudo.test( unquoted ) && 1937 1938 // Get excess from tokenize (recursively) 1939 ( excess = tokenize( unquoted, true ) ) && 1940 1941 // advance to the next closing parenthesis 1942 ( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) { 1943 1944 // excess is a negative index 1945 match[ 0 ] = match[ 0 ].slice( 0, excess ); 1946 match[ 2 ] = unquoted.slice( 0, excess ); 1947 } 1948 1949 // Return only captures needed by the pseudo filter method (type and argument) 1950 return match.slice( 0, 3 ); 1951 } 1952 }, 1953 1954 filter: { 1955 1956 "TAG": function( nodeNameSelector ) { 1957 var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); 1958 return nodeNameSelector === "*" ? 1959 function() { 1960 return true; 1961 } : 1962 function( elem ) { 1963 return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; 1964 }; 1965 }, 1966 1967 "CLASS": function( className ) { 1968 var pattern = classCache[ className + " " ]; 1969 1970 return pattern || 1971 ( pattern = new RegExp( "(^|" + whitespace + 1972 ")" + className + "(" + whitespace + "|$)" ) ) && classCache( 1973 className, function( elem ) { 1974 return pattern.test( 1975 typeof elem.className === "string" && elem.className || 1976 typeof elem.getAttribute !== "undefined" && 1977 elem.getAttribute( "class" ) || 1978 "" 1979 ); 1980 } ); 1981 }, 1982 1983 "ATTR": function( name, operator, check ) { 1984 return function( elem ) { 1985 var result = Sizzle.attr( elem, name ); 1986 1987 if ( result == null ) { 1988 return operator === "!="; 1989 } 1990 if ( !operator ) { 1991 return true; 1992 } 1993 1994 result += ""; 1995 1996 /* eslint-disable max-len */ 1997 1998 return operator === "=" ? result === check : 1999 operator === "!=" ? result !== check : 2000 operator === "^=" ? check && result.indexOf( check ) === 0 : 2001 operator === "*=" ? check && result.indexOf( check ) > -1 : 2002 operator === "$=" ? check && result.slice( -check.length ) === check : 2003 operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : 2004 operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : 2005 false; 2006 /* eslint-enable max-len */ 2007 2008 }; 2009 }, 2010 2011 "CHILD": function( type, what, _argument, first, last ) { 2012 var simple = type.slice( 0, 3 ) !== "nth", 2013 forward = type.slice( -4 ) !== "last", 2014 ofType = what === "of-type"; 2015 2016 return first === 1 && last === 0 ? 2017 2018 // Shortcut for :nth-*(n) 2019 function( elem ) { 2020 return !!elem.parentNode; 2021 } : 2022 2023 function( elem, _context, xml ) { 2024 var cache, uniqueCache, outerCache, node, nodeIndex, start, 2025 dir = simple !== forward ? "nextSibling" : "previousSibling", 2026 parent = elem.parentNode, 2027 name = ofType && elem.nodeName.toLowerCase(), 2028 useCache = !xml && !ofType, 2029 diff = false; 2030 2031 if ( parent ) { 2032 2033 // :(first|last|only)-(child|of-type) 2034 if ( simple ) { 2035 while ( dir ) { 2036 node = elem; 2037 while ( ( node = node[ dir ] ) ) { 2038 if ( ofType ? 2039 node.nodeName.toLowerCase() === name : 2040 node.nodeType === 1 ) { 2041 2042 return false; 2043 } 2044 } 2045 2046 // Reverse direction for :only-* (if we haven't yet done so) 2047 start = dir = type === "only" && !start && "nextSibling"; 2048 } 2049 return true; 2050 } 2051 2052 start = [ forward ? parent.firstChild : parent.lastChild ]; 2053 2054 // non-xml :nth-child(...) stores cache data on `parent` 2055 if ( forward && useCache ) { 2056 2057 // Seek `elem` from a previously-cached index 2058 2059 // ...in a gzip-friendly way 2060 node = parent; 2061 outerCache = node[ expando ] || ( node[ expando ] = {} ); 2062 2063 // Support: IE <9 only 2064 // Defend against cloned attroperties (jQuery gh-1709) 2065 uniqueCache = outerCache[ node.uniqueID ] || 2066 ( outerCache[ node.uniqueID ] = {} ); 2067 2068 cache = uniqueCache[ type ] || []; 2069 nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; 2070 diff = nodeIndex && cache[ 2 ]; 2071 node = nodeIndex && parent.childNodes[ nodeIndex ]; 2072 2073 while ( ( node = ++nodeIndex && node && node[ dir ] || 2074 2075 // Fallback to seeking `elem` from the start 2076 ( diff = nodeIndex = 0 ) || start.pop() ) ) { 2077 2078 // When found, cache indexes on `parent` and break 2079 if ( node.nodeType === 1 && ++diff && node === elem ) { 2080 uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; 2081 break; 2082 } 2083 } 2084 2085 } else { 2086 2087 // Use previously-cached element index if available 2088 if ( useCache ) { 2089 2090 // ...in a gzip-friendly way 2091 node = elem; 2092 outerCache = node[ expando ] || ( node[ expando ] = {} ); 2093 2094 // Support: IE <9 only 2095 // Defend against cloned attroperties (jQuery gh-1709) 2096 uniqueCache = outerCache[ node.uniqueID ] || 2097 ( outerCache[ node.uniqueID ] = {} ); 2098 2099 cache = uniqueCache[ type ] || []; 2100 nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; 2101 diff = nodeIndex; 2102 } 2103 2104 // xml :nth-child(...) 2105 // or :nth-last-child(...) or :nth(-last)?-of-type(...) 2106 if ( diff === false ) { 2107 2108 // Use the same loop as above to seek `elem` from the start 2109 while ( ( node = ++nodeIndex && node && node[ dir ] || 2110 ( diff = nodeIndex = 0 ) || start.pop() ) ) { 2111 2112 if ( ( ofType ? 2113 node.nodeName.toLowerCase() === name : 2114 node.nodeType === 1 ) && 2115 ++diff ) { 2116 2117 // Cache the index of each encountered element 2118 if ( useCache ) { 2119 outerCache = node[ expando ] || 2120 ( node[ expando ] = {} ); 2121 2122 // Support: IE <9 only 2123 // Defend against cloned attroperties (jQuery gh-1709) 2124 uniqueCache = outerCache[ node.uniqueID ] || 2125 ( outerCache[ node.uniqueID ] = {} ); 2126 2127 uniqueCache[ type ] = [ dirruns, diff ]; 2128 } 2129 2130 if ( node === elem ) { 2131 break; 2132 } 2133 } 2134 } 2135 } 2136 } 2137 2138 // Incorporate the offset, then check against cycle size 2139 diff -= last; 2140 return diff === first || ( diff % first === 0 && diff / first >= 0 ); 2141 } 2142 }; 2143 }, 2144 2145 "PSEUDO": function( pseudo, argument ) { 2146 2147 // pseudo-class names are case-insensitive 2148 // http://www.w3.org/TR/selectors/#pseudo-classes 2149 // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters 2150 // Remember that setFilters inherits from pseudos 2151 var args, 2152 fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || 2153 Sizzle.error( "unsupported pseudo: " + pseudo ); 2154 2155 // The user may use createPseudo to indicate that 2156 // arguments are needed to create the filter function 2157 // just as Sizzle does 2158 if ( fn[ expando ] ) { 2159 return fn( argument ); 2160 } 2161 2162 // But maintain support for old signatures 2163 if ( fn.length > 1 ) { 2164 args = [ pseudo, pseudo, "", argument ]; 2165 return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? 2166 markFunction( function( seed, matches ) { 2167 var idx, 2168 matched = fn( seed, argument ), 2169 i = matched.length; 2170 while ( i-- ) { 2171 idx = indexOf( seed, matched[ i ] ); 2172 seed[ idx ] = !( matches[ idx ] = matched[ i ] ); 2173 } 2174 } ) : 2175 function( elem ) { 2176 return fn( elem, 0, args ); 2177 }; 2178 } 2179 2180 return fn; 2181 } 2182 }, 2183 2184 pseudos: { 2185 2186 // Potentially complex pseudos 2187 "not": markFunction( function( selector ) { 2188 2189 // Trim the selector passed to compile 2190 // to avoid treating leading and trailing 2191 // spaces as combinators 2192 var input = [], 2193 results = [], 2194 matcher = compile( selector.replace( rtrim, "$1" ) ); 2195 2196 return matcher[ expando ] ? 2197 markFunction( function( seed, matches, _context, xml ) { 2198 var elem, 2199 unmatched = matcher( seed, null, xml, [] ), 2200 i = seed.length; 2201 2202 // Match elements unmatched by `matcher` 2203 while ( i-- ) { 2204 if ( ( elem = unmatched[ i ] ) ) { 2205 seed[ i ] = !( matches[ i ] = elem ); 2206 } 2207 } 2208 } ) : 2209 function( elem, _context, xml ) { 2210 input[ 0 ] = elem; 2211 matcher( input, null, xml, results ); 2212 2213 // Don't keep the element (issue #299) 2214 input[ 0 ] = null; 2215 return !results.pop(); 2216 }; 2217 } ), 2218 2219 "has": markFunction( function( selector ) { 2220 return function( elem ) { 2221 return Sizzle( selector, elem ).length > 0; 2222 }; 2223 } ), 2224 2225 "contains": markFunction( function( text ) { 2226 text = text.replace( runescape, funescape ); 2227 return function( elem ) { 2228 return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1; 2229 }; 2230 } ), 2231 2232 // "Whether an element is represented by a :lang() selector 2233 // is based solely on the element's language value 2234 // being equal to the identifier C, 2235 // or beginning with the identifier C immediately followed by "-". 2236 // The matching of C against the element's language value is performed case-insensitively. 2237 // The identifier C does not have to be a valid language name." 2238 // http://www.w3.org/TR/selectors/#lang-pseudo 2239 "lang": markFunction( function( lang ) { 2240 2241 // lang value must be a valid identifier 2242 if ( !ridentifier.test( lang || "" ) ) { 2243 Sizzle.error( "unsupported lang: " + lang ); 2244 } 2245 lang = lang.replace( runescape, funescape ).toLowerCase(); 2246 return function( elem ) { 2247 var elemLang; 2248 do { 2249 if ( ( elemLang = documentIsHTML ? 2250 elem.lang : 2251 elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) { 2252 2253 elemLang = elemLang.toLowerCase(); 2254 return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; 2255 } 2256 } while ( ( elem = elem.parentNode ) && elem.nodeType === 1 ); 2257 return false; 2258 }; 2259 } ), 2260 2261 // Miscellaneous 2262 "target": function( elem ) { 2263 var hash = window.location && window.location.hash; 2264 return hash && hash.slice( 1 ) === elem.id; 2265 }, 2266 2267 "root": function( elem ) { 2268 return elem === docElem; 2269 }, 2270 2271 "focus": function( elem ) { 2272 return elem === document.activeElement && 2273 ( !document.hasFocus || document.hasFocus() ) && 2274 !!( elem.type || elem.href || ~elem.tabIndex ); 2275 }, 2276 2277 // Boolean properties 2278 "enabled": createDisabledPseudo( false ), 2279 "disabled": createDisabledPseudo( true ), 2280 2281 "checked": function( elem ) { 2282 2283 // In CSS3, :checked should return both checked and selected elements 2284 // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked 2285 var nodeName = elem.nodeName.toLowerCase(); 2286 return ( nodeName === "input" && !!elem.checked ) || 2287 ( nodeName === "option" && !!elem.selected ); 2288 }, 2289 2290 "selected": function( elem ) { 2291 2292 // Accessing this property makes selected-by-default 2293 // options in Safari work properly 2294 if ( elem.parentNode ) { 2295 // eslint-disable-next-line no-unused-expressions 2296 elem.parentNode.selectedIndex; 2297 } 2298 2299 return elem.selected === true; 2300 }, 2301 2302 // Contents 2303 "empty": function( elem ) { 2304 2305 // http://www.w3.org/TR/selectors/#empty-pseudo 2306 // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), 2307 // but not by others (comment: 8; processing instruction: 7; etc.) 2308 // nodeType < 6 works because attributes (2) do not appear as children 2309 for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { 2310 if ( elem.nodeType < 6 ) { 2311 return false; 2312 } 2313 } 2314 return true; 2315 }, 2316 2317 "parent": function( elem ) { 2318 return !Expr.pseudos[ "empty" ]( elem ); 2319 }, 2320 2321 // Element/input types 2322 "header": function( elem ) { 2323 return rheader.test( elem.nodeName ); 2324 }, 2325 2326 "input": function( elem ) { 2327 return rinputs.test( elem.nodeName ); 2328 }, 2329 2330 "button": function( elem ) { 2331 var name = elem.nodeName.toLowerCase(); 2332 return name === "input" && elem.type === "button" || name === "button"; 2333 }, 2334 2335 "text": function( elem ) { 2336 var attr; 2337 return elem.nodeName.toLowerCase() === "input" && 2338 elem.type === "text" && 2339 2340 // Support: IE<8 2341 // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" 2342 ( ( attr = elem.getAttribute( "type" ) ) == null || 2343 attr.toLowerCase() === "text" ); 2344 }, 2345 2346 // Position-in-collection 2347 "first": createPositionalPseudo( function() { 2348 return [ 0 ]; 2349 } ), 2350 2351 "last": createPositionalPseudo( function( _matchIndexes, length ) { 2352 return [ length - 1 ]; 2353 } ), 2354 2355 "eq": createPositionalPseudo( function( _matchIndexes, length, argument ) { 2356 return [ argument < 0 ? argument + length : argument ]; 2357 } ), 2358 2359 "even": createPositionalPseudo( function( matchIndexes, length ) { 2360 var i = 0; 2361 for ( ; i < length; i += 2 ) { 2362 matchIndexes.push( i ); 2363 } 2364 return matchIndexes; 2365 } ), 2366 2367 "odd": createPositionalPseudo( function( matchIndexes, length ) { 2368 var i = 1; 2369 for ( ; i < length; i += 2 ) { 2370 matchIndexes.push( i ); 2371 } 2372 return matchIndexes; 2373 } ), 2374 2375 "lt": createPositionalPseudo( function( matchIndexes, length, argument ) { 2376 var i = argument < 0 ? 2377 argument + length : 2378 argument > length ? 2379 length : 2380 argument; 2381 for ( ; --i >= 0; ) { 2382 matchIndexes.push( i ); 2383 } 2384 return matchIndexes; 2385 } ), 2386 2387 "gt": createPositionalPseudo( function( matchIndexes, length, argument ) { 2388 var i = argument < 0 ? argument + length : argument; 2389 for ( ; ++i < length; ) { 2390 matchIndexes.push( i ); 2391 } 2392 return matchIndexes; 2393 } ) 2394 } 2395}; 2396 2397Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ]; 2398 2399// Add button/input type pseudos 2400for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { 2401 Expr.pseudos[ i ] = createInputPseudo( i ); 2402} 2403for ( i in { submit: true, reset: true } ) { 2404 Expr.pseudos[ i ] = createButtonPseudo( i ); 2405} 2406 2407// Easy API for creating new setFilters 2408function setFilters() {} 2409setFilters.prototype = Expr.filters = Expr.pseudos; 2410Expr.setFilters = new setFilters(); 2411 2412tokenize = Sizzle.tokenize = function( selector, parseOnly ) { 2413 var matched, match, tokens, type, 2414 soFar, groups, preFilters, 2415 cached = tokenCache[ selector + " " ]; 2416 2417 if ( cached ) { 2418 return parseOnly ? 0 : cached.slice( 0 ); 2419 } 2420 2421 soFar = selector; 2422 groups = []; 2423 preFilters = Expr.preFilter; 2424 2425 while ( soFar ) { 2426 2427 // Comma and first run 2428 if ( !matched || ( match = rcomma.exec( soFar ) ) ) { 2429 if ( match ) { 2430 2431 // Don't consume trailing commas as valid 2432 soFar = soFar.slice( match[ 0 ].length ) || soFar; 2433 } 2434 groups.push( ( tokens = [] ) ); 2435 } 2436 2437 matched = false; 2438 2439 // Combinators 2440 if ( ( match = rcombinators.exec( soFar ) ) ) { 2441 matched = match.shift(); 2442 tokens.push( { 2443 value: matched, 2444 2445 // Cast descendant combinators to space 2446 type: match[ 0 ].replace( rtrim, " " ) 2447 } ); 2448 soFar = soFar.slice( matched.length ); 2449 } 2450 2451 // Filters 2452 for ( type in Expr.filter ) { 2453 if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] || 2454 ( match = preFilters[ type ]( match ) ) ) ) { 2455 matched = match.shift(); 2456 tokens.push( { 2457 value: matched, 2458 type: type, 2459 matches: match 2460 } ); 2461 soFar = soFar.slice( matched.length ); 2462 } 2463 } 2464 2465 if ( !matched ) { 2466 break; 2467 } 2468 } 2469 2470 // Return the length of the invalid excess 2471 // if we're just parsing 2472 // Otherwise, throw an error or return tokens 2473 return parseOnly ? 2474 soFar.length : 2475 soFar ? 2476 Sizzle.error( selector ) : 2477 2478 // Cache the tokens 2479 tokenCache( selector, groups ).slice( 0 ); 2480}; 2481 2482function toSelector( tokens ) { 2483 var i = 0, 2484 len = tokens.length, 2485 selector = ""; 2486 for ( ; i < len; i++ ) { 2487 selector += tokens[ i ].value; 2488 } 2489 return selector; 2490} 2491 2492function addCombinator( matcher, combinator, base ) { 2493 var dir = combinator.dir, 2494 skip = combinator.next, 2495 key = skip || dir, 2496 checkNonElements = base && key === "parentNode", 2497 doneName = done++; 2498 2499 return combinator.first ? 2500 2501 // Check against closest ancestor/preceding element 2502 function( elem, context, xml ) { 2503 while ( ( elem = elem[ dir ] ) ) { 2504 if ( elem.nodeType === 1 || checkNonElements ) { 2505 return matcher( elem, context, xml ); 2506 } 2507 } 2508 return false; 2509 } : 2510 2511 // Check against all ancestor/preceding elements 2512 function( elem, context, xml ) { 2513 var oldCache, uniqueCache, outerCache, 2514 newCache = [ dirruns, doneName ]; 2515 2516 // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching 2517 if ( xml ) { 2518 while ( ( elem = elem[ dir ] ) ) { 2519 if ( elem.nodeType === 1 || checkNonElements ) { 2520 if ( matcher( elem, context, xml ) ) { 2521 return true; 2522 } 2523 } 2524 } 2525 } else { 2526 while ( ( elem = elem[ dir ] ) ) { 2527 if ( elem.nodeType === 1 || checkNonElements ) { 2528 outerCache = elem[ expando ] || ( elem[ expando ] = {} ); 2529 2530 // Support: IE <9 only 2531 // Defend against cloned attroperties (jQuery gh-1709) 2532 uniqueCache = outerCache[ elem.uniqueID ] || 2533 ( outerCache[ elem.uniqueID ] = {} ); 2534 2535 if ( skip && skip === elem.nodeName.toLowerCase() ) { 2536 elem = elem[ dir ] || elem; 2537 } else if ( ( oldCache = uniqueCache[ key ] ) && 2538 oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { 2539 2540 // Assign to newCache so results back-propagate to previous elements 2541 return ( newCache[ 2 ] = oldCache[ 2 ] ); 2542 } else { 2543 2544 // Reuse newcache so results back-propagate to previous elements 2545 uniqueCache[ key ] = newCache; 2546 2547 // A match means we're done; a fail means we have to keep checking 2548 if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) { 2549 return true; 2550 } 2551 } 2552 } 2553 } 2554 } 2555 return false; 2556 }; 2557} 2558 2559function elementMatcher( matchers ) { 2560 return matchers.length > 1 ? 2561 function( elem, context, xml ) { 2562 var i = matchers.length; 2563 while ( i-- ) { 2564 if ( !matchers[ i ]( elem, context, xml ) ) { 2565 return false; 2566 } 2567 } 2568 return true; 2569 } : 2570 matchers[ 0 ]; 2571} 2572 2573function multipleContexts( selector, contexts, results ) { 2574 var i = 0, 2575 len = contexts.length; 2576 for ( ; i < len; i++ ) { 2577 Sizzle( selector, contexts[ i ], results ); 2578 } 2579 return results; 2580} 2581 2582function condense( unmatched, map, filter, context, xml ) { 2583 var elem, 2584 newUnmatched = [], 2585 i = 0, 2586 len = unmatched.length, 2587 mapped = map != null; 2588 2589 for ( ; i < len; i++ ) { 2590 if ( ( elem = unmatched[ i ] ) ) { 2591 if ( !filter || filter( elem, context, xml ) ) { 2592 newUnmatched.push( elem ); 2593 if ( mapped ) { 2594 map.push( i ); 2595 } 2596 } 2597 } 2598 } 2599 2600 return newUnmatched; 2601} 2602 2603function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { 2604 if ( postFilter && !postFilter[ expando ] ) { 2605 postFilter = setMatcher( postFilter ); 2606 } 2607 if ( postFinder && !postFinder[ expando ] ) { 2608 postFinder = setMatcher( postFinder, postSelector ); 2609 } 2610 return markFunction( function( seed, results, context, xml ) { 2611 var temp, i, elem, 2612 preMap = [], 2613 postMap = [], 2614 preexisting = results.length, 2615 2616 // Get initial elements from seed or context 2617 elems = seed || multipleContexts( 2618 selector || "*", 2619 context.nodeType ? [ context ] : context, 2620 [] 2621 ), 2622 2623 // Prefilter to get matcher input, preserving a map for seed-results synchronization 2624 matcherIn = preFilter && ( seed || !selector ) ? 2625 condense( elems, preMap, preFilter, context, xml ) : 2626 elems, 2627 2628 matcherOut = matcher ? 2629 2630 // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, 2631 postFinder || ( seed ? preFilter : preexisting || postFilter ) ? 2632 2633 // ...intermediate processing is necessary 2634 [] : 2635 2636 // ...otherwise use results directly 2637 results : 2638 matcherIn; 2639 2640 // Find primary matches 2641 if ( matcher ) { 2642 matcher( matcherIn, matcherOut, context, xml ); 2643 } 2644 2645 // Apply postFilter 2646 if ( postFilter ) { 2647 temp = condense( matcherOut, postMap ); 2648 postFilter( temp, [], context, xml ); 2649 2650 // Un-match failing elements by moving them back to matcherIn 2651 i = temp.length; 2652 while ( i-- ) { 2653 if ( ( elem = temp[ i ] ) ) { 2654 matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem ); 2655 } 2656 } 2657 } 2658 2659 if ( seed ) { 2660 if ( postFinder || preFilter ) { 2661 if ( postFinder ) { 2662 2663 // Get the final matcherOut by condensing this intermediate into postFinder contexts 2664 temp = []; 2665 i = matcherOut.length; 2666 while ( i-- ) { 2667 if ( ( elem = matcherOut[ i ] ) ) { 2668 2669 // Restore matcherIn since elem is not yet a final match 2670 temp.push( ( matcherIn[ i ] = elem ) ); 2671 } 2672 } 2673 postFinder( null, ( matcherOut = [] ), temp, xml ); 2674 } 2675 2676 // Move matched elements from seed to results to keep them synchronized 2677 i = matcherOut.length; 2678 while ( i-- ) { 2679 if ( ( elem = matcherOut[ i ] ) && 2680 ( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) { 2681 2682 seed[ temp ] = !( results[ temp ] = elem ); 2683 } 2684 } 2685 } 2686 2687 // Add elements to results, through postFinder if defined 2688 } else { 2689 matcherOut = condense( 2690 matcherOut === results ? 2691 matcherOut.splice( preexisting, matcherOut.length ) : 2692 matcherOut 2693 ); 2694 if ( postFinder ) { 2695 postFinder( null, results, matcherOut, xml ); 2696 } else { 2697 push.apply( results, matcherOut ); 2698 } 2699 } 2700 } ); 2701} 2702 2703function matcherFromTokens( tokens ) { 2704 var checkContext, matcher, j, 2705 len = tokens.length, 2706 leadingRelative = Expr.relative[ tokens[ 0 ].type ], 2707 implicitRelative = leadingRelative || Expr.relative[ " " ], 2708 i = leadingRelative ? 1 : 0, 2709 2710 // The foundational matcher ensures that elements are reachable from top-level context(s) 2711 matchContext = addCombinator( function( elem ) { 2712 return elem === checkContext; 2713 }, implicitRelative, true ), 2714 matchAnyContext = addCombinator( function( elem ) { 2715 return indexOf( checkContext, elem ) > -1; 2716 }, implicitRelative, true ), 2717 matchers = [ function( elem, context, xml ) { 2718 var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( 2719 ( checkContext = context ).nodeType ? 2720 matchContext( elem, context, xml ) : 2721 matchAnyContext( elem, context, xml ) ); 2722 2723 // Avoid hanging onto element (issue #299) 2724 checkContext = null; 2725 return ret; 2726 } ]; 2727 2728 for ( ; i < len; i++ ) { 2729 if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) { 2730 matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ]; 2731 } else { 2732 matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches ); 2733 2734 // Return special upon seeing a positional matcher 2735 if ( matcher[ expando ] ) { 2736 2737 // Find the next relative operator (if any) for proper handling 2738 j = ++i; 2739 for ( ; j < len; j++ ) { 2740 if ( Expr.relative[ tokens[ j ].type ] ) { 2741 break; 2742 } 2743 } 2744 return setMatcher( 2745 i > 1 && elementMatcher( matchers ), 2746 i > 1 && toSelector( 2747 2748 // If the preceding token was a descendant combinator, insert an implicit any-element `*` 2749 tokens 2750 .slice( 0, i - 1 ) 2751 .concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } ) 2752 ).replace( rtrim, "$1" ), 2753 matcher, 2754 i < j && matcherFromTokens( tokens.slice( i, j ) ), 2755 j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ), 2756 j < len && toSelector( tokens ) 2757 ); 2758 } 2759 matchers.push( matcher ); 2760 } 2761 } 2762 2763 return elementMatcher( matchers ); 2764} 2765 2766function matcherFromGroupMatchers( elementMatchers, setMatchers ) { 2767 var bySet = setMatchers.length > 0, 2768 byElement = elementMatchers.length > 0, 2769 superMatcher = function( seed, context, xml, results, outermost ) { 2770 var elem, j, matcher, 2771 matchedCount = 0, 2772 i = "0", 2773 unmatched = seed && [], 2774 setMatched = [], 2775 contextBackup = outermostContext, 2776 2777 // We must always have either seed elements or outermost context 2778 elems = seed || byElement && Expr.find[ "TAG" ]( "*", outermost ), 2779 2780 // Use integer dirruns iff this is the outermost matcher 2781 dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ), 2782 len = elems.length; 2783 2784 if ( outermost ) { 2785 2786 // Support: IE 11+, Edge 17 - 18+ 2787 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 2788 // two documents; shallow comparisons work. 2789 // eslint-disable-next-line eqeqeq 2790 outermostContext = context == document || context || outermost; 2791 } 2792 2793 // Add elements passing elementMatchers directly to results 2794 // Support: IE<9, Safari 2795 // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id 2796 for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) { 2797 if ( byElement && elem ) { 2798 j = 0; 2799 2800 // Support: IE 11+, Edge 17 - 18+ 2801 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 2802 // two documents; shallow comparisons work. 2803 // eslint-disable-next-line eqeqeq 2804 if ( !context && elem.ownerDocument != document ) { 2805 setDocument( elem ); 2806 xml = !documentIsHTML; 2807 } 2808 while ( ( matcher = elementMatchers[ j++ ] ) ) { 2809 if ( matcher( elem, context || document, xml ) ) { 2810 results.push( elem ); 2811 break; 2812 } 2813 } 2814 if ( outermost ) { 2815 dirruns = dirrunsUnique; 2816 } 2817 } 2818 2819 // Track unmatched elements for set filters 2820 if ( bySet ) { 2821 2822 // They will have gone through all possible matchers 2823 if ( ( elem = !matcher && elem ) ) { 2824 matchedCount--; 2825 } 2826 2827 // Lengthen the array for every element, matched or not 2828 if ( seed ) { 2829 unmatched.push( elem ); 2830 } 2831 } 2832 } 2833 2834 // `i` is now the count of elements visited above, and adding it to `matchedCount` 2835 // makes the latter nonnegative. 2836 matchedCount += i; 2837 2838 // Apply set filters to unmatched elements 2839 // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` 2840 // equals `i`), unless we didn't visit _any_ elements in the above loop because we have 2841 // no element matchers and no seed. 2842 // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that 2843 // case, which will result in a "00" `matchedCount` that differs from `i` but is also 2844 // numerically zero. 2845 if ( bySet && i !== matchedCount ) { 2846 j = 0; 2847 while ( ( matcher = setMatchers[ j++ ] ) ) { 2848 matcher( unmatched, setMatched, context, xml ); 2849 } 2850 2851 if ( seed ) { 2852 2853 // Reintegrate element matches to eliminate the need for sorting 2854 if ( matchedCount > 0 ) { 2855 while ( i-- ) { 2856 if ( !( unmatched[ i ] || setMatched[ i ] ) ) { 2857 setMatched[ i ] = pop.call( results ); 2858 } 2859 } 2860 } 2861 2862 // Discard index placeholder values to get only actual matches 2863 setMatched = condense( setMatched ); 2864 } 2865 2866 // Add matches to results 2867 push.apply( results, setMatched ); 2868 2869 // Seedless set matches succeeding multiple successful matchers stipulate sorting 2870 if ( outermost && !seed && setMatched.length > 0 && 2871 ( matchedCount + setMatchers.length ) > 1 ) { 2872 2873 Sizzle.uniqueSort( results ); 2874 } 2875 } 2876 2877 // Override manipulation of globals by nested matchers 2878 if ( outermost ) { 2879 dirruns = dirrunsUnique; 2880 outermostContext = contextBackup; 2881 } 2882 2883 return unmatched; 2884 }; 2885 2886 return bySet ? 2887 markFunction( superMatcher ) : 2888 superMatcher; 2889} 2890 2891compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { 2892 var i, 2893 setMatchers = [], 2894 elementMatchers = [], 2895 cached = compilerCache[ selector + " " ]; 2896 2897 if ( !cached ) { 2898 2899 // Generate a function of recursive functions that can be used to check each element 2900 if ( !match ) { 2901 match = tokenize( selector ); 2902 } 2903 i = match.length; 2904 while ( i-- ) { 2905 cached = matcherFromTokens( match[ i ] ); 2906 if ( cached[ expando ] ) { 2907 setMatchers.push( cached ); 2908 } else { 2909 elementMatchers.push( cached ); 2910 } 2911 } 2912 2913 // Cache the compiled function 2914 cached = compilerCache( 2915 selector, 2916 matcherFromGroupMatchers( elementMatchers, setMatchers ) 2917 ); 2918 2919 // Save selector and tokenization 2920 cached.selector = selector; 2921 } 2922 return cached; 2923}; 2924 2925/** 2926 * A low-level selection function that works with Sizzle's compiled 2927 * selector functions 2928 * @param {String|Function} selector A selector or a pre-compiled 2929 * selector function built with Sizzle.compile 2930 * @param {Element} context 2931 * @param {Array} [results] 2932 * @param {Array} [seed] A set of elements to match against 2933 */ 2934select = Sizzle.select = function( selector, context, results, seed ) { 2935 var i, tokens, token, type, find, 2936 compiled = typeof selector === "function" && selector, 2937 match = !seed && tokenize( ( selector = compiled.selector || selector ) ); 2938 2939 results = results || []; 2940 2941 // Try to minimize operations if there is only one selector in the list and no seed 2942 // (the latter of which guarantees us context) 2943 if ( match.length === 1 ) { 2944 2945 // Reduce context if the leading compound selector is an ID 2946 tokens = match[ 0 ] = match[ 0 ].slice( 0 ); 2947 if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" && 2948 context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) { 2949 2950 context = ( Expr.find[ "ID" ]( token.matches[ 0 ] 2951 .replace( runescape, funescape ), context ) || [] )[ 0 ]; 2952 if ( !context ) { 2953 return results; 2954 2955 // Precompiled matchers will still verify ancestry, so step up a level 2956 } else if ( compiled ) { 2957 context = context.parentNode; 2958 } 2959 2960 selector = selector.slice( tokens.shift().value.length ); 2961 } 2962 2963 // Fetch a seed set for right-to-left matching 2964 i = matchExpr[ "needsContext" ].test( selector ) ? 0 : tokens.length; 2965 while ( i-- ) { 2966 token = tokens[ i ]; 2967 2968 // Abort if we hit a combinator 2969 if ( Expr.relative[ ( type = token.type ) ] ) { 2970 break; 2971 } 2972 if ( ( find = Expr.find[ type ] ) ) { 2973 2974 // Search, expanding context for leading sibling combinators 2975 if ( ( seed = find( 2976 token.matches[ 0 ].replace( runescape, funescape ), 2977 rsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) || 2978 context 2979 ) ) ) { 2980 2981 // If seed is empty or no tokens remain, we can return early 2982 tokens.splice( i, 1 ); 2983 selector = seed.length && toSelector( tokens ); 2984 if ( !selector ) { 2985 push.apply( results, seed ); 2986 return results; 2987 } 2988 2989 break; 2990 } 2991 } 2992 } 2993 } 2994 2995 // Compile and execute a filtering function if one is not provided 2996 // Provide `match` to avoid retokenization if we modified the selector above 2997 ( compiled || compile( selector, match ) )( 2998 seed, 2999 context, 3000 !documentIsHTML, 3001 results, 3002 !context || rsibling.test( selector ) && testContext( context.parentNode ) || context 3003 ); 3004 return results; 3005}; 3006 3007// One-time assignments 3008 3009// Sort stability 3010support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando; 3011 3012// Support: Chrome 14-35+ 3013// Always assume duplicates if they aren't passed to the comparison function 3014support.detectDuplicates = !!hasDuplicate; 3015 3016// Initialize against the default document 3017setDocument(); 3018 3019// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) 3020// Detached nodes confoundingly follow *each other* 3021support.sortDetached = assert( function( el ) { 3022 3023 // Should return 1, but returns 4 (following) 3024 return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1; 3025} ); 3026 3027// Support: IE<8 3028// Prevent attribute/property "interpolation" 3029// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx 3030if ( !assert( function( el ) { 3031 el.innerHTML = "<a href='#'></a>"; 3032 return el.firstChild.getAttribute( "href" ) === "#"; 3033} ) ) { 3034 addHandle( "type|href|height|width", function( elem, name, isXML ) { 3035 if ( !isXML ) { 3036 return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); 3037 } 3038 } ); 3039} 3040 3041// Support: IE<9 3042// Use defaultValue in place of getAttribute("value") 3043if ( !support.attributes || !assert( function( el ) { 3044 el.innerHTML = "<input/>"; 3045 el.firstChild.setAttribute( "value", "" ); 3046 return el.firstChild.getAttribute( "value" ) === ""; 3047} ) ) { 3048 addHandle( "value", function( elem, _name, isXML ) { 3049 if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { 3050 return elem.defaultValue; 3051 } 3052 } ); 3053} 3054 3055// Support: IE<9 3056// Use getAttributeNode to fetch booleans when getAttribute lies 3057if ( !assert( function( el ) { 3058 return el.getAttribute( "disabled" ) == null; 3059} ) ) { 3060 addHandle( booleans, function( elem, name, isXML ) { 3061 var val; 3062 if ( !isXML ) { 3063 return elem[ name ] === true ? name.toLowerCase() : 3064 ( val = elem.getAttributeNode( name ) ) && val.specified ? 3065 val.value : 3066 null; 3067 } 3068 } ); 3069} 3070 3071return Sizzle; 3072 3073} )( window ); 3074 3075 3076 3077jQuery.find = Sizzle; 3078jQuery.expr = Sizzle.selectors; 3079 3080// Deprecated 3081jQuery.expr[ ":" ] = jQuery.expr.pseudos; 3082jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; 3083jQuery.text = Sizzle.getText; 3084jQuery.isXMLDoc = Sizzle.isXML; 3085jQuery.contains = Sizzle.contains; 3086jQuery.escapeSelector = Sizzle.escape; 3087 3088 3089 3090 3091var dir = function( elem, dir, until ) { 3092 var matched = [], 3093 truncate = until !== undefined; 3094 3095 while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { 3096 if ( elem.nodeType === 1 ) { 3097 if ( truncate && jQuery( elem ).is( until ) ) { 3098 break; 3099 } 3100 matched.push( elem ); 3101 } 3102 } 3103 return matched; 3104}; 3105 3106 3107var siblings = function( n, elem ) { 3108 var matched = []; 3109 3110 for ( ; n; n = n.nextSibling ) { 3111 if ( n.nodeType === 1 && n !== elem ) { 3112 matched.push( n ); 3113 } 3114 } 3115 3116 return matched; 3117}; 3118 3119 3120var rneedsContext = jQuery.expr.match.needsContext; 3121 3122 3123 3124function nodeName( elem, name ) { 3125
3126 return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); 3127 3128};
vendor: 21,546 bytes, lines 3128-3953
3128 3129var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); 3130 3131 3132 3133// Implement the identical functionality for filter and not 3134function winnow( elements, qualifier, not ) { 3135 if ( isFunction( qualifier ) ) { 3136 return jQuery.grep( elements, function( elem, i ) { 3137 return !!qualifier.call( elem, i, elem ) !== not; 3138 } ); 3139 } 3140 3141 // Single element 3142 if ( qualifier.nodeType ) { 3143 return jQuery.grep( elements, function( elem ) { 3144 return ( elem === qualifier ) !== not; 3145 } ); 3146 } 3147 3148 // Arraylike of elements (jQuery, arguments, Array) 3149 if ( typeof qualifier !== "string" ) { 3150 return jQuery.grep( elements, function( elem ) { 3151 return ( indexOf.call( qualifier, elem ) > -1 ) !== not; 3152 } ); 3153 } 3154 3155 // Filtered directly for both simple and complex selectors 3156 return jQuery.filter( qualifier, elements, not ); 3157} 3158 3159jQuery.filter = function( expr, elems, not ) { 3160 var elem = elems[ 0 ]; 3161 3162 if ( not ) { 3163 expr = ":not(" + expr + ")"; 3164 } 3165 3166 if ( elems.length === 1 && elem.nodeType === 1 ) { 3167 return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; 3168 } 3169 3170 return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { 3171 return elem.nodeType === 1; 3172 } ) ); 3173}; 3174 3175jQuery.fn.extend( { 3176 find: function( selector ) { 3177 var i, ret, 3178 len = this.length, 3179 self = this; 3180 3181 if ( typeof selector !== "string" ) { 3182 return this.pushStack( jQuery( selector ).filter( function() { 3183 for ( i = 0; i < len; i++ ) { 3184 if ( jQuery.contains( self[ i ], this ) ) { 3185 return true; 3186 } 3187 } 3188 } ) ); 3189 } 3190 3191 ret = this.pushStack( [] ); 3192 3193 for ( i = 0; i < len; i++ ) { 3194 jQuery.find( selector, self[ i ], ret ); 3195 } 3196 3197 return len > 1 ? jQuery.uniqueSort( ret ) : ret; 3198 }, 3199 filter: function( selector ) { 3200 return this.pushStack( winnow( this, selector || [], false ) ); 3201 }, 3202 not: function( selector ) { 3203 return this.pushStack( winnow( this, selector || [], true ) ); 3204 }, 3205 is: function( selector ) { 3206 return !!winnow( 3207 this, 3208 3209 // If this is a positional/relative selector, check membership in the returned set 3210 // so $("p:first").is("p:last") won't return true for a doc with two "p". 3211 typeof selector === "string" && rneedsContext.test( selector ) ? 3212 jQuery( selector ) : 3213 selector || [], 3214 false 3215 ).length; 3216 } 3217} ); 3218 3219 3220// Initialize a jQuery object 3221 3222 3223// A central reference to the root jQuery(document) 3224var rootjQuery, 3225 3226 // A simple way to check for HTML strings 3227 // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) 3228 // Strict HTML recognition (#11290: must start with <) 3229 // Shortcut simple #id case for speed 3230 rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, 3231 3232 init = jQuery.fn.init = function( selector, context, root ) { 3233 var match, elem; 3234 3235 // HANDLE: $(""), $(null), $(undefined), $(false) 3236 if ( !selector ) { 3237 return this; 3238 } 3239 3240 // Method init() accepts an alternate rootjQuery 3241 // so migrate can support jQuery.sub (gh-2101) 3242 root = root || rootjQuery; 3243 3244 // Handle HTML strings 3245 if ( typeof selector === "string" ) { 3246 if ( selector[ 0 ] === "<" && 3247 selector[ selector.length - 1 ] === ">" && 3248 selector.length >= 3 ) { 3249 3250 // Assume that strings that start and end with <> are HTML and skip the regex check 3251 match = [ null, selector, null ]; 3252 3253 } else { 3254 match = rquickExpr.exec( selector ); 3255 } 3256 3257 // Match html or make sure no context is specified for #id 3258 if ( match && ( match[ 1 ] || !context ) ) { 3259 3260 // HANDLE: $(html) -> $(array) 3261 if ( match[ 1 ] ) { 3262 context = context instanceof jQuery ? context[ 0 ] : context; 3263 3264 // Option to run scripts is true for back-compat 3265 // Intentionally let the error be thrown if parseHTML is not present 3266 jQuery.merge( this, jQuery.parseHTML( 3267 match[ 1 ], 3268 context && context.nodeType ? context.ownerDocument || context : document, 3269 true 3270 ) ); 3271 3272 // HANDLE: $(html, props) 3273 if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { 3274 for ( match in context ) { 3275 3276 // Properties of context are called as methods if possible 3277 if ( isFunction( this[ match ] ) ) { 3278 this[ match ]( context[ match ] ); 3279 3280 // ...and otherwise set as attributes 3281 } else { 3282 this.attr( match, context[ match ] ); 3283 } 3284 } 3285 } 3286 3287 return this; 3288 3289 // HANDLE: $(#id) 3290 } else { 3291 elem = document.getElementById( match[ 2 ] ); 3292 3293 if ( elem ) { 3294 3295 // Inject the element directly into the jQuery object 3296 this[ 0 ] = elem; 3297 this.length = 1; 3298 } 3299 return this; 3300 } 3301 3302 // HANDLE: $(expr, $(...)) 3303 } else if ( !context || context.jquery ) { 3304 return ( context || root ).find( selector ); 3305 3306 // HANDLE: $(expr, context) 3307 // (which is just equivalent to: $(context).find(expr) 3308 } else { 3309 return this.constructor( context ).find( selector ); 3310 } 3311 3312 // HANDLE: $(DOMElement) 3313 } else if ( selector.nodeType ) { 3314 this[ 0 ] = selector; 3315 this.length = 1; 3316 return this; 3317 3318 // HANDLE: $(function) 3319 // Shortcut for document ready 3320 } else if ( isFunction( selector ) ) { 3321 return root.ready !== undefined ? 3322 root.ready( selector ) : 3323 3324 // Execute immediately if ready is not present 3325 selector( jQuery ); 3326 } 3327 3328 return jQuery.makeArray( selector, this ); 3329 }; 3330 3331// Give the init function the jQuery prototype for later instantiation 3332init.prototype = jQuery.fn; 3333 3334// Initialize central reference 3335rootjQuery = jQuery( document ); 3336 3337 3338var rparentsprev = /^(?:parents|prev(?:Until|All))/, 3339 3340 // Methods guaranteed to produce a unique set when starting from a unique set 3341 guaranteedUnique = { 3342 children: true, 3343 contents: true, 3344 next: true, 3345 prev: true 3346 }; 3347 3348jQuery.fn.extend( { 3349 has: function( target ) { 3350 var targets = jQuery( target, this ), 3351 l = targets.length; 3352 3353 return this.filter( function() { 3354 var i = 0; 3355 for ( ; i < l; i++ ) { 3356 if ( jQuery.contains( this, targets[ i ] ) ) { 3357 return true; 3358 } 3359 } 3360 } ); 3361 }, 3362 3363 closest: function( selectors, context ) { 3364 var cur, 3365 i = 0, 3366 l = this.length, 3367 matched = [], 3368 targets = typeof selectors !== "string" && jQuery( selectors ); 3369 3370 // Positional selectors never match, since there's no _selection_ context 3371 if ( !rneedsContext.test( selectors ) ) { 3372 for ( ; i < l; i++ ) { 3373 for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { 3374 3375 // Always skip document fragments 3376 if ( cur.nodeType < 11 && ( targets ? 3377 targets.index( cur ) > -1 : 3378 3379 // Don't pass non-elements to Sizzle 3380 cur.nodeType === 1 && 3381 jQuery.find.matchesSelector( cur, selectors ) ) ) { 3382 3383 matched.push( cur ); 3384 break; 3385 } 3386 } 3387 } 3388 } 3389 3390 return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); 3391 }, 3392 3393 // Determine the position of an element within the set 3394 index: function( elem ) { 3395 3396 // No argument, return index in parent 3397 if ( !elem ) { 3398 return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; 3399 } 3400 3401 // Index in selector 3402 if ( typeof elem === "string" ) { 3403 return indexOf.call( jQuery( elem ), this[ 0 ] ); 3404 } 3405 3406 // Locate the position of the desired element 3407 return indexOf.call( this, 3408 3409 // If it receives a jQuery object, the first element is used 3410 elem.jquery ? elem[ 0 ] : elem 3411 ); 3412 }, 3413 3414 add: function( selector, context ) { 3415 return this.pushStack( 3416 jQuery.uniqueSort( 3417 jQuery.merge( this.get(), jQuery( selector, context ) ) 3418 ) 3419 ); 3420 }, 3421 3422 addBack: function( selector ) { 3423 return this.add( selector == null ? 3424 this.prevObject : this.prevObject.filter( selector ) 3425 ); 3426 } 3427} ); 3428 3429function sibling( cur, dir ) { 3430 while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} 3431 return cur; 3432} 3433 3434jQuery.each( { 3435 parent: function( elem ) { 3436 var parent = elem.parentNode; 3437 return parent && parent.nodeType !== 11 ? parent : null; 3438 }, 3439 parents: function( elem ) { 3440 return dir( elem, "parentNode" ); 3441 }, 3442 parentsUntil: function( elem, _i, until ) { 3443 return dir( elem, "parentNode", until ); 3444 }, 3445 next: function( elem ) { 3446 return sibling( elem, "nextSibling" ); 3447 }, 3448 prev: function( elem ) { 3449 return sibling( elem, "previousSibling" ); 3450 }, 3451 nextAll: function( elem ) { 3452 return dir( elem, "nextSibling" ); 3453 }, 3454 prevAll: function( elem ) { 3455 return dir( elem, "previousSibling" ); 3456 }, 3457 nextUntil: function( elem, _i, until ) { 3458 return dir( elem, "nextSibling", until ); 3459 }, 3460 prevUntil: function( elem, _i, until ) { 3461 return dir( elem, "previousSibling", until ); 3462 }, 3463 siblings: function( elem ) { 3464 return siblings( ( elem.parentNode || {} ).firstChild, elem ); 3465 }, 3466 children: function( elem ) { 3467 return siblings( elem.firstChild ); 3468 }, 3469 contents: function( elem ) { 3470 if ( elem.contentDocument != null && 3471 3472 // Support: IE 11+ 3473 // <object> elements with no `data` attribute has an object 3474 // `contentDocument` with a `null` prototype. 3475 getProto( elem.contentDocument ) ) { 3476 3477 return elem.contentDocument; 3478 } 3479 3480 // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only 3481 // Treat the template element as a regular one in browsers that 3482 // don't support it. 3483 if ( nodeName( elem, "template" ) ) { 3484 elem = elem.content || elem; 3485 } 3486 3487 return jQuery.merge( [], elem.childNodes ); 3488 } 3489}, function( name, fn ) { 3490 jQuery.fn[ name ] = function( until, selector ) { 3491 var matched = jQuery.map( this, fn, until ); 3492 3493 if ( name.slice( -5 ) !== "Until" ) { 3494 selector = until; 3495 } 3496 3497 if ( selector && typeof selector === "string" ) { 3498 matched = jQuery.filter( selector, matched ); 3499 } 3500 3501 if ( this.length > 1 ) { 3502 3503 // Remove duplicates 3504 if ( !guaranteedUnique[ name ] ) { 3505 jQuery.uniqueSort( matched ); 3506 } 3507 3508 // Reverse order for parents* and prev-derivatives 3509 if ( rparentsprev.test( name ) ) { 3510 matched.reverse(); 3511 } 3512 } 3513 3514 return this.pushStack( matched ); 3515 }; 3516} ); 3517var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); 3518 3519 3520 3521// Convert String-formatted options into Object-formatted ones 3522function createOptions( options ) { 3523 var object = {}; 3524 jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { 3525 object[ flag ] = true; 3526 } ); 3527 return object; 3528} 3529 3530/* 3531 * Create a callback list using the following parameters: 3532 * 3533 * options: an optional list of space-separated options that will change how 3534 * the callback list behaves or a more traditional option object 3535 * 3536 * By default a callback list will act like an event callback list and can be 3537 * "fired" multiple times. 3538 * 3539 * Possible options: 3540 * 3541 * once: will ensure the callback list can only be fired once (like a Deferred) 3542 * 3543 * memory: will keep track of previous values and will call any callback added 3544 * after the list has been fired right away with the latest "memorized" 3545 * values (like a Deferred) 3546 * 3547 * unique: will ensure a callback can only be added once (no duplicate in the list) 3548 * 3549 * stopOnFalse: interrupt callings when a callback returns false 3550 * 3551 */ 3552jQuery.Callbacks = function( options ) { 3553 3554 // Convert options from String-formatted to Object-formatted if needed 3555 // (we check in cache first) 3556 options = typeof options === "string" ? 3557 createOptions( options ) : 3558 jQuery.extend( {}, options ); 3559 3560 var // Flag to know if list is currently firing 3561 firing, 3562 3563 // Last fire value for non-forgettable lists 3564 memory, 3565 3566 // Flag to know if list was already fired 3567 fired, 3568 3569 // Flag to prevent firing 3570 locked, 3571 3572 // Actual callback list 3573 list = [], 3574 3575 // Queue of execution data for repeatable lists 3576 queue = [], 3577 3578 // Index of currently firing callback (modified by add/remove as needed) 3579 firingIndex = -1, 3580 3581 // Fire callbacks 3582 fire = function() { 3583 3584 // Enforce single-firing 3585 locked = locked || options.once; 3586 3587 // Execute callbacks for all pending executions, 3588 // respecting firingIndex overrides and runtime changes 3589 fired = firing = true; 3590 for ( ; queue.length; firingIndex = -1 ) { 3591 memory = queue.shift(); 3592 while ( ++firingIndex < list.length ) { 3593 3594 // Run callback and check for early termination 3595 if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && 3596 options.stopOnFalse ) { 3597 3598 // Jump to end and forget the data so .add doesn't re-fire 3599 firingIndex = list.length; 3600 memory = false; 3601 } 3602 } 3603 } 3604 3605 // Forget the data if we're done with it 3606 if ( !options.memory ) { 3607 memory = false; 3608 } 3609 3610 firing = false; 3611 3612 // Clean up if we're done firing for good 3613 if ( locked ) { 3614 3615 // Keep an empty list if we have data for future add calls 3616 if ( memory ) { 3617 list = []; 3618 3619 // Otherwise, this object is spent 3620 } else { 3621 list = ""; 3622 } 3623 } 3624 }, 3625 3626 // Actual Callbacks object 3627 self = { 3628 3629 // Add a callback or a collection of callbacks to the list 3630 add: function() { 3631 if ( list ) { 3632 3633 // If we have memory from a past run, we should fire after adding 3634 if ( memory && !firing ) { 3635 firingIndex = list.length - 1; 3636 queue.push( memory ); 3637 } 3638 3639 ( function add( args ) { 3640 jQuery.each( args, function( _, arg ) { 3641 if ( isFunction( arg ) ) { 3642 if ( !options.unique || !self.has( arg ) ) { 3643 list.push( arg ); 3644 } 3645 } else if ( arg && arg.length && toType( arg ) !== "string" ) { 3646 3647 // Inspect recursively 3648 add( arg ); 3649 } 3650 } ); 3651 } )( arguments ); 3652 3653 if ( memory && !firing ) { 3654 fire(); 3655 } 3656 } 3657 return this; 3658 }, 3659 3660 // Remove a callback from the list 3661 remove: function() { 3662 jQuery.each( arguments, function( _, arg ) { 3663 var index; 3664 while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { 3665 list.splice( index, 1 ); 3666 3667 // Handle firing indexes 3668 if ( index <= firingIndex ) { 3669 firingIndex--; 3670 } 3671 } 3672 } ); 3673 return this; 3674 }, 3675 3676 // Check if a given callback is in the list. 3677 // If no argument is given, return whether or not list has callbacks attached. 3678 has: function( fn ) { 3679 return fn ? 3680 jQuery.inArray( fn, list ) > -1 : 3681 list.length > 0; 3682 }, 3683 3684 // Remove all callbacks from the list 3685 empty: function() { 3686 if ( list ) { 3687 list = []; 3688 } 3689 return this; 3690 }, 3691 3692 // Disable .fire and .add 3693 // Abort any current/pending executions 3694 // Clear all callbacks and values 3695 disable: function() { 3696 locked = queue = []; 3697 list = memory = ""; 3698 return this; 3699 }, 3700 disabled: function() { 3701 return !list; 3702 }, 3703 3704 // Disable .fire 3705 // Also disable .add unless we have memory (since it would have no effect) 3706 // Abort any pending executions 3707 lock: function() { 3708 locked = queue = []; 3709 if ( !memory && !firing ) { 3710 list = memory = ""; 3711 } 3712 return this; 3713 }, 3714 locked: function() { 3715 return !!locked; 3716 }, 3717 3718 // Call all callbacks with the given context and arguments 3719 fireWith: function( context, args ) { 3720 if ( !locked ) { 3721 args = args || []; 3722 args = [ context, args.slice ? args.slice() : args ]; 3723 queue.push( args ); 3724 if ( !firing ) { 3725 fire(); 3726 } 3727 } 3728 return this; 3729 }, 3730 3731 // Call all the callbacks with the given arguments 3732 fire: function() { 3733 self.fireWith( this, arguments ); 3734 return this; 3735 }, 3736 3737 // To know if the callbacks have already been called at least once 3738 fired: function() { 3739 return !!fired; 3740 } 3741 }; 3742 3743 return self; 3744}; 3745 3746 3747function Identity( v ) { 3748 return v; 3749} 3750function Thrower( ex ) { 3751 throw ex; 3752} 3753 3754function adoptValue( value, resolve, reject, noValue ) { 3755 var method; 3756 3757 try { 3758 3759 // Check for promise aspect first to privilege synchronous behavior 3760 if ( value && isFunction( ( method = value.promise ) ) ) { 3761 method.call( value ).done( resolve ).fail( reject ); 3762 3763 // Other thenables 3764 } else if ( value && isFunction( ( method = value.then ) ) ) { 3765 method.call( value, resolve, reject ); 3766 3767 // Other non-thenables 3768 } else { 3769 3770 // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: 3771 // * false: [ value ].slice( 0 ) => resolve( value ) 3772 // * true: [ value ].slice( 1 ) => resolve() 3773 resolve.apply( undefined, [ value ].slice( noValue ) ); 3774 } 3775 3776 // For Promises/A+, convert exceptions into rejections 3777 // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in 3778 // Deferred#then to conditionally suppress rejection. 3779 } catch ( value ) { 3780 3781 // Support: Android 4.0 only 3782 // Strict mode functions invoked without .call/.apply get global-object context 3783 reject.apply( undefined, [ value ] ); 3784 } 3785} 3786 3787jQuery.extend( { 3788 3789 Deferred: function( func ) { 3790 var tuples = [ 3791 3792 // action, add listener, callbacks, 3793 // ... .then handlers, argument index, [final state] 3794 [ "notify", "progress", jQuery.Callbacks( "memory" ), 3795 jQuery.Callbacks( "memory" ), 2 ], 3796 [ "resolve", "done", jQuery.Callbacks( "once memory" ), 3797 jQuery.Callbacks( "once memory" ), 0, "resolved" ], 3798 [ "reject", "fail", jQuery.Callbacks( "once memory" ), 3799 jQuery.Callbacks( "once memory" ), 1, "rejected" ] 3800 ], 3801 state = "pending", 3802 promise = { 3803 state: function() { 3804 return state; 3805 }, 3806 always: function() { 3807 deferred.done( arguments ).fail( arguments ); 3808 return this; 3809 }, 3810 "catch": function( fn ) { 3811 return promise.then( null, fn ); 3812 }, 3813 3814 // Keep pipe for back-compat 3815 pipe: function( /* fnDone, fnFail, fnProgress */ ) { 3816 var fns = arguments; 3817 3818 return jQuery.Deferred( function( newDefer ) { 3819 jQuery.each( tuples, function( _i, tuple ) { 3820 3821 // Map tuples (progress, done, fail) to arguments (done, fail, progress) 3822 var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; 3823 3824 // deferred.progress(function() { bind to newDefer or newDefer.notify }) 3825 // deferred.done(function() { bind to newDefer or newDefer.resolve }) 3826 // deferred.fail(function() { bind to newDefer or newDefer.reject }) 3827 deferred[ tuple[ 1 ] ]( function() { 3828 var returned = fn && fn.apply( this, arguments ); 3829 if ( returned && isFunction( returned.promise ) ) { 3830 returned.promise() 3831 .progress( newDefer.notify ) 3832 .done( newDefer.resolve ) 3833 .fail( newDefer.reject ); 3834 } else { 3835 newDefer[ tuple[ 0 ] + "With" ]( 3836 this, 3837 fn ? [ returned ] : arguments 3838 ); 3839 } 3840 } ); 3841 } ); 3842 fns = null; 3843 } ).promise(); 3844 }, 3845 then: function( onFulfilled, onRejected, onProgress ) { 3846 var maxDepth = 0; 3847 function resolve( depth, deferred, handler, special ) { 3848 return function() { 3849 var that = this, 3850 args = arguments, 3851 mightThrow = function() { 3852 var returned, then; 3853 3854 // Support: Promises/A+ section 2.3.3.3.3 3855 // https://promisesaplus.com/#point-59 3856 // Ignore double-resolution attempts 3857 if ( depth < maxDepth ) { 3858 return; 3859 } 3860 3861 returned = handler.apply( that, args ); 3862 3863 // Support: Promises/A+ section 2.3.1 3864 // https://promisesaplus.com/#point-48 3865 if ( returned === deferred.promise() ) { 3866 throw new TypeError( "Thenable self-resolution" ); 3867 } 3868 3869 // Support: Promises/A+ sections 2.3.3.1, 3.5 3870 // https://promisesaplus.com/#point-54 3871 // https://promisesaplus.com/#point-75 3872 // Retrieve `then` only once 3873 then = returned && 3874 3875 // Support: Promises/A+ section 2.3.4 3876 // https://promisesaplus.com/#point-64 3877 // Only check objects and functions for thenability 3878 ( typeof returned === "object" || 3879 typeof returned === "function" ) && 3880 returned.then; 3881 3882 // Handle a returned thenable 3883 if ( isFunction( then ) ) { 3884 3885 // Special processors (notify) just wait for resolution 3886 if ( special ) { 3887 then.call( 3888 returned, 3889 resolve( maxDepth, deferred, Identity, special ), 3890 resolve( maxDepth, deferred, Thrower, special ) 3891 ); 3892 3893 // Normal processors (resolve) also hook into progress 3894 } else { 3895 3896 // ...and disregard older resolution values 3897 maxDepth++; 3898 3899 then.call( 3900 returned, 3901 resolve( maxDepth, deferred, Identity, special ), 3902 resolve( maxDepth, deferred, Thrower, special ), 3903 resolve( maxDepth, deferred, Identity, 3904 deferred.notifyWith ) 3905 ); 3906 } 3907 3908 // Handle all other returned values 3909 } else { 3910 3911 // Only substitute handlers pass on context 3912 // and multiple values (non-spec behavior) 3913 if ( handler !== Identity ) { 3914 that = undefined; 3915 args = [ returned ]; 3916 } 3917 3918 // Process the value(s) 3919 // Default process is resolve 3920 ( special || deferred.resolveWith )( that, args ); 3921 } 3922 }, 3923 3924 // Only normal processors (resolve) catch and reject exceptions 3925 process = special ? 3926 mightThrow : 3927 function() { 3928 try { 3929 mightThrow(); 3930 } catch ( e ) { 3931 3932 if ( jQuery.Deferred.exceptionHook ) { 3933 jQuery.Deferred.exceptionHook( e, 3934 process.stackTrace ); 3935 } 3936 3937 // Support: Promises/A+ section 2.3.3.3.4.1 3938 // https://promisesaplus.com/#point-61 3939 // Ignore post-resolution exceptions 3940 if ( depth + 1 >= maxDepth ) { 3941 3942 // Only substitute handlers pass on context 3943 // and multiple values (non-spec behavior) 3944 if ( handler !== Thrower ) { 3945 that = undefined; 3946 args = [ e ]; 3947 } 3948 3949 deferred.rejectWith( that, args ); 3950 } 3951 } 3952 }; 3953
vendor: 7,865 bytes, lines 3954-4272
3954 // Support: Promises/A+ section 2.3.3.3.1 3955 // https://promisesaplus.com/#point-57 3956 // Re-resolve promises immediately to dodge false rejection from 3957 // subsequent errors 3958 if ( depth ) { 3959 process(); 3960 } else { 3961 3962 // Call an optional hook to record the stack, in case of exception 3963 // since it's otherwise lost when execution goes async 3964 if ( jQuery.Deferred.getStackHook ) { 3965 process.stackTrace = jQuery.Deferred.getStackHook(); 3966 } 3967 window.setTimeout( process ); 3968 } 3969 }; 3970 } 3971 3972 return jQuery.Deferred( function( newDefer ) { 3973 3974 // progress_handlers.add( ... ) 3975 tuples[ 0 ][ 3 ].add( 3976 resolve( 3977 0, 3978 newDefer, 3979 isFunction( onProgress ) ? 3980 onProgress : 3981 Identity, 3982 newDefer.notifyWith 3983 ) 3984 ); 3985 3986 // fulfilled_handlers.add( ... ) 3987 tuples[ 1 ][ 3 ].add( 3988 resolve( 3989 0, 3990 newDefer, 3991 isFunction( onFulfilled ) ? 3992 onFulfilled : 3993 Identity 3994 ) 3995 ); 3996 3997 // rejected_handlers.add( ... ) 3998 tuples[ 2 ][ 3 ].add( 3999 resolve( 4000 0, 4001 newDefer, 4002 isFunction( onRejected ) ? 4003 onRejected : 4004 Thrower 4005 ) 4006 ); 4007 } ).promise(); 4008 }, 4009 4010 // Get a promise for this deferred 4011 // If obj is provided, the promise aspect is added to the object 4012 promise: function( obj ) { 4013 return obj != null ? jQuery.extend( obj, promise ) : promise; 4014 } 4015 }, 4016 deferred = {}; 4017 4018 // Add list-specific methods 4019 jQuery.each( tuples, function( i, tuple ) { 4020 var list = tuple[ 2 ], 4021 stateString = tuple[ 5 ]; 4022 4023 // promise.progress = list.add 4024 // promise.done = list.add 4025 // promise.fail = list.add 4026 promise[ tuple[ 1 ] ] = list.add; 4027 4028 // Handle state 4029 if ( stateString ) { 4030 list.add( 4031 function() { 4032 4033 // state = "resolved" (i.e., fulfilled) 4034 // state = "rejected" 4035 state = stateString; 4036 }, 4037 4038 // rejected_callbacks.disable 4039 // fulfilled_callbacks.disable 4040 tuples[ 3 - i ][ 2 ].disable, 4041 4042 // rejected_handlers.disable 4043 // fulfilled_handlers.disable 4044 tuples[ 3 - i ][ 3 ].disable, 4045 4046 // progress_callbacks.lock 4047 tuples[ 0 ][ 2 ].lock, 4048 4049 // progress_handlers.lock 4050 tuples[ 0 ][ 3 ].lock 4051 ); 4052 } 4053 4054 // progress_handlers.fire 4055 // fulfilled_handlers.fire 4056 // rejected_handlers.fire 4057 list.add( tuple[ 3 ].fire ); 4058 4059 // deferred.notify = function() { deferred.notifyWith(...) } 4060 // deferred.resolve = function() { deferred.resolveWith(...) } 4061 // deferred.reject = function() { deferred.rejectWith(...) } 4062 deferred[ tuple[ 0 ] ] = function() { 4063 deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); 4064 return this; 4065 }; 4066 4067 // deferred.notifyWith = list.fireWith 4068 // deferred.resolveWith = list.fireWith 4069 // deferred.rejectWith = list.fireWith 4070 deferred[ tuple[ 0 ] + "With" ] = list.fireWith; 4071 } ); 4072 4073 // Make the deferred a promise 4074 promise.promise( deferred ); 4075 4076 // Call given func if any 4077 if ( func ) { 4078 func.call( deferred, deferred ); 4079 } 4080 4081 // All done! 4082 return deferred; 4083 }, 4084 4085 // Deferred helper 4086 when: function( singleValue ) { 4087 var 4088 4089 // count of uncompleted subordinates 4090 remaining = arguments.length, 4091 4092 // count of unprocessed arguments 4093 i = remaining, 4094 4095 // subordinate fulfillment data 4096 resolveContexts = Array( i ), 4097 resolveValues = slice.call( arguments ), 4098 4099 // the master Deferred 4100 master = jQuery.Deferred(), 4101 4102 // subordinate callback factory 4103 updateFunc = function( i ) { 4104 return function( value ) { 4105 resolveContexts[ i ] = this; 4106 resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; 4107 if ( !( --remaining ) ) { 4108 master.resolveWith( resolveContexts, resolveValues ); 4109 } 4110 }; 4111 }; 4112 4113 // Single- and empty arguments are adopted like Promise.resolve 4114 if ( remaining <= 1 ) { 4115 adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject, 4116 !remaining ); 4117 4118 // Use .then() to unwrap secondary thenables (cf. gh-3000) 4119 if ( master.state() === "pending" || 4120 isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { 4121 4122 return master.then(); 4123 } 4124 } 4125 4126 // Multiple arguments are aggregated like Promise.all array elements 4127 while ( i-- ) { 4128 adoptValue( resolveValues[ i ], updateFunc( i ), master.reject ); 4129 } 4130 4131 return master.promise(); 4132 } 4133} ); 4134 4135 4136// These usually indicate a programmer mistake during development, 4137// warn about them ASAP rather than swallowing them by default. 4138var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; 4139 4140jQuery.Deferred.exceptionHook = function( error, stack ) { 4141 4142 // Support: IE 8 - 9 only 4143 // Console exists when dev tools are open, which can happen at any time 4144 if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { 4145 window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); 4146 } 4147}; 4148 4149 4150 4151 4152jQuery.readyException = function( error ) { 4153 window.setTimeout( function() { 4154 throw error; 4155 } ); 4156}; 4157 4158 4159 4160 4161// The deferred used on DOM ready 4162var readyList = jQuery.Deferred(); 4163 4164jQuery.fn.ready = function( fn ) { 4165 4166 readyList 4167 .then( fn ) 4168 4169 // Wrap jQuery.readyException in a function so that the lookup 4170 // happens at the time of error handling instead of callback 4171 // registration. 4172 .catch( function( error ) { 4173 jQuery.readyException( error ); 4174 } ); 4175 4176 return this; 4177}; 4178 4179jQuery.extend( { 4180 4181 // Is the DOM ready to be used? Set to true once it occurs. 4182 isReady: false, 4183 4184 // A counter to track how many items to wait for before 4185 // the ready event fires. See #6781 4186 readyWait: 1, 4187 4188 // Handle when the DOM is ready 4189 ready: function( wait ) { 4190 4191 // Abort if there are pending holds or we're already ready 4192 if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { 4193 return; 4194 } 4195 4196 // Remember that the DOM is ready 4197 jQuery.isReady = true; 4198 4199 // If a normal DOM Ready event fired, decrement, and wait if need be 4200 if ( wait !== true && --jQuery.readyWait > 0 ) { 4201 return; 4202 } 4203 4204 // If there are functions bound, to execute 4205 readyList.resolveWith( document, [ jQuery ] ); 4206 } 4207} ); 4208 4209jQuery.ready.then = readyList.then; 4210 4211// The ready event handler and self cleanup method 4212function completed() { 4213 document.removeEventListener( "DOMContentLoaded", completed ); 4214 window.removeEventListener( "load", completed ); 4215 jQuery.ready(); 4216} 4217 4218// Catch cases where $(document).ready() is called 4219// after the browser event has already occurred. 4220// Support: IE <=9 - 10 only 4221// Older IE sometimes signals "interactive" too soon 4222if ( document.readyState === "complete" || 4223 ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { 4224 4225 // Handle it asynchronously to allow scripts the opportunity to delay ready 4226 window.setTimeout( jQuery.ready ); 4227 4228} else { 4229 4230 // Use the handy event callback 4231 document.addEventListener( "DOMContentLoaded", completed ); 4232 4233 // A fallback to window.onload, that will always work 4234 window.addEventListener( "load", completed ); 4235} 4236 4237 4238 4239 4240// Multifunctional method to get and set values of a collection 4241// The value/s can optionally be executed if it's a function 4242var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { 4243 var i = 0, 4244 len = elems.length, 4245 bulk = key == null; 4246 4247 // Sets many values 4248 if ( toType( key ) === "object" ) { 4249 chainable = true; 4250 for ( i in key ) { 4251 access( elems, fn, i, key[ i ], true, emptyGet, raw ); 4252 } 4253 4254 // Sets one value 4255 } else if ( value !== undefined ) { 4256 chainable = true; 4257 4258 if ( !isFunction( value ) ) { 4259 raw = true; 4260 } 4261 4262 if ( bulk ) { 4263 4264 // Bulk operations run against the entire set 4265 if ( raw ) { 4266 fn.call( elems, value ); 4267 fn = null; 4268 4269 // ...except when executing function values 4270 } else { 4271 bulk = fn; 4272 fn = function( elem,
4272_key, value ) { 4273 return bulk.call( jQuery( elem ), value ); 4274 }; 4275 } 4276 } 4277 4278 if ( fn ) { 4279 for ( ; i < len; i++ ) { 4280 fn( 4281 elems[ i ], key, raw ? 4282 value :
vendor: 22,305 bytes, lines 4283-5191
4283 value.call( elems[ i ], i, fn( elems[ i ], key ) ) 4284 ); 4285 } 4286 } 4287 } 4288 4289 if ( chainable ) { 4290 return elems; 4291 } 4292 4293 // Gets 4294 if ( bulk ) { 4295 return fn.call( elems ); 4296 } 4297 4298 return len ? fn( elems[ 0 ], key ) : emptyGet; 4299}; 4300 4301 4302// Matches dashed string for camelizing 4303var rmsPrefix = /^-ms-/, 4304 rdashAlpha = /-([a-z])/g; 4305 4306// Used by camelCase as callback to replace() 4307function fcamelCase( _all, letter ) { 4308 return letter.toUpperCase(); 4309} 4310 4311// Convert dashed to camelCase; used by the css and data modules 4312// Support: IE <=9 - 11, Edge 12 - 15 4313// Microsoft forgot to hump their vendor prefix (#9572) 4314function camelCase( string ) { 4315 return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); 4316} 4317var acceptData = function( owner ) { 4318 4319 // Accepts only: 4320 // - Node 4321 // - Node.ELEMENT_NODE 4322 // - Node.DOCUMENT_NODE 4323 // - Object 4324 // - Any 4325 return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); 4326}; 4327 4328 4329 4330 4331function Data() { 4332 this.expando = jQuery.expando + Data.uid++; 4333} 4334 4335Data.uid = 1; 4336 4337Data.prototype = { 4338 4339 cache: function( owner ) { 4340 4341 // Check if the owner object already has a cache 4342 var value = owner[ this.expando ]; 4343 4344 // If not, create one 4345 if ( !value ) { 4346 value = {}; 4347 4348 // We can accept data for non-element nodes in modern browsers, 4349 // but we should not, see #8335. 4350 // Always return an empty object. 4351 if ( acceptData( owner ) ) { 4352 4353 // If it is a node unlikely to be stringify-ed or looped over 4354 // use plain assignment 4355 if ( owner.nodeType ) { 4356 owner[ this.expando ] = value; 4357 4358 // Otherwise secure it in a non-enumerable property 4359 // configurable must be true to allow the property to be 4360 // deleted when data is removed 4361 } else { 4362 Object.defineProperty( owner, this.expando, { 4363 value: value, 4364 configurable: true 4365 } ); 4366 } 4367 } 4368 } 4369 4370 return value; 4371 }, 4372 set: function( owner, data, value ) { 4373 var prop, 4374 cache = this.cache( owner ); 4375 4376 // Handle: [ owner, key, value ] args 4377 // Always use camelCase key (gh-2257) 4378 if ( typeof data === "string" ) { 4379 cache[ camelCase( data ) ] = value; 4380 4381 // Handle: [ owner, { properties } ] args 4382 } else { 4383 4384 // Copy the properties one-by-one to the cache object 4385 for ( prop in data ) { 4386 cache[ camelCase( prop ) ] = data[ prop ]; 4387 } 4388 } 4389 return cache; 4390 }, 4391 get: function( owner, key ) { 4392 return key === undefined ? 4393 this.cache( owner ) : 4394 4395 // Always use camelCase key (gh-2257) 4396 owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ]; 4397 }, 4398 access: function( owner, key, value ) { 4399 4400 // In cases where either: 4401 // 4402 // 1. No key was specified 4403 // 2. A string key was specified, but no value provided 4404 // 4405 // Take the "read" path and allow the get method to determine 4406 // which value to return, respectively either: 4407 // 4408 // 1. The entire cache object 4409 // 2. The data stored at the key 4410 // 4411 if ( key === undefined || 4412 ( ( key && typeof key === "string" ) && value === undefined ) ) { 4413 4414 return this.get( owner, key ); 4415 } 4416 4417 // When the key is not a string, or both a key and value 4418 // are specified, set or extend (existing objects) with either: 4419 // 4420 // 1. An object of properties 4421 // 2. A key and value 4422 // 4423 this.set( owner, key, value ); 4424 4425 // Since the "set" path can have two possible entry points 4426 // return the expected data based on which path was taken[*] 4427 return value !== undefined ? value : key; 4428 }, 4429 remove: function( owner, key ) { 4430 var i, 4431 cache = owner[ this.expando ]; 4432 4433 if ( cache === undefined ) { 4434 return; 4435 } 4436 4437 if ( key !== undefined ) { 4438 4439 // Support array or space separated string of keys 4440 if ( Array.isArray( key ) ) { 4441 4442 // If key is an array of keys... 4443 // We always set camelCase keys, so remove that. 4444 key = key.map( camelCase ); 4445 } else { 4446 key = camelCase( key ); 4447 4448 // If a key with the spaces exists, use it. 4449 // Otherwise, create an array by matching non-whitespace 4450 key = key in cache ? 4451 [ key ] : 4452 ( key.match( rnothtmlwhite ) || [] ); 4453 } 4454 4455 i = key.length; 4456 4457 while ( i-- ) { 4458 delete cache[ key[ i ] ]; 4459 } 4460 } 4461 4462 // Remove the expando if there's no more data 4463 if ( key === undefined || jQuery.isEmptyObject( cache ) ) { 4464 4465 // Support: Chrome <=35 - 45 4466 // Webkit & Blink performance suffers when deleting properties 4467 // from DOM nodes, so set to undefined instead 4468 // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) 4469 if ( owner.nodeType ) { 4470 owner[ this.expando ] = undefined; 4471 } else { 4472 delete owner[ this.expando ]; 4473 } 4474 } 4475 }, 4476 hasData: function( owner ) { 4477 var cache = owner[ this.expando ]; 4478 return cache !== undefined && !jQuery.isEmptyObject( cache ); 4479 } 4480}; 4481var dataPriv = new Data(); 4482 4483var dataUser = new Data(); 4484 4485 4486 4487// Implementation Summary 4488// 4489// 1. Enforce API surface and semantic compatibility with 1.9.x branch 4490// 2. Improve the module's maintainability by reducing the storage 4491// paths to a single mechanism. 4492// 3. Use the same single mechanism to support "private" and "user" data. 4493// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) 4494// 5. Avoid exposing implementation details on user objects (eg. expando properties) 4495// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 4496 4497var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, 4498 rmultiDash = /[A-Z]/g; 4499 4500function getData( data ) { 4501 if ( data === "true" ) { 4502 return true; 4503 } 4504 4505 if ( data === "false" ) { 4506 return false; 4507 } 4508 4509 if ( data === "null" ) { 4510 return null; 4511 } 4512 4513 // Only convert to a number if it doesn't change the string 4514 if ( data === +data + "" ) { 4515 return +data; 4516 } 4517 4518 if ( rbrace.test( data ) ) { 4519 return JSON.parse( data ); 4520 } 4521 4522 return data; 4523} 4524 4525function dataAttr( elem, key, data ) { 4526 var name; 4527 4528 // If nothing was found internally, try to fetch any 4529 // data from the HTML5 data-* attribute 4530 if ( data === undefined && elem.nodeType === 1 ) { 4531 name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); 4532 data = elem.getAttribute( name ); 4533 4534 if ( typeof data === "string" ) { 4535 try { 4536 data = getData( data ); 4537 } catch ( e ) {} 4538 4539 // Make sure we set the data so it isn't changed later 4540 dataUser.set( elem, key, data ); 4541 } else { 4542 data = undefined; 4543 } 4544 } 4545 return data; 4546} 4547 4548jQuery.extend( { 4549 hasData: function( elem ) { 4550 return dataUser.hasData( elem ) || dataPriv.hasData( elem ); 4551 }, 4552 4553 data: function( elem, name, data ) { 4554 return dataUser.access( elem, name, data ); 4555 }, 4556 4557 removeData: function( elem, name ) { 4558 dataUser.remove( elem, name ); 4559 }, 4560 4561 // TODO: Now that all calls to _data and _removeData have been replaced 4562 // with direct calls to dataPriv methods, these can be deprecated. 4563 _data: function( elem, name, data ) { 4564 return dataPriv.access( elem, name, data ); 4565 }, 4566 4567 _removeData: function( elem, name ) { 4568 dataPriv.remove( elem, name ); 4569 } 4570} ); 4571 4572jQuery.fn.extend( { 4573 data: function( key, value ) { 4574 var i, name, data, 4575 elem = this[ 0 ], 4576 attrs = elem && elem.attributes; 4577 4578 // Gets all values 4579 if ( key === undefined ) { 4580 if ( this.length ) { 4581 data = dataUser.get( elem ); 4582 4583 if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { 4584 i = attrs.length; 4585 while ( i-- ) { 4586 4587 // Support: IE 11 only 4588 // The attrs elements can be null (#14894) 4589 if ( attrs[ i ] ) { 4590 name = attrs[ i ].name; 4591 if ( name.indexOf( "data-" ) === 0 ) { 4592 name = camelCase( name.slice( 5 ) ); 4593 dataAttr( elem, name, data[ name ] ); 4594 } 4595 } 4596 } 4597 dataPriv.set( elem, "hasDataAttrs", true ); 4598 } 4599 } 4600 4601 return data; 4602 } 4603 4604 // Sets multiple values 4605 if ( typeof key === "object" ) { 4606 return this.each( function() { 4607 dataUser.set( this, key ); 4608 } ); 4609 } 4610 4611 return access( this, function( value ) { 4612 var data; 4613 4614 // The calling jQuery object (element matches) is not empty 4615 // (and therefore has an element appears at this[ 0 ]) and the 4616 // `value` parameter was not undefined. An empty jQuery object 4617 // will result in `undefined` for elem = this[ 0 ] which will 4618 // throw an exception if an attempt to read a data cache is made. 4619 if ( elem && value === undefined ) { 4620 4621 // Attempt to get data from the cache 4622 // The key will always be camelCased in Data 4623 data = dataUser.get( elem, key ); 4624 if ( data !== undefined ) { 4625 return data; 4626 } 4627 4628 // Attempt to "discover" the data in 4629 // HTML5 custom data-* attrs 4630 data = dataAttr( elem, key ); 4631 if ( data !== undefined ) { 4632 return data; 4633 } 4634 4635 // We tried really hard, but the data doesn't exist. 4636 return; 4637 } 4638 4639 // Set the data... 4640 this.each( function() { 4641 4642 // We always store the camelCased key 4643 dataUser.set( this, key, value ); 4644 } ); 4645 }, null, value, arguments.length > 1, null, true ); 4646 }, 4647 4648 removeData: function( key ) { 4649 return this.each( function() { 4650 dataUser.remove( this, key ); 4651 } ); 4652 } 4653} ); 4654 4655 4656jQuery.extend( { 4657 queue: function( elem, type, data ) { 4658 var queue; 4659 4660 if ( elem ) { 4661 type = ( type || "fx" ) + "queue"; 4662 queue = dataPriv.get( elem, type ); 4663 4664 // Speed up dequeue by getting out quickly if this is just a lookup 4665 if ( data ) { 4666 if ( !queue || Array.isArray( data ) ) { 4667 queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); 4668 } else { 4669 queue.push( data ); 4670 } 4671 } 4672 return queue || []; 4673 } 4674 }, 4675 4676 dequeue: function( elem, type ) { 4677 type = type || "fx"; 4678 4679 var queue = jQuery.queue( elem, type ), 4680 startLength = queue.length, 4681 fn = queue.shift(), 4682 hooks = jQuery._queueHooks( elem, type ), 4683 next = function() { 4684 jQuery.dequeue( elem, type ); 4685 }; 4686 4687 // If the fx queue is dequeued, always remove the progress sentinel 4688 if ( fn === "inprogress" ) { 4689 fn = queue.shift(); 4690 startLength--; 4691 } 4692 4693 if ( fn ) { 4694 4695 // Add a progress sentinel to prevent the fx queue from being 4696 // automatically dequeued 4697 if ( type === "fx" ) { 4698 queue.unshift( "inprogress" ); 4699 } 4700 4701 // Clear up the last queue stop function 4702 delete hooks.stop; 4703 fn.call( elem, next, hooks ); 4704 } 4705 4706 if ( !startLength && hooks ) { 4707 hooks.empty.fire(); 4708 } 4709 }, 4710 4711 // Not public - generate a queueHooks object, or return the current one 4712 _queueHooks: function( elem, type ) { 4713 var key = type + "queueHooks"; 4714 return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { 4715 empty: jQuery.Callbacks( "once memory" ).add( function() { 4716 dataPriv.remove( elem, [ type + "queue", key ] ); 4717 } ) 4718 } ); 4719 } 4720} ); 4721 4722jQuery.fn.extend( { 4723 queue: function( type, data ) { 4724 var setter = 2; 4725 4726 if ( typeof type !== "string" ) { 4727 data = type; 4728 type = "fx"; 4729 setter--; 4730 } 4731 4732 if ( arguments.length < setter ) { 4733 return jQuery.queue( this[ 0 ], type ); 4734 } 4735 4736 return data === undefined ? 4737 this : 4738 this.each( function() { 4739 var queue = jQuery.queue( this, type, data ); 4740 4741 // Ensure a hooks for this queue 4742 jQuery._queueHooks( this, type ); 4743 4744 if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { 4745 jQuery.dequeue( this, type ); 4746 } 4747 } ); 4748 }, 4749 dequeue: function( type ) { 4750 return this.each( function() { 4751 jQuery.dequeue( this, type ); 4752 } ); 4753 }, 4754 clearQueue: function( type ) { 4755 return this.queue( type || "fx", [] ); 4756 }, 4757 4758 // Get a promise resolved when queues of a certain type 4759 // are emptied (fx is the type by default) 4760 promise: function( type, obj ) { 4761 var tmp, 4762 count = 1, 4763 defer = jQuery.Deferred(), 4764 elements = this, 4765 i = this.length, 4766 resolve = function() { 4767 if ( !( --count ) ) { 4768 defer.resolveWith( elements, [ elements ] ); 4769 } 4770 }; 4771 4772 if ( typeof type !== "string" ) { 4773 obj = type; 4774 type = undefined; 4775 } 4776 type = type || "fx"; 4777 4778 while ( i-- ) { 4779 tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); 4780 if ( tmp && tmp.empty ) { 4781 count++; 4782 tmp.empty.add( resolve ); 4783 } 4784 } 4785 resolve(); 4786 return defer.promise( obj ); 4787 } 4788} ); 4789var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; 4790 4791var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); 4792 4793 4794var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; 4795 4796var documentElement = document.documentElement; 4797 4798 4799 4800 var isAttached = function( elem ) { 4801 return jQuery.contains( elem.ownerDocument, elem ); 4802 }, 4803 composed = { composed: true }; 4804 4805 // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only 4806 // Check attachment across shadow DOM boundaries when possible (gh-3504) 4807 // Support: iOS 10.0-10.2 only 4808 // Early iOS 10 versions support `attachShadow` but not `getRootNode`, 4809 // leading to errors. We need to check for `getRootNode`. 4810 if ( documentElement.getRootNode ) { 4811 isAttached = function( elem ) { 4812 return jQuery.contains( elem.ownerDocument, elem ) || 4813 elem.getRootNode( composed ) === elem.ownerDocument; 4814 }; 4815 } 4816var isHiddenWithinTree = function( elem, el ) { 4817 4818 // isHiddenWithinTree might be called from jQuery#filter function; 4819 // in that case, element will be second argument 4820 elem = el || elem; 4821 4822 // Inline style trumps all 4823 return elem.style.display === "none" || 4824 elem.style.display === "" && 4825 4826 // Otherwise, check computed style 4827 // Support: Firefox <=43 - 45 4828 // Disconnected elements can have computed display: none, so first confirm that elem is 4829 // in the document. 4830 isAttached( elem ) && 4831 4832 jQuery.css( elem, "display" ) === "none"; 4833 }; 4834 4835 4836 4837function adjustCSS( elem, prop, valueParts, tween ) { 4838 var adjusted, scale, 4839 maxIterations = 20, 4840 currentValue = tween ? 4841 function() { 4842 return tween.cur(); 4843 } : 4844 function() { 4845 return jQuery.css( elem, prop, "" ); 4846 }, 4847 initial = currentValue(), 4848 unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), 4849 4850 // Starting value computation is required for potential unit mismatches 4851 initialInUnit = elem.nodeType && 4852 ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && 4853 rcssNum.exec( jQuery.css( elem, prop ) ); 4854 4855 if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { 4856 4857 // Support: Firefox <=54 4858 // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) 4859 initial = initial / 2; 4860 4861 // Trust units reported by jQuery.css 4862 unit = unit || initialInUnit[ 3 ]; 4863 4864 // Iteratively approximate from a nonzero starting point 4865 initialInUnit = +initial || 1; 4866 4867 while ( maxIterations-- ) { 4868 4869 // Evaluate and update our best guess (doubling guesses that zero out). 4870 // Finish if the scale equals or crosses 1 (making the old*new product non-positive). 4871 jQuery.style( elem, prop, initialInUnit + unit ); 4872 if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) { 4873 maxIterations = 0; 4874 } 4875 initialInUnit = initialInUnit / scale; 4876 4877 } 4878 4879 initialInUnit = initialInUnit * 2; 4880 jQuery.style( elem, prop, initialInUnit + unit ); 4881 4882 // Make sure we update the tween properties later on 4883 valueParts = valueParts || []; 4884 } 4885 4886 if ( valueParts ) { 4887 initialInUnit = +initialInUnit || +initial || 0; 4888 4889 // Apply relative offset (+=/-=) if specified 4890 adjusted = valueParts[ 1 ] ? 4891 initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : 4892 +valueParts[ 2 ]; 4893 if ( tween ) { 4894 tween.unit = unit; 4895 tween.start = initialInUnit; 4896 tween.end = adjusted; 4897 } 4898 } 4899 return adjusted; 4900} 4901 4902 4903var defaultDisplayMap = {}; 4904 4905function getDefaultDisplay( elem ) { 4906 var temp, 4907 doc = elem.ownerDocument, 4908 nodeName = elem.nodeName, 4909 display = defaultDisplayMap[ nodeName ]; 4910 4911 if ( display ) { 4912 return display; 4913 } 4914 4915 temp = doc.body.appendChild( doc.createElement( nodeName ) ); 4916 display = jQuery.css( temp, "display" ); 4917 4918 temp.parentNode.removeChild( temp ); 4919 4920 if ( display === "none" ) { 4921 display = "block"; 4922 } 4923 defaultDisplayMap[ nodeName ] = display; 4924 4925 return display; 4926} 4927 4928function showHide( elements, show ) { 4929 var display, elem, 4930 values = [], 4931 index = 0, 4932 length = elements.length; 4933 4934 // Determine new display value for elements that need to change 4935 for ( ; index < length; index++ ) { 4936 elem = elements[ index ]; 4937 if ( !elem.style ) { 4938 continue; 4939 } 4940 4941 display = elem.style.display; 4942 if ( show ) { 4943 4944 // Since we force visibility upon cascade-hidden elements, an immediate (and slow) 4945 // check is required in this first loop unless we have a nonempty display value (either 4946 // inline or about-to-be-restored) 4947 if ( display === "none" ) { 4948 values[ index ] = dataPriv.get( elem, "display" ) || null; 4949 if ( !values[ index ] ) { 4950 elem.style.display = ""; 4951 } 4952 } 4953 if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { 4954 values[ index ] = getDefaultDisplay( elem ); 4955 } 4956 } else { 4957 if ( display !== "none" ) { 4958 values[ index ] = "none"; 4959 4960 // Remember what we're overwriting 4961 dataPriv.set( elem, "display", display ); 4962 } 4963 } 4964 } 4965 4966 // Set the display of the elements in a second loop to avoid constant reflow 4967 for ( index = 0; index < length; index++ ) { 4968 if ( values[ index ] != null ) { 4969 elements[ index ].style.display = values[ index ]; 4970 } 4971 } 4972 4973 return elements; 4974} 4975 4976jQuery.fn.extend( { 4977 show: function() { 4978 return showHide( this, true ); 4979 }, 4980 hide: function() { 4981 return showHide( this ); 4982 }, 4983 toggle: function( state ) { 4984 if ( typeof state === "boolean" ) { 4985 return state ? this.show() : this.hide(); 4986 } 4987 4988 return this.each( function() { 4989 if ( isHiddenWithinTree( this ) ) { 4990 jQuery( this ).show(); 4991 } else { 4992 jQuery( this ).hide(); 4993 } 4994 } ); 4995 } 4996} ); 4997var rcheckableType = ( /^(?:checkbox|radio)$/i ); 4998 4999var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i ); 5000 5001var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); 5002 5003 5004 5005( function() { 5006 var fragment = document.createDocumentFragment(), 5007 div = fragment.appendChild( document.createElement( "div" ) ), 5008 input = document.createElement( "input" ); 5009 5010 // Support: Android 4.0 - 4.3 only 5011 // Check state lost if the name is set (#11217) 5012 // Support: Windows Web Apps (WWA) 5013 // `name` and `type` must use .setAttribute for WWA (#14901) 5014 input.setAttribute( "type", "radio" ); 5015 input.setAttribute( "checked", "checked" ); 5016 input.setAttribute( "name", "t" ); 5017 5018 div.appendChild( input ); 5019 5020 // Support: Android <=4.1 only 5021 // Older WebKit doesn't clone checked state correctly in fragments 5022 support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; 5023 5024 // Support: IE <=11 only 5025 // Make sure textarea (and checkbox) defaultValue is properly cloned 5026 div.innerHTML = "<textarea>x</textarea>"; 5027 support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; 5028 5029 // Support: IE <=9 only 5030 // IE <=9 replaces <option> tags with their contents when inserted outside of 5031 // the select element. 5032 div.innerHTML = "<option></option>"; 5033 support.option = !!div.lastChild; 5034} )(); 5035 5036 5037// We have to close these tags to support XHTML (#13200) 5038var wrapMap = { 5039 5040 // XHTML parsers do not magically insert elements in the 5041 // same way that tag soup parsers do. So we cannot shorten 5042 // this by omitting <tbody> or other required elements. 5043 thead: [ 1, "<table>", "</table>" ], 5044 col: [ 2, "<table><colgroup>", "</colgroup></table>" ], 5045 tr: [ 2, "<table><tbody>", "</tbody></table>" ], 5046 td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], 5047 5048 _default: [ 0, "", "" ] 5049}; 5050 5051wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; 5052wrapMap.th = wrapMap.td; 5053 5054// Support: IE <=9 only 5055if ( !support.option ) { 5056 wrapMap.optgroup = wrapMap.option = [ 1, "<select multiple='multiple'>", "</select>" ]; 5057} 5058 5059 5060function getAll( context, tag ) { 5061 5062 // Support: IE <=9 - 11 only 5063 // Use typeof to avoid zero-argument method invocation on host objects (#15151) 5064 var ret; 5065 5066 if ( typeof context.getElementsByTagName !== "undefined" ) { 5067 ret = context.getElementsByTagName( tag || "*" ); 5068 5069 } else if ( typeof context.querySelectorAll !== "undefined" ) { 5070 ret = context.querySelectorAll( tag || "*" ); 5071 5072 } else { 5073 ret = []; 5074 } 5075 5076 if ( tag === undefined || tag && nodeName( context, tag ) ) { 5077 return jQuery.merge( [ context ], ret ); 5078 } 5079 5080 return ret; 5081} 5082 5083 5084// Mark scripts as having already been evaluated 5085function setGlobalEval( elems, refElements ) { 5086 var i = 0, 5087 l = elems.length; 5088 5089 for ( ; i < l; i++ ) { 5090 dataPriv.set( 5091 elems[ i ], 5092 "globalEval", 5093 !refElements || dataPriv.get( refElements[ i ], "globalEval" ) 5094 ); 5095 } 5096} 5097 5098 5099var rhtml = /<|&#?\w+;/; 5100 5101function buildFragment( elems, context, scripts, selection, ignored ) { 5102 var elem, tmp, tag, wrap, attached, j, 5103 fragment = context.createDocumentFragment(), 5104 nodes = [], 5105 i = 0, 5106 l = elems.length; 5107 5108 for ( ; i < l; i++ ) { 5109 elem = elems[ i ]; 5110 5111 if ( elem || elem === 0 ) { 5112 5113 // Add nodes directly 5114 if ( toType( elem ) === "object" ) { 5115 5116 // Support: Android <=4.0 only, PhantomJS 1 only 5117 // push.apply(_, arraylike) throws on ancient WebKit 5118 jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); 5119 5120 // Convert non-html into a text node 5121 } else if ( !rhtml.test( elem ) ) { 5122 nodes.push( context.createTextNode( elem ) ); 5123 5124 // Convert html into DOM nodes 5125 } else { 5126 tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); 5127 5128 // Deserialize a standard representation 5129 tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); 5130 wrap = wrapMap[ tag ] || wrapMap._default; 5131 tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; 5132 5133 // Descend through wrappers to the right content 5134 j = wrap[ 0 ]; 5135 while ( j-- ) { 5136 tmp = tmp.lastChild; 5137 } 5138 5139 // Support: Android <=4.0 only, PhantomJS 1 only 5140 // push.apply(_, arraylike) throws on ancient WebKit 5141 jQuery.merge( nodes, tmp.childNodes ); 5142 5143 // Remember the top-level container 5144 tmp = fragment.firstChild; 5145 5146 // Ensure the created nodes are orphaned (#12392) 5147 tmp.textContent = ""; 5148 } 5149 } 5150 } 5151 5152 // Remove wrapper from fragment 5153 fragment.textContent = ""; 5154 5155 i = 0; 5156 while ( ( elem = nodes[ i++ ] ) ) { 5157 5158 // Skip elements already in the context collection (trac-4087) 5159 if ( selection && jQuery.inArray( elem, selection ) > -1 ) { 5160 if ( ignored ) { 5161 ignored.push( elem ); 5162 } 5163 continue; 5164 } 5165 5166 attached = isAttached( elem ); 5167 5168 // Append to fragment 5169 tmp = getAll( fragment.appendChild( elem ), "script" ); 5170 5171 // Preserve script evaluation history 5172 if ( attached ) { 5173 setGlobalEval( tmp ); 5174 } 5175 5176 // Capture executables 5177 if ( scripts ) { 5178 j = 0; 5179 while ( ( elem = tmp[ j++ ] ) ) { 5180 if ( rscriptType.test( elem.type || "" ) ) { 5181 scripts.push( elem ); 5182 } 5183 } 5184 } 5185 } 5186 5187 return fragment; 5188} 5189 5190 5191var
5191
vendor: 6,183 bytes, lines 5192-5417
5192 rkeyEvent = /^key/, 5193 rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, 5194 rtypenamespace = /^([^.]*)(?:\.(.+)|)/; 5195 5196function returnTrue() { 5197 return true; 5198} 5199 5200function returnFalse() { 5201 return false; 5202} 5203 5204// Support: IE <=9 - 11+ 5205// focus() and blur() are asynchronous, except when they are no-op. 5206// So expect focus to be synchronous when the element is already active, 5207// and blur to be synchronous when the element is not already active. 5208// (focus and blur are always synchronous in other supported browsers, 5209// this just defines when we can count on it). 5210function expectSync( elem, type ) { 5211 return ( elem === safeActiveElement() ) === ( type === "focus" ); 5212} 5213 5214// Support: IE <=9 only 5215// Accessing document.activeElement can throw unexpectedly 5216// https://bugs.jquery.com/ticket/13393 5217function safeActiveElement() { 5218 try { 5219 return document.activeElement; 5220 } catch ( err ) { } 5221} 5222 5223function on( elem, types, selector, data, fn, one ) { 5224 var origFn, type; 5225 5226 // Types can be a map of types/handlers 5227 if ( typeof types === "object" ) { 5228 5229 // ( types-Object, selector, data ) 5230 if ( typeof selector !== "string" ) { 5231 5232 // ( types-Object, data ) 5233 data = data || selector; 5234 selector = undefined; 5235 } 5236 for ( type in types ) { 5237 on( elem, type, selector, data, types[ type ], one ); 5238 } 5239 return elem; 5240 } 5241 5242 if ( data == null && fn == null ) { 5243 5244 // ( types, fn ) 5245 fn = selector; 5246 data = selector = undefined; 5247 } else if ( fn == null ) { 5248 if ( typeof selector === "string" ) { 5249 5250 // ( types, selector, fn ) 5251 fn = data; 5252 data = undefined; 5253 } else { 5254 5255 // ( types, data, fn ) 5256 fn = data; 5257 data = selector; 5258 selector = undefined; 5259 } 5260 } 5261 if ( fn === false ) { 5262 fn = returnFalse; 5263 } else if ( !fn ) { 5264 return elem; 5265 } 5266 5267 if ( one === 1 ) { 5268 origFn = fn; 5269 fn = function( event ) { 5270 5271 // Can use an empty set, since event contains the info 5272 jQuery().off( event ); 5273 return origFn.apply( this, arguments ); 5274 }; 5275 5276 // Use same guid so caller can remove using origFn 5277 fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); 5278 } 5279 return elem.each( function() { 5280 jQuery.event.add( this, types, fn, data, selector ); 5281 } ); 5282} 5283 5284/* 5285 * Helper functions for managing events -- not part of the public interface. 5286 * Props to Dean Edwards' addEvent library for many of the ideas. 5287 */ 5288jQuery.event = { 5289 5290 global: {}, 5291 5292 add: function( elem, types, handler, data, selector ) { 5293 5294 var handleObjIn, eventHandle, tmp, 5295 events, t, handleObj, 5296 special, handlers, type, namespaces, origType, 5297 elemData = dataPriv.get( elem ); 5298 5299 // Only attach events to objects that accept data 5300 if ( !acceptData( elem ) ) { 5301 return; 5302 } 5303 5304 // Caller can pass in an object of custom data in lieu of the handler 5305 if ( handler.handler ) { 5306 handleObjIn = handler; 5307 handler = handleObjIn.handler; 5308 selector = handleObjIn.selector; 5309 } 5310 5311 // Ensure that invalid selectors throw exceptions at attach time 5312 // Evaluate against documentElement in case elem is a non-element node (e.g., document) 5313 if ( selector ) { 5314 jQuery.find.matchesSelector( documentElement, selector ); 5315 } 5316 5317 // Make sure that the handler has a unique ID, used to find/remove it later 5318 if ( !handler.guid ) { 5319 handler.guid = jQuery.guid++; 5320 } 5321 5322 // Init the element's event structure and main handler, if this is the first 5323 if ( !( events = elemData.events ) ) { 5324 events = elemData.events = Object.create( null ); 5325 } 5326 if ( !( eventHandle = elemData.handle ) ) { 5327 eventHandle = elemData.handle = function( e ) { 5328 5329 // Discard the second event of a jQuery.event.trigger() and 5330 // when an event is called after a page has unloaded 5331 return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? 5332 jQuery.event.dispatch.apply( elem, arguments ) : undefined; 5333 }; 5334 } 5335 5336 // Handle multiple events separated by a space 5337 types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; 5338 t = types.length; 5339 while ( t-- ) { 5340 tmp = rtypenamespace.exec( types[ t ] ) || []; 5341 type = origType = tmp[ 1 ]; 5342 namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); 5343 5344 // There *must* be a type, no attaching namespace-only handlers 5345 if ( !type ) { 5346 continue; 5347 } 5348 5349 // If event changes its type, use the special event handlers for the changed type 5350 special = jQuery.event.special[ type ] || {}; 5351 5352 // If selector defined, determine special event api type, otherwise given type 5353 type = ( selector ? special.delegateType : special.bindType ) || type; 5354 5355 // Update special based on newly reset type 5356 special = jQuery.event.special[ type ] || {}; 5357 5358 // handleObj is passed to all event handlers 5359 handleObj = jQuery.extend( { 5360 type: type, 5361 origType: origType, 5362 data: data, 5363 handler: handler, 5364 guid: handler.guid, 5365 selector: selector, 5366 needsContext: selector && jQuery.expr.match.needsContext.test( selector ), 5367 namespace: namespaces.join( "." ) 5368 }, handleObjIn ); 5369 5370 // Init the event handler queue if we're the first 5371 if ( !( handlers = events[ type ] ) ) { 5372 handlers = events[ type ] = []; 5373 handlers.delegateCount = 0; 5374 5375 // Only use addEventListener if the special events handler returns false 5376 if ( !special.setup || 5377 special.setup.call( elem, data, namespaces, eventHandle ) === false ) { 5378 5379 if ( elem.addEventListener ) { 5380 elem.addEventListener( type, eventHandle ); 5381 } 5382 } 5383 } 5384 5385 if ( special.add ) { 5386 special.add.call( elem, handleObj ); 5387 5388 if ( !handleObj.handler.guid ) { 5389 handleObj.handler.guid = handler.guid; 5390 } 5391 } 5392 5393 // Add to the element's handler list, delegates in front 5394 if ( selector ) { 5395 handlers.splice( handlers.delegateCount++, 0, handleObj ); 5396 } else { 5397 handlers.push( handleObj ); 5398 } 5399 5400 // Keep track of which events have ever been used, for event optimization 5401 jQuery.event.global[ type ] = true; 5402 } 5403 5404 }, 5405 5406 // Detach an event or set of events from an element 5407 remove: function( elem, types, handler, selector, mappedTypes ) { 5408 5409 var j, origCount, tmp, 5410 events, t, handleObj, 5411 special, handlers, type, namespaces, origType, 5412 elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); 5413 5414 if ( !elemData || !( events = elemData.events ) ) { 5415 return; 5416 } 5417
vendor: 4,199 bytes, lines 5418-5556
5418 // Once for each type.namespace in types; type may be omitted 5419 types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; 5420 t = types.length; 5421 while ( t-- ) { 5422 tmp = rtypenamespace.exec( types[ t ] ) || []; 5423 type = origType = tmp[ 1 ]; 5424 namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); 5425 5426 // Unbind all events (on this namespace, if provided) for the element 5427 if ( !type ) { 5428 for ( type in events ) { 5429 jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); 5430 } 5431 continue; 5432 } 5433 5434 special = jQuery.event.special[ type ] || {}; 5435 type = ( selector ? special.delegateType : special.bindType ) || type; 5436 handlers = events[ type ] || []; 5437 tmp = tmp[ 2 ] && 5438 new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); 5439 5440 // Remove matching events 5441 origCount = j = handlers.length; 5442 while ( j-- ) { 5443 handleObj = handlers[ j ]; 5444 5445 if ( ( mappedTypes || origType === handleObj.origType ) && 5446 ( !handler || handler.guid === handleObj.guid ) && 5447 ( !tmp || tmp.test( handleObj.namespace ) ) && 5448 ( !selector || selector === handleObj.selector || 5449 selector === "**" && handleObj.selector ) ) { 5450 handlers.splice( j, 1 ); 5451 5452 if ( handleObj.selector ) { 5453 handlers.delegateCount--; 5454 } 5455 if ( special.remove ) { 5456 special.remove.call( elem, handleObj ); 5457 } 5458 } 5459 } 5460 5461 // Remove generic event handler if we removed something and no more handlers exist 5462 // (avoids potential for endless recursion during removal of special event handlers) 5463 if ( origCount && !handlers.length ) { 5464 if ( !special.teardown || 5465 special.teardown.call( elem, namespaces, elemData.handle ) === false ) { 5466 5467 jQuery.removeEvent( elem, type, elemData.handle ); 5468 } 5469 5470 delete events[ type ]; 5471 } 5472 } 5473 5474 // Remove data and the expando if it's no longer used 5475 if ( jQuery.isEmptyObject( events ) ) { 5476 dataPriv.remove( elem, "handle events" ); 5477 } 5478 }, 5479 5480 dispatch: function( nativeEvent ) { 5481 5482 var i, j, ret, matched, handleObj, handlerQueue, 5483 args = new Array( arguments.length ), 5484 5485 // Make a writable jQuery.Event from the native event object 5486 event = jQuery.event.fix( nativeEvent ), 5487 5488 handlers = ( 5489 dataPriv.get( this, "events" ) || Object.create( null ) 5490 )[ event.type ] || [], 5491 special = jQuery.event.special[ event.type ] || {}; 5492 5493 // Use the fix-ed jQuery.Event rather than the (read-only) native event 5494 args[ 0 ] = event; 5495 5496 for ( i = 1; i < arguments.length; i++ ) { 5497 args[ i ] = arguments[ i ]; 5498 } 5499 5500 event.delegateTarget = this; 5501 5502 // Call the preDispatch hook for the mapped type, and let it bail if desired 5503 if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { 5504 return; 5505 } 5506 5507 // Determine handlers 5508 handlerQueue = jQuery.event.handlers.call( this, event, handlers ); 5509 5510 // Run delegates first; they may want to stop propagation beneath us 5511 i = 0; 5512 while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { 5513 event.currentTarget = matched.elem; 5514 5515 j = 0; 5516 while ( ( handleObj = matched.handlers[ j++ ] ) && 5517 !event.isImmediatePropagationStopped() ) { 5518 5519 // If the event is namespaced, then each handler is only invoked if it is 5520 // specially universal or its namespaces are a superset of the event's. 5521 if ( !event.rnamespace || handleObj.namespace === false || 5522 event.rnamespace.test( handleObj.namespace ) ) { 5523 5524 event.handleObj = handleObj; 5525 event.data = handleObj.data; 5526 5527 ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || 5528 handleObj.handler ).apply( matched.elem, args ); 5529 5530 if ( ret !== undefined ) { 5531 if ( ( event.result = ret ) === false ) { 5532 event.preventDefault(); 5533 event.stopPropagation(); 5534 } 5535 } 5536 } 5537 } 5538 } 5539 5540 // Call the postDispatch hook for the mapped type 5541 if ( special.postDispatch ) { 5542 special.postDispatch.call( this, event ); 5543 } 5544 5545 return event.result; 5546 }, 5547 5548 handlers: function( event, handlers ) { 5549 var i, handleObj, sel, matchedHandlers, matchedSelectors, 5550 handlerQueue = [], 5551 delegateCount = handlers.delegateCount, 5552 cur = event.target; 5553 5554 // Find delegate handlers 5555 if ( delegateCount && 5556
vendor: 5,718 bytes, lines 5557-5742
5557 // Support: IE <=9 5558 // Black-hole SVG <use> instance trees (trac-13180) 5559 cur.nodeType && 5560 5561 // Support: Firefox <=42 5562 // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) 5563 // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click 5564 // Support: IE 11 only 5565 // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) 5566 !( event.type === "click" && event.button >= 1 ) ) { 5567 5568 for ( ; cur !== this; cur = cur.parentNode || this ) { 5569 5570 // Don't check non-elements (#13208) 5571 // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) 5572 if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { 5573 matchedHandlers = []; 5574 matchedSelectors = {}; 5575 for ( i = 0; i < delegateCount; i++ ) { 5576 handleObj = handlers[ i ]; 5577 5578 // Don't conflict with Object.prototype properties (#13203) 5579 sel = handleObj.selector + " "; 5580 5581 if ( matchedSelectors[ sel ] === undefined ) { 5582 matchedSelectors[ sel ] = handleObj.needsContext ? 5583 jQuery( sel, this ).index( cur ) > -1 : 5584 jQuery.find( sel, this, null, [ cur ] ).length; 5585 } 5586 if ( matchedSelectors[ sel ] ) { 5587 matchedHandlers.push( handleObj ); 5588 } 5589 } 5590 if ( matchedHandlers.length ) { 5591 handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); 5592 } 5593 } 5594 } 5595 } 5596 5597 // Add the remaining (directly-bound) handlers 5598 cur = this; 5599 if ( delegateCount < handlers.length ) { 5600 handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); 5601 } 5602 5603 return handlerQueue; 5604 }, 5605 5606 addProp: function( name, hook ) { 5607 Object.defineProperty( jQuery.Event.prototype, name, { 5608 enumerable: true, 5609 configurable: true, 5610 5611 get: isFunction( hook ) ? 5612 function() { 5613 if ( this.originalEvent ) { 5614 return hook( this.originalEvent ); 5615 } 5616 } : 5617 function() { 5618 if ( this.originalEvent ) { 5619 return this.originalEvent[ name ]; 5620 } 5621 }, 5622 5623 set: function( value ) { 5624 Object.defineProperty( this, name, { 5625 enumerable: true, 5626 configurable: true, 5627 writable: true, 5628 value: value 5629 } ); 5630 } 5631 } ); 5632 }, 5633 5634 fix: function( originalEvent ) { 5635 return originalEvent[ jQuery.expando ] ? 5636 originalEvent : 5637 new jQuery.Event( originalEvent ); 5638 }, 5639 5640 special: { 5641 load: { 5642 5643 // Prevent triggered image.load events from bubbling to window.load 5644 noBubble: true 5645 }, 5646 click: { 5647 5648 // Utilize native event to ensure correct state for checkable inputs 5649 setup: function( data ) { 5650 5651 // For mutual compressibility with _default, replace `this` access with a local var. 5652 // `|| data` is dead code meant only to preserve the variable through minification. 5653 var el = this || data; 5654 5655 // Claim the first handler 5656 if ( rcheckableType.test( el.type ) && 5657 el.click && nodeName( el, "input" ) ) { 5658 5659 // dataPriv.set( el, "click", ... ) 5660 leverageNative( el, "click", returnTrue ); 5661 } 5662 5663 // Return false to allow normal processing in the caller 5664 return false; 5665 }, 5666 trigger: function( data ) { 5667 5668 // For mutual compressibility with _default, replace `this` access with a local var. 5669 // `|| data` is dead code meant only to preserve the variable through minification. 5670 var el = this || data; 5671 5672 // Force setup before triggering a click 5673 if ( rcheckableType.test( el.type ) && 5674 el.click && nodeName( el, "input" ) ) { 5675 5676 leverageNative( el, "click" ); 5677 } 5678 5679 // Return non-false to allow normal event-path propagation 5680 return true; 5681 }, 5682 5683 // For cross-browser consistency, suppress native .click() on links 5684 // Also prevent it if we're currently inside a leveraged native-event stack 5685 _default: function( event ) { 5686 var target = event.target; 5687 return rcheckableType.test( target.type ) && 5688 target.click && nodeName( target, "input" ) && 5689 dataPriv.get( target, "click" ) || 5690 nodeName( target, "a" ); 5691 } 5692 }, 5693 5694 beforeunload: { 5695 postDispatch: function( event ) { 5696 5697 // Support: Firefox 20+ 5698 // Firefox doesn't alert if the returnValue field is not set. 5699 if ( event.result !== undefined && event.originalEvent ) { 5700 event.originalEvent.returnValue = event.result; 5701 } 5702 } 5703 } 5704 } 5705}; 5706 5707// Ensure the presence of an event listener that handles manually-triggered 5708// synthetic events by interrupting progress until reinvoked in response to 5709// *native* events that it fires directly, ensuring that state changes have 5710// already occurred before other listeners are invoked. 5711function leverageNative( el, type, expectSync ) { 5712 5713 // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add 5714 if ( !expectSync ) { 5715 if ( dataPriv.get( el, type ) === undefined ) { 5716 jQuery.event.add( el, type, returnTrue ); 5717 } 5718 return; 5719 } 5720 5721 // Register the controller as a special universal handler for all event namespaces 5722 dataPriv.set( el, type, false ); 5723 jQuery.event.add( el, type, { 5724 namespace: false, 5725 handler: function( event ) { 5726 var notAsync, result, 5727 saved = dataPriv.get( this, type ); 5728 5729 if ( ( event.isTrigger & 1 ) && this[ type ] ) { 5730 5731 // Interrupt processing of the outer synthetic .trigger()ed event 5732 // Saved data should be false in such cases, but might be a leftover capture object 5733 // from an async native handler (gh-4350) 5734 if ( !saved.length ) { 5735 5736 // Store arguments for use when handling the inner native event 5737 // There will always be at least one argument (an event object), so this array 5738 // will not be confused with a leftover capture object. 5739 saved = slice.call( arguments ); 5740 dataPriv.set( this, type, saved ); 5741 5742 // Trigger the native event and capture its result
5743 // Support: IE <=9 - 11+ 5744 // focus() and blur() are asynchronous 5745 notAsync = expectSync( this, type ); 5746 this[ type ](); 5747 result = dataPriv.get( this, type ); 5748 if ( saved !== result || notAsync ) { 5749 dataPriv.set( this, type, false ); 5750 } else { 5751 result = {}; 5752 } 5753 if ( saved !== result ) { 5754 5755 // Cancel the outer synthetic event 5756 event.stopImmediatePropagation(); 5757 event.preventDefault(); 5758 return result.value; 5759 } 5760 5761 // If this is an inner synthetic event for an event with a bubbling surrogate 5762 // (focus or blur), assume that the surrogate already propagated from triggering the 5763 // native event and prevent that from happening again here. 5764 // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the 5765 // bubbling surrogate propagates *after* the non-bubbling base), but that seems 5766 // less bad than duplication. 5767 } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) { 5768 event.stopPropagation(); 5769 } 5770 5771 // If this is a native event triggered above, everything is now in order 5772 // Fire an inner synthetic event with the original arguments 5773 } else if ( saved.length ) { 5774 5775 // ...and capture the result 5776 dataPriv.set( this, type, { 5777 value: jQuery.event.trigger( 5778 5779 // Support: IE <=9 - 11+ 5780 // Extend with the prototype to reset the above stopImmediatePropagation() 5781 jQuery.extend( saved[ 0 ], jQuery.Event.prototype ), 5782 saved.slice( 1 ), 5783 this 5784 ) 5785 } ); 5786 5787 // Abort handling of the native event 5788 event.stopImmediatePropagation(); 5789 } 5790 } 5791 } ); 5792} 5793 5794jQuery.removeEvent = function( elem, type, handle ) { 5795 5796 // This "if" is needed for plain objects 5797 if ( elem.removeEventListener ) { 5798 elem.removeEventListener( type, handle ); 5799 } 5800}; 5801 5802jQuery.Event = function( src, props ) { 5803 5804 // Allow instantiation without the 'new' keyword 5805 if ( !( this instanceof jQuery.Event ) ) { 5806 return new jQuery.Event( src, props ); 5807 } 5808 5809 // Event object 5810 if ( src && src.type ) { 5811 this.originalEvent = src; 5812 this.type = src.type; 5813 5814 // Events bubbling up the document may have been marked as prevented 5815 // by a handler lower down the tree; reflect the correct value. 5816 this.isDefaultPrevented = src.defaultPrevented || 5817 src.defaultPrevented === undefined && 5818 5819 // Support: Android <=2.3 only 5820 src.returnValue === false ? 5821 returnTrue : 5822 returnFalse; 5823 5824 // Create target properties 5825 // Support: Safari <=6 - 7 only 5826 // Target should not be a text node (#504, #13143) 5827 this.target = ( src.target && src.target.nodeType === 3 ) ? 5828 src.target.parentNode : 5829 src.target; 5830 5831 this.currentTarget = src.currentTarget; 5832 this.relatedTarget = src.relatedTarget; 5833 5834 // Event type 5835 } else { 5836 this.type = src; 5837 } 5838 5839 // Put explicitly provided properties onto the event object 5840 if ( props ) { 5841 jQuery.extend( this, props ); 5842 } 5843 5844 // Create a timestamp if incoming event doesn't have one 5845 this.timeStamp = src && src.timeStamp || Date.now(); 5846 5847 // Mark it as fixed 5848 this[ jQuery.expando ] = true; 5849}; 5850 5851// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding 5852// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html 5853jQuery.Event.prototype = { 5854 constructor: jQuery.Event, 5855 isDefaultPrevented: returnFalse, 5856 isPropagationStopped: returnFalse, 5857 isImmediatePropagationStopped: returnFalse, 5858 isSimulated: false, 5859 5860 preventDefault: function() { 5861 var e = this.originalEvent; 5862 5863 this.isDefaultPrevented = returnTrue; 5864 5865 if ( e && !this.isSimulated ) { 5866 e.preventDefault(); 5867 } 5868 }, 5869 stopPropagation: function() { 5870 var e = this.originalEvent; 5871 5872 this.isPropagationStopped = returnTrue; 5873 5874 if ( e && !this.isSimulated ) { 5875 e.stopPropagation(); 5876 } 5877 }, 5878 stopImmediatePropagation: function() { 5879 var e = this.originalEvent; 5880 5881 this.isImmediatePropagationStopped = returnTrue; 5882 5883 if ( e && !this.isSimulated ) { 5884 e.stopImmediatePropagation(); 5885 } 5886 5887 this.stopPropagation(); 5888 } 5889}; 5890 5891// Includes all common event props including KeyEvent and MouseEvent specific props 5892jQuery.each( { 5893 altKey: true, 5894 bubbles: true, 5895 cancelable: true, 5896 changedTouches: true, 5897 ctrlKey: true, 5898 detail: true, 5899 eventPhase: true, 5900 metaKey: true, 5901 pageX: true, 5902 pageY: true, 5903 shiftKey: true, 5904 view: true, 5905 "char": true, 5906 code: true, 5907 charCode: true, 5908 key: true, 5909 keyCode: true, 5910 button: true, 5911 buttons: true, 5912 clientX: true, 5913 clientY: true, 5914 offsetX: true, 5915 offsetY: true, 5916 pointerId: true, 5917 pointerType: true, 5918 screenX: true, 5919 screenY: true, 5920 targetTouches: true, 5921 toElement: true, 5922 touches: true, 5923 5924 which: function( event ) { 5925 var button = event.button; 5926 5927 // Add which for key events 5928 if ( event.which == null && rkeyEvent.test( event.type ) ) { 5929 return event.charCode != null ? event.charCode : event.keyCode; 5930 } 5931 5932 // Add which for click: 1 === left; 2 === middle; 3 === right 5933 if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) { 5934 if ( button & 1 ) { 5935 return 1; 5936 } 5937 5938 if ( button & 2 ) { 5939 return 3; 5940 } 5941 5942 if ( button & 4 ) { 5943 return 2; 5944 } 5945 5946 return 0; 5947 } 5948 5949 return event.which; 5950 } 5951}, jQuery.event.addProp ); 5952 5953jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) { 5954 jQuery.event.special[ type ] = { 5955 5956 // Utilize native event if possible so blur/focus sequence is correct 5957 setup: function() { 5958 5959 // Claim the first handler 5960 // dataPriv.set( this, "focus", ... ) 5961 // dataPriv.set( this, "blur", ... ) 5962 leverageNative( this, type, expectSync ); 5963 5964 // Return false to allow normal processing in the caller 5965 return false;
5966 }, 5967 trigger: function() { 5968 5969 // Force setup before trigger 5970 leverageNative( this, type ); 5971 5972 // Return non-false to allow normal event-path propagation
vendor: 17,941 bytes, lines 5972-6643
5972 5973 return true; 5974 }, 5975 5976 delegateType: delegateType 5977 }; 5978} ); 5979 5980// Create mouseenter/leave events using mouseover/out and event-time checks 5981// so that event delegation works in jQuery. 5982// Do the same for pointerenter/pointerleave and pointerover/pointerout 5983// 5984// Support: Safari 7 only 5985// Safari sends mouseenter too often; see: 5986// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 5987// for the description of the bug (it existed in older Chrome versions as well). 5988jQuery.each( { 5989 mouseenter: "mouseover", 5990 mouseleave: "mouseout", 5991 pointerenter: "pointerover", 5992 pointerleave: "pointerout" 5993}, function( orig, fix ) { 5994 jQuery.event.special[ orig ] = { 5995 delegateType: fix, 5996 bindType: fix, 5997 5998 handle: function( event ) { 5999 var ret, 6000 target = this, 6001 related = event.relatedTarget, 6002 handleObj = event.handleObj; 6003 6004 // For mouseenter/leave call the handler if related is outside the target. 6005 // NB: No relatedTarget if the mouse left/entered the browser window 6006 if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { 6007 event.type = handleObj.origType; 6008 ret = handleObj.handler.apply( this, arguments ); 6009 event.type = fix; 6010 } 6011 return ret; 6012 } 6013 }; 6014} ); 6015 6016jQuery.fn.extend( { 6017 6018 on: function( types, selector, data, fn ) { 6019 return on( this, types, selector, data, fn ); 6020 }, 6021 one: function( types, selector, data, fn ) { 6022 return on( this, types, selector, data, fn, 1 ); 6023 }, 6024 off: function( types, selector, fn ) { 6025 var handleObj, type; 6026 if ( types && types.preventDefault && types.handleObj ) { 6027 6028 // ( event ) dispatched jQuery.Event 6029 handleObj = types.handleObj; 6030 jQuery( types.delegateTarget ).off( 6031 handleObj.namespace ? 6032 handleObj.origType + "." + handleObj.namespace : 6033 handleObj.origType, 6034 handleObj.selector, 6035 handleObj.handler 6036 ); 6037 return this; 6038 } 6039 if ( typeof types === "object" ) { 6040 6041 // ( types-object [, selector] ) 6042 for ( type in types ) { 6043 this.off( type, selector, types[ type ] ); 6044 } 6045 return this; 6046 } 6047 if ( selector === false || typeof selector === "function" ) { 6048 6049 // ( types [, fn] ) 6050 fn = selector; 6051 selector = undefined; 6052 } 6053 if ( fn === false ) { 6054 fn = returnFalse; 6055 } 6056 return this.each( function() { 6057 jQuery.event.remove( this, types, fn, selector ); 6058 } ); 6059 } 6060} ); 6061 6062 6063var 6064 6065 // Support: IE <=10 - 11, Edge 12 - 13 only 6066 // In IE/Edge using regex groups here causes severe slowdowns. 6067 // See https://connect.microsoft.com/IE/feedback/details/1736512/ 6068 rnoInnerhtml = /<script|<style|<link/i, 6069 6070 // checked="checked" or checked 6071 rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, 6072 rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g; 6073 6074// Prefer a tbody over its parent table for containing new rows 6075function manipulationTarget( elem, content ) { 6076 if ( nodeName( elem, "table" ) && 6077 nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { 6078 6079 return jQuery( elem ).children( "tbody" )[ 0 ] || elem; 6080 } 6081 6082 return elem; 6083} 6084 6085// Replace/restore the type attribute of script elements for safe DOM manipulation 6086function disableScript( elem ) { 6087 elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; 6088 return elem; 6089} 6090function restoreScript( elem ) { 6091 if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) { 6092 elem.type = elem.type.slice( 5 ); 6093 } else { 6094 elem.removeAttribute( "type" ); 6095 } 6096 6097 return elem; 6098} 6099 6100function cloneCopyEvent( src, dest ) { 6101 var i, l, type, pdataOld, udataOld, udataCur, events; 6102 6103 if ( dest.nodeType !== 1 ) { 6104 return; 6105 } 6106 6107 // 1. Copy private data: events, handlers, etc. 6108 if ( dataPriv.hasData( src ) ) { 6109 pdataOld = dataPriv.get( src ); 6110 events = pdataOld.events; 6111 6112 if ( events ) { 6113 dataPriv.remove( dest, "handle events" ); 6114 6115 for ( type in events ) { 6116 for ( i = 0, l = events[ type ].length; i < l; i++ ) { 6117 jQuery.event.add( dest, type, events[ type ][ i ] ); 6118 } 6119 } 6120 } 6121 } 6122 6123 // 2. Copy user data 6124 if ( dataUser.hasData( src ) ) { 6125 udataOld = dataUser.access( src ); 6126 udataCur = jQuery.extend( {}, udataOld ); 6127 6128 dataUser.set( dest, udataCur ); 6129 } 6130} 6131 6132// Fix IE bugs, see support tests 6133function fixInput( src, dest ) { 6134 var nodeName = dest.nodeName.toLowerCase(); 6135 6136 // Fails to persist the checked state of a cloned checkbox or radio button. 6137 if ( nodeName === "input" && rcheckableType.test( src.type ) ) { 6138 dest.checked = src.checked; 6139 6140 // Fails to return the selected option to the default selected state when cloning options 6141 } else if ( nodeName === "input" || nodeName === "textarea" ) { 6142 dest.defaultValue = src.defaultValue; 6143 } 6144} 6145 6146function domManip( collection, args, callback, ignored ) { 6147 6148 // Flatten any nested arrays 6149 args = flat( args ); 6150 6151 var fragment, first, scripts, hasScripts, node, doc, 6152 i = 0, 6153 l = collection.length, 6154 iNoClone = l - 1, 6155 value = args[ 0 ], 6156 valueIsFunction = isFunction( value ); 6157 6158 // We can't cloneNode fragments that contain checked, in WebKit 6159 if ( valueIsFunction || 6160 ( l > 1 && typeof value === "string" && 6161 !support.checkClone && rchecked.test( value ) ) ) { 6162 return collection.each( function( index ) { 6163 var self = collection.eq( index ); 6164 if ( valueIsFunction ) { 6165 args[ 0 ] = value.call( this, index, self.html() ); 6166 } 6167 domManip( self, args, callback, ignored ); 6168 } ); 6169 } 6170 6171 if ( l ) { 6172 fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); 6173 first = fragment.firstChild; 6174 6175 if ( fragment.childNodes.length === 1 ) { 6176 fragment = first; 6177 } 6178 6179 // Require either new content or an interest in ignored elements to invoke the callback 6180 if ( first || ignored ) { 6181 scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); 6182 hasScripts = scripts.length; 6183 6184 // Use the original fragment for the last item 6185 // instead of the first because it can end up 6186 // being emptied incorrectly in certain situations (#8070). 6187 for ( ; i < l; i++ ) { 6188 node = fragment; 6189 6190 if ( i !== iNoClone ) { 6191 node = jQuery.clone( node, true, true ); 6192 6193 // Keep references to cloned scripts for later restoration 6194 if ( hasScripts ) { 6195 6196 // Support: Android <=4.0 only, PhantomJS 1 only 6197 // push.apply(_, arraylike) throws on ancient WebKit 6198 jQuery.merge( scripts, getAll( node, "script" ) ); 6199 } 6200 } 6201 6202 callback.call( collection[ i ], node, i ); 6203 } 6204 6205 if ( hasScripts ) { 6206 doc = scripts[ scripts.length - 1 ].ownerDocument; 6207 6208 // Reenable scripts 6209 jQuery.map( scripts, restoreScript ); 6210 6211 // Evaluate executable scripts on first document insertion 6212 for ( i = 0; i < hasScripts; i++ ) { 6213 node = scripts[ i ]; 6214 if ( rscriptType.test( node.type || "" ) && 6215 !dataPriv.access( node, "globalEval" ) && 6216 jQuery.contains( doc, node ) ) { 6217 6218 if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) { 6219 6220 // Optional AJAX dependency, but won't run scripts if not present 6221 if ( jQuery._evalUrl && !node.noModule ) { 6222 jQuery._evalUrl( node.src, { 6223 nonce: node.nonce || node.getAttribute( "nonce" ) 6224 }, doc ); 6225 } 6226 } else { 6227 DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc ); 6228 } 6229 } 6230 } 6231 } 6232 } 6233 } 6234 6235 return collection; 6236} 6237 6238function remove( elem, selector, keepData ) { 6239 var node, 6240 nodes = selector ? jQuery.filter( selector, elem ) : elem, 6241 i = 0; 6242 6243 for ( ; ( node = nodes[ i ] ) != null; i++ ) { 6244 if ( !keepData && node.nodeType === 1 ) { 6245 jQuery.cleanData( getAll( node ) ); 6246 } 6247 6248 if ( node.parentNode ) { 6249 if ( keepData && isAttached( node ) ) { 6250 setGlobalEval( getAll( node, "script" ) ); 6251 } 6252 node.parentNode.removeChild( node ); 6253 } 6254 } 6255 6256 return elem; 6257} 6258 6259jQuery.extend( { 6260 htmlPrefilter: function( html ) { 6261 return html; 6262 }, 6263 6264 clone: function( elem, dataAndEvents, deepDataAndEvents ) { 6265 var i, l, srcElements, destElements, 6266 clone = elem.cloneNode( true ), 6267 inPage = isAttached( elem ); 6268 6269 // Fix IE cloning issues 6270 if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && 6271 !jQuery.isXMLDoc( elem ) ) { 6272 6273 // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 6274 destElements = getAll( clone ); 6275 srcElements = getAll( elem ); 6276 6277 for ( i = 0, l = srcElements.length; i < l; i++ ) { 6278 fixInput( srcElements[ i ], destElements[ i ] ); 6279 } 6280 } 6281 6282 // Copy the events from the original to the clone 6283 if ( dataAndEvents ) { 6284 if ( deepDataAndEvents ) { 6285 srcElements = srcElements || getAll( elem ); 6286 destElements = destElements || getAll( clone ); 6287 6288 for ( i = 0, l = srcElements.length; i < l; i++ ) { 6289 cloneCopyEvent( srcElements[ i ], destElements[ i ] ); 6290 } 6291 } else { 6292 cloneCopyEvent( elem, clone ); 6293 } 6294 } 6295 6296 // Preserve script evaluation history 6297 destElements = getAll( clone, "script" ); 6298 if ( destElements.length > 0 ) { 6299 setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); 6300 } 6301 6302 // Return the cloned set 6303 return clone; 6304 }, 6305 6306 cleanData: function( elems ) { 6307 var data, elem, type, 6308 special = jQuery.event.special, 6309 i = 0; 6310 6311 for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { 6312 if ( acceptData( elem ) ) { 6313 if ( ( data = elem[ dataPriv.expando ] ) ) { 6314 if ( data.events ) { 6315 for ( type in data.events ) { 6316 if ( special[ type ] ) { 6317 jQuery.event.remove( elem, type ); 6318 6319 // This is a shortcut to avoid jQuery.event.remove's overhead 6320 } else { 6321 jQuery.removeEvent( elem, type, data.handle ); 6322 } 6323 } 6324 } 6325 6326 // Support: Chrome <=35 - 45+ 6327 // Assign undefined instead of using delete, see Data#remove 6328 elem[ dataPriv.expando ] = undefined; 6329 } 6330 if ( elem[ dataUser.expando ] ) { 6331 6332 // Support: Chrome <=35 - 45+ 6333 // Assign undefined instead of using delete, see Data#remove 6334 elem[ dataUser.expando ] = undefined; 6335 } 6336 } 6337 } 6338 } 6339} ); 6340 6341jQuery.fn.extend( { 6342 detach: function( selector ) { 6343 return remove( this, selector, true ); 6344 }, 6345 6346 remove: function( selector ) { 6347 return remove( this, selector ); 6348 }, 6349 6350 text: function( value ) { 6351 return access( this, function( value ) { 6352 return value === undefined ? 6353 jQuery.text( this ) : 6354 this.empty().each( function() { 6355 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { 6356 this.textContent = value; 6357 } 6358 } ); 6359 }, null, value, arguments.length ); 6360 }, 6361 6362 append: function() { 6363 return domManip( this, arguments, function( elem ) { 6364 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { 6365 var target = manipulationTarget( this, elem ); 6366 target.appendChild( elem ); 6367 } 6368 } ); 6369 }, 6370 6371 prepend: function() { 6372 return domManip( this, arguments, function( elem ) { 6373 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { 6374 var target = manipulationTarget( this, elem ); 6375 target.insertBefore( elem, target.firstChild ); 6376 } 6377 } ); 6378 }, 6379 6380 before: function() { 6381 return domManip( this, arguments, function( elem ) { 6382 if ( this.parentNode ) { 6383 this.parentNode.insertBefore( elem, this ); 6384 } 6385 } ); 6386 }, 6387 6388 after: function() { 6389 return domManip( this, arguments, function( elem ) { 6390 if ( this.parentNode ) { 6391 this.parentNode.insertBefore( elem, this.nextSibling ); 6392 } 6393 } ); 6394 }, 6395 6396 empty: function() { 6397 var elem, 6398 i = 0; 6399 6400 for ( ; ( elem = this[ i ] ) != null; i++ ) { 6401 if ( elem.nodeType === 1 ) { 6402 6403 // Prevent memory leaks 6404 jQuery.cleanData( getAll( elem, false ) ); 6405 6406 // Remove any remaining nodes 6407 elem.textContent = ""; 6408 } 6409 } 6410 6411 return this; 6412 }, 6413 6414 clone: function( dataAndEvents, deepDataAndEvents ) { 6415 dataAndEvents = dataAndEvents == null ? false : dataAndEvents; 6416 deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; 6417 6418 return this.map( function() { 6419 return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); 6420 } ); 6421 }, 6422 6423 html: function( value ) { 6424 return access( this, function( value ) { 6425 var elem = this[ 0 ] || {}, 6426 i = 0, 6427 l = this.length; 6428 6429 if ( value === undefined && elem.nodeType === 1 ) { 6430 return elem.innerHTML; 6431 } 6432 6433 // See if we can take a shortcut and just use innerHTML 6434 if ( typeof value === "string" && !rnoInnerhtml.test( value ) && 6435 !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { 6436 6437 value = jQuery.htmlPrefilter( value ); 6438 6439 try { 6440 for ( ; i < l; i++ ) { 6441 elem = this[ i ] || {}; 6442 6443 // Remove element nodes and prevent memory leaks 6444 if ( elem.nodeType === 1 ) { 6445 jQuery.cleanData( getAll( elem, false ) ); 6446 elem.innerHTML = value; 6447 } 6448 } 6449 6450 elem = 0; 6451 6452 // If using innerHTML throws an exception, use the fallback method 6453 } catch ( e ) {} 6454 } 6455 6456 if ( elem ) { 6457 this.empty().append( value ); 6458 } 6459 }, null, value, arguments.length ); 6460 }, 6461 6462 replaceWith: function() { 6463 var ignored = []; 6464 6465 // Make the changes, replacing each non-ignored context element with the new content 6466 return domManip( this, arguments, function( elem ) { 6467 var parent = this.parentNode; 6468 6469 if ( jQuery.inArray( this, ignored ) < 0 ) { 6470 jQuery.cleanData( getAll( this ) ); 6471 if ( parent ) { 6472 parent.replaceChild( elem, this ); 6473 } 6474 } 6475 6476 // Force callback invocation 6477 }, ignored ); 6478 } 6479} ); 6480 6481jQuery.each( { 6482 appendTo: "append", 6483 prependTo: "prepend", 6484 insertBefore: "before", 6485 insertAfter: "after", 6486 replaceAll: "replaceWith" 6487}, function( name, original ) { 6488 jQuery.fn[ name ] = function( selector ) { 6489 var elems, 6490 ret = [], 6491 insert = jQuery( selector ), 6492 last = insert.length - 1, 6493 i = 0; 6494 6495 for ( ; i <= last; i++ ) { 6496 elems = i === last ? this : this.clone( true ); 6497 jQuery( insert[ i ] )[ original ]( elems ); 6498 6499 // Support: Android <=4.0 only, PhantomJS 1 only 6500 // .get() because push.apply(_, arraylike) throws on ancient WebKit 6501 push.apply( ret, elems.get() ); 6502 } 6503 6504 return this.pushStack( ret ); 6505 }; 6506} ); 6507var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); 6508 6509var getStyles = function( elem ) { 6510 6511 // Support: IE <=11 only, Firefox <=30 (#15098, #14150) 6512 // IE throws on elements created in popups 6513 // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" 6514 var view = elem.ownerDocument.defaultView; 6515 6516 if ( !view || !view.opener ) { 6517 view = window; 6518 } 6519 6520 return view.getComputedStyle( elem ); 6521 }; 6522 6523var swap = function( elem, options, callback ) { 6524 var ret, name, 6525 old = {}; 6526 6527 // Remember the old values, and insert the new ones 6528 for ( name in options ) { 6529 old[ name ] = elem.style[ name ]; 6530 elem.style[ name ] = options[ name ]; 6531 } 6532 6533 ret = callback.call( elem ); 6534 6535 // Revert the old values 6536 for ( name in options ) { 6537 elem.style[ name ] = old[ name ]; 6538 } 6539 6540 return ret; 6541}; 6542 6543 6544var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); 6545 6546 6547 6548( function() { 6549 6550 // Executing both pixelPosition & boxSizingReliable tests require only one layout 6551 // so they're executed at the same time to save the second computation. 6552 function computeStyleTests() { 6553 6554 // This is a singleton, we need to execute it only once 6555 if ( !div ) { 6556 return; 6557 } 6558 6559 container.style.cssText = "position:absolute;left:-11111px;width:60px;" + 6560 "margin-top:1px;padding:0;border:0"; 6561 div.style.cssText = 6562 "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + 6563 "margin:auto;border:1px;padding:1px;" + 6564 "width:60%;top:1%"; 6565 documentElement.appendChild( container ).appendChild( div ); 6566 6567 var divStyle = window.getComputedStyle( div ); 6568 pixelPositionVal = divStyle.top !== "1%"; 6569 6570 // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 6571 reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12; 6572 6573 // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 6574 // Some styles come back with percentage values, even though they shouldn't 6575 div.style.right = "60%"; 6576 pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36; 6577 6578 // Support: IE 9 - 11 only 6579 // Detect misreporting of content dimensions for box-sizing:border-box elements 6580 boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36; 6581 6582 // Support: IE 9 only 6583 // Detect overflow:scroll screwiness (gh-3699) 6584 // Support: Chrome <=64 6585 // Don't get tricked when zoom affects offsetWidth (gh-4029) 6586 div.style.position = "absolute"; 6587 scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12; 6588 6589 documentElement.removeChild( container ); 6590 6591 // Nullify the div so it wouldn't be stored in the memory and 6592 // it will also be a sign that checks already performed 6593 div = null; 6594 } 6595 6596 function roundPixelMeasures( measure ) { 6597 return Math.round( parseFloat( measure ) ); 6598 } 6599 6600 var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, 6601 reliableTrDimensionsVal, reliableMarginLeftVal, 6602 container = document.createElement( "div" ), 6603 div = document.createElement( "div" ); 6604 6605 // Finish early in limited (non-browser) environments 6606 if ( !div.style ) { 6607 return; 6608 } 6609 6610 // Support: IE <=9 - 11 only 6611 // Style of cloned element affects source element cloned (#8908) 6612 div.style.backgroundClip = "content-box"; 6613 div.cloneNode( true ).style.backgroundClip = ""; 6614 support.clearCloneStyle = div.style.backgroundClip === "content-box"; 6615 6616 jQuery.extend( support, { 6617 boxSizingReliable: function() { 6618 computeStyleTests(); 6619 return boxSizingReliableVal; 6620 }, 6621 pixelBoxStyles: function() { 6622 computeStyleTests(); 6623 return pixelBoxStylesVal; 6624 }, 6625 pixelPosition: function() { 6626 computeStyleTests(); 6627 return pixelPositionVal; 6628 }, 6629 reliableMarginLeft: function() { 6630 computeStyleTests(); 6631 return reliableMarginLeftVal; 6632 }, 6633 scrollboxSize: function() { 6634 computeStyleTests(); 6635 return scrollboxSizeVal; 6636 }, 6637 6638 // Support: IE 9 - 11+, Edge 15 - 18+ 6639 // IE/Edge misreport `getComputedStyle` of table rows with width/height 6640 // set in CSS while `offset*` properties report correct values. 6641 // Behavior in IE 9 is more subtle than in newer versions & it passes 6642 // some versions of this test; make sure not to make it pass there! 6643
6643reliableTrDimensions: function() { 6644 var table, tr, trChild, trStyle; 6645 if ( reliableTrDimensionsVal == null ) { 6646 table = document.createElement( "table" ); 6647 tr = document.createElement( "tr" ); 6648 trChild = document.createElement( "div" ); 6649 6650 table.style.cssText = "position:absolute;left:-11111px"; 6651 tr.style.height = "1px"; 6652 trChild.style.height = "9px"; 6653 6654 documentElement 6655 .appendChild( table ) 6656 .appendChild( tr ) 6657 .appendChild( trChild ); 6658 6659 trStyle = window.getComputedStyle( tr ); 6660 reliableTrDimensionsVal = parseInt( trStyle.height ) > 3
vendor: 13,297 bytes, lines 6660-7124
6660; 6661 6662 documentElement.removeChild( table ); 6663 } 6664 return reliableTrDimensionsVal; 6665 } 6666 } ); 6667} )(); 6668 6669 6670function curCSS( elem, name, computed ) { 6671 var width, minWidth, maxWidth, ret, 6672 6673 // Support: Firefox 51+ 6674 // Retrieving style before computed somehow 6675 // fixes an issue with getting wrong values 6676 // on detached elements 6677 style = elem.style; 6678 6679 computed = computed || getStyles( elem ); 6680 6681 // getPropertyValue is needed for: 6682 // .css('filter') (IE 9 only, #12537) 6683 // .css('--customProperty) (#3144) 6684 if ( computed ) { 6685 ret = computed.getPropertyValue( name ) || computed[ name ]; 6686 6687 if ( ret === "" && !isAttached( elem ) ) { 6688 ret = jQuery.style( elem, name ); 6689 } 6690 6691 // A tribute to the "awesome hack by Dean Edwards" 6692 // Android Browser returns percentage for some values, 6693 // but width seems to be reliably pixels. 6694 // This is against the CSSOM draft spec: 6695 // https://drafts.csswg.org/cssom/#resolved-values 6696 if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) { 6697 6698 // Remember the original values 6699 width = style.width; 6700 minWidth = style.minWidth; 6701 maxWidth = style.maxWidth; 6702 6703 // Put in the new values to get a computed value out 6704 style.minWidth = style.maxWidth = style.width = ret; 6705 ret = computed.width; 6706 6707 // Revert the changed values 6708 style.width = width; 6709 style.minWidth = minWidth; 6710 style.maxWidth = maxWidth; 6711 } 6712 } 6713 6714 return ret !== undefined ? 6715 6716 // Support: IE <=9 - 11 only 6717 // IE returns zIndex value as an integer. 6718 ret + "" : 6719 ret; 6720} 6721 6722 6723function addGetHookIf( conditionFn, hookFn ) { 6724 6725 // Define the hook, we'll check on the first run if it's really needed. 6726 return { 6727 get: function() { 6728 if ( conditionFn() ) { 6729 6730 // Hook not needed (or it's not possible to use it due 6731 // to missing dependency), remove it. 6732 delete this.get; 6733 return; 6734 } 6735 6736 // Hook needed; redefine it so that the support test is not executed again. 6737 return ( this.get = hookFn ).apply( this, arguments ); 6738 } 6739 }; 6740} 6741 6742 6743var cssPrefixes = [ "Webkit", "Moz", "ms" ], 6744 emptyStyle = document.createElement( "div" ).style, 6745 vendorProps = {}; 6746 6747// Return a vendor-prefixed property or undefined 6748function vendorPropName( name ) { 6749 6750 // Check for vendor prefixed names 6751 var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), 6752 i = cssPrefixes.length; 6753 6754 while ( i-- ) { 6755 name = cssPrefixes[ i ] + capName; 6756 if ( name in emptyStyle ) { 6757 return name; 6758 } 6759 } 6760} 6761 6762// Return a potentially-mapped jQuery.cssProps or vendor prefixed property 6763function finalPropName( name ) { 6764 var final = jQuery.cssProps[ name ] || vendorProps[ name ]; 6765 6766 if ( final ) { 6767 return final; 6768 } 6769 if ( name in emptyStyle ) { 6770 return name; 6771 } 6772 return vendorProps[ name ] = vendorPropName( name ) || name; 6773} 6774 6775 6776var 6777 6778 // Swappable if display is none or starts with table 6779 // except "table", "table-cell", or "table-caption" 6780 // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display 6781 rdisplayswap = /^(none|table(?!-c[ea]).+)/, 6782 rcustomProp = /^--/, 6783 cssShow = { position: "absolute", visibility: "hidden", display: "block" }, 6784 cssNormalTransform = { 6785 letterSpacing: "0", 6786 fontWeight: "400" 6787 }; 6788 6789function setPositiveNumber( _elem, value, subtract ) { 6790 6791 // Any relative (+/-) values have already been 6792 // normalized at this point 6793 var matches = rcssNum.exec( value ); 6794 return matches ? 6795 6796 // Guard against undefined "subtract", e.g., when used as in cssHooks 6797 Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : 6798 value; 6799} 6800 6801function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { 6802 var i = dimension === "width" ? 1 : 0, 6803 extra = 0, 6804 delta = 0; 6805 6806 // Adjustment may not be necessary 6807 if ( box === ( isBorderBox ? "border" : "content" ) ) { 6808 return 0; 6809 } 6810 6811 for ( ; i < 4; i += 2 ) { 6812 6813 // Both box models exclude margin 6814 if ( box === "margin" ) { 6815 delta += jQuery.css( elem, box + cssExpand[ i ], true, styles ); 6816 } 6817 6818 // If we get here with a content-box, we're seeking "padding" or "border" or "margin" 6819 if ( !isBorderBox ) { 6820 6821 // Add padding 6822 delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); 6823 6824 // For "border" or "margin", add border 6825 if ( box !== "padding" ) { 6826 delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); 6827 6828 // But still keep track of it otherwise 6829 } else { 6830 extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); 6831 } 6832 6833 // If we get here with a border-box (content + padding + border), we're seeking "content" or 6834 // "padding" or "margin" 6835 } else { 6836 6837 // For "content", subtract padding 6838 if ( box === "content" ) { 6839 delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); 6840 } 6841 6842 // For "content" or "padding", subtract border 6843 if ( box !== "margin" ) { 6844 delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); 6845 } 6846 } 6847 } 6848 6849 // Account for positive content-box scroll gutter when requested by providing computedVal 6850 if ( !isBorderBox && computedVal >= 0 ) { 6851 6852 // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border 6853 // Assuming integer scroll gutter, subtract the rest and round down 6854 delta += Math.max( 0, Math.ceil( 6855 elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - 6856 computedVal - 6857 delta - 6858 extra - 6859 0.5 6860 6861 // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter 6862 // Use an explicit zero to avoid NaN (gh-3964) 6863 ) ) || 0; 6864 } 6865 6866 return delta; 6867} 6868 6869function getWidthOrHeight( elem, dimension, extra ) { 6870 6871 // Start with computed style 6872 var styles = getStyles( elem ), 6873 6874 // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322). 6875 // Fake content-box until we know it's needed to know the true value. 6876 boxSizingNeeded = !support.boxSizingReliable() || extra, 6877 isBorderBox = boxSizingNeeded && 6878 jQuery.css( elem, "boxSizing", false, styles ) === "border-box", 6879 valueIsBorderBox = isBorderBox, 6880 6881 val = curCSS( elem, dimension, styles ), 6882 offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ); 6883 6884 // Support: Firefox <=54 6885 // Return a confounding non-pixel value or feign ignorance, as appropriate. 6886 if ( rnumnonpx.test( val ) ) { 6887 if ( !extra ) { 6888 return val; 6889 } 6890 val = "auto"; 6891 } 6892 6893 6894 // Support: IE 9 - 11 only 6895 // Use offsetWidth/offsetHeight for when box sizing is unreliable. 6896 // In those cases, the computed value can be trusted to be border-box. 6897 if ( ( !support.boxSizingReliable() && isBorderBox || 6898 6899 // Support: IE 10 - 11+, Edge 15 - 18+ 6900 // IE/Edge misreport `getComputedStyle` of table rows with width/height 6901 // set in CSS while `offset*` properties report correct values. 6902 // Interestingly, in some cases IE 9 doesn't suffer from this issue. 6903 !support.reliableTrDimensions() && nodeName( elem, "tr" ) || 6904 6905 // Fall back to offsetWidth/offsetHeight when value is "auto" 6906 // This happens for inline elements with no explicit setting (gh-3571) 6907 val === "auto" || 6908 6909 // Support: Android <=4.1 - 4.3 only 6910 // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) 6911 !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) && 6912 6913 // Make sure the element is visible & connected 6914 elem.getClientRects().length ) { 6915 6916 isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; 6917 6918 // Where available, offsetWidth/offsetHeight approximate border box dimensions. 6919 // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the 6920 // retrieved value as a content box dimension. 6921 valueIsBorderBox = offsetProp in elem; 6922 if ( valueIsBorderBox ) { 6923 val = elem[ offsetProp ]; 6924 } 6925 } 6926 6927 // Normalize "" and auto 6928 val = parseFloat( val ) || 0; 6929 6930 // Adjust for the element's box model 6931 return ( val + 6932 boxModelAdjustment( 6933 elem, 6934 dimension, 6935 extra || ( isBorderBox ? "border" : "content" ), 6936 valueIsBorderBox, 6937 styles, 6938 6939 // Provide the current computed size to request scroll gutter calculation (gh-3589) 6940 val 6941 ) 6942 ) + "px"; 6943} 6944 6945jQuery.extend( { 6946 6947 // Add in style property hooks for overriding the default 6948 // behavior of getting and setting a style property 6949 cssHooks: { 6950 opacity: { 6951 get: function( elem, computed ) { 6952 if ( computed ) { 6953 6954 // We should always get a number back from opacity 6955 var ret = curCSS( elem, "opacity" ); 6956 return ret === "" ? "1" : ret; 6957 } 6958 } 6959 } 6960 }, 6961 6962 // Don't automatically add "px" to these possibly-unitless properties 6963 cssNumber: { 6964 "animationIterationCount": true, 6965 "columnCount": true, 6966 "fillOpacity": true, 6967 "flexGrow": true, 6968 "flexShrink": true, 6969 "fontWeight": true, 6970 "gridArea": true, 6971 "gridColumn": true, 6972 "gridColumnEnd": true, 6973 "gridColumnStart": true, 6974 "gridRow": true, 6975 "gridRowEnd": true, 6976 "gridRowStart": true, 6977 "lineHeight": true, 6978 "opacity": true, 6979 "order": true, 6980 "orphans": true, 6981 "widows": true, 6982 "zIndex": true, 6983 "zoom": true 6984 }, 6985 6986 // Add in properties whose names you wish to fix before 6987 // setting or getting the value 6988 cssProps: {}, 6989 6990 // Get and set the style property on a DOM Node 6991 style: function( elem, name, value, extra ) { 6992 6993 // Don't set styles on text and comment nodes 6994 if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { 6995 return; 6996 } 6997 6998 // Make sure that we're working with the right name 6999 var ret, type, hooks, 7000 origName = camelCase( name ), 7001 isCustomProp = rcustomProp.test( name ), 7002 style = elem.style; 7003 7004 // Make sure that we're working with the right name. We don't 7005 // want to query the value if it is a CSS custom property 7006 // since they are user-defined. 7007 if ( !isCustomProp ) { 7008 name = finalPropName( origName ); 7009 } 7010 7011 // Gets hook for the prefixed version, then unprefixed version 7012 hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; 7013 7014 // Check if we're setting a value 7015 if ( value !== undefined ) { 7016 type = typeof value; 7017 7018 // Convert "+=" or "-=" to relative numbers (#7345) 7019 if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { 7020 value = adjustCSS( elem, name, ret ); 7021 7022 // Fixes bug #9237 7023 type = "number"; 7024 } 7025 7026 // Make sure that null and NaN values aren't set (#7116) 7027 if ( value == null || value !== value ) { 7028 return; 7029 } 7030 7031 // If a number was passed in, add the unit (except for certain CSS properties) 7032 // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append 7033 // "px" to a few hardcoded values. 7034 if ( type === "number" && !isCustomProp ) { 7035 value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); 7036 } 7037 7038 // background-* props affect original clone's values 7039 if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { 7040 style[ name ] = "inherit"; 7041 } 7042 7043 // If a hook was provided, use that value, otherwise just set the specified value 7044 if ( !hooks || !( "set" in hooks ) || 7045 ( value = hooks.set( elem, value, extra ) ) !== undefined ) { 7046 7047 if ( isCustomProp ) { 7048 style.setProperty( name, value ); 7049 } else { 7050 style[ name ] = value; 7051 } 7052 } 7053 7054 } else { 7055 7056 // If a hook was provided get the non-computed value from there 7057 if ( hooks && "get" in hooks && 7058 ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { 7059 7060 return ret; 7061 } 7062 7063 // Otherwise just get the value from the style object 7064 return style[ name ]; 7065 } 7066 }, 7067 7068 css: function( elem, name, extra, styles ) { 7069 var val, num, hooks, 7070 origName = camelCase( name ), 7071 isCustomProp = rcustomProp.test( name ); 7072 7073 // Make sure that we're working with the right name. We don't 7074 // want to modify the value if it is a CSS custom property 7075 // since they are user-defined. 7076 if ( !isCustomProp ) { 7077 name = finalPropName( origName ); 7078 } 7079 7080 // Try prefixed name followed by the unprefixed name 7081 hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; 7082 7083 // If a hook was provided get the computed value from there 7084 if ( hooks && "get" in hooks ) { 7085 val = hooks.get( elem, true, extra ); 7086 } 7087 7088 // Otherwise, if a way to get the computed value exists, use that 7089 if ( val === undefined ) { 7090 val = curCSS( elem, name, styles ); 7091 } 7092 7093 // Convert "normal" to computed value 7094 if ( val === "normal" && name in cssNormalTransform ) { 7095 val = cssNormalTransform[ name ]; 7096 } 7097 7098 // Make numeric if forced or a qualifier was provided and val looks numeric 7099 if ( extra === "" || extra ) { 7100 num = parseFloat( val ); 7101 return extra === true || isFinite( num ) ? num || 0 : val; 7102 } 7103 7104 return val; 7105 } 7106} ); 7107 7108jQuery.each( [ "height", "width" ], function( _i, dimension ) { 7109 jQuery.cssHooks[ dimension ] = { 7110 get: function( elem, computed, extra ) { 7111 if ( computed ) { 7112 7113 // Certain elements can have dimension info if we invisibly show them 7114 // but it must have a current display style that would benefit 7115 return rdisplayswap.test( jQuery.css( elem, "display" ) ) && 7116 7117 // Support: Safari 8+ 7118 // Table columns in Safari have non-zero offsetWidth & zero 7119 // getBoundingClientRect().width unless display is changed. 7120 // Support: IE <=11 only 7121 // Running getBoundingClientRect on a disconnected node 7122 // in IE throws an error. 7123 ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? 7124
vendor: 5,577 bytes, lines 7124-7326
7124 swap( elem, cssShow, function() { 7125 return getWidthOrHeight( elem, dimension, extra ); 7126 } ) : 7127 getWidthOrHeight( elem, dimension, extra ); 7128 } 7129 }, 7130 7131 set: function( elem, value, extra ) { 7132 var matches, 7133 styles = getStyles( elem ), 7134 7135 // Only read styles.position if the test has a chance to fail 7136 // to avoid forcing a reflow. 7137 scrollboxSizeBuggy = !support.scrollboxSize() && 7138 styles.position === "absolute", 7139 7140 // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991) 7141 boxSizingNeeded = scrollboxSizeBuggy || extra, 7142 isBorderBox = boxSizingNeeded && 7143 jQuery.css( elem, "boxSizing", false, styles ) === "border-box", 7144 subtract = extra ? 7145 boxModelAdjustment( 7146 elem, 7147 dimension, 7148 extra, 7149 isBorderBox, 7150 styles 7151 ) : 7152 0; 7153 7154 // Account for unreliable border-box dimensions by comparing offset* to computed and 7155 // faking a content-box to get border and padding (gh-3699) 7156 if ( isBorderBox && scrollboxSizeBuggy ) { 7157 subtract -= Math.ceil( 7158 elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - 7159 parseFloat( styles[ dimension ] ) - 7160 boxModelAdjustment( elem, dimension, "border", false, styles ) - 7161 0.5 7162 ); 7163 } 7164 7165 // Convert to pixels if value adjustment is needed 7166 if ( subtract && ( matches = rcssNum.exec( value ) ) && 7167 ( matches[ 3 ] || "px" ) !== "px" ) { 7168 7169 elem.style[ dimension ] = value; 7170 value = jQuery.css( elem, dimension ); 7171 } 7172 7173 return setPositiveNumber( elem, value, subtract ); 7174 } 7175 }; 7176} ); 7177 7178jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, 7179 function( elem, computed ) { 7180 if ( computed ) { 7181 return ( parseFloat( curCSS( elem, "marginLeft" ) ) || 7182 elem.getBoundingClientRect().left - 7183 swap( elem, { marginLeft: 0 }, function() { 7184 return elem.getBoundingClientRect().left; 7185 } ) 7186 ) + "px"; 7187 } 7188 } 7189); 7190 7191// These hooks are used by animate to expand properties 7192jQuery.each( { 7193 margin: "", 7194 padding: "", 7195 border: "Width" 7196}, function( prefix, suffix ) { 7197 jQuery.cssHooks[ prefix + suffix ] = { 7198 expand: function( value ) { 7199 var i = 0, 7200 expanded = {}, 7201 7202 // Assumes a single number if not a string 7203 parts = typeof value === "string" ? value.split( " " ) : [ value ]; 7204 7205 for ( ; i < 4; i++ ) { 7206 expanded[ prefix + cssExpand[ i ] + suffix ] = 7207 parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; 7208 } 7209 7210 return expanded; 7211 } 7212 }; 7213 7214 if ( prefix !== "margin" ) { 7215 jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; 7216 } 7217} ); 7218 7219jQuery.fn.extend( { 7220 css: function( name, value ) { 7221 return access( this, function( elem, name, value ) { 7222 var styles, len, 7223 map = {}, 7224 i = 0; 7225 7226 if ( Array.isArray( name ) ) { 7227 styles = getStyles( elem ); 7228 len = name.length; 7229 7230 for ( ; i < len; i++ ) { 7231 map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); 7232 } 7233 7234 return map; 7235 } 7236 7237 return value !== undefined ? 7238 jQuery.style( elem, name, value ) : 7239 jQuery.css( elem, name ); 7240 }, name, value, arguments.length > 1 ); 7241 } 7242} ); 7243 7244 7245function Tween( elem, options, prop, end, easing ) { 7246 return new Tween.prototype.init( elem, options, prop, end, easing ); 7247} 7248jQuery.Tween = Tween; 7249 7250Tween.prototype = { 7251 constructor: Tween, 7252 init: function( elem, options, prop, end, easing, unit ) { 7253 this.elem = elem; 7254 this.prop = prop; 7255 this.easing = easing || jQuery.easing._default; 7256 this.options = options; 7257 this.start = this.now = this.cur(); 7258 this.end = end; 7259 this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); 7260 }, 7261 cur: function() { 7262 var hooks = Tween.propHooks[ this.prop ]; 7263 7264 return hooks && hooks.get ? 7265 hooks.get( this ) : 7266 Tween.propHooks._default.get( this ); 7267 }, 7268 run: function( percent ) { 7269 var eased, 7270 hooks = Tween.propHooks[ this.prop ]; 7271 7272 if ( this.options.duration ) { 7273 this.pos = eased = jQuery.easing[ this.easing ]( 7274 percent, this.options.duration * percent, 0, 1, this.options.duration 7275 ); 7276 } else { 7277 this.pos = eased = percent; 7278 } 7279 this.now = ( this.end - this.start ) * eased + this.start; 7280 7281 if ( this.options.step ) { 7282 this.options.step.call( this.elem, this.now, this ); 7283 } 7284 7285 if ( hooks && hooks.set ) { 7286 hooks.set( this ); 7287 } else { 7288 Tween.propHooks._default.set( this ); 7289 } 7290 return this; 7291 } 7292}; 7293 7294Tween.prototype.init.prototype = Tween.prototype; 7295 7296Tween.propHooks = { 7297 _default: { 7298 get: function( tween ) { 7299 var result; 7300 7301 // Use a property on the element directly when it is not a DOM element, 7302 // or when there is no matching style property that exists. 7303 if ( tween.elem.nodeType !== 1 || 7304 tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { 7305 return tween.elem[ tween.prop ]; 7306 } 7307 7308 // Passing an empty string as a 3rd parameter to .css will automatically 7309 // attempt a parseFloat and fallback to a string if the parse fails. 7310 // Simple values such as "10px" are parsed to Float; 7311 // complex values such as "rotate(1rad)" are returned as-is. 7312 result = jQuery.css( tween.elem, tween.prop, "" ); 7313 7314 // Empty strings, null, undefined and "auto" are converted to 0. 7315 return !result || result === "auto" ? 0 : result; 7316 }, 7317 set: function( tween ) { 7318 7319 // Use step hook for back compat. 7320 // Use cssHook if its there. 7321 // Use .style if available and use plain properties where available. 7322 if ( jQuery.fx.step[ tween.prop ] ) { 7323 jQuery.fx.step[ tween.prop ]( tween ); 7324 } else if ( tween.elem.nodeType === 1 && ( 7325 jQuery.cssHooks[ tween.prop ] || 7326 tween.elem.style[ finalPropName( tween.prop ) ] != null
vendor: 14,002 bytes, lines 7326-7881
7326 ) ) { 7327 jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); 7328 } else { 7329 tween.elem[ tween.prop ] = tween.now; 7330 } 7331 } 7332 } 7333}; 7334 7335// Support: IE <=9 only 7336// Panic based approach to setting things on disconnected nodes 7337Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { 7338 set: function( tween ) { 7339 if ( tween.elem.nodeType && tween.elem.parentNode ) { 7340 tween.elem[ tween.prop ] = tween.now; 7341 } 7342 } 7343}; 7344 7345jQuery.easing = { 7346 linear: function( p ) { 7347 return p; 7348 }, 7349 swing: function( p ) { 7350 return 0.5 - Math.cos( p * Math.PI ) / 2; 7351 }, 7352 _default: "swing" 7353}; 7354 7355jQuery.fx = Tween.prototype.init; 7356 7357// Back compat <1.8 extension point 7358jQuery.fx.step = {}; 7359 7360 7361 7362 7363var 7364 fxNow, inProgress, 7365 rfxtypes = /^(?:toggle|show|hide)$/, 7366 rrun = /queueHooks$/; 7367 7368function schedule() { 7369 if ( inProgress ) { 7370 if ( document.hidden === false && window.requestAnimationFrame ) { 7371 window.requestAnimationFrame( schedule ); 7372 } else { 7373 window.setTimeout( schedule, jQuery.fx.interval ); 7374 } 7375 7376 jQuery.fx.tick(); 7377 } 7378} 7379 7380// Animations created synchronously will run synchronously 7381function createFxNow() { 7382 window.setTimeout( function() { 7383 fxNow = undefined; 7384 } ); 7385 return ( fxNow = Date.now() ); 7386} 7387 7388// Generate parameters to create a standard animation 7389function genFx( type, includeWidth ) { 7390 var which, 7391 i = 0, 7392 attrs = { height: type }; 7393 7394 // If we include width, step value is 1 to do all cssExpand values, 7395 // otherwise step value is 2 to skip over Left and Right 7396 includeWidth = includeWidth ? 1 : 0; 7397 for ( ; i < 4; i += 2 - includeWidth ) { 7398 which = cssExpand[ i ]; 7399 attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; 7400 } 7401 7402 if ( includeWidth ) { 7403 attrs.opacity = attrs.width = type; 7404 } 7405 7406 return attrs; 7407} 7408 7409function createTween( value, prop, animation ) { 7410 var tween, 7411 collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), 7412 index = 0, 7413 length = collection.length; 7414 for ( ; index < length; index++ ) { 7415 if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { 7416 7417 // We're done with this property 7418 return tween; 7419 } 7420 } 7421} 7422 7423function defaultPrefilter( elem, props, opts ) { 7424 var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, 7425 isBox = "width" in props || "height" in props, 7426 anim = this, 7427 orig = {}, 7428 style = elem.style, 7429 hidden = elem.nodeType && isHiddenWithinTree( elem ), 7430 dataShow = dataPriv.get( elem, "fxshow" ); 7431 7432 // Queue-skipping animations hijack the fx hooks 7433 if ( !opts.queue ) { 7434 hooks = jQuery._queueHooks( elem, "fx" ); 7435 if ( hooks.unqueued == null ) { 7436 hooks.unqueued = 0; 7437 oldfire = hooks.empty.fire; 7438 hooks.empty.fire = function() { 7439 if ( !hooks.unqueued ) { 7440 oldfire(); 7441 } 7442 }; 7443 } 7444 hooks.unqueued++; 7445 7446 anim.always( function() { 7447 7448 // Ensure the complete handler is called before this completes 7449 anim.always( function() { 7450 hooks.unqueued--; 7451 if ( !jQuery.queue( elem, "fx" ).length ) { 7452 hooks.empty.fire(); 7453 } 7454 } ); 7455 } ); 7456 } 7457 7458 // Detect show/hide animations 7459 for ( prop in props ) { 7460 value = props[ prop ]; 7461 if ( rfxtypes.test( value ) ) { 7462 delete props[ prop ]; 7463 toggle = toggle || value === "toggle"; 7464 if ( value === ( hidden ? "hide" : "show" ) ) { 7465 7466 // Pretend to be hidden if this is a "show" and 7467 // there is still data from a stopped show/hide 7468 if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { 7469 hidden = true; 7470 7471 // Ignore all other no-op show/hide data 7472 } else { 7473 continue; 7474 } 7475 } 7476 orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); 7477 } 7478 } 7479 7480 // Bail out if this is a no-op like .hide().hide() 7481 propTween = !jQuery.isEmptyObject( props ); 7482 if ( !propTween && jQuery.isEmptyObject( orig ) ) { 7483 return; 7484 } 7485 7486 // Restrict "overflow" and "display" styles during box animations 7487 if ( isBox && elem.nodeType === 1 ) { 7488 7489 // Support: IE <=9 - 11, Edge 12 - 15 7490 // Record all 3 overflow attributes because IE does not infer the shorthand 7491 // from identically-valued overflowX and overflowY and Edge just mirrors 7492 // the overflowX value there. 7493 opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; 7494 7495 // Identify a display type, preferring old show/hide data over the CSS cascade 7496 restoreDisplay = dataShow && dataShow.display; 7497 if ( restoreDisplay == null ) { 7498 restoreDisplay = dataPriv.get( elem, "display" ); 7499 } 7500 display = jQuery.css( elem, "display" ); 7501 if ( display === "none" ) { 7502 if ( restoreDisplay ) { 7503 display = restoreDisplay; 7504 } else { 7505 7506 // Get nonempty value(s) by temporarily forcing visibility 7507 showHide( [ elem ], true ); 7508 restoreDisplay = elem.style.display || restoreDisplay; 7509 display = jQuery.css( elem, "display" ); 7510 showHide( [ elem ] ); 7511 } 7512 } 7513 7514 // Animate inline elements as inline-block 7515 if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { 7516 if ( jQuery.css( elem, "float" ) === "none" ) { 7517 7518 // Restore the original display value at the end of pure show/hide animations 7519 if ( !propTween ) { 7520 anim.done( function() { 7521 style.display = restoreDisplay; 7522 } ); 7523 if ( restoreDisplay == null ) { 7524 display = style.display; 7525 restoreDisplay = display === "none" ? "" : display; 7526 } 7527 } 7528 style.display = "inline-block"; 7529 } 7530 } 7531 } 7532 7533 if ( opts.overflow ) { 7534 style.overflow = "hidden"; 7535 anim.always( function() { 7536 style.overflow = opts.overflow[ 0 ]; 7537 style.overflowX = opts.overflow[ 1 ]; 7538 style.overflowY = opts.overflow[ 2 ]; 7539 } ); 7540 } 7541 7542 // Implement show/hide animations 7543 propTween = false; 7544 for ( prop in orig ) { 7545 7546 // General show/hide setup for this element animation 7547 if ( !propTween ) { 7548 if ( dataShow ) { 7549 if ( "hidden" in dataShow ) { 7550 hidden = dataShow.hidden; 7551 } 7552 } else { 7553 dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); 7554 } 7555 7556 // Store hidden/visible for toggle so `.stop().toggle()` "reverses" 7557 if ( toggle ) { 7558 dataShow.hidden = !hidden; 7559 } 7560 7561 // Show elements before animating them 7562 if ( hidden ) { 7563 showHide( [ elem ], true ); 7564 } 7565 7566 /* eslint-disable no-loop-func */ 7567 7568 anim.done( function() { 7569 7570 /* eslint-enable no-loop-func */ 7571 7572 // The final step of a "hide" animation is actually hiding the element 7573 if ( !hidden ) { 7574 showHide( [ elem ] ); 7575 } 7576 dataPriv.remove( elem, "fxshow" ); 7577 for ( prop in orig ) { 7578 jQuery.style( elem, prop, orig[ prop ] ); 7579 } 7580 } ); 7581 } 7582 7583 // Per-property setup 7584 propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); 7585 if ( !( prop in dataShow ) ) { 7586 dataShow[ prop ] = propTween.start; 7587 if ( hidden ) { 7588 propTween.end = propTween.start; 7589 propTween.start = 0; 7590 } 7591 } 7592 } 7593} 7594 7595function propFilter( props, specialEasing ) { 7596 var index, name, easing, value, hooks; 7597 7598 // camelCase, specialEasing and expand cssHook pass 7599 for ( index in props ) { 7600 name = camelCase( index ); 7601 easing = specialEasing[ name ]; 7602 value = props[ index ]; 7603 if ( Array.isArray( value ) ) { 7604 easing = value[ 1 ]; 7605 value = props[ index ] = value[ 0 ]; 7606 } 7607 7608 if ( index !== name ) { 7609 props[ name ] = value; 7610 delete props[ index ]; 7611 } 7612 7613 hooks = jQuery.cssHooks[ name ]; 7614 if ( hooks && "expand" in hooks ) { 7615 value = hooks.expand( value ); 7616 delete props[ name ]; 7617 7618 // Not quite $.extend, this won't overwrite existing keys. 7619 // Reusing 'index' because we have the correct "name" 7620 for ( index in value ) { 7621 if ( !( index in props ) ) { 7622 props[ index ] = value[ index ]; 7623 specialEasing[ index ] = easing; 7624 } 7625 } 7626 } else { 7627 specialEasing[ name ] = easing; 7628 } 7629 } 7630} 7631 7632function Animation( elem, properties, options ) { 7633 var result, 7634 stopped, 7635 index = 0, 7636 length = Animation.prefilters.length, 7637 deferred = jQuery.Deferred().always( function() { 7638 7639 // Don't match elem in the :animated selector 7640 delete tick.elem; 7641 } ), 7642 tick = function() { 7643 if ( stopped ) { 7644 return false; 7645 } 7646 var currentTime = fxNow || createFxNow(), 7647 remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), 7648 7649 // Support: Android 2.3 only 7650 // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) 7651 temp = remaining / animation.duration || 0, 7652 percent = 1 - temp, 7653 index = 0, 7654 length = animation.tweens.length; 7655 7656 for ( ; index < length; index++ ) { 7657 animation.tweens[ index ].run( percent ); 7658 } 7659 7660 deferred.notifyWith( elem, [ animation, percent, remaining ] ); 7661 7662 // If there's more to do, yield 7663 if ( percent < 1 && length ) { 7664 return remaining; 7665 } 7666 7667 // If this was an empty animation, synthesize a final progress notification 7668 if ( !length ) { 7669 deferred.notifyWith( elem, [ animation, 1, 0 ] ); 7670 } 7671 7672 // Resolve the animation and report its conclusion 7673 deferred.resolveWith( elem, [ animation ] ); 7674 return false; 7675 }, 7676 animation = deferred.promise( { 7677 elem: elem, 7678 props: jQuery.extend( {}, properties ), 7679 opts: jQuery.extend( true, { 7680 specialEasing: {}, 7681 easing: jQuery.easing._default 7682 }, options ), 7683 originalProperties: properties, 7684 originalOptions: options, 7685 startTime: fxNow || createFxNow(), 7686 duration: options.duration, 7687 tweens: [], 7688 createTween: function( prop, end ) { 7689 var tween = jQuery.Tween( elem, animation.opts, prop, end, 7690 animation.opts.specialEasing[ prop ] || animation.opts.easing ); 7691 animation.tweens.push( tween ); 7692 return tween; 7693 }, 7694 stop: function( gotoEnd ) { 7695 var index = 0, 7696 7697 // If we are going to the end, we want to run all the tweens 7698 // otherwise we skip this part 7699 length = gotoEnd ? animation.tweens.length : 0; 7700 if ( stopped ) { 7701 return this; 7702 } 7703 stopped = true; 7704 for ( ; index < length; index++ ) { 7705 animation.tweens[ index ].run( 1 ); 7706 } 7707 7708 // Resolve when we played the last frame; otherwise, reject 7709 if ( gotoEnd ) { 7710 deferred.notifyWith( elem, [ animation, 1, 0 ] ); 7711 deferred.resolveWith( elem, [ animation, gotoEnd ] ); 7712 } else { 7713 deferred.rejectWith( elem, [ animation, gotoEnd ] ); 7714 } 7715 return this; 7716 } 7717 } ), 7718 props = animation.props; 7719 7720 propFilter( props, animation.opts.specialEasing ); 7721 7722 for ( ; index < length; index++ ) { 7723 result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); 7724 if ( result ) { 7725 if ( isFunction( result.stop ) ) { 7726 jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = 7727 result.stop.bind( result ); 7728 } 7729 return result; 7730 } 7731 } 7732 7733 jQuery.map( props, createTween, animation ); 7734 7735 if ( isFunction( animation.opts.start ) ) { 7736 animation.opts.start.call( elem, animation ); 7737 } 7738 7739 // Attach callbacks from options 7740 animation 7741 .progress( animation.opts.progress ) 7742 .done( animation.opts.done, animation.opts.complete ) 7743 .fail( animation.opts.fail ) 7744 .always( animation.opts.always ); 7745 7746 jQuery.fx.timer( 7747 jQuery.extend( tick, { 7748 elem: elem, 7749 anim: animation, 7750 queue: animation.opts.queue 7751 } ) 7752 ); 7753 7754 return animation; 7755} 7756 7757jQuery.Animation = jQuery.extend( Animation, { 7758 7759 tweeners: { 7760 "*": [ function( prop, value ) { 7761 var tween = this.createTween( prop, value ); 7762 adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); 7763 return tween; 7764 } ] 7765 }, 7766 7767 tweener: function( props, callback ) { 7768 if ( isFunction( props ) ) { 7769 callback = props; 7770 props = [ "*" ]; 7771 } else { 7772 props = props.match( rnothtmlwhite ); 7773 } 7774 7775 var prop, 7776 index = 0, 7777 length = props.length; 7778 7779 for ( ; index < length; index++ ) { 7780 prop = props[ index ]; 7781 Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; 7782 Animation.tweeners[ prop ].unshift( callback ); 7783 } 7784 }, 7785 7786 prefilters: [ defaultPrefilter ], 7787 7788 prefilter: function( callback, prepend ) { 7789 if ( prepend ) { 7790 Animation.prefilters.unshift( callback ); 7791 } else { 7792 Animation.prefilters.push( callback ); 7793 } 7794 } 7795} ); 7796 7797jQuery.speed = function( speed, easing, fn ) { 7798 var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { 7799 complete: fn || !fn && easing || 7800 isFunction( speed ) && speed, 7801 duration: speed, 7802 easing: fn && easing || easing && !isFunction( easing ) && easing 7803 }; 7804 7805 // Go to the end state if fx are off 7806 if ( jQuery.fx.off ) { 7807 opt.duration = 0; 7808 7809 } else { 7810 if ( typeof opt.duration !== "number" ) { 7811 if ( opt.duration in jQuery.fx.speeds ) { 7812 opt.duration = jQuery.fx.speeds[ opt.duration ]; 7813 7814 } else { 7815 opt.duration = jQuery.fx.speeds._default; 7816 } 7817 } 7818 } 7819 7820 // Normalize opt.queue - true/undefined/null -> "fx" 7821 if ( opt.queue == null || opt.queue === true ) { 7822 opt.queue = "fx"; 7823 } 7824 7825 // Queueing 7826 opt.old = opt.complete; 7827 7828 opt.complete = function() { 7829 if ( isFunction( opt.old ) ) { 7830 opt.old.call( this ); 7831 } 7832 7833 if ( opt.queue ) { 7834 jQuery.dequeue( this, opt.queue ); 7835 } 7836 }; 7837 7838 return opt; 7839}; 7840 7841jQuery.fn.extend( { 7842 fadeTo: function( speed, to, easing, callback ) { 7843 7844 // Show any hidden elements after setting opacity to 0 7845 return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() 7846 7847 // Animate to the value specified 7848 .end().animate( { opacity: to }, speed, easing, callback ); 7849 }, 7850 animate: function( prop, speed, easing, callback ) { 7851 var empty = jQuery.isEmptyObject( prop ), 7852 optall = jQuery.speed( speed, easing, callback ), 7853 doAnimation = function() { 7854 7855 // Operate on a copy of prop so per-property easing won't be lost 7856 var anim = Animation( this, jQuery.extend( {}, prop ), optall ); 7857 7858 // Empty animations, or finishing resolves immediately 7859 if ( empty || dataPriv.get( this, "finish" ) ) { 7860 anim.stop( true ); 7861 } 7862 }; 7863 doAnimation.finish = doAnimation; 7864 7865 return empty || optall.queue === false ? 7866 this.each( doAnimation ) : 7867 this.queue( optall.queue, doAnimation ); 7868 }, 7869 stop: function( type, clearQueue, gotoEnd ) { 7870 var stopQueue = function( hooks ) { 7871 var stop = hooks.stop; 7872 delete hooks.stop; 7873 stop( gotoEnd ); 7874 }; 7875 7876 if ( typeof type !== "string" ) { 7877 gotoEnd = clearQueue; 7878 clearQueue = type; 7879 type = undefined; 7880 } 7881 if ( clearQueue
vendor: 3,719 bytes, lines 7881-8039
7881) { 7882 this.queue( type || "fx", [] ); 7883 } 7884 7885 return this.each( function() { 7886 var dequeue = true, 7887 index = type != null && type + "queueHooks", 7888 timers = jQuery.timers, 7889 data = dataPriv.get( this ); 7890 7891 if ( index ) { 7892 if ( data[ index ] && data[ index ].stop ) { 7893 stopQueue( data[ index ] ); 7894 } 7895 } else { 7896 for ( index in data ) { 7897 if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { 7898 stopQueue( data[ index ] ); 7899 } 7900 } 7901 } 7902 7903 for ( index = timers.length; index--; ) { 7904 if ( timers[ index ].elem === this && 7905 ( type == null || timers[ index ].queue === type ) ) { 7906 7907 timers[ index ].anim.stop( gotoEnd ); 7908 dequeue = false; 7909 timers.splice( index, 1 ); 7910 } 7911 } 7912 7913 // Start the next in the queue if the last step wasn't forced. 7914 // Timers currently will call their complete callbacks, which 7915 // will dequeue but only if they were gotoEnd. 7916 if ( dequeue || !gotoEnd ) { 7917 jQuery.dequeue( this, type ); 7918 } 7919 } ); 7920 }, 7921 finish: function( type ) { 7922 if ( type !== false ) { 7923 type = type || "fx"; 7924 } 7925 return this.each( function() { 7926 var index, 7927 data = dataPriv.get( this ), 7928 queue = data[ type + "queue" ], 7929 hooks = data[ type + "queueHooks" ], 7930 timers = jQuery.timers, 7931 length = queue ? queue.length : 0; 7932 7933 // Enable finishing flag on private data 7934 data.finish = true; 7935 7936 // Empty the queue first 7937 jQuery.queue( this, type, [] ); 7938 7939 if ( hooks && hooks.stop ) { 7940 hooks.stop.call( this, true ); 7941 } 7942 7943 // Look for any active animations, and finish them 7944 for ( index = timers.length; index--; ) { 7945 if ( timers[ index ].elem === this && timers[ index ].queue === type ) { 7946 timers[ index ].anim.stop( true ); 7947 timers.splice( index, 1 ); 7948 } 7949 } 7950 7951 // Look for any animations in the old queue and finish them 7952 for ( index = 0; index < length; index++ ) { 7953 if ( queue[ index ] && queue[ index ].finish ) { 7954 queue[ index ].finish.call( this ); 7955 } 7956 } 7957 7958 // Turn off finishing flag 7959 delete data.finish; 7960 } ); 7961 } 7962} ); 7963 7964jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) { 7965 var cssFn = jQuery.fn[ name ]; 7966 jQuery.fn[ name ] = function( speed, easing, callback ) { 7967 return speed == null || typeof speed === "boolean" ? 7968 cssFn.apply( this, arguments ) : 7969 this.animate( genFx( name, true ), speed, easing, callback ); 7970 }; 7971} ); 7972 7973// Generate shortcuts for custom animations 7974jQuery.each( { 7975 slideDown: genFx( "show" ), 7976 slideUp: genFx( "hide" ), 7977 slideToggle: genFx( "toggle" ), 7978 fadeIn: { opacity: "show" }, 7979 fadeOut: { opacity: "hide" }, 7980 fadeToggle: { opacity: "toggle" } 7981}, function( name, props ) { 7982 jQuery.fn[ name ] = function( speed, easing, callback ) { 7983 return this.animate( props, speed, easing, callback ); 7984 }; 7985} ); 7986 7987jQuery.timers = []; 7988jQuery.fx.tick = function() { 7989 var timer, 7990 i = 0, 7991 timers = jQuery.timers; 7992 7993 fxNow = Date.now(); 7994 7995 for ( ; i < timers.length; i++ ) { 7996 timer = timers[ i ]; 7997 7998 // Run the timer and safely remove it when done (allowing for external removal) 7999 if ( !timer() && timers[ i ] === timer ) { 8000 timers.splice( i--, 1 ); 8001 } 8002 } 8003 8004 if ( !timers.length ) { 8005 jQuery.fx.stop(); 8006 } 8007 fxNow = undefined; 8008}; 8009 8010jQuery.fx.timer = function( timer ) { 8011 jQuery.timers.push( timer ); 8012 jQuery.fx.start(); 8013}; 8014 8015jQuery.fx.interval = 13; 8016jQuery.fx.start = function() { 8017 if ( inProgress ) { 8018 return; 8019 } 8020 8021 inProgress = true; 8022 schedule(); 8023}; 8024 8025jQuery.fx.stop = function() { 8026 inProgress = null; 8027}; 8028 8029jQuery.fx.speeds = { 8030 slow: 600, 8031 fast: 200, 8032 8033 // Default speed 8034 _default: 400 8035}; 8036 8037 8038// Based off of the plugin by Clint Helfers, with permission. 8039// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/
vendor: 5,177 bytes, lines 8040-8260
8040jQuery.fn.delay = function( time, type ) { 8041 time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; 8042 type = type || "fx"; 8043 8044 return this.queue( type, function( next, hooks ) { 8045 var timeout = window.setTimeout( next, time ); 8046 hooks.stop = function() { 8047 window.clearTimeout( timeout ); 8048 }; 8049 } ); 8050}; 8051 8052 8053( function() { 8054 var input = document.createElement( "input" ), 8055 select = document.createElement( "select" ), 8056 opt = select.appendChild( document.createElement( "option" ) ); 8057 8058 input.type = "checkbox"; 8059 8060 // Support: Android <=4.3 only 8061 // Default value for a checkbox should be "on" 8062 support.checkOn = input.value !== ""; 8063 8064 // Support: IE <=11 only 8065 // Must access selectedIndex to make default options select 8066 support.optSelected = opt.selected; 8067 8068 // Support: IE <=11 only 8069 // An input loses its value after becoming a radio 8070 input = document.createElement( "input" ); 8071 input.value = "t"; 8072 input.type = "radio"; 8073 support.radioValue = input.value === "t"; 8074} )(); 8075 8076 8077var boolHook, 8078 attrHandle = jQuery.expr.attrHandle; 8079 8080jQuery.fn.extend( { 8081 attr: function( name, value ) { 8082 return access( this, jQuery.attr, name, value, arguments.length > 1 ); 8083 }, 8084 8085 removeAttr: function( name ) { 8086 return this.each( function() { 8087 jQuery.removeAttr( this, name ); 8088 } ); 8089 } 8090} ); 8091 8092jQuery.extend( { 8093 attr: function( elem, name, value ) { 8094 var ret, hooks, 8095 nType = elem.nodeType; 8096 8097 // Don't get/set attributes on text, comment and attribute nodes 8098 if ( nType === 3 || nType === 8 || nType === 2 ) { 8099 return; 8100 } 8101 8102 // Fallback to prop when attributes are not supported 8103 if ( typeof elem.getAttribute === "undefined" ) { 8104 return jQuery.prop( elem, name, value ); 8105 } 8106 8107 // Attribute hooks are determined by the lowercase version 8108 // Grab necessary hook if one is defined 8109 if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { 8110 hooks = jQuery.attrHooks[ name.toLowerCase() ] || 8111 ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); 8112 } 8113 8114 if ( value !== undefined ) { 8115 if ( value === null ) { 8116 jQuery.removeAttr( elem, name ); 8117 return; 8118 } 8119 8120 if ( hooks && "set" in hooks && 8121 ( ret = hooks.set( elem, value, name ) ) !== undefined ) { 8122 return ret; 8123 } 8124 8125 elem.setAttribute( name, value + "" ); 8126 return value; 8127 } 8128 8129 if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { 8130 return ret; 8131 } 8132 8133 ret = jQuery.find.attr( elem, name ); 8134 8135 // Non-existent attributes return null, we normalize to undefined 8136 return ret == null ? undefined : ret; 8137 }, 8138 8139 attrHooks: { 8140 type: { 8141 set: function( elem, value ) { 8142 if ( !support.radioValue && value === "radio" && 8143 nodeName( elem, "input" ) ) { 8144 var val = elem.value; 8145 elem.setAttribute( "type", value ); 8146 if ( val ) { 8147 elem.value = val; 8148 } 8149 return value; 8150 } 8151 } 8152 } 8153 }, 8154 8155 removeAttr: function( elem, value ) { 8156 var name, 8157 i = 0, 8158 8159 // Attribute names can contain non-HTML whitespace characters 8160 // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 8161 attrNames = value && value.match( rnothtmlwhite ); 8162 8163 if ( attrNames && elem.nodeType === 1 ) { 8164 while ( ( name = attrNames[ i++ ] ) ) { 8165 elem.removeAttribute( name ); 8166 } 8167 } 8168 } 8169} ); 8170 8171// Hooks for boolean attributes 8172boolHook = { 8173 set: function( elem, value, name ) { 8174 if ( value === false ) { 8175 8176 // Remove boolean attributes when set to false 8177 jQuery.removeAttr( elem, name ); 8178 } else { 8179 elem.setAttribute( name, name ); 8180 } 8181 return name; 8182 } 8183}; 8184 8185jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) { 8186 var getter = attrHandle[ name ] || jQuery.find.attr; 8187 8188 attrHandle[ name ] = function( elem, name, isXML ) { 8189 var ret, handle, 8190 lowercaseName = name.toLowerCase(); 8191 8192 if ( !isXML ) { 8193 8194 // Avoid an infinite loop by temporarily removing this function from the getter 8195 handle = attrHandle[ lowercaseName ]; 8196 attrHandle[ lowercaseName ] = ret; 8197 ret = getter( elem, name, isXML ) != null ? 8198 lowercaseName : 8199 null; 8200 attrHandle[ lowercaseName ] = handle; 8201 } 8202 return ret; 8203 }; 8204} ); 8205 8206 8207 8208 8209var rfocusable = /^(?:input|select|textarea|button)$/i, 8210 rclickable = /^(?:a|area)$/i; 8211 8212jQuery.fn.extend( { 8213 prop: function( name, value ) { 8214 return access( this, jQuery.prop, name, value, arguments.length > 1 ); 8215 }, 8216 8217 removeProp: function( name ) { 8218 return this.each( function() { 8219 delete this[ jQuery.propFix[ name ] || name ]; 8220 } ); 8221 } 8222} ); 8223 8224jQuery.extend( { 8225 prop: function( elem, name, value ) { 8226 var ret, hooks, 8227 nType = elem.nodeType; 8228 8229 // Don't get/set properties on text, comment and attribute nodes 8230 if ( nType === 3 || nType === 8 || nType === 2 ) { 8231 return; 8232 } 8233 8234 if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { 8235 8236 // Fix name and attach hooks 8237 name = jQuery.propFix[ name ] || name; 8238 hooks = jQuery.propHooks[ name ]; 8239 } 8240 8241 if ( value !== undefined ) { 8242 if ( hooks && "set" in hooks && 8243 ( ret = hooks.set( elem, value, name ) ) !== undefined ) { 8244 return ret; 8245 } 8246 8247 return ( elem[ name ] = value ); 8248 } 8249 8250 if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { 8251 return ret; 8252 } 8253 8254 return elem[ name ]; 8255 }, 8256 8257 propHooks: { 8258 tabIndex: { 8259 get: function( elem ) { 8260
vendor: 6,193 bytes, lines 8261-8523
8261 // Support: IE <=9 - 11 only 8262 // elem.tabIndex doesn't always return the 8263 // correct value when it hasn't been explicitly set 8264 // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ 8265 // Use proper attribute retrieval(#12072) 8266 var tabindex = jQuery.find.attr( elem, "tabindex" ); 8267 8268 if ( tabindex ) { 8269 return parseInt( tabindex, 10 ); 8270 } 8271 8272 if ( 8273 rfocusable.test( elem.nodeName ) || 8274 rclickable.test( elem.nodeName ) && 8275 elem.href 8276 ) { 8277 return 0; 8278 } 8279 8280 return -1; 8281 } 8282 } 8283 }, 8284 8285 propFix: { 8286 "for": "htmlFor", 8287 "class": "className" 8288 } 8289} ); 8290 8291// Support: IE <=11 only 8292// Accessing the selectedIndex property 8293// forces the browser to respect setting selected 8294// on the option 8295// The getter ensures a default option is selected 8296// when in an optgroup 8297// eslint rule "no-unused-expressions" is disabled for this code 8298// since it considers such accessions noop 8299if ( !support.optSelected ) { 8300 jQuery.propHooks.selected = { 8301 get: function( elem ) { 8302 8303 /* eslint no-unused-expressions: "off" */ 8304 8305 var parent = elem.parentNode; 8306 if ( parent && parent.parentNode ) { 8307 parent.parentNode.selectedIndex; 8308 } 8309 return null; 8310 }, 8311 set: function( elem ) { 8312 8313 /* eslint no-unused-expressions: "off" */ 8314 8315 var parent = elem.parentNode; 8316 if ( parent ) { 8317 parent.selectedIndex; 8318 8319 if ( parent.parentNode ) { 8320 parent.parentNode.selectedIndex; 8321 } 8322 } 8323 } 8324 }; 8325} 8326 8327jQuery.each( [ 8328 "tabIndex", 8329 "readOnly", 8330 "maxLength", 8331 "cellSpacing", 8332 "cellPadding", 8333 "rowSpan", 8334 "colSpan", 8335 "useMap", 8336 "frameBorder", 8337 "contentEditable" 8338], function() { 8339 jQuery.propFix[ this.toLowerCase() ] = this; 8340} ); 8341 8342 8343 8344 8345 // Strip and collapse whitespace according to HTML spec 8346 // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace 8347 function stripAndCollapse( value ) { 8348 var tokens = value.match( rnothtmlwhite ) || []; 8349 return tokens.join( " " ); 8350 } 8351 8352 8353function getClass( elem ) { 8354 return elem.getAttribute && elem.getAttribute( "class" ) || ""; 8355} 8356 8357function classesToArray( value ) { 8358 if ( Array.isArray( value ) ) { 8359 return value; 8360 } 8361 if ( typeof value === "string" ) { 8362 return value.match( rnothtmlwhite ) || []; 8363 } 8364 return []; 8365} 8366 8367jQuery.fn.extend( { 8368 addClass: function( value ) { 8369 var classes, elem, cur, curValue, clazz, j, finalValue, 8370 i = 0; 8371 8372 if ( isFunction( value ) ) { 8373 return this.each( function( j ) { 8374 jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); 8375 } ); 8376 } 8377 8378 classes = classesToArray( value ); 8379 8380 if ( classes.length ) { 8381 while ( ( elem = this[ i++ ] ) ) { 8382 curValue = getClass( elem ); 8383 cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); 8384 8385 if ( cur ) { 8386 j = 0; 8387 while ( ( clazz = classes[ j++ ] ) ) { 8388 if ( cur.indexOf( " " + clazz + " " ) < 0 ) { 8389 cur += clazz + " "; 8390 } 8391 } 8392 8393 // Only assign if different to avoid unneeded rendering. 8394 finalValue = stripAndCollapse( cur ); 8395 if ( curValue !== finalValue ) { 8396 elem.setAttribute( "class", finalValue ); 8397 } 8398 } 8399 } 8400 } 8401 8402 return this; 8403 }, 8404 8405 removeClass: function( value ) { 8406 var classes, elem, cur, curValue, clazz, j, finalValue, 8407 i = 0; 8408 8409 if ( isFunction( value ) ) { 8410 return this.each( function( j ) { 8411 jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); 8412 } ); 8413 } 8414 8415 if ( !arguments.length ) { 8416 return this.attr( "class", "" ); 8417 } 8418 8419 classes = classesToArray( value ); 8420 8421 if ( classes.length ) { 8422 while ( ( elem = this[ i++ ] ) ) { 8423 curValue = getClass( elem ); 8424 8425 // This expression is here for better compressibility (see addClass) 8426 cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); 8427 8428 if ( cur ) { 8429 j = 0; 8430 while ( ( clazz = classes[ j++ ] ) ) { 8431 8432 // Remove *all* instances 8433 while ( cur.indexOf( " " + clazz + " " ) > -1 ) { 8434 cur = cur.replace( " " + clazz + " ", " " ); 8435 } 8436 } 8437 8438 // Only assign if different to avoid unneeded rendering. 8439 finalValue = stripAndCollapse( cur ); 8440 if ( curValue !== finalValue ) { 8441 elem.setAttribute( "class", finalValue ); 8442 } 8443 } 8444 } 8445 } 8446 8447 return this; 8448 }, 8449 8450 toggleClass: function( value, stateVal ) { 8451 var type = typeof value, 8452 isValidValue = type === "string" || Array.isArray( value ); 8453 8454 if ( typeof stateVal === "boolean" && isValidValue ) { 8455 return stateVal ? this.addClass( value ) : this.removeClass( value ); 8456 } 8457 8458 if ( isFunction( value ) ) { 8459 return this.each( function( i ) { 8460 jQuery( this ).toggleClass( 8461 value.call( this, i, getClass( this ), stateVal ), 8462 stateVal 8463 ); 8464 } ); 8465 } 8466 8467 return this.each( function() { 8468 var className, i, self, classNames; 8469 8470 if ( isValidValue ) { 8471 8472 // Toggle individual class names 8473 i = 0; 8474 self = jQuery( this ); 8475 classNames = classesToArray( value ); 8476 8477 while ( ( className = classNames[ i++ ] ) ) { 8478 8479 // Check each className given, space separated list 8480 if ( self.hasClass( className ) ) { 8481 self.removeClass( className ); 8482 } else { 8483 self.addClass( className ); 8484 } 8485 } 8486 8487 // Toggle whole class name 8488 } else if ( value === undefined || type === "boolean" ) { 8489 className = getClass( this ); 8490 if ( className ) { 8491 8492 // Store className if set 8493 dataPriv.set( this, "__className__", className ); 8494 } 8495 8496 // If the element has a class name or if we're passed `false`, 8497 // then remove the whole classname (if there was one, the above saved it). 8498 // Otherwise bring back whatever was previously saved (if anything), 8499 // falling back to the empty string if nothing was stored. 8500 if ( this.setAttribute ) { 8501 this.setAttribute( "class", 8502 className || value === false ? 8503 "" : 8504 dataPriv.get( this, "__className__" ) || "" 8505 ); 8506 } 8507 } 8508 } ); 8509 }, 8510 8511 hasClass: function( selector ) { 8512 var className, elem, 8513 i = 0; 8514 8515 className = " " + selector + " "; 8516 while ( ( elem = this[ i++ ] ) ) { 8517 if ( elem.nodeType === 1 && 8518 ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { 8519 return true; 8520 } 8521 } 8522 8523 return false;
vendor: 7,091 bytes, lines 8524-8809
8524 } 8525} ); 8526 8527 8528 8529 8530var rreturn = /\r/g; 8531 8532jQuery.fn.extend( { 8533 val: function( value ) { 8534 var hooks, ret, valueIsFunction, 8535 elem = this[ 0 ]; 8536 8537 if ( !arguments.length ) { 8538 if ( elem ) { 8539 hooks = jQuery.valHooks[ elem.type ] || 8540 jQuery.valHooks[ elem.nodeName.toLowerCase() ]; 8541 8542 if ( hooks && 8543 "get" in hooks && 8544 ( ret = hooks.get( elem, "value" ) ) !== undefined 8545 ) { 8546 return ret; 8547 } 8548 8549 ret = elem.value; 8550 8551 // Handle most common string cases 8552 if ( typeof ret === "string" ) { 8553 return ret.replace( rreturn, "" ); 8554 } 8555 8556 // Handle cases where value is null/undef or number 8557 return ret == null ? "" : ret; 8558 } 8559 8560 return; 8561 } 8562 8563 valueIsFunction = isFunction( value ); 8564 8565 return this.each( function( i ) { 8566 var val; 8567 8568 if ( this.nodeType !== 1 ) { 8569 return; 8570 } 8571 8572 if ( valueIsFunction ) { 8573 val = value.call( this, i, jQuery( this ).val() ); 8574 } else { 8575 val = value; 8576 } 8577 8578 // Treat null/undefined as ""; convert numbers to string 8579 if ( val == null ) { 8580 val = ""; 8581 8582 } else if ( typeof val === "number" ) { 8583 val += ""; 8584 8585 } else if ( Array.isArray( val ) ) { 8586 val = jQuery.map( val, function( value ) { 8587 return value == null ? "" : value + ""; 8588 } ); 8589 } 8590 8591 hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; 8592 8593 // If set returns undefined, fall back to normal setting 8594 if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { 8595 this.value = val; 8596 } 8597 } ); 8598 } 8599} ); 8600 8601jQuery.extend( { 8602 valHooks: { 8603 option: { 8604 get: function( elem ) { 8605 8606 var val = jQuery.find.attr( elem, "value" ); 8607 return val != null ? 8608 val : 8609 8610 // Support: IE <=10 - 11 only 8611 // option.text throws exceptions (#14686, #14858) 8612 // Strip and collapse whitespace 8613 // https://html.spec.whatwg.org/#strip-and-collapse-whitespace 8614 stripAndCollapse( jQuery.text( elem ) ); 8615 } 8616 }, 8617 select: { 8618 get: function( elem ) { 8619 var value, option, i, 8620 options = elem.options, 8621 index = elem.selectedIndex, 8622 one = elem.type === "select-one", 8623 values = one ? null : [], 8624 max = one ? index + 1 : options.length; 8625 8626 if ( index < 0 ) { 8627 i = max; 8628 8629 } else { 8630 i = one ? index : 0; 8631 } 8632 8633 // Loop through all the selected options 8634 for ( ; i < max; i++ ) { 8635 option = options[ i ]; 8636 8637 // Support: IE <=9 only 8638 // IE8-9 doesn't update selected after form reset (#2551) 8639 if ( ( option.selected || i === index ) && 8640 8641 // Don't return options that are disabled or in a disabled optgroup 8642 !option.disabled && 8643 ( !option.parentNode.disabled || 8644 !nodeName( option.parentNode, "optgroup" ) ) ) { 8645 8646 // Get the specific value for the option 8647 value = jQuery( option ).val(); 8648 8649 // We don't need an array for one selects 8650 if ( one ) { 8651 return value; 8652 } 8653 8654 // Multi-Selects return an array 8655 values.push( value ); 8656 } 8657 } 8658 8659 return values; 8660 }, 8661 8662 set: function( elem, value ) { 8663 var optionSet, option, 8664 options = elem.options, 8665 values = jQuery.makeArray( value ), 8666 i = options.length; 8667 8668 while ( i-- ) { 8669 option = options[ i ]; 8670 8671 /* eslint-disable no-cond-assign */ 8672 8673 if ( option.selected = 8674 jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 8675 ) { 8676 optionSet = true; 8677 } 8678 8679 /* eslint-enable no-cond-assign */ 8680 } 8681 8682 // Force browsers to behave consistently when non-matching value is set 8683 if ( !optionSet ) { 8684 elem.selectedIndex = -1; 8685 } 8686 return values; 8687 } 8688 } 8689 } 8690} ); 8691 8692// Radios and checkboxes getter/setter 8693jQuery.each( [ "radio", "checkbox" ], function() { 8694 jQuery.valHooks[ this ] = { 8695 set: function( elem, value ) { 8696 if ( Array.isArray( value ) ) { 8697 return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); 8698 } 8699 } 8700 }; 8701 if ( !support.checkOn ) { 8702 jQuery.valHooks[ this ].get = function( elem ) { 8703 return elem.getAttribute( "value" ) === null ? "on" : elem.value; 8704 }; 8705 } 8706} ); 8707 8708 8709 8710 8711// Return jQuery for attributes-only inclusion 8712 8713 8714support.focusin = "onfocusin" in window; 8715 8716 8717var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, 8718 stopPropagationCallback = function( e ) { 8719 e.stopPropagation(); 8720 }; 8721 8722jQuery.extend( jQuery.event, { 8723 8724 trigger: function( event, data, elem, onlyHandlers ) { 8725 8726 var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, 8727 eventPath = [ elem || document ], 8728 type = hasOwn.call( event, "type" ) ? event.type : event, 8729 namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; 8730 8731 cur = lastElement = tmp = elem = elem || document; 8732 8733 // Don't do events on text and comment nodes 8734 if ( elem.nodeType === 3 || elem.nodeType === 8 ) { 8735 return; 8736 } 8737 8738 // focus/blur morphs to focusin/out; ensure we're not firing them right now 8739 if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { 8740 return; 8741 } 8742 8743 if ( type.indexOf( "." ) > -1 ) { 8744 8745 // Namespaced trigger; create a regexp to match event type in handle() 8746 namespaces = type.split( "." ); 8747 type = namespaces.shift(); 8748 namespaces.sort(); 8749 } 8750 ontype = type.indexOf( ":" ) < 0 && "on" + type; 8751 8752 // Caller can pass in a jQuery.Event object, Object, or just an event type string 8753 event = event[ jQuery.expando ] ? 8754 event : 8755 new jQuery.Event( type, typeof event === "object" && event ); 8756 8757 // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) 8758 event.isTrigger = onlyHandlers ? 2 : 3; 8759 event.namespace = namespaces.join( "." ); 8760 event.rnamespace = event.namespace ? 8761 new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : 8762 null; 8763 8764 // Clean up the event in case it is being reused 8765 event.result = undefined; 8766 if ( !event.target ) { 8767 event.target = elem; 8768 } 8769 8770 // Clone any incoming data and prepend the event, creating the handler arg list 8771 data = data == null ? 8772 [ event ] : 8773 jQuery.makeArray( data, [ event ] ); 8774 8775 // Allow special events to draw outside the lines 8776 special = jQuery.event.special[ type ] || {}; 8777 if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { 8778 return; 8779 } 8780 8781 // Determine event propagation path in advance, per W3C events spec (#9951) 8782 // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) 8783 if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) { 8784 8785 bubbleType = special.delegateType || type; 8786 if ( !rfocusMorph.test( bubbleType + type ) ) { 8787 cur = cur.parentNode; 8788 } 8789 for ( ; cur; cur = cur.parentNode ) { 8790 eventPath.push( cur ); 8791 tmp = cur; 8792 } 8793 8794 // Only add window if we got to document (e.g., not plain obj or detached DOM) 8795 if ( tmp === ( elem.ownerDocument || document ) ) { 8796 eventPath.push( tmp.defaultView || tmp.parentWindow || window ); 8797 } 8798 } 8799 8800 // Fire handlers on the event path 8801 i = 0; 8802 while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { 8803 lastElement = cur; 8804 event.type = i > 1 ? 8805 bubbleType : 8806 special.bindType || type; 8807 8808 // jQuery handler 8809 handle = (
vendor: 2,548 bytes, lines 8809-8910
8809 8810 dataPriv.get( cur, "events" ) || Object.create( null ) 8811 )[ event.type ] && 8812 dataPriv.get( cur, "handle" ); 8813 if ( handle ) { 8814 handle.apply( cur, data ); 8815 } 8816 8817 // Native handler 8818 handle = ontype && cur[ ontype ]; 8819 if ( handle && handle.apply && acceptData( cur ) ) { 8820 event.result = handle.apply( cur, data ); 8821 if ( event.result === false ) { 8822 event.preventDefault(); 8823 } 8824 } 8825 } 8826 event.type = type; 8827 8828 // If nobody prevented the default action, do it now 8829 if ( !onlyHandlers && !event.isDefaultPrevented() ) { 8830 8831 if ( ( !special._default || 8832 special._default.apply( eventPath.pop(), data ) === false ) && 8833 acceptData( elem ) ) { 8834 8835 // Call a native DOM method on the target with the same name as the event. 8836 // Don't do default actions on window, that's where global variables be (#6170) 8837 if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) { 8838 8839 // Don't re-trigger an onFOO event when we call its FOO() method 8840 tmp = elem[ ontype ]; 8841 8842 if ( tmp ) { 8843 elem[ ontype ] = null; 8844 } 8845 8846 // Prevent re-triggering of the same event, since we already bubbled it above 8847 jQuery.event.triggered = type; 8848 8849 if ( event.isPropagationStopped() ) { 8850 lastElement.addEventListener( type, stopPropagationCallback ); 8851 } 8852 8853 elem[ type ](); 8854 8855 if ( event.isPropagationStopped() ) { 8856 lastElement.removeEventListener( type, stopPropagationCallback ); 8857 } 8858 8859 jQuery.event.triggered = undefined; 8860 8861 if ( tmp ) { 8862 elem[ ontype ] = tmp; 8863 } 8864 } 8865 } 8866 } 8867 8868 return event.result; 8869 }, 8870 8871 // Piggyback on a donor event to simulate a different one 8872 // Used only for `focus(in | out)` events 8873 simulate: function( type, elem, event ) { 8874 var e = jQuery.extend( 8875 new jQuery.Event(), 8876 event, 8877 { 8878 type: type, 8879 isSimulated: true 8880 } 8881 ); 8882 8883 jQuery.event.trigger( e, null, elem ); 8884 } 8885 8886} ); 8887 8888jQuery.fn.extend( { 8889 8890 trigger: function( type, data ) { 8891 return this.each( function() { 8892 jQuery.event.trigger( type, data, this ); 8893 } ); 8894 }, 8895 triggerHandler: function( type, data ) { 8896 var elem = this[ 0 ]; 8897 if ( elem ) { 8898 return jQuery.event.trigger( type, data, elem, true ); 8899 } 8900 } 8901} ); 8902 8903 8904// Support: Firefox <=44 8905// Firefox doesn't have focus(in | out) events 8906// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 8907// 8908// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 8909// focus(in | out) events fire after focus & blur events, 8910// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
vendor: 4,078 bytes, lines 8911-9076
8911// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 8912if ( !support.focusin ) { 8913 jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { 8914 8915 // Attach a single capturing handler on the document while someone wants focusin/focusout 8916 var handler = function( event ) { 8917 jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); 8918 }; 8919 8920 jQuery.event.special[ fix ] = { 8921 setup: function() { 8922 8923 // Handle: regular nodes (via `this.ownerDocument`), window 8924 // (via `this.document`) & document (via `this`). 8925 var doc = this.ownerDocument || this.document || this, 8926 attaches = dataPriv.access( doc, fix ); 8927 8928 if ( !attaches ) { 8929 doc.addEventListener( orig, handler, true ); 8930 } 8931 dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); 8932 }, 8933 teardown: function() { 8934 var doc = this.ownerDocument || this.document || this, 8935 attaches = dataPriv.access( doc, fix ) - 1; 8936 8937 if ( !attaches ) { 8938 doc.removeEventListener( orig, handler, true ); 8939 dataPriv.remove( doc, fix ); 8940 8941 } else { 8942 dataPriv.access( doc, fix, attaches ); 8943 } 8944 } 8945 }; 8946 } ); 8947} 8948var location = window.location; 8949 8950var nonce = { guid: Date.now() }; 8951 8952var rquery = ( /\?/ ); 8953 8954 8955 8956// Cross-browser xml parsing 8957jQuery.parseXML = function( data ) { 8958 var xml; 8959 if ( !data || typeof data !== "string" ) { 8960 return null; 8961 } 8962 8963 // Support: IE 9 - 11 only 8964 // IE throws on parseFromString with invalid input. 8965 try { 8966 xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); 8967 } catch ( e ) { 8968 xml = undefined; 8969 } 8970 8971 if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { 8972 jQuery.error( "Invalid XML: " + data ); 8973 } 8974 return xml; 8975}; 8976 8977 8978var 8979 rbracket = /\[\]$/, 8980 rCRLF = /\r?\n/g, 8981 rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, 8982 rsubmittable = /^(?:input|select|textarea|keygen)/i; 8983 8984function buildParams( prefix, obj, traditional, add ) { 8985 var name; 8986 8987 if ( Array.isArray( obj ) ) { 8988 8989 // Serialize array item. 8990 jQuery.each( obj, function( i, v ) { 8991 if ( traditional || rbracket.test( prefix ) ) { 8992 8993 // Treat each array item as a scalar. 8994 add( prefix, v ); 8995 8996 } else { 8997 8998 // Item is non-scalar (array or object), encode its numeric index. 8999 buildParams( 9000 prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", 9001 v, 9002 traditional, 9003 add 9004 ); 9005 } 9006 } ); 9007 9008 } else if ( !traditional && toType( obj ) === "object" ) { 9009 9010 // Serialize object item. 9011 for ( name in obj ) { 9012 buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); 9013 } 9014 9015 } else { 9016 9017 // Serialize scalar item. 9018 add( prefix, obj ); 9019 } 9020} 9021 9022// Serialize an array of form elements or a set of 9023// key/values into a query string 9024jQuery.param = function( a, traditional ) { 9025 var prefix, 9026 s = [], 9027 add = function( key, valueOrFunction ) { 9028 9029 // If value is a function, invoke it and use its return value 9030 var value = isFunction( valueOrFunction ) ? 9031 valueOrFunction() : 9032 valueOrFunction; 9033 9034 s[ s.length ] = encodeURIComponent( key ) + "=" + 9035 encodeURIComponent( value == null ? "" : value ); 9036 }; 9037 9038 if ( a == null ) { 9039 return ""; 9040 } 9041 9042 // If an array was passed in, assume that it is an array of form elements. 9043 if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { 9044 9045 // Serialize the form elements 9046 jQuery.each( a, function() { 9047 add( this.name, this.value ); 9048 } ); 9049 9050 } else { 9051 9052 // If traditional, encode the "old" way (the way 1.3.2 or older 9053 // did it), otherwise encode params recursively. 9054 for ( prefix in a ) { 9055 buildParams( prefix, a[ prefix ], traditional, add ); 9056 } 9057 } 9058 9059 // Return the resulting serialization 9060 return s.join( "&" ); 9061}; 9062 9063jQuery.fn.extend( { 9064 serialize: function() { 9065 return jQuery.param( this.serializeArray() ); 9066 }, 9067 serializeArray: function() { 9068 return this.map( function() { 9069 9070 // Can add propHook for "elements" to filter or add form elements 9071 var elements = jQuery.prop( this, "elements" ); 9072 return elements ? jQuery.makeArray( elements ) : this; 9073 } ) 9074 .filter( function() { 9075 var type = this.type; 9076
vendor: 4,933 bytes, lines 9077-9249
9077 // Use .is( ":disabled" ) so that fieldset[disabled] works 9078 return this.name && !jQuery( this ).is( ":disabled" ) && 9079 rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && 9080 ( this.checked || !rcheckableType.test( type ) ); 9081 } ) 9082 .map( function( _i, elem ) { 9083 var val = jQuery( this ).val(); 9084 9085 if ( val == null ) { 9086 return null; 9087 } 9088 9089 if ( Array.isArray( val ) ) { 9090 return jQuery.map( val, function( val ) { 9091 return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; 9092 } ); 9093 } 9094 9095 return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; 9096 } ).get(); 9097 } 9098} ); 9099 9100 9101var 9102 r20 = /%20/g, 9103 rhash = /#.*$/, 9104 rantiCache = /([?&])_=[^&]*/, 9105 rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, 9106 9107 // #7653, #8125, #8152: local protocol detection 9108 rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, 9109 rnoContent = /^(?:GET|HEAD)$/, 9110 rprotocol = /^\/\//, 9111 9112 /* Prefilters 9113 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) 9114 * 2) These are called: 9115 * - BEFORE asking for a transport 9116 * - AFTER param serialization (s.data is a string if s.processData is true) 9117 * 3) key is the dataType 9118 * 4) the catchall symbol "*" can be used 9119 * 5) execution will start with transport dataType and THEN continue down to "*" if needed 9120 */ 9121 prefilters = {}, 9122 9123 /* Transports bindings 9124 * 1) key is the dataType 9125 * 2) the catchall symbol "*" can be used 9126 * 3) selection will start with transport dataType and THEN go to "*" if needed 9127 */ 9128 transports = {}, 9129 9130 // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression 9131 allTypes = "*/".concat( "*" ), 9132 9133 // Anchor tag for parsing the document origin 9134 originAnchor = document.createElement( "a" ); 9135 originAnchor.href = location.href; 9136 9137// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport 9138function addToPrefiltersOrTransports( structure ) { 9139 9140 // dataTypeExpression is optional and defaults to "*" 9141 return function( dataTypeExpression, func ) { 9142 9143 if ( typeof dataTypeExpression !== "string" ) { 9144 func = dataTypeExpression; 9145 dataTypeExpression = "*"; 9146 } 9147 9148 var dataType, 9149 i = 0, 9150 dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; 9151 9152 if ( isFunction( func ) ) { 9153 9154 // For each dataType in the dataTypeExpression 9155 while ( ( dataType = dataTypes[ i++ ] ) ) { 9156 9157 // Prepend if requested 9158 if ( dataType[ 0 ] === "+" ) { 9159 dataType = dataType.slice( 1 ) || "*"; 9160 ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); 9161 9162 // Otherwise append 9163 } else { 9164 ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); 9165 } 9166 } 9167 } 9168 }; 9169} 9170 9171// Base inspection function for prefilters and transports 9172function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { 9173 9174 var inspected = {}, 9175 seekingTransport = ( structure === transports ); 9176 9177 function inspect( dataType ) { 9178 var selected; 9179 inspected[ dataType ] = true; 9180 jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { 9181 var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); 9182 if ( typeof dataTypeOrTransport === "string" && 9183 !seekingTransport && !inspected[ dataTypeOrTransport ] ) { 9184 9185 options.dataTypes.unshift( dataTypeOrTransport ); 9186 inspect( dataTypeOrTransport ); 9187 return false; 9188 } else if ( seekingTransport ) { 9189 return !( selected = dataTypeOrTransport ); 9190 } 9191 } ); 9192 return selected; 9193 } 9194 9195 return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); 9196} 9197 9198// A special extend for ajax options 9199// that takes "flat" options (not to be deep extended) 9200// Fixes #9887 9201function ajaxExtend( target, src ) { 9202 var key, deep, 9203 flatOptions = jQuery.ajaxSettings.flatOptions || {}; 9204 9205 for ( key in src ) { 9206 if ( src[ key ] !== undefined ) { 9207 ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; 9208 } 9209 } 9210 if ( deep ) { 9211 jQuery.extend( true, target, deep ); 9212 } 9213 9214 return target; 9215} 9216 9217/* Handles responses to an ajax request: 9218 * - finds the right dataType (mediates between content-type and expected dataType) 9219 * - returns the corresponding response 9220 */ 9221function ajaxHandleResponses( s, jqXHR, responses ) { 9222 9223 var ct, type, finalDataType, firstDataType, 9224 contents = s.contents, 9225 dataTypes = s.dataTypes; 9226 9227 // Remove auto dataType and get content-type in the process 9228 while ( dataTypes[ 0 ] === "*" ) { 9229 dataTypes.shift(); 9230 if ( ct === undefined ) { 9231 ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); 9232 } 9233 } 9234 9235 // Check if we're dealing with a known content-type 9236 if ( ct ) { 9237 for ( type in contents ) { 9238 if ( contents[ type ] && contents[ type ].test( ct ) ) { 9239 dataTypes.unshift( type ); 9240 break; 9241 } 9242 } 9243 } 9244 9245 // Check to see if we have a response for the expected dataType 9246 if ( dataTypes[ 0 ] in responses ) { 9247 finalDataType = dataTypes[ 0 ]; 9248 } else { 9249
vendor: 6,163 bytes, lines 9250-9517
9250 // Try convertible dataTypes 9251 for ( type in responses ) { 9252 if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { 9253 finalDataType = type; 9254 break; 9255 } 9256 if ( !firstDataType ) { 9257 firstDataType = type; 9258 } 9259 } 9260 9261 // Or just use first one 9262 finalDataType = finalDataType || firstDataType; 9263 } 9264 9265 // If we found a dataType 9266 // We add the dataType to the list if needed 9267 // and return the corresponding response 9268 if ( finalDataType ) { 9269 if ( finalDataType !== dataTypes[ 0 ] ) { 9270 dataTypes.unshift( finalDataType ); 9271 } 9272 return responses[ finalDataType ]; 9273 } 9274} 9275 9276/* Chain conversions given the request and the original response 9277 * Also sets the responseXXX fields on the jqXHR instance 9278 */ 9279function ajaxConvert( s, response, jqXHR, isSuccess ) { 9280 var conv2, current, conv, tmp, prev, 9281 converters = {}, 9282 9283 // Work with a copy of dataTypes in case we need to modify it for conversion 9284 dataTypes = s.dataTypes.slice(); 9285 9286 // Create converters map with lowercased keys 9287 if ( dataTypes[ 1 ] ) { 9288 for ( conv in s.converters ) { 9289 converters[ conv.toLowerCase() ] = s.converters[ conv ]; 9290 } 9291 } 9292 9293 current = dataTypes.shift(); 9294 9295 // Convert to each sequential dataType 9296 while ( current ) { 9297 9298 if ( s.responseFields[ current ] ) { 9299 jqXHR[ s.responseFields[ current ] ] = response; 9300 } 9301 9302 // Apply the dataFilter if provided 9303 if ( !prev && isSuccess && s.dataFilter ) { 9304 response = s.dataFilter( response, s.dataType ); 9305 } 9306 9307 prev = current; 9308 current = dataTypes.shift(); 9309 9310 if ( current ) { 9311 9312 // There's only work to do if current dataType is non-auto 9313 if ( current === "*" ) { 9314 9315 current = prev; 9316 9317 // Convert response if prev dataType is non-auto and differs from current 9318 } else if ( prev !== "*" && prev !== current ) { 9319 9320 // Seek a direct converter 9321 conv = converters[ prev + " " + current ] || converters[ "* " + current ]; 9322 9323 // If none found, seek a pair 9324 if ( !conv ) { 9325 for ( conv2 in converters ) { 9326 9327 // If conv2 outputs current 9328 tmp = conv2.split( " " ); 9329 if ( tmp[ 1 ] === current ) { 9330 9331 // If prev can be converted to accepted input 9332 conv = converters[ prev + " " + tmp[ 0 ] ] || 9333 converters[ "* " + tmp[ 0 ] ]; 9334 if ( conv ) { 9335 9336 // Condense equivalence converters 9337 if ( conv === true ) { 9338 conv = converters[ conv2 ]; 9339 9340 // Otherwise, insert the intermediate dataType 9341 } else if ( converters[ conv2 ] !== true ) { 9342 current = tmp[ 0 ]; 9343 dataTypes.unshift( tmp[ 1 ] ); 9344 } 9345 break; 9346 } 9347 } 9348 } 9349 } 9350 9351 // Apply converter (if not an equivalence) 9352 if ( conv !== true ) { 9353 9354 // Unless errors are allowed to bubble, catch and return them 9355 if ( conv && s.throws ) { 9356 response = conv( response ); 9357 } else { 9358 try { 9359 response = conv( response ); 9360 } catch ( e ) { 9361 return { 9362 state: "parsererror", 9363 error: conv ? e : "No conversion from " + prev + " to " + current 9364 }; 9365 } 9366 } 9367 } 9368 } 9369 } 9370 } 9371 9372 return { state: "success", data: response }; 9373} 9374 9375jQuery.extend( { 9376 9377 // Counter for holding the number of active queries 9378 active: 0, 9379 9380 // Last-Modified header cache for next request 9381 lastModified: {}, 9382 etag: {}, 9383 9384 ajaxSettings: { 9385 url: location.href, 9386 type: "GET", 9387 isLocal: rlocalProtocol.test( location.protocol ), 9388 global: true, 9389 processData: true, 9390 async: true, 9391 contentType: "application/x-www-form-urlencoded; charset=UTF-8", 9392 9393 /* 9394 timeout: 0, 9395 data: null, 9396 dataType: null, 9397 username: null, 9398 password: null, 9399 cache: null, 9400 throws: false, 9401 traditional: false, 9402 headers: {}, 9403 */ 9404 9405 accepts: { 9406 "*": allTypes, 9407 text: "text/plain", 9408 html: "text/html", 9409 xml: "application/xml, text/xml", 9410 json: "application/json, text/javascript" 9411 }, 9412 9413 contents: { 9414 xml: /\bxml\b/, 9415 html: /\bhtml/, 9416 json: /\bjson\b/ 9417 }, 9418 9419 responseFields: { 9420 xml: "responseXML", 9421 text: "responseText", 9422 json: "responseJSON" 9423 }, 9424 9425 // Data converters 9426 // Keys separate source (or catchall "*") and destination types with a single space 9427 converters: { 9428 9429 // Convert anything to text 9430 "* text": String, 9431 9432 // Text to html (true = no transformation) 9433 "text html": true, 9434 9435 // Evaluate text as a json expression 9436 "text json": JSON.parse, 9437 9438 // Parse text as xml 9439 "text xml": jQuery.parseXML 9440 }, 9441 9442 // For options that shouldn't be deep extended: 9443 // you can add your own custom options here if 9444 // and when you create one that shouldn't be 9445 // deep extended (see ajaxExtend) 9446 flatOptions: { 9447 url: true, 9448 context: true 9449 } 9450 }, 9451 9452 // Creates a full fledged settings object into target 9453 // with both ajaxSettings and settings fields. 9454 // If target is omitted, writes into ajaxSettings. 9455 ajaxSetup: function( target, settings ) { 9456 return settings ? 9457 9458 // Building a settings object 9459 ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : 9460 9461 // Extending ajaxSettings 9462 ajaxExtend( jQuery.ajaxSettings, target ); 9463 }, 9464 9465 ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), 9466 ajaxTransport: addToPrefiltersOrTransports( transports ), 9467 9468 // Main method 9469 ajax: function( url, options ) { 9470 9471 // If url is an object, simulate pre-1.5 signature 9472 if ( typeof url === "object" ) { 9473 options = url; 9474 url = undefined; 9475 } 9476 9477 // Force options to be an object 9478 options = options || {}; 9479 9480 var transport, 9481 9482 // URL without anti-cache param 9483 cacheURL, 9484 9485 // Response headers 9486 responseHeadersString, 9487 responseHeaders, 9488 9489 // timeout handle 9490 timeoutTimer, 9491 9492 // Url cleanup var 9493 urlAnchor, 9494 9495 // Request state (becomes false upon send and true upon completion) 9496 completed, 9497 9498 // To know if global events are to be dispatched 9499 fireGlobals, 9500 9501 // Loop variable 9502 i, 9503 9504 // uncached part of the url 9505 uncached, 9506 9507 // Create the final options object 9508 s = jQuery.ajaxSetup( {}, options ), 9509 9510 // Callbacks context 9511 callbackContext = s.context || s, 9512 9513 // Context for global events is callbackContext if it is a DOM node or jQuery collection 9514 globalEventContext = s.context && 9515 ( callbackContext.nodeType || callbackContext.jquery ) ? 9516 jQuery( callbackContext ) : 9517
vendor: 8,850 bytes, lines 9517-9829
9517 jQuery.event, 9518 9519 // Deferreds 9520 deferred = jQuery.Deferred(), 9521 completeDeferred = jQuery.Callbacks( "once memory" ), 9522 9523 // Status-dependent callbacks 9524 statusCode = s.statusCode || {}, 9525 9526 // Headers (they are sent all at once) 9527 requestHeaders = {}, 9528 requestHeadersNames = {}, 9529 9530 // Default abort message 9531 strAbort = "canceled", 9532 9533 // Fake xhr 9534 jqXHR = { 9535 readyState: 0, 9536 9537 // Builds headers hashtable if needed 9538 getResponseHeader: function( key ) { 9539 var match; 9540 if ( completed ) { 9541 if ( !responseHeaders ) { 9542 responseHeaders = {}; 9543 while ( ( match = rheaders.exec( responseHeadersString ) ) ) { 9544 responseHeaders[ match[ 1 ].toLowerCase() + " " ] = 9545 ( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] ) 9546 .concat( match[ 2 ] ); 9547 } 9548 } 9549 match = responseHeaders[ key.toLowerCase() + " " ]; 9550 } 9551 return match == null ? null : match.join( ", " ); 9552 }, 9553 9554 // Raw string 9555 getAllResponseHeaders: function() { 9556 return completed ? responseHeadersString : null; 9557 }, 9558 9559 // Caches the header 9560 setRequestHeader: function( name, value ) { 9561 if ( completed == null ) { 9562 name = requestHeadersNames[ name.toLowerCase() ] = 9563 requestHeadersNames[ name.toLowerCase() ] || name; 9564 requestHeaders[ name ] = value; 9565 } 9566 return this; 9567 }, 9568 9569 // Overrides response content-type header 9570 overrideMimeType: function( type ) { 9571 if ( completed == null ) { 9572 s.mimeType = type; 9573 } 9574 return this; 9575 }, 9576 9577 // Status-dependent callbacks 9578 statusCode: function( map ) { 9579 var code; 9580 if ( map ) { 9581 if ( completed ) { 9582 9583 // Execute the appropriate callbacks 9584 jqXHR.always( map[ jqXHR.status ] ); 9585 } else { 9586 9587 // Lazy-add the new callbacks in a way that preserves old ones 9588 for ( code in map ) { 9589 statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; 9590 } 9591 } 9592 } 9593 return this; 9594 }, 9595 9596 // Cancel the request 9597 abort: function( statusText ) { 9598 var finalText = statusText || strAbort; 9599 if ( transport ) { 9600 transport.abort( finalText ); 9601 } 9602 done( 0, finalText ); 9603 return this; 9604 } 9605 }; 9606 9607 // Attach deferreds 9608 deferred.promise( jqXHR ); 9609 9610 // Add protocol if not provided (prefilters might expect it) 9611 // Handle falsy url in the settings object (#10093: consistency with old signature) 9612 // We also use the url parameter if available 9613 s.url = ( ( url || s.url || location.href ) + "" ) 9614 .replace( rprotocol, location.protocol + "//" ); 9615 9616 // Alias method option to type as per ticket #12004 9617 s.type = options.method || options.type || s.method || s.type; 9618 9619 // Extract dataTypes list 9620 s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; 9621 9622 // A cross-domain request is in order when the origin doesn't match the current origin. 9623 if ( s.crossDomain == null ) { 9624 urlAnchor = document.createElement( "a" ); 9625 9626 // Support: IE <=8 - 11, Edge 12 - 15 9627 // IE throws exception on accessing the href property if url is malformed, 9628 // e.g. http://example.com:80x/ 9629 try { 9630 urlAnchor.href = s.url; 9631 9632 // Support: IE <=8 - 11 only 9633 // Anchor's host property isn't correctly set when s.url is relative 9634 urlAnchor.href = urlAnchor.href; 9635 s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== 9636 urlAnchor.protocol + "//" + urlAnchor.host; 9637 } catch ( e ) { 9638 9639 // If there is an error parsing the URL, assume it is crossDomain, 9640 // it can be rejected by the transport if it is invalid 9641 s.crossDomain = true; 9642 } 9643 } 9644 9645 // Convert data if not already a string 9646 if ( s.data && s.processData && typeof s.data !== "string" ) { 9647 s.data = jQuery.param( s.data, s.traditional ); 9648 } 9649 9650 // Apply prefilters 9651 inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); 9652 9653 // If request was aborted inside a prefilter, stop there 9654 if ( completed ) { 9655 return jqXHR; 9656 } 9657 9658 // We can fire global events as of now if asked to 9659 // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) 9660 fireGlobals = jQuery.event && s.global; 9661 9662 // Watch for a new set of requests 9663 if ( fireGlobals && jQuery.active++ === 0 ) { 9664 jQuery.event.trigger( "ajaxStart" ); 9665 } 9666 9667 // Uppercase the type 9668 s.type = s.type.toUpperCase(); 9669 9670 // Determine if request has content 9671 s.hasContent = !rnoContent.test( s.type ); 9672 9673 // Save the URL in case we're toying with the If-Modified-Since 9674 // and/or If-None-Match header later on 9675 // Remove hash to simplify url manipulation 9676 cacheURL = s.url.replace( rhash, "" ); 9677 9678 // More options handling for requests with no content 9679 if ( !s.hasContent ) { 9680 9681 // Remember the hash so we can put it back 9682 uncached = s.url.slice( cacheURL.length ); 9683 9684 // If data is available and should be processed, append data to url 9685 if ( s.data && ( s.processData || typeof s.data === "string" ) ) { 9686 cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; 9687 9688 // #9682: remove data so that it's not used in an eventual retry 9689 delete s.data; 9690 } 9691 9692 // Add or update anti-cache param if needed 9693 if ( s.cache === false ) { 9694 cacheURL = cacheURL.replace( rantiCache, "$1" ); 9695 uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) + 9696 uncached; 9697 } 9698 9699 // Put hash and anti-cache on the URL that will be requested (gh-1732) 9700 s.url = cacheURL + uncached; 9701 9702 // Change '%20' to '+' if this is encoded form body content (gh-2658) 9703 } else if ( s.data && s.processData && 9704 ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { 9705 s.data = s.data.replace( r20, "+" ); 9706 } 9707 9708 // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. 9709 if ( s.ifModified ) { 9710 if ( jQuery.lastModified[ cacheURL ] ) { 9711 jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); 9712 } 9713 if ( jQuery.etag[ cacheURL ] ) { 9714 jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); 9715 } 9716 } 9717 9718 // Set the correct header, if data is being sent 9719 if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { 9720 jqXHR.setRequestHeader( "Content-Type", s.contentType ); 9721 } 9722 9723 // Set the Accepts header for the server, depending on the dataType 9724 jqXHR.setRequestHeader( 9725 "Accept", 9726 s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? 9727 s.accepts[ s.dataTypes[ 0 ] ] + 9728 ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : 9729 s.accepts[ "*" ] 9730 ); 9731 9732 // Check for headers option 9733 for ( i in s.headers ) { 9734 jqXHR.setRequestHeader( i, s.headers[ i ] ); 9735 } 9736 9737 // Allow custom headers/mimetypes and early abort 9738 if ( s.beforeSend && 9739 ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { 9740 9741 // Abort if not done already and return 9742 return jqXHR.abort(); 9743 } 9744 9745 // Aborting is no longer a cancellation 9746 strAbort = "abort"; 9747 9748 // Install callbacks on deferreds 9749 completeDeferred.add( s.complete ); 9750 jqXHR.done( s.success ); 9751 jqXHR.fail( s.error ); 9752 9753 // Get transport 9754 transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); 9755 9756 // If no transport, we auto-abort 9757 if ( !transport ) { 9758 done( -1, "No Transport" ); 9759 } else { 9760 jqXHR.readyState = 1; 9761 9762 // Send global event 9763 if ( fireGlobals ) { 9764 globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); 9765 } 9766 9767 // If request was aborted inside ajaxSend, stop there 9768 if ( completed ) { 9769 return jqXHR; 9770 } 9771 9772 // Timeout 9773 if ( s.async && s.timeout > 0 ) { 9774 timeoutTimer = window.setTimeout( function() { 9775 jqXHR.abort( "timeout" ); 9776 }, s.timeout ); 9777 } 9778 9779 try { 9780 completed = false; 9781 transport.send( requestHeaders, done ); 9782 } catch ( e ) { 9783 9784 // Rethrow post-completion exceptions 9785 if ( completed ) { 9786 throw e; 9787 } 9788 9789 // Propagate others as results 9790 done( -1, e ); 9791 } 9792 } 9793 9794 // Callback for when everything is done 9795 function done( status, nativeStatusText, responses, headers ) { 9796 var isSuccess, success, error, response, modified, 9797 statusText = nativeStatusText; 9798 9799 // Ignore repeat invocations 9800 if ( completed ) { 9801 return; 9802 } 9803 9804 completed = true; 9805 9806 // Clear timeout if it exists 9807 if ( timeoutTimer ) { 9808 window.clearTimeout( timeoutTimer ); 9809 } 9810 9811 // Dereference transport for early garbage collection 9812 // (no matter how long the jqXHR object will be used) 9813 transport = undefined; 9814 9815 // Cache response headers 9816 responseHeadersString = headers || ""; 9817 9818 // Set readyState 9819 jqXHR.readyState = status > 0 ? 4 : 0; 9820 9821 // Determine if successful 9822 isSuccess = status >= 200 && status < 300 || status === 304; 9823 9824 // Get response data 9825 if ( responses ) { 9826 response = ajaxHandleResponses( s, jqXHR, responses ); 9827 } 9828 9829 // Use a noop converter for missing script
9829 9830 if ( !isSuccess && jQuery.inArray( "script", s.dataTypes ) > -1
vendor: 18,647 bytes, lines 9830-10568
9830 ) { 9831 s.converters[ "text script" ] = function() {}; 9832 } 9833 9834 // Convert no matter what (that way responseXXX fields are always set) 9835 response = ajaxConvert( s, response, jqXHR, isSuccess ); 9836 9837 // If successful, handle type chaining 9838 if ( isSuccess ) { 9839 9840 // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. 9841 if ( s.ifModified ) { 9842 modified = jqXHR.getResponseHeader( "Last-Modified" ); 9843 if ( modified ) { 9844 jQuery.lastModified[ cacheURL ] = modified; 9845 } 9846 modified = jqXHR.getResponseHeader( "etag" ); 9847 if ( modified ) { 9848 jQuery.etag[ cacheURL ] = modified; 9849 } 9850 } 9851 9852 // if no content 9853 if ( status === 204 || s.type === "HEAD" ) { 9854 statusText = "nocontent"; 9855 9856 // if not modified 9857 } else if ( status === 304 ) { 9858 statusText = "notmodified"; 9859 9860 // If we have data, let's convert it 9861 } else { 9862 statusText = response.state; 9863 success = response.data; 9864 error = response.error; 9865 isSuccess = !error; 9866 } 9867 } else { 9868 9869 // Extract error from statusText and normalize for non-aborts 9870 error = statusText; 9871 if ( status || !statusText ) { 9872 statusText = "error"; 9873 if ( status < 0 ) { 9874 status = 0; 9875 } 9876 } 9877 } 9878 9879 // Set data for the fake xhr object 9880 jqXHR.status = status; 9881 jqXHR.statusText = ( nativeStatusText || statusText ) + ""; 9882 9883 // Success/Error 9884 if ( isSuccess ) { 9885 deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); 9886 } else { 9887 deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); 9888 } 9889 9890 // Status-dependent callbacks 9891 jqXHR.statusCode( statusCode ); 9892 statusCode = undefined; 9893 9894 if ( fireGlobals ) { 9895 globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", 9896 [ jqXHR, s, isSuccess ? success : error ] ); 9897 } 9898 9899 // Complete 9900 completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); 9901 9902 if ( fireGlobals ) { 9903 globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); 9904 9905 // Handle the global AJAX counter 9906 if ( !( --jQuery.active ) ) { 9907 jQuery.event.trigger( "ajaxStop" ); 9908 } 9909 } 9910 } 9911 9912 return jqXHR; 9913 }, 9914 9915 getJSON: function( url, data, callback ) { 9916 return jQuery.get( url, data, callback, "json" ); 9917 }, 9918 9919 getScript: function( url, callback ) { 9920 return jQuery.get( url, undefined, callback, "script" ); 9921 } 9922} ); 9923 9924jQuery.each( [ "get", "post" ], function( _i, method ) { 9925 jQuery[ method ] = function( url, data, callback, type ) { 9926 9927 // Shift arguments if data argument was omitted 9928 if ( isFunction( data ) ) { 9929 type = type || callback; 9930 callback = data; 9931 data = undefined; 9932 } 9933 9934 // The url can be an options object (which then must have .url) 9935 return jQuery.ajax( jQuery.extend( { 9936 url: url, 9937 type: method, 9938 dataType: type, 9939 data: data, 9940 success: callback 9941 }, jQuery.isPlainObject( url ) && url ) ); 9942 }; 9943} ); 9944 9945jQuery.ajaxPrefilter( function( s ) { 9946 var i; 9947 for ( i in s.headers ) { 9948 if ( i.toLowerCase() === "content-type" ) { 9949 s.contentType = s.headers[ i ] || ""; 9950 } 9951 } 9952} ); 9953 9954 9955jQuery._evalUrl = function( url, options, doc ) { 9956 return jQuery.ajax( { 9957 url: url, 9958 9959 // Make this explicit, since user can override this through ajaxSetup (#11264) 9960 type: "GET", 9961 dataType: "script", 9962 cache: true, 9963 async: false, 9964 global: false, 9965 9966 // Only evaluate the response if it is successful (gh-4126) 9967 // dataFilter is not invoked for failure responses, so using it instead 9968 // of the default converter is kludgy but it works. 9969 converters: { 9970 "text script": function() {} 9971 }, 9972 dataFilter: function( response ) { 9973 jQuery.globalEval( response, options, doc ); 9974 } 9975 } ); 9976}; 9977 9978 9979jQuery.fn.extend( { 9980 wrapAll: function( html ) { 9981 var wrap; 9982 9983 if ( this[ 0 ] ) { 9984 if ( isFunction( html ) ) { 9985 html = html.call( this[ 0 ] ); 9986 } 9987 9988 // The elements to wrap the target around 9989 wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); 9990 9991 if ( this[ 0 ].parentNode ) { 9992 wrap.insertBefore( this[ 0 ] ); 9993 } 9994 9995 wrap.map( function() { 9996 var elem = this; 9997 9998 while ( elem.firstElementChild ) { 9999 elem = elem.firstElementChild; 10000 } 10001 10002 return elem; 10003 } ).append( this ); 10004 } 10005 10006 return this; 10007 }, 10008 10009 wrapInner: function( html ) { 10010 if ( isFunction( html ) ) { 10011 return this.each( function( i ) { 10012 jQuery( this ).wrapInner( html.call( this, i ) ); 10013 } ); 10014 } 10015 10016 return this.each( function() { 10017 var self = jQuery( this ), 10018 contents = self.contents(); 10019 10020 if ( contents.length ) { 10021 contents.wrapAll( html ); 10022 10023 } else { 10024 self.append( html ); 10025 } 10026 } ); 10027 }, 10028 10029 wrap: function( html ) { 10030 var htmlIsFunction = isFunction( html ); 10031 10032 return this.each( function( i ) { 10033 jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html ); 10034 } ); 10035 }, 10036 10037 unwrap: function( selector ) { 10038 this.parent( selector ).not( "body" ).each( function() { 10039 jQuery( this ).replaceWith( this.childNodes ); 10040 } ); 10041 return this; 10042 } 10043} ); 10044 10045 10046jQuery.expr.pseudos.hidden = function( elem ) { 10047 return !jQuery.expr.pseudos.visible( elem ); 10048}; 10049jQuery.expr.pseudos.visible = function( elem ) { 10050 return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); 10051}; 10052 10053 10054 10055 10056jQuery.ajaxSettings.xhr = function() { 10057 try { 10058 return new window.XMLHttpRequest(); 10059 } catch ( e ) {} 10060}; 10061 10062var xhrSuccessStatus = { 10063 10064 // File protocol always yields status code 0, assume 200 10065 0: 200, 10066 10067 // Support: IE <=9 only 10068 // #1450: sometimes IE returns 1223 when it should be 204 10069 1223: 204 10070 }, 10071 xhrSupported = jQuery.ajaxSettings.xhr(); 10072 10073support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); 10074support.ajax = xhrSupported = !!xhrSupported; 10075 10076jQuery.ajaxTransport( function( options ) { 10077 var callback, errorCallback; 10078 10079 // Cross domain only allowed if supported through XMLHttpRequest 10080 if ( support.cors || xhrSupported && !options.crossDomain ) { 10081 return { 10082 send: function( headers, complete ) { 10083 var i, 10084 xhr = options.xhr(); 10085 10086 xhr.open( 10087 options.type, 10088 options.url, 10089 options.async, 10090 options.username, 10091 options.password 10092 ); 10093 10094 // Apply custom fields if provided 10095 if ( options.xhrFields ) { 10096 for ( i in options.xhrFields ) { 10097 xhr[ i ] = options.xhrFields[ i ]; 10098 } 10099 } 10100 10101 // Override mime type if needed 10102 if ( options.mimeType && xhr.overrideMimeType ) { 10103 xhr.overrideMimeType( options.mimeType ); 10104 } 10105 10106 // X-Requested-With header 10107 // For cross-domain requests, seeing as conditions for a preflight are 10108 // akin to a jigsaw puzzle, we simply never set it to be sure. 10109 // (it can always be set on a per-request basis or even using ajaxSetup) 10110 // For same-domain requests, won't change header if already provided. 10111 if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { 10112 headers[ "X-Requested-With" ] = "XMLHttpRequest"; 10113 } 10114 10115 // Set headers 10116 for ( i in headers ) { 10117 xhr.setRequestHeader( i, headers[ i ] ); 10118 } 10119 10120 // Callback 10121 callback = function( type ) { 10122 return function() { 10123 if ( callback ) { 10124 callback = errorCallback = xhr.onload = 10125 xhr.onerror = xhr.onabort = xhr.ontimeout = 10126 xhr.onreadystatechange = null; 10127 10128 if ( type === "abort" ) { 10129 xhr.abort(); 10130 } else if ( type === "error" ) { 10131 10132 // Support: IE <=9 only 10133 // On a manual native abort, IE9 throws 10134 // errors on any property access that is not readyState 10135 if ( typeof xhr.status !== "number" ) { 10136 complete( 0, "error" ); 10137 } else { 10138 complete( 10139 10140 // File: protocol always yields status 0; see #8605, #14207 10141 xhr.status, 10142 xhr.statusText 10143 ); 10144 } 10145 } else { 10146 complete( 10147 xhrSuccessStatus[ xhr.status ] || xhr.status, 10148 xhr.statusText, 10149 10150 // Support: IE <=9 only 10151 // IE9 has no XHR2 but throws on binary (trac-11426) 10152 // For XHR2 non-text, let the caller handle it (gh-2498) 10153 ( xhr.responseType || "text" ) !== "text" || 10154 typeof xhr.responseText !== "string" ? 10155 { binary: xhr.response } : 10156 { text: xhr.responseText }, 10157 xhr.getAllResponseHeaders() 10158 ); 10159 } 10160 } 10161 }; 10162 }; 10163 10164 // Listen to events 10165 xhr.onload = callback(); 10166 errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" ); 10167 10168 // Support: IE 9 only 10169 // Use onreadystatechange to replace onabort 10170 // to handle uncaught aborts 10171 if ( xhr.onabort !== undefined ) { 10172 xhr.onabort = errorCallback; 10173 } else { 10174 xhr.onreadystatechange = function() { 10175 10176 // Check readyState before timeout as it changes 10177 if ( xhr.readyState === 4 ) { 10178 10179 // Allow onerror to be called first, 10180 // but that will not handle a native abort 10181 // Also, save errorCallback to a variable 10182 // as xhr.onerror cannot be accessed 10183 window.setTimeout( function() { 10184 if ( callback ) { 10185 errorCallback(); 10186 } 10187 } ); 10188 } 10189 }; 10190 } 10191 10192 // Create the abort callback 10193 callback = callback( "abort" ); 10194 10195 try { 10196 10197 // Do send the request (this may raise an exception) 10198 xhr.send( options.hasContent && options.data || null ); 10199 } catch ( e ) { 10200 10201 // #14683: Only rethrow if this hasn't been notified as an error yet 10202 if ( callback ) { 10203 throw e; 10204 } 10205 } 10206 }, 10207 10208 abort: function() { 10209 if ( callback ) { 10210 callback(); 10211 } 10212 } 10213 }; 10214 } 10215} ); 10216 10217 10218 10219 10220// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) 10221jQuery.ajaxPrefilter( function( s ) { 10222 if ( s.crossDomain ) { 10223 s.contents.script = false; 10224 } 10225} ); 10226 10227// Install script dataType 10228jQuery.ajaxSetup( { 10229 accepts: { 10230 script: "text/javascript, application/javascript, " + 10231 "application/ecmascript, application/x-ecmascript" 10232 }, 10233 contents: { 10234 script: /\b(?:java|ecma)script\b/ 10235 }, 10236 converters: { 10237 "text script": function( text ) { 10238 jQuery.globalEval( text ); 10239 return text; 10240 } 10241 } 10242} ); 10243 10244// Handle cache's special case and crossDomain 10245jQuery.ajaxPrefilter( "script", function( s ) { 10246 if ( s.cache === undefined ) { 10247 s.cache = false; 10248 } 10249 if ( s.crossDomain ) { 10250 s.type = "GET"; 10251 } 10252} ); 10253 10254// Bind script tag hack transport 10255jQuery.ajaxTransport( "script", function( s ) { 10256 10257 // This transport only deals with cross domain or forced-by-attrs requests 10258 if ( s.crossDomain || s.scriptAttrs ) { 10259 var script, callback; 10260 return { 10261 send: function( _, complete ) { 10262 script = jQuery( "<script>" ) 10263 .attr( s.scriptAttrs || {} ) 10264 .prop( { charset: s.scriptCharset, src: s.url } ) 10265 .on( "load error", callback = function( evt ) { 10266 script.remove(); 10267 callback = null; 10268 if ( evt ) { 10269 complete( evt.type === "error" ? 404 : 200, evt.type ); 10270 } 10271 } ); 10272 10273 // Use native DOM manipulation to avoid our domManip AJAX trickery 10274 document.head.appendChild( script[ 0 ] ); 10275 }, 10276 abort: function() { 10277 if ( callback ) { 10278 callback(); 10279 } 10280 } 10281 }; 10282 } 10283} ); 10284 10285 10286 10287 10288var oldCallbacks = [], 10289 rjsonp = /(=)\?(?=&|$)|\?\?/; 10290 10291// Default jsonp settings 10292jQuery.ajaxSetup( { 10293 jsonp: "callback", 10294 jsonpCallback: function() { 10295 var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce.guid++ ) ); 10296 this[ callback ] = true; 10297 return callback; 10298 } 10299} ); 10300 10301// Detect, normalize options and install callbacks for jsonp requests 10302jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { 10303 10304 var callbackName, overwritten, responseContainer, 10305 jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? 10306 "url" : 10307 typeof s.data === "string" && 10308 ( s.contentType || "" ) 10309 .indexOf( "application/x-www-form-urlencoded" ) === 0 && 10310 rjsonp.test( s.data ) && "data" 10311 ); 10312 10313 // Handle iff the expected data type is "jsonp" or we have a parameter to set 10314 if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { 10315 10316 // Get callback name, remembering preexisting value associated with it 10317 callbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ? 10318 s.jsonpCallback() : 10319 s.jsonpCallback; 10320 10321 // Insert callback into url or form data 10322 if ( jsonProp ) { 10323 s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); 10324 } else if ( s.jsonp !== false ) { 10325 s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; 10326 } 10327 10328 // Use data converter to retrieve json after script execution 10329 s.converters[ "script json" ] = function() { 10330 if ( !responseContainer ) { 10331 jQuery.error( callbackName + " was not called" ); 10332 } 10333 return responseContainer[ 0 ]; 10334 }; 10335 10336 // Force json dataType 10337 s.dataTypes[ 0 ] = "json"; 10338 10339 // Install callback 10340 overwritten = window[ callbackName ]; 10341 window[ callbackName ] = function() { 10342 responseContainer = arguments; 10343 }; 10344 10345 // Clean-up function (fires after converters) 10346 jqXHR.always( function() { 10347 10348 // If previous value didn't exist - remove it 10349 if ( overwritten === undefined ) { 10350 jQuery( window ).removeProp( callbackName ); 10351 10352 // Otherwise restore preexisting value 10353 } else { 10354 window[ callbackName ] = overwritten; 10355 } 10356 10357 // Save back as free 10358 if ( s[ callbackName ] ) { 10359 10360 // Make sure that re-using the options doesn't screw things around 10361 s.jsonpCallback = originalSettings.jsonpCallback; 10362 10363 // Save the callback name for future use 10364 oldCallbacks.push( callbackName ); 10365 } 10366 10367 // Call if it was a function and we have a response 10368 if ( responseContainer && isFunction( overwritten ) ) { 10369 overwritten( responseContainer[ 0 ] ); 10370 } 10371 10372 responseContainer = overwritten = undefined; 10373 } ); 10374 10375 // Delegate to script 10376 return "script"; 10377 } 10378} ); 10379 10380 10381 10382 10383// Support: Safari 8 only 10384// In Safari 8 documents created via document.implementation.createHTMLDocument 10385// collapse sibling forms: the second one becomes a child of the first one. 10386// Because of that, this security measure has to be disabled in Safari 8. 10387// https://bugs.webkit.org/show_bug.cgi?id=137337 10388support.createHTMLDocument = ( function() { 10389 var body = document.implementation.createHTMLDocument( "" ).body; 10390 body.innerHTML = "<form></form><form></form>"; 10391 return body.childNodes.length === 2; 10392} )(); 10393 10394 10395// Argument "data" should be string of html 10396// context (optional): If specified, the fragment will be created in this context, 10397// defaults to document 10398// keepScripts (optional): If true, will include scripts passed in the html string 10399jQuery.parseHTML = function( data, context, keepScripts ) { 10400 if ( typeof data !== "string" ) { 10401 return []; 10402 } 10403 if ( typeof context === "boolean" ) { 10404 keepScripts = context; 10405 context = false; 10406 } 10407 10408 var base, parsed, scripts; 10409 10410 if ( !context ) { 10411 10412 // Stop scripts or inline event handlers from being executed immediately 10413 // by using document.implementation 10414 if ( support.createHTMLDocument ) { 10415 context = document.implementation.createHTMLDocument( "" ); 10416 10417 // Set the base href for the created document 10418 // so any parsed elements with URLs 10419 // are based on the document's URL (gh-2965) 10420 base = context.createElement( "base" ); 10421 base.href = document.location.href; 10422 context.head.appendChild( base ); 10423 } else { 10424 context = document; 10425 } 10426 } 10427 10428 parsed = rsingleTag.exec( data ); 10429 scripts = !keepScripts && []; 10430 10431 // Single tag 10432 if ( parsed ) { 10433 return [ context.createElement( parsed[ 1 ] ) ]; 10434 } 10435 10436 parsed = buildFragment( [ data ], context, scripts ); 10437 10438 if ( scripts && scripts.length ) { 10439 jQuery( scripts ).remove(); 10440 } 10441 10442 return jQuery.merge( [], parsed.childNodes ); 10443}; 10444 10445 10446/** 10447 * Load a url into a page 10448 */ 10449jQuery.fn.load = function( url, params, callback ) { 10450 var selector, type, response, 10451 self = this, 10452 off = url.indexOf( " " ); 10453 10454 if ( off > -1 ) { 10455 selector = stripAndCollapse( url.slice( off ) ); 10456 url = url.slice( 0, off ); 10457 } 10458 10459 // If it's a function 10460 if ( isFunction( params ) ) { 10461 10462 // We assume that it's the callback 10463 callback = params; 10464 params = undefined; 10465 10466 // Otherwise, build a param string 10467 } else if ( params && typeof params === "object" ) { 10468 type = "POST"; 10469 } 10470 10471 // If we have elements to modify, make the request 10472 if ( self.length > 0 ) { 10473 jQuery.ajax( { 10474 url: url, 10475 10476 // If "type" variable is undefined, then "GET" method will be used. 10477 // Make value of this field explicit since 10478 // user can override it through ajaxSetup method 10479 type: type || "GET", 10480 dataType: "html", 10481 data: params 10482 } ).done( function( responseText ) { 10483 10484 // Save response for use in complete callback 10485 response = arguments; 10486 10487 self.html( selector ? 10488 10489 // If a selector was specified, locate the right elements in a dummy div 10490 // Exclude scripts to avoid IE 'Permission Denied' errors 10491 jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) : 10492 10493 // Otherwise use the full result 10494 responseText ); 10495 10496 // If the request succeeds, this function gets "data", "status", "jqXHR" 10497 // but they are ignored because response was set above. 10498 // If it fails, this function gets "jqXHR", "status", "error" 10499 } ).always( callback && function( jqXHR, status ) { 10500 self.each( function() { 10501 callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] ); 10502 } ); 10503 } ); 10504 } 10505 10506 return this; 10507}; 10508 10509 10510 10511 10512jQuery.expr.pseudos.animated = function( elem ) { 10513 return jQuery.grep( jQuery.timers, function( fn ) { 10514 return elem === fn.elem; 10515 } ).length; 10516}; 10517 10518 10519 10520 10521jQuery.offset = { 10522 setOffset: function( elem, options, i ) { 10523 var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition, 10524 position = jQuery.css( elem, "position" ), 10525 curElem = jQuery( elem ), 10526 props = {}; 10527 10528 // Set position first, in-case top/left are set even on static elem 10529 if ( position === "static" ) { 10530 elem.style.position = "relative"; 10531 } 10532 10533 curOffset = curElem.offset(); 10534 curCSSTop = jQuery.css( elem, "top" ); 10535 curCSSLeft = jQuery.css( elem, "left" ); 10536 calculatePosition = ( position === "absolute" || position === "fixed" ) && 10537 ( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1; 10538 10539 // Need to be able to calculate position if either 10540 // top or left is auto and position is either absolute or fixed 10541 if ( calculatePosition ) { 10542 curPosition = curElem.position(); 10543 curTop = curPosition.top; 10544 curLeft = curPosition.left; 10545 10546 } else { 10547 curTop = parseFloat( curCSSTop ) || 0; 10548 curLeft = parseFloat( curCSSLeft ) || 0; 10549 } 10550 10551 if ( isFunction( options ) ) { 10552 10553 // Use jQuery.extend here to allow modification of coordinates argument (gh-1848) 10554 options = options.call( elem, i, jQuery.extend( {}, curOffset ) ); 10555 } 10556 10557 if ( options.top != null ) { 10558 props.top = ( options.top - curOffset.top ) + curTop; 10559 } 10560 if ( options.left != null ) { 10561 props.left = ( options.left - curOffset.left ) + curLeft; 10562 } 10563 10564 if ( "using" in options ) { 10565 options.using.call( elem, props ); 10566 10567 } else { 10568
vendor: 2,160 bytes, lines 10568-10646
10568if ( typeof props.top === "number" ) { 10569 props.top += "px"; 10570 } 10571 if ( typeof props.left === "number" ) { 10572 props.left += "px"; 10573 } 10574 curElem.css( props ); 10575 } 10576 } 10577}; 10578 10579jQuery.fn.extend( { 10580 10581 // offset() relates an element's border box to the document origin 10582 offset: function( options ) { 10583 10584 // Preserve chaining for setter 10585 if ( arguments.length ) { 10586 return options === undefined ? 10587 this : 10588 this.each( function( i ) { 10589 jQuery.offset.setOffset( this, options, i ); 10590 } ); 10591 } 10592 10593 var rect, win, 10594 elem = this[ 0 ]; 10595 10596 if ( !elem ) { 10597 return; 10598 } 10599 10600 // Return zeros for disconnected and hidden (display: none) elements (gh-2310) 10601 // Support: IE <=11 only 10602 // Running getBoundingClientRect on a 10603 // disconnected node in IE throws an error 10604 if ( !elem.getClientRects().length ) { 10605 return { top: 0, left: 0 }; 10606 } 10607 10608 // Get document-relative position by adding viewport scroll to viewport-relative gBCR 10609 rect = elem.getBoundingClientRect(); 10610 win = elem.ownerDocument.defaultView; 10611 return { 10612 top: rect.top + win.pageYOffset, 10613 left: rect.left + win.pageXOffset 10614 }; 10615 }, 10616 10617 // position() relates an element's margin box to its offset parent's padding box 10618 // This corresponds to the behavior of CSS absolute positioning 10619 position: function() { 10620 if ( !this[ 0 ] ) { 10621 return; 10622 } 10623 10624 var offsetParent, offset, doc, 10625 elem = this[ 0 ], 10626 parentOffset = { top: 0, left: 0 }; 10627 10628 // position:fixed elements are offset from the viewport, which itself always has zero offset 10629 if ( jQuery.css( elem, "position" ) === "fixed" ) { 10630 10631 // Assume position:fixed implies availability of getBoundingClientRect 10632 offset = elem.getBoundingClientRect(); 10633 10634 } else { 10635 offset = this.offset(); 10636 10637 // Account for the *real* offset parent, which can be the document or its root element 10638 // when a statically positioned element is identified 10639 doc = elem.ownerDocument; 10640 offsetParent = elem.offsetParent || doc.documentElement; 10641 while ( offsetParent && 10642 ( offsetParent === doc.body || offsetParent === doc.documentElement ) && 10643 jQuery.css( offsetParent, "position" ) === "static" ) { 10644 10645 offsetParent = offsetParent.parentNode; 10646 }
vendor: 7,719 bytes, lines 10647-10912
10647 if ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) { 10648 10649 // Incorporate borders into its offset, since they are outside its content origin 10650 parentOffset = jQuery( offsetParent ).offset(); 10651 parentOffset.top += jQuery.css( offsetParent, "borderTopWidth", true ); 10652 parentOffset.left += jQuery.css( offsetParent, "borderLeftWidth", true ); 10653 } 10654 } 10655 10656 // Subtract parent offsets and element margins 10657 return { 10658 top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ), 10659 left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true ) 10660 }; 10661 }, 10662 10663 // This method will return documentElement in the following cases: 10664 // 1) For the element inside the iframe without offsetParent, this method will return 10665 // documentElement of the parent window 10666 // 2) For the hidden or detached element 10667 // 3) For body or html element, i.e. in case of the html node - it will return itself 10668 // 10669 // but those exceptions were never presented as a real life use-cases 10670 // and might be considered as more preferable results. 10671 // 10672 // This logic, however, is not guaranteed and can change at any point in the future 10673 offsetParent: function() { 10674 return this.map( function() { 10675 var offsetParent = this.offsetParent; 10676 10677 while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) { 10678 offsetParent = offsetParent.offsetParent; 10679 } 10680 10681 return offsetParent || documentElement; 10682 } ); 10683 } 10684} ); 10685 10686// Create scrollLeft and scrollTop methods 10687jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) { 10688 var top = "pageYOffset" === prop; 10689 10690 jQuery.fn[ method ] = function( val ) { 10691 return access( this, function( elem, method, val ) { 10692 10693 // Coalesce documents and windows 10694 var win; 10695 if ( isWindow( elem ) ) { 10696 win = elem; 10697 } else if ( elem.nodeType === 9 ) { 10698 win = elem.defaultView; 10699 } 10700 10701 if ( val === undefined ) { 10702 return win ? win[ prop ] : elem[ method ]; 10703 } 10704 10705 if ( win ) { 10706 win.scrollTo( 10707 !top ? val : win.pageXOffset, 10708 top ? val : win.pageYOffset 10709 ); 10710 10711 } else { 10712 elem[ method ] = val; 10713 } 10714 }, method, val, arguments.length ); 10715 }; 10716} ); 10717 10718// Support: Safari <=7 - 9.1, Chrome <=37 - 49 10719// Add the top/left cssHooks using jQuery.fn.position 10720// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 10721// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347 10722// getComputedStyle returns percent when specified for top/left/bottom/right; 10723// rather than make the css module depend on the offset module, just check for it here 10724jQuery.each( [ "top", "left" ], function( _i, prop ) { 10725 jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition, 10726 function( elem, computed ) { 10727 if ( computed ) { 10728 computed = curCSS( elem, prop ); 10729 10730 // If curCSS returns percentage, fallback to offset 10731 return rnumnonpx.test( computed ) ? 10732 jQuery( elem ).position()[ prop ] + "px" : 10733 computed; 10734 } 10735 } 10736 ); 10737} ); 10738 10739 10740// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods 10741jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { 10742 jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, 10743 function( defaultExtra, funcName ) { 10744 10745 // Margin is only for outerHeight, outerWidth 10746 jQuery.fn[ funcName ] = function( margin, value ) { 10747 var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), 10748 extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); 10749 10750 return access( this, function( elem, type, value ) { 10751 var doc; 10752 10753 if ( isWindow( elem ) ) { 10754 10755 // $( window ).outerWidth/Height return w/h including scrollbars (gh-1729) 10756 return funcName.indexOf( "outer" ) === 0 ? 10757 elem[ "inner" + name ] : 10758 elem.document.documentElement[ "client" + name ]; 10759 } 10760 10761 // Get document width or height 10762 if ( elem.nodeType === 9 ) { 10763 doc = elem.documentElement; 10764 10765 // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], 10766 // whichever is greatest 10767 return Math.max( 10768 elem.body[ "scroll" + name ], doc[ "scroll" + name ], 10769 elem.body[ "offset" + name ], doc[ "offset" + name ], 10770 doc[ "client" + name ] 10771 ); 10772 } 10773 10774 return value === undefined ? 10775 10776 // Get width or height on the element, requesting but not forcing parseFloat 10777 jQuery.css( elem, type, extra ) : 10778 10779 // Set width or height on the element 10780 jQuery.style( elem, type, value, extra ); 10781 }, type, chainable ? margin : undefined, chainable ); 10782 }; 10783 } ); 10784} ); 10785 10786 10787jQuery.each( [ 10788 "ajaxStart", 10789 "ajaxStop", 10790 "ajaxComplete", 10791 "ajaxError", 10792 "ajaxSuccess", 10793 "ajaxSend" 10794], function( _i, type ) { 10795 jQuery.fn[ type ] = function( fn ) { 10796 return this.on( type, fn ); 10797 }; 10798} ); 10799 10800 10801 10802 10803jQuery.fn.extend( { 10804 10805 bind: function( types, data, fn ) { 10806 return this.on( types, null, data, fn ); 10807 }, 10808 unbind: function( types, fn ) { 10809 return this.off( types, null, fn ); 10810 }, 10811 10812 delegate: function( selector, types, data, fn ) { 10813 return this.on( types, selector, data, fn ); 10814 }, 10815 undelegate: function( selector, types, fn ) { 10816 10817 // ( namespace ) or ( selector, types [, fn] ) 10818 return arguments.length === 1 ? 10819 this.off( selector, "**" ) : 10820 this.off( types, selector || "**", fn ); 10821 }, 10822 10823 hover: function( fnOver, fnOut ) { 10824 return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); 10825 } 10826} ); 10827 10828jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + 10829 "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + 10830 "change select submit keydown keypress keyup contextmenu" ).split( " " ), 10831 function( _i, name ) { 10832 10833 // Handle event binding 10834 jQuery.fn[ name ] = function( data, fn ) { 10835 return arguments.length > 0 ? 10836 this.on( name, null, data, fn ) : 10837 this.trigger( name ); 10838 }; 10839 } ); 10840 10841 10842 10843 10844// Support: Android <=4.0 only 10845// Make sure we trim BOM and NBSP 10846var rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; 10847 10848// Bind a function to a context, optionally partially applying any 10849// arguments. 10850// jQuery.proxy is deprecated to promote standards (specifically Function#bind) 10851// However, it is not slated for removal any time soon 10852jQuery.proxy = function( fn, context ) { 10853 var tmp, args, proxy; 10854 10855 if ( typeof context === "string" ) { 10856 tmp = fn[ context ]; 10857 context = fn; 10858 fn = tmp; 10859 } 10860 10861 // Quick check to determine if target is callable, in the spec 10862 // this throws a TypeError, but we will just return undefined. 10863 if ( !isFunction( fn ) ) { 10864 return undefined; 10865 } 10866 10867 // Simulated bind 10868 args = slice.call( arguments, 2 ); 10869 proxy = function() { 10870 return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); 10871 }; 10872 10873 // Set the guid of unique handler to the same of original handler, so it can be removed 10874 proxy.guid = fn.guid = fn.guid || jQuery.guid++; 10875 10876 return proxy; 10877}; 10878 10879jQuery.holdReady = function( hold ) { 10880 if ( hold ) { 10881 jQuery.readyWait++; 10882 } else { 10883 jQuery.ready( true ); 10884 } 10885}; 10886jQuery.isArray = Array.isArray; 10887jQuery.parseJSON = JSON.parse; 10888jQuery.nodeName = nodeName; 10889jQuery.isFunction = isFunction; 10890jQuery.isWindow = isWindow; 10891jQuery.camelCase = camelCase; 10892jQuery.type = toType; 10893 10894jQuery.now = Date.now; 10895 10896jQuery.isNumeric = function( obj ) { 10897 10898 // As of jQuery 3.0, isNumeric is limited to 10899 // strings and numbers (primitives or objects) 10900 // that can be coerced to finite numbers (gh-2662) 10901 var type = jQuery.type( obj ); 10902 return ( type === "number" || type === "string" ) && 10903 10904 // parseFloat NaNs numeric-cast false positives ("") 10905 // ...but misinterprets leading-number strings, particularly hex literals ("0x...") 10906 // subtraction forces infinities to NaN 10907 !isNaN( obj - parseFloat( obj ) ); 10908}; 10909 10910jQuery.trim = function( text ) { 10911 return text == null ? 10912 "" :
10913 ( text + "" ).replace( rtrim, "" ); 10914}; 10915 10916 10917 10918// Register as a named AMD module, since jQuery can be concatenated with other 10919// files that may use define, but not via a proper concatenation script that 10920// understands anonymous AMD modules. A named AMD is safest and most robust 10921// way to register. Lowercase jquery is used because AMD module names are 10922// derived from file names, and jQuery is normally delivered in a lowercase 10923// file name. Do this after creating the global so that if an AMD module wants 10924// to call noConflict to hide this version of jQuery, it will work. 10925 10926// Note that for maximum portability, libraries that are not jQuery should 10927// declare themselves as anonymous modules, and avoid setting a global if an 10928// AMD loader is present. jQuery is a special case. For more information, see 10929// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon 10930 10931if ( true ) { 10932 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function() { 10933 return jQuery; 10934 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), 10935 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 10936} 10937 10938 10939 10940 10941var 10942 10943 // Map over jQuery in case of overwrite 10944 _jQuery = window.jQuery, 10945 10946 // Map over the $ in case of overwrite 10947 _$ = window.$; 10948 10949jQuery.noConflict = function( deep ) { 10950 if ( window.$ === jQuery ) { 10951 window.$ = _$; 10952 } 10953 10954 if ( deep && window.jQuery === jQuery ) { 10955 window.jQuery = _jQuery; 10956 } 10957 10958 return jQuery; 10959}; 10960 10961// Expose jQuery and $ identifiers, even in AMD 10962// (#7102#comment:10, https://github.com/jquery/jquery/pull/557) 10963// and CommonJS for browser emulators (#13566) 10964if ( typeof noGlobal === "undefined" ) { 10965 window.jQuery = window.$ = jQuery; 10966} 10967 10968 10969 10970 10971return jQuery; 10972} ); 10973 10974 10975/***/ }), 10976 10977/***/ 3: 10978/***/ (function(module, exports) { 10979 10980var g; 10981 10982// This works in non-strict mode 10983g = (function() { 10984 return this; 10985})(); 10986 10987try { 10988 // This works if eval is allowed (see CSP) 10989 g = g || new Function("return this")(); 10990} catch (e) { 10991 // This works if the window reference is available 10992 if (typeof window === "object") g = window; 10993} 10994 10995// g can still be undefined, but nothing to do about it... 10996// We return undefined, instead of nothing here, so it's 10997// easier to handle this case. if(!global) { ...} 10998 10999module.exports = g; 11000 11001 11002/***/ }), 11003 11004/***/ 35: 11005/***/ (function(module, __webpack_exports__, __webpack_require__) { 11006 11007"use strict"; 11008__webpack_require__.r(__webpack_exports__); 11009/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollTo", function() { return ScrollTo; }); 11010var ScrollTo = function ScrollTo(selector) { 11011 var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, 11012 _ref$offset = _ref.offset, 11013 offset = _ref$offset === void 0 ? 0 : _ref$offset, 11014 _ref$delayTime = _ref.delayTime, 11015 delayTime = _ref$delayTime === void 0 ? 0 : _ref$delayTime, 11016 _ref$duration = _ref.duration, 11017 duration = _ref$duration === void 0 ? 500 : _ref$duration; 11018 11019 if ($(selector).length) { 11020 var belowDesktopMedia = window.matchMedia('(max-width: 1024px)'); 11021 11022 if (belowDesktopMedia.matches) { 11023 var headerHeight = $('.header__main').height(); 11024 Scroll(-headerHeight + offset); 11025 } else { 11026 Scroll(offset); 11027 } 11028 } 11029 11030 function Scroll(offset) { 11031 setTimeout(function () { 11032 $('html, body').animate({ 11033 scrollTop: "".concat($(selector).offset().top + offset, "px") 11034 }, duration); 11035 }, delayTime); 11036 } 11037}; 11038 11039/***/ }), 11040 11041/***/ 362: 11042/***/ (function(module, exports) { 11043 11044$('.banner--find-product .close').on('click', function (event) { 11045 $('.banner--find-product').remove(); 11046}); 11047 11048function updateClass() { 11049 var mediaQuery = window.matchMedia('(max-width: 767px)'); 11050 11051 if (mediaQuery.matches) { 11052 $('.banner--find-product').addClass('smallS'); 11053 } else { 11054 var _$; 11055 11056 (_$ = $('.banner--find-product.smallS')) === null || _$ === void 0 ? void 0 : _$.removeClass('smallS'); 11057 } 11058} 11059 11060updateClass(); 11061window.addEventListener('resize', function () { 11062 updateClass(); 11063}); 11064 11065function saveActivityData(element, interactionType) { 11066 var campaign = $(element).attr('data-campaign'); 11067 var header = $(element).attr('data-activity-header'); 11068 var activityJson = { 11069 ContactID: typeof a_cid !== 'undefined' ? a_cid : 0, 11070 NodeID: typeof a_nid !== 'undefined' ? a_nid : 0, 11071 Culture: typeof a_culture !== 'undefined' ? a_culture : '', 11072 Type: interactionType === 'click' ? 'ClickMoxaPromotion' : 'ViewMoxaPromotion', 11073 Title: interactionType === 'click' ? 'Click Moxa Promotion - Dynamic Content AD' : 'View Moxa Promotion - Dynamic Content AD', 11074 URL: window.location.href, 11075 Comment: JSON.stringify({ 11076 PromotionType: 'Dynamic Content AD', 11077 SitePromotion: campaign, 11078 // Get from element's data attribute 11079 Header: header, 11080 // Get from element's data attribute 11081 Position: 'All Products Page' 11082 }) 11083 }; 11084 $.ajax({ 11085 url: '/activityapi/Activity/SaveActivity', 11086 type: 'POST', 11087 contentType: 'application/json', 11088 data: JSON.stringify(activityJson), 11089 success: function success() {}, 11090 error: function error(err) { 11091 console.error("Failed track ".concat(interactionType, " activity:"), err); 11092 } 11093 }); 11094} 11095 11096$('.banner--find-product .basic-text-card__link').on('click', function () { 11097 var dataCampaign = $(this).closest('[data-campaign]'); 11098 saveActivityData(dataCampaign, 'click', ''); 11099}); 11100$('.banner--find-product[data-campaign].smallS').on('touchstart', function (e) { 11101 var dataCampaign = $(this).closest('[data-campaign]'); 11102 saveActivityData(dataCampaign, 'click', ''); 11103}); 11104 11105/***/ }), 11106 11107/***/ 363: 11108/***/ (function(module, exports, __webpack_require__) { 11109 11110var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj;}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;},_typeof(obj);}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter);}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}/*** Google Analytics clientID*/ //function getCid() { 11111// try { 11112// var trackers = ga.getAll(); 11113// var i, len; 11114// var clientID = trackers[0].get('clientId'); 11115// var hidElem = $('#hidGAClientID'); 11116// if (hidElem != null) { 11117// // hidElem.value = trackers[0].get('clientId'); 11118// hidElem.attr('value', clientID); 11119// } 11120// return clientID; 11121// } catch (e) { console.log('error'); } 11122//} 11123function trackBizible(emailTxt){console.log('START Bizible TASK for user:'+emailTxt);window['Bizible']=window['Bizible']||{_queue:[],Push:function Push(o,p){this._queue.push({type:o,data:p});}}
11123;Bizible.Push('User',{email:emailTxt});console.log('END Bizible TASK');}window.trackBizible=trackBizible;$(function(){var hash=window.location.hash;var hashSection=hash.substr(hash.indexOf("=")+1);if(hashSection){var hash2=hashSection.replace('#','');var tabSection=$("[data-tab-id='"+hash2+"']");//if (tabSection.length > 0) { 11124// $('.tab-section__btn').removeClass("is-active"); 11125// $('.js-tab-trigger').removeClass('is-active'); 11126// $("[data-tab-id='" + hash2 + "']").addClass("is-active") 11127//} 11128var tabParent=tabSection.parents('.js-tab');var underline=tabParent.find('.js-tab-underline');var position=tabSection.position();var selectId=hash2;// $this.attr('data-tab-id'); 11129var actvId=tabSection.attr('data-actv-trigr');var openTab=$('[data-tab="'+selectId+'"]');var currentId=openTab.attr('id');var railwayOpenTab=$('[data-target="'+actvId+'"]');if(currentId){var url=window.location.href.split('#')[0];history.pushState(null,null,'#'+currentId);}if(tabSection.hasClass('showcase-block__item')){$('html, body').animate({scrollTop:$('.showcase-block__detail').offset().top-68},600);}underline.css('left',position.left);underline.css('width',tabSection.outerWidth());tabParent.find('.js-tab-trigger').removeClass('is-active');tabParent.find('.js-tab-main').hide();tabSection.addClass('is-active');tabParent.find(openTab).fadeIn(600);tabParent.find(railwayOpenTab).fadeIn(600);}});/*** Transfers sessionStorage from one tab to another. Needs to run first*/var sessionStorage_transfer=function sessionStorage_transfer(event){if(!event){event=window.event;}if(!event.newValue)return;if(event.key=='getSessionStorage'){localStorage.setItem('sessionStorage',JSON.stringify(sessionStorage));localStorage.removeItem('sessionStorage');}else if(event.key=='sessionStorage'&&!sessionStorage.length){var data=JSON.parse(event.newValue);for(var key in data){sessionStorage.setItem(key,data[key]);}}};// Listen for changes to localStorage 11130if(window.addEventListener){window.addEventListener("storage",sessionStorage_transfer,false);}else{window.attachEvent("onstorage",sessionStorage_transfer);};// Ask other tabs for session storage (this is ONLY to trigger event) 11131if(!sessionStorage.length){localStorage.setItem('getSessionStorage','foobar');localStorage.removeItem('getSessionStorage','foobar');};$(document).ready(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee(){var ua,msie,warrantyCheckDivs,hasClosed,BeginRequestHandler,prm,triggerElemID;return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:IEMacAddressOnChange();//formatMacAddress(); 11132$(".basic-form__input-search").removeClass("form-control");ua=window.navigator.userAgent;msie=ua.indexOf("MSIE ");if(msie>0||!!navigator.userAgent.match(/Trident.*rv\:11\./)){//$(".cmsMacMask").keypress(function () { 11133// formatMacAddress(); 11134//}); 11135warrantyCheckDivs=$(".warranty-block__item");if(warrantyCheckDivs!=null&&warrantyCheckDivs.length>0){// formatMacAddress(); 11136}}else{formatMacAddress();}InitQuotationBtns();hasClosed=getCookie('closeCookie');if(hasClosed!=='1')$('.cookie-block').fadeIn();else{$('.cookie-block').hide();}try{BeginRequestHandler=function BeginRequestHandler(sender,args){triggerElem=args.get_postBackElement();if(triggerElem!=null){triggerElemID=args.get_postBackElement().id.toString();}};prm=Sys.WebForms.PageRequestManager.getInstance();triggerElemID="";if(prm!=null){prm.add_endRequest(function(sender,args){if(triggerElemID.toString().indexOf('txtSearch')>0){var searchInput=document.getElementById(triggerElemID);if(searchInput!=null){searchInput.focus();var strLength=searchInput.value.length*2;searchInput.setSelectionRange(strLength,strLength);}}});}}catch(ex){}case 9:case"end":return _context.stop();}}},_callee);})));function getCookie(cname){var name=cname+'=';var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)===' '){c=c.substring(1);}if(c.indexOf(name)===0)return c.substring(name.length,c.length);}return'';}window.getCookie=getCookie;function trim(str,chr){var rgxtrim=!chr?new RegExp('^\\s+|\\s+$','g'):new RegExp('^'+chr+'+|'+chr+'+$','g');return str.replace(rgxtrim,'');}window.trim=trim;/***Product Series Download*/function trackResourceDownload(){var downloadLinks=$('.record-download');if(downloadLinks.length){downloadLinks.each(function(){this.addEventListener('click',logDownload);});}}window.trackResourceDownload=trackResourceDownload;function logDownload(ev){ev.preventDefault();var postURL='/activityapi/Activity/MediaDownload';var target=ev.currentTarget;var entry={file:target.getAttribute('href'),type:target.getAttribute('data-type'),nid:typeof a_nid!=='undefined'?a_nid:'',source:window.location.href,culture:typeof a_culture!=='undefined'?a_culture:'',contactId:typeof a_cid!=='undefined'?a_cid:'',fnid:target.getAttribute('data-node-id')};window.open(entry.file);
11136$.ajax({url:postURL,type:'POST',data:JSON.stringify(entry)}).fail(function(err){console.log(err.status);});}trackResourceDownload();window.logDownload=logDownload;/***Product Series Compare*/function AddToCompare(whut,modelId,src,modelName,sender,template,compareLinkId){console.log(whut);console.log(sender);var linkControl=$(compareLinkId);if($(sender).attr("class").indexOf('is-active')<0){var count=(linkControl.attr("data-modelids")!=null?trim(linkControl.attr("data-modelids"),";"):"").split(";").length;if(count+1>4)return;$('.compare-block').show();var nextControl=$(".compare-block__item-outline.is-empty").first();if(nextControl!=null){var imgtag='<img class="compare-block__item--img" src="##src##" alt="##modelname##">';var template=$(template).html();if(src!=""){imgtag=imgtag.replace("##src##",src);template=template.replace("##imagetag##",imgtag);}else{template=template.replace("##imagetag##","");}template=template.replace(/##modelname##/g,modelName).replace("##modelid##",modelId);if(linkControl!=null){if(linkControl.attr("data-modelids")!=null&&linkControl.attr("data-modelids")!=""){var currentIds=trim(linkControl.attr("data-modelids"),";");linkControl.attr("data-modelids",currentIds+";"+modelId);}else{linkControl.attr("data-modelids",modelId);}var url=linkControl.attr('href').split('?')[0];linkControl.attr('href',url+"?modelsids="+linkControl.attr("data-modelids"));}nextControl.html(template);nextControl.attr("class","compare-block__item-outline");nextControl.attr("id",modelId);var totalControl=$(".compare-block__heading--amount");if(totalControl!=null){var count=4-$(".compare-block__item-outline.is-empty").length;totalControl.html(count+" / 4");}}}else{var modelControl=$("#"+modelId);modelControl.html('');modelControl.attr("class","compare-block__item-outline is-empty");modelControl.attr("id","");var totalControl=$(".compare-block__heading--amount");if(totalControl!=null){var count=4-$(".compare-block__item-outline.is-empty").length;totalControl.html(count+" / 4");}if(linkControl!=null){if(linkControl.attr("data-modelids")!=null){var currentIds=linkControl.attr("data-modelids");currentIds=trim(currentIds.replace(modelId,""),";");linkControl.attr("data-modelids",currentIds);}var url=linkControl.attr('href').split('?')[0];linkControl.attr('href',url+"?modelsids="+linkControl.attr("data-modelids"));}$(sender).addClass("is-active");}}window.AddToCompare=AddToCompare;function RemoveFromCompare(sender,modelId){if(modelId=='0'){var linkControl=$(sender).siblings('a');if(linkControl!=null){var url=linkControl.attr('href').split('?')[0];linkControl.attr('href',url);linkControl.attr("data-modelids","");}$(".compare-block__bottom .column__item").each(function(index){$(this).html('<div class="compare-block__item-outline is-empty"></div>');});var totalControl=$(".compare-block__heading--amount");if(totalControl!=null){totalControl.html("0 / 4");}$("a[data-modelid]").each(function(index){if($(this).hasClass("is-active")){$(this).removeClass("is-active");var iControl=$(this).children('i');if(iControl!=null){iControl.attr("class",iControl.attr("class").replace("icon-check","icon-plus"));}}});}else{var modelControl=$("#"+modelId);modelControl.html('');modelControl.attr("class","compare-block__item-outline is-empty");modelControl.attr("id","");var totalControl=$(".compare-block__heading--amount");if(totalControl!=null){var count=4-$(".compare-block__item-outline.is-empty").length;totalControl.html(count+" / 4");}var linkControl=$(".compare-block__bottom .compare-block__footer a").last();if(linkControl!=null){if(linkControl.attr("data-modelids")!=null){var currentIds=linkControl.attr("data-modelids");currentIds=trim(currentIds.replace(modelId,""),";");linkControl.attr("data-modelids",currentIds);}var url=linkControl.attr('href').split('?')[0];linkControl.attr('href',url+"?modelsids="+linkControl.attr("data-modelids"));}var modelLinkControl=$("a[data-modelid='"+modelId+"']").first();if(modelLinkControl!=null){modelLinkControl.removeClass("is-active");var iControl=modelLinkControl.children('i');if(iControl!=null){iControl.removeClass("icon-check");iControl.addClass("icon-plus");}}}}window.RemoveFromCompare=RemoveFromCompare;/**Support Section **/function formatMacAddress(){var $form=$('.js-form-format');var format=$form.find('.js-format-mac-address');var split=2;format.on('keyup',function(event){var $this=$(event.currentTarget);var input=$this.val();input=input.replace(/[\W\s\._\-]+/g,'');var chunk=[];// When user select text in the document, also abort. 11137var selection=window.getSelection().toString();if(selection!=='')return false;// When the arrow keys are pressed, abort. 11138if($.inArray(event.keyCode,[38,40,37,39])!==-1)return false;for(var i=0,len=input.length;i<len;i+=split){chunk.push(input.substr(i,split));}$this.val(function(){return chunk.join('-').toUpperCase();});});}window.formatMacAddress=formatMacAddress;function validateMacAddress(){$('.basic-form__input.js-format-mac-address').on('focusout',function(event){var $this=$(event.currentTarget);var errorField=$this.siblings('.js-mac-address-error');var input=$this.val();if(input.length!==17&&input.length!==0){$this.addClass('basic-form--error');errorField.addClass('is-active');}else{$this.removeClass('basic-form--error');errorField.removeClass('is-active');}});}window.validateMacAddress=validateMacAddress;/** (RMA / DOA Case) **/ // Add Product button click function (RMA / DOA Case) 11139function RMADOACase(){try{$('.js-add-product').on('click',function(event){var $this=$(event.currentTarget);if($this.hasClass('js-doa'))$('.product-area').append(addressBlock2);else $('.product-area').append(addressBlock);openModal();formatMacAddress();validateMacAddress();checkItemsNum();selectFunction();
11139removeProductForm();checkFormNum();switchTab();});}catch(ex){}}window.RMADOACase=RMADOACase;function RMADOACaseShowHideErrors(error,panelProductsID,panelProductsErrorID,panelProductsErrorNFID){var panelProducts=$(panelProductsID);var panelProductsError=$(panelProductsErrorID);var panelProductsErrorNF=$(panelProductsErrorNFID);if(error=='error'){panelProducts.addClass('basic-form basic-form--error');panelProductsError.show();if(panelProductsErrorNF!=null)panelProductsErrorNF.hide();}else{panelProducts.removeClass('basic-form basic-form--error');panelProductsError.hide();if(panelProductsErrorNF!=null)panelProductsErrorNF.hide();}}window.RMADOACaseShowHideErrors=RMADOACaseShowHideErrors;/** (RMA / DOA Case/Technical Support) **/function RMACopyAddress(cb){if($(cb).is(':checked')){$('#TReturnEnglishCultureFirstName').val($('#TFirstName').val());$('#TReturnEnglishCultureLastName').val($('#TLastName').val());$('#TReturnChineseCultureFirstName').val($('#TFirstName').val());$('#TReturnChineseCultureLastName').val($('#TLastName').val());$('#TReturnAltFirstName').val($('#TAltFirstName').val());$('#TReturnFirstName').val($('#TFirstName').val());$('#TReturnLastName').val($('#TLastName').val());$('#TReturnEmail').val($('#TEmail').val());$('#TReturnCompany').val($('#TCompany').val());$('#TReturnPhone').val($('#TPhone').val());}}window.RMACopyAddress=RMACopyAddress;function openModalRMA(){modalTrigger=$('.js-modal-trigger');modalTrigger.on('click',function(event){closeModalRMA();var modalId=event.currentTarget.getAttribute('data-modal-id');var modalVideo=event.currentTarget.getAttribute('data-video');var modalImg=event.currentTarget.getAttribute('data-image');var modal=$('[data-modal="'+modalId+'"]');var $this=$(event.target);if(modalVideo){modal.find('.iframe-block').empty().append(modalVideo);var videoURL=modal.find('iframe').prop('src');videoURL+='&autoplay=1';modal.find('iframe').prop('src',videoURL);}else if(modalImg){modal.find('.modal__container').empty().append('<img src="'+modalImg+'"/>');}// if ($this.hasClass('full-modal-trigger')) $('html').toggleClass('modal-active'); 11140$('html').toggleClass('modal-active');modal.addClass('is-active');if(modal.hasClass('modal--ps'))$('.body-section').addClass('ps-active');});}window.openModalRMA=openModalRMA;function closeModalRMA(){if($('.modal.is-active').find('iframe').length){var openedModalIframe=$('.modal.is-active iframe');var videoURL=openedModalIframe.prop('src');videoURL=videoURL.replace('&autoplay=1','');openedModalIframe.prop('src','');openedModalIframe.prop('src',videoURL);}$('.modal, .full-modal').removeClass('is-active');$('body').removeClass('modal-active');$('html').removeClass('modal-active');$('.body-section').removeClass('ps-active');}window.closeModalRMA=closeModalRMA;/***Product Series Quotation*/function AddToQuotation(_x,_x2,_x3,_x4){return _AddToQuotation.apply(this,arguments);}function _AddToQuotation(){_AddToQuotation=_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee2(sender,modelId,pdimid,modelPrice){var newItemArr,qBag;return regeneratorRuntime.wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:_context2.prev=0;newItemArr=[createQutoteItem(modelId,pdimid,modelPrice)];_context2.next=4;return addNewQuotationItems(newItemArr);case 4:qBag=_context2.sent;updateQuoteBagUI(sender,qBag);typeof closeQuoteReminder!=='undefined'&&closeQuoteReminder();_context2.next=11;break;case 9:_context2.prev=9;_context2.t0=_context2["catch"](0);case 11:case"end":return _context2.stop();}}},_callee2,null,[[0,9]]);}));return _AddToQuotation.apply(this,arguments);}window.AddToQuotation=AddToQuotation;function addNewQuotationItems(_x5){return _addNewQuotationItems.apply(this,arguments);}function _addNewQuotationItems(){_addNewQuotationItems=_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee3(itemArr){var requestBody,response;return regeneratorRuntime.wrap(function _callee3$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:if(Array.isArray(itemArr)){_context3.next=2;break;}return _context3.abrupt("return",null);case 2:requestBody={OriginNodeID:typeof a_nid!=='undefined'?a_nid:0,Culture:typeof a_culture!=='undefined'?a_culture:'en-US',action:"modify",NewItems:[]};itemArr.forEach(function(item){requestBody.NewItems.push(item);});response=null;_context3.prev=5;_context3.next=8;return fetch("/cmspages/moxa/processquotation.ashx",{method:'POST',body:JSON.stringify(requestBody)}).then(function(res){return res.json();});case 8:response=_context3.sent;_context3.next=13;break;case 11:_context3.prev=11;_context3.t0=_context3["catch"](5);case 13:return _context3.abrupt("return",response);case 14:case"end":return _context3.stop();}}},_callee3,null,[[5,11]]);}));return _addNewQuotationItems.apply(this,arguments);}function GetQuotationBag(){return _GetQuotationBag.apply(this,arguments);}function _GetQuotationBag(){_GetQuotationBag=_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee4(){var response;return regeneratorRuntime.wrap(function _callee4$(_context4){while(1){switch(_context4.prev=_context4.next){case 0:response=null;_context4.prev=1;_context4.next=4;return fetch("/cmspages/moxa/processquotation.ashx",{method:'GET'}).then(function(res){return res.json();});case 4:response=_context4.sent;_context4.next=9;break;case 7:_context4.prev=7;_context4.t0=_context4["catch"](1);case 9:return _context4.abrupt("return",response);case 10:case"end":return _context4.stop();}}},_callee4,null,[[1,7]]);}));return _GetQuotationBag.apply(this,arguments);}window.GetQuotationBag=GetQuotationBag;function AddToQuotationMulti(_x6){return _AddToQuotationMulti.apply(this,arguments);}function _AddToQuotationMulti(){_AddToQuotationMulti=_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee5(sender){var tbody,chkboxs,newItems,qBag;return regeneratorRuntime.wrap(function _callee5$(_context5){while(1){switch(_context5.prev=_context5.next){case 0:if(sender){_context5.next=2;break;}return _context5.abrupt("return");case 2:tbody=sender.closest('tbody');if(!tbody){_context5.next=17;break;}chkboxs=[].slice.call(tbody.querySelectorAll('[type="checkbox"]'));newItems=[];if(!(chkboxs&&chkboxs.length)){_context5.next=17;break;}chkboxs.forEach(function(chkbox){if(!chkbox.checked)return;var pdimid=chkbox.getAttribute("data-pdimid");var modelId=chkbox.getAttribute("data-modelid");var modelPrice=chkbox.getAttribute("data-price");newItems.push(createQutoteItem(modelId,pdimid,modelPrice));});if(!newItems.length){_context5.next=16;break;}_context5.next=11;return addNewQuotationItems(newItems);case 11:qBag=_context5.sent;updateQuoteBagUI(sender,qBag);showMessage(tbody,'success');_context5.next=17;break;case 16:showMessage(tbody,'error');case 17:case"end":return _context5.stop();}}},_callee5);}));return _AddToQuotationMulti.apply(this,arguments);}window.AddToQuotationMulti=AddToQuotationMulti;function createQutoteItem(modelId,pdimid,price){return{"NodeGUID":modelId,"PDIMID":pdimid,"UnitPrice":price};}function showMessage(container,msgType){hideAllMessages();var msg=container.querySelector("[data-quotation-message-".concat(msgType.toLowerCase(),"]"));msg&&msg.classList.remove('hide');}function hideAllMessages(){var allMessage=[].slice.call(document.querySelectorAll('[data-quotation-message]'));if(allMessage&&allMessage.length){allMessage.forEach(function(msg){return msg.classList.add('hide');});}}function updateQuoteBagUI(sender,qBag){if(qBag===null)return;var addedItem=qBag.length&&qBag[0];var bagNote=$('.header__bag-note');var bubbleNumber=$(".fixed-bubble__num");var qLinkLi=$('.fixed-bubble').first();
11140if($(sender).hasClass("js-tooltipTrigger")){if(addedItem&&Object.keys(addedItem).length){$(".product-bar__img").attr("style","background-image: url('"+addedItem.ImageUrl+"');");$(".product-bar__name").html(addedItem.ModelName);$(".product-bar__id").html(addedItem.SeriesName);}tooltip.showTooltip();}if(!qBag.length){bagNote.length&&bagNote.hide();bubbleNumber.length&&bubbleNumber.html("0");return;}bagNote.length&&bagNote.show();qLinkLi.removeClass("opacity-hidden");bubbleNumber.html(qBag.length);if($(sender).siblings(".btn-viewinqoute").length){$(sender).hide();$(sender).siblings(".btn-viewinqoute").show();}}function InitQuotationBtns(){return _InitQuotationBtns.apply(this,arguments);}function _InitQuotationBtns(){_InitQuotationBtns=_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee6(){var qBag,qLinkLi,bagNote;return regeneratorRuntime.wrap(function _callee6$(_context6){while(1){switch(_context6.prev=_context6.next){case 0:_context6.next=2;return GetQuotationBag();case 2:qBag=_context6.sent;qLinkLi=$('.fixed-bubble').first();bagNote=$('.header__bag-note');if(qBag&&qBag.length){$(".fixed-bubble__num").html(qBag.length);qLinkLi.removeClass("opacity-hidden");bagNote.show();typeof showQuoteReminder!=='undefined'&&showQuoteReminder();}else{qLinkLi.addClass("opacity-hidden");bagNote.hide();}$(".btn-addtoqoute").each(function(index){var currentPdimid=$(this).attr("data-pdimid");if(qBag.some(function(item){return item.PDIMID===currentPdimid;})){$(this).hide();$(this).siblings(".btn-viewinqoute").show();}else{$(this).show();$(this).siblings(".btn-viewinqoute").hide();}});case 7:case"end":return _context6.stop();}}},_callee6);}));return _InitQuotationBtns.apply(this,arguments);}window.InitQuotationBtns=InitQuotationBtns;function trackQuotationAdd(modelId){var postURL='/activityapi/Activity/QuoteAdd';var entry={guid:modelId,nid:a_nid,source:window.location.href,culture:a_culture,contactId:a_cid};jQuery.ajax({url:postURL,type:'POST',data:JSON.stringify(entry)}).done(function(){// console.log('sent'); 11141}).fail(function(err){console.log(err.status);});}window.trackQuotationAdd=trackQuotationAdd;// function RemoveFromQuotation(sender, modelId) { 11142// trackQuotationRemove(modelId); 11143// try { 11144// var qBag = localStorage.getItem("quotationBag"); 11145// if (qBag != null) { 11146// var modelIds = trim(qBag, ","); 11147// if (qBag.indexOf(modelId) >= 0) { 11148// const regex = new RegExp(`${modelId};\\d+,`); 11149// localStorage.setItem("quotationBag", trim(modelIds.replace(regex, ""), ",")); 11150// } 11151// } 11152// qBag = localStorage.getItem("quotationBag"); 11153// if (qBag != null && qBag != "") { 11154// $(".fixed-bubble__num").html(qBag.split(",").length); 11155// } 11156// else { 11157// $(".fixed-bubble__num").html("0"); 11158// var qLinkLi = $('.fixed-bubble').first(); 11159// qLinkLi.addClass("opacity-hidden"); 11160// var bagNote = $('.header__bag-note'); 11161// bagNote.hide(); 11162// } 11163// } catch (ex) { } 11164// } 11165// window.RemoveFromQuotation = RemoveFromQuotation; 11166function trackQuotationRemove(modelId){var postURL='/activityapi/Activity/QuoteRemove';var entry={guid:modelId,nid:a_nid,source:window.location.href,culture:a_culture,contactId:a_cid};jQuery.ajax({url:postURL,type:'POST',data:JSON.stringify(entry)}).done(function(){// console.log('sent'); 11167}).fail(function(err){console.log(err.status);});}window.trackQuotationRemove=trackQuotationRemove;function FocusOnQuotation(id){var elem=document.getElementById(id);if(elem!=null){elem.focus();}return false;}window.FocusOnQuotation=FocusOnQuotation;// function GoToQuotation(sender) { 11168// var qBag = localStorage.getItem("quotationBag"); 11169// if (qBag != null) { 11170// document.location.href = $(sender).attr("href") + "?modelsids=" + qBag; 11171// } 11172// return false; 11173// } 11174// window.GoToQuotation = GoToQuotation; 11175// function ClearQuotationBag() { 11176// try { 11177// var qBag = localStorage.removeItem("quotationBag"); 11178// var qLinkLi = $('.fixed-bubble').first(); 11179// // qLinkLi.hide(); 11180// qLinkLi.addClass("opacity-hidden"); 11181// var bagNote = $('.header__bag-note'); 11182// bagNote.hide(); 11183// } catch (ex) { } 11184// } 11185// window.ClearQuotationBag = ClearQuotationBag; 11186// function ClearQuotationBagWithRedirect(url) { 11187// try { 11188// var qBag = localStorage.removeItem("quotationBag"); 11189// var qLinkLi = $('.fixed-bubble').first(); 11190// // qLinkLi.hide(); 11191// qLinkLi.addClass("opacity-hidden"); 11192// var bagNote = $('.header__bag-note'); 11193// bagNote.hide(); 11194// window.location.href = url; 11195// } catch (ex) { } 11196// } 11197// window.ClearQuotationBagWithRedirect = ClearQuotationBagWithRedirect; 11198/***Product Series Resources*/function FilterResourcesOS(sender,f
11198ilterControlId,showmoreControlId,total){var filterValue=$(sender).val().toLowerCase();var container=$(sender).closest('.js-showAll_wrap');var showMore=container.children('.filter-loadmore-block');showMore.addClass('hide');// var filterIdex = $(sender).find(":selected").index(); 11199//$(showmoreControlId).attr("data-filter-os", filterIdex == 0 ? "0" : filterValue); 11200// $(showmoreControlId).attr("data-no", total); 11201var container=$(sender).closest('.js-showAll_wrap');var i=0;$(filterControlId).find("tr.filter_row").each(function(index){if(filterValue.includes("operating system")||filterValue.includes("æä½ç³»ç»")){$(this).removeClass("hide");}else{if($(this).attr("data-filter-os").includes(filterValue)){$(this).removeClass("hide");}else $(this).addClass("hide");}});var filtersContainer=$(sender).closest(".filter-block__container");if(filtersContainer!=null){$(filtersContainer).find("a.filter-block__btn").each(function(index){if(index==0)$(this).addClass("is-active");else $(this).removeClass("is-active");});}}window.FilterResourcesOS=FilterResourcesOS;function FilterResourcessw(sender,filterControlId,showmoreControlId,total){var filterValue=$(sender).attr("data-filter");var filterOSValue=$(sender).parent().parent().find('select.filter-block__select').val().toLowerCase();var container=$(sender).closest('.js-showAll_wrap');var showMore=container.children('.filter-loadmore-block');showMore.addClass('hide');//$(showmoreControlId).attr("data-filter", filterValue); 11202//$(showmoreControlId).attr("data-no", total); 11203//$(showmoreControlId).attr("data-filter-os", "0"); 11204var i=0;console.log(filterOSValue,filterValue);$(filterControlId).find("tr.filter_row").each(function(index){if($(this).attr("data-filter")==filterValue&&($(this).attr("data-filter-os").includes(filterOSValue)||filterOSValue.includes("operating system")||filterOSValue.includes("æä½ç³»ç»"))){$(this).removeClass("hide");}else $(this).addClass("hide");if(filterValue=="sw-all"){if($(this).attr("data-filter-os").includes(filterOSValue)||filterOSValue.includes("operating system")||filterOSValue.includes("æä½ç³»ç»"))$(this).removeClass("hide");else $(this).addClass("hide");}});ActivateFilter(sender);}window.FilterResourcessw=FilterResourcessw;function FilterResourcesdoc(sender,filterControlId,showmoreControlId,total){var filterValue=$(sender).attr("data-filter");var container=$(sender).closest('.js-showAll_wrap');var showMore=container.children('.filter-loadmore-block');showMore.addClass('hide');$(filterControlId).find("tr.filter_row").each(function(index){if(filterValue=="doc-all")//$(this).show(); 11205$(this).removeClass('hide');else{if($(this).attr("data-filter")==filterValue){$(this).removeClass("hide");}else $(this).addClass('hide');}});ActivateFilter(sender);}window.FilterResourcesdoc=FilterResourcesdoc;function ShowMoreResources(sender,filterControlId,no){var filterValue=$(sender).attr("data-filter");var filterOsValue=$(sender).attr("data-filter-os");var total=no;if($(sender).attr("data-no")==null){$(sender).attr("data-no",no*2);total=no*2;}else{var current=parseInt($(sender).attr("data-no"));$(sender).attr("data-no",current+no);total=current+no;}var i=1;$(filterControlId).find("tr.filter_row").each(function(index){if(filterValue.indexOf("all")>=0&&(filterOsValue==null||filterOsValue=="0")&&i<=total){$(this).show();i++;}else{if(filterOsValue==null||filterOsValue=="0"){var dataFilterValue=$(this).attr("data-filter");if(dataFilterValue.includes(filterValue)&&i<=total){$(this).show();i++;}else{$(this).hide();}}else{var dataFilterValue=$(this).attr("data-filter-os");if(dataFilterValue.includes(filterOsValue)&&i<=total){$(this).show();i++;}else{$(this).hide();}}}});}window.ShowMoreResources=ShowMoreResources;// table sort by versionShort on click 11206jQuery(document).on("click",".versionShort",function(){if(jQuery(this).parents(".js-showAll_wrap").find(".filter-loadmore-block").is(':visible')){jQuery(this).parents(".border-table").find(".filter_row").removeClass("hide");jQuery(this).parents(".js-showAll_wrap").find(".filter-loadmore-block").css("display","none");}jQuery(this).toggleClass("on");var table=jQuery(this).parents("table");var rows=table.find('> tbody > tr').toArray().sort(comparer(jQuery(this).index()));this.asc=!this.asc;if(!this.asc){rows=rows.reverse();}for(var i=0;i<rows.length;i++){table.append(rows[i]);}});function comparer(index){return function(a,b){var valA=getCellValue(a,index),valB=getCellValue(b,index);return jQuery.isNumeric(valA)&&jQuery.isNumeric(valB)?valA-valB:valA.toString().localeCompare(valB);};};window.comparer=comparer;function getCellValue(row,index){return jQuery(row).children('td').eq(index).find(".version-short").text();};window.getCellValue=getCellValue;// table sort by dateShort on click 11207jQuery(document).on("click",".dateShort",function(){if(jQuery(this).parents(".js-showAll_wrap").find(".filter-loadmore-block").is(':visible')){jQuery(this).parents(".border-table").find(".filter_row").removeClass("hide");jQuery(this).parents(".js-showAll_wrap").find(".filter-loadmore-block").css("display","none");}jQuery(this).toggleClass("on");var table_date=jQuery(this).parents("table");var rows_date=table_date.find('> tbody > tr').toArray().sort(comparer_date(jQuery(this).index()));this.asc=!this.asc;if(!this.asc){rows_date=rows_date.reverse();}for(var i=0;i<rows_date.length;i++){table_date.append(rows_date[i]);}});// table tbody sort by dateSortByTbody on click 11208jQuery(document).on("click",".dateSortTbody",function(){if(jQuery(this).parents(".js-showAll_wrap").find(".filter-loadmore-block").is(':visible')){jQuery(this).parents(".border-table").find(".filter_row").removeClass("hide");jQuery(this).parents(".js-showAll_wrap").find(".filter-loadmore-block").css("display","none");}jQuery(this).toggleClass("on");var targetId=this.getAttribute('data-sort-target')||'';var table_date=jQuery(this).parents("table");var rows_date=table_date.find("> tbody").toArray().sort(comparer_date_custom(jQuery(this).index(),targetId));this.asc=!this.asc;if(!this.asc){rows_date=rows_date.reverse();}for(var i=0;i<rows_date.length;i++){table_date.append(rows_date[i]);}});function comparer_date(index){return function(a,b){var valA=getCellValue_date(a,index),valB=getCellValue_date(b,index);var timeRangeA=new Date(valA).getTime();var timeRangeB=new Date(valB).getTime();return timeRangeA-timeRangeB;};};window.comparer_date=comparer_date;function comparer_date_custom(index,targetId){return function(a,b){var valA=getCellValue_date_custom(a,index,targetId),valB=getCellValue_date_custom(b,index,targetId);var timeRangeA=new Date(valA).getTime();var timeRangeB=new Date(valB).getTime();return timeRangeA-timeRangeB;};};window.comparer_date_custom=comparer_date_custom;function getCellValue_date_custom(row,index,targetId){return jQuery(row).find("[data-sort='".concat(targetId,"']")).text();};window.getCellValue_date_custom=getCellValue_date_custom;function getCellValue_date(row,index){return jQuery(row).children('td').eq(index).find(".date-short").text();};window.getCellValue_date=getCellValue_date;
11208// table row sort by nameShort on click 11209jQuery(document).on("click",".nameShort",function(){if(jQuery(this).parents(".js-showAll_wrap").find(".filter-loadmore-block").is(':visible')){jQuery(this).parents(".border-table").find(".filter_row").removeClass("hide");jQuery(this).parents(".js-showAll_wrap").find(".filter-loadmore-block").css("display","none");}jQuery(this).toggleClass("on");var table=jQuery(this).parents("table");var rows=table.find('> tbody > tr').toArray().sort(function(a,b){var _a$querySelector,_a$querySelector$inne,_b$querySelector,_b$querySelector$inne;var strA=(_a$querySelector=a.querySelector(".name-short"))===null||_a$querySelector===void 0?void 0:(_a$querySelector$inne=_a$querySelector.innerText)===null||_a$querySelector$inne===void 0?void 0:_a$querySelector$inne.toLowerCase();var strB=(_b$querySelector=b.querySelector(".name-short"))===null||_b$querySelector===void 0?void 0:(_b$querySelector$inne=_b$querySelector.innerText)===null||_b$querySelector$inne===void 0?void 0:_b$querySelector$inne.toLowerCase();if(!strA||!strB)return 0;return strA.localeCompare(strB);});this.asc=!this.asc;if(!this.asc){rows=rows.reverse();}for(var i=0;i<rows.length;i++){table.append(rows[i]);}});// table tbody sort by nameShort on click 11210jQuery(document).on("click",".nameSortByTbody",function(){if(jQuery(this).parents(".js-showAll_wrap").find(".filter-loadmore-block").is(':visible')){jQuery(this).parents(".border-table").find(".filter_row").removeClass("hide");jQuery(this).parents(".js-showAll_wrap").find(".filter-loadmore-block").css("display","none");}jQuery(this).toggleClass("on");var table=jQuery(this).parents("table");var tbodys=table.find('> tbody').toArray().sort(function(a,b){var _a$querySelector2,_a$querySelector2$inn,_b$querySelector2,_b$querySelector2$inn;var strA=(_a$querySelector2=a.querySelector(".name-short"))===null||_a$querySelector2===void 0?void 0:(_a$querySelector2$inn=_a$querySelector2.innerText)===null||_a$querySelector2$inn===void 0?void 0:_a$querySelector2$inn.toLowerCase();var strB=(_b$querySelector2=b.querySelector(".name-short"))===null||_b$querySelector2===void 0?void 0:(_b$querySelector2$inn=_b$querySelector2.innerText)===null||_b$querySelector2$inn===void 0?void 0:_b$querySelector2$inn.toLowerCase();if(!strA||!strB)return 0;return strA.localeCompare(strB);});this.asc=!this.asc;if(!this.asc){tbodys=tbodys.reverse();}for(var i=0;i<tbodys.length;i++){table.append(tbodys[i]);}});function FilterRResources(sender,filterControlId,showmoreControlId,total){var filterValue=$(sender).attr("data-filter");$(showmoreControlId).attr("data-filter",filterValue);$(showmoreControlId).attr("data-no",total);var i=1;$(filterControlId).find("div.top-img-card").each(function(index){if(filterValue.indexOf("all")>=0&&i<=total){$(this).show();i++;}else{var dataFilterValue=$(this).attr("data-filter");if(dataFilterValue.indexOf(filterValue)>=0&&i<=total){$(this).show();i++;}else{$(this).hide();}}});ActivateFilter(sender);}window.FilterRResources=FilterRResources;function ShowMoreRResources(sender,filterControlId,no){var filterValue=$(sender).attr("data-filter");var total=no;if($(sender).attr("data-no")==null){$(sender).attr("data-no",no*2);total=no*2;}else{var current=parseInt($(sender).attr("data-no"));$(sender).attr("data-no",current+no);total=current+no;}var i=1;$(filterControlId).find("div.top-img-card").each(function(index){if(filterValue.indexOf("all")>=0&&i<=total){$(this).show();i++;}else{var dataFilterValue=$(this).attr("data-filter");if(dataFilterValue.indexOf(filterValue)>=0&&i<=total){$(this).show();i++;}else{$(this).hide();}}});}window.ShowMoreRResources=ShowMoreRResources;function ActivateFilter(sender){$(sender).siblings().each(function(index){$(this).removeClass("is-active");});$(sender).addClass("is-active");}window.ActivateFilter=ActivateFilter;function SortResources(sender,filterControlId){var sortOrderControl=$(sender).children("i");var sortOrder="asc";if(sortOrderControl!=null){if(sortOrderControl.hasClass("icon-arrow-down")){sortOrder="desc";sortOrderControl.removeClass("icon-arrow-down");sortOrderControl.addClass("icon-arrow-up");}else{sortOrder="asc";sortOrderControl.removeClass("icon-arrow-up");sortOrderControl.addClass("icon-arrow-down");}}$(filterControlId+" table tbody").each(function(){var list=$(this).children('tr');$(this).html(list.get().reverse());});return false;}window.SortResources=SortResources;/***Search autocomple*/function SearchResultsPostback(ctrl,panelUniqueID){var $search=$('.search-input');$search.keyup(function(e){var key=e.which||e.keyCode;if(key==13){e.preventDefault();location.href='/search?searchtext='+encodeURIComponent(e.currentTarget.value)+'&searchmode=allwords';return;}//test 11211var letter=String.fromCharCode(e.which);if(!/[\w\d]/i.test(letter)){return;}//end 11212if(!e.currentTarget.value||e.currentTarget.value.length<2){return;}});//searchNav 11213$search.keydown(function(e){var key=e.which||e.keyCode;if(key==13){e.preventDefault();location.href='/search?searchtext='+e.currentTarget.value+'&searchmode=allwords';return;}});if(ctrl!=null&&ctrl.value&&ctrl.value.length>=3){// __doPostBack("'"+ctrl.ID,"'",value); 11214$search.keyup(function(e){var key=e.which||e.keyCode;if(key==13){e.preventDefault();location.href='/search?searchtext='+encodeURIComponent(e.currentTarget.value)+'&searchmode=allwords';return;}else{__doPostBack(panelUniqueID,'');var value=ctrl.value;}});$search.keydown(function(e){var key=e.which||e.keyCode;if(key==13){e.preventDefault();location.href='/search?searchtext='+e.currentTarget.value+'&searchmode=allwords';return;}else{__doPostBack(panelUniqueID,'');var value=ctrl.value;}});}ctrl.focus();}window.SearchResultsPostback=SearchResultsPostback;function Models_Populated(sender,e){var models=sender.get_completionList().childNodes;for(var i=0;i<models.length;i++){var value=models[i]._value;models[i].innerHTML=value;// models[i].innerHTML ="<button type='button' class='js-select-option search-dropdown__link'>"+value+"</button>" 11215// "<div><span>" + value + "</span></div>"; //value; 11216//dealers[i].innerText = value.replace("###", " - "); 11217}}window.Models_Populated=Models_Populated;/***How To Buy autocomple*/ /* 11218 11219 function initBindScript() {
11220 $('.js-htb-additional').on('click', function (event) { 11221 var $this = $(event.currentTarget); 11222 var parent = $this.parents('.result-block-wrap'); 11223 var openItem = parent.find('.result-block__additional'); 11224 $this.find('.arrow-btn__icon').toggleClass('icon-arrow-down icon-arrow-up'); 11225 openItem.slideToggle(400); 11226 }); 11227 } 11228 11229 11230 function ChooseProductClicks() { 11231 11232 $('#chkAll').click(function () { 11233 11234 if ($(this).is(':checked')) { 11235 $('.basic-form__checkbox').prop('checked', true); 11236 } 11237 if (!$(this).is(':checked')) { 11238 $('.basic-form__checkbox').prop('checked', false); 11239 } 11240 11241 }); 11242 11243 $('.basic-form__checkbox').click(function () { 11244 if ($('#chkAll').is(':checked') && !$(this).is(':checked')) { 11245 $('#chkAll').prop('checked', false); 11246 } 11247 11248 }); 11249 11250 }; 11251*/function Dealers_Populated(sender,e){var dealers=_toConsumableArray(sender.get_completionList().childNodes);$('.easy-autocomplete-container.container-overlay').addClass('hide');if(dealers.length){var hasResult=dealers.some(function(dealer){return dealer._value.indexOf("###")>-1;});if(hasResult){for(var i=0;i<dealers.length;i++){var value=dealers[i]._value;if(value.indexOf("###")>0){var dValus=value.split("###");dealers[i].innerHTML=dValus[0]+" - <span>"+dValus[1]+"</span>";//dealers[i].innerText = value.replace("###", " - "); 11252$('#eac-container-search-by-name').removeClass('hide');$('.easy-autocomplete-wrapper').removeClass('pointer-events-none');}}}else{var _value=dealers[0]._value;$('#eac-container-search-by-name').addClass('hide');$('.easy-autocomplete-container.container-overlay').removeClass('hide');$('.easy-autocomplete-container.container-overlay').html("<div class=\"eac-item\">".concat(_value,"</div>"));$('.easy-autocomplete-wrapper').addClass('pointer-events-none');}}}window.Dealers_Populated=Dealers_Populated;function Dealers_SelectedValue(sender,e){var idx=sender._selectIndex;var dealers=sender.get_completionList().childNodes;var value=dealers[idx]._value;var valueEl=value.replace("###"," - ");if(value.indexOf('###')>-1){sender.get_element().value=valueEl;var queryParam=encodeURIComponent(valueEl);var url=window.location.href.split('?')[0]+"?v=f2&n="+queryParam;document.location=url;}$('.easy-autocomplete-container.container-overlay').addClass('hide');}window.Dealers_SelectedValue=Dealers_SelectedValue;function saveActivityData(type,title,comment){var activityJson={ContactID:typeof a_cid!=='undefined'?a_cid:0,NodeID:typeof a_nid!=='undefined'?a_nid:0,Culture:typeof a_culture!=='undefined'?a_culture:'',Type:type,Title:title,URL:window.location.href,Comment:comment};$.ajax({url:'/activityapi/Activity/SaveActivity',method:'POST',contentType:'application/json',data:JSON.stringify(activityJson),error:function error(err){console.error("Failed to track ".concat(type," activity:"),err);}});}window.saveActivityData=saveActivityData;'use strict';(function(factory,jQuery,Zepto){if(true){!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(0)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), 11253 __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? 11254 (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), 11255 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));}else {}})(function($){var Mask=function Mask(el,mask,options){var p={invalid:[],getCaret:function getCaret(){try{var sel,pos=0,ctrl=el.get(0),dSel=document.selection,cSelStart=ctrl.selectionStart;if(dSel&&navigator.appVersion.indexOf('MSIE 10')===-1){sel=dSel.createRange();sel.moveStart('character',-p.val().length);pos=sel.text.length;}else if(cSelStart||cSelStart==='0'){pos=cSelStart;}return pos;}catch(e){}},setCaret:function setCaret(pos){try{if(el.is(':focus')){var range,ctrl=el.get(0);if(ctrl.setSelectionRange){ctrl.setSelectionRange(pos,pos);}else{range=ctrl.createTextRange();range.collapse(!0);range.moveEnd('character',pos);range.moveStart('character',pos);range.select();}}}catch(e){}},events:function events(){el.on('keydown.mask',function(e){el.data('mask-keycode',e.keyCode||e.which);el.data('mask-previus-value',el.val());}).on($.jMaskGlobals.useInput?'input.mask':'keyup.mask',p.behaviour).on('paste.mask drop.mask',function(){setTimeout(function(){el.keydown().keyup();},100);}).on('change.mask',function(){el.data('changed',!0);}).on('blur.mask',function(){if(oldValue!==p.val()&&!el.data('changed')){el.trigger('change');}el.data('changed',!1);}).on('blur.mask',function(){oldValue=p.val();}).on('focus.mask',function(e){if(options.selectOnFocus===!0){$(e.target).select();}}).on('focusout.mask',function(){if(options.clearIfNotMatch&&!regexMask.test(p.val())){p.val('');}});},getRegexMask:function getRegexMask(){var maskChunks=[],translation,pattern,optional,recursive,oRecursive,r;for(var i=0;i<mask.length;i++){translation=jMask.translation[mask.charAt(i)];if(translation){pattern=translation.pattern.toString().replace(/.{1}$|^.{1}/g,'');optional=translation.optional;recursive=translation.recursive;if(recursive){maskChunks.push(mask.charAt(i));oRecursive={digit:mask.charAt(i),pattern:pattern};}else{maskChunks.push(!optional&&!recursive?pattern:pattern+'?');}}else{maskChunks.push(mask.charAt(i).replace(/[-\/\\^$*+?.()|[\]{}]/g,'\\$&'));}}r=maskChunks.join('');if(oRecursive){r=r.replace(new RegExp('('+oRecursive.digit+'(.*'+oRecursive.digit+')?)'),'($1)?').replace(new RegExp(oRecursive.digit,'g'),oRecursive.pattern);}return new RegExp(r);},destroyEvents:function destroyEvents(){el.off(['input','keydown','keyup','paste','drop','blur','focusout',''].join('.mask '));},val:function val(v){var isInput=el.is('input'),method=isInput?'val':'text',r;if(arguments.length>0){if(el[method]()!==v){el[method](v);}r=el;}else{r=el[method]();}return r;},calculateCaretPosition:function calculateCaretPosition(caretPos,newVal){var newValL=newVal.length,oValue=el.data('mask-previus-value')||'',oValueL=oValue.length;if(el.data('mask-keycode')===8&&oValue!==newVal){caretPos=caretPos-(newVal.slice(0,caretPos).length-oValue.slice(0,caretPos).length);}else if(oValue!==newVal){if(caretPos>=oValueL){caretPos=newValL;}else{caretPos=caretPos+(newVal.slice(0,caretPos).length-oValue.slice(0,caretPos).length);}}return caretPos;},behaviour:function behaviour(e){e=e||window.event;p.invalid=[];var keyCode=el.data('mask-keycode');if($.inArray(keyCode,jMask.byPassKeys)===-1){var newVal=p.getMasked(),caretPos=p.getCaret();setTimeout(function(caretPos,newVal){p.setCaret(p.calculateCaretPosition(caretPos,newVal));},10,caretPos,newVal);p.val(newVal);p.setCaret(caretPos);return p.callbacks(e);}},getMasked:function getMasked(skipMaskChars,val){var buf=[],value=val===undefined?p.val():val+'',m=0,maskLen=mask.length,v=0,valLen=value.length,offset=1,addMethod='push',resetPos=-1,lastMaskChar,check;if(options.reverse){addMethod='unshift';offset=-1;lastMaskChar=0;m=maskLen-1;v=valLen-1;check=function check(){return m>-1&&v>-1;};}else{lastMaskChar=maskLen-1;check=function check(){return m<maskLen&&v<valLen;};}var lastUntranslatedMaskChar;while(check()){var maskDigit=mask.charAt(m),valDigit=value.charAt(v),translation=jMask.translation[maskDigit];if(translation){if(valDigit.match(translation.pattern)){buf[addMethod](valDigit);if(translation.recursive){if(resetPos===-1){resetPos=m;}else if(m===lastMaskChar){m=resetPos-offset;}if(lastMaskChar===resetPos){m-=offset;}}m+=offset;}else if(valDigit===lastUntranslatedMaskChar){lastUntranslatedMaskChar=undefined;}else if(translation.optional){m+=offset;v-=offset;}else if(translation.fallback){buf[addMethod](translation.fallback);m+=offset;v-=offset;}else{p.invalid.push({p:v,v:valDigit,e:translation.pattern});}v+=offset;}else{if(!skipMaskChars){buf[addMethod](maskDigit);}if(valDigit===maskDigit){v+=offset;}else{lastUntranslatedMaskChar=maskDigit;}m+=offset;}}var lastMaskCharDigit=mask.charAt(lastMaskChar);
11255if(maskLen===valLen+1&&!jMask.translation[lastMaskCharDigit]){buf.push(lastMaskCharDigit);}return buf.join('');},callbacks:function callbacks(e){var val=p.val(),changed=val!==oldValue,defaultArgs=[val,e,el,options],callback=function callback(name,criteria,args){if(typeof options[name]==='function'&&criteria){options[name].apply(this,args);}};callback('onChange',changed===!0,defaultArgs);callback('onKeyPress',changed===!0,defaultArgs);callback('onComplete',val.length===mask.length,defaultArgs);callback('onInvalid',p.invalid.length>0,[val,e,el,p.invalid,options]);}};el=$(el);var jMask=this,oldValue=p.val(),regexMask;mask=typeof mask==='function'?mask(p.val(),undefined,el,options):mask;jMask.mask=mask;jMask.options=options;jMask.remove=function(){var caret=p.getCaret();p.destroyEvents();p.val(jMask.getCleanVal());p.setCaret(caret);return el;};jMask.getCleanVal=function(){return p.getMasked(!0);};jMask.getMaskedVal=function(val){return p.getMasked(!1,val);};jMask.init=function(onlyMask){onlyMask=onlyMask||!1;options=options||{};jMask.clearIfNotMatch=$.jMaskGlobals.clearIfNotMatch;jMask.byPassKeys=$.jMaskGlobals.byPassKeys;jMask.translation=$.extend({},$.jMaskGlobals.translation,options.translation);jMask=$.extend(!0,{},jMask,options);regexMask=p.getRegexMask();if(onlyMask){p.events();p.val(p.getMasked());}else{if(options.placeholder){el.attr('placeholder',options.placeholder);}if(el.data('mask')){el.attr('autocomplete','off');}for(var i=0,maxlength=!0;i<mask.length;i++){var translation=jMask.translation[mask.charAt(i)];if(translation&&translation.recursive){maxlength=!1;break;}}if(maxlength){el.attr('maxlength',mask.length);}p.destroyEvents();p.events();var caret=p.getCaret();p.val(p.getMasked());p.setCaret(caret);}};jMask.init(!el.is('input'));};$.maskWatchers={};var HTMLAttributes=function HTMLAttributes(){var input=$(this),options={},prefix='data-mask-',mask=input.attr('data-mask');if(input.attr(prefix+'reverse')){options.reverse=!0;}if(input.attr(prefix+'clearifnotmatch')){options.clearIfNotMatch=!0;}if(input.attr(prefix+'selectonfocus')==='true'){options.selectOnFocus=!0;}if(notSameMaskObject(input,mask,options)){return input.data('mask',new Mask(this,mask,options));}},notSameMaskObject=function notSameMaskObject(field,mask,options){options=options||{};var maskObject=$(field).data('mask'),stringify=JSON.stringify,value=$(field).val()||$(field).text();try{if(typeof mask==='function'){mask=mask(value);}return _typeof(maskObject)!=='object'||stringify(maskObject.options)!==stringify(options)||maskObject.mask!==mask;}catch(e){}},eventSupported=function eventSupported(eventName){var el=document.createElement('div'),isSupported;eventName='on'+eventName;isSupported=eventName in el;if(!isSupported){el.setAttribute(eventName,'return;');isSupported=typeof el[eventName]==='function';}el=null;return isSupported;};$.fn.mask=function(mask,options){options=options||{};var selector=this.selector,globals=$.jMaskGlobals,interval=globals.watchInterval,watchInputs=options.watchInputs||globals.watchInputs,maskFunction=function maskFunction(){if(notSameMaskObject(this,mask,options)){return $(this).data('mask',new Mask(this,mask,options));}};$(this).each(maskFunction);if(selector&&selector!==''&&watchInputs){clearInterval($.maskWatchers[selector]);$.maskWatchers[selector]=setInterval(function(){$(document).find(selector).each(maskFunction);},interval);}return this;};$.fn.masked=function(val){return this.data('mask').getMaskedVal(val);};$.fn.unmask=function(){clearInterval($.maskWatchers[this.selector]);delete $.maskWatchers[this.selector];return this.each(function(){var dataMask=$(this).data('mask');if(dataMask){dataMask.remove().removeData('mask');}});};$.fn.cleanVal=function(){return this.data('mask').getCleanVal();};$.applyDataMask=function(selector){selector=selector||$.jMaskGlobals.maskElements;var $selector=selector instanceof $?selector:$(selector);$selector.filter($.jMaskGlobals.dataMaskAttr).each(HTMLAttributes);};var globals={maskElements:'input,td,span,div',dataMaskAttr:'*[data-mask]',dataMask:!0,watchInterval:300,watchInputs:!0,useInput:!/Chrome\/[2-4][0-9]|SamsungBrowser/.test(window.navigator.userAgent)&&eventSupported('input'),watchDataMask:!1,byPassKeys:[9,16,17,18,36,37,38,39,40,91],translation:{'0':{pattern:/\d/},'9':{pattern:/\d/,optional:!0},'#':{pattern:/\d/,recursive:!0},'A':{pattern:/[a-zA-Z0-9]/},'S':{pattern:/[a-zA-Z]/}}};$.jMaskGlobals=$.jMaskGlobals||{};globals=$.jMaskGlobals=$.extend(!0,{},globals,$.jMaskGlobals);if(globals.dataMask){$.applyDataMask();}setInterval(function(){if($.jMaskGlobals.watchDataMask){$.applyDataMask();}},globals.watchInterval);},window.jQuery,window.Zepto);function initMask(){$('.cmsMacMask').mask('AA:AA:AA:AA:AA:AA');$('.cmsMacMask').on('keyup',function(){$('.cmsMacMask').val($('.cmsMacMask').val().toUpperCase());});$('.cmsserialmask').on('keyup',function(){$('.cmsserialmask').val($('.cmsserialmask').val().toUpperCase());});}window.initMask=initMask;
11255/*** HowToBuy ***/function ValidateZipCode(){var validationGroup="filter1";var isValid=true;if(Page_ClientValidate(validationGroup)==false){isValid=false;return false;}return isValid;}window.ValidateZipCode=ValidateZipCode;function ValidateHowToBuyChk(){var chk=$("fieldset :checkbox").map(function(){return this;}).get();var isValid=true;ValidateZipCode();var errChooseCategoryDiv=$(".inline--middle");for(var i=0;i<chk.length;i++){if(chk[i].id.includes("chkSubCategory")){if(chk[i].checked==false){isValid=false;if(errChooseCategoryDiv!=null){errChooseCategoryDiv.removeClass("hide");}}else{isValid=true;errChooseCategoryDiv.attr('class','inline--middle hide');break;}}}return isValid;}window.ValidateHowToBuyChk=ValidateHowToBuyChk;/*** Literature Library */function getUrlVars(){var vars=[],hash;var hashes=window.location.href.slice(window.location.href.indexOf('?')+1).split('&');for(var i=0;i<hashes.length;i++){hash=hashes[i].split('=');vars.push(hash[0]);vars[hash[0]]=hash[1];}return vars;}window.getUrlVars=getUrlVars;function chkTypePostback(){var typesQs="";$('.chkType').each(function(){if($(this).is(':checked')){typesQs+=$(this).val()+"|";}});typesQs=typesQs.slice(0,-1);var productQS=getUrlVars()["product"];if(typeof productQS=="undefined"){productQS="all";}var solutionQS=getUrlVars()["solution"];if(typeof solutionQS=="undefined"){solutionQS="all";}var url=window.location.toString();newUrl="?product="+productQS+"&solution="+solutionQS+"&types="+typesQs+"&page=1#hReset";window.location.href=newUrl;}window.chkTypePostback=chkTypePostback;function FilterUrl(url){var pagerElemVal=$(".basic-pagination__item.is-active").text();if(pagerElemVal!='')url+='&page='+pagerElemVal;else{url+='&page='+'1';}//url +='#hReset'; 11256if(typeof history.pushState!="undefined"){var obj={Page:document.title,Url:url};history.pushState(obj,obj.Page,obj.Url);}}window.FilterUrl=FilterUrl;function FilterUrl2(url){if(typeof history.pushState!="undefined"){//var pagerElemVal = $(".basic-pagination__item.is-active").text(); 11257//if (pagerElemVal != '') 11258// url += '&page=' + pagerElemVal; 11259//else { 11260// url += '&page=' + '1'; 11261//} 11262url+='#hReset';var obj={Page:document.title,Url:url};history.pushState(obj,obj.Page,obj.Url);}}window.FilterUrl2=FilterUrl2;/* back in browser */(function(){if($('.resource-library').length){if(window.history&&window.history.pushState){$(window).on('popstate',function(){if(typeof history.pushState!="undefined"){var url=window.location.href;var obj={Page:document.title,Url:url};history.pushState(obj,obj.Page,obj.Url);// location.reload(); 11263clearTimeout(this.timeout);this.timeout=setTimeout(function(){location.reload();},0);}});}}})();/*** Literature Library */ /*** News */function QueryFilterUrl(defaultSelection,paramName){$('.dropDownId').change(function(){var dropdownValue=$('.dropDownId :selected').text();var QParamVal=getUrlVars()[paramName];if(typeof QParamVal=="undefined"){if(dropdownValue!="")QParamVal=dropdownValue;else QParamVal=defaultSelection;}else{QParamVal=dropdownValue;}var urlOriginal=window.location.toString();newUrl="?"+paramName+"="+QParamVal+"&page=1#hReset";window.location.href=newUrl;// return false; 11264if(typeof history.pushState!="undefined"){var obj={Page:document.title,Url:newUrl};history.pushState(obj,obj.Page,obj.Url);clearTimeout(this.timeout);this.timeout=setTimeout(function(){location.reload();},0);}});}window.QueryFilterUrl=QueryFilterUrl;/*** End News */ /*Product FAQ */function FilterFAQUrl(url){if(typeof history.pushState!="undefined"){var obj={Page:document.title,Url:url};history.pushState(obj,obj.Page,obj.Url);}}window.FilterFAQUrl=FilterFAQUrl;/*End Product FAQ*/function OpenInNewTab(url,modalId){// $('body').removeClass('modal-active'); 11265var win=window.open(url,'_blank');win.focus();//var modal = $('.full-modal'); 11266var modal=$('[data-modal="'+modalId+'"]');if(modal.hasClass('full-modal-trigger'))$('body').toggleClass('modal-active');modal.addClass('is-active');var modalClose=$('.js-modal-close');modalClose.on('click',function(){$('.modal, .full-modal').removeClass('is-active');$('html, body').removeClass('modal-active');});}window.OpenInNewTab=OpenInNewTab;function CompareProductsSlide(){$('.js-compare-trigger').filter(function(){return $(this).parents('#vue-product-compare').length===0;}).on('click',function(event){var $this=$(event.currentTarget);var parent=$this.parents('.compare-block');var openItem=parent.children('.js-compare-main');$this.toggleClass('is-active');openItem.slideToggle(400);});}window.CompareProductsSlide=CompareProductsSlide;function OpenCompareProductsSlide(){if(!$('.js-compare-trigger').hasClass('is-active')){$('.js-compare-trigger').click();}}window.OpenCompareProductsSlide=OpenCompareProductsSlide;function CompareRemoveProducts(productsListString){var prodList=productsListString.split(';');prodList.forEach(function(element){var elemBtn=$("[data-btnPC='"+element+"']");if(elemBtn!=null)elemBtn.removeClass('is-active');var elemI=$("[data-iPC='"+element+"']");
11266if(elemI!=null)elemI.attr('class','series-card__btn--icon icon-plus');var elemIi=$("[data-iiPC='"+element+"']");if(elemIi!=null)elemIi.attr('class','tag-btn__icon icon-plus');var elemDiv=$("[data-divPC='"+element+"']");if(elemDiv!=null)elemDiv.removeClass('static-active');});}window.CompareRemoveProducts=CompareRemoveProducts;function AccordionTrigger(){$('.js-accordion-trigger').on('click',function(event){var $this=$(event.currentTarget);var parent=$this.parents('.js-accordion');var openItem=$this.siblings('.js-accordion-main');if(!parent.is('.js-acc-multi-option')){parent.find('.js-accordion-main').not(openItem).slideUp(400);parent.find('.js-accordion-trigger').not($this).removeClass('is-active');}$this.toggleClass('is-active');openItem.slideToggle(400);});}window.AccordionTrigger=AccordionTrigger;function FocusContainerResults(){$('html, body').animate({scrollTop:$("#containerResults").offset().top},1000);}window.FocusContainerResults=FocusContainerResults;function ToggleImageClick(){if($('.js-t-img-trigger.is-active').length>0)$('.model-table__img').toggleClass('is-active');}window.ToggleImageClick=ToggleImageClick;function ClearClassFormControl(){$('select.basic-form__select').each(function(){$(this).removeClass("form-control");});$('.customSearch').each(function(){$(this).removeClass("form-control");});}window.ClearClassFormControl=ClearClassFormControl;function AddPrintClick(){$('.js-print').on('click',function(){window.print();});}window.AddPrintClick=AddPrintClick;function CheckSelectItem($item){switch($item.find('select.switchtextbox').val()){case'SerialNumber':$item.find('.js-select-input').hide();$item.find('.js-select-input input').val('');var elem=$item.find('[data-input="serial-number"]');elem.show();elem.focus();break;case'MACAddress':$item.find('.js-select-input').hide();$item.find('.js-select-input input').val('');var elem2=$item.find('[data-input="mac-address"]');elem2.show();elem2.focus();break;case'By Product Model':$item.find('.js-select-input').hide();$item.find('.js-select-input input').val('');$item.find('[data-input="product-model-info"]').show();break;default:$item.find('.js-select-input').hide();$item.find('.js-select-input input').val('');}}window.CheckSelectItem=CheckSelectItem;function SelectFunctionInit(){$('select.switchtextbox').each(function(){var $parent=$(this).parents('.basic-form');CheckSelectItem($parent);});$('select.switchtextbox').on('change',function(event){var $this=$(event.target);var $parent=$this.parents('.basic-form');CheckSelectItem($parent);});}window.SelectFunctionInit=SelectFunctionInit;function closeModal(){if($('.modal.is-active').find('iframe').length){var openedModalIframe=$('.modal.is-active iframe');var videoURL=openedModalIframe.prop('src');videoURL=videoURL.replace('&autoplay=1','');openedModalIframe.prop('src','');openedModalIframe.prop('src',videoURL);}$('.modal, .full-modal').removeClass('is-active');$('body, html').removeClass('modal-active');$('.body-section').removeClass('ps-active');}window.closeModal=closeModal;function openModal(){modalTrigger=$('.js-modal-trigger');modalTrigger.on('click',function(event){closeModal();var modalId=event.currentTarget.getAttribute('data-modal-id');var modalVideo=event.currentTarget.getAttribute('data-video');var modalInternalVideo=event.currentTarget.getAttribute('data-internal-video');var modalImg=event.currentTarget.getAttribute('data-image');var modal=$('[data-modal="'+modalId+'"]');var $this=$(event.target);if(modalVideo){modal.find('.iframe-block').empty().append(modalVideo);var videoURL=modal.find('iframe').prop('src');videoURL+='&autoplay=1';modal.find('iframe').prop('src',videoURL);}else if(modalInternalVideo){modal.find('.video-block').find('source').attr('src',modalInternalVideo);$('.video-block')[0].load();}else if(modalImg){modal.find('.modal__container').empty().append('<img src="'+modalImg+'"/>');}// if ($this.hasClass('full-modal-trigger')) 11267// $('body').toggleClass('modal-active') 11268modal.addClass('is-active');if(modal.hasClass('modal--ps'))$('.body-section').addClass('ps-active');});}window.openModal=openModal;function modalAction(){closeModal();openModal();}window.modalAction=modalAction;/* Scroll to This*/function ScrollToThis(id){var $jsPageSlideToThis=$(id);$('html, body').animate({scrollTop:$jsPageSlideToThis.offset().top},500);}window.ScrollToThis=ScrollToThis;/* Confirm on Delete */function ConfirmOnDelete(item){if(item){if(confirm("Are you sure to remove "+item+"?")==true)return true;else return false;}if(confirm("Are you sure to remove this address?")==true)return true;else return false;}window.ConfirmOnDelete=ConfirmOnDelete;function RemoveFormConrolClass(){clearTimeout(this.timeout);this.timeout=setTimeout(function(){},0);$(".fc").removeClass("form-control");}window.RemoveFormConrolClass=RemoveFormConrolClass;function IEMacAddressOnChange(){var ua=window.navigator.userAgent;var msie=ua.indexOf("MSIE ");if(msie>0||!!navigator.userAgent.match(/Trident.*rv\:11\./)){var macTxt=$(".cmsMacMask");if(macTxt!=null){// macTxt.attr("onkeypress", "__doPostBack('TMacAddress','');"); 11269}}else{formatMacAddress();}return false;}window.IEMacAddressOnChange=IEMacAddressOnChange;/*My Moxa*/function SetFocusOnElement(elemID){var element=$(elemID);if(element!=null)element.focus();}window.SetFocusOnElement=SetFocusOnElement;$('.stopAtEnter').keyup(function(e){if(e.keyCode==13){e.preventDefault();return false;}});function OnRadioChangeClickOtherCheckbox(checkboxID){$(checkboxID).click();}window.OnRadioChangeClickOtherCheckbox=OnRadioChangeClickOtherCheckbox;function initTagsScript(){var statusBtn=$('.js-status-btn');var editTagBtn=$('.js-update-tags');var modalTrigger=$('.js-modal-trigger');var modalClose=$('.js-modal-close');modalClose.on('click',function(){closeModal();});$('.edit-tags-block').hide();
11269statusBtn.each(function(index,element){var defaultText=$(element).find('.simple-icon-btn__text').data('btn-default');$(element).find('.simple-icon-btn__text').text(defaultText);});editTagBtn.each(function(index,element){var defaultText=$(element).find('.simple-icon-btn__text').data('btn-default');$(element).find('.simple-icon-btn__text').text(defaultText);});editTagBtn.on('click',function(event){var $this=$(event.currentTarget);var parentTr=$this.parents('tr');var otherTr=parentTr.siblings('tr');var targetBlock=parentTr.find('.edit-tags-block');var btnText=$this.find('.simple-icon-btn__text');var btnIcon=$this.find('.simple-icon-btn__icon');var defaultText=$this.find('.simple-icon-btn__text').data('btn-default');var activeText=$this.find('.simple-icon-btn__text').data('btn-canceled');if(btnText.text()===defaultText)btnText.text(activeText);else btnText.text(defaultText);btnIcon.toggleClass('icon-pencil icon-cross');if(parentTr.hasClass('is-active')){targetBlock.hide();parentTr.removeClass('is-active');otherTr.removeClass('is-locked');}else{targetBlock.show();parentTr.addClass('is-active');otherTr.addClass('is-locked');}});$('.js-cancel-update-tag').on('click',function(event){var $this=$(event.currentTarget);var parentTr=$this.parents('tr');var defaultText=parentTr.find('.js-update-tags .simple-icon-btn__text').data('btn-default');$('.edit-tags-block').hide();$('tr').removeClass('is-active is-locked');parentTr.find('.js-update-tags .simple-icon-btn__text').text(defaultText);$('.js-update-tags .simple-icon-btn__icon').removeClass('icon-cross').addClass('icon-pencil');});$('.js-edit-tag').on('click',function(event){var $this=$(event.currentTarget);var parent=$this.parents('.tags-list-block__item');parent.siblings('.tags-list-block__item').removeClass('is-active is-check-delete');parent.toggleClass('is-active');});$('.js-delete-tag').on('click',function(event){var $this=$(event.currentTarget);var parent=$this.parents('.tags-list-block__item');parent.siblings('.tags-list-block__item').removeClass('is-active is-check-delete');parent.toggleClass('is-check-delete');});$('.js-unsubscribe-all').on('click',function(event){var $this=$(event.currentTarg);$('.preference-block-note').toggle($this.checked);});$('.search-dropdown__trigger').on('click',function(event){$(event.target).parents('.search-dropdown').toggleClass('is-active');});// console.log("initTagsScript"); 11270/* $('.search-dropdown__trigger').on('click', function (event) { 11271 $(event.target).parents('.search-dropdown').toggleClass('is-active'); 11272 }); */$('.js-filterSearch_input').on('keyup',function(event){var parent=$(event.currentTarget).parents('.js-filterSearch');var target=parent.find('.js-filterSearch_list li');var filter=$(event.currentTarget).val().toUpperCase();for(var i=0;i<target.length;i++){var aLink=target[i].getElementsByTagName('a')[0];var aText=aLink.text;var matchStart=aText.toUpperCase().indexOf(filter);if(matchStart>-1){target[i].style.display='';var matchEnd=matchStart+filter.length-1;var beforeMatch=aText.slice(0,matchStart);var matchText=aText.slice(matchStart,matchEnd+1);var afterMatch=aText.slice(matchEnd+1);aLink.innerHTML=beforeMatch+'<em>'+matchText+'</em>'+afterMatch;}else target[i].style.display='none';}});}window.initTagsScript=initTagsScript;/******/(function(modules){// webpackBootstrap 11273/******/ // The module cache 11274/******/var installedModules={};/******/ /******/ // The require function 11275/******/function __webpack_require__(moduleId){/******/ /******/ // Check if module is in cache 11276/******/if(installedModules[moduleId]){/******/return installedModules[moduleId].exports;/******/}/******/ // Create a new module (and put it into the cache) 11277/******/var module=installedModules[moduleId]={/******/i:moduleId,/******/l:false,/******/exports:{}/******/};/******/ /******/ // Execute the module function 11278/******/modules[moduleId].call(module.exports,module,module.exports,__webpack_require__);/******/ /******/ // Flag the module as loaded 11279/******/module.l=true;/******/ /******/ // Return the exports of the module 11280/******/return module.exports;/******/}/******/ /******/ /******/ // expose the modules object (__webpack_modules__) 11281/******/__webpack_require__.m=modules;/******/ /******/ // expose the module cache 11282/******/__webpack_require__.c=installedModules;/******/ /******/ // define getter function for harmony exports 11283/******/__webpack_require__.d=function(exports,name,getter){/******/if(!__webpack_require__.o(exports,name)){/******/Object.defineProperty(exports,name,{/******/configurable:false,/******/enumerable:true,/******/get:getter/******/});/******/}/******/};/******/ /******/ // getDefaultExport function for compatibility with non-harmony modules 11284/******/__webpack_require__.n=function(module){/******/var getter=module&&module.__esMo
11284dule?/******/function getDefault(){return module['default'];}:/******/function getModuleExports(){return module;};/******/__webpack_require__.d(getter,'a',getter);/******/return getter;/******/};/******/ /******/ // Object.prototype.hasOwnProperty.call 11285/******/__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property);};/******/ /******/ // __webpack_public_path__ 11286/******/__webpack_require__.p="";/******/ /******/ // Load entry module and return exports 11287/******/return __webpack_require__(__webpack_require__.s=0);/******/}/************************************************************************/ /******/)([/* 0 */ /***/function(module,__webpack_exports__,__webpack_require__){"use strict";Object.defineProperty(__webpack_exports__,"__esModule",{value:true});/* harmony import */var __WEBPACK_IMPORTED_MODULE_0_selectize__=__webpack_require__(1);/* harmony import */var __WEBPACK_IMPORTED_MODULE_0_selectize___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_selectize__);var mixer=void 0;var productForms=$('.basic-form.js-product');function showNoteBlock($btn){var block=$btn.siblings('.save-note-block');block.fadeIn(200).css('display','inline-block');setTimeout(function(){block.fadeOut(200);},3000);}function checkFormNum(){productForms=$('.basic-form.js-product');productForms.each(function(index,element){$(element).find('.basic-form__subheading').text('Product No. '+(index+1));});}function checkSelect($item,$name){switch($item.find('select[name="'+$name+'"]').val()){case'Serial Number':$item.find('.js-select-input').hide();$item.find('[data-input="serial-number"]').show();break;case'Mac Address':$item.find('.js-select-input').hide();$item.find('[data-input="mac-address"]').show();break;case'By Product Model':$item.find('.js-select-input').hide();$item.find('[data-input="product-model-info"]').show();break;case'United States':$item.find('.js-select-input').hide();$item.find('[data-input="usa-state"]').show();break;default:$item.find('.js-select-input').hide();}}function selectFunction(){$('select').on('change',function(event){var $this=$(event.target);var name=$this[0].name;if(name==='product-by'||name==='country'){var $parent=$this.parents('.basic-form');checkSelect($parent,name);}});}function removeProductForm(){$('.js-remove-product').on('click',function(event){var $this=$(event.currentTarget);$this.parents('.basic-form').remove();// checkItemsNum() 11288checkFormNum();});}function initSelectize(optionArray){var $select=$('.edit-tags-block__tags').selectize({plugins:['remove_button'],persist:true,create:function create(input){return{value:input,text:input};}});$select.each(function(index,element){var test=element.selectize;test.addOption(optionArray);test.refreshOptions();});}/***/},/* 1 */ /***/function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;/** 11289 * selectize.js (v0.12.6) 11290 * Copyright (c) 2013â2015 Brian Reavis & contributors 11291 * 11292 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this 11293 * file except in compliance with the License. You may obtain a copy of the License at: 11294 * http://www.apache.org/licenses/LICENSE-2.0 11295 * 11296 * Unless required by applicable law or agreed to in writing, software distributed under 11297 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11298 * ANY KIND, either express or implied. See the License for the specific language 11299 * governing permissions and limitations under the License. 11300 * 11301 * @author Brian Reavis <[email protected]> 11302 */ /*jshint curly:false */ /*jshint browser:true */(function(root,factory){if(true){!(__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(2),__webpack_require__(5),__webpack_require__(6)],__WEBPACK_AMD_DEFINE_FACTORY__=factory,__WEBPACK_AMD_DEFINE_RESULT__=typeof __WEBPACK_AMD_DEFINE_FACTORY__==='function'?__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__):__WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_RESULT__!==undefined&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__));}else {}})(this,function($,Sifter,MicroPlugin){'use strict';var highlight=function highlight($element,pattern){if(typeof pattern==='string'&&!pattern.length)return;var regex=typeof pattern==='string'?new RegExp(pattern,'i'):pattern;var highlight=function highlight(node){var skip=0;// Wrap matching part of text node with highlighting <span>, e.g. 11303// Soccer -> <span class="highlight">Soc</span>cer for regex = /soc/i 11304if(node.nodeType===3){var pos=node.data.search(regex);if(pos>=0&&node.data.length>0){var match=node.data.match(regex);var spannode=document.createElement('span');spannode.className='highlight';var middlebit=node.splitText(pos);var endbit=middlebit.splitText(match[0].length);var middleclone=middlebit.cloneNode(true);spannode.appendChild(middleclone);middlebit.parentNode.replaceChild(spannode,middlebit);skip=1;}}// Recurse element node, looking for child text nodes to highlight, unless element 11305// is childless, <script>, <style>, or already highlighted: <span class="hightlight"> 11306else if(node.nodeType===1&&node.childNodes&&!/(script|style)/i.test(node.tagName)&&(node.className!=='highlight'||node.tagName!=='SPAN')){for(var i=0;i<node.childNodes.length;++i){i+=highlight(node.childNodes[i]);}}
vendor: 6,524 bytes, lines 11306-11385
11306return skip;};return $element.each(function(){highlight(this);});};/** 11307 * removeHighlight fn copied from highlight v5 and 11308 * edited to remove with() and pass js strict mode 11309 */$.fn.removeHighlight=function(){return this.find("span.highlight").each(function(){this.parentNode.firstChild.nodeName;var parent=this.parentNode;parent.replaceChild(this.firstChild,this);parent.normalize();}).end();};var MicroEvent=function MicroEvent(){};MicroEvent.prototype={on:function on(event,fct){this._events=this._events||{};this._events[event]=this._events[event]||[];this._events[event].push(fct);},off:function off(event,fct){var n=arguments.length;if(n===0)return delete this._events;if(n===1)return delete this._events[event];this._events=this._events||{};if(event in this._events===false)return;this._events[event].splice(this._events[event].indexOf(fct),1);},trigger:function trigger(event/* , args... */){this._events=this._events||{};if(event in this._events===false)return;for(var i=0;i<this._events[event].length;i++){this._events[event][i].apply(this,Array.prototype.slice.call(arguments,1));}}};/** 11310 * Mixin will delegate all MicroEvent.js function in the destination object. 11311 * 11312 * - MicroEvent.mixin(Foobar) will make Foobar able to use MicroEvent 11313 * 11314 * @param {object} the object which will support MicroEvent 11315 */MicroEvent.mixin=function(destObject){var props=['on','off','trigger'];for(var i=0;i<props.length;i++){destObject.prototype[props[i]]=MicroEvent.prototype[props[i]];}};var IS_MAC=/Mac/.test(navigator.userAgent);var KEY_A=65;var KEY_COMMA=188;var KEY_RETURN=13;var KEY_ESC=27;var KEY_LEFT=37;var KEY_UP=38;var KEY_P=80;var KEY_RIGHT=39;var KEY_DOWN=40;var KEY_N=78;var KEY_BACKSPACE=8;var KEY_DELETE=46;var KEY_SHIFT=16;var KEY_CMD=IS_MAC?91:17;var KEY_CTRL=IS_MAC?18:17;var KEY_TAB=9;var TAG_SELECT=1;var TAG_INPUT=2;// for now, android support in general is too spotty to support validity 11316var SUPPORTS_VALIDITY_API=!/android/i.test(window.navigator.userAgent)&&!!document.createElement('input').validity;var isset=function isset(object){return typeof object!=='undefined';};/** 11317 * Converts a scalar to its best string representation 11318 * for hash keys and HTML attribute values. 11319 * 11320 * Transformations: 11321 * 'str' -> 'str' 11322 * null -> '' 11323 * undefined -> '' 11324 * true -> '1' 11325 * false -> '0' 11326 * 0 -> '0' 11327 * 1 -> '1' 11328 * 11329 * @param {string} value 11330 * @returns {string|null} 11331 */var hash_key=function hash_key(value){if(typeof value==='undefined'||value===null)return null;if(typeof value==='boolean')return value?'1':'0';return value+'';};/** 11332 * Escapes a string for use within HTML. 11333 * 11334 * @param {string} str 11335 * @returns {string} 11336 */var escape_html=function escape_html(str){return(str+'').replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>').replace(/"/g,'"');};/** 11337 * Escapes "$" characters in replacement strings. 11338 * 11339 * @param {string} str 11340 * @returns {string} 11341 */var escape_replace=function escape_replace(str){return(str+'').replace(/\$/g,'$$$$');};var hook={};/** 11342 * Wraps `method` on `self` so that `fn` 11343 * is invoked before the original method. 11344 * 11345 * @param {object} self 11346 * @param {string} method 11347 * @param {function} fn 11348 */hook.before=function(self,method,fn){var original=self[method];self[method]=function(){fn.apply(self,arguments);return original.apply(self,arguments);};};/** 11349 * Wraps `method` on `self` so that `fn` 11350 * is invoked after the original method. 11351 * 11352 * @param {object} self 11353 * @param {string} method 11354 * @param {function} fn 11355 */hook.after=function(self,method,fn){var original=self[method];self[method]=function(){var result=original.apply(self,arguments);fn.apply(self,arguments);return result;};};/** 11356 * Wraps `fn` so that it can only be invoked once. 11357 * 11358 * @param {function} fn 11359 * @returns {function} 11360 */var once=function once(fn){var called=false;return function(){if(called)return;called=true;fn.apply(this,arguments);};};/** 11361 * Wraps `fn` so that it can only be called once 11362 * every `delay` milliseconds (invoked on the falling edge). 11363 * 11364 * @param {function} fn 11365 * @param {int} delay 11366 * @returns {function} 11367 */var debounce=function debounce(fn,delay){var timeout;return function(){var self=this;var args=arguments;window.clearTimeout(timeout);timeout=window.setTimeout(function(){fn.apply(self,args);},delay);};};/** 11368 * Debounce all fired events types listed in `types` 11369 * while executing the provided `fn`. 11370 * 11371 * @param {object} self 11372 * @param {array} types 11373 * @param {function} fn 11374 */var debounce_events=function debounce_events(self,types,fn){var type;var trigger=self.trigger;var event_args={};// override trigger method 11375self.trigger=function(){var type=arguments[0];if(types.indexOf(type)!==-1){event_args[type]=arguments;}else{return trigger.apply(self,arguments);}};// invoke provided function 11376fn.apply(self,[]);self.trigger=trigger;// trigger queued events 11377for(type in event_args){if(event_args.hasOwnProperty(type)){trigger.apply(self,event_args[type]);}}};/** 11378 * A workaround for http://bugs.jquery.com/ticket/6696 11379 * 11380 * @param {object} $parent - Parent element to listen on. 11381 * @param {string} event - Event name. 11382 * @param {string} selector - Descendant selector to filter by. 11383 * @param {function} fn - Event handler. 11384 */var watchChildEvent=function watchChildEvent($parent,event,selector,fn){$parent.on(event,selector,function(e){var child=e.target;while(child&&child.parentNode!==$parent[0]){child=child.parentNode;}e.currentTarget=child;return fn.apply(this,[e]);});};/** 11385 * Determines the current selection within a text input control.
11386 * Returns an object containing: 11387 * - start 11388 * - length 11389 * 11390 * @param {object} input 11391 * @returns {object} 11392 */var getSelection=function getSelection(input){var result={};if('selectionStart'in input){result.start=input.selectionStart;result.length=input.selectionEnd-result.start;}else if(document.selection){input.focus();var sel=document.selection.createRange();var selLen=document.selection.createRange().text.length;sel.moveStart('character',-input.value.length);result.start=sel.text.length-selLen;result.length=selLen;}return result;};/** 11393 * Copies CSS properties from one element to another. 11394 * 11395 * @param {object} $from 11396 * @param {object} $to 11397 * @param {array} properties 11398 */var transferStyles=function transferStyles($from,$to,properties){var i,n,styles={};if(properties){for(i=0,n=properties.length;i<n;i++){styles[properties[i]]=$from.css(properties[i]);}}else{styles=$from.css();}$to.css(styles);};/** 11399 * Measures the width of a string within a 11400 * parent element (in pixels). 11401 * 11402 * @param {string} str 11403 * @param {object} $parent 11404 * @returns {int} 11405 */var measureString=function measureString(str,$parent){if(!str){return 0;}if(!Selectize.$testInput){Selectize.$testInput=$('<span />').css({position:'absolute',top:-99999,left:-99999,width:'auto',padding:0,whiteSpace:'pre'}).appendTo('body');}Selectize.$testInput.text(str);transferStyles($parent,Selectize.$testInput,['letterSpacing','fontSize','fontFamily','fontWeight','textTransform']);return Selectize.$testInput.width();};/** 11406 * Sets up an input to grow horizontally as the user 11407 * types. If the value is changed manually, you can 11408 * trigger the "update" handler to resize: 11409 * 11410 * $input.trigger('update'); 11411 * 11412 * @param {object} $input 11413 */var autoGrow=function autoGrow($input){var currentWidth=null;var update=function update(e,options){var value,keyCode,printable,placeholder,width;var shift,character,selection;e=e||window.event||{};options=options||{};if(e.metaKey||e.altKey)return;if(!options.force&&$input.data('grow')===false)return;value=$input.val();if(e.type&&e.type.toLowerCase()==='keydown'){keyCode=e.keyCode;printable=keyCode>=48&&keyCode<=57||// 0-9 11414keyCode>=65&&keyCode<=90||// a-z 11415keyCode>=96&&keyCode<=111||// numpad 0-9, numeric operators 11416keyCode>=186&&keyCode<=222||// semicolon, equal, comma, dash, etc. 11417keyCode===32// space 11418;if(keyCode===KEY_DELETE||keyCode===KEY_BACKSPACE){selection=getSelection($input[0]);if(selection.length){value=value.substring(0,selection.start)+value.substring(selection.start+selection.length);}else if(keyCode===KEY_BACKSPACE&&selection.start){value=value.substring(0,selection.start-1)+value.substring(selection.start+1);}else if(keyCode===KEY_DELETE&&typeof selection.start!=='undefined'){value=value.substring(0,selection.start)+value.substring(selection.start+1);}}else if(printable){shift=e.shiftKey;character=String.fromCharCode(e.keyCode);if(shift)character=character.toUpperCase();else character=character.toLowerCase();value+=character;}}placeholder=$input.attr('placeholder');if(!value&&placeholder){value=placeholder;}width=measureString(value,$input)+4;if(width!==currentWidth){currentWidth=width;$input.width(width);$input.triggerHandler('resize');}};$input.on('keydown keyup update blur',update);update();};var domToString=function domToString(d){var tmp=document.createElement('div');tmp.appendChild(d.cloneNode(true));return tmp.innerHTML;};var logError=function logError(message,options){if(!options)options={};var component="Selectize";console.error(component+": "+message);if(options.explanation){// console.group is undefined in <IE11 11419if(console.group)console.group();console.error(options.explanation);if(console.group)console.groupEnd();}};var Selectize=function Selectize($input,settings){var key,i,n,dir,input,self=this;input=$input[0];input.selectize=self;// detect rtl environment 11420var computedStyle=window.getComputedStyle&&window.getComputedStyle(input,null);dir=computedStyle?computedStyle.getPropertyValue('direction'):in
vendor: 14,307 bytes, lines 11420-11493
11420put.currentStyle&&input.currentStyle.direction;dir=dir||$input.parents('[dir]:first').attr('dir')||'';// setup default state 11421$.extend(self,{order:0,settings:settings,$input:$input,tabIndex:$input.attr('tabindex')||'',tagType:input.tagName.toLowerCase()==='select'?TAG_SELECT:TAG_INPUT,rtl:/rtl/i.test(dir),eventNS:'.selectize'+ ++Selectize.count,highlightedValue:null,isBlurring:false,isOpen:false,isDisabled:false,isRequired:$input.is('[required]'),isInvalid:false,isLocked:false,isFocused:false,isInputHidden:false,isSetup:false,isShiftDown:false,isCmdDown:false,isCtrlDown:false,ignoreFocus:false,ignoreBlur:false,ignoreHover:false,hasOptions:false,currentResults:null,lastValue:'',caretPos:0,loading:0,loadedSearches:{},$activeOption:null,$activeItems:[],optgroups:{},options:{},userOptions:{},items:[],renderCache:{},onSearchChange:settings.loadThrottle===null?self.onSearchChange:debounce(self.onSearchChange,settings.loadThrottle)});// search system 11422self.sifter=new Sifter(this.options,{diacritics:settings.diacritics});// build options table 11423if(self.settings.options){for(i=0,n=self.settings.options.length;i<n;i++){self.registerOption(self.settings.options[i]);}delete self.settings.options;}// build optgroup table 11424if(self.settings.optgroups){for(i=0,n=self.settings.optgroups.length;i<n;i++){self.registerOptionGroup(self.settings.optgroups[i]);}delete self.settings.optgroups;}// option-dependent defaults 11425self.settings.mode=self.settings.mode||(self.settings.maxItems===1?'single':'multi');if(typeof self.settings.hideSelected!=='boolean'){self.settings.hideSelected=self.settings.mode==='multi';}self.initializePlugins(self.settings.plugins);self.setupCallbacks();self.setupTemplates();self.setup();};// mixins 11426// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 11427MicroEvent.mixin(Selectize);if(typeof MicroPlugin!=="undefined"){MicroPlugin.mixin(Selectize);}else{logError("Dependency MicroPlugin is missing",{explanation:"Make sure you either: (1) are using the \"standalone\" "+"version of Selectize, or (2) require MicroPlugin before you "+"load Selectize."});}// methods 11428// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 11429$.extend(Selectize.prototype,{/** 11430 * Creates all elements and sets up event bindings. 11431 */setup:function setup(){var self=this;var settings=self.settings;var eventNS=self.eventNS;var $window=$(window);var $document=$(document);var $input=self.$input;var $wrapper;var $control;var $control_input;var $dropdown;var $dropdown_content;var $dropdown_parent;var inputMode;var timeout_blur;var timeout_focus;var classes;var classes_plugins;var inputId;inputMode=self.settings.mode;classes=$input.attr('class')||'';$wrapper=$('<div>').addClass(settings.wrapperClass).addClass(classes).addClass(inputMode);$control=$('<div>').addClass(settings.inputClass).addClass('items').appendTo($wrapper);$control_input=$('<input type="text" autocomplete="off" />').appendTo($control).attr('tabindex',$input.is(':disabled')?'-1':self.tabIndex);$dropdown_parent=$(settings.dropdownParent||$wrapper);$dropdown=$('<div>').addClass(settings.dropdownClass).addClass(inputMode).hide().appendTo($dropdown_parent);$dropdown_content=$('<div>').addClass(settings.dropdownContentClass).appendTo($dropdown);if(inputId=$input.attr('id')){$control_input.attr('id',inputId+'-selectized');$("label[for='"+inputId+"']").attr('for',inputId+'-selectized');}if(self.settings.copyClassesToDropdown){$dropdown.addClass(classes);}$wrapper.css({width:$input[0].style.width});if(self.plugins.names.length){classes_plugins='plugin-'+self.plugins.names.join(' plugin-');$wrapper.addClass(classes_plugins);$dropdown.addClass(classes_plugins);}if((settings.maxItems===null||settings.maxItems>1)&&self.tagType===TAG_SELECT){$input.attr('multiple','multiple');}if(self.settings.placeholder){$control_input.attr('placeholder',settings.placeholder);}// if splitOn was not passed in, construct it from the delimiter to allow pasting universally 11432if(!self.settings.splitOn&&self.settings.delimiter){var delimiterEscaped=self.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g,'\\$&');self.settings.splitOn=new RegExp('\\s*'+delimiterEscaped+'+\\s*');}if($input.attr('autocorrect')){$control_input.attr('autocorrect',$input.attr('autocorrect'));}if($input.attr('autocapitalize')){$control_input.attr('autocapitalize',$input.attr('autocapitalize'));}$control_input[0].type=$input[0].type;self.$wrapper=$wrapper;self.$control=$control;self.$control_input=$control_input;self.$dropdown=$dropdown;self.$dropdown_content=$dropdown_content;$dropdown.on('mouseenter mousedown click','[data-disabled]>[data-selectable]',function(e){e.stopImmediatePropagation();});$dropdown.on('mouseenter','[data-selectable]',function(){return self.onOptionHover.apply(self,arguments);});$dropdown.on('mousedown click','[data-selectable]',function(){return self.onOptionSelect.apply(self,arguments);});watchChildEvent($control,'mousedown','*:not(input)',function(){return self.onItemSelect.apply(self,arguments);});autoGrow($control_input);$control.on({mousedown:function mousedown(){return self.onMouseDown.apply(self,arguments);},click:function click(){return self.onClick.apply(self,arguments);}});$control_input.on({mousedown:function mousedown(e){e.stopPropagation();},keydown:function keydown(){return self.onKeyDown.apply(self,arguments);},keyup:function keyup(){return self.onKeyUp.apply(self,arguments);},keypress:function keypress(){return self.onKeyPress.apply(self,arguments);},resize:function resize(){self.positionDropdown.apply(self,[]);},blur:function blur(){return self.onBlur.apply(self,arguments);},focus:function focus(){self.ignoreBlur=false;return self.onFocus.apply(self,arguments);},paste:function paste(){return self.onPaste.apply(self,arguments);}});$document.on('keydown'+eventNS,function(e){self.isCmdDown=e[IS_MAC?'metaKey':'ctrlKey'];self.isCtrlDown=e[IS_MAC?'altKey':'ctrlKey'];self.isShiftDown=e.shiftKey;});$document.on('keyup'+eventNS,function(e){if(e.keyCode===KEY_CTRL)self.isCtrlDown=false;if(e.keyCode===KEY_SHIFT)self.isShiftDown=false;if(e.keyCode===KEY_CMD)self.isCmdDown=false;});$document.on('mousedown'+eventNS,function(e){if(self.isFocused){// prevent events on the dropdown scrollbar from causing the control to blur 11433if(e.target===self.$dropdown[0]||e.target.parentNode===self.$dropdown[0]){return false;}// blur on click outside 11434if(!self.$control.has(e.target).length&&e.target!==self.$control[0]){self.blur(e.target);}}});$window.on(['scroll'+eventNS,'resize'+eventNS].join(' '),function(){if(self.isOpen){self.positionDropdown.apply(self,arguments);}});$window.on('mousemove'+eventNS,function(){self.ignoreHover=false;});// store original children and tab index so that they can be 11435// restored when the destroy() method is called. 11436this.revertSettings={$children:$input.children().detach(),tabindex:$input.attr('tabindex')};$input.attr('tabindex',-1).hide().after(self.$wrapper);if($.isArray(settings.items)){self.setValue(settings.items);delete settings.items;}// feature detect for the validation API 11437if(SUPPORTS_VALIDITY_API){$input.on('invalid'+eventNS,function(e){e.preventDefault();self.isInvalid=true;self.refreshState();});}self.updateOriginalInput();self.refreshItems();self.refreshState();self.updatePlaceholder();self.isSetup=true;if($input.is(':disabled')){self.disable();}self.on('change',this.onChange);$input.data('selectize',self);$input.addClass('selectized');self.trigger('initialize');// preload options 11438if(settings.preload===true){self.onSearchChange('');}},/** 11439 * Sets up default rendering functions. 11440 */setupTemplates:function setupTemplates(){var self=this;var field_label=self.settings.labelField;var field_optgroup=self.settings.optgroupLabelField;var templates={'optgroup':function optgroup(data){return'<div class="optgroup">'+data.html+'</div>';},'optgroup_header':function optgroup_header(data,escape){return'<div class="optgroup-header">'+escape(data[field_optgroup])+'</div>';},'option':function option(data,escape){return'<div class="option">'+escape(data[field_label])+'</div>';},'item':function item(data,escape){return'<div class="item">'+escape(data[field_label])+'</div>';},'option_create':function option_create(data,escape){return'<div class="create">Add <strong>'+escape(data.input)+'</strong>…</div>';}};self.settings.render=$.extend({},templates,self.settings.render);},/** 11441 * Maps fired events to callbacks provided 11442 * in the settings used when creating the control. 11443 */setupCallbacks:function setupCallbacks(){var key,fn,callbacks={'initialize':'onInitialize','change':'onChange','item_add':'onItemAdd','item_remove':'onItemRemove','clear':'onClear','option_add':'onOptionAdd','option_remove':'onOptionRemove','option_clear':'onOptionClear','optgroup_add':'onOptionGroupAdd','optgroup_remove':'onOptionGroupRemove','optgroup_clear':'onOptionGroupClear','dropdown_open':'onDropdownOpen','dropdown_close':'onDropdownClose','type':'onType','load':'onLoad','focus':'onFocus','blur':'onBlur'};for(key in callbacks){if(callbacks.hasOwnProperty(key)){fn=this.settings[callbacks[key]];if(fn)this.on(key,fn);}}},/** 11444 * Triggered when the main control element 11445 * has a click event. 11446 * 11447 * @param {object} e 11448 * @return {boolean} 11449 */onClick:function onClick(e){var self=this;// necessary for mobile webkit devices (manual focus triggering 11450// is ignored unless invoked within a click event) 11451// also necessary to reopen a dropdown that has been closed by 11452// closeAfterSelect 11453if(!self.isFocused||!self.isOpen){self.focus();e.preventDefault();}},/** 11454 * Triggered when the main control element 11455 * has a mouse down event. 11456 * 11457 * @param {object} e 11458 * @return {boolean} 11459 */onMouseDown:function onMouseDown(e){var self=this;var defaultPrevented=e.isDefaultPrevented();var $target=$(e.target);if(self.isFocused){// retain focus by preventing native handling. if the 11460// event target is the input it should not be modified. 11461// otherwise, text selection within the input won't work. 11462if(e.target!==self.$control_input[0]){if(self.settings.mode==='single'){// toggle dropdown 11463self.isOpen?self.close():self.open();}else if(!defaultPrevented){self.setActiveItem(null);}return false;}}else{// give control focus 11464if(!defaultPrevented){window.setTimeout(function(){self.focus();},0);}}},/** 11465 * Triggered when the value of the control has been changed. 11466 * This should propagate the event to the original DOM 11467 * input / select element. 11468 */onChange:function onChange(){this.$input.trigger('change');},/** 11469 * Triggered on <input> paste. 11470 * 11471 * @param {object} e 11472 * @returns {boolean} 11473 */onPaste:function onPaste(e){var self=this;if(self.isFull()||self.isInputHidden||self.isLocked){e.preventDefault();return;}// If a regex or string is included, this will split the pasted 11474// input and create Items for each separate value 11475if(self.settings.splitOn){// Wait for pasted text to be recognized in value 11476setTimeout(function(){var pastedText=self.$control_input.val();if(!pastedText.match(self.settings.splitOn)){return;}var splitInput=$.trim(pastedText).split(self.settings.splitOn);for(var i=0,n=splitInput.length;i<n;i++){self.createItem(splitInput[i]);}},0);}},/** 11477 * Triggered on <input> keypress. 11478 * 11479 * @param {object} e 11480 * @returns {boolean} 11481 */onKeyPress:function onKeyPress(e){if(this.isLocked)return e&&e.preventDefault();var character=String.fromCharCode(e.keyCode||e.which);if(this.settings.create&&this.settings.mode==='multi'&&character===this.settings.delimiter){this.createItem();e.preventDefault();return false;}},/** 11482 * Triggered on <input> keydown. 11483 * 11484 * @param {object} e 11485 * @returns {boolean} 11486 */onKeyDown:function onKeyDown(e){var isInput=e.target===this.$control_input[0];var self=this;if(self.isLocked){if(e.keyCode!==KEY_TAB){e.preventDefault();}return;}switch(e.keyCode){case KEY_A:if(self.isCmdDown){self.selectAll();return;}break;case KEY_ESC:if(self.isOpen){e.preventDefault();e.stopPropagation();self.close();}return;case KEY_N:if(!e.ctrlKey||e.altKey)break;case KEY_DOWN:if(!self.isOpen&&self.hasOptions){self.open();}else if(self.$activeOption){self.ignoreHover=true;var $next=self.getAdjacentOption(self.$activeOption,1);if($next.length)self.setActiveOption($next,true,true);}e.preventDefault();return;case KEY_P:if(!e.ctrlKey||e.altKey)break;case KEY_UP:if(self.$activeOption){self.ignoreHover=true;var $prev=self.getAdjacentOption(self.$activeOption,-1);if($prev.length)self.setActiveOption($prev,true,true);}e.preventDefault();return;case KEY_RETURN:if(self.isOpen&&self.$activeOption){self.onOptionSelect({currentTarget:self.$activeOption});e.preventDefault();}return;case KEY_LEFT:self.advanceSelection(-1,e);return;case KEY_RIGHT:self.advanceSelection(1,e);return;case KEY_TAB:if(self.settings.selectOnTab&&self.isOpen&&self.$activeOption){self.onOptionSelect({currentTarget:self.$activeOption});// Default behaviour is to jump to the next field, we only want this 11487// if the current field doesn't accept any more entries 11488if(!self.isFull()){e.preventDefault();}}if(self.settings.create&&self.createItem()){e.preventDefault();}return;case KEY_BACKSPACE:case KEY_DELETE:self.deleteSelection(e);return;}if((self.isFull()||self.isInputHidden)&&!(IS_MAC?e.metaKey:e.ctrlKey)){e.preventDefault();return;}},/** 11489 * Triggered on <input> keyup. 11490 * 11491 * @param {object} e 11492 * @returns {boolean} 11493 */onKeyUp:function onKeyUp(e){var self=this;if(self.isLocked)return e&&e.preventDefault();var value=self.$control_input.val()||'';if(self.lastValue!==value){self.lastValue=value;self.onSearchChange(value);self.refreshOptions();self.trigger('type',value);}},/**
11494 * Invokes the user-provide option provider / loader. 11495 * 11496 * Note: this function is debounced in the Selectize 11497 * constructor (by `settings.loadThrottle` milliseconds) 11498 * 11499 * @param {string} value 11500 */onSearchChange:function onSearchChange(value){var self=this;var fn=self.settings.load;if(!fn)return;if(self.loadedSearches.hasOwnProperty(value))return;self.loadedSearches[value]=true;self.load(function(callback){fn.apply(self,[value,callback]);});},/** 11501 * Triggered on <input> focus. 11502 * 11503 * @param {object} e (optional) 11504 * @returns {boolean} 11505 */onFocus:function onFocus(e){var self=this;var wasFocused=self.isFocused;if(self.isDisabled){self.blur();e&&e.preventDefault();return false;}if(self.ignoreFocus)return;self.isFocused=true;if(self.settings.preload==='focus')self.onSearchChange('');if(!wasFocused)self.trigger('focus');if(!self.$activeItems.length){self.showInput();self.setActiveItem(null);self.refreshOptions(!!self.settings.openOnFocus);}self.refreshState();},/** 11506 * Triggered on <input> blur. 11507 * 11508 * @param {object} e 11509 * @param {Element} dest 11510 */onBlur:function onBlur(e,dest){var self=this;if(!self.isFocused)return;self.isFocused=false;if(self.ignoreFocus){return;}else if(!self.ignoreBlur&&document.activeElement===self.$dropdown_content[0]){// necessary to prevent IE closing the dropdown when the scrollbar is clicked 11511self.ignoreBlur=true;self.onFocus(e);return;}var deactivate=function deactivate(){self.close();self.setTextboxValue('');self.setActiveItem(null);self.setActiveOption(null);self.setCaret(self.items.length);self.refreshState();// IE11 bug: element still marked as active 11512dest&&dest.focus&&dest.focus();self.isBlurring=false;self.ignoreFocus=false;self.trigger('blur');};self.isBlurring=true;self.ignoreFocus=true;if(self.settings.create&&self.settings.createOnBlur){self.createItem(null,false,deactivate);}else{deactivate();}},/** 11513 * Triggered when the user rolls over 11514 * an option in the autocomplete dropdown menu. 11515 * 11516 * @param {object} e 11517 * @returns {boolean} 11518 */onOptionHover:function onOptionHover(e){if(this.ignoreHover)return;this.setActiveOption(e.currentTarget,false);},/** 11519 * Triggered when the user clicks on an option 11520 * in the autocomplete dropdown menu. 11521 * 11522 * @param {object} e 11523 * @returns {boolean} 11524 */onOptionSelect:function onOptionSelect(e){var value,$target,$option,self=this;if(e.preventDefault){e.preventDefault();e.stopPropagation();}$target=$(e.currentTarget);if($target.hasClass('create')){self.createItem(null,function(){if(self.settings.closeAfterSelect){self.close();}});}else{value=$target.attr('data-value');if(typeof value!=='undefined'){self.lastQuery=null;self.setTextboxValue('');self.addItem(value);if(self.settings.closeAfterSelect){self.close();}else if(!self.settings.hideSelected&&e.type&&/mouse/.test(e.type)){self.setActiveOption(self.getOption(value));}}}},/** 11525 * Triggered when the user clicks on an item 11526 * that has been selected. 11527 * 11528 * @param {object} e 11529 * @returns {boolean} 11530 */onItemSelect:function onItemSelect(e){var self=this;if(self.isLocked)return;if(self.settings.mode==='multi'){e.preventDefault();self.setActiveItem(e.currentTarget,e);}},/** 11531 * Invokes the provided method that provides 11532 * results to a callback---which are then added 11533 * as options to the control. 11534 * 11535 * @param {function} fn 11536 */load:function load(fn){var self=this;var $wrapper=self.$wrapper.addClass(self.settings.loadingClass);self.loading++;fn.apply(self,[function(results){self.loading=Math.max(self.loading-1,0);if(results&&results.length){self.addOption(results);self.refreshOptions(self.isFocused&&!self.isInputHidden);}if(!self.loading){$wrapper.removeClass(self.settings.loadingClass);}self.trigger('load',results);}]);},/** 11537 * Sets the input field of the control to the specified value. 11538 * 11539 * @param {string} value 11540 */setTextboxValue:function setTextboxValue(value){var $input=this.$control_input;var changed=$input.val()!==value;if(changed){$input.val(value).triggerHandler('update');this.lastValue=value;}},/** 11541 * Returns the value of the control. If multiple items 11542 * can be selected (e.g. <select multiple>), this returns 11543 * an array. If only one item can be selected, this 11544 * returns a string. 11545 *
11546 * @returns {mixed} 11547 */getValue:function getValue(){if(this.tagType===TAG_SELECT&&this.$input.attr('multiple')){return this.items;}else{return this.items.join(this.settings.delimiter);}},/** 11548 * Resets the selected items to the given value. 11549 * 11550 * @param {mixed} value 11551 */setValue:function setValue(value,silent){var events=silent?[]:['change'];debounce_events(this,events,function(){this.clear(silent);this.addItems(value,silent);});},/** 11552 * Sets the selected item. 11553 * 11554 * @param {object} $item 11555 * @param {object} e (optional) 11556 */setActiveItem:function setActiveItem($item,e){var self=this;var eventName;var i,idx,begin,end,item,swap;var $last;if(self.settings.mode==='single')return;$item=$($item);// clear the active selection 11557if(!$item.length){$(self.$activeItems).removeClass('active');self.$activeItems=[];if(self.isFocused){self.showInput();}return;}// modify selection 11558eventName=e&&e.type.toLowerCase();if(eventName==='mousedown'&&self.isShiftDown&&self.$activeItems.length){$last=self.$control.children('.active:last');begin=Array.prototype.indexOf.apply(self.$control[0].childNodes,[$last[0]]);end=Array.prototype.indexOf.apply(self.$control[0].childNodes,[$item[0]]);if(begin>end){swap=begin;begin=end;end=swap;}for(i=begin;i<=end;i++){item=self.$control[0].childNodes[i];if(self.$activeItems.indexOf(item)===-1){$(item).addClass('active');self.$activeItems.push(item);}}e.preventDefault();}else if(eventName==='mousedown'&&self.isCtrlDown||eventName==='keydown'&&this.isShiftDown){if($item.hasClass('active')){idx=self.$activeItems.indexOf($item[0]);self.$activeItems.splice(idx,1);$item.removeClass('active');}else{self.$activeItems.push($item.addClass('active')[0]);}}else{$(self.$activeItems).removeClass('active');self.$activeItems=[$item.addClass('active')[0]];}// ensure control has focus 11559self.hideInput();if(!this.isFocused){self.focus();}},/** 11560 * Sets the selected item in the dropdown menu 11561 * of available options. 11562 * 11563 * @param {object} $object 11564 * @param {boolean} scroll 11565 * @param {boolean} animate 11566 */setActiveOption:function setActiveOption($option,scroll,animate){var height_menu,height_item,y;var scroll_top,scroll_bottom;var self=this;if(self.$activeOption)self.$activeOption.removeClass('active');self.$activeOption=null;$option=$($option);if(!$option.length)return;self.$activeOption=$option.addClass('active');if(scroll||!isset(scroll)){height_menu=self.$dropdown_content.height();height_item=self.$activeOption.outerHeight(true);scroll=self.$dropdown_content.scrollTop()||0;y=self.$activeOption.offset().top-self.$dropdown_content.offset().top+scroll;scroll_top=y;scroll_bottom=y-height_menu+height_item;if(y+height_item>height_menu+scroll){self.$dropdown_content.stop().animate({scrollTop:scroll_bottom},animate?self.settings.scrollDuration:0);}else if(y<scroll){self.$dropdown_content.stop().animate({scrollTop:scroll_top},animate?self.settings.scrollDuration:0);}}},/** 11567 * Selects all items (CTRL + A). 11568 */selectAll:function selectAll(){var self=this;if(self.settings.mode==='single')return;self.$activeItems=Array.prototype.slice.apply(self.$control.children(':not(input)').addClass('active'));if(self.$activeItems.length){self.hideInput();self.close();}self.focus();},/** 11569 * Hides the input element out of view, while 11570 * retaining its focus. 11571 */hideInput:function hideInput(){var self=this;self.setTextboxValue('');self.$control_input.css({opacity:0,position:'absolute',left:self.rtl?10000:-10000});self.isInputHidden=true;},/** 11572 * Restores input visibility. 11573 */showInput:function showInput(){this.$control_input.css({opacity:1,position:'relative',left:0});this.isInputHidden=false;},/** 11574 * Gives the control focus. 11575 */focus:function focus(){var self=this;if(self.isDisabled)return;self.ignoreFocus=true;self.$control_input[0].focus();window.setTimeout(function(){self.ignoreFocus=false;self.onFocus();}
11575,0);},/** 11576 * Forces the control out of focus. 11577 * 11578 * @param {Element} dest 11579 */blur:function blur(dest){this.$control_input[0].blur();this.onBlur(null,dest);},/** 11580 * Returns a function that scores an object 11581 * to show how good of a match it is to the 11582 * provided query. 11583 * 11584 * @param {string} query 11585 * @param {object} options 11586 * @return {function} 11587 */getScoreFunction:function getScoreFunction(query){return this.sifter.getScoreFunction(query,this.getSearchOptions());},/** 11588 * Returns search options for sifter (the system 11589 * for scoring and sorting results). 11590 * 11591 * @see https://github.com/brianreavis/sifter.js 11592 * @return {object} 11593 */getSearchOptions:function getSearchOptions(){var settings=this.settings;var sort=settings.sortField;if(typeof sort==='string'){sort=[{field:sort}];}return{fields:settings.searchField,conjunction:settings.searchConjunction,sort:sort,nesting:settings.nesting};},/** 11594 * Searches through available options and returns 11595 * a sorted array of matches. 11596 *
vendor: 34,564 bytes, lines 11597-11884
11597 * Returns an object containing: 11598 * 11599 * - query {string} 11600 * - tokens {array} 11601 * - total {int} 11602 * - items {array} 11603 * 11604 * @param {string} query 11605 * @returns {object} 11606 */search:function search(query){var i,value,score,result,calculateScore;var self=this;var settings=self.settings;var options=this.getSearchOptions();// validate user-provided result scoring function 11607if(settings.score){calculateScore=self.settings.score.apply(this,[query]);if(typeof calculateScore!=='function'){throw new Error('Selectize "score" setting must be a function that returns a function');}}// perform search 11608if(query!==self.lastQuery){self.lastQuery=query;result=self.sifter.search(query,$.extend(options,{score:calculateScore}));self.currentResults=result;}else{result=$.extend(true,{},self.currentResults);}// filter out selected items 11609if(settings.hideSelected){for(i=result.items.length-1;i>=0;i--){if(self.items.indexOf(hash_key(result.items[i].id))!==-1){result.items.splice(i,1);}}}return result;},/** 11610 * Refreshes the list of available options shown 11611 * in the autocomplete dropdown menu. 11612 * 11613 * @param {boolean} triggerDropdown 11614 */refreshOptions:function refreshOptions(triggerDropdown){var i,j,k,n,groups,groups_order,option,option_html,optgroup,optgroups,html,html_children,has_create_option;var $active,$active_before,$create;if(typeof triggerDropdown==='undefined'){triggerDropdown=true;}var self=this;var query=$.trim(self.$control_input.val());var results=self.search(query);var $dropdown_content=self.$dropdown_content;var active_before=self.$activeOption&&hash_key(self.$activeOption.attr('data-value'));// build markup 11615n=results.items.length;if(typeof self.settings.maxOptions==='number'){n=Math.min(n,self.settings.maxOptions);}// render and group available options individually 11616groups={};groups_order=[];for(i=0;i<n;i++){option=self.options[results.items[i].id];option_html=self.render('option',option);optgroup=option[self.settings.optgroupField]||'';optgroups=$.isArray(optgroup)?optgroup:[optgroup];for(j=0,k=optgroups&&optgroups.length;j<k;j++){optgroup=optgroups[j];if(!self.optgroups.hasOwnProperty(optgroup)){optgroup='';}if(!groups.hasOwnProperty(optgroup)){groups[optgroup]=document.createDocumentFragment();groups_order.push(optgroup);}groups[optgroup].appendChild(option_html);}}// sort optgroups 11617if(this.settings.lockOptgroupOrder){groups_order.sort(function(a,b){var a_order=self.optgroups[a].$order||0;var b_order=self.optgroups[b].$order||0;return a_order-b_order;});}// render optgroup headers & join groups 11618html=document.createDocumentFragment();for(i=0,n=groups_order.length;i<n;i++){optgroup=groups_order[i];if(self.optgroups.hasOwnProperty(optgroup)&&groups[optgroup].childNodes.length){// render the optgroup header and options within it, 11619// then pass it to the wrapper template 11620html_children=document.createDocumentFragment();html_children.appendChild(self.render('optgroup_header',self.optgroups[optgroup]));html_children.appendChild(groups[optgroup]);html.appendChild(self.render('optgroup',$.extend({},self.optgroups[optgroup],{html:domToString(html_children),dom:html_children})));}else{html.appendChild(groups[optgroup]);}}$dropdown_content.html(html);// highlight matching terms inline 11621if(self.settings.highlight){$dropdown_content.removeHighlight();if(results.query.length&&results.tokens.length){for(i=0,n=results.tokens.length;i<n;i++){highlight($dropdown_content,results.tokens[i].regex);}}}// add "selected" class to selected options 11622if(!self.settings.hideSelected){for(i=0,n=self.items.length;i<n;i++){self.getOption(self.items[i]).addClass('selected');}}// add create option 11623has_create_option=self.canCreate(query);if(has_create_option){$dropdown_content.prepend(self.render('option_create',{input:query}));$create=$($dropdown_content[0].childNodes[0]);}// activate 11624self.hasOptions=results.items.length>0||has_create_option;if(self.hasOptions){if(results.items.length>0){$active_before=active_before&&self.getOption(active_before);if($active_before&&$active_before.length){$active=$active_before;}else if(self.settings.mode==='single'&&self.items.length){$active=self.getOption(self.items[0]);}if(!$active||!$active.length){if($create&&!self.settings.addPrecedence){$active=self.getAdjacentOption($create,1);}else{$active=$dropdown_content.find('[data-selectable]:first');}}}else{$active=$create;}self.setActiveOption($active);if(triggerDropdown&&!self.isOpen){self.open();}}else{self.setActiveOption(null);if(triggerDropdown&&self.isOpen){self.close();}}},/** 11625 * Adds an available option. If it already exists, 11626 * nothing will happen. Note: this does not refresh 11627 * the options list dropdown (use `refreshOptions` 11628 * for that). 11629 * 11630 * Usage: 11631 * 11632 * this.addOption(data) 11633 * 11634 * @param {object|array} data 11635 */addOption:function addOption(data){var i,n,value,self=this;if($.isArray(data)){for(i=0,n=data.length;i<n;i++){self.addOption(data[i]);}return;}if(value=self.registerOption(data)){self.userOptions[value]=true;self.lastQuery=null;self.trigger('option_add',value,data);}},/** 11636 * Registers an option to the pool of options. 11637 * 11638 * @param {object} data 11639 * @return {boolean|string} 11640 */registerOption:function registerOption(data){var key=hash_key(data[this.settings.valueField]);if(typeof key==='undefined'||key===null||this.options.hasOwnProperty(key))return false;data.$order=data.$order||++this.order;this.options[key]=data;return key;},/** 11641 * Registers an option group to the pool of option groups. 11642 * 11643 * @param {object} data 11644 * @return {boolean|string} 11645 */registerOptionGroup:function registerOptionGroup(data){var key=hash_key(data[this.settings.optgroupValueField]);if(!key)return false;data.$order=data.$order||++this.order;this.optgroups[key]=data;return key;},/** 11646 * Registers a new optgroup for options 11647 * to be bucketed into. 11648 * 11649 * @param {string} id 11650 * @param {object} data 11651 */addOptionGroup:function addOptionGroup(id,data){data[this.settings.optgroupValueField]=id;if(id=this.registerOptionGroup(data)){this.trigger('optgroup_add',id,data);}},/** 11652 * Removes an existing option group. 11653 * 11654 * @param {string} id 11655 */removeOptionGroup:function removeOptionGroup(id){if(this.optgroups.hasOwnProperty(id)){delete this.optgroups[id];this.renderCache={};this.trigger('optgroup_remove',id);}},/** 11656 * Clears all existing option groups. 11657 */clearOptionGroups:function clearOptionGroups(){this.optgroups={};this.renderCache={};this.trigger('optgroup_clear');},/** 11658 * Updates an option available for selection. If 11659 * it is visible in the selected items or options 11660 * dropdown, it will be re-rendered automatically. 11661 * 11662 * @param {string} value 11663 * @param {object} data 11664 */updateOption:function updateOption(value,data){var self=this;var $item,$item_new;var value_new,index_item,cache_items,cache_options,order_old;value=hash_key(value);value_new=hash_key(data[self.settings.valueField]);// sanity checks 11665if(value===null)return;if(!self.options.hasOwnProperty(value))return;if(typeof value_new!=='string')throw new Error('Value must be set in option data');order_old=self.options[value].$order;// update references 11666if(value_new!==value){delete self.options[value];index_item=self.items.indexOf(value);if(index_item!==-1){self.items.splice(index_item,1,value_new);}}data.$order=data.$order||order_old;self.options[value_new]=data;// invalidate render cache 11667cache_items=self.renderCache['item'];cache_options=self.renderCache['option'];if(cache_items){delete cache_items[value];delete cache_items[value_new];}if(cache_options){delete cache_options[value];delete cache_options[value_new];}// update the item if it's selected 11668if(self.items.indexOf(value_new)!==-1){$item=self.getItem(value);$item_new=$(self.render('item',data));if($item.hasClass('active'))$item_new.addClass('active');$item.replaceWith($item_new);}// invalidate last query because we might have updated the sortField 11669self.lastQuery=null;// update dropdown contents 11670if(self.isOpen){self.refreshOptions(false);}},/** 11671 * Removes a single option. 11672 * 11673 * @param {string} value 11674 * @param {boolean} silent 11675 */removeOption:function removeOption(value,silent){var self=this;value=hash_key(value);var cache_items=self.renderCache['item'];var cache_options=self.renderCache['option'];if(cache_items)delete cache_items[value];if(cache_options)delete cache_options[value];delete self.userOptions[value];delete self.options[value];self.lastQuery=null;self.trigger('option_remove',value);self.removeItem(value,silent);},/** 11676 * Clears all options. 11677 */clearOptions:function clearOptions(){var self=this;self.loadedSearches={};self.userOptions={};self.renderCache={};var options=self.options;$.each(self.options,function(key,value){if(self.items.indexOf(key)==-1){delete options[key];}});self.options=self.sifter.items=options;self.lastQuery=null;self.trigger('option_clear');},/** 11678 * Returns the jQuery element of the option 11679 * matching the given value. 11680 * 11681 * @param {string} value 11682 * @returns {object} 11683 */getOption:function getOption(value){return this.getElementWithValue(value,this.$dropdown_content.find('[data-selectable]'));},/** 11684 * Returns the jQuery element of the next or 11685 * previous selectable option. 11686 * 11687 * @param {object} $option 11688 * @param {int} direction can be 1 for next or -1 for previous 11689 * @return {object} 11690 */getAdjacentOption:function getAdjacentOption($option,direction){var $options=this.$dropdown.find('[data-selectable]');var index=$options.index($option)+direction;return index>=0&&index<$options.length?$options.eq(index):$();},/** 11691 * Finds the first element with a "data-value" attribute 11692 * that matches the given value. 11693 * 11694 * @param {mixed} value 11695 * @param {object} $els 11696 * @return {object} 11697 */getElementWithValue:function getElementWithValue(value,$els){value=hash_key(value);if(typeof value!=='undefined'&&value!==null){for(var i=0,n=$els.length;i<n;i++){if($els[i].getAttribute('data-value')===value){return $($els[i]);}}}return $();},/** 11698 * Returns the jQuery element of the item 11699 * matching the given value. 11700 * 11701 * @param {string} value 11702 * @returns {object} 11703 */getItem:function getItem(value){return this.getElementWithValue(value,this.$control.children());},/** 11704 * "Selects" multiple items at once. Adds them to the list 11705 * at the current caret position. 11706 * 11707 * @param {string} value 11708 * @param {boolean} silent 11709 */addItems:function addItems(values,silent){this.buffer=document.createDocumentFragment();var childNodes=this.$control[0].childNodes;for(var i=0;i<childNodes.length;i++){this.buffer.appendChild(childNodes[i]);}var items=$.isArray(values)?values:[values];for(var i=0,n=items.length;i<n;i++){this.isPending=i<n-1;this.addItem(items[i],silent);}var control=this.$control[0];control.insertBefore(this.buffer,control.firstChild);this.buffer=null;},/** 11710 * "Selects" an item. Adds it to the list 11711 * at the current caret position. 11712 * 11713 * @param {string} value 11714 * @param {boolean} silent 11715 */addItem:function addItem(value,silent){var events=silent?[]:['change'];debounce_events(this,events,function(){var $item,$option,$options;var self=this;var inputMode=self.settings.mode;var i,active,value_next,wasFull;value=hash_key(value);if(self.items.indexOf(value)!==-1){if(inputMode==='single')self.close();return;}if(!self.options.hasOwnProperty(value))return;if(inputMode==='single')self.clear(silent);if(inputMode==='multi'&&self.isFull())return;$item=$(self.render('item',self.options[value]));wasFull=self.isFull();self.items.splice(self.caretPos,0,value);self.insertAtCaret($item);if(!self.isPending||!wasFull&&self.isFull()){self.refreshState();}if(self.isSetup){$options=self.$dropdown_content.find('[data-selectable]');// update menu / remove the option (if this is not one item being added as part of series) 11716if(!self.isPending){$option=self.getOption(value);value_next=self.getAdjacentOption($option,1).attr('data-value');self.refreshOptions(self.isFocused&&inputMode!=='single');if(value_next){self.setActiveOption(self.getOption(value_next));}}// hide the menu if the maximum number of items have been selected or no options are left 11717if(!$options.length||self.isFull()){self.close();}else if(!self.isPending){self.positionDropdown();}self.updatePlaceholder();self.trigger('item_add',value,$item);if(!self.isPending){self.updateOriginalInput({silent:silent});}}});},/** 11718 * Removes the selected item matching 11719 * the provided value. 11720 * 11721 * @param {string} value 11722 */removeItem:function removeItem(value,silent){var self=this;var $item,i,idx;$item=value instanceof $?value:self.getItem(value);value=hash_key($item.attr('data-value'));i=self.items.indexOf(value);if(i!==-1){$item.remove();if($item.hasClass('active')){idx=self.$activeItems.indexOf($item[0]);self.$activeItems.splice(idx,1);}self.items.splice(i,1);self.lastQuery=null;if(!self.settings.persist&&self.userOptions.hasOwnProperty(value)){self.removeOption(value,silent);}if(i<self.caretPos){self.setCaret(self.caretPos-1);}self.refreshState();self.updatePlaceholder();self.updateOriginalInput({silent:silent});self.positionDropdown();self.trigger('item_remove',value,$item);}},/** 11723 * Invokes the `create` method provided in the 11724 * selectize options that should provide the data 11725 * for the new item, given the user input. 11726 * 11727 * Once this completes, it will be added 11728 * to the item list. 11729 * 11730 * @param {string} value 11731 * @param {boolean} [triggerDropdown] 11732 * @param {function} [callback] 11733 * @return {boolean} 11734 */createItem:function createItem(input,triggerDropdown){var self=this;var caret=self.caretPos;input=input||$.trim(self.$control_input.val()||'');var callback=arguments[arguments.length-1];if(typeof callback!=='function')callback=function callback(){};if(typeof triggerDropdown!=='boolean'){triggerDropdown=true;}if(!self.canCreate(input)){callback();return false;}self.lock();var setup=typeof self.settings.create==='function'?this.settings.create:function(input){var data={};data[self.settings.labelField]=input;data[self.settings.valueField]=input;return data;};var create=once(function(data){self.unlock();if(!data||_typeof(data)!=='object')return callback();var value=hash_key(data[self.settings.valueField]);if(typeof value!=='string')return callback();self.setTextboxValue('');self.addOption(data);self.setCaret(caret);self.addItem(value);self.refreshOptions(triggerDropdown&&self.settings.mode!=='single');callback(data);});var output=setup.apply(this,[input,create]);if(typeof output!=='undefined'){create(output);}return true;},/** 11735 * Re-renders the selected item lists. 11736 */refreshItems:function refreshItems(){this.lastQuery=null;if(this.isSetup){this.addItem(this.items);}this.refreshState();this.updateOriginalInput();},/** 11737 * Updates all state-dependent attributes 11738 * and CSS classes. 11739 */refreshState:function refreshState(){this.refreshValidityState();this.refreshClasses();},/** 11740 * Update the `required` attribute of both input and control input. 11741 * 11742 * The `required` property needs to be activated on the control input 11743 * for the error to be displayed at the right place. `required` also 11744 * needs to be temporarily deactivated on the input since the input is 11745 * hidden and can't show errors. 11746 */refreshValidityState:function refreshValidityState(){if(!this.isRequired)return false;var invalid=!this.items.length;this.isInvalid=invalid;this.$control_input.prop('required',invalid);this.$input.prop('required',!invalid);},/** 11747 * Updates all state-dependent CSS classes. 11748 */refreshClasses:function refreshClasses(){var self=this;var isFull=self.isFull();var isLocked=self.isLocked;self.$wrapper.toggleClass('rtl',self.rtl);self.$control.toggleClass('focus',self.isFocused).toggleClass('disabled',self.isDisabled).toggleClass('required',self.isRequired).toggleClass('invalid',self.isInvalid).toggleClass('locked',isLocked).toggleClass('full',isFull).toggleClass('not-full',!isFull).toggleClass('input-active',self.isFocused&&!self.isInputHidden).toggleClass('dropdown-active',self.isOpen).toggleClass('has-options',!$.isEmptyObject(self.options)).toggleClass('has-items',self.items.length>0);self.$control_input.data('grow',!isFull&&!isLocked);},/** 11749 * Determines whether or not more items can be added 11750 * to the control without exceeding the user-defined maximum. 11751 * 11752 * @returns {boolean} 11753 */isFull:function isFull(){return this.settings.maxItems!==null&&this.items.length>=this.settings.maxItems;},/** 11754 * Refreshes the original <select> or <input> 11755 * element to reflect the current state. 11756 */updateOriginalInput:function updateOriginalInput(opts){var i,n,options,label,self=this;opts=opts||{};if(self.tagType===TAG_SELECT){options=[];for(i=0,n=self.items.length;i<n;i++){label=self.options[self.items[i]][self.settings.labelField]||'';options.push('<option value="'+escape_html(self.items[i])+'" selected="selected">'+escape_html(label)+'</option>');}if(!options.length&&!this.$input.attr('multiple')){options.push('<option value="" selected="selected"></option>');}self.$input.html(options.join(''));}else{self.$input.val(self.getValue());self.$input.attr('value',self.$input.val());}if(self.isSetup){if(!opts.silent){self.trigger('change',self.$input.val());}}},/** 11757 * Shows/hide the input placeholder depending 11758 * on if there items in the list already. 11759 */updatePlaceholder:function updatePlaceholder(){if(!this.settings.placeholder)return;var $input=this.$control_input;if(this.items.length){$input.removeAttr('placeholder');}else{$input.attr('placeholder',this.settings.placeholder);}$input.triggerHandler('update',{force:true});},/** 11760 * Shows the autocomplete dropdown containing 11761 * the available options. 11762 */open:function open(){var self=this;if(self.isLocked||self.isOpen||self.settings.mode==='multi'&&self.isFull())return;self.focus();self.isOpen=true;self.refreshState();self.$dropdown.css({visibility:'hidden',display:'block'});self.positionDropdown();self.$dropdown.css({visibility:'visible'});self.trigger('dropdown_open',self.$dropdown);},/** 11763 * Closes the autocomplete dropdown menu. 11764 */close:function close(){var self=this;var trigger=self.isOpen;if(self.settings.mode==='single'&&self.items.length){self.hideInput();// Do not trigger blur while inside a blur event, 11765// this fixes some weird tabbing behavior in FF and IE. 11766// See #1164 11767if(!self.isBlurring){self.$control_input.blur();// close keyboard on iOS 11768}}self.isOpen=false;self.$dropdown.hide();self.setActiveOption(null);self.refreshState();if(trigger)self.trigger('dropdown_close',self.$dropdown);},/** 11769 * Calculates and applies the appropriate 11770 * position of the dropdown. 11771 */positionDropdown:function positionDropdown(){var $control=this.$control;var offset=this.settings.dropdownParent==='body'?$control.offset():$control.position();offset.top+=$control.outerHeight(true);this.$dropdown.css({width:$control[0].getBoundingClientRect().width,top:offset.top,left:offset.left});},/** 11772 * Resets / clears all selected items 11773 * from the control. 11774 * 11775 * @param {boolean} silent 11776 */clear:function clear(silent){var self=this;if(!self.items.length)return;self.$control.children(':not(input)').remove();self.items=[];self.lastQuery=null;self.setCaret(0);self.setActiveItem(null);self.updatePlaceholder();self.updateOriginalInput({silent:silent});self.refreshState();self.showInput();self.trigger('clear');},/** 11777 * A helper method for inserting an element 11778 * at the current caret position. 11779 * 11780 * @param {object} $el 11781 */insertAtCaret:function insertAtCaret($el){var caret=Math.min(this.caretPos,this.items.length);var el=$el[0];var target=this.buffer||this.$control[0];if(caret===0){target.insertBefore(el,target.firstChild);}else{target.insertBefore(el,target.childNodes[caret]);}this.setCaret(caret+1);},/** 11782 * Removes the current selected item(s). 11783 * 11784 * @param {object} e (optional) 11785 * @returns {boolean} 11786 */deleteSelection:function deleteSelection(e){var i,n,direction,selection,values,caret,option_select,$option_select,$tail;var self=this;direction=e&&e.keyCode===KEY_BACKSPACE?-1:1;selection=getSelection(self.$control_input[0]);if(self.$activeOption&&!self.settings.hideSelected){option_select=self.getAdjacentOption(self.$activeOption,-1).attr('data-value');}// determine items that will be removed 11787values=[];if(self.$activeItems.length){$tail=self.$control.children('.active:'+(direction>0?'last':'first'));caret=self.$control.children(':not(input)').index($tail);if(direction>0){caret++;}for(i=0,n=self.$activeItems.length;i<n;i++){values.push($(self.$activeItems[i]).attr('data-value'));}if(e){e.preventDefault();e.stopPropagation();}}else if((self.isFocused||self.settings.mode==='single')&&self.items.length){if(direction<0&&selection.start===0&&selection.length===0){values.push(self.items[self.caretPos-1]);}else if(direction>0&&selection.start===self.$control_input.val().length){values.push(self.items[self.caretPos]);}}// allow the callback to abort 11788if(!values.length||typeof self.settings.onDelete==='function'&&self.settings.onDelete.apply(self,[values])===false){return false;}// perform removal 11789if(typeof caret!=='undefined'){self.setCaret(caret);}while(values.length){self.removeItem(values.pop());}self.showInput();self.positionDropdown();self.refreshOptions(true);// select previous option 11790if(option_select){$option_select=self.getOption(option_select);if($option_select.length){self.setActiveOption($option_select);}}return true;},/** 11791 * Selects the previous / next item (depending 11792 * on the `direction` argument). 11793 * 11794 * > 0 - right 11795 * < 0 - left 11796 * 11797 * @param {int} direction 11798 * @param {object} e (optional) 11799 */advanceSelection:function advanceSelection(direction,e){var tail,selection,idx,valueLength,cursorAtEdge,$tail;var self=this;if(direction===0)return;if(self.rtl)direction*=-1;tail=direction>0?'last':'first';selection=getSelection(self.$control_input[0]);if(self.isFocused&&!self.isInputHidden){valueLength=self.$control_input.val().length;cursorAtEdge=direction<0?selection.start===0&&selection.length===0:selection.start===valueLength;if(cursorAtEdge&&!valueLength){self.advanceCaret(direction,e);}}else{$tail=self.$control.children('.active:'+tail);if($tail.length){idx=self.$control.children(':not(input)').index($tail);self.setActiveItem(null);self.setCaret(direction>0?idx+1:idx);}}},/** 11800 * Moves the caret left / right. 11801 * 11802 * @param {int} direction 11803 * @param {object} e (optional) 11804 */advanceCaret:function advanceCaret(direction,e){var self=this,fn,$adj;if(direction===0)return;fn=direction>0?'next':'prev';if(self.isShiftDown){$adj=self.$control_input[fn]();if($adj.length){self.hideInput();self.setActiveItem($adj);e&&e.preventDefault();}}else{self.setCaret(self.caretPos+direction);}},/** 11805 * Moves the caret to the specified index. 11806 * 11807 * @param {int} i 11808 */setCaret:function setCaret(i){var self=this;if(self.settings.mode==='single'){i=self.items.length;}else{i=Math.max(0,Math.min(self.items.length,i));}if(!self.isPending){// the input must be moved by leaving it in place and moving the 11809// siblings, due to the fact that focus cannot be restored once lost 11810// on mobile webkit devices 11811var j,n,fn,$children,$child;$children=self.$control.children(':not(input)');for(j=0,n=$children.length;j<n;j++){$child=$($children[j]).detach();if(j<i){self.$control_input.before($child);}else{self.$control.append($child);}}}self.caretPos=i;},/** 11812 * Disables user input on the control. Used while 11813 * items are being asynchronously created. 11814 */lock:function lock(){this.close();this.isLocked=true;this.refreshState();},/** 11815 * Re-enables user input on the control. 11816 */unlock:function unlock(){this.isLocked=false;this.refreshState();},/** 11817 * Disables user input on the control completely. 11818 * While disabled, it cannot receive focus. 11819 */disable:function disable(){var self=this;self.$input.prop('disabled',true);self.$control_input.prop('disabled',true).prop('tabindex',-1);self.isDisabled=true;self.lock();},/** 11820 * Enables the control so that it can respond 11821 * to focus and user input. 11822 */enable:function enable(){var self=this;self.$input.prop('disabled',false);self.$control_input.prop('disabled',false).prop('tabindex',self.tabIndex);self.isDisabled=false;self.unlock();},/** 11823 * Completely destroys the control and 11824 * unbinds all event listeners so that it can 11825 * be garbage collected. 11826 */destroy:function destroy(){var self=this;var eventNS=self.eventNS;var revertSettings=self.revertSettings;self.trigger('destroy');self.off();self.$wrapper.remove();self.$dropdown.remove();self.$input.html('').append(revertSettings.$children).removeAttr('tabindex').removeClass('selectized').attr({tabindex:revertSettings.tabindex}).show();self.$control_input.removeData('grow');self.$input.removeData('selectize');if(--Selectize.count==0&&Selectize.$testInput){Selectize.$testInput.remove();Selectize.$testInput=undefined;}$(window).off(eventNS);$(document).off(eventNS);$(document.body).off(eventNS);delete self.$input[0].selectize;},/** 11827 * A helper method for rendering "item" and 11828 * "option" templates, given the data. 11829 * 11830 * @param {string} templateName 11831 * @param {object} data 11832 * @returns {string} 11833 */render:function render(templateName,data){var value,id,label;var html='';var cache=false;var self=this;var regex_tag=/^[\t \r\n]*<([a-z][a-z0-9\-_]*(?:\:[a-z][a-z0-9\-_]*)?)/i;if(templateName==='option'||templateName==='item'){value=hash_key(data[self.settings.valueField]);cache=!!value;}// pull markup from cache if it exists 11834if(cache){if(!isset(self.renderCache[templateName])){self.renderCache[templateName]={};}if(self.renderCache[templateName].hasOwnProperty(value)){return self.renderCache[templateName][value];}}// render markup 11835html=$(self.settings.render[templateName].apply(this,[data,escape_html]));// add mandatory attributes 11836if(templateName==='option'||templateName==='option_create'){if(!data[self.settings.disabledField]){html.attr('data-selectable','');}}else if(templateName==='optgroup'){id=data[self.settings.optgroupValueField]||'';html.attr('data-group',id);if(data[self.settings.disabledField]){html.attr('data-disabled','');}}if(templateName==='option'||templateName==='item'){html.attr('data-value',value||'');}// update cache 11837if(cache){self.renderCache[templateName][value]=html[0];}return html[0];},/** 11838 * Clears the render cache for a template. If 11839 * no template is given, clears all render 11840 * caches. 11841 * 11842 * @param {string} templateName 11843 */clearCache:function clearCache(templateName){var self=this;if(typeof templateName==='undefined'){self.renderCache={};}else{delete self.renderCache[templateName];}},/** 11844 * Determines whether or not to display the 11845 * create item prompt, given a user input. 11846 * 11847 * @param {string} input 11848 * @return {boolean} 11849 */canCreate:function canCreate(input){var self=this;if(!self.settings.create)return false;var filter=self.settings.createFilter;return input.length&&(typeof filter!=='function'||filter.apply(self,[input]))&&(typeof filter!=='string'||new RegExp(filter).test(input))&&(!(filter instanceof RegExp)||filter.test(input));}});Selectize.count=0;Selectize.defaults={options:[],optgroups:[],plugins:[],delimiter:',',splitOn:null,// regexp or string for splitting up values from a paste command 11850persist:true,diacritics:true,create:false,createOnBlur:false,createFilter:null,highlight:true,openOnFocus:true,maxOptions:1000,maxItems:null,hideSelected:null,addPrecedence:false,selectOnTab:false,preload:false,allowEmptyOption:false,closeAfterSelect:false,scrollDuration:60,loadThrottle:300,loadingClass:'loading',dataAttr:'data-data',optgroupField:'optgroup',valueField:'value',labelField:'text',disabledField:'disabled',optgroupLabelField:'label',optgroupValueField:'value',lockOptgroupOrder:false,sortField:'$order',searchField:['text'],searchConjunction:'and',mode:null,wrapperClass:'selectize-control',inputClass:'selectize-input',dropdownClass:'selectize-dropdown',dropdownContentClass:'selectize-dropdown-content',dropdownParent:null,copyClassesToDropdown:true,/* 11851 load : null, // function(query, callback) { ... } 11852 score : null, // function(search) { ... } 11853 onInitialize : null, // function() { ... } 11854 onChange : null, // function(value) { ... } 11855 onItemAdd : null, // function(value, $item) { ... } 11856 onItemRemove : null, // function(value) { ... } 11857 onClear : null, // function() { ... } 11858 onOptionAdd : null, // function(value, data) { ... } 11859 onOptionRemove : null, // function(value) { ... } 11860 onOptionClear : null, // function() { ... } 11861 onOptionGroupAdd : null, // function(id, data) { ... } 11862 onOptionGroupRemove : null, // function(id) { ... } 11863 onOptionGroupClear : null, // function() { ... } 11864 onDropdownOpen : null, // function($dropdown) { ... } 11865 onDropdownClose : null, // function($dropdown) { ... } 11866 onType : null, // function(str) { ... } 11867 onDelete : null, // function(values) { ... } 11868 */render:{/* 11869 item: null, 11870 optgroup: null, 11871 optgroup_header: null, 11872 option: null, 11873 option_create: null 11874 */}};$.fn.selectize=function(settings_user){var defaults=$.fn.selectize.defaults;var settings=$.extend({},defaults,settings_user);var attr_data=settings.dataAttr;var field_label=settings.labelField;var field_value=settings.valueField;var field_disabled=settings.disabledField;var field_optgroup=settings.optgroupField;var field_optgroup_label=settings.optgroupLabelField;var field_optgroup_value=settings.optgroupValueField;/** 11875 * Initializes selectize from a <input type="text"> element. 11876 * 11877 * @param {object} $input 11878 * @param {object} settings_element 11879 */var init_textbox=function init_textbox($input,settings_element){var i,n,values,option;var data_raw=$input.attr(attr_data);if(!data_raw){var value=$.trim($input.val()||'');if(!settings.allowEmptyOption&&!value.length)return;values=value.split(settings.delimiter);for(i=0,n=values.length;i<n;i++){option={};option[field_label]=values[i];option[field_value]=values[i];settings_element.options.push(option);}settings_element.items=values;}else{settings_element.options=JSON.parse(data_raw);for(i=0,n=settings_element.options.length;i<n;i++){settings_element.items.push(settings_element.options[i][field_value]);}}};/** 11880 * Initializes selectize from a <select> element. 11881 * 11882 * @param {object} $input 11883 * @param {object} settings_element 11884 */var init_select=function init_select($input,settings_element){var i,n,tagName,$children,order=0;var options=settings_element.options;var optionsMap={};var readData=function readData($el){var data=attr_data&&$el.attr(attr_data);if(typeof data==='string'&&data.length){return JSON.parse(data);}return null;};
11884var addOption=function addOption($option,group){$option=$($option);var value=hash_key($option.val());if(!value&&!settings.allowEmptyOption)return;// if the option already exists, it's probably been 11885// duplicated in another optgroup. in this case, push 11886// the current group to the "optgroup" property on the 11887// existing option so that it's rendered in both places. 11888if(optionsMap.hasOwnProperty(value)){if(group){var arr=optionsMap[value][field_optgroup];if(!arr){optionsMap[value][field_optgroup]=group;}else if(!$.isArray(arr)){optionsMap[value][field_optgroup]=[arr,group];}else{arr.push(group);}}return;}var option=readData($option)||{};option[field_label]=option[field_label]||$option.text();option[field_value]=option[field_value]||value;option[field_disabled]=option[field_disabled]||$option.prop('disabled');option[field_optgroup]=option[field_optgroup]||group;optionsMap[value]=option;options.push(option);if($option.is(':selected')){settings_element.items.push(value);}};var addGroup=function addGroup($optgroup){var i,n,id,optgroup,$options;$optgroup=$($optgroup);id=$optgroup.attr('label');if(id){optgroup=readData($optgroup)||{};optgroup[field_optgroup_label]=id;optgroup[field_optgroup_value]=id;optgroup[field_disabled]=$optgroup.prop('disabled');settings_element.optgroups.push(optgroup);}$options=$('option',$optgroup);for(i=0,n=$options.length;i<n;i++){addOption($options[i],id);}};settings_element.maxItems=$input.attr('multiple')?null:1;$children=$input.children();for(i=0,n=$children.length;i<n;i++){tagName=$children[i].tagName.toLowerCase();if(tagName==='optgroup'){addGroup($children[i]);}else if(tagName==='option'){addOption($children[i]);}}};return this.each(function(){if(this.selectize)return;var instance;var $input=$(this);var tag_name=this.tagName.toLowerCase();var placeholder=$input.attr('placeholder')||$input.attr('data-placeholder');if(!placeholder&&!settings.allowEmptyOption){placeholder=$input.children('option[value=""]').text();}var settings_element={'placeholder':placeholder,'options':[],'optgroups':[],'items':[]};if(tag_name==='select'){init_select($input,settings_element);}else{init_textbox($input,settings_element);}instance=new Selectize($input,$.extend(true,{},defaults,settings_element,settings_user));});};$.fn.selectize.defaults=Selectize.defaults;$.fn.selectize.support={validity:SUPPORTS_VALIDITY_API};Selectize.define('drag_drop',function(options){if(!$.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');if(this.settings.mode!=='multi')return;var self=this;self.lock=function(){var original=self.lock;return function(){var sortable=self.$control.data('sortable');if(sortable)sortable.disable();return original.apply(self,arguments);};}();self.unlock=function(){var original=self.unlock;return function(){var sortable=self.$control.data('sortable');if(sortable)sortable.enable();return original.apply(self,arguments);};}();self.setup=function(){var original=self.setup;return function(){original.apply(this,arguments);var $control=self.$control.sortable({items:'[data-value]',forcePlaceholderSize:true,disabled:self.isLocked,start:function start(e,ui){ui.placeholder.css('width',ui.helper.css('width'));$control.css({overflow:'visible'});},stop:function stop(){$control.css({overflow:'hidden'});var active=self.$activeItems?self.$activeItems.slice():null;var values=[];$control.children('[data-value]').each(function(){values.push($(this).attr('data-value'));});self.setValue(values);self.setActiveItem(active);}});};}();});Selectize.define('dropdown_header',function(options){var self=this;options=$.extend({title:'Untitled',headerClass:'selectize-dropdown-header',titleRowClass:'selectize-dropdown-header-title',labelClass:'selectize-dropdown-header-label',closeClass:'selectize-dropdown-header-close',html:function html(data){return'<div class="'+data.headerClass+'">'+'<div class="'+data.titleRowClass+'">'+'<span class="'+data.labelClass+'">'+data.title+'</span>'+'<a href="javascript:void(0)" class="'+data.closeClass+'">×</a>'+'</div>'+'</div>';}},options);self.setup=function(){var original=self.setup;return function(){original.apply(self,arguments);self.$dropdown_header=$(options.html(options));self.$dropdown.prepend(self.$dropdown_header);};}();});Selectize.define('optgroup_columns',function(options){var self=this;
vendor: 7,715 bytes, lines 11888-11932
11888options=$.extend({equalizeWidth:true,equalizeHeight:true},options);this.getAdjacentOption=function($option,direction){var $options=$option.closest('[data-group]').find('[data-selectable]');var index=$options.index($option)+direction;return index>=0&&index<$options.length?$options.eq(index):$();};this.onKeyDown=function(){var original=self.onKeyDown;return function(e){var index,$option,$options,$optgroup;if(this.isOpen&&(e.keyCode===KEY_LEFT||e.keyCode===KEY_RIGHT)){self.ignoreHover=true;$optgroup=this.$activeOption.closest('[data-group]');index=$optgroup.find('[data-selectable]').index(this.$activeOption);if(e.keyCode===KEY_LEFT){$optgroup=$optgroup.prev('[data-group]');}else{$optgroup=$optgroup.next('[data-group]');}$options=$optgroup.find('[data-selectable]');$option=$options.eq(Math.min($options.length-1,index));if($option.length){this.setActiveOption($option);}return;}return original.apply(this,arguments);};}();var getScrollbarWidth=function getScrollbarWidth(){var div;var width=getScrollbarWidth.width;var doc=document;if(typeof width==='undefined'){div=doc.createElement('div');div.innerHTML='<div style="width:50px;height:50px;position:absolute;left:-50px;top:-50px;overflow:auto;"><div style="width:1px;height:100px;"></div></div>';div=div.firstChild;doc.body.appendChild(div);width=getScrollbarWidth.width=div.offsetWidth-div.clientWidth;doc.body.removeChild(div);}return width;};var equalizeSizes=function equalizeSizes(){var i,n,height_max,width,width_last,width_parent,$optgroups;$optgroups=$('[data-group]',self.$dropdown_content);n=$optgroups.length;if(!n||!self.$dropdown_content.width())return;if(options.equalizeHeight){height_max=0;for(i=0;i<n;i++){height_max=Math.max(height_max,$optgroups.eq(i).height());}$optgroups.css({height:height_max});}if(options.equalizeWidth){width_parent=self.$dropdown_content.innerWidth()-getScrollbarWidth();width=Math.round(width_parent/n);$optgroups.css({width:width});if(n>1){width_last=width_parent-width*(n-1);$optgroups.eq(n-1).css({width:width_last});}}};if(options.equalizeHeight||options.equalizeWidth){hook.after(this,'positionDropdown',equalizeSizes);hook.after(this,'refreshOptions',equalizeSizes);}});Selectize.define('remove_button',function(options){options=$.extend({label:'×',title:'Remove',className:'remove',append:true},options);var singleClose=function singleClose(thisRef,options){options.className='remove-single';var self=thisRef;var html='<a href="javascript:void(0)" class="'+options.className+'" tabindex="-1" title="'+escape_html(options.title)+'">'+options.label+'</a>';/** 11889 * Appends an element as a child (with raw HTML). 11890 * 11891 * @param {string} html_container 11892 * @param {string} html_element 11893 * @return {string} 11894 */var append=function append(html_container,html_element){return $('<span>').append(html_container).append(html_element);};thisRef.setup=function(){var original=self.setup;return function(){// override the item rendering method to add the button to each 11895if(options.append){var id=$(self.$input.context).attr('id');var selectizer=$('#'+id);var render_item=self.settings.render.item;self.settings.render.item=function(data){return append(render_item.apply(thisRef,arguments),html);};}original.apply(thisRef,arguments);// add event listener 11896thisRef.$control.on('click','.'+options.className,function(e){e.preventDefault();if(self.isLocked)return;self.clear();});};}();};var multiClose=function multiClose(thisRef,options){var self=thisRef;var html='<a href="javascript:void(0)" class="'+options.className+'" tabindex="-1" title="'+escape_html(options.title)+'">'+options.label+'</a>';/** 11897 * Appends an element as a child (with raw HTML). 11898 * 11899 * @param {string} html_container 11900 * @param {string} html_element 11901 * @return {string} 11902 */var append=function append(html_container,html_element){var pos=html_container.search(/(<\/[^>]+>\s*)$/);return html_container.substring(0,pos)+html_element+html_container.substring(pos);};thisRef.setup=function(){var original=self.setup;return function(){// override the item rendering method to add the button to each 11903if(options.append){var render_item=self.settings.render.item;self.settings.render.item=function(data){return append(render_item.apply(thisRef,arguments),html);};}original.apply(thisRef,arguments);// add event listener 11904thisRef.$control.on('click','.'+options.className,function(e){e.preventDefault();if(self.isLocked)return;var $item=$(e.currentTarget).parent();self.setActiveItem($item);if(self.deleteSelection()){self.setCaret(self.items.length);}});};}();};if(this.settings.mode==='single'){singleClose(this,options);return;}else{multiClose(this,options);}});Selectize.define('restore_on_backspace',function(options){var self=this;options.text=options.text||function(option){return option[this.settings.labelField];};this.onKeyDown=function(){var original=self.onKeyDown;return function(e){var index,option;if(e.keyCode===KEY_BACKSPACE&&this.$control_input.val()===''&&!this.$activeItems.length){index=this.caretPos-1;if(index>=0&&index<this.items.length){option=this.options[this.items[index]];if(this.deleteSelection(e)){this.setTextboxValue(options.text.apply(this,[option]));this.refreshOptions(true);}e.preventDefault();return;}}return original.apply(this,arguments);};}();});return Selectize;});/***/},/* 2 */ /***/function(module,exports,__webpack_require__){/* WEBPACK VAR INJECTION */(function(global){module.exports=global["$"]=__webpack_require__(4);/* WEBPACK VAR INJECTION */}).call(exports,__webpack_require__(3));/***/},/* 3 */ /***/function(module,exports){var g;// This works in non-strict mode 11905g=function(){return this;}();try{// This works if eval is allowed (see CSP) 11906g=g||Function("return this")()||(1,eval)("this");}catch(e){// This works if the window reference is available 11907if((typeof window==="undefined"?"undefined":_typeof(window))==="object")g=window;}// g can still be undefined, but nothing to do about it... 11908// We return undefined, instead of nothing here, so it's 11909// easier to handle this case. if(!global) { ...} 11910module.exports=g;/***/},/* 4 */ /***/function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;/*! 11911 * jQuery JavaScript Library v3.3.1 11912 * https://jquery.com/ 11913 * 11914 * Includes Sizzle.js 11915 * https://sizzlejs.com/ 11916 * 11917 * Copyright JS Foundation and other contributors 11918 * Released under the MIT license 11919 * https://jquery.org/license 11920 * 11921 * Date: 2018-01-20T17:24Z 11922 */(function(global,factory){"use strict";if(_typeof(module)==="object"&&_typeof(module.exports)==="object"){// For CommonJS and CommonJS-like environments where a proper `window` 11923// is present, execute the factory and get jQuery. 11924// For environments that do not have a `window` with a `document` 11925// (such as Node.js), expose a factory as module.exports. 11926// This accentuates the need for the creation of a real `window`. 11927// e.g. var jQuery = require("jquery")(window); 11928// See ticket #14549 for more info. 11929module.exports=global.document?factory(global,true):function(w){if(!w.document){throw new Error("jQuery requires a window with a document");}return factory(w);};}else{factory(global);}// Pass this if window is not defined yet 11930})(typeof window!=="undefined"?window:this,function(window,noGlobal){// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 11931// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode 11932// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), str
vendor: 4,678 bytes, lines 11932-11970
11932ict mode should be common 11933// enough that all such attempts are guarded in a try block. 11934"use strict";var arr=[];var document=window.document;var getProto=Object.getPrototypeOf;var _slice=arr.slice;var concat=arr.concat;var push=arr.push;var indexOf=arr.indexOf;var class2type={};var toString=class2type.toString;var hasOwn=class2type.hasOwnProperty;var fnToString=hasOwn.toString;var ObjectFunctionString=fnToString.call(Object);var support={};var isFunction=function isFunction(obj){// Support: Chrome <=57, Firefox <=52 11935// In some browsers, typeof returns "function" for HTML <object> elements 11936// (i.e., `typeof document.createElement( "object" ) === "function"`). 11937// We don't want to classify *any* DOM node as a function. 11938return typeof obj==="function"&&typeof obj.nodeType!=="number";};var isWindow=function isWindow(obj){return obj!=null&&obj===obj.window;};var preservedScriptAttributes={type:true,src:true,noModule:true};function DOMEval(code,doc,node){doc=doc||document;var i,script=doc.createElement("script");script.text=code;if(node){for(i in preservedScriptAttributes){if(node[i]){script[i]=node[i];}}}doc.head.appendChild(script).parentNode.removeChild(script);}function toType(obj){if(obj==null){return obj+"";}// Support: Android <=2.3 only (functionish RegExp) 11939return _typeof(obj)==="object"||typeof obj==="function"?class2type[toString.call(obj)]||"object":_typeof(obj);}/* global Symbol */ // Defining this global in .eslintrc.json would create a danger of using the global 11940// unguarded in another place, it seems safer to define global only for this module 11941var version="3.3.1",// Define a local copy of jQuery 11942jQuery=function jQuery(selector,context){// The jQuery object is actually just the init constructor 'enhanced' 11943// Need init if jQuery is called (just allow error to be thrown if not included) 11944return new jQuery.fn.init(selector,context);},// Support: Android <=4.0 only 11945// Make sure we trim BOM and NBSP 11946rtrim=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;jQuery.fn=jQuery.prototype={// The current version of jQuery being used 11947jquery:version,constructor:jQuery,// The default length of a jQuery object is 0 11948length:0,toArray:function toArray(){return _slice.call(this);},// Get the Nth element in the matched element set OR 11949// Get the whole matched element set as a clean array 11950get:function get(num){// Return all the elements in a clean array 11951if(num==null){return _slice.call(this);}// Return just the one element from the set 11952return num<0?this[num+this.length]:this[num];},// Take an array of elements and push it onto the stack 11953// (returning the new matched element set) 11954pushStack:function pushStack(elems){// Build a new jQuery matched element set 11955var ret=jQuery.merge(this.constructor(),elems);// Add the old object onto the stack (as a reference) 11956ret.prevObject=this;// Return the newly-formed element set 11957return ret;},// Execute a callback for every element in the matched set. 11958each:function each(callback){return jQuery.each(this,callback);},map:function map(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},slice:function slice(){return this.pushStack(_slice.apply(this,arguments));},first:function first(){return this.eq(0);},last:function last(){return this.eq(-1);},eq:function eq(i){var len=this.length,j=+i+(i<0?len:0);return this.pushStack(j>=0&&j<len?[this[j]]:[]);},end:function end(){return this.prevObject||this.constructor();},// For internal use only. 11959// Behaves like an Array's method, not like a jQuery method. 11960push:push,sort:arr.sort,splice:arr.splice};jQuery.extend=jQuery.fn.extend=function(){var options,name,src,copy,copyIsArray,clone,target=arguments[0]||{},i=1,length=arguments.length,deep=false;// Handle a deep copy situation 11961if(typeof target==="boolean"){deep=target;// Skip the boolean and the target 11962target=arguments[i]||{};i++;}// Handle case when target is a string or something (possible in deep copy) 11963if(_typeof(target)!=="object"&&!isFunction(target)){target={};}// Extend jQuery itself if only one argument is passed 11964if(i===length){target=this;i--;}for(;i<length;i++){// Only deal with non-null/undefined values 11965if((options=arguments[i])!=null){// Extend the base object 11966for(name in options){src=target[name];copy=options[name];// Prevent never-ending loop 11967if(target===copy){continue;}// Recurse if we're merging plain objects or arrays 11968if(deep&©&&(jQuery.isPlainObject(copy)||(copyIsArray=Array.isArray(copy)))){if(copyIsArray){copyIsArray=false;clone=src&&Array.isArray(src)?src:[];}else{clone=src&&jQuery.isPlainObject(src)?src:{};}// Never move original objects, clone them 11969target[name]=jQuery.extend(deep,clone,copy);// Don't bring in undefined values 11970}
11970else if(copy!==undefined){target[name]=copy;}}}}// Return the modified object 11971return target;};jQuery.extend({// Unique for each copy of jQuery on the page 11972expando:"jQuery"+(version+Math.random()).replace(/\D/g,""),// Assume jQuery is ready without the ready module 11973isReady:true,error:function error(msg){throw new Error(msg);},noop:function noop(){},isPlainObject:function isPlainObject(obj){var proto,Ctor;// Detect obvious negatives 11974// Use toString instead of jQuery.type to catch host objects 11975if(!obj||toString.call(obj)!=="[object Object]"){return false;}proto=getProto(obj);// Objects with no prototype (e.g., `Object.create( null )`) are plain 11976if(!proto){return true;}// Objects with prototype are plain iff they were constructed by a global Object function 11977Ctor=hasOwn.call(proto,"constructor")&&proto.constructor;return typeof Ctor==="function"&&fnToString.call(Ctor)===ObjectFunctionString;},isEmptyObject:function isEmptyObject(obj){/* eslint-disable no-unused-vars */ // See https://github.com/eslint/eslint/issues/6125 11978var name;for(name in obj){return false;}return true;},// Evaluates a script in a global context 11979globalEval:function globalEval(code){DOMEval(code);},each:function each(obj,callback){var length,i=0;if(isArrayLike(obj)){length=obj.length;for(;i<length;i++){if(callback.call(obj[i],i,obj[i])===false){break;}}}else{for(i in obj){if(callback.call(obj[i],i,obj[i])===false){break;}}}return obj;},// Support: Android <=4.0 only 11980trim:function trim(text){return text==null?"":(text+"").replace(rtrim,"");},// results is for internal usage only 11981makeArray:function makeArray(arr,results){var ret=results||[];if(arr!=null){if(isArrayLike(Object(arr))){jQuery.merge(ret,typeof arr==="string"?[arr]:arr);}else{push.call(ret,arr);}}return ret;},inArray:function inArray(elem,arr,i){return arr==null?-1:indexOf.call(arr,elem,i);}
vendor: 21,679 bytes, lines 11981-12188
11981,// Support: Android <=4.0 only, PhantomJS 1 only 11982// push.apply(_, arraylike) throws on ancient WebKit 11983merge:function merge(first,second){var len=+second.length,j=0,i=first.length;for(;j<len;j++){first[i++]=second[j];}first.length=i;return first;},grep:function grep(elems,callback,invert){var callbackInverse,matches=[],i=0,length=elems.length,callbackExpect=!invert;// Go through the array, only saving the items 11984// that pass the validator function 11985for(;i<length;i++){callbackInverse=!callback(elems[i],i);if(callbackInverse!==callbackExpect){matches.push(elems[i]);}}return matches;},// arg is for internal usage only 11986map:function map(elems,callback,arg){var length,value,i=0,ret=[];// Go through the array, translating each of the items to their new values 11987if(isArrayLike(elems)){length=elems.length;for(;i<length;i++){value=callback(elems[i],i,arg);if(value!=null){ret.push(value);}}// Go through every key on the object, 11988}else{for(i in elems){value=callback(elems[i],i,arg);if(value!=null){ret.push(value);}}}// Flatten any nested arrays 11989return concat.apply([],ret);},// A global GUID counter for objects 11990guid:1,// jQuery.support is not used in Core but other projects attach their 11991// properties to it so it needs to exist. 11992support:support});if(typeof Symbol==="function"){jQuery.fn[Symbol.iterator]=arr[Symbol.iterator];}// Populate the class2type map 11993jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(i,name){class2type["[object "+name+"]"]=name.toLowerCase();});function isArrayLike(obj){// Support: real iOS 8.2 only (not reproducible in simulator) 11994// `in` check used to prevent JIT error (gh-2145) 11995// hasOwn isn't used here due to false negatives 11996// regarding Nodelist length in IE 11997var length=!!obj&&"length"in obj&&obj.length,type=toType(obj);if(isFunction(obj)||isWindow(obj)){return false;}return type==="array"||length===0||typeof length==="number"&&length>0&&length-1 in obj;}var Sizzle=/*! 11998 * Sizzle CSS Selector Engine v2.3.3 11999 * https://sizzlejs.com/ 12000 * 12001 * Copyright jQuery Foundation and other contributors 12002 * Released under the MIT license 12003 * http://jquery.org/license 12004 * 12005 * Date: 2016-08-08 12006 */function(window){var i,support,Expr,getText,isXML,tokenize,compile,select,outermostContext,sortInput,hasDuplicate,// Local document vars 12007setDocument,document,docElem,documentIsHTML,rbuggyQSA,rbuggyMatches,matches,contains,// Instance-specific data 12008expando="sizzle"+1*new Date(),preferredDoc=window.document,dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),sortOrder=function sortOrder(a,b){if(a===b){hasDuplicate=true;}return 0;},// Instance methods 12009hasOwn={}.hasOwnProperty,arr=[],pop=arr.pop,push_native=arr.push,push=arr.push,slice=arr.slice,// Use a stripped-down indexOf as it's faster than native 12010// https://jsperf.com/thor-indexof-vs-for/5 12011indexOf=function indexOf(list,elem){var i=0,len=list.length;for(;i<len;i++){if(list[i]===elem){return i;}}return-1;},booleans="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",// Regular expressions 12012// http://www.w3.org/TR/css3-selectors/#whitespace 12013whitespace="[\\x20\\t\\r\\n\\f]",// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier 12014identifier="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors 12015attributes="\\["+whitespace+"*("+identifier+")(?:"+whitespace+// Operator (capture 2) 12016"*([*^$|!~]?=)"+whitespace+// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" 12017"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+identifier+"))|)"+whitespace+"*\\]",pseudos=":("+identifier+")(?:\\(("+// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: 12018// 1. quoted (capture 3; capture 4 or capture 5) 12019"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|"+// 2. simple (capture 6) 12020"((?:\\\\.|[^\\\\()[\\]]|"+attributes+")*)|"+// 3. anything else (capture 2) 12021".*"+")\\)|)",// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter 12022rwhitespace=new RegExp(whitespace+"+","g"),rtrim=new RegExp("^"+whitespace+"+|((?:^|[^\\\\])(?:\\\\.)*)"+whitespace+"+$","g"),rcomma=new RegExp("^"+whitespace+"*,"+whitespace+"*"),rcombinators=new RegExp("^"+whitespace+"*([>+~]|"+whitespace+")"+whitespace+"*"),rattributeQuotes=new RegExp("="+whitespace+"*([^\\]'\"]*?)"+whitespace+"*\\]","g"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp("^"+identifier+"$"),matchExpr={"ID":new RegExp("^#("+identifier+")"),"CLASS":new RegExp("^\\.("+identifier+")"),"TAG":new RegExp("^("+identifier+"|[*])"),"ATTR":new RegExp("^"+attributes),"PSEUDO":new RegExp("^"+pseudos),"CHILD":new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),"bool":new RegExp("^(?:"+booleans+")$","i"),// For use in libraries implementing .is() 12023// We use this for POS matching in `select` 12024"needsContext":new RegExp("^"+whitespace+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")},rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,rnative=/^[^{]+\{\s*\[native \w/,// Easily-parseable/retrievable ID or TAG or CLASS selectors 12025rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rsibling=/[+~]/,// CSS escapes 12026// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters 12027runescape=new RegExp("\\\\([\\da-f]{1,6}"+whitespace+"?|("+whitespace+")|.)","ig"),funescape=function funescape(_,escaped,escapedWhitespace){var high="0x"+escaped-0x10000;// NaN means non-codepoint 12028// Support: Firefox<24 12029// Workaround erroneous numeric interpretation of +"0x" 12030return high!==high||escapedWhitespace?escaped:high<0?// BMP codepoint 12031String.fromCharCode(high+0x10000):// Supplemental Plane codepoint (surrogate pair) 12032String.fromCharCode(high>>10|0xD800,high&0x3FF|0xDC00);},// CSS string/identifier serialization 12033// https://drafts.csswg.org/cssom/#common-serializing-idioms 12034rcssescape=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,fcssescape=function fcssescape(ch,asCodePoint){if(asCodePoint){// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER 12035if(ch==="\0"){return"\uFFFD";}// Control characters and (dependent upon position) numbers get escaped as code points 12036return ch.slice(0,-1)+"\\"+ch.charCodeAt(ch.length-1).toString(16)+" ";}// Other potentially-special ASCII characters get backslash-escaped 12037return"\\"+ch;},// Used for iframes 12038// See setDocument() 12039// Removing the function wrapper causes a "Permission Denied" 12040// error in IE 12041unloadHandler=function unloadHandler(){setDocument();},disabledAncestor=addCombinator(function(elem){return elem.disabled===true&&("form"in elem||"label"in elem);},{dir:"parentNode",next:"legend"});// Optimize for push.apply( _, NodeList ) 12042try{push.apply(arr=slice.call(preferredDoc.childNodes),preferredDoc.childNodes);// Support: Android<4.0 12043// Detect silently failing push.apply 12044arr[preferredDoc.childNodes.length].nodeType;}catch(e){push={apply:arr.length?// Leverage slice if possible 12045function(target,els){push_native.apply(target,slice.call(els));}:// Support: IE<9 12046// Otherwise append directly 12047function(target,els){var j=target.length,i=0;// Can't trust NodeList.length 12048while(target[j++]=els[i++]){}target.length=j-1;}};}function Sizzle(selector,context,results,seed){var m,i,elem,nid,match,groups,newSelector,newContext=context&&context.ownerDocument,// nodeType defaults to 9, since context defaults to document 12049nodeType=context?context.nodeType:9;results=results||[];// Return early from calls with invalid selector or context 12050if(typeof selector!=="string"||!selector||nodeType!==1&&nodeType!==9&&nodeType!==11){return results;}// Try to shortcut find operations (as opposed to filters) in HTML documents 12051if(!seed){if((context?context.ownerDocument||context:preferredDoc)!==document){setDocument(context);}context=context||document;if(documentIsHTML){// If the selector is sufficiently simple, try using a "get*By*" DOM method 12052// (excepting DocumentFragment context, where the methods don't exist) 12053if(nodeType!==11&&(match=rquickExpr.exec(selector))){// ID selector 12054if(m=match[1]){// Document context 12055if(nodeType===9){if(elem=context.getElementById(m)){// Support: IE, Opera, Webkit 12056// TODO: identify versions 12057// getElementById can match elements by name instead of ID 12058if(elem.id===m){results.push(elem);return results;}}else{return results;}// Element context 12059}else{// Support: IE, Opera, Webkit 12060// TODO: identify versions 12061// getElementById can match elements by name instead of ID 12062if(newContext&&(elem=newContext.getElementById(m))&&contains(context,elem)&&elem.id===m){results.push(elem);return results;}}// Type selector 12063}else if(match[2]){push.apply(results,context.getElementsByTagName(selector));return results;// Class selector 12064}else if((m=match[3])&&support.getElementsByClassName&&context.getElementsByClassName){push.apply(results,context.getElementsByClassName(m));return results;}}// Take advantage of querySelectorAll 12065if(support.qsa&&!compilerCache[selector+" "]&&(!rbuggyQSA||!rbuggyQSA.test(selector))){if(nodeType!==1){newContext=context;newSelector=selector;// qSA looks outside Element context, which is not what we want 12066// Thanks to Andrew Dupont for this workaround technique 12067// Support: IE <=8 12068// Exclude object elements 12069}else if(context.nodeName.toLowerCase()!=="object"){// Capture the context ID, setting it first if necessary 12070if(nid=context.getAttribute("id")){nid=nid.replace(rcssescape,fcssescape);}else{context.setAttribute("id",nid=expando);}// Prefix every selector in the list 12071groups=tokenize(selector);i=groups.length;while(i--){groups[i]="#"+nid+" "+toSelector(groups[i]);}newSelector=groups.join(",");// Expand context for sibling selectors 12072newContext=rsibling.test(selector)&&testContext(context.parentNode)||context;}if(newSelector){try{push.apply(results,newContext.querySelectorAll(newSelector));return results;}catch(qsaError){}finally{if(nid===expando){context.removeAttribute("id");}}}}}}// All others 12073return select(selector.replace(rtrim,"$1"),context,results,seed);}/** 12074 * Create key-value caches of limited size 12075 * @returns {function(string, object)} Returns the Object data after storing it on itself with 12076 * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) 12077 * deleting the oldest entry 12078 */function createCache(){var keys=[];function cache(key,value){// Use (key + " ") to avoid collision with native prototype properties (see Issue #157) 12079if(keys.push(key+" ")>Expr.cacheLength){// Only keep the most recent entries 12080delete cache[keys.shift()];}return cache[key+" "]=value;}return cache;}/** 12081 * Mark a function for special use by Sizzle 12082 * @param {Function} fn The function to mark 12083 */function markFunction(fn){fn[expando]=true;return fn;}/** 12084 * Support testing using an element 12085 * @param {Function} fn Passed the created element and returns a boolean result 12086 */function assert(fn){var el=document.createElement("fieldset");try{return!!fn(el);}catch(e){return false;}finally{// Remove from its parent by default 12087if(el.parentNode){el.parentNode.removeChild(el);}// release memory in IE 12088el=null;}}/** 12089 * Adds the same handler for all of the specified attrs 12090 * @param {String} attrs Pipe-separated list of attributes 12091 * @param {Function} handler The method that will be applied 12092 */function addHandle(attrs,handler){var arr=attrs.split("|"),i=arr.length;while(i--){Expr.attrHandle[arr[i]]=handler;}}/** 12093 * Checks document order of two siblings 12094 * @param {Element} a 12095 * @param {Element} b 12096 * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b 12097 */function siblingCheck(a,b){var cur=b&&a,diff=cur&&a.nodeType===1&&b.nodeType===1&&a.sourceIndex-b.sourceIndex;// Use IE sourceIndex if available on both nodes 12098if(diff){return diff;}// Check if b follows a 12099if(cur){while(cur=cur.nextSibling){if(cur===b){return-1;}}}return a?1:-1;}/** 12100 * Returns a function to use in pseudos for input types 12101 * @param {String} type 12102 */function createInputPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type===type;};}/** 12103 * Returns a function to use in pseudos for buttons 12104 * @param {String} type 12105 */function createButtonPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return(name==="input"||name==="button")&&elem.type===type;};}/** 12106 * Returns a function to use in pseudos for :enabled/:disabled 12107 * @param {Boolean} disabled true for :disabled; false for :enabled 12108 */function createDisabledPseudo(disabled){// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable 12109return function(elem){// Only certain elements can match :enabled or :disabled 12110// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled 12111// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled 12112if("form"in elem){// Check for inherited disabledness on relevant non-disabled elements: 12113// * listed form-associated elements in a disabled fieldset 12114// https://html.spec.whatwg.org/multipage/forms.html#category-listed 12115// https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled 12116// * option elements in a disabled optgroup 12117// https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled 12118// All such elements have a "form" property. 12119if(elem.parentNode&&elem.disabled===false){// Option elements defer to a parent optgroup if present 12120if("label"in elem){if("label"in elem.parentNode){return elem.parentNode.disabled===disabled;}else{return elem.disabled===disabled;}}// Support: IE 6 - 11 12121// Use the isDisabled shortcut property to check for disabled fieldset ancestors 12122return elem.isDisabled===disabled||// Where there is no isDisabled, check manually 12123/* jshint -W018 */elem.isDisabled!==!disabled&&disabledAncestor(elem)===disabled;}return elem.disabled===disabled;// Try to winnow out elements that can't be disabled before trusting the disabled property. 12124// Some victims get caught in our net (label, legend, menu, track), but it shouldn't 12125// even exist on them, let alone have a boolean value. 12126}else if("label"in elem){return elem.disabled===disabled;}// Remaining elements are neither :enabled nor :disabled 12127return false;};}/** 12128 * Returns a function to use in pseudos for positionals 12129 * @param {Function} fn 12130 */function createPositionalPseudo(fn){return markFunction(function(argument){argument=+argument;return markFunction(function(seed,matches){var j,matchIndexes=fn([],seed.length,argument),i=matchIndexes.length;// Match elements found at the specified indexes 12131while(i--){if(seed[j=matchIndexes[i]]){seed[j]=!(matches[j]=seed[j]);}}});});}/** 12132 * Checks a node for validity as a Sizzle context 12133 * @param {Element|Object=} context 12134 * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value 12135 */function testContext(context){return context&&typeof context.getElementsByTagName!=="undefined"&&context;}// Expose support vars for convenience 12136support=Sizzle.support={};/** 12137 * Detects XML nodes 12138 * @param {Element|Object} elem An element or a document 12139 * @returns {Boolean} True iff elem is a non-HTML XML node 12140 */isXML=Sizzle.isXML=function(elem){// documentElement is verified for cases where it doesn't yet exist 12141// (such as loading iframes in IE - #4833) 12142var documentElement=elem&&(elem.ownerDocument||elem).documentElement;return documentElement?documentElement.nodeName!=="HTML":false;};/** 12143 * Sets document-related variables once based on the current document 12144 * @param {Element|Object} [doc] An element or document object to use to set the document 12145 * @returns {Object} Returns the current document 12146 */setDocument=Sizzle.setDocument=function(node){var hasCompare,subWindow,doc=node?node.ownerDocument||node:preferredDoc;// Return early if doc is invalid or already selected 12147if(doc===document||doc.nodeType!==9||!doc.documentElement){return document;}// Update global variables 12148document=doc;docElem=document.documentElement;documentIsHTML=!isXML(document);// Support: IE 9-11, Edge 12149// Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) 12150if(preferredDoc!==document&&(subWindow=document.defaultView)&&subWindow.top!==subWindow){// Support: IE 11, Edge 12151if(subWindow.addEventListener){subWindow.addEventListener("unload",unloadHandler,false);// Support: IE 9 - 10 only 12152}else if(subWindow.attachEvent){subWindow.attachEvent("onunload",unloadHandler);}}/* Attributes 12153 ---------------------------------------------------------------------- */ // Support: IE<8 12154// Verify that getAttribute really returns attributes and not properties 12155// (excepting IE8 booleans) 12156support.attributes=assert(function(el){el.className="i";return!el.getAttribute("className");});/* getElement(s)By* 12157 ---------------------------------------------------------------------- */ // Check if getElementsByTagName("*") returns only elements 12158support.getElementsByTagName=assert(function(el){el.appendChild(document.createComment(""));return!el.getElementsByTagName("*").length;});// Support: IE<9 12159support.getElementsByClassName=rnative.test(document.getElementsByClassName);// Support: IE<10 12160// Check if getElementById returns elements by name 12161// The broken getElementById methods don't pick up programmatically-set names, 12162// so use a roundabout getElementsByName test 12163support.getById=assert(function(el){docElem.appendChild(el).id=expando;return!document.getElementsByName||!document.getElementsByName(expando).length;});// ID filter and find 12164if(support.getById){Expr.filter["ID"]=function(id){var attrId=id.replace(runescape,funescape);return function(elem){return elem.getAttribute("id")===attrId;};};Expr.find["ID"]=function(id,context){if(typeof context.getElementById!=="undefined"&&documentIsHTML){var elem=context.getElementById(id);return elem?[elem]:[];}};}else{Expr.filter["ID"]=function(id){var attrId=id.replace(runescape,funescape);return function(elem){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return node&&node.value===attrId;};};// Support: IE 6 - 7 only 12165// getElementById is not reliable as a find shortcut 12166Expr.find["ID"]=function(id,context){if(typeof context.getElementById!=="undefined"&&documentIsHTML){var node,i,elems,elem=context.getElementById(id);if(elem){// Verify the id attribute 12167node=elem.getAttributeNode("id");if(node&&node.value===id){return[elem];}// Fall back on getElementsByName 12168elems=context.getElementsByName(id);i=0;while(elem=elems[i++]){node=elem.getAttributeNode("id");if(node&&node.value===id){return[elem];}}}return[];}};}// Tag 12169Expr.find["TAG"]=support.getElementsByTagName?function(tag,context){if(typeof context.getElementsByTagName!=="undefined"){return context.getElementsByTagName(tag);// DocumentFragment nodes don't have gEBTN 12170}else if(support.qsa){return context.querySelectorAll(tag);}}:function(tag,context){var elem,tmp=[],i=0,// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too 12171results=context.getElementsByTagName(tag);// Filter out possible comments 12172if(tag==="*"){while(elem=results[i++]){if(elem.nodeType===1){tmp.push(elem);}}return tmp;}return results;};// Class 12173Expr.find["CLASS"]=support.getElementsByClassName&&function(className,context){if(typeof context.getElementsByClassName!=="undefined"&&documentIsHTML){return context.getElementsByClassName(className);}};/* QSA/matchesSelector 12174 ---------------------------------------------------------------------- */ // QSA and matchesSelector support 12175// matchesSelector(:active) reports false when true (IE9/Opera 11.5) 12176rbuggyMatches=[];// qSa(:focus) reports false when true (Chrome 21) 12177// We allow this because of a bug in IE8/9 that throws an error 12178// whenever `document.activeElement` is accessed on an iframe 12179// So, we allow :focus to pass through QSA all the time to avoid the IE error 12180// See https://bugs.jquery.com/ticket/13378 12181rbuggyQSA=[];if(support.qsa=rnative.test(document.querySelectorAll)){// Build QSA regex 12182// Regex strategy adopted from Diego Perini 12183assert(function(el){// Select is set to empty string on purpose 12184// This is to test IE's treatment of not explicitly 12185// setting a boolean content attribute, 12186// since its presence should be enough 12187// https://bugs.jquery.com/ticket/12359 12188docElem.appendChild(el).innerHTML="<a id='"+expando+"'></a>"+"<select id='"+expando+"-\r\\' msallowcapture=''>"+"<option selected=''></option></select>";
vendor: 16,651 bytes, lines 12188-12313
12188// Support: IE8, Opera 11-12.16 12189// Nothing should be selected when empty strings follow ^= or $= or *= 12190// The test attribute must be unknown in Opera but "safe" for WinRT 12191// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section 12192if(el.querySelectorAll("[msallowcapture^='']").length){rbuggyQSA.push("[*^$]="+whitespace+"*(?:''|\"\")");}// Support: IE8 12193// Boolean attributes and "value" are not treated correctly 12194if(!el.querySelectorAll("[selected]").length){rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")");}// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ 12195if(!el.querySelectorAll("[id~="+expando+"-]").length){rbuggyQSA.push("~=");}// Webkit/Opera - :checked should return selected option elements 12196// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked 12197// IE8 throws error here and will not see later tests 12198if(!el.querySelectorAll(":checked").length){rbuggyQSA.push(":checked");}// Support: Safari 8+, iOS 8+ 12199// https://bugs.webkit.org/show_bug.cgi?id=136851 12200// In-page `selector#id sibling-combinator selector` fails 12201if(!el.querySelectorAll("a#"+expando+"+*").length){rbuggyQSA.push(".#.+[+~]");}});assert(function(el){el.innerHTML="<a href='' disabled='disabled'></a>"+"<select disabled='disabled'><option/></select>";// Support: Windows 8 Native Apps 12202// The type and name attributes are restricted during .innerHTML assignment 12203var input=document.createElement("input");input.setAttribute("type","hidden");el.appendChild(input).setAttribute("name","D");// Support: IE8 12204// Enforce case-sensitivity of name attribute 12205if(el.querySelectorAll("[name=d]").length){rbuggyQSA.push("name"+whitespace+"*[*^$|!~]?=");}// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) 12206// IE8 throws error here and will not see later tests 12207if(el.querySelectorAll(":enabled").length!==2){rbuggyQSA.push(":enabled",":disabled");}// Support: IE9-11+ 12208// IE's :disabled selector does not pick up the children of disabled fieldsets 12209docElem.appendChild(el).disabled=true;if(el.querySelectorAll(":disabled").length!==2){rbuggyQSA.push(":enabled",":disabled");}// Opera 10-11 does not throw on post-comma invalid pseudos 12210el.querySelectorAll("*,:x");rbuggyQSA.push(",.*:");});}if(support.matchesSelector=rnative.test(matches=docElem.matches||docElem.webkitMatchesSelector||docElem.mozMatchesSelector||docElem.oMatchesSelector||docElem.msMatchesSelector)){assert(function(el){// Check to see if it's possible to do matchesSelector 12211// on a disconnected node (IE 9) 12212support.disconnectedMatch=matches.call(el,"*");// This should fail with an exception 12213// Gecko does not error, returns false instead 12214matches.call(el,"[s!='']:x");rbuggyMatches.push("!=",pseudos);});}rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|"));rbuggyMatches=rbuggyMatches.length&&new RegExp(rbuggyMatches.join("|"));/* Contains 12215 ---------------------------------------------------------------------- */hasCompare=rnative.test(docElem.compareDocumentPosition);// Element contains another 12216// Purposefully self-exclusive 12217// As in, an element does not contain itself 12218contains=hasCompare||rnative.test(docElem.contains)?function(a,b){var adown=a.nodeType===9?a.documentElement:a,bup=b&&b.parentNode;return a===bup||!!(bup&&bup.nodeType===1&&(adown.contains?adown.contains(bup):a.compareDocumentPosition&&a.compareDocumentPosition(bup)&16));}:function(a,b){if(b){while(b=b.parentNode){if(b===a){return true;}}}return false;};/* Sorting 12219 ---------------------------------------------------------------------- */ // Document order sorting 12220sortOrder=hasCompare?function(a,b){// Flag for duplicate removal 12221if(a===b){hasDuplicate=true;return 0;}// Sort on method existence if only one input has compareDocumentPosition 12222var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;if(compare){return compare;}// Calculate position if both inputs belong to the same document 12223compare=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):// Otherwise we know they are disconnected 122241;// Disconnected nodes 12225if(compare&1||!support.sortDetached&&b.compareDocumentPosition(a)===compare){// Choose the first element that is related to our preferred document 12226if(a===document||a.ownerDocument===preferredDoc&&contains(preferredDoc,a)){return-1;}if(b===document||b.ownerDocument===preferredDoc&&contains(preferredDoc,b)){return 1;}// Maintain original order 12227return sortInput?indexOf(sortInput,a)-indexOf(sortInput,b):0;}return compare&4?-1:1;}:function(a,b){// Exit early if the nodes are identical 12228if(a===b){hasDuplicate=true;return 0;}var cur,i=0,aup=a.parentNode,bup=b.parentNode,ap=[a],bp=[b];// Parentless nodes are either documents or disconnected 12229if(!aup||!bup){return a===document?-1:b===document?1:aup?-1:bup?1:sortInput?indexOf(sortInput,a)-indexOf(sortInput,b):0;// If the nodes are siblings, we can do a quick check 12230}else if(aup===bup){return siblingCheck(a,b);}// Otherwise we need full lists of their ancestors for comparison 12231cur=a;while(cur=cur.parentNode){ap.unshift(cur);}cur=b;while(cur=cur.parentNode){bp.unshift(cur);}// Walk down the tree looking for a discrepancy 12232while(ap[i]===bp[i]){i++;}return i?// Do a sibling check if the nodes have a common ancestor 12233siblingCheck(ap[i],bp[i]):// Otherwise nodes in our document sort first 12234ap[i]===preferredDoc?-1:bp[i]===preferredDoc?1:0;};return document;};Sizzle.matches=function(expr,elements){return Sizzle(expr,null,null,elements);};Sizzle.matchesSelector=function(elem,expr){// Set document vars if needed 12235if((elem.ownerDocument||elem)!==document){setDocument(elem);}// Make sure that attribute selectors are quoted 12236expr=expr.replace(rattributeQuotes,"='$1']");if(support.matchesSelector&&documentIsHTML&&!compilerCache[expr+" "]&&(!rbuggyMatches||!rbuggyMatches.test(expr))&&(!rbuggyQSA||!rbuggyQSA.test(expr))){try{var ret=matches.call(elem,expr);// IE 9's matchesSelector returns false on disconnected nodes 12237if(ret||support.disconnectedMatch||// As well, disconnected nodes are said to be in a document 12238// fragment in IE 9 12239elem.document&&elem.document.nodeType!==11){return ret;}}catch(e){}}return Sizzle(expr,document,null,[elem]).length>0;};Sizzle.contains=function(context,elem){// Set document vars if needed 12240if((context.ownerDocument||context)!==document){setDocument(context);}return contains(context,elem);};Sizzle.attr=function(elem,name){// Set document vars if needed 12241if((elem.ownerDocument||elem)!==document){setDocument(elem);}var fn=Expr.attrHandle[name.toLowerCase()],// Don't get fooled by Object.prototype properties (jQuery #13807) 12242val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?fn(elem,name,!documentIsHTML):undefined;return val!==undefined?val:support.attributes||!documentIsHTML?elem.getAttribute(name):(val=elem.getAttributeNode(name))&&val.specified?val.value:null;};Sizzle.escape=function(sel){return(sel+"").replace(rcssescape,fcssescape);};Sizzle.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg);};/** 12243 * Document sorting and removing duplicates 12244 * @param {ArrayLike} results 12245 */Sizzle.uniqueSort=function(results){var elem,duplicates=[],j=0,i=0;// Unless we *know* we can detect duplicates, assume their presence 12246hasDuplicate=!support.detectDuplicates;sortInput=!support.sortStable&&results.slice(0);results.sort(sortOrder);if(hasDuplicate){while(elem=results[i++]){if(elem===results[i]){j=duplicates.push(i);}}while(j--){results.splice(duplicates[j],1);}}// Clear input after sorting to release objects 12247// See https://github.com/jquery/sizzle/pull/225 12248sortInput=null;return results;};/** 12249 * Utility function for retrieving the text value of an array of DOM nodes 12250 * @param {Array|Element} elem 12251 */getText=Sizzle.getText=function(elem){var node,ret="",i=0,nodeType=elem.nodeType;if(!nodeType){// If no nodeType, this is expected to be an array 12252while(node=elem[i++]){// Do not traverse comment nodes 12253ret+=getText(node);}}else if(nodeType===1||nodeType===9||nodeType===11){// Use textContent for elements 12254// innerText usage removed for consistency of new lines (jQuery #11153) 12255if(typeof elem.textContent==="string"){return elem.textContent;}else{// Traverse its children 12256for(elem=elem.firstChild;elem;elem=elem.nextSibling){ret+=getText(elem);}}}else if(nodeType===3||nodeType===4){return elem.nodeValue;}// Do not include comment or processing instruction nodes 12257return ret;};Expr=Sizzle.selectors={// Can be adjusted by the user 12258cacheLength:50,createPseudo:markFunction,match:matchExpr,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{"ATTR":function ATTR(match){match[1]=match[1].replace(runescape,funescape);// Move the given value to match[3] whether quoted or unquoted 12259match[3]=(match[3]||match[4]||match[5]||"").replace(runescape,funescape);if(match[2]==="~="){match[3]=" "+match[3]+" ";}return match.slice(0,4);},"CHILD":function CHILD(match){/* matches from matchExpr["CHILD"] 12260 1 type (only|nth|...) 12261 2 what (child|of-type) 12262 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) 12263 4 xn-component of xn+y argument ([+-]?\d*n|) 12264 5 sign of xn-component 12265 6 x of xn-component 12266 7 sign of y-component 12267 8 y of y-component 12268 */match[1]=match[1].toLowerCase();if(match[1].slice(0,3)==="nth"){// nth-* requires argument 12269if(!match[3]){Sizzle.error(match[0]);}// numeric x and y parameters for Expr.filter.CHILD 12270// remember that false/true cast respectively to 0/1 12271match[4]=+(match[4]?match[5]+(match[6]||1):2*(match[3]==="even"||match[3]==="odd"));match[5]=+(match[7]+match[8]||match[3]==="odd");// other types prohibit arguments 12272}else if(match[3]){Sizzle.error(match[0]);}return match;},"PSEUDO":function PSEUDO(match){var excess,unquoted=!match[6]&&match[2];if(matchExpr["CHILD"].test(match[0])){return null;}// Accept quoted arguments as-is 12273if(match[3]){match[2]=match[4]||match[5]||"";// Strip excess characters from unquoted arguments 12274}else if(unquoted&&rpseudo.test(unquoted)&&(// Get excess from tokenize (recursively) 12275excess=tokenize(unquoted,true))&&(// advance to the next closing parenthesis 12276excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)){// excess is a negative index 12277match[0]=match[0].slice(0,excess);match[2]=unquoted.slice(0,excess);}// Return only captures needed by the pseudo filter method (type and argument) 12278return match.slice(0,3);}},filter:{"TAG":function TAG(nodeNameSelector){var nodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();return nodeNameSelector==="*"?function(){return true;}:function(elem){return elem.nodeName&&elem.nodeName.toLowerCase()===nodeName;};},"CLASS":function CLASS(className){var pattern=classCache[className+" "];return pattern||(pattern=new RegExp("(^|"+whitespace+")"+className+"("+whitespace+"|$)"))&&classCache(className,function(elem){return pattern.test(typeof elem.className==="string"&&elem.className||typeof elem.getAttribute!=="undefined"&&elem.getAttribute("class")||"");});},"ATTR":function ATTR(name,operator,check){return function(elem){var result=Sizzle.attr(elem,name);if(result==null){return operator==="!=";}if(!operator){return true;}result+="";return operator==="="?result===check:operator==="!="?result!==check:operator==="^="?check&&result.indexOf(check)===0:operator==="*="?check&&result.indexOf(check)>-1:operator==="$="?check&&result.slice(-check.length)===check:operator==="~="?(" "+result.replace(rwhitespace," ")+" ").indexOf(check)>-1:operator==="|="?result===check||result.slice(0,check.length+1)===check+"-":false;};},"CHILD":function CHILD(type,what,argument,first,last){var simple=type.slice(0,3)!=="nth",forward=type.slice(-4)!=="last",ofType=what==="of-type";return first===1&&last===0?// Shortcut for :nth-*(n) 12279function(elem){return!!elem.parentNode;}:function(elem,context,xml){var cache,uniqueCache,outerCache,node,nodeIndex,start,dir=simple!==forward?"nextSibling":"previousSibling",parent=elem.parentNode,name=ofType&&elem.nodeName.toLowerCase(),useCache=!xml&&!ofType,diff=false;if(parent){// :(first|last|only)-(child|of-type) 12280if(simple){while(dir){node=elem;while(node=node[dir]){if(ofType?node.nodeName.toLowerCase()===name:node.nodeType===1){return false;}}// Reverse direction for :only-* (if we haven't yet done so) 12281start=dir=type==="only"&&!start&&"nextSibling";}return true;}start=[forward?parent.firstChild:parent.lastChild];// non-xml :nth-child(...) stores cache data on `parent` 12282if(forward&&useCache){// Seek `elem` from a previously-cached index 12283// ...in a gzip-friendly way 12284node=parent;outerCache=node[expando]||(node[expando]={});// Support: IE <9 only 12285// Defend against cloned attroperties (jQuery gh-1709) 12286uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});cache=uniqueCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=nodeIndex&&cache[2];node=nodeIndex&&parent.childNodes[nodeIndex];while(node=++nodeIndex&&node&&node[dir]||(// Fallback to seeking `elem` from the start 12287diff=nodeIndex=0)||start.pop()){// When found, cache indexes on `parent` and break 12288if(node.nodeType===1&&++diff&&node===elem){uniqueCache[type]=[dirruns,nodeIndex,diff];break;}}}else{// Use previously-cached element index if available 12289if(useCache){// ...in a gzip-friendly way 12290node=elem;outerCache=node[expando]||(node[expando]={});// Support: IE <9 only 12291// Defend against cloned attroperties (jQuery gh-1709) 12292uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});cache=uniqueCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=nodeIndex;}// xml :nth-child(...) 12293// or :nth-last-child(...) or :nth(-last)?-of-type(...) 12294if(diff===false){// Use the same loop as above to seek `elem` from the start 12295while(node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop()){if((ofType?node.nodeName.toLowerCase()===name:node.nodeType===1)&&++diff){// Cache the index of each encountered element 12296if(useCache){outerCache=node[expando]||(node[expando]={});// Support: IE <9 only 12297// Defend against cloned attroperties (jQuery gh-1709) 12298uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});uniqueCache[type]=[dirruns,diff];}if(node===elem){break;}}}}}// Incorporate the offset, then check against cycle size 12299diff-=last;return diff===first||diff%first===0&&diff/first>=0;}};},"PSEUDO":function PSEUDO(pseudo,argument){// pseudo-class names are case-insensitive 12300// http://www.w3.org/TR/selectors/#pseudo-classes 12301// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters 12302// Remember that setFilters inherits from pseudos 12303var args,fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||Sizzle.error("unsupported pseudo: "+pseudo);// The user may use createPseudo to indicate that 12304// arguments are needed to create the filter function 12305// just as Sizzle does 12306if(fn[expando]){return fn(argument);}// But maintain support for old signatures 12307if(fn.length>1){args=[pseudo,pseudo,"",argument];return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?markFunction(function(seed,matches){var idx,matched=fn(seed,argument),i=matched.length;while(i--){idx=indexOf(seed,matched[i]);seed[idx]=!(matches[idx]=matched[i]);}}):function(elem){return fn(elem,0,args);};}return fn;}},pseudos:{// Potentially complex pseudos 12308"not":markFunction(function(selector){// Trim the selector passed to compile 12309// to avoid treating leading and trailing 12310// spaces as combinators 12311var input=[],results=[],matcher=compile(selector.replace(rtrim,"$1"));return matcher[expando]?markFunction(function(seed,matches,context,xml){var elem,unmatched=matcher(seed,null,xml,[]),i=seed.length;// Match elements unmatched by `matcher` 12312while(i--){if(elem=unmatched[i]){seed[i]=!(matches[i]=elem);}}}):function(elem,context,xml){input[0]=elem;matcher(input,null,xml,results);// Don't keep the element (issue #299) 12313input[0]=null;return!results.pop();};}),"has":markFunction(function(selector){return function(elem){return Sizzle(selector,elem).length>0;};}),"contains":markFunction(function(text){text=text.replace(runescape,funescape);return function(elem){return(elem.textContent||elem.innerText||getText(elem)).indexOf(text)>-1;};}),// "Whether an element is represented by a :lang() selector
12314// is based solely on the element's language value 12315// being equal to the identifier C, 12316// or beginning with the identifier C immediately followed by "-". 12317// The matching of C against the element's language value is performed case-insensitively. 12318// The identifier C does not have to be a valid language name." 12319// http://www.w3.org/TR/selectors/#lang-pseudo 12320"lang":markFunction(function(lang){// lang value must be a valid identifier 12321if(!ridentifier.test(lang||"")){Sizzle.error("unsupported lang: "+lang);}lang=lang.replace(runescape,funescape).toLowerCase();return function(elem){var elemLang;do{if(elemLang=documentIsHTML?elem.lang:elem.getAttribute("xml:lang")||elem.getAttribute("lang")){elemLang=elemLang.toLowerCase();return elemLang===lang||elemLang.indexOf(lang+"-")===0;}}while((elem=elem.parentNode)&&elem.nodeType===1);return false;};}),// Miscellaneous 12322"target":function target(elem){var hash=window.location&&window.location.hash;return hash&&hash.slice(1)===elem.id;},"root":function root(elem){return elem===docElem;},"focus":function focus(elem){return elem===document.activeElement&&(!document.hasFocus||document.hasFocus())&&!!(elem.type||elem.href||~elem.tabIndex);},// Boolean properties 12323"enabled":createDisabledPseudo(false),"disabled":createDisabledPseudo(true),"checked":function checked(elem){// In CSS3, :checked should return both checked and selected elements 12324// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked 12325var nodeName=elem.nodeName.toLowerCase();return nodeName==="input"&&!!elem.checked||nodeName==="option"&&!!elem.selected;},"selected":function selected(elem){// Accessing this property makes selected-by-default 12326// options in Safari work properly 12327if(elem.parentNode){elem.parentNode.selectedIndex;}return elem.selected===true;},// Contents 12328"empty":function empty(elem){// http://www.w3.org/TR/selectors/#empty-pseudo 12329// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), 12330// but not by others (comment: 8; processing instruction: 7; etc.) 12331// nodeType < 6 works because attributes (2) do not appear as children 12332for(elem=elem.firstChild;elem;elem=elem.nextSibling){if(elem.nodeType<6){return false;}}return true;},"parent":function parent(elem){return!Expr.pseudos["empty"](elem);},// Element/input types 12333"header":function header(elem){return rheader.test(elem.nodeName);},"input":function input(elem){return rinputs.test(elem.nodeName);},"button":function button(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type==="button"||name==="button";},"text":function text(elem){var attr;return elem.nodeName.toLowerCase()==="input"&&elem.type==="text"&&(// Support: IE<8 12334// New HTML5 attribute values (e.g., "search") appear with elem.type === "text" 12335(attr=elem.getAttribute("type"))==null||attr.toLowerCase()==="text");},// Position-in-collection 12336"first":createPositionalPseudo(function(){return[0];}),"last":createPositionalPseudo(function(matchIndexes,length){return[length-1];}),"eq":createPositionalPseudo(function(matchIndexes,length,argument){return[argument<0?argument+length:argument];}),"even":createPositionalPseudo(function(matchIndexes,length){var i=0;for(;i<length;i+=2){matchIndexes.push(i);}return matchIndexes;}),"odd":createPositionalPseudo(function(matchIndexes,length){var i=1;for(;i<length;i+=2){matchIndexes.push(i);}return matchIndexes;}),"lt":createPositionalPseudo(function(matchIndexes,length,argument){var i=argument<0?argument+length:argument;for(;--i>=0;){matchIndexes.push(i);}return matchIndexes;}),"gt":createPositionalPseudo(function(matchIndexes,length,argument){var i=argument<0?argument+length:argument;for(;++i<length;){matchIndexes.push(i);}return matchIndexes;})}};Expr.pseudos["nth"]=Expr.pseudos["eq"];// Add button/input type pseudos 12337for(i in{radio:true,checkbox:true,file:true,password:true,image:true}){Expr.pseudos[i]=createInputPseudo(i);}for(i in{submit:true,reset:true}){Expr.pseudos[i]=createButtonPseudo(i);}// Easy API for creating new setFilters 12338function setFilters(){}setFilters.prototype=Expr.filters=Expr.pseudos;Expr.setFilters=new setFilters();tokenize=Sizzle.tokenize=function(selector,parseOnly){var matched,match,tokens,type,soFar,groups,preFilters,cached=tokenCache[
vendor: 17,371 bytes, lines 12338-12444
12338selector+" "];if(cached){return parseOnly?0:cached.slice(0);}soFar=selector;groups=[];preFilters=Expr.preFilter;while(soFar){// Comma and first run 12339if(!matched||(match=rcomma.exec(soFar))){if(match){// Don't consume trailing commas as valid 12340soFar=soFar.slice(match[0].length)||soFar;}groups.push(tokens=[]);}matched=false;// Combinators 12341if(match=rcombinators.exec(soFar)){matched=match.shift();tokens.push({value:matched,// Cast descendant combinators to space 12342type:match[0].replace(rtrim," ")});soFar=soFar.slice(matched.length);}// Filters 12343for(type in Expr.filter){if((match=matchExpr[type].exec(soFar))&&(!preFilters[type]||(match=preFilters[type](match)))){matched=match.shift();tokens.push({value:matched,type:type,matches:match});soFar=soFar.slice(matched.length);}}if(!matched){break;}}// Return the length of the invalid excess 12344// if we're just parsing 12345// Otherwise, throw an error or return tokens 12346return parseOnly?soFar.length:soFar?Sizzle.error(selector):// Cache the tokens 12347tokenCache(selector,groups).slice(0);};function toSelector(tokens){var i=0,len=tokens.length,selector="";for(;i<len;i++){selector+=tokens[i].value;}return selector;}function addCombinator(matcher,combinator,base){var dir=combinator.dir,skip=combinator.next,key=skip||dir,checkNonElements=base&&key==="parentNode",doneName=done++;return combinator.first?// Check against closest ancestor/preceding element 12348function(elem,context,xml){while(elem=elem[dir]){if(elem.nodeType===1||checkNonElements){return matcher(elem,context,xml);}}return false;}:// Check against all ancestor/preceding elements 12349function(elem,context,xml){var oldCache,uniqueCache,outerCache,newCache=[dirruns,doneName];// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching 12350if(xml){while(elem=elem[dir]){if(elem.nodeType===1||checkNonElements){if(matcher(elem,context,xml)){return true;}}}}else{while(elem=elem[dir]){if(elem.nodeType===1||checkNonElements){outerCache=elem[expando]||(elem[expando]={});// Support: IE <9 only 12351// Defend against cloned attroperties (jQuery gh-1709) 12352uniqueCache=outerCache[elem.uniqueID]||(outerCache[elem.uniqueID]={});if(skip&&skip===elem.nodeName.toLowerCase()){elem=elem[dir]||elem;}else if((oldCache=uniqueCache[key])&&oldCache[0]===dirruns&&oldCache[1]===doneName){// Assign to newCache so results back-propagate to previous elements 12353return newCache[2]=oldCache[2];}else{// Reuse newcache so results back-propagate to previous elements 12354uniqueCache[key]=newCache;// A match means we're done; a fail means we have to keep checking 12355if(newCache[2]=matcher(elem,context,xml)){return true;}}}}}return false;};}function elementMatcher(matchers){return matchers.length>1?function(elem,context,xml){var i=matchers.length;while(i--){if(!matchers[i](elem,context,xml)){return false;}}return true;}:matchers[0];}function multipleContexts(selector,contexts,results){var i=0,len=contexts.length;for(;i<len;i++){Sizzle(selector,contexts[i],results);}return results;}function condense(unmatched,map,filter,context,xml){var elem,newUnmatched=[],i=0,len=unmatched.length,mapped=map!=null;for(;i<len;i++){if(elem=unmatched[i]){if(!filter||filter(elem,context,xml)){newUnmatched.push(elem);if(mapped){map.push(i);}}}}return newUnmatched;}function setMatcher(preFilter,selector,matcher,postFilter,postFinder,postSelector){if(postFilter&&!postFilter[expando]){postFilter=setMatcher(postFilter);}if(postFinder&&!postFinder[expando]){postFinder=setMatcher(postFinder,postSelector);}return markFunction(function(seed,results,context,xml){var temp,i,elem,preMap=[],postMap=[],preexisting=results.length,// Get initial elements from seed or context 12356elems=seed||multipleContexts(selector||"*",context.nodeType?[context]:context,[]),// Prefilter to get matcher input, preserving a map for seed-results synchronization 12357matcherIn=preFilter&&(seed||!selector)?condense(elems,preMap,preFilter,context,xml):elems,matcherOut=matcher?// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, 12358postFinder||(seed?preFilter:preexisting||postFilter)?// ...intermediate processing is necessary 12359[]:// ...otherwise use results directly 12360results:matcherIn;// Find primary matches 12361if(matcher){matcher(matcherIn,matcherOut,context,xml);}// Apply postFilter 12362if(postFilter){temp=condense(matcherOut,postMap);postFilter(temp,[],context,xml);// Un-match failing elements by moving them back to matcherIn 12363i=temp.length;while(i--){if(elem=temp[i]){matcherOut[postMap[i]]=!(matcherIn[postMap[i]]=elem);}}}if(seed){if(postFinder||preFilter){if(postFinder){// Get the final matcherOut by condensing this intermediate into postFinder contexts 12364temp=[];i=matcherOut.length;while(i--){if(elem=matcherOut[i]){// Restore matcherIn since elem is not yet a final match 12365temp.push(matcherIn[i]=elem);}}postFinder(null,matcherOut=[],temp,xml);}// Move matched elements from seed to results to keep them synchronized 12366i=matcherOut.length;while(i--){if((elem=matcherOut[i])&&(temp=postFinder?indexOf(seed,elem):preMap[i])>-1){seed[temp]=!(results[temp]=elem);}}}// Add elements to results, through postFinder if defined 12367}else{matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut);if(postFinder){postFinder(null,results,matcherOut,xml);}else{push.apply(results,matcherOut);}}});}function matcherFromTokens(tokens){var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[" "],i=leadingRelative?1:0,// The foundational matcher ensures that elements are reachable from top-level context(s) 12368matchContext=addCombinator(function(elem){return elem===checkContext;},implicitRelative,true),matchAnyContext=addCombinator(function(elem){return indexOf(checkContext,elem)>-1;},implicitRelative,true),matchers=[function(elem,context,xml){var ret=!leadingRelative&&(xml||context!==outermostContext)||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml));// Avoid hanging onto element (issue #299) 12369checkContext=null;return ret;}];for(;i<len;i++){if(matcher=Expr.relative[tokens[i].type]){matchers=[addCombinator(elementMatcher(matchers),matcher)];}else{matcher=Expr.filter[tokens[i].type].apply(null,tokens[i].matches);// Return special upon seeing a positional matcher 12370if(matcher[expando]){// Find the next relative operator (if any) for proper handling 12371j=++i;for(;j<len;j++){if(Expr.relative[tokens[j].type]){break;}}return setMatcher(i>1&&elementMatcher(matchers),i>1&&toSelector(// If the preceding token was a descendant combinator, insert an implicit any-element `*` 12372tokens.slice(0,i-1).concat({value:tokens[i-2].type===" "?"*":""})).replace(rtrim,"$1"),matcher,i<j&&matcherFromTokens(tokens.slice(i,j)),j<len&&matcherFromTokens(tokens=tokens.slice(j)),j<len&&toSelector(tokens));}matchers.push(matcher);}}return elementMatcher(matchers);}function matcherFromGroupMatchers(elementMatchers,setMatchers){var bySet=setMatchers.length>0,byElement=elementMatchers.length>0,superMatcher=function superMatcher(seed,context,xml,results,outermost){var elem,j,matcher,matchedCount=0,i="0",unmatched=seed&&[],setMatched=[],contextBackup=outermostContext,// We must always have either seed elements or outermost context 12373elems=seed||byElement&&Expr.find["TAG"]("*",outermost),// Use integer dirruns iff this is the outermost matcher 12374dirrunsUnique=dirruns+=contextBackup==null?1:Math.random()||0.1,len=elems.length;if(outermost){outermostContext=context===document||context||outermost;}// Add elements passing elementMatchers directly to results 12375// Support: IE<9, Safari 12376// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id 12377for(;i!==len&&(elem=elems[i])!=null;i++){if(byElement&&elem){j=0;if(!context&&elem.ownerDocument!==document){setDocument(elem);xml=!documentIsHTML;}while(matcher=elementMatchers[j++]){if(matcher(elem,context||document,xml)){results.push(elem);break;}}if(outermost){dirruns=dirrunsUnique;}}// Track unmatched elements for set filters 12378if(bySet){// They will have gone through all possible matchers 12379if(elem=!matcher&&elem){matchedCount--;}// Lengthen the array for every element, matched or not 12380if(seed){unmatched.push(elem);}}}// `i` is now the count of elements visited above, and adding it to `matchedCount` 12381// makes the latter nonnegative. 12382matchedCount+=i;// Apply set filters to unmatched elements 12383// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` 12384// equals `i`), unless we didn't visit _any_ elements in the above loop because we have 12385// no element matchers and no seed. 12386// Incrementing an initially-string "0" `i` allows `i` to remain a string only in that 12387// case, which will result in a "00" `matchedCount` that differs from `i` but is also 12388// numerically zero. 12389if(bySet&&i!==matchedCount){j=0;while(matcher=setMatchers[j++]){matcher(unmatched,setMatched,context,xml);}if(seed){// Reintegrate element matches to eliminate the need for sorting 12390if(matchedCount>0){while(i--){if(!(unmatched[i]||setMatched[i])){setMatched[i]=pop.call(results);}}}// Discard index placeholder values to get only actual matches 12391setMatched=condense(setMatched);}// Add matches to results 12392push.apply(results,setMatched);// Seedless set matches succeeding multiple successful matchers stipulate sorting 12393if(outermost&&!seed&&setMatched.length>0&&matchedCount+setMatchers.length>1){Sizzle.uniqueSort(results);}}// Override manipulation of globals by nested matchers 12394if(outermost){dirruns=dirrunsUnique;outermostContext=contextBackup;}return unmatched;};return bySet?markFunction(superMatcher):superMatcher;}compile=Sizzle.compile=function(selector,match/* Internal Use Only */){var i,setMatchers=[],elementMatchers=[],cached=compilerCache[selector+" "];if(!cached){// Generate a function of recursive functions that can be used to check each element 12395if(!match){match=tokenize(selector);}i=match.length;while(i--){cached=matcherFromTokens(match[i]);if(cached[expando]){setMatchers.push(cached);}else{elementMatchers.push(cached);}}// Cache the compiled function 12396cached=compilerCache(selector,matcherFromGroupMatchers(elementMatchers,setMatchers));// Save selector and tokenization 12397cached.selector=selector;}return cached;};/** 12398 * A low-level selection function that works with Sizzle's compiled 12399 * selector functions 12400 * @param {String|Function} selector A selector or a pre-compiled 12401 * selector function built with Sizzle.compile 12402 * @param {Element} context 12403 * @param {Array} [results] 12404 * @param {Array} [seed] A set of elements to match against 12405 */select=Sizzle.select=function(selector,context,results,seed){var i,tokens,token,type,find,compiled=typeof selector==="function"&&selector,match=!seed&&tokenize(selector=compiled.selector||selector);results=results||[];// Try to minimize operations if there is only one selector in the list and no seed 12406// (the latter of which guarantees us context) 12407if(match.length===1){// Reduce context if the leading compound selector is an ID 12408tokens=match[0]=match[0].slice(0);if(tokens.length>2&&(token=tokens[0]).type==="ID"&&context.nodeType===9&&documentIsHTML&&Expr.relative[tokens[1].type]){context=(Expr.find["ID"](token.matches[0].replace(runescape,funescape),context)||[])[0];if(!context){return results;// Precompiled matchers will still verify ancestry, so step up a level 12409}else if(compiled){context=context.parentNode;}selector=selector.slice(tokens.shift().value.length);}// Fetch a seed set for right-to-left matching 12410i=matchExpr["needsContext"].test(selector)?0:tokens.length;while(i--){token=tokens[i];// Abort if we hit a combinator 12411if(Expr.relative[type=token.type]){break;}if(find=Expr.find[type]){// Search, expanding context for leading sibling combinators 12412if(seed=find(token.matches[0].replace(runescape,funescape),rsibling.test(tokens[0].type)&&testContext(context.parentNode)||context)){// If seed is empty or no tokens remain, we can return early 12413tokens.splice(i,1);selector=seed.length&&toSelector(tokens);if(!selector){push.apply(results,seed);return results;}break;}}}}// Compile and execute a filtering function if one is not provided 12414// Provide `match` to avoid retokenization if we modified the selector above 12415(compiled||compile(selector,match))(seed,context,!documentIsHTML,results,!context||rsibling.test(selector)&&testContext(context.parentNode)||context);return results;};// One-time assignments 12416// Sort stability 12417support.sortStable=expando.split("").sort(sortOrder).join("")===expando;// Support: Chrome 14-35+ 12418// Always assume duplicates if they aren't passed to the comparison function 12419support.detectDuplicates=!!hasDuplicate;// Initialize against the default document 12420setDocument();// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) 12421// Detached nodes confoundingly follow *each other* 12422support.sortDetached=assert(function(el){// Should return 1, but returns 4 (following) 12423return el.compareDocumentPosition(document.createElement("fieldset"))&1;});// Support: IE<8 12424// Prevent attribute/property "interpolation" 12425// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx 12426if(!assert(function(el){el.innerHTML="<a href='#'></a>";return el.firstChild.getAttribute("href")==="#";})){addHandle("type|href|height|width",function(elem,name,isXML){if(!isXML){return elem.getAttribute(name,name.toLowerCase()==="type"?1:2);}});}// Support: IE<9 12427// Use defaultValue in place of getAttribute("value") 12428if(!support.attributes||!assert(function(el){el.innerHTML="<input/>";el.firstChild.setAttribute("value","");return el.firstChild.getAttribute("value")==="";})){addHandle("value",function(elem,name,isXML){if(!isXML&&elem.nodeName.toLowerCase()==="input"){return elem.defaultValue;}});}// Support: IE<9 12429// Use getAttributeNode to fetch booleans when getAttribute lies 12430if(!assert(function(el){return el.getAttribute("disabled")==null;})){addHandle(booleans,function(elem,name,isXML){var val;if(!isXML){return elem[name]===true?name.toLowerCase():(val=elem.getAttributeNode(name))&&val.specified?val.value:null;}});}return Sizzle;}(window);jQuery.find=Sizzle;jQuery.expr=Sizzle.selectors;// Deprecated 12431jQuery.expr[":"]=jQuery.expr.pseudos;jQuery.uniqueSort=jQuery.unique=Sizzle.uniqueSort;jQuery.text=Sizzle.getText;jQuery.isXMLDoc=Sizzle.isXML;jQuery.contains=Sizzle.contains;jQuery.escapeSelector=Sizzle.escape;var dir=function dir(elem,_dir,until){var matched=[],truncate=until!==undefined;while((elem=elem[_dir])&&elem.nodeType!==9){if(elem.nodeType===1){if(truncate&&jQuery(elem).is(until)){break;}matched.push(elem);}}return matched;};var _siblings=function siblings(n,elem){var matched=[];for(;n;n=n.nextSibling){if(n.nodeType===1&&n!==elem){matched.push(n);}}return matched;};var rneedsContext=jQuery.expr.match.needsContext;function nodeName(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase();};var rsingleTag=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;// Implement the identical functionality for filter and not 12432function winnow(elements,qualifier,not){if(isFunction(qualifier)){return jQuery.grep(elements,function(elem,i){return!!qualifier.call(elem,i,elem)!==not;});}// Single element 12433if(qualifier.nodeType){return jQuery.grep(elements,function(elem){return elem===qualifier!==not;});}// Arraylike of elements (jQuery, arguments, Array) 12434if(typeof qualifier!=="string"){return jQuery.grep(elements,function(elem){return indexOf.call(qualifier,elem)>-1!==not;});}// Filtered directly for both simple and complex selectors 12435return jQuery.filter(qualifier,elements,not);}jQuery.filter=function(expr,elems,not){var elem=elems[0];if(not){expr=":not("+expr+")";}if(elems.length===1&&elem.nodeType===1){return jQuery.find.matchesSelector(elem,expr)?[elem]:[];}return jQuery.find.matches(expr,jQuery.grep(elems,function(elem){return elem.nodeType===1;}));};jQuery.fn.extend({find:function find(selector){var i,ret,len=this.length,self=this;if(typeof selector!=="string"){return this.pushStack(jQuery(selector).filter(function(){for(i=0;i<len;i++){if(jQuery.contains(self[i],this)){return true;}}}));}ret=this.pushStack([]);for(i=0;i<len;i++){jQuery.find(selector,self[i],ret);}return len>1?jQuery.uniqueSort(ret):ret;},filter:function filter(selector){return this.pushStack(winnow(this,selector||[],false));},not:function not(selector){return this.pushStack(winnow(this,selector||[],true));},is:function is(selector){return!!winnow(this,// If this is a positional/relative selector, check membership in the returned set 12436// so $("p:first").is("p:last") won't return true for a doc with two "p". 12437typeof selector==="string"&&rneedsContext.test(selector)?jQuery(selector):selector||[],false).length;}});// Initialize a jQuery object 12438// A central reference to the root jQuery(document) 12439var rootjQuery,// A simple way to check for HTML strings 12440// Prioritize #id over <tag> to avoid XSS via location.hash (#9521) 12441// Strict HTML recognition (#11290: must start with <) 12442// Shortcut simple #id case for speed 12443rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,init=jQuery.fn.init=function(selector,context,root){var match,elem;// HANDLE: $(""), $(null), $(undefined), $(false) 12444if(!selector){return this;}// Method init() accepts an alternate rootjQuery
vendor: 8,479 bytes, lines 12445-12524
12445// so migrate can support jQuery.sub (gh-2101) 12446root=root||rootjQuery;// Handle HTML strings 12447if(typeof selector==="string"){if(selector[0]==="<"&&selector[selector.length-1]===">"&&selector.length>=3){// Assume that strings that start and end with <> are HTML and skip the regex check 12448match=[null,selector,null];}else{match=rquickExpr.exec(selector);}// Match html or make sure no context is specified for #id 12449if(match&&(match[1]||!context)){// HANDLE: $(html) -> $(array) 12450if(match[1]){context=context instanceof jQuery?context[0]:context;// Option to run scripts is true for back-compat 12451// Intentionally let the error be thrown if parseHTML is not present 12452jQuery.merge(this,jQuery.parseHTML(match[1],context&&context.nodeType?context.ownerDocument||context:document,true));// HANDLE: $(html, props) 12453if(rsingleTag.test(match[1])&&jQuery.isPlainObject(context)){for(match in context){// Properties of context are called as methods if possible 12454if(isFunction(this[match])){this[match](context[match]);// ...and otherwise set as attributes 12455}else{this.attr(match,context[match]);}}}return this;// HANDLE: $(#id) 12456}else{elem=document.getElementById(match[2]);if(elem){// Inject the element directly into the jQuery object 12457this[0]=elem;this.length=1;}return this;}// HANDLE: $(expr, $(...)) 12458}else if(!context||context.jquery){return(context||root).find(selector);// HANDLE: $(expr, context) 12459// (which is just equivalent to: $(context).find(expr) 12460}else{return this.constructor(context).find(selector);}// HANDLE: $(DOMElement) 12461}else if(selector.nodeType){this[0]=selector;this.length=1;return this;// HANDLE: $(function) 12462// Shortcut for document ready 12463}else if(isFunction(selector)){return root.ready!==undefined?root.ready(selector):// Execute immediately if ready is not present 12464selector(jQuery);}return jQuery.makeArray(selector,this);};// Give the init function the jQuery prototype for later instantiation 12465init.prototype=jQuery.fn;// Initialize central reference 12466rootjQuery=jQuery(document);var rparentsprev=/^(?:parents|prev(?:Until|All))/,// Methods guaranteed to produce a unique set when starting from a unique set 12467guaranteedUnique={children:true,contents:true,next:true,prev:true};jQuery.fn.extend({has:function has(target){var targets=jQuery(target,this),l=targets.length;return this.filter(function(){var i=0;for(;i<l;i++){if(jQuery.contains(this,targets[i])){return true;}}});},closest:function closest(selectors,context){var cur,i=0,l=this.length,matched=[],targets=typeof selectors!=="string"&&jQuery(selectors);// Positional selectors never match, since there's no _selection_ context 12468if(!rneedsContext.test(selectors)){for(;i<l;i++){for(cur=this[i];cur&&cur!==context;cur=cur.parentNode){// Always skip document fragments 12469if(cur.nodeType<11&&(targets?targets.index(cur)>-1:// Don't pass non-elements to Sizzle 12470cur.nodeType===1&&jQuery.find.matchesSelector(cur,selectors))){matched.push(cur);break;}}}}return this.pushStack(matched.length>1?jQuery.uniqueSort(matched):matched);},// Determine the position of an element within the set 12471index:function index(elem){// No argument, return index in parent 12472if(!elem){return this[0]&&this[0].parentNode?this.first().prevAll().length:-1;}// Index in selector 12473if(typeof elem==="string"){return indexOf.call(jQuery(elem),this[0]);}// Locate the position of the desired element 12474return indexOf.call(this,// If it receives a jQuery object, the first element is used 12475elem.jquery?elem[0]:elem);},add:function add(selector,context){return this.pushStack(jQuery.uniqueSort(jQuery.merge(this.get(),jQuery(selector,context))));},addBack:function addBack(selector){return this.add(selector==null?this.prevObject:this.prevObject.filter(selector));}});function sibling(cur,dir){while((cur=cur[dir])&&cur.nodeType!==1){}return cur;}jQuery.each({parent:function parent(elem){var parent=elem.parentNode;return parent&&parent.nodeType!==11?parent:null;},parents:function parents(elem){return dir(elem,"parentNode");},parentsUntil:function parentsUntil(elem,i,until){return dir(elem,"parentNode",until);},next:function next(elem){return sibling(elem,"nextSibling");},prev:function prev(elem){return sibling(elem,"previousSibling");},nextAll:function nextAll(elem){return dir(elem,"nextSibling");},prevAll:function prevAll(elem){return dir(elem,"previousSibling");},nextUntil:function nextUntil(elem,i,until){return dir(elem,"nextSibling",until);},prevUntil:function prevUntil(elem,i,until){return dir(elem,"previousSibling",until);},siblings:function siblings(elem){return _siblings((elem.parentNode||{}).firstChild,elem);},children:function children(elem){return _siblings(elem.firstChild);},contents:function contents(elem){if(nodeName(elem,"iframe")){return elem.contentDocument;}// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only 12476// Treat the template element as a regular one in browsers that 12477// don't support it. 12478if(nodeName(elem,"template")){elem=elem.content||elem;}return jQuery.merge([],elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(until,selector){var matched=jQuery.map(this,fn,until);if(name.slice(-5)!=="Until"){selector=until;}if(selector&&typeof selector==="string"){matched=jQuery.filter(selector,matched);}if(this.length>1){// Remove duplicates 12479if(!guaranteedUnique[name]){jQuery.uniqueSort(matched);}// Reverse order for parents* and prev-derivatives 12480if(rparentsprev.test(name)){matched.reverse();}}return this.pushStack(matched);};});var rnothtmlwhite=/[^\x20\t\r\n\f]+/g;// Convert String-formatted options into Object-formatted ones 12481function createOptions(options){var object={};jQuery.each(options.match(rnothtmlwhite)||[],function(_,flag){object[flag]=true;});return object;}/* 12482 * Create a callback list using the following parameters: 12483 * 12484 * options: an optional list of space-separated options that will change how 12485 * the callback list behaves or a more traditional option object 12486 * 12487 * By default a callback list will act like an event callback list and can be 12488 * "fired" multiple times. 12489 * 12490 * Possible options: 12491 * 12492 * once: will ensure the callback list can only be fired once (like a Deferred) 12493 * 12494 * memory: will keep track of previous values and will call any callback added 12495 * after the list has been fired right away with the latest "memorized" 12496 * values (like a Deferred) 12497 * 12498 * unique: will ensure a callback can only be added once (no duplicate in the list) 12499 * 12500 * stopOnFalse: interrupt callings when a callback returns false 12501 * 12502 */jQuery.Callbacks=function(options){// Convert options from String-formatted to Object-formatted if needed 12503// (we check in cache first) 12504options=typeof options==="string"?createOptions(options):jQuery.extend({},options);var// Flag to know if list is currently firing 12505firing,// Last fire value for non-forgettable lists 12506memory,// Flag to know if list was already fired 12507_fired,// Flag to prevent firing 12508_locked,// Actual callback list 12509list=[],// Queue of execution data for repeatable lists 12510queue=[],// Index of currently firing callback (modified by add/remove as needed) 12511firingIndex=-1,// Fire callbacks 12512fire=function fire(){// Enforce single-firing 12513_locked=_locked||options.once;// Execute callbacks for all pending executions, 12514// respecting firingIndex overrides and runtime changes 12515_fired=firing=true;for(;queue.length;firingIndex=-1){memory=queue.shift();while(++firingIndex<list.length){// Run callback and check for early termination 12516if(list[firingIndex].apply(memory[0],memory[1])===false&&options.stopOnFalse){// Jump to end and forget the data so .add doesn't re-fire 12517firingIndex=list.length;memory=false;}}}// Forget the data if we're done with it 12518if(!options.memory){memory=false;}firing=false;// Clean up if we're done firing for good 12519if(_locked){// Keep an empty list if we have data for future add calls 12520if(memory){list=[];// Otherwise, this object is spent 12521}else{list="";}}},// Actual Callbacks object 12522self={// Add a callback or a collection of callbacks to the list 12523add:function add(){if(list){// If we have memory from a past run, we should fire after adding 12524if(memory&&!firing){firingIndex=list.length-1;queue.push(memory);}(function add(args){jQuery.each(args,function(_,arg){if(isFunction(arg)){if(!options.unique||!self.has(arg)){list.push(arg);}}
12524else if(arg&&arg.length&&toType(arg)!=="string"){// Inspect recursively 12525add(arg);}});})(arguments);if(memory&&!firing){fire();}}return this;},// Remove a callback from the list 12526remove:function remove(){jQuery.each(arguments,function(_,arg){var index;while((index=jQuery.inArray(arg,list,index))>-1){list.splice(index,1);// Handle firing indexes 12527if(index<=firingIndex){firingIndex--;}}});return this;},// Check if a given callback is in the list. 12528// If no argument is given, return whether or not list has callbacks attached. 12529has:function has(fn){return fn?jQuery.inArray(fn,list)>-1:list.length>0;},// Remove all callbacks from the list 12530empty:function empty(){if(list){list=[];}return this;},// Disable .fire and .add 12531// Abort any current/pending executions 12532// Clear all callbacks and values 12533disable:function disable(){_locked=queue=[];list=memory="";return this;},disabled:function disabled(){return!list;},// Disable .fire 12534// Also disable .add unless we have memory (since it would have no effect) 12535// Abort any pending executions 12536lock:function lock(){_locked=queue=[];if(!memory&&!firing){list=memory="";}return this;},locked:function locked(){return!!_locked;},// Call all callbacks with the given context and arguments 12537fireWith:function fireWith(context,args){if(!_locked){args=args||[];args=[context,args.slice?args.slice():args];queue.push(args);if(!firing){fire();}}return this;},// Call all the callbacks with the given arguments 12538fire:function fire(){self.fireWith(this,arguments);return this;},// To know if the callbacks have already been called at least once 12539fired:function fired(){return!!_fired;}};return self;};function Identity(v){return v;}function Thrower(ex){throw ex;}function adoptValue(value,resolve,reject,noValue){var method;try{// Check for promise aspect first to privilege synchronous behavior 12540if(value&&isFunction(method=value.promise)){method.call(value).done(resolve).fail(reject);// Other thenables 12541}else if(value&&isFunction(method=value.then)){method.call(value,resolve,reject);// Other non-thenables 12542}else{// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: 12543// * false: [ value ].slice( 0 ) => resolve( value ) 12544// * true: [ value ].slice( 1 ) => resolve() 12545resolve.apply(undefined,[value].slice(noValue));}// For Promises/A+, convert exceptions into rejections 12546// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in 12547// Deferred#then to conditionally suppress rejection. 12548}catch(value){// Support: Android 4.0 only 12549// Strict mode functions invoked without .call/.apply get global-object context 12550reject.apply(undefined,[value]);}}jQuery.extend({Deferred:function Deferred(func){var tuples=[// action, add listener, callbacks, 12551// ... .then handlers, argument index, [final state] 12552["notify","progress",jQuery.Callbacks("memory"),jQuery.Callbacks("memory"),2],["resolve","done",jQuery.Callbacks("once memory"),jQuery.Callbacks("once memory"),0,"resolved"],["reject","fail",jQuery.Callbacks("once memory"),jQuery.Callbacks("once memory"),1,"rejected"]],_state="pending",_promise={state:function state(){return _state;},always:function always(){deferred.done(arguments).fail(arguments);return this;},"catch":function _catch(fn){return _promise.then(null,fn);},// Keep pipe for back-compat 12553pipe:function/* fnDone, fnFail, fnProgress */pipe(){var fns=arguments;return jQuery.Deferred(function(newDefer){jQuery.each(tuples,function(i,tuple){// Map tuples (progress, done, fail) to arguments (done, fail, progress) 12554var fn=isFunction(fns[tuple[4]])&&fns[tuple[4]];// deferred.progress(function() { bind to newDefer or newDefer.notify }) 12555// deferred.done(function() { bind to newDefer or newDefer.resolve }) 12556// deferred.fail(function() { bind to newDefer or newDefer.reject }) 12557deferred[tuple[1]](function(){var returned=fn&&fn.apply(this,arguments);if(returned&&isFunction(returned.promise)){returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject);}else{newDefer[tuple[0]+"With"](this,fn?[returned]:arguments);}});});fns=null;}).promise();},then:function then(onFulfilled,onRejected,onProgress){var maxDepth=0;function resolve(depth,deferred,handler,special){return function(){var that=this,args=arguments,mightThrow=function mightThrow(){var returned,then;// Support: Promises/A+ section 2.3.3.3.3 12558// https://promisesaplus.com/#point-59 12559// Ignore double-resolution attempts 12560if(depth<maxDepth){return;}returned=handler.apply(that,args);// Support: Promises/A+ section 2.3.1 12561// https://promisesaplus.com/#point-48 12562if(returned===deferred.promise()){throw new TypeError("Thenable self
vendor: 4,479 bytes, lines 12562-12626
12562-resolution");}// Support: Promises/A+ sections 2.3.3.1, 3.5 12563// https://promisesaplus.com/#point-54 12564// https://promisesaplus.com/#point-75 12565// Retrieve `then` only once 12566then=returned&&(// Support: Promises/A+ section 2.3.4 12567// https://promisesaplus.com/#point-64 12568// Only check objects and functions for thenability 12569_typeof(returned)==="object"||typeof returned==="function")&&returned.then;// Handle a returned thenable 12570if(isFunction(then)){// Special processors (notify) just wait for resolution 12571if(special){then.call(returned,resolve(maxDepth,deferred,Identity,special),resolve(maxDepth,deferred,Thrower,special));// Normal processors (resolve) also hook into progress 12572}else{// ...and disregard older resolution values 12573maxDepth++;then.call(returned,resolve(maxDepth,deferred,Identity,special),resolve(maxDepth,deferred,Thrower,special),resolve(maxDepth,deferred,Identity,deferred.notifyWith));}// Handle all other returned values 12574}else{// Only substitute handlers pass on context 12575// and multiple values (non-spec behavior) 12576if(handler!==Identity){that=undefined;args=[returned];}// Process the value(s) 12577// Default process is resolve 12578(special||deferred.resolveWith)(that,args);}},// Only normal processors (resolve) catch and reject exceptions 12579process=special?mightThrow:function(){try{mightThrow();}catch(e){if(jQuery.Deferred.exceptionHook){jQuery.Deferred.exceptionHook(e,process.stackTrace);}// Support: Promises/A+ section 2.3.3.3.4.1 12580// https://promisesaplus.com/#point-61 12581// Ignore post-resolution exceptions 12582if(depth+1>=maxDepth){// Only substitute handlers pass on context 12583// and multiple values (non-spec behavior) 12584if(handler!==Thrower){that=undefined;args=[e];}deferred.rejectWith(that,args);}}};// Support: Promises/A+ section 2.3.3.3.1 12585// https://promisesaplus.com/#point-57 12586// Re-resolve promises immediately to dodge false rejection from 12587// subsequent errors 12588if(depth){process();}else{// Call an optional hook to record the stack, in case of exception 12589// since it's otherwise lost when execution goes async 12590if(jQuery.Deferred.getStackHook){process.stackTrace=jQuery.Deferred.getStackHook();}window.setTimeout(process);}};}return jQuery.Deferred(function(newDefer){// progress_handlers.add( ... ) 12591tuples[0][3].add(resolve(0,newDefer,isFunction(onProgress)?onProgress:Identity,newDefer.notifyWith));// fulfilled_handlers.add( ... ) 12592tuples[1][3].add(resolve(0,newDefer,isFunction(onFulfilled)?onFulfilled:Identity));// rejected_handlers.add( ... ) 12593tuples[2][3].add(resolve(0,newDefer,isFunction(onRejected)?onRejected:Thrower));}).promise();},// Get a promise for this deferred 12594// If obj is provided, the promise aspect is added to the object 12595promise:function promise(obj){return obj!=null?jQuery.extend(obj,_promise):_promise;}},deferred={};// Add list-specific methods 12596jQuery.each(tuples,function(i,tuple){var list=tuple[2],stateString=tuple[5];// promise.progress = list.add 12597// promise.done = list.add 12598// promise.fail = list.add 12599_promise[tuple[1]]=list.add;// Handle state 12600if(stateString){list.add(function(){// state = "resolved" (i.e., fulfilled) 12601// state = "rejected" 12602_state=stateString;},// rejected_callbacks.disable 12603// fulfilled_callbacks.disable 12604tuples[3-i][2].disable,// rejected_handlers.disable 12605// fulfilled_handlers.disable 12606tuples[3-i][3].disable,// progress_callbacks.lock 12607tuples[0][2].lock,// progress_handlers.lock 12608tuples[0][3].lock);}// progress_handlers.fire 12609// fulfilled_handlers.fire 12610// rejected_handlers.fire 12611list.add(tuple[3].fire);// deferred.notify = function() { deferred.notifyWith(...) } 12612// deferred.resolve = function() { deferred.resolveWith(...) } 12613// deferred.reject = function() { deferred.rejectWith(...) } 12614deferred[tuple[0]]=function(){deferred[tuple[0]+"With"](this===deferred?undefined:this,arguments);return this;};// deferred.notifyWith = list.fireWith 12615// deferred.resolveWith = list.fireWith 12616// deferred.rejectWith = list.fireWith 12617deferred[tuple[0]+"With"]=list.fireWith;});// Make the deferred a promise 12618_promise.promise(deferred);// Call given func if any 12619if(func){func.call(deferred,deferred);}// All done! 12620return deferred;},// Deferred helper 12621when:function when(singleValue){var// count of uncompleted subordinates 12622remaining=arguments.length,// count of unprocessed arguments 12623i=remaining,// subordinate fulfillment data 12624resolveContexts=Array(i),resolveValues=_slice.call(arguments),// the master Deferred 12625master=jQuery.Deferred(),// subordinate callback factory 12626updateFunc=function updateFunc(i){return function(value){resolve
vendor: 10,103 bytes, lines 12626-12733
12626Contexts[i]=this;resolveValues[i]=arguments.length>1?_slice.call(arguments):value;if(! --remaining){master.resolveWith(resolveContexts,resolveValues);}};};// Single- and empty arguments are adopted like Promise.resolve 12627if(remaining<=1){adoptValue(singleValue,master.done(updateFunc(i)).resolve,master.reject,!remaining);// Use .then() to unwrap secondary thenables (cf. gh-3000) 12628if(master.state()==="pending"||isFunction(resolveValues[i]&&resolveValues[i].then)){return master.then();}}// Multiple arguments are aggregated like Promise.all array elements 12629while(i--){adoptValue(resolveValues[i],updateFunc(i),master.reject);}return master.promise();}});// These usually indicate a programmer mistake during development, 12630// warn about them ASAP rather than swallowing them by default. 12631var rerrorNames=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;jQuery.Deferred.exceptionHook=function(error,stack){// Support: IE 8 - 9 only 12632// Console exists when dev tools are open, which can happen at any time 12633if(window.console&&window.console.warn&&error&&rerrorNames.test(error.name)){window.console.warn("jQuery.Deferred exception: "+error.message,error.stack,stack);}};jQuery.readyException=function(error){window.setTimeout(function(){throw error;});};// The deferred used on DOM ready 12634var readyList=jQuery.Deferred();jQuery.fn.ready=function(fn){readyList.then(fn)// Wrap jQuery.readyException in a function so that the lookup 12635// happens at the time of error handling instead of callback 12636// registration. 12637.catch(function(error){jQuery.readyException(error);});return this;};jQuery.extend({// Is the DOM ready to be used? Set to true once it occurs. 12638isReady:false,// A counter to track how many items to wait for before 12639// the ready event fires. See #6781 12640readyWait:1,// Handle when the DOM is ready 12641ready:function ready(wait){// Abort if there are pending holds or we're already ready 12642if(wait===true?--jQuery.readyWait:jQuery.isReady){return;}// Remember that the DOM is ready 12643jQuery.isReady=true;// If a normal DOM Ready event fired, decrement, and wait if need be 12644if(wait!==true&&--jQuery.readyWait>0){return;}// If there are functions bound, to execute 12645readyList.resolveWith(document,[jQuery]);}});jQuery.ready.then=readyList.then;// The ready event handler and self cleanup method 12646function completed(){document.removeEventListener("DOMContentLoaded",completed);window.removeEventListener("load",completed);jQuery.ready();}// Catch cases where $(document).ready() is called 12647// after the browser event has already occurred. 12648// Support: IE <=9 - 10 only 12649// Older IE sometimes signals "interactive" too soon 12650if(document.readyState==="complete"||document.readyState!=="loading"&&!document.documentElement.doScroll){// Handle it asynchronously to allow scripts the opportunity to delay ready 12651window.setTimeout(jQuery.ready);}else{// Use the handy event callback 12652document.addEventListener("DOMContentLoaded",completed);// A fallback to window.onload, that will always work 12653window.addEventListener("load",completed);}// Multifunctional method to get and set values of a collection 12654// The value/s can optionally be executed if it's a function 12655var access=function access(elems,fn,key,value,chainable,emptyGet,raw){var i=0,len=elems.length,bulk=key==null;// Sets many values 12656if(toType(key)==="object"){chainable=true;for(i in key){access(elems,fn,i,key[i],true,emptyGet,raw);}// Sets one value 12657}else if(value!==undefined){chainable=true;if(!isFunction(value)){raw=true;}if(bulk){// Bulk operations run against the entire set 12658if(raw){fn.call(elems,value);fn=null;// ...except when executing function values 12659}else{bulk=fn;fn=function fn(elem,key,value){return bulk.call(jQuery(elem),value);};}}if(fn){for(;i<len;i++){fn(elems[i],key,raw?value:value.call(elems[i],i,fn(elems[i],key)));}}}if(chainable){return elems;}// Gets 12660if(bulk){return fn.call(elems);}return len?fn(elems[0],key):emptyGet;};// Matches dashed string for camelizing 12661var rmsPrefix=/^-ms-/,rdashAlpha=/-([a-z])/g;// Used by camelCase as callback to replace() 12662function fcamelCase(all,letter){return letter.toUpperCase();}// Convert dashed to camelCase; used by the css and data modules 12663// Support: IE <=9 - 11, Edge 12 - 15 12664// Microsoft forgot to hump their vendor prefix (#9572) 12665function camelCase(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase);}var acceptData=function acceptData(owner){// Accepts only: 12666// - Node 12667// - Node.ELEMENT_NODE 12668// - Node.DOCUMENT_NODE 12669// - Object 12670// - Any 12671return owner.nodeType===1||owner.nodeType===9||!+owner.nodeType;};function Data(){this.expando=jQuery.expando+Data.uid++;}Data.uid=1;Data.prototype={cache:function cache(owner){// Check if the owner object already has a cache 12672var value=owner[this.expando];// If not, create one 12673if(!value){value={};// We can accept data for non-element nodes in modern browsers, 12674// but we should not, see #8335. 12675// Always return an empty object. 12676if(acceptData(owner)){// If it is a node unlikely to be stringify-ed or looped over 12677// use plain assignment 12678if(owner.nodeType){owner[this.expando]=value;// Otherwise secure it in a non-enumerable property 12679// configurable must be true to allow the property to be 12680// deleted when data is removed 12681}else{Object.defineProperty(owner,this.expando,{value:value,configurable:true});}}}return value;},set:function set(owner,data,value){var prop,cache=this.cache(owner);// Handle: [ owner, key, value ] args 12682// Always use camelCase key (gh-2257) 12683if(typeof data==="string"){cache[camelCase(data)]=value;// Handle: [ owner, { properties } ] args 12684}else{// Copy the properties one-by-one to the cache object 12685for(prop in data){cache[camelCase(prop)]=data[prop];}}return cache;},get:function get(owner,key){return key===undefined?this.cache(owner):// Always use camelCase key (gh-2257) 12686owner[this.expando]&&owner[this.expando][camelCase(key)];},access:function access(owner,key,value){// In cases where either: 12687// 12688// 1. No key was specified 12689// 2. A string key was specified, but no value provided 12690// 12691// Take the "read" path and allow the get method to determine 12692// which value to return, respectively either: 12693// 12694// 1. The entire cache object 12695// 2. The data stored at the key 12696// 12697if(key===undefined||key&&typeof key==="string"&&value===undefined){return this.get(owner,key);}// When the key is not a string, or both a key and value 12698// are specified, set or extend (existing objects) with either: 12699// 12700// 1. An object of properties 12701// 2. A key and value 12702// 12703this.set(owner,key,value);// Since the "set" path can have two possible entry points 12704// return the expected data based on which path was taken[*] 12705return value!==undefined?value:key;},remove:function remove(owner,key){var i,cache=owner[this.expando];if(cache===undefined){return;}if(key!==undefined){// Support array or space separated string of keys 12706if(Array.isArray(key)){// If key is an array of keys... 12707// We always set camelCase keys, so remove that. 12708key=key.map(camelCase);}else{key=camelCase(key);// If a key with the spaces exists, use it. 12709// Otherwise, create an array by matching non-whitespace 12710key=key in cache?[key]:key.match(rnothtmlwhite)||[];}i=key.length;while(i--){delete cache[key[i]];}}// Remove the expando if there's no more data 12711if(key===undefined||jQuery.isEmptyObject(cache)){// Support: Chrome <=35 - 45 12712// Webkit & Blink performance suffers when deleting properties 12713// from DOM nodes, so set to undefined instead 12714// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) 12715if(owner.nodeType){owner[this.expando]=undefined;}else{delete owner[this.expando];}}},hasData:function hasData(owner){var cache=owner[this.expando];return cache!==undefined&&!jQuery.isEmptyObject(cache);}};var dataPriv=new Data();var dataUser=new Data();// Implementation Summary 12716// 12717// 1. Enforce API surface and semantic compatibility with 1.9.x branch 12718// 2. Improve the module's maintainability by reducing the storage 12719// paths to a single mechanism. 12720// 3. Use the same single mechanism to support "private" and "user" data. 12721// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) 12722// 5. Avoid exposing implementation details on user objects (eg. expando properties) 12723// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 12724var rbrace=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,rmultiDash=/[A-Z]/g;function getData(data){if(data==="true"){return true;}if(data==="false"){return false;}if(data==="null"){return null;}// Only convert to a number if it doesn't change the string 12725if(data===+data+""){return+data;}if(rbrace.test(data)){return JSON.parse(data);}return data;}function dataAttr(elem,key,data){var name;// If nothing was found internally, try to fetch any 12726// data from the HTML5 data-* attribute 12727if(data===undefined&&elem.nodeType===1){name="data-"+key.replace(rmultiDash,"-$&").toLowerCase();data=elem.getAttribute(name);if(typeof data==="string"){try{data=getData(data);}catch(e){}// Make sure we set the data so it isn't changed later 12728dataUser.set(elem,key,data);}else{data=undefined;}}return data;}jQuery.extend({hasData:function hasData(elem){return dataUser.hasData(elem)||dataPriv.hasData(elem);},data:function data(elem,name,_data){return dataUser.access(elem,name,_data);},removeData:function removeData(elem,name){dataUser.remove(elem,name);},// TODO: Now that all calls to _data and _removeData have been replaced 12729// with direct calls to dataPriv methods, these can be deprecated. 12730_data:function _data(elem,name,data){return dataPriv.access(elem,name,data);},_removeData:function _removeData(elem,name){dataPriv.remove(elem,name);}});jQuery.fn.extend({data:function data(key,value){var i,name,data,elem=this[0],attrs=elem&&elem.attributes;// Gets all values 12731if(key===undefined){if(this.length){data=dataUser.get(elem);if(elem.nodeType===1&&!dataPriv.get(elem,"hasDataAttrs")){i=attrs.length;while(i--){// Support: IE 11 only 12732// The attrs elements can be null (#14894) 12733if(attrs[i]){name=attrs[i].name;if(name.indexOf("data-")===0){name=camelCase(name.slice(5));dataAttr(elem,name,data[name]);}}}dataPriv.set(elem,"hasDataAttrs",true);}}return data;}// Sets multiple values
vendor: 3,847 bytes, lines 12734-12758
12734if(_typeof(key)==="object"){return this.each(function(){dataUser.set(this,key);});}return access(this,function(value){var data;// The calling jQuery object (element matches) is not empty 12735// (and therefore has an element appears at this[ 0 ]) and the 12736// `value` parameter was not undefined. An empty jQuery object 12737// will result in `undefined` for elem = this[ 0 ] which will 12738// throw an exception if an attempt to read a data cache is made. 12739if(elem&&value===undefined){// Attempt to get data from the cache 12740// The key will always be camelCased in Data 12741data=dataUser.get(elem,key);if(data!==undefined){return data;}// Attempt to "discover" the data in 12742// HTML5 custom data-* attrs 12743data=dataAttr(elem,key);if(data!==undefined){return data;}// We tried really hard, but the data doesn't exist. 12744return;}// Set the data... 12745this.each(function(){// We always store the camelCased key 12746dataUser.set(this,key,value);});},null,value,arguments.length>1,null,true);},removeData:function removeData(key){return this.each(function(){dataUser.remove(this,key);});}});jQuery.extend({queue:function queue(elem,type,data){var queue;if(elem){type=(type||"fx")+"queue";queue=dataPriv.get(elem,type);// Speed up dequeue by getting out quickly if this is just a lookup 12747if(data){if(!queue||Array.isArray(data)){queue=dataPriv.access(elem,type,jQuery.makeArray(data));}else{queue.push(data);}}return queue||[];}},dequeue:function dequeue(elem,type){type=type||"fx";var queue=jQuery.queue(elem,type),startLength=queue.length,fn=queue.shift(),hooks=jQuery._queueHooks(elem,type),next=function next(){jQuery.dequeue(elem,type);};// If the fx queue is dequeued, always remove the progress sentinel 12748if(fn==="inprogress"){fn=queue.shift();startLength--;}if(fn){// Add a progress sentinel to prevent the fx queue from being 12749// automatically dequeued 12750if(type==="fx"){queue.unshift("inprogress");}// Clear up the last queue stop function 12751delete hooks.stop;fn.call(elem,next,hooks);}if(!startLength&&hooks){hooks.empty.fire();}},// Not public - generate a queueHooks object, or return the current one 12752_queueHooks:function _queueHooks(elem,type){var key=type+"queueHooks";return dataPriv.get(elem,key)||dataPriv.access(elem,key,{empty:jQuery.Callbacks("once memory").add(function(){dataPriv.remove(elem,[type+"queue",key]);})});}});jQuery.fn.extend({queue:function queue(type,data){var setter=2;if(typeof type!=="string"){data=type;type="fx";setter--;}if(arguments.length<setter){return jQuery.queue(this[0],type);}return data===undefined?this:this.each(function(){var queue=jQuery.queue(this,type,data);// Ensure a hooks for this queue 12753jQuery._queueHooks(this,type);if(type==="fx"&&queue[0]!=="inprogress"){jQuery.dequeue(this,type);}});},dequeue:function dequeue(type){return this.each(function(){jQuery.dequeue(this,type);});},clearQueue:function clearQueue(type){return this.queue(type||"fx",[]);},// Get a promise resolved when queues of a certain type 12754// are emptied (fx is the type by default) 12755promise:function promise(type,obj){var tmp,count=1,defer=jQuery.Deferred(),elements=this,i=this.length,resolve=function resolve(){if(! --count){defer.resolveWith(elements,[elements]);}};if(typeof type!=="string"){obj=type;type=undefined;}type=type||"fx";while(i--){tmp=dataPriv.get(elements[i],type+"queueHooks");if(tmp&&tmp.empty){count++;tmp.empty.add(resolve);}}resolve();return defer.promise(obj);}});var pnum=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source;var rcssNum=new RegExp("^(?:([+-])=|)("+pnum+")([a-z%]*)$","i");var cssExpand=["Top","Right","Bottom","Left"];var isHiddenWithinTree=function isHiddenWithinTree(elem,el){// isHiddenWithinTree might be called from jQuery#filter function; 12756// in that case, element will be second argument 12757elem=el||elem;// Inline style trumps all 12758return elem.style.display==="none"||elem.style.display===""&&// Otherwise, check computed style
vendor: 6,275 bytes, lines 12759-12796
12759// Support: Firefox <=43 - 45 12760// Disconnected elements can have computed display: none, so first confirm that elem is 12761// in the document. 12762jQuery.contains(elem.ownerDocument,elem)&&jQuery.css(elem,"display")==="none";};var swap=function swap(elem,options,callback,args){var ret,name,old={};// Remember the old values, and insert the new ones 12763for(name in options){old[name]=elem.style[name];elem.style[name]=options[name];}ret=callback.apply(elem,args||[]);// Revert the old values 12764for(name in options){elem.style[name]=old[name];}return ret;};function adjustCSS(elem,prop,valueParts,tween){var adjusted,scale,maxIterations=20,currentValue=tween?function(){return tween.cur();}:function(){return jQuery.css(elem,prop,"");},initial=currentValue(),unit=valueParts&&valueParts[3]||(jQuery.cssNumber[prop]?"":"px"),// Starting value computation is required for potential unit mismatches 12765initialInUnit=(jQuery.cssNumber[prop]||unit!=="px"&&+initial)&&rcssNum.exec(jQuery.css(elem,prop));if(initialInUnit&&initialInUnit[3]!==unit){// Support: Firefox <=54 12766// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) 12767initial=initial/2;// Trust units reported by jQuery.css 12768unit=unit||initialInUnit[3];// Iteratively approximate from a nonzero starting point 12769initialInUnit=+initial||1;while(maxIterations--){// Evaluate and update our best guess (doubling guesses that zero out). 12770// Finish if the scale equals or crosses 1 (making the old*new product non-positive). 12771jQuery.style(elem,prop,initialInUnit+unit);if((1-scale)*(1-(scale=currentValue()/initial||0.5))<=0){maxIterations=0;}initialInUnit=initialInUnit/scale;}initialInUnit=initialInUnit*2;jQuery.style(elem,prop,initialInUnit+unit);// Make sure we update the tween properties later on 12772valueParts=valueParts||[];}if(valueParts){initialInUnit=+initialInUnit||+initial||0;// Apply relative offset (+=/-=) if specified 12773adjusted=valueParts[1]?initialInUnit+(valueParts[1]+1)*valueParts[2]:+valueParts[2];if(tween){tween.unit=unit;tween.start=initialInUnit;tween.end=adjusted;}}return adjusted;}var defaultDisplayMap={};function getDefaultDisplay(elem){var temp,doc=elem.ownerDocument,nodeName=elem.nodeName,display=defaultDisplayMap[nodeName];if(display){return display;}temp=doc.body.appendChild(doc.createElement(nodeName));display=jQuery.css(temp,"display");temp.parentNode.removeChild(temp);if(display==="none"){display="block";}defaultDisplayMap[nodeName]=display;return display;}function showHide(elements,show){var display,elem,values=[],index=0,length=elements.length;// Determine new display value for elements that need to change 12774for(;index<length;index++){elem=elements[index];if(!elem.style){continue;}display=elem.style.display;if(show){// Since we force visibility upon cascade-hidden elements, an immediate (and slow) 12775// check is required in this first loop unless we have a nonempty display value (either 12776// inline or about-to-be-restored) 12777if(display==="none"){values[index]=dataPriv.get(elem,"display")||null;if(!values[index]){elem.style.display="";}}if(elem.style.display===""&&isHiddenWithinTree(elem)){values[index]=getDefaultDisplay(elem);}}else{if(display!=="none"){values[index]="none";// Remember what we're overwriting 12778dataPriv.set(elem,"display",display);}}}// Set the display of the elements in a second loop to avoid constant reflow 12779for(index=0;index<length;index++){if(values[index]!=null){elements[index].style.display=values[index];}}return elements;}jQuery.fn.extend({show:function show(){return showHide(this,true);},hide:function hide(){return showHide(this);},toggle:function toggle(state){if(typeof state==="boolean"){return state?this.show():this.hide();}return this.each(function(){if(isHiddenWithinTree(this)){jQuery(this).show();}else{jQuery(this).hide();}});}});var rcheckableType=/^(?:checkbox|radio)$/i;var rtagName=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i;var rscriptType=/^$|^module$|\/(?:java|ecma)script/i;// We have to close these tags to support XHTML (#13200) 12780var wrapMap={// Support: IE <=9 only 12781option:[1,"<select multiple='multiple'>","</select>"],// XHTML parsers do not magically insert elements in the 12782// same way that tag soup parsers do. So we cannot shorten 12783// this by omitting <tbody> or other required elements. 12784thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};// Support: IE <=9 only 12785wrapMap.optgroup=wrapMap.option;wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;function getAll(context,tag){// Support: IE <=9 - 11 only 12786// Use typeof to avoid zero-argument method invocation on host objects (#15151) 12787var ret;if(typeof context.getElementsByTagName!=="undefined"){ret=context.getElementsByTagName(tag||"*");}else if(typeof context.querySelectorAll!=="undefined"){ret=context.querySelectorAll(tag||"*");}else{ret=[];}if(tag===undefined||tag&&nodeName(context,tag)){return jQuery.merge([context],ret);}return ret;}// Mark scripts as having already been evaluated 12788function setGlobalEval(elems,refElements){var i=0,l=elems.length;for(;i<l;i++){dataPriv.set(elems[i],"globalEval",!refElements||dataPriv.get(refElements[i],"globalEval"));}}var rhtml=/<|&#?\w+;/;function buildFragment(elems,context,scripts,selection,ignored){var elem,tmp,tag,wrap,contains,j,fragment=context.createDocumentFragment(),nodes=[],i=0,l=elems.length;for(;i<l;i++){elem=elems[i];if(elem||elem===0){// Add nodes directly 12789if(toType(elem)==="object"){// Support: Android <=4.0 only, PhantomJS 1 only 12790// push.apply(_, arraylike) throws on ancient WebKit 12791jQuery.merge(nodes,elem.nodeType?[elem]:elem);// Convert non-html into a text node 12792}else if(!rhtml.test(elem)){nodes.push(context.createTextNode(elem));// Convert html into DOM nodes 12793}else{tmp=tmp||fragment.appendChild(context.createElement("div"));// Deserialize a standard representation 12794tag=(rtagName.exec(elem)||["",""])[1].toLowerCase();wrap=wrapMap[tag]||wrapMap._default;tmp.innerHTML=wrap[1]+jQuery.htmlPrefilter(elem)+wrap[2];// Descend through wrappers to the right content 12795j=wrap[0];while(j--){tmp=tmp.lastChild;}// Support: Android <=4.0 only, PhantomJS 1 only 12796// push.apply(_, arraylike) throws on ancient WebKit
vendor: 5,754 bytes, lines 12797-12841
12797jQuery.merge(nodes,tmp.childNodes);// Remember the top-level container 12798tmp=fragment.firstChild;// Ensure the created nodes are orphaned (#12392) 12799tmp.textContent="";}}}// Remove wrapper from fragment 12800fragment.textContent="";i=0;while(elem=nodes[i++]){// Skip elements already in the context collection (trac-4087) 12801if(selection&&jQuery.inArray(elem,selection)>-1){if(ignored){ignored.push(elem);}continue;}contains=jQuery.contains(elem.ownerDocument,elem);// Append to fragment 12802tmp=getAll(fragment.appendChild(elem),"script");// Preserve script evaluation history 12803if(contains){setGlobalEval(tmp);}// Capture executables 12804if(scripts){j=0;while(elem=tmp[j++]){if(rscriptType.test(elem.type||"")){scripts.push(elem);}}}}return fragment;}(function(){var fragment=document.createDocumentFragment(),div=fragment.appendChild(document.createElement("div")),input=document.createElement("input");// Support: Android 4.0 - 4.3 only 12805// Check state lost if the name is set (#11217) 12806// Support: Windows Web Apps (WWA) 12807// `name` and `type` must use .setAttribute for WWA (#14901) 12808input.setAttribute("type","radio");input.setAttribute("checked","checked");input.setAttribute("name","t");div.appendChild(input);// Support: Android <=4.1 only 12809// Older WebKit doesn't clone checked state correctly in fragments 12810support.checkClone=div.cloneNode(true).cloneNode(true).lastChild.checked;// Support: IE <=11 only 12811// Make sure textarea (and checkbox) defaultValue is properly cloned 12812div.innerHTML="<textarea>x</textarea>";support.noCloneChecked=!!div.cloneNode(true).lastChild.defaultValue;})();var documentElement=document.documentElement;var rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,rtypenamespace=/^([^.]*)(?:\.(.+)|)/;function returnTrue(){return true;}function returnFalse(){return false;}// Support: IE <=9 only 12813// See #13393 for more info 12814function safeActiveElement(){try{return document.activeElement;}catch(err){}}function _on(elem,types,selector,data,fn,one){var origFn,type;// Types can be a map of types/handlers 12815if(_typeof(types)==="object"){// ( types-Object, selector, data ) 12816if(typeof selector!=="string"){// ( types-Object, data ) 12817data=data||selector;selector=undefined;}for(type in types){_on(elem,type,selector,data,types[type],one);}return elem;}if(data==null&&fn==null){// ( types, fn ) 12818fn=selector;data=selector=undefined;}else if(fn==null){if(typeof selector==="string"){// ( types, selector, fn ) 12819fn=data;data=undefined;}else{// ( types, data, fn ) 12820fn=data;data=selector;selector=undefined;}}if(fn===false){fn=returnFalse;}else if(!fn){return elem;}if(one===1){origFn=fn;fn=function fn(event){// Can use an empty set, since event contains the info 12821jQuery().off(event);return origFn.apply(this,arguments);};// Use same guid so caller can remove using origFn 12822fn.guid=origFn.guid||(origFn.guid=jQuery.guid++);}return elem.each(function(){jQuery.event.add(this,types,fn,data,selector);});}/* 12823 * Helper functions for managing events -- not part of the public interface. 12824 * Props to Dean Edwards' addEvent library for many of the ideas. 12825 */jQuery.event={global:{},add:function add(elem,types,handler,data,selector){var handleObjIn,eventHandle,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=dataPriv.get(elem);// Don't attach events to noData or text/comment nodes (but allow plain objects) 12826if(!elemData){return;}// Caller can pass in an object of custom data in lieu of the handler 12827if(handler.handler){handleObjIn=handler;handler=handleObjIn.handler;selector=handleObjIn.selector;}// Ensure that invalid selectors throw exceptions at attach time 12828// Evaluate against documentElement in case elem is a non-element node (e.g., document) 12829if(selector){jQuery.find.matchesSelector(documentElement,selector);}// Make sure that the handler has a unique ID, used to find/remove it later 12830if(!handler.guid){handler.guid=jQuery.guid++;}// Init the element's event structure and main handler, if this is the first 12831if(!(events=elemData.events)){events=elemData.events={};}if(!(eventHandle=elemData.handle)){eventHandle=elemData.handle=function(e){// Discard the second event of a jQuery.event.trigger() and 12832// when an event is called after a page has unloaded 12833return typeof jQuery!=="undefined"&&jQuery.event.triggered!==e.type?jQuery.event.dispatch.apply(elem,arguments):undefined;};}// Handle multiple events separated by a space 12834types=(types||"").match(rnothtmlwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();// There *must* be a type, no attaching namespace-only handlers 12835if(!type){continue;}// If event changes its type, use the special event handlers for the changed type 12836special=jQuery.event.special[type]||{};// If selector defined, determine special event api type, otherwise given type 12837type=(selector?special.delegateType:special.bindType)||type;// Update special based on newly reset type 12838special=jQuery.event.special[type]||{};// handleObj is passed to all event handlers 12839handleObj=jQuery.extend({type:type,origType:origType,data:data,handler:handler,guid:handler.guid,selector:selector,needsContext:selector&&jQuery.expr.match.needsContext.test(selector),namespace:namespaces.join(".")},handleObjIn);// Init the event handler queue if we're the first 12840if(!(handlers=events[type])){handlers=events[type]=[];handlers.delegateCount=0;// Only use addEventListener if the special events handler returns false 12841if(!special.setup||special.setup.call(elem,data,namespaces,eventHandle)===false){if(elem.addEventListener){elem.addEventListener(type,eventHandle);}}}if(special.add){special.add.call(elem,handleObj);if(!handleObj.handler.guid){handleObj.handler.guid=handler.guid;}}
vendor: 5,001 bytes, lines 12841-12869
12841// Add to the element's handler list, delegates in front 12842if(selector){handlers.splice(handlers.delegateCount++,0,handleObj);}else{handlers.push(handleObj);}// Keep track of which events have ever been used, for event optimization 12843jQuery.event.global[type]=true;}},// Detach an event or set of events from an element 12844remove:function remove(elem,types,handler,selector,mappedTypes){var j,origCount,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=dataPriv.hasData(elem)&&dataPriv.get(elem);if(!elemData||!(events=elemData.events)){return;}// Once for each type.namespace in types; type may be omitted 12845types=(types||"").match(rnothtmlwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();// Unbind all events (on this namespace, if provided) for the element 12846if(!type){for(type in events){jQuery.event.remove(elem,type+types[t],handler,selector,true);}continue;}special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;handlers=events[type]||[];tmp=tmp[2]&&new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)");// Remove matching events 12847origCount=j=handlers.length;while(j--){handleObj=handlers[j];if((mappedTypes||origType===handleObj.origType)&&(!handler||handler.guid===handleObj.guid)&&(!tmp||tmp.test(handleObj.namespace))&&(!selector||selector===handleObj.selector||selector==="**"&&handleObj.selector)){handlers.splice(j,1);if(handleObj.selector){handlers.delegateCount--;}if(special.remove){special.remove.call(elem,handleObj);}}}// Remove generic event handler if we removed something and no more handlers exist 12848// (avoids potential for endless recursion during removal of special event handlers) 12849if(origCount&&!handlers.length){if(!special.teardown||special.teardown.call(elem,namespaces,elemData.handle)===false){jQuery.removeEvent(elem,type,elemData.handle);}delete events[type];}}// Remove data and the expando if it's no longer used 12850if(jQuery.isEmptyObject(events)){dataPriv.remove(elem,"handle events");}},dispatch:function dispatch(nativeEvent){// Make a writable jQuery.Event from the native event object 12851var event=jQuery.event.fix(nativeEvent);var i,j,ret,matched,handleObj,handlerQueue,args=new Array(arguments.length),handlers=(dataPriv.get(this,"events")||{})[event.type]||[],special=jQuery.event.special[event.type]||{};// Use the fix-ed jQuery.Event rather than the (read-only) native event 12852args[0]=event;for(i=1;i<arguments.length;i++){args[i]=arguments[i];}event.delegateTarget=this;// Call the preDispatch hook for the mapped type, and let it bail if desired 12853if(special.preDispatch&&special.preDispatch.call(this,event)===false){return;}// Determine handlers 12854handlerQueue=jQuery.event.handlers.call(this,event,handlers);// Run delegates first; they may want to stop propagation beneath us 12855i=0;while((matched=handlerQueue[i++])&&!event.isPropagationStopped()){event.currentTarget=matched.elem;j=0;while((handleObj=matched.handlers[j++])&&!event.isImmediatePropagationStopped()){// Triggered event must either 1) have no namespace, or 2) have namespace(s) 12856// a subset or equal to those in the bound event (both can have no namespace). 12857if(!event.rnamespace||event.rnamespace.test(handleObj.namespace)){event.handleObj=handleObj;event.data=handleObj.data;ret=((jQuery.event.special[handleObj.origType]||{}).handle||handleObj.handler).apply(matched.elem,args);if(ret!==undefined){if((event.result=ret)===false){event.preventDefault();event.stopPropagation();}}}}}// Call the postDispatch hook for the mapped type 12858if(special.postDispatch){special.postDispatch.call(this,event);}return event.result;},handlers:function handlers(event,_handlers){var i,handleObj,sel,matchedHandlers,matchedSelectors,handlerQueue=[],delegateCount=_handlers.delegateCount,cur=event.target;// Find delegate handlers 12859if(delegateCount&&// Support: IE <=9 12860// Black-hole SVG <use> instance trees (trac-13180) 12861cur.nodeType&&// Support: Firefox <=42 12862// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) 12863// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click 12864// Support: IE 11 only 12865// ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) 12866!(event.type==="click"&&event.button>=1)){for(;cur!==this;cur=cur.parentNode||this){// Don't check non-elements (#13208) 12867// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) 12868if(cur.nodeType===1&&!(event.type==="click"&&cur.disabled===true)){matchedHandlers=[];matchedSelectors={};for(i=0;i<delegateCount;i++){handleObj=_handlers[i];// Don't conflict with Object.prototype properties (#13203) 12869sel=handleObj.selector+" ";if(matchedSelectors[sel]===undefined){matchedSelectors[sel]=handleObj.needsContext?jQuery(sel,this).index(cur)>-1:jQuery.find(sel,this,null,[cur]).length;}if(matchedSelectors[sel]){matchedHandlers.push(handleObj);}}if(matchedHandlers.length){handlerQueue.push({elem:cur,handlers:matchedHandlers});}}
12869}}// Add the remaining (directly-bound) handlers 12870cur=this;if(delegateCount<_handlers.length){handlerQueue.push({elem:cur,handlers:_handlers.slice(delegateCount)});}return handlerQueue;},addProp:function addProp(name,hook){Object.defineProperty(jQuery.Event.prototype,name,{enumerable:true,configurable:true,get:isFunction(hook)?function(){if(this.originalEvent){return hook(this.originalEvent);}}:function(){if(this.originalEvent){return this.originalEvent[name];}},set:function set(value){Object.defineProperty(this,name,{enumerable:true,configurable:true,writable:true,value:value});}});},fix:function fix(originalEvent){return originalEvent[jQuery.expando]?originalEvent:new jQuery.Event(originalEvent);},special:{load:{// Prevent triggered image.load events from bubbling to window.load 12871noBubble:true},focus:{// Fire native event if possible so blur/focus sequence is correct 12872trigger:function trigger(){if(this!==safeActiveElement()&&this.focus){this.focus();return false;}},delegateType:"focusin"},blur:{trigger:function trigger(){if(this===safeActiveElement()&&this.blur){this.blur();return false;}},delegateType:"focusout"},click:{// For checkbox, fire native event so checked state will be right 12873trigger:function trigger(){if(this.type==="checkbox"&&this.click&&nodeName(this,"input")){this.click();return false;}},// For cross-browser consistency, don't fire native .click() on links 12874_default:function _default(event){return nodeName(event.target,"a");}},beforeunload:{postDispatch:function postDispatch(event){// Support: Firefox 20+ 12875// Firefox doesn't alert if the returnValue field is not set. 12876if(event.result!==undefined&&event.originalEvent){event.originalEvent.returnValue=event.result;}}}}};jQuery.removeEvent=function(elem,type,handle){// This "if" is needed for plain objects 12877if(elem.removeEventListener){elem.removeEventListener(type,handle);}};jQuery.Event=function(src,props){// Allow instantiation without the 'new' keyword 12878if(!(this instanceof jQuery.Event)){return new jQuery.Event(src,props);}// Event object 12879if(src&&src.type){this.originalEvent=src;this.type=src.type;// Events bubbling up the document may have been marked as prevented 12880// by a handler lower down the tree; reflect the correct value. 12881this.isDefaultPrevented=src.defaultPrevented||src.defaultPrevented===undefined&&// Supp
12881ort: Android <=2.3 only 12882src.returnValue===false?returnTrue:returnFalse;// Create target properties 12883// Support: Safari <=6 - 7 only 12884// Target should not be a text node (#504, #13143) 12885this.target=src.target&&src.target.nodeType===3?src.target.parentNode:src.target;this.currentTarget=src.currentTarget;this.relatedTarget=src.relatedTarget;// Event type 12886}else{this.type=src;}// Put explicitly provided properties onto the event object 12887if(props){jQuery.extend(this,props);}// Create a timestamp if incoming event doesn't have one 12888this.timeStamp=src&&src.timeStamp||Date.now();// Mark it as fixed 12889this[jQuery.expando]=true;};// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding 12890// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html 12891jQuery.Event.prototype={constructor:jQuery.Event,isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse,isSimulated:false,preventDefault:function preventDefault(){var e=this.originalEvent;this.isDefaultPrevented=returnTrue;if(e&&!this.isSimulated){e.preventDefault();}},stopPropagation:function stopPropagation(){var e=this.originalEvent;this.isPropagationStopped=returnTrue;if(e&&!this.isSimulated){e.stopPropagation();}},stopImmediatePropagation:function stopImmediatePropagation(){var e=this.originalEvent;this.isImmediatePropagationStopped=returnTrue;if(e&&!this.isSimulated){e.stopImmediatePropagation();}this.stopPropagation();}};// Includes all common event props including KeyEvent and MouseEvent specific props 12892jQuery.each({altKey:true,bubbles:true,cancelable:true,changedTouches:true,ctrlKey:true,detail:true,eventPhase:true,metaKey:true,pageX:true,pageY:true,shiftKey:true,view:true,"char":true,charCode:true,key:true,keyCode:true,button:true,buttons:true,clientX:true,clientY:true,offsetX:true,offsetY:true,pointerId:true,pointerType:true,screenX:true,screenY:true,targetTouches:true,toElement:true,touches:true,which:function which(event){var button=event.button;// Add which for key events 12893if(event.which==null&&rkeyEvent.test(event.type)){return event.charCode!=null?event.charCode:event.keyCode;}// Add which for click: 1 === left; 2 === middle; 3 === right 12894if(!event.which&&button!==undefined&&rmouseEvent.test(event.type)){if(button&1){return 1;}if(button&2){return 3;}if(button&4){return 2;}return 0;}return event.which;}},jQuery.event.addProp);// Create mouseenter/leave events using mouseover/out and event-time checks 12895// so that event delegation works in jQuery. 12896// Do the same for pointerenter/pointerleave and pointerover/pointerout 12897// 12898// Support: Safari 7 only 12899// Safari sends mouseenter too often; see: 12900// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 12901// for the description of the bug (it existed in older Chrome versions as well).
vendor: 32,037 bytes, lines 12902-13101
12902jQuery.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(orig,fix){jQuery.event.special[orig]={delegateType:fix,bindType:fix,handle:function handle(event){var ret,target=this,related=event.relatedTarget,handleObj=event.handleObj;// For mouseenter/leave call the handler if related is outside the target. 12903// NB: No relatedTarget if the mouse left/entered the browser window 12904if(!related||related!==target&&!jQuery.contains(target,related)){event.type=handleObj.origType;ret=handleObj.handler.apply(this,arguments);event.type=fix;}return ret;}};});jQuery.fn.extend({on:function on(types,selector,data,fn){return _on(this,types,selector,data,fn);},one:function one(types,selector,data,fn){return _on(this,types,selector,data,fn,1);},off:function off(types,selector,fn){var handleObj,type;if(types&&types.preventDefault&&types.handleObj){// ( event ) dispatched jQuery.Event 12905handleObj=types.handleObj;jQuery(types.delegateTarget).off(handleObj.namespace?handleObj.origType+"."+handleObj.namespace:handleObj.origType,handleObj.selector,handleObj.handler);return this;}if(_typeof(types)==="object"){// ( types-object [, selector] ) 12906for(type in types){this.off(type,selector,types[type]);}return this;}if(selector===false||typeof selector==="function"){// ( types [, fn] ) 12907fn=selector;selector=undefined;}if(fn===false){fn=returnFalse;}return this.each(function(){jQuery.event.remove(this,types,fn,selector);});}});var/* eslint-disable max-len */ // See https://github.com/eslint/eslint/issues/3229 12908rxhtmlTag=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,/* eslint-enable */ // Support: IE <=10 - 11, Edge 12 - 13 only 12909// In IE/Edge using regex groups here causes severe slowdowns. 12910// See https://connect.microsoft.com/IE/feedback/details/1736512/ 12911rnoInnerhtml=/<script|<style|<link/i,// checked="checked" or checked 12912rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,rcleanScript=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;// Prefer a tbody over its parent table for containing new rows 12913function manipulationTarget(elem,content){if(nodeName(elem,"table")&&nodeName(content.nodeType!==11?content:content.firstChild,"tr")){return jQuery(elem).children("tbody")[0]||elem;}return elem;}// Replace/restore the type attribute of script elements for safe DOM manipulation 12914function disableScript(elem){elem.type=(elem.getAttribute("type")!==null)+"/"+elem.type;return elem;}function restoreScript(elem){if((elem.type||"").slice(0,5)==="true/"){elem.type=elem.type.slice(5);}else{elem.removeAttribute("type");}return elem;}function cloneCopyEvent(src,dest){var i,l,type,pdataOld,pdataCur,udataOld,udataCur,events;if(dest.nodeType!==1){return;}// 1. Copy private data: events, handlers, etc. 12915if(dataPriv.hasData(src)){pdataOld=dataPriv.access(src);pdataCur=dataPriv.set(dest,pdataOld);events=pdataOld.events;if(events){delete pdataCur.handle;pdataCur.events={};for(type in events){for(i=0,l=events[type].length;i<l;i++){jQuery.event.add(dest,type,events[type][i]);}}}}// 2. Copy user data 12916if(dataUser.hasData(src)){udataOld=dataUser.access(src);udataCur=jQuery.extend({},udataOld);dataUser.set(dest,udataCur);}}// Fix IE bugs, see support tests 12917function fixInput(src,dest){var nodeName=dest.nodeName.toLowerCase();// Fails to persist the checked state of a cloned checkbox or radio button. 12918if(nodeName==="input"&&rcheckableType.test(src.type)){dest.checked=src.checked;// Fails to return the selected option to the default selected state when cloning options 12919}else if(nodeName==="input"||nodeName==="textarea"){dest.defaultValue=src.defaultValue;}}function domManip(collection,args,callback,ignored){// Flatten any nested arrays 12920args=concat.apply([],args);var fragment,first,scripts,hasScripts,node,doc,i=0,l=collection.length,iNoClone=l-1,value=args[0],valueIsFunction=isFunction(value);// We can't cloneNode fragments that contain checked, in WebKit 12921if(valueIsFunction||l>1&&typeof value==="string"&&!support.checkClone&&rchecked.test(value)){return collection.each(function(index){var self=collection.eq(index);if(valueIsFunction){args[0]=value.call(this,index,self.html());}domManip(self,args,callback,ignored);});}if(l){fragment=buildFragment(args,collection[0].ownerDocument,false,collection,ignored);first=fragment.firstChild;if(fragment.childNodes.length===1){fragment=first;}// Require either new content or an interest in ignored elements to invoke the callback 12922if(first||ignored){scripts=jQuery.map(getAll(fragment,"script"),disableScript);hasScripts=scripts.length;// Use the original fragment for the last item 12923// instead of the first because it can end up 12924// being emptied incorrectly in certain situations (#8070). 12925for(;i<l;i++){node=fragment;if(i!==iNoClone){node=jQuery.clone(node,true,true);// Keep references to cloned scripts for later restoration 12926if(hasScripts){// Support: Android <=4.0 only, PhantomJS 1 only 12927// push.apply(_, arraylike) throws on ancient WebKit 12928jQuery.merge(scripts,getAll(node,"script"));}}callback.call(collection[i],node,i);}if(hasScripts){doc=scripts[scripts.length-1].ownerDocument;// Reenable scripts 12929jQuery.map(scripts,restoreScript);// Evaluate executable scripts on first document insertion 12930for(i=0;i<hasScripts;i++){node=scripts[i];if(rscriptType.test(node.type||"")&&!dataPriv.access(node,"globalEval")&&jQuery.contains(doc,node)){if(node.src&&(node.type||"").toLowerCase()!=="module"){// Optional AJAX dependency, but won't run scripts if not present 12931if(jQuery._evalUrl){jQuery._evalUrl(node.src);}}else{DOMEval(node.textContent.replace(rcleanScript,""),doc,node);}}}}}}return collection;}function _remove(elem,selector,keepData){var node,nodes=selector?jQuery.filter(selector,elem):elem,i=0;for(;(node=nodes[i])!=null;i++){if(!keepData&&node.nodeType===1){jQuery.cleanData(getAll(node));}if(node.parentNode){if(keepData&&jQuery.contains(node.ownerDocument,node)){setGlobalEval(getAll(node,"script"));}node.parentNode.removeChild(node);}}return elem;}jQuery.extend({htmlPrefilter:function htmlPrefilter(html){return html.replace(rxhtmlTag,"<$1></$2>");},clone:function clone(elem,dataAndEvents,deepDataAndEvents){var i,l,srcElements,destElements,clone=elem.cloneNode(true),inPage=jQuery.contains(elem.ownerDocument,elem);// Fix IE cloning issues 12932if(!support.noCloneChecked&&(elem.nodeType===1||elem.nodeType===11)&&!jQuery.isXMLDoc(elem)){// We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 12933destElements=getAll(clone);srcElements=getAll(elem);for(i=0,l=srcElements.length;i<l;i++){fixInput(srcElements[i],destElements[i]);}}// Copy the events from the original to the clone 12934if(dataAndEvents){if(deepDataAndEvents){srcElements=srcElements||getAll(elem);destElements=destElements||getAll(clone);for(i=0,l=srcElements.length;i<l;i++){cloneCopyEvent(srcElements[i],destElements[i]);}}else{cloneCopyEvent(elem,clone);}}// Preserve script evaluation history 12935destElements=getAll(clone,"script");if(destElements.length>0){setGlobalEval(destElements,!inPage&&getAll(elem,"script"));}// Return the cloned set 12936return clone;},cleanData:function cleanData(elems){var data,elem,type,special=jQuery.event.special,i=0;for(;(elem=elems[i])!==undefined;i++){if(acceptData(elem)){if(data=elem[dataPriv.expando]){if(data.events){for(type in data.events){if(special[type]){jQuery.event.remove(elem,type);// This is a shortcut to avoid jQuery.event.remove's overhead 12937}else{jQuery.removeEvent(elem,type,data.handle);}}}// Support: Chrome <=35 - 45+ 12938// Assign undefined instead of using delete, see Data#remove 12939elem[dataPriv.expando]=undefined;}if(elem[dataUser.expando]){// Support: Chrome <=35 - 45+ 12940// Assign undefined instead of using delete, see Data#remove 12941elem[dataUser.expando]=undefined;}}}}});jQuery.fn.extend({detach:function detach(selector){return _remove(this,selector,true);},remove:function remove(selector){return _remove(this,selector);},text:function text(value){return access(this,function(value){return value===undefined?jQuery.text(this):this.empty().each(function(){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){this.textContent=value;}});},null,value,arguments.length);},append:function append(){return domManip(this,arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.appendChild(elem);}});},prepend:function prepend(){return domManip(this,arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.insertBefore(elem,target.firstChild);}});},before:function before(){return domManip(this,arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this);}});},after:function after(){return domManip(this,arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this.nextSibling);}});},empty:function empty(){var elem,i=0;for(;(elem=this[i])!=null;i++){if(elem.nodeType===1){// Prevent memory leaks 12942jQuery.cleanData(getAll(elem,false));// Remove any remaining nodes 12943elem.textContent="";}}return this;},clone:function clone(dataAndEvents,deepDataAndEvents){dataAndEvents=dataAndEvents==null?false:dataAndEvents;deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents;return this.map(function(){return jQuery.clone(this,dataAndEvents,deepDataAndEvents);});},html:function html(value){return access(this,function(value){var elem=this[0]||{},i=0,l=this.length;if(value===undefined&&elem.nodeType===1){return elem.innerHTML;}// See if we can take a shortcut and just use innerHTML 12944if(typeof value==="string"&&!rnoInnerhtml.test(value)&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=jQuery.htmlPrefilter(value);try{for(;i<l;i++){elem=this[i]||{};// Remove element nodes and prevent memory leaks 12945if(elem.nodeType===1){jQuery.cleanData(getAll(elem,false));elem.innerHTML=value;}}elem=0;// If using innerHTML throws an exception, use the fallback method 12946}catch(e){}}if(elem){this.empty().append(value);}},null,value,arguments.length);},replaceWith:function replaceWith(){var ignored=[];// Make the changes, replacing each non-ignored context element with the new content 12947return domManip(this,arguments,function(elem){var parent=this.parentNode;if(jQuery.inArray(this,ignored)<0){jQuery.cleanData(getAll(this));if(parent){parent.replaceChild(elem,this);}}// Force callback invocation 12948},ignored);}});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var elems,ret=[],insert=jQuery(selector),last=insert.length-1,i=0;for(;i<=last;i++){elems=i===last?this:this.clone(true);jQuery(insert[i])[original](elems);// Support: Android <=4.0 only, PhantomJS 1 only 12949// .get() because push.apply(_, arraylike) throws on ancient WebKit 12950push.apply(ret,elems.get());}return this.pushStack(ret);};});var rnumnonpx=new RegExp("^("+pnum+")(?!px)[a-z%]+$","i");var getStyles=function getStyles(elem){// Support: IE <=11 only, Firefox <=30 (#15098, #14150) 12951// IE throws on elements created in popups 12952// FF meanwhile throws on frame elements through "defaultView.getComputedStyle" 12953var view=elem.ownerDocument.defaultView;if(!view||!view.opener){view=window;}return view.getComputedStyle(elem);};var rboxStyle=new RegExp(cssExpand.join("|"),"i");(function(){// Executing both pixelPosition & boxSizingReliable tests require only one layout 12954// so they're executed at the same time to save the second computation. 12955function computeStyleTests(){// This is a singleton, we need to execute it only once 12956if(!div){return;}container.style.cssText="position:absolute;left:-11111px;width:60px;"+"margin-top:1px;padding:0;border:0";div.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;"+"margin:auto;border:1px;padding:1px;"+"width:60%;top:1%";documentElement.appendChild(container).appendChild(div);var divStyle=window.getComputedStyle(div);pixelPositionVal=divStyle.top!=="1%";// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 12957reliableMarginLeftVal=roundPixelMeasures(divStyle.marginLeft)===12;// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 12958// Some styles come back with percentage values, even though they shouldn't 12959div.style.right="60%";pixelBoxStylesVal=roundPixelMeasures(divStyle.right)===36;// Support: IE 9 - 11 only 12960// Detect misreporting of content dimensions for box-sizing:border-box elements 12961boxSizingReliableVal=roundPixelMeasures(divStyle.width)===36;// Support: IE 9 only 12962// Detect overflow:scroll screwiness (gh-3699) 12963div.style.position="absolute";scrollboxSizeVal=div.offsetWidth===36||"absolute";documentElement.removeChild(container);// Nullify the div so it wouldn't be stored in the memory and 12964// it will also be a sign that checks already performed 12965div=null;}function roundPixelMeasures(measure){return Math.round(parseFloat(measure));}var pixelPositionVal,boxSizingReliableVal,scrollboxSizeVal,pixelBoxStylesVal,reliableMarginLeftVal,container=document.createElement("div"),div=document.createElement("div");// Finish early in limited (non-browser) environments 12966if(!div.style){return;}// Support: IE <=9 - 11 only 12967// Style of cloned element affects source element cloned (#8908) 12968div.style.backgroundClip="content-box";div.cloneNode(true).style.backgroundClip="";support.clearCloneStyle=div.style.backgroundClip==="content-box";jQuery.extend(support,{boxSizingReliable:function boxSizingReliable(){computeStyleTests();return boxSizingReliableVal;},pixelBoxStyles:function pixelBoxStyles(){computeStyleTests();return pixelBoxStylesVal;},pixelPosition:function pixelPosition(){computeStyleTests();return pixelPositionVal;},reliableMarginLeft:function reliableMarginLeft(){computeStyleTests();return reliableMarginLeftVal;},scrollboxSize:function scrollboxSize(){computeStyleTests();return scrollboxSizeVal;}});})();function curCSS(elem,name,computed){var width,minWidth,maxWidth,ret,// Support: Firefox 51+ 12969// Retrieving style before computed somehow 12970// fixes an issue with getting wrong values 12971// on detached elements 12972style=elem.style;computed=computed||getStyles(elem);// getPropertyValue is needed for: 12973// .css('filter') (IE 9 only, #12537) 12974// .css('--customProperty) (#3144) 12975if(computed){ret=computed.getPropertyValue(name)||computed[name];if(ret===""&&!jQuery.contains(elem.ownerDocument,elem)){ret=jQuery.style(elem,name);}// A tribute to the "awesome hack by Dean Edwards" 12976// Android Browser returns percentage for some values, 12977// but width seems to be reliably pixels. 12978// This is against the CSSOM draft spec: 12979// https://drafts.csswg.org/cssom/#resolved-values 12980if(!support.pixelBoxStyles()&&rnumnonpx.test(ret)&&rboxStyle.test(name)){// Remember the original values 12981width=style.width;minWidth=style.minWidth;maxWidth=style.maxWidth;// Put in the new values to get a computed value out 12982style.minWidth=style.maxWidth=style.width=ret;ret=computed.width;// Revert the changed values 12983style.width=width;style.minWidth=minWidth;style.maxWidth=maxWidth;}}return ret!==undefined?// Support: IE <=9 - 11 only 12984// IE returns zIndex value as an integer. 12985ret+"":ret;}function addGetHookIf(conditionFn,hookFn){// Define the hook, we'll check on the first run if it's really needed. 12986return{get:function get(){if(conditionFn()){// Hook not needed (or it's not possible to use it due 12987// to missing dependency), remove it. 12988delete this.get;return;}// Hook needed; redefine it so that the support test is not executed again. 12989return(this.get=hookFn).apply(this,arguments);}};}var// Swappable if display is none or starts with table 12990// except "table", "table-cell", or "table-caption" 12991// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display 12992rdisplayswap=/^(none|table(?!-c[ea]).+)/,rcustomProp=/^--/,cssShow={position:"absolute",visibility:"hidden",display:"block"},cssNormalTransform={letterSpacing:"0",fontWeight:"400"},cssPrefixes=["Webkit","Moz","ms"],emptyStyle=document.createElement("div").style;// Return a css property mapped to a potentially vendor prefixed property 12993function vendorPropName(name){// Shortcut for names that are not vendor prefixed 12994if(name in emptyStyle){return name;}// Check for vendor prefixed names 12995var capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name;}}}// Return a property mapped along what jQuery.cssProps suggests or to 12996// a vendor prefixed property. 12997function finalPropName(name){var ret=jQuery.cssProps[name];if(!ret){ret=jQuery.cssProps[name]=vendorPropName(name)||name;}return ret;}function setPositiveNumber(elem,value,subtract){// Any relative (+/-) values have already been 12998// normalized at this point 12999var matches=rcssNum.exec(value);return matches?// Guard against undefined "subtract", e.g., when used as in cssHooks 13000Math.max(0,matches[2]-(subtract||0))+(matches[3]||"px"):value;}function boxModelAdjustment(elem,dimension,box,isBorderBox,styles,computedVal){var i=dimension==="width"?1:0,extra=0,delta=0;// Adjustment may not be necessary 13001if(box===(isBorderBox?"border":"content")){return 0;}for(;i<4;i+=2){// Both box models exclude margin 13002if(box==="margin"){delta+=jQuery.css(elem,box+cssExpand[i],true,styles);}// If we get here with a content-box, we're seeking "padding" or "border" or "margin" 13003if(!isBorderBox){// Add padding 13004delta+=jQuery.css(elem,"padding"+cssExpand[i],true,styles);// For "border" or "margin", add border 13005if(box!=="padding"){delta+=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles);// But still keep track of it otherwise 13006}else{extra+=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles);}// If we get here with a border-box (content + padding + border), we're seeking "content" or 13007// "padding" or "margin" 13008}else{// For "content", subtract padding 13009if(box==="content"){delta-=jQuery.css(elem,"padding"+cssExpand[i],true,styles);}// For "content" or "padding", subtract border 13010if(box!=="margin"){delta-=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles);}}}// Account for positive content-box scroll gutter when requested by providing computedVal 13011if(!isBorderBox&&computedVal>=0){// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border 13012// Assuming integer scroll gutter, subtract the rest and round down 13013delta+=Math.max(0,Math.ceil(elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)]-computedVal-delta-extra-0.5));}return delta;}function getWidthOrHeight(elem,dimension,extra){// Start with computed style 13014var styles=getStyles(elem),val=curCSS(elem,dimension,styles),isBorderBox=jQuery.css(elem,"boxSizing",false,styles)==="border-box",valueIsBorderBox=isBorderBox;// Support: Firefox <=54 13015// Return a confounding non-pixel value or feign ignorance, as appropriate. 13016if(rnumnonpx.test(val)){if(!extra){return val;}val="auto";}// Check for style in case a browser which returns unreliable values 13017// for getComputedStyle silently falls back to the reliable elem.style 13018valueIsBorderBox=valueIsBorderBox&&(support.boxSizingReliable()||val===elem.style[dimension]);// Fall back to offsetWidth/offsetHeight when value is "auto" 13019// This happens for inline elements with no explicit setting (gh-3571) 13020// Support: Android <=4.1 - 4.3 only 13021// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) 13022if(val==="auto"||!parseFloat(val)&&jQuery.css(elem,"display",false,styles)==="inline"){val=elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)];// offsetWidth/offsetHeight provide border-box values 13023valueIsBorderBox=true;}// Normalize "" and auto 13024val=parseFloat(val)||0;// Adjust for the element's box model 13025return val+boxModelAdjustment(elem,dimension,extra||(isBorderBox?"border":"content"),valueIsBorderBox,styles,// Provide the current computed size to request scroll gutter calculation (gh-3589) 13026val)+"px";}jQuery.extend({// Add in style property hooks for overriding the default 13027// behavior of getting and setting a style property 13028cssHooks:{opacity:{get:function get(elem,computed){if(computed){// We should always get a number back from opacity 13029var ret=curCSS(elem,"opacity");return ret===""?"1":ret;}}}},// Don't automatically add "px" to these possibly-unitless properties 13030cssNumber:{"animationIterationCount":true,"columnCount":true,"fillOpacity":true,"flexGrow":true,"flexShrink":true,"fontWeight":true,"lineHeight":true,"opacity":true,"order":true,"orphans":true,"widows":true,"zIndex":true,"zoom":true},// Add in properties whose names you wish to fix before 13031// setting or getting the value 13032cssProps:{},// Get and set the style property on a DOM Node 13033style:function style(elem,name,value,extra){// Don't set styles on text and comment nodes 13034if(!elem||elem.nodeType===3||elem.nodeType===8||!elem.style){return;}// Make sure that we're working with the right name 13035var ret,type,hooks,origName=camelCase(name),isCustomProp=rcustomProp.test(name),style=elem.style;// Make sure that we're working with the right name. We don't 13036// want to query the value if it is a CSS custom property 13037// since they are user-defined. 13038if(!isCustomProp){name=finalPropName(origName);}// Gets hook for the prefixed version, then unprefixed version 13039hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];// Check if we're setting a value 13040if(value!==undefined){type=_typeof(value);// Convert "+=" or "-=" to relative numbers (#7345) 13041if(type==="string"&&(ret=rcssNum.exec(value))&&ret[1]){value=adjustCSS(elem,name,ret);// Fixes bug #9237 13042type="number";}// Make sure that null and NaN values aren't set (#7116) 13043if(value==null||value!==value){return;}// If a number was passed in, add the unit (except for certain CSS properties) 13044if(type==="number"){value+=ret&&ret[3]||(jQuery.cssNumber[origName]?"":"px");}// background-* props affect original clone's values 13045if(!support.clearCloneStyle&&value===""&&name.indexOf("background")===0){style[name]="inherit";}// If a hook was provided, use that value, otherwise just set the specified value 13046if(!hooks||!("set"in hooks)||(value=hooks.set(elem,value,extra))!==undefined){if(isCustomProp){style.setProperty(name,value);}else{style[name]=value;}}}else{// If a hook was provided get the non-computed value from there 13047if(hooks&&"get"in hooks&&(ret=hooks.get(elem,false,extra))!==undefined){return ret;}// Otherwise just get the value from the style object 13048return style[name];}},css:function css(elem,name,extra,styles){var val,num,hooks,origName=camelCase(name),isCustomProp=rcustomProp.test(name);// Make sure that we're working with the right name. We don't 13049// want to modify the value if it is a CSS custom property 13050// since they are user-defined. 13051if(!isCustomProp){name=finalPropName(origName);}// Try prefixed name followed by the unprefixed name 13052hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];// If a hook was provided get the computed value from there 13053if(hooks&&"get"in hooks){val=hooks.get(elem,true,extra);}// Otherwise, if a way to get the computed value exists, use that 13054if(val===undefined){val=curCSS(elem,name,styles);}// Convert "normal" to computed value 13055if(val==="normal"&&name in cssNormalTransform){val=cssNormalTransform[name];}// Make numeric if forced or a qualifier was provided and val looks numeric 13056if(extra===""||extra){num=parseFloat(val);return extra===true||isFinite(num)?num||0:val;}return val;}});jQuery.each(["height","width"],function(i,dimension){jQuery.cssHooks[dimension]={get:function get(elem,computed,extra){if(computed){// Certain elements can have dimension info if we invisibly show them 13057// but it must have a current display style that would benefit 13058return rdisplayswap.test(jQuery.css(elem,"display"))&&(// Support: Safari 8+ 13059// Table columns in Safari have non-zero offsetWidth & zero 13060// getBoundingClientRect().width unless display is changed. 13061// Support: IE <=11 only 13062// Running getBoundingClientRect on a disconnected node 13063// in IE throws an error. 13064!elem.getClientRects().length||!elem.getBoundingClientRect().width)?swap(elem,cssShow,function(){return getWidthOrHeight(elem,dimension,extra);}):getWidthOrHeight(elem,dimension,extra);}},set:function set(elem,value,extra){var matches,styles=getStyles(elem),isBorderBox=jQuery.css(elem,"boxSizing",false,styles)==="border-box",subtract=extra&&boxModelAdjustment(elem,dimension,extra,isBorderBox,styles);// Account for unreliable border-box dimensions by comparing offset* to computed and 13065// faking a content-box to get border and padding (gh-3699) 13066if(isBorderBox&&support.scrollboxSize()===styles.position){subtract-=Math.ceil(elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)]-parseFloat(styles[dimension])-boxModelAdjustment(elem,dimension,"border",false,styles)-0.5);}// Convert to pixels if value adjustment is needed 13067if(subtract&&(matches=rcssNum.exec(value))&&(matches[3]||"px")!=="px"){elem.style[dimension]=value;value=jQuery.css(elem,dimension);}return setPositiveNumber(elem,value,subtract);}};});jQuery.cssHooks.marginLeft=addGetHookIf(support.reliableMarginLeft,function(elem,computed){if(computed){return(parseFloat(curCSS(elem,"marginLeft"))||elem.getBoundingClientRect().left-swap(elem,{marginLeft:0},function(){return elem.getBoundingClientRect().left;}))+"px";}});// These hooks are used by animate to expand properties 13068jQuery.each({margin:"",padding:"",border:"Width"},function(prefix,suffix){jQuery.cssHooks[prefix+suffix]={expand:function expand(value){var i=0,expanded={},// Assumes a single number if not a string 13069parts=typeof value==="string"?value.split(" "):[value];for(;i<4;i++){expanded[prefix+cssExpand[i]+suffix]=parts[i]||parts[i-2]||parts[0];}return expanded;}};if(prefix!=="margin"){jQuery.cssHooks[prefix+suffix].set=setPositiveNumber;}});jQuery.fn.extend({css:function css(name,value){return access(this,function(elem,name,value){var styles,len,map={},i=0;if(Array.isArray(name)){styles=getStyles(elem);len=name.length;for(;i<len;i++){map[name[i]]=jQuery.css(elem,name[i],false,styles);}return map;}return value!==undefined?jQuery.style(elem,name,value):jQuery.css(elem,name);},name,value,arguments.length>1);}});function Tween(elem,options,prop,end,easing){return new Tween.prototype.init(elem,options,prop,end,easing);}jQuery.Tween=Tween;Tween.prototype={constructor:Tween,init:function init(elem,options,prop,end,easing,unit){this.elem=elem;this.prop=prop;this.easing=easing||jQuery.easing._default;this.options=options;this.start=this.now=this.cur();this.end=end;this.unit=unit||(jQuery.cssNumber[prop]?"":"px");},cur:function cur(){var hooks=Tween.propHooks[this.prop];return hooks&&hooks.get?hooks.get(this):Tween.propHooks._default.get(this);},run:function run(percent){var eased,hooks=Tween.propHooks[this.prop];if(this.options.duration){this.pos=eased=jQuery.easing[this.easing](percent,this.options.duration*percent,0,1,this.options.duration);}else{this.pos=eased=percent;}this.now=(this.end-this.start)*eased+this.start;if(this.options.step){this.options.step.call(this.elem,this.now,this);}if(hooks&&hooks.set){hooks.set(this);}else{Tween.propHooks._default.set(this);}return this;}};Tween.prototype.init.prototype=Tween.prototype;Tween.propHooks={_default:{get:function get(tween){var result;// Use a property on the element directly when it is not a DOM element, 13070// or when there is no matching style property that exists. 13071if(tween.elem.nodeType!==1||tween.elem[tween.prop]!=null&&tween.elem.style[tween.prop]==null){return tween.elem[tween.prop];}// Passing an empty string as a 3rd parameter to .css will automatically 13072// attempt a parseFloat and fallback to a string if the parse fails. 13073// Simple values such as "10px" are parsed to Float; 13074// complex values such as "rotate(1rad)" are returned as-is. 13075result=jQuery.css(tween.elem,tween.prop,"");// Empty strings, null, undefined and "auto" are converted to 0. 13076return!result||result==="auto"?0:result;},set:function set(tween){// Use step hook for back compat. 13077// Use cssHook if its there. 13078// Use .style if available and use plain properties where available. 13079if(jQuery.fx.step[tween.prop]){jQuery.fx.step[tween.prop](tween);}else if(tween.elem.nodeType===1&&(tween.elem.style[jQuery.cssProps[tween.prop]]!=null||jQuery.cssHooks[tween.prop])){jQuery.style(tween.elem,tween.prop,tween.now+tween.unit);}else{tween.elem[tween.prop]=tween.now;}}}};// Support: IE <=9 only 13080// Panic based approach to setting things on disconnected nodes 13081Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function set(tween){if(tween.elem.nodeType&&tween.elem.parentNode){tween.elem[tween.prop]=tween.now;}}};jQuery.easing={linear:function linear(p){return p;},swing:function swing(p){return 0.5-Math.cos(p*Math.PI)/2;},_default:"swing"};jQuery.fx=Tween.prototype.init;// Back compat <1.8 extension point 13082jQuery.fx.step={};var fxNow,inProgress,rfxtypes=/^(?:toggle|show|hide)$/,rrun=/queueHooks$/;function schedule(){if(inProgress){if(document.hidden===false&&window.requestAnimationFrame){window.requestAnimationFrame(schedule);}else{window.setTimeout(schedule,jQuery.fx.interval);}jQuery.fx.tick();}}// Animations created synchronously will run synchronously 13083function createFxNow(){window.setTimeout(function(){fxNow=undefined;});return fxNow=Date.now();}// Generate parameters to create a standard animation 13084function genFx(type,includeWidth){var which,i=0,attrs={height:type};// If we include width, step value is 1 to do all cssExpand values, 13085// otherwise step value is 2 to skip over Left and Right 13086includeWidth=includeWidth?1:0;for(;i<4;i+=2-includeWidth){which=cssExpand[i];attrs["margin"+which]=attrs["padding"+which]=type;}if(includeWidth){attrs.opacity=attrs.width=type;}return attrs;}function createTween(value,prop,animation){var tween,collection=(Animation.tweeners[prop]||[]).concat(Animation.tweeners["*"]),index=0,length=collection.length;for(;index<length;index++){if(tween=collection[index].call(animation,prop,value)){// We're done with this property 13087return tween;}}}function defaultPrefilter(elem,props,opts){var prop,value,toggle,hooks,oldfire,propTween,restoreDisplay,display,isBox="width"in props||"height"in props,anim=this,orig={},style=elem.style,hidden=elem.nodeType&&isHiddenWithinTree(elem),dataShow=dataPriv.get(elem,"fxshow");// Queue-skipping animations hijack the fx hooks 13088if(!opts.queue){hooks=jQuery._queueHooks(elem,"fx");if(hooks.unqueued==null){hooks.unqueued=0;oldfire=hooks.empty.fire;hooks.empty.fire=function(){if(!hooks.unqueued){oldfire();}};}hooks.unqueued++;anim.always(function(){// Ensure the complete handler is called before this completes 13089anim.always(function(){hooks.unqueued--;if(!jQuery.queue(elem,"fx").length){hooks.empty.fire();}});});}// Detect show/hide animations 13090for(prop in props){value=props[prop];if(rfxtypes.test(value)){delete props[prop];toggle=toggle||value==="toggle";if(value===(hidden?"hide":"show")){// Pretend to be hidden if this is a "show" and 13091// there is still data from a stopped show/hide 13092if(value==="show"&&dataShow&&dataShow[prop]!==undefined){hidden=true;// Ignore all other no-op show/hide data 13093}else{continue;}}orig[prop]=dataShow&&dataShow[prop]||jQuery.style(elem,prop);}}// Bail out if this is a no-op like .hide().hide() 13094propTween=!jQuery.isEmptyObject(props);if(!propTween&&jQuery.isEmptyObject(orig)){return;}// Restrict "overflow" and "display" styles during box animations 13095if(isBox&&elem.nodeType===1){// Support: IE <=9 - 11, Edge 12 - 15 13096// Record all 3 overflow attributes because IE does not infer the shorthand 13097// from identically-valued overflowX and overflowY and Edge just mirrors 13098// the overflowX value there. 13099opts.overflow=[style.overflow,style.overflowX,style.overflowY];// Identify a display type, preferring old show/hide data over the CSS cascade 13100restoreDisplay=dataShow&&dataShow.display;if(restoreDisplay==null){restoreDisplay=dataPriv.get(elem,"display");}display=jQuery.css(elem,"display");if(display==="none"){if(restoreDisplay){display=restoreDisplay;}else{// Get nonempty value(s) by temporarily forcing visibility 13101showHide([elem],true);restoreDisplay=elem.style.display||restoreDisplay;display=jQuery.css(elem,"display");showHide([elem]);}}
vendor: 1,679 bytes, lines 13101-13110
13101// Animate inline elements as inline-block 13102if(display==="inline"||display==="inline-block"&&restoreDisplay!=null){if(jQuery.css(elem,"float")==="none"){// Restore the original display value at the end of pure show/hide animations 13103if(!propTween){anim.done(function(){style.display=restoreDisplay;});if(restoreDisplay==null){display=style.display;restoreDisplay=display==="none"?"":display;}}style.display="inline-block";}}}if(opts.overflow){style.overflow="hidden";anim.always(function(){style.overflow=opts.overflow[0];style.overflowX=opts.overflow[1];style.overflowY=opts.overflow[2];});}// Implement show/hide animations 13104propTween=false;for(prop in orig){// General show/hide setup for this element animation 13105if(!propTween){if(dataShow){if("hidden"in dataShow){hidden=dataShow.hidden;}}else{dataShow=dataPriv.access(elem,"fxshow",{display:restoreDisplay});}// Store hidden/visible for toggle so `.stop().toggle()` "reverses" 13106if(toggle){dataShow.hidden=!hidden;}// Show elements before animating them 13107if(hidden){showHide([elem],true);}/* eslint-disable no-loop-func */anim.done(function(){/* eslint-enable no-loop-func */ // The final step of a "hide" animation is actually hiding the element 13108if(!hidden){showHide([elem]);}dataPriv.remove(elem,"fxshow");for(prop in orig){jQuery.style(elem,prop,orig[prop]);}});}// Per-property setup 13109propTween=createTween(hidden?dataShow[prop]:0,prop,anim);if(!(prop in dataShow)){dataShow[prop]=propTween.start;if(hidden){propTween.end=propTween.start;propTween.start=0;}}}}function propFilter(props,specialEasing){var index,name,easing,value,hooks;// camelCase, specialEasing and expand cssHook pass 13110for(index in props){name=camelCase(index);
vendor: 4,695 bytes, lines 13110-13125
13110easing=specialEasing[name];value=props[index];if(Array.isArray(value)){easing=value[1];value=props[index]=value[0];}if(index!==name){props[name]=value;delete props[index];}hooks=jQuery.cssHooks[name];if(hooks&&"expand"in hooks){value=hooks.expand(value);delete props[name];// Not quite $.extend, this won't overwrite existing keys. 13111// Reusing 'index' because we have the correct "name" 13112for(index in value){if(!(index in props)){props[index]=value[index];specialEasing[index]=easing;}}}else{specialEasing[name]=easing;}}}function Animation(elem,properties,options){var result,stopped,index=0,length=Animation.prefilters.length,deferred=jQuery.Deferred().always(function(){// Don't match elem in the :animated selector 13113delete tick.elem;}),tick=function tick(){if(stopped){return false;}var currentTime=fxNow||createFxNow(),remaining=Math.max(0,animation.startTime+animation.duration-currentTime),// Support: Android 2.3 only 13114// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) 13115temp=remaining/animation.duration||0,percent=1-temp,index=0,length=animation.tweens.length;for(;index<length;index++){animation.tweens[index].run(percent);}deferred.notifyWith(elem,[animation,percent,remaining]);// If there's more to do, yield 13116if(percent<1&&length){return remaining;}// If this was an empty animation, synthesize a final progress notification 13117if(!length){deferred.notifyWith(elem,[animation,1,0]);}// Resolve the animation and report its conclusion 13118deferred.resolveWith(elem,[animation]);return false;},animation=deferred.promise({elem:elem,props:jQuery.extend({},properties),opts:jQuery.extend(true,{specialEasing:{},easing:jQuery.easing._default},options),originalProperties:properties,originalOptions:options,startTime:fxNow||createFxNow(),duration:options.duration,tweens:[],createTween:function createTween(prop,end){var tween=jQuery.Tween(elem,animation.opts,prop,end,animation.opts.specialEasing[prop]||animation.opts.easing);animation.tweens.push(tween);return tween;},stop:function stop(gotoEnd){var index=0,// If we are going to the end, we want to run all the tweens 13119// otherwise we skip this part 13120length=gotoEnd?animation.tweens.length:0;if(stopped){return this;}stopped=true;for(;index<length;index++){animation.tweens[index].run(1);}// Resolve when we played the last frame; otherwise, reject 13121if(gotoEnd){deferred.notifyWith(elem,[animation,1,0]);deferred.resolveWith(elem,[animation,gotoEnd]);}else{deferred.rejectWith(elem,[animation,gotoEnd]);}return this;}}),props=animation.props;propFilter(props,animation.opts.specialEasing);for(;index<length;index++){result=Animation.prefilters[index].call(animation,elem,props,animation.opts);if(result){if(isFunction(result.stop)){jQuery._queueHooks(animation.elem,animation.opts.queue).stop=result.stop.bind(result);}return result;}}jQuery.map(props,createTween,animation);if(isFunction(animation.opts.start)){animation.opts.start.call(elem,animation);}// Attach callbacks from options 13122animation.progress(animation.opts.progress).done(animation.opts.done,animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always);jQuery.fx.timer(jQuery.extend(tick,{elem:elem,anim:animation,queue:animation.opts.queue}));return animation;}jQuery.Animation=jQuery.extend(Animation,{tweeners:{"*":[function(prop,value){var tween=this.createTween(prop,value);adjustCSS(tween.elem,prop,rcssNum.exec(value),tween);return tween;}]},tweener:function tweener(props,callback){if(isFunction(props)){callback=props;props=["*"];}else{props=props.match(rnothtmlwhite);}var prop,index=0,length=props.length;for(;index<length;index++){prop=props[index];Animation.tweeners[prop]=Animation.tweeners[prop]||[];Animation.tweeners[prop].unshift(callback);}},prefilters:[defaultPrefilter],prefilter:function prefilter(callback,prepend){if(prepend){Animation.prefilters.unshift(callback);}else{Animation.prefilters.push(callback);}}});jQuery.speed=function(speed,easing,fn){var opt=speed&&_typeof(speed)==="object"?jQuery.extend({},speed):{complete:fn||!fn&&easing||isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!isFunction(easing)&&easing};// Go to the end state if fx are off 13123if(jQuery.fx.off){opt.duration=0;}else{if(typeof opt.duration!=="number"){if(opt.duration in jQuery.fx.speeds){opt.duration=jQuery.fx.speeds[opt.duration];}else{opt.duration=jQuery.fx.speeds._default;}}}// Normalize opt.queue - true/undefined/null -> "fx" 13124if(opt.queue==null||opt.queue===true){opt.queue="fx";}// Queueing 13125opt.old=opt.complete;opt.complete=function(){if(isFunction(opt.old)){opt.old.call(this);}if(opt.queue){jQuery.dequeue(this,opt.queue);}};return opt;};jQuery.fn.extend({fadeTo:function fadeTo(speed,to,easing,callback){//
vendor: 4,300 bytes, lines 13125-13142
13125Show any hidden elements after setting opacity to 0 13126return this.filter(isHiddenWithinTree).css("opacity",0).show()// Animate to the value specified 13127.end().animate({opacity:to},speed,easing,callback);},animate:function animate(prop,speed,easing,callback){var empty=jQuery.isEmptyObject(prop),optall=jQuery.speed(speed,easing,callback),doAnimation=function doAnimation(){// Operate on a copy of prop so per-property easing won't be lost 13128var anim=Animation(this,jQuery.extend({},prop),optall);// Empty animations, or finishing resolves immediately 13129if(empty||dataPriv.get(this,"finish")){anim.stop(true);}};doAnimation.finish=doAnimation;return empty||optall.queue===false?this.each(doAnimation):this.queue(optall.queue,doAnimation);},stop:function stop(type,clearQueue,gotoEnd){var stopQueue=function stopQueue(hooks){var stop=hooks.stop;delete hooks.stop;stop(gotoEnd);};if(typeof type!=="string"){gotoEnd=clearQueue;clearQueue=type;type=undefined;}if(clearQueue&&type!==false){this.queue(type||"fx",[]);}return this.each(function(){var dequeue=true,index=type!=null&&type+"queueHooks",timers=jQuery.timers,data=dataPriv.get(this);if(index){if(data[index]&&data[index].stop){stopQueue(data[index]);}}else{for(index in data){if(data[index]&&data[index].stop&&rrun.test(index)){stopQueue(data[index]);}}}for(index=timers.length;index--;){if(timers[index].elem===this&&(type==null||timers[index].queue===type)){timers[index].anim.stop(gotoEnd);dequeue=false;timers.splice(index,1);}}// Start the next in the queue if the last step wasn't forced. 13130// Timers currently will call their complete callbacks, which 13131// will dequeue but only if they were gotoEnd. 13132if(dequeue||!gotoEnd){jQuery.dequeue(this,type);}});},finish:function finish(type){if(type!==false){type=type||"fx";}return this.each(function(){var index,data=dataPriv.get(this),queue=data[type+"queue"],hooks=data[type+"queueHooks"],timers=jQuery.timers,length=queue?queue.length:0;// Enable finishing flag on private data 13133data.finish=true;// Empty the queue first 13134jQuery.queue(this,type,[]);if(hooks&&hooks.stop){hooks.stop.call(this,true);}// Look for any active animations, and finish them 13135for(index=timers.length;index--;){if(timers[index].elem===this&&timers[index].queue===type){timers[index].anim.stop(true);timers.splice(index,1);}}// Look for any animations in the old queue and finish them 13136for(index=0;index<length;index++){if(queue[index]&&queue[index].finish){queue[index].finish.call(this);}}// Turn off finishing flag 13137delete data.finish;});}});jQuery.each(["toggle","show","hide"],function(i,name){var cssFn=jQuery.fn[name];jQuery.fn[name]=function(speed,easing,callback){return speed==null||typeof speed==="boolean"?cssFn.apply(this,arguments):this.animate(genFx(name,true),speed,easing,callback);};});// Generate shortcuts for custom animations 13138jQuery.each({slideDown:genFx("show"),slideUp:genFx("hide"),slideToggle:genFx("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(name,props){jQuery.fn[name]=function(speed,easing,callback){return this.animate(props,speed,easing,callback);};});jQuery.timers=[];jQuery.fx.tick=function(){var timer,i=0,timers=jQuery.timers;fxNow=Date.now();for(;i<timers.length;i++){timer=timers[i];// Run the timer and safely remove it when done (allowing for external removal) 13139if(!timer()&&timers[i]===timer){timers.splice(i--,1);}}if(!timers.length){jQuery.fx.stop();}fxNow=undefined;};jQuery.fx.timer=function(timer){jQuery.timers.push(timer);jQuery.fx.start();};jQuery.fx.interval=13;jQuery.fx.start=function(){if(inProgress){return;}inProgress=true;schedule();};jQuery.fx.stop=function(){inProgress=null;};jQuery.fx.speeds={slow:600,fast:200,// Default speed 13140_default:400};// Based off of the plugin by Clint Helfers, with permission. 13141// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ 13142jQuery.fn.delay=function(time,type){time=jQuery.fx?jQuery.fx.speeds[time]||time:time;type=type||"fx";return this.queue(type,function(next,hooks){var timeout=window.setTimeout(next,time);hooks.stop=function(){window.clearTimeout(timeout);};});};(function(){var input=document.createElement("input"),select=document.createElement("select"),opt=select.appendChild(document.createElement("option"));input.type="checkbox";
vendor: 5,281 bytes, lines 13142-13173
13142// Support: Android <=4.3 only 13143// Default value for a checkbox should be "on" 13144support.checkOn=input.value!=="";// Support: IE <=11 only 13145// Must access selectedIndex to make default options select 13146support.optSelected=opt.selected;// Support: IE <=11 only 13147// An input loses its value after becoming a radio 13148input=document.createElement("input");input.value="t";input.type="radio";support.radioValue=input.value==="t";})();var boolHook,attrHandle=jQuery.expr.attrHandle;jQuery.fn.extend({attr:function attr(name,value){return access(this,jQuery.attr,name,value,arguments.length>1);},removeAttr:function removeAttr(name){return this.each(function(){jQuery.removeAttr(this,name);});}});jQuery.extend({attr:function attr(elem,name,value){var ret,hooks,nType=elem.nodeType;// Don't get/set attributes on text, comment and attribute nodes 13149if(nType===3||nType===8||nType===2){return;}// Fallback to prop when attributes are not supported 13150if(typeof elem.getAttribute==="undefined"){return jQuery.prop(elem,name,value);}// Attribute hooks are determined by the lowercase version 13151// Grab necessary hook if one is defined 13152if(nType!==1||!jQuery.isXMLDoc(elem)){hooks=jQuery.attrHooks[name.toLowerCase()]||(jQuery.expr.match.bool.test(name)?boolHook:undefined);}if(value!==undefined){if(value===null){jQuery.removeAttr(elem,name);return;}if(hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret;}elem.setAttribute(name,value+"");return value;}if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){return ret;}ret=jQuery.find.attr(elem,name);// Non-existent attributes return null, we normalize to undefined 13153return ret==null?undefined:ret;},attrHooks:{type:{set:function set(elem,value){if(!support.radioValue&&value==="radio"&&nodeName(elem,"input")){var val=elem.value;elem.setAttribute("type",value);if(val){elem.value=val;}return value;}}}},removeAttr:function removeAttr(elem,value){var name,i=0,// Attribute names can contain non-HTML whitespace characters 13154// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 13155attrNames=value&&value.match(rnothtmlwhite);if(attrNames&&elem.nodeType===1){while(name=attrNames[i++]){elem.removeAttribute(name);}}}});// Hooks for boolean attributes 13156boolHook={set:function set(elem,value,name){if(value===false){// Remove boolean attributes when set to false 13157jQuery.removeAttr(elem,name);}else{elem.setAttribute(name,name);}return name;}};jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(i,name){var getter=attrHandle[name]||jQuery.find.attr;attrHandle[name]=function(elem,name,isXML){var ret,handle,lowercaseName=name.toLowerCase();if(!isXML){// Avoid an infinite loop by temporarily removing this function from the getter 13158handle=attrHandle[lowercaseName];attrHandle[lowercaseName]=ret;ret=getter(elem,name,isXML)!=null?lowercaseName:null;attrHandle[lowercaseName]=handle;}return ret;};});var rfocusable=/^(?:input|select|textarea|button)$/i,rclickable=/^(?:a|area)$/i;jQuery.fn.extend({prop:function prop(name,value){return access(this,jQuery.prop,name,value,arguments.length>1);},removeProp:function removeProp(name){return this.each(function(){delete this[jQuery.propFix[name]||name];});}});jQuery.extend({prop:function prop(elem,name,value){var ret,hooks,nType=elem.nodeType;// Don't get/set properties on text, comment and attribute nodes 13159if(nType===3||nType===8||nType===2){return;}if(nType!==1||!jQuery.isXMLDoc(elem)){// Fix name and attach hooks 13160name=jQuery.propFix[name]||name;hooks=jQuery.propHooks[name];}if(value!==undefined){if(hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret;}return elem[name]=value;}if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){return ret;}return elem[name];},propHooks:{tabIndex:{get:function get(elem){// Support: IE <=9 - 11 only 13161// elem.tabIndex doesn't always return the 13162// correct value when it hasn't been explicitly set 13163// https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ 13164// Use proper attribute retrieval(#12072) 13165var tabindex=jQuery.find.attr(elem,"tabindex");if(tabindex){return parseInt(tabindex,10);}if(rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href){return 0;}return-1;}}},propFix:{"for":"htmlFor","class":"className"}});// Support: IE <=11 only 13166// Accessing the selectedIndex property 13167// forces the browser to respect setting selected 13168// on the option 13169// The getter ensures a default option is selected 13170// when in an optgroup 13171// eslint rule "no-unused-expressions" is disabled for this code 13172// since it considers such accessions noop 13173if(!support.optSelected){jQuery.propHooks.selected={get:function get(elem){/* eslint no-unused-expressions: "off" */var parent=elem.parentNode;if(parent&&parent.parentNode){parent.parentNode.selectedIndex;}return null;},set:function set(elem){/* eslint no-unused-expressions: "off" */var parent=elem.parentNode;if(parent){parent.selectedIndex;if(parent.parentNode){parent.parentNode.selectedIndex;}}}};}jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){jQuery.propFix[this.toLowerCase()]=this;});// Strip and collapse whitespace according to HTML spec
vendor: 10,671 bytes, lines 13174-13227
13174// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace 13175function stripAndCollapse(value){var tokens=value.match(rnothtmlwhite)||[];return tokens.join(" ");}function getClass(elem){return elem.getAttribute&&elem.getAttribute("class")||"";}function classesToArray(value){if(Array.isArray(value)){return value;}if(typeof value==="string"){return value.match(rnothtmlwhite)||[];}return[];}jQuery.fn.extend({addClass:function addClass(value){var classes,elem,cur,curValue,clazz,j,finalValue,i=0;if(isFunction(value)){return this.each(function(j){jQuery(this).addClass(value.call(this,j,getClass(this)));});}classes=classesToArray(value);if(classes.length){while(elem=this[i++]){curValue=getClass(elem);cur=elem.nodeType===1&&" "+stripAndCollapse(curValue)+" ";if(cur){j=0;while(clazz=classes[j++]){if(cur.indexOf(" "+clazz+" ")<0){cur+=clazz+" ";}}// Only assign if different to avoid unneeded rendering. 13176finalValue=stripAndCollapse(cur);if(curValue!==finalValue){elem.setAttribute("class",finalValue);}}}}return this;},removeClass:function removeClass(value){var classes,elem,cur,curValue,clazz,j,finalValue,i=0;if(isFunction(value)){return this.each(function(j){jQuery(this).removeClass(value.call(this,j,getClass(this)));});}if(!arguments.length){return this.attr("class","");}classes=classesToArray(value);if(classes.length){while(elem=this[i++]){curValue=getClass(elem);// This expression is here for better compressibility (see addClass) 13177cur=elem.nodeType===1&&" "+stripAndCollapse(curValue)+" ";if(cur){j=0;while(clazz=classes[j++]){// Remove *all* instances 13178while(cur.indexOf(" "+clazz+" ")>-1){cur=cur.replace(" "+clazz+" "," ");}}// Only assign if different to avoid unneeded rendering. 13179finalValue=stripAndCollapse(cur);if(curValue!==finalValue){elem.setAttribute("class",finalValue);}}}}return this;},toggleClass:function toggleClass(value,stateVal){var type=_typeof(value),isValidValue=type==="string"||Array.isArray(value);if(typeof stateVal==="boolean"&&isValidValue){return stateVal?this.addClass(value):this.removeClass(value);}if(isFunction(value)){return this.each(function(i){jQuery(this).toggleClass(value.call(this,i,getClass(this),stateVal),stateVal);});}return this.each(function(){var className,i,self,classNames;if(isValidValue){// Toggle individual class names 13180i=0;self=jQuery(this);classNames=classesToArray(value);while(className=classNames[i++]){// Check each className given, space separated list 13181if(self.hasClass(className)){self.removeClass(className);}else{self.addClass(className);}}// Toggle whole class name 13182}else if(value===undefined||type==="boolean"){className=getClass(this);if(className){// Store className if set 13183dataPriv.set(this,"__className__",className);}// If the element has a class name or if we're passed `false`, 13184// then remove the whole classname (if there was one, the above saved it). 13185// Otherwise bring back whatever was previously saved (if anything), 13186// falling back to the empty string if nothing was stored. 13187if(this.setAttribute){this.setAttribute("class",className||value===false?"":dataPriv.get(this,"__className__")||"");}}});},hasClass:function hasClass(selector){var className,elem,i=0;className=" "+selector+" ";while(elem=this[i++]){if(elem.nodeType===1&&(" "+stripAndCollapse(getClass(elem))+" ").indexOf(className)>-1){return true;}}return false;}});var rreturn=/\r/g;jQuery.fn.extend({val:function val(value){var hooks,ret,valueIsFunction,elem=this[0];if(!arguments.length){if(elem){hooks=jQuery.valHooks[elem.type]||jQuery.valHooks[elem.nodeName.toLowerCase()];if(hooks&&"get"in hooks&&(ret=hooks.get(elem,"value"))!==undefined){return ret;}ret=elem.value;// Handle most common string cases 13188if(typeof ret==="string"){return ret.replace(rreturn,"");}// Handle cases where value is null/undef or number 13189return ret==null?"":ret;}return;}valueIsFunction=isFunction(value);return this.each(function(i){var val;if(this.nodeType!==1){return;}if(valueIsFunction){val=value.call(this,i,jQuery(this).val());}else{val=value;}// Treat null/undefined as ""; convert numbers to string 13190if(val==null){val="";}else if(typeof val==="number"){val+="";}else if(Array.isArray(val)){val=jQuery.map(val,function(value){return value==null?"":value+"";});}hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()];// If set returns undefined, fall back to normal setting 13191if(!hooks||!("set"in hooks)||hooks.set(this,val,"value")===undefined){this.value=val;}});}});jQuery.extend({valHooks:{option:{get:function get(elem){var val=jQuery.find.attr(elem,"value");return val!=null?val:// Support: IE <=10 - 11 only 13192// option.text throws exceptions (#14686, #14858) 13193// Strip and collapse whitespace 13194// https://html.spec.whatwg.org/#strip-and-collapse-whitespace 13195stripAndCollapse(jQuery.text(elem));}},select:{get:function get(elem){var value,option,i,options=elem.options,index=elem.selectedIndex,one=elem.type==="select-one",values=one?null:[],max=one?index+1:options.length;if(index<0){i=max;}else{i=one?index:0;}// Loop through all the selected options 13196for(;i<max;i++){option=options[i];// Support: IE <=9 only 13197// IE8-9 doesn't update selected after form reset (#2551) 13198if((option.selected||i===index)&&// Don't return options that are disabled or in a disabled optgroup 13199!option.disabled&&(!option.parentNode.disabled||!nodeName(option.parentNode,"optgroup"))){// Get the specific value for the option 13200value=jQuery(option).val();// We don't need an array for one selects 13201if(one){return value;}// Multi-Selects return an array 13202values.push(value);}}return values;},set:function set(elem,value){var optionSet,option,options=elem.options,values=jQuery.makeArray(value),i=options.length;while(i--){option=options[i];/* eslint-disable no-cond-assign */if(option.selected=jQuery.inArray(jQuery.valHooks.option.get(option),values)>-1){optionSet=true;}/* eslint-enable no-cond-assign */}// Force browsers to behave consistently when non-matching value is set 13203if(!optionSet){elem.selectedIndex=-1;}return values;}}}});// Radios and checkboxes getter/setter 13204jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]={set:function set(elem,value){if(Array.isArray(value)){return elem.checked=jQuery.inArray(jQuery(elem).val(),value)>-1;}}};if(!support.checkOn){jQuery.valHooks[this].get=function(elem){return elem.getAttribute("value")===null?"on":elem.value;};}});// Return jQuery for attributes-only inclusion 13205support.focusin="onfocusin"in window;var rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,stopPropagationCallback=function stopPropagationCallback(e){e.stopPropagation();};jQuery.extend(jQuery.event,{trigger:function trigger(event,data,elem,onlyHandlers){var i,cur,tmp,bubbleType,ontype,handle,special,lastElement,eventPath=[elem||document],type=hasOwn.call(event,"type")?event.type:event,namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[];cur=lastElement=tmp=elem=elem||document;// Don't do events on text and comment nodes 13206if(elem.nodeType===3||elem.nodeType===8){return;}// focus/blur morphs to focusin/out; ensure we're not firing them right now 13207if(rfocusMorph.test(type+jQuery.event.triggered)){return;}if(type.indexOf(".")>-1){// Namespaced trigger; create a regexp to match event type in handle() 13208namespaces=type.split(".");type=namespaces.shift();namespaces.sort();}ontype=type.indexOf(":")<0&&"on"+type;// Caller can pass in a jQuery.Event object, Object, or just an event type string 13209event=event[jQuery.expando]?event:new jQuery.Event(type,_typeof(event)==="object"&&event);// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) 13210event.isTrigger=onlyHandlers?2:3;event.namespace=namespaces.join(".");event.rnamespace=event.namespace?new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;// Clean up the event in case it is being reused 13211event.result=undefined;if(!event.target){event.target=elem;}// Clone any incoming data and prepend the event, creating the handler arg list 13212data=data==null?[event]:jQuery.makeArray(data,[event]);// Allow special events to draw outside the lines 13213special=jQuery.event.special[type]||{};if(!onlyHandlers&&special.trigger&&special.trigger.apply(elem,data)===false){return;}// Determine event propagation path in advance, per W3C events spec (#9951) 13214// Bubble up to document, then to window; watch for a global ownerDocument var (#9724) 13215if(!onlyHandlers&&!special.noBubble&&!isWindow(elem)){bubbleType=special.delegateType||type;if(!rfocusMorph.test(bubbleType+type)){cur=cur.parentNode;}for(;cur;cur=cur.parentNode){eventPath.push(cur);tmp=cur;}// Only add window if we got to document (e.g., not plain obj or detached DOM) 13216if(tmp===(elem.ownerDocument||document)){eventPath.push(tmp.defaultView||tmp.parentWindow||window);}}// Fire handlers on the event path 13217i=0;while((cur=eventPath[i++])&&!event.isPropagationStopped()){lastElement=cur;event.type=i>1?bubbleType:special.bindType||type;// jQuery handler 13218handle=(dataPriv.get(cur,"events")||{})[event.type]&&dataPriv.get(cur,"handle");if(handle){handle.apply(cur,data);}// Native handler 13219handle=ontype&&cur[ontype];if(handle&&handle.apply&&acceptData(cur)){event.result=handle.apply(cur,data);if(event.result===false){event.preventDefault();}}}event.type=type;// If nobody prevented the default action, do it now 13220if(!onlyHandlers&&!event.isDefaultPrevented()){if((!special._default||special._default.apply(eventPath.pop(),data)===false)&&acceptData(elem)){// Call a native DOM method on the target with the same name as the event. 13221// Don't do default actions on window, that's where global variables be (#6170) 13222if(ontype&&isFunction(elem[type])&&!isWindow(elem)){// Don't re-trigger an onFOO event when we call its FOO() method 13223tmp=elem[ontype];if(tmp){elem[ontype]=null;}// Prevent re-triggering of the same event, since we already bubbled it above 13224jQuery.event.triggered=type;if(event.isPropagationStopped()){lastElement.addEventListener(type,stopPropagationCallback);}elem[type]();if(event.isPropagationStopped()){lastElement.removeEventListener(type,stopPropagationCallback);}jQuery.event.triggered=undefined;if(tmp){elem[ontype]=tmp;}}}}return event.result;},// Piggyback on a donor event to simulate a different one 13225// Used only for `focus(in | out)` events 13226simulate:function simulate(type,elem,event){var e=jQuery.extend(new jQuery.Event(),event,{type:type,isSimulated:true});jQuery.event.trigger(e,null,elem);}});jQuery.fn.extend({trigger:function trigger(type,data){return this.each(function(){jQuery.event.trigger(type,data,this);});},triggerHandler:function triggerHandler(type,data){var elem=this[0];if(elem){return jQuery.event.trigger(type,data,elem,true);}}});// Support: Firefox <=44 13227// Firefox doesn't have focus(in | out) events
13228// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 13229// 13230// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 13231// focus(in | out) events fire after focus & blur events, 13232// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order 13233// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 13234if(!support.focusin){jQuery.each({focus:"focusin",blur:"focusout"},function(orig,fix){// Attach a single capturing handler on the document while someone wants focusin/focusout 13235var handler=function handler(event){jQuery.event.simulate(fix,event.target,jQuery.event.fix(event));};jQuery.event.special[fix]={setup:function setup(){var doc=this.ownerDocument||this,attaches=dataPriv.access(doc,fix);if(!attaches){doc.addEventListener(orig,handler,true);}dataPriv.access(doc,fix,(attaches||0)+1);},teardown:function teardown(){var doc=this.ownerDocument||this,attaches=dataPriv.access(doc,fix)-1;if(!attaches){doc.removeEventListener(orig,handler,true);dataPriv.remove(doc,fix);}else{dataPriv.access(doc,fix,attaches);}}};});}var location=window.location;var nonce=Date.now();var rquery=/\?/;// Cross-browser xml parsing 13236jQuery.parseXML=function(data){var xml;if(!data||typeof data!=="string"){return null;}// Support: IE 9 - 11 only 13237// IE throws on parseFromString with invalid input. 13238try{xml=new window.DOMParser().parseFromString(data,"text/xml");}catch(e){xml=undefined;}if(!xml||xml.getElementsByTagName("parsererror").length){jQuery.error("Invalid XML: "+data);}return xml;};var rbracket=/\[\]$/,rCRLF=/\r?\n/g,rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,rsubmittable=/^(?:input|select|textarea|keygen)/i;function buildParams(prefix,obj,traditional,add){var name;if(Array.isArray(obj)){// Serialize array item. 13239jQuery.each(obj,function(i,v){if(traditional||rbracket.test(prefix)){// Treat each array item as a scalar. 13240add(prefix,v);}else{// Item is non-scalar (array or object), encode its numeric index. 13241buildParams(prefix+"["+(_typeof(v)==="object"&&v!=null?i:"")+"]",v,traditional,add);}});}else if(!traditional&&toType(obj)==="object"){// Serialize object item. 13242for(name in obj){buildParams(prefix+"["+name+"]",obj[name],traditional,add);}}else{// Serialize scalar item. 13243add(prefix,obj);}}// Serialize an array of form elements or a set of 13244// key/values into a query string 13245jQuery.param=function(a,traditional){var prefix,s=[],add=function add(key,valueOrFunction){// If value is a function, invoke it and use its return value 13246var value=isFunction(valueOrFunction)?valueOrFunction():valueOrFunction;s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value==null?"":value);};// If an array was passed in, assume that it is an array of form elements. 13247if(Array.isArray(a)||a.jquery&&!jQuery.isPlainObject(a)){// Serialize the form elements 13248jQuery.each(a,function(){add(this.name,this.value);});}else{// If traditional, encode the "old" way (the way 1.3.2 or older 13249// did it), otherwise encode params recursively. 13250for(prefix in a){buildParams(prefix,a[prefix],traditional,add);}}// Return the resulting serialization 13251return s.join("&");};jQuery.fn.extend({serialize:function serialize(){return jQuery.param(this.serializeArray());},serializeArray:function serializeArray(){return this.map(function(){// Can add propHook for "elements" to filter or add form elements 13252var elements=jQuery.prop(this,"elements");return elements?jQuery.makeArray(elements):this;}
vendor: 7,357 bytes, lines 13252-13312
13252).filter(function(){var type=this.type;// Use .is( ":disabled" ) so that fieldset[disabled] works 13253return this.name&&!jQuery(this).is(":disabled")&&rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type)&&(this.checked||!rcheckableType.test(type));}).map(function(i,elem){var val=jQuery(this).val();if(val==null){return null;}if(Array.isArray(val)){return jQuery.map(val,function(val){return{name:elem.name,value:val.replace(rCRLF,"\r\n")};});}return{name:elem.name,value:val.replace(rCRLF,"\r\n")};}).get();}});var r20=/%20/g,rhash=/#.*$/,rantiCache=/([?&])_=[^&]*/,rheaders=/^(.*?):[ \t]*([^\r\n]*)$/mg,// #7653, #8125, #8152: local protocol detection 13254rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,/* Prefilters 13255 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) 13256 * 2) These are called: 13257 * - BEFORE asking for a transport 13258 * - AFTER param serialization (s.data is a string if s.processData is true) 13259 * 3) key is the dataType 13260 * 4) the catchall symbol "*" can be used 13261 * 5) execution will start with transport dataType and THEN continue down to "*" if needed 13262 */prefilters={},/* Transports bindings 13263 * 1) key is the dataType 13264 * 2) the catchall symbol "*" can be used 13265 * 3) selection will start with transport dataType and THEN go to "*" if needed 13266 */transports={},// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression 13267allTypes="*/".concat("*"),// Anchor tag for parsing the document origin 13268originAnchor=document.createElement("a");originAnchor.href=location.href;// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport 13269function addToPrefiltersOrTransports(structure){// dataTypeExpression is optional and defaults to "*" 13270return function(dataTypeExpression,func){if(typeof dataTypeExpression!=="string"){func=dataTypeExpression;dataTypeExpression="*";}var dataType,i=0,dataTypes=dataTypeExpression.toLowerCase().match(rnothtmlwhite)||[];if(isFunction(func)){// For each dataType in the dataTypeExpression 13271while(dataType=dataTypes[i++]){// Prepend if requested 13272if(dataType[0]==="+"){dataType=dataType.slice(1)||"*";(structure[dataType]=structure[dataType]||[]).unshift(func);// Otherwise append 13273}else{(structure[dataType]=structure[dataType]||[]).push(func);}}}};}// Base inspection function for prefilters and transports 13274function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){var inspected={},seekingTransport=structure===transports;function inspect(dataType){var selected;inspected[dataType]=true;jQuery.each(structure[dataType]||[],function(_,prefilterOrFactory){var dataTypeOrTransport=prefilterOrFactory(options,originalOptions,jqXHR);if(typeof dataTypeOrTransport==="string"&&!seekingTransport&&!inspected[dataTypeOrTransport]){options.dataTypes.unshift(dataTypeOrTransport);inspect(dataTypeOrTransport);return false;}else if(seekingTransport){return!(selected=dataTypeOrTransport);}});return selected;}return inspect(options.dataTypes[0])||!inspected["*"]&&inspect("*");}// A special extend for ajax options 13275// that takes "flat" options (not to be deep extended) 13276// Fixes #9887 13277function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}/* Handles responses to an ajax request: 13278 * - finds the right dataType (mediates between content-type and expected dataType) 13279 * - returns the corresponding response 13280 */function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;// Remove auto dataType and get content-type in the process 13281while(dataTypes[0]==="*"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader("Content-Type");}}// Check if we're dealing with a known content-type 13282if(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}}// Check to see if we have a response for the expected dataType 13283if(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{// Try convertible dataTypes 13284for(type in responses){if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){finalDataType=type;break;}if(!firstDataType){firstDataType=type;}}// Or just use first one 13285finalDataType=finalDataType||firstDataType;}// If we found a dataType 13286// We add the dataType to the list if needed 13287// and return the corresponding response 13288if(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}/* Chain conversions given the request and the original response 13289 * Also sets the responseXXX fields on the jqXHR instance 13290 */function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},// Work with a copy of dataTypes in case we need to modify it for conversion 13291dataTypes=s.dataTypes.slice();// Create converters map with lowercased keys 13292if(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv];}}current=dataTypes.shift();// Convert to each sequential dataType 13293while(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response;}// Apply the dataFilter if provided 13294if(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType);}prev=current;current=dataTypes.shift();if(current){// There's only work to do if current dataType is non-auto 13295if(current==="*"){current=prev;// Convert response if prev dataType is non-auto and differs from current 13296}else if(prev!=="*"&&prev!==current){// Seek a direct converter 13297conv=converters[prev+" "+current]||converters["* "+current];// If none found, seek a pair 13298if(!conv){for(conv2 in converters){// If conv2 outputs current 13299tmp=conv2.split(" ");if(tmp[1]===current){// If prev can be converted to accepted input 13300conv=converters[prev+" "+tmp[0]]||converters["* "+tmp[0]];if(conv){// Condense equivalence converters 13301if(conv===true){conv=converters[conv2];// Otherwise, insert the intermediate dataType 13302}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1]);}break;}}}}// Apply converter (if not an equivalence) 13303if(conv!==true){// Unless errors are allowed to bubble, catch and return them 13304if(conv&&s.throws){response=conv(response);}else{try{response=conv(response);}catch(e){return{state:"parsererror",error:conv?e:"No conversion from "+prev+" to "+current};}}}}}}return{state:"success",data:response};}jQuery.extend({// Counter for holding the number of active queries 13305active:0,// Last-Modified header cache for next request 13306lastModified:{},etag:{},ajaxSettings:{url:location.href,type:"GET",isLocal:rlocalProtocol.test(location.protocol),global:true,processData:true,async:true,contentType:"application/x-www-form-urlencoded; charset=UTF-8",/* 13307 timeout: 0, 13308 data: null, 13309 dataType: null, 13310 username: null, 13311 password: null, 13312 cache: null,
13313 throws: false, 13314 traditional: false, 13315 headers: {}, 13316 */accepts:{"*":allTypes,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},// Data converters 13317// Keys separate source (or catchall "*") and destination types with a single space 13318converters:{// Convert anything to text 13319"* text":String,// Text to html (true = no transformation) 13320"text html":true,// Evaluate text as a json expression 13321"text json":JSON.parse,// Parse text as xml 13322"text xml":jQuery.parseXML},// For options that shouldn't be deep extended: 13323// you can add your own custom options here if 13324// and when you create one that shouldn't be 13325// deep extended (see ajaxExtend) 13326flatOptions:{url:true,context:true}},// Creates a full fledged settings object into target 13327// with both ajaxSettings and settings fields. 13328// If target is omitted, writes into ajaxSettings. 13329ajaxSetup:function ajaxSetup(target,settings){return settings?// Building a settings object 13330ajaxExtend(ajaxExtend(target,jQuery.ajaxSettings),settings):// Extending ajaxSettings 13331ajaxExtend(jQuery.ajaxSettings,target);},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),// Main method 13332ajax:function ajax(url,options){// If url is an object, simulate pre-1.5 signature 13333if(_typeof(url)==="object"){options=url;url=undefined;}// Force options to be an object 13334options=options||{};var transport,// URL without anti-cache param 13335cacheURL,// Response headers 13336responseHeadersString,responseHeaders,// timeout handle 13337timeoutTimer,// Url cleanup var 13338urlAnchor,// Request state (becomes false upon send and true upon completion) 13339completed,// To know if global events are to be dispatched 13340fireGlobals,// Loop variable 13341i,// uncached part of the url 13342uncached,// Create the final options object 13343s=jQuery.ajaxSetup({},options),// Callbacks context 13344callbackContext=s.context||s,// Context for global events is callbackContext if it is a DOM node or jQuery collection 13345globalEventContext=s.context&&(callbackContext.nodeType||callbackContext.jquery)?jQuery(callbackContext):jQuery.event,// Deferreds 13346deferred=jQuery.Deferred(),completeDeferred=jQuery.Callbacks("once memory"),// Status-dependent callbacks 13347_statusCode=s.statusCode||{},// Headers (they are sent all at once) 13348requestHeaders={},requestHeadersNames={},// Default abort message 13349strAbort="canceled",// Fake xhr 13350jqXHR={readyState:0,// Builds headers hashtable if needed 13351getResponseHeader:function getResponseHeader(key){var match;if(completed){if(!responseHeaders){responseHeaders={};while(match=rheaders.exec(responseHeadersString)){responseHeaders[match[1].toLowerCase()]=match[2];}}match=responseHeaders[key.toLowerCase()];}return match==null?null:match;},// Raw string 13352getAllResponseHeaders:function getAllResponseHeaders(){return completed?responseHeadersString:null;},// Caches the header 13353setRequestHeader:function setRequestHeader(name,value){if(completed==null){name=requestHeadersNames[name.toLowerCase()]=requestHeadersNames[name.toLowerCase()]||name;requestHeaders[name]=value;}return this;},// Overrides response content-type header 13354overrideMimeType:function overrideMimeType(type){if(completed==null){s.mimeType=type;}return this;},// Status-dependent callbacks 13355statusCode:function statusCode(map){var code;if(map){if(completed){// Execute the appropriate callbacks 13356jqXHR.always(map[jqXHR.status]);}else{// Lazy-add the new callbacks in a way that preserves old ones 13357for(code in map){_statusCode[code]=[_statusCode[code],map[code]];}}}return this;},// Cancel the request 13358abort:function abort(statusText){var finalText=statusText||strAbort;if(transport){transport.abort(finalText);}done(0,finalText);return this;}};// Attach deferreds 13359deferred.promise(jqXHR);// Add protocol if not provided (prefilters might expect it) 13360// Handle falsy url in the settings object (#10093: consistency with old signature) 13361// We also use the url parameter if available 13362s.url=((url||s.url||location.href)+"").replace(rprotocol,location.protocol+"//");// Alias method option to type as per ticket #12004 13363s.type=options.method||options.type||s.method||s.type;// Extract dataTypes list 13364s.dataTypes=(s.dataType||"*").toLowerCase().match(rnothtmlwhite)||[""];// A cross-domain request is in order when the origin doesn't match the current origin. 13365if(s.crossDomain==null){urlAnchor=document.createElement("a");// Support: IE <=8 - 11, Edge 12 - 15 13366// IE throws exception on accessing the href property if url is malformed, 13367// e.g. http://example.com:80x/ 13368try{urlAnchor.href=s.url;
vendor: 8,417 bytes, lines 13368-13430
13368// Support: IE <=8 - 11 only 13369// Anchor's host property isn't correctly set when s.url is relative 13370urlAnchor.href=urlAnchor.href;s.crossDomain=originAnchor.protocol+"//"+originAnchor.host!==urlAnchor.protocol+"//"+urlAnchor.host;}catch(e){// If there is an error parsing the URL, assume it is crossDomain, 13371// it can be rejected by the transport if it is invalid 13372s.crossDomain=true;}}// Convert data if not already a string 13373if(s.data&&s.processData&&typeof s.data!=="string"){s.data=jQuery.param(s.data,s.traditional);}// Apply prefilters 13374inspectPrefiltersOrTransports(prefilters,s,options,jqXHR);// If request was aborted inside a prefilter, stop there 13375if(completed){return jqXHR;}// We can fire global events as of now if asked to 13376// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) 13377fireGlobals=jQuery.event&&s.global;// Watch for a new set of requests 13378if(fireGlobals&&jQuery.active++===0){jQuery.event.trigger("ajaxStart");}// Uppercase the type 13379s.type=s.type.toUpperCase();// Determine if request has content 13380s.hasContent=!rnoContent.test(s.type);// Save the URL in case we're toying with the If-Modified-Since 13381// and/or If-None-Match header later on 13382// Remove hash to simplify url manipulation 13383cacheURL=s.url.replace(rhash,"");// More options handling for requests with no content 13384if(!s.hasContent){// Remember the hash so we can put it back 13385uncached=s.url.slice(cacheURL.length);// If data is available and should be processed, append data to url 13386if(s.data&&(s.processData||typeof s.data==="string")){cacheURL+=(rquery.test(cacheURL)?"&":"?")+s.data;// #9682: remove data so that it's not used in an eventual retry 13387delete s.data;}// Add or update anti-cache param if needed 13388if(s.cache===false){cacheURL=cacheURL.replace(rantiCache,"$1");uncached=(rquery.test(cacheURL)?"&":"?")+"_="+nonce++ +uncached;}// Put hash and anti-cache on the URL that will be requested (gh-1732) 13389s.url=cacheURL+uncached;// Change '%20' to '+' if this is encoded form body content (gh-2658) 13390}else if(s.data&&s.processData&&(s.contentType||"").indexOf("application/x-www-form-urlencoded")===0){s.data=s.data.replace(r20,"+");}// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. 13391if(s.ifModified){if(jQuery.lastModified[cacheURL]){jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[cacheURL]);}if(jQuery.etag[cacheURL]){jqXHR.setRequestHeader("If-None-Match",jQuery.etag[cacheURL]);}}// Set the correct header, if data is being sent 13392if(s.data&&s.hasContent&&s.contentType!==false||options.contentType){jqXHR.setRequestHeader("Content-Type",s.contentType);}// Set the Accepts header for the server, depending on the dataType 13393jqXHR.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+(s.dataTypes[0]!=="*"?", "+allTypes+"; q=0.01":""):s.accepts["*"]);// Check for headers option 13394for(i in s.headers){jqXHR.setRequestHeader(i,s.headers[i]);}// Allow custom headers/mimetypes and early abort 13395if(s.beforeSend&&(s.beforeSend.call(callbackContext,jqXHR,s)===false||completed)){// Abort if not done already and return 13396return jqXHR.abort();}// Aborting is no longer a cancellation 13397strAbort="abort";// Install callbacks on deferreds 13398completeDeferred.add(s.complete);jqXHR.done(s.success);jqXHR.fail(s.error);// Get transport 13399transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR);// If no transport, we auto-abort 13400if(!transport){done(-1,"No Transport");}else{jqXHR.readyState=1;// Send global event 13401if(fireGlobals){globalEventContext.trigger("ajaxSend",[jqXHR,s]);}// If request was aborted inside ajaxSend, stop there 13402if(completed){return jqXHR;}// Timeout 13403if(s.async&&s.timeout>0){timeoutTimer=window.setTimeout(function(){jqXHR.abort("timeout");},s.timeout);}try{completed=false;transport.send(requestHeaders,done);}catch(e){// Rethrow post-completion exceptions 13404if(completed){throw e;}// Propagate others as results 13405done(-1,e);}}// Callback for when everything is done 13406function done(status,nativeStatusText,responses,headers){var isSuccess,success,error,response,modified,statusText=nativeStatusText;// Ignore repeat invocations 13407if(completed){return;}completed=true;// Clear timeout if it exists 13408if(timeoutTimer){window.clearTimeout(timeoutTimer);}// Dereference transport for early garbage collection 13409// (no matter how long the jqXHR object will be used) 13410transport=undefined;// Cache response headers 13411responseHeadersString=headers||"";// Set readyState 13412jqXHR.readyState=status>0?4:0;// Determine if successful 13413isSuccess=status>=200&&status<300||status===304;// Get response data 13414if(responses){response=ajaxHandleResponses(s,jqXHR,responses);}// Convert no matter what (that way responseXXX fields are always set) 13415response=ajaxConvert(s,response,jqXHR,isSuccess);// If successful, handle type chaining 13416if(isSuccess){// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. 13417if(s.ifModified){modified=jqXHR.getResponseHeader("Last-Modified");if(modified){jQuery.lastModified[cacheURL]=modified;}modified=jqXHR.getResponseHeader("etag");if(modified){jQuery.etag[cacheURL]=modified;}}// if no content 13418if(status===204||s.type==="HEAD"){statusText="nocontent";// if not modified 13419}else if(status===304){statusText="notmodified";// If we have data, let's convert it 13420}else{statusText=response.state;success=response.data;error=response.error;isSuccess=!error;}}else{// Extract error from statusText and normalize for non-aborts 13421error=statusText;if(status||!statusText){statusText="error";if(status<0){status=0;}}}// Set data for the fake xhr object 13422jqXHR.status=status;jqXHR.statusText=(nativeStatusText||statusText)+"";// Success/Error 13423if(isSuccess){deferred.resolveWith(callbackContext,[success,statusText,jqXHR]);}else{deferred.rejectWith(callbackContext,[jqXHR,statusText,error]);}// Status-dependent callbacks 13424jqXHR.statusCode(_statusCode);_statusCode=undefined;if(fireGlobals){globalEventContext.trigger(isSuccess?"ajaxSuccess":"ajaxError",[jqXHR,s,isSuccess?success:error]);}// Complete 13425completeDeferred.fireWith(callbackContext,[jqXHR,statusText]);if(fireGlobals){globalEventContext.trigger("ajaxComplete",[jqXHR,s]);// Handle the global AJAX counter 13426if(! --jQuery.active){jQuery.event.trigger("ajaxStop");}}}return jqXHR;},getJSON:function getJSON(url,data,callback){return jQuery.get(url,data,callback,"json");},getScript:function getScript(url,callback){return jQuery.get(url,undefined,callback,"script");}});jQuery.each(["get","post"],function(i,method){jQuery[method]=function(url,data,callback,type){// Shift arguments if data argument was omitted 13427if(isFunction(data)){type=type||callback;callback=data;data=undefined;}// The url can be an options object (which then must have .url) 13428return jQuery.ajax(jQuery.extend({url:url,type:method,dataType:type,data:data,success:callback},jQuery.isPlainObject(url)&&url));};});jQuery._evalUrl=function(url){return jQuery.ajax({url:url,// Make this explicit, since user can override this through ajaxSetup (#11264) 13429type:"GET",dataType:"script",cache:true,async:false,global:false,"throws":true});};jQuery.fn.extend({wrapAll:function wrapAll(html){var wrap;if(this[0]){if(isFunction(html)){html=html.call(this[0]);}// The elements to wrap the target around 13430wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){wrap.insertBefore(this[0]);}wrap.map(function(){var elem=this;while(elem.firstElementChild){elem=elem.firstElementChild;}return elem;}).append(this);}return this;},wrapInner:function wrapInner(html){if(isFunction(html)){return this.each(function(i){jQuery(this).wrapInner(html.call(this,i));});}return this.each(function(){var self=jQuery(this),contents=self.contents();if(contents.length){contents.wrapAll(html);}else{self.append(html);}});},wrap:function wrap(html){var htmlIsFunction=isFunction(html);return this.each(function(i){jQuery(this).wrapAll(htmlIsFunction?html.call(this,i):html);});},unwrap:function unwrap(selector){this.parent(selector).not("body").each(function(){jQuery(this).replaceWith(this.childNodes);});return this;}});jQuery.expr.pseudos.hidden=function(elem){return!jQuery.expr.pseudos.visible(elem);};jQuery.expr.pseudos.visible=function(elem){return!!(elem.offsetWidth||elem.offsetHeight||elem.getClientRects().length);};jQuery.ajaxSettings.xhr=function(){try{return new window.XMLHttpRequest();}catch(e){}};var xhrSuccessStatus={// File protocol always yields status code 0, assume 200
134310:200,// Support: IE <=9 only 13432// #1450: sometimes IE returns 1223 when it should be 204 134331223:204},xhrSupported=jQuery.ajaxSettings.xhr();support.cors=!!xhrSupported&&"withCredentials"in xhrSupported;support.ajax=xhrSupported=!!xhrSupported;jQuery.ajaxTransport(function(options){var _callback,errorCallback;// Cross domain only allowed if supported through XMLHttpRequest 13434if(support.cors||xhrSupported&&!options.crossDomain){return{send:function send(headers,complete){var i,xhr=options.xhr();xhr.open(options.type,options.url,options.async,options.username,options.password);// Apply custom fields if provided 13435if(options.xhrFields){for(i in options.xhrFields){xhr[i]=options.xhrFields[i];}}// Override mime type if needed 13436if(options.mimeType&&xhr.overrideMimeType){xhr.overrideMimeType(options.mimeType);}// X-Requested-With header 13437// For cross-domain requests, seeing as conditions for a preflight are 13438// akin to a jigsaw puzzle, we simply never set it to be sure. 13439// (it can always be set on a per-request basis or even using ajaxSetup)
vendor: 6,187 bytes, lines 13440-13493
13440// For same-domain requests, won't change header if already provided. 13441if(!options.crossDomain&&!headers["X-Requested-With"]){headers["X-Requested-With"]="XMLHttpRequest";}// Set headers 13442for(i in headers){xhr.setRequestHeader(i,headers[i]);}// Callback 13443_callback=function callback(type){return function(){if(_callback){_callback=errorCallback=xhr.onload=xhr.onerror=xhr.onabort=xhr.ontimeout=xhr.onreadystatechange=null;if(type==="abort"){xhr.abort();}else if(type==="error"){// Support: IE <=9 only 13444// On a manual native abort, IE9 throws 13445// errors on any property access that is not readyState 13446if(typeof xhr.status!=="number"){complete(0,"error");}else{complete(// File: protocol always yields status 0; see #8605, #14207 13447xhr.status,xhr.statusText);}}else{complete(xhrSuccessStatus[xhr.status]||xhr.status,xhr.statusText,// Support: IE <=9 only 13448// IE9 has no XHR2 but throws on binary (trac-11426) 13449// For XHR2 non-text, let the caller handle it (gh-2498) 13450(xhr.responseType||"text")!=="text"||typeof xhr.responseText!=="string"?{binary:xhr.response}:{text:xhr.responseText},xhr.getAllResponseHeaders());}}};};// Listen to events 13451xhr.onload=_callback();errorCallback=xhr.onerror=xhr.ontimeout=_callback("error");// Support: IE 9 only 13452// Use onreadystatechange to replace onabort 13453// to handle uncaught aborts 13454if(xhr.onabort!==undefined){xhr.onabort=errorCallback;}else{xhr.onreadystatechange=function(){// Check readyState before timeout as it changes 13455if(xhr.readyState===4){// Allow onerror to be called first, 13456// but that will not handle a native abort 13457// Also, save errorCallback to a variable 13458// as xhr.onerror cannot be accessed 13459window.setTimeout(function(){if(_callback){errorCallback();}});}};}// Create the abort callback 13460_callback=_callback("abort");try{// Do send the request (this may raise an exception) 13461xhr.send(options.hasContent&&options.data||null);}catch(e){// #14683: Only rethrow if this hasn't been notified as an error yet 13462if(_callback){throw e;}}},abort:function abort(){if(_callback){_callback();}}};}});// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) 13463jQuery.ajaxPrefilter(function(s){if(s.crossDomain){s.contents.script=false;}});// Install script dataType 13464jQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, "+"application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function textScript(text){jQuery.globalEval(text);return text;}}});// Handle cache's special case and crossDomain 13465jQuery.ajaxPrefilter("script",function(s){if(s.cache===undefined){s.cache=false;}if(s.crossDomain){s.type="GET";}});// Bind script tag hack transport 13466jQuery.ajaxTransport("script",function(s){// This transport only deals with cross domain requests 13467if(s.crossDomain){var script,_callback2;return{send:function send(_,complete){script=jQuery("<script>").prop({charset:s.scriptCharset,src:s.url}).on("load error",_callback2=function callback(evt){script.remove();_callback2=null;if(evt){complete(evt.type==="error"?404:200,evt.type);}});// Use native DOM manipulation to avoid our domManip AJAX trickery 13468document.head.appendChild(script[0]);},abort:function abort(){if(_callback2){_callback2();}}};}});var oldCallbacks=[],rjsonp=/(=)\?(?=&|$)|\?\?/;// Default jsonp settings 13469jQuery.ajaxSetup({jsonp:"callback",jsonpCallback:function jsonpCallback(){var callback=oldCallbacks.pop()||jQuery.expando+"_"+nonce++;this[callback]=true;return callback;}});// Detect, normalize options and install callbacks for jsonp requests 13470jQuery.ajaxPrefilter("json jsonp",function(s,originalSettings,jqXHR){var callbackName,overwritten,responseContainer,jsonProp=s.jsonp!==false&&(rjsonp.test(s.url)?"url":typeof s.data==="string"&&(s.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&rjsonp.test(s.data)&&"data");// Handle iff the expected data type is "jsonp" or we have a parameter to set 13471if(jsonProp||s.dataTypes[0]==="jsonp"){// Get callback name, remembering preexisting value associated with it 13472callbackName=s.jsonpCallback=isFunction(s.jsonpCallback)?s.jsonpCallback():s.jsonpCallback;// Insert callback into url or form data 13473if(jsonProp){s[jsonProp]=s[jsonProp].replace(rjsonp,"$1"+callbackName);}else if(s.jsonp!==false){s.url+=(rquery.test(s.url)?"&":"?")+s.jsonp+"="+callbackName;}// Use data converter to retrieve json after script execution 13474s.converters["script json"]=function(){if(!responseContainer){jQuery.error(callbackName+" was not called");}return responseContainer[0];};// Force json dataType 13475s.dataTypes[0]="json";// Install callback 13476overwritten=window[callbackName];window[callbackName]=function(){responseContainer=arguments;};// Clean-up function (fires after converters) 13477jqXHR.always(function(){// If previous value didn't exist - remove it 13478if(overwritten===undefined){jQuery(window).removeProp(callbackName);// Otherwise restore preexisting value 13479}else{window[callbackName]=overwritten;}// Save back as free 13480if(s[callbackName]){// Make sure that re-using the options doesn't screw things around 13481s.jsonpCallback=originalSettings.jsonpCallback;// Save the callback name for future use 13482oldCallbacks.push(callbackName);}// Call if it was a function and we have a response 13483if(responseContainer&&isFunction(overwritten)){overwritten(responseContainer[0]);}responseContainer=overwritten=undefined;});// Delegate to script 13484return"script";}});// Support: Safari 8 only 13485// In Safari 8 documents created via document.implementation.createHTMLDocument 13486// collapse sibling forms: the second one becomes a child of the first one. 13487// Because of that, this security measure has to be disabled in Safari 8. 13488// https://bugs.webkit.org/show_bug.cgi?id=137337 13489support.createHTMLDocument=function(){var body=document.implementation.createHTMLDocument("").body;body.innerHTML="<form></form><form></form>";return body.childNodes.length===2;}();// Argument "data" should be string of html 13490// context (optional): If specified, the fragment will be created in this context, 13491// defaults to document 13492// keepScripts (optional): If true, will include scripts passed in the html string 13493jQuery.parseHTML=function(data,context,keepScripts){if(typeof data!=="str
vendor: 10,913 bytes, lines 13493-13571
13493ing"){return[];}if(typeof context==="boolean"){keepScripts=context;context=false;}var base,parsed,scripts;if(!context){// Stop scripts or inline event handlers from being executed immediately 13494// by using document.implementation 13495if(support.createHTMLDocument){context=document.implementation.createHTMLDocument("");// Set the base href for the created document 13496// so any parsed elements with URLs 13497// are based on the document's URL (gh-2965) 13498base=context.createElement("base");base.href=document.location.href;context.head.appendChild(base);}else{context=document;}}parsed=rsingleTag.exec(data);scripts=!keepScripts&&[];// Single tag 13499if(parsed){return[context.createElement(parsed[1])];}parsed=buildFragment([data],context,scripts);if(scripts&&scripts.length){jQuery(scripts).remove();}return jQuery.merge([],parsed.childNodes);};/** 13500 * Load a url into a page 13501 */jQuery.fn.load=function(url,params,callback){var selector,type,response,self=this,off=url.indexOf(" ");if(off>-1){selector=stripAndCollapse(url.slice(off));url=url.slice(0,off);}// If it's a function 13502if(isFunction(params)){// We assume that it's the callback 13503callback=params;params=undefined;// Otherwise, build a param string 13504}else if(params&&_typeof(params)==="object"){type="POST";}// If we have elements to modify, make the request 13505if(self.length>0){jQuery.ajax({url:url,// If "type" variable is undefined, then "GET" method will be used. 13506// Make value of this field explicit since 13507// user can override it through ajaxSetup method 13508type:type||"GET",dataType:"html",data:params}).done(function(responseText){// Save response for use in complete callback 13509response=arguments;self.html(selector?// If a selector was specified, locate the right elements in a dummy div 13510// Exclude scripts to avoid IE 'Permission Denied' errors 13511jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector):// Otherwise use the full result 13512responseText);// If the request succeeds, this function gets "data", "status", "jqXHR" 13513// but they are ignored because response was set above. 13514// If it fails, this function gets "jqXHR", "status", "error" 13515}).always(callback&&function(jqXHR,status){self.each(function(){callback.apply(this,response||[jqXHR.responseText,status,jqXHR]);});});}return this;};// Attach a bunch of functions for handling common AJAX events 13516jQuery.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(i,type){jQuery.fn[type]=function(fn){return this.on(type,fn);};});jQuery.expr.pseudos.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem;}).length;};jQuery.offset={setOffset:function setOffset(elem,options,i){var curPosition,curLeft,curCSSTop,curTop,curOffset,curCSSLeft,calculatePosition,position=jQuery.css(elem,"position"),curElem=jQuery(elem),props={};// Set position first, in-case top/left are set even on static elem 13517if(position==="static"){elem.style.position="relative";}curOffset=curElem.offset();curCSSTop=jQuery.css(elem,"top");curCSSLeft=jQuery.css(elem,"left");calculatePosition=(position==="absolute"||position==="fixed")&&(curCSSTop+curCSSLeft).indexOf("auto")>-1;// Need to be able to calculate position if either 13518// top or left is auto and position is either absolute or fixed 13519if(calculatePosition){curPosition=curElem.position();curTop=curPosition.top;curLeft=curPosition.left;}else{curTop=parseFloat(curCSSTop)||0;curLeft=parseFloat(curCSSLeft)||0;}if(isFunction(options)){// Use jQuery.extend here to allow modification of coordinates argument (gh-1848) 13520options=options.call(elem,i,jQuery.extend({},curOffset));}if(options.top!=null){props.top=options.top-curOffset.top+curTop;}if(options.left!=null){props.left=options.left-curOffset.left+curLeft;}if("using"in options){options.using.call(elem,props);}else{curElem.css(props);}}};jQuery.fn.extend({// offset() relates an element's border box to the document origin 13521offset:function offset(options){// Preserve chaining for setter 13522if(arguments.length){return options===undefined?this:this.each(function(i){jQuery.offset.setOffset(this,options,i);});}var rect,win,elem=this[0];if(!elem){return;}// Return zeros for disconnected and hidden (display: none) elements (gh-2310) 13523// Support: IE <=11 only 13524// Running getBoundingClientRect on a 13525// disconnected node in IE throws an error 13526if(!elem.getClientRects().length){return{top:0,left:0};}// Get document-relative position by adding viewport scroll to viewport-relative gBCR 13527rect=elem.getBoundingClientRect();win=elem.ownerDocument.defaultView;return{top:rect.top+win.pageYOffset,left:rect.left+win.pageXOffset};},// position() relates an element's margin box to its offset parent's padding box 13528// This corresponds to the behavior of CSS absolute positioning 13529position:function position(){if(!this[0]){return;}var offsetParent,offset,doc,elem=this[0],parentOffset={top:0,left:0};// position:fixed elements are offset from the viewport, which itself always has zero offset 13530if(jQuery.css(elem,"position")==="fixed"){// Assume position:fixed implies availability of getBoundingClientRect 13531offset=elem.getBoundingClientRect();}else{offset=this.offset();// Account for the *real* offset parent, which can be the document or its root element 13532// when a statically positioned element is identified 13533doc=elem.ownerDocument;offsetParent=elem.offsetParent||doc.documentElement;while(offsetParent&&(offsetParent===doc.body||offsetParent===doc.documentElement)&&jQuery.css(offsetParent,"position")==="static"){offsetParent=offsetParent.parentNode;}if(offsetParent&&offsetParent!==elem&&offsetParent.nodeType===1){// Incorporate borders into its offset, since they are outside its content origin 13534parentOffset=jQuery(offsetParent).offset();parentOffset.top+=jQuery.css(offsetParent,"borderTopWidth",true);parentOffset.left+=jQuery.css(offsetParent,"borderLeftWidth",true);}}// Subtract parent offsets and element margins 13535return{top:offset.top-parentOffset.top-jQuery.css(elem,"marginTop",true),left:offset.left-parentOffset.left-jQuery.css(elem,"marginLeft",true)};},// This method will return documentElement in the following cases: 13536// 1) For the element inside the iframe without offsetParent, this method will return 13537// documentElement of the parent window 13538// 2) For the hidden or detached element 13539// 3) For body or html element, i.e. in case of the html node - it will return itself 13540// 13541// but those exceptions were never presented as a real life use-cases 13542// and might be considered as more preferable results. 13543// 13544// This logic, however, is not guaranteed and can change at any point in the future 13545offsetParent:function offsetParent(){return this.map(function(){var offsetParent=this.offsetParent;while(offsetParent&&jQuery.css(offsetParent,"position")==="static"){offsetParent=offsetParent.offsetParent;}return offsetParent||documentElement;});}});// Create scrollLeft and scrollTop methods 13546jQuery.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(method,prop){var top="pageYOffset"===prop;jQuery.fn[method]=function(val){return access(this,function(elem,method,val){// Coalesce documents and windows 13547var win;if(isWindow(elem)){win=elem;}else if(elem.nodeType===9){win=elem.defaultView;}if(val===undefined){return win?win[prop]:elem[method];}if(win){win.scrollTo(!top?val:win.pageXOffset,top?val:win.pageYOffset);}else{elem[method]=val;}},method,val,arguments.length);};});// Support: Safari <=7 - 9.1, Chrome <=37 - 49 13548// Add the top/left cssHooks using jQuery.fn.position 13549// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 13550// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347 13551// getComputedStyle returns percent when specified for top/left/bottom/right; 13552// rather than make the css module depend on the offset module, just check for it here 13553jQuery.each(["top","left"],function(i,prop){jQuery.cssHooks[prop]=addGetHookIf(support.pixelPosition,function(elem,computed){if(computed){computed=curCSS(elem,prop);// If curCSS returns percentage, fallback to offset 13554return rnumnonpx.test(computed)?jQuery(elem).position()[prop]+"px":computed;}});});// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods 13555jQuery.each({Height:"height",Width:"width"},function(name,type){jQuery.each({padding:"inner"+name,content:type,"":"outer"+name},function(defaultExtra,funcName){// Margin is only for outerHeight, outerWidth 13556jQuery.fn[funcName]=function(margin,value){var chainable=arguments.length&&(defaultExtra||typeof margin!=="boolean"),extra=defaultExtra||(margin===true||value===true?"margin":"border");return access(this,function(elem,type,value){var doc;if(isWindow(elem)){// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729) 13557return funcName.indexOf("outer")===0?elem["inner"+name]:elem.document.documentElement["client"+name];}// Get document width or height 13558if(elem.nodeType===9){doc=elem.documentElement;// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], 13559// whichever is greatest 13560return Math.max(elem.body["scroll"+name],doc["scroll"+name],elem.body["offset"+name],doc["offset"+name],doc["client"+name]);}return value===undefined?// Get width or height on the element, requesting but not forcing parseFloat 13561jQuery.css(elem,type,extra):// Set width or height on the element 13562jQuery.style(elem,type,value,extra);},type,chainable?margin:undefined,chainable);};});});jQuery.each(("blur focus focusin focusout resize scroll click dblclick "+"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+"change select submit keydown keypress keyup contextmenu").split(" "),function(i,name){// Handle event binding 13563jQuery.fn[name]=function(data,fn){return arguments.length>0?this.on(name,null,data,fn):this.trigger(name);};});jQuery.fn.extend({hover:function hover(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut||fnOver);}});jQuery.fn.extend({bind:function bind(types,data,fn){return this.on(types,null,data,fn);},unbind:function unbind(types,fn){return this.off(types,null,fn);},delegate:function delegate(selector,types,data,fn){return this.on(types,selector,data,fn);},undelegate:function undelegate(selector,types,fn){// ( namespace ) or ( selector, types [, fn] ) 13564return arguments.length===1?this.off(selector,"**"):this.off(types,selector||"**",fn);}});// Bind a function to a context, optionally partially applying any 13565// arguments. 13566// jQuery.proxy is deprecated to promote standards (specifically Function#bind) 13567// However, it is not slated for removal any time soon 13568jQuery.proxy=function(fn,context){var tmp,args,proxy;if(typeof context==="string"){tmp=fn[context];context=fn;fn=tmp;}// Quick check to determine if target is callable, in the spec 13569// this throws a TypeError, but we will just return undefined. 13570if(!isFunction(fn)){return undefined;}// Simulated bind 13571args=_slice.call(arguments,2);proxy=function proxy(){return fn.apply(context||this,args.concat(_slice.call(arguments)));};
13571// Set the guid of unique handler to the same of original handler, so it can be removed 13572proxy.guid=fn.guid=fn.guid||jQuery.guid++;return proxy;};jQuery.holdReady=function(hold){if(hold){jQuery.readyWait++;}else{jQuery.ready(true);}};jQuery.isArray=Array.isArray;jQuery.parseJSON=JSON.parse;jQuery.nodeName=nodeName;jQuery.isFunction=isFunction;jQuery.isWindow=isWindow;jQuery.camelCase=camelCase;jQuery.type=toType;jQuery.now=Date.now;jQuery.isNumeric=function(obj){// As of jQuery 3.0, isNumeric is limited to 13573// strings and numbers (primitives or objects) 13574// that can be coerced to finite numbers (gh-2662) 13575var type=jQuery.type(obj);return(type==="number"||type==="string")&&// parseFloat NaNs numeric-cast false positives ("") 13576// ...but misinterprets leading-number strings, particularly hex literals ("0x...") 13577// subtraction forces infinities to NaN 13578!isNaN(obj-parseFloat(obj));};// Register as a named AMD module, since jQuery can be concatenated with other 13579// files that may use define, but not via a proper concatenation script that 13580// understands anonymous AMD modules. A named AMD is safest and most robust 13581// way to register. Lowercase jquery is used because AMD module names are 13582// derived from file names, and jQuery is normally delivered in a lowercase 13583// file name. Do this after creating the global so that if an AMD module wants 13584// to call noConflict to hide this version of jQuery, it will work. 13585// Note that for maximum portability, libraries that are not jQuery should 13586// declare themselves as anonymous modules, and avoid setting a global if an 13587// AMD loader is present. jQuery is a special case. For more information, see 13588// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon 13589if(true){!(__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return jQuery;}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==undefined&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__));}var// Map over jQuery in case of overwrite 13590_jQuery=window.jQuery,// Map over the $ in case of overwrite 13591_$=window.$;jQuery.noConflict=function(deep){if(window.$===jQuery){window.$=_$;}if(deep&&window.jQuery===jQuery){window.jQuery=_jQuery;}return jQuery;};// Expose jQuery and $ identifiers, even in AMD 13592// (#7102#comment:10, https://github.com/jquery/jquery/pull/557) 13593// and CommonJS for browser emulators (#13566) 13594if(!noGlobal){window.jQuery=window.$=jQuery;}return jQuery;});/***/},/* 5 */ /***/function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_RESULT__;/** 13595 * sifter.js 13596 * Copyright (c) 2013 Brian Reavis & contributors 13597 * 13598 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this 13599 * file except in compliance with the License. You may obtain a copy of the License at: 13600 * http://www.apache.org/licenses/LICENSE-2.0 13601 * 13602 * Unless required by applicable law or agreed to in writing, software distributed under 13603 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 13604 * ANY KIND, either express or implied. See the License for the specific language 13605 * governing permissions and limitations under the License. 13606 * 13607 * @author Brian Reavis <[email protected]> 13608 */(function(root,factory){if(true){!(__WEBPACK_AMD_DEFINE_FACTORY__=factory,__WEBPACK_AMD_DEFINE_RESULT__=typeof __WEBPACK_AMD_DEFINE_FACTORY__==='function'?__WEBPACK_AMD_DEFINE_FACTORY__.call(exports,__webpack_require__,exports,module):__WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_RESULT__!==undefined&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__));}else {}})(this,function(){/** 13609 * Textually searches arrays and hashes of objects 13610 * by property (or multiple properties). Designed 13611 * specifically for autocomplete. 13612 * 13613 * @constructor 13614 * @param {array|object} items 13615 * @param {object} items 13616 */var Sifter=function Sifter(items,settings){this.items=items;this.settings=settings||{diacritics:true};};/** 13617 * Splits a search string into an array of individual 13618 * regexps to be used to match results. 13619 * 13620 * @param {string} query 13621 * @returns {array} 13622 */Sifter.prototype.tokenize=function(query){query=trim(String(query||'').toLowerCase());if(!query||!query.length)return[];var i,n,regex,letter;var tokens=[];var words=query.split(/ +/);for(i=0,n=words.length;i<n;i++){regex=escape_regex(words[i]);if(this.settings.diacritics){for(letter in DIACRITICS){if(DIACRITICS.hasOwnProperty(letter)){regex=regex.replace(new RegExp(letter,'g'),DIACRITICS[letter]);}}}tokens.push({string:words[i],regex:new RegExp(regex,'i')});}return tokens;};
vendor: 6,276 bytes, lines 13622-13692
13622/** 13623 * Iterates over arrays and hashes. 13624 * 13625 * ``` 13626 * this.iterator(this.items, function(item, id) { 13627 * // invoked for each item 13628 * }); 13629 * ``` 13630 * 13631 * @param {array|object} object 13632 */Sifter.prototype.iterator=function(object,callback){var iterator;if(is_array(object)){iterator=Array.prototype.forEach||function(callback){for(var i=0,n=this.length;i<n;i++){callback(this[i],i,this);}};}else{iterator=function iterator(callback){for(var key in this){if(this.hasOwnProperty(key)){callback(this[key],key,this);}}};}iterator.apply(object,[callback]);};/** 13633 * Returns a function to be used to score individual results. 13634 * 13635 * Good matches will have a higher score than poor matches. 13636 * If an item is not a match, 0 will be returned by the function. 13637 * 13638 * @param {object|string} search 13639 * @param {object} options (optional) 13640 * @returns {function} 13641 */Sifter.prototype.getScoreFunction=function(search,options){var self,fields,tokens,token_count,nesting;self=this;search=self.prepareSearch(search,options);tokens=search.tokens;fields=search.options.fields;token_count=tokens.length;nesting=search.options.nesting;/** 13642 * Calculates how close of a match the 13643 * given value is against a search token. 13644 * 13645 * @param {mixed} value 13646 * @param {object} token 13647 * @return {number} 13648 */var scoreValue=function scoreValue(value,token){var score,pos;if(!value)return 0;value=String(value||'');pos=value.search(token.regex);if(pos===-1)return 0;score=token.string.length/value.length;if(pos===0)score+=0.5;return score;};/** 13649 * Calculates the score of an object 13650 * against the search query. 13651 * 13652 * @param {object} token 13653 * @param {object} data 13654 * @return {number} 13655 */var scoreObject=function(){var field_count=fields.length;if(!field_count){return function(){return 0;};}if(field_count===1){return function(token,data){return scoreValue(getattr(data,fields[0],nesting),token);};}return function(token,data){for(var i=0,sum=0;i<field_count;i++){sum+=scoreValue(getattr(data,fields[i],nesting),token);}return sum/field_count;};}();if(!token_count){return function(){return 0;};}if(token_count===1){return function(data){return scoreObject(tokens[0],data);};}if(search.options.conjunction==='and'){return function(data){var score;for(var i=0,sum=0;i<token_count;i++){score=scoreObject(tokens[i],data);if(score<=0)return 0;sum+=score;}return sum/token_count;};}else{return function(data){for(var i=0,sum=0;i<token_count;i++){sum+=scoreObject(tokens[i],data);}return sum/token_count;};}};/** 13656 * Returns a function that can be used to compare two 13657 * results, for sorting purposes. If no sorting should 13658 * be performed, `null` will be returned. 13659 * 13660 * @param {string|object} search 13661 * @param {object} options 13662 * @return function(a,b) 13663 */Sifter.prototype.getSortFunction=function(search,options){var i,n,self,field,fields,fields_count,multiplier,multipliers,get_field,implicit_score,sort;self=this;search=self.prepareSearch(search,options);sort=!search.query&&options.sort_empty||options.sort;/** 13664 * Fetches the specified sort field value 13665 * from a search result item. 13666 * 13667 * @param {string} name 13668 * @param {object} result 13669 * @return {mixed} 13670 */get_field=function get_field(name,result){if(name==='$score')return result.score;return getattr(self.items[result.id],name,options.nesting);};// parse options 13671fields=[];if(sort){for(i=0,n=sort.length;i<n;i++){if(search.query||sort[i].field!=='$score'){fields.push(sort[i]);}}}// the "$score" field is implied to be the primary 13672// sort field, unless it's manually specified 13673if(search.query){implicit_score=true;for(i=0,n=fields.length;i<n;i++){if(fields[i].field==='$score'){implicit_score=false;break;}}if(implicit_score){fields.unshift({field:'$score',direction:'desc'});}}else{for(i=0,n=fields.length;i<n;i++){if(fields[i].field==='$score'){fields.splice(i,1);break;}}}multipliers=[];for(i=0,n=fields.length;i<n;i++){multipliers.push(fields[i].direction==='desc'?-1:1);}// build function 13674fields_count=fields.length;if(!fields_count){return null;}else if(fields_count===1){field=fields[0].field;multiplier=multipliers[0];return function(a,b){return multiplier*cmp(get_field(field,a),get_field(field,b));};}else{return function(a,b){var i,result,a_value,b_value,field;for(i=0;i<fields_count;i++){field=fields[i].field;result=multipliers[i]*cmp(get_field(field,a),get_field(field,b));if(result)return result;}return 0;};}};/** 13675 * Parses a search query and returns an object 13676 * with tokens and fields ready to be populated 13677 * with results. 13678 * 13679 * @param {string} query 13680 * @param {object} options 13681 * @returns {object} 13682 */Sifter.prototype.prepareSearch=function(query,options){if(_typeof(query)==='object')return query;options=extend({},options);var option_fields=options.fields;var option_sort=options.sort;var option_sort_empty=options.sort_empty;if(option_fields&&!is_array(option_fields))options.fields=[option_fields];if(option_sort&&!is_array(option_sort))options.sort=[option_sort];if(option_sort_empty&&!is_array(option_sort_empty))options.sort_empty=[option_sort_empty];return{options:options,query:String(query||'').toLowerCase(),tokens:this.tokenize(query),total:0,items:[]};};/** 13683 * Searches through all items and returns a sorted array of matches. 13684 * 13685 * The `options` parameter can contain: 13686 * 13687 * - fields {string|array} 13688 * - sort {array} 13689 * - score {function} 13690 * - filter {bool} 13691 * - limit {integer} 13692 *
13693 * Returns an object containing: 13694 * 13695 * - options {object} 13696 * - query {string} 13697 * - tokens {array} 13698 * - total {int} 13699 * - items {array} 13700 * 13701 * @param {string} query 13702 * @param {object} options 13703 * @returns {object} 13704 */Sifter.prototype.search=function(query,options){var self=this,value,score,search,calculateScore;var fn_sort;var fn_score;search=this.prepareSearch(query,options);options=search.options;query=search.query;// generate result scoring function 13705fn_score=options.score||self.getScoreFunction(search);// perform search and sort 13706if(query.length){self.iterator(self.items,function(item,id){score=fn_score(item);if(options.filter===false||score>0){search.items.push({'score':score,'id':id});}});}else{self.iterator(self.items,function(item,id){search.items.push({'score':1,'id':id});});}fn_sort=self.getSortFunction(search,options);if(fn_sort)search.items.sort(fn_sort);// apply limits 13707search.total=search.items.length;if(typeof options.limit==='number'){search.items=search.items.slice(0,options.limit);}return search;};// utilities 13708// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 13709var cmp=function cmp(a,b){if(typeof a==='number'&&typeof b==='number'){return a>b?1:a<b?-1:0;}a=asciifold(String(a||''));b=asciifold(String(b||''));if(a>b)return 1;if(b>a)return-1;return 0;};var extend=function extend(a,b){var i,n,k,object;for(i=1,n=arguments.length;i<n;i++){object=arguments[i];if(!object)continue;for(k in object){if(object.hasOwnProperty(k)){a[k]=object[k];}}}return a;};/** 13710 * A property getter resolving dot-notation 13711 * @param {Object} obj The root object to fetch property on 13712 * @param {String} name The optionally dotted property name to fetch 13713 * @param {Boolean} nesting Handle nesting or not 13714 * @return {Object} The resolved property value 13715 */var getattr=function getattr(obj,name,nesting){if(!obj||!name)return;if(!nesting)return obj[name];var names=name.split(".");while(names.length&&(obj=obj[names.shift()])){;}return obj;};var trim=function trim(str){return(str+'').replace(/^\s+|\s+$|/g,'');};var escape_regex=function escape_regex(str){return(str+'').replace(/([.?*+^$[\]\\(){}|-])/g,'\\$1');};var is_array=Array.isArray||typeof $!=='undefined'&&$.isArray||function(object){return Object.prototype.toString.call(object)==='[object Array]';};var DIACRITICS={'a':'[aá¸á¸ÄÄÃâÇÇȺⱥȦȧẠạÃäÃà ÃáÄÄÃÃ£Ã Ã¥Ä ÄÃÄ Ä]','b':'[bâ¢Î²ÎB฿ðá]','c':'[cÄÄÄÄÄÄÄÄCÌcÌÃçá¸á¸È»È¼ÆÆÉá´ï¼£ï½]','d':'[dÄÄá¸á¸á¸á¸á¸á¸á¸á¸á¸á¸ÄÄD̦d̦ÆÉÆÉÆÆáµá¶á¶È¡á´ Dï½Ã°]','e':'[eÃéÃèÃêá¸á¸ÄÄÄÄẼẽá¸á¸áººáº»ÄÄÃëÄÄȨȩÄÄá¶ÉÉÈÈ áº¾áº¿á»á»á»á» á»á»á¸á¸á¸á¸á¸á¸ÈÈẸẹá»á»â±¸á´ï¼¥ï½ ÉÇÆÆÎµ]','f':'[fÆÆá¸á¸]','g':'[gÉ¢â²Ç¤Ç¥ÄÄÄÄĢģÆÉ Ä Ä¡]','h':'[hĤĥĦħḨḩáºáºá¸¤á¸¥á¸¢á¸£É¦Ê°Ç¶Æ]','i':'[iÃÃÃìĬÄÃîÇÇÃïḮḯĨĩĮįĪīá»á»ÈÈÈÈá»á»á¸¬á¸ÆÉ¨É¨Ìáµ»á¶Ä°iIıɪIï½]','j':'[jȷĴĵÉÉÊÉʲ]','k':'[kÆÆêêḰḱǨǩḲḳḴḵκϰâ]','l':'[lÅÅĽľĻļĹĺḶḷḸḹḼḽḺḻĿÅȽÆâ± ⱡⱢɫɬᶠÉÈ´ÊLï½]','n':'[nÅÅǸǹÅÅÃñá¹á¹ Å Åá¹á¹á¹á¹á¹á¹NÌnÌÆÉ²È Æáµ°á¶É³ÈµÉ´ï¼®ï½ÅÅ]','o':'[oÃøÃöÃóÃòÃôÇÇÅÅÅÅȮȯá»á»ÆÉµÆ Æ¡á»á»ÅÅÃõǪǫÈÈÕÖ ]','p':'[pá¹á¹á¹á¹â±£áµ½Æ¤Æ¥áµ±]','q':'[qêêÊ ÉÉêêqÌ]','r':'[rÅÅÉÉÅÅÅÅá¹á¹ÈÈÈÈá¹á¹â±¤É½]','s':'[sÅÅṠṡṢṣê¨ê©ÅÅÅ Å¡ÅÅÈÈSÌsÌ]','t':'[tÅ¤Å¥á¹ªá¹«Å¢Å£á¹¬á¹Æ®ÊÈÈṰṱṮṯƬÆ]','u':'[uŬÅÉÊỤụÃüÃúÃùÃûÇÇŰűŬů¯Æ°á»¦á»§ÅªÅ«Å¨Å©Å²Å³ÈÈâª]','v':'[vṼṽṾṿƲÊêêâ±±Ê]','w':'[wáºáºáºáºÅ´Åµáºáº áºáºáºáº]','x':'[xáºáºáºáºÏ]','y':'[yÃýỲỳŶŷŸÿỸỹáºáºá»´á»µÉÉÆ³Æ´]','z':'[zŹźáºáºÅ½Å¾Å»Å¼áºáºáºáºÆµÆ¶]'};var asciifold=function(){var i,n,k,chunk;var foreignletters='';var lookup={};for(k in DIACRITICS){if(DIACRITICS.hasOwnProperty(k)){chunk=DIACRITICS[k].substring(2,DIACRITICS[k].length-1);foreignletters+=chunk;for(i=0,n=chunk.length;i<n;i++){lookup[chunk.charAt(i)]=k;}}}var regexp=new RegExp('['+foreignletters+']','g');return function(str){return str.replace(regexp,function(foreignletter){return lookup[foreignletter];}).toLowerCase();};}();// export 13716// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 13717return Sifter;});/***/},/* 6 */ /***/function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_RESULT__;/** 13718 * microplugin.js 13719 * Copyright (c) 2013 Brian Reavis & contributors 13720 * 13721 * Licensed under the Apache License, Version 2.0 (the "License");
13721 you may not use this 13722 * file except in compliance with the License. You may obtain a copy of the License at: 13723 * http://www.apache.org/licenses/LICENSE-2.0 13724 * 13725 * Unless required by applicable law or agreed to in writing, software distributed under 13726 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 13727 * ANY KIND, either express or implied. See the License for the specific language 13728 * governing permissions and limitations under the License. 13729 * 13730 * @author Brian Reavis <[email protected]> 13731 */(function(root,factory){if(true){!(__WEBPACK_AMD_DEFINE_FACTORY__=factory,__WEBPACK_AMD_DEFINE_RESULT__=typeof __WEBPACK_AMD_DEFINE_FACTORY__==='function'?__WEBPACK_AMD_DEFINE_FACTORY__.call(exports,__webpack_require__,exports,module):__WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_RESULT__!==undefined&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__));}else {}})(this,function(){var MicroPlugin={};MicroPlugin.mixin=function(Interface){Interface.plugins={};/** 13732 * Initializes the listed plugins (with options). 13733 * Acceptable formats: 13734 * 13735 * List (without options): 13736 * ['a', 'b', 'c'] 13737 * 13738 * List (with options): 13739 * [{'name': 'a', options: {}}, {'name': 'b', options: {}}] 13740 * 13741 * Hash (with options): 13742 * {'a': { ... }, 'b': { ... }, 'c': { ... }} 13743 * 13744 * @param {mixed} plugins 13745 */Interface.prototype.initializePlugins=function(plugins){var i,n,key;var self=this;var queue=[];self.plugins={names:[],settings:{},requested:{},loaded:{}};if(utils.isArray(plugins)){for(i=0,n=plugins.length;i<n;i++){if(typeof plugins[i]==='string'){queue.push(plugins[i]);}else{self.plugins.settings[plugins[i].name]=plugins[i].options;queue.push(plugins[i].name);}}}else if(plugins){for(key in plugins){if(plugins.hasOwnProperty(key)){self.plugins.settings[key]=plugins[key];queue.push(key);}}}while(queue.length){self.require(queue.shift());}};Interface.prototype.loadPlugin=function(name){var self=this;var plugins=self.plugins;var plugin=Interface.plugins[name];if(!Interface.plugins.hasOwnProperty(name)){throw new Error('Unable to find "'+name+'" plugin');}plugins.requested[name]=true;plugins.loaded[name]=plugin.fn.apply(self,[self.plugins.settings[name]||{}]);plugins.names.push(name);};/** 13746 * Initializes a plugin. 13747 * 13748 * @param {string} name 13749 */Interface.prototype.require=function(name){var self=this;var plugins=self.plugins;if(!self.plugins.loaded.hasOwnProperty(name)){if(plugins.requested[name]){throw new Error('Plugin has circular dependency ("'+name+'")');}self.loadPlugin(name);}return plugins.loaded[name];};/** 13750 * Registers a plugin. 13751 * 13752 * @param {string} name 13753 * @param {function} fn 13754 */Interface.define=function(name,fn){Interface.plugins[name]={'name':name,'fn':fn};};};var utils={isArray:Array.isArray||function(vArg){return Object.prototype.toString.call(vArg)==='[object Array]';}};return MicroPlugin;});/***/}/******/]); 13755 13756/***/ }), 13757 13758/***/ 364: 13759/***/ (function(module, exports) { 13760 13761//click on hidden button to trigger postback 13762var btn = document.querySelector('.floating-btn--feedback'); 13763var trigger = document.querySelector('[data-modal-trigger="website-feedback"]'); 13764 13765if (btn && trigger) { 13766 btn.addEventListener('click', function () { 13767 trigger.click(); 13768 }); 13769} 13770 13771/***/ }), 13772 13773/***/ 365: 13774/***/ (function(module, exports) { 13775 13776function senderHasCustomLoading(sender) { 13777 var hasCustomLoading = false; 13778 13779 if (sender && sender._postBackSettings && sender._postBackSettings.sourceElement) { 13780 var el = sender._postBackSettings.sourceElement; 13781 var dataValue = el.getAttribute("data-custom-loading"); 13782 var senderList = [].slice.call(document.querySelectorAll('[data-custom-loading]')); 13783 13784 if (senderList && senderList.length) { 13785 hasCustomLoading = senderList.filter(function (senderEl) { 13786 return senderEl.getAttribute("data-custom-loading") == dataValue; 13787 }).length > 0; 13788 } 13789 } 13790
13791 return hasCustomLoading; 13792} 13793 13794window.senderHasCustomLoading = senderHasCustomLoading; 13795 13796/***/ }), 13797 13798/***/ 443: 13799/***/ (function(module, __webpack_exports__, __webpack_require__) { 13800 13801"use strict"; 13802__webpack_require__.r(__webpack_exports__); 13803/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); 13804/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 13805 // import '@babel/polyfill' 13806 13807window.jQuery = window.$ = __webpack_require__(0); 13808window.pageScroll = __webpack_require__(35); 13809 13810var productPage = __webpack_require__(362); 13811 13812var functions = __webpack_require__(363); 13813 13814var feedbackFormPostbackTrigger = __webpack_require__(364); 13815 13816var customLoading = __webpack_require__(365); 13817 13818/***/ }) 13819 13820/******/ });
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.