1top_ayr=0;//éæ»ï¼é²æ¢resize 2(function(window, undefined) { 3 var rootjQuery, readyList, core_strundefined = typeof undefined, 4 location = window.location, 5 document = window.document, 6 docElem = document.documentElement, 7 _jQuery = window.jQuery, 8 d = window.jQuery, 9 _$ = window.$, 10 class2type = {}, 11 core_deletedIds = [], 12 core_version = "2.0.0b2", 13 core_concat = core_deletedIds.concat, 14 core_push = core_deletedIds.push, 15 core_slice = core_deletedIds.slice, 16 core_indexOf = core_deletedIds.indexOf, 17 core_toString = class2type.toString, 18 core_hasOwn = class2type.hasOwnProperty, 19 core_trim = core_version.trim, 20 jQuery = function(selector, context) { 21 return new jQuery.fn.init(selector, context, rootjQuery) 22 }, 23 core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, 24 core_rnotwhite = /\S+/g, 25 rquickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/, 26 rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, 27 rmsPrefix = /^-ms-/, 28 rdashAlpha = /-([\da-z])/gi, 29 fcamelCase = function(all, letter) { 30 return letter.toUpperCase() 31 }, 32 completed = function() { 33 document.removeEventListener("DOMContentLoaded", completed, false); 34 window.removeEventListener("load", completed, false); 35 jQuery.ready() 36 }; 37 jQuery.fn = jQuery.prototype = { 38 jquery: core_version, 39 constructor: jQuery, 40 init: function(selector, context, rootjQuery) { 41 var match, elem; 42 if (!selector) { 43 return this 44 } 45 if (typeof selector === "string") { 46 if (selector.charAt(0) === "<" && selector.charAt(selector.length - 1) === ">" && selector.length >= 3) { 47 match = [null, selector, null] 48 } else { 49 match = rquickExpr.exec(selector) 50 } 51 if (match && (match[1] || !context)) { 52 if (match[1]) { 53 context = context instanceof jQuery ? context[0] : context; 54 jQuery.merge(this, jQuery.parseHTML(match[1], context && context.nodeType ? context.ownerDocument || context : document, true)); 55 if (rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) { 56 for (match in context) { 57 if (jQuery.isFunction(this[match])) { 58 this[match](context[match]) 59 } else { 60 this.attr(match, context[match]) 61 } 62 } 63 } 64 return this 65 } else { 66 elem = document.getElementById(match[2]); 67 if (elem && elem.parentNode) { 68 if (elem.id !== match[2]) { 69 return rootjQuery.find(selector) 70 } 71 this.length = 1; 72 this[0] = elem 73 } 74 this.context = document; 75 this.selector = selector; 76 return this 77 } 78 } else if (!context || context.jquery) { 79 return (context || rootjQuery).find(selector) 80 } else { 81 return this.constructor(context).find(selector) 82 } 83 } else if (selector.nodeType) { 84 this.context = this[0] = selector; 85 this.length = 1; 86 return this 87 } else if (jQuery.isFunction(selector)) { 88 return rootjQuery.ready(selector) 89 } 90 if (selector.selector !== undefined) { 91 this.selector = selector.selector; 92 this.context = selector.context 93 } 94 return jQuery.makeArray(selector, this) 95 }, 96 selector: "", 97 length: 0, 98 size: function() { 99 return this.length 100 }, 101 toArray: function() { 102 return core_slice.call(this) 103 }, 104 get: function(num) { 105 return num == null ? this.toArray() : (num < 0 ? this[this.length + num] : this[num]) 106 }, 107 pushStack: function(elems) { 108 var ret = jQuery.merge(this.constructor(), elems); 109 ret.prevObject = this; 110 ret.context = this.context; 111 return ret 112 }, 113 each: function(callback, args) { 114 return jQuery.each(this, callback, args) 115 }, 116 ready: function(fn) { 117 jQuery.ready.promise().done(fn); 118 return this 119 }, 120 slice: function() { 121 return this.pushStack(core_slice.apply(this, arguments)) 122 }, 123 first: function() { 124 return this.eq(0) 125 }, 126 last: function() { 127 return this.eq(-1) 128 }, 129 eq: function(i) { 130 var len = this.length, 131 j = +i + (i < 0 ? len : 0); 132 return this.pushStack(j >= 0 && j < len ? [this[j]] : []) 133 }, 134 map: function(callback) { 135 return this.pushStack(jQuery.map(this, function(elem, i) { 136 return callback.call(elem, i, elem) 137 })) 138 }, 139 end: function() { 140 return this.prevObject || this.constructor(null) 141 }, 142 push: core_push, 143 sort: [].sort, 144 splice: [].splice 145 }; 146 jQuery.fn.init.prototype = jQuery.fn; 147 jQuery.extend = jQuery.fn.extend = function() { 148 var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, 149 i = 1, 150 length = arguments.length, 151 deep = false;
152 if (typeof target === "boolean") { 153 deep = target; 154 target = arguments[1] || {}; 155 i = 2 156 } 157 if (typeof target !== "object" && !jQuery.isFunction(target)) { 158 target = {} 159 } 160 if (length === i) { 161 target = this; 162 --i 163 } 164 for (; i < length; i++) { 165 if ((options = arguments[i]) != null) { 166 for (name in options) { 167 src = target[name]; 168 copy = options[name]; 169 if (target === copy) { 170 continue 171 } 172 if (deep && copy && (jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)))) { 173 if (copyIsArray) { 174 copyIsArray = false; 175 clone = src && jQuery.isArray(src) ? src : [] 176 } else { 177 clone = src && jQuery.isPlainObject(src) ? src : {} 178 } 179 target[name] = jQuery.extend(deep, clone, copy) 180 } else if (copy !== undefined) { 181 target[name] = copy 182 } 183 } 184 } 185 } 186 return target 187 }; 188 jQuery.extend({ 189 expando: "jQuery" + (core_version + Math.random()).replace(/\D/g, ""), 190 noConflict: function(deep) { 191 if (window.$ === jQuery) { 192 window.$ = _$ 193 } 194 if (deep && window.jQuery === jQuery) { 195 window.jQuery = _jQuery 196 } 197 return jQuery 198 }, 199 isReady: false, 200 readyWait: 1, 201 holdReady: function(hold) { 202 if (hold) { 203 jQuery.readyWait++ 204 } else { 205 jQuery.ready(true) 206 } 207 }, 208 ready: function(wait) { 209 if (wait === true ? --jQuery.readyWait : jQuery.isReady) { 210 return 211 } 212 jQuery.isReady = true; 213 if (wait !== true && --jQuery.readyWait > 0) { 214 return 215 } 216 readyList.resolveWith(document, [jQuery]); 217 if (jQuery.fn.trigger) { 218 jQuery(document).trigger("ready").off("ready") 219 } 220 }, 221 isFunction: function(obj) { 222 return jQuery.type(obj) === "function" 223 }, 224 isArray: Array.isArray, 225 isWindow: function(obj) { 226 return obj != null && obj == obj.window 227 }, 228 isNumeric: function(obj) { 229 return !isNaN(parseFloat(obj)) && isFinite(obj) 230 }, 231 type: function(obj) { 232 if (obj == null) { 233 return String(obj) 234 } 235 return typeof obj === "object" || typeof obj === "function" ? class2type[core_toString.call(obj)] || "object" : typeof obj 236 }, 237 isPlainObject: function(obj) { 238 if (jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow(obj)) { 239 return false 240 } 241 try { 242 if (obj.constructor && !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf")) { 243 return false 244 } 245 } catch (e) { 246 return false 247 } 248 return true 249 }, 250 isEmptyObject: function(obj) { 251 var name; 252 for (name in obj) { 253 return false 254 } 255 return true 256 }, 257 error: function(msg) { 258 throw new Error(msg); 259 }, 260 parseHTML: function(data, context, keepScripts) { 261 if (!data || typeof data !== "string") { 262 return null 263 } 264 if (typeof context === "boolean") { 265 keepScripts = context; 266 context = false 267 } 268 context = context || document; 269 var parsed = rsingleTag.exec(data), 270 scripts = !keepScripts && []; 271 if (parsed) { 272 return [context.createElement(parsed[1])] 273 } 274 parsed = jQuery.buildFragment([data], context, scripts); 275 if (scripts) { 276 jQuery(scripts).remove() 277 } 278 return jQuery.merge([], parsed.childNodes) 279 }, 280 parseJSON: JSON.parse, 281 parseXML: function(data) { 282 var xml, tmp; 283 if (!data || typeof data !== "string") { 284 return null 285 } 286 try { 287 tmp = new DOMParser(); 288 xml = tmp.parseFromString(data, "text/xml") 289 } catch (e) { 290 xml = undefined 291 } 292 if (!xml || xml.getElementsByTagName("parsererror").length) { 293 jQuery.error("Invalid XML: " + data) 294 } 295 return xml 296 }, 297 noop: function() {}, 298 globalEval: function(data) { 299 var indirect = eval; 300 if (jQuery.trim(data)) { 301 indirect(data + ";") 302 } 303 }, 304 camelCase: function(string) { 305 return string.replace(rmsPrefix, "ms-").replace(rdashAlpha, fcamelCase) 306 }, 307 nodeName: function(elem, name) { 308 return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase() 309 }, 310 each: function(obj, callback, args) { 311 var value, i = 0, 312 length = obj.length, 313 isArray = isArraylike(obj); 314 if (args) { 315 if (isArray) { 316 for (; i < length; i++) { 317 value = callback.apply(obj[i], args); 318 if (value === false) { 319 break 320 } 321 } 322 } else { 323 for (i in obj) { 324 value = callback.apply(obj[i], args); 325 if (value === false) { 326 break 327 } 328 } 329 } 330 } else { 331 if (isArray) { 332 for (; i < length; i++) { 333 value = callback.call(obj[i], i, obj[i]); 334 if (value === false) { 335 break 336 } 337 } 338 } else { 339 for (i in obj) { 340 value = callback.call(obj[i], i, obj[i]); 341 if (value === false) { 342 break 343 } 344 } 345 } 346 } 347 return obj 348 }, 349 trim: function(text) { 350 return text == null ? "" : core_trim.call(text) 351 }, 352 makeArray: function(arr, results) { 353 var ret = results || []; 354 if (arr != null) { 355 if (isArraylike(Object(arr))) { 356 jQuery.merge(ret, typeof arr === "string" ? [arr] : arr) 357 } else { 358 core_push.call(ret, arr) 359 } 360 } 361 return ret 362 }, 363 inArray: function(elem, arr, i) { 364 return arr == null ? -1 : core_indexOf.call(arr, elem, i) 365 }, 366 merge: function(first, second) { 367 var l = second.length, 368 i = first.length, 369 j = 0; 370 if (typeof l === "number") { 371 for (; j < l; j++) { 372 first[i++] = second[j] 373 } 374 } else { 375 while (second[j] !== undefined) { 376 first[i++] = second[j++] 377 } 378 } 379 first.length = i; 380 return first 381 },
382 grep: function(elems, callback, inv) { 383 var retVal, ret = [], 384 i = 0, 385 length = elems.length; 386 inv = !! inv; 387 for (; i < length; i++) { 388 retVal = !! callback(elems[i], i); 389 if (inv !== retVal) { 390 ret.push(elems[i]) 391 } 392 } 393 return ret 394 }, 395 map: function(elems, callback, arg) { 396 var value, i = 0, 397 length = elems.length, 398 isArray = isArraylike(elems), 399 ret = []; 400 if (isArray) { 401 for (; i < length; i++) { 402 value = callback(elems[i], i, arg); 403 if (value != null) { 404 ret[ret.length] = value 405 } 406 } 407 } else { 408 for (i in elems) { 409 value = callback(elems[i], i, arg); 410 if (value != null) { 411 ret[ret.length] = value 412 } 413 } 414 } 415 return core_concat.apply([], ret) 416 }, 417 guid: 1, 418 proxy: function(fn, context) { 419 var tmp, args, proxy; 420 if (typeof context === "string") { 421 tmp = fn[context]; 422 context = fn; 423 fn = tmp 424 } 425 if (!jQuery.isFunction(fn)) { 426 return undefined 427 } 428 args = core_slice.call(arguments, 2); 429 proxy = function() { 430 return fn.apply(context || this, args.concat(core_slice.call(arguments))) 431 }; 432 proxy.guid = fn.guid = fn.guid || jQuery.guid++; 433 return proxy 434 }, 435 access: function(elems, fn, key, value, chainable, emptyGet, raw) { 436 var i = 0, 437 length = elems.length, 438 bulk = key == null; 439 if (jQuery.type(key) === "object") { 440 chainable = true; 441 for (i in key) { 442 jQuery.access(elems, fn, i, key[i], true, emptyGet, raw) 443 } 444 } else if (value !== undefined) { 445 chainable = true; 446 if (!jQuery.isFunction(value)) { 447 raw = true 448 } 449 if (bulk) { 450 if (raw) { 451 fn.call(elems, value); 452 fn = null 453 } else { 454 bulk = fn; 455 fn = function(elem, key, value) { 456 return bulk.call(jQuery(elem), value) 457 } 458 } 459 } 460 if (fn) { 461 for (; i < length; i++) { 462 fn(elems[i], key, raw ? value : value.call(elems[i], i, fn(elems[i], key))) 463 } 464 } 465 } 466 return chainable ? elems : bulk ? fn.call(elems) : length ? fn(elems[0], key) : emptyGet 467 }, 468 now: Date.now 469 }); 470 jQuery.ready.promise = function(obj) { 471 if (!readyList) { 472 readyList = jQuery.Deferred(); 473 if (document.readyState === "complete") { 474 setTimeout(jQuery.ready) 475 } else { 476 document.addEventListener("DOMContentLoaded", completed, false); 477 window.addEventListener("load", completed, false) 478 } 479 } 480 return readyList.promise(obj) 481 }; 482 jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { 483 class2type["[object " + name + "]"] = name.toLowerCase() 484 }); 485 486 function isArraylike(obj) { 487 var length = obj.length, 488 type = jQuery.type(obj); 489 if (jQuery.isWindow(obj)) { 490 return false 491 } 492 if (obj.nodeType === 1 && length) { 493 return true 494 } 495 return type === "array" || type !== "function" && (length === 0 || typeof length === "number" && length > 0 && (length - 1) in obj) 496 } 497 rootjQuery = jQuery(document); 498 var optionsCache = {}; 499 500 function createOptions(options) { 501 var object = optionsCache[options] = {}; 502 jQuery.each(options.match(core_rnotwhite) || [], function(_, flag) { 503 object[flag] = true 504 }); 505 return object 506 } 507 jQuery.Callbacks = function(options) { 508 options = typeof options === "string" ? (optionsCache[options] || createOptions(options)) : jQuery.extend({}, options); 509 var memory, fired, firing, firingStart, firingLength, firingIndex, list = [], 510 stack = !options.once && [], 511 fire = function(data) { 512 memory = options.memory && data; 513 fired = true; 514 firingIndex = firingStart || 0; 515 firingStart = 0; 516 firingLength = list.length; 517 firing = true; 518 for (; list && firingIndex < firingLength; firingIndex++) { 519 if (list[firingIndex].apply(data[0], data[1]) === false && options.stopOnFalse) { 520 memory = false; 521 break 522 } 523 } 524 firing = false; 525 if (list) { 526 if (stack) { 527 if (stack.length) { 528 fire(stack.shift()) 529 } 530 } else if (memory) { 531 list = [] 532 } else { 533 self.disable() 534 } 535 } 536 }, 537 self = { 538 add: function() { 539 if (list) { 540 var start = list.length; 541 (function add(args) { 542 jQuery.each(args, function(_, arg) { 543 var type = jQuery.type(arg); 544 if (type === "function") { 545 if (!options.unique || !self.has(arg)) { 546 list.push(arg) 547 } 548 } else if (arg && arg.length && type !== "string") { 549 add(arg) 550 } 551 }) 552 })(arguments); 553 if (firing) { 554 firingLength = list.length 555 } else if (memory) { 556 firingStart = start; 557 fire(memory) 558 } 559 } 560 return this 561 }, 562 remove: function() { 563 if (list) { 564 jQuery.each(arguments, function(_, arg) { 565 var index; 566 while ((index = jQuery.inArray(arg, list, index)) > -1) { 567 list.splice(index, 1); 568 if (firing) { 569 if (index <= firingLength) { 570 firingLength-- 571 } 572 if (index <= firingIndex) { 573 firingIndex-- 574 } 575 } 576 } 577 }) 578 } 579 return this 580 }, 581 has: function(fn) { 582 return fn ? jQuery.inArray(fn, list) > -1 : !! (list && list.length) 583 }, 584 empty: function() { 585 list = []; 586 firingLength = 0; 587 return this 588 }, 589 disable: function() { 590 list = stack = memory = undefined; 591 return this 592 }, 593 disabled: function() { 594 return !list 595 }, 596 lock: function() { 597 stack = undefined; 598 if (!memory) { 599 self.disable() 600 } 601 return this 602 }, 603 locked: function() { 604 return !stack 605 },
606 fireWith: function(context, args) { 607 args = args || []; 608 args = [context, args.slice ? args.slice() : args]; 609 if (list && (!fired || stack)) { 610 if (firing) { 611 stack.push(args) 612 } else { 613 fire(args) 614 } 615 } 616 return this 617 }, 618 fire: function() { 619 self.fireWith(this, arguments); 620 return this 621 }, 622 fired: function() { 623 return !!fired 624 } 625 }; 626 return self 627 }; 628 jQuery.extend({ 629 Deferred: function(func) { 630 var tuples = [ 631 ["resolve", "done", jQuery.Callbacks("once memory"), "resolved"], 632 ["reject", "fail", jQuery.Callbacks("once memory"), "rejected"], 633 ["notify", "progress", jQuery.Callbacks("memory")] 634 ], 635 state = "pending", 636 promise = { 637 state: function() { 638 return state 639 }, 640 always: function() { 641 deferred.done(arguments).fail(arguments); 642 return this 643 }, 644 then: function() { 645 var fns = arguments; 646 return jQuery.Deferred(function(newDefer) { 647 jQuery.each(tuples, function(i, tuple) { 648 var action = tuple[0], 649 fn = jQuery.isFunction(fns[i]) && fns[i]; 650 deferred[tuple[1]](function() { 651 var returned = fn && fn.apply(this, arguments); 652 if (returned && jQuery.isFunction(returned.promise)) { 653 returned.promise().done(newDefer.resolve).fail(newDefer.reject).progress(newDefer.notify) 654 } else { 655 newDefer[action + "With"](this === promise ? newDefer.promise() : this, fn ? [returned] : arguments) 656 } 657 }) 658 }); 659 fns = null 660 }).promise() 661 }, 662 promise: function(obj) { 663 return obj != null ? jQuery.extend(obj, promise) : promise 664 } 665 }, 666 deferred = {}; 667 promise.pipe = promise.then; 668 jQuery.each(tuples, function(i, tuple) { 669 var list = tuple[2], 670 stateString = tuple[3]; 671 promise[tuple[1]] = list.add; 672 if (stateString) { 673 list.add(function() { 674 state = stateString 675 }, tuples[i ^ 1][2].disable, tuples[2][2].lock) 676 } 677 deferred[tuple[0]] = function() { 678 deferred[tuple[0] + "With"](this === deferred ? promise : this, arguments); 679 return this 680 }; 681 deferred[tuple[0] + "With"] = list.fireWith 682 }); 683 promise.promise(deferred); 684 if (func) { 685 func.call(deferred, deferred) 686 } 687 return deferred 688 }, 689 when: function(subordinate) { 690 var i = 0, 691 resolveValues = core_slice.call(arguments), 692 length = resolveValues.length, 693 remaining = length !== 1 || (subordinate && jQuery.isFunction(subordinate.promise)) ? length : 0, 694 deferred = remaining === 1 ? subordinate : jQuery.Deferred(), 695 updateFunc = function(i, contexts, values) { 696 return function(value) { 697 contexts[i] = this; 698 values[i] = arguments.length > 1 ? core_slice.call(arguments) : value; 699 if (values === progressValues) { 700 deferred.notifyWith(contexts, values) 701 } else if (!(--remaining)) { 702 deferred.resolveWith(contexts, values) 703 } 704 } 705 }, 706 progressValues, progressContexts, resolveContexts; 707 if (length > 1) { 708 progressValues = new Array(length); 709 progressContexts = new Array(length); 710 resolveContexts = new Array(length); 711 for (; i < length; i++) { 712 if (resolveValues[i] && jQuery.isFunction(resolveValues[i].promise)) { 713 resolveValues[i].promise().done(updateFunc(i, resolveContexts, resolveValues)).fail(deferred.reject).progress(updateFunc(i, progressContexts, progressValues)) 714 } else { 715 --remaining 716 } 717 } 718 } 719 if (!remaining) { 720 deferred.resolveWith(resolveContexts, resolveValues) 721 } 722 return deferred.promise() 723 } 724 }); 725 jQuery.support = (function(support) { 726 var input = document.createElement("input"), 727 fragment = document.createDocumentFragment(), 728 div = document.createElement("div"), 729 select = document.createElement("select"), 730 opt = select.appendChild(document.createElement("option")); 731 if (!input.type) { 732 return support 733 } 734 input.type = "checkbox"; 735 support.checkOn = input.value === ""; 736 support.optSelected = opt.selected; 737 support.boxModel = document.compatMode === "CSS1Compat"; 738 support.reliableMarginRight = true; 739 support.boxSizingReliable = true; 740 support.pixelPosition = false;
741 input.checked = true; 742 support.noCloneChecked = input.cloneNode(true).checked; 743 select.disabled = true; 744 support.optDisabled = !opt.disabled; 745 input = document.createElement("input"); 746 input.value = "t"; 747 input.type = "radio"; 748 support.radioValue = input.value === "t"; 749 input.setAttribute("checked", "t"); 750 input.setAttribute("name", "t"); 751 fragment.appendChild(input); 752 support.checkClone = fragment.cloneNode(true).cloneNode(true).lastChild.checked; 753 support.focusinBubbles = "onfocusin" in window; 754 div.style.backgroundClip = "content-box"; 755 div.cloneNode(true).style.backgroundClip = ""; 756 support.clearCloneStyle = div.style.backgroundClip === "content-box"; 757 jQuery(function() { 758 var container, marginDiv, divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;", 759 body = document.getElementsByTagName("body")[0]; 760 if (!body) { 761 return 762 } 763 container = document.createElement("div"); 764 container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px"; 765 body.appendChild(container).appendChild(div); 766 div.innerHTML = ""; 767 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%;"; 768 support.boxSizing = div.offsetWidth === 4; 769 support.doesNotIncludeMarginInBodyOffset = body.offsetTop !== 1; 770 if (window.getComputedStyle) { 771 support.pixelPosition = (window.getComputedStyle(div, null) || {}).top !== "1%"; 772 support.boxSizingReliable = (window.getComputedStyle(div, null) || { 773 width: "4px" 774 }).width === "4px"; 775 marginDiv = div.appendChild(document.createElement("div")); 776 marginDiv.style.cssText = div.style.cssText = divReset; 777 marginDiv.style.marginRight = marginDiv.style.width = "0"; 778 div.style.width = "1px"; 779 support.reliableMarginRight = !parseFloat((window.getComputedStyle(marginDiv, null) || {}).marginRight) 780 } 781 body.removeChild(container) 782 }); 783 return support 784 })({}); 785 var data_user, data_priv, rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, 786 rmultiDash = /([A-Z])/g; 787 788 function Data() { 789 this.cache = {}; 790 this.expando = jQuery.expando + Math.random() 791 } 792 Data.uid = 1; 793 Data.prototype = { 794 key: function(owner) { 795 var descriptor = {}, 796 unlock = owner[this.expando]; 797 if (!unlock) { 798 unlock = Data.uid++; 799 descriptor[this.expando] = { 800 value: unlock 801 };
802 try { 803 Object.defineProperties(owner, descriptor) 804 } catch (e) { 805 descriptor[this.expando] = unlock; 806 jQuery.extend(owner, descriptor) 807 } 808 } 809 if (!this.cache[unlock]) { 810 this.cache[unlock] = {} 811 } 812 return unlock 813 }, 814 set: function(owner, data, value) { 815 var prop, unlock = this.key(owner), 816 cache = this.cache[unlock]; 817 if (typeof data === "string") { 818 cache[data] = value 819 } else { 820 if (jQuery.isEmptyObject(cache)) { 821 this.cache[unlock] = data 822 } else { 823 for (prop in data) { 824 cache[prop] = data[prop] 825 } 826 } 827 } 828 return this 829 }, 830 get: function(owner, key) { 831 var cache = this.cache[this.key(owner)]; 832 return key === undefined ? cache : cache[key] 833 }, 834 access: function(owner, key, value) { 835 if (key === undefined || ((key && typeof key === "string") && value === undefined)) { 836 return this.get(owner, key) 837 } 838 this.set(owner, key, value); 839 return value !== undefined ? value : key 840 }, 841 remove: function(owner, key) { 842 var i, name, unlock = this.key(owner), 843 cache = this.cache[unlock]; 844 if (key === undefined) { 845 this.cache[unlock] = {} 846 } else { 847 if (jQuery.isArray(key)) { 848 name = key.concat(key.map(jQuery.camelCase)) 849 } else { 850 if (key in cache) { 851 name = [key] 852 } else { 853 name = jQuery.camelCase(key); 854 name = name in cache ? [name] : (name.match(core_rnotwhite) || []) 855 } 856 } 857 i = name.length; 858 while (i--) { 859 delete cache[name[i]] 860 } 861 } 862 }, 863 hasData: function(owner) { 864 return !jQuery.isEmptyObject(this.cache[this.key(owner)]) 865 }, 866 discard: function(owner) { 867 delete this.cache[this.key(owner)] 868 } 869 }; 870 871 function data_discard(owner) { 872 data_user.discard(owner); 873 data_priv.discard(owner) 874 } 875 data_user = new Data(); 876 data_priv = new Data(); 877 jQuery.extend({ 878 acceptData: function() { 879 return true 880 }, 881 hasData: function(elem) { 882 return data_user.hasData(elem) || data_priv.hasData(elem) 883 }, 884 data: function(elem, name, data) { 885 return data_user.access(elem, name, data) 886 }, 887 removeData: function(elem, name) { 888 return data_user.remove(elem, name) 889 }, 890 _data: function(elem, name, data) { 891 return data_priv.access(elem, name, data) 892 }, 893 _removeData: function(elem, name) { 894 return data_priv.remove(elem, name) 895 } 896 }); 897 jQuery.fn.extend({ 898 data: function(key, value) { 899 var attrs, name, elem = this[0], 900 i = 0, 901 data = null; 902 if (key === undefined) { 903 if (this.length) { 904 data = data_user.get(elem); 905 if (elem.nodeType === 1 && !data_priv.get(elem, "hasDataAttrs")) { 906 attrs = elem.attributes; 907 for (; i < attrs.length; i++) { 908 name = attrs[i].name; 909 if (name.indexOf("data-") === 0) { 910 name = jQuery.camelCase(name.substring(5)); 911 dataAttr(elem, name, data[name]) 912 } 913 } 914 data_priv.set(elem, "hasDataAttrs", true) 915 } 916 } 917 return data 918 } 919 if (typeof key === "object") { 920 return this.each(function() { 921 data_user.set(this, key) 922 }) 923 } 924 return jQuery.access(this, function(value) { 925 var data, camelKey = jQuery.camelCase(key); 926 if (value === undefined) { 927 data = data_user.get(elem, key); 928 if (data !== undefined) { 929 return data 930 } 931 data = dataAttr(elem, key, undefined); 932 if (data !== undefined) { 933 return data 934 } 935 data = data_user.get(elem, camelKey); 936 if (data !== undefined) { 937 return data 938 } 939 return undefined 940 } 941 this.each(function() { 942 var data = data_user.get(this, camelKey); 943 data_user.set(this, camelKey, value); 944 if (/-/.test(key) && data !== undefined) { 945 data_user.set(this, key, value) 946 } 947 }) 948 }, null, value, arguments.length > 1, null, true) 949 }, 950 removeData: function(key) { 951 return this.each(function() { 952 data_user.remove(this, key) 953 }) 954 } 955 }); 956 957 function dataAttr(elem, key, data) { 958 var name; 959 if (data === undefined && elem.nodeType === 1) { 960 name = "data-" + key.replace(rmultiDash, "-$1").toLowerCase(); 961 data = elem.getAttribute(name); 962 if (typeof data === "string") { 963 try {
964 data = data === "true" ? true : data === "false" ? false : data === "null" ? null : +data + "" === data ? +data : rbrace.test(data) ? JSON.parse(data) : data 965 } catch (e) {} 966 data_user.set(elem, key, data) 967 } else { 968 data = undefined 969 } 970 } 971 return data 972 } 973 jQuery.extend({ 974 queue: function(elem, type, data) { 975 var queue; 976 if (elem) { 977 type = (type || "fx") + "queue"; 978 queue = jQuery._data(elem, type); 979 if (data) { 980 if (!queue || jQuery.isArray(data)) { 981 queue = jQuery._data(elem, type, jQuery.makeArray(data)) 982 } else { 983 queue.push(data) 984 } 985 } 986 return queue || [] 987 } 988 }, 989 dequeue: function(elem, type) { 990 type = type || "fx"; 991 var queue = jQuery.queue(elem, type), 992 startLength = queue.length, 993 fn = queue.shift(), 994 hooks = jQuery._queueHooks(elem, type), 995 next = function() { 996 jQuery.dequeue(elem, type) 997 }; 998 if (fn === "inprogress") { 999 fn = queue.shift(); 1000 startLength-- 1001 } 1002 hooks.cur = fn; 1003 if (fn) { 1004 if (type === "fx") { 1005 queue.unshift("inprogress") 1006 } 1007 delete hooks.stop; 1008 fn.call(elem, next, hooks) 1009 } 1010 if (!startLength && hooks) { 1011 hooks.empty.fire() 1012 } 1013 }, 1014 _queueHooks: function(elem, type) { 1015 var key = type + "queueHooks"; 1016 return jQuery._data(elem, key) || jQuery._data(elem, key, { 1017 empty: jQuery.Callbacks("once memory").add(function() { 1018 jQuery._removeData(elem, type + "queue"); 1019 jQuery._removeData(elem, key) 1020 }) 1021 }) 1022 } 1023 }); 1024 jQuery.fn.extend({ 1025 queue: function(type, data) { 1026 var setter = 2; 1027 if (typeof type !== "string") { 1028 data = type; 1029 type = "fx"; 1030 setter-- 1031 }
1032 if (arguments.length < setter) { 1033 return jQuery.queue(this[0], type) 1034 } 1035 return data === undefined ? this : this.each(function() { 1036 var queue = jQuery.queue(this, type, data); 1037 jQuery._queueHooks(this, type); 1038 if (type === "fx" && queue[0] !== "inprogress") { 1039 jQuery.dequeue(this, type) 1040 } 1041 }) 1042 }, 1043 dequeue: function(type) { 1044 return this.each(function() { 1045 jQuery.dequeue(this, type) 1046 }) 1047 }, 1048 delay: function(time, type) { 1049 time = jQuery.fx ? jQuery.fx.speeds[time] || time : time; 1050 type = type || "fx"; 1051 return this.queue(type, function(next, hooks) { 1052 var timeout = setTimeout(next, time); 1053 hooks.stop = function() { 1054 clearTimeout(timeout) 1055 } 1056 }) 1057 }, 1058 clearQueue: function(type) { 1059 return this.queue(type || "fx", []) 1060 }, 1061 promise: function(type, obj) { 1062 var tmp, count = 1, 1063 defer = jQuery.Deferred(), 1064 elements = this, 1065 i = this.length, 1066 resolve = function() { 1067 if (!(--count)) { 1068 defer.resolveWith(elements, [elements]) 1069 } 1070 }; 1071 if (typeof type !== "string") { 1072 obj = type; 1073 type = undefined 1074 } 1075 type = type || "fx"; 1076 while (i--) { 1077 tmp = jQuery._data(elements[i], type + "queueHooks"); 1078 if (tmp && tmp.empty) { 1079 count++; 1080 tmp.empty.add(resolve) 1081 } 1082 } 1083 resolve(); 1084 return defer.promise(obj) 1085 } 1086 }); 1087 var nodeHook, boolHook, rclass = /[\t\r\n]/g, 1088 rreturn = /\r/g, 1089 rfocusable = /^(?:input|select|textarea|button|object)$/i, 1090 rclickable = /^(?:a|area)$/i, 1091 rboolean = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i; 1092 jQuery.fn.extend({ 1093 attr: function(name, value) { 1094 return jQuery.access(this, jQuery.attr, name, value, arguments.length > 1) 1095 }, 1096 removeAttr: function(name) { 1097 return this.each(function() { 1098 jQuery.removeAttr(this, name) 1099 }) 1100 }, 1101 prop: function(name, value) { 1102 return jQuery.access(this, jQuery.prop, name, value, arguments.length > 1) 1103 }, 1104 removeProp: function(name) { 1105 name = jQuery.propFix[name] || name; 1106 return this.each(function() { 1107 try { 1108 this[name] = undefined; 1109 delete this[name] 1110 } catch (e) {} 1111 }) 1112 }, 1113 addClass: function(value) { 1114 var classes, elem, cur, clazz, j, i = 0, 1115 len = this.length, 1116 proceed = typeof value === "string" && value; 1117 if (jQuery.isFunction(value)) { 1118 return this.each(function(j) { 1119 jQuery(this).addClass(value.call(this, j, this.className)) 1120 }) 1121 } 1122 if (proceed) { 1123 classes = (value || "").match(core_rnotwhite) || []; 1124 for (; i < len; i++) { 1125 elem = this[i]; 1126 cur = elem.nodeType === 1 && (elem.className ? (" " + elem.className + " ").replace(rclass, " ") : " "); 1127 if (cur) { 1128 j = 0; 1129 while ((clazz = classes[j++])) { 1130 if (cur.indexOf(" " + clazz + " ") < 0) { 1131 cur += clazz + " " 1132 } 1133 } 1134 elem.className = jQuery.trim(cur) 1135 } 1136 } 1137 } 1138 return this 1139 }, 1140 removeClass: function(value) { 1141 var classes, elem, cur, clazz, j, i = 0, 1142 len = this.length, 1143 proceed = arguments.length === 0 || typeof value === "string" && value; 1144 if (jQuery.isFunction(value)) { 1145 return this.each(function(j) { 1146 jQuery(this).removeClass(value.call(this, j, this.className)) 1147 }) 1148 } 1149 if (proceed) { 1150 classes = (value || "").match(core_rnotwhite) || []; 1151 for (; i < len; i++) { 1152 elem = this[i]; 1153 cur = elem.nodeType === 1 && (elem.className ? (" " + elem.className + " ").replace(rclass, " ") : ""); 1154 if (cur) { 1155 j = 0; 1156 while ((clazz = classes[j++])) { 1157 while (cur.indexOf(" " + clazz + " ") >= 0) { 1158 cur = cur.replace(" " + clazz + " ", " ") 1159 } 1160 } 1161 elem.className = value ? jQuery.trim(cur) : "" 1162 } 1163 } 1164 } 1165 return this 1166 }, 1167 toggleClass: function(value, stateVal) { 1168 var type = typeof value, 1169 isBool = typeof stateVal === "boolean"; 1170 if (jQuery.isFunction(value)) { 1171 return this.each(function(i) { 1172 jQuery(this).toggleClass(value.call(this, i, this.className, stateVal), stateVal) 1173 }) 1174 } 1175 return this.each(function() { 1176 if (type === "string") { 1177 var className, i = 0, 1178 self = jQuery(this), 1179 state = stateVal, 1180 classNames = value.match(core_rnotwhite) || []; 1181 while ((className = classNames[i++])) { 1182 state = isBool ? state : !self.hasClass(className); 1183 self[state ? "addClass" : "removeClass"](className) 1184 } 1185 } else if (type === core_strundefined || type === "boolean") { 1186 if (this.className) { 1187 jQuery._data(this, "__className__", this.className) 1188 } 1189 this.className = this.className || value === false ? "" : jQuery._data(this, "__className__") || "" 1190 } 1191 }) 1192 }, 1193 hasClass: function(selector) { 1194 var className = " " + selector + " ", 1195 i = 0, 1196 l = this.length; 1197 for (; i < l; i++) { 1198 if (this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf(className) >= 0) { 1199 return true 1200 } 1201 } 1202 return false 1203 }, 1204 val: function(value) { 1205 var hooks, ret, isFunction, elem = this[0]; 1206 if (!arguments.length) { 1207 if (elem) { 1208 hooks = jQuery.valHooks[elem.type] || jQuery.valHooks[elem.nodeName.toLowerCase()]; 1209 if (hooks && "get" in hooks && (ret = hooks.get(elem, "value")) !== undefined) { 1210 return ret 1211 } 1212 ret = elem.value; 1213 return typeof ret === "string" ? ret.replace(rreturn, "") : ret == null ? "" : ret 1214 } 1215 return 1216 } 1217 isFunction = jQuery.isFunction(value); 1218 return this.each(function(i) { 1219 var val, self = jQuery(this); 1220 if (this.nodeType !== 1) { 1221 return 1222 } 1223 if (isFunction) { 1224 val = value.call(this, i, self.val()) 1225 } else { 1226 val = value 1227 } 1228 if (val == null) { 1229 val = "" 1230 } else if (typeof val === "number") { 1231 val += "" 1232 } else if (jQuery.isArray(val)) { 1233 val = jQuery.map(val, function(value) { 1234 return value == null ? "" : value + "" 1235 }) 1236 } 1237 hooks = jQuery.valHooks[this.type] || jQuery.valHooks[this.nodeName.toLowerCase()]; 1238 if (!hooks || !("set" in hooks) || hooks.set(this, val, "value") === undefined) { 1239 this.value = val 1240 } 1241 }) 1242 } 1243 }); 1244 jQuery.extend({ 1245 valHooks: { 1246 option: { 1247 get: function(elem) { 1248 var val = elem.attributes.value; 1249 return !val || val.specified ? elem.value : elem.text 1250 } 1251 }, 1252 select: { 1253 get: function(elem) { 1254 var value, option, options = elem.options, 1255 index = elem.selectedIndex, 1256 one = elem.type === "select-one" || index < 0, 1257 values = one ? null : [], 1258 max = one ? index + 1 : options.length, 1259 i = index < 0 ? max : one ? index : 0; 1260 for (; i < max; i++) { 1261 option = options[i]; 1262 if ((option.selected || i === index) && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && (!option.parentNode.disabled || !jQuery.nodeName(option.parentNode, "optgroup"))) { 1263 value = jQuery(option).val(); 1264 if (one) { 1265 return value 1266 } 1267 values.push(value) 1268 } 1269 } 1270 return values 1271 }, 1272 set: function(elem, value) { 1273 var values = jQuery.makeArray(value); 1274 jQuery(elem).find("option").each(function() { 1275 this.selected = jQuery.inArray(jQuery(this).val(), values) >= 0 1276 }); 1277 if (!values.length) { 1278 elem.selectedIndex = -1 1279 } 1280 return values 1281 } 1282 } 1283 }, 1284 attr: function(elem, name, value) { 1285 var ret, hooks, notxml, nType = elem.nodeType; 1286 if (!elem || nType === 3 || nType === 8 || nType === 2) { 1287 return 1288 } 1289 if (typeof elem.getAttribute === core_strundefined) { 1290 return jQuery.prop(elem, name, value) 1291 } 1292 notxml = nType !== 1 || !jQuery.isXMLDoc(elem); 1293 if (notxml) { 1294 name = name.toLowerCase(); 1295 hooks = jQuery.attrHooks[name] || (rboolean.test(name) ? boolHook : nodeHook) 1296 } 1297 if (value !== undefined) { 1298 if (value === null) { 1299 jQuery.removeAttr(elem, name) 1300 } else if (hooks && notxml && "set" in hooks && (ret = hooks.set(elem, value, name)) !== undefined) { 1301 return ret 1302 } else { 1303 elem.setAttribute(name, value + ""); 1304 return value 1305 } 1306 } else if (hooks && notxml && "get" in hooks && (ret = hooks.get(elem, name)) !== null) { 1307 return ret 1308 } else { 1309 if (typeof elem.getAttribute !== core_strundefined) { 1310 ret = elem.getAttribute(name) 1311 } 1312 return ret == null ? undefined : ret 1313 } 1314 }, 1315 removeAttr: function(elem, value) { 1316 var name, propName, i = 0, 1317 attrNames = value && value.match(core_rnotwhite); 1318 if (attrNames && elem.nodeType === 1) { 1319 while ((name = attrNames[i++])) { 1320 propName = jQuery.propFix[name] || name; 1321 if (rboolean.test(name)) { 1322 elem[propName] = false 1323 } 1324 elem.removeAttribute(name) 1325 } 1326 } 1327 }, 1328 attrHooks: { 1329 type: { 1330 set: function(elem, value) { 1331 if (!jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input")) { 1332 var val = elem.value; 1333 elem.setAttribute("type", value); 1334 if (val) { 1335 elem.value = val 1336 } 1337 return value 1338 } 1339 } 1340 } 1341 }, 1342 propFix: { 1343 tabindex: "tabIndex", 1344 readonly: "readOnly", 1345 "for": "htmlFor", 1346 "class": "className", 1347 maxlength: "maxLength", 1348 cellspacing: "cellSpacing", 1349 cellpadding: "cellPadding", 1350 rowspan: "rowSpan", 1351 colspan: "colSpan", 1352 usemap: "useMap", 1353 frameborder: "frameBorder", 1354 contenteditable: "contentEditable" 1355 }, 1356 prop: function(elem, name, value) { 1357 var ret, hooks, notxml, nType = elem.nodeType; 1358 if (!elem || nType === 3 || nType === 8 || nType === 2) { 1359 return 1360 } 1361 notxml = nType !== 1 || !jQuery.isXMLDoc(elem); 1362 if (notxml) { 1363 name = jQuery.propFix[name] || name; 1364 hooks = jQuery.propHooks[name] 1365 } 1366 if (value !== undefined) { 1367 if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== undefined) { 1368 return ret 1369 } else { 1370 return (elem[name] = value) 1371 } 1372 } else { 1373 if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) { 1374 return ret 1375 } else { 1376 return elem[name] 1377 } 1378 } 1379 }, 1380 propHooks: { 1381 tabIndex: { 1382 get: function(elem) { 1383 var attributeNode = elem.getAttributeNode("tabindex"); 1384 return attributeNode && attributeNode.specified ? parseInt(attributeNode.value, 10) : rfocusable.test(elem.nodeName) || rclickable.test(elem.nodeName) && elem.href ? 0 : undefined 1385 } 1386 } 1387 } 1388 }); 1389 boolHook = { 1390 get: function(elem, name) { 1391 return elem.getAttribute(name) !== null ? name.toLowerCase() : undefined 1392 }, 1393 set: function(elem, value, name) { 1394 if (value === false) { 1395 jQuery.removeAttr(elem, name) 1396 } else { 1397 elem.setAttribute(name, name) 1398 } 1399 return name 1400 } 1401 }; 1402 if (!jQuery.support.checkOn) { 1403 jQuery.each(["radio", "checkbox"], function() { 1404 jQuery.valHooks[this] = { 1405 get: function(elem) { 1406 return elem.getAttribute("value") === null ? "on" : elem.value 1407 } 1408 } 1409 }) 1410 } 1411 jQuery.each(["radio", "checkbox"], function() { 1412 jQuery.valHooks[this] = jQuery.extend(jQuery.valHooks[this], {
1413 set: function(elem, value) { 1414 if (jQuery.isArray(value)) { 1415 return (elem.checked = jQuery.inArray(jQuery(elem).val(), value) >= 0) 1416 } 1417 } 1418 }) 1419 }); 1420 if (!jQuery.support.optSelected) { 1421 jQuery.propHooks.selected = jQuery.extend(jQuery.propHooks.selected, { 1422 get: function(elem) { 1423 var parent = elem.parentNode; 1424 if (parent && parent.parentNode) { 1425 parent.parentNode.selectedIndex 1426 } 1427 return null 1428 } 1429 }) 1430 } 1431 var rkeyEvent = /^key/, 1432 rmouseEvent = /^(?:mouse|contextmenu)|click/, 1433 rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, 1434 rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; 1435 1436 function returnTrue() { 1437 return true 1438 } 1439 function returnFalse() { 1440 return false 1441 } 1442 jQuery.event = { 1443 global: {}, 1444 add: function(elem, types, handler, data, selector) { 1445 var handleObjIn, eventHandle, tmp, events, t, handleObj, special, handlers, type, namespaces, origType, elemData = data_priv.get(elem); 1446 if (!elemData) { 1447 return 1448 } 1449 if (handler.handler) { 1450 handleObjIn = handler; 1451 handler = handleObjIn.handler; 1452 selector = handleObjIn.selector 1453 } 1454 if (!handler.guid) { 1455 handler.guid = jQuery.guid++ 1456 } 1457 if (!(events = elemData.events)) { 1458 events = elemData.events = {} 1459 } 1460 if (!(eventHandle = elemData.handle)) { 1461 eventHandle = elemData.handle = function(e) { 1462 return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ? jQuery.event.dispatch.apply(eventHandle.elem, arguments) : undefined 1463 }; 1464 eventHandle.elem = elem 1465 } 1466 types = (types || "").match(core_rnotwhite) || [""]; 1467 t = types.length; 1468 while (t--) { 1469 tmp = rtypenamespace.exec(types[t]) || []; 1470 type = origType = tmp[1]; 1471 namespaces = (tmp[2] || "").split(".").sort(); 1472 if (!type) { 1473 continue 1474 } 1475 special = jQuery.event.special[type] || {}; 1476 type = (selector ? special.delegateType : special.bindType) || type; 1477 special = jQuery.event.special[type] || {}; 1478 handleObj = jQuery.extend({ 1479 type: type, 1480 origType: origType, 1481 data: data, 1482 handler: handler, 1483 guid: handler.guid, 1484 selector: selector, 1485 needsContext: selector && jQuery.expr.match.needsContext.test(selector), 1486 namespace: namespaces.join(".") 1487 }, handleObjIn); 1488 if (!(handlers = events[type])) { 1489 handlers = events[type] = []; 1490 handlers.delegateCount = 0; 1491 if (!special.setup || special.setup.call(elem, data, namespaces, eventHandle) === false) { 1492 if (elem.addEventListener) { 1493 elem.addEventListener(type, eventHandle, false) 1494 } 1495 } 1496 } 1497 if (special.add) { 1498 special.add.call(elem, handleObj); 1499 if (!handleObj.handler.guid) { 1500 handleObj.handler.guid = handler.guid 1501 } 1502 } 1503 if (selector) { 1504 handlers.splice(handlers.delegateCount++, 0, handleObj) 1505 } else { 1506 handlers.push(handleObj) 1507 } 1508 jQuery.event.global[type] = true 1509 } 1510 elem = null 1511 }, 1512 remove: function(elem, types, handler, selector, mappedTypes) { 1513 var j, origCount, tmp, events, t, handleObj, special, handlers, type, namespaces, origType, elemData = data_priv.hasData(elem) && data_priv.get(elem); 1514 if (!elemData || !(events = elemData.events)) { 1515 return 1516 } 1517 types = (types || "").match(core_rnotwhite) || [""]; 1518 t = types.length; 1519 while (t--) { 1520 tmp = rtypenamespace.exec(types[t]) || []; 1521 type = origType = tmp[1]; 1522 namespaces = (tmp[2] || "").split(".").sort(); 1523 if (!type) { 1524 for (type in events) { 1525 jQuery.event.remove(elem, type + types[t], handler, selector, true) 1526 } 1527 continue 1528 } 1529 special = jQuery.event.special[type] || {}; 1530 type = (selector ? special.delegateType : special.bindType) || type; 1531 handlers = events[type] || []; 1532 tmp = tmp[2] && new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)"); 1533 origCount = j = handlers.length; 1534 while (j--) { 1535 handleObj = handlers[j]; 1536 if ((mappedTypes || origType === handleObj.origType) && (!handler || handler.guid === handleObj.guid) && (!tmp || tmp.test(handleObj.namespace)) && (!selector || selector === handleObj.selector || selector === "**" && handleObj.selector)) { 1537 handlers.splice(j, 1); 1538 if (handleObj.selector) { 1539 handlers.delegateCount-- 1540 } 1541 if (special.remove) { 1542 special.remove.call(elem, handleObj) 1543 } 1544 } 1545 } 1546 if (origCount && !handlers.length) { 1547 if (!special.teardown || special.teardown.call(elem, namespaces, elemData.handle) === false) { 1548 jQuery.removeEvent(elem, type, elemData.handle) 1549 } 1550 delete events[type] 1551 } 1552 } 1553 if (jQuery.isEmptyObject(events)) { 1554 delete elemData.handle; 1555 jQuery._removeData(elem, "events") 1556 } 1557 }, 1558 trigger: function(event, data, elem, onlyHandlers) { 1559 var i, cur, tmp, bubbleType, ontype, handle, special, eventPath = [elem || document], 1560 type = core_hasOwn.call(event, "type") ? event.type : event, 1561 namespaces = core_hasOwn.call(event, "namespace") ? event.namespace.split(".") : []; 1562 cur = tmp = elem = elem || document; 1563 if (elem.nodeType === 3 || elem.nodeType === 8) { 1564 return 1565 } 1566 if (rfocusMorph.test(type + jQuery.event.triggered)) { 1567 return 1568 } 1569 if (type.indexOf(".") >= 0) { 1570 namespaces = type.split("."); 1571 type = namespaces.shift(); 1572 namespaces.sort() 1573 }
1574 ontype = type.indexOf(":") < 0 && "on" + type; 1575 event = event[jQuery.expando] ? event : new jQuery.Event(type, typeof event === "object" && event); 1576 event.isTrigger = onlyHandlers ? 2 : 3; 1577 event.namespace = namespaces.join("."); 1578 event.namespace_re = event.namespace ? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null; 1579 event.result = undefined; 1580 if (!event.target) { 1581 event.target = elem 1582 } 1583 data = data == null ? [event] : jQuery.makeArray(data, [event]); 1584 special = jQuery.event.special[type] || {}; 1585 if (!onlyHandlers && special.trigger && special.trigger.apply(elem, data) === false) { 1586 return 1587 } 1588 if (!onlyHandlers && !special.noBubble && !jQuery.isWindow(elem)) { 1589 bubbleType = special.delegateType || type; 1590 if (!rfocusMorph.test(bubbleType + type)) { 1591 cur = cur.parentNode 1592 } 1593 for (; cur; cur = cur.parentNode) { 1594 eventPath.push(cur); 1595 tmp = cur 1596 } 1597 if (tmp === (elem.ownerDocument || document)) { 1598 eventPath.push(tmp.defaultView || tmp.parentWindow || window) 1599 } 1600 } 1601 i = 0; 1602 while ((cur = eventPath[i++]) && !event.isPropagationStopped()) { 1603 event.type = i > 1 ? bubbleType : special.bindType || type; 1604 handle = (jQuery._data(cur, "events") || {})[event.type] && jQuery._data(cur, "handle"); 1605 if (handle) { 1606 handle.apply(cur, data) 1607 } 1608 handle = ontype && cur[ontype]; 1609 if (handle && jQuery.acceptData(cur) && handle.apply && handle.apply(cur, data) === false) { 1610 event.preventDefault() 1611 } 1612 } 1613 event.type = type; 1614 if (!onlyHandlers && !event.isDefaultPrevented()) { 1615 if ((!special._default || special._default.apply(elem.ownerDocument, data) === false) && !(type === "click" && jQuery.nodeName(elem, "a")) && jQuery.acceptData(elem)) { 1616 if (ontype && jQuery.isFunction(elem[type]) && !jQuery.isWindow(elem)) { 1617 tmp = elem[ontype]; 1618 if (tmp) { 1619 elem[ontype] = null 1620 } 1621 jQuery.event.triggered = type; 1622 elem[type](); 1623 jQuery.event.triggered = undefined; 1624 if (tmp) { 1625 elem[ontype] = tmp 1626 } 1627 } 1628 } 1629 } 1630 return event.result 1631 }, 1632 dispatch: function(event) { 1633 event = jQuery.event.fix(event); 1634 var i, j, ret, matched, handleObj, handlerQueue = [], 1635 args = core_slice.call(arguments), 1636 handlers = (jQuery._data(this, "events") || {})[event.type] || [], 1637 special = jQuery.event.special[event.type] || {}; 1638 args[0] = event; 1639 event.delegateTarget = this; 1640 if (special.preDispatch && special.preDispatch.call(this, event) === false) { 1641 return 1642 } 1643 handlerQueue = jQuery.event.handlers.call(this, event, handlers); 1644 i = 0; 1645 while ((matched = handlerQueue[i++]) && !event.isPropagationStopped()) { 1646 event.currentTarget = matched.elem; 1647 j = 0; 1648 while ((handleObj = matched.handlers[j++]) && !event.isImmediatePropagationStopped()) { 1649 if (!event.namespace_re || event.namespace_re.test(handleObj.namespace)) { 1650 event.handleObj = handleObj; 1651 event.data = handleObj.data; 1652 ret = ((jQuery.event.special[handleObj.origType] || {}).handle || handleObj.handler).apply(matched.elem, args); 1653 if (ret !== undefined) { 1654 if ((event.result = ret) === false) { 1655 event.preventDefault(); 1656 event.stopPropagation() 1657 } 1658 } 1659 } 1660 } 1661 } 1662 if (special.postDispatch) { 1663 special.postDispatch.call(this, event) 1664 } 1665 return event.result 1666 }, 1667 handlers: function(event, handlers) { 1668 var i, matches, sel, handleObj, handlerQueue = [], 1669 delegateCount = handlers.delegateCount, 1670 cur = event.target; 1671 if (delegateCount && cur.nodeType && (!event.button || event.type !== "click")) { 1672 for (; cur != this; cur = cur.parentNode || this) { 1673 if (cur.disabled !== true || event.type !== "click") { 1674 matches = []; 1675 for (i = 0; i < delegateCount; i++) { 1676 handleObj = handlers[i]; 1677 sel = handleObj.selector + " "; 1678 if (matches[sel] === undefined) { 1679 matches[sel] = handleObj.needsContext ? jQuery(sel, this).index(cur) >= 0 : jQuery.find(sel, this, null, [cur]).length 1680 } 1681 if (matches[sel]) { 1682 matches.push(handleObj) 1683 } 1684 } 1685 if (matches.length) { 1686 handlerQueue.push({ 1687 elem: cur, 1688 handlers: matches 1689 }) 1690 } 1691 } 1692 } 1693 } 1694 if (delegateCount < handlers.length) { 1695 handlerQueue.push({ 1696 elem: this, 1697 handlers: handlers.slice(delegateCount) 1698 }) 1699 } 1700 return handlerQueue 1701 }, 1702 props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), 1703 fixHooks: {}, 1704 keyHooks: {
1705 props: "char charCode key keyCode".split(" "), 1706 filter: function(event, original) { 1707 if (event.which == null) { 1708 event.which = original.charCode != null ? original.charCode : original.keyCode 1709 } 1710 return event 1711 } 1712 }, 1713 mouseHooks: { 1714 props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "), 1715 filter: function(event, original) { 1716 var eventDoc, doc, body, button = original.button; 1717 if (event.pageX == null && original.clientX != null) { 1718 eventDoc = event.target.ownerDocument || document; 1719 doc = eventDoc.documentElement; 1720 body = eventDoc.body; 1721 event.pageX = original.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); 1722 event.pageY = original.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0) 1723 } 1724 if (!event.which && button !== undefined) { 1725 event.which = (button & 1 ? 1 : (button & 2 ? 3 : (button & 4 ? 2 : 0))) 1726 } 1727 return event 1728 } 1729 }, 1730 fix: function(event) { 1731 if (event[jQuery.expando]) { 1732 return event 1733 } 1734 var i, prop, copy, type = event.type, 1735 originalEvent = event, 1736 fixHook = this.fixHooks[type]; 1737 if (!fixHook) { 1738 this.fixHooks[type] = fixHook = rmouseEvent.test(type) ? this.mouseHooks : rkeyEvent.test(type) ? this.keyHooks : {} 1739 } 1740 copy = fixHook.props ? this.props.concat(fixHook.props) : this.props; 1741 event = new jQuery.Event(originalEvent); 1742 i = copy.length; 1743 while (i--) { 1744 prop = copy[i]; 1745 event[prop] = originalEvent[prop] 1746 } 1747 if (event.target.nodeType === 3) { 1748 event.target = event.target.parentNode 1749 } 1750 return fixHook.filter ? fixHook.filter(event, originalEvent) : event 1751 }, 1752 special: { 1753 load: { 1754 noBubble: true 1755 }, 1756 click: { 1757 trigger: function() { 1758 if (this.type === "checkbox" && this.click && jQuery.nodeName(this, "input")) { 1759 this.click(); 1760 return false 1761 } 1762 } 1763 }, 1764 focus: { 1765 trigger: function() { 1766 if (this !== document.activeElement && this.focus) { 1767 this.focus(); 1768 return false 1769 } 1770 }, 1771 delegateType: "focusin" 1772 }, 1773 blur: { 1774 trigger: function() { 1775 if (this === document.activeElement && this.blur) { 1776 this.blur(); 1777 return false 1778 } 1779 }, 1780 delegateType: "focusout" 1781 }, 1782 beforeunload: { 1783 postDispatch: function(event) { 1784 if (event.result !== undefined) { 1785 event.originalEvent.returnValue = event.result 1786 } 1787 } 1788 } 1789 }, 1790 simulate: function(type, elem, event, bubble) { 1791 var e = jQuery.extend(new jQuery.Event(), event, { 1792 type: type, 1793 isSimulated: true, 1794 originalEvent: {} 1795 }); 1796 if (bubble) { 1797 jQuery.event.trigger(e, null, elem) 1798 } else { 1799 jQuery.event.dispatch.call(elem, e) 1800 } 1801 if (e.isDefaultPrevented()) { 1802 event.preventDefault() 1803 } 1804 } 1805 }; 1806 jQuery.removeEvent = function(elem, type, handle) { 1807 if (elem.removeEventListener) { 1808 elem.removeEventListener(type, handle, false) 1809 } 1810 }; 1811 jQuery.Event = function(src, props) { 1812 if (!(this instanceof jQuery.Event)) { 1813 return new jQuery.Event(src, props) 1814 } 1815 if (src && src.type) { 1816 this.originalEvent = src; 1817 this.type = src.type; 1818 this.isDefaultPrevented = (src.defaultPrevented || src.getPreventDefault && src.getPreventDefault()) ? returnTrue : returnFalse 1819 } else { 1820 this.type = src 1821 } 1822 if (props) { 1823 jQuery.extend(this, props) 1824 } 1825 this.timeStamp = src && src.timeStamp || jQuery.now(); 1826 this[jQuery.expando] = true 1827 }; 1828 jQuery.Event.prototype = { 1829 isDefaultPrevented: returnFalse, 1830 isPropagationStopped: returnFalse, 1831 isImmediatePropagationStopped: returnFalse, 1832 preventDefault: function() { 1833 var e = this.originalEvent; 1834 this.isDefaultPrevented = returnTrue; 1835 if (e && e.preventDefault) { 1836 e.preventDefault() 1837 } 1838 }, 1839 stopPropagation: function() { 1840 var e = this.originalEvent; 1841 this.isPropagationStopped = returnTrue; 1842 if (e && e.stopPropagation) { 1843 e.stopPropagation() 1844 } 1845 }, 1846 stopImmediatePropagation: function() { 1847 this.isImmediatePropagationStopped = returnTrue; 1848 this.stopPropagation() 1849 } 1850 }; 1851 jQuery.each({
1852 mouseenter: "mouseover", 1853 mouseleave: "mouseout" 1854 }, function(orig, fix) { 1855 jQuery.event.special[orig] = { 1856 delegateType: fix, 1857 bindType: fix, 1858 handle: function(event) { 1859 var ret, target = this, 1860 related = event.relatedTarget, 1861 handleObj = event.handleObj; 1862 if (!related || (related !== target && !jQuery.contains(target, related))) { 1863 event.type = handleObj.origType; 1864 ret = handleObj.handler.apply(this, arguments); 1865 event.type = fix 1866 } 1867 return ret 1868 } 1869 } 1870 }); 1871 if (!jQuery.support.focusinBubbles) { 1872 jQuery.each({ 1873 focus: "focusin", 1874 blur: "focusout" 1875 }, function(orig, fix) { 1876 var attaches = 0, 1877 handler = function(event) { 1878 jQuery.event.simulate(fix, event.target, jQuery.event.fix(event), true) 1879 }; 1880 jQuery.event.special[fix] = { 1881 setup: function() { 1882 if (attaches++ === 0) { 1883 document.addEventListener(orig, handler, true) 1884 } 1885 }, 1886 teardown: function() { 1887 if (--attaches === 0) { 1888 document.removeEventListener(orig, handler, true) 1889 } 1890 } 1891 } 1892 }) 1893 } 1894 jQuery.fn.extend({ 1895 on: function(types, selector, data, fn, one) { 1896 var origFn, type; 1897 if (typeof types === "object") { 1898 if (typeof selector !== "string") { 1899 data = data || selector; 1900 selector = undefined 1901 } 1902 for (type in types) { 1903 this.on(type, selector, data, types[type], one) 1904 } 1905 return this 1906 } 1907 if (data == null && fn == null) { 1908 fn = selector; 1909 data = selector = undefined 1910 } else if (fn == null) { 1911 if (typeof selector === "string") { 1912 fn = data; 1913 data = undefined 1914 } else { 1915 fn = data; 1916 data = selector; 1917 selector = undefined 1918 } 1919 } 1920 if (fn === false) { 1921 fn = returnFalse 1922 } else if (!fn) { 1923 return this 1924 } 1925 if (one === 1) { 1926 origFn = fn; 1927 fn = function(event) { 1928 jQuery().off(event); 1929 return origFn.apply(this, arguments) 1930 }; 1931 fn.guid = origFn.guid || (origFn.guid = jQuery.guid++) 1932 } 1933 return this.each(function() { 1934 jQuery.event.add(this, types, fn, data, selector) 1935 }) 1936 }, 1937 one: function(types, selector, data, fn) { 1938 return this.on(types, selector, data, fn, 1) 1939 }, 1940 off: function(types, selector, fn) { 1941 var handleObj, type; 1942 if (types && types.preventDefault && types.handleObj) { 1943 handleObj = types.handleObj; 1944 jQuery(types.delegateTarget).off(handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler); 1945 return this 1946 } 1947 if (typeof types === "object") { 1948 for (type in types) { 1949 this.off(type, selector, types[type]) 1950 } 1951 return this 1952 } 1953 if (selector === false || typeof selector === "function") { 1954 fn = selector; 1955 selector = undefined 1956 } 1957 if (fn === false) { 1958 fn = returnFalse 1959 } 1960 return this.each(function() { 1961 jQuery.event.remove(this, types, fn, selector) 1962 }) 1963 }, 1964 bind: function(types, data, fn) { 1965 return this.on(types, null, data, fn) 1966 }, 1967 unbind: function(types, fn) { 1968 return this.off(types, null, fn) 1969 }, 1970 delegate: function(selector, types, data, fn) { 1971 return this.on(types, selector, data, fn) 1972 }, 1973 undelegate: function(selector, types, fn) { 1974 return arguments.length === 1 ? this.off(selector, "**") : this.off(types, selector || "**", fn) 1975 }, 1976 trigger: function(type, data) { 1977 return this.each(function() { 1978 jQuery.event.trigger(type, data, this) 1979 }) 1980 }, 1981 triggerHandler: function(type, data) { 1982 var elem = this[0]; 1983 if (elem) { 1984 return jQuery.event.trigger(type, data, elem, true) 1985 } 1986 } 1987 }); 1988 (function(window, undefined) { 1989 var i, cachedruns, Expr, getText, isXML, compile, outermostContext, recompare, sortInput, setDocument, document, docElem, documentIsXML, rbuggyQSA, rbuggyMatches, matches, contains, expando = "sizzle" + -(new Date()), 1990 preferredDoc = window.document, 1991 support = {}, 1992 dirruns = 0, 1993 done = 0, 1994 classCache = createCache(), 1995 tokenCache = createCache(), 1996 compilerCache = createCache(), 1997 hasDuplicate = false, 1998 sortOrder = function() { 1999 return 0 2000 }, 2001 strundefined = typeof undefined, 2002 MAX_NEGATIVE = 1 << 31, 2003 arr = [], 2004 pop = arr.pop, 2005 push_native = arr.push, 2006 push = arr.push, 2007 slice = arr.slice, 2008 indexOf = arr.indexOf || 2009 function(elem) { 2010 var i = 0, 2011 len = this.length; 2012 for (; i < len; i++) { 2013 if (this[i] === elem) { 2014 return i 2015 } 2016 } 2017 return -1 2018 }, whitespace = "[\\x20\\t\\r\\n\\f]", characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", identifier = characterEncoding.replace("w", "w#"), operators = "([*^$|!~]?=)", attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace(3, 8) + ")*)|.*)\\)|)", rtrim = new RegExp("^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g"), rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*"), rcombinators = new RegExp("^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*"), rpseudo = new RegExp(pseudos), ridentifier = new RegExp("^" + identifier + "$"), matchExpr = { 2019 "ID": new RegExp("^#(" + characterEncoding + ")"), 2020 "CLASS": new RegExp("^\\.(" + characterEncoding + ")"), 2021 "NAME": new RegExp("^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]"), 2022 "TAG": new RegExp("^(" + characterEncoding.replace("w", "w*") + ")"), 2023 "ATTR": new RegExp("^" + attributes), 2024 "PSEUDO": new RegExp("^" + pseudos), 2025 "CHILD": new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i"), 2026 "needsContext": new RegExp("^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i") 2027 }, rsibling = /[\x20\t\r\n\f]*[+~]/, rnative = /^[^{]+\{\s*\[native code/, rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, rinputs = /^(?:input|select|textarea|button)$/i, rheader = /^h\d$/i, rescape = /'|\\/g, rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, runescape = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g, funescape = function(_, escaped) { 2028 var high = "0x" + escaped - 0x10000; 2029 return high !== high ? escaped : high < 0 ? String.fromCharCode(high + 0x10000) : String.fromCharCode(high >>
2029 10 | 0xD800, high & 0x3FF | 0xDC00) 2030 }; 2031 try { 2032 push.apply((arr = slice.call(preferredDoc.childNodes)), preferredDoc.childNodes); 2033 arr[preferredDoc.childNodes.length].nodeType 2034 } catch (e) { 2035 push = { 2036 apply: arr.length ? 2037 function(target, els) { 2038 push_native.apply(target, slice.call(els)) 2039 } : function(target, els) { 2040 var j = target.length, 2041 i = 0; 2042 while ((target[j++] = els[i++])) {} 2043 target.length = j - 1 2044 } 2045 } 2046 } 2047 function isNative(fn) { 2048 return rnative.test(fn + "") 2049 } 2050 function createCache() { 2051 var cache, keys = []; 2052 return (cache = function(key, value) { 2053 if (keys.push(key += " ") > Expr.cacheLength) { 2054 delete cache[keys.shift()] 2055 } 2056 return (cache[key] = value) 2057 }) 2058 } 2059 function markFunction(fn) { 2060 fn[expando] = true; 2061 return fn 2062 } 2063 function assert(fn) { 2064 var div = document.createElement("div"); 2065 try { 2066 return !!fn(div) 2067 } catch (e) { 2068 return false 2069 } finally { 2070 div = null 2071 } 2072 } 2073 function Sizzle(selector, context, results, seed) { 2074 var match, elem, m, nodeType, i, groups, old, nid, newContext, newSelector; 2075 if ((context ? context.ownerDocument || context : preferredDoc) !== document) { 2076 setDocument(context) 2077 } 2078 context = context || document; 2079 results = results || []; 2080 if (!selector || typeof selector !== "string") { 2081 return results 2082 } 2083 if ((nodeType = context.nodeType) !== 1 && nodeType !== 9) { 2084 return [] 2085 } 2086 if (!documentIsXML && !seed) { 2087 if ((match = rquickExpr.exec(selector))) { 2088 if ((m = match[1])) { 2089 if (nodeType === 9) { 2090 elem = context.getElementById(m); 2091 if (elem && elem.parentNode) { 2092 if (elem.id === m) { 2093 results.push(elem); 2094 return results 2095 } 2096 } else { 2097 return results 2098 } 2099 } else { 2100 if (context.ownerDocument && (elem = context.ownerDocument.getElementById(m)) && contains(context, elem) && elem.id === m) { 2101 results.push(elem); 2102 return results 2103 } 2104 } 2105 } else if (match[2]) { 2106 push.apply(results, context.getElementsByTagName(selector)); 2107 return results 2108 } else if ((m = match[3]) && support.getByClassName && context.getElementsByClassName) { 2109 push.apply(results, context.getElementsByClassName(m)); 2110 return results 2111 } 2112 } 2113 if (support.qsa && !rbuggyQSA.test(selector)) { 2114 old = true; 2115 nid = expando; 2116 newContext = context; 2117 newSelector = nodeType === 9 && selector; 2118 if (nodeType === 1 && context.nodeName.toLowerCase() !== "object") { 2119 groups = tokenize(selector); 2120 if ((old = context.getAttribute("id"))) { 2121 nid = old.replace(rescape, "\\$&") 2122 } else { 2123 context.setAttribute("id", nid) 2124 } 2125 nid = "[id='" + nid + "'] "; 2126 i = groups.length; 2127 while (i--) { 2128 groups[i] = nid + toSelector(groups[i]) 2129 } 2130 newContext = rsibling.test(selector) && context.parentNode || context; 2131 newSelector = groups.join(",") 2132 } 2133 if (newSelector) { 2134 try { 2135 push.apply(results, newContext.querySelectorAll(newSelector)); 2136 return results 2137 } catch (qsaError) {} finally { 2138 if (!old) { 2139 context.removeAttribute("id") 2140 } 2141 } 2142 } 2143 } 2144 } 2145 return select(selector.replace(rtrim, "$1"), context, results, seed) 2146 } 2147 isXML = Sizzle.isXML = function(elem) { 2148 var documentElement = elem && (elem.ownerDocument || elem).documentElement; 2149 return documentElement ? documentElement.nodeName !== "HTML" : false 2150 }; 2151 setDocument = Sizzle.setDocument = function(node) { 2152 var doc = node ? node.ownerDocument || node : preferredDoc; 2153 if (doc === document || doc.nodeType !== 9 || !doc.documentElement) { 2154 return document 2155 } 2156 document = doc; 2157 docElem = doc.documentElement; 2158 documentIsXML = isXML(doc); 2159 support.tagNameNoComments = assert(function(div) { 2160 div.appendChild(doc.createComment("")); 2161 return !div.getElementsByTagName("*").length 2162 }); 2163 support.attributes = assert(function(div) { 2164 div.innerHTML = "<select></select>";
2165 var type = typeof div.lastChild.getAttribute("multiple"); 2166 return type !== "boolean" && type !== "string" 2167 }); 2168 support.getByClassName = assert(function(div) { 2169 div.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>"; 2170 if (!div.getElementsByClassName || !div.getElementsByClassName("e").length) { 2171 return false 2172 } 2173 div.lastChild.className = "e"; 2174 return div.getElementsByClassName("e").length === 2 2175 }); 2176 support.getByName = assert(function(div) { 2177 div.id = expando + 0; 2178 div.appendChild(document.createElement("a")).setAttribute("name", expando); 2179 div.appendChild(document.createElement("i")).setAttribute("name", expando); 2180 docElem.appendChild(div); 2181 var pass = doc.getElementsByName && doc.getElementsByName(expando).length === 2 + doc.getElementsByName(expando + 0).length; 2182 docElem.removeChild(div); 2183 return pass 2184 }); 2185 support.sortDetached = assert(function(div1) { 2186 return div1.compareDocumentPosition && (div1.compareDocumentPosition(document.createElement("div")) & 1) 2187 }); 2188 Expr.attrHandle = assert(function(div) { 2189 div.innerHTML = "<a href='#'></a>"; 2190 return div.firstChild && typeof div.firstChild.getAttribute !== strundefined && div.firstChild.getAttribute("href") === "#" 2191 }) ? {} : { 2192 "href": function(elem) { 2193 return elem.getAttribute("href", 2) 2194 }, 2195 "type": function(elem) { 2196 return elem.getAttribute("type") 2197 } 2198 }; 2199 if (support.getByName) { 2200 Expr.find["ID"] = function(id, context) { 2201 if (typeof context.getElementById !== strundefined && !documentIsXML) { 2202 var m = context.getElementById(id); 2203 return m && m.parentNode ? [m] : [] 2204 } 2205 }; 2206 Expr.filter["ID"] = function(id) { 2207 var attrId = id.replace(runescape, funescape); 2208 return function(elem) { 2209 return elem.getAttribute("id") === attrId 2210 } 2211 } 2212 } else { 2213 Expr.find["ID"] = function(id, context) { 2214 if (typeof context.getElementById !== strundefined && !documentIsXML) { 2215 var m = context.getElementById(id); 2216 return m ? m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ? [m] : undefined : [] 2217 } 2218 }; 2219 Expr.filter["ID"] = function(id) { 2220 var attrId = id.replace(runescape, funescape); 2221 return function(elem) { 2222 var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); 2223 return node && node.value === attrId 2224 } 2225 } 2226 } 2227 Expr.find["TAG"] = support.tagNameNoComments ? 2228 function(tag, context) { 2229 if (typeof context.getElementsByTagName !== strundefined) { 2230 return context.getElementsByTagName(tag) 2231 } 2232 } : function(tag, context) { 2233 var elem, tmp = [], 2234 i = 0, 2235 results = context.getElementsByTagName(tag); 2236 if (tag === "*") { 2237 while ((elem = results[i++])) { 2238 if (elem.nodeType === 1) { 2239 tmp.push(elem) 2240 } 2241 } 2242 return tmp 2243 } 2244 return results 2245 }; 2246 Expr.find["NAME"] = support.getByName && 2247 function(tag, context) { 2248 if (typeof context.getElementsByName !== strundefined) { 2249 return context.getElementsByName(name) 2250 } 2251 }; 2252 Expr.find["CLASS"] = support.getByClassName && 2253 function(className, context) { 2254 if (typeof context.getElementsByClassName !== strundefined && !documentIsXML) { 2255 return context.getElementsByClassName(className) 2256 } 2257 }; 2258 rbuggyMatches = []; 2259 rbuggyQSA = [":focus"]; 2260 if ((support.qsa = isNative(doc.querySelectorAll))) { 2261 assert(function(div) { 2262 div.innerHTML = "<select><option selected=''></option></select>"; 2263 if (!div.querySelectorAll("[selected]").length) { 2264 rbuggyQSA.push("\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)") 2265 } 2266 if (!div.querySelectorAll(":checked").length) { 2267 rbuggyQSA.push(":checked") 2268 } 2269 }); 2270 assert(function(div) { 2271 div.innerHTML = "<input type='hidden' i=''/>"; 2272 if (div.querySelectorAll("[i^='']").length) { 2273 rbuggyQSA.push("[*^$]=" + whitespace + "*(?:\"\"|'')") 2274 } 2275 if (!div.querySelectorAll(":enabled").length) { 2276 rbuggyQSA.push(":enabled", ":disabled") 2277 } 2278 div.querySelectorAll("*,:x"); 2279 rbuggyQSA.push(",.*:") 2280 }) 2281 } 2282 if ((support.matchesSelector = isNative((matches = docElem.matchesSelector || docElem.mozMatchesSelector || docElem.webkitMatchesSelector || docElem.oMatchesSelector || docElem.msMatchesSelector)))) { 2283 assert(function(div) { 2284 support.disconnectedMatch = matches.call(div, "div"); 2285 matches.call(div, "[s!='']:x"); 2286 rbuggyMatches.push("!=", pseudos) 2287 }) 2288 }
2289 rbuggyQSA = new RegExp(rbuggyQSA.join("|")); 2290 rbuggyMatches = rbuggyMatches.length && new RegExp(rbuggyMatches.join("|")); 2291 contains = isNative(docElem.contains) || docElem.compareDocumentPosition ? 2292 function(a, b) { 2293 var adown = a.nodeType === 9 ? a.documentElement : a, 2294 bup = b && b.parentNode; 2295 return a === bup || !! (bup && bup.nodeType === 1 && (adown.contains ? adown.contains(bup) : a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16)) 2296 } : function(a, b) { 2297 if (b) { 2298 while ((b = b.parentNode)) { 2299 if (b === a) { 2300 return true 2301 } 2302 } 2303 } 2304 return false 2305 }; 2306 sortOrder = docElem.compareDocumentPosition ? 2307 function(a, b) { 2308 if (a === b) { 2309 hasDuplicate = true; 2310 return 0 2311 } 2312 var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition(b); 2313 if (compare) { 2314 if (compare & 1 || (recompare && b.compareDocumentPosition(a) === compare)) { 2315 if (a === doc || contains(preferredDoc, a)) { 2316 return -1 2317 } 2318 if (b === doc || contains(preferredDoc, b)) { 2319 return 1 2320 } 2321 return sortInput ? (indexOf.call(sortInput, a) - indexOf.call(sortInput, b)) : 0 2322 } 2323 return compare & 4 ? -1 : 1 2324 } 2325 return a.compareDocumentPosition ? -1 : 1 2326 } : function(a, b) { 2327 var cur, i = 0, 2328 aup = a.parentNode, 2329 bup = b.parentNode, 2330 ap = [a], 2331 bp = [b]; 2332 if (a === b) { 2333 hasDuplicate = true; 2334 return 0 2335 } else if (!aup || !bup) { 2336 return a === doc ? -1 : b === doc ? 1 : aup ? -1 : bup ? 1 : 0 2337 } else if (aup === bup) { 2338 return siblingCheck(a, b) 2339 } 2340 cur = a; 2341 while ((cur = cur.parentNode)) { 2342 ap.unshift(cur) 2343 } 2344 cur = b; 2345 while ((cur = cur.parentNode)) { 2346 bp.unshift(cur) 2347 } 2348 while (ap[i] === bp[i]) { 2349 i++ 2350 } 2351 return i ? siblingCheck(ap[i], bp[i]) : ap[i] === preferredDoc ? -1 : bp[i] === preferredDoc ? 1 : 0 2352 }; 2353 return document 2354 }; 2355 Sizzle.matches = function(expr, elements) { 2356 return Sizzle(expr, null, null, elements) 2357 }; 2358 Sizzle.matchesSelector = function(elem, expr) { 2359 if ((elem.ownerDocument || elem) !== document) { 2360 setDocument(elem) 2361 } 2362 expr = expr.replace(rattributeQuotes, "='$1']"); 2363 if (support.matchesSelector && !documentIsXML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && !rbuggyQSA.test(expr)) { 2364 try { 2365 var ret = matches.call(elem, expr); 2366 if (ret || support.disconnectedMatch || elem.document && elem.document.nodeType !== 11) { 2367 return ret 2368 } 2369 } catch (e) {} 2370 } 2371 return Sizzle(expr, document, null, [elem]).length > 0 2372 }; 2373 Sizzle.contains = function(context, elem) { 2374 if ((context.ownerDocument || context) !== document) { 2375 setDocument(context) 2376 } 2377 return contains(context, elem) 2378 }; 2379 Sizzle.attr = function(elem, name) { 2380 var val; 2381 if ((elem.ownerDocument || elem) !== document) { 2382 setDocument(elem) 2383 } 2384 if (!documentIsXML) { 2385 name = name.toLowerCase() 2386 } 2387 if ((val = Expr.attrHandle[name])) { 2388 return val(elem) 2389 } 2390 if (documentIsXML || support.attributes) { 2391 return elem.getAttribute(name) 2392 } 2393 return ((val = elem.getAttributeNode(name)) || elem.getAttribute(name)) && elem[name] === true ? name : val && val.specified ? val.value : null 2394 }; 2395 Sizzle.error = function(msg) { 2396 throw new Error("Syntax error, unrecognized expression: " + msg); 2397 }; 2398 Sizzle.uniqueSort = function(results) { 2399 var elem, duplicates = [], 2400 j = 0, 2401 i = 0; 2402 hasDuplicate = !support.detectDuplicates; 2403 recompare = !support.sortDetached; 2404 sortInput = !support.sortStable && results.slice(0); 2405 results.sort(sortOrder); 2406 if (hasDuplicate) { 2407 while ((elem = results[i++])) { 2408 if (elem === results[i]) { 2409 j = duplicates.push(i) 2410 } 2411 } 2412 while (j--) { 2413 results.splice(duplicates[j], 1) 2414 } 2415 } 2416 return results 2417 }; 2418 2419 function siblingCheck(a, b) { 2420 var cur = b && a, 2421 diff = cur && (~b.sourceIndex || MAX_NEGATIVE) - (~a.sourceIndex || MAX_NEGATIVE); 2422 if (diff) { 2423 return diff 2424 } 2425 if (cur) { 2426 while ((cur = cur.nextSibling)) { 2427 if (cur === b) { 2428 return -1 2429 } 2430 } 2431 } 2432 return a ? 1 : -1 2433 } 2434 function createInputPseudo(type) { 2435 return function(elem) { 2436 var name = elem.nodeName.toLowerCase(); 2437 return name === "input" && elem.type === type 2438 } 2439 } 2440 function createButtonPseudo(type) { 2441 return function(elem) { 2442 var name = elem.nodeName.toLowerCase(); 2443 return (name === "input" || name === "button") && elem.type === type 2444 } 2445 } 2446 function createPositionalPseudo(fn) { 2447 return markFunction(function(argument) { 2448 argument = +argument; 2449 return markFunction(function(seed, matches) { 2450 var j, matchIndexes = fn([], seed.length, argument), 2451 i = matchIndexes.length; 2452 while (i--) { 2453 if (seed[(j = matchIndexes[i])]) { 2454 seed[j] = !(matches[j] = seed[j]) 2455 } 2456 } 2457 }) 2458 }) 2459 } 2460 getText = Sizzle.getText = function(elem) { 2461 var node, ret = "", 2462 i = 0, 2463 nodeType = elem.nodeType; 2464 if (!nodeType) { 2465 for (; 2466 (node = elem[i]); i++) { 2467 ret += getText(node) 2468 } 2469 } else if (nodeType === 1 || nodeType === 9 || nodeType === 11) { 2470 if (typeof elem.textContent === "string") { 2471 return elem.textContent 2472 } else { 2473 for (elem = elem.firstChild; elem; elem = elem.nextSibling) { 2474 ret += getText(elem) 2475 } 2476 } 2477 } else if (nodeType === 3 || nodeType === 4) { 2478 return elem.nodeValue 2479 } 2480 return ret 2481 }; 2482 Expr = Sizzle.selectors = { 2483 cacheLength: 50, 2484 createPseudo: markFunction, 2485 match: matchExpr, 2486 find: {}, 2487 relative: { 2488 ">": { 2489 dir: "parentNode", 2490 first: true 2491 }, 2492 " ": { 2493 dir: "parentNode" 2494 }, 2495 "+": { 2496 dir: "previousSibling", 2497 first: true 2498 }, 2499 "~": { 2500 dir: "previousSibling" 2501 } 2502 }, 2503 preFilter: { 2504 "ATTR": function(match) { 2505 match[1] = match[1].replace(runescape, funescape); 2506 match[3] = (match[4] || match[5] || "").replace(runescape, funescape); 2507 if (match[2] === "~=") { 2508 match[3] = " " + match[3] + " " 2509 } 2510 return match.slice(0, 4) 2511 }, 2512 "CHILD": function(match) { 2513 match[1] = match[1].toLowerCase(); 2514 if (match[1].slice(0, 3) === "nth") { 2515 if (!match[3]) { 2516 Sizzle.error(match[0]) 2517 } 2518 match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * (match[3] === "even" || match[3] === "odd")); 2519 match[5] = +((match[7] + match[8]) || match[3] === "odd") 2520 } else if (match[3]) { 2521 Sizzle.error(match[0]) 2522 } 2523 return match 2524 }, 2525 "PSEUDO": function(match) { 2526 var excess, unquoted = !match[5] && match[2]; 2527 if (matchExpr["CHILD"].test(match[0])) { 2528 return null 2529 } 2530 if (match[4]) { 2531 match[2] = match[4] 2532 } else if (unquoted && rpseudo.test(unquoted) && (excess = tokenize(unquoted, true)) && (excess = unquoted.indexOf(")", unquoted.length - excess) - unquoted.length)) { 2533 match[0] = match[0].slice(0, excess); 2534 match[2] = unquoted.slice(0, excess) 2535 } 2536 return match.slice(0, 3) 2537 } 2538 }, 2539 filter: { 2540 "TAG": function(nodeName) { 2541 if (nodeName === "*") { 2542 return function() { 2543 return true 2544 } 2545 } 2546 nodeName = nodeName.replace(runescape, funescape).toLowerCase(); 2547 return function(elem) { 2548 return elem.nodeName && elem.nodeName.toLowerCase() === nodeName 2549 } 2550 }, 2551 "CLASS": function(className) { 2552 var pattern = classCache[className + " "]; 2553 return pattern || (pattern = new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)")) && classCache(className, function(elem) { 2554 return pattern.test(elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "") 2555 }) 2556 }, 2557 "ATTR": function(name, operator, check) { 2558 return function(elem) { 2559 var result = Sizzle.attr(elem, name); 2560 if (result == null) { 2561 return operator === "!=" 2562 } 2563 if (!operator) { 2564 return true 2565 } 2566 result += ""; 2567 return operator === "=" ? result === check : operator === "!=" ? result !== check : operator === "^=" ? check && result.indexOf(check) === 0 : operator === "*=" ? check && result.indexOf(check) > -1 : operator === "$=" ? check && result.slice(-check.length) === check : operator === "~=" ? (" " + result + " ").indexOf(check) > -1 : operator === "|=" ? result === check || result.slice(0, check.length + 1) === check + "-" : false 2568 } 2569 }, 2570 "CHILD": function(type, what, argument, first, last) { 2571 var simple = type.slice(0, 3) !== "nth", 2572 forward = type.slice(-4) !== "last", 2573 ofType = what === "of-type"; 2574 return first === 1 && last === 0 ? 2575 function(elem) { 2576 return !!elem.parentNode 2577 } : function(elem, context, xml) { 2578 var cache, outerCache, node, diff, nodeIndex, start, dir = simple !== forward ? "nextSibling" : "previousSibling", 2579 parent = elem.parentNode, 2580 name = ofType && elem.nodeName.toLowerCase(), 2581 useCache = !xml && !ofType; 2582 if (parent) { 2583 if (simple) { 2584 while (dir) { 2585 node = elem; 2586 while ((node = node[dir])) { 2587 if (ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) { 2588 return false 2589 } 2590 } 2591 start = dir = type === "only" && !start && "nextSibling" 2592 } 2593 return true 2594 } 2595 start = [forward ? parent.firstChild : parent.lastChild]; 2596 if (forward && useCache) { 2597 outerCache = parent[expando] || (parent[expando] = {}); 2598 cache = outerCache[type] || [];
2599 nodeIndex = cache[0] === dirruns && cache[1]; 2600 diff = cache[0] === dirruns && cache[2]; 2601 node = nodeIndex && parent.childNodes[nodeIndex]; 2602 while ((node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0) || start.pop())) { 2603 if (node.nodeType === 1 && ++diff && node === elem) { 2604 outerCache[type] = [dirruns, nodeIndex, diff]; 2605 break 2606 } 2607 } 2608 } else if (useCache && (cache = (elem[expando] || (elem[expando] = {}))[type]) && cache[0] === dirruns) { 2609 diff = cache[1] 2610 } else { 2611 while ((node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0) || start.pop())) { 2612 if ((ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) && ++diff) { 2613 if (useCache) { 2614 (node[expando] || (node[expando] = {}))[type] = [dirruns, diff] 2615 } 2616 if (node === elem) { 2617 break 2618 } 2619 } 2620 } 2621 } 2622 diff -= last; 2623 return diff === first || (diff % first === 0 && diff / first >= 0) 2624 } 2625 } 2626 }, 2627 "PSEUDO": function(pseudo, argument) { 2628 var args, fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || Sizzle.error("unsupported pseudo: " + pseudo); 2629 if (fn[expando]) { 2630 return fn(argument) 2631 } 2632 if (fn.length > 1) { 2633 args = [pseudo, pseudo, "", argument]; 2634 return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(function(seed, matches) { 2635 var idx, matched = fn(seed, argument), 2636 i = matched.length; 2637 while (i--) { 2638 idx = indexOf.call(seed, matched[i]); 2639 seed[idx] = !(matches[idx] = matched[i]) 2640 } 2641 }) : function(elem) { 2642 return fn(elem, 0, args) 2643 } 2644 } 2645 return fn 2646 } 2647 }, 2648 pseudos: { 2649 "not": markFunction(function(selector) { 2650 var input = [], 2651 results = [], 2652 matcher = compile(selector.replace(rtrim, "$1")); 2653 return matcher[expando] ? markFunction(function(seed, matches, context, xml) { 2654 var elem, unmatched = matcher(seed, null, xml, []), 2655 i = seed.length; 2656 while (i--) { 2657 if ((elem = unmatched[i])) { 2658 seed[i] = !(matches[i] = elem) 2659 } 2660 } 2661 }) : function(elem, context, xml) { 2662 input[0] = elem; 2663 matcher(input, null, xml, results); 2664 return !results.pop() 2665 } 2666 }), 2667 "has": markFunction(function(selector) { 2668 return function(elem) { 2669 return Sizzle(selector, elem).length > 0 2670 } 2671 }), 2672 "contains": markFunction(function(text) { 2673 return function(elem) { 2674 return (elem.textContent || elem.innerText || getText(elem)).indexOf(text) > -1 2675 } 2676 }), 2677 "lang": markFunction(function(lang) { 2678 if (!ridentifier.test(lang || "")) { 2679 Sizzle.error("unsupported lang: " + lang) 2680 } 2681 lang = lang.replace(runescape, funescape).toLowerCase(); 2682 return function(elem) { 2683 var elemLang; 2684 do { 2685 if ((elemLang = documentIsXML ? elem.getAttribute("xml:lang") || elem.getAttribute("lang") : elem.lang)) { 2686 elemLang = elemLang.toLowerCase(); 2687 return elemLang === lang || elemLang.indexOf(lang + "-") === 0 2688 } 2689 } while ((elem = elem.parentNode) && elem.nodeType === 1); 2690 return false 2691 } 2692 }), 2693 "target": function(elem) { 2694 var hash = window.location && window.location.hash; 2695 return hash && hash.slice(1) === elem.id 2696 }, 2697 "root": function(elem) { 2698 return elem === docElem 2699 }, 2700 "focus": function(elem) { 2701 return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !! (elem.type || elem.href || ~elem.tabIndex) 2702 }, 2703 "enabled": function(elem) { 2704 return elem.disabled === false 2705 }, 2706 "disabled": function(elem) { 2707 return elem.disabled === true 2708 }, 2709 "checked": function(elem) { 2710 var nodeName = elem.nodeName.toLowerCase(); 2711 return (nodeName === "input" && !! elem.checked) || (nodeName === "option" && !! elem.selected) 2712 }, 2713 "selected": function(elem) { 2714 if (elem.parentNode) { 2715 elem.parentNode.selectedIndex 2716 } 2717 return elem.selected === true 2718 }, 2719 "empty": function(elem) { 2720 for (elem = elem.firstChild; elem; elem = elem.nextSibling) { 2721 if (elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4) { 2722 return false 2723 } 2724 } 2725 return true 2726 }, 2727 "parent": function(elem) { 2728 return !Expr.pseudos["empty"](elem) 2729 }, 2730 "header": function(elem) { 2731 return rheader.test(elem.nodeName) 2732 }, 2733 "input": function(elem) { 2734 return rinputs.test(elem.nodeName) 2735 }, 2736 "button": function(elem) { 2737 var name = elem.nodeName.toLowerCase(); 2738 return name === "input" && elem.type === "button" || name === "button" 2739 }, 2740 "text": function(elem) { 2741 var attr; 2742 return elem.nodeName.toLowerCase() === "input" && elem.type === "text" && ((attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type) 2743 }, 2744 "first": createPositionalPseudo(function() { 2745 return [0] 2746 }), 2747 "last": createPositionalPseudo(function(matchIndexes, length) { 2748 return [length - 1] 2749 }), 2750 "eq": createPositionalPseudo(function(matchIndexes, length, argument) { 2751 return [argument < 0 ? argument + length : argument] 2752 }), 2753 "even": createPositionalPseudo(function(matchIndexes, length) { 2754 var i = 0; 2755 for (; i < length; i += 2) { 2756 matchIndexes.push(i) 2757 } 2758 return matchIndexes 2759 }), 2760 "odd": createPositionalPseudo(function(matchIndexes, length) { 2761 var i = 1; 2762 for (; i < length; i += 2) { 2763 matchIndexes.push(i) 2764 } 2765 return matchIndexes 2766 }), 2767 "lt": createPositionalPseudo(function(matchIndexes, length, argument) { 2768 var i = argument < 0 ? argument + length : argument; 2769 for (; --i >= 0;) { 2770 matchIndexes.push(i) 2771 } 2772 return matchIndexes 2773 }), 2774 "gt": createPositionalPseudo(function(matchIndexes, length, argument) { 2775 var i = argument < 0 ? argument + length : argument; 2776 for (; ++i < length;) { 2777 matchIndexes.push(i) 2778 } 2779 return matchIndexes 2780 }) 2781 } 2782 }; 2783 for (i in { 2784 radio: true, 2785 checkbox: true, 2786 file: true, 2787 password: true, 2788 image: true 2789 }) { 2790 Expr.pseudos[i] = createInputPseudo(i) 2791 } 2792 for (i in { 2793 submit: true, 2794 reset: true 2795 }) { 2796 Expr.pseudos[i] = createButtonPseudo(i) 2797 } 2798 function tokenize(selector, parseOnly) { 2799 var matched, match, tokens, type, soFar, groups, preFilters, cached = tokenCache[
2799selector + " "]; 2800 if (cached) { 2801 return parseOnly ? 0 : cached.slice(0) 2802 } 2803 soFar = selector; 2804 groups = []; 2805 preFilters = Expr.preFilter; 2806 while (soFar) { 2807 if (!matched || (match = rcomma.exec(soFar))) { 2808 if (match) { 2809 soFar = soFar.slice(match[0].length) || soFar 2810 } 2811 groups.push(tokens = []) 2812 } 2813 matched = false; 2814 if ((match = rcombinators.exec(soFar))) { 2815 matched = match.shift(); 2816 tokens.push({ 2817 value: matched, 2818 type: match[0].replace(rtrim, " ") 2819 }); 2820 soFar = soFar.slice(matched.length) 2821 } 2822 for (type in Expr.filter) { 2823 if ((match = matchExpr[type].exec(soFar)) && (!preFilters[type] || (match = preFilters[type](match)))) { 2824 matched = match.shift(); 2825 tokens.push({ 2826 value: matched, 2827 type: type, 2828 matches: match 2829 }); 2830 soFar = soFar.slice(matched.length) 2831 } 2832 } 2833 if (!matched) { 2834 break 2835 } 2836 } 2837 return parseOnly ? soFar.length : soFar ? Sizzle.error(selector) : tokenCache(selector, groups).slice(0) 2838 } 2839 function toSelector(tokens) { 2840 var i = 0, 2841 len = tokens.length, 2842 selector = ""; 2843 for (; i < len; i++) { 2844 selector += tokens[i].value 2845 } 2846 return selector 2847 } 2848 function addCombinator(matcher, combinator, base) { 2849 var dir = combinator.dir, 2850 checkNonElements = base && dir === "parentNode", 2851 doneName = done++; 2852 return combinator.first ? 2853 function(elem, context, xml) { 2854 while ((elem = elem[dir])) { 2855 if (elem.nodeType === 1 || checkNonElements) { 2856 return matcher(elem, context, xml) 2857 } 2858 } 2859 } : function(elem, context, xml) { 2860 var data, cache, outerCache, dirkey = dirruns + " " + doneName; 2861 if (xml) { 2862 while ((elem = elem[dir])) { 2863 if (elem.nodeType === 1 || checkNonElements) { 2864 if (matcher(elem, context, xml)) { 2865 return true 2866 } 2867 } 2868 } 2869 } else { 2870 while ((elem = elem[dir])) { 2871 if (elem.nodeType === 1 || checkNonElements) { 2872 outerCache = elem[expando] || (elem[expando] = {}); 2873 if ((cache = outerCache[dir]) && cache[0] === dirkey) { 2874 if ((data = cache[1]) === true || data === cachedruns) { 2875 return data === true 2876 } 2877 } else { 2878 cache = outerCache[dir] = [dirkey]; 2879 cache[1] = matcher(elem, context, xml) || cachedruns; 2880 if (cache[1] === true) { 2881 return true 2882 } 2883 } 2884 } 2885 } 2886 } 2887 } 2888 } 2889 function elementMatcher(matchers) { 2890 return matchers.length > 1 ? 2891 function(elem, context, xml) { 2892 var i = matchers.length; 2893 while (i--) { 2894 if (!matchers[i](elem, context, xml)) { 2895 return false 2896 } 2897 } 2898 return true 2899 } : matchers[0] 2900 } 2901 function condense(unmatched, map, filter, context, xml) { 2902 var elem, newUnmatched = [], 2903 i = 0, 2904 len = unmatched.length, 2905 mapped = map != null; 2906 for (; i < len; i++) { 2907 if ((elem = unmatched[i])) { 2908 if (!filter || filter(elem, context, xml)) { 2909 newUnmatched.push(elem); 2910 if (mapped) { 2911 map.push(i) 2912 } 2913 } 2914 } 2915 } 2916 return newUnmatched 2917 } 2918 function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) { 2919 if (postFilter && !postFilter[expando]) { 2920 postFilter = setMatcher(postFilter) 2921 } 2922 if (postFinder && !postFinder[expando]) { 2923 postFinder = setMatcher(postFinder, postSelector) 2924 } 2925 return markFunction(function(seed, results, context, xml) { 2926 var temp, i, elem, preMap = [], 2927 postMap = [], 2928 preexisting = results.length, 2929 elems = seed || multipleContexts(selector || "*", context.nodeType ? [context] : context, []), 2930 matcherIn = preFilter && (seed || !selector) ? condense(elems, preMap, preFilter, context, xml) : elems, 2931 matcherOut = matcher ? postFinder || (seed ? preFilter : preexisting || postFilter) ? [] : results : matcherIn; 2932 if (matcher) { 2933 matcher(matcherIn, matcherOut, context, xml) 2934 } 2935 if (postFilter) { 2936 temp = condense(matcherOut, postMap); 2937 postFilter(temp, [], context, xml); 2938 i = temp.length; 2939 while (i--) { 2940 if ((elem = temp[i])) { 2941 matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem) 2942 } 2943 } 2944 } 2945 if (seed) { 2946 if (postFinder || preFilter) { 2947 if (postFinder) { 2948 temp = []; 2949 i = matcherOut.length; 2950 while (i--) { 2951 if ((elem = matcherOut[i])) { 2952 temp.push((matcherIn[i] = elem)) 2953 } 2954 } 2955 postFinder(null, (matcherOut = []), temp, xml) 2956 } 2957 i = matcherOut.length; 2958 while (i--) { 2959 if ((elem = matcherOut[i]) && (temp = postFinder ? indexOf.call(seed, elem) : preMap[i]) > -1) { 2960 seed[temp] = !(results[temp] = elem) 2961 } 2962 } 2963 } 2964 } else { 2965 matcherOut = condense(matcherOut === results ? matcherOut.splice(preexisting, matcherOut.length) : matcherOut); 2966 if (postFinder) { 2967 postFinder(null, results, matcherOut, xml) 2968 } else { 2969 push.apply(results, matcherOut) 2970 } 2971 } 2972 }) 2973 } 2974 function matcherFromTokens(tokens) { 2975 var checkContext, matcher, j, len = tokens.length, 2976 leadingRelative = Expr.relative[tokens[0].type], 2977 implicitRelative = leadingRelative || Expr.relative[" "],
2978 i = leadingRelative ? 1 : 0, 2979 matchContext = addCombinator(function(elem) { 2980 return elem === checkContext 2981 }, implicitRelative, true), 2982 matchAnyContext = addCombinator(function(elem) { 2983 return indexOf.call(checkContext, elem) > -1 2984 }, implicitRelative, true), 2985 matchers = [function(elem, context, xml) { 2986 return (!leadingRelative && (xml || context !== outermostContext)) || ((checkContext = context).nodeType ? matchContext(elem, context, xml) : matchAnyContext(elem, context, xml)) 2987 }]; 2988 for (; i < len; i++) { 2989 if ((matcher = Expr.relative[tokens[i].type])) { 2990 matchers = [addCombinator(elementMatcher(matchers), matcher)] 2991 } else { 2992 matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches); 2993 if (matcher[expando]) { 2994 j = ++i; 2995 for (; j < len; j++) { 2996 if (Expr.relative[tokens[j].type]) { 2997 break 2998 } 2999 } 3000 return setMatcher(i > 1 && elementMatcher(matchers), i > 1 && toSelector(tokens.slice(0, i - 1)).replace(rtrim, "$1"), matcher, i < j && matcherFromTokens(tokens.slice(i, j)), j < len && matcherFromTokens((tokens = tokens.slice(j))), j < len && toSelector(tokens)) 3001 } 3002 matchers.push(matcher) 3003 } 3004 } 3005 return elementMatcher(matchers) 3006 } 3007 function matcherFromGroupMatchers(elementMatchers, setMatchers) { 3008 var matcherCachedRuns = 0, 3009 bySet = setMatchers.length > 0, 3010 byElement = elementMatchers.length > 0, 3011 superMatcher = function(seed, context, xml, results, expandContext) { 3012 var elem, j, matcher, setMatched = [], 3013 matchedCount = 0, 3014 i = "0", 3015 unmatched = seed && [], 3016 outermost = expandContext != null, 3017 contextBackup = outermostContext, 3018 elems = seed || byElement && Expr.find["TAG"]("*", expandContext && context.parentNode || context), 3019 dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1); 3020 if (outermost) { 3021 outermostContext = context !== document && context; 3022 cachedruns = matcherCachedRuns 3023 } 3024 for (; 3025 (elem = elems[i]) != null; i++) { 3026 if (byElement && elem) { 3027 j = 0; 3028 while ((matcher = elementMatchers[j++])) { 3029 if (matcher(elem, context, xml)) { 3030 results.push(elem); 3031 break 3032 } 3033 } 3034 if (outermost) { 3035 dirruns = dirrunsUnique; 3036 cachedruns = ++matcherCachedRuns 3037 } 3038 } 3039 if (bySet) { 3040 if ((elem = !matcher && elem)) { 3041 matchedCount-- 3042 } 3043 if (seed) { 3044 unmatched.push(elem) 3045 } 3046 } 3047 } 3048 matchedCount += i; 3049 if (bySet && i !== matchedCount) { 3050 j = 0; 3051 while ((matcher = setMatchers[j++])) { 3052 matcher(unmatched, setMatched, context, xml) 3053 } 3054 if (seed) { 3055 if (matchedCount > 0) { 3056 while (i--) { 3057 if (!(unmatched[i] || setMatched[i])) { 3058 setMatched[i] = pop.call(results) 3059 } 3060 } 3061 } 3062 setMatched = condense(setMatched) 3063 } 3064 push.apply(results, setMatched); 3065 if (outermost && !seed && setMatched.length > 0 && (matchedCount + setMatchers.length) > 1) { 3066 Sizzle.uniqueSort(results) 3067 } 3068 } 3069 if (outermost) { 3070 dirruns = dirrunsUnique; 3071 outermostContext = contextBackup 3072 } 3073 return unmatched 3074 }; 3075 return bySet ? markFunction(superMatcher) : superMatcher 3076 } 3077 compile = Sizzle.compile = function(selector, group) { 3078 var i, setMatchers = [], 3079 elementMatchers = [], 3080 cached = compilerCache[selector + " "]; 3081 if (!cached) { 3082 if (!group) { 3083 group = tokenize(selector) 3084 } 3085 i = group.length; 3086 while (i--) { 3087 cached = matcherFromTokens(group[i]); 3088 if (cached[expando]) { 3089 setMatchers.push(cached) 3090 } else { 3091 elementMatchers.push(cached) 3092 } 3093 } 3094 cached = compilerCache(selector, matcherFromGroupMatchers(elementMatchers, setMatchers)) 3095 } 3096 return cached 3097 }; 3098 3099 function multipleContexts(selector, contexts, results) { 3100 var i = 0, 3101 len = contexts.length; 3102 for (; i < len; i++) { 3103 Sizzle(selector, contexts[i], results) 3104 } 3105 return results 3106 } 3107 function select(selector, context, results, seed) { 3108 var i, tokens, token, type, find, match = tokenize(selector); 3109 if (!seed) { 3110 if (match.length === 1) { 3111 tokens = match[0] = match[0].slice(0); 3112 if (tokens.length > 2 && (token = tokens[0]).type === "ID" && context.nodeType === 9 && !documentIsXML && Expr.relative[tokens[1].type]) { 3113 context = (Expr.find["ID"](token.matches[0].replace(runescape, funescape), context) || [])[0]; 3114 if (!context) { 3115 return results 3116 } 3117 selector = selector.slice(tokens.shift().value.length) 3118 } 3119 i = matchExpr["needsContext"].test(selector) ? 0 : tokens.length; 3120 while (i--) { 3121 token = tokens[i]; 3122 if (Expr.relative[(type = token.type)]) { 3123 break 3124 } 3125 if ((find = Expr.find[type])) { 3126 if ((seed = find(token.matches[0].replace(runescape, funescape), rsibling.test(tokens[0].type) && context.parentNode || context))) { 3127 tokens.splice(i, 1); 3128 selector = seed.length && toSelector(tokens); 3129 if (!selector) { 3130 push.apply(results, seed); 3131 return results 3132 } 3133 break 3134 } 3135 } 3136 } 3137 } 3138 } 3139 compile(selector, match)(seed, context, documentIsXML, results, rsibling.test(selector)); 3140 return results 3141 } 3142 Expr.pseudos["nth"] = Expr.pseudos["eq"]; 3143 3144 function setFilters() {} 3145 setFilters.prototype = Expr.filters = Expr.pseudos; 3146 Expr.setFilters = new setFilters(); 3147 support.sortStable = expando.split("").sort(sortOrder).join("") === expando; 3148 setDocument(); 3149 [0, 0].sort(sortOrder); 3150 support.detectDuplicates = hasDuplicate; 3151 Sizzle.attr = jQuery.attr; 3152 jQuery.find = Sizzle; 3153 jQuery.expr = Sizzle.selectors; 3154 jQuery.expr[":"] = jQuery.expr.pseudos; 3155 jQuery.unique = Sizzle.uniqueSort; 3156 jQuery.text = Sizzle.getText; 3157 jQuery.isXMLDoc = Sizzle.isXML; 3158 jQuery.contains = Sizzle.contains 3159 })(window); 3160 var runtil = /Until$/, 3161 rparentsprev = /^(?:parents|prev(?:Until|All))/, 3162 isSimple = /^.[^:#\[\.,]*$/, 3163 rneedsContext = jQuery.expr.match.needsContext, 3164 guaranteedUnique = { 3165 children: true, 3166 contents: true, 3167 next: true, 3168 prev: true 3169 }; 3170 jQuery.fn.extend({ 3171 find: function(selector) { 3172 var self, matched, i, l = this.length; 3173 if (typeof selector !== "string") { 3174 self = this; 3175 return this.pushStack(jQuery(selector).filter(function() { 3176 for (i = 0; i < l; i++) { 3177 if (jQuery.contains(self[i], this)) { 3178 return true 3179 } 3180 } 3181 })) 3182 } 3183 matched = []; 3184 for (i = 0; i < l; i++) { 3185 jQuery.find(selector, this[i], matched) 3186 } 3187 matched = this.pushStack(l > 1 ? jQuery.unique(matched) : matched); 3188 matched.selector = (this.selector ? this.selector + " " : "") + selector; 3189 return matched 3190 }, 3191 has: function(target) { 3192 var targets = jQuery(target, this), 3193 l = targets.length; 3194 return this.filter(function() { 3195 var i = 0; 3196 for (; i < l; i++) { 3197 if (jQuery.contains(this, targets[i])) { 3198 return true 3199 } 3200 } 3201 }) 3202 }, 3203 not: function(selector) { 3204 return this.pushStack(winnow(this, selector, false)) 3205 }, 3206 filter: function(selector) { 3207 return this.pushStack(winnow(this, selector, true)) 3208 }, 3209 is: function(selector) { 3210 return !!selector && (typeof selector === "string" ? rneedsContext.test(selector) ? jQuery(selector, this.context).index(this[0]) >= 0 : jQuery.filter(selector, this).length > 0 : this.filter(selector).length > 0) 3211 }, 3212 closest: function(selectors, context) { 3213 var cur, i = 0, 3214 l = this.length, 3215 matched = [], 3216 pos = (rneedsContext.test(selectors) || typeof selectors !== "string") ? jQuery(selectors, context || this.context) : 0; 3217 for (; i < l; i++) { 3218 for (cur = this[i]; cur && cur !== context; cur = cur.parentNode) { 3219 if (cur.nodeType < 11 && (pos ? pos.index(cur) > -1 : cur.nodeType === 1 && jQuery.find.matchesSelector(cur, selectors))) { 3220 cur = matched.push(cur); 3221 break 3222 } 3223 } 3224 } 3225 return this.pushStack(matched.length > 1 ? jQuery.unique(matched) : matched) 3226 }, 3227 index: function(elem) { 3228 if (!elem) { 3229 return (this[0] && this[0].parentNode) ? this.first().prevAll().length : -1 3230 } 3231 if (typeof elem === "string") { 3232 return core_indexOf.call(jQuery(elem), this[0]) 3233 } 3234 return core_indexOf.call(this, elem.jquery ? elem[0] : elem) 3235 }, 3236 add: function(selector, context) { 3237 var set = typeof selector === "string" ? jQuery(selector, context) : jQuery.makeArray(selector && selector.nodeType ? [selector] : selector), 3238 all = jQuery.merge(this.get(), set); 3239 return this.pushStack(jQuery.unique(all)) 3240 }, 3241 addBack: function(selector) { 3242 return this.add(selector == null ? this.prevObject : this.prevObject.filter(selector)) 3243 } 3244 }); 3245 3246 function sibling(cur, dir) { 3247 while ((cur = cur[dir]) && cur.nodeType !== 1) {} 3248 return cur 3249 } 3250 jQuery.each({ 3251 parent: function(elem) { 3252 var parent = elem.parentNode; 3253 return parent && parent.nodeType !== 11 ? parent : null 3254 }, 3255 parents: function(elem) { 3256 return jQuery.dir(elem, "parentNode") 3257 }, 3258 parentsUntil: function(elem, i, until) { 3259 return jQuery.dir(elem, "parentNode", until) 3260 }, 3261 next: function(elem) { 3262 return sibling(elem, "nextSibling") 3263 }, 3264 prev: function(elem) { 3265 return sibling(elem, "previousSibling") 3266 }, 3267 nextAll: function(elem) { 3268 return jQuery.dir(elem, "nextSibling") 3269 }, 3270 prevAll: function(elem) { 3271 return jQuery.dir(elem, "previousSibling") 3272 }, 3273 nextUntil: function(elem, i, until) { 3274 return jQuery.dir(elem, "nextSibling", until) 3275 }, 3276 prevUntil: function(elem, i, until) { 3277 return jQuery.dir(elem, "previousSibling", until) 3278 }, 3279 siblings: function(elem) { 3280 return jQuery.sibling((elem.parentNode || {}).firstChild, elem) 3281 }, 3282 children: function(elem) { 3283 return jQuery.sibling(elem.firstChild) 3284 }, 3285 contents: function(elem) { 3286 return jQuery.nodeName(elem, "iframe") ? elem.contentDocument || elem.contentWindow.document : jQuery.merge([], elem.childNodes) 3287 } 3288 }, function(name, fn) { 3289 jQuery.fn[name] = function(until, selector) { 3290 var matched = jQuery.map(this, fn, until); 3291 if (!runtil.test(name)) { 3292 selector = until 3293 } 3294 if (selector && typeof selector === "string") { 3295 matched = jQuery.filter(selector, matched) 3296 } 3297 if (this.length > 1) { 3298 if (!guaranteedUnique[name]) { 3299 jQuery.unique(matched) 3300 } 3301 if (rparentsprev.test(name)) { 3302 matched.reverse() 3303 } 3304 } 3305 return this.pushStack(matched) 3306 } 3307 }); 3308 jQuery.extend({ 3309 filter: function(expr, elems, not) { 3310 if (not) { 3311 expr = ":not(" + expr + ")" 3312 } 3313 return elems.length === 1 ? jQuery.find.matchesSelector(elems[0], expr) ? [elems[0]] : [] : jQuery.find.matches(expr, elems) 3314 }, 3315 dir: function(elem, dir, until) { 3316 var matched = [], 3317 truncate = until !== undefined; 3318 while ((elem = elem[dir]) && elem.nodeType !== 9) { 3319 if (elem.nodeType === 1) { 3320 if (truncate && jQuery(elem).is(until)) { 3321 break 3322 } 3323 matched.push(elem) 3324 } 3325 } 3326 return matched 3327 }, 3328 sibling: function(n, elem) { 3329 var matched = []; 3330 for (; n; n = n.nextSibling) { 3331 if (n.nodeType === 1 && n !== elem) { 3332 matched.push(n) 3333 } 3334 } 3335 return matched 3336 } 3337 }); 3338 3339 function winnow(elements, qualifier, keep) {
3340 qualifier = qualifier || 0; 3341 var filtered; 3342 if (jQuery.isFunction(qualifier)) { 3343 return jQuery.grep(elements, function(elem, i) { 3344 var retVal = !! qualifier.call(elem, i, elem); 3345 return retVal === keep 3346 }) 3347 } 3348 if (qualifier.nodeType) { 3349 return jQuery.grep(elements, function(elem) { 3350 return (elem === qualifier) === keep 3351 }) 3352 } 3353 if (typeof qualifier === "string") { 3354 filtered = jQuery.grep(elements, function(elem) { 3355 return elem.nodeType === 1 3356 }); 3357 if (isSimple.test(qualifier)) { 3358 return jQuery.filter(qualifier, filtered, !keep) 3359 } 3360 qualifier = jQuery.filter(qualifier, filtered) 3361 } 3362 return jQuery.grep(elements, function(elem) { 3363 return (core_indexOf.call(qualifier, elem) >= 0) === keep 3364 }) 3365 } 3366 var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, 3367 rtagName = /<([\w:]+)/, 3368 rhtml = /<|&#?\w+;/, 3369 rnoInnerhtml = /<(?:script|style|link)/i, 3370 manipulation_rcheckableType = /^(?:checkbox|radio)$/i, 3371 rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, 3372 rscriptType = /^$|\/(?:java|ecma)script/i, 3373 rscriptTypeMasked = /^true\/(.*)/, 3374 rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g, 3375 wrapMap = { 3376 option: [1, "<select multiple='multiple'>", "</select>"], 3377 thead: [1, "<table>", "</table>"], 3378 tr: [2, "<table><tbody>", "</tbody></table>"], 3379 td: [3, "<table><tbody><tr>", "</tr></tbody></table>"], 3380 _default: [0, "", ""] 3381 }; 3382 wrapMap.optgroup = wrapMap.option; 3383 wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.col = wrapMap.thead; 3384 wrapMap.th = wrapMap.td; 3385 jQuery.fn.extend({ 3386 text: function(value) { 3387 return jQuery.access(this, function(value) { 3388 return value === undefined ? jQuery.text(this) : this.empty().append((this[0] && this[0].ownerDocument || document).createTextNode(value)) 3389 }, null, value, arguments.length) 3390 }, 3391 wrapAll: function(html) { 3392 var wrap; 3393 if (jQuery.isFunction(html)) { 3394 return this.each(function(i) { 3395 jQuery(this).wrapAll(html.call(this, i)) 3396 }) 3397 } 3398 if (this[0]) { 3399 wrap = jQuery(html, this[0].ownerDocument).eq(0).clone(true); 3400 if (this[0].parentNode) { 3401 wrap.insertBefore(this[0]) 3402 } 3403 wrap.map(function() { 3404 var elem = this; 3405 while (elem.firstElementChild) { 3406 elem = elem.firstElementChild 3407 } 3408 return elem 3409 }).append(this) 3410 } 3411 return this 3412 }, 3413 wrapInner: function(html) { 3414 if (jQuery.isFunction(html)) { 3415 return this.each(function(i) { 3416 jQuery(this).wrapInner(html.call(this, i)) 3417 }) 3418 } 3419 return this.each(function() { 3420 var self = jQuery(this), 3421 contents = self.contents(); 3422 if (contents.length) { 3423 contents.wrapAll(html) 3424 } else { 3425 self.append(html) 3426 } 3427 }) 3428 }, 3429 wrap: function(html) { 3430 var isFunction = jQuery.isFunction(html); 3431 return this.each(function(i) { 3432 jQuery(this).wrapAll(isFunction ? html.call(this, i) : html) 3433 }) 3434 }, 3435 unwrap: function() { 3436 return this.parent().each(function() { 3437 if (!jQuery.nodeName(this, "body")) { 3438 jQuery(this).replaceWith(this.childNodes) 3439 } 3440 }).end() 3441 }, 3442 append: function() { 3443 return this.domManip(arguments, true, function(elem) { 3444 if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) { 3445 this.appendChild(elem) 3446 } 3447 }) 3448 }, 3449 prepend: function() { 3450 return this.domManip(arguments, true, function(elem) { 3451 if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) { 3452 this.insertBefore(elem, this.firstChild) 3453 } 3454 }) 3455 }, 3456 before: function() { 3457 return this.domManip(arguments, false, function(elem) { 3458 if (this.parentNode) { 3459 this.parentNode.insertBefore(elem, this) 3460 } 3461 }) 3462 }, 3463 after: function() { 3464 return this.domManip(arguments, false, function(elem) { 3465 if (this.parentNode) { 3466 this.parentNode.insertBefore(elem, this.nextSibling) 3467 } 3468 }) 3469 }, 3470 remove: function(selector, keepData) { 3471 var elem, i = 0, 3472 l = this.length; 3473 for (; i < l; i++) { 3474 elem = this[i]; 3475 if (!selector || jQuery.filter(selector, [elem]).length > 0) { 3476 if (!keepData && elem.nodeType === 1) { 3477 jQuery.cleanData(getAll(elem)) 3478 } 3479 if (elem.parentNode) { 3480 if (keepData && jQuery.contains(elem.ownerDocument, elem)) { 3481 setGlobalEval(getAll(elem, "script")) 3482 } 3483 elem.parentNode.removeChild(elem) 3484 } 3485 } 3486 } 3487 return this 3488 }, 3489 empty: function() { 3490 var elem, i = 0, 3491 l = this.length; 3492 for (; i < l; i++) { 3493 elem = this[i]; 3494 if (elem.nodeType === 1) { 3495 jQuery.cleanData(getAll(elem, false)); 3496 elem.textContent = "" 3497 } 3498 } 3499 return this 3500 }, 3501 clone: function(dataAndEvents, deepDataAndEvents) { 3502 dataAndEvents = dataAndEvents == null ? false : dataAndEvents; 3503 deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; 3504 return this.map(function() { 3505 return jQuery.clone(this, dataAndEvents, deepDataAndEvents) 3506 }) 3507 }, 3508 html: function(value) { 3509 return jQuery.access(this, function(value) { 3510 var elem = this[0] || {}, 3511 i = 0, 3512 l = this.length; 3513 if (value === undefined && elem.nodeType === 1) { 3514 return elem.innerHTML 3515 } 3516 if (typeof value === "string" && !rnoInnerhtml.test(value) && !wrapMap[
3516(rtagName.exec(value) || ["", ""])[1].toLowerCase()]) { 3517 value = value.replace(rxhtmlTag, "<$1></$2>"); 3518 try { 3519 for (; i < l; i++) { 3520 elem = this[i] || {}; 3521 if (elem.nodeType === 1) { 3522 jQuery.cleanData(getAll(elem, false)); 3523 elem.innerHTML = value 3524 } 3525 } 3526 elem = 0 3527 } catch (e) {} 3528 } 3529 if (elem) { 3530 this.empty().append(value) 3531 } 3532 }, null, value, arguments.length) 3533 }, 3534 replaceWith: function(value) { 3535 var isFunction = jQuery.isFunction(value); 3536 if (!isFunction && typeof value !== "string") { 3537 value = jQuery(value).not(this).detach() 3538 } 3539 return value !== "" ? this.domManip([value], true, function(elem) { 3540 var next = this.nextSibling, 3541 parent = this.parentNode; 3542 if (parent) { 3543 jQuery(this).remove(); 3544 parent.insertBefore(elem, next) 3545 } 3546 }) : this.remove() 3547 }, 3548 detach: function(selector) { 3549 return this.remove(selector, true) 3550 }, 3551 domManip: function(args, table, callback) { 3552 args = core_concat.apply([], args); 3553 var fragment, first, scripts, hasScripts, node, doc, i = 0, 3554 l = this.length, 3555 set = this, 3556 iNoClone = l - 1, 3557 value = args[0], 3558 isFunction = jQuery.isFunction(value); 3559 if (isFunction || !(l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test(value))) { 3560 return this.each(function(index) { 3561 var self = set.eq(index); 3562 if (isFunction) { 3563 args[0] = value.call(this, index, table ? self.html() : undefined) 3564 } 3565 self.domManip(args, table, callback) 3566 }) 3567 } 3568 if (l) { 3569 fragment = jQuery.buildFragment(args, this[0].ownerDocument, false, this); 3570 first = fragment.firstChild; 3571 if (fragment.childNodes.length === 1) { 3572 fragment = first 3573 } 3574 if (first) { 3575 table = table && jQuery.nodeName(first, "tr"); 3576 scripts = jQuery.map(getAll(fragment, "script"), disableScript); 3577 hasScripts = scripts.length; 3578 for (; i < l; i++) { 3579 node = fragment; 3580 if (i !== iNoClone) { 3581 node = jQuery.clone(node, true, true); 3582 if (hasScripts) { 3583 jQuery.merge(scripts, getAll(node, "script")) 3584 } 3585 } 3586 callback.call(table && jQuery.nodeName(this[i], "table") ? findOrAppend(this[i], "tbody") : this[i], node, i) 3587 } 3588 if (hasScripts) { 3589 doc = scripts[scripts.length - 1].ownerDocument; 3590 jQuery.map(scripts, restoreScript); 3591 for (i = 0; i < hasScripts; i++) { 3592 node = scripts[i]; 3593 if (rscriptType.test(node.type || "") && !data_priv.access(node, "globalEval") && jQuery.contains(doc, node)) { 3594 if (node.src) { 3595 jQuery.ajax({ 3596 url: node.src, 3597 type: "GET", 3598 dataType: "script", 3599 async: false, 3600 global: false, 3601 "throws": true 3602 }) 3603 } else { 3604 jQuery.globalEval(node.textContent.replace(rcleanScript, "")) 3605 } 3606 } 3607 } 3608 } 3609 } 3610 } 3611 return this 3612 } 3613 }); 3614 jQuery.each({ 3615 appendTo: "append", 3616 prependTo: "prepend", 3617 insertBefore: "before", 3618 insertAfter: "after", 3619 replaceAll: "replaceWith" 3620 }, function(name, original) { 3621 jQuery.fn[name] = function(selector) { 3622 var elems, ret = [], 3623 insert = jQuery(selector), 3624 last = insert.length - 1, 3625 i = 0; 3626 for (; i <= last; i++) { 3627 elems = i === last ? this : this.clone(true); 3628 jQuery(insert[i])[original](elems); 3629 core_push.apply(ret, elems.get()) 3630 } 3631 return this.pushStack(ret) 3632 } 3633 }); 3634 jQuery.extend({ 3635 clone: function(elem, dataAndEvents, deepDataAndEvents) { 3636 var i, l, srcElements, destElements, clone = elem.cloneNode(true), 3637 inPage = jQuery.contains(elem.ownerDocument, elem); 3638 if (!jQuery.support.noCloneChecked && (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem)) { 3639 destElements = getAll(clone); 3640 srcElements = getAll(elem); 3641 for (i = 0, l = srcElements.length; i < l; i++) { 3642 fixInput(srcElements[i], destElements[i]) 3643 } 3644 } 3645 if (dataAndEvents) { 3646 if (deepDataAndEvents) { 3647 srcElements = srcElements || getAll(elem); 3648 destElements = destElements || getAll(clone); 3649 for (i = 0, l = srcElements.length; i < l; i++) { 3650 cloneCopyEvent(srcElements[i], destElements[i]) 3651 } 3652 } else { 3653 cloneCopyEvent(elem, clone) 3654 } 3655 } 3656 destElements = getAll(clone, "script"); 3657 if (destElements.length > 0) { 3658 setGlobalEval(destElements, !inPage && getAll(elem, "script")) 3659 } 3660 return clone 3661 }, 3662 buildFragment: function(elems, context, scripts, selection) { 3663 var elem, tmp, tag, wrap, contains, j, i = 0, 3664 l = elems.length, 3665 fragment = context.createDocumentFragment(), 3666 nodes = []; 3667 for (; i < l; i++) { 3668 elem = elems[i]; 3669 if (elem || elem === 0) { 3670 if (jQuery.type(elem) === "object") { 3671 jQuery.merge(nodes, elem.nodeType ? [elem] : elem) 3672 } else if (!rhtml.test(elem)) { 3673 nodes.push(context.createTextNode(elem)) 3674 } else { 3675 tmp = tmp || fragment.appendChild(context.createElement("div")); 3676 tag = (rtagName.exec(elem) || ["", ""])[1].toLowerCase(); 3677 wrap = wrapMap[tag] || wrapMap._default; 3678 tmp.innerHTML = wrap[1] + elem.replace(rxhtmlTag, "<$1></$2>") + wrap[2]; 3679 j = wrap[0]; 3680 while (j--) { 3681 tmp = tmp.firstChild 3682 } 3683 jQuery.merge(nodes, tmp.childNodes); 3684 tmp = fragment.firstChild; 3685 tmp.textContent = "" 3686 } 3687 } 3688 } 3689 fragment.textContent = ""; 3690 i = 0; 3691 while ((elem = nodes[i++])) { 3692 if (selection && jQuery.inArray(elem, selection) !== -1) { 3693 continue 3694 } 3695 contains = jQuery.contains(elem.ownerDocument, elem); 3696 tmp = getAll(fragment.appendChild(elem), "script"); 3697 if (contains) { 3698 setGlobalEval(tmp) 3699 } 3700 if (scripts) { 3701 j = 0; 3702 while ((elem = tmp[j++])) { 3703 if (rscriptType.test(elem.type || "")) { 3704 scripts.push(elem) 3705 } 3706 } 3707 } 3708 } 3709 return fragment 3710 }, 3711 cleanData: function(elems, acceptData) { 3712 var data, elem, type, l = elems.length, 3713 i = 0, 3714 special = jQuery.event.special; 3715 for (; i < l; i++) { 3716 elem = elems[i]; 3717 if (acceptData || jQuery.acceptData(elem)) { 3718 data = data_priv.access(elem); 3719 if (data) { 3720 for (type in data.events) { 3721 if (special[type]) { 3722 jQuery.event.remove(elem, type) 3723 } else { 3724 jQuery.removeEvent(elem, type, data.handle) 3725 } 3726 } 3727 } 3728 } 3729 data_discard(elem) 3730 } 3731 } 3732 }); 3733 3734 function findOrAppend(elem, tag) { 3735 return elem.getElementsByTagName(tag)[0] || elem.appendChild(elem.ownerDocument.createElement(tag)) 3736 } 3737 function disableScript(elem) { 3738 var attr = elem.getAttributeNode("type"); 3739 elem.type = (attr && attr.specified) + "/" + elem.type; 3740 return elem 3741 } 3742 function restoreScript(elem) { 3743 var match = rscriptTypeMasked.exec(elem.type); 3744 if (match) { 3745 elem.type = match[1] 3746 } else { 3747 elem.removeAttribute("type") 3748 } 3749 return elem 3750 } 3751 function setGlobalEval(elems, refElements) { 3752 var l = elems.length, 3753 i = 0; 3754 for (; i < l; i++) { 3755 data_priv.set(elems[i], "globalEval", !refElements || data_priv.get(refElements[i], "globalEval")) 3756 } 3757 } 3758 function cloneCopyEvent(src, dest) { 3759 var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; 3760 if (dest.nodeType !== 1) { 3761 return 3762 } 3763 if (data_priv.hasData(src)) { 3764 pdataOld = data_priv.access(src); 3765 pdataCur = jQuery.extend({}, pdataOld); 3766 events = pdataOld.events; 3767 data_priv.set(dest, pdataCur); 3768 if (events) { 3769 delete pdataCur.handle; 3770 pdataCur.events = {}; 3771 for (type in events) { 3772 for (i = 0, l = events[type].length; i < l; i++) { 3773 jQuery.event.add(dest, type, events[type][i]) 3774 } 3775 } 3776 } 3777 } 3778 if (data_user.hasData(src)) { 3779 udataOld = data_user.access(src); 3780 udataCur = jQuery.extend({}, udataOld); 3781 data_user.set(dest, udataCur) 3782 } 3783 } 3784 function getAll(context, tag) { 3785 var ret = context.getElementsByTagName ? context.getElementsByTagName(tag || "*") : context.querySelectorAll ? context.querySelectorAll(tag || "*") : []; 3786 return tag === undefined || tag && jQuery.nodeName(context, tag) ? jQuery.merge([context], ret) : ret 3787 }
3788 function fixInput(src, dest) { 3789 var nodeName = dest.nodeName.toLowerCase(); 3790 if (nodeName === "input" && manipulation_rcheckableType.test(src.type)) { 3791 dest.checked = src.checked 3792 } else if (nodeName === "input" || nodeName === "textarea") { 3793 dest.defaultValue = src.defaultValue 3794 } 3795 } 3796 var curCSS, iframe, rdisplayswap = /^(none|table(?!-c[ea]).+)/, 3797 rmargin = /^margin/, 3798 rnumsplit = new RegExp("^(" + core_pnum + ")(.*)$", "i"), 3799 rnumnonpx = new RegExp("^(" + core_pnum + ")(?!px)[a-z%]+$", "i"), 3800 rrelNum = new RegExp("^([+-])=(" + core_pnum + ")", "i"), 3801 elemdisplay = { 3802 BODY: "block" 3803 }, 3804 cssShow = { 3805 position: "absolute", 3806 visibility: "hidden", 3807 display: "block" 3808 }, 3809 cssNormalTransform = { 3810 letterSpacing: 0, 3811 fontWeight: 400 3812 }, 3813 cssExpand = ["Top", "Right", "Bottom", "Left"], 3814 cssPrefixes = ["Webkit", "O", "Moz", "ms"]; 3815 3816 function vendorPropName(style, name) { 3817 if (name in style) { 3818 return name 3819 } 3820 var capName = name.charAt(0).toUpperCase() + name.slice(1), 3821 origName = name, 3822 i = cssPrefixes.length; 3823 while (i--) { 3824 name = cssPrefixes[i] + capName; 3825 if (name in style) { 3826 return name 3827 } 3828 } 3829 return origName 3830 } 3831 function isHidden(elem, el) { 3832 elem = el || elem; 3833 return jQuery.css(elem, "display") === "none" || !jQuery.contains(elem.ownerDocument, elem) 3834 } 3835 function getStyles(elem) { 3836 return window.getComputedStyle(elem, null) 3837 } 3838 function showHide(elements, show) { 3839 var display, elem, hidden, values = [], 3840 index = 0, 3841 length = elements.length; 3842 for (; index < length; index++) { 3843 elem = elements[index]; 3844 if (!elem.style) { 3845 continue 3846 } 3847 values[index] = jQuery._data(elem, "olddisplay"); 3848 display = elem.style.display; 3849 if (show) { 3850 if (!values[index] && display === "none") { 3851 elem.style.display = "" 3852 } 3853 if (elem.style.display === "" && isHidden(elem)) { 3854 values[index] = jQuery._data(elem, "olddisplay", css_defaultDisplay(elem.nodeName)) 3855 } 3856 } else { 3857 if (!values[index]) { 3858 hidden = isHidden(elem); 3859 if (display && display !== "none" || !hidden) { 3860 jQuery._data(elem, "olddisplay", hidden ? display : jQuery.css(elem, "display")) 3861 } 3862 } 3863 } 3864 } 3865 for (index = 0; index < length; index++) { 3866 elem = elements[index]; 3867 if (!elem.style) { 3868 continue 3869 } 3870 if (!show || elem.style.display === "none" || elem.style.display === "") { 3871 elem.style.display = show ? values[index] || "" : "none" 3872 } 3873 } 3874 return elements 3875 } 3876 jQuery.fn.extend({ 3877 css: function(name, value) { 3878 return jQuery.access(this, function(elem, name, value) { 3879 var styles, len, map = {}, 3880 i = 0; 3881 if (jQuery.isArray(name)) { 3882 styles = getStyles(elem); 3883 len = name.length; 3884 for (; i < len; i++) { 3885 map[name[i]] = jQuery.css(elem, name[i], false, styles) 3886 } 3887 return map 3888 } 3889 return value !== undefined ? jQuery.style(elem, name, value) : jQuery.css(elem, name) 3890 }, name, value, arguments.length > 1) 3891 }, 3892 show: function() { 3893 return showHide(this, true) 3894 }, 3895 hide: function() { 3896 return showHide(this) 3897 }, 3898 toggle: function(state) { 3899 var bool = typeof state === "boolean"; 3900 return this.each(function() { 3901 if (bool ? state : isHidden(this)) { 3902 jQuery(this).show() 3903 } else { 3904 jQuery(this).hide() 3905 } 3906 }) 3907 } 3908 }); 3909 jQuery.extend({ 3910 cssHooks: { 3911 opacity: { 3912 get: function(elem, computed) { 3913 if (computed) { 3914 var ret = curCSS(elem, "opacity"); 3915 return ret === "" ? "1" : ret 3916 } 3917 } 3918 } 3919 }, 3920 cssNumber: { 3921 "columnCount": true, 3922 "fillOpacity": true, 3923 "fontWeight": true, 3924 "lineHeight": true, 3925 "opacity": true, 3926 "orphans": true, 3927 "widows": true, 3928 "zIndex": true, 3929 "zoom": true 3930 }, 3931 cssProps: { 3932 "float": "cssFloat" 3933 }, 3934 style: function(elem, name, value, extra) { 3935 if (!elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style) { 3936 return 3937 } 3938 var ret, type, hooks, origName = jQuery.camelCase(name), 3939 style = elem.style; 3940 name = jQuery.cssProps[origName] || (jQuery.cssProps[origName] = vendorPropName(style, origName)); 3941 hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName]; 3942 if (value !== undefined) { 3943 type = typeof value; 3944 if (type === "string" && (ret = rrelNum.exec(value))) { 3945 value = (ret[1] + 1) * ret[2] + parseFloat(jQuery.css(elem, name)); 3946 type = "number" 3947 } 3948 if (value == null || type === "number" && isNaN(value)) { 3949 return 3950 } 3951 if (type === "number" && !jQuery.cssNumber[origName]) { 3952 value += "px" 3953 } 3954 if (!jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0) { 3955 style[name] = "inherit" 3956 } 3957 if (!hooks || !("set" in hooks) || (value = hooks.set(elem, value, extra)) !== undefined) { 3958 style[name] = value 3959 } 3960 } else { 3961 if (hooks && "get" in hooks && (ret = hooks.get(elem, false, extra)) !== undefined) { 3962 return ret 3963 } 3964 return style[name] 3965 } 3966 }, 3967 css: function(elem, name, extra, styles) { 3968 var val, num, hooks, origName = jQuery.camelCase(name); 3969 name = jQuery.cssProps[origName] || (jQuery.cssProps[origName] = vendorPropName(elem.style, origName)); 3970 hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName]; 3971 if (hooks && "get" in hooks) { 3972 val = hooks.get(elem, true, extra) 3973 } 3974 if (val === undefined) { 3975 val = curCSS(elem, name, styles) 3976 } 3977 if (val === "normal" && name in cssNormalTransform) { 3978 val = cssNormalTransform[name] 3979 } 3980 if (extra === "" || extra) { 3981 num = parseFloat(val); 3982 return extra === true || jQuery.isNumeric(num) ? num || 0 : val 3983 } 3984 return val 3985 }, 3986 swap: function(elem, options, callback, args) { 3987 var ret, name, old = {}; 3988 for (name in options) { 3989 old[name] = elem.style[name]; 3990 elem.style[name] = options[name] 3991 } 3992 ret = callback.apply(elem, args || []); 3993 for (name in options) { 3994 elem.style[name] = old[name] 3995 } 3996 return ret 3997 } 3998 }); 3999 curCSS = function(elem, name, _computed) { 4000 var width, minWidth, maxWidth, computed = _computed || getStyles(elem), 4001 ret = computed ? computed.getPropertyValue(name) || computed[name] : undefined, 4002 style = elem.style; 4003 if (computed) { 4004 if (ret === "" && !jQuery.contains(elem.ownerDocument, elem)) { 4005 ret = jQuery.style(elem, name) 4006 } 4007 if (rnumnonpx.test(ret) && rmargin.test(name)) { 4008 width = style.width; 4009 minWidth = style.minWidth; 4010 maxWidth = style.maxWidth; 4011 style.minWidth = style.maxWidth = style.width = ret; 4012 ret = computed.width; 4013 style.width = width; 4014 style.minWidth = minWidth; 4015 style.maxWidth = maxWidth 4016 } 4017 } 4018 return ret 4019 }; 4020 4021 function setPositiveNumber(elem, value, subtract) { 4022 var matches = rnumsplit.exec(value); 4023 return matches ? Math.max(0, matches[1] - (subtract || 0)) + (matches[2] || "px") : value 4024 } 4025 function augmentWidthOrHeight(elem, name, extra, isBorderBox, styles) { 4026 var i = extra === (isBorderBox ? "border" : "content") ? 4 : name === "width" ? 1 : 0, 4027 val = 0; 4028 for (; i < 4; i += 2) { 4029 if (extra === "margin") { 4030 val += jQuery.css(elem, extra + cssExpand[i], true, styles) 4031 } 4032 if (isBorderBox) { 4033 if (extra === "content") { 4034 val -= jQuery.css(elem, "padding" + cssExpand[i], true, styles) 4035 } 4036 if (extra !== "margin") { 4037 val -= jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles) 4038 } 4039 } else { 4040 val += jQuery.css(elem, "padding" + cssExpand[i], true, styles); 4041 if (extra !== "padding") { 4042 val += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles) 4043 } 4044 } 4045 } 4046 return val 4047 } 4048 function getWidthOrHeight(elem, name, extra) { 4049 var valueIsBorderBox = true, 4050 val = name === "width" ? elem.offsetWidth : elem.offsetHeight, 4051 styles = getStyles(elem), 4052 isBorderBox = jQuery.support.boxSizing && jQuery.css(elem, "boxSizing", false, styles) === "border-box"; 4053 if (val <= 0 || val == null) { 4054 val = curCSS(elem, name, styles); 4055 if (val < 0 || val == null) { 4056 val = elem.style[name] 4057 } 4058 if (rnumnonpx.test(val)) { 4059 return val 4060 } 4061 valueIsBorderBox = isBorderBox && (jQuery.support.boxSizingReliable || val === elem.style[name]); 4062 val = parseFloat(val) || 0 4063 } 4064 return (val + augmentWidthOrHeight(elem, name, extra || (isBorderBox ? "border" : "content"), valueIsBorderBox, styles)) + "px" 4065 } 4066 function css_defaultDisplay(nodeName) { 4067 var doc = document, 4068 display = elemdisplay[nodeName]; 4069 if (!display) { 4070 display = actualDisplay(nodeName, doc); 4071 if (display === "none" || !display) { 4072 iframe = (iframe || jQuery("<iframe frameborder='0' width='0' height='0'/>").css("cssText", "display:block !important")).appendTo(doc.documentElement); 4073 doc = (iframe[0].contentWindow || iframe[0].contentDocument).document; 4074 doc.write("<!doctype html><html><body>"); 4075 doc.close(); 4076 display = actualDisplay(nodeName, doc); 4077 iframe.detach() 4078 } 4079 elemdisplay[nodeName] = display 4080 }
4081 return display 4082 } 4083 function actualDisplay(name, doc) { 4084 var elem = jQuery(doc.createElement(name)).appendTo(doc.body), 4085 display = jQuery.css(elem[0], "display"); 4086 elem.remove(); 4087 return display 4088 } 4089 jQuery.each(["height", "width"], function(i, name) { 4090 jQuery.cssHooks[name] = { 4091 get: function(elem, computed, extra) { 4092 if (computed) { 4093 return elem.offsetWidth === 0 && rdisplayswap.test(jQuery.css(elem, "display")) ? jQuery.swap(elem, cssShow, function() { 4094 return getWidthOrHeight(elem, name, extra) 4095 }) : getWidthOrHeight(elem, name, extra) 4096 } 4097 }, 4098 set: function(elem, value, extra) { 4099 var styles = extra && getStyles(elem); 4100 return setPositiveNumber(elem, value, extra ? augmentWidthOrHeight(elem, name, extra, jQuery.support.boxSizing && jQuery.css(elem, "boxSizing", false, styles) === "border-box", styles) : 0) 4101 } 4102 } 4103 }); 4104 jQuery(function() { 4105 if (!jQuery.support.reliableMarginRight) { 4106 jQuery.cssHooks.marginRight = { 4107 get: function(elem, computed) { 4108 if (computed) { 4109 return jQuery.swap(elem, { 4110 "display": "inline-block" 4111 }, curCSS, [elem, "marginRight"]) 4112 } 4113 } 4114 } 4115 } 4116 if (!jQuery.support.pixelPosition && jQuery.fn.position) { 4117 jQuery.each(["top", "left"], function(i, prop) { 4118 jQuery.cssHooks[prop] = { 4119 get: function(elem, computed) { 4120 if (computed) { 4121 computed = curCSS(elem, prop); 4122 return rnumnonpx.test(computed) ? jQuery(elem).position()[prop] + "px" : computed 4123 } 4124 } 4125 } 4126 }) 4127 } 4128 }); 4129 if (jQuery.expr && jQuery.expr.filters) { 4130 jQuery.expr.filters.hidden = function(elem) { 4131 return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 4132 }; 4133 jQuery.expr.filters.visible = function(elem) { 4134 return !jQuery.expr.filters.hidden(elem) 4135 } 4136 } 4137 jQuery.each({ 4138 margin: "", 4139 padding: "", 4140 border: "Width" 4141 }, function(prefix, suffix) { 4142 jQuery.cssHooks[prefix + suffix] = { 4143 expand: function(value) { 4144 var i = 0, 4145 expanded = {}, 4146 parts = typeof value === "string" ? value.split(" ") : [value]; 4147 for (; i < 4; i++) { 4148 expanded[prefix + cssExpand[i] + suffix] = parts[i] || parts[i - 2] || parts[0] 4149 } 4150 return expanded 4151 } 4152 }; 4153 if (!rmargin.test(prefix)) { 4154 jQuery.cssHooks[prefix + suffix].set = setPositiveNumber 4155 } 4156 }); 4157 var r20 = /%20/g, 4158 rbracket = /\[\]$/, 4159 rCRLF = /\r?\n/g, 4160 rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, 4161 rsubmittable = /^(?:input|select|textarea|keygen)/i; 4162 jQuery.fn.extend({ 4163 serialize: function() { 4164 return jQuery.param(this.serializeArray()) 4165 }, 4166 serializeArray: function() { 4167 return this.map(function() { 4168 var elements = jQuery.prop(this, "elements"); 4169 return elements ? jQuery.makeArray(elements) : this 4170 }).filter(function() { 4171 var type = this.type; 4172 return this.name && !jQuery(this).is(":disabled") && rsubmittable.test(this.nodeName) && !rsubmitterTypes.test(type) && (this.checked || !manipulation_rcheckableType.test(type)) 4173 }).map(function(i, elem) { 4174 var val = jQuery(this).val(); 4175 return val == null ? null : jQuery.isArray(val) ? jQuery.map(val, function(val) { 4176 return { 4177 name: elem.name, 4178 value: val.replace(rCRLF, "\r\n") 4179 } 4180 }) : { 4181 name: elem.name, 4182 value: val.replace(rCRLF, "\r\n") 4183 } 4184 }).get() 4185 } 4186 }); 4187 jQuery.param = function(a, traditional) { 4188 var prefix, s = [], 4189 add = function(key, value) { 4190 value = jQuery.isFunction(value) ? value() : (value == null ? "" : value); 4191 s[s.length] = encodeURIComponent(key) + "=" + encodeURIComponent(value) 4192 }; 4193 if (traditional === undefined) { 4194 traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional 4195 } 4196 if (jQuery.isArray(a) || (a.jquery && !jQuery.isPlainObject(a))) { 4197 jQuery.each(a, function() { 4198 add(this.name, this.value) 4199 }) 4200 } else { 4201 for (prefix in a) { 4202 buildParams(prefix, a[prefix], traditional, add) 4203 } 4204 } 4205 return s.join("&").replace(r20, "+") 4206 }; 4207 4208 function buildParams(prefix, obj, traditional, add) { 4209 var name; 4210 if (jQuery.isArray(obj)) { 4211 jQuery.each(obj, function(i, v) { 4212 if (traditional || rbracket.test(prefix)) { 4213 add(prefix, v) 4214 } else { 4215 buildParams(prefix + "[" + (typeof v === "object" ? i : "") + "]", v, traditional, add) 4216 } 4217 }) 4218 } else if (!traditional && jQuery.type(obj) === "object") { 4219 for (name in obj) { 4220 buildParams(prefix + "[" + name + "]", obj[name], traditional, add) 4221 } 4222 } else { 4223 add(prefix, obj) 4224 } 4225 } 4226 jQuery.each(("blur focus focusin focusout load resize scroll unload click dblclick " + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + "change select submit keydown keypress keyup error contextmenu").split(" "), function(i, name) { 4227 jQuery.fn[name] = function(data, fn) { 4228 return arguments.length > 0 ? this.on(name, null, data, fn) : this.trigger(name) 4229 } 4230 }); 4231 jQuery.fn.hover = function(fnOver, fnOut) { 4232 return this.mouseenter(fnOver).mouseleave(fnOut || fnOver) 4233 }; 4234 var ajaxLocParts, ajaxLocation, ajax_nonce = jQuery.now(), 4235 ajax_rquery = /\?/, 4236 rhash = /#.*$/, 4237 rts = /([?&])_=[^&]*/, 4238 rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, 4239 rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, 4240 rnoContent = /^(?:GET|HEAD)$/, 4241 rprotocol = /^\/\//, 4242 rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, 4243 _load = jQuery.fn.load, 4244 prefilters = {}, 4245 transports = {}, 4246 allTypes = "*/".concat("*"); 4247 try { 4248 ajaxLocation = location.href 4249 } catch (e) { 4250 ajaxLocation = document.createElement("a"); 4251 ajaxLocation.href = ""; 4252 ajaxLocation = ajaxLocation.href 4253 } 4254 ajaxLocParts = rurl.exec(ajaxLocation.toLowerCase()) || []; 4255
4256 function addToPrefiltersOrTransports(structure) { 4257 return function(dataTypeExpression, func) { 4258 if (typeof dataTypeExpression !== "string") { 4259 func = dataTypeExpression; 4260 dataTypeExpression = "*" 4261 } 4262 var dataType, i = 0, 4263 dataTypes = dataTypeExpression.toLowerCase().match(core_rnotwhite) || []; 4264 if (jQuery.isFunction(func)) { 4265 while ((dataType = dataTypes[i++])) { 4266 if (dataType[0] === "+") { 4267 dataType = dataType.slice(1) || "*"; 4268 (structure[dataType] = structure[dataType] || []).unshift(func) 4269 } else { 4270 (structure[dataType] = structure[dataType] || []).push(func) 4271 } 4272 } 4273 } 4274 } 4275 } 4276 function inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR) { 4277 var inspected = {}, 4278 seekingTransport = (structure === transports); 4279 4280 function inspect(dataType) { 4281 var selected; 4282 inspected[dataType] = true; 4283 jQuery.each(structure[dataType] || [], function(_, prefilterOrFactory) { 4284 var dataTypeOrTransport = prefilterOrFactory(options, originalOptions, jqXHR); 4285 if (typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[dataTypeOrTransport]) { 4286 options.dataTypes.unshift(dataTypeOrTransport); 4287 inspect(dataTypeOrTransport); 4288 return false 4289 } else if (seekingTransport) { 4290 return !(selected = dataTypeOrTransport) 4291 } 4292 }); 4293 return selected 4294 } 4295 return inspect(options.dataTypes[0]) || !inspected["*"] && inspect("*") 4296 } 4297 function ajaxExtend(target, src) { 4298 var key, deep, flatOptions = jQuery.ajaxSettings.flatOptions || {}; 4299 for (key in src) { 4300 if (src[key] !== undefined) { 4301 (flatOptions[key] ? target : (deep || (deep = {})))[key] = src[key] 4302 } 4303 } 4304 if (deep) { 4305 jQuery.extend(true, target, deep) 4306 } 4307 return target 4308 } 4309 jQuery.fn.load = function(url, params, callback) { 4310 if (typeof url !== "string" && _load) { 4311 return _load.apply(this, arguments) 4312 } 4313 var selector, type, response, self = this, 4314 off = url.indexOf(" "); 4315 if (off >= 0) { 4316 selector = url.slice(off, url.length); 4317 url = url.slice(0, off) 4318 } 4319 if (jQuery.isFunction(params)) { 4320 callback = params; 4321 params = undefined 4322 } else if (params && typeof params === "object") { 4323 type = "POST" 4324 } 4325 if (self.length > 0) { 4326 jQuery.ajax({ 4327 url: url, 4328 type: type, 4329 dataType: "html", 4330 data: params 4331 }).done(function(responseText) { 4332 response = arguments; 4333 self.html(selector ? jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector) : responseText) 4334 }).complete(callback && 4335 function(jqXHR, status) { 4336 self.each(callback, response || [jqXHR.responseText, status, jqXHR]) 4337 }) 4338 } 4339 return this 4340 }; 4341 jQuery.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function(i, type) { 4342 jQuery.fn[type] = function(fn) { 4343 return this.on(type, fn) 4344 } 4345 }); 4346 jQuery.each(["get", "post"], function(i, method) { 4347 jQuery[method] = function(url, data, callback, type) { 4348 if (jQuery.isFunction(data)) { 4349 type = type || callback; 4350 callback = data; 4351 data = undefined 4352 } 4353 return jQuery.ajax({ 4354 url: url, 4355 type: method, 4356 dataType: type, 4357 data: data, 4358 success: callback 4359 }) 4360 } 4361 }); 4362 jQuery.extend({ 4363 active: 0, 4364 lastModified: {}, 4365 etag: {}, 4366 ajaxSettings: { 4367 url: ajaxLocation, 4368 type: "GET", 4369 isLocal: rlocalProtocol.test(ajaxLocParts[1]), 4370 global: true, 4371 processData: true, 4372 async: true, 4373 contentType: "application/x-www-form-urlencoded; charset=UTF-8", 4374 accepts: { 4375 "*": allTypes, 4376 text: "text/plain", 4377 html: "text/html", 4378 xml: "application/xml, text/xml", 4379 json: "application/json, text/javascript" 4380 }, 4381 contents: { 4382 xml: /xml/, 4383 html: /html/, 4384 json: /json/ 4385 }, 4386 responseFields: { 4387 xml: "responseXML", 4388 text: "responseText", 4389 json: "responseJSON" 4390 }, 4391 converters: { 4392 "* text": String, 4393 "text html": true, 4394 "text json": jQuery.parseJSON, 4395 "text xml": jQuery.parseXML 4396 }, 4397 flatOptions: { 4398 url: true, 4399 context: true 4400 } 4401 }, 4402 ajaxSetup: function(target, settings) { 4403 return settings ? ajaxExtend(ajaxExtend(target, jQuery.ajaxSettings), settings) : ajaxExtend(jQuery.ajaxSettings, target) 4404 }, 4405 ajaxPrefilter: addToPrefiltersOrTransports(prefilters), 4406 ajaxTransport: addToPrefiltersOrTransports(transports), 4407 ajax: function(url, options) { 4408 if (typeof url === "object") { 4409 options = url; 4410 url = undefined 4411 } 4412 options = options || {}; 4413 var transport, cacheURL, responseHeadersString, responseHeaders, timeoutTimer, parts, fireGlobals, i, s = jQuery.ajaxSetup({}, options), 4414 callbackContext = s.context || s, 4415 globalEventContext = s.context && (callbackContext.nodeType || callbackContext.jquery) ? jQuery(callbackContext) : jQuery.event, 4416 deferred = jQuery.Deferred(), 4417 completeDeferred = jQuery.Callbacks("once memory"), 4418 statusCode = s.statusCode || {}, 4419 requestHeaders = {}, 4420 requestHeadersNames = {}, 4421 state = 0, 4422 strAbort = "canceled", 4423 jqXHR = { 4424 readyState: 0, 4425 getResponseHeader: function(key) { 4426 var match; 4427 if (state === 2) { 4428 if (!responseHeaders) { 4429 responseHeaders = {}; 4430 while ((match = rheaders.exec(responseHeadersString))) { 4431 responseHeaders[match[1].toLowerCase()] = match[2] 4432 } 4433 } 4434 match = responseHeaders[key.toLowerCase()] 4435 } 4436 return match == null ? null : match 4437 }, 4438 getAllResponseHeaders: function() { 4439 return state === 2 ? responseHeadersString : null 4440 }, 4441 setRequestHeader: function(name, value) { 4442 var lname = name.toLowerCase(); 4443 if (!state) { 4444 name = requestHeadersNames[lname] = requestHeadersNames[lname] || name; 4445 requestHeaders[name] = value 4446 } 4447 return this 4448 }, 4449 overrideMimeType: function(type) { 4450 if (!state) { 4451 s.mimeType = type 4452 } 4453 return this 4454 }, 4455 statusCode: function(map) { 4456 var code; 4457 if (map) { 4458 if (state < 2) { 4459 for (code in map) { 4460 statusCode[code] = [statusCode[code], map[code]] 4461 } 4462 } else { 4463 jqXHR.always(map[jqXHR.status]) 4464 } 4465 } 4466 return this 4467 }, 4468 abort: function(statusText) { 4469 var finalText = statusText || strAbort; 4470 if (transport) { 4471 transport.abort(finalText) 4472 } 4473 done(0, finalText); 4474 return this 4475 } 4476 }; 4477 deferred.promise(jqXHR).complete = completeDeferred.add; 4478 jqXHR.success = jqXHR.done; 4479 jqXHR.error = jqXHR.fail; 4480 s.url = ((url || s.url || ajaxLocation) + "").replace(rhash, "").replace(rprotocol, ajaxLocParts[1] + "//"); 4481 s.type = options.method || options.type || s.method || s.type; 4482 s.dataTypes = jQuery.trim(s.dataType || "*").toLowerCase().match(core_rnotwhite) || [""]; 4483 if (s.crossDomain == null) { 4484 parts = rurl.exec(s.url.toLowerCase()); 4485 s.crossDomain = !! (parts && (parts[1] !== ajaxLocParts[1] || parts[2] !== ajaxLocParts[2] || (parts[3] || (parts[1] === "http:" ? 80 : 443)) != (ajaxLocParts[3] || (ajaxLocParts[1] === "http:" ? 80 : 443)))) 4486 } 4487 if (s.data && s.processData && typeof s.data !== "string") { 4488 s.data = jQuery.param(s.data, s.traditional) 4489 } 4490 inspectPrefiltersOrTransports(prefilters, s, options, jqXHR); 4491 if (state === 2) { 4492 return jqXHR 4493 } 4494 fireGlobals = s.global; 4495 if (fireGlobals && jQuery.active++ === 0) { 4496 jQuery.event.trigger("ajaxStart") 4497 } 4498 s.type = s.type.toUpperCase(); 4499 s.hasContent = !rnoContent.test(s.type); 4500 cacheURL = s.url; 4501 if (!s.hasContent) { 4502 if (s.data) { 4503 cacheURL = (s.url += (ajax_rquery.test(cacheURL) ? "&" : "?") + s.data); 4504 delete s.data 4505 } 4506 if (s.cache === false) { 4507 s.url = rts.test(cacheURL) ? cacheURL.replace(rts, "$1_=" + ajax_nonce++) : cacheURL + (ajax_rquery.test(cacheURL) ? "&" : "?") + "_=" + ajax_nonce++ 4508 } 4509 } 4510 if (s.ifModified) { 4511 if (jQuery.lastModified[cacheURL]) { 4512 jqXHR.setRequestHeader("If-Modified-Since", jQuery.lastModified[cacheURL]) 4513 } 4514 if (jQuery.etag[cacheURL]) { 4515 jqXHR.setRequestHeader("If-None-Match", jQuery.etag[cacheURL]) 4516 } 4517 } 4518 if (s.data && s.hasContent && s.contentType !== false || options.contentType) {
4519 jqXHR.setRequestHeader("Content-Type", s.contentType) 4520 } 4521 jqXHR.setRequestHeader("Accept", s.dataTypes[0] && s.accepts[s.dataTypes[0]] ? s.accepts[s.dataTypes[0]] + (s.dataTypes[0] !== "*" ? ", " + allTypes + "; q=0.01" : "") : s.accepts["*"]); 4522 for (i in s.headers) { 4523 jqXHR.setRequestHeader(i, s.headers[i]) 4524 } 4525 if (s.beforeSend && (s.beforeSend.call(callbackContext, jqXHR, s) === false || state === 2)) { 4526 return jqXHR.abort() 4527 } 4528 strAbort = "abort"; 4529 for (i in { 4530 success: 1, 4531 error: 1, 4532 complete: 1 4533 }) { 4534 jqXHR[i](s[i]) 4535 } 4536 transport = inspectPrefiltersOrTransports(transports, s, options, jqXHR); 4537 if (!transport) { 4538 done(-1, "No Transport") 4539 } else { 4540 jqXHR.readyState = 1; 4541 if (fireGlobals) { 4542 globalEventContext.trigger("ajaxSend", [jqXHR, s]) 4543 } 4544 if (s.async && s.timeout > 0) { 4545 timeoutTimer = setTimeout(function() { 4546 jqXHR.abort("timeout") 4547 }, s.timeout) 4548 } 4549 try { 4550 state = 1; 4551 transport.send(requestHeaders, done) 4552 } catch (e) { 4553 if (state < 2) { 4554 done(-1, e) 4555 } else { 4556 throw e; 4557 } 4558 } 4559 } 4560 function done(status, nativeStatusText, responses, headers) { 4561 var isSuccess, success, error, response, modified, statusText = nativeStatusText; 4562 if (state === 2) { 4563 return 4564 } 4565 state = 2; 4566 if (timeoutTimer) { 4567 clearTimeout(timeoutTimer) 4568 } 4569 transport = undefined; 4570 responseHeadersString = headers || ""; 4571 jqXHR.readyState = status > 0 ? 4 : 0; 4572 isSuccess = status >= 200 && status < 300 || status === 304; 4573 if (responses) { 4574 response = ajaxHandleResponses(s, jqXHR, responses) 4575 } 4576 response = ajaxConvert(s, response, jqXHR, isSuccess); 4577 if (isSuccess) { 4578 if (s.ifModified) { 4579 modified = jqXHR.getResponseHeader("Last-Modified"); 4580 if (modified) { 4581 jQuery.lastModified[cacheURL] = modified 4582 } 4583 modified = jqXHR.getResponseHeader("etag"); 4584 if (modified) { 4585 jQuery.etag[cacheURL] = modified 4586 } 4587 } 4588 if (status === 204) { 4589 statusText = "nocontent" 4590 } else if (status === 304) { 4591 statusText = "notmodified" 4592 } else { 4593 statusText = response.state; 4594 success = response.data; 4595 error = response.error; 4596 isSuccess = !error 4597 } 4598 } else { 4599 error = statusText; 4600 if (status || !statusText) { 4601 statusText = "error"; 4602 if (status < 0) { 4603 status = 0 4604 } 4605 } 4606 } 4607 jqXHR.status = status; 4608 jqXHR.statusText = (nativeStatusText || statusText) + ""; 4609 if (isSuccess) { 4610 deferred.resolveWith(callbackContext, [success, statusText, jqXHR]) 4611 } else { 4612 deferred.rejectWith(callbackContext, [jqXHR, statusText, error]) 4613 } 4614 jqXHR.statusCode(statusCode); 4615 statusCode = undefined; 4616 if (fireGlobals) { 4617 globalEventContext.trigger(isSuccess ? "ajaxSuccess" : "ajaxError", [jqXHR, s, isSuccess ? success : error]) 4618 } 4619 completeDeferred.fireWith(callbackContext, [jqXHR, statusText]); 4620 if (fireGlobals) { 4621 globalEventContext.trigger("ajaxComplete", [jqXHR, s]); 4622 if (!(--jQuery.active)) { 4623 jQuery.event.trigger("ajaxStop") 4624 } 4625 } 4626 } 4627 return jqXHR 4628 }, 4629 getScript: function(url, callback) { 4630 return jQuery.get(url, undefined, callback, "script") 4631 }, 4632 getJSON: function(url, data, callback) { 4633 return jQuery.get(url, data, callback, "json") 4634 } 4635 }); 4636 4637 function ajaxHandleResponses(s, jqXHR, responses) { 4638 var ct, type, finalDataType, firstDataType, contents = s.contents, 4639 dataTypes = s.dataTypes; 4640 while (dataTypes[0] === "*") { 4641 dataTypes.shift(); 4642 if (ct === undefined) { 4643 ct = s.mimeType || jqXHR.getResponseHeader("Content-Type") 4644 } 4645 } 4646 if (ct) { 4647 for (type in contents) { 4648 if (contents[type] && contents[type].test(ct)) { 4649 dataTypes.unshift(type); 4650 break 4651 } 4652 } 4653 } 4654 if (dataTypes[0] in responses) { 4655 finalDataType = dataTypes[0] 4656 } else { 4657 for (type in responses) { 4658 if (!dataTypes[0] || s.converters[type + " " + dataTypes[0]]) { 4659 finalDataType = type; 4660 break 4661 } 4662 if (!firstDataType) { 4663 firstDataType = type 4664 } 4665 } 4666 finalDataType = finalDataType || firstDataType 4667 } 4668 if (finalDataType) { 4669 if (finalDataType !== dataTypes[0]) { 4670 dataTypes.unshift(finalDataType) 4671 } 4672 return responses[finalDataType] 4673 } 4674 } 4675 function ajaxConvert(s, response, jqXHR, isSuccess) { 4676 var conv2, current, conv, tmp, prev, converters = {}, 4677 dataTypes = s.dataTypes.slice(); 4678 if (dataTypes[1]) { 4679 for (conv in s.converters) { 4680 converters[conv.toLowerCase()] = s.converters[conv] 4681 } 4682 } 4683 current = dataTypes.shift(); 4684 while (current) { 4685 if (s.responseFields[current]) { 4686 jqXHR[s.responseFields[current]] = response 4687 } 4688 if (!prev && isSuccess && s.dataFilter) { 4689 response = s.dataFilter(response, s.dataType) 4690 } 4691 prev = current; 4692 current = dataTypes.shift(); 4693 if (current) { 4694 if (current === "*") { 4695 current = prev 4696 } else if (prev !== "*" && prev !== current) { 4697 conv = converters[prev + " " + current] || converters["* " + current]; 4698 if (!conv) { 4699 for (conv2 in converters) { 4700 tmp = conv2.split(" "); 4701 if (tmp[1] === current) { 4702 conv = converters[prev + " " + tmp[0]] || converters["* " + tmp[0]]; 4703 if (conv) { 4704 if (conv === true) { 4705 conv = converters[conv2] 4706 } else if (converters[conv2] !== true) { 4707 current = tmp[0]; 4708 dataTypes.unshift(tmp[1]) 4709 } 4710 break 4711 } 4712 } 4713 } 4714 } 4715 if (conv !== true) { 4716 if (conv && s["throws"]) { 4717 response = conv(response) 4718 } else { 4719 try { 4720 response = conv(response) 4721 } catch (e) { 4722 return { 4723 state: "parsererror", 4724 error: conv ? e : "No conversion from " + prev + " to " + current 4725 } 4726 } 4727 } 4728 } 4729 } 4730 } 4731 } 4732 return { 4733 state: "success", 4734 data: response 4735 } 4736 } 4737 jQuery.ajaxSetup({ 4738 accepts: { 4739 script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" 4740 }, 4741 contents: { 4742 script: /(?:java|ecma)script/ 4743 }, 4744 converters: { 4745 "text script": function(text) { 4746 jQuery.globalEval(text); 4747 return text 4748 } 4749 } 4750 }); 4751 jQuery.ajaxPrefilter("script", function(s) { 4752 if (s.cache === undefined) { 4753 s.cache = false 4754 } 4755 if (s.crossDomain) { 4756 s.type = "GET" 4757 } 4758 }); 4759 jQuery.ajaxTransport("script", function(s) { 4760 if (s.crossDomain) { 4761 var script, callback; 4762 return { 4763 send: function(_, complete) { 4764 script = jQuery("<script>").prop({ 4765 async: true, 4766 charset: s.scriptCharset, 4767 src: s.url 4768 }).on("load error", callback = function(evt) { 4769 script.remove(); 4770 callback = null; 4771 if (evt) { 4772 complete(evt.type === "error" ? 404 : 200, evt.type) 4773 } 4774 }); 4775 document.head.appendChild(script[0]) 4776 }, 4777 abort: function() { 4778 if (callback) { 4779 callback() 4780 } 4781 } 4782 } 4783 } 4784 }); 4785 var oldCallbacks = [], 4786 rjsonp = /(=)\?(?=&|$)|\?\?/; 4787 jQuery.ajaxSetup({ 4788 jsonp: "callback", 4789 jsonpCallback: function() { 4790 var callback = oldCallbacks.pop() || (jQuery.expando + "_" + (ajax_nonce++)); 4791 this[callback] = true; 4792 return callback 4793 } 4794 }); 4795 jQuery.ajaxPrefilter("json jsonp", function(s, originalSettings, jqXHR) { 4796 var callbackName, overwritten, responseContainer, jsonProp = s.jsonp !== false && (rjsonp.test(s.url) ? "url" : typeof s.data === "string" && !(s.contentType || "").indexOf("application/x-www-form-urlencoded") && rjsonp.test(s.data) && "data");
4797 if (jsonProp || s.dataTypes[0] === "jsonp") { 4798 callbackName = s.jsonpCallback = jQuery.isFunction(s.jsonpCallback) ? s.jsonpCallback() : s.jsonpCallback; 4799 if (jsonProp) { 4800 s[jsonProp] = s[jsonProp].replace(rjsonp, "$1" + callbackName) 4801 } else if (s.jsonp !== false) { 4802 s.url += (ajax_rquery.test(s.url) ? "&" : "?") + s.jsonp + "=" + callbackName 4803 } 4804 s.converters["script json"] = function() { 4805 if (!responseContainer) { 4806 jQuery.error(callbackName + " was not called") 4807 } 4808 return responseContainer[0] 4809 }; 4810 s.dataTypes[0] = "json"; 4811 overwritten = window[callbackName]; 4812 window[callbackName] = function() { 4813 responseContainer = arguments 4814 }; 4815 jqXHR.always(function() { 4816 window[callbackName] = overwritten; 4817 if (s[callbackName]) { 4818 s.jsonpCallback = originalSettings.jsonpCallback; 4819 oldCallbacks.push(callbackName) 4820 } 4821 if (responseContainer && jQuery.isFunction(overwritten)) { 4822 overwritten(responseContainer[0]) 4823 } 4824 responseContainer = overwritten = undefined 4825 }); 4826 return "script" 4827 } 4828 }); 4829 jQuery.ajaxSettings.xhr = function() { 4830 try { 4831 return new XMLHttpRequest() 4832 } catch (e) {} 4833 }; 4834 var xhrSupported = jQuery.ajaxSettings.xhr(), 4835 xhrSuccessStatus = { 4836 0: 200, 4837 1223: 204 4838 }, 4839 xhrId = 0, 4840 xhrCallbacks = {}; 4841 if (window.ActiveXObject) { 4842 jQuery(window).on("unload", function() { 4843 for (var key in xhrCallbacks) { 4844 xhrCallbacks[key]() 4845 } 4846 xhrCallbacks = undefined 4847 }) 4848 } 4849 jQuery.support.cors = !! xhrSupported && ("withCredentials" in xhrSupported); 4850 jQuery.support.ajax = xhrSupported = !! xhrSupported; 4851 jQuery.ajaxTransport(function(options) { 4852 var callback; 4853 if (jQuery.support.cors || xhrSupported && !options.crossDomain) { 4854 return { 4855 send: function(headers, complete) { 4856 var i, id, xhr = options.xhr(); 4857 xhr.open(options.type, options.url, options.async, options.username, options.password); 4858 if (options.xhrFields) { 4859 for (i in options.xhrFields) { 4860 xhr[i] = options.xhrFields[i] 4861 } 4862 } 4863 if (options.mimeType && xhr.overrideMimeType) { 4864 xhr.overrideMimeType(options.mimeType) 4865 } 4866 if (!options.crossDomain && !headers["X-Requested-With"]) { 4867 headers["X-Requested-With"] = "XMLHttpRequest" 4868 } 4869 for (i in headers) { 4870 xhr.setRequestHeader(i, headers[i]) 4871 } 4872 callback = function(type) { 4873 return function() { 4874 if (callback) { 4875 delete xhrCallbacks[id]; 4876 callback = xhr.onload = xhr.onerror = null; 4877 if (type === "abort") { 4878 xhr.abort() 4879 } else if (type === "error") { 4880 complete(xhr.status || 404, xhr.statusText) 4881 } else { 4882 complete(xhrSuccessStatus[xhr.status] || xhr.status, xhr.statusText, typeof xhr.responseText === "string" ? { 4883 text: xhr.responseText 4884 } : undefined, xhr.getAllResponseHeaders()) 4885 } 4886 } 4887 } 4888 }; 4889 xhr.onload = callback(); 4890 xhr.onerror = callback("error"); 4891 callback = xhrCallbacks[(id = xhrId++)] = callback("abort"); 4892 xhr.send(options.hasContent && options.data || null) 4893 }, 4894 abort: function() { 4895 if (callback) { 4896 callback() 4897 } 4898 } 4899 } 4900 } 4901 }); 4902 var fxNow, timerId, rfxtypes = /^(?:toggle|show|hide)$/, 4903 rfxnum = new RegExp("^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i"), 4904 rrun = /queueHooks$/, 4905 animationPrefilters = [defaultPrefilter], 4906 tweeners = { 4907 "*": [function(prop, value) { 4908 var end, unit, tween = this.createTween(prop, value), 4909 parts = rfxnum.exec(value), 4910 target = tween.cur(), 4911 start = +target || 0, 4912 scale = 1, 4913 maxIterations = 20; 4914 if (parts) { 4915 end = +parts[2]; 4916 unit = parts[3] || (jQuery.cssNumber[prop] ? "" : "px"); 4917 if (unit !== "px" && start) { 4918 start = jQuery.css(tween.elem, prop, true) || end || 1; 4919 do { 4920 scale = scale || ".5"; 4921 start = start / scale; 4922 jQuery.style(tween.elem, prop, start + unit) 4923 } while (scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations) 4924 } 4925 tween.unit = unit; 4926 tween.start = start; 4927 tween.end = parts[1] ? start + (parts[1] + 1) * end : end 4928 } 4929 return tween 4930 }] 4931 }; 4932 4933 function createFxNow() { 4934 setTimeout(function() { 4935 fxNow = undefined 4936 }); 4937 return (fxNow = jQuery.now()) 4938 } 4939 function createTweens(animation, props) { 4940 jQuery.each(props, function(prop, value) { 4941 var collection = (tweeners[prop] || []).concat(tweeners["*"]), 4942 index = 0, 4943 length = collection.length; 4944 for (; index < length; index++) { 4945 if (collection[index].call(animation, prop, value)) { 4946 return 4947 } 4948 } 4949 }) 4950 } 4951 function Animation(elem, properties, options) { 4952 var result, stopped, index = 0, 4953 length = animationPrefilters.length, 4954 deferred = jQuery.Deferred().always(function() { 4955 delete tick.elem 4956 }), 4957 tick = function() { 4958 if (stopped) { 4959 return false 4960 } 4961 var currentTime = fxNow || createFxNow(), 4962 remaining = Math.max(0, animation.startTime + animation.duration - currentTime), 4963 temp = remaining / animation.duration || 0, 4964 percent = 1 - temp, 4965 index = 0, 4966 length = animation.tweens.length; 4967 for (; index < length; index++) { 4968 animation.tweens[index].run(percent) 4969 } 4970 deferred.notifyWith(elem, [animation, percent, remaining]); 4971 if (percent < 1 && length) { 4972 return remaining 4973 } else { 4974 deferred.resolveWith(elem, [animation]); 4975 return false 4976 } 4977 }, 4978 animation = deferred.promise({ 4979 elem: elem, 4980 props: jQuery.extend({}, properties), 4981 opts: jQuery.extend(true, { 4982 specialEasing: {} 4983 }, options), 4984 originalProperties: properties, 4985 originalOptions: options, 4986 startTime: fxNow || createFxNow(), 4987 duration: options.duration, 4988 tweens: [], 4989 createTween: function(prop, end) { 4990 var tween = jQuery.Tween(elem, animation.opts, prop, end, animation.opts.specialEasing[prop] || animation.opts.easing); 4991 animation.tweens.push(tween); 4992 return tween 4993 }, 4994 stop: function(gotoEnd) { 4995 var index = 0, 4996 length = gotoEnd ? animation.tweens.length : 0; 4997 if (stopped) { 4998 return this 4999 } 5000 stopped = true; 5001 for (; index < length; index++) { 5002 animation.tweens[index].run(1) 5003 } 5004 if (gotoEnd) { 5005 deferred.resolveWith(elem, [animation, gotoEnd]) 5006 } else { 5007 deferred.rejectWith(elem, [animation, gotoEnd]) 5008 } 5009 return this 5010 } 5011 }), 5012 props = animation.props; 5013 propFilter(props, animation.opts.specialEasing); 5014 for (; index < length; index++) { 5015 result = animationPrefilters[index].call(animation, elem, props, animation.opts); 5016 if (result) { 5017 return result 5018 } 5019 } 5020 createTweens(animation, props); 5021 if (jQuery.isFunction(animation.opts.start)) { 5022 animation.opts.start.call(elem, animation) 5023 } 5024 jQuery.fx.timer(jQuery.extend(tick, { 5025 elem: elem, 5026 anim: animation, 5027 queue: animation.opts.queue 5028 })); 5029 return animation.progress(animation.opts.progress).done(animation.opts.done, animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always) 5030 } 5031 function propFilter(props, specialEasing) { 5032 var index, name, easing, value, hooks; 5033 for (index in props) { 5034 name = jQuery.camelCase(index);
5035 easing = specialEasing[name]; 5036 value = props[index]; 5037 if (jQuery.isArray(value)) { 5038 easing = value[1]; 5039 value = props[index] = value[0] 5040 } 5041 if (index !== name) { 5042 props[name] = value; 5043 delete props[index] 5044 } 5045 hooks = jQuery.cssHooks[name]; 5046 if (hooks && "expand" in hooks) { 5047 value = hooks.expand(value); 5048 delete props[name]; 5049 for (index in value) { 5050 if (!(index in props)) { 5051 props[index] = value[index]; 5052 specialEasing[index] = easing 5053 } 5054 } 5055 } else { 5056 specialEasing[name] = easing 5057 } 5058 } 5059 } 5060 jQuery.Animation = jQuery.extend(Animation, { 5061 tweener: function(props, callback) { 5062 if (jQuery.isFunction(props)) { 5063 callback = props; 5064 props = ["*"] 5065 } else { 5066 props = props.split(" ") 5067 } 5068 var prop, index = 0, 5069 length = props.length; 5070 for (; index < length; index++) { 5071 prop = props[index]; 5072 tweeners[prop] = tweeners[prop] || []; 5073 tweeners[prop].unshift(callback) 5074 } 5075 }, 5076 prefilter: function(callback, prepend) { 5077 if (prepend) { 5078 animationPrefilters.unshift(callback) 5079 } else { 5080 animationPrefilters.push(callback) 5081 } 5082 } 5083 }); 5084 5085 function defaultPrefilter(elem, props, opts) { 5086 var index, prop, value, length, dataShow, toggle, tween, hooks, oldfire, anim = this, 5087 style = elem.style, 5088 orig = {}, 5089 handled = [], 5090 hidden = elem.nodeType && isHidden(elem); 5091 if (!opts.queue) { 5092 hooks = jQuery._queueHooks(elem, "fx"); 5093 if (hooks.unqueued == null) { 5094 hooks.unqueued = 0; 5095 oldfire = hooks.empty.fire; 5096 hooks.empty.fire = function() { 5097 if (!hooks.unqueued) { 5098 oldfire() 5099 } 5100 } 5101 } 5102 hooks.unqueued++; 5103 anim.always(function() { 5104 anim.always(function() { 5105 hooks.unqueued--; 5106 if (!jQuery.queue(elem, "fx").length) { 5107 hooks.empty.fire() 5108 } 5109 }) 5110 }) 5111 } 5112 if (elem.nodeType === 1 && ("height" in props || "width" in props)) { 5113 opts.overflow = [style.overflow, style.overflowX, style.overflowY]; 5114 if (jQuery.css(elem, "display") === "inline" && jQuery.css(elem, "float") === "none") { 5115 style.display = "inline-block" 5116 } 5117 } 5118 if (opts.overflow) { 5119 style.overflow = "hidden"; 5120 anim.always(function() { 5121 style.overflow = opts.overflow[0]; 5122 style.overflowX = opts.overflow[1]; 5123 style.overflowY = opts.overflow[2] 5124 }) 5125 } 5126 for (index in props) { 5127 value = props[index]; 5128 if (rfxtypes.exec(value)) { 5129 delete props[index]; 5130 toggle = toggle || value === "toggle"; 5131 if (value === (hidden ? "hide" : "show")) { 5132 continue 5133 } 5134 handled.push(index) 5135 } 5136 } 5137 length = handled.length; 5138 if (length) { 5139 dataShow = jQuery._data(elem, "fxshow") || jQuery._data(elem, "fxshow", {}); 5140 if ("hidden" in dataShow) { 5141 hidden = dataShow.hidden 5142 } 5143 if (toggle) { 5144 dataShow.hidden = !hidden 5145 } 5146 if (hidden) { 5147 jQuery(elem).show() 5148 } else { 5149 anim.done(function() { 5150 jQuery(elem).hide() 5151 }) 5152 } 5153 anim.done(function() { 5154 var prop; 5155 jQuery._removeData(elem, "fxshow"); 5156 for (prop in orig) { 5157 jQuery.style(elem, prop, orig[prop]) 5158 } 5159 }); 5160 for (index = 0; index < length; index++) { 5161 prop = handled[index]; 5162 tween = anim.createTween(prop, hidden ? dataShow[prop] : 0); 5163 orig[prop] = dataShow[prop] || jQuery.style(elem, prop); 5164 if (!(prop in dataShow)) { 5165 dataShow[prop] = tween.start; 5166 if (hidden) { 5167 tween.end = tween.start; 5168 tween.start = prop === "width" || prop === "height" ? 1 : 0 5169 } 5170 } 5171 } 5172 } 5173 } 5174 function Tween(elem, options, prop, end, easing) { 5175 return new Tween.prototype.init(elem, options, prop, end, easing) 5176 } 5177 jQuery.Tween = Tween; 5178 Tween.prototype = { 5179 constructor: Tween, 5180 init: function(elem, options, prop, end, easing, unit) { 5181 this.elem = elem; 5182 this.prop = prop; 5183 this.easing = easing || "swing"; 5184 this.options = options; 5185 this.start = this.now = this.cur(); 5186 this.end = end; 5187 this.unit = unit || (jQuery.cssNumber[prop] ? "" : "px") 5188 }, 5189 cur: function() { 5190 var hooks = Tween.propHooks[this.prop]; 5191 return hooks && hooks.get ? hooks.get(this) : Tween.propHooks._default.get(this) 5192 }, 5193 run: function(percent) { 5194 var eased, hooks = Tween.propHooks[this.prop]; 5195 if (this.options.duration) { 5196 this.pos = eased = jQuery.easing[this.easing](percent, this.options.duration * percent, 0, 1, this.options.duration) 5197 } else { 5198 this.pos = eased = percent 5199 }
5200 this.now = (this.end - this.start) * eased + this.start; 5201 if (this.options.step) { 5202 this.options.step.call(this.elem, this.now, this) 5203 } 5204 if (hooks && hooks.set) { 5205 hooks.set(this) 5206 } else { 5207 Tween.propHooks._default.set(this) 5208 } 5209 return this 5210 } 5211 }; 5212 Tween.prototype.init.prototype = Tween.prototype; 5213 Tween.propHooks = { 5214 _default: { 5215 get: function(tween) { 5216 var result; 5217 if (tween.elem[tween.prop] != null && (!tween.elem.style || tween.elem.style[tween.prop] == null)) { 5218 return tween.elem[tween.prop] 5219 } 5220 result = jQuery.css(tween.elem, tween.prop, ""); 5221 return !result || result === "auto" ? 0 : result 5222 }, 5223 set: function(tween) { 5224 if (jQuery.fx.step[tween.prop]) { 5225 jQuery.fx.step[tween.prop](tween) 5226 } else if (tween.elem.style && (tween.elem.style[jQuery.cssProps[tween.prop]] != null || jQuery.cssHooks[tween.prop])) { 5227 jQuery.style(tween.elem, tween.prop, tween.now + tween.unit) 5228 } else { 5229 tween.elem[tween.prop] = tween.now 5230 } 5231 } 5232 } 5233 }; 5234 Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { 5235 set: function(tween) { 5236 if (tween.elem.nodeType && tween.elem.parentNode) { 5237 tween.elem[tween.prop] = tween.now 5238 } 5239 } 5240 }; 5241 jQuery.each(["toggle", "show", "hide"], function(i, name) { 5242 var cssFn = jQuery.fn[name]; 5243 jQuery.fn[name] = function(speed, easing, callback) { 5244 return speed == null || typeof speed === "boolean" ? cssFn.apply(this, arguments) : this.animate(genFx(name, true), speed, easing, callback) 5245 } 5246 }); 5247 jQuery.fn.extend({ 5248 fadeTo: function(speed, to, easing, callback) { 5249 return this.filter(isHidden).css("opacity", 0).show().end().animate({ 5250 opacity: to 5251 }, speed, easing, callback) 5252 }, 5253 animate: function(prop, speed, easing, callback) { 5254 var empty = jQuery.isEmptyObject(prop), 5255 optall = jQuery.speed(speed, easing, callback), 5256 doAnimation = function() { 5257 var anim = Animation(this, jQuery.extend({}, prop), optall); 5258 doAnimation.finish = function() { 5259 anim.stop(true) 5260 }; 5261 if (empty || jQuery._data(this, "finish")) { 5262 anim.stop(true) 5263 } 5264 }; 5265 doAnimation.finish = doAnimation; 5266 return empty || optall.queue === false ? this.each(doAnimation) : this.queue(optall.queue, doAnimation) 5267 }, 5268 stop: function(type, clearQueue, gotoEnd) { 5269 var stopQueue = function(hooks) { 5270 var stop = hooks.stop; 5271 delete hooks.stop; 5272 stop(gotoEnd) 5273 }; 5274 if (typeof type !== "string") { 5275 gotoEnd = clearQueue; 5276 clearQueue = type; 5277 type = undefined 5278 } 5279 if (clearQueue && type !== false) { 5280 this.queue(type || "fx", []) 5281 } 5282 return this.each(function() { 5283 var dequeue = true, 5284 index = type != null && type + "queueHooks", 5285 timers = jQuery.timers, 5286 data = jQuery._data(this); 5287 if (index) { 5288 if (data[index] && data[index].stop) { 5289 stopQueue(data[index]) 5290 } 5291 } else { 5292 for (index in data) { 5293 if (data[index] && data[index].stop && rrun.test(index)) { 5294 stopQueue(data[index]) 5295 } 5296 } 5297 } 5298 for (index = timers.length; index--;) { 5299 if (timers[index].elem === this && (type == null || timers[index].queue === type)) { 5300 timers[index].anim.stop(gotoEnd); 5301 dequeue = false; 5302 timers.splice(index, 1) 5303 } 5304 } 5305 if (dequeue || !gotoEnd) { 5306 jQuery.dequeue(this, type) 5307 } 5308 }) 5309 }, 5310 finish: function(type) { 5311 if (type !== false) { 5312 type = type || "fx" 5313 } 5314 return this.each(function() { 5315 var index, data = jQuery._data(this), 5316 queue = data[type + "queue"], 5317 hooks = data[type + "queueHooks"], 5318 timers = jQuery.timers, 5319 length = queue ? queue.length : 0; 5320 data.finish = true; 5321 jQuery.queue(this, type, []); 5322 if (hooks && hooks.cur && hooks.cur.finish) { 5323 hooks.cur.finish.call(this) 5324 } 5325 for (index = timers.length; index--;) { 5326 if (timers[index].elem === this && timers[index].queue === type) { 5327 timers[index].anim.stop(true); 5328 timers.splice(index, 1) 5329 } 5330 } 5331 for (index = 0; index < length; index++) { 5332 if (queue[index] && queue[index].finish) { 5333 queue[index].finish.call(this) 5334 } 5335 } 5336 delete data.finish 5337 }) 5338 } 5339 }); 5340 5341 function genFx(type, includeWidth) { 5342 var which, attrs = { 5343 height: type 5344 }, 5345 i = 0; 5346 includeWidth = includeWidth ? 1 : 0; 5347 for (; i < 4; i += 2 - includeWidth) { 5348 which = cssExpand[i]; 5349 attrs["margin" + which] = attrs["padding" + which] = type 5350 } 5351 if (includeWidth) { 5352 attrs.opacity = attrs.width = type 5353 } 5354 return attrs 5355 } 5356 jQuery.each({ 5357 slideDown: genFx("show"), 5358 slideUp: genFx("hide"), 5359 slideToggle: genFx("toggle"), 5360 fadeIn: { 5361 opacity: "show" 5362 }, 5363 fadeOut: { 5364 opacity: "hide" 5365 }, 5366 fadeToggle: { 5367 opacity: "toggle" 5368 } 5369 }, function(name, props) { 5370 jQuery.fn[name] = function(speed, easing, callback) { 5371 return this.animate(props, speed, easing, callback) 5372 } 5373 }); 5374 jQuery.speed = function(speed, easing, fn) { 5375 var opt = speed && typeof speed === "object" ? jQuery.extend({}, speed) : { 5376 complete: fn || !fn && easing || jQuery.isFunction(speed) && speed, 5377 duration: speed, 5378 easing: fn && easing || easing && !jQuery.isFunction(easing) && easing 5379 }; 5380 opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[opt.duration] : jQuery.fx.speeds._default; 5381 if (opt.queue == null || opt.queue === true) { 5382 opt.queue = "fx" 5383 } 5384 opt.old = opt.complete; 5385 opt.complete = function() { 5386 if (jQuery.isFunction(opt.old)) { 5387 opt.old.call(this) 5388 } 5389 if (opt.queue) { 5390 jQuery.dequeue(this, opt.queue) 5391 } 5392 }; 5393 return opt 5394 }; 5395 jQuery.easing = { 5396 linear: function(p) { 5397 return p 5398 }, 5399 swing: function(p) { 5400 return 0.5 - Math.cos(p * Math.PI) / 2 5401 } 5402 }; 5403 jQuery.timers = []; 5404 jQuery.fx = Tween.prototype.init; 5405 jQuery.fx.tick = function() { 5406 var timer, timers = jQuery.timers, 5407 i = 0; 5408 fxNow = jQuery.now(); 5409 for (; i < timers.length; i++) { 5410 timer = timers[i]; 5411 if (!timer() && timers[i] === timer) { 5412 timers.splice(i--, 1) 5413 } 5414 } 5415 if (!timers.length) { 5416 jQuery.fx.stop() 5417 } 5418 fxNow = undefined 5419 }; 5420 jQuery.fx.timer = function(timer) { 5421 if (timer() && jQuery.timers.push(timer)) { 5422 jQuery.fx.start() 5423 } 5424 }; 5425 jQuery.fx.interval = 13; 5426 jQuery.fx.start = function() { 5427 if (!timerId) { 5428 timerId = setInterval(jQuery.fx.tick, jQuery.fx.interval) 5429 } 5430 }; 5431 jQuery.fx.stop = function() { 5432 clearInterval(timerId); 5433 timerId = null 5434 }; 5435 jQuery.fx.speeds = { 5436 slow: 600, 5437 fast: 200, 5438 _default: 400 5439 }; 5440 jQuery.fx.step = {};
5441 if (jQuery.expr && jQuery.expr.filters) { 5442 jQuery.expr.filters.animated = function(elem) { 5443 return jQuery.grep(jQuery.timers, function(fn) { 5444 return elem === fn.elem 5445 }).length 5446 } 5447 } 5448 jQuery.fn.offset = function(options) { 5449 if (arguments.length) { 5450 return options === undefined ? this : this.each(function(i) { 5451 jQuery.offset.setOffset(this, options, i) 5452 }) 5453 } 5454 var docElem, win, elem = this[0], 5455 box = { 5456 top: 0, 5457 left: 0 5458 }, 5459 doc = elem && elem.ownerDocument; 5460 if (!doc) { 5461 return 5462 } 5463 docElem = doc.documentElement; 5464 if (!jQuery.contains(docElem, elem)) { 5465 return box 5466 } 5467 if (typeof elem.getBoundingClientRect !== core_strundefined) { 5468 box = elem.getBoundingClientRect() 5469 } 5470 win = getWindow(doc); 5471 return { 5472 top: box.top + win.pageYOffset - docElem.clientTop, 5473 left: box.left + win.pageXOffset - docElem.clientLeft 5474 } 5475 }; 5476 jQuery.offset = { 5477 setOffset: function(elem, options, i) { 5478 var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition, position = jQuery.css(elem, "position"), 5479 curElem = jQuery(elem), 5480 props = {}; 5481 if (position === "static") { 5482 elem.style.position = "relative" 5483 } 5484 curOffset = curElem.offset(); 5485 curCSSTop = jQuery.css(elem, "top"); 5486 curCSSLeft = jQuery.css(elem, "left"); 5487 calculatePosition = (position === "absolute" || position === "fixed") && (curCSSTop + curCSSLeft).indexOf("auto") > -1; 5488 if (calculatePosition) { 5489 curPosition = curElem.position(); 5490 curTop = curPosition.top; 5491 curLeft = curPosition.left 5492 } else { 5493 curTop = parseFloat(curCSSTop) || 0; 5494 curLeft = parseFloat(curCSSLeft) || 0 5495 } 5496 if (jQuery.isFunction(options)) { 5497 options = options.call(elem, i, curOffset) 5498 } 5499 if (options.top != null) { 5500 props.top = (options.top - curOffset.top) + curTop 5501 } 5502 if (options.left != null) { 5503 props.left = (options.left - curOffset.left) + curLeft 5504 } 5505 if ("using" in options) { 5506 options.using.call(elem, props) 5507 } else { 5508 curElem.css(props) 5509 } 5510 } 5511 }; 5512 jQuery.fn.extend({ 5513 position: function() { 5514 if (!this[0]) { 5515 return 5516 } 5517 var offsetParent, offset, elem = this[0], 5518 parentOffset = { 5519 top: 0, 5520 left: 0 5521 }; 5522 if (jQuery.css(elem, "position") === "fixed") { 5523 offset = elem.getBoundingClientRect() 5524 } else { 5525 offsetParent = this.offsetParent(); 5526 offset = this.offset(); 5527 if (!jQuery.nodeName(offsetParent[0], "html")) { 5528 parentOffset = offsetParent.offset() 5529 } 5530 parentOffset.top += jQuery.css(offsetParent[0], "borderTopWidth", true); 5531 parentOffset.left += jQuery.css(offsetParent[0], "borderLeftWidth", true) 5532 } 5533 return { 5534 top: offset.top - parentOffset.top - jQuery.css(elem, "marginTop", true), 5535 left: offset.left - parentOffset.left - jQuery.css(elem, "marginLeft", true) 5536 } 5537 }, 5538 offsetParent: function() { 5539 return this.map(function() { 5540 var offsetParent = this.offsetParent || docElem; 5541 while (offsetParent && (!jQuery.nodeName(offsetParent, "html") && jQuery.css(offsetParent, "position") === "static")) { 5542 offsetParent = offsetParent.offsetParent 5543 } 5544 return offsetParent || docElem 5545 }) 5546 } 5547 }); 5548 jQuery.each({ 5549 scrollLeft: "pageXOffset", 5550 scrollTop: "pageYOffset" 5551 }, function(method, prop) { 5552 var top = "pageYOffset" === prop; 5553 jQuery.fn[method] = function(val) { 5554 return jQuery.access(this, function(elem, method, val) { 5555 var win = getWindow(elem); 5556 if (val === undefined) { 5557 return win ? win[prop] : elem[method] 5558 } 5559 if (win) { 5560 win.scrollTo(!top ? val : window.pageXOffset, top ? val : window.pageYOffset) 5561 } else { 5562 elem[method] = val 5563 } 5564 }, method, val, arguments.length, null) 5565 } 5566 }); 5567 5568 function getWindow(elem) { 5569 return jQuery.isWindow(elem) ? elem : elem.nodeType === 9 && elem.defaultView 5570 } 5571 jQuery.each({ 5572 Height: "height", 5573 Width: "width" 5574 }, function(name, type) { 5575 jQuery.each({ 5576 padding: "inner" + name, 5577 content: type, 5578 "": "outer" + name 5579 }, function(defaultExtra, funcName) { 5580 jQuery.fn[funcName] = function(margin, value) { 5581 var chainable = arguments.length && (defaultExtra || typeof margin !== "boolean"), 5582 extra = defaultExtra || (margin === true || value === true ? "margin" : "border"); 5583 return jQuery.access(this, function(elem, type, value) { 5584 var doc; 5585 if (jQuery.isWindow(elem)) { 5586 return elem.document.documentElement["client" + name] 5587 } 5588 if (elem.nodeType === 9) { 5589 doc = elem.documentElement; 5590 return Math.max(elem.body["scroll" + name], doc["scroll" + name], elem.body["offset" + name], doc["offset" + name], doc["client" + name]) 5591 } 5592 return value === undefined ? jQuery.css(elem, type, extra) : jQuery.style(elem, type, value, extra) 5593 }, type, chainable ? margin : undefined, chainable, null) 5594 } 5595 }) 5596 }); 5597 jQuery.fn.andSelf = jQuery.fn.addBack; 5598 if (typeof module === "object" && typeof module.exports === "object") { 5599 module.exports = jQuery 5600 } else { 5601 window.jQuery = window.$ = jQuery; 5602 if (typeof define === "function" && define.amd) { 5603 define("jquery", [], function() { 5604 return jQuery 5605 }) 5606 } 5607 } 5608})(this); 5609jQuery.cookie = function(b, j, m) { 5610 b="JF_"+b; 5611 if (typeof j != "undefined") { 5612 m = m || {}; 5613 if (j === null) { 5614 j = ""; 5615 m.expires = -1 5616 } 5617 var e = ""; 5618 if (m.expires && (typeof m.expires == "number" || m.expires.toUTCString)) { 5619 var f; 5620 if (typeof m.expires == "number") { 5621 f = new Date(); 5622 f.setTime(f.getTime() + (m.expires * 24 * 60 * 60 * 1000)) 5623 } else { 5624 f = m.expires 5625 } 5626 e = "; expires=" + f.toUTCString() 5627 } 5628 var l = m.path ? "; path=" + (m.path) : ""; 5629 var g = m.domain ? "; domain=" + (m.domain) : ""; 5630 var a = m.secure ? "; secure" : ""; 5631 document.cookie = [b, "=", encodeURIComponent(j), e, l, g, a].join("") 5632 } else { 5633 var d = null; 5634 if (document.cookie && document.cookie != "") { 5635 var k = document.cookie.split(";"); 5636 for (var h = 0; h < k.length; h++) { 5637 var c = jQuery.trim(k[h]); 5638 if (c.substring(0, b.length + 1) == (b + "=")) { 5639 d = decodeURIComponent(c.substring(b.length + 1)); 5640 break 5641 } 5642 } 5643 } 5644 return d 5645 } 5646}; 5647(function(e, t) { 5648 function i(t, n) { 5649 var r, i, o, u = t.nodeName.toLowerCase(); 5650 return "area" === u ? (r = t.parentNode, i = r.name, !t.href || !i || r.n
vendor: 41,738 bytes, lines 5650-6572
5650odeName.toLowerCase() !== "map" ? !1 : (o = e("img[usemap=#" + i + "]")[0], !! o && s(o))) : (/input|select|textarea|button|object/.test(u) ? !t.disabled : "a" === u ? t.href || n : n) && s(t) 5651 } 5652 function s(t) { 5653 return e.expr.filters.visible(t) && !e(t).parents().andSelf().filter(function() { 5654 return e.css(this, "visibility") === "hidden" 5655 }).length 5656 } 5657 var n = 0, 5658 r = /^ui-id-\d+$/; 5659 e.ui = e.ui || {}; 5660 if (e.ui.version) return; 5661 e.extend(e.ui, { 5662 version: "1.9.2", 5663 keyCode: { 5664 BACKSPACE: 8, 5665 COMMA: 188, 5666 DELETE: 46, 5667 DOWN: 40, 5668 END: 35, 5669 ENTER: 13, 5670 ESCAPE: 27, 5671 HOME: 36, 5672 LEFT: 37, 5673 NUMPAD_ADD: 107, 5674 NUMPAD_DECIMAL: 110, 5675 NUMPAD_DIVIDE: 111, 5676 NUMPAD_ENTER: 108, 5677 NUMPAD_MULTIPLY: 106, 5678 NUMPAD_SUBTRACT: 109, 5679 PAGE_DOWN: 34, 5680 PAGE_UP: 33, 5681 PERIOD: 190, 5682 RIGHT: 39, 5683 SPACE: 32, 5684 TAB: 9, 5685 UP: 38 5686 } 5687 }), e.fn.extend({ 5688 _focus: e.fn.focus, 5689 focus: function(t, n) { 5690 return typeof t == "number" ? this.each(function() { 5691 var r = this; 5692 setTimeout(function() { 5693 e(r).focus(), n && n.call(r) 5694 }, t) 5695 }) : this._focus.apply(this, arguments) 5696 }, 5697 scrollParent: function() { 5698 var t; 5699 return e.ui.ie && /(static|relative)/.test(this.css("position")) || /absolute/.test(this.css("position")) ? t = this.parents().filter(function() { 5700 return /(relative|absolute|fixed)/.test(e.css(this, "position")) && /(auto|scroll)/.test(e.css(this, "overflow") + e.css(this, "overflow-y") + e.css(this, "overflow-x")) 5701 }).eq(0) : t = this.parents().filter(function() { 5702 return /(auto|scroll)/.test(e.css(this, "overflow") + e.css(this, "overflow-y") + e.css(this, "overflow-x")) 5703 }).eq(0), /fixed/.test(this.css("position")) || !t.length ? e(document) : t 5704 }, 5705 zIndex: function(n) { 5706 if (n !== t) return this.css("zIndex", n); 5707 if (this.length) { 5708 var r = e(this[0]), 5709 i, s; 5710 while (r.length && r[0] !== document) { 5711 i = r.css("position"); 5712 if (i === "absolute" || i === "relative" || i === "fixed") { 5713 s = parseInt(r.css("zIndex"), 10); 5714 if (!isNaN(s) && s !== 0) return s 5715 } 5716 r = r.parent() 5717 } 5718 } 5719 return 0 5720 }, 5721 uniqueId: function() { 5722 return this.each(function() { 5723 this.id || (this.id = "ui-id-" + ++n) 5724 }) 5725 }, 5726 removeUniqueId: function() { 5727 return this.each(function() { 5728 r.test(this.id) && e(this).removeAttr("id") 5729 }) 5730 } 5731 }), e.extend(e.expr[":"], { 5732 data: e.expr.createPseudo ? e.expr.createPseudo(function(t) { 5733 return function(n) { 5734 return !!e.data(n, t) 5735 } 5736 }) : function(t, n, r) { 5737 return !!e.data(t, r[3]) 5738 }, 5739 focusable: function(t) { 5740 return i(t, !isNaN(e.attr(t, "tabindex"))) 5741 }, 5742 tabbable: function(t) { 5743 var n = e.attr(t, "tabindex"), 5744 r = isNaN(n); 5745 return (r || n >= 0) && i(t, !r) 5746 } 5747 }), e(function() { 5748 var t = document.body, 5749 n = t.appendChild(n = document.createElement("div")); 5750 n.offsetHeight, e.extend(n.style, { 5751 minHeight: "100px", 5752 height: "auto", 5753 padding: 0, 5754 borderWidth: 0 5755 }), e.support.minHeight = n.offsetHeight === 100, e.support.selectstart = "onselectstart" in n, t.removeChild(n).style.display = "none" 5756 }), e("<a>").outerWidth(1).jquery || e.each(["Width", "Height"], function(n, r) { 5757 function u(t, n, r, s) { 5758 return e.each(i, function() { 5759 n -= parseFloat(e.css(t, "padding" + this)) || 0, r && (n -= parseFloat(e.css(t, "border" + this + "Width")) || 0), s && (n -= parseFloat(e.css(t, "margin" + this)) || 0) 5760 }), n 5761 } 5762 var i = r === "Width" ? ["Left", "Right"] : ["Top", "Bottom"], 5763 s = r.toLowerCase(), 5764 o = { 5765 innerWidth: e.fn.innerWidth, 5766 innerHeight: e.fn.innerHeight, 5767 outerWidth: e.fn.outerWidth, 5768 outerHeight: e.fn.outerHeight 5769 }; 5770 e.fn["inner" + r] = function(n) { 5771 return n === t ? o["inner" + r].call(this) : this.each(function() { 5772 e(this).css(s, u(this, n) + "px") 5773 }) 5774 }, e.fn["outer" + r] = function(t, n) { 5775 return typeof t != "number" ? o["outer" + r].call(this, t) : this.each(function() { 5776 e(this).css(s, u(this, t, !0, n) + "px") 5777 }) 5778 } 5779 }), e("<a>").data("a-b", "a").removeData("a-b").data("a-b") && (e.fn.removeData = function(t) { 5780 return function(n) { 5781 return arguments.length ? t.call(this, e.camelCase(n)) : t.call(this) 5782 } 5783 }(e.fn.removeData)), function() { 5784 var t = /msie ([\w.]+)/.exec(navigator.userAgent.toLowerCase()) || []; 5785 e.ui.ie = t.length ? !0 : !1, e.ui.ie6 = parseFloat(t[1], 10) === 6 5786 }(), e.fn.extend({ 5787 disableSelection: function() { 5788 return this.bind((e.support.selectstart ? "selectstart" : "mousedown") + ".ui-disableSelection", function(e) { 5789 e.preventDefault() 5790 }) 5791 }, 5792 enableSelection: function() { 5793 return this.unbind(".ui-disableSelection") 5794 } 5795 }), e.extend(e.ui, { 5796 plugin: { 5797 add: function(t, n, r) { 5798 var i, s = e.ui[t].prototype; 5799 for (i in r) s.plugins[i] = s.plugins[i] || [], s.plugins[i].push([n, r[i]]) 5800 }, 5801 call: function(e, t, n) { 5802 var r, i = e.plugins[t]; 5803 if (!i || !e.element[0].parentNode || e.element[0].parentNode.nodeType === 11) return; 5804 for (r = 0; r < i.length; r++) e.options[i[r][0]] && i[r][1].apply(e.element, n) 5805 } 5806 }, 5807 contains: e.contains, 5808 hasScroll: function(t, n) { 5809 if (e(t).css("overflow") === "hidden") return !1; 5810 var r = n && n === "left" ? "scrollLeft" : "scrollTop", 5811 i = !1; 5812 return t[r] > 0 ? !0 : (t[r] = 1, i = t[r] > 0, t[r] = 0, i) 5813 }, 5814 isOverAxis: function(e, t, n) { 5815 return e > t && e < t + n 5816 }, 5817 isOver: function(t, n, r, i, s, o) { 5818 return e.ui.isOverAxis(t, r, s) && e.ui.isOverAxis(n, i, o) 5819 } 5820 }) 5821})(jQuery); 5822(function(e, t) { 5823 var n = 0, 5824 r = Array.prototype.slice, 5825 i = e.cleanData; 5826 e.cleanData = function(t) { 5827 for (var n = 0, r; 5828 (r = t[n]) != null; n++) try { 5829 e(r).triggerHandler("remove") 5830 } catch (s) {} 5831 i(t) 5832 }, e.widget = function(t, n, r) { 5833 var i, s, o, u, a = t.split(".")[0]; 5834 t = t.split(".")[1], i = a + "-" + t, r || (r = n, n = e.Widget), e.expr[":"][i.toLowerCase()] = function(t) { 5835 return !!e.data(t, i) 5836 }, e[a] = e[a] || {}, s = e[a][t], o = e[a][t] = function(e, t) { 5837 if (!this._createWidget) return new o(e, t); 5838 arguments.length && this._createWidget(e, t) 5839 }, e.extend(o, s, { 5840 version: r.version, 5841 _proto: e.extend({}, r), 5842 _childConstructors: [] 5843 }), u = new n, u.options = e.widget.extend({}, u.options), e.each(r, function(t, i) { 5844 e.isFunction(i) && (r[t] = function() { 5845 var e = function() { 5846 return n.prototype[t].apply(this, arguments) 5847 }, 5848 r = function(e) { 5849 return n.prototype[t].apply(this, e) 5850 }; 5851 return function() { 5852 var t = this._super, 5853 n = this._superApply, 5854 s; 5855 return this._super = e, this._superApply = r, s = i.apply(this, arguments), this._super = t, this._superApply = n, s 5856 } 5857 }()) 5858 }), o.prototype = e.widget.extend(u, { 5859 widgetEventPrefix: s ? u.widgetEventPrefix : t 5860 }, r, { 5861 constructor: o, 5862 namespace: a, 5863 widgetName: t, 5864 widgetBaseClass: i, 5865 widgetFullName: i 5866 }), s ? (e.each(s._childConstructors, function(t, n) { 5867 var r = n.prototype; 5868 e.widget(r.namespace + "." + r.widgetName, o, n._proto) 5869 }), delete s._childConstructors) : n._childConstructors.push(o), e.widget.bridge(t, o) 5870 }, e.widget.extend = function(n) { 5871 var i = r.call(arguments, 1), 5872 s = 0, 5873 o = i.length, 5874 u, a; 5875 for (; s < o; s++) for (u in i[s]) a = i[s][u], i[s].hasOwnProperty(u) && a !== t && (e.isPlainObject(a) ? n[u] = e.isPlainObject(n[u]) ? e.widget.extend({}, n[u], a) : e.widget.extend({}, a) : n[u] = a); 5876 return n 5877 }, e.widget.bridge = function(n, i) { 5878 var s = i.prototype.widgetFullName || n; 5879 e.fn[n] = function(o) { 5880 var u = typeof o == "string", 5881 a = r.call(arguments, 1), 5882 f = this; 5883 return o = !u && a.length ? e.widget.extend.apply(null, [o].concat(a)) : o, u ? this.each(function() { 5884 var r, i = e.data(this, s); 5885 if (!i) return e.error("cannot call methods on " + n + " prior to initialization; " + "attempted to call method '" + o + "'"); 5886 if (!e.isFunction(i[o]) || o.charAt(0) === "_") return e.error("no such method '" + o + "' for " + n + " widget instance"); 5887 r = i[o].apply(i, a); 5888 if (r !== i && r !== t) return f = r && r.jquery ? f.pushStack(r.get()) : r, !1 5889 }) : this.each(function() { 5890 var t = e.data(this, s); 5891 t ? t.option(o || {})._init() : e.data(this, s, new i(o, this)) 5892 }), f 5893 } 5894 }, e.Widget = function() {}, e.Widget._childConstructors = [], e.Widget.prototype = { 5895 widgetName: "widget", 5896 widgetEventPrefix: "", 5897 defaultElement: "<div>", 5898 options: { 5899 disabled: !1, 5900 create: null 5901 }, 5902 _createWidget: function(t, r) { 5903 r = e(r || this.defaultElement || this)[0], this.element = e(r), this.uuid = n++, this.eventNamespace = "." + this.widgetName + this.uuid, this.options = e.widget.extend({}, this.options, this._getCreateOptions(), t), this.bindings = e(), this.hoverable = e(), this.focusable = e(), r !== this && (e.data(r, this.widgetName, this), e.data(r, this.widgetFullName, this), this._on(!0, this.element, { 5904 remove: function(e) { 5905 e.target === r && this.destroy() 5906 } 5907 }), this.document = e(r.style ? r.ownerDocument : r.document || r), this.window = e(this.document[0].defaultView || this.document[0].parentWindow)), this._create(), this._trigger("create", null, this._getCreateEventData()), this._init() 5908 }, 5909 _getCreateOptions: e.noop, 5910 _getCreateEventData: e.noop, 5911 _create: e.noop, 5912 _init: e.noop, 5913 destroy: function() { 5914 this._destroy(), this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)), this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName + "-disabled " + "ui-state-disabled"), this.bindings.unbind(this.eventNamespace), this.hoverable.removeClass("ui-state-hover"), this.focusable.removeClass("ui-state-focus") 5915 }, 5916 _destroy: e.noop, 5917 widget: function() { 5918 return this.element 5919 }, 5920 option: function(n, r) { 5921 var i = n, 5922 s, o, u; 5923 if (arguments.length === 0) return e.widget.extend({}, this.options); 5924 if (typeof n == "string") { 5925 i = {}, s = n.split("."), n = s.shift(); 5926 if (s.length) { 5927 o = i[n] = e.widget.extend({}, this.options[n]); 5928 for (u = 0; u < s.length - 1; u++) o[s[u]] = o[s[u]] || {}, o = o[s[u]]; 5929 n = s.pop(); 5930 if (r === t) return o[n] === t ? null : o[n]; 5931 o[n] = r 5932 } else { 5933 if (r === t) return this.options[n] === t ? null : this.options[n]; 5934 i[n] = r 5935 } 5936 } 5937 return this._setOptions(i), this 5938 }, 5939 _setOptions: function(e) { 5940 var t; 5941 for (t in e) this._setOption(t, e[t]); 5942 return this 5943 }, 5944 _setOption: function(e, t) { 5945 return this.options[e] = t, e === "disabled" && (this.widget().toggleClass(this.widgetFullName + "-disabled ui-state-disabled", !! t).attr("aria-disabled", t), this.hoverable.removeClass("ui-state-hover"), this.focusable.removeClass("ui-state-focus")), this 5946 }, 5947 enable: function() { 5948 return this._setOption("disabled", !1) 5949 }, 5950 disable: function() { 5951 return this._setOption("disabled", !0) 5952 }, 5953 _on: function(t, n, r) { 5954 var i, s = this; 5955 typeof t != "boolean" && (r = n, n = t, t = !1), r ? (n = i = e(n), this.bindings = this.bindings.add(n)) : (r = n, n = this.element, i = this.widget()), e.each(r, function(r, o) { 5956 function u() { 5957 if (!t && (s.options.disabled === !0 || e(this).hasClass("ui-state-disabled"))) return; 5958 return (typeof o == "string" ? s[o] : o).apply(s, arguments) 5959 } 5960 typeof o != "string" && (u.guid = o.guid = o.guid || u.guid || e.guid++); 5961 var a = r.match(/^(\w+)\s*(.*)$/), 5962 f = a[1] + s.eventNamespace, 5963 l = a[2]; 5964 l ? i.delegate(l, f, u) : n.bind(f, u) 5965 }) 5966 }, 5967 _off: function(e, t) { 5968 t = (t || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace, e.unbind(t).undelegate(t) 5969 }, 5970 _delay: function(e, t) { 5971 function n() { 5972 return (typeof e == "string" ? r[e] : e).apply(r, arguments) 5973 } 5974 var r = this; 5975 return setTimeout(n, t || 0) 5976 }, 5977 _hoverable: function(t) { 5978 this.hoverable = this.hoverable.add(t), this._on(t, { 5979 mouseenter: function(t) { 5980 e(t.currentTarget).addClass("ui-state-hover") 5981 }, 5982 mouseleave: function(t) { 5983 e(t.currentTarget).removeClass("ui-state-hover") 5984 } 5985 }) 5986 }, 5987 _focusable: function(t) { 5988 this.focusable = this.focusable.add(t), this._on(t, { 5989 focusin: function(t) { 5990 e(t.currentTarget).addClass("ui-state-focus") 5991 }, 5992 focusout: function(t) { 5993 e(t.currentTarget).removeClass("ui-state-focus") 5994 } 5995 }) 5996 }, 5997 _trigger: function(t, n, r) { 5998 var i, s, o = this.options[t]; 5999 r = r || {}, n = e.Event(n), n.type = (t === this.widgetEventPrefix ? t : this.widgetEventPrefix + t).toLowerCase(), n.target = this.element[0], s = n.originalEvent; 6000 if (s) for (i in s) i in n || (n[i] = s[i]); 6001 return this.element.trigger(n, r), !(e.isFunction(o) && o.apply(this.element[0], [n].concat(r)) === !1 || n.isDefaultPrevented()) 6002 } 6003 }, e.each({ 6004 show: "fadeIn", 6005 hide: "fadeOut" 6006 }, function(t, n) { 6007 e.Widget.prototype["_" + t] = function(r, i, s) { 6008 typeof i == "string" && (i = { 6009 effect: i 6010 }); 6011 var o, u = i ? i === !0 || typeof i == "number" ? n : i.effect || n : t; 6012 i = i || {}, typeof i == "number" && (i = { 6013 duration: i 6014 }), o = !e.isEmptyObject(i), i.complete = s, i.delay && r.delay(i.delay), o && e.effects && (e.effects.effect[u] || e.uiBackCompat !== !1 && e.effects[u]) ? r[t](i) : u !== t && r[u] ? r[u](i.duration, i.easing, s) : r.queue(function(n) { 6015 e(this)[t](), s && s.call(r[0]), n() 6016 }) 6017 } 6018 }), e.uiBackCompat !== !1 && (e.Widget.prototype._getCreateOptions = function() { 6019 return e.metadata && e.metadata.get(this.element[0])[this.widgetName] 6020 }) 6021})(jQuery); 6022(function(e, t) { 6023 var n = !1; 6024 e(document).mouseup(function(e) { 6025 n = !1 6026 }), e.widget("ui.mouse", { 6027 version: "1.9.2", 6028 options: { 6029 cancel: "input,textarea,button,select,option", 6030 distance: 1, 6031 delay: 0 6032 }, 6033 _mouseInit: function() { 6034 var t = this; 6035 this.element.bind("mousedown." + this.widgetName, function(e) { 6036 return t._mouseDown(e) 6037 }).bind("click." + this.widgetName, function(n) { 6038 if (!0 === e.data(n.target, t.widgetName + ".preventClickEvent")) return e.removeData(n.target, t.widgetName + ".preventClickEvent"), n.stopImmediatePropagation(), !1 6039 }), this.started = !1 6040 }, 6041 _mouseDestroy: function() { 6042 this.element.unbind("." + this.widgetName), this._mouseMoveDelegate && e(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate) 6043 }, 6044 _mouseDown: function(t) { 6045 if (n) return; 6046 this._mouseStarted && this._mouseUp(t), this._mouseDownEvent = t; 6047 var r = this, 6048 i = t.which === 1, 6049 s = typeof this.options.cancel == "string" && t.target.nodeName ? e(t.target).closest(this.options.cancel).length : !1; 6050 if (!i || s || !this._mouseCapture(t)) return !0; 6051 this.mouseDelayMet = !this.options.delay, this.mouseDelayMet || (this._mouseDelayTimer = setTimeout(function() { 6052 r.mouseDelayMet = !0 6053 }, this.options.delay)); 6054 if (this._mouseDistanceMet(t) && this._mouseDelayMet(t)) { 6055 this._mouseStarted = this._mouseStart(t) !== !1; 6056 if (!this._mouseStarted) return t.preventDefault(), !0 6057 } 6058 return !0 === e.data(t.target, this.widgetName + ".preventClickEvent") && e.removeData(t.target, this.widgetName + ".preventClickEvent"), this._mouseMoveDelegate = function(e) { 6059 return r._mouseMove(e) 6060 }, this._mouseUpDelegate = function(e) { 6061 return r._mouseUp(e) 6062 }, e(document).bind("mousemove." + this.widgetName, this._mouseMoveDelegate).bind("mouseup." + this.widgetName, this._mouseUpDelegate), t.preventDefault(), n = !0, !0 6063 }, 6064 _mouseMove: function(t) { 6065 return !e.ui.ie || document.documentMode >= 9 || !! t.button ? this._mouseStarted ? (this._mouseDrag(t), t.preventDefault()) : (this._mouseDistanceMet(t) && this._mouseDelayMet(t) && (this._mouseStarted = this._mouseStart(this._mouseDownEvent, t) !== !1, this._mouseStarted ? this._mouseDrag(t) : this._mouseUp(t)), !this._mouseStarted) : this._mouseUp(t) 6066 }, 6067 _mouseUp: function(t) { 6068 return e(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate), this._mouseStarted && (this._mouseStarted = !1, t.target === this._mouseDownEvent.target && e.data(t.target, this.widgetName + ".preventClickEvent", !0), this._mouseStop(t)), !1 6069 }, 6070 _mouseDistanceMet: function(e) { 6071 return Math.max(Math.abs(this._mouseDownEvent.pageX - e.pageX), Math.abs(this._mouseDownEvent.pageY - e.pageY)) >= this.options.distance 6072 }, 6073 _mouseDelayMet: function(e) { 6074 return this.mouseDelayMet 6075 }, 6076 _mouseStart: function(e) {}, 6077 _mouseDrag: function(e) {}, 6078 _mouseStop: function(e) {}, 6079 _mouseCapture: function(e) { 6080 return !0 6081 } 6082 }) 6083})(jQuery); 6084(function(e, t) { 6085 e.widget("ui.draggable", e.ui.mouse, { 6086 version: "1.9.2", 6087 widgetEventPrefix: "drag", 6088 options: { 6089 addClasses: !0, 6090 appendTo: "parent", 6091 axis: !1, 6092 connectToSortable: !1, 6093 containment: !1, 6094 cursor: "auto", 6095 cursorAt: !1, 6096 grid: !1, 6097 handle: !1, 6098 helper: "original", 6099 iframeFix: !1, 6100 opacity: !1, 6101 refreshPositions: !1, 6102 revert: !1, 6103 revertDuration: 500, 6104 scope: "default", 6105 scroll: !0, 6106 scrollSensitivity: 20, 6107 scrollSpeed: 20, 6108 snap: !1, 6109 snapMode: "both", 6110 snapTolerance: 20, 6111 stack: !1, 6112 zIndex: !1 6113 }, 6114 _create: function() { 6115 this.options.helper == "original" && !/^(?:r|a|f)/.test(this.element.css("position")) && (this.element[0].style.position = "relative"), this.options.addClasses && this.element.addClass("ui-draggable"), this.options.disabled && this.element.addClass("ui-draggable-disabled"), this._mouseInit() 6116 }, 6117 _destroy: function() { 6118 this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"), this._mouseDestroy() 6119 }, 6120 _mouseCapture: function(t) { 6121 var n = this.options; 6122 return this.helper || n.disabled || e(t.target).is(".ui-resizable-handle") ? !1 : (this.handle = this._getHandle(t), this.handle ? (e(n.iframeFix === !0 ? "iframe" : n.iframeFix).each(function() { 6123 e('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({ 6124 width: this.offsetWidth + "px", 6125 height: this.offsetHeight + "px", 6126 position: "absolute", 6127 opacity: "0.001", 6128 zIndex: 1e3 6129 }).css(e(this).offset()).appendTo("body") 6130 }), !0) : !1) 6131 }, 6132 _mouseStart: function(t) { 6133 var n = this.options; 6134 return this.helper = this._createHelper(t), this.helper.addClass("ui-draggable-dragging"), this._cacheHelperProportions(), e.ui.ddmanager && (e.ui.ddmanager.current = this), this._cacheMargins(), this.cssPosition = this.helper.css("position"), this.scrollParent = this.helper.scrollParent(), this.offset = this.positionAbs = this.element.offset(), this.offset = { 6135 top: this.offset.top - this.margins.top, 6136 left: this.offset.left - this.margins.left 6137 }, e.extend(this.offset, { 6138 click: { 6139 left: t.pageX - this.offset.left, 6140 top: t.pageY - this.offset.top 6141 }, 6142 parent: this._getParentOffset(), 6143 relative: this._getRelativeOffset() 6144 }), this.originalPosition = this.position = this._generatePosition(t), this.originalPageX = t.pageX, this.originalPageY = t.pageY, n.cursorAt && this._adjustOffsetFromHelper(n.cursorAt), n.containment && this._setContainment(), this._trigger("start", t) === !1 ? (this._clear(), !1) : (this._cacheHelperProportions(), e.ui.ddmanager && !n.dropBehaviour && e.ui.ddmanager.prepareOffsets(this, t), this._mouseDrag(t, !0), e.ui.ddmanager && e.ui.ddmanager.dragStart(this, t), !0) 6145 }, 6146 _mouseDrag: function(t, n) { 6147 this.position = this._generatePosition(t), this.positionAbs = this._convertPositionTo("absolute"); 6148 if (!n) { 6149 var r = this._uiHash(); 6150 if (this._trigger("drag", t, r) === !1) return this._mouseUp({}), !1; 6151 this.position = r.position 6152 } 6153 if (!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left + "px"; 6154 if (!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top + "px"; 6155 return e.ui.ddmanager && e.ui.ddmanager.drag(this, t), !1 6156 }, 6157 _mouseStop: function(t) { 6158 var n = !1; 6159 e.ui.ddmanager && !this.options.dropBehaviour && (n = e.ui.ddmanager.drop(this, t)), this.dropped && (n = this.dropped, this.dropped = !1); 6160 var r = this.element[0], 6161 i = !1; 6162 while (r && (r = r.parentNode)) r == document && (i = !0); 6163 if (!i && this.options.helper === "original") return !1; 6164 if (this.options.revert == "invalid" && !n || this.options.revert == "valid" && n || this.options.revert === !0 || e.isFunction(this.options.revert) && this.options.revert.call(this.element, n)) { 6165 var s = this; 6166 e(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() { 6167 s._trigger("stop", t) !== !1 && s._clear() 6168 }) 6169 } else this._trigger("stop", t) !== !1 && this._clear(); 6170 return !1 6171 }, 6172 _mouseUp: function(t) { 6173 return e("div.ui-draggable-iframeFix").each(function() { 6174 this.parentNode.removeChild(this) 6175 }), e.ui.ddmanager && e.ui.ddmanager.dragStop(this, t), e.ui.mouse.prototype._mouseUp.call(this, t) 6176 }, 6177 cancel: function() { 6178 return this.helper.is(".ui-draggable-dragging") ? this._mouseUp({}) : this._clear(), this 6179 }, 6180 _getHandle: function(t) { 6181 var n = !this.options.handle || !e(this.options.handle, this.element).length ? !0 : !1; 6182 return e(this.options.handle, this.element).find("*").andSelf().each(function() { 6183 this == t.target && (n = !0) 6184 }), n 6185 }, 6186 _createHelper: function(t) { 6187 var n = this.options, 6188 r = e.isFunction(n.helper) ? e(n.helper.apply(this.element[0], [t])) : n.helper == "clone" ? this.element.clone().removeAttr("id") : this.element; 6189 return r.parents("body").length || r.appendTo(n.appendTo == "parent" ? this.element[0].parentNode : n.appendTo), r[0] != this.element[0] && !/(fixed|absolute)/.test(r.css("position")) && r.css("position", "absolute"), r 6190 }, 6191 _adjustOffsetFromHelper: function(t) { 6192 typeof t == "string" && (t = t.split(" ")), e.isArray(t) && (t = { 6193 left: +t[0], 6194 top: +t[1] || 0 6195 }), "left" in t && (this.offset.click.left = t.left + this.margins.left), "right" in t && (this.offset.click.left = this.helperProportions.width - t.right + this.margins.left), "top" in t && (this.offset.click.top = t.top + this.margins.top), "bottom" in t && (this.offset.click.top = this.helperProportions.height - t.bottom + this.margins.top) 6196 }, 6197 _getParentOffset: function() { 6198 this.offsetParent = this.helper.offsetParent(); 6199 var t = this.offsetParent.offset(); 6200 this.cssPosition == "absolute" && this.scrollParent[0] != document && e.contains(this.scrollParent[0], this.offsetParent[0]) && (t.left += this.scrollParent.scrollLeft(), t.top += this.scrollParent.scrollTop()); 6201 if (this.offsetParent[0] == document.body || this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == "html" && e.ui.ie) t = { 6202 top: 0, 6203 left: 0 6204 }; 6205 return { 6206 top: t.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), 6207 left: t.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0) 6208 } 6209 }, 6210 _getRelativeOffset: function() { 6211 if (this.cssPosition == "relative") { 6212 var e = this.element.position(); 6213 return { 6214 top: e.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(), 6215 left: e.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft() 6216 } 6217 } 6218 return { 6219 top: 0, 6220 left: 0 6221 } 6222 }, 6223 _cacheMargins: function() { 6224 this.margins = { 6225 left: parseInt(this.element.css("marginLeft"), 10) || 0, 6226 top: parseInt(this.element.css("marginTop"), 10) || 0, 6227 right: parseInt(this.element.css("marginRight"), 10) || 0, 6228 bottom: parseInt(this.element.css("marginBottom"), 10) || 0 6229 } 6230 }, 6231 _cacheHelperProportions: function() { 6232 this.helperProportions = { 6233 width: this.helper.outerWidth(), 6234 height: this.helper.outerHeight() 6235 } 6236 }, 6237 _setContainment: function() { 6238 var t = this.options; 6239 t.containment == "parent" && (t.containment = this.helper[0].parentNode); 6240 if (t.containment == "document" || t.containment == "window") this.containment = [t.containment == "document" ? 0 : e(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, t.containment == "document" ? 0 : e(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, (t.containment == "document" ? 0 : e(window).scrollLeft()) + e(t.containment == "document" ? document : window).width() - this.helperProportions.width - this.margins.left, (t.containment == "document" ? 0 : e(window).scrollTop()) + (e(t.containment == "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]; 6241 if (!/^(document|window|parent)$/.test(t.containment) && t.containment.constructor != Array) { 6242 var n = e(t.containment), 6243 r = n[0]; 6244 if (!r) return; 6245 var i = n.offset(), 6246 s = e(r).css("overflow") != "hidden"; 6247 this.containment = [(parseInt(e(r).css("borderLeftWidth"), 10) || 0) + (parseInt(e(r).css("paddingLeft"), 10) || 0), (parseInt(e(r).css("borderTopWidth"), 10) || 0) + (parseInt(e(r).css("paddingTop"), 10) || 0), (s ? Math.max(r.scrollWidth, r.offsetWidth) : r.offsetWidth) - (parseInt(e(r).css("borderLeftWidth"), 10) || 0) - (parseInt(e(r).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, (s ? Math.max(r.scrollHeight, r.offsetHeight) : r.offsetHeight) - (parseInt(e(r).css("borderTopWidth"), 10) || 0) - (parseInt(e(r).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom], this.relative_container = n 6248 } else t.containment.constructor == Array && (this.containment = t.containment) 6249 }, 6250 _convertPositionTo: function(t, n) { 6251 n || (n = this.position); 6252 var r = t == "absolute" ? 1 : -1, 6253 i = this.options, 6254 s = this.cssPosition != "absolute" || this.scrollParent[0] != document && !! e.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent, 6255 o = /(html|body)/i.test(s[0].tagName); 6256 return { 6257 top: n.top + this.offset.relative.top * r + this.offset.parent.top * r - (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : o ? 0 : s.scrollTop()) * r, 6258 left: n.left + this.offset.relative.left * r + this.offset.parent.left * r - (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : o ? 0 : s.scrollLeft()) * r 6259 } 6260 }, 6261 _generatePosition: function(t) { 6262 var n = this.options, 6263 r = this.cssPosition != "absolute" || this.scrollParent[0] != document && !! e.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent, 6264 i = /(html|body)/i.test(r[0].tagName), 6265 s = t.pageX, 6266 o = t.pageY; 6267 if (this.originalPosition) { 6268 var u; 6269 if (this.containment) { 6270 if (this.relative_container) { 6271 var a = this.relative_container.offset(); 6272 u = [this.containment[0] + a.left, this.containment[1] + a.top, this.containment[2] + a.left, this.containment[3] + a.top] 6273 } else u = this.containment; 6274 t.pageX - this.offset.click.left < u[0] && (s = u[0] + this.offset.click.left), t.pageY - this.offset.click.top < u[1] && (o = u[1] + this.offset.click.top), t.pageX - this.offset.click.left > u[2] && (s = u[2] + this.offset.click.left), t.pageY - this.offset.click.top > u[3] && (o = u[3] + this.offset.click.top) 6275 } 6276 if (n.grid) { 6277 var f = n.grid[1] ? this.originalPageY + Math.round((o - this.originalPageY) / n.grid[1]) * n.grid[1] : this.originalPageY; 6278 o = u ? f - this.offset.click.top < u[1] || f - this.offset.click.top > u[3] ? f - this.offset.click.top < u[1] ? f + n.grid[1] : f - n.grid[1] : f : f; 6279 var l = n.grid[0] ? this.originalPageX + Math.round((s - this.originalPageX) / n.grid[0]) * n.grid[0] : this.originalPageX; 6280 s = u ? l - this.offset.click.left < u[0] || l - this.offset.click.left > u[2] ? l - this.offset.click.left < u[0] ? l + n.grid[0] : l - n.grid[0] : l : l 6281 } 6282 } 6283 return { 6284 top: o - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : i ? 0 : r.scrollTop()), 6285 left: s - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : i ? 0 : r.scrollLeft()) 6286 } 6287 }, 6288 _clear: function() { 6289 this.helper.removeClass("ui-draggable-dragging"), this.helper[0] != this.element[0] && !this.cancelHelperRemoval && this.helper.remove(), this.helper = null, this.cancelHelperRemoval = !1 6290 }, 6291 _trigger: function(t, n, r) { 6292 return r = r || this._uiHash(), e.ui.plugin.call(this, t, [n, r]), t == "drag" && (this.positionAbs = this._convertPositionTo("absolute")), e.Widget.prototype._trigger.call(this, t, n, r) 6293 }, 6294 plugins: {}, 6295 _uiHash: function(e) { 6296 return { 6297 helper: this.helper, 6298 position: this.position, 6299 originalPosition: this.originalPosition, 6300 offset: this.positionAbs 6301 } 6302 } 6303 }), e.ui.plugin.add("draggable", "connectToSortable", { 6304 start: function(t, n) { 6305 var r = e(this).data("draggable"), 6306 i = r.options, 6307 s = e.extend({}, n, { 6308 item: r.element 6309 }); 6310 r.sortables = [], e(i.connectToSortable).each(function() { 6311 var n = e.data(this, "sortable"); 6312 n && !n.options.disabled && (r.sortables.push({ 6313 instance: n, 6314 shouldRevert: n.options.revert 6315 }), n.refreshPositions(), n._trigger("activate", t, s)) 6316 }) 6317 }, 6318 stop: function(t, n) { 6319 var r = e(this).data("draggable"), 6320 i = e.extend({}, n, { 6321 item: r.element 6322 }); 6323 e.each(r.sortables, function() { 6324 this.instance.isOver ? (this.instance.isOver = 0, r.cancelHelperRemoval = !0, this.instance.cancelHelperRemoval = !1, this.shouldRevert && (this.instance.options.revert = !0), this.instance._mouseStop(t), this.instance.options.helper = this.instance.options._helper, r.options.helper == "original" && this.instance.currentItem.css({ 6325 top: "auto", 6326 left: "auto" 6327 })) : (this.instance.cancelHelperRemoval = !1, this.instance._trigger("deactivate", t, i)) 6328 }) 6329 }, 6330 drag: function(t, n) { 6331 var r = e(this).data("draggable"), 6332 i = this, 6333 s = function(t) { 6334 var n = this.offset.click.top, 6335 r = this.offset.click.left, 6336 i = this.positionAbs.top, 6337 s = this.positionAbs.left, 6338 o = t.height, 6339 u = t.width, 6340 a = t.top, 6341 f = t.left; 6342 return e.ui.isOver(i + n, s + r, a, f, o, u) 6343 }; 6344 e.each(r.sortables, function(s) { 6345 var o = !1, 6346 u = this; 6347 this.instance.positionAbs = r.positionAbs, this.instance.helperProportions = r.helperProportions, this.instance.offset.click = r.offset.click, this.instance._intersectsWith(this.instance.containerCache) && (o = !0, e.each(r.sortables, function() { 6348 return this.instance.positionAbs = r.positionAbs, this.instance.helperProportions = r.helperProportions, this.instance.offset.click = r.offset.click, this != u && this.instance._intersectsWith(this.instance.containerCache) && e.ui.contains(u.instance.element[0], this.instance.element[0]) && (o = !1), o 6349 })), o ? (this.instance.isOver || (this.instance.isOver = 1, this.instance.currentItem = e(i).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item", !0), this.instance.options._helper = this.instance.options.helper, this.instance.options.helper = function() { 6350 return n.helper[0] 6351 }, t.target = this.instance.currentItem[0], this.instance._mouseCapture(t, !0), this.instance._mouseStart(t, !0, !0), this.instance.offset.click.top = r.offset.click.top, this.instance.offset.click.left = r.offset.click.left, this.instance.offset.parent.left -= r.offset.parent.left - this.instance.offset.parent.left, this.instance.offset.parent.top -= r.offset.parent.top - this.instance.offset.parent.top, r._trigger("toSortable", t), r.dropped = this.instance.element, r.currentItem = r.element, this.instance.fromOutside = r), this.instance.currentItem && this.instance._mouseDrag(t)) : this.instance.isOver && (this.instance.isOver = 0, this.instance.cancelHelperRemoval = !0, this.instance.options.revert = !1, this.instance._trigger("out", t, this.instance._uiHash(this.instance)), this.instance._mouseStop(t, !0), this.instance.options.helper = this.instance.options._helper, this.instance.currentItem.remove(), this.instance.placeholder && this.instance.placeholder.remove(), r._trigger("fromSortable", t), r.dropped = !1) 6352 }) 6353 } 6354 }), e.ui.plugin.add("draggable", "cursor", { 6355 start: function(t, n) { 6356 var r = e("body"), 6357 i = e(this).data("draggable").options; 6358 r.css("cursor") && (i._cursor = r.css("cursor")), r.css("cursor", i.cursor) 6359 }, 6360 stop: function(t, n) { 6361 var r = e(this).data("draggable").options; 6362 r._cursor && e("body").css("cursor", r._cursor) 6363 } 6364 }), e.ui.plugin.add("draggable", "opacity", { 6365 start: function(t, n) { 6366 var r = e(n.helper), 6367 i = e(this).data("draggable").options; 6368 r.css("opacity") && (i._opacity = r.css("opacity")), r.css("opacity", i.opacity) 6369 }, 6370 stop: function(t, n) { 6371 var r = e(this).data("draggable").options; 6372 r._opacity && e(n.helper).css("opacity", r._opacity) 6373 } 6374 }), e.ui.plugin.add("draggable", "scroll", { 6375 start: function(t, n) { 6376 var r = e(this).data("draggable"); 6377 r.scrollParent[0] != document && r.scrollParent[0].tagName != "HTML" && (r.overflowOffset = r.scrollParent.offset()) 6378 }, 6379 drag: function(t, n) { 6380 var r = e(this).data("draggable"), 6381 i = r.options, 6382 s = !1; 6383 if (r.scrollParent[0] != document && r.scrollParent[0].tagName != "HTML") { 6384 if (!i.axis || i.axis != "x") r.overflowOffset.top + r.scrollParent[0].offsetHeight - t.pageY < i.scrollSensitivity ? r.scrollParent[0].scrollTop = s = r.scrollParent[0].scrollTop + i.scrollSpeed : t.pageY - r.overflowOffset.top < i.scrollSensitivity && (r.scrollParent[0].scrollTop = s = r.scrollParent[0].scrollTop - i.scrollSpeed); 6385 if (!i.axis || i.axis != "y") r.overflowOffset.left + r.scrollParent[0].offsetWidth - t.pageX < i.scrollSensitivity ? r.scrollParent[0].scrollLeft = s = r.scrollParent[0].scrollLeft + i.scrollSpeed : t.pageX - r.overflowOffset.left < i.scrollSensitivity && (r.scrollParent[0].scrollLeft = s = r.scrollParent[0].scrollLeft - i.scrollSpeed) 6386 } else { 6387 if (!i.axis || i.axis != "x") t.pageY - e(document).scrollTop() < i.scrollSensitivity ? s = e(document).scrollTop(e(document).scrollTop() - i.scrollSpeed) : e(window).height() - (t.pageY - e(document).scrollTop()) < i.scrollSensitivity && (s = e(document).scrollTop(e(document).scrollTop() + i.scrollSpeed)); 6388 if (!i.axis || i.axis != "y") t.pageX - e(document).scrollLeft() < i.scrollSensitivity ? s = e(document).scrollLeft(e(document).scrollLeft() - i.scrollSpeed) : e(window).width() - (t.pageX - e(document).scrollLeft()) < i.scrollSensitivity && (s = e(document).scrollLeft(e(document).scrollLeft() + i.scrollSpeed)) 6389 } 6390 s !== !1 && e.ui.ddmanager && !i.dropBehaviour && e.ui.ddmanager.prepareOffsets(r, t) 6391 } 6392 }), e.ui.plugin.add("draggable", "snap", { 6393 start: function(t, n) { 6394 var r = e(this).data("draggable"), 6395 i = r.options; 6396 r.snapElements = [], e(i.snap.constructor != String ? i.snap.items || ":data(draggable)" : i.snap).each(function() { 6397 var t = e(this), 6398 n = t.offset(); 6399 this != r.element[0] && r.snapElements.push({ 6400 item: this, 6401 width: t.outerWidth(), 6402 height: t.outerHeight(), 6403 top: n.top, 6404 left: n.left 6405 }) 6406 }) 6407 }, 6408 drag: function(t, n) { 6409 var r = e(this).data("draggable"), 6410 i = r.options, 6411 s = i.snapTolerance, 6412 o = n.offset.left, 6413 u = o + r.helperProportions.width, 6414 a = n.offset.top, 6415 f = a + r.helperProportions.height; 6416 for (var l = r.snapElements.length - 1; l >= 0; l--) { 6417 var c = r.snapElements[l].left, 6418 h = c + r.snapElements[l].width, 6419 p = r.snapElements[l].top, 6420 d = p + r.snapElements[l].height; 6421 if (!(c - s < o && o < h + s && p - s < a && a < d + s || c - s < o && o < h + s && p - s < f && f < d + s || c - s < u && u < h + s && p - s < a && a < d + s || c - s < u && u < h + s && p - s < f && f < d + s)) { 6422 r.snapElements[l].snapping && r.options.snap.release && r.options.snap.release.call(r.element, t, e.extend(r._uiHash(), { 6423 snapItem: r.snapElements[l].item 6424 })), r.snapElements[l].snapping = !1; 6425 continue 6426 } 6427 if (i.snapMode != "inner") { 6428 var v = Math.abs(p - f) <= s, 6429 m = Math.abs(d - a) <= s, 6430 g = Math.abs(c - u) <= s, 6431 y = Math.abs(h - o) <= s; 6432 v && (n.position.top = r._convertPositionTo("relative", { 6433 top: p - r.helperProportions.height, 6434 left: 0 6435 }).top - r.margins.top), m && (n.position.top = r._convertPositionTo("relative", { 6436 top: d, 6437 left: 0 6438 }).top - r.margins.top), g && (n.position.left = r._convertPositionTo("relative", { 6439 top: 0, 6440 left: c - r.helperProportions.width 6441 }).left - r.margins.left), y && (n.position.left = r._convertPositionTo("relative", { 6442 top: 0, 6443 left: h 6444 }).left - r.margins.left) 6445 } 6446 var b = v || m || g || y; 6447 if (i.snapMode != "outer") { 6448 var v = Math.abs(p - a) <= s, 6449 m = Math.abs(d - f) <= s, 6450 g = Math.abs(c - o) <= s, 6451 y = Math.abs(h - u) <= s; 6452 v && (n.position.top = r._convertPositionTo("relative", { 6453 top: p, 6454 left: 0 6455 }).top - r.margins.top), m && (n.position.top = r._convertPositionTo("relative", { 6456 top: d - r.helperProportions.height, 6457 left: 0 6458 }).top - r.margins.top), g && (n.position.left = r._convertPositionTo("relative", { 6459 top: 0, 6460 left: c 6461 }).left - r.margins.left), y && (n.position.left = r._convertPositionTo("relative", { 6462 top: 0, 6463 left: h - r.helperProportions.width 6464 }).left - r.margins.left) 6465 }!r.snapElements[l].snapping && (v || m || g || y || b) && r.options.snap.snap && r.options.snap.snap.call(r.element, t, e.extend(r._uiHash(), { 6466 snapItem: r.snapElements[l].item 6467 })), r.snapElements[l].snapping = v || m || g || y || b 6468 } 6469 } 6470 }), e.ui.plugin.add("draggable", "stack", { 6471 start: function(t, n) { 6472 var r = e(this).data("draggable").options, 6473 i = e.makeArray(e(r.stack)).sort(function(t, n) { 6474 return (parseInt(e(t).css("zIndex"), 10) || 0) - (parseInt(e(n).css("zIndex"), 10) || 0) 6475 }); 6476 if (!i.length) return; 6477 var s = parseInt(i[0].style.zIndex) || 0; 6478 e(i).each(function(e) { 6479 this.style.zIndex = s + e 6480 }), this[0].style.zIndex = s + i.length 6481 } 6482 }), e.ui.plugin.add("draggable", "zIndex", { 6483 start: function(t, n) { 6484 var r = e(n.helper), 6485 i = e(this).data("draggable").options; 6486 r.css("zIndex") && (i._zIndex = r.css("zIndex")), r.css("zIndex", i.zIndex) 6487 }, 6488 stop: function(t, n) { 6489 var r = e(this).data("draggable").options; 6490 r._zIndex && e(n.helper).css("zIndex", r._zIndex) 6491 } 6492 }) 6493})(jQuery); 6494$(function(e) { 6495 var a = e.cookie("o") || "pevc", 6496 b = e("#yM").toggleClass("on", a.search(/v/) != -1).click(function() { 6497 var p = e(this), 6498 o = p.hasClass("on"); 6499 if (o) { 6500 return 6501 } 6502 e(this).addClass("on"); 6503 i.removeClass("H").addClass("I"); 6504 f.removeClass("on"); 6505 m(); 6506 e(window).resize() 6507 }), 6508 f = e("#xL").toggleClass("on", a.search(/v/) === -1).click(function() { 6509 var p = e(this), 6510 o = p.hasClass("on"); 6511 if (o) { 6512 return 6513 } 6514 p.addClass("on"); 6515 i.addClass("H").removeClass("I"); 6516 b.removeClass("on"); 6517 m(); 6518 e(window).resize() 6519 }), 6520 k = e("#cR").toggleClass("on", a.search(/c/) != -1).click(function() { 6521 var o = e(this).toggleClass("on").hasClass("on"); 6522 n.toggleClass("color", o); 6523 m() 6524 }), 6525 l = e("#bQ").toggleClass("on", a.search(/t/) != -1).click(function() { 6526 var o = e(this).toggleClass("on").hasClass("on"); 6527 n.toggleClass("bQ", o); 6528 m() 6529 }), 6530 g = e("#aP").toggleClass("on", a.search(/i/) != -1).click(function() { 6531 var o = e(this).toggleClass("on").hasClass("on"); 6532 n.toggleClass("aP", o); 6533 m() 6534 }), 6535 h = e("#zN").toggleClass("on", a.search(/C/) != -1).click(function() { 6536 var o = e(this).toggleClass("on").hasClass("on"); 6537 n.toggleClass("compact", o); 6538 m() 6539 }), 6540 c = e("#gV").toggleClass("on", a.search(/p/) != -1).toggleClass("inactive", a.search(/e/) == -1).click(function() { 6541 if (!j.hasClass("on")) { 6542 return 6543 } 6544 var o = e(this).toggleClass("on").hasClass("on"); 6545 n.toggleClass("R", !o); 6546 j.toggleClass("inactive", !o); 6547 m(); 6548 d.click() 6549 }), 6550 j = e("#jY").toggleClass("on", a.search(/e/) != -1).toggleClass("inactive", a.search(/p/) == -1).click(function() { 6551 if (!c.hasClass("on")) { 6552 return 6553 } 6554 var o = e(this).toggleClass("on").hasClass("on"); 6555 n.toggleClass("S", !o); 6556 c.toggleClass("inactive", !o); 6557 m(); 6558 d.click() 6559 }), 6560 i = e(".N").toggleClass("H", !b.hasClass("on")).toggleClass("I", b.hasClass("on")), 6561 d = e("#eT"), 6562 n = e("#fU").toggleClass("R", !c.hasClass("on")).toggleClass("S", !j.hasClass("on")).toggleClass("compact", h.hasClass("on")).toggleClass("color", k.hasClass("on")).toggleClass("aP", g.hasClass("on")).toggleClass("bQ", l.hasClass("on")); 6563 6564 function m() { 6565 e.cookie("o", (c.hasClass("on") ? "p" : "") + (j.hasClass("on") ? "e" : "") + (b.hasClass("on") ? "v" : "") + (l.hasClass("on") ? "t" : "") + (g.hasClass("on") ? "i" : "") + (k.hasClass("on") ? "c" : "") + (h.hasClass("on") ? "C" : ""), { 6566 path: "/", 6567 expires: 90 6568 }) 6569 } 6570 setTimeout(function() { 6571 e(".O").click(function() { 6572 e.get(e(this).data("json"), function(o) {
6573 e("#eT").val(o).click() 6574 }, "text") 6575 }); 6576 e(".n").click(function(o) { 6577 if (e(this).is(".k")) { 6578 if (e(o.target).closest(".j").length === 0) { 6579 e(this).removeClass("k") 6580 } 6581 } else { 6582 e(".n").removeClass("k"); 6583 e(this).addClass("k"); 6584 o.stopPropagation(); 6585 e("body").bind("click.dropdown", function(p) { 6586 if (e(p.target).closest(".j").length === 0) { 6587 e(".n").removeClass("k"); 6588 e("body").unbind("click.dropdown") 6589 } 6590 }) 6591 } 6592 }) 6593 }, 0) 6594}); 6595$(function() { 6596 var e = "H", 6597 u = function() { 6598 var y = false; 6599 u = function() { 6600 var A = c, 6601 z = j - q - c - d - b + 20; 6602 h.css("top", q - 20); 6603 l.outerHeight(A - 20); 6604 if (z === -20) { 6605 if (!y) { 6606 p.hide(); 6607 y = true 6608 } 6609 } else { 6610 if (y) { 6611 p.show(); 6612 y = false 6613 } 6614 p.outerHeight(z) 6615 } 6616 m.outerHeight(z - m.position().top - 2); 6617 $.cookie("y", "" + A, { 6618 path: "/" 6619 }) 6620 }; 6621 u() 6622 }, 6623 r = function() { 6624 var y = false; 6625 r = function() { 6626 var D = v, 6627 B = w - v - k, 6628 A = j - q - b; 6629 h.css("top", q).css("width", ""); 6630 l.outerWidth(D - 20); 6631 if (B === 0) { 6632 if (!y) { 6633 p.hide(); 6634 y = true 6635 } 6636 } else { 6637 if (y) { 6638 p.show(); 6639 y = false 6640 } 6641 p.outerWidth(B - 20) 6642 } 6643 var z = p.hasClass("R") || p.hasClass("S") ? 1 : 2, 6644 C = Math.floor(a.outerWidth() / z); 6645 o.eq(0).outerWidth(C); 6646 o.eq(2).outerWidth(C); 6647 o.eq(3).outerWidth(C - 1); 6648 m.outerHeight(A - m.position().top - 2); 6649 $.cookie("x", "" + D, { 6650 path: "/" 6651 }) 6652 }; 6653 r() 6654 }, 6655 h = $(".N"), 6656 l = $(".J", h), 6657 p = $(".K", h), 6658 m = $(".L", p), 6659 g = $(".F", p), 6660 f = $(".y", p), 6661 a = $(".E", p), 6662 o = $(".C"), 6663 x = $(".M", h).mousedown(function() { 6664 x.addClass("G") 6665 }).mouseout(function() { 6666 x.removeClass("G") 6667 }).mouseup(function() { 6668 x.removeClass("G") 6669 }), 6670 d = x.outerHeight(), 6671 k = x.outerWidth(), 6672 v = -1, 6673 c = -1, 6674 i = $(".a"), 6675 q = -1, 6676 s = $(".r"), 6677 b = -1, 6678 j = -1, 6679 w = -1, 6680 n = $(window).resize(function() { 6681 var subHeight = 285; 6682 6683 if(top_ayr) 6684 { 6685 return; 6686 } 6687 top_ayr=1; 6688 6689 6690 var A = h.hasClass("H") ? "ns" : "ew"; 6691 if (e !== A) { 6692 t(A) 6693 } 6694 switch (A) { 6695 case "ew": 6696 var G = $(this).height()-subHeight, 6697 F = $('.container').width() //;$(this).width(), 6698 H = i.outerHeight(), 6699 B = s.outerHeight(), 6700 I = F !== w, 6701 D = G !== j, 6702 z = H !== q, 6703 E = B !== b; 6704 if (v === -1) { 6705 v = $("body").hasClass("posted") ? 0 : $.cookie("x") ? Number($.cookie("x")) : Math.floor(F / 2.6); 6706 x.css("left", v) 6707 } else { 6708 if (I) { 6709 v = Math.floor(v * F / w); 6710 x.css("left", v) 6711 } 6712 } 6713 j = G; 6714 w = F; 6715 q = H; 6716 b = B; 6717 h.add(l).outerHeight(j - q - b); 6718 r(); 6719 break; 6720 case "ns": 6721 var G = $(this).height()-subHeight, 6722 F = $(this).width(), 6723 H = i.outerHeight(), 6724 B = s.outerHeight(), 6725 I = F !== w, 6726 D = G !== j, 6727 z = H !== q, 6728 E = B !== b; 6729 if (c === -1) { 6730 c = $.cookie("y") ? Number($.cookie("y")) : (G - H - B) / 2.5; 6731 x.css("top", c) 6732 } else { 6733 if (D) { 6734 c = c * (G - B) / (j - b); 6735 x.css("top", c) 6736 } 6737 } 6738 j = G; 6739 w = F; 6740 q = H; 6741 b = B; 6742 if (I) { 6743 h.width(w - 42); 6744 var C = p.hasClass("R") || p.hasClass("S") ? 1 : 2, 6745 y = Math.floor(a.innerWidth() / C); 6746 o.not(":eq(1)").outerWidth(y - 1); 6747 l.outerWidth(w - 40) 6748 } 6749 if (D || z || E) { 6750 h.height(j - q - b + 40); 6751 u() 6752 } 6753 } 6754 6755 console.log($('#split').height()); 6756 6757 $('#header').css('height',$('#split').height()); 6758 6759 }).resize(); 6760 6761 function t(y) { 6762 switch (y) { 6763 case "ew": 6764 x.draggable({ 6765 axis: "x", 6766 containment: ".N", 6767 cursor: "ew-resize", 6768 drag: function(z, A) { 6769 v = A.position.left; 6770 r() 6771 }, 6772 snap: ".N", 6773 snapMode: "inner", 6774 snapTolerance: 40 6775 }); 6776 h.addClass("I").removeClass("H"); 6777 break; 6778 case "ns": 6779 default: 6780 x.draggable({ 6781 axis: "y", 6782 containment: ".N", 6783 cursor: "ns-resize", 6784 drag: function(z, A) { 6785 c = A.position.top; 6786 u() 6787 }, 6788 snap: ".N", 6789 snapMode: "inner", 6790 snapTolerance: 40 6791 }); 6792 h.addClass("H").removeClass("I") 6793 } 6794 e = y; 6795 l.add(p).add(x).removeAttr("style"); 6796 v = -1; 6797 c = -1; 6798 j = -1; 6799 w = -1; 6800 d = x.outerHeight(); 6801 k = x.outerWidth() 6802 } 6803}); 6804$(function() { 6805 setTimeout(function() { 6806 var c = ''; 6807 $("#header > b").css("margin-right", 30).after(c); 6808 $("#support-it,#donate").hide(); 6809 $("#nC").show(5000); 6810 $("#support-it").delay(7000).show(1000); 6811 $("#donate").delay(9500).show(800) 6812 }, 4000 + Math.random() * 5000); 6813 $(".s").click(function(d) { 6814 var c = $(this).attr("rel"); 6815 if ($("#popup-" + c).length > 0) { 6816 return 6817 } 6818 $.get("form-" + c + ".html", function(f) { 6819 $("#footer").after(f); 6820 if (c == "contact") { 6821 $.getScript("contact.js") 6822 } 6823 var i = $(window), 6824 g = i.width(), 6825 e = i.height(), 6826 h = $("#popup-" + c); 6827 h.draggable().css("z-index", b() + 1).offset({ 6828 left: (g - h.width()) / 2, 6829 top: (e - h.height()) / 2 6830 }).mousedown(function() { 6831 var j = $(this).css("z-index"); 6832 $(this).css("z-index", b() + 1) 6833 }); 6834 $(".u", h).add(".t", h).click(function() { 6835 h.remove() 6836 }) 6837 }, "text"); 6838 d.preventDefault() 6839 }); 6840 $(window).keydown(function(c) { 6841 if (c.keyCode == "27") { 6842 var d = a(); 6843 if (d) { 6844 d.remove() 6845 } 6846 c.preventDefault() 6847 } 6848 }); 6849 6850 function a() { 6851 var d = 2001, 6852 c; 6853 $(".v").each(function() { 6854 var e = $(this).css("z-index"); 6855 if (e > d) { 6856 d = Number(e); 6857 c = $(this) 6858 } 6859 }); 6860 return c 6861 } 6862 function b() { 6863 var c = a(); 6864 return (c) ? Number(c.css("z-index")) : 2001 6865 } 6866}); 6867$(function(d) { 6868 var D = d.cookie("o") || "pecT", 6869 w = d("body"), 6870 G = "online", 6871 a = d("#eT").keyup(function() { 6872 j("keyup") 6873 }).click(function() { 6874 j("click") 6875 }).select().focus(), 6876 r = d("#iX"), 6877 B = d("#hW"), 6878 n = d("#lA"), 6879 k = d("#kZ"), 6880 f = r.add(n), 6881 l = d("#gV"), 6882 u = d("#jY"), 6883 s = "/", 6884 g = a.hasClass("posted"), 6885 c = D.search(/e/) != -1, 6886 h = "fr", 6887 p = 100, 6888 b = "parser", 6889 v = d("html"), 6890 o = d(window), 6891 q = ".", 6892 i = d("#favicon"), 6893 y = d("#footer"), 6894 A = "json", 6895 z = "object", 6896 m = "array", 6897 C = "string", 6898 F = "number", 6899 e = "boolean", 6900 x = "http:" + s + s + A + q + b + q + G + q + h + s; 6901 if ((document.location + "").search(x) !== 0) { 6902 d = null; 6903 return 6904 } 6905 6906 d(".P").delegate(".toggle", "click", function() { 6907 var H = d(this).parent(); 6908 if (H.length == 0) { 6909 H = d(this).closest(".P") 6910 } 6911 H.toggleClass("collapsed"); 6912 return false 6913 }); 6914 6915 function t(I) { 6916 function H(J) { 6917 function K(O) { 6918 if (O === null) { 6919 return "null" 6920 } 6921 if (typeof(O) === "object" && O.length) { 6922 return "array" 6923 } 6924 return typeof O 6925 } 6926 function N(O, Q, T) { 6927 var P = "", 6928 S, R; 6929 for (R in O) { 6930 if (O.hasOwnProperty(R)) { 6931 if (P !== "") { 6932 P += T 6933 } 6934 S = O[R]; 6935 if (S === undefined) { 6936 S = null 6937 } 6938 if (Q !== "array") { 6939 P += '<span class="property">'; 6940 P += (Q === "object") ? '"<span class="p">' + R + '</span>"</span>:' : '<span class="p">' + R + "</span></span>:" 6941 } 6942 P += H(S) 6943 } 6944 } 6945 return P 6946 } 6947 var M = "", 6948 L = K(J); 6949 switch (L) { 6950 case "object": 6951 M = '<span class="' + L + '"><span class="toggle">{</span><ul><li>' + N(J, L, ",</li><li>") + '</li></ul><span class="toggle-end">}</span></span>'; 6952 break; 6953 case "array": 6954 M = '<span class="' + L + '"><span class="toggle">[</span><ol><li>' + N(J, L, ",</li><li>") + '</li></ol><span class="toggle-end" card="' + J.length + '">]</span></span>'; 6955 break; 6956 case "null": 6957 M = '<span class="' + L + '">' + L + "</span>"; 6958 break; 6959 case "string": 6960 M = '<span class="' + L + '">"' + J + '"</span>'; 6961 break; 6962 default: 6963 M = '<span class="' + L + '">' + J + "</span>"; 6964 break 6965 } 6966 return M 6967 } 6968 return H(I) 6969 } 6970 function E(O) { 6971 function I(T) { 6972 return Q(J(T)) 6973 } 6974 function J(T) { 6975 return T.replace(/\s+$/g, "") 6976 } 6977 function Q(T) { 6978 return T.replace(/^\s+/g, "") 6979 } 6980 function K() { 6981 var V = 0, 6982 U, T; 6983 do { 6984 V = N.indexOf('"', V + 1), U = 0, T = 1; 6985 do { 6986 if (N.substring(V - T, V - T + 1) === "\\") { 6987 U = U + 1; 6988 T++; 6989 continue 6990 } 6991 break 6992 } while (true); 6993 if (U % 2 === 0) { 6994 break 6995 } 6996 } while (true); 6997 return V 6998 } 6999 function L(U) { 7000 function T(X) { 7001 function V(ac) { 7002 var aa, Z, Y, ab = ac.substring(0, 1); 7003 ac.update(""); 7004 if (ab === '"') { 7005 aa = ac.shift(K(ac.todo) + 1); 7006 if (aa.search(/\\u(?![\d|A-F|a-f]{4})/g) !== -1) { 7007 return ac.err("\\u must be followed by 4 hexadecimal characters", aa) 7008 } 7009 length = aa.length; 7010 for (Y = 0; Y < length; Y++) { 7011 if (aa.substring(Y, Y + 1) == "\\") { 7012 if (Y + 1 < length) { 7013 Y++; 7014 if (!aa.substring(Y, Y + 1).search(/[^\"|\\|\/|b|f|n|r|t|u]/)) { 7015 return ac.err("Backslash must be escaped", aa) 7016 } 7017 } 7018 } 7019 } 7020 return ac.update('<span class="property">"<span class="p">' + aa.substring(1, aa.length - 1) + '</span>"</span>') 7021 } 7022 aa = ac.shift(ac.indexOf(":")); 7023 return ac.err("Name property must be a String wrapped in double quotes.", aa) 7024 } 7025 function W(Y) { 7026 if (Y.substring(0, 1) !== ":") { 7027 Y.err("Semi-column is missing.", Y.shift(Y.indexOf(":"))) 7028 } 7029 return Y.swap(1) 7030 } 7031 X.update("<li>"); 7032 if (X.substring(0, 1) === "}") { 7033 return X.update("</li>") 7034 } 7035 X = V(X); 7036 X = W(X); 7037 X = M(X, "}"); 7038 if (X.substring(0, 1) === ",") { 7039 X.swap(1).update("</li>"); 7040 return T(X) 7041 } 7042 if (X.substring(0, 1) === "}") { 7043 return X.update("</li>") 7044 } 7045 return X.err("Comma is missing", X.shift(X.indexOf("}"))).update("</li>") 7046 } 7047 if (U.indexOf("{") === -1) { 7048 U.err("Opening brace is missing", U.todo); 7049 return U.update("", "") 7050 } else { 7051 U.shift(1); 7052 U.update('<span class="object"><span class="toggle">{</span><ul>'); 7053 U = T(U).update("</ul>"); 7054 if (U.indexOf("}") === -1) { 7055 U.err("Closing brace is missing", U.todo); 7056 return U.update("", "") 7057 } 7058 return U.span("toggle-end", U.shift(1)) 7059 } 7060 } 7061 function H(U) { 7062 var V = 0; 7063 7064 function T(X, W) { 7065 X.update("<li>"); 7066 X = M(X, "]"); 7067 if (X.substring(0, 1) === ",") { 7068 X.swap(1).update("</li>"); 7069 return T(X, ++V) 7070 } 7071 if (X.substring(0, 1) === "]") { 7072 return X.update("</li>") 7073 } 7074 return X.err("Comma is missing", X.shift(X.search(/(,|\])/))).update("</li>") 7075 } 7076 if (U.indexOf("[") === -1) { 7077 U.err("Opening square bracket is missing", U.todo); 7078 return U.update("", "") 7079 } 7080 U.shift(1); 7081 U.update('<span class="array">'); 7082 U.update('<span class="toggle">[</span><ol>'); 7083 if (U.indexOf("]") === 0) { 7084 U.shift(1); 7085 U.update('</ol><span class="toggle-end" card="0">]</span>'); 7086 return U.update("</span>") 7087 } 7088 U = T(U, 0); 7089 if (U.indexOf("]") === -1) { 7090 U.err("Closing square bracket is missing", U.todo); 7091 U.update('</ol><span class="toggle-end" card="' + (V + 1) + '"></span>'); 7092 return U.update("</span>") 7093 } 7094 U.shift(1); 7095 U.update('</ol><span class="toggle-end" card="' + (V + 1) + '">]</span>'); 7096 return U.update("</span>") 7097 } 7098 function M(Z, U) { 7099 var ab, X, V, T, W, aa = ""; 7100 if (Z.search(/^(")/) === 0) { 7101 ab = Z.shift(K(Z.todo) + 1); 7102 if (ab.search(/\\u(?![\d|A-F|a-f]{4})/g) !== -1) { 7103 return Z.err("\\u must be followed by 4 hexadecimal characters", ab) 7104 } 7105 T = ab.length; 7106 for (V = 0; V < T; V++) { 7107 if (ab.substring(V, V + 1) == "\\") { 7108 if (V + 1 < T) { 7109 V++; 7110 if (!ab.substring(V, V + 1).search(/[^\"|\\|\/|b|f|n|r|t|u]/)) { 7111 return Z.err("Backslash must be escaped", ab) 7112 } 7113 } 7114 } 7115 } 7116 return Z.span("string", ab) 7117 } 7118 if (Z.search(/^\{/) === 0) { 7119 return L(Z) 7120 } 7121 if (Z.search(/^\[/) === 0) { 7122 return H(Z) 7123 } 7124 X = Z.search(new RegExp("(,|" + U + ")")); 7125 if (X === -1) { 7126 X = Z.todo.length - 1; 7127 W = J(Z.todo); 7128 Z.update("", "") 7129 } else { 7130 W = J(Z.shift(X)) 7131 } 7132 try { 7133 aa = typeof $.parseJSON(W) 7134 } catch (Y) {} 7135 switch (aa) { 7136 case "boolean": 7137 case "number": 7138 return Z.span(aa, W); 7139 default: 7140 if (W === "null") { 7141 return Z.span("null", W) 7142 } else { 7143 if (W.search(/^(')/) === 0) { 7144 return Z.err("String must be wrapped in double quotes", W) 7145 } 7146 return Z.err("Unknown type", W) 7147 } 7148 } 7149 } 7150 var P = false, 7151 R = function(T) { 7152 this.done = ""; 7153 this.todo = T ? T : ""; 7154 this.update = function(V, U) { 7155 if (V) { 7156 this.done += V 7157 } 7158 if (U !== undefined) { 7159 this.todo = Q(U) 7160 } 7161 return this 7162 }; 7163 this.swap = function(U) { 7164 if (U && !isNaN(Number(U)) && this.todo.length >= U) { 7165 this.update(this.todo.substr(0, U), this.todo.substring(U)) 7166 } 7167 return this 7168 }; 7169 this.toString = function() { 7170 if (this.todo.length !== 0) { 7171 this.err("Text after last closing brace.", this.todo) 7172 } 7173 return this.done 7174 }; 7175 this.span = function(U, V) { 7176 return this.update('<span class="' + U + '">' + V + "</span>") 7177 }; 7178 this.err = function(V, U) { 7179 P = true; 7180 return this.update('<span class="error" title="' + V + '">' + U + "</span>") 7181 }; 7182 this.shift = function(U) { 7183 var V; 7184 if (U && !isNaN(Number(U)) && this.todo.length >= U) { 7185 V = this.substring(0, U); 7186 this.update("", this.substring(U)); 7187 return J(V) 7188 } 7189 return "" 7190 }; 7191 this.indexOf = function(V, U) { 7192 if (U) { 7193 return this.todo.indexOf(V, U) 7194 } else { 7195 return this.todo.indexOf(V) 7196 } 7197 }; 7198 this.substring = function(U, V) { 7199 if (V) { 7200 return this.todo.substring(U, V) 7201 } else { 7202 return this.todo.substring(U) 7203 } 7204 }; 7205 this.search = function(U) { 7206 return this.todo.search(U) 7207 } 7208 }, 7209 N = new R(I(O)), 7210 S; 7211 if (Q(O).substr(0, 1) === "[") { 7212 S = { 7213 html: H(N).toString(), 7214 valid: !P 7215 } 7216 } else { 7217 if (Q(O).substr(0, 1) === "{") { 7218 S = { 7219 html: L(N).toString(), 7220 valid: !P 7221 } 7222 } else { 7223 S = { 7224 html: N.err("JSON expression must be an object or an array", O).update(null, "").toString(), 7225 valid: false 7226 } 7227 } 7228 } 7229 return S 7230 } 7231 function j(J) { 7232 var K = a.val(), 7233 I = '<link rel="icon" type="image/png" href="/favicon', 7234 H = '.png" id="favicon"/>'; 7235 if ($.trim(K) === "") { 7236 r.html(""); 7237 n.html(""); 7238 i.after(I + H).remove(); 7239 w.addClass("json-empty").removeClass("json-error"); 7240 B.html("String is empty"); 7241 k.html(" "); 7242 return 7243 } 7244 //K = unescape(K.replace(/\\u/g,'%u')); 7245 7246 w.removeClass("json-empty json-error"); 7247 K = K.replace(/</g, "<"); 7248 K = K.replace(/>/g, ">"); 7249 if (l.hasClass("on")) { 7250 setTimeout(function() { 7251 var M = E(K), 7252 N = $(M.html, document), 7253 L; 7254 N.find(".p").each(function() { 7255 if ($(this).closest("li").find("li").length !== 0) { 7256 $(this).addClass("collapsible") 7257 } 7258 }); 7259 r.html(N); 7260 if (M.valid) { 7261 i.after(I + H).remove(); 7262 B.html("String parse") 7263 } else { 7264 i.after(I + "ko" + H).remove(); 7265 L = M.html.match(/class="error"/g).length; 7266 B.html("å符串解æåº: <b>" + L + " é误" + (L > 1 ? "" : "") + ",详ç»è¯·çé»è²é¨å</b>"); 7267 w.addClass("json-error") 7268 } 7269 o.resize() 7270 }, 0) 7271 } else { 7272 r.html(""); 7273 B.html("") 7274 } 7275 if (u.hasClass("on")) { 7276 setTimeout(function() { 7277 try { 7278 var L = t($.parseJSON(K)), 7279 N = $(L, document); 7280 k.html("JS eval"); 7281 N.find(".p").each(function() { 7282 if ($(this).closest("li").find("li").length !== 0) { 7283 $(this).addClass("collapsible") 7284 } 7285 }); 7286 n.html(N) 7287 } catch (M) { 7288 n.html('<span class="error">' + M + "</span>"); 7289 k.html("JS eval <b>fails</b>"); 7290 w.addClass("json-error") 7291 } 7292 o.resize() 7293 }, 0) 7294 } else { 7295 n.html(""); 7296 k.html("") 7297 } 7298 } 7299 if (x.length !== 29) { 7300 d = null; 7301 return 7302 } 7303 j(); 7304}); 7305 7306 $(document).on("click",".toggle",function() { 7307 var H = $(this).parent(); 7308 if (H.length == 0) { 7309 H = $(this).closest(".P") 7310 } 7311 H.toggleClass("collapsed"); 7312 return false 7313 });
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.