1((t, e) => { 2 "object" == typeof exports && "object" == typeof module 3 ? (module.exports = e()) 4 : "function" == typeof define && define.amd 5 ? define([], e) 6 : "object" == typeof exports 7 ? (exports.SnapSlider = e()) 8 : (t.SnapSlider = e()); 9})(window, function () { 10 return ( 11 (n = [ 12 function (t, e) { 13 t.exports = function (t) { 14 var e = typeof t; 15 return null != t && ("object" == e || "function" == e); 16 }; 17 }, 18 function (t, e, n) { 19 var y = n(0), 20 m = n(7), 21 x = n(10), 22 S = Math.max, 23 w = Math.min; 24 t.exports = function (o, n, t) { 25 var r, 26 i, 27 s, 28 a, 29 l, 30 c, 31 u = 0, 32 f = !1, 33 d = !1, 34 e = !0; 35 if ("function" != typeof o) throw TypeError("Expected a function"); 36 function p(t) { 37 var e = r, 38 n = i; 39 return ((r = i = void 0), (u = t), (a = o.apply(n, e))); 40 } 41 function h(t) { 42 var e = t - c; 43 return void 0 === c || n <= e || e < 0 || (d && s <= t - u); 44 } 45 function v() { 46 var t, 47 e = m(); 48 if (h(e)) return b(e); 49 l = setTimeout(v, ((t = n - (e - c)), d ? w(t, s - (e - u)) : t)); 50 } 51 function b(t) { 52 return ((l = void 0), e && r ? p(t) : ((r = i = void 0), a)); 53 } 54 function g() { 55 var t = m(), 56 e = h(t); 57 if (((r = arguments), (i = this), (c = t), e)) { 58 if (void 0 === l) 59 return ((u = t = c), (l = setTimeout(v, n)), f ? p(t) : a); 60 if (d) return (clearTimeout(l), (l = setTimeout(v, n)), p(c)); 61 } 62 return (void 0 === l && (l = setTimeout(v, n)), a); 63 } 64 return ( 65 (n = x(n) || 0), 66 y(t) && 67 ((f = !!t.leading), 68 (s = (d = "maxWait" in t) ? S(x(t.maxWait) || 0, n) : s), 69 (e = "trailing" in t ? !!t.trailing : e)), 70 (g.cancel = function () { 71 (void 0 !== l && clearTimeout(l), (r = c = i = l = void (u = 0))); 72 }), 73 (g.flush = function () { 74 return void 0 === l ? a : b(m()); 75 }), 76 g 77 ); 78 }; 79 }, 80 function (t, e, n) { 81 var i = n(1), 82 s = n(0); 83 t.exports = function (t, e, n) { 84 var o = !0, 85 r = !0; 86 if ("function" != typeof t) throw TypeError("Expected a function"); 87 return ( 88 s(n) && 89 ((o = "leading" in n ? !!n.leading : o), 90 (r = "trailing" in n ? !!n.trailing : r)), 91 i(t, e, { leading: o, maxWait: e, trailing: r }) 92 ); 93 }; 94 }, 95 function (t, e, n) { 96 var n = n(8), 97 o = "object" == typeof self && self && self.Object === Object && self, 98 n = n || o || Function("return this")(); 99 t.exports = n; 100 }, 101 function (t, e, n) { 102 n = n(3).Symbol; 103 t.exports = n; 104 }, 105 function (t, e, n) { 106 t.exports = { 107 polyfill: function () { 108 var t, 109 e, 110 a, 111 l, 112 n, 113 c = window, 114 u = document; 115 function f(t, e) { 116 ((this.scrollLeft = t), (this.scrollTop = e)); 117 } 118 function o(t) { 119 if ( 120 null === t || 121 "object" != typeof t || 122 void 0 === t.behavior || 123 "auto" === t.behavior || 124 "instant" === t.behavior 125 ) 126 return !0; 127 if ("object" == typeof t && "smooth" === t.behavior) return !1; 128 throw TypeError( 129 "behavior member of ScrollOptions " + 130 t.behavior + 131 " is not a valid value for enumeration ScrollBehavior.", 132 ); 133 } 134 function r(t, e) { 135 return "Y" === e 136 ? t.clientHeight + n < t.scrollHeight 137 : "X" === e 138 ? t.clientWidth + n < t.scrollWidth 139 : void 0; 140 } 141 function i(t, e) { 142 t = c.getComputedStyle(t, null)["overflow" + e]; 143 return "auto" === t || "scroll" === t; 144 } 145 function s(t, e, n) { 146 var o, 147 r, 148 i, 149 s = l(), 150 t = 151 t === u.body 152 ? ((r = (o = c).scrollX || c.pageXOffset), 153 (i = c.scrollY || c.pageYOffset), 154 a.scroll) 155 : ((r = (o = t).scrollLeft), (i = t.scrollTop), f); 156 (function t(e) { 157 var n = (l() - e.startTime) / 468, 158 n = 0.5 * (1 - Math.cos(Math.PI * (1 < n ? 1 : n))), 159 o = e.startX + (e.x - e.startX) * n, 160 n = e.startY + (e.y - e.startY) * n; 161 (e.method.call(e.scrollable, o, n), 162 (o === e.x && n === e.y) || 163 c.requestAnimationFrame(t.bind(c, e))); 164 })({ 165 scrollable: o, 166 method: t, 167 startTime: s, 168 startX: r, 169 startY: i, 170 x: e, 171 y: n, 172 }); 173 } 174 ("scrollBehavior" in u.documentElement.style && 175 !0 !== c.__forceSmoothScrollPolyfill__) || 176 ((e = c.HTMLElement || c.Element), 177 (a = { 178 scroll: c.scroll || c.scrollTo, 179 scrollBy: c.scrollBy, 180 elementScroll: e.prototype.scroll || f, 181 scrollIntoView: e.prototype.scrollIntoView, 182 }), 183 (l = 184 c.performance && c.performance.now 185 ? c.performance.now.bind(c.performance) 186 : Date.now), 187 (t = c.navigator.userAgent), 188 (n = RegExp("MSIE |Trident/|Edge/").test(t) ? 1 : 0), 189 (c.scroll = c.scrollTo = 190 function () { 191 void 0 !== arguments[0] && 192 (!0 !== o(arguments[0]) 193 ? s.call( 194 c, 195 u.body, 196 void 0 !== arguments[0].left 197 ? ~~arguments[0].left 198 : c.scrollX || c.pageXOffset, 199 void 0 !== arguments[0].top 200 ? ~~arguments[0].top 201 : c.scrollY || c.pageYOffset, 202 ) 203 : a.scroll.call( 204 c, 205 void 0 !== arguments[0].left 206 ? arguments[0].left 207 : "object" != typeof arguments[0] 208 ? arguments[0] 209 : c.scrollX || c.pageXOffset, 210 void 0 !== arguments[0].top 211 ? arguments[0].top 212 : void 0 !== arguments[1] 213 ? arguments[1] 214 : c.scrollY || c.pageYOffset, 215 )); 216 }), 217 (c.scrollBy = function () { 218 void 0 !== arguments[0] && 219 (o(arguments[0]) 220 ? a.scrollBy.call( 221 c, 222 void 0 !== arguments[0].left 223 ? arguments[0].left 224 : "object" != typeof arguments[0] 225 ? arguments[0] 226 : 0, 227 void 0 !== arguments[0].top 228 ? arguments[0].top 229 : void 0 !== arguments[1] 230 ? arguments[1] 231 : 0, 232 ) 233 : s.call( 234 c, 235 u.body, 236 ~~arguments[0].left + (c.scrollX || c.pageXOffset), 237 ~~arguments[0].top + (c.scrollY || c.pageYOffset), 238 )); 239 }), 240 (e.prototype.scroll = e.prototype.scrollTo = 241 function () { 242 if (void 0 !== arguments[0]) 243 if (!0 !== o(arguments[0])) { 244 var t = arguments[0].left, 245 e = arguments[0].top; 246 s.call( 247 this, 248 this, 249 void 0 === t ? this.scrollLeft : ~~t, 250 void 0 === e ? this.scrollTop : ~~e, 251 ); 252 } else { 253 if ( 254 "number" == typeof arguments[0] && 255 void 0 === arguments[1] 256 ) 257 throw SyntaxError("Value could not be converted"); 258 a.elementScroll.call( 259 this, 260 void 0 !== arguments[0].left 261 ? ~~arguments[0].left 262 : "object" != typeof arguments[0] 263 ? ~~arguments[0] 264 : this.scrollLeft, 265 void 0 !== arguments[0].top 266 ? ~~arguments[0].top 267 : void 0 !== arguments[1] 268 ? ~~arguments[1] 269 : this.scrollTop, 270 ); 271 } 272 }), 273 (e.prototype.scrollBy = function () { 274 void 0 !== arguments[0] && 275 (!0 !== o(arguments[0]) 276 ? this.scroll({ 277 left: ~~arguments[0].left + this.scrollLeft, 278 top: ~~arguments[0].top + this.scrollTop, 279 behavior: arguments[0].behavior, 280 }) 281 : a.elementScroll.call( 282 this, 283 void 0 !== arguments[0].left 284 ? ~~arguments[0].left + this.scrollLeft 285 : ~~arguments[0] + this.scrollLeft, 286 void 0 !== arguments[0].top 287 ? ~~arguments[0].top + this.scrollTop 288 : ~~arguments[1] + this.scrollTop, 289 )); 290 }), 291 (e.prototype.scrollIntoView = function () { 292 var t, e, n; 293 !0 !== o(arguments[0]) 294 ? ((e = (t = ((t) => { 295 for ( 296 ; 297 t !== u.body && 298 !1 === 299 ((n = void 0), 300 (n = r((e = t), "Y") && i(e, "Y")), 301 (e = r(e, "X") && i(e, "X")), 302 n || e); 303 ) 304 t = t.parentNode || t.host; 305 var e, n; 306 return t; 307 })(this)).getBoundingClientRect()), 308 (n = this.getBoundingClientRect()), 309 t !== u.body 310 ? (s.call( 311 this, 312 t, 313 t.scrollLeft + n.left - e.left, 314 t.scrollTop + n.top - e.top, 315 ), 316 "fixed" !== c.getComputedStyle(t).position && 317 c.scrollBy({ 318 left: e.left, 319 top: e.top, 320 behavior: "smooth", 321 })) 322 : c.scrollBy({ 323 left: n.left, 324 top: n.top, 325 behavior: "smooth", 326 })) 327 : a.scrollIntoView.call( 328 this, 329 void 0 === arguments[0] || arguments[0], 330 ); 331 })); 332 }, 333 }; 334 }, 335 function (t, e) { 336 var n = [ 337 "input", 338 "select", 339 "textarea", 340 "a[href]", 341 "button", 342 "[tabindex]", 343 "audio[controls]", 344 "video[controls]", 345 '[contenteditable]:not([contenteditable="false"])', 346 ], 347 l = n.join(","), 348 c = 349 "undefined" == typeof Element 350 ? function () {} 351 : Element.prototype.matches || 352 Element.prototype.msMatchesSelector || 353 Element.prototype.webkitMatchesSelector; 354 function o(t, e) { 355 e = e || {}; 356 var n, 357 o, 358 r, 359 i = [], 360 s = [], 361 a = t.querySelectorAll(l); 362 for ( 363 e.includeContainer && 364 c.call(t, l) && 365 (a = Array.prototype.slice.apply(a)).unshift(t), 366 n = 0; 367 n < a.length; 368 n++ 369 ) 370 u((o = a[n])) && 371 (0 === (r = f(o)) 372 ? i.push(o) 373 : s.push({ documentOrder: n, tabIndex: r, node: o })); 374 return s 375 .sort(d) 376 .map(function (t) { 377 return t.node; 378 }) 379 .concat(i); 380 } 381 function u(t) { 382 var e, n; 383 return !( 384 !r(t) || 385 (s((e = n = t)) && 386 "radio" === e.type && 387 (e = n).name && 388 (n = ((t) => { 389 for (var e = 0; e < t.length; e++) 390 if (t[e].checked) return t[e]; 391 })( 392 e.ownerDocument.querySelectorAll( 393 'input[type="radio"][name="' + e.name + '"]', 394 ), 395 )) && 396 n !== e) || 397 f(t) < 0 398 ); 399 } 400 function r(t) { 401 var e; 402 return !( 403 t.disabled || 404 (s((e = t)) && "hidden" === e.type) || 405 null === t.offsetParent || 406 "hidden" === getComputedStyle(t).visibility 407 ); 408 } 409 ((o.isTabbable = function (t) { 410 if (t) return !1 !== c.call(t, l) && u(t); 411 throw Error("No node provided"); 412 }), 413 (o.isFocusable = function (t) { 414 if (t) return !1 !== c.call(t, i) && r(t); 415 throw Error("No node provided"); 416 })); 417 var i = n.concat("iframe").join(","); 418 function f(t) { 419 var e = parseInt(t.getAttribute("tabindex"), 10); 420 return isNaN(e) ? ("true" === t.contentEditable ? 0 : t.tabIndex) : e; 421 } 422 function d(t, e) { 423 return t.tabIndex === e.tabIndex 424 ? t.documentOrder - e.documentOrder 425 : t.tabIndex - e.tabIndex; 426 } 427 function s(t) { 428 return "INPUT" === t.tagName; 429 } 430 t.exports = o; 431 }, 432 function (t, e, n) { 433 var o = n(3); 434 t.exports = function () { 435 return o.Date.now(); 436 }; 437 }, 438 function (e, t, n) { 439 !function (t) { 440 t = "object" == typeof t && t && t.Object === Object && t; 441 e.exports = t; 442 }.call(this, n(9));
443 }, 444 function (t, e) { 445 var n = (function () { 446 return this; 447 })(); 448 try { 449 n = n || Function("return this")(); 450 } catch (t) { 451 "object" == typeof window && (n = window); 452 } 453 t.exports = n; 454 }, 455 function (t, e, n) { 456 var o = n(11), 457 r = n(0), 458 i = n(13), 459 s = /^[-+]0x[0-9a-f]+$/i, 460 a = /^0b[01]+$/i, 461 l = /^0o[0-7]+$/i, 462 c = parseInt; 463 t.exports = function (t) { 464 if ("number" == typeof t) return t; 465 if (i(t)) return NaN; 466 if ( 467 (r(t) && 468 ((e = "function" == typeof t.valueOf ? t.valueOf() : t), 469 (t = r(e) ? e + "" : e)), 470 "string" != typeof t) 471 ) 472 return 0 === t ? t : +t; 473 t = o(t); 474 var e = a.test(t); 475 return e || l.test(t) 476 ? c(t.slice(2), e ? 2 : 8) 477 : s.test(t) 478 ? NaN 479 : +t; 480 }; 481 }, 482 function (t, e, n) { 483 var o = n(12), 484 r = /^\s+/; 485 t.exports = function (t) { 486 return t && t.slice(0, o(t) + 1).replace(r, ""); 487 }; 488 }, 489 function (t, e) { 490 var n = /\s/; 491 t.exports = function (t) { 492 for (var e = t.length; e-- && n.test(t.charAt(e)); ); 493 return e; 494 }; 495 }, 496 function (t, e, n) { 497 var o = n(14), 498 r = n(17); 499 t.exports = function (t) { 500 return "symbol" == typeof t || (r(t) && "[object Symbol]" == o(t)); 501 }; 502 }, 503 function (t, e, n) { 504 var o = n(4), 505 r = n(15), 506 i = n(16), 507 s = o ? o.toStringTag : void 0; 508 t.exports = function (t) { 509 return null == t 510 ? void 0 === t 511 ? "[object Undefined]" 512 : "[object Null]" 513 : (s && s in Object(t) ? r : i)(t); 514 }; 515 }, 516 function (t, e, n) { 517 var n = n(4), 518 o = Object.prototype, 519 i = o.hasOwnProperty, 520 s = o.toString, 521 a = n ? n.toStringTag : void 0; 522 t.exports = function (t) { 523 var e = i.call(t, a), 524 n = t[a]; 525 try { 526 var o = !(t[a] = void 0); 527 } catch (t) {} 528 var r = s.call(t); 529 return (o && (e ? (t[a] = n) : delete t[a]), r); 530 }; 531 }, 532 function (t, e) { 533 var n = Object.prototype.toString; 534 t.exports = function (t) { 535 return n.call(t); 536 }; 537 }, 538 function (t, e) { 539 t.exports = function (t) { 540 return null != t && "object" == typeof t; 541 }; 542 }, 543 function (t, e, n) { 544 n.r(e); 545 var o = n(5), 546 r = n.n(o), 547 o = n(6), 548 i = n.n(o), 549 o = n(1), 550 s = n.n(o), 551 o = n(2), 552 a = n.n(o); 553 function l(t) { 554 return Array.prototype.slice.call(t); 555 } 556 function c(t, e) { 557 return t ? l((e || document).querySelectorAll(t)) : []; 558 } 559 function u(t, e) { 560 return "string" == typeof t 561 ? c(t, e) 562 : t instanceof Element 563 ? [t] 564 : t 565 ? Array.prototype.slice.call(t) 566 : []; 567 } 568 function f(t, e) { 569 return Object.prototype.hasOwnProperty.call(t, e); 570 } 571 function d(t) { 572 return t && "Object" === t.constructor.name; 573 } 574 function p(t, e, n) { 575 return Math.max(e, (t = Math.min(n, t))); 576 } 577 var h = (() => { 578 var t = !1; 579 try { 580 var e = Object.defineProperty({}, "passive", { 581 get: function () { 582 t = { passive: !0 }; 583 }, 584 }); 585 (window.addEventListener("testPassive", null, e), 586 window.removeEventListener("testPassive", null, e)); 587 } catch (t) {} 588 return t; 589 })(); 590 function v(e, t) { 591 var n, 592 o = Object.keys(e); 593 return ( 594 Object.getOwnPropertySymbols && 595 ((n = Object.getOwnPropertySymbols(e)), 596 t && 597 (n = n.filter(function (t) { 598 return Object.getOwnPropertyDescriptor(e, t).enumerable; 599 })), 600 o.push.apply(o, n)), 601 o 602 ); 603 } 604 function b(o) { 605 for (var t = 1; t < arguments.length; t++) { 606 var r = null != arguments[t] ? arguments[t] : {}; 607 t % 2
608 ? v(Object(r), !0).forEach(function (t) { 609 var e, n; 610 ((e = o), 611 (n = r[(t = t)]), 612 t in e 613 ? Object.defineProperty(e, t, { 614 value: n, 615 enumerable: !0, 616 configurable: !0, 617 writable: !0, 618 }) 619 : (e[t] = n)); 620 }) 621 : Object.getOwnPropertyDescriptors 622 ? Object.defineProperties( 623 o, 624 Object.getOwnPropertyDescriptors(r), 625 ) 626 : v(Object(r)).forEach(function (t) { 627 Object.defineProperty( 628 o, 629 t, 630 Object.getOwnPropertyDescriptor(r, t), 631 ); 632 }); 633 } 634 return o; 635 } 636 function g(t, e) { 637 for (var n = 0; n < e.length; n++) { 638 var o = e[n]; 639 ((o.enumerable = o.enumerable || !1), 640 (o.configurable = !0), 641 "value" in o && (o.writable = !0), 642 Object.defineProperty(t, o.key, o)); 643 } 644 } 645 var y = 1, 646 m = 647 ((n = [ 648 { 649 key: "isValidIndex", 650 value: function (t) { 651 return ( 652 0 <= 653 ["first", "middle", "last", "prev", "next"].indexOf(t) || 654 1 <= parseInt(t, 10) 655 ); 656 }, 657 }, 658 { 659 key: "getButtonTarget", 660 value: function (t) { 661 var e, 662 n, 663 o, 664 r = t ? t.getAttribute("data-snap-slider-goto") : ""; 665 return r 666 ? ((e = (r = r.split(":").map(function (t) { 667 return t.trim(); 668 })).pop()), 669 (r = r.pop()) || 670 ((o = t.closest("[data-snap-slider-nav]")), 671 (n = t.closest("[data-snap-slider]")), 672 o && (r = o.getAttribute("data-snap-slider-nav")), 673 n && (r = n.getAttribute("data-snap-slider"))), 674 r || 675 ((o = t.closest("data-snap-slider")) && 676 (r = o.getAttribute("data-snap-slider"))), 677 { sliderID: r, index: e }) 678 : {}; 679 }, 680 }, 681 { 682 key: "handleGoto", 683 value: function (t) { 684 var e = t.target.closest("[data-snap-slider-goto]"), 685 e = x.getButtonTarget(e), 686 n = e.sliderID, 687 n = window._SnapSliders[n]; 688 n && n.goto(e.index, null, t); 689 }, 690 }, 691 { 692 key: "isRelative", 693 value: function (t) { 694 return "prev" === t || "next" === t; 695 }, 696 }, 697 { key: "notFound", value: function (t) {} }, 698 { 699 key: "get", 700 value: function (t) { 701 return window._SnapSliders[t]; 702 }, 703 }, 704 { key: "debug", value: function (t) {} }, 705 ]), 706 g((o = x).prototype, [ 707 { 708 key: "init", 709 value: function (t) { 710 var e = 711 1 < arguments.length && void 0 !== arguments[1] 712 ? arguments[1] 713 : {}, 714 t = 715 (d(t) && (e = t), 716 (this.options = b( 717 { 718 container: t, 719 id: "", 720 slides: "", 721 nav: "", 722 buttons: "", 723 prev: "", 724 next: "", 725 start: 0, 726 loop: null, 727 on: {}, 728 }, 729 e, 730 )), 731 u(this.options.container).shift()); 732 if (t) { 733 for (var n in ((this.container = t), 734 (this.options.buttons = 735 e.buttons || 736 this.container.getAttribute("data-snap-slider-buttons")), 737 (this.options.prev = 738 e.prev || 739 this.container.getAttribute("data-snap-slider-prev")), 740 (this.options.next = 741 e.next || 742 this.container.getAttribute("data-snap-slider-next")), 743 (this.id = this.getMaybeSetID(t, this.options.id)), 744 (this.slides = this.getMaybeSetSlides( 745 t, 746 this.options.slides, 747 )), 748 (this.align = this.getMaybeSetAlign(t, this.options.align)), 749 (this.current = this.getMaybeSetStart( 750 t, 751 this.options.start, 752 )), 753 (this.loop = this.getMaybeSetLoop(t, this.options.loop)), 754 (this.transition = null), 755 (this.scrolling = !1), 756 this.options.on)) 757 f(this.options.on, n) && this.on(n, this.options.on[n]); 758 o = this.options; 759 var o, 760 e = ["buttons", "prev", "next"].reduce(function (t, e) { 761 return ((t[e] = o[e]), t); 762 }, {}); 763 (this.addGotoButtons(b(b({}, e), {}, { container: t })), 764 this.addNav( 765 '[data-snap-slider-nav="'.concat(this.id, '"]'), 766 e, 767 ), 768 this.options.nav && this.addNav(this.options.nav, e), 769 this.update()); 770 } 771 }, 772 }, 773 { 774 key: "getMaybeSetID", 775 value: function (t, e) { 776 return ( 777 (e = e || t.getAttribute("data-snap-slider") || t.id) ||
778 ((e = "slider-".concat(y)), (y += 1)), 779 t.setAttribute("data-snap-slider", e), 780 e 781 ); 782 }, 783 }, 784 { 785 key: "getMaybeSetSlides", 786 value: function (t, e) { 787 ((e = 788 e && "string" == typeof e 789 ? e 790 : t.getAttribute("data-snap-slider-slides")), 791 t.setAttribute("data-snap-slider-slides", e || "")); 792 e = e ? u(e, t) : l(t.children); 793 return ( 794 e.forEach(function (t) { 795 return t.setAttribute("tabindex", "-1"); 796 }), 797 e 798 ); 799 }, 800 }, 801 { 802 key: "getMaybeSetAlign", 803 value: function (t, e) { 804 return ( 805 (e = e || t.getAttribute("data-snap-slider-align") || ""), 806 t.setAttribute("data-snap-slider-align", e), 807 e 808 ); 809 }, 810 }, 811 { 812 key: "getMaybeSetStart", 813 value: function (t, e) { 814 return ( 815 x.isValidIndex(e) || 816 (e = t.getAttribute("data-snap-slider-start") || 1), 817 t.setAttribute("data-snap-slider-start", e), 818 e 819 ); 820 }, 821 }, 822 { 823 key: "getMaybeSetLoop", 824 value: function (t, e) { 825 return ( 826 (e = 827 "boolean" == typeof e 828 ? e 829 : "true" === t.getAttribute("data-snap-slider-loop")), 830 t.setAttribute("data-snap-slider-loop", e), 831 e 832 ); 833 }, 834 }, 835 { 836 key: "getSnapAlign", 837 value: function (t) { 838 var e = "scrollSnapAlign", 839 n = (n = window.getComputedStyle(t)) && f(n, e) ? n[e] : "", 840 e = "data-snap-slider-align"; 841 return n && n.indexOf("none") < 0 842 ? n 843 : ((n = (n = t) && n.closest("[".concat(e, "]"))) 844 ? n.getAttribute(e) 845 : "") || "start"; 846 }, 847 }, 848 { 849 key: "getSlide", 850 value: function (t) { 851 return ((t = this.getIndexNumber(t)), this.slides[t - 1]); 852 }, 853 }, 854 { 855 key: "getCurrentSlide", 856 value: function () { 857 return this.slides[this.current - 1]; 858 }, 859 }, 860 { 861 key: "getIndexNumber", 862 value: function (t) { 863 t = 864 "first" === t 865 ? 1 866 : "middle" === t 867 ? Math.ceil(this.slides.length / 2) 868 : "last" === t 869 ? this.slides.length 870 : "prev" === t 871 ? this.current - 1 872 : "next" === t 873 ? this.current + 1 874 : parseInt(t, 10) || -1; 875 return ( 876 this.loop 877 ? (t = t < 1 ? this.slides.length : t) > 878 this.slides.length && (t = 1) 879 : (t < 1 || t > this.slides.length) && (t = -1), 880 t || 1 881 ); 882 }, 883 }, 884 { 885 key: "getScrollOffset", 886 value: function (t) { 887 var e = this.container,
888 n = this.getSnapAlign(t), 889 o = t.offsetTop, 890 r = t.offsetLeft; 891 return ( 892 0 <= n.indexOf("center") 893 ? ((o = 894 t.offsetTop + 895 t.offsetHeight / 2 - 896 e.offsetHeight / 2), 897 (r = 898 t.offsetLeft + t.offsetWidth / 2 - e.offsetWidth / 2)) 899 : 0 <= n.indexOf("end") && 900 ((o = t.offsetTop - e.offsetHeight + t.offsetHeight), 901 (r = t.offsetLeft - e.offsetWidth + t.offsetWidth)), 902 { 903 top: (o = p(o, 0, e.scrollHeight)), 904 left: (r = p(r, 0, e.scrollWidth)), 905 } 906 ); 907 }, 908 }, 909 { 910 key: "goto", 911 value: function (t) { 912 var e, 913 n, 914 o = 915 1 < arguments.length && void 0 !== arguments[1] 916 ? arguments[1] 917 : {}, 918 r = 2 < arguments.length ? arguments[2] : void 0, 919 o = b( 920 { 921 focus: !0, 922 force: !1, 923 ignoreCallbacks: !1, 924 immediate: !1, 925 }, 926 o, 927 ), 928 t = this.getIndexNumber(t); 929 return !( 930 (!o.force && t === this.current) || 931 !(n = this.getSlide(t)) || 932 ((e = (n = this.getScrollOffset(n)).top), 933 (n = n.left), 934 o.immediate 935 ? "function" == typeof this.container.scroll && 936 this.container.scroll({ top: e, left: n }) 937 : (this.startTransition(t), 938 "function" == typeof this.container.scroll && 939 this.container.scroll({ 940 top: e, 941 left: n, 942 behavior: "smooth", 943 })), 944 (this.current = t), 945 this.fireEvent("change", r, o), 946 0) 947 ); 948 }, 949 }, 950 { 951 key: "buildGoto", 952 value: function (t) { 953 var e = 954 1 < arguments.length && void 0 !== arguments[1] 955 ? arguments[1] 956 : "", 957 n = ""; 958 return (t || (n += "".concat(this.id, ":")), n + e); 959 }, 960 }, 961 { 962 key: "setGoto", 963 value: function (t, e) { 964 var n = this; 965 (t = u(t)).forEach(function (t) { 966 t.setAttribute( 967 "data-snap-slider-goto", 968 n.buildGoto( 969 t.closest("[data-snap-slider], [data-snap-slider-nav]"), 970 e, 971 ), 972 ); 973 }); 974 }, 975 }, 976 { 977 key: "startTransition", 978 value: function (t) { 979 var e = this, 980 n = 981 ((this.transition = { 982 from: this.current, 983 to: t, 984 diff: Math.abs(t - this.current), 985 }), 986 this.transition.to); 987 (this.checkTransition && clearTimeout(this.checkTransition), 988 (this.checkTransition = setTimeout(function () { 989 e.transition.to === n && e.stopTransition(); 990 }, 1e3))); 991 }, 992 }, 993 { 994 key: "stopTransition", 995 value: function () { 996 ((this.transition = null), 997 clearTimeout(this.checkTransition)); 998 }, 999 }, 1000 { 1001 key: "isPrevButton", 1002 value: function (t) { 1003 return ( 1004 !!(t = u(t).shift()) && 1005 ((t.getAttribute("data-snap-slider-goto") || "").match( 1006 /\bprev$/, 1007 ) || 1008 t.textContent.toLowerCase().match(this.terms.prev) || 1009 t.className.toLowerCase().match(this.terms.prev)) 1010 ); 1011 }, 1012 }, 1013 { 1014 key: "isNextButton", 1015 value: function (t) { 1016 return ( 1017 !!(t = u(t).shift()) && 1018 ((t.getAttribute("data-snap-slider-goto") || "").match( 1019 /\bnext$/, 1020 ) || 1021 t.textContent.toLowerCase().match(this.terms.next) || 1022 t.className.toLowerCase().match(this.terms.next)) 1023 ); 1024 }, 1025 }, 1026 { 1027 key: "isCurrent", 1028 value: function (t) { 1029 return ( 1030 !x.isRelative(t) && this.getIndexNumber(t) === this.current 1031 ); 1032 }, 1033 }, 1034 { 1035 key: "addGotoButtons", 1036 value: function (t) { 1037 var n = this, 1038 e = 1039 1 < arguments.length && void 0 !== arguments[1] 1040 ? arguments[1] 1041 : {}, 1042 t = u( 1043 (e = b( 1044 { container: "", buttons: t, prev: "", next: "" }, 1045 (e = d(t) ? t : e), 1046 )).buttons, 1047 e.container, 1048 ), 1049 o = u(e.prev, e.container), 1050 r = u(e.next, e.container), 1051 i =
1052 (o.forEach(function (t) { 1053 return ( 1054 t.hasAttribute("data-snap-slider-goto") || 1055 n.setGoto(o, "prev") 1056 ); 1057 }), 1058 r.forEach(function (t) { 1059 return ( 1060 t.hasAttribute("data-snap-slider-goto") || 1061 n.setGoto(r, "next") 1062 ); 1063 }), 1064 1); 1065 return ( 1066 t.forEach(function (t) { 1067 var e; 1068 return t.hasAttribute("data-snap-slider-goto") 1069 ? null 1070 : n.isPrevButton(t) 1071 ? n.setGoto(t, "prev") 1072 : n.isNextButton(t) 1073 ? n.setGoto(t, "next") 1074 : ((e = 1075 parseInt( 1076 t.textContent.replace(/.*\b(\d+)\b.*/, "$1"), 1077 10, 1078 ) || i), 1079 (i = e + 1), 1080 n.setGoto(t, e)); 1081 }), 1082 this.updateButtons(), 1083 !0 1084 ); 1085 }, 1086 }, 1087 { 1088 key: "getNavs", 1089 value: function () { 1090 var e = this; 1091 return c("[data-snap-slider-nav]").filter(function (t) { 1092 return t.getAttribute("data-snap-slider-nav") === e.id; 1093 }); 1094 }, 1095 }, 1096 { 1097 key: "getButtons", 1098 value: function () { 1099 var e = this; 1100 return c("[data-snap-slider-goto]").filter(function (t) { 1101 return x.getButtonTarget(t).sliderID === e.id; 1102 }); 1103 }, 1104 }, 1105 { 1106 key: "updateButtons", 1107 value: function () { 1108 var n = this; 1109 this.current && 1110 this.getButtons().forEach(function (t) { 1111 var e = x.getButtonTarget(t).index; 1112 (n.isCurrent(e) 1113 ? t.classList.add("is-current") 1114 : t.classList.remove("is-current"), 1115 !n.loop && 1116 x.isRelative(e) && 1117 (("prev" === e && 1 === n.current) || 1118 ("next" === e && n.current === n.slides.length) 1119 ? t.classList.add("is-disabled") 1120 : t.classList.remove("is-disabled"))); 1121 }); 1122 }, 1123 }, 1124 { 1125 key: "updateSlides", 1126 value: function () { 1127 var n = this; 1128 this.slides.forEach(function (t, e) { 1129 e === n.current - 1 1130 ? (t.classList.add("is-current"), 1131 t.removeAttribute("aria-hidden"), 1132 c("[data-snap-slider-tabindex]", t).forEach( 1133 function (t) { 1134 t.removeAttribute("tabindex"); 1135 }, 1136 )) 1137 : (t.classList.remove("is-current"), 1138 t.setAttribute("aria-hidden", "true"), 1139 i()(t).forEach(function (t) { 1140 (t.setAttribute("tabindex", "-1"), 1141 t.setAttribute("data-snap-slider-tabindex", "")); 1142 })); 1143 }); 1144 }, 1145 }, 1146 { 1147 key: "addNav", 1148 value: function (t) { 1149 var r = this, 1150 i = 1151 1 < arguments.length && void 0 !== arguments[1] 1152 ? arguments[1] 1153 : {}, 1154 t = u( 1155 (i = b( 1156 { container: t, buttons: "", prev: "", next: "" }, 1157 (i = d(t) ? t : i), 1158 )).container, 1159 ); 1160 return ( 1161 !!t.length && 1162 (t.forEach(function (t) { 1163 t.setAttribute("data-snap-slider-nav", r.id); 1164 var e = 1165 t.getAttribute("data-snap-slider-buttons") || 1166 i.buttons || 1167 "button", 1168 n = i.prev || t.getAttribute("data-snap-slider-prev"), 1169 o = i.next || t.getAttribute("data-snap-slider-next"); 1170 r.addGotoButtons({ 1171 container: t, 1172 buttons: e, 1173 prev: n, 1174 next: o, 1175 }); 1176 }), 1177 !0) 1178 ); 1179 }, 1180 }, 1181 { 1182 key: "getClosest", 1183 value: function () { 1184 var r = this; 1185 return this.slides.reduce(function (t, e, n) { 1186 n += 1; 1187 var o = r.getScrollOffset(e), 1188 n = { 1189 index: n, 1190 slide: e, 1191 diff: { 1192 top: Math.abs(r.container.scrollTop - o.top), 1193 left: Math.abs(r.container.scrollLeft - o.left), 1194 }, 1195 }; 1196 return !t || 1197 (n.diff.left <= t.diff.left && n.diff.top <= t.diff.top) 1198 ? n 1199 : t; 1200 }, !1); 1201 }, 1202 }, 1203 { 1204 key: "watchForChanges", 1205 value: function () { 1206 var i = this; 1207 ((this.scrollListener = a()(function (t) { 1208 var e = i.getClosest(); 1209 (i.transition || 1210 e.index === i.current || 1211 ((i.current = e.index), i.fireEvent("change", t)), 1212 i.scrolling || 1213 ((i.scrolling = !0), i.fireEvent("scroll.
1213start", t)), 1214 i.fireEvent("scroll", t)); 1215 }, 250)), 1216 (this.scrollEndListener = s()(function (t) { 1217 ((i.scrolling = !1), 1218 i.fireEvent("scroll.end", t), 1219 i.stopTransition()); 1220 }, 100)), 1221 (this.arrowKeyListener = a()(function (t) { 1222 var e, n; 1223 !t.defaultPrevented && 1224 ((e = 1225 0 <= 1226 ["Up", "ArrowUp", "Left", "ArrowLeft"].indexOf( 1227 t.key, 1228 )), 1229 (n = 1230 0 <= 1231 ["Down", "ArrowDown", "Right", "ArrowRight"].indexOf( 1232 t.key, 1233 )), 1234 e || n) && 1235 (i.goto(n ? "next" : "prev", null, t), 1236 t.preventDefault()); 1237 }, 250)), 1238 (this.focusListener = function (n) { 1239 var o, r; 1240 (i.scrolling && !i.transition) || 1241 (i.slides.forEach(function (t, e) { 1242 t.contains(n.target) && ((o = t), (r = e + 1)); 1243 }, null), 1244 o && i.goto(r, null, n)); 1245 }), 1246 (this.resizeObserver = { 1247 observe: function () {}, 1248 disconnect: function () {}, 1249 }), 1250 "ResizeObserver" in window && 1251 (this.resizeObserver = new ResizeObserver( 1252 this.resizeCallback.bind(this), 1253 )), 1254 setTimeout(function () { 1255 (i.container.addEventListener( 1256 "scroll", 1257 i.scrollListener, 1258 h, 1259 ), 1260 i.container.addEventListener( 1261 "scroll", 1262 i.scrollEndListener, 1263 h, 1264 ), 1265 i.resizeObserver.observe(i.container), 1266 i.fireEvent("load")); 1267 }, 100)); 1268 }, 1269 }, 1270 { 1271 key: "hasLoaded", 1272 value: function () { 1273 this.container.classList.add("has-loaded"); 1274 }, 1275 }, 1276 { 1277 key: "update", 1278 value: function () { 1279 this.goto(this.current, { 1280 focus: !1, 1281 force: !0, 1282 ignoreCallbacks: !0, 1283 immediate: !0, 1284 }); 1285 }, 1286 }, 1287 { 1288 key: "destroy", 1289 value: function () { 1290 for (var t in (this.stopTransition(), 1291 this.container.removeEventListener( 1292 "scroll", 1293 this.scrollListener, 1294 ), 1295 this.container.removeEventListener( 1296 "scroll", 1297 this.scrollEndListener, 1298 ), 1299 this.container.removeEventListener( 1300 "keydown", 1301 this.arrowKeyListener, 1302 ), 1303 this.resizeObserver.disconnect(), 1304 this.callbacks)) 1305 f(this.callbacks, t) && (this.callbacks[t] = []); 1306 (delete this.container.SnapSlider, 1307 delete window._SnapSliders[this.id]); 1308 }, 1309 }, 1310 { 1311 key: "reset", 1312 value: function () { 1313 var t = 1314 0 < arguments.length && void 0 !== arguments[0] 1315 ? arguments[0] 1316 : {}, 1317 e = this.options; 1318 (delete e.on, 1319 delete t.container, 1320 delete t.id, 1321 this.init(this.container, b(b({}, e), t))); 1322 }, 1323 }, 1324 { 1325 key: "resizeCallback", 1326 value: function () { 1327 this.update(); 1328 }, 1329 }, 1330 { 1331 key: "fireEvent", 1332 value: function (t, e) { 1333 var n = this, 1334 o = 1335 2 < arguments.length && void 0 !== arguments[2] 1336 ? arguments[2] 1337 : {}; 1338 f(this.callbacks, t) && 1339 ((o = b({ focus: !0, ignoreCallbacks: !1 }, o)), 1340 "load" === t && this.hasLoaded(), 1341 "change" === t && 1342 (this.updateButtons(), this.updateSlides()), 1343 o.focus && this.handleFocus(t, e), 1344 !o.ignoreCallbacks) && 1345 ((e = e || {}), 1346 (o = [t]), 1347 f(this.callbacks, "".concat(t, ".").concat(e.type)) && 1348 o.push("".concat(t, ".").concat(e.type)), 1349 o.forEach(function (t) { 1350 n.callbacks[t].forEach(function (t) { 1351 "function" == typeof t && t(n, e); 1352 }); 1353 })); 1354 }, 1355 }, 1356 { 1357 key: "handleFocus", 1358 value: function (t, e) { 1359 if (this.transition) { 1360 if (e && "change" === t) { 1361 ((e = e.target.closest("[data-snap-slider-goto]")), 1362 (e = x.getButtonTarget(e).index)); 1363 if (x.isRelative(e)) return; 1364 } 1365 1 < this.transition.diff && 1366 "scroll.end" === t && 1367 ((document.activeElement && 1368 document.activeElement !== document.body && 1369 !document.activeElement.closest( 1370 "[data-snap-slider-goto]", 1371 )) || 1372 this.getCurrentSlide().focus({ preventScroll: !0 })); 1373 } 1374 }, 1375 }, 1376 { 1377 key: "on", 1378 value: function (t, e) { 1379 f(this.callbacks, t) && 1380 "function" == typeof e && 1381 this.callbacks[t].push(e); 1382 }, 1383 }, 1384 ]), 1385 g(o, n), 1386 x); 1387 function x(t) { 1388 var e = 1389 1 < arguments.length && void 0 !== arguments[1] 1390 ? arguments[1] 1391 : {}, 1392 n = this, 1393 o = x; 1394 if (!(n instanceof o)) 1395 throw TypeError("Cannot call a class as a function"); 1396 ((this.terms = { 1397 prev: /(prev|back|before|left|up)/, 1398 next: /(next|forward|after|right|down)/, 1399 }), 1400 (this.callbacks = { 1401 load: [], 1402 change: [], 1403 "change.click": [], 1404 "change.scroll": [], 1405 "change.keydown": [], 1406 "change.focusin": [], 1407 scroll: [], 1408 "scroll.start": [], 1409 "scroll.end": [], 1410 }), 1411 this.init(t, e), 1412 this.container && 1413 (this.watchForChanges(), 1414 (this.container.SnapSlider = this), 1415 (window._SnapSliders[this.id] = this))); 1416 } 1417 ((window._SnapSliders = []), 1418 (window.SnapSlider = m), 1419 "undefined" != typeof $ && 1420 $.fn && 1421 ($.fn.snapSlider = function (t) { 1422 return new m(this, t); 1423 }), 1424 (o = function () { 1425 var a, 1426 l, 1427 t = window; 1428 ("function" != typeof (t = t.Element.prototype).matches && 1429 (t.matches = 1430 t.msMatchesSelector || 1431 t.mozMatchesSelector || 1432 t.webkitMatchesSelector || 1433 function (t) { 1434 for ( 1435 var e = ( 1436 this.document || this.ownerDocument 1437 ).querySelectorAll(t), 1438 n = 0; 1439 e[n] && e[n] !== this; 1440 ) 1441 ++n; 1442 return Boolean(e[n]); 1443 }), 1444 "function" != typeof t.closest && 1445 (t.closest = function (t) { 1446 for (var e = this; e && 1 === e.nodeType; ) { 1447 if (e.matches(t)) return e; 1448 e = e.parentNode; 1449 } 1450 return null; 1451 }), 1452 r.a.polyfill(), 1453 c("[data-snap-slider]").forEach(function (t) { 1454 return new m(t); 1455 }), 1456 (a = m.handleGoto), 1457 (l = document.querySelector("body")) && 1458 l.addEventListener("click", function (t) { 1459 for ( 1460 var e = l.querySelectorAll("[data-snap-slider-goto]"), 1461 n = t.target, 1462 o = 0, 1463 r = e.length; 1464 o < r; 1465 o += 1 1466 ) 1467 for (var i = n, s = e[o]; i && i !== l; ) { 1468 if (i === s) return a.call(s, t); 1469 i = i.parentNode; 1470 } 1471 })); 1472 }), 1473 "loading" !== document.readyState 1474 ? o() 1475 : document.addEventListener("DOMContentLoaded", o), 1476 (e.default = m)); 1477 }, 1478 ]), 1479 (o = {}), 1480 (r.m = n), 1481 (r.c = o),
1482 (r.d = function (t, e, n) { 1483 r.o(t, e) || Object.defineProperty(t, e, { enumerable: !0, get: n }); 1484 }), 1485 (r.r = function (t) { 1486 ("undefined" != typeof Symbol && 1487 Symbol.toStringTag && 1488 Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }), 1489 Object.defineProperty(t, "__esModule", { value: !0 })); 1490 }), 1491 (r.t = function (e, t) { 1492 if ( 1493 (1 & t && (e = r(e)), 1494 8 & t || (4 & t && "object" == typeof e && e && e.__esModule)) 1495 ) 1496 return e; 1497 var n = Object.create(null); 1498 if ( 1499 (r.r(n), 1500 Object.defineProperty(n, "default", { enumerable: !0, value: e }), 1501 2 & t && "string" != typeof e) 1502 ) 1503 for (var o in e) 1504 r.d( 1505 n, 1506 o, 1507 function (t) { 1508 return e[t]; 1509 }.bind(null, o), 1510 ); 1511 return n; 1512 }), 1513 (r.n = function (t) { 1514 var e = 1515 t && t.__esModule 1516 ? function () { 1517 return t.default; 1518 } 1519 : function () { 1520 return t; 1521 }; 1522 return (r.d(e, "a", e), e); 1523 }), 1524 (r.o = function (t, e) { 1525 return Object.prototype.hasOwnProperty.call(t, e); 1526 }), 1527 (r.p = ""), 1528 r((r.s = 18)).default 1529 ); 1530 function r(t) { 1531 var e; 1532 return ( 1533 o[t] || 1534 ((e = o[t] = { i: t, l: !1, exports: {} }), 1535 n[t].call(e.exports, e, e.exports, r), 1536 (e.l = !0), 1537 e) 1538 ).exports; 1539 } 1540 var n, o; 1541});
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.