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