vendor: 1,088 bytes, lines 1-24
1(() => { 2 var __create = Object.create; 3 var __defProp = Object.defineProperty; 4 var __getOwnPropDesc = Object.getOwnPropertyDescriptor; 5 var __getOwnPropNames = Object.getOwnPropertyNames; 6 var __getProtoOf = Object.getPrototypeOf; 7 var __hasOwnProp = Object.prototype.hasOwnProperty; 8 var __commonJS = (cb, mod) => function __require() { 9 return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; 10 }; 11 var __copyProps = (to, from, except, desc) => { 12 if (from && typeof from === "object" || typeof from === "function") { 13 for (let key of __getOwnPropNames(from)) 14 if (!__hasOwnProp.call(to, key) && key !== except) 15 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); 16 } 17 return to; 18 }; 19 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( 20 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, 21 mod 22 )); 23 24
vendor: 247,038 bytes, lines 24-6131
24// node_modules/jquery/dist/jquery.js 25 var require_jquery = __commonJS({ 26 "node_modules/jquery/dist/jquery.js"(exports, module) { 27 (function(global2, factory) { 28 "use strict"; 29 if (typeof module === "object" && typeof module.exports === "object") { 30 module.exports = global2.document ? factory(global2, true) : function(w) { 31 if (!w.document) { 32 throw new Error("jQuery requires a window with a document"); 33 } 34 return factory(w); 35 }; 36 } else { 37 factory(global2); 38 } 39 })(typeof window !== "undefined" ? window : exports, function(window2, noGlobal) { 40 "use strict"; 41 var arr = []; 42 var getProto = Object.getPrototypeOf; 43 var slice = arr.slice; 44 var flat = arr.flat ? function(array) { 45 return arr.flat.call(array); 46 } : function(array) { 47 return arr.concat.apply([], array); 48 }; 49 var push = arr.push; 50 var indexOf = arr.indexOf; 51 var class2type = {}; 52 var toString = class2type.toString; 53 var hasOwn = class2type.hasOwnProperty; 54 var fnToString = hasOwn.toString; 55 var ObjectFunctionString = fnToString.call(Object); 56 var support2 = {}; 57 var isFunction = function isFunction2(obj) { 58 return typeof obj === "function" && typeof obj.nodeType !== "number" && typeof obj.item !== "function"; 59 }; 60 var isWindow = function isWindow2(obj) { 61 return obj != null && obj === obj.window; 62 }; 63 var document2 = window2.document; 64 var preservedScriptAttributes = { 65 type: true, 66 src: true, 67 nonce: true, 68 noModule: true 69 }; 70 function DOMEval(code, node, doc) { 71 doc = doc || document2; 72 var i, val, script = doc.createElement("script"); 73 script.text = code; 74 if (node) { 75 for (i in preservedScriptAttributes) { 76 val = node[i] || node.getAttribute && node.getAttribute(i); 77 if (val) { 78 script.setAttribute(i, val); 79 } 80 } 81 } 82 doc.head.appendChild(script).parentNode.removeChild(script); 83 } 84 function toType(obj) { 85 if (obj == null) { 86 return obj + ""; 87 } 88 return typeof obj === "object" || typeof obj === "function" ? class2type[toString.call(obj)] || "object" : typeof obj; 89 } 90 var version = "3.6.1", jQuery2 = function(selector, context) { 91 return new jQuery2.fn.init(selector, context); 92 }; 93 jQuery2.fn = jQuery2.prototype = { 94 jquery: version, 95 constructor: jQuery2, 96 length: 0, 97 toArray: function() { 98 return slice.call(this); 99 }, 100 get: function(num) { 101 if (num == null) { 102 return slice.call(this); 103 } 104 return num < 0 ? this[num + this.length] : this[num]; 105 }, 106 pushStack: function(elems) { 107 var ret = jQuery2.merge(this.constructor(), elems); 108 ret.prevObject = this; 109 return ret; 110 }, 111 each: function(callback) { 112 return jQuery2.each(this, callback); 113 }, 114 map: function(callback) { 115 return this.pushStack(jQuery2.map(this, function(elem, i) { 116 return callback.call(elem, i, elem); 117 })); 118 }, 119 slice: function() { 120 return this.pushStack(slice.apply(this, arguments)); 121 }, 122 first: function() { 123 return this.eq(0); 124 }, 125 last: function() { 126 return this.eq(-1); 127 }, 128 even: function() { 129 return this.pushStack(jQuery2.grep(this, function(_elem, i) { 130 return (i + 1) % 2; 131 })); 132 }, 133 odd: function() { 134 return this.pushStack(jQuery2.grep(this, function(_elem, i) { 135 return i % 2; 136 })); 137 }, 138 eq: function(i) { 139 var len = this.length, j = +i + (i < 0 ? len : 0); 140 return this.pushStack(j >= 0 && j < len ? [this[j]] : []); 141 }, 142 end: function() { 143 return this.prevObject || this.constructor(); 144 }, 145 push, 146 sort: arr.sort, 147 splice: arr.splice 148 }; 149 jQuery2.extend = jQuery2.fn.extend = function() { 150 var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, i = 1, length = arguments.length, deep = false; 151 if (typeof target === "boolean") { 152 deep = target; 153 target = arguments[i] || {}; 154 i++; 155 } 156 if (typeof target !== "object" && !isFunction(target)) { 157 target = {}; 158 } 159 if (i === length) { 160 target = this; 161 i--; 162 } 163 for (; i < length; i++) { 164 if ((options = arguments[i]) != null) { 165 for (name in options) { 166 copy = options[name]; 167 if (name === "__proto__" || target === copy) { 168 continue; 169 } 170 if (deep && copy && (jQuery2.isPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) { 171 src = target[name]; 172 if (copyIsArray && !Array.isArray(src)) { 173 clone = []; 174 } else if (!copyIsArray && !jQuery2.isPlainObject(src)) { 175 clone = {}; 176 } else { 177 clone = src; 178 } 179 copyIsArray = false; 180 target[name] = jQuery2.extend(deep, clone, copy); 181 } else if (copy !== void 0) { 182 target[name] = copy; 183 } 184 } 185 } 186 } 187 return target; 188 }; 189 jQuery2.extend({ 190 expando: "jQuery" + (version + Math.random()).replace(/\D/g, ""), 191 isReady: true, 192 error: function(msg) { 193 throw new Error(msg); 194 }, 195 noop: function() { 196 }, 197 isPlainObject: function(obj) { 198 var proto, Ctor; 199 if (!obj || toString.call(obj) !== "[object Object]") { 200 return false; 201 } 202 proto = getProto(obj); 203 if (!proto) { 204 return true; 205 } 206 Ctor = hasOwn.call(proto, "constructor") && proto.constructor; 207 return typeof Ctor === "function" && fnToString.call(Ctor) === ObjectFunctionString; 208 }, 209 isEmptyObject: function(obj) { 210 var name; 211 for (name in obj) { 212 return false; 213 } 214 return true; 215 }, 216 globalEval: function(code, options, doc) { 217 DOMEval(code, { nonce: options && options.nonce }, doc); 218 }, 219 each: function(obj, callback) { 220 var length, i = 0; 221 if (isArrayLike(obj)) { 222 length = obj.length; 223 for (; i < length; i++) { 224 if (callback.call(obj[i], i, obj[i]) === false) { 225 break; 226 } 227 } 228 } else { 229 for (i in obj) { 230 if (callback.call(obj[i], i, obj[i]) === false) { 231 break; 232 } 233 } 234 } 235 return obj; 236 }, 237 makeArray: function(arr2, results) { 238 var ret = results || []; 239 if (arr2 != null) { 240 if (isArrayLike(Object(arr2))) { 241 jQuery2.merge( 242 ret, 243 typeof arr2 === "string" ? [arr2] : arr2 244 ); 245 } else { 246 push.call(ret, arr2); 247 } 248 } 249 return ret; 250 }, 251 inArray: function(elem, arr2, i) { 252 return arr2 == null ? -1 : indexOf.call(arr2, elem, i); 253 }, 254 merge: function(first, second) { 255 var len = +second.length, j = 0, i = first.length; 256 for (; j < len; j++) { 257 first[i++] = second[j]; 258 } 259 first.length = i; 260 return first; 261 }, 262 grep: function(elems, callback, invert) { 263 var callbackInverse, matches = [], i = 0, length = elems.length, callbackExpect = !invert; 264 for (; i < length; i++) { 265 callbackInverse = !callback(elems[i], i); 266 if (callbackInverse !== callbackExpect) { 267 matches.push(elems[i]); 268 } 269 } 270 return matches; 271 }, 272 map: function(elems, callback, arg) { 273 var length, value, i = 0, ret = []; 274 if (isArrayLike(elems)) { 275 length = elems.length; 276 for (; i < length; i++) { 277 value = callback(elems[i], i, arg); 278 if (value != null) { 279 ret.push(value); 280 } 281 } 282 } else { 283 for (i in elems) { 284 value = callback(elems[i], i, arg); 285 if (value != null) { 286 ret.push(value); 287 } 288 } 289 } 290 return flat(ret); 291 }, 292 guid: 1, 293 support: support2 294 }); 295 if (typeof Symbol === "function") { 296 jQuery2.fn[Symbol.iterator] = arr[Symbol.iterator]; 297 } 298 jQuery2.each( 299 "Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), 300 function(_i, name) { 301 class2type["[object " + name + "]"] = name.toLowerCase(); 302 } 303 ); 304 function isArrayLike(obj) { 305 var length = !!obj && "length" in obj && obj.length, type = toType(obj); 306 if (isFunction(obj) || isWindow(obj)) { 307 return false; 308 } 309 return type === "array" || length === 0 || typeof length === "number" && length > 0 && length - 1 in obj; 310 } 311 var Sizzle = function(window3) { 312 var i, support3, Expr, getText, isXML, tokenize, compile, select, outermostContext, sortInput, hasDuplicate, setDocument, document3, docElem, documentIsHTML, rbuggyQSA, rbuggyMatches, matches, contains, expando = "sizzle" + 1 * new Date(), preferredDoc = window3.document, dirruns = 0, done = 0, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), nonnativeSelectorCache = createCache(), sortOrder = function(a, b) { 313 if (a === b) { 314 hasDuplicate = true; 315 } 316 return 0; 317 }, hasOwn2 = {}.hasOwnProperty, arr2 = [], pop = arr2.pop, pushNative = arr2.push, push2 = arr2.push, slice2 = arr2.slice, indexOf2 = function(list, elem) { 318 var i2 = 0, len = list.length; 319 for (; i2 < len; i2++) { 320 if (list[i2] === elem) { 321 return i2; 322 } 323 } 324 return -1; 325 }, booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", whitespace2 = "[\\x20\\t\\r\\n\\f]", identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace2 + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", attributes = "\\[" + whitespace2 + "*(" + identifier + ")(?:" + whitespace2 + "*([*^$|!~]?=)" + whitespace2 + `*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(` + identifier + "))|)" + whitespace2 + "*\\]", pseudos = ":(" + identifier + `)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|` + attributes + ")*)|.*)\\)|)", rwhitespace = new RegExp(whitespace2 + "+", "g"), rtrim2 = new RegExp("^" + whitespace2 + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace2 + "+$", "g"), rcomma = new RegExp("^" + whitespace2 + "*," + whitespace2 + "*"), rcombinators = new RegExp("^" + whitespace2 + "*([>+~]|" + whitespace2 + ")" + whitespace2 + "*"), rdescend = new RegExp(whitespace2 + "|>"), rpseudo = new RegExp(pseudos), ridentifier = new RegExp("^" + identifier + "$"), matchExpr = { 326 "ID": new RegExp("^#(" + identifier + ")"), 327 "CLASS": new RegExp("^\\.(" + identifier + ")"), 328 "TAG": new RegExp("^(" + identifier + "|[*])"), 329 "ATTR": new RegExp("^" + attributes), 330 "PSEUDO": new RegExp("^" + pseudos), 331 "CHILD": new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace2 + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace2 + "*(?:([+-]|)" + whitespace2 + "*(\\d+)|))" + whitespace2 + "*\\)|)", "i"), 332 "bool": new RegExp("^(?:" + booleans + ")$", "i"), 333 "needsContext": new RegExp("^" + whitespace2 + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace2 + "*((?:-\\d)?\\d*)" + whitespace2 + "*\\)|)(?=[^-]|$)", "i") 334 }, rhtml2 = /HTML$/i, rinputs = /^(?:input|select|textarea|button)$/i, rheader = /^h\d$/i, rnative = /^[^{]+\{\s*\[native \w/, rquickExpr2 = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, rsibling = /[+~]/, runescape = new RegExp("\\\\[\\da-fA-F]{1,6}" + whitespace2 + "?|\\\\([^\\r\\n\\f])", "g"), funescape = function(escape, nonHex) { 335 var high = "0x" + escape.slice(1) - 65536; 336 return nonHex ? nonHex : high < 0 ? String.fromCharCode(high + 65536) : String.fromCharCode(high >> 10 | 55296, high & 1023 | 56320); 337 }, rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, fcssescape = function(ch, asCodePoint) { 338 if (asCodePoint) { 339 if (ch === "\0") { 340 return "\uFFFD"; 341 } 342 return ch.slice(0, -1) + "\\" + ch.charCodeAt(ch.length - 1).toString(16) + " "; 343 } 344 return "\\" + ch; 345 }, unloadHandler = function() { 346 setDocument(); 347 }, inDisabledFieldset = addCombinator( 348 function(elem) { 349 return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset"; 350 }, 351 { dir: "parentNode", next: "legend" } 352 ); 353 try { 354 push2.apply( 355 arr2 = slice2.call(preferredDoc.childNodes), 356 preferredDoc.childNodes 357 ); 358 arr2[preferredDoc.childNodes.length].nodeType; 359 } catch (e) { 360 push2 = { 361 apply: arr2.length ? function(target, els) { 362 pushNative.apply(target, slice2.call(els)); 363 } : function(target, els) { 364 var j = target.length, i2 = 0; 365 while (target[j++] = els[i2++]) { 366 } 367 target.length = j - 1; 368 } 369 }; 370 } 371 function Sizzle2(selector, context, results, seed) { 372 var m, i2, elem, nid, match, groups, newSelector, newContext = context && context.ownerDocument, nodeType = context ? context.nodeType : 9; 373 results = results || []; 374 if (typeof selector !== "string" || !selector || nodeType !== 1 && nodeType !== 9 && nodeType !== 11) { 375 return results; 376 } 377 if (!seed) { 378 setDocument(context); 379 context = context || document3; 380 if (documentIsHTML) { 381 if (nodeType !== 11 && (match = rquickExpr2.exec(selector))) { 382 if (m = match[1]) { 383 if (nodeType === 9) { 384 if (elem = context.getElementById(m)) { 385 if (elem.id === m) { 386 results.push(elem); 387 return results; 388 } 389 } else { 390 return results; 391 } 392 } else { 393 if (newContext && (elem = newContext.getElementById(m)) && contains(context, elem) && elem.id === m) { 394 results.push(elem); 395 return results; 396 } 397 } 398 } else if (match[2]) { 399 push2.apply(results, context.getElementsByTagName(selector)); 400 return results; 401 } else if ((m = match[3]) && support3.getElementsByClassName && context.getElementsByClassName) { 402 push2.apply(results, context.getElementsByClassName(m)); 403 return results; 404 } 405 } 406 if (support3.qsa && !nonnativeSelectorCache[selector + " "] && (!rbuggyQSA || !rbuggyQSA.test(selector)) && (nodeType !== 1 || context.nodeName.toLowerCase() !== "object")) { 407 newSelector = selector; 408 newContext = context; 409 if (nodeType === 1 && (rdescend.test(selector) || rcombinators.test(selector))) { 410 newContext = rsibling.test(selector) && testContext(context.parentNode) || context; 411 if (newContext !== context || !support3.scope) { 412 if (nid = context.getAttribute("id")) { 413 nid = nid.replace(rcssescape, fcssescape); 414 } else { 415 context.setAttribute("id", nid = expando); 416 } 417 } 418 groups = tokenize(selector); 419 i2 = groups.length; 420 while (i2--) { 421 groups[i2] = (nid ? "#" + nid : ":scope") + " " + toSelector(groups[i2]); 422 } 423 newSelector = groups.join(","); 424 } 425 try { 426 push2.apply( 427 results, 428 newContext.querySelectorAll(newSelector) 429 ); 430 return results; 431 } catch (qsaError) { 432 nonnativeSelectorCache(selector, true); 433 } finally { 434 if (nid === expando) { 435 context.removeAttribute("id"); 436 } 437 } 438 } 439 } 440 } 441 return select(selector.replace(rtrim2, "$1"), context, results, seed); 442 } 443 function createCache() { 444 var keys = []; 445 function cache(key, value) { 446 if (keys.push(key + " ") > Expr.cacheLength) { 447 delete cache[keys.shift()]; 448 } 449 return cache[key + " "] = value; 450 } 451 return cache; 452 } 453 function markFunction(fn) { 454 fn[expando] = true; 455 return fn; 456 } 457 function assert(fn) { 458 var el = document3.createElement("fieldset"); 459 try { 460 return !!fn(el); 461 } catch (e) { 462 return false; 463 } finally { 464 if (el.parentNode) { 465 el.parentNode.removeChild(el); 466 } 467 el = null; 468 } 469 } 470 function addHandle(attrs, handler) { 471 var arr3 = attrs.split("|"), i2 = arr3.length; 472 while (i2--) { 473 Expr.attrHandle[arr3[i2]] = handler; 474 } 475 } 476 function siblingCheck(a, b) { 477 var cur = b && a, diff = cur && a.nodeType === 1 && b.nodeType === 1 && a.sourceIndex - b.sourceIndex; 478 if (diff) { 479 return diff; 480 } 481 if (cur) { 482 while (cur = cur.nextSibling) { 483 if (cur === b) { 484 return -1; 485 } 486 } 487 } 488 return a ? 1 : -1; 489 } 490 function createInputPseudo(type) { 491 return function(elem) { 492 var name = elem.nodeName.toLowerCase(); 493 return name === "input" && elem.type === type; 494 }; 495 } 496 function createButtonPseudo(type) { 497 return function(elem) { 498 var name = elem.nodeName.toLowerCase(); 499 return (name === "input" || name === "button") && elem.type === type; 500 }; 501 } 502 function createDisabledPseudo(disabled) { 503 return function(elem) { 504 if ("form" in elem) { 505 if (elem.parentNode && elem.disabled === false) { 506 if ("label" in elem) { 507 if ("label" in elem.parentNode) { 508 return elem.parentNode.disabled === disabled; 509 } else { 510 return elem.disabled === disabled; 511 } 512 } 513 return elem.isDisabled === disabled || elem.isDisabled !== !disabled && inDisabledFieldset(elem) === disabled; 514 } 515 return elem.disabled === disabled; 516 } else if ("label" in elem) { 517 return elem.disabled === disabled; 518 } 519 return false; 520 }; 521 } 522 function createPositionalPseudo(fn) { 523 return markFunction(function(argument) { 524 argument = +argument; 525 return markFunction(function(seed, matches2) { 526 var j, matchIndexes = fn([], seed.length, argument), i2 = matchIndexes.length; 527 while (i2--) { 528 if (seed[j = matchIndexes[i2]]) { 529 seed[j] = !(matches2[j] = seed[j]); 530 } 531 } 532 }); 533 }); 534 } 535 function testContext(context) { 536 return context && typeof context.getElementsByTagName !== "undefined" && context; 537 } 538 support3 = Sizzle2.support = {}; 539 isXML = Sizzle2.isXML = function(elem) { 540 var namespace = elem && elem.namespaceURI, docElem2 = elem && (elem.ownerDocument || elem).documentElement; 541 return !rhtml2.test(namespace || docElem2 && docElem2.nodeName || "HTML"); 542 }; 543 setDocument = Sizzle2.setDocument = function(node) { 544 var hasCompare, subWindow, doc = node ? node.ownerDocument || node : preferredDoc; 545 if (doc == document3 || doc.nodeType !== 9 || !doc.documentElement) { 546 return document3; 547 } 548 document3 = doc; 549 docElem = document3.documentElement; 550 documentIsHTML = !isXML(document3); 551 if (preferredDoc != document3 && (subWindow = document3.defaultView) && subWindow.top !== subWindow) { 552 if (subWindow.addEventListener) { 553 subWindow.addEventListener("unload", unloadHandler, false); 554 } else if (subWindow.attachEvent) { 555 subWindow.attachEvent("onunload", unloadHandler); 556 } 557 } 558 support3.scope = assert(function(el) { 559 docElem.appendChild(el).appendChild(document3.createElement("div")); 560 return typeof el.querySelectorAll !== "undefined" && !el.querySelectorAll(":scope fieldset div").length; 561 }); 562 support3.attributes = assert(function(el) { 563 el.className = "i"; 564 return !el.getAttribute("className"); 565 }); 566 support3.getElementsByTagName = assert(function(el) { 567 el.appendChild(document3.createComment("")); 568 return !el.getElementsByTagName("*").length; 569 }); 570 support3.getElementsByClassName = rnative.test(document3.getElementsByClassName); 571 support3.getById = assert(function(el) { 572 docElem.appendChild(el).id = expando; 573 return !document3.getElementsByName || !document3.getElementsByName(expando).length; 574 }); 575 if (support3.getById) { 576 Expr.filter["ID"] = function(id) { 577 var attrId = id.replace(runescape, funescape); 578 return function(elem) { 579 return elem.getAttribute("id") === attrId; 580 }; 581 }; 582 Expr.find["ID"] = function(id, context) { 583 if (typeof context.getElementById !== "undefined" && documentIsHTML) { 584 var elem = context.getElementById(id); 585 return elem ? [elem] : []; 586 } 587 }; 588 } else { 589 Expr.filter["ID"] = function(id) { 590 var attrId = id.replace(runescape, funescape); 591 return function(elem) { 592 var node2 = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); 593 return node2 && node2.value === attrId; 594 }; 595 }; 596 Expr.find["ID"] = function(id, context) { 597 if (typeof context.getElementById !== "undefined" && documentIsHTML) { 598 var node2, i2, elems, elem = context.getElementById(id); 599 if (elem) { 600 node2 = elem.getAttributeNode("id"); 601 if (node2 && node2.value === id) { 602 return [elem]; 603 } 604 elems = context.getElementsByName(id); 605 i2 = 0; 606 while (elem = elems[i2++]) { 607 node2 = elem.getAttributeNode("id"); 608 if (node2 && node2.value === id) { 609 return [elem]; 610 } 611 } 612 } 613 return []; 614 } 615 }; 616 } 617 Expr.find["TAG"] = support3.getElementsByTagName ? function(tag, context) { 618 if (typeof context.getElementsByTagName !== "undefined") { 619 return context.getElementsByTagName(tag); 620 } else if (support3.qsa) { 621 return context.querySelectorAll(tag); 622 } 623 } : function(tag, context) { 624 var elem, tmp = [], i2 = 0, results = context.getElementsByTagName(tag); 625 if (tag === "*") { 626 while (elem = results[i2++]) { 627 if (elem.nodeType === 1) { 628 tmp.push(elem); 629 } 630 } 631 return tmp; 632 } 633 return results; 634 }; 635 Expr.find["CLASS"] = support3.getElementsByClassName && function(className, context) { 636 if (typeof context.getElementsByClassName !== "undefined" && documentIsHTML) { 637 return context.getElementsByClassName(className); 638 } 639 }; 640 rbuggyMatches = []; 641 rbuggyQSA = []; 642 if (support3.qsa = rnative.test(document3.querySelectorAll)) { 643 assert(function(el) { 644 var input; 645 docElem.appendChild(el).innerHTML = "<a id='" + expando + "'></a><select id='" + expando + "-\r\\' msallowcapture=''><option selected=''></option></select>"; 646 if (el.querySelectorAll("[msallowcapture^='']").length) { 647 rbuggyQSA.push("[*^$]=" + whitespace2 + `*(?:''|"")`); 648 } 649 if (!el.querySelectorAll("[selected]").length) { 650 rbuggyQSA.push("\\[" + whitespace2 + "*(?:value|" + booleans + ")"); 651 } 652 if (!el.querySelectorAll("[id~=" + expando + "-]").length) { 653 rbuggyQSA.push("~="); 654 } 655 input = document3.createElement("input"); 656 input.setAttribute("name", ""); 657 el.appendChild(input); 658 if (!el.querySelectorAll("[name='']").length) { 659 rbuggyQSA.push("\\[" + whitespace2 + "*name" + whitespace2 + "*=" + whitespace2 + `*(?:''|"")`); 660 } 661 if (!el.querySelectorAll(":checked").length) { 662 rbuggyQSA.push(":checked"); 663 } 664 if (!el.querySelectorAll("a#" + expando + "+*").length) { 665 rbuggyQSA.push(".#.+[+~]"); 666 } 667 el.querySelectorAll("\\\f"); 668 rbuggyQSA.push("[\\r\\n\\f]"); 669 }); 670 assert(function(el) { 671 el.innerHTML = "<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>"; 672 var input = document3.createElement("input"); 673 input.setAttribute("type", "hidden"); 674 el.appendChild(input).setAttribute("name", "D"); 675 if (el.querySelectorAll("[name=d]").length) { 676 rbuggyQSA.push("name" + whitespace2 + "*[*^$|!~]?="); 677 } 678 if (el.querySelectorAll(":enabled").length !== 2) { 679 rbuggyQSA.push(":enabled", ":disabled"); 680 } 681 docElem.appendChild(el).disabled = true; 682 if (el.querySelectorAll(":disabled").length !== 2) { 683 rbuggyQSA.push(":enabled", ":disabled"); 684 } 685 el.querySelectorAll("*,:x"); 686 rbuggyQSA.push(",.*:"); 687 }); 688 } 689 if (support3.matchesSelector = rnative.test(matches = docElem.matches || docElem.webkitMatchesSelector || docElem.mozMatchesSelector || docElem.oMatchesSelector || docElem.msMatchesSelector)) { 690 assert(function(el) { 691 support3.disconnectedMatch = matches.call(el, "*"); 692 matches.call(el, "[s!='']:x"); 693 rbuggyMatches.push("!=", pseudos); 694 }); 695 } 696 rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join("|")); 697 rbuggyMatches = rbuggyMatches.length && new RegExp(rbuggyMatches.join("|")); 698 hasCompare = rnative.test(docElem.compareDocumentPosition); 699 contains = hasCompare || rnative.test(docElem.contains) ? function(a, b) { 700 var adown = a.nodeType === 9 ? a.documentElement : a, bup = b && b.parentNode; 701 return a === bup || !!(bup && bup.nodeType === 1 && (adown.contains ? adown.contains(bup) : a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16)); 702 } : function(a, b) { 703 if (b) { 704 while (b = b.parentNode) { 705 if (b === a) { 706 return true; 707 } 708 } 709 } 710 return false; 711 }; 712 sortOrder = hasCompare ? function(a, b) { 713 if (a === b) { 714 hasDuplicate = true; 715 return 0; 716 } 717 var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; 718 if (compare) { 719 return compare; 720 } 721 compare = (a.ownerDocument || a) == (b.ownerDocument || b) ? a.compareDocumentPosition(b) : 1; 722 if (compare & 1 || !support3.sortDetached && b.compareDocumentPosition(a) === compare) { 723 if (a == document3 || a.ownerDocument == preferredDoc && contains(preferredDoc, a)) { 724 return -1; 725 } 726 if (b == document3 || b.ownerDocument == preferredDoc && contains(preferredDoc, b)) { 727 return 1; 728 } 729 return sortInput ? indexOf2(sortInput, a) - indexOf2(sortInput, b) : 0; 730 } 731 return compare & 4 ? -1 : 1; 732 } : function(a, b) { 733 if (a === b) { 734 hasDuplicate = true; 735 return 0; 736 } 737 var cur, i2 = 0, aup = a.parentNode, bup = b.parentNode, ap = [a], bp = [b]; 738 if (!aup || !bup) { 739 return a == document3 ? -1 : b == document3 ? 1 : aup ? -1 : bup ? 1 : sortInput ? indexOf2(sortInput, a) - indexOf2(sortInput, b) : 0; 740 } else if (aup === bup) { 741 return siblingCheck(a, b); 742 } 743 cur = a; 744 while (cur = cur.parentNode) { 745 ap.unshift(cur); 746 } 747 cur = b; 748 while (cur = cur.parentNode) { 749 bp.unshift(cur); 750 } 751 while (ap[i2] === bp[i2]) { 752 i2++; 753 } 754 return i2 ? siblingCheck(ap[i2], bp[i2]) : ap[i2] == preferredDoc ? -1 : bp[i2] == preferredDoc ? 1 : 0; 755 }; 756 return document3; 757 }; 758 Sizzle2.matches = function(expr, elements) { 759 return Sizzle2(expr, null, null, elements); 760 }; 761 Sizzle2.matchesSelector = function(elem, expr) { 762 setDocument(elem); 763 if (support3.matchesSelector && documentIsHTML && !nonnativeSelectorCache[expr + " "] && (!rbuggyMatches || !rbuggyMatches.test(expr)) && (!rbuggyQSA || !rbuggyQSA.test(expr))) { 764 try { 765 var ret = matches.call(elem, expr); 766 if (ret || support3.disconnectedMatch || elem.document && elem.document.nodeType !== 11) { 767 return ret; 768 } 769 } catch (e) { 770 nonnativeSelectorCache(expr, true); 771 } 772 } 773 return Sizzle2(expr, document3, null, [elem]).length > 0; 774 }; 775 Sizzle2.contains = function(context, elem) { 776 if ((context.ownerDocument || context) != document3) { 777 setDocument(context); 778 } 779 return contains(context, elem); 780 }; 781 Sizzle2.attr = function(elem, name) { 782 if ((elem.ownerDocument || elem) != document3) { 783 setDocument(elem); 784 } 785 var fn = Expr.attrHandle[name.toLowerCase()], val = fn && hasOwn2.call(Expr.attrHandle, name.toLowerCase()) ? fn(elem, name, !documentIsHTML) : void 0; 786 return val !== void 0 ? val : support3.attributes || !documentIsHTML ? elem.getAttribute(name) : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null; 787 }; 788 Sizzle2.escape = function(sel) { 789 return (sel + "").replace(rcssescape, fcssescape); 790 }; 791 Sizzle2.error = function(msg) { 792 throw new Error("Syntax error, unrecognized expression: " + msg); 793 }; 794 Sizzle2.uniqueSort = function(results) { 795 var elem, duplicates = [], j = 0, i2 = 0; 796 hasDuplicate = !support3.detectDuplicates; 797 sortInput = !support3.sortStable && results.slice(0); 798 results.sort(sortOrder); 799 if (hasDuplicate) { 800 while (elem = results[i2++]) { 801 if (elem === results[i2]) { 802 j = duplicates.push(i2); 803 } 804 } 805 while (j--) { 806 results.splice(duplicates[j], 1); 807 } 808 } 809 sortInput = null; 810 return results; 811 }; 812 getText = Sizzle2.getText = function(elem) { 813 var node, ret = "", i2 = 0, nodeType = elem.nodeType; 814 if (!nodeType) { 815 while (node = elem[i2++]) { 816 ret += getText(node); 817 } 818 } else if (nodeType === 1 || nodeType === 9 || nodeType === 11) { 819 if (typeof elem.textContent === "string") { 820 return elem.textContent; 821 } else { 822 for (elem = elem.firstChild; elem; elem = elem.nextSibling) { 823 ret += getText(elem); 824 } 825 } 826 } else if (nodeType === 3 || nodeType === 4) { 827 return elem.nodeValue; 828 } 829 return ret; 830 }; 831 Expr = Sizzle2.selectors = { 832 cacheLength: 50, 833 createPseudo: markFunction, 834 match: matchExpr, 835 attrHandle: {}, 836 find: {}, 837 relative: { 838 ">": { dir: "parentNode", first: true }, 839 " ": { dir: "parentNode" }, 840 "+": { dir: "previousSibling", first: true }, 841 "~": { dir: "previousSibling" } 842 }, 843 preFilter: { 844 "ATTR": function(match) { 845 match[1] = match[1].replace(runescape, funescape); 846 match[3] = (match[3] || match[4] || match[5] || "").replace(runescape, funescape); 847 if (match[2] === "~=") { 848 match[3] = " " + match[3] + " "; 849 } 850 return match.slice(0, 4); 851 }, 852 "CHILD": function(match) { 853 match[1] = match[1].toLowerCase(); 854 if (match[1].slice(0, 3) === "nth") { 855 if (!match[3]) { 856 Sizzle2.error(match[0]); 857 } 858 match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * (match[3] === "even" || match[3] === "odd")); 859 match[5] = +(match[7] + match[8] || match[3] === "odd"); 860 } else if (match[3]) { 861 Sizzle2.error(match[0]); 862 } 863 return match; 864 }, 865 "PSEUDO": function(match) { 866 var excess, unquoted = !match[6] && match[2]; 867 if (matchExpr["CHILD"].test(match[0])) { 868 return null; 869 } 870 if (match[3]) { 871 match[2] = match[4] || match[5] || ""; 872 } else if (unquoted && rpseudo.test(unquoted) && (excess = tokenize(unquoted, true)) && (excess = unquoted.indexOf(")", unquoted.length - excess) - unquoted.length)) { 873 match[0] = match[0].slice(0, excess); 874 match[2] = unquoted.slice(0, excess); 875 } 876 return match.slice(0, 3); 877 } 878 }, 879 filter: { 880 "TAG": function(nodeNameSelector) { 881 var nodeName2 = nodeNameSelector.replace(runescape, funescape).toLowerCase(); 882 return nodeNameSelector === "*" ? function() { 883 return true; 884 } : function(elem) { 885 return elem.nodeName && elem.nodeName.toLowerCase() === nodeName2; 886 }; 887 }, 888 "CLASS": function(className) { 889 var pattern = classCache[className + " "]; 890 return pattern || (pattern = new RegExp("(^|" + whitespace2 + ")" + className + "(" + whitespace2 + "|$)")) && classCache( 891 className, 892 function(elem) { 893 return pattern.test( 894 typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" 895 ); 896 } 897 ); 898 }, 899 "ATTR": function(name, operator, check) { 900 return function(elem) { 901 var result = Sizzle2.attr(elem, name); 902 if (result == null) { 903 return operator === "!="; 904 } 905 if (!operator) { 906 return true; 907 } 908 result += ""; 909 return operator === "=" ? result === check : operator === "!=" ? result !== check : operator === "^=" ? check && result.indexOf(check) === 0 : operator === "*=" ? check && result.indexOf(check) > -1 : operator === "$=" ? check && result.slice(-check.length) === check : operator === "~=" ? (" " + result.replace(rwhitespace, " ") + " ").indexOf(check) > -1 : operator === "|=" ? result === check || result.slice(0, check.length + 1) === check + "-" : false; 910 }; 911 }, 912 "CHILD": function(type, what, _argument, first, last) { 913 var simple = type.slice(0, 3) !== "nth", forward = type.slice(-4) !== "last", ofType = what === "of-type"; 914 return first === 1 && last === 0 ? function(elem) { 915 return !!elem.parentNode; 916 } : function(elem, _context, xml) { 917 var cache, uniqueCache, outerCache, node, nodeIndex, start, dir2 = simple !== forward ? "nextSibling" : "previousSibling", parent = elem.parentNode, name = ofType && elem.nodeName.toLowerCase(), useCache = !xml && !ofType, diff = false; 918 if (parent) { 919 if (simple) { 920 while (dir2) { 921 node = elem; 922 while (node = node[dir2]) { 923 if (ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) { 924 return false; 925 } 926 } 927 start = dir2 = type === "only" && !start && "nextSibling"; 928 } 929 return true; 930 } 931 start = [forward ? parent.firstChild : parent.lastChild]; 932 if (forward && useCache) { 933 node = parent; 934 outerCache = node[expando] || (node[expando] = {}); 935 uniqueCache = outerCache[node.uniqueID] || (outerCache[node.uniqueID] = {}); 936 cache = uniqueCache[type] || []; 937 nodeIndex = cache[0] === dirruns && cache[1]; 938 diff = nodeIndex && cache[2]; 939 node = nodeIndex && parent.childNodes[nodeIndex]; 940 while (node = ++nodeIndex && node && node[dir2] || (diff = nodeIndex = 0) || start.pop()) { 941 if (node.nodeType === 1 && ++diff && node === elem) { 942 uniqueCache[type] = [dirruns, nodeIndex, diff]; 943 break; 944 } 945 } 946 } else { 947 if (useCache) { 948 node = elem; 949 outerCache = node[expando] || (node[expando] = {}); 950 uniqueCache = outerCache[node.uniqueID] || (outerCache[node.uniqueID] = {}); 951 cache = uniqueCache[type] || []; 952 nodeIndex = cache[0] === dirruns && cache[1]; 953 diff = nodeIndex; 954 } 955 if (diff === false) { 956 while (node = ++nodeIndex && node && node[dir2] || (diff = nodeIndex = 0) || start.pop()) { 957 if ((ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) && ++diff) { 958 if (useCache) { 959 outerCache = node[expando] || (node[expando] = {}); 960 uniqueCache = outerCache[node.uniqueID] || (outerCache[node.uniqueID] = {}); 961 uniqueCache[type] = [dirruns, diff]; 962 } 963 if (node === elem) { 964 break; 965 } 966 } 967 } 968 } 969 } 970 diff -= last; 971 return diff === first || diff % first === 0 && diff / first >= 0; 972 } 973 }; 974 }, 975 "PSEUDO": function(pseudo, argument) { 976 var args, fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || Sizzle2.error("unsupported pseudo: " + pseudo); 977 if (fn[expando]) { 978 return fn(argument); 979 } 980 if (fn.length > 1) { 981 args = [pseudo, pseudo, "", argument]; 982 return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(function(seed, matches2) { 983 var idx, matched = fn(seed, argument), i2 = matched.length; 984 while (i2--) { 985 idx = indexOf2(seed, matched[i2]); 986 seed[idx] = !(matches2[idx] = matched[i2]); 987 } 988 }) : function(elem) { 989 return fn(elem, 0, args); 990 }; 991 } 992 return fn; 993 } 994 }, 995 pseudos: { 996 "not": markFunction(function(selector) { 997 var input = [], results = [], matcher = compile(selector.replace(rtrim2, "$1")); 998 return matcher[expando] ? markFunction(function(seed, matches2, _context, xml) { 999 var elem, unmatched = matcher(seed, null, xml, []), i2 = seed.length; 1000 while (i2--) { 1001 if (elem = unmatched[i2]) { 1002 seed[i2] = !(matches2[i2] = elem); 1003 } 1004 } 1005 }) : function(elem, _context, xml) { 1006 input[0] = elem; 1007 matcher(input, null, xml, results); 1008 input[0] = null; 1009 return !results.pop(); 1010 }; 1011 }), 1012 "has": markFunction(function(selector) { 1013 return function(elem) { 1014 return Sizzle2(selector, elem).length > 0; 1015 }; 1016 }), 1017 "contains": markFunction(function(text) { 1018 text = text.replace(runescape, funescape); 1019 return function(elem) { 1020 return (elem.textContent || getText(elem)).indexOf(text) > -1; 1021 }; 1022 }), 1023 "lang": markFunction(function(lang) { 1024 if (!ridentifier.test(lang || "")) { 1025 Sizzle2.error("unsupported lang: " + lang); 1026 } 1027 lang = lang.replace(runescape, funescape).toLowerCase(); 1028 return function(elem) { 1029 var elemLang; 1030 do { 1031 if (elemLang = documentIsHTML ? elem.lang : elem.getAttribute("xml:lang") || elem.getAttribute("lang")) { 1032 elemLang = elemLang.toLowerCase(); 1033 return elemLang === lang || elemLang.indexOf(lang + "-") === 0; 1034 } 1035 } while ((elem = elem.parentNode) && elem.nodeType === 1); 1036 return false; 1037 }; 1038 }), 1039 "target": function(elem) { 1040 var hash = window3.location && window3.location.hash; 1041 return hash && hash.slice(1) === elem.id; 1042 }, 1043 "root": function(elem) { 1044 return elem === docElem; 1045 }, 1046 "focus": function(elem) { 1047 return elem === document3.activeElement && (!document3.hasFocus || document3.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); 1048 }, 1049 "enabled": createDisabledPseudo(false), 1050 "disabled": createDisabledPseudo(true), 1051 "checked": function(elem) { 1052 var nodeName2 = elem.nodeName.toLowerCase(); 1053 return nodeName2 === "input" && !!elem.checked || nodeName2 === "option" && !!elem.selected; 1054 }, 1055 "selected": function(elem) { 1056 if (elem.parentNode) { 1057 elem.parentNode.selectedIndex; 1058 } 1059 return elem.selected === true; 1060 }, 1061 "empty": function(elem) { 1062 for (elem = elem.firstChild; elem; elem = elem.nextSibling) { 1063 if (elem.nodeType < 6) { 1064 return false; 1065 } 1066 } 1067 return true; 1068 }, 1069 "parent": function(elem) { 1070 return !Expr.pseudos["empty"](elem); 1071 }, 1072 "header": function(elem) { 1073 return rheader.test(elem.nodeName); 1074 }, 1075 "input": function(elem) { 1076 return rinputs.test(elem.nodeName); 1077 }, 1078 "button": function(elem) { 1079 var name = elem.nodeName.toLowerCase(); 1080 return name === "input" && elem.type === "button" || name === "button"; 1081 }, 1082 "text": function(elem) { 1083 var attr; 1084 return elem.nodeName.toLowerCase() === "input" && elem.type === "text" && ((attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text"); 1085 }, 1086 "first": createPositionalPseudo(function() { 1087 return [0]; 1088 }), 1089 "last": createPositionalPseudo(function(_matchIndexes, length) { 1090 return [length - 1]; 1091 }), 1092 "eq": createPositionalPseudo(function(_matchIndexes, length, argument) { 1093 return [argument < 0 ? argument + length : argument]; 1094 }), 1095 "even": createPositionalPseudo(function(matchIndexes, length) { 1096 var i2 = 0; 1097 for (; i2 < length; i2 += 2) { 1098 matchIndexes.push(i2); 1099 } 1100 return matchIndexes; 1101 }), 1102 "odd": createPositionalPseudo(function(matchIndexes, length) { 1103 var i2 = 1; 1104 for (; i2 < length; i2 += 2) { 1105 matchIndexes.push(i2); 1106 } 1107 return matchIndexes; 1108 }), 1109 "lt": createPositionalPseudo(function(matchIndexes, length, argument) { 1110 var i2 = argument < 0 ? argument + length : argument > length ? length : argument; 1111 for (; --i2 >= 0; ) { 1112 matchIndexes.push(i2); 1113 } 1114 return matchIndexes; 1115 }), 1116 "gt": createPositionalPseudo(function(matchIndexes, length, argument) { 1117 var i2 = argument < 0 ? argument + length : argument; 1118 for (; ++i2 < length; ) { 1119 matchIndexes.push(i2); 1120 } 1121 return matchIndexes; 1122 }) 1123 } 1124 }; 1125 Expr.pseudos["nth"] = Expr.pseudos["eq"]; 1126 for (i in { radio: true, checkbox: true, file: true, password: true, image: true }) { 1127 Expr.pseudos[i] = createInputPseudo(i); 1128 } 1129 for (i in { submit: true, reset: true }) { 1130 Expr.pseudos[i] = createButtonPseudo(i); 1131 } 1132 function setFilters() { 1133 } 1134 setFilters.prototype = Expr.filters = Expr.pseudos; 1135 Expr.setFilters = new setFilters(); 1136 tokenize = Sizzle2.tokenize = function(selector, parseOnly) { 1137 var matched, match, tokens, type, soFar, groups, preFilters, cached = tokenCache[selector + " "]; 1138 if (cached) { 1139 return parseOnly ? 0 : cached.slice(0); 1140 } 1141 soFar = selector; 1142 groups = []; 1143 preFilters = Expr.preFilter; 1144 while (soFar) { 1145 if (!matched || (match = rcomma.exec(soFar))) { 1146 if (match) { 1147 soFar = soFar.slice(match[0].length) || soFar; 1148 } 1149 groups.push(tokens = []); 1150 } 1151 matched = false; 1152 if (match = rcombinators.exec(soFar)) { 1153 matched = match.shift(); 1154 tokens.push({ 1155 value: matched, 1156 type: match[0].replace(rtrim2, " ") 1157 }); 1158 soFar = soFar.slice(matched.length); 1159 } 1160 for (type in Expr.filter) { 1161 if ((match = matchExpr[type].exec(soFar)) && (!preFilters[type] || (match = preFilters[type](match)))) { 1162 matched = match.shift(); 1163 tokens.push({ 1164 value: matched, 1165 type, 1166 matches: match 1167 }); 1168 soFar = soFar.slice(matched.length); 1169 } 1170 } 1171 if (!matched) { 1172 break; 1173 } 1174 } 1175 return parseOnly ? soFar.length : soFar ? Sizzle2.error(selector) : tokenCache(selector, groups).slice(0); 1176 }; 1177 function toSelector(tokens) { 1178 var i2 = 0, len = tokens.length, selector = ""; 1179 for (; i2 < len; i2++) { 1180 selector += tokens[i2].value; 1181 } 1182 return selector; 1183 } 1184 function addCombinator(matcher, combinator, base) { 1185 var dir2 = combinator.dir, skip = combinator.next, key = skip || dir2, checkNonElements = base && key === "parentNode", doneName = done++; 1186 return combinator.first ? function(elem, context, xml) { 1187 while (elem = elem[dir2]) { 1188 if (elem.nodeType === 1 || checkNonElements) { 1189 return matcher(elem, context, xml); 1190 } 1191 } 1192 return false; 1193 } : function(elem, context, xml) { 1194 var oldCache, uniqueCache, outerCache, newCache = [dirruns, doneName]; 1195 if (xml) { 1196 while (elem = elem[dir2]) { 1197 if (elem.nodeType === 1 || checkNonElements) { 1198 if (matcher(elem, context, xml)) { 1199 return true; 1200 } 1201 } 1202 } 1203 } else { 1204 while (elem = elem[dir2]) { 1205 if (elem.nodeType === 1 || checkNonElements) { 1206 outerCache = elem[expando] || (elem[expando] = {}); 1207 uniqueCache = outerCache[elem.uniqueID] || (outerCache[elem.uniqueID] = {}); 1208 if (skip && skip === elem.nodeName.toLowerCase()) { 1209 elem = elem[dir2] || elem; 1210 } else if ((oldCache = uniqueCache[key]) && oldCache[0] === dirruns && oldCache[1] === doneName) { 1211 return newCache[2] = oldCache[2]; 1212 } else { 1213 uniqueCache[key] = newCache; 1214 if (newCache[2] = matcher(elem, context, xml)) { 1215 return true; 1216 } 1217 } 1218 } 1219 } 1220 } 1221 return false; 1222 }; 1223 } 1224 function elementMatcher(matchers) { 1225 return matchers.length > 1 ? function(elem, context, xml) { 1226 var i2 = matchers.length; 1227 while (i2--) { 1228 if (!matchers[i2](elem, context, xml)) { 1229 return false; 1230 } 1231 } 1232 return true; 1233 } : matchers[0]; 1234 } 1235 function multipleContexts(selector, contexts, results) { 1236 var i2 = 0, len = contexts.length; 1237 for (; i2 < len; i2++) { 1238 Sizzle2(selector, contexts[i2], results); 1239 } 1240 return results; 1241 } 1242 function condense(unmatched, map, filter, context, xml) { 1243 var elem, newUnmatched = [], i2 = 0, len = unmatched.length, mapped = map != null; 1244 for (; i2 < len; i2++) { 1245 if (elem = unmatched[i2]) { 1246 if (!filter || filter(elem, context, xml)) { 1247 newUnmatched.push(elem); 1248 if (mapped) { 1249 map.push(i2); 1250 } 1251 } 1252 } 1253 } 1254 return newUnmatched; 1255 } 1256 function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) { 1257 if (postFilter && !postFilter[expando]) { 1258 postFilter = setMatcher(postFilter); 1259 } 1260 if (postFinder && !postFinder[expando]) { 1261 postFinder = setMatcher(postFinder, postSelector); 1262 } 1263 return markFunction(function(seed, results, context, xml) { 1264 var temp, i2, elem, preMap = [], postMap = [], preexisting = results.length, elems = seed || multipleContexts( 1265 selector || "*", 1266 context.nodeType ? [context] : context, 1267 [] 1268 ), matcherIn = preFilter && (seed || !selector) ? condense(elems, preMap, preFilter, context, xml) : elems, matcherOut = matcher ? postFinder || (seed ? preFilter : preexisting || postFilter) ? [] : results : matcherIn; 1269 if (matcher) { 1270 matcher(matcherIn, matcherOut, context, xml); 1271 } 1272 if (postFilter) { 1273 temp = condense(matcherOut, postMap); 1274 postFilter(temp, [], context, xml); 1275 i2 = temp.length; 1276 while (i2--) { 1277 if (elem = temp[i2]) { 1278 matcherOut[postMap[i2]] = !(matcherIn[postMap[i2]] = elem); 1279 } 1280 } 1281 } 1282 if (seed) { 1283 if (postFinder || preFilter) { 1284 if (postFinder) { 1285 temp = []; 1286 i2 = matcherOut.length; 1287 while (i2--) { 1288 if (elem = matcherOut[i2]) { 1289 temp.push(matcherIn[i2] = elem); 1290 } 1291 } 1292 postFinder(null, matcherOut = [], temp, xml); 1293 } 1294 i2 = matcherOut.length; 1295 while (i2--) { 1296 if ((elem = matcherOut[i2]) && (temp = postFinder ? indexOf2(seed, elem) : preMap[i2]) > -1) { 1297 seed[temp] = !(results[temp] = elem); 1298 } 1299 } 1300 } 1301 } else { 1302 matcherOut = condense( 1303 matcherOut === results ? matcherOut.splice(preexisting, matcherOut.length) : matcherOut 1304 ); 1305 if (postFinder) { 1306 postFinder(null, results, matcherOut, xml); 1307 } else { 1308 push2.apply(results, matcherOut); 1309 } 1310 } 1311 }); 1312 } 1313 function matcherFromTokens(tokens) { 1314 var checkContext, matcher, j, len = tokens.length, leadingRelative = Expr.relative[tokens[0].type], implicitRelative = leadingRelative || Expr.relative[" "], i2 = leadingRelative ? 1 : 0, matchContext = addCombinator(function(elem) { 1315 return elem === checkContext; 1316 }, implicitRelative, true), matchAnyContext = addCombinator(function(elem) { 1317 return indexOf2(checkContext, elem) > -1; 1318 }, implicitRelative, true), matchers = [function(elem, context, xml) { 1319 var ret = !leadingRelative && (xml || context !== outermostContext) || ((checkContext = context).nodeType ? matchContext(elem, context, xml) : matchAnyContext(elem, context, xml)); 1320 checkContext = null; 1321 return ret; 1322 }]; 1323 for (; i2 < len; i2++) { 1324 if (matcher = Expr.relative[tokens[i2].type]) { 1325 matchers = [addCombinator(elementMatcher(matchers), matcher)]; 1326 } else { 1327 matcher = Expr.filter[tokens[i2].type].apply(null, tokens[i2].matches); 1328 if (matcher[expando]) { 1329 j = ++i2; 1330 for (; j < len; j++) { 1331 if (Expr.relative[tokens[j].type]) { 1332 break; 1333 } 1334 } 1335 return setMatcher( 1336 i2 > 1 && elementMatcher(matchers), 1337 i2 > 1 && toSelector( 1338 tokens.slice(0, i2 - 1).concat({ value: tokens[i2 - 2].type === " " ? "*" : "" }) 1339 ).replace(rtrim2, "$1"), 1340 matcher, 1341 i2 < j && matcherFromTokens(tokens.slice(i2, j)), 1342 j < len && matcherFromTokens(tokens = tokens.slice(j)), 1343 j < len && toSelector(tokens) 1344 ); 1345 } 1346 matchers.push(matcher); 1347 } 1348 } 1349 return elementMatcher(matchers); 1350 } 1351 function matcherFromGroupMatchers(elementMatchers, setMatchers) { 1352 var bySet = setMatchers.length > 0, byElement = elementMatchers.length > 0, superMatcher = function(seed, context, xml, results, outermost) { 1353 var elem, j, matcher, matchedCount = 0, i2 = "0", unmatched = seed && [], setMatched = [], contextBackup = outermostContext, elems = seed || byElement && Expr.find["TAG"]("*", outermost), dirrunsUnique = dirruns += contextBackup == null ? 1 : Math.random() || 0.1, len = elems.length; 1354 if (outermost) { 1355 outermostContext = context == document3 || context || outermost; 1356 } 1357 for (; i2 !== len && (elem = elems[i2]) != null; i2++) { 1358 if (byElement && elem) { 1359 j = 0; 1360 if (!context && elem.ownerDocument != document3) { 1361 setDocument(elem); 1362 xml = !documentIsHTML; 1363 } 1364 while (matcher = elementMatchers[j++]) { 1365 if (matcher(elem, context || document3, xml)) { 1366 results.push(elem); 1367 break; 1368 } 1369 } 1370 if (outermost) { 1371 dirruns = dirrunsUnique; 1372 } 1373 } 1374 if (bySet) { 1375 if (elem = !matcher && elem) { 1376 matchedCount--; 1377 } 1378 if (seed) { 1379 unmatched.push(elem); 1380 } 1381 } 1382 } 1383 matchedCount += i2; 1384 if (bySet && i2 !== matchedCount) { 1385 j = 0; 1386 while (matcher = setMatchers[j++]) { 1387 matcher(unmatched, setMatched, context, xml); 1388 } 1389 if (seed) { 1390 if (matchedCount > 0) { 1391 while (i2--) { 1392 if (!(unmatched[i2] || setMatched[i2])) { 1393 setMatched[i2] = pop.call(results); 1394 } 1395 } 1396 } 1397 setMatched = condense(setMatched); 1398 } 1399 push2.apply(results, setMatched); 1400 if (outermost && !seed && setMatched.length > 0 && matchedCount + setMatchers.length > 1) { 1401 Sizzle2.uniqueSort(results); 1402 } 1403 } 1404 if (outermost) { 1405 dirruns = dirrunsUnique; 1406 outermostContext = contextBackup; 1407 } 1408 return unmatched; 1409 }; 1410 return bySet ? markFunction(superMatcher) : superMatcher; 1411 } 1412 compile = Sizzle2.compile = function(selector, match) { 1413 var i2, setMatchers = [], elementMatchers = [], cached = compilerCache[selector + " "]; 1414 if (!cached) { 1415 if (!match) { 1416 match = tokenize(selector); 1417 } 1418 i2 = match.length; 1419 while (i2--) { 1420 cached = matcherFromTokens(match[i2]); 1421 if (cached[expando]) { 1422 setMatchers.push(cached); 1423 } else { 1424 elementMatchers.push(cached); 1425 } 1426 } 1427 cached = compilerCache( 1428 selector, 1429 matcherFromGroupMatchers(elementMatchers, setMatchers) 1430 ); 1431 cached.selector = selector; 1432 } 1433 return cached; 1434 }; 1435 select = Sizzle2.select = function(selector, context, results, seed) { 1436 var i2, tokens, token, type, find, compiled = typeof selector === "function" && selector, match = !seed && tokenize(selector = compiled.selector || selector); 1437 results = results || []; 1438 if (match.length === 1) { 1439 tokens = match[0] = match[0].slice(0); 1440 if (tokens.length > 2 && (token = tokens[0]).type === "ID" && context.nodeType === 9 && documentIsHTML && Expr.relative[tokens[1].type]) { 1441 context = (Expr.find["ID"](token.matches[0].replace(runescape, funescape), context) || [])[0]; 1442 if (!context) { 1443 return results; 1444 } else if (compiled) { 1445 context = context.parentNode; 1446 } 1447 selector = selector.slice(tokens.shift().value.length); 1448 } 1449 i2 = matchExpr["needsContext"].test(selector) ? 0 : tokens.length; 1450 while (i2--) { 1451 token = tokens[i2]; 1452 if (Expr.relative[type = token.type]) { 1453 break; 1454 } 1455 if (find = Expr.find[type]) { 1456 if (seed = find( 1457 token.matches[0].replace(runescape, funescape), 1458 rsibling.test(tokens[0].type) && testContext(context.parentNode) || context 1459 )) { 1460 tokens.splice(i2, 1); 1461 selector = seed.length && toSelector(tokens); 1462 if (!selector) { 1463 push2.apply(results, seed); 1464 return results; 1465 } 1466 break; 1467 } 1468 } 1469 } 1470 } 1471 (compiled || compile(selector, match))( 1472 seed, 1473 context, 1474 !documentIsHTML, 1475 results, 1476 !context || rsibling.test(selector) && testContext(context.parentNode) || context 1477 ); 1478 return results; 1479 }; 1480 support3.sortStable = expando.split("").sort(sortOrder).join("") === expando; 1481 support3.detectDuplicates = !!hasDuplicate; 1482 setDocument(); 1483 support3.sortDetached = assert(function(el) { 1484 return el.compareDocumentPosition(document3.createElement("fieldset")) & 1; 1485 }); 1486 if (!assert(function(el) { 1487 el.innerHTML = "<a href='#'></a>"; 1488 return el.firstChild.getAttribute("href") === "#"; 1489 })) { 1490 addHandle("type|href|height|width", function(elem, name, isXML2) { 1491 if (!isXML2) { 1492 return elem.getAttribute(name, name.toLowerCase() === "type" ? 1 : 2); 1493 } 1494 }); 1495 } 1496 if (!support3.attributes || !assert(function(el) { 1497 el.innerHTML = "<input/>"; 1498 el.firstChild.setAttribute("value", ""); 1499 return el.firstChild.getAttribute("value") === ""; 1500 })) { 1501 addHandle("value", function(elem, _name, isXML2) { 1502 if (!isXML2 && elem.nodeName.toLowerCase() === "input") { 1503 return elem.defaultValue; 1504 } 1505 }); 1506 } 1507 if (!assert(function(el) { 1508 return el.getAttribute("disabled") == null; 1509 })) { 1510 addHandle(booleans, function(elem, name, isXML2) { 1511 var val; 1512 if (!isXML2) { 1513 return elem[name] === true ? name.toLowerCase() : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null; 1514 } 1515 }); 1516 } 1517 return Sizzle2; 1518 }(window2); 1519 jQuery2.find = Sizzle; 1520 jQuery2.expr = Sizzle.selectors; 1521 jQuery2.expr[":"] = jQuery2.expr.pseudos; 1522 jQuery2.uniqueSort = jQuery2.unique = Sizzle.uniqueSort; 1523 jQuery2.text = Sizzle.getText; 1524 jQuery2.isXMLDoc = Sizzle.isXML; 1525 jQuery2.contains = Sizzle.contains; 1526 jQuery2.escapeSelector = Sizzle.escape; 1527 var dir = function(elem, dir2, until) { 1528 var matched = [], truncate = until !== void 0; 1529 while ((elem = elem[dir2]) && elem.nodeType !== 9) { 1530 if (elem.nodeType === 1) { 1531 if (truncate && jQuery2(elem).is(until)) { 1532 break; 1533 } 1534 matched.push(elem); 1535 } 1536 } 1537 return matched; 1538 }; 1539 var siblings = function(n, elem) { 1540 var matched = []; 1541 for (; n; n = n.nextSibling) { 1542 if (n.nodeType === 1 && n !== elem) { 1543 matched.push(n); 1544 } 1545 } 1546 return matched; 1547 }; 1548 var rneedsContext = jQuery2.expr.match.needsContext; 1549 function nodeName(elem, name) { 1550 return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); 1551 } 1552 var rsingleTag = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i; 1553 function winnow(elements, qualifier, not) { 1554 if (isFunction(qualifier)) { 1555 return jQuery2.grep(elements, function(elem, i) { 1556 return !!qualifier.call(elem, i, elem) !== not; 1557 }); 1558 } 1559 if (qualifier.nodeType) { 1560 return jQuery2.grep(elements, function(elem) { 1561 return elem === qualifier !== not; 1562 }); 1563 } 1564 if (typeof qualifier !== "string") { 1565 return jQuery2.grep(elements, function(elem) { 1566 return indexOf.call(qualifier, elem) > -1 !== not; 1567 }); 1568 } 1569 return jQuery2.filter(qualifier, elements, not); 1570 } 1571 jQuery2.filter = function(expr, elems, not) { 1572 var elem = elems[0]; 1573 if (not) { 1574 expr = ":not(" + expr + ")"; 1575 } 1576 if (elems.length === 1 && elem.nodeType === 1) { 1577 return jQuery2.find.matchesSelector(elem, expr) ? [elem] : []; 1578 } 1579 return jQuery2.find.matches(expr, jQuery2.grep(elems, function(elem2) { 1580 return elem2.nodeType === 1; 1581 })); 1582 }; 1583 jQuery2.fn.extend({ 1584 find: function(selector) { 1585 var i, ret, len = this.length, self2 = this; 1586 if (typeof selector !== "string") { 1587 return this.pushStack(jQuery2(selector).filter(function() { 1588 for (i = 0; i < len; i++) { 1589 if (jQuery2.contains(self2[i], this)) { 1590 return true; 1591 } 1592 } 1593 })); 1594 } 1595 ret = this.pushStack([]); 1596 for (i = 0; i < len; i++) { 1597 jQuery2.find(selector, self2[i], ret); 1598 } 1599 return len > 1 ? jQuery2.uniqueSort(ret) : ret; 1600 }, 1601 filter: function(selector) { 1602 return this.pushStack(winnow(this, selector || [], false)); 1603 }, 1604 not: function(selector) { 1605 return this.pushStack(winnow(this, selector || [], true)); 1606 }, 1607 is: function(selector) { 1608 return !!winnow( 1609 this, 1610 typeof selector === "string" && rneedsContext.test(selector) ? jQuery2(selector) : selector || [], 1611 false 1612 ).length; 1613 } 1614 }); 1615 var rootjQuery, rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, init = jQuery2.fn.init = function(selector, context, root) { 1616 var match, elem; 1617 if (!selector) { 1618 return this; 1619 } 1620 root = root || rootjQuery; 1621 if (typeof selector === "string") { 1622 if (selector[0] === "<" && selector[selector.length - 1] === ">" && selector.length >= 3) { 1623 match = [null, selector, null]; 1624 } else { 1625 match = rquickExpr.exec(selector); 1626 } 1627 if (match && (match[1] || !context)) { 1628 if (match[1]) { 1629 context = context instanceof jQuery2 ? context[0] : context; 1630 jQuery2.merge(this, jQuery2.parseHTML( 1631 match[1], 1632 context && context.nodeType ? context.ownerDocument || context : document2, 1633 true 1634 )); 1635 if (rsingleTag.test(match[1]) && jQuery2.isPlainObject(context)) { 1636 for (match in context) { 1637 if (isFunction(this[match])) { 1638 this[match](context[match]); 1639 } else { 1640 this.attr(match, context[match]); 1641 } 1642 } 1643 } 1644 return this; 1645 } else { 1646 elem = document2.getElementById(match[2]); 1647 if (elem) { 1648 this[0] = elem; 1649 this.length = 1; 1650 } 1651 return this; 1652 } 1653 } else if (!context || context.jquery) { 1654 return (context || root).find(selector); 1655 } else { 1656 return this.constructor(context).find(selector); 1657 } 1658 } else if (selector.nodeType) { 1659 this[0] = selector; 1660 this.length = 1; 1661 return this; 1662 } else if (isFunction(selector)) { 1663 return root.ready !== void 0 ? root.ready(selector) : selector(jQuery2); 1664 } 1665 return jQuery2.makeArray(selector, this); 1666 }; 1667 init.prototype = jQuery2.fn; 1668 rootjQuery = jQuery2(document2); 1669 var rparentsprev = /^(?:parents|prev(?:Until|All))/, guaranteedUnique = { 1670 children: true, 1671 contents: true, 1672 next: true, 1673 prev: true 1674 }; 1675 jQuery2.fn.extend({ 1676 has: function(target) { 1677 var targets = jQuery2(target, this), l = targets.length; 1678 return this.filter(function() { 1679 var i = 0; 1680 for (; i < l; i++) { 1681 if (jQuery2.contains(this, targets[i])) { 1682 return true; 1683 } 1684 } 1685 }); 1686 }, 1687 closest: function(selectors, context) { 1688 var cur, i = 0, l = this.length, matched = [], targets = typeof selectors !== "string" && jQuery2(selectors); 1689 if (!rneedsContext.test(selectors)) { 1690 for (; i < l; i++) { 1691 for (cur = this[i]; cur && cur !== context; cur = cur.parentNode) { 1692 if (cur.nodeType < 11 && (targets ? targets.index(cur) > -1 : cur.nodeType === 1 && jQuery2.find.matchesSelector(cur, selectors))) { 1693 matched.push(cur); 1694 break; 1695 } 1696 } 1697 } 1698 } 1699 return this.pushStack(matched.length > 1 ? jQuery2.uniqueSort(matched) : matched); 1700 }, 1701 index: function(elem) { 1702 if (!elem) { 1703 return this[0] && this[0].parentNode ? this.first().prevAll().length : -1; 1704 } 1705 if (typeof elem === "string") { 1706 return indexOf.call(jQuery2(elem), this[0]); 1707 } 1708 return indexOf.call( 1709 this, 1710 elem.jquery ? elem[0] : elem 1711 ); 1712 }, 1713 add: function(selector, context) { 1714 return this.pushStack( 1715 jQuery2.uniqueSort( 1716 jQuery2.merge(this.get(), jQuery2(selector, context)) 1717 ) 1718 ); 1719 }, 1720 addBack: function(selector) { 1721 return this.add( 1722 selector == null ? this.prevObject : this.prevObject.filter(selector) 1723 ); 1724 } 1725 }); 1726 function sibling(cur, dir2) { 1727 while ((cur = cur[dir2]) && cur.nodeType !== 1) { 1728 } 1729 return cur; 1730 } 1731 jQuery2.each({ 1732 parent: function(elem) { 1733 var parent = elem.parentNode; 1734 return parent && parent.nodeType !== 11 ? parent : null; 1735 }, 1736 parents: function(elem) { 1737 return dir(elem, "parentNode"); 1738 }, 1739 parentsUntil: function(elem, _i, until) { 1740 return dir(elem, "parentNode", until); 1741 }, 1742 next: function(elem) { 1743 return sibling(elem, "nextSibling"); 1744 }, 1745 prev: function(elem) { 1746 return sibling(elem, "previousSibling"); 1747 }, 1748 nextAll: function(elem) { 1749 return dir(elem, "nextSibling"); 1750 }, 1751 prevAll: function(elem) { 1752 return dir(elem, "previousSibling"); 1753 }, 1754 nextUntil: function(elem, _i, until) { 1755 return dir(elem, "nextSibling", until); 1756 }, 1757 prevUntil: function(elem, _i, until) { 1758 return dir(elem, "previousSibling", until); 1759 }, 1760 siblings: function(elem) { 1761 return siblings((elem.parentNode || {}).firstChild, elem); 1762 }, 1763 children: function(elem) { 1764 return siblings(elem.firstChild); 1765 }, 1766 contents: function(elem) { 1767 if (elem.contentDocument != null && getProto(elem.contentDocument)) { 1768 return elem.contentDocument; 1769 } 1770 if (nodeName(elem, "template")) { 1771 elem = elem.content || elem; 1772 } 1773 return jQuery2.merge([], elem.childNodes); 1774 } 1775 }, function(name, fn) { 1776 jQuery2.fn[name] = function(until, selector) { 1777 var matched = jQuery2.map(this, fn, until); 1778 if (name.slice(-5) !== "Until") { 1779 selector = until; 1780 } 1781 if (selector && typeof selector === "string") { 1782 matched = jQuery2.filter(selector, matched); 1783 } 1784 if (this.length > 1) { 1785 if (!guaranteedUnique[name]) { 1786 jQuery2.uniqueSort(matched); 1787 } 1788 if (rparentsprev.test(name)) { 1789 matched.reverse(); 1790 } 1791 } 1792 return this.pushStack(matched); 1793 }; 1794 }); 1795 var rnothtmlwhite = /[^\x20\t\r\n\f]+/g; 1796 function createOptions(options) { 1797 var object = {}; 1798 jQuery2.each(options.match(rnothtmlwhite) || [], function(_, flag) { 1799 object[flag] = true; 1800 }); 1801 return object; 1802 } 1803 jQuery2.Callbacks = function(options) { 1804 options = typeof options === "string" ? createOptions(options) : jQuery2.extend({}, options); 1805 var firing, memory, fired, locked, list = [], queue = [], firingIndex = -1, fire = function() { 1806 locked = locked || options.once; 1807 fired = firing = true; 1808 for (; queue.length; firingIndex = -1) { 1809 memory = queue.shift(); 1810 while (++firingIndex < list.length) { 1811 if (list[firingIndex].apply(memory[0], memory[1]) === false && options.stopOnFalse) { 1812 firingIndex = list.length; 1813 memory = false; 1814 } 1815 } 1816 } 1817 if (!options.memory) { 1818 memory = false; 1819 } 1820 firing = false; 1821 if (locked) { 1822 if (memory) { 1823 list = []; 1824 } else { 1825 list = ""; 1826 } 1827 } 1828 }, self2 = { 1829 add: function() { 1830 if (list) { 1831 if (memory && !firing) { 1832 firingIndex = list.length - 1; 1833 queue.push(memory); 1834 } 1835 (function add(args) { 1836 jQuery2.each(args, function(_, arg) { 1837 if (isFunction(arg)) { 1838 if (!options.unique || !self2.has(arg)) { 1839 list.push(arg); 1840 } 1841 } else if (arg && arg.length && toType(arg) !== "string") { 1842 add(arg); 1843 } 1844 }); 1845 })(arguments); 1846 if (memory && !firing) { 1847 fire(); 1848 } 1849 } 1850 return this; 1851 }, 1852 remove: function() { 1853 jQuery2.each(arguments, function(_, arg) { 1854 var index; 1855 while ((index = jQuery2.inArray(arg, list, index)) > -1) { 1856 list.splice(index, 1); 1857 if (index <= firingIndex) { 1858 firingIndex--; 1859 } 1860 } 1861 }); 1862 return this; 1863 }, 1864 has: function(fn) { 1865 return fn ? jQuery2.inArray(fn, list) > -1 : list.length > 0; 1866 }, 1867 empty: function() { 1868 if (list) { 1869 list = []; 1870 } 1871 return this; 1872 }, 1873 disable: function() { 1874 locked = queue = []; 1875 list = memory = ""; 1876 return this; 1877 }, 1878 disabled: function() { 1879 return !list; 1880 }, 1881 lock: function() { 1882 locked = queue = []; 1883 if (!memory && !firing) { 1884 list = memory = ""; 1885 } 1886 return this; 1887 }, 1888 locked: function() { 1889 return !!locked; 1890 }, 1891 fireWith: function(context, args) { 1892 if (!locked) { 1893 args = args || []; 1894 args = [context, args.slice ? args.slice() : args]; 1895 queue.push(args); 1896 if (!firing) { 1897 fire(); 1898 } 1899 } 1900 return this; 1901 }, 1902 fire: function() { 1903 self2.fireWith(this, arguments); 1904 return this; 1905 }, 1906 fired: function() { 1907 return !!fired; 1908 } 1909 }; 1910 return self2; 1911 }; 1912 function Identity(v) { 1913 return v; 1914 } 1915 function Thrower(ex) { 1916 throw ex; 1917 } 1918 function adoptValue(value, resolve, reject, noValue) { 1919 var method; 1920 try { 1921 if (value && isFunction(method = value.promise)) { 1922 method.call(value).done(resolve).fail(reject); 1923 } else if (value && isFunction(method = value.then)) { 1924 method.call(value, resolve, reject); 1925 } else { 1926 resolve.apply(void 0, [value].slice(noValue)); 1927 } 1928 } catch (value2) { 1929 reject.apply(void 0, [value2]); 1930 } 1931 } 1932 jQuery2.extend({ 1933 Deferred: function(func) { 1934 var tuples = [ 1935 [ 1936 "notify", 1937 "progress", 1938 jQuery2.Callbacks("memory"), 1939 jQuery2.Callbacks("memory"), 1940 2 1941 ], 1942 [ 1943 "resolve", 1944 "done", 1945 jQuery2.Callbacks("once memory"), 1946 jQuery2.Callbacks("once memory"), 1947 0, 1948 "resolved" 1949 ], 1950 [ 1951 "reject", 1952 "fail", 1953 jQuery2.Callbacks("once memory"), 1954 jQuery2.Callbacks("once memory"), 1955 1, 1956 "rejected" 1957 ] 1958 ], state = "pending", promise = { 1959 state: function() { 1960 return state; 1961 }, 1962 always: function() { 1963 deferred.done(arguments).fail(arguments); 1964 return this; 1965 }, 1966 "catch": function(fn) { 1967 return promise.then(null, fn); 1968 }, 1969 pipe: function() { 1970 var fns = arguments; 1971 return jQuery2.Deferred(function(newDefer) { 1972 jQuery2.each(tuples, function(_i, tuple) { 1973 var fn = isFunction(fns[tuple[4]]) && fns[tuple[4]]; 1974 deferred[tuple[1]](function() { 1975 var returned = fn && fn.apply(this, arguments); 1976 if (returned && isFunction(returned.promise)) { 1977 returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject); 1978 } else { 1979 newDefer[tuple[0] + "With"]( 1980 this, 1981 fn ? [returned] : arguments 1982 ); 1983 } 1984 }); 1985 }); 1986 fns = null; 1987 }).promise(); 1988 }, 1989 then: function(onFulfilled, onRejected, onProgress) { 1990 var maxDepth = 0; 1991 function resolve(depth, deferred2, handler, special) { 1992 return function() { 1993 var that = this, args = arguments, mightThrow = function() { 1994 var returned, then; 1995 if (depth < maxDepth) { 1996 return; 1997 } 1998 returned = handler.apply(that, args); 1999 if (returned === deferred2.promise()) { 2000 throw new TypeError("Thenable self-resolution"); 2001 } 2002 then = returned && (typeof returned === "object" || typeof returned === "function") && returned.then; 2003 if (isFunction(then)) { 2004 if (special) { 2005 then.call( 2006 returned, 2007 resolve(maxDepth, deferred2, Identity, special), 2008 resolve(maxDepth, deferred2, Thrower, special) 2009 ); 2010 } else { 2011 maxDepth++; 2012 then.call( 2013 returned, 2014 resolve(maxDepth, deferred2, Identity, special), 2015 resolve(maxDepth, deferred2, Thrower, special), 2016 resolve( 2017 maxDepth, 2018 deferred2, 2019 Identity, 2020 deferred2.notifyWith 2021 ) 2022 ); 2023 } 2024 } else { 2025 if (handler !== Identity) { 2026 that = void 0; 2027 args = [returned]; 2028 } 2029 (special || deferred2.resolveWith)(that, args); 2030 } 2031 }, process = special ? mightThrow : function() { 2032 try { 2033 mightThrow(); 2034 } catch (e) { 2035 if (jQuery2.Deferred.exceptionHook) { 2036 jQuery2.Deferred.exceptionHook( 2037 e, 2038 process.stackTrace 2039 ); 2040 } 2041 if (depth + 1 >= maxDepth) { 2042 if (handler !== Thrower) { 2043 that = void 0; 2044 args = [e]; 2045 } 2046 deferred2.rejectWith(that, args); 2047 } 2048 } 2049 }; 2050 if (depth) { 2051 process(); 2052 } else { 2053 if (jQuery2.Deferred.getStackHook) { 2054 process.stackTrace = jQuery2.Deferred.getStackHook(); 2055 } 2056 window2.setTimeout(process); 2057 } 2058 }; 2059 } 2060 return jQuery2.Deferred(function(newDefer) { 2061 tuples[0][3].add( 2062 resolve( 2063 0, 2064 newDefer, 2065 isFunction(onProgress) ? onProgress : Identity, 2066 newDefer.notifyWith 2067 ) 2068 ); 2069 tuples[1][3].add( 2070 resolve( 2071 0, 2072 newDefer, 2073 isFunction(onFulfilled) ? onFulfilled : Identity 2074 ) 2075 ); 2076 tuples[2][3].add( 2077 resolve( 2078 0, 2079 newDefer, 2080 isFunction(onRejected) ? onRejected : Thrower 2081 ) 2082 ); 2083 }).promise(); 2084 }, 2085 promise: function(obj) { 2086 return obj != null ? jQuery2.extend(obj, promise) : promise; 2087 } 2088 }, deferred = {}; 2089 jQuery2.each(tuples, function(i, tuple) { 2090 var list = tuple[2], stateString = tuple[5]; 2091 promise[tuple[1]] = list.add; 2092 if (stateString) { 2093 list.add( 2094 function() { 2095 state = stateString; 2096 }, 2097 tuples[3 - i][2].disable, 2098 tuples[3 - i][3].disable, 2099 tuples[0][2].lock, 2100 tuples[0][3].lock 2101 ); 2102 } 2103 list.add(tuple[3].fire); 2104 deferred[tuple[0]] = function() { 2105 deferred[tuple[0] + "With"](this === deferred ? void 0 : this, arguments); 2106 return this; 2107 }; 2108 deferred[tuple[0] + "With"] = list.fireWith; 2109 }); 2110 promise.promise(deferred); 2111 if (func) { 2112 func.call(deferred, deferred); 2113 } 2114 return deferred; 2115 }, 2116 when: function(singleValue) { 2117 var remaining = arguments.length, i = remaining, resolveContexts = Array(i), resolveValues = slice.call(arguments), primary = jQuery2.Deferred(), updateFunc = function(i2) { 2118 return function(value) { 2119 resolveContexts[i2] = this; 2120 resolveValues[i2] = arguments.length > 1 ? slice.call(arguments) : value; 2121 if (!--remaining) { 2122 primary.resolveWith(resolveContexts, resolveValues); 2123 } 2124 }; 2125 }; 2126 if (remaining <= 1) { 2127 adoptValue( 2128 singleValue, 2129 primary.done(updateFunc(i)).resolve, 2130 primary.reject, 2131 !remaining 2132 ); 2133 if (primary.state() === "pending" || isFunction(resolveValues[i] && resolveValues[i].then)) { 2134 return primary.then(); 2135 } 2136 } 2137 while (i--) { 2138 adoptValue(resolveValues[i], updateFunc(i), primary.reject); 2139 } 2140 return primary.promise(); 2141 } 2142 }); 2143 var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; 2144 jQuery2.Deferred.exceptionHook = function(error, stack) { 2145 if (window2.console && window2.console.warn && error && rerrorNames.test(error.name)) { 2146 window2.console.warn("jQuery.Deferred exception: " + error.message, error.stack, stack); 2147 } 2148 }; 2149 jQuery2.readyException = function(error) { 2150 window2.setTimeout(function() { 2151 throw error; 2152 }); 2153 }; 2154 var readyList = jQuery2.Deferred(); 2155 jQuery2.fn.ready = function(fn) { 2156 readyList.then(fn).catch(function(error) { 2157 jQuery2.readyException(error); 2158 }); 2159 return this; 2160 }; 2161 jQuery2.extend({ 2162 isReady: false, 2163 readyWait: 1, 2164 ready: function(wait) { 2165 if (wait === true ? --jQuery2.readyWait : jQuery2.isReady) { 2166 return; 2167 } 2168 jQuery2.isReady = true; 2169 if (wait !== true && --jQuery2.readyWait > 0) { 2170 return; 2171 } 2172 readyList.resolveWith(document2, [jQuery2]); 2173 } 2174 }); 2175 jQuery2.ready.then = readyList.then; 2176 function completed() { 2177 document2.removeEventListener("DOMContentLoaded", completed); 2178 window2.removeEventListener("load", completed); 2179 jQuery2.ready(); 2180 } 2181 if (document2.readyState === "complete" || document2.readyState !== "loading" && !document2.documentElement.doScroll) { 2182 window2.setTimeout(jQuery2.ready); 2183 } else { 2184 document2.addEventListener("DOMContentLoaded", completed); 2185 window2.addEventListener("load", completed); 2186 } 2187 var access = function(elems, fn, key, value, chainable, emptyGet, raw) { 2188 var i = 0, len = elems.length, bulk = key == null; 2189 if (toType(key) === "object") { 2190 chainable = true; 2191 for (i in key) { 2192 access(elems, fn, i, key[i], true, emptyGet, raw); 2193 } 2194 } else if (value !== void 0) { 2195 chainable = true; 2196 if (!isFunction(value)) { 2197 raw = true; 2198 } 2199 if (bulk) { 2200 if (raw) { 2201 fn.call(elems, value); 2202 fn = null; 2203 } else { 2204 bulk = fn; 2205 fn = function(elem, _key, value2) { 2206 return bulk.call(jQuery2(elem), value2); 2207 }; 2208 } 2209 } 2210 if (fn) { 2211 for (; i < len; i++) { 2212 fn( 2213 elems[i], 2214 key, 2215 raw ? value : value.call(elems[i], i, fn(elems[i], key)) 2216 ); 2217 } 2218 } 2219 } 2220 if (chainable) { 2221 return elems; 2222 } 2223 if (bulk) { 2224 return fn.call(elems); 2225 } 2226 return len ? fn(elems[0], key) : emptyGet; 2227 }; 2228 var rmsPrefix = /^-ms-/, rdashAlpha = /-([a-z])/g; 2229 function fcamelCase(_all, letter) { 2230 return letter.toUpperCase(); 2231 } 2232 function camelCase(string) { 2233 return string.replace(rmsPrefix, "ms-").replace(rdashAlpha, fcamelCase); 2234 } 2235 var acceptData = function(owner) { 2236 return owner.nodeType === 1 || owner.nodeType === 9 || !+owner.nodeType; 2237 }; 2238 function Data() { 2239 this.expando = jQuery2.expando + Data.uid++; 2240 } 2241 Data.uid = 1; 2242 Data.prototype = { 2243 cache: function(owner) { 2244 var value = owner[this.expando]; 2245 if (!value) { 2246 value = {}; 2247 if (acceptData(owner)) { 2248 if (owner.nodeType) { 2249 owner[this.expando] = value; 2250 } else { 2251 Object.defineProperty(owner, this.expando, { 2252 value, 2253 configurable: true 2254 }); 2255 } 2256 } 2257 } 2258 return value; 2259 }, 2260 set: function(owner, data, value) { 2261 var prop, cache = this.cache(owner); 2262 if (typeof data === "string") { 2263 cache[camelCase(data)] = value; 2264 } else { 2265 for (prop in data) { 2266 cache[camelCase(prop)] = data[prop]; 2267 } 2268 } 2269 return cache; 2270 }, 2271 get: function(owner, key) { 2272 return key === void 0 ? this.cache(owner) : owner[this.expando] && owner[this.expando][camelCase(key)]; 2273 }, 2274 access: function(owner, key, value) { 2275 if (key === void 0 || key && typeof key === "string" && value === void 0) { 2276 return this.get(owner, key); 2277 } 2278 this.set(owner, key, value); 2279 return value !== void 0 ? value : key; 2280 }, 2281 remove: function(owner, key) { 2282 var i, cache = owner[this.expando]; 2283 if (cache === void 0) { 2284 return; 2285 } 2286 if (key !== void 0) { 2287 if (Array.isArray(key)) { 2288 key = key.map(camelCase); 2289 } else { 2290 key = camelCase(key); 2291 key = key in cache ? [key] : key.match(rnothtmlwhite) || []; 2292 } 2293 i = key.length; 2294 while (i--) { 2295 delete cache[key[i]]; 2296 } 2297 } 2298 if (key === void 0 || jQuery2.isEmptyObject(cache)) { 2299 if (owner.nodeType) { 2300 owner[this.expando] = void 0; 2301 } else { 2302 delete owner[this.expando]; 2303 } 2304 } 2305 }, 2306 hasData: function(owner) { 2307 var cache = owner[this.expando]; 2308 return cache !== void 0 && !jQuery2.isEmptyObject(cache); 2309 } 2310 }; 2311 var dataPriv = new Data(); 2312 var dataUser = new Data(); 2313 var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, rmultiDash = /[A-Z]/g; 2314 function getData(data) { 2315 if (data === "true") { 2316 return true; 2317 } 2318 if (data === "false") { 2319 return false; 2320 } 2321 if (data === "null") { 2322 return null; 2323 } 2324 if (data === +data + "") { 2325 return +data; 2326 } 2327 if (rbrace.test(data)) { 2328 return JSON.parse(data); 2329 } 2330 return data; 2331 } 2332 function dataAttr(elem, key, data) { 2333 var name; 2334 if (data === void 0 && elem.nodeType === 1) { 2335 name = "data-" + key.replace(rmultiDash, "-$&").toLowerCase(); 2336 data = elem.getAttribute(name); 2337 if (typeof data === "string") { 2338 try { 2339 data = getData(data); 2340 } catch (e) { 2341 } 2342 dataUser.set(elem, key, data); 2343 } else { 2344 data = void 0; 2345 } 2346 } 2347 return data; 2348 } 2349 jQuery2.extend({ 2350 hasData: function(elem) { 2351 return dataUser.hasData(elem) || dataPriv.hasData(elem); 2352 }, 2353 data: function(elem, name, data) { 2354 return dataUser.access(elem, name, data); 2355 }, 2356 removeData: function(elem, name) { 2357 dataUser.remove(elem, name); 2358 }, 2359 _data: function(elem, name, data) { 2360 return dataPriv.access(elem, name, data); 2361 }, 2362 _removeData: function(elem, name) { 2363 dataPriv.remove(elem, name); 2364 } 2365 }); 2366 jQuery2.fn.extend({ 2367 data: function(key, value) { 2368 var i, name, data, elem = this[0], attrs = elem && elem.attributes; 2369 if (key === void 0) { 2370 if (this.length) { 2371 data = dataUser.get(elem); 2372 if (elem.nodeType === 1 && !dataPriv.get(elem, "hasDataAttrs")) { 2373 i = attrs.length; 2374 while (i--) { 2375 if (attrs[i]) { 2376 name = attrs[i].name; 2377 if (name.indexOf("data-") === 0) { 2378 name = camelCase(name.slice(5)); 2379 dataAttr(elem, name, data[name]); 2380 } 2381 } 2382 } 2383 dataPriv.set(elem, "hasDataAttrs", true); 2384 } 2385 } 2386 return data; 2387 } 2388 if (typeof key === "object") { 2389 return this.each(function() { 2390 dataUser.set(this, key); 2391 }); 2392 } 2393 return access(this, function(value2) { 2394 var data2; 2395 if (elem && value2 === void 0) { 2396 data2 = dataUser.get(elem, key); 2397 if (data2 !== void 0) { 2398 return data2; 2399 } 2400 data2 = dataAttr(elem, key); 2401 if (data2 !== void 0) { 2402 return data2; 2403 } 2404 return; 2405 } 2406 this.each(function() { 2407 dataUser.set(this, key, value2); 2408 }); 2409 }, null, value, arguments.length > 1, null, true); 2410 }, 2411 removeData: function(key) { 2412 return this.each(function() { 2413 dataUser.remove(this, key); 2414 }); 2415 } 2416 }); 2417 jQuery2.extend({ 2418 queue: function(elem, type, data) { 2419 var queue; 2420 if (elem) { 2421 type = (type || "fx") + "queue"; 2422 queue = dataPriv.get(elem, type); 2423 if (data) { 2424 if (!queue || Array.isArray(data)) { 2425 queue = dataPriv.access(elem, type, jQuery2.makeArray(data)); 2426 } else { 2427 queue.push(data); 2428 } 2429 } 2430 return queue || []; 2431 } 2432 }, 2433 dequeue: function(elem, type) { 2434 type = type || "fx"; 2435 var queue = jQuery2.queue(elem, type), startLength = queue.length, fn = queue.shift(), hooks = jQuery2._queueHooks(elem, type), next = function() { 2436 jQuery2.dequeue(elem, type); 2437 }; 2438 if (fn === "inprogress") { 2439 fn = queue.shift(); 2440 startLength--; 2441 } 2442 if (fn) { 2443 if (type === "fx") { 2444 queue.unshift("inprogress"); 2445 } 2446 delete hooks.stop; 2447 fn.call(elem, next, hooks); 2448 } 2449 if (!startLength && hooks) { 2450 hooks.empty.fire(); 2451 } 2452 }, 2453 _queueHooks: function(elem, type) { 2454 var key = type + "queueHooks"; 2455 return dataPriv.get(elem, key) || dataPriv.access(elem, key, { 2456 empty: jQuery2.Callbacks("once memory").add(function() { 2457 dataPriv.remove(elem, [type + "queue", key]); 2458 }) 2459 }); 2460 } 2461 }); 2462 jQuery2.fn.extend({ 2463 queue: function(type, data) { 2464 var setter = 2; 2465 if (typeof type !== "string") { 2466 data = type; 2467 type = "fx"; 2468 setter--; 2469 } 2470 if (arguments.length < setter) { 2471 return jQuery2.queue(this[0], type); 2472 } 2473 return data === void 0 ? this : this.each(function() { 2474 var queue = jQuery2.queue(this, type, data); 2475 jQuery2._queueHooks(this, type); 2476 if (type === "fx" && queue[0] !== "inprogress") { 2477 jQuery2.dequeue(this, type); 2478 } 2479 }); 2480 }, 2481 dequeue: function(type) { 2482 return this.each(function() { 2483 jQuery2.dequeue(this, type); 2484 }); 2485 }, 2486 clearQueue: function(type) { 2487 return this.queue(type || "fx", []); 2488 }, 2489 promise: function(type, obj) { 2490 var tmp, count = 1, defer = jQuery2.Deferred(), elements = this, i = this.length, resolve = function() { 2491 if (!--count) { 2492 defer.resolveWith(elements, [elements]); 2493 } 2494 }; 2495 if (typeof type !== "string") { 2496 obj = type; 2497 type = void 0; 2498 } 2499 type = type || "fx"; 2500 while (i--) { 2501 tmp = dataPriv.get(elements[i], type + "queueHooks"); 2502 if (tmp && tmp.empty) { 2503 count++; 2504 tmp.empty.add(resolve); 2505 } 2506 } 2507 resolve(); 2508 return defer.promise(obj); 2509 } 2510 }); 2511 var pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source; 2512 var rcssNum = new RegExp("^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i"); 2513 var cssExpand = ["Top", "Right", "Bottom", "Left"]; 2514 var documentElement = document2.documentElement; 2515 var isAttached = function(elem) { 2516 return jQuery2.contains(elem.ownerDocument, elem); 2517 }, composed = { composed: true }; 2518 if (documentElement.getRootNode) { 2519 isAttached = function(elem) { 2520 return jQuery2.contains(elem.ownerDocument, elem) || elem.getRootNode(composed) === elem.ownerDocument; 2521 }; 2522 } 2523 var isHiddenWithinTree = function(elem, el) { 2524 elem = el || elem; 2525 return elem.style.display === "none" || elem.style.display === "" && isAttached(elem) && jQuery2.css(elem, "display") === "none"; 2526 }; 2527 function adjustCSS(elem, prop, valueParts, tween) { 2528 var adjusted, scale, maxIterations = 20, currentValue = tween ? function() { 2529 return tween.cur(); 2530 } : function() { 2531 return jQuery2.css(elem, prop, ""); 2532 }, initial = currentValue(), unit = valueParts && valueParts[3] || (jQuery2.cssNumber[prop] ? "" : "px"), initialInUnit = elem.nodeType && (jQuery2.cssNumber[prop] || unit !== "px" && +initial) && rcssNum.exec(jQuery2.css(elem, prop)); 2533 if (initialInUnit && initialInUnit[3] !== unit) { 2534 initial = initial / 2; 2535 unit = unit || initialInUnit[3]; 2536 initialInUnit = +initial || 1; 2537 while (maxIterations--) { 2538 jQuery2.style(elem, prop, initialInUnit + unit); 2539 if ((1 - scale) * (1 - (scale = currentValue() / initial || 0.5)) <= 0) { 2540 maxIterations = 0; 2541 } 2542 initialInUnit = initialInUnit / scale; 2543 } 2544 initialInUnit = initialInUnit * 2; 2545 jQuery2.style(elem, prop, initialInUnit + unit); 2546 valueParts = valueParts || []; 2547 } 2548 if (valueParts) { 2549 initialInUnit = +initialInUnit || +initial || 0; 2550 adjusted = valueParts[1] ? initialInUnit + (valueParts[1] + 1) * valueParts[2] : +valueParts[2]; 2551 if (tween) { 2552 tween.unit = unit; 2553 tween.start = initialInUnit; 2554 tween.end = adjusted; 2555 } 2556 } 2557 return adjusted; 2558 } 2559 var defaultDisplayMap = {}; 2560 function getDefaultDisplay(elem) { 2561 var temp, doc = elem.ownerDocument, nodeName2 = elem.nodeName, display = defaultDisplayMap[nodeName2]; 2562 if (display) { 2563 return display; 2564 } 2565 temp = doc.body.appendChild(doc.createElement(nodeName2)); 2566 display = jQuery2.css(temp, "display"); 2567 temp.parentNode.removeChild(temp); 2568 if (display === "none") { 2569 display = "block"; 2570 } 2571 defaultDisplayMap[nodeName2] = display; 2572 return display; 2573 } 2574 function showHide(elements, show) { 2575 var display, elem, values = [], index = 0, length = elements.length; 2576 for (; index < length; index++) { 2577 elem = elements[index]; 2578 if (!elem.style) { 2579 continue; 2580 } 2581 display = elem.style.display; 2582 if (show) { 2583 if (display === "none") { 2584 values[index] = dataPriv.get(elem, "display") || null; 2585 if (!values[index]) { 2586 elem.style.display = ""; 2587 } 2588 } 2589 if (elem.style.display === "" && isHiddenWithinTree(elem)) { 2590 values[index] = getDefaultDisplay(elem); 2591 } 2592 } else { 2593 if (display !== "none") { 2594 values[index] = "none"; 2595 dataPriv.set(elem, "display", display); 2596 } 2597 } 2598 } 2599 for (index = 0; index < length; index++) { 2600 if (values[index] != null) { 2601 elements[index].style.display = values[index]; 2602 } 2603 } 2604 return elements; 2605 } 2606 jQuery2.fn.extend({ 2607 show: function() { 2608 return showHide(this, true); 2609 }, 2610 hide: function() { 2611 return showHide(this); 2612 }, 2613 toggle: function(state) { 2614 if (typeof state === "boolean") { 2615 return state ? this.show() : this.hide(); 2616 } 2617 return this.each(function() { 2618 if (isHiddenWithinTree(this)) { 2619 jQuery2(this).show(); 2620 } else { 2621 jQuery2(this).hide(); 2622 } 2623 }); 2624 } 2625 }); 2626 var rcheckableType = /^(?:checkbox|radio)$/i; 2627 var rtagName = /<([a-z][^\/\0>\x20\t\r\n\f]*)/i; 2628 var rscriptType = /^$|^module$|\/(?:java|ecma)script/i; 2629 (function() { 2630 var fragment = document2.createDocumentFragment(), div = fragment.appendChild(document2.createElement("div")), input = document2.createElement("input"); 2631 input.setAttribute("type", "radio"); 2632 input.setAttribute("checked", "checked"); 2633 input.setAttribute("name", "t"); 2634 div.appendChild(input); 2635 support2.checkClone = div.cloneNode(true).cloneNode(true).lastChild.checked; 2636 div.innerHTML = "<textarea>x</textarea>"; 2637 support2.noCloneChecked = !!div.cloneNode(true).lastChild.defaultValue; 2638 div.innerHTML = "<option></option>"; 2639 support2.option = !!div.lastChild; 2640 })(); 2641 var wrapMap = { 2642 thead: [1, "<table>", "</table>"], 2643 col: [2, "<table><colgroup>", "</colgroup></table>"], 2644 tr: [2, "<table><tbody>", "</tbody></table>"], 2645 td: [3, "<table><tbody><tr>", "</tr></tbody></table>"], 2646 _default: [0, "", ""] 2647 }; 2648 wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; 2649 wrapMap.th = wrapMap.td; 2650 if (!support2.option) { 2651 wrapMap.optgroup = wrapMap.option = [1, "<select multiple='multiple'>", "</select>"]; 2652 } 2653 function getAll(context, tag) { 2654 var ret; 2655 if (typeof context.getElementsByTagName !== "undefined") { 2656 ret = context.getElementsByTagName(tag || "*"); 2657 } else if (typeof context.querySelectorAll !== "undefined") { 2658 ret = context.querySelectorAll(tag || "*"); 2659 } else { 2660 ret = []; 2661 } 2662 if (tag === void 0 || tag && nodeName(context, tag)) { 2663 return jQuery2.merge([context], ret); 2664 } 2665 return ret; 2666 } 2667 function setGlobalEval(elems, refElements) { 2668 var i = 0, l = elems.length; 2669 for (; i < l; i++) { 2670 dataPriv.set( 2671 elems[i], 2672 "globalEval", 2673 !refElements || dataPriv.get(refElements[i], "globalEval") 2674 ); 2675 } 2676 } 2677 var rhtml = /<|&#?\w+;/; 2678 function buildFragment(elems, context, scripts, selection, ignored) { 2679 var elem, tmp, tag, wrap, attached, j, fragment = context.createDocumentFragment(), nodes = [], i = 0, l = elems.length; 2680 for (; i < l; i++) { 2681 elem = elems[i]; 2682 if (elem || elem === 0) { 2683 if (toType(elem) === "object") { 2684 jQuery2.merge(nodes, elem.nodeType ? [elem] : elem); 2685 } else if (!rhtml.test(elem)) { 2686 nodes.push(context.createTextNode(elem)); 2687 } else { 2688 tmp = tmp || fragment.appendChild(context.createElement("div")); 2689 tag = (rtagName.exec(elem) || ["", ""])[1].toLowerCase(); 2690 wrap = wrapMap[tag] || wrapMap._default; 2691 tmp.innerHTML = wrap[1] + jQuery2.htmlPrefilter(elem) + wrap[2]; 2692 j = wrap[0]; 2693 while (j--) { 2694 tmp = tmp.lastChild; 2695 } 2696 jQuery2.merge(nodes, tmp.childNodes); 2697 tmp = fragment.firstChild; 2698 tmp.textContent = ""; 2699 } 2700 } 2701 } 2702 fragment.textContent = ""; 2703 i = 0; 2704 while (elem = nodes[i++]) { 2705 if (selection && jQuery2.inArray(elem, selection) > -1) { 2706 if (ignored) { 2707 ignored.push(elem); 2708 } 2709 continue; 2710 } 2711 attached = isAttached(elem); 2712 tmp = getAll(fragment.appendChild(elem), "script"); 2713 if (attached) { 2714 setGlobalEval(tmp); 2715 } 2716 if (scripts) { 2717 j = 0; 2718 while (elem = tmp[j++]) { 2719 if (rscriptType.test(elem.type || "")) { 2720 scripts.push(elem); 2721 } 2722 } 2723 } 2724 } 2725 return fragment; 2726 } 2727 var rtypenamespace = /^([^.]*)(?:\.(.+)|)/; 2728 function returnTrue() { 2729 return true; 2730 } 2731 function returnFalse() { 2732 return false; 2733 } 2734 function expectSync(elem, type) { 2735 return elem === safeActiveElement() === (type === "focus"); 2736 } 2737 function safeActiveElement() { 2738 try { 2739 return document2.activeElement; 2740 } catch (err) { 2741 } 2742 } 2743 function on(elem, types, selector, data, fn, one) { 2744 var origFn, type; 2745 if (typeof types === "object") { 2746 if (typeof selector !== "string") { 2747 data = data || selector; 2748 selector = void 0; 2749 } 2750 for (type in types) { 2751 on(elem, type, selector, data, types[type], one); 2752 } 2753 return elem; 2754 } 2755 if (data == null && fn == null) { 2756 fn = selector; 2757 data = selector = void 0; 2758 } else if (fn == null) { 2759 if (typeof selector === "string") { 2760 fn = data; 2761 data = void 0; 2762 } else { 2763 fn = data; 2764 data = selector; 2765 selector = void 0; 2766 } 2767 } 2768 if (fn === false) { 2769 fn = returnFalse; 2770 } else if (!fn) { 2771 return elem; 2772 } 2773 if (one === 1) { 2774 origFn = fn; 2775 fn = function(event2) { 2776 jQuery2().off(event2); 2777 return origFn.apply(this, arguments); 2778 }; 2779 fn.guid = origFn.guid || (origFn.guid = jQuery2.guid++); 2780 } 2781 return elem.each(function() { 2782 jQuery2.event.add(this, types, fn, data, selector); 2783 }); 2784 } 2785 jQuery2.event = { 2786 global: {}, 2787 add: function(elem, types, handler, data, selector) { 2788 var handleObjIn, eventHandle, tmp, events2, t, handleObj, special, handlers, type, namespaces, origType, elemData = dataPriv.get(elem); 2789 if (!acceptData(elem)) { 2790 return; 2791 } 2792 if (handler.handler) { 2793 handleObjIn = handler; 2794 handler = handleObjIn.handler; 2795 selector = handleObjIn.selector; 2796 } 2797 if (selector) { 2798 jQuery2.find.matchesSelector(documentElement, selector); 2799 } 2800 if (!handler.guid) { 2801 handler.guid = jQuery2.guid++; 2802 } 2803 if (!(events2 = elemData.events)) { 2804 events2 = elemData.events = /* @__PURE__ */ Object.create(null); 2805 } 2806 if (!(eventHandle = elemData.handle)) { 2807 eventHandle = elemData.handle = function(e) { 2808 return typeof jQuery2 !== "undefined" && jQuery2.event.triggered !== e.type ? jQuery2.event.dispatch.apply(elem, arguments) : void 0; 2809 }; 2810 } 2811 types = (types || "").match(rnothtmlwhite) || [""]; 2812 t = types.length; 2813 while (t--) { 2814 tmp = rtypenamespace.exec(types[t]) || []; 2815 type = origType = tmp[1]; 2816 namespaces = (tmp[2] || "").split(".").sort(); 2817 if (!type) { 2818 continue; 2819 } 2820 special = jQuery2.event.special[type] || {}; 2821 type = (selector ? special.delegateType : special.bindType) || type; 2822 special = jQuery2.event.special[type] || {}; 2823 handleObj = jQuery2.extend({ 2824 type, 2825 origType, 2826 data, 2827 handler, 2828 guid: handler.guid, 2829 selector, 2830 needsContext: selector && jQuery2.expr.match.needsContext.test(selector), 2831 namespace: namespaces.join(".") 2832 }, handleObjIn); 2833 if (!(handlers = events2[type])) { 2834 handlers = events2[type] = []; 2835 handlers.delegateCount = 0; 2836 if (!special.setup || special.setup.call(elem, data, namespaces, eventHandle) === false) { 2837 if (elem.addEventListener) { 2838 elem.addEventListener(type, eventHandle); 2839 } 2840 } 2841 } 2842 if (special.add) { 2843 special.add.call(elem, handleObj); 2844 if (!handleObj.handler.guid) { 2845 handleObj.handler.guid = handler.guid; 2846 } 2847 } 2848 if (selector) { 2849 handlers.splice(handlers.delegateCount++, 0, handleObj); 2850 } else { 2851 handlers.push(handleObj); 2852 } 2853 jQuery2.event.global[type] = true; 2854 } 2855 }, 2856 remove: function(elem, types, handler, selector, mappedTypes) { 2857 var j, origCount, tmp, events2, t, handleObj, special, handlers, type, namespaces, origType, elemData = dataPriv.hasData(elem) && dataPriv.get(elem); 2858 if (!elemData || !(events2 = elemData.events)) { 2859 return; 2860 } 2861 types = (types || "").match(rnothtmlwhite) || [""]; 2862 t = types.length; 2863 while (t--) { 2864 tmp = rtypenamespace.exec(types[t]) || []; 2865 type = origType = tmp[1]; 2866 namespaces = (tmp[2] || "").split(".").sort(); 2867 if (!type) { 2868 for (type in events2) { 2869 jQuery2.event.remove(elem, type + types[t], handler, selector, true); 2870 } 2871 continue; 2872 } 2873 special = jQuery2.event.special[type] || {}; 2874 type = (selector ? special.delegateType : special.bindType) || type; 2875 handlers = events2[type] || []; 2876 tmp = tmp[2] && new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)"); 2877 origCount = j = handlers.length; 2878 while (j--) { 2879 handleObj = handlers[j]; 2880 if ((mappedTypes || origType === handleObj.origType) && (!handler || handler.guid === handleObj.guid) && (!tmp || tmp.test(handleObj.namespace)) && (!selector || selector === handleObj.selector || selector === "**" && handleObj.selector)) { 2881 handlers.splice(j, 1); 2882 if (handleObj.selector) { 2883 handlers.delegateCount--; 2884 } 2885 if (special.remove) { 2886 special.remove.call(elem, handleObj); 2887 } 2888 } 2889 } 2890 if (origCount && !handlers.length) { 2891 if (!special.teardown || special.teardown.call(elem, namespaces, elemData.handle) === false) { 2892 jQuery2.removeEvent(elem, type, elemData.handle); 2893 } 2894 delete events2[type]; 2895 } 2896 } 2897 if (jQuery2.isEmptyObject(events2)) { 2898 dataPriv.remove(elem, "handle events"); 2899 } 2900 }, 2901 dispatch: function(nativeEvent) { 2902 var i, j, ret, matched, handleObj, handlerQueue, args = new Array(arguments.length), event2 = jQuery2.event.fix(nativeEvent), handlers = (dataPriv.get(this, "events") || /* @__PURE__ */ Object.create(null))[event2.type] || [], special = jQuery2.event.special[event2.type] || {}; 2903 args[0] = event2; 2904 for (i = 1; i < arguments.length; i++) { 2905 args[i] = arguments[i]; 2906 } 2907 event2.delegateTarget = this; 2908 if (special.preDispatch && special.preDispatch.call(this, event2) === false) { 2909 return; 2910 } 2911 handlerQueue = jQuery2.event.handlers.call(this, event2, handlers); 2912 i = 0; 2913 while ((matched = handlerQueue[i++]) && !event2.isPropagationStopped()) { 2914 event2.currentTarget = matched.elem; 2915 j = 0; 2916 while ((handleObj = matched.handlers[j++]) && !event2.isImmediatePropagationStopped()) { 2917 if (!event2.rnamespace || handleObj.namespace === false || event2.rnamespace.test(handleObj.namespace)) { 2918 event2.handleObj = handleObj; 2919 event2.data = handleObj.data; 2920 ret = ((jQuery2.event.special[handleObj.origType] || {}).handle || handleObj.handler).apply(matched.elem, args); 2921 if (ret !== void 0) { 2922 if ((event2.result = ret) === false) { 2923 event2.preventDefault(); 2924 event2.stopPropagation(); 2925 } 2926 } 2927 } 2928 } 2929 } 2930 if (special.postDispatch) { 2931 special.postDispatch.call(this, event2); 2932 } 2933 return event2.result; 2934 }, 2935 handlers: function(event2, handlers) { 2936 var i, handleObj, sel, matchedHandlers, matchedSelectors, handlerQueue = [], delegateCount = handlers.delegateCount, cur = event2.target; 2937 if (delegateCount && cur.nodeType && !(event2.type === "click" && event2.button >= 1)) { 2938 for (; cur !== this; cur = cur.parentNode || this) { 2939 if (cur.nodeType === 1 && !(event2.type === "click" && cur.disabled === true)) { 2940 matchedHandlers = []; 2941 matchedSelectors = {}; 2942 for (i = 0; i < delegateCount; i++) { 2943 handleObj = handlers[i]; 2944 sel = handleObj.selector + " "; 2945 if (matchedSelectors[sel] === void 0) { 2946 matchedSelectors[sel] = handleObj.needsContext ? jQuery2(sel, this).index(cur) > -1 : jQuery2.find(sel, this, null, [cur]).length; 2947 } 2948 if (matchedSelectors[sel]) { 2949 matchedHandlers.push(handleObj); 2950 } 2951 } 2952 if (matchedHandlers.length) { 2953 handlerQueue.push({ elem: cur, handlers: matchedHandlers }); 2954 } 2955 } 2956 } 2957 } 2958 cur = this; 2959 if (delegateCount < handlers.length) { 2960 handlerQueue.push({ elem: cur, handlers: handlers.slice(delegateCount) }); 2961 } 2962 return handlerQueue; 2963 }, 2964 addProp: function(name, hook) { 2965 Object.defineProperty(jQuery2.Event.prototype, name, { 2966 enumerable: true, 2967 configurable: true, 2968 get: isFunction(hook) ? function() { 2969 if (this.originalEvent) { 2970 return hook(this.originalEvent); 2971 } 2972 } : function() { 2973 if (this.originalEvent) { 2974 return this.originalEvent[name]; 2975 } 2976 }, 2977 set: function(value) { 2978 Object.defineProperty(this, name, { 2979 enumerable: true, 2980 configurable: true, 2981 writable: true, 2982 value 2983 }); 2984 } 2985 }); 2986 }, 2987 fix: function(originalEvent) { 2988 return originalEvent[jQuery2.expando] ? originalEvent : new jQuery2.Event(originalEvent); 2989 }, 2990 special: { 2991 load: { 2992 noBubble: true 2993 }, 2994 click: { 2995 setup: function(data) { 2996 var el = this || data; 2997 if (rcheckableType.test(el.type) && el.click && nodeName(el, "input")) { 2998 leverageNative(el, "click", returnTrue); 2999 } 3000 return false; 3001 }, 3002 trigger: function(data) { 3003 var el = this || data; 3004 if (rcheckableType.test(el.type) && el.click && nodeName(el, "input")) { 3005 leverageNative(el, "click"); 3006 } 3007 return true; 3008 }, 3009 _default: function(event2) { 3010 var target = event2.target; 3011 return rcheckableType.test(target.type) && target.click && nodeName(target, "input") && dataPriv.get(target, "click") || nodeName(target, "a"); 3012 } 3013 }, 3014 beforeunload: { 3015 postDispatch: function(event2) { 3016 if (event2.result !== void 0 && event2.originalEvent) { 3017 event2.originalEvent.returnValue = event2.result; 3018 } 3019 } 3020 } 3021 } 3022 }; 3023 function leverageNative(el, type, expectSync2) { 3024 if (!expectSync2) { 3025 if (dataPriv.get(el, type) === void 0) { 3026 jQuery2.event.add(el, type, returnTrue); 3027 } 3028 return; 3029 } 3030 dataPriv.set(el, type, false); 3031 jQuery2.event.add(el, type, { 3032 namespace: false, 3033 handler: function(event2) { 3034 var notAsync, result, saved = dataPriv.get(this, type); 3035 if (event2.isTrigger & 1 && this[type]) { 3036 if (!saved.length) { 3037 saved = slice.call(arguments); 3038 dataPriv.set(this, type, saved); 3039 notAsync = expectSync2(this, type); 3040 this[type](); 3041 result = dataPriv.get(this, type); 3042 if (saved !== result || notAsync) { 3043 dataPriv.set(this, type, false); 3044 } else { 3045 result = {}; 3046 } 3047 if (saved !== result) { 3048 event2.stopImmediatePropagation(); 3049 event2.preventDefault(); 3050 return result && result.value; 3051 } 3052 } else if ((jQuery2.event.special[type] || {}).delegateType) { 3053 event2.stopPropagation(); 3054 } 3055 } else if (saved.length) { 3056 dataPriv.set(this, type, { 3057 value: jQuery2.event.trigger( 3058 jQuery2.extend(saved[0], jQuery2.Event.prototype), 3059 saved.slice(1), 3060 this 3061 ) 3062 }); 3063 event2.stopImmediatePropagation(); 3064 } 3065 } 3066 }); 3067 } 3068 jQuery2.removeEvent = function(elem, type, handle) { 3069 if (elem.removeEventListener) { 3070 elem.removeEventListener(type, handle); 3071 } 3072 }; 3073 jQuery2.Event = function(src, props) { 3074 if (!(this instanceof jQuery2.Event)) { 3075 return new jQuery2.Event(src, props); 3076 } 3077 if (src && src.type) { 3078 this.originalEvent = src; 3079 this.type = src.type; 3080 this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === void 0 && src.returnValue === false ? returnTrue : returnFalse; 3081 this.target = src.target && src.target.nodeType === 3 ? src.target.parentNode : src.target; 3082 this.currentTarget = src.currentTarget; 3083 this.relatedTarget = src.relatedTarget; 3084 } else { 3085 this.type = src; 3086 } 3087 if (props) { 3088 jQuery2.extend(this, props); 3089 } 3090 this.timeStamp = src && src.timeStamp || Date.now(); 3091 this[jQuery2.expando] = true; 3092 }; 3093 jQuery2.Event.prototype = { 3094 constructor: jQuery2.Event, 3095 isDefaultPrevented: returnFalse, 3096 isPropagationStopped: returnFalse, 3097 isImmediatePropagationStopped: returnFalse, 3098 isSimulated: false, 3099 preventDefault: function() { 3100 var e = this.originalEvent; 3101 this.isDefaultPrevented = returnTrue; 3102 if (e && !this.isSimulated) { 3103 e.preventDefault(); 3104 } 3105 }, 3106 stopPropagation: function() { 3107 var e = this.originalEvent; 3108 this.isPropagationStopped = returnTrue; 3109 if (e && !this.isSimulated) { 3110 e.stopPropagation(); 3111 } 3112 }, 3113 stopImmediatePropagation: function() { 3114 var e = this.originalEvent; 3115 this.isImmediatePropagationStopped = returnTrue; 3116 if (e && !this.isSimulated) { 3117 e.stopImmediatePropagation(); 3118 } 3119 this.stopPropagation(); 3120 } 3121 }; 3122 jQuery2.each({ 3123 altKey: true, 3124 bubbles: true, 3125 cancelable: true, 3126 changedTouches: true, 3127 ctrlKey: true, 3128 detail: true, 3129 eventPhase: true, 3130 metaKey: true, 3131 pageX: true, 3132 pageY: true, 3133 shiftKey: true, 3134 view: true, 3135 "char": true, 3136 code: true, 3137 charCode: true, 3138 key: true, 3139 keyCode: true, 3140 button: true, 3141 buttons: true, 3142 clientX: true, 3143 clientY: true, 3144 offsetX: true, 3145 offsetY: true, 3146 pointerId: true, 3147 pointerType: true, 3148 screenX: true, 3149 screenY: true, 3150 targetTouches: true, 3151 toElement: true, 3152 touches: true, 3153 which: true 3154 }, jQuery2.event.addProp); 3155 jQuery2.each({ focus: "focusin", blur: "focusout" }, function(type, delegateType) { 3156 jQuery2.event.special[type] = { 3157 setup: function() { 3158 leverageNative(this, type, expectSync); 3159 return false; 3160 }, 3161 trigger: function() { 3162 leverageNative(this, type); 3163 return true; 3164 }, 3165 _default: function(event2) { 3166 return dataPriv.get(event2.target, type); 3167 }, 3168 delegateType 3169 }; 3170 }); 3171 jQuery2.each({ 3172 mouseenter: "mouseover", 3173 mouseleave: "mouseout", 3174 pointerenter: "pointerover", 3175 pointerleave: "pointerout" 3176 }, function(orig, fix) { 3177 jQuery2.event.special[orig] = { 3178 delegateType: fix, 3179 bindType: fix, 3180 handle: function(event2) { 3181 var ret, target = this, related = event2.relatedTarget, handleObj = event2.handleObj; 3182 if (!related || related !== target && !jQuery2.contains(target, related)) { 3183 event2.type = handleObj.origType; 3184 ret = handleObj.handler.apply(this, arguments); 3185 event2.type = fix; 3186 } 3187 return ret; 3188 } 3189 }; 3190 }); 3191 jQuery2.fn.extend({ 3192 on: function(types, selector, data, fn) { 3193 return on(this, types, selector, data, fn); 3194 }, 3195 one: function(types, selector, data, fn) { 3196 return on(this, types, selector, data, fn, 1); 3197 }, 3198 off: function(types, selector, fn) { 3199 var handleObj, type; 3200 if (types && types.preventDefault && types.handleObj) { 3201 handleObj = types.handleObj; 3202 jQuery2(types.delegateTarget).off( 3203 handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, 3204 handleObj.selector, 3205 handleObj.handler 3206 ); 3207 return this; 3208 } 3209 if (typeof types === "object") { 3210 for (type in types) { 3211 this.off(type, selector, types[type]); 3212 } 3213 return this; 3214 } 3215 if (selector === false || typeof selector === "function") { 3216 fn = selector; 3217 selector = void 0; 3218 } 3219 if (fn === false) { 3220 fn = returnFalse; 3221 } 3222 return this.each(function() { 3223 jQuery2.event.remove(this, types, fn, selector); 3224 }); 3225 } 3226 }); 3227 var rnoInnerhtml = /<script|<style|<link/i, rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, rcleanScript = /^\s*<!\[CDATA\[|\]\]>\s*$/g; 3228 function manipulationTarget(elem, content) { 3229 if (nodeName(elem, "table") && nodeName(content.nodeType !== 11 ? content : content.firstChild, "tr")) { 3230 return jQuery2(elem).children("tbody")[0] || elem; 3231 } 3232 return elem; 3233 } 3234 function disableScript(elem) { 3235 elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type; 3236 return elem; 3237 } 3238 function restoreScript(elem) { 3239 if ((elem.type || "").slice(0, 5) === "true/") { 3240 elem.type = elem.type.slice(5); 3241 } else { 3242 elem.removeAttribute("type"); 3243 } 3244 return elem; 3245 } 3246 function cloneCopyEvent(src, dest) { 3247 var i, l, type, pdataOld, udataOld, udataCur, events2; 3248 if (dest.nodeType !== 1) { 3249 return; 3250 } 3251 if (dataPriv.hasData(src)) { 3252 pdataOld = dataPriv.get(src); 3253 events2 = pdataOld.events; 3254 if (events2) { 3255 dataPriv.remove(dest, "handle events"); 3256 for (type in events2) { 3257 for (i = 0, l = events2[type].length; i < l; i++) { 3258 jQuery2.event.add(dest, type, events2[type][i]); 3259 } 3260 } 3261 } 3262 } 3263 if (dataUser.hasData(src)) { 3264 udataOld = dataUser.access(src); 3265 udataCur = jQuery2.extend({}, udataOld); 3266 dataUser.set(dest, udataCur); 3267 } 3268 } 3269 function fixInput(src, dest) { 3270 var nodeName2 = dest.nodeName.toLowerCase(); 3271 if (nodeName2 === "input" && rcheckableType.test(src.type)) { 3272 dest.checked = src.checked; 3273 } else if (nodeName2 === "input" || nodeName2 === "textarea") { 3274 dest.defaultValue = src.defaultValue; 3275 } 3276 } 3277 function domManip(collection, args, callback, ignored) { 3278 args = flat(args); 3279 var fragment, first, scripts, hasScripts, node, doc, i = 0, l = collection.length, iNoClone = l - 1, value = args[0], valueIsFunction = isFunction(value); 3280 if (valueIsFunction || l > 1 && typeof value === "string" && !support2.checkClone && rchecked.test(value)) { 3281 return collection.each(function(index) { 3282 var self2 = collection.eq(index); 3283 if (valueIsFunction) { 3284 args[0] = value.call(this, index, self2.html()); 3285 } 3286 domManip(self2, args, callback, ignored); 3287 }); 3288 } 3289 if (l) { 3290 fragment = buildFragment(args, collection[0].ownerDocument, false, collection, ignored); 3291 first = fragment.firstChild; 3292 if (fragment.childNodes.length === 1) { 3293 fragment = first; 3294 } 3295 if (first || ignored) { 3296 scripts = jQuery2.map(getAll(fragment, "script"), disableScript); 3297 hasScripts = scripts.length; 3298 for (; i < l; i++) { 3299 node = fragment; 3300 if (i !== iNoClone) { 3301 node = jQuery2.clone(node, true, true); 3302 if (hasScripts) { 3303 jQuery2.merge(scripts, getAll(node, "script")); 3304 } 3305 } 3306 callback.call(collection[i], node, i); 3307 } 3308 if (hasScripts) { 3309 doc = scripts[scripts.length - 1].ownerDocument; 3310 jQuery2.map(scripts, restoreScript); 3311 for (i = 0; i < hasScripts; i++) { 3312 node = scripts[i]; 3313 if (rscriptType.test(node.type || "") && !dataPriv.access(node, "globalEval") && jQuery2.contains(doc, node)) { 3314 if (node.src && (node.type || "").toLowerCase() !== "module") { 3315 if (jQuery2._evalUrl && !node.noModule) { 3316 jQuery2._evalUrl(node.src, { 3317 nonce: node.nonce || node.getAttribute("nonce") 3318 }, doc); 3319 } 3320 } else { 3321 DOMEval(node.textContent.replace(rcleanScript, ""), node, doc); 3322 } 3323 } 3324 } 3325 } 3326 } 3327 } 3328 return collection; 3329 } 3330 function remove(elem, selector, keepData) { 3331 var node, nodes = selector ? jQuery2.filter(selector, elem) : elem, i = 0; 3332 for (; (node = nodes[i]) != null; i++) { 3333 if (!keepData && node.nodeType === 1) { 3334 jQuery2.cleanData(getAll(node)); 3335 } 3336 if (node.parentNode) { 3337 if (keepData && isAttached(node)) { 3338 setGlobalEval(getAll(node, "script")); 3339 } 3340 node.parentNode.removeChild(node); 3341 } 3342 } 3343 return elem; 3344 } 3345 jQuery2.extend({ 3346 htmlPrefilter: function(html) { 3347 return html; 3348 }, 3349 clone: function(elem, dataAndEvents, deepDataAndEvents) { 3350 var i, l, srcElements, destElements, clone = elem.cloneNode(true), inPage = isAttached(elem); 3351 if (!support2.noCloneChecked && (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery2.isXMLDoc(elem)) { 3352 destElements = getAll(clone); 3353 srcElements = getAll(elem); 3354 for (i = 0, l = srcElements.length; i < l; i++) { 3355 fixInput(srcElements[i], destElements[i]); 3356 } 3357 } 3358 if (dataAndEvents) { 3359 if (deepDataAndEvents) { 3360 srcElements = srcElements || getAll(elem); 3361 destElements = destElements || getAll(clone); 3362 for (i = 0, l = srcElements.length; i < l; i++) { 3363 cloneCopyEvent(srcElements[i], destElements[i]); 3364 } 3365 } else { 3366 cloneCopyEvent(elem, clone); 3367 } 3368 } 3369 destElements = getAll(clone, "script"); 3370 if (destElements.length > 0) { 3371 setGlobalEval(destElements, !inPage && getAll(elem, "script")); 3372 } 3373 return clone; 3374 }, 3375 cleanData: function(elems) { 3376 var data, elem, type, special = jQuery2.event.special, i = 0; 3377 for (; (elem = elems[i]) !== void 0; i++) { 3378 if (acceptData(elem)) { 3379 if (data = elem[dataPriv.expando]) { 3380 if (data.events) { 3381 for (type in data.events) { 3382 if (special[type]) { 3383 jQuery2.event.remove(elem, type); 3384 } else { 3385 jQuery2.removeEvent(elem, type, data.handle); 3386 } 3387 } 3388 } 3389 elem[dataPriv.expando] = void 0; 3390 } 3391 if (elem[dataUser.expando]) { 3392 elem[dataUser.expando] = void 0; 3393 } 3394 } 3395 } 3396 } 3397 }); 3398 jQuery2.fn.extend({ 3399 detach: function(selector) { 3400 return remove(this, selector, true); 3401 }, 3402 remove: function(selector) { 3403 return remove(this, selector); 3404 }, 3405 text: function(value) { 3406 return access(this, function(value2) { 3407 return value2 === void 0 ? jQuery2.text(this) : this.empty().each(function() { 3408 if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) { 3409 this.textContent = value2; 3410 } 3411 }); 3412 }, null, value, arguments.length); 3413 }, 3414 append: function() { 3415 return domManip(this, arguments, function(elem) { 3416 if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) { 3417 var target = manipulationTarget(this, elem); 3418 target.appendChild(elem); 3419 } 3420 }); 3421 }, 3422 prepend: function() { 3423 return domManip(this, arguments, function(elem) { 3424 if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) { 3425 var target = manipulationTarget(this, elem); 3426 target.insertBefore(elem, target.firstChild); 3427 } 3428 }); 3429 }, 3430 before: function() { 3431 return domManip(this, arguments, function(elem) { 3432 if (this.parentNode) { 3433 this.parentNode.insertBefore(elem, this); 3434 } 3435 }); 3436 }, 3437 after: function() { 3438 return domManip(this, arguments, function(elem) { 3439 if (this.parentNode) { 3440 this.parentNode.insertBefore(elem, this.nextSibling); 3441 } 3442 }); 3443 }, 3444 empty: function() { 3445 var elem, i = 0; 3446 for (; (elem = this[i]) != null; i++) { 3447 if (elem.nodeType === 1) { 3448 jQuery2.cleanData(getAll(elem, false)); 3449 elem.textContent = ""; 3450 } 3451 } 3452 return this; 3453 }, 3454 clone: function(dataAndEvents, deepDataAndEvents) { 3455 dataAndEvents = dataAndEvents == null ? false : dataAndEvents; 3456 deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; 3457 return this.map(function() { 3458 return jQuery2.clone(this, dataAndEvents, deepDataAndEvents); 3459 }); 3460 }, 3461 html: function(value) { 3462 return access(this, function(value2) { 3463 var elem = this[0] || {}, i = 0, l = this.length; 3464 if (value2 === void 0 && elem.nodeType === 1) { 3465 return elem.innerHTML; 3466 } 3467 if (typeof value2 === "string" && !rnoInnerhtml.test(value2) && !wrapMap[(rtagName.exec(value2) || ["", ""])[1].toLowerCase()]) { 3468 value2 = jQuery2.htmlPrefilter(value2); 3469 try { 3470 for (; i < l; i++) { 3471 elem = this[i] || {}; 3472 if (elem.nodeType === 1) { 3473 jQuery2.cleanData(getAll(elem, false)); 3474 elem.innerHTML = value2; 3475 } 3476 } 3477 elem = 0; 3478 } catch (e) { 3479 } 3480 } 3481 if (elem) { 3482 this.empty().append(value2); 3483 } 3484 }, null, value, arguments.length); 3485 }, 3486 replaceWith: function() { 3487 var ignored = []; 3488 return domManip(this, arguments, function(elem) { 3489 var parent = this.parentNode; 3490 if (jQuery2.inArray(this, ignored) < 0) { 3491 jQuery2.cleanData(getAll(this)); 3492 if (parent) { 3493 parent.replaceChild(elem, this); 3494 } 3495 } 3496 }, ignored); 3497 } 3498 }); 3499 jQuery2.each({ 3500 appendTo: "append", 3501 prependTo: "prepend", 3502 insertBefore: "before", 3503 insertAfter: "after", 3504 replaceAll: "replaceWith" 3505 }, function(name, original) { 3506 jQuery2.fn[name] = function(selector) { 3507 var elems, ret = [], insert = jQuery2(selector), last = insert.length - 1, i = 0; 3508 for (; i <= last; i++) { 3509 elems = i === last ? this : this.clone(true); 3510 jQuery2(insert[i])[original](elems); 3511 push.apply(ret, elems.get()); 3512 } 3513 return this.pushStack(ret); 3514 }; 3515 }); 3516 var rnumnonpx = new RegExp("^(" + pnum + ")(?!px)[a-z%]+$", "i"); 3517 var rcustomProp = /^--/; 3518 var getStyles = function(elem) { 3519 var view = elem.ownerDocument.defaultView; 3520 if (!view || !view.opener) { 3521 view = window2; 3522 } 3523 return view.getComputedStyle(elem); 3524 }; 3525 var swap = function(elem, options, callback) { 3526 var ret, name, old = {}; 3527 for (name in options) { 3528 old[name] = elem.style[name]; 3529 elem.style[name] = options[name]; 3530 } 3531 ret = callback.call(elem); 3532 for (name in options) { 3533 elem.style[name] = old[name]; 3534 } 3535 return ret; 3536 }; 3537 var rboxStyle = new RegExp(cssExpand.join("|"), "i"); 3538 var whitespace = "[\\x20\\t\\r\\n\\f]"; 3539 var rtrimCSS = new RegExp( 3540 "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", 3541 "g" 3542 ); 3543 (function() { 3544 function computeStyleTests() { 3545 if (!div) { 3546 return; 3547 } 3548 container.style.cssText = "position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0"; 3549 div.style.cssText = "position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%"; 3550 documentElement.appendChild(container).appendChild(div); 3551 var divStyle = window2.getComputedStyle(div); 3552 pixelPositionVal = divStyle.top !== "1%"; 3553 reliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12; 3554 div.style.right = "60%"; 3555 pixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36; 3556 boxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36; 3557 div.style.position = "absolute"; 3558 scrollboxSizeVal = roundPixelMeasures(div.offsetWidth / 3) === 12; 3559 documentElement.removeChild(container); 3560 div = null; 3561 } 3562 function roundPixelMeasures(measure) { 3563 return Math.round(parseFloat(measure)); 3564 } 3565 var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, reliableTrDimensionsVal, reliableMarginLeftVal, container = document2.createElement("div"), div = document2.createElement("div"); 3566 if (!div.style) { 3567 return; 3568 } 3569 div.style.backgroundClip = "content-box"; 3570 div.cloneNode(true).style.backgroundClip = ""; 3571 support2.clearCloneStyle = div.style.backgroundClip === "content-box"; 3572 jQuery2.extend(support2, { 3573 boxSizingReliable: function() { 3574 computeStyleTests(); 3575 return boxSizingReliableVal; 3576 }, 3577 pixelBoxStyles: function() { 3578 computeStyleTests(); 3579 return pixelBoxStylesVal; 3580 }, 3581 pixelPosition: function() { 3582 computeStyleTests(); 3583 return pixelPositionVal; 3584 }, 3585 reliableMarginLeft: function() { 3586 computeStyleTests(); 3587 return reliableMarginLeftVal; 3588 }, 3589 scrollboxSize: function() { 3590 computeStyleTests(); 3591 return scrollboxSizeVal; 3592 }, 3593 reliableTrDimensions: function() { 3594 var table, tr, trChild, trStyle; 3595 if (reliableTrDimensionsVal == null) { 3596 table = document2.createElement("table"); 3597 tr = document2.createElement("tr"); 3598 trChild = document2.createElement("div"); 3599 table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate"; 3600 tr.style.cssText = "border:1px solid"; 3601 tr.style.height = "1px"; 3602 trChild.style.height = "9px"; 3603 trChild.style.display = "block"; 3604 documentElement.appendChild(table).appendChild(tr).appendChild(trChild); 3605 trStyle = window2.getComputedStyle(tr); 3606 reliableTrDimensionsVal = parseInt(trStyle.height, 10) + parseInt(trStyle.borderTopWidth, 10) + parseInt(trStyle.borderBottomWidth, 10) === tr.offsetHeight; 3607 documentElement.removeChild(table); 3608 } 3609 return reliableTrDimensionsVal; 3610 } 3611 }); 3612 })(); 3613 function curCSS(elem, name, computed) { 3614 var width, minWidth, maxWidth, ret, isCustomProp = rcustomProp.test(name), style = elem.style; 3615 computed = computed || getStyles(elem); 3616 if (computed) { 3617 ret = computed.getPropertyValue(name) || computed[name]; 3618 if (isCustomProp) { 3619 ret = ret.replace(rtrimCSS, "$1"); 3620 } 3621 if (ret === "" && !isAttached(elem)) { 3622 ret = jQuery2.style(elem, name); 3623 } 3624 if (!support2.pixelBoxStyles() && rnumnonpx.test(ret) && rboxStyle.test(name)) { 3625 width = style.width; 3626 minWidth = style.minWidth; 3627 maxWidth = style.maxWidth; 3628 style.minWidth = style.maxWidth = style.width = ret; 3629 ret = computed.width; 3630 style.width = width; 3631 style.minWidth = minWidth; 3632 style.maxWidth = maxWidth; 3633 } 3634 } 3635 return ret !== void 0 ? ret + "" : ret; 3636 } 3637 function addGetHookIf(conditionFn, hookFn) { 3638 return { 3639 get: function() { 3640 if (conditionFn()) { 3641 delete this.get; 3642 return; 3643 } 3644 return (this.get = hookFn).apply(this, arguments); 3645 } 3646 }; 3647 } 3648 var cssPrefixes = ["Webkit", "Moz", "ms"], emptyStyle = document2.createElement("div").style, vendorProps = {}; 3649 function vendorPropName(name) { 3650 var capName = name[0].toUpperCase() + name.slice(1), i = cssPrefixes.length; 3651 while (i--) { 3652 name = cssPrefixes[i] + capName; 3653 if (name in emptyStyle) { 3654 return name; 3655 } 3656 } 3657 } 3658 function finalPropName(name) { 3659 var final = jQuery2.cssProps[name] || vendorProps[name]; 3660 if (final) { 3661 return final; 3662 } 3663 if (name in emptyStyle) { 3664 return name; 3665 } 3666 return vendorProps[name] = vendorPropName(name) || name; 3667 } 3668 var rdisplayswap = /^(none|table(?!-c[ea]).+)/, cssShow = { position: "absolute", visibility: "hidden", display: "block" }, cssNormalTransform = { 3669 letterSpacing: "0", 3670 fontWeight: "400" 3671 }; 3672 function setPositiveNumber(_elem, value, subtract) { 3673 var matches = rcssNum.exec(value); 3674 return matches ? Math.max(0, matches[2] - (subtract || 0)) + (matches[3] || "px") : value; 3675 } 3676 function boxModelAdjustment(elem, dimension, box, isBorderBox, styles, computedVal) { 3677 var i = dimension === "width" ? 1 : 0, extra = 0, delta = 0; 3678 if (box === (isBorderBox ? "border" : "content")) { 3679 return 0; 3680 } 3681 for (; i < 4; i += 2) { 3682 if (box === "margin") { 3683 delta += jQuery2.css(elem, box + cssExpand[i], true, styles); 3684 } 3685 if (!isBorderBox) { 3686 delta += jQuery2.css(elem, "padding" + cssExpand[i], true, styles); 3687 if (box !== "padding") { 3688 delta += jQuery2.css(elem, "border" + cssExpand[i] + "Width", true, styles); 3689 } else { 3690 extra += jQuery2.css(elem, "border" + cssExpand[i] + "Width", true, styles); 3691 } 3692 } else { 3693 if (box === "content") { 3694 delta -= jQuery2.css(elem, "padding" + cssExpand[i], true, styles); 3695 } 3696 if (box !== "margin") { 3697 delta -= jQuery2.css(elem, "border" + cssExpand[i] + "Width", true, styles); 3698 } 3699 } 3700 } 3701 if (!isBorderBox && computedVal >= 0) { 3702 delta += Math.max(0, Math.ceil( 3703 elem["offset" + dimension[0].toUpperCase() + dimension.slice(1)] - computedVal - delta - extra - 0.5 3704 )) || 0; 3705 } 3706 return delta; 3707 } 3708 function getWidthOrHeight(elem, dimension, extra) { 3709 var styles = getStyles(elem), boxSizingNeeded = !support2.boxSizingReliable() || extra, isBorderBox = boxSizingNeeded && jQuery2.css(elem, "boxSizing", false, styles) === "border-box", valueIsBorderBox = isBorderBox, val = curCSS(elem, dimension, styles), offsetProp = "offset" + dimension[0].toUpperCase() + dimension.slice(1); 3710 if (rnumnonpx.test(val)) { 3711 if (!extra) { 3712 return val; 3713 } 3714 val = "auto"; 3715 } 3716 if ((!support2.boxSizingReliable() && isBorderBox || !support2.reliableTrDimensions() && nodeName(elem, "tr") || val === "auto" || !parseFloat(val) && jQuery2.css(elem, "display", false, styles) === "inline") && elem.getClientRects().length) { 3717 isBorderBox = jQuery2.css(elem, "boxSizing", false, styles) === "border-box"; 3718 valueIsBorderBox = offsetProp in elem; 3719 if (valueIsBorderBox) { 3720 val = elem[offsetProp]; 3721 } 3722 } 3723 val = parseFloat(val) || 0; 3724 return val + boxModelAdjustment( 3725 elem, 3726 dimension, 3727 extra || (isBorderBox ? "border" : "content"), 3728 valueIsBorderBox, 3729 styles, 3730 val 3731 ) + "px"; 3732 } 3733 jQuery2.extend({ 3734 cssHooks: { 3735 opacity: { 3736 get: function(elem, computed) { 3737 if (computed) { 3738 var ret = curCSS(elem, "opacity"); 3739 return ret === "" ? "1" : ret; 3740 } 3741 } 3742 } 3743 }, 3744 cssNumber: { 3745 "animationIterationCount": true, 3746 "columnCount": true, 3747 "fillOpacity": true, 3748 "flexGrow": true, 3749 "flexShrink": true, 3750 "fontWeight": true, 3751 "gridArea": true, 3752 "gridColumn": true, 3753 "gridColumnEnd": true, 3754 "gridColumnStart": true, 3755 "gridRow": true, 3756 "gridRowEnd": true, 3757 "gridRowStart": true, 3758 "lineHeight": true, 3759 "opacity": true, 3760 "order": true, 3761 "orphans": true, 3762 "widows": true, 3763 "zIndex": true, 3764 "zoom": true 3765 }, 3766 cssProps: {}, 3767 style: function(elem, name, value, extra) { 3768 if (!elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style) { 3769 return; 3770 } 3771 var ret, type, hooks, origName = camelCase(name), isCustomProp = rcustomProp.test(name), style = elem.style; 3772 if (!isCustomProp) { 3773 name = finalPropName(origName); 3774 } 3775 hooks = jQuery2.cssHooks[name] || jQuery2.cssHooks[origName]; 3776 if (value !== void 0) { 3777 type = typeof value; 3778 if (type === "string" && (ret = rcssNum.exec(value)) && ret[1]) { 3779 value = adjustCSS(elem, name, ret); 3780 type = "number"; 3781 } 3782 if (value == null || value !== value) { 3783 return; 3784 } 3785 if (type === "number" && !isCustomProp) { 3786 value += ret && ret[3] || (jQuery2.cssNumber[origName] ? "" : "px"); 3787 } 3788 if (!support2.clearCloneStyle && value === "" && name.indexOf("background") === 0) { 3789 style[name] = "inherit"; 3790 } 3791 if (!hooks || !("set" in hooks) || (value = hooks.set(elem, value, extra)) !== void 0) { 3792 if (isCustomProp) { 3793 style.setProperty(name, value); 3794 } else { 3795 style[name] = value; 3796 } 3797 } 3798 } else { 3799 if (hooks && "get" in hooks && (ret = hooks.get(elem, false, extra)) !== void 0) { 3800 return ret; 3801 } 3802 return style[name]; 3803 } 3804 }, 3805 css: function(elem, name, extra, styles) { 3806 var val, num, hooks, origName = camelCase(name), isCustomProp = rcustomProp.test(name); 3807 if (!isCustomProp) { 3808 name = finalPropName(origName); 3809 } 3810 hooks = jQuery2.cssHooks[name] || jQuery2.cssHooks[origName]; 3811 if (hooks && "get" in hooks) { 3812 val = hooks.get(elem, true, extra); 3813 } 3814 if (val === void 0) { 3815 val = curCSS(elem, name, styles); 3816 } 3817 if (val === "normal" && name in cssNormalTransform) { 3818 val = cssNormalTransform[name]; 3819 } 3820 if (extra === "" || extra) { 3821 num = parseFloat(val); 3822 return extra === true || isFinite(num) ? num || 0 : val; 3823 } 3824 return val; 3825 } 3826 }); 3827 jQuery2.each(["height", "width"], function(_i, dimension) { 3828 jQuery2.cssHooks[dimension] = { 3829 get: function(elem, computed, extra) { 3830 if (computed) { 3831 return rdisplayswap.test(jQuery2.css(elem, "display")) && (!elem.getClientRects().length || !elem.getBoundingClientRect().width) ? swap(elem, cssShow, function() { 3832 return getWidthOrHeight(elem, dimension, extra); 3833 }) : getWidthOrHeight(elem, dimension, extra); 3834 } 3835 }, 3836 set: function(elem, value, extra) { 3837 var matches, styles = getStyles(elem), scrollboxSizeBuggy = !support2.scrollboxSize() && styles.position === "absolute", boxSizingNeeded = scrollboxSizeBuggy || extra, isBorderBox = boxSizingNeeded && jQuery2.css(elem, "boxSizing", false, styles) === "border-box", subtract = extra ? boxModelAdjustment( 3838 elem, 3839 dimension, 3840 extra, 3841 isBorderBox, 3842 styles 3843 ) : 0; 3844 if (isBorderBox && scrollboxSizeBuggy) { 3845 subtract -= Math.ceil( 3846 elem["offset" + dimension[0].toUpperCase() + dimension.slice(1)] - parseFloat(styles[dimension]) - boxModelAdjustment(elem, dimension, "border", false, styles) - 0.5 3847 ); 3848 } 3849 if (subtract && (matches = rcssNum.exec(value)) && (matches[3] || "px") !== "px") { 3850 elem.style[dimension] = value; 3851 value = jQuery2.css(elem, dimension); 3852 } 3853 return setPositiveNumber(elem, value, subtract); 3854 } 3855 }; 3856 }); 3857 jQuery2.cssHooks.marginLeft = addGetHookIf( 3858 support2.reliableMarginLeft, 3859 function(elem, computed) { 3860 if (computed) { 3861 return (parseFloat(curCSS(elem, "marginLeft")) || elem.getBoundingClientRect().left - swap(elem, { marginLeft: 0 }, function() { 3862 return elem.getBoundingClientRect().left; 3863 })) + "px"; 3864 } 3865 } 3866 ); 3867 jQuery2.each({ 3868 margin: "", 3869 padding: "", 3870 border: "Width" 3871 }, function(prefix, suffix) { 3872 jQuery2.cssHooks[prefix + suffix] = { 3873 expand: function(value) { 3874 var i = 0, expanded = {}, parts = typeof value === "string" ? value.split(" ") : [value]; 3875 for (; i < 4; i++) { 3876 expanded[prefix + cssExpand[i] + suffix] = parts[i] || parts[i - 2] || parts[0]; 3877 } 3878 return expanded; 3879 } 3880 }; 3881 if (prefix !== "margin") { 3882 jQuery2.cssHooks[prefix + suffix].set = setPositiveNumber; 3883 } 3884 }); 3885 jQuery2.fn.extend({ 3886 css: function(name, value) { 3887 return access(this, function(elem, name2, value2) { 3888 var styles, len, map = {}, i = 0; 3889 if (Array.isArray(name2)) { 3890 styles = getStyles(elem); 3891 len = name2.length; 3892 for (; i < len; i++) { 3893 map[name2[i]] = jQuery2.css(elem, name2[i], false, styles); 3894 } 3895 return map; 3896 } 3897 return value2 !== void 0 ? jQuery2.style(elem, name2, value2) : jQuery2.css(elem, name2); 3898 }, name, value, arguments.length > 1); 3899 } 3900 }); 3901 function Tween(elem, options, prop, end, easing) { 3902 return new Tween.prototype.init(elem, options, prop, end, easing); 3903 } 3904 jQuery2.Tween = Tween; 3905 Tween.prototype = { 3906 constructor: Tween, 3907 init: function(elem, options, prop, end, easing, unit) { 3908 this.elem = elem; 3909 this.prop = prop; 3910 this.easing = easing || jQuery2.easing._default; 3911 this.options = options; 3912 this.start = this.now = this.cur(); 3913 this.end = end; 3914 this.unit = unit || (jQuery2.cssNumber[prop] ? "" : "px"); 3915 }, 3916 cur: function() { 3917 var hooks = Tween.propHooks[this.prop]; 3918 return hooks && hooks.get ? hooks.get(this) : Tween.propHooks._default.get(this); 3919 }, 3920 run: function(percent) { 3921 var eased, hooks = Tween.propHooks[this.prop]; 3922 if (this.options.duration) { 3923 this.pos = eased = jQuery2.easing[this.easing]( 3924 percent, 3925 this.options.duration * percent, 3926 0, 3927 1, 3928 this.options.duration 3929 ); 3930 } else { 3931 this.pos = eased = percent; 3932 } 3933 this.now = (this.end - this.start) * eased + this.start; 3934 if (this.options.step) { 3935 this.options.step.call(this.elem, this.now, this); 3936 } 3937 if (hooks && hooks.set) { 3938 hooks.set(this); 3939 } else { 3940 Tween.propHooks._default.set(this); 3941 } 3942 return this; 3943 } 3944 }; 3945 Tween.prototype.init.prototype = Tween.prototype; 3946 Tween.propHooks = { 3947 _default: { 3948 get: function(tween) { 3949 var result; 3950 if (tween.elem.nodeType !== 1 || tween.elem[tween.prop] != null && tween.elem.style[tween.prop] == null) { 3951 return tween.elem[tween.prop]; 3952 } 3953 result = jQuery2.css(tween.elem, tween.prop, ""); 3954 return !result || result === "auto" ? 0 : result; 3955 }, 3956 set: function(tween) { 3957 if (jQuery2.fx.step[tween.prop]) { 3958 jQuery2.fx.step[tween.prop](tween); 3959 } else if (tween.elem.nodeType === 1 && (jQuery2.cssHooks[tween.prop] || tween.elem.style[finalPropName(tween.prop)] != null)) { 3960 jQuery2.style(tween.elem, tween.prop, tween.now + tween.unit); 3961 } else { 3962 tween.elem[tween.prop] = tween.now; 3963 } 3964 } 3965 } 3966 }; 3967 Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { 3968 set: function(tween) { 3969 if (tween.elem.nodeType && tween.elem.parentNode) { 3970 tween.elem[tween.prop] = tween.now; 3971 } 3972 } 3973 }; 3974 jQuery2.easing = { 3975 linear: function(p) { 3976 return p; 3977 }, 3978 swing: function(p) { 3979 return 0.5 - Math.cos(p * Math.PI) / 2; 3980 }, 3981 _default: "swing" 3982 }; 3983 jQuery2.fx = Tween.prototype.init; 3984 jQuery2.fx.step = {}; 3985 var fxNow, inProgress, rfxtypes = /^(?:toggle|show|hide)$/, rrun = /queueHooks$/; 3986 function schedule() { 3987 if (inProgress) { 3988 if (document2.hidden === false && window2.requestAnimationFrame) { 3989 window2.requestAnimationFrame(schedule); 3990 } else { 3991 window2.setTimeout(schedule, jQuery2.fx.interval); 3992 } 3993 jQuery2.fx.tick(); 3994 } 3995 } 3996 function createFxNow() { 3997 window2.setTimeout(function() { 3998 fxNow = void 0; 3999 }); 4000 return fxNow = Date.now(); 4001 } 4002 function genFx(type, includeWidth) { 4003 var which, i = 0, attrs = { height: type }; 4004 includeWidth = includeWidth ? 1 : 0; 4005 for (; i < 4; i += 2 - includeWidth) { 4006 which = cssExpand[i]; 4007 attrs["margin" + which] = attrs["padding" + which] = type; 4008 } 4009 if (includeWidth) { 4010 attrs.opacity = attrs.width = type; 4011 } 4012 return attrs; 4013 } 4014 function createTween(value, prop, animation) { 4015 var tween, collection = (Animation.tweeners[prop] || []).concat(Animation.tweeners["*"]), index = 0, length = collection.length; 4016 for (; index < length; index++) { 4017 if (tween = collection[index].call(animation, prop, value)) { 4018 return tween; 4019 } 4020 } 4021 } 4022 function defaultPrefilter(elem, props, opts) { 4023 var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, isBox = "width" in props || "height" in props, anim = this, orig = {}, style = elem.style, hidden = elem.nodeType && isHiddenWithinTree(elem), dataShow = dataPriv.get(elem, "fxshow"); 4024 if (!opts.queue) { 4025 hooks = jQuery2._queueHooks(elem, "fx"); 4026 if (hooks.unqueued == null) { 4027 hooks.unqueued = 0; 4028 oldfire = hooks.empty.fire; 4029 hooks.empty.fire = function() { 4030 if (!hooks.unqueued) { 4031 oldfire(); 4032 } 4033 }; 4034 } 4035 hooks.unqueued++; 4036 anim.always(function() { 4037 anim.always(function() { 4038 hooks.unqueued--; 4039 if (!jQuery2.queue(elem, "fx").length) { 4040 hooks.empty.fire(); 4041 } 4042 }); 4043 }); 4044 } 4045 for (prop in props) { 4046 value = props[prop]; 4047 if (rfxtypes.test(value)) { 4048 delete props[prop]; 4049 toggle = toggle || value === "toggle"; 4050 if (value === (hidden ? "hide" : "show")) { 4051 if (value === "show" && dataShow && dataShow[prop] !== void 0) { 4052 hidden = true; 4053 } else { 4054 continue; 4055 } 4056 } 4057 orig[prop] = dataShow && dataShow[prop] || jQuery2.style(elem, prop); 4058 } 4059 } 4060 propTween = !jQuery2.isEmptyObject(props); 4061 if (!propTween && jQuery2.isEmptyObject(orig)) { 4062 return; 4063 } 4064 if (isBox && elem.nodeType === 1) { 4065 opts.overflow = [style.overflow, style.overflowX, style.overflowY]; 4066 restoreDisplay = dataShow && dataShow.display; 4067 if (restoreDisplay == null) { 4068 restoreDisplay = dataPriv.get(elem, "display"); 4069 } 4070 display = jQuery2.css(elem, "display"); 4071 if (display === "none") { 4072 if (restoreDisplay) { 4073 display = restoreDisplay; 4074 } else { 4075 showHide([elem], true); 4076 restoreDisplay = elem.style.display || restoreDisplay; 4077 display = jQuery2.css(elem, "display"); 4078 showHide([elem]); 4079 } 4080 } 4081 if (display === "inline" || display === "inline-block" && restoreDisplay != null) { 4082 if (jQuery2.css(elem, "float") === "none") { 4083 if (!propTween) { 4084 anim.done(function() { 4085 style.display = restoreDisplay; 4086 }); 4087 if (restoreDisplay == null) { 4088 display = style.display; 4089 restoreDisplay = display === "none" ? "" : display; 4090 } 4091 } 4092 style.display = "inline-block"; 4093 } 4094 } 4095 } 4096 if (opts.overflow) { 4097 style.overflow = "hidden"; 4098 anim.always(function() { 4099 style.overflow = opts.overflow[0]; 4100 style.overflowX = opts.overflow[1]; 4101 style.overflowY = opts.overflow[2]; 4102 }); 4103 } 4104 propTween = false; 4105 for (prop in orig) { 4106 if (!propTween) { 4107 if (dataShow) { 4108 if ("hidden" in dataShow) { 4109 hidden = dataShow.hidden; 4110 } 4111 } else { 4112 dataShow = dataPriv.access(elem, "fxshow", { display: restoreDisplay }); 4113 } 4114 if (toggle) { 4115 dataShow.hidden = !hidden; 4116 } 4117 if (hidden) { 4118 showHide([elem], true); 4119 } 4120 anim.done(function() { 4121 if (!hidden) { 4122 showHide([elem]); 4123 } 4124 dataPriv.remove(elem, "fxshow"); 4125 for (prop in orig) { 4126 jQuery2.style(elem, prop, orig[prop]); 4127 } 4128 }); 4129 } 4130 propTween = createTween(hidden ? dataShow[prop] : 0, prop, anim); 4131 if (!(prop in dataShow)) { 4132 dataShow[prop] = propTween.start; 4133 if (hidden) { 4134 propTween.end = propTween.start; 4135 propTween.start = 0; 4136 } 4137 } 4138 } 4139 } 4140 function propFilter(props, specialEasing) { 4141 var index, name, easing, value, hooks; 4142 for (index in props) { 4143 name = camelCase(index); 4144 easing = specialEasing[name]; 4145 value = props[index]; 4146 if (Array.isArray(value)) { 4147 easing = value[1]; 4148 value = props[index] = value[0]; 4149 } 4150 if (index !== name) { 4151 props[name] = value; 4152 delete props[index]; 4153 } 4154 hooks = jQuery2.cssHooks[name]; 4155 if (hooks && "expand" in hooks) { 4156 value = hooks.expand(value); 4157 delete props[name]; 4158 for (index in value) { 4159 if (!(index in props)) { 4160 props[index] = value[index]; 4161 specialEasing[index] = easing; 4162 } 4163 } 4164 } else { 4165 specialEasing[name] = easing; 4166 } 4167 } 4168 } 4169 function Animation(elem, properties, options) { 4170 var result, stopped, index = 0, length = Animation.prefilters.length, deferred = jQuery2.Deferred().always(function() { 4171 delete tick.elem; 4172 }), tick = function() { 4173 if (stopped) { 4174 return false; 4175 } 4176 var currentTime = fxNow || createFxNow(), remaining = Math.max(0, animation.startTime + animation.duration - currentTime), temp = remaining / animation.duration || 0, percent = 1 - temp, index2 = 0, length2 = animation.tweens.length; 4177 for (; index2 < length2; index2++) { 4178 animation.tweens[index2].run(percent); 4179 } 4180 deferred.notifyWith(elem, [animation, percent, remaining]); 4181 if (percent < 1 && length2) { 4182 return remaining; 4183 } 4184 if (!length2) { 4185 deferred.notifyWith(elem, [animation, 1, 0]); 4186 } 4187 deferred.resolveWith(elem, [animation]); 4188 return false; 4189 }, animation = deferred.promise({ 4190 elem, 4191 props: jQuery2.extend({}, properties), 4192 opts: jQuery2.extend(true, { 4193 specialEasing: {}, 4194 easing: jQuery2.easing._default 4195 }, options), 4196 originalProperties: properties, 4197 originalOptions: options, 4198 startTime: fxNow || createFxNow(), 4199 duration: options.duration, 4200 tweens: [], 4201 createTween: function(prop, end) { 4202 var tween = jQuery2.Tween( 4203 elem, 4204 animation.opts, 4205 prop, 4206 end, 4207 animation.opts.specialEasing[prop] || animation.opts.easing 4208 ); 4209 animation.tweens.push(tween); 4210 return tween; 4211 }, 4212 stop: function(gotoEnd) { 4213 var index2 = 0, length2 = gotoEnd ? animation.tweens.length : 0; 4214 if (stopped) { 4215 return this; 4216 } 4217 stopped = true; 4218 for (; index2 < length2; index2++) { 4219 animation.tweens[index2].run(1); 4220 } 4221 if (gotoEnd) { 4222 deferred.notifyWith(elem, [animation, 1, 0]); 4223 deferred.resolveWith(elem, [animation, gotoEnd]); 4224 } else { 4225 deferred.rejectWith(elem, [animation, gotoEnd]); 4226 } 4227 return this; 4228 } 4229 }), props = animation.props; 4230 propFilter(props, animation.opts.specialEasing); 4231 for (; index < length; index++) { 4232 result = Animation.prefilters[index].call(animation, elem, props, animation.opts); 4233 if (result) { 4234 if (isFunction(result.stop)) { 4235 jQuery2._queueHooks(animation.elem, animation.opts.queue).stop = result.stop.bind(result); 4236 } 4237 return result; 4238 } 4239 } 4240 jQuery2.map(props, createTween, animation); 4241 if (isFunction(animation.opts.start)) { 4242 animation.opts.start.call(elem, animation); 4243 } 4244 animation.progress(animation.opts.progress).done(animation.opts.done, animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always); 4245 jQuery2.fx.timer( 4246 jQuery2.extend(tick, { 4247 elem, 4248 anim: animation, 4249 queue: animation.opts.queue 4250 }) 4251 ); 4252 return animation; 4253 } 4254 jQuery2.Animation = jQuery2.extend(Animation, { 4255 tweeners: { 4256 "*": [function(prop, value) { 4257 var tween = this.createTween(prop, value); 4258 adjustCSS(tween.elem, prop, rcssNum.exec(value), tween); 4259 return tween; 4260 }] 4261 }, 4262 tweener: function(props, callback) { 4263 if (isFunction(props)) { 4264 callback = props; 4265 props = ["*"]; 4266 } else { 4267 props = props.match(rnothtmlwhite); 4268 } 4269 var prop, index = 0, length = props.length; 4270 for (; index < length; index++) { 4271 prop = props[index]; 4272 Animation.tweeners[prop] = Animation.tweeners[prop] || []; 4273 Animation.tweeners[prop].unshift(callback); 4274 } 4275 }, 4276 prefilters: [defaultPrefilter], 4277 prefilter: function(callback, prepend) { 4278 if (prepend) { 4279 Animation.prefilters.unshift(callback); 4280 } else { 4281 Animation.prefilters.push(callback); 4282 } 4283 } 4284 }); 4285 jQuery2.speed = function(speed, easing, fn) { 4286 var opt = speed && typeof speed === "object" ? jQuery2.extend({}, speed) : { 4287 complete: fn || !fn && easing || isFunction(speed) && speed, 4288 duration: speed, 4289 easing: fn && easing || easing && !isFunction(easing) && easing 4290 }; 4291 if (jQuery2.fx.off) { 4292 opt.duration = 0; 4293 } else { 4294 if (typeof opt.duration !== "number") { 4295 if (opt.duration in jQuery2.fx.speeds) { 4296 opt.duration = jQuery2.fx.speeds[opt.duration]; 4297 } else { 4298 opt.duration = jQuery2.fx.speeds._default; 4299 } 4300 } 4301 } 4302 if (opt.queue == null || opt.queue === true) { 4303 opt.queue = "fx"; 4304 } 4305 opt.old = opt.complete; 4306 opt.complete = function() { 4307 if (isFunction(opt.old)) { 4308 opt.old.call(this); 4309 } 4310 if (opt.queue) { 4311 jQuery2.dequeue(this, opt.queue); 4312 } 4313 }; 4314 return opt; 4315 }; 4316 jQuery2.fn.extend({ 4317 fadeTo: function(speed, to, easing, callback) { 4318 return this.filter(isHiddenWithinTree).css("opacity", 0).show().end().animate({ opacity: to }, speed, easing, callback); 4319 }, 4320 animate: function(prop, speed, easing, callback) { 4321 var empty = jQuery2.isEmptyObject(prop), optall = jQuery2.speed(speed, easing, callback), doAnimation = function() { 4322 var anim = Animation(this, jQuery2.extend({}, prop), optall); 4323 if (empty || dataPriv.get(this, "finish")) { 4324 anim.stop(true); 4325 } 4326 }; 4327 doAnimation.finish = doAnimation; 4328 return empty || optall.queue === false ? this.each(doAnimation) : this.queue(optall.queue, doAnimation); 4329 }, 4330 stop: function(type, clearQueue, gotoEnd) { 4331 var stopQueue = function(hooks) { 4332 var stop = hooks.stop; 4333 delete hooks.stop; 4334 stop(gotoEnd); 4335 }; 4336 if (typeof type !== "string") { 4337 gotoEnd = clearQueue; 4338 clearQueue = type; 4339 type = void 0; 4340 } 4341 if (clearQueue) { 4342 this.queue(type || "fx", []); 4343 } 4344 return this.each(function() { 4345 var dequeue = true, index = type != null && type + "queueHooks", timers = jQuery2.timers, data = dataPriv.get(this); 4346 if (index) { 4347 if (data[index] && data[index].stop) { 4348 stopQueue(data[index]); 4349 } 4350 } else { 4351 for (index in data) { 4352 if (data[index] && data[index].stop && rrun.test(index)) { 4353 stopQueue(data[index]); 4354 } 4355 } 4356 } 4357 for (index = timers.length; index--; ) { 4358 if (timers[index].elem === this && (type == null || timers[index].queue === type)) { 4359 timers[index].anim.stop(gotoEnd); 4360 dequeue = false; 4361 timers.splice(index, 1); 4362 } 4363 } 4364 if (dequeue || !gotoEnd) { 4365 jQuery2.dequeue(this, type); 4366 } 4367 }); 4368 }, 4369 finish: function(type) { 4370 if (type !== false) { 4371 type = type || "fx"; 4372 } 4373 return this.each(function() { 4374 var index, data = dataPriv.get(this), queue = data[type + "queue"], hooks = data[type + "queueHooks"], timers = jQuery2.timers, length = queue ? queue.length : 0; 4375 data.finish = true; 4376 jQuery2.queue(this, type, []); 4377 if (hooks && hooks.stop) { 4378 hooks.stop.call(this, true); 4379 } 4380 for (index = timers.length; index--; ) { 4381 if (timers[index].elem === this && timers[index].queue === type) { 4382 timers[index].anim.stop(true); 4383 timers.splice(index, 1); 4384 } 4385 } 4386 for (index = 0; index < length; index++) { 4387 if (queue[index] && queue[index].finish) { 4388 queue[index].finish.call(this); 4389 } 4390 } 4391 delete data.finish; 4392 }); 4393 } 4394 }); 4395 jQuery2.each(["toggle", "show", "hide"], function(_i, name) { 4396 var cssFn = jQuery2.fn[name]; 4397 jQuery2.fn[name] = function(speed, easing, callback) { 4398 return speed == null || typeof speed === "boolean" ? cssFn.apply(this, arguments) : this.animate(genFx(name, true), speed, easing, callback); 4399 }; 4400 }); 4401 jQuery2.each({ 4402 slideDown: genFx("show"), 4403 slideUp: genFx("hide"), 4404 slideToggle: genFx("toggle"), 4405 fadeIn: { opacity: "show" }, 4406 fadeOut: { opacity: "hide" }, 4407 fadeToggle: { opacity: "toggle" } 4408 }, function(name, props) { 4409 jQuery2.fn[name] = function(speed, easing, callback) { 4410 return this.animate(props, speed, easing, callback); 4411 }; 4412 }); 4413 jQuery2.timers = []; 4414 jQuery2.fx.tick = function() { 4415 var timer, i = 0, timers = jQuery2.timers; 4416 fxNow = Date.now(); 4417 for (; i < timers.length; i++) { 4418 timer = timers[i]; 4419 if (!timer() && timers[i] === timer) { 4420 timers.splice(i--, 1); 4421 } 4422 } 4423 if (!timers.length) { 4424 jQuery2.fx.stop(); 4425 } 4426 fxNow = void 0; 4427 }; 4428 jQuery2.fx.timer = function(timer) { 4429 jQuery2.timers.push(timer); 4430 jQuery2.fx.start(); 4431 }; 4432 jQuery2.fx.interval = 13; 4433 jQuery2.fx.start = function() { 4434 if (inProgress) { 4435 return; 4436 } 4437 inProgress = true; 4438 schedule(); 4439 }; 4440 jQuery2.fx.stop = function() { 4441 inProgress = null; 4442 }; 4443 jQuery2.fx.speeds = { 4444 slow: 600, 4445 fast: 200, 4446 _default: 400 4447 }; 4448 jQuery2.fn.delay = function(time, type) { 4449 time = jQuery2.fx ? jQuery2.fx.speeds[time] || time : time; 4450 type = type || "fx"; 4451 return this.queue(type, function(next, hooks) { 4452 var timeout = window2.setTimeout(next, time); 4453 hooks.stop = function() { 4454 window2.clearTimeout(timeout); 4455 }; 4456 }); 4457 }; 4458 (function() { 4459 var input = document2.createElement("input"), select = document2.createElement("select"), opt = select.appendChild(document2.createElement("option")); 4460 input.type = "checkbox"; 4461 support2.checkOn = input.value !== ""; 4462 support2.optSelected = opt.selected; 4463 input = document2.createElement("input"); 4464 input.value = "t"; 4465 input.type = "radio"; 4466 support2.radioValue = input.value === "t"; 4467 })(); 4468 var boolHook, attrHandle = jQuery2.expr.attrHandle; 4469 jQuery2.fn.extend({ 4470 attr: function(name, value) { 4471 return access(this, jQuery2.attr, name, value, arguments.length > 1); 4472 }, 4473 removeAttr: function(name) { 4474 return this.each(function() { 4475 jQuery2.removeAttr(this, name); 4476 }); 4477 } 4478 }); 4479 jQuery2.extend({ 4480 attr: function(elem, name, value) { 4481 var ret, hooks, nType = elem.nodeType; 4482 if (nType === 3 || nType === 8 || nType === 2) { 4483 return; 4484 } 4485 if (typeof elem.getAttribute === "undefined") { 4486 return jQuery2.prop(elem, name, value); 4487 } 4488 if (nType !== 1 || !jQuery2.isXMLDoc(elem)) { 4489 hooks = jQuery2.attrHooks[name.toLowerCase()] || (jQuery2.expr.match.bool.test(name) ? boolHook : void 0); 4490 } 4491 if (value !== void 0) { 4492 if (value === null) { 4493 jQuery2.removeAttr(elem, name); 4494 return; 4495 } 4496 if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== void 0) { 4497 return ret; 4498 } 4499 elem.setAttribute(name, value + ""); 4500 return value; 4501 } 4502 if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) { 4503 return ret; 4504 } 4505 ret = jQuery2.find.attr(elem, name); 4506 return ret == null ? void 0 : ret; 4507 }, 4508 attrHooks: { 4509 type: { 4510 set: function(elem, value) { 4511 if (!support2.radioValue && value === "radio" && nodeName(elem, "input")) { 4512 var val = elem.value; 4513 elem.setAttribute("type", value); 4514 if (val) { 4515 elem.value = val; 4516 } 4517 return value; 4518 } 4519 } 4520 } 4521 }, 4522 removeAttr: function(elem, value) { 4523 var name, i = 0, attrNames = value && value.match(rnothtmlwhite); 4524 if (attrNames && elem.nodeType === 1) { 4525 while (name = attrNames[i++]) { 4526 elem.removeAttribute(name); 4527 } 4528 } 4529 } 4530 }); 4531 boolHook = { 4532 set: function(elem, value, name) { 4533 if (value === false) { 4534 jQuery2.removeAttr(elem, name); 4535 } else { 4536 elem.setAttribute(name, name); 4537 } 4538 return name; 4539 } 4540 }; 4541 jQuery2.each(jQuery2.expr.match.bool.source.match(/\w+/g), function(_i, name) { 4542 var getter = attrHandle[name] || jQuery2.find.attr; 4543 attrHandle[name] = function(elem, name2, isXML) { 4544 var ret, handle, lowercaseName = name2.toLowerCase(); 4545 if (!isXML) { 4546 handle = attrHandle[lowercaseName]; 4547 attrHandle[lowercaseName] = ret; 4548 ret = getter(elem, name2, isXML) != null ? lowercaseName : null; 4549 attrHandle[lowercaseName] = handle; 4550 } 4551 return ret; 4552 }; 4553 }); 4554 var rfocusable = /^(?:input|select|textarea|button)$/i, rclickable = /^(?:a|area)$/i; 4555 jQuery2.fn.extend({ 4556 prop: function(name, value) { 4557 return access(this, jQuery2.prop, name, value, arguments.length > 1); 4558 }, 4559 removeProp: function(name) { 4560 return this.each(function() { 4561 delete this[jQuery2.propFix[name] || name]; 4562 }); 4563 } 4564 }); 4565 jQuery2.extend({ 4566 prop: function(elem, name, value) { 4567 var ret, hooks, nType = elem.nodeType; 4568 if (nType === 3 || nType === 8 || nType === 2) { 4569 return; 4570 } 4571 if (nType !== 1 || !jQuery2.isXMLDoc(elem)) { 4572 name = jQuery2.propFix[name] || name; 4573 hooks = jQuery2.propHooks[name]; 4574 } 4575 if (value !== void 0) { 4576 if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== void 0) { 4577 return ret; 4578 } 4579 return elem[name] = value; 4580 } 4581 if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) { 4582 return ret; 4583 } 4584 return elem[name]; 4585 }, 4586 propHooks: { 4587 tabIndex: { 4588 get: function(elem) { 4589 var tabindex = jQuery2.find.attr(elem, "tabindex"); 4590 if (tabindex) { 4591 return parseInt(tabindex, 10); 4592 } 4593 if (rfocusable.test(elem.nodeName) || rclickable.test(elem.nodeName) && elem.href) { 4594 return 0; 4595 } 4596 return -1; 4597 } 4598 } 4599 }, 4600 propFix: { 4601 "for": "htmlFor", 4602 "class": "className" 4603 } 4604 }); 4605 if (!support2.optSelected) { 4606 jQuery2.propHooks.selected = { 4607 get: function(elem) { 4608 var parent = elem.parentNode; 4609 if (parent && parent.parentNode) { 4610 parent.parentNode.selectedIndex; 4611 } 4612 return null; 4613 }, 4614 set: function(elem) { 4615 var parent = elem.parentNode; 4616 if (parent) { 4617 parent.selectedIndex; 4618 if (parent.parentNode) { 4619 parent.parentNode.selectedIndex; 4620 } 4621 } 4622 } 4623 }; 4624 } 4625 jQuery2.each([ 4626 "tabIndex", 4627 "readOnly", 4628 "maxLength", 4629 "cellSpacing", 4630 "cellPadding", 4631 "rowSpan", 4632 "colSpan", 4633 "useMap", 4634 "frameBorder", 4635 "contentEditable" 4636 ], function() { 4637 jQuery2.propFix[this.toLowerCase()] = this; 4638 }); 4639 function stripAndCollapse(value) { 4640 var tokens = value.match(rnothtmlwhite) || []; 4641 return tokens.join(" "); 4642 } 4643 function getClass(elem) { 4644 return elem.getAttribute && elem.getAttribute("class") || ""; 4645 } 4646 function classesToArray(value) { 4647 if (Array.isArray(value)) { 4648 return value; 4649 } 4650 if (typeof value === "string") { 4651 return value.match(rnothtmlwhite) || []; 4652 } 4653 return []; 4654 } 4655 jQuery2.fn.extend({ 4656 addClass: function(value) { 4657 var classNames, cur, curValue, className, i, finalValue; 4658 if (isFunction(value)) { 4659 return this.each(function(j) { 4660 jQuery2(this).addClass(value.call(this, j, getClass(this))); 4661 }); 4662 } 4663 classNames = classesToArray(value); 4664 if (classNames.length) { 4665 return this.each(function() { 4666 curValue = getClass(this); 4667 cur = this.nodeType === 1 && " " + stripAndCollapse(curValue) + " "; 4668 if (cur) { 4669 for (i = 0; i < classNames.length; i++) { 4670 className = classNames[i]; 4671 if (cur.indexOf(" " + className + " ") < 0) { 4672 cur += className + " "; 4673 } 4674 } 4675 finalValue = stripAndCollapse(cur); 4676 if (curValue !== finalValue) { 4677 this.setAttribute("class", finalValue); 4678 } 4679 } 4680 }); 4681 } 4682 return this; 4683 }, 4684 removeClass: function(value) { 4685 var classNames, cur, curValue, className, i, finalValue; 4686 if (isFunction(value)) { 4687 return this.each(function(j) { 4688 jQuery2(this).removeClass(value.call(this, j, getClass(this))); 4689 }); 4690 } 4691 if (!arguments.length) { 4692 return this.attr("class", ""); 4693 } 4694 classNames = classesToArray(value); 4695 if (classNames.length) { 4696 return this.each(function() { 4697 curValue = getClass(this); 4698 cur = this.nodeType === 1 && " " + stripAndCollapse(curValue) + " "; 4699 if (cur) { 4700 for (i = 0; i < classNames.length; i++) { 4701 className = classNames[i]; 4702 while (cur.indexOf(" " + className + " ") > -1) { 4703 cur = cur.replace(" " + className + " ", " "); 4704 } 4705 } 4706 finalValue = stripAndCollapse(cur); 4707 if (curValue !== finalValue) { 4708 this.setAttribute("class", finalValue); 4709 } 4710 } 4711 }); 4712 } 4713 return this; 4714 }, 4715 toggleClass: function(value, stateVal) { 4716 var classNames, className, i, self2, type = typeof value, isValidValue = type === "string" || Array.isArray(value); 4717 if (isFunction(value)) { 4718 return this.each(function(i2) { 4719 jQuery2(this).toggleClass( 4720 value.call(this, i2, getClass(this), stateVal), 4721 stateVal 4722 ); 4723 }); 4724 } 4725 if (typeof stateVal === "boolean" && isValidValue) { 4726 return stateVal ? this.addClass(value) : this.removeClass(value); 4727 } 4728 classNames = classesToArray(value); 4729 return this.each(function() { 4730 if (isValidValue) { 4731 self2 = jQuery2(this); 4732 for (i = 0; i < classNames.length; i++) { 4733 className = classNames[i]; 4734 if (self2.hasClass(className)) { 4735 self2.removeClass(className); 4736 } else { 4737 self2.addClass(className); 4738 } 4739 } 4740 } else if (value === void 0 || type === "boolean") { 4741 className = getClass(this); 4742 if (className) { 4743 dataPriv.set(this, "__className__", className); 4744 } 4745 if (this.setAttribute) { 4746 this.setAttribute( 4747 "class", 4748 className || value === false ? "" : dataPriv.get(this, "__className__") || "" 4749 ); 4750 } 4751 } 4752 }); 4753 }, 4754 hasClass: function(selector) { 4755 var className, elem, i = 0; 4756 className = " " + selector + " "; 4757 while (elem = this[i++]) { 4758 if (elem.nodeType === 1 && (" " + stripAndCollapse(getClass(elem)) + " ").indexOf(className) > -1) { 4759 return true; 4760 } 4761 } 4762 return false; 4763 } 4764 }); 4765 var rreturn = /\r/g; 4766 jQuery2.fn.extend({ 4767 val: function(value) { 4768 var hooks, ret, valueIsFunction, elem = this[0]; 4769 if (!arguments.length) { 4770 if (elem) { 4771 hooks = jQuery2.valHooks[elem.type] || jQuery2.valHooks[elem.nodeName.toLowerCase()]; 4772 if (hooks && "get" in hooks && (ret = hooks.get(elem, "value")) !== void 0) { 4773 return ret; 4774 } 4775 ret = elem.value; 4776 if (typeof ret === "string") { 4777 return ret.replace(rreturn, ""); 4778 } 4779 return ret == null ? "" : ret; 4780 } 4781 return; 4782 } 4783 valueIsFunction = isFunction(value); 4784 return this.each(function(i) { 4785 var val; 4786 if (this.nodeType !== 1) { 4787 return; 4788 } 4789 if (valueIsFunction) { 4790 val = value.call(this, i, jQuery2(this).val()); 4791 } else { 4792 val = value; 4793 } 4794 if (val == null) { 4795 val = ""; 4796 } else if (typeof val === "number") { 4797 val += ""; 4798 } else if (Array.isArray(val)) { 4799 val = jQuery2.map(val, function(value2) { 4800 return value2 == null ? "" : value2 + ""; 4801 }); 4802 } 4803 hooks = jQuery2.valHooks[this.type] || jQuery2.valHooks[this.nodeName.toLowerCase()]; 4804 if (!hooks || !("set" in hooks) || hooks.set(this, val, "value") === void 0) { 4805 this.value = val; 4806 } 4807 }); 4808 } 4809 }); 4810 jQuery2.extend({ 4811 valHooks: { 4812 option: { 4813 get: function(elem) { 4814 var val = jQuery2.find.attr(elem, "value"); 4815 return val != null ? val : stripAndCollapse(jQuery2.text(elem)); 4816 } 4817 }, 4818 select: { 4819 get: function(elem) { 4820 var value, option, i, options = elem.options, index = elem.selectedIndex, one = elem.type === "select-one", values = one ? null : [], max = one ? index + 1 : options.length; 4821 if (index < 0) { 4822 i = max; 4823 } else { 4824 i = one ? index : 0; 4825 } 4826 for (; i < max; i++) { 4827 option = options[i]; 4828 if ((option.selected || i === index) && !option.disabled && (!option.parentNode.disabled || !nodeName(option.parentNode, "optgroup"))) { 4829 value = jQuery2(option).val(); 4830 if (one) { 4831 return value; 4832 } 4833 values.push(value); 4834 } 4835 } 4836 return values; 4837 }, 4838 set: function(elem, value) { 4839 var optionSet, option, options = elem.options, values = jQuery2.makeArray(value), i = options.length; 4840 while (i--) { 4841 option = options[i]; 4842 if (option.selected = jQuery2.inArray(jQuery2.valHooks.option.get(option), values) > -1) { 4843 optionSet = true; 4844 } 4845 } 4846 if (!optionSet) { 4847 elem.selectedIndex = -1; 4848 } 4849 return values; 4850 } 4851 } 4852 } 4853 }); 4854 jQuery2.each(["radio", "checkbox"], function() { 4855 jQuery2.valHooks[this] = { 4856 set: function(elem, value) { 4857 if (Array.isArray(value)) { 4858 return elem.checked = jQuery2.inArray(jQuery2(elem).val(), value) > -1; 4859 } 4860 } 4861 }; 4862 if (!support2.checkOn) { 4863 jQuery2.valHooks[this].get = function(elem) { 4864 return elem.getAttribute("value") === null ? "on" : elem.value; 4865 }; 4866 } 4867 }); 4868 support2.focusin = "onfocusin" in window2; 4869 var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, stopPropagationCallback = function(e) { 4870 e.stopPropagation(); 4871 }; 4872 jQuery2.extend(jQuery2.event, { 4873 trigger: function(event2, data, elem, onlyHandlers) { 4874 var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, eventPath = [elem || document2], type = hasOwn.call(event2, "type") ? event2.type : event2, namespaces = hasOwn.call(event2, "namespace") ? event2.namespace.split(".") : []; 4875 cur = lastElement = tmp = elem = elem || document2; 4876 if (elem.nodeType === 3 || elem.nodeType === 8) { 4877 return; 4878 } 4879 if (rfocusMorph.test(type + jQuery2.event.triggered)) { 4880 return; 4881 } 4882 if (type.indexOf(".") > -1) { 4883 namespaces = type.split("."); 4884 type = namespaces.shift(); 4885 namespaces.sort(); 4886 } 4887 ontype = type.indexOf(":") < 0 && "on" + type; 4888 event2 = event2[jQuery2.expando] ? event2 : new jQuery2.Event(type, typeof event2 === "object" && event2); 4889 event2.isTrigger = onlyHandlers ? 2 : 3; 4890 event2.namespace = namespaces.join("."); 4891 event2.rnamespace = event2.namespace ? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null; 4892 event2.result = void 0; 4893 if (!event2.target) { 4894 event2.target = elem; 4895 } 4896 data = data == null ? [event2] : jQuery2.makeArray(data, [event2]); 4897 special = jQuery2.event.special[type] || {}; 4898 if (!onlyHandlers && special.trigger && special.trigger.apply(elem, data) === false) { 4899 return; 4900 } 4901 if (!onlyHandlers && !special.noBubble && !isWindow(elem)) { 4902 bubbleType = special.delegateType || type; 4903 if (!rfocusMorph.test(bubbleType + type)) { 4904 cur = cur.parentNode; 4905 } 4906 for (; cur; cur = cur.parentNode) { 4907 eventPath.push(cur); 4908 tmp = cur; 4909 } 4910 if (tmp === (elem.ownerDocument || document2)) { 4911 eventPath.push(tmp.defaultView || tmp.parentWindow || window2); 4912 } 4913 } 4914 i = 0; 4915 while ((cur = eventPath[i++]) && !event2.isPropagationStopped()) { 4916 lastElement = cur; 4917 event2.type = i > 1 ? bubbleType : special.bindType || type; 4918 handle = (dataPriv.get(cur, "events") || /* @__PURE__ */ Object.create(null))[event2.type] && dataPriv.get(cur, "handle"); 4919 if (handle) { 4920 handle.apply(cur, data); 4921 } 4922 handle = ontype && cur[ontype]; 4923 if (handle && handle.apply && acceptData(cur)) { 4924 event2.result = handle.apply(cur, data); 4925 if (event2.result === false) { 4926 event2.preventDefault(); 4927 } 4928 } 4929 } 4930 event2.type = type; 4931 if (!onlyHandlers && !event2.isDefaultPrevented()) { 4932 if ((!special._default || special._default.apply(eventPath.pop(), data) === false) && acceptData(elem)) { 4933 if (ontype && isFunction(elem[type]) && !isWindow(elem)) { 4934 tmp = elem[ontype]; 4935 if (tmp) { 4936 elem[ontype] = null; 4937 } 4938 jQuery2.event.triggered = type; 4939 if (event2.isPropagationStopped()) { 4940 lastElement.addEventListener(type, stopPropagationCallback); 4941 } 4942 elem[type](); 4943 if (event2.isPropagationStopped()) { 4944 lastElement.removeEventListener(type, stopPropagationCallback); 4945 } 4946 jQuery2.event.triggered = void 0; 4947 if (tmp) { 4948 elem[ontype] = tmp; 4949 } 4950 } 4951 } 4952 } 4953 return event2.result; 4954 }, 4955 simulate: function(type, elem, event2) { 4956 var e = jQuery2.extend( 4957 new jQuery2.Event(), 4958 event2, 4959 { 4960 type, 4961 isSimulated: true 4962 } 4963 ); 4964 jQuery2.event.trigger(e, null, elem); 4965 } 4966 }); 4967 jQuery2.fn.extend({ 4968 trigger: function(type, data) { 4969 return this.each(function() { 4970 jQuery2.event.trigger(type, data, this); 4971 }); 4972 }, 4973 triggerHandler: function(type, data) { 4974 var elem = this[0]; 4975 if (elem) { 4976 return jQuery2.event.trigger(type, data, elem, true); 4977 } 4978 } 4979 }); 4980 if (!support2.focusin) { 4981 jQuery2.each({ focus: "focusin", blur: "focusout" }, function(orig, fix) { 4982 var handler = function(event2) { 4983 jQuery2.event.simulate(fix, event2.target, jQuery2.event.fix(event2)); 4984 }; 4985 jQuery2.event.special[fix] = { 4986 setup: function() { 4987 var doc = this.ownerDocument || this.document || this, attaches = dataPriv.access(doc, fix); 4988 if (!attaches) { 4989 doc.addEventListener(orig, handler, true); 4990 } 4991 dataPriv.access(doc, fix, (attaches || 0) + 1); 4992 }, 4993 teardown: function() { 4994 var doc = this.ownerDocument || this.document || this, attaches = dataPriv.access(doc, fix) - 1; 4995 if (!attaches) { 4996 doc.removeEventListener(orig, handler, true); 4997 dataPriv.remove(doc, fix); 4998 } else { 4999 dataPriv.access(doc, fix, attaches); 5000 } 5001 } 5002 }; 5003 }); 5004 } 5005 var location2 = window2.location; 5006 var nonce = { guid: Date.now() }; 5007 var rquery = /\?/; 5008 jQuery2.parseXML = function(data) { 5009 var xml, parserErrorElem; 5010 if (!data || typeof data !== "string") { 5011 return null; 5012 } 5013 try { 5014 xml = new window2.DOMParser().parseFromString(data, "text/xml"); 5015 } catch (e) { 5016 } 5017 parserErrorElem = xml && xml.getElementsByTagName("parsererror")[0]; 5018 if (!xml || parserErrorElem) { 5019 jQuery2.error("Invalid XML: " + (parserErrorElem ? jQuery2.map(parserErrorElem.childNodes, function(el) { 5020 return el.textContent; 5021 }).join("\n") : data)); 5022 } 5023 return xml; 5024 }; 5025 var rbracket = /\[\]$/, rCRLF = /\r?\n/g, rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, rsubmittable = /^(?:input|select|textarea|keygen)/i; 5026 function buildParams(prefix, obj, traditional, add) { 5027 var name; 5028 if (Array.isArray(obj)) { 5029 jQuery2.each(obj, function(i, v) { 5030 if (traditional || rbracket.test(prefix)) { 5031 add(prefix, v); 5032 } else { 5033 buildParams( 5034 prefix + "[" + (typeof v === "object" && v != null ? i : "") + "]", 5035 v, 5036 traditional, 5037 add 5038 ); 5039 } 5040 }); 5041 } else if (!traditional && toType(obj) === "object") { 5042 for (name in obj) { 5043 buildParams(prefix + "[" + name + "]", obj[name], traditional, add); 5044 } 5045 } else { 5046 add(prefix, obj); 5047 } 5048 } 5049 jQuery2.param = function(a, traditional) { 5050 var prefix, s = [], add = function(key, valueOrFunction) { 5051 var value = isFunction(valueOrFunction) ? valueOrFunction() : valueOrFunction; 5052 s[s.length] = encodeURIComponent(key) + "=" + encodeURIComponent(value == null ? "" : value); 5053 }; 5054 if (a == null) { 5055 return ""; 5056 } 5057 if (Array.isArray(a) || a.jquery && !jQuery2.isPlainObject(a)) { 5058 jQuery2.each(a, function() { 5059 add(this.name, this.value); 5060 }); 5061 } else { 5062 for (prefix in a) { 5063 buildParams(prefix, a[prefix], traditional, add); 5064 } 5065 } 5066 return s.join("&"); 5067 }; 5068 jQuery2.fn.extend({ 5069 serialize: function() { 5070 return jQuery2.param(this.serializeArray()); 5071 }, 5072 serializeArray: function() { 5073 return this.map(function() { 5074 var elements = jQuery2.prop(this, "elements"); 5075 return elements ? jQuery2.makeArray(elements) : this; 5076 }).filter(function() { 5077 var type = this.type; 5078 return this.name && !jQuery2(this).is(":disabled") && rsubmittable.test(this.nodeName) && !rsubmitterTypes.test(type) && (this.checked || !rcheckableType.test(type)); 5079 }).map(function(_i, elem) { 5080 var val = jQuery2(this).val(); 5081 if (val == null) { 5082 return null; 5083 } 5084 if (Array.isArray(val)) { 5085 return jQuery2.map(val, function(val2) { 5086 return { name: elem.name, value: val2.replace(rCRLF, "\r\n") }; 5087 }); 5088 } 5089 return { name: elem.name, value: val.replace(rCRLF, "\r\n") }; 5090 }).get(); 5091 } 5092 }); 5093 var r20 = /%20/g, rhash = /#.*$/, rantiCache = /([?&])_=[^&]*/, rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, rnoContent = /^(?:GET|HEAD)$/, rprotocol = /^\/\//, prefilters = {}, transports = {}, allTypes = "*/".concat("*"), originAnchor = document2.createElement("a"); 5094 originAnchor.href = location2.href; 5095 function addToPrefiltersOrTransports(structure) { 5096 return function(dataTypeExpression, func) { 5097 if (typeof dataTypeExpression !== "string") { 5098 func = dataTypeExpression; 5099 dataTypeExpression = "*"; 5100 } 5101 var dataType, i = 0, dataTypes = dataTypeExpression.toLowerCase().match(rnothtmlwhite) || []; 5102 if (isFunction(func)) { 5103 while (dataType = dataTypes[i++]) { 5104 if (dataType[0] === "+") { 5105 dataType = dataType.slice(1) || "*"; 5106 (structure[dataType] = structure[dataType] || []).unshift(func); 5107 } else { 5108 (structure[dataType] = structure[dataType] || []).push(func); 5109 } 5110 } 5111 } 5112 }; 5113 } 5114 function inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR) { 5115 var inspected = {}, seekingTransport = structure === transports; 5116 function inspect(dataType) { 5117 var selected; 5118 inspected[dataType] = true; 5119 jQuery2.each(structure[dataType] || [], function(_, prefilterOrFactory) { 5120 var dataTypeOrTransport = prefilterOrFactory(options, originalOptions, jqXHR); 5121 if (typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[dataTypeOrTransport]) { 5122 options.dataTypes.unshift(dataTypeOrTransport); 5123 inspect(dataTypeOrTransport); 5124 return false; 5125 } else if (seekingTransport) { 5126 return !(selected = dataTypeOrTransport); 5127 } 5128 }); 5129 return selected; 5130 } 5131 return inspect(options.dataTypes[0]) || !inspected["*"] && inspect("*"); 5132 } 5133 function ajaxExtend(target, src) { 5134 var key, deep, flatOptions = jQuery2.ajaxSettings.flatOptions || {}; 5135 for (key in src) { 5136 if (src[key] !== void 0) { 5137 (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key]; 5138 } 5139 } 5140 if (deep) { 5141 jQuery2.extend(true, target, deep); 5142 } 5143 return target; 5144 } 5145 function ajaxHandleResponses(s, jqXHR, responses) { 5146 var ct, type, finalDataType, firstDataType, contents = s.contents, dataTypes = s.dataTypes; 5147 while (dataTypes[0] === "*") { 5148 dataTypes.shift(); 5149 if (ct === void 0) { 5150 ct = s.mimeType || jqXHR.getResponseHeader("Content-Type"); 5151 } 5152 } 5153 if (ct) { 5154 for (type in contents) { 5155 if (contents[type] && contents[type].test(ct)) { 5156 dataTypes.unshift(type); 5157 break; 5158 } 5159 } 5160 } 5161 if (dataTypes[0] in responses) { 5162 finalDataType = dataTypes[0]; 5163 } else { 5164 for (type in responses) { 5165 if (!dataTypes[0] || s.converters[type + " " + dataTypes[0]]) { 5166 finalDataType = type; 5167 break; 5168 } 5169 if (!firstDataType) { 5170 firstDataType = type; 5171 } 5172 } 5173 finalDataType = finalDataType || firstDataType; 5174 } 5175 if (finalDataType) { 5176 if (finalDataType !== dataTypes[0]) { 5177 dataTypes.unshift(finalDataType); 5178 } 5179 return responses[finalDataType]; 5180 } 5181 } 5182 function ajaxConvert(s, response, jqXHR, isSuccess) { 5183 var conv2, current, conv, tmp, prev, converters = {}, dataTypes = s.dataTypes.slice(); 5184 if (dataTypes[1]) { 5185 for (conv in s.converters) { 5186 converters[conv.toLowerCase()] = s.converters[conv]; 5187 } 5188 } 5189 current = dataTypes.shift(); 5190 while (current) { 5191 if (s.responseFields[current]) { 5192 jqXHR[s.responseFields[current]] = response; 5193 } 5194 if (!prev && isSuccess && s.dataFilter) { 5195 response = s.dataFilter(response, s.dataType); 5196 } 5197 prev = current; 5198 current = dataTypes.shift(); 5199 if (current) { 5200 if (current === "*") { 5201 current = prev; 5202 } else if (prev !== "*" && prev !== current) { 5203 conv = converters[prev + " " + current] || converters["* " + current]; 5204 if (!conv) { 5205 for (conv2 in converters) { 5206 tmp = conv2.split(" "); 5207 if (tmp[1] === current) { 5208 conv = converters[prev + " " + tmp[0]] || converters["* " + tmp[0]]; 5209 if (conv) { 5210 if (conv === true) { 5211 conv = converters[conv2]; 5212 } else if (converters[conv2] !== true) { 5213 current = tmp[0]; 5214 dataTypes.unshift(tmp[1]); 5215 } 5216 break; 5217 } 5218 } 5219 } 5220 } 5221 if (conv !== true) { 5222 if (conv && s.throws) { 5223 response = conv(response); 5224 } else { 5225 try { 5226 response = conv(response); 5227 } catch (e) { 5228 return { 5229 state: "parsererror", 5230 error: conv ? e : "No conversion from " + prev + " to " + current 5231 }; 5232 } 5233 } 5234 } 5235 } 5236 } 5237 } 5238 return { state: "success", data: response }; 5239 } 5240 jQuery2.extend({ 5241 active: 0, 5242 lastModified: {}, 5243 etag: {}, 5244 ajaxSettings: { 5245 url: location2.href, 5246 type: "GET", 5247 isLocal: rlocalProtocol.test(location2.protocol), 5248 global: true, 5249 processData: true, 5250 async: true, 5251 contentType: "application/x-www-form-urlencoded; charset=UTF-8", 5252 accepts: { 5253 "*": allTypes, 5254 text: "text/plain", 5255 html: "text/html", 5256 xml: "application/xml, text/xml", 5257 json: "application/json, text/javascript" 5258 }, 5259 contents: { 5260 xml: /\bxml\b/, 5261 html: /\bhtml/, 5262 json: /\bjson\b/ 5263 }, 5264 responseFields: { 5265 xml: "responseXML", 5266 text: "responseText", 5267 json: "responseJSON" 5268 }, 5269 converters: { 5270 "* text": String, 5271 "text html": true, 5272 "text json": JSON.parse, 5273 "text xml": jQuery2.parseXML 5274 }, 5275 flatOptions: { 5276 url: true, 5277 context: true 5278 } 5279 }, 5280 ajaxSetup: function(target, settings) { 5281 return settings ? ajaxExtend(ajaxExtend(target, jQuery2.ajaxSettings), settings) : ajaxExtend(jQuery2.ajaxSettings, target); 5282 }, 5283 ajaxPrefilter: addToPrefiltersOrTransports(prefilters), 5284 ajaxTransport: addToPrefiltersOrTransports(transports), 5285 ajax: function(url, options) { 5286 if (typeof url === "object") { 5287 options = url; 5288 url = void 0; 5289 } 5290 options = options || {}; 5291 var transport, cacheURL, responseHeadersString, responseHeaders, timeoutTimer, urlAnchor, completed2, fireGlobals, i, uncached, s = jQuery2.ajaxSetup({}, options), callbackContext = s.context || s, globalEventContext = s.context && (callbackContext.nodeType || callbackContext.jquery) ? jQuery2(callbackContext) : jQuery2.event, deferred = jQuery2.Deferred(), completeDeferred = jQuery2.Callbacks("once memory"), statusCode = s.statusCode || {}, requestHeaders = {}, requestHeadersNames = {}, strAbort = "canceled", jqXHR = { 5292 readyState: 0, 5293 getResponseHeader: function(key) { 5294 var match; 5295 if (completed2) { 5296 if (!responseHeaders) { 5297 responseHeaders = {}; 5298 while (match = rheaders.exec(responseHeadersString)) { 5299 responseHeaders[match[1].toLowerCase() + " "] = (responseHeaders[match[1].toLowerCase() + " "] || []).concat(match[2]); 5300 } 5301 } 5302 match = responseHeaders[key.toLowerCase() + " "]; 5303 } 5304 return match == null ? null : match.join(", "); 5305 }, 5306 getAllResponseHeaders: function() { 5307 return completed2 ? responseHeadersString : null; 5308 }, 5309 setRequestHeader: function(name, value) { 5310 if (completed2 == null) { 5311 name = requestHeadersNames[name.toLowerCase()] = requestHeadersNames[name.toLowerCase()] || name; 5312 requestHeaders[name] = value; 5313 } 5314 return this; 5315 }, 5316 overrideMimeType: function(type) { 5317 if (completed2 == null) { 5318 s.mimeType = type; 5319 } 5320 return this; 5321 }, 5322 statusCode: function(map) { 5323 var code; 5324 if (map) { 5325 if (completed2) { 5326 jqXHR.always(map[jqXHR.status]); 5327 } else { 5328 for (code in map) { 5329 statusCode[code] = [statusCode[code], map[code]]; 5330 } 5331 } 5332 } 5333 return this; 5334 }, 5335 abort: function(statusText) { 5336 var finalText = statusText || strAbort; 5337 if (transport) { 5338 transport.abort(finalText); 5339 } 5340 done(0, finalText); 5341 return this; 5342 } 5343 }; 5344 deferred.promise(jqXHR); 5345 s.url = ((url || s.url || location2.href) + "").replace(rprotocol, location2.protocol + "//"); 5346 s.type = options.method || options.type || s.method || s.type; 5347 s.dataTypes = (s.dataType || "*").toLowerCase().match(rnothtmlwhite) || [""]; 5348 if (s.crossDomain == null) { 5349 urlAnchor = document2.createElement("a"); 5350 try { 5351 urlAnchor.href = s.url; 5352 urlAnchor.href = urlAnchor.href; 5353 s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== urlAnchor.protocol + "//" + urlAnchor.host; 5354 } catch (e) { 5355 s.crossDomain = true; 5356 } 5357 } 5358 if (s.data && s.processData && typeof s.data !== "string") { 5359 s.data = jQuery2.param(s.data, s.traditional); 5360 } 5361 inspectPrefiltersOrTransports(prefilters, s, options, jqXHR); 5362 if (completed2) { 5363 return jqXHR; 5364 } 5365 fireGlobals = jQuery2.event && s.global; 5366 if (fireGlobals && jQuery2.active++ === 0) { 5367 jQuery2.event.trigger("ajaxStart"); 5368 } 5369 s.type = s.type.toUpperCase(); 5370 s.hasContent = !rnoContent.test(s.type); 5371 cacheURL = s.url.replace(rhash, ""); 5372 if (!s.hasContent) { 5373 uncached = s.url.slice(cacheURL.length); 5374 if (s.data && (s.processData || typeof s.data === "string")) { 5375 cacheURL += (rquery.test(cacheURL) ? "&" : "?") + s.data; 5376 delete s.data; 5377 } 5378 if (s.cache === false) { 5379 cacheURL = cacheURL.replace(rantiCache, "$1"); 5380 uncached = (rquery.test(cacheURL) ? "&" : "?") + "_=" + nonce.guid++ + uncached; 5381 } 5382 s.url = cacheURL + uncached; 5383 } else if (s.data && s.processData && (s.contentType || "").indexOf("application/x-www-form-urlencoded") === 0) { 5384 s.data = s.data.replace(r20, "+"); 5385 } 5386 if (s.ifModified) { 5387 if (jQuery2.lastModified[cacheURL]) { 5388 jqXHR.setRequestHeader("If-Modified-Since", jQuery2.lastModified[cacheURL]); 5389 } 5390 if (jQuery2.etag[cacheURL]) { 5391 jqXHR.setRequestHeader("If-None-Match", jQuery2.etag[cacheURL]); 5392 } 5393 } 5394 if (s.data && s.hasContent && s.contentType !== false || options.contentType) { 5395 jqXHR.setRequestHeader("Content-Type", s.contentType); 5396 } 5397 jqXHR.setRequestHeader( 5398 "Accept", 5399 s.dataTypes[0] && s.accepts[s.dataTypes[0]] ? s.accepts[s.dataTypes[0]] + (s.dataTypes[0] !== "*" ? ", " + allTypes + "; q=0.01" : "") : s.accepts["*"] 5400 ); 5401 for (i in s.headers) { 5402 jqXHR.setRequestHeader(i, s.headers[i]); 5403 } 5404 if (s.beforeSend && (s.beforeSend.call(callbackContext, jqXHR, s) === false || completed2)) { 5405 return jqXHR.abort(); 5406 } 5407 strAbort = "abort"; 5408 completeDeferred.add(s.complete); 5409 jqXHR.done(s.success); 5410 jqXHR.fail(s.error); 5411 transport = inspectPrefiltersOrTransports(transports, s, options, jqXHR); 5412 if (!transport) { 5413 done(-1, "No Transport"); 5414 } else { 5415 jqXHR.readyState = 1; 5416 if (fireGlobals) { 5417 globalEventContext.trigger("ajaxSend", [jqXHR, s]); 5418 } 5419 if (completed2) { 5420 return jqXHR; 5421 } 5422 if (s.async && s.timeout > 0) { 5423 timeoutTimer = window2.setTimeout(function() { 5424 jqXHR.abort("timeout"); 5425 }, s.timeout); 5426 } 5427 try { 5428 completed2 = false; 5429 transport.send(requestHeaders, done); 5430 } catch (e) { 5431 if (completed2) { 5432 throw e; 5433 } 5434 done(-1, e); 5435 } 5436 } 5437 function done(status, nativeStatusText, responses, headers) { 5438 var isSuccess, success, error, response, modified, statusText = nativeStatusText; 5439 if (completed2) { 5440 return; 5441 } 5442 completed2 = true; 5443 if (timeoutTimer) { 5444 window2.clearTimeout(timeoutTimer); 5445 } 5446 transport = void 0; 5447 responseHeadersString = headers || ""; 5448 jqXHR.readyState = status > 0 ? 4 : 0; 5449 isSuccess = status >= 200 && status < 300 || status === 304; 5450 if (responses) { 5451 response = ajaxHandleResponses(s, jqXHR, responses); 5452 } 5453 if (!isSuccess && jQuery2.inArray("script", s.dataTypes) > -1 && jQuery2.inArray("json", s.dataTypes) < 0) { 5454 s.converters["text script"] = function() { 5455 }; 5456 } 5457 response = ajaxConvert(s, response, jqXHR, isSuccess); 5458 if (isSuccess) { 5459 if (s.ifModified) { 5460 modified = jqXHR.getResponseHeader("Last-Modified"); 5461 if (modified) { 5462 jQuery2.lastModified[cacheURL] = modified; 5463 } 5464 modified = jqXHR.getResponseHeader("etag"); 5465 if (modified) { 5466 jQuery2.etag[cacheURL] = modified; 5467 } 5468 } 5469 if (status === 204 || s.type === "HEAD") { 5470 statusText = "nocontent"; 5471 } else if (status === 304) { 5472 statusText = "notmodified"; 5473 } else { 5474 statusText = response.state; 5475 success = response.data; 5476 error = response.error; 5477 isSuccess = !error; 5478 } 5479 } else { 5480 error = statusText; 5481 if (status || !statusText) { 5482 statusText = "error"; 5483 if (status < 0) { 5484 status = 0; 5485 } 5486 } 5487 } 5488 jqXHR.status = status; 5489 jqXHR.statusText = (nativeStatusText || statusText) + ""; 5490 if (isSuccess) { 5491 deferred.resolveWith(callbackContext, [success, statusText, jqXHR]); 5492 } else { 5493 deferred.rejectWith(callbackContext, [jqXHR, statusText, error]); 5494 } 5495 jqXHR.statusCode(statusCode); 5496 statusCode = void 0; 5497 if (fireGlobals) { 5498 globalEventContext.trigger( 5499 isSuccess ? "ajaxSuccess" : "ajaxError", 5500 [jqXHR, s, isSuccess ? success : error] 5501 ); 5502 } 5503 completeDeferred.fireWith(callbackContext, [jqXHR, statusText]); 5504 if (fireGlobals) { 5505 globalEventContext.trigger("ajaxComplete", [jqXHR, s]); 5506 if (!--jQuery2.active) { 5507 jQuery2.event.trigger("ajaxStop"); 5508 } 5509 } 5510 } 5511 return jqXHR; 5512 }, 5513 getJSON: function(url, data, callback) { 5514 return jQuery2.get(url, data, callback, "json"); 5515 }, 5516 getScript: function(url, callback) { 5517 return jQuery2.get(url, void 0, callback, "script"); 5518 } 5519 }); 5520 jQuery2.each(["get", "post"], function(_i, method) { 5521 jQuery2[method] = function(url, data, callback, type) { 5522 if (isFunction(data)) { 5523 type = type || callback; 5524 callback = data; 5525 data = void 0; 5526 } 5527 return jQuery2.ajax(jQuery2.extend({ 5528 url, 5529 type: method, 5530 dataType: type, 5531 data, 5532 success: callback 5533 }, jQuery2.isPlainObject(url) && url)); 5534 }; 5535 }); 5536 jQuery2.ajaxPrefilter(function(s) { 5537 var i; 5538 for (i in s.headers) { 5539 if (i.toLowerCase() === "content-type") { 5540 s.contentType = s.headers[i] || ""; 5541 } 5542 } 5543 }); 5544 jQuery2._evalUrl = function(url, options, doc) { 5545 return jQuery2.ajax({ 5546 url, 5547 type: "GET", 5548 dataType: "script", 5549 cache: true, 5550 async: false, 5551 global: false, 5552 converters: { 5553 "text script": function() { 5554 } 5555 }, 5556 dataFilter: function(response) { 5557 jQuery2.globalEval(response, options, doc); 5558 } 5559 }); 5560 }; 5561 jQuery2.fn.extend({ 5562 wrapAll: function(html) { 5563 var wrap; 5564 if (this[0]) { 5565 if (isFunction(html)) { 5566 html = html.call(this[0]); 5567 } 5568 wrap = jQuery2(html, this[0].ownerDocument).eq(0).clone(true); 5569 if (this[0].parentNode) { 5570 wrap.insertBefore(this[0]); 5571 } 5572 wrap.map(function() { 5573 var elem = this; 5574 while (elem.firstElementChild) { 5575 elem = elem.firstElementChild; 5576 } 5577 return elem; 5578 }).append(this); 5579 } 5580 return this; 5581 }, 5582 wrapInner: function(html) { 5583 if (isFunction(html)) { 5584 return this.each(function(i) { 5585 jQuery2(this).wrapInner(html.call(this, i)); 5586 }); 5587 } 5588 return this.each(function() { 5589 var self2 = jQuery2(this), contents = self2.contents(); 5590 if (contents.length) { 5591 contents.wrapAll(html); 5592 } else { 5593 self2.append(html); 5594 } 5595 }); 5596 }, 5597 wrap: function(html) { 5598 var htmlIsFunction = isFunction(html); 5599 return this.each(function(i) { 5600 jQuery2(this).wrapAll(htmlIsFunction ? html.call(this, i) : html); 5601 }); 5602 }, 5603 unwrap: function(selector) { 5604 this.parent(selector).not("body").each(function() { 5605 jQuery2(this).replaceWith(this.childNodes); 5606 }); 5607 return this; 5608 } 5609 }); 5610 jQuery2.expr.pseudos.hidden = function(elem) { 5611 return !jQuery2.expr.pseudos.visible(elem); 5612 }; 5613 jQuery2.expr.pseudos.visible = function(elem) { 5614 return !!(elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length); 5615 }; 5616 jQuery2.ajaxSettings.xhr = function() { 5617 try { 5618 return new window2.XMLHttpRequest(); 5619 } catch (e) { 5620 } 5621 }; 5622 var xhrSuccessStatus = { 5623 0: 200, 5624 1223: 204 5625 }, xhrSupported = jQuery2.ajaxSettings.xhr(); 5626 support2.cors = !!xhrSupported && "withCredentials" in xhrSupported; 5627 support2.ajax = xhrSupported = !!xhrSupported; 5628 jQuery2.ajaxTransport(function(options) { 5629 var callback, errorCallback; 5630 if (support2.cors || xhrSupported && !options.crossDomain) { 5631 return { 5632 send: function(headers, complete) { 5633 var i, xhr = options.xhr(); 5634 xhr.open( 5635 options.type, 5636 options.url, 5637 options.async, 5638 options.username, 5639 options.password 5640 ); 5641 if (options.xhrFields) { 5642 for (i in options.xhrFields) { 5643 xhr[i] = options.xhrFields[i]; 5644 } 5645 } 5646 if (options.mimeType && xhr.overrideMimeType) { 5647 xhr.overrideMimeType(options.mimeType); 5648 } 5649 if (!options.crossDomain && !headers["X-Requested-With"]) { 5650 headers["X-Requested-With"] = "XMLHttpRequest"; 5651 } 5652 for (i in headers) { 5653 xhr.setRequestHeader(i, headers[i]); 5654 } 5655 callback = function(type) { 5656 return function() { 5657 if (callback) { 5658 callback = errorCallback = xhr.onload = xhr.onerror = xhr.onabort = xhr.ontimeout = xhr.onreadystatechange = null; 5659 if (type === "abort") { 5660 xhr.abort(); 5661 } else if (type === "error") { 5662 if (typeof xhr.status !== "number") { 5663 complete(0, "error"); 5664 } else { 5665 complete( 5666 xhr.status, 5667 xhr.statusText 5668 ); 5669 } 5670 } else { 5671 complete( 5672 xhrSuccessStatus[xhr.status] || xhr.status, 5673 xhr.statusText, 5674 (xhr.responseType || "text") !== "text" || typeof xhr.responseText !== "string" ? { binary: xhr.response } : { text: xhr.responseText }, 5675 xhr.getAllResponseHeaders() 5676 ); 5677 } 5678 } 5679 }; 5680 }; 5681 xhr.onload = callback(); 5682 errorCallback = xhr.onerror = xhr.ontimeout = callback("error"); 5683 if (xhr.onabort !== void 0) { 5684 xhr.onabort = errorCallback; 5685 } else { 5686 xhr.onreadystatechange = function() { 5687 if (xhr.readyState === 4) { 5688 window2.setTimeout(function() { 5689 if (callback) { 5690 errorCallback(); 5691 } 5692 }); 5693 } 5694 }; 5695 } 5696 callback = callback("abort"); 5697 try { 5698 xhr.send(options.hasContent && options.data || null); 5699 } catch (e) { 5700 if (callback) { 5701 throw e; 5702 } 5703 } 5704 }, 5705 abort: function() { 5706 if (callback) { 5707 callback(); 5708 } 5709 } 5710 }; 5711 } 5712 }); 5713 jQuery2.ajaxPrefilter(function(s) { 5714 if (s.crossDomain) { 5715 s.contents.script = false; 5716 } 5717 }); 5718 jQuery2.ajaxSetup({ 5719 accepts: { 5720 script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" 5721 }, 5722 contents: { 5723 script: /\b(?:java|ecma)script\b/ 5724 }, 5725 converters: { 5726 "text script": function(text) { 5727 jQuery2.globalEval(text); 5728 return text; 5729 } 5730 } 5731 }); 5732 jQuery2.ajaxPrefilter("script", function(s) { 5733 if (s.cache === void 0) { 5734 s.cache = false; 5735 } 5736 if (s.crossDomain) { 5737 s.type = "GET"; 5738 } 5739 }); 5740 jQuery2.ajaxTransport("script", function(s) { 5741 if (s.crossDomain || s.scriptAttrs) { 5742 var script, callback; 5743 return { 5744 send: function(_, complete) { 5745 script = jQuery2("<script>").attr(s.scriptAttrs || {}).prop({ charset: s.scriptCharset, src: s.url }).on("load error", callback = function(evt) { 5746 script.remove(); 5747 callback = null; 5748 if (evt) { 5749 complete(evt.type === "error" ? 404 : 200, evt.type); 5750 } 5751 }); 5752 document2.head.appendChild(script[0]); 5753 }, 5754 abort: function() { 5755 if (callback) { 5756 callback(); 5757 } 5758 } 5759 }; 5760 } 5761 }); 5762 var oldCallbacks = [], rjsonp = /(=)\?(?=&|$)|\?\?/; 5763 jQuery2.ajaxSetup({ 5764 jsonp: "callback", 5765 jsonpCallback: function() { 5766 var callback = oldCallbacks.pop() || jQuery2.expando + "_" + nonce.guid++; 5767 this[callback] = true; 5768 return callback; 5769 } 5770 }); 5771 jQuery2.ajaxPrefilter("json jsonp", function(s, originalSettings, jqXHR) { 5772 var callbackName, overwritten, responseContainer, jsonProp = s.jsonp !== false && (rjsonp.test(s.url) ? "url" : typeof s.data === "string" && (s.contentType || "").indexOf("application/x-www-form-urlencoded") === 0 && rjsonp.test(s.data) && "data"); 5773 if (jsonProp || s.dataTypes[0] === "jsonp") { 5774 callbackName = s.jsonpCallback = isFunction(s.jsonpCallback) ? s.jsonpCallback() : s.jsonpCallback; 5775 if (jsonProp) { 5776 s[jsonProp] = s[jsonProp].replace(rjsonp, "$1" + callbackName); 5777 } else if (s.jsonp !== false) { 5778 s.url += (rquery.test(s.url) ? "&" : "?") + s.jsonp + "=" + callbackName; 5779 } 5780 s.converters["script json"] = function() { 5781 if (!responseContainer) { 5782 jQuery2.error(callbackName + " was not called"); 5783 } 5784 return responseContainer[0]; 5785 }; 5786 s.dataTypes[0] = "json"; 5787 overwritten = window2[callbackName]; 5788 window2[callbackName] = function() { 5789 responseContainer = arguments; 5790 }; 5791 jqXHR.always(function() { 5792 if (overwritten === void 0) { 5793 jQuery2(window2).removeProp(callbackName); 5794 } else { 5795 window2[callbackName] = overwritten; 5796 } 5797 if (s[callbackName]) { 5798 s.jsonpCallback = originalSettings.jsonpCallback; 5799 oldCallbacks.push(callbackName); 5800 } 5801 if (responseContainer && isFunction(overwritten)) { 5802 overwritten(responseContainer[0]); 5803 } 5804 responseContainer = overwritten = void 0; 5805 }); 5806 return "script"; 5807 } 5808 }); 5809 support2.createHTMLDocument = function() { 5810 var body = document2.implementation.createHTMLDocument("").body; 5811 body.innerHTML = "<form></form><form></form>"; 5812 return body.childNodes.length === 2; 5813 }(); 5814 jQuery2.parseHTML = function(data, context, keepScripts) { 5815 if (typeof data !== "string") { 5816 return []; 5817 } 5818 if (typeof context === "boolean") { 5819 keepScripts = context; 5820 context = false; 5821 } 5822 var base, parsed, scripts; 5823 if (!context) { 5824 if (support2.createHTMLDocument) { 5825 context = document2.implementation.createHTMLDocument(""); 5826 base = context.createElement("base"); 5827 base.href = document2.location.href; 5828 context.head.appendChild(base); 5829 } else { 5830 context = document2; 5831 } 5832 } 5833 parsed = rsingleTag.exec(data); 5834 scripts = !keepScripts && []; 5835 if (parsed) { 5836 return [context.createElement(parsed[1])]; 5837 } 5838 parsed = buildFragment([data], context, scripts); 5839 if (scripts && scripts.length) { 5840 jQuery2(scripts).remove(); 5841 } 5842 return jQuery2.merge([], parsed.childNodes); 5843 }; 5844 jQuery2.fn.load = function(url, params, callback) { 5845 var selector, type, response, self2 = this, off = url.indexOf(" "); 5846 if (off > -1) { 5847 selector = stripAndCollapse(url.slice(off)); 5848 url = url.slice(0, off); 5849 } 5850 if (isFunction(params)) { 5851 callback = params; 5852 params = void 0; 5853 } else if (params && typeof params === "object") { 5854 type = "POST"; 5855 } 5856 if (self2.length > 0) { 5857 jQuery2.ajax({ 5858 url, 5859 type: type || "GET", 5860 dataType: "html", 5861 data: params 5862 }).done(function(responseText) { 5863 response = arguments; 5864 self2.html(selector ? jQuery2("<div>").append(jQuery2.parseHTML(responseText)).find(selector) : responseText); 5865 }).always(callback && function(jqXHR, status) { 5866 self2.each(function() { 5867 callback.apply(this, response || [jqXHR.responseText, status, jqXHR]); 5868 }); 5869 }); 5870 } 5871 return this; 5872 }; 5873 jQuery2.expr.pseudos.animated = function(elem) { 5874 return jQuery2.grep(jQuery2.timers, function(fn) { 5875 return elem === fn.elem; 5876 }).length; 5877 }; 5878 jQuery2.offset = { 5879 setOffset: function(elem, options, i) { 5880 var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition, position = jQuery2.css(elem, "position"), curElem = jQuery2(elem), props = {}; 5881 if (position === "static") { 5882 elem.style.position = "relative"; 5883 } 5884 curOffset = curElem.offset(); 5885 curCSSTop = jQuery2.css(elem, "top"); 5886 curCSSLeft = jQuery2.css(elem, "left"); 5887 calculatePosition = (position === "absolute" || position === "fixed") && (curCSSTop + curCSSLeft).indexOf("auto") > -1; 5888 if (calculatePosition) { 5889 curPosition = curElem.position(); 5890 curTop = curPosition.top; 5891 curLeft = curPosition.left; 5892 } else { 5893 curTop = parseFloat(curCSSTop) || 0; 5894 curLeft = parseFloat(curCSSLeft) || 0; 5895 } 5896 if (isFunction(options)) { 5897 options = options.call(elem, i, jQuery2.extend({}, curOffset)); 5898 } 5899 if (options.top != null) { 5900 props.top = options.top - curOffset.top + curTop; 5901 } 5902 if (options.left != null) { 5903 props.left = options.left - curOffset.left + curLeft; 5904 } 5905 if ("using" in options) { 5906 options.using.call(elem, props); 5907 } else { 5908 curElem.css(props); 5909 } 5910 } 5911 }; 5912 jQuery2.fn.extend({ 5913 offset: function(options) { 5914 if (arguments.length) { 5915 return options === void 0 ? this : this.each(function(i) { 5916 jQuery2.offset.setOffset(this, options, i); 5917 }); 5918 } 5919 var rect, win, elem = this[0]; 5920 if (!elem) { 5921 return; 5922 } 5923 if (!elem.getClientRects().length) { 5924 return { top: 0, left: 0 }; 5925 } 5926 rect = elem.getBoundingClientRect(); 5927 win = elem.ownerDocument.defaultView; 5928 return { 5929 top: rect.top + win.pageYOffset, 5930 left: rect.left + win.pageXOffset 5931 }; 5932 }, 5933 position: function() { 5934 if (!this[0]) { 5935 return; 5936 } 5937 var offsetParent, offset, doc, elem = this[0], parentOffset = { top: 0, left: 0 }; 5938 if (jQuery2.css(elem, "position") === "fixed") { 5939 offset = elem.getBoundingClientRect(); 5940 } else { 5941 offset = this.offset(); 5942 doc = elem.ownerDocument; 5943 offsetParent = elem.offsetParent || doc.documentElement; 5944 while (offsetParent && (offsetParent === doc.body || offsetParent === doc.documentElement) && jQuery2.css(offsetParent, "position") === "static") { 5945 offsetParent = offsetParent.parentNode; 5946 } 5947 if (offsetParent && offsetParent !== elem && offsetParent.nodeType === 1) { 5948 parentOffset = jQuery2(offsetParent).offset(); 5949 parentOffset.top += jQuery2.css(offsetParent, "borderTopWidth", true); 5950 parentOffset.left += jQuery2.css(offsetParent, "borderLeftWidth", true); 5951 } 5952 } 5953 return { 5954 top: offset.top - parentOffset.top - jQuery2.css(elem, "marginTop", true), 5955 left: offset.left - parentOffset.left - jQuery2.css(elem, "marginLeft", true) 5956 }; 5957 }, 5958 offsetParent: function() { 5959 return this.map(function() { 5960 var offsetParent = this.offsetParent; 5961 while (offsetParent && jQuery2.css(offsetParent, "position") === "static") { 5962 offsetParent = offsetParent.offsetParent; 5963 } 5964 return offsetParent || documentElement; 5965 }); 5966 } 5967 }); 5968 jQuery2.each({ scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function(method, prop) { 5969 var top = "pageYOffset" === prop; 5970 jQuery2.fn[method] = function(val) { 5971 return access(this, function(elem, method2, val2) { 5972 var win; 5973 if (isWindow(elem)) { 5974 win = elem; 5975 } else if (elem.nodeType === 9) { 5976 win = elem.defaultView; 5977 } 5978 if (val2 === void 0) { 5979 return win ? win[prop] : elem[method2]; 5980 } 5981 if (win) { 5982 win.scrollTo( 5983 !top ? val2 : win.pageXOffset, 5984 top ? val2 : win.pageYOffset 5985 ); 5986 } else { 5987 elem[method2] = val2; 5988 } 5989 }, method, val, arguments.length); 5990 }; 5991 }); 5992 jQuery2.each(["top", "left"], function(_i, prop) { 5993 jQuery2.cssHooks[prop] = addGetHookIf( 5994 support2.pixelPosition, 5995 function(elem, computed) { 5996 if (computed) { 5997 computed = curCSS(elem, prop); 5998 return rnumnonpx.test(computed) ? jQuery2(elem).position()[prop] + "px" : computed; 5999 } 6000 } 6001 ); 6002 }); 6003 jQuery2.each({ Height: "height", Width: "width" }, function(name, type) { 6004 jQuery2.each({ 6005 padding: "inner" + name, 6006 content: type, 6007 "": "outer" + name 6008 }, function(defaultExtra, funcName) { 6009 jQuery2.fn[funcName] = function(margin, value) { 6010 var chainable = arguments.length && (defaultExtra || typeof margin !== "boolean"), extra = defaultExtra || (margin === true || value === true ? "margin" : "border"); 6011 return access(this, function(elem, type2, value2) { 6012 var doc; 6013 if (isWindow(elem)) { 6014 return funcName.indexOf("outer") === 0 ? elem["inner" + name] : elem.document.documentElement["client" + name]; 6015 } 6016 if (elem.nodeType === 9) { 6017 doc = elem.documentElement; 6018 return Math.max( 6019 elem.body["scroll" + name], 6020 doc["scroll" + name], 6021 elem.body["offset" + name], 6022 doc["offset" + name], 6023 doc["client" + name] 6024 ); 6025 } 6026 return value2 === void 0 ? jQuery2.css(elem, type2, extra) : jQuery2.style(elem, type2, value2, extra); 6027 }, type, chainable ? margin : void 0, chainable); 6028 }; 6029 }); 6030 }); 6031 jQuery2.each([ 6032 "ajaxStart", 6033 "ajaxStop", 6034 "ajaxComplete", 6035 "ajaxError", 6036 "ajaxSuccess", 6037 "ajaxSend" 6038 ], function(_i, type) { 6039 jQuery2.fn[type] = function(fn) { 6040 return this.on(type, fn); 6041 }; 6042 }); 6043 jQuery2.fn.extend({ 6044 bind: function(types, data, fn) { 6045 return this.on(types, null, data, fn); 6046 }, 6047 unbind: function(types, fn) { 6048 return this.off(types, null, fn); 6049 }, 6050 delegate: function(selector, types, data, fn) { 6051 return this.on(types, selector, data, fn); 6052 }, 6053 undelegate: function(selector, types, fn) { 6054 return arguments.length === 1 ? this.off(selector, "**") : this.off(types, selector || "**", fn); 6055 }, 6056 hover: function(fnOver, fnOut) { 6057 return this.mouseenter(fnOver).mouseleave(fnOut || fnOver); 6058 } 6059 }); 6060 jQuery2.each( 6061 "blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "), 6062 function(_i, name) { 6063 jQuery2.fn[name] = function(data, fn) { 6064 return arguments.length > 0 ? this.on(name, null, data, fn) : this.trigger(name); 6065 }; 6066 } 6067 ); 6068 var rtrim = /^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g; 6069 jQuery2.proxy = function(fn, context) { 6070 var tmp, args, proxy; 6071 if (typeof context === "string") { 6072 tmp = fn[context]; 6073 context = fn; 6074 fn = tmp; 6075 } 6076 if (!isFunction(fn)) { 6077 return void 0; 6078 } 6079 args = slice.call(arguments, 2); 6080 proxy = function() { 6081 return fn.apply(context || this, args.concat(slice.call(arguments))); 6082 }; 6083 proxy.guid = fn.guid = fn.guid || jQuery2.guid++; 6084 return proxy; 6085 }; 6086 jQuery2.holdReady = function(hold) { 6087 if (hold) { 6088 jQuery2.readyWait++; 6089 } else { 6090 jQuery2.ready(true); 6091 } 6092 }; 6093 jQuery2.isArray = Array.isArray; 6094 jQuery2.parseJSON = JSON.parse; 6095 jQuery2.nodeName = nodeName; 6096 jQuery2.isFunction = isFunction; 6097 jQuery2.isWindow = isWindow; 6098 jQuery2.camelCase = camelCase; 6099 jQuery2.type = toType; 6100 jQuery2.now = Date.now; 6101 jQuery2.isNumeric = function(obj) { 6102 var type = jQuery2.type(obj); 6103 return (type === "number" || type === "string") && !isNaN(obj - parseFloat(obj)); 6104 }; 6105 jQuery2.trim = function(text) { 6106 return text == null ? "" : (text + "").replace(rtrim, "$1"); 6107 }; 6108 if (typeof define === "function" && define.amd) { 6109 define("jquery", [], function() { 6110 return jQuery2; 6111 }); 6112 } 6113 var _jQuery = window2.jQuery, _$ = window2.$; 6114 jQuery2.noConflict = function(deep) { 6115 if (window2.$ === jQuery2) { 6116 window2.$ = _$; 6117 } 6118 if (deep && window2.jQuery === jQuery2) { 6119 window2.jQuery = _jQuery; 6120 } 6121 return jQuery2; 6122 }; 6123 if (typeof noGlobal === "undefined") { 6124 window2.jQuery = window2.$ = jQuery2; 6125 } 6126 return jQuery2; 6127 }); 6128 } 6129 }); 6130 6131
vendor: 79,004 bytes, lines 6131-8010
6131// node_modules/slick-carousel/slick/slick.js 6132 var require_slick = __commonJS({ 6133 "node_modules/slick-carousel/slick/slick.js"(exports, module) { 6134 (function(factory) { 6135 "use strict"; 6136 if (typeof define === "function" && define.amd) { 6137 define(["jquery"], factory); 6138 } else if (typeof exports !== "undefined") { 6139 module.exports = factory(require_jquery()); 6140 } else { 6141 factory(jQuery); 6142 } 6143 })(function($8) { 6144 "use strict"; 6145 var Slick = window.Slick || {}; 6146 Slick = function() { 6147 var instanceUid = 0; 6148 function Slick2(element, settings) { 6149 var _ = this, dataSettings; 6150 _.defaults = { 6151 accessibility: true, 6152 adaptiveHeight: false, 6153 appendArrows: $8(element), 6154 appendDots: $8(element), 6155 arrows: true, 6156 asNavFor: null, 6157 prevArrow: '<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>', 6158 nextArrow: '<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>', 6159 autoplay: false, 6160 autoplaySpeed: 3e3, 6161 centerMode: false, 6162 centerPadding: "50px", 6163 cssEase: "ease", 6164 customPaging: function(slider, i) { 6165 return $8('<button type="button" data-role="none" role="button" tabindex="0" />').text(i + 1); 6166 }, 6167 dots: false, 6168 dotsClass: "slick-dots", 6169 draggable: true, 6170 easing: "linear", 6171 edgeFriction: 0.35, 6172 fade: false, 6173 focusOnSelect: false, 6174 infinite: true, 6175 initialSlide: 0, 6176 lazyLoad: "ondemand", 6177 mobileFirst: false, 6178 pauseOnHover: true, 6179 pauseOnFocus: true, 6180 pauseOnDotsHover: false, 6181 respondTo: "window", 6182 responsive: null, 6183 rows: 1, 6184 rtl: false, 6185 slide: "", 6186 slidesPerRow: 1, 6187 slidesToShow: 1, 6188 slidesToScroll: 1, 6189 speed: 500, 6190 swipe: true, 6191 swipeToSlide: false, 6192 touchMove: true, 6193 touchThreshold: 5, 6194 useCSS: true, 6195 useTransform: true, 6196 variableWidth: false, 6197 vertical: false, 6198 verticalSwiping: false, 6199 waitForAnimate: true, 6200 zIndex: 1e3 6201 }; 6202 _.initials = { 6203 animating: false, 6204 dragging: false, 6205 autoPlayTimer: null, 6206 currentDirection: 0, 6207 currentLeft: null, 6208 currentSlide: 0, 6209 direction: 1, 6210 $dots: null, 6211 listWidth: null, 6212 listHeight: null, 6213 loadIndex: 0, 6214 $nextArrow: null, 6215 $prevArrow: null, 6216 slideCount: null, 6217 slideWidth: null, 6218 $slideTrack: null, 6219 $slides: null, 6220 sliding: false, 6221 slideOffset: 0, 6222 swipeLeft: null, 6223 $list: null, 6224 touchObject: {}, 6225 transformsEnabled: false, 6226 unslicked: false 6227 }; 6228 $8.extend(_, _.initials); 6229 _.activeBreakpoint = null; 6230 _.animType = null; 6231 _.animProp = null; 6232 _.breakpoints = []; 6233 _.breakpointSettings = []; 6234 _.cssTransitions = false; 6235 _.focussed = false; 6236 _.interrupted = false; 6237 _.hidden = "hidden"; 6238 _.paused = true; 6239 _.positionProp = null; 6240 _.respondTo = null; 6241 _.rowCount = 1; 6242 _.shouldClick = true; 6243 _.$slider = $8(element); 6244 _.$slidesCache = null; 6245 _.transformType = null; 6246 _.transitionType = null; 6247 _.visibilityChange = "visibilitychange"; 6248 _.windowWidth = 0; 6249 _.windowTimer = null; 6250 dataSettings = $8(element).data("slick") || {}; 6251 _.options = $8.extend({}, _.defaults, settings, dataSettings); 6252 _.currentSlide = _.options.initialSlide; 6253 _.originalSettings = _.options; 6254 if (typeof document.mozHidden !== "undefined") { 6255 _.hidden = "mozHidden"; 6256 _.visibilityChange = "mozvisibilitychange"; 6257 } else if (typeof document.webkitHidden !== "undefined") { 6258 _.hidden = "webkitHidden"; 6259 _.visibilityChange = "webkitvisibilitychange"; 6260 } 6261 _.autoPlay = $8.proxy(_.autoPlay, _); 6262 _.autoPlayClear = $8.proxy(_.autoPlayClear, _); 6263 _.autoPlayIterator = $8.proxy(_.autoPlayIterator, _); 6264 _.changeSlide = $8.proxy(_.changeSlide, _); 6265 _.clickHandler = $8.proxy(_.clickHandler, _); 6266 _.selectHandler = $8.proxy(_.selectHandler, _); 6267 _.setPosition = $8.proxy(_.setPosition, _); 6268 _.swipeHandler = $8.proxy(_.swipeHandler, _); 6269 _.dragHandler = $8.proxy(_.dragHandler, _); 6270 _.keyHandler = $8.proxy(_.keyHandler, _); 6271 _.instanceUid = instanceUid++; 6272 _.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/; 6273 _.registerBreakpoints(); 6274 _.init(true); 6275 } 6276 return Slick2; 6277 }(); 6278 Slick.prototype.activateADA = function() { 6279 var _ = this; 6280 _.$slideTrack.find(".slick-active").attr({ 6281 "aria-hidden": "false" 6282 }).find("a, input, button, select").attr({ 6283 "tabindex": "0" 6284 }); 6285 }; 6286 Slick.prototype.addSlide = Slick.prototype.slickAdd = function(markup, index, addBefore) { 6287 var _ = this; 6288 if (typeof index === "boolean") { 6289 addBefore = index; 6290 index = null; 6291 } else if (index < 0 || index >= _.slideCount) { 6292 return false; 6293 } 6294 _.unload(); 6295 if (typeof index === "number") { 6296 if (index === 0 && _.$slides.length === 0) { 6297 $8(markup).appendTo(_.$slideTrack); 6298 } else if (addBefore) { 6299 $8(markup).insertBefore(_.$slides.eq(index)); 6300 } else { 6301 $8(markup).insertAfter(_.$slides.eq(index)); 6302 } 6303 } else { 6304 if (addBefore === true) { 6305 $8(markup).prependTo(_.$slideTrack); 6306 } else { 6307 $8(markup).appendTo(_.$slideTrack); 6308 } 6309 } 6310 _.$slides = _.$slideTrack.children(this.options.slide); 6311 _.$slideTrack.children(this.options.slide).detach(); 6312 _.$slideTrack.append(_.$slides); 6313 _.$slides.each(function(index2, element) { 6314 $8(element).attr("data-slick-index", index2); 6315 }); 6316 _.$slidesCache = _.$slides; 6317 _.reinit(); 6318 }; 6319 Slick.prototype.animateHeight = function() { 6320 var _ = this; 6321 if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) { 6322 var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true); 6323 _.$list.animate({ 6324 height: targetHeight 6325 }, _.options.speed); 6326 } 6327 }; 6328 Slick.prototype.animateSlide = function(targetLeft, callback) { 6329 var animProps = {}, _ = this; 6330 _.animateHeight(); 6331 if (_.options.rtl === true && _.options.vertical === false) { 6332 targetLeft = -targetLeft; 6333 } 6334 if (_.transformsEnabled === false) { 6335 if (_.options.vertical === false) { 6336 _.$slideTrack.animate({ 6337 left: targetLeft 6338 }, _.options.speed, _.options.easing, callback); 6339 } else { 6340 _.$slideTrack.animate({ 6341 top: targetLeft 6342 }, _.options.speed, _.options.easing, callback); 6343 } 6344 } else { 6345 if (_.cssTransitions === false) { 6346 if (_.options.rtl === true) { 6347 _.currentLeft = -_.currentLeft; 6348 } 6349 $8({ 6350 animStart: _.currentLeft 6351 }).animate({ 6352 animStart: targetLeft 6353 }, { 6354 duration: _.options.speed, 6355 easing: _.options.easing, 6356 step: function(now2) { 6357 now2 = Math.ceil(now2); 6358 if (_.options.vertical === false) { 6359 animProps[_.animType] = "translate(" + now2 + "px, 0px)"; 6360 _.$slideTrack.css(animProps); 6361 } else { 6362 animProps[_.animType] = "translate(0px," + now2 + "px)"; 6363 _.$slideTrack.css(animProps); 6364 } 6365 }, 6366 complete: function() { 6367 if (callback) { 6368 callback.call(); 6369 } 6370 } 6371 }); 6372 } else { 6373 _.applyTransition(); 6374 targetLeft = Math.ceil(targetLeft); 6375 if (_.options.vertical === false) { 6376 animProps[_.animType] = "translate3d(" + targetLeft + "px, 0px, 0px)"; 6377 } else { 6378 animProps[_.animType] = "translate3d(0px," + targetLeft + "px, 0px)"; 6379 } 6380 _.$slideTrack.css(animProps); 6381 if (callback) { 6382 setTimeout(function() { 6383 _.disableTransition(); 6384 callback.call(); 6385 }, _.options.speed); 6386 } 6387 } 6388 } 6389 }; 6390 Slick.prototype.getNavTarget = function() { 6391 var _ = this, asNavFor = _.options.asNavFor; 6392 if (asNavFor && asNavFor !== null) { 6393 asNavFor = $8(asNavFor).not(_.$slider); 6394 } 6395 return asNavFor; 6396 }; 6397 Slick.prototype.asNavFor = function(index) { 6398 var _ = this, asNavFor = _.getNavTarget(); 6399 if (asNavFor !== null && typeof asNavFor === "object") { 6400 asNavFor.each(function() { 6401 var target = $8(this).slick("getSlick"); 6402 if (!target.unslicked) { 6403 target.slideHandler(index, true); 6404 } 6405 }); 6406 } 6407 }; 6408 Slick.prototype.applyTransition = function(slide2) { 6409 var _ = this, transition2 = {}; 6410 if (_.options.fade === false) { 6411 transition2[_.transitionType] = _.transformType + " " + _.options.speed + "ms " + _.options.cssEase; 6412 } else { 6413 transition2[_.transitionType] = "opacity " + _.options.speed + "ms " + _.options.cssEase; 6414 } 6415 if (_.options.fade === false) { 6416 _.$slideTrack.css(transition2); 6417 } else { 6418 _.$slides.eq(slide2).css(transition2); 6419 } 6420 }; 6421 Slick.prototype.autoPlay = function() { 6422 var _ = this; 6423 _.autoPlayClear(); 6424 if (_.slideCount > _.options.slidesToShow) { 6425 _.autoPlayTimer = setInterval(_.autoPlayIterator, _.options.autoplaySpeed); 6426 } 6427 }; 6428 Slick.prototype.autoPlayClear = function() { 6429 var _ = this; 6430 if (_.autoPlayTimer) { 6431 clearInterval(_.autoPlayTimer); 6432 } 6433 }; 6434 Slick.prototype.autoPlayIterator = function() { 6435 var _ = this, slideTo2 = _.currentSlide + _.options.slidesToScroll; 6436 if (!_.paused && !_.interrupted && !_.focussed) { 6437 if (_.options.infinite === false) { 6438 if (_.direction === 1 && _.currentSlide + 1 === _.slideCount - 1) { 6439 _.direction = 0; 6440 } else if (_.direction === 0) { 6441 slideTo2 = _.currentSlide - _.options.slidesToScroll; 6442 if (_.currentSlide - 1 === 0) { 6443 _.direction = 1; 6444 } 6445 } 6446 } 6447 _.slideHandler(slideTo2); 6448 } 6449 }; 6450 Slick.prototype.buildArrows = function() { 6451 var _ = this; 6452 if (_.options.arrows === true) { 6453 _.$prevArrow = $8(_.options.prevArrow).addClass("slick-arrow"); 6454 _.$nextArrow = $8(_.options.nextArrow).addClass("slick-arrow"); 6455 if (_.slideCount > _.options.slidesToShow) { 6456 _.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"); 6457 _.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"); 6458 if (_.htmlExpr.test(_.options.prevArrow)) { 6459 _.$prevArrow.prependTo(_.options.appendArrows); 6460 } 6461 if (_.htmlExpr.test(_.options.nextArrow)) { 6462 _.$nextArrow.appendTo(_.options.appendArrows); 6463 } 6464 if (_.options.infinite !== true) { 6465 _.$prevArrow.addClass("slick-disabled").attr("aria-disabled", "true"); 6466 } 6467 } else { 6468 _.$prevArrow.add(_.$nextArrow).addClass("slick-hidden").attr({ 6469 "aria-disabled": "true", 6470 "tabindex": "-1" 6471 }); 6472 } 6473 } 6474 }; 6475 Slick.prototype.buildDots = function() { 6476 var _ = this, i, dot; 6477 if (_.options.dots === true && _.slideCount > _.options.slidesToShow) { 6478 _.$slider.addClass("slick-dotted"); 6479 dot = $8("<ul />").addClass(_.options.dotsClass); 6480 for (i = 0; i <= _.getDotCount(); i += 1) { 6481 dot.append($8("<li />").append(_.options.customPaging.call(this, _, i))); 6482 } 6483 _.$dots = dot.appendTo(_.options.appendDots); 6484 _.$dots.find("li").first().addClass("slick-active").attr("aria-hidden", "false"); 6485 } 6486 }; 6487 Slick.prototype.buildOut = function() { 6488 var _ = this; 6489 _.$slides = _.$slider.children(_.options.slide + ":not(.slick-cloned)").addClass("slick-slide"); 6490 _.slideCount = _.$slides.length; 6491 _.$slides.each(function(index, element) { 6492 $8(element).attr("data-slick-index", index).data("originalStyling", $8(element).attr("style") || ""); 6493 }); 6494 _.$slider.addClass("slick-slider"); 6495 _.$slideTrack = _.slideCount === 0 ? $8('<div class="slick-track"/>').appendTo(_.$slider) : _.$slides.wrapAll('<div class="slick-track"/>').parent(); 6496 _.$list = _.$slideTrack.wrap( 6497 '<div aria-live="polite" class="slick-list"/>' 6498 ).parent(); 6499 _.$slideTrack.css("opacity", 0); 6500 if (_.options.centerMode === true || _.options.swipeToSlide === true) { 6501 _.options.slidesToScroll = 1; 6502 } 6503 $8("img[data-lazy]", _.$slider).not("[src]").addClass("slick-loading"); 6504 _.setupInfinite(); 6505 _.buildArrows(); 6506 _.buildDots(); 6507 _.updateDots(); 6508 _.setSlideClasses(typeof _.currentSlide === "number" ? _.currentSlide : 0); 6509 if (_.options.draggable === true) { 6510 _.$list.addClass("draggable"); 6511 } 6512 }; 6513 Slick.prototype.buildRows = function() { 6514 var _ = this, a, b, c, newSlides, numOfSlides, originalSlides, slidesPerSection; 6515 newSlides = document.createDocumentFragment(); 6516 originalSlides = _.$slider.children(); 6517 if (_.options.rows > 1) { 6518 slidesPerSection = _.options.slidesPerRow * _.options.rows; 6519 numOfSlides = Math.ceil( 6520 originalSlides.length / slidesPerSection 6521 ); 6522 for (a = 0; a < numOfSlides; a++) { 6523 var slide2 = document.createElement("div"); 6524 for (b = 0; b < _.options.rows; b++) { 6525 var row = document.createElement("div"); 6526 for (c = 0; c < _.options.slidesPerRow; c++) { 6527 var target = a * slidesPerSection + (b * _.options.slidesPerRow + c); 6528 if (originalSlides.get(target)) { 6529 row.appendChild(originalSlides.get(target)); 6530 } 6531 } 6532 slide2.appendChild(row); 6533 } 6534 newSlides.appendChild(slide2); 6535 } 6536 _.$slider.empty().append(newSlides); 6537 _.$slider.children().children().children().css({ 6538 "width": 100 / _.options.slidesPerRow + "%", 6539 "display": "inline-block" 6540 }); 6541 } 6542 }; 6543 Slick.prototype.checkResponsive = function(initial, forceUpdate) { 6544 var _ = this, breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint = false; 6545 var sliderWidth = _.$slider.width(); 6546 var windowWidth = window.innerWidth || $8(window).width(); 6547 if (_.respondTo === "window") { 6548 respondToWidth = windowWidth; 6549 } else if (_.respondTo === "slider") { 6550 respondToWidth = sliderWidth; 6551 } else if (_.respondTo === "min") { 6552 respondToWidth = Math.min(windowWidth, sliderWidth); 6553 } 6554 if (_.options.responsive && _.options.responsive.length && _.options.responsive !== null) { 6555 targetBreakpoint = null; 6556 for (breakpoint in _.breakpoints) { 6557 if (_.breakpoints.hasOwnProperty(breakpoint)) { 6558 if (_.originalSettings.mobileFirst === false) { 6559 if (respondToWidth < _.breakpoints[breakpoint]) { 6560 targetBreakpoint = _.breakpoints[breakpoint]; 6561 } 6562 } else { 6563 if (respondToWidth > _.breakpoints[breakpoint]) { 6564 targetBreakpoint = _.breakpoints[breakpoint]; 6565 } 6566 } 6567 } 6568 } 6569 if (targetBreakpoint !== null) { 6570 if (_.activeBreakpoint !== null) { 6571 if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) { 6572 _.activeBreakpoint = targetBreakpoint; 6573 if (_.breakpointSettings[targetBreakpoint] === "unslick") { 6574 _.unslick(targetBreakpoint); 6575 } else { 6576 _.options = $8.extend( 6577 {}, 6578 _.originalSettings, 6579 _.breakpointSettings[targetBreakpoint] 6580 ); 6581 if (initial === true) { 6582 _.currentSlide = _.options.initialSlide; 6583 } 6584 _.refresh(initial); 6585 } 6586 triggerBreakpoint = targetBreakpoint; 6587 } 6588 } else { 6589 _.activeBreakpoint = targetBreakpoint; 6590 if (_.breakpointSettings[targetBreakpoint] === "unslick") { 6591 _.unslick(targetBreakpoint); 6592 } else { 6593 _.options = $8.extend( 6594 {}, 6595 _.originalSettings, 6596 _.breakpointSettings[targetBreakpoint] 6597 ); 6598 if (initial === true) { 6599 _.currentSlide = _.options.initialSlide; 6600 } 6601 _.refresh(initial); 6602 } 6603 triggerBreakpoint = targetBreakpoint; 6604 } 6605 } else { 6606 if (_.activeBreakpoint !== null) { 6607 _.activeBreakpoint = null; 6608 _.options = _.originalSettings; 6609 if (initial === true) { 6610 _.currentSlide = _.options.initialSlide; 6611 } 6612 _.refresh(initial); 6613 triggerBreakpoint = targetBreakpoint; 6614 } 6615 } 6616 if (!initial && triggerBreakpoint !== false) { 6617 _.$slider.trigger("breakpoint", [_, triggerBreakpoint]); 6618 } 6619 } 6620 }; 6621 Slick.prototype.changeSlide = function(event2, dontAnimate) { 6622 var _ = this, $target = $8(event2.currentTarget), indexOffset, slideOffset, unevenOffset; 6623 if ($target.is("a")) { 6624 event2.preventDefault(); 6625 } 6626 if (!$target.is("li")) { 6627 $target = $target.closest("li"); 6628 } 6629 unevenOffset = _.slideCount % _.options.slidesToScroll !== 0; 6630 indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll; 6631 switch (event2.data.message) { 6632 case "previous": 6633 slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset; 6634 if (_.slideCount > _.options.slidesToShow) { 6635 _.slideHandler(_.currentSlide - slideOffset, false, dontAnimate); 6636 } 6637 break; 6638 case "next": 6639 slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset; 6640 if (_.slideCount > _.options.slidesToShow) { 6641 _.slideHandler(_.currentSlide + slideOffset, false, dontAnimate); 6642 } 6643 break; 6644 case "index": 6645 var index = event2.data.index === 0 ? 0 : event2.data.index || $target.index() * _.options.slidesToScroll; 6646 _.slideHandler(_.checkNavigable(index), false, dontAnimate); 6647 $target.children().trigger("focus"); 6648 break; 6649 default: 6650 return; 6651 } 6652 }; 6653 Slick.prototype.checkNavigable = function(index) { 6654 var _ = this, navigables, prevNavigable; 6655 navigables = _.getNavigableIndexes(); 6656 prevNavigable = 0; 6657 if (index > navigables[navigables.length - 1]) { 6658 index = navigables[navigables.length - 1]; 6659 } else { 6660 for (var n in navigables) { 6661 if (index < navigables[n]) { 6662 index = prevNavigable; 6663 break; 6664 } 6665 prevNavigable = navigables[n]; 6666 } 6667 } 6668 return index; 6669 }; 6670 Slick.prototype.cleanUpEvents = function() { 6671 var _ = this; 6672 if (_.options.dots && _.$dots !== null) { 6673 $8("li", _.$dots).off("click.slick", _.changeSlide).off("mouseenter.slick", $8.proxy(_.interrupt, _, true)).off("mouseleave.slick", $8.proxy(_.interrupt, _, false)); 6674 } 6675 _.$slider.off("focus.slick blur.slick"); 6676 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { 6677 _.$prevArrow && _.$prevArrow.off("click.slick", _.changeSlide); 6678 _.$nextArrow && _.$nextArrow.off("click.slick", _.changeSlide); 6679 } 6680 _.$list.off("touchstart.slick mousedown.slick", _.swipeHandler); 6681 _.$list.off("touchmove.slick mousemove.slick", _.swipeHandler); 6682 _.$list.off("touchend.slick mouseup.slick", _.swipeHandler); 6683 _.$list.off("touchcancel.slick mouseleave.slick", _.swipeHandler); 6684 _.$list.off("click.slick", _.clickHandler); 6685 $8(document).off(_.visibilityChange, _.visibility); 6686 _.cleanUpSlideEvents(); 6687 if (_.options.accessibility === true) { 6688 _.$list.off("keydown.slick", _.keyHandler); 6689 } 6690 if (_.options.focusOnSelect === true) { 6691 $8(_.$slideTrack).children().off("click.slick", _.selectHandler); 6692 } 6693 $8(window).off("orientationchange.slick.slick-" + _.instanceUid, _.orientationChange); 6694 $8(window).off("resize.slick.slick-" + _.instanceUid, _.resize); 6695 $8("[draggable!=true]", _.$slideTrack).off("dragstart", _.preventDefault); 6696 $8(window).off("load.slick.slick-" + _.instanceUid, _.setPosition); 6697 $8(document).off("ready.slick.slick-" + _.instanceUid, _.setPosition); 6698 }; 6699 Slick.prototype.cleanUpSlideEvents = function() { 6700 var _ = this; 6701 _.$list.off("mouseenter.slick", $8.proxy(_.interrupt, _, true)); 6702 _.$list.off("mouseleave.slick", $8.proxy(_.interrupt, _, false)); 6703 }; 6704 Slick.prototype.cleanUpRows = function() { 6705 var _ = this, originalSlides; 6706 if (_.options.rows > 1) { 6707 originalSlides = _.$slides.children().children(); 6708 originalSlides.removeAttr("style"); 6709 _.$slider.empty().append(originalSlides); 6710 } 6711 }; 6712 Slick.prototype.clickHandler = function(event2) { 6713 var _ = this; 6714 if (_.shouldClick === false) { 6715 event2.stopImmediatePropagation(); 6716 event2.stopPropagation(); 6717 event2.preventDefault(); 6718 } 6719 }; 6720 Slick.prototype.destroy = function(refresh) { 6721 var _ = this; 6722 _.autoPlayClear(); 6723 _.touchObject = {}; 6724 _.cleanUpEvents(); 6725 $8(".slick-cloned", _.$slider).detach(); 6726 if (_.$dots) { 6727 _.$dots.remove(); 6728 } 6729 if (_.$prevArrow && _.$prevArrow.length) { 6730 _.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display", ""); 6731 if (_.htmlExpr.test(_.options.prevArrow)) { 6732 _.$prevArrow.remove(); 6733 } 6734 } 6735 if (_.$nextArrow && _.$nextArrow.length) { 6736 _.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display", ""); 6737 if (_.htmlExpr.test(_.options.nextArrow)) { 6738 _.$nextArrow.remove(); 6739 } 6740 } 6741 if (_.$slides) { 6742 _.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function() { 6743 $8(this).attr("style", $8(this).data("originalStyling")); 6744 }); 6745 _.$slideTrack.children(this.options.slide).detach(); 6746 _.$slideTrack.detach(); 6747 _.$list.detach(); 6748 _.$slider.append(_.$slides); 6749 } 6750 _.cleanUpRows(); 6751 _.$slider.removeClass("slick-slider"); 6752 _.$slider.removeClass("slick-initialized"); 6753 _.$slider.removeClass("slick-dotted"); 6754 _.unslicked = true; 6755 if (!refresh) { 6756 _.$slider.trigger("destroy", [_]); 6757 } 6758 }; 6759 Slick.prototype.disableTransition = function(slide2) { 6760 var _ = this, transition2 = {}; 6761 transition2[_.transitionType] = ""; 6762 if (_.options.fade === false) { 6763 _.$slideTrack.css(transition2); 6764 } else { 6765 _.$slides.eq(slide2).css(transition2); 6766 } 6767 }; 6768 Slick.prototype.fadeSlide = function(slideIndex, callback) { 6769 var _ = this; 6770 if (_.cssTransitions === false) { 6771 _.$slides.eq(slideIndex).css({ 6772 zIndex: _.options.zIndex 6773 }); 6774 _.$slides.eq(slideIndex).animate({ 6775 opacity: 1 6776 }, _.options.speed, _.options.easing, callback); 6777 } else { 6778 _.applyTransition(slideIndex); 6779 _.$slides.eq(slideIndex).css({ 6780 opacity: 1, 6781 zIndex: _.options.zIndex 6782 }); 6783 if (callback) { 6784 setTimeout(function() { 6785 _.disableTransition(slideIndex); 6786 callback.call(); 6787 }, _.options.speed); 6788 } 6789 } 6790 }; 6791 Slick.prototype.fadeSlideOut = function(slideIndex) { 6792 var _ = this; 6793 if (_.cssTransitions === false) { 6794 _.$slides.eq(slideIndex).animate({ 6795 opacity: 0, 6796 zIndex: _.options.zIndex - 2 6797 }, _.options.speed, _.options.easing); 6798 } else { 6799 _.applyTransition(slideIndex); 6800 _.$slides.eq(slideIndex).css({ 6801 opacity: 0, 6802 zIndex: _.options.zIndex - 2 6803 }); 6804 } 6805 }; 6806 Slick.prototype.filterSlides = Slick.prototype.slickFilter = function(filter) { 6807 var _ = this; 6808 if (filter !== null) { 6809 _.$slidesCache = _.$slides; 6810 _.unload(); 6811 _.$slideTrack.children(this.options.slide).detach(); 6812 _.$slidesCache.filter(filter).appendTo(_.$slideTrack); 6813 _.reinit(); 6814 } 6815 }; 6816 Slick.prototype.focusHandler = function() { 6817 var _ = this; 6818 _.$slider.off("focus.slick blur.slick").on( 6819 "focus.slick blur.slick", 6820 "*:not(.slick-arrow)", 6821 function(event2) { 6822 event2.stopImmediatePropagation(); 6823 var $sf = $8(this); 6824 setTimeout(function() { 6825 if (_.options.pauseOnFocus) { 6826 _.focussed = $sf.is(":focus"); 6827 _.autoPlay(); 6828 } 6829 }, 0); 6830 } 6831 ); 6832 }; 6833 Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function() { 6834 var _ = this; 6835 return _.currentSlide; 6836 }; 6837 Slick.prototype.getDotCount = function() { 6838 var _ = this; 6839 var breakPoint = 0; 6840 var counter = 0; 6841 var pagerQty = 0; 6842 if (_.options.infinite === true) { 6843 while (breakPoint < _.slideCount) { 6844 ++pagerQty; 6845 breakPoint = counter + _.options.slidesToScroll; 6846 counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow; 6847 } 6848 } else if (_.options.centerMode === true) { 6849 pagerQty = _.slideCount; 6850 } else if (!_.options.asNavFor) { 6851 pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll); 6852 } else { 6853 while (breakPoint < _.slideCount) { 6854 ++pagerQty; 6855 breakPoint = counter + _.options.slidesToScroll; 6856 counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow; 6857 } 6858 } 6859 return pagerQty - 1; 6860 }; 6861 Slick.prototype.getLeft = function(slideIndex) { 6862 var _ = this, targetLeft, verticalHeight, verticalOffset = 0, targetSlide; 6863 _.slideOffset = 0; 6864 verticalHeight = _.$slides.first().outerHeight(true); 6865 if (_.options.infinite === true) { 6866 if (_.slideCount > _.options.slidesToShow) { 6867 _.slideOffset = _.slideWidth * _.options.slidesToShow * -1; 6868 verticalOffset = verticalHeight * _.options.slidesToShow * -1; 6869 } 6870 if (_.slideCount % _.options.slidesToScroll !== 0) { 6871 if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) { 6872 if (slideIndex > _.slideCount) { 6873 _.slideOffset = (_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth * -1; 6874 verticalOffset = (_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight * -1; 6875 } else { 6876 _.slideOffset = _.slideCount % _.options.slidesToScroll * _.slideWidth * -1; 6877 verticalOffset = _.slideCount % _.options.slidesToScroll * verticalHeight * -1; 6878 } 6879 } 6880 } 6881 } else { 6882 if (slideIndex + _.options.slidesToShow > _.slideCount) { 6883 _.slideOffset = (slideIndex + _.options.slidesToShow - _.slideCount) * _.slideWidth; 6884 verticalOffset = (slideIndex + _.options.slidesToShow - _.slideCount) * verticalHeight; 6885 } 6886 } 6887 if (_.slideCount <= _.options.slidesToShow) { 6888 _.slideOffset = 0; 6889 verticalOffset = 0; 6890 } 6891 if (_.options.centerMode === true && _.options.infinite === true) { 6892 _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth; 6893 } else if (_.options.centerMode === true) { 6894 _.slideOffset = 0; 6895 _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2); 6896 } 6897 if (_.options.vertical === false) { 6898 targetLeft = slideIndex * _.slideWidth * -1 + _.slideOffset; 6899 } else { 6900 targetLeft = slideIndex * verticalHeight * -1 + verticalOffset; 6901 } 6902 if (_.options.variableWidth === true) { 6903 if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) { 6904 targetSlide = _.$slideTrack.children(".slick-slide").eq(slideIndex); 6905 } else { 6906 targetSlide = _.$slideTrack.children(".slick-slide").eq(slideIndex + _.options.slidesToShow); 6907 } 6908 if (_.options.rtl === true) { 6909 if (targetSlide[0]) { 6910 targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1; 6911 } else { 6912 targetLeft = 0; 6913 } 6914 } else { 6915 targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0; 6916 } 6917 if (_.options.centerMode === true) { 6918 if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) { 6919 targetSlide = _.$slideTrack.children(".slick-slide").eq(slideIndex); 6920 } else { 6921 targetSlide = _.$slideTrack.children(".slick-slide").eq(slideIndex + _.options.slidesToShow + 1); 6922 } 6923 if (_.options.rtl === true) { 6924 if (targetSlide[0]) { 6925 targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1; 6926 } else { 6927 targetLeft = 0; 6928 } 6929 } else { 6930 targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0; 6931 } 6932 targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2; 6933 } 6934 } 6935 return targetLeft; 6936 }; 6937 Slick.prototype.getOption = Slick.prototype.slickGetOption = function(option) { 6938 var _ = this; 6939 return _.options[option]; 6940 }; 6941 Slick.prototype.getNavigableIndexes = function() { 6942 var _ = this, breakPoint = 0, counter = 0, indexes = [], max; 6943 if (_.options.infinite === false) { 6944 max = _.slideCount; 6945 } else { 6946 breakPoint = _.options.slidesToScroll * -1; 6947 counter = _.options.slidesToScroll * -1; 6948 max = _.slideCount * 2; 6949 } 6950 while (breakPoint < max) { 6951 indexes.push(breakPoint); 6952 breakPoint = counter + _.options.slidesToScroll; 6953 counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow; 6954 } 6955 return indexes; 6956 }; 6957 Slick.prototype.getSlick = function() { 6958 return this; 6959 }; 6960 Slick.prototype.getSlideCount = function() { 6961 var _ = this, slidesTraversed, swipedSlide, centerOffset; 6962 centerOffset = _.options.centerMode === true ? _.slideWidth * Math.floor(_.options.slidesToShow / 2) : 0; 6963 if (_.options.swipeToSlide === true) { 6964 _.$slideTrack.find(".slick-slide").each(function(index, slide2) { 6965 if (slide2.offsetLeft - centerOffset + $8(slide2).outerWidth() / 2 > _.swipeLeft * -1) { 6966 swipedSlide = slide2; 6967 return false; 6968 } 6969 }); 6970 slidesTraversed = Math.abs($8(swipedSlide).attr("data-slick-index") - _.currentSlide) || 1; 6971 return slidesTraversed; 6972 } else { 6973 return _.options.slidesToScroll; 6974 } 6975 }; 6976 Slick.prototype.goTo = Slick.prototype.slickGoTo = function(slide2, dontAnimate) { 6977 var _ = this; 6978 _.changeSlide({ 6979 data: { 6980 message: "index", 6981 index: parseInt(slide2) 6982 } 6983 }, dontAnimate); 6984 }; 6985 Slick.prototype.init = function(creation) { 6986 var _ = this; 6987 if (!$8(_.$slider).hasClass("slick-initialized")) { 6988 $8(_.$slider).addClass("slick-initialized"); 6989 _.buildRows(); 6990 _.buildOut(); 6991 _.setProps(); 6992 _.startLoad(); 6993 _.loadSlider(); 6994 _.initializeEvents(); 6995 _.updateArrows(); 6996 _.updateDots(); 6997 _.checkResponsive(true); 6998 _.focusHandler(); 6999 } 7000 if (creation) { 7001 _.$slider.trigger("init", [_]); 7002 } 7003 if (_.options.accessibility === true) { 7004 _.initADA(); 7005 } 7006 if (_.options.autoplay) { 7007 _.paused = false; 7008 _.autoPlay(); 7009 } 7010 }; 7011 Slick.prototype.initADA = function() { 7012 var _ = this; 7013 _.$slides.add(_.$slideTrack.find(".slick-cloned")).attr({ 7014 "aria-hidden": "true", 7015 "tabindex": "-1" 7016 }).find("a, input, button, select").attr({ 7017 "tabindex": "-1" 7018 }); 7019 _.$slideTrack.attr("role", "listbox"); 7020 _.$slides.not(_.$slideTrack.find(".slick-cloned")).each(function(i) { 7021 $8(this).attr({ 7022 "role": "option", 7023 "aria-describedby": "slick-slide" + _.instanceUid + i 7024 }); 7025 }); 7026 if (_.$dots !== null) { 7027 _.$dots.attr("role", "tablist").find("li").each(function(i) { 7028 $8(this).attr({ 7029 "role": "presentation", 7030 "aria-selected": "false", 7031 "aria-controls": "navigation" + _.instanceUid + i, 7032 "id": "slick-slide" + _.instanceUid + i 7033 }); 7034 }).first().attr("aria-selected", "true").end().find("button").attr("role", "button").end().closest("div").attr("role", "toolbar"); 7035 } 7036 _.activateADA(); 7037 }; 7038 Slick.prototype.initArrowEvents = function() { 7039 var _ = this; 7040 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { 7041 _.$prevArrow.off("click.slick").on("click.slick", { 7042 message: "previous" 7043 }, _.changeSlide); 7044 _.$nextArrow.off("click.slick").on("click.slick", { 7045 message: "next" 7046 }, _.changeSlide); 7047 } 7048 }; 7049 Slick.prototype.initDotEvents = function() { 7050 var _ = this; 7051 if (_.options.dots === true && _.slideCount > _.options.slidesToShow) { 7052 $8("li", _.$dots).on("click.slick", { 7053 message: "index" 7054 }, _.changeSlide); 7055 } 7056 if (_.options.dots === true && _.options.pauseOnDotsHover === true) { 7057 $8("li", _.$dots).on("mouseenter.slick", $8.proxy(_.interrupt, _, true)).on("mouseleave.slick", $8.proxy(_.interrupt, _, false)); 7058 } 7059 }; 7060 Slick.prototype.initSlideEvents = function() { 7061 var _ = this; 7062 if (_.options.pauseOnHover) { 7063 _.$list.on("mouseenter.slick", $8.proxy(_.interrupt, _, true)); 7064 _.$list.on("mouseleave.slick", $8.proxy(_.interrupt, _, false)); 7065 } 7066 }; 7067 Slick.prototype.initializeEvents = function() { 7068 var _ = this; 7069 _.initArrowEvents(); 7070 _.initDotEvents(); 7071 _.initSlideEvents(); 7072 _.$list.on("touchstart.slick mousedown.slick", { 7073 action: "start" 7074 }, _.swipeHandler); 7075 _.$list.on("touchmove.slick mousemove.slick", { 7076 action: "move" 7077 }, _.swipeHandler); 7078 _.$list.on("touchend.slick mouseup.slick", { 7079 action: "end" 7080 }, _.swipeHandler); 7081 _.$list.on("touchcancel.slick mouseleave.slick", { 7082 action: "end" 7083 }, _.swipeHandler); 7084 _.$list.on("click.slick", _.clickHandler); 7085 $8(document).on(_.visibilityChange, $8.proxy(_.visibility, _)); 7086 if (_.options.accessibility === true) { 7087 _.$list.on("keydown.slick", _.keyHandler); 7088 } 7089 if (_.options.focusOnSelect === true) { 7090 $8(_.$slideTrack).children().on("click.slick", _.selectHandler); 7091 } 7092 $8(window).on("orientationchange.slick.slick-" + _.instanceUid, $8.proxy(_.orientationChange, _)); 7093 $8(window).on("resize.slick.slick-" + _.instanceUid, $8.proxy(_.resize, _)); 7094 $8("[draggable!=true]", _.$slideTrack).on("dragstart", _.preventDefault); 7095 $8(window).on("load.slick.slick-" + _.instanceUid, _.setPosition); 7096 $8(document).on("ready.slick.slick-" + _.instanceUid, _.setPosition); 7097 }; 7098 Slick.prototype.initUI = function() { 7099 var _ = this; 7100 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { 7101 _.$prevArrow.show(); 7102 _.$nextArrow.show(); 7103 } 7104 if (_.options.dots === true && _.slideCount > _.options.slidesToShow) { 7105 _.$dots.show(); 7106 } 7107 }; 7108 Slick.prototype.keyHandler = function(event2) { 7109 var _ = this; 7110 if (!event2.target.tagName.match("TEXTAREA|INPUT|SELECT")) { 7111 if (event2.keyCode === 37 && _.options.accessibility === true) { 7112 _.changeSlide({ 7113 data: { 7114 message: _.options.rtl === true ? "next" : "previous" 7115 } 7116 }); 7117 } else if (event2.keyCode === 39 && _.options.accessibility === true) { 7118 _.changeSlide({ 7119 data: { 7120 message: _.options.rtl === true ? "previous" : "next" 7121 } 7122 }); 7123 } 7124 } 7125 }; 7126 Slick.prototype.lazyLoad = function() { 7127 var _ = this, loadRange, cloneRange, rangeStart, rangeEnd; 7128 function loadImages(imagesScope) { 7129 $8("img[data-lazy]", imagesScope).each(function() { 7130 var image = $8(this), imageSource = $8(this).attr("data-lazy"), imageToLoad = document.createElement("img"); 7131 imageToLoad.onload = function() { 7132 image.animate({ opacity: 0 }, 100, function() { 7133 image.attr("src", imageSource).animate({ opacity: 1 }, 200, function() { 7134 image.removeAttr("data-lazy").removeClass("slick-loading"); 7135 }); 7136 _.$slider.trigger("lazyLoaded", [_, image, imageSource]); 7137 }); 7138 }; 7139 imageToLoad.onerror = function() { 7140 image.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"); 7141 _.$slider.trigger("lazyLoadError", [_, image, imageSource]); 7142 }; 7143 imageToLoad.src = imageSource; 7144 }); 7145 } 7146 if (_.options.centerMode === true) { 7147 if (_.options.infinite === true) { 7148 rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1); 7149 rangeEnd = rangeStart + _.options.slidesToShow + 2; 7150 } else { 7151 rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1)); 7152 rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide; 7153 } 7154 } else { 7155 rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide; 7156 rangeEnd = Math.ceil(rangeStart + _.options.slidesToShow); 7157 if (_.options.fade === true) { 7158 if (rangeStart > 0) 7159 rangeStart--; 7160 if (rangeEnd <= _.slideCount) 7161 rangeEnd++; 7162 } 7163 } 7164 loadRange = _.$slider.find(".slick-slide").slice(rangeStart, rangeEnd); 7165 loadImages(loadRange); 7166 if (_.slideCount <= _.options.slidesToShow) { 7167 cloneRange = _.$slider.find(".slick-slide"); 7168 loadImages(cloneRange); 7169 } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow) { 7170 cloneRange = _.$slider.find(".slick-cloned").slice(0, _.options.slidesToShow); 7171 loadImages(cloneRange); 7172 } else if (_.currentSlide === 0) { 7173 cloneRange = _.$slider.find(".slick-cloned").slice(_.options.slidesToShow * -1); 7174 loadImages(cloneRange); 7175 } 7176 }; 7177 Slick.prototype.loadSlider = function() { 7178 var _ = this; 7179 _.setPosition(); 7180 _.$slideTrack.css({ 7181 opacity: 1 7182 }); 7183 _.$slider.removeClass("slick-loading"); 7184 _.initUI(); 7185 if (_.options.lazyLoad === "progressive") { 7186 _.progressiveLazyLoad(); 7187 } 7188 }; 7189 Slick.prototype.next = Slick.prototype.slickNext = function() { 7190 var _ = this; 7191 _.changeSlide({ 7192 data: { 7193 message: "next" 7194 } 7195 }); 7196 }; 7197 Slick.prototype.orientationChange = function() { 7198 var _ = this; 7199 _.checkResponsive(); 7200 _.setPosition(); 7201 }; 7202 Slick.prototype.pause = Slick.prototype.slickPause = function() { 7203 var _ = this; 7204 _.autoPlayClear(); 7205 _.paused = true; 7206 }; 7207 Slick.prototype.play = Slick.prototype.slickPlay = function() { 7208 var _ = this; 7209 _.autoPlay(); 7210 _.options.autoplay = true; 7211 _.paused = false; 7212 _.focussed = false; 7213 _.interrupted = false; 7214 }; 7215 Slick.prototype.postSlide = function(index) { 7216 var _ = this; 7217 if (!_.unslicked) { 7218 _.$slider.trigger("afterChange", [_, index]); 7219 _.animating = false; 7220 _.setPosition(); 7221 _.swipeLeft = null; 7222 if (_.options.autoplay) { 7223 _.autoPlay(); 7224 } 7225 if (_.options.accessibility === true) { 7226 _.initADA(); 7227 } 7228 } 7229 }; 7230 Slick.prototype.prev = Slick.prototype.slickPrev = function() { 7231 var _ = this; 7232 _.changeSlide({ 7233 data: { 7234 message: "previous" 7235 } 7236 }); 7237 }; 7238 Slick.prototype.preventDefault = function(event2) { 7239 event2.preventDefault(); 7240 }; 7241 Slick.prototype.progressiveLazyLoad = function(tryCount) { 7242 tryCount = tryCount || 1; 7243 var _ = this, $imgsToLoad = $8("img[data-lazy]", _.$slider), image, imageSource, imageToLoad; 7244 if ($imgsToLoad.length) { 7245 image = $imgsToLoad.first(); 7246 imageSource = image.attr("data-lazy"); 7247 imageToLoad = document.createElement("img"); 7248 imageToLoad.onload = function() { 7249 image.attr("src", imageSource).removeAttr("data-lazy").removeClass("slick-loading"); 7250 if (_.options.adaptiveHeight === true) { 7251 _.setPosition(); 7252 } 7253 _.$slider.trigger("lazyLoaded", [_, image, imageSource]); 7254 _.progressiveLazyLoad(); 7255 }; 7256 imageToLoad.onerror = function() { 7257 if (tryCount < 3) { 7258 setTimeout(function() { 7259 _.progressiveLazyLoad(tryCount + 1); 7260 }, 500); 7261 } else { 7262 image.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"); 7263 _.$slider.trigger("lazyLoadError", [_, image, imageSource]); 7264 _.progressiveLazyLoad(); 7265 } 7266 }; 7267 imageToLoad.src = imageSource; 7268 } else { 7269 _.$slider.trigger("allImagesLoaded", [_]); 7270 } 7271 }; 7272 Slick.prototype.refresh = function(initializing) { 7273 var _ = this, currentSlide, lastVisibleIndex; 7274 lastVisibleIndex = _.slideCount - _.options.slidesToShow; 7275 if (!_.options.infinite && _.currentSlide > lastVisibleIndex) { 7276 _.currentSlide = lastVisibleIndex; 7277 } 7278 if (_.slideCount <= _.options.slidesToShow) { 7279 _.currentSlide = 0; 7280 } 7281 currentSlide = _.currentSlide; 7282 _.destroy(true); 7283 $8.extend(_, _.initials, { currentSlide }); 7284 _.init(); 7285 if (!initializing) { 7286 _.changeSlide({ 7287 data: { 7288 message: "index", 7289 index: currentSlide 7290 } 7291 }, false); 7292 } 7293 }; 7294 Slick.prototype.registerBreakpoints = function() { 7295 var _ = this, breakpoint, currentBreakpoint, l, responsiveSettings = _.options.responsive || null; 7296 if ($8.type(responsiveSettings) === "array" && responsiveSettings.length) { 7297 _.respondTo = _.options.respondTo || "window"; 7298 for (breakpoint in responsiveSettings) { 7299 l = _.breakpoints.length - 1; 7300 currentBreakpoint = responsiveSettings[breakpoint].breakpoint; 7301 if (responsiveSettings.hasOwnProperty(breakpoint)) { 7302 while (l >= 0) { 7303 if (_.breakpoints[l] && _.breakpoints[l] === currentBreakpoint) { 7304 _.breakpoints.splice(l, 1); 7305 } 7306 l--; 7307 } 7308 _.breakpoints.push(currentBreakpoint); 7309 _.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings; 7310 } 7311 } 7312 _.breakpoints.sort(function(a, b) { 7313 return _.options.mobileFirst ? a - b : b - a; 7314 }); 7315 } 7316 }; 7317 Slick.prototype.reinit = function() { 7318 var _ = this; 7319 _.$slides = _.$slideTrack.children(_.options.slide).addClass("slick-slide"); 7320 _.slideCount = _.$slides.length; 7321 if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) { 7322 _.currentSlide = _.currentSlide - _.options.slidesToScroll; 7323 } 7324 if (_.slideCount <= _.options.slidesToShow) { 7325 _.currentSlide = 0; 7326 } 7327 _.registerBreakpoints(); 7328 _.setProps(); 7329 _.setupInfinite(); 7330 _.buildArrows(); 7331 _.updateArrows(); 7332 _.initArrowEvents(); 7333 _.buildDots(); 7334 _.updateDots(); 7335 _.initDotEvents(); 7336 _.cleanUpSlideEvents(); 7337 _.initSlideEvents(); 7338 _.checkResponsive(false, true); 7339 if (_.options.focusOnSelect === true) { 7340 $8(_.$slideTrack).children().on("click.slick", _.selectHandler); 7341 } 7342 _.setSlideClasses(typeof _.currentSlide === "number" ? _.currentSlide : 0); 7343 _.setPosition(); 7344 _.focusHandler(); 7345 _.paused = !_.options.autoplay; 7346 _.autoPlay(); 7347 _.$slider.trigger("reInit", [_]); 7348 }; 7349 Slick.prototype.resize = function() { 7350 var _ = this; 7351 if ($8(window).width() !== _.windowWidth) { 7352 clearTimeout(_.windowDelay); 7353 _.windowDelay = window.setTimeout(function() { 7354 _.windowWidth = $8(window).width(); 7355 _.checkResponsive(); 7356 if (!_.unslicked) { 7357 _.setPosition(); 7358 } 7359 }, 50); 7360 } 7361 }; 7362 Slick.prototype.removeSlide = Slick.prototype.slickRemove = function(index, removeBefore, removeAll) { 7363 var _ = this; 7364 if (typeof index === "boolean") { 7365 removeBefore = index; 7366 index = removeBefore === true ? 0 : _.slideCount - 1; 7367 } else { 7368 index = removeBefore === true ? --index : index; 7369 } 7370 if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) { 7371 return false; 7372 } 7373 _.unload(); 7374 if (removeAll === true) { 7375 _.$slideTrack.children().remove(); 7376 } else { 7377 _.$slideTrack.children(this.options.slide).eq(index).remove(); 7378 } 7379 _.$slides = _.$slideTrack.children(this.options.slide); 7380 _.$slideTrack.children(this.options.slide).detach(); 7381 _.$slideTrack.append(_.$slides); 7382 _.$slidesCache = _.$slides; 7383 _.reinit(); 7384 }; 7385 Slick.prototype.setCSS = function(position) { 7386 var _ = this, positionProps = {}, x, y; 7387 if (_.options.rtl === true) { 7388 position = -position; 7389 } 7390 x = _.positionProp == "left" ? Math.ceil(position) + "px" : "0px"; 7391 y = _.positionProp == "top" ? Math.ceil(position) + "px" : "0px"; 7392 positionProps[_.positionProp] = position; 7393 if (_.transformsEnabled === false) { 7394 _.$slideTrack.css(positionProps); 7395 } else { 7396 positionProps = {}; 7397 if (_.cssTransitions === false) { 7398 positionProps[_.animType] = "translate(" + x + ", " + y + ")"; 7399 _.$slideTrack.css(positionProps); 7400 } else { 7401 positionProps[_.animType] = "translate3d(" + x + ", " + y + ", 0px)"; 7402 _.$slideTrack.css(positionProps); 7403 } 7404 } 7405 }; 7406 Slick.prototype.setDimensions = function() { 7407 var _ = this; 7408 if (_.options.vertical === false) { 7409 if (_.options.centerMode === true) { 7410 _.$list.css({ 7411 padding: "0px " + _.options.centerPadding 7412 }); 7413 } 7414 } else { 7415 _.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow); 7416 if (_.options.centerMode === true) { 7417 _.$list.css({ 7418 padding: _.options.centerPadding + " 0px" 7419 }); 7420 } 7421 } 7422 _.listWidth = _.$list.width(); 7423 _.listHeight = _.$list.height(); 7424 if (_.options.vertical === false && _.options.variableWidth === false) { 7425 _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow); 7426 _.$slideTrack.width(Math.ceil(_.slideWidth * _.$slideTrack.children(".slick-slide").length)); 7427 } else if (_.options.variableWidth === true) { 7428 _.$slideTrack.width(5e3 * _.slideCount); 7429 } else { 7430 _.slideWidth = Math.ceil(_.listWidth); 7431 _.$slideTrack.height(Math.ceil(_.$slides.first().outerHeight(true) * _.$slideTrack.children(".slick-slide").length)); 7432 } 7433 var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width(); 7434 if (_.options.variableWidth === false) 7435 _.$slideTrack.children(".slick-slide").width(_.slideWidth - offset); 7436 }; 7437 Slick.prototype.setFade = function() { 7438 var _ = this, targetLeft; 7439 _.$slides.each(function(index, element) { 7440 targetLeft = _.slideWidth * index * -1; 7441 if (_.options.rtl === true) { 7442 $8(element).css({ 7443 position: "relative", 7444 right: targetLeft, 7445 top: 0, 7446 zIndex: _.options.zIndex - 2, 7447 opacity: 0 7448 }); 7449 } else { 7450 $8(element).css({ 7451 position: "relative", 7452 left: targetLeft, 7453 top: 0, 7454 zIndex: _.options.zIndex - 2, 7455 opacity: 0 7456 }); 7457 } 7458 }); 7459 _.$slides.eq(_.currentSlide).css({ 7460 zIndex: _.options.zIndex - 1, 7461 opacity: 1 7462 }); 7463 }; 7464 Slick.prototype.setHeight = function() { 7465 var _ = this; 7466 if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) { 7467 var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true); 7468 _.$list.css("height", targetHeight); 7469 } 7470 }; 7471 Slick.prototype.setOption = Slick.prototype.slickSetOption = function() { 7472 var _ = this, l, item, option, value, refresh = false, type; 7473 if ($8.type(arguments[0]) === "object") { 7474 option = arguments[0]; 7475 refresh = arguments[1]; 7476 type = "multiple"; 7477 } else if ($8.type(arguments[0]) === "string") { 7478 option = arguments[0]; 7479 value = arguments[1]; 7480 refresh = arguments[2]; 7481 if (arguments[0] === "responsive" && $8.type(arguments[1]) === "array") { 7482 type = "responsive"; 7483 } else if (typeof arguments[1] !== "undefined") { 7484 type = "single"; 7485 } 7486 } 7487 if (type === "single") { 7488 _.options[option] = value; 7489 } else if (type === "multiple") { 7490 $8.each(option, function(opt, val) { 7491 _.options[opt] = val; 7492 }); 7493 } else if (type === "responsive") { 7494 for (item in value) { 7495 if ($8.type(_.options.responsive) !== "array") { 7496 _.options.responsive = [value[item]]; 7497 } else { 7498 l = _.options.responsive.length - 1; 7499 while (l >= 0) { 7500 if (_.options.responsive[l].breakpoint === value[item].breakpoint) { 7501 _.options.responsive.splice(l, 1); 7502 } 7503 l--; 7504 } 7505 _.options.responsive.push(value[item]); 7506 } 7507 } 7508 } 7509 if (refresh) { 7510 _.unload(); 7511 _.reinit(); 7512 } 7513 }; 7514 Slick.prototype.setPosition = function() { 7515 var _ = this; 7516 _.setDimensions(); 7517 _.setHeight(); 7518 if (_.options.fade === false) { 7519 _.setCSS(_.getLeft(_.currentSlide)); 7520 } else { 7521 _.setFade(); 7522 } 7523 _.$slider.trigger("setPosition", [_]); 7524 }; 7525 Slick.prototype.setProps = function() { 7526 var _ = this, bodyStyle = document.body.style; 7527 _.positionProp = _.options.vertical === true ? "top" : "left"; 7528 if (_.positionProp === "top") { 7529 _.$slider.addClass("slick-vertical"); 7530 } else { 7531 _.$slider.removeClass("slick-vertical"); 7532 } 7533 if (bodyStyle.WebkitTransition !== void 0 || bodyStyle.MozTransition !== void 0 || bodyStyle.msTransition !== void 0) { 7534 if (_.options.useCSS === true) { 7535 _.cssTransitions = true; 7536 } 7537 } 7538 if (_.options.fade) { 7539 if (typeof _.options.zIndex === "number") { 7540 if (_.options.zIndex < 3) { 7541 _.options.zIndex = 3; 7542 } 7543 } else { 7544 _.options.zIndex = _.defaults.zIndex; 7545 } 7546 } 7547 if (bodyStyle.OTransform !== void 0) { 7548 _.animType = "OTransform"; 7549 _.transformType = "-o-transform"; 7550 _.transitionType = "OTransition"; 7551 if (bodyStyle.perspectiveProperty === void 0 && bodyStyle.webkitPerspective === void 0) 7552 _.animType = false; 7553 } 7554 if (bodyStyle.MozTransform !== void 0) { 7555 _.animType = "MozTransform"; 7556 _.transformType = "-moz-transform"; 7557 _.transitionType = "MozTransition"; 7558 if (bodyStyle.perspectiveProperty === void 0 && bodyStyle.MozPerspective === void 0) 7559 _.animType = false; 7560 } 7561 if (bodyStyle.webkitTransform !== void 0) { 7562 _.animType = "webkitTransform"; 7563 _.transformType = "-webkit-transform"; 7564 _.transitionType = "webkitTransition"; 7565 if (bodyStyle.perspectiveProperty === void 0 && bodyStyle.webkitPerspective === void 0) 7566 _.animType = false; 7567 } 7568 if (bodyStyle.msTransform !== void 0) { 7569 _.animType = "msTransform"; 7570 _.transformType = "-ms-transform"; 7571 _.transitionType = "msTransition"; 7572 if (bodyStyle.msTransform === void 0) 7573 _.animType = false; 7574 } 7575 if (bodyStyle.transform !== void 0 && _.animType !== false) { 7576 _.animType = "transform"; 7577 _.transformType = "transform"; 7578 _.transitionType = "transition"; 7579 } 7580 _.transformsEnabled = _.options.useTransform && (_.animType !== null && _.animType !== false); 7581 }; 7582 Slick.prototype.setSlideClasses = function(index) { 7583 var _ = this, centerOffset, allSlides, indexOffset, remainder; 7584 allSlides = _.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden", "true"); 7585 _.$slides.eq(index).addClass("slick-current"); 7586 if (_.options.centerMode === true) { 7587 centerOffset = Math.floor(_.options.slidesToShow / 2); 7588 if (_.options.infinite === true) { 7589 if (index >= centerOffset && index <= _.slideCount - 1 - centerOffset) { 7590 _.$slides.slice(index - centerOffset, index + centerOffset + 1).addClass("slick-active").attr("aria-hidden", "false"); 7591 } else { 7592 indexOffset = _.options.slidesToShow + index; 7593 allSlides.slice(indexOffset - centerOffset + 1, indexOffset + centerOffset + 2).addClass("slick-active").attr("aria-hidden", "false"); 7594 } 7595 if (index === 0) { 7596 allSlides.eq(allSlides.length - 1 - _.options.slidesToShow).addClass("slick-center"); 7597 } else if (index === _.slideCount - 1) { 7598 allSlides.eq(_.options.slidesToShow).addClass("slick-center"); 7599 } 7600 } 7601 _.$slides.eq(index).addClass("slick-center"); 7602 } else { 7603 if (index >= 0 && index <= _.slideCount - _.options.slidesToShow) { 7604 _.$slides.slice(index, index + _.options.slidesToShow).addClass("slick-active").attr("aria-hidden", "false"); 7605 } else if (allSlides.length <= _.options.slidesToShow) { 7606 allSlides.addClass("slick-active").attr("aria-hidden", "false"); 7607 } else { 7608 remainder = _.slideCount % _.options.slidesToShow; 7609 indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index; 7610 if (_.options.slidesToShow == _.options.slidesToScroll && _.slideCount - index < _.options.slidesToShow) { 7611 allSlides.slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder).addClass("slick-active").attr("aria-hidden", "false"); 7612 } else { 7613 allSlides.slice(indexOffset, indexOffset + _.options.slidesToShow).addClass("slick-active").attr("aria-hidden", "false"); 7614 } 7615 } 7616 } 7617 if (_.options.lazyLoad === "ondemand") { 7618 _.lazyLoad(); 7619 } 7620 }; 7621 Slick.prototype.setupInfinite = function() { 7622 var _ = this, i, slideIndex, infiniteCount; 7623 if (_.options.fade === true) { 7624 _.options.centerMode = false; 7625 } 7626 if (_.options.infinite === true && _.options.fade === false) { 7627 slideIndex = null; 7628 if (_.slideCount > _.options.slidesToShow) { 7629 if (_.options.centerMode === true) { 7630 infiniteCount = _.options.slidesToShow + 1; 7631 } else { 7632 infiniteCount = _.options.slidesToShow; 7633 } 7634 for (i = _.slideCount; i > _.slideCount - infiniteCount; i -= 1) { 7635 slideIndex = i - 1; 7636 $8(_.$slides[slideIndex]).clone(true).attr("id", "").attr("data-slick-index", slideIndex - _.slideCount).prependTo(_.$slideTrack).addClass("slick-cloned"); 7637 } 7638 for (i = 0; i < infiniteCount; i += 1) { 7639 slideIndex = i; 7640 $8(_.$slides[slideIndex]).clone(true).attr("id", "").attr("data-slick-index", slideIndex + _.slideCount).appendTo(_.$slideTrack).addClass("slick-cloned"); 7641 } 7642 _.$slideTrack.find(".slick-cloned").find("[id]").each(function() { 7643 $8(this).attr("id", ""); 7644 }); 7645 } 7646 } 7647 }; 7648 Slick.prototype.interrupt = function(toggle) { 7649 var _ = this; 7650 if (!toggle) { 7651 _.autoPlay(); 7652 } 7653 _.interrupted = toggle; 7654 }; 7655 Slick.prototype.selectHandler = function(event2) { 7656 var _ = this; 7657 var targetElement = $8(event2.target).is(".slick-slide") ? $8(event2.target) : $8(event2.target).parents(".slick-slide"); 7658 var index = parseInt(targetElement.attr("data-slick-index")); 7659 if (!index) 7660 index = 0; 7661 if (_.slideCount <= _.options.slidesToShow) { 7662 _.setSlideClasses(index); 7663 _.asNavFor(index); 7664 return; 7665 } 7666 _.slideHandler(index); 7667 }; 7668 Slick.prototype.slideHandler = function(index, sync, dontAnimate) { 7669 var targetSlide, animSlide, oldSlide, slideLeft, targetLeft = null, _ = this, navTarget; 7670 sync = sync || false; 7671 if (_.animating === true && _.options.waitForAnimate === true) { 7672 return; 7673 } 7674 if (_.options.fade === true && _.currentSlide === index) { 7675 return; 7676 } 7677 if (_.slideCount <= _.options.slidesToShow) { 7678 return; 7679 } 7680 if (sync === false) { 7681 _.asNavFor(index); 7682 } 7683 targetSlide = index; 7684 targetLeft = _.getLeft(targetSlide); 7685 slideLeft = _.getLeft(_.currentSlide); 7686 _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft; 7687 if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) { 7688 if (_.options.fade === false) { 7689 targetSlide = _.currentSlide; 7690 if (dontAnimate !== true) { 7691 _.animateSlide(slideLeft, function() { 7692 _.postSlide(targetSlide); 7693 }); 7694 } else { 7695 _.postSlide(targetSlide); 7696 } 7697 } 7698 return; 7699 } else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > _.slideCount - _.options.slidesToScroll)) { 7700 if (_.options.fade === false) { 7701 targetSlide = _.currentSlide; 7702 if (dontAnimate !== true) { 7703 _.animateSlide(slideLeft, function() { 7704 _.postSlide(targetSlide); 7705 }); 7706 } else { 7707 _.postSlide(targetSlide); 7708 } 7709 } 7710 return; 7711 } 7712 if (_.options.autoplay) { 7713 clearInterval(_.autoPlayTimer); 7714 } 7715 if (targetSlide < 0) { 7716 if (_.slideCount % _.options.slidesToScroll !== 0) { 7717 animSlide = _.slideCount - _.slideCount % _.options.slidesToScroll; 7718 } else { 7719 animSlide = _.slideCount + targetSlide; 7720 } 7721 } else if (targetSlide >= _.slideCount) { 7722 if (_.slideCount % _.options.slidesToScroll !== 0) { 7723 animSlide = 0; 7724 } else { 7725 animSlide = targetSlide - _.slideCount; 7726 } 7727 } else { 7728 animSlide = targetSlide; 7729 } 7730 _.animating = true; 7731 _.$slider.trigger("beforeChange", [_, _.currentSlide, animSlide]); 7732 oldSlide = _.currentSlide; 7733 _.currentSlide = animSlide; 7734 _.setSlideClasses(_.currentSlide); 7735 if (_.options.asNavFor) { 7736 navTarget = _.getNavTarget(); 7737 navTarget = navTarget.slick("getSlick"); 7738 if (navTarget.slideCount <= navTarget.options.slidesToShow) { 7739 navTarget.setSlideClasses(_.currentSlide); 7740 } 7741 } 7742 _.updateDots(); 7743 _.updateArrows(); 7744 if (_.options.fade === true) { 7745 if (dontAnimate !== true) { 7746 _.fadeSlideOut(oldSlide); 7747 _.fadeSlide(animSlide, function() { 7748 _.postSlide(animSlide); 7749 }); 7750 } else { 7751 _.postSlide(animSlide); 7752 } 7753 _.animateHeight(); 7754 return; 7755 } 7756 if (dontAnimate !== true) { 7757 _.animateSlide(targetLeft, function() { 7758 _.postSlide(animSlide); 7759 }); 7760 } else { 7761 _.postSlide(animSlide); 7762 } 7763 }; 7764 Slick.prototype.startLoad = function() { 7765 var _ = this; 7766 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { 7767 _.$prevArrow.hide(); 7768 _.$nextArrow.hide(); 7769 } 7770 if (_.options.dots === true && _.slideCount > _.options.slidesToShow) { 7771 _.$dots.hide(); 7772 } 7773 _.$slider.addClass("slick-loading"); 7774 }; 7775 Slick.prototype.swipeDirection = function() { 7776 var xDist, yDist, r, swipeAngle, _ = this; 7777 xDist = _.touchObject.startX - _.touchObject.curX; 7778 yDist = _.touchObject.startY - _.touchObject.curY; 7779 r = Math.atan2(yDist, xDist); 7780 swipeAngle = Math.round(r * 180 / Math.PI); 7781 if (swipeAngle < 0) { 7782 swipeAngle = 360 - Math.abs(swipeAngle); 7783 } 7784 if (swipeAngle <= 45 && swipeAngle >= 0) { 7785 return _.options.rtl === false ? "left" : "right"; 7786 } 7787 if (swipeAngle <= 360 && swipeAngle >= 315) { 7788 return _.options.rtl === false ? "left" : "right"; 7789 } 7790 if (swipeAngle >= 135 && swipeAngle <= 225) { 7791 return _.options.rtl === false ? "right" : "left"; 7792 } 7793 if (_.options.verticalSwiping === true) { 7794 if (swipeAngle >= 35 && swipeAngle <= 135) { 7795 return "down"; 7796 } else { 7797 return "up"; 7798 } 7799 } 7800 return "vertical"; 7801 }; 7802 Slick.prototype.swipeEnd = function(event2) { 7803 var _ = this, slideCount, direction; 7804 _.dragging = false; 7805 _.interrupted = false; 7806 _.shouldClick = _.touchObject.swipeLength > 10 ? false : true; 7807 if (_.touchObject.curX === void 0) { 7808 return false; 7809 } 7810 if (_.touchObject.edgeHit === true) { 7811 _.$slider.trigger("edge", [_, _.swipeDirection()]); 7812 } 7813 if (_.touchObject.swipeLength >= _.touchObject.minSwipe) { 7814 direction = _.swipeDirection(); 7815 switch (direction) { 7816 case "left": 7817 case "down": 7818 slideCount = _.options.swipeToSlide ? _.checkNavigable(_.currentSlide + _.getSlideCount()) : _.currentSlide + _.getSlideCount(); 7819 _.currentDirection = 0; 7820 break; 7821 case "right": 7822 case "up": 7823 slideCount = _.options.swipeToSlide ? _.checkNavigable(_.currentSlide - _.getSlideCount()) : _.currentSlide - _.getSlideCount(); 7824 _.currentDirection = 1; 7825 break; 7826 default: 7827 } 7828 if (direction != "vertical") { 7829 _.slideHandler(slideCount); 7830 _.touchObject = {}; 7831 _.$slider.trigger("swipe", [_, direction]); 7832 } 7833 } else { 7834 if (_.touchObject.startX !== _.touchObject.curX) { 7835 _.slideHandler(_.currentSlide); 7836 _.touchObject = {}; 7837 } 7838 } 7839 }; 7840 Slick.prototype.swipeHandler = function(event2) { 7841 var _ = this; 7842 if (_.options.swipe === false || "ontouchend" in document && _.options.swipe === false) { 7843 return; 7844 } else if (_.options.draggable === false && event2.type.indexOf("mouse") !== -1) { 7845 return; 7846 } 7847 _.touchObject.fingerCount = event2.originalEvent && event2.originalEvent.touches !== void 0 ? event2.originalEvent.touches.length : 1; 7848 _.touchObject.minSwipe = _.listWidth / _.options.touchThreshold; 7849 if (_.options.verticalSwiping === true) { 7850 _.touchObject.minSwipe = _.listHeight / _.options.touchThreshold; 7851 } 7852 switch (event2.data.action) { 7853 case "start": 7854 _.swipeStart(event2); 7855 break; 7856 case "move": 7857 _.swipeMove(event2); 7858 break; 7859 case "end": 7860 _.swipeEnd(event2); 7861 break; 7862 } 7863 }; 7864 Slick.prototype.swipeMove = function(event2) { 7865 var _ = this, edgeWasHit = false, curLeft, swipeDirection, swipeLength, positionOffset, touches; 7866 touches = event2.originalEvent !== void 0 ? event2.originalEvent.touches : null; 7867 if (!_.dragging || touches && touches.length !== 1) { 7868 return false; 7869 } 7870 curLeft = _.getLeft(_.currentSlide); 7871 _.touchObject.curX = touches !== void 0 ? touches[0].pageX : event2.clientX; 7872 _.touchObject.curY = touches !== void 0 ? touches[0].pageY : event2.clientY; 7873 _.touchObject.swipeLength = Math.round(Math.sqrt( 7874 Math.pow(_.touchObject.curX - _.touchObject.startX, 2) 7875 )); 7876 if (_.options.verticalSwiping === true) { 7877 _.touchObject.swipeLength = Math.round(Math.sqrt( 7878 Math.pow(_.touchObject.curY - _.touchObject.startY, 2) 7879 )); 7880 } 7881 swipeDirection = _.swipeDirection(); 7882 if (swipeDirection === "vertical") { 7883 return; 7884 } 7885 if (event2.originalEvent !== void 0 && _.touchObject.swipeLength > 4) { 7886 event2.preventDefault(); 7887 } 7888 positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1); 7889 if (_.options.verticalSwiping === true) { 7890 positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1; 7891 } 7892 swipeLength = _.touchObject.swipeLength; 7893 _.touchObject.edgeHit = false; 7894 if (_.options.infinite === false) { 7895 if (_.currentSlide === 0 && swipeDirection === "right" || _.currentSlide >= _.getDotCount() && swipeDirection === "left") { 7896 swipeLength = _.touchObject.swipeLength * _.options.edgeFriction; 7897 _.touchObject.edgeHit = true; 7898 } 7899 } 7900 if (_.options.vertical === false) { 7901 _.swipeLeft = curLeft + swipeLength * positionOffset; 7902 } else { 7903 _.swipeLeft = curLeft + swipeLength * (_.$list.height() / _.listWidth) * positionOffset; 7904 } 7905 if (_.options.verticalSwiping === true) { 7906 _.swipeLeft = curLeft + swipeLength * positionOffset; 7907 } 7908 if (_.options.fade === true || _.options.touchMove === false) { 7909 return false; 7910 } 7911 if (_.animating === true) { 7912 _.swipeLeft = null; 7913 return false; 7914 } 7915 _.setCSS(_.swipeLeft); 7916 }; 7917 Slick.prototype.swipeStart = function(event2) { 7918 var _ = this, touches; 7919 _.interrupted = true; 7920 if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) { 7921 _.touchObject = {}; 7922 return false; 7923 } 7924 if (event2.originalEvent !== void 0 && event2.originalEvent.touches !== void 0) { 7925 touches = event2.originalEvent.touches[0]; 7926 } 7927 _.touchObject.startX = _.touchObject.curX = touches !== void 0 ? touches.pageX : event2.clientX; 7928 _.touchObject.startY = _.touchObject.curY = touches !== void 0 ? touches.pageY : event2.clientY; 7929 _.dragging = true; 7930 }; 7931 Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function() { 7932 var _ = this; 7933 if (_.$slidesCache !== null) { 7934 _.unload(); 7935 _.$slideTrack.children(this.options.slide).detach(); 7936 _.$slidesCache.appendTo(_.$slideTrack); 7937 _.reinit(); 7938 } 7939 }; 7940 Slick.prototype.unload = function() { 7941 var _ = this; 7942 $8(".slick-cloned", _.$slider).remove(); 7943 if (_.$dots) { 7944 _.$dots.remove(); 7945 } 7946 if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) { 7947 _.$prevArrow.remove(); 7948 } 7949 if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) { 7950 _.$nextArrow.remove(); 7951 } 7952 _.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden", "true").css("width", ""); 7953 }; 7954 Slick.prototype.unslick = function(fromBreakpoint) { 7955 var _ = this; 7956 _.$slider.trigger("unslick", [_, fromBreakpoint]); 7957 _.destroy(); 7958 }; 7959 Slick.prototype.updateArrows = function() { 7960 var _ = this, centerOffset; 7961 centerOffset = Math.floor(_.options.slidesToShow / 2); 7962 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow && !_.options.infinite) { 7963 _.$prevArrow.removeClass("slick-disabled").attr("aria-disabled", "false"); 7964 _.$nextArrow.removeClass("slick-disabled").attr("aria-disabled", "false"); 7965 if (_.currentSlide === 0) { 7966 _.$prevArrow.addClass("slick-disabled").attr("aria-disabled", "true"); 7967 _.$nextArrow.removeClass("slick-disabled").attr("aria-disabled", "false"); 7968 } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) { 7969 _.$nextArrow.addClass("slick-disabled").attr("aria-disabled", "true"); 7970 _.$prevArrow.removeClass("slick-disabled").attr("aria-disabled", "false"); 7971 } else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) { 7972 _.$nextArrow.addClass("slick-disabled").attr("aria-disabled", "true"); 7973 _.$prevArrow.removeClass("slick-disabled").attr("aria-disabled", "false"); 7974 } 7975 } 7976 }; 7977 Slick.prototype.updateDots = function() { 7978 var _ = this; 7979 if (_.$dots !== null) { 7980 _.$dots.find("li").removeClass("slick-active").attr("aria-hidden", "true"); 7981 _.$dots.find("li").eq(Math.floor(_.currentSlide / _.options.slidesToScroll)).addClass("slick-active").attr("aria-hidden", "false"); 7982 } 7983 }; 7984 Slick.prototype.visibility = function() { 7985 var _ = this; 7986 if (_.options.autoplay) { 7987 if (document[_.hidden]) { 7988 _.interrupted = true; 7989 } else { 7990 _.interrupted = false; 7991 } 7992 } 7993 }; 7994 $8.fn.slick = function() { 7995 var _ = this, opt = arguments[0], args = Array.prototype.slice.call(arguments, 1), l = _.length, i, ret; 7996 for (i = 0; i < l; i++) { 7997 if (typeof opt == "object" || typeof opt == "undefined") 7998 _[i].slick = new Slick(_[i], opt); 7999 else 8000 ret = _[i].slick[opt].apply(_[i].slick, args); 8001 if (typeof ret != "undefined") 8002 return ret; 8003 } 8004 return _; 8005 }; 8006 }); 8007 } 8008 }); 8009 8010
vendor: 8,459 bytes, lines 8010-8136
8010// src/js/components/jquery-ui/jquery-ui.min.js 8011 !function(t) { 8012 "use strict"; 8013 "function" == typeof define && define.amd ? define(["jquery"], t) : t(jQuery); 8014 }(function(V) { 8015 "use strict"; 8016 V.ui = V.ui || {}; 8017 V.ui.version = "1.13.2"; 8018 var n, i = 0, a = Array.prototype.hasOwnProperty, r = Array.prototype.slice; 8019 V.cleanData = (n = V.cleanData, function(t2) { 8020 for (var e2, i2, s2 = 0; null != (i2 = t2[s2]); s2++) 8021 (e2 = V._data(i2, "events")) && e2.remove && V(i2).triggerHandler("remove"); 8022 n(t2); 8023 }), V.widget = function(t2, i2, e2) { 8024 var s2, n2, o2, a2 = {}, r2 = t2.split(".")[0], l2 = r2 + "-" + (t2 = t2.split(".")[1]); 8025 return e2 || (e2 = i2, i2 = V.Widget), Array.isArray(e2) && (e2 = V.extend.apply(null, [{}].concat(e2))), V.expr.pseudos[l2.toLowerCase()] = function(t3) { 8026 return !!V.data(t3, l2); 8027 }, V[r2] = V[r2] || {}, s2 = V[r2][t2], n2 = V[r2][t2] = function(t3, e3) { 8028 if (!this || !this._createWidget) 8029 return new n2(t3, e3); 8030 arguments.length && this._createWidget(t3, e3); 8031 }, V.extend(n2, s2, { version: e2.version, _proto: V.extend({}, e2), _childConstructors: [] }), (o2 = new i2()).options = V.widget.extend({}, o2.options), V.each(e2, function(e3, s3) { 8032 function n3() { 8033 return i2.prototype[e3].apply(this, arguments); 8034 } 8035 function o3(t3) { 8036 return i2.prototype[e3].apply(this, t3); 8037 } 8038 a2[e3] = "function" == typeof s3 ? function() { 8039 var t3, e4 = this._super, i3 = this._superApply; 8040 return this._super = n3, this._superApply = o3, t3 = s3.apply(this, arguments), this._super = e4, this._superApply = i3, t3; 8041 } : s3; 8042 }), n2.prototype = V.widget.extend(o2, { widgetEventPrefix: s2 && o2.widgetEventPrefix || t2 }, a2, { constructor: n2, namespace: r2, widgetName: t2, widgetFullName: l2 }), s2 ? (V.each(s2._childConstructors, function(t3, e3) { 8043 var i3 = e3.prototype; 8044 V.widget(i3.namespace + "." + i3.widgetName, n2, e3._proto); 8045 }), delete s2._childConstructors) : i2._childConstructors.push(n2), V.widget.bridge(t2, n2), n2; 8046 }, V.widget.extend = function(t2) { 8047 for (var e2, i2, s2 = r.call(arguments, 1), n2 = 0, o2 = s2.length; n2 < o2; n2++) 8048 for (e2 in s2[n2]) 8049 i2 = s2[n2][e2], a.call(s2[n2], e2) && void 0 !== i2 && (V.isPlainObject(i2) ? t2[e2] = V.isPlainObject(t2[e2]) ? V.widget.extend({}, t2[e2], i2) : V.widget.extend({}, i2) : t2[e2] = i2); 8050 return t2; 8051 }, V.widget.bridge = function(o2, e2) { 8052 var a2 = e2.prototype.widgetFullName || o2; 8053 V.fn[o2] = function(i2) { 8054 var t2 = "string" == typeof i2, s2 = r.call(arguments, 1), n2 = this; 8055 return t2 ? this.length || "instance" !== i2 ? this.each(function() { 8056 var t3, e3 = V.data(this, a2); 8057 return "instance" === i2 ? (n2 = e3, false) : e3 ? "function" != typeof e3[i2] || "_" === i2.charAt(0) ? V.error("no such method '" + i2 + "' for " + o2 + " widget instance") : (t3 = e3[i2].apply(e3, s2)) !== e3 && void 0 !== t3 ? (n2 = t3 && t3.jquery ? n2.pushStack(t3.get()) : t3, false) : void 0 : V.error("cannot call methods on " + o2 + " prior to initialization; attempted to call method '" + i2 + "'"); 8058 }) : n2 = void 0 : (s2.length && (i2 = V.widget.extend.apply(null, [i2].concat(s2))), this.each(function() { 8059 var t3 = V.data(this, a2); 8060 t3 ? (t3.option(i2 || {}), t3._init && t3._init()) : V.data(this, a2, new e2(i2, this)); 8061 })), n2; 8062 }; 8063 }, V.Widget = function() { 8064 }, V.Widget._childConstructors = [], V.Widget.prototype = { widgetName: "widget", widgetEventPrefix: "", defaultElement: "<div>", options: { classes: {}, disabled: false, create: null }, _createWidget: function(t2, e2) { 8065 e2 = V(e2 || this.defaultElement || this)[0], this.element = V(e2), this.uuid = i++, this.eventNamespace = "." + this.widgetName + this.uuid, this.bindings = V(), this.hoverable = V(), this.focusable = V(), this.classesElementLookup = {}, e2 !== this && (V.data(e2, this.widgetFullName, this), this._on(true, this.element, { remove: function(t3) { 8066 t3.target === e2 && this.destroy(); 8067 } }), this.document = V(e2.style ? e2.ownerDocument : e2.document || e2), this.window = V(this.document[0].defaultView || this.document[0].parentWindow)), this.options = V.widget.extend({}, this.options, this._getCreateOptions(), t2), this._create(), this.options.disabled && this._setOptionDisabled(this.options.disabled), this._trigger("create", null, this._getCreateEventData()), this._init(); 8068 }, _getCreateOptions: function() { 8069 return {}; 8070 }, _getCreateEventData: V.noop, _create: V.noop, _init: V.noop, destroy: function() { 8071 var i2 = this; 8072 this._destroy(), V.each(this.classesElementLookup, function(t2, e2) { 8073 i2._removeClass(e2, t2); 8074 }), this.element.off(this.eventNamespace).removeData(this.widgetFullName), this.widget().off(this.eventNamespace).removeAttr("aria-disabled"), this.bindings.off(this.eventNamespace); 8075 }, _destroy: V.noop, widget: function() { 8076 return this.element; 8077 }, option: function(t2, e2) { 8078 var i2, s2, n2, o2 = t2; 8079 if (0 === arguments.length) 8080 return V.widget.extend({}, this.options); 8081 if ("string" == typeof t2) 8082 if (o2 = {}, t2 = (i2 = t2.split(".")).shift(), i2.length) { 8083 for (s2 = o2[t2] = V.widget.extend({}, this.options[t2]), n2 = 0; n2 < i2.length - 1; n2++) 8084 s2[i2[n2]] = s2[i2[n2]] || {}, s2 = s2[i2[n2]]; 8085 if (t2 = i2.pop(), 1 === arguments.length) 8086 return void 0 === s2[t2] ? null : s2[t2]; 8087 s2[t2] = e2; 8088 } else { 8089 if (1 === arguments.length) 8090 return void 0 === this.options[t2] ? null : this.options[t2]; 8091 o2[t2] = e2; 8092 } 8093 return this._setOptions(o2), this; 8094 }, _setOptions: function(t2) { 8095 for (var e2 in t2) 8096 this._setOption(e2, t2[e2]); 8097 return this; 8098 }, _setOption: function(t2, e2) { 8099 return "classes" === t2 && this._setOptionClasses(e2), this.options[t2] = e2, "disabled" === t2 && this._setOptionDisabled(e2), this; 8100 }, _setOptionClasses: function(t2) { 8101 var e2, i2, s2; 8102 for (e2 in t2) 8103 s2 = this.classesElementLookup[e2], t2[e2] !== this.options.classes[e2] && s2 && s2.length && (i2 = V(s2.get()), this._removeClass(s2, e2), i2.addClass(this._classes({ element: i2, keys: e2, classes: t2, add: true }))); 8104 }, _setOptionDisabled: function(t2) { 8105 this._toggleClass(this.widget(), this.widgetFullName + "-disabled", null, !!t2), t2 && (this._removeClass(this.hoverable, null, "ui-state-hover"), this._removeClass(this.focusable, null, "ui-state-focus")); 8106 }, enable: function() { 8107 return this._setOptions({ disabled: false }); 8108 }, disable: function() { 8109 return this._setOptions({ disabled: true }); 8110 }, _classes: function(n2) { 8111 var o2 = [], a2 = this; 8112 function t2(t3, e2) { 8113 for (var i2, s2 = 0; s2 < t3.length; s2++) 8114 i2 = a2.classesElementLookup[t3[s2]] || V(), i2 = n2.add ? (function() { 8115 var i3 = []; 8116 n2.element.each(function(t4, e3) { 8117 V.map(a2.classesElementLookup, function(t5) { 8118 return t5; 8119 }).some(function(t5) { 8120 return t5.is(e3); 8121 }) || i3.push(e3); 8122 }), a2._on(V(i3), { remove: "_untrackClassesElement" }); 8123 }(), V(V.uniqueSort(i2.get().concat(n2.element.get())))) : V(i2.not(n2.element).get()), a2.classesElementLookup[t3[s2]] = i2, o2.push(t3[s2]), e2 && n2.classes[t3[s2]] && o2.push(n2.classes[t3[s2]]); 8124 } 8125 return (n2 = V.extend({ element: this.element, classes: this.options.classes || {} }, n2)).keys && t2(n2.keys.match(/\S+/g) || [], true), n2.extra && t2(n2.extra.match(/\S+/g) || []), o2.join(" "); 8126 }, _untrackClassesElement: function(i2) { 8127 var s2 = this; 8128 V.each(s2.classesElementLookup, function(t2, e2) { 8129 -1 !== V.inArray(i2.target, e2) && (s2.classesElementLookup[t2] = V(e2.not(i2.target).get())); 8130 }), this._off(V(i2.target)); 8131 }, _removeClass: function(t2, e2, i2) { 8132 return this._toggleClass(t2, e2, i2, false); 8133 }, _addClass: function(t2, e2, i2) { 8134 return this._toggleClass(t2, e2, i2, true); 8135 }, _toggleClass: function(t2, e2, i2, s2) { 8136 var n2 = "string" == typeof t2 || null === t2, i2 = { extra:
vendor: 14,391 bytes, lines 8136-8295
8136n2 ? e2 : i2, keys: n2 ? t2 : e2, element: n2 ? this.element : t2, add: s2 = "boolean" == typeof s2 ? s2 : i2 }; 8137 return i2.element.toggleClass(this._classes(i2), s2), this; 8138 }, _on: function(n2, o2, t2) { 8139 var a2, r2 = this; 8140 "boolean" != typeof n2 && (t2 = o2, o2 = n2, n2 = false), t2 ? (o2 = a2 = V(o2), this.bindings = this.bindings.add(o2)) : (t2 = o2, o2 = this.element, a2 = this.widget()), V.each(t2, function(t3, e2) { 8141 function i2() { 8142 if (n2 || true !== r2.options.disabled && !V(this).hasClass("ui-state-disabled")) 8143 return ("string" == typeof e2 ? r2[e2] : e2).apply(r2, arguments); 8144 } 8145 "string" != typeof e2 && (i2.guid = e2.guid = e2.guid || i2.guid || V.guid++); 8146 var s2 = t3.match(/^([\w:-]*)\s*(.*)$/), t3 = s2[1] + r2.eventNamespace, s2 = s2[2]; 8147 s2 ? a2.on(t3, s2, i2) : o2.on(t3, i2); 8148 }); 8149 }, _off: function(t2, e2) { 8150 e2 = (e2 || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace, t2.off(e2), this.bindings = V(this.bindings.not(t2).get()), this.focusable = V(this.focusable.not(t2).get()), this.hoverable = V(this.hoverable.not(t2).get()); 8151 }, _delay: function(t2, e2) { 8152 var i2 = this; 8153 return setTimeout(function() { 8154 return ("string" == typeof t2 ? i2[t2] : t2).apply(i2, arguments); 8155 }, e2 || 0); 8156 }, _hoverable: function(t2) { 8157 this.hoverable = this.hoverable.add(t2), this._on(t2, { mouseenter: function(t3) { 8158 this._addClass(V(t3.currentTarget), null, "ui-state-hover"); 8159 }, mouseleave: function(t3) { 8160 this._removeClass(V(t3.currentTarget), null, "ui-state-hover"); 8161 } }); 8162 }, _focusable: function(t2) { 8163 this.focusable = this.focusable.add(t2), this._on(t2, { focusin: function(t3) { 8164 this._addClass(V(t3.currentTarget), null, "ui-state-focus"); 8165 }, focusout: function(t3) { 8166 this._removeClass(V(t3.currentTarget), null, "ui-state-focus"); 8167 } }); 8168 }, _trigger: function(t2, e2, i2) { 8169 var s2, n2, o2 = this.options[t2]; 8170 if (i2 = i2 || {}, (e2 = V.Event(e2)).type = (t2 === this.widgetEventPrefix ? t2 : this.widgetEventPrefix + t2).toLowerCase(), e2.target = this.element[0], n2 = e2.originalEvent) 8171 for (s2 in n2) 8172 s2 in e2 || (e2[s2] = n2[s2]); 8173 return this.element.trigger(e2, i2), !("function" == typeof o2 && false === o2.apply(this.element[0], [e2].concat(i2)) || e2.isDefaultPrevented()); 8174 } }, V.each({ show: "fadeIn", hide: "fadeOut" }, function(o2, a2) { 8175 V.Widget.prototype["_" + o2] = function(e2, t2, i2) { 8176 var s2, n2 = (t2 = "string" == typeof t2 ? { effect: t2 } : t2) ? true !== t2 && "number" != typeof t2 && t2.effect || a2 : o2; 8177 "number" == typeof (t2 = t2 || {}) ? t2 = { duration: t2 } : true === t2 && (t2 = {}), s2 = !V.isEmptyObject(t2), t2.complete = i2, t2.delay && e2.delay(t2.delay), s2 && V.effects && V.effects.effect[n2] ? e2[o2](t2) : n2 !== o2 && e2[n2] ? e2[n2](t2.duration, t2.easing, i2) : e2.queue(function(t3) { 8178 V(this)[o2](), i2 && i2.call(e2[0]), t3(); 8179 }); 8180 }; 8181 }); 8182 var s, x, k, o, l, h, c, u, C; 8183 V.widget; 8184 function D(t2, e2, i2) { 8185 return [parseFloat(t2[0]) * (u.test(t2[0]) ? e2 / 100 : 1), parseFloat(t2[1]) * (u.test(t2[1]) ? i2 / 100 : 1)]; 8186 } 8187 function I(t2, e2) { 8188 return parseInt(V.css(t2, e2), 10) || 0; 8189 } 8190 function T(t2) { 8191 return null != t2 && t2 === t2.window; 8192 } 8193 x = Math.max, k = Math.abs, o = /left|center|right/, l = /top|center|bottom/, h = /[\+\-]\d+(\.[\d]+)?%?/, c = /^\w+/, u = /%$/, C = V.fn.position, V.position = { scrollbarWidth: function() { 8194 if (void 0 !== s) 8195 return s; 8196 var t2, e2 = V("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>"), i2 = e2.children()[0]; 8197 return V("body").append(e2), t2 = i2.offsetWidth, e2.css("overflow", "scroll"), t2 === (i2 = i2.offsetWidth) && (i2 = e2[0].clientWidth), e2.remove(), s = t2 - i2; 8198 }, getScrollInfo: function(t2) { 8199 var e2 = t2.isWindow || t2.isDocument ? "" : t2.element.css("overflow-x"), i2 = t2.isWindow || t2.isDocument ? "" : t2.element.css("overflow-y"), e2 = "scroll" === e2 || "auto" === e2 && t2.width < t2.element[0].scrollWidth; 8200 return { width: "scroll" === i2 || "auto" === i2 && t2.height < t2.element[0].scrollHeight ? V.position.scrollbarWidth() : 0, height: e2 ? V.position.scrollbarWidth() : 0 }; 8201 }, getWithinInfo: function(t2) { 8202 var e2 = V(t2 || window), i2 = T(e2[0]), s2 = !!e2[0] && 9 === e2[0].nodeType; 8203 return { element: e2, isWindow: i2, isDocument: s2, offset: !i2 && !s2 ? V(t2).offset() : { left: 0, top: 0 }, scrollLeft: e2.scrollLeft(), scrollTop: e2.scrollTop(), width: e2.outerWidth(), height: e2.outerHeight() }; 8204 } }, V.fn.position = function(u2) { 8205 if (!u2 || !u2.of) 8206 return C.apply(this, arguments); 8207 var d2, p2, f2, g2, m2, t2, _2 = "string" == typeof (u2 = V.extend({}, u2)).of ? V(document).find(u2.of) : V(u2.of), v2 = V.position.getWithinInfo(u2.within), b2 = V.position.getScrollInfo(v2), y2 = (u2.collision || "flip").split(" "), w2 = {}, e2 = 9 === (t2 = (e2 = _2)[0]).nodeType ? { width: e2.width(), height: e2.height(), offset: { top: 0, left: 0 } } : T(t2) ? { width: e2.width(), height: e2.height(), offset: { top: e2.scrollTop(), left: e2.scrollLeft() } } : t2.preventDefault ? { width: 0, height: 0, offset: { top: t2.pageY, left: t2.pageX } } : { width: e2.outerWidth(), height: e2.outerHeight(), offset: e2.offset() }; 8208 return _2[0].preventDefault && (u2.at = "left top"), p2 = e2.width, f2 = e2.height, m2 = V.extend({}, g2 = e2.offset), V.each(["my", "at"], function() { 8209 var t3, e3, i2 = (u2[this] || "").split(" "); 8210 (i2 = 1 === i2.length ? o.test(i2[0]) ? i2.concat(["center"]) : l.test(i2[0]) ? ["center"].concat(i2) : ["center", "center"] : i2)[0] = o.test(i2[0]) ? i2[0] : "center", i2[1] = l.test(i2[1]) ? i2[1] : "center", t3 = h.exec(i2[0]), e3 = h.exec(i2[1]), w2[this] = [t3 ? t3[0] : 0, e3 ? e3[0] : 0], u2[this] = [c.exec(i2[0])[0], c.exec(i2[1])[0]]; 8211 }), 1 === y2.length && (y2[1] = y2[0]), "right" === u2.at[0] ? m2.left += p2 : "center" === u2.at[0] && (m2.left += p2 / 2), "bottom" === u2.at[1] ? m2.top += f2 : "center" === u2.at[1] && (m2.top += f2 / 2), d2 = D(w2.at, p2, f2), m2.left += d2[0], m2.top += d2[1], this.each(function() { 8212 var i2, t3, a2 = V(this), r2 = a2.outerWidth(), l2 = a2.outerHeight(), e3 = I(this, "marginLeft"), s2 = I(this, "marginTop"), n2 = r2 + e3 + I(this, "marginRight") + b2.width, o2 = l2 + s2 + I(this, "marginBottom") + b2.height, h2 = V.extend({}, m2), c2 = D(w2.my, a2.outerWidth(), a2.outerHeight()); 8213 "right" === u2.my[0] ? h2.left -= r2 : "center" === u2.my[0] && (h2.left -= r2 / 2), "bottom" === u2.my[1] ? h2.top -= l2 : "center" === u2.my[1] && (h2.top -= l2 / 2), h2.left += c2[0], h2.top += c2[1], i2 = { marginLeft: e3, marginTop: s2 }, V.each(["left", "top"], function(t4, e4) { 8214 V.ui.position[y2[t4]] && V.ui.position[y2[t4]][e4](h2, { targetWidth: p2, targetHeight: f2, elemWidth: r2, elemHeight: l2, collisionPosition: i2, collisionWidth: n2, collisionHeight: o2, offset: [d2[0] + c2[0], d2[1] + c2[1]], my: u2.my, at: u2.at, within: v2, elem: a2 }); 8215 }), u2.using && (t3 = function(t4) { 8216 var e4 = g2.left - h2.left, i3 = e4 + p2 - r2, s3 = g2.top - h2.top, n3 = s3 + f2 - l2, o3 = { target: { element: _2, left: g2.left, top: g2.top, width: p2, height: f2 }, element: { element: a2, left: h2.left, top: h2.top, width: r2, height: l2 }, horizontal: i3 < 0 ? "left" : 0 < e4 ? "right" : "center", vertical: n3 < 0 ? "top" : 0 < s3 ? "bottom" : "middle" }; 8217 p2 < r2 && k(e4 + i3) < p2 && (o3.horizontal = "center"), f2 < l2 && k(s3 + n3) < f2 && (o3.vertical = "middle"), x(k(e4), k(i3)) > x(k(s3), k(n3)) ? o3.important = "horizontal" : o3.important = "vertical", u2.using.call(this, t4, o3); 8218 }), a2.offset(V.extend(h2, { using: t3 })); 8219 }); 8220 }, V.ui.position = { fit: { left: function(t2, e2) { 8221 var i2 = e2.within, s2 = i2.isWindow ? i2.scrollLeft : i2.offset.left, n2 = i2.width, o2 = t2.left - e2.collisionPosition.marginLeft, a2 = s2 - o2, r2 = o2 + e2.collisionWidth - n2 - s2; 8222 e2.collisionWidth > n2 ? 0 < a2 && r2 <= 0 ? (i2 = t2.left + a2 + e2.collisionWidth - n2 - s2, t2.left += a2 - i2) : t2.left = !(0 < r2 && a2 <= 0) && r2 < a2 ? s2 + n2 - e2.collisionWidth : s2 : 0 < a2 ? t2.left += a2 : 0 < r2 ? t2.left -= r2 : t2.left = x(t2.left - o2, t2.left); 8223 }, top: function(t2, e2) { 8224 var i2 = e2.within, s2 = i2.isWindow ? i2.scrollTop : i2.offset.top, n2 = e2.within.height, o2 = t2.top - e2.collisionPosition.marginTop, a2 = s2 - o2, r2 = o2 + e2.collisionHeight - n2 - s2; 8225 e2.collisionHeight > n2 ? 0 < a2 && r2 <= 0 ? (i2 = t2.top + a2 + e2.collisionHeight - n2 - s2, t2.top += a2 - i2) : t2.top = !(0 < r2 && a2 <= 0) && r2 < a2 ? s2 + n2 - e2.collisionHeight : s2 : 0 < a2 ? t2.top += a2 : 0 < r2 ? t2.top -= r2 : t2.top = x(t2.top - o2, t2.top); 8226 } }, flip: { left: function(t2, e2) { 8227 var i2 = e2.within, s2 = i2.offset.left + i2.scrollLeft, n2 = i2.width, o2 = i2.isWindow ? i2.scrollLeft : i2.offset.left, a2 = t2.left - e2.collisionPosition.marginLeft, r2 = a2 - o2, l2 = a2 + e2.collisionWidth - n2 - o2, h2 = "left" === e2.my[0] ? -e2.elemWidth : "right" === e2.my[0] ? e2.elemWidth : 0, i2 = "left" === e2.at[0] ? e2.targetWidth : "right" === e2.at[0] ? -e2.targetWidth : 0, a2 = -2 * e2.offset[0]; 8228 r2 < 0 ? ((s2 = t2.left + h2 + i2 + a2 + e2.collisionWidth - n2 - s2) < 0 || s2 < k(r2)) && (t2.left += h2 + i2 + a2) : 0 < l2 && (0 < (o2 = t2.left - e2.collisionPosition.marginLeft + h2 + i2 + a2 - o2) || k(o2) < l2) && (t2.left += h2 + i2 + a2); 8229 }, top: function(t2, e2) { 8230 var i2 = e2.within, s2 = i2.offset.top + i2.scrollTop, n2 = i2.height, o2 = i2.isWindow ? i2.scrollTop : i2.offset.top, a2 = t2.top - e2.collisionPosition.marginTop, r2 = a2 - o2, l2 = a2 + e2.collisionHeight - n2 - o2, h2 = "top" === e2.my[1] ? -e2.elemHeight : "bottom" === e2.my[1] ? e2.elemHeight : 0, i2 = "top" === e2.at[1] ? e2.targetHeight : "bottom" === e2.at[1] ? -e2.targetHeight : 0, a2 = -2 * e2.offset[1]; 8231 r2 < 0 ? ((s2 = t2.top + h2 + i2 + a2 + e2.collisionHeight - n2 - s2) < 0 || s2 < k(r2)) && (t2.top += h2 + i2 + a2) : 0 < l2 && (0 < (o2 = t2.top - e2.collisionPosition.marginTop + h2 + i2 + a2 - o2) || k(o2) < l2) && (t2.top += h2 + i2 + a2); 8232 } }, flipfit: { left: function() { 8233 V.ui.position.flip.left.apply(this, arguments), V.ui.position.fit.left.apply(this, arguments); 8234 }, top: function() { 8235 V.ui.position.flip.top.apply(this, arguments), V.ui.position.fit.top.apply(this, arguments); 8236 } } }; 8237 var t; 8238 V.ui.position, V.extend(V.expr.pseudos, { data: V.expr.createPseudo ? V.expr.createPseudo(function(e2) { 8239 return function(t2) { 8240 return !!V.data(t2, e2); 8241 }; 8242 }) : function(t2, e2, i2) { 8243 return !!V.data(t2, i2[3]); 8244 } }), V.fn.extend({ disableSelection: (t = "onselectstart" in document.createElement("div") ? "selectstart" : "mousedown", function() { 8245 return this.on(t + ".ui-disableSelection", function(t2) { 8246 t2.preventDefault(); 8247 }); 8248 }), enableSelection: function() { 8249 return this.off(".ui-disableSelection"); 8250 } }); 8251 V.ui.focusable = function(t2, e2) { 8252 var i2, s2, n2, o2, a2 = t2.nodeName.toLowerCase(); 8253 return "area" === a2 ? (s2 = (i2 = t2.parentNode).name, !(!t2.href || !s2 || "map" !== i2.nodeName.toLowerCase()) && (0 < (s2 = V("img[usemap='#" + s2 + "']")).length && s2.is(":visible"))) : (/^(input|select|textarea|button|object)$/.test(a2) ? (n2 = !t2.disabled) && (o2 = V(t2).closest("fieldset")[0]) && (n2 = !o2.disabled) : n2 = "a" === a2 && t2.href || e2, n2 && V(t2).is(":visible") && function(t3) { 8254 var e3 = t3.css("visibility"); 8255 for (; "inherit" === e3; ) 8256 t3 = t3.parent(), e3 = t3.css("visibility"); 8257 return "visible" === e3; 8258 }(V(t2))); 8259 }, V.extend(V.expr.pseudos, { focusable: function(t2) { 8260 return V.ui.focusable(t2, null != V.attr(t2, "tabindex")); 8261 } }); 8262 var e, d; 8263 V.ui.focusable, V.fn._form = function() { 8264 return "string" == typeof this[0].form ? this.closest("form") : V(this[0].form); 8265 }, V.ui.formResetMixin = { _formResetHandler: function() { 8266 var e2 = V(this); 8267 setTimeout(function() { 8268 var t2 = e2.data("ui-form-reset-instances"); 8269 V.each(t2, function() { 8270 this.refresh(); 8271 }); 8272 }); 8273 }, _bindFormResetHandler: function() { 8274 var t2; 8275 this.form = this.element._form(), this.form.length && ((t2 = this.form.data("ui-form-reset-instances") || []).length || this.form.on("reset.ui-form-reset", this._formResetHandler), t2.push(this), this.form.data("ui-form-reset-instances", t2)); 8276 }, _unbindFormResetHandler: function() { 8277 var t2; 8278 this.form.length && ((t2 = this.form.data("ui-form-reset-instances")).splice(V.inArray(this, t2), 1), t2.length ? this.form.data("ui-form-reset-instances", t2) : this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")); 8279 } }; 8280 V.expr.pseudos || (V.expr.pseudos = V.expr[":"]), V.uniqueSort || (V.uniqueSort = V.unique), V.escapeSelector || (e = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g, d = function(t2, e2) { 8281 return e2 ? "\0" === t2 ? "\uFFFD" : t2.slice(0, -1) + "\\" + t2.charCodeAt(t2.length - 1).toString(16) + " " : "\\" + t2; 8282 }, V.escapeSelector = function(t2) { 8283 return (t2 + "").replace(e, d); 8284 }), V.fn.even && V.fn.odd || V.fn.extend({ even: function() { 8285 return this.filter(function(t2) { 8286 return t2 % 2 == 0; 8287 }); 8288 }, odd: function() { 8289 return this.filter(function(t2) { 8290 return t2 % 2 == 1; 8291 }); 8292 } }); 8293 V.ui.keyCode = { BACKSPACE: 8, COMMA: 188, DELETE: 46, DOWN: 40, END: 35, ENTER: 13, ESCAPE: 27, HOME: 36, LEFT: 37, PAGE_DOWN: 34, PAGE_UP: 33, PERIOD: 190, RIGHT: 39, SPACE: 32, TAB: 9, UP: 38 }, V.fn.labels = function() { 8294 var t2, e2, i2; 8295 return this.length ? this[0].labels && this[0].labels.length ? this.pushStack(this[0].labels) : (e2 = this.eq(0).parents("label"), (t2 = this.attr("id")) && (i2 = (i2 = this.eq(0).parents().last(
8295)).add((i2.length ? i2 : this).siblings()), t2 = "label[for='" + V.escapeSelector(t2) + "']", e2 = e2.add(i2.find(t2).addBack(t2))), this.pushStack(e2)) : this.pushStack([]); 8296 }, V.fn.scrollParent = function(t2) { 8297 var e2 = this.css("position"), i2 = "absolute" === e2, s2 = t2 ? /(auto|scroll|hidden)/ : /(auto|scroll)/, t2 = this.parents().filter(function() { 8298 var t3 = V(this); 8299 return (!i2 || "static" !== t3.css("position")) && s2.test(t3.css("overflow") + t3.css("overflow-y") + t3.css("overflow-x")); 8300 }).eq(0); 8301 return "fixed" !== e2 && t2.length ? t2 : V(this[0].ownerDocument || document); 8302 }, V.extend(V.expr.pseudos, { tabbable: function(t2) { 8303 var e2 = V.attr(t2, "tabindex"), i2 = null != e2; 8304 return (!i2 || 0 <= e2) && V.ui.focusable(t2, i2); 8305 } }), V.fn.extend({ uniqueId: (p = 0, function() { 8306 return this.each(function() { 8307 this.id || (this.id = "ui-id-" + ++p); 8308 }); 8309 }), removeUniqueId: function() { 8310 return this.each(function() { 8311 /^ui-id-\d+$/.test(this.id) && V(this).removeAttr("id"); 8312 }); 8313 } }), V.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()); 8314 var p, f = false;
8315 V(document).on("mouseup", function() { 8316 f = false; 8317 }); 8318 V.widget("ui.mouse", { version: "1.13.2", options: { cancel: "input, textarea, button, select, option", distance: 1, delay: 0 }, _mouseInit: function() { 8319 var e2 = this; 8320 this.element.on("mousedown." + this.widgetName, function(t2) { 8321 return e2._mouseDown(t2); 8322 }).on("click." + this.widgetName, function(t2) { 8323 if (true === V.data(t2.target, e2.widgetName + ".preventClickEvent")) 8324 return V.removeData(t2.target, e2.widgetName + ".preventClickEvent"), t2.stopImmediatePropagation(), false; 8325 }), this.started = false; 8326 }, _mouseDestroy: function() { 8327 this.element.off("." + this.widgetName), this._mouseMoveDelegate && this.document.off("mousemove." + this.widgetName, this._mouseMoveDelegate).off("mouseup." + this.widgetName, this._mouseUpDelegate); 8328 }, _mouseDown: function(t2) { 8329 if (!f) { 8330 this._mouseMoved = false, this._mouseStarted && this._mouseUp(t2), this._mouseDownEvent = t2; 8331 var e2 = this, i2 = 1 === t2.which, s2 = !("string" != typeof this.options.cancel || !t2.target.nodeName) && V(t2.target).closest(this.options.cancel).length; 8332 return i2 && !s2 && this._mouseCapture(t2) ? (this.mouseDelayMet = !this.options.delay, this.mouseDelayMet || (this._mouseDelayTimer = setTimeout(function() { 8333 e2.mouseDelayMet = true; 8334 }, this.options.delay)), this._mouseDistanceMet(t2) && this._mouseDelayMet(t2) && (this._mouseStarted = false !== this._mouseStart(t2), !this._mouseStarted) ? (t2.preventDefault(), true) : (true === V.data(t2.target, this.widgetName + ".preventClickEvent") && V.removeData(t2.target, this.widgetName + ".preventClickEvent"), this._mouseMoveDelegate = function(t3) { 8335 return e2._mouseMove(t3); 8336 }, this._mouseUpDelegate = function(t3) { 8337 return e2._mouseUp(t3); 8338 }, this.document.on("mousemove." + this.widgetName, this._mouseMoveDelegate).on("mouseup." + this.widgetName, this._mouseUpDelegate), t2.preventDefault(), f = true)) : true; 8339 } 8340 }, _mouseMove: function(t2) { 8341 if (this._mouseMoved) { 8342 if (V.ui.ie && (!document.documentMode || document.documentMode < 9) && !t2.button) 8343 return this._mouseUp(t2); 8344 if (!t2.which) { 8345 if (t2.originalEvent.altKey || t2.originalEvent.ctrlKey || t2.originalEvent.metaKey || t2.originalEvent.shiftKey) 8346 this.ignoreMissingWhich = true; 8347 else if (!this.ignoreMissingWhich) 8348 return this._mouseUp(t2); 8349 } 8350 } 8351 return (t2.which || t2.button) && (this._mouseMoved = true), this._mouseStarted ? (this._mouseDrag(t2), t2.preventDefault()) : (this._mouseDistanceMet(t2) && this._mouseDelayMet(t2) && (this._mouseStarted = false !== this._mouseStart(this._mouseDownEvent, t2), this._mouseStarted ? this._mouseDrag(t2) : this._mouseUp(t2)), !this._mouseStarted); 8352 }, _mouseUp: function(t2) { 8353 this.document.off("mousemove." + this.widgetName, this._mouseMoveDelegate).off("mouseup." + this.widgetName, this._mouseUpDelegate), this._mouseStarted && (this._mouseStarted = false, t2.target === this._mouseDownEvent.target && V.data(t2.target, this.widgetName + ".preventClickEvent", true), this._mouseStop(t2)), this._mouseDelayTimer && (clearTimeout(this._mouseDelayTimer), delete this._mouseDelayTimer), this.ignoreMissingWhich = false, f = false, t2.preventDefault(); 8354 }, _mouseDistanceMet: function(t2) { 8355 return Math.max(Math.abs(this._mouseDownEvent.pageX - t2.pageX), Math.abs(this._mouseDownEvent.pageY - t2.pageY)) >= this.options.distance; 8356 }, _mouseDelayMet: function() { 8357 return this.mouseDelayMet; 8358 }, _mouseStart: function() { 8359 }, _mouseDrag: function() { 8360 }, _mouseStop: function() { 8361 }, _mouseCapture: function() { 8362 return true; 8363 } }), V.ui.plugin = { add: function(t2, e2, i2) { 8364 var s2, n2 = V.ui[t2].prototype; 8365 for (s2 in i2) 8366 n2.plugins[s2] = n2.plugins[s2] || [], n2.plugins[s2].push([e2, i2[s2]]); 8367 }, call: function(t2, e2, i2, s2) { 8368 var n2, o2 = t2.plugins[e2]; 8369 if (o2 && (s2 || t2.element[0].parentNode && 11 !== t2.element[0].parentNode.nodeType)) 8370 for (n2 = 0; n2 < o2.length; n2++) 8371 t2.options[o2[n2][0]] && o2[n2][1].apply(t2.element, i2); 8372 } }, V.ui.safeActiveElement = function(e2) { 8373 var i2;
8374 try { 8375 i2 = e2.activeElement; 8376 } catch (t2) { 8377 i2 = e2.body; 8378 } 8379 return i2 = !(i2 = i2 || e2.body).nodeName ? e2.body : i2; 8380 }, V.ui.safeBlur = function(t2) { 8381 t2 && "body" !== t2.nodeName.toLowerCase() && V(t2).trigger("blur"); 8382 }; 8383 V.widget("ui.draggable", V.ui.mouse, { version: "1.13.2", widgetEventPrefix: "drag", options: { addClasses: true, appendTo: "parent", axis: false, connectToSortable: false, containment: false, cursor: "auto", cursorAt: false, grid: false, handle: false, helper: "original", iframeFix: false, opacity: false, refreshPositions: false, revert: false, revertDuration: 500, scope: "default", scroll: true, scrollSensitivity: 20, scrollSpeed: 20, snap: false, snapMode: "both", snapTolerance: 20, stack: false, zIndex: false, drag: null, start: null, stop: null }, _create: function() { 8384 "original" === this.options.helper && this._setPositionRelative(), this.options.addClasses && this._addClass("ui-draggable"), this._setHandleClassName(), this._mouseInit(); 8385 }, _setOption: function(t2, e2) { 8386 this._super(t2, e2), "handle" === t2 && (this._removeHandleClassName(), this._setHandleClassName()); 8387 }, _destroy: function() { 8388 (this.helper || this.element).is(".ui-draggable-dragging") ? this.destroyOnClear = true : (this._removeHandleClassName(), this._mouseDestroy()); 8389 }, _mouseCapture: function(t2) { 8390 var e2 = this.options; 8391 return !(this.helper || e2.disabled || 0 < V(t2.target).closest(".ui-resizable-handle").length) && (this.handle = this._getHandle(t2), !!this.handle && (this._blurActiveElement(t2), this._blockFrames(true === e2.iframeFix ? "iframe" : e2.iframeFix), true)); 8392 }, _blockFrames: function(t2) { 8393 this.iframeBlocks = this.document.find(t2).map(function() { 8394 var t3 = V(this); 8395 return V("<div>").css("position", "absolute").appendTo(t3.parent()).outerWidth(t3.outerWidth()).outerHeight(t3.outerHeight()).offset(t3.offset())[0]; 8396 }); 8397 }, _unblockFrames: function() { 8398 this.iframeBlocks && (this.iframeBlocks.remove(), delete this.iframeBlocks); 8399 }, _blurActiveElement: function(t2) { 8400 var e2 = V.ui.safeActiveElement(this.document[0]); 8401 V(t2.target).closest(e2).length || V.ui.safeBlur(e2); 8402 }, _mouseStart: function(t2) { 8403 var e2 = this.options; 8404 return this.helper = this._createHelper(t2), this._addClass(this.helper, "ui-draggable-dragging"), this._cacheHelperProportions(), V.ui.ddmanager && (V.ui.ddmanager.current = this), this._cacheMargins(), this.cssPosition = this.helper.css("position"), this.scrollParent = this.helper.scrollParent(true), this.offsetParent = this.helper.offsetParent(), this.hasFixedAncestor = 0 < this.helper.parents().filter(function() { 8405 return "fixed" === V(this).css("position"); 8406 }).length, this.positionAbs = this.element.offset(), this._refreshOffsets(t2), this.originalPosition = this.position = this._generatePosition(t2, false), this.originalPageX = t2.pageX, this.originalPageY = t2.pageY, e2.cursorAt && this._adjustOffsetFromHelper(e2.cursorAt), this._setContainment(), false === this._trigger("start", t2) ? (this._clear(), false) : (this._cacheHelperProportions(), V.ui.ddmanager && !e2.dropBehaviour && V.ui.ddmanager.prepareOffsets(this, t2), this._mouseDrag(t2, true), V.ui.ddmanager && V.ui.ddmanager.dragStart(this, t2), true); 8407 }, _refreshOffsets: function(t2) { 8408 this.offset = { top: this.positionAbs.top - this.margins.top, left: this.positionAbs.left - this.margins.left, scroll: false, parent: this._getParentOffset(), relative: this._getRelativeOffset() }, this.offset.click = { left: t2.pageX - this.offset.left, top: t2.pageY - this.offset.top }; 8409 }, _mouseDrag: function(t2, e2) { 8410 if (this.hasFixedAncestor && (this.offset.parent = this._getParentOffset()), this.position = this._generatePosition(t2, true), this.positionAbs = this._convertPositionTo("absolute"), !e2) { 8411 e2 = this._uiHash(); 8412 if (false === this._trigger("drag", t2, e2)) 8413 return this._mouseUp(new V.Event("mouseup", t2)), false; 8414 this.position = e2.position; 8415 } 8416 return this.helper[0].style.left = this.position.left + "px", this.helper[0].style.top = this.position.top + "px", V.ui.ddmanager && V.ui.ddmanager.drag(this, t2), false; 8417 }, _mouseStop: function(t2) { 8418 var e2 = this, i2 = false;
8419 return V.ui.ddmanager && !this.options.dropBehaviour && (i2 = V.ui.ddmanager.drop(this, t2)), this.dropped && (i2 = this.dropped, this.dropped = false), "invalid" === this.options.revert && !i2 || "valid" === this.options.revert && i2 || true === this.options.revert || "function" == typeof this.options.revert && this.options.revert.call(this.element, i2) ? V(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() { 8420 false !== e2._trigger("stop", t2) && e2._clear(); 8421 }) : false !== this._trigger("stop", t2) && this._clear(), false; 8422 }, _mouseUp: function(t2) { 8423 return this._unblockFrames(), V.ui.ddmanager && V.ui.ddmanager.dragStop(this, t2), this.handleElement.is(t2.target) && this.element.trigger("focus"), V.ui.mouse.prototype._mouseUp.call(this, t2); 8424 }, cancel: function() { 8425 return this.helper.is(".ui-draggable-dragging") ? this._mouseUp(new V.Event("mouseup", { target: this.element[0] })) : this._clear(), this; 8426 }, _getHandle: function(t2) { 8427 return !this.options.handle || !!V(t2.target).closest(this.element.find(this.options.handle)).length; 8428 }, _setHandleClassName: function() { 8429 this.handleElement = this.options.handle ? this.element.find(this.options.handle) : this.element, this._addClass(this.handleElement, "ui-draggable-handle"); 8430 }, _removeHandleClassName: function() { 8431 this._removeClass(this.handleElement, "ui-draggable-handle"); 8432 }, _createHelper: function(t2) { 8433 var e2 = this.options, i2 = "function" == typeof e2.helper, t2 = i2 ? V(e2.helper.apply(this.element[0], [t2])) : "clone" === e2.helper ? this.element.clone().removeAttr("id") : this.element; 8434 return t2.parents("body").length || t2.appendTo("parent" === e2.appendTo ? this.element[0].parentNode : e2.appendTo), i2 && t2[0] === this.element[0] && this._setPositionRelative(), t2[0] === this.element[0] || /(fixed|absolute)/.test(t2.css("position")) || t2.css("position", "absolute"), t2; 8435 }, _setPositionRelative: function() { 8436 /^(?:r|a|f)/.test(this.element.css("position")) || (this.element[0].style.position = "relative"); 8437 }, _adjustOffsetFromHelper: function(t2) { 8438 "string" == typeof t2 && (t2 = t2.split(" ")), "left" in (t2 = Array.isArray(t2) ? { left: +t2[0], top: +t2[1] || 0 } : t2) && (this.offset.click.left = t2.left + this.margins.left), "right" in t2 && (this.offset.click.left = this.helperProportions.width - t2.right + this.margins.left), "top" in t2 && (this.offset.click.top = t2.top + this.margins.top), "bottom" in t2 && (this.offset.click.top = this.helperProportions.height - t2.bottom + this.margins.top); 8439 }, _isRootNode: function(t2) { 8440 return /(html|body)/i.test(t2.tagName) || t2 === this.document[0]; 8441 }, _getParentOffset: function() { 8442 var t2 = this.offsetParent.offset(), e2 = this.document[0]; 8443 return "absolute" === this.cssPosition && this.scrollParent[0] !== e2 && V.contains(this.scrollParent[0], this.offsetParent[0]) && (t2.left += this.scrollParent.scrollLeft(), t2.top += this.scrollParent.scrollTop()), { top: (t2 = this._isRootNode(this.offsetParent[0]) ? { top: 0, left: 0 } : t2).top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), left: t2.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0) }; 8444 }, _getRelativeOffset: function() { 8445 if ("relative" !== this.cssPosition) 8446 return { top: 0, left: 0 }; 8447 var t2 = this.element.position(), e2 = this._isRootNode(this.scrollParent[0]); 8448 return { top: t2.top - (parseInt(this.helper.css("top"), 10) || 0) + (e2 ? 0 : this.scrollParent.scrollTop()), left: t2.left - (parseInt(this.helper.css("left"), 10) || 0) + (e2 ? 0 : this.scrollParent.scrollLeft()) }; 8449 }, _cacheMargins: function() { 8450 this.margins = { left: parseInt(this.element.css("marginLeft"), 10) || 0, top: parseInt(this.element.css("marginTop"), 10) || 0, right: parseInt(this.element.css("marginRight"), 10) || 0, bottom: parseInt(this.element.css("marginBottom"), 10) || 0 }; 8451 }, _cacheHelperProportions: function() { 8452 this.helperProportions = { width: this.helper.outerWidth(), height: this.helper.outerHeight() }; 8453 }, _setContainment: function() { 8454 var t2, e2, i2, s2 = this.options, n2 = this.document[0]; 8455 this.relativeContainer = null, s2.containment ? "window" !== s2.containment ? "document" !== s2.containment ? s2.containment.constructor !== Array ? ("parent" === s2.containment && (s2.containment = this.helper[0].parentNode), (i2 = (e2 = V(s2.containment))[0]) && (t2 = /(scroll|auto)/.test(e2.css("overflow")), this.containment = [(parseInt(e2.css("borderLeftWidth"), 10) || 0) + (parseInt(e2.css("paddingLeft"), 10) || 0), (parseInt(e2.css("borderTopWidth"), 10) || 0) + (parseInt(e2.css("paddingTop"), 10) || 0), (t2 ? Math.max(i2.scrollWidth, i2.offsetWidth) : i2.offsetWidth) - (parseInt(e2.css("borderRightWidth"), 10) || 0) - (parseInt(e2.css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, (t2 ? Math.max(i2.scrollHeight, i2.offsetHeight) : i2.offsetHeight) - (parseInt(e2.css("borderBottomWidth"), 10) || 0) - (parseInt(e2.css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom], this.relativeContainer = e2)) : this.containment = s2.containment : this.containment = [0, 0, V(n2).width() - this.helperProportions.width - this.margins.left, (V(n2).height() || n2.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top] : this.containment = [V(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, V(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, V(window).scrollLeft() + V(window).width() - this.helperProportions.width - this.margins.left, V(window).scrollTop() + (V(window).height() || n2.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top] : this.containment = null; 8456 }, _convertPositionTo: function(t2, e2) { 8457 e2 = e2 || this.position;
vendor: 2,803 bytes, lines 8458-8466
8458 var i2 = "absolute" === t2 ? 1 : -1, t2 = this._isRootNode(this.scrollParent[0]); 8459 return { top: e2.top + this.offset.relative.top * i2 + this.offset.parent.top * i2 - ("fixed" === this.cssPosition ? -this.offset.scroll.top : t2 ? 0 : this.offset.scroll.top) * i2, left: e2.left + this.offset.relative.left * i2 + this.offset.parent.left * i2 - ("fixed" === this.cssPosition ? -this.offset.scroll.left : t2 ? 0 : this.offset.scroll.left) * i2 }; 8460 }, _generatePosition: function(t2, e2) { 8461 var i2, s2 = this.options, n2 = this._isRootNode(this.scrollParent[0]), o2 = t2.pageX, a2 = t2.pageY; 8462 return n2 && this.offset.scroll || (this.offset.scroll = { top: this.scrollParent.scrollTop(), left: this.scrollParent.scrollLeft() }), e2 && (this.containment && (i2 = this.relativeContainer ? (i2 = this.relativeContainer.offset(), [this.containment[0] + i2.left, this.containment[1] + i2.top, this.containment[2] + i2.left, this.containment[3] + i2.top]) : this.containment, t2.pageX - this.offset.click.left < i2[0] && (o2 = i2[0] + this.offset.click.left), t2.pageY - this.offset.click.top < i2[1] && (a2 = i2[1] + this.offset.click.top), t2.pageX - this.offset.click.left > i2[2] && (o2 = i2[2] + this.offset.click.left), t2.pageY - this.offset.click.top > i2[3] && (a2 = i2[3] + this.offset.click.top)), s2.grid && (t2 = s2.grid[1] ? this.originalPageY + Math.round((a2 - this.originalPageY) / s2.grid[1]) * s2.grid[1] : this.originalPageY, a2 = !i2 || t2 - this.offset.click.top >= i2[1] || t2 - this.offset.click.top > i2[3] ? t2 : t2 - this.offset.click.top >= i2[1] ? t2 - s2.grid[1] : t2 + s2.grid[1], t2 = s2.grid[0] ? this.originalPageX + Math.round((o2 - this.originalPageX) / s2.grid[0]) * s2.grid[0] : this.originalPageX, o2 = !i2 || t2 - this.offset.click.left >= i2[0] || t2 - this.offset.click.left > i2[2] ? t2 : t2 - this.offset.click.left >= i2[0] ? t2 - s2.grid[0] : t2 + s2.grid[0]), "y" === s2.axis && (o2 = this.originalPageX), "x" === s2.axis && (a2 = this.originalPageY)), { top: a2 - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + ("fixed" === this.cssPosition ? -this.offset.scroll.top : n2 ? 0 : this.offset.scroll.top), left: o2 - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + ("fixed" === this.cssPosition ? -this.offset.scroll.left : n2 ? 0 : this.offset.scroll.left) }; 8463 }, _clear: function() { 8464 this._removeClass(this.helper, "ui-draggable-dragging"), this.helper[0] === this.element[0] || this.cancelHelperRemoval || this.helper.remove(), this.helper = null, this.cancelHelperRemoval = false, this.destroyOnClear && this.destroy(); 8465 }, _trigger: function(t2, e2, i2) { 8466 return i2 = i2 || this._uiHash(), V.ui.plugin.call(this, t2, [e2, i2, this], true), /^(drag|start|stop
8466)/.test(t2) && (this.positionAbs = this._convertPositionTo("absolute"), i2.offset = this.positionAbs), V.Widget.prototype._trigger.call(this, t2, e2, i2); 8467 }, plugins: {}, _uiHash: function() { 8468 return { helper: this.helper, position: this.position, originalPosition: this.originalPosition, offset: this.positionAbs }; 8469 } }), V.ui.plugin.add("draggable", "connectToSortable", { start: function(e2, t2, i2) { 8470 var s2 = V.extend({}, t2, { item: i2.element }); 8471 i2.sortables = [], V(i2.options.connectToSortable).each(function() { 8472 var t3 = V(this).sortable("instance"); 8473 t3 && !t3.options.disabled && (i2.sortables.push(t3), t3.refreshPositions(), t3._trigger("activate", e2, s2)); 8474 }); 8475 }, stop: function(e2, t2, i2) { 8476 var s2 = V.extend({}, t2, { item: i2.element }); 8477 i2.cancelHelperRemoval = false, V.each(i2.sortables, function() { 8478 var t3 = this; 8479 t3.isOver ? (t3.isOver = 0, i2.cancelHelperRemoval = true, t3.cancelHelperRemoval = false, t3._storedCSS = { position: t3.placeholder.css("position"), top: t3.placeholder.css("top"), left: t3.placeholder.css("left") }, t3._mouseStop(e2), t3.options.helper = t3.options._helper) : (t3.cancelHelperRemoval = true, t3._trigger("deactivate", e2, s2)); 8480 }); 8481 }, drag: function(i2, s2, n2) { 8482 V.each(n2.sortables, function() { 8483 var t2 = false, e2 = this; 8484 e2.positionAbs = n2.positionAbs, e2.helperProportions = n2.helperProportions, e2.offset.click = n2.offset.click, e2._intersectsWith(e2.containerCache) && (t2 = true, V.each(n2.sortables, function() { 8485 return this.positionAbs = n2.positionAbs, this.helperProportions = n2.helperProportions, this.offset.click = n2.offset.click, t2 = this !== e2 && this._intersectsWith(this.containerCache) && V.contains(e2.element[0], this.element[0]) ? false : t2; 8486 })), t2 ? (e2.isOver || (e2.isOver = 1, n2._parent = s2.helper.parent(), e2.currentItem = s2.helper.appendTo(e2.element).data("ui-sortable-item", true), e2.options._helper = e2.options.helper, e2.options.helper = function() { 8487 return s2.helper[0]; 8488 }, i2.target = e2.currentItem[0], e2._mouseCapture(i2, true), e2._mouseStart(i2, true, true), e2.offset.click.top = n2.offset.click.top, e2.offset.click.left = n2.offset.click.left, e2.offset.parent.left -= n2.offset.parent.left - e2.offset.parent.left, e2.offset.parent.top -= n2.offset.parent.top - e2.offset.parent.top, n2._trigger("toSortable", i2), n2.dropped = e2.element, V.each(n2.sortables, function() { 8489 this.refreshPositions(); 8490 }), n2.currentItem = n2.element, e2.fromOutside = n2), e2.currentItem && (e2._mouseDrag(i2), s2.position = e2.position)) : e2.isOver && (e2.isOver = 0, e2.cancelHelperRemoval = true, e2.options._revert = e2.options.revert, e2.options.revert = false, e2._trigger("out", i2, e2._uiHash(e2)), e2._mouseStop(i2, true), e2.options.revert = e2.options._revert, e2.options.helper = e2.options._helper, e2.placeholder && e2.placeholder.remove(), s2.helper.appendTo(n2._parent), n2._refreshOffsets(i2), s2.position = n2._generatePosition(i2, true), n2._trigger("fromSortable", i2), n2.dropped = false, V.each(n2.sortables, function() { 8491 this.refreshPositions(); 8492 })); 8493 }); 8494 } }), V.ui.plugin.add("draggable", "cursor", { start: function(t2, e2, i2) { 8495 var s2 = V("body"), i2 = i2.options; 8496 s2.css("cursor") && (i2._cursor = s2.css("cursor")), s2.css("cursor", i2.cursor); 8497 }, stop: function(t2, e2, i2) { 8498 i2 = i2.options; 8499 i2._cursor && V("body").css("cursor", i2._cursor); 8500 } }), V.ui.plugin.add("draggable", "opacity", { start: function(t2, e2, i2) { 8501 e2 = V(e2.helper), i2 = i2.options; 8502 e2.css("opacity") && (i2._opacity = e2.css("opacity")), e2.css("opacity", i2.opacity); 8503 }, stop: function(t2, e2, i2) { 8504 i2 = i2.options; 8505 i2._opacity && V(e2.helper).css("opacity", i2._opacity); 8506 } }), V.ui.plugin.add("draggable", "scroll", { start: function(t2, e2, i2) { 8507 i2.scrollParentNotHidden || (i2.scrollParentNotHidden = i2.helper.scrollParent(false)), i2.scrollParentNotHidden[0] !== i2.document[0] && "HTML" !== i2.scrollParentNotHidden[0].tagName && (i2.overflowOffset = i2.scrollParentNotHidden.offset()); 8508 }, drag: function(t2, e2, i2) { 8509 var s2 = i2.options, n2 = false, o2 = i2.scrollParentNotHidden[0], a2 = i2.document[0]; 8510 o2 !== a2 && "HTML" !== o2.tagName ? (s2.axis && "x" === s2.axis || (i2.overflowOffset.top + o2.offsetHeight - t2.pageY < s2.scrollSensitivity ? o2.scrollTop = n2 = o2.scrollTop + s2.scrollSpeed : t2.pageY - i2.overflowOffset.top < s2.scrollSensitivity && (o2.scrollTop = n2 = o2.scrollTop - s2.scrollSpeed)), s2.axis && "y" === s2.axis || (i2.overflowOffset.left + o2.offsetWidth - t2.pageX < s2.scrollSensitivity ? o2.scrollLeft = n2 = o2.scrollLeft + s2.scrollSpeed : t2.pageX - i2.overflowOffset.left < s2.scrollSensitivity && (o2.scrollLeft = n2 = o2.scrollLeft - s2.scrollSpeed))) : (s2.axis && "x" === s2.axis || (t2.pageY - V(a2).scrollTop() < s2.scrollSensitivity ? n2 = V(a2).scrollTop(V(a2).scrollTop() - s2.scrollSpeed) : V(window).height() - (t2.pageY - V(a2).scrollTop()) < s2.scrollSensitivity && (n2 = V(a2).scrollTop(V(a2).scrollTop() + s2.scrollSpeed))), s2.axis && "y" === s2.axis || (t2.pageX - V(a2).scrollLeft() < s2.scrollSensitivity ? n2 = V(a2).scrollLeft(V(a2).scrollLeft() - s2.scrollSpeed) : V(window).width() - (t2.pageX - V(a2).scrollLeft()) < s2.scrollSensitivity && (n2 = V(a2).scrollLeft(V(a2).scrollLeft() + s2.scrollSpeed)))), false !== n2 && V.ui.ddmanager && !s2.dropBehaviour && V.ui.ddmanager.prepareOffsets(i2, t2); 8511 } }), V.ui.plugin.add("draggable", "snap", { start: function(t2, e2, i2) { 8512 var s2 = i2.options; 8513 i2.snapElements = [], V(s2.snap.constructor !== String ? s2.snap.items || ":data(ui-draggable)" : s2.snap).each(function() { 8514 var t3 = V(this), e3 = t3.offset(); 8515 this !== i2.element[0] && i2.snapElements.push({ item: this, width: t3.outerWidth(), height: t3.outerHeight(), top: e3.top, left: e3.left }); 8516 }); 8517 }, drag: function(t2, e2, i2) { 8518 for (var s2, n2, o2, a2, r2, l2, h2, c2, u2, d2 = i2.options, p2 = d2.snapTolerance, f2 = e2.offset.left, g2 = f2 + i2.helperProportions.width, m2 = e2.offset.top, _2 = m2 + i2.helperProportions.height, v2 = i2.snapElements.length - 1; 0 <= v2; v2--) 8519 l2 = (r2 = i2.snapElements[v2].left - i2.margins.left) + i2.snapElements[v2].width, c2 = (h2 = i2.snapElements[v2].top - i2.margins.top) + i2.snapElements[v2].height, g2 < r2 - p2 || l2 + p2 < f2 || _2 < h2 - p2 || c2 + p2 < m2 || !V.contains(i2.snapElements[v2].item.ownerDocument, i2.snapElements[v2].item) ? (i2.snapElements[v2].snapping && i2.options.snap.release && i2.options.snap.release.call(i2.element, t2, V.extend(i2._uiHash(), { snapItem: i2.snapElements[v2].item }
8519)), i2.snapElements[v2].snapping = false) : ("inner" !== d2.snapMode && (s2 = Math.abs(h2 - _2) <= p2, n2 = Math.abs(c2 - m2) <= p2, o2 = Math.abs(r2 - g2) <= p2, a2 = Math.abs(l2 - f2) <= p2, s2 && (e2.position.top = i2._convertPositionTo("relative", { top: h2 - i2.helperProportions.height, left: 0 }).top), n2 && (e2.position.top = i2._convertPositionTo("relative", { top: c2, left: 0 }).top), o2 && (e2.position.left = i2._convertPositionTo("relative", { top: 0, left: r2 - i2.helperProportions.width }).left), a2 && (e2.position.left = i2._convertPositionTo("relative", { top: 0, left: l2 }).left)), u2 = s2 || n2 || o2 || a2, "outer" !== d2.snapMode && (s2 = Math.abs(h2 - m2) <= p2, n2 = Math.abs(c2 - _2) <= p2, o2 = Math.abs(r2 - f2) <= p2, a2 = Math.abs(l2 - g2) <= p2, s2 && (e2.position.top = i2._convertPositionTo("relative", { top: h2, left: 0 }).top), n2 && (e2.position.top = i2._convertPositionTo("relative", { top: c2 - i2.helperProportions.height, left: 0 }).top), o2 && (e2.position.left = i2._convertPositionTo("relative", { top: 0, left: r2 }).left), a2 && (e2.position.left = i2._convertPositionTo("relative", { top: 0, left: l2 - i2.helperProportions.width }).left)), !i2.snapElements[v2].snapping && (s2 || n2 || o2 || a2 || u2) && i2.options.snap.snap && i2.options.snap.snap.call(i2.element, t2, V.extend(i2._uiHash(), { snapItem: i2.snapElements[v2].item })), i2.snapElements[v2].snapping = s2 || n2 || o2 || a2 || u2); 8520 } }), V.ui.plugin.add("draggable", "stack", { start: function(t2, e2, i2) { 8521 var s2, i2 = i2.options, i2 = V.makeArray(V(i2.stack)).sort(function(t3, e3) { 8522 return (parseInt(V(t3).css("zIndex"), 10) || 0) - (parseInt(V(e3).css("zIndex"), 10) || 0); 8523 }); 8524 i2.length && (s2 = parseInt(V(i2[0]).css("zIndex"), 10) || 0, V(i2).each(function(t3) { 8525 V(this).css("zIndex", s2 + t3); 8526 }), this.css("zIndex", s2 + i2.length)); 8527 } }), V.ui.plugin.add("draggable", "zIndex", { start: function(t2, e2, i2) { 8528 e2 = V(e2.helper), i2 = i2.options; 8529 e2.css("zIndex") && (i2._zIndex = e2.css("zIndex")), e2.css("zIndex", i2.zIndex); 8530 }, stop: function(t2, e2, i2) { 8531 i2 = i2.options; 8532 i2._zIndex && V(e2.helper).css("zIndex", i2._zIndex); 8533 } }); 8534 V.ui.draggable; 8535 function g(t2, e2, i2) { 8536 return e2 <= t2 && t2 < e2 + i2; 8537 } 8538 V.widget("ui.droppable", { version: "1.13.2", widgetEventPrefix: "drop", options: { accept: "*", addClasses: true, greedy: false, scope: "default", tolerance: "intersect", activate: null, deactivate: null, drop: null, out: null, over: null }, _create: function() { 8539 var t2, e2 = this.options, i2 = e2.accept; 8540 this.isover = false, this.isout = true, this.accept = "function" == typeof i2 ? i2 : function(t3) { 8541 return t3.is(i2); 8542 }, this.proportions = function() { 8543 if (!arguments.length) 8544 return t2 = t2 || { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight }; 8545 t2 = arguments[0]; 8546 }, this._addToManager(e2.scope), e2.addClasses && this._addClass("ui-droppable"); 8547 }, _addToManager: function(t2) { 8548 V.ui.ddmanager.droppables[t2] = V.ui.ddmanager.droppables[t2] || [], V.ui.ddmanager.droppables[t2].push(this); 8549 }, _splice: function(t2) { 8550 for (var e2 = 0; e2 < t2.length; e2++) 8551 t2[e2] === this && t2.splice(e2, 1); 8552 }, _destroy: function() { 8553 var t2 = V.ui.ddmanager.droppables[this.options.scope]; 8554 this._splice(t2); 8555 }, _setOption: function(t2, e2) { 8556 var i2; 8557 "accept" === t2 ? this.accept = "function" == typeof e2 ? e2 : function(t3) { 8558 return t3.is(e2); 8559 } : "scope" === t2 && (i2 = V.ui.ddmanager.droppables[this.options.scope], this._splice(i2), this._addToManager(e2)), this._super(t2, e2); 8560 }, _activate: function(t2) { 8561 var e2 = V.ui.ddmanager.current; 8562 this._addActiveClass(), e2 && this._trigger("activate", t2, this.ui(e2)); 8563 }, _deactivate: function(t2) { 8564 var e2 = V.ui.ddmanager.current; 8565 this._removeActiveClass(), e2 && this._trigger("deactivate", t2, this.ui(e2)); 8566 }, _over: function(t2) { 8567 var e2 = V.ui.ddmanager.current; 8568 e2 && (e2.currentItem || e2.element)[0] !== this.element[0] && this.accept.call(this.element[0], e2.currentItem || e2.element) && (this._addHoverClass(), this._trigger("over", t2, this.ui(e2))); 8569 }, _out: function(t2) { 8570 var e2 = V.ui.ddmanager.current; 8571 e2 && (e2.currentItem || e2.element)[0] !== this.element[0] && this.accept.call(this.element[0], e2.currentItem || e2.element) && (this._removeHoverClass(), this._trigger("out", t2, this.ui(e2))); 8572 }, _drop: function(e2, t2) { 8573 var i2 = t2 || V.ui.ddmanager.current, s2 = false;
vendor: 4,630 bytes, lines 8574-8631
8574 return !(!i2 || (i2.currentItem || i2.element)[0] === this.element[0]) && (this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function() { 8575 var t3 = V(this).droppable("instance"); 8576 if (t3.options.greedy && !t3.options.disabled && t3.options.scope === i2.options.scope && t3.accept.call(t3.element[0], i2.currentItem || i2.element) && V.ui.intersect(i2, V.extend(t3, { offset: t3.element.offset() }), t3.options.tolerance, e2)) 8577 return !(s2 = true); 8578 }), !s2 && (!!this.accept.call(this.element[0], i2.currentItem || i2.element) && (this._removeActiveClass(), this._removeHoverClass(), this._trigger("drop", e2, this.ui(i2)), this.element))); 8579 }, ui: function(t2) { 8580 return { draggable: t2.currentItem || t2.element, helper: t2.helper, position: t2.position, offset: t2.positionAbs }; 8581 }, _addHoverClass: function() { 8582 this._addClass("ui-droppable-hover"); 8583 }, _removeHoverClass: function() { 8584 this._removeClass("ui-droppable-hover"); 8585 }, _addActiveClass: function() { 8586 this._addClass("ui-droppable-active"); 8587 }, _removeActiveClass: function() { 8588 this._removeClass("ui-droppable-active"); 8589 } }), V.ui.intersect = function(t2, e2, i2, s2) { 8590 if (!e2.offset) 8591 return false; 8592 var n2 = (t2.positionAbs || t2.position.absolute).left + t2.margins.left, o2 = (t2.positionAbs || t2.position.absolute).top + t2.margins.top, a2 = n2 + t2.helperProportions.width, r2 = o2 + t2.helperProportions.height, l2 = e2.offset.left, h2 = e2.offset.top, c2 = l2 + e2.proportions().width, u2 = h2 + e2.proportions().height; 8593 switch (i2) { 8594 case "fit": 8595 return l2 <= n2 && a2 <= c2 && h2 <= o2 && r2 <= u2; 8596 case "intersect": 8597 return l2 < n2 + t2.helperProportions.width / 2 && a2 - t2.helperProportions.width / 2 < c2 && h2 < o2 + t2.helperProportions.height / 2 && r2 - t2.helperProportions.height / 2 < u2; 8598 case "pointer": 8599 return g(s2.pageY, h2, e2.proportions().height) && g(s2.pageX, l2, e2.proportions().width); 8600 case "touch": 8601 return (h2 <= o2 && o2 <= u2 || h2 <= r2 && r2 <= u2 || o2 < h2 && u2 < r2) && (l2 <= n2 && n2 <= c2 || l2 <= a2 && a2 <= c2 || n2 < l2 && c2 < a2); 8602 default: 8603 return false; 8604 } 8605 }, !(V.ui.ddmanager = { current: null, droppables: { default: [] }, prepareOffsets: function(t2, e2) { 8606 var i2, s2, n2 = V.ui.ddmanager.droppables[t2.options.scope] || [], o2 = e2 ? e2.type : null, a2 = (t2.currentItem || t2.element).find(":data(ui-droppable)").addBack(); 8607 t: 8608 for (i2 = 0; i2 < n2.length; i2++) 8609 if (!(n2[i2].options.disabled || t2 && !n2[i2].accept.call(n2[i2].element[0], t2.currentItem || t2.element))) { 8610 for (s2 = 0; s2 < a2.length; s2++) 8611 if (a2[s2] === n2[i2].element[0]) { 8612 n2[i2].proportions().height = 0; 8613 continue t; 8614 } 8615 n2[i2].visible = "none" !== n2[i2].element.css("display"), n2[i2].visible && ("mousedown" === o2 && n2[i2]._activate.call(n2[i2], e2), n2[i2].offset = n2[i2].element.offset(), n2[i2].proportions({ width: n2[i2].element[0].offsetWidth, height: n2[i2].element[0].offsetHeight })); 8616 } 8617 }, drop: function(t2, e2) { 8618 var i2 = false; 8619 return V.each((V.ui.ddmanager.droppables[t2.options.scope] || []).slice(), function() { 8620 this.options && (!this.options.disabled && this.visible && V.ui.intersect(t2, this, this.options.tolerance, e2) && (i2 = this._drop.call(this, e2) || i2), !this.options.disabled && this.visible && this.accept.call(this.element[0], t2.currentItem || t2.element) && (this.isout = true, this.isover = false, this._deactivate.call(this, e2))); 8621 }), i2; 8622 }, dragStart: function(t2, e2) { 8623 t2.element.parentsUntil("body").on("scroll.droppable", function() { 8624 t2.options.refreshPositions || V.ui.ddmanager.prepareOffsets(t2, e2); 8625 }); 8626 }, drag: function(n2, o2) { 8627 n2.options.refreshPositions && V.ui.ddmanager.prepareOffsets(n2, o2), V.each(V.ui.ddmanager.droppables[n2.options.scope] || [], function() { 8628 var t2, e2, i2, s2; 8629 this.options.disabled || this.greedyChild || !this.visible || (s2 = !(i2 = V.ui.intersect(n2, this, this.options.tolerance, o2)) && this.isover ? "isout" : i2 && !this.isover ? "isover" : null) && (this.options.greedy && (e2 = this.options.scope, (i2 = this.element.parents(":data(ui-droppable)").filter(function() { 8630 return V(this).droppable("instance").options.scope === e2; 8631 })).length && ((t2 = V(i2[0]).droppable("instance")).greedyChild
8631= "isover" === s2)), t2 && "isover" === s2 && (t2.isover = false, t2.isout = true, t2._out.call(t2, o2)), this[s2] = true, this["isout" === s2 ? "isover" : "isout"] = false, this["isover" === s2 ? "_over" : "_out"].call(this, o2), t2 && "isout" === s2 && (t2.isout = false, t2.isover = true, t2._over.call(t2, o2))); 8632 }); 8633 }, dragStop: function(t2, e2) { 8634 t2.element.parentsUntil("body").off("scroll.droppable"), t2.options.refreshPositions || V.ui.ddmanager.prepareOffsets(t2, e2); 8635 } }) !== V.uiBackCompat && V.widget("ui.droppable", V.ui.droppable, { options: { hoverClass: false, activeClass: false }, _addActiveClass: function() { 8636 this._super(), this.options.activeClass && this.element.addClass(this.options.activeClass); 8637 }, _removeActiveClass: function() { 8638 this._super(), this.options.activeClass && this.element.removeClass(this.options.activeClass); 8639 }, _addHoverClass: function() { 8640 this._super(), this.options.hoverClass && this.element.addClass(this.options.hoverClass); 8641 }, _removeHoverClass: function() { 8642 this._super(), this.options.hoverClass && this.element.removeClass(this.options.hoverClass); 8643 } }); 8644 V.ui.droppable; 8645 V.widget("ui.resizable", V.ui.mouse, { version: "1.13.2", widgetEventPrefix: "resize", options: { alsoResize: false, animate: false, animateDuration: "slow", animateEasing: "swing", aspectRatio: false, autoHide: false, classes: { "ui-resizable-se": "ui-icon ui-icon-gripsmall-diagonal-se" }, containment: false, ghost: false, grid: false, handles: "e,s,se", helper: false, maxHeight: null, maxWidth: null, minHeight: 10, minWidth: 10, zIndex: 90, resize: null, start: null, stop: null }, _num: function(t2) { 8646 return parseFloat(t2) || 0; 8647 }, _isNumber: function(t2) { 8648 return !isNaN(parseFloat(t2)); 8649 }, _hasScroll: function(t2, e2) { 8650 if ("hidden" === V(t2).css("overflow")) 8651 return false; 8652 var i2 = e2 && "left" === e2 ? "scrollLeft" : "scrollTop", e2 = false; 8653 if (0 < t2[i2]) 8654 return true; 8655 try { 8656 t2[i2] = 1, e2 = 0 < t2[i2], t2[i2] = 0; 8657 } catch (t3) { 8658 } 8659 return e2; 8660 }, _create: function() { 8661 var t2, e2 = this.options, i2 = this; 8662 this._addClass("ui-resizable"), V.extend(this, { _aspectRatio: !!e2.aspectRatio, aspectRatio: e2.aspectRatio, originalElement: this.element, _proportionallyResizeElements: [], _helper: e2.helper || e2.ghost || e2.animate ? e2.helper || "ui-resizable-helper" : null }), this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i) && (this.element.wrap(V("<div class='ui-wrapper'></div>").css({ overflow: "hidden", position: this.element.css("position"), width: this.element.outerWidth(), height: this.element.outerHeight(), top: this.element.css("top"), left: this.element.css("left") })), this.element = this.element.parent().data("ui-resizable", this.element.resizable("instance")), this.elementIsWrapper = true, t2 = { marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom"), marginLeft: this.originalElement.css("marginLeft") }, this.element.css(t2), this.originalElement.css("margin", 0), this.originalResizeStyle = this.originalElement.css("resize"), this.originalElement.css("resize", "none"), this._proportionallyResizeElements.push(this.originalElement.css({ position: "static", zoom: 1, display: "block" })), this.originalElement.css(t2), this._proportionallyResize()), this._setupHandles(), e2.autoHide && V(this.element).on("mouseenter", function() { 8663 e2.disabled || (i2._removeClass("ui-resizable-autohide"), i2._handles.show()); 8664 }).on("mouseleave", function() { 8665 e2.disabled || i2.resizing || (i2._addClass("ui-resizable-autohide"), i2._handles.hide()); 8666 }), this._mouseInit(); 8667 }, _destroy: function() { 8668 this._mouseDestroy(), this._addedHandles.remove(); 8669 function t2(t3) { 8670 V(t3).removeData("resizable").removeData("ui-resizable").off(".resizable"); 8671 } 8672 var e2; 8673 return this.elementIsWrapper && (t2(this.element), e2 = this.element, this.originalElement.css({ position: e2.css("position"), width: e2.outerWidth(), height: e2.outerHeight(), top: e2.css("top"), left
vendor: 4,930 bytes, lines 8673-8708
8673: e2.css("left") }).insertAfter(e2), e2.remove()), this.originalElement.css("resize", this.originalResizeStyle), t2(this.originalElement), this; 8674 }, _setOption: function(t2, e2) { 8675 switch (this._super(t2, e2), t2) { 8676 case "handles": 8677 this._removeHandles(), this._setupHandles(); 8678 break; 8679 case "aspectRatio": 8680 this._aspectRatio = !!e2; 8681 } 8682 }, _setupHandles: function() { 8683 var t2, e2, i2, s2, n2, o2 = this.options, a2 = this; 8684 if (this.handles = o2.handles || (V(".ui-resizable-handle", this.element).length ? { n: ".ui-resizable-n", e: ".ui-resizable-e", s: ".ui-resizable-s", w: ".ui-resizable-w", se: ".ui-resizable-se", sw: ".ui-resizable-sw", ne: ".ui-resizable-ne", nw: ".ui-resizable-nw" } : "e,s,se"), this._handles = V(), this._addedHandles = V(), this.handles.constructor === String) 8685 for ("all" === this.handles && (this.handles = "n,e,s,w,se,sw,ne,nw"), i2 = this.handles.split(","), this.handles = {}, e2 = 0; e2 < i2.length; e2++) 8686 s2 = "ui-resizable-" + (t2 = String.prototype.trim.call(i2[e2])), n2 = V("<div>"), this._addClass(n2, "ui-resizable-handle " + s2), n2.css({ zIndex: o2.zIndex }), this.handles[t2] = ".ui-resizable-" + t2, this.element.children(this.handles[t2]).length || (this.element.append(n2), this._addedHandles = this._addedHandles.add(n2)); 8687 this._renderAxis = function(t3) { 8688 var e3, i3, s3; 8689 for (e3 in t3 = t3 || this.element, this.handles) 8690 this.handles[e3].constructor === String ? this.handles[e3] = this.element.children(this.handles[e3]).first().show() : (this.handles[e3].jquery || this.handles[e3].nodeType) && (this.handles[e3] = V(this.handles[e3]), this._on(this.handles[e3], { mousedown: a2._mouseDown })), this.elementIsWrapper && this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i) && (i3 = V(this.handles[e3], this.element), s3 = /sw|ne|nw|se|n|s/.test(e3) ? i3.outerHeight() : i3.outerWidth(), i3 = ["padding", /ne|nw|n/.test(e3) ? "Top" : /se|sw|s/.test(e3) ? "Bottom" : /^e$/.test(e3) ? "Right" : "Left"].join(""), t3.css(i3, s3), this._proportionallyResize()), this._handles = this._handles.add(this.handles[e3]); 8691 }, this._renderAxis(this.element), this._handles = this._handles.add(this.element.find(".ui-resizable-handle")), this._handles.disableSelection(), this._handles.on("mouseover", function() { 8692 a2.resizing || (this.className && (n2 = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)), a2.axis = n2 && n2[1] ? n2[1] : "se"); 8693 }), o2.autoHide && (this._handles.hide(), this._addClass("ui-resizable-autohide")); 8694 }, _removeHandles: function() { 8695 this._addedHandles.remove(); 8696 }, _mouseCapture: function(t2) { 8697 var e2, i2, s2 = false; 8698 for (e2 in this.handles) 8699 (i2 = V(this.handles[e2])[0]) !== t2.target && !V.contains(i2, t2.target) || (s2 = true); 8700 return !this.options.disabled && s2; 8701 }, _mouseStart: function(t2) { 8702 var e2, i2, s2 = this.options, n2 = this.element; 8703 return this.resizing = true, this._renderProxy(), e2 = this._num(this.helper.css("left")), i2 = this._num(this.helper.css("top")), s2.containment && (e2 += V(s2.containment).scrollLeft() || 0, i2 += V(s2.containment).scrollTop() || 0), this.offset = this.helper.offset(), this.position = { left: e2, top: i2 }, this.size = this._helper ? { width: this.helper.width(), height: this.helper.height() } : { width: n2.width(), height: n2.height() }, this.originalSize = this._helper ? { width: n2.outerWidth(), height: n2.outerHeight() } : { width: n2.width(), height: n2.height() }, this.sizeDiff = { width: n2.outerWidth() - n2.width(), height: n2.outerHeight() - n2.height() }, this.originalPosition = { left: e2, top: i2 }, this.originalMousePosition = { left: t2.pageX, top: t2.pageY }, this.aspectRatio = "number" == typeof s2.aspectRatio ? s2.aspectRatio : this.originalSize.width / this.originalSize.height || 1, s2 = V(".ui-resizable-" + this.axis).css("cursor"), V("body").css("cursor", "auto" === s2 ? this.axis + "-resize" : s2), this._addClass("ui-resizable-resizing"), this._propagate("start", t2), true; 8704 }, _mouseDrag: function(t2) { 8705 var e2 = this.originalMousePosition, i2 = this.axis, s2 = t2.pageX - e2.left || 0, e2 = t2.pageY - e2.top || 0, i2 = this._change[i2]; 8706 return this._updatePrevProperties(), i2 && (e2 = i2.apply(this, [t2, s2, e2]), this._updateVirtualBoundaries(t2.shiftKey), (this._aspectRatio || t2.shiftKey) && (e2 = this._updateRatio(e2, t2)), e2 = this._respectSize(e2, t2), this._updateCache(e2), this._propagate("resize", t2), e2 = this._applyChanges(), !this._helper && this._proportionallyResizeElements.length && this._proportionallyResize(), V.isEmptyObject(e2) || (this._updatePrevProperties(), this._trigger("resize", t2, this.ui()), this._applyChanges())), false; 8707 }, _mouseStop: function(t2) { 8708 this.resizing = false;
vendor: 8,361 bytes, lines 8709-8768
8709 var e2, i2, s2, n2 = this.options, o2 = this; 8710 return this._helper && (s2 = (e2 = (i2 = this._proportionallyResizeElements).length && /textarea/i.test(i2[0].nodeName)) && this._hasScroll(i2[0], "left") ? 0 : o2.sizeDiff.height, i2 = e2 ? 0 : o2.sizeDiff.width, e2 = { width: o2.helper.width() - i2, height: o2.helper.height() - s2 }, i2 = parseFloat(o2.element.css("left")) + (o2.position.left - o2.originalPosition.left) || null, s2 = parseFloat(o2.element.css("top")) + (o2.position.top - o2.originalPosition.top) || null, n2.animate || this.element.css(V.extend(e2, { top: s2, left: i2 })), o2.helper.height(o2.size.height), o2.helper.width(o2.size.width), this._helper && !n2.animate && this._proportionallyResize()), V("body").css("cursor", "auto"), this._removeClass("ui-resizable-resizing"), this._propagate("stop", t2), this._helper && this.helper.remove(), false; 8711 }, _updatePrevProperties: function() { 8712 this.prevPosition = { top: this.position.top, left: this.position.left }, this.prevSize = { width: this.size.width, height: this.size.height }; 8713 }, _applyChanges: function() { 8714 var t2 = {}; 8715 return this.position.top !== this.prevPosition.top && (t2.top = this.position.top + "px"), this.position.left !== this.prevPosition.left && (t2.left = this.position.left + "px"), this.size.width !== this.prevSize.width && (t2.width = this.size.width + "px"), this.size.height !== this.prevSize.height && (t2.height = this.size.height + "px"), this.helper.css(t2), t2; 8716 }, _updateVirtualBoundaries: function(t2) { 8717 var e2, i2, s2 = this.options, n2 = { minWidth: this._isNumber(s2.minWidth) ? s2.minWidth : 0, maxWidth: this._isNumber(s2.maxWidth) ? s2.maxWidth : 1 / 0, minHeight: this._isNumber(s2.minHeight) ? s2.minHeight : 0, maxHeight: this._isNumber(s2.maxHeight) ? s2.maxHeight : 1 / 0 }; 8718 (this._aspectRatio || t2) && (e2 = n2.minHeight * this.aspectRatio, i2 = n2.minWidth / this.aspectRatio, s2 = n2.maxHeight * this.aspectRatio, t2 = n2.maxWidth / this.aspectRatio, e2 > n2.minWidth && (n2.minWidth = e2), i2 > n2.minHeight && (n2.minHeight = i2), s2 < n2.maxWidth && (n2.maxWidth = s2), t2 < n2.maxHeight && (n2.maxHeight = t2)), this._vBoundaries = n2; 8719 }, _updateCache: function(t2) { 8720 this.offset = this.helper.offset(), this._isNumber(t2.left) && (this.position.left = t2.left), this._isNumber(t2.top) && (this.position.top = t2.top), this._isNumber(t2.height) && (this.size.height = t2.height), this._isNumber(t2.width) && (this.size.width = t2.width); 8721 }, _updateRatio: function(t2) { 8722 var e2 = this.position, i2 = this.size, s2 = this.axis; 8723 return this._isNumber(t2.height) ? t2.width = t2.height * this.aspectRatio : this._isNumber(t2.width) && (t2.height = t2.width / this.aspectRatio), "sw" === s2 && (t2.left = e2.left + (i2.width - t2.width), t2.top = null), "nw" === s2 && (t2.top = e2.top + (i2.height - t2.height), t2.left = e2.left + (i2.width - t2.width)), t2; 8724 }, _respectSize: function(t2) { 8725 var e2 = this._vBoundaries, i2 = this.axis, s2 = this._isNumber(t2.width) && e2.maxWidth && e2.maxWidth < t2.width, n2 = this._isNumber(t2.height) && e2.maxHeight && e2.maxHeight < t2.height, o2 = this._isNumber(t2.width) && e2.minWidth && e2.minWidth > t2.width, a2 = this._isNumber(t2.height) && e2.minHeight && e2.minHeight > t2.height, r2 = this.originalPosition.left + this.originalSize.width, l2 = this.originalPosition.top + this.originalSize.height, h2 = /sw|nw|w/.test(i2), i2 = /nw|ne|n/.test(i2); 8726 return o2 && (t2.width = e2.minWidth), a2 && (t2.height = e2.minHeight), s2 && (t2.width = e2.maxWidth), n2 && (t2.height = e2.maxHeight), o2 && h2 && (t2.left = r2 - e2.minWidth), s2 && h2 && (t2.left = r2 - e2.maxWidth), a2 && i2 && (t2.top = l2 - e2.minHeight), n2 && i2 && (t2.top = l2 - e2.maxHeight), t2.width || t2.height || t2.left || !t2.top ? t2.width || t2.height || t2.top || !t2.left || (t2.left = null) : t2.top = null, t2; 8727 }, _getPaddingPlusBorderDimensions: function(t2) { 8728 for (var e2 = 0, i2 = [], s2 = [t2.css("borderTopWidth"), t2.css("borderRightWidth"), t2.css("borderBottomWidth"), t2.css("borderLeftWidth")], n2 = [t2.css("paddingTop"), t2.css("paddingRight"), t2.css("paddingBottom"), t2.css("paddingLeft")]; e2 < 4; e2++) 8729 i2[e2] = parseFloat(s2[e2]) || 0, i2[e2] += parseFloat(n2[e2]) || 0; 8730 return { height: i2[0] + i2[2], width: i2[1] + i2[3] }; 8731 }, _proportionallyResize: function() { 8732 if (this._proportionallyResizeElements.length) 8733 for (var t2, e2 = 0, i2 = this.helper || this.element; e2 < this._proportionallyResizeElements.length; e2++) 8734 t2 = this._proportionallyResizeElements[e2], this.outerDimensions || (this.outerDimensions = this._getPaddingPlusBorderDimensions(t2)), t2.css({ height: i2.height() - this.outerDimensions.height || 0, width: i2.width() - this.outerDimensions.width || 0 }); 8735 }, _renderProxy: function() { 8736 var t2 = this.element, e2 = this.options; 8737 this.elementOffset = t2.offset(), this._helper ? (this.helper = this.helper || V("<div></div>").css({ overflow: "hidden" }), this._addClass(this.helper, this._helper), this.helper.css({ width: this.element.outerWidth(), height: this.element.outerHeight(), position: "absolute", left: this.elementOffset.left + "px", top: this.elementOffset.top + "px", zIndex: ++e2.zIndex }), this.helper.appendTo("body").disableSelection()) : this.helper = this.element; 8738 }, _change: { e: function(t2, e2) { 8739 return { width: this.originalSize.width + e2 }; 8740 }, w: function(t2, e2) { 8741 var i2 = this.originalSize; 8742 return { left: this.originalPosition.left + e2, width: i2.width - e2 }; 8743 }, n: function(t2, e2, i2) { 8744 var s2 = this.originalSize; 8745 return { top: this.originalPosition.top + i2, height: s2.height - i2 }; 8746 }, s: function(t2, e2, i2) { 8747 return { height: this.originalSize.height + i2 }; 8748 }, se: function(t2, e2, i2) { 8749 return V.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [t2, e2, i2])); 8750 }, sw: function(t2, e2, i2) { 8751 return V.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [t2, e2, i2])); 8752 }, ne: function(t2, e2, i2) { 8753 return V.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [t2, e2, i2])); 8754 }, nw: function(t2, e2, i2) { 8755 return V.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [t2, e2, i2])); 8756 } }, _propagate: function(t2, e2) { 8757 V.ui.plugin.call(this, t2, [e2, this.ui()]), "resize" !== t2 && this._trigger(t2, e2, this.ui()); 8758 }, plugins: {}, ui: function() { 8759 return { originalElement: this.originalElement, element: this.element, helper: this.helper, position: this.position, size: this.size, originalSize: this.originalSize, originalPosition: this.originalPosition }; 8760 } }), V.ui.plugin.add("resizable", "animate", { stop: function(e2) { 8761 var i2 = V(this).resizable("instance"), t2 = i2.options, s2 = i2._proportionallyResizeElements, n2 = s2.length && /textarea/i.test(s2[0].nodeName), o2 = n2 && i2._hasScroll(s2[0], "left") ? 0 : i2.sizeDiff.height, a2 = n2 ? 0 : i2.sizeDiff.width, n2 = { width: i2.size.width - a2, height: i2.size.height - o2 }, a2 = parseFloat(i2.element.css("left")) + (i2.position.left - i2.originalPosition.left) || null, o2 = parseFloat(i2.element.css("top")) + (i2.position.top - i2.originalPosition.top) || null; 8762 i2.element.animate(V.extend(n2, o2 && a2 ? { top: o2, left: a2 } : {}), { duration: t2.animateDuration, easing: t2.animateEasing, step: function() { 8763 var t3 = { width: parseFloat(i2.element.css("width")), height: parseFloat(i2.element.css("height")), top: parseFloat(i2.element.css("top")), left: parseFloat(i2.element.css("left")) }; 8764 s2 && s2.length && V(s2[0]).css({ width: t3.width, height: t3.height }), i2._updateCache(t3), i2._propagate("resize", e2); 8765 } }); 8766 } }), V.ui.plugin.add("resizable", "containment", { start: function() { 8767 var i2, s2, n2 = V(this).resizable("instance"), t2 = n2.options, e2 = n2.element, o2 = t2.containment, a2 = o2 instanceof V ? o2.get(0) : /parent/.test(o2) ? e2.parent().get(0) : o2; 8768 a2 && (n2.containerElement = V(a2), /document/.test(o2) || o2 === document ? (n2.containerOffset = { left: 0, top: 0 }, n2.containerPosition = { left: 0, top: 0 }
vendor: 6,282 bytes, lines 8768-8805
8768, n2.parentData = { element: V(document), left: 0, top: 0, width: V(document).width(), height: V(document).height() || document.body.parentNode.scrollHeight }) : (i2 = V(a2), s2 = [], V(["Top", "Right", "Left", "Bottom"]).each(function(t3, e3) { 8769 s2[t3] = n2._num(i2.css("padding" + e3)); 8770 }), n2.containerOffset = i2.offset(), n2.containerPosition = i2.position(), n2.containerSize = { height: i2.innerHeight() - s2[3], width: i2.innerWidth() - s2[1] }, t2 = n2.containerOffset, e2 = n2.containerSize.height, o2 = n2.containerSize.width, o2 = n2._hasScroll(a2, "left") ? a2.scrollWidth : o2, e2 = n2._hasScroll(a2) ? a2.scrollHeight : e2, n2.parentData = { element: a2, left: t2.left, top: t2.top, width: o2, height: e2 })); 8771 }, resize: function(t2) { 8772 var e2 = V(this).resizable("instance"), i2 = e2.options, s2 = e2.containerOffset, n2 = e2.position, o2 = e2._aspectRatio || t2.shiftKey, a2 = { top: 0, left: 0 }, r2 = e2.containerElement, t2 = true; 8773 r2[0] !== document && /static/.test(r2.css("position")) && (a2 = s2), n2.left < (e2._helper ? s2.left : 0) && (e2.size.width = e2.size.width + (e2._helper ? e2.position.left - s2.left : e2.position.left - a2.left), o2 && (e2.size.height = e2.size.width / e2.aspectRatio, t2 = false), e2.position.left = i2.helper ? s2.left : 0), n2.top < (e2._helper ? s2.top : 0) && (e2.size.height = e2.size.height + (e2._helper ? e2.position.top - s2.top : e2.position.top), o2 && (e2.size.width = e2.size.height * e2.aspectRatio, t2 = false), e2.position.top = e2._helper ? s2.top : 0), i2 = e2.containerElement.get(0) === e2.element.parent().get(0), n2 = /relative|absolute/.test(e2.containerElement.css("position")), i2 && n2 ? (e2.offset.left = e2.parentData.left + e2.position.left, e2.offset.top = e2.parentData.top + e2.position.top) : (e2.offset.left = e2.element.offset().left, e2.offset.top = e2.element.offset().top), n2 = Math.abs(e2.sizeDiff.width + (e2._helper ? e2.offset.left - a2.left : e2.offset.left - s2.left)), s2 = Math.abs(e2.sizeDiff.height + (e2._helper ? e2.offset.top - a2.top : e2.offset.top - s2.top)), n2 + e2.size.width >= e2.parentData.width && (e2.size.width = e2.parentData.width - n2, o2 && (e2.size.height = e2.size.width / e2.aspectRatio, t2 = false)), s2 + e2.size.height >= e2.parentData.height && (e2.size.height = e2.parentData.height - s2, o2 && (e2.size.width = e2.size.height * e2.aspectRatio, t2 = false)), t2 || (e2.position.left = e2.prevPosition.left, e2.position.top = e2.prevPosition.top, e2.size.width = e2.prevSize.width, e2.size.height = e2.prevSize.height); 8774 }, stop: function() { 8775 var t2 = V(this).resizable("instance"), e2 = t2.options, i2 = t2.containerOffset, s2 = t2.containerPosition, n2 = t2.containerElement, o2 = V(t2.helper), a2 = o2.offset(), r2 = o2.outerWidth() - t2.sizeDiff.width, o2 = o2.outerHeight() - t2.sizeDiff.height; 8776 t2._helper && !e2.animate && /relative/.test(n2.css("position")) && V(this).css({ left: a2.left - s2.left - i2.left, width: r2, height: o2 }), t2._helper && !e2.animate && /static/.test(n2.css("position")) && V(this).css({ left: a2.left - s2.left - i2.left, width: r2, height: o2 }); 8777 } }), V.ui.plugin.add("resizable", "alsoResize", { start: function() { 8778 var t2 = V(this).resizable("instance").options; 8779 V(t2.alsoResize).each(function() { 8780 var t3 = V(this); 8781 t3.data("ui-resizable-alsoresize", { width: parseFloat(t3.width()), height: parseFloat(t3.height()), left: parseFloat(t3.css("left")), top: parseFloat(t3.css("top")) }); 8782 }); 8783 }, resize: function(t2, i2) { 8784 var e2 = V(this).resizable("instance"), s2 = e2.options, n2 = e2.originalSize, o2 = e2.originalPosition, a2 = { height: e2.size.height - n2.height || 0, width: e2.size.width - n2.width || 0, top: e2.position.top - o2.top || 0, left: e2.position.left - o2.left || 0 }; 8785 V(s2.alsoResize).each(function() { 8786 var t3 = V(this), s3 = V(this).data("ui-resizable-alsoresize"), n3 = {}, e3 = t3.parents(i2.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"]; 8787 V.each(e3, function(t4, e4) { 8788 var i3 = (s3[e4] || 0) + (a2[e4] || 0); 8789 i3 && 0 <= i3 && (n3[e4] = i3 || null); 8790 }), t3.css(n3); 8791 }); 8792 }, stop: function() { 8793 V(this).removeData("ui-resizable-alsoresize"); 8794 } }), V.ui.plugin.add("resizable", "ghost", { start: function() { 8795 var t2 = V(this).resizable("instance"), e2 = t2.size; 8796 t2.ghost = t2.originalElement.clone(), t2.ghost.css({ opacity: 0.25, display: "block", position: "relative", height: e2.height, width: e2.width, margin: 0, left: 0, top: 0 }), t2._addClass(t2.ghost, "ui-resizable-ghost"), false !== V.uiBackCompat && "string" == typeof t2.options.ghost && t2.ghost.addClass(this.options.ghost), t2.ghost.appendTo(t2.helper); 8797 }, resize: function() { 8798 var t2 = V(this).resizable("instance"); 8799 t2.ghost && t2.ghost.css({ position: "relative", height: t2.size.height, width: t2.size.width }); 8800 }, stop: function() { 8801 var t2 = V(this).resizable("instance"); 8802 t2.ghost && t2.helper && t2.helper.get(0).removeChild(t2.ghost.get(0)); 8803 } }), V.ui.plugin.add("resizable", "grid", { resize: function() { 8804 var t2, e2 = V(this).resizable("instance"), i2 = e2.options, s2 = e2.size, n2 = e2.originalSize, o2 = e2.originalPosition, a2 = e2.axis, r2 = "number" == typeof i2.grid ? [i2.grid, i2.grid] : i2.grid, l2 = r2[0] || 1, h2 = r2[1] || 1, c2 = Math.round((s2.width - n2.width) / l2) * l2, u2 = Math.round((s2.height - n2.height) / h2) * h2, d2 = n2.width + c2, p2 = n2.height + u2, f2 = i2.maxWidth && i2.maxWidth < d2, g2 = i2.maxHeight && i2.maxHeight < p2, m2 = i2.minWidth && i2.minWidth > d2, s2 = i2.minHeight && i2.minHeight > p2; 8805 i2.grid = r2, m2 && (d2 += l2), s2 && (p2 += h2), f2 && (d2 -= l2), g2 && (p2 -= h2), /^(se|s|e)$/.test(a2) ? (e2.size.width = d2, e2.size.height = p2) : /^(ne)$/.test(a2) ? (e2.size.width = d2, e2.size.height = p2, e2.position.top = o2.top - u2) : /^(sw)$/.test(a2) ? (e2.size.width = d2, e2.size.height = p2, e2.position.left = o2.left - c2) : ((p2 - h2 <= 0 || d2 - l2 <= 0) && (t2 = e2._getPaddingPlusBorderDimensions(this)), 0 < p2 - h2 ? (e2.size.height = p2, e2.position.top = o2.top - u2) : (p2 = h2 - t2.he
8805ight, e2.size.height = p2, e2.position.top = o2.top + n2.height - p2), 0 < d2 - l2 ? (e2.size.width = d2, e2.position.left = o2.left - c2) : (d2 = l2 - t2.width, e2.size.width = d2, e2.position.left = o2.left + n2.width - d2)); 8806 } }); 8807 V.ui.resizable, V.widget("ui.selectable", V.ui.mouse, { version: "1.13.2", options: { appendTo: "body", autoRefresh: true, distance: 0, filter: "*", tolerance: "touch", selected: null, selecting: null, start: null, stop: null, unselected: null, unselecting: null }, _create: function() { 8808 var i2 = this; 8809 this._addClass("ui-selectable"), this.dragged = false, this.refresh = function() { 8810 i2.elementPos = V(i2.element[0]).offset(), i2.selectees = V(i2.options.filter, i2.element[0]), i2._addClass(i2.selectees, "ui-selectee"), i2.selectees.each(function() { 8811 var t2 = V(this), e2 = t2.offset(), e2 = { left: e2.left - i2.elementPos.left, top: e2.top - i2.elementPos.top }; 8812 V.data(this, "selectable-item", { element: this, $element: t2, left: e2.left, top: e2.top, right: e2.left + t2.outerWidth(), bottom: e2.top + t2.outerHeight(), startselected: false, selected: t2.hasClass("ui-selected"), selecting: t2.hasClass("ui-selecting"), unselecting: t2.hasClass("ui-unselecting") }); 8813 }); 8814 }, this.refresh(), this._mouseInit(), this.helper = V("<div>"), this._addClass(this.helper, "ui-selectable-helper"); 8815 }, _destroy: function() { 8816 this.selectees.removeData("selectable-item"), this._mouseDestroy(); 8817 }, _mouseStart: function(i2) { 8818 var s2 = this, t2 = this.options; 8819 this.opos = [i2.pageX, i2.pageY], this.elementPos = V(this.element[0]).offset(), this.options.disabled || (this.selectees = V(t2.filter, this.element[0]), this._trigger("start", i2), V(t2.appendTo).append(this.helper), this.helper.css({ left: i2.pageX, top: i2.pageY, width: 0, height: 0 }), t2.autoRefresh && this.refresh(), this.selectees.filter(".ui-selected").each(function() { 8820 var t3 = V.data(this, "selectable-item"); 8821 t3.startselected = true, i2.metaKey || i2.ctrlKey || (s2._removeClass(t3.$element, "ui-selected"), t3.selected = false, s2._addClass(t3.$element, "ui-unselecting"), t3.unselecting = true, s2._trigger("unselecting", i2, { unselecting: t3.element })); 8822 }), V(i2.target).parents().addBack().each(function() { 8823 var t3, e2 = V.data(this, "selectable-item"); 8824 if (e2) 8825 return t3 = !i2.metaKey && !i2.ctrlKey || !e2.$element.hasClass("ui-selected"), s2._removeClass(e2.$element, t3 ? "ui-unselecting" : "ui-selected")._addClass(e2.$element, t3 ? "ui-selecting" : "ui-unselecting"), e2.unselecting = !t3, e2.selecting = t3, (e2.selected = t3) ? s2._trigger("selecting", i2, { selecting: e2.element }) : s2._trigger("unselecting", i2, { unselecting: e2.element }), false; 8826 })); 8827 }, _mouseDrag: function(s2) { 8828 if (this.dragged = true, !this.options.disabled) { 8829 var t2, n2 = this, o2 = this.options, a2 = this.opos[0], r2 = this.opos[1], l2 = s2.pageX, h2 = s2.pageY; 8830 return l2 < a2 && (t2 = l2, l2 = a2, a2 = t2), h2 < r2 && (t2 = h2, h2 = r2, r2 = t2), this.helper.css({ left: a2, top: r2, width: l2 - a2, height: h2 - r2 }), this.selectees.each(function() { 8831 var t3 = V.data(this, "selectable-item"), e2 = false, i2 = {}; 8832 t3 && t3.element !== n2.element[0] && (i2.left = t3.left + n2.elementPos.left, i2.right = t3.right + n2.elementPos.left, i2.top = t3.top + n2.elementPos.top, i2.bottom = t3.bottom + n2.elementPos.top, "touch" === o2.tolerance ? e2 = !(i2.left > l2 || i2.right < a2 || i2.top > h2 || i2.bottom < r2) : "fit" === o2.tolerance && (e2 = i2.left > a2 && i2.right < l2 && i2.top > r2 && i2.bottom < h2), e2 ? (t3.selected && (n2._removeClass(t3.$element, "ui-selected"), t3.selected = false), t3.unselecting && (n2._removeClass(t3.$element, "ui-unselecting"), t3.unselecting = false), t3.selecting || (n2._addClass(t3.$element, "ui-selecting"), t3.selecting = true, n2._trigger("selecting", s2, { selecting: t3.element }))) : (t3.selecting && ((s2.metaKey || s2.ctrlKey) && t3.startselected ? (n2._removeClass(t3.$element, "ui-selecting"), t3.selecting = false, n2._addClass(t3.$element, "ui-selected"), t3.selected = true) : (n2._removeClass(t3.$element, "ui-selecting"), t3.selecting = false, t3.startselected && (n2._addClass(t3.$element, "ui-unselecting"), t3.unselecting = true), n2._trigger("unselecting", s2, { unselecting: t3.element }))), t3.selected && (s2.metaKey || s2.ctrlKey || t3.startselected || (n2._removeClass(t3.$element, "ui-selected"), t3.selected = false, n2._addClass(t3.$element, "ui-unselecting"), t3.unselecting = true, n2._trigger("unselecting", s2, { unselecting: t3.element }))))); 8833 }), false; 8834 } 8835 }, _mouseStop: function(e2) { 8836 var i2 = this; 8837 return this.dragged = false, V(".ui-unselecting", this.element[0]).each(function() { 8838 var t2 = V.data(this, "selectable-item"); 8839 i2._removeClass(t2.$element, "ui-unselecting"), t2.unselecting = false, t2.startselected = false, i2._trigger("unselected", e2, { unselected: t2.element }); 8840 }), V(".ui-selecting", this.element[0]).each(function() { 8841 var t2 = V.data(this, "selectable-item"); 8842 i2._removeClass(t2.$element, "ui-selecting")._addClass(t2.$element, "ui-selected"), t2.selecting = false, t2.selected = true, t2.startselected = true, i2._trigger("selected", e2, { selected: t2.element }); 8843 }), this._trigger("stop", e2), this.helper.remove(), false; 8844 } }), V.widget("ui.sortable", V.ui.mouse, { version: "1.13.2", widgetEventPrefix: "sort", ready: false, options: { appendTo: "parent", axis: false, connectWith: false, containment: false, cursor: "auto", cursorAt: false, dropOnEmpty: true, forcePlaceholderSize: false, forceHelperSize: false, grid: false, handle: false, helper: "original", items: "> *", opacity: false, placeholder: false, revert: false, scroll: true, scrollSensitivity: 20, scrollSpeed: 20, scope: "default", tolerance: "intersect", zIndex: 1e3, activate: null, beforeStop: null, change: null, deactivate: null, out: null, over: null, receive: null, remove: null, sort: null, start: null, stop: null, update: null }, _isOverAxis: function(t2, e2, i2) { 8845 return e2 <= t2 && t2 < e2 + i2; 8846 }, _isFloating: function(t2) { 8847 return /left|right/.test(t2.css("float")) || /inline|table-cell/.test(t2.css("display")); 8848 }, _create: function() { 8849 this.containerCache = {}, this._addClass("ui-sortable"), this.refresh(), this.offset = this.element.offset(), this._mouseInit(), this._setHandleClassName(), this.ready = true; 8850 }, _setOption: function(t2, e2) { 8851 this._super(t2, e2), "handle" === t2 && this._setHandleClassName(); 8852 }, _setHandleClassName: function() { 8853 var t2 = this; 8854 this._removeClass(this.element.find(".ui-sortable-handle"), "ui-sortable-handle"), V.each(this.items, function() { 8855 t2._addClass(this.instance.options.handle ? this.item.find(this.instance.options.handle) : this.item, "ui-sortable-handle"); 8856 }); 8857 }, _destroy: function() { 8858 this._mouseDestroy(); 8859 for (var t2 = this.items.length - 1; 0 <= t2; t2--) 8860 this.items[t2].item.removeData(this.widgetName + "-item"); 8861 return this; 8862 }, _mouseCapture: function(t2, e2) { 8863 var i2 = null, s2 = false, n2 = this; 8864 return !this.reverting && (!this.options.disabled && "static" !== this.options.type && (this._refreshItems(t2), V(t2.target).parents().each(function() { 8865 if (V.data(this, n2.widgetName + "-item") === n2) 8866 return i2 = V(this), false; 8867 }), !!(i2 = V.data(t2.target, n2.widgetName + "-item") === n2 ? V(t2.target) : i2) && (!(this.options.handle && !e2 && (V(this.options.handle, i2).find("*").addBack().each(function() { 8868 this === t2.target && (s2 = true); 8869 }), !s2)) && (this.currentItem = i2, this._removeCurrentsFromItems(), true)))); 8870 }, _mouseStart: function(t2, e2, i2) { 8871 var s2, n2, o2 = this.options; 8872 if ((this.currentContainer = this).refreshPositions(), this.appendTo = V("parent" !== o2.appendTo ? o2.appendTo : this.currentItem.parent()), this.helper = this._createHelper(t2), this._cacheHelperProportions(), this._cacheMargins(), this.offset = this.currentItem.offset(), this.offset = { top: this.offset.top - this.margins.top, left: this.offset.left - this.margins.left }, V.extend(this.offset, { click: { left: t2.pageX - this.offset.left, top: t2.pageY - this.offset.top }, relative: this._getRelativeOffset() }), this.helper.css("position", "absolute"), this.cssPosition = this.helper.css("position"), o2.cursorAt && this._adjustOffsetFromHelper(o2.cursorAt), this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] }, this.helper[0] !== this.currentItem[0] && this.currentItem.hide(), this._createPlaceholder(), this.scrollParent = this.placeholder.scrollParent(), V.extend(this.offset, { parent: this._getParentOffset() }), o2.containment && this._setContainment(), o2.cursor && "auto" !== o2.cursor && (n2 = this.document.find("body"), this.storedCursor = n2.css("cursor"), n2.css("cursor", o2.cursor), this.storedStylesheet = V("<style>*{ cursor: " + o2.cursor + " !important; }</style>").appendTo(n2)), o2.zIndex && (this.helper.css("zIndex") && (this._storedZIndex = this.helper.css("zIndex")), this.helper.css("zIndex", o2.zIndex)), o2.opacity && (this.helper.css("opacity") && (this._storedOpacity = this.helper.css("opacity")), this.helper.css("opacity", o2.opacity)), this.scrollParent[0] !== this.document[0] && "HTML" !== this.scrollParent[0].tagName && (this.overflowOffset = this.scrollParent.offset()), this._trigger("start", t2, this._uiHash()), this._preserveHelperProportions || this._cacheHelperProportions(), !i2) 8873 for (s2 = this.containers.length - 1; 0 <= s2; s2--) 8874 this.containers[s2]._trigger("activate", t2, this._uiHash(this)); 8875 return V.ui.ddmanager && (V.ui.ddmanager.current = this), V.ui.ddmanager && !o2.dropBehaviour && V.ui.ddmanager.prepareOffsets(this, t2), this.dragging = true, this._addClass(this.helper, "ui-sortable-helper"), this.helper.parent().is(this.appendTo) || (this.helper.detach().appendTo(this.appendTo), this.offset.parent = this._getParentOffset()), this.position = this.originalPosition = this._generatePosition(t2), this.originalPageX = t2.pageX, this.originalPageY = t2.pageY, this.lastPositionAbs = this.positionAbs = this._convertPositionTo("absolute"), this._mouseDrag(t2), true; 8876 }, _scroll: function(t2) { 8877 var e2 = this.options, i2 = false;
vendor: 6,878 bytes, lines 8878-8920
8878 return this.scrollParent[0] !== this.document[0] && "HTML" !== this.scrollParent[0].tagName ? (this.overflowOffset.top + this.scrollParent[0].offsetHeight - t2.pageY < e2.scrollSensitivity ? this.scrollParent[0].scrollTop = i2 = this.scrollParent[0].scrollTop + e2.scrollSpeed : t2.pageY - this.overflowOffset.top < e2.scrollSensitivity && (this.scrollParent[0].scrollTop = i2 = this.scrollParent[0].scrollTop - e2.scrollSpeed), this.overflowOffset.left + this.scrollParent[0].offsetWidth - t2.pageX < e2.scrollSensitivity ? this.scrollParent[0].scrollLeft = i2 = this.scrollParent[0].scrollLeft + e2.scrollSpeed : t2.pageX - this.overflowOffset.left < e2.scrollSensitivity && (this.scrollParent[0].scrollLeft = i2 = this.scrollParent[0].scrollLeft - e2.scrollSpeed)) : (t2.pageY - this.document.scrollTop() < e2.scrollSensitivity ? i2 = this.document.scrollTop(this.document.scrollTop() - e2.scrollSpeed) : this.window.height() - (t2.pageY - this.document.scrollTop()) < e2.scrollSensitivity && (i2 = this.document.scrollTop(this.document.scrollTop() + e2.scrollSpeed)), t2.pageX - this.document.scrollLeft() < e2.scrollSensitivity ? i2 = this.document.scrollLeft(this.document.scrollLeft() - e2.scrollSpeed) : this.window.width() - (t2.pageX - this.document.scrollLeft()) < e2.scrollSensitivity && (i2 = this.document.scrollLeft(this.document.scrollLeft() + e2.scrollSpeed))), i2; 8879 }, _mouseDrag: function(t2) { 8880 var e2, i2, s2, n2, o2 = this.options; 8881 for (this.position = this._generatePosition(t2), this.positionAbs = this._convertPositionTo("absolute"), this.options.axis && "y" === this.options.axis || (this.helper[0].style.left = this.position.left + "px"), this.options.axis && "x" === this.options.axis || (this.helper[0].style.top = this.position.top + "px"), o2.scroll && false !== this._scroll(t2) && (this._refreshItemPositions(true), V.ui.ddmanager && !o2.dropBehaviour && V.ui.ddmanager.prepareOffsets(this, t2)), this.dragDirection = { vertical: this._getDragVerticalDirection(), horizontal: this._getDragHorizontalDirection() }, e2 = this.items.length - 1; 0 <= e2; e2--) 8882 if (s2 = (i2 = this.items[e2]).item[0], (n2 = this._intersectsWithPointer(i2)) && i2.instance === this.currentContainer && !(s2 === this.currentItem[0] || this.placeholder[1 === n2 ? "next" : "prev"]()[0] === s2 || V.contains(this.placeholder[0], s2) || "semi-dynamic" === this.options.type && V.contains(this.element[0], s2))) { 8883 if (this.direction = 1 === n2 ? "down" : "up", "pointer" !== this.options.tolerance && !this._intersectsWithSides(i2)) 8884 break; 8885 this._rearrange(t2, i2), this._trigger("change", t2, this._uiHash()); 8886 break; 8887 } 8888 return this._contactContainers(t2), V.ui.ddmanager && V.ui.ddmanager.drag(this, t2), this._trigger("sort", t2, this._uiHash()), this.lastPositionAbs = this.positionAbs, false; 8889 }, _mouseStop: function(t2, e2) { 8890 var i2, s2, n2, o2; 8891 if (t2) 8892 return V.ui.ddmanager && !this.options.dropBehaviour && V.ui.ddmanager.drop(this, t2), this.options.revert ? (s2 = (i2 = this).placeholder.offset(), o2 = {}, (n2 = this.options.axis) && "x" !== n2 || (o2.left = s2.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollLeft)), n2 && "y" !== n2 || (o2.top = s2.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollTop)), this.reverting = true, V(this.helper).animate(o2, parseInt(this.options.revert, 10) || 500, function() { 8893 i2._clear(t2); 8894 })) : this._clear(t2, e2), false; 8895 }, cancel: function() { 8896 if (this.dragging) { 8897 this._mouseUp(new V.Event("mouseup", { target: null })), "original" === this.options.helper ? (this.currentItem.css(this._storedCSS), this._removeClass(this.currentItem, "ui-sortable-helper")) : this.currentItem.show(); 8898 for (var t2 = this.containers.length - 1; 0 <= t2; t2--) 8899 this.containers[t2]._trigger("deactivate", null, this._uiHash(this)), this.containers[t2].containerCache.over && (this.containers[t2]._trigger("out", null, this._uiHash(this)), this.containers[t2].containerCache.over = 0); 8900 } 8901 return this.placeholder && (this.placeholder[0].parentNode && this.placeholder[0].parentNode.removeChild(this.placeholder[0]), "original" !== this.options.helper && this.helper && this.helper[0].parentNode && this.helper.remove(), V.extend(this, { helper: null, dragging: false, reverting: false, _noFinalSort: null }), this.domPosition.prev ? V(this.domPosition.prev).after(this.currentItem) : V(this.domPosition.parent).prepend(this.currentItem)), this; 8902 }, serialize: function(e2) { 8903 var t2 = this._getItemsAsjQuery(e2 && e2.connected), i2 = []; 8904 return e2 = e2 || {}, V(t2).each(function() { 8905 var t3 = (V(e2.item || this).attr(e2.attribute || "id") || "").match(e2.expression || /(.+)[\-=_](.+)/); 8906 t3 && i2.push((e2.key || t3[1] + "[]") + "=" + (e2.key && e2.expression ? t3[1] : t3[2])); 8907 }), !i2.length && e2.key && i2.push(e2.key + "="), i2.join("&"); 8908 }, toArray: function(t2) { 8909 var e2 = this._getItemsAsjQuery(t2 && t2.connected), i2 = []; 8910 return t2 = t2 || {}, e2.each(function() { 8911 i2.push(V(t2.item || this).attr(t2.attribute || "id") || ""); 8912 }), i2; 8913 }, _intersectsWith: function(t2) { 8914 var e2 = this.positionAbs.left, i2 = e2 + this.helperProportions.width, s2 = this.positionAbs.top, n2 = s2 + this.helperProportions.height, o2 = t2.left, a2 = o2 + t2.width, r2 = t2.top, l2 = r2 + t2.height, h2 = this.offset.click.top, c2 = this.offset.click.left, h2 = "x" === this.options.axis || r2 < s2 + h2 && s2 + h2 < l2, c2 = "y" === this.options.axis || o2 < e2 + c2 && e2 + c2 < a2; 8915 return "pointer" === this.options.tolerance || this.options.forcePointerForContainers || "pointer" !== this.options.tolerance && this.helperProportions[this.floating ? "width" : "height"] > t2[this.floating ? "width" : "height"] ? h2 && c2 : o2 < e2 + this.helperProportions.width / 2 && i2 - this.helperProportions.width / 2 < a2 && r2 < s2 + this.helperProportions.height / 2 && n2 - this.helperProportions.height / 2 < l2; 8916 }, _intersectsWithPointer: function(t2) { 8917 var e2 = "x" === this.options.axis || this._isOverAxis(this.positionAbs.top + this.offset.click.top, t2.top, t2.height), t2 = "y" === this.options.axis || this._isOverAxis(this.positionAbs.left + this.offset.click.left, t2.left, t2.width); 8918 return !(!e2 || !t2) && (e2 = this.dragDirection.vertical, t2 = this.dragDirection.horizontal, this.floating ? "right" === t2 || "down" === e2 ? 2 : 1 : e2 && ("down" === e2 ? 2 : 1)); 8919 }, _intersectsWithSides: function(t2) { 8920 var e2 = this._isOverAxis(this.positionAbs.top + this.offset.click.top, t2.top + t2.he
vendor: 5,444 bytes, lines 8920-8980
8920ight / 2, t2.height), i2 = this._isOverAxis(this.positionAbs.left + this.offset.click.left, t2.left + t2.width / 2, t2.width), s2 = this.dragDirection.vertical, t2 = this.dragDirection.horizontal; 8921 return this.floating && t2 ? "right" === t2 && i2 || "left" === t2 && !i2 : s2 && ("down" === s2 && e2 || "up" === s2 && !e2); 8922 }, _getDragVerticalDirection: function() { 8923 var t2 = this.positionAbs.top - this.lastPositionAbs.top; 8924 return 0 != t2 && (0 < t2 ? "down" : "up"); 8925 }, _getDragHorizontalDirection: function() { 8926 var t2 = this.positionAbs.left - this.lastPositionAbs.left; 8927 return 0 != t2 && (0 < t2 ? "right" : "left"); 8928 }, refresh: function(t2) { 8929 return this._refreshItems(t2), this._setHandleClassName(), this.refreshPositions(), this; 8930 }, _connectWith: function() { 8931 var t2 = this.options; 8932 return t2.connectWith.constructor === String ? [t2.connectWith] : t2.connectWith; 8933 }, _getItemsAsjQuery: function(t2) { 8934 var e2, i2, s2, n2, o2 = [], a2 = [], r2 = this._connectWith(); 8935 if (r2 && t2) 8936 for (e2 = r2.length - 1; 0 <= e2; e2--) 8937 for (i2 = (s2 = V(r2[e2], this.document[0])).length - 1; 0 <= i2; i2--) 8938 (n2 = V.data(s2[i2], this.widgetFullName)) && n2 !== this && !n2.options.disabled && a2.push(["function" == typeof n2.options.items ? n2.options.items.call(n2.element) : V(n2.options.items, n2.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), n2]); 8939 function l2() { 8940 o2.push(this); 8941 } 8942 for (a2.push(["function" == typeof this.options.items ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : V(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]), e2 = a2.length - 1; 0 <= e2; e2--) 8943 a2[e2][0].each(l2); 8944 return V(o2); 8945 }, _removeCurrentsFromItems: function() { 8946 var i2 = this.currentItem.find(":data(" + this.widgetName + "-item)"); 8947 this.items = V.grep(this.items, function(t2) { 8948 for (var e2 = 0; e2 < i2.length; e2++) 8949 if (i2[e2] === t2.item[0]) 8950 return false; 8951 return true; 8952 }); 8953 }, _refreshItems: function(t2) { 8954 this.items = [], this.containers = [this]; 8955 var e2, i2, s2, n2, o2, a2, r2, l2, h2 = this.items, c2 = [["function" == typeof this.options.items ? this.options.items.call(this.element[0], t2, { item: this.currentItem }) : V(this.options.items, this.element), this]], u2 = this._connectWith(); 8956 if (u2 && this.ready) 8957 for (e2 = u2.length - 1; 0 <= e2; e2--) 8958 for (i2 = (s2 = V(u2[e2], this.document[0])).length - 1; 0 <= i2; i2--) 8959 (n2 = V.data(s2[i2], this.widgetFullName)) && n2 !== this && !n2.options.disabled && (c2.push(["function" == typeof n2.options.items ? n2.options.items.call(n2.element[0], t2, { item: this.currentItem }) : V(n2.options.items, n2.element), n2]), this.containers.push(n2)); 8960 for (e2 = c2.length - 1; 0 <= e2; e2--) 8961 for (o2 = c2[e2][1], l2 = (a2 = c2[e2][i2 = 0]).length; i2 < l2; i2++) 8962 (r2 = V(a2[i2])).data(this.widgetName + "-item", o2), h2.push({ item: r2, instance: o2, width: 0, height: 0, left: 0, top: 0 }); 8963 }, _refreshItemPositions: function(t2) { 8964 for (var e2, i2, s2 = this.items.length - 1; 0 <= s2; s2--) 8965 e2 = this.items[s2], this.currentContainer && e2.instance !== this.currentContainer && e2.item[0] !== this.currentItem[0] || (i2 = this.options.toleranceElement ? V(this.options.toleranceElement, e2.item) : e2.item, t2 || (e2.width = i2.outerWidth(), e2.height = i2.outerHeight()), i2 = i2.offset(), e2.left = i2.left, e2.top = i2.top); 8966 }, refreshPositions: function(t2) { 8967 var e2, i2; 8968 if (this.floating = !!this.items.length && ("x" === this.options.axis || this._isFloating(this.items[0].item)), this.offsetParent && this.helper && (this.offset.parent = this._getParentOffset()), this._refreshItemPositions(t2), this.options.custom && this.options.custom.refreshContainers) 8969 this.options.custom.refreshContainers.call(this); 8970 else 8971 for (e2 = this.containers.length - 1; 0 <= e2; e2--) 8972 i2 = this.containers[e2].element.offset(), this.containers[e2].containerCache.left = i2.left, this.containers[e2].containerCache.top = i2.top, this.containers[e2].containerCache.width = this.containers[e2].element.outerWidth(), this.containers[e2].containerCache.height = this.containers[e2].element.outerHeight(); 8973 return this; 8974 }, _createPlaceholder: function(i2) { 8975 var s2, n2, o2 = (i2 = i2 || this).options; 8976 o2.placeholder && o2.placeholder.constructor !== String || (s2 = o2.placeholder, n2 = i2.currentItem[0].nodeName.toLowerCase(), o2.placeholder = { element: function() { 8977 var t2 = V("<" + n2 + ">", i2.document[0]); 8978 return i2._addClass(t2, "ui-sortable-placeholder", s2 || i2.currentItem[0].className)._removeClass(t2, "ui-sortable-helper"), "tbody" === n2 ? i2._createTrPlaceholder(i2.currentItem.find("tr").eq(0), V("<tr>", i2.document[0]).appendTo(t2)) : "tr" === n2 ? i2._createTrPlaceholder(i2.currentItem, t2) : "img" === n2 && t2.attr("src", i2.currentItem.attr("src")), s2 || t2.css("visibility", "hidden"), t2; 8979 }, update: function(t2, e2) { 8980 s2 && !o2.forcePlaceholderSize || (e2.height() && (!o2.forcePlaceholderSize || "tbody" !== n2 && "tr" !== n2) || e2.height(i2.currentItem.innerHe
vendor: 9,297 bytes, lines 8980-9025
8980ight() - parseInt(i2.currentItem.css("paddingTop") || 0, 10) - parseInt(i2.currentItem.css("paddingBottom") || 0, 10)), e2.width() || e2.width(i2.currentItem.innerWidth() - parseInt(i2.currentItem.css("paddingLeft") || 0, 10) - parseInt(i2.currentItem.css("paddingRight") || 0, 10))); 8981 } }), i2.placeholder = V(o2.placeholder.element.call(i2.element, i2.currentItem)), i2.currentItem.after(i2.placeholder), o2.placeholder.update(i2, i2.placeholder); 8982 }, _createTrPlaceholder: function(t2, e2) { 8983 var i2 = this; 8984 t2.children().each(function() { 8985 V("<td> </td>", i2.document[0]).attr("colspan", V(this).attr("colspan") || 1).appendTo(e2); 8986 }); 8987 }, _contactContainers: function(t2) { 8988 for (var e2, i2, s2, n2, o2, a2, r2, l2, h2, c2 = null, u2 = null, d2 = this.containers.length - 1; 0 <= d2; d2--) 8989 V.contains(this.currentItem[0], this.containers[d2].element[0]) || (this._intersectsWith(this.containers[d2].containerCache) ? c2 && V.contains(this.containers[d2].element[0], c2.element[0]) || (c2 = this.containers[d2], u2 = d2) : this.containers[d2].containerCache.over && (this.containers[d2]._trigger("out", t2, this._uiHash(this)), this.containers[d2].containerCache.over = 0)); 8990 if (c2) 8991 if (1 === this.containers.length) 8992 this.containers[u2].containerCache.over || (this.containers[u2]._trigger("over", t2, this._uiHash(this)), this.containers[u2].containerCache.over = 1); 8993 else { 8994 for (i2 = 1e4, s2 = null, n2 = (l2 = c2.floating || this._isFloating(this.currentItem)) ? "left" : "top", o2 = l2 ? "width" : "height", h2 = l2 ? "pageX" : "pageY", e2 = this.items.length - 1; 0 <= e2; e2--) 8995 V.contains(this.containers[u2].element[0], this.items[e2].item[0]) && this.items[e2].item[0] !== this.currentItem[0] && (a2 = this.items[e2].item.offset()[n2], r2 = false, t2[h2] - a2 > this.items[e2][o2] / 2 && (r2 = true), Math.abs(t2[h2] - a2) < i2 && (i2 = Math.abs(t2[h2] - a2), s2 = this.items[e2], this.direction = r2 ? "up" : "down")); 8996 (s2 || this.options.dropOnEmpty) && (this.currentContainer !== this.containers[u2] ? (s2 ? this._rearrange(t2, s2, null, true) : this._rearrange(t2, null, this.containers[u2].element, true), this._trigger("change", t2, this._uiHash()), this.containers[u2]._trigger("change", t2, this._uiHash(this)), this.currentContainer = this.containers[u2], this.options.placeholder.update(this.currentContainer, this.placeholder), this.scrollParent = this.placeholder.scrollParent(), this.scrollParent[0] !== this.document[0] && "HTML" !== this.scrollParent[0].tagName && (this.overflowOffset = this.scrollParent.offset()), this.containers[u2]._trigger("over", t2, this._uiHash(this)), this.containers[u2].containerCache.over = 1) : this.currentContainer.containerCache.over || (this.containers[u2]._trigger("over", t2, this._uiHash()), this.currentContainer.containerCache.over = 1)); 8997 } 8998 }, _createHelper: function(t2) { 8999 var e2 = this.options, t2 = "function" == typeof e2.helper ? V(e2.helper.apply(this.element[0], [t2, this.currentItem])) : "clone" === e2.helper ? this.currentItem.clone() : this.currentItem; 9000 return t2.parents("body").length || this.appendTo[0].appendChild(t2[0]), t2[0] === this.currentItem[0] && (this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") }), t2[0].style.width && !e2.forceHelperSize || t2.width(this.currentItem.width()), t2[0].style.height && !e2.forceHelperSize || t2.height(this.currentItem.height()), t2; 9001 }, _adjustOffsetFromHelper: function(t2) { 9002 "string" == typeof t2 && (t2 = t2.split(" ")), "left" in (t2 = Array.isArray(t2) ? { left: +t2[0], top: +t2[1] || 0 } : t2) && (this.offset.click.left = t2.left + this.margins.left), "right" in t2 && (this.offset.click.left = this.helperProportions.width - t2.right + this.margins.left), "top" in t2 && (this.offset.click.top = t2.top + this.margins.top), "bottom" in t2 && (this.offset.click.top = this.helperProportions.height - t2.bottom + this.margins.top); 9003 }, _getParentOffset: function() { 9004 this.offsetParent = this.helper.offsetParent(); 9005 var t2 = this.offsetParent.offset(); 9006 return "absolute" === this.cssPosition && this.scrollParent[0] !== this.document[0] && V.contains(this.scrollParent[0], this.offsetParent[0]) && (t2.left += this.scrollParent.scrollLeft(), t2.top += this.scrollParent.scrollTop()), { top: (t2 = this.offsetParent[0] === this.document[0].body || this.offsetParent[0].tagName && "html" === this.offsetParent[0].tagName.toLowerCase() && V.ui.ie ? { top: 0, left: 0 } : t2).top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), left: t2.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0) }; 9007 }, _getRelativeOffset: function() { 9008 if ("relative" !== this.cssPosition) 9009 return { top: 0, left: 0 }; 9010 var t2 = this.currentItem.position(); 9011 return { top: t2.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(), left: t2.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft() }; 9012 }, _cacheMargins: function() { 9013 this.margins = { left: parseInt(this.currentItem.css("marginLeft"), 10) || 0, top: parseInt(this.currentItem.css("marginTop"), 10) || 0 }; 9014 }, _cacheHelperProportions: function() { 9015 this.helperProportions = { width: this.helper.outerWidth(), height: this.helper.outerHeight() }; 9016 }, _setContainment: function() { 9017 var t2, e2, i2 = this.options; 9018 "parent" === i2.containment && (i2.containment = this.helper[0].parentNode), "document" !== i2.containment && "window" !== i2.containment || (this.containment = [0 - this.offset.relative.left - this.offset.parent.left, 0 - this.offset.relative.top - this.offset.parent.top, "document" === i2.containment ? this.document.width() : this.window.width() - this.helperProportions.width - this.margins.left, ("document" === i2.containment ? this.document.height() || document.body.parentNode.scrollHeight : this.window.height() || this.document[0].body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]), /^(document|window|parent)$/.test(i2.containment) || (t2 = V(i2.containment)[0], e2 = V(i2.containment).offset(), i2 = "hidden" !== V(t2).css("overflow"), this.containment = [e2.left + (parseInt(V(t2).css("borderLeftWidth"), 10) || 0) + (parseInt(V(t2).css("paddingLeft"), 10) || 0) - this.margins.left, e2.top + (parseInt(V(t2).css("borderTopWidth"), 10) || 0) + (parseInt(V(t2).css("paddingTop"), 10) || 0) - this.margins.top, e2.left + (i2 ? Math.max(t2.scrollWidth, t2.offsetWidth) : t2.offsetWidth) - (parseInt(V(t2).css("borderLeftWidth"), 10) || 0) - (parseInt(V(t2).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left, e2.top + (i2 ? Math.max(t2.scrollHeight, t2.offsetHeight) : t2.offsetHeight) - (parseInt(V(t2).css("borderTopWidth"), 10) || 0) - (parseInt(V(t2).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top]); 9019 }, _convertPositionTo: function(t2, e2) { 9020 e2 = e2 || this.position; 9021 var i2 = "absolute" === t2 ? 1 : -1, s2 = "absolute" !== this.cssPosition || this.scrollParent[0] !== this.document[0] && V.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent, t2 = /(html|body)/i.test(s2[0].tagName); 9022 return { top: e2.top + this.offset.relative.top * i2 + this.offset.parent.top * i2 - ("fixed" === this.cssPosition ? -this.scrollParent.scrollTop() : t2 ? 0 : s2.scrollTop()) * i2, left: e2.left + this.offset.relative.left * i2 + this.offset.parent.left * i2 - ("fixed" === this.cssPosition ? -this.scrollParent.scrollLeft() : t2 ? 0 : s2.scrollLeft()) * i2 }; 9023 }, _generatePosition: function(t2) { 9024 var e2 = this.options, i2 = t2.pageX, s2 = t2.pageY, n2 = "absolute" !== this.cssPosition || this.scrollParent[0] !== this.document[0] && V.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent, o2 = /(html|body)/i.test(n2[0].tagName); 9025 return "relative" !== this.cssPosition || this.scrollParent[0] !== this.document[0] && this.scrollParent[0] !== this.offsetParent[0] || (this.offset.relative = this._getRelativeOffset()), this.originalPosition && (this.containment && (t2.pageX - this.offset.click.left < this.containment[0] && (i2 = this.containment[0] + this.offset.click.left), t2.pageY - this.offset.click.top < this.containment[1] && (s2 = this.containment[1] + this.offset.click.top), t2.pageX - this.offset.click.left > this.containment[2] && (i2 = this.containment[2] + this.offset.click.left), t2.pageY - this.offset.click.top > this.containment[3] && (s2 = this.containment[3] + this.offset.click.top)), e2.grid && (t2 = this.originalPageY + Math.round((s2 - this.originalPageY) / e2.grid[1]) * e2.grid[1], s2 = !this.containment || t2 - this.offset.click.top >= this.containment[1] && t2 - this.offset.click.top <= this.containment[3] ? t2 : t2 - this.offset.click.top >= this.containment[1] ? t2 - e2.grid[1] : t2 + e2.grid[1], t2 = this.originalPageX + Math.round((i2 - this.originalPageX) / e2.grid[
90250]) * e2.grid[0], i2 = !this.containment || t2 - this.offset.click.left >= this.containment[0] && t2 - this.offset.click.left <= this.containment[2] ? t2 : t2 - this.offset.click.left >= this.containment[0] ? t2 - e2.grid[0] : t2 + e2.grid[0])), { top: s2 - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + ("fixed" === this.cssPosition ? -this.scrollParent.scrollTop() : o2 ? 0 : n2.scrollTop()), left: i2 - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + ("fixed" === this.cssPosition ? -this.scrollParent.scrollLeft() : o2 ? 0 : n2.scrollLeft()) }; 9026 }, _rearrange: function(t2, e2, i2, s2) { 9027 i2 ? i2[0].appendChild(this.placeholder[0]) : e2.item[0].parentNode.insertBefore(this.placeholder[0], "down" === this.direction ? e2.item[0] : e2.item[0].nextSibling), this.counter = this.counter ? ++this.counter : 1; 9028 var n2 = this.counter; 9029 this._delay(function() { 9030 n2 === this.counter && this.refreshPositions(!s2); 9031 }); 9032 }, _clear: function(t2, e2) { 9033 this.reverting = false; 9034 var i2, s2 = []; 9035 if (!this._noFinalSort && this.currentItem.parent().length && this.placeholder.before(this.currentItem), this._noFinalSort = null, this.helper[0] === this.currentItem[0]) { 9036 for (i2 in this._storedCSS) 9037 "auto" !== this._storedCSS[i2] && "static" !== this._storedCSS[i2] || (this._storedCSS[i2] = ""); 9038 this.currentItem.css(this._storedCSS), this._removeClass(this.currentItem, "ui-sortable-helper"); 9039 } else 9040 this.currentItem.show(); 9041 function n2(e3, i3, s3) { 9042 return function(t3) { 9043 s3._trigger(e3, t3, i3._uiHash(i3)); 9044 }; 9045 } 9046 for (this.fromOutside && !e2 && s2.push(function(t3) { 9047 this._trigger("receive", t3, this._uiHash(this.fromOutside)); 9048 }), !this.fromOutside && this.domPosition.prev === this.currentItem.prev().not(".ui-sortable-helper")[0] && this.domPosition.parent === this.currentItem.parent()[0] || e2 || s2.push(function(t3) { 9049 this._trigger("update", t3, this._uiHash()); 9050 }), this !== this.currentContainer && (e2 || (s2.push(function(t3) { 9051 this._trigger("remove", t3, this._uiHash()); 9052 }), s2.push(function(e3) { 9053 return function(t3) { 9054 e3._trigger("receive", t3, this._uiHash(this)); 9055 }; 9056 }.call(this, this.currentContainer)), s2.push(function(e3) { 9057 return function(t3) { 9058 e3._trigger("update", t3, this._uiHash(this)); 9059 }; 9060 }.call(this, this.currentContainer)))), i2 = this.containers.length - 1; 0 <= i2; i2--) 9061 e2 || s2.push(n2("deactivate", this, this.containers[i2])), this.containers[i2].containerCache.over && (s2.push(n2("out", this, this.containers[i2])), this.containers[i2].containerCache.over = 0); 9062 if (this.storedCursor && (this.document.find("body").css("cursor", this.storedCursor), this.storedStylesheet.remove()), this._storedOpacity && this.helper.css("opacity", this._storedOpacity), this._storedZIndex && this.helper.css("zIndex", "auto" === this._storedZIndex ? "" : this._storedZIndex), this.dragging = false, e2 || this._trigger("beforeStop", t2, this._uiHash()), this.placeholder[0].parentNode.removeChild(this.placeholder[0]), this.cancelHelperRemoval || (this.helper[0] !== this.currentItem[0] && this.helper.remove(), this.helper = null), !e2) { 9063 for (i2 = 0; i2 < s2.length; i2++) 9064 s2[i2].call(this, t2); 9065 this._trigger("stop", t2, this._uiHash()); 9066 } 9067 return this.fromOutside = false, !this.cancelHelperRemoval; 9068 }, _trigger: function() { 9069 false === V.Widget.prototype._trigger.apply(this, arguments) && this.cancel(); 9070 }, _uiHash: function(t2) { 9071 var e2 = t2 || this; 9072 return { helper: e2.helper, placeholder: e2.placeholder || V([]), position: e2.position, originalPosition: e2.originalPosition, offset: e2.positionAbs, item: e2.currentItem, sender: t2 ? t2.element : null }; 9073 } }), V.widget("ui.accordion", { version: "1.13.2", options: { active: 0, animate: {}, classes: { "ui-accordion-header": "ui-corner-top", "ui-accordion-header-collapsed": "ui-corner-all", "ui-accordion-content": "ui-corner-bottom" }, collapsible: false, event: "click", header: function(t2) { 9074 return t2.find("> li > :first-child").add(t2.find("> :not(li)").even()); 9075 }, heightStyle: "auto", icons: { activeHeader: "ui-icon-triangle-1-s", header: "ui-icon-triangle-1-e" }, activate: null, beforeActivate: null }, hideProps: { borderTopWidth: "hide", borderBottomWidth: "hide", paddingTop: "hide", paddingBottom: "hide", height: "hide" }
9075, showProps: { borderTopWidth: "show", borderBottomWidth: "show", paddingTop: "show", paddingBottom: "show", height: "show" }, _create: function() { 9076 var t2 = this.options; 9077 this.prevShow = this.prevHide = V(), this._addClass("ui-accordion", "ui-widget ui-helper-reset"), this.element.attr("role", "tablist"), t2.collapsible || false !== t2.active && null != t2.active || (t2.active = 0), this._processPanels(), t2.active < 0 && (t2.active += this.headers.length), this._refresh(); 9078 }, _getCreateEventData: function() { 9079 return { header: this.active, panel: this.active.length ? this.active.next() : V() }; 9080 }, _createIcons: function() { 9081 var t2, e2 = this.options.icons; 9082 e2 && (t2 = V("<span>"), this._addClass(t2, "ui-accordion-header-icon", "ui-icon " + e2.header), t2.prependTo(this.headers), t2 = this.active.children(".ui-accordion-header-icon"), this._removeClass(t2, e2.header)._addClass(t2, null, e2.activeHeader)._addClass(this.headers, "ui-accordion-icons")); 9083 }, _destroyIcons: function() { 9084 this._removeClass(this.headers, "ui-accordion-icons"), this.headers.children(".ui-accordion-header-icon").remove(); 9085 }, _destroy: function() { 9086 var t2; 9087 this.element.removeAttr("role"), this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(), this._destroyIcons(), t2 = this.headers.next().css("display", "").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(), "content" !== this.options.heightStyle && t2.css("height", ""); 9088 }, _setOption: function(t2, e2) { 9089 "active" !== t2 ? ("event" === t2 && (this.options.event && this._off(this.headers, this.options.event), this._setupEvents(e2)), this._super(t2, e2), "collapsible" !== t2 || e2 || false !== this.options.active || this._activate(0), "icons" === t2 && (this._destroyIcons(), e2 && this._createIcons())) : this._activate(e2); 9090 }, _setOptionDisabled: function(t2) { 9091 this._super(t2), this.element.attr("aria-disabled", t2), this._toggleClass(null, "ui-state-disabled", !!t2), this._toggleClass(this.headers.add(this.headers.next()), null, "ui-state-disabled", !!t2); 9092 }, _keydown: function(t2) { 9093 if (!t2.altKey && !t2.ctrlKey) { 9094 var e2 = V.ui.keyCode, i2 = this.headers.length, s2 = this.headers.index(t2.target), n2 = false; 9095 switch (t2.keyCode) { 9096 case e2.RIGHT: 9097 case e2.DOWN: 9098 n2 = this.headers[(s2 + 1) % i2]; 9099 break; 9100 case e2.LEFT: 9101 case e2.UP: 9102 n2 = this.headers[(s2 - 1 + i2) % i2]; 9103 break; 9104 case e2.SPACE: 9105 case e2.ENTER: 9106 this._eventHandler(t2); 9107 break; 9108 case e2.HOME: 9109 n2 = this.headers[0]; 9110 break; 9111 case e2.END: 9112 n2 = this.headers[i2 - 1]; 9113 } 9114 n2 && (V(t2.target).attr("tabIndex", -1), V(n2).attr("tabIndex", 0), V(n2).trigger("focus"), t2.preventDefault()); 9115 } 9116 }, _panelKeyDown: function(t2) { 9117 t2.keyCode === V.ui.keyCode.UP && t2.ctrlKey && V(t2.currentTarget).prev().trigger("focus"); 9118 }, refresh: function() { 9119 var t2 = this.options; 9120 this._processPanels(), false === t2.active && true === t2.collapsible || !this.headers.length ? (t2.active = false, this.active = V()) : false === t2.active ? this._activate(0) : this.active.length && !V.contains(this.element[0], this.active[0]) ? this.headers.length === this.headers.find(".ui-state-disabled").length ? (t2.active = false, this.active = V()) : this._activate(Math.max(0, t2.active - 1)) : t2.active = this.headers.index(this.active), this._destroyIcons(), this._refresh(); 9121 }, _processPanels: function() { 9122 var t2 = this.headers, e2 = this.panels; 9123 "function" == typeof this.options.header ? this.headers = this.options.header(this.element) : this.headers = this.element.find(this.options.header), this._addClass(this.headers, "ui-accordion-header ui-accordion-header-collapsed", "ui-state-default"), this.panels = this.headers.next().filter(":not(.ui-accordion-content-active)").hide(), this._addClass(this.panels, "ui-accordion-content", "ui-helper-reset ui-widget-content"), e2 && (this._off(t2.not(this.headers)), this._off(e2.not(this.panels))); 9124 }, _refresh: function() {
9125 var i2, t2 = this.options, e2 = t2.heightStyle, s2 = this.element.parent(); 9126 this.active = this._findActive(t2.active), this._addClass(this.active, "ui-accordion-header-active", "ui-state-active")._removeClass(this.active, "ui-accordion-header-collapsed"), this._addClass(this.active.next(), "ui-accordion-content-active"), this.active.next().show(), this.headers.attr("role", "tab").each(function() { 9127 var t3 = V(this), e3 = t3.uniqueId().attr("id"), i3 = t3.next(), s3 = i3.uniqueId().attr("id"); 9128 t3.attr("aria-controls", s3), i3.attr("aria-labelledby", e3); 9129 }).next().attr("role", "tabpanel"), this.headers.not(this.active).attr({ "aria-selected": "false", "aria-expanded": "false", tabIndex: -1 }).next().attr({ "aria-hidden": "true" }).hide(), this.active.length ? this.active.attr({ "aria-selected": "true", "aria-expanded": "true", tabIndex: 0 }).next().attr({ "aria-hidden": "false" }) : this.headers.eq(0).attr("tabIndex", 0), this._createIcons(), this._setupEvents(t2.event), "fill" === e2 ? (i2 = s2.height(), this.element.siblings(":visible").each(function() { 9130 var t3 = V(this), e3 = t3.css("position"); 9131 "absolute" !== e3 && "fixed" !== e3 && (i2 -= t3.outerHeight(true)); 9132 }), this.headers.each(function() { 9133 i2 -= V(this).outerHeight(true); 9134 }), this.headers.next().each(function() { 9135 V(this).height(Math.max(0, i2 - V(this).innerHeight() + V(this).height())); 9136 }).css("overflow", "auto")) : "auto" === e2 && (i2 = 0, this.headers.next().each(function() { 9137 var t3 = V(this).is(":visible"); 9138 t3 || V(this).show(), i2 = Math.max(i2, V(this).css("height", "").height()), t3 || V(this).hide(); 9139 }).height(i2)); 9140 }, _activate: function(t2) { 9141 t2 = this._findActive(t2)[0]; 9142 t2 !== this.active[0] && (t2 = t2 || this.active[0], this._eventHandler({ target: t2, currentTarget: t2, preventDefault: V.noop })); 9143 }, _findActive: function(t2) { 9144 return "number" == typeof t2 ? this.headers.eq(t2) : V(); 9145 }, _setupEvents: function(t2) { 9146 var i2 = { keydown: "_keydown" }; 9147 t2 && V.each(t2.split(" "), function(t3, e2) { 9148 i2[e2] = "_eventHandler"; 9149 }), this._off(this.headers.add(this.headers.next())), this._on(this.headers, i2), this._on(this.headers.next(), { keydown: "_panelKeyDown" }), this._hoverable(this.headers), this._focusable(this.headers); 9150 }, _eventHandler: function(t2) { 9151 var e2 = this.options, i2 = this.active, s2 = V(t2.currentTarget), n2 = s2[0] === i2[0], o2 = n2 && e2.collapsible, a2 = o2 ? V() : s2.next(), r2 = i2.next(), a2 = { oldHeader: i2, oldPanel: r2, newHeader: o2 ? V() : s2, newPanel: a2 }; 9152 t2.preventDefault(), n2 && !e2.collapsible || false === this._trigger("beforeActivate", t2, a2) || (e2.active = !o2 && this.headers.index(s2), this.active = n2 ? V() : s2, this._toggle(a2), this._removeClass(i2, "ui-accordion-header-active", "ui-state-active"), e2.icons && (i2 = i2.children(".ui-accordion-header-icon"), this._removeClass(i2, null, e2.icons.activeHeader)._addClass(i2, null, e2.icons.header)), n2 || (this._removeClass(s2, "ui-accordion-header-collapsed")._addClass(s2, "ui-accordion-header-active", "ui-state-active"), e2.icons && (n2 = s2.children(".ui-accordion-header-icon"), this._removeClass(n2, null, e2.icons.header)._addClass(n2, null, e2.icons.activeHeader)), this._addClass(s2.next(), "ui-accordion-content-active"))); 9153 }, _toggle: function(t2) { 9154 var e2 = t2.newPanel, i2 = this.prevShow.length ? this.prevShow : t2.oldPanel; 9155 this.prevShow.add(this.prevHide).stop(true, true), this.prevShow = e2, this.prevHide = i2, this.options.animate ? this._animate(e2, i2, t2) : (i2.hide(), e2.show(), this._toggleComplete(t2)), i2.attr({ "aria-hidden": "true" }), i2.prev().attr({ "aria-selected": "false", "aria-expanded": "false" }), e2.length && i2.length ? i2.prev().attr({ tabIndex: -1, "aria-expanded": "false" }) : e2.length && this.headers.filter(function() { 9156 return 0 === parseInt(V(this).attr("tabIndex"), 10); 9157 }).attr("tabIndex", -1), e2.attr("aria-hidden", "false").prev().attr({ "aria-selected": "true", "aria-expanded": "true", tabIndex: 0 }); 9158 }, _animate: function(t2, i2, e2) { 9159 var s2, n2, o2, a2 = this, r2 = 0, l2 = t2.css("box-sizing"), h2 = t2.length && (!i2.length || t2.index() < i2.index()), c2 = this.options.animate || {}, u2 = h2 && c2.down || c2, h2 = function() { 9160 a2._toggleComplete(e2); 9161 }; 9162 return n2 = (n2 = "string" == typeof u2 ? u2 : n2) || u2.easing || c2.easing, o2 = (o2 = "number" == typeof u2 ? u2 : o2) || u2.duration || c2.duration, i2.length ? t2.length ? (s2 = t2.show().outerHeight(), i2.animate(this.hideProps, { duration: o2, easing: n2, step: function(t3, e3) { 9163 e3.now = Math.round(t3); 9164 } }), void t2.hide().animate(this.showProps, { duration: o2, easing: n2, complete: h2, step: function(t3, e3) { 9165 e3.now = Math.round(t3), "height" !== e3.prop ? "content-box" === l2 && (r2 += e3.now) : "content" !== a2.options.heightStyle && (e3.now = Math.round(s2 - i2.outerHeight() - r2), r2 = 0); 9166 } })) : i2.animate(this.hideProps, o2, n2, h2) : t2.animate(this.showProps, o2, n2, h2); 9167 }, _toggleComplete: function(t2) { 9168 var e2 = t2.oldPanel, i2 = e2.prev(); 9169 this._removeClass(e2, "ui-accordion-content-active"), this._removeClass(i2, "ui-accordion-header-active")._addClass(i2, "ui-accordion-header-collapsed"), e2.length && (e2.parent()[0].className = e2.parent()[0].className), this._trigger("activate", null, t2); 9170 } }), V.widget("ui.menu", { version: "1.13.2", defaultElement: "<ul>", delay: 300, options: { icons: { submenu: "ui-icon-caret-1-e" }, items: "> *", menus: "ul", position: { my: "left top", at: "right top" }, role: "menu", blur: null, focus: null, select: null }, _create: function() { 9171 this.activeMenu = this.element, this.mouseHandled = false, this.lastMousePosition = { x: null, y: null }, this.element.uniqueId().attr({ role: this.options.role, tabIndex: 0 }), this._addClass("ui-menu", "ui-widget ui-widget-content"), this._on({ "mousedown .ui-menu-item": function(t2) { 9172 t2.preventDefault(), this._activateItem(t2); 9173 }, "click .ui-menu-item": function(t2) { 9174 var e2 = V(t2.target), i2 = V(V.ui.safeActiveElement(this.document[0])); 9175 !this.mouseHandled && e2.not(".ui-state-disabled").length && (this.select(t2), t2.isPropagationStopped() || (this.mouseHandled = true), e2.has(".ui-menu").length ? this.expand(t2) : !this.element.is(":focus") && i2.closest(".ui-menu").length && (this.element.trigger("focus", [true]), this.active && 1 === this.active.parents(".ui-menu").length && clearTimeout(this.timer))); 9176 }, "mouseenter .ui-menu-item": "_activateItem", "mousemove .ui-menu-item": "_activateItem", mouseleave: "collapseAll", "mouseleave .ui-menu": "collapseAll", focus: function(t2, e2) { 9177 var i2 = this.active || this._menuItems().first(); 9178 e2 || this.focus(t2, i2); 9179 }, blur: function(t2) { 9180 this._delay(function() { 9181 V.contains(this.element[0], V.ui.safeActiveElement(this.document[0])) || this.collapseAll(t2); 9182 }); 9183 }, keydown: "_keydown" }), this.refresh(), this._on(this.document, { click: function(t2) { 9184 this._closeOnDocumentClick(t2) && this.collapseAll(t2, true), this.mouseHandled = false;
9185 } }); 9186 }, _activateItem: function(t2) { 9187 var e2, i2; 9188 this.previousFilter || t2.clientX === this.lastMousePosition.x && t2.clientY === this.lastMousePosition.y || (this.lastMousePosition = { x: t2.clientX, y: t2.clientY }, e2 = V(t2.target).closest(".ui-menu-item"), i2 = V(t2.currentTarget), e2[0] === i2[0] && (i2.is(".ui-state-active") || (this._removeClass(i2.siblings().children(".ui-state-active"), null, "ui-state-active"), this.focus(t2, i2)))); 9189 }, _destroy: function() { 9190 var t2 = this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup"); 9191 this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(), t2.children().each(function() { 9192 var t3 = V(this); 9193 t3.data("ui-menu-submenu-caret") && t3.remove(); 9194 }); 9195 }, _keydown: function(t2) { 9196 var e2, i2, s2, n2 = true; 9197 switch (t2.keyCode) { 9198 case V.ui.keyCode.PAGE_UP: 9199 this.previousPage(t2); 9200 break; 9201 case V.ui.keyCode.PAGE_DOWN: 9202 this.nextPage(t2); 9203 break; 9204 case V.ui.keyCode.HOME: 9205 this._move("first", "first", t2); 9206 break; 9207 case V.ui.keyCode.END: 9208 this._move("last", "last", t2); 9209 break; 9210 case V.ui.keyCode.UP: 9211 this.previous(t2); 9212 break; 9213 case V.ui.keyCode.DOWN: 9214 this.next(t2); 9215 break; 9216 case V.ui.keyCode.LEFT: 9217 this.collapse(t2); 9218 break; 9219 case V.ui.keyCode.RIGHT: 9220 this.active && !this.active.is(".ui-state-disabled") && this.expand(t2); 9221 break; 9222 case V.ui.keyCode.ENTER: 9223 case V.ui.keyCode.SPACE: 9224 this._activate(t2); 9225 break; 9226 case V.ui.keyCode.ESCAPE: 9227 this.collapse(t2); 9228 break; 9229 default: 9230 e2 = this.previousFilter || "", s2 = n2 = false, i2 = 96 <= t2.keyCode && t2.keyCode <= 105 ? (t2.keyCode - 96).toString() : String.fromCharCode(t2.keyCode), clearTimeout(this.filterTimer), i2 === e2 ? s2 = true : i2 = e2 + i2, e2 = this._filterMenuItems(i2), (e2 = s2 && -1 !== e2.index(this.active.next()) ? this.active.nextAll(".ui-menu-item") : e2).length || (i2 = String.fromCharCode(t2.keyCode), e2 = this._filterMenuItems(i2)), e2.length ? (this.focus(t2, e2), this.previousFilter = i2, this.filterTimer = this._delay(function() { 9231 delete this.previousFilter; 9232 }, 1e3)) : delete this.previousFilter; 9233 } 9234 n2 && t2.preventDefault(); 9235 }, _activate: function(t2) { 9236 this.active && !this.active.is(".ui-state-disabled") && (this.active.children("[aria-haspopup='true']").length ? this.expand(t2) : this.select(t2)); 9237 }, refresh: function() { 9238 var t2, e2, s2 = this, n2 = this.options.icons.submenu, i2 = this.element.find(this.options.menus); 9239 this._toggleClass("ui-menu-icons", null, !!this.element.find(".ui-icon").length), e2 = i2.filter(":not(.ui-menu)").hide().attr({ role: this.options.role, "aria-hidden": "true", "aria-expanded": "false" }).each(function() { 9240 var t3 = V(this), e3 = t3.prev(), i3 = V("<span>").data("ui-menu-submenu-caret", true); 9241 s2._addClass(i3, "ui-menu-icon", "ui-icon " + n2), e3.attr("aria-haspopup", "true").prepend(i3), t3.attr("aria-labelledby", e3.attr("id")); 9242 }), this._addClass(e2, "ui-menu", "ui-widget ui-widget-content ui-front"), (t2 = i2.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function() { 9243 var t3 = V(this); 9244 s2._isDivider(t3) && s2._addClass(t3, "ui-menu-divider", "ui-widget-content"); 9245 }), i2 = (e2 = t2.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({ tabIndex: -1, role: this._itemRole() }), this._addClass(e2, "ui-menu-item")._addClass(i2, "ui-menu-item-wrapper"), t2.filter(".ui-state-disabled").attr("aria-disabled", "true"), this.active && !V.contains(this.element[0], this.active[0]) && this.blur(); 9246 }, _itemRole: function() { 9247 return { menu: "menuitem", listbox: "option" }[this.options.role]; 9248 }, _setOption: function(t2, e2) { 9249 var i2; 9250 "icons" === t2 && (i2 = this.element.find(".ui-menu-icon"), this._removeClass(i2, null, this.options.icons.submenu)._addClass(i2, null, e2.submenu)), this._super(t2, e2); 9251 }, _setOptionDisabled: function(t2) { 9252 this._super(t2), this.element.attr("aria-disabled", String(t2)), this._toggleClass(null, "ui-state-disabled", !!t2); 9253 }, focus: function(t2, e2) { 9254 var i2; 9255 this.blur(t2, t2 && "focus" === t2.type), this._scrollIntoView(e2), this.active = e2.first(), i2 = this.active.children(".ui-menu-item-wrapper"), this._addClass(i2, null, "ui-state-active"), this.options.role && this.element.attr("aria-activedescendant", i2.attr("id")), i2 = this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"), this._addClass(i2, null, "ui-state-active"), t2 && "keydown" === t2.type ? this._close() : this.timer = this._delay(function() { 9256 this._close(); 9257 }, this.delay), (i2 = e2.children(".ui-menu")).length && t2 && /^mouse/.test(t2.type) && this._startOpening(i2), this.activeMenu = e2.parent(), this._trigger("focus", t2, { item: e2 }); 9258 }, _scrollIntoView: function(t2) { 9259 var e2, i2, s2; 9260 this._hasScroll() && (i2 = parseFloat(V.css(this.activeMenu[0], "borderTopWidth")) || 0, s2 = parseFloat(V.css(this.activeMenu[0], "paddingTop")) || 0, e2 = t2.offset().top - this.activeMenu.offset().top - i2 - s2, i2 = this.activeMenu.scrollTop(), s2 = this.activeMenu.height(), t2 = t2.outerHeight(), e2 < 0 ? this.activeMenu.scrollTop(i2 + e2) : s2 < e2 + t2 && this.activeMenu.scrollTop(i2 + e2 - s2 + t2)); 9261 }, blur: function(t2, e2) { 9262 e2 || clearTimeout(this.timer), this.active && (this._removeClass(this.active.children(".ui-menu-item-wrapper"), null, "ui-state-active"), this._trigger("blur", t2, { item: this.active }), this.active = null); 9263 }, _startOpening: function(t2) { 9264 clearTimeout(this.timer), "true" === t2.attr("aria-hidden") && (this.timer = this._delay(function() { 9265 this._close(), this._open(t2); 9266 }, this.delay)); 9267 }, _open: function(t2) { 9268 var e2 = V.extend({ of: this.active }, this.options.position); 9269 clearTimeout(this.timer), this.element.find(".ui-menu").not(t2.parents(".ui-menu")).hide().attr("aria-hidden", "true"), t2.show().removeAttr("aria-hidden").attr("aria-expanded", "true").position(e2); 9270 }, collapseAll: function(e2, i2) { 9271 clearTimeout(this.timer), this.timer = this._delay(function() { 9272 var t2 = i2 ? this.element : V(e2 && e2.target).closest(this.element.find(".ui-menu")); 9273 t2.length || (t2 = this.element), this._close(t2), this.blur(e2), this._removeClass(t2.find(".ui-state-active"), null, "ui-state-active"), this.activeMenu = t2; 9274 }, i2 ? 0 : this.delay); 9275 }, _close: function(t2) { 9276 (t2 = t2 || (this.active ? this.active.parent() : this.element)).find(".ui-menu").hide().attr("aria-hidden", "true").attr("aria-expanded", "false"); 9277 }, _closeOnDocumentClick: function(t2) { 9278 return !V(t2.target).closest(".ui-menu").length; 9279 }, _isDivider: function(t2) { 9280 return !/[^\-\u2014\u2013\s]/.test(t2.text()); 9281 }, collapse: function(t2) { 9282 var e2 = this.active && this.active.parent().closest(".ui-menu-item", this.element); 9283 e2 && e2.length && (this._close(), this.focus(t2, e2)); 9284 }, expand: function(t2) { 9285 var e2 = this.active && this._menuItems(this.active.children(".ui-menu")).first(); 9286 e2 && e2.length && (this._open(e2.parent()), this._delay(function() { 9287 this.focus(t2, e2); 9288 })); 9289 }, next: function(t2) { 9290 this._move("next", "first", t2); 9291 }, previous: function(t2) { 9292 this._move("prev", "last", t2); 9293 }, isFirstItem: function() { 9294 return this.active && !this.active.prevAll(".ui-menu-item").length; 9295 }, isLastItem: function() { 9296 return this.active && !this.active.nextAll(".ui-menu-item").length; 9297 }, _menuItems: function(t2) { 9298 return (t2 || this.element).find(this.options.items).filter(".ui-menu-item"); 9299 }, _move: function(t2, e2, i2) { 9300 var s2; 9301 (s2 = this.active ? "first" === t2 || "last" === t2 ? this.active["first" === t2 ? "prevAll" : "nextAll"](".ui-menu-item").last() : this.active[t2 + "All"](".ui-menu-item").first() : s2) && s2.length && this.active || (s2 = this._menuItems(this.activeMenu)[e2]()), this.focus(i2, s2); 9302 }, nextPage: function(t2) { 9303 var e2, i2, s2; 9304 this.active ? this.isLastItem() || (this._hasScroll() ? (i2 = this.active.offset().top, s2 = this.element.innerHe
9304ight(), 0 === V.fn.jquery.indexOf("3.2.") && (s2 += this.element[0].offsetHeight - this.element.outerHeight()), this.active.nextAll(".ui-menu-item").each(function() { 9305 return (e2 = V(this)).offset().top - i2 - s2 < 0; 9306 }), this.focus(t2, e2)) : this.focus(t2, this._menuItems(this.activeMenu)[this.active ? "last" : "first"]())) : this.next(t2); 9307 }, previousPage: function(t2) { 9308 var e2, i2, s2; 9309 this.active ? this.isFirstItem() || (this._hasScroll() ? (i2 = this.active.offset().top, s2 = this.element.innerHeight(), 0 === V.fn.jquery.indexOf("3.2.") && (s2 += this.element[0].offsetHeight - this.element.outerHeight()), this.active.prevAll(".ui-menu-item").each(function() { 9310 return 0 < (e2 = V(this)).offset().top - i2 + s2; 9311 }), this.focus(t2, e2)) : this.focus(t2, this._menuItems(this.activeMenu).first())) : this.next(t2); 9312 }, _hasScroll: function() { 9313 return this.element.outerHeight() < this.element.prop("scrollHeight"); 9314 }, select: function(t2) { 9315 this.active = this.active || V(t2.target).closest(".ui-menu-item"); 9316 var e2 = { item: this.active }; 9317 this.active.has(".ui-menu").length || this.collapseAll(t2, true), this._trigger("select", t2, e2); 9318 }, _filterMenuItems: function(t2) { 9319 var t2 = t2.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"), e2 = new RegExp("^" + t2, "i"); 9320 return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function() { 9321 return e2.test(String.prototype.trim.call(V(this).children(".ui-menu-item-wrapper").text())); 9322 }); 9323 } }); 9324 V.widget("ui.autocomplete", { version: "1.13.2", defaultElement: "<input>", options: { appendTo: null, autoFocus: false, delay: 300, minLength: 1, position: { my: "left top", at: "left bottom", collision: "none" }, source: null, change: null, close: null, focus: null, open: null, response: null, search: null, select: null }, requestIndex: 0, pending: 0, liveRegionTimer: null, _create: function() { 9325 var i2, s2, n2, t2 = this.element[0].nodeName.toLowerCase(), e2 = "textarea" === t2, t2 = "input" === t2; 9326 this.isMultiLine = e2 || !t2 && this._isContentEditable(this.element), this.valueMethod = this.element[e2 || t2 ? "val" : "text"], this.isNewMenu = true, this._addClass("ui-autocomplete-input"), this.element.attr("autocomplete", "off"), this._on(this.element, { keydown: function(t3) { 9327 if (this.element.prop("readOnly")) 9328 s2 = n2 = i2 = true; 9329 else { 9330 s2 = n2 = i2 = false; 9331 var e3 = V.ui.keyCode; 9332 switch (t3.keyCode) { 9333 case e3.PAGE_UP: 9334 i2 = true, this._move("previousPage", t3); 9335 break; 9336 case e3.PAGE_DOWN: 9337 i2 = true, this._move("nextPage", t3); 9338 break; 9339 case e3.UP: 9340 i2 = true, this._keyEvent("previous", t3); 9341 break; 9342 case e3.DOWN: 9343 i2 = true, this._keyEvent("next", t3); 9344 break; 9345 case e3.ENTER: 9346 this.menu.active && (i2 = true, t3.preventDefault(), this.menu.select(t3)); 9347 break; 9348 case e3.TAB: 9349 this.menu.active && this.menu.select(t3); 9350 break; 9351 case e3.ESCAPE: 9352 this.menu.element.is(":visible") && (this.isMultiLine || this._value(this.term), this.close(t3), t3.preventDefault()); 9353 break; 9354 default: 9355 s2 = true, this._searchTimeout(t3); 9356 } 9357 } 9358 }, keypress: function(t3) { 9359 if (i2) 9360 return i2 = false, void (this.isMultiLine && !this.menu.element.is(":visible") || t3.preventDefault()); 9361 if (!s2) { 9362 var e3 = V.ui.keyCode; 9363 switch (t3.keyCode) { 9364 case e3.PAGE_UP: 9365 this._move("previousPage", t3); 9366 break; 9367 case e3.PAGE_DOWN: 9368 this._move("nextPage", t3); 9369 break; 9370 case e3.UP: 9371 this._keyEvent("previous", t3); 9372 break; 9373 case e3.DOWN: 9374 this._keyEvent("next", t3); 9375 } 9376 } 9377 }
9377, input: function(t3) { 9378 if (n2) 9379 return n2 = false, void t3.preventDefault(); 9380 this._searchTimeout(t3); 9381 }, focus: function() { 9382 this.selectedItem = null, this.previous = this._value(); 9383 }, blur: function(t3) { 9384 clearTimeout(this.searching), this.close(t3), this._change(t3); 9385 } }), this._initSource(), this.menu = V("<ul>").appendTo(this._appendTo()).menu({ role: null }).hide().attr({ unselectable: "on" }).menu("instance"), this._addClass(this.menu.element, "ui-autocomplete", "ui-front"), this._on(this.menu.element, { mousedown: function(t3) { 9386 t3.preventDefault(); 9387 }, menufocus: function(t3, e3) { 9388 var i3, s3; 9389 if (this.isNewMenu && (this.isNewMenu = false, t3.originalEvent && /^mouse/.test(t3.originalEvent.type))) 9390 return this.menu.blur(), void this.document.one("mousemove", function() { 9391 V(t3.target).trigger(t3.originalEvent); 9392 }); 9393 s3 = e3.item.data("ui-autocomplete-item"), false !== this._trigger("focus", t3, { item: s3 }) && t3.originalEvent && /^key/.test(t3.originalEvent.type) && this._value(s3.value), (i3 = e3.item.attr("aria-label") || s3.value) && String.prototype.trim.call(i3).length && (clearTimeout(this.liveRegionTimer), this.liveRegionTimer = this._delay(function() { 9394 this.liveRegion.html(V("<div>").text(i3)); 9395 }, 100)); 9396 }, menuselect: function(t3, e3) { 9397 var i3 = e3.item.data("ui-autocomplete-item"), s3 = this.previous; 9398 this.element[0] !== V.ui.safeActiveElement(this.document[0]) && (this.element.trigger("focus"), this.previous = s3, this._delay(function() { 9399 this.previous = s3, this.selectedItem = i3; 9400 })), false !== this._trigger("select", t3, { item: i3 }) && this._value(i3.value), this.term = this._value(), this.close(t3), this.selectedItem = i3; 9401 } }), this.liveRegion = V("<div>", { role: "status", "aria-live": "assertive", "aria-relevant": "additions" }).appendTo(this.document[0].body), this._addClass(this.liveRegion, null, "ui-helper-hidden-accessible"), this._on(this.window, { beforeunload: function() { 9402 this.element.removeAttr("autocomplete"); 9403 } }); 9404 }, _destroy: function() { 9405 clearTimeout(this.searching), this.element.removeAttr("autocomplete"), this.menu.element.remove(), this.liveRegion.remove(); 9406 }, _setOption: function(t2, e2) { 9407 this._super(t2, e2), "source" === t2 && this._initSource(), "appendTo" === t2 && this.menu.element.appendTo(this._appendTo()), "disabled" === t2 && e2 && this.xhr && this.xhr.abort(); 9408 }, _isEventTargetInWidget: function(t2) { 9409 var e2 = this.menu.element[0]; 9410 return t2.target === this.element[0] || t2.target === e2 || V.contains(e2, t2.target); 9411 }, _closeOnClickOutside: function(t2) { 9412 this._isEventTargetInWidget(t2) || this.close(); 9413 }, _appendTo: function() { 9414 var t2 = this.options.appendTo; 9415 return t2 = !(t2 = !(t2 = t2 && (t2.jquery || t2.nodeType ? V(t2) : this.document.find(t2).eq(0))) || !t2[0] ? this.element.closest(".ui-front, dialog") : t2).length ? this.document[0].body : t2; 9416 }, _initSource: function() { 9417 var i2, s2, n2 = this; 9418 Array.isArray(this.options.source) ? (i2 = this.options.source, this.source = function(t2, e2) { 9419 e2(V.ui.autocomplete.filter(i2, t2.term)); 9420 }) : "string" == typeof this.options.source ? (s2 = this.options.source, this.source = function(t2, e2) { 9421 n2.xhr && n2.xhr.abort(), n2.xhr = V.ajax({ url: s2, data: t2, dataType: "json", success: function(t3) { 9422 e2(t3); 9423 }, error: function() { 9424 e2([]); 9425 } }); 9426 }) : this.source = this.options.source; 9427 }, _searchTimeout: function(s2) { 9428 clearTimeout(this.searching), this.searching = this._delay(function() { 9429 var t2 = this.term === this._value(), e2 = this.menu.element.is(":visible"), i2 = s2.altKey || s2.ctrlKey || s2.metaKey || s2.shiftKey; 9430 t2 && (e2 || i2) || (this.selectedItem = null, this.search(null, s2)); 9431 }, this.options.delay); 9432 }, search: function(t2, e2) {
9433 return t2 = null != t2 ? t2 : this._value(), this.term = this._value(), t2.length < this.options.minLength ? this.close(e2) : false !== this._trigger("search", e2) ? this._search(t2) : void 0; 9434 }, _search: function(t2) { 9435 this.pending++, this._addClass("ui-autocomplete-loading"), this.cancelSearch = false, this.source({ term: t2 }, this._response()); 9436 }, _response: function() { 9437 var e2 = ++this.requestIndex; 9438 return function(t2) { 9439 e2 === this.requestIndex && this.__response(t2), this.pending--, this.pending || this._removeClass("ui-autocomplete-loading"); 9440 }.bind(this); 9441 }, __response: function(t2) { 9442 t2 = t2 && this._normalize(t2), this._trigger("response", null, { content: t2 }), !this.options.disabled && t2 && t2.length && !this.cancelSearch ? (this._suggest(t2), this._trigger("open")) : this._close(); 9443 }, close: function(t2) { 9444 this.cancelSearch = true, this._close(t2); 9445 }, _close: function(t2) { 9446 this._off(this.document, "mousedown"), this.menu.element.is(":visible") && (this.menu.element.hide(), this.menu.blur(), this.isNewMenu = true, this._trigger("close", t2)); 9447 }, _change: function(t2) { 9448 this.previous !== this._value() && this._trigger("change", t2, { item: this.selectedItem }); 9449 }, _normalize: function(t2) { 9450 return t2.length && t2[0].label && t2[0].value ? t2 : V.map(t2, function(t3) { 9451 return "string" == typeof t3 ? { label: t3, value: t3 } : V.extend({}, t3, { label: t3.label || t3.value, value: t3.value || t3.label }); 9452 }); 9453 }, _suggest: function(t2) { 9454 var e2 = this.menu.element.empty(); 9455 this._renderMenu(e2, t2), this.isNewMenu = true, this.menu.refresh(), e2.show(), this._resizeMenu(), e2.position(V.extend({ of: this.element }, this.options.position)), this.options.autoFocus && this.menu.next(), this._on(this.document, { mousedown: "_closeOnClickOutside" }); 9456 }, _resizeMenu: function() { 9457 var t2 = this.menu.element; 9458 t2.outerWidth(Math.max(t2.width("").outerWidth() + 1, this.element.outerWidth())); 9459 }, _renderMenu: function(i2, t2) { 9460 var s2 = this; 9461 V.each(t2, function(t3, e2) { 9462 s2._renderItemData(i2, e2); 9463 }); 9464 }, _renderItemData: function(t2, e2) { 9465 return this._renderItem(t2, e2).data("ui-autocomplete-item", e2); 9466 }, _renderItem: function(t2, e2) { 9467 return V("<li>").append(V("<div>").text(e2.label)).appendTo(t2); 9468 }, _move: function(t2, e2) { 9469 if (this.menu.element.is(":visible")) 9470 return this.menu.isFirstItem() && /^previous/.test(t2) || this.menu.isLastItem() && /^next/.test(t2) ? (this.isMultiLine || this._value(this.term), void this.menu.blur()) : void this.menu[t2](e2); 9471 this.search(null, e2); 9472 }, widget: function() { 9473 return this.menu.element; 9474 }, _value: function() { 9475 return this.valueMethod.apply(this.element, arguments); 9476 }, _keyEvent: function(t2, e2) { 9477 this.isMultiLine && !this.menu.element.is(":visible") || (this._move(t2, e2), e2.preventDefault()); 9478 }, _isContentEditable: function(t2) { 9479 if (!t2.length) 9480 return false; 9481 var e2 = t2.prop("contentEditable"); 9482 return "inherit" === e2 ? this._isContentEditable(t2.parent()) : "true" === e2; 9483 } }), V.extend(V.ui.autocomplete, { escapeRegex: function(t2) { 9484 return t2.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"); 9485 }, filter: function(t2, e2) { 9486 var i2 = new RegExp(V.ui.autocomplete.escapeRegex(e2), "i"); 9487 return V.grep(t2, function(t3) { 9488 return i2.test(t3.label || t3.value || t3); 9489 }); 9490 } }), V.widget("ui.autocomplete", V.ui.autocomplete, { options: { messages: { noResults: "No search results.", results: function(t2) { 9491 return t2 + (1 < t2 ? " results are" : " result is") + " available, use up and down arrow keys to navigate."; 9492 } } }, __response: function(t2) { 9493 var e2; 9494 this._superApply(arguments), this.options.disabled || this.cancelSearch || (e2 = t2 && t2.length ? this.options.messages.results(t2.length) : this.options.messages.noResults, clearTimeout(this.liveRegionTimer), this.liveRegionTimer = this._delay(function() { 9495 this.liveRegion.html(V("<div>").text(e2)); 9496 }, 100)); 9497 } }); 9498 V.ui.autocomplete; 9499 var m = /ui-corner-([a-z]){2,6}/g; 9500 V.widget("ui.controlgroup", { version: "1.13.2", defaultElement: "<div>", options: { direction: "horizontal", disabled: null, onlyVisible: true, items: { button: "input[type=button], input[type=submit], input[type=reset], button, a", controlgroupLabel: ".ui-controlgroup-label", checkboxradio: "input[type='checkbox'], input[type='radio']", selectmenu: "select", spinner: ".ui-spinner-input" } }, _create: function() { 9501 this._enhance(); 9502 }, _enhance: function() { 9503 this.element.attr("role", "toolbar"), this.refresh(); 9504 }, _destroy: function() { 9505 this._callChildMethod("destroy"), this.childWidgets.removeData("ui-controlgroup-data"), this.element.removeAttr("role"), this.options.items.controlgroupLabel && this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap(); 9506 }, _initWidgets: function() { 9507 var o2 = this, a2 = []; 9508 V.each(this.options.items, function(s2, t2) { 9509 var e2, n2 = {}; 9510 if (t2) 9511 return "controlgroupLabel" === s2 ? ((e2 = o2.element.find(t2)).each(function() { 9512 var t3 = V(this); 9513 t3.children(".ui-controlgroup-label-contents").length || t3.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>"); 9514 }), o2._addClass(e2, null, "ui-widget ui-widget-content ui-state-default"), void (a2 = a2.concat(e2.get()))) : void (V.fn[s2] && (n2 = o2["_" + s2 + "Options"] ? o2["_" + s2 + "Options"]("middle") : { classes: {} }, o2.element.find(t2).each(function() { 9515 var t3 = V(this), e3 = t3[s2]("instance"), i2 = V.widget.extend({}, n2); 9516 "button" === s2 && t3.parent(".ui-spinner").length || ((e3 = e3 || t3[s2]()[s2]("instance")) && (i2.classes = o2._resolveClassesValues(i2.classes, e3)), t3[s2](i2), i2 = t3[s2]("widget"), V.data(i2[0], "ui-controlgroup-data", e3 || t3[s2]("instance")), a2.push(i2[0])); 9517 }))); 9518 }), this.childWidgets = V(V.uniqueSort(a2)), this._addClass(this.childWidgets, "ui-controlgroup-item"); 9519 }, _callChildMethod: function(e2) { 9520 this.childWidgets.each(function() { 9521 var t2 = V(this).data("ui-controlgroup-data"); 9522 t2 && t2[e2] && t2[e2](); 9523 }); 9524 }, _updateCornerClass: function(t2, e2) { 9525 e2 = this._buildSimpleOptions(e2, "label").classes.label; 9526 this._removeClass(t2, null, "ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"), this._addClass(t2, null, e2); 9527 }, _buildSimpleOptions: function(t2, e2) { 9528 var i2 = "vertical" === this.options.direction, s2 = { classes: {} }; 9529 return s2.classes[e2] = { middle: "", first: "ui-corner-" + (i2 ? "top" : "left"), last: "ui-corner-" + (i2 ? "bottom" : "right"), only: "ui-corner-all" }[t2], s2; 9530 }, _spinnerOptions: function(t2) { 9531 t2 = this._buildSimpleOptions(t2, "ui-spinner"); 9532 return t2.classes["ui-spinner-up"] = "", t2.classes["ui-spinner-down"]
vendor: 5,212 bytes, lines 9532-9584
9532= "", t2; 9533 }, _buttonOptions: function(t2) { 9534 return this._buildSimpleOptions(t2, "ui-button"); 9535 }, _checkboxradioOptions: function(t2) { 9536 return this._buildSimpleOptions(t2, "ui-checkboxradio-label"); 9537 }, _selectmenuOptions: function(t2) { 9538 var e2 = "vertical" === this.options.direction; 9539 return { width: e2 && "auto", classes: { middle: { "ui-selectmenu-button-open": "", "ui-selectmenu-button-closed": "" }, first: { "ui-selectmenu-button-open": "ui-corner-" + (e2 ? "top" : "tl"), "ui-selectmenu-button-closed": "ui-corner-" + (e2 ? "top" : "left") }, last: { "ui-selectmenu-button-open": e2 ? "" : "ui-corner-tr", "ui-selectmenu-button-closed": "ui-corner-" + (e2 ? "bottom" : "right") }, only: { "ui-selectmenu-button-open": "ui-corner-top", "ui-selectmenu-button-closed": "ui-corner-all" } }[t2] }; 9540 }, _resolveClassesValues: function(i2, s2) { 9541 var n2 = {}; 9542 return V.each(i2, function(t2) { 9543 var e2 = s2.options.classes[t2] || "", e2 = String.prototype.trim.call(e2.replace(m, "")); 9544 n2[t2] = (e2 + " " + i2[t2]).replace(/\s+/g, " "); 9545 }), n2; 9546 }, _setOption: function(t2, e2) { 9547 "direction" === t2 && this._removeClass("ui-controlgroup-" + this.options.direction), this._super(t2, e2), "disabled" !== t2 ? this.refresh() : this._callChildMethod(e2 ? "disable" : "enable"); 9548 }, refresh: function() { 9549 var n2, o2 = this; 9550 this._addClass("ui-controlgroup ui-controlgroup-" + this.options.direction), "horizontal" === this.options.direction && this._addClass(null, "ui-helper-clearfix"), this._initWidgets(), n2 = this.childWidgets, (n2 = this.options.onlyVisible ? n2.filter(":visible") : n2).length && (V.each(["first", "last"], function(t2, e2) { 9551 var i2, s2 = n2[e2]().data("ui-controlgroup-data"); 9552 s2 && o2["_" + s2.widgetName + "Options"] ? ((i2 = o2["_" + s2.widgetName + "Options"](1 === n2.length ? "only" : e2)).classes = o2._resolveClassesValues(i2.classes, s2), s2.element[s2.widgetName](i2)) : o2._updateCornerClass(n2[e2](), e2); 9553 }), this._callChildMethod("refresh")); 9554 } }); 9555 V.widget("ui.checkboxradio", [V.ui.formResetMixin, { version: "1.13.2", options: { disabled: null, label: null, icon: true, classes: { "ui-checkboxradio-label": "ui-corner-all", "ui-checkboxradio-icon": "ui-corner-all" } }, _getCreateOptions: function() { 9556 var t2, e2 = this._super() || {}; 9557 return this._readType(), t2 = this.element.labels(), this.label = V(t2[t2.length - 1]), this.label.length || V.error("No label found for checkboxradio widget"), this.originalLabel = "", (t2 = this.label.contents().not(this.element[0])).length && (this.originalLabel += t2.clone().wrapAll("<div></div>").parent().html()), this.originalLabel && (e2.label = this.originalLabel), null != (t2 = this.element[0].disabled) && (e2.disabled = t2), e2; 9558 }, _create: function() { 9559 var t2 = this.element[0].checked; 9560 this._bindFormResetHandler(), null == this.options.disabled && (this.options.disabled = this.element[0].disabled), this._setOption("disabled", this.options.disabled), this._addClass("ui-checkboxradio", "ui-helper-hidden-accessible"), this._addClass(this.label, "ui-checkboxradio-label", "ui-button ui-widget"), "radio" === this.type && this._addClass(this.label, "ui-checkboxradio-radio-label"), this.options.label && this.options.label !== this.originalLabel ? this._updateLabel() : this.originalLabel && (this.options.label = this.originalLabel), this._enhance(), t2 && this._addClass(this.label, "ui-checkboxradio-checked", "ui-state-active"), this._on({ change: "_toggleClasses", focus: function() { 9561 this._addClass(this.label, null, "ui-state-focus ui-visual-focus"); 9562 }, blur: function() { 9563 this._removeClass(this.label, null, "ui-state-focus ui-visual-focus"); 9564 } }); 9565 }, _readType: function() { 9566 var t2 = this.element[0].nodeName.toLowerCase(); 9567 this.type = this.element[0].type, "input" === t2 && /radio|checkbox/.test(this.type) || V.error("Can't create checkboxradio on element.nodeName=" + t2 + " and element.type=" + this.type); 9568 }, _enhance: function() { 9569 this._updateIcon(this.element[0].checked); 9570 }, widget: function() { 9571 return this.label; 9572 }, _getRadioGroup: function() { 9573 var t2 = this.element[0].name, e2 = "input[name='" + V.escapeSelector(t2) + "']"; 9574 return t2 ? (this.form.length ? V(this.form[0].elements).filter(e2) : V(e2).filter(function() { 9575 return 0 === V(this)._form().length; 9576 })).not(this.element) : V([]); 9577 }, _toggleClasses: function() { 9578 var t2 = this.element[0].checked; 9579 this._toggleClass(this.label, "ui-checkboxradio-checked", "ui-state-active", t2), this.options.icon && "checkbox" === this.type && this._toggleClass(this.icon, null, "ui-icon-check ui-state-checked", t2)._toggleClass(this.icon, null, "ui-icon-blank", !t2), "radio" === this.type && this._getRadioGroup().each(function() { 9580 var t3 = V(this).checkboxradio("instance"); 9581 t3 && t3._removeClass(t3.label, "ui-checkboxradio-checked", "ui-state-active"); 9582 }); 9583 }, _destroy: function() { 9584 this._unbindFormResetHandler(), this.icon && (this.icon.remove(), this.iconS
vendor: 3,893 bytes, lines 9584-9616
9584pace.remove()); 9585 }, _setOption: function(t2, e2) { 9586 if ("label" !== t2 || e2) { 9587 if (this._super(t2, e2), "disabled" === t2) 9588 return this._toggleClass(this.label, null, "ui-state-disabled", e2), void (this.element[0].disabled = e2); 9589 this.refresh(); 9590 } 9591 }, _updateIcon: function(t2) { 9592 var e2 = "ui-icon ui-icon-background "; 9593 this.options.icon ? (this.icon || (this.icon = V("<span>"), this.iconSpace = V("<span> </span>"), this._addClass(this.iconSpace, "ui-checkboxradio-icon-space")), "checkbox" === this.type ? (e2 += t2 ? "ui-icon-check ui-state-checked" : "ui-icon-blank", this._removeClass(this.icon, null, t2 ? "ui-icon-blank" : "ui-icon-check")) : e2 += "ui-icon-blank", this._addClass(this.icon, "ui-checkboxradio-icon", e2), t2 || this._removeClass(this.icon, null, "ui-icon-check ui-state-checked"), this.icon.prependTo(this.label).after(this.iconSpace)) : void 0 !== this.icon && (this.icon.remove(), this.iconSpace.remove(), delete this.icon); 9594 }, _updateLabel: function() { 9595 var t2 = this.label.contents().not(this.element[0]); 9596 this.icon && (t2 = t2.not(this.icon[0])), (t2 = this.iconSpace ? t2.not(this.iconSpace[0]) : t2).remove(), this.label.append(this.options.label); 9597 }, refresh: function() { 9598 var t2 = this.element[0].checked, e2 = this.element[0].disabled; 9599 this._updateIcon(t2), this._toggleClass(this.label, "ui-checkboxradio-checked", "ui-state-active", t2), null !== this.options.label && this._updateLabel(), e2 !== this.options.disabled && this._setOptions({ disabled: e2 }); 9600 } }]); 9601 var _; 9602 V.ui.checkboxradio; 9603 V.widget("ui.button", { version: "1.13.2", defaultElement: "<button>", options: { classes: { "ui-button": "ui-corner-all" }, disabled: null, icon: null, iconPosition: "beginning", label: null, showLabel: true }, _getCreateOptions: function() { 9604 var t2, e2 = this._super() || {}; 9605 return this.isInput = this.element.is("input"), null != (t2 = this.element[0].disabled) && (e2.disabled = t2), this.originalLabel = this.isInput ? this.element.val() : this.element.html(), this.originalLabel && (e2.label = this.originalLabel), e2; 9606 }, _create: function() { 9607 !this.option.showLabel & !this.options.icon && (this.options.showLabel = true), null == this.options.disabled && (this.options.disabled = this.element[0].disabled || false), this.hasTitle = !!this.element.attr("title"), this.options.label && this.options.label !== this.originalLabel && (this.isInput ? this.element.val(this.options.label) : this.element.html(this.options.label)), this._addClass("ui-button", "ui-widget"), this._setOption("disabled", this.options.disabled), this._enhance(), this.element.is("a") && this._on({ keyup: function(t2) { 9608 t2.keyCode === V.ui.keyCode.SPACE && (t2.preventDefault(), this.element[0].click ? this.element[0].click() : this.element.trigger("click")); 9609 } }); 9610 }, _enhance: function() { 9611 this.element.is("button") || this.element.attr("role", "button"), this.options.icon && (this._updateIcon("icon", this.options.icon), this._updateTooltip()); 9612 }, _updateTooltip: function() { 9613 this.title = this.element.attr("title"), this.options.showLabel || this.title || this.element.attr("title", this.options.label); 9614 }, _updateIcon: function(t2, e2) { 9615 var i2 = "iconPosition" !== t2, s2 = i2 ? this.options.iconPosition : e2, t2 = "top" === s2 || "bottom" === s2; 9616 this.icon ? i2 && this._removeClass(this.icon, null, this.options.icon) : (this.icon = V("<span>"), this._addClass(this.icon, "ui-button-icon", "ui-icon"), this.options.showLabel || this._addClass("ui-button-icon-only")), i2 && this._addClass(this.icon, null, e2), this._attachIcon(s2), t2 ? (this._addClass(this.icon, null, "ui-widget-icon-block"), this.iconSpace && this.iconSpace.remove()) : (this.iconSpace || (this.iconSpace = V("<span> </span>
9616"), this._addClass(this.iconSpace, "ui-button-icon-space")), this._removeClass(this.icon, null, "ui-wiget-icon-block"), this._attachIconSpace(s2)); 9617 }, _destroy: function() { 9618 this.element.removeAttr("role"), this.icon && this.icon.remove(), this.iconSpace && this.iconSpace.remove(), this.hasTitle || this.element.removeAttr("title"); 9619 }, _attachIconSpace: function(t2) { 9620 this.icon[/^(?:end|bottom)/.test(t2) ? "before" : "after"](this.iconSpace); 9621 }, _attachIcon: function(t2) { 9622 this.element[/^(?:end|bottom)/.test(t2) ? "append" : "prepend"](this.icon); 9623 }, _setOptions: function(t2) { 9624 var e2 = (void 0 === t2.showLabel ? this.options : t2).showLabel, i2 = (void 0 === t2.icon ? this.options : t2).icon; 9625 e2 || i2 || (t2.showLabel = true), this._super(t2); 9626 }, _setOption: function(t2, e2) { 9627 "icon" === t2 && (e2 ? this._updateIcon(t2, e2) : this.icon && (this.icon.remove(), this.iconSpace && this.iconSpace.remove())), "iconPosition" === t2 && this._updateIcon(t2, e2), "showLabel" === t2 && (this._toggleClass("ui-button-icon-only", null, !e2), this._updateTooltip()), "label" === t2 && (this.isInput ? this.element.val(e2) : (this.element.html(e2), this.icon && (this._attachIcon(this.options.iconPosition), this._attachIconSpace(this.options.iconPosition)))), this._super(t2, e2), "disabled" === t2 && (this._toggleClass(null, "ui-state-disabled", e2), (this.element[0].disabled = e2) && this.element.trigger("blur")); 9628 }, refresh: function() { 9629 var t2 = this.element.is("input, button") ? this.element[0].disabled : this.element.hasClass("ui-button-disabled"); 9630 t2 !== this.options.disabled && this._setOptions({ disabled: t2 }), this._updateTooltip(); 9631 } }), false !== V.uiBackCompat && (V.widget("ui.button", V.ui.button, { options: { text: true, icons: { primary: null, secondary: null } }, _create: function() { 9632 this.options.showLabel && !this.options.text && (this.options.showLabel = this.options.text), !this.options.showLabel && this.options.text && (this.options.text = this.options.showLabel), this.options.icon || !this.options.icons.primary && !this.options.icons.secondary ? this.options.icon && (this.options.icons.primary = this.options.icon) : this.options.icons.primary ? this.options.icon = this.options.icons.primary : (this.options.icon = this.options.icons.secondary, this.options.iconPosition = "end"), this._super(); 9633 }, _setOption: function(t2, e2) { 9634 "text" !== t2 ? ("showLabel" === t2 && (this.options.text = e2), "icon" === t2 && (this.options.icons.primary = e2), "icons" === t2 && (e2.primary ? (this._super("icon", e2.primary), this._super("iconPosition", "beginning")) : e2.secondary && (this._super("icon", e2.secondary), this._super("iconPosition", "end"))), this._superApply(arguments)) : this._super("showLabel", e2); 9635 } }), V.fn.button = (_ = V.fn.button, function(i2) { 9636 var t2 = "string" == typeof i2, s2 = Array.prototype.slice.call(arguments, 1), n2 = this; 9637 return t2 ? this.length || "instance" !== i2 ? this.each(function() { 9638 var t3 = V(this).attr("type"), e2 = V.data(this, "ui-" + ("checkbox" !== t3 && "radio" !== t3 ? "button" : "checkboxradio")); 9639 return "instance" === i2 ? (n2 = e2, false) : e2 ? "function" != typeof e2[i2] || "_" === i2.charAt(0) ? V.error("no such method '" + i2 + "' for button widget instance") : (t3 = e2[i2].apply(e2, s2)) !== e2 && void 0 !== t3 ? (n2 = t3 && t3.jquery ? n2.pushStack(t3.get()) : t3, false) : void 0 : V.error("cannot call methods on button prior to initialization; attempted to call method '" + i2 + "'"); 9640 }) : n2 = void 0 : (s2.length && (i2 = V.widget.extend.apply(null, [i2].concat(s2))), this.each(function() { 9641 var t3 = V(this).attr("type"), e2 = "checkbox" !== t3 && "radio" !== t3 ? "button" : "checkboxradio", t3 = V.data(this, "ui-" + e2); 9642 t3 ? (t3.option(i2 || {}), t3._init && t3._init()) : "button" != e2 ? V(this).checkboxradio(V.extend({ icon: false }, i2)) : _.call(V(this), i2); 9643 })), n2; 9644 }), V.fn.buttonset = function() { 9645 return V.ui.controlgroup || V.error("Controlgroup widget missing"), "option" === arguments[0] && "items" === arguments[1] && arguments[2] ? this.controlgroup.apply(this, [arguments[0], "items.button", arguments[2]]) : "option" === arguments[0] && "items" === arguments[1] ? this.controlgroup.apply(this, [arguments[0], "items.button"]) : ("object" == typeof arguments[0] && arguments[0].items && (arguments[0].items = { button: arguments[0].items }), this.controlgroup.apply(this, arguments)); 9646 }); 9647 var v; 9648 V.ui.button; 9649 function b() { 9650 this._curInst = null, this._keyEvent = false, this._disabledInputs = [], this._datepickerShowing = false, this._inDialog = false, this._mainDivId = "ui-datepicker-div", this._inlineClass = "ui-datepicker-inline", this._appendClass = "ui-datepicker-append", this._triggerClass = "ui-datepicker-trigger", this._dialogClass = "ui-datepicker-dialog", this._disableClass = "ui-datepicker-disabled", this._unselectableClass = "ui-datepicker-unselectable", this._currentClass = "ui-datepicker-current-day", this._dayOverClass = "ui-datepicker-days-cell-over", this.regional = [], this.regional[""] = { closeText: "Done", prevText: "Prev", nextText: "Next", currentText: "Today", monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "
vendor: 6,490 bytes, lines 9650-9695
9650November", "December"], monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], weekHeader: "Wk", dateFormat: "mm/dd/yy", firstDay: 0, isRTL: false, showMonthAfterYear: false, yearSuffix: "", selectMonthLabel: "Select month", selectYearLabel: "Select year" }, this._defaults = { showOn: "focus", showAnim: "fadeIn", showOptions: {}, defaultDate: null, appendText: "", buttonText: "...", buttonImage: "", buttonImageOnly: false, hideIfNoPrevNext: false, navigationAsDateFormat: false, gotoCurrent: false, changeMonth: false, changeYear: false, yearRange: "c-10:c+10", showOtherMonths: false, selectOtherMonths: false, showWeek: false, calculateWeek: this.iso8601Week, shortYearCutoff: "+10", minDate: null, maxDate: null, duration: "fast", beforeShowDay: null, beforeShow: null, onSelect: null, onChangeMonthYear: null, onClose: null, onUpdateDatepicker: null, numberOfMonths: 1, showCurrentAtPos: 0, stepMonths: 1, stepBigMonths: 12, altField: "", altFormat: "", constrainInput: true, showButtonPanel: false, autoSize: false, disabled: false }, V.extend(this._defaults, this.regional[""]), this.regional.en = V.extend(true, {}, this.regional[""]), this.regional["en-US"] = V.extend(true, {}, this.regional.en), this.dpDiv = y(V("<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")); 9651 } 9652 function y(t2) { 9653 var e2 = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a"; 9654 return t2.on("mouseout", e2, function() { 9655 V(this).removeClass("ui-state-hover"), -1 !== this.className.indexOf("ui-datepicker-prev") && V(this).removeClass("ui-datepicker-prev-hover"), -1 !== this.className.indexOf("ui-datepicker-next") && V(this).removeClass("ui-datepicker-next-hover"); 9656 }).on("mouseover", e2, w); 9657 } 9658 function w() { 9659 V.datepicker._isDisabledDatepicker((v.inline ? v.dpDiv.parent() : v.input)[0]) || (V(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"), V(this).addClass("ui-state-hover"), -1 !== this.className.indexOf("ui-datepicker-prev") && V(this).addClass("ui-datepicker-prev-hover"), -1 !== this.className.indexOf("ui-datepicker-next") && V(this).addClass("ui-datepicker-next-hover")); 9660 } 9661 function P(t2, e2) { 9662 for (var i2 in V.extend(t2, e2), e2) 9663 null == e2[i2] && (t2[i2] = e2[i2]); 9664 return t2; 9665 } 9666 V.extend(V.ui, { datepicker: { version: "1.13.2" } }), V.extend(b.prototype, { markerClassName: "hasDatepicker", maxRows: 4, _widgetDatepicker: function() { 9667 return this.dpDiv; 9668 }, setDefaults: function(t2) { 9669 return P(this._defaults, t2 || {}), this; 9670 }, _attachDatepicker: function(t2, e2) { 9671 var i2, s2 = t2.nodeName.toLowerCase(), n2 = "div" === s2 || "span" === s2; 9672 t2.id || (this.uuid += 1, t2.id = "dp" + this.uuid), (i2 = this._newInst(V(t2), n2)).settings = V.extend({}, e2 || {}), "input" === s2 ? this._connectDatepicker(t2, i2) : n2 && this._inlineDatepicker(t2, i2); 9673 }, _newInst: function(t2, e2) { 9674 return { id: t2[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1"), input: t2, selectedDay: 0, selectedMonth: 0, selectedYear: 0, drawMonth: 0, drawYear: 0, inline: e2, dpDiv: e2 ? y(V("<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")) : this.dpDiv }; 9675 }, _connectDatepicker: function(t2, e2) { 9676 var i2 = V(t2); 9677 e2.append = V([]), e2.trigger = V([]), i2.hasClass(this.markerClassName) || (this._attachments(i2, e2), i2.addClass(this.markerClassName).on("keydown", this._doKeyDown).on("keypress", this._doKeyPress).on("keyup", this._doKeyUp), this._autoSize(e2), V.data(t2, "datepicker", e2), e2.settings.disabled && this._disableDatepicker(t2)); 9678 }, _attachments: function(t2, e2) { 9679 var i2, s2 = this._get(e2, "appendText"), n2 = this._get(e2, "isRTL"); 9680 e2.append && e2.append.remove(), s2 && (e2.append = V("<span>").addClass(this._appendClass).text(s2), t2[n2 ? "before" : "after"](e2.append)), t2.off("focus", this._showDatepicker), e2.trigger && e2.trigger.remove(), "focus" !== (i2 = this._get(e2, "showOn")) && "both" !== i2 || t2.on("focus", this._showDatepicker), "button" !== i2 && "both" !== i2 || (s2 = this._get(e2, "buttonText"), i2 = this._get(e2, "buttonImage"), this._get(e2, "buttonImageOnly") ? e2.trigger = V("<img>").addClass(this._triggerClass).attr({ src: i2, alt: s2, title: s2 }) : (e2.trigger = V("<button type='button'>").addClass(this._triggerClass), i2 ? e2.trigger.html(V("<img>").attr({ src: i2, alt: s2, title: s2 })) : e2.trigger.text(s2)), t2[n2 ? "before" : "after"](e2.trigger), e2.trigger.on("click", function() { 9681 return V.datepicker._datepickerShowing && V.datepicker._lastInput === t2[0] ? V.datepicker._hideDatepicker() : (V.datepicker._datepickerShowing && V.datepicker._lastInput !== t2[0] && V.datepicker._hideDatepicker(), V.datepicker._showDatepicker(t2[0])), false; 9682 })); 9683 }, _autoSize: function(t2) { 9684 var e2, i2, s2, n2, o2, a2; 9685 this._get(t2, "autoSize") && !t2.inline && (o2 = new Date(2009, 11, 20), (a2 = this._get(t2, "dateFormat")).match(/[DM]/) && (e2 = function(t3) { 9686 for (n2 = s2 = i2 = 0; n2 < t3.length; n2++) 9687 t3[n2].length > i2 && (i2 = t3[n2].length, s2 = n2); 9688 return s2; 9689 }, o2.setMonth(e2(this._get(t2, a2.match(/MM/) ? "monthNames" : "monthNamesShort"))), o2.setDate(e2(this._get(t2, a2.match(/DD/) ? "dayNames" : "dayNamesShort")) + 20 - o2.getDay())), t2.input.attr("size", this._formatDate(t2, o2).length)); 9690 }, _inlineDatepicker: function(t2, e2) { 9691 var i2 = V(t2); 9692 i2.hasClass(this.markerClassName) || (i2.addClass(this.markerClassName).append(e2.dpDiv), V.data(t2, "datepicker", e2), this._setDate(e2, this._getDefaultDate(e2), true), this._updateDatepicker(e2), this._updateAlternate(e2), e2.settings.disabled && this._disableDatepicker(t2), e2.dpDiv.css("display", "block")); 9693 }, _dialogDatepicker: function(t2, e2, i2, s2, n2) { 9694 var o2, a2 = this._dialogInst; 9695 return a2 || (this.uuid += 1, o2 = "dp" + this.uuid, this._dialogInput = V("<input type='text' id='" + o2 + "' style='position: absolute; top: -100px; width: 0px;'/>
9695"), this._dialogInput.on("keydown", this._doKeyDown), V("body").append(this._dialogInput), (a2 = this._dialogInst = this._newInst(this._dialogInput, false)).settings = {}, V.data(this._dialogInput[0], "datepicker", a2)), P(a2.settings, s2 || {}), e2 = e2 && e2.constructor === Date ? this._formatDate(a2, e2) : e2, this._dialogInput.val(e2), this._pos = n2 ? n2.length ? n2 : [n2.pageX, n2.pageY] : null, this._pos || (o2 = document.documentElement.clientWidth, s2 = document.documentElement.clientHeight, e2 = document.documentElement.scrollLeft || document.body.scrollLeft, n2 = document.documentElement.scrollTop || document.body.scrollTop, this._pos = [o2 / 2 - 100 + e2, s2 / 2 - 150 + n2]), this._dialogInput.css("left", this._pos[0] + 20 + "px").css("top", this._pos[1] + "px"), a2.settings.onSelect = i2, this._inDialog = true, this.dpDiv.addClass(this._dialogClass), this._showDatepicker(this._dialogInput[0]), V.blockUI && V.blockUI(this.dpDiv), V.data(this._dialogInput[0], "datepicker", a2), this; 9696 }, _destroyDatepicker: function(t2) { 9697 var e2, i2 = V(t2), s2 = V.data(t2, "datepicker"); 9698 i2.hasClass(this.markerClassName) && (e2 = t2.nodeName.toLowerCase(), V.removeData(t2, "datepicker"), "input" === e2 ? (s2.append.remove(), s2.trigger.remove(), i2.removeClass(this.markerClassName).off("focus", this._showDatepicker).off("keydown", this._doKeyDown).off("keypress", this._doKeyPress).off("keyup", this._doKeyUp)) : "div" !== e2 && "span" !== e2 || i2.removeClass(this.markerClassName).empty(), v === s2 && (v = null, this._curInst = null)); 9699 }, _enableDatepicker: function(e2) { 9700 var t2, i2 = V(e2), s2 = V.data(e2, "datepicker"); 9701 i2.hasClass(this.markerClassName) && ("input" === (t2 = e2.nodeName.toLowerCase()) ? (e2.disabled = false, s2.trigger.filter("button").each(function() { 9702 this.disabled = false; 9703 }).end().filter("img").css({ opacity: "1.0", cursor: "" })) : "div" !== t2 && "span" !== t2 || ((i2 = i2.children("." + this._inlineClass)).children().removeClass("ui-state-disabled"), i2.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", false)), this._disabledInputs = V.map(this._disabledInputs, function(t3) { 9704 return t3 === e2 ? null : t3; 9705 })); 9706 }, _disableDatepicker: function(e2) { 9707 var t2, i2 = V(e2), s2 = V.data(e2, "datepicker"); 9708 i2.hasClass(this.markerClassName) && ("input" === (t2 = e2.nodeName.toLowerCase()) ? (e2.disabled = true, s2.trigger.filter("button").each(function() { 9709 this.disabled = true; 9710 }).end().filter("img").css({ opacity: "0.5", cursor: "default" })) : "div" !== t2 && "span" !== t2 || ((i2 = i2.children("." + this._inlineClass)).children().addClass("ui-state-disabled"), i2.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", true)), this._disabledInputs = V.map(this._disabledInputs, function(t3) { 9711 return t3 === e2 ? null : t3; 9712 }), this._disabledInputs[this._disabledInputs.length] = e2); 9713 }, _isDisabledDatepicker: function(t2) { 9714 if (!t2) 9715 return false; 9716 for (var e2 = 0; e2 < this._disabledInputs.length; e2++) 9717 if (this._disabledInputs[e2] === t2) 9718 return true; 9719 return false; 9720 }, _getInst: function(t2) { 9721 try { 9722 return V.data(t2, "datepicker"); 9723 } catch (t3) { 9724 throw "Missing instance data for this datepicker"; 9725 } 9726 }, _optionDatepicker: function(t2, e2, i2) { 9727 var s2, n2, o2 = this._getInst(t2); 9728 if (2 === arguments.length && "string" == typeof e2) 9729 return "defaults" === e2 ? V.extend({}, V.datepicker._defaults) : o2 ? "all" === e2 ? V.extend({}, o2.settings) : this._get(o2, e2) : null; 9730 s2 = e2 || {}, "string" == typeof e2 && ((s2 = {})[e2] = i2), o2 && (this._curInst === o2 && this._hideDatepicker(), n2 = this._getDateDatepicker(t2, true), e2 = this._getMinMaxDate(o2, "min"), i2 = this._getMinMaxDate(o2, "max"), P(o2.settings, s2), null !== e2 && void 0 !== s2.dateFormat && void 0 === s2.minDate && (o2.settings.minDate = this._formatDate(o2, e2)), null !== i2 && void 0 !== s2.dateFormat && void 0 === s2.maxDate && (o2.settings.maxDate = this._formatDate(o2, i2)), "disabled" in s2 && (s2.disabled ? this._disableDatepicker(t2) : this._enableDatepicker(t2)), this._attachments(V(t2), o2), this._autoSize(o2), this._setDate(o2, n2), this._updateAlternate(o2), this._updateDatepicker(o2)); 9731 }, _changeDatepicker: function(t2, e2, i2) { 9732 this._optionDatepicker(t2, e2, i2); 9733 }, _refreshDatepicker: function(t2) { 9734 t2 = this._getInst(t2); 9735 t2 && this._updateDatepicker(t2); 9736 }, _setDateDatepicker: function(t2, e2) { 9737 t2 = this._getInst(t2); 9738 t2 && (this._setDate(t2, e2), this._updateDatepicker(t2), this._updateAlternate(t2)); 9739 }, _getDateDatepicker: function(t2, e2) { 9740 t2 = this._getInst(t2); 9741 return t2 && !t2.inline && this._setDateFromField(t2, e2), t2 ? this._getDate(t2) : null; 9742 }, _doKeyDown: function(t2) { 9743 var e2, i2, s2 = V.datepicker._getInst(t2.target), n2 = true, o2 = s2.d
vendor: 13,867 bytes, lines 9743-9892
9743pDiv.is(".ui-datepicker-rtl"); 9744 if (s2._keyEvent = true, V.datepicker._datepickerShowing) 9745 switch (t2.keyCode) { 9746 case 9: 9747 V.datepicker._hideDatepicker(), n2 = false; 9748 break; 9749 case 13: 9750 return (i2 = V("td." + V.datepicker._dayOverClass + ":not(." + V.datepicker._currentClass + ")", s2.dpDiv))[0] && V.datepicker._selectDay(t2.target, s2.selectedMonth, s2.selectedYear, i2[0]), (e2 = V.datepicker._get(s2, "onSelect")) ? (i2 = V.datepicker._formatDate(s2), e2.apply(s2.input ? s2.input[0] : null, [i2, s2])) : V.datepicker._hideDatepicker(), false; 9751 case 27: 9752 V.datepicker._hideDatepicker(); 9753 break; 9754 case 33: 9755 V.datepicker._adjustDate(t2.target, t2.ctrlKey ? -V.datepicker._get(s2, "stepBigMonths") : -V.datepicker._get(s2, "stepMonths"), "M"); 9756 break; 9757 case 34: 9758 V.datepicker._adjustDate(t2.target, t2.ctrlKey ? +V.datepicker._get(s2, "stepBigMonths") : +V.datepicker._get(s2, "stepMonths"), "M"); 9759 break; 9760 case 35: 9761 (t2.ctrlKey || t2.metaKey) && V.datepicker._clearDate(t2.target), n2 = t2.ctrlKey || t2.metaKey; 9762 break; 9763 case 36: 9764 (t2.ctrlKey || t2.metaKey) && V.datepicker._gotoToday(t2.target), n2 = t2.ctrlKey || t2.metaKey; 9765 break; 9766 case 37: 9767 (t2.ctrlKey || t2.metaKey) && V.datepicker._adjustDate(t2.target, o2 ? 1 : -1, "D"), n2 = t2.ctrlKey || t2.metaKey, t2.originalEvent.altKey && V.datepicker._adjustDate(t2.target, t2.ctrlKey ? -V.datepicker._get(s2, "stepBigMonths") : -V.datepicker._get(s2, "stepMonths"), "M"); 9768 break; 9769 case 38: 9770 (t2.ctrlKey || t2.metaKey) && V.datepicker._adjustDate(t2.target, -7, "D"), n2 = t2.ctrlKey || t2.metaKey; 9771 break; 9772 case 39: 9773 (t2.ctrlKey || t2.metaKey) && V.datepicker._adjustDate(t2.target, o2 ? -1 : 1, "D"), n2 = t2.ctrlKey || t2.metaKey, t2.originalEvent.altKey && V.datepicker._adjustDate(t2.target, t2.ctrlKey ? +V.datepicker._get(s2, "stepBigMonths") : +V.datepicker._get(s2, "stepMonths"), "M"); 9774 break; 9775 case 40: 9776 (t2.ctrlKey || t2.metaKey) && V.datepicker._adjustDate(t2.target, 7, "D"), n2 = t2.ctrlKey || t2.metaKey; 9777 break; 9778 default: 9779 n2 = false; 9780 } 9781 else 9782 36 === t2.keyCode && t2.ctrlKey ? V.datepicker._showDatepicker(this) : n2 = false; 9783 n2 && (t2.preventDefault(), t2.stopPropagation()); 9784 }, _doKeyPress: function(t2) { 9785 var e2, i2 = V.datepicker._getInst(t2.target); 9786 if (V.datepicker._get(i2, "constrainInput")) 9787 return e2 = V.datepicker._possibleChars(V.datepicker._get(i2, "dateFormat")), i2 = String.fromCharCode(null == t2.charCode ? t2.keyCode : t2.charCode), t2.ctrlKey || t2.metaKey || i2 < " " || !e2 || -1 < e2.indexOf(i2); 9788 }, _doKeyUp: function(t2) { 9789 t2 = V.datepicker._getInst(t2.target); 9790 if (t2.input.val() !== t2.lastVal) 9791 try { 9792 V.datepicker.parseDate(V.datepicker._get(t2, "dateFormat"), t2.input ? t2.input.val() : null, V.datepicker._getFormatConfig(t2)) && (V.datepicker._setDateFromField(t2), V.datepicker._updateAlternate(t2), V.datepicker._updateDatepicker(t2)); 9793 } catch (t3) { 9794 } 9795 return true; 9796 }, _showDatepicker: function(t2) { 9797 var e2, i2, s2, n2; 9798 "input" !== (t2 = t2.target || t2).nodeName.toLowerCase() && (t2 = V("input", t2.parentNode)[0]), V.datepicker._isDisabledDatepicker(t2) || V.datepicker._lastInput === t2 || (n2 = V.datepicker._getInst(t2), V.datepicker._curInst && V.datepicker._curInst !== n2 && (V.datepicker._curInst.dpDiv.stop(true, true), n2 && V.datepicker._datepickerShowing && V.datepicker._hideDatepicker(V.datepicker._curInst.input[0])), false !== (i2 = (s2 = V.datepicker._get(n2, "beforeShow")) ? s2.apply(t2, [t2, n2]) : {}) && (P(n2.settings, i2), n2.lastVal = null, V.datepicker._lastInput = t2, V.datepicker._setDateFromField(n2), V.datepicker._inDialog && (t2.value = ""), V.datepicker._pos || (V.datepicker._pos = V.datepicker._findPos(t2), V.datepicker._pos[1] += t2.offsetHeight), e2 = false, V(t2).parents().each(function() { 9799 return !(e2 |= "fixed" === V(this).css("position")); 9800 }), s2 = { left: V.datepicker._pos[0], top: V.datepicker._pos[1] }, V.datepicker._pos = null, n2.dpDiv.empty(), n2.dpDiv.css({ position: "absolute", display: "block", top: "-1000px" }), V.datepicker._updateDatepicker(n2), s2 = V.datepicker._checkOffset(n2, s2, e2), n2.dpDiv.css({ position: V.datepicker._inDialog && V.blockUI ? "static" : e2 ? "fixed" : "absolute", display: "none", left: s2.left + "px", top: s2.top + "px" }), n2.inline || (i2 = V.datepicker._get(n2, "showAnim"), s2 = V.datepicker._get(n2, "duration"), n2.dpDiv.css("z-index", function(t3) { 9801 for (var e3, i3; t3.length && t3[0] !== document; ) { 9802 if (("absolute" === (e3 = t3.css("position")) || "relative" === e3 || "fixed" === e3) && (i3 = parseInt(t3.css("zIndex"), 10), !isNaN(i3) && 0 !== i3)) 9803 return i3; 9804 t3 = t3.parent(); 9805 } 9806 return 0; 9807 }(V(t2)) + 1), V.datepicker._datepickerShowing = true, V.effects && V.effects.effect[i2] ? n2.dpDiv.show(i2, V.datepicker._get(n2, "showOptions"), s2) : n2.dpDiv[i2 || "show"](i2 ? s2 : null), V.datepicker._shouldFocusInput(n2) && n2.input.trigger("focus"), V.datepicker._curInst = n2))); 9808 }, _updateDatepicker: function(t2) { 9809 this.maxRows = 4, (v = t2).dpDiv.empty().append(this._generateHTML(t2)), this._attachHandlers(t2); 9810 var e2, i2 = this._getNumberOfMonths(t2), s2 = i2[1], n2 = t2.dpDiv.find("." + this._dayOverClass + " a"), o2 = V.datepicker._get(t2, "onUpdateDatepicker"); 9811 0 < n2.length && w.apply(n2.get(0)), t2.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""), 1 < s2 && t2.dpDiv.addClass("ui-datepicker-multi-" + s2).css("width", 17 * s2 + "em"), t2.dpDiv[(1 !== i2[0] || 1 !== i2[1] ? "add" : "remove") + "Class"]("ui-datepicker-multi"), t2.dpDiv[(this._get(t2, "isRTL") ? "add" : "remove") + "Class"]("ui-datepicker-rtl"), t2 === V.datepicker._curInst && V.datepicker._datepickerShowing && V.datepicker._shouldFocusInput(t2) && t2.input.trigger("focus"), t2.yearshtml && (e2 = t2.yearshtml, setTimeout(function() { 9812 e2 === t2.yearshtml && t2.yearshtml && t2.dpDiv.find("select.ui-datepicker-year").first().replaceWith(t2.yearshtml), e2 = t2.yearshtml = null; 9813 }, 0)), o2 && o2.apply(t2.input ? t2.input[0] : null, [t2]); 9814 }, _shouldFocusInput: function(t2) { 9815 return t2.input && t2.input.is(":visible") && !t2.input.is(":disabled") && !t2.input.is(":focus"); 9816 }, _checkOffset: function(t2, e2, i2) { 9817 var s2 = t2.dpDiv.outerWidth(), n2 = t2.dpDiv.outerHeight(), o2 = t2.input ? t2.input.outerWidth() : 0, a2 = t2.input ? t2.input.outerHeight() : 0, r2 = document.documentElement.clientWidth + (i2 ? 0 : V(document).scrollLeft()), l2 = document.documentElement.clientHeight + (i2 ? 0 : V(document).scrollTop()); 9818 return e2.left -= this._get(t2, "isRTL") ? s2 - o2 : 0, e2.left -= i2 && e2.left === t2.input.offset().left ? V(document).scrollLeft() : 0, e2.top -= i2 && e2.top === t2.input.offset().top + a2 ? V(document).scrollTop() : 0, e2.left -= Math.min(e2.left, e2.left + s2 > r2 && s2 < r2 ? Math.abs(e2.left + s2 - r2) : 0), e2.top -= Math.min(e2.top, e2.top + n2 > l2 && n2 < l2 ? Math.abs(n2 + a2) : 0), e2; 9819 }, _findPos: function(t2) { 9820 for (var e2 = this._getInst(t2), i2 = this._get(e2, "isRTL"); t2 && ("hidden" === t2.type || 1 !== t2.nodeType || V.expr.pseudos.hidden(t2)); ) 9821 t2 = t2[i2 ? "previousSibling" : "nextSibling"]; 9822 return [(e2 = V(t2).offset()).left, e2.top]; 9823 }, _hideDatepicker: function(t2) { 9824 var e2, i2, s2 = this._curInst; 9825 !s2 || t2 && s2 !== V.data(t2, "datepicker") || this._datepickerShowing && (e2 = this._get(s2, "showAnim"), i2 = this._get(s2, "duration"), t2 = function() { 9826 V.datepicker._tidyDialog(s2); 9827 }, V.effects && (V.effects.effect[e2] || V.effects[e2]) ? s2.dpDiv.hide(e2, V.datepicker._get(s2, "showOptions"), i2, t2) : s2.dpDiv["slideDown" === e2 ? "slideUp" : "fadeIn" === e2 ? "fadeOut" : "hide"](e2 ? i2 : null, t2), e2 || t2(), this._datepickerShowing = false, (t2 = this._get(s2, "onClose")) && t2.apply(s2.input ? s2.input[0] : null, [s2.input ? s2.input.val() : "", s2]), this._lastInput = null, this._inDialog && (this._dialogInput.css({ position: "absolute", left: "0", top: "-100px" }), V.blockUI && (V.unblockUI(), V("body").append(this.dpDiv))), this._inDialog = false); 9828 }, _tidyDialog: function(t2) { 9829 t2.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar"); 9830 }, _checkExternalClick: function(t2) { 9831 var e2; 9832 V.datepicker._curInst && (e2 = V(t2.target), t2 = V.datepicker._getInst(e2[0]), (e2[0].id === V.datepicker._mainDivId || 0 !== e2.parents("#" + V.datepicker._mainDivId).length || e2.hasClass(V.datepicker.markerClassName) || e2.closest("." + V.datepicker._triggerClass).length || !V.datepicker._datepickerShowing || V.datepicker._inDialog && V.blockUI) && (!e2.hasClass(V.datepicker.markerClassName) || V.datepicker._curInst === t2) || V.datepicker._hideDatepicker()); 9833 }, _adjustDate: function(t2, e2, i2) { 9834 var s2 = V(t2), t2 = this._getInst(s2[0]); 9835 this._isDisabledDatepicker(s2[0]) || (this._adjustInstDate(t2, e2, i2), this._updateDatepicker(t2)); 9836 }, _gotoToday: function(t2) { 9837 var e2 = V(t2), i2 = this._getInst(e2[0]); 9838 this._get(i2, "gotoCurrent") && i2.currentDay ? (i2.selectedDay = i2.currentDay, i2.drawMonth = i2.selectedMonth = i2.currentMonth, i2.drawYear = i2.selectedYear = i2.currentYear) : (t2 = new Date(), i2.selectedDay = t2.getDate(), i2.drawMonth = i2.selectedMonth = t2.getMonth(), i2.drawYear = i2.selectedYear = t2.getFullYear()), this._notifyChange(i2), this._adjustDate(e2); 9839 }, _selectMonthYear: function(t2, e2, i2) { 9840 var s2 = V(t2), t2 = this._getInst(s2[0]); 9841 t2["selected" + ("M" === i2 ? "Month" : "Year")] = t2["draw" + ("M" === i2 ? "Month" : "Year")] = parseInt(e2.options[e2.selectedIndex].value, 10), this._notifyChange(t2), this._adjustDate(s2); 9842 }, _selectDay: function(t2, e2, i2, s2) { 9843 var n2 = V(t2); 9844 V(s2).hasClass(this._unselectableClass) || this._isDisabledDatepicker(n2[0]) || ((n2 = this._getInst(n2[0])).selectedDay = n2.currentDay = parseInt(V("a", s2).attr("data-date")), n2.selectedMonth = n2.currentMonth = e2, n2.selectedYear = n2.currentYear = i2, this._selectDate(t2, this._formatDate(n2, n2.currentDay, n2.currentMonth, n2.currentYear))); 9845 }, _clearDate: function(t2) { 9846 t2 = V(t2); 9847 this._selectDate(t2, ""); 9848 }, _selectDate: function(t2, e2) { 9849 var i2 = V(t2), t2 = this._getInst(i2[0]); 9850 e2 = null != e2 ? e2 : this._formatDate(t2), t2.input && t2.input.val(e2), this._updateAlternate(t2), (i2 = this._get(t2, "onSelect")) ? i2.apply(t2.input ? t2.input[0] : null, [e2, t2]) : t2.input && t2.input.trigger("change"), t2.inline ? this._updateDatepicker(t2) : (this._hideDatepicker(), this._lastInput = t2.input[0], "object" != typeof t2.input[0] && t2.input.trigger("focus"), this._lastInput = null); 9851 }, _updateAlternate: function(t2) { 9852 var e2, i2, s2 = this._get(t2, "altField"); 9853 s2 && (e2 = this._get(t2, "altFormat") || this._get(t2, "dateFormat"), i2 = this._getDate(t2), t2 = this.formatDate(e2, i2, this._getFormatConfig(t2)), V(document).find(s2).val(t2)); 9854 }, noWeekends: function(t2) { 9855 t2 = t2.getDay(); 9856 return [0 < t2 && t2 < 6, ""]; 9857 }, iso8601Week: function(t2) { 9858 var e2 = new Date(t2.getTime()); 9859 return e2.setDate(e2.getDate() + 4 - (e2.getDay() || 7)), t2 = e2.getTime(), e2.setMonth(0), e2.setDate(1), Math.floor(Math.round((t2 - e2) / 864e5) / 7) + 1; 9860 }, parseDate: function(e2, n2, t2) { 9861 if (null == e2 || null == n2) 9862 throw "Invalid arguments"; 9863 if ("" === (n2 = "object" == typeof n2 ? n2.toString() : n2 + "")) 9864 return null; 9865 for (var i2, s2, o2, a2 = 0, r2 = (t2 ? t2.shortYearCutoff : null) || this._defaults.shortYearCutoff, r2 = "string" != typeof r2 ? r2 : new Date().getFullYear() % 100 + parseInt(r2, 10), l2 = (t2 ? t2.dayNamesShort : null) || this._defaults.dayNamesShort, h2 = (t2 ? t2.dayNames : null) || this._defaults.dayNames, c2 = (t2 ? t2.monthNamesShort : null) || this._defaults.monthNamesShort, u2 = (t2 ? t2.monthNames : null) || this._defaults.monthNames, d2 = -1, p2 = -1, f2 = -1, g2 = -1, m2 = false, _2 = function(t3) { 9866 t3 = w2 + 1 < e2.length && e2.charAt(w2 + 1) === t3; 9867 return t3 && w2++, t3; 9868 }, v2 = function(t3) { 9869 var e3 = _2(t3), e3 = "@" === t3 ? 14 : "!" === t3 ? 20 : "y" === t3 && e3 ? 4 : "o" === t3 ? 3 : 2, e3 = new RegExp("^\\d{" + ("y" === t3 ? e3 : 1) + "," + e3 + "}"), e3 = n2.substring(a2).match(e3); 9870 if (!e3) 9871 throw "Missing number at position " + a2; 9872 return a2 += e3[0].length, parseInt(e3[0], 10); 9873 }, b2 = function(t3, e3, i3) { 9874 var s3 = -1, e3 = V.map(_2(t3) ? i3 : e3, function(t4, e4) { 9875 return [[e4, t4]]; 9876 }).sort(function(t4, e4) { 9877 return -(t4[1].length - e4[1].length); 9878 }); 9879 if (V.each(e3, function(t4, e4) { 9880 var i4 = e4[1]; 9881 if (n2.substr(a2, i4.length).toLowerCase() === i4.toLowerCase()) 9882 return s3 = e4[0], a2 += i4.length, false; 9883 }), -1 !== s3) 9884 return s3 + 1; 9885 throw "Unknown name at position " + a2; 9886 }, y2 = function() { 9887 if (n2.charAt(a2) !== e2.charAt(w2)) 9888 throw "Unexpected literal at position " + a2; 9889 a2++; 9890 }, w2 = 0; w2 < e2.length; w2++) 9891 if (m2) 9892 "'" !== e2.charAt(w2) || _2("'") ? y2() : m2 = false;
9893 else 9894 switch (e2.charAt(w2)) { 9895 case "d": 9896 f2 = v2("d"); 9897 break; 9898 case "D": 9899 b2("D", l2, h2); 9900 break; 9901 case "o": 9902 g2 = v2("o"); 9903 break; 9904 case "m": 9905 p2 = v2("m"); 9906 break; 9907 case "M": 9908 p2 = b2("M", c2, u2); 9909 break; 9910 case "y": 9911 d2 = v2("y"); 9912 break; 9913 case "@": 9914 d2 = (o2 = new Date(v2("@"))).getFullYear(), p2 = o2.getMonth() + 1, f2 = o2.getDate(); 9915 break; 9916 case "!": 9917 d2 = (o2 = new Date((v2("!") - this._ticksTo1970) / 1e4)).getFullYear(), p2 = o2.getMonth() + 1, f2 = o2.getDate(); 9918 break; 9919 case "'": 9920 _2("'") ? y2() : m2 = true; 9921 break; 9922 default: 9923 y2(); 9924 } 9925 if (a2 < n2.length && (s2 = n2.substr(a2), !/^\s+/.test(s2))) 9926 throw "Extra/unparsed characters found in date: " + s2; 9927 if (-1 === d2 ? d2 = new Date().getFullYear() : d2 < 100 && (d2 += new Date().getFullYear() - new Date().getFullYear() % 100 + (d2 <= r2 ? 0 : -100)), -1 < g2) 9928 for (p2 = 1, f2 = g2; ; ) { 9929 if (f2 <= (i2 = this._getDaysInMonth(d2, p2 - 1))) 9930 break; 9931 p2++, f2 -= i2; 9932 } 9933 if ((o2 = this._daylightSavingAdjust(new Date(d2, p2 - 1, f2))).getFullYear() !== d2 || o2.getMonth() + 1 !== p2 || o2.getDate() !== f2) 9934 throw "Invalid date"; 9935 return o2; 9936 }, ATOM: "yy-mm-dd", COOKIE: "D, dd M yy", ISO_8601: "yy-mm-dd", RFC_822: "D, d M y", RFC_850: "DD, dd-M-y", RFC_1036: "D, d M y", RFC_1123: "D, d M yy", RFC_2822: "D, d M yy", RSS: "D, d M y", TICKS: "!", TIMESTAMP: "@", W3C: "yy-mm-dd", _ticksTo1970: 24 * (718685 + Math.floor(492.5) - Math.floor(19.7) + Math.floor(4.925)) * 60 * 60 * 1e7, formatDate: function(e2, t2, i2) { 9937 if (!t2) 9938 return ""; 9939 function s2(t3, e3, i3) { 9940 var s3 = "" + e3; 9941 if (c2(t3)) 9942 for (; s3.length < i3; ) 9943 s3 = "0" + s3; 9944 return s3; 9945 } 9946 function n2(t3, e3, i3, s3) { 9947 return (c2(t3) ? s3 : i3)[e3]; 9948 } 9949 var o2, a2 = (i2 ? i2.dayNamesShort : null) || this._defaults.dayNamesShort, r2 = (i2 ? i2.dayNames : null) || this._defaults.dayNames, l2 = (i2 ? i2.monthNamesShort : null) || this._defaults.monthNamesShort, h2 = (i2 ? i2.monthNames : null) || this._defaults.monthNames, c2 = function(t3) { 9950 t3 = o2 + 1 < e2.length && e2.charAt(o2 + 1) === t3; 9951 return t3 && o2++, t3; 9952 }, u2 = "", d2 = false; 9953 if (t2) 9954 for (o2 = 0; o2 < e2.length; o2++) 9955 if (d2) 9956 "'" !== e2.charAt(o2) || c2("'") ? u2 += e2.charAt(o2) : d2 = false; 9957 else 9958 switch (e2.charAt(o2)) { 9959 case "d": 9960 u2 += s2("d", t2.getDate(), 2); 9961 break; 9962 case "D": 9963 u2 += n2("D", t2.getDay(), a2, r2); 9964 break; 9965 case "o": 9966 u2 += s2("o", Math.round((new Date(t2.getFullYear(), t2.getMonth(), t2.getDate()).getTime() - new Date(t2.getFullYear(), 0, 0).getTime()) / 864e5), 3); 9967 break; 9968 case "m": 9969 u2 += s2("m", t2.getMonth() + 1, 2); 9970 break; 9971 case "M": 9972 u2 += n2("M", t2.getMonth(), l2, h2); 9973 break; 9974 case "y": 9975 u2 += c2("y") ? t2.getFullYear() : (t2.getFullYear() % 100 < 10 ? "0" : "") + t2.getFullYear() % 100; 9976 break; 9977 case "@": 9978 u2 += t2.getTime(); 9979 break; 9980 case "!": 9981 u2 += 1e4 * t2.getTime() + this._ticksTo1970; 9982 break; 9983 case "'": 9984 c2("'") ? u2 += "'" : d2 = true; 9985 break; 9986 default: 9987 u2 += e2.charAt(o2); 9988 } 9989 return u2; 9990 }, _possibleChars: function(e2) { 9991 for (var t2 = "", i2 = false, s2 = function(t3) { 9992 t3 = n2 + 1 < e2.length && e2.charAt(n2 + 1) === t3; 9993 return t3 && n2++, t3; 9994 }, n2 = 0; n2 < e2.length; n2++) 9995 if (i2) 9996 "'" !== e2.charAt(n2) || s2("'") ? t2 += e2.charAt(n2) : i2 = false;
9997 else 9998 switch (e2.charAt(n2)) { 9999 case "d": 10000 case "m": 10001 case "y": 10002 case "@": 10003 t2 += "0123456789"; 10004 break; 10005 case "D": 10006 case "M": 10007 return null; 10008 case "'": 10009 s2("'") ? t2 += "'" : i2 = true; 10010 break; 10011 default: 10012 t2 += e2.charAt(n2); 10013 } 10014 return t2; 10015 }, _get: function(t2, e2) { 10016 return (void 0 !== t2.settings[e2] ? t2.settings : this._defaults)[e2]; 10017 }, _setDateFromField: function(t2, e2) { 10018 if (t2.input.val() !== t2.lastVal) { 10019 var i2 = this._get(t2, "dateFormat"), s2 = t2.lastVal = t2.input ? t2.input.val() : null, n2 = this._getDefaultDate(t2), o2 = n2, a2 = this._getFormatConfig(t2); 10020 try { 10021 o2 = this.parseDate(i2, s2, a2) || n2; 10022 } catch (t3) { 10023 s2 = e2 ? "" : s2; 10024 } 10025 t2.selectedDay = o2.getDate(), t2.drawMonth = t2.selectedMonth = o2.getMonth(), t2.drawYear = t2.selectedYear = o2.getFullYear(), t2.currentDay = s2 ? o2.getDate() : 0, t2.currentMonth = s2 ? o2.getMonth() : 0, t2.currentYear = s2 ? o2.getFullYear() : 0, this._adjustInstDate(t2); 10026 } 10027 }, _getDefaultDate: function(t2) { 10028 return this._restrictMinMax(t2, this._determineDate(t2, this._get(t2, "defaultDate"), new Date())); 10029 }, _determineDate: function(r2, t2, e2) { 10030 var i2, s2, t2 = null == t2 || "" === t2 ? e2 : "string" == typeof t2 ? function(t3) { 10031 try { 10032 return V.datepicker.parseDate(V.datepicker._get(r2, "dateFormat"), t3, V.datepicker._getFormatConfig(r2)); 10033 } catch (t4) { 10034 } 10035 for (var e3 = (t3.toLowerCase().match(/^c/) ? V.datepicker._getDate(r2) : null) || new Date(), i3 = e3.getFullYear(), s3 = e3.getMonth(), n2 = e3.getDate(), o2 = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, a2 = o2.exec(t3); a2; ) { 10036 switch (a2[2] || "d") { 10037 case "d": 10038 case "D": 10039 n2 += parseInt(a2[1], 10); 10040 break; 10041 case "w": 10042 case "W": 10043 n2 += 7 * parseInt(a2[1], 10); 10044 break; 10045 case "m": 10046 case "M": 10047 s3 += parseInt(a2[1], 10), n2 = Math.min(n2, V.datepicker._getDaysInMonth(i3, s3)); 10048 break; 10049 case "y": 10050 case "Y": 10051 i3 += parseInt(a2[1], 10), n2 = Math.min(n2, V.datepicker._getDaysInMonth(i3, s3)); 10052 } 10053 a2 = o2.exec(t3); 10054 } 10055 return new Date(i3, s3, n2); 10056 }(t2) : "number" == typeof t2 ? isNaN(t2) ? e2 : (i2 = t2, (s2 = new Date()).setDate(s2.getDate() + i2), s2) : new Date(t2.getTime()); 10057 return (t2 = t2 && "Invalid Date" === t2.toString() ? e2 : t2) && (t2.setHours(0), t2.setMinutes(0), t2.setSeconds(0), t2.setMilliseconds(0)), this._daylightSavingAdjust(t2); 10058 }, _daylightSavingAdjust: function(t2) { 10059 return t2 ? (t2.setHours(12 < t2.getHours() ? t2.getHours() + 2 : 0), t2) : null; 10060 }, _setDate: function(t2, e2, i2) { 10061 var s2 = !e2, n2 = t2.selectedMonth, o2 = t2.selectedYear, e2 = this._restrictMinMax(t2, this._determineDate(t2, e2, new Date())); 10062 t2.selectedDay = t2.currentDay = e2.getDate(), t2.drawMonth = t2.selectedMonth = t2.currentMonth = e2.getMonth(), t2.drawYear = t2.selectedYear = t2.currentYear = e2.getFullYear(), n2 === t2.selectedMonth && o2 === t2.selectedYear || i2 || this._notifyChange(t2), this._adjustInstDate(t2), t2.input && t2.input.val(s2 ? "" : this._formatDate(t2)); 10063 }, _getDate: function(t2) { 10064 return !t2.currentYear || t2.input && "" === t2.input.val() ? null : this._daylightSavingAdjust(new Date(t2.currentYear, t2.currentMonth, t2.currentDay)); 10065 }, _attachHandlers: function(t2) { 10066 var e2 = this._get(t2, "stepMonths"), i2 = "#" + t2.id.replace(/\\\\/g, "\\"); 10067 t2.dpDiv.find("[data-handler]").map(function() { 10068 var t3 = { prev: function() { 10069 V.datepicker._adjustDate(i2, -e2, "M"); 10070 }, next: function() { 10071 V.datepicker._adjustDate(i2, +e2, "M"); 10072 }, hide: function() { 10073 V.datepicker._hideDatepicker(); 10074 }, today: function() { 10075 V.datepicker._gotoToday(i2); 10076 }, selectDay: function() { 10077 return V.datepicker._selectDay(i2, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this), false; 10078 }, selectMonth: function() { 10079 return V.datepicker._selectMonthYear(i2, this, "M"), false; 10080 }, selectYear: function() { 10081 return V.datepicker._selectMonthYear(i2, this, "Y"), false; 10082 } }; 10083 V(this).on(this.getAttribute("data-event"), t3[this.getAttribute("data-handler")]); 10084 }); 10085 }, _generateHTML: function(t2) { 10086 var e2, i2, s2, n2, o2, a2, r2, l2, h2, c2, u2, d2, p2, f2, g2, m2, _2, v2, b2, y2, w2, x2, k2, C2, D2, I2, T2, P2, M2, S2, H2, z2, A2 = new Date(), O2 = this._daylightSavingAdjust(new Date(A2.getFullYear(), A2.getMonth(), A2.getDate())), N2 = this._get(t2, "isRTL"), E2 = this._get(t2, "showButtonPanel"), W2 = this._get(t2, "hideIfNoPrevNext"), F2 = this._get(t2, "n
vendor: 4,034 bytes, lines 10086-10106
10086avigationAsDateFormat"), L2 = this._getNumberOfMonths(t2), R2 = this._get(t2, "showCurrentAtPos"), A2 = this._get(t2, "stepMonths"), Y2 = 1 !== L2[0] || 1 !== L2[1], B2 = this._daylightSavingAdjust(t2.currentDay ? new Date(t2.currentYear, t2.currentMonth, t2.currentDay) : new Date(9999, 9, 9)), j2 = this._getMinMaxDate(t2, "min"), q2 = this._getMinMaxDate(t2, "max"), K2 = t2.drawMonth - R2, U2 = t2.drawYear; 10087 if (K2 < 0 && (K2 += 12, U2--), q2) 10088 for (e2 = this._daylightSavingAdjust(new Date(q2.getFullYear(), q2.getMonth() - L2[0] * L2[1] + 1, q2.getDate())), e2 = j2 && e2 < j2 ? j2 : e2; this._daylightSavingAdjust(new Date(U2, K2, 1)) > e2; ) 10089 --K2 < 0 && (K2 = 11, U2--); 10090 for (t2.drawMonth = K2, t2.drawYear = U2, R2 = this._get(t2, "prevText"), R2 = F2 ? this.formatDate(R2, this._daylightSavingAdjust(new Date(U2, K2 - A2, 1)), this._getFormatConfig(t2)) : R2, i2 = this._canAdjustMonth(t2, -1, U2, K2) ? V("<a>").attr({ class: "ui-datepicker-prev ui-corner-all", "data-handler": "prev", "data-event": "click", title: R2 }).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-" + (N2 ? "e" : "w")).text(R2))[0].outerHTML : W2 ? "" : V("<a>").attr({ class: "ui-datepicker-prev ui-corner-all ui-state-disabled", title: R2 }).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-" + (N2 ? "e" : "w")).text(R2))[0].outerHTML, R2 = this._get(t2, "nextText"), R2 = F2 ? this.formatDate(R2, this._daylightSavingAdjust(new Date(U2, K2 + A2, 1)), this._getFormatConfig(t2)) : R2, s2 = this._canAdjustMonth(t2, 1, U2, K2) ? V("<a>").attr({ class: "ui-datepicker-next ui-corner-all", "data-handler": "next", "data-event": "click", title: R2 }).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-" + (N2 ? "w" : "e")).text(R2))[0].outerHTML : W2 ? "" : V("<a>").attr({ class: "ui-datepicker-next ui-corner-all ui-state-disabled", title: R2 }).append(V("<span>").attr("class", "ui-icon ui-icon-circle-triangle-" + (N2 ? "w" : "e")).text(R2))[0].outerHTML, A2 = this._get(t2, "currentText"), W2 = this._get(t2, "gotoCurrent") && t2.currentDay ? B2 : O2, A2 = F2 ? this.formatDate(A2, W2, this._getFormatConfig(t2)) : A2, R2 = "", t2.inline || (R2 = V("<button>").attr({ type: "button", class: "ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all", "data-handler": "hide", "data-event": "click" }).text(this._get(t2, "closeText"))[0].outerHTML), F2 = "", E2 && (F2 = V("<div class='ui-datepicker-buttonpane ui-widget-content'>").append(N2 ? R2 : "").append(this._isInRange(t2, W2) ? V("<button>").attr({ type: "button", class: "ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all", "data-handler": "today", "data-event": "click" }).text(A2) : "").append(N2 ? "" : R2)[0].outerHTML), n2 = parseInt(this._get(t2, "firstDay"), 10), n2 = isNaN(n2) ? 0 : n2, o2 = this._get(t2, "showWeek"), a2 = this._get(t2, "dayNames"), r2 = this._get(t2, "dayNamesMin"), l2 = this._get(t2, "monthNames"), h2 = this._get(t2, "monthNamesShort"), c2 = this._get(t2, "beforeShowDay"), u2 = this._get(t2, "showOtherMonths"), d2 = this._get(t2, "selectOtherMonths"), p2 = this._getDefaultDate(t2), f2 = "", m2 = 0; m2 < L2[0]; m2++) { 10091 for (_2 = "", this.maxRows = 4, v2 = 0; v2 < L2[1]; v2++) { 10092 if (b2 = this._daylightSavingAdjust(new Date(U2, K2, t2.selectedDay)), y2 = " ui-corner-all", w2 = "", Y2) { 10093 if (w2 += "<div class='ui-datepicker-group", 1 < L2[1]) 10094 switch (v2) { 10095 case 0: 10096 w2 += " ui-datepicker-group-first", y2 = " ui-corner-" + (N2 ? "right" : "left"); 10097 break; 10098 case L2[1] - 1: 10099 w2 += " ui-datepicker-group-last", y2 = " ui-corner-" + (N2 ? "left" : "right"); 10100 break; 10101 default: 10102 w2 += " ui-datepicker-group-middle", y2 = ""; 10103 } 10104 w2 += "'>"; 10105 } 10106 for (w2 += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + y2 + "'>
vendor: 7,299 bytes, lines 10106-10165
10106" + (/all|left/.test(y2) && 0 === m2 ? N2 ? s2 : i2 : "") + (/all|right/.test(y2) && 0 === m2 ? N2 ? i2 : s2 : "") + this._generateMonthYearHeader(t2, K2, U2, j2, q2, 0 < m2 || 0 < v2, l2, h2) + "</div><table class='ui-datepicker-calendar'><thead><tr>", x2 = o2 ? "<th class='ui-datepicker-week-col'>" + this._get(t2, "weekHeader") + "</th>" : "", g2 = 0; g2 < 7; g2++) 10107 x2 += "<th scope='col'" + (5 <= (g2 + n2 + 6) % 7 ? " class='ui-datepicker-week-end'" : "") + "><span title='" + a2[k2 = (g2 + n2) % 7] + "'>" + r2[k2] + "</span></th>"; 10108 for (w2 += x2 + "</tr></thead><tbody>", D2 = this._getDaysInMonth(U2, K2), U2 === t2.selectedYear && K2 === t2.selectedMonth && (t2.selectedDay = Math.min(t2.selectedDay, D2)), C2 = (this._getFirstDayOfMonth(U2, K2) - n2 + 7) % 7, D2 = Math.ceil((C2 + D2) / 7), I2 = Y2 && this.maxRows > D2 ? this.maxRows : D2, this.maxRows = I2, T2 = this._daylightSavingAdjust(new Date(U2, K2, 1 - C2)), P2 = 0; P2 < I2; P2++) { 10109 for (w2 += "<tr>", M2 = o2 ? "<td class='ui-datepicker-week-col'>" + this._get(t2, "calculateWeek")(T2) + "</td>" : "", g2 = 0; g2 < 7; g2++) 10110 S2 = c2 ? c2.apply(t2.input ? t2.input[0] : null, [T2]) : [true, ""], z2 = (H2 = T2.getMonth() !== K2) && !d2 || !S2[0] || j2 && T2 < j2 || q2 && q2 < T2, M2 += "<td class='" + (5 <= (g2 + n2 + 6) % 7 ? " ui-datepicker-week-end" : "") + (H2 ? " ui-datepicker-other-month" : "") + (T2.getTime() === b2.getTime() && K2 === t2.selectedMonth && t2._keyEvent || p2.getTime() === T2.getTime() && p2.getTime() === b2.getTime() ? " " + this._dayOverClass : "") + (z2 ? " " + this._unselectableClass + " ui-state-disabled" : "") + (H2 && !u2 ? "" : " " + S2[1] + (T2.getTime() === B2.getTime() ? " " + this._currentClass : "") + (T2.getTime() === O2.getTime() ? " ui-datepicker-today" : "")) + "'" + (H2 && !u2 || !S2[2] ? "" : " title='" + S2[2].replace(/'/g, "'") + "'") + (z2 ? "" : " data-handler='selectDay' data-event='click' data-month='" + T2.getMonth() + "' data-year='" + T2.getFullYear() + "'") + ">" + (H2 && !u2 ? " " : z2 ? "<span class='ui-state-default'>" + T2.getDate() + "</span>" : "<a class='ui-state-default" + (T2.getTime() === O2.getTime() ? " ui-state-highlight" : "") + (T2.getTime() === B2.getTime() ? " ui-state-active" : "") + (H2 ? " ui-priority-secondary" : "") + "' href='#' aria-current='" + (T2.getTime() === B2.getTime() ? "true" : "false") + "' data-date='" + T2.getDate() + "'>" + T2.getDate() + "</a>") + "</td>", T2.setDate(T2.getDate() + 1), T2 = this._daylightSavingAdjust(T2); 10111 w2 += M2 + "</tr>"; 10112 } 10113 11 < ++K2 && (K2 = 0, U2++), _2 += w2 += "</tbody></table>" + (Y2 ? "</div>" + (0 < L2[0] && v2 === L2[1] - 1 ? "<div class='ui-datepicker-row-break'></div>" : "") : ""); 10114 } 10115 f2 += _2; 10116 } 10117 return f2 += F2, t2._keyEvent = false, f2; 10118 }, _generateMonthYearHeader: function(t2, e2, i2, s2, n2, o2, a2, r2) { 10119 var l2, h2, c2, u2, d2, p2, f2 = this._get(t2, "changeMonth"), g2 = this._get(t2, "changeYear"), m2 = this._get(t2, "showMonthAfterYear"), _2 = this._get(t2, "selectMonthLabel"), v2 = this._get(t2, "selectYearLabel"), b2 = "<div class='ui-datepicker-title'>", y2 = ""; 10120 if (o2 || !f2) 10121 y2 += "<span class='ui-datepicker-month'>" + a2[e2] + "</span>"; 10122 else { 10123 for (l2 = s2 && s2.getFullYear() === i2, h2 = n2 && n2.getFullYear() === i2, y2 += "<select class='ui-datepicker-month' aria-label='" + _2 + "' data-handler='selectMonth' data-event='change'>", c2 = 0; c2 < 12; c2++) 10124 (!l2 || c2 >= s2.getMonth()) && (!h2 || c2 <= n2.getMonth()) && (y2 += "<option value='" + c2 + "'" + (c2 === e2 ? " selected='selected'" : "") + ">" + r2[c2] + "</option>"); 10125 y2 += "</select>"; 10126 } 10127 if (m2 || (b2 += y2 + (!o2 && f2 && g2 ? "" : " ")), !t2.yearshtml) 10128 if (t2.yearshtml = "", o2 || !g2) 10129 b2 += "<span class='ui-datepicker-year'>" + i2 + "</span>"; 10130 else { 10131 for (a2 = this._get(t2, "yearRange").split(":"), u2 = new Date().getFullYear(), d2 = (_2 = function(t3) { 10132 t3 = t3.match(/c[+\-].*/) ? i2 + parseInt(t3.substring(1), 10) : t3.match(/[+\-].*/) ? u2 + parseInt(t3, 10) : parseInt(t3, 10); 10133 return isNaN(t3) ? u2 : t3; 10134 })(a2[0]), p2 = Math.max(d2, _2(a2[1] || "")), d2 = s2 ? Math.max(d2, s2.getFullYear()) : d2, p2 = n2 ? Math.min(p2, n2.getFullYear()) : p2, t2.yearshtml += "<select class='ui-datepicker-year' aria-label='" + v2 + "' data-handler='selectYear' data-event='change'>"; d2 <= p2; d2++) 10135 t2.yearshtml += "<option value='" + d2 + "'" + (d2 === i2 ? " selected='selected'" : "") + ">" + d2 + "</option>"; 10136 t2.yearshtml += "</select>", b2 += t2.yearshtml, t2.yearshtml = null; 10137 } 10138 return b2 += this._get(t2, "yearSuffix"), m2 && (b2 += (!o2 && f2 && g2 ? "" : " ") + y2), b2 += "</div>"; 10139 }, _adjustInstDate: function(t2, e2, i2) { 10140 var s2 = t2.selectedYear + ("Y" === i2 ? e2 : 0), n2 = t2.selectedMonth + ("M" === i2 ? e2 : 0), e2 = Math.min(t2.selectedDay, this._getDaysInMonth(s2, n2)) + ("D" === i2 ? e2 : 0), e2 = this._restrictMinMax(t2, this._daylightSavingAdjust(new Date(s2, n2, e2))); 10141 t2.selectedDay = e2.getDate(), t2.drawMonth = t2.selectedMonth = e2.getMonth(), t2.drawYear = t2.selectedYear = e2.getFullYear(), "M" !== i2 && "Y" !== i2 || this._notifyChange(t2); 10142 }, _restrictMinMax: function(t2, e2) { 10143 var i2 = this._getMinMaxDate(t2, "min"), t2 = this._getMinMaxDate(t2, "max"), e2 = i2 && e2 < i2 ? i2 : e2; 10144 return t2 && t2 < e2 ? t2 : e2; 10145 }, _notifyChange: function(t2) { 10146 var e2 = this._get(t2, "onChangeMonthYear"); 10147 e2 && e2.apply(t2.input ? t2.input[0] : null, [t2.selectedYear, t2.selectedMonth + 1, t2]); 10148 }, _getNumberOfMonths: function(t2) { 10149 t2 = this._get(t2, "numberOfMonths"); 10150 return null == t2 ? [1, 1] : "number" == typeof t2 ? [1, t2] : t2; 10151 }, _getMinMaxDate: function(t2, e2) { 10152 return this._determineDate(t2, this._get(t2, e2 + "Date"), null); 10153 }, _getDaysInMonth: function(t2, e2) { 10154 return 32 - this._daylightSavingAdjust(new Date(t2, e2, 32)).getDate(); 10155 }, _getFirstDayOfMonth: function(t2, e2) { 10156 return new Date(t2, e2, 1).getDay(); 10157 }, _canAdjustMonth: function(t2, e2, i2, s2) { 10158 var n2 = this._getNumberOfMonths(t2), n2 = this._daylightSavingAdjust(new Date(i2, s2 + (e2 < 0 ? e2 : n2[0] * n2[1]), 1)); 10159 return e2 < 0 && n2.setDate(this._getDaysInMonth(n2.getFullYear(), n2.getMonth())), this._isInRange(t2, n2); 10160 }, _isInRange: function(t2, e2) { 10161 var i2 = this._getMinMaxDate(t2, "min"), s2 = this._getMinMaxDate(t2, "max"), n2 = null, o2 = null, a2 = this._get(t2, "yearRange"); 10162 return a2 && (t2 = a2.split(":"), a2 = new Date().getFullYear(), n2 = parseInt(t2[0], 10), o2 = parseInt(t2[1], 10), t2[0].match(/[+\-].*/) && (n2 += a2), t2[1].match(/[+\-].*/) && (o2 += a2)), (!i2 || e2.getTime() >= i2.getTime()) && (!s2 || e2.getTime() <= s2.getTime()) && (!n2 || e2.getFullYear() >= n2) && (!o2 || e2.getFullYear() <= o2); 10163 }, _getFormatConfig: function(t2) { 10164 var e2 = this._get(t2, "shortYearCutoff"); 10165 return { shortYearCutoff: e2 = "string" != typeof e2 ? e2 : new Date().getFullYear() % 100 + parseInt(e2,
1016510), dayNamesShort: this._get(t2, "dayNamesShort"), dayNames: this._get(t2, "dayNames"), monthNamesShort: this._get(t2, "monthNamesShort"), monthNames: this._get(t2, "monthNames") }; 10166 }, _formatDate: function(t2, e2, i2, s2) { 10167 e2 || (t2.currentDay = t2.selectedDay, t2.currentMonth = t2.selectedMonth, t2.currentYear = t2.selectedYear); 10168 e2 = e2 ? "object" == typeof e2 ? e2 : this._daylightSavingAdjust(new Date(s2, i2, e2)) : this._daylightSavingAdjust(new Date(t2.currentYear, t2.currentMonth, t2.currentDay)); 10169 return this.formatDate(this._get(t2, "dateFormat"), e2, this._getFormatConfig(t2)); 10170 } }), V.fn.datepicker = function(t2) { 10171 if (!this.length) 10172 return this; 10173 V.datepicker.initialized || (V(document).on("mousedown", V.datepicker._checkExternalClick), V.datepicker.initialized = true), 0 === V("#" + V.datepicker._mainDivId).length && V("body").append(V.datepicker.dpDiv); 10174 var e2 = Array.prototype.slice.call(arguments, 1); 10175 return "string" == typeof t2 && ("isDisabled" === t2 || "getDate" === t2 || "widget" === t2) || "option" === t2 && 2 === arguments.length && "string" == typeof arguments[1] ? V.datepicker["_" + t2 + "Datepicker"].apply(V.datepicker, [this[0]].concat(e2)) : this.each(function() { 10176 "string" == typeof t2 ? V.datepicker["_" + t2 + "Datepicker"].apply(V.datepicker, [this].concat(e2)) : V.datepicker._attachDatepicker(this, t2); 10177 }); 10178 }, V.datepicker = new b(), V.datepicker.initialized = false, V.datepicker.uuid = new Date().getTime(), V.datepicker.version = "1.13.2"; 10179 V.datepicker; 10180 V.widget("ui.dialog", { version: "1.13.2", options: { appendTo: "body", autoOpen: true, buttons: [], classes: { "ui-dialog": "ui-corner-all", "ui-dialog-titlebar": "ui-corner-all" }, closeOnEscape: true, closeText: "Close", draggable: true, hide: null, height: "auto", maxHeight: null, maxWidth: null, minHeight: 150, minWidth: 150, modal: false, position: { my: "center", at: "center", of: window, collision: "fit", using: function(t2) { 10181 var e2 = V(this).css(t2).offset().top; 10182 e2 < 0 && V(this).css("top", t2.top - e2); 10183 } }, resizable: true, show: null, title: null, width: 300, beforeClose: null, close: null, drag: null, dragStart: null, dragStop: null, focus: null, open: null, resize: null, resizeStart: null, resizeStop: null }, sizeRelatedOptions: { buttons: true, height: true, maxHeight: true, maxWidth: true, minHeight: true, minWidth: true, width: true }, resizableRelatedOptions: { maxHeight: true, maxWidth: true, minHeight: true, minWidth: true }, _create: function() { 10184 this.originalCss = { display: this.element[0].style.display, width: this.element[0].style.width, minHeight: this.element[0].style.minHeight, maxHeight: this.element[0].style.maxHeight, height: this.element[0].style.height }, this.originalPosition = { parent: this.element.parent(), index: this.element.parent().children().index(this.element) }, this.originalTitle = this.element.attr("title"), null == this.options.title && null != this.originalTitle && (this.options.title = this.originalTitle), this.options.disabled && (this.options.disabled = false), this._createWrapper(), this.element.show().removeAttr("title").appendTo(this.uiDialog), this._addClass("ui-dialog-content", "ui-widget-content"), this._createTitlebar(), this._createButtonPane(), this.options.draggable && V.fn.draggable && this._makeDraggable(), this.options.resizable && V.fn.resizable && this._makeResizable(), this._isOpen = false, this._trackFocus(); 10185 }, _init: function() { 10186 this.options.autoOpen && this.open(); 10187 }, _appendTo: function() { 10188 var t2 = this.options.appendTo; 10189 return t2 && (t2.jquery || t2.nodeType) ? V(t2) : this.document.find(t2 || "body").eq(0); 10190 }, _destroy: function() { 10191 var t2, e2 = this.originalPosition; 10192 this._untrackInstance(), this._destroyOverlay(), this.element.removeUniqueId().css(this.originalCss).detach(), this.uiDialog.remove(), this.originalTitle && this.element.attr("title", this.originalTitle), (t2 = e2.parent.children().eq(e2.index)).length && t2[0] !== this.element[0] ? t2.before(this.element) : e2.parent.append(this.element); 10193 }, widget: function() { 10194 return this.uiDialog; 10195 }, disable: V.noop, enable: V.noop, close: function(t2) { 10196 var e2 = this; 10197 this._isOpen && false !== this._trigger("beforeClose", t2) && (this._isOpen = false, this._focusedElement = null, this._destroyOverlay(), this._untrackInstance(), this.opener.filter(":focusable").trigger("focus").length || V.ui.safeBlur(V.ui.safeActiveElement(this.document[0])), this._hide(this.uiDialog, this.options.hide, function() { 10198 e2._trigger("close", t2); 10199 })); 10200 }, isOpen: function() { 10201 return this._isOpen; 10202 }, moveToTop: function() { 10203 this._moveToTop(); 10204 }, _moveToTop: function(t2, e2) { 10205 var i2 = false, s2 = this.uiDialog.siblings(".ui-front:visible").map(function() { 10206 return +V(this).css("z-index"); 10207 }).get(), s2 = Math.max.apply(null, s2); 10208 return s2 >= +this.uiDialog.css("z-index") && (this.uiDialog.css("z-index", s2 + 1), i2 = true), i2 && !e2 && this._trigger("focus", t2), i2; 10209 }, open: function() { 10210 var t2 = this; 10211 this._isOpen ? this._moveToTop() && this._focusTabbable() : (this._isOpen = true, this.opener = V(V.ui.safeActiveElement(this.document[0])), this._size(), this._position(), this._createOverlay(), this._moveToTop(null, true), this.overlay && this.overlay.css("z-index", this.uiDialog.css("z-index") - 1), this._show(this.uiDialog, this.options.show, function() { 10212 t2._focusTabbable(), t2._trigger("focus"); 10213 }), this._makeFocusTarget(), this._trigger("open")); 10214 }, _focusTabbable: function() { 10215 var t2 = this._focusedElement; 10216 (t2 = !(t2 = !(t2 = !(t2 = !(t2 = t2 || this.element.find("[autofocus]")).length ? this.element.find(":tabbable") : t2).length ? this.uiDialogButtonPane.find(":tabbable") : t2).length ? this.uiDialogTitlebarClose.filter(":tabbable") : t2).length ? this.uiDialog : t2).eq(0).trigger("focus"); 10217 }, _restoreTabbableFocus: function() { 10218 var t2 = V.ui.safeActiveElement(this.document[0]); 10219 this.uiDialog[0] === t2 || V.contains(this.uiDialog[0], t2) || this._focusTabbable(); 10220 }, _keepFocus: function(t2) { 10221 t2.preventDefault(), this._restoreTabbableFocus(), this._delay(this._restoreTabbableFocus); 10222 }, _createWrapper: function() { 10223 this.uiDialog = V("<div>").hide().attr({ tabIndex: -1, role: "dialog" }).appendTo(this._appendTo()), this._addClass(this.uiDialog, "ui-dialog", "ui-widget ui-widget-content ui-front"), this._on(this.uiDialog, { keydown: function(t2) { 10224 if (this.options.closeOnEscape && !t2.isDefaultPrevented() && t2.keyCode && t2.keyCode === V.ui.keyCode.ESCAPE) 10225 return t2.preventDefault(), void this.close(t2); 10226 var e2, i2, s2; 10227 t2.keyCode !== V.ui.keyCode.TAB || t2.isDefaultPrevented() || (e2 = this.uiDialog.find(":tabbable"), i2 = e2.first(), s2 = e2.last(), t2.target !== s2[0] && t2.target !== this.uiDialog[0] || t2.shiftKey ? t2.target !== i2[0] && t2.target !== this.uiDialog[0] || !t2.shiftKey || (this._delay(function() { 10228 s2.trigger("focus"); 10229 }), t2.preventDefault()) : (this._delay(function() { 10230 i2.trigger("focus"); 10231 }), t2.preventDefault())); 10232 }, mousedown: function(t2) { 10233 this._moveToTop(t2) && this._focusTabbable(); 10234 } }), this.element.find("[aria-describedby]").length || this.uiDialog.attr({ "aria-describedby": this.element.uniqueId().attr("id") }); 10235 }, _createTitlebar: function() { 10236 var t2; 10237 this.uiDialogTitlebar = V("<div>"), this._addClass(this.uiDialogTitlebar, "ui-dialog-titlebar", "ui-widget-header ui-helper-clearfix"), this._on(this.uiDialogTitlebar, { mousedown: function(t3) { 10238 V(t3.target).closest(".ui-dialog-titlebar-close") || this.uiDialog.trigger("focus"); 10239 } }), this.uiDialogTitlebarClose = V("<button type='button'></button>").button({ label: V("<a>").text(this.options.closeText).html(), icon: "ui-icon-closethick", showLabel: false }).appendTo(this.uiDialogTitlebar), this._addClass(this.uiDialogTitlebarClose, "ui-dialog-titlebar-close"), this._on(this.uiDialogTitlebarClose, { click: function(t3) { 10240 t3.preventDefault(), this.close(t3); 10241 } }), t2 = V("<span>").uniqueId().prependTo(this.uiDialogTitlebar), this._addClass(t2, "ui-dialog-title"), this._title(t2), this.uiDialogTitlebar.prepe
10241ndTo(this.uiDialog), this.uiDialog.attr({ "aria-labelledby": t2.attr("id") }); 10242 }, _title: function(t2) { 10243 this.options.title ? t2.text(this.options.title) : t2.html(" "); 10244 }, _createButtonPane: function() { 10245 this.uiDialogButtonPane = V("<div>"), this._addClass(this.uiDialogButtonPane, "ui-dialog-buttonpane", "ui-widget-content ui-helper-clearfix"), this.uiButtonSet = V("<div>").appendTo(this.uiDialogButtonPane), this._addClass(this.uiButtonSet, "ui-dialog-buttonset"), this._createButtons(); 10246 }, _createButtons: function() { 10247 var s2 = this, t2 = this.options.buttons; 10248 this.uiDialogButtonPane.remove(), this.uiButtonSet.empty(), V.isEmptyObject(t2) || Array.isArray(t2) && !t2.length ? this._removeClass(this.uiDialog, "ui-dialog-buttons") : (V.each(t2, function(t3, e2) { 10249 var i2; 10250 e2 = V.extend({ type: "button" }, e2 = "function" == typeof e2 ? { click: e2, text: t3 } : e2), i2 = e2.click, t3 = { icon: e2.icon, iconPosition: e2.iconPosition, showLabel: e2.showLabel, icons: e2.icons, text: e2.text }, delete e2.click, delete e2.icon, delete e2.iconPosition, delete e2.showLabel, delete e2.icons, "boolean" == typeof e2.text && delete e2.text, V("<button></button>", e2).button(t3).appendTo(s2.uiButtonSet).on("click", function() { 10251 i2.apply(s2.element[0], arguments); 10252 }); 10253 }), this._addClass(this.uiDialog, "ui-dialog-buttons"), this.uiDialogButtonPane.appendTo(this.uiDialog)); 10254 }, _makeDraggable: function() { 10255 var n2 = this, o2 = this.options; 10256 function a2(t2) { 10257 return { position: t2.position, offset: t2.offset }; 10258 } 10259 this.uiDialog.draggable({ cancel: ".ui-dialog-content, .ui-dialog-titlebar-close", handle: ".ui-dialog-titlebar", containment: "document", start: function(t2, e2) { 10260 n2._addClass(V(this), "ui-dialog-dragging"), n2._blockFrames(), n2._trigger("dragStart", t2, a2(e2)); 10261 }, drag: function(t2, e2) { 10262 n2._trigger("drag", t2, a2(e2)); 10263 }, stop: function(t2, e2) { 10264 var i2 = e2.offset.left - n2.document.scrollLeft(), s2 = e2.offset.top - n2.document.scrollTop(); 10265 o2.position = { my: "left top", at: "left" + (0 <= i2 ? "+" : "") + i2 + " top" + (0 <= s2 ? "+" : "") + s2, of: n2.window }, n2._removeClass(V(this), "ui-dialog-dragging"), n2._unblockFrames(), n2._trigger("dragStop", t2, a2(e2)); 10266 } }); 10267 }, _makeResizable: function() { 10268 var n2 = this, o2 = this.options, t2 = o2.resizable, e2 = this.uiDialog.css("position"), t2 = "string" == typeof t2 ? t2 : "n,e,s,w,se,sw,ne,nw"; 10269 function a2(t3) { 10270 return { originalPosition: t3.originalPosition, originalSize: t3.originalSize, position: t3.position, size: t3.size }; 10271 } 10272 this.uiDialog.resizable({ cancel: ".ui-dialog-content", containment: "document", alsoResize: this.element, maxWidth: o2.maxWidth, maxHeight: o2.maxHeight, minWidth: o2.minWidth, minHeight: this._minHeight(), handles: t2, start: function(t3, e3) { 10273 n2._addClass(V(this), "ui-dialog-resizing"), n2._blockFrames(), n2._trigger("resizeStart", t3, a2(e3)); 10274 }, resize: function(t3, e3) { 10275 n2._trigger("resize", t3, a2(e3)); 10276 }, stop: function(t3, e3) { 10277 var i2 = n2.uiDialog.offset(), s2 = i2.left - n2.document.scrollLeft(), i2 = i2.top - n2.document.scrollTop(); 10278 o2.height = n2.uiDialog.height(), o2.width = n2.uiDialog.width(), o2.position = { my: "left top", at: "left" + (0 <= s2 ? "+" : "") + s2 + " top" + (0 <= i2 ? "+" : "") + i2, of: n2.window }, n2._removeClass(V(this), "ui-dialog-resizing"), n2._unblockFrames(), n2._trigger("resizeStop", t3, a2(e3)); 10279 } }).css("position", e2); 10280 }, _trackFocus: function() { 10281 this._on(this.widget(), { focusin: function(t2) { 10282 this._makeFocusTarget(), this._focusedElement = V(t2.target); 10283 } }); 10284 }, _makeFocusTarget: function() { 10285 this._untrackInstance(), this._trackingInstances().unshift(this); 10286 }, _untrackInstance: function() { 10287 var t2 = this._trackingInstances(), e2 = V.inArray(this, t2); 10288 -1 !== e2 && t2.splice(e2, 1); 10289 }, _trackingInstances: function() { 10290 var t2 = this.document.data("ui-dialog-instances"); 10291 return t2 || this.document.data("ui-dialog-instances", t2 = []), t2; 10292 }, _minHeight: function() { 10293 var t2 = this.options; 10294 return "auto" === t2.height ? t2.minHeight : Math.min(t2.minHeight, t2.height); 10295 }, _position: function() { 10296 var t2 = this.uiDialog.is(":visible"); 10297 t2 || this.uiDialog.show(), this.uiDialog.position(this.options.position), t2 || this.uiDialog.hide(); 10298 }, _setOptions: function(t2) { 10299 var i2 = this, s2 = false, n2 = {}; 10300 V.each(t2, function(t3, e2) { 10301 i2._setOption(t3, e2), t3 in i2.sizeRelatedOptions && (s2 = true), t3 in i2.resizableRelatedOptions && (n2[t3] = e2); 10302 }), s2 && (this._size(), this._position()), this.uiDialog.is(":data(ui-resizable)") && this.uiDialog.resizable("option", n2); 10303 }, _setOption: function(t2, e2) { 10304 var i2, s2 = this.uiDialog; 10305 "disabled" !== t2 && (this._super(t2, e2), "appendTo" === t2 && this.uiDialog.appendTo(this._appendTo()), "buttons" === t2 && this._createButtons(), "closeText" === t2 && this.uiDialogTitlebarClose.button({ label: V("<a>").text("" + this.options.closeText).html() }), "draggable" === t2 && ((i2 = s2.is(":data(ui-draggable)")) && !e2 && s2.draggable("destroy"), !i2 && e2 && this._makeDraggable()), "position" === t2 && this._position(), "resizable" === t2 && ((i2 = s2.is(":data(ui-resizable)")) && !e2 && s2.resizable("destroy"), i2 && "string" == typeof e2 && s2.resizable("option", "handles", e2), i2 || false === e2 || this._makeResizable()), "title" === t2 && this._title(this.uiDialogTitlebar.find(".ui-dialog-title"))); 10306 }, _size: function() { 10307 var t2, e2, i2, s2 = this.options; 10308 this.element.show().css({ width: "auto", minHeight: 0, maxHeight: "none", height: 0 }), s2.minWidth >
vendor: 8,001 bytes, lines 10308-10374
10308 s2.width && (s2.width = s2.minWidth), t2 = this.uiDialog.css({ height: "auto", width: s2.width }).outerHeight(), e2 = Math.max(0, s2.minHeight - t2), i2 = "number" == typeof s2.maxHeight ? Math.max(0, s2.maxHeight - t2) : "none", "auto" === s2.height ? this.element.css({ minHeight: e2, maxHeight: i2, height: "auto" }) : this.element.height(Math.max(0, s2.height - t2)), this.uiDialog.is(":data(ui-resizable)") && this.uiDialog.resizable("option", "minHeight", this._minHeight()); 10309 }, _blockFrames: function() { 10310 this.iframeBlocks = this.document.find("iframe").map(function() { 10311 var t2 = V(this); 10312 return V("<div>").css({ position: "absolute", width: t2.outerWidth(), height: t2.outerHeight() }).appendTo(t2.parent()).offset(t2.offset())[0]; 10313 }); 10314 }, _unblockFrames: function() { 10315 this.iframeBlocks && (this.iframeBlocks.remove(), delete this.iframeBlocks); 10316 }, _allowInteraction: function(t2) { 10317 return !!V(t2.target).closest(".ui-dialog").length || !!V(t2.target).closest(".ui-datepicker").length; 10318 }, _createOverlay: function() { 10319 var i2, s2; 10320 this.options.modal && (i2 = V.fn.jquery.substring(0, 4), s2 = true, this._delay(function() { 10321 s2 = false; 10322 }), this.document.data("ui-dialog-overlays") || this.document.on("focusin.ui-dialog", function(t2) { 10323 var e2; 10324 s2 || ((e2 = this._trackingInstances()[0])._allowInteraction(t2) || (t2.preventDefault(), e2._focusTabbable(), "3.4." !== i2 && "3.5." !== i2 || e2._delay(e2._restoreTabbableFocus))); 10325 }.bind(this)), this.overlay = V("<div>").appendTo(this._appendTo()), this._addClass(this.overlay, null, "ui-widget-overlay ui-front"), this._on(this.overlay, { mousedown: "_keepFocus" }), this.document.data("ui-dialog-overlays", (this.document.data("ui-dialog-overlays") || 0) + 1)); 10326 }, _destroyOverlay: function() { 10327 var t2; 10328 this.options.modal && this.overlay && ((t2 = this.document.data("ui-dialog-overlays") - 1) ? this.document.data("ui-dialog-overlays", t2) : (this.document.off("focusin.ui-dialog"), this.document.removeData("ui-dialog-overlays")), this.overlay.remove(), this.overlay = null); 10329 } }), false !== V.uiBackCompat && V.widget("ui.dialog", V.ui.dialog, { options: { dialogClass: "" }, _createWrapper: function() { 10330 this._super(), this.uiDialog.addClass(this.options.dialogClass); 10331 }, _setOption: function(t2, e2) { 10332 "dialogClass" === t2 && this.uiDialog.removeClass(this.options.dialogClass).addClass(e2), this._superApply(arguments); 10333 } }); 10334 V.ui.dialog, V.widget("ui.progressbar", { version: "1.13.2", options: { classes: { "ui-progressbar": "ui-corner-all", "ui-progressbar-value": "ui-corner-left", "ui-progressbar-complete": "ui-corner-right" }, max: 100, value: 0, change: null, complete: null }, min: 0, _create: function() { 10335 this.oldValue = this.options.value = this._constrainedValue(), this.element.attr({ role: "progressbar", "aria-valuemin": this.min }), this._addClass("ui-progressbar", "ui-widget ui-widget-content"), this.valueDiv = V("<div>").appendTo(this.element), this._addClass(this.valueDiv, "ui-progressbar-value", "ui-widget-header"), this._refreshValue(); 10336 }, _destroy: function() { 10337 this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"), this.valueDiv.remove(); 10338 }, value: function(t2) { 10339 if (void 0 === t2) 10340 return this.options.value; 10341 this.options.value = this._constrainedValue(t2), this._refreshValue(); 10342 }, _constrainedValue: function(t2) { 10343 return void 0 === t2 && (t2 = this.options.value), this.indeterminate = false === t2, "number" != typeof t2 && (t2 = 0), !this.indeterminate && Math.min(this.options.max, Math.max(this.min, t2)); 10344 }, _setOptions: function(t2) { 10345 var e2 = t2.value; 10346 delete t2.value, this._super(t2), this.options.value = this._constrainedValue(e2), this._refreshValue(); 10347 }, _setOption: function(t2, e2) { 10348 "max" === t2 && (e2 = Math.max(this.min, e2)), this._super(t2, e2); 10349 }, _setOptionDisabled: function(t2) { 10350 this._super(t2), this.element.attr("aria-disabled", t2), this._toggleClass(null, "ui-state-disabled", !!t2); 10351 }, _percentage: function() { 10352 return this.indeterminate ? 100 : 100 * (this.options.value - this.min) / (this.options.max - this.min); 10353 }, _refreshValue: function() { 10354 var t2 = this.options.value, e2 = this._percentage(); 10355 this.valueDiv.toggle(this.indeterminate || t2 > this.min).width(e2.toFixed(0) + "%"), this._toggleClass(this.valueDiv, "ui-progressbar-complete", null, t2 === this.options.max)._toggleClass("ui-progressbar-indeterminate", null, this.indeterminate), this.indeterminate ? (this.element.removeAttr("aria-valuenow"), this.overlayDiv || (this.overlayDiv = V("<div>").appendTo(this.valueDiv), this._addClass(this.overlayDiv, "ui-progressbar-overlay"))) : (this.element.attr({ "aria-valuemax": this.options.max, "aria-valuenow": t2 }), this.overlayDiv && (this.overlayDiv.remove(), this.overlayDiv = null)), this.oldValue !== t2 && (this.oldValue = t2, this._trigger("change")), t2 === this.options.max && this._trigger("complete"); 10356 } }), V.widget("ui.selectmenu", [V.ui.formResetMixin, { version: "1.13.2", defaultElement: "<select>", options: { appendTo: null, classes: { "ui-selectmenu-button-open": "ui-corner-top", "ui-selectmenu-button-closed": "ui-corner-all" }, disabled: null, icons: { button: "ui-icon-triangle-1-s" }, position: { my: "left top", at: "left bottom", collision: "none" }, width: false, change: null, close: null, focus: null, open: null, select: null }, _create: function() { 10357 var t2 = this.element.uniqueId().attr("id"); 10358 this.ids = { element: t2, button: t2 + "-button", menu: t2 + "-menu" }, this._drawButton(), this._drawMenu(), this._bindFormResetHandler(), this._rendered = false, this.menuItems = V(); 10359 }, _drawButton: function() { 10360 var t2, e2 = this, i2 = this._parseOption(this.element.find("option:selected"), this.element[0].selectedIndex); 10361 this.labels = this.element.labels().attr("for", this.ids.button), this._on(this.labels, { click: function(t3) { 10362 this.button.trigger("focus"), t3.preventDefault(); 10363 } }), this.element.hide(), this.button = V("<span>", { tabindex: this.options.disabled ? -1 : 0, id: this.ids.button, role: "combobox", "aria-expanded": "false", "aria-autocomplete": "list", "aria-owns": this.ids.menu, "aria-haspopup": "true", title: this.element.attr("title") }).insertAfter(this.element), this._addClass(this.button, "ui-selectmenu-button ui-selectmenu-button-closed", "ui-button ui-widget"), t2 = V("<span>").appendTo(this.button), this._addClass(t2, "ui-selectmenu-icon", "ui-icon " + this.options.icons.button), this.buttonItem = this._renderButtonItem(i2).appendTo(this.button), false !== this.options.width && this._resizeButton(), this._on(this.button, this._buttonEvents), this.button.one("focusin", function() { 10364 e2._rendered || e2._refreshMenu(); 10365 }); 10366 }, _drawMenu: function() { 10367 var i2 = this; 10368 this.menu = V("<ul>", { "aria-hidden": "true", "aria-labelledby": this.ids.button, id: this.ids.menu }), this.menuWrap = V("<div>").append(this.menu), this._addClass(this.menuWrap, "ui-selectmenu-menu", "ui-front"), this.menuWrap.appendTo(this._appendTo()), this.menuInstance = this.menu.menu({ classes: { "ui-menu": "ui-corner-bottom" }, role: "listbox", select: function(t2, e2) { 10369 t2.preventDefault(), i2._setSelection(), i2._select(e2.item.data("ui-selectmenu-item"), t2); 10370 }, focus: function(t2, e2) { 10371 e2 = e2.item.data("ui-selectmenu-item"); 10372 null != i2.focusIndex && e2.index !== i2.focusIndex && (i2._trigger("focus", t2, { item: e2 }), i2.isOpen || i2._select(e2, t2)), i2.focusIndex = e2.index, i2.button.attr("aria-activedescendant", i2.menuItems.eq(e2.index).attr("id")); 10373 } }).menu("instance"), this.menuInstance._off(this.menu, "mouseleave"), this.menuInstance._closeOnDocumentClick = function() { 10374 return false;
10375 }, this.menuInstance._isDivider = function() { 10376 return false; 10377 }; 10378 }, refresh: function() { 10379 this._refreshMenu(), this.buttonItem.replaceWith(this.buttonItem = this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item") || {})), null === this.options.width && this._resizeButton(); 10380 }, _refreshMenu: function() { 10381 var t2 = this.element.find("option"); 10382 this.menu.empty(), this._parseOptions(t2), this._renderMenu(this.menu, this.items), this.menuInstance.refresh(), this.menuItems = this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"), this._rendered = true, t2.length && (t2 = this._getSelectedItem(), this.menuInstance.focus(null, t2), this._setAria(t2.data("ui-selectmenu-item")), this._setOption("disabled", this.element.prop("disabled"))); 10383 }, open: function(t2) { 10384 this.options.disabled || (this._rendered ? (this._removeClass(this.menu.find(".ui-state-active"), null, "ui-state-active"), this.menuInstance.focus(null, this._getSelectedItem())) : this._refreshMenu(), this.menuItems.length && (this.isOpen = true, this._toggleAttr(), this._resizeMenu(), this._position(), this._on(this.document, this._documentClick), this._trigger("open", t2))); 10385 }, _position: function() { 10386 this.menuWrap.position(V.extend({ of: this.button }, this.options.position)); 10387 }, close: function(t2) { 10388 this.isOpen && (this.isOpen = false, this._toggleAttr(), this.range = null, this._off(this.document), this._trigger("close", t2)); 10389 }, widget: function() { 10390 return this.button; 10391 }, menuWidget: function() { 10392 return this.menu; 10393 }, _renderButtonItem: function(t2) { 10394 var e2 = V("<span>"); 10395 return this._setText(e2, t2.label), this._addClass(e2, "ui-selectmenu-text"), e2; 10396 }, _renderMenu: function(s2, t2) { 10397 var n2 = this, o2 = ""; 10398 V.each(t2, function(t3, e2) { 10399 var i2; 10400 e2.optgroup !== o2 && (i2 = V("<li>", { text: e2.optgroup }), n2._addClass(i2, "ui-selectmenu-optgroup", "ui-menu-divider" + (e2.element.parent("optgroup").prop("disabled") ? " ui-state-disabled" : "")), i2.appendTo(s2), o2 = e2.optgroup), n2._renderItemData(s2, e2); 10401 }); 10402 }, _renderItemData: function(t2, e2) { 10403 return this._renderItem(t2, e2).data("ui-selectmenu-item", e2); 10404 }, _renderItem: function(t2, e2) { 10405 var i2 = V("<li>"), s2 = V("<div>", { title: e2.element.attr("title") }); 10406 return e2.disabled && this._addClass(i2, null, "ui-state-disabled"), this._setText(s2, e2.label), i2.append(s2).appendTo(t2); 10407 }, _setText: function(t2, e2) { 10408 e2 ? t2.text(e2) : t2.html(" "); 10409 }, _move: function(t2, e2) { 10410 var i2, s2 = ".ui-menu-item"; 10411 this.isOpen ? i2 = this.menuItems.eq(this.focusIndex).parent("li") : (i2 = this.menuItems.eq(this.element[0].selectedIndex).parent("li"), s2 += ":not(.ui-state-disabled)"), (s2 = "first" === t2 || "last" === t2 ? i2["first" === t2 ? "prevAll" : "nextAll"](s2).eq(-1) : i2[t2 + "All"](s2).eq(0)).length && this.menuInstance.focus(e2, s2); 10412 }, _getSelectedItem: function() { 10413 return this.menuItems.eq(this.element[0].selectedIndex).parent("li"); 10414 }, _toggle: function(t2) { 10415 this[this.isOpen ? "close" : "open"](t2); 10416 }, _setSelection: function() { 10417 var t2; 10418 this.range && (window.getSelection ? ((t2 = window.getSelection()).removeAllRanges(), t2.addRange(this.range)) : this.range.select(), this.button.trigger("focus")); 10419 }, _documentClick: { mousedown: function(t2) { 10420 this.isOpen && (V(t2.target).closest(".ui-selectmenu-menu, #" + V.escapeSelector(this.ids.button)).length || this.close(t2)); 10421 } }, _buttonEvents: { mousedown: function() { 10422 var t2; 10423 window.getSelection ? (t2 = window.getSelection()).rangeCount && (this.range = t2.getRangeAt(0)) : this.range = document.selection.createRange(); 10424 }, click: function(t2) { 10425 this._setSelection(), this._toggle(t2); 10426 }, keydown: function(t2) { 10427 var e2 = true; 10428 switch (t2.keyCode) { 10429 case V.ui.keyCode.TAB: 10430 case V.ui.keyCode.ESCAPE: 10431 this.close(t2), e2 = false;
10432 break; 10433 case V.ui.keyCode.ENTER: 10434 this.isOpen && this._selectFocusedItem(t2); 10435 break; 10436 case V.ui.keyCode.UP: 10437 t2.altKey ? this._toggle(t2) : this._move("prev", t2); 10438 break; 10439 case V.ui.keyCode.DOWN: 10440 t2.altKey ? this._toggle(t2) : this._move("next", t2); 10441 break; 10442 case V.ui.keyCode.SPACE: 10443 this.isOpen ? this._selectFocusedItem(t2) : this._toggle(t2); 10444 break; 10445 case V.ui.keyCode.LEFT: 10446 this._move("prev", t2); 10447 break; 10448 case V.ui.keyCode.RIGHT: 10449 this._move("next", t2); 10450 break; 10451 case V.ui.keyCode.HOME: 10452 case V.ui.keyCode.PAGE_UP: 10453 this._move("first", t2); 10454 break; 10455 case V.ui.keyCode.END: 10456 case V.ui.keyCode.PAGE_DOWN: 10457 this._move("last", t2); 10458 break; 10459 default: 10460 this.menu.trigger(t2), e2 = false; 10461 } 10462 e2 && t2.preventDefault(); 10463 } }, _selectFocusedItem: function(t2) { 10464 var e2 = this.menuItems.eq(this.focusIndex).parent("li"); 10465 e2.hasClass("ui-state-disabled") || this._select(e2.data("ui-selectmenu-item"), t2); 10466 }, _select: function(t2, e2) { 10467 var i2 = this.element[0].selectedIndex; 10468 this.element[0].selectedIndex = t2.index, this.buttonItem.replaceWith(this.buttonItem = this._renderButtonItem(t2)), this._setAria(t2), this._trigger("select", e2, { item: t2 }), t2.index !== i2 && this._trigger("change", e2, { item: t2 }), this.close(e2); 10469 }, _setAria: function(t2) { 10470 t2 = this.menuItems.eq(t2.index).attr("id"); 10471 this.button.attr({ "aria-labelledby": t2, "aria-activedescendant": t2 }), this.menu.attr("aria-activedescendant", t2); 10472 }, _setOption: function(t2, e2) { 10473 var i2; 10474 "icons" === t2 && (i2 = this.button.find("span.ui-icon"), this._removeClass(i2, null, this.options.icons.button)._addClass(i2, null, e2.button)), this._super(t2, e2), "appendTo" === t2 && this.menuWrap.appendTo(this._appendTo()), "width" === t2 && this._resizeButton(); 10475 }, _setOptionDisabled: function(t2) { 10476 this._super(t2), this.menuInstance.option("disabled", t2), this.button.attr("aria-disabled", t2), this._toggleClass(this.button, null, "ui-state-disabled", t2), this.element.prop("disabled", t2), t2 ? (this.button.attr("tabindex", -1), this.close()) : this.button.attr("tabindex", 0); 10477 }, _appendTo: function() { 10478 var t2 = this.options.appendTo; 10479 return t2 = !(t2 = !(t2 = t2 && (t2.jquery || t2.nodeType ? V(t2) : this.document.find(t2).eq(0))) || !t2[0] ? this.element.closest(".ui-front, dialog") : t2).length ? this.document[0].body : t2; 10480 }, _toggleAttr: function() { 10481 this.button.attr("aria-expanded", this.isOpen), this._removeClass(this.button, "ui-selectmenu-button-" + (this.isOpen ? "closed" : "open"))._addClass(this.button, "ui-selectmenu-button-" + (this.isOpen ? "open" : "closed"))._toggleClass(this.menuWrap, "ui-selectmenu-open", null, this.isOpen), this.menu.attr("aria-hidden", !this.isOpen); 10482 }, _resizeButton: function() { 10483 var t2 = this.options.width; 10484 false !== t2 ? (null === t2 && (t2 = this.element.show().outerWidth(), this.element.hide()), this.button.outerWidth(t2)) : this.button.css("width", ""); 10485 }, _resizeMenu: function() { 10486 this.menu.outerWidth(Math.max(this.button.outerWidth(), this.menu.width("").outerWidth() + 1)); 10487 }, _getCreateOptions: function() { 10488 var t2 = this._super(); 10489 return t2.disabled = this.element.prop("disabled"), t2; 10490 }, _parseOptions: function(t2) { 10491 var i2 = this, s2 = []; 10492 t2.each(function(t3, e2) { 10493 e2.hidden || s2.push(i2._parseOption(V(e2), t3)); 10494 }), this.items = s2; 10495 }, _parseOption: function(t2, e2) { 10496 var i2 = t2.parent("optgroup"); 10497 return { element: t2, index: e2, value: t2.val(), label: t2.text(), optgroup: i2.attr("label") || "", disabled: i2.prop("disabled") || t2.prop("disabled") }; 10498 }, _destroy: function() { 10499 this._unbindFormResetHandler(), this.menuWrap.remove(), this.button.remove(), this.element.show(), this.element.removeUniqueId(), this.labels.attr("for", this.ids.element); 10500 } }]), V.widget("ui.slider", V.ui.mouse, { version: "1.13.2", widgetEventPrefix: "slide", options: { animate: false, classes: { "ui-slider": "ui-corner-all", "ui-slider-handle": "ui-corner-all", "ui-slider-range": "ui-corner-all ui-widget-header" }, distance: 0, max: 100, min: 0, orientation: "horizontal", range: false, step: 1, value: 0, values: null, change: null, slide: null, start: null, stop: null }, numPages: 5, _create: function() { 10501 this._keySliding = false, this._mouseSliding = false, this._animateOff = true, this._handleIndex = null, this._detectOrientation(), this._mouseInit(), this._calculateNewMax(), this._addClass("ui-slider ui-slider-" + this.orientation, "ui-widget ui-widget-content"), this._refresh(), this._animateOff = false;
vendor: 5,489 bytes, lines 10502-10551
10502 }, _refresh: function() { 10503 this._createRange(), this._createHandles(), this._setupEvents(), this._refreshValue(); 10504 }, _createHandles: function() { 10505 var t2, e2 = this.options, i2 = this.element.find(".ui-slider-handle"), s2 = [], n2 = e2.values && e2.values.length || 1; 10506 for (i2.length > n2 && (i2.slice(n2).remove(), i2 = i2.slice(0, n2)), t2 = i2.length; t2 < n2; t2++) 10507 s2.push("<span tabindex='0'></span>"); 10508 this.handles = i2.add(V(s2.join("")).appendTo(this.element)), this._addClass(this.handles, "ui-slider-handle", "ui-state-default"), this.handle = this.handles.eq(0), this.handles.each(function(t3) { 10509 V(this).data("ui-slider-handle-index", t3).attr("tabIndex", 0); 10510 }); 10511 }, _createRange: function() { 10512 var t2 = this.options; 10513 t2.range ? (true === t2.range && (t2.values ? t2.values.length && 2 !== t2.values.length ? t2.values = [t2.values[0], t2.values[0]] : Array.isArray(t2.values) && (t2.values = t2.values.slice(0)) : t2.values = [this._valueMin(), this._valueMin()]), this.range && this.range.length ? (this._removeClass(this.range, "ui-slider-range-min ui-slider-range-max"), this.range.css({ left: "", bottom: "" })) : (this.range = V("<div>").appendTo(this.element), this._addClass(this.range, "ui-slider-range")), "min" !== t2.range && "max" !== t2.range || this._addClass(this.range, "ui-slider-range-" + t2.range)) : (this.range && this.range.remove(), this.range = null); 10514 }, _setupEvents: function() { 10515 this._off(this.handles), this._on(this.handles, this._handleEvents), this._hoverable(this.handles), this._focusable(this.handles); 10516 }, _destroy: function() { 10517 this.handles.remove(), this.range && this.range.remove(), this._mouseDestroy(); 10518 }, _mouseCapture: function(t2) { 10519 var i2, s2, n2, o2, e2, a2, r2 = this, l2 = this.options; 10520 return !l2.disabled && (this.elementSize = { width: this.element.outerWidth(), height: this.element.outerHeight() }, this.elementOffset = this.element.offset(), a2 = { x: t2.pageX, y: t2.pageY }, i2 = this._normValueFromMouse(a2), s2 = this._valueMax() - this._valueMin() + 1, this.handles.each(function(t3) { 10521 var e3 = Math.abs(i2 - r2.values(t3)); 10522 (e3 < s2 || s2 === e3 && (t3 === r2._lastChangedValue || r2.values(t3) === l2.min)) && (s2 = e3, n2 = V(this), o2 = t3); 10523 }), false !== this._start(t2, o2) && (this._mouseSliding = true, this._handleIndex = o2, this._addClass(n2, null, "ui-state-active"), n2.trigger("focus"), e2 = n2.offset(), a2 = !V(t2.target).parents().addBack().is(".ui-slider-handle"), this._clickOffset = a2 ? { left: 0, top: 0 } : { left: t2.pageX - e2.left - n2.width() / 2, top: t2.pageY - e2.top - n2.height() / 2 - (parseInt(n2.css("borderTopWidth"), 10) || 0) - (parseInt(n2.css("borderBottomWidth"), 10) || 0) + (parseInt(n2.css("marginTop"), 10) || 0) }, this.handles.hasClass("ui-state-hover") || this._slide(t2, o2, i2), this._animateOff = true)); 10524 }, _mouseStart: function() { 10525 return true; 10526 }, _mouseDrag: function(t2) { 10527 var e2 = { x: t2.pageX, y: t2.pageY }, e2 = this._normValueFromMouse(e2); 10528 return this._slide(t2, this._handleIndex, e2), false; 10529 }, _mouseStop: function(t2) { 10530 return this._removeClass(this.handles, null, "ui-state-active"), this._mouseSliding = false, this._stop(t2, this._handleIndex), this._change(t2, this._handleIndex), this._handleIndex = null, this._clickOffset = null, this._animateOff = false; 10531 }, _detectOrientation: function() { 10532 this.orientation = "vertical" === this.options.orientation ? "vertical" : "horizontal"; 10533 }, _normValueFromMouse: function(t2) { 10534 var e2, t2 = "horizontal" === this.orientation ? (e2 = this.elementSize.width, t2.x - this.elementOffset.left - (this._clickOffset ? this._clickOffset.left : 0)) : (e2 = this.elementSize.height, t2.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0)), t2 = t2 / e2; 10535 return (t2 = 1 < t2 ? 1 : t2) < 0 && (t2 = 0), "vertical" === this.orientation && (t2 = 1 - t2), e2 = this._valueMax() - this._valueMin(), e2 = this._valueMin() + t2 * e2, this._trimAlignValue(e2); 10536 }, _uiHash: function(t2, e2, i2) { 10537 var s2 = { handle: this.handles[t2], handleIndex: t2, value: void 0 !== e2 ? e2 : this.value() }; 10538 return this._hasMultipleValues() && (s2.value = void 0 !== e2 ? e2 : this.values(t2), s2.values = i2 || this.values()), s2; 10539 }, _hasMultipleValues: function() { 10540 return this.options.values && this.options.values.length; 10541 }, _start: function(t2, e2) { 10542 return this._trigger("start", t2, this._uiHash(e2)); 10543 }, _slide: function(t2, e2, i2) { 10544 var s2, n2 = this.value(), o2 = this.values(); 10545 this._hasMultipleValues() && (s2 = this.values(e2 ? 0 : 1), n2 = this.values(e2), 2 === this.options.values.length && true === this.options.range && (i2 = 0 === e2 ? Math.min(s2, i2) : Math.max(s2, i2)), o2[e2] = i2), i2 !== n2 && false !== this._trigger("slide", t2, this._uiHash(e2, i2, o2)) && (this._hasMultipleValues() ? this.values(e2, i2) : this.value(i2)); 10546 }, _stop: function(t2, e2) { 10547 this._trigger("stop", t2, this._uiHash(e2)); 10548 }, _change: function(t2, e2) { 10549 this._keySliding || this._mouseSliding || (this._lastChangedValue = e2, this._trigger("change", t2, this._uiHash(e2))); 10550 }, value: function(t2) { 10551 return arguments.length ? (this.options.value = this._trimAlignValue(t2), this._refreshValue(), void this._change(null, 0)) : this._value(
10551); 10552 }, values: function(t2, e2) { 10553 var i2, s2, n2; 10554 if (1 < arguments.length) 10555 return this.options.values[t2] = this._trimAlignValue(e2), this._refreshValue(), void this._change(null, t2); 10556 if (!arguments.length) 10557 return this._values(); 10558 if (!Array.isArray(t2)) 10559 return this._hasMultipleValues() ? this._values(t2) : this.value(); 10560 for (i2 = this.options.values, s2 = t2, n2 = 0; n2 < i2.length; n2 += 1) 10561 i2[n2] = this._trimAlignValue(s2[n2]), this._change(null, n2); 10562 this._refreshValue(); 10563 }, _setOption: function(t2, e2) { 10564 var i2, s2 = 0; 10565 switch ("range" === t2 && true === this.options.range && ("min" === e2 ? (this.options.value = this._values(0), this.options.values = null) : "max" === e2 && (this.options.value = this._values(this.options.values.length - 1), this.options.values = null)), Array.isArray(this.options.values) && (s2 = this.options.values.length), this._super(t2, e2), t2) { 10566 case "orientation": 10567 this._detectOrientation(), this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-" + this.orientation), this._refreshValue(), this.options.range && this._refreshRange(e2), this.handles.css("horizontal" === e2 ? "bottom" : "left", ""); 10568 break; 10569 case "value": 10570 this._animateOff = true, this._refreshValue(), this._change(null, 0), this._animateOff = false; 10571 break; 10572 case "values": 10573 for (this._animateOff = true, this._refreshValue(), i2 = s2 - 1; 0 <= i2; i2--) 10574 this._change(null, i2); 10575 this._animateOff = false; 10576 break; 10577 case "step": 10578 case "min": 10579 case "max": 10580 this._animateOff = true, this._calculateNewMax(), this._refreshValue(), this._animateOff = false; 10581 break; 10582 case "range": 10583 this._animateOff = true, this._refresh(), this._animateOff = false; 10584 } 10585 }, _setOptionDisabled: function(t2) { 10586 this._super(t2), this._toggleClass(null, "ui-state-disabled", !!t2); 10587 }, _value: function() { 10588 var t2 = this.options.value; 10589 return t2 = this._trimAlignValue(t2); 10590 }, _values: function(t2) { 10591 var e2, i2; 10592 if (arguments.length) 10593 return t2 = this.options.values[t2], t2 = this._trimAlignValue(t2); 10594 if (this._hasMultipleValues()) { 10595 for (e2 = this.options.values.slice(), i2 = 0; i2 < e2.length; i2 += 1) 10596 e2[i2] = this._trimAlignValue(e2[i2]); 10597 return e2; 10598 } 10599 return []; 10600 }, _trimAlignValue: function(t2) { 10601 if (t2 <= this._valueMin()) 10602 return this._valueMin(); 10603 if (t2 >= this._valueMax()) 10604 return this._valueMax(); 10605 var e2 = 0 < this.options.step ? this.options.step : 1, i2 = (t2 - this._valueMin()) % e2, t2 = t2 - i2; 10606 return 2 * Math.abs(i2) >= e2 && (t2 += 0 < i2 ? e2 : -e2), parseFloat(t2.toFixed(5)); 10607 }, _calculateNewMax: function() { 10608 var t2 = this.options.max, e2 = this._valueMin(), i2 = this.options.step; 10609 (t2 = Math.round((t2 - e2) / i2) * i2 + e2) > this.options.max && (t2 -= i2), this.max = parseFloat(t2.toFixed(this._precision())); 10610 }, _precision: function() { 10611 var t2 = this._precisionOf(this.options.step); 10612 return t2 = null !== this.options.min ? Math.max(t2, this._precisionOf(this.options.min)) : t2; 10613 }, _precisionOf: function(t2) { 10614 var e2 = t2.toString(), t2 = e2.indexOf("."); 10615 return -1 === t2 ? 0 : e2.length - t2 - 1; 10616 }, _valueMin: function() { 10617 return this.options.min; 10618 }, _valueMax: function() { 10619 return this.max; 10620 }, _refreshRange: function(t2) { 10621 "vertical" === t2 && this.range.css({ width: "", left: "" }), "horizontal" === t2 && this.range.css({ height: "", bottom: "" }); 10622 }, _refreshValue: function() { 10623 var e2, i2, t2, s2, n2, o2 = this.options.range, a2 = this.options, r2 = this, l2 = !this._animateOff && a2.animate, h2 = {}; 10624 this._hasMultipleValues() ? this.handles.each(function(t3) { 10625 i2 = (r2.values(t3) - r2._valueMin()) / (r2._valueMax() - r2._valueMin()) * 100, h2["horizontal" === r2.orientation ? "left" : "bottom"] = i2 + "%", V(this).stop(1, 1)[l2 ? "animate" : "css"](h2, a2.animate), true === r2.options.range && ("horizontal" === r2.orientation ? (0 === t3 && r2.range.stop(1, 1)[l2 ? "animate" : "css"]({ left: i2 + "%" }, a2.animate), 1 === t3 && r2.range[l2 ? "animate" : "css"]({ width: i2 - e2 + "%" }, { queue: false, duration: a2.animate })) : (0 === t3 && r2.range.stop(1, 1)[l2 ? "animate" : "css"]({ bottom: i2 + "%" }, a2.animate), 1 === t3 && r2.range[l2 ? "animate" : "css"]({ height: i2 - e2 + "%" }, { queue: false, duration: a2.animate }))), e2 = i2; 10626 }) : (t2 = this.value(), s2 = this._valueMin(), n2 = this._valueMax(), i2 = n2 !== s2 ? (t2 - s2) / (n2 - s2) * 100 : 0, h2["horizontal" === this.orientation ? "left" : "bottom"] = i2 + "%", this.handle.stop(1, 1)[l2 ? "animate" : "css"](h2, a2.animate), "min" === o2 && "horizontal" === this.orientation && this.range.stop(1, 1)[l2 ? "animate" : "css"]({ width: i2 + "%" }, a2.animate), "max" === o2 && "horizontal" === this.orientation && this.range.stop(1, 1)[l2 ? "animate" : "css"]({ width: 100 - i2 + "%" }, a2.animate), "min" === o2 && "vertical" === this.orientation && this.range.stop(1, 1)[l2 ? "animate" : "css"]({ height: i2 + "%" }, a2.animate), "max" === o2 && "vertical" === this.orientation && this.range.stop(1, 1)[l2 ? "animate" : "css"]({ height: 100 - i2 + "%" }, a2.animate)); 10627 }, _handleEvents: { keydown: function(t2) { 10628 var e2, i2, s2, n2 = V(t2.target).data("ui-slider-handle-index"); 10629 switch (t2.keyCode) { 10630 case V.ui.keyCode.HOME: 10631 case V.ui.keyCode.END: 10632 case V.ui.keyCode.PAGE_UP: 10633 case V.ui.keyCode.PAGE_DOWN: 10634 case V.ui.keyCode.UP: 10635 case V.ui.keyCode.RIGHT: 10636 case V.ui.keyCode.DOWN: 10637 case V.ui.keyCode.LEFT: 10638 if (t2.preventDefault(), !this._keySliding && (this._keySliding = true, this._addClass(V(t2.target), null, "ui-state-active"), false === this._start(t2, n2))) 10639 return; 10640 } 10641 switch (s2 = this.options.step, e2 = i2 = this._hasMultipleValues() ? this.values(n2) : this.value(), t2.keyCode) { 10642 case V.ui.keyCode.HOME: 10643 i2 = this._valueMin(); 10644 break; 10645 case V.ui.keyCode.END: 10646 i2 = this._valueMax(); 10647 break; 10648 case V.ui.keyCode.PAGE_UP: 10649 i2 = this._trimAlignValue(e2 + (this._valueMax() - this._valueMin()) / this.numPages); 10650 break; 10651 case V.ui.keyCode.PAGE_DOWN: 10652 i2 = this._trimAlignValue(e2 - (this._valueMax() - this._valueMin()) / this.numPages); 10653 break; 10654 case V.ui.keyCode.UP: 10655 case V.ui.keyCode.RIGHT: 10656 if (e2 === this._valueMax()) 10657 return; 10658 i2 = this._trimAlignValue(e2 + s2); 10659 break; 10660 case V.ui.keyCode.DOWN: 10661 case V.ui.keyCode.LEFT: 10662 if (e2 === this._valueMin()) 10663 return; 10664 i2 = this._trimAlignValue(e2 - s2); 10665 } 10666 this._slide(t2, n2, i2); 10667 }, keyup: function(t2) { 10668 var e2 = V(t2.target).data("ui-slider-handle-index"); 10669 this._keySliding && (this._keySliding = false, this._stop(t2, e2), this._change(t2, e2), this._removeClass(V(t2.target), null, "ui-state-active")); 10670 } } }); 10671 function M(e2) { 10672 return function() { 10673 var t2 = this.element.val(); 10674 e2.apply(this, arguments), this._refresh(), t2 !== this.element.val() && this._trigger("change"); 10675 }; 10676 } 10677 V.widget("ui.spinner", { version: "1.13.2", defaultElement: "<input>", widgetEventPrefix: "spin", options: { classes: { "ui-spinner": "ui-corner-all", "ui-spinner-down": "ui-corner-br", "ui-spinner-up": "ui-corner-tr" }, culture: null, icons: { down: "ui-icon-triangle-1-s", up: "ui-icon-triangle-1-n" }, incremental: true, max: null, min: null, numberFormat: null, page: 10, step: 1, change: null, spin: null, start: null, stop: null }, _create: function() { 10678 this._setOption("max", this.options.max), this._setOption("min", this.options.min), this._setOption("step", this.options.step), "" !== this.value() && this._value(this.element.val(), true), this._draw(), this._on(this._events), this._refresh(), this._on(this.window, { beforeunload: function() { 10679 this.element.removeAttr("autocomplete"); 10680 } }); 10681 }, _getCreateOptions: function() { 10682 var s2 = this._super(), n2 = this.element; 10683 return V.each(["min", "max", "step"], function(t2, e2) { 10684 var i2 = n2.attr(e2); 10685 null != i2 && i2.length && (s2[e2] = i2); 10686 }), s2; 10687 }, _events: { keydown: function(t2) {
10688 this._start(t2) && this._keydown(t2) && t2.preventDefault(); 10689 }, keyup: "_stop", focus: function() { 10690 this.previous = this.element.val(); 10691 }, blur: function(t2) { 10692 this.cancelBlur ? delete this.cancelBlur : (this._stop(), this._refresh(), this.previous !== this.element.val() && this._trigger("change", t2)); 10693 }, mousewheel: function(t2, e2) { 10694 var i2 = V.ui.safeActiveElement(this.document[0]); 10695 if (this.element[0] === i2 && e2) { 10696 if (!this.spinning && !this._start(t2)) 10697 return false; 10698 this._spin((0 < e2 ? 1 : -1) * this.options.step, t2), clearTimeout(this.mousewheelTimer), this.mousewheelTimer = this._delay(function() { 10699 this.spinning && this._stop(t2); 10700 }, 100), t2.preventDefault(); 10701 } 10702 }, "mousedown .ui-spinner-button": function(t2) { 10703 var e2; 10704 function i2() { 10705 this.element[0] === V.ui.safeActiveElement(this.document[0]) || (this.element.trigger("focus"), this.previous = e2, this._delay(function() { 10706 this.previous = e2; 10707 })); 10708 } 10709 e2 = this.element[0] === V.ui.safeActiveElement(this.document[0]) ? this.previous : this.element.val(), t2.preventDefault(), i2.call(this), this.cancelBlur = true, this._delay(function() { 10710 delete this.cancelBlur, i2.call(this); 10711 }), false !== this._start(t2) && this._repeat(null, V(t2.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, t2); 10712 }, "mouseup .ui-spinner-button": "_stop", "mouseenter .ui-spinner-button": function(t2) { 10713 if (V(t2.currentTarget).hasClass("ui-state-active")) 10714 return false !== this._start(t2) && void this._repeat(null, V(t2.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, t2); 10715 }, "mouseleave .ui-spinner-button": "_stop" }, _enhance: function() { 10716 this.uiSpinner = this.element.attr("autocomplete", "off").wrap("<span>").parent().append("<a></a><a></a>"); 10717 }, _draw: function() { 10718 this._enhance(), this._addClass(this.uiSpinner, "ui-spinner", "ui-widget ui-widget-content"), this._addClass("ui-spinner-input"), this.element.attr("role", "spinbutton"), this.buttons = this.uiSpinner.children("a").attr("tabIndex", -1).attr("aria-hidden", true).button({ classes: { "ui-button": "" } }), this._removeClass(this.buttons, "ui-corner-all"), this._addClass(this.buttons.first(), "ui-spinner-button ui-spinner-up"), this._addClass(this.buttons.last(), "ui-spinner-button ui-spinner-down"), this.buttons.first().button({ icon: this.options.icons.up, showLabel: false }), this.buttons.last().button({ icon: this.options.icons.down, showLabel: false }), this.buttons.height() > Math.ceil(0.5 * this.uiSpinner.height()) && 0 < this.uiSpinner.height() && this.uiSpinner.height(this.uiSpinner.height()); 10719 }, _keydown: function(t2) { 10720 var e2 = this.options, i2 = V.ui.keyCode; 10721 switch (t2.keyCode) { 10722 case i2.UP: 10723 return this._repeat(null, 1, t2), true; 10724 case i2.DOWN: 10725 return this._repeat(null, -1, t2), true; 10726 case i2.PAGE_UP: 10727 return this._repeat(null, e2.page, t2), true; 10728 case i2.PAGE_DOWN: 10729 return this._repeat(null, -e2.page, t2), true; 10730 } 10731 return false; 10732 }, _start: function(t2) { 10733 return !(!this.spinning && false === this._trigger("start", t2)) && (this.counter || (this.counter = 1), this.spinning = true); 10734 }, _repeat: function(t2, e2, i2) { 10735 t2 = t2 || 500, clearTimeout(this.timer), this.timer = this._delay(function() { 10736 this._repeat(40, e2, i2); 10737 }, t2), this._spin(e2 * this.options.step, i2); 10738 }, _spin: function(t2, e2) { 10739 var i2 = this.value() || 0; 10740 this.counter || (this.counter = 1), i2 = this._adjustValue(i2 + t2 * this._increment(this.counter)), this.spinning && false === this._trigger("spin", e2, { value: i2 }) || (this._value(i2), this.counter++); 10741 }, _increment: function(t2) { 10742 var e2 = this.options.incremental; 10743 return e2 ? "function" == typeof e2 ? e2(t2) : Math.floor(t2 * t2 * t2 / 5e4 - t2 * t2 / 500 + 17 * t2 / 200 + 1) : 1; 10744 }, _precision: function() { 10745 var t2 = this._precisionOf(this.options.step); 10746 return t2 = null !== this.options.min ? Math.max(t2, this._precisionOf(this.options.min)) : t2; 10747 }, _precisionOf: function(t2) { 10748 var e2 = t2.toString(), t2 = e2.indexOf("."); 10749 return -1 === t2 ? 0 : e2.length - t2 - 1; 10750 }, _adjustValue: function(t2) { 10751 var e2 = this.options, i2 = null !== e2.min ? e2.min : 0, s2 = t2 - i2; 10752 return t2 = i2 + Math.round(s2 / e2.step) * e2.step, t2 = parseFloat(t2.toFixed(this._precision())), null !== e2.max && t2 > e2.max ? e2.max : null !== e2.min && t2 < e2.min ? e2.min : t2; 10753 }, _stop: function(t2) { 10754 this.spinning && (clearTimeout(this.timer), clearTimeout(this.mousewheelTimer), this.counter = 0, this.spinning = false, this._trigger("stop", t2)); 10755 }, _setOption: function(t2, e2) { 10756 var i2; 10757 if ("culture" === t2 || "numberFormat" === t2) 10758 return i2 = this._parse(this.element.val()), this.options[t2] = e2, void this.element.val(this._format(i2)); 10759 "max" !== t2 && "min" !== t2 && "step" !== t2 || "string" == typeof e2 && (e2 = this._parse(e2)), "icons" === t2 && (i2 = this.buttons.first().find(".ui-icon"), this._removeClass(i2, null, this.options.icons.up), this._addClass(i2, null, e2.up), i2 = this.buttons.last().find(".ui-icon"), this._removeClass(i2, null, this.options.icons.down), this._addClass(i2, null, e2.down)), this._super(t2, e2); 10760 }, _setOptionDisabled: function(t2) { 10761 this._super(t2), this._toggleClass(this.uiSpinner, null, "ui-state-disabled", !!t2), this.element.prop("disabled", !!t2), this.buttons.button(t2 ? "disable" : "enable"); 10762 }, _setOptions: M(function(t2) { 10763 this._super(t2); 10764 }), _parse: function(t2) { 10765 return "" === (t2 = "string" == typeof t2 && "" !== t2 ? window.Globalize && this.options.numberFormat ? Globalize.parseFloat(t2, 10, this.options.culture) : +t2 : t2) || isNaN(t2) ? null : t2; 10766 }, _format: function(t2) { 10767 return "" === t2 ? "" : window.Globalize && this.options.numberFormat ? Globalize.format(t2, this.options.numberFormat, this.options.culture) : t2; 10768 }, _refresh: function() { 10769 this.element.attr({ "aria-valuemin": this.options.min, "aria-valuemax": this.options.max, "aria-valuenow": this._parse(this.element.val()) }); 10770 }, isValid: function() { 10771 var t2 = this.value(); 10772 return null !== t2 && t2 === this._adjustValue(t2); 10773 }, _value: function(t2, e2) { 10774 var i2; 10775 "" !== t2 && null !== (i2 = this._parse(t2)) && (e2 || (i2 = this._adjustValue(i2)), t2 = this._format(i2)), this.element.val(t2), this._refresh(); 10776 }, _destroy: function() { 10777 this.element.prop("disabled", false).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"), this.uiSpinner.replaceWith(this.element); 10778 }, stepUp: M(function(t2) { 10779 this._stepUp(t2); 10780 }), _stepUp: function(t2) { 10781 this._start() && (this._spin((t2 || 1) * this.options.step), this._stop()); 10782 }, stepDown: M(function(t2) { 10783 this._stepDown(t2); 10784 }), _stepDown: function(t2) { 10785 this._start() && (this._spin((t2 || 1) * -this.options.step), this._stop()); 10786 }, pageUp: M(function(t2) { 10787 this._stepUp((t2 || 1) * this.options.page); 10788 }), pageDown: M(function(t2) { 10789 this._stepDown((t2 || 1) * this.options.page); 10790 }), value: function(t2) { 10791 if (!arguments.length) 10792 return this._parse(this.element.val()); 10793 M(this._value).call(this, t2); 10794 }, widget: function() { 10795 return this.uiSpinner; 10796 } }), false !== V.uiBackCompat && V.widget("ui.spinner", V.ui.spinner, { _enhance: function() { 10797 this.uiSpinner = this.element.attr("autocomplete", "off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml()); 10798 }, _uiSpinnerHtml: function() { 10799 return "<span>"; 10800 }, _buttonHtml: function() { 10801 return "<a></a><a></a>"; 10802 } }); 10803 var S; 10804 V.ui.spinner; 10805 V.widget("ui.tabs", { version: "1.13.2", delay: 300, options: { active: null, classes: { "ui-tabs": "ui-corner-all", "ui-tabs-nav": "ui-corner-all", "ui-tabs-panel": "ui-corner-bottom", "ui-tabs-tab": "ui-corner-top" }, collapsible: false, event: "click", heightStyle: "content", hide: null, show: null, activate: null, beforeActivate: null, beforeLoad: null, load: null }, _isLocal: (S = /#.*$/, function(t2) { 10806 var e2 = t2.href.replace(S, ""), i2 = location.href.replace(S, "");
10807 try { 10808 e2 = decodeURIComponent(e2); 10809 } catch (t3) { 10810 } 10811 try { 10812 i2 = decodeURIComponent(i2); 10813 } catch (t3) { 10814 } 10815 return 1 < t2.hash.length && e2 === i2; 10816 }), _create: function() { 10817 var e2 = this, t2 = this.options; 10818 this.running = false, this._addClass("ui-tabs", "ui-widget ui-widget-content"), this._toggleClass("ui-tabs-collapsible", null, t2.collapsible), this._processTabs(), t2.active = this._initialActive(), Array.isArray(t2.disabled) && (t2.disabled = V.uniqueSort(t2.disabled.concat(V.map(this.tabs.filter(".ui-state-disabled"), function(t3) { 10819 return e2.tabs.index(t3); 10820 }))).sort()), false !== this.options.active && this.anchors.length ? this.active = this._findActive(t2.active) : this.active = V(), this._refresh(), this.active.length && this.load(t2.active); 10821 }, _initialActive: function() { 10822 var i2 = this.options.active, t2 = this.options.collapsible, s2 = location.hash.substring(1); 10823 return null === i2 && (s2 && this.tabs.each(function(t3, e2) { 10824 if (V(e2).attr("aria-controls") === s2) 10825 return i2 = t3, false; 10826 }), null !== (i2 = null === i2 ? this.tabs.index(this.tabs.filter(".ui-tabs-active")) : i2) && -1 !== i2 || (i2 = !!this.tabs.length && 0)), false !== i2 && -1 === (i2 = this.tabs.index(this.tabs.eq(i2))) && (i2 = !t2 && 0), i2 = !t2 && false === i2 && this.anchors.length ? 0 : i2; 10827 }, _getCreateEventData: function() { 10828 return { tab: this.active, panel: this.active.length ? this._getPanelForTab(this.active) : V() }; 10829 }, _tabKeydown: function(t2) { 10830 var e2 = V(V.ui.safeActiveElement(this.document[0])).closest("li"), i2 = this.tabs.index(e2), s2 = true; 10831 if (!this._handlePageNav(t2)) { 10832 switch (t2.keyCode) { 10833 case V.ui.keyCode.RIGHT: 10834 case V.ui.keyCode.DOWN: 10835 i2++; 10836 break; 10837 case V.ui.keyCode.UP: 10838 case V.ui.keyCode.LEFT: 10839 s2 = false, i2--; 10840 break; 10841 case V.ui.keyCode.END: 10842 i2 = this.anchors.length - 1; 10843 break; 10844 case V.ui.keyCode.HOME: 10845 i2 = 0; 10846 break; 10847 case V.ui.keyCode.SPACE: 10848 return t2.preventDefault(), clearTimeout(this.activating), void this._activate(i2); 10849 case V.ui.keyCode.ENTER: 10850 return t2.preventDefault(), clearTimeout(this.activating), void this._activate(i2 !== this.options.active && i2); 10851 default: 10852 return; 10853 } 10854 t2.preventDefault(), clearTimeout(this.activating), i2 = this._focusNextTab(i2, s2), t2.ctrlKey || t2.metaKey || (e2.attr("aria-selected", "false"), this.tabs.eq(i2).attr("aria-selected", "true"), this.activating = this._delay(function() { 10855 this.option("active", i2); 10856 }, this.delay)); 10857 } 10858 }, _panelKeydown: function(t2) { 10859 this._handlePageNav(t2) || t2.ctrlKey && t2.keyCode === V.ui.keyCode.UP && (t2.preventDefault(), this.active.trigger("focus")); 10860 }, _handlePageNav: function(t2) { 10861 return t2.altKey && t2.keyCode === V.ui.keyCode.PAGE_UP ? (this._activate(this._focusNextTab(this.options.active - 1, false)), true) : t2.altKey && t2.keyCode === V.ui.keyCode.PAGE_DOWN ? (this._activate(this._focusNextTab(this.options.active + 1, true)), true) : void 0; 10862 }, _findNextTab: function(t2, e2) { 10863 var i2 = this.tabs.length - 1; 10864 for (; -1 !== V.inArray(t2 = (t2 = i2 < t2 ? 0 : t2) < 0 ? i2 : t2, this.options.disabled); ) 10865 t2 = e2 ? t2 + 1 : t2 - 1; 10866 return t2; 10867 }, _focusNextTab: function(t2, e2) { 10868 return t2 = this._findNextTab(t2, e2), this.tabs.eq(t2).trigger("focus"), t2; 10869 }, _setOption: function(t2, e2) { 10870 "active" !== t2 ? (this._super(t2, e2), "collapsible" === t2 && (this._toggleClass("ui-tabs-collapsible", null, e2), e2 || false !== this.options.active || this._activate(0)), "event" === t2 && this._setupEvents(e2), "heightStyle" === t2 && this._setupHeightStyle(e2)) : this._activate(e2); 10871 }, _sanitizeSelector: function(t2) { 10872 return t2 ? t2.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&") : ""; 10873 }, refresh: function() { 10874 var t2 = this.options, e2 = this.tablist.children(":has(a[href])"); 10875 t2.disabled = V.map(e2.filter(".ui-state-disabled"), function(t3) { 10876 return e2.index(t3); 10877 }), this._processTabs(), false !== t2.active && this.anchors.length ? this.active.length && !V.contains(this.tablist[0], this.active[0]) ? this.tabs.length === t2.disabled.length ? (t2.active = false, this.active = V()) : this._activate(this._findNextTab(Math.max(0, t2.active - 1), false)) : t2.active = this.tabs.index(this.active) : (t2.active = false, this.active = V()), this._refresh(); 10878 }, _refresh: function() { 10879 this._setOptionDisabled(this.options.disabled), this._setupEvents(this.options.event), this._setupHeightStyle(this.options.heightStyle), this.tabs.not(this.active).attr({ "aria-selected": "false", "aria-expanded": "false", tabIndex: -1 }), this.panels.not(this._getPanelForTab(this.active)).hide().attr({ "aria-hidden": "true" }), this.active.length ? (this.active.attr({ "aria-selected": "true", "aria-expanded": "true", tabIndex: 0 }), this._addClass(this.active, "ui-tabs-active", "ui-state-active"), this._getPanelForTab(this.active).show().attr({ "aria-hidden": "false" })) : this.tabs.eq(0).attr("tabIndex", 0); 10880 }, _processTabs: function() { 10881 var l2 = this, t2 = this.tabs, e2 = this.anchors, i2 = this.panels; 10882 this.tablist = this._getList().attr("role", "tablist"), this._addClass(this.tablist, "ui-tabs-nav", "ui-helper-reset ui-helper-clearfix ui-widget-header"), this.tablist.on("mousedown" + this.eventNamespace, "> li", function(t3) { 10883 V(this).is(".ui-state-disabled") && t3.preventDefault(); 10884 }).on("focus" + this.eventNamespace, ".ui-tabs-anchor", function() { 10885 V(this).closest("li").is(".ui-state-disabled") && this.blur(); 10886 }), this.tabs = this.tablist.find("> li:has(a[href])").attr({ role: "tab", tabIndex: -1 }), this._addClass(this.tabs, "ui-tabs-tab", "ui-state-default"), this.anchors = this.tabs.map(function() { 10887 return V("a", this)[0]; 10888 }).attr({ tabIndex: -1 }), this._addClass(this.anchors, "ui-tabs-anchor"), this.panels = V(), this.anchors.each(function(t3, e3) { 10889 var i3, s2, n2, o2 = V(e3).uniqueId().attr("id"), a2 = V(e3).closest("li"), r2 = a2.attr("aria-controls"); 10890 l2._isLocal(e3) ? (n2 = (i3 = e3.hash).substring(1), s2 = l2.element.find(l2._sanitizeSelector(i3))) : (n2 = a2.attr("aria-controls") || V({}).uniqueId()[0].id, (s2 = l2.element.find(i3 = "#" + n2)).length || (s2 = l2._createPanel(n2)).insertAfter(l2.panels[t3 - 1] || l2.tablist), s2.attr("aria-live", "polite")), s2.length && (l2.panels = l2.panels.add(s2)), r2 && a2.data("ui-tabs-aria-controls", r2), a2.attr({ "aria-controls": n2, "aria-labelledby": o2 }), s2.attr("aria-labelledby", o2); 10891 }), this.panels.attr("role", "tabpanel"), this._addClass(this.panels, "ui-tabs-panel", "ui-widget-content"), t2 && (this._off(t2.not(this.tabs)
10891), this._off(e2.not(this.anchors)), this._off(i2.not(this.panels))); 10892 }, _getList: function() { 10893 return this.tablist || this.element.find("ol, ul").eq(0); 10894 }, _createPanel: function(t2) { 10895 return V("<div>").attr("id", t2).data("ui-tabs-destroy", true); 10896 }, _setOptionDisabled: function(t2) { 10897 var e2, i2; 10898 for (Array.isArray(t2) && (t2.length ? t2.length === this.anchors.length && (t2 = true) : t2 = false), i2 = 0; e2 = this.tabs[i2]; i2++) 10899 e2 = V(e2), true === t2 || -1 !== V.inArray(i2, t2) ? (e2.attr("aria-disabled", "true"), this._addClass(e2, null, "ui-state-disabled")) : (e2.removeAttr("aria-disabled"), this._removeClass(e2, null, "ui-state-disabled")); 10900 this.options.disabled = t2, this._toggleClass(this.widget(), this.widgetFullName + "-disabled", null, true === t2); 10901 }, _setupEvents: function(t2) { 10902 var i2 = {}; 10903 t2 && V.each(t2.split(" "), function(t3, e2) { 10904 i2[e2] = "_eventHandler"; 10905 }), this._off(this.anchors.add(this.tabs).add(this.panels)), this._on(true, this.anchors, { click: function(t3) { 10906 t3.preventDefault(); 10907 } }), this._on(this.anchors, i2), this._on(this.tabs, { keydown: "_tabKeydown" }), this._on(this.panels, { keydown: "_panelKeydown" }), this._focusable(this.tabs), this._hoverable(this.tabs); 10908 }, _setupHeightStyle: function(t2) { 10909 var i2, e2 = this.element.parent(); 10910 "fill" === t2 ? (i2 = e2.height(), i2 -= this.element.outerHeight() - this.element.height(), this.element.siblings(":visible").each(function() { 10911 var t3 = V(this), e3 = t3.css("position"); 10912 "absolute" !== e3 && "fixed" !== e3 && (i2 -= t3.outerHeight(true)); 10913 }), this.element.children().not(this.panels).each(function() { 10914 i2 -= V(this).outerHeight(true); 10915 }), this.panels.each(function() { 10916 V(this).height(Math.max(0, i2 - V(this).innerHeight() + V(this).height())); 10917 }).css("overflow", "auto")) : "auto" === t2 && (i2 = 0, this.panels.each(function() { 10918 i2 = Math.max(i2, V(this).height("").height()); 10919 }).height(i2)); 10920 }, _eventHandler: function(t2) { 10921 var e2 = this.options, i2 = this.active, s2 = V(t2.currentTarget).closest("li"), n2 = s2[0] === i2[0], o2 = n2 && e2.collapsible, a2 = o2 ? V() : this._getPanelForTab(s2), r2 = i2.length ? this._getPanelForTab(i2) : V(), i2 = { oldTab: i2, oldPanel: r2, newTab: o2 ? V() : s2, newPanel: a2 }; 10922 t2.preventDefault(), s2.hasClass("ui-state-disabled") || s2.hasClass("ui-tabs-loading") || this.running || n2 && !e2.collapsible || false === this._trigger("beforeActivate", t2, i2) || (e2.active = !o2 && this.tabs.index(s2), this.active = n2 ? V() : s2, this.xhr && this.xhr.abort(), r2.length || a2.length || V.error("jQuery UI Tabs: Mismatching fragment identifier."), a2.length && this.load(this.tabs.index(s2), t2), this._toggle(t2, i2)); 10923 }, _toggle: function(t2, e2) { 10924 var i2 = this, s2 = e2.newPanel, n2 = e2.oldPanel; 10925 function o2() { 10926 i2.running = false, i2._trigger("activate", t2, e2); 10927 } 10928 function a2() { 10929 i2._addClass(e2.newTab.closest("li"), "ui-tabs-active", "ui-state-active"), s2.length && i2.options.show ? i2._show(s2, i2.options.show, o2) : (s2.show(), o2()); 10930 } 10931 this.running = true, n2.length && this.options.hide ? this._hide(n2, this.options.hide, function() { 10932 i2._removeClass(e2.oldTab.closest("li"), "ui-tabs-active", "ui-state-active"), a2(); 10933 }) : (this._removeClass(e2.oldTab.closest("li"), "ui-tabs-active", "ui-state-active"), n2.hide(), a2()), n2.attr("aria-hidden", "true"), e2.oldTab.attr({ "aria-selected": "false", "aria-expanded": "false" }), s2.length && n2.length ? e2.oldTab.attr("tabIndex", -1) : s2.length && this.tabs.filter(function() { 10934 return 0 === V(this).attr("tabIndex"); 10935 }).attr("tabIndex", -1), s2.attr("aria-hidden", "false"), e2.newTab.attr({ "aria-selected": "true", "aria-expanded": "true", tabIndex: 0 }); 10936 }, _activate: function(t2) { 10937 var t2 = this._findActive(t2); 10938 t2[0] !== this.active[0] && (t2 = (t2 = !t2.length ? this.active : t2).find(".ui-tabs-anchor")[0], this._eventHandler({ target: t2, currentTarget: t2, preventDefault: V.noop })); 10939 }, _findActive: function(t2) { 10940 return false === t2 ? V() : this.tabs.eq(t2); 10941 }, _getIndex: function(t2) { 10942 return t2 = "string" == typeof t2 ? this.anchors.index(this.anchors.filter("[href$='" + V.escapeSelector(t2) + "']")) : t2; 10943 }, _destroy: function() { 10944 this.xhr && this.xhr.abort(), this.tablist.removeAttr("role").off(this.eventNamespace), this.anchors.removeAttr("role tabIndex").removeUniqueId(), this.tabs.add(this.panels).each(function() { 10945 V.data(this, "ui-tabs-destroy") ? V(this).remove() : V(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded"); 10946 }), this.tabs.each(function() { 10947 var t2 = V(this), e2 = t2.data("ui-tabs-aria-controls"); 10948 e2 ? t2.attr("aria-controls", e2).removeData("ui-tabs-aria-controls") : t2.removeAttr("aria-controls"); 10949 }), this.panels.show(), "content" !== this.options.heightStyle && this.panels.css("height", ""); 10950 }, enable: function(i2) { 10951 var t2 = this.options.disabled; 10952 false !== t2 && (t2 = void 0 !== i2 && (i2 = this._getIndex(i2), Array.isArray(t2) ? V.map(t2, function(t3) { 10953 return t3 !== i2 ? t3 : null; 10954 }) : V.map(this.tabs, function(t3, e2) { 10955 return e2 !== i2 ? e2 : null; 10956 })), this._setOptionDisabled(t2)); 10957 }, disable: function(t2) { 10958 var e2 = this.options.disabled; 10959 if (true !== e2) { 10960 if (void 0 === t2) 10961 e2 = true; 10962 else { 10963 if (t2 = this._getIndex(t2), -1 !== V.inArray(t2, e2)) 10964 return; 10965 e2 = Array.isArray(e2) ? V.merge([t2], e2).sort() : [t2]; 10966 } 10967 this._setOptionDisabled(e2); 10968 } 10969 }, load: function(t2, s2) { 10970 t2 = this._getIndex(t2); 10971 function n2(t3, e2) { 10972 "abort" === e2 && o2.panels.stop(false, true), o2._removeClass(i2, "ui-tabs-loading"), a2.removeAttr("aria-busy"), t3 === o2.xhr && delete o2.xhr; 10973 } 10974 var o2 = this, i2 = this.tabs.eq(t2), t2 = i2.find(".ui-tabs-anchor"), a2 = this._getPanelForTab(i2), r2 = { tab: i2, panel: a2 }; 10975 this._isLocal(t2[0]) || (this.xhr = V.ajax(this._ajaxSettings(t2, s2, r2)), this.xhr && "canceled" !== this.xhr.statusText && (this._addClass(i2, "ui-tabs-loading"), a2.attr("aria-busy", "true"), this.xhr.done(function(t3, e2, i3) { 10976 setTimeout(function() { 10977 a2.html(t3), o2._trigger("load", s2, r2), n2(i3, e2); 10978 }, 1); 10979 }).fail(function(t3, e2) { 10980 setTimeout(function() { 10981 n2(t3, e2); 10982 }, 1); 10983 }))); 10984 }, _ajaxSettings: function(t2, i2, s2) { 10985 var n2 = this; 10986 return { url: t2.attr("href").replace(/#.*$/, ""), beforeSend: function(t3, e2) { 10987 return n2._trigger("beforeLoad", i2, V.extend({ jqXHR: t3, ajaxSettings: e2 }, s2)); 10988 } }; 10989 }, _getPanelForTab: function(t2) { 10990 t2 = V(t2).attr("aria-controls"); 10991 return this.element.find(this._sanitizeSelector("#" + t2)); 10992 } }), false !== V.uiBackCompat && V.widget("ui.tabs", V.ui.tabs, { _processTabs: function() { 10993 this._superApply(arguments), this._addClass(this.tabs, "ui-tab"); 10994 } }); 10995 V.ui.tabs; 10996 V.widget("ui.tooltip", { version: "1.13.2", options: { classes: { "ui-tooltip": "ui-corner-all ui-widget-shadow" }, content: function() { 10997 var t2 = V(this).attr("title"); 10998 return V("<a>").text(t2).html(); 10999 }, hide: true, items: "[title]:not([disabled])", position: { my: "left top+15", at: "left bottom", collision: "flipfit flip" }, show: true, track: false, close: null, open: null }, _addDescribedBy: function(t2, e2) { 11000 var i2 = (t2.attr("aria-describedby") || "").split(/\s+/); 11001 i2.push(e2), t2.data("ui-tooltip-id", e2).attr("aria-describedby", String.prototype.trim.call(i2.join(" "))); 11002 }, _removeDescribedBy: function(t2) { 11003 var e2 = t2.data("ui-tooltip-id"), i2 = (t2.attr("aria-describedby") || "").split(/\s+/), e2 = V.inArray(e2, i2);
11004 -1 !== e2 && i2.splice(e2, 1), t2.removeData("ui-tooltip-id"), (i2 = String.prototype.trim.call(i2.join(" "))) ? t2.attr("aria-describedby", i2) : t2.removeAttr("aria-describedby"); 11005 }, _create: function() { 11006 this._on({ mouseover: "open", focusin: "open" }), this.tooltips = {}, this.parents = {}, this.liveRegion = V("<div>").attr({ role: "log", "aria-live": "assertive", "aria-relevant": "additions" }).appendTo(this.document[0].body), this._addClass(this.liveRegion, null, "ui-helper-hidden-accessible"), this.disabledTitles = V([]); 11007 }, _setOption: function(t2, e2) { 11008 var i2 = this; 11009 this._super(t2, e2), "content" === t2 && V.each(this.tooltips, function(t3, e3) { 11010 i2._updateContent(e3.element); 11011 }); 11012 }, _setOptionDisabled: function(t2) { 11013 this[t2 ? "_disable" : "_enable"](); 11014 }, _disable: function() { 11015 var s2 = this; 11016 V.each(this.tooltips, function(t2, e2) { 11017 var i2 = V.Event("blur"); 11018 i2.target = i2.currentTarget = e2.element[0], s2.close(i2, true); 11019 }), this.disabledTitles = this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function() { 11020 var t2 = V(this); 11021 if (t2.is("[title]")) 11022 return t2.data("ui-tooltip-title", t2.attr("title")).removeAttr("title"); 11023 })); 11024 }, _enable: function() { 11025 this.disabledTitles.each(function() { 11026 var t2 = V(this); 11027 t2.data("ui-tooltip-title") && t2.attr("title", t2.data("ui-tooltip-title")); 11028 }), this.disabledTitles = V([]); 11029 }, open: function(t2) { 11030 var i2 = this, e2 = V(t2 ? t2.target : this.element).closest(this.options.items); 11031 e2.length && !e2.data("ui-tooltip-id") && (e2.attr("title") && e2.data("ui-tooltip-title", e2.attr("title")), e2.data("ui-tooltip-open", true), t2 && "mouseover" === t2.type && e2.parents().each(function() { 11032 var t3, e3 = V(this); 11033 e3.data("ui-tooltip-open") && ((t3 = V.Event("blur")).target = t3.currentTarget = this, i2.close(t3, true)), e3.attr("title") && (e3.uniqueId(), i2.parents[this.id] = { element: this, title: e3.attr("title") }, e3.attr("title", "")); 11034 }), this._registerCloseHandlers(t2, e2), this._updateContent(e2, t2)); 11035 }, _updateContent: function(e2, i2) { 11036 var t2 = this.options.content, s2 = this, n2 = i2 ? i2.type : null; 11037 if ("string" == typeof t2 || t2.nodeType || t2.jquery) 11038 return this._open(i2, e2, t2); 11039 (t2 = t2.call(e2[0], function(t3) { 11040 s2._delay(function() { 11041 e2.data("ui-tooltip-open") && (i2 && (i2.type = n2), this._open(i2, e2, t3)); 11042 }); 11043 })) && this._open(i2, e2, t2); 11044 }, _open: function(t2, e2, i2) { 11045 var s2, n2, o2, a2 = V.extend({}, this.options.position); 11046 function r2(t3) { 11047 a2.of = t3, n2.is(":hidden") || n2.position(a2); 11048 } 11049 i2 && ((s2 = this._find(e2)) ? s2.tooltip.find(".ui-tooltip-content").html(i2) : (e2.is("[title]") && (t2 && "mouseover" === t2.type ? e2.attr("title", "") : e2.removeAttr("title")), s2 = this._tooltip(e2), n2 = s2.tooltip, this._addDescribedBy(e2, n2.attr("id")), n2.find(".ui-tooltip-content").html(i2), this.liveRegion.children().hide(), (i2 = V("<div>").html(n2.find(".ui-tooltip-content").html())).removeAttr("name").find("[name]").removeAttr("name"), i2.removeAttr("id").find("[id]").removeAttr("id"), i2.appendTo(this.liveRegion), this.options.track && t2 && /^mouse/.test(t2.type) ? (this._on(this.document, { mousemove: r2 }), r2(t2)) : n2.position(V.extend({ of: e2 }, this.options.position)), n2.hide(), this._show(n2, this.options.show), this.options.track && this.options.show && this.options.show.delay && (o2 = this.delayedShow = setInterval(function() { 11050 n2.is(":visible") && (r2(a2.of), clearInterval(o2)); 11051 }, 13)), this._trigger("open", t2, { tooltip: n2 }))); 11052 }, _registerCloseHandlers: function(t2, e2) { 11053 var i2 = { keyup: function(t3) { 11054 t3.keyCode === V.ui.keyCode.ESCAPE && ((t3 = V.Event(t3)).currentTarget = e2[0], this.close(t3, true)); 11055 } }; 11056 e2[0] !== this.element[0] && (i2.remove = function() { 11057 var t3 = this._find(e2); 11058 t3 && this._removeTooltip(t3.tooltip); 11059 }), t2 && "mouseover" !== t2.type || (i2.mouseleave = "close"), t2 && "focusin" !== t2.type || (i2.focusout = "close"), this._on(true, e2, i2); 11060 }, close: function(t2) { 11061 var e2, i2 = this, s2 = V(t2 ? t2.currentTarget : this.element), n2 = this._find(s2); 11062 n2 ? (e2 = n2.tooltip, n2.closing || (clearInterval(this.delayedShow), s2.data("ui-tooltip-title") && !s2.attr("title") && s2.attr("title", s2.data("ui-tooltip-title")), this._removeDescribedBy(s2), n2.hiding = true, e2.stop(true), this._hide(e2, this.options.hide, function() { 11063 i2._removeTooltip(V(this)); 11064 }), s2.removeData("ui-tooltip-open"), this._off(s2, "mouseleave focusout keyup"), s2[0] !== this.element[0] && this._off(s2, "remove"), this._off(this.document, "mousemove"), t2 && "mouseleave" === t2.type && V.each(this.parents, function(t3, e3) { 11065 V(e3.element).attr("title", e3.title), delete i2.parents[t3]; 11066 }), n2.closing = true, this._trigger("close", t2, { tooltip: e2 }), n2.hiding || (n2.closing = false))) : s2.removeData("ui-tooltip-open"); 11067 }, _tooltip: function(t2) { 11068 var e2 = V("<div>").attr("role", "tooltip"), i2 = V("<div>").appendTo(e2), s2 = e2.uniqueId().attr("id"); 11069 return this._addClass(i2, "ui-tooltip-content"), this._addClass(e2, "ui-tooltip", "ui-widget ui-widget-content"), e2.appendTo(this._appendTo(t2)), this.tooltips[s2] = { element: t2, tooltip: e2 }; 11070 }, _find: function(t2) { 11071 t2 = t2.data("ui-tooltip-id"); 11072 return t2 ? this.tooltips[t2] : null; 11073 }, _removeTooltip: function(t2) { 11074 clearInterval(this.delayedShow), t2.remove(), delete this.tooltips[t2.attr("id")]; 11075 }, _appendTo: function(t2) { 11076 t2 = t2.closest(".ui-front, dialog"); 11077 return t2 = !t2.length ? this.document[0].body : t2; 11078 }, _destroy: function() { 11079 var s2 = this; 11080 V.each(this.tooltips, function(t2, e2) { 11081 var i2 = V.Event("blur"), e2 = e2.element; 11082 i2.target = i2.currentTarget = e2[0], s2.close(i2, true), V("#" + t2).remove(), e2.data("ui-tooltip-title") && (e2.attr("title") || e2.attr("title", e2.data("ui-tooltip-title")), e2.removeData("ui-tooltip-title")); 11083 }), this.liveRegion.remove(); 11084 } }), false !== V.uiBackCompat && V.widget("ui.tooltip", V.ui.tooltip, { options: { tooltipClass: null }, _tooltip: function() { 11085 var t2 = this._superApply(arguments); 11086 return this.options.tooltipClass && t2.tooltip.addClass(this.options.tooltipClass), t2; 11087 } }); 11088 V.ui.tooltip; 11089 var H = V, z = {}, A = z.toString, O = /^([\-+])=\s*(\d+\.?\d*)/, N = [{ re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, parse: function(t2) { 11090 return [t2[1], t2[2], t2[3], t2[4]]; 11091 } }, { re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, parse: function(t2) { 11092 return [2.55 * t2[1], 2.55 * t2[2], 2.55 * t2[3], t2[4]]; 11093 } }, { re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/, parse: function(t2) { 11094 return [parseInt(t2[1], 16), parseInt(t2[2], 16), parseInt(t2[3], 16), t2[4] ? (parseInt(t2[4], 16) / 25
110945).toFixed(2) : 1]; 11095 } }, { re: /#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/, parse: function(t2) { 11096 return [parseInt(t2[1] + t2[1], 16), parseInt(t2[2] + t2[2], 16), parseInt(t2[3] + t2[3], 16), t2[4] ? (parseInt(t2[4] + t2[4], 16) / 255).toFixed(2) : 1]; 11097 } }, { re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, space: "hsla", parse: function(t2) { 11098 return [t2[1], t2[2] / 100, t2[3] / 100, t2[4]]; 11099 } }], E = H.Color = function(t2, e2, i2, s2) { 11100 return new H.Color.fn.parse(t2, e2, i2, s2); 11101 }, W = { rgba: { props: { red: { idx: 0, type: "byte" }, green: { idx: 1, type: "byte" }, blue: { idx: 2, type: "byte" } } }, hsla: { props: { hue: { idx: 0, type: "degrees" }, saturation: { idx: 1, type: "percent" }, lightness: { idx: 2, type: "percent" } } } }, F = { byte: { floor: true, max: 255 }, percent: { max: 1 }, degrees: { mod: 360, floor: true } }, L = E.support = {}, R = H("<p>")[0], Y = H.each; 11102 function B(t2) { 11103 return null == t2 ? t2 + "" : "object" == typeof t2 ? z[A.call(t2)] || "object" : typeof t2; 11104 } 11105 function j(t2, e2, i2) { 11106 var s2 = F[e2.type] || {}; 11107 return null == t2 ? i2 || !e2.def ? null : e2.def : (t2 = s2.floor ? ~~t2 : parseFloat(t2), isNaN(t2) ? e2.def : s2.mod ? (t2 + s2.mod) % s2.mod : Math.min(s2.max, Math.max(0, t2))); 11108 } 11109 function q(s2) { 11110 var n2 = E(), o2 = n2._rgba = []; 11111 return s2 = s2.toLowerCase(), Y(N, function(t2, e2) { 11112 var i2 = e2.re.exec(s2), i2 = i2 && e2.parse(i2), e2 = e2.space || "rgba"; 11113 if (i2) 11114 return i2 = n2[e2](i2), n2[W[e2].cache] = i2[W[e2].cache], o2 = n2._rgba = i2._rgba, false; 11115 }), o2.length ? ("0,0,0,0" === o2.join() && H.extend(o2, st.transparent), n2) : st[s2]; 11116 } 11117 function K(t2, e2, i2) { 11118 return 6 * (i2 = (i2 + 1) % 1) < 1 ? t2 + (e2 - t2) * i2 * 6 : 2 * i2 < 1 ? e2 : 3 * i2 < 2 ? t2 + (e2 - t2) * (2 / 3 - i2) * 6 : t2; 11119 } 11120 R.style.cssText = "background-color:rgba(1,1,1,.5)", L.rgba = -1 < R.style.backgroundColor.indexOf("rgba"), Y(W, function(t2, e2) { 11121 e2.cache = "_" + t2, e2.props.alpha = { idx: 3, type: "percent", def: 1 }; 11122 }), H.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function(t2, e2) { 11123 z["[object " + e2 + "]"] = e2.toLowerCase(); 11124 }), (E.fn = H.extend(E.prototype, { parse: function(n2, t2, e2, i2) { 11125 if (void 0 === n2) 11126 return this._rgba = [null, null, null, null], this; 11127 (n2.jquery || n2.nodeType) && (n2 = H(n2).css(t2), t2 = void 0); 11128 var o2 = this, s2 = B(n2), a2 = this._rgba = []; 11129 return void 0 !== t2 && (n2 = [n2, t2, e2, i2], s2 = "array"), "string" === s2 ? this.parse(q(n2) || st._default) : "array" === s2 ? (Y(W.rgba.props, function(t3, e3) { 11130 a2[e3.idx] = j(n2[e3.idx], e3); 11131 }), this) : "object" === s2 ? (Y(W, n2 instanceof E ? function(t3, e3) { 11132 n2[e3.cache] && (o2[e3.cache] = n2[e3.cache].slice()); 11133 } : function(t3, i3) { 11134 var s3 = i3.cache; 11135 Y(i3.props, function(t4, e3) { 11136 if (!o2[s3] && i3.to) { 11137 if ("alpha" === t4 || null == n2[t4]) 11138 return; 11139 o2[s3] = i3.to(o2._rgba); 11140 } 11141 o2[s3][e3.idx] = j(n2[t4], e3, true); 11142 }), o2[s3] && H.inArray(null, o2[s3].slice(0, 3)) < 0 && (null == o2[s3][3] && (o2[s3][3] = 1), i3.from && (o2._rgba = i3.from(o2[s3]))); 11143 }), this) : void 0; 11144 }, is: function(t2) { 11145 var n2 = E(t2), o2 = true, a2 = this; 11146 return Y(W, function(t3, e2) { 11147 var i2, s2 = n2[e2.cache]; 11148 return s2 && (i2 = a2[e2.cache] || e2.to && e2.to(a2._rgba) || [], Y(e2.props, function(t4, e3) { 11149 if (null != s2[e3.idx]) 11150 return o2 = s2[e3.idx] === i2[e3.idx]; 11151 })), o2; 11152 }), o2; 11153 }, _space: function() { 11154 var i2 = [], s2 = this; 11155 return Y(W, function(t2, e2) { 11156 s2[e2.cache] && i2.push(t2); 11157 }), i2.pop(); 11158 }, transition: function(t2, a2) { 11159 var e2 = (h2 = E(t2))._space(), i2 = W[e2], t2 = 0 === this.alpha() ? E("transparent") : this, r2 = t2[i2.cache] || i2.to(t2._rgba), l2 = r2.slice(), h2 = h2[i2.cache]; 11160 return Y(i2.props, function(t3, e3) { 11161 var i3 = e3.idx, s2 = r2[i3], n2 = h2[i3], o2 = F[e3.type] || {}; 11162 null !== n2 && (null === s2 ? l2[i3] = n2 : (o2.mod && (n2 - s2 > o2.mod / 2 ? s2 += o2.mod : s2 - n2 > o2.mod / 2 && (s2 -= o2.mod)), l2[i3] = j((n2 - s2) * a2 + s2, e3))); 11163 }), this[e2](l2); 11164 }, blend: function(t2) { 11165 if (1 === this._rgba[3]) 11166 return this; 11167 var e2 = this._rgba.slice(), i2 = e2.pop(), s2 = E(t2)._rgba; 11168 return E(H.map(e2, function(t3, e3) { 11169 return (1 - i2) * s2[e3] + i2 * t3; 11170 })); 11171 }, toRgbaString: function() { 11172 var t2 = "rgba(", e2 = H.map(this._rgba, function(t3, e3) { 11173 return null != t3 ? t3 : 2 < e3 ? 1 : 0; 11174 }); 11175 return 1 === e2[3] && (e2.pop(), t2 = "rgb("), t2 + e2.join() + ")"; 11176 }, toHslaString: function() { 11177 var t2 = "hsla(", e2 = H.map(this.hsla(), function(t3, e3) { 11178 return null == t3 && (t3 = 2 < e3 ? 1 : 0), t3 = e3 && e3 < 3 ? Math.round(100 * t3) + "%" : t3; 11179 }); 11180 return 1 === e2[3] && (e2.pop(), t2 = "hsl("), t2 + e2.join() + ")"; 11181 }, toHexString: function(t2) { 11182 var e2 = this._rgba.slice(), i2 = e2.pop(); 11183 return t2 && e2.push(~~(255 * i2)), "#" + H.map(e2, function(t3) {
11184 return 1 === (t3 = (t3 || 0).toString(16)).length ? "0" + t3 : t3; 11185 }).join(""); 11186 }, toString: function() { 11187 return 0 === this._rgba[3] ? "transparent" : this.toRgbaString(); 11188 } })).parse.prototype = E.fn, W.hsla.to = function(t2) { 11189 if (null == t2[0] || null == t2[1] || null == t2[2]) 11190 return [null, null, null, t2[3]]; 11191 var e2 = t2[0] / 255, i2 = t2[1] / 255, s2 = t2[2] / 255, n2 = t2[3], o2 = Math.max(e2, i2, s2), a2 = Math.min(e2, i2, s2), r2 = o2 - a2, l2 = o2 + a2, t2 = 0.5 * l2, i2 = a2 === o2 ? 0 : e2 === o2 ? 60 * (i2 - s2) / r2 + 360 : i2 === o2 ? 60 * (s2 - e2) / r2 + 120 : 60 * (e2 - i2) / r2 + 240, l2 = 0 == r2 ? 0 : t2 <= 0.5 ? r2 / l2 : r2 / (2 - l2); 11192 return [Math.round(i2) % 360, l2, t2, null == n2 ? 1 : n2]; 11193 }, W.hsla.from = function(t2) { 11194 if (null == t2[0] || null == t2[1] || null == t2[2]) 11195 return [null, null, null, t2[3]]; 11196 var e2 = t2[0] / 360, i2 = t2[1], s2 = t2[2], t2 = t2[3], i2 = s2 <= 0.5 ? s2 * (1 + i2) : s2 + i2 - s2 * i2, s2 = 2 * s2 - i2; 11197 return [Math.round(255 * K(s2, i2, e2 + 1 / 3)), Math.round(255 * K(s2, i2, e2)), Math.round(255 * K(s2, i2, e2 - 1 / 3)), t2]; 11198 }, Y(W, function(l2, t2) { 11199 var e2 = t2.props, o2 = t2.cache, a2 = t2.to, r2 = t2.from; 11200 E.fn[l2] = function(t3) { 11201 if (a2 && !this[o2] && (this[o2] = a2(this._rgba)), void 0 === t3) 11202 return this[o2].slice(); 11203 var i2 = B(t3), s2 = "array" === i2 || "object" === i2 ? t3 : arguments, n2 = this[o2].slice(); 11204 return Y(e2, function(t4, e3) { 11205 t4 = s2["object" === i2 ? t4 : e3.idx]; 11206 null == t4 && (t4 = n2[e3.idx]), n2[e3.idx] = j(t4, e3); 11207 }), r2 ? ((t3 = E(r2(n2)))[o2] = n2, t3) : E(n2); 11208 }, Y(e2, function(a3, r3) { 11209 E.fn[a3] || (E.fn[a3] = function(t3) { 11210 var e3, i2 = B(t3), s2 = "alpha" === a3 ? this._hsla ? "hsla" : "rgba" : l2, n2 = this[s2](), o3 = n2[r3.idx]; 11211 return "undefined" === i2 ? o3 : ("function" === i2 && (i2 = B(t3 = t3.call(this, o3))), null == t3 && r3.empty ? this : ("string" === i2 && (e3 = O.exec(t3)) && (t3 = o3 + parseFloat(e3[2]) * ("+" === e3[1] ? 1 : -1)), n2[r3.idx] = t3, this[s2](n2))); 11212 }); 11213 }); 11214 }), (E.hook = function(t2) { 11215 t2 = t2.split(" "); 11216 Y(t2, function(t3, o2) { 11217 H.cssHooks[o2] = { set: function(t4, e2) { 11218 var i2, s2, n2 = ""; 11219 if ("transparent" !== e2 && ("string" !== B(e2) || (i2 = q(e2)))) { 11220 if (e2 = E(i2 || e2), !L.rgba && 1 !== e2._rgba[3]) { 11221 for (s2 = "backgroundColor" === o2 ? t4.parentNode : t4; ("" === n2 || "transparent" === n2) && s2 && s2.style; ) 11222 try { 11223 n2 = H.css(s2, "backgroundColor"), s2 = s2.parentNode; 11224 } catch (t5) { 11225 } 11226 e2 = e2.blend(n2 && "transparent" !== n2 ? n2 : "_default"); 11227 } 11228 e2 = e2.toRgbaString(); 11229 } 11230 try { 11231 t4.style[o2] = e2; 11232 } catch (t5) { 11233 } 11234 } }, H.fx.step[o2] = function(t4) { 11235 t4.colorInit || (t4.start = E(t4.elem, o2), t4.end = E(t4.end), t4.colorInit = true), H.cssHooks[o2].set(t4.elem, t4.start.transition(t4.end, t4.pos)); 11236 }; 11237 }); 11238 })("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"), H.cssHooks.borderColor = { expand: function(i2) { 11239 var s2 = {}; 11240 return Y(["Top", "Right", "Bottom", "Left"], function(t2, e2) { 11241 s2["border" + e2 + "Color"] = i2; 11242 }), s2; 11243 } }; 11244 var U, X, $8, G, Q, J, Z, tt, et, it, st = H.Color.names = { aqua: "#00ffff", black: "#000000", blue: "#0000ff", fuchsia: "#ff00ff", gray: "#808080", green: "#008000", lime: "#00ff00", maroon: "#800000", navy: "#000080", olive: "#808000", purple: "#800080", red: "#ff0000", silver: "#c0c0c0", teal: "#008080", white: "#ffffff", yellow: "#ffff00", transparent: [null, null, null, 0], _default: "#ffffff" }, nt = "ui-effects-", ot = "ui-effects-style", at = "ui-effects-animated"; 11245 function rt(t2) { 11246 var e2, i2, s2 = t2.ownerDocument.defaultView ? t2.ownerDocument.defaultView.getComputedStyle(t2, null) : t2.currentStyle, n2 = {}; 11247 if (s2 && s2.length && s2[0] && s2[s2[0]]) 11248 for (i2 = s2.length; i2--; ) 11249 "string" == typeof s2[e2 = s2[i2]] && (n2[e2.replace(/-([\da-z])/gi, function(t3, e3) { 11250 return e3.toUpperCase(); 11251 })] = s2[e2]); 11252 else 11253 for (e2 in s2) 11254 "string" == typeof s2[e2] && (n2[e2] = s2[e2]); 11255 return n2; 11256 } 11257 function lt(t2, e2, i2, s2) { 11258 return t2 = { effect: t2 = V.isPlainObject(t2) ? (e2 = t2).effect : t2 }, "function" == typeof (e2 = null == e2 ? {} : e2) && (s2 = e2, i2 = null, e2 = {}), "number" != typeof e2 && !V.fx.speeds[e2] || (s2 = i2, i2 = e2, e2 = {}), "function" == typeof i2 && (s2 = i2, i2 = null), e2 && V.extend(t2, e2), i2 = i2 || e2.duration, t2.duration = V.fx.off ? 0 : "number" == typeof i2 ? i2 : i2 in V.fx.speeds ? V.fx.speeds[i2] : V.fx.speeds._default, t2.complete = s2 || e2.complete, t2; 11259 } 11260 function ht(t2) { 11261 return !t2 || "number" == typeof t2 || V.fx.speeds[t2] || ("string" == typeof t2 && !V.effects.effect[t2] || ("function" == typeof t2 || "object" == typeof t2 && !t2.effect)); 11262 } 11263 function ct(t2, e2) { 11264 var i2 = e2.outerWidth(), e2 = e2.outerHeight(), t2 = /^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(t2) || ["", 0, i2, e2, 0]; 11265 return { top: parseFloat(t2[1]) || 0, right: "auto" === t2[2] ? i2 : parseFloat(t2[2]), bottom: "auto" === t2[3] ? e2 : parseFloat(t2[3]), left: parseFloat(t2[4]) || 0 }; 11266 } 11267 V.effects = { effect: {} }, G = ["add", "remove", "toggle"], Q = { border: 1, borderBottom: 1, borderColor: 1, borderLeft: 1, borderRight: 1, borderTop: 1, borderWidth: 1, margin: 1, padding: 1 }, V.each(["borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle"], function(t2, e2) { 11268 V.fx.step[e2] = function(t3) { 11269 ("none" !== t3.end && !t3.setAttr || 1 === t3.pos && !t3.setAttr) && (H.style(t3.elem, e2, t3.end), t3.setAttr = true); 11270 }; 11271 }), V.fn.addBack || (V.fn.addBack = function(t2) { 11272 return this.add(null == t2 ? this.prevObject : this.prevObject.filter(t2)); 11273 }), V.effects.animateClass = function(n2, t2, e2, i2) { 11274 var o2 = V.speed(t2, e2, i2); 11275 return this.queue(function() { 11276 var i3 = V(this), t3 = i3.attr("class") || "", e3 = (e3 = o2.children ? i3.find("*").addBack() : i3).map(function() { 11277 return { el: V(this), start: rt(this) }; 11278 }), s2 = function() { 11279 V.each(G, function(t4, e4) { 11280 n2[e4] && i3[e4 + "Class"](n2[e4]); 11281 }); 11282 }; 11283 s2(), e3 = e3.map(function() { 11284 return this.end = rt(this.el[0]), this.diff = function(t4, e4) { 11285 var i4, s3, n3 = {}; 11286 for (i4 in e4) 11287 s3 = e4[i4], t4[i4] !== s3 && (Q[i4] || !V.fx.step[i4] && isNaN(parseFloat(s3)) || (n3[i4] = s3)); 11288 return n3; 11289 }(this.start, this.end), this; 11290 }), i3.attr("class", t3), e3 = e3.map(function() { 11291 var t4 = this, e4 = V.Deferred(), i4 = V.extend({}, o2, { queue: false, complete: function() { 11292 e4.resolve(t4); 11293 } }); 11294 return this.el.animate(this.diff, i4), e4.promise(); 11295 }), V.when.apply(V, e3.get()).done(function() { 11296 s2(), V.each(arguments, function() { 11297 var e4 = this.el; 11298 V.each(this.diff, function(t4) { 11299 e4.css(t4, ""); 11300 }); 11301 }), o2.complete.call(i3[0]); 11302 }); 11303 }); 11304 }, V.fn.extend({ addClass: ($8 = V.fn.addClass, function(t2, e2, i2, s2) { 11305 return e2 ? V.effects.animateClass.call(this, { add: t2 }, e2, i2, s2) : $8.apply(this, arguments); 11306 }), removeClass: (X = V.fn.removeClass, function(t2, e2, i2, s2) { 11307 return 1 < arguments.length ? V.effects.animateClass.call(this, { remove: t2 }, e2, i2, s2) : X.apply(this, arguments); 11308 }), toggleClass: (U = V.fn.toggleClass, function(t2, e2, i2, s2, n2) { 11309 return "boolean" == typeof e2 || void 0 === e2 ? i2 ? V.effects.animateClass.call(this, e2 ? { add: t2 } : { remove: t2 }, i2, s2, n2) : U.apply(this, arguments) : V.effects.animateClass.call(this, { toggle: t2 }, e2, i2, s2); 11310 }), switchClass: function(t2, e2, i2, s2, n2) { 11311 return V.effects.animateClass.call(this, { add: e2, remove: t2 }, i2, s2, n2); 11312 } }), V.expr && V.expr.pseudos && V.expr.pseudos.animated && (V.expr.pseudos.animated = (J = V.expr.pseudos.animated, function(t2) { 11313 return !!V(t2).data(at) || J(t2); 11314 })), false !== V.uiBackCompat && V.extend(V.effects, { save: function(t2, e2) { 11315 for (var i2 = 0, s2 = e2.length; i2 < s2; i2++) 11316 null !== e2[i2] && t2.data(nt + e2[i2], t2[0].style[e2[i2]]); 11317 }, restore: function(t2, e2) { 11318 for (var i2, s2 = 0, n2 = e2.length; s2 < n2; s2++) 11319 null !== e2[s2] && (i2 = t2.data(nt + e2[s2]), t2.css(e2[s2], i2)); 11320 }, setMode: function(t2, e2) { 11321 return e2 = "toggle" === e2 ? t2.is(":hidden") ? "show" : "hide" : e2; 11322 }, createWrapper: function(i2) { 11323 if (i2.parent().is(".ui-effects-wrapper")) 11324 return i2.parent(); 11325 var s2 = { width: i2.outerWidth(true), height: i2.outerHeight(true), float: i2.css("float") }, t2 = V("<div></div>").addClass("ui-effects-wrapper").css({ fontSize: "100%", background: "transparent", border: "none", margin: 0, padding: 0 }), e2 = { width: i2.width(), height: i2.height() }, n2 = document.activeElement;
11326 try { 11327 n2.id; 11328 } catch (t3) { 11329 n2 = document.body; 11330 } 11331 return i2.wrap(t2), i2[0] !== n2 && !V.contains(i2[0], n2) || V(n2).trigger("focus"), t2 = i2.parent(), "static" === i2.css("position") ? (t2.css({ position: "relative" }), i2.css({ position: "relative" })) : (V.extend(s2, { position: i2.css("position"), zIndex: i2.css("z-index") }), V.each(["top", "left", "bottom", "right"], function(t3, e3) { 11332 s2[e3] = i2.css(e3), isNaN(parseInt(s2[e3], 10)) && (s2[e3] = "auto"); 11333 }), i2.css({ position: "relative", top: 0, left: 0, right: "auto", bottom: "auto" })), i2.css(e2), t2.css(s2).show(); 11334 }, removeWrapper: function(t2) { 11335 var e2 = document.activeElement; 11336 return t2.parent().is(".ui-effects-wrapper") && (t2.parent().replaceWith(t2), t2[0] !== e2 && !V.contains(t2[0], e2) || V(e2).trigger("focus")), t2; 11337 } }), V.extend(V.effects, { version: "1.13.2", define: function(t2, e2, i2) { 11338 return i2 || (i2 = e2, e2 = "effect"), V.effects.effect[t2] = i2, V.effects.effect[t2].mode = e2, i2; 11339 }, scaledDimensions: function(t2, e2, i2) { 11340 if (0 === e2) 11341 return { height: 0, width: 0, outerHeight: 0, outerWidth: 0 }; 11342 var s2 = "horizontal" !== i2 ? (e2 || 100) / 100 : 1, e2 = "vertical" !== i2 ? (e2 || 100) / 100 : 1; 11343 return { height: t2.height() * e2, width: t2.width() * s2, outerHeight: t2.outerHeight() * e2, outerWidth: t2.outerWidth() * s2 }; 11344 }, clipToBox: function(t2) { 11345 return { width: t2.clip.right - t2.clip.left, height: t2.clip.bottom - t2.clip.top, left: t2.clip.left, top: t2.clip.top }; 11346 }, unshift: function(t2, e2, i2) { 11347 var s2 = t2.queue(); 11348 1 < e2 && s2.splice.apply(s2, [1, 0].concat(s2.splice(e2, i2))), t2.dequeue(); 11349 }, saveStyle: function(t2) { 11350 t2.data(ot, t2[0].style.cssText); 11351 }, restoreStyle: function(t2) { 11352 t2[0].style.cssText = t2.data(ot) || "", t2.removeData(ot); 11353 }, mode: function(t2, e2) { 11354 t2 = t2.is(":hidden"); 11355 return "toggle" === e2 && (e2 = t2 ? "show" : "hide"), e2 = (t2 ? "hide" === e2 : "show" === e2) ? "none" : e2; 11356 }, getBaseline: function(t2, e2) { 11357 var i2, s2; 11358 switch (t2[0]) { 11359 case "top": 11360 i2 = 0; 11361 break; 11362 case "middle": 11363 i2 = 0.5; 11364 break; 11365 case "bottom": 11366 i2 = 1; 11367 break; 11368 default: 11369 i2 = t2[0] / e2.height; 11370 } 11371 switch (t2[1]) { 11372 case "left": 11373 s2 = 0; 11374 break; 11375 case "center": 11376 s2 = 0.5; 11377 break; 11378 case "right": 11379 s2 = 1; 11380 break; 11381 default: 11382 s2 = t2[1] / e2.width; 11383 } 11384 return { x: s2, y: i2 }; 11385 }, createPlaceholder: function(t2) { 11386 var e2, i2 = t2.css("position"), s2 = t2.position(); 11387 return t2.css({ marginTop: t2.css("marginTop"), marginBottom: t2.css("marginBottom"), marginLeft: t2.css("marginLeft"), marginRight: t2.css("marginRight") }).outerWidth(t2.outerWidth()).outerHeight(t2.outerHeight()), /^(static|relative)/.test(i2) && (i2 = "absolute", e2 = V("<" + t2[0].nodeName + ">").insertAfter(t2).css({ display: /^(inline|ruby)/.test(t2.css("display")) ? "inline-block" : "block", visibility: "hidden", marginTop: t2.css("marginTop"), marginBottom: t2.css("marginBottom"), marginLeft: t2.css("marginLeft"), marginRight: t2.css("marginRight"), float: t2.css("float") }).outerWidth(t2.outerWidth()).outerHeight(t2.outerHeight()).addClass("ui-effects-placeholder"), t2.data(nt + "placeholder", e2)), t2.css({ position: i2, left: s2.left, top: s2.top }), e2; 11388 }, removePlaceholder: function(t2) { 11389 var e2 = nt + "placeholder", i2 = t2.data(e2); 11390 i2 && (i2.remove(), t2.removeData(e2)); 11391 }, cleanUp: function(t2) { 11392 V.effects.restoreStyle(t2), V.effects.removePlaceholder(t2); 11393 }, setTransition: function(s2, t2, n2, o2) { 11394 return o2 = o2 || {}, V.each(t2, function(t3, e2) { 11395 var i2 = s2.cssUnit(e2); 11396 0 < i2[0] && (o2[e2] = i2[0] * n2 + i2[1]); 11397 }), o2; 11398 } }), V.fn.extend({ effect: function() { 11399 function t2(t3) { 11400 var e3 = V(this), i3 = V.effects.mode(e3, r2) || o2; 11401 e3.data(at, true), l2.push(i3), o2 && ("show" === i3 || i3 === o2 && "hide" === i3) && e3.show(), o2 && "none" === i3 || V.effects.saveStyle(e3), "function" == typeof t3 && t3(); 11402 } 11403 var s2 = lt.apply(this, arguments), n2 = V.effects.effect[s2.effect], o2 = n2.mode, e2 = s2.queue, i2 = e2 || "fx", a2 = s2.complete, r2 = s2.mode, l2 = []; 11404 return V.fx.off || !n2 ? r2 ? this[r2](s2.duration, a2) : this.each(function() { 11405 a2 && a2.call(this); 11406 }) : false === e2 ? this.each(t2).each(h2) : this.queue(i2, t2).queue(i2, h2); 11407 function h2(t3) { 11408 var e3 = V(this); 11409 function i3() { 11410 "function" == typeof a2 && a2.call(e3[0]), "function" == typeof t3 && t3(); 11411 } 11412 s2.mode = l2.shift(), false === V.uiBackCompat || o2 ? "none" === s2.mode ? (e3[r2](), i3()) : n2.call(e3[0], s2, function() { 11413 e3.removeData(at), V.effects.cleanUp(e3), "hide" === s2.mode && e3.hide(), i3(); 11414 }) : (e3.is(":hidden") ? "hide" === r2 : "show" === r2) ? (e3[r2](), i3()) : n2.call(e3[0], s2, i3); 11415 } 11416 }, show: (et = V.fn.show, function(t2) { 11417 if (ht(t2)) 11418 return et.apply(this, arguments); 11419 t2 = lt.apply(this, arguments); 11420 return t2.mode = "show", this.effect.call(this, t2); 11421 }), hide: (tt = V.fn.hide, function(t2) { 11422 if (ht(t2)) 11423 return tt.apply(this, arguments); 11424 t2 = lt.apply(this, arguments); 11425 return t2.mode = "hide", this.effect.call(this, t2); 11426 }), toggle: (Z = V.fn.toggle, function(t2) { 11427 if (ht(t2) || "boolean" == typeof t2) 11428 return Z.apply(this, arguments); 11429 t2 = lt.apply(this, arguments); 11430 return t2.mode = "toggle", this.effect.call(this, t2); 11431 }), cssUnit: function(t2) { 11432 var i2 = this.css(t2), s2 = []; 11433 return V.each(["em", "px", "%", "pt"], function(t3, e2) { 11434 0 < i2.indexOf(e2) && (s2 = [parseFloat(i2), e2]); 11435 }), s2; 11436 }, cssClip: function(t2) { 11437 return t2 ? this.css("clip", "rect(" + t2.top + "px " + t2.right + "px " + t2.bottom + "px " + t2.left + "px)") : ct(this.css("clip"), this); 11438 }, transfer: function(t2, e2) { 11439 var i2 = V(this), s2 = V(t2.to), n2 = "fixed" === s2.css("position"), o2 = V("body"), a2 = n2 ? o2.scrollTop() : 0, r2 = n2 ? o2.scrollLeft() : 0, o2 = s2.offset(), o2 = { top: o2.to
vendor: 12,218 bytes, lines 11439-11529
11439p - a2, left: o2.left - r2, height: s2.innerHeight(), width: s2.innerWidth() }, s2 = i2.offset(), l2 = V("<div class='ui-effects-transfer'></div>"); 11440 l2.appendTo("body").addClass(t2.className).css({ top: s2.top - a2, left: s2.left - r2, height: i2.innerHeight(), width: i2.innerWidth(), position: n2 ? "fixed" : "absolute" }).animate(o2, t2.duration, t2.easing, function() { 11441 l2.remove(), "function" == typeof e2 && e2(); 11442 }); 11443 } }), V.fx.step.clip = function(t2) { 11444 t2.clipInit || (t2.start = V(t2.elem).cssClip(), "string" == typeof t2.end && (t2.end = ct(t2.end, t2.elem)), t2.clipInit = true), V(t2.elem).cssClip({ top: t2.pos * (t2.end.top - t2.start.top) + t2.start.top, right: t2.pos * (t2.end.right - t2.start.right) + t2.start.right, bottom: t2.pos * (t2.end.bottom - t2.start.bottom) + t2.start.bottom, left: t2.pos * (t2.end.left - t2.start.left) + t2.start.left }); 11445 }, it = {}, V.each(["Quad", "Cubic", "Quart", "Quint", "Expo"], function(e2, t2) { 11446 it[t2] = function(t3) { 11447 return Math.pow(t3, e2 + 2); 11448 }; 11449 }), V.extend(it, { Sine: function(t2) { 11450 return 1 - Math.cos(t2 * Math.PI / 2); 11451 }, Circ: function(t2) { 11452 return 1 - Math.sqrt(1 - t2 * t2); 11453 }, Elastic: function(t2) { 11454 return 0 === t2 || 1 === t2 ? t2 : -Math.pow(2, 8 * (t2 - 1)) * Math.sin((80 * (t2 - 1) - 7.5) * Math.PI / 15); 11455 }, Back: function(t2) { 11456 return t2 * t2 * (3 * t2 - 2); 11457 }, Bounce: function(t2) { 11458 for (var e2, i2 = 4; t2 < ((e2 = Math.pow(2, --i2)) - 1) / 11; ) 11459 ; 11460 return 1 / Math.pow(4, 3 - i2) - 7.5625 * Math.pow((3 * e2 - 2) / 22 - t2, 2); 11461 } }), V.each(it, function(t2, e2) { 11462 V.easing["easeIn" + t2] = e2, V.easing["easeOut" + t2] = function(t3) { 11463 return 1 - e2(1 - t3); 11464 }, V.easing["easeInOut" + t2] = function(t3) { 11465 return t3 < 0.5 ? e2(2 * t3) / 2 : 1 - e2(-2 * t3 + 2) / 2; 11466 }; 11467 }); 11468 R = V.effects, V.effects.define("blind", "hide", function(t2, e2) { 11469 var i2 = { up: ["bottom", "top"], vertical: ["bottom", "top"], down: ["top", "bottom"], left: ["right", "left"], horizontal: ["right", "left"], right: ["left", "right"] }, s2 = V(this), n2 = t2.direction || "up", o2 = s2.cssClip(), a2 = { clip: V.extend({}, o2) }, r2 = V.effects.createPlaceholder(s2); 11470 a2.clip[i2[n2][0]] = a2.clip[i2[n2][1]], "show" === t2.mode && (s2.cssClip(a2.clip), r2 && r2.css(V.effects.clipToBox(a2)), a2.clip = o2), r2 && r2.animate(V.effects.clipToBox(a2), t2.duration, t2.easing), s2.animate(a2, { queue: false, duration: t2.duration, easing: t2.easing, complete: e2 }); 11471 }), V.effects.define("bounce", function(t2, e2) { 11472 var i2, s2, n2 = V(this), o2 = t2.mode, a2 = "hide" === o2, r2 = "show" === o2, l2 = t2.direction || "up", h2 = t2.distance, c2 = t2.times || 5, o2 = 2 * c2 + (r2 || a2 ? 1 : 0), u2 = t2.duration / o2, d2 = t2.easing, p2 = "up" === l2 || "down" === l2 ? "top" : "left", f2 = "up" === l2 || "left" === l2, g2 = 0, t2 = n2.queue().length; 11473 for (V.effects.createPlaceholder(n2), l2 = n2.css(p2), h2 = h2 || n2["top" == p2 ? "outerHeight" : "outerWidth"]() / 3, r2 && ((s2 = { opacity: 1 })[p2] = l2, n2.css("opacity", 0).css(p2, f2 ? 2 * -h2 : 2 * h2).animate(s2, u2, d2)), a2 && (h2 /= Math.pow(2, c2 - 1)), (s2 = {})[p2] = l2; g2 < c2; g2++) 11474 (i2 = {})[p2] = (f2 ? "-=" : "+=") + h2, n2.animate(i2, u2, d2).animate(s2, u2, d2), h2 = a2 ? 2 * h2 : h2 / 2; 11475 a2 && ((i2 = { opacity: 0 })[p2] = (f2 ? "-=" : "+=") + h2, n2.animate(i2, u2, d2)), n2.queue(e2), V.effects.unshift(n2, t2, 1 + o2); 11476 }), V.effects.define("clip", "hide", function(t2, e2) { 11477 var i2 = {}, s2 = V(this), n2 = t2.direction || "vertical", o2 = "both" === n2, a2 = o2 || "horizontal" === n2, o2 = o2 || "vertical" === n2, n2 = s2.cssClip(); 11478 i2.clip = { top: o2 ? (n2.bottom - n2.top) / 2 : n2.top, right: a2 ? (n2.right - n2.left) / 2 : n2.right, bottom: o2 ? (n2.bottom - n2.top) / 2 : n2.bottom, left: a2 ? (n2.right - n2.left) / 2 : n2.left }, V.effects.createPlaceholder(s2), "show" === t2.mode && (s2.cssClip(i2.clip), i2.clip = n2), s2.animate(i2, { queue: false, duration: t2.duration, easing: t2.easing, complete: e2 }); 11479 }), V.effects.define("drop", "hide", function(t2, e2) { 11480 var i2 = V(this), s2 = "show" === t2.mode, n2 = t2.direction || "left", o2 = "up" === n2 || "down" === n2 ? "top" : "left", a2 = "up" === n2 || "left" === n2 ? "-=" : "+=", r2 = "+=" == a2 ? "-=" : "+=", l2 = { opacity: 0 }; 11481 V.effects.createPlaceholder(i2), n2 = t2.distance || i2["top" == o2 ? "outerHeight" : "outerWidth"](true) / 2, l2[o2] = a2 + n2, s2 && (i2.css(l2), l2[o2] = r2 + n2, l2.opacity = 1), i2.animate(l2, { queue: false, duration: t2.duration, easing: t2.easing, complete: e2 }); 11482 }), V.effects.define("explode", "hide", function(t2, e2) { 11483 var i2, s2, n2, o2, a2, r2, l2 = t2.pieces ? Math.round(Math.sqrt(t2.pieces)) : 3, h2 = l2, c2 = V(this), u2 = "show" === t2.mode, d2 = c2.show().css("visibility", "hidden").offset(), p2 = Math.ceil(c2.outerWidth() / h2), f2 = Math.ceil(c2.outerHeight() / l2), g2 = []; 11484 function m2() { 11485 g2.push(this), g2.length === l2 * h2 && (c2.css({ visibility: "visible" }), V(g2).remove(), e2()); 11486 } 11487 for (i2 = 0; i2 < l2; i2++) 11488 for (o2 = d2.top + i2 * f2, r2 = i2 - (l2 - 1) / 2, s2 = 0; s2 < h2; s2++) 11489 n2 = d2.left + s2 * p2, a2 = s2 - (h2 - 1) / 2, c2.clone().appendTo("body").wrap("<div></div>").css({ position: "absolute", visibility: "visible", left: -s2 * p2, top: -i2 * f2 }).parent().addClass("ui-effects-explode").css({ position: "absolute", overflow: "hidden", width: p2, height: f2, left: n2 + (u2 ? a2 * p2 : 0), top: o2 + (u2 ? r2 * f2 : 0), opacity: u2 ? 0 : 1 }).animate({ left: n2 + (u2 ? 0 : a2 * p2), top: o2 + (u2 ? 0 : r2 * f2), opacity: u2 ? 1 : 0 }, t2.duration || 500, t2.easing, m2); 11490 }), V.effects.define("fade", "toggle", function(t2, e2) { 11491 var i2 = "show" === t2.mode; 11492 V(this).css("opacity", i2 ? 0 : 1).animate({ opacity: i2 ? 1 : 0 }, { queue: false, duration: t2.duration, easing: t2.easing, complete: e2 }); 11493 }), V.effects.define("fold", "hide", function(e2, t2) { 11494 var i2 = V(this), s2 = e2.mode, n2 = "show" === s2, o2 = "hide" === s2, a2 = e2.size || 15, r2 = /([0-9]+)%/.exec(a2), l2 = !!e2.horizFirst ? ["right", "bottom"] : ["bottom", "right"], h2 = e2.duration / 2, c2 = V.effects.createPlaceholder(i2), u2 = i2.cssClip(), d2 = { clip: V.extend({}, u2) }, p2 = { clip: V.extend({}, u2) }, f2 = [u2[l2[0]], u2[l2[1]]], s2 = i2.queue().length; 11495 r2 && (a2 = parseInt(r2[1], 10) / 100 * f2[o2 ? 0 : 1]), d2.clip[l2[0]] = a2, p2.clip[l2[0]] = a2, p2.clip[l2[1]] = 0, n2 && (i2.cssClip(p2.clip), c2 && c2.css(V.effects.clipToBox(p2)), p2.clip = u2), i2.queue(function(t3) { 11496 c2 && c2.animate(V.effects.clipToBox(d2), h2, e2.easing).animate(V.effects.clipToBox(p2), h2, e2.easing), t3(); 11497 }).animate(d2, h2, e2.easing).animate(p2, h2, e2.easing).queue(t2), V.effects.unshift(i2, s2, 4); 11498 }), V.effects.define("highlight", "show", function(t2, e2) { 11499 var i2 = V(this), s2 = { backgroundColor: i2.css("backgroundColor") }; 11500 "hide" === t2.mode && (s2.opacity = 0), V.effects.saveStyle(i2), i2.css({ backgroundImage: "none", backgroundColor: t2.color || "#ffff99" }).animate(s2, { queue: false, duration: t2.duration, easing: t2.easing, complete: e2 }); 11501 }), V.effects.define("size", function(s2, e2) { 11502 var n2, i2 = V(this), t2 = ["fontSize"], o2 = ["borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom"], a2 = ["borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight"], r2 = s2.mode, l2 = "effect" !== r2, h2 = s2.scale || "both", c2 = s2.origin || ["middle", "center"], u2 = i2.css("position"), d2 = i2.position(), p2 = V.effects.scaledDimensions(i2), f2 = s2.from || p2, g2 = s2.to || V.effects.scaledDimensions(i2, 0); 11503 V.effects.createPlaceholder(i2), "show" === r2 && (r2 = f2, f2 = g2, g2 = r2), n2 = { from: { y: f2.height / p2.height, x: f2.width / p2.width }, to: { y: g2.height / p2.height, x: g2.width / p2.width } }, "box" !== h2 && "both" !== h2 || (n2.from.y !== n2.to.y && (f2 = V.effects.setTransition(i2, o2, n2.from.y, f2), g2 = V.effects.setTransition(i2, o2, n2.to.y, g2)), n2.from.x !== n2.to.x && (f2 = V.effects.setTransition(i2, a2, n2.from.x, f2), g2 = V.effects.setTransition(i2, a2, n2.to.x, g2))), "content" !== h2 && "both" !== h2 || n2.from.y !== n2.to.y && (f2 = V.effects.setTransition(i2, t2, n2.from.y, f2), g2 = V.effects.setTransition(i2, t2, n2.to.y, g2)), c2 && (c2 = V.effects.getBaseline(c2, p2), f2.top = (p2.outerHeight - f2.outerHeight) * c2.y + d2.top, f2.left = (p2.outerWidth - f2.outerWidth) * c2.x + d2.left, g2.top = (p2.outerHeight - g2.outerHeight) * c2.y + d2.top, g2.left = (p2.outerWidth - g2.outerWidth) * c2.x + d2.left), delete f2.outerHeight, delete f2.outerWidth, i2.css(f2), "content" !== h2 && "both" !== h2 || (o2 = o2.concat(["marginTop", "marginBottom"]).concat(t2), a2 = a2.concat(["marginLeft", "marginRight"]), i2.find("*[width]").each(function() { 11504 var t3 = V(this), e3 = V.effects.scaledDimensions(t3), i3 = { height: e3.height * n2.from.y, width: e3.width * n2.from.x, outerHeight: e3.outerHeight * n2.from.y, outerWidth: e3.outerWidth * n2.from.x }, e3 = { height: e3.height * n2.to.y, width: e3.width * n2.to.x, outerHeight: e3.height * n2.to.y, outerWidth: e3.width * n2.to.x }; 11505 n2.from.y !== n2.to.y && (i3 = V.effects.setTransition(t3, o2, n2.from.y, i3), e3 = V.effects.setTransition(t3, o2, n2.to.y, e3)), n2.from.x !== n2.to.x && (i3 = V.effects.setTransition(t3, a2, n2.from.x, i3), e3 = V.effects.setTransition(t3, a2, n2.to.x, e3)), l2 && V.effects.saveStyle(t3), t3.css(i3), t3.animate(e3, s2.duration, s2.easing, function() { 11506 l2 && V.effects.restoreStyle(t3); 11507 }); 11508 })), i2.animate(g2, { queue: false, duration: s2.duration, easing: s2.easing, complete: function() { 11509 var t3 = i2.offset(); 11510 0 === g2.opacity && i2.css("opacity", f2.opacity), l2 || (i2.css("position", "static" === u2 ? "relative" : u2).offset(t3), V.effects.saveStyle(i2)), e2(); 11511 } }); 11512 }), V.effects.define("scale", function(t2, e2) { 11513 var i2 = V(this), s2 = t2.mode, s2 = parseInt(t2.percent, 10) || (0 === parseInt(t2.percent, 10) || "effect" !== s2 ? 0 : 100), s2 = V.extend(true, { from: V.effects.scaledDimensions(i2), to: V.effects.scaledDimensions(i2, s2, t2.direction || "both"), origin: t2.origin || ["middle", "center"] }, t2); 11514 t2.fade && (s2.from.opacity = 1, s2.to.opacity = 0), V.effects.effect.size.call(this, s2, e2); 11515 }), V.effects.define("puff", "hide", function(t2, e2) { 11516 t2 = V.extend(true, {}, t2, { fade: true, percent: parseInt(t2.percent, 10) || 150 }); 11517 V.effects.effect.scale.call(this, t2, e2); 11518 }), V.effects.define("pulsate", "show", function(t2, e2) { 11519 var i2 = V(this), s2 = t2.mode, n2 = "show" === s2, o2 = 2 * (t2.times || 5) + (n2 || "hide" === s2 ? 1 : 0), a2 = t2.duration / o2, r2 = 0, l2 = 1, s2 = i2.queue().length; 11520 for (!n2 && i2.is(":visible") || (i2.css("opacity", 0).show(), r2 = 1); l2 < o2; l2++) 11521 i2.animate({ opacity: r2 }, a2, t2.easing), r2 = 1 - r2; 11522 i2.animate({ opacity: r2 }, a2, t2.easing), i2.queue(e2), V.effects.unshift(i2, s2, 1 + o2); 11523 }), V.effects.define("shake", function(t2, e2) { 11524 var i2 = 1, s2 = V(this), n2 = t2.direction || "left", o2 = t2.distance || 20, a2 = t2.times || 3, r2 = 2 * a2 + 1, l2 = Math.round(t2.duration / r2), h2 = "up" === n2 || "down" === n2 ? "top" : "left", c2 = "up" === n2 || "left" === n2, u2 = {}, d2 = {}, p2 = {}, n2 = s2.queue().length; 11525 for (V.effects.createPlaceholder(s2), u2[h2] = (c2 ? "-=" : "+=") + o2, d2[h2] = (c2 ? "+=" : "-=") + 2 * o2, p2[h2] = (c2 ? "-=" : "+=") + 2 * o2, s2.animate(u2, l2, t2.easing); i2 < a2; i2++) 11526 s2.animate(d2, l2, t2.easing).animate(p2, l2, t2.easing); 11527 s2.animate(d2, l2, t2.easing).animate(u2, l2 / 2, t2.easing).queue(e2), V.effects.unshift(s2, n2, 1 + r2); 11528 }), V.effects.define("slide", "show", function(t2, e2) { 11529 var i2, s2, n2 = V(this), o2 = { up: ["bottom", "top"], down: ["top", "bottom"], left
11529: ["right", "left"], right: ["left", "right"] }, a2 = t2.mode, r2 = t2.direction || "left", l2 = "up" === r2 || "down" === r2 ? "top" : "left", h2 = "up" === r2 || "left" === r2, c2 = t2.distance || n2["top" == l2 ? "outerHeight" : "outerWidth"](true), u2 = {}; 11530 V.effects.createPlaceholder(n2), i2 = n2.cssClip(), s2 = n2.position()[l2], u2[l2] = (h2 ? -1 : 1) * c2 + s2, u2.clip = n2.cssClip(), u2.clip[o2[r2][1]] = u2.clip[o2[r2][0]], "show" === a2 && (n2.cssClip(u2.clip), n2.css(l2, u2[l2]), u2.clip = i2, u2[l2] = s2), n2.animate(u2, { queue: false, duration: t2.duration, easing: t2.easing, complete: e2 }); 11531 }), false !== V.uiBackCompat && V.effects.define("transfer", function(t2, e2) { 11532 V(this).transfer(t2, e2); 11533 }); 11534 }); 11535 11536
11536// src/js/bundle.js 11537 var import_jquery7 = __toESM(require_jquery()); 11538 11539
11539// src/js/components/slick-init.js 11540 var import_jquery = __toESM(require_jquery()); 11541 var import_slick_carousel = __toESM(require_slick()); 11542 (0, import_jquery.default)(document).ready(() => { 11543 function initPrimarySliders() { 11544 const sliders = (0, import_jquery.default)(".primary-slider"); 11545 sliders.each(function() { 11546 const slider = (0, import_jquery.default)(this); 11547 slider.slick({ 11548 speed: 300, 11549 infinite: true, 11550 centerMode: true, 11551 centerPadding: "22%", 11552 slidesToShow: 1, 11553 responsive: [ 11554 { 11555 breakpoint: 1240, 11556 settings: { 11557 arrows: true, 11558 dots: false, 11559 centerMode: true, 11560 centerPadding: "2.75rem", 11561 slidesToShow: 1 11562 } 11563 } 11564 ] 11565 }); 11566 slider.on("afterChange", function(event2, slick, currentSlide) { 11567 handleSlideChange(event2, slick); 11568 }); 11569 slider.on("beforeChange", function(event2, slick, currentSlide, nextSlide) { 11570 handleBeforeChange(event2, slick); 11571 }); 11572 slider.on("init", function(event2, slick) { 11573 handleSlideChange(event2, slick); 11574 }); 11575 }); 11576 } 11577 function handleSlideChange(event2, slick) { 11578 if (!slick.$slides || !slick.$slides.length) 11579 return; 11580 const slides = (0, import_jquery.default)(slick.$slides); 11581 slides.each(function() { 11582 (0, import_jquery.default)(this).removeClass("prevSlide nextSlide"); 11583 }); 11584 const currentIndex = slides.index(slick.$slider.find(".slick-current")); 11585 if (currentIndex > 0) { 11586 (0, import_jquery.default)(slides[currentIndex - 1]).addClass("prevSlide"); 11587 } 11588 if (currentIndex < slides.length - 1) { 11589 (0, import_jquery.default)(slides[currentIndex + 1]).addClass("nextSlide"); 11590 } 11591 } 11592 function handleBeforeChange(event2, slick) { 11593 if (!slick.$slides || !slick.$slides.length) 11594 return; 11595 const slides = (0, import_jquery.default)(slick.$slides); 11596 slides.each(function() { 11597 (0, import_jquery.default)(this).removeClass("prevSlide nextSlide"); 11598 }); 11599 } 11600 initPrimarySliders(); 11601 (0, import_jquery.default)(".course-slider, .accommodation-slider, .activity-slider, .wedding-slider").slick({ 11602 speed: 300, 11603 centerMode: true, 11604 centerPadding: "22%", 11605 slidesToShow: 1, 11606 responsive: [ 11607 { 11608 breakpoint: 1240, 11609 settings: { 11610 arrows: true, 11611 dots: false, 11612 centerMode: true, 11613 centerPadding: "2.75rem", 11614 slidesToShow: 1 11615 } 11616 } 11617 ] 11618 }); 11619 (0, import_jquery.default)(".hole-slider, .secondary-slider, .tertiary-slider").slick({ 11620 speed: 300, 11621 centerMode: true, 11622 centerPadding: "15.375rem", 11623 slidesToShow: 1, 11624 responsive: [ 11625 { 11626 breakpoint: 1240, 11627 settings: { 11628 arrows: true, 11629 dots: false, 11630 centerMode: true, 11631 centerPadding: "2.75rem", 11632 slidesToShow: 1 11633 } 11634 } 11635 ] 11636 }); 11637 (0, import_jquery.default)(".news-slider, .golf-tips-slider").slick({ 11638 speed: 300, 11639 centerMode: true, 11640 centerPadding: "26.25rem", 11641 slidesToShow: 1, 11642 responsive: [ 11643 { 11644 breakpoint: 1600, 11645 settings: { 11646 arrows: true, 11647 dots: false, 11648 centerMode: true, 11649 centerPadding: "16rem", 11650 slidesToShow: 1 11651 } 11652 }, 11653 { 11654 breakpoint: 1240, 11655 settings: { 11656 arrows: true, 11657 dots: false, 11658 centerMode: true, 11659 centerPadding: "2.75rem", 11660 slidesToShow: 1 11661 } 11662 } 11663 ] 11664 }); 11665 (0, import_jquery.default)(".event-slider").slick({ 11666 speed: 300, 11667 centerMode: true, 11668 centerPadding: "26.25rem", 11669 slidesToShow: 1, 11670 responsive: [ 11671 { 11672 breakpoint: 1600, 11673 settings: { 11674 arrows: true, 11675 dots: false, 11676 centerMode: true, 11677 centerPadding: "26.25rem", 11678 slidesToShow: 1 11679 } 11680 }, 11681 { 11682 breakpoint: 1240, 11683 settings: { 11684 arrows: true, 11685 dots: false, 11686 centerMode: true, 11687 centerPadding: "16rem", 11688 slidesToShow: 1 11689 } 11690 }, 11691 { 11692 breakpoint: 992, 11693 settings: { 11694 arrows: true, 11695 dots: false, 11696 centerMode: true, 11697 centerPadding: "2.75rem", 11698 slidesToShow: 1 11699 } 11700 } 11701 ] 11702 }); 11703 (0, import_jquery.default)(".full-slider").slick({ 11704 speed: 300, 11705 arrows: true, 11706 dots: true, 11707 appendDots: "#holes-nav", 11708 centerMode: true, 11709 centerPadding: "0", 11710 slidesToShow: 1 11711 }); 11712 function holesDefault() { 11713 (0, import_jquery.default)(".full-slider ~ .slide-nav").find(".nav-front-9").each(function() { 11714 (0, import_jquery.default)(this).addClass("active"); 11715 }); 11716 } 11717 holesDefault(); 11718 function holesActivateFront9() { 11719 (0, import_jquery.default)(".full-slider ~ .slide-nav").find(".slick-dots").each(function() { 11720 (0, import_jquery.default)(this).addClass("front-9-active"); 11721 }); 11722 } 11723 holesActivateFront9(); 11724 (0, import_jquery.default)(".full-slider ~ .slide-nav").find(".slick-prev").each(function() { 11725 var button = (0, import_jquery.default)(this); 11726 button.on("click", function() { 11727 if (0 === (0, import_jquery.default)(".slick-dots > li").index((0, import_jquery.default)(".slick-dots > li.slick-active"))) { 11728 (0, import_jquery.default)("button.nav-back-9").trigger("click"); 11729 } else if (9 === (0, import_jquery.default)(".slick-dots > li").index((0, import_jquery.default)(".slick-dots > li.slick-active"))) { 11730 (0, import_jquery.default)("button.nav-front-9").trigger("click"); 11731 } 11732 (0, import_jquery.default)(".full-slider").slick("slickPrev"); 11733 }); 11734 }); 11735 (0, import_jquery.default)(".full-slider ~ .slide-nav").find(".slick-next").each(function() { 11736 var button = (0, import_jquery.default)(this); 11737 button.on("click", function() { 11738 if (8 === (0, import_jquery.default)(".slick-dots > li").index((0, import_jquery.default)(".slick-dots > li.slick-active"))) { 11739 (0, import_jquery.default)("button.nav-back-9").trigger("click"); 11740 }
11740 else if (17 === (0, import_jquery.default)(".slick-dots > li").index((0, import_jquery.default)(".slick-dots > li.slick-active"))) { 11741 (0, import_jquery.default)("button.nav-front-9").trigger("click"); 11742 } 11743 (0, import_jquery.default)(".full-slider").slick("slickNext"); 11744 }); 11745 }); 11746 (0, import_jquery.default)(".the-nines").find(".nav-button").each(function() { 11747 var button = (0, import_jquery.default)(this); 11748 button.on("click", function() { 11749 if (button.hasClass("nav-front-9")) { 11750 if (!button.hasClass("active")) { 11751 (0, import_jquery.default)(".the-nines").find(".nav-button").each(function() { 11752 (0, import_jquery.default)(this).removeClass("active"); 11753 }); 11754 button.addClass("active"); 11755 (0, import_jquery.default)(".full-slider ~ .slide-nav").find(".slick-dots").each(function() { 11756 (0, import_jquery.default)(this).removeClass("back-9-active"); 11757 (0, import_jquery.default)(this).addClass("front-9-active"); 11758 }); 11759 } 11760 } else if (button.hasClass("nav-back-9")) { 11761 if (!button.hasClass("active")) { 11762 (0, import_jquery.default)(".the-nines").find(".nav-button").each(function() { 11763 (0, import_jquery.default)(this).removeClass("active"); 11764 }); 11765 button.addClass("active"); 11766 (0, import_jquery.default)(".full-slider ~ .slide-nav").find(".slick-dots").each(function() { 11767 (0, import_jquery.default)(this).removeClass("front-9-active"); 11768 (0, import_jquery.default)(this).addClass("back-9-active"); 11769 }); 11770 } 11771 } 11772 }); 11773 }); 11774 let resizeTimeout; 11775 function handleGridSlider() { 11776 const gridSliders = document.querySelectorAll(".grid-slider"); 11777 const windowWidth = window.innerWidth; 11778 const slickGridSettings = { 11779 speed: 300, 11780 arrows: true, 11781 dots: false, 11782 centerMode: true, 11783 centerPadding: "2.813rem", 11784 slidesToShow: 1, 11785 responsive: [ 11786 { 11787 breakpoint: 1240, 11788 settings: { 11789 arrows: true, 11790 dots: false, 11791 centerMode: true, 11792 centerPadding: "2.813rem", 11793 slidesToShow: 1 11794 } 11795 } 11796 ] 11797 }; 11798 gridSliders.forEach((gridSlider) => { 11799 const isSlickInitialized = (0, import_jquery.default)(gridSlider).hasClass("slick-initialized"); 11800 if (windowWidth >= 1240) { 11801 if (isSlickInitialized) { 11802 (0, import_jquery.default)(gridSlider).slick("unslick"); 11803 } 11804 gridSlider.style.display = "grid"; 11805 } else { 11806 if (!isSlickInitialized) { 11807 (0, import_jquery.default)(gridSlider).slick(slickGridSettings); 11808 } 11809 gridSlider.style.display = "grid"; 11810 } 11811 }); 11812 } 11813 handleGridSlider(); 11814 window.addEventListener("resize", () => { 11815 clearTimeout(resizeTimeout); 11816 resizeTimeout = setTimeout(() => { 11817 handleGridSlider(); 11818 }, 250); 11819 }); 11820 (0, import_jquery.default)(".tab-mobile-collapse label").bind("click", function(e) { 11821 if ((0, import_jquery.default)(this).prev(".tab").is(":checked")) { 11822 e.preventDefault(); 11823 if ((0, import_jquery.default)(this).hasClass("expanded")) { 11824 (0, import_jquery.default)(this).siblings("label").hide(); 11825 (0, import_jquery.default)(this).removeClass("expanded"); 11826 } else { 11827 (0, import_jquery.default)(this).siblings("label").show(); 11828 (0, import_jquery.default)(this).addClass("expanded"); 11829 } 11830 } else { 11831 (0, import_jquery.default)(this).siblings("label").hide().removeClass("active").removeClass("expanded"); 11832 (0, import_jquery.default)(this).siblings(".tab").attr("aria-expanded", "false"); 11833 (0, import_jquery.default)(this).show().removeClass("expanded").addClass("active"); 11834 (0, import_jquery.default)(this).prev(".tab").attr("aria-expanded", "true"); 11835 } 11836 }); 11837 }); 11838 11839
11839// src/js/components/buttons.js 11840 var redzoneButtons = document.querySelectorAll( 11841 ".wp-block-button.is-style-angled a" 11842 ); 11843 redzoneButtons.forEach(function(btn) { 11844 let html = "<span>" + btn.innerHTML + "</span>"; 11845 btn.innerHTML = html; 11846 }); 11847 11848
11848// src/js/components/accordions.js 11849 var import_jquery2 = __toESM(require_jquery()); 11850 (0, import_jquery2.default)(document).ready(function() { 11851 (0, import_jquery2.default)(".accordion-header").on("click", function() { 11852 var panelId = (0, import_jquery2.default)(this).attr("aria-controls"); 11853 var panel = (0, import_jquery2.default)("#" + panelId); 11854 var isExpanded = (0, import_jquery2.default)(this).attr("aria-expanded") === "true"; 11855 (0, import_jquery2.default)(this).attr("aria-expanded", !isExpanded); 11856 if (!isExpanded) 11857 panel.slideDown(); 11858 else 11859 panel.slideUp(); 11860 }); 11861 }); 11862 11863
11863// src/js/helpers/acf-map.js 11864 (function($8) { 11865 function initMap($el) { 11866 var $markers = $el.find(".marker"); 11867 var mapArgs = { 11868 zoom: $el.data("zoom") || 16, 11869 mapTypeId: google.maps.MapTypeId.ROADMAP 11870 }; 11871 var map = new google.maps.Map($el[0], mapArgs); 11872 map.markers = []; 11873 $markers.each(function() { 11874 initMarker($8(this), map); 11875 }); 11876 centerMap(map); 11877 return map; 11878 } 11879 function initMarker($marker, map) { 11880 var lat = $marker.data("lat"); 11881 var lng = $marker.data("lng"); 11882 var latLng = { 11883 lat: parseFloat(lat), 11884 lng: parseFloat(lng) 11885 }; 11886 var marker = new google.maps.Marker({ 11887 position: latLng, 11888 map 11889 }); 11890 map.markers.push(marker); 11891 if ($marker.html()) { 11892 var infowindow = new google.maps.InfoWindow({ 11893 content: $marker.html() 11894 }); 11895 google.maps.event.addListener(marker, "click", function() { 11896 infowindow.open(map, marker); 11897 }); 11898 } 11899 } 11900 function centerMap(map) { 11901 var bounds = new google.maps.LatLngBounds(); 11902 map.markers.forEach(function(marker) { 11903 bounds.extend({ 11904 lat: marker.position.lat(), 11905 lng: marker.position.lng() 11906 }); 11907 }); 11908 if (map.markers.length == 1) { 11909 map.setCenter(bounds.getCenter()); 11910 } else { 11911 map.fitBounds(bounds); 11912 } 11913 } 11914 $8(document).ready(function() { 11915 $8(".acf-map").each(function() { 11916 var map = initMap($8(this)); 11917 }); 11918 }); 11919 })(jQuery); 11920 11921
11921// src/js/components/pinehurst.js 11922 var import_jquery3 = __toESM(require_jquery()); 11923 (0, import_jquery3.default)(document).ready(function() { 11924 var links = document.getElementsByTagName("a"); 11925 for (var i = 0; i < links.length; i++) { 11926 links[i]._title = links[i].title; 11927 links[i].onmouseover = function() { 11928 this.title = ""; 11929 }; 11930 links[i].onmouseout = function() { 11931 this.title = this._title; 11932 }; 11933 } 11934 (0, import_jquery3.default)(window).on("resize", function() { 11935 if ((0, import_jquery3.default)("#site-navigation").hasClass("open")) { 11936 (0, import_jquery3.default)("#site-navigation").removeClass("open"); 11937 (0, import_jquery3.default)("#masthead").removeClass("menu-open"); 11938 } 11939 }); 11940 (0, import_jquery3.default)("#scroll-to-content").on("click", function(e) { 11941 e.preventDefault(); 11942 (0, import_jquery3.default)("html, body").animate({ 11943 scrollTop: (0, import_jquery3.default)("#content").offset().top 11944 }, (0, import_jquery3.default)("#content").offset().top); 11945 }); 11946 (0, import_jquery3.default)(".sidebar li").on("click", function(e) { 11947 if ((0, import_jquery3.default)(this).hasClass("active")) { 11948 e.preventDefault(); 11949 } 11950 if ((0, import_jquery3.default)(this).parent("ul").hasClass("expanded")) { 11951 console.log("test1"); 11952 (0, import_jquery3.default)(this).parent("ul").removeClass("expanded"); 11953 (0, import_jquery3.default)(this).parent("ul").children("li").not(".active").slideUp(); 11954 } else { 11955 console.log("test2"); 11956 (0, import_jquery3.default)(this).parent("ul").addClass("expanded"); 11957 (0, import_jquery3.default)(this).parent("ul").children("li").slideDown(); 11958 } 11959 }); 11960 if ((0, import_jquery3.default)("body").hasClass("single-course")) { 11961 (0, import_jquery3.default)("#single-course-holes").css("opacity", "1"); 11962 (0, import_jquery3.default)(".slide-main-nav-button").on("click", function(e) { 11963 e.preventDefault(); 11964 if (!(0, import_jquery3.default)(this).hasClass("active")) { 11965 var target = (0, import_jquery3.default)((0, import_jquery3.default)(this).data("target")); 11966 (0, import_jquery3.default)(".slide-main-nav-button").removeClass("active"); 11967 target.parent().children("div").css("opacity", "0"); 11968 (0, import_jquery3.default)(this).addClass("active"); 11969 target.parent().append(target); 11970 target.css("opacity", "1").fadeIn(); 11971 } else { 11972 return null; 11973 } 11974 }); 11975 } 11976 setTimeout(function() { 11977 (0, import_jquery3.default)("#nf-form-2-cont").find("form").each(function() { 11978 (0, import_jquery3.default)(this).attr({ 11979 id: "revinate_contact_api_form", 11980 token: "d0e72676-9be7-4938-b811-a6d2706f92d3" 11981 }).on("submit", function(e) { 11982 revFormOnSubmit(); 11983 e.preventDefault(); 11984 }); 11985 }); 11986 }, 2e3); 11987 function gridHolesDefault() { 11988 (0, import_jquery3.default)(".golf-course-grid").find(".nav-front-9").each(function() { 11989 (0, import_jquery3.default)(this).addClass("active"); 11990 }); 11991 } 11992 gridHolesDefault(); 11993 function gridHolesActivateFront9() { 11994 (0, import_jquery3.default)(".golf-course-grid").find(".course-grid").each(function() { 11995 (0, import_jquery3.default)(this).addClass("front-9-active"); 11996 }); 11997 } 11998 gridHolesActivateFront9(); 11999 (0, import_jquery3.default)(".the-grid-nines").find(".nav-button").each(function() { 12000 var button = (0, import_jquery3.default)(this); 12001 button.on("click", function() { 12002 if (button.hasClass("nav-front-9")) { 12003 if (!button.hasClass("active")) { 12004 (0, import_jquery3.default)(".the-grid-nines").find(".nav-button").each(function() { 12005 (0, import_jquery3.default)(this).removeClass("active"); 12006 }); 12007 button.addClass("active"); 12008 (0, import_jquery3.default)(".golf-course-grid").find(".course-grid").each(function() { 12009 (0, import_jquery3.default)(this).removeClass("back-9-active"); 12010 (0, import_jquery3.default)(this).addClass("front-9-active"); 12011 }); 12012 } 12013 } else if (button.hasClass("nav-back-9")) { 12014 if (!button.hasClass("active")) { 12015 (0, import_jquery3.default)(".the-grid-nines").find(".nav-button").each(function() { 12016 (0, import_jquery3.default)(this).removeClass("active"); 12017 }); 12018 button.addClass("active"); 12019 (0, import_jquery3.default)(".golf-course-grid").find(".course-grid").each(function() { 12020 (0, import_jquery3.default)(this).removeClass("front-9-active"); 12021 (0, import_jquery3.default)(this).addClass("back-9-active"); 12022 }); 12023 } 12024 } 12025 }); 12026 }); 12027 function isVisible(element) { 12028 var coordinates = element.getBoundingClientRect(); 12029 if (coordinates.right > window.innerWidth || coordinates.bottom > window.innerHeight) { 12030 return false;
12031 } 12032 if (coordinates.top < 0 || coordinates.left < 0) { 12033 return false; 12034 } 12035 return true; 12036 } 12037 }); 12038 12039
12039// src/js/components/grid-cards.js 12040 function handleGridCards() { 12041 const gridContainers = document.querySelectorAll(".grid-cards"); 12042 if (!gridContainers.length) 12043 return; 12044 gridContainers.forEach((el) => { 12045 const cards = el.querySelectorAll(".grid-card"); 12046 cards.forEach((card) => { 12047 const content = card.querySelector(".grid-card-content"); 12048 const heading = card.querySelector(".heading"); 12049 const description = card.querySelector(".description"); 12050 const mq = window.matchMedia("(max-width: 991px)"); 12051 if (!content || !heading || !description) 12052 return; 12053 function handleResize() { 12054 if (!mq.matches) { 12055 const height = description.offsetHeight; 12056 heading.style.transform = `translateY(${height}px)`; 12057 } else { 12058 heading.style.transform = "translateY(0px)"; 12059 } 12060 } 12061 function handleHover() { 12062 if (!mq.matches) { 12063 content.classList.add("active"); 12064 description.classList.add("show"); 12065 heading.style.transform = "translateY(0)"; 12066 } 12067 } 12068 function handleStatic() { 12069 if (!mq.matches) { 12070 content.classList.remove("active"); 12071 description.classList.remove("show"); 12072 } 12073 handleResize(); 12074 } 12075 card.addEventListener("mouseenter", handleHover); 12076 card.addEventListener("mouseleave", handleStatic); 12077 handleResize(); 12078 const resizeObserver = new ResizeObserver(handleResize); 12079 resizeObserver.observe(card); 12080 }); 12081 }); 12082 window.addEventListener("load", () => { 12083 gridContainers.forEach((el) => { 12084 const cards = el.querySelectorAll(".grid-card"); 12085 cards.forEach((card) => { 12086 const heading = card.querySelector(".heading"); 12087 const description = card.querySelector(".description"); 12088 if (!heading || !description) 12089 return; 12090 const transformHeight = description.offsetHeight; 12091 heading.style.transform = "translateY(" + transformHeight + "px)"; 12092 const mq = window.matchMedia("(max-width: 991px)"); 12093 if (mq.matches) { 12094 heading.style.transform = "translateY(0px)"; 12095 } 12096 }); 12097 }); 12098 }); 12099 } 12100 handleGridCards(); 12101 12102
12102// src/js/components/ubermenu.js 12103 var import_jquery4 = __toESM(require_jquery()); 12104 (0, import_jquery4.default)(document).on("ready", function() { 12105 (0, import_jquery4.default)("button.ubermenu-responsive-toggle").append('<span class="toggle-burger"><span class="toggle-burger-bar"></span><span class="toggle-burger-bar"></span><span class="toggle-burger-bar"></span></span>'); 12106 }); 12107 12108
12108// src/js/components/forms.js 12109 var import_jquery5 = __toESM(require_jquery()); 12110 (0, import_jquery5.default)(document).on("ready", function() { 12111 }).on("gform_page_loaded", function(event2, form_id, current_page) { 12112 console.log("event " + event2); 12113 console.log("form id " + form_id); 12114 console.log("current page " + current_page); 12115 }); 12116 12117
12117// src/js/components/rates.js 12118 var import_jquery6 = __toESM(require_jquery()); 12119 function gridRatesDefault() { 12120 (0, import_jquery6.default)(".rates-grid").each(function() { 12121 var grid = (0, import_jquery6.default)(this); 12122 grid.find(".nav-double").each(function() { 12123 var double = (0, import_jquery6.default)(this); 12124 double.addClass("active"); 12125 }); 12126 }); 12127 } 12128 gridRatesDefault(); 12129 function gridRatesActivate() { 12130 (0, import_jquery6.default)(".rates-grid").each(function() { 12131 var grid = (0, import_jquery6.default)(this); 12132 grid.find(".rates-grid-table").each(function() { 12133 var double_table = (0, import_jquery6.default)(this); 12134 double_table.addClass("double-active"); 12135 }); 12136 grid.find(".rates-dates li").first().addClass("active"); 12137 grid.find(".rates-table").first().addClass("active"); 12138 }); 12139 } 12140 gridRatesActivate(); 12141 (0, import_jquery6.default)(".rates-grid").each(function() { 12142 var grid = (0, import_jquery6.default)(this); 12143 grid.find(".occupancy").each(function() { 12144 var occupancy = (0, import_jquery6.default)(this); 12145 occupancy.find(".nav-button").each(function() { 12146 var nav_button = (0, import_jquery6.default)(this); 12147 nav_button.on("click", function(e) { 12148 e.preventDefault(); 12149 if (nav_button.hasClass("nav-single")) { 12150 if (!nav_button.hasClass("active")) { 12151 nav_button.parent().find(".nav-button").each(function() { 12152 (0, import_jquery6.default)(this).removeClass("active"); 12153 }); 12154 nav_button.addClass("active"); 12155 grid.find(".rates-grid-table").each(function() { 12156 (0, import_jquery6.default)(this).removeClass("double-active"); 12157 (0, import_jquery6.default)(this).addClass("single-active"); 12158 }); 12159 } 12160 } else if (nav_button.hasClass("nav-double")) { 12161 if (!nav_button.hasClass("active")) { 12162 nav_button.parent().find(".nav-button").each(function() { 12163 (0, import_jquery6.default)(this).removeClass("active"); 12164 }); 12165 nav_button.addClass("active"); 12166 grid.find(".rates-grid-table").each(function() { 12167 (0, import_jquery6.default)(this).removeClass("single-active"); 12168 (0, import_jquery6.default)(this).addClass("double-active"); 12169 }); 12170 } 12171 } 12172 }); 12173 }); 12174 }); 12175 grid.find(".rates-dates").each(function() { 12176 var rates_dates = (0, import_jquery6.default)(this); 12177 rates_dates.on("click", function(e) { 12178 e.preventDefault(); 12179 if (!rates_dates.hasClass("expanded")) { 12180 rates_dates.addClass("expanded"); 12181 } else { 12182 rates_dates.removeClass("expanded"); 12183 } 12184 }); 12185 }); 12186 grid.find(".nav-dates").each(function() { 12187 var nav_dates = (0, import_jquery6.default)(this); 12188 var nav_target = nav_dates.data("controls"); 12189 nav_dates.on("click", function(e) { 12190 e.preventDefault(); 12191 var parent = nav_dates.parent(".rate-table-dates"); 12192 if (!parent.hasClass("active")) { 12193 grid.find(".rate-table-dates").each(function() { 12194 (0, import_jquery6.default)(this).removeClass("active"); 12195 }); 12196 parent.addClass("active"); 12197 grid.find(".rates-table").each(function() { 12198 (0, import_jquery6.default)(this).removeClass("active"); 12199 }); 12200 grid.find("#" + nav_target).each(function() { 12201 (0, import_jquery6.default)(this).addClass("active"); 12202 }); 12203 } 12204 }); 12205 }); 12206 }); 12207 12208
vendor: 2,880 bytes, lines 12208-12353
12208// node_modules/swiper/shared/ssr-window.esm.mjs 12209 function isObject(obj) { 12210 return obj !== null && typeof obj === "object" && "constructor" in obj && obj.constructor === Object; 12211 } 12212 function extend(target = {}, src = {}) { 12213 const noExtend = ["__proto__", "constructor", "prototype"]; 12214 Object.keys(src).filter((key) => noExtend.indexOf(key) < 0).forEach((key) => { 12215 if (typeof target[key] === "undefined") 12216 target[key] = src[key]; 12217 else if (isObject(src[key]) && isObject(target[key]) && Object.keys(src[key]).length > 0) { 12218 extend(target[key], src[key]); 12219 } 12220 }); 12221 } 12222 var ssrDocument = { 12223 body: {}, 12224 addEventListener() { 12225 }, 12226 removeEventListener() { 12227 }, 12228 activeElement: { 12229 blur() { 12230 }, 12231 nodeName: "" 12232 }, 12233 querySelector() { 12234 return null; 12235 }, 12236 querySelectorAll() { 12237 return []; 12238 }, 12239 getElementById() { 12240 return null; 12241 }, 12242 createEvent() { 12243 return { 12244 initEvent() { 12245 } 12246 }; 12247 }, 12248 createElement() { 12249 return { 12250 children: [], 12251 childNodes: [], 12252 style: {}, 12253 setAttribute() { 12254 }, 12255 getElementsByTagName() { 12256 return []; 12257 } 12258 }; 12259 }, 12260 createElementNS() { 12261 return {}; 12262 }, 12263 importNode() { 12264 return null; 12265 }, 12266 location: { 12267 hash: "", 12268 host: "", 12269 hostname: "", 12270 href: "", 12271 origin: "", 12272 pathname: "", 12273 protocol: "", 12274 search: "" 12275 } 12276 }; 12277 function getDocument() { 12278 const doc = typeof document !== "undefined" ? document : {}; 12279 extend(doc, ssrDocument); 12280 return doc; 12281 } 12282 var ssrWindow = { 12283 document: ssrDocument, 12284 navigator: { 12285 userAgent: "" 12286 }, 12287 location: { 12288 hash: "", 12289 host: "", 12290 hostname: "", 12291 href: "", 12292 origin: "", 12293 pathname: "", 12294 protocol: "", 12295 search: "" 12296 }, 12297 history: { 12298 replaceState() { 12299 }, 12300 pushState() { 12301 }, 12302 go() { 12303 }, 12304 back() { 12305 } 12306 }, 12307 CustomEvent: function CustomEvent() { 12308 return this; 12309 }, 12310 addEventListener() { 12311 }, 12312 removeEventListener() { 12313 }, 12314 getComputedStyle() { 12315 return { 12316 getPropertyValue() { 12317 return ""; 12318 } 12319 }; 12320 }, 12321 Image() { 12322 }, 12323 Date() { 12324 }, 12325 screen: {}, 12326 setTimeout() { 12327 }, 12328 clearTimeout() { 12329 }, 12330 matchMedia() { 12331 return {}; 12332 }, 12333 requestAnimationFrame(callback) { 12334 if (typeof setTimeout === "undefined") { 12335 callback(); 12336 return null; 12337 } 12338 return setTimeout(callback, 0); 12339 }, 12340 cancelAnimationFrame(id) { 12341 if (typeof setTimeout === "undefined") { 12342 return; 12343 } 12344 clearTimeout(id); 12345 } 12346 }; 12347 function getWindow() { 12348 const win = typeof window !== "undefined" ? window : {}; 12349 extend(win, ssrWindow); 12350 return win; 12351 } 12352 12353
vendor: 10,515 bytes, lines 12353-12665
12353// node_modules/swiper/shared/utils.mjs 12354 function classesToTokens(classes2 = "") { 12355 return classes2.trim().split(" ").filter((c) => !!c.trim()); 12356 } 12357 function deleteProps(obj) { 12358 const object = obj; 12359 Object.keys(object).forEach((key) => { 12360 try { 12361 object[key] = null; 12362 } catch (e) { 12363 } 12364 try { 12365 delete object[key]; 12366 } catch (e) { 12367 } 12368 }); 12369 } 12370 function nextTick(callback, delay = 0) { 12371 return setTimeout(callback, delay); 12372 } 12373 function now() { 12374 return Date.now(); 12375 } 12376 function getComputedStyle2(el) { 12377 const window2 = getWindow(); 12378 let style; 12379 if (window2.getComputedStyle) { 12380 style = window2.getComputedStyle(el, null); 12381 } 12382 if (!style && el.currentStyle) { 12383 style = el.currentStyle; 12384 } 12385 if (!style) { 12386 style = el.style; 12387 } 12388 return style; 12389 } 12390 function getTranslate(el, axis = "x") { 12391 const window2 = getWindow(); 12392 let matrix; 12393 let curTransform; 12394 let transformMatrix; 12395 const curStyle = getComputedStyle2(el); 12396 if (window2.WebKitCSSMatrix) { 12397 curTransform = curStyle.transform || curStyle.webkitTransform; 12398 if (curTransform.split(",").length > 6) { 12399 curTransform = curTransform.split(", ").map((a) => a.replace(",", ".")).join(", "); 12400 } 12401 transformMatrix = new window2.WebKitCSSMatrix(curTransform === "none" ? "" : curTransform); 12402 } else { 12403 transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue("transform").replace("translate(", "matrix(1, 0, 0, 1,"); 12404 matrix = transformMatrix.toString().split(","); 12405 } 12406 if (axis === "x") { 12407 if (window2.WebKitCSSMatrix) 12408 curTransform = transformMatrix.m41; 12409 else if (matrix.length === 16) 12410 curTransform = parseFloat(matrix[12]); 12411 else 12412 curTransform = parseFloat(matrix[4]); 12413 } 12414 if (axis === "y") { 12415 if (window2.WebKitCSSMatrix) 12416 curTransform = transformMatrix.m42; 12417 else if (matrix.length === 16) 12418 curTransform = parseFloat(matrix[13]); 12419 else 12420 curTransform = parseFloat(matrix[5]); 12421 } 12422 return curTransform || 0; 12423 } 12424 function isObject2(o) { 12425 return typeof o === "object" && o !== null && o.constructor && Object.prototype.toString.call(o).slice(8, -1) === "Object"; 12426 } 12427 function isNode(node) { 12428 if (typeof window !== "undefined" && typeof window.HTMLElement !== "undefined") { 12429 return node instanceof HTMLElement; 12430 } 12431 return node && (node.nodeType === 1 || node.nodeType === 11); 12432 } 12433 function extend2(...args) { 12434 const to = Object(args[0]); 12435 const noExtend = ["__proto__", "constructor", "prototype"]; 12436 for (let i = 1; i < args.length; i += 1) { 12437 const nextSource = args[i]; 12438 if (nextSource !== void 0 && nextSource !== null && !isNode(nextSource)) { 12439 const keysArray = Object.keys(Object(nextSource)).filter((key) => noExtend.indexOf(key) < 0); 12440 for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) { 12441 const nextKey = keysArray[nextIndex]; 12442 const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); 12443 if (desc !== void 0 && desc.enumerable) { 12444 if (isObject2(to[nextKey]) && isObject2(nextSource[nextKey])) { 12445 if (nextSource[nextKey].__swiper__) { 12446 to[nextKey] = nextSource[nextKey]; 12447 } else { 12448 extend2(to[nextKey], nextSource[nextKey]); 12449 } 12450 } else if (!isObject2(to[nextKey]) && isObject2(nextSource[nextKey])) { 12451 to[nextKey] = {}; 12452 if (nextSource[nextKey].__swiper__) { 12453 to[nextKey] = nextSource[nextKey]; 12454 } else { 12455 extend2(to[nextKey], nextSource[nextKey]); 12456 } 12457 } else { 12458 to[nextKey] = nextSource[nextKey]; 12459 } 12460 } 12461 } 12462 } 12463 } 12464 return to; 12465 } 12466 function setCSSProperty(el, varName, varValue) { 12467 el.style.setProperty(varName, varValue); 12468 } 12469 function animateCSSModeScroll({ 12470 swiper, 12471 targetPosition, 12472 side 12473 }) { 12474 const window2 = getWindow(); 12475 const startPosition = -swiper.translate; 12476 let startTime = null; 12477 let time; 12478 const duration = swiper.params.speed; 12479 swiper.wrapperEl.style.scrollSnapType = "none"; 12480 window2.cancelAnimationFrame(swiper.cssModeFrameID); 12481 const dir = targetPosition > startPosition ? "next" : "prev"; 12482 const isOutOfBound = (current, target) => { 12483 return dir === "next" && current >= target || dir === "prev" && current <= target; 12484 }; 12485 const animate = () => { 12486 time = new Date().getTime(); 12487 if (startTime === null) { 12488 startTime = time; 12489 } 12490 const progress = Math.max(Math.min((time - startTime) / duration, 1), 0); 12491 const easeProgress = 0.5 - Math.cos(progress * Math.PI) / 2; 12492 let currentPosition = startPosition + easeProgress * (targetPosition - startPosition); 12493 if (isOutOfBound(currentPosition, targetPosition)) { 12494 currentPosition = targetPosition; 12495 } 12496 swiper.wrapperEl.scrollTo({ 12497 [side]: currentPosition 12498 }); 12499 if (isOutOfBound(currentPosition, targetPosition)) { 12500 swiper.wrapperEl.style.overflow = "hidden"; 12501 swiper.wrapperEl.style.scrollSnapType = ""; 12502 setTimeout(() => { 12503 swiper.wrapperEl.style.overflow = ""; 12504 swiper.wrapperEl.scrollTo({ 12505 [side]: currentPosition 12506 }); 12507 }); 12508 window2.cancelAnimationFrame(swiper.cssModeFrameID); 12509 return; 12510 } 12511 swiper.cssModeFrameID = window2.requestAnimationFrame(animate); 12512 }; 12513 animate(); 12514 } 12515 function getSlideTransformEl(slideEl) { 12516 return slideEl.querySelector(".swiper-slide-transform") || slideEl.shadowRoot && slideEl.shadowRoot.querySelector(".swiper-slide-transform") || slideEl; 12517 } 12518 function elementChildren(element, selector = "") { 12519 const window2 = getWindow(); 12520 const children = [...element.children]; 12521 if (window2.HTMLSlotElement && element instanceof HTMLSlotElement) { 12522 children.push(...element.assignedElements()); 12523 } 12524 if (!selector) { 12525 return children; 12526 } 12527 return children.filter((el) => el.matches(selector)); 12528 } 12529 function elementIsChildOfSlot(el, slot) { 12530 const elementsQueue = [slot]; 12531 while (elementsQueue.length > 0) { 12532 const elementToCheck = elementsQueue.shift(); 12533 if (el === elementToCheck) { 12534 return true; 12535 } 12536 elementsQueue.push(...elementToCheck.children, ...elementToCheck.shadowRoot ? elementToCheck.shadowRoot.children : [], ...elementToCheck.assignedElements ? elementToCheck.assignedElements() : []); 12537 } 12538 } 12539 function elementIsChildOf(el, parent) { 12540 const window2 = getWindow(); 12541 let isChild = parent.contains(el); 12542 if (!isChild && window2.HTMLSlotElement && parent instanceof HTMLSlotElement) { 12543 const children = [...parent.assignedElements()]; 12544 isChild = children.includes(el); 12545 if (!isChild) { 12546 isChild = elementIsChildOfSlot(el, parent); 12547 } 12548 } 12549 return isChild; 12550 } 12551 function showWarning(text) { 12552 try { 12553 console.warn(text); 12554 return; 12555 } catch (err) { 12556 } 12557 } 12558 function createElement(tag, classes2 = []) { 12559 const el = document.createElement(tag); 12560 el.classList.add(...Array.isArray(classes2) ? classes2 : classesToTokens(classes2)); 12561 return el; 12562 } 12563 function elementOffset(el) { 12564 const window2 = getWindow(); 12565 const document2 = getDocument(); 12566 const box = el.getBoundingClientRect(); 12567 const body = document2.body; 12568 const clientTop = el.clientTop || body.clientTop || 0; 12569 const clientLeft = el.clientLeft || body.clientLeft || 0; 12570 const scrollTop = el === window2 ? window2.scrollY : el.scrollTop; 12571 const scrollLeft = el === window2 ? window2.scrollX : el.scrollLeft; 12572 return { 12573 top: box.top + scrollTop - clientTop, 12574 left: box.left + scrollLeft - clientLeft 12575 }; 12576 } 12577 function elementPrevAll(el, selector) { 12578 const prevEls = []; 12579 while (el.previousElementSibling) { 12580 const prev = el.previousElementSibling; 12581 if (selector) { 12582 if (prev.matches(selector)) 12583 prevEls.push(prev); 12584 } else 12585 prevEls.push(prev); 12586 el = prev; 12587 } 12588 return prevEls; 12589 } 12590 function elementNextAll(el, selector) { 12591 const nextEls = []; 12592 while (el.nextElementSibling) { 12593 const next = el.nextElementSibling; 12594 if (selector) { 12595 if (next.matches(selector)) 12596 nextEls.push(next); 12597 } else 12598 nextEls.push(next); 12599 el = next; 12600 } 12601 return nextEls; 12602 } 12603 function elementStyle(el, prop) { 12604 const window2 = getWindow(); 12605 return window2.getComputedStyle(el, null).getPropertyValue(prop); 12606 } 12607 function elementIndex(el) { 12608 let child = el; 12609 let i; 12610 if (child) { 12611 i = 0; 12612 while ((child = child.previousSibling) !== null) { 12613 if (child.nodeType === 1) 12614 i += 1; 12615 } 12616 return i; 12617 } 12618 return void 0; 12619 } 12620 function elementParents(el, selector) { 12621 const parents = []; 12622 let parent = el.parentElement; 12623 while (parent) { 12624 if (selector) { 12625 if (parent.matches(selector)) 12626 parents.push(parent); 12627 } else { 12628 parents.push(parent); 12629 } 12630 parent = parent.parentElement; 12631 } 12632 return parents; 12633 } 12634 function elementTransitionEnd(el, callback) { 12635 function fireCallBack(e) { 12636 if (e.target !== el) 12637 return; 12638 callback.call(el, e); 12639 el.removeEventListener("transitionend", fireCallBack); 12640 } 12641 if (callback) { 12642 el.addEventListener("transitionend", fireCallBack); 12643 } 12644 } 12645 function elementOuterSize(el, size, includeMargins) { 12646 const window2 = getWindow(); 12647 if (includeMargins) { 12648 return el[size === "width" ? "offsetWidth" : "offsetHeight"] + parseFloat(window2.getComputedStyle(el, null).getPropertyValue(size === "width" ? "margin-right" : "margin-top")) + parseFloat(window2.getComputedStyle(el, null).getPropertyValue(size === "width" ? "margin-left" : "margin-bottom")); 12649 } 12650 return el.offsetWidth; 12651 } 12652 function makeElementsArray(el) { 12653 return (Array.isArray(el) ? el : [el]).filter((e) => !!e); 12654 } 12655 function setInnerHTML(el, html = "") { 12656 if (typeof trustedTypes !== "undefined") { 12657 el.innerHTML = trustedTypes.createPolicy("html", { 12658 createHTML: (s) => s 12659 }).createHTML(html); 12660 } else { 12661 el.innerHTML = html; 12662 } 12663 } 12664 12665
vendor: 134,288 bytes, lines 12665-16411
12665// node_modules/swiper/shared/swiper-core.mjs 12666 var support; 12667 function calcSupport() { 12668 const window2 = getWindow(); 12669 const document2 = getDocument(); 12670 return { 12671 smoothScroll: document2.documentElement && document2.documentElement.style && "scrollBehavior" in document2.documentElement.style, 12672 touch: !!("ontouchstart" in window2 || window2.DocumentTouch && document2 instanceof window2.DocumentTouch) 12673 }; 12674 } 12675 function getSupport() { 12676 if (!support) { 12677 support = calcSupport(); 12678 } 12679 return support; 12680 } 12681 var deviceCached; 12682 function calcDevice({ 12683 userAgent 12684 } = {}) { 12685 const support2 = getSupport(); 12686 const window2 = getWindow(); 12687 const platform = window2.navigator.platform; 12688 const ua = userAgent || window2.navigator.userAgent; 12689 const device = { 12690 ios: false, 12691 android: false 12692 }; 12693 const screenWidth = window2.screen.width; 12694 const screenHeight = window2.screen.height; 12695 const android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); 12696 let ipad = ua.match(/(iPad)(?!\1).*OS\s([\d_]+)/); 12697 const ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/); 12698 const iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/); 12699 const windows = platform === "Win32"; 12700 let macos = platform === "MacIntel"; 12701 const iPadScreens = ["1024x1366", "1366x1024", "834x1194", "1194x834", "834x1112", "1112x834", "768x1024", "1024x768", "820x1180", "1180x820", "810x1080", "1080x810"]; 12702 if (!ipad && macos && support2.touch && iPadScreens.indexOf(`${screenWidth}x${screenHeight}`) >= 0) { 12703 ipad = ua.match(/(Version)\/([\d.]+)/); 12704 if (!ipad) 12705 ipad = [0, 1, "13_0_0"]; 12706 macos = false; 12707 } 12708 if (android && !windows) { 12709 device.os = "android"; 12710 device.android = true; 12711 } 12712 if (ipad || iphone || ipod) { 12713 device.os = "ios"; 12714 device.ios = true; 12715 } 12716 return device; 12717 } 12718 function getDevice(overrides = {}) { 12719 if (!deviceCached) { 12720 deviceCached = calcDevice(overrides); 12721 } 12722 return deviceCached; 12723 } 12724 var browser; 12725 function calcBrowser() { 12726 const window2 = getWindow(); 12727 const device = getDevice(); 12728 let needPerspectiveFix = false; 12729 function isSafari() { 12730 const ua = window2.navigator.userAgent.toLowerCase(); 12731 return ua.indexOf("safari") >= 0 && ua.indexOf("chrome") < 0 && ua.indexOf("android") < 0; 12732 } 12733 if (isSafari()) { 12734 const ua = String(window2.navigator.userAgent); 12735 if (ua.includes("Version/")) { 12736 const [major, minor] = ua.split("Version/")[1].split(" ")[0].split(".").map((num) => Number(num)); 12737 needPerspectiveFix = major < 16 || major === 16 && minor < 2; 12738 } 12739 } 12740 const isWebView = /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window2.navigator.userAgent); 12741 const isSafariBrowser = isSafari(); 12742 const need3dFix = isSafariBrowser || isWebView && device.ios; 12743 return { 12744 isSafari: needPerspectiveFix || isSafariBrowser, 12745 needPerspectiveFix, 12746 need3dFix, 12747 isWebView 12748 }; 12749 } 12750 function getBrowser() { 12751 if (!browser) { 12752 browser = calcBrowser(); 12753 } 12754 return browser; 12755 } 12756 function Resize({ 12757 swiper, 12758 on, 12759 emit 12760 }) { 12761 const window2 = getWindow(); 12762 let observer = null; 12763 let animationFrame = null; 12764 const resizeHandler = () => { 12765 if (!swiper || swiper.destroyed || !swiper.initialized) 12766 return; 12767 emit("beforeResize"); 12768 emit("resize"); 12769 }; 12770 const createObserver = () => { 12771 if (!swiper || swiper.destroyed || !swiper.initialized) 12772 return; 12773 observer = new ResizeObserver((entries) => { 12774 animationFrame = window2.requestAnimationFrame(() => { 12775 const { 12776 width, 12777 height 12778 } = swiper; 12779 let newWidth = width; 12780 let newHeight = height; 12781 entries.forEach(({ 12782 contentBoxSize, 12783 contentRect, 12784 target 12785 }) => { 12786 if (target && target !== swiper.el) 12787 return; 12788 newWidth = contentRect ? contentRect.width : (contentBoxSize[0] || contentBoxSize).inlineSize; 12789 newHeight = contentRect ? contentRect.height : (contentBoxSize[0] || contentBoxSize).blockSize; 12790 }); 12791 if (newWidth !== width || newHeight !== height) { 12792 resizeHandler(); 12793 } 12794 }); 12795 }); 12796 observer.observe(swiper.el); 12797 }; 12798 const removeObserver = () => { 12799 if (animationFrame) { 12800 window2.cancelAnimationFrame(animationFrame); 12801 } 12802 if (observer && observer.unobserve && swiper.el) { 12803 observer.unobserve(swiper.el); 12804 observer = null; 12805 } 12806 }; 12807 const orientationChangeHandler = () => { 12808 if (!swiper || swiper.destroyed || !swiper.initialized) 12809 return; 12810 emit("orientationchange"); 12811 }; 12812 on("init", () => { 12813 if (swiper.params.resizeObserver && typeof window2.ResizeObserver !== "undefined") { 12814 createObserver(); 12815 return; 12816 } 12817 window2.addEventListener("resize", resizeHandler); 12818 window2.addEventListener("orientationchange", orientationChangeHandler); 12819 }); 12820 on("destroy", () => { 12821 removeObserver(); 12822 window2.removeEventListener("resize", resizeHandler); 12823 window2.removeEventListener("orientationchange", orientationChangeHandler); 12824 }); 12825 } 12826 function Observer({ 12827 swiper, 12828 extendParams, 12829 on, 12830 emit 12831 }) { 12832 const observers = []; 12833 const window2 = getWindow(); 12834 const attach = (target, options = {}) => { 12835 const ObserverFunc = window2.MutationObserver || window2.WebkitMutationObserver; 12836 const observer = new ObserverFunc((mutations) => { 12837 if (swiper.__preventObserver__) 12838 return; 12839 if (mutations.length === 1) { 12840 emit("observerUpdate", mutations[0]); 12841 return; 12842 } 12843 const observerUpdate = function observerUpdate2() { 12844 emit("observerUpdate", mutations[0]); 12845 }; 12846 if (window2.requestAnimationFrame) { 12847 window2.requestAnimationFrame(observerUpdate); 12848 } else { 12849 window2.setTimeout(observerUpdate, 0); 12850 } 12851 }); 12852 observer.observe(target, { 12853 attributes: typeof options.attributes === "undefined" ? true : options.attributes, 12854 childList: swiper.isElement || (typeof options.childList === "undefined" ? true : options).childList, 12855 characterData: typeof options.characterData === "undefined" ? true : options.characterData 12856 }); 12857 observers.push(observer); 12858 }; 12859 const init = () => { 12860 if (!swiper.params.observer) 12861 return; 12862 if (swiper.params.observeParents) { 12863 const containerParents = elementParents(swiper.hostEl); 12864 for (let i = 0; i < containerParents.length; i += 1) { 12865 attach(containerParents[i]); 12866 } 12867 } 12868 attach(swiper.hostEl, { 12869 childList: swiper.params.observeSlideChildren 12870 }); 12871 attach(swiper.wrapperEl, { 12872 attributes: false 12873 }); 12874 }; 12875 const destroy = () => { 12876 observers.forEach((observer) => { 12877 observer.disconnect(); 12878 }); 12879 observers.splice(0, observers.length); 12880 }; 12881 extendParams({ 12882 observer: false, 12883 observeParents: false, 12884 observeSlideChildren: false 12885 }); 12886 on("init", init); 12887 on("destroy", destroy); 12888 } 12889 var eventsEmitter = { 12890 on(events2, handler, priority) { 12891 const self2 = this; 12892 if (!self2.eventsListeners || self2.destroyed) 12893 return self2; 12894 if (typeof handler !== "function") 12895 return self2; 12896 const method = priority ? "unshift" : "push"; 12897 events2.split(" ").forEach((event2) => { 12898 if (!self2.eventsListeners[event2]) 12899 self2.eventsListeners[event2] = []; 12900 self2.eventsListeners[event2][method](handler); 12901 }); 12902 return self2; 12903 }, 12904 once(events2, handler, priority) { 12905 const self2 = this; 12906 if (!self2.eventsListeners || self2.destroyed) 12907 return self2; 12908 if (typeof handler !== "function") 12909 return self2; 12910 function onceHandler(...args) { 12911 self2.off(events2, onceHandler); 12912 if (onceHandler.__emitterProxy) { 12913 delete onceHandler.__emitterProxy; 12914 } 12915 handler.apply(self2, args); 12916 } 12917 onceHandler.__emitterProxy = handler; 12918 return self2.on(events2, onceHandler, priority); 12919 }, 12920 onAny(handler, priority) { 12921 const self2 = this; 12922 if (!self2.eventsListeners || self2.destroyed) 12923 return self2; 12924 if (typeof handler !== "function") 12925 return self2; 12926 const method = priority ? "unshift" : "push"; 12927 if (self2.eventsAnyListeners.indexOf(handler) < 0) { 12928 self2.eventsAnyListeners[method](handler); 12929 } 12930 return self2; 12931 }, 12932 offAny(handler) { 12933 const self2 = this; 12934 if (!self2.eventsListeners || self2.destroyed) 12935 return self2; 12936 if (!self2.eventsAnyListeners) 12937 return self2; 12938 const index = self2.eventsAnyListeners.indexOf(handler); 12939 if (index >= 0) { 12940 self2.eventsAnyListeners.splice(index, 1); 12941 } 12942 return self2; 12943 }, 12944 off(events2, handler) { 12945 const self2 = this; 12946 if (!self2.eventsListeners || self2.destroyed) 12947 return self2; 12948 if (!self2.eventsListeners) 12949 return self2; 12950 events2.split(" ").forEach((event2) => { 12951 if (typeof handler === "undefined") { 12952 self2.eventsListeners[event2] = []; 12953 } else if (self2.eventsListeners[event2]) { 12954 self2.eventsListeners[event2].forEach((eventHandler, index) => { 12955 if (eventHandler === handler || eventHandler.__emitterProxy && eventHandler.__emitterProxy === handler) { 12956 self2.eventsListeners[event2].splice(index, 1); 12957 } 12958 }); 12959 } 12960 }); 12961 return self2; 12962 }, 12963 emit(...args) { 12964 const self2 = this; 12965 if (!self2.eventsListeners || self2.destroyed) 12966 return self2; 12967 if (!self2.eventsListeners) 12968 return self2; 12969 let events2; 12970 let data; 12971 let context; 12972 if (typeof args[0] === "string" || Array.isArray(args[0])) { 12973 events2 = args[0]; 12974 data = args.slice(1, args.length); 12975 context = self2; 12976 } else { 12977 events2 = args[0].events; 12978 data = args[0].data; 12979 context = args[0].context || self2; 12980 } 12981 data.unshift(context); 12982 const eventsArray = Array.isArray(events2) ? events2 : events2.split(" "); 12983 eventsArray.forEach((event2) => { 12984 if (self2.eventsAnyListeners && self2.eventsAnyListeners.length) { 12985 self2.eventsAnyListeners.forEach((eventHandler) => { 12986 eventHandler.apply(context, [event2, ...data]); 12987 }); 12988 } 12989 if (self2.eventsListeners && self2.eventsListeners[event2]) { 12990 self2.eventsListeners[event2].forEach((eventHandler) => { 12991 eventHandler.apply(context, data); 12992 }); 12993 } 12994 }); 12995 return self2; 12996 } 12997 }; 12998 function updateSize() { 12999 const swiper = this; 13000 let width; 13001 let height; 13002 const el = swiper.el; 13003 if (typeof swiper.params.width !== "undefined" && swiper.params.width !== null) { 13004 width = swiper.params.width; 13005 } else { 13006 width = el.clientWidth; 13007 } 13008 if (typeof swiper.params.height !== "undefined" && swiper.params.height !== null) { 13009 height = swiper.params.height; 13010 } else { 13011 height = el.clientHeight; 13012 } 13013 if (width === 0 && swiper.isHorizontal() || height === 0 && swiper.isVertical()) { 13014 return; 13015 } 13016 width = width - parseInt(elementStyle(el, "padding-left") || 0, 10) - parseInt(elementStyle(el, "padding-right") || 0, 10); 13017 height = height - parseInt(elementStyle(el, "padding-top") || 0, 10) - parseInt(elementStyle(el, "padding-bottom") || 0, 10); 13018 if (Number.isNaN(width)) 13019 width = 0; 13020 if (Number.isNaN(height)) 13021 height = 0; 13022 Object.assign(swiper, { 13023 width, 13024 height, 13025 size: swiper.isHorizontal() ? width : height 13026 }); 13027 } 13028 function updateSlides() { 13029 const swiper = this; 13030 function getDirectionPropertyValue(node, label) { 13031 return parseFloat(node.getPropertyValue(swiper.getDirectionLabel(label)) || 0); 13032 } 13033 const params = swiper.params; 13034 const { 13035 wrapperEl, 13036 slidesEl, 13037 rtlTranslate: rtl, 13038 wrongRTL 13039 } = swiper; 13040 const isVirtual = swiper.virtual && params.virtual.enabled; 13041 const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length; 13042 const slides = elementChildren(slidesEl, `.${swiper.params.slideClass}, swiper-slide`); 13043 const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length; 13044 let snapGrid = []; 13045 const slidesGrid = []; 13046 const slidesSizesGrid = []; 13047 let offsetBefore = params.slidesOffsetBefore; 13048 if (typeof offsetBefore === "function") { 13049 offsetBefore = params.slidesOffsetBefore.call(swiper); 13050 } 13051 let offsetAfter = params.slidesOffsetAfter; 13052 if (typeof offsetAfter === "function") { 13053 offsetAfter = params.slidesOffsetAfter.call(swiper); 13054 } 13055 const previousSnapGridLength = swiper.snapGrid.length; 13056 const previousSlidesGridLength = swiper.slidesGrid.length; 13057 const swiperSize = swiper.size - offsetBefore - offsetAfter; 13058 let spaceBetween = params.spaceBetween; 13059 let slidePosition = -offsetBefore; 13060 let prevSlideSize = 0; 13061 let index = 0; 13062 if (typeof swiperSize === "undefined") { 13063 return; 13064 } 13065 if (typeof spaceBetween === "string" && spaceBetween.indexOf("%") >= 0) { 13066 spaceBetween = parseFloat(spaceBetween.replace("%", "")) / 100 * swiperSize; 13067 } else if (typeof spaceBetween === "string") { 13068 spaceBetween = parseFloat(spaceBetween); 13069 } 13070 swiper.virtualSize = -spaceBetween - offsetBefore - offsetAfter; 13071 slides.forEach((slideEl) => { 13072 if (rtl) { 13073 slideEl.style.marginLeft = ""; 13074 } else { 13075 slideEl.style.marginRight = ""; 13076 } 13077 slideEl.style.marginBottom = ""; 13078 slideEl.style.marginTop = ""; 13079 }); 13080 if (params.centeredSlides && params.cssMode) { 13081 setCSSProperty(wrapperEl, "--swiper-centered-offset-before", ""); 13082 setCSSProperty(wrapperEl, "--swiper-centered-offset-after", ""); 13083 } 13084 const gridEnabled = params.grid && params.grid.rows > 1 && swiper.grid; 13085 if (gridEnabled) { 13086 swiper.grid.initSlides(slides); 13087 } else if (swiper.grid) { 13088 swiper.grid.unsetSlides(); 13089 } 13090 let slideSize; 13091 const shouldResetSlideSize = params.slidesPerView === "auto" && params.breakpoints && Object.keys(params.breakpoints).filter((key) => { 13092 return typeof params.breakpoints[key].slidesPerView !== "undefined"; 13093 }).length > 0; 13094 for (let i = 0; i < slidesLength; i += 1) { 13095 slideSize = 0; 13096 const slide2 = slides[i]; 13097 if (slide2) { 13098 if (gridEnabled) { 13099 swiper.grid.updateSlide(i, slide2, slides); 13100 } 13101 if (elementStyle(slide2, "display") === "none") 13102 continue; 13103 } 13104 if (isVirtual && params.slidesPerView === "auto") { 13105 if (params.virtual.slidesPerViewAutoSlideSize) { 13106 slideSize = params.virtual.slidesPerViewAutoSlideSize; 13107 } 13108 if (slideSize && slide2) { 13109 if (params.roundLengths) 13110 slideSize = Math.floor(slideSize); 13111 slide2.style[swiper.getDirectionLabel("width")] = `${slideSize}px`; 13112 } 13113 } else if (params.slidesPerView === "auto") { 13114 if (shouldResetSlideSize) { 13115 slide2.style[swiper.getDirectionLabel("width")] = ``; 13116 } 13117 const slideStyles = getComputedStyle(slide2); 13118 const currentTransform = slide2.style.transform; 13119 const currentWebKitTransform = slide2.style.webkitTransform; 13120 if (currentTransform) { 13121 slide2.style.transform = "none"; 13122 } 13123 if (currentWebKitTransform) { 13124 slide2.style.webkitTransform = "none"; 13125 } 13126 if (params.roundLengths) { 13127 slideSize = swiper.isHorizontal() ? elementOuterSize(slide2, "width", true) : elementOuterSize(slide2, "height", true); 13128 } else { 13129 const width = getDirectionPropertyValue(slideStyles, "width"); 13130 const paddingLeft = getDirectionPropertyValue(slideStyles, "padding-left"); 13131 const paddingRight = getDirectionPropertyValue(slideStyles, "padding-right"); 13132 const marginLeft = getDirectionPropertyValue(slideStyles, "margin-left"); 13133 const marginRight = getDirectionPropertyValue(slideStyles, "margin-right"); 13134 const boxSizing = slideStyles.getPropertyValue("box-sizing"); 13135 if (boxSizing && boxSizing === "border-box") { 13136 slideSize = width + marginLeft + marginRight; 13137 } else { 13138 const { 13139 clientWidth, 13140 offsetWidth 13141 } = slide2; 13142 slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight + (offsetWidth - clientWidth); 13143 } 13144 } 13145 if (currentTransform) { 13146 slide2.style.transform = currentTransform; 13147 } 13148 if (currentWebKitTransform) { 13149 slide2.style.webkitTransform = currentWebKitTransform; 13150 } 13151 if (params.roundLengths) 13152 slideSize = Math.floor(slideSize); 13153 } else { 13154 slideSize = (swiperSize - (params.slidesPerView - 1) * spaceBetween) / params.slidesPerView; 13155 if (params.roundLengths) 13156 slideSize = Math.floor(slideSize); 13157 if (slide2) { 13158 slide2.style[swiper.getDirectionLabel("width")] = `${slideSize}px`; 13159 } 13160 } 13161 if (slide2) { 13162 slide2.swiperSlideSize = slideSize; 13163 } 13164 slidesSizesGrid.push(slideSize); 13165 if (params.centeredSlides) { 13166 slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween; 13167 if (prevSlideSize === 0 && i !== 0) 13168 slidePosition = slidePosition - swiperSize / 2 - spaceBetween; 13169 if (i === 0) 13170 slidePosition = slidePosition - swiperSize / 2 - spaceBetween; 13171 if (Math.abs(slidePosition) < 1 / 1e3) 13172 slidePosition = 0; 13173 if (params.roundLengths) 13174 slidePosition = Math.floor(slidePosition); 13175 if (index % params.slidesPerGroup === 0) 13176 snapGrid.push(slidePosition); 13177 slidesGrid.push(slidePosition); 13178 } else { 13179 if (params.roundLengths) 13180 slidePosition = Math.floor(slidePosition); 13181 if ((index - Math.min(swiper.params.slidesPerGroupSkip, index)) % swiper.params.slidesPerGroup === 0) 13182 snapGrid.push(slidePosition); 13183 slidesGrid.push(slidePosition); 13184 slidePosition = slidePosition + slideSize + spaceBetween; 13185 } 13186 swiper.virtualSize += slideSize + spaceBetween; 13187 prevSlideSize = slideSize; 13188 index += 1; 13189 } 13190 swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter; 13191 if (rtl && wrongRTL && (params.effect === "slide" || params.effect === "coverflow")) { 13192 wrapperEl.style.width = `${swiper.virtualSize + spaceBetween}px`; 13193 } 13194 if (params.setWrapperSize) { 13195 wrapperEl.style[swiper.getDirectionLabel("width")] = `${swiper.virtualSize + spaceBetween}px`; 13196 } 13197 if (gridEnabled) { 13198 swiper.grid.updateWrapperSize(slideSize, snapGrid); 13199 } 13200 if (!params.centeredSlides) { 13201 const newSlidesGrid = []; 13202 for (let i = 0; i < snapGrid.length; i += 1) { 13203 let slidesGridItem = snapGrid[i]; 13204 if (params.roundLengths) 13205 slidesGridItem = Math.floor(slidesGridItem); 13206 if (snapGrid[i] <= swiper.virtualSize - swiperSize) { 13207 newSlidesGrid.push(slidesGridItem); 13208 } 13209 } 13210 snapGrid = newSlidesGrid; 13211 if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) { 13212 snapGrid.push(swiper.virtualSize - swiperSize); 13213 } 13214 } 13215 if (isVirtual && params.loop) { 13216 const size = slidesSizesGrid[0] + spaceBetween; 13217 if (params.slidesPerGroup > 1) { 13218 const groups = Math.ceil((swiper.virtual.slidesBefore + swiper.virtual.slidesAfter) / params.slidesPerGroup); 13219 const groupSize = size * params.slidesPerGroup; 13220 for (let i = 0; i < groups; i += 1) { 13221 snapGrid.push(snapGrid[snapGrid.length - 1] + groupSize); 13222 } 13223 } 13224 for (let i = 0; i < swiper.virtual.slidesBefore + swiper.virtual.slidesAfter; i += 1) { 13225 if (params.slidesPerGroup === 1) { 13226 snapGrid.push(snapGrid[snapGrid.length - 1] + size); 13227 } 13228 slidesGrid.push(slidesGrid[slidesGrid.length - 1] + size); 13229 swiper.virtualSize += size; 13230 } 13231 } 13232 if (snapGrid.length === 0) 13233 snapGrid = [0]; 13234 if (spaceBetween !== 0) { 13235 const key = swiper.isHorizontal() && rtl ? "marginLeft" : swiper.getDirectionLabel("marginRight"); 13236 slides.filter((_, slideIndex) => { 13237 if (!params.cssMode || params.loop) 13238 return true; 13239 if (slideIndex === slides.length - 1) { 13240 return false; 13241 } 13242 return true; 13243 }).forEach((slideEl) => { 13244 slideEl.style[key] = `${spaceBetween}px`; 13245 }); 13246 } 13247 if (params.centeredSlides && params.centeredSlidesBounds) { 13248 let allSlidesSize = 0; 13249 slidesSizesGrid.forEach((slideSizeValue) => { 13250 allSlidesSize += slideSizeValue + (spaceBetween || 0); 13251 }); 13252 allSlidesSize -= spaceBetween; 13253 const maxSnap = allSlidesSize > swiperSize ? allSlidesSize - swiperSize : 0; 13254 snapGrid = snapGrid.map((snap) => { 13255 if (snap <= 0) 13256 return -offsetBefore; 13257 if (snap > maxSnap) 13258 return maxSnap + offsetAfter; 13259 return snap; 13260 }); 13261 } 13262 if (params.centerInsufficientSlides) { 13263 let allSlidesSize = 0; 13264 slidesSizesGrid.forEach((slideSizeValue) => { 13265 allSlidesSize += slideSizeValue + (spaceBetween || 0); 13266 }); 13267 allSlidesSize -= spaceBetween; 13268 const offsetSize = (offsetBefore || 0) + (offsetAfter || 0); 13269 if (allSlidesSize + offsetSize < swiperSize) { 13270 const allSlidesOffset = (swiperSize - allSlidesSize - offsetSize) / 2; 13271 snapGrid.forEach((snap, snapIndex) => { 13272 snapGrid[snapIndex] = snap - allSlidesOffset; 13273 }); 13274 slidesGrid.forEach((snap, snapIndex) => { 13275 slidesGrid[snapIndex] = snap + allSlidesOffset; 13276 }); 13277 } 13278 } 13279 Object.assign(swiper, { 13280 slides, 13281 snapGrid, 13282 slidesGrid, 13283 slidesSizesGrid 13284 }); 13285 if (params.centeredSlides && params.cssMode && !params.centeredSlidesBounds) { 13286 setCSSProperty(wrapperEl, "--swiper-centered-offset-before", `${-snapGrid[0]}px`); 13287 setCSSProperty(wrapperEl, "--swiper-centered-offset-after", `${swiper.size / 2 - slidesSizesGrid[slidesSizesGrid.length - 1] / 2}px`); 13288 const addToSnapGrid = -swiper.snapGrid[0]; 13289 const addToSlidesGrid = -swiper.slidesGrid[0]; 13290 swiper.snapGrid = swiper.snapGrid.map((v) => v + addToSnapGrid); 13291 swiper.slidesGrid = swiper.slidesGrid.map((v) => v + addToSlidesGrid); 13292 } 13293 if (slidesLength !== previousSlidesLength) { 13294 swiper.emit("slidesLengthChange"); 13295 } 13296 if (snapGrid.length !== previousSnapGridLength) { 13297 if (swiper.params.watchOverflow) 13298 swiper.checkOverflow(); 13299 swiper.emit("snapGridLengthChange"); 13300 } 13301 if (slidesGrid.length !== previousSlidesGridLength) { 13302 swiper.emit("slidesGridLengthChange"); 13303 } 13304 if (params.watchSlidesProgress) { 13305 swiper.updateSlidesOffset(); 13306 } 13307 swiper.emit("slidesUpdated"); 13308 if (!isVirtual && !params.cssMode && (params.effect === "slide" || params.effect === "fade")) { 13309 const backFaceHiddenClass = `${params.containerModifierClass}backface-hidden`; 13310 const hasClassBackfaceClassAdded = swiper.el.classList.contains(backFaceHiddenClass); 13311 if (slidesLength <= params.maxBackfaceHiddenSlides) { 13312 if (!hasClassBackfaceClassAdded) 13313 swiper.el.classList.add(backFaceHiddenClass); 13314 } else if (hasClassBackfaceClassAdded) { 13315 swiper.el.classList.remove(backFaceHiddenClass); 13316 } 13317 } 13318 } 13319 function updateAutoHeight(speed) { 13320 const swiper = this; 13321 const activeSlides = []; 13322 const isVirtual = swiper.virtual && swiper.params.virtual.enabled; 13323 let newHeight = 0; 13324 let i; 13325 if (typeof speed === "number") { 13326 swiper.setTransition(speed); 13327 } else if (speed === true) { 13328 swiper.setTransition(swiper.params.speed); 13329 } 13330 const getSlideByIndex = (index) => { 13331 if (isVirtual) { 13332 return swiper.slides[swiper.getSlideIndexByData(index)]; 13333 } 13334 return swiper.slides[index]; 13335 }; 13336 if (swiper.params.slidesPerView !== "auto" && swiper.params.slidesPerView > 1) { 13337 if (swiper.params.centeredSlides) { 13338 (swiper.visibleSlides || []).forEach((slide2) => { 13339 activeSlides.push(slide2); 13340 }); 13341 } else { 13342 for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) { 13343 const index = swiper.activeIndex + i; 13344 if (index > swiper.slides.length && !isVirtual) 13345 break; 13346 activeSlides.push(getSlideByIndex(index)); 13347 } 13348 } 13349 } else { 13350 activeSlides.push(getSlideByIndex(swiper.activeIndex)); 13351 } 13352 for (i = 0; i < activeSlides.length; i += 1) { 13353 if (typeof activeSlides[i] !== "undefined") { 13354 const height = activeSlides[i].offsetHeight; 13355 newHeight = height > newHeight ? height : newHeight; 13356 } 13357 } 13358 if (newHeight || newHeight === 0) 13359 swiper.wrapperEl.style.height = `${newHeight}px`; 13360 } 13361 function updateSlidesOffset() { 13362 const swiper = this; 13363 const slides = swiper.slides; 13364 const minusOffset = swiper.isElement ? swiper.isHorizontal() ? swiper.wrapperEl.offsetLeft : swiper.wrapperEl.offsetTop : 0; 13365 for (let i = 0; i < slides.length; i += 1) { 13366 slides[i].swiperSlideOffset = (swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop) - minusOffset - swiper.cssOverflowAdjustment(); 13367 } 13368 } 13369 var toggleSlideClasses$1 = (slideEl, condition, className) => { 13370 if (condition && !slideEl.classList.contains(className)) { 13371 slideEl.classList.add(className); 13372 } else if (!condition && slideEl.classList.contains(className)) { 13373 slideEl.classList.remove(className); 13374 } 13375 }; 13376 function updateSlidesProgress(translate2 = this && this.translate || 0) { 13377 const swiper = this; 13378 const params = swiper.params; 13379 const { 13380 slides, 13381 rtlTranslate: rtl, 13382 snapGrid 13383 } = swiper; 13384 if (slides.length === 0) 13385 return; 13386 if (typeof slides[0].swiperSlideOffset === "undefined") 13387 swiper.updateSlidesOffset(); 13388 let offsetCenter = -translate2; 13389 if (rtl) 13390 offsetCenter = translate2; 13391 swiper.visibleSlidesIndexes = []; 13392 swiper.visibleSlides = []; 13393 let spaceBetween = params.spaceBetween; 13394 if (typeof spaceBetween === "string" && spaceBetween.indexOf("%") >= 0) { 13395 spaceBetween = parseFloat(spaceBetween.replace("%", "")) / 100 * swiper.size; 13396 } else if (typeof spaceBetween === "string") { 13397 spaceBetween = parseFloat(spaceBetween); 13398 } 13399 for (let i = 0; i < slides.length; i += 1) { 13400 const slide2 = slides[i]; 13401 let slideOffset = slide2.swiperSlideOffset; 13402 if (params.cssMode && params.centeredSlides) { 13403 slideOffset -= slides[0].swiperSlideOffset; 13404 } 13405 const slideProgress = (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide2.swiperSlideSize + spaceBetween); 13406 const originalSlideProgress = (offsetCenter - snapGrid[0] + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide2.swiperSlideSize + spaceBetween); 13407 const slideBefore = -(offsetCenter - slideOffset); 13408 const slideAfter = slideBefore + swiper.slidesSizesGrid[i]; 13409 const isFullyVisible = slideBefore >= 0 && slideBefore <= swiper.size - swiper.slidesSizesGrid[i]; 13410 const isVisible = slideBefore >= 0 && slideBefore < swiper.size - 1 || slideAfter > 1 && slideAfter <= swiper.size || slideBefore <= 0 && slideAfter >= swiper.size; 13411 if (isVisible) { 13412 swiper.visibleSlides.push(slide2); 13413 swiper.visibleSlidesIndexes.push(i); 13414 } 13415 toggleSlideClasses$1(slide2, isVisible, params.slideVisibleClass); 13416 toggleSlideClasses$1(slide2, isFullyVisible, params.slideFullyVisibleClass); 13417 slide2.progress = rtl ? -slideProgress : slideProgress; 13418 slide2.originalProgress = rtl ? -originalSlideProgress : originalSlideProgress; 13419 } 13420 } 13421 function updateProgress(translate2) { 13422 const swiper = this; 13423 if (typeof translate2 === "undefined") { 13424 const multiplier = swiper.rtlTranslate ? -1 : 1; 13425 translate2 = swiper && swiper.translate && swiper.translate * multiplier || 0; 13426 } 13427 const params = swiper.params; 13428 const translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); 13429 let { 13430 progress, 13431 isBeginning, 13432 isEnd, 13433 progressLoop 13434 } = swiper; 13435 const wasBeginning = isBeginning; 13436 const wasEnd = isEnd; 13437 if (translatesDiff === 0) { 13438 progress = 0; 13439 isBeginning = true; 13440 isEnd = true; 13441 } else { 13442 progress = (translate2 - swiper.minTranslate()) / translatesDiff; 13443 const isBeginningRounded = Math.abs(translate2 - swiper.minTranslate()) < 1; 13444 const isEndRounded = Math.abs(translate2 - swiper.maxTranslate()) < 1; 13445 isBeginning = isBeginningRounded || progress <= 0; 13446 isEnd = isEndRounded || progress >= 1; 13447 if (isBeginningRounded) 13448 progress = 0; 13449 if (isEndRounded) 13450 progress = 1; 13451 } 13452 if (params.loop) { 13453 const firstSlideIndex = swiper.getSlideIndexByData(0); 13454 const lastSlideIndex = swiper.getSlideIndexByData(swiper.slides.length - 1); 13455 const firstSlideTranslate = swiper.slidesGrid[firstSlideIndex]; 13456 const lastSlideTranslate = swiper.slidesGrid[lastSlideIndex]; 13457 const translateMax = swiper.slidesGrid[swiper.slidesGrid.length - 1]; 13458 const translateAbs = Math.abs(translate2); 13459 if (translateAbs >= firstSlideTranslate) { 13460 progressLoop = (translateAbs - firstSlideTranslate) / translateMax; 13461 } else { 13462 progressLoop = (translateAbs + translateMax - lastSlideTranslate) / translateMax; 13463 } 13464 if (progressLoop > 1) 13465 progressLoop -= 1; 13466 } 13467 Object.assign(swiper, { 13468 progress, 13469 progressLoop, 13470 isBeginning, 13471 isEnd 13472 }); 13473 if (params.watchSlidesProgress || params.centeredSlides && params.autoHeight) 13474 swiper.updateSlidesProgress(translate2); 13475 if (isBeginning && !wasBeginning) { 13476 swiper.emit("reachBeginning toEdge"); 13477 } 13478 if (isEnd && !wasEnd) { 13479 swiper.emit("reachEnd toEdge"); 13480 } 13481 if (wasBeginning && !isBeginning || wasEnd && !isEnd) { 13482 swiper.emit("fromEdge"); 13483 } 13484 swiper.emit("progress", progress); 13485 } 13486 var toggleSlideClasses = (slideEl, condition, className) => { 13487 if (condition && !slideEl.classList.contains(className)) { 13488 slideEl.classList.add(className); 13489 } else if (!condition && slideEl.classList.contains(className)) { 13490 slideEl.classList.remove(className); 13491 } 13492 }; 13493 function updateSlidesClasses() { 13494 const swiper = this; 13495 const { 13496 slides, 13497 params, 13498 slidesEl, 13499 activeIndex 13500 } = swiper; 13501 const isVirtual = swiper.virtual && params.virtual.enabled; 13502 const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1; 13503 const getFilteredSlide = (selector) => { 13504 return elementChildren(slidesEl, `.${params.slideClass}${selector}, swiper-slide${selector}`)[0]; 13505 }; 13506 let activeSlide; 13507 let prevSlide; 13508 let nextSlide; 13509 if (isVirtual) { 13510 if (params.loop) { 13511 let slideIndex = activeIndex - swiper.virtual.slidesBefore; 13512 if (slideIndex < 0) 13513 slideIndex = swiper.virtual.slides.length + slideIndex; 13514 if (slideIndex >= swiper.virtual.slides.length) 13515 slideIndex -= swiper.virtual.slides.length; 13516 activeSlide = getFilteredSlide(`[data-swiper-slide-index="${slideIndex}"]`); 13517 } else { 13518 activeSlide = getFilteredSlide(`[data-swiper-slide-index="${activeIndex}"]`); 13519 } 13520 } else { 13521 if (gridEnabled) { 13522 activeSlide = slides.find((slideEl) => slideEl.column === activeIndex); 13523 nextSlide = slides.find((slideEl) => slideEl.column === activeIndex + 1); 13524 prevSlide = slides.find((slideEl) => slideEl.column === activeIndex - 1); 13525 } else { 13526 activeSlide = slides[activeIndex]; 13527 } 13528 } 13529 if (activeSlide) { 13530 if (!gridEnabled) { 13531 nextSlide = elementNextAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0]; 13532 if (params.loop && !nextSlide) { 13533 nextSlide = slides[0]; 13534 } 13535 prevSlide = elementPrevAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0]; 13536 if (params.loop && !prevSlide === 0) { 13537 prevSlide = slides[slides.length - 1]; 13538 } 13539 } 13540 } 13541 slides.forEach((slideEl) => { 13542 toggleSlideClasses(slideEl, slideEl === activeSlide, params.slideActiveClass); 13543 toggleSlideClasses(slideEl, slideEl === nextSlide, params.slideNextClass); 13544 toggleSlideClasses(slideEl, slideEl === prevSlide, params.slidePrevClass); 13545 }); 13546 swiper.emitSlidesClasses(); 13547 } 13548 var processLazyPreloader = (swiper, imageEl) => { 13549 if (!swiper || swiper.destroyed || !swiper.params) 13550 return; 13551 const slideSelector = () => swiper.isElement ? `swiper-slide` : `.${swiper.params.slideClass}`; 13552 const slideEl = imageEl.closest(slideSelector()); 13553 if (slideEl) { 13554 let lazyEl = slideEl.querySelector(`.${swiper.params.lazyPreloaderClass}`); 13555 if (!lazyEl && swiper.isElement) { 13556 if (slideEl.shadowRoot) { 13557 lazyEl = slideEl.shadowRoot.querySelector(`.${swiper.params.lazyPreloaderClass}`); 13558 } else { 13559 requestAnimationFrame(() => { 13560 if (slideEl.shadowRoot) { 13561 lazyEl = slideEl.shadowRoot.querySelector(`.${swiper.params.lazyPreloaderClass}`); 13562 if (lazyEl) 13563 lazyEl.remove(); 13564 } 13565 }); 13566 } 13567 } 13568 if (lazyEl) 13569 lazyEl.remove(); 13570 } 13571 }; 13572 var unlazy = (swiper, index) => { 13573 if (!swiper.slides[index]) 13574 return; 13575 const imageEl = swiper.slides[index].querySelector('[loading="lazy"]'); 13576 if (imageEl) 13577 imageEl.removeAttribute("loading"); 13578 }; 13579 var preload = (swiper) => { 13580 if (!swiper || swiper.destroyed || !swiper.params) 13581 return; 13582 let amount = swiper.params.lazyPreloadPrevNext; 13583 const len = swiper.slides.length; 13584 if (!len || !amount || amount < 0) 13585 return; 13586 amount = Math.min(amount, len); 13587 const slidesPerView = swiper.params.slidesPerView === "auto" ? swiper.slidesPerViewDynamic() : Math.ceil(swiper.params.slidesPerView); 13588 const activeIndex = swiper.activeIndex; 13589 if (swiper.params.grid && swiper.params.grid.rows > 1) { 13590 const activeColumn = activeIndex; 13591 const preloadColumns = [activeColumn - amount]; 13592 preloadColumns.push(...Array.from({ 13593 length: amount 13594 }).map((_, i) => { 13595 return activeColumn + slidesPerView + i; 13596 })); 13597 swiper.slides.forEach((slideEl, i) => { 13598 if (preloadColumns.includes(slideEl.column)) 13599 unlazy(swiper, i); 13600 }); 13601 return; 13602 } 13603 const slideIndexLastInView = activeIndex + slidesPerView - 1; 13604 if (swiper.params.rewind || swiper.params.loop) { 13605 for (let i = activeIndex - amount; i <= slideIndexLastInView + amount; i += 1) { 13606 const realIndex = (i % len + len) % len; 13607 if (realIndex < activeIndex || realIndex > slideIndexLastInView) 13608 unlazy(swiper, realIndex); 13609 } 13610 } else { 13611 for (let i = Math.max(activeIndex - amount, 0); i <= Math.min(slideIndexLastInView + amount, len - 1); i += 1) { 13612 if (i !== activeIndex && (i > slideIndexLastInView || i < activeIndex)) { 13613 unlazy(swiper, i); 13614 } 13615 } 13616 } 13617 }; 13618 function getActiveIndexByTranslate(swiper) { 13619 const { 13620 slidesGrid, 13621 params 13622 } = swiper; 13623 const translate2 = swiper.rtlTranslate ? swiper.translate : -swiper.translate; 13624 let activeIndex; 13625 for (let i = 0; i < slidesGrid.length; i += 1) { 13626 if (typeof slidesGrid[i + 1] !== "undefined") { 13627 if (translate2 >= slidesGrid[i] && translate2 < slidesGrid[i + 1] - (slidesGrid[i + 1] - slidesGrid[i]) / 2) { 13628 activeIndex = i; 13629 } else if (translate2 >= slidesGrid[i] && translate2 < slidesGrid[i + 1]) { 13630 activeIndex = i + 1; 13631 } 13632 } else if (translate2 >= slidesGrid[i]) { 13633 activeIndex = i; 13634 } 13635 } 13636 if (params.normalizeSlideIndex) { 13637 if (activeIndex < 0 || typeof activeIndex === "undefined") 13638 activeIndex = 0; 13639 } 13640 return activeIndex; 13641 } 13642 function updateActiveIndex(newActiveIndex) { 13643 const swiper = this; 13644 const translate2 = swiper.rtlTranslate ? swiper.translate : -swiper.translate; 13645 const { 13646 snapGrid, 13647 params, 13648 activeIndex: previousIndex, 13649 realIndex: previousRealIndex, 13650 snapIndex: previousSnapIndex 13651 } = swiper; 13652 let activeIndex = newActiveIndex; 13653 let snapIndex; 13654 const getVirtualRealIndex = (aIndex) => { 13655 let realIndex2 = aIndex - swiper.virtual.slidesBefore; 13656 if (realIndex2 < 0) { 13657 realIndex2 = swiper.virtual.slides.length + realIndex2; 13658 } 13659 if (realIndex2 >= swiper.virtual.slides.length) { 13660 realIndex2 -= swiper.virtual.slides.length; 13661 } 13662 return realIndex2; 13663 }; 13664 if (typeof activeIndex === "undefined") { 13665 activeIndex = getActiveIndexByTranslate(swiper); 13666 } 13667 if (snapGrid.indexOf(translate2) >= 0) { 13668 snapIndex = snapGrid.indexOf(translate2); 13669 } else { 13670 const skip = Math.min(params.slidesPerGroupSkip, activeIndex); 13671 snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup); 13672 } 13673 if (snapIndex >= snapGrid.length) 13674 snapIndex = snapGrid.length - 1; 13675 if (activeIndex === previousIndex && !swiper.params.loop) { 13676 if (snapIndex !== previousSnapIndex) { 13677 swiper.snapIndex = snapIndex; 13678 swiper.emit("snapIndexChange"); 13679 } 13680 return; 13681 } 13682 if (activeIndex === previousIndex && swiper.params.loop && swiper.virtual && swiper.params.virtual.enabled) { 13683 swiper.realIndex = getVirtualRealIndex(activeIndex); 13684 return; 13685 } 13686 const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1; 13687 let realIndex; 13688 if (swiper.virtual && params.virtual.enabled && params.loop) { 13689 realIndex = getVirtualRealIndex(activeIndex); 13690 } else if (gridEnabled) { 13691 const firstSlideInColumn = swiper.slides.find((slideEl) => slideEl.column === activeIndex); 13692 let activeSlideIndex = parseInt(firstSlideInColumn.getAttribute("data-swiper-slide-index"), 10); 13693 if (Number.isNaN(activeSlideIndex)) { 13694 activeSlideIndex = Math.max(swiper.slides.indexOf(firstSlideInColumn), 0); 13695 } 13696 realIndex = Math.floor(activeSlideIndex / params.grid.rows); 13697 } else if (swiper.slides[activeIndex]) { 13698 const slideIndex = swiper.slides[activeIndex].getAttribute("data-swiper-slide-index"); 13699 if (slideIndex) { 13700 realIndex = parseInt(slideIndex, 10); 13701 } else { 13702 realIndex = activeIndex; 13703 } 13704 } else { 13705 realIndex = activeIndex; 13706 } 13707 Object.assign(swiper, { 13708 previousSnapIndex, 13709 snapIndex, 13710 previousRealIndex, 13711 realIndex, 13712 previousIndex, 13713 activeIndex 13714 }); 13715 if (swiper.initialized) { 13716 preload(swiper); 13717 } 13718 swiper.emit("activeIndexChange"); 13719 swiper.emit("snapIndexChange"); 13720 if (swiper.initialized || swiper.params.runCallbacksOnInit) { 13721 if (previousRealIndex !== realIndex) { 13722 swiper.emit("realIndexChange"); 13723 } 13724 swiper.emit("slideChange"); 13725 } 13726 } 13727 function updateClickedSlide(el, path) { 13728 const swiper = this; 13729 const params = swiper.params; 13730 let slide2 = el.closest(`.${params.slideClass}, swiper-slide`); 13731 if (!slide2 && swiper.isElement && path && path.length > 1 && path.includes(el)) { 13732 [...path.slice(path.indexOf(el) + 1, path.length)].forEach((pathEl) => { 13733 if (!slide2 && pathEl.matches && pathEl.matches(`.${params.slideClass}, swiper-slide`)) { 13734 slide2 = pathEl; 13735 } 13736 }); 13737 } 13738 let slideFound = false; 13739 let slideIndex; 13740 if (slide2) { 13741 for (let i = 0; i < swiper.slides.length; i += 1) { 13742 if (swiper.slides[i] === slide2) { 13743 slideFound = true; 13744 slideIndex = i; 13745 break; 13746 } 13747 } 13748 } 13749 if (slide2 && slideFound) { 13750 swiper.clickedSlide = slide2; 13751 if (swiper.virtual && swiper.params.virtual.enabled) { 13752 swiper.clickedIndex = parseInt(slide2.getAttribute("data-swiper-slide-index"), 10); 13753 } else { 13754 swiper.clickedIndex = slideIndex; 13755 } 13756 } else { 13757 swiper.clickedSlide = void 0; 13758 swiper.clickedIndex = void 0; 13759 return; 13760 } 13761 if (params.slideToClickedSlide && swiper.clickedIndex !== void 0 && swiper.clickedIndex !== swiper.activeIndex) { 13762 swiper.slideToClickedSlide(); 13763 } 13764 } 13765 var update = { 13766 updateSize, 13767 updateSlides, 13768 updateAutoHeight, 13769 updateSlidesOffset, 13770 updateSlidesProgress, 13771 updateProgress, 13772 updateSlidesClasses, 13773 updateActiveIndex, 13774 updateClickedSlide 13775 }; 13776 function getSwiperTranslate(axis = this.isHorizontal() ? "x" : "y") { 13777 const swiper = this; 13778 const { 13779 params, 13780 rtlTranslate: rtl, 13781 translate: translate2, 13782 wrapperEl 13783 } = swiper; 13784 if (params.virtualTranslate) { 13785 return rtl ? -translate2 : translate2; 13786 } 13787 if (params.cssMode) { 13788 return translate2; 13789 } 13790 let currentTranslate = getTranslate(wrapperEl, axis); 13791 currentTranslate += swiper.cssOverflowAdjustment(); 13792 if (rtl) 13793 currentTranslate = -currentTranslate; 13794 return currentTranslate || 0; 13795 } 13796 function setTranslate(translate2, byController) { 13797 const swiper = this; 13798 const { 13799 rtlTranslate: rtl, 13800 params, 13801 wrapperEl, 13802 progress 13803 } = swiper; 13804 let x = 0; 13805 let y = 0; 13806 const z = 0; 13807 if (swiper.isHorizontal()) { 13808 x = rtl ? -translate2 : translate2; 13809 } else { 13810 y = translate2; 13811 } 13812 if (params.roundLengths) { 13813 x = Math.floor(x); 13814 y = Math.floor(y); 13815 } 13816 swiper.previousTranslate = swiper.translate; 13817 swiper.translate = swiper.isHorizontal() ? x : y; 13818 if (params.cssMode) { 13819 wrapperEl[swiper.isHorizontal() ? "scrollLeft" : "scrollTop"] = swiper.isHorizontal() ? -x : -y; 13820 } else if (!params.virtualTranslate) { 13821 if (swiper.isHorizontal()) { 13822 x -= swiper.cssOverflowAdjustment(); 13823 } else { 13824 y -= swiper.cssOverflowAdjustment(); 13825 } 13826 wrapperEl.style.transform = `translate3d(${x}px, ${y}px, ${z}px)`; 13827 } 13828 let newProgress; 13829 const translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); 13830 if (translatesDiff === 0) { 13831 newProgress = 0; 13832 } else { 13833 newProgress = (translate2 - swiper.minTranslate()) / translatesDiff; 13834 } 13835 if (newProgress !== progress) { 13836 swiper.updateProgress(translate2); 13837 } 13838 swiper.emit("setTranslate", swiper.translate, byController); 13839 } 13840 function minTranslate() { 13841 return -this.snapGrid[0]; 13842 } 13843 function maxTranslate() { 13844 return -this.snapGrid[this.snapGrid.length - 1]; 13845 } 13846 function translateTo(translate2 = 0, speed = this.params.speed, runCallbacks = true, translateBounds = true, internal) { 13847 const swiper = this; 13848 const { 13849 params, 13850 wrapperEl 13851 } = swiper; 13852 if (swiper.animating && params.preventInteractionOnTransition) { 13853 return false; 13854 } 13855 const minTranslate2 = swiper.minTranslate(); 13856 const maxTranslate2 = swiper.maxTranslate(); 13857 let newTranslate; 13858 if (translateBounds && translate2 > minTranslate2) 13859 newTranslate = minTranslate2; 13860 else if (translateBounds && translate2 < maxTranslate2) 13861 newTranslate = maxTranslate2; 13862 else 13863 newTranslate = translate2; 13864 swiper.updateProgress(newTranslate); 13865 if (params.cssMode) { 13866 const isH = swiper.isHorizontal(); 13867 if (speed === 0) { 13868 wrapperEl[isH ? "scrollLeft" : "scrollTop"] = -newTranslate; 13869 } else { 13870 if (!swiper.support.smoothScroll) { 13871 animateCSSModeScroll({ 13872 swiper, 13873 targetPosition: -newTranslate, 13874 side: isH ? "left" : "top" 13875 }); 13876 return true; 13877 } 13878 wrapperEl.scrollTo({ 13879 [isH ? "left" : "top"]: -newTranslate, 13880 behavior: "smooth" 13881 }); 13882 } 13883 return true; 13884 } 13885 if (speed === 0) { 13886 swiper.setTransition(0); 13887 swiper.setTranslate(newTranslate); 13888 if (runCallbacks) { 13889 swiper.emit("beforeTransitionStart", speed, internal); 13890 swiper.emit("transitionEnd"); 13891 } 13892 } else { 13893 swiper.setTransition(speed); 13894 swiper.setTranslate(newTranslate); 13895 if (runCallbacks) { 13896 swiper.emit("beforeTransitionStart", speed, internal); 13897 swiper.emit("transitionStart"); 13898 } 13899 if (!swiper.animating) { 13900 swiper.animating = true; 13901 if (!swiper.onTranslateToWrapperTransitionEnd) { 13902 swiper.onTranslateToWrapperTransitionEnd = function transitionEnd2(e) { 13903 if (!swiper || swiper.destroyed) 13904 return; 13905 if (e.target !== this) 13906 return; 13907 swiper.wrapperEl.removeEventListener("transitionend", swiper.onTranslateToWrapperTransitionEnd); 13908 swiper.onTranslateToWrapperTransitionEnd = null; 13909 delete swiper.onTranslateToWrapperTransitionEnd; 13910 swiper.animating = false; 13911 if (runCallbacks) { 13912 swiper.emit("transitionEnd"); 13913 } 13914 }; 13915 } 13916 swiper.wrapperEl.addEventListener("transitionend", swiper.onTranslateToWrapperTransitionEnd); 13917 } 13918 } 13919 return true; 13920 } 13921 var translate = { 13922 getTranslate: getSwiperTranslate, 13923 setTranslate, 13924 minTranslate, 13925 maxTranslate, 13926 translateTo 13927 }; 13928 function setTransition(duration, byController) { 13929 const swiper = this; 13930 if (!swiper.params.cssMode) { 13931 swiper.wrapperEl.style.transitionDuration = `${duration}ms`; 13932 swiper.wrapperEl.style.transitionDelay = duration === 0 ? `0ms` : ""; 13933 } 13934 swiper.emit("setTransition", duration, byController); 13935 } 13936 function transitionEmit({ 13937 swiper, 13938 runCallbacks, 13939 direction, 13940 step 13941 }) { 13942 const { 13943 activeIndex, 13944 previousIndex 13945 } = swiper; 13946 let dir = direction; 13947 if (!dir) { 13948 if (activeIndex > previousIndex) 13949 dir = "next"; 13950 else if (activeIndex < previousIndex) 13951 dir = "prev"; 13952 else 13953 dir = "reset"; 13954 } 13955 swiper.emit(`transition${step}`); 13956 if (runCallbacks && dir === "reset") { 13957 swiper.emit(`slideResetTransition${step}`); 13958 } else if (runCallbacks && activeIndex !== previousIndex) { 13959 swiper.emit(`slideChangeTransition${step}`); 13960 if (dir === "next") { 13961 swiper.emit(`slideNextTransition${step}`); 13962 } else { 13963 swiper.emit(`slidePrevTransition${step}`); 13964 } 13965 } 13966 } 13967 function transitionStart(runCallbacks = true, direction) { 13968 const swiper = this; 13969 const { 13970 params 13971 } = swiper; 13972 if (params.cssMode) 13973 return; 13974 if (params.autoHeight) { 13975 swiper.updateAutoHeight(); 13976 } 13977 transitionEmit({ 13978 swiper, 13979 runCallbacks, 13980 direction, 13981 step: "Start" 13982 }); 13983 } 13984 function transitionEnd(runCallbacks = true, direction) { 13985 const swiper = this; 13986 const { 13987 params 13988 } = swiper; 13989 swiper.animating = false; 13990 if (params.cssMode) 13991 return; 13992 swiper.setTransition(0); 13993 transitionEmit({ 13994 swiper, 13995 runCallbacks, 13996 direction, 13997 step: "End" 13998 }); 13999 } 14000 var transition = { 14001 setTransition, 14002 transitionStart, 14003 transitionEnd 14004 }; 14005 function slideTo(index = 0, speed, runCallbacks = true, internal, initial) { 14006 if (typeof index === "string") { 14007 index = parseInt(index, 10); 14008 } 14009 const swiper = this; 14010 let slideIndex = index; 14011 if (slideIndex < 0) 14012 slideIndex = 0; 14013 const { 14014 params, 14015 snapGrid, 14016 slidesGrid, 14017 previousIndex, 14018 activeIndex, 14019 rtlTranslate: rtl, 14020 wrapperEl, 14021 enabled 14022 } = swiper; 14023 if (!enabled && !internal && !initial || swiper.destroyed || swiper.animating && params.preventInteractionOnTransition) { 14024 return false; 14025 } 14026 if (typeof speed === "undefined") { 14027 speed = swiper.params.speed; 14028 } 14029 const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex); 14030 let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup); 14031 if (snapIndex >= snapGrid.length) 14032 snapIndex = snapGrid.length - 1; 14033 const translate2 = -snapGrid[snapIndex]; 14034 if (params.normalizeSlideIndex) { 14035 for (let i = 0; i < slidesGrid.length; i += 1) { 14036 const normalizedTranslate = -Math.floor(translate2 * 100); 14037 const normalizedGrid = Math.floor(slidesGrid[i] * 100); 14038 const normalizedGridNext = Math.floor(slidesGrid[i + 1] * 100); 14039 if (typeof slidesGrid[i + 1] !== "undefined") { 14040 if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext - (normalizedGridNext - normalizedGrid) / 2) { 14041 slideIndex = i; 14042 } else if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext) { 14043 slideIndex = i + 1; 14044 } 14045 } else if (normalizedTranslate >= normalizedGrid) { 14046 slideIndex = i; 14047 } 14048 } 14049 } 14050 if (swiper.initialized && slideIndex !== activeIndex) { 14051 if (!swiper.allowSlideNext && (rtl ? translate2 > swiper.translate && translate2 > swiper.minTranslate() : translate2 < swiper.translate && translate2 < swiper.minTranslate())) { 14052 return false; 14053 } 14054 if (!swiper.allowSlidePrev && translate2 > swiper.translate && translate2 > swiper.maxTranslate()) { 14055 if ((activeIndex || 0) !== slideIndex) { 14056 return false; 14057 } 14058 } 14059 } 14060 if (slideIndex !== (previousIndex || 0) && runCallbacks) { 14061 swiper.emit("beforeSlideChangeStart"); 14062 } 14063 swiper.updateProgress(translate2); 14064 let direction; 14065 if (slideIndex > activeIndex) 14066 direction = "next"; 14067 else if (slideIndex < activeIndex) 14068 direction = "prev"; 14069 else 14070 direction = "reset"; 14071 const isVirtual = swiper.virtual && swiper.params.virtual.enabled; 14072 const isInitialVirtual = isVirtual && initial; 14073 if (!isInitialVirtual && (rtl && -translate2 === swiper.translate || !rtl && translate2 === swiper.translate)) { 14074 swiper.updateActiveIndex(slideIndex); 14075 if (params.autoHeight) { 14076 swiper.updateAutoHeight(); 14077 } 14078 swiper.updateSlidesClasses(); 14079 if (params.effect !== "slide") { 14080 swiper.setTranslate(translate2); 14081 } 14082 if (direction !== "reset") { 14083 swiper.transitionStart(runCallbacks, direction); 14084 swiper.transitionEnd(runCallbacks, direction); 14085 } 14086 return false; 14087 } 14088 if (params.cssMode) { 14089 const isH = swiper.isHorizontal(); 14090 const t = rtl ? translate2 : -translate2; 14091 if (speed === 0) { 14092 if (isVirtual) { 14093 swiper.wrapperEl.style.scrollSnapType = "none"; 14094 swiper._immediateVirtual = true; 14095 } 14096 if (isVirtual && !swiper._cssModeVirtualInitialSet && swiper.params.initialSlide > 0) { 14097 swiper._cssModeVirtualInitialSet = true; 14098 requestAnimationFrame(() => { 14099 wrapperEl[isH ? "scrollLeft" : "scrollTop"] = t; 14100 }); 14101 } else { 14102 wrapperEl[isH ? "scrollLeft" : "scrollTop"] = t; 14103 } 14104 if (isVirtual) { 14105 requestAnimationFrame(() => { 14106 swiper.wrapperEl.style.scrollSnapType = ""; 14107 swiper._immediateVirtual = false; 14108 }); 14109 } 14110 } else { 14111 if (!swiper.support.smoothScroll) { 14112 animateCSSModeScroll({ 14113 swiper, 14114 targetPosition: t, 14115 side: isH ? "left" : "top" 14116 }); 14117 return true; 14118 } 14119 wrapperEl.scrollTo({ 14120 [isH ? "left" : "top"]: t, 14121 behavior: "smooth" 14122 }); 14123 } 14124 return true; 14125 } 14126 const browser2 = getBrowser(); 14127 const isSafari = browser2.isSafari; 14128 if (isVirtual && !initial && isSafari && swiper.isElement) { 14129 swiper.virtual.update(false, false, slideIndex); 14130 } 14131 swiper.setTransition(speed); 14132 swiper.setTranslate(translate2); 14133 swiper.updateActiveIndex(slideIndex); 14134 swiper.updateSlidesClasses(); 14135 swiper.emit("beforeTransitionStart", speed, internal); 14136 swiper.transitionStart(runCallbacks, direction); 14137 if (speed === 0) { 14138 swiper.transitionEnd(runCallbacks, direction); 14139 } else if (!swiper.animating) { 14140 swiper.animating = true; 14141 if (!swiper.onSlideToWrapperTransitionEnd) { 14142 swiper.onSlideToWrapperTransitionEnd = function transitionEnd2(e) { 14143 if (!swiper || swiper.destroyed) 14144 return; 14145 if (e.target !== this) 14146 return; 14147 swiper.wrapperEl.removeEventListener("transitionend", swiper.onSlideToWrapperTransitionEnd); 14148 swiper.onSlideToWrapperTransitionEnd = null; 14149 delete swiper.onSlideToWrapperTransitionEnd; 14150 swiper.transitionEnd(runCallbacks, direction); 14151 }; 14152 } 14153 swiper.wrapperEl.addEventListener("transitionend", swiper.onSlideToWrapperTransitionEnd); 14154 } 14155 return true; 14156 } 14157 function slideToLoop(index = 0, speed, runCallbacks = true, internal) { 14158 if (typeof index === "string") { 14159 const indexAsNumber = parseInt(index, 10); 14160 index = indexAsNumber; 14161 } 14162 const swiper = this; 14163 if (swiper.destroyed) 14164 return; 14165 if (typeof speed === "undefined") { 14166 speed = swiper.params.speed; 14167 } 14168 const gridEnabled = swiper.grid && swiper.params.grid && swiper.params.grid.rows > 1; 14169 let newIndex = index; 14170 if (swiper.params.loop) { 14171 if (swiper.virtual && swiper.params.virtual.enabled) { 14172 newIndex = newIndex + swiper.virtual.slidesBefore; 14173 } else { 14174 let targetSlideIndex; 14175 if (gridEnabled) { 14176 const slideIndex = newIndex * swiper.params.grid.rows; 14177 targetSlideIndex = swiper.slides.find((slideEl) => slideEl.getAttribute("data-swiper-slide-index") * 1 === slideIndex).column; 14178 } else { 14179 targetSlideIndex = swiper.getSlideIndexByData(newIndex); 14180 } 14181 const cols = gridEnabled ? Math.ceil(swiper.slides.length / swiper.params.grid.rows) : swiper.slides.length; 14182 const { 14183 centeredSlides, 14184 slidesOffsetBefore, 14185 slidesOffsetAfter 14186 } = swiper.params; 14187 const bothDirections = centeredSlides || !!slidesOffsetBefore || !!slidesOffsetAfter; 14188 let slidesPerView = swiper.params.slidesPerView; 14189 if (slidesPerView === "auto") { 14190 slidesPerView = swiper.slidesPerViewDynamic(); 14191 } else { 14192 slidesPerView = Math.ceil(parseFloat(swiper.params.slidesPerView, 10)); 14193 if (bothDirections && slidesPerView % 2 === 0) { 14194 slidesPerView = slidesPerView + 1; 14195 } 14196 } 14197 let needLoopFix = cols - targetSlideIndex < slidesPerView; 14198 if (bothDirections) { 14199 needLoopFix = needLoopFix || targetSlideIndex < Math.ceil(slidesPerView / 2); 14200 } 14201 if (internal && bothDirections && swiper.params.slidesPerView !== "auto" && !gridEnabled) { 14202 needLoopFix = false; 14203 } 14204 if (needLoopFix) { 14205 const direction = bothDirections ? targetSlideIndex < swiper.activeIndex ? "prev" : "next" : targetSlideIndex - swiper.activeIndex - 1 < swiper.params.slidesPerView ? "next" : "prev"; 14206 swiper.loopFix({ 14207 direction, 14208 slideTo: true, 14209 activeSlideIndex: direction === "next" ? targetSlideIndex + 1 : targetSlideIndex - cols + 1, 14210 slideRealIndex: direction === "next" ? swiper.realIndex : void 0 14211 }); 14212 } 14213 if (gridEnabled) { 14214 const slideIndex = newIndex * swiper.params.grid.rows; 14215 newIndex = swiper.slides.find((slideEl) => slideEl.getAttribute("data-swiper-slide-index") * 1 === slideIndex).column; 14216 } else { 14217 newIndex = swiper.getSlideIndexByData(newIndex); 14218 } 14219 } 14220 } 14221 requestAnimationFrame(() => { 14222 swiper.slideTo(newIndex, speed, runCallbacks, internal); 14223 }); 14224 return swiper; 14225 } 14226 function slideNext(speed, runCallbacks = true, internal) { 14227 const swiper = this; 14228 const { 14229 enabled, 14230 params, 14231 animating 14232 } = swiper; 14233 if (!enabled || swiper.destroyed) 14234 return swiper; 14235 if (typeof speed === "undefined") { 14236 speed = swiper.params.speed; 14237 } 14238 let perGroup = params.slidesPerGroup; 14239 if (params.slidesPerView === "auto" && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) { 14240 perGroup = Math.max(swiper.slidesPerViewDynamic("current", true), 1); 14241 } 14242 const increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : perGroup; 14243 const isVirtual = swiper.virtual && params.virtual.enabled; 14244 if (params.loop) { 14245 if (animating && !isVirtual && params.loopPreventsSliding) 14246 return false; 14247 swiper.loopFix({ 14248 direction: "next" 14249 }); 14250 swiper._clientLeft = swiper.wrapperEl.clientLeft; 14251 if (swiper.activeIndex === swiper.slides.length - 1 && params.cssMode) { 14252 requestAnimationFrame(() => { 14253 swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal); 14254 }); 14255 return true; 14256 } 14257 } 14258 if (params.rewind && swiper.isEnd) { 14259 return swiper.slideTo(0, speed, runCallbacks, internal); 14260 } 14261 return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal); 14262 } 14263 function slidePrev(speed, runCallbacks = true, internal) { 14264 const swiper = this; 14265 const { 14266 params, 14267 snapGrid, 14268 slidesGrid, 14269 rtlTranslate, 14270 enabled, 14271 animating 14272 } = swiper; 14273 if (!enabled || swiper.destroyed) 14274 return swiper; 14275 if (typeof speed === "undefined") { 14276 speed = swiper.params.speed; 14277 } 14278 const isVirtual = swiper.virtual && params.virtual.enabled; 14279 if (params.loop) { 14280 if (animating && !isVirtual && params.loopPreventsSliding) 14281 return false; 14282 swiper.loopFix({ 14283 direction: "prev" 14284 }); 14285 swiper._clientLeft = swiper.wrapperEl.clientLeft; 14286 } 14287 const translate2 = rtlTranslate ? swiper.translate : -swiper.translate; 14288 function normalize(val) { 14289 if (val < 0) 14290 return -Math.floor(Math.abs(val)); 14291 return Math.floor(val); 14292 } 14293 const normalizedTranslate = normalize(translate2); 14294 const normalizedSnapGrid = snapGrid.map((val) => normalize(val)); 14295 const isFreeMode = params.freeMode && params.freeMode.enabled; 14296 let prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1]; 14297 if (typeof prevSnap === "undefined" && (params.cssMode || isFreeMode)) { 14298 let prevSnapIndex; 14299 snapGrid.forEach((snap, snapIndex) => { 14300 if (normalizedTranslate >= snap) { 14301 prevSnapIndex = snapIndex; 14302 } 14303 }); 14304 if (typeof prevSnapIndex !== "undefined") { 14305 prevSnap = isFreeMode ? snapGrid[prevSnapIndex] : snapGrid[prevSnapIndex > 0 ? prevSnapIndex - 1 : prevSnapIndex]; 14306 } 14307 } 14308 let prevIndex = 0; 14309 if (typeof prevSnap !== "undefined") { 14310 prevIndex = slidesGrid.indexOf(prevSnap); 14311 if (prevIndex < 0) 14312 prevIndex = swiper.activeIndex - 1; 14313 if (params.slidesPerView === "auto" && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) { 14314 prevIndex = prevIndex - swiper.slidesPerViewDynamic("previous", true) + 1; 14315 prevIndex = Math.max(prevIndex, 0); 14316 } 14317 } 14318 if (params.rewind && swiper.isBeginning) { 14319 const lastIndex = swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1; 14320 return swiper.slideTo(lastIndex, speed, runCallbacks, internal); 14321 } else if (params.loop && swiper.activeIndex === 0 && params.cssMode) { 14322 requestAnimationFrame(() => { 14323 swiper.slideTo(prevIndex, speed, runCallbacks, internal); 14324 }); 14325 return true; 14326 } 14327 return swiper.slideTo(prevIndex, speed, runCallbacks, internal); 14328 } 14329 function slideReset(speed, runCallbacks = true, internal) { 14330 const swiper = this; 14331 if (swiper.destroyed) 14332 return; 14333 if (typeof speed === "undefined") { 14334 speed = swiper.params.speed; 14335 } 14336 return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal); 14337 } 14338 function slideToClosest(speed, runCallbacks = true, internal, threshold = 0.5) { 14339 const swiper = this; 14340 if (swiper.destroyed) 14341 return; 14342 if (typeof speed === "undefined") { 14343 speed = swiper.params.speed; 14344 } 14345 let index = swiper.activeIndex; 14346 const skip = Math.min(swiper.params.slidesPerGroupSkip, index); 14347 const snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup); 14348 const translate2 = swiper.rtlTranslate ? swiper.translate : -swiper.translate; 14349 if (translate2 >= swiper.snapGrid[snapIndex]) { 14350 const currentSnap = swiper.snapGrid[snapIndex]; 14351 const nextSnap = swiper.snapGrid[snapIndex + 1]; 14352 if (translate2 - currentSnap > (nextSnap - currentSnap) * threshold) { 14353 index += swiper.params.slidesPerGroup; 14354 } 14355 } else { 14356 const prevSnap = swiper.snapGrid[snapIndex - 1]; 14357 const currentSnap = swiper.snapGrid[snapIndex]; 14358 if (translate2 - prevSnap <= (currentSnap - prevSnap) * threshold) { 14359 index -= swiper.params.slidesPerGroup; 14360 } 14361 } 14362 index = Math.max(index, 0); 14363 index = Math.min(index, swiper.slidesGrid.length - 1); 14364 return swiper.slideTo(index, speed, runCallbacks, internal); 14365 } 14366 function slideToClickedSlide() { 14367 const swiper = this; 14368 if (swiper.destroyed) 14369 return; 14370 const { 14371 params, 14372 slidesEl 14373 } = swiper; 14374 const slidesPerView = params.slidesPerView === "auto" ? swiper.slidesPerViewDynamic() : params.slidesPerView; 14375 let slideToIndex = swiper.getSlideIndexWhenGrid(swiper.clickedIndex); 14376 let realIndex; 14377 const slideSelector = swiper.isElement ? `swiper-slide` : `.${params.slideClass}`; 14378 const isGrid = swiper.grid && swiper.params.grid && swiper.params.grid.rows > 1; 14379 if (params.loop) { 14380 if (swiper.animating) 14381 return; 14382 realIndex = parseInt(swiper.clickedSlide.getAttribute("data-swiper-slide-index"), 10); 14383 if (params.centeredSlides) { 14384 swiper.slideToLoop(realIndex); 14385 } else if (slideToIndex > (isGrid ? (swiper.slides.length - slidesPerView) / 2 - (swiper.params.grid.rows - 1) : swiper.slides.length - slidesPerView)) { 14386 swiper.loopFix(); 14387 slideToIndex = swiper.getSlideIndex(elementChildren(slidesEl, `${slideSelector}[data-swiper-slide-index="${realIndex}"]`)[0]); 14388 nextTick(() => { 14389 swiper.slideTo(slideToIndex); 14390 }); 14391 } else { 14392 swiper.slideTo(slideToIndex); 14393 } 14394 } else { 14395 swiper.slideTo(slideToIndex); 14396 } 14397 } 14398 var slide = { 14399 slideTo, 14400 slideToLoop, 14401 slideNext, 14402 slidePrev, 14403 slideReset, 14404 slideToClosest, 14405 slideToClickedSlide 14406 }; 14407 function loopCreate(slideRealIndex, initial) { 14408 const swiper = this; 14409 const { 14410 params, 14411 slidesEl 14412 } = swiper; 14413 if (!params.loop || swiper.virtual && swiper.params.virtual.enabled) 14414 return; 14415 const initSlides = () => { 14416 const slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`); 14417 slides.forEach((el, index) => { 14418 el.setAttribute("data-swiper-slide-index", index); 14419 }); 14420 }; 14421 const clearBlankSlides = () => { 14422 const slides = elementChildren(slidesEl, `.${params.slideBlankClass}`); 14423 slides.forEach((el) => { 14424 el.remove(); 14425 }); 14426 if (slides.length > 0) { 14427 swiper.recalcSlides(); 14428 swiper.updateSlides(); 14429 } 14430 }; 14431 const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1; 14432 if (params.loopAddBlankSlides && (params.slidesPerGroup > 1 || gridEnabled)) { 14433 clearBlankSlides(); 14434 } 14435 const slidesPerGroup = params.slidesPerGroup * (gridEnabled ? params.grid.rows : 1); 14436 const shouldFillGroup = swiper.slides.length % slidesPerGroup !== 0; 14437 const shouldFillGrid = gridEnabled && swiper.slides.length % params.grid.rows !== 0; 14438 const addBlankSlides = (amountOfSlides) => { 14439 for (let i = 0; i < amountOfSlides; i += 1) { 14440 const slideEl = swiper.isElement ? createElement("swiper-slide", [params.slideBlankClass]) : createElement("div", [params.slideClass, params.slideBlankClass]); 14441 swiper.slidesEl.append(slideEl); 14442 } 14443 }; 14444 if (shouldFillGroup) { 14445 if (params.loopAddBlankSlides) { 14446 const slidesToAdd = slidesPerGroup - swiper.slides.length % slidesPerGroup; 14447 addBlankSlides(slidesToAdd); 14448 swiper.recalcSlides(); 14449 swiper.updateSlides(); 14450 } else { 14451 showWarning("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)"); 14452 } 14453 initSlides(); 14454 } else if (shouldFillGrid) { 14455 if (params.loopAddBlankSlides) { 14456 const slidesToAdd = params.grid.rows - swiper.slides.length % params.grid.rows; 14457 addBlankSlides(slidesToAdd); 14458 swiper.recalcSlides(); 14459 swiper.updateSlides(); 14460 } else { 14461 showWarning("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)"); 14462 } 14463 initSlides(); 14464 } else { 14465 initSlides(); 14466 } 14467 const bothDirections = params.centeredSlides || !!params.slidesOffsetBefore || !!params.slidesOffsetAfter; 14468 swiper.loopFix({ 14469 slideRealIndex, 14470 direction: bothDirections ? void 0 : "next", 14471 initial 14472 }); 14473 } 14474 function loopFix({ 14475 slideRealIndex, 14476 slideTo: slideTo2 = true, 14477 direction, 14478 setTranslate: setTranslate2, 14479 activeSlideIndex, 14480 initial, 14481 byController, 14482 byMousewheel 14483 } = {}) { 14484 const swiper = this; 14485 if (!swiper.params.loop) 14486 return; 14487 swiper.emit("beforeLoopFix"); 14488 const { 14489 slides, 14490 allowSlidePrev, 14491 allowSlideNext, 14492 slidesEl, 14493 params 14494 } = swiper; 14495 const { 14496 centeredSlides, 14497 slidesOffsetBefore, 14498 slidesOffsetAfter, 14499 initialSlide 14500 } = params; 14501 const bothDirections = centeredSlides || !!slidesOffsetBefore || !!slidesOffsetAfter; 14502 swiper.allowSlidePrev = true; 14503 swiper.allowSlideNext = true; 14504 if (swiper.virtual && params.virtual.enabled) { 14505 if (slideTo2) { 14506 if (!bothDirections && swiper.snapIndex === 0) { 14507 swiper.slideTo(swiper.virtual.slides.length, 0, false, true); 14508 } else if (bothDirections && swiper.snapIndex < params.slidesPerView) { 14509 swiper.slideTo(swiper.virtual.slides.length + swiper.snapIndex, 0, false, true); 14510 } else if (swiper.snapIndex === swiper.snapGrid.length - 1) { 14511 swiper.slideTo(swiper.virtual.slidesBefore, 0, false, true); 14512 } 14513 } 14514 swiper.allowSlidePrev = allowSlidePrev; 14515 swiper.allowSlideNext = allowSlideNext; 14516 swiper.emit("loopFix"); 14517 return; 14518 } 14519 let slidesPerView = params.slidesPerView; 14520 if (slidesPerView === "auto") { 14521 slidesPerView = swiper.slidesPerViewDynamic(); 14522 } else { 14523 slidesPerView = Math.ceil(parseFloat(params.slidesPerView, 10)); 14524 if (bothDirections && slidesPerView % 2 === 0) { 14525 slidesPerView = slidesPerView + 1; 14526 } 14527 } 14528 const slidesPerGroup = params.slidesPerGroupAuto ? slidesPerView : params.slidesPerGroup; 14529 let loopedSlides = bothDirections ? Math.max(slidesPerGroup, Math.ceil(slidesPerView / 2)) : slidesPerGroup; 14530 if (loopedSlides % slidesPerGroup !== 0) { 14531 loopedSlides += slidesPerGroup - loopedSlides % slidesPerGroup; 14532 } 14533 loopedSlides += params.loopAdditionalSlides; 14534 swiper.loopedSlides = loopedSlides; 14535 const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1; 14536 if (slides.length < slidesPerView + loopedSlides || swiper.params.effect === "cards" && slides.length < slidesPerView + loopedSlides * 2) { 14537 showWarning("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"); 14538 } else if (gridEnabled && params.grid.fill === "row") { 14539 showWarning("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`"); 14540 } 14541 const prependSlidesIndexes = []; 14542 const appendSlidesIndexes = []; 14543 const cols = gridEnabled ? Math.ceil(slides.length / params.grid.rows) : slides.length; 14544 const isInitialOverflow = initial && cols - initialSlide < slidesPerView && !bothDirections; 14545 let activeIndex = isInitialOverflow ? initialSlide : swiper.activeIndex; 14546 if (typeof activeSlideIndex === "undefined") { 14547 activeSlideIndex = swiper.getSlideIndex(slides.find((el) => el.classList.contains(params.slideActiveClass))); 14548 } else { 14549 activeIndex = activeSlideIndex; 14550 } 14551 const isNext = direction === "next" || !direction; 14552 const isPrev = direction === "prev" || !direction; 14553 let slidesPrepended = 0; 14554 let slidesAppended = 0; 14555 const activeColIndex = gridEnabled ? slides[activeSlideIndex].column : activeSlideIndex; 14556 const activeColIndexWithShift = activeColIndex + (bothDirections && typeof setTranslate2 === "undefined" ? -slidesPerView / 2 + 0.5 : 0); 14557 if (activeColIndexWithShift < loopedSlides) { 14558 slidesPrepended = Math.max(loopedSlides - activeColIndexWithShift, slidesPerGroup); 14559 for (let i = 0; i < loopedSlides - activeColIndexWithShift; i += 1) { 14560 const index = i - Math.floor(i / cols) * cols; 14561 if (gridEnabled) { 14562 const colIndexToPrepend = cols - index - 1; 14563 for (let i2 = slides.length - 1; i2 >= 0; i2 -= 1) { 14564 if (slides[i2].column === colIndexToPrepend) 14565 prependSlidesIndexes.push(i2); 14566 } 14567 } else { 14568 prependSlidesIndexes.push(cols - index - 1); 14569 } 14570 } 14571 } else if (activeColIndexWithShift + slidesPerView > cols - loopedSlides) { 14572 slidesAppended = Math.max(activeColIndexWithShift - (cols - loopedSlides * 2), slidesPerGroup); 14573 if (isInitialOverflow) { 14574 slidesAppended = Math.max(slidesAppended, slidesPerView - cols + initialSlide + 1); 14575 } 14576 for (let i = 0; i < slidesAppended; i += 1) { 14577 const index = i - Math.floor(i / cols) * cols; 14578 if (gridEnabled) { 14579 slides.forEach((slide2, slideIndex) => { 14580 if (slide2.column === index) 14581 appendSlidesIndexes.push(slideIndex); 14582 }); 14583 } else { 14584 appendSlidesIndexes.push(index); 14585 } 14586 } 14587 } 14588 swiper.__preventObserver__ = true; 14589 requestAnimationFrame(() => { 14590 swiper.__preventObserver__ = false; 14591 }); 14592 if (swiper.params.effect === "cards" && slides.length < slidesPerView + loopedSlides * 2) { 14593 if (appendSlidesIndexes.includes(activeSlideIndex)) { 14594 appendSlidesIndexes.splice(appendSlidesIndexes.indexOf(activeSlideIndex), 1); 14595 } 14596 if (prependSlidesIndexes.includes(activeSlideIndex)) { 14597 prependSlidesIndexes.splice(prependSlidesIndexes.indexOf(activeSlideIndex), 1); 14598 } 14599 } 14600 if (isPrev) { 14601 prependSlidesIndexes.forEach((index) => { 14602 slides[index].swiperLoopMoveDOM = true; 14603 slidesEl.prepend(slides[index]); 14604 slides[index].swiperLoopMoveDOM = false; 14605 }); 14606 } 14607 if (isNext) { 14608 appendSlidesIndexes.forEach((index) => { 14609 slides[index].swiperLoopMoveDOM = true; 14610 slidesEl.append(slides[index]); 14611 slides[index].swiperLoopMoveDOM = false; 14612 }); 14613 } 14614 swiper.recalcSlides(); 14615 if (params.slidesPerView === "auto") { 14616 swiper.updateSlides(); 14617 } else if (gridEnabled && (prependSlidesIndexes.length > 0 && isPrev || appendSlidesIndexes.length > 0 && isNext)) { 14618 swiper.slides.forEach((slide2, slideIndex) => { 14619 swiper.grid.updateSlide(slideIndex, slide2, swiper.slides); 14620 }); 14621 } 14622 if (params.watchSlidesProgress) { 14623 swiper.updateSlidesOffset(); 14624 } 14625 if (slideTo2) { 14626 if (prependSlidesIndexes.length > 0 && isPrev) { 14627 if (typeof slideRealIndex === "undefined") { 14628 const currentSlideTranslate = swiper.slidesGrid[activeIndex]; 14629 const newSlideTranslate = swiper.slidesGrid[activeIndex + slidesPrepended]; 14630 const diff = newSlideTranslate - currentSlideTranslate; 14631 if (byMousewheel) { 14632 swiper.setTranslate(swiper.translate - diff); 14633 } else { 14634 swiper.slideTo(activeIndex + Math.ceil(slidesPrepended), 0, false, true); 14635 if (setTranslate2) { 14636 swiper.touchEventsData.startTranslate = swiper.touchEventsData.startTranslate - diff; 14637 swiper.touchEventsData.currentTranslate = swiper.touchEventsData.currentTranslate - diff; 14638 } 14639 } 14640 } else { 14641 if (setTranslate2) { 14642 const shift = gridEnabled ? prependSlidesIndexes.length / params.grid.rows : prependSlidesIndexes.length; 14643 swiper.slideTo(swiper.activeIndex + shift, 0, false, true); 14644 swiper.touchEventsData.currentTranslate = swiper.translate; 14645 } 14646 } 14647 } else if (appendSlidesIndexes.length > 0 && isNext) { 14648 if (typeof slideRealIndex === "undefined") { 14649 const currentSlideTranslate = swiper.slidesGrid[activeIndex]; 14650 const newSlideTranslate = swiper.slidesGrid[activeIndex - slidesAppended]; 14651 const diff = newSlideTranslate - currentSlideTranslate; 14652 if (byMousewheel) { 14653 swiper.setTranslate(swiper.translate - diff); 14654 } else { 14655 swiper.slideTo(activeIndex - slidesAppended, 0, false, true); 14656 if (setTranslate2) { 14657 swiper.touchEventsData.startTranslate = swiper.touchEventsData.startTranslate - diff; 14658 swiper.touchEventsData.currentTranslate = swiper.touchEventsData.currentTranslate - diff; 14659 } 14660 } 14661 } else { 14662 const shift = gridEnabled ? appendSlidesIndexes.length / params.grid.rows : appendSlidesIndexes.length; 14663 swiper.slideTo(swiper.activeIndex - shift, 0, false, true); 14664 } 14665 } 14666 } 14667 swiper.allowSlidePrev = allowSlidePrev; 14668 swiper.allowSlideNext = allowSlideNext; 14669 if (swiper.controller && swiper.controller.control && !byController) { 14670 const loopParams = { 14671 slideRealIndex, 14672 direction, 14673 setTranslate: setTranslate2, 14674 activeSlideIndex, 14675 byController: true 14676 }; 14677 if (Array.isArray(swiper.controller.control)) { 14678 swiper.controller.control.forEach((c) => { 14679 if (!c.destroyed && c.params.loop) 14680 c.loopFix({ 14681 ...loopParams, 14682 slideTo: c.params.slidesPerView === params.slidesPerView ? slideTo2 : false 14683 }); 14684 }); 14685 } else if (swiper.controller.control instanceof swiper.constructor && swiper.controller.control.params.loop) { 14686 swiper.controller.control.loopFix({ 14687 ...loopParams, 14688 slideTo: swiper.controller.control.params.slidesPerView === params.slidesPerView ? slideTo2 : false 14689 }); 14690 } 14691 } 14692 swiper.emit("loopFix"); 14693 } 14694 function loopDestroy() { 14695 const swiper = this; 14696 const { 14697 params, 14698 slidesEl 14699 } = swiper; 14700 if (!params.loop || !slidesEl || swiper.virtual && swiper.params.virtual.enabled) 14701 return; 14702 swiper.recalcSlides(); 14703 const newSlidesOrder = []; 14704 swiper.slides.forEach((slideEl) => { 14705 const index = typeof slideEl.swiperSlideIndex === "undefined" ? slideEl.getAttribute("data-swiper-slide-index") * 1 : slideEl.swiperSlideIndex; 14706 newSlidesOrder[index] = slideEl; 14707 }); 14708 swiper.slides.forEach((slideEl) => { 14709 slideEl.removeAttribute("data-swiper-slide-index"); 14710 }); 14711 newSlidesOrder.forEach((slideEl) => { 14712 slidesEl.append(slideEl); 14713 }); 14714 swiper.recalcSlides(); 14715 swiper.slideTo(swiper.realIndex, 0); 14716 } 14717 var loop = { 14718 loopCreate, 14719 loopFix, 14720 loopDestroy 14721 }; 14722 function setGrabCursor(moving) { 14723 const swiper = this; 14724 if (!swiper.params.simulateTouch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) 14725 return; 14726 const el = swiper.params.touchEventsTarget === "container" ? swiper.el : swiper.wrapperEl; 14727 if (swiper.isElement) { 14728 swiper.__preventObserver__ = true; 14729 } 14730 el.style.cursor = "move"; 14731 el.style.cursor = moving ? "grabbing" : "grab"; 14732 if (swiper.isElement) { 14733 requestAnimationFrame(() => { 14734 swiper.__preventObserver__ = false; 14735 }); 14736 } 14737 } 14738 function unsetGrabCursor() { 14739 const swiper = this; 14740 if (swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) { 14741 return; 14742 } 14743 if (swiper.isElement) { 14744 swiper.__preventObserver__ = true; 14745 } 14746 swiper[swiper.params.touchEventsTarget === "container" ? "el" : "wrapperEl"].style.cursor = ""; 14747 if (swiper.isElement) { 14748 requestAnimationFrame(() => { 14749 swiper.__preventObserver__ = false; 14750 }); 14751 } 14752 } 14753 var grabCursor = { 14754 setGrabCursor, 14755 unsetGrabCursor 14756 }; 14757 function closestElement(selector, base = this) { 14758 function __closestFrom(el) { 14759 if (!el || el === getDocument() || el === getWindow()) 14760 return null; 14761 if (el.assignedSlot) 14762 el = el.assignedSlot; 14763 const found = el.closest(selector); 14764 if (!found && !el.getRootNode) { 14765 return null; 14766 } 14767 return found || __closestFrom(el.getRootNode().host); 14768 } 14769 return __closestFrom(base); 14770 } 14771 function preventEdgeSwipe(swiper, event2, startX) { 14772 const window2 = getWindow(); 14773 const { 14774 params 14775 } = swiper; 14776 const edgeSwipeDetection = params.edgeSwipeDetection; 14777 const edgeSwipeThreshold = params.edgeSwipeThreshold; 14778 if (edgeSwipeDetection && (startX <= edgeSwipeThreshold || startX >= window2.innerWidth - edgeSwipeThreshold)) { 14779 if (edgeSwipeDetection === "prevent") { 14780 event2.preventDefault(); 14781 return true; 14782 } 14783 return false; 14784 } 14785 return true; 14786 } 14787 function onTouchStart(event2) { 14788 const swiper = this; 14789 const document2 = getDocument(); 14790 let e = event2; 14791 if (e.originalEvent) 14792 e = e.originalEvent; 14793 const data = swiper.touchEventsData; 14794 if (e.type === "pointerdown") { 14795 if (data.pointerId !== null && data.pointerId !== e.pointerId) { 14796 return; 14797 } 14798 data.pointerId = e.pointerId; 14799 } else if (e.type === "touchstart" && e.targetTouches.length === 1) { 14800 data.touchId = e.targetTouches[0].identifier; 14801 } 14802 if (e.type === "touchstart") { 14803 preventEdgeSwipe(swiper, e, e.targetTouches[0].pageX); 14804 return; 14805 } 14806 const { 14807 params, 14808 touches, 14809 enabled 14810 } = swiper; 14811 if (!enabled) 14812 return; 14813 if (!params.simulateTouch && e.pointerType === "mouse") 14814 return; 14815 if (swiper.animating && params.preventInteractionOnTransition) { 14816 return; 14817 } 14818 if (!swiper.animating && params.cssMode && params.loop) { 14819 swiper.loopFix(); 14820 } 14821 let targetEl = e.target; 14822 if (params.touchEventsTarget === "wrapper") { 14823 if (!elementIsChildOf(targetEl, swiper.wrapperEl)) 14824 return; 14825 } 14826 if ("which" in e && e.which === 3) 14827 return; 14828 if ("button" in e && e.button > 0) 14829 return; 14830 if (data.isTouched && data.isMoved) 14831 return; 14832 const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== ""; 14833 const eventPath = e.composedPath ? e.composedPath() : e.path; 14834 if (swipingClassHasValue && e.target && e.target.shadowRoot && eventPath) { 14835 targetEl = eventPath[0]; 14836 } 14837 const noSwipingSelector = params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`; 14838 const isTargetShadow = !!(e.target && e.target.shadowRoot); 14839 if (params.noSwiping && (isTargetShadow ? closestElement(noSwipingSelector, targetEl) : targetEl.closest(noSwipingSelector))) { 14840 swiper.allowClick = true; 14841 return; 14842 } 14843 if (params.swipeHandler) { 14844 if (!targetEl.closest(params.swipeHandler)) 14845 return; 14846 } 14847 touches.currentX = e.pageX; 14848 touches.currentY = e.pageY; 14849 const startX = touches.currentX; 14850 const startY = touches.currentY; 14851 if (!preventEdgeSwipe(swiper, e, startX)) { 14852 return; 14853 } 14854 Object.assign(data, { 14855 isTouched: true, 14856 isMoved: false, 14857 allowTouchCallbacks: true, 14858 isScrolling: void 0, 14859 startMoving: void 0 14860 }); 14861 touches.startX = startX; 14862 touches.startY = startY; 14863 data.touchStartTime = now(); 14864 swiper.allowClick = true; 14865 swiper.updateSize(); 14866 swiper.swipeDirection = void 0; 14867 if (params.threshold > 0) 14868 data.allowThresholdMove = false; 14869 let preventDefault = true; 14870 if (targetEl.matches(data.focusableElements)) { 14871 preventDefault = false; 14872 if (targetEl.nodeName === "SELECT") { 14873 data.isTouched = false; 14874 } 14875 } 14876 if (document2.activeElement && document2.activeElement.matches(data.focusableElements) && document2.activeElement !== targetEl && (e.pointerType === "mouse" || e.pointerType !== "mouse" && !targetEl.matches(data.focusableElements))) { 14877 document2.activeElement.blur(); 14878 } 14879 const shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault; 14880 if ((params.touchStartForcePreventDefault || shouldPreventDefault) && !targetEl.isContentEditable) { 14881 e.preventDefault(); 14882 } 14883 if (params.freeMode && params.freeMode.enabled && swiper.freeMode && swiper.animating && !params.cssMode) { 14884 swiper.freeMode.onTouchStart(); 14885 } 14886 swiper.emit("touchStart", e); 14887 } 14888 function onTouchMove(event2) { 14889 const document2 = getDocument(); 14890 const swiper = this; 14891 const data = swiper.touchEventsData; 14892 const { 14893 params, 14894 touches, 14895 rtlTranslate: rtl, 14896 enabled 14897 } = swiper; 14898 if (!enabled) 14899 return; 14900 if (!params.simulateTouch && event2.pointerType === "mouse") 14901 return; 14902 let e = event2; 14903 if (e.originalEvent) 14904 e = e.originalEvent; 14905 if (e.type === "pointermove") { 14906 if (data.touchId !== null) 14907 return; 14908 const id = e.pointerId; 14909 if (id !== data.pointerId) 14910 return; 14911 } 14912 let targetTouch; 14913 if (e.type === "touchmove") { 14914 targetTouch = [...e.changedTouches].find((t) => t.identifier === data.touchId); 14915 if (!targetTouch || targetTouch.identifier !== data.touchId) 14916 return; 14917 } else { 14918 targetTouch = e; 14919 } 14920 if (!data.isTouched) { 14921 if (data.startMoving && data.isScrolling) { 14922 swiper.emit("touchMoveOpposite", e); 14923 } 14924 return; 14925 } 14926 const pageX = targetTouch.pageX; 14927 const pageY = targetTouch.pageY; 14928 if (e.preventedByNestedSwiper) { 14929 touches.startX = pageX; 14930 touches.startY = pageY; 14931 return; 14932 } 14933 if (!swiper.allowTouchMove) { 14934 if (!e.target.matches(data.focusableElements)) { 14935 swiper.allowClick = false; 14936 } 14937 if (data.isTouched) { 14938 Object.assign(touches, { 14939 startX: pageX, 14940 startY: pageY, 14941 currentX: pageX, 14942 currentY: pageY 14943 }); 14944 data.touchStartTime = now(); 14945 } 14946 return; 14947 } 14948 if (params.touchReleaseOnEdges && !params.loop) { 14949 if (swiper.isVertical()) { 14950 if (pageY < touches.startY && swiper.translate <= swiper.maxTranslate() || pageY > touches.startY && swiper.translate >= swiper.minTranslate()) { 14951 data.isTouched = false; 14952 data.isMoved = false; 14953 return; 14954 } 14955 } else if (rtl && (pageX > touches.startX && -swiper.translate <= swiper.maxTranslate() || pageX < touches.startX && -swiper.translate >= swiper.minTranslate())) { 14956 return; 14957 } else if (!rtl && (pageX < touches.startX && swiper.translate <= swiper.maxTranslate() || pageX > touches.startX && swiper.translate >= swiper.minTranslate())) { 14958 return; 14959 } 14960 } 14961 if (document2.activeElement && document2.activeElement.matches(data.focusableElements) && document2.activeElement !== e.target && e.pointerType !== "mouse") { 14962 document2.activeElement.blur(); 14963 } 14964 if (document2.activeElement) { 14965 if (e.target === document2.activeElement && e.target.matches(data.focusableElements)) { 14966 data.isMoved = true; 14967 swiper.allowClick = false; 14968 return; 14969 } 14970 } 14971 if (data.allowTouchCallbacks) { 14972 swiper.emit("touchMove", e); 14973 } 14974 touches.previousX = touches.currentX; 14975 touches.previousY = touches.currentY; 14976 touches.currentX = pageX; 14977 touches.currentY = pageY; 14978 const diffX = touches.currentX - touches.startX; 14979 const diffY = touches.currentY - touches.startY; 14980 if (swiper.params.threshold && Math.sqrt(diffX ** 2 + diffY ** 2) < swiper.params.threshold) 14981 return; 14982 if (typeof data.isScrolling === "undefined") { 14983 let touchAngle; 14984 if (swiper.isHorizontal() && touches.currentY === touches.startY || swiper.isVertical() && touches.currentX === touches.startX) { 14985 data.isScrolling = false; 14986 } else { 14987 if (diffX * diffX + diffY * diffY >= 25) { 14988 touchAngle = Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180 / Math.PI; 14989 data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : 90 - touchAngle > params.touchAngle; 14990 } 14991 } 14992 } 14993 if (data.isScrolling) { 14994 swiper.emit("touchMoveOpposite", e); 14995 } 14996 if (typeof data.startMoving === "undefined") { 14997 if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) { 14998 data.startMoving = true; 14999 } 15000 } 15001 if (data.isScrolling || e.type === "touchmove" && data.preventTouchMoveFromPointerMove) { 15002 data.isTouched = false; 15003 return; 15004 } 15005 if (!data.startMoving) { 15006 return; 15007 } 15008 swiper.allowClick = false; 15009 if (!params.cssMode && e.cancelable) { 15010 e.preventDefault(); 15011 } 15012 if (params.touchMoveStopPropagation && !params.nested) { 15013 e.stopPropagation(); 15014 } 15015 let diff = swiper.isHorizontal() ? diffX : diffY; 15016 let touchesDiff = swiper.isHorizontal() ? touches.currentX - touches.previousX : touches.currentY - touches.previousY; 15017 if (params.oneWayMovement) { 15018 diff = Math.abs(diff) * (rtl ? 1 : -1); 15019 touchesDiff = Math.abs(touchesDiff) * (rtl ? 1 : -1); 15020 } 15021 touches.diff = diff; 15022 diff *= params.touchRatio; 15023 if (rtl) { 15024 diff = -diff; 15025 touchesDiff = -touchesDiff; 15026 } 15027 const prevTouchesDirection = swiper.touchesDirection; 15028 swiper.swipeDirection = diff > 0 ? "prev" : "next"; 15029 swiper.touchesDirection = touchesDiff > 0 ? "prev" : "next"; 15030 const isLoop = swiper.params.loop && !params.cssMode; 15031 const allowLoopFix = swiper.touchesDirection === "next" && swiper.allowSlideNext || swiper.touchesDirection === "prev" && swiper.allowSlidePrev; 15032 if (!data.isMoved) { 15033 if (isLoop && allowLoopFix) { 15034 swiper.loopFix({ 15035 direction: swiper.swipeDirection 15036 }); 15037 } 15038 data.startTranslate = swiper.getTranslate(); 15039 swiper.setTransition(0); 15040 if (swiper.animating) { 15041 const evt = new window.CustomEvent("transitionend", { 15042 bubbles: true, 15043 cancelable: true, 15044 detail: { 15045 bySwiperTouchMove: true 15046 } 15047 }); 15048 swiper.wrapperEl.dispatchEvent(evt); 15049 } 15050 data.allowMomentumBounce = false; 15051 if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) { 15052 swiper.setGrabCursor(true); 15053 } 15054 swiper.emit("sliderFirstMove", e); 15055 } 15056 let loopFixed; 15057 new Date().getTime(); 15058 if (params._loopSwapReset !== false && data.isMoved && data.allowThresholdMove && prevTouchesDirection !== swiper.touchesDirection && isLoop && allowLoopFix && Math.abs(diff) >= 1) { 15059 Object.assign(touches, { 15060 startX: pageX, 15061 startY: pageY, 15062 currentX: pageX, 15063 currentY: pageY, 15064 startTranslate: data.currentTranslate 15065 }); 15066 data.loopSwapReset = true; 15067 data.startTranslate = data.currentTranslate; 15068 return; 15069 } 15070 swiper.emit("sliderMove", e); 15071 data.isMoved = true; 15072 data.currentTranslate = diff + data.startTranslate; 15073 let disableParentSwiper = true; 15074 let resistanceRatio = params.resistanceRatio; 15075 if (params.touchReleaseOnEdges) { 15076 resistanceRatio = 0; 15077 } 15078 if (diff > 0) { 15079 if (isLoop && allowLoopFix && !loopFixed && data.allowThresholdMove && data.currentTranslate > (params.centeredSlides ? swiper.minTranslate() - swiper.slidesSizesGrid[swiper.activeIndex + 1] - (params.slidesPerView !== "auto" && swiper.slides.length - params.slidesPerView >= 2 ? swiper.slidesSizesGrid[swiper.activeIndex + 1] + swiper.params.spaceBetween : 0) - swiper.params.spaceBetween : swiper.minTranslate())) { 15080 swiper.loopFix({ 15081 direction: "prev", 15082 setTranslate: true, 15083 activeSlideIndex: 0 15084 }); 15085 } 15086 if (data.currentTranslate > swiper.minTranslate()) { 15087 disableParentSwiper = false; 15088 if (params.resistance) { 15089 data.currentTranslate = swiper.minTranslate() - 1 + (-swiper.minTranslate() + data.startTranslate + diff) ** resistanceRatio; 15090 } 15091 } 15092 } else if (diff < 0) { 15093 if (isLoop && allowLoopFix && !loopFixed && data.allowThresholdMove && data.currentTranslate < (params.centeredSlides ? swiper.maxTranslate() + swiper.slidesSizesGrid[swiper.slidesSizesGrid.length - 1] + swiper.params.spaceBetween + (params.slidesPerView !== "auto" && swiper.slides.length - params.slidesPerView >= 2 ? swiper.slidesSizesGrid[swiper.slidesSizesGrid.length - 1] + swiper.params.spaceBetween : 0) : swiper.maxTranslate())) { 15094 swiper.loopFix({ 15095 direction: "next", 15096 setTranslate: true, 15097 activeSlideIndex: swiper.slides.length - (params.slidesPerView === "auto" ? swiper.slidesPerViewDynamic() : Math.ceil(parseFloat(params.slidesPerView, 10))) 15098 }); 15099 } 15100 if (data.currentTranslate < swiper.maxTranslate()) { 15101 disableParentSwiper = false; 15102 if (params.resistance) { 15103 data.currentTranslate = swiper.maxTranslate() + 1 - (swiper.maxTranslate() - data.startTranslate - diff) ** resistanceRatio; 15104 } 15105 } 15106 } 15107 if (disableParentSwiper) { 15108 e.preventedByNestedSwiper = true; 15109 } 15110 if (!swiper.allowSlideNext && swiper.swipeDirection === "next" && data.currentTranslate < data.startTranslate) { 15111 data.currentTranslate = data.startTranslate; 15112 } 15113 if (!swiper.allowSlidePrev && swiper.swipeDirection === "prev" && data.currentTranslate > data.startTranslate) { 15114 data.currentTranslate = data.startTranslate; 15115 } 15116 if (!swiper.allowSlidePrev && !swiper.allowSlideNext) { 15117 data.currentTranslate = data.startTranslate; 15118 } 15119 if (params.threshold > 0) { 15120 if (Math.abs(diff) > params.threshold || data.allowThresholdMove) { 15121 if (!data.allowThresholdMove) { 15122 data.allowThresholdMove = true; 15123 touches.startX = touches.currentX; 15124 touches.startY = touches.currentY; 15125 data.currentTranslate = data.startTranslate; 15126 touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY; 15127 return; 15128 } 15129 } else { 15130 data.currentTranslate = data.startTranslate; 15131 return; 15132 } 15133 } 15134 if (!params.followFinger || params.cssMode) 15135 return; 15136 if (params.freeMode && params.freeMode.enabled && swiper.freeMode || params.watchSlidesProgress) { 15137 swiper.updateActiveIndex(); 15138 swiper.updateSlidesClasses(); 15139 } 15140 if (params.freeMode && params.freeMode.enabled && swiper.freeMode) { 15141 swiper.freeMode.onTouchMove(); 15142 } 15143 swiper.updateProgress(data.currentTranslate); 15144 swiper.setTranslate(data.currentTranslate); 15145 } 15146 function onTouchEnd(event2) { 15147 const swiper = this; 15148 const data = swiper.touchEventsData; 15149 let e = event2; 15150 if (e.originalEvent) 15151 e = e.originalEvent; 15152 let targetTouch; 15153 const isTouchEvent = e.type === "touchend" || e.type === "touchcancel"; 15154 if (!isTouchEvent) { 15155 if (data.touchId !== null) 15156 return; 15157 if (e.pointerId !== data.pointerId) 15158 return; 15159 targetTouch = e; 15160 } else { 15161 targetTouch = [...e.changedTouches].find((t) => t.identifier === data.touchId); 15162 if (!targetTouch || targetTouch.identifier !== data.touchId) 15163 return; 15164 } 15165 if (["pointercancel", "pointerout", "pointerleave", "contextmenu"].includes(e.type)) { 15166 const proceed = ["pointercancel", "contextmenu"].includes(e.type) && (swiper.browser.isSafari || swiper.browser.isWebView); 15167 if (!proceed) { 15168 return; 15169 } 15170 } 15171 data.pointerId = null; 15172 data.touchId = null; 15173 const { 15174 params, 15175 touches, 15176 rtlTranslate: rtl, 15177 slidesGrid, 15178 enabled 15179 } = swiper; 15180 if (!enabled) 15181 return; 15182 if (!params.simulateTouch && e.pointerType === "mouse") 15183 return; 15184 if (data.allowTouchCallbacks) { 15185 swiper.emit("touchEnd", e); 15186 } 15187 data.allowTouchCallbacks = false; 15188 if (!data.isTouched) { 15189 if (data.isMoved && params.grabCursor) { 15190 swiper.setGrabCursor(false); 15191 } 15192 data.isMoved = false; 15193 data.startMoving = false; 15194 return; 15195 } 15196 if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) { 15197 swiper.setGrabCursor(false); 15198 } 15199 const touchEndTime = now(); 15200 const timeDiff = touchEndTime - data.touchStartTime; 15201 if (swiper.allowClick) { 15202 const pathTree = e.path || e.composedPath && e.composedPath(); 15203 swiper.updateClickedSlide(pathTree && pathTree[0] || e.target, pathTree); 15204 swiper.emit("tap click", e); 15205 if (timeDiff < 300 && touchEndTime - data.lastClickTime < 300) { 15206 swiper.emit("doubleTap doubleClick", e); 15207 } 15208 } 15209 data.lastClickTime = now(); 15210 nextTick(() => { 15211 if (!swiper.destroyed) 15212 swiper.allowClick = true; 15213 }); 15214 if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 && !data.loopSwapReset || data.currentTranslate === data.startTranslate && !data.loopSwapReset) { 15215 data.isTouched = false; 15216 data.isMoved = false; 15217 data.startMoving = false; 15218 return; 15219 } 15220 data.isTouched = false; 15221 data.isMoved = false; 15222 data.startMoving = false; 15223 let currentPos; 15224 if (params.followFinger) { 15225 currentPos = rtl ? swiper.translate : -swiper.translate; 15226 } else { 15227 currentPos = -data.currentTranslate; 15228 } 15229 if (params.cssMode) { 15230 return; 15231 } 15232 if (params.freeMode && params.freeMode.enabled) { 15233 swiper.freeMode.onTouchEnd({ 15234 currentPos 15235 }); 15236 return; 15237 } 15238 const swipeToLast = currentPos >= -swiper.maxTranslate() && !swiper.params.loop; 15239 let stopIndex = 0; 15240 let groupSize = swiper.slidesSizesGrid[0]; 15241 for (let i = 0; i < slidesGrid.length; i += i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup) { 15242 const increment2 = i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup; 15243 if (typeof slidesGrid[i + increment2] !== "undefined") { 15244 if (swipeToLast || currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + increment2]) { 15245 stopIndex = i; 15246 groupSize = slidesGrid[i + increment2] - slidesGrid[i]; 15247 } 15248 } else if (swipeToLast || currentPos >= slidesGrid[i]) { 15249 stopIndex = i; 15250 groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2]; 15251 } 15252 } 15253 let rewindFirstIndex = null; 15254 let rewindLastIndex = null; 15255 if (params.rewind) { 15256 if (swiper.isBeginning) { 15257 rewindLastIndex = params.virtual && params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1; 15258 } else if (swiper.isEnd) { 15259 rewindFirstIndex = 0; 15260 } 15261 } 15262 const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize; 15263 const increment = stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup; 15264 if (timeDiff > params.longSwipesMs) { 15265 if (!params.longSwipes) { 15266 swiper.slideTo(swiper.activeIndex); 15267 return; 15268 } 15269 if (swiper.swipeDirection === "next") { 15270 if (ratio >= params.longSwipesRatio) 15271 swiper.slideTo(params.rewind && swiper.isEnd ? rewindFirstIndex : stopIndex + increment); 15272 else 15273 swiper.slideTo(stopIndex); 15274 } 15275 if (swiper.swipeDirection === "prev") { 15276 if (ratio > 1 - params.longSwipesRatio) { 15277 swiper.slideTo(stopIndex + increment); 15278 } else if (rewindLastIndex !== null && ratio < 0 && Math.abs(ratio) > params.longSwipesRatio) { 15279 swiper.slideTo(rewindLastIndex); 15280 } else { 15281 swiper.slideTo(stopIndex); 15282 } 15283 } 15284 } else { 15285 if (!params.shortSwipes) { 15286 swiper.slideTo(swiper.activeIndex); 15287 return; 15288 } 15289 const isNavButtonTarget = swiper.navigation && (e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl); 15290 if (!isNavButtonTarget) { 15291 if (swiper.swipeDirection === "next") { 15292 swiper.slideTo(rewindFirstIndex !== null ? rewindFirstIndex : stopIndex + increment); 15293 } 15294 if (swiper.swipeDirection === "prev") { 15295 swiper.slideTo(rewindLastIndex !== null ? rewindLastIndex : stopIndex); 15296 } 15297 } else if (e.target === swiper.navigation.nextEl) { 15298 swiper.slideTo(stopIndex + increment); 15299 } else { 15300 swiper.slideTo(stopIndex); 15301 } 15302 } 15303 } 15304 function onResize() { 15305 const swiper = this; 15306 const { 15307 params, 15308 el 15309 } = swiper; 15310 if (el && el.offsetWidth === 0) 15311 return; 15312 if (params.breakpoints) { 15313 swiper.setBreakpoint(); 15314 } 15315 const { 15316 allowSlideNext, 15317 allowSlidePrev, 15318 snapGrid 15319 } = swiper; 15320 const isVirtual = swiper.virtual && swiper.params.virtual.enabled; 15321 swiper.allowSlideNext = true; 15322 swiper.allowSlidePrev = true; 15323 swiper.updateSize(); 15324 swiper.updateSlides(); 15325 swiper.updateSlidesClasses(); 15326 const isVirtualLoop = isVirtual && params.loop; 15327 if ((params.slidesPerView === "auto" || params.slidesPerView > 1) && swiper.isEnd && !swiper.isBeginning && !swiper.params.centeredSlides && !isVirtualLoop) { 15328 swiper.slideTo(swiper.slides.length - 1, 0, false, true); 15329 } else { 15330 if (swiper.params.loop && !isVirtual) { 15331 swiper.slideToLoop(swiper.realIndex, 0, false, true); 15332 } else { 15333 swiper.slideTo(swiper.activeIndex, 0, false, true); 15334 } 15335 } 15336 if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) { 15337 clearTimeout(swiper.autoplay.resizeTimeout); 15338 swiper.autoplay.resizeTimeout = setTimeout(() => { 15339 if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) { 15340 swiper.autoplay.resume(); 15341 } 15342 }, 500); 15343 } 15344 swiper.allowSlidePrev = allowSlidePrev; 15345 swiper.allowSlideNext = allowSlideNext; 15346 if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) { 15347 swiper.checkOverflow(); 15348 } 15349 } 15350 function onClick(e) { 15351 const swiper = this; 15352 if (!swiper.enabled) 15353 return; 15354 if (!swiper.allowClick) { 15355 if (swiper.params.preventClicks) 15356 e.preventDefault(); 15357 if (swiper.params.preventClicksPropagation && swiper.animating) { 15358 e.stopPropagation(); 15359 e.stopImmediatePropagation(); 15360 } 15361 } 15362 } 15363 function onScroll() { 15364 const swiper = this; 15365 const { 15366 wrapperEl, 15367 rtlTranslate, 15368 enabled 15369 } = swiper; 15370 if (!enabled) 15371 return; 15372 swiper.previousTranslate = swiper.translate; 15373 if (swiper.isHorizontal()) { 15374 swiper.translate = -wrapperEl.scrollLeft; 15375 } else { 15376 swiper.translate = -wrapperEl.scrollTop; 15377 } 15378 if (swiper.translate === 0) 15379 swiper.translate = 0; 15380 swiper.updateActiveIndex(); 15381 swiper.updateSlidesClasses(); 15382 let newProgress; 15383 const translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); 15384 if (translatesDiff === 0) { 15385 newProgress = 0; 15386 } else { 15387 newProgress = (swiper.translate - swiper.minTranslate()) / translatesDiff; 15388 } 15389 if (newProgress !== swiper.progress) { 15390 swiper.updateProgress(rtlTranslate ? -swiper.translate : swiper.translate); 15391 } 15392 swiper.emit("setTranslate", swiper.translate, false); 15393 } 15394 function onLoad(e) { 15395 const swiper = this; 15396 processLazyPreloader(swiper, e.target); 15397 if (swiper.params.cssMode || swiper.params.slidesPerView !== "auto" && !swiper.params.autoHeight) { 15398 return; 15399 } 15400 swiper.update(); 15401 } 15402 function onDocumentTouchStart() { 15403 const swiper = this; 15404 if (swiper.documentTouchHandlerProceeded) 15405 return; 15406 swiper.documentTouchHandlerProceeded = true; 15407 if (swiper.params.touchReleaseOnEdges) { 15408 swiper.el.style.touchAction = "auto"; 15409 } 15410 } 15411 var events = (swiper, method) => { 15412 const document2 = getDocument(); 15413 const { 15414 params, 15415 el, 15416 wrapperEl, 15417 device 15418 } = swiper; 15419 const capture = !!params.nested; 15420 const domMethod = method === "on" ? "addEventListener" : "removeEventListener"; 15421 const swiperMethod = method; 15422 if (!el || typeof el === "string") 15423 return; 15424 document2[domMethod]("touchstart", swiper.onDocumentTouchStart, { 15425 passive: false, 15426 capture 15427 }); 15428 el[domMethod]("touchstart", swiper.onTouchStart, { 15429 passive: false 15430 }); 15431 el[domMethod]("pointerdown", swiper.onTouchStart, { 15432 passive: false 15433 }); 15434 document2[domMethod]("touchmove", swiper.onTouchMove, { 15435 passive: false, 15436 capture 15437 }); 15438 document2[domMethod]("pointermove", swiper.onTouchMove, { 15439 passive: false, 15440 capture 15441 }); 15442 document2[domMethod]("touchend", swiper.onTouchEnd, { 15443 passive: true 15444 }); 15445 document2[domMethod]("pointerup", swiper.onTouchEnd, { 15446 passive: true 15447 }); 15448 document2[domMethod]("pointercancel", swiper.onTouchEnd, { 15449 passive: true 15450 }); 15451 document2[domMethod]("touchcancel", swiper.onTouchEnd, { 15452 passive: true 15453 }); 15454 document2[domMethod]("pointerout", swiper.onTouchEnd, { 15455 passive: true 15456 }); 15457 document2[domMethod]("pointerleave", swiper.onTouchEnd, { 15458 passive: true 15459 }); 15460 document2[domMethod]("contextmenu", swiper.onTouchEnd, { 15461 passive: true 15462 }); 15463 if (params.preventClicks || params.preventClicksPropagation) { 15464 el[domMethod]("click", swiper.onClick, true); 15465 } 15466 if (params.cssMode) { 15467 wrapperEl[domMethod]("scroll", swiper.onScroll); 15468 } 15469 if (params.updateOnWindowResize) { 15470 swiper[swiperMethod](device.ios || device.android ? "resize orientationchange observerUpdate" : "resize observerUpdate", onResize, true); 15471 } else { 15472 swiper[swiperMethod]("observerUpdate", onResize, true); 15473 } 15474 el[domMethod]("load", swiper.onLoad, { 15475 capture: true 15476 }); 15477 }; 15478 function attachEvents() { 15479 const swiper = this; 15480 const { 15481 params 15482 } = swiper; 15483 swiper.onTouchStart = onTouchStart.bind(swiper); 15484 swiper.onTouchMove = onTouchMove.bind(swiper); 15485 swiper.onTouchEnd = onTouchEnd.bind(swiper); 15486 swiper.onDocumentTouchStart = onDocumentTouchStart.bind(swiper); 15487 if (params.cssMode) { 15488 swiper.onScroll = onScroll.bind(swiper); 15489 } 15490 swiper.onClick = onClick.bind(swiper); 15491 swiper.onLoad = onLoad.bind(swiper); 15492 events(swiper, "on"); 15493 } 15494 function detachEvents() { 15495 const swiper = this; 15496 events(swiper, "off"); 15497 } 15498 var events$1 = { 15499 attachEvents, 15500 detachEvents 15501 }; 15502 var isGridEnabled = (swiper, params) => { 15503 return swiper.grid && params.grid && params.grid.rows > 1; 15504 }; 15505 function setBreakpoint() { 15506 const swiper = this; 15507 const { 15508 realIndex, 15509 initialized, 15510 params, 15511 el 15512 } = swiper; 15513 const breakpoints2 = params.breakpoints; 15514 if (!breakpoints2 || breakpoints2 && Object.keys(breakpoints2).length === 0) 15515 return; 15516 const document2 = getDocument(); 15517 const breakpointsBase = params.breakpointsBase === "window" || !params.breakpointsBase ? params.breakpointsBase : "container"; 15518 const breakpointContainer = ["window", "container"].includes(params.breakpointsBase) || !params.breakpointsBase ? swiper.el : document2.querySelector(params.breakpointsBase); 15519 const breakpoint = swiper.getBreakpoint(breakpoints2, breakpointsBase, breakpointContainer); 15520 if (!breakpoint || swiper.currentBreakpoint === breakpoint) 15521 return; 15522 const breakpointOnlyParams = breakpoint in breakpoints2 ? breakpoints2[breakpoint] : void 0; 15523 const breakpointParams = breakpointOnlyParams || swiper.originalParams; 15524 const wasMultiRow = isGridEnabled(swiper, params); 15525 const isMultiRow = isGridEnabled(swiper, breakpointParams); 15526 const wasGrabCursor = swiper.params.grabCursor; 15527 const isGrabCursor = breakpointParams.grabCursor; 15528 const wasEnabled = params.enabled; 15529 if (wasMultiRow && !isMultiRow) { 15530 el.classList.remove(`${params.containerModifierClass}grid`, `${params.containerModifierClass}grid-column`); 15531 swiper.emitContainerClasses(); 15532 } else if (!wasMultiRow && isMultiRow) { 15533 el.classList.add(`${params.containerModifierClass}grid`); 15534 if (breakpointParams.grid.fill && breakpointParams.grid.fill === "column" || !breakpointParams.grid.fill && params.grid.fill === "column") { 15535 el.classList.add(`${params.containerModifierClass}grid-column`); 15536 } 15537 swiper.emitContainerClasses(); 15538 } 15539 if (wasGrabCursor && !isGrabCursor) { 15540 swiper.unsetGrabCursor(); 15541 } else if (!wasGrabCursor && isGrabCursor) { 15542 swiper.setGrabCursor(); 15543 } 15544 ["navigation", "pagination", "scrollbar"].forEach((prop) => { 15545 if (typeof breakpointParams[prop] === "undefined") 15546 return; 15547 const wasModuleEnabled = params[prop] && params[prop].enabled; 15548 const isModuleEnabled = breakpointParams[prop] && breakpointParams[prop].enabled; 15549 if (wasModuleEnabled && !isModuleEnabled) { 15550 swiper[prop].disable(); 15551 } 15552 if (!wasModuleEnabled && isModuleEnabled) { 15553 swiper[prop].enable(); 15554 } 15555 }); 15556 const directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction; 15557 const needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged); 15558 const wasLoop = params.loop; 15559 if (directionChanged && initialized) { 15560 swiper.changeDirection(); 15561 } 15562 extend2(swiper.params, breakpointParams); 15563 const isEnabled = swiper.params.enabled; 15564 const hasLoop = swiper.params.loop; 15565 Object.assign(swiper, { 15566 allowTouchMove: swiper.params.allowTouchMove, 15567 allowSlideNext: swiper.params.allowSlideNext, 15568 allowSlidePrev: swiper.params.allowSlidePrev 15569 }); 15570 if (wasEnabled && !isEnabled) { 15571 swiper.disable(); 15572 } else if (!wasEnabled && isEnabled) { 15573 swiper.enable(); 15574 } 15575 swiper.currentBreakpoint = breakpoint; 15576 swiper.emit("_beforeBreakpoint", breakpointParams); 15577 if (initialized) { 15578 if (needsReLoop) { 15579 swiper.loopDestroy(); 15580 swiper.loopCreate(realIndex); 15581 swiper.updateSlides(); 15582 } else if (!wasLoop && hasLoop) { 15583 swiper.loopCreate(realIndex); 15584 swiper.updateSlides(); 15585 } else if (wasLoop && !hasLoop) { 15586 swiper.loopDestroy(); 15587 } 15588 } 15589 swiper.emit("breakpoint", breakpointParams); 15590 } 15591 function getBreakpoint(breakpoints2, base = "window", containerEl) { 15592 if (!breakpoints2 || base === "container" && !containerEl) 15593 return void 0; 15594 let breakpoint = false; 15595 const window2 = getWindow(); 15596 const currentHeight = base === "window" ? window2.innerHeight : containerEl.clientHeight; 15597 const points = Object.keys(breakpoints2).map((point) => { 15598 if (typeof point === "string" && point.indexOf("@") === 0) { 15599 const minRatio = parseFloat(point.substr(1)); 15600 const value = currentHeight * minRatio; 15601 return { 15602 value, 15603 point 15604 }; 15605 } 15606 return { 15607 value: point, 15608 point 15609 }; 15610 }); 15611 points.sort((a, b) => parseInt(a.value, 10) - parseInt(b.value, 10)); 15612 for (let i = 0; i < points.length; i += 1) { 15613 const { 15614 point, 15615 value 15616 } = points[i]; 15617 if (base === "window") { 15618 if (window2.matchMedia(`(min-width: ${value}px)`).matches) { 15619 breakpoint = point; 15620 } 15621 } else if (value <= containerEl.clientWidth) { 15622 breakpoint = point; 15623 } 15624 } 15625 return breakpoint || "max"; 15626 } 15627 var breakpoints = { 15628 setBreakpoint, 15629 getBreakpoint 15630 }; 15631 function prepareClasses(entries, prefix) { 15632 const resultClasses = []; 15633 entries.forEach((item) => { 15634 if (typeof item === "object") { 15635 Object.keys(item).forEach((classNames) => { 15636 if (item[classNames]) { 15637 resultClasses.push(prefix + classNames); 15638 } 15639 }); 15640 } else if (typeof item === "string") { 15641 resultClasses.push(prefix + item); 15642 } 15643 }); 15644 return resultClasses; 15645 } 15646 function addClasses() { 15647 const swiper = this; 15648 const { 15649 classNames, 15650 params, 15651 rtl, 15652 el, 15653 device 15654 } = swiper; 15655 const suffixes = prepareClasses(["initialized", params.direction, { 15656 "free-mode": swiper.params.freeMode && params.freeMode.enabled 15657 }, { 15658 "autoheight": params.autoHeight 15659 }, { 15660 "rtl": rtl 15661 }, { 15662 "grid": params.grid && params.grid.rows > 1 15663 }, { 15664 "grid-column": params.grid && params.grid.rows > 1 && params.grid.fill === "column" 15665 }, { 15666 "android": device.android 15667 }, { 15668 "ios": device.ios 15669 }, { 15670 "css-mode": params.cssMode 15671 }, { 15672 "centered": params.cssMode && params.centeredSlides 15673 }, { 15674 "watch-progress": params.watchSlidesProgress 15675 }], params.containerModifierClass); 15676 classNames.push(...suffixes); 15677 el.classList.add(...classNames); 15678 swiper.emitContainerClasses(); 15679 } 15680 function removeClasses() { 15681 const swiper = this; 15682 const { 15683 el, 15684 classNames 15685 } = swiper; 15686 if (!el || typeof el === "string") 15687 return; 15688 el.classList.remove(...classNames); 15689 swiper.emitContainerClasses(); 15690 } 15691 var classes = { 15692 addClasses, 15693 removeClasses 15694 }; 15695 function checkOverflow() { 15696 const swiper = this; 15697 const { 15698 isLocked: wasLocked, 15699 params 15700 } = swiper; 15701 const { 15702 slidesOffsetBefore 15703 } = params; 15704 if (slidesOffsetBefore) { 15705 const lastSlideIndex = swiper.slides.length - 1; 15706 const lastSlideRightEdge = swiper.slidesGrid[lastSlideIndex] + swiper.slidesSizesGrid[lastSlideIndex] + slidesOffsetBefore * 2; 15707 swiper.isLocked = swiper.size > lastSlideRightEdge; 15708 } else { 15709 swiper.isLocked = swiper.snapGrid.length === 1; 15710 } 15711 if (params.allowSlideNext === true) { 15712 swiper.allowSlideNext = !swiper.isLocked; 15713 } 15714 if (params.allowSlidePrev === true) { 15715 swiper.allowSlidePrev = !swiper.isLocked; 15716 } 15717 if (wasLocked && wasLocked !== swiper.isLocked) { 15718 swiper.isEnd = false; 15719 } 15720 if (wasLocked !== swiper.isLocked) { 15721 swiper.emit(swiper.isLocked ? "lock" : "unlock"); 15722 } 15723 } 15724 var checkOverflow$1 = { 15725 checkOverflow 15726 }; 15727 var defaults = { 15728 init: true, 15729 direction: "horizontal", 15730 oneWayMovement: false, 15731 swiperElementNodeName: "SWIPER-CONTAINER", 15732 touchEventsTarget: "wrapper", 15733 initialSlide: 0, 15734 speed: 300, 15735 cssMode: false, 15736 updateOnWindowResize: true, 15737 resizeObserver: true, 15738 nested: false, 15739 createElements: false, 15740 eventsPrefix: "swiper", 15741 enabled: true, 15742 focusableElements: "input, select, option, textarea, button, video, label", 15743 width: null, 15744 height: null, 15745 preventInteractionOnTransition: false, 15746 userAgent: null, 15747 url: null, 15748 edgeSwipeDetection: false, 15749 edgeSwipeThreshold: 20, 15750 autoHeight: false, 15751 setWrapperSize: false, 15752 virtualTranslate: false, 15753 effect: "slide", 15754 breakpoints: void 0, 15755 breakpointsBase: "window", 15756 spaceBetween: 0, 15757 slidesPerView: 1, 15758 slidesPerGroup: 1, 15759 slidesPerGroupSkip: 0, 15760 slidesPerGroupAuto: false, 15761 centeredSlides: false, 15762 centeredSlidesBounds: false, 15763 slidesOffsetBefore: 0, 15764 slidesOffsetAfter: 0, 15765 normalizeSlideIndex: true, 15766 centerInsufficientSlides: false, 15767 watchOverflow: true, 15768 roundLengths: false, 15769 touchRatio: 1, 15770 touchAngle: 45, 15771 simulateTouch: true, 15772 shortSwipes: true, 15773 longSwipes: true, 15774 longSwipesRatio: 0.5, 15775 longSwipesMs: 300, 15776 followFinger: true, 15777 allowTouchMove: true, 15778 threshold: 5, 15779 touchMoveStopPropagation: false, 15780 touchStartPreventDefault: true, 15781 touchStartForcePreventDefault: false, 15782 touchReleaseOnEdges: false, 15783 uniqueNavElements: true, 15784 resistance: true, 15785 resistanceRatio: 0.85, 15786 watchSlidesProgress: false, 15787 grabCursor: false, 15788 preventClicks: true, 15789 preventClicksPropagation: true, 15790 slideToClickedSlide: false, 15791 loop: false, 15792 loopAddBlankSlides: true, 15793 loopAdditionalSlides: 0, 15794 loopPreventsSliding: true, 15795 rewind: false, 15796 allowSlidePrev: true, 15797 allowSlideNext: true, 15798 swipeHandler: null, 15799 noSwiping: true, 15800 noSwipingClass: "swiper-no-swiping", 15801 noSwipingSelector: null, 15802 passiveListeners: true, 15803 maxBackfaceHiddenSlides: 10, 15804 containerModifierClass: "swiper-", 15805 slideClass: "swiper-slide", 15806 slideBlankClass: "swiper-slide-blank", 15807 slideActiveClass: "swiper-slide-active", 15808 slideVisibleClass: "swiper-slide-visible", 15809 slideFullyVisibleClass: "swiper-slide-fully-visible", 15810 slideNextClass: "swiper-slide-next", 15811 slidePrevClass: "swiper-slide-prev", 15812 wrapperClass: "swiper-wrapper", 15813 lazyPreloaderClass: "swiper-lazy-preloader", 15814 lazyPreloadPrevNext: 0, 15815 runCallbacksOnInit: true, 15816 _emitClasses: false 15817 }; 15818 function moduleExtendParams(params, allModulesParams) { 15819 return function extendParams(obj = {}) { 15820 const moduleParamName = Object.keys(obj)[0]; 15821 const moduleParams = obj[moduleParamName]; 15822 if (typeof moduleParams !== "object" || moduleParams === null) { 15823 extend2(allModulesParams, obj); 15824 return; 15825 } 15826 if (params[moduleParamName] === true) { 15827 params[moduleParamName] = { 15828 enabled: true 15829 }; 15830 } 15831 if (moduleParamName === "navigation" && params[moduleParamName] && params[moduleParamName].enabled && !params[moduleParamName].prevEl && !params[moduleParamName].nextEl) { 15832 params[moduleParamName].auto = true; 15833 } 15834 if (["pagination", "scrollbar"].indexOf(moduleParamName) >= 0 && params[moduleParamName] && params[moduleParamName].enabled && !params[moduleParamName].el) { 15835 params[moduleParamName].auto = true; 15836 } 15837 if (!(moduleParamName in params && "enabled" in moduleParams)) { 15838 extend2(allModulesParams, obj); 15839 return; 15840 } 15841 if (typeof params[moduleParamName] === "object" && !("enabled" in params[moduleParamName])) { 15842 params[moduleParamName].enabled = true; 15843 } 15844 if (!params[moduleParamName]) 15845 params[moduleParamName] = { 15846 enabled: false 15847 }; 15848 extend2(allModulesParams, obj); 15849 }; 15850 } 15851 var prototypes = { 15852 eventsEmitter, 15853 update, 15854 translate, 15855 transition, 15856 slide, 15857 loop, 15858 grabCursor, 15859 events: events$1, 15860 breakpoints, 15861 checkOverflow: checkOverflow$1, 15862 classes 15863 }; 15864 var extendedDefaults = {}; 15865 var Swiper = class { 15866 constructor(...args) { 15867 let el; 15868 let params; 15869 if (args.length === 1 && args[0].constructor && Object.prototype.toString.call(args[0]).slice(8, -1) === "Object") { 15870 params = args[0]; 15871 } else { 15872 [el, params] = args; 15873 } 15874 if (!params) 15875 params = {}; 15876 params = extend2({}, params); 15877 if (el && !params.el) 15878 params.el = el; 15879 const document2 = getDocument(); 15880 if (params.el && typeof params.el === "string" && document2.querySelectorAll(params.el).length > 1) { 15881 const swipers = []; 15882 document2.querySelectorAll(params.el).forEach((containerEl) => { 15883 const newParams = extend2({}, params, { 15884 el: containerEl 15885 }); 15886 swipers.push(new Swiper(newParams)); 15887 }); 15888 return swipers; 15889 } 15890 const swiper = this; 15891 swiper.__swiper__ = true; 15892 swiper.support = getSupport(); 15893 swiper.device = getDevice({ 15894 userAgent: params.userAgent 15895 }); 15896 swiper.browser = getBrowser(); 15897 swiper.eventsListeners = {}; 15898 swiper.eventsAnyListeners = []; 15899 swiper.modules = [...swiper.__modules__]; 15900 if (params.modules && Array.isArray(params.modules)) { 15901 swiper.modules.push(...params.modules); 15902 } 15903 const allModulesParams = {}; 15904 swiper.modules.forEach((mod) => { 15905 mod({ 15906 params, 15907 swiper, 15908 extendParams: moduleExtendParams(params, allModulesParams), 15909 on: swiper.on.bind(swiper), 15910 once: swiper.once.bind(swiper), 15911 off: swiper.off.bind(swiper), 15912 emit: swiper.emit.bind(swiper) 15913 }); 15914 }); 15915 const swiperParams = extend2({}, defaults, allModulesParams); 15916 swiper.params = extend2({}, swiperParams, extendedDefaults, params); 15917 swiper.originalParams = extend2({}, swiper.params); 15918 swiper.passedParams = extend2({}, params); 15919 if (swiper.params && swiper.params.on) { 15920 Object.keys(swiper.params.on).forEach((eventName) => { 15921 swiper.on(eventName, swiper.params.on[eventName]); 15922 }); 15923 } 15924 if (swiper.params && swiper.params.onAny) { 15925 swiper.onAny(swiper.params.onAny); 15926 } 15927 Object.assign(swiper, { 15928 enabled: swiper.params.enabled, 15929 el, 15930 classNames: [], 15931 slides: [], 15932 slidesGrid: [], 15933 snapGrid: [], 15934 slidesSizesGrid: [], 15935 isHorizontal() { 15936 return swiper.params.direction === "horizontal"; 15937 }, 15938 isVertical() { 15939 return swiper.params.direction === "vertical"; 15940 }, 15941 activeIndex: 0, 15942 realIndex: 0, 15943 isBeginning: true, 15944 isEnd: false, 15945 translate: 0, 15946 previousTranslate: 0, 15947 progress: 0, 15948 velocity: 0, 15949 animating: false, 15950 cssOverflowAdjustment() { 15951 return Math.trunc(this.translate / 2 ** 23) * 2 ** 23; 15952 }, 15953 allowSlideNext: swiper.params.allowSlideNext, 15954 allowSlidePrev: swiper.params.allowSlidePrev, 15955 touchEventsData: { 15956 isTouched: void 0, 15957 isMoved: void 0, 15958 allowTouchCallbacks: void 0, 15959 touchStartTime: void 0, 15960 isScrolling: void 0, 15961 currentTranslate: void 0, 15962 startTranslate: void 0, 15963 allowThresholdMove: void 0, 15964 focusableElements: swiper.params.focusableElements, 15965 lastClickTime: 0, 15966 clickTimeout: void 0, 15967 velocities: [], 15968 allowMomentumBounce: void 0, 15969 startMoving: void 0, 15970 pointerId: null, 15971 touchId: null 15972 }, 15973 allowClick: true, 15974 allowTouchMove: swiper.params.allowTouchMove, 15975 touches: { 15976 startX: 0, 15977 startY: 0, 15978 currentX: 0, 15979 currentY: 0, 15980 diff: 0 15981 }, 15982 imagesToLoad: [], 15983 imagesLoaded: 0 15984 }); 15985 swiper.emit("_swiper"); 15986 if (swiper.params.init) { 15987 swiper.init(); 15988 } 15989 return swiper; 15990 } 15991 getDirectionLabel(property) { 15992 if (this.isHorizontal()) { 15993 return property; 15994 } 15995 return { 15996 "width": "height", 15997 "margin-top": "margin-left", 15998 "margin-bottom ": "margin-right", 15999 "margin-left": "margin-top", 16000 "margin-right": "margin-bottom", 16001 "padding-left": "padding-top", 16002 "padding-right": "padding-bottom", 16003 "marginRight": "marginBottom" 16004 }[property]; 16005 } 16006 getSlideIndex(slideEl) { 16007 const { 16008 slidesEl, 16009 params 16010 } = this; 16011 const slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`); 16012 const firstSlideIndex = elementIndex(slides[0]); 16013 return elementIndex(slideEl) - firstSlideIndex; 16014 } 16015 getSlideIndexByData(index) { 16016 return this.getSlideIndex(this.slides.find((slideEl) => slideEl.getAttribute("data-swiper-slide-index") * 1 === index)); 16017 } 16018 getSlideIndexWhenGrid(index) { 16019 if (this.grid && this.params.grid && this.params.grid.rows > 1) { 16020 if (this.params.grid.fill === "column") { 16021 index = Math.floor(index / this.params.grid.rows); 16022 } else if (this.params.grid.fill === "row") { 16023 index = index % Math.ceil(this.slides.length / this.params.grid.rows); 16024 } 16025 } 16026 return index; 16027 } 16028 recalcSlides() { 16029 const swiper = this; 16030 const { 16031 slidesEl, 16032 params 16033 } = swiper; 16034 swiper.slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`); 16035 } 16036 enable() { 16037 const swiper = this; 16038 if (swiper.enabled) 16039 return; 16040 swiper.enabled = true; 16041 if (swiper.params.grabCursor) { 16042 swiper.setGrabCursor(); 16043 } 16044 swiper.emit("enable"); 16045 } 16046 disable() { 16047 const swiper = this; 16048 if (!swiper.enabled) 16049 return; 16050 swiper.enabled = false; 16051 if (swiper.params.grabCursor) { 16052 swiper.unsetGrabCursor(); 16053 } 16054 swiper.emit("disable"); 16055 } 16056 setProgress(progress, speed) { 16057 const swiper = this; 16058 progress = Math.min(Math.max(progress, 0), 1); 16059 const min = swiper.minTranslate(); 16060 const max = swiper.maxTranslate(); 16061 const current = (max - min) * progress + min; 16062 swiper.translateTo(current, typeof speed === "undefined" ? 0 : speed); 16063 swiper.updateActiveIndex(); 16064 swiper.updateSlidesClasses(); 16065 } 16066 emitContainerClasses() { 16067 const swiper = this; 16068 if (!swiper.params._emitClasses || !swiper.el) 16069 return; 16070 const cls = swiper.el.className.split(" ").filter((className) => { 16071 return className.indexOf("swiper") === 0 || className.indexOf(swiper.params.containerModifierClass) === 0; 16072 }); 16073 swiper.emit("_containerClasses", cls.join(" ")); 16074 } 16075 getSlideClasses(slideEl) { 16076 const swiper = this; 16077 if (swiper.destroyed) 16078 return ""; 16079 return slideEl.className.split(" ").filter((className) => { 16080 return className.indexOf("swiper-slide") === 0 || className.indexOf(swiper.params.slideClass) === 0; 16081 }).join(" "); 16082 } 16083 emitSlidesClasses() { 16084 const swiper = this; 16085 if (!swiper.params._emitClasses || !swiper.el) 16086 return; 16087 const updates = []; 16088 swiper.slides.forEach((slideEl) => { 16089 const classNames = swiper.getSlideClasses(slideEl); 16090 updates.push({ 16091 slideEl, 16092 classNames 16093 }); 16094 swiper.emit("_slideClass", slideEl, classNames); 16095 }); 16096 swiper.emit("_slideClasses", updates); 16097 } 16098 slidesPerViewDynamic(view = "current", exact = false) { 16099 const swiper = this; 16100 const { 16101 params, 16102 slides, 16103 slidesGrid, 16104 slidesSizesGrid, 16105 size: swiperSize, 16106 activeIndex 16107 } = swiper; 16108 let spv = 1; 16109 if (typeof params.slidesPerView === "number") 16110 return params.slidesPerView; 16111 if (params.centeredSlides) { 16112 let slideSize = slides[activeIndex] ? Math.ceil(slides[activeIndex].swiperSlideSize) : 0; 16113 let breakLoop; 16114 for (let i = activeIndex + 1; i < slides.length; i += 1) { 16115 if (slides[i] && !breakLoop) { 16116 slideSize += Math.ceil(slides[i].swiperSlideSize); 16117 spv += 1; 16118 if (slideSize > swiperSize) 16119 breakLoop = true; 16120 } 16121 } 16122 for (let i = activeIndex - 1; i >= 0; i -= 1) { 16123 if (slides[i] && !breakLoop) { 16124 slideSize += slides[i].swiperSlideSize; 16125 spv += 1; 16126 if (slideSize > swiperSize) 16127 breakLoop = true; 16128 } 16129 } 16130 } else { 16131 if (view === "current") { 16132 for (let i = activeIndex + 1; i < slides.length; i += 1) { 16133 const slideInView = exact ? slidesGrid[i] + slidesSizesGrid[i] - slidesGrid[activeIndex] < swiperSize : slidesGrid[i] - slidesGrid[activeIndex] < swiperSize; 16134 if (slideInView) { 16135 spv += 1; 16136 } 16137 } 16138 } else { 16139 for (let i = activeIndex - 1; i >= 0; i -= 1) { 16140 const slideInView = slidesGrid[activeIndex] - slidesGrid[i] < swiperSize; 16141 if (slideInView) { 16142 spv += 1; 16143 } 16144 } 16145 } 16146 } 16147 return spv; 16148 } 16149 update() { 16150 const swiper = this; 16151 if (!swiper || swiper.destroyed) 16152 return; 16153 const { 16154 snapGrid, 16155 params 16156 } = swiper; 16157 if (params.breakpoints) { 16158 swiper.setBreakpoint(); 16159 } 16160 [...swiper.el.querySelectorAll('[loading="lazy"]')].forEach((imageEl) => { 16161 if (imageEl.complete) { 16162 processLazyPreloader(swiper, imageEl); 16163 } 16164 }); 16165 swiper.updateSize(); 16166 swiper.updateSlides(); 16167 swiper.updateProgress(); 16168 swiper.updateSlidesClasses(); 16169 function setTranslate2() { 16170 const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate; 16171 const newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate()); 16172 swiper.setTranslate(newTranslate); 16173 swiper.updateActiveIndex(); 16174 swiper.updateSlidesClasses(); 16175 } 16176 let translated; 16177 if (params.freeMode && params.freeMode.enabled && !params.cssMode) { 16178 setTranslate2(); 16179 if (params.autoHeight) { 16180 swiper.updateAutoHeight(); 16181 } 16182 } else { 16183 if ((params.slidesPerView === "auto" || params.slidesPerView > 1) && swiper.isEnd && !params.centeredSlides) { 16184 const slides = swiper.virtual && params.virtual.enabled ? swiper.virtual.slides : swiper.slides; 16185 translated = swiper.slideTo(slides.length - 1, 0, false, true); 16186 } else { 16187 translated = swiper.slideTo(swiper.activeIndex, 0, false, true); 16188 } 16189 if (!translated) { 16190 setTranslate2(); 16191 } 16192 } 16193 if (params.watchOverflow && snapGrid !== swiper.snapGrid) { 16194 swiper.checkOverflow(); 16195 } 16196 swiper.emit("update"); 16197 } 16198 changeDirection(newDirection, needUpdate = true) { 16199 const swiper = this; 16200 const currentDirection = swiper.params.direction; 16201 if (!newDirection) { 16202 newDirection = currentDirection === "horizontal" ? "vertical" : "horizontal"; 16203 } 16204 if (newDirection === currentDirection || newDirection !== "horizontal" && newDirection !== "vertical") { 16205 return swiper; 16206 } 16207 swiper.el.classList.remove(`${swiper.params.containerModifierClass}${currentDirection}`); 16208 swiper.el.classList.add(`${swiper.params.containerModifierClass}${newDirection}`); 16209 swiper.emitContainerClasses(); 16210 swiper.params.direction = newDirection; 16211 swiper.slides.forEach((slideEl) => { 16212 if (newDirection === "vertical") { 16213 slideEl.style.width = ""; 16214 } else { 16215 slideEl.style.height = ""; 16216 } 16217 }); 16218 swiper.emit("changeDirection"); 16219 if (needUpdate) 16220 swiper.update(); 16221 return swiper; 16222 } 16223 changeLanguageDirection(direction) { 16224 const swiper = this; 16225 if (swiper.rtl && direction === "rtl" || !swiper.rtl && direction === "ltr") 16226 return; 16227 swiper.rtl = direction === "rtl"; 16228 swiper.rtlTranslate = swiper.params.direction === "horizontal" && swiper.rtl; 16229 if (swiper.rtl) { 16230 swiper.el.classList.add(`${swiper.params.containerModifierClass}rtl`); 16231 swiper.el.dir = "rtl"; 16232 } else { 16233 swiper.el.classList.remove(`${swiper.params.containerModifierClass}rtl`); 16234 swiper.el.dir = "ltr"; 16235 } 16236 swiper.update(); 16237 } 16238 mount(element) { 16239 const swiper = this; 16240 if (swiper.mounted) 16241 return true; 16242 let el = element || swiper.params.el; 16243 if (typeof el === "string") { 16244 el = document.querySelector(el); 16245 } 16246 if (!el) { 16247 return false; 16248 } 16249 el.swiper = swiper; 16250 if (el.parentNode && el.parentNode.host && el.parentNode.host.nodeName === swiper.params.swiperElementNodeName.toUpperCase()) { 16251 swiper.isElement = true; 16252 } 16253 const getWrapperSelector = () => { 16254 return `.${(swiper.params.wrapperClass || "").trim().split(" ").join(".")}`; 16255 }; 16256 const getWrapper = () => { 16257 if (el && el.shadowRoot && el.shadowRoot.querySelector) { 16258 const res = el.shadowRoot.querySelector(getWrapperSelector()); 16259 return res; 16260 } 16261 return elementChildren(el, getWrapperSelector())[0]; 16262 }; 16263 let wrapperEl = getWrapper(); 16264 if (!wrapperEl && swiper.params.createElements) { 16265 wrapperEl = createElement("div", swiper.params.wrapperClass); 16266 el.append(wrapperEl); 16267 elementChildren(el, `.${swiper.params.slideClass}`).forEach((slideEl) => { 16268 wrapperEl.append(slideEl); 16269 }); 16270 } 16271 Object.assign(swiper, { 16272 el, 16273 wrapperEl, 16274 slidesEl: swiper.isElement && !el.parentNode.host.slideSlots ? el.parentNode.host : wrapperEl, 16275 hostEl: swiper.isElement ? el.parentNode.host : el, 16276 mounted: true, 16277 rtl: el.dir.toLowerCase() === "rtl" || elementStyle(el, "direction") === "rtl", 16278 rtlTranslate: swiper.params.direction === "horizontal" && (el.dir.toLowerCase() === "rtl" || elementStyle(el, "direction") === "rtl"), 16279 wrongRTL: elementStyle(wrapperEl, "display") === "-webkit-box" 16280 }); 16281 return true; 16282 } 16283 init(el) { 16284 const swiper = this; 16285 if (swiper.initialized) 16286 return swiper; 16287 const mounted = swiper.mount(el); 16288 if (mounted === false) 16289 return swiper; 16290 swiper.emit("beforeInit"); 16291 if (swiper.params.breakpoints) { 16292 swiper.setBreakpoint(); 16293 } 16294 swiper.addClasses(); 16295 swiper.updateSize(); 16296 swiper.updateSlides(); 16297 if (swiper.params.watchOverflow) { 16298 swiper.checkOverflow(); 16299 } 16300 if (swiper.params.grabCursor && swiper.enabled) { 16301 swiper.setGrabCursor(); 16302 } 16303 if (swiper.params.loop && swiper.virtual && swiper.params.virtual.enabled) { 16304 swiper.slideTo(swiper.params.initialSlide + swiper.virtual.slidesBefore, 0, swiper.params.runCallbacksOnInit, false, true); 16305 } else { 16306 swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit, false, true); 16307 } 16308 if (swiper.params.loop) { 16309 swiper.loopCreate(void 0, true); 16310 } 16311 swiper.attachEvents(); 16312 const lazyElements = [...swiper.el.querySelectorAll('[loading="lazy"]')]; 16313 if (swiper.isElement) { 16314 lazyElements.push(...swiper.hostEl.querySelectorAll('[loading="lazy"]')); 16315 } 16316 lazyElements.forEach((imageEl) => { 16317 if (imageEl.complete) { 16318 processLazyPreloader(swiper, imageEl); 16319 } else { 16320 imageEl.addEventListener("load", (e) => { 16321 processLazyPreloader(swiper, e.target); 16322 }); 16323 } 16324 }); 16325 preload(swiper); 16326 swiper.initialized = true; 16327 preload(swiper); 16328 swiper.emit("init"); 16329 swiper.emit("afterInit"); 16330 return swiper; 16331 } 16332 destroy(deleteInstance = true, cleanStyles = true) { 16333 const swiper = this; 16334 const { 16335 params, 16336 el, 16337 wrapperEl, 16338 slides 16339 } = swiper; 16340 if (typeof swiper.params === "undefined" || swiper.destroyed) { 16341 return null; 16342 } 16343 swiper.emit("beforeDestroy"); 16344 swiper.initialized = false; 16345 swiper.detachEvents(); 16346 if (params.loop) { 16347 swiper.loopDestroy(); 16348 } 16349 if (cleanStyles) { 16350 swiper.removeClasses(); 16351 if (el && typeof el !== "string") { 16352 el.removeAttribute("style"); 16353 } 16354 if (wrapperEl) { 16355 wrapperEl.removeAttribute("style"); 16356 } 16357 if (slides && slides.length) { 16358 slides.forEach((slideEl) => { 16359 slideEl.classList.remove(params.slideVisibleClass, params.slideFullyVisibleClass, params.slideActiveClass, params.slideNextClass, params.slidePrevClass); 16360 slideEl.removeAttribute("style"); 16361 slideEl.removeAttribute("data-swiper-slide-index"); 16362 }); 16363 } 16364 } 16365 swiper.emit("destroy"); 16366 Object.keys(swiper.eventsListeners).forEach((eventName) => { 16367 swiper.off(eventName); 16368 }); 16369 if (deleteInstance !== false) { 16370 if (swiper.el && typeof swiper.el !== "string") { 16371 swiper.el.swiper = null; 16372 } 16373 deleteProps(swiper); 16374 } 16375 swiper.destroyed = true; 16376 return null; 16377 } 16378 static extendDefaults(newDefaults) { 16379 extend2(extendedDefaults, newDefaults); 16380 } 16381 static get extendedDefaults() { 16382 return extendedDefaults; 16383 } 16384 static get defaults() { 16385 return defaults; 16386 } 16387 static installModule(mod) { 16388 if (!Swiper.prototype.__modules__) 16389 Swiper.prototype.__modules__ = []; 16390 const modules = Swiper.prototype.__modules__; 16391 if (typeof mod === "function" && modules.indexOf(mod) < 0) { 16392 modules.push(mod); 16393 } 16394 } 16395 static use(module) { 16396 if (Array.isArray(module)) { 16397 module.forEach((m) => Swiper.installModule(m)); 16398 return Swiper; 16399 } 16400 Swiper.installModule(module); 16401 return Swiper; 16402 } 16403 }; 16404 Object.keys(prototypes).forEach((prototypeGroup) => { 16405 Object.keys(prototypes[prototypeGroup]).forEach((protoMethod) => { 16406 Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod]; 16407 }); 16408 }); 16409 Swiper.use([Resize, Observer]); 16410 16411
vendor: 4,441 bytes, lines 16411-16538
16411// node_modules/swiper/modules/keyboard.mjs 16412 function Keyboard({ 16413 swiper, 16414 extendParams, 16415 on, 16416 emit 16417 }) { 16418 const document2 = getDocument(); 16419 const window2 = getWindow(); 16420 swiper.keyboard = { 16421 enabled: false 16422 }; 16423 extendParams({ 16424 keyboard: { 16425 enabled: false, 16426 onlyInViewport: true, 16427 pageUpDown: true 16428 } 16429 }); 16430 function handle(event2) { 16431 if (!swiper.enabled) 16432 return; 16433 const { 16434 rtlTranslate: rtl 16435 } = swiper; 16436 let e = event2; 16437 if (e.originalEvent) 16438 e = e.originalEvent; 16439 const kc = e.keyCode || e.charCode; 16440 const pageUpDown = swiper.params.keyboard.pageUpDown; 16441 const isPageUp = pageUpDown && kc === 33; 16442 const isPageDown = pageUpDown && kc === 34; 16443 const isArrowLeft = kc === 37; 16444 const isArrowRight = kc === 39; 16445 const isArrowUp = kc === 38; 16446 const isArrowDown = kc === 40; 16447 if (!swiper.allowSlideNext && (swiper.isHorizontal() && isArrowRight || swiper.isVertical() && isArrowDown || isPageDown)) { 16448 return false; 16449 } 16450 if (!swiper.allowSlidePrev && (swiper.isHorizontal() && isArrowLeft || swiper.isVertical() && isArrowUp || isPageUp)) { 16451 return false; 16452 } 16453 if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) { 16454 return void 0; 16455 } 16456 if (document2.activeElement && (document2.activeElement.isContentEditable || document2.activeElement.nodeName && (document2.activeElement.nodeName.toLowerCase() === "input" || document2.activeElement.nodeName.toLowerCase() === "textarea"))) { 16457 return void 0; 16458 } 16459 if (swiper.params.keyboard.onlyInViewport && (isPageUp || isPageDown || isArrowLeft || isArrowRight || isArrowUp || isArrowDown)) { 16460 let inView = false; 16461 if (elementParents(swiper.el, `.${swiper.params.slideClass}, swiper-slide`).length > 0 && elementParents(swiper.el, `.${swiper.params.slideActiveClass}`).length === 0) { 16462 return void 0; 16463 } 16464 const el = swiper.el; 16465 const swiperWidth = el.clientWidth; 16466 const swiperHeight = el.clientHeight; 16467 const windowWidth = window2.innerWidth; 16468 const windowHeight = window2.innerHeight; 16469 const swiperOffset = elementOffset(el); 16470 if (rtl) 16471 swiperOffset.left -= el.scrollLeft; 16472 const swiperCoord = [[swiperOffset.left, swiperOffset.top], [swiperOffset.left + swiperWidth, swiperOffset.top], [swiperOffset.left, swiperOffset.top + swiperHeight], [swiperOffset.left + swiperWidth, swiperOffset.top + swiperHeight]]; 16473 for (let i = 0; i < swiperCoord.length; i += 1) { 16474 const point = swiperCoord[i]; 16475 if (point[0] >= 0 && point[0] <= windowWidth && point[1] >= 0 && point[1] <= windowHeight) { 16476 if (point[0] === 0 && point[1] === 0) 16477 continue; 16478 inView = true; 16479 } 16480 } 16481 if (!inView) 16482 return void 0; 16483 } 16484 if (swiper.isHorizontal()) { 16485 if (isPageUp || isPageDown || isArrowLeft || isArrowRight) { 16486 if (e.preventDefault) 16487 e.preventDefault(); 16488 else 16489 e.returnValue = false; 16490 } 16491 if ((isPageDown || isArrowRight) && !rtl || (isPageUp || isArrowLeft) && rtl) 16492 swiper.slideNext(); 16493 if ((isPageUp || isArrowLeft) && !rtl || (isPageDown || isArrowRight) && rtl) 16494 swiper.slidePrev(); 16495 } else { 16496 if (isPageUp || isPageDown || isArrowUp || isArrowDown) { 16497 if (e.preventDefault) 16498 e.preventDefault(); 16499 else 16500 e.returnValue = false; 16501 } 16502 if (isPageDown || isArrowDown) 16503 swiper.slideNext(); 16504 if (isPageUp || isArrowUp) 16505 swiper.slidePrev(); 16506 } 16507 emit("keyPress", kc); 16508 return void 0; 16509 } 16510 function enable() { 16511 if (swiper.keyboard.enabled) 16512 return; 16513 document2.addEventListener("keydown", handle); 16514 swiper.keyboard.enabled = true; 16515 } 16516 function disable() { 16517 if (!swiper.keyboard.enabled) 16518 return; 16519 document2.removeEventListener("keydown", handle); 16520 swiper.keyboard.enabled = false; 16521 } 16522 on("init", () => { 16523 if (swiper.params.keyboard.enabled) { 16524 enable(); 16525 } 16526 }); 16527 on("destroy", () => { 16528 if (swiper.keyboard.enabled) { 16529 disable(); 16530 } 16531 }); 16532 Object.assign(swiper.keyboard, { 16533 enable, 16534 disable 16535 }); 16536 } 16537 16538
vendor: 679 bytes, lines 16538-16557
16538// node_modules/swiper/shared/create-element-if-not-defined.mjs 16539 function createElementIfNotDefined(swiper, originalParams, params, checkProps) { 16540 if (swiper.params.createElements) { 16541 Object.keys(checkProps).forEach((key) => { 16542 if (!params[key] && params.auto === true) { 16543 let element = elementChildren(swiper.el, `.${checkProps[key]}`)[0]; 16544 if (!element) { 16545 element = createElement("div", checkProps[key]); 16546 element.className = checkProps[key]; 16547 swiper.el.append(element); 16548 } 16549 params[key] = element; 16550 originalParams[key] = element; 16551 } 16552 }); 16553 } 16554 return params; 16555 } 16556 16557
vendor: 7,352 bytes, lines 16557-16767
16557// node_modules/swiper/modules/navigation.mjs 16558 var arrowSvg = `<svg class="swiper-navigation-icon" width="11" height="20" viewBox="0 0 11 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.38296 20.0762C0.111788 19.805 0.111788 19.3654 0.38296 19.0942L9.19758 10.2796L0.38296 1.46497C0.111788 1.19379 0.111788 0.754138 0.38296 0.482966C0.654131 0.211794 1.09379 0.211794 1.36496 0.482966L10.4341 9.55214C10.8359 9.9539 10.8359 10.6053 10.4341 11.007L1.36496 20.0762C1.09379 20.3474 0.654131 20.3474 0.38296 20.0762Z" fill="currentColor"/></svg>`; 16559 function Navigation({ 16560 swiper, 16561 extendParams, 16562 on, 16563 emit 16564 }) { 16565 extendParams({ 16566 navigation: { 16567 nextEl: null, 16568 prevEl: null, 16569 addIcons: true, 16570 hideOnClick: false, 16571 disabledClass: "swiper-button-disabled", 16572 hiddenClass: "swiper-button-hidden", 16573 lockClass: "swiper-button-lock", 16574 navigationDisabledClass: "swiper-navigation-disabled" 16575 } 16576 }); 16577 swiper.navigation = { 16578 nextEl: null, 16579 prevEl: null, 16580 arrowSvg 16581 }; 16582 function getEl(el) { 16583 let res; 16584 if (el && typeof el === "string" && swiper.isElement) { 16585 res = swiper.el.querySelector(el) || swiper.hostEl.querySelector(el); 16586 if (res) 16587 return res; 16588 } 16589 if (el) { 16590 if (typeof el === "string") 16591 res = [...document.querySelectorAll(el)]; 16592 if (swiper.params.uniqueNavElements && typeof el === "string" && res && res.length > 1 && swiper.el.querySelectorAll(el).length === 1) { 16593 res = swiper.el.querySelector(el); 16594 } else if (res && res.length === 1) { 16595 res = res[0]; 16596 } 16597 } 16598 if (el && !res) 16599 return el; 16600 return res; 16601 } 16602 function toggleEl(el, disabled) { 16603 const params = swiper.params.navigation; 16604 el = makeElementsArray(el); 16605 el.forEach((subEl) => { 16606 if (subEl) { 16607 subEl.classList[disabled ? "add" : "remove"](...params.disabledClass.split(" ")); 16608 if (subEl.tagName === "BUTTON") 16609 subEl.disabled = disabled; 16610 if (swiper.params.watchOverflow && swiper.enabled) { 16611 subEl.classList[swiper.isLocked ? "add" : "remove"](params.lockClass); 16612 } 16613 } 16614 }); 16615 } 16616 function update2() { 16617 const { 16618 nextEl, 16619 prevEl 16620 } = swiper.navigation; 16621 if (swiper.params.loop) { 16622 toggleEl(prevEl, false); 16623 toggleEl(nextEl, false); 16624 return; 16625 } 16626 toggleEl(prevEl, swiper.isBeginning && !swiper.params.rewind); 16627 toggleEl(nextEl, swiper.isEnd && !swiper.params.rewind); 16628 } 16629 function onPrevClick(e) { 16630 e.preventDefault(); 16631 if (swiper.isBeginning && !swiper.params.loop && !swiper.params.rewind) 16632 return; 16633 swiper.slidePrev(); 16634 emit("navigationPrev"); 16635 } 16636 function onNextClick(e) { 16637 e.preventDefault(); 16638 if (swiper.isEnd && !swiper.params.loop && !swiper.params.rewind) 16639 return; 16640 swiper.slideNext(); 16641 emit("navigationNext"); 16642 } 16643 function init() { 16644 const params = swiper.params.navigation; 16645 swiper.params.navigation = createElementIfNotDefined(swiper, swiper.originalParams.navigation, swiper.params.navigation, { 16646 nextEl: "swiper-button-next", 16647 prevEl: "swiper-button-prev" 16648 }); 16649 if (!(params.nextEl || params.prevEl)) 16650 return; 16651 let nextEl = getEl(params.nextEl); 16652 let prevEl = getEl(params.prevEl); 16653 Object.assign(swiper.navigation, { 16654 nextEl, 16655 prevEl 16656 }); 16657 nextEl = makeElementsArray(nextEl); 16658 prevEl = makeElementsArray(prevEl); 16659 const initButton = (el, dir) => { 16660 if (el) { 16661 if (params.addIcons && el.matches(".swiper-button-next,.swiper-button-prev") && !el.querySelector("svg")) { 16662 const tempEl = document.createElement("div"); 16663 setInnerHTML(tempEl, arrowSvg); 16664 el.appendChild(tempEl.querySelector("svg")); 16665 tempEl.remove(); 16666 } 16667 el.addEventListener("click", dir === "next" ? onNextClick : onPrevClick); 16668 } 16669 if (!swiper.enabled && el) { 16670 el.classList.add(...params.lockClass.split(" ")); 16671 } 16672 }; 16673 nextEl.forEach((el) => initButton(el, "next")); 16674 prevEl.forEach((el) => initButton(el, "prev")); 16675 } 16676 function destroy() { 16677 let { 16678 nextEl, 16679 prevEl 16680 } = swiper.navigation; 16681 nextEl = makeElementsArray(nextEl); 16682 prevEl = makeElementsArray(prevEl); 16683 const destroyButton = (el, dir) => { 16684 el.removeEventListener("click", dir === "next" ? onNextClick : onPrevClick); 16685 el.classList.remove(...swiper.params.navigation.disabledClass.split(" ")); 16686 }; 16687 nextEl.forEach((el) => destroyButton(el, "next")); 16688 prevEl.forEach((el) => destroyButton(el, "prev")); 16689 } 16690 on("init", () => { 16691 if (swiper.params.navigation.enabled === false) { 16692 disable(); 16693 } else { 16694 init(); 16695 update2(); 16696 } 16697 }); 16698 on("toEdge fromEdge lock unlock", () => { 16699 update2(); 16700 }); 16701 on("destroy", () => { 16702 destroy(); 16703 }); 16704 on("enable disable", () => { 16705 let { 16706 nextEl, 16707 prevEl 16708 } = swiper.navigation; 16709 nextEl = makeElementsArray(nextEl); 16710 prevEl = makeElementsArray(prevEl); 16711 if (swiper.enabled) { 16712 update2(); 16713 return; 16714 } 16715 [...nextEl, ...prevEl].filter((el) => !!el).forEach((el) => el.classList.add(swiper.params.navigation.lockClass)); 16716 }); 16717 on("click", (_s, e) => { 16718 let { 16719 nextEl, 16720 prevEl 16721 } = swiper.navigation; 16722 nextEl = makeElementsArray(nextEl); 16723 prevEl = makeElementsArray(prevEl); 16724 const targetEl = e.target; 16725 let targetIsButton = prevEl.includes(targetEl) || nextEl.includes(targetEl); 16726 if (swiper.isElement && !targetIsButton) { 16727 const path = e.path || e.composedPath && e.composedPath(); 16728 if (path) { 16729 targetIsButton = path.find((pathEl) => nextEl.includes(pathEl) || prevEl.includes(pathEl)); 16730 } 16731 } 16732 if (swiper.params.navigation.hideOnClick && !targetIsButton) { 16733 if (swiper.pagination && swiper.params.pagination && swiper.params.pagination.clickable && (swiper.pagination.el === targetEl || swiper.pagination.el.contains(targetEl))) 16734 return; 16735 let isHidden; 16736 if (nextEl.length) { 16737 isHidden = nextEl[0].classList.contains(swiper.params.navigation.hiddenClass); 16738 } else if (prevEl.length) { 16739 isHidden = prevEl[0].classList.contains(swiper.params.navigation.hiddenClass); 16740 } 16741 if (isHidden === true) { 16742 emit("navigationShow"); 16743 } else { 16744 emit("navigationHide"); 16745 } 16746 [...nextEl, ...prevEl].filter((el) => !!el).forEach((el) => el.classList.toggle(swiper.params.navigation.hiddenClass)); 16747 } 16748 }); 16749 const enable = () => { 16750 swiper.el.classList.remove(...swiper.params.navigation.navigationDisabledClass.split(" ")); 16751 init(); 16752 update2(); 16753 }; 16754 const disable = () => { 16755 swiper.el.classList.add(...swiper.params.navigation.navigationDisabledClass.split(" ")); 16756 destroy(); 16757 }; 16758 Object.assign(swiper.navigation, { 16759 enable, 16760 disable, 16761 update: update2, 16762 init, 16763 destroy 16764 }); 16765 } 16766 16767
vendor: 2,008 bytes, lines 16767-16829
16767// node_modules/swiper/shared/effect-init.mjs 16768 function effectInit(params) { 16769 const { 16770 effect, 16771 swiper, 16772 on, 16773 setTranslate: setTranslate2, 16774 setTransition: setTransition2, 16775 overwriteParams, 16776 perspective, 16777 recreateShadows, 16778 getEffectParams 16779 } = params; 16780 on("beforeInit", () => { 16781 if (swiper.params.effect !== effect) 16782 return; 16783 swiper.classNames.push(`${swiper.params.containerModifierClass}${effect}`); 16784 if (perspective && perspective()) { 16785 swiper.classNames.push(`${swiper.params.containerModifierClass}3d`); 16786 } 16787 const overwriteParamsResult = overwriteParams ? overwriteParams() : {}; 16788 Object.assign(swiper.params, overwriteParamsResult); 16789 Object.assign(swiper.originalParams, overwriteParamsResult); 16790 }); 16791 on("setTranslate _virtualUpdated", () => { 16792 if (swiper.params.effect !== effect) 16793 return; 16794 setTranslate2(); 16795 }); 16796 on("setTransition", (_s, duration) => { 16797 if (swiper.params.effect !== effect) 16798 return; 16799 setTransition2(duration); 16800 }); 16801 on("transitionEnd", () => { 16802 if (swiper.params.effect !== effect) 16803 return; 16804 if (recreateShadows) { 16805 if (!getEffectParams || !getEffectParams().slideShadows) 16806 return; 16807 swiper.slides.forEach((slideEl) => { 16808 slideEl.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((shadowEl) => shadowEl.remove()); 16809 }); 16810 recreateShadows(); 16811 } 16812 }); 16813 let requireUpdateOnVirtual; 16814 on("virtualUpdate", () => { 16815 if (swiper.params.effect !== effect) 16816 return; 16817 if (!swiper.slides.length) { 16818 requireUpdateOnVirtual = true; 16819 } 16820 requestAnimationFrame(() => { 16821 if (requireUpdateOnVirtual && swiper.slides && swiper.slides.length) { 16822 setTranslate2(); 16823 requireUpdateOnVirtual = false; 16824 } 16825 }); 16826 }); 16827 } 16828 16829
vendor: 345 bytes, lines 16829-16839
16829// node_modules/swiper/shared/effect-target.mjs 16830 function effectTarget(effectParams, slideEl) { 16831 const transformEl = getSlideTransformEl(slideEl); 16832 if (transformEl !== slideEl) { 16833 transformEl.style.backfaceVisibility = "hidden"; 16834 transformEl.style["-webkit-backface-visibility"] = "hidden"; 16835 } 16836 return transformEl; 16837 } 16838 16839
vendor: 1,432 bytes, lines 16839-16885
16839// node_modules/swiper/shared/effect-virtual-transition-end.mjs 16840 function effectVirtualTransitionEnd({ 16841 swiper, 16842 duration, 16843 transformElements, 16844 allSlides 16845 }) { 16846 const { 16847 activeIndex 16848 } = swiper; 16849 const getSlide = (el) => { 16850 if (!el.parentElement) { 16851 const slide2 = swiper.slides.find((slideEl) => slideEl.shadowRoot && slideEl.shadowRoot === el.parentNode); 16852 return slide2; 16853 } 16854 return el.parentElement; 16855 }; 16856 if (swiper.params.virtualTranslate && duration !== 0) { 16857 let eventTriggered = false; 16858 let transitionEndTarget; 16859 if (allSlides) { 16860 transitionEndTarget = transformElements; 16861 } else { 16862 transitionEndTarget = transformElements.filter((transformEl) => { 16863 const el = transformEl.classList.contains("swiper-slide-transform") ? getSlide(transformEl) : transformEl; 16864 return swiper.getSlideIndex(el) === activeIndex; 16865 }); 16866 } 16867 transitionEndTarget.forEach((el) => { 16868 elementTransitionEnd(el, () => { 16869 if (eventTriggered) 16870 return; 16871 if (!swiper || swiper.destroyed) 16872 return; 16873 eventTriggered = true; 16874 swiper.animating = false; 16875 const evt = new window.CustomEvent("transitionend", { 16876 bubbles: true, 16877 cancelable: true 16878 }); 16879 swiper.wrapperEl.dispatchEvent(evt); 16880 }); 16881 }); 16882 } 16883 } 16884 16885
vendor: 1,762 bytes, lines 16885-16946
16885// node_modules/swiper/modules/effect-fade.mjs 16886 function EffectFade({ 16887 swiper, 16888 extendParams, 16889 on 16890 }) { 16891 extendParams({ 16892 fadeEffect: { 16893 crossFade: false 16894 } 16895 }); 16896 const setTranslate2 = () => { 16897 const { 16898 slides 16899 } = swiper; 16900 const params = swiper.params.fadeEffect; 16901 for (let i = 0; i < slides.length; i += 1) { 16902 const slideEl = swiper.slides[i]; 16903 const offset = slideEl.swiperSlideOffset; 16904 let tx = -offset; 16905 if (!swiper.params.virtualTranslate) 16906 tx -= swiper.translate; 16907 let ty = 0; 16908 if (!swiper.isHorizontal()) { 16909 ty = tx; 16910 tx = 0; 16911 } 16912 const slideOpacity = swiper.params.fadeEffect.crossFade ? Math.max(1 - Math.abs(slideEl.progress), 0) : 1 + Math.min(Math.max(slideEl.progress, -1), 0); 16913 const targetEl = effectTarget(params, slideEl); 16914 targetEl.style.opacity = slideOpacity; 16915 targetEl.style.transform = `translate3d(${tx}px, ${ty}px, 0px)`; 16916 } 16917 }; 16918 const setTransition2 = (duration) => { 16919 const transformElements = swiper.slides.map((slideEl) => getSlideTransformEl(slideEl)); 16920 transformElements.forEach((el) => { 16921 el.style.transitionDuration = `${duration}ms`; 16922 }); 16923 effectVirtualTransitionEnd({ 16924 swiper, 16925 duration, 16926 transformElements, 16927 allSlides: true 16928 }); 16929 }; 16930 effectInit({ 16931 effect: "fade", 16932 swiper, 16933 on, 16934 setTranslate: setTranslate2, 16935 setTransition: setTransition2, 16936 overwriteParams: () => ({ 16937 slidesPerView: 1, 16938 slidesPerGroup: 1, 16939 watchSlidesProgress: true, 16940 spaceBetween: 0, 16941 virtualTranslate: !swiper.params.cssMode 16942 }) 16943 }); 16944 } 16945 16946
16946// src/js/components/course-tee-slider.js 16947 function handleCourseTeeSlider() { 16948 const el = document.querySelector(".section-course-tee-slider"); 16949 if (!el) 16950 return; 16951 const mobileSwiperCourseInfoCont = el.querySelector(".mobile-swiper-course-info"); 16952 const mobileTeesSlider = el.querySelector(".mobile-swiper-course-tees-slider"); 16953 const mobileTeesContainer = mobileTeesSlider.querySelector(".swiper-wrapper"); 16954 const mobileTeesSlides = Array.from(mobileTeesContainer.querySelectorAll(".swiper-slide")); 16955 const mobileSwiperCourseInfoNext = mobileSwiperCourseInfoCont.querySelector(".swiper-button-next"); 16956 const mobileSwiperCourseInfoPrev = mobileSwiperCourseInfoCont.querySelector(".swiper-button-prev"); 16957 const desktopSwiperCourseInfoCont = el.querySelector(".desktop-swiper-course-info"); 16958 const desktopTeesSlider = el.querySelector(".desktop-course-tees-slider"); 16959 const desktopTeesContainer = desktopTeesSlider.querySelector(".wrapper"); 16960 const desktopTeesSlides = Array.from(desktopTeesContainer.querySelectorAll(".slide")); 16961 const desktopSwiperCourseInfoNext = desktopSwiperCourseInfoCont.querySelector(".swiper-button-next"); 16962 const desktopSwiperCourseInfoPrev = desktopSwiperCourseInfoCont.querySelector(".swiper-button-prev"); 16963 const mq = window.matchMedia("(min-width: 992px)"); 16964 let swiperCourseTees = null; 16965 let isSyncing = false; 16966 function initMobileTeesSlider() { 16967 if (swiperCourseTees) { 16968 swiperCourseTees.destroy(true, true); 16969 swiperCourseTees = null; 16970 } 16971 if (!mq.matches) { 16972 swiperCourseTees = new Swiper(mobileTeesSlider, { 16973 speed: 300, 16974 loop: true, 16975 slidesPerView: 3, 16976 centeredSlides: true, 16977 breakpoints: { 16978 768: { 16979 slidesPerView: 5 16980 } 16981 } 16982 }); 16983 swiperCourseTees.on("slideChange", function() { 16984 if (isSyncing) { 16985 isSyncing = false; 16986 return; 16987 } 16988 const activeTeeIndex = this.realIndex; 16989 if (mobileSwiperCourseInfo.realIndex !== activeTeeIndex) { 16990 isSyncing = true; 16991 mobileSwiperCourseInfo.slideToLoop(activeTeeIndex, 300); 16992 } 16993 if (!mq.matches) {
16994 setActiveSlide(activeTeeIndex); 16995 } 16996 }); 16997 } 16998 } 16999 const mobileSwiperCourseInfo = new Swiper(mobileSwiperCourseInfoCont, { 17000 modules: [ 17001 EffectFade, 17002 Keyboard, 17003 Navigation 17004 ], 17005 effect: "fade", 17006 fadeEffect: { 17007 crossFade: true 17008 }, 17009 keyboard: { 17010 enabled: true 17011 }, 17012 navigation: { 17013 nextEl: mobileSwiperCourseInfoNext, 17014 prevEl: mobileSwiperCourseInfoPrev 17015 }, 17016 speed: 300, 17017 slidesPerView: 1, 17018 slidesPerGroup: 1, 17019 loop: true, 17020 loopAdditionalSlides: 1, 17021 breakpoints: { 17022 992: { 17023 loop: false 17024 } 17025 } 17026 }); 17027 mobileSwiperCourseInfo.on("slideChange", function() { 17028 if (isSyncing) 17029 return; 17030 const infoIndex = this.realIndex; 17031 if (swiperCourseTees && swiperCourseTees.realIndex !== infoIndex) { 17032 isSyncing = true; 17033 swiperCourseTees.slideToLoop(infoIndex, 300); 17034 } 17035 }); 17036 mobileSwiperCourseInfo.on("transitionEnd", function() { 17037 isSyncing = false; 17038 }); 17039 const desktopSwiperCourseInfo = new Swiper(desktopSwiperCourseInfoCont, { 17040 modules: [ 17041 EffectFade, 17042 Keyboard, 17043 Navigation 17044 ], 17045 effect: "fade", 17046 fadeEffect: { 17047 crossFade: true 17048 }, 17049 keyboard: { 17050 enabled: true 17051 }, 17052 navigation: { 17053 nextEl: desktopSwiperCourseInfoNext, 17054 prevEl: desktopSwiperCourseInfoPrev 17055 }, 17056 speed: 300, 17057 slidesPerView: 1, 17058 slidesPerGroup: 1, 17059 loop: false, 17060 loopAdditionalSlides: 1 17061 }); 17062 desktopSwiperCourseInfo.on("slideChange", function() { 17063 setActiveSlide(desktopSwiperCourseInfo.realIndex); 17064 }); 17065 function handleTeesClickMobile(e) { 17066 const clickedSlide = e.currentTarget; 17067 const index = mobileTeesSlides.indexOf(clickedSlide); 17068 if (clickedSlide.classList.contains("swiper-slide-active") && clickedSlide.dataset.href) { 17069 window.location.href = clickedSlide.dataset.href; 17070 } else { 17071 mobileSwiperCourseInfo.slideToLoop(index, 300); 17072 } 17073 } 17074 function handleTeesClickDesktop(e) { 17075 const clickedSlide = e.currentTarget; 17076 const index = desktopTeesSlides.indexOf(clickedSlide); 17077 if (clickedSlide.classList.contains("slide-active") && clickedSlide.dataset.href) { 17078 window.location.href = clickedSlide.dataset.href; 17079 } else { 17080 desktopSwiperCourseInfo.slideToLoop(index, 300); 17081 setActiveSlide(index); 17082 } 17083 } 17084 function attachClickListeners() { 17085 if (mobileTeesSlides.length) { 17086 mobileTeesSlides.forEach((slide2) => { 17087 slide2.removeEventListener("click", handleTeesClickMobile); 17088 slide2.addEventListener("click", handleTeesClickMobile); 17089 }); 17090 } 17091 if (desktopTeesSlides.length) { 17092 desktopTeesSlides.forEach((slide2) => { 17093 slide2.removeEventListener("click", handleTeesClickDesktop); 17094 slide2.addEventListener("click", handleTeesClickDesktop); 17095 }); 17096 } 17097 } 17098 function setActiveSlide(newIndex) { 17099 if (mq.matches && desktopTeesSlides.length) { 17100 desktopTeesSlides.forEach((slide2, idx) => { 17101 slide2.classList.toggle("slide-active", idx === newIndex); 17102 }); 17103 } 17104 } 17105 attachClickListeners(); 17106 setActiveSlide(0); 17107 initMobileTeesSlider(); 17108 mq.addEventListener("change", () => { 17109 if (swiperCourseTees) { 17110 swiperCourseTees.destroy(true, true); 17111 swiperCourseTees = null; 17112 } 17113 initMobileTeesSlider(); 17114 }); 17115 } 17116 if (document.querySelector(".section-course-tee-slider")) { 17117 handleCourseTeeSlider(); 17118 } 17119 17120
vendor: 89,539 bytes, lines 17120-19545
17120// node_modules/@vimeo/player/dist/player.es.js 17121 function _iterableToArrayLimit(arr, i) { 17122 var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; 17123 if (null != _i) { 17124 var _s, _e, _x, _r, _arr = [], _n = true, _d = false; 17125 try { 17126 if (_x = (_i = _i.call(arr)).next, 0 === i) { 17127 if (Object(_i) !== _i) 17128 return; 17129 _n = false; 17130 } else 17131 for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = true) 17132 ; 17133 } catch (err) { 17134 _d = true, _e = err; 17135 } finally { 17136 try { 17137 if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) 17138 return; 17139 } finally { 17140 if (_d) 17141 throw _e; 17142 } 17143 } 17144 return _arr; 17145 } 17146 } 17147 function ownKeys(object, enumerableOnly) { 17148 var keys = Object.keys(object); 17149 if (Object.getOwnPropertySymbols) { 17150 var symbols = Object.getOwnPropertySymbols(object); 17151 enumerableOnly && (symbols = symbols.filter(function(sym) { 17152 return Object.getOwnPropertyDescriptor(object, sym).enumerable; 17153 })), keys.push.apply(keys, symbols); 17154 } 17155 return keys; 17156 } 17157 function _objectSpread2(target) { 17158 for (var i = 1; i < arguments.length; i++) { 17159 var source = null != arguments[i] ? arguments[i] : {}; 17160 i % 2 ? ownKeys(Object(source), true).forEach(function(key) { 17161 _defineProperty(target, key, source[key]); 17162 }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) { 17163 Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); 17164 }); 17165 } 17166 return target; 17167 } 17168 function _regeneratorRuntime() { 17169 _regeneratorRuntime = function() { 17170 return exports; 17171 }; 17172 var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function(obj, key, desc) { 17173 obj[key] = desc.value; 17174 }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; 17175 function define2(obj, key, value) { 17176 return Object.defineProperty(obj, key, { 17177 value, 17178 enumerable: true, 17179 configurable: true, 17180 writable: true 17181 }), obj[key]; 17182 } 17183 try { 17184 define2({}, ""); 17185 } catch (err) { 17186 define2 = function(obj, key, value) { 17187 return obj[key] = value; 17188 }; 17189 } 17190 function wrap(innerFn, outerFn, self2, tryLocsList) { 17191 var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); 17192 return defineProperty(generator, "_invoke", { 17193 value: makeInvokeMethod(innerFn, self2, context) 17194 }), generator; 17195 } 17196 function tryCatch(fn, obj, arg) { 17197 try { 17198 return { 17199 type: "normal", 17200 arg: fn.call(obj, arg) 17201 }; 17202 } catch (err) { 17203 return { 17204 type: "throw", 17205 arg: err 17206 }; 17207 } 17208 } 17209 exports.wrap = wrap; 17210 var ContinueSentinel = {}; 17211 function Generator() { 17212 } 17213 function GeneratorFunction() { 17214 } 17215 function GeneratorFunctionPrototype() { 17216 } 17217 var IteratorPrototype = {}; 17218 define2(IteratorPrototype, iteratorSymbol, function() { 17219 return this; 17220 }); 17221 var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); 17222 NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); 17223 var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); 17224 function defineIteratorMethods(prototype) { 17225 ["next", "throw", "return"].forEach(function(method) { 17226 define2(prototype, method, function(arg) { 17227 return this._invoke(method, arg); 17228 }); 17229 }); 17230 } 17231 function AsyncIterator(generator, PromiseImpl) { 17232 function invoke(method, arg, resolve, reject) { 17233 var record = tryCatch(generator[method], generator, arg); 17234 if ("throw" !== record.type) { 17235 var result = record.arg, value = result.value; 17236 return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function(value2) { 17237 invoke("next", value2, resolve, reject); 17238 }, function(err) { 17239 invoke("throw", err, resolve, reject); 17240 }) : PromiseImpl.resolve(value).then(function(unwrapped) { 17241 result.value = unwrapped, resolve(result); 17242 }, function(error) { 17243 return invoke("throw", error, resolve, reject); 17244 }); 17245 } 17246 reject(record.arg); 17247 } 17248 var previousPromise; 17249 defineProperty(this, "_invoke", { 17250 value: function(method, arg) { 17251 function callInvokeWithMethodAndArg() { 17252 return new PromiseImpl(function(resolve, reject) { 17253 invoke(method, arg, resolve, reject); 17254 }); 17255 } 17256 return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); 17257 } 17258 }); 17259 } 17260 function makeInvokeMethod(innerFn, self2, context) { 17261 var state = "suspendedStart"; 17262 return function(method, arg) { 17263 if ("executing" === state) 17264 throw new Error("Generator is already running"); 17265 if ("completed" === state) { 17266 if ("throw" === method) 17267 throw arg; 17268 return doneResult(); 17269 } 17270 for (context.method = method, context.arg = arg; ; ) { 17271 var delegate = context.delegate; 17272 if (delegate) { 17273 var delegateResult = maybeInvokeDelegate(delegate, context); 17274 if (delegateResult) { 17275 if (delegateResult === ContinueSentinel) 17276 continue; 17277 return delegateResult; 17278 } 17279 } 17280 if ("next" === context.method) 17281 context.sent = context._sent = context.arg; 17282 else if ("throw" === context.method) { 17283 if ("suspendedStart" === state) 17284 throw state = "completed", context.arg; 17285 context.dispatchException(context.arg); 17286 } else 17287 "return" === context.method && context.abrupt("return", context.arg); 17288 state = "executing"; 17289 var record = tryCatch(innerFn, self2, context); 17290 if ("normal" === record.type) { 17291 if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) 17292 continue; 17293 return { 17294 value: record.arg, 17295 done: context.done 17296 }; 17297 } 17298 "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); 17299 } 17300 }; 17301 } 17302 function maybeInvokeDelegate(delegate, context) { 17303 var methodName = context.method, method = delegate.iterator[methodName]; 17304 if (void 0 === method) 17305 return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = void 0, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; 17306 var record = tryCatch(method, delegate.iterator, context.arg); 17307 if ("throw" === record.type) 17308 return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; 17309 var info = record.arg; 17310 return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = void 0), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); 17311 } 17312 function pushTryEntry(locs) { 17313 var entry = { 17314 tryLoc: locs[0] 17315 }; 17316 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); 17317 } 17318 function resetTryEntry(entry) { 17319 var record = entry.completion || {}; 17320 record.type = "normal", delete record.arg, entry.completion = record; 17321 } 17322 function Context(tryLocsList) { 17323 this.tryEntries = [{ 17324 tryLoc: "root" 17325 }], tryLocsList.forEach(pushTryEntry, this), this.reset(true); 17326 } 17327 function values(iterable) { 17328 if (iterable) { 17329 var iteratorMethod = iterable[iteratorSymbol]; 17330 if (iteratorMethod) 17331 return iteratorMethod.call(iterable); 17332 if ("function" == typeof iterable.next) 17333 return iterable; 17334 if (!isNaN(iterable.length)) { 17335 var i = -1, next = function next2() { 17336 for (; ++i < iterable.length; ) 17337 if (hasOwn.call(iterable, i)) 17338 return next2.value = iterable[i], next2.done = false, next2; 17339 return next2.value = void 0, next2.done = true, next2; 17340 }; 17341 return next.next = next; 17342 } 17343 } 17344 return { 17345 next: doneResult 17346 }; 17347 } 17348 function doneResult() { 17349 return { 17350 value: void 0, 17351 done: true 17352 }; 17353 } 17354 return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { 17355 value: GeneratorFunctionPrototype, 17356 configurable: true 17357 }), defineProperty(GeneratorFunctionPrototype, "constructor", { 17358 value: GeneratorFunction, 17359 configurable: true 17360 }), GeneratorFunction.displayName = define2(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function(genFun) { 17361 var ctor = "function" == typeof genFun && genFun.constructor; 17362 return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); 17363 }, exports.mark = function(genFun) { 17364 return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define2(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; 17365 }, exports.awrap = function(arg) { 17366 return { 17367 __await: arg 17368 }; 17369 }, defineIteratorMethods(AsyncIterator.prototype), define2(AsyncIterator.prototype, asyncIteratorSymbol, function() { 17370 return this; 17371 }), exports.AsyncIterator = AsyncIterator, exports.async = function(innerFn, outerFn, self2, tryLocsList, PromiseImpl) { 17372 void 0 === PromiseImpl && (PromiseImpl = Promise); 17373 var iter = new AsyncIterator(wrap(innerFn, outerFn, self2, tryLocsList), PromiseImpl); 17374 return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function(result) { 17375 return result.done ? result.value : iter.next(); 17376 }); 17377 }, defineIteratorMethods(Gp), define2(Gp, toStringTagSymbol, "Generator"), define2(Gp, iteratorSymbol, function() { 17378 return this; 17379 }), define2(Gp, "toString", function() { 17380 return "[object Generator]"; 17381 }), exports.keys = function(val) { 17382 var object = Object(val), keys = []; 17383 for (var key in object) 17384 keys.push(key); 17385 return keys.reverse(), function next() { 17386 for (; keys.length; ) { 17387 var key2 = keys.pop(); 17388 if (key2 in object) 17389 return next.value = key2, next.done = false, next; 17390 } 17391 return next.done = true, next; 17392 }; 17393 }, exports.values = values, Context.prototype = { 17394 constructor: Context, 17395 reset: function(skipTempReset) { 17396 if (this.prev = 0, this.next = 0, this.sent = this._sent = void 0, this.done = false, this.delegate = null, this.method = "next", this.arg = void 0, this.tryEntries.forEach(resetTryEntry), !skipTempReset) 17397 for (var name in this) 17398 "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = void 0); 17399 }, 17400 stop: function() { 17401 this.done = true; 17402 var rootRecord = this.tryEntries[0].completion; 17403 if ("throw" === rootRecord.type) 17404 throw rootRecord.arg; 17405 return this.rval; 17406 }, 17407 dispatchException: function(exception) { 17408 if (this.done) 17409 throw exception; 17410 var context = this; 17411 function handle(loc, caught) { 17412 return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = void 0), !!caught; 17413 } 17414 for (var i = this.tryEntries.length - 1; i >= 0; --i) { 17415 var entry = this.tryEntries[i], record = entry.completion; 17416 if ("root" === entry.tryLoc) 17417 return handle("end"); 17418 if (entry.tryLoc <= this.prev) { 17419 var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); 17420 if (hasCatch && hasFinally) { 17421 if (this.prev < entry.catchLoc) 17422 return handle(entry.catchLoc, true); 17423 if (this.prev < entry.finallyLoc) 17424 return handle(entry.finallyLoc); 17425 } else if (hasCatch) { 17426 if (this.prev < entry.catchLoc) 17427 return handle(entry.catchLoc, true); 17428 } else { 17429 if (!hasFinally) 17430 throw new Error("try statement without catch or finally"); 17431 if (this.prev < entry.finallyLoc) 17432 return handle(entry.finallyLoc); 17433 } 17434 } 17435 } 17436 }, 17437 abrupt: function(type, arg) { 17438 for (var i = this.tryEntries.length - 1; i >= 0; --i) { 17439 var entry = this.tryEntries[i]; 17440 if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { 17441 var finallyEntry = entry; 17442 break; 17443 } 17444 } 17445 finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); 17446 var record = finallyEntry ? finallyEntry.completion : {}; 17447 return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); 17448 }, 17449 complete: function(record, afterLoc) { 17450 if ("throw" === record.type) 17451 throw record.arg; 17452 return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; 17453 }, 17454 finish: function(finallyLoc) { 17455 for (var i = this.tryEntries.length - 1; i >= 0; --i) { 17456 var entry = this.tryEntries[i]; 17457 if (entry.finallyLoc === finallyLoc) 17458 return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; 17459 } 17460 }, 17461 catch: function(tryLoc) { 17462 for (var i = this.tryEntries.length - 1; i >= 0; --i) { 17463 var entry = this.tryEntries[i]; 17464 if (entry.tryLoc === tryLoc) { 17465 var record = entry.completion; 17466 if ("throw" === record.type) { 17467 var thrown = record.arg; 17468 resetTryEntry(entry); 17469 } 17470 return thrown; 17471 } 17472 } 17473 throw new Error("illegal catch attempt"); 17474 }, 17475 delegateYield: function(iterable, resultName, nextLoc) { 17476 return this.delegate = { 17477 iterator: values(iterable), 17478 resultName, 17479 nextLoc 17480 }, "next" === this.method && (this.arg = void 0), ContinueSentinel; 17481 } 17482 }, exports; 17483 } 17484 function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { 17485 try { 17486 var info = gen[key](arg); 17487 var value = info.value; 17488 } catch (error) { 17489 reject(error); 17490 return; 17491 } 17492 if (info.done) { 17493 resolve(value); 17494 } else { 17495 Promise.resolve(value).then(_next, _throw); 17496 } 17497 } 17498 function _asyncToGenerator(fn) { 17499 return function() { 17500 var self2 = this, args = arguments; 17501 return new Promise(function(resolve, reject) { 17502 var gen = fn.apply(self2, args); 17503 function _next(value) { 17504 asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); 17505 } 17506 function _throw(err) { 17507 asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); 17508 } 17509 _next(void 0); 17510 }); 17511 }; 17512 } 17513 function _classCallCheck(instance, Constructor) { 17514 if (!(instance instanceof Constructor)) { 17515 throw new TypeError("Cannot call a class as a function"); 17516 } 17517 } 17518 function _defineProperties(target, props) { 17519 for (var i = 0; i < props.length; i++) { 17520 var descriptor = props[i]; 17521 descriptor.enumerable = descriptor.enumerable || false; 17522 descriptor.configurable = true; 17523 if ("value" in descriptor) 17524 descriptor.writable = true; 17525 Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); 17526 } 17527 } 17528 function _createClass(Constructor, protoProps, staticProps) { 17529 if (protoProps) 17530 _defineProperties(Constructor.prototype, protoProps); 17531 if (staticProps) 17532 _defineProperties(Constructor, staticProps); 17533 Object.defineProperty(Constructor, "prototype", { 17534 writable: false 17535 }); 17536 return Constructor; 17537 } 17538 function _defineProperty(obj, key, value) { 17539 key = _toPropertyKey(key); 17540 if (key in obj) { 17541 Object.defineProperty(obj, key, { 17542 value, 17543 enumerable: true, 17544 configurable: true, 17545 writable: true 17546 }); 17547 } else { 17548 obj[key] = value; 17549 } 17550 return obj; 17551 } 17552 function _inherits(subClass, superClass) { 17553 if (typeof superClass !== "function" && superClass !== null) { 17554 throw new TypeError("Super expression must either be null or a function"); 17555 } 17556 subClass.prototype = Object.create(superClass && superClass.prototype, { 17557 constructor: { 17558 value: subClass, 17559 writable: true, 17560 configurable: true 17561 } 17562 }); 17563 Object.defineProperty(subClass, "prototype", { 17564 writable: false 17565 }); 17566 if (superClass) 17567 _setPrototypeOf(subClass, superClass); 17568 } 17569 function _getPrototypeOf(o) { 17570 _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o2) { 17571 return o2.__proto__ || Object.getPrototypeOf(o2); 17572 }; 17573 return _getPrototypeOf(o); 17574 } 17575 function _setPrototypeOf(o, p) { 17576 _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) { 17577 o2.__proto__ = p2; 17578 return o2; 17579 }; 17580 return _setPrototypeOf(o, p); 17581 } 17582 function _isNativeReflectConstruct() { 17583 if (typeof Reflect === "undefined" || !Reflect.construct) 17584 return false; 17585 if (Reflect.construct.sham) 17586 return false; 17587 if (typeof Proxy === "function") 17588 return true; 17589 try { 17590 Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { 17591 })); 17592 return true; 17593 } catch (e) { 17594 return false; 17595 } 17596 } 17597 function _construct(Parent, args, Class) { 17598 if (_isNativeReflectConstruct()) { 17599 _construct = Reflect.construct.bind(); 17600 } else { 17601 _construct = function _construct2(Parent2, args2, Class2) { 17602 var a = [null]; 17603 a.push.apply(a, args2); 17604 var Constructor = Function.bind.apply(Parent2, a); 17605 var instance = new Constructor(); 17606 if (Class2) 17607 _setPrototypeOf(instance, Class2.prototype); 17608 return instance; 17609 }; 17610 } 17611 return _construct.apply(null, arguments); 17612 } 17613 function _isNativeFunction(fn) { 17614 return Function.toString.call(fn).indexOf("[native code]") !== -1; 17615 } 17616 function _wrapNativeSuper(Class) { 17617 var _cache = typeof Map === "function" ? /* @__PURE__ */ new Map() : void 0; 17618 _wrapNativeSuper = function _wrapNativeSuper2(Class2) { 17619 if (Class2 === null || !_isNativeFunction(Class2)) 17620 return Class2; 17621 if (typeof Class2 !== "function") { 17622 throw new TypeError("Super expression must either be null or a function"); 17623 } 17624 if (typeof _cache !== "undefined") { 17625 if (_cache.has(Class2)) 17626 return _cache.get(Class2); 17627 _cache.set(Class2, Wrapper); 17628 } 17629 function Wrapper() { 17630 return _construct(Class2, arguments, _getPrototypeOf(this).constructor); 17631 } 17632 Wrapper.prototype = Object.create(Class2.prototype, { 17633 constructor: { 17634 value: Wrapper, 17635 enumerable: false, 17636 writable: true, 17637 configurable: true 17638 } 17639 }); 17640 return _setPrototypeOf(Wrapper, Class2); 17641 }; 17642 return _wrapNativeSuper(Class); 17643 } 17644 function _assertThisInitialized(self2) { 17645 if (self2 === void 0) { 17646 throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 17647 } 17648 return self2; 17649 } 17650 function _possibleConstructorReturn(self2, call) { 17651 if (call && (typeof call === "object" || typeof call === "function")) { 17652 return call; 17653 } else if (call !== void 0) { 17654 throw new TypeError("Derived constructors may only return object or undefined"); 17655 } 17656 return _assertThisInitialized(self2); 17657 } 17658 function _createSuper(Derived) { 17659 var hasNativeReflectConstruct = _isNativeReflectConstruct(); 17660 return function _createSuperInternal() { 17661 var Super = _getPrototypeOf(Derived), result; 17662 if (hasNativeReflectConstruct) { 17663 var NewTarget = _getPrototypeOf(this).constructor; 17664 result = Reflect.construct(Super, arguments, NewTarget); 17665 } else { 17666 result = Super.apply(this, arguments); 17667 } 17668 return _possibleConstructorReturn(this, result); 17669 }; 17670 } 17671 function _slicedToArray(arr, i) { 17672 return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); 17673 } 17674 function _arrayWithHoles(arr) { 17675 if (Array.isArray(arr)) 17676 return arr; 17677 } 17678 function _unsupportedIterableToArray(o, minLen) { 17679 if (!o) 17680 return; 17681 if (typeof o === "string") 17682 return _arrayLikeToArray(o, minLen); 17683 var n = Object.prototype.toString.call(o).slice(8, -1); 17684 if (n === "Object" && o.constructor) 17685 n = o.constructor.name; 17686 if (n === "Map" || n === "Set") 17687 return Array.from(o); 17688 if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) 17689 return _arrayLikeToArray(o, minLen); 17690 } 17691 function _arrayLikeToArray(arr, len) { 17692 if (len == null || len > arr.length) 17693 len = arr.length; 17694 for (var i = 0, arr2 = new Array(len); i < len; i++) 17695 arr2[i] = arr[i]; 17696 return arr2; 17697 } 17698 function _nonIterableRest() { 17699 throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); 17700 } 17701 function _toPrimitive(input, hint) { 17702 if (typeof input !== "object" || input === null) 17703 return input; 17704 var prim = input[Symbol.toPrimitive]; 17705 if (prim !== void 0) { 17706 var res = prim.call(input, hint || "default"); 17707 if (typeof res !== "object") 17708 return res; 17709 throw new TypeError("@@toPrimitive must return a primitive value."); 17710 } 17711 return (hint === "string" ? String : Number)(input); 17712 } 17713 function _toPropertyKey(arg) { 17714 var key = _toPrimitive(arg, "string"); 17715 return typeof key === "symbol" ? key : String(key); 17716 } 17717 var isNode2 = typeof global !== "undefined" && {}.toString.call(global) === "[object global]"; 17718 var isBun = typeof Bun !== "undefined"; 17719 var isDeno = typeof Deno !== "undefined"; 17720 var isServerRuntime = isNode2 || isBun || isDeno; 17721 function getMethodName(prop, type) { 17722 if (prop.indexOf(type.toLowerCase()) === 0) { 17723 return prop; 17724 } 17725 return "".concat(type.toLowerCase()).concat(prop.substr(0, 1).toUpperCase()).concat(prop.substr(1)); 17726 } 17727 function isDomElement(element) { 17728 return Boolean(element && element.nodeType === 1 && "nodeName" in element && element.ownerDocument && element.ownerDocument.defaultView); 17729 } 17730 function isInteger(value) { 17731 return !isNaN(parseFloat(value)) && isFinite(value) && Math.floor(value) == value; 17732 } 17733 function isVimeoUrl(url) { 17734 return /^(https?:)?\/\/((((player|www)\.)?vimeo\.com)|((player\.)?[a-zA-Z0-9-]+\.(videoji\.(hk|cn)|vimeo\.work)))(?=$|\/)/.test(url); 17735 } 17736 function isVimeoEmbed(url) { 17737 var expr = /^https:\/\/player\.((vimeo\.com)|([a-zA-Z0-9-]+\.(videoji\.(hk|cn)|vimeo\.work)))\/video\/\d+/; 17738 return expr.test(url); 17739 } 17740 function getOembedDomain(url) { 17741 var match = (url || "").match(/^(?:https?:)?(?:\/\/)?([^/?]+)/); 17742 var domain = (match && match[1] || "").replace("player.", ""); 17743 var customDomains = [".videoji.hk", ".vimeo.work", ".videoji.cn"]; 17744 for (var _i = 0, _customDomains = customDomains; _i < _customDomains.length; _i++) { 17745 var customDomain = _customDomains[_i]; 17746 if (domain.endsWith(customDomain)) { 17747 return domain; 17748 } 17749 } 17750 return "vimeo.com"; 17751 } 17752 function getVimeoUrl() { 17753 var oEmbedParameters2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; 17754 var id = oEmbedParameters2.id; 17755 var url = oEmbedParameters2.url; 17756 var idOrUrl = id || url; 17757 if (!idOrUrl) { 17758 throw new Error("An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute."); 17759 } 17760 if (isInteger(idOrUrl)) { 17761 return "https://vimeo.com/".concat(idOrUrl); 17762 } 17763 if (isVimeoUrl(idOrUrl)) { 17764 return idOrUrl.replace("http:", "https:"); 17765 } 17766 if (id) { 17767 throw new TypeError("\u201C".concat(id, "\u201D is not a valid video id.")); 17768 } 17769 throw new TypeError("\u201C".concat(idOrUrl, "\u201D is not a vimeo.com url.")); 17770 } 17771 var subscribe = function subscribe2(target, eventName, callback) { 17772 var onName = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "addEventListener"; 17773 var offName = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : "removeEventListener"; 17774 var eventNames = typeof eventName === "string" ? [eventName] : eventName; 17775 eventNames.forEach(function(evName) { 17776 target[onName](evName, callback); 17777 }); 17778 return { 17779 cancel: function cancel() { 17780 return eventNames.forEach(function(evName) { 17781 return target[offName](evName, callback); 17782 }); 17783 } 17784 }; 17785 }; 17786 function findIframeBySourceWindow(sourceWindow) { 17787 var doc = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : document; 17788 if (!sourceWindow || !doc || typeof doc.querySelectorAll !== "function") { 17789 return null; 17790 } 17791 var iframes = doc.querySelectorAll("iframe"); 17792 for (var i = 0; i < iframes.length; i++) { 17793 if (iframes[i] && iframes[i].contentWindow === sourceWindow) { 17794 return iframes[i]; 17795 } 17796 } 17797 return null; 17798 } 17799 var arrayIndexOfSupport = typeof Array.prototype.indexOf !== "undefined"; 17800 var postMessageSupport = typeof window !== "undefined" && typeof window.postMessage !== "undefined"; 17801 if (!isServerRuntime && (!arrayIndexOfSupport || !postMessageSupport)) { 17802 throw new Error("Sorry, the Vimeo Player API is not available in this browser."); 17803 } 17804 var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {}; 17805 function createCommonjsModule(fn, module) { 17806 return module = { exports: {} }, fn(module, module.exports), module.exports; 17807 } 17808 (function(self2) { 17809 if (self2.WeakMap) { 17810 return; 17811 } 17812 var hasOwnProperty = Object.prototype.hasOwnProperty; 17813 var hasDefine = Object.defineProperty && function() { 17814 try { 17815 return Object.defineProperty({}, "x", { 17816 value: 1 17817 }).x === 1; 17818 } catch (e) { 17819 } 17820 }(); 17821 var defineProperty = function(object, name, value) { 17822 if (hasDefine) { 17823 Object.defineProperty(object, name, { 17824 configurable: true, 17825 writable: true, 17826 value 17827 }); 17828 } else { 17829 object[name] = value; 17830 } 17831 }; 17832 self2.WeakMap = function() { 17833 function WeakMap2() { 17834 if (this === void 0) { 17835 throw new TypeError("Constructor WeakMap requires 'new'"); 17836 } 17837 defineProperty(this, "_id", genId("_WeakMap")); 17838 if (arguments.length > 0) { 17839 throw new TypeError("WeakMap iterable is not supported"); 17840 } 17841 } 17842 defineProperty(WeakMap2.prototype, "delete", function(key) { 17843 checkInstance(this, "delete"); 17844 if (!isObject3(key)) { 17845 return false; 17846 } 17847 var entry = key[this._id]; 17848 if (entry && entry[0] === key) { 17849 delete key[this._id]; 17850 return true; 17851 } 17852 return false; 17853 }); 17854 defineProperty(WeakMap2.prototype, "get", function(key) { 17855 checkInstance(this, "get"); 17856 if (!isObject3(key)) { 17857 return void 0; 17858 } 17859 var entry = key[this._id]; 17860 if (entry && entry[0] === key) { 17861 return entry[1]; 17862 } 17863 return void 0; 17864 }); 17865 defineProperty(WeakMap2.prototype, "has", function(key) { 17866 checkInstance(this, "has"); 17867 if (!isObject3(key)) { 17868 return false; 17869 } 17870 var entry = key[this._id]; 17871 if (entry && entry[0] === key) { 17872 return true; 17873 } 17874 return false; 17875 }); 17876 defineProperty(WeakMap2.prototype, "set", function(key, value) { 17877 checkInstance(this, "set"); 17878 if (!isObject3(key)) { 17879 throw new TypeError("Invalid value used as weak map key"); 17880 } 17881 var entry = key[this._id]; 17882 if (entry && entry[0] === key) { 17883 entry[1] = value; 17884 return this; 17885 } 17886 defineProperty(key, this._id, [key, value]); 17887 return this; 17888 }); 17889 function checkInstance(x, methodName) { 17890 if (!isObject3(x) || !hasOwnProperty.call(x, "_id")) { 17891 throw new TypeError(methodName + " method called on incompatible receiver " + typeof x); 17892 } 17893 } 17894 function genId(prefix) { 17895 return prefix + "_" + rand() + "." + rand(); 17896 } 17897 function rand() { 17898 return Math.random().toString().substring(2); 17899 } 17900 defineProperty(WeakMap2, "_polyfill", true); 17901 return WeakMap2; 17902 }(); 17903 function isObject3(x) { 17904 return Object(x) === x; 17905 } 17906 })(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof commonjsGlobal !== "undefined" ? commonjsGlobal : commonjsGlobal); 17907 var npo_src = createCommonjsModule(function(module) { 17908 (function UMD(name, context, definition) { 17909 context[name] = context[name] || definition(); 17910 if (module.exports) { 17911 module.exports = context[name]; 17912 } 17913 })("Promise", typeof commonjsGlobal != "undefined" ? commonjsGlobal : commonjsGlobal, function DEF() { 17914 var builtInProp, cycle, scheduling_queue, ToString = Object.prototype.toString, timer = typeof setImmediate != "undefined" ? function timer2(fn) { 17915 return setImmediate(fn); 17916 } : setTimeout; 17917 try { 17918 Object.defineProperty({}, "x", {}); 17919 builtInProp = function builtInProp2(obj, name, val, config) { 17920 return Object.defineProperty(obj, name, { 17921 value: val, 17922 writable: true, 17923 configurable: config !== false 17924 }); 17925 }; 17926 } catch (err) { 17927 builtInProp = function builtInProp2(obj, name, val) { 17928 obj[name] = val; 17929 return obj; 17930 }; 17931 } 17932 scheduling_queue = function Queue() { 17933 var first, last, item; 17934 function Item(fn, self2) { 17935 this.fn = fn; 17936 this.self = self2; 17937 this.next = void 0; 17938 } 17939 return { 17940 add: function add(fn, self2) { 17941 item = new Item(fn, self2); 17942 if (last) { 17943 last.next = item; 17944 } else { 17945 first = item; 17946 } 17947 last = item; 17948 item = void 0; 17949 }, 17950 drain: function drain() { 17951 var f = first; 17952 first = last = cycle = void 0; 17953 while (f) { 17954 f.fn.call(f.self); 17955 f = f.next; 17956 } 17957 } 17958 }; 17959 }(); 17960 function schedule(fn, self2) { 17961 scheduling_queue.add(fn, self2); 17962 if (!cycle) { 17963 cycle = timer(scheduling_queue.drain); 17964 } 17965 } 17966 function isThenable(o) { 17967 var _then, o_type = typeof o; 17968 if (o != null && (o_type == "object" || o_type == "function")) { 17969 _then = o.then; 17970 } 17971 return typeof _then == "function" ? _then : false; 17972 } 17973 function notify() { 17974 for (var i = 0; i < this.chain.length; i++) { 17975 notifyIsolated(this, this.state === 1 ? this.chain[i].success : this.chain[i].failure, this.chain[i]); 17976 } 17977 this.chain.length = 0; 17978 } 17979 function notifyIsolated(self2, cb, chain) { 17980 var ret, _then; 17981 try { 17982 if (cb === false) { 17983 chain.reject(self2.msg); 17984 } else { 17985 if (cb === true) { 17986 ret = self2.msg; 17987 } else { 17988 ret = cb.call(void 0, self2.msg); 17989 } 17990 if (ret === chain.promise) { 17991 chain.reject(TypeError("Promise-chain cycle")); 17992 } else if (_then = isThenable(ret)) { 17993 _then.call(ret, chain.resolve, chain.reject); 17994 } else { 17995 chain.resolve(ret); 17996 } 17997 } 17998 } catch (err) { 17999 chain.reject(err); 18000 } 18001 } 18002 function resolve(msg) { 18003 var _then, self2 = this; 18004 if (self2.triggered) { 18005 return; 18006 } 18007 self2.triggered = true; 18008 if (self2.def) { 18009 self2 = self2.def; 18010 } 18011 try { 18012 if (_then = isThenable(msg)) { 18013 schedule(function() { 18014 var def_wrapper = new MakeDefWrapper(self2); 18015 try { 18016 _then.call(msg, function $resolve$() { 18017 resolve.apply(def_wrapper, arguments); 18018 }, function $reject$() { 18019 reject.apply(def_wrapper, arguments); 18020 }); 18021 } catch (err) { 18022 reject.call(def_wrapper, err); 18023 } 18024 }); 18025 } else { 18026 self2.msg = msg; 18027 self2.state = 1; 18028 if (self2.chain.length > 0) { 18029 schedule(notify, self2); 18030 } 18031 } 18032 } catch (err) { 18033 reject.call(new MakeDefWrapper(self2), err); 18034 } 18035 } 18036 function reject(msg) { 18037 var self2 = this; 18038 if (self2.triggered) { 18039 return; 18040 } 18041 self2.triggered = true; 18042 if (self2.def) { 18043 self2 = self2.def; 18044 } 18045 self2.msg = msg; 18046 self2.state = 2; 18047 if (self2.chain.length > 0) { 18048 schedule(notify, self2); 18049 } 18050 } 18051 function iteratePromises(Constructor, arr, resolver, rejecter) { 18052 for (var idx = 0; idx < arr.length; idx++) { 18053 (function IIFE(idx2) { 18054 Constructor.resolve(arr[idx2]).then(function $resolver$(msg) { 18055 resolver(idx2, msg); 18056 }, rejecter); 18057 })(idx); 18058 } 18059 } 18060 function MakeDefWrapper(self2) { 18061 this.def = self2; 18062 this.triggered = false; 18063 } 18064 function MakeDef(self2) { 18065 this.promise = self2; 18066 this.state = 0; 18067 this.triggered = false; 18068 this.chain = []; 18069 this.msg = void 0; 18070 } 18071 function Promise2(executor) { 18072 if (typeof executor != "function") { 18073 throw TypeError("Not a function"); 18074 } 18075 if (this.__NPO__ !== 0) { 18076 throw TypeError("Not a promise"); 18077 } 18078 this.__NPO__ = 1; 18079 var def = new MakeDef(this); 18080 this["then"] = function then(success, failure) { 18081 var o = { 18082 success: typeof success == "function" ? success : true, 18083 failure: typeof failure == "function" ? failure : false 18084 }; 18085 o.promise = new this.constructor(function extractChain(resolve2, reject2) { 18086 if (typeof resolve2 != "function" || typeof reject2 != "function") { 18087 throw TypeError("Not a function"); 18088 } 18089 o.resolve = resolve2; 18090 o.reject = reject2; 18091 }); 18092 def.chain.push(o); 18093 if (def.state !== 0) { 18094 schedule(notify, def); 18095 } 18096 return o.promise; 18097 }; 18098 this["catch"] = function $catch$(failure) { 18099 return this.then(void 0, failure); 18100 }; 18101 try { 18102 executor.call(void 0, function publicResolve(msg) { 18103 resolve.call(def, msg); 18104 }, function publicReject(msg) { 18105 reject.call(def, msg); 18106 }); 18107 } catch (err) { 18108 reject.call(def, err); 18109 } 18110 } 18111 var PromisePrototype = builtInProp({}, "constructor", Promise2, false); 18112 Promise2.prototype = PromisePrototype; 18113 builtInProp(PromisePrototype, "__NPO__", 0, false); 18114 builtInProp(Promise2, "resolve", function Promise$resolve(msg) { 18115 var Constructor = this; 18116 if (msg && typeof msg == "object" && msg.__NPO__ === 1) { 18117 return msg; 18118 } 18119 return new Constructor(function executor(resolve2, reject2) { 18120 if (typeof resolve2 != "function" || typeof reject2 != "function") { 18121 throw TypeError("Not a function"); 18122 } 18123 resolve2(msg); 18124 }); 18125 }); 18126 builtInProp(Promise2, "reject", function Promise$reject(msg) { 18127 return new this(function executor(resolve2, reject2) { 18128 if (typeof resolve2 != "function" || typeof reject2 != "function") { 18129 throw TypeError("Not a function"); 18130 } 18131 reject2(msg); 18132 }); 18133 }); 18134 builtInProp(Promise2, "all", function Promise$all(arr) { 18135 var Constructor = this; 18136 if (ToString.call(arr) != "[object Array]") { 18137 return Constructor.reject(TypeError("Not an array")); 18138 } 18139 if (arr.length === 0) { 18140 return Constructor.resolve([]); 18141 } 18142 return new Constructor(function executor(resolve2, reject2) { 18143 if (typeof resolve2 != "function" || typeof reject2 != "function") { 18144 throw TypeError("Not a function"); 18145 } 18146 var len = arr.length, msgs = Array(len), count = 0; 18147 iteratePromises(Constructor, arr, function resolver(idx, msg) { 18148 msgs[idx] = msg; 18149 if (++count === len) { 18150 resolve2(msgs); 18151 } 18152 }, reject2); 18153 }); 18154 }); 18155 builtInProp(Promise2, "race", function Promise$race(arr) { 18156 var Constructor = this; 18157 if (ToString.call(arr) != "[object Array]") { 18158 return Constructor.reject(TypeError("Not an array")); 18159 } 18160 return new Constructor(function executor(resolve2, reject2) { 18161 if (typeof resolve2 != "function" || typeof reject2 != "function") { 18162 throw TypeError("Not a function"); 18163 } 18164 iteratePromises(Constructor, arr, function resolver(idx, msg) { 18165 resolve2(msg); 18166 }, reject2); 18167 }); 18168 }); 18169 return Promise2; 18170 }); 18171 }); 18172 var callbackMap = /* @__PURE__ */ new WeakMap(); 18173 function storeCallback(player, name, callback) { 18174 var playerCallbacks = callbackMap.get(player.element) || {}; 18175 if (!(name in playerCallbacks)) { 18176 playerCallbacks[name] = []; 18177 } 18178 playerCallbacks[name].push(callback); 18179 callbackMap.set(player.element, playerCallbacks); 18180 } 18181 function getCallbacks(player, name) { 18182 var playerCallbacks = callbackMap.get(player.element) || {}; 18183 return playerCallbacks[name] || []; 18184 } 18185 function removeCallback(player, name, callback) { 18186 var playerCallbacks = callbackMap.get(player.element) || {}; 18187 if (!playerCallbacks[name]) { 18188 return true; 18189 } 18190 if (!callback) { 18191 playerCallbacks[name] = []; 18192 callbackMap.set(player.element, playerCallbacks); 18193 return true; 18194 } 18195 var index = playerCallbacks[name].indexOf(callback); 18196 if (index !== -1) { 18197 playerCallbacks[name].splice(index, 1); 18198 } 18199 callbackMap.set(player.element, playerCallbacks); 18200 return playerCallbacks[name] && playerCallbacks[name].length === 0; 18201 } 18202 function shiftCallbacks(player, name) { 18203 var playerCallbacks = getCallbacks(player, name); 18204 if (playerCallbacks.length < 1) { 18205 return false; 18206 } 18207 var callback = playerCallbacks.shift(); 18208 removeCallback(player, name, callback); 18209 return callback; 18210 } 18211 function swapCallbacks(oldElement, newElement) { 18212 var playerCallbacks = callbackMap.get(oldElement); 18213 callbackMap.set(newElement, playerCallbacks); 18214 callbackMap.delete(oldElement); 18215 } 18216 function parseMessageData(data) { 18217 if (typeof data === "string") { 18218 try { 18219 data = JSON.parse(data); 18220 } catch (error) { 18221 console.warn(error); 18222 return {}; 18223 } 18224 } 18225 return data; 18226 } 18227 function postMessage(player, method, params) { 18228 if (!player.element.contentWindow || !player.element.contentWindow.postMessage) { 18229 return; 18230 } 18231 var message = { 18232 method 18233 }; 18234 if (params !== void 0) { 18235 message.value = params; 18236 } 18237 var ieVersion = parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\d+).*$/, "$1")); 18238 if (ieVersion >= 8 && ieVersion < 10) { 18239 message = JSON.stringify(message); 18240 } 18241 player.element.contentWindow.postMessage(message, player.origin); 18242 } 18243 function processData(player, data) { 18244 data = parseMessageData(data); 18245 var callbacks = []; 18246 var param; 18247 if (data.event) { 18248 if (data.event === "error") { 18249 var promises = getCallbacks(player, data.data.method); 18250 promises.forEach(function(promise) { 18251 var error = new Error(data.data.message); 18252 error.name = data.data.name; 18253 promise.reject(error); 18254 removeCallback(player, data.data.method, promise); 18255 }); 18256 } 18257 callbacks = getCallbacks(player, "event:".concat(data.event)); 18258 param = data.data; 18259 } else if (data.method) { 18260 var callback = shiftCallbacks(player, data.method); 18261 if (callback) { 18262 callbacks.push(callback); 18263 param = data.value; 18264 } 18265 } 18266 callbacks.forEach(function(callback2) { 18267 try { 18268 if (typeof callback2 === "function") { 18269 callback2.call(player, param); 18270 return; 18271 } 18272 callback2.resolve(param); 18273 } catch (e) { 18274 } 18275 }); 18276 } 18277 var oEmbedParameters = ["airplay", "audio_tracks", "audiotrack", "autopause", "autoplay", "background", "byline", "cc", "chapter_id", "chapters", "chromecast", "color", "colors", "controls", "dnt", "end_time", "fullscreen", "height", "id", "initial_quality", "interactive_params", "keyboard", "loop", "maxheight", "max_quality", "maxwidth", "min_quality", "muted", "play_button_position", "playsinline", "portrait", "preload", "progress_bar", "quality", "quality_selector", "responsive", "skipping_forward", "speed", "start_time", "texttrack", "thumbnail_id", "title", "transcript", "transparent", "unmute_button", "url", "vimeo_logo", "volume", "watch_full_video", "width"]; 18278 function getOEmbedParameters(element) { 18279 var defaults2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; 18280 return oEmbedParameters.reduce(function(params, param) { 18281 var value = element.getAttribute("data-vimeo-".concat(param)); 18282 if (value || value === "") { 18283 params[param] = value === "" ? 1 : value; 18284 } 18285 return params; 18286 }, defaults2); 18287 } 18288 function createEmbed(_ref, element) { 18289 var html = _ref.html; 18290 if (!element) { 18291 throw new TypeError("An element must be provided"); 18292 } 18293 if (element.getAttribute("data-vimeo-initialized") !== null) { 18294 return element.querySelector("iframe"); 18295 } 18296 var div = document.createElement("div"); 18297 div.innerHTML = html; 18298 element.appendChild(div.firstChild); 18299 element.setAttribute("data-vimeo-initialized", "true"); 18300 return element.querySelector("iframe"); 18301 } 18302 function getOEmbedData(videoUrl) { 18303 var params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; 18304 var element = arguments.length > 2 ? arguments[2] : void 0; 18305 return new Promise(function(resolve, reject) { 18306 if (!isVimeoUrl(videoUrl)) { 18307 throw new TypeError("\u201C".concat(videoUrl, "\u201D is not a vimeo.com url.")); 18308 } 18309 var domain = getOembedDomain(videoUrl); 18310 var url = "https://".concat(domain, "/api/oembed.json?url=").concat(encodeURIComponent(videoUrl)); 18311 for (var param in params) { 18312 if (params.hasOwnProperty(param)) { 18313 url += "&".concat(param, "=").concat(encodeURIComponent(params[param])); 18314 } 18315 } 18316 var xhr = "XDomainRequest" in window ? new XDomainRequest() : new XMLHttpRequest(); 18317 xhr.open("GET", url, true); 18318 xhr.onload = function() { 18319 if (xhr.status === 404) { 18320 reject(new Error("\u201C".concat(videoUrl, "\u201D was not found."))); 18321 return; 18322 } 18323 if (xhr.status === 403) { 18324 reject(new Error("\u201C".concat(videoUrl, "\u201D is not embeddable."))); 18325 return; 18326 } 18327 try { 18328 var json = JSON.parse(xhr.responseText); 18329 if (json.domain_status_code === 403) { 18330 createEmbed(json, element); 18331 reject(new Error("\u201C".concat(videoUrl, "\u201D is not embeddable."))); 18332 return; 18333 } 18334 resolve(json); 18335 } catch (error) { 18336 reject(error); 18337 } 18338 }; 18339 xhr.onerror = function() { 18340 var status = xhr.status ? " (".concat(xhr.status, ")") : ""; 18341 reject(new Error("There was an error fetching the embed code from Vimeo".concat(status, "."))); 18342 }; 18343 xhr.send(); 18344 }); 18345 } 18346 function initializeEmbeds() { 18347 var parent = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : document; 18348 var elements = [].slice.call(parent.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")); 18349 var handleError = function handleError2(error) { 18350 if ("console" in window && console.error) { 18351 console.error("There was an error creating an embed: ".concat(error)); 18352 } 18353 }; 18354 elements.forEach(function(element) { 18355 try { 18356 if (element.getAttribute("data-vimeo-defer") !== null) { 18357 return; 18358 } 18359 var params = getOEmbedParameters(element); 18360 var url = getVimeoUrl(params); 18361 getOEmbedData(url, params, element).then(function(data) { 18362 return createEmbed(data, element); 18363 }).catch(handleError); 18364 } catch (error) { 18365 handleError(error); 18366 } 18367 }); 18368 } 18369 function resizeEmbeds() { 18370 var parent = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : document; 18371 if (window.VimeoPlayerResizeEmbeds_) { 18372 return; 18373 } 18374 window.VimeoPlayerResizeEmbeds_ = true; 18375 var onMessage = function onMessage2(event2) { 18376 if (!isVimeoUrl(event2.origin)) { 18377 return; 18378 } 18379 if (!event2.data || event2.data.event !== "spacechange") { 18380 return; 18381 } 18382 var senderIFrame = event2.source ? findIframeBySourceWindow(event2.source, parent) : null; 18383 if (senderIFrame) { 18384 var space = senderIFrame.parentElement; 18385 space.style.paddingBottom = "".concat(event2.data.data[0].bottom, "px"); 18386 } 18387 }; 18388 window.addEventListener("message", onMessage); 18389 } 18390 function initAppendVideoMetadata() { 18391 var parent = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : document; 18392 if (window.VimeoSeoMetadataAppended) { 18393 return; 18394 } 18395 window.VimeoSeoMetadataAppended = true; 18396 var onMessage = function onMessage2(event2) { 18397 if (!isVimeoUrl(event2.origin)) { 18398 return; 18399 } 18400 var data = parseMessageData(event2.data); 18401 if (!data || data.event !== "ready") { 18402 return; 18403 } 18404 var senderIFrame = event2.source ? findIframeBySourceWindow(event2.source, parent) : null; 18405 if (senderIFrame && isVimeoEmbed(senderIFrame.src)) { 18406 var player = new Player(senderIFrame); 18407 player.callMethod("appendVideoMetadata", window.location.href); 18408 } 18409 }; 18410 window.addEventListener("message", onMessage); 18411 } 18412 function checkUrlTimeParam() { 18413 var parent = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : document; 18414 if (window.VimeoCheckedUrlTimeParam) { 18415 return; 18416 } 18417 window.VimeoCheckedUrlTimeParam = true; 18418 var handleError = function handleError2(error) { 18419 if ("console" in window && console.error) { 18420 console.error("There was an error getting video Id: ".concat(error)); 18421 } 18422 }; 18423 var onMessage = function onMessage2(event2) { 18424 if (!isVimeoUrl(event2.origin)) { 18425 return; 18426 } 18427 var data = parseMessageData(event2.data); 18428 if (!data || data.event !== "ready") { 18429 return; 18430 } 18431 var senderIFrame = event2.source ? findIframeBySourceWindow(event2.source, parent) : null; 18432 if (senderIFrame && isVimeoEmbed(senderIFrame.src)) { 18433 var player = new Player(senderIFrame); 18434 player.getVideoId().then(function(videoId) { 18435 var matches = new RegExp("[?&]vimeo_t_".concat(videoId, "=([^&#]*)")).exec(window.location.href); 18436 if (matches && matches[1]) { 18437 var sec = decodeURI(matches[1]); 18438 player.setCurrentTime(sec); 18439 } 18440 return; 18441 }).catch(handleError); 18442 } 18443 }; 18444 window.addEventListener("message", onMessage); 18445 } 18446 function updateDRMEmbeds() { 18447 if (window.VimeoDRMEmbedsUpdated) { 18448 return; 18449 } 18450 window.VimeoDRMEmbedsUpdated = true; 18451 var onMessage = function onMessage2(event2) { 18452 if (!isVimeoUrl(event2.origin)) { 18453 return; 18454 } 18455 var data = parseMessageData(event2.data); 18456 if (!data || data.event !== "drminitfailed") { 18457 return; 18458 } 18459 var senderIFrame = event2.source ? findIframeBySourceWindow(event2.source) : null; 18460 if (!senderIFrame) { 18461 return; 18462 } 18463 var currentAllow = senderIFrame.getAttribute("allow") || ""; 18464 var allowSupportsDRM = currentAllow.includes("encrypted-media"); 18465 if (!allowSupportsDRM) { 18466 senderIFrame.setAttribute("allow", "".concat(currentAllow, "; encrypted-media")); 18467 var currentUrl = new URL(senderIFrame.getAttribute("src")); 18468 currentUrl.searchParams.set("forcereload", "drm"); 18469 senderIFrame.setAttribute("src", currentUrl.toString()); 18470 return; 18471 } 18472 }; 18473 window.addEventListener("message", onMessage); 18474 } 18475 function initializeScreenfull() { 18476 var fn = function() { 18477 var val; 18478 var fnMap = [ 18479 ["requestFullscreen", "exitFullscreen", "fullscreenElement", "fullscreenEnabled", "fullscreenchange", "fullscreenerror"], 18480 ["webkitRequestFullscreen", "webkitExitFullscreen", "webkitFullscreenElement", "webkitFullscreenEnabled", "webkitfullscreenchange", "webkitfullscreenerror"], 18481 ["webkitRequestFullScreen", "webkitCancelFullScreen", "webkitCurrentFullScreenElement", "webkitCancelFullScreen", "webkitfullscreenchange", "webkitfullscreenerror"], 18482 ["mozRequestFullScreen", "mozCancelFullScreen", "mozFullScreenElement", "mozFullScreenEnabled", "mozfullscreenchange", "mozfullscreenerror"], 18483 ["msRequestFullscreen", "msExitFullscreen", "msFullscreenElement", "msFullscreenEnabled", "MSFullscreenChange", "MSFullscreenError"] 18484 ]; 18485 var i = 0; 18486 var l = fnMap.length; 18487 var ret = {}; 18488 for (; i < l; i++) { 18489 val = fnMap[i]; 18490 if (val && val[1] in document) { 18491 for (i = 0; i < val.length; i++) { 18492 ret[fnMap[0][i]] = val[i]; 18493 } 18494 return ret; 18495 } 18496 } 18497 return false; 18498 }(); 18499 var eventNameMap = { 18500 fullscreenchange: fn.fullscreenchange, 18501 fullscreenerror: fn.fullscreenerror 18502 }; 18503 var screenfull2 = { 18504 request: function request(element) { 18505 return new Promise(function(resolve, reject) { 18506 var onFullScreenEntered = function onFullScreenEntered2() { 18507 screenfull2.off("fullscreenchange", onFullScreenEntered2); 18508 resolve(); 18509 }; 18510 screenfull2.on("fullscreenchange", onFullScreenEntered); 18511 element = element || document.documentElement; 18512 var returnPromise = element[fn.requestFullscreen](); 18513 if (returnPromise instanceof Promise) { 18514 returnPromise.then(onFullScreenEntered).catch(reject); 18515 } 18516 }); 18517 }, 18518 exit: function exit() { 18519 return new Promise(function(resolve, reject) { 18520 if (!screenfull2.isFullscreen) { 18521 resolve(); 18522 return; 18523 } 18524 var onFullScreenExit = function onFullScreenExit2() { 18525 screenfull2.off("fullscreenchange", onFullScreenExit2); 18526 resolve(); 18527 }; 18528 screenfull2.on("fullscreenchange", onFullScreenExit); 18529 var returnPromise = document[fn.exitFullscreen](); 18530 if (returnPromise instanceof Promise) { 18531 returnPromise.then(onFullScreenExit).catch(reject); 18532 } 18533 }); 18534 }, 18535 on: function on(event2, callback) { 18536 var eventName = eventNameMap[event2]; 18537 if (eventName) { 18538 document.addEventListener(eventName, callback); 18539 } 18540 }, 18541 off: function off(event2, callback) { 18542 var eventName = eventNameMap[event2]; 18543 if (eventName) { 18544 document.removeEventListener(eventName, callback); 18545 } 18546 } 18547 }; 18548 Object.defineProperties(screenfull2, { 18549 isFullscreen: { 18550 get: function get() { 18551 return Boolean(document[fn.fullscreenElement]); 18552 } 18553 }, 18554 element: { 18555 enumerable: true, 18556 get: function get() { 18557 return document[fn.fullscreenElement]; 18558 } 18559 }, 18560 isEnabled: { 18561 enumerable: true, 18562 get: function get() { 18563 return Boolean(document[fn.fullscreenEnabled]); 18564 } 18565 } 18566 }); 18567 return screenfull2; 18568 } 18569 var defaultOptions = { 18570 role: "viewer", 18571 autoPlayMuted: true, 18572 allowedDrift: 0.3, 18573 maxAllowedDrift: 1, 18574 minCheckInterval: 0.1, 18575 maxRateAdjustment: 0.2, 18576 maxTimeToCatchUp: 1 18577 }; 18578 var TimingSrcConnector = /* @__PURE__ */ function(_EventTarget) { 18579 _inherits(TimingSrcConnector2, _EventTarget); 18580 var _super = _createSuper(TimingSrcConnector2); 18581 function TimingSrcConnector2(_player, timingObject) { 18582 var _this; 18583 var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; 18584 var logger = arguments.length > 3 ? arguments[3] : void 0; 18585 _classCallCheck(this, TimingSrcConnector2); 18586 _this = _super.call(this); 18587 _defineProperty(_assertThisInitialized(_this), "logger", void 0); 18588 _defineProperty(_assertThisInitialized(_this), "speedAdjustment", 0); 18589 _defineProperty(_assertThisInitialized(_this), "adjustSpeed", /* @__PURE__ */ function() { 18590 var _ref = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee(player, newAdjustment) { 18591 var newPlaybackRate; 18592 return _regeneratorRuntime().wrap(function _callee$(_context) { 18593 while (1) 18594 switch (_context.prev = _context.next) { 18595 case 0: 18596 if (!(_this.speedAdjustment === newAdjustment)) { 18597 _context.next = 2; 18598 break; 18599 } 18600 return _context.abrupt("return"); 18601 case 2: 18602 _context.next = 4; 18603 return player.getPlaybackRate(); 18604 case 4: 18605 _context.t0 = _context.sent; 18606 _context.t1 = _this.speedAdjustment; 18607 _context.t2 = _context.t0 - _context.t1; 18608 _context.t3 = newAdjustment; 18609 newPlaybackRate = _context.t2 + _context.t3; 18610 _this.log("New playbackRate: ".concat(newPlaybackRate)); 18611 _context.next = 12; 18612 return player.setPlaybackRate(newPlaybackRate); 18613 case 12: 18614 _this.speedAdjustment = newAdjustment; 18615 case 13: 18616 case "end": 18617 return _context.stop(); 18618 } 18619 }, _callee); 18620 })); 18621 return function(_x, _x2) { 18622 return _ref.apply(this, arguments); 18623 }; 18624 }()); 18625 _this.logger = logger; 18626 _this.init(timingObject, _player, _objectSpread2(_objectSpread2({}, defaultOptions), options)); 18627 return _this; 18628 } 18629 _createClass(TimingSrcConnector2, [{ 18630 key: "disconnect", 18631 value: function disconnect() { 18632 this.dispatchEvent(new Event("disconnect")); 18633 } 18634 }, { 18635 key: "init", 18636 value: function() { 18637 var _init = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee2(timingObject, player, options) { 18638 var _this2 = this; 18639 var playerUpdater, positionSync, timingObjectUpdater; 18640 return _regeneratorRuntime().wrap(function _callee2$(_context2) { 18641 while (1) 18642 switch (_context2.prev = _context2.next) { 18643 case 0: 18644 _context2.next = 2; 18645 return this.waitForTOReadyState(timingObject, "open"); 18646 case 2: 18647 if (!(options.role === "viewer")) { 18648 _context2.next = 10; 18649 break; 18650 } 18651 _context2.next = 5; 18652 return this.updatePlayer(timingObject, player, options); 18653 case 5: 18654 playerUpdater = subscribe(timingObject, "change", function() { 18655 return _this2.updatePlayer(timingObject, player, options); 18656 }); 18657 positionSync = this.maintainPlaybackPosition(timingObject, player, options); 18658 this.addEventListener("disconnect", function() { 18659 positionSync.cancel(); 18660 playerUpdater.cancel(); 18661 }); 18662 _context2.next = 14; 18663 break; 18664 case 10: 18665 _context2.next = 12; 18666 return this.updateTimingObject(timingObject, player); 18667 case 12: 18668 timingObjectUpdater = subscribe(player, ["seeked", "play", "pause", "ratechange"], function() { 18669 return _this2.updateTimingObject(timingObject, player); 18670 }, "on", "off"); 18671 this.addEventListener("disconnect", function() { 18672 return timingObjectUpdater.cancel(); 18673 }); 18674 case 14: 18675 case "end": 18676 return _context2.stop(); 18677 } 18678 }, _callee2, this); 18679 })); 18680 function init(_x3, _x4, _x5) { 18681 return _init.apply(this, arguments); 18682 } 18683 return init; 18684 }() 18685 }, { 18686 key: "updateTimingObject", 18687 value: function() { 18688 var _updateTimingObject = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee3(timingObject, player) { 18689 var _yield$Promise$all, _yield$Promise$all2, position, isPaused, playbackRate; 18690 return _regeneratorRuntime().wrap(function _callee3$(_context3) { 18691 while (1) 18692 switch (_context3.prev = _context3.next) { 18693 case 0: 18694 _context3.next = 2; 18695 return Promise.all([player.getCurrentTime(), player.getPaused(), player.getPlaybackRate()]); 18696 case 2: 18697 _yield$Promise$all = _context3.sent; 18698 _yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 3); 18699 position = _yield$Promise$all2[0]; 18700 isPaused = _yield$Promise$all2[1]; 18701 playbackRate = _yield$Promise$all2[2]; 18702 timingObject.update({ 18703 position, 18704 velocity: isPaused ? 0 : playbackRate 18705 }); 18706 case 8: 18707 case "end": 18708 return _context3.stop(); 18709 } 18710 }, _callee3); 18711 })); 18712 function updateTimingObject(_x6, _x7) { 18713 return _updateTimingObject.apply(this, arguments); 18714 } 18715 return updateTimingObject; 18716 }() 18717 }, { 18718 key: "updatePlayer", 18719 value: function() { 18720 var _updatePlayer = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee5(timingObject, player, options) { 18721 var _timingObject$query, position, velocity; 18722 return _regeneratorRuntime().wrap(function _callee5$(_context5) { 18723 while (1) 18724 switch (_context5.prev = _context5.next) { 18725 case 0: 18726 _timingObject$query = timingObject.query(), position = _timingObject$query.position, velocity = _timingObject$query.velocity; 18727 if (typeof position === "number") { 18728 player.setCurrentTime(position); 18729 } 18730 if (!(typeof velocity === "number")) { 18731 _context5.next = 25; 18732 break; 18733 } 18734 if (!(velocity === 0)) { 18735 _context5.next = 11; 18736 break; 18737 } 18738 _context5.next = 6; 18739 return player.getPaused(); 18740 case 6: 18741 _context5.t0 = _context5.sent; 18742 if (!(_context5.t0 === false)) { 18743 _context5.next = 9; 18744 break; 18745 } 18746 player.pause(); 18747 case 9: 18748 _context5.next = 25; 18749 break; 18750 case 11: 18751 if (!(velocity > 0)) { 18752 _context5.next = 25; 18753 break; 18754 } 18755 _context5.next = 14; 18756 return player.getPaused(); 18757 case 14: 18758 _context5.t1 = _context5.sent; 18759 if (!(_context5.t1 === true)) { 18760 _context5.next = 19; 18761 break; 18762 } 18763 _context5.next = 18; 18764 return player.play().catch(/* @__PURE__ */ function() { 18765 var _ref2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee4(err) { 18766 return _regeneratorRuntime().wrap(function _callee4$(_context4) { 18767 while (1) 18768 switch (_context4.prev = _context4.next) { 18769 case 0: 18770 if (!(err.name === "NotAllowedError" && options.autoPlayMuted)) { 18771 _context4.next = 5; 18772 break; 18773 } 18774 _context4.next = 3; 18775 return player.setMuted(true); 18776 case 3: 18777 _context4.next = 5; 18778 return player.play().catch(function(err2) { 18779 return console.error("Couldn't play the video from TimingSrcConnector. Error:", err2); 18780 }); 18781 case 5: 18782 case "end": 18783 return _context4.stop(); 18784 } 18785 }, _callee4); 18786 })); 18787 return function(_x11) { 18788 return _ref2.apply(this, arguments); 18789 }; 18790 }()); 18791 case 18: 18792 this.updatePlayer(timingObject, player, options); 18793 case 19: 18794 _context5.next = 21; 18795 return player.getPlaybackRate(); 18796 case 21: 18797 _context5.t2 = _context5.sent; 18798 _context5.t3 = velocity; 18799 if (!(_context5.t2 !== _context5.t3)) { 18800 _context5.next = 25; 18801 break; 18802 } 18803 player.setPlaybackRate(velocity); 18804 case 25: 18805 case "end": 18806 return _context5.stop(); 18807 } 18808 }, _callee5, this); 18809 })); 18810 function updatePlayer(_x8, _x9, _x10) { 18811 return _updatePlayer.apply(this, arguments); 18812 } 18813 return updatePlayer; 18814 }() 18815 }, { 18816 key: "maintainPlaybackPosition", 18817 value: function maintainPlaybackPosition(timingObject, player, options) { 18818 var _this3 = this; 18819 var allowedDrift = options.allowedDrift, maxAllowedDrift = options.maxAllowedDrift, minCheckInterval = options.minCheckInterval, maxRateAdjustment = options.maxRateAdjustment, maxTimeToCatchUp = options.maxTimeToCatchUp; 18820 var syncInterval = Math.min(maxTimeToCatchUp, Math.max(minCheckInterval, maxAllowedDrift)) * 1e3; 18821 var check = /* @__PURE__ */ function() { 18822 var _ref3 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee6() { 18823 var diff, diffAbs, min, max, adjustment; 18824 return _regeneratorRuntime().wrap(function _callee6$(_context6) { 18825 while (1) 18826 switch (_context6.prev = _context6.next) { 18827 case 0: 18828 _context6.t0 = timingObject.query().velocity === 0; 18829 if (_context6.t0) { 18830 _context6.next = 6; 18831 break; 18832 } 18833 _context6.next = 4; 18834 return player.getPaused(); 18835 case 4: 18836 _context6.t1 = _context6.sent; 18837 _context6.t0 = _context6.t1 === true; 18838 case 6: 18839 if (!_context6.t0) { 18840 _context6.next = 8; 18841 break; 18842 } 18843 return _context6.abrupt("return"); 18844 case 8: 18845 _context6.t2 = timingObject.query().position; 18846 _context6.next = 11; 18847 return player.getCurrentTime(); 18848 case 11: 18849 _context6.t3 = _context6.sent; 18850 diff = _context6.t2 - _context6.t3; 18851 diffAbs = Math.abs(diff); 18852 _this3.log("Drift: ".concat(diff)); 18853 if (!(diffAbs > maxAllowedDrift)) { 18854 _context6.next = 22; 18855 break; 18856 } 18857 _context6.next = 18; 18858 return _this3.adjustSpeed(player, 0); 18859 case 18: 18860 player.setCurrentTime(timingObject.query().position); 18861 _this3.log("Resync by currentTime"); 18862 _context6.next = 29; 18863 break; 18864 case 22: 18865 if (!(diffAbs > allowedDrift)) { 18866 _context6.next = 29; 18867 break; 18868 } 18869 min = diffAbs / maxTimeToCatchUp; 18870 max = maxRateAdjustment; 18871 adjustment = min < max ? (max - min) / 2 : max; 18872 _context6.next = 28; 18873 return _this3.adjustSpeed(player, adjustment * Math.sign(diff)); 18874 case 28: 18875 _this3.log("Resync by playbackRate"); 18876 case 29: 18877 case "end": 18878 return _context6.stop(); 18879 } 18880 }, _callee6); 18881 })); 18882 return function check2() { 18883 return _ref3.apply(this, arguments); 18884 }; 18885 }(); 18886 var interval = setInterval(function() { 18887 return check(); 18888 }, syncInterval); 18889 return { 18890 cancel: function cancel() { 18891 return clearInterval(interval); 18892 } 18893 }; 18894 } 18895 }, { 18896 key: "log", 18897 value: function log(msg) { 18898 var _this$logger; 18899 (_this$logger = this.logger) === null || _this$logger === void 0 ? void 0 : _this$logger.call(this, "TimingSrcConnector: ".concat(msg)); 18900 } 18901 }, { 18902 key: "waitForTOReadyState", 18903 value: function waitForTOReadyState(timingObject, state) { 18904 return new Promise(function(resolve) { 18905 var check = function check2() { 18906 if (timingObject.readyState === state) { 18907 resolve(); 18908 } else { 18909 timingObject.addEventListener("readystatechange", check2, { 18910 once: true 18911 }); 18912 } 18913 }; 18914 check(); 18915 }); 18916 } 18917 }]); 18918 return TimingSrcConnector2; 18919 }(/* @__PURE__ */ _wrapNativeSuper(EventTarget)); 18920 var playerMap = /* @__PURE__ */ new WeakMap(); 18921 var readyMap = /* @__PURE__ */ new WeakMap(); 18922 var screenfull = {}; 18923 var Player = /* @__PURE__ */ function() { 18924 function Player2(element) { 18925 var _this = this; 18926 var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; 18927 _classCallCheck(this, Player2); 18928 if (window.jQuery && element instanceof jQuery) { 18929 if (element.length > 1 && window.console && console.warn) { 18930 console.warn("A jQuery object with multiple elements was passed, using the first element."); 18931 } 18932 element = element[0]; 18933 } 18934 if (typeof document !== "undefined" && typeof element === "string") { 18935 element = document.getElementById(element); 18936 } 18937 if (!isDomElement(element)) { 18938 throw new TypeError("You must pass either a valid element or a valid id."); 18939 } 18940 if (element.nodeName !== "IFRAME") { 18941 var iframe = element.querySelector("iframe"); 18942 if (iframe) { 18943 element = iframe; 18944 } 18945 } 18946 if (element.nodeName === "IFRAME" && !isVimeoUrl(element.getAttribute("src") || "")) { 18947 throw new Error("The player element passed isn\u2019t a Vimeo embed."); 18948 } 18949 if (playerMap.has(element)) { 18950 return playerMap.get(element); 18951 } 18952 this._window = element.ownerDocument.defaultView; 18953 this.element = element; 18954 this.origin = "*"; 18955 var readyPromise = new npo_src(function(resolve, reject) { 18956 _this._onMessage = function(event2) { 18957 if (!isVimeoUrl(event2.origin) || _this.element.contentWindow !== event2.source) { 18958 return; 18959 } 18960 if (_this.origin === "*") { 18961 _this.origin = event2.origin; 18962 } 18963 var data = parseMessageData(event2.data); 18964 var isError = data && data.event === "error"; 18965 var isReadyError = isError && data.data && data.data.method === "ready"; 18966 if (isReadyError) { 18967 var error = new Error(data.data.message); 18968 error.name = data.data.name; 18969 reject(error); 18970 return; 18971 } 18972 var isReadyEvent = data && data.event === "ready"; 18973 var isPingResponse = data && data.method === "ping"; 18974 if (isReadyEvent || isPingResponse) { 18975 _this.element.setAttribute("data-ready", "true"); 18976 resolve(); 18977 return; 18978 } 18979 processData(_this, data); 18980 }; 18981 _this._window.addEventListener("message", _this._onMessage); 18982 if (_this.element.nodeName !== "IFRAME") { 18983 var params = getOEmbedParameters(element, options); 18984 var url = getVimeoUrl(params); 18985 getOEmbedData(url, params, element).then(function(data) { 18986 var iframe2 = createEmbed(data, element); 18987 _this.element = iframe2; 18988 _this._originalElement = element; 18989 swapCallbacks(element, iframe2); 18990 playerMap.set(_this.element, _this); 18991 return data; 18992 }).catch(reject); 18993 } 18994 }); 18995 readyMap.set(this, readyPromise); 18996 playerMap.set(this.element, this); 18997 if (this.element.nodeName === "IFRAME") { 18998 postMessage(this, "ping"); 18999 } 19000 if (screenfull.isEnabled) { 19001 var exitFullscreen = function exitFullscreen2() { 19002 return screenfull.exit(); 19003 }; 19004 this.fullscreenchangeHandler = function() { 19005 if (screenfull.isFullscreen) { 19006 storeCallback(_this, "event:exitFullscreen", exitFullscreen); 19007 } else { 19008 removeCallback(_this, "event:exitFullscreen", exitFullscreen); 19009 } 19010 _this.ready().then(function() { 19011 postMessage(_this, "fullscreenchange", screenfull.isFullscreen); 19012 }); 19013 }; 19014 screenfull.on("fullscreenchange", this.fullscreenchangeHandler); 19015 } 19016 return this; 19017 } 19018 _createClass(Player2, [{ 19019 key: "callMethod", 19020 value: function callMethod(name) { 19021 var _this2 = this; 19022 for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { 19023 args[_key - 1] = arguments[_key]; 19024 } 19025 if (name === void 0 || name === null) { 19026 throw new TypeError("You must pass a method name."); 19027 } 19028 return new npo_src(function(resolve, reject) { 19029 return _this2.ready().then(function() { 19030 storeCallback(_this2, name, { 19031 resolve, 19032 reject 19033 }); 19034 if (args.length === 0) { 19035 args = {}; 19036 } else if (args.length === 1) { 19037 args = args[0]; 19038 } 19039 postMessage(_this2, name, args); 19040 }).catch(reject); 19041 }); 19042 } 19043 }, { 19044 key: "get", 19045 value: function get(name) { 19046 var _this3 = this; 19047 return new npo_src(function(resolve, reject) { 19048 name = getMethodName(name, "get"); 19049 return _this3.ready().then(function() { 19050 storeCallback(_this3, name, { 19051 resolve, 19052 reject 19053 }); 19054 postMessage(_this3, name); 19055 }).catch(reject); 19056 }); 19057 } 19058 }, { 19059 key: "set", 19060 value: function set(name, value) { 19061 var _this4 = this; 19062 return new npo_src(function(resolve, reject) { 19063 name = getMethodName(name, "set"); 19064 if (value === void 0 || value === null) { 19065 throw new TypeError("There must be a value to set."); 19066 } 19067 return _this4.ready().then(function() { 19068 storeCallback(_this4, name, { 19069 resolve, 19070 reject 19071 }); 19072 postMessage(_this4, name, value); 19073 }).catch(reject); 19074 }); 19075 } 19076 }, { 19077 key: "on", 19078 value: function on(eventName, callback) { 19079 if (!eventName) { 19080 throw new TypeError("You must pass an event name."); 19081 } 19082 if (!callback) { 19083 throw new TypeError("You must pass a callback function."); 19084 } 19085 if (typeof callback !== "function") { 19086 throw new TypeError("The callback must be a function."); 19087 } 19088 var callbacks = getCallbacks(this, "event:".concat(eventName)); 19089 if (callbacks.length === 0) { 19090 this.callMethod("addEventListener", eventName).catch(function() { 19091 }); 19092 } 19093 storeCallback(this, "event:".concat(eventName), callback); 19094 } 19095 }, { 19096 key: "off", 19097 value: function off(eventName, callback) { 19098 if (!eventName) { 19099 throw new TypeError("You must pass an event name."); 19100 } 19101 if (callback && typeof callback !== "function") { 19102 throw new TypeError("The callback must be a function."); 19103 } 19104 var lastCallback = removeCallback(this, "event:".concat(eventName), callback); 19105 if (lastCallback) { 19106 this.callMethod("removeEventListener", eventName).catch(function(e) { 19107 }); 19108 } 19109 } 19110 }, { 19111 key: "loadVideo", 19112 value: function loadVideo(options) { 19113 return this.callMethod("loadVideo", options); 19114 } 19115 }, { 19116 key: "ready", 19117 value: function ready() { 19118 var readyPromise = readyMap.get(this) || new npo_src(function(resolve, reject) { 19119 reject(new Error("Unknown player. Probably unloaded.")); 19120 }); 19121 return npo_src.resolve(readyPromise); 19122 } 19123 }, { 19124 key: "addCuePoint", 19125 value: function addCuePoint(time) { 19126 var data = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; 19127 return this.callMethod("addCuePoint", { 19128 time, 19129 data 19130 }); 19131 } 19132 }, { 19133 key: "removeCuePoint", 19134 value: function removeCuePoint(id) { 19135 return this.callMethod("removeCuePoint", id); 19136 } 19137 }, { 19138 key: "enableTextTrack", 19139 value: function enableTextTrack(language) { 19140 var kind = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null; 19141 var showing = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : true; 19142 if (!language) { 19143 throw new TypeError("You must pass a language."); 19144 } 19145 return this.callMethod("enableTextTrack", { 19146 language, 19147 kind, 19148 showing 19149 }); 19150 } 19151 }, { 19152 key: "disableTextTrack", 19153 value: function disableTextTrack() { 19154 return this.callMethod("disableTextTrack"); 19155 } 19156 }, { 19157 key: "selectAudioTrack", 19158 value: function selectAudioTrack(language, kind) { 19159 if (!language) { 19160 throw new TypeError("You must pass a language."); 19161 } 19162 return this.callMethod("selectAudioTrack", { 19163 language, 19164 kind 19165 }); 19166 } 19167 }, { 19168 key: "selectDefaultAudioTrack", 19169 value: function selectDefaultAudioTrack() { 19170 return this.callMethod("selectDefaultAudioTrack"); 19171 } 19172 }, { 19173 key: "pause", 19174 value: function pause() { 19175 return this.callMethod("pause"); 19176 } 19177 }, { 19178 key: "play", 19179 value: function play() { 19180 return this.callMethod("play"); 19181 } 19182 }, { 19183 key: "requestFullscreen", 19184 value: function requestFullscreen() { 19185 if (screenfull.isEnabled) { 19186 return screenfull.request(this.element); 19187 } 19188 return this.callMethod("requestFullscreen"); 19189 } 19190 }, { 19191 key: "exitFullscreen", 19192 value: function exitFullscreen() { 19193 if (screenfull.isEnabled) { 19194 return screenfull.exit(); 19195 } 19196 return this.callMethod("exitFullscreen"); 19197 } 19198 }, { 19199 key: "getFullscreen", 19200 value: function getFullscreen() { 19201 if (screenfull.isEnabled) { 19202 return npo_src.resolve(screenfull.isFullscreen); 19203 } 19204 return this.get("fullscreen"); 19205 } 19206 }, { 19207 key: "requestPictureInPicture", 19208 value: function requestPictureInPicture() { 19209 return this.callMethod("requestPictureInPicture"); 19210 } 19211 }, { 19212 key: "exitPictureInPicture", 19213 value: function exitPictureInPicture() { 19214 return this.callMethod("exitPictureInPicture"); 19215 } 19216 }, { 19217 key: "getPictureInPicture", 19218 value: function getPictureInPicture() { 19219 return this.get("pictureInPicture"); 19220 } 19221 }, { 19222 key: "remotePlaybackPrompt", 19223 value: function remotePlaybackPrompt() { 19224 return this.callMethod("remotePlaybackPrompt"); 19225 } 19226 }, { 19227 key: "unload", 19228 value: function unload() { 19229 return this.callMethod("unload"); 19230 } 19231 }, { 19232 key: "destroy", 19233 value: function destroy() { 19234 var _this5 = this; 19235 return new npo_src(function(resolve) { 19236 readyMap.delete(_this5); 19237 playerMap.delete(_this5.element); 19238 if (_this5._originalElement) { 19239 playerMap.delete(_this5._originalElement); 19240 _this5._originalElement.removeAttribute("data-vimeo-initialized"); 19241 } 19242 if (_this5.element && _this5.element.nodeName === "IFRAME" && _this5.element.parentNode) { 19243 if (_this5.element.parentNode.parentNode && _this5._originalElement && _this5._originalElement !== _this5.element.parentNode) { 19244 _this5.element.parentNode.parentNode.removeChild(_this5.element.parentNode); 19245 } else { 19246 _this5.element.parentNode.removeChild(_this5.element); 19247 } 19248 } 19249 if (_this5.element && _this5.element.nodeName === "DIV" && _this5.element.parentNode) { 19250 _this5.element.removeAttribute("data-vimeo-initialized"); 19251 var iframe = _this5.element.querySelector("iframe"); 19252 if (iframe && iframe.parentNode) { 19253 if (iframe.parentNode.parentNode && _this5._originalElement && _this5._originalElement !== iframe.parentNode) { 19254 iframe.parentNode.parentNode.removeChild(iframe.parentNode); 19255 } else { 19256 iframe.parentNode.removeChild(iframe); 19257 } 19258 } 19259 } 19260 _this5._window.removeEventListener("message", _this5._onMessage); 19261 if (screenfull.isEnabled) { 19262 screenfull.off("fullscreenchange", _this5.fullscreenchangeHandler); 19263 } 19264 resolve(); 19265 }); 19266 } 19267 }, { 19268 key: "getAutopause", 19269 value: function getAutopause() { 19270 return this.get("autopause"); 19271 } 19272 }, { 19273 key: "setAutopause", 19274 value: function setAutopause(autopause) { 19275 return this.set("autopause", autopause); 19276 } 19277 }, { 19278 key: "getBuffered", 19279 value: function getBuffered() { 19280 return this.get("buffered"); 19281 } 19282 }, { 19283 key: "getCameraProps", 19284 value: function getCameraProps() { 19285 return this.get("cameraProps"); 19286 } 19287 }, { 19288 key: "setCameraProps", 19289 value: function setCameraProps(camera) { 19290 return this.set("cameraProps", camera); 19291 } 19292 }, { 19293 key: "getChapters", 19294 value: function getChapters() { 19295 return this.get("chapters"); 19296 } 19297 }, { 19298 key: "getCurrentChapter", 19299 value: function getCurrentChapter() { 19300 return this.get("currentChapter"); 19301 } 19302 }, { 19303 key: "getColor", 19304 value: function getColor() { 19305 return this.get("color"); 19306 } 19307 }, { 19308 key: "getColors", 19309 value: function getColors() { 19310 return npo_src.all([this.get("colorOne"), this.get("colorTwo"), this.get("colorThree"), this.get("colorFour")]); 19311 } 19312 }, { 19313 key: "setColor", 19314 value: function setColor(color) { 19315 return this.set("color", color); 19316 } 19317 }, { 19318 key: "setColors", 19319 value: function setColors(colors) { 19320 if (!Array.isArray(colors)) { 19321 return new npo_src(function(resolve, reject) { 19322 return reject(new TypeError("Argument must be an array.")); 19323 }); 19324 } 19325 var nullPromise = new npo_src(function(resolve) { 19326 return resolve(null); 19327 }); 19328 var colorPromises = [colors[0] ? this.set("colorOne", colors[0]) : nullPromise, colors[1] ? this.set("colorTwo", colors[1]) : nullPromise, colors[2] ? this.set("colorThree", colors[2]) : nullPromise, colors[3] ? this.set("colorFour", colors[3]) : nullPromise]; 19329 return npo_src.all(colorPromises); 19330 } 19331 }, { 19332 key: "getCuePoints", 19333 value: function getCuePoints() { 19334 return this.get("cuePoints"); 19335 } 19336 }, { 19337 key: "getCurrentTime", 19338 value: function getCurrentTime() { 19339 return this.get("currentTime"); 19340 } 19341 }, { 19342 key: "setCurrentTime", 19343 value: function setCurrentTime(currentTime) { 19344 return this.set("currentTime", currentTime); 19345 } 19346 }, { 19347 key: "getDuration", 19348 value: function getDuration() { 19349 return this.get("duration"); 19350 } 19351 }, { 19352 key: "getEnded", 19353 value: function getEnded() { 19354 return this.get("ended"); 19355 } 19356 }, { 19357 key: "getLoop", 19358 value: function getLoop() { 19359 return this.get("loop"); 19360 } 19361 }, { 19362 key: "setLoop", 19363 value: function setLoop(loop2) { 19364 return this.set("loop", loop2); 19365 } 19366 }, { 19367 key: "setMuted", 19368 value: function setMuted(muted) { 19369 return this.set("muted", muted); 19370 } 19371 }, { 19372 key: "getMuted", 19373 value: function getMuted() { 19374 return this.get("muted"); 19375 } 19376 }, { 19377 key: "getPaused", 19378 value: function getPaused() { 19379 return this.get("paused"); 19380 } 19381 }, { 19382 key: "getPlaybackRate", 19383 value: function getPlaybackRate() { 19384 return this.get("playbackRate"); 19385 } 19386 }, { 19387 key: "setPlaybackRate", 19388 value: function setPlaybackRate(playbackRate) { 19389 return this.set("playbackRate", playbackRate); 19390 } 19391 }, { 19392 key: "getPlayed", 19393 value: function getPlayed() { 19394 return this.get("played"); 19395 } 19396 }, { 19397 key: "getQualities", 19398 value: function getQualities() { 19399 return this.get("qualities"); 19400 } 19401 }, { 19402 key: "getQuality", 19403 value: function getQuality() { 19404 return this.get("quality"); 19405 } 19406 }, { 19407 key: "setQuality", 19408 value: function setQuality(quality) { 19409 return this.set("quality", quality); 19410 } 19411 }, { 19412 key: "getRemotePlaybackAvailability", 19413 value: function getRemotePlaybackAvailability() { 19414 return this.get("remotePlaybackAvailability"); 19415 } 19416 }, { 19417 key: "getRemotePlaybackState", 19418 value: function getRemotePlaybackState() { 19419 return this.get("remotePlaybackState"); 19420 } 19421 }, { 19422 key: "getSeekable", 19423 value: function getSeekable() { 19424 return this.get("seekable"); 19425 } 19426 }, { 19427 key: "getSeeking", 19428 value: function getSeeking() { 19429 return this.get("seeking"); 19430 } 19431 }, { 19432 key: "getTextTracks", 19433 value: function getTextTracks() { 19434 return this.get("textTracks"); 19435 } 19436 }, { 19437 key: "getAudioTracks", 19438 value: function getAudioTracks() { 19439 return this.get("audioTracks"); 19440 } 19441 }, { 19442 key: "getEnabledAudioTrack", 19443 value: function getEnabledAudioTrack() { 19444 return this.get("enabledAudioTrack"); 19445 } 19446 }, { 19447 key: "getDefaultAudioTrack", 19448 value: function getDefaultAudioTrack() { 19449 return this.get("defaultAudioTrack"); 19450 } 19451 }, { 19452 key: "getVideoEmbedCode", 19453 value: function getVideoEmbedCode() { 19454 return this.get("videoEmbedCode"); 19455 } 19456 }, { 19457 key: "getVideoId", 19458 value: function getVideoId() { 19459 return this.get("videoId"); 19460 } 19461 }, { 19462 key: "getVideoTitle", 19463 value: function getVideoTitle() { 19464 return this.get("videoTitle"); 19465 } 19466 }, { 19467 key: "getVideoWidth", 19468 value: function getVideoWidth() { 19469 return this.get("videoWidth"); 19470 } 19471 }, { 19472 key: "getVideoHeight", 19473 value: function getVideoHeight() { 19474 return this.get("videoHeight"); 19475 } 19476 }, { 19477 key: "getVideoUrl", 19478 value: function getVideoUrl() { 19479 return this.get("videoUrl"); 19480 } 19481 }, { 19482 key: "getVolume", 19483 value: function getVolume() { 19484 return this.get("volume"); 19485 } 19486 }, { 19487 key: "setVolume", 19488 value: function setVolume(volume) { 19489 return this.set("volume", volume); 19490 } 19491 }, { 19492 key: "setTimingSrc", 19493 value: function() { 19494 var _setTimingSrc = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee(timingObject, options) { 19495 var _this6 = this; 19496 var connector; 19497 return _regeneratorRuntime().wrap(function _callee$(_context) { 19498 while (1) 19499 switch (_context.prev = _context.next) { 19500 case 0: 19501 if (timingObject) { 19502 _context.next = 2; 19503 break; 19504 } 19505 throw new TypeError("A Timing Object must be provided."); 19506 case 2: 19507 _context.next = 4; 19508 return this.ready(); 19509 case 4: 19510 connector = new TimingSrcConnector(this, timingObject, options); 19511 postMessage(this, "notifyTimingObjectConnect"); 19512 connector.addEventListener("disconnect", function() { 19513 return postMessage(_this6, "notifyTimingObjectDisconnect"); 19514 }); 19515 return _context.abrupt("return", connector); 19516 case 8: 19517 case "end": 19518 return _context.stop(); 19519 } 19520 }, _callee, this); 19521 })); 19522 function setTimingSrc(_x, _x2) { 19523 return _setTimingSrc.apply(this, arguments); 19524 } 19525 return setTimingSrc; 19526 }() 19527 }], [{ 19528 key: "isVimeoUrl", 19529 value: function isVimeoUrl$1(url) { 19530 return isVimeoUrl(url); 19531 } 19532 }]); 19533 return Player2; 19534 }(); 19535 if (!isServerRuntime) { 19536 screenfull = initializeScreenfull(); 19537 initializeEmbeds(); 19538 resizeEmbeds(); 19539 initAppendVideoMetadata(); 19540 checkUrlTimeParam(); 19541 updateDRMEmbeds(); 19542 } 19543 var player_es_default = Player; 19544 19545
19545// src/js/components/experience-card.js 19546 function pauseOtherVimeoInstances(currentIframe) { 19547 document.querySelectorAll("iframe[data-vimeo-id]").forEach((iframe) => { 19548 if (iframe !== currentIframe) { 19549 try { 19550 const player = new player_es_default(iframe); 19551 player.getMuted().then((isMuted) => { 19552 if (!isMuted) { 19553 player.pause(); 19554 player.setMuted(true); 19555 } 19556 }); 19557 } catch (error) { 19558 console.error("Error pausing other Vimeo instances:", error); 19559 } 19560 } 19561 }); 19562 } 19563 function handleExperienceCard() { 19564 const el = document.querySelector(".section-experience-card"); 19565 const video = el.querySelector(".video"); 19566 if (!video) 19567 return; 19568 const playButton = video.querySelector(".icon-play"); 19569 const iframe1 = video.querySelector("#vimeo-video-autoplay"); 19570 const iframe2 = video.querySelector("#vimeo-video-inline"); 19571 if (iframe1) { 19572 const autoplayLazySrc = iframe1.getAttribute("nitro-lazy-src"); 19573 console.log(autoplayLazySrc); 19574 if (autoplayLazySrc) { 19575 iframe1.setAttribute("src", autoplayLazySrc); 19576 console.log(iframe1); 19577 iframe1.removeAttribute("nitro-lazy-src"); 19578 } 19579 } 19580 if (iframe2) { 19581 const inlineLazySrc1 = iframe2.getAttribute("nitro-lazy-src"); 19582 const inlineLazySrc2 = iframe2.getAttribute("nitro-og-src"); 19583 const inlineLazySrc = inlineLazySrc1 || inlineLazySrc2; 19584 console.log(inlineLazySrc); 19585 if (inlineLazySrc) { 19586 iframe2.setAttribute("src", inlineLazySrc); 19587 console.log(iframe2); 19588 iframe2.removeAttribute("nitro-lazy-src"); 19589 iframe2.removeAttribute("nitro-og-src"); 19590 } 19591 } 19592 const vimeoId = iframe1.getAttribute("data-vimeo-id"); 19593 let player = null; 19594 try { 19595 player = new player_es_default(iframe1, { 19596 id: vimeoId, 19597 autoplay: true, 19598 autopause: false, 19599 muted: true, 19600 loop: true, 19601 unmute_button: false 19602 }); 19603 player.play(); 19604 } catch (error) { 19605 console.error("Error initializing Vimeo player:", error); 19606 } 19607 video.addEventListener("click", function() { 19608 playButton.style.display = "none"; 19609 iframe1.classList.add("hidden"); 19610 iframe2.classList.add("active"); 19611 try { 19612 player = new player_es_default(iframe2); 19613 player.setCurrentTime(0); 19614 player.setMuted(false); 19615 player.play(); 19616 pauseOtherVimeoInstances(iframe2); 19617 } catch (error) { 19618 console.error("Error initializing Vimeo player:", error); 19619 } 19620 }, { once: true }); 19621 } 19622 if (document.querySelector(".section-experience-card")) { 19623 handleExperienceCard(); 19624 } 19625 19626
19626// src/js/components/highlights.js 19627 function pauseOtherVimeoInstances2(currentIframe) { 19628 document.querySelectorAll("iframe[data-vimeo-id]").forEach((iframe) => { 19629 if (iframe !== currentIframe) { 19630 try { 19631 const player = new player_es_default(iframe); 19632 player.getMuted().then((isMuted) => { 19633 if (!isMuted) { 19634 player.pause(); 19635 } 19636 }); 19637 } catch (error) { 19638 console.error("Error pausing other Vimeo instances:", error); 19639 } 19640 } 19641 }); 19642 } 19643 function handleHighlights() { 19644 const el = document.querySelector(".section-highlights"); 19645 const videos = el.querySelectorAll(".video"); 19646 videos.forEach(function(video) { 19647 video.addEventListener("click", function() { 19648 const modalId = video.getAttribute("data-modal-id"); 19649 const modal = document.getElementById(modalId); 19650 if (modal) { 19651 modal.style.display = "block"; 19652 document.body.classList.add("no-scroll"); 19653 const iframe = modal.querySelector("iframe"); 19654 const vimeoId = iframe.getAttribute("data-vimeo-id"); 19655 const close = modal.querySelector(".modal-close"); 19656 pauseOtherVimeoInstances2(iframe); 19657 if (iframe) { 19658 try { 19659 const player = new player_es_default(iframe, { 19660 id: vimeoId, 19661 autoplay: 1, 19662 muted: 0 19663 }); 19664 player.play(); 19665 } catch (error) { 19666 console.error("Error initializing Vimeo player:", error); 19667 } 19668 } 19669 if (close) { 19670 close.addEventListener("click", function() { 19671 modal.style.display = "none"; 19672 document.body.classList.remove("no-scroll"); 19673 try { 19674 const player = new player_es_default(iframe, { 19675 id: vimeoId, 19676 autoplay: 0, 19677 muted: 0 19678 }); 19679 player.pause(); 19680 } catch (error) { 19681 console.error("Error initializing Vimeo player:", error); 19682 } 19683 }, { once: true }); 19684 } 19685 } 19686 }); 19687 }); 19688 } 19689 if (document.querySelector(".section-highlights")) { 19690 handleHighlights(); 19691 } 19692 19693
19693// src/js/components/media-split.js 19694 function pauseOtherVimeoInstances3(currentIframe) { 19695 document.querySelectorAll("iframe[data-vimeo-id]").forEach((iframe) => { 19696 if (iframe !== currentIframe) { 19697 try { 19698 const player = new player_es_default(iframe); 19699 player.getMuted().then((isMuted) => { 19700 if (!isMuted) { 19701 player.pause(); 19702 player.setMuted(true); 19703 } 19704 }); 19705 } catch (error) { 19706 console.error("Error pausing other Vimeo instances:", error); 19707 } 19708 } 19709 }); 19710 } 19711 function handleMediaSplit() { 19712 const el = document.querySelector(".section-media-split"); 19713 const video = el.querySelector(".video"); 19714 if (!video) 19715 return; 19716 const playButton = video.querySelector(".icon-play"); 19717 const iframe1 = video.querySelector("#vimeo-video-autoplay"); 19718 const iframe2 = video.querySelector("#vimeo-video-inline"); 19719 if (iframe1) { 19720 const autoplayLazySrc = iframe1.getAttribute("nitro-lazy-src"); 19721 console.log(autoplayLazySrc); 19722 if (autoplayLazySrc) { 19723 iframe1.setAttribute("src", autoplayLazySrc); 19724 console.log(iframe1); 19725 iframe1.removeAttribute("nitro-lazy-src"); 19726 } 19727 } 19728 if (iframe2) { 19729 const inlineLazySrc1 = iframe2.getAttribute("nitro-lazy-src"); 19730 const inlineLazySrc2 = iframe2.getAttribute("nitro-og-src"); 19731 const inlineLazySrc = inlineLazySrc1 || inlineLazySrc2; 19732 console.log(inlineLazySrc); 19733 if (inlineLazySrc) { 19734 iframe2.setAttribute("src", inlineLazySrc); 19735 console.log(iframe2); 19736 iframe2.removeAttribute("nitro-lazy-src"); 19737 iframe2.removeAttribute("nitro-og-src"); 19738 } 19739 } 19740 const vimeoId = iframe1.getAttribute("data-vimeo-id"); 19741 let player = null; 19742 try { 19743 player = new player_es_default(iframe1, { 19744 id: vimeoId, 19745 autoplay: true, 19746 autopause: false, 19747 muted: true, 19748 loop: true, 19749 unmute_button: false 19750 }); 19751 player.play(); 19752 } catch (error) { 19753 console.error("Error initializing Vimeo player:", error); 19754 } 19755 video.addEventListener("click", function() { 19756 playButton.style.display = "none"; 19757 video.classList.add("video-triggered"); 19758 iframe1.classList.add("hidden"); 19759 iframe2.classList.add("active"); 19760 try { 19761 player = new player_es_default(iframe2); 19762 player.setCurrentTime(0); 19763 player.setMuted(false); 19764 player.play(); 19765 pauseOtherVimeoInstances3(iframe2); 19766 } catch (error) { 19767 console.error("Error initializing Vimeo player:", error); 19768 } 19769 }, { once: true }); 19770 } 19771 if (document.querySelector(".section-media-split")) { 19772 handleMediaSplit(); 19773 } 19774 19775
19775// src/js/components/scorecard-split.js 19776 function handleScorecardSplit() { 19777 const el = document.querySelector(".section-scorecard-split"); 19778 const cont = el.querySelector("#scorecard-select"); 19779 const select = cont.querySelector("select"); 19780 const selection = cont.querySelector("span"); 19781 const ul = cont.querySelector("ul"); 19782 const scorecardGroups = el.querySelectorAll(".scorecard-tees-group"); 19783 scorecardGroups.forEach((group, idx) => { 19784 group.style.display = idx === 0 ? "block" : "none"; 19785 }); 19786 const handleListItems = (ul2, selectedItem) => { 19787 ul2.querySelectorAll("li").forEach((l) => { 19788 l.classList.toggle("active", l === selectedItem); 19789 }); 19790 }; 19791 const handleToggle = () => { 19792 ul.classList.toggle("open"); 19793 const icon = cont.querySelector("i"); 19794 icon.classList.toggle("flip"); 19795 }; 19796 cont.addEventListener("click", (e) => { 19797 handleToggle(); 19798 if (e.target.localName == "li" && e.target.dataset.value) { 19799 select.value = e.target.dataset.value; 19800 selection.innerHTML = e.target.innerHTML; 19801 handleListItems(ul, e.target); 19802 scorecardGroups.forEach((group) => { 19803 if (group.dataset.scorecard === e.target.dataset.value) { 19804 group.style.display = "block"; 19805 } else { 19806 group.style.display = "none"; 19807 } 19808 }); 19809 } 19810 }); 19811 document.addEventListener("click", (e) => { 19812 if (!cont.contains(e.target) && ul.classList.contains("open")) { 19813 handleToggle(); 19814 } 19815 }); 19816 } 19817 if (document.querySelector(".section-scorecard-split")) { 19818 handleScorecardSplit(); 19819 } 19820})(); 19821/*! 19822 * jQuery JavaScript Library v3.6.1 19823 * https://jquery.com/ 19824 * 19825 * Includes Sizzle.js 19826 * https://sizzlejs.com/ 19827 * 19828 * Copyright OpenJS Foundation and other contributors 19829 * Released under the MIT license 19830 * https://jquery.org/license 19831 * 19832 * Date: 2022-08-26T17:52Z 19833 */ 19834/*! 19835 * weakmap-polyfill v2.0.4 - ECMAScript6 WeakMap polyfill 19836 * https://github.com/polygonplanet/weakmap-polyfill 19837 * Copyright (c) 2015-2021 polygonplanet <[email protected]> 19838 * @license MIT 19839 */ 19840/*! @vimeo/player v2.30.1 | (c) 2025 Vimeo | MIT License | https://github.com/vimeo/player.js */ 19841/*! Native Promise Only 19842 v0.8.1 (c) Kyle Simpson 19843 MIT License: http://getify.mit-license.org 19844*/ 19845/*! jQuery UI - v1.13.2 - 2022-11-26 19846* http://jqueryui.com 19847* Includes: widget.js, position.js, data.js, disable-selection.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/draggable.js, widgets/droppable.js, widgets/resizable.js, widgets/selectable.js, widgets/sortable.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/selectmenu.js, widgets/slider.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js 19848* Copyright jQuery Foundation and other contributors; Licensed MIT */ 19849//# sourceMappingURL=bundle.js.map
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.