| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 |
|
| 14 | ( function( global, factory ) {
|
| 15 |
|
| 16 | "use strict";
|
| 17 |
|
| 18 | if ( typeof module === "object" && typeof module.exports === "object" ) {
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 | module.exports = global.document ?
|
| 28 | factory( global, true ) :
|
| 29 | function( w ) {
|
| 30 | if ( !w.document ) {
|
| 31 | throw new Error( "jQuery requires a window with a document" );
|
| 32 | }
|
| 33 | return factory( w );
|
| 34 | };
|
| 35 | } else {
|
| 36 | factory( global );
|
| 37 | }
|
| 38 |
|
| 39 |
|
| 40 | } )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 | "use strict";
|
| 47 |
|
| 48 | var arr = [];
|
| 49 |
|
| 50 | var getProto = Object.getPrototypeOf;
|
| 51 |
|
| 52 | var slice = arr.slice;
|
| 53 |
|
| 54 | var flat = arr.flat ? function( array ) {
|
| 55 | return arr.flat.call( array );
|
| 56 | } : function( array ) {
|
| 57 | return arr.concat.apply( [], array );
|
| 58 | };
|
| 59 |
|
| 60 |
|
| 61 | var push = arr.push;
|
| 62 |
|
| 63 | var indexOf = arr.indexOf;
|
| 64 |
|
| 65 | var class2type = {};
|
| 66 |
|
| 67 | var toString = class2type.toString;
|
| 68 |
|
| 69 | var hasOwn = class2type.hasOwnProperty;
|
| 70 |
|
| 71 | var fnToString = hasOwn.toString;
|
| 72 |
|
| 73 | var ObjectFunctionString = fnToString.call( Object );
|
| 74 |
|
| 75 | var support = {};
|
| 76 |
|
| 77 | var isFunction = function isFunction( obj ) {
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 | return typeof obj === "function" && typeof obj.nodeType !== "number" &&
|
| 87 | typeof obj.item !== "function";
|
| 88 | };
|
| 89 |
|
| 90 |
|
| 91 | var isWindow = function isWindow( obj ) {
|
| 92 | return obj != null && obj === obj.window;
|
| 93 | };
|
| 94 |
|
| 95 |
|
| 96 | var document = window.document;
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 | var preservedScriptAttributes = {
|
| 101 | type: true,
|
| 102 | src: true,
|
| 103 | nonce: true,
|
| 104 | noModule: true
|
| 105 | };
|
| 106 |
|
| 107 | function DOMEval( code, node, doc ) {
|
| 108 | doc = doc || document;
|
| 109 |
|
| 110 | var i, val,
|
| 111 | script = doc.createElement( "script" );
|
| 112 |
|
| 113 | script.text = code;
|
| 114 | if ( node ) {
|
| 115 | for ( i in preservedScriptAttributes ) {
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
|
| 127 | val = node[ i ] || node.getAttribute && node.getAttribute( i );
|
| 128 | if ( val ) {
|
| 129 | script.setAttribute( i, val );
|
| 130 | }
|
| 131 | }
|
| 132 | }
|
| 133 | doc.head.appendChild( script ).parentNode.removeChild( script );
|
| 134 | }
|
| 135 |
|
| 136 |
|
| 137 | function toType( obj ) {
|
| 138 | if ( obj == null ) {
|
| 139 | return obj + "";
|
| 140 | }
|
| 141 |
|
| 142 |
|
| 143 | return typeof obj === "object" || typeof obj === "function" ?
|
| 144 | class2type[ toString.call( obj ) ] || "object" :
|
| 145 | typeof obj;
|
| 146 | }
|
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
|
| 153 | var
|
| 154 | version = "3.6.3",
|
| 155 |
|
| 156 |
|
| 157 | jQuery = function( selector, context ) {
|
| 158 |
|
| 159 |
|
| 160 |
|
| 161 | return new jQuery.fn.init( selector, context );
|
| 162 | };
|
| 163 |
|
| 164 | jQuery.fn = jQuery.prototype = {
|
| 165 |
|
| 166 |
|
| 167 | jquery: version,
|
| 168 |
|
| 169 | constructor: jQuery,
|
| 170 |
|
| 171 | // The default length of a jQuery object is 0
|
| 172 | length: 0,
|
| 173 |
|
| 174 | toArray: function() {
|
| 175 | return slice.call( this );
|
| 176 | },
|
| 177 |
|
| 178 |
|
| 179 |
|
| 180 | get: function( num ) {
|
| 181 |
|
| 182 |
|
| 183 | if ( num == null ) {
|
| 184 | return slice.call( this );
|
| 185 | }
|
| 186 |
|
| 187 |
|
| 188 | return num < 0 ? this[ num + this.length ] : this[ num ];
|
| 189 | },
|
| 190 |
|
| 191 |
|
| 192 |
|
| 193 | pushStack: function( elems ) {
|
| 194 |
|
| 195 |
|
| 196 | var ret = jQuery.merge( this.constructor(), elems );
|
| 197 |
|
| 198 |
|
| 199 | ret.prevObject = this;
|
| 200 |
|
| 201 |
|
| 202 | return ret;
|
| 203 | },
|
| 204 |
|
| 205 |
|
| 206 | each: function( callback ) {
|
| 207 | return jQuery.each( this, callback );
|
| 208 | },
|
| 209 |
|
| 210 | map: function( callback ) {
|
| 211 | return this.pushStack( jQuery.map( this, function( elem, i ) {
|
| 212 | return callback.call( elem, i, elem );
|
| 213 | } ) );
|
| 214 | },
|
| 215 |
|
| 216 | slice: function() {
|
| 217 | return this.pushStack( slice.apply( this, arguments ) );
|
| 218 | },
|
| 219 |
|
| 220 | first: function() {
|
| 221 | return this.eq( 0 );
|
| 222 | },
|
| 223 |
|
| 224 | last: function() {
|
| 225 | return this.eq( -1 );
|
| 226 | },
|
| 227 |
|
| 228 | even: function() {
|
| 229 | return this.pushStack( jQuery.grep( this, function( _elem, i ) {
|
| 230 | return ( i + 1 ) % 2;
|
| 231 | } ) );
|
| 232 | },
|
| 233 |
|
| 234 | odd: function() {
|
| 235 | return this.pushStack( jQuery.grep( this, function( _elem, i ) {
|
| 236 | return i % 2;
|
| 237 | } ) );
|
| 238 | },
|
| 239 |
|
| 240 | eq: function( i ) {
|
| 241 | var len = this.length,
|
| 242 | j = +i + ( i < 0 ? len : 0 );
|
| 243 | return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
|
| 244 | },
|
| 245 |
|
| 246 | end: function() {
|
| 247 | return this.prevObject || this.constructor();
|
| 248 | },
|
| 249 |
|
| 250 |
|
| 251 |
|
| 252 | push: push,
|
| 253 | sort: arr.sort,
|
| 254 | splice: arr.splice
|
| 255 | };
|
| 256 |
|
| 257 | jQuery.extend = jQuery.fn.extend = function() {
|
| 258 | var options, name, src, copy, copyIsArray, clone,
|
| 259 | target = arguments[ 0 ] || {},
|
| 260 | i = 1,
|
| 261 | length = arguments.length,
|
| 262 | deep = false;
|
| 263 |
|
| 264 |
|
| 265 | if ( typeof target === "boolean" ) {
|
| 266 | deep = target;
|
| 267 |
|
| 268 |
|
| 269 | target = arguments[ i ] || {};
|
| 270 | i++;
|
| 271 | }
|
| 272 |
|
| 273 |
|
| 274 | if ( typeof target !== "object" && !isFunction( target ) ) {
|
| 275 | target = {};
|
| 276 | }
|
| 277 |
|
| 278 |
|
| 279 | if ( i === length ) {
|
| 280 | target = this;
|
| 281 | i--;
|
| 282 | }
|
| 283 |
|
| 284 | for ( ; i < length; i++ ) {
|
| 285 |
|
| 286 |
|
| 287 | if ( ( options = arguments[ i ] ) != null ) {
|
| 288 |
|
| 289 |
|
| 290 | for ( name in options ) {
|
| 291 | copy = options[ name ];
|
| 292 |
|
| 293 |
|
| 294 |
|
| 295 | if ( name === "__proto__" || target === copy ) {
|
| 296 | continue;
|
| 297 | }
|
| 298 |
|
| 299 |
|
| 300 | if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
|
| 301 | ( copyIsArray = Array.isArray( copy ) ) ) ) {
|
| 302 | src = target[ name ];
|
| 303 |
|
| 304 |
|
| 305 | if ( copyIsArray && !Array.isArray( src ) ) {
|
| 306 | clone = [];
|
| 307 | } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {
|
| 308 | clone = {};
|
| 309 | } else {
|
| 310 | clone = src;
|
| 311 | }
|
| 312 | copyIsArray = false;
|
| 313 |
|
| 314 |
|
| 315 | target[ name ] = jQuery.extend( deep, clone, copy );
|
| 316 |
|
| 317 |
|
| 318 | } else if ( copy !== undefined ) {
|
| 319 | target[ name ] = copy;
|
| 320 | }
|
| 321 | }
|
| 322 | }
|
| 323 | }
|
| 324 |
|
| 325 |
|
| 326 | return target;
|
| 327 | };
|
| 328 |
|
| 329 | jQuery.extend( {
|
| 330 |
|
| 331 |
|
| 332 | expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
|
| 333 |
|
| 334 |
|
| 335 | isReady: true,
|
| 336 |
|
| 337 | error: function( msg ) {
|
| 338 | throw new Error( msg );
|
| 339 | },
|
| 340 |
|
| 341 | noop: function() {},
|
| 342 |
|
| 343 | isPlainObject: function( obj ) {
|
| 344 | var proto, Ctor;
|
| 345 |
|
| 346 |
|
| 347 |
|
| 348 | if ( !obj || toString.call( obj ) !== "[object Object]" ) {
|
| 349 | return false;
|
| 350 | }
|
| 351 |
|
| 352 | proto = getProto( obj );
|
| 353 |
|
| 354 |
|
| 355 | if ( !proto ) {
|
| 356 | return true;
|
| 357 | }
|
| 358 |
|
| 359 |
|
| 360 | Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;
|
| 361 | return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString;
|
| 362 | },
|
| 363 |
|
| 364 | isEmptyObject: function( obj ) {
|
| 365 | var name;
|
| 366 |
|
| 367 | for ( name in obj ) {
|
| 368 | return false;
|
| 369 | }
|
| 370 | return true;
|
| 371 | },
|
| 372 |
|
| 373 |
|
| 374 |
|
| 375 | globalEval: function( code, options, doc ) {
|
| 376 | DOMEval( code, { nonce: options && options.nonce }, doc );
|
| 377 | },
|
| 378 |
|
| 379 | each: function( obj, callback ) {
|
| 380 | var length, i = 0;
|
| 381 |
|
| 382 | if ( isArrayLike( obj ) ) {
|
| 383 | length = obj.length;
|
| 384 | for ( ; i < length; i++ ) {
|
| 385 | if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
|
| 386 | break;
|
| 387 | }
|
| 388 | }
|
| 389 | } else {
|
| 390 | for ( i in obj ) {
|
| 391 | if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
|
| 392 | break;
|
| 393 | }
|
| 394 | }
|
| 395 | }
|
| 396 |
|
| 397 | return obj;
|
| 398 | },
|
| 399 |
|
| 400 |
|
| 401 | makeArray: function( arr, results ) {
|
| 402 | var ret = results || [];
|
| 403 |
|
| 404 | if ( arr != null ) {
|
| 405 | if ( isArrayLike( Object( arr ) ) ) {
|
| 406 | jQuery.merge( ret,
|
| 407 | typeof arr === "string" ?
|
| 408 | [ arr ] : arr
|
| 409 | );
|
| 410 | } else {
|
| 411 | push.call( ret, arr );
|
| 412 | }
|
| 413 | }
|
| 414 |
|
| 415 | return ret;
|
| 416 | },
|
| 417 |
|
| 418 | inArray: function( elem, arr, i ) {
|
| 419 | return arr == null ? -1 : indexOf.call( arr, elem, i );
|
| 420 | },
|
| 421 |
|
| 422 |
|
| 423 |
|
| 424 | merge: function( first, second ) {
|
| 425 | var len = +second.length,
|
| 426 | j = 0,
|
| 427 | i = first.length;
|
| 428 |
|
| 429 | for ( ; j < len; j++ ) {
|
| 430 | first[ i++ ] = second[ j ];
|
| 431 | }
|
| 432 |
|
| 433 | first.length = i;
|
| 434 |
|
| 435 | return first;
|
| 436 | },
|
| 437 |
|
| 438 | grep: function( elems, callback, invert ) {
|
| 439 | var callbackInverse,
|
| 440 | matches = [],
|
| 441 | i = 0,
|
| 442 | length = elems.length,
|
| 443 | callbackExpect = !invert;
|
| 444 |
|
| 445 |
|
| 446 |
|
| 447 | for ( ; i < length; i++ ) {
|
| 448 | callbackInverse = !callback( elems[ i ], i );
|
| 449 | if ( callbackInverse !== callbackExpect ) {
|
| 450 | matches.push( elems[ i ] );
|
| 451 | }
|
| 452 | }
|
| 453 |
|
| 454 | return matches;
|
| 455 | },
|
| 456 |
|
| 457 |
|
| 458 | map: function( elems, callback, arg ) {
|
| 459 | var length, value,
|
| 460 | i = 0,
|
| 461 | ret = [];
|
| 462 |
|
| 463 |
|
| 464 | if ( isArrayLike( elems ) ) {
|
| 465 | length = elems.length;
|
| 466 | for ( ; i < length; i++ ) {
|
| 467 | value = callback( elems[ i ], i, arg );
|
| 468 |
|
| 469 | if ( value != null ) {
|
| 470 | ret.push( value );
|
| 471 | }
|
| 472 | }
|
| 473 |
|
| 474 |
|
| 475 | } else {
|
| 476 | for ( i in elems ) {
|
| 477 | value = callback( elems[ i ], i, arg );
|
| 478 |
|
| 479 | if ( value != null ) {
|
| 480 | ret.push( value );
|
| 481 | }
|
| 482 | }
|
| 483 | }
|
| 484 |
|
| 485 |
|
| 486 | return flat( ret );
|
| 487 | },
|
| 488 |
|
| 489 |
|
| 490 | guid: 1,
|
| 491 |
|
| 492 |
|
| 493 |
|
| 494 | support: support
|
| 495 | } );
|
| 496 |
|
| 497 | if ( typeof Symbol === "function" ) {
|
| 498 | jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
|
| 499 | }
|
| 500 |
|
| 501 |
|
| 502 | jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
|
| 503 | function( _i, name ) {
|
| 504 | class2type[ "[object " + name + "]" ] = name.toLowerCase();
|
| 505 | } );
|
| 506 |
|
| 507 | function isArrayLike( obj ) {
|
| 508 |
|
| 509 |
|
| 510 |
|
| 511 |
|
| 512 |
|
| 513 | var length = !!obj && "length" in obj && obj.length,
|
| 514 | type = toType( obj );
|
| 515 |
|
| 516 | if ( isFunction( obj ) || isWindow( obj ) ) {
|
| 517 | return false;
|
| 518 | }
|
| 519 |
|
| 520 | return type === "array" || length === 0 ||
|
| 521 | typeof length === "number" && length > 0 && ( length - 1 ) in obj;
|
| 522 | }
|
| 523 | var Sizzle =
|
| 524 | |
| 525 | |
| 526 | |
| 527 | |
| 528 | |
| 529 | |
| 530 | |
| 531 | |
| 532 | |
| 533 |
|
| 534 | ( function( window ) {
|
| 535 | var i,
|
| 536 | support,
|
| 537 | Expr,
|
| 538 | getText,
|
| 539 | isXML,
|
| 540 | tokenize,
|
| 541 | compile,
|
| 542 | select,
|
| 543 | outermostContext,
|
| 544 | sortInput,
|
| 545 | hasDuplicate,
|
| 546 |
|
| 547 |
|
| 548 | setDocument,
|
| 549 | document,
|
| 550 | docElem,
|
| 551 | documentIsHTML,
|
| 552 | rbuggyQSA,
|
| 553 | rbuggyMatches,
|
| 554 | matches,
|
| 555 | contains,
|
| 556 |
|
| 557 |
|
| 558 | expando = "sizzle" + 1 * new Date(),
|
| 559 | preferredDoc = window.document,
|
| 560 | dirruns = 0,
|
| 561 | done = 0,
|
| 562 | classCache = createCache(),
|
| 563 | tokenCache = createCache(),
|
| 564 | compilerCache = createCache(),
|
| 565 | nonnativeSelectorCache = createCache(),
|
| 566 | sortOrder = function( a, b ) {
|
| 567 | if ( a === b ) {
|
| 568 | hasDuplicate = true;
|
| 569 | }
|
| 570 | return 0;
|
| 571 | },
|
| 572 |
|
| 573 |
|
| 574 | hasOwn = ( {} ).hasOwnProperty,
|
| 575 | arr = [],
|
| 576 | pop = arr.pop,
|
| 577 | pushNative = arr.push,
|
| 578 | push = arr.push,
|
| 579 | slice = arr.slice,
|
| 580 |
|
| 581 |
|
| 582 |
|
| 583 | indexOf = function( list, elem ) {
|
| 584 | var i = 0,
|
| 585 | len = list.length;
|
| 586 | for ( ; i < len; i++ ) {
|
| 587 | if ( list[ i ] === elem ) {
|
| 588 | return i;
|
| 589 | }
|
| 590 | }
|
| 591 | return -1;
|
| 592 | },
|
| 593 |
|
| 594 | booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" +
|
| 595 | "ismap|loop|multiple|open|readonly|required|scoped",
|
| 596 |
|
| 597 |
|
| 598 |
|
| 599 |
|
| 600 | whitespace = "[\\x20\\t\\r\\n\\f]",
|
| 601 |
|
| 602 |
|
| 603 | identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace +
|
| 604 | "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",
|
| 605 |
|
| 606 |
|
| 607 | attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
|
| 608 |
|
| 609 |
|
| 610 | "*([*^$|!~]?=)" + whitespace +
|
| 611 |
|
| 612 |
|
| 613 |
|
| 614 | "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" +
|
| 615 | whitespace + "*\\]",
|
| 616 |
|
| 617 | pseudos = ":(" + identifier + ")(?:\\((" +
|
| 618 |
|
| 619 |
|
| 620 |
|
| 621 | "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
|
| 622 |
|
| 623 |
|
| 624 | "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
|
| 625 |
|
| 626 |
|
| 627 | ".*" +
|
| 628 | ")\\)|)",
|
| 629 |
|
| 630 |
|
| 631 | rwhitespace = new RegExp( whitespace + "+", "g" ),
|
| 632 | rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" +
|
| 633 | whitespace + "+$", "g" ),
|
| 634 |
|
| 635 | rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
|
| 636 | rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace +
|
| 637 | "*" ),
|
| 638 | rdescend = new RegExp( whitespace + "|>" ),
|
| 639 |
|
| 640 | rpseudo = new RegExp( pseudos ),
|
| 641 | ridentifier = new RegExp( "^" + identifier + "$" ),
|
| 642 |
|
| 643 | matchExpr = {
|
| 644 | "ID": new RegExp( "^#(" + identifier + ")" ),
|
| 645 | "CLASS": new RegExp( "^\\.(" + identifier + ")" ),
|
| 646 | "TAG": new RegExp( "^(" + identifier + "|[*])" ),
|
| 647 | "ATTR": new RegExp( "^" + attributes ),
|
| 648 | "PSEUDO": new RegExp( "^" + pseudos ),
|
| 649 | "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" +
|
| 650 | whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" +
|
| 651 | whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
|
| 652 | "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
|
| 653 |
|
| 654 |
|
| 655 |
|
| 656 | "needsContext": new RegExp( "^" + whitespace +
|
| 657 | "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace +
|
| 658 | "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
|
| 659 | },
|
| 660 |
|
| 661 | rhtml = /HTML$/i,
|
| 662 | rinputs = /^(?:input|select|textarea|button)$/i,
|
| 663 | rheader = /^h\d$/i,
|
| 664 |
|
| 665 | rnative = /^[^{]+\{\s*\[native \w/,
|
| 666 |
|
| 667 |
|
| 668 | rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
|
| 669 |
|
| 670 | rsibling = /[+~]/,
|
| 671 |
|
| 672 |
|
| 673 |
|
| 674 | runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g" ),
|
| 675 | funescape = function( escape, nonHex ) {
|
| 676 | var high = "0x" + escape.slice( 1 ) - 0x10000;
|
| 677 |
|
| 678 | return nonHex ?
|
| 679 |
|
| 680 |
|
| 681 | nonHex :
|
| 682 |
|
| 683 |
|
| 684 |
|
| 685 |
|
| 686 |
|
| 687 | high < 0 ?
|
| 688 | String.fromCharCode( high + 0x10000 ) :
|
| 689 | String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
|
| 690 | },
|
| 691 |
|
| 692 |
|
| 693 |
|
| 694 | rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
|
| 695 | fcssescape = function( ch, asCodePoint ) {
|
| 696 | if ( asCodePoint ) {
|
| 697 |
|
| 698 |
|
| 699 | if ( ch === "\0" ) {
|
| 700 | return "\uFFFD";
|
| 701 | }
|
| 702 |
|
| 703 |
|
| 704 | return ch.slice( 0, -1 ) + "\\" +
|
| 705 | ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
|
| 706 | }
|
| 707 |
|
| 708 |
|
| 709 | return "\\" + ch;
|
| 710 | },
|
| 711 |
|
| 712 |
|
| 713 |
|
| 714 |
|
| 715 |
|
| 716 | unloadHandler = function() {
|
| 717 | setDocument();
|
| 718 | },
|
| 719 |
|
| 720 | inDisabledFieldset = addCombinator(
|
| 721 | function( elem ) {
|
| 722 | return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset";
|
| 723 | },
|
| 724 | { dir: "parentNode", next: "legend" }
|
| 725 | );
|
| 726 |
|
| 727 |
|
| 728 | try {
|
| 729 | push.apply(
|
| 730 | ( arr = slice.call( preferredDoc.childNodes ) ),
|
| 731 | preferredDoc.childNodes
|
| 732 | );
|
| 733 |
|
| 734 |
|
| 735 |
|
| 736 |
|
| 737 | arr[ preferredDoc.childNodes.length ].nodeType;
|
| 738 | } catch ( e ) {
|
| 739 | push = { apply: arr.length ?
|
| 740 |
|
| 741 |
|
| 742 | function( target, els ) {
|
| 743 | pushNative.apply( target, slice.call( els ) );
|
| 744 | } :
|
| 745 |
|
| 746 |
|
| 747 |
|
| 748 | function( target, els ) {
|
| 749 | var j = target.length,
|
| 750 | i = 0;
|
| 751 |
|
| 752 |
|
| 753 | while ( ( target[ j++ ] = els[ i++ ] ) ) {}
|
| 754 | target.length = j - 1;
|
| 755 | }
|
| 756 | };
|
| 757 | }
|
| 758 |
|
| 759 | function Sizzle( selector, context, results, seed ) {
|
| 760 | var m, i, elem, nid, match, groups, newSelector,
|
| 761 | newContext = context && context.ownerDocument,
|
| 762 |
|
| 763 |
|
| 764 | nodeType = context ? context.nodeType : 9;
|
| 765 |
|
| 766 | results = results || [];
|
| 767 |
|
| 768 |
|
| 769 | if ( typeof selector !== "string" || !selector ||
|
| 770 | nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
|
| 771 |
|
| 772 | return results;
|
| 773 | }
|
| 774 |
|
| 775 |
|
| 776 | if ( !seed ) {
|
| 777 | setDocument( context );
|
| 778 | context = context || document;
|
| 779 |
|
| 780 | if ( documentIsHTML ) {
|
| 781 |
|
| 782 |
|
| 783 |
|
| 784 | if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {
|
| 785 |
|
| 786 |
|
| 787 | if ( ( m = match[ 1 ] ) ) {
|
| 788 |
|
| 789 |
|
| 790 | if ( nodeType === 9 ) {
|
| 791 | if ( ( elem = context.getElementById( m ) ) ) {
|
| 792 |
|
| 793 |
|
| 794 |
|
| 795 |
|
| 796 | if ( elem.id === m ) {
|
| 797 | results.push( elem );
|
| 798 | return results;
|
| 799 | }
|
| 800 | } else {
|
| 801 | return results;
|
| 802 | }
|
| 803 |
|
| 804 |
|
| 805 | } else {
|
| 806 |
|
| 807 |
|
| 808 |
|
| 809 |
|
| 810 | if ( newContext && ( elem = newContext.getElementById( m ) ) &&
|
| 811 | contains( context, elem ) &&
|
| 812 | elem.id === m ) {
|
| 813 |
|
| 814 | results.push( elem );
|
| 815 | return results;
|
| 816 | }
|
| 817 | }
|
| 818 |
|
| 819 |
|
| 820 | } else if ( match[ 2 ] ) {
|
| 821 | push.apply( results, context.getElementsByTagName( selector ) );
|
| 822 | return results;
|
| 823 |
|
| 824 |
|
| 825 | } else if ( ( m = match[ 3 ] ) && support.getElementsByClassName &&
|
| 826 | context.getElementsByClassName ) {
|
| 827 |
|
| 828 | push.apply( results, context.getElementsByClassName( m ) );
|
| 829 | return results;
|
| 830 | }
|
| 831 | }
|
| 832 |
|
| 833 |
|
| 834 | if ( support.qsa &&
|
| 835 | !nonnativeSelectorCache[ selector + " " ] &&
|
| 836 | ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) &&
|
| 837 |
|
| 838 |
|
| 839 |
|
| 840 | ( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) {
|
| 841 |
|
| 842 | newSelector = selector;
|
| 843 | newContext = context;
|
| 844 |
|
| 845 |
|
| 846 |
|
| 847 |
|
| 848 |
|
| 849 |
|
| 850 |
|
| 851 |
|
| 852 | if ( nodeType === 1 &&
|
| 853 | ( rdescend.test( selector ) || rcombinators.test( selector ) ) ) {
|
| 854 |
|
| 855 |
|
| 856 | newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
|
| 857 | context;
|
| 858 |
|
| 859 |
|
| 860 |
|
| 861 | if ( newContext !== context || !support.scope ) {
|
| 862 |
|
| 863 |
|
| 864 | if ( ( nid = context.getAttribute( "id" ) ) ) {
|
| 865 | nid = nid.replace( rcssescape, fcssescape );
|
| 866 | } else {
|
| 867 | context.setAttribute( "id", ( nid = expando ) );
|
| 868 | }
|
| 869 | }
|
| 870 |
|
| 871 |
|
| 872 | groups = tokenize( selector );
|
| 873 | i = groups.length;
|
| 874 | while ( i-- ) {
|
| 875 | groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " +
|
| 876 | toSelector( groups[ i ] );
|
| 877 | }
|
| 878 | newSelector = groups.join( "," );
|
| 879 | }
|
| 880 |
|
| 881 | try {
|
| 882 |
|
| 883 |
|
| 884 |
|
| 885 |
|
| 886 |
|
| 887 |
|
| 888 |
|
| 889 |
|
| 890 | if ( support.cssSupportsSelector &&
|
| 891 |
|
| 892 |
|
| 893 | !CSS.supports( "selector(:is(" + newSelector + "))" ) ) {
|
| 894 |
|
| 895 |
|
| 896 |
|
| 897 |
|
| 898 |
|
| 899 |
|
| 900 | throw new Error();
|
| 901 | }
|
| 902 |
|
| 903 | push.apply( results,
|
| 904 | newContext.querySelectorAll( newSelector )
|
| 905 | );
|
| 906 | return results;
|
| 907 | } catch ( qsaError ) {
|
| 908 | nonnativeSelectorCache( selector, true );
|
| 909 | } finally {
|
| 910 | if ( nid === expando ) {
|
| 911 | context.removeAttribute( "id" );
|
| 912 | }
|
| 913 | }
|
| 914 | }
|
| 915 | }
|
| 916 | }
|
| 917 |
|
| 918 |
|
| 919 | return select( selector.replace( rtrim, "$1" ), context, results, seed );
|
| 920 | }
|
| 921 |
|
| 922 | |
| 923 | |
| 924 | |
| 925 | |
| 926 | |
| 927 |
|
| 928 | function createCache() {
|
| 929 | var keys = [];
|
| 930 |
|
| 931 | function cache( key, value ) {
|
| 932 |
|
| 933 |
|
| 934 | if ( keys.push( key + " " ) > Expr.cacheLength ) {
|
| 935 |
|
| 936 |
|
| 937 | delete cache[ keys.shift() ];
|
| 938 | }
|
| 939 | return ( cache[ key + " " ] = value );
|
| 940 | }
|
| 941 | return cache;
|
| 942 | }
|
| 943 |
|
| 944 | |
| 945 | |
| 946 | |
| 947 |
|
| 948 | function markFunction( fn ) {
|
| 949 | fn[ expando ] = true;
|
| 950 | return fn;
|
| 951 | }
|
| 952 |
|
| 953 | |
| 954 | |
| 955 | |
| 956 |
|
| 957 | function assert( fn ) {
|
| 958 | var el = document.createElement( "fieldset" );
|
| 959 |
|
| 960 | try {
|
| 961 | return !!fn( el );
|
| 962 | } catch ( e ) {
|
| 963 | return false;
|
| 964 | } finally {
|
| 965 |
|
| 966 |
|
| 967 | if ( el.parentNode ) {
|
| 968 | el.parentNode.removeChild( el );
|
| 969 | }
|
| 970 |
|
| 971 |
|
| 972 | el = null;
|
| 973 | }
|
| 974 | }
|
| 975 |
|
| 976 | |
| 977 | |
| 978 | |
| 979 | |
| 980 |
|
| 981 | function addHandle( attrs, handler ) {
|
| 982 | var arr = attrs.split( "|" ),
|
| 983 | i = arr.length;
|
| 984 |
|
| 985 | while ( i-- ) {
|
| 986 | Expr.attrHandle[ arr[ i ] ] = handler;
|
| 987 | }
|
| 988 | }
|
| 989 |
|
| 990 | |
| 991 | |
| 992 | |
| 993 | |
| 994 | |
| 995 |
|
| 996 | function siblingCheck( a, b ) {
|
| 997 | var cur = b && a,
|
| 998 | diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
|
| 999 | a.sourceIndex - b.sourceIndex;
|
| 1000 |
|
| 1001 |
|
| 1002 | if ( diff ) {
|
| 1003 | return diff;
|
| 1004 | }
|
| 1005 |
|
| 1006 |
|
| 1007 | if ( cur ) {
|
| 1008 | while ( ( cur = cur.nextSibling ) ) {
|
| 1009 | if ( cur === b ) {
|
| 1010 | return -1;
|
| 1011 | }
|
| 1012 | }
|
| 1013 | }
|
| 1014 |
|
| 1015 | return a ? 1 : -1;
|
| 1016 | }
|
| 1017 |
|
| 1018 | |
| 1019 | |
| 1020 | |
| 1021 |
|
| 1022 | function createInputPseudo( type ) {
|
| 1023 | return function( elem ) {
|
| 1024 | var name = elem.nodeName.toLowerCase();
|
| 1025 | return name === "input" && elem.type === type;
|
| 1026 | };
|
| 1027 | }
|
| 1028 |
|
| 1029 | |
| 1030 | |
| 1031 | |
| 1032 |
|
| 1033 | function createButtonPseudo( type ) {
|
| 1034 | return function( elem ) {
|
| 1035 | var name = elem.nodeName.toLowerCase();
|
| 1036 | return ( name === "input" || name === "button" ) && elem.type === type;
|
| 1037 | };
|
| 1038 | }
|
| 1039 |
|
| 1040 | |
| 1041 | |
| 1042 | |
| 1043 |
|
| 1044 | function createDisabledPseudo( disabled ) {
|
| 1045 |
|
| 1046 |
|
| 1047 | return function( elem ) {
|
| 1048 |
|
| 1049 |
|
| 1050 |
|
| 1051 |
|
| 1052 | if ( "form" in elem ) {
|
| 1053 |
|
| 1054 |
|
| 1055 |
|
| 1056 |
|
| 1057 |
|
| 1058 |
|
| 1059 |
|
| 1060 |
|
| 1061 | if ( elem.parentNode && elem.disabled === false ) {
|
| 1062 |
|
| 1063 |
|
| 1064 | if ( "label" in elem ) {
|
| 1065 | if ( "label" in elem.parentNode ) {
|
| 1066 | return elem.parentNode.disabled === disabled;
|
| 1067 | } else {
|
| 1068 | return elem.disabled === disabled;
|
| 1069 | }
|
| 1070 | }
|
| 1071 |
|
| 1072 |
|
| 1073 |
|
| 1074 | return elem.isDisabled === disabled ||
|
| 1075 |
|
| 1076 |
|
| 1077 |
|
| 1078 | elem.isDisabled !== !disabled &&
|
| 1079 | inDisabledFieldset( elem ) === disabled;
|
| 1080 | }
|
| 1081 |
|
| 1082 | return elem.disabled === disabled;
|
| 1083 |
|
| 1084 |
|
| 1085 |
|
| 1086 |
|
| 1087 | } else if ( "label" in elem ) {
|
| 1088 | return elem.disabled === disabled;
|
| 1089 | }
|
| 1090 |
|
| 1091 |
|
| 1092 | return false;
|
| 1093 | };
|
| 1094 | }
|
| 1095 |
|
| 1096 | |
| 1097 | |
| 1098 | |
| 1099 |
|
| 1100 | function createPositionalPseudo( fn ) {
|
| 1101 | return markFunction( function( argument ) {
|
| 1102 | argument = +argument;
|
| 1103 | return markFunction( function( seed, matches ) {
|
| 1104 | var j,
|
| 1105 | matchIndexes = fn( [], seed.length, argument ),
|
| 1106 | i = matchIndexes.length;
|
| 1107 |
|
| 1108 |
|
| 1109 | while ( i-- ) {
|
| 1110 | if ( seed[ ( j = matchIndexes[ i ] ) ] ) {
|
| 1111 | seed[ j ] = !( matches[ j ] = seed[ j ] );
|
| 1112 | }
|
| 1113 | }
|
| 1114 | } );
|
| 1115 | } );
|
| 1116 | }
|
| 1117 |
|
| 1118 | |
| 1119 | |
| 1120 | |
| 1121 | |
| 1122 |
|
| 1123 | function testContext( context ) {
|
| 1124 | return context && typeof context.getElementsByTagName !== "undefined" && context;
|
| 1125 | }
|
| 1126 |
|
| 1127 |
|
| 1128 | support = Sizzle.support = {};
|
| 1129 |
|
| 1130 | |
| 1131 | |
| 1132 | |
| 1133 | |
| 1134 |
|
| 1135 | isXML = Sizzle.isXML = function( elem ) {
|
| 1136 | var namespace = elem && elem.namespaceURI,
|
| 1137 | docElem = elem && ( elem.ownerDocument || elem ).documentElement;
|
| 1138 |
|
| 1139 |
|
| 1140 |
|
| 1141 |
|
| 1142 | return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" );
|
| 1143 | };
|
| 1144 |
|
| 1145 | |
| 1146 | |
| 1147 | |
| 1148 | |
| 1149 |
|
| 1150 | setDocument = Sizzle.setDocument = function( node ) {
|
| 1151 | var hasCompare, subWindow,
|
| 1152 | doc = node ? node.ownerDocument || node : preferredDoc;
|
| 1153 |
|
| 1154 |
|
| 1155 |
|
| 1156 |
|
| 1157 |
|
| 1158 |
|
| 1159 | if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {
|
| 1160 | return document;
|
| 1161 | }
|
| 1162 |
|
| 1163 |
|
| 1164 | document = doc;
|
| 1165 | docElem = document.documentElement;
|
| 1166 | documentIsHTML = !isXML( document );
|
| 1167 |
|
| 1168 |
|
| 1169 |
|
| 1170 |
|
| 1171 |
|
| 1172 |
|
| 1173 |
|
| 1174 | if ( preferredDoc != document &&
|
| 1175 | ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {
|
| 1176 |
|
| 1177 |
|
| 1178 | if ( subWindow.addEventListener ) {
|
| 1179 | subWindow.addEventListener( "unload", unloadHandler, false );
|
| 1180 |
|
| 1181 |
|
| 1182 | } else if ( subWindow.attachEvent ) {
|
| 1183 | subWindow.attachEvent( "onunload", unloadHandler );
|
| 1184 | }
|
| 1185 | }
|
| 1186 |
|
| 1187 |
|
| 1188 |
|
| 1189 |
|
| 1190 |
|
| 1191 |
|
| 1192 | support.scope = assert( function( el ) {
|
| 1193 | docElem.appendChild( el ).appendChild( document.createElement( "div" ) );
|
| 1194 | return typeof el.querySelectorAll !== "undefined" &&
|
| 1195 | !el.querySelectorAll( ":scope fieldset div" ).length;
|
| 1196 | } );
|
| 1197 |
|
| 1198 |
|
| 1199 |
|
| 1200 |
|
| 1201 |
|
| 1202 |
|
| 1203 | support.cssSupportsSelector = assert( function() {
|
| 1204 |
|
| 1205 |
|
| 1206 | return CSS.supports( "selector(*)" ) &&
|
| 1207 |
|
| 1208 |
|
| 1209 |
|
| 1210 |
|
| 1211 |
|
| 1212 | document.querySelectorAll( ":is(:jqfake)" ) &&
|
| 1213 |
|
| 1214 |
|
| 1215 |
|
| 1216 |
|
| 1217 |
|
| 1218 | !CSS.supports( "selector(:is(*,:jqfake))" );
|
| 1219 |
|
| 1220 |
|
| 1221 | } );
|
| 1222 |
|
| 1223 | |
| 1224 |
|
| 1225 |
|
| 1226 |
|
| 1227 |
|
| 1228 |
|
| 1229 | support.attributes = assert( function( el ) {
|
| 1230 | el.className = "i";
|
| 1231 | return !el.getAttribute( "className" );
|
| 1232 | } );
|
| 1233 |
|
| 1234 | |
| 1235 |
|
| 1236 |
|
| 1237 |
|
| 1238 | support.getElementsByTagName = assert( function( el ) {
|
| 1239 | el.appendChild( document.createComment( "" ) );
|
| 1240 | return !el.getElementsByTagName( "*" ).length;
|
| 1241 | } );
|
| 1242 |
|
| 1243 |
|
| 1244 | support.getElementsByClassName = rnative.test( document.getElementsByClassName );
|
| 1245 |
|
| 1246 |
|
| 1247 |
|
| 1248 |
|
| 1249 |
|
| 1250 | support.getById = assert( function( el ) {
|
| 1251 | docElem.appendChild( el ).id = expando;
|
| 1252 | return !document.getElementsByName || !document.getElementsByName( expando ).length;
|
| 1253 | } );
|
| 1254 |
|
| 1255 |
|
| 1256 | if ( support.getById ) {
|
| 1257 | Expr.filter[ "ID" ] = function( id ) {
|
| 1258 | var attrId = id.replace( runescape, funescape );
|
| 1259 | return function( elem ) {
|
| 1260 | return elem.getAttribute( "id" ) === attrId;
|
| 1261 | };
|
| 1262 | };
|
| 1263 | Expr.find[ "ID" ] = function( id, context ) {
|
| 1264 | if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
|
| 1265 | var elem = context.getElementById( id );
|
| 1266 | return elem ? [ elem ] : [];
|
| 1267 | }
|
| 1268 | };
|
| 1269 | } else {
|
| 1270 | Expr.filter[ "ID" ] = function( id ) {
|
| 1271 | var attrId = id.replace( runescape, funescape );
|
| 1272 | return function( elem ) {
|
| 1273 | var node = typeof elem.getAttributeNode !== "undefined" &&
|
| 1274 | elem.getAttributeNode( "id" );
|
| 1275 | return node && node.value === attrId;
|
| 1276 | };
|
| 1277 | };
|
| 1278 |
|
| 1279 |
|
| 1280 |
|
| 1281 | Expr.find[ "ID" ] = function( id, context ) {
|
| 1282 | if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
|
| 1283 | var node, i, elems,
|
| 1284 | elem = context.getElementById( id );
|
| 1285 |
|
| 1286 | if ( elem ) {
|
| 1287 |
|
| 1288 |
|
| 1289 | node = elem.getAttributeNode( "id" );
|
| 1290 | if ( node && node.value === id ) {
|
| 1291 | return [ elem ];
|
| 1292 | }
|
| 1293 |
|
| 1294 |
|
| 1295 | elems = context.getElementsByName( id );
|
| 1296 | i = 0;
|
| 1297 | while ( ( elem = elems[ i++ ] ) ) {
|
| 1298 | node = elem.getAttributeNode( "id" );
|
| 1299 | if ( node && node.value === id ) {
|
| 1300 | return [ elem ];
|
| 1301 | }
|
| 1302 | }
|
| 1303 | }
|
| 1304 |
|
| 1305 | return [];
|
| 1306 | }
|
| 1307 | };
|
| 1308 | }
|
| 1309 |
|
| 1310 |
|
| 1311 | Expr.find[ "TAG" ] = support.getElementsByTagName ?
|
| 1312 | function( tag, context ) {
|
| 1313 | if ( typeof context.getElementsByTagName !== "undefined" ) {
|
| 1314 | return context.getElementsByTagName( tag );
|
| 1315 |
|
| 1316 |
|
| 1317 | } else if ( support.qsa ) {
|
| 1318 | return context.querySelectorAll( tag );
|
| 1319 | }
|
| 1320 | } :
|
| 1321 |
|
| 1322 | function( tag, context ) {
|
| 1323 | var elem,
|
| 1324 | tmp = [],
|
| 1325 | i = 0,
|
| 1326 |
|
| 1327 |
|
| 1328 | results = context.getElementsByTagName( tag );
|
| 1329 |
|
| 1330 |
|
| 1331 | if ( tag === "*" ) {
|
| 1332 | while ( ( elem = results[ i++ ] ) ) {
|
| 1333 | if ( elem.nodeType === 1 ) {
|
| 1334 | tmp.push( elem );
|
| 1335 | }
|
| 1336 | }
|
| 1337 |
|
| 1338 | return tmp;
|
| 1339 | }
|
| 1340 | return results;
|
| 1341 | };
|
| 1342 |
|
| 1343 |
|
| 1344 | Expr.find[ "CLASS" ] = support.getElementsByClassName && function( className, context ) {
|
| 1345 | if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
|
| 1346 | return context.getElementsByClassName( className );
|
| 1347 | }
|
| 1348 | };
|
| 1349 |
|
| 1350 | |
| 1351 |
|
| 1352 |
|
| 1353 |
|
| 1354 |
|
| 1355 |
|
| 1356 | rbuggyMatches = [];
|
| 1357 |
|
| 1358 |
|
| 1359 |
|
| 1360 |
|
| 1361 |
|
| 1362 |
|
| 1363 | rbuggyQSA = [];
|
| 1364 |
|
| 1365 | if ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) {
|
| 1366 |
|
| 1367 |
|
| 1368 |
|
| 1369 | assert( function( el ) {
|
| 1370 |
|
| 1371 | var input;
|
| 1372 |
|
| 1373 |
|
| 1374 |
|
| 1375 |
|
| 1376 |
|
| 1377 |
|
| 1378 | docElem.appendChild( el ).innerHTML = "<a id='" + expando + "'></a>" +
|
| 1379 | "<select id='" + expando + "-\r\\' msallowcapture=''>" +
|
| 1380 | "<option selected=''></option></select>";
|
| 1381 |
|
| 1382 |
|
| 1383 |
|
| 1384 |
|
| 1385 |
|
| 1386 | if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) {
|
| 1387 | rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
|
| 1388 | }
|
| 1389 |
|
| 1390 |
|
| 1391 |
|
| 1392 | if ( !el.querySelectorAll( "[selected]" ).length ) {
|
| 1393 | rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
|
| 1394 | }
|
| 1395 |
|
| 1396 |
|
| 1397 | if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
|
| 1398 | rbuggyQSA.push( "~=" );
|
| 1399 | }
|
| 1400 |
|
| 1401 |
|
| 1402 |
|
| 1403 |
|
| 1404 |
|
| 1405 |
|
| 1406 | input = document.createElement( "input" );
|
| 1407 | input.setAttribute( "name", "" );
|
| 1408 | el.appendChild( input );
|
| 1409 | if ( !el.querySelectorAll( "[name='']" ).length ) {
|
| 1410 | rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" +
|
| 1411 | whitespace + "*(?:''|\"\")" );
|
| 1412 | }
|
| 1413 |
|
| 1414 |
|
| 1415 |
|
| 1416 |
|
| 1417 | if ( !el.querySelectorAll( ":checked" ).length ) {
|
| 1418 | rbuggyQSA.push( ":checked" );
|
| 1419 | }
|
| 1420 |
|
| 1421 |
|
| 1422 |
|
| 1423 |
|
| 1424 | if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {
|
| 1425 | rbuggyQSA.push( ".#.+[+~]" );
|
| 1426 | }
|
| 1427 |
|
| 1428 |
|
| 1429 |
|
| 1430 | el.querySelectorAll( "\\\f" );
|
| 1431 | rbuggyQSA.push( "[\\r\\n\\f]" );
|
| 1432 | } );
|
| 1433 |
|
| 1434 | assert( function( el ) {
|
| 1435 | el.innerHTML = "<a href='' disabled='disabled'></a>" +
|
| 1436 | "<select disabled='disabled'><option/></select>";
|
| 1437 |
|
| 1438 |
|
| 1439 |
|
| 1440 | var input = document.createElement( "input" );
|
| 1441 | input.setAttribute( "type", "hidden" );
|
| 1442 | el.appendChild( input ).setAttribute( "name", "D" );
|
| 1443 |
|
| 1444 |
|
| 1445 |
|
| 1446 | if ( el.querySelectorAll( "[name=d]" ).length ) {
|
| 1447 | rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
|
| 1448 | }
|
| 1449 |
|
| 1450 |
|
| 1451 |
|
| 1452 | if ( el.querySelectorAll( ":enabled" ).length !== 2 ) {
|
| 1453 | rbuggyQSA.push( ":enabled", ":disabled" );
|
| 1454 | }
|
| 1455 |
|
| 1456 |
|
| 1457 |
|
| 1458 | docElem.appendChild( el ).disabled = true;
|
| 1459 | if ( el.querySelectorAll( ":disabled" ).length !== 2 ) {
|
| 1460 | rbuggyQSA.push( ":enabled", ":disabled" );
|
| 1461 | }
|
| 1462 |
|
| 1463 |
|
| 1464 |
|
| 1465 | el.querySelectorAll( "*,:x" );
|
| 1466 | rbuggyQSA.push( ",.*:" );
|
| 1467 | } );
|
| 1468 | }
|
| 1469 |
|
| 1470 | if ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches ||
|
| 1471 | docElem.webkitMatchesSelector ||
|
| 1472 | docElem.mozMatchesSelector ||
|
| 1473 | docElem.oMatchesSelector ||
|
| 1474 | docElem.msMatchesSelector ) ) ) ) {
|
| 1475 |
|
| 1476 | assert( function( el ) {
|
| 1477 |
|
| 1478 |
|
| 1479 |
|
| 1480 | support.disconnectedMatch = matches.call( el, "*" );
|
| 1481 |
|
| 1482 |
|
| 1483 |
|
| 1484 | matches.call( el, "[s!='']:x" );
|
| 1485 | rbuggyMatches.push( "!=", pseudos );
|
| 1486 | } );
|
| 1487 | }
|
| 1488 |
|
| 1489 | if ( !support.cssSupportsSelector ) {
|
| 1490 |
|
| 1491 |
|
| 1492 |
|
| 1493 |
|
| 1494 |
|
| 1495 |
|
| 1496 |
|
| 1497 | rbuggyQSA.push( ":has" );
|
| 1498 | }
|
| 1499 |
|
| 1500 | rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) );
|
| 1501 | rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) );
|
| 1502 |
|
| 1503 | |
| 1504 |
|
| 1505 | hasCompare = rnative.test( docElem.compareDocumentPosition );
|
| 1506 |
|
| 1507 |
|
| 1508 |
|
| 1509 |
|
| 1510 | contains = hasCompare || rnative.test( docElem.contains ) ?
|
| 1511 | function( a, b ) {
|
| 1512 |
|
| 1513 |
|
| 1514 |
|
| 1515 |
|
| 1516 |
|
| 1517 |
|
| 1518 |
|
| 1519 | var adown = a.nodeType === 9 && a.documentElement || a,
|
| 1520 | bup = b && b.parentNode;
|
| 1521 | return a === bup || !!( bup && bup.nodeType === 1 && (
|
| 1522 | adown.contains ?
|
| 1523 | adown.contains( bup ) :
|
| 1524 | a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
|
| 1525 | ) );
|
| 1526 | } :
|
| 1527 | function( a, b ) {
|
| 1528 | if ( b ) {
|
| 1529 | while ( ( b = b.parentNode ) ) {
|
| 1530 | if ( b === a ) {
|
| 1531 | return true;
|
| 1532 | }
|
| 1533 | }
|
| 1534 | }
|
| 1535 | return false;
|
| 1536 | };
|
| 1537 |
|
| 1538 | |
| 1539 |
|
| 1540 |
|
| 1541 |
|
| 1542 | sortOrder = hasCompare ?
|
| 1543 | function( a, b ) {
|
| 1544 |
|
| 1545 |
|
| 1546 | if ( a === b ) {
|
| 1547 | hasDuplicate = true;
|
| 1548 | return 0;
|
| 1549 | }
|
| 1550 |
|
| 1551 |
|
| 1552 | var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
|
| 1553 | if ( compare ) {
|
| 1554 | return compare;
|
| 1555 | }
|
| 1556 |
|
| 1557 |
|
| 1558 |
|
| 1559 |
|
| 1560 |
|
| 1561 |
|
| 1562 | compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?
|
| 1563 | a.compareDocumentPosition( b ) :
|
| 1564 |
|
| 1565 |
|
| 1566 | 1;
|
| 1567 |
|
| 1568 |
|
| 1569 | if ( compare & 1 ||
|
| 1570 | ( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) {
|
| 1571 |
|
| 1572 |
|
| 1573 |
|
| 1574 |
|
| 1575 |
|
| 1576 |
|
| 1577 | if ( a == document || a.ownerDocument == preferredDoc &&
|
| 1578 | contains( preferredDoc, a ) ) {
|
| 1579 | return -1;
|
| 1580 | }
|
| 1581 |
|
| 1582 |
|
| 1583 |
|
| 1584 |
|
| 1585 |
|
| 1586 | if ( b == document || b.ownerDocument == preferredDoc &&
|
| 1587 | contains( preferredDoc, b ) ) {
|
| 1588 | return 1;
|
| 1589 | }
|
| 1590 |
|
| 1591 |
|
| 1592 | return sortInput ?
|
| 1593 | ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
|
| 1594 | 0;
|
| 1595 | }
|
| 1596 |
|
| 1597 | return compare & 4 ? -1 : 1;
|
| 1598 | } :
|
| 1599 | function( a, b ) {
|
| 1600 |
|
| 1601 |
|
| 1602 | if ( a === b ) {
|
| 1603 | hasDuplicate = true;
|
| 1604 | return 0;
|
| 1605 | }
|
| 1606 |
|
| 1607 | var cur,
|
| 1608 | i = 0,
|
| 1609 | aup = a.parentNode,
|
| 1610 | bup = b.parentNode,
|
| 1611 | ap = [ a ],
|
| 1612 | bp = [ b ];
|
| 1613 |
|
| 1614 |
|
| 1615 | if ( !aup || !bup ) {
|
| 1616 |
|
| 1617 |
|
| 1618 |
|
| 1619 |
|
| 1620 |
|
| 1621 | return a == document ? -1 :
|
| 1622 | b == document ? 1 :
|
| 1623 |
|
| 1624 | aup ? -1 :
|
| 1625 | bup ? 1 :
|
| 1626 | sortInput ?
|
| 1627 | ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
|
| 1628 | 0;
|
| 1629 |
|
| 1630 |
|
| 1631 | } else if ( aup === bup ) {
|
| 1632 | return siblingCheck( a, b );
|
| 1633 | }
|
| 1634 |
|
| 1635 |
|
| 1636 | cur = a;
|
| 1637 | while ( ( cur = cur.parentNode ) ) {
|
| 1638 | ap.unshift( cur );
|
| 1639 | }
|
| 1640 | cur = b;
|
| 1641 | while ( ( cur = cur.parentNode ) ) {
|
| 1642 | bp.unshift( cur );
|
| 1643 | }
|
| 1644 |
|
| 1645 |
|
| 1646 | while ( ap[ i ] === bp[ i ] ) {
|
| 1647 | i++;
|
| 1648 | }
|
| 1649 |
|
| 1650 | return i ?
|
| 1651 |
|
| 1652 |
|
| 1653 | siblingCheck( ap[ i ], bp[ i ] ) :
|
| 1654 |
|
| 1655 |
|
| 1656 |
|
| 1657 |
|
| 1658 |
|
| 1659 |
|
| 1660 | ap[ i ] == preferredDoc ? -1 :
|
| 1661 | bp[ i ] == preferredDoc ? 1 :
|
| 1662 |
|
| 1663 | 0;
|
| 1664 | };
|
| 1665 |
|
| 1666 | return document;
|
| 1667 | };
|
| 1668 |
|
| 1669 | Sizzle.matches = function( expr, elements ) {
|
| 1670 | return Sizzle( expr, null, null, elements );
|
| 1671 | };
|
| 1672 |
|
| 1673 | Sizzle.matchesSelector = function( elem, expr ) {
|
| 1674 | setDocument( elem );
|
| 1675 |
|
| 1676 | if ( support.matchesSelector && documentIsHTML &&
|
| 1677 | !nonnativeSelectorCache[ expr + " " ] &&
|
| 1678 | ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
|
| 1679 | ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
|
| 1680 |
|
| 1681 | try {
|
| 1682 | var ret = matches.call( elem, expr );
|
| 1683 |
|
| 1684 |
|
| 1685 | if ( ret || support.disconnectedMatch ||
|
| 1686 |
|
| 1687 |
|
| 1688 |
|
| 1689 | elem.document && elem.document.nodeType !== 11 ) {
|
| 1690 | return ret;
|
| 1691 | }
|
| 1692 | } catch ( e ) {
|
| 1693 | nonnativeSelectorCache( expr, true );
|
| 1694 | }
|
| 1695 | }
|
| 1696 |
|
| 1697 | return Sizzle( expr, document, null, [ elem ] ).length > 0;
|
| 1698 | };
|
| 1699 |
|
| 1700 | Sizzle.contains = function( context, elem ) {
|
| 1701 |
|
| 1702 |
|
| 1703 |
|
| 1704 |
|
| 1705 |
|
| 1706 |
|
| 1707 | if ( ( context.ownerDocument || context ) != document ) {
|
| 1708 | setDocument( context );
|
| 1709 | }
|
| 1710 | return contains( context, elem );
|
| 1711 | };
|
| 1712 |
|
| 1713 | Sizzle.attr = function( elem, name ) {
|
| 1714 |
|
| 1715 |
|
| 1716 |
|
| 1717 |
|
| 1718 |
|
| 1719 |
|
| 1720 | if ( ( elem.ownerDocument || elem ) != document ) {
|
| 1721 | setDocument( elem );
|
| 1722 | }
|
| 1723 |
|
| 1724 | var fn = Expr.attrHandle[ name.toLowerCase() ],
|
| 1725 |
|
| 1726 |
|
| 1727 | val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
|
| 1728 | fn( elem, name, !documentIsHTML ) :
|
| 1729 | undefined;
|
| 1730 |
|
| 1731 | return val !== undefined ?
|
| 1732 | val :
|
| 1733 | support.attributes || !documentIsHTML ?
|
| 1734 | elem.getAttribute( name ) :
|
| 1735 | ( val = elem.getAttributeNode( name ) ) && val.specified ?
|
| 1736 | val.value :
|
| 1737 | null;
|
| 1738 | };
|
| 1739 |
|
| 1740 | Sizzle.escape = function( sel ) {
|
| 1741 | return ( sel + "" ).replace( rcssescape, fcssescape );
|
| 1742 | };
|
| 1743 |
|
| 1744 | Sizzle.error = function( msg ) {
|
| 1745 | throw new Error( "Syntax error, unrecognized expression: " + msg );
|
| 1746 | };
|
| 1747 |
|
| 1748 | |
| 1749 | |
| 1750 | |
| 1751 |
|
| 1752 | Sizzle.uniqueSort = function( results ) {
|
| 1753 | var elem,
|
| 1754 | duplicates = [],
|
| 1755 | j = 0,
|
| 1756 | i = 0;
|
| 1757 |
|
| 1758 |
|
| 1759 | hasDuplicate = !support.detectDuplicates;
|
| 1760 | sortInput = !support.sortStable && results.slice( 0 );
|
| 1761 | results.sort( sortOrder );
|
| 1762 |
|
| 1763 | if ( hasDuplicate ) {
|
| 1764 | while ( ( elem = results[ i++ ] ) ) {
|
| 1765 | if ( elem === results[ i ] ) {
|
| 1766 | j = duplicates.push( i );
|
| 1767 | }
|
| 1768 | }
|
| 1769 | while ( j-- ) {
|
| 1770 | results.splice( duplicates[ j ], 1 );
|
| 1771 | }
|
| 1772 | }
|
| 1773 |
|
| 1774 |
|
| 1775 |
|
| 1776 | sortInput = null;
|
| 1777 |
|
| 1778 | return results;
|
| 1779 | };
|
| 1780 |
|
| 1781 | |
| 1782 | |
| 1783 | |
| 1784 |
|
| 1785 | getText = Sizzle.getText = function( elem ) {
|
| 1786 | var node,
|
| 1787 | ret = "",
|
| 1788 | i = 0,
|
| 1789 | nodeType = elem.nodeType;
|
| 1790 |
|
| 1791 | if ( !nodeType ) {
|
| 1792 |
|
| 1793 |
|
| 1794 | while ( ( node = elem[ i++ ] ) ) {
|
| 1795 |
|
| 1796 |
|
| 1797 | ret += getText( node );
|
| 1798 | }
|
| 1799 | } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
|
| 1800 |
|
| 1801 |
|
| 1802 |
|
| 1803 | if ( typeof elem.textContent === "string" ) {
|
| 1804 | return elem.textContent;
|
| 1805 | } else {
|
| 1806 |
|
| 1807 |
|
| 1808 | for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
|
| 1809 | ret += getText( elem );
|
| 1810 | }
|
| 1811 | }
|
| 1812 | } else if ( nodeType === 3 || nodeType === 4 ) {
|
| 1813 | return elem.nodeValue;
|
| 1814 | }
|
| 1815 |
|
| 1816 |
|
| 1817 |
|
| 1818 | return ret;
|
| 1819 | };
|
| 1820 |
|
| 1821 | Expr = Sizzle.selectors = {
|
| 1822 |
|
| 1823 |
|
| 1824 | cacheLength: 50,
|
| 1825 |
|
| 1826 | createPseudo: markFunction,
|
| 1827 |
|
| 1828 | match: matchExpr,
|
| 1829 |
|
| 1830 | attrHandle: {},
|
| 1831 |
|
| 1832 | find: {},
|
| 1833 |
|
| 1834 | relative: {
|
| 1835 | ">": { dir: "parentNode", first: true },
|
| 1836 | " ": { dir: "parentNode" },
|
| 1837 | "+": { dir: "previousSibling", first: true },
|
| 1838 | "~": { dir: "previousSibling" }
|
| 1839 | },
|
| 1840 |
|
| 1841 | preFilter: {
|
| 1842 | "ATTR": function( match ) {
|
| 1843 | match[ 1 ] = match[ 1 ].replace( runescape, funescape );
|
| 1844 |
|
| 1845 |
|
| 1846 | match[ 3 ] = ( match[ 3 ] || match[ 4 ] ||
|
| 1847 | match[ 5 ] || "" ).replace( runescape, funescape );
|
| 1848 |
|
| 1849 | if ( match[ 2 ] === "~=" ) {
|
| 1850 | match[ 3 ] = " " + match[ 3 ] + " ";
|
| 1851 | }
|
| 1852 |
|
| 1853 | return match.slice( 0, 4 );
|
| 1854 | },
|
| 1855 |
|
| 1856 | "CHILD": function( match ) {
|
| 1857 |
|
| 1858 | |
| 1859 | |
| 1860 | |
| 1861 | |
| 1862 | |
| 1863 | |
| 1864 | |
| 1865 | |
| 1866 | |
| 1867 |
|
| 1868 | match[ 1 ] = match[ 1 ].toLowerCase();
|
| 1869 |
|
| 1870 | if ( match[ 1 ].slice( 0, 3 ) === "nth" ) {
|
| 1871 |
|
| 1872 |
|
| 1873 | if ( !match[ 3 ] ) {
|
| 1874 | Sizzle.error( match[ 0 ] );
|
| 1875 | }
|
| 1876 |
|
| 1877 |
|
| 1878 |
|
| 1879 | match[ 4 ] = +( match[ 4 ] ?
|
| 1880 | match[ 5 ] + ( match[ 6 ] || 1 ) :
|
| 1881 | 2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) );
|
| 1882 | match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" );
|
| 1883 |
|
| 1884 |
|
| 1885 | } else if ( match[ 3 ] ) {
|
| 1886 | Sizzle.error( match[ 0 ] );
|
| 1887 | }
|
| 1888 |
|
| 1889 | return match;
|
| 1890 | },
|
| 1891 |
|
| 1892 | "PSEUDO": function( match ) {
|
| 1893 | var excess,
|
| 1894 | unquoted = !match[ 6 ] && match[ 2 ];
|
| 1895 |
|
| 1896 | if ( matchExpr[ "CHILD" ].test( match[ 0 ] ) ) {
|
| 1897 | return null;
|
| 1898 | }
|
| 1899 |
|
| 1900 |
|
| 1901 | if ( match[ 3 ] ) {
|
| 1902 | match[ 2 ] = match[ 4 ] || match[ 5 ] || "";
|
| 1903 |
|
| 1904 |
|
| 1905 | } else if ( unquoted && rpseudo.test( unquoted ) &&
|
| 1906 |
|
| 1907 |
|
| 1908 | ( excess = tokenize( unquoted, true ) ) &&
|
| 1909 |
|
| 1910 |
|
| 1911 | ( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) {
|
| 1912 |
|
| 1913 |
|
| 1914 | match[ 0 ] = match[ 0 ].slice( 0, excess );
|
| 1915 | match[ 2 ] = unquoted.slice( 0, excess );
|
| 1916 | }
|
| 1917 |
|
| 1918 |
|
| 1919 | return match.slice( 0, 3 );
|
| 1920 | }
|
| 1921 | },
|
| 1922 |
|
| 1923 | filter: {
|
| 1924 |
|
| 1925 | "TAG": function( nodeNameSelector ) {
|
| 1926 | var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
|
| 1927 | return nodeNameSelector === "*" ?
|
| 1928 | function() {
|
| 1929 | return true;
|
| 1930 | } :
|
| 1931 | function( elem ) {
|
| 1932 | return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
|
| 1933 | };
|
| 1934 | },
|
| 1935 |
|
| 1936 | "CLASS": function( className ) {
|
| 1937 | var pattern = classCache[ className + " " ];
|
| 1938 |
|
| 1939 | return pattern ||
|
| 1940 | ( pattern = new RegExp( "(^|" + whitespace +
|
| 1941 | ")" + className + "(" + whitespace + "|$)" ) ) && classCache(
|
| 1942 | className, function( elem ) {
|
| 1943 | return pattern.test(
|
| 1944 | typeof elem.className === "string" && elem.className ||
|
| 1945 | typeof elem.getAttribute !== "undefined" &&
|
| 1946 | elem.getAttribute( "class" ) ||
|
| 1947 | ""
|
| 1948 | );
|
| 1949 | } );
|
| 1950 | },
|
| 1951 |
|
| 1952 | "ATTR": function( name, operator, check ) {
|
| 1953 | return function( elem ) {
|
| 1954 | var result = Sizzle.attr( elem, name );
|
| 1955 |
|
| 1956 | if ( result == null ) {
|
| 1957 | return operator === "!=";
|
| 1958 | }
|
| 1959 | if ( !operator ) {
|
| 1960 | return true;
|
| 1961 | }
|
| 1962 |
|
| 1963 | result += "";
|
| 1964 |
|
| 1965 |
|
| 1966 |
|
| 1967 | return operator === "=" ? result === check :
|
| 1968 | operator === "!=" ? result !== check :
|
| 1969 | operator === "^=" ? check && result.indexOf( check ) === 0 :
|
| 1970 | operator === "*=" ? check && result.indexOf( check ) > -1 :
|
| 1971 | operator === "$=" ? check && result.slice( -check.length ) === check :
|
| 1972 | operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
|
| 1973 | operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
|
| 1974 | false;
|
| 1975 |
|
| 1976 |
|
| 1977 | };
|
| 1978 | },
|
| 1979 |
|
| 1980 | "CHILD": function( type, what, _argument, first, last ) {
|
| 1981 | var simple = type.slice( 0, 3 ) !== "nth",
|
| 1982 | forward = type.slice( -4 ) !== "last",
|
| 1983 | ofType = what === "of-type";
|
| 1984 |
|
| 1985 | return first === 1 && last === 0 ?
|
| 1986 |
|
| 1987 |
|
| 1988 | function( elem ) {
|
| 1989 | return !!elem.parentNode;
|
| 1990 | } :
|
| 1991 |
|
| 1992 | function( elem, _context, xml ) {
|
| 1993 | var cache, uniqueCache, outerCache, node, nodeIndex, start,
|
| 1994 | dir = simple !== forward ? "nextSibling" : "previousSibling",
|
| 1995 | parent = elem.parentNode,
|
| 1996 | name = ofType && elem.nodeName.toLowerCase(),
|
| 1997 | useCache = !xml && !ofType,
|
| 1998 | diff = false;
|
| 1999 |
|
| 2000 | if ( parent ) {
|
| 2001 |
|
| 2002 |
|
| 2003 | if ( simple ) {
|
| 2004 | while ( dir ) {
|
| 2005 | node = elem;
|
| 2006 | while ( ( node = node[ dir ] ) ) {
|
| 2007 | if ( ofType ?
|
| 2008 | node.nodeName.toLowerCase() === name :
|
| 2009 | node.nodeType === 1 ) {
|
| 2010 |
|
| 2011 | return false;
|
| 2012 | }
|
| 2013 | }
|
| 2014 |
|
| 2015 |
|
| 2016 | start = dir = type === "only" && !start && "nextSibling";
|
| 2017 | }
|
| 2018 | return true;
|
| 2019 | }
|
| 2020 |
|
| 2021 | start = [ forward ? parent.firstChild : parent.lastChild ];
|
| 2022 |
|
| 2023 |
|
| 2024 | if ( forward && useCache ) {
|
| 2025 |
|
| 2026 |
|
| 2027 |
|
| 2028 |
|
| 2029 | node = parent;
|
| 2030 | outerCache = node[ expando ] || ( node[ expando ] = {} );
|
| 2031 |
|
| 2032 |
|
| 2033 |
|
| 2034 | uniqueCache = outerCache[ node.uniqueID ] ||
|
| 2035 | ( outerCache[ node.uniqueID ] = {} );
|
| 2036 |
|
| 2037 | cache = uniqueCache[ type ] || [];
|
| 2038 | nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
|
| 2039 | diff = nodeIndex && cache[ 2 ];
|
| 2040 | node = nodeIndex && parent.childNodes[ nodeIndex ];
|
| 2041 |
|
| 2042 | while ( ( node = ++nodeIndex && node && node[ dir ] ||
|
| 2043 |
|
| 2044 |
|
| 2045 | ( diff = nodeIndex = 0 ) || start.pop() ) ) {
|
| 2046 |
|
| 2047 |
|
| 2048 | if ( node.nodeType === 1 && ++diff && node === elem ) {
|
| 2049 | uniqueCache[ type ] = [ dirruns, nodeIndex, diff ];
|
| 2050 | break;
|
| 2051 | }
|
| 2052 | }
|
| 2053 |
|
| 2054 | } else {
|
| 2055 |
|
| 2056 |
|
| 2057 | if ( useCache ) {
|
| 2058 |
|
| 2059 |
|
| 2060 | node = elem;
|
| 2061 | outerCache = node[ expando ] || ( node[ expando ] = {} );
|
| 2062 |
|
| 2063 |
|
| 2064 |
|
| 2065 | uniqueCache = outerCache[ node.uniqueID ] ||
|
| 2066 | ( outerCache[ node.uniqueID ] = {} );
|
| 2067 |
|
| 2068 | cache = uniqueCache[ type ] || [];
|
| 2069 | nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
|
| 2070 | diff = nodeIndex;
|
| 2071 | }
|
| 2072 |
|
| 2073 |
|
| 2074 |
|
| 2075 | if ( diff === false ) {
|
| 2076 |
|
| 2077 |
|
| 2078 | while ( ( node = ++nodeIndex && node && node[ dir ] ||
|
| 2079 | ( diff = nodeIndex = 0 ) || start.pop() ) ) {
|
| 2080 |
|
| 2081 | if ( ( ofType ?
|
| 2082 | node.nodeName.toLowerCase() === name :
|
| 2083 | node.nodeType === 1 ) &&
|
| 2084 | ++diff ) {
|
| 2085 |
|
| 2086 |
|
| 2087 | if ( useCache ) {
|
| 2088 | outerCache = node[ expando ] ||
|
| 2089 | ( node[ expando ] = {} );
|
| 2090 |
|
| 2091 |
|
| 2092 |
|
| 2093 | uniqueCache = outerCache[ node.uniqueID ] ||
|
| 2094 | ( outerCache[ node.uniqueID ] = {} );
|
| 2095 |
|
| 2096 | uniqueCache[ type ] = [ dirruns, diff ];
|
| 2097 | }
|
| 2098 |
|
| 2099 | if ( node === elem ) {
|
| 2100 | break;
|
| 2101 | }
|
| 2102 | }
|
| 2103 | }
|
| 2104 | }
|
| 2105 | }
|
| 2106 |
|
| 2107 |
|
| 2108 | diff -= last;
|
| 2109 | return diff === first || ( diff % first === 0 && diff / first >= 0 );
|
| 2110 | }
|
| 2111 | };
|
| 2112 | },
|
| 2113 |
|
| 2114 | "PSEUDO": function( pseudo, argument ) {
|
| 2115 |
|
| 2116 |
|
| 2117 |
|
| 2118 |
|
| 2119 |
|
| 2120 | var args,
|
| 2121 | fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
|
| 2122 | Sizzle.error( "unsupported pseudo: " + pseudo );
|
| 2123 |
|
| 2124 |
|
| 2125 |
|
| 2126 |
|
| 2127 | if ( fn[ expando ] ) {
|
| 2128 | return fn( argument );
|
| 2129 | }
|
| 2130 |
|
| 2131 |
|
| 2132 | if ( fn.length > 1 ) {
|
| 2133 | args = [ pseudo, pseudo, "", argument ];
|
| 2134 | return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
|
| 2135 | markFunction( function( seed, matches ) {
|
| 2136 | var idx,
|
| 2137 | matched = fn( seed, argument ),
|
| 2138 | i = matched.length;
|
| 2139 | while ( i-- ) {
|
| 2140 | idx = indexOf( seed, matched[ i ] );
|
| 2141 | seed[ idx ] = !( matches[ idx ] = matched[ i ] );
|
| 2142 | }
|
| 2143 | } ) :
|
| 2144 | function( elem ) {
|
| 2145 | return fn( elem, 0, args );
|
| 2146 | };
|
| 2147 | }
|
| 2148 |
|
| 2149 | return fn;
|
| 2150 | }
|
| 2151 | },
|
| 2152 |
|
| 2153 | pseudos: {
|
| 2154 |
|
| 2155 |
|
| 2156 | "not": markFunction( function( selector ) {
|
| 2157 |
|
| 2158 |
|
| 2159 |
|
| 2160 |
|
| 2161 | var input = [],
|
| 2162 | results = [],
|
| 2163 | matcher = compile( selector.replace( rtrim, "$1" ) );
|
| 2164 |
|
| 2165 | return matcher[ expando ] ?
|
| 2166 | markFunction( function( seed, matches, _context, xml ) {
|
| 2167 | var elem,
|
| 2168 | unmatched = matcher( seed, null, xml, [] ),
|
| 2169 | i = seed.length;
|
| 2170 |
|
| 2171 |
|
| 2172 | while ( i-- ) {
|
| 2173 | if ( ( elem = unmatched[ i ] ) ) {
|
| 2174 | seed[ i ] = !( matches[ i ] = elem );
|
| 2175 | }
|
| 2176 | }
|
| 2177 | } ) :
|
| 2178 | function( elem, _context, xml ) {
|
| 2179 | input[ 0 ] = elem;
|
| 2180 | matcher( input, null, xml, results );
|
| 2181 |
|
| 2182 |
|
| 2183 | input[ 0 ] = null;
|
| 2184 | return !results.pop();
|
| 2185 | };
|
| 2186 | } ),
|
| 2187 |
|
| 2188 | "has": markFunction( function( selector ) {
|
| 2189 | return function( elem ) {
|
| 2190 | return Sizzle( selector, elem ).length > 0;
|
| 2191 | };
|
| 2192 | } ),
|
| 2193 |
|
| 2194 | "contains": markFunction( function( text ) {
|
| 2195 | text = text.replace( runescape, funescape );
|
| 2196 | return function( elem ) {
|
| 2197 | return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1;
|
| 2198 | };
|
| 2199 | } ),
|
| 2200 |
|
| 2201 |
|
| 2202 |
|
| 2203 |
|
| 2204 |
|
| 2205 |
|
| 2206 |
|
| 2207 |
|
| 2208 | "lang": markFunction( function( lang ) {
|
| 2209 |
|
| 2210 |
|
| 2211 | if ( !ridentifier.test( lang || "" ) ) {
|
| 2212 | Sizzle.error( "unsupported lang: " + lang );
|
| 2213 | }
|
| 2214 | lang = lang.replace( runescape, funescape ).toLowerCase();
|
| 2215 | return function( elem ) {
|
| 2216 | var elemLang;
|
| 2217 | do {
|
| 2218 | if ( ( elemLang = documentIsHTML ?
|
| 2219 | elem.lang :
|
| 2220 | elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) {
|
| 2221 |
|
| 2222 | elemLang = elemLang.toLowerCase();
|
| 2223 | return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
|
| 2224 | }
|
| 2225 | } while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );
|
| 2226 | return false;
|
| 2227 | };
|
| 2228 | } ),
|
| 2229 |
|
| 2230 |
|
| 2231 | "target": function( elem ) {
|
| 2232 | var hash = window.location && window.location.hash;
|
| 2233 | return hash && hash.slice( 1 ) === elem.id;
|
| 2234 | },
|
| 2235 |
|
| 2236 | "root": function( elem ) {
|
| 2237 | return elem === docElem;
|
| 2238 | },
|
| 2239 |
|
| 2240 | "focus": function( elem ) {
|
| 2241 | return elem === document.activeElement &&
|
| 2242 | ( !document.hasFocus || document.hasFocus() ) &&
|
| 2243 | !!( elem.type || elem.href || ~elem.tabIndex );
|
| 2244 | },
|
| 2245 |
|
| 2246 |
|
| 2247 | "enabled": createDisabledPseudo( false ),
|
| 2248 | "disabled": createDisabledPseudo( true ),
|
| 2249 |
|
| 2250 | "checked": function( elem ) {
|
| 2251 |
|
| 2252 |
|
| 2253 |
|
| 2254 | var nodeName = elem.nodeName.toLowerCase();
|
| 2255 | return ( nodeName === "input" && !!elem.checked ) ||
|
| 2256 | ( nodeName === "option" && !!elem.selected );
|
| 2257 | },
|
| 2258 |
|
| 2259 | "selected": function( elem ) {
|
| 2260 |
|
| 2261 |
|
| 2262 |
|
| 2263 | if ( elem.parentNode ) {
|
| 2264 |
|
| 2265 | elem.parentNode.selectedIndex;
|
| 2266 | }
|
| 2267 |
|
| 2268 | return elem.selected === true;
|
| 2269 | },
|
| 2270 |
|
| 2271 |
|
| 2272 | "empty": function( elem ) {
|
| 2273 |
|
| 2274 |
|
| 2275 |
|
| 2276 |
|
| 2277 |
|
| 2278 | for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
|
| 2279 | if ( elem.nodeType < 6 ) {
|
| 2280 | return false;
|
| 2281 | }
|
| 2282 | }
|
| 2283 | return true;
|
| 2284 | },
|
| 2285 |
|
| 2286 | "parent": function( elem ) {
|
| 2287 | return !Expr.pseudos[ "empty" ]( elem );
|
| 2288 | },
|
| 2289 |
|
| 2290 |
|
| 2291 | "header": function( elem ) {
|
| 2292 | return rheader.test( elem.nodeName );
|
| 2293 | },
|
| 2294 |
|
| 2295 | "input": function( elem ) {
|
| 2296 | return rinputs.test( elem.nodeName );
|
| 2297 | },
|
| 2298 |
|
| 2299 | "button": function( elem ) {
|
| 2300 | var name = elem.nodeName.toLowerCase();
|
| 2301 | return name === "input" && elem.type === "button" || name === "button";
|
| 2302 | },
|
| 2303 |
|
| 2304 | "text": function( elem ) {
|
| 2305 | var attr;
|
| 2306 | return elem.nodeName.toLowerCase() === "input" &&
|
| 2307 | elem.type === "text" &&
|
| 2308 |
|
| 2309 |
|
| 2310 |
|
| 2311 | ( ( attr = elem.getAttribute( "type" ) ) == null ||
|
| 2312 | attr.toLowerCase() === "text" );
|
| 2313 | },
|
| 2314 |
|
| 2315 |
|
| 2316 | "first": createPositionalPseudo( function() {
|
| 2317 | return [ 0 ];
|
| 2318 | } ),
|
| 2319 |
|
| 2320 | "last": createPositionalPseudo( function( _matchIndexes, length ) {
|
| 2321 | return [ length - 1 ];
|
| 2322 | } ),
|
| 2323 |
|
| 2324 | "eq": createPositionalPseudo( function( _matchIndexes, length, argument ) {
|
| 2325 | return [ argument < 0 ? argument + length : argument ];
|
| 2326 | } ),
|
| 2327 |
|
| 2328 | "even": createPositionalPseudo( function( matchIndexes, length ) {
|
| 2329 | var i = 0;
|
| 2330 | for ( ; i < length; i += 2 ) {
|
| 2331 | matchIndexes.push( i );
|
| 2332 | }
|
| 2333 | return matchIndexes;
|
| 2334 | } ),
|
| 2335 |
|
| 2336 | "odd": createPositionalPseudo( function( matchIndexes, length ) {
|
| 2337 | var i = 1;
|
| 2338 | for ( ; i < length; i += 2 ) {
|
| 2339 | matchIndexes.push( i );
|
| 2340 | }
|
| 2341 | return matchIndexes;
|
| 2342 | } ),
|
| 2343 |
|
| 2344 | "lt": createPositionalPseudo( function( matchIndexes, length, argument ) {
|
| 2345 | var i = argument < 0 ?
|
| 2346 | argument + length :
|
| 2347 | argument > length ?
|
| 2348 | length :
|
| 2349 | argument;
|
| 2350 | for ( ; --i >= 0; ) {
|
| 2351 | matchIndexes.push( i );
|
| 2352 | }
|
| 2353 | return matchIndexes;
|
| 2354 | } ),
|
| 2355 |
|
| 2356 | "gt": createPositionalPseudo( function( matchIndexes, length, argument ) {
|
| 2357 | var i = argument < 0 ? argument + length : argument;
|
| 2358 | for ( ; ++i < length; ) {
|
| 2359 | matchIndexes.push( i );
|
| 2360 | }
|
| 2361 | return matchIndexes;
|
| 2362 | } )
|
| 2363 | }
|
| 2364 | };
|
| 2365 |
|
| 2366 | Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ];
|
| 2367 |
|
| 2368 |
|
| 2369 | for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
|
| 2370 | Expr.pseudos[ i ] = createInputPseudo( i );
|
| 2371 | }
|
| 2372 | for ( i in { submit: true, reset: true } ) {
|
| 2373 | Expr.pseudos[ i ] = createButtonPseudo( i );
|
| 2374 | }
|
| 2375 |
|
| 2376 |
|
| 2377 | function setFilters() {}
|
| 2378 | setFilters.prototype = Expr.filters = Expr.pseudos;
|
| 2379 | Expr.setFilters = new setFilters();
|
| 2380 |
|
| 2381 | tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
|
| 2382 | var matched, match, tokens, type,
|
| 2383 | soFar, groups, preFilters,
|
| 2384 | cached = tokenCache[ selector + " " ];
|
| 2385 |
|
| 2386 | if ( cached ) {
|
| 2387 | return parseOnly ? 0 : cached.slice( 0 );
|
| 2388 | }
|
| 2389 |
|
| 2390 | soFar = selector;
|
| 2391 | groups = [];
|
| 2392 | preFilters = Expr.preFilter;
|
| 2393 |
|
| 2394 | while ( soFar ) {
|
| 2395 |
|
| 2396 |
|
| 2397 | if ( !matched || ( match = rcomma.exec( soFar ) ) ) {
|
| 2398 | if ( match ) {
|
| 2399 |
|
| 2400 |
|
| 2401 | soFar = soFar.slice( match[ 0 ].length ) || soFar;
|
| 2402 | }
|
| 2403 | groups.push( ( tokens = [] ) );
|
| 2404 | }
|
| 2405 |
|
| 2406 | matched = false;
|
| 2407 |
|
| 2408 |
|
| 2409 | if ( ( match = rcombinators.exec( soFar ) ) ) {
|
| 2410 | matched = match.shift();
|
| 2411 | tokens.push( {
|
| 2412 | value: matched,
|
| 2413 |
|
| 2414 |
|
| 2415 | type: match[ 0 ].replace( rtrim, " " )
|
| 2416 | } );
|
| 2417 | soFar = soFar.slice( matched.length );
|
| 2418 | }
|
| 2419 |
|
| 2420 |
|
| 2421 | for ( type in Expr.filter ) {
|
| 2422 | if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||
|
| 2423 | ( match = preFilters[ type ]( match ) ) ) ) {
|
| 2424 | matched = match.shift();
|
| 2425 | tokens.push( {
|
| 2426 | value: matched,
|
| 2427 | type: type,
|
| 2428 | matches: match
|
| 2429 | } );
|
| 2430 | soFar = soFar.slice( matched.length );
|
| 2431 | }
|
| 2432 | }
|
| 2433 |
|
| 2434 | if ( !matched ) {
|
| 2435 | break;
|
| 2436 | }
|
| 2437 | }
|
| 2438 |
|
| 2439 |
|
| 2440 |
|
| 2441 |
|
| 2442 | return parseOnly ?
|
| 2443 | soFar.length :
|
| 2444 | soFar ?
|
| 2445 | Sizzle.error( selector ) :
|
| 2446 |
|
| 2447 |
|
| 2448 | tokenCache( selector, groups ).slice( 0 );
|
| 2449 | };
|
| 2450 |
|
| 2451 | function toSelector( tokens ) {
|
| 2452 | var i = 0,
|
| 2453 | len = tokens.length,
|
| 2454 | selector = "";
|
| 2455 | for ( ; i < len; i++ ) {
|
| 2456 | selector += tokens[ i ].value;
|
| 2457 | }
|
| 2458 | return selector;
|
| 2459 | }
|
| 2460 |
|
| 2461 | function addCombinator( matcher, combinator, base ) {
|
| 2462 | var dir = combinator.dir,
|
| 2463 | skip = combinator.next,
|
| 2464 | key = skip || dir,
|
| 2465 | checkNonElements = base && key === "parentNode",
|
| 2466 | doneName = done++;
|
| 2467 |
|
| 2468 | return combinator.first ?
|
| 2469 |
|
| 2470 |
|
| 2471 | function( elem, context, xml ) {
|
| 2472 | while ( ( elem = elem[ dir ] ) ) {
|
| 2473 | if ( elem.nodeType === 1 || checkNonElements ) {
|
| 2474 | return matcher( elem, context, xml );
|
| 2475 | }
|
| 2476 | }
|
| 2477 | return false;
|
| 2478 | } :
|
| 2479 |
|
| 2480 |
|
| 2481 | function( elem, context, xml ) {
|
| 2482 | var oldCache, uniqueCache, outerCache,
|
| 2483 | newCache = [ dirruns, doneName ];
|
| 2484 |
|
| 2485 |
|
| 2486 | if ( xml ) {
|
| 2487 | while ( ( elem = elem[ dir ] ) ) {
|
| 2488 | if ( elem.nodeType === 1 || checkNonElements ) {
|
| 2489 | if ( matcher( elem, context, xml ) ) {
|
| 2490 | return true;
|
| 2491 | }
|
| 2492 | }
|
| 2493 | }
|
| 2494 | } else {
|
| 2495 | while ( ( elem = elem[ dir ] ) ) {
|
| 2496 | if ( elem.nodeType === 1 || checkNonElements ) {
|
| 2497 | outerCache = elem[ expando ] || ( elem[ expando ] = {} );
|
| 2498 |
|
| 2499 |
|
| 2500 |
|
| 2501 | uniqueCache = outerCache[ elem.uniqueID ] ||
|
| 2502 | ( outerCache[ elem.uniqueID ] = {} );
|
| 2503 |
|
| 2504 | if ( skip && skip === elem.nodeName.toLowerCase() ) {
|
| 2505 | elem = elem[ dir ] || elem;
|
| 2506 | } else if ( ( oldCache = uniqueCache[ key ] ) &&
|
| 2507 | oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
|
| 2508 |
|
| 2509 |
|
| 2510 | return ( newCache[ 2 ] = oldCache[ 2 ] );
|
| 2511 | } else {
|
| 2512 |
|
| 2513 |
|
| 2514 | uniqueCache[ key ] = newCache;
|
| 2515 |
|
| 2516 |
|
| 2517 | if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {
|
| 2518 | return true;
|
| 2519 | }
|
| 2520 | }
|
| 2521 | }
|
| 2522 | }
|
| 2523 | }
|
| 2524 | return false;
|
| 2525 | };
|
| 2526 | }
|
| 2527 |
|
| 2528 | function elementMatcher( matchers ) {
|
| 2529 | return matchers.length > 1 ?
|
| 2530 | function( elem, context, xml ) {
|
| 2531 | var i = matchers.length;
|
| 2532 | while ( i-- ) {
|
| 2533 | if ( !matchers[ i ]( elem, context, xml ) ) {
|
| 2534 | return false;
|
| 2535 | }
|
| 2536 | }
|
| 2537 | return true;
|
| 2538 | } :
|
| 2539 | matchers[ 0 ];
|
| 2540 | }
|
| 2541 |
|
| 2542 | function multipleContexts( selector, contexts, results ) {
|
| 2543 | var i = 0,
|
| 2544 | len = contexts.length;
|
| 2545 | for ( ; i < len; i++ ) {
|
| 2546 | Sizzle( selector, contexts[ i ], results );
|
| 2547 | }
|
| 2548 | return results;
|
| 2549 | }
|
| 2550 |
|
| 2551 | function condense( unmatched, map, filter, context, xml ) {
|
| 2552 | var elem,
|
| 2553 | newUnmatched = [],
|
| 2554 | i = 0,
|
| 2555 | len = unmatched.length,
|
| 2556 | mapped = map != null;
|
| 2557 |
|
| 2558 | for ( ; i < len; i++ ) {
|
| 2559 | if ( ( elem = unmatched[ i ] ) ) {
|
| 2560 | if ( !filter || filter( elem, context, xml ) ) {
|
| 2561 | newUnmatched.push( elem );
|
| 2562 | if ( mapped ) {
|
| 2563 | map.push( i );
|
| 2564 | }
|
| 2565 | }
|
| 2566 | }
|
| 2567 | }
|
| 2568 |
|
| 2569 | return newUnmatched;
|
| 2570 | }
|
| 2571 |
|
| 2572 | function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
|
| 2573 | if ( postFilter && !postFilter[ expando ] ) {
|
| 2574 | postFilter = setMatcher( postFilter );
|
| 2575 | }
|
| 2576 | if ( postFinder && !postFinder[ expando ] ) {
|
| 2577 | postFinder = setMatcher( postFinder, postSelector );
|
| 2578 | }
|
| 2579 | return markFunction( function( seed, results, context, xml ) {
|
| 2580 | var temp, i, elem,
|
| 2581 | preMap = [],
|
| 2582 | postMap = [],
|
| 2583 | preexisting = results.length,
|
| 2584 |
|
| 2585 |
|
| 2586 | elems = seed || multipleContexts(
|
| 2587 | selector || "*",
|
| 2588 | context.nodeType ? [ context ] : context,
|
| 2589 | []
|
| 2590 | ),
|
| 2591 |
|
| 2592 |
|
| 2593 | matcherIn = preFilter && ( seed || !selector ) ?
|
| 2594 | condense( elems, preMap, preFilter, context, xml ) :
|
| 2595 | elems,
|
| 2596 |
|
| 2597 | matcherOut = matcher ?
|
| 2598 |
|
| 2599 |
|
| 2600 | postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
|
| 2601 |
|
| 2602 |
|
| 2603 | [] :
|
| 2604 |
|
| 2605 |
|
| 2606 | results :
|
| 2607 | matcherIn;
|
| 2608 |
|
| 2609 |
|
| 2610 | if ( matcher ) {
|
| 2611 | matcher( matcherIn, matcherOut, context, xml );
|
| 2612 | }
|
| 2613 |
|
| 2614 |
|
| 2615 | if ( postFilter ) {
|
| 2616 | temp = condense( matcherOut, postMap );
|
| 2617 | postFilter( temp, [], context, xml );
|
| 2618 |
|
| 2619 |
|
| 2620 | i = temp.length;
|
| 2621 | while ( i-- ) {
|
| 2622 | if ( ( elem = temp[ i ] ) ) {
|
| 2623 | matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );
|
| 2624 | }
|
| 2625 | }
|
| 2626 | }
|
| 2627 |
|
| 2628 | if ( seed ) {
|
| 2629 | if ( postFinder || preFilter ) {
|
| 2630 | if ( postFinder ) {
|
| 2631 |
|
| 2632 |
|
| 2633 | temp = [];
|
| 2634 | i = matcherOut.length;
|
| 2635 | while ( i-- ) {
|
| 2636 | if ( ( elem = matcherOut[ i ] ) ) {
|
| 2637 |
|
| 2638 |
|
| 2639 | temp.push( ( matcherIn[ i ] = elem ) );
|
| 2640 | }
|
| 2641 | }
|
| 2642 | postFinder( null, ( matcherOut = [] ), temp, xml );
|
| 2643 | }
|
| 2644 |
|
| 2645 |
|
| 2646 | i = matcherOut.length;
|
| 2647 | while ( i-- ) {
|
| 2648 | if ( ( elem = matcherOut[ i ] ) &&
|
| 2649 | ( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) {
|
| 2650 |
|
| 2651 | seed[ temp ] = !( results[ temp ] = elem );
|
| 2652 | }
|
| 2653 | }
|
| 2654 | }
|
| 2655 |
|
| 2656 |
|
| 2657 | } else {
|
| 2658 | matcherOut = condense(
|
| 2659 | matcherOut === results ?
|
| 2660 | matcherOut.splice( preexisting, matcherOut.length ) :
|
| 2661 | matcherOut
|
| 2662 | );
|
| 2663 | if ( postFinder ) {
|
| 2664 | postFinder( null, results, matcherOut, xml );
|
| 2665 | } else {
|
| 2666 | push.apply( results, matcherOut );
|
| 2667 | }
|
| 2668 | }
|
| 2669 | } );
|
| 2670 | }
|
| 2671 |
|
| 2672 | function matcherFromTokens( tokens ) {
|
| 2673 | var checkContext, matcher, j,
|
| 2674 | len = tokens.length,
|
| 2675 | leadingRelative = Expr.relative[ tokens[ 0 ].type ],
|
| 2676 | implicitRelative = leadingRelative || Expr.relative[ " " ],
|
| 2677 | i = leadingRelative ? 1 : 0,
|
| 2678 |
|
| 2679 |
|
| 2680 | matchContext = addCombinator( function( elem ) {
|
| 2681 | return elem === checkContext;
|
| 2682 | }, implicitRelative, true ),
|
| 2683 | matchAnyContext = addCombinator( function( elem ) {
|
| 2684 | return indexOf( checkContext, elem ) > -1;
|
| 2685 | }, implicitRelative, true ),
|
| 2686 | matchers = [ function( elem, context, xml ) {
|
| 2687 | var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
|
| 2688 | ( checkContext = context ).nodeType ?
|
| 2689 | matchContext( elem, context, xml ) :
|
| 2690 | matchAnyContext( elem, context, xml ) );
|
| 2691 |
|
| 2692 |
|
| 2693 | checkContext = null;
|
| 2694 | return ret;
|
| 2695 | } ];
|
| 2696 |
|
| 2697 | for ( ; i < len; i++ ) {
|
| 2698 | if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) {
|
| 2699 | matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];
|
| 2700 | } else {
|
| 2701 | matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );
|
| 2702 |
|
| 2703 |
|
| 2704 | if ( matcher[ expando ] ) {
|
| 2705 |
|
| 2706 |
|
| 2707 | j = ++i;
|
| 2708 | for ( ; j < len; j++ ) {
|
| 2709 | if ( Expr.relative[ tokens[ j ].type ] ) {
|
| 2710 | break;
|
| 2711 | }
|
| 2712 | }
|
| 2713 | return setMatcher(
|
| 2714 | i > 1 && elementMatcher( matchers ),
|
| 2715 | i > 1 && toSelector(
|
| 2716 |
|
| 2717 |
|
| 2718 | tokens
|
| 2719 | .slice( 0, i - 1 )
|
| 2720 | .concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } )
|
| 2721 | ).replace( rtrim, "$1" ),
|
| 2722 | matcher,
|
| 2723 | i < j && matcherFromTokens( tokens.slice( i, j ) ),
|
| 2724 | j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),
|
| 2725 | j < len && toSelector( tokens )
|
| 2726 | );
|
| 2727 | }
|
| 2728 | matchers.push( matcher );
|
| 2729 | }
|
| 2730 | }
|
| 2731 |
|
| 2732 | return elementMatcher( matchers );
|
| 2733 | }
|
| 2734 |
|
| 2735 | function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
|
| 2736 | var bySet = setMatchers.length > 0,
|
| 2737 | byElement = elementMatchers.length > 0,
|
| 2738 | superMatcher = function( seed, context, xml, results, outermost ) {
|
| 2739 | var elem, j, matcher,
|
| 2740 | matchedCount = 0,
|
| 2741 | i = "0",
|
| 2742 | unmatched = seed && [],
|
| 2743 | setMatched = [],
|
| 2744 | contextBackup = outermostContext,
|
| 2745 |
|
| 2746 |
|
| 2747 | elems = seed || byElement && Expr.find[ "TAG" ]( "*", outermost ),
|
| 2748 |
|
| 2749 |
|
| 2750 | dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),
|
| 2751 | len = elems.length;
|
| 2752 |
|
| 2753 | if ( outermost ) {
|
| 2754 |
|
| 2755 |
|
| 2756 |
|
| 2757 |
|
| 2758 |
|
| 2759 | outermostContext = context == document || context || outermost;
|
| 2760 | }
|
| 2761 |
|
| 2762 |
|
| 2763 |
|
| 2764 |
|
| 2765 | for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {
|
| 2766 | if ( byElement && elem ) {
|
| 2767 | j = 0;
|
| 2768 |
|
| 2769 |
|
| 2770 |
|
| 2771 |
|
| 2772 |
|
| 2773 | if ( !context && elem.ownerDocument != document ) {
|
| 2774 | setDocument( elem );
|
| 2775 | xml = !documentIsHTML;
|
| 2776 | }
|
| 2777 | while ( ( matcher = elementMatchers[ j++ ] ) ) {
|
| 2778 | if ( matcher( elem, context || document, xml ) ) {
|
| 2779 | results.push( elem );
|
| 2780 | break;
|
| 2781 | }
|
| 2782 | }
|
| 2783 | if ( outermost ) {
|
| 2784 | dirruns = dirrunsUnique;
|
| 2785 | }
|
| 2786 | }
|
| 2787 |
|
| 2788 |
|
| 2789 | if ( bySet ) {
|
| 2790 |
|
| 2791 |
|
| 2792 | if ( ( elem = !matcher && elem ) ) {
|
| 2793 | matchedCount--;
|
| 2794 | }
|
| 2795 |
|
| 2796 |
|
| 2797 | if ( seed ) {
|
| 2798 | unmatched.push( elem );
|
| 2799 | }
|
| 2800 | }
|
| 2801 | }
|
| 2802 |
|
| 2803 |
|
| 2804 |
|
| 2805 | matchedCount += i;
|
| 2806 |
|
| 2807 |
|
| 2808 |
|
| 2809 |
|
| 2810 |
|
| 2811 |
|
| 2812 |
|
| 2813 |
|
| 2814 | if ( bySet && i !== matchedCount ) {
|
| 2815 | j = 0;
|
| 2816 | while ( ( matcher = setMatchers[ j++ ] ) ) {
|
| 2817 | matcher( unmatched, setMatched, context, xml );
|
| 2818 | }
|
| 2819 |
|
| 2820 | if ( seed ) {
|
| 2821 |
|
| 2822 |
|
| 2823 | if ( matchedCount > 0 ) {
|
| 2824 | while ( i-- ) {
|
| 2825 | if ( !( unmatched[ i ] || setMatched[ i ] ) ) {
|
| 2826 | setMatched[ i ] = pop.call( results );
|
| 2827 | }
|
| 2828 | }
|
| 2829 | }
|
| 2830 |
|
| 2831 |
|
| 2832 | setMatched = condense( setMatched );
|
| 2833 | }
|
| 2834 |
|
| 2835 |
|
| 2836 | push.apply( results, setMatched );
|
| 2837 |
|
| 2838 |
|
| 2839 | if ( outermost && !seed && setMatched.length > 0 &&
|
| 2840 | ( matchedCount + setMatchers.length ) > 1 ) {
|
| 2841 |
|
| 2842 | Sizzle.uniqueSort( results );
|
| 2843 | }
|
| 2844 | }
|
| 2845 |
|
| 2846 |
|
| 2847 | if ( outermost ) {
|
| 2848 | dirruns = dirrunsUnique;
|
| 2849 | outermostContext = contextBackup;
|
| 2850 | }
|
| 2851 |
|
| 2852 | return unmatched;
|
| 2853 | };
|
| 2854 |
|
| 2855 | return bySet ?
|
| 2856 | markFunction( superMatcher ) :
|
| 2857 | superMatcher;
|
| 2858 | }
|
| 2859 |
|
| 2860 | compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
|
| 2861 | var i,
|
| 2862 | setMatchers = [],
|
| 2863 | elementMatchers = [],
|
| 2864 | cached = compilerCache[ selector + " " ];
|
| 2865 |
|
| 2866 | if ( !cached ) {
|
| 2867 |
|
| 2868 |
|
| 2869 | if ( !match ) {
|
| 2870 | match = tokenize( selector );
|
| 2871 | }
|
| 2872 | i = match.length;
|
| 2873 | while ( i-- ) {
|
| 2874 | cached = matcherFromTokens( match[ i ] );
|
| 2875 | if ( cached[ expando ] ) {
|
| 2876 | setMatchers.push( cached );
|
| 2877 | } else {
|
| 2878 | elementMatchers.push( cached );
|
| 2879 | }
|
| 2880 | }
|
| 2881 |
|
| 2882 |
|
| 2883 | cached = compilerCache(
|
| 2884 | selector,
|
| 2885 | matcherFromGroupMatchers( elementMatchers, setMatchers )
|
| 2886 | );
|
| 2887 |
|
| 2888 |
|
| 2889 | cached.selector = selector;
|
| 2890 | }
|
| 2891 | return cached;
|
| 2892 | };
|
| 2893 |
|
| 2894 | |
| 2895 | |
| 2896 | |
| 2897 | |
| 2898 | |
| 2899 | |
| 2900 | |
| 2901 | |
| 2902 |
|
| 2903 | select = Sizzle.select = function( selector, context, results, seed ) {
|
| 2904 | var i, tokens, token, type, find,
|
| 2905 | compiled = typeof selector === "function" && selector,
|
| 2906 | match = !seed && tokenize( ( selector = compiled.selector || selector ) );
|
| 2907 |
|
| 2908 | results = results || [];
|
| 2909 |
|
| 2910 |
|
| 2911 |
|
| 2912 | if ( match.length === 1 ) {
|
| 2913 |
|
| 2914 |
|
| 2915 | tokens = match[ 0 ] = match[ 0 ].slice( 0 );
|
| 2916 | if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" &&
|
| 2917 | context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {
|
| 2918 |
|
| 2919 | context = ( Expr.find[ "ID" ]( token.matches[ 0 ]
|
| 2920 | .replace( runescape, funescape ), context ) || [] )[ 0 ];
|
| 2921 | if ( !context ) {
|
| 2922 | return results;
|
| 2923 |
|
| 2924 |
|
| 2925 | } else if ( compiled ) {
|
| 2926 | context = context.parentNode;
|
| 2927 | }
|
| 2928 |
|
| 2929 | selector = selector.slice( tokens.shift().value.length );
|
| 2930 | }
|
| 2931 |
|
| 2932 |
|
| 2933 | i = matchExpr[ "needsContext" ].test( selector ) ? 0 : tokens.length;
|
| 2934 | while ( i-- ) {
|
| 2935 | token = tokens[ i ];
|
| 2936 |
|
| 2937 |
|
| 2938 | if ( Expr.relative[ ( type = token.type ) ] ) {
|
| 2939 | break;
|
| 2940 | }
|
| 2941 | if ( ( find = Expr.find[ type ] ) ) {
|
| 2942 |
|
| 2943 |
|
| 2944 | if ( ( seed = find(
|
| 2945 | token.matches[ 0 ].replace( runescape, funescape ),
|
| 2946 | rsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) ||
|
| 2947 | context
|
| 2948 | ) ) ) {
|
| 2949 |
|
| 2950 |
|
| 2951 | tokens.splice( i, 1 );
|
| 2952 | selector = seed.length && toSelector( tokens );
|
| 2953 | if ( !selector ) {
|
| 2954 | push.apply( results, seed );
|
| 2955 | return results;
|
| 2956 | }
|
| 2957 |
|
| 2958 | break;
|
| 2959 | }
|
| 2960 | }
|
| 2961 | }
|
| 2962 | }
|
| 2963 |
|
| 2964 |
|
| 2965 |
|
| 2966 | ( compiled || compile( selector, match ) )(
|
| 2967 | seed,
|
| 2968 | context,
|
| 2969 | !documentIsHTML,
|
| 2970 | results,
|
| 2971 | !context || rsibling.test( selector ) && testContext( context.parentNode ) || context
|
| 2972 | );
|
| 2973 | return results;
|
| 2974 | };
|
| 2975 |
|
| 2976 |
|
| 2977 |
|
| 2978 |
|
| 2979 | support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando;
|
| 2980 |
|
| 2981 |
|
| 2982 |
|
| 2983 | support.detectDuplicates = !!hasDuplicate;
|
| 2984 |
|
| 2985 |
|
| 2986 | setDocument();
|
| 2987 |
|
| 2988 |
|
| 2989 |
|
| 2990 | support.sortDetached = assert( function( el ) {
|
| 2991 |
|
| 2992 |
|
| 2993 | return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1;
|
| 2994 | } );
|
| 2995 |
|
| 2996 |
|
| 2997 |
|
| 2998 |
|
| 2999 | if ( !assert( function( el ) {
|
| 3000 | el.innerHTML = "<a href='#'></a>";
|
| 3001 | return el.firstChild.getAttribute( "href" ) === "#";
|
| 3002 | } ) ) {
|
| 3003 | addHandle( "type|href|height|width", function( elem, name, isXML ) {
|
| 3004 | if ( !isXML ) {
|
| 3005 | return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
|
| 3006 | }
|
| 3007 | } );
|
| 3008 | }
|
| 3009 |
|
| 3010 |
|
| 3011 |
|
| 3012 | if ( !support.attributes || !assert( function( el ) {
|
| 3013 | el.innerHTML = "<input/>";
|
| 3014 | el.firstChild.setAttribute( "value", "" );
|
| 3015 | return el.firstChild.getAttribute( "value" ) === "";
|
| 3016 | } ) ) {
|
| 3017 | addHandle( "value", function( elem, _name, isXML ) {
|
| 3018 | if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
|
| 3019 | return elem.defaultValue;
|
| 3020 | }
|
| 3021 | } );
|
| 3022 | }
|
| 3023 |
|
| 3024 |
|
| 3025 |
|
| 3026 | if ( !assert( function( el ) {
|
| 3027 | return el.getAttribute( "disabled" ) == null;
|
| 3028 | } ) ) {
|
| 3029 | addHandle( booleans, function( elem, name, isXML ) {
|
| 3030 | var val;
|
| 3031 | if ( !isXML ) {
|
| 3032 | return elem[ name ] === true ? name.toLowerCase() :
|
| 3033 | ( val = elem.getAttributeNode( name ) ) && val.specified ?
|
| 3034 | val.value :
|
| 3035 | null;
|
| 3036 | }
|
| 3037 | } );
|
| 3038 | }
|
| 3039 |
|
| 3040 | return Sizzle;
|
| 3041 |
|
| 3042 | } )( window );
|
| 3043 |
|
| 3044 |
|
| 3045 |
|
| 3046 | jQuery.find = Sizzle;
|
| 3047 | jQuery.expr = Sizzle.selectors;
|
| 3048 |
|
| 3049 |
|
| 3050 | jQuery.expr[ ":" ] = jQuery.expr.pseudos;
|
| 3051 | jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
|
| 3052 | jQuery.text = Sizzle.getText;
|
| 3053 | jQuery.isXMLDoc = Sizzle.isXML;
|
| 3054 | jQuery.contains = Sizzle.contains;
|
| 3055 | jQuery.escapeSelector = Sizzle.escape;
|
| 3056 |
|
| 3057 |
|
| 3058 |
|
| 3059 |
|
| 3060 | var dir = function( elem, dir, until ) {
|
| 3061 | var matched = [],
|
| 3062 | truncate = until !== undefined;
|
| 3063 |
|
| 3064 | while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
|
| 3065 | if ( elem.nodeType === 1 ) {
|
| 3066 | if ( truncate && jQuery( elem ).is( until ) ) {
|
| 3067 | break;
|
| 3068 | }
|
| 3069 | matched.push( elem );
|
| 3070 | }
|
| 3071 | }
|
| 3072 | return matched;
|
| 3073 | };
|
| 3074 |
|
| 3075 |
|
| 3076 | var siblings = function( n, elem ) {
|
| 3077 | var matched = [];
|
| 3078 |
|
| 3079 | for ( ; n; n = n.nextSibling ) {
|
| 3080 | if ( n.nodeType === 1 && n !== elem ) {
|
| 3081 | matched.push( n );
|
| 3082 | }
|
| 3083 | }
|
| 3084 |
|
| 3085 | return matched;
|
| 3086 | };
|
| 3087 |
|
| 3088 |
|
| 3089 | var rneedsContext = jQuery.expr.match.needsContext;
|
| 3090 |
|
| 3091 |
|
| 3092 |
|
| 3093 | function nodeName( elem, name ) {
|
| 3094 |
|
| 3095 | return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
|
| 3096 |
|
| 3097 | }
|
| 3098 | var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );
|
| 3099 |
|
| 3100 |
|
| 3101 |
|
| 3102 |
|
| 3103 | function winnow( elements, qualifier, not ) {
|
| 3104 | if ( isFunction( qualifier ) ) {
|
| 3105 | return jQuery.grep( elements, function( elem, i ) {
|
| 3106 | return !!qualifier.call( elem, i, elem ) !== not;
|
| 3107 | } );
|
| 3108 | }
|
| 3109 |
|
| 3110 |
|
| 3111 | if ( qualifier.nodeType ) {
|
| 3112 | return jQuery.grep( elements, function( elem ) {
|
| 3113 | return ( elem === qualifier ) !== not;
|
| 3114 | } );
|
| 3115 | }
|
| 3116 |
|
| 3117 |
|
| 3118 | if ( typeof qualifier !== "string" ) {
|
| 3119 | return jQuery.grep( elements, function( elem ) {
|
| 3120 | return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
|
| 3121 | } );
|
| 3122 | }
|
| 3123 |
|
| 3124 |
|
| 3125 | return jQuery.filter( qualifier, elements, not );
|
| 3126 | }
|
| 3127 |
|
| 3128 | jQuery.filter = function( expr, elems, not ) {
|
| 3129 | var elem = elems[ 0 ];
|
| 3130 |
|
| 3131 | if ( not ) {
|
| 3132 | expr = ":not(" + expr + ")";
|
| 3133 | }
|
| 3134 |
|
| 3135 | if ( elems.length === 1 && elem.nodeType === 1 ) {
|
| 3136 | return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];
|
| 3137 | }
|
| 3138 |
|
| 3139 | return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
|
| 3140 | return elem.nodeType === 1;
|
| 3141 | } ) );
|
| 3142 | };
|
| 3143 |
|
| 3144 | jQuery.fn.extend( {
|
| 3145 | find: function( selector ) {
|
| 3146 | var i, ret,
|
| 3147 | len = this.length,
|
| 3148 | self = this;
|
| 3149 |
|
| 3150 | if ( typeof selector !== "string" ) {
|
| 3151 | return this.pushStack( jQuery( selector ).filter( function() {
|
| 3152 | for ( i = 0; i < len; i++ ) {
|
| 3153 | if ( jQuery.contains( self[ i ], this ) ) {
|
| 3154 | return true;
|
| 3155 | }
|
| 3156 | }
|
| 3157 | } ) );
|
| 3158 | }
|
| 3159 |
|
| 3160 | ret = this.pushStack( [] );
|
| 3161 |
|
| 3162 | for ( i = 0; i < len; i++ ) {
|
| 3163 | jQuery.find( selector, self[ i ], ret );
|
| 3164 | }
|
| 3165 |
|
| 3166 | return len > 1 ? jQuery.uniqueSort( ret ) : ret;
|
| 3167 | },
|
| 3168 | filter: function( selector ) {
|
| 3169 | return this.pushStack( winnow( this, selector || [], false ) );
|
| 3170 | },
|
| 3171 | not: function( selector ) {
|
| 3172 | return this.pushStack( winnow( this, selector || [], true ) );
|
| 3173 | },
|
| 3174 | is: function( selector ) {
|
| 3175 | return !!winnow(
|
| 3176 | this,
|
| 3177 |
|
| 3178 |
|
| 3179 |
|
| 3180 | typeof selector === "string" && rneedsContext.test( selector ) ?
|
| 3181 | jQuery( selector ) :
|
| 3182 | selector || [],
|
| 3183 | false
|
| 3184 | ).length;
|
| 3185 | }
|
| 3186 | } );
|
| 3187 |
|
| 3188 |
|
| 3189 |
|
| 3190 |
|
| 3191 |
|
| 3192 |
|
| 3193 | var rootjQuery,
|
| 3194 |
|
| 3195 |
|
| 3196 |
|
| 3197 |
|
| 3198 |
|
| 3199 | rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,
|
| 3200 |
|
| 3201 | init = jQuery.fn.init = function( selector, context, root ) {
|
| 3202 | var match, elem;
|
| 3203 |
|
| 3204 |
|
| 3205 | if ( !selector ) {
|
| 3206 | return this;
|
| 3207 | }
|
| 3208 |
|
| 3209 |
|
| 3210 |
|
| 3211 | root = root || rootjQuery;
|
| 3212 |
|
| 3213 |
|
| 3214 | if ( typeof selector === "string" ) {
|
| 3215 | if ( selector[ 0 ] === "<" &&
|
| 3216 | selector[ selector.length - 1 ] === ">" &&
|
| 3217 | selector.length >= 3 ) {
|
| 3218 |
|
| 3219 |
|
| 3220 | match = [ null, selector, null ];
|
| 3221 |
|
| 3222 | } else {
|
| 3223 | match = rquickExpr.exec( selector );
|
| 3224 | }
|
| 3225 |
|
| 3226 |
|
| 3227 | if ( match && ( match[ 1 ] || !context ) ) {
|
| 3228 |
|
| 3229 |
|
| 3230 | if ( match[ 1 ] ) {
|
| 3231 | context = context instanceof jQuery ? context[ 0 ] : context;
|
| 3232 |
|
| 3233 |
|
| 3234 |
|
| 3235 | jQuery.merge( this, jQuery.parseHTML(
|
| 3236 | match[ 1 ],
|
| 3237 | context && context.nodeType ? context.ownerDocument || context : document,
|
| 3238 | true
|
| 3239 | ) );
|
| 3240 |
|
| 3241 |
|
| 3242 | if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
|
| 3243 | for ( match in context ) {
|
| 3244 |
|
| 3245 |
|
| 3246 | if ( isFunction( this[ match ] ) ) {
|
| 3247 | this[ match ]( context[ match ] );
|
| 3248 |
|
| 3249 |
|
| 3250 | } else {
|
| 3251 | this.attr( match, context[ match ] );
|
| 3252 | }
|
| 3253 | }
|
| 3254 | }
|
| 3255 |
|
| 3256 | return this;
|
| 3257 |
|
| 3258 |
|
| 3259 | } else {
|
| 3260 | elem = document.getElementById( match[ 2 ] );
|
| 3261 |
|
| 3262 | if ( elem ) {
|
| 3263 |
|
| 3264 |
|
| 3265 | this[ 0 ] = elem;
|
| 3266 | this.length = 1;
|
| 3267 | }
|
| 3268 | return this;
|
| 3269 | }
|
| 3270 |
|
| 3271 |
|
| 3272 | } else if ( !context || context.jquery ) {
|
| 3273 | return ( context || root ).find( selector );
|
| 3274 |
|
| 3275 |
|
| 3276 |
|
| 3277 | } else {
|
| 3278 | return this.constructor( context ).find( selector );
|
| 3279 | }
|
| 3280 |
|
| 3281 |
|
| 3282 | } else if ( selector.nodeType ) {
|
| 3283 | this[ 0 ] = selector;
|
| 3284 | this.length = 1;
|
| 3285 | return this;
|
| 3286 |
|
| 3287 |
|
| 3288 |
|
| 3289 | } else if ( isFunction( selector ) ) {
|
| 3290 | return root.ready !== undefined ?
|
| 3291 | root.ready( selector ) :
|
| 3292 |
|
| 3293 |
|
| 3294 | selector( jQuery );
|
| 3295 | }
|
| 3296 |
|
| 3297 | return jQuery.makeArray( selector, this );
|
| 3298 | };
|
| 3299 |
|
| 3300 |
|
| 3301 | init.prototype = jQuery.fn;
|
| 3302 |
|
| 3303 |
|
| 3304 | rootjQuery = jQuery( document );
|
| 3305 |
|
| 3306 |
|
| 3307 | var rparentsprev = /^(?:parents|prev(?:Until|All))/,
|
| 3308 |
|
| 3309 |
|
| 3310 | guaranteedUnique = {
|
| 3311 | children: true,
|
| 3312 | contents: true,
|
| 3313 | next: true,
|
| 3314 | prev: true
|
| 3315 | };
|
| 3316 |
|
| 3317 | jQuery.fn.extend( {
|
| 3318 | has: function( target ) {
|
| 3319 | var targets = jQuery( target, this ),
|
| 3320 | l = targets.length;
|
| 3321 |
|
| 3322 | return this.filter( function() {
|
| 3323 | var i = 0;
|
| 3324 | for ( ; i < l; i++ ) {
|
| 3325 | if ( jQuery.contains( this, targets[ i ] ) ) {
|
| 3326 | return true;
|
| 3327 | }
|
| 3328 | }
|
| 3329 | } );
|
| 3330 | },
|
| 3331 |
|
| 3332 | closest: function( selectors, context ) {
|
| 3333 | var cur,
|
| 3334 | i = 0,
|
| 3335 | l = this.length,
|
| 3336 | matched = [],
|
| 3337 | targets = typeof selectors !== "string" && jQuery( selectors );
|
| 3338 |
|
| 3339 |
|
| 3340 | if ( !rneedsContext.test( selectors ) ) {
|
| 3341 | for ( ; i < l; i++ ) {
|
| 3342 | for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {
|
| 3343 |
|
| 3344 |
|
| 3345 | if ( cur.nodeType < 11 && ( targets ?
|
| 3346 | targets.index( cur ) > -1 :
|
| 3347 |
|
| 3348 |
|
| 3349 | cur.nodeType === 1 &&
|
| 3350 | jQuery.find.matchesSelector( cur, selectors ) ) ) {
|
| 3351 |
|
| 3352 | matched.push( cur );
|
| 3353 | break;
|
| 3354 | }
|
| 3355 | }
|
| 3356 | }
|
| 3357 | }
|
| 3358 |
|
| 3359 | return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );
|
| 3360 | },
|
| 3361 |
|
| 3362 |
|
| 3363 | index: function( elem ) {
|
| 3364 |
|
| 3365 |
|
| 3366 | if ( !elem ) {
|
| 3367 | return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
|
| 3368 | }
|
| 3369 |
|
| 3370 |
|
| 3371 | if ( typeof elem === "string" ) {
|
| 3372 | return indexOf.call( jQuery( elem ), this[ 0 ] );
|
| 3373 | }
|
| 3374 |
|
| 3375 |
|
| 3376 | return indexOf.call( this,
|
| 3377 |
|
| 3378 |
|
| 3379 | elem.jquery ? elem[ 0 ] : elem
|
| 3380 | );
|
| 3381 | },
|
| 3382 |
|
| 3383 | add: function( selector, context ) {
|
| 3384 | return this.pushStack(
|
| 3385 | jQuery.uniqueSort(
|
| 3386 | jQuery.merge( this.get(), jQuery( selector, context ) )
|
| 3387 | )
|
| 3388 | );
|
| 3389 | },
|
| 3390 |
|
| 3391 | addBack: function( selector ) {
|
| 3392 | return this.add( selector == null ?
|
| 3393 | this.prevObject : this.prevObject.filter( selector )
|
| 3394 | );
|
| 3395 | }
|
| 3396 | } );
|
| 3397 |
|
| 3398 | function sibling( cur, dir ) {
|
| 3399 | while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}
|
| 3400 | return cur;
|
| 3401 | }
|
| 3402 |
|
| 3403 | jQuery.each( {
|
| 3404 | parent: function( elem ) {
|
| 3405 | var parent = elem.parentNode;
|
| 3406 | return parent && parent.nodeType !== 11 ? parent : null;
|
| 3407 | },
|
| 3408 | parents: function( elem ) {
|
| 3409 | return dir( elem, "parentNode" );
|
| 3410 | },
|
| 3411 | parentsUntil: function( elem, _i, until ) {
|
| 3412 | return dir( elem, "parentNode", until );
|
| 3413 | },
|
| 3414 | next: function( elem ) {
|
| 3415 | return sibling( elem, "nextSibling" );
|
| 3416 | },
|
| 3417 | prev: function( elem ) {
|
| 3418 | return sibling( elem, "previousSibling" );
|
| 3419 | },
|
| 3420 | nextAll: function( elem ) {
|
| 3421 | return dir( elem, "nextSibling" );
|
| 3422 | },
|
| 3423 | prevAll: function( elem ) {
|
| 3424 | return dir( elem, "previousSibling" );
|
| 3425 | },
|
| 3426 | nextUntil: function( elem, _i, until ) {
|
| 3427 | return dir( elem, "nextSibling", until );
|
| 3428 | },
|
| 3429 | prevUntil: function( elem, _i, until ) {
|
| 3430 | return dir( elem, "previousSibling", until );
|
| 3431 | },
|
| 3432 | siblings: function( elem ) {
|
| 3433 | return siblings( ( elem.parentNode || {} ).firstChild, elem );
|
| 3434 | },
|
| 3435 | children: function( elem ) {
|
| 3436 | return siblings( elem.firstChild );
|
| 3437 | },
|
| 3438 | contents: function( elem ) {
|
| 3439 | if ( elem.contentDocument != null &&
|
| 3440 |
|
| 3441 |
|
| 3442 |
|
| 3443 |
|
| 3444 | getProto( elem.contentDocument ) ) {
|
| 3445 |
|
| 3446 | return elem.contentDocument;
|
| 3447 | }
|
| 3448 |
|
| 3449 |
|
| 3450 |
|
| 3451 |
|
| 3452 | if ( nodeName( elem, "template" ) ) {
|
| 3453 | elem = elem.content || elem;
|
| 3454 | }
|
| 3455 |
|
| 3456 | return jQuery.merge( [], elem.childNodes );
|
| 3457 | }
|
| 3458 | }, function( name, fn ) {
|
| 3459 | jQuery.fn[ name ] = function( until, selector ) {
|
| 3460 | var matched = jQuery.map( this, fn, until );
|
| 3461 |
|
| 3462 | if ( name.slice( -5 ) !== "Until" ) {
|
| 3463 | selector = until;
|
| 3464 | }
|
| 3465 |
|
| 3466 | if ( selector && typeof selector === "string" ) {
|
| 3467 | matched = jQuery.filter( selector, matched );
|
| 3468 | }
|
| 3469 |
|
| 3470 | if ( this.length > 1 ) {
|
| 3471 |
|
| 3472 |
|
| 3473 | if ( !guaranteedUnique[ name ] ) {
|
| 3474 | jQuery.uniqueSort( matched );
|
| 3475 | }
|
| 3476 |
|
| 3477 |
|
| 3478 | if ( rparentsprev.test( name ) ) {
|
| 3479 | matched.reverse();
|
| 3480 | }
|
| 3481 | }
|
| 3482 |
|
| 3483 | return this.pushStack( matched );
|
| 3484 | };
|
| 3485 | } );
|
| 3486 | var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g );
|
| 3487 |
|
| 3488 |
|
| 3489 |
|
| 3490 |
|
| 3491 | function createOptions( options ) {
|
| 3492 | var object = {};
|
| 3493 | jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {
|
| 3494 | object[ flag ] = true;
|
| 3495 | } );
|
| 3496 | return object;
|
| 3497 | }
|
| 3498 |
|
| 3499 | |
| 3500 | |
| 3501 | |
| 3502 | |
| 3503 | |
| 3504 | |
| 3505 | |
| 3506 | |
| 3507 | |
| 3508 | |
| 3509 | |
| 3510 | |
| 3511 | |
| 3512 | |
| 3513 | |
| 3514 | |
| 3515 | |
| 3516 | |
| 3517 | |
| 3518 | |
| 3519 | |
| 3520 |
|
| 3521 | jQuery.Callbacks = function( options ) {
|
| 3522 |
|
| 3523 |
|
| 3524 |
|
| 3525 | options = typeof options === "string" ?
|
| 3526 | createOptions( options ) :
|
| 3527 | jQuery.extend( {}, options );
|
| 3528 |
|
| 3529 | var
|
| 3530 | firing,
|
| 3531 |
|
| 3532 |
|
| 3533 | memory,
|
| 3534 |
|
| 3535 |
|
| 3536 | fired,
|
| 3537 |
|
| 3538 |
|
| 3539 | locked,
|
| 3540 |
|
| 3541 |
|
| 3542 | list = [],
|
| 3543 |
|
| 3544 |
|
| 3545 | queue = [],
|
| 3546 |
|
| 3547 |
|
| 3548 | firingIndex = -1,
|
| 3549 |
|
| 3550 |
|
| 3551 | fire = function() {
|
| 3552 |
|
| 3553 |
|
| 3554 | locked = locked || options.once;
|
| 3555 |
|
| 3556 |
|
| 3557 |
|
| 3558 | fired = firing = true;
|
| 3559 | for ( ; queue.length; firingIndex = -1 ) {
|
| 3560 | memory = queue.shift();
|
| 3561 | while ( ++firingIndex < list.length ) {
|
| 3562 |
|
| 3563 |
|
| 3564 | if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
|
| 3565 | options.stopOnFalse ) {
|
| 3566 |
|
| 3567 |
|
| 3568 | firingIndex = list.length;
|
| 3569 | memory = false;
|
| 3570 | }
|
| 3571 | }
|
| 3572 | }
|
| 3573 |
|
| 3574 |
|
| 3575 | if ( !options.memory ) {
|
| 3576 | memory = false;
|
| 3577 | }
|
| 3578 |
|
| 3579 | firing = false;
|
| 3580 |
|
| 3581 |
|
| 3582 | if ( locked ) {
|
| 3583 |
|
| 3584 |
|
| 3585 | if ( memory ) {
|
| 3586 | list = [];
|
| 3587 |
|
| 3588 |
|
| 3589 | } else {
|
| 3590 | list = "";
|
| 3591 | }
|
| 3592 | }
|
| 3593 | },
|
| 3594 |
|
| 3595 |
|
| 3596 | self = {
|
| 3597 |
|
| 3598 |
|
| 3599 | add: function() {
|
| 3600 | if ( list ) {
|
| 3601 |
|
| 3602 |
|
| 3603 | if ( memory && !firing ) {
|
| 3604 | firingIndex = list.length - 1;
|
| 3605 | queue.push( memory );
|
| 3606 | }
|
| 3607 |
|
| 3608 | ( function add( args ) {
|
| 3609 | jQuery.each( args, function( _, arg ) {
|
| 3610 | if ( isFunction( arg ) ) {
|
| 3611 | if ( !options.unique || !self.has( arg ) ) {
|
| 3612 | list.push( arg );
|
| 3613 | }
|
| 3614 | } else if ( arg && arg.length && toType( arg ) !== "string" ) {
|
| 3615 |
|
| 3616 |
|
| 3617 | add( arg );
|
| 3618 | }
|
| 3619 | } );
|
| 3620 | } )( arguments );
|
| 3621 |
|
| 3622 | if ( memory && !firing ) {
|
| 3623 | fire();
|
| 3624 | }
|
| 3625 | }
|
| 3626 | return this;
|
| 3627 | },
|
| 3628 |
|
| 3629 |
|
| 3630 | remove: function() {
|
| 3631 | jQuery.each( arguments, function( _, arg ) {
|
| 3632 | var index;
|
| 3633 | while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
|
| 3634 | list.splice( index, 1 );
|
| 3635 |
|
| 3636 |
|
| 3637 | if ( index <= firingIndex ) {
|
| 3638 | firingIndex--;
|
| 3639 | }
|
| 3640 | }
|
| 3641 | } );
|
| 3642 | return this;
|
| 3643 | },
|
| 3644 |
|
| 3645 |
|
| 3646 |
|
| 3647 | has: function( fn ) {
|
| 3648 | return fn ?
|
| 3649 | jQuery.inArray( fn, list ) > -1 :
|
| 3650 | list.length > 0;
|
| 3651 | },
|
| 3652 |
|
| 3653 |
|
| 3654 | empty: function() {
|
| 3655 | if ( list ) {
|
| 3656 | list = [];
|
| 3657 | }
|
| 3658 | return this;
|
| 3659 | },
|
| 3660 |
|
| 3661 |
|
| 3662 |
|
| 3663 |
|
| 3664 | disable: function() {
|
| 3665 | locked = queue = [];
|
| 3666 | list = memory = "";
|
| 3667 | return this;
|
| 3668 | },
|
| 3669 | disabled: function() {
|
| 3670 | return !list;
|
| 3671 | },
|
| 3672 |
|
| 3673 |
|
| 3674 |
|
| 3675 |
|
| 3676 | lock: function() {
|
| 3677 | locked = queue = [];
|
| 3678 | if ( !memory && !firing ) {
|
| 3679 | list = memory = "";
|
| 3680 | }
|
| 3681 | return this;
|
| 3682 | },
|
| 3683 | locked: function() {
|
| 3684 | return !!locked;
|
| 3685 | },
|
| 3686 |
|
| 3687 |
|
| 3688 | fireWith: function( context, args ) {
|
| 3689 | if ( !locked ) {
|
| 3690 | args = args || [];
|
| 3691 | args = [ context, args.slice ? args.slice() : args ];
|
| 3692 | queue.push( args );
|
| 3693 | if ( !firing ) {
|
| 3694 | fire();
|
| 3695 | }
|
| 3696 | }
|
| 3697 | return this;
|
| 3698 | },
|
| 3699 |
|
| 3700 |
|
| 3701 | fire: function() {
|
| 3702 | self.fireWith( this, arguments );
|
| 3703 | return this;
|
| 3704 | },
|
| 3705 |
|
| 3706 |
|
| 3707 | fired: function() {
|
| 3708 | return !!fired;
|
| 3709 | }
|
| 3710 | };
|
| 3711 |
|
| 3712 | return self;
|
| 3713 | };
|
| 3714 |
|
| 3715 |
|
| 3716 | function Identity( v ) {
|
| 3717 | return v;
|
| 3718 | }
|
| 3719 | function Thrower( ex ) {
|
| 3720 | throw ex;
|
| 3721 | }
|
| 3722 |
|
| 3723 | function adoptValue( value, resolve, reject, noValue ) {
|
| 3724 | var method;
|
| 3725 |
|
| 3726 | try {
|
| 3727 |
|
| 3728 |
|
| 3729 | if ( value && isFunction( ( method = value.promise ) ) ) {
|
| 3730 | method.call( value ).done( resolve ).fail( reject );
|
| 3731 |
|
| 3732 |
|
| 3733 | } else if ( value && isFunction( ( method = value.then ) ) ) {
|
| 3734 | method.call( value, resolve, reject );
|
| 3735 |
|
| 3736 |
|
| 3737 | } else {
|
| 3738 |
|
| 3739 |
|
| 3740 |
|
| 3741 |
|
| 3742 | resolve.apply( undefined, [ value ].slice( noValue ) );
|
| 3743 | }
|
| 3744 |
|
| 3745 |
|
| 3746 |
|
| 3747 |
|
| 3748 | } catch ( value ) {
|
| 3749 |
|
| 3750 |
|
| 3751 |
|
| 3752 | reject.apply( undefined, [ value ] );
|
| 3753 | }
|
| 3754 | }
|
| 3755 |
|
| 3756 | jQuery.extend( {
|
| 3757 |
|
| 3758 | Deferred: function( func ) {
|
| 3759 | var tuples = [
|
| 3760 |
|
| 3761 |
|
| 3762 |
|
| 3763 | [ "notify", "progress", jQuery.Callbacks( "memory" ),
|
| 3764 | jQuery.Callbacks( "memory" ), 2 ],
|
| 3765 | [ "resolve", "done", jQuery.Callbacks( "once memory" ),
|
| 3766 | jQuery.Callbacks( "once memory" ), 0, "resolved" ],
|
| 3767 | [ "reject", "fail", jQuery.Callbacks( "once memory" ),
|
| 3768 | jQuery.Callbacks( "once memory" ), 1, "rejected" ]
|
| 3769 | ],
|
| 3770 | state = "pending",
|
| 3771 | promise = {
|
| 3772 | state: function() {
|
| 3773 | return state;
|
| 3774 | },
|
| 3775 | always: function() {
|
| 3776 | deferred.done( arguments ).fail( arguments );
|
| 3777 | return this;
|
| 3778 | },
|
| 3779 | "catch": function( fn ) {
|
| 3780 | return promise.then( null, fn );
|
| 3781 | },
|
| 3782 |
|
| 3783 |
|
| 3784 | pipe: function( /* fnDone, fnFail, fnProgress */ ) {
|
| 3785 | var fns = arguments;
|
| 3786 |
|
| 3787 | return jQuery.Deferred( function( newDefer ) {
|
| 3788 | jQuery.each( tuples, function( _i, tuple ) {
|
| 3789 |
|
| 3790 |
|
| 3791 | var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];
|
| 3792 |
|
| 3793 |
|
| 3794 |
|
| 3795 |
|
| 3796 | deferred[ tuple[ 1 ] ]( function() {
|
| 3797 | var returned = fn && fn.apply( this, arguments );
|
| 3798 | if ( returned && isFunction( returned.promise ) ) {
|
| 3799 | returned.promise()
|
| 3800 | .progress( newDefer.notify )
|
| 3801 | .done( newDefer.resolve )
|
| 3802 | .fail( newDefer.reject );
|
| 3803 | } else {
|
| 3804 | newDefer[ tuple[ 0 ] + "With" ](
|
| 3805 | this,
|
| 3806 | fn ? [ returned ] : arguments
|
| 3807 | );
|
| 3808 | }
|
| 3809 | } );
|
| 3810 | } );
|
| 3811 | fns = null;
|
| 3812 | } ).promise();
|
| 3813 | },
|
| 3814 | then: function( onFulfilled, onRejected, onProgress ) {
|
| 3815 | var maxDepth = 0;
|
| 3816 | function resolve( depth, deferred, handler, special ) {
|
| 3817 | return function() {
|
| 3818 | var that = this,
|
| 3819 | args = arguments,
|
| 3820 | mightThrow = function() {
|
| 3821 | var returned, then;
|
| 3822 |
|
| 3823 |
|
| 3824 |
|
| 3825 |
|
| 3826 | if ( depth < maxDepth ) {
|
| 3827 | return;
|
| 3828 | }
|
| 3829 |
|
| 3830 | returned = handler.apply( that, args );
|
| 3831 |
|
| 3832 |
|
| 3833 |
|
| 3834 | if ( returned === deferred.promise() ) {
|
| 3835 | throw new TypeError( "Thenable self-resolution" );
|
| 3836 | }
|
| 3837 |
|
| 3838 |
|
| 3839 |
|
| 3840 |
|
| 3841 |
|
| 3842 | then = returned &&
|
| 3843 |
|
| 3844 |
|
| 3845 |
|
| 3846 |
|
| 3847 | ( typeof returned === "object" ||
|
| 3848 | typeof returned === "function" ) &&
|
| 3849 | returned.then;
|
| 3850 |
|
| 3851 |
|
| 3852 | if ( isFunction( then ) ) {
|
| 3853 |
|
| 3854 |
|
| 3855 | if ( special ) {
|
| 3856 | then.call(
|
| 3857 | returned,
|
| 3858 | resolve( maxDepth, deferred, Identity, special ),
|
| 3859 | resolve( maxDepth, deferred, Thrower, special )
|
| 3860 | );
|
| 3861 |
|
| 3862 |
|
| 3863 | } else {
|
| 3864 |
|
| 3865 |
|
| 3866 | maxDepth++;
|
| 3867 |
|
| 3868 | then.call(
|
| 3869 | returned,
|
| 3870 | resolve( maxDepth, deferred, Identity, special ),
|
| 3871 | resolve( maxDepth, deferred, Thrower, special ),
|
| 3872 | resolve( maxDepth, deferred, Identity,
|
| 3873 | deferred.notifyWith )
|
| 3874 | );
|
| 3875 | }
|
| 3876 |
|
| 3877 |
|
| 3878 | } else {
|
| 3879 |
|
| 3880 |
|
| 3881 |
|
| 3882 | if ( handler !== Identity ) {
|
| 3883 | that = undefined;
|
| 3884 | args = [ returned ];
|
| 3885 | }
|
| 3886 |
|
| 3887 |
|
| 3888 |
|
| 3889 | ( special || deferred.resolveWith )( that, args );
|
| 3890 | }
|
| 3891 | },
|
| 3892 |
|
| 3893 |
|
| 3894 | process = special ?
|
| 3895 | mightThrow :
|
| 3896 | function() {
|
| 3897 | try {
|
| 3898 | mightThrow();
|
| 3899 | } catch ( e ) {
|
| 3900 |
|
| 3901 | if ( jQuery.Deferred.exceptionHook ) {
|
| 3902 | jQuery.Deferred.exceptionHook( e,
|
| 3903 | process.stackTrace );
|
| 3904 | }
|
| 3905 |
|
| 3906 |
|
| 3907 |
|
| 3908 |
|
| 3909 | if ( depth + 1 >= maxDepth ) {
|
| 3910 |
|
| 3911 |
|
| 3912 |
|
| 3913 | if ( handler !== Thrower ) {
|
| 3914 | that = undefined;
|
| 3915 | args = [ e ];
|
| 3916 | }
|
| 3917 |
|
| 3918 | deferred.rejectWith( that, args );
|
| 3919 | }
|
| 3920 | }
|
| 3921 | };
|
| 3922 |
|
| 3923 |
|
| 3924 |
|
| 3925 |
|
| 3926 |
|
| 3927 | if ( depth ) {
|
| 3928 | process();
|
| 3929 | } else {
|
| 3930 |
|
| 3931 |
|
| 3932 |
|
| 3933 | if ( jQuery.Deferred.getStackHook ) {
|
| 3934 | process.stackTrace = jQuery.Deferred.getStackHook();
|
| 3935 | }
|
| 3936 | window.setTimeout( process );
|
| 3937 | }
|
| 3938 | };
|
| 3939 | }
|
| 3940 |
|
| 3941 | return jQuery.Deferred( function( newDefer ) {
|
| 3942 |
|
| 3943 |
|
| 3944 | tuples[ 0 ][ 3 ].add(
|
| 3945 | resolve(
|
| 3946 | 0,
|
| 3947 | newDefer,
|
| 3948 | isFunction( onProgress ) ?
|
| 3949 | onProgress :
|
| 3950 | Identity,
|
| 3951 | newDefer.notifyWith
|
| 3952 | )
|
| 3953 | );
|
| 3954 |
|
| 3955 |
|
| 3956 | tuples[ 1 ][ 3 ].add(
|
| 3957 | resolve(
|
| 3958 | 0,
|
| 3959 | newDefer,
|
| 3960 | isFunction( onFulfilled ) ?
|
| 3961 | onFulfilled :
|
| 3962 | Identity
|
| 3963 | )
|
| 3964 | );
|
| 3965 |
|
| 3966 |
|
| 3967 | tuples[ 2 ][ 3 ].add(
|
| 3968 | resolve(
|
| 3969 | 0,
|
| 3970 | newDefer,
|
| 3971 | isFunction( onRejected ) ?
|
| 3972 | onRejected :
|
| 3973 | Thrower
|
| 3974 | )
|
| 3975 | );
|
| 3976 | } ).promise();
|
| 3977 | },
|
| 3978 |
|
| 3979 |
|
| 3980 |
|
| 3981 | promise: function( obj ) {
|
| 3982 | return obj != null ? jQuery.extend( obj, promise ) : promise;
|
| 3983 | }
|
| 3984 | },
|
| 3985 | deferred = {};
|
| 3986 |
|
| 3987 |
|
| 3988 | jQuery.each( tuples, function( i, tuple ) {
|
| 3989 | var list = tuple[ 2 ],
|
| 3990 | stateString = tuple[ 5 ];
|
| 3991 |
|
| 3992 |
|
| 3993 |
|
| 3994 |
|
| 3995 | promise[ tuple[ 1 ] ] = list.add;
|
| 3996 |
|
| 3997 |
|
| 3998 | if ( stateString ) {
|
| 3999 | list.add(
|
| 4000 | function() {
|
| 4001 |
|
| 4002 |
|
| 4003 |
|
| 4004 | state = stateString;
|
| 4005 | },
|
| 4006 |
|
| 4007 |
|
| 4008 |
|
| 4009 | tuples[ 3 - i ][ 2 ].disable,
|
| 4010 |
|
| 4011 |
|
| 4012 |
|
| 4013 | tuples[ 3 - i ][ 3 ].disable,
|
| 4014 |
|
| 4015 |
|
| 4016 | tuples[ 0 ][ 2 ].lock,
|
| 4017 |
|
| 4018 |
|
| 4019 | tuples[ 0 ][ 3 ].lock
|
| 4020 | );
|
| 4021 | }
|
| 4022 |
|
| 4023 |
|
| 4024 |
|
| 4025 |
|
| 4026 | list.add( tuple[ 3 ].fire );
|
| 4027 |
|
| 4028 |
|
| 4029 |
|
| 4030 |
|
| 4031 | deferred[ tuple[ 0 ] ] = function() {
|
| 4032 | deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments );
|
| 4033 | return this;
|
| 4034 | };
|
| 4035 |
|
| 4036 |
|
| 4037 |
|
| 4038 |
|
| 4039 | deferred[ tuple[ 0 ] + "With" ] = list.fireWith;
|
| 4040 | } );
|
| 4041 |
|
| 4042 |
|
| 4043 | promise.promise( deferred );
|
| 4044 |
|
| 4045 |
|
| 4046 | if ( func ) {
|
| 4047 | func.call( deferred, deferred );
|
| 4048 | }
|
| 4049 |
|
| 4050 |
|
| 4051 | return deferred;
|
| 4052 | },
|
| 4053 |
|
| 4054 |
|
| 4055 | when: function( singleValue ) {
|
| 4056 | var
|
| 4057 |
|
| 4058 |
|
| 4059 | remaining = arguments.length,
|
| 4060 |
|
| 4061 |
|
| 4062 | i = remaining,
|
| 4063 |
|
| 4064 |
|
| 4065 | resolveContexts = Array( i ),
|
| 4066 | resolveValues = slice.call( arguments ),
|
| 4067 |
|
| 4068 |
|
| 4069 | primary = jQuery.Deferred(),
|
| 4070 |
|
| 4071 |
|
| 4072 | updateFunc = function( i ) {
|
| 4073 | return function( value ) {
|
| 4074 | resolveContexts[ i ] = this;
|
| 4075 | resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
|
| 4076 | if ( !( --remaining ) ) {
|
| 4077 | primary.resolveWith( resolveContexts, resolveValues );
|
| 4078 | }
|
| 4079 | };
|
| 4080 | };
|
| 4081 |
|
| 4082 |
|
| 4083 | if ( remaining <= 1 ) {
|
| 4084 | adoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject,
|
| 4085 | !remaining );
|
| 4086 |
|
| 4087 |
|
| 4088 | if ( primary.state() === "pending" ||
|
| 4089 | isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {
|
| 4090 |
|
| 4091 | return primary.then();
|
| 4092 | }
|
| 4093 | }
|
| 4094 |
|
| 4095 |
|
| 4096 | while ( i-- ) {
|
| 4097 | adoptValue( resolveValues[ i ], updateFunc( i ), primary.reject );
|
| 4098 | }
|
| 4099 |
|
| 4100 | return primary.promise();
|
| 4101 | }
|
| 4102 | } );
|
| 4103 |
|
| 4104 |
|
| 4105 |
|
| 4106 |
|
| 4107 | var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
|
| 4108 |
|
| 4109 | jQuery.Deferred.exceptionHook = function( error, stack ) {
|
| 4110 |
|
| 4111 |
|
| 4112 |
|
| 4113 | if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {
|
| 4114 | window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack );
|
| 4115 | }
|
| 4116 | };
|
| 4117 |
|
| 4118 |
|
| 4119 |
|
| 4120 |
|
| 4121 | jQuery.readyException = function( error ) {
|
| 4122 | window.setTimeout( function() {
|
| 4123 | throw error;
|
| 4124 | } );
|
| 4125 | };
|
| 4126 |
|
| 4127 |
|
| 4128 |
|
| 4129 |
|
| 4130 |
|
| 4131 | var readyList = jQuery.Deferred();
|
| 4132 |
|
| 4133 | jQuery.fn.ready = function( fn ) {
|
| 4134 |
|
| 4135 | readyList
|
| 4136 | .then( fn )
|
| 4137 |
|
| 4138 |
|
| 4139 |
|
| 4140 |
|
| 4141 | .catch( function( error ) {
|
| 4142 | jQuery.readyException( error );
|
| 4143 | } );
|
| 4144 |
|
| 4145 | return this;
|
| 4146 | };
|
| 4147 |
|
| 4148 | jQuery.extend( {
|
| 4149 |
|
| 4150 |
|
| 4151 | isReady: false,
|
| 4152 |
|
| 4153 |
|
| 4154 |
|
| 4155 | readyWait: 1,
|
| 4156 |
|
| 4157 |
|
| 4158 | ready: function( wait ) {
|
| 4159 |
|
| 4160 |
|
| 4161 | if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
|
| 4162 | return;
|
| 4163 | }
|
| 4164 |
|
| 4165 |
|
| 4166 | jQuery.isReady = true;
|
| 4167 |
|
| 4168 |
|
| 4169 | if ( wait !== true && --jQuery.readyWait > 0 ) {
|
| 4170 | return;
|
| 4171 | }
|
| 4172 |
|
| 4173 |
|
| 4174 | readyList.resolveWith( document, [ jQuery ] );
|
| 4175 | }
|
| 4176 | } );
|
| 4177 |
|
| 4178 | jQuery.ready.then = readyList.then;
|
| 4179 |
|
| 4180 |
|
| 4181 | function completed() {
|
| 4182 | document.removeEventListener( "DOMContentLoaded", completed );
|
| 4183 | window.removeEventListener( "load", completed );
|
| 4184 | jQuery.ready();
|
| 4185 | }
|
| 4186 |
|
| 4187 |
|
| 4188 |
|
| 4189 |
|
| 4190 |
|
| 4191 | if ( document.readyState === "complete" ||
|
| 4192 | ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
|
| 4193 |
|
| 4194 |
|
| 4195 | window.setTimeout( jQuery.ready );
|
| 4196 |
|
| 4197 | } else {
|
| 4198 |
|
| 4199 |
|
| 4200 | document.addEventListener( "DOMContentLoaded", completed );
|
| 4201 |
|
| 4202 |
|
| 4203 | window.addEventListener( "load", completed );
|
| 4204 | }
|
| 4205 |
|
| 4206 |
|
| 4207 |
|
| 4208 |
|
| 4209 |
|
| 4210 |
|
| 4211 | var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
|
| 4212 | var i = 0,
|
| 4213 | len = elems.length,
|
| 4214 | bulk = key == null;
|
| 4215 |
|
| 4216 |
|
| 4217 | if ( toType( key ) === "object" ) {
|
| 4218 | chainable = true;
|
| 4219 | for ( i in key ) {
|
| 4220 | access( elems, fn, i, key[ i ], true, emptyGet, raw );
|
| 4221 | }
|
| 4222 |
|
| 4223 |
|
| 4224 | } else if ( value !== undefined ) {
|
| 4225 | chainable = true;
|
| 4226 |
|
| 4227 | if ( !isFunction( value ) ) {
|
| 4228 | raw = true;
|
| 4229 | }
|
| 4230 |
|
| 4231 | if ( bulk ) {
|
| 4232 |
|
| 4233 |
|
| 4234 | if ( raw ) {
|
| 4235 | fn.call( elems, value );
|
| 4236 | fn = null;
|
| 4237 |
|
| 4238 |
|
| 4239 | } else {
|
| 4240 | bulk = fn;
|
| 4241 | fn = function( elem, _key, value ) {
|
| 4242 | return bulk.call( jQuery( elem ), value );
|
| 4243 | };
|
| 4244 | }
|
| 4245 | }
|
| 4246 |
|
| 4247 | if ( fn ) {
|
| 4248 | for ( ; i < len; i++ ) {
|
| 4249 | fn(
|
| 4250 | elems[ i ], key, raw ?
|
| 4251 | value :
|
| 4252 | value.call( elems[ i ], i, fn( elems[ i ], key ) )
|
| 4253 | );
|
| 4254 | }
|
| 4255 | }
|
| 4256 | }
|
| 4257 |
|
| 4258 | if ( chainable ) {
|
| 4259 | return elems;
|
| 4260 | }
|
| 4261 |
|
| 4262 |
|
| 4263 | if ( bulk ) {
|
| 4264 | return fn.call( elems );
|
| 4265 | }
|
| 4266 |
|
| 4267 | return len ? fn( elems[ 0 ], key ) : emptyGet;
|
| 4268 | };
|
| 4269 |
|
| 4270 |
|
| 4271 |
|
| 4272 | var rmsPrefix = /^-ms-/,
|
| 4273 | rdashAlpha = /-([a-z])/g;
|
| 4274 |
|
| 4275 |
|
| 4276 | function fcamelCase( _all, letter ) {
|
| 4277 | return letter.toUpperCase();
|
| 4278 | }
|
| 4279 |
|
| 4280 |
|
| 4281 |
|
| 4282 |
|
| 4283 | function camelCase( string ) {
|
| 4284 | return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
|
| 4285 | }
|
| 4286 | var acceptData = function( owner ) {
|
| 4287 |
|
| 4288 |
|
| 4289 |
|
| 4290 |
|
| 4291 |
|
| 4292 |
|
| 4293 |
|
| 4294 | return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
|
| 4295 | };
|
| 4296 |
|
| 4297 |
|
| 4298 |
|
| 4299 |
|
| 4300 | function Data() {
|
| 4301 | this.expando = jQuery.expando + Data.uid++;
|
| 4302 | }
|
| 4303 |
|
| 4304 | Data.uid = 1;
|
| 4305 |
|
| 4306 | Data.prototype = {
|
| 4307 |
|
| 4308 | cache: function( owner ) {
|
| 4309 |
|
| 4310 |
|
| 4311 | var value = owner[ this.expando ];
|
| 4312 |
|
| 4313 |
|
| 4314 | if ( !value ) {
|
| 4315 | value = {};
|
| 4316 |
|
| 4317 |
|
| 4318 |
|
| 4319 |
|
| 4320 | if ( acceptData( owner ) ) {
|
| 4321 |
|
| 4322 |
|
| 4323 |
|
| 4324 | if ( owner.nodeType ) {
|
| 4325 | owner[ this.expando ] = value;
|
| 4326 |
|
| 4327 |
|
| 4328 |
|
| 4329 |
|
| 4330 | } else {
|
| 4331 | Object.defineProperty( owner, this.expando, {
|
| 4332 | value: value,
|
| 4333 | configurable: true
|
| 4334 | } );
|
| 4335 | }
|
| 4336 | }
|
| 4337 | }
|
| 4338 |
|
| 4339 | return value;
|
| 4340 | },
|
| 4341 | set: function( owner, data, value ) {
|
| 4342 | var prop,
|
| 4343 | cache = this.cache( owner );
|
| 4344 |
|
| 4345 |
|
| 4346 |
|
| 4347 | if ( typeof data === "string" ) {
|
| 4348 | cache[ camelCase( data ) ] = value;
|
| 4349 |
|
| 4350 |
|
| 4351 | } else {
|
| 4352 |
|
| 4353 |
|
| 4354 | for ( prop in data ) {
|
| 4355 | cache[ camelCase( prop ) ] = data[ prop ];
|
| 4356 | }
|
| 4357 | }
|
| 4358 | return cache;
|
| 4359 | },
|
| 4360 | get: function( owner, key ) {
|
| 4361 | return key === undefined ?
|
| 4362 | this.cache( owner ) :
|
| 4363 |
|
| 4364 |
|
| 4365 | owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];
|
| 4366 | },
|
| 4367 | access: function( owner, key, value ) {
|
| 4368 |
|
| 4369 |
|
| 4370 |
|
| 4371 |
|
| 4372 |
|
| 4373 |
|
| 4374 |
|
| 4375 |
|
| 4376 |
|
| 4377 |
|
| 4378 |
|
| 4379 |
|
| 4380 | if ( key === undefined ||
|
| 4381 | ( ( key && typeof key === "string" ) && value === undefined ) ) {
|
| 4382 |
|
| 4383 | return this.get( owner, key );
|
| 4384 | }
|
| 4385 |
|
| 4386 |
|
| 4387 |
|
| 4388 |
|
| 4389 |
|
| 4390 |
|
| 4391 |
|
| 4392 | this.set( owner, key, value );
|
| 4393 |
|
| 4394 |
|
| 4395 |
|
| 4396 | return value !== undefined ? value : key;
|
| 4397 | },
|
| 4398 | remove: function( owner, key ) {
|
| 4399 | var i,
|
| 4400 | cache = owner[ this.expando ];
|
| 4401 |
|
| 4402 | if ( cache === undefined ) {
|
| 4403 | return;
|
| 4404 | }
|
| 4405 |
|
| 4406 | if ( key !== undefined ) {
|
| 4407 |
|
| 4408 |
|
| 4409 | if ( Array.isArray( key ) ) {
|
| 4410 |
|
| 4411 |
|
| 4412 |
|
| 4413 | key = key.map( camelCase );
|
| 4414 | } else {
|
| 4415 | key = camelCase( key );
|
| 4416 |
|
| 4417 |
|
| 4418 |
|
| 4419 | key = key in cache ?
|
| 4420 | [ key ] :
|
| 4421 | ( key.match( rnothtmlwhite ) || [] );
|
| 4422 | }
|
| 4423 |
|
| 4424 | i = key.length;
|
| 4425 |
|
| 4426 | while ( i-- ) {
|
| 4427 | delete cache[ key[ i ] ];
|
| 4428 | }
|
| 4429 | }
|
| 4430 |
|
| 4431 |
|
| 4432 | if ( key === undefined || jQuery.isEmptyObject( cache ) ) {
|
| 4433 |
|
| 4434 |
|
| 4435 |
|
| 4436 |
|
| 4437 |
|
| 4438 | if ( owner.nodeType ) {
|
| 4439 | owner[ this.expando ] = undefined;
|
| 4440 | } else {
|
| 4441 | delete owner[ this.expando ];
|
| 4442 | }
|
| 4443 | }
|
| 4444 | },
|
| 4445 | hasData: function( owner ) {
|
| 4446 | var cache = owner[ this.expando ];
|
| 4447 | return cache !== undefined && !jQuery.isEmptyObject( cache );
|
| 4448 | }
|
| 4449 | };
|
| 4450 | var dataPriv = new Data();
|
| 4451 |
|
| 4452 | var dataUser = new Data();
|
| 4453 |
|
| 4454 |
|
| 4455 |
|
| 4456 |
|
| 4457 |
|
| 4458 |
|
| 4459 |
|
| 4460 |
|
| 4461 |
|
| 4462 |
|
| 4463 |
|
| 4464 |
|
| 4465 |
|
| 4466 | var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
|
| 4467 | rmultiDash = /[A-Z]/g;
|
| 4468 |
|
| 4469 | function getData( data ) {
|
| 4470 | if ( data === "true" ) {
|
| 4471 | return true;
|
| 4472 | }
|
| 4473 |
|
| 4474 | if ( data === "false" ) {
|
| 4475 | return false;
|
| 4476 | }
|
| 4477 |
|
| 4478 | if ( data === "null" ) {
|
| 4479 | return null;
|
| 4480 | }
|
| 4481 |
|
| 4482 |
|
| 4483 | if ( data === +data + "" ) {
|
| 4484 | return +data;
|
| 4485 | }
|
| 4486 |
|
| 4487 | if ( rbrace.test( data ) ) {
|
| 4488 | return JSON.parse( data );
|
| 4489 | }
|
| 4490 |
|
| 4491 | return data;
|
| 4492 | }
|
| 4493 |
|
| 4494 | function dataAttr( elem, key, data ) {
|
| 4495 | var name;
|
| 4496 |
|
| 4497 |
|
| 4498 |
|
| 4499 | if ( data === undefined && elem.nodeType === 1 ) {
|
| 4500 | name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();
|
| 4501 | data = elem.getAttribute( name );
|
| 4502 |
|
| 4503 | if ( typeof data === "string" ) {
|
| 4504 | try {
|
| 4505 | data = getData( data );
|
| 4506 | } catch ( e ) {}
|
| 4507 |
|
| 4508 |
|
| 4509 | dataUser.set( elem, key, data );
|
| 4510 | } else {
|
| 4511 | data = undefined;
|
| 4512 | }
|
| 4513 | }
|
| 4514 | return data;
|
| 4515 | }
|
| 4516 |
|
| 4517 | jQuery.extend( {
|
| 4518 | hasData: function( elem ) {
|
| 4519 | return dataUser.hasData( elem ) || dataPriv.hasData( elem );
|
| 4520 | },
|
| 4521 |
|
| 4522 | data: function( elem, name, data ) {
|
| 4523 | return dataUser.access( elem, name, data );
|
| 4524 | },
|
| 4525 |
|
| 4526 | removeData: function( elem, name ) {
|
| 4527 | dataUser.remove( elem, name );
|
| 4528 | },
|
| 4529 |
|
| 4530 |
|
| 4531 |
|
| 4532 | _data: function( elem, name, data ) {
|
| 4533 | return dataPriv.access( elem, name, data );
|
| 4534 | },
|
| 4535 |
|
| 4536 | _removeData: function( elem, name ) {
|
| 4537 | dataPriv.remove( elem, name );
|
| 4538 | }
|
| 4539 | } );
|
| 4540 |
|
| 4541 | jQuery.fn.extend( {
|
| 4542 | data: function( key, value ) {
|
| 4543 | var i, name, data,
|
| 4544 | elem = this[ 0 ],
|
| 4545 | attrs = elem && elem.attributes;
|
| 4546 |
|
| 4547 |
|
| 4548 | if ( key === undefined ) {
|
| 4549 | if ( this.length ) {
|
| 4550 | data = dataUser.get( elem );
|
| 4551 |
|
| 4552 | if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {
|
| 4553 | i = attrs.length;
|
| 4554 | while ( i-- ) {
|
| 4555 |
|
| 4556 |
|
| 4557 |
|
| 4558 | if ( attrs[ i ] ) {
|
| 4559 | name = attrs[ i ].name;
|
| 4560 | if ( name.indexOf( "data-" ) === 0 ) {
|
| 4561 | name = camelCase( name.slice( 5 ) );
|
| 4562 | dataAttr( elem, name, data[ name ] );
|
| 4563 | }
|
| 4564 | }
|
| 4565 | }
|
| 4566 | dataPriv.set( elem, "hasDataAttrs", true );
|
| 4567 | }
|
| 4568 | }
|
| 4569 |
|
| 4570 | return data;
|
| 4571 | }
|
| 4572 |
|
| 4573 |
|
| 4574 | if ( typeof key === "object" ) {
|
| 4575 | return this.each( function() {
|
| 4576 | dataUser.set( this, key );
|
| 4577 | } );
|
| 4578 | }
|
| 4579 |
|
| 4580 | return access( this, function( value ) {
|
| 4581 | var data;
|
| 4582 |
|
| 4583 |
|
| 4584 |
|
| 4585 |
|
| 4586 |
|
| 4587 |
|
| 4588 | if ( elem && value === undefined ) {
|
| 4589 |
|
| 4590 |
|
| 4591 |
|
| 4592 | data = dataUser.get( elem, key );
|
| 4593 | if ( data !== undefined ) {
|
| 4594 | return data;
|
| 4595 | }
|
| 4596 |
|
| 4597 |
|
| 4598 |
|
| 4599 | data = dataAttr( elem, key );
|
| 4600 | if ( data !== undefined ) {
|
| 4601 | return data;
|
| 4602 | }
|
| 4603 |
|
| 4604 |
|
| 4605 | return;
|
| 4606 | }
|
| 4607 |
|
| 4608 |
|
| 4609 | this.each( function() {
|
| 4610 |
|
| 4611 |
|
| 4612 | dataUser.set( this, key, value );
|
| 4613 | } );
|
| 4614 | }, null, value, arguments.length > 1, null, true );
|
| 4615 | },
|
| 4616 |
|
| 4617 | removeData: function( key ) {
|
| 4618 | return this.each( function() {
|
| 4619 | dataUser.remove( this, key );
|
| 4620 | } );
|
| 4621 | }
|
| 4622 | } );
|
| 4623 |
|
| 4624 |
|
| 4625 | jQuery.extend( {
|
| 4626 | queue: function( elem, type, data ) {
|
| 4627 | var queue;
|
| 4628 |
|
| 4629 | if ( elem ) {
|
| 4630 | type = ( type || "fx" ) + "queue";
|
| 4631 | queue = dataPriv.get( elem, type );
|
| 4632 |
|
| 4633 |
|
| 4634 | if ( data ) {
|
| 4635 | if ( !queue || Array.isArray( data ) ) {
|
| 4636 | queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
|
| 4637 | } else {
|
| 4638 | queue.push( data );
|
| 4639 | }
|
| 4640 | }
|
| 4641 | return queue || [];
|
| 4642 | }
|
| 4643 | },
|
| 4644 |
|
| 4645 | dequeue: function( elem, type ) {
|
| 4646 | type = type || "fx";
|
| 4647 |
|
| 4648 | var queue = jQuery.queue( elem, type ),
|
| 4649 | startLength = queue.length,
|
| 4650 | fn = queue.shift(),
|
| 4651 | hooks = jQuery._queueHooks( elem, type ),
|
| 4652 | next = function() {
|
| 4653 | jQuery.dequeue( elem, type );
|
| 4654 | };
|
| 4655 |
|
| 4656 |
|
| 4657 | if ( fn === "inprogress" ) {
|
| 4658 | fn = queue.shift();
|
| 4659 | startLength--;
|
| 4660 | }
|
| 4661 |
|
| 4662 | if ( fn ) {
|
| 4663 |
|
| 4664 |
|
| 4665 |
|
| 4666 | if ( type === "fx" ) {
|
| 4667 | queue.unshift( "inprogress" );
|
| 4668 | }
|
| 4669 |
|
| 4670 |
|
| 4671 | delete hooks.stop;
|
| 4672 | fn.call( elem, next, hooks );
|
| 4673 | }
|
| 4674 |
|
| 4675 | if ( !startLength && hooks ) {
|
| 4676 | hooks.empty.fire();
|
| 4677 | }
|
| 4678 | },
|
| 4679 |
|
| 4680 |
|
| 4681 | _queueHooks: function( elem, type ) {
|
| 4682 | var key = type + "queueHooks";
|
| 4683 | return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
|
| 4684 | empty: jQuery.Callbacks( "once memory" ).add( function() {
|
| 4685 | dataPriv.remove( elem, [ type + "queue", key ] );
|
| 4686 | } )
|
| 4687 | } );
|
| 4688 | }
|
| 4689 | } );
|
| 4690 |
|
| 4691 | jQuery.fn.extend( {
|
| 4692 | queue: function( type, data ) {
|
| 4693 | var setter = 2;
|
| 4694 |
|
| 4695 | if ( typeof type !== "string" ) {
|
| 4696 | data = type;
|
| 4697 | type = "fx";
|
| 4698 | setter--;
|
| 4699 | }
|
| 4700 |
|
| 4701 | if ( arguments.length < setter ) {
|
| 4702 | return jQuery.queue( this[ 0 ], type );
|
| 4703 | }
|
| 4704 |
|
| 4705 | return data === undefined ?
|
| 4706 | this :
|
| 4707 | this.each( function() {
|
| 4708 | var queue = jQuery.queue( this, type, data );
|
| 4709 |
|
| 4710 |
|
| 4711 | jQuery._queueHooks( this, type );
|
| 4712 |
|
| 4713 | if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {
|
| 4714 | jQuery.dequeue( this, type );
|
| 4715 | }
|
| 4716 | } );
|
| 4717 | },
|
| 4718 | dequeue: function( type ) {
|
| 4719 | return this.each( function() {
|
| 4720 | jQuery.dequeue( this, type );
|
| 4721 | } );
|
| 4722 | },
|
| 4723 | clearQueue: function( type ) {
|
| 4724 | return this.queue( type || "fx", [] );
|
| 4725 | },
|
| 4726 |
|
| 4727 |
|
| 4728 |
|
| 4729 | promise: function( type, obj ) {
|
| 4730 | var tmp,
|
| 4731 | count = 1,
|
| 4732 | defer = jQuery.Deferred(),
|
| 4733 | elements = this,
|
| 4734 | i = this.length,
|
| 4735 | resolve = function() {
|
| 4736 | if ( !( --count ) ) {
|
| 4737 | defer.resolveWith( elements, [ elements ] );
|
| 4738 | }
|
| 4739 | };
|
| 4740 |
|
| 4741 | if ( typeof type !== "string" ) {
|
| 4742 | obj = type;
|
| 4743 | type = undefined;
|
| 4744 | }
|
| 4745 | type = type || "fx";
|
| 4746 |
|
| 4747 | while ( i-- ) {
|
| 4748 | tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
|
| 4749 | if ( tmp && tmp.empty ) {
|
| 4750 | count++;
|
| 4751 | tmp.empty.add( resolve );
|
| 4752 | }
|
| 4753 | }
|
| 4754 | resolve();
|
| 4755 | return defer.promise( obj );
|
| 4756 | }
|
| 4757 | } );
|
| 4758 | var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source;
|
| 4759 |
|
| 4760 | var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );
|
| 4761 |
|
| 4762 |
|
| 4763 | var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
|
| 4764 |
|
| 4765 | var documentElement = document.documentElement;
|
| 4766 |
|
| 4767 |
|
| 4768 |
|
| 4769 | var isAttached = function( elem ) {
|
| 4770 | return jQuery.contains( elem.ownerDocument, elem );
|
| 4771 | },
|
| 4772 | composed = { composed: true };
|
| 4773 |
|
| 4774 |
|
| 4775 |
|
| 4776 |
|
| 4777 |
|
| 4778 |
|
| 4779 | if ( documentElement.getRootNode ) {
|
| 4780 | isAttached = function( elem ) {
|
| 4781 | return jQuery.contains( elem.ownerDocument, elem ) ||
|
| 4782 | elem.getRootNode( composed ) === elem.ownerDocument;
|
| 4783 | };
|
| 4784 | }
|
| 4785 | var isHiddenWithinTree = function( elem, el ) {
|
| 4786 |
|
| 4787 |
|
| 4788 |
|
| 4789 | elem = el || elem;
|
| 4790 |
|
| 4791 |
|
| 4792 | return elem.style.display === "none" ||
|
| 4793 | elem.style.display === "" &&
|
| 4794 |
|
| 4795 |
|
| 4796 |
|
| 4797 |
|
| 4798 |
|
| 4799 | isAttached( elem ) &&
|
| 4800 |
|
| 4801 | jQuery.css( elem, "display" ) === "none";
|
| 4802 | };
|
| 4803 |
|
| 4804 |
|
| 4805 |
|
| 4806 | function adjustCSS( elem, prop, valueParts, tween ) {
|
| 4807 | var adjusted, scale,
|
| 4808 | maxIterations = 20,
|
| 4809 | currentValue = tween ?
|
| 4810 | function() {
|
| 4811 | return tween.cur();
|
| 4812 | } :
|
| 4813 | function() {
|
| 4814 | return jQuery.css( elem, prop, "" );
|
| 4815 | },
|
| 4816 | initial = currentValue(),
|
| 4817 | unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
|
| 4818 |
|
| 4819 |
|
| 4820 | initialInUnit = elem.nodeType &&
|
| 4821 | ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
|
| 4822 | rcssNum.exec( jQuery.css( elem, prop ) );
|
| 4823 |
|
| 4824 | if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
|
| 4825 |
|
| 4826 |
|
| 4827 |
|
| 4828 | initial = initial / 2;
|
| 4829 |
|
| 4830 |
|
| 4831 | unit = unit || initialInUnit[ 3 ];
|
| 4832 |
|
| 4833 |
|
| 4834 | initialInUnit = +initial || 1;
|
| 4835 |
|
| 4836 | while ( maxIterations-- ) {
|
| 4837 |
|
| 4838 |
|
| 4839 |
|
| 4840 | jQuery.style( elem, prop, initialInUnit + unit );
|
| 4841 | if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {
|
| 4842 | maxIterations = 0;
|
| 4843 | }
|
| 4844 | initialInUnit = initialInUnit / scale;
|
| 4845 |
|
| 4846 | }
|
| 4847 |
|
| 4848 | initialInUnit = initialInUnit * 2;
|
| 4849 | jQuery.style( elem, prop, initialInUnit + unit );
|
| 4850 |
|
| 4851 |
|
| 4852 | valueParts = valueParts || [];
|
| 4853 | }
|
| 4854 |
|
| 4855 | if ( valueParts ) {
|
| 4856 | initialInUnit = +initialInUnit || +initial || 0;
|
| 4857 |
|
| 4858 |
|
| 4859 | adjusted = valueParts[ 1 ] ?
|
| 4860 | initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
|
| 4861 | +valueParts[ 2 ];
|
| 4862 | if ( tween ) {
|
| 4863 | tween.unit = unit;
|
| 4864 | tween.start = initialInUnit;
|
| 4865 | tween.end = adjusted;
|
| 4866 | }
|
| 4867 | }
|
| 4868 | return adjusted;
|
| 4869 | }
|
| 4870 |
|
| 4871 |
|
| 4872 | var defaultDisplayMap = {};
|
| 4873 |
|
| 4874 | function getDefaultDisplay( elem ) {
|
| 4875 | var temp,
|
| 4876 | doc = elem.ownerDocument,
|
| 4877 | nodeName = elem.nodeName,
|
| 4878 | display = defaultDisplayMap[ nodeName ];
|
| 4879 |
|
| 4880 | if ( display ) {
|
| 4881 | return display;
|
| 4882 | }
|
| 4883 |
|
| 4884 | temp = doc.body.appendChild( doc.createElement( nodeName ) );
|
| 4885 | display = jQuery.css( temp, "display" );
|
| 4886 |
|
| 4887 | temp.parentNode.removeChild( temp );
|
| 4888 |
|
| 4889 | if ( display === "none" ) {
|
| 4890 | display = "block";
|
| 4891 | }
|
| 4892 | defaultDisplayMap[ nodeName ] = display;
|
| 4893 |
|
| 4894 | return display;
|
| 4895 | }
|
| 4896 |
|
| 4897 | function showHide( elements, show ) {
|
| 4898 | var display, elem,
|
| 4899 | values = [],
|
| 4900 | index = 0,
|
| 4901 | length = elements.length;
|
| 4902 |
|
| 4903 |
|
| 4904 | for ( ; index < length; index++ ) {
|
| 4905 | elem = elements[ index ];
|
| 4906 | if ( !elem.style ) {
|
| 4907 | continue;
|
| 4908 | }
|
| 4909 |
|
| 4910 | display = elem.style.display;
|
| 4911 | if ( show ) {
|
| 4912 |
|
| 4913 |
|
| 4914 |
|
| 4915 |
|
| 4916 | if ( display === "none" ) {
|
| 4917 | values[ index ] = dataPriv.get( elem, "display" ) || null;
|
| 4918 | if ( !values[ index ] ) {
|
| 4919 | elem.style.display = "";
|
| 4920 | }
|
| 4921 | }
|
| 4922 | if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) {
|
| 4923 | values[ index ] = getDefaultDisplay( elem );
|
| 4924 | }
|
| 4925 | } else {
|
| 4926 | if ( display !== "none" ) {
|
| 4927 | values[ index ] = "none";
|
| 4928 |
|
| 4929 |
|
| 4930 | dataPriv.set( elem, "display", display );
|
| 4931 | }
|
| 4932 | }
|
| 4933 | }
|
| 4934 |
|
| 4935 |
|
| 4936 | for ( index = 0; index < length; index++ ) {
|
| 4937 | if ( values[ index ] != null ) {
|
| 4938 | elements[ index ].style.display = values[ index ];
|
| 4939 | }
|
| 4940 | }
|
| 4941 |
|
| 4942 | return elements;
|
| 4943 | }
|
| 4944 |
|
| 4945 | jQuery.fn.extend( {
|
| 4946 | show: function() {
|
| 4947 | return showHide( this, true );
|
| 4948 | },
|
| 4949 | hide: function() {
|
| 4950 | return showHide( this );
|
| 4951 | },
|
| 4952 | toggle: function( state ) {
|
| 4953 | if ( typeof state === "boolean" ) {
|
| 4954 | return state ? this.show() : this.hide();
|
| 4955 | }
|
| 4956 |
|
| 4957 | return this.each( function() {
|
| 4958 | if ( isHiddenWithinTree( this ) ) {
|
| 4959 | jQuery( this ).show();
|
| 4960 | } else {
|
| 4961 | jQuery( this ).hide();
|
| 4962 | }
|
| 4963 | } );
|
| 4964 | }
|
| 4965 | } );
|
| 4966 | var rcheckableType = ( /^(?:checkbox|radio)$/i );
|
| 4967 |
|
| 4968 | var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i );
|
| 4969 |
|
| 4970 | var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i );
|
| 4971 |
|
| 4972 |
|
| 4973 |
|
| 4974 | ( function() {
|
| 4975 | var fragment = document.createDocumentFragment(),
|
| 4976 | div = fragment.appendChild( document.createElement( "div" ) ),
|
| 4977 | input = document.createElement( "input" );
|
| 4978 |
|
| 4979 |
|
| 4980 |
|
| 4981 |
|
| 4982 |
|
| 4983 | input.setAttribute( "type", "radio" );
|
| 4984 | input.setAttribute( "checked", "checked" );
|
| 4985 | input.setAttribute( "name", "t" );
|
| 4986 |
|
| 4987 | div.appendChild( input );
|
| 4988 |
|
| 4989 |
|
| 4990 |
|
| 4991 | support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
|
| 4992 |
|
| 4993 |
|
| 4994 |
|
| 4995 | div.innerHTML = "<textarea>x</textarea>";
|
| 4996 | support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
|
| 4997 |
|
| 4998 |
|
| 4999 |
|
| 5000 |
|
| 5001 | div.innerHTML = "<option></option>";
|
| 5002 | support.option = !!div.lastChild;
|
| 5003 | } )();
|
| 5004 |
|
| 5005 |
|
| 5006 |
|
| 5007 | var wrapMap = {
|
| 5008 |
|
| 5009 |
|
| 5010 |
|
| 5011 |
|
| 5012 | thead: [ 1, "<table>", "</table>" ],
|
| 5013 | col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
|
| 5014 | tr: [ 2, "<table><tbody>", "</tbody></table>" ],
|
| 5015 | td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
|
| 5016 |
|
| 5017 | _default: [ 0, "", "" ]
|
| 5018 | };
|
| 5019 |
|
| 5020 | wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
|
| 5021 | wrapMap.th = wrapMap.td;
|
| 5022 |
|
| 5023 |
|
| 5024 | if ( !support.option ) {
|
| 5025 | wrapMap.optgroup = wrapMap.option = [ 1, "<select multiple='multiple'>", "</select>" ];
|
| 5026 | }
|
| 5027 |
|
| 5028 |
|
| 5029 | function getAll( context, tag ) {
|
| 5030 |
|
| 5031 |
|
| 5032 |
|
| 5033 | var ret;
|
| 5034 |
|
| 5035 | if ( typeof context.getElementsByTagName !== "undefined" ) {
|
| 5036 | ret = context.getElementsByTagName( tag || "*" );
|
| 5037 |
|
| 5038 | } else if ( typeof context.querySelectorAll !== "undefined" ) {
|
| 5039 | ret = context.querySelectorAll( tag || "*" );
|
| 5040 |
|
| 5041 | } else {
|
| 5042 | ret = [];
|
| 5043 | }
|
| 5044 |
|
| 5045 | if ( tag === undefined || tag && nodeName( context, tag ) ) {
|
| 5046 | return jQuery.merge( [ context ], ret );
|
| 5047 | }
|
| 5048 |
|
| 5049 | return ret;
|
| 5050 | }
|
| 5051 |
|
| 5052 |
|
| 5053 |
|
| 5054 | function setGlobalEval( elems, refElements ) {
|
| 5055 | var i = 0,
|
| 5056 | l = elems.length;
|
| 5057 |
|
| 5058 | for ( ; i < l; i++ ) {
|
| 5059 | dataPriv.set(
|
| 5060 | elems[ i ],
|
| 5061 | "globalEval",
|
| 5062 | !refElements || dataPriv.get( refElements[ i ], "globalEval" )
|
| 5063 | );
|
| 5064 | }
|
| 5065 | }
|
| 5066 |
|
| 5067 |
|
| 5068 | var rhtml = /<|&#?\w+;/;
|
| 5069 |
|
| 5070 | function buildFragment( elems, context, scripts, selection, ignored ) {
|
| 5071 | var elem, tmp, tag, wrap, attached, j,
|
| 5072 | fragment = context.createDocumentFragment(),
|
| 5073 | nodes = [],
|
| 5074 | i = 0,
|
| 5075 | l = elems.length;
|
| 5076 |
|
| 5077 | for ( ; i < l; i++ ) {
|
| 5078 | elem = elems[ i ];
|
| 5079 |
|
| 5080 | if ( elem || elem === 0 ) {
|
| 5081 |
|
| 5082 |
|
| 5083 | if ( toType( elem ) === "object" ) {
|
| 5084 |
|
| 5085 |
|
| 5086 |
|
| 5087 | jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
|
| 5088 |
|
| 5089 |
|
| 5090 | } else if ( !rhtml.test( elem ) ) {
|
| 5091 | nodes.push( context.createTextNode( elem ) );
|
| 5092 |
|
| 5093 |
|
| 5094 | } else {
|
| 5095 | tmp = tmp || fragment.appendChild( context.createElement( "div" ) );
|
| 5096 |
|
| 5097 |
|
| 5098 | tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
|
| 5099 | wrap = wrapMap[ tag ] || wrapMap._default;
|
| 5100 | tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];
|
| 5101 |
|
| 5102 |
|
| 5103 | j = wrap[ 0 ];
|
| 5104 | while ( j-- ) {
|
| 5105 | tmp = tmp.lastChild;
|
| 5106 | }
|
| 5107 |
|
| 5108 |
|
| 5109 |
|
| 5110 | jQuery.merge( nodes, tmp.childNodes );
|
| 5111 |
|
| 5112 |
|
| 5113 | tmp = fragment.firstChild;
|
| 5114 |
|
| 5115 |
|
| 5116 | tmp.textContent = "";
|
| 5117 | }
|
| 5118 | }
|
| 5119 | }
|
| 5120 |
|
| 5121 |
|
| 5122 | fragment.textContent = "";
|
| 5123 |
|
| 5124 | i = 0;
|
| 5125 | while ( ( elem = nodes[ i++ ] ) ) {
|
| 5126 |
|
| 5127 |
|
| 5128 | if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
|
| 5129 | if ( ignored ) {
|
| 5130 | ignored.push( elem );
|
| 5131 | }
|
| 5132 | continue;
|
| 5133 | }
|
| 5134 |
|
| 5135 | attached = isAttached( elem );
|
| 5136 |
|
| 5137 |
|
| 5138 | tmp = getAll( fragment.appendChild( elem ), "script" );
|
| 5139 |
|
| 5140 |
|
| 5141 | if ( attached ) {
|
| 5142 | setGlobalEval( tmp );
|
| 5143 | }
|
| 5144 |
|
| 5145 |
|
| 5146 | if ( scripts ) {
|
| 5147 | j = 0;
|
| 5148 | while ( ( elem = tmp[ j++ ] ) ) {
|
| 5149 | if ( rscriptType.test( elem.type || "" ) ) {
|
| 5150 | scripts.push( elem );
|
| 5151 | }
|
| 5152 | }
|
| 5153 | }
|
| 5154 | }
|
| 5155 |
|
| 5156 | return fragment;
|
| 5157 | }
|
| 5158 |
|
| 5159 |
|
| 5160 | var rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
|
| 5161 |
|
| 5162 | function returnTrue() {
|
| 5163 | return true;
|
| 5164 | }
|
| 5165 |
|
| 5166 | function returnFalse() {
|
| 5167 | return false;
|
| 5168 | }
|
| 5169 |
|
| 5170 |
|
| 5171 |
|
| 5172 |
|
| 5173 |
|
| 5174 |
|
| 5175 |
|
| 5176 | function expectSync( elem, type ) {
|
| 5177 | return ( elem === safeActiveElement() ) === ( type === "focus" );
|
| 5178 | }
|
| 5179 |
|
| 5180 |
|
| 5181 |
|
| 5182 |
|
| 5183 | function safeActiveElement() {
|
| 5184 | try {
|
| 5185 | return document.activeElement;
|
| 5186 | } catch ( err ) { }
|
| 5187 | }
|
| 5188 |
|
| 5189 | function on( elem, types, selector, data, fn, one ) {
|
| 5190 | var origFn, type;
|
| 5191 |
|
| 5192 |
|
| 5193 | if ( typeof types === "object" ) {
|
| 5194 |
|
| 5195 |
|
| 5196 | if ( typeof selector !== "string" ) {
|
| 5197 |
|
| 5198 |
|
| 5199 | data = data || selector;
|
| 5200 | selector = undefined;
|
| 5201 | }
|
| 5202 | for ( type in types ) {
|
| 5203 | on( elem, type, selector, data, types[ type ], one );
|
| 5204 | }
|
| 5205 | return elem;
|
| 5206 | }
|
| 5207 |
|
| 5208 | if ( data == null && fn == null ) {
|
| 5209 |
|
| 5210 |
|
| 5211 | fn = selector;
|
| 5212 | data = selector = undefined;
|
| 5213 | } else if ( fn == null ) {
|
| 5214 | if ( typeof selector === "string" ) {
|
| 5215 |
|
| 5216 |
|
| 5217 | fn = data;
|
| 5218 | data = undefined;
|
| 5219 | } else {
|
| 5220 |
|
| 5221 |
|
| 5222 | fn = data;
|
| 5223 | data = selector;
|
| 5224 | selector = undefined;
|
| 5225 | }
|
| 5226 | }
|
| 5227 | if ( fn === false ) {
|
| 5228 | fn = returnFalse;
|
| 5229 | } else if ( !fn ) {
|
| 5230 | return elem;
|
| 5231 | }
|
| 5232 |
|
| 5233 | if ( one === 1 ) {
|
| 5234 | origFn = fn;
|
| 5235 | fn = function( event ) {
|
| 5236 |
|
| 5237 |
|
| 5238 | jQuery().off( event );
|
| 5239 | return origFn.apply( this, arguments );
|
| 5240 | };
|
| 5241 |
|
| 5242 |
|
| 5243 | fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
|
| 5244 | }
|
| 5245 | return elem.each( function() {
|
| 5246 | jQuery.event.add( this, types, fn, data, selector );
|
| 5247 | } );
|
| 5248 | }
|
| 5249 |
|
| 5250 | |
| 5251 | |
| 5252 | |
| 5253 |
|
| 5254 | jQuery.event = {
|
| 5255 |
|
| 5256 | global: {},
|
| 5257 |
|
| 5258 | add: function( elem, types, handler, data, selector ) {
|
| 5259 |
|
| 5260 | var handleObjIn, eventHandle, tmp,
|
| 5261 | events, t, handleObj,
|
| 5262 | special, handlers, type, namespaces, origType,
|
| 5263 | elemData = dataPriv.get( elem );
|
| 5264 |
|
| 5265 |
|
| 5266 | if ( !acceptData( elem ) ) {
|
| 5267 | return;
|
| 5268 | }
|
| 5269 |
|
| 5270 |
|
| 5271 | if ( handler.handler ) {
|
| 5272 | handleObjIn = handler;
|
| 5273 | handler = handleObjIn.handler;
|
| 5274 | selector = handleObjIn.selector;
|
| 5275 | }
|
| 5276 |
|
| 5277 |
|
| 5278 |
|
| 5279 | if ( selector ) {
|
| 5280 | jQuery.find.matchesSelector( documentElement, selector );
|
| 5281 | }
|
| 5282 |
|
| 5283 |
|
| 5284 | if ( !handler.guid ) {
|
| 5285 | handler.guid = jQuery.guid++;
|
| 5286 | }
|
| 5287 |
|
| 5288 |
|
| 5289 | if ( !( events = elemData.events ) ) {
|
| 5290 | events = elemData.events = Object.create( null );
|
| 5291 | }
|
| 5292 | if ( !( eventHandle = elemData.handle ) ) {
|
| 5293 | eventHandle = elemData.handle = function( e ) {
|
| 5294 |
|
| 5295 |
|
| 5296 |
|
| 5297 | return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
|
| 5298 | jQuery.event.dispatch.apply( elem, arguments ) : undefined;
|
| 5299 | };
|
| 5300 | }
|
| 5301 |
|
| 5302 |
|
| 5303 | types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
|
| 5304 | t = types.length;
|
| 5305 | while ( t-- ) {
|
| 5306 | tmp = rtypenamespace.exec( types[ t ] ) || [];
|
| 5307 | type = origType = tmp[ 1 ];
|
| 5308 | namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
|
| 5309 |
|
| 5310 |
|
| 5311 | if ( !type ) {
|
| 5312 | continue;
|
| 5313 | }
|
| 5314 |
|
| 5315 |
|
| 5316 | special = jQuery.event.special[ type ] || {};
|
| 5317 |
|
| 5318 |
|
| 5319 | type = ( selector ? special.delegateType : special.bindType ) || type;
|
| 5320 |
|
| 5321 |
|
| 5322 | special = jQuery.event.special[ type ] || {};
|
| 5323 |
|
| 5324 |
|
| 5325 | handleObj = jQuery.extend( {
|
| 5326 | type: type,
|
| 5327 | origType: origType,
|
| 5328 | data: data,
|
| 5329 | handler: handler,
|
| 5330 | guid: handler.guid,
|
| 5331 | selector: selector,
|
| 5332 | needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
|
| 5333 | namespace: namespaces.join( "." )
|
| 5334 | }, handleObjIn );
|
| 5335 |
|
| 5336 |
|
| 5337 | if ( !( handlers = events[ type ] ) ) {
|
| 5338 | handlers = events[ type ] = [];
|
| 5339 | handlers.delegateCount = 0;
|
| 5340 |
|
| 5341 |
|
| 5342 | if ( !special.setup ||
|
| 5343 | special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
|
| 5344 |
|
| 5345 | if ( elem.addEventListener ) {
|
| 5346 | elem.addEventListener( type, eventHandle );
|
| 5347 | }
|
| 5348 | }
|
| 5349 | }
|
| 5350 |
|
| 5351 | if ( special.add ) {
|
| 5352 | special.add.call( elem, handleObj );
|
| 5353 |
|
| 5354 | if ( !handleObj.handler.guid ) {
|
| 5355 | handleObj.handler.guid = handler.guid;
|
| 5356 | }
|
| 5357 | }
|
| 5358 |
|
| 5359 |
|
| 5360 | if ( selector ) {
|
| 5361 | handlers.splice( handlers.delegateCount++, 0, handleObj );
|
| 5362 | } else {
|
| 5363 | handlers.push( handleObj );
|
| 5364 | }
|
| 5365 |
|
| 5366 |
|
| 5367 | jQuery.event.global[ type ] = true;
|
| 5368 | }
|
| 5369 |
|
| 5370 | },
|
| 5371 |
|
| 5372 |
|
| 5373 | remove: function( elem, types, handler, selector, mappedTypes ) {
|
| 5374 |
|
| 5375 | var j, origCount, tmp,
|
| 5376 | events, t, handleObj,
|
| 5377 | special, handlers, type, namespaces, origType,
|
| 5378 | elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );
|
| 5379 |
|
| 5380 | if ( !elemData || !( events = elemData.events ) ) {
|
| 5381 | return;
|
| 5382 | }
|
| 5383 |
|
| 5384 |
|
| 5385 | types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
|
| 5386 | t = types.length;
|
| 5387 | while ( t-- ) {
|
| 5388 | tmp = rtypenamespace.exec( types[ t ] ) || [];
|
| 5389 | type = origType = tmp[ 1 ];
|
| 5390 | namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
|
| 5391 |
|
| 5392 |
|
| 5393 | if ( !type ) {
|
| 5394 | for ( type in events ) {
|
| 5395 | jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
|
| 5396 | }
|
| 5397 | continue;
|
| 5398 | }
|
| 5399 |
|
| 5400 | special = jQuery.event.special[ type ] || {};
|
| 5401 | type = ( selector ? special.delegateType : special.bindType ) || type;
|
| 5402 | handlers = events[ type ] || [];
|
| 5403 | tmp = tmp[ 2 ] &&
|
| 5404 | new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );
|
| 5405 |
|
| 5406 |
|
| 5407 | origCount = j = handlers.length;
|
| 5408 | while ( j-- ) {
|
| 5409 | handleObj = handlers[ j ];
|
| 5410 |
|
| 5411 | if ( ( mappedTypes || origType === handleObj.origType ) &&
|
| 5412 | ( !handler || handler.guid === handleObj.guid ) &&
|
| 5413 | ( !tmp || tmp.test( handleObj.namespace ) ) &&
|
| 5414 | ( !selector || selector === handleObj.selector ||
|
| 5415 | selector === "**" && handleObj.selector ) ) {
|
| 5416 | handlers.splice( j, 1 );
|
| 5417 |
|
| 5418 | if ( handleObj.selector ) {
|
| 5419 | handlers.delegateCount--;
|
| 5420 | }
|
| 5421 | if ( special.remove ) {
|
| 5422 | special.remove.call( elem, handleObj );
|
| 5423 | }
|
| 5424 | }
|
| 5425 | }
|
| 5426 |
|
| 5427 |
|
| 5428 |
|
| 5429 | if ( origCount && !handlers.length ) {
|
| 5430 | if ( !special.teardown ||
|
| 5431 | special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
|
| 5432 |
|
| 5433 | jQuery.removeEvent( elem, type, elemData.handle );
|
| 5434 | }
|
| 5435 |
|
| 5436 | delete events[ type ];
|
| 5437 | }
|
| 5438 | }
|
| 5439 |
|
| 5440 |
|
| 5441 | if ( jQuery.isEmptyObject( events ) ) {
|
| 5442 | dataPriv.remove( elem, "handle events" );
|
| 5443 | }
|
| 5444 | },
|
| 5445 |
|
| 5446 | dispatch: function( nativeEvent ) {
|
| 5447 |
|
| 5448 | var i, j, ret, matched, handleObj, handlerQueue,
|
| 5449 | args = new Array( arguments.length ),
|
| 5450 |
|
| 5451 |
|
| 5452 | event = jQuery.event.fix( nativeEvent ),
|
| 5453 |
|
| 5454 | handlers = (
|
| 5455 | dataPriv.get( this, "events" ) || Object.create( null )
|
| 5456 | )[ event.type ] || [],
|
| 5457 | special = jQuery.event.special[ event.type ] || {};
|
| 5458 |
|
| 5459 |
|
| 5460 | args[ 0 ] = event;
|
| 5461 |
|
| 5462 | for ( i = 1; i < arguments.length; i++ ) {
|
| 5463 | args[ i ] = arguments[ i ];
|
| 5464 | }
|
| 5465 |
|
| 5466 | event.delegateTarget = this;
|
| 5467 |
|
| 5468 |
|
| 5469 | if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
|
| 5470 | return;
|
| 5471 | }
|
| 5472 |
|
| 5473 |
|
| 5474 | handlerQueue = jQuery.event.handlers.call( this, event, handlers );
|
| 5475 |
|
| 5476 |
|
| 5477 | i = 0;
|
| 5478 | while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {
|
| 5479 | event.currentTarget = matched.elem;
|
| 5480 |
|
| 5481 | j = 0;
|
| 5482 | while ( ( handleObj = matched.handlers[ j++ ] ) &&
|
| 5483 | !event.isImmediatePropagationStopped() ) {
|
| 5484 |
|
| 5485 |
|
| 5486 |
|
| 5487 | if ( !event.rnamespace || handleObj.namespace === false ||
|
| 5488 | event.rnamespace.test( handleObj.namespace ) ) {
|
| 5489 |
|
| 5490 | event.handleObj = handleObj;
|
| 5491 | event.data = handleObj.data;
|
| 5492 |
|
| 5493 | ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
|
| 5494 | handleObj.handler ).apply( matched.elem, args );
|
| 5495 |
|
| 5496 | if ( ret !== undefined ) {
|
| 5497 | if ( ( event.result = ret ) === false ) {
|
| 5498 | event.preventDefault();
|
| 5499 | event.stopPropagation();
|
| 5500 | }
|
| 5501 | }
|
| 5502 | }
|
| 5503 | }
|
| 5504 | }
|
| 5505 |
|
| 5506 |
|
| 5507 | if ( special.postDispatch ) {
|
| 5508 | special.postDispatch.call( this, event );
|
| 5509 | }
|
| 5510 |
|
| 5511 | return event.result;
|
| 5512 | },
|
| 5513 |
|
| 5514 | handlers: function( event, handlers ) {
|
| 5515 | var i, handleObj, sel, matchedHandlers, matchedSelectors,
|
| 5516 | handlerQueue = [],
|
| 5517 | delegateCount = handlers.delegateCount,
|
| 5518 | cur = event.target;
|
| 5519 |
|
| 5520 |
|
| 5521 | if ( delegateCount &&
|
| 5522 |
|
| 5523 |
|
| 5524 |
|
| 5525 | cur.nodeType &&
|
| 5526 |
|
| 5527 |
|
| 5528 |
|
| 5529 |
|
| 5530 |
|
| 5531 |
|
| 5532 | !( event.type === "click" && event.button >= 1 ) ) {
|
| 5533 |
|
| 5534 | for ( ; cur !== this; cur = cur.parentNode || this ) {
|
| 5535 |
|
| 5536 |
|
| 5537 |
|
| 5538 | if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) {
|
| 5539 | matchedHandlers = [];
|
| 5540 | matchedSelectors = {};
|
| 5541 | for ( i = 0; i < delegateCount; i++ ) {
|
| 5542 | handleObj = handlers[ i ];
|
| 5543 |
|
| 5544 |
|
| 5545 | sel = handleObj.selector + " ";
|
| 5546 |
|
| 5547 | if ( matchedSelectors[ sel ] === undefined ) {
|
| 5548 | matchedSelectors[ sel ] = handleObj.needsContext ?
|
| 5549 | jQuery( sel, this ).index( cur ) > -1 :
|
| 5550 | jQuery.find( sel, this, null, [ cur ] ).length;
|
| 5551 | }
|
| 5552 | if ( matchedSelectors[ sel ] ) {
|
| 5553 | matchedHandlers.push( handleObj );
|
| 5554 | }
|
| 5555 | }
|
| 5556 | if ( matchedHandlers.length ) {
|
| 5557 | handlerQueue.push( { elem: cur, handlers: matchedHandlers } );
|
| 5558 | }
|
| 5559 | }
|
| 5560 | }
|
| 5561 | }
|
| 5562 |
|
| 5563 |
|
| 5564 | cur = this;
|
| 5565 | if ( delegateCount < handlers.length ) {
|
| 5566 | handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );
|
| 5567 | }
|
| 5568 |
|
| 5569 | return handlerQueue;
|
| 5570 | },
|
| 5571 |
|
| 5572 | addProp: function( name, hook ) {
|
| 5573 | Object.defineProperty( jQuery.Event.prototype, name, {
|
| 5574 | enumerable: true,
|
| 5575 | configurable: true,
|
| 5576 |
|
| 5577 | get: isFunction( hook ) ?
|
| 5578 | function() {
|
| 5579 | if ( this.originalEvent ) {
|
| 5580 | return hook( this.originalEvent );
|
| 5581 | }
|
| 5582 | } :
|
| 5583 | function() {
|
| 5584 | if ( this.originalEvent ) {
|
| 5585 | return this.originalEvent[ name ];
|
| 5586 | }
|
| 5587 | },
|
| 5588 |
|
| 5589 | set: function( value ) {
|
| 5590 | Object.defineProperty( this, name, {
|
| 5591 | enumerable: true,
|
| 5592 | configurable: true,
|
| 5593 | writable: true,
|
| 5594 | value: value
|
| 5595 | } );
|
| 5596 | }
|
| 5597 | } );
|
| 5598 | },
|
| 5599 |
|
| 5600 | fix: function( originalEvent ) {
|
| 5601 | return originalEvent[ jQuery.expando ] ?
|
| 5602 | originalEvent :
|
| 5603 | new jQuery.Event( originalEvent );
|
| 5604 | },
|
| 5605 |
|
| 5606 | special: {
|
| 5607 | load: {
|
| 5608 |
|
| 5609 |
|
| 5610 | noBubble: true
|
| 5611 | },
|
| 5612 | click: {
|
| 5613 |
|
| 5614 |
|
| 5615 | setup: function( data ) {
|
| 5616 |
|
| 5617 |
|
| 5618 |
|
| 5619 | var el = this || data;
|
| 5620 |
|
| 5621 |
|
| 5622 | if ( rcheckableType.test( el.type ) &&
|
| 5623 | el.click && nodeName( el, "input" ) ) {
|
| 5624 |
|
| 5625 |
|
| 5626 | leverageNative( el, "click", returnTrue );
|
| 5627 | }
|
| 5628 |
|
| 5629 |
|
| 5630 | return false;
|
| 5631 | },
|
| 5632 | trigger: function( data ) {
|
| 5633 |
|
| 5634 |
|
| 5635 |
|
| 5636 | var el = this || data;
|
| 5637 |
|
| 5638 |
|
| 5639 | if ( rcheckableType.test( el.type ) &&
|
| 5640 | el.click && nodeName( el, "input" ) ) {
|
| 5641 |
|
| 5642 | leverageNative( el, "click" );
|
| 5643 | }
|
| 5644 |
|
| 5645 |
|
| 5646 | return true;
|
| 5647 | },
|
| 5648 |
|
| 5649 |
|
| 5650 |
|
| 5651 | _default: function( event ) {
|
| 5652 | var target = event.target;
|
| 5653 | return rcheckableType.test( target.type ) &&
|
| 5654 | target.click && nodeName( target, "input" ) &&
|
| 5655 | dataPriv.get( target, "click" ) ||
|
| 5656 | nodeName( target, "a" );
|
| 5657 | }
|
| 5658 | },
|
| 5659 |
|
| 5660 | beforeunload: {
|
| 5661 | postDispatch: function( event ) {
|
| 5662 |
|
| 5663 |
|
| 5664 |
|
| 5665 | if ( event.result !== undefined && event.originalEvent ) {
|
| 5666 | event.originalEvent.returnValue = event.result;
|
| 5667 | }
|
| 5668 | }
|
| 5669 | }
|
| 5670 | }
|
| 5671 | };
|
| 5672 |
|
| 5673 |
|
| 5674 |
|
| 5675 |
|
| 5676 |
|
| 5677 | function leverageNative( el, type, expectSync ) {
|
| 5678 |
|
| 5679 |
|
| 5680 | if ( !expectSync ) {
|
| 5681 | if ( dataPriv.get( el, type ) === undefined ) {
|
| 5682 | jQuery.event.add( el, type, returnTrue );
|
| 5683 | }
|
| 5684 | return;
|
| 5685 | }
|
| 5686 |
|
| 5687 |
|
| 5688 | dataPriv.set( el, type, false );
|
| 5689 | jQuery.event.add( el, type, {
|
| 5690 | namespace: false,
|
| 5691 | handler: function( event ) {
|
| 5692 | var notAsync, result,
|
| 5693 | saved = dataPriv.get( this, type );
|
| 5694 |
|
| 5695 | if ( ( event.isTrigger & 1 ) && this[ type ] ) {
|
| 5696 |
|
| 5697 |
|
| 5698 |
|
| 5699 |
|
| 5700 | if ( !saved.length ) {
|
| 5701 |
|
| 5702 |
|
| 5703 |
|
| 5704 |
|
| 5705 | saved = slice.call( arguments );
|
| 5706 | dataPriv.set( this, type, saved );
|
| 5707 |
|
| 5708 |
|
| 5709 |
|
| 5710 |
|
| 5711 | notAsync = expectSync( this, type );
|
| 5712 | this[ type ]();
|
| 5713 | result = dataPriv.get( this, type );
|
| 5714 | if ( saved !== result || notAsync ) {
|
| 5715 | dataPriv.set( this, type, false );
|
| 5716 | } else {
|
| 5717 | result = {};
|
| 5718 | }
|
| 5719 | if ( saved !== result ) {
|
| 5720 |
|
| 5721 |
|
| 5722 | event.stopImmediatePropagation();
|
| 5723 | event.preventDefault();
|
| 5724 |
|
| 5725 |
|
| 5726 |
|
| 5727 |
|
| 5728 |
|
| 5729 |
|
| 5730 | return result && result.value;
|
| 5731 | }
|
| 5732 |
|
| 5733 |
|
| 5734 |
|
| 5735 |
|
| 5736 |
|
| 5737 |
|
| 5738 |
|
| 5739 | } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {
|
| 5740 | event.stopPropagation();
|
| 5741 | }
|
| 5742 |
|
| 5743 |
|
| 5744 |
|
| 5745 | } else if ( saved.length ) {
|
| 5746 |
|
| 5747 |
|
| 5748 | dataPriv.set( this, type, {
|
| 5749 | value: jQuery.event.trigger(
|
| 5750 |
|
| 5751 |
|
| 5752 |
|
| 5753 | jQuery.extend( saved[ 0 ], jQuery.Event.prototype ),
|
| 5754 | saved.slice( 1 ),
|
| 5755 | this
|
| 5756 | )
|
| 5757 | } );
|
| 5758 |
|
| 5759 |
|
| 5760 | event.stopImmediatePropagation();
|
| 5761 | }
|
| 5762 | }
|
| 5763 | } );
|
| 5764 | }
|
| 5765 |
|
| 5766 | jQuery.removeEvent = function( elem, type, handle ) {
|
| 5767 |
|
| 5768 |
|
| 5769 | if ( elem.removeEventListener ) {
|
| 5770 | elem.removeEventListener( type, handle );
|
| 5771 | }
|
| 5772 | };
|
| 5773 |
|
| 5774 | jQuery.Event = function( src, props ) {
|
| 5775 |
|
| 5776 |
|
| 5777 | if ( !( this instanceof jQuery.Event ) ) {
|
| 5778 | return new jQuery.Event( src, props );
|
| 5779 | }
|
| 5780 |
|
| 5781 |
|
| 5782 | if ( src && src.type ) {
|
| 5783 | this.originalEvent = src;
|
| 5784 | this.type = src.type;
|
| 5785 |
|
| 5786 |
|
| 5787 |
|
| 5788 | this.isDefaultPrevented = src.defaultPrevented ||
|
| 5789 | src.defaultPrevented === undefined &&
|
| 5790 |
|
| 5791 |
|
| 5792 | src.returnValue === false ?
|
| 5793 | returnTrue :
|
| 5794 | returnFalse;
|
| 5795 |
|
| 5796 |
|
| 5797 |
|
| 5798 |
|
| 5799 | this.target = ( src.target && src.target.nodeType === 3 ) ?
|
| 5800 | src.target.parentNode :
|
| 5801 | src.target;
|
| 5802 |
|
| 5803 | this.currentTarget = src.currentTarget;
|
| 5804 | this.relatedTarget = src.relatedTarget;
|
| 5805 |
|
| 5806 |
|
| 5807 | } else {
|
| 5808 | this.type = src;
|
| 5809 | }
|
| 5810 |
|
| 5811 |
|
| 5812 | if ( props ) {
|
| 5813 | jQuery.extend( this, props );
|
| 5814 | }
|
| 5815 |
|
| 5816 |
|
| 5817 | this.timeStamp = src && src.timeStamp || Date.now();
|
| 5818 |
|
| 5819 |
|
| 5820 | this[ jQuery.expando ] = true;
|
| 5821 | };
|
| 5822 |
|
| 5823 |
|
| 5824 |
|
| 5825 | jQuery.Event.prototype = {
|
| 5826 | constructor: jQuery.Event,
|
| 5827 | isDefaultPrevented: returnFalse,
|
| 5828 | isPropagationStopped: returnFalse,
|
| 5829 | isImmediatePropagationStopped: returnFalse,
|
| 5830 | isSimulated: false,
|
| 5831 |
|
| 5832 | preventDefault: function() {
|
| 5833 | var e = this.originalEvent;
|
| 5834 |
|
| 5835 | this.isDefaultPrevented = returnTrue;
|
| 5836 |
|
| 5837 | if ( e && !this.isSimulated ) {
|
| 5838 | e.preventDefault();
|
| 5839 | }
|
| 5840 | },
|
| 5841 | stopPropagation: function() {
|
| 5842 | var e = this.originalEvent;
|
| 5843 |
|
| 5844 | this.isPropagationStopped = returnTrue;
|
| 5845 |
|
| 5846 | if ( e && !this.isSimulated ) {
|
| 5847 | e.stopPropagation();
|
| 5848 | }
|
| 5849 | },
|
| 5850 | stopImmediatePropagation: function() {
|
| 5851 | var e = this.originalEvent;
|
| 5852 |
|
| 5853 | this.isImmediatePropagationStopped = returnTrue;
|
| 5854 |
|
| 5855 | if ( e && !this.isSimulated ) {
|
| 5856 | e.stopImmediatePropagation();
|
| 5857 | }
|
| 5858 |
|
| 5859 | this.stopPropagation();
|
| 5860 | }
|
| 5861 | };
|
| 5862 |
|
| 5863 |
|
| 5864 | jQuery.each( {
|
| 5865 | altKey: true,
|
| 5866 | bubbles: true,
|
| 5867 | cancelable: true,
|
| 5868 | changedTouches: true,
|
| 5869 | ctrlKey: true,
|
| 5870 | detail: true,
|
| 5871 | eventPhase: true,
|
| 5872 | metaKey: true,
|
| 5873 | pageX: true,
|
| 5874 | pageY: true,
|
| 5875 | shiftKey: true,
|
| 5876 | view: true,
|
| 5877 | "char": true,
|
| 5878 | code: true,
|
| 5879 | charCode: true,
|
| 5880 | key: true,
|
| 5881 | keyCode: true,
|
| 5882 | button: true,
|
| 5883 | buttons: true,
|
| 5884 | clientX: true,
|
| 5885 | clientY: true,
|
| 5886 | offsetX: true,
|
| 5887 | offsetY: true,
|
| 5888 | pointerId: true,
|
| 5889 | pointerType: true,
|
| 5890 | screenX: true,
|
| 5891 | screenY: true,
|
| 5892 | targetTouches: true,
|
| 5893 | toElement: true,
|
| 5894 | touches: true,
|
| 5895 | which: true
|
| 5896 | }, jQuery.event.addProp );
|
| 5897 |
|
| 5898 | jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) {
|
| 5899 | jQuery.event.special[ type ] = {
|
| 5900 |
|
| 5901 |
|
| 5902 | setup: function() {
|
| 5903 |
|
| 5904 |
|
| 5905 |
|
| 5906 |
|
| 5907 | leverageNative( this, type, expectSync );
|
| 5908 |
|
| 5909 |
|
| 5910 | return false;
|
| 5911 | },
|
| 5912 | trigger: function() {
|
| 5913 |
|
| 5914 |
|
| 5915 | leverageNative( this, type );
|
| 5916 |
|
| 5917 |
|
| 5918 | return true;
|
| 5919 | },
|
| 5920 |
|
| 5921 |
|
| 5922 |
|
| 5923 | _default: function( event ) {
|
| 5924 | return dataPriv.get( event.target, type );
|
| 5925 | },
|
| 5926 |
|
| 5927 | delegateType: delegateType
|
| 5928 | };
|
| 5929 | } );
|
| 5930 |
|
| 5931 |
|
| 5932 |
|
| 5933 |
|
| 5934 |
|
| 5935 |
|
| 5936 |
|
| 5937 |
|
| 5938 |
|
| 5939 | jQuery.each( {
|
| 5940 | mouseenter: "mouseover",
|
| 5941 | mouseleave: "mouseout",
|
| 5942 | pointerenter: "pointerover",
|
| 5943 | pointerleave: "pointerout"
|
| 5944 | }, function( orig, fix ) {
|
| 5945 | jQuery.event.special[ orig ] = {
|
| 5946 | delegateType: fix,
|
| 5947 | bindType: fix,
|
| 5948 |
|
| 5949 | handle: function( event ) {
|
| 5950 | var ret,
|
| 5951 | target = this,
|
| 5952 | related = event.relatedTarget,
|
| 5953 | handleObj = event.handleObj;
|
| 5954 |
|
| 5955 |
|
| 5956 |
|
| 5957 | if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {
|
| 5958 | event.type = handleObj.origType;
|
| 5959 | ret = handleObj.handler.apply( this, arguments );
|
| 5960 | event.type = fix;
|
| 5961 | }
|
| 5962 | return ret;
|
| 5963 | }
|
| 5964 | };
|
| 5965 | } );
|
| 5966 |
|
| 5967 | jQuery.fn.extend( {
|
| 5968 |
|
| 5969 | on: function( types, selector, data, fn ) {
|
| 5970 | return on( this, types, selector, data, fn );
|
| 5971 | },
|
| 5972 | one: function( types, selector, data, fn ) {
|
| 5973 | return on( this, types, selector, data, fn, 1 );
|
| 5974 | },
|
| 5975 | off: function( types, selector, fn ) {
|
| 5976 | var handleObj, type;
|
| 5977 | if ( types && types.preventDefault && types.handleObj ) {
|
| 5978 |
|
| 5979 |
|
| 5980 | handleObj = types.handleObj;
|
| 5981 | jQuery( types.delegateTarget ).off(
|
| 5982 | handleObj.namespace ?
|
| 5983 | handleObj.origType + "." + handleObj.namespace :
|
| 5984 | handleObj.origType,
|
| 5985 | handleObj.selector,
|
| 5986 | handleObj.handler
|
| 5987 | );
|
| 5988 | return this;
|
| 5989 | }
|
| 5990 | if ( typeof types === "object" ) {
|
| 5991 |
|
| 5992 |
|
| 5993 | for ( type in types ) {
|
| 5994 | this.off( type, selector, types[ type ] );
|
| 5995 | }
|
| 5996 | return this;
|
| 5997 | }
|
| 5998 | if ( selector === false || typeof selector === "function" ) {
|
| 5999 |
|
| 6000 |
|
| 6001 | fn = selector;
|
| 6002 | selector = undefined;
|
| 6003 | }
|
| 6004 | if ( fn === false ) {
|
| 6005 | fn = returnFalse;
|
| 6006 | }
|
| 6007 | return this.each( function() {
|
| 6008 | jQuery.event.remove( this, types, fn, selector );
|
| 6009 | } );
|
| 6010 | }
|
| 6011 | } );
|
| 6012 |
|
| 6013 |
|
| 6014 | var
|
| 6015 |
|
| 6016 |
|
| 6017 |
|
| 6018 |
|
| 6019 | rnoInnerhtml = /<script|<style|<link/i,
|
| 6020 |
|
| 6021 |
|
| 6022 | rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
|
| 6023 |
|
| 6024 | rcleanScript = /^\s*<!\[CDATA\[|\]\]>\s*$/g;
|
| 6025 |
|
| 6026 |
|
| 6027 | function manipulationTarget( elem, content ) {
|
| 6028 | if ( nodeName( elem, "table" ) &&
|
| 6029 | nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {
|
| 6030 |
|
| 6031 | return jQuery( elem ).children( "tbody" )[ 0 ] || elem;
|
| 6032 | }
|
| 6033 |
|
| 6034 | return elem;
|
| 6035 | }
|
| 6036 |
|
| 6037 |
|
| 6038 | function disableScript( elem ) {
|
| 6039 | elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;
|
| 6040 | return elem;
|
| 6041 | }
|
| 6042 | function restoreScript( elem ) {
|
| 6043 | if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) {
|
| 6044 | elem.type = elem.type.slice( 5 );
|
| 6045 | } else {
|
| 6046 | elem.removeAttribute( "type" );
|
| 6047 | }
|
| 6048 |
|
| 6049 | return elem;
|
| 6050 | }
|
| 6051 |
|
| 6052 | function cloneCopyEvent( src, dest ) {
|
| 6053 | var i, l, type, pdataOld, udataOld, udataCur, events;
|
| 6054 |
|
| 6055 | if ( dest.nodeType !== 1 ) {
|
| 6056 | return;
|
| 6057 | }
|
| 6058 |
|
| 6059 |
|
| 6060 | if ( dataPriv.hasData( src ) ) {
|
| 6061 | pdataOld = dataPriv.get( src );
|
| 6062 | events = pdataOld.events;
|
| 6063 |
|
| 6064 | if ( events ) {
|
| 6065 | dataPriv.remove( dest, "handle events" );
|
| 6066 |
|
| 6067 | for ( type in events ) {
|
| 6068 | for ( i = 0, l = events[ type ].length; i < l; i++ ) {
|
| 6069 | jQuery.event.add( dest, type, events[ type ][ i ] );
|
| 6070 | }
|
| 6071 | }
|
| 6072 | }
|
| 6073 | }
|
| 6074 |
|
| 6075 |
|
| 6076 | if ( dataUser.hasData( src ) ) {
|
| 6077 | udataOld = dataUser.access( src );
|
| 6078 | udataCur = jQuery.extend( {}, udataOld );
|
| 6079 |
|
| 6080 | dataUser.set( dest, udataCur );
|
| 6081 | }
|
| 6082 | }
|
| 6083 |
|
| 6084 |
|
| 6085 | function fixInput( src, dest ) {
|
| 6086 | var nodeName = dest.nodeName.toLowerCase();
|
| 6087 |
|
| 6088 |
|
| 6089 | if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
|
| 6090 | dest.checked = src.checked;
|
| 6091 |
|
| 6092 |
|
| 6093 | } else if ( nodeName === "input" || nodeName === "textarea" ) {
|
| 6094 | dest.defaultValue = src.defaultValue;
|
| 6095 | }
|
| 6096 | }
|
| 6097 |
|
| 6098 | function domManip( collection, args, callback, ignored ) {
|
| 6099 |
|
| 6100 |
|
| 6101 | args = flat( args );
|
| 6102 |
|
| 6103 | var fragment, first, scripts, hasScripts, node, doc,
|
| 6104 | i = 0,
|
| 6105 | l = collection.length,
|
| 6106 | iNoClone = l - 1,
|
| 6107 | value = args[ 0 ],
|
| 6108 | valueIsFunction = isFunction( value );
|
| 6109 |
|
| 6110 |
|
| 6111 | if ( valueIsFunction ||
|
| 6112 | ( l > 1 && typeof value === "string" &&
|
| 6113 | !support.checkClone && rchecked.test( value ) ) ) {
|
| 6114 | return collection.each( function( index ) {
|
| 6115 | var self = collection.eq( index );
|
| 6116 | if ( valueIsFunction ) {
|
| 6117 | args[ 0 ] = value.call( this, index, self.html() );
|
| 6118 | }
|
| 6119 | domManip( self, args, callback, ignored );
|
| 6120 | } );
|
| 6121 | }
|
| 6122 |
|
| 6123 | if ( l ) {
|
| 6124 | fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );
|
| 6125 | first = fragment.firstChild;
|
| 6126 |
|
| 6127 | if ( fragment.childNodes.length === 1 ) {
|
| 6128 | fragment = first;
|
| 6129 | }
|
| 6130 |
|
| 6131 |
|
| 6132 | if ( first || ignored ) {
|
| 6133 | scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
|
| 6134 | hasScripts = scripts.length;
|
| 6135 |
|
| 6136 |
|
| 6137 |
|
| 6138 |
|
| 6139 | for ( ; i < l; i++ ) {
|
| 6140 | node = fragment;
|
| 6141 |
|
| 6142 | if ( i !== iNoClone ) {
|
| 6143 | node = jQuery.clone( node, true, true );
|
| 6144 |
|
| 6145 |
|
| 6146 | if ( hasScripts ) {
|
| 6147 |
|
| 6148 |
|
| 6149 |
|
| 6150 | jQuery.merge( scripts, getAll( node, "script" ) );
|
| 6151 | }
|
| 6152 | }
|
| 6153 |
|
| 6154 | callback.call( collection[ i ], node, i );
|
| 6155 | }
|
| 6156 |
|
| 6157 | if ( hasScripts ) {
|
| 6158 | doc = scripts[ scripts.length - 1 ].ownerDocument;
|
| 6159 |
|
| 6160 |
|
| 6161 | jQuery.map( scripts, restoreScript );
|
| 6162 |
|
| 6163 |
|
| 6164 | for ( i = 0; i < hasScripts; i++ ) {
|
| 6165 | node = scripts[ i ];
|
| 6166 | if ( rscriptType.test( node.type || "" ) &&
|
| 6167 | !dataPriv.access( node, "globalEval" ) &&
|
| 6168 | jQuery.contains( doc, node ) ) {
|
| 6169 |
|
| 6170 | if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) {
|
| 6171 |
|
| 6172 |
|
| 6173 | if ( jQuery._evalUrl && !node.noModule ) {
|
| 6174 | jQuery._evalUrl( node.src, {
|
| 6175 | nonce: node.nonce || node.getAttribute( "nonce" )
|
| 6176 | }, doc );
|
| 6177 | }
|
| 6178 | } else {
|
| 6179 |
|
| 6180 |
|
| 6181 |
|
| 6182 |
|
| 6183 |
|
| 6184 |
|
| 6185 | DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc );
|
| 6186 | }
|
| 6187 | }
|
| 6188 | }
|
| 6189 | }
|
| 6190 | }
|
| 6191 | }
|
| 6192 |
|
| 6193 | return collection;
|
| 6194 | }
|
| 6195 |
|
| 6196 | function remove( elem, selector, keepData ) {
|
| 6197 | var node,
|
| 6198 | nodes = selector ? jQuery.filter( selector, elem ) : elem,
|
| 6199 | i = 0;
|
| 6200 |
|
| 6201 | for ( ; ( node = nodes[ i ] ) != null; i++ ) {
|
| 6202 | if ( !keepData && node.nodeType === 1 ) {
|
| 6203 | jQuery.cleanData( getAll( node ) );
|
| 6204 | }
|
| 6205 |
|
| 6206 | if ( node.parentNode ) {
|
| 6207 | if ( keepData && isAttached( node ) ) {
|
| 6208 | setGlobalEval( getAll( node, "script" ) );
|
| 6209 | }
|
| 6210 | node.parentNode.removeChild( node );
|
| 6211 | }
|
| 6212 | }
|
| 6213 |
|
| 6214 | return elem;
|
| 6215 | }
|
| 6216 |
|
| 6217 | jQuery.extend( {
|
| 6218 | htmlPrefilter: function( html ) {
|
| 6219 | return html;
|
| 6220 | },
|
| 6221 |
|
| 6222 | clone: function( elem, dataAndEvents, deepDataAndEvents ) {
|
| 6223 | var i, l, srcElements, destElements,
|
| 6224 | clone = elem.cloneNode( true ),
|
| 6225 | inPage = isAttached( elem );
|
| 6226 |
|
| 6227 |
|
| 6228 | if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
|
| 6229 | !jQuery.isXMLDoc( elem ) ) {
|
| 6230 |
|
| 6231 |
|
| 6232 | destElements = getAll( clone );
|
| 6233 | srcElements = getAll( elem );
|
| 6234 |
|
| 6235 | for ( i = 0, l = srcElements.length; i < l; i++ ) {
|
| 6236 | fixInput( srcElements[ i ], destElements[ i ] );
|
| 6237 | }
|
| 6238 | }
|
| 6239 |
|
| 6240 |
|
| 6241 | if ( dataAndEvents ) {
|
| 6242 | if ( deepDataAndEvents ) {
|
| 6243 | srcElements = srcElements || getAll( elem );
|
| 6244 | destElements = destElements || getAll( clone );
|
| 6245 |
|
| 6246 | for ( i = 0, l = srcElements.length; i < l; i++ ) {
|
| 6247 | cloneCopyEvent( srcElements[ i ], destElements[ i ] );
|
| 6248 | }
|
| 6249 | } else {
|
| 6250 | cloneCopyEvent( elem, clone );
|
| 6251 | }
|
| 6252 | }
|
| 6253 |
|
| 6254 |
|
| 6255 | destElements = getAll( clone, "script" );
|
| 6256 | if ( destElements.length > 0 ) {
|
| 6257 | setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
|
| 6258 | }
|
| 6259 |
|
| 6260 |
|
| 6261 | return clone;
|
| 6262 | },
|
| 6263 |
|
| 6264 | cleanData: function( elems ) {
|
| 6265 | var data, elem, type,
|
| 6266 | special = jQuery.event.special,
|
| 6267 | i = 0;
|
| 6268 |
|
| 6269 | for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {
|
| 6270 | if ( acceptData( elem ) ) {
|
| 6271 | if ( ( data = elem[ dataPriv.expando ] ) ) {
|
| 6272 | if ( data.events ) {
|
| 6273 | for ( type in data.events ) {
|
| 6274 | if ( special[ type ] ) {
|
| 6275 | jQuery.event.remove( elem, type );
|
| 6276 |
|
| 6277 |
|
| 6278 | } else {
|
| 6279 | jQuery.removeEvent( elem, type, data.handle );
|
| 6280 | }
|
| 6281 | }
|
| 6282 | }
|
| 6283 |
|
| 6284 |
|
| 6285 |
|
| 6286 | elem[ dataPriv.expando ] = undefined;
|
| 6287 | }
|
| 6288 | if ( elem[ dataUser.expando ] ) {
|
| 6289 |
|
| 6290 |
|
| 6291 |
|
| 6292 | elem[ dataUser.expando ] = undefined;
|
| 6293 | }
|
| 6294 | }
|
| 6295 | }
|
| 6296 | }
|
| 6297 | } );
|
| 6298 |
|
| 6299 | jQuery.fn.extend( {
|
| 6300 | detach: function( selector ) {
|
| 6301 | return remove( this, selector, true );
|
| 6302 | },
|
| 6303 |
|
| 6304 | remove: function( selector ) {
|
| 6305 | return remove( this, selector );
|
| 6306 | },
|
| 6307 |
|
| 6308 | text: function( value ) {
|
| 6309 | return access( this, function( value ) {
|
| 6310 | return value === undefined ?
|
| 6311 | jQuery.text( this ) :
|
| 6312 | this.empty().each( function() {
|
| 6313 | if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
|
| 6314 | this.textContent = value;
|
| 6315 | }
|
| 6316 | } );
|
| 6317 | }, null, value, arguments.length );
|
| 6318 | },
|
| 6319 |
|
| 6320 | append: function() {
|
| 6321 | return domManip( this, arguments, function( elem ) {
|
| 6322 | if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
|
| 6323 | var target = manipulationTarget( this, elem );
|
| 6324 | target.appendChild( elem );
|
| 6325 | }
|
| 6326 | } );
|
| 6327 | },
|
| 6328 |
|
| 6329 | prepend: function() {
|
| 6330 | return domManip( this, arguments, function( elem ) {
|
| 6331 | if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
|
| 6332 | var target = manipulationTarget( this, elem );
|
| 6333 | target.insertBefore( elem, target.firstChild );
|
| 6334 | }
|
| 6335 | } );
|
| 6336 | },
|
| 6337 |
|
| 6338 | before: function() {
|
| 6339 | return domManip( this, arguments, function( elem ) {
|
| 6340 | if ( this.parentNode ) {
|
| 6341 | this.parentNode.insertBefore( elem, this );
|
| 6342 | }
|
| 6343 | } );
|
| 6344 | },
|
| 6345 |
|
| 6346 | after: function() {
|
| 6347 | return domManip( this, arguments, function( elem ) {
|
| 6348 | if ( this.parentNode ) {
|
| 6349 | this.parentNode.insertBefore( elem, this.nextSibling );
|
| 6350 | }
|
| 6351 | } );
|
| 6352 | },
|
| 6353 |
|
| 6354 | empty: function() {
|
| 6355 | var elem,
|
| 6356 | i = 0;
|
| 6357 |
|
| 6358 | for ( ; ( elem = this[ i ] ) != null; i++ ) {
|
| 6359 | if ( elem.nodeType === 1 ) {
|
| 6360 |
|
| 6361 |
|
| 6362 | jQuery.cleanData( getAll( elem, false ) );
|
| 6363 |
|
| 6364 |
|
| 6365 | elem.textContent = "";
|
| 6366 | }
|
| 6367 | }
|
| 6368 |
|
| 6369 | return this;
|
| 6370 | },
|
| 6371 |
|
| 6372 | clone: function( dataAndEvents, deepDataAndEvents ) {
|
| 6373 | dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
|
| 6374 | deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
|
| 6375 |
|
| 6376 | return this.map( function() {
|
| 6377 | return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
|
| 6378 | } );
|
| 6379 | },
|
| 6380 |
|
| 6381 | html: function( value ) {
|
| 6382 | return access( this, function( value ) {
|
| 6383 | var elem = this[ 0 ] || {},
|
| 6384 | i = 0,
|
| 6385 | l = this.length;
|
| 6386 |
|
| 6387 | if ( value === undefined && elem.nodeType === 1 ) {
|
| 6388 | return elem.innerHTML;
|
| 6389 | }
|
| 6390 |
|
| 6391 |
|
| 6392 | if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
|
| 6393 | !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {
|
| 6394 |
|
| 6395 | value = jQuery.htmlPrefilter( value );
|
| 6396 |
|
| 6397 | try {
|
| 6398 | for ( ; i < l; i++ ) {
|
| 6399 | elem = this[ i ] || {};
|
| 6400 |
|
| 6401 |
|
| 6402 | if ( elem.nodeType === 1 ) {
|
| 6403 | jQuery.cleanData( getAll( elem, false ) );
|
| 6404 | elem.innerHTML = value;
|
| 6405 | }
|
| 6406 | }
|
| 6407 |
|
| 6408 | elem = 0;
|
| 6409 |
|
| 6410 |
|
| 6411 | } catch ( e ) {}
|
| 6412 | }
|
| 6413 |
|
| 6414 | if ( elem ) {
|
| 6415 | this.empty().append( value );
|
| 6416 | }
|
| 6417 | }, null, value, arguments.length );
|
| 6418 | },
|
| 6419 |
|
| 6420 | replaceWith: function() {
|
| 6421 | var ignored = [];
|
| 6422 |
|
| 6423 |
|
| 6424 | return domManip( this, arguments, function( elem ) {
|
| 6425 | var parent = this.parentNode;
|
| 6426 |
|
| 6427 | if ( jQuery.inArray( this, ignored ) < 0 ) {
|
| 6428 | jQuery.cleanData( getAll( this ) );
|
| 6429 | if ( parent ) {
|
| 6430 | parent.replaceChild( elem, this );
|
| 6431 | }
|
| 6432 | }
|
| 6433 |
|
| 6434 |
|
| 6435 | }, ignored );
|
| 6436 | }
|
| 6437 | } );
|
| 6438 |
|
| 6439 | jQuery.each( {
|
| 6440 | appendTo: "append",
|
| 6441 | prependTo: "prepend",
|
| 6442 | insertBefore: "before",
|
| 6443 | insertAfter: "after",
|
| 6444 | replaceAll: "replaceWith"
|
| 6445 | }, function( name, original ) {
|
| 6446 | jQuery.fn[ name ] = function( selector ) {
|
| 6447 | var elems,
|
| 6448 | ret = [],
|
| 6449 | insert = jQuery( selector ),
|
| 6450 | last = insert.length - 1,
|
| 6451 | i = 0;
|
| 6452 |
|
| 6453 | for ( ; i <= last; i++ ) {
|
| 6454 | elems = i === last ? this : this.clone( true );
|
| 6455 | jQuery( insert[ i ] )[ original ]( elems );
|
| 6456 |
|
| 6457 |
|
| 6458 |
|
| 6459 | push.apply( ret, elems.get() );
|
| 6460 | }
|
| 6461 |
|
| 6462 | return this.pushStack( ret );
|
| 6463 | };
|
| 6464 | } );
|
| 6465 | var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
|
| 6466 |
|
| 6467 | var rcustomProp = /^--/;
|
| 6468 |
|
| 6469 |
|
| 6470 | var getStyles = function( elem ) {
|
| 6471 |
|
| 6472 |
|
| 6473 |
|
| 6474 |
|
| 6475 | var view = elem.ownerDocument.defaultView;
|
| 6476 |
|
| 6477 | if ( !view || !view.opener ) {
|
| 6478 | view = window;
|
| 6479 | }
|
| 6480 |
|
| 6481 | return view.getComputedStyle( elem );
|
| 6482 | };
|
| 6483 |
|
| 6484 | var swap = function( elem, options, callback ) {
|
| 6485 | var ret, name,
|
| 6486 | old = {};
|
| 6487 |
|
| 6488 |
|
| 6489 | for ( name in options ) {
|
| 6490 | old[ name ] = elem.style[ name ];
|
| 6491 | elem.style[ name ] = options[ name ];
|
| 6492 | }
|
| 6493 |
|
| 6494 | ret = callback.call( elem );
|
| 6495 |
|
| 6496 |
|
| 6497 | for ( name in options ) {
|
| 6498 | elem.style[ name ] = old[ name ];
|
| 6499 | }
|
| 6500 |
|
| 6501 | return ret;
|
| 6502 | };
|
| 6503 |
|
| 6504 |
|
| 6505 | var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );
|
| 6506 |
|
| 6507 | var whitespace = "[\\x20\\t\\r\\n\\f]";
|
| 6508 |
|
| 6509 |
|
| 6510 | var rtrimCSS = new RegExp(
|
| 6511 | "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$",
|
| 6512 | "g"
|
| 6513 | );
|
| 6514 |
|
| 6515 |
|
| 6516 |
|
| 6517 |
|
| 6518 | ( function() {
|
| 6519 |
|
| 6520 |
|
| 6521 |
|
| 6522 | function computeStyleTests() {
|
| 6523 |
|
| 6524 |
|
| 6525 | if ( !div ) {
|
| 6526 | return;
|
| 6527 | }
|
| 6528 |
|
| 6529 | container.style.cssText = "position:absolute;left:-11111px;width:60px;" +
|
| 6530 | "margin-top:1px;padding:0;border:0";
|
| 6531 | div.style.cssText =
|
| 6532 | "position:relative;display:block;box-sizing:border-box;overflow:scroll;" +
|
| 6533 | "margin:auto;border:1px;padding:1px;" +
|
| 6534 | "width:60%;top:1%";
|
| 6535 | documentElement.appendChild( container ).appendChild( div );
|
| 6536 |
|
| 6537 | var divStyle = window.getComputedStyle( div );
|
| 6538 | pixelPositionVal = divStyle.top !== "1%";
|
| 6539 |
|
| 6540 |
|
| 6541 | reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;
|
| 6542 |
|
| 6543 |
|
| 6544 |
|
| 6545 | div.style.right = "60%";
|
| 6546 | pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;
|
| 6547 |
|
| 6548 |
|
| 6549 |
|
| 6550 | boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;
|
| 6551 |
|
| 6552 |
|
| 6553 |
|
| 6554 |
|
| 6555 |
|
| 6556 | div.style.position = "absolute";
|
| 6557 | scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;
|
| 6558 |
|
| 6559 | documentElement.removeChild( container );
|
| 6560 |
|
| 6561 |
|
| 6562 |
|
| 6563 | div = null;
|
| 6564 | }
|
| 6565 |
|
| 6566 | function roundPixelMeasures( measure ) {
|
| 6567 | return Math.round( parseFloat( measure ) );
|
| 6568 | }
|
| 6569 |
|
| 6570 | var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,
|
| 6571 | reliableTrDimensionsVal, reliableMarginLeftVal,
|
| 6572 | container = document.createElement( "div" ),
|
| 6573 | div = document.createElement( "div" );
|
| 6574 |
|
| 6575 |
|
| 6576 | if ( !div.style ) {
|
| 6577 | return;
|
| 6578 | }
|
| 6579 |
|
| 6580 |
|
| 6581 |
|
| 6582 | div.style.backgroundClip = "content-box";
|
| 6583 | div.cloneNode( true ).style.backgroundClip = "";
|
| 6584 | support.clearCloneStyle = div.style.backgroundClip === "content-box";
|
| 6585 |
|
| 6586 | jQuery.extend( support, {
|
| 6587 | boxSizingReliable: function() {
|
| 6588 | computeStyleTests();
|
| 6589 | return boxSizingReliableVal;
|
| 6590 | },
|
| 6591 | pixelBoxStyles: function() {
|
| 6592 | computeStyleTests();
|
| 6593 | return pixelBoxStylesVal;
|
| 6594 | },
|
| 6595 | pixelPosition: function() {
|
| 6596 | computeStyleTests();
|
| 6597 | return pixelPositionVal;
|
| 6598 | },
|
| 6599 | reliableMarginLeft: function() {
|
| 6600 | computeStyleTests();
|
| 6601 | return reliableMarginLeftVal;
|
| 6602 | },
|
| 6603 | scrollboxSize: function() {
|
| 6604 | computeStyleTests();
|
| 6605 | return scrollboxSizeVal;
|
| 6606 | },
|
| 6607 |
|
| 6608 |
|
| 6609 |
|
| 6610 |
|
| 6611 |
|
| 6612 |
|
| 6613 |
|
| 6614 |
|
| 6615 |
|
| 6616 |
|
| 6617 | reliableTrDimensions: function() {
|
| 6618 | var table, tr, trChild, trStyle;
|
| 6619 | if ( reliableTrDimensionsVal == null ) {
|
| 6620 | table = document.createElement( "table" );
|
| 6621 | tr = document.createElement( "tr" );
|
| 6622 | trChild = document.createElement( "div" );
|
| 6623 |
|
| 6624 | table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate";
|
| 6625 | tr.style.cssText = "border:1px solid";
|
| 6626 |
|
| 6627 |
|
| 6628 |
|
| 6629 |
|
| 6630 | tr.style.height = "1px";
|
| 6631 | trChild.style.height = "9px";
|
| 6632 |
|
| 6633 |
|
| 6634 |
|
| 6635 |
|
| 6636 |
|
| 6637 |
|
| 6638 |
|
| 6639 | trChild.style.display = "block";
|
| 6640 |
|
| 6641 | documentElement
|
| 6642 | .appendChild( table )
|
| 6643 | .appendChild( tr )
|
| 6644 | .appendChild( trChild );
|
| 6645 |
|
| 6646 | trStyle = window.getComputedStyle( tr );
|
| 6647 | reliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) +
|
| 6648 | parseInt( trStyle.borderTopWidth, 10 ) +
|
| 6649 | parseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight;
|
| 6650 |
|
| 6651 | documentElement.removeChild( table );
|
| 6652 | }
|
| 6653 | return reliableTrDimensionsVal;
|
| 6654 | }
|
| 6655 | } );
|
| 6656 | } )();
|
| 6657 |
|
| 6658 |
|
| 6659 | function curCSS( elem, name, computed ) {
|
| 6660 | var width, minWidth, maxWidth, ret,
|
| 6661 | isCustomProp = rcustomProp.test( name ),
|
| 6662 |
|
| 6663 |
|
| 6664 |
|
| 6665 |
|
| 6666 |
|
| 6667 | style = elem.style;
|
| 6668 |
|
| 6669 | computed = computed || getStyles( elem );
|
| 6670 |
|
| 6671 |
|
| 6672 |
|
| 6673 |
|
| 6674 | if ( computed ) {
|
| 6675 |
|
| 6676 |
|
| 6677 |
|
| 6678 |
|
| 6679 |
|
| 6680 |
|
| 6681 |
|
| 6682 |
|
| 6683 |
|
| 6684 |
|
| 6685 | ret = computed.getPropertyValue( name ) || computed[ name ];
|
| 6686 |
|
| 6687 | if ( isCustomProp && ret ) {
|
| 6688 |
|
| 6689 |
|
| 6690 |
|
| 6691 |
|
| 6692 |
|
| 6693 |
|
| 6694 |
|
| 6695 |
|
| 6696 |
|
| 6697 |
|
| 6698 |
|
| 6699 |
|
| 6700 |
|
| 6701 |
|
| 6702 |
|
| 6703 |
|
| 6704 |
|
| 6705 | ret = ret.replace( rtrimCSS, "$1" ) || undefined;
|
| 6706 | }
|
| 6707 |
|
| 6708 | if ( ret === "" && !isAttached( elem ) ) {
|
| 6709 | ret = jQuery.style( elem, name );
|
| 6710 | }
|
| 6711 |
|
| 6712 |
|
| 6713 |
|
| 6714 |
|
| 6715 |
|
| 6716 |
|
| 6717 | if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {
|
| 6718 |
|
| 6719 |
|
| 6720 | width = style.width;
|
| 6721 | minWidth = style.minWidth;
|
| 6722 | maxWidth = style.maxWidth;
|
| 6723 |
|
| 6724 |
|
| 6725 | style.minWidth = style.maxWidth = style.width = ret;
|
| 6726 | ret = computed.width;
|
| 6727 |
|
| 6728 |
|
| 6729 | style.width = width;
|
| 6730 | style.minWidth = minWidth;
|
| 6731 | style.maxWidth = maxWidth;
|
| 6732 | }
|
| 6733 | }
|
| 6734 |
|
| 6735 | return ret !== undefined ?
|
| 6736 |
|
| 6737 |
|
| 6738 |
|
| 6739 | ret + "" :
|
| 6740 | ret;
|
| 6741 | }
|
| 6742 |
|
| 6743 |
|
| 6744 | function addGetHookIf( conditionFn, hookFn ) {
|
| 6745 |
|
| 6746 |
|
| 6747 | return {
|
| 6748 | get: function() {
|
| 6749 | if ( conditionFn() ) {
|
| 6750 |
|
| 6751 |
|
| 6752 |
|
| 6753 | delete this.get;
|
| 6754 | return;
|
| 6755 | }
|
| 6756 |
|
| 6757 |
|
| 6758 | return ( this.get = hookFn ).apply( this, arguments );
|
| 6759 | }
|
| 6760 | };
|
| 6761 | }
|
| 6762 |
|
| 6763 |
|
| 6764 | var cssPrefixes = [ "Webkit", "Moz", "ms" ],
|
| 6765 | emptyStyle = document.createElement( "div" ).style,
|
| 6766 | vendorProps = {};
|
| 6767 |
|
| 6768 |
|
| 6769 | function vendorPropName( name ) {
|
| 6770 |
|
| 6771 |
|
| 6772 | var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
|
| 6773 | i = cssPrefixes.length;
|
| 6774 |
|
| 6775 | while ( i-- ) {
|
| 6776 | name = cssPrefixes[ i ] + capName;
|
| 6777 | if ( name in emptyStyle ) {
|
| 6778 | return name;
|
| 6779 | }
|
| 6780 | }
|
| 6781 | }
|
| 6782 |
|
| 6783 |
|
| 6784 | function finalPropName( name ) {
|
| 6785 | var final = jQuery.cssProps[ name ] || vendorProps[ name ];
|
| 6786 |
|
| 6787 | if ( final ) {
|
| 6788 | return final;
|
| 6789 | }
|
| 6790 | if ( name in emptyStyle ) {
|
| 6791 | return name;
|
| 6792 | }
|
| 6793 | return vendorProps[ name ] = vendorPropName( name ) || name;
|
| 6794 | }
|
| 6795 |
|
| 6796 |
|
| 6797 | var
|
| 6798 |
|
| 6799 |
|
| 6800 |
|
| 6801 |
|
| 6802 | rdisplayswap = /^(none|table(?!-c[ea]).+)/,
|
| 6803 | cssShow = { position: "absolute", visibility: "hidden", display: "block" },
|
| 6804 | cssNormalTransform = {
|
| 6805 | letterSpacing: "0",
|
| 6806 | fontWeight: "400"
|
| 6807 | };
|
| 6808 |
|
| 6809 | function setPositiveNumber( _elem, value, subtract ) {
|
| 6810 |
|
| 6811 |
|
| 6812 |
|
| 6813 | var matches = rcssNum.exec( value );
|
| 6814 | return matches ?
|
| 6815 |
|
| 6816 |
|
| 6817 | Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
|
| 6818 | value;
|
| 6819 | }
|
| 6820 |
|
| 6821 | function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
|
| 6822 | var i = dimension === "width" ? 1 : 0,
|
| 6823 | extra = 0,
|
| 6824 | delta = 0;
|
| 6825 |
|
| 6826 |
|
| 6827 | if ( box === ( isBorderBox ? "border" : "content" ) ) {
|
| 6828 | return 0;
|
| 6829 | }
|
| 6830 |
|
| 6831 | for ( ; i < 4; i += 2 ) {
|
| 6832 |
|
| 6833 |
|
| 6834 | if ( box === "margin" ) {
|
| 6835 | delta += jQuery.css( elem, box + cssExpand[ i ], true, styles );
|
| 6836 | }
|
| 6837 |
|
| 6838 |
|
| 6839 | if ( !isBorderBox ) {
|
| 6840 |
|
| 6841 |
|
| 6842 | delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
|
| 6843 |
|
| 6844 |
|
| 6845 | if ( box !== "padding" ) {
|
| 6846 | delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
|
| 6847 |
|
| 6848 |
|
| 6849 | } else {
|
| 6850 | extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
|
| 6851 | }
|
| 6852 |
|
| 6853 |
|
| 6854 |
|
| 6855 | } else {
|
| 6856 |
|
| 6857 |
|
| 6858 | if ( box === "content" ) {
|
| 6859 | delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
|
| 6860 | }
|
| 6861 |
|
| 6862 |
|
| 6863 | if ( box !== "margin" ) {
|
| 6864 | delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
|
| 6865 | }
|
| 6866 | }
|
| 6867 | }
|
| 6868 |
|
| 6869 |
|
| 6870 | if ( !isBorderBox && computedVal >= 0 ) {
|
| 6871 |
|
| 6872 |
|
| 6873 |
|
| 6874 | delta += Math.max( 0, Math.ceil(
|
| 6875 | elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
|
| 6876 | computedVal -
|
| 6877 | delta -
|
| 6878 | extra -
|
| 6879 | 0.5
|
| 6880 |
|
| 6881 |
|
| 6882 |
|
| 6883 | ) ) || 0;
|
| 6884 | }
|
| 6885 |
|
| 6886 | return delta;
|
| 6887 | }
|
| 6888 |
|
| 6889 | function getWidthOrHeight( elem, dimension, extra ) {
|
| 6890 |
|
| 6891 |
|
| 6892 | var styles = getStyles( elem ),
|
| 6893 |
|
| 6894 |
|
| 6895 |
|
| 6896 | boxSizingNeeded = !support.boxSizingReliable() || extra,
|
| 6897 | isBorderBox = boxSizingNeeded &&
|
| 6898 | jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
|
| 6899 | valueIsBorderBox = isBorderBox,
|
| 6900 |
|
| 6901 | val = curCSS( elem, dimension, styles ),
|
| 6902 | offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );
|
| 6903 |
|
| 6904 |
|
| 6905 |
|
| 6906 | if ( rnumnonpx.test( val ) ) {
|
| 6907 | if ( !extra ) {
|
| 6908 | return val;
|
| 6909 | }
|
| 6910 | val = "auto";
|
| 6911 | }
|
| 6912 |
|
| 6913 |
|
| 6914 |
|
| 6915 |
|
| 6916 |
|
| 6917 | if ( ( !support.boxSizingReliable() && isBorderBox ||
|
| 6918 |
|
| 6919 |
|
| 6920 |
|
| 6921 |
|
| 6922 |
|
| 6923 | !support.reliableTrDimensions() && nodeName( elem, "tr" ) ||
|
| 6924 |
|
| 6925 |
|
| 6926 |
|
| 6927 | val === "auto" ||
|
| 6928 |
|
| 6929 |
|
| 6930 |
|
| 6931 | !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) &&
|
| 6932 |
|
| 6933 |
|
| 6934 | elem.getClientRects().length ) {
|
| 6935 |
|
| 6936 | isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
|
| 6937 |
|
| 6938 |
|
| 6939 |
|
| 6940 |
|
| 6941 | valueIsBorderBox = offsetProp in elem;
|
| 6942 | if ( valueIsBorderBox ) {
|
| 6943 | val = elem[ offsetProp ];
|
| 6944 | }
|
| 6945 | }
|
| 6946 |
|
| 6947 |
|
| 6948 | val = parseFloat( val ) || 0;
|
| 6949 |
|
| 6950 |
|
| 6951 | return ( val +
|
| 6952 | boxModelAdjustment(
|
| 6953 | elem,
|
| 6954 | dimension,
|
| 6955 | extra || ( isBorderBox ? "border" : "content" ),
|
| 6956 | valueIsBorderBox,
|
| 6957 | styles,
|
| 6958 |
|
| 6959 |
|
| 6960 | val
|
| 6961 | )
|
| 6962 | ) + "px";
|
| 6963 | }
|
| 6964 |
|
| 6965 | jQuery.extend( {
|
| 6966 |
|
| 6967 |
|
| 6968 |
|
| 6969 | cssHooks: {
|
| 6970 | opacity: {
|
| 6971 | get: function( elem, computed ) {
|
| 6972 | if ( computed ) {
|
| 6973 |
|
| 6974 |
|
| 6975 | var ret = curCSS( elem, "opacity" );
|
| 6976 | return ret === "" ? "1" : ret;
|
| 6977 | }
|
| 6978 | }
|
| 6979 | }
|
| 6980 | },
|
| 6981 |
|
| 6982 |
|
| 6983 | cssNumber: {
|
| 6984 | "animationIterationCount": true,
|
| 6985 | "columnCount": true,
|
| 6986 | "fillOpacity": true,
|
| 6987 | "flexGrow": true,
|
| 6988 | "flexShrink": true,
|
| 6989 | "fontWeight": true,
|
| 6990 | "gridArea": true,
|
| 6991 | "gridColumn": true,
|
| 6992 | "gridColumnEnd": true,
|
| 6993 | "gridColumnStart": true,
|
| 6994 | "gridRow": true,
|
| 6995 | "gridRowEnd": true,
|
| 6996 | "gridRowStart": true,
|
| 6997 | "lineHeight": true,
|
| 6998 | "opacity": true,
|
| 6999 | "order": true,
|
| 7000 | "orphans": true,
|
| 7001 | "widows": true,
|
| 7002 | "zIndex": true,
|
| 7003 | "zoom": true
|
| 7004 | },
|
| 7005 |
|
| 7006 |
|
| 7007 |
|
| 7008 | cssProps: {},
|
| 7009 |
|
| 7010 |
|
| 7011 | style: function( elem, name, value, extra ) {
|
| 7012 |
|
| 7013 |
|
| 7014 | if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
|
| 7015 | return;
|
| 7016 | }
|
| 7017 |
|
| 7018 |
|
| 7019 | var ret, type, hooks,
|
| 7020 | origName = camelCase( name ),
|
| 7021 | isCustomProp = rcustomProp.test( name ),
|
| 7022 | style = elem.style;
|
| 7023 |
|
| 7024 |
|
| 7025 |
|
| 7026 |
|
| 7027 | if ( !isCustomProp ) {
|
| 7028 | name = finalPropName( origName );
|
| 7029 | }
|
| 7030 |
|
| 7031 |
|
| 7032 | hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
|
| 7033 |
|
| 7034 |
|
| 7035 | if ( value !== undefined ) {
|
| 7036 | type = typeof value;
|
| 7037 |
|
| 7038 |
|
| 7039 | if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
|
| 7040 | value = adjustCSS( elem, name, ret );
|
| 7041 |
|
| 7042 |
|
| 7043 | type = "number";
|
| 7044 | }
|
| 7045 |
|
| 7046 |
|
| 7047 | if ( value == null || value !== value ) {
|
| 7048 | return;
|
| 7049 | }
|
| 7050 |
|
| 7051 |
|
| 7052 |
|
| 7053 |
|
| 7054 | if ( type === "number" && !isCustomProp ) {
|
| 7055 | value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );
|
| 7056 | }
|
| 7057 |
|
| 7058 |
|
| 7059 | if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
|
| 7060 | style[ name ] = "inherit";
|
| 7061 | }
|
| 7062 |
|
| 7063 |
|
| 7064 | if ( !hooks || !( "set" in hooks ) ||
|
| 7065 | ( value = hooks.set( elem, value, extra ) ) !== undefined ) {
|
| 7066 |
|
| 7067 | if ( isCustomProp ) {
|
| 7068 | style.setProperty( name, value );
|
| 7069 | } else {
|
| 7070 | style[ name ] = value;
|
| 7071 | }
|
| 7072 | }
|
| 7073 |
|
| 7074 | } else {
|
| 7075 |
|
| 7076 |
|
| 7077 | if ( hooks && "get" in hooks &&
|
| 7078 | ( ret = hooks.get( elem, false, extra ) ) !== undefined ) {
|
| 7079 |
|
| 7080 | return ret;
|
| 7081 | }
|
| 7082 |
|
| 7083 |
|
| 7084 | return style[ name ];
|
| 7085 | }
|
| 7086 | },
|
| 7087 |
|
| 7088 | css: function( elem, name, extra, styles ) {
|
| 7089 | var val, num, hooks,
|
| 7090 | origName = camelCase( name ),
|
| 7091 | isCustomProp = rcustomProp.test( name );
|
| 7092 |
|
| 7093 |
|
| 7094 |
|
| 7095 |
|
| 7096 | if ( !isCustomProp ) {
|
| 7097 | name = finalPropName( origName );
|
| 7098 | }
|
| 7099 |
|
| 7100 |
|
| 7101 | hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
|
| 7102 |
|
| 7103 |
|
| 7104 | if ( hooks && "get" in hooks ) {
|
| 7105 | val = hooks.get( elem, true, extra );
|
| 7106 | }
|
| 7107 |
|
| 7108 |
|
| 7109 | if ( val === undefined ) {
|
| 7110 | val = curCSS( elem, name, styles );
|
| 7111 | }
|
| 7112 |
|
| 7113 |
|
| 7114 | if ( val === "normal" && name in cssNormalTransform ) {
|
| 7115 | val = cssNormalTransform[ name ];
|
| 7116 | }
|
| 7117 |
|
| 7118 |
|
| 7119 | if ( extra === "" || extra ) {
|
| 7120 | num = parseFloat( val );
|
| 7121 | return extra === true || isFinite( num ) ? num || 0 : val;
|
| 7122 | }
|
| 7123 |
|
| 7124 | return val;
|
| 7125 | }
|
| 7126 | } );
|
| 7127 |
|
| 7128 | jQuery.each( [ "height", "width" ], function( _i, dimension ) {
|
| 7129 | jQuery.cssHooks[ dimension ] = {
|
| 7130 | get: function( elem, computed, extra ) {
|
| 7131 | if ( computed ) {
|
| 7132 |
|
| 7133 |
|
| 7134 |
|
| 7135 | return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&
|
| 7136 |
|
| 7137 |
|
| 7138 |
|
| 7139 |
|
| 7140 |
|
| 7141 |
|
| 7142 |
|
| 7143 | ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?
|
| 7144 | swap( elem, cssShow, function() {
|
| 7145 | return getWidthOrHeight( elem, dimension, extra );
|
| 7146 | } ) :
|
| 7147 | getWidthOrHeight( elem, dimension, extra );
|
| 7148 | }
|
| 7149 | },
|
| 7150 |
|
| 7151 | set: function( elem, value, extra ) {
|
| 7152 | var matches,
|
| 7153 | styles = getStyles( elem ),
|
| 7154 |
|
| 7155 |
|
| 7156 |
|
| 7157 | scrollboxSizeBuggy = !support.scrollboxSize() &&
|
| 7158 | styles.position === "absolute",
|
| 7159 |
|
| 7160 |
|
| 7161 | boxSizingNeeded = scrollboxSizeBuggy || extra,
|
| 7162 | isBorderBox = boxSizingNeeded &&
|
| 7163 | jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
|
| 7164 | subtract = extra ?
|
| 7165 | boxModelAdjustment(
|
| 7166 | elem,
|
| 7167 | dimension,
|
| 7168 | extra,
|
| 7169 | isBorderBox,
|
| 7170 | styles
|
| 7171 | ) :
|
| 7172 | 0;
|
| 7173 |
|
| 7174 |
|
| 7175 |
|
| 7176 | if ( isBorderBox && scrollboxSizeBuggy ) {
|
| 7177 | subtract -= Math.ceil(
|
| 7178 | elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
|
| 7179 | parseFloat( styles[ dimension ] ) -
|
| 7180 | boxModelAdjustment( elem, dimension, "border", false, styles ) -
|
| 7181 | 0.5
|
| 7182 | );
|
| 7183 | }
|
| 7184 |
|
| 7185 |
|
| 7186 | if ( subtract && ( matches = rcssNum.exec( value ) ) &&
|
| 7187 | ( matches[ 3 ] || "px" ) !== "px" ) {
|
| 7188 |
|
| 7189 | elem.style[ dimension ] = value;
|
| 7190 | value = jQuery.css( elem, dimension );
|
| 7191 | }
|
| 7192 |
|
| 7193 | return setPositiveNumber( elem, value, subtract );
|
| 7194 | }
|
| 7195 | };
|
| 7196 | } );
|
| 7197 |
|
| 7198 | jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
|
| 7199 | function( elem, computed ) {
|
| 7200 | if ( computed ) {
|
| 7201 | return ( parseFloat( curCSS( elem, "marginLeft" ) ) ||
|
| 7202 | elem.getBoundingClientRect().left -
|
| 7203 | swap( elem, { marginLeft: 0 }, function() {
|
| 7204 | return elem.getBoundingClientRect().left;
|
| 7205 | } )
|
| 7206 | ) + "px";
|
| 7207 | }
|
| 7208 | }
|
| 7209 | );
|
| 7210 |
|
| 7211 |
|
| 7212 | jQuery.each( {
|
| 7213 | margin: "",
|
| 7214 | padding: "",
|
| 7215 | border: "Width"
|
| 7216 | }, function( prefix, suffix ) {
|
| 7217 | jQuery.cssHooks[ prefix + suffix ] = {
|
| 7218 | expand: function( value ) {
|
| 7219 | var i = 0,
|
| 7220 | expanded = {},
|
| 7221 |
|
| 7222 |
|
| 7223 | parts = typeof value === "string" ? value.split( " " ) : [ value ];
|
| 7224 |
|
| 7225 | for ( ; i < 4; i++ ) {
|
| 7226 | expanded[ prefix + cssExpand[ i ] + suffix ] =
|
| 7227 | parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
|
| 7228 | }
|
| 7229 |
|
| 7230 | return expanded;
|
| 7231 | }
|
| 7232 | };
|
| 7233 |
|
| 7234 | if ( prefix !== "margin" ) {
|
| 7235 | jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
|
| 7236 | }
|
| 7237 | } );
|
| 7238 |
|
| 7239 | jQuery.fn.extend( {
|
| 7240 | css: function( name, value ) {
|
| 7241 | return access( this, function( elem, name, value ) {
|
| 7242 | var styles, len,
|
| 7243 | map = {},
|
| 7244 | i = 0;
|
| 7245 |
|
| 7246 | if ( Array.isArray( name ) ) {
|
| 7247 | styles = getStyles( elem );
|
| 7248 | len = name.length;
|
| 7249 |
|
| 7250 | for ( ; i < len; i++ ) {
|
| 7251 | map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
|
| 7252 | }
|
| 7253 |
|
| 7254 | return map;
|
| 7255 | }
|
| 7256 |
|
| 7257 | return value !== undefined ?
|
| 7258 | jQuery.style( elem, name, value ) :
|
| 7259 | jQuery.css( elem, name );
|
| 7260 | }, name, value, arguments.length > 1 );
|
| 7261 | }
|
| 7262 | } );
|
| 7263 |
|
| 7264 |
|
| 7265 | function Tween( elem, options, prop, end, easing ) {
|
| 7266 | return new Tween.prototype.init( elem, options, prop, end, easing );
|
| 7267 | }
|
| 7268 | jQuery.Tween = Tween;
|
| 7269 |
|
| 7270 | Tween.prototype = {
|
| 7271 | constructor: Tween,
|
| 7272 | init: function( elem, options, prop, end, easing, unit ) {
|
| 7273 | this.elem = elem;
|
| 7274 | this.prop = prop;
|
| 7275 | this.easing = easing || jQuery.easing._default;
|
| 7276 | this.options = options;
|
| 7277 | this.start = this.now = this.cur();
|
| 7278 | this.end = end;
|
| 7279 | this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
|
| 7280 | },
|
| 7281 | cur: function() {
|
| 7282 | var hooks = Tween.propHooks[ this.prop ];
|
| 7283 |
|
| 7284 | return hooks && hooks.get ?
|
| 7285 | hooks.get( this ) :
|
| 7286 | Tween.propHooks._default.get( this );
|
| 7287 | },
|
| 7288 | run: function( percent ) {
|
| 7289 | var eased,
|
| 7290 | hooks = Tween.propHooks[ this.prop ];
|
| 7291 |
|
| 7292 | if ( this.options.duration ) {
|
| 7293 | this.pos = eased = jQuery.easing[ this.easing ](
|
| 7294 | percent, this.options.duration * percent, 0, 1, this.options.duration
|
| 7295 | );
|
| 7296 | } else {
|
| 7297 | this.pos = eased = percent;
|
| 7298 | }
|
| 7299 | this.now = ( this.end - this.start ) * eased + this.start;
|
| 7300 |
|
| 7301 | if ( this.options.step ) {
|
| 7302 | this.options.step.call( this.elem, this.now, this );
|
| 7303 | }
|
| 7304 |
|
| 7305 | if ( hooks && hooks.set ) {
|
| 7306 | hooks.set( this );
|
| 7307 | } else {
|
| 7308 | Tween.propHooks._default.set( this );
|
| 7309 | }
|
| 7310 | return this;
|
| 7311 | }
|
| 7312 | };
|
| 7313 |
|
| 7314 | Tween.prototype.init.prototype = Tween.prototype;
|
| 7315 |
|
| 7316 | Tween.propHooks = {
|
| 7317 | _default: {
|
| 7318 | get: function( tween ) {
|
| 7319 | var result;
|
| 7320 |
|
| 7321 |
|
| 7322 |
|
| 7323 | if ( tween.elem.nodeType !== 1 ||
|
| 7324 | tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {
|
| 7325 | return tween.elem[ tween.prop ];
|
| 7326 | }
|
| 7327 |
|
| 7328 |
|
| 7329 |
|
| 7330 |
|
| 7331 |
|
| 7332 | result = jQuery.css( tween.elem, tween.prop, "" );
|
| 7333 |
|
| 7334 |
|
| 7335 | return !result || result === "auto" ? 0 : result;
|
| 7336 | },
|
| 7337 | set: function( tween ) {
|
| 7338 |
|
| 7339 |
|
| 7340 |
|
| 7341 |
|
| 7342 | if ( jQuery.fx.step[ tween.prop ] ) {
|
| 7343 | jQuery.fx.step[ tween.prop ]( tween );
|
| 7344 | } else if ( tween.elem.nodeType === 1 && (
|
| 7345 | jQuery.cssHooks[ tween.prop ] ||
|
| 7346 | tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {
|
| 7347 | jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
|
| 7348 | } else {
|
| 7349 | tween.elem[ tween.prop ] = tween.now;
|
| 7350 | }
|
| 7351 | }
|
| 7352 | }
|
| 7353 | };
|
| 7354 |
|
| 7355 |
|
| 7356 |
|
| 7357 | Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
|
| 7358 | set: function( tween ) {
|
| 7359 | if ( tween.elem.nodeType && tween.elem.parentNode ) {
|
| 7360 | tween.elem[ tween.prop ] = tween.now;
|
| 7361 | }
|
| 7362 | }
|
| 7363 | };
|
| 7364 |
|
| 7365 | jQuery.easing = {
|
| 7366 | linear: function( p ) {
|
| 7367 | return p;
|
| 7368 | },
|
| 7369 | swing: function( p ) {
|
| 7370 | return 0.5 - Math.cos( p * Math.PI ) / 2;
|
| 7371 | },
|
| 7372 | _default: "swing"
|
| 7373 | };
|
| 7374 |
|
| 7375 | jQuery.fx = Tween.prototype.init;
|
| 7376 |
|
| 7377 |
|
| 7378 | jQuery.fx.step = {};
|
| 7379 |
|
| 7380 |
|
| 7381 |
|
| 7382 |
|
| 7383 | var
|
| 7384 | fxNow, inProgress,
|
| 7385 | rfxtypes = /^(?:toggle|show|hide)$/,
|
| 7386 | rrun = /queueHooks$/;
|
| 7387 |
|
| 7388 | function schedule() {
|
| 7389 | if ( inProgress ) {
|
| 7390 | if ( document.hidden === false && window.requestAnimationFrame ) {
|
| 7391 | window.requestAnimationFrame( schedule );
|
| 7392 | } else {
|
| 7393 | window.setTimeout( schedule, jQuery.fx.interval );
|
| 7394 | }
|
| 7395 |
|
| 7396 | jQuery.fx.tick();
|
| 7397 | }
|
| 7398 | }
|
| 7399 |
|
| 7400 |
|
| 7401 | function createFxNow() {
|
| 7402 | window.setTimeout( function() {
|
| 7403 | fxNow = undefined;
|
| 7404 | } );
|
| 7405 | return ( fxNow = Date.now() );
|
| 7406 | }
|
| 7407 |
|
| 7408 |
|
| 7409 | function genFx( type, includeWidth ) {
|
| 7410 | var which,
|
| 7411 | i = 0,
|
| 7412 | attrs = { height: type };
|
| 7413 |
|
| 7414 |
|
| 7415 |
|
| 7416 | includeWidth = includeWidth ? 1 : 0;
|
| 7417 | for ( ; i < 4; i += 2 - includeWidth ) {
|
| 7418 | which = cssExpand[ i ];
|
| 7419 | attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
|
| 7420 | }
|
| 7421 |
|
| 7422 | if ( includeWidth ) {
|
| 7423 | attrs.opacity = attrs.width = type;
|
| 7424 | }
|
| 7425 |
|
| 7426 | return attrs;
|
| 7427 | }
|
| 7428 |
|
| 7429 | function createTween( value, prop, animation ) {
|
| 7430 | var tween,
|
| 7431 | collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ),
|
| 7432 | index = 0,
|
| 7433 | length = collection.length;
|
| 7434 | for ( ; index < length; index++ ) {
|
| 7435 | if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {
|
| 7436 |
|
| 7437 |
|
| 7438 | return tween;
|
| 7439 | }
|
| 7440 | }
|
| 7441 | }
|
| 7442 |
|
| 7443 | function defaultPrefilter( elem, props, opts ) {
|
| 7444 | var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
|
| 7445 | isBox = "width" in props || "height" in props,
|
| 7446 | anim = this,
|
| 7447 | orig = {},
|
| 7448 | style = elem.style,
|
| 7449 | hidden = elem.nodeType && isHiddenWithinTree( elem ),
|
| 7450 | dataShow = dataPriv.get( elem, "fxshow" );
|
| 7451 |
|
| 7452 |
|
| 7453 | if ( !opts.queue ) {
|
| 7454 | hooks = jQuery._queueHooks( elem, "fx" );
|
| 7455 | if ( hooks.unqueued == null ) {
|
| 7456 | hooks.unqueued = 0;
|
| 7457 | oldfire = hooks.empty.fire;
|
| 7458 | hooks.empty.fire = function() {
|
| 7459 | if ( !hooks.unqueued ) {
|
| 7460 | oldfire();
|
| 7461 | }
|
| 7462 | };
|
| 7463 | }
|
| 7464 | hooks.unqueued++;
|
| 7465 |
|
| 7466 | anim.always( function() {
|
| 7467 |
|
| 7468 |
|
| 7469 | anim.always( function() {
|
| 7470 | hooks.unqueued--;
|
| 7471 | if ( !jQuery.queue( elem, "fx" ).length ) {
|
| 7472 | hooks.empty.fire();
|
| 7473 | }
|
| 7474 | } );
|
| 7475 | } );
|
| 7476 | }
|
| 7477 |
|
| 7478 |
|
| 7479 | for ( prop in props ) {
|
| 7480 | value = props[ prop ];
|
| 7481 | if ( rfxtypes.test( value ) ) {
|
| 7482 | delete props[ prop ];
|
| 7483 | toggle = toggle || value === "toggle";
|
| 7484 | if ( value === ( hidden ? "hide" : "show" ) ) {
|
| 7485 |
|
| 7486 |
|
| 7487 |
|
| 7488 | if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
|
| 7489 | hidden = true;
|
| 7490 |
|
| 7491 |
|
| 7492 | } else {
|
| 7493 | continue;
|
| 7494 | }
|
| 7495 | }
|
| 7496 | orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
|
| 7497 | }
|
| 7498 | }
|
| 7499 |
|
| 7500 |
|
| 7501 | propTween = !jQuery.isEmptyObject( props );
|
| 7502 | if ( !propTween && jQuery.isEmptyObject( orig ) ) {
|
| 7503 | return;
|
| 7504 | }
|
| 7505 |
|
| 7506 |
|
| 7507 | if ( isBox && elem.nodeType === 1 ) {
|
| 7508 |
|
| 7509 |
|
| 7510 |
|
| 7511 |
|
| 7512 |
|
| 7513 | opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
|
| 7514 |
|
| 7515 |
|
| 7516 | restoreDisplay = dataShow && dataShow.display;
|
| 7517 | if ( restoreDisplay == null ) {
|
| 7518 | restoreDisplay = dataPriv.get( elem, "display" );
|
| 7519 | }
|
| 7520 | display = jQuery.css( elem, "display" );
|
| 7521 | if ( display === "none" ) {
|
| 7522 | if ( restoreDisplay ) {
|
| 7523 | display = restoreDisplay;
|
| 7524 | } else {
|
| 7525 |
|
| 7526 |
|
| 7527 | showHide( [ elem ], true );
|
| 7528 | restoreDisplay = elem.style.display || restoreDisplay;
|
| 7529 | display = jQuery.css( elem, "display" );
|
| 7530 | showHide( [ elem ] );
|
| 7531 | }
|
| 7532 | }
|
| 7533 |
|
| 7534 |
|
| 7535 | if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) {
|
| 7536 | if ( jQuery.css( elem, "float" ) === "none" ) {
|
| 7537 |
|
| 7538 |
|
| 7539 | if ( !propTween ) {
|
| 7540 | anim.done( function() {
|
| 7541 | style.display = restoreDisplay;
|
| 7542 | } );
|
| 7543 | if ( restoreDisplay == null ) {
|
| 7544 | display = style.display;
|
| 7545 | restoreDisplay = display === "none" ? "" : display;
|
| 7546 | }
|
| 7547 | }
|
| 7548 | style.display = "inline-block";
|
| 7549 | }
|
| 7550 | }
|
| 7551 | }
|
| 7552 |
|
| 7553 | if ( opts.overflow ) {
|
| 7554 | style.overflow = "hidden";
|
| 7555 | anim.always( function() {
|
| 7556 | style.overflow = opts.overflow[ 0 ];
|
| 7557 | style.overflowX = opts.overflow[ 1 ];
|
| 7558 | style.overflowY = opts.overflow[ 2 ];
|
| 7559 | } );
|
| 7560 | }
|
| 7561 |
|
| 7562 |
|
| 7563 | propTween = false;
|
| 7564 | for ( prop in orig ) {
|
| 7565 |
|
| 7566 |
|
| 7567 | if ( !propTween ) {
|
| 7568 | if ( dataShow ) {
|
| 7569 | if ( "hidden" in dataShow ) {
|
| 7570 | hidden = dataShow.hidden;
|
| 7571 | }
|
| 7572 | } else {
|
| 7573 | dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } );
|
| 7574 | }
|
| 7575 |
|
| 7576 |
|
| 7577 | if ( toggle ) {
|
| 7578 | dataShow.hidden = !hidden;
|
| 7579 | }
|
| 7580 |
|
| 7581 |
|
| 7582 | if ( hidden ) {
|
| 7583 | showHide( [ elem ], true );
|
| 7584 | }
|
| 7585 |
|
| 7586 |
|
| 7587 |
|
| 7588 | anim.done( function() {
|
| 7589 |
|
| 7590 |
|
| 7591 |
|
| 7592 |
|
| 7593 | if ( !hidden ) {
|
| 7594 | showHide( [ elem ] );
|
| 7595 | }
|
| 7596 | dataPriv.remove( elem, "fxshow" );
|
| 7597 | for ( prop in orig ) {
|
| 7598 | jQuery.style( elem, prop, orig[ prop ] );
|
| 7599 | }
|
| 7600 | } );
|
| 7601 | }
|
| 7602 |
|
| 7603 |
|
| 7604 | propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
|
| 7605 | if ( !( prop in dataShow ) ) {
|
| 7606 | dataShow[ prop ] = propTween.start;
|
| 7607 | if ( hidden ) {
|
| 7608 | propTween.end = propTween.start;
|
| 7609 | propTween.start = 0;
|
| 7610 | }
|
| 7611 | }
|
| 7612 | }
|
| 7613 | }
|
| 7614 |
|
| 7615 | function propFilter( props, specialEasing ) {
|
| 7616 | var index, name, easing, value, hooks;
|
| 7617 |
|
| 7618 |
|
| 7619 | for ( index in props ) {
|
| 7620 | name = camelCase( index );
|
| 7621 | easing = specialEasing[ name ];
|
| 7622 | value = props[ index ];
|
| 7623 | if ( Array.isArray( value ) ) {
|
| 7624 | easing = value[ 1 ];
|
| 7625 | value = props[ index ] = value[ 0 ];
|
| 7626 | }
|
| 7627 |
|
| 7628 | if ( index !== name ) {
|
| 7629 | props[ name ] = value;
|
| 7630 | delete props[ index ];
|
| 7631 | }
|
| 7632 |
|
| 7633 | hooks = jQuery.cssHooks[ name ];
|
| 7634 | if ( hooks && "expand" in hooks ) {
|
| 7635 | value = hooks.expand( value );
|
| 7636 | delete props[ name ];
|
| 7637 |
|
| 7638 |
|
| 7639 |
|
| 7640 | for ( index in value ) {
|
| 7641 | if ( !( index in props ) ) {
|
| 7642 | props[ index ] = value[ index ];
|
| 7643 | specialEasing[ index ] = easing;
|
| 7644 | }
|
| 7645 | }
|
| 7646 | } else {
|
| 7647 | specialEasing[ name ] = easing;
|
| 7648 | }
|
| 7649 | }
|
| 7650 | }
|
| 7651 |
|
| 7652 | function Animation( elem, properties, options ) {
|
| 7653 | var result,
|
| 7654 | stopped,
|
| 7655 | index = 0,
|
| 7656 | length = Animation.prefilters.length,
|
| 7657 | deferred = jQuery.Deferred().always( function() {
|
| 7658 |
|
| 7659 |
|
| 7660 | delete tick.elem;
|
| 7661 | } ),
|
| 7662 | tick = function() {
|
| 7663 | if ( stopped ) {
|
| 7664 | return false;
|
| 7665 | }
|
| 7666 | var currentTime = fxNow || createFxNow(),
|
| 7667 | remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
|
| 7668 |
|
| 7669 |
|
| 7670 |
|
| 7671 | temp = remaining / animation.duration || 0,
|
| 7672 | percent = 1 - temp,
|
| 7673 | index = 0,
|
| 7674 | length = animation.tweens.length;
|
| 7675 |
|
| 7676 | for ( ; index < length; index++ ) {
|
| 7677 | animation.tweens[ index ].run( percent );
|
| 7678 | }
|
| 7679 |
|
| 7680 | deferred.notifyWith( elem, [ animation, percent, remaining ] );
|
| 7681 |
|
| 7682 |
|
| 7683 | if ( percent < 1 && length ) {
|
| 7684 | return remaining;
|
| 7685 | }
|
| 7686 |
|
| 7687 |
|
| 7688 | if ( !length ) {
|
| 7689 | deferred.notifyWith( elem, [ animation, 1, 0 ] );
|
| 7690 | }
|
| 7691 |
|
| 7692 |
|
| 7693 | deferred.resolveWith( elem, [ animation ] );
|
| 7694 | return false;
|
| 7695 | },
|
| 7696 | animation = deferred.promise( {
|
| 7697 | elem: elem,
|
| 7698 | props: jQuery.extend( {}, properties ),
|
| 7699 | opts: jQuery.extend( true, {
|
| 7700 | specialEasing: {},
|
| 7701 | easing: jQuery.easing._default
|
| 7702 | }, options ),
|
| 7703 | originalProperties: properties,
|
| 7704 | originalOptions: options,
|
| 7705 | startTime: fxNow || createFxNow(),
|
| 7706 | duration: options.duration,
|
| 7707 | tweens: [],
|
| 7708 | createTween: function( prop, end ) {
|
| 7709 | var tween = jQuery.Tween( elem, animation.opts, prop, end,
|
| 7710 | animation.opts.specialEasing[ prop ] || animation.opts.easing );
|
| 7711 | animation.tweens.push( tween );
|
| 7712 | return tween;
|
| 7713 | },
|
| 7714 | stop: function( gotoEnd ) {
|
| 7715 | var index = 0,
|
| 7716 |
|
| 7717 |
|
| 7718 |
|
| 7719 | length = gotoEnd ? animation.tweens.length : 0;
|
| 7720 | if ( stopped ) {
|
| 7721 | return this;
|
| 7722 | }
|
| 7723 | stopped = true;
|
| 7724 | for ( ; index < length; index++ ) {
|
| 7725 | animation.tweens[ index ].run( 1 );
|
| 7726 | }
|
| 7727 |
|
| 7728 |
|
| 7729 | if ( gotoEnd ) {
|
| 7730 | deferred.notifyWith( elem, [ animation, 1, 0 ] );
|
| 7731 | deferred.resolveWith( elem, [ animation, gotoEnd ] );
|
| 7732 | } else {
|
| 7733 | deferred.rejectWith( elem, [ animation, gotoEnd ] );
|
| 7734 | }
|
| 7735 | return this;
|
| 7736 | }
|
| 7737 | } ),
|
| 7738 | props = animation.props;
|
| 7739 |
|
| 7740 | propFilter( props, animation.opts.specialEasing );
|
| 7741 |
|
| 7742 | for ( ; index < length; index++ ) {
|
| 7743 | result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );
|
| 7744 | if ( result ) {
|
| 7745 | if ( isFunction( result.stop ) ) {
|
| 7746 | jQuery._queueHooks( animation.elem, animation.opts.queue ).stop =
|
| 7747 | result.stop.bind( result );
|
| 7748 | }
|
| 7749 | return result;
|
| 7750 | }
|
| 7751 | }
|
| 7752 |
|
| 7753 | jQuery.map( props, createTween, animation );
|
| 7754 |
|
| 7755 | if ( isFunction( animation.opts.start ) ) {
|
| 7756 | animation.opts.start.call( elem, animation );
|
| 7757 | }
|
| 7758 |
|
| 7759 |
|
| 7760 | animation
|
| 7761 | .progress( animation.opts.progress )
|
| 7762 | .done( animation.opts.done, animation.opts.complete )
|
| 7763 | .fail( animation.opts.fail )
|
| 7764 | .always( animation.opts.always );
|
| 7765 |
|
| 7766 | jQuery.fx.timer(
|
| 7767 | jQuery.extend( tick, {
|
| 7768 | elem: elem,
|
| 7769 | anim: animation,
|
| 7770 | queue: animation.opts.queue
|
| 7771 | } )
|
| 7772 | );
|
| 7773 |
|
| 7774 | return animation;
|
| 7775 | }
|
| 7776 |
|
| 7777 | jQuery.Animation = jQuery.extend( Animation, {
|
| 7778 |
|
| 7779 | tweeners: {
|
| 7780 | "*": [ function( prop, value ) {
|
| 7781 | var tween = this.createTween( prop, value );
|
| 7782 | adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );
|
| 7783 | return tween;
|
| 7784 | } ]
|
| 7785 | },
|
| 7786 |
|
| 7787 | tweener: function( props, callback ) {
|
| 7788 | if ( isFunction( props ) ) {
|
| 7789 | callback = props;
|
| 7790 | props = [ "*" ];
|
| 7791 | } else {
|
| 7792 | props = props.match( rnothtmlwhite );
|
| 7793 | }
|
| 7794 |
|
| 7795 | var prop,
|
| 7796 | index = 0,
|
| 7797 | length = props.length;
|
| 7798 |
|
| 7799 | for ( ; index < length; index++ ) {
|
| 7800 | prop = props[ index ];
|
| 7801 | Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];
|
| 7802 | Animation.tweeners[ prop ].unshift( callback );
|
| 7803 | }
|
| 7804 | },
|
| 7805 |
|
| 7806 | prefilters: [ defaultPrefilter ],
|
| 7807 |
|
| 7808 | prefilter: function( callback, prepend ) {
|
| 7809 | if ( prepend ) {
|
| 7810 | Animation.prefilters.unshift( callback );
|
| 7811 | } else {
|
| 7812 | Animation.prefilters.push( callback );
|
| 7813 | }
|
| 7814 | }
|
| 7815 | } );
|
| 7816 |
|
| 7817 | jQuery.speed = function( speed, easing, fn ) {
|
| 7818 | var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
|
| 7819 | complete: fn || !fn && easing ||
|
| 7820 | isFunction( speed ) && speed,
|
| 7821 | duration: speed,
|
| 7822 | easing: fn && easing || easing && !isFunction( easing ) && easing
|
| 7823 | };
|
| 7824 |
|
| 7825 |
|
| 7826 | if ( jQuery.fx.off ) {
|
| 7827 | opt.duration = 0;
|
| 7828 |
|
| 7829 | } else {
|
| 7830 | if ( typeof opt.duration !== "number" ) {
|
| 7831 | if ( opt.duration in jQuery.fx.speeds ) {
|
| 7832 | opt.duration = jQuery.fx.speeds[ opt.duration ];
|
| 7833 |
|
| 7834 | } else {
|
| 7835 | opt.duration = jQuery.fx.speeds._default;
|
| 7836 | }
|
| 7837 | }
|
| 7838 | }
|
| 7839 |
|
| 7840 |
|
| 7841 | if ( opt.queue == null || opt.queue === true ) {
|
| 7842 | opt.queue = "fx";
|
| 7843 | }
|
| 7844 |
|
| 7845 |
|
| 7846 | opt.old = opt.complete;
|
| 7847 |
|
| 7848 | opt.complete = function() {
|
| 7849 | if ( isFunction( opt.old ) ) {
|
| 7850 | opt.old.call( this );
|
| 7851 | }
|
| 7852 |
|
| 7853 | if ( opt.queue ) {
|
| 7854 | jQuery.dequeue( this, opt.queue );
|
| 7855 | }
|
| 7856 | };
|
| 7857 |
|
| 7858 | return opt;
|
| 7859 | };
|
| 7860 |
|
| 7861 | jQuery.fn.extend( {
|
| 7862 | fadeTo: function( speed, to, easing, callback ) {
|
| 7863 |
|
| 7864 |
|
| 7865 | return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show()
|
| 7866 |
|
| 7867 |
|
| 7868 | .end().animate( { opacity: to }, speed, easing, callback );
|
| 7869 | },
|
| 7870 | animate: function( prop, speed, easing, callback ) {
|
| 7871 | var empty = jQuery.isEmptyObject( prop ),
|
| 7872 | optall = jQuery.speed( speed, easing, callback ),
|
| 7873 | doAnimation = function() {
|
| 7874 |
|
| 7875 |
|
| 7876 | var anim = Animation( this, jQuery.extend( {}, prop ), optall );
|
| 7877 |
|
| 7878 |
|
| 7879 | if ( empty || dataPriv.get( this, "finish" ) ) {
|
| 7880 | anim.stop( true );
|
| 7881 | }
|
| 7882 | };
|
| 7883 |
|
| 7884 | doAnimation.finish = doAnimation;
|
| 7885 |
|
| 7886 | return empty || optall.queue === false ?
|
| 7887 | this.each( doAnimation ) :
|
| 7888 | this.queue( optall.queue, doAnimation );
|
| 7889 | },
|
| 7890 | stop: function( type, clearQueue, gotoEnd ) {
|
| 7891 | var stopQueue = function( hooks ) {
|
| 7892 | var stop = hooks.stop;
|
| 7893 | delete hooks.stop;
|
| 7894 | stop( gotoEnd );
|
| 7895 | };
|
| 7896 |
|
| 7897 | if ( typeof type !== "string" ) {
|
| 7898 | gotoEnd = clearQueue;
|
| 7899 | clearQueue = type;
|
| 7900 | type = undefined;
|
| 7901 | }
|
| 7902 | if ( clearQueue ) {
|
| 7903 | this.queue( type || "fx", [] );
|
| 7904 | }
|
| 7905 |
|
| 7906 | return this.each( function() {
|
| 7907 | var dequeue = true,
|
| 7908 | index = type != null && type + "queueHooks",
|
| 7909 | timers = jQuery.timers,
|
| 7910 | data = dataPriv.get( this );
|
| 7911 |
|
| 7912 | if ( index ) {
|
| 7913 | if ( data[ index ] && data[ index ].stop ) {
|
| 7914 | stopQueue( data[ index ] );
|
| 7915 | }
|
| 7916 | } else {
|
| 7917 | for ( index in data ) {
|
| 7918 | if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
|
| 7919 | stopQueue( data[ index ] );
|
| 7920 | }
|
| 7921 | }
|
| 7922 | }
|
| 7923 |
|
| 7924 | for ( index = timers.length; index--; ) {
|
| 7925 | if ( timers[ index ].elem === this &&
|
| 7926 | ( type == null || timers[ index ].queue === type ) ) {
|
| 7927 |
|
| 7928 | timers[ index ].anim.stop( gotoEnd );
|
| 7929 | dequeue = false;
|
| 7930 | timers.splice( index, 1 );
|
| 7931 | }
|
| 7932 | }
|
| 7933 |
|
| 7934 |
|
| 7935 |
|
| 7936 |
|
| 7937 | if ( dequeue || !gotoEnd ) {
|
| 7938 | jQuery.dequeue( this, type );
|
| 7939 | }
|
| 7940 | } );
|
| 7941 | },
|
| 7942 | finish: function( type ) {
|
| 7943 | if ( type !== false ) {
|
| 7944 | type = type || "fx";
|
| 7945 | }
|
| 7946 | return this.each( function() {
|
| 7947 | var index,
|
| 7948 | data = dataPriv.get( this ),
|
| 7949 | queue = data[ type + "queue" ],
|
| 7950 | hooks = data[ type + "queueHooks" ],
|
| 7951 | timers = jQuery.timers,
|
| 7952 | length = queue ? queue.length : 0;
|
| 7953 |
|
| 7954 |
|
| 7955 | data.finish = true;
|
| 7956 |
|
| 7957 |
|
| 7958 | jQuery.queue( this, type, [] );
|
| 7959 |
|
| 7960 | if ( hooks && hooks.stop ) {
|
| 7961 | hooks.stop.call( this, true );
|
| 7962 | }
|
| 7963 |
|
| 7964 |
|
| 7965 | for ( index = timers.length; index--; ) {
|
| 7966 | if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
|
| 7967 | timers[ index ].anim.stop( true );
|
| 7968 | timers.splice( index, 1 );
|
| 7969 | }
|
| 7970 | }
|
| 7971 |
|
| 7972 |
|
| 7973 | for ( index = 0; index < length; index++ ) {
|
| 7974 | if ( queue[ index ] && queue[ index ].finish ) {
|
| 7975 | queue[ index ].finish.call( this );
|
| 7976 | }
|
| 7977 | }
|
| 7978 |
|
| 7979 |
|
| 7980 | delete data.finish;
|
| 7981 | } );
|
| 7982 | }
|
| 7983 | } );
|
| 7984 |
|
| 7985 | jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) {
|
| 7986 | var cssFn = jQuery.fn[ name ];
|
| 7987 | jQuery.fn[ name ] = function( speed, easing, callback ) {
|
| 7988 | return speed == null || typeof speed === "boolean" ?
|
| 7989 | cssFn.apply( this, arguments ) :
|
| 7990 | this.animate( genFx( name, true ), speed, easing, callback );
|
| 7991 | };
|
| 7992 | } );
|
| 7993 |
|
| 7994 |
|
| 7995 | jQuery.each( {
|
| 7996 | slideDown: genFx( "show" ),
|
| 7997 | slideUp: genFx( "hide" ),
|
| 7998 | slideToggle: genFx( "toggle" ),
|
| 7999 | fadeIn: { opacity: "show" },
|
| 8000 | fadeOut: { opacity: "hide" },
|
| 8001 | fadeToggle: { opacity: "toggle" }
|
| 8002 | }, function( name, props ) {
|
| 8003 | jQuery.fn[ name ] = function( speed, easing, callback ) {
|
| 8004 | return this.animate( props, speed, easing, callback );
|
| 8005 | };
|
| 8006 | } );
|
| 8007 |
|
| 8008 | jQuery.timers = [];
|
| 8009 | jQuery.fx.tick = function() {
|
| 8010 | var timer,
|
| 8011 | i = 0,
|
| 8012 | timers = jQuery.timers;
|
| 8013 |
|
| 8014 | fxNow = Date.now();
|
| 8015 |
|
| 8016 | for ( ; i < timers.length; i++ ) {
|
| 8017 | timer = timers[ i ];
|
| 8018 |
|
| 8019 |
|
| 8020 | if ( !timer() && timers[ i ] === timer ) {
|
| 8021 | timers.splice( i--, 1 );
|
| 8022 | }
|
| 8023 | }
|
| 8024 |
|
| 8025 | if ( !timers.length ) {
|
| 8026 | jQuery.fx.stop();
|
| 8027 | }
|
| 8028 | fxNow = undefined;
|
| 8029 | };
|
| 8030 |
|
| 8031 | jQuery.fx.timer = function( timer ) {
|
| 8032 | jQuery.timers.push( timer );
|
| 8033 | jQuery.fx.start();
|
| 8034 | };
|
| 8035 |
|
| 8036 | jQuery.fx.interval = 13;
|
| 8037 | jQuery.fx.start = function() {
|
| 8038 | if ( inProgress ) {
|
| 8039 | return;
|
| 8040 | }
|
| 8041 |
|
| 8042 | inProgress = true;
|
| 8043 | schedule();
|
| 8044 | };
|
| 8045 |
|
| 8046 | jQuery.fx.stop = function() {
|
| 8047 | inProgress = null;
|
| 8048 | };
|
| 8049 |
|
| 8050 | jQuery.fx.speeds = {
|
| 8051 | slow: 600,
|
| 8052 | fast: 200,
|
| 8053 |
|
| 8054 |
|
| 8055 | _default: 400
|
| 8056 | };
|
| 8057 |
|
| 8058 |
|
| 8059 |
|
| 8060 | jQuery.fn.delay = function( time, type ) {
|
| 8061 | time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
|
| 8062 | type = type || "fx";
|
| 8063 |
|
| 8064 | return this.queue( type, function( next, hooks ) {
|
| 8065 | var timeout = window.setTimeout( next, time );
|
| 8066 | hooks.stop = function() {
|
| 8067 | window.clearTimeout( timeout );
|
| 8068 | };
|
| 8069 | } );
|
| 8070 | };
|
| 8071 |
|
| 8072 |
|
| 8073 | ( function() {
|
| 8074 | var input = document.createElement( "input" ),
|
| 8075 | select = document.createElement( "select" ),
|
| 8076 | opt = select.appendChild( document.createElement( "option" ) );
|
| 8077 |
|
| 8078 | input.type = "checkbox";
|
| 8079 |
|
| 8080 |
|
| 8081 |
|
| 8082 | support.checkOn = input.value !== "";
|
| 8083 |
|
| 8084 |
|
| 8085 |
|
| 8086 | support.optSelected = opt.selected;
|
| 8087 |
|
| 8088 |
|
| 8089 |
|
| 8090 | input = document.createElement( "input" );
|
| 8091 | input.value = "t";
|
| 8092 | input.type = "radio";
|
| 8093 | support.radioValue = input.value === "t";
|
| 8094 | } )();
|
| 8095 |
|
| 8096 |
|
| 8097 | var boolHook,
|
| 8098 | attrHandle = jQuery.expr.attrHandle;
|
| 8099 |
|
| 8100 | jQuery.fn.extend( {
|
| 8101 | attr: function( name, value ) {
|
| 8102 | return access( this, jQuery.attr, name, value, arguments.length > 1 );
|
| 8103 | },
|
| 8104 |
|
| 8105 | removeAttr: function( name ) {
|
| 8106 | return this.each( function() {
|
| 8107 | jQuery.removeAttr( this, name );
|
| 8108 | } );
|
| 8109 | }
|
| 8110 | } );
|
| 8111 |
|
| 8112 | jQuery.extend( {
|
| 8113 | attr: function( elem, name, value ) {
|
| 8114 | var ret, hooks,
|
| 8115 | nType = elem.nodeType;
|
| 8116 |
|
| 8117 |
|
| 8118 | if ( nType === 3 || nType === 8 || nType === 2 ) {
|
| 8119 | return;
|
| 8120 | }
|
| 8121 |
|
| 8122 |
|
| 8123 | if ( typeof elem.getAttribute === "undefined" ) {
|
| 8124 | return jQuery.prop( elem, name, value );
|
| 8125 | }
|
| 8126 |
|
| 8127 |
|
| 8128 |
|
| 8129 | if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
|
| 8130 | hooks = jQuery.attrHooks[ name.toLowerCase() ] ||
|
| 8131 | ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );
|
| 8132 | }
|
| 8133 |
|
| 8134 | if ( value !== undefined ) {
|
| 8135 | if ( value === null ) {
|
| 8136 | jQuery.removeAttr( elem, name );
|
| 8137 | return;
|
| 8138 | }
|
| 8139 |
|
| 8140 | if ( hooks && "set" in hooks &&
|
| 8141 | ( ret = hooks.set( elem, value, name ) ) !== undefined ) {
|
| 8142 | return ret;
|
| 8143 | }
|
| 8144 |
|
| 8145 | elem.setAttribute( name, value + "" );
|
| 8146 | return value;
|
| 8147 | }
|
| 8148 |
|
| 8149 | if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
|
| 8150 | return ret;
|
| 8151 | }
|
| 8152 |
|
| 8153 | ret = jQuery.find.attr( elem, name );
|
| 8154 |
|
| 8155 |
|
| 8156 | return ret == null ? undefined : ret;
|
| 8157 | },
|
| 8158 |
|
| 8159 | attrHooks: {
|
| 8160 | type: {
|
| 8161 | set: function( elem, value ) {
|
| 8162 | if ( !support.radioValue && value === "radio" &&
|
| 8163 | nodeName( elem, "input" ) ) {
|
| 8164 | var val = elem.value;
|
| 8165 | elem.setAttribute( "type", value );
|
| 8166 | if ( val ) {
|
| 8167 | elem.value = val;
|
| 8168 | }
|
| 8169 | return value;
|
| 8170 | }
|
| 8171 | }
|
| 8172 | }
|
| 8173 | },
|
| 8174 |
|
| 8175 | removeAttr: function( elem, value ) {
|
| 8176 | var name,
|
| 8177 | i = 0,
|
| 8178 |
|
| 8179 |
|
| 8180 |
|
| 8181 | attrNames = value && value.match( rnothtmlwhite );
|
| 8182 |
|
| 8183 | if ( attrNames && elem.nodeType === 1 ) {
|
| 8184 | while ( ( name = attrNames[ i++ ] ) ) {
|
| 8185 | elem.removeAttribute( name );
|
| 8186 | }
|
| 8187 | }
|
| 8188 | }
|
| 8189 | } );
|
| 8190 |
|
| 8191 |
|
| 8192 | boolHook = {
|
| 8193 | set: function( elem, value, name ) {
|
| 8194 | if ( value === false ) {
|
| 8195 |
|
| 8196 |
|
| 8197 | jQuery.removeAttr( elem, name );
|
| 8198 | } else {
|
| 8199 | elem.setAttribute( name, name );
|
| 8200 | }
|
| 8201 | return name;
|
| 8202 | }
|
| 8203 | };
|
| 8204 |
|
| 8205 | jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) {
|
| 8206 | var getter = attrHandle[ name ] || jQuery.find.attr;
|
| 8207 |
|
| 8208 | attrHandle[ name ] = function( elem, name, isXML ) {
|
| 8209 | var ret, handle,
|
| 8210 | lowercaseName = name.toLowerCase();
|
| 8211 |
|
| 8212 | if ( !isXML ) {
|
| 8213 |
|
| 8214 |
|
| 8215 | handle = attrHandle[ lowercaseName ];
|
| 8216 | attrHandle[ lowercaseName ] = ret;
|
| 8217 | ret = getter( elem, name, isXML ) != null ?
|
| 8218 | lowercaseName :
|
| 8219 | null;
|
| 8220 | attrHandle[ lowercaseName ] = handle;
|
| 8221 | }
|
| 8222 | return ret;
|
| 8223 | };
|
| 8224 | } );
|
| 8225 |
|
| 8226 |
|
| 8227 |
|
| 8228 |
|
| 8229 | var rfocusable = /^(?:input|select|textarea|button)$/i,
|
| 8230 | rclickable = /^(?:a|area)$/i;
|
| 8231 |
|
| 8232 | jQuery.fn.extend( {
|
| 8233 | prop: function( name, value ) {
|
| 8234 | return access( this, jQuery.prop, name, value, arguments.length > 1 );
|
| 8235 | },
|
| 8236 |
|
| 8237 | removeProp: function( name ) {
|
| 8238 | return this.each( function() {
|
| 8239 | delete this[ jQuery.propFix[ name ] || name ];
|
| 8240 | } );
|
| 8241 | }
|
| 8242 | } );
|
| 8243 |
|
| 8244 | jQuery.extend( {
|
| 8245 | prop: function( elem, name, value ) {
|
| 8246 | var ret, hooks,
|
| 8247 | nType = elem.nodeType;
|
| 8248 |
|
| 8249 |
|
| 8250 | if ( nType === 3 || nType === 8 || nType === 2 ) {
|
| 8251 | return;
|
| 8252 | }
|
| 8253 |
|
| 8254 | if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
|
| 8255 |
|
| 8256 |
|
| 8257 | name = jQuery.propFix[ name ] || name;
|
| 8258 | hooks = jQuery.propHooks[ name ];
|
| 8259 | }
|
| 8260 |
|
| 8261 | if ( value !== undefined ) {
|
| 8262 | if ( hooks && "set" in hooks &&
|
| 8263 | ( ret = hooks.set( elem, value, name ) ) !== undefined ) {
|
| 8264 | return ret;
|
| 8265 | }
|
| 8266 |
|
| 8267 | return ( elem[ name ] = value );
|
| 8268 | }
|
| 8269 |
|
| 8270 | if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
|
| 8271 | return ret;
|
| 8272 | }
|
| 8273 |
|
| 8274 | return elem[ name ];
|
| 8275 | },
|
| 8276 |
|
| 8277 | propHooks: {
|
| 8278 | tabIndex: {
|
| 8279 | get: function( elem ) {
|
| 8280 |
|
| 8281 |
|
| 8282 |
|
| 8283 |
|
| 8284 |
|
| 8285 | var tabindex = jQuery.find.attr( elem, "tabindex" );
|
| 8286 |
|
| 8287 | if ( tabindex ) {
|
| 8288 | return parseInt( tabindex, 10 );
|
| 8289 | }
|
| 8290 |
|
| 8291 | if (
|
| 8292 | rfocusable.test( elem.nodeName ) ||
|
| 8293 | rclickable.test( elem.nodeName ) &&
|
| 8294 | elem.href
|
| 8295 | ) {
|
| 8296 | return 0;
|
| 8297 | }
|
| 8298 |
|
| 8299 | return -1;
|
| 8300 | }
|
| 8301 | }
|
| 8302 | },
|
| 8303 |
|
| 8304 | propFix: {
|
| 8305 | "for": "htmlFor",
|
| 8306 | "class": "className"
|
| 8307 | }
|
| 8308 | } );
|
| 8309 |
|
| 8310 |
|
| 8311 |
|
| 8312 |
|
| 8313 |
|
| 8314 |
|
| 8315 |
|
| 8316 |
|
| 8317 |
|
| 8318 | if ( !support.optSelected ) {
|
| 8319 | jQuery.propHooks.selected = {
|
| 8320 | get: function( elem ) {
|
| 8321 |
|
| 8322 |
|
| 8323 |
|
| 8324 | var parent = elem.parentNode;
|
| 8325 | if ( parent && parent.parentNode ) {
|
| 8326 | parent.parentNode.selectedIndex;
|
| 8327 | }
|
| 8328 | return null;
|
| 8329 | },
|
| 8330 | set: function( elem ) {
|
| 8331 |
|
| 8332 |
|
| 8333 |
|
| 8334 | var parent = elem.parentNode;
|
| 8335 | if ( parent ) {
|
| 8336 | parent.selectedIndex;
|
| 8337 |
|
| 8338 | if ( parent.parentNode ) {
|
| 8339 | parent.parentNode.selectedIndex;
|
| 8340 | }
|
| 8341 | }
|
| 8342 | }
|
| 8343 | };
|
| 8344 | }
|
| 8345 |
|
| 8346 | jQuery.each( [
|
| 8347 | "tabIndex",
|
| 8348 | "readOnly",
|
| 8349 | "maxLength",
|
| 8350 | "cellSpacing",
|
| 8351 | "cellPadding",
|
| 8352 | "rowSpan",
|
| 8353 | "colSpan",
|
| 8354 | "useMap",
|
| 8355 | "frameBorder",
|
| 8356 | "contentEditable"
|
| 8357 | ], function() {
|
| 8358 | jQuery.propFix[ this.toLowerCase() ] = this;
|
| 8359 | } );
|
| 8360 |
|
| 8361 |
|
| 8362 |
|
| 8363 |
|
| 8364 |
|
| 8365 |
|
| 8366 | function stripAndCollapse( value ) {
|
| 8367 | var tokens = value.match( rnothtmlwhite ) || [];
|
| 8368 | return tokens.join( " " );
|
| 8369 | }
|
| 8370 |
|
| 8371 |
|
| 8372 | function getClass( elem ) {
|
| 8373 | return elem.getAttribute && elem.getAttribute( "class" ) || "";
|
| 8374 | }
|
| 8375 |
|
| 8376 | function classesToArray( value ) {
|
| 8377 | if ( Array.isArray( value ) ) {
|
| 8378 | return value;
|
| 8379 | }
|
| 8380 | if ( typeof value === "string" ) {
|
| 8381 | return value.match( rnothtmlwhite ) || [];
|
| 8382 | }
|
| 8383 | return [];
|
| 8384 | }
|
| 8385 |
|
| 8386 | jQuery.fn.extend( {
|
| 8387 | addClass: function( value ) {
|
| 8388 | var classNames, cur, curValue, className, i, finalValue;
|
| 8389 |
|
| 8390 | if ( isFunction( value ) ) {
|
| 8391 | return this.each( function( j ) {
|
| 8392 | jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
|
| 8393 | } );
|
| 8394 | }
|
| 8395 |
|
| 8396 | classNames = classesToArray( value );
|
| 8397 |
|
| 8398 | if ( classNames.length ) {
|
| 8399 | return this.each( function() {
|
| 8400 | curValue = getClass( this );
|
| 8401 | cur = this.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
|
| 8402 |
|
| 8403 | if ( cur ) {
|
| 8404 | for ( i = 0; i < classNames.length; i++ ) {
|
| 8405 | className = classNames[ i ];
|
| 8406 | if ( cur.indexOf( " " + className + " " ) < 0 ) {
|
| 8407 | cur += className + " ";
|
| 8408 | }
|
| 8409 | }
|
| 8410 |
|
| 8411 |
|
| 8412 | finalValue = stripAndCollapse( cur );
|
| 8413 | if ( curValue !== finalValue ) {
|
| 8414 | this.setAttribute( "class", finalValue );
|
| 8415 | }
|
| 8416 | }
|
| 8417 | } );
|
| 8418 | }
|
| 8419 |
|
| 8420 | return this;
|
| 8421 | },
|
| 8422 |
|
| 8423 | removeClass: function( value ) {
|
| 8424 | var classNames, cur, curValue, className, i, finalValue;
|
| 8425 |
|
| 8426 | if ( isFunction( value ) ) {
|
| 8427 | return this.each( function( j ) {
|
| 8428 | jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
|
| 8429 | } );
|
| 8430 | }
|
| 8431 |
|
| 8432 | if ( !arguments.length ) {
|
| 8433 | return this.attr( "class", "" );
|
| 8434 | }
|
| 8435 |
|
| 8436 | classNames = classesToArray( value );
|
| 8437 |
|
| 8438 | if ( classNames.length ) {
|
| 8439 | return this.each( function() {
|
| 8440 | curValue = getClass( this );
|
| 8441 |
|
| 8442 |
|
| 8443 | cur = this.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
|
| 8444 |
|
| 8445 | if ( cur ) {
|
| 8446 | for ( i = 0; i < classNames.length; i++ ) {
|
| 8447 | className = classNames[ i ];
|
| 8448 |
|
| 8449 |
|
| 8450 | while ( cur.indexOf( " " + className + " " ) > -1 ) {
|
| 8451 | cur = cur.replace( " " + className + " ", " " );
|
| 8452 | }
|
| 8453 | }
|
| 8454 |
|
| 8455 |
|
| 8456 | finalValue = stripAndCollapse( cur );
|
| 8457 | if ( curValue !== finalValue ) {
|
| 8458 | this.setAttribute( "class", finalValue );
|
| 8459 | }
|
| 8460 | }
|
| 8461 | } );
|
| 8462 | }
|
| 8463 |
|
| 8464 | return this;
|
| 8465 | },
|
| 8466 |
|
| 8467 | toggleClass: function( value, stateVal ) {
|
| 8468 | var classNames, className, i, self,
|
| 8469 | type = typeof value,
|
| 8470 | isValidValue = type === "string" || Array.isArray( value );
|
| 8471 |
|
| 8472 | if ( isFunction( value ) ) {
|
| 8473 | return this.each( function( i ) {
|
| 8474 | jQuery( this ).toggleClass(
|
| 8475 | value.call( this, i, getClass( this ), stateVal ),
|
| 8476 | stateVal
|
| 8477 | );
|
| 8478 | } );
|
| 8479 | }
|
| 8480 |
|
| 8481 | if ( typeof stateVal === "boolean" && isValidValue ) {
|
| 8482 | return stateVal ? this.addClass( value ) : this.removeClass( value );
|
| 8483 | }
|
| 8484 |
|
| 8485 | classNames = classesToArray( value );
|
| 8486 |
|
| 8487 | return this.each( function() {
|
| 8488 | if ( isValidValue ) {
|
| 8489 |
|
| 8490 |
|
| 8491 | self = jQuery( this );
|
| 8492 |
|
| 8493 | for ( i = 0; i < classNames.length; i++ ) {
|
| 8494 | className = classNames[ i ];
|
| 8495 |
|
| 8496 |
|
| 8497 | if ( self.hasClass( className ) ) {
|
| 8498 | self.removeClass( className );
|
| 8499 | } else {
|
| 8500 | self.addClass( className );
|
| 8501 | }
|
| 8502 | }
|
| 8503 |
|
| 8504 |
|
| 8505 | } else if ( value === undefined || type === "boolean" ) {
|
| 8506 | className = getClass( this );
|
| 8507 | if ( className ) {
|
| 8508 |
|
| 8509 |
|
| 8510 | dataPriv.set( this, "__className__", className );
|
| 8511 | }
|
| 8512 |
|
| 8513 |
|
| 8514 |
|
| 8515 |
|
| 8516 |
|
| 8517 | if ( this.setAttribute ) {
|
| 8518 | this.setAttribute( "class",
|
| 8519 | className || value === false ?
|
| 8520 | "" :
|
| 8521 | dataPriv.get( this, "__className__" ) || ""
|
| 8522 | );
|
| 8523 | }
|
| 8524 | }
|
| 8525 | } );
|
| 8526 | },
|
| 8527 |
|
| 8528 | hasClass: function( selector ) {
|
| 8529 | var className, elem,
|
| 8530 | i = 0;
|
| 8531 |
|
| 8532 | className = " " + selector + " ";
|
| 8533 | while ( ( elem = this[ i++ ] ) ) {
|
| 8534 | if ( elem.nodeType === 1 &&
|
| 8535 | ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) {
|
| 8536 | return true;
|
| 8537 | }
|
| 8538 | }
|
| 8539 |
|
| 8540 | return false;
|
| 8541 | }
|
| 8542 | } );
|
| 8543 |
|
| 8544 |
|
| 8545 |
|
| 8546 |
|
| 8547 | var rreturn = /\r/g;
|
| 8548 |
|
| 8549 | jQuery.fn.extend( {
|
| 8550 | val: function( value ) {
|
| 8551 | var hooks, ret, valueIsFunction,
|
| 8552 | elem = this[ 0 ];
|
| 8553 |
|
| 8554 | if ( !arguments.length ) {
|
| 8555 | if ( elem ) {
|
| 8556 | hooks = jQuery.valHooks[ elem.type ] ||
|
| 8557 | jQuery.valHooks[ elem.nodeName.toLowerCase() ];
|
| 8558 |
|
| 8559 | if ( hooks &&
|
| 8560 | "get" in hooks &&
|
| 8561 | ( ret = hooks.get( elem, "value" ) ) !== undefined
|
| 8562 | ) {
|
| 8563 | return ret;
|
| 8564 | }
|
| 8565 |
|
| 8566 | ret = elem.value;
|
| 8567 |
|
| 8568 |
|
| 8569 | if ( typeof ret === "string" ) {
|
| 8570 | return ret.replace( rreturn, "" );
|
| 8571 | }
|
| 8572 |
|
| 8573 |
|
| 8574 | return ret == null ? "" : ret;
|
| 8575 | }
|
| 8576 |
|
| 8577 | return;
|
| 8578 | }
|
| 8579 |
|
| 8580 | valueIsFunction = isFunction( value );
|
| 8581 |
|
| 8582 | return this.each( function( i ) {
|
| 8583 | var val;
|
| 8584 |
|
| 8585 | if ( this.nodeType !== 1 ) {
|
| 8586 | return;
|
| 8587 | }
|
| 8588 |
|
| 8589 | if ( valueIsFunction ) {
|
| 8590 | val = value.call( this, i, jQuery( this ).val() );
|
| 8591 | } else {
|
| 8592 | val = value;
|
| 8593 | }
|
| 8594 |
|
| 8595 |
|
| 8596 | if ( val == null ) {
|
| 8597 | val = "";
|
| 8598 |
|
| 8599 | } else if ( typeof val === "number" ) {
|
| 8600 | val += "";
|
| 8601 |
|
| 8602 | } else if ( Array.isArray( val ) ) {
|
| 8603 | val = jQuery.map( val, function( value ) {
|
| 8604 | return value == null ? "" : value + "";
|
| 8605 | } );
|
| 8606 | }
|
| 8607 |
|
| 8608 | hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
|
| 8609 |
|
| 8610 |
|
| 8611 | if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) {
|
| 8612 | this.value = val;
|
| 8613 | }
|
| 8614 | } );
|
| 8615 | }
|
| 8616 | } );
|
| 8617 |
|
| 8618 | jQuery.extend( {
|
| 8619 | valHooks: {
|
| 8620 | option: {
|
| 8621 | get: function( elem ) {
|
| 8622 |
|
| 8623 | var val = jQuery.find.attr( elem, "value" );
|
| 8624 | return val != null ?
|
| 8625 | val :
|
| 8626 |
|
| 8627 |
|
| 8628 |
|
| 8629 |
|
| 8630 |
|
| 8631 | stripAndCollapse( jQuery.text( elem ) );
|
| 8632 | }
|
| 8633 | },
|
| 8634 | select: {
|
| 8635 | get: function( elem ) {
|
| 8636 | var value, option, i,
|
| 8637 | options = elem.options,
|
| 8638 | index = elem.selectedIndex,
|
| 8639 | one = elem.type === "select-one",
|
| 8640 | values = one ? null : [],
|
| 8641 | max = one ? index + 1 : options.length;
|
| 8642 |
|
| 8643 | if ( index < 0 ) {
|
| 8644 | i = max;
|
| 8645 |
|
| 8646 | } else {
|
| 8647 | i = one ? index : 0;
|
| 8648 | }
|
| 8649 |
|
| 8650 |
|
| 8651 | for ( ; i < max; i++ ) {
|
| 8652 | option = options[ i ];
|
| 8653 |
|
| 8654 |
|
| 8655 |
|
| 8656 | if ( ( option.selected || i === index ) &&
|
| 8657 |
|
| 8658 |
|
| 8659 | !option.disabled &&
|
| 8660 | ( !option.parentNode.disabled ||
|
| 8661 | !nodeName( option.parentNode, "optgroup" ) ) ) {
|
| 8662 |
|
| 8663 |
|
| 8664 | value = jQuery( option ).val();
|
| 8665 |
|
| 8666 |
|
| 8667 | if ( one ) {
|
| 8668 | return value;
|
| 8669 | }
|
| 8670 |
|
| 8671 |
|
| 8672 | values.push( value );
|
| 8673 | }
|
| 8674 | }
|
| 8675 |
|
| 8676 | return values;
|
| 8677 | },
|
| 8678 |
|
| 8679 | set: function( elem, value ) {
|
| 8680 | var optionSet, option,
|
| 8681 | options = elem.options,
|
| 8682 | values = jQuery.makeArray( value ),
|
| 8683 | i = options.length;
|
| 8684 |
|
| 8685 | while ( i-- ) {
|
| 8686 | option = options[ i ];
|
| 8687 |
|
| 8688 |
|
| 8689 |
|
| 8690 | if ( option.selected =
|
| 8691 | jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1
|
| 8692 | ) {
|
| 8693 | optionSet = true;
|
| 8694 | }
|
| 8695 |
|
| 8696 |
|
| 8697 | }
|
| 8698 |
|
| 8699 |
|
| 8700 | if ( !optionSet ) {
|
| 8701 | elem.selectedIndex = -1;
|
| 8702 | }
|
| 8703 | return values;
|
| 8704 | }
|
| 8705 | }
|
| 8706 | }
|
| 8707 | } );
|
| 8708 |
|
| 8709 |
|
| 8710 | jQuery.each( [ "radio", "checkbox" ], function() {
|
| 8711 | jQuery.valHooks[ this ] = {
|
| 8712 | set: function( elem, value ) {
|
| 8713 | if ( Array.isArray( value ) ) {
|
| 8714 | return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
|
| 8715 | }
|
| 8716 | }
|
| 8717 | };
|
| 8718 | if ( !support.checkOn ) {
|
| 8719 | jQuery.valHooks[ this ].get = function( elem ) {
|
| 8720 | return elem.getAttribute( "value" ) === null ? "on" : elem.value;
|
| 8721 | };
|
| 8722 | }
|
| 8723 | } );
|
| 8724 |
|
| 8725 |
|
| 8726 |
|
| 8727 |
|
| 8728 |
|
| 8729 |
|
| 8730 |
|
| 8731 | support.focusin = "onfocusin" in window;
|
| 8732 |
|
| 8733 |
|
| 8734 | var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
|
| 8735 | stopPropagationCallback = function( e ) {
|
| 8736 | e.stopPropagation();
|
| 8737 | };
|
| 8738 |
|
| 8739 | jQuery.extend( jQuery.event, {
|
| 8740 |
|
| 8741 | trigger: function( event, data, elem, onlyHandlers ) {
|
| 8742 |
|
| 8743 | var i, cur, tmp, bubbleType, ontype, handle, special, lastElement,
|
| 8744 | eventPath = [ elem || document ],
|
| 8745 | type = hasOwn.call( event, "type" ) ? event.type : event,
|
| 8746 | namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : [];
|
| 8747 |
|
| 8748 | cur = lastElement = tmp = elem = elem || document;
|
| 8749 |
|
| 8750 |
|
| 8751 | if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
|
| 8752 | return;
|
| 8753 | }
|
| 8754 |
|
| 8755 |
|
| 8756 | if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
|
| 8757 | return;
|
| 8758 | }
|
| 8759 |
|
| 8760 | if ( type.indexOf( "." ) > -1 ) {
|
| 8761 |
|
| 8762 |
|
| 8763 | namespaces = type.split( "." );
|
| 8764 | type = namespaces.shift();
|
| 8765 | namespaces.sort();
|
| 8766 | }
|
| 8767 | ontype = type.indexOf( ":" ) < 0 && "on" + type;
|
| 8768 |
|
| 8769 |
|
| 8770 | event = event[ jQuery.expando ] ?
|
| 8771 | event :
|
| 8772 | new jQuery.Event( type, typeof event === "object" && event );
|
| 8773 |
|
| 8774 |
|
| 8775 | event.isTrigger = onlyHandlers ? 2 : 3;
|
| 8776 | event.namespace = namespaces.join( "." );
|
| 8777 | event.rnamespace = event.namespace ?
|
| 8778 | new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) :
|
| 8779 | null;
|
| 8780 |
|
| 8781 |
|
| 8782 | event.result = undefined;
|
| 8783 | if ( !event.target ) {
|
| 8784 | event.target = elem;
|
| 8785 | }
|
| 8786 |
|
| 8787 |
|
| 8788 | data = data == null ?
|
| 8789 | [ event ] :
|
| 8790 | jQuery.makeArray( data, [ event ] );
|
| 8791 |
|
| 8792 |
|
| 8793 | special = jQuery.event.special[ type ] || {};
|
| 8794 | if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
|
| 8795 | return;
|
| 8796 | }
|
| 8797 |
|
| 8798 |
|
| 8799 |
|
| 8800 | if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {
|
| 8801 |
|
| 8802 | bubbleType = special.delegateType || type;
|
| 8803 | if ( !rfocusMorph.test( bubbleType + type ) ) {
|
| 8804 | cur = cur.parentNode;
|
| 8805 | }
|
| 8806 | for ( ; cur; cur = cur.parentNode ) {
|
| 8807 | eventPath.push( cur );
|
| 8808 | tmp = cur;
|
| 8809 | }
|
| 8810 |
|
| 8811 |
|
| 8812 | if ( tmp === ( elem.ownerDocument || document ) ) {
|
| 8813 | eventPath.push( tmp.defaultView || tmp.parentWindow || window );
|
| 8814 | }
|
| 8815 | }
|
| 8816 |
|
| 8817 |
|
| 8818 | i = 0;
|
| 8819 | while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {
|
| 8820 | lastElement = cur;
|
| 8821 | event.type = i > 1 ?
|
| 8822 | bubbleType :
|
| 8823 | special.bindType || type;
|
| 8824 |
|
| 8825 |
|
| 8826 | handle = ( dataPriv.get( cur, "events" ) || Object.create( null ) )[ event.type ] &&
|
| 8827 | dataPriv.get( cur, "handle" );
|
| 8828 | if ( handle ) {
|
| 8829 | handle.apply( cur, data );
|
| 8830 | }
|
| 8831 |
|
| 8832 |
|
| 8833 | handle = ontype && cur[ ontype ];
|
| 8834 | if ( handle && handle.apply && acceptData( cur ) ) {
|
| 8835 | event.result = handle.apply( cur, data );
|
| 8836 | if ( event.result === false ) {
|
| 8837 | event.preventDefault();
|
| 8838 | }
|
| 8839 | }
|
| 8840 | }
|
| 8841 | event.type = type;
|
| 8842 |
|
| 8843 |
|
| 8844 | if ( !onlyHandlers && !event.isDefaultPrevented() ) {
|
| 8845 |
|
| 8846 | if ( ( !special._default ||
|
| 8847 | special._default.apply( eventPath.pop(), data ) === false ) &&
|
| 8848 | acceptData( elem ) ) {
|
| 8849 |
|
| 8850 |
|
| 8851 |
|
| 8852 | if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {
|
| 8853 |
|
| 8854 |
|
| 8855 | tmp = elem[ ontype ];
|
| 8856 |
|
| 8857 | if ( tmp ) {
|
| 8858 | elem[ ontype ] = null;
|
| 8859 | }
|
| 8860 |
|
| 8861 |
|
| 8862 | jQuery.event.triggered = type;
|
| 8863 |
|
| 8864 | if ( event.isPropagationStopped() ) {
|
| 8865 | lastElement.addEventListener( type, stopPropagationCallback );
|
| 8866 | }
|
| 8867 |
|
| 8868 | elem[ type ]();
|
| 8869 |
|
| 8870 | if ( event.isPropagationStopped() ) {
|
| 8871 | lastElement.removeEventListener( type, stopPropagationCallback );
|
| 8872 | }
|
| 8873 |
|
| 8874 | jQuery.event.triggered = undefined;
|
| 8875 |
|
| 8876 | if ( tmp ) {
|
| 8877 | elem[ ontype ] = tmp;
|
| 8878 | }
|
| 8879 | }
|
| 8880 | }
|
| 8881 | }
|
| 8882 |
|
| 8883 | return event.result;
|
| 8884 | },
|
| 8885 |
|
| 8886 |
|
| 8887 |
|
| 8888 | simulate: function( type, elem, event ) {
|
| 8889 | var e = jQuery.extend(
|
| 8890 | new jQuery.Event(),
|
| 8891 | event,
|
| 8892 | {
|
| 8893 | type: type,
|
| 8894 | isSimulated: true
|
| 8895 | }
|
| 8896 | );
|
| 8897 |
|
| 8898 | jQuery.event.trigger( e, null, elem );
|
| 8899 | }
|
| 8900 |
|
| 8901 | } );
|
| 8902 |
|
| 8903 | jQuery.fn.extend( {
|
| 8904 |
|
| 8905 | trigger: function( type, data ) {
|
| 8906 | return this.each( function() {
|
| 8907 | jQuery.event.trigger( type, data, this );
|
| 8908 | } );
|
| 8909 | },
|
| 8910 | triggerHandler: function( type, data ) {
|
| 8911 | var elem = this[ 0 ];
|
| 8912 | if ( elem ) {
|
| 8913 | return jQuery.event.trigger( type, data, elem, true );
|
| 8914 | }
|
| 8915 | }
|
| 8916 | } );
|
| 8917 |
|
| 8918 |
|
| 8919 |
|
| 8920 |
|
| 8921 |
|
| 8922 |
|
| 8923 |
|
| 8924 |
|
| 8925 |
|
| 8926 |
|
| 8927 | if ( !support.focusin ) {
|
| 8928 | jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {
|
| 8929 |
|
| 8930 |
|
| 8931 | var handler = function( event ) {
|
| 8932 | jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );
|
| 8933 | };
|
| 8934 |
|
| 8935 | jQuery.event.special[ fix ] = {
|
| 8936 | setup: function() {
|
| 8937 |
|
| 8938 |
|
| 8939 |
|
| 8940 | var doc = this.ownerDocument || this.document || this,
|
| 8941 | attaches = dataPriv.access( doc, fix );
|
| 8942 |
|
| 8943 | if ( !attaches ) {
|
| 8944 | doc.addEventListener( orig, handler, true );
|
| 8945 | }
|
| 8946 | dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
|
| 8947 | },
|
| 8948 | teardown: function() {
|
| 8949 | var doc = this.ownerDocument || this.document || this,
|
| 8950 | attaches = dataPriv.access( doc, fix ) - 1;
|
| 8951 |
|
| 8952 | if ( !attaches ) {
|
| 8953 | doc.removeEventListener( orig, handler, true );
|
| 8954 | dataPriv.remove( doc, fix );
|
| 8955 |
|
| 8956 | } else {
|
| 8957 | dataPriv.access( doc, fix, attaches );
|
| 8958 | }
|
| 8959 | }
|
| 8960 | };
|
| 8961 | } );
|
| 8962 | }
|
| 8963 | var location = window.location;
|
| 8964 |
|
| 8965 | var nonce = { guid: Date.now() };
|
| 8966 |
|
| 8967 | var rquery = ( /\?/ );
|
| 8968 |
|
| 8969 |
|
| 8970 |
|
| 8971 |
|
| 8972 | jQuery.parseXML = function( data ) {
|
| 8973 | var xml, parserErrorElem;
|
| 8974 | if ( !data || typeof data !== "string" ) {
|
| 8975 | return null;
|
| 8976 | }
|
| 8977 |
|
| 8978 |
|
| 8979 |
|
| 8980 | try {
|
| 8981 | xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
|
| 8982 | } catch ( e ) {}
|
| 8983 |
|
| 8984 | parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ];
|
| 8985 | if ( !xml || parserErrorElem ) {
|
| 8986 | jQuery.error( "Invalid XML: " + (
|
| 8987 | parserErrorElem ?
|
| 8988 | jQuery.map( parserErrorElem.childNodes, function( el ) {
|
| 8989 | return el.textContent;
|
| 8990 | } ).join( "\n" ) :
|
| 8991 | data
|
| 8992 | ) );
|
| 8993 | }
|
| 8994 | return xml;
|
| 8995 | };
|
| 8996 |
|
| 8997 |
|
| 8998 | var
|
| 8999 | rbracket = /\[\]$/,
|
| 9000 | rCRLF = /\r?\n/g,
|
| 9001 | rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
|
| 9002 | rsubmittable = /^(?:input|select|textarea|keygen)/i;
|
| 9003 |
|
| 9004 | function buildParams( prefix, obj, traditional, add ) {
|
| 9005 | var name;
|
| 9006 |
|
| 9007 | if ( Array.isArray( obj ) ) {
|
| 9008 |
|
| 9009 |
|
| 9010 | jQuery.each( obj, function( i, v ) {
|
| 9011 | if ( traditional || rbracket.test( prefix ) ) {
|
| 9012 |
|
| 9013 |
|
| 9014 | add( prefix, v );
|
| 9015 |
|
| 9016 | } else {
|
| 9017 |
|
| 9018 |
|
| 9019 | buildParams(
|
| 9020 | prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]",
|
| 9021 | v,
|
| 9022 | traditional,
|
| 9023 | add
|
| 9024 | );
|
| 9025 | }
|
| 9026 | } );
|
| 9027 |
|
| 9028 | } else if ( !traditional && toType( obj ) === "object" ) {
|
| 9029 |
|
| 9030 |
|
| 9031 | for ( name in obj ) {
|
| 9032 | buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
|
| 9033 | }
|
| 9034 |
|
| 9035 | } else {
|
| 9036 |
|
| 9037 |
|
| 9038 | add( prefix, obj );
|
| 9039 | }
|
| 9040 | }
|
| 9041 |
|
| 9042 |
|
| 9043 |
|
| 9044 | jQuery.param = function( a, traditional ) {
|
| 9045 | var prefix,
|
| 9046 | s = [],
|
| 9047 | add = function( key, valueOrFunction ) {
|
| 9048 |
|
| 9049 |
|
| 9050 | var value = isFunction( valueOrFunction ) ?
|
| 9051 | valueOrFunction() :
|
| 9052 | valueOrFunction;
|
| 9053 |
|
| 9054 | s[ s.length ] = encodeURIComponent( key ) + "=" +
|
| 9055 | encodeURIComponent( value == null ? "" : value );
|
| 9056 | };
|
| 9057 |
|
| 9058 | if ( a == null ) {
|
| 9059 | return "";
|
| 9060 | }
|
| 9061 |
|
| 9062 |
|
| 9063 | if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
|
| 9064 |
|
| 9065 |
|
| 9066 | jQuery.each( a, function() {
|
| 9067 | add( this.name, this.value );
|
| 9068 | } );
|
| 9069 |
|
| 9070 | } else {
|
| 9071 |
|
| 9072 |
|
| 9073 |
|
| 9074 | for ( prefix in a ) {
|
| 9075 | buildParams( prefix, a[ prefix ], traditional, add );
|
| 9076 | }
|
| 9077 | }
|
| 9078 |
|
| 9079 |
|
| 9080 | return s.join( "&" );
|
| 9081 | };
|
| 9082 |
|
| 9083 | jQuery.fn.extend( {
|
| 9084 | serialize: function() {
|
| 9085 | return jQuery.param( this.serializeArray() );
|
| 9086 | },
|
| 9087 | serializeArray: function() {
|
| 9088 | return this.map( function() {
|
| 9089 |
|
| 9090 |
|
| 9091 | var elements = jQuery.prop( this, "elements" );
|
| 9092 | return elements ? jQuery.makeArray( elements ) : this;
|
| 9093 | } ).filter( function() {
|
| 9094 | var type = this.type;
|
| 9095 |
|
| 9096 |
|
| 9097 | return this.name && !jQuery( this ).is( ":disabled" ) &&
|
| 9098 | rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
|
| 9099 | ( this.checked || !rcheckableType.test( type ) );
|
| 9100 | } ).map( function( _i, elem ) {
|
| 9101 | var val = jQuery( this ).val();
|
| 9102 |
|
| 9103 | if ( val == null ) {
|
| 9104 | return null;
|
| 9105 | }
|
| 9106 |
|
| 9107 | if ( Array.isArray( val ) ) {
|
| 9108 | return jQuery.map( val, function( val ) {
|
| 9109 | return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
|
| 9110 | } );
|
| 9111 | }
|
| 9112 |
|
| 9113 | return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
|
| 9114 | } ).get();
|
| 9115 | }
|
| 9116 | } );
|
| 9117 |
|
| 9118 |
|
| 9119 | var
|
| 9120 | r20 = /%20/g,
|
| 9121 | rhash = /#.*$/,
|
| 9122 | rantiCache = /([?&])_=[^&]*/,
|
| 9123 | rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
|
| 9124 |
|
| 9125 |
|
| 9126 | rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
|
| 9127 | rnoContent = /^(?:GET|HEAD)$/,
|
| 9128 | rprotocol = /^\/\//,
|
| 9129 |
|
| 9130 | |
| 9131 | |
| 9132 | |
| 9133 | |
| 9134 | |
| 9135 | |
| 9136 | |
| 9137 | |
| 9138 |
|
| 9139 | prefilters = {},
|
| 9140 |
|
| 9141 | |
| 9142 | |
| 9143 | |
| 9144 | |
| 9145 |
|
| 9146 | transports = {},
|
| 9147 |
|
| 9148 |
|
| 9149 | allTypes = "*/".concat( "*" ),
|
| 9150 |
|
| 9151 |
|
| 9152 | originAnchor = document.createElement( "a" );
|
| 9153 |
|
| 9154 | originAnchor.href = location.href;
|
| 9155 |
|
| 9156 |
|
| 9157 | function addToPrefiltersOrTransports( structure ) {
|
| 9158 |
|
| 9159 |
|
| 9160 | return function( dataTypeExpression, func ) {
|
| 9161 |
|
| 9162 | if ( typeof dataTypeExpression !== "string" ) {
|
| 9163 | func = dataTypeExpression;
|
| 9164 | dataTypeExpression = "*";
|
| 9165 | }
|
| 9166 |
|
| 9167 | var dataType,
|
| 9168 | i = 0,
|
| 9169 | dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];
|
| 9170 |
|
| 9171 | if ( isFunction( func ) ) {
|
| 9172 |
|
| 9173 |
|
| 9174 | while ( ( dataType = dataTypes[ i++ ] ) ) {
|
| 9175 |
|
| 9176 |
|
| 9177 | if ( dataType[ 0 ] === "+" ) {
|
| 9178 | dataType = dataType.slice( 1 ) || "*";
|
| 9179 | ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );
|
| 9180 |
|
| 9181 |
|
| 9182 | } else {
|
| 9183 | ( structure[ dataType ] = structure[ dataType ] || [] ).push( func );
|
| 9184 | }
|
| 9185 | }
|
| 9186 | }
|
| 9187 | };
|
| 9188 | }
|
| 9189 |
|
| 9190 |
|
| 9191 | function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
|
| 9192 |
|
| 9193 | var inspected = {},
|
| 9194 | seekingTransport = ( structure === transports );
|
| 9195 |
|
| 9196 | function inspect( dataType ) {
|
| 9197 | var selected;
|
| 9198 | inspected[ dataType ] = true;
|
| 9199 | jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
|
| 9200 | var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
|
| 9201 | if ( typeof dataTypeOrTransport === "string" &&
|
| 9202 | !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
|
| 9203 |
|
| 9204 | options.dataTypes.unshift( dataTypeOrTransport );
|
| 9205 | inspect( dataTypeOrTransport );
|
| 9206 | return false;
|
| 9207 | } else if ( seekingTransport ) {
|
| 9208 | return !( selected = dataTypeOrTransport );
|
| 9209 | }
|
| 9210 | } );
|
| 9211 | return selected;
|
| 9212 | }
|
| 9213 |
|
| 9214 | return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
|
| 9215 | }
|
| 9216 |
|
| 9217 |
|
| 9218 |
|
| 9219 |
|
| 9220 | function ajaxExtend( target, src ) {
|
| 9221 | var key, deep,
|
| 9222 | flatOptions = jQuery.ajaxSettings.flatOptions || {};
|
| 9223 |
|
| 9224 | for ( key in src ) {
|
| 9225 | if ( src[ key ] !== undefined ) {
|
| 9226 | ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
|
| 9227 | }
|
| 9228 | }
|
| 9229 | if ( deep ) {
|
| 9230 | jQuery.extend( true, target, deep );
|
| 9231 | }
|
| 9232 |
|
| 9233 | return target;
|
| 9234 | }
|
| 9235 |
|
| 9236 | |
| 9237 | |
| 9238 | |
| 9239 |
|
| 9240 | function ajaxHandleResponses( s, jqXHR, responses ) {
|
| 9241 |
|
| 9242 | var ct, type, finalDataType, firstDataType,
|
| 9243 | contents = s.contents,
|
| 9244 | dataTypes = s.dataTypes;
|
| 9245 |
|
| 9246 |
|
| 9247 | while ( dataTypes[ 0 ] === "*" ) {
|
| 9248 | dataTypes.shift();
|
| 9249 | if ( ct === undefined ) {
|
| 9250 | ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" );
|
| 9251 | }
|
| 9252 | }
|
| 9253 |
|
| 9254 |
|
| 9255 | if ( ct ) {
|
| 9256 | for ( type in contents ) {
|
| 9257 | if ( contents[ type ] && contents[ type ].test( ct ) ) {
|
| 9258 | dataTypes.unshift( type );
|
| 9259 | break;
|
| 9260 | }
|
| 9261 | }
|
| 9262 | }
|
| 9263 |
|
| 9264 |
|
| 9265 | if ( dataTypes[ 0 ] in responses ) {
|
| 9266 | finalDataType = dataTypes[ 0 ];
|
| 9267 | } else {
|
| 9268 |
|
| 9269 |
|
| 9270 | for ( type in responses ) {
|
| 9271 | if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) {
|
| 9272 | finalDataType = type;
|
| 9273 | break;
|
| 9274 | }
|
| 9275 | if ( !firstDataType ) {
|
| 9276 | firstDataType = type;
|
| 9277 | }
|
| 9278 | }
|
| 9279 |
|
| 9280 |
|
| 9281 | finalDataType = finalDataType || firstDataType;
|
| 9282 | }
|
| 9283 |
|
| 9284 |
|
| 9285 |
|
| 9286 |
|
| 9287 | if ( finalDataType ) {
|
| 9288 | if ( finalDataType !== dataTypes[ 0 ] ) {
|
| 9289 | dataTypes.unshift( finalDataType );
|
| 9290 | }
|
| 9291 | return responses[ finalDataType ];
|
| 9292 | }
|
| 9293 | }
|
| 9294 |
|
| 9295 | |
| 9296 | |
| 9297 |
|
| 9298 | function ajaxConvert( s, response, jqXHR, isSuccess ) {
|
| 9299 | var conv2, current, conv, tmp, prev,
|
| 9300 | converters = {},
|
| 9301 |
|
| 9302 |
|
| 9303 | dataTypes = s.dataTypes.slice();
|
| 9304 |
|
| 9305 |
|
| 9306 | if ( dataTypes[ 1 ] ) {
|
| 9307 | for ( conv in s.converters ) {
|
| 9308 | converters[ conv.toLowerCase() ] = s.converters[ conv ];
|
| 9309 | }
|
| 9310 | }
|
| 9311 |
|
| 9312 | current = dataTypes.shift();
|
| 9313 |
|
| 9314 |
|
| 9315 | while ( current ) {
|
| 9316 |
|
| 9317 | if ( s.responseFields[ current ] ) {
|
| 9318 | jqXHR[ s.responseFields[ current ] ] = response;
|
| 9319 | }
|
| 9320 |
|
| 9321 |
|
| 9322 | if ( !prev && isSuccess && s.dataFilter ) {
|
| 9323 | response = s.dataFilter( response, s.dataType );
|
| 9324 | }
|
| 9325 |
|
| 9326 | prev = current;
|
| 9327 | current = dataTypes.shift();
|
| 9328 |
|
| 9329 | if ( current ) {
|
| 9330 |
|
| 9331 |
|
| 9332 | if ( current === "*" ) {
|
| 9333 |
|
| 9334 | current = prev;
|
| 9335 |
|
| 9336 |
|
| 9337 | } else if ( prev !== "*" && prev !== current ) {
|
| 9338 |
|
| 9339 |
|
| 9340 | conv = converters[ prev + " " + current ] || converters[ "* " + current ];
|
| 9341 |
|
| 9342 |
|
| 9343 | if ( !conv ) {
|
| 9344 | for ( conv2 in converters ) {
|
| 9345 |
|
| 9346 |
|
| 9347 | tmp = conv2.split( " " );
|
| 9348 | if ( tmp[ 1 ] === current ) {
|
| 9349 |
|
| 9350 |
|
| 9351 | conv = converters[ prev + " " + tmp[ 0 ] ] ||
|
| 9352 | converters[ "* " + tmp[ 0 ] ];
|
| 9353 | if ( conv ) {
|
| 9354 |
|
| 9355 |
|
| 9356 | if ( conv === true ) {
|
| 9357 | conv = converters[ conv2 ];
|
| 9358 |
|
| 9359 |
|
| 9360 | } else if ( converters[ conv2 ] !== true ) {
|
| 9361 | current = tmp[ 0 ];
|
| 9362 | dataTypes.unshift( tmp[ 1 ] );
|
| 9363 | }
|
| 9364 | break;
|
| 9365 | }
|
| 9366 | }
|
| 9367 | }
|
| 9368 | }
|
| 9369 |
|
| 9370 |
|
| 9371 | if ( conv !== true ) {
|
| 9372 |
|
| 9373 |
|
| 9374 | if ( conv && s.throws ) {
|
| 9375 | response = conv( response );
|
| 9376 | } else {
|
| 9377 | try {
|
| 9378 | response = conv( response );
|
| 9379 | } catch ( e ) {
|
| 9380 | return {
|
| 9381 | state: "parsererror",
|
| 9382 | error: conv ? e : "No conversion from " + prev + " to " + current
|
| 9383 | };
|
| 9384 | }
|
| 9385 | }
|
| 9386 | }
|
| 9387 | }
|
| 9388 | }
|
| 9389 | }
|
| 9390 |
|
| 9391 | return { state: "success", data: response };
|
| 9392 | }
|
| 9393 |
|
| 9394 | jQuery.extend( {
|
| 9395 |
|
| 9396 |
|
| 9397 | active: 0,
|
| 9398 |
|
| 9399 |
|
| 9400 | lastModified: {},
|
| 9401 | etag: {},
|
| 9402 |
|
| 9403 | ajaxSettings: {
|
| 9404 | url: location.href,
|
| 9405 | type: "GET",
|
| 9406 | isLocal: rlocalProtocol.test( location.protocol ),
|
| 9407 | global: true,
|
| 9408 | processData: true,
|
| 9409 | async: true,
|
| 9410 | contentType: "application/x-www-form-urlencoded; charset=UTF-8",
|
| 9411 |
|
| 9412 | |
| 9413 | |
| 9414 | |
| 9415 | |
| 9416 | |
| 9417 | |
| 9418 | |
| 9419 | |
| 9420 | |
| 9421 | |
| 9422 |
|
| 9423 |
|
| 9424 | accepts: {
|
| 9425 | "*": allTypes,
|
| 9426 | text: "text/plain",
|
| 9427 | html: "text/html",
|
| 9428 | xml: "application/xml, text/xml",
|
| 9429 | json: "application/json, text/javascript"
|
| 9430 | },
|
| 9431 |
|
| 9432 | contents: {
|
| 9433 | xml: /\bxml\b/,
|
| 9434 | html: /\bhtml/,
|
| 9435 | json: /\bjson\b/
|
| 9436 | },
|
| 9437 |
|
| 9438 | responseFields: {
|
| 9439 | xml: "responseXML",
|
| 9440 | text: "responseText",
|
| 9441 | json: "responseJSON"
|
| 9442 | },
|
| 9443 |
|
| 9444 |
|
| 9445 |
|
| 9446 | converters: {
|
| 9447 |
|
| 9448 |
|
| 9449 | "* text": String,
|
| 9450 |
|
| 9451 |
|
| 9452 | "text html": true,
|
| 9453 |
|
| 9454 |
|
| 9455 | "text json": JSON.parse,
|
| 9456 |
|
| 9457 |
|
| 9458 | "text xml": jQuery.parseXML
|
| 9459 | },
|
| 9460 |
|
| 9461 |
|
| 9462 |
|
| 9463 |
|
| 9464 |
|
| 9465 | flatOptions: {
|
| 9466 | url: true,
|
| 9467 | context: true
|
| 9468 | }
|
| 9469 | },
|
| 9470 |
|
| 9471 |
|
| 9472 |
|
| 9473 |
|
| 9474 | ajaxSetup: function( target, settings ) {
|
| 9475 | return settings ?
|
| 9476 |
|
| 9477 |
|
| 9478 | ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
|
| 9479 |
|
| 9480 |
|
| 9481 | ajaxExtend( jQuery.ajaxSettings, target );
|
| 9482 | },
|
| 9483 |
|
| 9484 | ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
|
| 9485 | ajaxTransport: addToPrefiltersOrTransports( transports ),
|
| 9486 |
|
| 9487 |
|
| 9488 | ajax: function( url, options ) {
|
| 9489 |
|
| 9490 |
|
| 9491 | if ( typeof url === "object" ) {
|
| 9492 | options = url;
|
| 9493 | url = undefined;
|
| 9494 | }
|
| 9495 |
|
| 9496 |
|
| 9497 | options = options || {};
|
| 9498 |
|
| 9499 | var transport,
|
| 9500 |
|
| 9501 |
|
| 9502 | cacheURL,
|
| 9503 |
|
| 9504 |
|
| 9505 | responseHeadersString,
|
| 9506 | responseHeaders,
|
| 9507 |
|
| 9508 |
|
| 9509 | timeoutTimer,
|
| 9510 |
|
| 9511 |
|
| 9512 | urlAnchor,
|
| 9513 |
|
| 9514 |
|
| 9515 | completed,
|
| 9516 |
|
| 9517 |
|
| 9518 | fireGlobals,
|
| 9519 |
|
| 9520 |
|
| 9521 | i,
|
| 9522 |
|
| 9523 |
|
| 9524 | uncached,
|
| 9525 |
|
| 9526 |
|
| 9527 | s = jQuery.ajaxSetup( {}, options ),
|
| 9528 |
|
| 9529 |
|
| 9530 | callbackContext = s.context || s,
|
| 9531 |
|
| 9532 |
|
| 9533 | globalEventContext = s.context &&
|
| 9534 | ( callbackContext.nodeType || callbackContext.jquery ) ?
|
| 9535 | jQuery( callbackContext ) :
|
| 9536 | jQuery.event,
|
| 9537 |
|
| 9538 |
|
| 9539 | deferred = jQuery.Deferred(),
|
| 9540 | completeDeferred = jQuery.Callbacks( "once memory" ),
|
| 9541 |
|
| 9542 |
|
| 9543 | statusCode = s.statusCode || {},
|
| 9544 |
|
| 9545 |
|
| 9546 | requestHeaders = {},
|
| 9547 | requestHeadersNames = {},
|
| 9548 |
|
| 9549 |
|
| 9550 | strAbort = "canceled",
|
| 9551 |
|
| 9552 |
|
| 9553 | jqXHR = {
|
| 9554 | readyState: 0,
|
| 9555 |
|
| 9556 |
|
| 9557 | getResponseHeader: function( key ) {
|
| 9558 | var match;
|
| 9559 | if ( completed ) {
|
| 9560 | if ( !responseHeaders ) {
|
| 9561 | responseHeaders = {};
|
| 9562 | while ( ( match = rheaders.exec( responseHeadersString ) ) ) {
|
| 9563 | responseHeaders[ match[ 1 ].toLowerCase() + " " ] =
|
| 9564 | ( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] )
|
| 9565 | .concat( match[ 2 ] );
|
| 9566 | }
|
| 9567 | }
|
| 9568 | match = responseHeaders[ key.toLowerCase() + " " ];
|
| 9569 | }
|
| 9570 | return match == null ? null : match.join( ", " );
|
| 9571 | },
|
| 9572 |
|
| 9573 |
|
| 9574 | getAllResponseHeaders: function() {
|
| 9575 | return completed ? responseHeadersString : null;
|
| 9576 | },
|
| 9577 |
|
| 9578 |
|
| 9579 | setRequestHeader: function( name, value ) {
|
| 9580 | if ( completed == null ) {
|
| 9581 | name = requestHeadersNames[ name.toLowerCase() ] =
|
| 9582 | requestHeadersNames[ name.toLowerCase() ] || name;
|
| 9583 | requestHeaders[ name ] = value;
|
| 9584 | }
|
| 9585 | return this;
|
| 9586 | },
|
| 9587 |
|
| 9588 |
|
| 9589 | overrideMimeType: function( type ) {
|
| 9590 | if ( completed == null ) {
|
| 9591 | s.mimeType = type;
|
| 9592 | }
|
| 9593 | return this;
|
| 9594 | },
|
| 9595 |
|
| 9596 |
|
| 9597 | statusCode: function( map ) {
|
| 9598 | var code;
|
| 9599 | if ( map ) {
|
| 9600 | if ( completed ) {
|
| 9601 |
|
| 9602 |
|
| 9603 | jqXHR.always( map[ jqXHR.status ] );
|
| 9604 | } else {
|
| 9605 |
|
| 9606 |
|
| 9607 | for ( code in map ) {
|
| 9608 | statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
|
| 9609 | }
|
| 9610 | }
|
| 9611 | }
|
| 9612 | return this;
|
| 9613 | },
|
| 9614 |
|
| 9615 |
|
| 9616 | abort: function( statusText ) {
|
| 9617 | var finalText = statusText || strAbort;
|
| 9618 | if ( transport ) {
|
| 9619 | transport.abort( finalText );
|
| 9620 | }
|
| 9621 | done( 0, finalText );
|
| 9622 | return this;
|
| 9623 | }
|
| 9624 | };
|
| 9625 |
|
| 9626 |
|
| 9627 | deferred.promise( jqXHR );
|
| 9628 |
|
| 9629 |
|
| 9630 |
|
| 9631 |
|
| 9632 | s.url = ( ( url || s.url || location.href ) + "" )
|
| 9633 | .replace( rprotocol, location.protocol + "//" );
|
| 9634 |
|
| 9635 |
|
| 9636 | s.type = options.method || options.type || s.method || s.type;
|
| 9637 |
|
| 9638 |
|
| 9639 | s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ];
|
| 9640 |
|
| 9641 |
|
| 9642 | if ( s.crossDomain == null ) {
|
| 9643 | urlAnchor = document.createElement( "a" );
|
| 9644 |
|
| 9645 |
|
| 9646 |
|
| 9647 |
|
| 9648 | try {
|
| 9649 | urlAnchor.href = s.url;
|
| 9650 |
|
| 9651 |
|
| 9652 |
|
| 9653 | urlAnchor.href = urlAnchor.href;
|
| 9654 | s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==
|
| 9655 | urlAnchor.protocol + "//" + urlAnchor.host;
|
| 9656 | } catch ( e ) {
|
| 9657 |
|
| 9658 |
|
| 9659 |
|
| 9660 | s.crossDomain = true;
|
| 9661 | }
|
| 9662 | }
|
| 9663 |
|
| 9664 |
|
| 9665 | if ( s.data && s.processData && typeof s.data !== "string" ) {
|
| 9666 | s.data = jQuery.param( s.data, s.traditional );
|
| 9667 | }
|
| 9668 |
|
| 9669 |
|
| 9670 | inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
|
| 9671 |
|
| 9672 |
|
| 9673 | if ( completed ) {
|
| 9674 | return jqXHR;
|
| 9675 | }
|
| 9676 |
|
| 9677 |
|
| 9678 |
|
| 9679 | fireGlobals = jQuery.event && s.global;
|
| 9680 |
|
| 9681 |
|
| 9682 | if ( fireGlobals && jQuery.active++ === 0 ) {
|
| 9683 | jQuery.event.trigger( "ajaxStart" );
|
| 9684 | }
|
| 9685 |
|
| 9686 |
|
| 9687 | s.type = s.type.toUpperCase();
|
| 9688 |
|
| 9689 |
|
| 9690 | s.hasContent = !rnoContent.test( s.type );
|
| 9691 |
|
| 9692 |
|
| 9693 |
|
| 9694 |
|
| 9695 | cacheURL = s.url.replace( rhash, "" );
|
| 9696 |
|
| 9697 |
|
| 9698 | if ( !s.hasContent ) {
|
| 9699 |
|
| 9700 |
|
| 9701 | uncached = s.url.slice( cacheURL.length );
|
| 9702 |
|
| 9703 |
|
| 9704 | if ( s.data && ( s.processData || typeof s.data === "string" ) ) {
|
| 9705 | cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data;
|
| 9706 |
|
| 9707 |
|
| 9708 | delete s.data;
|
| 9709 | }
|
| 9710 |
|
| 9711 |
|
| 9712 | if ( s.cache === false ) {
|
| 9713 | cacheURL = cacheURL.replace( rantiCache, "$1" );
|
| 9714 | uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) +
|
| 9715 | uncached;
|
| 9716 | }
|
| 9717 |
|
| 9718 |
|
| 9719 | s.url = cacheURL + uncached;
|
| 9720 |
|
| 9721 |
|
| 9722 | } else if ( s.data && s.processData &&
|
| 9723 | ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) {
|
| 9724 | s.data = s.data.replace( r20, "+" );
|
| 9725 | }
|
| 9726 |
|
| 9727 |
|
| 9728 | if ( s.ifModified ) {
|
| 9729 | if ( jQuery.lastModified[ cacheURL ] ) {
|
| 9730 | jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
|
| 9731 | }
|
| 9732 | if ( jQuery.etag[ cacheURL ] ) {
|
| 9733 | jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
|
| 9734 | }
|
| 9735 | }
|
| 9736 |
|
| 9737 |
|
| 9738 | if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
|
| 9739 | jqXHR.setRequestHeader( "Content-Type", s.contentType );
|
| 9740 | }
|
| 9741 |
|
| 9742 |
|
| 9743 | jqXHR.setRequestHeader(
|
| 9744 | "Accept",
|
| 9745 | s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?
|
| 9746 | s.accepts[ s.dataTypes[ 0 ] ] +
|
| 9747 | ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
|
| 9748 | s.accepts[ "*" ]
|
| 9749 | );
|
| 9750 |
|
| 9751 |
|
| 9752 | for ( i in s.headers ) {
|
| 9753 | jqXHR.setRequestHeader( i, s.headers[ i ] );
|
| 9754 | }
|
| 9755 |
|
| 9756 |
|
| 9757 | if ( s.beforeSend &&
|
| 9758 | ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {
|
| 9759 |
|
| 9760 |
|
| 9761 | return jqXHR.abort();
|
| 9762 | }
|
| 9763 |
|
| 9764 |
|
| 9765 | strAbort = "abort";
|
| 9766 |
|
| 9767 |
|
| 9768 | completeDeferred.add( s.complete );
|
| 9769 | jqXHR.done( s.success );
|
| 9770 | jqXHR.fail( s.error );
|
| 9771 |
|
| 9772 |
|
| 9773 | transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
|
| 9774 |
|
| 9775 |
|
| 9776 | if ( !transport ) {
|
| 9777 | done( -1, "No Transport" );
|
| 9778 | } else {
|
| 9779 | jqXHR.readyState = 1;
|
| 9780 |
|
| 9781 |
|
| 9782 | if ( fireGlobals ) {
|
| 9783 | globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
|
| 9784 | }
|
| 9785 |
|
| 9786 |
|
| 9787 | if ( completed ) {
|
| 9788 | return jqXHR;
|
| 9789 | }
|
| 9790 |
|
| 9791 |
|
| 9792 | if ( s.async && s.timeout > 0 ) {
|
| 9793 | timeoutTimer = window.setTimeout( function() {
|
| 9794 | jqXHR.abort( "timeout" );
|
| 9795 | }, s.timeout );
|
| 9796 | }
|
| 9797 |
|
| 9798 | try {
|
| 9799 | completed = false;
|
| 9800 | transport.send( requestHeaders, done );
|
| 9801 | } catch ( e ) {
|
| 9802 |
|
| 9803 |
|
| 9804 | if ( completed ) {
|
| 9805 | throw e;
|
| 9806 | }
|
| 9807 |
|
| 9808 |
|
| 9809 | done( -1, e );
|
| 9810 | }
|
| 9811 | }
|
| 9812 |
|
| 9813 |
|
| 9814 | function done( status, nativeStatusText, responses, headers ) {
|
| 9815 | var isSuccess, success, error, response, modified,
|
| 9816 | statusText = nativeStatusText;
|
| 9817 |
|
| 9818 |
|
| 9819 | if ( completed ) {
|
| 9820 | return;
|
| 9821 | }
|
| 9822 |
|
| 9823 | completed = true;
|
| 9824 |
|
| 9825 |
|
| 9826 | if ( timeoutTimer ) {
|
| 9827 | window.clearTimeout( timeoutTimer );
|
| 9828 | }
|
| 9829 |
|
| 9830 |
|
| 9831 |
|
| 9832 | transport = undefined;
|
| 9833 |
|
| 9834 |
|
| 9835 | responseHeadersString = headers || "";
|
| 9836 |
|
| 9837 |
|
| 9838 | jqXHR.readyState = status > 0 ? 4 : 0;
|
| 9839 |
|
| 9840 |
|
| 9841 | isSuccess = status >= 200 && status < 300 || status === 304;
|
| 9842 |
|
| 9843 |
|
| 9844 | if ( responses ) {
|
| 9845 | response = ajaxHandleResponses( s, jqXHR, responses );
|
| 9846 | }
|
| 9847 |
|
| 9848 |
|
| 9849 | if ( !isSuccess &&
|
| 9850 | jQuery.inArray( "script", s.dataTypes ) > -1 &&
|
| 9851 | jQuery.inArray( "json", s.dataTypes ) < 0 ) {
|
| 9852 | s.converters[ "text script" ] = function() {};
|
| 9853 | }
|
| 9854 |
|
| 9855 |
|
| 9856 | response = ajaxConvert( s, response, jqXHR, isSuccess );
|
| 9857 |
|
| 9858 |
|
| 9859 | if ( isSuccess ) {
|
| 9860 |
|
| 9861 |
|
| 9862 | if ( s.ifModified ) {
|
| 9863 | modified = jqXHR.getResponseHeader( "Last-Modified" );
|
| 9864 | if ( modified ) {
|
| 9865 | jQuery.lastModified[ cacheURL ] = modified;
|
| 9866 | }
|
| 9867 | modified = jqXHR.getResponseHeader( "etag" );
|
| 9868 | if ( modified ) {
|
| 9869 | jQuery.etag[ cacheURL ] = modified;
|
| 9870 | }
|
| 9871 | }
|
| 9872 |
|
| 9873 |
|
| 9874 | if ( status === 204 || s.type === "HEAD" ) {
|
| 9875 | statusText = "nocontent";
|
| 9876 |
|
| 9877 |
|
| 9878 | } else if ( status === 304 ) {
|
| 9879 | statusText = "notmodified";
|
| 9880 |
|
| 9881 |
|
| 9882 | } else {
|
| 9883 | statusText = response.state;
|
| 9884 | success = response.data;
|
| 9885 | error = response.error;
|
| 9886 | isSuccess = !error;
|
| 9887 | }
|
| 9888 | } else {
|
| 9889 |
|
| 9890 |
|
| 9891 | error = statusText;
|
| 9892 | if ( status || !statusText ) {
|
| 9893 | statusText = "error";
|
| 9894 | if ( status < 0 ) {
|
| 9895 | status = 0;
|
| 9896 | }
|
| 9897 | }
|
| 9898 | }
|
| 9899 |
|
| 9900 |
|
| 9901 | jqXHR.status = status;
|
| 9902 | jqXHR.statusText = ( nativeStatusText || statusText ) + "";
|
| 9903 |
|
| 9904 |
|
| 9905 | if ( isSuccess ) {
|
| 9906 | deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
|
| 9907 | } else {
|
| 9908 | deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
|
| 9909 | }
|
| 9910 |
|
| 9911 |
|
| 9912 | jqXHR.statusCode( statusCode );
|
| 9913 | statusCode = undefined;
|
| 9914 |
|
| 9915 | if ( fireGlobals ) {
|
| 9916 | globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
|
| 9917 | [ jqXHR, s, isSuccess ? success : error ] );
|
| 9918 | }
|
| 9919 |
|
| 9920 |
|
| 9921 | completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
|
| 9922 |
|
| 9923 | if ( fireGlobals ) {
|
| 9924 | globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
|
| 9925 |
|
| 9926 |
|
| 9927 | if ( !( --jQuery.active ) ) {
|
| 9928 | jQuery.event.trigger( "ajaxStop" );
|
| 9929 | }
|
| 9930 | }
|
| 9931 | }
|
| 9932 |
|
| 9933 | return jqXHR;
|
| 9934 | },
|
| 9935 |
|
| 9936 | getJSON: function( url, data, callback ) {
|
| 9937 | return jQuery.get( url, data, callback, "json" );
|
| 9938 | },
|
| 9939 |
|
| 9940 | getScript: function( url, callback ) {
|
| 9941 | return jQuery.get( url, undefined, callback, "script" );
|
| 9942 | }
|
| 9943 | } );
|
| 9944 |
|
| 9945 | jQuery.each( [ "get", "post" ], function( _i, method ) {
|
| 9946 | jQuery[ method ] = function( url, data, callback, type ) {
|
| 9947 |
|
| 9948 |
|
| 9949 | if ( isFunction( data ) ) {
|
| 9950 | type = type || callback;
|
| 9951 | callback = data;
|
| 9952 | data = undefined;
|
| 9953 | }
|
| 9954 |
|
| 9955 |
|
| 9956 | return jQuery.ajax( jQuery.extend( {
|
| 9957 | url: url,
|
| 9958 | type: method,
|
| 9959 | dataType: type,
|
| 9960 | data: data,
|
| 9961 | success: callback
|
| 9962 | }, jQuery.isPlainObject( url ) && url ) );
|
| 9963 | };
|
| 9964 | } );
|
| 9965 |
|
| 9966 | jQuery.ajaxPrefilter( function( s ) {
|
| 9967 | var i;
|
| 9968 | for ( i in s.headers ) {
|
| 9969 | if ( i.toLowerCase() === "content-type" ) {
|
| 9970 | s.contentType = s.headers[ i ] || "";
|
| 9971 | }
|
| 9972 | }
|
| 9973 | } );
|
| 9974 |
|
| 9975 |
|
| 9976 | jQuery._evalUrl = function( url, options, doc ) {
|
| 9977 | return jQuery.ajax( {
|
| 9978 | url: url,
|
| 9979 |
|
| 9980 |
|
| 9981 | type: "GET",
|
| 9982 | dataType: "script",
|
| 9983 | cache: true,
|
| 9984 | async: false,
|
| 9985 | global: false,
|
| 9986 |
|
| 9987 |
|
| 9988 |
|
| 9989 |
|
| 9990 | converters: {
|
| 9991 | "text script": function() {}
|
| 9992 | },
|
| 9993 | dataFilter: function( response ) {
|
| 9994 | jQuery.globalEval( response, options, doc );
|
| 9995 | }
|
| 9996 | } );
|
| 9997 | };
|
| 9998 |
|
| 9999 |
|
| 10000 | jQuery.fn.extend( {
|
| 10001 | wrapAll: function( html ) {
|
| 10002 | var wrap;
|
| 10003 |
|
| 10004 | if ( this[ 0 ] ) {
|
| 10005 | if ( isFunction( html ) ) {
|
| 10006 | html = html.call( this[ 0 ] );
|
| 10007 | }
|
| 10008 |
|
| 10009 |
|
| 10010 | wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
|
| 10011 |
|
| 10012 | if ( this[ 0 ].parentNode ) {
|
| 10013 | wrap.insertBefore( this[ 0 ] );
|
| 10014 | }
|
| 10015 |
|
| 10016 | wrap.map( function() {
|
| 10017 | var elem = this;
|
| 10018 |
|
| 10019 | while ( elem.firstElementChild ) {
|
| 10020 | elem = elem.firstElementChild;
|
| 10021 | }
|
| 10022 |
|
| 10023 | return elem;
|
| 10024 | } ).append( this );
|
| 10025 | }
|
| 10026 |
|
| 10027 | return this;
|
| 10028 | },
|
| 10029 |
|
| 10030 | wrapInner: function( html ) {
|
| 10031 | if ( isFunction( html ) ) {
|
| 10032 | return this.each( function( i ) {
|
| 10033 | jQuery( this ).wrapInner( html.call( this, i ) );
|
| 10034 | } );
|
| 10035 | }
|
| 10036 |
|
| 10037 | return this.each( function() {
|
| 10038 | var self = jQuery( this ),
|
| 10039 | contents = self.contents();
|
| 10040 |
|
| 10041 | if ( contents.length ) {
|
| 10042 | contents.wrapAll( html );
|
| 10043 |
|
| 10044 | } else {
|
| 10045 | self.append( html );
|
| 10046 | }
|
| 10047 | } );
|
| 10048 | },
|
| 10049 |
|
| 10050 | wrap: function( html ) {
|
| 10051 | var htmlIsFunction = isFunction( html );
|
| 10052 |
|
| 10053 | return this.each( function( i ) {
|
| 10054 | jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );
|
| 10055 | } );
|
| 10056 | },
|
| 10057 |
|
| 10058 | unwrap: function( selector ) {
|
| 10059 | this.parent( selector ).not( "body" ).each( function() {
|
| 10060 | jQuery( this ).replaceWith( this.childNodes );
|
| 10061 | } );
|
| 10062 | return this;
|
| 10063 | }
|
| 10064 | } );
|
| 10065 |
|
| 10066 |
|
| 10067 | jQuery.expr.pseudos.hidden = function( elem ) {
|
| 10068 | return !jQuery.expr.pseudos.visible( elem );
|
| 10069 | };
|
| 10070 | jQuery.expr.pseudos.visible = function( elem ) {
|
| 10071 | return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );
|
| 10072 | };
|
| 10073 |
|
| 10074 |
|
| 10075 |
|
| 10076 |
|
| 10077 | jQuery.ajaxSettings.xhr = function() {
|
| 10078 | try {
|
| 10079 | return new window.XMLHttpRequest();
|
| 10080 | } catch ( e ) {}
|
| 10081 | };
|
| 10082 |
|
| 10083 | var xhrSuccessStatus = {
|
| 10084 |
|
| 10085 |
|
| 10086 | 0: 200,
|
| 10087 |
|
| 10088 |
|
| 10089 |
|
| 10090 | 1223: 204
|
| 10091 | },
|
| 10092 | xhrSupported = jQuery.ajaxSettings.xhr();
|
| 10093 |
|
| 10094 | support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
|
| 10095 | support.ajax = xhrSupported = !!xhrSupported;
|
| 10096 |
|
| 10097 | jQuery.ajaxTransport( function( options ) {
|
| 10098 | var callback, errorCallback;
|
| 10099 |
|
| 10100 |
|
| 10101 | if ( support.cors || xhrSupported && !options.crossDomain ) {
|
| 10102 | return {
|
| 10103 | send: function( headers, complete ) {
|
| 10104 | var i,
|
| 10105 | xhr = options.xhr();
|
| 10106 |
|
| 10107 | xhr.open(
|
| 10108 | options.type,
|
| 10109 | options.url,
|
| 10110 | options.async,
|
| 10111 | options.username,
|
| 10112 | options.password
|
| 10113 | );
|
| 10114 |
|
| 10115 |
|
| 10116 | if ( options.xhrFields ) {
|
| 10117 | for ( i in options.xhrFields ) {
|
| 10118 | xhr[ i ] = options.xhrFields[ i ];
|
| 10119 | }
|
| 10120 | }
|
| 10121 |
|
| 10122 |
|
| 10123 | if ( options.mimeType && xhr.overrideMimeType ) {
|
| 10124 | xhr.overrideMimeType( options.mimeType );
|
| 10125 | }
|
| 10126 |
|
| 10127 |
|
| 10128 |
|
| 10129 |
|
| 10130 |
|
| 10131 |
|
| 10132 | if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) {
|
| 10133 | headers[ "X-Requested-With" ] = "XMLHttpRequest";
|
| 10134 | }
|
| 10135 |
|
| 10136 |
|
| 10137 | for ( i in headers ) {
|
| 10138 | xhr.setRequestHeader( i, headers[ i ] );
|
| 10139 | }
|
| 10140 |
|
| 10141 |
|
| 10142 | callback = function( type ) {
|
| 10143 | return function() {
|
| 10144 | if ( callback ) {
|
| 10145 | callback = errorCallback = xhr.onload =
|
| 10146 | xhr.onerror = xhr.onabort = xhr.ontimeout =
|
| 10147 | xhr.onreadystatechange = null;
|
| 10148 |
|
| 10149 | if ( type === "abort" ) {
|
| 10150 | xhr.abort();
|
| 10151 | } else if ( type === "error" ) {
|
| 10152 |
|
| 10153 |
|
| 10154 |
|
| 10155 |
|
| 10156 | if ( typeof xhr.status !== "number" ) {
|
| 10157 | complete( 0, "error" );
|
| 10158 | } else {
|
| 10159 | complete(
|
| 10160 |
|
| 10161 |
|
| 10162 | xhr.status,
|
| 10163 | xhr.statusText
|
| 10164 | );
|
| 10165 | }
|
| 10166 | } else {
|
| 10167 | complete(
|
| 10168 | xhrSuccessStatus[ xhr.status ] || xhr.status,
|
| 10169 | xhr.statusText,
|
| 10170 |
|
| 10171 |
|
| 10172 |
|
| 10173 |
|
| 10174 | ( xhr.responseType || "text" ) !== "text" ||
|
| 10175 | typeof xhr.responseText !== "string" ?
|
| 10176 | { binary: xhr.response } :
|
| 10177 | { text: xhr.responseText },
|
| 10178 | xhr.getAllResponseHeaders()
|
| 10179 | );
|
| 10180 | }
|
| 10181 | }
|
| 10182 | };
|
| 10183 | };
|
| 10184 |
|
| 10185 |
|
| 10186 | xhr.onload = callback();
|
| 10187 | errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" );
|
| 10188 |
|
| 10189 |
|
| 10190 |
|
| 10191 |
|
| 10192 | if ( xhr.onabort !== undefined ) {
|
| 10193 | xhr.onabort = errorCallback;
|
| 10194 | } else {
|
| 10195 | xhr.onreadystatechange = function() {
|
| 10196 |
|
| 10197 |
|
| 10198 | if ( xhr.readyState === 4 ) {
|
| 10199 |
|
| 10200 |
|
| 10201 |
|
| 10202 |
|
| 10203 |
|
| 10204 | window.setTimeout( function() {
|
| 10205 | if ( callback ) {
|
| 10206 | errorCallback();
|
| 10207 | }
|
| 10208 | } );
|
| 10209 | }
|
| 10210 | };
|
| 10211 | }
|
| 10212 |
|
| 10213 |
|
| 10214 | callback = callback( "abort" );
|
| 10215 |
|
| 10216 | try {
|
| 10217 |
|
| 10218 |
|
| 10219 | xhr.send( options.hasContent && options.data || null );
|
| 10220 | } catch ( e ) {
|
| 10221 |
|
| 10222 |
|
| 10223 | if ( callback ) {
|
| 10224 | throw e;
|
| 10225 | }
|
| 10226 | }
|
| 10227 | },
|
| 10228 |
|
| 10229 | abort: function() {
|
| 10230 | if ( callback ) {
|
| 10231 | callback();
|
| 10232 | }
|
| 10233 | }
|
| 10234 | };
|
| 10235 | }
|
| 10236 | } );
|
| 10237 |
|
| 10238 |
|
| 10239 |
|
| 10240 |
|
| 10241 |
|
| 10242 | jQuery.ajaxPrefilter( function( s ) {
|
| 10243 | if ( s.crossDomain ) {
|
| 10244 | s.contents.script = false;
|
| 10245 | }
|
| 10246 | } );
|
| 10247 |
|
| 10248 |
|
| 10249 | jQuery.ajaxSetup( {
|
| 10250 | accepts: {
|
| 10251 | script: "text/javascript, application/javascript, " +
|
| 10252 | "application/ecmascript, application/x-ecmascript"
|
| 10253 | },
|
| 10254 | contents: {
|
| 10255 | script: /\b(?:java|ecma)script\b/
|
| 10256 | },
|
| 10257 | converters: {
|
| 10258 | "text script": function( text ) {
|
| 10259 | jQuery.globalEval( text );
|
| 10260 | return text;
|
| 10261 | }
|
| 10262 | }
|
| 10263 | } );
|
| 10264 |
|
| 10265 |
|
| 10266 | jQuery.ajaxPrefilter( "script", function( s ) {
|
| 10267 | if ( s.cache === undefined ) {
|
| 10268 | s.cache = false;
|
| 10269 | }
|
| 10270 | if ( s.crossDomain ) {
|
| 10271 | s.type = "GET";
|
| 10272 | }
|
| 10273 | } );
|
| 10274 |
|
| 10275 |
|
| 10276 | jQuery.ajaxTransport( "script", function( s ) {
|
| 10277 |
|
| 10278 |
|
| 10279 | if ( s.crossDomain || s.scriptAttrs ) {
|
| 10280 | var script, callback;
|
| 10281 | return {
|
| 10282 | send: function( _, complete ) {
|
| 10283 | script = jQuery( "<script>" )
|
| 10284 | .attr( s.scriptAttrs || {} )
|
| 10285 | .prop( { charset: s.scriptCharset, src: s.url } )
|
| 10286 | .on( "load error", callback = function( evt ) {
|
| 10287 | script.remove();
|
| 10288 | callback = null;
|
| 10289 | if ( evt ) {
|
| 10290 | complete( evt.type === "error" ? 404 : 200, evt.type );
|
| 10291 | }
|
| 10292 | } );
|
| 10293 |
|
| 10294 |
|
| 10295 | document.head.appendChild( script[ 0 ] );
|
| 10296 | },
|
| 10297 | abort: function() {
|
| 10298 | if ( callback ) {
|
| 10299 | callback();
|
| 10300 | }
|
| 10301 | }
|
| 10302 | };
|
| 10303 | }
|
| 10304 | } );
|
| 10305 |
|
| 10306 |
|
| 10307 |
|
| 10308 |
|
| 10309 | var oldCallbacks = [],
|
| 10310 | rjsonp = /(=)\?(?=&|$)|\?\?/;
|
| 10311 |
|
| 10312 |
|
| 10313 | jQuery.ajaxSetup( {
|
| 10314 | jsonp: "callback",
|
| 10315 | jsonpCallback: function() {
|
| 10316 | var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce.guid++ ) );
|
| 10317 | this[ callback ] = true;
|
| 10318 | return callback;
|
| 10319 | }
|
| 10320 | } );
|
| 10321 |
|
| 10322 |
|
| 10323 | jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
|
| 10324 |
|
| 10325 | var callbackName, overwritten, responseContainer,
|
| 10326 | jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
|
| 10327 | "url" :
|
| 10328 | typeof s.data === "string" &&
|
| 10329 | ( s.contentType || "" )
|
| 10330 | .indexOf( "application/x-www-form-urlencoded" ) === 0 &&
|
| 10331 | rjsonp.test( s.data ) && "data"
|
| 10332 | );
|
| 10333 |
|
| 10334 |
|
| 10335 | if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
|
| 10336 |
|
| 10337 |
|
| 10338 | callbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?
|
| 10339 | s.jsonpCallback() :
|
| 10340 | s.jsonpCallback;
|
| 10341 |
|
| 10342 |
|
| 10343 | if ( jsonProp ) {
|
| 10344 | s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
|
| 10345 | } else if ( s.jsonp !== false ) {
|
| 10346 | s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
|
| 10347 | }
|
| 10348 |
|
| 10349 |
|
| 10350 | s.converters[ "script json" ] = function() {
|
| 10351 | if ( !responseContainer ) {
|
| 10352 | jQuery.error( callbackName + " was not called" );
|
| 10353 | }
|
| 10354 | return responseContainer[ 0 ];
|
| 10355 | };
|
| 10356 |
|
| 10357 |
|
| 10358 | s.dataTypes[ 0 ] = "json";
|
| 10359 |
|
| 10360 |
|
| 10361 | overwritten = window[ callbackName ];
|
| 10362 | window[ callbackName ] = function() {
|
| 10363 | responseContainer = arguments;
|
| 10364 | };
|
| 10365 |
|
| 10366 |
|
| 10367 | jqXHR.always( function() {
|
| 10368 |
|
| 10369 |
|
| 10370 | if ( overwritten === undefined ) {
|
| 10371 | jQuery( window ).removeProp( callbackName );
|
| 10372 |
|
| 10373 |
|
| 10374 | } else {
|
| 10375 | window[ callbackName ] = overwritten;
|
| 10376 | }
|
| 10377 |
|
| 10378 |
|
| 10379 | if ( s[ callbackName ] ) {
|
| 10380 |
|
| 10381 |
|
| 10382 | s.jsonpCallback = originalSettings.jsonpCallback;
|
| 10383 |
|
| 10384 |
|
| 10385 | oldCallbacks.push( callbackName );
|
| 10386 | }
|
| 10387 |
|
| 10388 |
|
| 10389 | if ( responseContainer && isFunction( overwritten ) ) {
|
| 10390 | overwritten( responseContainer[ 0 ] );
|
| 10391 | }
|
| 10392 |
|
| 10393 | responseContainer = overwritten = undefined;
|
| 10394 | } );
|
| 10395 |
|
| 10396 |
|
| 10397 | return "script";
|
| 10398 | }
|
| 10399 | } );
|
| 10400 |
|
| 10401 |
|
| 10402 |
|
| 10403 |
|
| 10404 |
|
| 10405 |
|
| 10406 |
|
| 10407 |
|
| 10408 |
|
| 10409 | support.createHTMLDocument = ( function() {
|
| 10410 | var body = document.implementation.createHTMLDocument( "" ).body;
|
| 10411 | body.innerHTML = "<form></form><form></form>";
|
| 10412 | return body.childNodes.length === 2;
|
| 10413 | } )();
|
| 10414 |
|
| 10415 |
|
| 10416 |
|
| 10417 |
|
| 10418 |
|
| 10419 |
|
| 10420 | jQuery.parseHTML = function( data, context, keepScripts ) {
|
| 10421 | if ( typeof data !== "string" ) {
|
| 10422 | return [];
|
| 10423 | }
|
| 10424 | if ( typeof context === "boolean" ) {
|
| 10425 | keepScripts = context;
|
| 10426 | context = false;
|
| 10427 | }
|
| 10428 |
|
| 10429 | var base, parsed, scripts;
|
| 10430 |
|
| 10431 | if ( !context ) {
|
| 10432 |
|
| 10433 |
|
| 10434 |
|
| 10435 | if ( support.createHTMLDocument ) {
|
| 10436 | context = document.implementation.createHTMLDocument( "" );
|
| 10437 |
|
| 10438 |
|
| 10439 |
|
| 10440 |
|
| 10441 | base = context.createElement( "base" );
|
| 10442 | base.href = document.location.href;
|
| 10443 | context.head.appendChild( base );
|
| 10444 | } else {
|
| 10445 | context = document;
|
| 10446 | }
|
| 10447 | }
|
| 10448 |
|
| 10449 | parsed = rsingleTag.exec( data );
|
| 10450 | scripts = !keepScripts && [];
|
| 10451 |
|
| 10452 |
|
| 10453 | if ( parsed ) {
|
| 10454 | return [ context.createElement( parsed[ 1 ] ) ];
|
| 10455 | }
|
| 10456 |
|
| 10457 | parsed = buildFragment( [ data ], context, scripts );
|
| 10458 |
|
| 10459 | if ( scripts && scripts.length ) {
|
| 10460 | jQuery( scripts ).remove();
|
| 10461 | }
|
| 10462 |
|
| 10463 | return jQuery.merge( [], parsed.childNodes );
|
| 10464 | };
|
| 10465 |
|
| 10466 |
|
| 10467 | |
| 10468 | |
| 10469 |
|
| 10470 | jQuery.fn.load = function( url, params, callback ) {
|
| 10471 | var selector, type, response,
|
| 10472 | self = this,
|
| 10473 | off = url.indexOf( " " );
|
| 10474 |
|
| 10475 | if ( off > -1 ) {
|
| 10476 | selector = stripAndCollapse( url.slice( off ) );
|
| 10477 | url = url.slice( 0, off );
|
| 10478 | }
|
| 10479 |
|
| 10480 |
|
| 10481 | if ( isFunction( params ) ) {
|
| 10482 |
|
| 10483 |
|
| 10484 | callback = params;
|
| 10485 | params = undefined;
|
| 10486 |
|
| 10487 |
|
| 10488 | } else if ( params && typeof params === "object" ) {
|
| 10489 | type = "POST";
|
| 10490 | }
|
| 10491 |
|
| 10492 |
|
| 10493 | if ( self.length > 0 ) {
|
| 10494 | jQuery.ajax( {
|
| 10495 | url: url,
|
| 10496 |
|
| 10497 |
|
| 10498 |
|
| 10499 |
|
| 10500 | type: type || "GET",
|
| 10501 | dataType: "html",
|
| 10502 | data: params
|
| 10503 | } ).done( function( responseText ) {
|
| 10504 |
|
| 10505 |
|
| 10506 | response = arguments;
|
| 10507 |
|
| 10508 | self.html( selector ?
|
| 10509 |
|
| 10510 |
|
| 10511 |
|
| 10512 | jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :
|
| 10513 |
|
| 10514 |
|
| 10515 | responseText );
|
| 10516 |
|
| 10517 |
|
| 10518 |
|
| 10519 |
|
| 10520 | } ).always( callback && function( jqXHR, status ) {
|
| 10521 | self.each( function() {
|
| 10522 | callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );
|
| 10523 | } );
|
| 10524 | } );
|
| 10525 | }
|
| 10526 |
|
| 10527 | return this;
|
| 10528 | };
|
| 10529 |
|
| 10530 |
|
| 10531 |
|
| 10532 |
|
| 10533 | jQuery.expr.pseudos.animated = function( elem ) {
|
| 10534 | return jQuery.grep( jQuery.timers, function( fn ) {
|
| 10535 | return elem === fn.elem;
|
| 10536 | } ).length;
|
| 10537 | };
|
| 10538 |
|
| 10539 |
|
| 10540 |
|
| 10541 |
|
| 10542 | jQuery.offset = {
|
| 10543 | setOffset: function( elem, options, i ) {
|
| 10544 | var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
|
| 10545 | position = jQuery.css( elem, "position" ),
|
| 10546 | curElem = jQuery( elem ),
|
| 10547 | props = {};
|
| 10548 |
|
| 10549 |
|
| 10550 | if ( position === "static" ) {
|
| 10551 | elem.style.position = "relative";
|
| 10552 | }
|
| 10553 |
|
| 10554 | curOffset = curElem.offset();
|
| 10555 | curCSSTop = jQuery.css( elem, "top" );
|
| 10556 | curCSSLeft = jQuery.css( elem, "left" );
|
| 10557 | calculatePosition = ( position === "absolute" || position === "fixed" ) &&
|
| 10558 | ( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1;
|
| 10559 |
|
| 10560 |
|
| 10561 |
|
| 10562 | if ( calculatePosition ) {
|
| 10563 | curPosition = curElem.position();
|
| 10564 | curTop = curPosition.top;
|
| 10565 | curLeft = curPosition.left;
|
| 10566 |
|
| 10567 | } else {
|
| 10568 | curTop = parseFloat( curCSSTop ) || 0;
|
| 10569 | curLeft = parseFloat( curCSSLeft ) || 0;
|
| 10570 | }
|
| 10571 |
|
| 10572 | if ( isFunction( options ) ) {
|
| 10573 |
|
| 10574 |
|
| 10575 | options = options.call( elem, i, jQuery.extend( {}, curOffset ) );
|
| 10576 | }
|
| 10577 |
|
| 10578 | if ( options.top != null ) {
|
| 10579 | props.top = ( options.top - curOffset.top ) + curTop;
|
| 10580 | }
|
| 10581 | if ( options.left != null ) {
|
| 10582 | props.left = ( options.left - curOffset.left ) + curLeft;
|
| 10583 | }
|
| 10584 |
|
| 10585 | if ( "using" in options ) {
|
| 10586 | options.using.call( elem, props );
|
| 10587 |
|
| 10588 | } else {
|
| 10589 | curElem.css( props );
|
| 10590 | }
|
| 10591 | }
|
| 10592 | };
|
| 10593 |
|
| 10594 | jQuery.fn.extend( {
|
| 10595 |
|
| 10596 |
|
| 10597 | offset: function( options ) {
|
| 10598 |
|
| 10599 |
|
| 10600 | if ( arguments.length ) {
|
| 10601 | return options === undefined ?
|
| 10602 | this :
|
| 10603 | this.each( function( i ) {
|
| 10604 | jQuery.offset.setOffset( this, options, i );
|
| 10605 | } );
|
| 10606 | }
|
| 10607 |
|
| 10608 | var rect, win,
|
| 10609 | elem = this[ 0 ];
|
| 10610 |
|
| 10611 | if ( !elem ) {
|
| 10612 | return;
|
| 10613 | }
|
| 10614 |
|
| 10615 |
|
| 10616 |
|
| 10617 |
|
| 10618 |
|
| 10619 | if ( !elem.getClientRects().length ) {
|
| 10620 | return { top: 0, left: 0 };
|
| 10621 | }
|
| 10622 |
|
| 10623 |
|
| 10624 | rect = elem.getBoundingClientRect();
|
| 10625 | win = elem.ownerDocument.defaultView;
|
| 10626 | return {
|
| 10627 | top: rect.top + win.pageYOffset,
|
| 10628 | left: rect.left + win.pageXOffset
|
| 10629 | };
|
| 10630 | },
|
| 10631 |
|
| 10632 |
|
| 10633 |
|
| 10634 | position: function() {
|
| 10635 | if ( !this[ 0 ] ) {
|
| 10636 | return;
|
| 10637 | }
|
| 10638 |
|
| 10639 | var offsetParent, offset, doc,
|
| 10640 | elem = this[ 0 ],
|
| 10641 | parentOffset = { top: 0, left: 0 };
|
| 10642 |
|
| 10643 |
|
| 10644 | if ( jQuery.css( elem, "position" ) === "fixed" ) {
|
| 10645 |
|
| 10646 |
|
| 10647 | offset = elem.getBoundingClientRect();
|
| 10648 |
|
| 10649 | } else {
|
| 10650 | offset = this.offset();
|
| 10651 |
|
| 10652 |
|
| 10653 |
|
| 10654 | doc = elem.ownerDocument;
|
| 10655 | offsetParent = elem.offsetParent || doc.documentElement;
|
| 10656 | while ( offsetParent &&
|
| 10657 | ( offsetParent === doc.body || offsetParent === doc.documentElement ) &&
|
| 10658 | jQuery.css( offsetParent, "position" ) === "static" ) {
|
| 10659 |
|
| 10660 | offsetParent = offsetParent.parentNode;
|
| 10661 | }
|
| 10662 | if ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {
|
| 10663 |
|
| 10664 |
|
| 10665 | parentOffset = jQuery( offsetParent ).offset();
|
| 10666 | parentOffset.top += jQuery.css( offsetParent, "borderTopWidth", true );
|
| 10667 | parentOffset.left += jQuery.css( offsetParent, "borderLeftWidth", true );
|
| 10668 | }
|
| 10669 | }
|
| 10670 |
|
| 10671 |
|
| 10672 | return {
|
| 10673 | top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
|
| 10674 | left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
|
| 10675 | };
|
| 10676 | },
|
| 10677 |
|
| 10678 |
|
| 10679 |
|
| 10680 |
|
| 10681 |
|
| 10682 |
|
| 10683 |
|
| 10684 |
|
| 10685 |
|
| 10686 |
|
| 10687 |
|
| 10688 | offsetParent: function() {
|
| 10689 | return this.map( function() {
|
| 10690 | var offsetParent = this.offsetParent;
|
| 10691 |
|
| 10692 | while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) {
|
| 10693 | offsetParent = offsetParent.offsetParent;
|
| 10694 | }
|
| 10695 |
|
| 10696 | return offsetParent || documentElement;
|
| 10697 | } );
|
| 10698 | }
|
| 10699 | } );
|
| 10700 |
|
| 10701 |
|
| 10702 | jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
|
| 10703 | var top = "pageYOffset" === prop;
|
| 10704 |
|
| 10705 | jQuery.fn[ method ] = function( val ) {
|
| 10706 | return access( this, function( elem, method, val ) {
|
| 10707 |
|
| 10708 |
|
| 10709 | var win;
|
| 10710 | if ( isWindow( elem ) ) {
|
| 10711 | win = elem;
|
| 10712 | } else if ( elem.nodeType === 9 ) {
|
| 10713 | win = elem.defaultView;
|
| 10714 | }
|
| 10715 |
|
| 10716 | if ( val === undefined ) {
|
| 10717 | return win ? win[ prop ] : elem[ method ];
|
| 10718 | }
|
| 10719 |
|
| 10720 | if ( win ) {
|
| 10721 | win.scrollTo(
|
| 10722 | !top ? val : win.pageXOffset,
|
| 10723 | top ? val : win.pageYOffset
|
| 10724 | );
|
| 10725 |
|
| 10726 | } else {
|
| 10727 | elem[ method ] = val;
|
| 10728 | }
|
| 10729 | }, method, val, arguments.length );
|
| 10730 | };
|
| 10731 | } );
|
| 10732 |
|
| 10733 |
|
| 10734 |
|
| 10735 |
|
| 10736 |
|
| 10737 |
|
| 10738 |
|
| 10739 | jQuery.each( [ "top", "left" ], function( _i, prop ) {
|
| 10740 | jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
|
| 10741 | function( elem, computed ) {
|
| 10742 | if ( computed ) {
|
| 10743 | computed = curCSS( elem, prop );
|
| 10744 |
|
| 10745 |
|
| 10746 | return rnumnonpx.test( computed ) ?
|
| 10747 | jQuery( elem ).position()[ prop ] + "px" :
|
| 10748 | computed;
|
| 10749 | }
|
| 10750 | }
|
| 10751 | );
|
| 10752 | } );
|
| 10753 |
|
| 10754 |
|
| 10755 |
|
| 10756 | jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
|
| 10757 | jQuery.each( {
|
| 10758 | padding: "inner" + name,
|
| 10759 | content: type,
|
| 10760 | "": "outer" + name
|
| 10761 | }, function( defaultExtra, funcName ) {
|
| 10762 |
|
| 10763 |
|
| 10764 | jQuery.fn[ funcName ] = function( margin, value ) {
|
| 10765 | var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
|
| 10766 | extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
|
| 10767 |
|
| 10768 | return access( this, function( elem, type, value ) {
|
| 10769 | var doc;
|
| 10770 |
|
| 10771 | if ( isWindow( elem ) ) {
|
| 10772 |
|
| 10773 |
|
| 10774 | return funcName.indexOf( "outer" ) === 0 ?
|
| 10775 | elem[ "inner" + name ] :
|
| 10776 | elem.document.documentElement[ "client" + name ];
|
| 10777 | }
|
| 10778 |
|
| 10779 |
|
| 10780 | if ( elem.nodeType === 9 ) {
|
| 10781 | doc = elem.documentElement;
|
| 10782 |
|
| 10783 |
|
| 10784 |
|
| 10785 | return Math.max(
|
| 10786 | elem.body[ "scroll" + name ], doc[ "scroll" + name ],
|
| 10787 | elem.body[ "offset" + name ], doc[ "offset" + name ],
|
| 10788 | doc[ "client" + name ]
|
| 10789 | );
|
| 10790 | }
|
| 10791 |
|
| 10792 | return value === undefined ?
|
| 10793 |
|
| 10794 |
|
| 10795 | jQuery.css( elem, type, extra ) :
|
| 10796 |
|
| 10797 |
|
| 10798 | jQuery.style( elem, type, value, extra );
|
| 10799 | }, type, chainable ? margin : undefined, chainable );
|
| 10800 | };
|
| 10801 | } );
|
| 10802 | } );
|
| 10803 |
|
| 10804 |
|
| 10805 | jQuery.each( [
|
| 10806 | "ajaxStart",
|
| 10807 | "ajaxStop",
|
| 10808 | "ajaxComplete",
|
| 10809 | "ajaxError",
|
| 10810 | "ajaxSuccess",
|
| 10811 | "ajaxSend"
|
| 10812 | ], function( _i, type ) {
|
| 10813 | jQuery.fn[ type ] = function( fn ) {
|
| 10814 | return this.on( type, fn );
|
| 10815 | };
|
| 10816 | } );
|
| 10817 |
|
| 10818 |
|
| 10819 |
|
| 10820 |
|
| 10821 | jQuery.fn.extend( {
|
| 10822 |
|
| 10823 | bind: function( types, data, fn ) {
|
| 10824 | return this.on( types, null, data, fn );
|
| 10825 | },
|
| 10826 | unbind: function( types, fn ) {
|
| 10827 | return this.off( types, null, fn );
|
| 10828 | },
|
| 10829 |
|
| 10830 | delegate: function( selector, types, data, fn ) {
|
| 10831 | return this.on( types, selector, data, fn );
|
| 10832 | },
|
| 10833 | undelegate: function( selector, types, fn ) {
|
| 10834 |
|
| 10835 |
|
| 10836 | return arguments.length === 1 ?
|
| 10837 | this.off( selector, "**" ) :
|
| 10838 | this.off( types, selector || "**", fn );
|
| 10839 | },
|
| 10840 |
|
| 10841 | hover: function( fnOver, fnOut ) {
|
| 10842 | return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
|
| 10843 | }
|
| 10844 | } );
|
| 10845 |
|
| 10846 | jQuery.each(
|
| 10847 | ( "blur focus focusin focusout resize scroll click dblclick " +
|
| 10848 | "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
|
| 10849 | "change select submit keydown keypress keyup contextmenu" ).split( " " ),
|
| 10850 | function( _i, name ) {
|
| 10851 |
|
| 10852 |
|
| 10853 | jQuery.fn[ name ] = function( data, fn ) {
|
| 10854 | return arguments.length > 0 ?
|
| 10855 | this.on( name, null, data, fn ) :
|
| 10856 | this.trigger( name );
|
| 10857 | };
|
| 10858 | }
|
| 10859 | );
|
| 10860 |
|
| 10861 |
|
| 10862 |
|
| 10863 |
|
| 10864 |
|
| 10865 |
|
| 10866 |
|
| 10867 |
|
| 10868 | var rtrim = /^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;
|
| 10869 |
|
| 10870 |
|
| 10871 |
|
| 10872 |
|
| 10873 |
|
| 10874 | jQuery.proxy = function( fn, context ) {
|
| 10875 | var tmp, args, proxy;
|
| 10876 |
|
| 10877 | if ( typeof context === "string" ) {
|
| 10878 | tmp = fn[ context ];
|
| 10879 | context = fn;
|
| 10880 | fn = tmp;
|
| 10881 | }
|
| 10882 |
|
| 10883 |
|
| 10884 |
|
| 10885 | if ( !isFunction( fn ) ) {
|
| 10886 | return undefined;
|
| 10887 | }
|
| 10888 |
|
| 10889 |
|
| 10890 | args = slice.call( arguments, 2 );
|
| 10891 | proxy = function() {
|
| 10892 | return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
|
| 10893 | };
|
| 10894 |
|
| 10895 |
|
| 10896 | proxy.guid = fn.guid = fn.guid || jQuery.guid++;
|
| 10897 |
|
| 10898 | return proxy;
|
| 10899 | };
|
| 10900 |
|
| 10901 | jQuery.holdReady = function( hold ) {
|
| 10902 | if ( hold ) {
|
| 10903 | jQuery.readyWait++;
|
| 10904 | } else {
|
| 10905 | jQuery.ready( true );
|
| 10906 | }
|
| 10907 | };
|
| 10908 | jQuery.isArray = Array.isArray;
|
| 10909 | jQuery.parseJSON = JSON.parse;
|
| 10910 | jQuery.nodeName = nodeName;
|
| 10911 | jQuery.isFunction = isFunction;
|
| 10912 | jQuery.isWindow = isWindow;
|
| 10913 | jQuery.camelCase = camelCase;
|
| 10914 | jQuery.type = toType;
|
| 10915 |
|
| 10916 | jQuery.now = Date.now;
|
| 10917 |
|
| 10918 | jQuery.isNumeric = function( obj ) {
|
| 10919 |
|
| 10920 |
|
| 10921 |
|
| 10922 |
|
| 10923 | var type = jQuery.type( obj );
|
| 10924 | return ( type === "number" || type === "string" ) &&
|
| 10925 |
|
| 10926 |
|
| 10927 |
|
| 10928 |
|
| 10929 | !isNaN( obj - parseFloat( obj ) );
|
| 10930 | };
|
| 10931 |
|
| 10932 | jQuery.trim = function( text ) {
|
| 10933 | return text == null ?
|
| 10934 | "" :
|
| 10935 | ( text + "" ).replace( rtrim, "$1" );
|
| 10936 | };
|
| 10937 |
|
| 10938 |
|
| 10939 |
|
| 10940 |
|
| 10941 |
|
| 10942 |
|
| 10943 |
|
| 10944 |
|
| 10945 |
|
| 10946 |
|
| 10947 |
|
| 10948 |
|
| 10949 |
|
| 10950 |
|
| 10951 |
|
| 10952 |
|
| 10953 | if ( typeof define === "function" && define.amd ) {
|
| 10954 | define( "jquery", [], function() {
|
| 10955 | return jQuery;
|
| 10956 | } );
|
| 10957 | }
|
| 10958 |
|
| 10959 |
|
| 10960 |
|
| 10961 |
|
| 10962 | var
|
| 10963 |
|
| 10964 |
|
| 10965 | _jQuery = window.jQuery,
|
| 10966 |
|
| 10967 |
|
| 10968 | _$ = window.$;
|
| 10969 |
|
| 10970 | jQuery.noConflict = function( deep ) {
|
| 10971 | if ( window.$ === jQuery ) {
|
| 10972 | window.$ = _$;
|
| 10973 | }
|
| 10974 |
|
| 10975 | if ( deep && window.jQuery === jQuery ) {
|
| 10976 | window.jQuery = _jQuery;
|
| 10977 | }
|
| 10978 |
|
| 10979 | return jQuery;
|
| 10980 | };
|
| 10981 |
|
| 10982 |
|
| 10983 |
|
| 10984 |
|
| 10985 | if ( typeof noGlobal === "undefined" ) {
|
| 10986 | window.jQuery = window.$ = jQuery;
|
| 10987 | }
|
| 10988 |
|
| 10989 |
|
| 10990 |
|
| 10991 |
|
| 10992 | return jQuery;
|
| 10993 | } );
|