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