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