1/** 2 * Swiper 11.2.8 3 * Most modern mobile touch slider and framework with hardware accelerated transitions 4 * https://swiperjs.com 5 * 6 * Copyright 2014-2025 Vladimir Kharlampidi 7 * 8 * Released under the MIT License 9 * 10 * Released on: May 23, 2025 11 */ 12 13var Swiper = (function () { 14 "use strict"; 15 function e(e) { 16 return ( 17 null !== e && 18 "object" == typeof e && 19 "constructor" in e && 20 e.constructor === Object 21 ); 22 } 23 function t(s, a) { 24 void 0 === s && (s = {}), void 0 === a && (a = {}); 25 const i = ["__proto__", "constructor", "prototype"]; 26 Object.keys(a) 27 .filter((e) => i.indexOf(e) < 0) 28 .forEach((i) => { 29 void 0 === s[i] 30 ? (s[i] = a[i]) 31 : e(a[i]) && e(s[i]) && Object.keys(a[i]).length > 0 && t(s[i], a[i]); 32 }); 33 } 34 const s = { 35 body: {}, 36 addEventListener() {}, 37 removeEventListener() {}, 38 activeElement: { blur() {}, nodeName: "" }, 39 querySelector: () => null, 40 querySelectorAll: () => [], 41 getElementById: () => null, 42 createEvent: () => ({ initEvent() {} }), 43 createElement: () => ({ 44 children: [], 45 childNodes: [], 46 style: {}, 47 setAttribute() {}, 48 getElementsByTagName: () => [], 49 }), 50 createElementNS: () => ({}), 51 importNode: () => null, 52 location: { 53 hash: "", 54 host: "", 55 hostname: "", 56 href: "", 57 origin: "", 58 pathname: "", 59 protocol: "", 60 search: "", 61 }, 62 }; 63 function a() { 64 const e = "undefined" != typeof document ? document : {}; 65 return t(e, s), e; 66 } 67 const i = { 68 document: s, 69 navigator: { userAgent: "" }, 70 location: { 71 hash: "", 72 host: "", 73 hostname: "", 74 href: "", 75 origin: "", 76 pathname: "", 77 protocol: "", 78 search: "", 79 }, 80 history: { replaceState() {}, pushState() {}, go() {}, back() {} }, 81 CustomEvent: function () { 82 return this; 83 }, 84 addEventListener() {}, 85 removeEventListener() {}, 86 getComputedStyle: () => ({ getPropertyValue: () => "" }), 87 Image() {}, 88 Date() {}, 89 screen: {}, 90 setTimeout() {}, 91 clearTimeout() {}, 92 matchMedia: () => ({}), 93 requestAnimationFrame: (e) => 94 "undefined" == typeof setTimeout ? (e(), null) : setTimeout(e, 0), 95 cancelAnimationFrame(e) { 96 "undefined" != typeof setTimeout && clearTimeout(e); 97 }, 98 }; 99 function r() { 100 const e = "undefined" != typeof window ? window : {}; 101 return t(e, i), e; 102 } 103 function n(e) { 104 return ( 105 void 0 === e && (e = ""), 106 e 107 .trim() 108 .split(" ") 109 .filter((e) => !!e.trim()) 110 ); 111 } 112 function l(e, t) { 113 return void 0 === t && (t = 0), setTimeout(e, t); 114 } 115 function o() { 116 return Date.now(); 117 } 118 function d(e, t) { 119 void 0 === t && (t = "x"); 120 const s = r(); 121 let a, i, n; 122 const l = (function (e) { 123 const t = r(); 124 let s; 125 return ( 126 t.getComputedStyle && (s = t.getComputedStyle(e, null)), 127 !s && e.currentStyle && (s = e.currentStyle), 128 s || (s = e.style), 129 s 130 ); 131 })(e); 132 return ( 133 s.WebKitCSSMatrix 134 ? ((i = l.transform || l.webkitTransform), 135 i.split(",").length > 6 && 136 (i = i 137 .split(", ") 138 .map((e) => e.replace(",", ".")) 139 .join(", ")), 140 (n = new s.WebKitCSSMatrix("none" === i ? "" : i))) 141 : ((n = 142 l.MozTransform || 143 l.OTransform || 144 l.MsTransform || 145 l.msTransform || 146 l.transform || 147 l 148 .getPropertyValue("transform") 149 .replace("translate(", "matrix(1, 0, 0, 1,")), 150 (a = n.toString().split(","))), 151 "x" === t && 152 (i = s.WebKitCSSMatrix 153 ? n.m41 154 : 16 === a.length 155 ? parseFloat(a[12]) 156 : parseFloat(a[4])), 157 "y" === t && 158 (i = s.WebKitCSSMatrix 159 ? n.m42 160 : 16 === a.length 161 ? parseFloat(a[13]) 162 : parseFloat(a[5])), 163 i || 0 164 ); 165 } 166 function c(e) { 167 return ( 168 "object" == typeof e && 169 null !== e && 170 e.constructor && 171 "Object" === Object.prototype.toString.call(e).slice(8, -1) 172 ); 173 } 174 function p() { 175 const e = Object(arguments.length <= 0 ? void 0 : arguments[0]), 176 t = ["__proto__", "constructor", "prototype"]; 177 for (let a = 1; a < arguments.length; a += 1) { 178 const i = a < 0 || arguments.length <= a ? void 0 : arguments[a]; 179 if ( 180 null != i && 181 ((s = i), 182 !("undefined" != typeof window && void 0 !== window.HTMLElement 183 ? s instanceof HTMLElement 184 : s && (1 === s.nodeType || 11 === s.nodeType))) 185 ) { 186 const s = Object.keys(Object(i)).filter((e) => t.indexOf(e) < 0); 187 for (let t = 0, a = s.length; t < a; t += 1) { 188 const a = s[t], 189 r = Object.getOwnPropertyDescriptor(i, a); 190 void 0 !== r && 191 r.enumerable && 192 (c(e[a]) && c(i[a]) 193 ? i[a].__swiper__ 194 ? (e[a] = i[a]) 195 : p(e[a], i[a]) 196 : !c(e[a]) && c(i[a]) 197 ? ((e[a] = {}), i[a].__swiper__ ? (e[a] = i[a]) : p(e[a], i[a])) 198 : (e[a] = i[a])); 199 } 200 } 201 } 202 var s; 203 return e; 204 } 205 function u(e, t, s) { 206 e.style.setProperty(t, s); 207 } 208 function m(e) { 209 let { swiper: t, targetPosition: s, side: a } = e; 210 const i = r(), 211 n = -t.translate; 212 let l, 213 o = null; 214 const d = t.params.speed; 215 (t.wrapperEl.style.scrollSnapType = "none"), 216 i.cancelAnimationFrame(t.cssModeFrameID); 217 const c = s > n ? "next" : "prev", 218 p = (e, t) => ("next" === c && e >= t) || ("prev" === c && e <= t), 219 u = () => { 220 (l = new Date().getTime()), null === o && (o = l); 221 const e = Math.max(Math.min((l - o) / d, 1), 0), 222 r = 0.5 - Math.cos(e * Math.PI) / 2; 223 let c = n + r * (s - n); 224 if ((p(c, s) && (c = s), t.wrapperEl.scrollTo({ [a]: c }), p(c, s))) 225 return ( 226 (t.wrapperEl.style.overflow = "hidden"), 227 (t.wrapperEl.style.scrollSnapType = ""), 228 setTimeout(() => { 229 (t.wrapperEl.style.overflow = ""), 230 t.wrapperEl.scrollTo({ [a]: c }); 231 }), 232 void i.cancelAnimationFrame(t.cssModeFrameID) 233 ); 234 t.cssModeFrameID = i.requestAnimationFrame(u); 235 }; 236 u(); 237 } 238 function h(e) { 239 return ( 240 e.querySelector(".swiper-slide-transform") || 241 (e.shadowRoot && e.shadowRoot.querySelector(".swiper-slide-transform")) || 242 e 243 ); 244 } 245 function f(e, t) { 246 void 0 === t && (t = ""); 247 const s = r(), 248 a = [...e.children]; 249 return ( 250 s.HTMLSlotElement && 251 e instanceof HTMLSlotElement && 252 a.push(...e.assignedElements()), 253 t ? a.filter((e) => e.matches(t)) : a 254 ); 255 } 256 function g(e) { 257 try { 258 return void console.warn(e); 259 } catch (e) {} 260 } 261 function v(e, t) { 262 void 0 === t && (t = []); 263 const s = document.createElement(e); 264 return s.classList.add(...(Array.isArray(t) ? t : n(t))), s; 265 } 266 function w(e) { 267 const t = r(), 268 s = a(), 269 i = e.getBoundingClientRect(), 270 n = s.body, 271 l = e.clientTop || n.clientTop || 0, 272 o = e.clientLeft || n.clientLeft || 0, 273 d = e === t ? t.scrollY : e.scrollTop, 274 c = e === t ? t.scrollX : e.scrollLeft; 275 return { top: i.top + d - l, left: i.left + c - o }; 276 } 277 function b(e, t) { 278 return r().getComputedStyle(e, null).getPropertyValue(t); 279 } 280 function y(e) { 281 let t, 282 s = e; 283 if (s) { 284 for (t = 0; null !== (s = s.previousSibling); ) 285 1 === s.nodeType && (t += 1); 286 return t; 287 } 288 } 289 function E(e, t) { 290 const s = []; 291 let a = e.parentElement; 292 for (; a; ) 293 t ? a.matches(t) && s.push(a) : s.push(a), (a = a.parentElement); 294 return s; 295 } 296 function x(e, t) { 297 t && 298 e.addEventListener("transitionend", function s(a) { 299 a.target === e && 300 (t.call(e, a), e.removeEventListener("transitionend", s)); 301 }); 302 } 303 function S(e, t, s) { 304 const a = r(); 305 return s 306 ? e["width" === t ? "offsetWidth" : "offsetHeight"] + 307 parseFloat( 308 a 309 .getComputedStyle(e, null) 310 .getPropertyValue("width" === t ? "margin-right" : "margin-top") 311 ) + 312 parseFloat( 313 a 314 .getComputedStyle(e, null) 315 .getPropertyValue("width" === t ? "margin-left" : "margin-bottom") 316 ) 317 : e.offsetWidth; 318 } 319 function T(e) { 320 return (Array.isArray(e) ? e : [e]).filter((e) => !!e); 321 } 322 function M(e) { 323 return (t) => 324 Math.abs(t) > 0 && 325 e.browser && 326 e.browser.need3dFix && 327 Math.abs(t) % 90 == 0 328 ? t + 0.001 329 : t; 330 } 331 function C(e, t) { 332 void 0 === t && (t = ""), 333 "undefined" != typeof trustedTypes 334 ? (e.innerHTML = trustedTypes 335 .createPolicy("html", { createHTML: (e) => e }) 336 .createHTML(t)) 337 : (e.innerHTML = t); 338 } 339 let P, L, I; 340 function z() { 341 return ( 342 P || 343 (P = (function () { 344 const e = r(), 345 t = a(); 346 return { 347 smoothScroll: 348 t.documentElement && 349 t.documentElement.style && 350 "scrollBehavior" in t.documentElement.style, 351 touch: !!( 352 "ontouchstart" in e || 353 (e.DocumentTouch && t instanceof e.DocumentTouch) 354 ), 355 }; 356 })()), 357 P 358 ); 359 } 360 function A(e) { 361 return ( 362 void 0 === e && (e = {}), 363 L || 364 (L = (function (e) { 365 let { userAgent: t } = void 0 === e ? {} : e; 366 const s = z(), 367 a = r(), 368 i = a.navigator.platform, 369 n = t || a.navigator.userAgent, 370 l = { ios: !1, android: !1 }, 371 o = a.screen.width, 372 d = a.screen.height, 373 c = n.match(/(Android);?[\s\/]+([\d.]+)?/); 374 let p = n.match(/(iPad).*OS\s([\d_]+)/); 375 const u = n.match(/(iPod)(.*OS\s([\d_]+))?/), 376 m = !p && n.match(/(iPhone\sOS|iOS)\s([\d_]+)/), 377 h = "Win32" === i; 378 let f = "MacIntel" === i; 379 return ( 380 !p && 381 f && 382 s.touch && 383 [ 384 "1024x1366", 385 "1366x1024", 386 "834x1194", 387 "1194x834", 388 "834x1112", 389 "1112x834", 390 "768x1024", 391 "1024x768", 392 "820x1180", 393 "1180x820", 394 "810x1080", 395 "1080x810", 396 ].indexOf(`${o}x${d}`) >= 0 && 397 ((p = n.match(/(Version)\/([\d.]+)/)), 398 p || (p = [0, 1, "13_0_0"]), 399 (f = !1)), 400 c && !h && ((l.os = "android"), (l.android = !0)), 401 (p || m || u) && ((l.os = "ios"), (l.ios = !0)), 402 l 403 ); 404 })(e)), 405 L 406 ); 407 } 408 function $() { 409 return ( 410 I || 411 (I = (function () { 412 const e = r(),
413 t = A(); 414 let s = !1; 415 function a() { 416 const t = e.navigator.userAgent.toLowerCase(); 417 return ( 418 t.indexOf("safari") >= 0 && 419 t.indexOf("chrome") < 0 && 420 t.indexOf("android") < 0 421 ); 422 } 423 if (a()) { 424 const t = String(e.navigator.userAgent); 425 if (t.includes("Version/")) { 426 const [e, a] = t 427 .split("Version/")[1] 428 .split(" ")[0] 429 .split(".") 430 .map((e) => Number(e)); 431 s = e < 16 || (16 === e && a < 2); 432 } 433 } 434 const i = /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test( 435 e.navigator.userAgent 436 ), 437 n = a(); 438 return { 439 isSafari: s || n, 440 needPerspectiveFix: s, 441 need3dFix: n || (i && t.ios), 442 isWebView: i, 443 }; 444 })()), 445 I 446 ); 447 } 448 var k = { 449 on(e, t, s) { 450 const a = this; 451 if (!a.eventsListeners || a.destroyed) return a; 452 if ("function" != typeof t) return a; 453 const i = s ? "unshift" : "push"; 454 return ( 455 e.split(" ").forEach((e) => { 456 a.eventsListeners[e] || (a.eventsListeners[e] = []), 457 a.eventsListeners[e][i](t); 458 }), 459 a 460 ); 461 }, 462 once(e, t, s) { 463 const a = this; 464 if (!a.eventsListeners || a.destroyed) return a; 465 if ("function" != typeof t) return a; 466 function i() { 467 a.off(e, i), i.__emitterProxy && delete i.__emitterProxy; 468 for (var s = arguments.length, r = new Array(s), n = 0; n < s; n++) 469 r[n] = arguments[n]; 470 t.apply(a, r); 471 } 472 return (i.__emitterProxy = t), a.on(e, i, s); 473 }, 474 onAny(e, t) { 475 const s = this; 476 if (!s.eventsListeners || s.destroyed) return s; 477 if ("function" != typeof e) return s; 478 const a = t ? "unshift" : "push"; 479 return ( 480 s.eventsAnyListeners.indexOf(e) < 0 && s.eventsAnyListeners[a](e), s 481 ); 482 }, 483 offAny(e) { 484 const t = this; 485 if (!t.eventsListeners || t.destroyed) return t; 486 if (!t.eventsAnyListeners) return t; 487 const s = t.eventsAnyListeners.indexOf(e); 488 return s >= 0 && t.eventsAnyListeners.splice(s, 1), t; 489 }, 490 off(e, t) { 491 const s = this; 492 return !s.eventsListeners || s.destroyed 493 ? s 494 : s.eventsListeners 495 ? (e.split(" ").forEach((e) => { 496 void 0 === t 497 ? (s.eventsListeners[e] = []) 498 : s.eventsListeners[e] && 499 s.eventsListeners[e].forEach((a, i) => { 500 (a === t || (a.__emitterProxy && a.__emitterProxy === t)) && 501 s.eventsListeners[e].splice(i, 1); 502 }); 503 }), 504 s) 505 : s; 506 }, 507 emit() { 508 const e = this; 509 if (!e.eventsListeners || e.destroyed) return e; 510 if (!e.eventsListeners) return e; 511 let t, s, a; 512 for (var i = arguments.length, r = new Array(i), n = 0; n < i; n++) 513 r[n] = arguments[n]; 514 "string" == typeof r[0] || Array.isArray(r[0]) 515 ? ((t = r[0]), (s = r.slice(1, r.length)), (a = e)) 516 : ((t = r[0].events), (s = r[0].data), (a = r[0].context || e)), 517 s.unshift(a); 518 return ( 519 (Array.isArray(t) ? t : t.split(" ")).forEach((t) => { 520 e.eventsAnyListeners && 521 e.eventsAnyListeners.length && 522 e.eventsAnyListeners.forEach((e) => { 523 e.apply(a, [t, ...s]); 524 }), 525 e.eventsListeners && 526 e.eventsListeners[t] && 527 e.eventsListeners[t].forEach((e) => { 528 e.apply(a, s); 529 }); 530 }), 531 e 532 ); 533 }, 534 }; 535 const O = (e, t, s) => { 536 t && !e.classList.contains(s) 537 ? e.classList.add(s) 538 : !t && e.classList.contains(s) && e.classList.remove(s); 539 }; 540 const D = (e, t, s) => { 541 t && !e.classList.contains(s) 542 ? e.classList.add(s) 543 : !t && e.classList.contains(s) && e.classList.remove(s); 544 }; 545 const G = (e, t) => { 546 if (!e || e.destroyed || !e.params) return; 547 const s = t.closest( 548 e.isElement ? "swiper-slide" : `.${e.params.slideClass}` 549 ); 550 if (s) { 551 let t = s.querySelector(`.${e.params.lazyPreloaderClass}`); 552 !t && 553 e.isElement && 554 (s.shadowRoot 555 ? (t = s.shadowRoot.querySelector( 556 `.${e.params.lazyPreloaderClass}` 557 )) 558 : requestAnimationFrame(() => { 559 s.shadowRoot && 560 ((t = s.shadowRoot.querySelector( 561 `.${e.params.lazyPreloaderClass}` 562 )), 563 t && t.remove()); 564 })), 565 t && t.remove(); 566 } 567 }, 568 X = (e, t) => { 569 if (!e.slides[t]) return; 570 const s = e.slides[t].querySelector('[loading="lazy"]'); 571 s && s.removeAttribute("loading"); 572 }, 573 Y = (e) => { 574 if (!e || e.destroyed || !e.params) return; 575 let t = e.params.lazyPreloadPrevNext; 576 const s = e.slides.length; 577 if (!s || !t || t < 0) return; 578 t = Math.min(t, s); 579 const a = 580 "auto" === e.params.slidesPerView 581 ? e.slidesPerViewDynamic()
582 : Math.ceil(e.params.slidesPerView), 583 i = e.activeIndex; 584 if (e.params.grid && e.params.grid.rows > 1) { 585 const s = i, 586 r = [s - t]; 587 return ( 588 r.push(...Array.from({ length: t }).map((e, t) => s + a + t)), 589 void e.slides.forEach((t, s) => { 590 r.includes(t.column) && X(e, s); 591 }) 592 ); 593 } 594 const r = i + a - 1; 595 if (e.params.rewind || e.params.loop) 596 for (let a = i - t; a <= r + t; a += 1) { 597 const t = ((a % s) + s) % s; 598 (t < i || t > r) && X(e, t); 599 } 600 else 601 for (let a = Math.max(i - t, 0); a <= Math.min(r + t, s - 1); a += 1) 602 a !== i && (a > r || a < i) && X(e, a); 603 }; 604 var B = { 605 updateSize: function () { 606 const e = this; 607 let t, s; 608 const a = e.el; 609 (t = 610 void 0 !== e.params.width && null !== e.params.width 611 ? e.params.width 612 : a.clientWidth), 613 (s = 614 void 0 !== e.params.height && null !== e.params.height 615 ? e.params.height 616 : a.clientHeight), 617 (0 === t && e.isHorizontal()) || 618 (0 === s && e.isVertical()) || 619 ((t = 620 t - 621 parseInt(b(a, "padding-left") || 0, 10) - 622 parseInt(b(a, "padding-right") || 0, 10)), 623 (s = 624 s - 625 parseInt(b(a, "padding-top") || 0, 10) - 626 parseInt(b(a, "padding-bottom") || 0, 10)), 627 Number.isNaN(t) && (t = 0), 628 Number.isNaN(s) && (s = 0), 629 Object.assign(e, { 630 width: t, 631 height: s, 632 size: e.isHorizontal() ? t : s, 633 })); 634 }, 635 updateSlides: function () { 636 const e = this; 637 function t(t, s) { 638 return parseFloat(t.getPropertyValue(e.getDirectionLabel(s)) || 0); 639 } 640 const s = e.params, 641 { 642 wrapperEl: a, 643 slidesEl: i, 644 size: r, 645 rtlTranslate: n, 646 wrongRTL: l, 647 } = e, 648 o = e.virtual && s.virtual.enabled, 649 d = o ? e.virtual.slides.length : e.slides.length, 650 c = f(i, `.${e.params.slideClass}, swiper-slide`), 651 p = o ? e.virtual.slides.length : c.length; 652 let m = []; 653 const h = [], 654 g = []; 655 let v = s.slidesOffsetBefore; 656 "function" == typeof v && (v = s.slidesOffsetBefore.call(e)); 657 let w = s.slidesOffsetAfter; 658 "function" == typeof w && (w = s.slidesOffsetAfter.call(e)); 659 const y = e.snapGrid.length, 660 E = e.slidesGrid.length; 661 let x = s.spaceBetween, 662 T = -v, 663 M = 0, 664 C = 0; 665 if (void 0 === r) return; 666 "string" == typeof x && x.indexOf("%") >= 0 667 ? (x = (parseFloat(x.replace("%", "")) / 100) * r) 668 : "string" == typeof x && (x = parseFloat(x)), 669 (e.virtualSize = -x), 670 c.forEach((e) => { 671 n ? (e.style.marginLeft = "") : (e.style.marginRight = ""), 672 (e.style.marginBottom = ""), 673 (e.style.marginTop = ""); 674 }), 675 s.centeredSlides && 676 s.cssMode && 677 (u(a, "--swiper-centered-offset-before", ""), 678 u(a, "--swiper-centered-offset-after", "")); 679 const P = s.grid && s.grid.rows > 1 && e.grid; 680 let L; 681 P ? e.grid.initSlides(c) : e.grid && e.grid.unsetSlides(); 682 const I = 683 "auto" === s.slidesPerView && 684 s.breakpoints && 685 Object.keys(s.breakpoints).filter( 686 (e) => void 0 !== s.breakpoints[e].slidesPerView 687 ).length > 0; 688 for (let a = 0; a < p; a += 1) { 689 let i; 690 if ( 691 ((L = 0), 692 c[a] && (i = c[a]), 693 P && e.grid.updateSlide(a, i, c), 694 !c[a] || "none" !== b(i, "display")) 695 ) { 696 if ("auto" === s.slidesPerView) { 697 I && (c[a].style[e.getDirectionLabel("width")] = ""); 698 const r = getComputedStyle(i), 699 n = i.style.transform, 700 l = i.style.webkitTransform; 701 if ( 702 (n && (i.style.transform = "none"), 703 l && (i.style.webkitTransform = "none"), 704 s.roundLengths) 705 ) 706 L = e.isHorizontal() ? S(i, "width", !0) : S(i, "height", !0); 707 else { 708 const e = t(r, "width"), 709 s = t(r, "padding-left"), 710 a = t(r, "padding-right"), 711 n = t(r, "margin-left"), 712 l = t(r, "margin-right"), 713 o = r.getPropertyValue("box-sizing"); 714 if (o && "border-box" === o) L = e + n + l; 715 else { 716 const { clientWidth: t, offsetWidth: r } = i; 717 L = e + s + a + n + l + (r - t); 718 } 719 } 720 n && (i.style.transform = n), 721 l && (i.style.webkitTransform = l), 722 s.roundLengths && (L = Math.floor(L)); 723 } else 724 (L = (r - (s.slidesPerView - 1) * x) / s.slidesPerView), 725 s.roundLengths && (L = Math.floor(L)), 726 c[a] && (c[a].style[e.getDirectionLabel("width")] = `${L}px`); 727 c[a] && (c[a].swiperSlideSize = L), 728 g.push(L), 729 s.centeredSlides 730 ? ((T = T + L / 2 + M / 2 + x), 731 0 === M && 0 !== a && (T = T - r / 2 - x), 732 0 === a && (T = T - r / 2 - x), 733 Math.abs(T) < 0.001 && (T = 0), 734 s.roundLengths && (T = Math.floor(T)), 735 C % s.slidesPerGroup == 0 && m.push(T), 736 h.push(T)) 737 : (s.roundLengths && (T = Math.floor(T)), 738 (C - Math.min(e.params.slidesPerGroupSkip, C)) % 739 e.params.slidesPerGroup == 740 0 && m.push(T), 741 h.push(T), 742 (T = T + L + x)), 743 (e.virtualSize += L + x), 744 (M = L), 745 (C += 1); 746 } 747 } 748 if ( 749 ((e.virtualSize = Math.max(e.virtualSize, r) + w), 750 n && 751 l && 752 ("slide" === s.effect || "coverflow" === s.effect) && 753 (a.style.width = `${e.virtualSize + x}px`), 754 s.setWrapperSize && 755 (a.style[e.getDirectionLabel("width")] = `${e.virtualSize + x}px`), 756 P && e.grid.updateWrapperSize(L, m), 757 !s.centeredSlides) 758 ) { 759 const t = []; 760 for (let a = 0; a < m.length; a += 1) { 761 let i = m[a]; 762 s.roundLengths && (i = Math.floor(i)), 763 m[a] <= e.virtualSize - r && t.push(i); 764 } 765 (m = t), 766 Math.floor(e.virtualSize - r) - Math.floor(m[m.length - 1]) > 1 && 767 m.push(e.virtualSize - r); 768 } 769 if (o && s.loop) { 770 const t = g[0] + x; 771 if (s.slidesPerGroup > 1) { 772 const a = Math.ceil( 773 (e.virtual.slidesBefore + e.virtual.slidesAfter) / 774 s.slidesPerGroup 775 ), 776 i = t * s.slidesPerGroup; 777 for (let e = 0; e < a; e += 1) m.push(m[m.length - 1] + i); 778 } 779 for ( 780 let a = 0; 781 a < e.virtual.slidesBefore + e.virtual.slidesAfter; 782 a += 1 783 ) 784 1 === s.slidesPerGroup && m.push(m[m.length - 1] + t), 785 h.push(h[h.length - 1] + t), 786 (e.virtualSize += t); 787 } 788 if ((0 === m.length && (m = [0]), 0 !== x)) { 789 const t = 790 e.isHorizontal() && n 791 ? "marginLeft" 792 : e.getDirectionLabel("marginRight"); 793 c.filter( 794 (e, t) => !(s.cssMode && !s.loop) || t !== c.length - 1 795 ).forEach((e) => { 796 e.style[t] = `${x}px`; 797 }); 798 }
799 if (s.centeredSlides && s.centeredSlidesBounds) { 800 let e = 0; 801 g.forEach((t) => { 802 e += t + (x || 0); 803 }), 804 (e -= x); 805 const t = e > r ? e - r : 0; 806 m = m.map((e) => (e <= 0 ? -v : e > t ? t + w : e)); 807 } 808 if (s.centerInsufficientSlides) { 809 let e = 0; 810 g.forEach((t) => { 811 e += t + (x || 0); 812 }), 813 (e -= x); 814 const t = (s.slidesOffsetBefore || 0) + (s.slidesOffsetAfter || 0); 815 if (e + t < r) { 816 const s = (r - e - t) / 2; 817 m.forEach((e, t) => { 818 m[t] = e - s; 819 }), 820 h.forEach((e, t) => { 821 h[t] = e + s; 822 }); 823 } 824 } 825 if ( 826 (Object.assign(e, { 827 slides: c, 828 snapGrid: m, 829 slidesGrid: h, 830 slidesSizesGrid: g, 831 }), 832 s.centeredSlides && s.cssMode && !s.centeredSlidesBounds) 833 ) { 834 u(a, "--swiper-centered-offset-before", -m[0] + "px"), 835 u( 836 a, 837 "--swiper-centered-offset-after", 838 e.size / 2 - g[g.length - 1] / 2 + "px" 839 ); 840 const t = -e.snapGrid[0], 841 s = -e.slidesGrid[0]; 842 (e.snapGrid = e.snapGrid.map((e) => e + t)), 843 (e.slidesGrid = e.slidesGrid.map((e) => e + s)); 844 } 845 if ( 846 (p !== d && e.emit("slidesLengthChange"), 847 m.length !== y && 848 (e.params.watchOverflow && e.checkOverflow(), 849 e.emit("snapGridLengthChange")), 850 h.length !== E && e.emit("slidesGridLengthChange"), 851 s.watchSlidesProgress && e.updateSlidesOffset(), 852 e.emit("slidesUpdated"), 853 !(o || s.cssMode || ("slide" !== s.effect && "fade" !== s.effect))) 854 ) { 855 const t = `${s.containerModifierClass}backface-hidden`, 856 a = e.el.classList.contains(t); 857 p <= s.maxBackfaceHiddenSlides 858 ? a || e.el.classList.add(t) 859 : a && e.el.classList.remove(t); 860 } 861 }, 862 updateAutoHeight: function (e) { 863 const t = this, 864 s = [], 865 a = t.virtual && t.params.virtual.enabled; 866 let i, 867 r = 0; 868 "number" == typeof e 869 ? t.setTransition(e) 870 : !0 === e && t.setTransition(t.params.speed); 871 const n = (e) => (a ? t.slides[t.getSlideIndexByData(e)] : t.slides[e]); 872 if ("auto" !== t.params.slidesPerView && t.params.slidesPerView > 1) 873 if (t.params.centeredSlides) 874 (t.visibleSlides || []).forEach((e) => { 875 s.push(e); 876 }); 877 else 878 for (i = 0; i < Math.ceil(t.params.slidesPerView); i += 1) { 879 const e = t.activeIndex + i; 880 if (e > t.slides.length && !a) break; 881 s.push(n(e)); 882 } 883 else s.push(n(t.activeIndex)); 884 for (i = 0; i < s.length; i += 1) 885 if (void 0 !== s[i]) { 886 const e = s[i].offsetHeight; 887 r = e > r ? e : r; 888 } 889 (r || 0 === r) && (t.wrapperEl.style.height = `${r}px`); 890 }, 891 updateSlidesOffset: function () { 892 const e = this, 893 t = e.slides, 894 s = e.isElement 895 ? e.isHorizontal() 896 ? e.wrapperEl.offsetLeft 897 : e.wrapperEl.offsetTop 898 : 0; 899 for (let a = 0; a < t.length; a += 1) 900 t[a].swiperSlideOffset = 901 (e.isHorizontal() ? t[a].offsetLeft : t[a].offsetTop) - 902 s - 903 e.cssOverflowAdjustment(); 904 }, 905 updateSlidesProgress: function (e) { 906 void 0 === e && (e = (this && this.translate) || 0); 907 const t = this, 908 s = t.params, 909 { slides: a, rtlTranslate: i, snapGrid: r } = t; 910 if (0 === a.length) return; 911 void 0 === a[0].swiperSlideOffset && t.updateSlidesOffset(); 912 let n = -e; 913 i && (n = e), (t.visibleSlidesIndexes = []), (t.visibleSlides = []); 914 let l = s.spaceBetween; 915 "string" == typeof l && l.indexOf("%") >= 0 916 ? (l = (parseFloat(l.replace("%", "")) / 100) * t.size) 917 : "string" == typeof l && (l = parseFloat(l)); 918 for (let e = 0; e < a.length; e += 1) { 919 const o = a[e]; 920 let d = o.swiperSlideOffset; 921 s.cssMode && s.centeredSlides && (d -= a[0].swiperSlideOffset); 922 const c = 923 (n + (s.centeredSlides ? t.minTranslate() : 0) - d) / 924 (o.swiperSlideSize + l), 925 p = 926 (n - r[0] + (s.centeredSlides ? t.minTranslate() : 0) - d) / 927 (o.swiperSlideSize + l), 928 u = -(n - d), 929 m = u + t.slidesSizesGrid[e], 930 h = u >= 0 && u <= t.size - t.slidesSizesGrid[e], 931 f = 932 (u >= 0 && u < t.size - 1) || 933 (m > 1 && m <= t.size) || 934 (u <= 0 && m >= t.size); 935 f && (t.visibleSlides.push(o), t.visibleSlidesIndexes.push(e)), 936 O(o, f, s.slideVisibleClass), 937 O(o, h, s.slideFullyVisibleClass), 938 (o.progress = i ? -c : c), 939 (o.originalProgress = i ? -p : p); 940 } 941 }, 942 updateProgress: function (e) { 943 const t = this; 944 if (void 0 === e) { 945 const s = t.rtlTranslate ? -1 : 1; 946 e = (t && t.translate && t.translate * s) || 0; 947 } 948 const s = t.params, 949 a = t.maxTranslate() - t.minTranslate(); 950 let { progress: i, isBeginning: r, isEnd: n, progressLoop: l } = t; 951 const o = r, 952 d = n; 953 if (0 === a) (i = 0), (r = !0), (n = !0); 954 else { 955 i = (e - t.minTranslate()) / a; 956 const s = Math.abs(e - t.minTranslate()) < 1, 957 l = Math.abs(e - t.maxTranslate()) < 1; 958 (r = s || i <= 0), (n = l || i >= 1), s && (i = 0), l && (i = 1); 959 } 960 if (s.loop) { 961 const s = t.getSlideIndexByData(0), 962 a = t.getSlideIndexByData(t.slides.length - 1), 963 i = t.slidesGrid[s], 964 r = t.slidesGrid[a], 965 n = t.slidesGrid[t.slidesGrid.length - 1], 966 o = Math.abs(e); 967 (l = o >= i ? (o - i) / n : (o + n - r) / n), l > 1 && (l -= 1); 968 } 969 Object.assign(t, { 970 progress: i, 971 progressLoop: l, 972 isBeginning: r, 973 isEnd: n, 974 }), 975 (s.watchSlidesProgress || (s.centeredSlides && s.autoHeight)) && 976 t.updateSlidesProgress(e), 977 r && !o && t.emit("reachBeginning toEdge"), 978 n && !d && t.emit("reachEnd toEdge"), 979 ((o && !r) || (d && !n)) && t.emit("fromEdge"), 980 t.emit("progress", i); 981 }, 982 updateSlidesClasses: function () { 983 const e = this, 984 { slides: t, params: s, slidesEl: a, activeIndex: i } = e, 985 r = e.virtual && s.virtual.enabled, 986 n = e.grid && s.grid && s.grid.rows > 1, 987 l = (e) => f(a, `.${s.slideClass}${e}, swiper-slide${e}`)[0]; 988 let o, d, c; 989 if (r) 990 if (s.loop) { 991 let t = i - e.virtual.slidesBefore; 992 t < 0 && (t = e.virtual.slides.length + t), 993 t >= e.virtual.slides.length && (t -= e.virtual.slides.length), 994 (o = l(`[data-swiper-slide-index="${t}"]`)); 995 } else o = l(`[data-swiper-slide-index="${i}"]`); 996 else 997 n 998 ? ((o = t.find((e) => e.column === i)), 999 (c = t.find((e) => e.column === i + 1)), 1000 (d = t.find((e) => e.column === i - 1))) 1001 : (o = t[i]); 1002 o && 1003 (n || 1004 ((c = (function (e, t) { 1005 const s = []; 1006 for (; e.nextElementSibling; ) { 1007 const a = e.nextElementSibling; 1008 t ? a.matches(t) && s.push(a) : s.push(a), (e = a); 1009 } 1010 return s; 1011 })(o, `.${s.slideClass}, swiper-slide`)[0]), 1012 s.loop && !c && (c = t[0]), 1013 (d = (function (e, t) { 1014 const s = []; 1015 for (; e.previousElementSibling; ) { 1016 const a = e.previousElementSibling; 1017 t ? a.matches(t) && s.push(a) : s.push(a), (e = a); 1018 } 1019 return s; 1020 })(o, `.${s.slideClass}, swiper-slide`)[0]), 1021 s.loop && 0 === !d && (d = t[t.length - 1]))), 1022 t.forEach((e) => { 1023 D(e, e === o, s.slideActiveClass), 1024 D(e, e === c, s.slideNextClass), 1025 D(e, e === d, s.slidePrevClass); 1026 }), 1027 e.emitSlidesClasses(); 1028 }, 1029 updateActiveIndex: function (e) { 1030 const t = this, 1031 s = t.rtlTranslate ? t.translate : -t.translate, 1032 { 1033 snapGrid: a, 1034 params: i, 1035 activeIndex: r, 1036 realIndex: n, 1037 snapIndex: l, 1038 } = t; 1039 let o, 1040 d = e; 1041 const c = (e) => { 1042 let s = e - t.virtual.slidesBefore; 1043 return ( 1044 s < 0 && (s = t.virtual.slides.length + s), 1045 s >= t.virtual.slides.length && (s -= t.virtual.slides.length), 1046 s 1047 ); 1048 }; 1049 if ( 1050 (void 0 === d && 1051 (d = (function (e) { 1052 const { slidesGrid: t, params: s } = e, 1053 a = e.rtlTranslate ? e.translate : -e.translate; 1054 let i; 1055 for (let e = 0; e < t.length; e += 1) 1056 void 0 !== t[e + 1] 1057 ? a >= t[e] && a < t[e + 1] - (t[e + 1] - t[e]) / 2 1058 ? (i = e) 1059 : a >= t[e] && a < t[e + 1] && (i = e + 1) 1060 : a >= t[e] && (i = e); 1061 return ( 1062 s.normalizeSlideIndex && (i < 0 || void 0 === i) && (i = 0), i 1063 ); 1064 })(t)), 1065 a.indexOf(s) >= 0) 1066 ) 1067 o = a.indexOf(s); 1068 else { 1069 const e = Math.min(i.slidesPerGroupSkip, d); 1070 o = e + Math.floor((d - e) / i.slidesPerGroup); 1071 } 1072 if ((o >= a.length && (o = a.length - 1), d === r && !t.params.loop)) 1073 return void (o !== l && ((t.snapIndex = o), t.emit("snapIndexChange"))); 1074 if (d === r && t.params.loop && t.virtual && t.params.virtual.enabled) 1075 return void (t.realIndex = c(d)); 1076 const p = t.grid && i.grid && i.grid.rows > 1; 1077 let u; 1078 if (t.virtual && i.virtual.enabled && i.loop) u = c(d); 1079 else if (p) { 1080 const e = t.slides.find((e) => e.column === d); 1081 let s = parseInt(e.getAttribute("data-swiper-slide-index"), 10); 1082 Number.isNaN(s) && (s = Math.max(t.slides.indexOf(e), 0)), 1083 (u = Math.floor(s / i.grid.rows)); 1084 } else if (t.slides[d]) { 1085 const e = t.slides[d].getAttribute("data-swiper-slide-index"); 1086 u = e ? parseInt(e, 10) : d; 1087 } else u = d; 1088 Object.assign(t, { 1089 previousSnapIndex: l, 1090 snapIndex: o, 1091 previousRealIndex: n, 1092 realIndex: u, 1093 previousIndex: r, 1094 activeIndex: d, 1095 }), 1096 t.initialized && Y(t), 1097 t.emit("activeIndexChange"), 1098 t.emit("snapIndexChange"), 1099 (t.initialized || t.params.runCallbacksOnInit) && 1100 (n !== u && t.emit("realIndexChange"), t.emit("slideChange")); 1101 }, 1102 updateClickedSlide: function (e, t) { 1103 const s = this, 1104 a = s.params; 1105 let i = e.closest(`.${a.slideClass}, swiper-slide`); 1106 !i && 1107 s.isElement && 1108 t && 1109 t.length > 1 && 1110 t.includes(e) &&
1111 [...t.slice(t.indexOf(e) + 1, t.length)].forEach((e) => { 1112 !i && 1113 e.matches && 1114 e.matches(`.${a.slideClass}, swiper-slide`) && 1115 (i = e); 1116 }); 1117 let r, 1118 n = !1; 1119 if (i) 1120 for (let e = 0; e < s.slides.length; e += 1) 1121 if (s.slides[e] === i) { 1122 (n = !0), (r = e); 1123 break; 1124 } 1125 if (!i || !n) 1126 return (s.clickedSlide = void 0), void (s.clickedIndex = void 0); 1127 (s.clickedSlide = i), 1128 s.virtual && s.params.virtual.enabled 1129 ? (s.clickedIndex = parseInt( 1130 i.getAttribute("data-swiper-slide-index"), 1131 10 1132 )) 1133 : (s.clickedIndex = r), 1134 a.slideToClickedSlide && 1135 void 0 !== s.clickedIndex && 1136 s.clickedIndex !== s.activeIndex && 1137 s.slideToClickedSlide(); 1138 }, 1139 }; 1140 var H = { 1141 getTranslate: function (e) { 1142 void 0 === e && (e = this.isHorizontal() ? "x" : "y"); 1143 const { params: t, rtlTranslate: s, translate: a, wrapperEl: i } = this; 1144 if (t.virtualTranslate) return s ? -a : a; 1145 if (t.cssMode) return a; 1146 let r = d(i, e); 1147 return (r += this.cssOverflowAdjustment()), s && (r = -r), r || 0; 1148 }, 1149 setTranslate: function (e, t) { 1150 const s = this, 1151 { rtlTranslate: a, params: i, wrapperEl: r, progress: n } = s; 1152 let l, 1153 o = 0, 1154 d = 0; 1155 s.isHorizontal() ? (o = a ? -e : e) : (d = e), 1156 i.roundLengths && ((o = Math.floor(o)), (d = Math.floor(d))), 1157 (s.previousTranslate = s.translate), 1158 (s.translate = s.isHorizontal() ? o : d), 1159 i.cssMode 1160 ? (r[s.isHorizontal() ? "scrollLeft" : "scrollTop"] = s.isHorizontal() 1161 ? -o 1162 : -d) 1163 : i.virtualTranslate || 1164 (s.isHorizontal() 1165 ? (o -= s.cssOverflowAdjustment()) 1166 : (d -= s.cssOverflowAdjustment()), 1167 (r.style.transform = `translate3d(${o}px, ${d}px, 0px)`)); 1168 const c = s.maxTranslate() - s.minTranslate(); 1169 (l = 0 === c ? 0 : (e - s.minTranslate()) / c), 1170 l !== n && s.updateProgress(e), 1171 s.emit("setTranslate", s.translate, t); 1172 }, 1173 minTranslate: function () { 1174 return -this.snapGrid[0]; 1175 }, 1176 maxTranslate: function () { 1177 return -this.snapGrid[this.snapGrid.length - 1]; 1178 }, 1179 translateTo: function (e, t, s, a, i) { 1180 void 0 === e && (e = 0), 1181 void 0 === t && (t = this.params.speed), 1182 void 0 === s && (s = !0), 1183 void 0 === a && (a = !0); 1184 const r = this, 1185 { params: n, wrapperEl: l } = r; 1186 if (r.animating && n.preventInteractionOnTransition) return !1; 1187 const o = r.minTranslate(), 1188 d = r.maxTranslate(); 1189 let c; 1190 if ( 1191 ((c = a && e > o ? o : a && e < d ? d : e), 1192 r.updateProgress(c), 1193 n.cssMode) 1194 ) { 1195 const e = r.isHorizontal(); 1196 if (0 === t) l[e ? "scrollLeft" : "scrollTop"] = -c; 1197 else { 1198 if (!r.support.smoothScroll) 1199 return ( 1200 m({ swiper: r, targetPosition: -c, side: e ? "left" : "top" }), !0 1201 ); 1202 l.scrollTo({ [e ? "left" : "top"]: -c, behavior: "smooth" }); 1203 } 1204 return !0; 1205 } 1206 return ( 1207 0 === t 1208 ? (r.setTransition(0), 1209 r.setTranslate(c), 1210 s && 1211 (r.emit("beforeTransitionStart", t, i), r.emit("transitionEnd"))) 1212 : (r.setTransition(t), 1213 r.setTranslate(c), 1214 s && 1215 (r.emit("beforeTransitionStart", t, i), 1216 r.emit("transitionStart")), 1217 r.animating || 1218 ((r.animating = !0), 1219 r.onTranslateToWrapperTransitionEnd || 1220 (r.onTranslateToWrapperTransitionEnd = function (e) { 1221 r && 1222 !r.destroyed && 1223 e.target === this && 1224 (r.wrapperEl.removeEventListener( 1225 "transitionend", 1226 r.onTranslateToWrapperTransitionEnd 1227 ), 1228 (r.onTranslateToWrapperTransitionEnd = null),
1229 delete r.onTranslateToWrapperTransitionEnd, 1230 (r.animating = !1), 1231 s && r.emit("transitionEnd")); 1232 }), 1233 r.wrapperEl.addEventListener( 1234 "transitionend", 1235 r.onTranslateToWrapperTransitionEnd 1236 ))), 1237 !0 1238 ); 1239 }, 1240 }; 1241 function N(e) { 1242 let { swiper: t, runCallbacks: s, direction: a, step: i } = e; 1243 const { activeIndex: r, previousIndex: n } = t; 1244 let l = a; 1245 l || (l = r > n ? "next" : r < n ? "prev" : "reset"), 1246 t.emit(`transition${i}`), 1247 s && "reset" === l 1248 ? t.emit(`slideResetTransition${i}`) 1249 : s && 1250 r !== n && 1251 (t.emit(`slideChangeTransition${i}`), 1252 "next" === l 1253 ? t.emit(`slideNextTransition${i}`) 1254 : t.emit(`slidePrevTransition${i}`)); 1255 } 1256 var R = { 1257 slideTo: function (e, t, s, a, i) { 1258 void 0 === e && (e = 0), 1259 void 0 === s && (s = !0), 1260 "string" == typeof e && (e = parseInt(e, 10)); 1261 const r = this; 1262 let n = e; 1263 n < 0 && (n = 0); 1264 const { 1265 params: l, 1266 snapGrid: o, 1267 slidesGrid: d, 1268 previousIndex: c, 1269 activeIndex: p, 1270 rtlTranslate: u, 1271 wrapperEl: h, 1272 enabled: f, 1273 } = r; 1274 if ( 1275 (!f && !a && !i) || 1276 r.destroyed || 1277 (r.animating && l.preventInteractionOnTransition) 1278 ) 1279 return !1; 1280 void 0 === t && (t = r.params.speed); 1281 const g = Math.min(r.params.slidesPerGroupSkip, n); 1282 let v = g + Math.floor((n - g) / r.params.slidesPerGroup); 1283 v >= o.length && (v = o.length - 1); 1284 const w = -o[v]; 1285 if (l.normalizeSlideIndex) 1286 for (let e = 0; e < d.length; e += 1) { 1287 const t = -Math.floor(100 * w), 1288 s = Math.floor(100 * d[e]), 1289 a = Math.floor(100 * d[e + 1]); 1290 void 0 !== d[e + 1] 1291 ? t >= s && t < a - (a - s) / 2 1292 ? (n = e) 1293 : t >= s && t < a && (n = e + 1) 1294 : t >= s && (n = e); 1295 } 1296 if (r.initialized && n !== p) { 1297 if ( 1298 !r.allowSlideNext && 1299 (u 1300 ? w > r.translate && w > r.minTranslate() 1301 : w < r.translate && w < r.minTranslate()) 1302 ) 1303 return !1; 1304 if ( 1305 !r.allowSlidePrev && 1306 w > r.translate && 1307 w > r.maxTranslate() && 1308 (p || 0) !== n 1309 ) 1310 return !1; 1311 } 1312 let b; 1313 n !== (c || 0) && s && r.emit("beforeSlideChangeStart"), 1314 r.updateProgress(w), 1315 (b = n > p ? "next" : n < p ? "prev" : "reset"); 1316 const y = r.virtual && r.params.virtual.enabled; 1317 if (!(y && i) && ((u && -w === r.translate) || (!u && w === r.translate))) 1318 return ( 1319 r.updateActiveIndex(n), 1320 l.autoHeight && r.updateAutoHeight(), 1321 r.updateSlidesClasses(), 1322 "slide" !== l.effect && r.setTranslate(w), 1323 "reset" !== b && (r.transitionStart(s, b), r.transitionEnd(s, b)), 1324 !1 1325 ); 1326 if (l.cssMode) { 1327 const e = r.isHorizontal(), 1328 s = u ? w : -w; 1329 if (0 === t) 1330 y && 1331 ((r.wrapperEl.style.scrollSnapType = "none"), 1332 (r._immediateVirtual = !0)), 1333 y && !r._cssModeVirtualInitialSet && r.params.initialSlide > 0 1334 ? ((r._cssModeVirtualInitialSet = !0), 1335 requestAnimationFrame(() => { 1336 h[e ? "scrollLeft" : "scrollTop"] = s; 1337 })) 1338 : (h[e ? "scrollLeft" : "scrollTop"] = s), 1339 y && 1340 requestAnimationFrame(() => { 1341 (r.wrapperEl.style.scrollSnapType = ""), 1342 (r._immediateVirtual = !1); 1343 }); 1344 else { 1345 if (!r.support.smoothScroll) 1346 return ( 1347 m({ swiper: r, targetPosition: s, side: e ? "left" : "top" }), !0 1348 ); 1349 h.scrollTo({ [e ? "left" : "top"]: s, behavior: "smooth" }); 1350 } 1351 return !0; 1352 } 1353 const E = $().isSafari; 1354 return ( 1355 y && !i && E && r.isElement && r.virtual.update(!1, !1, n), 1356 r.setTransition(t), 1357 r.setTranslate(w), 1358 r.updateActiveIndex(n), 1359 r.updateSlidesClasses(), 1360 r.emit("beforeTransitionStart", t, a), 1361 r.transitionStart(s, b), 1362 0 === t 1363 ? r.transitionEnd(s, b) 1364 : r.animating || 1365 ((r.animating = !0), 1366 r.onSlideToWrapperTransitionEnd || 1367 (r.onSlideToWrapperTransitionEnd = function (e) { 1368 r && 1369 !r.destroyed && 1370 e.target === this && 1371 (r.wrapperEl.removeEventListener( 1372 "transitionend", 1373 r.onSlideToWrapperTransitionEnd 1374 ), 1375 (r.onSlideToWrapperTransitionEnd = null),
1376 delete r.onSlideToWrapperTransitionEnd, 1377 r.transitionEnd(s, b)); 1378 }), 1379 r.wrapperEl.addEventListener( 1380 "transitionend", 1381 r.onSlideToWrapperTransitionEnd 1382 )), 1383 !0 1384 ); 1385 }, 1386 slideToLoop: function (e, t, s, a) { 1387 if ( 1388 (void 0 === e && (e = 0), 1389 void 0 === s && (s = !0), 1390 "string" == typeof e) 1391 ) { 1392 e = parseInt(e, 10); 1393 } 1394 const i = this; 1395 if (i.destroyed) return; 1396 void 0 === t && (t = i.params.speed); 1397 const r = i.grid && i.params.grid && i.params.grid.rows > 1; 1398 let n = e; 1399 if (i.params.loop) 1400 if (i.virtual && i.params.virtual.enabled) n += i.virtual.slidesBefore; 1401 else { 1402 let e; 1403 if (r) { 1404 const t = n * i.params.grid.rows; 1405 e = i.slides.find( 1406 (e) => 1 * e.getAttribute("data-swiper-slide-index") === t 1407 ).column; 1408 } else e = i.getSlideIndexByData(n); 1409 const t = r 1410 ? Math.ceil(i.slides.length / i.params.grid.rows) 1411 : i.slides.length, 1412 { centeredSlides: s } = i.params; 1413 let l = i.params.slidesPerView; 1414 "auto" === l 1415 ? (l = i.slidesPerViewDynamic()) 1416 : ((l = Math.ceil(parseFloat(i.params.slidesPerView, 10))), 1417 s && l % 2 == 0 && (l += 1)); 1418 let o = t - e < l; 1419 if ( 1420 (s && (o = o || e < Math.ceil(l / 2)), 1421 a && s && "auto" !== i.params.slidesPerView && !r && (o = !1), 1422 o) 1423 ) { 1424 const a = s 1425 ? e < i.activeIndex 1426 ? "prev" 1427 : "next" 1428 : e - i.activeIndex - 1 < i.params.slidesPerView 1429 ? "next" 1430 : "prev"; 1431 i.loopFix({ 1432 direction: a, 1433 slideTo: !0, 1434 activeSlideIndex: "next" === a ? e + 1 : e - t + 1, 1435 slideRealIndex: "next" === a ? i.realIndex : void 0, 1436 }); 1437 } 1438 if (r) { 1439 const e = n * i.params.grid.rows; 1440 n = i.slides.find( 1441 (t) => 1 * t.getAttribute("data-swiper-slide-index") === e 1442 ).column; 1443 } else n = i.getSlideIndexByData(n); 1444 } 1445 return ( 1446 requestAnimationFrame(() => { 1447 i.slideTo(n, t, s, a); 1448 }), 1449 i 1450 ); 1451 }, 1452 slideNext: function (e, t, s) { 1453 void 0 === t && (t = !0); 1454 const a = this, 1455 { enabled: i, params: r, animating: n } = a; 1456 if (!i || a.destroyed) return a; 1457 void 0 === e && (e = a.params.speed); 1458 let l = r.slidesPerGroup; 1459 "auto" === r.slidesPerView && 1460 1 === r.slidesPerGroup && 1461 r.slidesPerGroupAuto && 1462 (l = Math.max(a.slidesPerViewDynamic("current", !0), 1)); 1463 const o = a.activeIndex < r.slidesPerGroupSkip ? 1 : l, 1464 d = a.virtual && r.virtual.enabled; 1465 if (r.loop) { 1466 if (n && !d && r.loopPreventsSliding) return !1; 1467 if ( 1468 (a.loopFix({ direction: "next" }), 1469 (a._clientLeft = a.wrapperEl.clientLeft), 1470 a.activeIndex === a.slides.length - 1 && r.cssMode) 1471 ) 1472 return ( 1473 requestAnimationFrame(() => { 1474 a.slideTo(a.activeIndex + o, e, t, s); 1475 }), 1476 !0 1477 ); 1478 } 1479 return r.rewind && a.isEnd 1480 ? a.slideTo(0, e, t, s) 1481 : a.slideTo(a.activeIndex + o, e, t, s); 1482 }, 1483 slidePrev: function (e, t, s) { 1484 void 0 === t && (t = !0); 1485 const a = this, 1486 { 1487 params: i, 1488 snapGrid: r, 1489 slidesGrid: n, 1490 rtlTranslate: l, 1491 enabled: o, 1492 animating: d, 1493 } = a; 1494 if (!o || a.destroyed) return a; 1495 void 0 === e && (e = a.params.speed); 1496 const c = a.virtual && i.virtual.enabled; 1497 if (i.loop) { 1498 if (d && !c && i.loopPreventsSliding) return !1; 1499 a.loopFix({ direction: "prev" }), 1500 (a._clientLeft = a.wrapperEl.clientLeft); 1501 } 1502 function p(e) { 1503 return e < 0 ? -Math.floor(Math.abs(e)) : Math.floor(e); 1504 } 1505 const u = p(l ? a.translate : -a.translate), 1506 m = r.map((e) => p(e)), 1507 h = i.freeMode && i.freeMode.enabled; 1508 let f = r[m.indexOf(u) - 1]; 1509 if (void 0 === f && (i.cssMode || h)) { 1510 let e; 1511 r.forEach((t, s) => { 1512 u >= t && (e = s); 1513 }), 1514 void 0 !== e && (f = h ? r[e] : r[e > 0 ? e - 1 : e]); 1515 } 1516 let g = 0; 1517 if ( 1518 (void 0 !== f && 1519 ((g = n.indexOf(f)), 1520 g < 0 && (g = a.activeIndex - 1), 1521 "auto" === i.slidesPerView && 1522 1 === i.slidesPerGroup && 1523 i.slidesPerGroupAuto && 1524 ((g = g - a.slidesPerViewDynamic("previous", !0) + 1), 1525 (g = Math.max(g, 0)))), 1526 i.rewind && a.isBeginning) 1527 ) { 1528 const i = 1529 a.params.virtual && a.params.virtual.enabled && a.virtual 1530 ? a.virtual.slides.length - 1 1531 : a.slides.length - 1; 1532 return a.slideTo(i, e, t, s); 1533 } 1534 return i.loop && 0 === a.activeIndex && i.cssMode 1535 ? (requestAnimationFrame(() => { 1536 a.slideTo(g, e, t, s); 1537 }), 1538 !0) 1539 : a.slideTo(g, e, t, s); 1540 }, 1541 slideReset: function (e, t, s) { 1542 void 0 === t && (t = !0); 1543 const a = this; 1544 if (!a.destroyed) 1545 return ( 1546 void 0 === e && (e = a.params.speed), 1547 a.slideTo(a.activeIndex, e, t, s) 1548 ); 1549 }, 1550 slideToClosest: function (e, t, s, a) { 1551 void 0 === t && (t = !0), void 0 === a && (a = 0.5); 1552 const i = this; 1553 if (i.destroyed) return; 1554 void 0 === e && (e = i.params.speed); 1555 let r = i.activeIndex; 1556 const n = Math.min(i.params.slidesPerGroupSkip, r), 1557 l = n + Math.floor((r - n) / i.params.slidesPerGroup), 1558 o = i.rtlTranslate ? i.translate : -i.translate; 1559 if (o >= i.snapGrid[l]) { 1560 const e = i.snapGrid[l]; 1561 o - e > (i.snapGrid[l + 1] - e) * a && (r += i.params.slidesPerGroup); 1562 } else { 1563 const e = i.snapGrid[l - 1]; 1564 o - e <= (i.snapGrid[l] - e) * a && (r -= i.params.slidesPerGroup); 1565 } 1566 return ( 1567 (r = Math.max(r, 0)), 1568 (r = Math.min(r, i.slidesGrid.length - 1)), 1569 i.slideTo(r, e, t, s) 1570 ); 1571 }, 1572 slideToClickedSlide: function () { 1573 const e = this; 1574 if (e.destroyed) return; 1575 const { params: t, slidesEl: s } = e, 1576 a = 1577 "auto" === t.slidesPerView 1578 ? e.slidesPerViewDynamic() 1579 : t.slidesPerView; 1580 let i, 1581 r = e.clickedIndex; 1582 const n = e.isElement ? "swiper-slide" : `.${t.slideClass}`; 1583 if (t.loop) { 1584 if (e.animating) return; 1585 (i = parseInt( 1586 e.clickedSlide.getAttribute("data-swiper-slide-index"), 1587 10 1588 )), 1589 t.centeredSlides 1590 ? r < e.loopedSlides - a / 2 || 1591 r > e.slides.length - e.loopedSlides + a / 2 1592 ? (e.loopFix(), 1593 (r = e.getSlideIndex( 1594 f(s, `${n}[data-swiper-slide-index="${i}"]`)[0] 1595 )), 1596 l(() => { 1597 e.slideTo(r); 1598 })) 1599 : e.slideTo(r) 1600 : r > e.slides.length - a 1601 ? (e.loopFix(), 1602 (r = e.getSlideIndex( 1603 f(s, `${n}[data-swiper-slide-index="${i}"]`)[0] 1604 )), 1605 l(() => { 1606 e.slideTo(r); 1607 })) 1608 : e.slideTo(r); 1609 } else e.slideTo(r); 1610 }, 1611 }; 1612 var _ = { 1613 loopCreate: function (e, t) { 1614 const s = this, 1615 { params: a, slidesEl: i } = s; 1616 if (!a.loop || (s.virtual && s.params.virtual.enabled)) return; 1617 const r = () => { 1618 f(i, `.${a.slideClass}, swiper-slide`).forEach((e, t) => { 1619 e.setAttribute("data-swiper-slide-index", t); 1620 }); 1621 }, 1622 n = s.grid && a.grid && a.grid.rows > 1, 1623 l = a.slidesPerGroup * (n ? a.grid.rows : 1), 1624 o = s.slides.length % l != 0, 1625 d = n && s.slides.length % a.grid.rows != 0, 1626 c = (e) => { 1627 for (let t = 0; t < e; t += 1) { 1628 const e = s.isElement 1629 ? v("swiper-slide", [a.slideBlankClass]) 1630 : v("div", [a.slideClass, a.slideBlankClass]); 1631 s.slidesEl.append(e); 1632 } 1633 }; 1634 if (o) { 1635 if (a.loopAddBlankSlides) { 1636 c(l - (s.slides.length % l)), s.recalcSlides(), s.updateSlides(); 1637 } else 1638 g( 1639 "Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may
1639not function properly. You need to add more slides (or make duplicates, or empty slides)" 1640 ); 1641 r(); 1642 } else if (d) { 1643 if (a.loopAddBlankSlides) { 1644 c(a.grid.rows - (s.slides.length % a.grid.rows)), 1645 s.recalcSlides(), 1646 s.updateSlides(); 1647 } else 1648 g( 1649 "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)" 1650 ); 1651 r(); 1652 } else r(); 1653 s.loopFix({ 1654 slideRealIndex: e, 1655 direction: a.centeredSlides ? void 0 : "next", 1656 initial: t, 1657 }); 1658 }, 1659 loopFix: function (e) { 1660 let { 1661 slideRealIndex: t, 1662 slideTo: s = !0, 1663 direction: a, 1664 setTranslate: i, 1665 activeSlideIndex: r, 1666 initial: n, 1667 byController: l, 1668 byMousewheel: o, 1669 } = void 0 === e ? {} : e; 1670 const d = this; 1671 if (!d.params.loop) return; 1672 d.emit("beforeLoopFix"); 1673 const { 1674 slides: c, 1675 allowSlidePrev: p, 1676 allowSlideNext: u, 1677 slidesEl: m, 1678 params: h, 1679 } = d, 1680 { centeredSlides: f, initialSlide: v } = h; 1681 if ( 1682 ((d.allowSlidePrev = !0), 1683 (d.allowSlideNext = !0), 1684 d.virtual && h.virtual.enabled) 1685 ) 1686 return ( 1687 s && 1688 (h.centeredSlides || 0 !== d.snapIndex 1689 ? h.centeredSlides && d.snapIndex < h.slidesPerView 1690 ? d.slideTo(d.virtual.slides.length + d.snapIndex, 0, !1, !0) 1691 : d.snapIndex === d.snapGrid.length - 1 && 1692 d.slideTo(d.virtual.slidesBefore, 0, !1, !0) 1693 : d.slideTo(d.virtual.slides.length, 0, !1, !0)), 1694 (d.allowSlidePrev = p), 1695 (d.allowSlideNext = u), 1696 void d.emit("loopFix") 1697 ); 1698 let w = h.slidesPerView; 1699 "auto" === w 1700 ? (w = d.slidesPerViewDynamic()) 1701 : ((w = Math.ceil(parseFloat(h.slidesPerView, 10))),
1702 f && w % 2 == 0 && (w += 1)); 1703 const b = h.slidesPerGroupAuto ? w : h.slidesPerGroup; 1704 let y = b; 1705 y % b != 0 && (y += b - (y % b)), 1706 (y += h.loopAdditionalSlides), 1707 (d.loopedSlides = y); 1708 const E = d.grid && h.grid && h.grid.rows > 1; 1709 c.length < w + y || ("cards" === d.params.effect && c.length < w + 2 * y) 1710 ? g( 1711 "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" 1712 ) 1713 : E && 1714 "row" === h.grid.fill && 1715 g( 1716 "Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`" 1717 ); 1718 const x = [], 1719 S = [], 1720 T = E ? Math.ceil(c.length / h.grid.rows) : c.length, 1721 M = n && T - v < w && !f; 1722 let C = M ? v : d.activeIndex; 1723 void 0 === r 1724 ? (r = d.getSlideIndex( 1725 c.find((e) => e.classList.contains(h.slideActiveClass)) 1726 )) 1727 : (C = r); 1728 const P = "next" === a || !a, 1729 L = "prev" === a || !a; 1730 let I = 0, 1731 z = 0; 1732 const A = (E ? c[r].column : r) + (f && void 0 === i ? -w / 2 + 0.5 : 0); 1733 if (A < y) { 1734 I = Math.max(y - A, b); 1735 for (let e = 0; e < y - A; e += 1) { 1736 const t = e - Math.floor(e / T) * T; 1737 if (E) { 1738 const e = T - t - 1; 1739 for (let t = c.length - 1; t >= 0; t -= 1) 1740 c[t].column === e && x.push(t); 1741 } else x.push(T - t - 1); 1742 } 1743 } else if (A + w > T - y) { 1744 (z = Math.max(A - (T - 2 * y), b)), 1745 M && (z = Math.max(z, w - T + v + 1)); 1746 for (let e = 0; e < z; e += 1) { 1747 const t = e - Math.floor(e / T) * T; 1748 E 1749 ? c.forEach((e, s) => { 1750 e.column === t && S.push(s); 1751 }) 1752 : S.push(t); 1753 } 1754 } 1755 if ( 1756 ((d.__preventObserver__ = !0), 1757 requestAnimationFrame(() => { 1758 d.__preventObserver__ = !1; 1759 }), 1760 "cards" === d.params.effect && 1761 c.length < w + 2 * y && 1762 (S.includes(r) && S.splice(S.indexOf(r), 1), 1763 x.includes(r) && x.splice(x.indexOf(r), 1)), 1764 L && 1765 x.forEach((e) => { 1766 (c[e].swiperLoopMoveDOM = !0), 1767 m.prepend(c[e]), 1768 (c[e].swiperLoopMoveDOM = !1); 1769 }), 1770 P && 1771 S.forEach((e) => { 1772 (c[e].swiperLoopMoveDOM = !0), 1773 m.append(c[e]), 1774 (c[e].swiperLoopMoveDOM = !1); 1775 }), 1776 d.recalcSlides(), 1777 "auto" === h.slidesPerView 1778 ? d.updateSlides() 1779 : E && 1780 ((x.length > 0 && L) || (S.length > 0 && P)) && 1781 d.slides.forEach((e, t) => { 1782 d.grid.updateSlide(t, e, d.slides); 1783 }), 1784 h.watchSlidesProgress && d.updateSlidesOffset(), 1785 s) 1786 ) 1787 if (x.length > 0 && L) { 1788 if (void 0 === t) { 1789 const e = d.slidesGrid[C], 1790 t = d.slidesGrid[C + I] - e; 1791 o 1792 ? d.setTranslate(d.translate - t) 1793 : (d.slideTo(C + Math.ceil(I), 0, !1, !0), 1794 i && 1795 ((d.touchEventsData.startTranslate = 1796 d.touchEventsData.startTranslate - t), 1797 (d.touchEventsData.currentTranslate = 1798 d.touchEventsData.currentTranslate - t))); 1799 } else if (i) { 1800 const e = E ? x.length / h.grid.rows : x.length; 1801 d.slideTo(d.activeIndex + e, 0, !1, !0), 1802 (d.touchEventsData.currentTranslate = d.translate); 1803 } 1804 } else if (S.length > 0 && P) 1805 if (void 0 === t) { 1806 const e = d.slidesGrid[C], 1807 t = d.slidesGrid[C - z] - e; 1808 o 1809 ? d.setTranslate(d.translate - t) 1810 : (d.slideTo(C - z, 0, !1, !0), 1811 i && 1812 ((d.touchEventsData.startTranslate = 1813 d.touchEventsData.startTranslate - t), 1814 (d.touchEventsData.currentTranslate = 1815 d.touchEventsData.currentTranslate - t))); 1816 } else { 1817 const e = E ? S.length / h.grid.rows : S.length; 1818 d.slideTo(d.activeIndex - e, 0, !1, !0); 1819 } 1820 if ( 1821 ((d.allowSlidePrev = p), 1822 (d.allowSlideNext = u), 1823 d.controller && d.controller.control && !l) 1824 ) { 1825 const e = { 1826 slideRealIndex: t, 1827 direction: a, 1828 setTranslate: i, 1829 activeSlideIndex: r, 1830 byController: !0, 1831 }; 1832 Array.isArray(d.controller.control) 1833 ? d.controller.control.forEach((t) => { 1834 !t.destroyed && 1835 t.params.loop && 1836 t.loopFix({ 1837 ...e, 1838 slideTo: t.params.slidesPerView === h.slidesPerView && s, 1839 }); 1840 }) 1841 : d.controller.control instanceof d.constructor && 1842 d.controller.control.params.loop && 1843 d.controller.control.loopFix({ 1844 ...e, 1845 slideTo: 1846 d.controller.control.params.slidesPerView === h.slidesPerView && 1847 s, 1848 }); 1849 } 1850 d.emit("loopFix"); 1851 }, 1852 loopDestroy: function () { 1853 const e = this, 1854 { params: t, slidesEl: s } = e; 1855 if (!t.loop || !s || (e.virtual && e.params.virtual.enabled)) return; 1856 e.recalcSlides(); 1857 const a = [];
1858 e.slides.forEach((e) => { 1859 const t = 1860 void 0 === e.swiperSlideIndex 1861 ? 1 * e.getAttribute("data-swiper-slide-index") 1862 : e.swiperSlideIndex; 1863 a[t] = e; 1864 }), 1865 e.slides.forEach((e) => { 1866 e.removeAttribute("data-swiper-slide-index"); 1867 }), 1868 a.forEach((e) => { 1869 s.append(e); 1870 }), 1871 e.recalcSlides(), 1872 e.slideTo(e.realIndex, 0); 1873 }, 1874 }; 1875 function q(e, t, s) { 1876 const a = r(), 1877 { params: i } = e, 1878 n = i.edgeSwipeDetection, 1879 l = i.edgeSwipeThreshold; 1880 return ( 1881 !n || 1882 !(s <= l || s >= a.innerWidth - l) || 1883 ("prevent" === n && (t.preventDefault(), !0)) 1884 ); 1885 } 1886 function F(e) { 1887 const t = this, 1888 s = a(); 1889 let i = e; 1890 i.originalEvent && (i = i.originalEvent); 1891 const n = t.touchEventsData; 1892 if ("pointerdown" === i.type) { 1893 if (null !== n.pointerId && n.pointerId !== i.pointerId) return; 1894 n.pointerId = i.pointerId; 1895 } else 1896 "touchstart" === i.type && 1897 1 === i.targetTouches.length && 1898 (n.touchId = i.targetTouches[0].identifier); 1899 if ("touchstart" === i.type) return void q(t, i, i.targetTouches[0].pageX); 1900 const { params: l, touches: d, enabled: c } = t; 1901 if (!c) return; 1902 if (!l.simulateTouch && "mouse" === i.pointerType) return; 1903 if (t.animating && l.preventInteractionOnTransition) return; 1904 !t.animating && l.cssMode && l.loop && t.loopFix(); 1905 let p = i.target; 1906 if ( 1907 "wrapper" === l.touchEventsTarget && 1908 !(function (e, t) { 1909 const s = r(); 1910 let a = t.contains(e); 1911 !a && 1912 s.HTMLSlotElement && 1913 t instanceof HTMLSlotElement && 1914 ((a = [...t.assignedElements()].includes(e)), 1915 a || 1916 (a = (function (e, t) { 1917 const s = [t]; 1918 for (; s.length > 0; ) { 1919 const t = s.shift(); 1920 if (e === t) return !0; 1921 s.push( 1922 ...t.children, 1923 ...(t.shadowRoot ? t.shadowRoot.children : []), 1924 ...(t.assignedElements ? t.assignedElements() : []) 1925 ); 1926 } 1927 })(e, t))); 1928 return a; 1929 })(p, t.wrapperEl) 1930 ) 1931 return; 1932 if ("which" in i && 3 === i.which) return; 1933 if ("button" in i && i.button > 0) return; 1934 if (n.isTouched && n.isMoved) return; 1935 const u = !!l.noSwipingClass && "" !== l.noSwipingClass, 1936 m = i.composedPath ? i.composedPath() : i.path; 1937 u && i.target && i.target.shadowRoot && m && (p = m[0]); 1938 const h = l.noSwipingSelector 1939 ? l.noSwipingSelector 1940 : `.${l.noSwipingClass}`, 1941 f = !(!i.target || !i.target.shadowRoot); 1942 if ( 1943 l.noSwiping && 1944 (f 1945 ? (function (e, t) { 1946 return ( 1947 void 0 === t && (t = this), 1948 (function t(s) { 1949 if (!s || s === a() || s === r()) return null; 1950 s.assignedSlot && (s = s.assignedSlot); 1951 const i = s.closest(e); 1952 return i || s.getRootNode ? i || t(s.getRootNode().host) : null; 1953 })(t) 1954 ); 1955 })(h, p) 1956 : p.closest(h)) 1957 ) 1958 return void (t.allowClick = !0); 1959 if (l.swipeHandler && !p.closest(l.swipeHandler)) return; 1960 (d.currentX = i.pageX), (d.currentY = i.pageY); 1961 const g = d.currentX, 1962 v = d.currentY; 1963 if (!q(t, i, g)) return; 1964 Object.assign(n, { 1965 isTouched: !0, 1966 isMoved: !1, 1967 allowTouchCallbacks: !0, 1968 isScrolling: void 0, 1969 startMoving: void 0, 1970 }), 1971 (d.startX = g), 1972 (d.startY = v), 1973 (n.touchStartTime = o()), 1974 (t.allowClick = !0), 1975 t.updateSize(), 1976 (t.swipeDirection = void 0), 1977 l.threshold > 0 && (n.allowThresholdMove = !1); 1978 let w = !0; 1979 p.matches(n.focusableElements) && 1980 ((w = !1), "SELECT" === p.nodeName && (n.isTouched = !1)), 1981 s.activeElement && 1982 s.activeElement.matches(n.focusableElements) && 1983 s.activeElement !== p && 1984 ("mouse" === i.pointerType || 1985 ("mouse" !== i.pointerType && !p.matches(n.focusableElements))) && 1986 s.activeElement.blur(); 1987 const b = w && t.allowTouchMove && l.touchStartPreventDefault; 1988 (!l.touchStartForcePreventDefault && !b) || 1989 p.isContentEditable || 1990 i.preventDefault(), 1991 l.freeMode && 1992 l.freeMode.enabled && 1993 t.freeMode && 1994 t.animating && 1995 !l.cssMode && 1996 t.freeMode.onTouchStart(), 1997 t.emit("touchStart", i); 1998 } 1999 function V(e) { 2000 const t = a(), 2001 s = this, 2002 i = s.touchEventsData, 2003 { params: r, touches: n, rtlTranslate: l, enabled: d } = s; 2004 if (!d) return; 2005 if (!r.simulateTouch && "mouse" === e.pointerType) return;
2006 let c, 2007 p = e; 2008 if ((p.originalEvent && (p = p.originalEvent), "pointermove" === p.type)) { 2009 if (null !== i.touchId) return; 2010 if (p.pointerId !== i.pointerId) return; 2011 } 2012 if ("touchmove" === p.type) { 2013 if ( 2014 ((c = [...p.changedTouches].find((e) => e.identifier === i.touchId)), 2015 !c || c.identifier !== i.touchId) 2016 ) 2017 return; 2018 } else c = p; 2019 if (!i.isTouched) 2020 return void ( 2021 i.startMoving && 2022 i.isScrolling && 2023 s.emit("touchMoveOpposite", p) 2024 ); 2025 const u = c.pageX, 2026 m = c.pageY; 2027 if (p.preventedByNestedSwiper) return (n.startX = u), void (n.startY = m); 2028 if (!s.allowTouchMove) 2029 return ( 2030 p.target.matches(i.focusableElements) || (s.allowClick = !1), 2031 void ( 2032 i.isTouched && 2033 (Object.assign(n, { startX: u, startY: m, currentX: u, currentY: m }), 2034 (i.touchStartTime = o())) 2035 ) 2036 ); 2037 if (r.touchReleaseOnEdges && !r.loop) 2038 if (s.isVertical()) { 2039 if ( 2040 (m < n.startY && s.translate <= s.maxTranslate()) || 2041 (m > n.startY && s.translate >= s.minTranslate()) 2042 ) 2043 return (i.isTouched = !1), void (i.isMoved = !1); 2044 } else { 2045 if ( 2046 l && 2047 ((u > n.startX && -s.translate <= s.maxTranslate()) || 2048 (u < n.startX && -s.translate >= s.minTranslate())) 2049 ) 2050 return; 2051 if ( 2052 !l && 2053 ((u < n.startX && s.translate <= s.maxTranslate()) || 2054 (u > n.startX && s.translate >= s.minTranslate())) 2055 ) 2056 return; 2057 } 2058 if ( 2059 (t.activeElement && 2060 t.activeElement.matches(i.focusableElements) && 2061 t.activeElement !== p.target && 2062 "mouse" !== p.pointerType && 2063 t.activeElement.blur(), 2064 t.activeElement && 2065 p.target === t.activeElement && 2066 p.target.matches(i.focusableElements)) 2067 ) 2068 return (i.isMoved = !0), void (s.allowClick = !1); 2069 i.allowTouchCallbacks && s.emit("touchMove", p), 2070 (n.previousX = n.currentX), 2071 (n.previousY = n.currentY), 2072 (n.currentX = u), 2073 (n.currentY = m); 2074 const h = n.currentX - n.startX, 2075 f = n.currentY - n.startY; 2076 if (s.params.threshold && Math.sqrt(h ** 2 + f ** 2) < s.params.threshold) 2077 return; 2078 if (void 0 === i.isScrolling) { 2079 let e; 2080 (s.isHorizontal() && n.currentY === n.startY) || 2081 (s.isVertical() && n.currentX === n.startX) 2082 ? (i.isScrolling = !1) 2083 : h * h + f * f >= 25 && 2084 ((e = (180 * Math.atan2(Math.abs(f), Math.abs(h))) / Math.PI), 2085 (i.isScrolling = s.isHorizontal() 2086 ? e > r.touchAngle 2087 : 90 - e > r.touchAngle)); 2088 } 2089 if ( 2090 (i.isScrolling && s.emit("touchMoveOpposite", p), 2091 void 0 === i.startMoving && 2092 ((n.currentX === n.startX && n.currentY === n.startY) || 2093 (i.startMoving = !0)), 2094 i.isScrolling || 2095 ("touchmove" === p.type && i.preventTouchMoveFromPointerMove)) 2096 ) 2097 return void (i.isTouched = !1); 2098 if (!i.startMoving) return; 2099 (s.allowClick = !1), 2100 !r.cssMode && p.cancelable && p.preventDefault(), 2101 r.touchMoveStopPropagation && !r.nested && p.stopPropagation(); 2102 let g = s.isHorizontal() ? h : f, 2103 v = s.isHorizontal() 2104 ? n.currentX - n.previousX 2105 : n.currentY - n.previousY; 2106 r.oneWayMovement && 2107 ((g = Math.abs(g) * (l ? 1 : -1)), (v = Math.abs(v) * (l ? 1 : -1))), 2108 (n.diff = g), 2109 (g *= r.touchRatio), 2110 l && ((g = -g), (v = -v)); 2111 const w = s.touchesDirection; 2112 (s.swipeDirection = g > 0 ? "prev" : "next"), 2113 (s.touchesDirection = v > 0 ? "prev" : "next"); 2114 const b = s.params.loop && !r.cssMode, 2115 y = 2116 ("next" === s.touchesDirection && s.allowSlideNext) || 2117 ("prev" === s.touchesDirection && s.allowSlidePrev); 2118 if (!i.isMoved) { 2119 if ( 2120 (b && y && s.loopFix({ direction: s.swipeDirection }), 2121 (i.startTranslate = s.getTranslate()), 2122 s.setTransition(0), 2123 s.animating) 2124 ) { 2125 const e = new window.CustomEvent("transitionend", { 2126 bubbles: !0, 2127 cancelable: !0, 2128 detail: { bySwiperTouchMove: !0 },
2129 }); 2130 s.wrapperEl.dispatchEvent(e); 2131 } 2132 (i.allowMomentumBounce = !1), 2133 !r.grabCursor || 2134 (!0 !== s.allowSlideNext && !0 !== s.allowSlidePrev) || 2135 s.setGrabCursor(!0), 2136 s.emit("sliderFirstMove", p); 2137 } 2138 if ( 2139 (new Date().getTime(), 2140 !1 !== r._loopSwapReset && 2141 i.isMoved && 2142 i.allowThresholdMove && 2143 w !== s.touchesDirection && 2144 b && 2145 y && 2146 Math.abs(g) >= 1) 2147 ) 2148 return ( 2149 Object.assign(n, { 2150 startX: u, 2151 startY: m, 2152 currentX: u, 2153 currentY: m, 2154 startTranslate: i.currentTranslate, 2155 }), 2156 (i.loopSwapReset = !0), 2157 void (i.startTranslate = i.currentTranslate) 2158 ); 2159 s.emit("sliderMove", p), 2160 (i.isMoved = !0), 2161 (i.currentTranslate = g + i.startTranslate); 2162 let E = !0, 2163 x = r.resistanceRatio; 2164 if ( 2165 (r.touchReleaseOnEdges && (x = 0), 2166 g > 0 2167 ? (b && 2168 y && 2169 i.allowThresholdMove && 2170 i.currentTranslate > 2171 (r.centeredSlides 2172 ? s.minTranslate() - 2173 s.slidesSizesGrid[s.activeIndex + 1] - 2174 ("auto" !== r.slidesPerView && 2175 s.slides.length - r.slidesPerView >= 2 2176 ? s.slidesSizesGrid[s.activeIndex + 1] + 2177 s.params.spaceBetween 2178 : 0) - 2179 s.params.spaceBetween 2180 : s.minTranslate()) && 2181 s.loopFix({ 2182 direction: "prev", 2183 setTranslate: !0, 2184 activeSlideIndex: 0, 2185 }), 2186 i.currentTranslate > s.minTranslate() && 2187 ((E = !1), 2188 r.resistance && 2189 (i.currentTranslate = 2190 s.minTranslate() - 2191 1 + 2192 (-s.minTranslate() + i.startTranslate + g) ** x))) 2193 : g < 0 && 2194 (b && 2195 y && 2196 i.allowThresholdMove && 2197 i.currentTranslate < 2198 (r.centeredSlides 2199 ? s.maxTranslate() + 2200 s.slidesSizesGrid[s.slidesSizesGrid.length - 1] + 2201 s.params.spaceBetween + 2202 ("auto" !== r.slidesPerView && 2203 s.slides.length - r.slidesPerView >= 2 2204 ? s.slidesSizesGrid[s.slidesSizesGrid.length - 1] + 2205 s.params.spaceBetween 2206 : 0) 2207 : s.maxTranslate()) && 2208 s.loopFix({ 2209 direction: "next", 2210 setTranslate: !0, 2211 activeSlideIndex: 2212 s.slides.length - 2213 ("auto" === r.slidesPerView 2214 ? s.slidesPerViewDynamic() 2215 : Math.ceil(parseFloat(r.slidesPerView, 10))), 2216 }), 2217 i.currentTranslate < s.maxTranslate() && 2218 ((E = !1), 2219 r.resistance && 2220 (i.currentTranslate = 2221 s.maxTranslate() + 2222 1 - 2223 (s.maxTranslate() - i.startTranslate - g) ** x))), 2224 E && (p.preventedByNestedSwiper = !0), 2225 !s.allowSlideNext && 2226 "next" === s.swipeDirection && 2227 i.currentTranslate < i.startTranslate && 2228 (i.currentTranslate = i.startTranslate), 2229 !s.allowSlidePrev && 2230 "prev" === s.swipeDirection && 2231 i.currentTranslate > i.startTranslate && 2232 (i.currentTranslate = i.startTranslate), 2233 s.allowSlidePrev || 2234 s.allowSlideNext || 2235 (i.currentTranslate = i.startTranslate), 2236 r.threshold > 0) 2237 ) { 2238 if (!(Math.abs(g) > r.threshold || i.allowThresholdMove)) 2239 return void (i.currentTranslate = i.startTranslate); 2240 if (!i.allowThresholdMove) 2241 return ( 2242 (i.allowThresholdMove = !0), 2243 (n.startX = n.currentX), 2244 (n.startY = n.currentY), 2245 (i.currentTranslate = i.startTranslate), 2246 void (n.diff = s.isHorizontal() 2247 ? n.currentX - n.startX 2248 : n.currentY - n.startY) 2249 ); 2250 } 2251 r.followFinger && 2252 !r.cssMode && 2253 (((r.freeMode && r.freeMode.enabled && s.freeMode) || 2254 r.watchSlidesProgress) && 2255 (s.updateActiveIndex(), s.updateSlidesClasses()), 2256 r.freeMode && 2257 r.freeMode.enabled && 2258 s.freeMode && 2259 s.freeMode.onTouchMove(), 2260 s.updateProgress(i.currentTranslate), 2261 s.setTranslate(i.currentTranslate)); 2262 } 2263 function W(e) { 2264 const t = this, 2265 s = t.touchEventsData; 2266 let a, 2267 i = e; 2268 i.originalEvent && (i = i.originalEvent); 2269 if ("touchend" === i.type || "touchcancel" === i.type) { 2270 if ( 2271 ((a = [...i.changedTouches].find((e) => e.identifier === s.touchId)), 2272 !a || a.identifier !== s.touchId) 2273 ) 2274 return; 2275 } else { 2276 if (null !== s.touchId) return; 2277 if (i.pointerId !== s.pointerId) return; 2278 a = i; 2279 } 2280 if ( 2281 ["pointercancel", "pointerout", "pointerleave", "contextmenu"].includes( 2282 i.type 2283 ) 2284 ) { 2285 if ( 2286 !( 2287 ["pointercancel", "contextmenu"].includes(i.type) && 2288 (t.browser.isSafari || t.browser.isWebView) 2289 ) 2290 ) 2291 return; 2292 } 2293 (s.pointerId = null), (s.touchId = null); 2294 const { 2295 params: r, 2296 touches: n, 2297 rtlTranslate: d, 2298 slidesGrid: c, 2299 enabled: p, 2300 } = t; 2301 if (!p) return; 2302 if (!r.simulateTouch && "mouse" === i.pointerType) return; 2303 if ( 2304 (s.allowTouchCallbacks && t.emit("touchEnd", i), 2305 (s.allowTouchCallbacks = !1), 2306 !s.isTouched) 2307 ) 2308 return ( 2309 s.isMoved && r.grabCursor && t.setGrabCursor(!1), 2310 (s.isMoved = !1), 2311 void (s.startMoving = !1) 2312 ); 2313 r.grabCursor && 2314 s.isMoved && 2315 s.isTouched && 2316 (!0 === t.allowSlideNext || !0 === t.allowSlidePrev) && 2317 t.setGrabCursor(!1); 2318 const u = o(), 2319 m = u - s.touchStartTime; 2320 if (t.allowClick) { 2321 const e = i.path || (i.composedPath && i.composedPath()); 2322 t.updateClickedSlide((e && e[0]) || i.target, e), 2323 t.emit("tap click", i), 2324 m < 300 && 2325 u - s.lastClickTime < 300 && 2326 t.emit("doubleTap doubleClick", i); 2327 } 2328 if ( 2329 ((s.lastClickTime = o()), 2330 l(() => { 2331 t.destroyed || (t.allowClick = !0); 2332 }), 2333 !s.isTouched || 2334 !s.isMoved || 2335 !t.swipeDirection || 2336 (0 === n.diff && !s.loopSwapReset) || 2337 (s.currentTranslate === s.startTranslate && !s.loopSwapReset)) 2338 ) 2339 return (s.isTouched = !1), (s.isMoved = !1), void (s.startMoving = !1); 2340 let h; 2341 if ( 2342 ((s.isTouched = !1), 2343 (s.isMoved = !1), 2344 (s.startMoving = !1), 2345 (h = r.followFinger 2346 ? d 2347 ? t.translate 2348 : -t.translate 2349 : -s.currentTranslate), 2350 r.cssMode) 2351 ) 2352 return; 2353 if (r.freeMode && r.freeMode.enabled) 2354 return void t.freeMode.onTouchEnd({ currentPos: h }); 2355 const f = h >= -t.maxTranslate() && !t.params.loop; 2356 let g = 0, 2357 v = t.slidesSizesGrid[0]; 2358 for ( 2359 let e = 0; 2360 e < c.length; 2361 e += e < r.slidesPerGroupSkip ? 1 : r.slidesPerGroup 2362 ) { 2363 const t = e < r.slidesPerGroupSkip - 1 ? 1 : r.slidesPerGroup; 2364 void 0 !== c[e + t] 2365 ? (f || (h >= c[e] && h < c[e + t])) && ((g = e), (v = c[e + t] - c[e])) 2366 : (f || h >= c[e]) && 2367 ((g = e), (v = c[c.length - 1] - c[c.length - 2])); 2368 } 2369 let w = null, 2370 b = null; 2371 r.rewind && 2372 (t.isBeginning 2373 ? (b = 2374 r.virtual && r.virtual.enabled && t.virtual 2375 ? t.virtual.slides.length - 1 2376 : t.slides.length - 1) 2377 : t.isEnd && (w = 0)); 2378 const y = (h - c[g]) / v, 2379 E = g < r.slidesPerGroupSkip - 1 ? 1 : r.slidesPerGroup; 2380 if (m > r.longSwipesMs) { 2381 if (!r.longSwipes) return void t.slideTo(t.activeIndex); 2382 "next" === t.swipeDirection && 2383 (y >= r.longSwipesRatio 2384 ? t.slideTo(r.rewind && t.isEnd ? w : g + E) 2385 : t.slideTo(g)), 2386 "prev" === t.swipeDirection && 2387 (y > 1 - r.longSwipesRatio 2388 ? t.slideTo(g + E) 2389 : null !== b && y < 0 && Math.abs(y) > r.longSwipesRatio 2390 ? t.slideTo(b) 2391 : t.slideTo(g)); 2392 } else { 2393 if (!r.shortSwipes) return void t.slideTo(t.activeIndex); 2394 t.navigation && 2395 (i.target === t.navigation.nextEl || i.target === t.navigation.prevEl) 2396 ? i.target === t.navigation.nextEl 2397 ? t.slideTo(g + E) 2398 : t.slideTo(g) 2399 : ("next" === t.swipeDirection && t.slideTo(null !== w ? w : g + E), 2400 "prev" === t.swipeDirection && t.slideTo(null !== b ? b : g)); 2401 } 2402 } 2403 function j() { 2404 const e = this, 2405 { params: t, el: s } = e; 2406 if (s && 0 === s.offsetWidth) return; 2407 t.breakpoints && e.setBreakpoint(); 2408 const { allowSlideNext: a, allowSlidePrev: i, snapGrid: r } = e, 2409 n = e.virtual && e.params.virtual.enabled; 2410 (e.allowSlideNext = !0), 2411 (e.allowSlidePrev = !0), 2412 e.updateSize(), 2413 e.updateSlides(), 2414 e.updateSlidesClasses(); 2415 const l = n && t.loop; 2416 !("auto" === t.slidesPerView || t.slidesPerView > 1) || 2417 !e.isEnd || 2418 e.isBeginning || 2419 e.params.centeredSlides || 2420 l 2421 ? e.params.loop && !n 2422 ? e.slideToLoop(e.realIndex, 0, !1, !0) 2423 : e.slideTo(e.activeIndex, 0, !1, !0) 2424 : e.slideTo(e.slides.length - 1, 0, !1, !0), 2425 e.autoplay && 2426 e.autoplay.running && 2427 e.autoplay.paused && 2428 (clearTimeout(e.autoplay.resizeTimeout), 2429 (e.autoplay.resizeTimeout = setTimeout(() => { 2430 e.autoplay && 2431 e.autoplay.running && 2432 e.autoplay.paused && 2433 e.autoplay.resume(); 2434 }, 500))), 2435 (e.allowSlidePrev = i), 2436 (e.allowSlideNext = a), 2437 e.params.watchOverflow && r !== e.snapGrid && e.checkOverflow(); 2438 } 2439 function U(e) { 2440 const t = this; 2441 t.enabled && 2442 (t.allowClick || 2443 (t.params.preventClicks && e.preventDefault(), 2444 t.params.preventClicksPropagation && 2445 t.animating && 2446 (e.stopPropagation(), e.stopImmediatePropagation()))); 2447 } 2448 function K() { 2449 const e = this, 2450 { wrapperEl: t, rtlTranslate: s, enabled: a } = e; 2451 if (!a) return; 2452 let i; 2453 (e.previousTranslate = e.translate), 2454 e.isHorizontal() 2455 ? (e.translate = -t.scrollLeft) 2456 : (e.translate = -t.scrollTop), 2457 0 === e.translate && (e.translate = 0), 2458 e.updateActiveIndex(), 2459 e.updateSlidesClasses(); 2460 const r = e.maxTranslate() - e.minTranslate(); 2461 (i = 0 === r ? 0 : (e.translate - e.minTranslate()) / r), 2462 i !== e.progress && e.updateProgress(s ? -e.translate : e.translate), 2463 e.emit("setTranslate", e.translate, !1); 2464 } 2465 function Z(e) { 2466 const t = this; 2467 G(t, e.target), 2468 t.params.cssMode || 2469 ("auto" !== t.params.slidesPerView && !t.params.autoHeight) ||
2470 t.update(); 2471 } 2472 function Q() { 2473 const e = this; 2474 e.documentTouchHandlerProceeded || 2475 ((e.documentTouchHandlerProceeded = !0), 2476 e.params.touchReleaseOnEdges && (e.el.style.touchAction = "auto")); 2477 } 2478 const J = (e, t) => { 2479 const s = a(), 2480 { params: i, el: r, wrapperEl: n, device: l } = e, 2481 o = !!i.nested, 2482 d = "on" === t ? "addEventListener" : "removeEventListener", 2483 c = t; 2484 r && 2485 "string" != typeof r && 2486 (s[d]("touchstart", e.onDocumentTouchStart, { passive: !1, capture: o }), 2487 r[d]("touchstart", e.onTouchStart, { passive: !1 }), 2488 r[d]("pointerdown", e.onTouchStart, { passive: !1 }), 2489 s[d]("touchmove", e.onTouchMove, { passive: !1, capture: o }), 2490 s[d]("pointermove", e.onTouchMove, { passive: !1, capture: o }), 2491 s[d]("touchend", e.onTouchEnd, { passive: !0 }), 2492 s[d]("pointerup", e.onTouchEnd, { passive: !0 }), 2493 s[d]("pointercancel", e.onTouchEnd, { passive: !0 }), 2494 s[d]("touchcancel", e.onTouchEnd, { passive: !0 }), 2495 s[d]("pointerout", e.onTouchEnd, { passive: !0 }), 2496 s[d]("pointerleave", e.onTouchEnd, { passive: !0 }), 2497 s[d]("contextmenu", e.onTouchEnd, { passive: !0 }), 2498 (i.preventClicks || i.preventClicksPropagation) && 2499 r[d]("click", e.onClick, !0), 2500 i.cssMode && n[d]("scroll", e.onScroll), 2501 i.updateOnWindowResize 2502 ? e[c]( 2503 l.ios || l.android 2504 ? "resize orientationchange observerUpdate" 2505 : "resize observerUpdate", 2506 j, 2507 !0 2508 ) 2509 : e[c]("observerUpdate", j, !0), 2510 r[d]("load", e.onLoad, { capture: !0 })); 2511 }; 2512 const ee = (e, t) => e.grid && t.grid && t.grid.rows > 1; 2513 var te = { 2514 init: !0, 2515 direction: "horizontal", 2516 oneWayMovement: !1, 2517 swiperElementNodeName: "SWIPER-CONTAINER", 2518 touchEventsTarget: "wrapper", 2519 initialSlide: 0, 2520 speed: 300, 2521 cssMode: !1, 2522 updateOnWindowResize: !0, 2523 resizeObserver: !0, 2524 nested: !1, 2525 createElements: !1, 2526 eventsPrefix: "swiper swipergroup", 2527 enabled: !0, 2528 focusableElements: "input, select, option, textarea, button, video, label", 2529 width: null, 2530 height: null, 2531 preventInteractionOnTransition: !1, 2532 userAgent: null, 2533 url: null, 2534 edgeSwipeDetection: !1, 2535 edgeSwipeThreshold: 20, 2536 autoHeight: !1, 2537 setWrapperSize: !1, 2538 virtualTranslate: !1, 2539 effect: "slide", 2540 breakpoints: void 0, 2541 breakpointsBase: "window", 2542 spaceBetween: 0, 2543 slidesPerView: 1, 2544 slidesPerGroup: 1, 2545 slidesPerGroupSkip: 0, 2546 slidesPerGroupAuto: !1, 2547 centeredSlides: !1, 2548 centeredSlidesBounds: !1, 2549 slidesOffsetBefore: 0, 2550 slidesOffsetAfter: 0, 2551 normalizeSlideIndex: !0, 2552 centerInsufficientSlides: !1, 2553 watchOverflow: !0, 2554 roundLengths: !1, 2555 touchRatio: 1, 2556 touchAngle: 45, 2557 simulateTouch: !0, 2558 shortSwipes: !0, 2559 longSwipes: !0, 2560 longSwipesRatio: 0.5, 2561 longSwipesMs: 300, 2562 followFinger: !0, 2563 allowTouchMove: !0, 2564 threshold: 5, 2565 touchMoveStopPropagation: !1, 2566 touchStartPreventDefault: !0, 2567 touchStartForcePreventDefault: !1, 2568 touchReleaseOnEdges: !1, 2569 uniqueNavElements: !0, 2570 resistance: !0, 2571 resistanceRatio: 0.85, 2572 watchSlidesProgress: !1, 2573 grabCursor: !1, 2574 preventClicks: !0, 2575 preventClicksPropagation: !0, 2576 slideToClickedSlide: !1, 2577 loop: !1, 2578 loopAddBlankSlides: !0, 2579 loopAdditionalSlides: 0, 2580 loopPreventsSliding: !0, 2581 rewind: !1, 2582 allowSlidePrev: !0, 2583 allowSlideNext: !0, 2584 swipeHandler: null, 2585 noSwiping: !0, 2586 noSwipingClass: "swiper-no-swiping", 2587 noSwipingSelector: null, 2588 passiveListeners: !0, 2589 maxBackfaceHiddenSlides: 10, 2590 containerModifierClass: "swiper-", 2591 slideClass: "swiper-slide", 2592 slideBlankClass: "swiper-slide-blank", 2593 slideActiveClass: "swiper-slide-active", 2594 slideVisibleClass: "swiper-slide-visible", 2595 slideFullyVisibleClass: "swiper-slide-fully-visible", 2596 slideNextClass: "swiper-slide-next", 2597 slidePrevClass: "swiper-slide-prev", 2598 wrapperClass: "swiper-wrapper", 2599 lazyPreloaderClass: "swiper-lazy-preloader", 2600 lazyPreloadPrevNext: 0, 2601 runCallbacksOnInit: !0, 2602 _emitClasses: !1, 2603 }; 2604 function se(e, t) { 2605 return function (s) { 2606 void 0 === s && (s = {}); 2607 const a = Object.keys(s)[0], 2608 i = s[a]; 2609 "object" == typeof i && null !== i 2610 ? (!0 === e[a] && (e[a] = { enabled: !0 }), 2611 "navigation" === a && 2612 e[a] && 2613 e[a].enabled && 2614 !e[a].prevEl && 2615 !e[a].nextEl && 2616 (e[a].auto = !0), 2617 ["pagination", "scrollbar"].indexOf(a) >= 0 && 2618 e[a] && 2619 e[a].enabled && 2620 !e[a].el && 2621 (e[a].auto = !0), 2622 a in e && "enabled" in i 2623 ? ("object" != typeof e[a] || 2624 "enabled" in e[a] || 2625 (e[a].enabled = !0), 2626 e[a] || (e[a] = { enabled: !1 }), 2627 p(t, s)) 2628 : p(t, s)) 2629 : p(t, s); 2630 }; 2631 } 2632 const ae = { 2633 eventsEmitter: k, 2634 update: B, 2635 translate: H, 2636 transition: { 2637 setTransition: function (e, t) { 2638 const s = this; 2639 s.params.cssMode || 2640 ((s.wrapperEl.style.transitionDuration = `${e}ms`), 2641 (s.wrapperEl.style.transitionDelay = 0 === e ? "0ms" : "")), 2642 s.emit("setTransition", e, t); 2643 }, 2644 transitionStart: function (e, t) { 2645 void 0 === e && (e = !0); 2646 const s = this, 2647 { params: a } = s; 2648 a.cssMode || 2649 (a.autoHeight && s.updateAutoHeight(), 2650 N({ swiper: s, runCallbacks: e, direction: t, step: "Start" })); 2651 }, 2652 transitionEnd: function (e, t) { 2653 void 0 === e && (e = !0); 2654 const s = this, 2655 { params: a } = s; 2656 (s.animating = !1), 2657 a.cssMode || 2658 (s.setTransition(0), 2659 N({ swiper: s, runCallbacks: e, direction: t, step: "End" })); 2660 }, 2661 }, 2662 slide: R, 2663 loop: _, 2664 grabCursor: { 2665 setGrabCursor: function (e) { 2666 const t = this; 2667 if ( 2668 !t.params.simulateTouch || 2669 (t.params.watchOverflow && t.isLocked) || 2670 t.params.cssMode 2671 ) 2672 return; 2673 const s = 2674 "container" === t.params.touchEventsTarget ? t.el : t.wrapperEl; 2675 t.isElement && (t.__preventObserver__ = !0), 2676 (s.style.cursor = "move"), 2677 (s.style.cursor = e ? "grabbing" : "grab"), 2678 t.isElement && 2679 requestAnimationFrame(() => { 2680 t.__preventObserver__ = !1; 2681 }); 2682 }, 2683 unsetGrabCursor: function () { 2684 const e = this; 2685 (e.params.watchOverflow && e.isLocked) || 2686 e.params.cssMode || 2687 (e.isElement && (e.__preventObserver__ = !0), 2688 (e[ 2689 "container" === e.params.touchEventsTarget ? "el" : "wrapperEl" 2690 ].style.cursor = ""), 2691 e.isElement && 2692 requestAnimationFrame(() => { 2693 e.__preventObserver__ = !1; 2694 })); 2695 }, 2696 }, 2697 events: { 2698 attachEvents: function () { 2699 const e = this, 2700 { params: t } = e; 2701 (e.onTouchStart = F.bind(e)), 2702 (e.onTouchMove = V.bind(e)), 2703 (e.onTouchEnd = W.bind(e)), 2704 (e.onDocumentTouchStart = Q.bind(e)), 2705 t.cssMode && (e.onScroll = K.bind(e)), 2706 (e.onClick = U.bind(e)), 2707 (e.onLoad = Z.bind(e)), 2708 J(e, "on"); 2709 }, 2710 detachEvents: function () { 2711 J(this, "off"); 2712 }, 2713 }, 2714 breakpoints: { 2715 setBreakpoint: function () { 2716 const e = this, 2717 { realIndex: t, initialized: s, params: i, el: r } = e, 2718 n = i.breakpoints; 2719 if (!n || (n && 0 === Object.keys(n).length)) return; 2720 const l = a(), 2721 o = 2722 "window" !== i.breakpointsBase && i.breakpointsBase 2723 ? "container" 2724 : i.breakpointsBase, 2725 d = 2726 ["window", "container"].includes(i.breakpointsBase) || 2727 !i.breakpointsBase 2728 ? e.el 2729 : l.querySelector(i.breakpointsBase),
2730 c = e.getBreakpoint(n, o, d); 2731 if (!c || e.currentBreakpoint === c) return; 2732 const u = (c in n ? n[c] : void 0) || e.originalParams, 2733 m = ee(e, i), 2734 h = ee(e, u), 2735 f = e.params.grabCursor, 2736 g = u.grabCursor, 2737 v = i.enabled; 2738 m && !h 2739 ? (r.classList.remove( 2740 `${i.containerModifierClass}grid`, 2741 `${i.containerModifierClass}grid-column` 2742 ), 2743 e.emitContainerClasses()) 2744 : !m && 2745 h && 2746 (r.classList.add(`${i.containerModifierClass}grid`), 2747 ((u.grid.fill && "column" === u.grid.fill) || 2748 (!u.grid.fill && "column" === i.grid.fill)) && 2749 r.classList.add(`${i.containerModifierClass}grid-column`), 2750 e.emitContainerClasses()), 2751 f && !g ? e.unsetGrabCursor() : !f && g && e.setGrabCursor(), 2752 ["navigation", "pagination", "scrollbar"].forEach((t) => { 2753 if (void 0 === u[t]) return; 2754 const s = i[t] && i[t].enabled, 2755 a = u[t] && u[t].enabled; 2756 s && !a && e[t].disable(), !s && a && e[t].enable(); 2757 }); 2758 const w = u.direction && u.direction !== i.direction, 2759 b = i.loop && (u.slidesPerView !== i.slidesPerView || w), 2760 y = i.loop; 2761 w && s && e.changeDirection(), p(e.params, u); 2762 const E = e.params.enabled, 2763 x = e.params.loop; 2764 Object.assign(e, { 2765 allowTouchMove: e.params.allowTouchMove, 2766 allowSlideNext: e.params.allowSlideNext, 2767 allowSlidePrev: e.params.allowSlidePrev, 2768 }), 2769 v && !E ? e.disable() : !v && E && e.enable(), 2770 (e.currentBreakpoint = c), 2771 e.emit("_beforeBreakpoint", u), 2772 s && 2773 (b 2774 ? (e.loopDestroy(), e.loopCreate(t), e.updateSlides()) 2775 : !y && x 2776 ? (e.loopCreate(t), e.updateSlides()) 2777 : y && !x && e.loopDestroy()), 2778 e.emit("breakpoint", u); 2779 }, 2780 getBreakpoint: function (e, t, s) { 2781 if ((void 0 === t && (t = "window"), !e || ("container" === t && !s))) 2782 return; 2783 let a = !1; 2784 const i = r(), 2785 n = "window" === t ? i.innerHeight : s.clientHeight, 2786 l = Object.keys(e).map((e) => { 2787 if ("string" == typeof e && 0 === e.indexOf("@")) { 2788 const t = parseFloat(e.substr(1)); 2789 return { value: n * t, point: e }; 2790 } 2791 return { value: e, point: e }; 2792 }); 2793 l.sort((e, t) => parseInt(e.value, 10) - parseInt(t.value, 10)); 2794 for (let e = 0; e < l.length; e += 1) { 2795 const { point: r, value: n } = l[e]; 2796 "window" === t 2797 ? i.matchMedia(`(min-width: ${n}px)`).matches && (a = r) 2798 : n <= s.clientWidth && (a = r); 2799 } 2800 return a || "max"; 2801 }, 2802 }, 2803 checkOverflow: { 2804 checkOverflow: function () { 2805 const e = this, 2806 { isLocked: t, params: s } = e, 2807 { slidesOffsetBefore: a } = s; 2808 if (a) { 2809 const t = e.slides.length - 1, 2810 s = e.slidesGrid[t] + e.slidesSizesGrid[t] + 2 * a; 2811 e.isLocked = e.size > s; 2812 } else e.isLocked = 1 === e.snapGrid.length; 2813 !0 === s.allowSlideNext && (e.allowSlideNext = !e.isLocked), 2814 !0 === s.allowSlidePrev && (e.allowSlidePrev = !e.isLocked), 2815 t && t !== e.isLocked && (e.isEnd = !1), 2816 t !== e.isLocked && e.emit(e.isLocked ? "lock" : "unlock"); 2817 }, 2818 }, 2819 classes: { 2820 addClasses: function () { 2821 const e = this, 2822 { classNames: t, params: s, rtl: a, el: i, device: r } = e, 2823 n = (function (e, t) { 2824 const s = []; 2825 return ( 2826 e.forEach((e) => { 2827 "object" == typeof e 2828 ? Object.keys(e).forEach((a) => { 2829 e[a] && s.push(t + a); 2830 }) 2831 : "string" == typeof e && s.push(t + e); 2832 }), 2833 s 2834 ); 2835 })( 2836 [ 2837 "initialized", 2838 s.direction, 2839 { "free-mode": e.params.freeMode && s.freeMode.enabled }, 2840 { autoheight: s.autoHeight }, 2841 { rtl: a }, 2842 { grid: s.grid && s.grid.rows > 1 }, 2843 { 2844 "grid-column": 2845 s.grid && s.grid.rows > 1 && "column" === s.grid.fill, 2846 }, 2847 { android: r.android }, 2848 { ios: r.ios }, 2849 { "css-mode": s.cssMode }, 2850 { centered: s.cssMode && s.centeredSlides }, 2851 { "watch-progress": s.watchSlidesProgress }, 2852 ], 2853 s.containerModifierClass 2854 ); 2855 t.push(...n), i.classList.add(...t), e.emitContainerClasses(); 2856 }, 2857 removeClasses: function () { 2858 const { el: e, classNames: t } = this; 2859 e && 2860 "string" != typeof e && 2861 (e.classList.remove(...t), this.emitContainerClasses()); 2862 }, 2863 }, 2864 }, 2865 ie = {}; 2866 class re { 2867 constructor() { 2868 let e, t; 2869 for (var s = arguments.length, i = new Array(s), r = 0; r < s; r++) 2870 i[r] = arguments[r]; 2871 1 === i.length && 2872 i[0].constructor && 2873 "Object" === Object.prototype.toString.call(i[0]).slice(8, -1) 2874 ? (t = i[0]) 2875 : ([e, t] = i), 2876 t || (t = {}), 2877 (t = p({}, t)), 2878 e && !t.el && (t.el = e); 2879 const n = a(); 2880 if ( 2881 t.el && 2882 "string" == typeof t.el && 2883 n.querySelectorAll(t.el).length > 1 2884 ) { 2885 const e = []; 2886 return ( 2887 n.querySelectorAll(t.el).forEach((s) => { 2888 const a = p({}, t, { el: s }); 2889 e.push(new re(a)); 2890 }), 2891 e 2892 ); 2893 } 2894 const l = this; 2895 (l.__swiper__ = !0), 2896 (l.support = z()), 2897 (l.device = A({ userAgent: t.userAgent })), 2898 (l.browser = $()), 2899 (l.eventsListeners = {}), 2900 (l.eventsAnyListeners = []), 2901 (l.modules = [...l.__modules__]), 2902 t.modules && Array.isArray(t.modules) && l.modules.push(...t.modules); 2903 const o = {};
2904 l.modules.forEach((e) => { 2905 e({ 2906 params: t, 2907 swiper: l, 2908 extendParams: se(t, o), 2909 on: l.on.bind(l), 2910 once: l.once.bind(l), 2911 off: l.off.bind(l), 2912 emit: l.emit.bind(l), 2913 }); 2914 }); 2915 const d = p({}, te, o); 2916 return ( 2917 (l.params = p({}, d, ie, t)), 2918 (l.originalParams = p({}, l.params)), 2919 (l.passedParams = p({}, t)), 2920 l.params && 2921 l.params.on && 2922 Object.keys(l.params.on).forEach((e) => { 2923 l.on(e, l.params.on[e]); 2924 }), 2925 l.params && l.params.onAny && l.onAny(l.params.onAny), 2926 Object.assign(l, { 2927 enabled: l.params.enabled, 2928 el: e, 2929 classNames: [], 2930 slides: [], 2931 slidesGrid: [], 2932 snapGrid: [], 2933 slidesSizesGrid: [], 2934 isHorizontal: () => "horizontal" === l.params.direction, 2935 isVertical: () => "vertical" === l.params.direction, 2936 activeIndex: 0, 2937 realIndex: 0, 2938 isBeginning: !0, 2939 isEnd: !1, 2940 translate: 0, 2941 previousTranslate: 0, 2942 progress: 0, 2943 velocity: 0, 2944 animating: !1, 2945 cssOverflowAdjustment() { 2946 return Math.trunc(this.translate / 2 ** 23) * 2 ** 23; 2947 }, 2948 allowSlideNext: l.params.allowSlideNext, 2949 allowSlidePrev: l.params.allowSlidePrev, 2950 touchEventsData: { 2951 isTouched: void 0, 2952 isMoved: void 0, 2953 allowTouchCallbacks: void 0, 2954 touchStartTime: void 0, 2955 isScrolling: void 0, 2956 currentTranslate: void 0, 2957 startTranslate: void 0, 2958 allowThresholdMove: void 0, 2959 focusableElements: l.params.focusableElements, 2960 lastClickTime: 0, 2961 clickTimeout: void 0, 2962 velocities: [], 2963 allowMomentumBounce: void 0, 2964 startMoving: void 0, 2965 pointerId: null, 2966 touchId: null, 2967 }, 2968 allowClick: !0, 2969 allowTouchMove: l.params.allowTouchMove, 2970 touches: { startX: 0, startY: 0, currentX: 0, currentY: 0, diff: 0 }, 2971 imagesToLoad: [], 2972 imagesLoaded: 0, 2973 }), 2974 l.emit("_swiper"), 2975 l.params.init && l.init(), 2976 l 2977 ); 2978 } 2979 getDirectionLabel(e) { 2980 return this.isHorizontal() 2981 ? e 2982 : { 2983 width: "height", 2984 "margin-top": "margin-left", 2985 "margin-bottom ": "margin-right", 2986 "margin-left": "margin-top", 2987 "margin-right": "margin-bottom", 2988 "padding-left": "padding-top", 2989 "padding-right": "padding-bottom", 2990 marginRight: "marginBottom", 2991 }[e]; 2992 } 2993 getSlideIndex(e) { 2994 const { slidesEl: t, params: s } = this, 2995 a = y(f(t, `.${s.slideClass}, swiper-slide`)[0]); 2996 return y(e) - a; 2997 } 2998 getSlideIndexByData(e) { 2999 return this.getSlideIndex( 3000 this.slides.find( 3001 (t) => 1 * t.getAttribute("data-swiper-slide-index") === e 3002 ) 3003 ); 3004 } 3005 recalcSlides() { 3006 const { slidesEl: e, params: t } = this; 3007 this.slides = f(e, `.${t.slideClass}, swiper-slide`); 3008 } 3009 enable() { 3010 const e = this; 3011 e.enabled || 3012 ((e.enabled = !0), 3013 e.params.grabCursor && e.setGrabCursor(), 3014 e.emit("enable")); 3015 } 3016 disable() { 3017 const e = this; 3018 e.enabled && 3019 ((e.enabled = !1), 3020 e.params.grabCursor && e.unsetGrabCursor(), 3021 e.emit("disable")); 3022 } 3023 setProgress(e, t) { 3024 const s = this; 3025 e = Math.min(Math.max(e, 0), 1); 3026 const a = s.minTranslate(), 3027 i = (s.maxTranslate() - a) * e + a; 3028 s.translateTo(i, void 0 === t ? 0 : t), 3029 s.updateActiveIndex(), 3030 s.updateSlidesClasses(); 3031 } 3032 emitContainerClasses() { 3033 const e = this; 3034 if (!e.params._emitClasses || !e.el) return; 3035 const t = e.el.className 3036 .split(" ") 3037 .filter( 3038 (t) => 3039 0 === t.indexOf("swiper swipergroup") || 3040 0 === t.indexOf(e.params.containerModifierClass) 3041 ); 3042 e.emit("_containerClasses", t.join(" ")); 3043 } 3044 getSlideClasses(e) { 3045 const t = this; 3046 return t.destroyed 3047 ? "" 3048 : e.className 3049 .split(" ") 3050 .filter( 3051 (e) => 3052 0 === e.indexOf("swiper-slide") || 3053 0 === e.indexOf(t.params.slideClass) 3054 ) 3055 .join(" "); 3056 } 3057 emitSlidesClasses() { 3058 const e = this; 3059 if (!e.params._emitClasses || !e.el) return; 3060 const t = [];
3061 e.slides.forEach((s) => { 3062 const a = e.getSlideClasses(s); 3063 t.push({ slideEl: s, classNames: a }), e.emit("_slideClass", s, a); 3064 }), 3065 e.emit("_slideClasses", t); 3066 } 3067 slidesPerViewDynamic(e, t) { 3068 void 0 === e && (e = "current"), void 0 === t && (t = !1); 3069 const { 3070 params: s, 3071 slides: a, 3072 slidesGrid: i, 3073 slidesSizesGrid: r, 3074 size: n, 3075 activeIndex: l, 3076 } = this; 3077 let o = 1; 3078 if ("number" == typeof s.slidesPerView) return s.slidesPerView; 3079 if (s.centeredSlides) { 3080 let e, 3081 t = a[l] ? Math.ceil(a[l].swiperSlideSize) : 0; 3082 for (let s = l + 1; s < a.length; s += 1) 3083 a[s] && 3084 !e && 3085 ((t += Math.ceil(a[s].swiperSlideSize)), 3086 (o += 1), 3087 t > n && (e = !0)); 3088 for (let s = l - 1; s >= 0; s -= 1) 3089 a[s] && 3090 !e && 3091 ((t += a[s].swiperSlideSize), (o += 1), t > n && (e = !0)); 3092 } else if ("current" === e) 3093 for (let e = l + 1; e < a.length; e += 1) { 3094 (t ? i[e] + r[e] - i[l] < n : i[e] - i[l] < n) && (o += 1); 3095 } 3096 else 3097 for (let e = l - 1; e >= 0; e -= 1) { 3098 i[l] - i[e] < n && (o += 1); 3099 } 3100 return o; 3101 } 3102 update() { 3103 const e = this; 3104 if (!e || e.destroyed) return; 3105 const { snapGrid: t, params: s } = e; 3106 function a() { 3107 const t = e.rtlTranslate ? -1 * e.translate : e.translate, 3108 s = Math.min(Math.max(t, e.maxTranslate()), e.minTranslate()); 3109 e.setTranslate(s), e.updateActiveIndex(), e.updateSlidesClasses(); 3110 } 3111 let i; 3112 if ( 3113 (s.breakpoints && e.setBreakpoint(), 3114 [...e.el.querySelectorAll('[loading="lazy"]')].forEach((t) => { 3115 t.complete && G(e, t); 3116 }), 3117 e.updateSize(), 3118 e.updateSlides(), 3119 e.updateProgress(), 3120 e.updateSlidesClasses(), 3121 s.freeMode && s.freeMode.enabled && !s.cssMode) 3122 ) 3123 a(), s.autoHeight && e.updateAutoHeight(); 3124 else { 3125 if ( 3126 ("auto" === s.slidesPerView || s.slidesPerView > 1) && 3127 e.isEnd && 3128 !s.centeredSlides 3129 ) { 3130 const t = 3131 e.virtual && s.virtual.enabled ? e.virtual.slides : e.slides; 3132 i = e.slideTo(t.length - 1, 0, !1, !0); 3133 } else i = e.slideTo(e.activeIndex, 0, !1, !0); 3134 i || a(); 3135 } 3136 s.watchOverflow && t !== e.snapGrid && e.checkOverflow(), 3137 e.emit("update"); 3138 } 3139 changeDirection(e, t) { 3140 void 0 === t && (t = !0); 3141 const s = this, 3142 a = s.params.direction; 3143 return ( 3144 e || (e = "horizontal" === a ? "vertical" : "horizontal"), 3145 e === a || 3146 ("horizontal" !== e && "vertical" !== e) || 3147 (s.el.classList.remove(`${s.params.containerModifierClass}${a}`), 3148 s.el.classList.add(`${s.params.containerModifierClass}${e}`), 3149 s.emitContainerClasses(), 3150 (s.params.direction = e), 3151 s.slides.forEach((t) => { 3152 "vertical" === e ? (t.style.width = "") : (t.style.height = ""); 3153 }), 3154 s.emit("changeDirection"), 3155 t && s.update()), 3156 s 3157 ); 3158 } 3159 changeLanguageDirection(e) { 3160 const t = this; 3161 (t.rtl && "rtl" === e) || 3162 (!t.rtl && "ltr" === e) || 3163 ((t.rtl = "rtl" === e), 3164 (t.rtlTranslate = "horizontal" === t.params.direction && t.rtl), 3165 t.rtl 3166 ? (t.el.classList.add(`${t.params.containerModifierClass}rtl`), 3167 (t.el.dir = "rtl")) 3168 : (t.el.classList.remove(`${t.params.containerModifierClass}rtl`), 3169 (t.el.dir = "ltr")), 3170 t.update()); 3171 } 3172 mount(e) { 3173 const t = this; 3174 if (t.mounted) return !0; 3175 let s = e || t.params.el; 3176 if (("string" == typeof s && (s = document.querySelector(s)), !s)) 3177 return !1; 3178 (s.swiper = t), 3179 s.parentNode && 3180 s.parentNode.host && 3181 s.parentNode.host.nodeName === 3182 t.params.swiperElementNodeName.toUpperCase() && 3183 (t.isElement = !0); 3184 const a = () => 3185 `.${(t.params.wrapperClass || "").trim().split(" ").join(".")}`; 3186 let i = (() => { 3187 if (s && s.shadowRoot && s.shadowRoot.querySelector) { 3188 return s.shadowRoot.querySelector(a()); 3189 } 3190 return f(s, a())[0]; 3191 })(); 3192 return ( 3193 !i && 3194 t.params.createElements && 3195 ((i = v("div", t.params.wrapperClass)), 3196 s.append(i), 3197 f(s, `.${t.params.slideClass}`).forEach((e) => { 3198 i.append(e); 3199 })), 3200 Object.assign(t, { 3201 el: s, 3202 wrapperEl: i, 3203 slidesEl: 3204 t.isElement && !s.parentNode.host.slideSlots 3205 ? s.parentNode.host 3206 : i, 3207 hostEl: t.isElement ? s.parentNode.host : s, 3208 mounted: !0, 3209 rtl: "rtl" === s.dir.toLowerCase() || "rtl" === b(s, "direction"), 3210 rtlTranslate: 3211 "horizontal" === t.params.direction && 3212 ("rtl" === s.dir.toLowerCase() || "rtl" === b(s, "direction")), 3213 wrongRTL: "-webkit-box" === b(i, "display"), 3214 }), 3215 !0 3216 ); 3217 } 3218 init(e) { 3219 const t = this; 3220 if (t.initialized) return t; 3221 if (!1 === t.mount(e)) return t; 3222 t.emit("beforeInit"), 3223 t.params.breakpoints && t.setBreakpoint(), 3224 t.addClasses(), 3225 t.updateSize(), 3226 t.updateSlides(), 3227 t.params.watchOverflow && t.checkOverflow(),
3228 t.params.grabCursor && t.enabled && t.setGrabCursor(), 3229 t.params.loop && t.virtual && t.params.virtual.enabled 3230 ? t.slideTo( 3231 t.params.initialSlide + t.virtual.slidesBefore, 3232 0, 3233 t.params.runCallbacksOnInit, 3234 !1, 3235 !0 3236 ) 3237 : t.slideTo( 3238 t.params.initialSlide, 3239 0, 3240 t.params.runCallbacksOnInit, 3241 !1, 3242 !0 3243 ), 3244 t.params.loop && t.loopCreate(void 0, !0), 3245 t.attachEvents(); 3246 const s = [...t.el.querySelectorAll('[loading="lazy"]')]; 3247 return ( 3248 t.isElement && s.push(...t.hostEl.querySelectorAll('[loading="lazy"]')), 3249 s.forEach((e) => { 3250 e.complete 3251 ? G(t, e) 3252 : e.addEventListener("load", (e) => { 3253 G(t, e.target); 3254 }); 3255 }), 3256 Y(t), 3257 (t.initialized = !0), 3258 Y(t), 3259 t.emit("init"), 3260 t.emit("afterInit"), 3261 t 3262 ); 3263 } 3264 destroy(e, t) { 3265 void 0 === e && (e = !0), void 0 === t && (t = !0); 3266 const s = this, 3267 { params: a, el: i, wrapperEl: r, slides: n } = s; 3268 return ( 3269 void 0 === s.params || 3270 s.destroyed || 3271 (s.emit("beforeDestroy"), 3272 (s.initialized = !1), 3273 s.detachEvents(), 3274 a.loop && s.loopDestroy(), 3275 t && 3276 (s.removeClasses(), 3277 i && "string" != typeof i && i.removeAttribute("style"), 3278 r && r.removeAttribute("style"), 3279 n && 3280 n.length && 3281 n.forEach((e) => { 3282 e.classList.remove( 3283 a.slideVisibleClass, 3284 a.slideFullyVisibleClass, 3285 a.slideActiveClass, 3286 a.slideNextClass, 3287 a.slidePrevClass 3288 ), 3289 e.removeAttribute("style"), 3290 e.removeAttribute("data-swiper-slide-index"); 3291 })), 3292 s.emit("destroy"), 3293 Object.keys(s.eventsListeners).forEach((e) => { 3294 s.off(e); 3295 }), 3296 !1 !== e && 3297 (s.el && "string" != typeof s.el && (s.el.swiper = null), 3298 (function (e) { 3299 const t = e; 3300 Object.keys(t).forEach((e) => { 3301 try { 3302 t[e] = null; 3303 } catch (e) {} 3304 try { 3305 delete t[e]; 3306 } catch (e) {} 3307 }); 3308 })(s)), 3309 (s.destroyed = !0)), 3310 null 3311 ); 3312 } 3313 static extendDefaults(e) { 3314 p(ie, e); 3315 } 3316 static get extendedDefaults() { 3317 return ie; 3318 } 3319 static get defaults() { 3320 return te; 3321 } 3322 static installModule(e) { 3323 re.prototype.__modules__ || (re.prototype.__modules__ = []); 3324 const t = re.prototype.__modules__; 3325 "function" == typeof e && t.indexOf(e) < 0 && t.push(e); 3326 } 3327 static use(e) { 3328 return Array.isArray(e) 3329 ? (e.forEach((e) => re.installModule(e)), re) 3330 : (re.installModule(e), re); 3331 } 3332 } 3333 function ne(e, t, s, a) { 3334 return ( 3335 e.params.createElements && 3336 Object.keys(a).forEach((i) => { 3337 if (!s[i] && !0 === s.auto) { 3338 let r = f(e.el, `.${a[i]}`)[0]; 3339 r || ((r = v("div", a[i])), (r.className = a[i]), e.el.append(r)), 3340 (s[i] = r), 3341 (t[i] = r); 3342 } 3343 }), 3344 s 3345 ); 3346 } 3347 function le(e) { 3348 return ( 3349 void 0 === e && (e = ""), 3350 `.${e 3351 .trim() 3352 .replace(/([\.:!+\/])/g, "\\$1") 3353 .replace(/ /g, ".")}` 3354 ); 3355 } 3356 function oe(e) { 3357 const t = this, 3358 { params: s, slidesEl: a } = t; 3359 s.loop && t.loopDestroy(); 3360 const i = (e) => { 3361 if ("string" == typeof e) { 3362 const t = document.createElement("div"); 3363 C(t, e), a.append(t.children[0]), C(t, ""); 3364 } else a.append(e); 3365 }; 3366 if ("object" == typeof e && "length" in e) 3367 for (let t = 0; t < e.length; t += 1) e[t] && i(e[t]); 3368 else i(e); 3369 t.recalcSlides(), 3370 s.loop && t.loopCreate(),
3371 (s.observer && !t.isElement) || t.update(); 3372 } 3373 function de(e) { 3374 const t = this, 3375 { params: s, activeIndex: a, slidesEl: i } = t; 3376 s.loop && t.loopDestroy(); 3377 let r = a + 1; 3378 const n = (e) => { 3379 if ("string" == typeof e) { 3380 const t = document.createElement("div"); 3381 C(t, e), i.prepend(t.children[0]), C(t, ""); 3382 } else i.prepend(e); 3383 }; 3384 if ("object" == typeof e && "length" in e) { 3385 for (let t = 0; t < e.length; t += 1) e[t] && n(e[t]); 3386 r = a + e.length; 3387 } else n(e); 3388 t.recalcSlides(), 3389 s.loop && t.loopCreate(), 3390 (s.observer && !t.isElement) || t.update(), 3391 t.slideTo(r, 0, !1); 3392 } 3393 function ce(e, t) { 3394 const s = this, 3395 { params: a, activeIndex: i, slidesEl: r } = s; 3396 let n = i; 3397 a.loop && ((n -= s.loopedSlides), s.loopDestroy(), s.recalcSlides()); 3398 const l = s.slides.length; 3399 if (e <= 0) return void s.prependSlide(t); 3400 if (e >= l) return void s.appendSlide(t); 3401 let o = n > e ? n + 1 : n; 3402 const d = []; 3403 for (let t = l - 1; t >= e; t -= 1) { 3404 const e = s.slides[t]; 3405 e.remove(), d.unshift(e); 3406 } 3407 if ("object" == typeof t && "length" in t) { 3408 for (let e = 0; e < t.length; e += 1) t[e] && r.append(t[e]); 3409 o = n > e ? n + t.length : n; 3410 } else r.append(t); 3411 for (let e = 0; e < d.length; e += 1) r.append(d[e]); 3412 s.recalcSlides(), 3413 a.loop && s.loopCreate(), 3414 (a.observer && !s.isElement) || s.update(), 3415 a.loop ? s.slideTo(o + s.loopedSlides, 0, !1) : s.slideTo(o, 0, !1); 3416 } 3417 function pe(e) { 3418 const t = this, 3419 { params: s, activeIndex: a } = t; 3420 let i = a; 3421 s.loop && ((i -= t.loopedSlides), t.loopDestroy()); 3422 let r, 3423 n = i; 3424 if ("object" == typeof e && "length" in e) { 3425 for (let s = 0; s < e.length; s += 1) 3426 (r = e[s]), t.slides[r] && t.slides[r].remove(), r < n && (n -= 1); 3427 n = Math.max(n, 0); 3428 } else 3429 (r = e), 3430 t.slides[r] && t.slides[r].remove(), 3431 r < n && (n -= 1), 3432 (n = Math.max(n, 0)); 3433 t.recalcSlides(), 3434 s.loop && t.loopCreate(), 3435 (s.observer && !t.isElement) || t.update(), 3436 s.loop ? t.slideTo(n + t.loopedSlides, 0, !1) : t.slideTo(n, 0, !1); 3437 } 3438 function ue() { 3439 const e = this, 3440 t = []; 3441 for (let s = 0; s < e.slides.length; s += 1) t.push(s); 3442 e.removeSlide(t); 3443 } 3444 function me(e) { 3445 const { 3446 effect: t, 3447 swiper: s, 3448 on: a, 3449 setTranslate: i, 3450 setTransition: r, 3451 overwriteParams: n, 3452 perspective: l, 3453 recreateShadows: o, 3454 getEffectParams: d, 3455 } = e;
3456 let c; 3457 a("beforeInit", () => { 3458 if (s.params.effect !== t) return; 3459 s.classNames.push(`${s.params.containerModifierClass}${t}`), 3460 l && l() && s.classNames.push(`${s.params.containerModifierClass}3d`); 3461 const e = n ? n() : {}; 3462 Object.assign(s.params, e), Object.assign(s.originalParams, e); 3463 }), 3464 a("setTranslate _virtualUpdated", () => { 3465 s.params.effect === t && i(); 3466 }), 3467 a("setTransition", (e, a) => { 3468 s.params.effect === t && r(a); 3469 }), 3470 a("transitionEnd", () => { 3471 if (s.params.effect === t && o) { 3472 if (!d || !d().slideShadows) return; 3473 s.slides.forEach((e) => { 3474 e.querySelectorAll( 3475 ".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left" 3476 ).forEach((e) => e.remove()); 3477 }), 3478 o(); 3479 } 3480 }), 3481 a("virtualUpdate", () => { 3482 s.params.effect === t && 3483 (s.slides.length || (c = !0), 3484 requestAnimationFrame(() => { 3485 c && s.slides && s.slides.length && (i(), (c = !1)); 3486 })); 3487 }); 3488 } 3489 function he(e, t) { 3490 const s = h(t); 3491 return ( 3492 s !== t && 3493 ((s.style.backfaceVisibility = "hidden"), 3494 (s.style["-webkit-backface-visibility"] = "hidden")), 3495 s 3496 ); 3497 } 3498 function fe(e) { 3499 let { swiper: t, duration: s, transformElements: a, allSlides: i } = e; 3500 const { activeIndex: r } = t; 3501 if (t.params.virtualTranslate && 0 !== s) { 3502 let e, 3503 s = !1; 3504 (e = i 3505 ? a 3506 : a.filter((e) => { 3507 const s = e.classList.contains("swiper-slide-transform") 3508 ? ((e) => { 3509 if (!e.parentElement) 3510 return t.slides.find( 3511 (t) => t.shadowRoot && t.shadowRoot === e.parentNode 3512 ); 3513 return e.parentElement; 3514 })(e) 3515 : e; 3516 return t.getSlideIndex(s) === r; 3517 })), 3518 e.forEach((e) => { 3519 x(e, () => { 3520 if (s) return; 3521 if (!t || t.destroyed) return; 3522 (s = !0), (t.animating = !1); 3523 const e = new window.CustomEvent("transitionend", { 3524 bubbles: !0, 3525 cancelable: !0, 3526 }); 3527 t.wrapperEl.dispatchEvent(e); 3528 }); 3529 }); 3530 } 3531 } 3532 function ge(e, t, s) { 3533 const a = `swiper-slide-shadow${s ? `-${s}` : ""}${ 3534 e ? ` swiper-slide-shadow-${e}` : "" 3535 }`, 3536 i = h(t); 3537 let r = i.querySelector(`.${a.split(" ").join(".")}`); 3538 return r || ((r = v("div", a.split(" "))), i.append(r)), r; 3539 } 3540 Object.keys(ae).forEach((e) => {
3541 Object.keys(ae[e]).forEach((t) => { 3542 re.prototype[t] = ae[e][t]; 3543 }); 3544 }), 3545 re.use([ 3546 function (e) { 3547 let { swiper: t, on: s, emit: a } = e; 3548 const i = r(); 3549 let n = null, 3550 l = null; 3551 const o = () => { 3552 t && 3553 !t.destroyed && 3554 t.initialized && 3555 (a("beforeResize"), a("resize")); 3556 }, 3557 d = () => { 3558 t && !t.destroyed && t.initialized && a("orientationchange"); 3559 }; 3560 s("init", () => { 3561 t.params.resizeObserver && void 0 !== i.ResizeObserver 3562 ? t && 3563 !t.destroyed && 3564 t.initialized && 3565 ((n = new ResizeObserver((e) => { 3566 l = i.requestAnimationFrame(() => { 3567 const { width: s, height: a } = t; 3568 let i = s, 3569 r = a; 3570 e.forEach((e) => { 3571 let { contentBoxSize: s, contentRect: a, target: n } = e; 3572 (n && n !== t.el) || 3573 ((i = a ? a.width : (s[0] || s).inlineSize), 3574 (r = a ? a.height : (s[0] || s).blockSize)); 3575 }), 3576 (i === s && r === a) || o(); 3577 }); 3578 })), 3579 n.observe(t.el)) 3580 : (i.addEventListener("resize", o), 3581 i.addEventListener("orientationchange", d)); 3582 }), 3583 s("destroy", () => { 3584 l && i.cancelAnimationFrame(l), 3585 n && n.unobserve && t.el && (n.unobserve(t.el), (n = null)), 3586 i.removeEventListener("resize", o), 3587 i.removeEventListener("orientationchange", d); 3588 }); 3589 }, 3590 function (e) { 3591 let { swiper: t, extendParams: s, on: a, emit: i } = e; 3592 const n = [], 3593 l = r(), 3594 o = function (e, s) { 3595 void 0 === s && (s = {}); 3596 const a = new (l.MutationObserver || l.WebkitMutationObserver)( 3597 (e) => { 3598 if (t.__preventObserver__) return; 3599 if (1 === e.length) return void i("observerUpdate", e[0]); 3600 const s = function () { 3601 i("observerUpdate", e[0]); 3602 }; 3603 l.requestAnimationFrame 3604 ? l.requestAnimationFrame(s) 3605 : l.setTimeout(s, 0); 3606 } 3607 ); 3608 a.observe(e, { 3609 attributes: void 0 === s.attributes || s.attributes, 3610 childList: t.isElement || (void 0 === s.childList || s).childList, 3611 characterData: void 0 === s.characterData || s.characterData, 3612 }), 3613 n.push(a); 3614 }; 3615 s({ observer: !1, observeParents: !1, observeSlideChildren: !1 }), 3616 a("init", () => { 3617 if (t.params.observer) { 3618 if (t.params.observeParents) { 3619 const e = E(t.hostEl); 3620 for (let t = 0; t < e.length; t += 1) o(e[t]); 3621 } 3622 o(t.hostEl, { childList: t.params.observeSlideChildren }), 3623 o(t.wrapperEl, { attributes: !1 }); 3624 } 3625 }), 3626 a("destroy", () => { 3627 n.forEach((e) => { 3628 e.disconnect(); 3629 }), 3630 n.splice(0, n.length); 3631 }); 3632 }, 3633 ]); 3634 const ve = [ 3635 function (e) { 3636 let t, 3637 { swiper: s, extendParams: i, on: r, emit: n } = e; 3638 i({ 3639 virtual: { 3640 enabled: !1, 3641 slides: [], 3642 cache: !0, 3643 renderSlide: null, 3644 renderExternal: null, 3645 renderExternalUpdate: !0, 3646 addSlidesBefore: 0, 3647 addSlidesAfter: 0, 3648 }, 3649 }); 3650 const l = a(); 3651 s.virtual = { 3652 cache: {}, 3653 from: void 0, 3654 to: void 0, 3655 slides: [], 3656 offset: 0, 3657 slidesGrid: [], 3658 }; 3659 const o = l.createElement("div"); 3660 function d(e, t) { 3661 const a = s.params.virtual; 3662 if (a.cache && s.virtual.cache[t]) return s.virtual.cache[t]; 3663 let i; 3664 return ( 3665 a.renderSlide 3666 ? ((i = a.renderSlide.call(s, e, t)), 3667 "string" == typeof i && (C(o, i), (i = o.children[0]))) 3668 : (i = s.isElement 3669 ? v("swiper-slide") 3670 : v("div", s.params.slideClass)), 3671 i.setAttribute("data-swiper-slide-index", t), 3672 a.renderSlide || C(i, e), 3673 a.cache && (s.virtual.cache[t] = i), 3674 i 3675 ); 3676 } 3677 function c(e, t, a) { 3678 const { 3679 slidesPerView: i, 3680 slidesPerGroup: r, 3681 centeredSlides: l, 3682 loop: o, 3683 initialSlide: c, 3684 } = s.params; 3685 if (t && !o && c > 0) return; 3686 const { addSlidesBefore: p, addSlidesAfter: u } = s.params.virtual, 3687 { from: m, to: h, slides: g, slidesGrid: v, offset: w } = s.virtual; 3688 s.params.cssMode || s.updateActiveIndex(); 3689 const b = void 0 === a ? s.activeIndex || 0 : a; 3690 let y, E, x; 3691 (y = s.rtlTranslate ? "right" : s.isHorizontal() ? "left" : "top"), 3692 l 3693 ? ((E = Math.floor(i / 2) + r + u), (x = Math.floor(i / 2) + r + p)) 3694 : ((E = i + (r - 1) + u), (x = (o ? i : r) + p)); 3695 let S = b - x, 3696 T = b + E; 3697 o || ((S = Math.max(S, 0)), (T = Math.min(T, g.length - 1))); 3698 let M = (s.slidesGrid[S] || 0) - (s.slidesGrid[0] || 0); 3699 function C() { 3700 s.updateSlides(), 3701 s.updateProgress(), 3702 s.updateSlidesClasses(), 3703 n("virtualUpdate"); 3704 } 3705 if ( 3706 (o && b >= x 3707 ? ((S -= x), l || (M += s.slidesGrid[0])) 3708 : o && b < x && ((S = -x), l && (M += s.slidesGrid[0])), 3709 Object.assign(s.virtual, { 3710 from: S, 3711 to: T, 3712 offset: M, 3713 slidesGrid: s.slidesGrid, 3714 slidesBefore: x, 3715 slidesAfter: E, 3716 }), 3717 m === S && h === T && !e) 3718 ) 3719 return ( 3720 s.slidesGrid !== v && 3721 M !== w &&
3722 s.slides.forEach((e) => { 3723 e.style[y] = M - Math.abs(s.cssOverflowAdjustment()) + "px"; 3724 }), 3725 s.updateProgress(), 3726 void n("virtualUpdate") 3727 ); 3728 if (s.params.virtual.renderExternal) 3729 return ( 3730 s.params.virtual.renderExternal.call(s, { 3731 offset: M, 3732 from: S, 3733 to: T, 3734 slides: (function () { 3735 const e = []; 3736 for (let t = S; t <= T; t += 1) e.push(g[t]); 3737 return e; 3738 })(), 3739 }), 3740 void (s.params.virtual.renderExternalUpdate 3741 ? C() 3742 : n("virtualUpdate")) 3743 ); 3744 const P = [], 3745 L = [], 3746 I = (e) => { 3747 let t = e; 3748 return ( 3749 e < 0 ? (t = g.length + e) : t >= g.length && (t -= g.length), t 3750 ); 3751 }; 3752 if (e) 3753 s.slides 3754 .filter((e) => e.matches(`.${s.params.slideClass}, swiper-slide`)) 3755 .forEach((e) => { 3756 e.remove(); 3757 }); 3758 else 3759 for (let e = m; e <= h; e += 1) 3760 if (e < S || e > T) { 3761 const t = I(e); 3762 s.slides 3763 .filter((e) => 3764 e.matches( 3765 `.${s.params.slideClass}[data-swiper-slide-index="${t}"], swiper-slide[data-swiper-slide-index="${t}"]` 3766 ) 3767 ) 3768 .forEach((e) => { 3769 e.remove(); 3770 }); 3771 } 3772 const z = o ? -g.length : 0, 3773 A = o ? 2 * g.length : g.length; 3774 for (let t = z; t < A; t += 1) 3775 if (t >= S && t <= T) { 3776 const s = I(t); 3777 void 0 === h || e 3778 ? L.push(s) 3779 : (t > h && L.push(s), t < m && P.push(s)); 3780 } 3781 if ( 3782 (L.forEach((e) => { 3783 s.slidesEl.append(d(g[e], e)); 3784 }), 3785 o) 3786 ) 3787 for (let e = P.length - 1; e >= 0; e -= 1) { 3788 const t = P[e]; 3789 s.slidesEl.prepend(d(g[t], t)); 3790 } 3791 else 3792 P.sort((e, t) => t - e), 3793 P.forEach((e) => { 3794 s.slidesEl.prepend(d(g[e], e)); 3795 }); 3796 f(s.slidesEl, ".swiper-slide, swiper-slide").forEach((e) => { 3797 e.style[y] = M - Math.abs(s.cssOverflowAdjustment()) + "px"; 3798 }), 3799 C(); 3800 } 3801 r("beforeInit", () => { 3802 if (!s.params.virtual.enabled) return; 3803 let e; 3804 if (void 0 === s.passedParams.virtual.slides) { 3805 const t = [...s.slidesEl.children].filter((e) => 3806 e.matches(`.${s.params.slideClass}, swiper-slide`) 3807 ); 3808 t && 3809 t.length && 3810 ((s.virtual.slides = [...t]), 3811 (e = !0), 3812 t.forEach((e, t) => { 3813 e.setAttribute("data-swiper-slide-index", t), 3814 (s.virtual.cache[t] = e), 3815 e.remove(); 3816 })); 3817 } 3818 e || (s.virtual.slides = s.params.virtual.slides), 3819 s.classNames.push(`${s.params.containerModifierClass}virtual`), 3820 (s.params.watchSlidesProgress = !0), 3821 (s.originalParams.watchSlidesProgress = !0), 3822 c(!1, !0); 3823 }), 3824 r("setTranslate", () => { 3825 s.params.virtual.enabled && 3826 (s.params.cssMode && !s._immediateVirtual 3827 ? (clearTimeout(t), 3828 (t = setTimeout(() => { 3829 c(); 3830 }, 100))) 3831 : c()); 3832 }), 3833 r("init update resize", () => { 3834 s.params.virtual.enabled && 3835 s.params.cssMode && 3836 u(s.wrapperEl, "--swiper-virtual-size", `${s.virtualSize}px`); 3837 }), 3838 Object.assign(s.virtual, { 3839 appendSlide: function (e) { 3840 if ("object" == typeof e && "length" in e) 3841 for (let t = 0; t < e.length; t += 1) 3842 e[t] && s.virtual.slides.push(e[t]); 3843 else s.virtual.slides.push(e); 3844 c(!0); 3845 }, 3846 prependSlide: function (e) { 3847 const t = s.activeIndex; 3848 let a = t + 1, 3849 i = 1; 3850 if (Array.isArray(e)) { 3851 for (let t = 0; t < e.length; t += 1) 3852 e[t] && s.virtual.slides.unshift(e[t]); 3853 (a = t + e.length), (i = e.length); 3854 } else s.virtual.slides.unshift(e); 3855 if (s.params.virtual.cache) { 3856 const e = s.virtual.cache, 3857 t = {}; 3858 Object.keys(e).forEach((s) => { 3859 const a = e[s], 3860 r = a.getAttribute("data-swiper-slide-index"); 3861 r && 3862 a.setAttribute( 3863 "data-swiper-slide-index", 3864 parseInt(r, 10) + i 3865 ), 3866 (t[parseInt(s, 10) + i] = a); 3867 }), 3868 (s.virtual.cache = t); 3869 } 3870 c(!0), s.slideTo(a, 0); 3871 }, 3872 removeSlide: function (e) { 3873 if (null == e) return; 3874 let t = s.activeIndex; 3875 if (Array.isArray(e)) 3876 for (let a = e.length - 1; a >= 0; a -= 1) 3877 s.params.virtual.cache && 3878 (delete s.virtual.cache[e[a]], 3879 Object.keys(s.virtual.cache).forEach((t) => { 3880 t > e && 3881 ((s.virtual.cache[t - 1] = s.virtual.cache[t]), 3882 s.virtual.cache[t - 1].setAttribute( 3883 "data-swiper-slide-index", 3884 t - 1 3885 ), 3886 delete s.virtual.cache[t]); 3887 })), 3888 s.virtual.slides.splice(e[a], 1), 3889 e[a] < t && (t -= 1), 3890 (t = Math.max(t, 0)); 3891 else 3892 s.params.virtual.cache && 3893 (delete s.virtual.cache[e], 3894 Object.keys(s.virtual.cache).forEach((t) => { 3895 t > e && 3896 ((s.virtual.cache[t - 1] = s.virtual.cache[t]), 3897 s.virtual.cache[t - 1].setAttribute( 3898 "data-swiper-slide-index", 3899 t - 1 3900 ), 3901 delete s.virtual.cache[t]); 3902 })), 3903 s.virtual.slides.splice(e, 1), 3904 e < t && (t -= 1), 3905 (t = Math.max(t, 0)); 3906 c(!0), s.slideTo(t, 0); 3907 }, 3908 removeAllSlides: function () { 3909 (s.virtual.slides = []), 3910 s.params.virtual.cache && (s.virtual.cache = {}), 3911 c(!0), 3912 s.slideTo(0, 0); 3913 }, 3914 update: c, 3915 }); 3916 }, 3917 function (e) { 3918 let { swiper: t, extendParams: s, on: i, emit: n } = e; 3919 const l = a(), 3920 o = r(); 3921 function d(e) { 3922 if (!t.enabled) return; 3923 const { rtlTranslate: s } = t; 3924 let a = e; 3925 a.originalEvent && (a = a.originalEvent); 3926 const i = a.keyCode || a.charCode, 3927 r = t.params.keyboard.pageUpDown, 3928 d = r && 33 === i, 3929 c = r && 34 === i, 3930 p = 37 === i, 3931 u = 39 === i, 3932 m = 38 === i, 3933 h = 40 === i; 3934 if ( 3935 !t.allowSlideNext && 3936 ((t.isHorizontal() && u) || (t.isVertical() && h) || c) 3937 ) 3938 return !1; 3939 if ( 3940 !t.allowSlidePrev && 3941 ((t.isHorizontal() && p) || (t.isVertical() && m) || d) 3942 ) 3943 return !1; 3944 if ( 3945 !( 3946 a.shiftKey || 3947 a.altKey || 3948 a.ctrlKey || 3949 a.metaKey || 3950 (l.activeElement && 3951 l.activeElement.nodeName && 3952 ("input" === l.activeElement.nodeName.toLowerCase() || 3953 "textarea" === l.activeElement.nodeName.toLowerCase())) 3954 ) 3955 ) { 3956 if ( 3957 t.params.keyboard.onlyInViewport && 3958 (d || c || p || u || m || h) 3959 ) { 3960 let e = !1; 3961 if ( 3962 E(t.el, `.${t.params.slideClass}, swiper-slide`).length > 0 && 3963 0 === E(t.el, `.${t.params.slideActiveClass}`).length 3964 ) 3965 return; 3966 const a = t.el, 3967 i = a.clientWidth,
3968 r = a.clientHeight, 3969 n = o.innerWidth, 3970 l = o.innerHeight, 3971 d = w(a); 3972 s && (d.left -= a.scrollLeft); 3973 const c = [ 3974 [d.left, d.top], 3975 [d.left + i, d.top], 3976 [d.left, d.top + r], 3977 [d.left + i, d.top + r], 3978 ]; 3979 for (let t = 0; t < c.length; t += 1) { 3980 const s = c[t]; 3981 if (s[0] >= 0 && s[0] <= n && s[1] >= 0 && s[1] <= l) { 3982 if (0 === s[0] && 0 === s[1]) continue; 3983 e = !0; 3984 } 3985 } 3986 if (!e) return; 3987 } 3988 t.isHorizontal() 3989 ? ((d || c || p || u) && 3990 (a.preventDefault ? a.preventDefault() : (a.returnValue = !1)), 3991 (((c || u) && !s) || ((d || p) && s)) && t.slideNext(), 3992 (((d || p) && !s) || ((c || u) && s)) && t.slidePrev()) 3993 : ((d || c || m || h) && 3994 (a.preventDefault ? a.preventDefault() : (a.returnValue = !1)), 3995 (c || h) && t.slideNext(), 3996 (d || m) && t.slidePrev()), 3997 n("keyPress", i); 3998 } 3999 } 4000 function c() { 4001 t.keyboard.enabled || 4002 (l.addEventListener("keydown", d), (t.keyboard.enabled = !0)); 4003 } 4004 function p() { 4005 t.keyboard.enabled && 4006 (l.removeEventListener("keydown", d), (t.keyboard.enabled = !1)); 4007 } 4008 (t.keyboard = { enabled: !1 }), 4009 s({ keyboard: { enabled: !1, onlyInViewport: !0, pageUpDown: !0 } }), 4010 i("init", () => { 4011 t.params.keyboard.enabled && c(); 4012 }), 4013 i("destroy", () => { 4014 t.keyboard.enabled && p(); 4015 }), 4016 Object.assign(t.keyboard, { enable: c, disable: p }); 4017 }, 4018 function (e) { 4019 let { swiper: t, extendParams: s, on: a, emit: i } = e; 4020 const n = r(); 4021 let d; 4022 s({ 4023 mousewheel: { 4024 enabled: !1, 4025 releaseOnEdges: !1, 4026 invert: !1, 4027 forceToAxis: !1, 4028 sensitivity: 1, 4029 eventsTarget: "container", 4030 thresholdDelta: null, 4031 thresholdTime: null, 4032 noMousewheelClass: "swiper-no-mousewheel", 4033 }, 4034 }), 4035 (t.mousewheel = { enabled: !1 }); 4036 let c, 4037 p = o(); 4038 const u = []; 4039 function m() { 4040 t.enabled && (t.mouseEntered = !0); 4041 } 4042 function h() { 4043 t.enabled && (t.mouseEntered = !1); 4044 } 4045 function f(e) { 4046 return ( 4047 !( 4048 t.params.mousewheel.thresholdDelta && 4049 e.delta < t.params.mousewheel.thresholdDelta 4050 ) && 4051 !( 4052 t.params.mousewheel.thresholdTime && 4053 o() - p < t.params.mousewheel.thresholdTime 4054 ) && 4055 ((e.delta >= 6 && o() - p < 60) || 4056 (e.direction < 0 4057 ? (t.isEnd && !t.params.loop) || 4058 t.animating || 4059 (t.slideNext(), i("scroll", e.raw)) 4060 : (t.isBeginning && !t.params.loop) || 4061 t.animating || 4062 (t.slidePrev(), i("scroll", e.raw)), 4063 (p = new n.Date().getTime()), 4064 !1)) 4065 ); 4066 } 4067 function g(e) { 4068 let s = e, 4069 a = !0; 4070 if (!t.enabled) return; 4071 if (e.target.closest(`.${t.params.mousewheel.noMousewheelClass}`)) 4072 return; 4073 const r = t.params.mousewheel; 4074 t.params.cssMode && s.preventDefault(); 4075 let n = t.el; 4076 "container" !== t.params.mousewheel.eventsTarget && 4077 (n = document.querySelector(t.params.mousewheel.eventsTarget)); 4078 const p = n && n.contains(s.target); 4079 if (!t.mouseEntered && !p && !r.releaseOnEdges) return !0; 4080 s.originalEvent && (s = s.originalEvent); 4081 let m = 0; 4082 const h = t.rtlTranslate ? -1 : 1, 4083 g = (function (e) { 4084 let t = 0, 4085 s = 0, 4086 a = 0, 4087 i = 0; 4088 return ( 4089 "detail" in e && (s = e.detail), 4090 "wheelDelta" in e && (s = -e.wheelDelta / 120), 4091 "wheelDeltaY" in e && (s = -e.wheelDeltaY / 120), 4092 "wheelDeltaX" in e && (t = -e.wheelDeltaX / 120), 4093 "axis" in e && e.axis === e.HORIZONTAL_AXIS && ((t = s), (s = 0)), 4094 (a = 10 * t), 4095 (i = 10 * s), 4096 "deltaY" in e && (i = e.deltaY), 4097 "deltaX" in e && (a = e.deltaX), 4098 e.shiftKey && !a && ((a = i), (i = 0)), 4099 (a || i) && 4100 e.deltaMode && 4101 (1 === e.deltaMode 4102 ? ((a *= 40), (i *= 40)) 4103 : ((a *= 800), (i *= 800))), 4104 a && !t && (t = a < 1 ? -1 : 1), 4105 i && !s && (s = i < 1 ? -1 : 1), 4106 { spinX: t, spinY: s, pixelX: a, pixelY: i } 4107 ); 4108 })(s); 4109 if (r.forceToAxis) 4110 if (t.isHorizontal()) { 4111 if (!(Math.abs(g.pixelX) > Math.abs(g.pixelY))) return !0; 4112 m = -g.pixelX * h; 4113 } else { 4114 if (!(Math.abs(g.pixelY) > Math.abs(g.pixelX))) return !0; 4115 m = -g.pixelY; 4116 } 4117 else 4118 m = 4119 Math.abs(g.pixelX) > Math.abs(g.pixelY) ? -g.pixelX * h : -g.pixelY; 4120 if (0 === m) return !0; 4121 r.invert && (m = -m); 4122 let v = t.getTranslate() + m * r.sensitivity; 4123 if ( 4124 (v >= t.minTranslate() && (v = t.minTranslate()), 4125 v <= t.maxTranslate() && (v = t.maxTranslate()), 4126 (a = 4127 !!t.params.loop || 4128 !(v === t.minTranslate() || v === t.maxTranslate())), 4129 a && t.params.nested && s.stopPropagation(), 4130 t.params.freeMode && t.params.freeMode.enabled) 4131 ) { 4132 const e = { time: o(), delta: Math.abs(m), direction: Math.sign(m) }, 4133 a = 4134 c && 4135 e.time < c.time + 500 && 4136 e.delta <= c.delta && 4137 e.direction === c.direction; 4138 if (!a) { 4139 c = void 0; 4140 let n = t.getTranslate() + m * r.sensitivity; 4141 const o = t.isBeginning, 4142 p = t.isEnd; 4143 if ( 4144 (n >= t.minTranslate() && (n = t.minTranslate()), 4145 n <= t.maxTranslate() && (n = t.maxTranslate()), 4146 t.setTransition(0), 4147 t.setTranslate(n), 4148 t.updateProgress(), 4149 t.updateActiveIndex(), 4150 t.updateSlidesClasses(), 4151 ((!o && t.isBeginning) || (!p && t.isEnd)) && 4152 t.updateSlidesClasses(), 4153 t.params.loop && 4154 t.loopFix({ 4155 direction: e.direction < 0 ? "next" : "prev", 4156 byMousewheel: !0, 4157 }), 4158 t.params.freeMode.sticky) 4159 ) { 4160 clearTimeout(d), (d = void 0), u.length >= 15 && u.shift(); 4161 const s = u.length ? u[u.length - 1] : void 0, 4162 a = u[0]; 4163 if ( 4164 (u.push(e), 4165 s && (e.delta > s.delta || e.direction !== s.direction)) 4166 ) 4167 u.splice(0); 4168 else if ( 4169 u.length >= 15 && 4170 e.time - a.time < 500 && 4171 a.delta - e.delta >= 1 && 4172 e.delta <= 6 4173 ) { 4174 const s = m > 0 ? 0.8 : 0.2; 4175 (c = e), 4176 u.splice(0), 4177 (d = l(() => { 4178 !t.destroyed && 4179 t.params && 4180 t.slideToClosest(t.params.speed, !0, void 0, s); 4181 }, 0)); 4182 } 4183 d || 4184 (d = l(() => {
4185 if (t.destroyed || !t.params) return; 4186 (c = e), 4187 u.splice(0), 4188 t.slideToClosest(t.params.speed, !0, void 0, 0.5); 4189 }, 500)); 4190 } 4191 if ( 4192 (a || i("scroll", s), 4193 t.params.autoplay && 4194 t.params.autoplay.disableOnInteraction && 4195 t.autoplay.stop(), 4196 r.releaseOnEdges && 4197 (n === t.minTranslate() || n === t.maxTranslate())) 4198 ) 4199 return !0; 4200 } 4201 } else { 4202 const s = { 4203 time: o(), 4204 delta: Math.abs(m), 4205 direction: Math.sign(m), 4206 raw: e, 4207 }; 4208 u.length >= 2 && u.shift(); 4209 const a = u.length ? u[u.length - 1] : void 0; 4210 if ( 4211 (u.push(s), 4212 a 4213 ? (s.direction !== a.direction || 4214 s.delta > a.delta || 4215 s.time > a.time + 150) && 4216 f(s) 4217 : f(s), 4218 (function (e) { 4219 const s = t.params.mousewheel; 4220 if (e.direction < 0) { 4221 if (t.isEnd && !t.params.loop && s.releaseOnEdges) return !0; 4222 } else if (t.isBeginning && !t.params.loop && s.releaseOnEdges) 4223 return !0; 4224 return !1; 4225 })(s)) 4226 ) 4227 return !0; 4228 } 4229 return s.preventDefault ? s.preventDefault() : (s.returnValue = !1), !1; 4230 } 4231 function v(e) { 4232 let s = t.el; 4233 "container" !== t.params.mousewheel.eventsTarget && 4234 (s = document.querySelector(t.params.mousewheel.eventsTarget)), 4235 s[e]("mouseenter", m), 4236 s[e]("mouseleave", h), 4237 s[e]("wheel", g); 4238 } 4239 function w() { 4240 return t.params.cssMode 4241 ? (t.wrapperEl.removeEventListener("wheel", g), !0) 4242 : !t.mousewheel.enabled && 4243 (v("addEventListener"), (t.mousewheel.enabled = !0), !0); 4244 } 4245 function b() { 4246 return t.params.cssMode 4247 ? (t.wrapperEl.addEventListener(event, g), !0) 4248 : !!t.mousewheel.enabled && 4249 (v("removeEventListener"), (t.mousewheel.enabled = !1), !0); 4250 } 4251 a("init", () => { 4252 !t.params.mousewheel.enabled && t.params.cssMode && b(), 4253 t.params.mousewheel.enabled && w(); 4254 }), 4255 a("destroy", () => { 4256 t.params.cssMode && w(), t.mousewheel.enabled && b(); 4257 }), 4258 Object.assign(t.mousewheel, { enable: w, disable: b }); 4259 }, 4260 function (e) { 4261 let { swiper: t, extendParams: s, on: a, emit: i } = e; 4262 function r(e) { 4263 let s; 4264 return e && 4265 "string" == typeof e && 4266 t.isElement && 4267 ((s = t.el.querySelector(e) || t.hostEl.querySelector(e)), s) 4268 ? s 4269 : (e && 4270 ("string" == typeof e && (s = [...document.querySelectorAll(e)]), 4271 t.params.uniqueNavElements && 4272 "string" == typeof e && 4273 s && 4274 s.length > 1 && 4275 1 === t.el.querySelectorAll(e).length 4276 ? (s = t.el.querySelector(e)) 4277 : s && 1 === s.length && (s = s[0])), 4278 e && !s ? e : s); 4279 } 4280 function n(e, s) { 4281 const a = t.params.navigation;
4282 (e = T(e)).forEach((e) => { 4283 e && 4284 (e.classList[s ? "add" : "remove"](...a.disabledClass.split(" ")), 4285 "BUTTON" === e.tagName && (e.disabled = s), 4286 t.params.watchOverflow && 4287 t.enabled && 4288 e.classList[t.isLocked ? "add" : "remove"](a.lockClass)); 4289 }); 4290 } 4291 function l() { 4292 const { nextEl: e, prevEl: s } = t.navigation; 4293 if (t.params.loop) return n(s, !1), void n(e, !1); 4294 n(s, t.isBeginning && !t.params.rewind), 4295 n(e, t.isEnd && !t.params.rewind); 4296 } 4297 function o(e) { 4298 e.preventDefault(), 4299 (!t.isBeginning || t.params.loop || t.params.rewind) && 4300 (t.slidePrev(), i("navigationPrev")); 4301 } 4302 function d(e) { 4303 e.preventDefault(), 4304 (!t.isEnd || t.params.loop || t.params.rewind) && 4305 (t.slideNext(), i("navigationNext")); 4306 } 4307 function c() { 4308 const e = t.params.navigation; 4309 if ( 4310 ((t.params.navigation = ne( 4311 t, 4312 t.originalParams.navigation, 4313 t.params.navigation, 4314 { nextEl: "swiper-button-next", prevEl: "swiper-button-prev" } 4315 )), 4316 !e.nextEl && !e.prevEl) 4317 ) 4318 return; 4319 let s = r(e.nextEl), 4320 a = r(e.prevEl); 4321 Object.assign(t.navigation, { nextEl: s, prevEl: a }), 4322 (s = T(s)), 4323 (a = T(a)); 4324 const i = (s, a) => { 4325 s && s.addEventListener("click", "next" === a ? d : o), 4326 !t.enabled && s && s.classList.add(...e.lockClass.split(" ")); 4327 }; 4328 s.forEach((e) => i(e, "next")), a.forEach((e) => i(e, "prev")); 4329 } 4330 function p() { 4331 let { nextEl: e, prevEl: s } = t.navigation; 4332 (e = T(e)), (s = T(s)); 4333 const a = (e, s) => { 4334 e.removeEventListener("click", "next" === s ? d : o), 4335 e.classList.remove(...t.params.navigation.disabledClass.split(" ")); 4336 }; 4337 e.forEach((e) => a(e, "next")), s.forEach((e) => a(e, "prev")); 4338 } 4339 s({ 4340 navigation: { 4341 nextEl: null, 4342 prevEl: null, 4343 hideOnClick: !1, 4344 disabledClass: "swiper-button-disabled", 4345 hiddenClass: "swiper-button-hidden", 4346 lockClass: "swiper-button-lock", 4347 navigationDisabledClass: "swiper-navigation-disabled", 4348 }, 4349 }), 4350 (t.navigation = { nextEl: null, prevEl: null }), 4351 a("init", () => { 4352 !1 === t.params.navigation.enabled ? u() : (c(), l()); 4353 }), 4354 a("toEdge fromEdge lock unlock", () => { 4355 l(); 4356 }), 4357 a("destroy", () => { 4358 p(); 4359 }), 4360 a("enable disable", () => { 4361 let { nextEl: e, prevEl: s } = t.navigation; 4362 (e = T(e)), 4363 (s = T(s)), 4364 t.enabled 4365 ? l() 4366 : [...e, ...s] 4367 .filter((e) => !!e) 4368 .forEach((e) => 4369 e.classList.add(t.params.navigation.lockClass) 4370 ); 4371 }), 4372 a("click", (e, s) => { 4373 let { nextEl: a, prevEl: r } = t.navigation; 4374 (a = T(a)), (r = T(r)); 4375 const n = s.target; 4376 let l = r.includes(n) || a.includes(n); 4377 if (t.isElement && !l) { 4378 const e = s.path || (s.composedPath && s.composedPath()); 4379 e && (l = e.find((e) => a.includes(e) || r.includes(e))); 4380 } 4381 if (t.params.navigation.hideOnClick && !l) { 4382 if ( 4383 t.pagination && 4384 t.params.pagination && 4385 t.params.pagination.clickable && 4386 (t.pagination.el === n || t.pagination.el.contains(n)) 4387 ) 4388 return; 4389 let e; 4390 a.length 4391 ? (e = a[0].classList.contains(t.params.navigation.hiddenClass)) 4392 : r.length && 4393 (e = r[0].classList.contains(t.params.navigation.hiddenClass)), 4394 i(!0 === e ? "navigationShow" : "navigationHide"), 4395 [...a, ...r] 4396 .filter((e) => !!e) 4397 .forEach((e) => 4398 e.classList.toggle(t.params.navigation.hiddenClass) 4399 ); 4400 } 4401 }); 4402 const u = () => { 4403 t.el.classList.add( 4404 ...t.params.navigation.navigationDisabledClass.split(" ") 4405 ), 4406 p(); 4407 }; 4408 Object.assign(t.navigation, { 4409 enable: () => { 4410 t.el.classList.remove( 4411 ...t.params.navigation.navigationDisabledClass.split(" ") 4412 ), 4413 c(), 4414 l(); 4415 }, 4416 disable: u, 4417 update: l, 4418 init: c, 4419 destroy: p, 4420 }); 4421 }, 4422 function (e) { 4423 let { swiper: t, extendParams: s, on: a, emit: i } = e; 4424 const r = "swiper-pagination"; 4425 let n; 4426 s({ 4427 pagination: { 4428 el: null, 4429 bulletElement: "span", 4430 clickable: !1, 4431 hideOnClick: !1, 4432 renderBullet: null, 4433 renderProgressbar: null, 4434 renderFraction: null, 4435 renderCustom: null, 4436 progressbarOpposite: !1, 4437 type: "bullets", 4438 dynamicBullets: !1, 4439 dynamicMainBullets: 1, 4440 formatFractionCurrent: (e) => e, 4441 formatFractionTotal: (e) => e, 4442 bulletClass: `${r}-bullet`, 4443 bulletActiveClass: `${r}-bullet-active`, 4444 modifierClass: `${r}-`, 4445 currentClass: `${r}-current`, 4446 totalClass: `${r}-total`, 4447 hiddenClass: `${r}-hidden`, 4448 progressbarFillClass: `${r}-progressbar-fill`, 4449 progressbarOppositeClass: `${r}-progressbar-opposite`, 4450 clickableClass: `${r}-clickable`, 4451 lockClass: `${r}-lock`, 4452 horizontalClass: `${r}-horizontal`, 4453 verticalClass: `${r}-vertical`, 4454 paginationDisabledClass: `${r}-disabled`, 4455 }, 4456 }), 4457 (t.pagination = { el: null, bullets: [] }); 4458 let l = 0; 4459 function o() { 4460 return ( 4461 !t.params.pagination.el || 4462 !t.pagination.el || 4463 (Array.isArray(t.pagination.el) && 0 === t.pagination.el.length) 4464 ); 4465 } 4466 function d(e, s) { 4467 const { bulletActiveClass: a } = t.params.pagination; 4468 e && 4469 (e = e[("prev" === s ? "previous" : "next") + "ElementSibling"]) && 4470 (e.classList.add(`${a}-${s}`), 4471 (e = e[("prev" === s ? "previous" : "next") + "ElementSibling"]) && 4472 e.classList.add(`${a}-${s}-${s}`)); 4473 } 4474 function c(e) { 4475 const s = e.target.closest(le(t.params.pagination.bulletClass)); 4476 if (!s) return; 4477 e.preventDefault(); 4478 const a = y(s) * t.params.slidesPerGroup; 4479 if (t.params.loop) { 4480 if (t.realIndex === a) return; 4481 const e = 4482 ((i = t.realIndex), 4483 (r = a), 4484 (n = t.slides.length), 4485 (r %= n) == 1 + (i %= n) 4486 ? "next" 4487 : r === i - 1 4488 ? "previous" 4489 : void 0); 4490 "next" === e 4491 ? t.slideNext() 4492 : "previous" === e 4493 ? t.slidePrev() 4494 : t.slideToLoop(a); 4495 } else t.slideTo(a); 4496 var i, r, n; 4497 } 4498 function p() { 4499 const e = t.rtl, 4500 s = t.params.pagination; 4501 if (o()) return; 4502 let a, 4503 r, 4504 c = t.pagination.el; 4505 c = T(c); 4506 const p = 4507 t.virtual && t.params.virtual.enabled 4508 ? t.virtual.slides.length 4509 : t.slides.length, 4510 u = t.params.loop 4511 ? Math.ceil(p / t.params.slidesPerGroup) 4512 : t.snapGrid.length; 4513 if ( 4514 (t.params.loop 4515 ? ((r = t.previousRealIndex || 0), 4516 (a = 4517 t.params.slidesPerGroup > 1 4518 ? Math.floor(t.realIndex / t.params.slidesPerGroup) 4519 : t.realIndex)) 4520 : void 0 !== t.snapIndex 4521 ? ((a = t.snapIndex), (r = t.previousSnapIndex)) 4522 : ((r = t.previousIndex || 0), (a = t.activeIndex || 0)), 4523 "bullets" === s.type && 4524 t.pagination.bullets && 4525 t.pagination.bullets.length > 0) 4526 ) { 4527 const i = t.pagination.bullets; 4528 let o, p, u; 4529 if ( 4530 (s.dynamicBullets && 4531 ((n = S(i[0], t.isHorizontal() ? "width" : "height", !0)),
4532 c.forEach((e) => { 4533 e.style[t.isHorizontal() ? "width" : "height"] = 4534 n * (s.dynamicMainBullets + 4) + "px"; 4535 }), 4536 s.dynamicMainBullets > 1 && 4537 void 0 !== r && 4538 ((l += a - (r || 0)), 4539 l > s.dynamicMainBullets - 1 4540 ? (l = s.dynamicMainBullets - 1) 4541 : l < 0 && (l = 0)), 4542 (o = Math.max(a - l, 0)), 4543 (p = o + (Math.min(i.length, s.dynamicMainBullets) - 1)), 4544 (u = (p + o) / 2)), 4545 i.forEach((e) => { 4546 const t = [ 4547 ...[ 4548 "", 4549 "-next", 4550 "-next-next", 4551 "-prev", 4552 "-prev-prev", 4553 "-main", 4554 ].map((e) => `${s.bulletActiveClass}${e}`), 4555 ] 4556 .map((e) => 4557 "string" == typeof e && e.includes(" ") ? e.split(" ") : e 4558 ) 4559 .flat(); 4560 e.classList.remove(...t); 4561 }), 4562 c.length > 1) 4563 ) 4564 i.forEach((e) => { 4565 const i = y(e); 4566 i === a 4567 ? e.classList.add(...s.bulletActiveClass.split(" ")) 4568 : t.isElement && e.setAttribute("part", "bullet"), 4569 s.dynamicBullets && 4570 (i >= o && 4571 i <= p && 4572 e.classList.add( 4573 ...`${s.bulletActiveClass}-main`.split(" ") 4574 ), 4575 i === o && d(e, "prev"), 4576 i === p && d(e, "next")); 4577 }); 4578 else { 4579 const e = i[a]; 4580 if ( 4581 (e && e.classList.add(...s.bulletActiveClass.split(" ")), 4582 t.isElement && 4583 i.forEach((e, t) => { 4584 e.setAttribute("part", t === a ? "bullet-active" : "bullet"); 4585 }), 4586 s.dynamicBullets) 4587 ) { 4588 const e = i[o], 4589 t = i[p]; 4590 for (let e = o; e <= p; e += 1) 4591 i[e] && 4592 i[e].classList.add( 4593 ...`${s.bulletActiveClass}-main`.split(" ") 4594 ); 4595 d(e, "prev"), d(t, "next"); 4596 } 4597 } 4598 if (s.dynamicBullets) { 4599 const a = Math.min(i.length, s.dynamicMainBullets + 4), 4600 r = (n * a - n) / 2 - u * n, 4601 l = e ? "right" : "left"; 4602 i.forEach((e) => { 4603 e.style[t.isHorizontal() ? l : "top"] = `${r}px`; 4604 }); 4605 } 4606 } 4607 c.forEach((e, r) => { 4608 if ( 4609 ("fraction" === s.type && 4610 (e.querySelectorAll(le(s.currentClass)).forEach((e) => { 4611 e.textContent = s.formatFractionCurrent(a + 1); 4612 }), 4613 e.querySelectorAll(le(s.totalClass)).forEach((e) => { 4614 e.textContent = s.formatFractionTotal(u); 4615 })), 4616 "progressbar" === s.type) 4617 ) { 4618 let i; 4619 i = s.progressbarOpposite 4620 ? t.isHorizontal() 4621 ? "vertical" 4622 : "horizontal" 4623 : t.isHorizontal() 4624 ? "horizontal" 4625 : "vertical"; 4626 const r = (a + 1) / u; 4627 let n = 1, 4628 l = 1; 4629 "horizontal" === i ? (n = r) : (l = r), 4630 e.querySelectorAll(le(s.progressbarFillClass)).forEach((e) => { 4631 (e.style.transform = `translate3d(0,0,0) scaleX(${n}) scaleY(${l})`), 4632 (e.style.transitionDuration = `${t.params.speed}ms`); 4633 }); 4634 } 4635 "custom" === s.type && s.renderCustom 4636 ? (C(e, s.renderCustom(t, a + 1, u)), 4637 0 === r && i("paginationRender", e)) 4638 : (0 === r && i("paginationRender", e), i("paginationUpdate", e)), 4639 t.params.watchOverflow && 4640 t.enabled && 4641 e.classList[t.isLocked ? "add" : "remove"](s.lockClass); 4642 }); 4643 } 4644 function u() { 4645 const e = t.params.pagination; 4646 if (o()) return; 4647 const s = 4648 t.virtual && t.params.virtual.enabled 4649 ? t.virtual.slides.length 4650 : t.grid && t.params.grid.rows > 1 4651 ? t.slides.length / Math.ceil(t.params.grid.rows) 4652 : t.slides.length; 4653 let a = t.pagination.el; 4654 a = T(a); 4655 let r = ""; 4656 if ("bullets" === e.type) { 4657 let a = t.params.loop 4658 ? Math.ceil(s / t.params.slidesPerGroup) 4659 : t.snapGrid.length; 4660 t.params.freeMode && t.params.freeMode.enabled && a > s && (a = s); 4661 for (let s = 0; s < a; s += 1) 4662 e.renderBullet 4663 ? (r += e.renderBullet.call(t, s, e.bulletClass)) 4664 : (r += `<${e.bulletElement} ${ 4665 t.isElement ? 'part="bullet"' : "" 4666 } class="${e.bulletClass}"></${e.bulletElement}>`); 4667 } 4668 "fraction" === e.type && 4669 (r = e.renderFraction 4670 ? e.renderFraction.call(t, e.currentClass, e.totalClass) 4671 : `<span class="${e.currentClass}"></span> / <span class="${e.totalClass}"></span>`), 4672 "progressbar" === e.type && 4673 (r = e.renderProgressbar 4674 ? e.renderProgressbar.call(t, e.progressbarFillClass) 4675 : `<span class="${e.progressbarFillClass}"></span>`), 4676 (t.pagination.bullets = []), 4677 a.forEach((s) => { 4678 "custom" !== e.type && C(s, r || ""), 4679 "bullets" === e.type && 4680 t.pagination.bullets.push( 4681 ...s.querySelectorAll(le(e.bulletClass)) 4682 ); 4683 }), 4684 "custom" !== e.type && i("paginationRender", a[0]); 4685 } 4686 function m() { 4687 t.params.pagination = ne( 4688 t, 4689 t.originalParams.pagination, 4690 t.params.pagination, 4691 { el: "swiper-pagination" } 4692 ); 4693 const e = t.params.pagination; 4694 if (!e.el) return; 4695 let s; 4696 "string" == typeof e.el && 4697 t.isElement && 4698 (s = t.el.querySelector(e.el)), 4699 s || 4700 "string" != typeof e.el || 4701 (s = [...document.querySelectorAll(e.el)]), 4702 s || (s = e.el), 4703 s && 4704 0 !== s.length && 4705 (t.params.uniqueNavElements && 4706 "string" == typeof e.el && 4707 Array.isArray(s) && 4708 s.length > 1 && 4709 ((s = [...t.el.querySelectorAll(e.el)]), 4710 s.length > 1 && (s = s.find((e) => E(e, ".swiper")[0] === t.el))), 4711 Array.isArray(s) && 1 === s.length && (s = s[0]), 4712 Object.assign(t.pagination, { el: s }), 4713 (s = T(s)),
4714 s.forEach((s) => { 4715 "bullets" === e.type && 4716 e.clickable && 4717 s.classList.add(...(e.clickableClass || "").split(" ")), 4718 s.classList.add(e.modifierClass + e.type), 4719 s.classList.add( 4720 t.isHorizontal() ? e.horizontalClass : e.verticalClass 4721 ), 4722 "bullets" === e.type && 4723 e.dynamicBullets && 4724 (s.classList.add(`${e.modifierClass}${e.type}-dynamic`), 4725 (l = 0), 4726 e.dynamicMainBullets < 1 && (e.dynamicMainBullets = 1)), 4727 "progressbar" === e.type && 4728 e.progressbarOpposite && 4729 s.classList.add(e.progressbarOppositeClass), 4730 e.clickable && s.addEventListener("click", c), 4731 t.enabled || s.classList.add(e.lockClass); 4732 })); 4733 } 4734 function h() { 4735 const e = t.params.pagination; 4736 if (o()) return; 4737 let s = t.pagination.el; 4738 s && 4739 ((s = T(s)), 4740 s.forEach((s) => { 4741 s.classList.remove(e.hiddenClass), 4742 s.classList.remove(e.modifierClass + e.type), 4743 s.classList.remove( 4744 t.isHorizontal() ? e.horizontalClass : e.verticalClass 4745 ), 4746 e.clickable && 4747 (s.classList.remove(...(e.clickableClass || "").split(" ")), 4748 s.removeEventListener("click", c)); 4749 })), 4750 t.pagination.bullets && 4751 t.pagination.bullets.forEach((t) => 4752 t.classList.remove(...e.bulletActiveClass.split(" ")) 4753 ); 4754 } 4755 a("changeDirection", () => { 4756 if (!t.pagination || !t.pagination.el) return; 4757 const e = t.params.pagination; 4758 let { el: s } = t.pagination; 4759 (s = T(s)), 4760 s.forEach((s) => { 4761 s.classList.remove(e.horizontalClass, e.verticalClass), 4762 s.classList.add( 4763 t.isHorizontal() ? e.horizontalClass : e.verticalClass 4764 ); 4765 }); 4766 }), 4767 a("init", () => { 4768 !1 === t.params.pagination.enabled ? f() : (m(), u(), p()); 4769 }), 4770 a("activeIndexChange", () => { 4771 void 0 === t.snapIndex && p(); 4772 }), 4773 a("snapIndexChange", () => { 4774 p(); 4775 }), 4776 a("snapGridLengthChange", () => { 4777 u(), p(); 4778 }), 4779 a("destroy", () => { 4780 h(); 4781 }), 4782 a("enable disable", () => { 4783 let { el: e } = t.pagination; 4784 e && 4785 ((e = T(e)), 4786 e.forEach((e) => 4787 e.classList[t.enabled ? "remove" : "add"]( 4788 t.params.pagination.lockClass 4789 ) 4790 )); 4791 }), 4792 a("lock unlock", () => { 4793 p(); 4794 }), 4795 a("click", (e, s) => { 4796 const a = s.target, 4797 r = T(t.pagination.el); 4798 if ( 4799 t.params.pagination.el && 4800 t.params.pagination.hideOnClick && 4801 r && 4802 r.length > 0 && 4803 !a.classList.contains(t.params.pagination.bulletClass) 4804 ) { 4805 if ( 4806 t.navigation && 4807 ((t.navigation.nextEl && a === t.navigation.nextEl) || 4808 (t.navigation.prevEl && a === t.navigation.prevEl)) 4809 ) 4810 return; 4811 const e = r[0].classList.contains(t.params.pagination.hiddenClass); 4812 i(!0 === e ? "paginationShow" : "paginationHide"), 4813 r.forEach((e) => 4814 e.classList.toggle(t.params.pagination.hiddenClass) 4815 ); 4816 } 4817 }); 4818 const f = () => { 4819 t.el.classList.add(t.params.pagination.paginationDisabledClass); 4820 let { el: e } = t.pagination; 4821 e && 4822 ((e = T(e)), 4823 e.forEach((e) => 4824 e.classList.add(t.params.pagination.paginationDisabledClass) 4825 )), 4826 h(); 4827 }; 4828 Object.assign(t.pagination, { 4829 enable: () => { 4830 t.el.classList.remove(t.params.pagination.paginationDisabledClass); 4831 let { el: e } = t.pagination; 4832 e && 4833 ((e = T(e)), 4834 e.forEach((e) => 4835 e.classList.remove(t.params.pagination.paginationDisabledClass) 4836 )), 4837 m(), 4838 u(), 4839 p(); 4840 }, 4841 disable: f, 4842 render: u, 4843 update: p, 4844 init: m, 4845 destroy: h, 4846 }); 4847 }, 4848 function (e) { 4849 let { swiper: t, extendParams: s, on: i, emit: r }
4849 = e; 4850 const o = a(); 4851 let d, 4852 c, 4853 p, 4854 u, 4855 m = !1, 4856 h = null, 4857 f = null; 4858 function g() { 4859 if (!t.params.scrollbar.el || !t.scrollbar.el) return; 4860 const { scrollbar: e, rtlTranslate: s } = t, 4861 { dragEl: a, el: i } = e, 4862 r = t.params.scrollbar, 4863 n = t.params.loop ? t.progressLoop : t.progress; 4864 let l = c, 4865 o = (p - c) * n; 4866 s 4867 ? ((o = -o), 4868 o > 0 ? ((l = c - o), (o = 0)) : -o + c > p && (l = p + o)) 4869 : o < 0 4870 ? ((l = c + o), (o = 0)) 4871 : o + c > p && (l = p - o), 4872 t.isHorizontal() 4873 ? ((a.style.transform = `translate3d(${o}px, 0, 0)`), 4874 (a.style.width = `${l}px`)) 4875 : ((a.style.transform = `translate3d(0px, ${o}px, 0)`), 4876 (a.style.height = `${l}px`)), 4877 r.hide && 4878 (clearTimeout(h), 4879 (i.style.opacity = 1), 4880 (h = setTimeout(() => { 4881 (i.style.opacity = 0), (i.style.transitionDuration = "400ms"); 4882 }, 1e3))); 4883 } 4884 function b() { 4885 if (!t.params.scrollbar.el || !t.scrollbar.el) return; 4886 const { scrollbar: e } = t, 4887 { dragEl: s, el: a } = e; 4888 (s.style.width = ""), 4889 (s.style.height = ""), 4890 (p = t.isHorizontal() ? a.offsetWidth : a.offsetHeight), 4891 (u = 4892 t.size / 4893 (t.virtualSize + 4894 t.params.slidesOffsetBefore - 4895 (t.params.centeredSlides ? t.snapGrid[0] : 0))), 4896 (c = 4897 "auto" === t.params.scrollbar.dragSize 4898 ? p * u 4899 : parseInt(t.params.scrollbar.dragSize, 10)), 4900 t.isHorizontal() 4901 ? (s.style.width = `${c}px`) 4902 : (s.style.height = `${c}px`), 4903 (a.style.display = u >= 1 ? "none" : ""), 4904 t.params.scrollbar.hide && (a.style.opacity = 0), 4905 t.params.watchOverflow && 4906 t.enabled && 4907 e.el.classList[t.isLocked ? "add" : "remove"]( 4908 t.params.scrollbar.lockClass 4909 ); 4910 } 4911 function y(e) { 4912 return t.isHorizontal() ? e.clientX : e.clientY; 4913 } 4914 function E(e) { 4915 const { scrollbar: s, rtlTranslate: a } = t, 4916 { el: i } = s; 4917 let r; 4918 (r = 4919 (y(e) - 4920 w(i)[t.isHorizontal() ? "left" : "top"] - 4921 (null !== d ? d : c / 2)) / 4922 (p - c)), 4923 (r = Math.max(Math.min(r, 1), 0)), 4924 a && (r = 1 - r); 4925 const n = t.minTranslate() + (t.maxTranslate() - t.minTranslate()) * r; 4926 t.updateProgress(n), 4927 t.setTranslate(n), 4928 t.updateActiveIndex(), 4929 t.updateSlidesClasses(); 4930 } 4931 function x(e) { 4932 const s = t.params.scrollbar, 4933 { scrollbar: a, wrapperEl: i } = t, 4934 { el: n, dragEl: l } = a; 4935 (m = !0), 4936 (d = 4937 e.target === l 4938 ? y(e) - 4939 e.target.getBoundingClientRect()[ 4940 t.isHorizontal() ? "left" : "top" 4941 ] 4942 : null), 4943 e.preventDefault(), 4944 e.stopPropagation(), 4945 (i.style.transitionDuration = "100ms"), 4946 (l.style.transitionDuration = "100ms"), 4947 E(e), 4948 clearTimeout(f), 4949 (n.style.transitionDuration = "0ms"), 4950 s.hide && (n.style.opacity = 1), 4951 t.params.cssMode && (t.wrapperEl.style["scroll-snap-type"] = "none"), 4952 r("scrollbarDragStart", e); 4953 } 4954 function S(e) { 4955 const { scrollbar: s, wrapperEl: a } = t, 4956 { el: i, dragEl: n } = s; 4957 m && 4958 (e.preventDefault && e.cancelable 4959 ? e.preventDefault() 4960 : (e.returnValue = !1), 4961 E(e), 4962 (a.style.transitionDuration = "0ms"), 4963 (i.style.transitionDuration = "0ms"), 4964 (n.style.transitionDuration = "0ms"), 4965 r("scrollbarDragMove", e)); 4966 } 4967 function M(e) { 4968 const s = t.params.scrollbar, 4969 { scrollbar: a, wrapperEl: i } = t, 4970 { el: n } = a; 4971 m && 4972 ((m = !1), 4973 t.params.cssMode && 4974 ((t.wrapperEl.style["scroll-snap-type"] = ""), 4975 (i.style.transitionDuration = "")), 4976 s.hide && 4977 (clearTimeout(f), 4978 (f = l(() => { 4979 (n.style.opacity = 0), (n.style.transitionDuration = "400ms"); 4980 }, 1e3))), 4981 r("scrollbarDragEnd", e), 4982 s.snapOnRelease && t.slideToClosest()); 4983 } 4984 function C(e) { 4985 const { scrollbar: s, params: a } = t, 4986 i = s.el; 4987 if (!i) return; 4988 const r = i, 4989 n = !!a.passiveListeners && { passive: !1, capture: !1 }, 4990 l = !!a.passiveListeners && { passive: !0, capture: !1 }; 4991 if (!r) return; 4992 const d = "on" === e ? "addEventListener" : "removeEventListener"; 4993 r[d]("pointerdown", x, n), 4994 o[d]("pointermove", S, n), 4995 o[d]("pointerup", M, l); 4996 } 4997 function P() { 4998 const { scrollbar: e, el: s } = t; 4999 t.params.scrollbar = ne( 5000 t, 5001 t.originalParams.scrollbar, 5002 t.params.scrollbar, 5003 { el: "swiper-scrollbar" } 5004 ); 5005 const a = t.params.scrollbar; 5006 if (!a.el) return; 5007 let i, r; 5008 if ( 5009 ("string" == typeof a.el && 5010 t.isElement && 5011 (i = t.el.querySelector(a.el)), 5012 i || "string" != typeof a.el) 5013 ) 5014 i || (i = a.el); 5015 else if (((i = o.querySelectorAll(a.el)), !i.length)) return; 5016 t.params.uniqueNavElements && 5017 "string" == typeof a.el && 5018 i.length > 1 && 5019 1 === s.querySelectorAll(a.el).length && 5020 (i = s.querySelector(a.el)), 5021 i.length > 0 && (i = i[0]), 5022 i.classList.add( 5023 t.isHorizontal() ? a.horizontalClass : a.verticalClass 5024 ), 5025 i && 5026 ((r = i.querySelector(le(t.params.scrollbar.dragClass))), 5027 r || ((r = v("div", t.params.scrollbar.dragClass)), i.append(r))), 5028 Object.assign(e, { el: i, dragEl: r }), 5029 a.draggable && t.params.scrollbar.el && t.scrollbar.el && C("on"), 5030 i && 5031 i.classList[t.enabled ? "remove" : "add"]( 5032 ...n(t.params.scrollbar.lockClass) 5033 ); 5034 } 5035 function L() { 5036 const e = t.params.scrollbar, 5037 s = t.scrollbar.el; 5038 s && 5039 s.classList.remove( 5040 ...n(t.isHorizontal() ? e.horizontalClass : e.verticalClass) 5041 ), 5042 t.params.scrollbar.el && t.scrollbar.el && C("off"); 5043 } 5044 s({ 5045 scrollbar: { 5046 el: null, 5047 dragSize: "auto", 5048 hide: !1, 5049 draggable: !1, 5050 snapOnRelease: !0, 5051 lockClass: "swiper-scrollbar-lock", 5052 dragClass: "swiper-scrollbar-drag", 5053 scrollbarDisabledClass: "swiper-scrollbar-disabled", 5054 horizontalClass: "swiper-scrollbar-horizontal", 5055 verticalClass: "swiper-scrollbar-vertical", 5056 }, 5057 }), 5058 (t.scrollbar = { el: null, dragEl: null }), 5059 i("changeDirection", () => { 5060 if (!t.scrollbar || !t.scrollbar.el) return; 5061 const e = t.params.scrollbar; 5062 let { el: s } = t.scrollbar; 5063 (s = T(s)),
5064 s.forEach((s) => { 5065 s.classList.remove(e.horizontalClass, e.verticalClass), 5066 s.classList.add( 5067 t.isHorizontal() ? e.horizontalClass : e.verticalClass 5068 ); 5069 }); 5070 }), 5071 i("init", () => { 5072 !1 === t.params.scrollbar.enabled ? I() : (P(), b(), g()); 5073 }), 5074 i("update resize observerUpdate lock unlock changeDirection", () => { 5075 b(); 5076 }), 5077 i("setTranslate", () => { 5078 g(); 5079 }), 5080 i("setTransition", (e, s) => { 5081 !(function (e) { 5082 t.params.scrollbar.el && 5083 t.scrollbar.el && 5084 (t.scrollbar.dragEl.style.transitionDuration = `${e}ms`); 5085 })(s); 5086 }), 5087 i("enable disable", () => { 5088 const { el: e } = t.scrollbar; 5089 e && 5090 e.classList[t.enabled ? "remove" : "add"]( 5091 ...n(t.params.scrollbar.lockClass) 5092 ); 5093 }), 5094 i("destroy", () => { 5095 L(); 5096 }); 5097 const I = () => { 5098 t.el.classList.add(...n(t.params.scrollbar.scrollbarDisabledClass)), 5099 t.scrollbar.el && 5100 t.scrollbar.el.classList.add( 5101 ...n(t.params.scrollbar.scrollbarDisabledClass) 5102 ), 5103 L(); 5104 }; 5105 Object.assign(t.scrollbar, { 5106 enable: () => { 5107 t.el.classList.remove( 5108 ...n(t.params.scrollbar.scrollbarDisabledClass) 5109 ), 5110 t.scrollbar.el && 5111 t.scrollbar.el.classList.remove( 5112 ...n(t.params.scrollbar.scrollbarDisabledClass) 5113 ), 5114 P(), 5115 b(), 5116 g(); 5117 }, 5118 disable: I, 5119 updateSize: b, 5120 setTranslate: g, 5121 init: P, 5122 destroy: L, 5123 }); 5124 }, 5125 function (e) { 5126 let { swiper: t, extendParams: s, on: a } = e; 5127 s({ parallax: { enabled: !1 } }); 5128 const i = 5129 "[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]", 5130 r = (e, s) => { 5131 const { rtl: a } = t, 5132 i = a ? -1 : 1, 5133 r = e.getAttribute("data-swiper-parallax") || "0"; 5134 let n = e.getAttribute("data-swiper-parallax-x"), 5135 l = e.getAttribute("data-swiper-parallax-y"); 5136 const o = e.getAttribute("data-swiper-parallax-scale"), 5137 d = e.getAttribute("data-swiper-parallax-opacity"), 5138 c = e.getAttribute("data-swiper-parallax-rotate"); 5139 if ( 5140 (n || l 5141 ? ((n = n || "0"), (l = l || "0")) 5142 : t.isHorizontal() 5143 ? ((n = r), (l = "0")) 5144 : ((l = r), (n = "0")), 5145 (n = 5146 n.indexOf("%") >= 0 5147 ? parseInt(n, 10) * s * i + "%" 5148 : n * s * i + "px"), 5149 (l = 5150 l.indexOf("%") >= 0 ? parseInt(l, 10) * s + "%" : l * s + "px"), 5151 null != d) 5152 ) { 5153 const t = d - (d - 1) * (1 - Math.abs(s)); 5154 e.style.opacity = t; 5155 } 5156 let p = `translate3d(${n}, ${l}, 0px)`; 5157 if (null != o) { 5158 p += ` scale(${o - (o - 1) * (1 - Math.abs(s))})`; 5159 } 5160 if (c && null != c) { 5161 p += ` rotate(${c * s * -1}deg)`; 5162 } 5163 e.style.transform = p; 5164 }, 5165 n = () => { 5166 const { 5167 el: e, 5168 slides: s, 5169 progress: a, 5170 snapGrid: n, 5171 isElement: l, 5172 } = t, 5173 o = f(e, i); 5174 t.isElement && o.push(...f(t.hostEl, i)), 5175 o.forEach((e) => { 5176 r(e, a); 5177 }), 5178 s.forEach((e, s) => { 5179 let l = e.progress; 5180 t.params.slidesPerGroup > 1 && 5181 "auto" !== t.params.slidesPerView && 5182 (l += Math.ceil(s / 2) - a * (n.length - 1)),
5183 (l = Math.min(Math.max(l, -1), 1)), 5184 e 5185 .querySelectorAll(`${i}, [data-swiper-parallax-rotate]`) 5186 .forEach((e) => { 5187 r(e, l); 5188 }); 5189 }); 5190 }; 5191 a("beforeInit", () => { 5192 t.params.parallax.enabled && 5193 ((t.params.watchSlidesProgress = !0), 5194 (t.originalParams.watchSlidesProgress = !0)); 5195 }), 5196 a("init", () => { 5197 t.params.parallax.enabled && n(); 5198 }), 5199 a("setTranslate", () => { 5200 t.params.parallax.enabled && n(); 5201 }), 5202 a("setTransition", (e, s) => { 5203 t.params.parallax.enabled && 5204 (function (e) { 5205 void 0 === e && (e = t.params.speed); 5206 const { el: s, hostEl: a } = t, 5207 r = [...s.querySelectorAll(i)]; 5208 t.isElement && r.push(...a.querySelectorAll(i)), 5209 r.forEach((t) => { 5210 let s = 5211 parseInt( 5212 t.getAttribute("data-swiper-parallax-duration"), 5213 10 5214 ) || e; 5215 0 === e && (s = 0), (t.style.transitionDuration = `${s}ms`); 5216 }); 5217 })(s); 5218 }); 5219 }, 5220 function (e) { 5221 let { swiper: t, extendParams: s, on: a, emit: i } = e; 5222 const n = r(); 5223 s({ 5224 zoom: { 5225 enabled: !1, 5226 limitToOriginalSize: !1, 5227 maxRatio: 3, 5228 minRatio: 1, 5229 panOnMouseMove: !1, 5230 toggle: !0, 5231 containerClass: "swiper-zoom-container", 5232 zoomedSlideClass: "swiper-slide-zoomed", 5233 }, 5234 }), 5235 (t.zoom = { enabled: !1 }); 5236 let l = 1, 5237 o = !1, 5238 c = !1, 5239 p = { x: 0, y: 0 }; 5240 const u = -3; 5241 let m, h; 5242 const g = [], 5243 v = { 5244 originX: 0, 5245 originY: 0, 5246 slideEl: void 0, 5247 slideWidth: void 0, 5248 slideHeight: void 0, 5249 imageEl: void 0, 5250 imageWrapEl: void 0, 5251 maxRatio: 3, 5252 }, 5253 b = { 5254 isTouched: void 0, 5255 isMoved: void 0, 5256 currentX: void 0, 5257 currentY: void 0, 5258 minX: void 0, 5259 minY: void 0, 5260 maxX: void 0, 5261 maxY: void 0, 5262 width: void 0, 5263 height: void 0, 5264 startX: void 0, 5265 startY: void 0, 5266 touchesStart: {}, 5267 touchesCurrent: {}, 5268 }, 5269 y = { 5270 x: void 0, 5271 y: void 0, 5272 prevPositionX: void 0, 5273 prevPositionY: void 0, 5274 prevTime: void 0, 5275 }; 5276 let x, 5277 S = 1; 5278 function T() { 5279 if (g.length < 2) return 1; 5280 const e = g[0].pageX, 5281 t = g[0].pageY, 5282 s = g[1].pageX, 5283 a = g[1].pageY; 5284 return Math.sqrt((s - e) ** 2 + (a - t) ** 2); 5285 } 5286 function M() { 5287 const e = t.params.zoom, 5288 s = v.imageWrapEl.getAttribute("data-swiper-zoom") || e.maxRatio; 5289 if (e.limitToOriginalSize && v.imageEl && v.imageEl.naturalWidth) { 5290 const e = v.imageEl.naturalWidth / v.imageEl.offsetWidth; 5291 return Math.min(e, s); 5292 } 5293 return s; 5294 } 5295 function C(e) { 5296 const s = t.isElement ? "swiper-slide" : `.${t.params.slideClass}`; 5297 return ( 5298 !!e.target.matches(s) || 5299 t.slides.filter((t) => t.contains(e.target)).length > 0 5300 ); 5301 } 5302 function P(e) { 5303 const s = `.${t.params.zoom.containerClass}`; 5304 return ( 5305 !!e.target.matches(s) || 5306 [...t.hostEl.querySelectorAll(s)].filter((t) => t.contains(e.target)) 5307 .length > 0 5308 ); 5309 } 5310 function L(e) { 5311 if (("mouse" === e.pointerType && g.splice(0, g.length), !C(e))) return; 5312 const s = t.params.zoom; 5313 if (((m = !1), (h = !1), g.push(e), !(g.length < 2))) { 5314 if (((m = !0), (v.scaleStart = T()), !v.slideEl)) { 5315 (v.slideEl = e.target.closest( 5316 `.${t.params.slideClass}, swiper-slide` 5317 )), 5318 v.slideEl || (v.slideEl = t.slides[t.activeIndex]); 5319 let a = v.slideEl.querySelector(`.${s.containerClass}`); 5320 if ( 5321 (a && 5322 (a = a.querySelectorAll( 5323 "picture, img, svg, canvas, .swiper-zoom-target" 5324 )[0]), 5325 (v.imageEl = a), 5326 (v.imageWrapEl = a 5327 ? E(v.imageEl, `.${s.containerClass}`)[0] 5328 : void 0), 5329 !v.imageWrapEl) 5330 ) 5331 return void (v.imageEl = void 0); 5332 v.maxRatio = M(); 5333 } 5334 if (v.imageEl) { 5335 const [e, t] = (function () { 5336 if (g.length < 2) return { x: null, y: null }; 5337 const e = v.imageEl.getBoundingClientRect(); 5338 return [ 5339 (g[0].pageX + (g[1].pageX - g[0].pageX) / 2 - e.x - n.scrollX) / 5340 l, 5341 (g[0].pageY + (g[1].pageY - g[0].pageY) / 2 - e.y - n.scrollY) / 5342 l, 5343 ]; 5344 })(); 5345 (v.originX = e), 5346 (v.originY = t), 5347 (v.imageEl.style.transitionDuration = "0ms"); 5348 } 5349 o = !0; 5350 } 5351 } 5352 function I(e) { 5353 if (!C(e)) return; 5354 const s = t.params.zoom, 5355 a = t.zoom, 5356 i = g.findIndex((t) => t.pointerId === e.pointerId); 5357 i >= 0 && (g[i] = e), 5358 g.length < 2 || 5359 ((h = !0), 5360 (v.scaleMove = T()), 5361 v.imageEl && 5362 ((a.scale = (v.scaleMove / v.scaleStart) * l), 5363 a.scale > v.maxRatio && 5364 (a.scale = v.maxRatio - 1 + (a.scale - v.maxRatio + 1) ** 0.5), 5365 a.scale < s.minRatio && 5366 (a.scale = s.minRatio + 1 - (s.minRatio - a.scale + 1) ** 0.5),
5367 (v.imageEl.style.transform = `translate3d(0,0,0) scale(${a.scale})`))); 5368 } 5369 function z(e) { 5370 if (!C(e)) return; 5371 if ("mouse" === e.pointerType && "pointerout" === e.type) return; 5372 const s = t.params.zoom, 5373 a = t.zoom, 5374 i = g.findIndex((t) => t.pointerId === e.pointerId); 5375 i >= 0 && g.splice(i, 1), 5376 m && 5377 h && 5378 ((m = !1), 5379 (h = !1), 5380 v.imageEl && 5381 ((a.scale = Math.max(Math.min(a.scale, v.maxRatio), s.minRatio)), 5382 (v.imageEl.style.transitionDuration = `${t.params.speed}ms`), 5383 (v.imageEl.style.transform = `translate3d(0,0,0) scale(${a.scale})`), 5384 (l = a.scale), 5385 (o = !1), 5386 a.scale > 1 && v.slideEl 5387 ? v.slideEl.classList.add(`${s.zoomedSlideClass}`) 5388 : a.scale <= 1 && 5389 v.slideEl && 5390 v.slideEl.classList.remove(`${s.zoomedSlideClass}`), 5391 1 === a.scale && 5392 ((v.originX = 0), (v.originY = 0), (v.slideEl = void 0)))); 5393 } 5394 function A() { 5395 t.touchEventsData.preventTouchMoveFromPointerMove = !1; 5396 } 5397 function $(e) { 5398 const s = "mouse" === e.pointerType && t.params.zoom.panOnMouseMove; 5399 if (!C(e) || !P(e)) return; 5400 const a = t.zoom; 5401 if (!v.imageEl) return; 5402 if (!b.isTouched || !v.slideEl) return void (s && O(e)); 5403 if (s) return void O(e); 5404 b.isMoved || 5405 ((b.width = v.imageEl.offsetWidth || v.imageEl.clientWidth), 5406 (b.height = v.imageEl.offsetHeight || v.imageEl.clientHeight), 5407 (b.startX = d(v.imageWrapEl, "x") || 0), 5408 (b.startY = d(v.imageWrapEl, "y") || 0), 5409 (v.slideWidth = v.slideEl.offsetWidth), 5410 (v.slideHeight = v.slideEl.offsetHeight), 5411 (v.imageWrapEl.style.transitionDuration = "0ms")); 5412 const i = b.width * a.scale, 5413 r = b.height * a.scale; 5414 (b.minX = Math.min(v.slideWidth / 2 - i / 2, 0)), 5415 (b.maxX = -b.minX), 5416 (b.minY = Math.min(v.slideHeight / 2 - r / 2, 0)), 5417 (b.maxY = -b.minY), 5418 (b.touchesCurrent.x = g.length > 0 ? g[0].pageX : e.pageX), 5419 (b.touchesCurrent.y = g.length > 0 ? g[0].pageY : e.pageY); 5420 if ( 5421 (Math.max( 5422 Math.abs(b.touchesCurrent.x - b.touchesStart.x), 5423 Math.abs(b.touchesCurrent.y - b.touchesStart.y) 5424 ) > 5 && (t.allowClick = !1), 5425 !b.isMoved && !o) 5426 ) { 5427 if ( 5428 t.isHorizontal() && 5429 ((Math.floor(b.minX) === Math.floor(b.startX) && 5430 b.touchesCurrent.x < b.touchesStart.x) || 5431 (Math.floor(b.maxX) === Math.floor(b.startX) && 5432 b.touchesCurrent.x > b.touchesStart.x)) 5433 ) 5434 return (b.isTouched = !1), void A(); 5435 if ( 5436 !t.isHorizontal() && 5437 ((Math.floor(b.minY) === Math.floor(b.startY) && 5438 b.touchesCurrent.y < b.touchesStart.y) || 5439 (Math.floor(b.maxY) === Math.floor(b.startY) && 5440 b.touchesCurrent.y > b.touchesStart.y)) 5441 ) 5442 return (b.isTouched = !1), void A(); 5443 } 5444 e.cancelable && e.preventDefault(), 5445 e.stopPropagation(), 5446 clearTimeout(x), 5447 (t.touchEventsData.preventTouchMoveFromPointerMove = !0), 5448 (x = setTimeout(() => { 5449 t.destroyed || A(); 5450 })), 5451 (b.isMoved = !0); 5452 const n = (a.scale - l) / (v.maxRatio - t.params.zoom.minRatio), 5453 { originX: c, originY: p } = v; 5454 (b.currentX = 5455 b.touchesCurrent.x - 5456 b.touchesStart.x + 5457 b.startX + 5458 n * (b.width - 2 * c)), 5459 (b.currentY = 5460 b.touchesCurrent.y - 5461 b.touchesStart.y + 5462 b.startY + 5463 n * (b.height - 2 * p)), 5464 b.currentX < b.minX && 5465 (b.currentX = b.minX + 1 - (b.minX - b.currentX + 1) ** 0.8), 5466 b.currentX > b.maxX && 5467 (b.currentX = b.maxX - 1 + (b.currentX - b.maxX + 1) ** 0.8), 5468 b.currentY < b.minY && 5469 (b.currentY = b.minY + 1 - (b.minY - b.currentY + 1) ** 0.8), 5470 b.currentY > b.maxY && 5471 (b.currentY = b.maxY - 1 + (b.currentY - b.maxY + 1) ** 0.8), 5472 y.prevPositionX || (y.prevPositionX = b.touchesCurrent.x), 5473 y.prevPositionY || (y.prevPositionY = b.touchesCurrent.y), 5474 y.prevTime || (y.prevTime = Date.now()), 5475 (y.x = 5476 (b.touchesCurrent.x - y.prevPositionX) / 5477 (Date.now() - y.prevTime) / 5478 2), 5479 (y.y = 5480 (b.touchesCurrent.y - y.prevPositionY) / 5481 (Date.now() - y.prevTime) / 5482 2), 5483 Math.abs(b.touchesCurrent.x - y.prevPositionX) < 2 && (y.x = 0), 5484 Math.abs(b.touchesCurrent.y - y.prevPositionY) < 2 && (y.y = 0), 5485 (y.prevPositionX = b.touchesCurrent.x), 5486 (y.prevPositionY = b.touchesCurrent.y), 5487 (y.prevTime = Date.now()), 5488 (v.imageWrapEl.style.transform = `translate3d(${b.currentX}px, ${b.currentY}px,0)`); 5489 } 5490 function k() { 5491 const e = t.zoom; 5492 v.slideEl && 5493 t.activeIndex !== t.slides.indexOf(v.slideEl) && 5494 (v.imageEl &&
5495 (v.imageEl.style.transform = "translate3d(0,0,0) scale(1)"), 5496 v.imageWrapEl && 5497 (v.imageWrapEl.style.transform = "translate3d(0,0,0)"), 5498 v.slideEl.classList.remove(`${t.params.zoom.zoomedSlideClass}`), 5499 (e.scale = 1), 5500 (l = 1), 5501 (v.slideEl = void 0), 5502 (v.imageEl = void 0), 5503 (v.imageWrapEl = void 0), 5504 (v.originX = 0), 5505 (v.originY = 0)); 5506 } 5507 function O(e) { 5508 if (l <= 1 || !v.imageWrapEl) return; 5509 if (!C(e) || !P(e)) return; 5510 const t = n.getComputedStyle(v.imageWrapEl).transform, 5511 s = new n.DOMMatrix(t); 5512 if (!c) 5513 return ( 5514 (c = !0), 5515 (p.x = e.clientX), 5516 (p.y = e.clientY), 5517 (b.startX = s.e), 5518 (b.startY = s.f), 5519 (b.width = v.imageEl.offsetWidth || v.imageEl.clientWidth), 5520 (b.height = v.imageEl.offsetHeight || v.imageEl.clientHeight), 5521 (v.slideWidth = v.slideEl.offsetWidth), 5522 void (v.slideHeight = v.slideEl.offsetHeight) 5523 ); 5524 const a = (e.clientX - p.x) * u, 5525 i = (e.clientY - p.y) * u, 5526 r = b.width * l, 5527 o = b.height * l, 5528 d = v.slideWidth, 5529 m = v.slideHeight, 5530 h = Math.min(d / 2 - r / 2, 0), 5531 f = -h, 5532 g = Math.min(m / 2 - o / 2, 0), 5533 w = -g, 5534 y = Math.max(Math.min(b.startX + a, f), h), 5535 E = Math.max(Math.min(b.startY + i, w), g); 5536 (v.imageWrapEl.style.transitionDuration = "0ms"), 5537 (v.imageWrapEl.style.transform = `translate3d(${y}px, ${E}px, 0)`), 5538 (p.x = e.clientX), 5539 (p.y = e.clientY), 5540 (b.startX = y), 5541 (b.startY = E), 5542 (b.currentX = y), 5543 (b.currentY = E); 5544 } 5545 function D(e) { 5546 const s = t.zoom, 5547 a = t.params.zoom; 5548 if (!v.slideEl) { 5549 e && 5550 e.target && 5551 (v.slideEl = e.target.closest( 5552 `.${t.params.slideClass}, swiper-slide` 5553 )), 5554 v.slideEl || 5555 (t.params.virtual && t.params.virtual.enabled && t.virtual 5556 ? (v.slideEl = f( 5557 t.slidesEl, 5558 `.${t.params.slideActiveClass}` 5559 )[0]) 5560 : (v.slideEl = t.slides[t.activeIndex])); 5561 let s = v.slideEl.querySelector(`.${a.containerClass}`); 5562 s && 5563 (s = s.querySelectorAll( 5564 "picture, img, svg, canvas, .swiper-zoom-target" 5565 )[0]), 5566 (v.imageEl = s), 5567 (v.imageWrapEl = s 5568 ? E(v.imageEl, `.${a.containerClass}`)[0] 5569 : void 0); 5570 } 5571 if (!v.imageEl || !v.imageWrapEl) return; 5572 let i, r, o, d, c, p, u, m, h, g, y, x, S, T, C, P, L, I; 5573 t.params.cssMode && 5574 ((t.wrapperEl.style.overflow = "hidden"), 5575 (t.wrapperEl.style.touchAction = "none")), 5576 v.slideEl.classList.add(`${a.zoomedSlideClass}`), 5577 void 0 === b.touchesStart.x && e 5578 ? ((i = e.pageX), (r = e.pageY)) 5579 : ((i = b.touchesStart.x), (r = b.touchesStart.y)); 5580 const z = l, 5581 A = "number" == typeof e ? e : null; 5582 1 === l && 5583 A && 5584 ((i = void 0), 5585 (r = void 0), 5586 (b.touchesStart.x = void 0), 5587 (b.touchesStart.y = void 0)); 5588 const $ = M(); 5589 (s.scale = A || $), 5590 (l = A || $), 5591 !e || (1 === l && A) 5592 ? ((u = 0), (m = 0)) 5593 : ((L = v.slideEl.offsetWidth), 5594 (I = v.slideEl.offsetHeight), 5595 (o = w(v.slideEl).left + n.scrollX), 5596 (d = w(v.slideEl).top + n.scrollY), 5597 (c = o + L / 2 - i), 5598 (p = d + I / 2 - r), 5599 (h = v.imageEl.offsetWidth || v.imageEl.clientWidth), 5600 (g = v.imageEl.offsetHeight || v.imageEl.clientHeight), 5601 (y = h * s.scale), 5602 (x = g * s.scale), 5603 (S = Math.min(L / 2 - y / 2, 0)), 5604 (T = Math.min(I / 2 - x / 2, 0)), 5605 (C = -S), 5606 (P = -T), 5607 z > 0 && 5608 A && 5609 "number" == typeof b.currentX && 5610 "number" == typeof b.currentY 5611 ? ((u = (b.currentX * s.scale) / z), 5612 (m = (b.currentY * s.scale) / z)) 5613 : ((u = c * s.scale), (m = p * s.scale)), 5614 u < S && (u = S), 5615 u > C && (u = C), 5616 m < T && (m = T), 5617 m > P && (m = P)), 5618 A && 1 === s.scale && ((v.originX = 0), (v.originY = 0)), 5619 (b.currentX = u), 5620 (b.currentY = m), 5621 (v.imageWrapEl.style.transitionDuration = "300ms"), 5622 (v.imageWrapEl.style.transform = `translate3d(${u}px, ${m}px,0)`), 5623 (v.imageEl.style.transitionDuration = "300ms"),
5624 (v.imageEl.style.transform = `translate3d(0,0,0) scale(${s.scale})`); 5625 } 5626 function G() { 5627 const e = t.zoom, 5628 s = t.params.zoom; 5629 if (!v.slideEl) { 5630 t.params.virtual && t.params.virtual.enabled && t.virtual 5631 ? (v.slideEl = f(t.slidesEl, `.${t.params.slideActiveClass}`)[0]) 5632 : (v.slideEl = t.slides[t.activeIndex]); 5633 let e = v.slideEl.querySelector(`.${s.containerClass}`); 5634 e && 5635 (e = e.querySelectorAll( 5636 "picture, img, svg, canvas, .swiper-zoom-target" 5637 )[0]), 5638 (v.imageEl = e), 5639 (v.imageWrapEl = e 5640 ? E(v.imageEl, `.${s.containerClass}`)[0] 5641 : void 0); 5642 } 5643 v.imageEl && 5644 v.imageWrapEl && 5645 (t.params.cssMode && 5646 ((t.wrapperEl.style.overflow = ""), 5647 (t.wrapperEl.style.touchAction = "")), 5648 (e.scale = 1), 5649 (l = 1), 5650 (b.currentX = void 0), 5651 (b.currentY = void 0), 5652 (b.touchesStart.x = void 0), 5653 (b.touchesStart.y = void 0), 5654 (v.imageWrapEl.style.transitionDuration = "300ms"), 5655 (v.imageWrapEl.style.transform = "translate3d(0,0,0)"), 5656 (v.imageEl.style.transitionDuration = "300ms"), 5657 (v.imageEl.style.transform = "translate3d(0,0,0) scale(1)"), 5658 v.slideEl.classList.remove(`${s.zoomedSlideClass}`), 5659 (v.slideEl = void 0), 5660 (v.originX = 0), 5661 (v.originY = 0), 5662 t.params.zoom.panOnMouseMove && 5663 ((p = { x: 0, y: 0 }), 5664 c && ((c = !1), (b.startX = 0), (b.startY = 0)))); 5665 } 5666 function X(e) { 5667 const s = t.zoom; 5668 s.scale && 1 !== s.scale ? G() : D(e); 5669 } 5670 function Y() { 5671 return { 5672 passiveListener: !!t.params.passiveListeners && { 5673 passive: !0, 5674 capture: !1, 5675 }, 5676 activeListenerWithCapture: !t.params.passiveListeners || { 5677 passive: !1, 5678 capture: !0, 5679 }, 5680 }; 5681 } 5682 function B() { 5683 const e = t.zoom; 5684 if (e.enabled) return; 5685 e.enabled = !0; 5686 const { passiveListener: s, activeListenerWithCapture: a } = Y(); 5687 t.wrapperEl.addEventListener("pointerdown", L, s), 5688 t.wrapperEl.addEventListener("pointermove", I, a), 5689 ["pointerup", "pointercancel", "pointerout"].forEach((e) => { 5690 t.wrapperEl.addEventListener(e, z, s); 5691 }), 5692 t.wrapperEl.addEventListener("pointermove", $, a); 5693 } 5694 function H() { 5695 const e = t.zoom; 5696 if (!e.enabled) return; 5697 e.enabled = !1; 5698 const { passiveListener: s, activeListenerWithCapture: a } = Y(); 5699 t.wrapperEl.removeEventListener("pointerdown", L, s), 5700 t.wrapperEl.removeEventListener("pointermove", I, a), 5701 ["pointerup", "pointercancel", "pointerout"].forEach((e) => { 5702 t.wrapperEl.removeEventListener(e, z, s); 5703 }), 5704 t.wrapperEl.removeEventListener("pointermove", $, a); 5705 } 5706 Object.defineProperty(t.zoom, "scale", { 5707 get: () => S, 5708 set(e) { 5709 if (S !== e) { 5710 const t = v.imageEl, 5711 s = v.slideEl; 5712 i("zoomChange", e, t, s); 5713 } 5714 S = e; 5715 }, 5716 }), 5717 a("init", () => { 5718 t.params.zoom.enabled && B(); 5719 }), 5720 a("destroy", () => { 5721 H(); 5722 }), 5723 a("touchStart", (e, s) => { 5724 t.zoom.enabled && 5725 (function (e) { 5726 const s = t.device; 5727 if (!v.imageEl) return; 5728 if (b.isTouched) return; 5729 s.android && e.cancelable && e.preventDefault(), 5730 (b.isTouched = !0); 5731 const a = g.length > 0 ? g[0] : e; 5732 (b.touchesStart.x = a.pageX), (b.touchesStart.y = a.pageY); 5733 })(s); 5734 }), 5735 a("touchEnd", (e, s) => { 5736 t.zoom.enabled && 5737 (function () { 5738 const e = t.zoom; 5739 if (((g.length = 0), !v.imageEl)) return; 5740 if (!b.isTouched || !b.isMoved) 5741 return (b.isTouched = !1), void (b.isMoved = !1); 5742 (b.isTouched = !1), (b.isMoved = !1); 5743 let s = 300, 5744 a = 300; 5745 const i = y.x * s, 5746 r = b.currentX + i, 5747 n = y.y * a, 5748 l = b.currentY + n; 5749 0 !== y.x && (s = Math.abs((r - b.currentX) / y.x)), 5750 0 !== y.y && (a = Math.abs((l - b.currentY) / y.y)); 5751 const o = Math.max(s, a); 5752 (b.currentX = r), (b.currentY = l); 5753 const d = b.width * e.scale, 5754 c = b.height * e.scale; 5755 (b.minX = Math.min(v.slideWidth / 2 - d / 2, 0)), 5756 (b.maxX = -b.minX), 5757 (b.minY = Math.min(v.slideHeight / 2 - c / 2, 0)), 5758 (b.maxY = -b.minY), 5759 (b.currentX = Math.max(Math.min(b.currentX, b.maxX), b.minX)), 5760 (b.currentY = Math.max(Math.min(b.currentY, b.maxY), b.minY)), 5761 (v.imageWrapEl.style.transitionDuration = `${o}ms`), 5762 (v.imageWrapEl.style.transform = `translate3d(${b.currentX}px, ${b.currentY}px,0)`); 5763 })(); 5764 }), 5765 a("doubleTap", (e, s) => { 5766 !t.animating && 5767 t.params.zoom.enabled && 5768 t.zoom.enabled && 5769 t.params.zoom.toggle && 5770 X(s); 5771 }), 5772 a("transitionEnd", () => { 5773 t.zoom.enabled && t.params.zoom.enabled && k(); 5774 }), 5775 a("slideChange", () => { 5776 t.zoom.enabled && t.params.zoom.enabled && t.params.cssMode && k(); 5777 }), 5778 Object.assign(t.zoom, { 5779 enable: B, 5780 disable: H, 5781 in: D, 5782 out: G, 5783 toggle: X, 5784 }); 5785 }, 5786 function (e) { 5787 let { swiper: t, extendParams: s, on: a } = e; 5788 function i(e, t) { 5789 const s = (function () { 5790 let e, t, s; 5791 return (a, i) => { 5792 for (t = -1, e = a.length; e - t > 1; ) 5793 (s = (e + t) >> 1), a[s] <= i ? (t = s) : (e = s); 5794 return e; 5795 }; 5796 })(); 5797 let a, i; 5798 return ( 5799 (this.x = e), 5800 (this.y = t), 5801 (this.lastIndex = e.length - 1), 5802 (this.interpolate = function (e) { 5803 return e 5804 ? ((i = s(this.x, e)), 5805 (a = i - 1), 5806 ((e - this.x[a]) * (this.y[i] - this.y[a])) / 5807 (this.x[i] - this.x[a]) + 5808 this.y[a]) 5809 : 0; 5810 }), 5811 this 5812 ); 5813 } 5814 function r() { 5815 t.controller.control && 5816 t.controller.spline && 5817 ((t.controller.spline = void 0), delete t.controller.spline); 5818 } 5819 s({ controller: { control: void 0, inverse: !1, by: "slide" } }), 5820 (t.controller = { control: void 0 }), 5821 a("beforeInit", () => { 5822 if ( 5823 "undefined" != typeof window && 5824 ("string" == typeof t.params.controller.control || 5825 t.params.controller.control instanceof HTMLElement) 5826 ) { 5827 ("string" == typeof t.params.controller.control 5828 ? [...document.querySelectorAll(t.params.controller.control)] 5829 : [t.params.controller.control] 5830 ).forEach((e) => { 5831 if ( 5832 (t.controller.control || (t.controller.control = []), 5833 e && e.swiper) 5834 ) 5835 t.controller.control.push(e.swiper); 5836 else if (e) { 5837 const s = `${t.params.eventsPrefix}init`, 5838 a = (i) => { 5839 t.controller.control.push(i.detail[0]),
5840 t.update(), 5841 e.removeEventListener(s, a); 5842 }; 5843 e.addEventListener(s, a); 5844 } 5845 }); 5846 } else t.controller.control = t.params.controller.control; 5847 }), 5848 a("update", () => { 5849 r(); 5850 }), 5851 a("resize", () => { 5852 r(); 5853 }), 5854 a("observerUpdate", () => { 5855 r(); 5856 }), 5857 a("setTranslate", (e, s, a) => { 5858 t.controller.control && 5859 !t.controller.control.destroyed && 5860 t.controller.setTranslate(s, a); 5861 }), 5862 a("setTransition", (e, s, a) => { 5863 t.controller.control && 5864 !t.controller.control.destroyed && 5865 t.controller.setTransition(s, a); 5866 }), 5867 Object.assign(t.controller, { 5868 setTranslate: function (e, s) { 5869 const a = t.controller.control; 5870 let r, n; 5871 const l = t.constructor; 5872 function o(e) { 5873 if (e.destroyed) return; 5874 const s = t.rtlTranslate ? -t.translate : t.translate; 5875 "slide" === t.params.controller.by && 5876 (!(function (e) { 5877 t.controller.spline = t.params.loop 5878 ? new i(t.slidesGrid, e.slidesGrid) 5879 : new i(t.snapGrid, e.snapGrid); 5880 })(e), 5881 (n = -t.controller.spline.interpolate(-s))), 5882 (n && "container" !== t.params.controller.by) || 5883 ((r = 5884 (e.maxTranslate() - e.minTranslate()) / 5885 (t.maxTranslate() - t.minTranslate())), 5886 (!Number.isNaN(r) && Number.isFinite(r)) || (r = 1), 5887 (n = (s - t.minTranslate()) * r + e.minTranslate())), 5888 t.params.controller.inverse && (n = e.maxTranslate() - n), 5889 e.updateProgress(n), 5890 e.setTranslate(n, t), 5891 e.updateActiveIndex(), 5892 e.updateSlidesClasses(); 5893 } 5894 if (Array.isArray(a)) 5895 for (let e = 0; e < a.length; e += 1) 5896 a[e] !== s && a[e] instanceof l && o(a[e]); 5897 else a instanceof l && s !== a && o(a); 5898 }, 5899 setTransition: function (e, s) { 5900 const a = t.constructor, 5901 i = t.controller.control; 5902 let r; 5903 function n(s) { 5904 s.destroyed || 5905 (s.setTransition(e, t), 5906 0 !== e && 5907 (s.transitionStart(), 5908 s.params.autoHeight && 5909 l(() => { 5910 s.updateAutoHeight(); 5911 }), 5912 x(s.wrapperEl, () => { 5913 i && s.transitionEnd(); 5914 }))); 5915 } 5916 if (Array.isArray(i)) 5917 for (r = 0; r < i.length; r += 1) 5918 i[r] !== s && i[r] instanceof a && n(i[r]); 5919 else i instanceof a && s !== i && n(i); 5920 }, 5921 }); 5922 }, 5923 function (e) { 5924 let { swiper: t, extendParams: s, on: i } = e; 5925 s({ 5926 a11y: { 5927 enabled: !0, 5928 notificationClass: "swiper-notification", 5929 prevSlideMessage: "Previous slide", 5930 nextSlideMessage: "Next slide", 5931 firstSlideMessage: "This is the first slide", 5932 lastSlideMessage: "This is the last slide", 5933 paginationBulletMessage: "Go to slide {{index}}", 5934 slideLabelMessage: "{{index}} / {{slidesLength}}", 5935 containerMessage: null, 5936 containerRoleDescriptionMessage: null, 5937 containerRole: null, 5938 itemRoleDescriptionMessage: null, 5939 slideRole: "group", 5940 id: null, 5941 scrollOnFocus: !0, 5942 }, 5943 }), 5944 (t.a11y = { clicked: !1 }); 5945 let r, 5946 n, 5947 l = null, 5948 o = new Date().getTime(); 5949 function d(e) { 5950 const t = l; 5951 0 !== t.length && C(t, e); 5952 } 5953 function c(e) {
5954 (e = T(e)).forEach((e) => { 5955 e.setAttribute("tabIndex", "0"); 5956 }); 5957 } 5958 function p(e) { 5959 (e = T(e)).forEach((e) => { 5960 e.setAttribute("tabIndex", "-1"); 5961 }); 5962 } 5963 function u(e, t) { 5964 (e = T(e)).forEach((e) => { 5965 e.setAttribute("role", t); 5966 }); 5967 } 5968 function m(e, t) { 5969 (e = T(e)).forEach((e) => { 5970 e.setAttribute("aria-roledescription", t); 5971 }); 5972 } 5973 function h(e, t) { 5974 (e = T(e)).forEach((e) => { 5975 e.setAttribute("aria-label", t); 5976 }); 5977 } 5978 function f(e) { 5979 (e = T(e)).forEach((e) => { 5980 e.setAttribute("aria-disabled", !0); 5981 }); 5982 } 5983 function g(e) { 5984 (e = T(e)).forEach((e) => { 5985 e.setAttribute("aria-disabled", !1); 5986 }); 5987 } 5988 function w(e) { 5989 if (13 !== e.keyCode && 32 !== e.keyCode) return; 5990 const s = t.params.a11y, 5991 a = e.target; 5992 if ( 5993 !t.pagination || 5994 !t.pagination.el || 5995 (a !== t.pagination.el && !t.pagination.el.contains(e.target)) || 5996 e.target.matches(le(t.params.pagination.bulletClass)) 5997 ) { 5998 if (t.navigation && t.navigation.prevEl && t.navigation.nextEl) { 5999 const e = T(t.navigation.prevEl); 6000 T(t.navigation.nextEl).includes(a) && 6001 ((t.isEnd && !t.params.loop) || t.slideNext(), 6002 t.isEnd ? d(s.lastSlideMessage) : d(s.nextSlideMessage)), 6003 e.includes(a) && 6004 ((t.isBeginning && !t.params.loop) || t.slidePrev(), 6005 t.isBeginning ? d(s.firstSlideMessage) : d(s.prevSlideMessage)); 6006 } 6007 t.pagination && 6008 a.matches(le(t.params.pagination.bulletClass)) && 6009 a.click(); 6010 } 6011 } 6012 function b() { 6013 return ( 6014 t.pagination && t.pagination.bullets && t.pagination.bullets.length 6015 ); 6016 } 6017 function E() { 6018 return b() && t.params.pagination.clickable; 6019 } 6020 const x = (e, t, s) => { 6021 c(e), 6022 "BUTTON" !== e.tagName && 6023 (u(e, "button"), e.addEventListener("keydown", w)), 6024 h(e, s), 6025 (function (e, t) {
6026 (e = T(e)).forEach((e) => { 6027 e.setAttribute("aria-controls", t); 6028 }); 6029 })(e, t); 6030 }, 6031 S = (e) => { 6032 n && n !== e.target && !n.contains(e.target) && (r = !0), 6033 (t.a11y.clicked = !0); 6034 }, 6035 M = () => { 6036 (r = !1), 6037 requestAnimationFrame(() => { 6038 requestAnimationFrame(() => { 6039 t.destroyed || (t.a11y.clicked = !1); 6040 }); 6041 }); 6042 }, 6043 P = (e) => { 6044 o = new Date().getTime(); 6045 }, 6046 L = (e) => { 6047 if (t.a11y.clicked || !t.params.a11y.scrollOnFocus) return; 6048 if (new Date().getTime() - o < 100) return; 6049 const s = e.target.closest(`.${t.params.slideClass}, swiper-slide`); 6050 if (!s || !t.slides.includes(s)) return; 6051 n = s; 6052 const a = t.slides.indexOf(s) === t.activeIndex, 6053 i = 6054 t.params.watchSlidesProgress && 6055 t.visibleSlides && 6056 t.visibleSlides.includes(s); 6057 a || 6058 i || 6059 (e.sourceCapabilities && e.sourceCapabilities.firesTouchEvents) || 6060 (t.isHorizontal() ? (t.el.scrollLeft = 0) : (t.el.scrollTop = 0), 6061 requestAnimationFrame(() => { 6062 r || 6063 (t.params.loop 6064 ? t.slideToLoop( 6065 parseInt(s.getAttribute("data-swiper-slide-index")), 6066 0 6067 ) 6068 : t.slideTo(t.slides.indexOf(s), 0), 6069 (r = !1)); 6070 })); 6071 }, 6072 I = () => { 6073 const e = t.params.a11y; 6074 e.itemRoleDescriptionMessage && 6075 m(t.slides, e.itemRoleDescriptionMessage), 6076 e.slideRole && u(t.slides, e.slideRole); 6077 const s = t.slides.length; 6078 e.slideLabelMessage && 6079 t.slides.forEach((a, i) => { 6080 const r = t.params.loop 6081 ? parseInt(a.getAttribute("data-swiper-slide-index"), 10) 6082 : i; 6083 h( 6084 a, 6085 e.slideLabelMessage 6086 .replace(/\{\{index\}\}/, r + 1) 6087 .replace(/\{\{slidesLength\}\}/, s) 6088 ); 6089 }); 6090 }, 6091 z = () => { 6092 const e = t.params.a11y; 6093 t.el.append(l); 6094 const s = t.el; 6095 e.containerRoleDescriptionMessage && 6096 m(s, e.containerRoleDescriptionMessage), 6097 e.containerMessage && h(s, e.containerMessage), 6098 e.containerRole && u(s, e.containerRole); 6099 const i = t.wrapperEl, 6100 r = 6101 e.id || 6102 i.getAttribute("id") || 6103 `swiper-wrapper-${ 6104 ((n = 16), 6105 void 0 === n && (n = 16), 6106 "x" 6107 .repeat(n) 6108 .replace(/x/g, () => 6109 Math.round(16 * Math.random()).toString(16) 6110 )) 6111 }`; 6112 var n; 6113 const o = 6114 t.params.autoplay && t.params.autoplay.enabled ? "off" : "polite"; 6115 var d; 6116 (d = r), 6117 T(i).forEach((e) => { 6118 e.setAttribute("id", d); 6119 }), 6120 (function (e, t) {
6121 (e = T(e)).forEach((e) => { 6122 e.setAttribute("aria-live", t); 6123 }); 6124 })(i, o), 6125 I(); 6126 let { nextEl: c, prevEl: p } = t.navigation ? t.navigation : {}; 6127 if ( 6128 ((c = T(c)), 6129 (p = T(p)), 6130 c && c.forEach((t) => x(t, r, e.nextSlideMessage)), 6131 p && p.forEach((t) => x(t, r, e.prevSlideMessage)), 6132 E()) 6133 ) { 6134 T(t.pagination.el).forEach((e) => { 6135 e.addEventListener("keydown", w); 6136 }); 6137 } 6138 a().addEventListener("visibilitychange", P), 6139 t.el.addEventListener("focus", L, !0), 6140 t.el.addEventListener("focus", L, !0), 6141 t.el.addEventListener("pointerdown", S, !0), 6142 t.el.addEventListener("pointerup", M, !0); 6143 }; 6144 i("beforeInit", () => { 6145 (l = v("span", t.params.a11y.notificationClass)), 6146 l.setAttribute("aria-live", "assertive"), 6147 l.setAttribute("aria-atomic", "true"); 6148 }), 6149 i("afterInit", () => { 6150 t.params.a11y.enabled && z(); 6151 }), 6152 i( 6153 "slidesLengthChange snapGridLengthChange slidesGridLengthChange", 6154 () => { 6155 t.params.a11y.enabled && I(); 6156 } 6157 ), 6158 i("fromEdge toEdge afterInit lock unlock", () => { 6159 t.params.a11y.enabled && 6160 (function () { 6161 if (t.params.loop || t.params.rewind || !t.navigation) return; 6162 const { nextEl: e, prevEl: s } = t.navigation; 6163 s && (t.isBeginning ? (f(s), p(s)) : (g(s), c(s))), 6164 e && (t.isEnd ? (f(e), p(e)) : (g(e), c(e))); 6165 })(); 6166 }), 6167 i("paginationUpdate", () => { 6168 t.params.a11y.enabled && 6169 (function () { 6170 const e = t.params.a11y; 6171 b() && 6172 t.pagination.bullets.forEach((s) => { 6173 t.params.pagination.clickable && 6174 (c(s), 6175 t.params.pagination.renderBullet || 6176 (u(s, "button"), 6177 h( 6178 s, 6179 e.paginationBulletMessage.replace( 6180 /\{\{index\}\}/, 6181 y(s) + 1 6182 ) 6183 ))), 6184 s.matches(le(t.params.pagination.bulletActiveClass)) 6185 ? s.setAttribute("aria-current", "true") 6186 : s.removeAttribute("aria-current"); 6187 }); 6188 })(); 6189 }), 6190 i("destroy", () => { 6191 t.params.a11y.enabled && 6192 (function () { 6193 l && l.remove(); 6194 let { nextEl: e, prevEl: s } = t.navigation ? t.navigation : {}; 6195 (e = T(e)), 6196 (s = T(s)), 6197 e && e.forEach((e) => e.removeEventListener("keydown", w)), 6198 s && s.forEach((e) => e.removeEventListener("keydown", w)), 6199 E() && 6200 T(t.pagination.el).forEach((e) => { 6201 e.removeEventListener("keydown", w); 6202 }); 6203 a().removeEventListener("visibilitychange", P), 6204 t.el && 6205 "string" != typeof t.el && 6206 (t.el.removeEventListener("focus", L, !0), 6207 t.el.removeEventListener("pointerdown", S, !0), 6208 t.el.removeEventListener("pointerup", M, !0)); 6209 })(); 6210 }); 6211 }, 6212 function (e) { 6213 let { swiper: t, extendParams: s, on: a } = e; 6214 s({ 6215 history: { 6216 enabled: !1, 6217 root: "", 6218 replaceState: !1, 6219 key: "slides", 6220 keepQuery: !1, 6221 }, 6222 }); 6223 let i = !1, 6224 n = {}; 6225 const l = (e) => 6226 e 6227 .toString() 6228 .replace(/\s+/g, "-") 6229 .replace(/[^\w-]+/g, "") 6230 .replace(/--+/g, "-") 6231 .replace(/^-+/, "") 6232 .replace(/-+$/, ""), 6233 o = (e) => { 6234 const t = r(); 6235 let s; 6236 s = e ? new URL(e) : t.location; 6237 const a = s.pathname 6238 .slice(1) 6239 .split("/") 6240 .filter((e) => "" !== e), 6241 i = a.length; 6242 return { key: a[i - 2], value: a[i - 1] }; 6243 }, 6244 d = (e, s) => { 6245 const a = r(); 6246 if (!i || !t.params.history.enabled) return; 6247 let n; 6248 n = t.params.url ? new URL(t.params.url) : a.location; 6249 const o = 6250 t.virtual && t.params.virtual.enabled 6251 ? t.slidesEl.querySelector(`[data-swiper-slide-index="${s}"]`) 6252 : t.slides[s]; 6253 let d = l(o.getAttribute("data-history")); 6254 if (t.params.history.root.length > 0) { 6255 let s = t.params.history.root; 6256 "/" === s[s.length - 1] && (s = s.slice(0, s.length - 1)), 6257 (d = `${s}/${e ? `${e}/` : ""}${d}`); 6258 } else n.pathname.includes(e) || (d = `${e ? `${e}/` : ""}${d}`); 6259 t.params.history.keepQuery && (d += n.search); 6260 const c = a.history.state; 6261 (c && c.value === d) || 6262 (t.params.history.replaceState 6263 ? a.history.replaceState({ value: d }, null, d) 6264 : a.history.pushState({ value: d }, null, d)); 6265 }, 6266 c = (e, s, a) => { 6267 if (s) 6268 for (let i = 0, r = t.slides.length; i < r; i += 1) { 6269 const r = t.slides[i]; 6270 if (l(r.getAttribute("data-history")) === s) { 6271 const s = t.getSlideIndex(r); 6272 t.slideTo(s, e, a); 6273 } 6274 } 6275 else t.slideTo(0, e, a); 6276 }, 6277 p = () => { 6278 (n = o(t.params.url)), c(t.params.speed, n.value, !1); 6279 }; 6280 a("init", () => { 6281 t.params.history.enabled && 6282 (() => { 6283 const e = r(); 6284 if (t.params.history) { 6285 if (!e.history || !e.history.pushState) 6286 return ( 6287 (t.params.history.enabled = !1), 6288 void (t.params.hashNavigation.enabled = !0) 6289 ); 6290 (i = !0), 6291 (n = o(t.params.url)), 6292 n.key || n.value 6293 ? (c(0, n.value, t.params.runCallbacksOnInit), 6294 t.params.history.replaceState || 6295 e.addEventListener("popstate", p)) 6296 : t.params.history.replaceState || 6297 e.addEventListener("popstate", p); 6298 } 6299 })(); 6300 }), 6301 a("destroy", () => { 6302 t.params.history.enabled && 6303 (() => { 6304 const e = r(); 6305 t.params.history.replaceState || 6306 e.removeEventListener("popstate", p); 6307 })(); 6308 }), 6309 a("transitionEnd _freeModeNoMomentumRelease", () => { 6310 i && d(t.params.history.key, t.activeIndex); 6311 }), 6312 a("slideChange", () => { 6313 i && t.params.cssMode && d(t.params.history.key, t.activeIndex); 6314 }); 6315 }, 6316 function (e) { 6317 let { swiper: t, extendParams: s, emit: i, on: n } = e, 6318 l = !1; 6319 const o = a(), 6320 d = r(); 6321 s({ 6322 hashNavigation: { 6323 enabled: !1, 6324 replaceState: !1, 6325 watchState: !1, 6326 getSlideIndex(e, s) { 6327 if (t.virtual && t.params.virtual.enabled) { 6328 const e = t.slides.find((e) => e.getAttribute("data-hash") === s); 6329 if (!e) return 0; 6330 return parseInt(e.getAttribute("data-swiper-slide-index"), 10); 6331 } 6332 return t.getSlideIndex( 6333 f( 6334 t.slidesEl, 6335 `.${t.params.slideClass}[data-hash="${s}"], swiper-slide[data-hash="${s}"]` 6336 )[0] 6337 ); 6338 }, 6339 }, 6340 }); 6341 const c = () => { 6342 i("hashChange"); 6343 const e = o.location.hash.replace("#", ""), 6344 s = 6345 t.virtual && t.params.virtual.enabled 6346 ? t.slidesEl.querySelector( 6347 `[data-swiper-slide-index="${t.activeIndex}"]` 6348 ) 6349 : t.slides[t.activeIndex]; 6350 if (e !== (s ? s.getAttribute("data-hash") : "")) { 6351 const s = t.params.hashNavigation.getSlideIndex(t, e); 6352 if (void 0 === s || Number.isNaN(s)) return; 6353 t.slideTo(s); 6354 } 6355 }, 6356 p = () => { 6357 if (!l || !t.params.hashNavigation.enabled) return; 6358 const e = 6359 t.virtual && t.params.virtual.enabled 6360 ? t.slidesEl.querySelector( 6361 `[data-swiper-slide-index="${t.activeIndex}"]` 6362 ) 6363 : t.slides[t.activeIndex], 6364 s = e 6365 ? e.getAttribute("data-hash") || e.getAttribute("data-history") 6366 : ""; 6367 t.params.hashNavigation.replaceState && 6368 d.history && 6369 d.history.replaceState 6370 ? (d.history.replaceState(null, null, `#${s}` || ""), i("hashSet")) 6371 : ((o.location.hash = s || ""), i("hashSet")); 6372 }; 6373 n("init", () => { 6374 t.params.hashNavigation.enabled && 6375 (() => { 6376 if ( 6377 !t.params.hashNavigation.enabled || 6378 (t.params.history && t.params.history.enabled) 6379 ) 6380 return; 6381 l = !0; 6382 const e = o.location.hash.replace("#", ""); 6383 if (e) { 6384 const s = 0, 6385 a = t.params.hashNavigation.getSlideIndex(t, e); 6386 t.slideTo(a || 0, s, t.params.runCallbacksOnInit, !0); 6387 } 6388 t.params.hashNavigation.watchState && 6389 d.addEventListener("hashchange", c); 6390 })(); 6391 }), 6392 n("destroy", () => { 6393 t.params.hashNavigation.enabled && 6394 t.params.hashNavigation.watchState && 6395 d.removeEventListener("hashchange", c); 6396 }), 6397 n("transitionEnd _freeModeNoMomentumRelease", () => { 6398 l && p(); 6399 }), 6400 n("slideChange", () => { 6401 l && t.params.cssMode && p(); 6402 }); 6403 }, 6404 function (e) { 6405 let t, 6406 s, 6407 { swiper: i, extendParams: r, on: n, emit: l, params: o } = e; 6408 (i.autoplay = { running: !1, paused: !1, timeLeft: 0 }), 6409 r({ 6410 autoplay: { 6411 enabled: !1, 6412 delay: 3e3, 6413 waitForTransition: !0, 6414 disableOnInteraction: !1, 6415 stopOnLastSlide: !1, 6416 reverseDirection: !1, 6417 pauseOnMouseEnter: !1, 6418 }, 6419 }); 6420 let d, 6421 c, 6422 p, 6423 u, 6424 m, 6425 h, 6426 f, 6427 g, 6428 v = o && o.autoplay ? o.autoplay.delay : 3e3, 6429 w = o && o.autoplay ? o.autoplay.delay : 3e3, 6430 b = new Date().getTime(); 6431 function y(e) { 6432 i && 6433 !i.destroyed && 6434 i.wrapperEl && 6435 e.target === i.wrapperEl && 6436 (i.wrapperEl.removeEventListener("transitionend", y), 6437 g || (e.detail && e.detail.bySwiperTouchMove) || C()); 6438 } 6439 const E = () => { 6440 if (i.destroyed || !i.autoplay.running) return; 6441 i.autoplay.paused ? (c = !0) : c && ((w = d), (c = !1));
6442 const e = i.autoplay.paused ? d : b + w - new Date().getTime(); 6443 (i.autoplay.timeLeft = e), 6444 l("autoplayTimeLeft", e, e / v), 6445 (s = requestAnimationFrame(() => { 6446 E(); 6447 })); 6448 }, 6449 x = (e) => { 6450 if (i.destroyed || !i.autoplay.running) return; 6451 cancelAnimationFrame(s), E(); 6452 let a = void 0 === e ? i.params.autoplay.delay : e; 6453 (v = i.params.autoplay.delay), (w = i.params.autoplay.delay); 6454 const r = (() => { 6455 let e; 6456 if ( 6457 ((e = 6458 i.virtual && i.params.virtual.enabled 6459 ? i.slides.find((e) => 6460 e.classList.contains("swiper-slide-active") 6461 ) 6462 : i.slides[i.activeIndex]), 6463 !e) 6464 ) 6465 return; 6466 return parseInt(e.getAttribute("data-swiper-autoplay"), 10); 6467 })(); 6468 !Number.isNaN(r) && 6469 r > 0 && 6470 void 0 === e && 6471 ((a = r), (v = r), (w = r)), 6472 (d = a); 6473 const n = i.params.speed, 6474 o = () => { 6475 i && 6476 !i.destroyed && 6477 (i.params.autoplay.reverseDirection 6478 ? !i.isBeginning || i.params.loop || i.params.rewind 6479 ? (i.slidePrev(n, !0, !0), l("autoplay")) 6480 : i.params.autoplay.stopOnLastSlide || 6481 (i.slideTo(i.slides.length - 1, n, !0, !0), l("autoplay")) 6482 : !i.isEnd || i.params.loop || i.params.rewind 6483 ? (i.slideNext(n, !0, !0), l("autoplay")) 6484 : i.params.autoplay.stopOnLastSlide || 6485 (i.slideTo(0, n, !0, !0), l("autoplay")), 6486 i.params.cssMode && 6487 ((b = new Date().getTime()), 6488 requestAnimationFrame(() => { 6489 x(); 6490 }))); 6491 }; 6492 return ( 6493 a > 0 6494 ? (clearTimeout(t), 6495 (t = setTimeout(() => { 6496 o(); 6497 }, a))) 6498 : requestAnimationFrame(() => { 6499 o(); 6500 }), 6501 a 6502 ); 6503 }, 6504 S = () => { 6505 (b = new Date().getTime()), 6506 (i.autoplay.running = !0), 6507 x(), 6508 l("autoplayStart"); 6509 }, 6510 T = () => { 6511 (i.autoplay.running = !1), 6512 clearTimeout(t), 6513 cancelAnimationFrame(s), 6514 l("autoplayStop"); 6515 }, 6516 M = (e, s) => { 6517 if (i.destroyed || !i.autoplay.running) return; 6518 clearTimeout(t), e || (f = !0); 6519 const a = () => { 6520 l("autoplayPause"), 6521 i.params.autoplay.waitForTransition 6522 ? i.wrapperEl.addEventListener("transitionend", y) 6523 : C(); 6524 }; 6525 if (((i.autoplay.paused = !0), s)) 6526 return h && (d = i.params.autoplay.delay), (h = !1), void a(); 6527 const r = d || i.params.autoplay.delay; 6528 (d = r - (new Date().getTime() - b)), 6529 (i.isEnd && d < 0 && !i.params.loop) || (d < 0 && (d = 0), a()); 6530 }, 6531 C = () => { 6532 (i.isEnd && d < 0 && !i.params.loop) || 6533 i.destroyed || 6534 !i.autoplay.running || 6535 ((b = new Date().getTime()), 6536 f ? ((f = !1), x(d)) : x(), 6537 (i.autoplay.paused = !1), 6538 l("autoplayResume")); 6539 }, 6540 P = () => { 6541 if (i.destroyed || !i.autoplay.running) return; 6542 const e = a(); 6543 "hidden" === e.visibilityState && ((f = !0), M(!0)), 6544 "visible" === e.visibilityState && C(); 6545 }, 6546 L = (e) => { 6547 "mouse" === e.pointerType && 6548 ((f = !0), (g = !0), i.animating || i.autoplay.paused || M(!0)); 6549 }, 6550 I = (e) => { 6551 "mouse" === e.pointerType && ((g = !1), i.autoplay.paused && C()); 6552 }; 6553 n("init", () => { 6554 i.params.autoplay.enabled && 6555 (i.params.autoplay.pauseOnMouseEnter && 6556 (i.el.addEventListener("pointerenter", L), 6557 i.el.addEventListener("pointerleave", I)), 6558 a().addEventListener("visibilitychange", P), 6559 S()); 6560 }), 6561 n("destroy", () => { 6562 i.el && 6563 "string" != typeof i.el && 6564 (i.el.removeEventListener("pointerenter", L), 6565 i.el.removeEventListener("pointerleave", I)), 6566 a().removeEventListener("visibilitychange", P), 6567 i.autoplay.running && T(); 6568 }), 6569 n("_freeModeStaticRelease", () => { 6570 (u || f) && C(); 6571 }), 6572 n("_freeModeNoMomentumRelease", () => {
6573 i.params.autoplay.disableOnInteraction ? T() : M(!0, !0); 6574 }), 6575 n("beforeTransitionStart", (e, t, s) => { 6576 !i.destroyed && 6577 i.autoplay.running && 6578 (s || !i.params.autoplay.disableOnInteraction ? M(!0, !0) : T()); 6579 }), 6580 n("sliderFirstMove", () => { 6581 !i.destroyed && 6582 i.autoplay.running && 6583 (i.params.autoplay.disableOnInteraction 6584 ? T() 6585 : ((p = !0), 6586 (u = !1), 6587 (f = !1), 6588 (m = setTimeout(() => { 6589 (f = !0), (u = !0), M(!0); 6590 }, 200)))); 6591 }), 6592 n("touchEnd", () => { 6593 if (!i.destroyed && i.autoplay.running && p) { 6594 if ( 6595 (clearTimeout(m), 6596 clearTimeout(t), 6597 i.params.autoplay.disableOnInteraction) 6598 ) 6599 return (u = !1), void (p = !1); 6600 u && i.params.cssMode && C(), (u = !1), (p = !1); 6601 } 6602 }), 6603 n("slideChange", () => { 6604 !i.destroyed && i.autoplay.running && (h = !0); 6605 }), 6606 Object.assign(i.autoplay, { start: S, stop: T, pause: M, resume: C }); 6607 }, 6608 function (e) { 6609 let { swiper: t, extendParams: s, on: i } = e; 6610 s({ 6611 thumbs: { 6612 swiper: null, 6613 multipleActiveThumbs: !0, 6614 autoScrollOffset: 0, 6615 slideThumbActiveClass: "swiper-slide-thumb-active", 6616 thumbsContainerClass: "swiper-thumbs", 6617 }, 6618 }); 6619 let r = !1, 6620 n = !1; 6621 function l() { 6622 const e = t.thumbs.swiper; 6623 if (!e || e.destroyed) return; 6624 const s = e.clickedIndex, 6625 a = e.clickedSlide; 6626 if (a && a.classList.contains(t.params.thumbs.slideThumbActiveClass)) 6627 return; 6628 if (null == s) return; 6629 let i; 6630 (i = e.params.loop 6631 ? parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"), 10) 6632 : s), 6633 t.params.loop ? t.slideToLoop(i) : t.slideTo(i); 6634 } 6635 function o() { 6636 const { thumbs: e } = t.params; 6637 if (r) return !1; 6638 r = !0; 6639 const s = t.constructor; 6640 if (e.swiper instanceof s) { 6641 if (e.swiper.destroyed) return (r = !1), !1; 6642 (t.thumbs.swiper = e.swiper), 6643 Object.assign(t.thumbs.swiper.originalParams, { 6644 watchSlidesProgress: !0, 6645 slideToClickedSlide: !1, 6646 }), 6647 Object.assign(t.thumbs.swiper.params, { 6648 watchSlidesProgress: !0, 6649 slideToClickedSlide: !1, 6650 }), 6651 t.thumbs.swiper.update(); 6652 } else if (c(e.swiper)) { 6653 const a = Object.assign({}, e.swiper); 6654 Object.assign(a, { 6655 watchSlidesProgress: !0, 6656 slideToClickedSlide: !1, 6657 }), 6658 (t.thumbs.swiper = new s(a)), 6659 (n = !0); 6660 } 6661 return ( 6662 t.thumbs.swiper.el.classList.add( 6663 t.params.thumbs.thumbsContainerClass 6664 ), 6665 t.thumbs.swiper.on("tap", l), 6666 !0 6667 ); 6668 } 6669 function d(e) { 6670 const s = t.thumbs.swiper; 6671 if (!s || s.destroyed) return; 6672 const a = 6673 "auto" === s.params.slidesPerView 6674 ? s.slidesPerViewDynamic() 6675 : s.params.slidesPerView; 6676 let i = 1; 6677 const r = t.params.thumbs.slideThumbActiveClass; 6678 if ( 6679 (t.params.slidesPerView > 1 && 6680 !t.params.centeredSlides && 6681 (i = t.params.slidesPerView), 6682 t.params.thumbs.multipleActiveThumbs || (i = 1), 6683 (i = Math.floor(i)), 6684 s.slides.forEach((e) => e.classList.remove(r)), 6685 s.params.loop || (s.params.virtual && s.params.virtual.enabled)) 6686 ) 6687 for (let e = 0; e < i; e += 1) 6688 f( 6689 s.slidesEl, 6690 `[data-swiper-slide-index="${t.realIndex + e}"]` 6691 ).forEach((e) => { 6692 e.classList.add(r); 6693 }); 6694 else 6695 for (let e = 0; e < i; e += 1) 6696 s.slides[t.realIndex + e] && 6697 s.slides[t.realIndex + e].classList.add(r); 6698 const n = t.params.thumbs.autoScrollOffset, 6699 l = n && !s.params.loop; 6700 if (t.realIndex !== s.realIndex || l) { 6701 const i = s.activeIndex; 6702 let r, o; 6703 if (s.params.loop) { 6704 const e = s.slides.find( 6705 (e) => 6706 e.getAttribute("data-swiper-slide-index") === `${t.realIndex}` 6707 ); 6708 (r = s.slides.indexOf(e)), 6709 (o = t.activeIndex > t.previousIndex ? "next" : "prev"); 6710 } else (r = t.realIndex), (o = r > t.previousIndex ? "next" : "prev"); 6711 l && (r += "next" === o ? n : -1 * n), 6712 s.visibleSlidesIndexes && 6713 s.visibleSlidesIndexes.indexOf(r) < 0 && 6714 (s.params.centeredSlides 6715 ? (r = 6716 r > i 6717 ? r - Math.floor(a / 2) + 1 6718 : r + Math.floor(a / 2) - 1) 6719 : r > i && s.params.slidesPerGroup, 6720 s.slideTo(r, e ? 0 : void 0)); 6721 } 6722 } 6723 (t.thumbs = { swiper: null }), 6724 i("beforeInit", () => { 6725 const { thumbs: e } = t.params; 6726 if (e && e.swiper) 6727 if ( 6728 "string" == typeof e.swiper || 6729 e.swiper instanceof HTMLElement 6730 ) { 6731 const s = a(), 6732 i = () => { 6733 const a = 6734 "string" == typeof e.swiper 6735 ? s.querySelector(e.swiper) 6736 : e.swiper; 6737 if (a && a.swiper) (e.swiper = a.swiper), o(), d(!0); 6738 else if (a) { 6739 const s = `${t.params.eventsPrefix}init`, 6740 i = (r) => { 6741 (e.swiper = r.detail[0]), 6742 a.removeEventListener(s, i), 6743 o(), 6744 d(!0),
6745 e.swiper.update(), 6746 t.update(); 6747 }; 6748 a.addEventListener(s, i); 6749 } 6750 return a; 6751 }, 6752 r = () => { 6753 if (t.destroyed) return; 6754 i() || requestAnimationFrame(r); 6755 }; 6756 requestAnimationFrame(r); 6757 } else o(), d(!0); 6758 }), 6759 i("slideChange update resize observerUpdate", () => { 6760 d(); 6761 }), 6762 i("setTransition", (e, s) => { 6763 const a = t.thumbs.swiper; 6764 a && !a.destroyed && a.setTransition(s); 6765 }), 6766 i("beforeDestroy", () => { 6767 const e = t.thumbs.swiper; 6768 e && !e.destroyed && n && e.destroy(); 6769 }), 6770 Object.assign(t.thumbs, { init: o, update: d }); 6771 }, 6772 function (e) { 6773 let { swiper: t, extendParams: s, emit: a, once: i } = e; 6774 s({ 6775 freeMode: { 6776 enabled: !1, 6777 momentum: !0, 6778 momentumRatio: 1, 6779 momentumBounce: !0, 6780 momentumBounceRatio: 1, 6781 momentumVelocityRatio: 1, 6782 sticky: !1, 6783 minimumVelocity: 0.02, 6784 }, 6785 }), 6786 Object.assign(t, { 6787 freeMode: { 6788 onTouchStart: function () { 6789 if (t.params.cssMode) return; 6790 const e = t.getTranslate(); 6791 t.setTranslate(e), 6792 t.setTransition(0), 6793 (t.touchEventsData.velocities.length = 0), 6794 t.freeMode.onTouchEnd({ 6795 currentPos: t.rtl ? t.translate : -t.translate, 6796 }); 6797 }, 6798 onTouchMove: function () { 6799 if (t.params.cssMode) return; 6800 const { touchEventsData: e, touches: s } = t; 6801 0 === e.velocities.length && 6802 e.velocities.push({ 6803 position: s[t.isHorizontal() ? "startX" : "startY"], 6804 time: e.touchStartTime, 6805 }), 6806 e.velocities.push({ 6807 position: s[t.isHorizontal() ? "currentX" : "currentY"], 6808 time: o(), 6809 }); 6810 }, 6811 onTouchEnd: function (e) { 6812 let { currentPos: s } = e; 6813 if (t.params.cssMode) return; 6814 const { 6815 params: r, 6816 wrapperEl: n, 6817 rtlTranslate: l, 6818 snapGrid: d, 6819 touchEventsData: c, 6820 } = t, 6821 p = o() - c.touchStartTime; 6822 if (s < -t.minTranslate()) t.slideTo(t.activeIndex); 6823 else if (s > -t.maxTranslate()) 6824 t.slides.length < d.length 6825 ? t.slideTo(d.length - 1) 6826 : t.slideTo(t.slides.length - 1); 6827 else { 6828 if (r.freeMode.momentum) { 6829 if (c.velocities.length > 1) { 6830 const e = c.velocities.pop(), 6831 s = c.velocities.pop(), 6832 a = e.position - s.position, 6833 i = e.time - s.time; 6834 (t.velocity = a / i), 6835 (t.velocity /= 2), 6836 Math.abs(t.velocity) < r.freeMode.minimumVelocity && 6837 (t.velocity = 0), 6838 (i > 150 || o() - e.time > 300) && (t.velocity = 0); 6839 } else t.velocity = 0; 6840 (t.velocity *= r.freeMode.momentumVelocityRatio), 6841 (c.velocities.length = 0); 6842 let e = 1e3 * r.freeMode.momentumRatio; 6843 const s = t.velocity * e; 6844 let p = t.translate + s; 6845 l && (p = -p); 6846 let u, 6847 m = !1; 6848 const h = 6849 20 * Math.abs(t.velocity) * r.freeMode.momentumBounceRatio; 6850 let f; 6851 if (p < t.maxTranslate()) 6852 r.freeMode.momentumBounce 6853 ? (p + t.maxTranslate() < -h && 6854 (p = t.maxTranslate() - h), 6855 (u = t.maxTranslate()), 6856 (m = !0), 6857 (c.allowMomentumBounce = !0)) 6858 : (p = t.maxTranslate()), 6859 r.loop && r.centeredSlides && (f = !0); 6860 else if (p > t.minTranslate()) 6861 r.freeMode.momentumBounce 6862 ? (p - t.minTranslate() > h && (p = t.minTranslate() + h), 6863 (u = t.minTranslate()), 6864 (m = !0), 6865 (c.allowMomentumBounce = !0)) 6866 : (p = t.minTranslate()), 6867 r.loop && r.centeredSlides && (f = !0); 6868 else if (r.freeMode.sticky) { 6869 let e; 6870 for (let t = 0; t < d.length; t += 1) 6871 if (d[t] > -p) { 6872 e = t; 6873 break; 6874 } 6875 (p = 6876 Math.abs(d[e] - p) < Math.abs(d[e - 1] - p) || 6877 "next" === t.swipeDirection 6878 ? d[e] 6879 : d[e - 1]), 6880 (p = -p); 6881 } 6882 if ( 6883 (f && 6884 i("transitionEnd", () => { 6885 t.loopFix(); 6886 }), 6887 0 !== t.velocity) 6888 ) { 6889 if ( 6890 ((e = l 6891 ? Math.abs((-p - t.translate) / t.velocity) 6892 : Math.abs((p - t.translate) / t.velocity)), 6893 r.freeMode.sticky) 6894 ) { 6895 const s = Math.abs((l ? -p : p) - t.translate), 6896 a = t.slidesSizesGrid[t.activeIndex]; 6897 e = 6898 s < a 6899 ? r.speed 6900 : s < 2 * a 6901 ? 1.5 * r.speed 6902 : 2.5 * r.speed; 6903 } 6904 } else if (r.freeMode.sticky) return void t.slideToClosest(); 6905 r.freeMode.momentumBounce && m 6906 ? (t.updateProgress(u), 6907 t.setTransition(e), 6908 t.setTranslate(p), 6909 t.transitionStart(!0, t.swipeDirection), 6910 (t.animating = !0), 6911 x(n, () => { 6912 t && 6913 !t.destroyed && 6914 c.allowMomentumBounce && 6915 (a("momentumBounce"), 6916 t.setTransition(r.speed), 6917 setTimeout(() => { 6918 t.setTranslate(u), 6919 x(n, () => { 6920 t && !t.destroyed && t.transitionEnd(); 6921 }); 6922 }, 0)); 6923 })) 6924 : t.velocity 6925 ? (a("_freeModeNoMomentumRelease"), 6926 t.updateProgress(p), 6927 t.setTransition(e), 6928 t.setTranslate(p), 6929 t.transitionStart(!0, t.swipeDirection), 6930 t.animating || 6931 ((t.animating = !0), 6932 x(n, () => { 6933 t && !t.destroyed && t.transitionEnd(); 6934 }))) 6935 : t.updateProgress(p), 6936 t.updateActiveIndex(), 6937 t.updateSlidesClasses(); 6938 } else { 6939 if (r.freeMode.sticky) return void t.slideToClosest(); 6940 r.freeMode && a("_freeModeNoMomentumRelease"); 6941 } 6942 (!r.freeMode.momentum || p >= r.longSwipesMs) && 6943 (a("_freeModeStaticRelease"), 6944 t.updateProgress(), 6945 t.updateActiveIndex(), 6946 t.updateSlidesClasses()); 6947 } 6948 }, 6949 }, 6950 }); 6951 }, 6952 function (e) { 6953 let t, 6954 s, 6955 a, 6956 i, 6957 { swiper: r, extendParams: n, on: l } = e; 6958 n({ grid: { rows: 1, fill: "column" } }); 6959 const o = () => { 6960 let e = r.params.spaceBetween; 6961 return ( 6962 "string" == typeof e && e.indexOf("%") >= 0 6963 ? (e = (parseFloat(e.replace("%", "")) / 100) * r.size) 6964 : "string" == typeof e && (e = parseFloat(e)), 6965 e 6966 ); 6967 }; 6968 l("init", () => { 6969 i = r.params.grid && r.params.grid.rows > 1; 6970 }), 6971 l("update", () => { 6972 const { params: e, el: t } = r, 6973 s = e.grid && e.grid.rows > 1; 6974 i && !s 6975 ? (t.classList.remove( 6976 `${e.containerModifierClass}grid`, 6977 `${e.containerModifierClass}grid-column` 6978 ), 6979 (a = 1), 6980 r.emitContainerClasses()) 6981 : !i && 6982 s && 6983 (t.classList.add(`${e.containerModifierClass}grid`), 6984 "column" === e.grid.fill && 6985 t.classList.add(`${e.containerModifierClass}grid-column`), 6986 r.emitContainerClasses()), 6987 (i = s); 6988 }), 6989 (r.grid = { 6990 initSlides: (e) => { 6991 const { slidesPerView: i } = r.params, 6992 { rows: n, fill: l } = r.params.grid, 6993 o = 6994 r.virtual && r.params.virtual.enabled 6995 ? r.virtual.slides.length 6996 : e.length; 6997 (a = Math.floor(o / n)), 6998 (t = Math.floor(o / n) === o / n ? o : Math.ceil(o / n) *
6998n), 6999 "auto" !== i && "row" === l && (t = Math.max(t, i * n)), 7000 (s = t / n); 7001 }, 7002 unsetSlides: () => { 7003 r.slides && 7004 r.slides.forEach((e) => { 7005 e.swiperSlideGridSet && 7006 ((e.style.height = ""), 7007 (e.style[r.getDirectionLabel("margin-top")] = "")); 7008 }); 7009 }, 7010 updateSlide: (e, i, n) => { 7011 const { slidesPerGroup: l } = r.params, 7012 d = o(), 7013 { rows: c, fill: p } = r.params.grid, 7014 u = 7015 r.virtual && r.params.virtual.enabled 7016 ? r.virtual.slides.length 7017 : n.length; 7018 let m, h, f; 7019 if ("row" === p && l > 1) { 7020 const s = Math.floor(e / (l * c)), 7021 a = e - c * l * s, 7022 r = 0 === s ? l : Math.min(Math.ceil((u - s * c * l) / c), l); 7023 (f = Math.floor(a / r)), 7024 (h = a - f * r + s * l), 7025 (m = h + (f * t) / c), 7026 (i.style.order = m); 7027 } else 7028 "column" === p 7029 ? ((h = Math.floor(e / c)), 7030 (f = e - h * c), 7031 (h > a || (h === a && f === c - 1)) && 7032 ((f += 1), f >= c && ((f = 0), (h += 1)))) 7033 : ((f = Math.floor(e / s)), (h = e - f * s)); 7034 (i.row = f), 7035 (i.column = h), 7036 (i.style.height = `calc((100% - ${(c - 1) * d}px) / ${c})`), 7037 (i.style[r.getDirectionLabel("margin-top")] = 7038 0 !== f ? d && `${d}px` : ""), 7039 (i.swiperSlideGridSet = !0); 7040 }, 7041 updateWrapperSize: (e, s) => { 7042 const { centeredSlides: a, roundLengths: i } = r.params, 7043 n = o(), 7044 { rows: l } = r.params.grid; 7045 if ( 7046 ((r.virtualSize = (e + n) * t), 7047 (r.virtualSize = Math.ceil(r.virtualSize / l) - n), 7048 r.params.cssMode || 7049 (r.wrapperEl.style[r.getDirectionLabel("width")] = `${ 7050 r.virtualSize + n 7051 }px`), 7052 a) 7053 ) { 7054 const e = []; 7055 for (let t = 0; t < s.length; t += 1) { 7056 let a = s[t]; 7057 i && (a = Math.floor(a)), 7058 s[t] < r.virtualSize + s[0] && e.push(a); 7059 } 7060 s.splice(0, s.length), s.push(...e); 7061 } 7062 }, 7063 }); 7064 }, 7065 function (e) { 7066 let { swiper: t } = e; 7067 Object.assign(t, { 7068 appendSlide: oe.bind(t), 7069 prependSlide: de.bind(t), 7070 addSlide: ce.bind(t), 7071 removeSlide: pe.bind(t), 7072 removeAllSlides: ue.bind(t), 7073 }); 7074 }, 7075 function (e) { 7076 let { swiper: t, extendParams: s, on: a } = e; 7077 s({ fadeEffect: { crossFade: !1 } }), 7078 me({ 7079 effect: "fade", 7080 swiper: t, 7081 on: a, 7082 setTranslate: () => { 7083 const { slides: e } = t; 7084 t.params.fadeEffect; 7085 for (let s = 0; s < e.length; s += 1) { 7086 const e = t.slides[s]; 7087 let a = -e.swiperSlideOffset; 7088 t.params.virtualTranslate || (a -= t.translate); 7089 let i = 0; 7090 t.isHorizontal() || ((i = a), (a = 0)); 7091 const r = t.params.fadeEffect.crossFade 7092 ? Math.max(1 - Math.abs(e.progress), 0) 7093 : 1 + Math.min(Math.max(e.progress, -1), 0), 7094 n = he(0, e); 7095 (n.style.opacity = r), 7096 (n.style.transform = `translate3d(${a}px, ${i}px, 0px)`); 7097 } 7098 }, 7099 setTransition: (e) => { 7100 const s = t.slides.map((e) => h(e)); 7101 s.forEach((t) => { 7102 t.style.transitionDuration = `${e}ms`; 7103 }), 7104 fe({ 7105 swiper: t, 7106 duration: e, 7107 transformElements: s, 7108 allSlides: !0, 7109 }); 7110 }, 7111 overwriteParams: () => ({ 7112 slidesPerView: 1, 7113 slidesPerGroup: 1, 7114 watchSlidesProgress: !0, 7115 spaceBetween: 0, 7116 virtualTranslate: !t.params.cssMode, 7117 }), 7118 }); 7119 }, 7120 function (e) { 7121 let { swiper: t, extendParams: s, on: a } = e; 7122 s({ 7123 cubeEffect: { 7124 slideShadows: !0, 7125 shadow: !0, 7126 shadowOffset: 20, 7127 shadowScale: 0.94, 7128 }, 7129 }); 7130 const i = (e, t, s) => { 7131 let a = s 7132 ? e.querySelector(".swiper-slide-shadow-left") 7133 : e.querySelector(".swiper-slide-shadow-top"), 7134 i = s 7135 ? e.querySelector(".swiper-slide-shadow-right") 7136 : e.querySelector(".swiper-slide-shadow-bottom"); 7137 a || 7138 ((a = v( 7139 "div", 7140 ( 7141 "swiper-slide-shadow-cube swiper-slide-shadow-" + 7142 (s ? "left" : "top") 7143 ).split(" ") 7144 )), 7145 e.append(a)), 7146 i || 7147 ((i = v( 7148 "div", 7149 ( 7150 "swiper-slide-shadow-cube swiper-slide-shadow-" + 7151 (s ? "right" : "bottom") 7152 ).split(" ") 7153 )), 7154 e.append(i)), 7155 a && (a.style.opacity = Math.max(-t, 0)), 7156 i && (i.style.opacity = Math.max(t, 0)); 7157 }; 7158 me({ 7159 effect: "cube", 7160 swiper: t, 7161 on: a, 7162 setTranslate: () => { 7163 const { 7164 el: e, 7165 wrapperEl: s, 7166 slides: a, 7167 width: r, 7168 height: n, 7169 rtlTranslate: l, 7170 size: o, 7171 browser: d, 7172 } = t, 7173 c = M(t), 7174 p = t.params.cubeEffect, 7175 u = t.isHorizontal(), 7176 m = t.virtual && t.params.virtual.enabled; 7177 let h, 7178 f = 0; 7179 p.shadow && 7180 (u 7181 ? ((h = t.wrapperEl.querySelector(".swiper-cube-shadow")), 7182 h || 7183 ((h = v("div", "swiper-cube-shadow")), t.wrapperEl.append(h)), 7184 (h.style.height = `${r}px`)) 7185 : ((h = e.querySelector(".swiper-cube-shadow")), 7186 h || ((h = v("div", "swiper-cube-shadow")), e.append(h)))); 7187 for (let e = 0; e < a.length; e += 1) { 7188 const t = a[e]; 7189 let s = e; 7190 m && (s = parseInt(t.getAttribute("data-swiper-slide-index"), 10)); 7191 let r = 90 * s, 7192 n = Math.floor(r / 360); 7193 l && ((r = -r), (n = Math.floor(-r / 360))); 7194 const d = Math.max(Math.min(t.progress, 1), -1); 7195 let h = 0, 7196 g = 0, 7197 v = 0; 7198 s % 4 == 0 7199 ? ((h = 4 * -n * o), (v = 0)) 7200 : (s - 1) % 4 == 0 7201 ? ((h = 0), (v = 4 * -n * o)) 7202 : (s - 2) % 4 == 0 7203 ? ((h = o + 4 * n * o), (v = o)) 7204 : (s - 3) % 4 == 0 && ((h = -o), (v = 3 * o + 4 * o * n)), 7205 l && (h = -h), 7206 u || ((g = h), (h = 0));
7207 const w = `rotateX(${c(u ? 0 : -r)}deg) rotateY(${c( 7208 u ? r : 0 7209 )}deg) translate3d(${h}px, ${g}px, ${v}px)`; 7210 d <= 1 && 7211 d > -1 && 7212 ((f = 90 * s + 90 * d), l && (f = 90 * -s - 90 * d)), 7213 (t.style.transform = w), 7214 p.slideShadows && i(t, d, u); 7215 } 7216 if ( 7217 ((s.style.transformOrigin = `50% 50% -${o / 2}px`), 7218 (s.style["-webkit-transform-origin"] = `50% 50% -${o / 2}px`), 7219 p.shadow) 7220 ) 7221 if (u) 7222 h.style.transform = `translate3d(0px, ${ 7223 r / 2 + p.shadowOffset 7224 }px, ${-r / 2}px) rotateX(89.99deg) rotateZ(0deg) scale(${ 7225 p.shadowScale 7226 })`; 7227 else { 7228 const e = Math.abs(f) - 90 * Math.floor(Math.abs(f) / 90), 7229 t = 7230 1.5 - 7231 (Math.sin((2 * e * Math.PI) / 360) / 2 + 7232 Math.cos((2 * e * Math.PI) / 360) / 2), 7233 s = p.shadowScale, 7234 a = p.shadowScale / t, 7235 i = p.shadowOffset; 7236 h.style.transform = `scale3d(${s}, 1, ${a}) translate3d(0px, ${ 7237 n / 2 + i 7238 }px, ${-n / 2 / a}px) rotateX(-89.99deg)`; 7239 } 7240 const g = 7241 (d.isSafari || d.isWebView) && d.needPerspectiveFix ? -o / 2 : 0; 7242 (s.style.transform = `translate3d(0px,0,${g}px) rotateX(${c( 7243 t.isHorizontal() ? 0 : f 7244 )}deg) rotateY(${c(t.isHorizontal() ? -f : 0)}deg)`), 7245 s.style.setProperty("--swiper-cube-translate-z", `${g}px`); 7246 }, 7247 setTransition: (e) => { 7248 const { el: s, slides: a } = t; 7249 if ( 7250 (a.forEach((t) => { 7251 (t.style.transitionDuration = `${e}ms`), 7252 t 7253 .querySelectorAll( 7254 ".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left" 7255 ) 7256 .forEach((t) => { 7257 t.style.transitionDuration = `${e}ms`; 7258 }); 7259 }), 7260 t.params.cubeEffect.shadow && !t.isHorizontal()) 7261 ) { 7262 const t = s.querySelector(".swiper-cube-shadow"); 7263 t && (t.style.transitionDuration = `${e}ms`); 7264 } 7265 }, 7266 recreateShadows: () => { 7267 const e = t.isHorizontal(); 7268 t.slides.forEach((t) => { 7269 const s = Math.max(Math.min(t.progress, 1), -1); 7270 i(t, s, e); 7271 }); 7272 }, 7273 getEffectParams: () => t.params.cubeEffect, 7274 perspective: () => !0, 7275 overwriteParams: () => ({ 7276 slidesPerView: 1, 7277 slidesPerGroup: 1, 7278 watchSlidesProgress: !0, 7279 resistanceRatio: 0, 7280 spaceBetween: 0, 7281 centeredSlides: !1, 7282 virtualTranslate: !0, 7283 }), 7284 }); 7285 }, 7286 function (e) { 7287 let { swiper: t, extendParams: s, on: a } = e; 7288 s({ flipEffect: { slideShadows: !0, limitRotation: !0 } }); 7289 const i = (e, s) => { 7290 let a = t.isHorizontal() 7291 ? e.querySelector(".swiper-slide-shadow-left") 7292 : e.querySelector(".swiper-slide-shadow-top"), 7293 i = t.isHorizontal() 7294 ? e.querySelector(".swiper-slide-shadow-right") 7295 : e.querySelector(".swiper-slide-shadow-bottom"); 7296 a || (a = ge("flip", e, t.isHorizontal() ? "left" : "top")), 7297 i || (i = ge("flip", e, t.isHorizontal() ? "right" : "bottom")), 7298 a && (a.style.opacity = Math.max(-s, 0)), 7299 i && (i.style.opacity = Math.max(s, 0)); 7300 }; 7301 me({ 7302 effect: "flip", 7303 swiper: t, 7304 on: a, 7305 setTranslate: () => { 7306 const { slides: e, rtlTranslate: s } = t, 7307 a = t.params.flipEffect, 7308 r = M(t); 7309 for (let n = 0; n < e.length; n += 1) { 7310 const l = e[n]; 7311 let o = l.progress; 7312 t.params.flipEffect.limitRotation && 7313 (o = Math.max(Math.min(l.progress, 1), -1)); 7314 const d = l.swiperSlideOffset; 7315 let c = -180 * o, 7316 p = 0, 7317 u = t.params.cssMode ? -d - t.translate : -d, 7318 m = 0; 7319 t.isHorizontal() 7320 ? s && (c = -c) 7321 : ((m = u), (u = 0), (p = -c), (c = 0)), 7322 (l.style.zIndex = -Math.abs(Math.round(o)) + e.length), 7323 a.slideShadows && i(l, o); 7324 const h = `translate3d(${u}px, ${m}px, 0px) rotateX(${r( 7325 p 7326 )}deg) rotateY(${r(c)}deg)`; 7327 he(0, l).style.transform = h; 7328 } 7329 }, 7330 setTransition: (e) => { 7331 const s = t.slides.map((e) => h(e));
7332 s.forEach((t) => { 7333 (t.style.transitionDuration = `${e}ms`), 7334 t 7335 .querySelectorAll( 7336 ".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left" 7337 ) 7338 .forEach((t) => { 7339 t.style.transitionDuration = `${e}ms`; 7340 }); 7341 }), 7342 fe({ swiper: t, duration: e, transformElements: s }); 7343 }, 7344 recreateShadows: () => { 7345 t.params.flipEffect, 7346 t.slides.forEach((e) => { 7347 let s = e.progress; 7348 t.params.flipEffect.limitRotation && 7349 (s = Math.max(Math.min(e.progress, 1), -1)), 7350 i(e, s); 7351 }); 7352 }, 7353 getEffectParams: () => t.params.flipEffect, 7354 perspective: () => !0, 7355 overwriteParams: () => ({ 7356 slidesPerView: 1, 7357 slidesPerGroup: 1, 7358 watchSlidesProgress: !0, 7359 spaceBetween: 0, 7360 virtualTranslate: !t.params.cssMode, 7361 }), 7362 }); 7363 }, 7364 function (e) { 7365 let { swiper: t, extendParams: s, on: a } = e; 7366 s({ 7367 coverflowEffect: { 7368 rotate: 50, 7369 stretch: 0, 7370 depth: 100, 7371 scale: 1, 7372 modifier: 1, 7373 slideShadows: !0, 7374 }, 7375 }), 7376 me({ 7377 effect: "coverflow", 7378 swiper: t, 7379 on: a, 7380 setTranslate: () => { 7381 const { width: e, height: s, slides: a, slidesSizesGrid: i } = t, 7382 r = t.params.coverflowEffect, 7383 n = t.isHorizontal(), 7384 l = t.translate, 7385 o = n ? e / 2 - l : s / 2 - l, 7386 d = n ? r.rotate : -r.rotate, 7387 c = r.depth, 7388 p = M(t); 7389 for (let e = 0, t = a.length; e < t; e += 1) { 7390 const t = a[e], 7391 s = i[e], 7392 l = (o - t.swiperSlideOffset - s / 2) / s, 7393 u = 7394 "function" == typeof r.modifier 7395 ? r.modifier(l) 7396 : l * r.modifier; 7397 let m = n ? d * u : 0, 7398 h = n ? 0 : d * u, 7399 f = -c * Math.abs(u), 7400 g = r.stretch; 7401 "string" == typeof g && 7402 -1 !== g.indexOf("%") && 7403 (g = (parseFloat(r.stretch) / 100) * s); 7404 let v = n ? 0 : g * u, 7405 w = n ? g * u : 0, 7406 b = 1 - (1 - r.scale) * Math.abs(u); 7407 Math.abs(w) < 0.001 && (w = 0), 7408 Math.abs(v) < 0.001 && (v = 0), 7409 Math.abs(f) < 0.001 && (f = 0), 7410 Math.abs(m) < 0.001 && (m = 0), 7411 Math.abs(h) < 0.001 && (h = 0), 7412 Math.abs(b) < 0.001 && (b = 0); 7413 const y = `translate3d(${w}px,${v}px,${f}px) rotateX(${p( 7414 h 7415 )}deg) rotateY(${p(m)}deg) scale(${b})`; 7416 if ( 7417 ((he(0, t).style.transform = y), 7418 (t.style.zIndex = 1 - Math.abs(Math.round(u))), 7419 r.slideShadows) 7420 ) { 7421 let e = n 7422 ? t.querySelector(".swiper-slide-shadow-left") 7423 : t.querySelector(".swiper-slide-shadow-top"), 7424 s = n 7425 ? t.querySelector(".swiper-slide-shadow-right") 7426 : t.querySelector(".swiper-slide-shadow-bottom"); 7427 e || (e = ge("coverflow", t, n ? "left" : "top")), 7428 s || (s = ge("coverflow", t, n ? "right" : "bottom")), 7429 e && (e.style.opacity = u > 0 ? u : 0), 7430 s && (s.style.opacity = -u > 0 ? -u : 0); 7431 } 7432 } 7433 }, 7434 setTransition: (e) => { 7435 t.slides 7436 .map((e) => h(e)) 7437 .forEach((t) => { 7438 (t.style.transitionDuration = `${e}ms`), 7439 t 7440 .querySelectorAll( 7441 ".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left" 7442 ) 7443 .forEach((t) => { 7444 t.style.transitionDuration = `${e}ms`; 7445 }); 7446 }); 7447 }, 7448 perspective: () => !0, 7449 overwriteParams: () => ({ watchSlidesProgress: !0 }), 7450 }); 7451 }, 7452 function (e) { 7453 let { swiper: t, extendParams: s, on: a } = e; 7454 s({ 7455 creativeEffect: { 7456 limitProgress: 1, 7457 shadowPerProgress: !1, 7458 progressMultiplier: 1, 7459 perspective: !0, 7460 prev: { 7461 translate: [0, 0, 0], 7462 rotate: [0, 0, 0], 7463 opacity: 1, 7464 scale: 1, 7465 }, 7466 next: { 7467 translate: [0, 0, 0], 7468 rotate: [0, 0, 0], 7469 opacity: 1, 7470 scale: 1, 7471 }, 7472 }, 7473 }); 7474 const i = (e) => ("string" == typeof e ? e : `${e}px`); 7475 me({ 7476 effect: "creative", 7477 swiper: t, 7478 on: a, 7479 setTranslate: () => { 7480 const { slides: e, wrapperEl: s, slidesSizesGrid: a } = t, 7481 r = t.params.creativeEffect, 7482 { progressMultiplier: n } = r, 7483 l = t.params.centeredSlides, 7484 o = M(t); 7485 if (l) { 7486 const e = a[0] / 2 - t.params.slidesOffsetBefore || 0; 7487 s.style.transform = `translateX(calc(50% - ${e}px))`; 7488 } 7489 for (let s = 0; s < e.length; s += 1) { 7490 const a = e[s], 7491 d = a.progress, 7492 c = Math.min( 7493 Math.max(a.progress, -r.limitProgress), 7494 r.limitProgress 7495 ); 7496 let p = c; 7497 l || 7498 (p = Math.min( 7499 Math.max(a.originalProgress, -r.limitProgress), 7500 r.limitProgress 7501 )); 7502 const u = a.swiperSlideOffset, 7503 m = [t.params.cssMode ? -u - t.translate : -u, 0, 0], 7504 h = [0, 0, 0]; 7505 let f = !1; 7506 t.isHorizontal() || ((m[1] = m[0]), (m[0] = 0)); 7507 let g = { 7508 translate: [0, 0, 0], 7509 rotate: [0, 0, 0], 7510 scale: 1, 7511 opacity: 1, 7512 }; 7513 c < 0 7514 ? ((g = r.next), (f = !0)) 7515 : c > 0 && ((g = r.prev), (f = !0)), 7516 m.forEach((e, t) => { 7517 m[t] = `calc(${e}px + (${i(g.translate[t])} * ${Math.abs( 7518 c * n 7519 )}))`; 7520 }), 7521 h.forEach((e, t) => { 7522 let s = g.rotate[t] * Math.abs(c * n); 7523 h[t] = s; 7524 }), 7525 (a.style.zIndex = -Math.abs(Math.round(d)) + e.length); 7526 const v = m.join(", "), 7527 w = `rotateX(${o(h[0])}deg) rotateY(${o(h[1])}deg) rotateZ(${o( 7528 h[2] 7529 )}deg)`, 7530 b = 7531 p < 0 7532 ? `scale(${1 + (1 - g.scale) * p * n})` 7533 : `scale(${1 - (1 - g.scale) * p * n})`, 7534 y = 7535 p < 0 7536 ? 1 + (1 - g.opacity) * p * n 7537 : 1 - (1 - g.opacity) * p * n, 7538 E = `translate3d(${v}) ${w} ${b}`; 7539 if ((f && g.shadow) || !f) { 7540 let e = a.querySelector(".swiper-slide-shadow"); 7541 if ((!e && g.shadow && (e = ge("creative", a)), e)) { 7542 const t = r.shadowPerProgress ? c * (1 / r.limitProgress) : c; 7543 e.style.opacity = Math.min(Math.max(Math.abs(t), 0), 1); 7544 } 7545 } 7546 const x = he(0, a); 7547 (x.style.transform = E), 7548 (x.style.opacity = y), 7549 g.origin && (x.style.transformOrigin = g.origin); 7550 } 7551 }, 7552 setTransition: (e) => { 7553 const s = t.slides.map((e) => h(e));
7554 s.forEach((t) => { 7555 (t.style.transitionDuration = `${e}ms`), 7556 t.querySelectorAll(".swiper-slide-shadow").forEach((t) => { 7557 t.style.transitionDuration = `${e}ms`; 7558 }); 7559 }), 7560 fe({ swiper: t, duration: e, transformElements: s, allSlides: !0 }); 7561 }, 7562 perspective: () => t.params.creativeEffect.perspective, 7563 overwriteParams: () => ({ 7564 watchSlidesProgress: !0, 7565 virtualTranslate: !t.params.cssMode, 7566 }), 7567 }); 7568 }, 7569 function (e) { 7570 let { swiper: t, extendParams: s, on: a } = e; 7571 s({ 7572 cardsEffect: { 7573 slideShadows: !0, 7574 rotate: !0, 7575 perSlideRotate: 2, 7576 perSlideOffset: 8, 7577 }, 7578 }), 7579 me({ 7580 effect: "cards", 7581 swiper: t, 7582 on: a, 7583 setTranslate: () => { 7584 const { slides: e, activeIndex: s, rtlTranslate: a } = t, 7585 i = t.params.cardsEffect, 7586 { startTranslate: r, isTouched: n } = t.touchEventsData, 7587 l = a ? -t.translate : t.translate; 7588 for (let o = 0; o < e.length; o += 1) { 7589 const d = e[o], 7590 c = d.progress, 7591 p = Math.min(Math.max(c, -4), 4); 7592 let u = d.swiperSlideOffset; 7593 t.params.centeredSlides && 7594 !t.params.cssMode && 7595 (t.wrapperEl.style.transform = `translateX(${t.minTranslate()}px)`), 7596 t.params.centeredSlides && 7597 t.params.cssMode && 7598 (u -= e[0].swiperSlideOffset); 7599 let m = t.params.cssMode ? -u - t.translate : -u, 7600 h = 0; 7601 const f = -100 * Math.abs(p); 7602 let g = 1, 7603 v = -i.perSlideRotate * p, 7604 w = i.perSlideOffset - 0.75 * Math.abs(p); 7605 const b = 7606 t.virtual && t.params.virtual.enabled 7607 ? t.virtual.from + o 7608 : o, 7609 y = 7610 (b === s || b === s - 1) && 7611 p > 0 && 7612 p < 1 && 7613 (n || t.params.cssMode) && 7614 l < r, 7615 E = 7616 (b === s || b === s + 1) && 7617 p < 0 && 7618 p > -1 && 7619 (n || t.params.cssMode) && 7620 l > r; 7621 if (y || E) { 7622 const e = (1 - Math.abs((Math.abs(p) - 0.5) / 0.5)) ** 0.5; 7623 (v += -28 * p * e), 7624 (g += -0.5 * e), 7625 (w += 96 * e), 7626 (h = -25 * e * Math.abs(p) + "%"); 7627 } 7628 if ( 7629 ((m = 7630 p < 0 7631 ? `calc(${m}px ${a ? "-" : "+"} (${w * Math.abs(p)}%))` 7632 : p > 0 7633 ? `calc(${m}px ${a ? "-" : "+"} (-${w * Math.abs(p)}%))` 7634 : `${m}px`), 7635 !t.isHorizontal()) 7636 ) { 7637 const e = h; 7638 (h = m), (m = e); 7639 } 7640 const x = p < 0 ? "" + (1 + (1 - g) * p) : "" + (1 - (1 - g) * p), 7641 S = `\n translate3d(${m}, ${h}, ${f}px)\n rotateZ(${ 7642 i.rotate ? (a ? -v : v) : 0 7643 }deg)\n scale(${x})\n `; 7644 if (i.slideShadows) { 7645 let e = d.querySelector(".swiper-slide-shadow"); 7646 e || (e = ge("cards", d)), 7647 e && 7648 (e.style.opacity = Math.min( 7649 Math.max((Math.abs(p) - 0.5) / 0.5, 0), 7650 1 7651 )); 7652 } 7653 d.style.zIndex = -Math.abs(Math.round(c)) + e.length; 7654 he(0, d).style.transform = S; 7655 } 7656 }, 7657 setTransition: (e) => { 7658 const s = t.slides.map((e) => h(e)); 7659 s.forEach((t) => { 7660 (t.style.transitionDuration = `${e}ms`), 7661 t.querySelectorAll(".swiper-slide-shadow").forEach((t) => { 7662 t.style.transitionDuration = `${e}ms`; 7663 }); 7664 }), 7665 fe({ swiper: t, duration: e, transformElements: s }); 7666 }, 7667 perspective: () => !0, 7668 overwriteParams: () => ({ 7669 _loopSwapReset: !1, 7670 watchSlidesProgress: !0, 7671 loopAdditionalSlides: t.params.cardsEffect.rotate ? 3 : 2, 7672 centeredSlides: !0, 7673 virtualTranslate: !t.params.cssMode, 7674 }), 7675 }); 7676 }, 7677 ]; 7678 return re.use(ve), re; 7679})(); 7680//# sourceMappingURL=swiper-bundle.min.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.