PageSourceSearch

https://radiobrest.by/local/templates/brestfm/script.js

js radiobrest.by collected 2026-10-06 19:53:09 UTC 374,879 bytes, 10,241 lines download raw bytes

1(function polyfill() {
2  const relList = document.createElement("link").relList;
3  if (relList && relList.supports && relList.supports("modulepreload")) {
4    return;
5  }
6  for (const link of document.querySelectorAll('link[rel="modulepreload"]')) {
7    processPreload(link);
8  }
9  new MutationObserver((mutations) => {
10    for (const mutation of mutations) {
11      if (mutation.type !== "childList") {
12        continue;
13      }
14      for (const node of mutation.addedNodes) {
15        if (node.tagName === "LINK" && node.rel === "modulepreload")
16          processPreload(node);
17      }
18    }
19  }).observe(document, { childList: true, subtree: true });
20  function getFetchOpts(link) {
21    const fetchOpts = {};
22    if (link.integrity) fetchOpts.integrity = link.integrity;
23    if (link.referrerPolicy) fetchOpts.referrerPolicy = link.referrerPolicy;
24    if (link.crossOrigin === "use-credentials")
25      fetchOpts.credentials = "include";
26    else if (link.crossOrigin === "anonymous") fetchOpts.credentials = "omit";
27    else fetchOpts.credentials = "same-origin";
28    return fetchOpts;
29  }
30  function processPreload(link) {
31    if (link.ep)
32      return;
33    link.ep = true;
34    const fetchOpts = getFetchOpts(link);
35    fetch(link.href, fetchOpts);
36  }
37})();
38function isObject$1(obj) {
39  return obj !== null && typeof obj === "object" && "constructor" in obj && obj.constructor === Object;
40}
41function extend$1(target, src) {
42  if (target === void 0) {
43    target = {};
44  }
45  if (src === void 0) {
46    src = {};
47  }
48  Object.keys(src).forEach((key) => {
49    if (typeof target[key] === "undefined") target[key] = src[key];
50    else if (isObject$1(src[key]) && isObject$1(target[key]) && Object.keys(src[key]).length > 0) {
51      extend$1(target[key], src[key]);
52    }
53  });
54}
55const ssrDocument = {
56  body: {},
57  addEventListener() {
58  },
59  removeEventListener() {
60  },
61  activeElement: {
62    blur() {
63    },
64    nodeName: ""
65  },
66  querySelector() {
67    return null;
68  },
69  querySelectorAll() {
70    return [];
71  },
72  getElementById() {
73    return null;
74  },
75  createEvent() {
76    return {
77      initEvent() {
78      }
79    };
80  },
81  createElement() {
82    return {
83      children: [],
84      childNodes: [],
85      style: {},
86      setAttribute() {
87      },
88      getElementsByTagName() {
89        return [];
90      }
91    };
92  },
93  createElementNS() {
94    return {};
95  },
96  importNode() {
97    return null;
98  },
99  location: {
100    hash: "",
101    host: "",
102    hostname: "",
103    href: "",
104    origin: "",
105    pathname: "",
106    protocol: "",
107    search: ""
108  }
109};
110function getDocument() {
111  const doc = typeof document !== "undefined" ? document : {};
112  extend$1(doc, ssrDocument);
113  return doc;
114}
115const ssrWindow = {
116  document: ssrDocument,
117  navigator: {
118    userAgent: ""
119  },
120  location: {
121    hash: "",
122    host: "",
123    hostname: "",
124    href: "",
125    origin: "",
126    pathname: "",
127    protocol: "",
128    search: ""
129  },
130  history: {
131    replaceState() {
132    },
133    pushState() {
134    },
135    go() {
136    },
137    back() {
138    }
139  },
140  CustomEvent: function CustomEvent() {
141    return this;
142  },
143  addEventListener() {
144  },
145  removeEventListener() {
146  },
147  getComputedStyle() {
148    return {
149      getPropertyValue() {
150        return "";
151      }
152    };
153  },
154  Image() {
155  },
156  Date() {
157  },
158  screen: {},
159  setTimeout() {
160  },
161  clearTimeout() {
162  },
163  matchMedia() {
164    return {};
165  },
166  requestAnimationFrame(callback) {
167    if (typeof setTimeout === "undefined") {
168      callback();
169      return null;
170    }
171    return setTimeout(callback, 0);
172  },
173  cancelAnimationFrame(id) {
174    if (typeof setTimeout === "undefined") {
175      return;
176    }
177    clearTimeout(id);
178  }
179};
180function getWindow() {
181  const win = typeof window !== "undefined" ? window : {};
182  extend$1(win, ssrWindow);
183  return win;
184}
185function classesToTokens(classes2) {
186  if (classes2 === void 0) {
187    classes2 = "";
188  }
189  return classes2.trim().split(" ").filter((c) => !!c.trim());
190}
191function deleteProps(obj) {
192  const object = obj;
193  Object.keys(object).forEach((key) => {
194    try {
195      object[key] = null;
196    } catch (e) {
197    }
198    try {
199      delete object[key];
200    } catch (e) {
201    }
202  });
203}
204function nextTick(callback, delay) {
205  if (delay === void 0) {
vendor: 4,392 bytes, lines 206-326
206    delay = 0;
207  }
208  return setTimeout(callback, delay);
209}
210function now() {
211  return Date.now();
212}
213function getComputedStyle$1(el) {
214  const window2 = getWindow();
215  let style;
216  if (window2.getComputedStyle) {
217    style = window2.getComputedStyle(el, null);
218  }
219  if (!style && el.currentStyle) {
220    style = el.currentStyle;
221  }
222  if (!style) {
223    style = el.style;
224  }
225  return style;
226}
227function getTranslate(el, axis) {
228  if (axis === void 0) {
229    axis = "x";
230  }
231  const window2 = getWindow();
232  let matrix;
233  let curTransform;
234  let transformMatrix;
235  const curStyle = getComputedStyle$1(el);
236  if (window2.WebKitCSSMatrix) {
237    curTransform = curStyle.transform || curStyle.webkitTransform;
238    if (curTransform.split(",").length > 6) {
239      curTransform = curTransform.split(", ").map((a) => a.replace(",", ".")).join(", ");
240    }
241    transformMatrix = new window2.WebKitCSSMatrix(curTransform === "none" ? "" : curTransform);
242  } else {
243    transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue("transform").replace("translate(", "matrix(1, 0, 0, 1,");
244    matrix = transformMatrix.toString().split(",");
245  }
246  if (axis === "x") {
247    if (window2.WebKitCSSMatrix) curTransform = transformMatrix.m41;
248    else if (matrix.length === 16) curTransform = parseFloat(matrix[12]);
249    else curTransform = parseFloat(matrix[4]);
250  }
251  if (axis === "y") {
252    if (window2.WebKitCSSMatrix) curTransform = transformMatrix.m42;
253    else if (matrix.length === 16) curTransform = parseFloat(matrix[13]);
254    else curTransform = parseFloat(matrix[5]);
255  }
256  return curTransform || 0;
257}
258function isObject(o) {
259  return typeof o === "object" && o !== null && o.constructor && Object.prototype.toString.call(o).slice(8, -1) === "Object";
260}
261function isNode(node) {
262  if (typeof window !== "undefined" && typeof window.HTMLElement !== "undefined") {
263    return node instanceof HTMLElement;
264  }
265  return node && (node.nodeType === 1 || node.nodeType === 11);
266}
267function extend() {
268  const to = Object(arguments.length <= 0 ? void 0 : arguments[0]);
269  const noExtend = ["__proto__", "constructor", "prototype"];
270  for (let i = 1; i < arguments.length; i += 1) {
271    const nextSource = i < 0 || arguments.length <= i ? void 0 : arguments[i];
272    if (nextSource !== void 0 && nextSource !== null && !isNode(nextSource)) {
273      const keysArray = Object.keys(Object(nextSource)).filter((key) => noExtend.indexOf(key) < 0);
274      for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {
275        const nextKey = keysArray[nextIndex];
276        const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
277        if (desc !== void 0 && desc.enumerable) {
278          if (isObject(to[nextKey]) && isObject(nextSource[nextKey])) {
279            if (nextSource[nextKey].__swiper__) {
280              to[nextKey] = nextSource[nextKey];
281            } else {
282              extend(to[nextKey], nextSource[nextKey]);
283            }
284          } else if (!isObject(to[nextKey]) && isObject(nextSource[nextKey])) {
285            to[nextKey] = {};
286            if (nextSource[nextKey].__swiper__) {
287              to[nextKey] = nextSource[nextKey];
288            } else {
289              extend(to[nextKey], nextSource[nextKey]);
290            }
291          } else {
292            to[nextKey] = nextSource[nextKey];
293          }
294        }
295      }
296    }
297  }
298  return to;
299}
300function setCSSProperty(el, varName, varValue) {
301  el.style.setProperty(varName, varValue);
302}
303function animateCSSModeScroll(_ref) {
304  let {
305    swiper,
306    targetPosition,
307    side
308  } = _ref;
309  const window2 = getWindow();
310  const startPosition = -swiper.translate;
311  let startTime = null;
312  let time;
313  const duration = swiper.params.speed;
314  swiper.wrapperEl.style.scrollSnapType = "none";
315  window2.cancelAnimationFrame(swiper.cssModeFrameID);
316  const dir = targetPosition > startPosition ? "next" : "prev";
317  const isOutOfBound = (current, target) => {
318    return dir === "next" && current >= target || dir === "prev" && current <= target;
319  };
320  const animate = () => {
321    time = (/* @__PURE__ */ new Date()).getTime();
322    if (startTime === null) {
323      startTime = time;
324    }
325    const progress = Math.max(Math.min((time - startTime) / duration, 1), 0);
326    const easeProgress = 0.5 - Math.cos(progress * Math.PI) / 2;
327    let currentPosition = startPosition + easeProgress * (targetPosition - startPosition);
328    if (isOutOfBound(currentPosition, targetPosition)) {
329      currentPosition = targetPosition;
330    }
331    swiper.wrapperEl.scrollTo({
332      [side]: currentPosition
333    });
334    if (isOutOfBound(currentPosition, targetPosition)) {
335      swiper.wrapperEl.style.overflow = "hidden";
336      swiper.wrapperEl.style.scrollSnapType = "";
337      setTimeout(() => {
338        swiper.wrapperEl.style.overflow = "";
339        swiper.wrapperEl.scrollTo({
340          [side]: currentPosition
341        });
342      });
343      window2.cancelAnimationFrame(swiper.cssModeFrameID);
344      return;
345    }
346    swiper.cssModeFrameID = window2.requestAnimationFrame(animate);
347  };
348  animate();
349}
350function getSlideTransformEl(slideEl) {
351  return slideEl.querySelector(".swiper-slide-transform") || slideEl.shadowRoot && slideEl.shadowRoot.querySelector(".swiper-slide-transform") || slideEl;
352}
353function elementChildren(element, selector) {
354  if (selector === void 0) {
355    selector = "";
356  }
357  const children = [...element.children];
358  if (element instanceof HTMLSlotElement) {
359    children.push(...element.assignedElements());
360  }
361  if (!selector) {
362    return children;
363  }
364  return children.filter((el) => el.matches(selector));
365}
366function elementIsChildOf(el, parent) {
367  const isChild = parent.contains(el);
368  if (!isChild && parent instanceof HTMLSlotElement) {
369    const children = [...parent.assignedElements()];
370    return children.includes(el);
371  }
372  return isChild;
373}
374function showWarning(text) {
375  try {
376    console.warn(text);
377    return;
378  } catch (err) {
379  }
380}
381function createElement(tag, classes2) {
382  if (classes2 === void 0) {
383    classes2 = [];
384  }
385  const el = document.createElement(tag);
386  el.classList.add(...Array.isArray(classes2) ? classes2 : classesToTokens(classes2));
387  return el;
388}
389function elementOffset(el) {
390  const window2 = getWindow();
391  const document2 = getDocument();
392  const box = el.getBoundingClientRect();
393  const body = document2.body;
394  const clientTop = el.clientTop || body.clientTop || 0;
395  const clientLeft = el.clientLeft || body.clientLeft || 0;
396  const scrollTop = el === window2 ? window2.scrollY : el.scrollTop;
397  const scrollLeft = el === window2 ? window2.scrollX : el.scrollLeft;
398  return {
399    top: box.top + scrollTop - clientTop,
400    left: box.left + scrollLeft - clientLeft
401  };
402}
403function elementPrevAll(el, selector) {
404  const prevEls = [];
405  while (el.previousElementSibling) {
406    const prev = el.previousElementSibling;
407    if (selector) {
408      if (prev.matches(selector)) prevEls.push(prev);
409    } else prevEls.push(prev);
410    el = prev;
411  }
412  return prevEls;
413}
414function elementNextAll(el, selector) {
415  const nextEls = [];
416  while (el.nextElementSibling) {
417    const next = el.nextElementSibling;
418    if (selector) {
419      if (next.matches(selector)) nextEls.push(next);
420    } else nextEls.push(next);
421    el = next;
422  }
423  return nextEls;
424}
425function elementStyle(el, prop) {
426  const window2 = getWindow();
427  return window2.getComputedStyle(el, null).getPropertyValue(prop);
428}
429function elementIndex(el) {
430  let child = el;
431  let i;
432  if (child) {
433    i = 0;
434    while ((child = child.previousSibling) !== null) {
435      if (child.nodeType === 1) i += 1;
436    }
437    return i;
438  }
439  return void 0;
440}
441function elementParents(el, selector) {
442  const parents = [];
443  let parent = el.parentElement;
444  while (parent) {
445    if (selector) {
446      if (parent.matches(selector)) parents.push(parent);
447    } else {
448      parents.push(parent);
449    }
450    parent = parent.parentElement;
451  }
452  return parents;
453}
454function elementTransitionEnd(el, callback) {
455  function fireCallBack(e) {
456    if (e.target !== el) return;
457    callback.call(el, e);
458    el.removeEventListener("transitionend", fireCallBack);
459  }
460  if (callback) {
461    el.addEventListener("transitionend", fireCallBack);
462  }
463}
464function elementOuterSize(el, size, includeMargins) {
465  const window2 = getWindow();
466  {
467    return el[size === "width" ? "offsetWidth" : "offsetHeight"] + parseFloat(window2.getComputedStyle(el, null).getPropertyValue(size === "width" ? "margin-right" : "margin-top")) + parseFloat(window2.getComputedStyle(el, null).getPropertyValue(size === "width" ? "margin-left" : "margin-bottom"));
468  }
469}
470function makeElementsArray(el) {
471  return (Array.isArray(el) ? el : [el]).filter((e) => !!e);
472}
473function getRotateFix(swiper) {
474  return (v) => {
475    if (Math.abs(v) > 0 && swiper.browser && swiper.browser.need3dFix && Math.abs(v) % 90 === 0) {
476      return v + 1e-3;
477    }
478    return v;
479  };
480}
481let support;
482function calcSupport() {
483  const window2 = getWindow();
484  const document2 = getDocument();
485  return {
486    smoothScroll: document2.documentElement && document2.documentElement.style && "scrollBehavior" in document2.documentElement.style,
487    touch: !!("ontouchstart" in window2 || window2.DocumentTouch && document2 instanceof window2.DocumentTouch)
488  };
489}
vendor: 23,820 bytes, lines 490-1146
490function getSupport() {
491  if (!support) {
492    support = calcSupport();
493  }
494  return support;
495}
496let deviceCached;
497function calcDevice(_temp) {
498  let {
499    userAgent
500  } = _temp === void 0 ? {} : _temp;
501  const support2 = getSupport();
502  const window2 = getWindow();
503  const platform = window2.navigator.platform;
504  const ua = userAgent || window2.navigator.userAgent;
505  const device = {
506    ios: false,
507    android: false
508  };
509  const screenWidth = window2.screen.width;
510  const screenHeight = window2.screen.height;
511  const android = ua.match(/(Android);?[\s\/]+([\d.]+)?/);
512  let ipad = ua.match(/(iPad).*OS\s([\d_]+)/);
513  const ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/);
514  const iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/);
515  const windows = platform === "Win32";
516  let macos = platform === "MacIntel";
517  const iPadScreens = ["1024x1366", "1366x1024", "834x1194", "1194x834", "834x1112", "1112x834", "768x1024", "1024x768", "820x1180", "1180x820", "810x1080", "1080x810"];
518  if (!ipad && macos && support2.touch && iPadScreens.indexOf(`${screenWidth}x${screenHeight}`) >= 0) {
519    ipad = ua.match(/(Version)\/([\d.]+)/);
520    if (!ipad) ipad = [0, 1, "13_0_0"];
521    macos = false;
522  }
523  if (android && !windows) {
524    device.os = "android";
525    device.android = true;
526  }
527  if (ipad || iphone || ipod) {
528    device.os = "ios";
529    device.ios = true;
530  }
531  return device;
532}
533function getDevice(overrides) {
534  if (overrides === void 0) {
535    overrides = {};
536  }
537  if (!deviceCached) {
538    deviceCached = calcDevice(overrides);
539  }
540  return deviceCached;
541}
542let browser;
543function calcBrowser() {
544  const window2 = getWindow();
545  const device = getDevice();
546  let needPerspectiveFix = false;
547  function isSafari() {
548    const ua = window2.navigator.userAgent.toLowerCase();
549    return ua.indexOf("safari") >= 0 && ua.indexOf("chrome") < 0 && ua.indexOf("android") < 0;
550  }
551  if (isSafari()) {
552    const ua = String(window2.navigator.userAgent);
553    if (ua.includes("Version/")) {
554      const [major, minor] = ua.split("Version/")[1].split(" ")[0].split(".").map((num) => Number(num));
555      needPerspectiveFix = major < 16 || major === 16 && minor < 2;
556    }
557  }
558  const isWebView = /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window2.navigator.userAgent);
559  const isSafariBrowser = isSafari();
560  const need3dFix = isSafariBrowser || isWebView && device.ios;
561  return {
562    isSafari: needPerspectiveFix || isSafariBrowser,
563    needPerspectiveFix,
564    need3dFix,
565    isWebView
566  };
567}
568function getBrowser() {
569  if (!browser) {
570    browser = calcBrowser();
571  }
572  return browser;
573}
574function Resize(_ref) {
575  let {
576    swiper,
577    on,
578    emit
579  } = _ref;
580  const window2 = getWindow();
581  let observer = null;
582  let animationFrame = null;
583  const resizeHandler = () => {
584    if (!swiper || swiper.destroyed || !swiper.initialized) return;
585    emit("beforeResize");
586    emit("resize");
587  };
588  const createObserver = () => {
589    if (!swiper || swiper.destroyed || !swiper.initialized) return;
590    observer = new ResizeObserver((entries) => {
591      animationFrame = window2.requestAnimationFrame(() => {
592        const {
593          width,
594          height
595        } = swiper;
596        let newWidth = width;
597        let newHeight = height;
598        entries.forEach((_ref2) => {
599          let {
600            contentBoxSize,
601            contentRect,
602            target
603          } = _ref2;
604          if (target && target !== swiper.el) return;
605          newWidth = contentRect ? contentRect.width : (contentBoxSize[0] || contentBoxSize).inlineSize;
606          newHeight = contentRect ? contentRect.height : (contentBoxSize[0] || contentBoxSize).blockSize;
607        });
608        if (newWidth !== width || newHeight !== height) {
609          resizeHandler();
610        }
611      });
612    });
613    observer.observe(swiper.el);
614  };
615  const removeObserver = () => {
616    if (animationFrame) {
617      window2.cancelAnimationFrame(animationFrame);
618    }
619    if (observer && observer.unobserve && swiper.el) {
620      observer.unobserve(swiper.el);
621      observer = null;
622    }
623  };
624  const orientationChangeHandler = () => {
625    if (!swiper || swiper.destroyed || !swiper.initialized) return;
626    emit("orientationchange");
627  };
628  on("init", () => {
629    if (swiper.params.resizeObserver && typeof window2.ResizeObserver !== "undefined") {
630      createObserver();
631      return;
632    }
633    window2.addEventListener("resize", resizeHandler);
634    window2.addEventListener("orientationchange", orientationChangeHandler);
635  });
636  on("destroy", () => {
637    removeObserver();
638    window2.removeEventListener("resize", resizeHandler);
639    window2.removeEventListener("orientationchange", orientationChangeHandler);
640  });
641}
642function Observer(_ref) {
643  let {
644    swiper,
645    extendParams,
646    on,
647    emit
648  } = _ref;
649  const observers = [];
650  const window2 = getWindow();
651  const attach = function(target, options) {
652    if (options === void 0) {
653      options = {};
654    }
655    const ObserverFunc = window2.MutationObserver || window2.WebkitMutationObserver;
656    const observer = new ObserverFunc((mutations) => {
657      if (swiper.__preventObserver__) return;
658      if (mutations.length === 1) {
659        emit("observerUpdate", mutations[0]);
660        return;
661      }
662      const observerUpdate = function observerUpdate2() {
663        emit("observerUpdate", mutations[0]);
664      };
665      if (window2.requestAnimationFrame) {
666        window2.requestAnimationFrame(observerUpdate);
667      } else {
668        window2.setTimeout(observerUpdate, 0);
669      }
670    });
671    observer.observe(target, {
672      attributes: typeof options.attributes === "undefined" ? true : options.attributes,
673      childList: swiper.isElement || (typeof options.childList === "undefined" ? true : options).childList,
674      characterData: typeof options.characterData === "undefined" ? true : options.characterData
675    });
676    observers.push(observer);
677  };
678  const init = () => {
679    if (!swiper.params.observer) return;
680    if (swiper.params.observeParents) {
681      const containerParents = elementParents(swiper.hostEl);
682      for (let i = 0; i < containerParents.length; i += 1) {
683        attach(containerParents[i]);
684      }
685    }
686    attach(swiper.hostEl, {
687      childList: swiper.params.observeSlideChildren
688    });
689    attach(swiper.wrapperEl, {
690      attributes: false
691    });
692  };
693  const destroy = () => {
694    observers.forEach((observer) => {
695      observer.disconnect();
696    });
697    observers.splice(0, observers.length);
698  };
699  extendParams({
700    observer: false,
701    observeParents: false,
702    observeSlideChildren: false
703  });
704  on("init", init);
705  on("destroy", destroy);
706}
707var eventsEmitter = {
708  on(events2, handler, priority) {
709    const self2 = this;
710    if (!self2.eventsListeners || self2.destroyed) return self2;
711    if (typeof handler !== "function") return self2;
712    const method = priority ? "unshift" : "push";
713    events2.split(" ").forEach((event2) => {
714      if (!self2.eventsListeners[event2]) self2.eventsListeners[event2] = [];
715      self2.eventsListeners[event2][method](handler);
716    });
717    return self2;
718  },
719  once(events2, handler, priority) {
720    const self2 = this;
721    if (!self2.eventsListeners || self2.destroyed) return self2;
722    if (typeof handler !== "function") return self2;
723    function onceHandler() {
724      self2.off(events2, onceHandler);
725      if (onceHandler.__emitterProxy) {
726        delete onceHandler.__emitterProxy;
727      }
728      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
729        args[_key] = arguments[_key];
730      }
731      handler.apply(self2, args);
732    }
733    onceHandler.__emitterProxy = handler;
734    return self2.on(events2, onceHandler, priority);
735  },
736  onAny(handler, priority) {
737    const self2 = this;
738    if (!self2.eventsListeners || self2.destroyed) return self2;
739    if (typeof handler !== "function") return self2;
740    const method = priority ? "unshift" : "push";
741    if (self2.eventsAnyListeners.indexOf(handler) < 0) {
742      self2.eventsAnyListeners[method](handler);
743    }
744    return self2;
745  },
746  offAny(handler) {
747    const self2 = this;
748    if (!self2.eventsListeners || self2.destroyed) return self2;
749    if (!self2.eventsAnyListeners) return self2;
750    const index = self2.eventsAnyListeners.indexOf(handler);
751    if (index >= 0) {
752      self2.eventsAnyListeners.splice(index, 1);
753    }
754    return self2;
755  },
756  off(events2, handler) {
757    const self2 = this;
758    if (!self2.eventsListeners || self2.destroyed) return self2;
759    if (!self2.eventsListeners) return self2;
760    events2.split(" ").forEach((event2) => {
761      if (typeof handler === "undefined") {
762        self2.eventsListeners[event2] = [];
763      } else if (self2.eventsListeners[event2]) {
764        self2.eventsListeners[event2].forEach((eventHandler, index) => {
765          if (eventHandler === handler || eventHandler.__emitterProxy && eventHandler.__emitterProxy === handler) {
766            self2.eventsListeners[event2].splice(index, 1);
767          }
768        });
769      }
770    });
771    return self2;
772  },
773  emit() {
774    const self2 = this;
775    if (!self2.eventsListeners || self2.destroyed) return self2;
776    if (!self2.eventsListeners) return self2;
777    let events2;
778    let data;
779    let context;
780    for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
781      args[_key2] = arguments[_key2];
782    }
783    if (typeof args[0] === "string" || Array.isArray(args[0])) {
784      events2 = args[0];
785      data = args.slice(1, args.length);
786      context = self2;
787    } else {
788      events2 = args[0].events;
789      data = args[0].data;
790      context = args[0].context || self2;
791    }
792    data.unshift(context);
793    const eventsArray = Array.isArray(events2) ? events2 : events2.split(" ");
794    eventsArray.forEach((event2) => {
795      if (self2.eventsAnyListeners && self2.eventsAnyListeners.length) {
796        self2.eventsAnyListeners.forEach((eventHandler) => {
797          eventHandler.apply(context, [event2, ...data]);
798        });
799      }
800      if (self2.eventsListeners && self2.eventsListeners[event2]) {
801        self2.eventsListeners[event2].forEach((eventHandler) => {
802          eventHandler.apply(context, data);
803        });
804      }
805    });
806    return self2;
807  }
808};
809function updateSize() {
810  const swiper = this;
811  let width;
812  let height;
813  const el = swiper.el;
814  if (typeof swiper.params.width !== "undefined" && swiper.params.width !== null) {
815    width = swiper.params.width;
816  } else {
817    width = el.clientWidth;
818  }
819  if (typeof swiper.params.height !== "undefined" && swiper.params.height !== null) {
820    height = swiper.params.height;
821  } else {
822    height = el.clientHeight;
823  }
824  if (width === 0 && swiper.isHorizontal() || height === 0 && swiper.isVertical()) {
825    return;
826  }
827  width = width - parseInt(elementStyle(el, "padding-left") || 0, 10) - parseInt(elementStyle(el, "padding-right") || 0, 10);
828  height = height - parseInt(elementStyle(el, "padding-top") || 0, 10) - parseInt(elementStyle(el, "padding-bottom") || 0, 10);
829  if (Number.isNaN(width)) width = 0;
830  if (Number.isNaN(height)) height = 0;
831  Object.assign(swiper, {
832    width,
833    height,
834    size: swiper.isHorizontal() ? width : height
835  });
836}
837function updateSlides() {
838  const swiper = this;
839  function getDirectionPropertyValue(node, label) {
840    return parseFloat(node.getPropertyValue(swiper.getDirectionLabel(label)) || 0);
841  }
842  const params = swiper.params;
843  const {
844    wrapperEl,
845    slidesEl,
846    size: swiperSize,
847    rtlTranslate: rtl,
848    wrongRTL
849  } = swiper;
850  const isVirtual = swiper.virtual && params.virtual.enabled;
851  const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length;
852  const slides = elementChildren(slidesEl, `.${swiper.params.slideClass}, swiper-slide`);
853  const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length;
854  let snapGrid = [];
855  const slidesGrid = [];
856  const slidesSizesGrid = [];
857  let offsetBefore = params.slidesOffsetBefore;
858  if (typeof offsetBefore === "function") {
859    offsetBefore = params.slidesOffsetBefore.call(swiper);
860  }
861  let offsetAfter = params.slidesOffsetAfter;
862  if (typeof offsetAfter === "function") {
863    offsetAfter = params.slidesOffsetAfter.call(swiper);
864  }
865  const previousSnapGridLength = swiper.snapGrid.length;
866  const previousSlidesGridLength = swiper.slidesGrid.length;
867  let spaceBetween = params.spaceBetween;
868  let slidePosition = -offsetBefore;
869  let prevSlideSize = 0;
870  let index = 0;
871  if (typeof swiperSize === "undefined") {
872    return;
873  }
874  if (typeof spaceBetween === "string" && spaceBetween.indexOf("%") >= 0) {
875    spaceBetween = parseFloat(spaceBetween.replace("%", "")) / 100 * swiperSize;
876  } else if (typeof spaceBetween === "string") {
877    spaceBetween = parseFloat(spaceBetween);
878  }
879  swiper.virtualSize = -spaceBetween;
880  slides.forEach((slideEl) => {
881    if (rtl) {
882      slideEl.style.marginLeft = "";
883    } else {
884      slideEl.style.marginRight = "";
885    }
886    slideEl.style.marginBottom = "";
887    slideEl.style.marginTop = "";
888  });
889  if (params.centeredSlides && params.cssMode) {
890    setCSSProperty(wrapperEl, "--swiper-centered-offset-before", "");
891    setCSSProperty(wrapperEl, "--swiper-centered-offset-after", "");
892  }
893  const gridEnabled = params.grid && params.grid.rows > 1 && swiper.grid;
894  if (gridEnabled) {
895    swiper.grid.initSlides(slides);
896  } else if (swiper.grid) {
897    swiper.grid.unsetSlides();
898  }
899  let slideSize;
900  const shouldResetSlideSize = params.slidesPerView === "auto" && params.breakpoints && Object.keys(params.breakpoints).filter((key) => {
901    return typeof params.breakpoints[key].slidesPerView !== "undefined";
902  }).length > 0;
903  for (let i = 0; i < slidesLength; i += 1) {
904    slideSize = 0;
905    let slide2;
906    if (slides[i]) slide2 = slides[i];
907    if (gridEnabled) {
908      swiper.grid.updateSlide(i, slide2, slides);
909    }
910    if (slides[i] && elementStyle(slide2, "display") === "none") continue;
911    if (params.slidesPerView === "auto") {
912      if (shouldResetSlideSize) {
913        slides[i].style[swiper.getDirectionLabel("width")] = ``;
914      }
915      const slideStyles = getComputedStyle(slide2);
916      const currentTransform = slide2.style.transform;
917      const currentWebKitTransform = slide2.style.webkitTransform;
918      if (currentTransform) {
919        slide2.style.transform = "none";
920      }
921      if (currentWebKitTransform) {
922        slide2.style.webkitTransform = "none";
923      }
924      if (params.roundLengths) {
925        slideSize = swiper.isHorizontal() ? elementOuterSize(slide2, "width") : elementOuterSize(slide2, "height");
926      } else {
927        const width = getDirectionPropertyValue(slideStyles, "width");
928        const paddingLeft = getDirectionPropertyValue(slideStyles, "padding-left");
929        const paddingRight = getDirectionPropertyValue(slideStyles, "padding-right");
930        const marginLeft = getDirectionPropertyValue(slideStyles, "margin-left");
931        const marginRight = getDirectionPropertyValue(slideStyles, "margin-right");
932        const boxSizing = slideStyles.getPropertyValue("box-sizing");
933        if (boxSizing && boxSizing === "border-box") {
934          slideSize = width + marginLeft + marginRight;
935        } else {
936          const {
937            clientWidth,
938            offsetWidth
939          } = slide2;
940          slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight + (offsetWidth - clientWidth);
941        }
942      }
943      if (currentTransform) {
944        slide2.style.transform = currentTransform;
945      }
946      if (currentWebKitTransform) {
947        slide2.style.webkitTransform = currentWebKitTransform;
948      }
949      if (params.roundLengths) slideSize = Math.floor(slideSize);
950    } else {
951      slideSize = (swiperSize - (params.slidesPerView - 1) * spaceBetween) / params.slidesPerView;
952      if (params.roundLengths) slideSize = Math.floor(slideSize);
953      if (slides[i]) {
954        slides[i].style[swiper.getDirectionLabel("width")] = `${slideSize}px`;
955      }
956    }
957    if (slides[i]) {
958      slides[i].swiperSlideSize = slideSize;
959    }
960    slidesSizesGrid.push(slideSize);
961    if (params.centeredSlides) {
962      slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween;
963      if (prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;
964      if (i === 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;
965      if (Math.abs(slidePosition) < 1 / 1e3) slidePosition = 0;
966      if (params.roundLengths) slidePosition = Math.floor(slidePosition);
967      if (index % params.slidesPerGroup === 0) snapGrid.push(slidePosition);
968      slidesGrid.push(slidePosition);
969    } else {
970      if (params.roundLengths) slidePosition = Math.floor(slidePosition);
971      if ((index - Math.min(swiper.params.slidesPerGroupSkip, index)) % swiper.params.slidesPerGroup === 0) snapGrid.push(slidePosition);
972      slidesGrid.push(slidePosition);
973      slidePosition = slidePosition + slideSize + spaceBetween;
974    }
975    swiper.virtualSize += slideSize + spaceBetween;
976    prevSlideSize = slideSize;
977    index += 1;
978  }
979  swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter;
980  if (rtl && wrongRTL && (params.effect === "slide" || params.effect === "coverflow")) {
981    wrapperEl.style.width = `${swiper.virtualSize + spaceBetween}px`;
982  }
983  if (params.setWrapperSize) {
984    wrapperEl.style[swiper.getDirectionLabel("width")] = `${swiper.virtualSize + spaceBetween}px`;
985  }
986  if (gridEnabled) {
987    swiper.grid.updateWrapperSize(slideSize, snapGrid);
988  }
989  if (!params.centeredSlides) {
990    const newSlidesGrid = [];
991    for (let i = 0; i < snapGrid.length; i += 1) {
992      let slidesGridItem = snapGrid[i];
993      if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem);
994      if (snapGrid[i] <= swiper.virtualSize - swiperSize) {
995        newSlidesGrid.push(slidesGridItem);
996      }
997    }
998    snapGrid = newSlidesGrid;
999    if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) {
1000      snapGrid.push(swiper.virtualSize - swiperSize);
1001    }
1002  }
1003  if (isVirtual && params.loop) {
1004    const size = slidesSizesGrid[0] + spaceBetween;
1005    if (params.slidesPerGroup > 1) {
1006      const groups = Math.ceil((swiper.virtual.slidesBefore + swiper.virtual.slidesAfter) / params.slidesPerGroup);
1007      const groupSize = size * params.slidesPerGroup;
1008      for (let i = 0; i < groups; i += 1) {
1009        snapGrid.push(snapGrid[snapGrid.length - 1] + groupSize);
1010      }
1011    }
1012    for (let i = 0; i < swiper.virtual.slidesBefore + swiper.virtual.slidesAfter; i += 1) {
1013      if (params.slidesPerGroup === 1) {
1014        snapGrid.push(snapGrid[snapGrid.length - 1] + size);
1015      }
1016      slidesGrid.push(slidesGrid[slidesGrid.length - 1] + size);
1017      swiper.virtualSize += size;
1018    }
1019  }
1020  if (snapGrid.length === 0) snapGrid = [0];
1021  if (spaceBetween !== 0) {
1022    const key = swiper.isHorizontal() && rtl ? "marginLeft" : swiper.getDirectionLabel("marginRight");
1023    slides.filter((_, slideIndex) => {
1024      if (!params.cssMode || params.loop) return true;
1025      if (slideIndex === slides.length - 1) {
1026        return false;
1027      }
1028      return true;
1029    }).forEach((slideEl) => {
1030      slideEl.style[key] = `${spaceBetween}px`;
1031    });
1032  }
1033  if (params.centeredSlides && params.centeredSlidesBounds) {
1034    let allSlidesSize = 0;
1035    slidesSizesGrid.forEach((slideSizeValue) => {
1036      allSlidesSize += slideSizeValue + (spaceBetween || 0);
1037    });
1038    allSlidesSize -= spaceBetween;
1039    const maxSnap = allSlidesSize > swiperSize ? allSlidesSize - swiperSize : 0;
1040    snapGrid = snapGrid.map((snap) => {
1041      if (snap <= 0) return -offsetBefore;
1042      if (snap > maxSnap) return maxSnap + offsetAfter;
1043      return snap;
1044    });
1045  }
1046  if (params.centerInsufficientSlides) {
1047    let allSlidesSize = 0;
1048    slidesSizesGrid.forEach((slideSizeValue) => {
1049      allSlidesSize += slideSizeValue + (spaceBetween || 0);
1050    });
1051    allSlidesSize -= spaceBetween;
1052    const offsetSize = (params.slidesOffsetBefore || 0) + (params.slidesOffsetAfter || 0);
1053    if (allSlidesSize + offsetSize < swiperSize) {
1054      const allSlidesOffset = (swiperSize - allSlidesSize - offsetSize) / 2;
1055      snapGrid.forEach((snap, snapIndex) => {
1056        snapGrid[snapIndex] = snap - allSlidesOffset;
1057      });
1058      slidesGrid.forEach((snap, snapIndex) => {
1059        slidesGrid[snapIndex] = snap + allSlidesOffset;
1060      });
1061    }
1062  }
1063  Object.assign(swiper, {
1064    slides,
1065    snapGrid,
1066    slidesGrid,
1067    slidesSizesGrid
1068  });
1069  if (params.centeredSlides && params.cssMode && !params.centeredSlidesBounds) {
1070    setCSSProperty(wrapperEl, "--swiper-centered-offset-before", `${-snapGrid[0]}px`);
1071    setCSSProperty(wrapperEl, "--swiper-centered-offset-after", `${swiper.size / 2 - slidesSizesGrid[slidesSizesGrid.length - 1] / 2}px`);
1072    const addToSnapGrid = -swiper.snapGrid[0];
1073    const addToSlidesGrid = -swiper.slidesGrid[0];
1074    swiper.snapGrid = swiper.snapGrid.map((v) => v + addToSnapGrid);
1075    swiper.slidesGrid = swiper.slidesGrid.map((v) => v + addToSlidesGrid);
1076  }
1077  if (slidesLength !== previousSlidesLength) {
1078    swiper.emit("slidesLengthChange");
1079  }
1080  if (snapGrid.length !== previousSnapGridLength) {
1081    if (swiper.params.watchOverflow) swiper.checkOverflow();
1082    swiper.emit("snapGridLengthChange");
1083  }
1084  if (slidesGrid.length !== previousSlidesGridLength) {
1085    swiper.emit("slidesGridLengthChange");
1086  }
1087  if (params.watchSlidesProgress) {
1088    swiper.updateSlidesOffset();
1089  }
1090  swiper.emit("slidesUpdated");
1091  if (!isVirtual && !params.cssMode && (params.effect === "slide" || params.effect === "fade")) {
1092    const backFaceHiddenClass = `${params.containerModifierClass}backface-hidden`;
1093    const hasClassBackfaceClassAdded = swiper.el.classList.contains(backFaceHiddenClass);
1094    if (slidesLength <= params.maxBackfaceHiddenSlides) {
1095      if (!hasClassBackfaceClassAdded) swiper.el.classList.add(backFaceHiddenClass);
1096    } else if (hasClassBackfaceClassAdded) {
1097      swiper.el.classList.remove(backFaceHiddenClass);
1098    }
1099  }
1100}
1101function updateAutoHeight(speed) {
1102  const swiper = this;
1103  const activeSlides = [];
1104  const isVirtual = swiper.virtual && swiper.params.virtual.enabled;
1105  let newHeight = 0;
1106  let i;
1107  if (typeof speed === "number") {
1108    swiper.setTransition(speed);
1109  } else if (speed === true) {
1110    swiper.setTransition(swiper.params.speed);
1111  }
1112  const getSlideByIndex = (index) => {
1113    if (isVirtual) {
1114      return swiper.slides[swiper.getSlideIndexByData(index)];
1115    }
1116    return swiper.slides[index];
1117  };
1118  if (swiper.params.slidesPerView !== "auto" && swiper.params.slidesPerView > 1) {
1119    if (swiper.params.centeredSlides) {
1120      (swiper.visibleSlides || []).forEach((slide2) => {
1121        activeSlides.push(slide2);
1122      });
1123    } else {
1124      for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) {
1125        const index = swiper.activeIndex + i;
1126        if (index > swiper.slides.length && !isVirtual) break;
1127        activeSlides.push(getSlideByIndex(index));
1128      }
1129    }
1130  } else {
1131    activeSlides.push(getSlideByIndex(swiper.activeIndex));
1132  }
1133  for (i = 0; i < activeSlides.length; i += 1) {
1134    if (typeof activeSlides[i] !== "undefined") {
1135      const height = activeSlides[i].offsetHeight;
1136      newHeight = height > newHeight ? height : newHeight;
1137    }
1138  }
1139  if (newHeight || newHeight === 0) swiper.wrapperEl.style.height = `${newHeight}px`;
1140}
1141function updateSlidesOffset() {
1142  const swiper = this;
1143  const slides = swiper.slides;
1144  const minusOffset = swiper.isElement ? swiper.isHorizontal() ? swiper.wrapperEl.offsetLeft : swiper.wrapperEl.offsetTop : 0;
1145  for (let i = 0; i < slides.length; i += 1) {
1146    slides[i].swiperSlideOffset = (swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop) - minu
vendor: 2,198 bytes, lines 1146-1194
1146sOffset - swiper.cssOverflowAdjustment();
1147  }
1148}
1149const toggleSlideClasses$1 = (slideEl, condition, className) => {
1150  if (condition && !slideEl.classList.contains(className)) {
1151    slideEl.classList.add(className);
1152  } else if (!condition && slideEl.classList.contains(className)) {
1153    slideEl.classList.remove(className);
1154  }
1155};
1156function updateSlidesProgress(translate2) {
1157  if (translate2 === void 0) {
1158    translate2 = this && this.translate || 0;
1159  }
1160  const swiper = this;
1161  const params = swiper.params;
1162  const {
1163    slides,
1164    rtlTranslate: rtl,
1165    snapGrid
1166  } = swiper;
1167  if (slides.length === 0) return;
1168  if (typeof slides[0].swiperSlideOffset === "undefined") swiper.updateSlidesOffset();
1169  let offsetCenter = -translate2;
1170  if (rtl) offsetCenter = translate2;
1171  swiper.visibleSlidesIndexes = [];
1172  swiper.visibleSlides = [];
1173  let spaceBetween = params.spaceBetween;
1174  if (typeof spaceBetween === "string" && spaceBetween.indexOf("%") >= 0) {
1175    spaceBetween = parseFloat(spaceBetween.replace("%", "")) / 100 * swiper.size;
1176  } else if (typeof spaceBetween === "string") {
1177    spaceBetween = parseFloat(spaceBetween);
1178  }
1179  for (let i = 0; i < slides.length; i += 1) {
1180    const slide2 = slides[i];
1181    let slideOffset = slide2.swiperSlideOffset;
1182    if (params.cssMode && params.centeredSlides) {
1183      slideOffset -= slides[0].swiperSlideOffset;
1184    }
1185    const slideProgress = (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide2.swiperSlideSize + spaceBetween);
1186    const originalSlideProgress = (offsetCenter - snapGrid[0] + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide2.swiperSlideSize + spaceBetween);
1187    const slideBefore = -(offsetCenter - slideOffset);
1188    const slideAfter = slideBefore + swiper.slidesSizesGrid[i];
1189    const isFullyVisible = slideBefore >= 0 && slideBefore <= swiper.size - swiper.slidesSizesGrid[i];
1190    const isVisible = slideBefore >= 0 && slideBefore < swiper.size - 1 || slideAfter > 1 && slideAfter <= swiper.size || slideBefore <= 0 && slideAfter >= swiper.size;
1191    if (isVisible) {
1192      swiper.visibleSlides.push(slide2);
1193      swiper.visibleSlidesIndexes.push(i);
1194    }
vendor: 4,471 bytes, lines 1195-1314
1195    toggleSlideClasses$1(slide2, isVisible, params.slideVisibleClass);
1196    toggleSlideClasses$1(slide2, isFullyVisible, params.slideFullyVisibleClass);
1197    slide2.progress = rtl ? -slideProgress : slideProgress;
1198    slide2.originalProgress = rtl ? -originalSlideProgress : originalSlideProgress;
1199  }
1200}
1201function updateProgress(translate2) {
1202  const swiper = this;
1203  if (typeof translate2 === "undefined") {
1204    const multiplier = swiper.rtlTranslate ? -1 : 1;
1205    translate2 = swiper && swiper.translate && swiper.translate * multiplier || 0;
1206  }
1207  const params = swiper.params;
1208  const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
1209  let {
1210    progress,
1211    isBeginning,
1212    isEnd,
1213    progressLoop
1214  } = swiper;
1215  const wasBeginning = isBeginning;
1216  const wasEnd = isEnd;
1217  if (translatesDiff === 0) {
1218    progress = 0;
1219    isBeginning = true;
1220    isEnd = true;
1221  } else {
1222    progress = (translate2 - swiper.minTranslate()) / translatesDiff;
1223    const isBeginningRounded = Math.abs(translate2 - swiper.minTranslate()) < 1;
1224    const isEndRounded = Math.abs(translate2 - swiper.maxTranslate()) < 1;
1225    isBeginning = isBeginningRounded || progress <= 0;
1226    isEnd = isEndRounded || progress >= 1;
1227    if (isBeginningRounded) progress = 0;
1228    if (isEndRounded) progress = 1;
1229  }
1230  if (params.loop) {
1231    const firstSlideIndex = swiper.getSlideIndexByData(0);
1232    const lastSlideIndex = swiper.getSlideIndexByData(swiper.slides.length - 1);
1233    const firstSlideTranslate = swiper.slidesGrid[firstSlideIndex];
1234    const lastSlideTranslate = swiper.slidesGrid[lastSlideIndex];
1235    const translateMax = swiper.slidesGrid[swiper.slidesGrid.length - 1];
1236    const translateAbs = Math.abs(translate2);
1237    if (translateAbs >= firstSlideTranslate) {
1238      progressLoop = (translateAbs - firstSlideTranslate) / translateMax;
1239    } else {
1240      progressLoop = (translateAbs + translateMax - lastSlideTranslate) / translateMax;
1241    }
1242    if (progressLoop > 1) progressLoop -= 1;
1243  }
1244  Object.assign(swiper, {
1245    progress,
1246    progressLoop,
1247    isBeginning,
1248    isEnd
1249  });
1250  if (params.watchSlidesProgress || params.centeredSlides && params.autoHeight) swiper.updateSlidesProgress(translate2);
1251  if (isBeginning && !wasBeginning) {
1252    swiper.emit("reachBeginning toEdge");
1253  }
1254  if (isEnd && !wasEnd) {
1255    swiper.emit("reachEnd toEdge");
1256  }
1257  if (wasBeginning && !isBeginning || wasEnd && !isEnd) {
1258    swiper.emit("fromEdge");
1259  }
1260  swiper.emit("progress", progress);
1261}
1262const toggleSlideClasses = (slideEl, condition, className) => {
1263  if (condition && !slideEl.classList.contains(className)) {
1264    slideEl.classList.add(className);
1265  } else if (!condition && slideEl.classList.contains(className)) {
1266    slideEl.classList.remove(className);
1267  }
1268};
1269function updateSlidesClasses() {
1270  const swiper = this;
1271  const {
1272    slides,
1273    params,
1274    slidesEl,
1275    activeIndex
1276  } = swiper;
1277  const isVirtual = swiper.virtual && params.virtual.enabled;
1278  const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1;
1279  const getFilteredSlide = (selector) => {
1280    return elementChildren(slidesEl, `.${params.slideClass}${selector}, swiper-slide${selector}`)[0];
1281  };
1282  let activeSlide;
1283  let prevSlide;
1284  let nextSlide;
1285  if (isVirtual) {
1286    if (params.loop) {
1287      let slideIndex = activeIndex - swiper.virtual.slidesBefore;
1288      if (slideIndex < 0) slideIndex = swiper.virtual.slides.length + slideIndex;
1289      if (slideIndex >= swiper.virtual.slides.length) slideIndex -= swiper.virtual.slides.length;
1290      activeSlide = getFilteredSlide(`[data-swiper-slide-index="${slideIndex}"]`);
1291    } else {
1292      activeSlide = getFilteredSlide(`[data-swiper-slide-index="${activeIndex}"]`);
1293    }
1294  } else {
1295    if (gridEnabled) {
1296      activeSlide = slides.filter((slideEl) => slideEl.column === activeIndex)[0];
1297      nextSlide = slides.filter((slideEl) => slideEl.column === activeIndex + 1)[0];
1298      prevSlide = slides.filter((slideEl) => slideEl.column === activeIndex - 1)[0];
1299    } else {
1300      activeSlide = slides[activeIndex];
1301    }
1302  }
1303  if (activeSlide) {
1304    if (!gridEnabled) {
1305      nextSlide = elementNextAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];
1306      if (params.loop && !nextSlide) {
1307        nextSlide = slides[0];
1308      }
1309      prevSlide = elementPrevAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];
1310      if (params.loop && !prevSlide === 0) {
1311        prevSlide = slides[slides.length - 1];
1312      }
1313    }
1314  }
vendor: 4,377 bytes, lines 1315-1430
1315  slides.forEach((slideEl) => {
1316    toggleSlideClasses(slideEl, slideEl === activeSlide, params.slideActiveClass);
1317    toggleSlideClasses(slideEl, slideEl === nextSlide, params.slideNextClass);
1318    toggleSlideClasses(slideEl, slideEl === prevSlide, params.slidePrevClass);
1319  });
1320  swiper.emitSlidesClasses();
1321}
1322const processLazyPreloader = (swiper, imageEl) => {
1323  if (!swiper || swiper.destroyed || !swiper.params) return;
1324  const slideSelector = () => swiper.isElement ? `swiper-slide` : `.${swiper.params.slideClass}`;
1325  const slideEl = imageEl.closest(slideSelector());
1326  if (slideEl) {
1327    let lazyEl = slideEl.querySelector(`.${swiper.params.lazyPreloaderClass}`);
1328    if (!lazyEl && swiper.isElement) {
1329      if (slideEl.shadowRoot) {
1330        lazyEl = slideEl.shadowRoot.querySelector(`.${swiper.params.lazyPreloaderClass}`);
1331      } else {
1332        requestAnimationFrame(() => {
1333          if (slideEl.shadowRoot) {
1334            lazyEl = slideEl.shadowRoot.querySelector(`.${swiper.params.lazyPreloaderClass}`);
1335            if (lazyEl) lazyEl.remove();
1336          }
1337        });
1338      }
1339    }
1340    if (lazyEl) lazyEl.remove();
1341  }
1342};
1343const unlazy = (swiper, index) => {
1344  if (!swiper.slides[index]) return;
1345  const imageEl = swiper.slides[index].querySelector('[loading="lazy"]');
1346  if (imageEl) imageEl.removeAttribute("loading");
1347};
1348const preload = (swiper) => {
1349  if (!swiper || swiper.destroyed || !swiper.params) return;
1350  let amount = swiper.params.lazyPreloadPrevNext;
1351  const len = swiper.slides.length;
1352  if (!len || !amount || amount < 0) return;
1353  amount = Math.min(amount, len);
1354  const slidesPerView = swiper.params.slidesPerView === "auto" ? swiper.slidesPerViewDynamic() : Math.ceil(swiper.params.slidesPerView);
1355  const activeIndex = swiper.activeIndex;
1356  if (swiper.params.grid && swiper.params.grid.rows > 1) {
1357    const activeColumn = activeIndex;
1358    const preloadColumns = [activeColumn - amount];
1359    preloadColumns.push(...Array.from({
1360      length: amount
1361    }).map((_, i) => {
1362      return activeColumn + slidesPerView + i;
1363    }));
1364    swiper.slides.forEach((slideEl, i) => {
1365      if (preloadColumns.includes(slideEl.column)) unlazy(swiper, i);
1366    });
1367    return;
1368  }
1369  const slideIndexLastInView = activeIndex + slidesPerView - 1;
1370  if (swiper.params.rewind || swiper.params.loop) {
1371    for (let i = activeIndex - amount; i <= slideIndexLastInView + amount; i += 1) {
1372      const realIndex = (i % len + len) % len;
1373      if (realIndex < activeIndex || realIndex > slideIndexLastInView) unlazy(swiper, realIndex);
1374    }
1375  } else {
1376    for (let i = Math.max(activeIndex - amount, 0); i <= Math.min(slideIndexLastInView + amount, len - 1); i += 1) {
1377      if (i !== activeIndex && (i > slideIndexLastInView || i < activeIndex)) {
1378        unlazy(swiper, i);
1379      }
1380    }
1381  }
1382};
1383function getActiveIndexByTranslate(swiper) {
1384  const {
1385    slidesGrid,
1386    params
1387  } = swiper;
1388  const translate2 = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
1389  let activeIndex;
1390  for (let i = 0; i < slidesGrid.length; i += 1) {
1391    if (typeof slidesGrid[i + 1] !== "undefined") {
1392      if (translate2 >= slidesGrid[i] && translate2 < slidesGrid[i + 1] - (slidesGrid[i + 1] - slidesGrid[i]) / 2) {
1393        activeIndex = i;
1394      } else if (translate2 >= slidesGrid[i] && translate2 < slidesGrid[i + 1]) {
1395        activeIndex = i + 1;
1396      }
1397    } else if (translate2 >= slidesGrid[i]) {
1398      activeIndex = i;
1399    }
1400  }
1401  if (params.normalizeSlideIndex) {
1402    if (activeIndex < 0 || typeof activeIndex === "undefined") activeIndex = 0;
1403  }
1404  return activeIndex;
1405}
1406function updateActiveIndex(newActiveIndex) {
1407  const swiper = this;
1408  const translate2 = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
1409  const {
1410    snapGrid,
1411    params,
1412    activeIndex: previousIndex,
1413    realIndex: previousRealIndex,
1414    snapIndex: previousSnapIndex
1415  } = swiper;
1416  let activeIndex = newActiveIndex;
1417  let snapIndex;
1418  const getVirtualRealIndex = (aIndex) => {
1419    let realIndex2 = aIndex - swiper.virtual.slidesBefore;
1420    if (realIndex2 < 0) {
1421      realIndex2 = swiper.virtual.slides.length + realIndex2;
1422    }
1423    if (realIndex2 >= swiper.virtual.slides.length) {
1424      realIndex2 -= swiper.virtual.slides.length;
1425    }
1426    return realIndex2;
1427  };
1428  if (typeof activeIndex === "undefined") {
1429    activeIndex = getActiveIndexByTranslate(swiper);
1430  }
vendor: 30,229 bytes, lines 1431-2320
1431  if (snapGrid.indexOf(translate2) >= 0) {
1432    snapIndex = snapGrid.indexOf(translate2);
1433  } else {
1434    const skip = Math.min(params.slidesPerGroupSkip, activeIndex);
1435    snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup);
1436  }
1437  if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;
1438  if (activeIndex === previousIndex && !swiper.params.loop) {
1439    if (snapIndex !== previousSnapIndex) {
1440      swiper.snapIndex = snapIndex;
1441      swiper.emit("snapIndexChange");
1442    }
1443    return;
1444  }
1445  if (activeIndex === previousIndex && swiper.params.loop && swiper.virtual && swiper.params.virtual.enabled) {
1446    swiper.realIndex = getVirtualRealIndex(activeIndex);
1447    return;
1448  }
1449  const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1;
1450  let realIndex;
1451  if (swiper.virtual && params.virtual.enabled && params.loop) {
1452    realIndex = getVirtualRealIndex(activeIndex);
1453  } else if (gridEnabled) {
1454    const firstSlideInColumn = swiper.slides.filter((slideEl) => slideEl.column === activeIndex)[0];
1455    let activeSlideIndex = parseInt(firstSlideInColumn.getAttribute("data-swiper-slide-index"), 10);
1456    if (Number.isNaN(activeSlideIndex)) {
1457      activeSlideIndex = Math.max(swiper.slides.indexOf(firstSlideInColumn), 0);
1458    }
1459    realIndex = Math.floor(activeSlideIndex / params.grid.rows);
1460  } else if (swiper.slides[activeIndex]) {
1461    const slideIndex = swiper.slides[activeIndex].getAttribute("data-swiper-slide-index");
1462    if (slideIndex) {
1463      realIndex = parseInt(slideIndex, 10);
1464    } else {
1465      realIndex = activeIndex;
1466    }
1467  } else {
1468    realIndex = activeIndex;
1469  }
1470  Object.assign(swiper, {
1471    previousSnapIndex,
1472    snapIndex,
1473    previousRealIndex,
1474    realIndex,
1475    previousIndex,
1476    activeIndex
1477  });
1478  if (swiper.initialized) {
1479    preload(swiper);
1480  }
1481  swiper.emit("activeIndexChange");
1482  swiper.emit("snapIndexChange");
1483  if (swiper.initialized || swiper.params.runCallbacksOnInit) {
1484    if (previousRealIndex !== realIndex) {
1485      swiper.emit("realIndexChange");
1486    }
1487    swiper.emit("slideChange");
1488  }
1489}
1490function updateClickedSlide(el, path) {
1491  const swiper = this;
1492  const params = swiper.params;
1493  let slide2 = el.closest(`.${params.slideClass}, swiper-slide`);
1494  if (!slide2 && swiper.isElement && path && path.length > 1 && path.includes(el)) {
1495    [...path.slice(path.indexOf(el) + 1, path.length)].forEach((pathEl) => {
1496      if (!slide2 && pathEl.matches && pathEl.matches(`.${params.slideClass}, swiper-slide`)) {
1497        slide2 = pathEl;
1498      }
1499    });
1500  }
1501  let slideFound = false;
1502  let slideIndex;
1503  if (slide2) {
1504    for (let i = 0; i < swiper.slides.length; i += 1) {
1505      if (swiper.slides[i] === slide2) {
1506        slideFound = true;
1507        slideIndex = i;
1508        break;
1509      }
1510    }
1511  }
1512  if (slide2 && slideFound) {
1513    swiper.clickedSlide = slide2;
1514    if (swiper.virtual && swiper.params.virtual.enabled) {
1515      swiper.clickedIndex = parseInt(slide2.getAttribute("data-swiper-slide-index"), 10);
1516    } else {
1517      swiper.clickedIndex = slideIndex;
1518    }
1519  } else {
1520    swiper.clickedSlide = void 0;
1521    swiper.clickedIndex = void 0;
1522    return;
1523  }
1524  if (params.slideToClickedSlide && swiper.clickedIndex !== void 0 && swiper.clickedIndex !== swiper.activeIndex) {
1525    swiper.slideToClickedSlide();
1526  }
1527}
1528var update = {
1529  updateSize,
1530  updateSlides,
1531  updateAutoHeight,
1532  updateSlidesOffset,
1533  updateSlidesProgress,
1534  updateProgress,
1535  updateSlidesClasses,
1536  updateActiveIndex,
1537  updateClickedSlide
1538};
1539function getSwiperTranslate(axis) {
1540  if (axis === void 0) {
1541    axis = this.isHorizontal() ? "x" : "y";
1542  }
1543  const swiper = this;
1544  const {
1545    params,
1546    rtlTranslate: rtl,
1547    translate: translate2,
1548    wrapperEl
1549  } = swiper;
1550  if (params.virtualTranslate) {
1551    return rtl ? -translate2 : translate2;
1552  }
1553  if (params.cssMode) {
1554    return translate2;
1555  }
1556  let currentTranslate = getTranslate(wrapperEl, axis);
1557  currentTranslate += swiper.cssOverflowAdjustment();
1558  if (rtl) currentTranslate = -currentTranslate;
1559  return currentTranslate || 0;
1560}
1561function setTranslate(translate2, byController) {
1562  const swiper = this;
1563  const {
1564    rtlTranslate: rtl,
1565    params,
1566    wrapperEl,
1567    progress
1568  } = swiper;
1569  let x = 0;
1570  let y = 0;
1571  const z = 0;
1572  if (swiper.isHorizontal()) {
1573    x = rtl ? -translate2 : translate2;
1574  } else {
1575    y = translate2;
1576  }
1577  if (params.roundLengths) {
1578    x = Math.floor(x);
1579    y = Math.floor(y);
1580  }
1581  swiper.previousTranslate = swiper.translate;
1582  swiper.translate = swiper.isHorizontal() ? x : y;
1583  if (params.cssMode) {
1584    wrapperEl[swiper.isHorizontal() ? "scrollLeft" : "scrollTop"] = swiper.isHorizontal() ? -x : -y;
1585  } else if (!params.virtualTranslate) {
1586    if (swiper.isHorizontal()) {
1587      x -= swiper.cssOverflowAdjustment();
1588    } else {
1589      y -= swiper.cssOverflowAdjustment();
1590    }
1591    wrapperEl.style.transform = `translate3d(${x}px, ${y}px, ${z}px)`;
1592  }
1593  let newProgress;
1594  const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
1595  if (translatesDiff === 0) {
1596    newProgress = 0;
1597  } else {
1598    newProgress = (translate2 - swiper.minTranslate()) / translatesDiff;
1599  }
1600  if (newProgress !== progress) {
1601    swiper.updateProgress(translate2);
1602  }
1603  swiper.emit("setTranslate", swiper.translate, byController);
1604}
1605function minTranslate() {
1606  return -this.snapGrid[0];
1607}
1608function maxTranslate() {
1609  return -this.snapGrid[this.snapGrid.length - 1];
1610}
1611function translateTo(translate2, speed, runCallbacks, translateBounds, internal) {
1612  if (translate2 === void 0) {
1613    translate2 = 0;
1614  }
1615  if (speed === void 0) {
1616    speed = this.params.speed;
1617  }
1618  if (runCallbacks === void 0) {
1619    runCallbacks = true;
1620  }
1621  if (translateBounds === void 0) {
1622    translateBounds = true;
1623  }
1624  const swiper = this;
1625  const {
1626    params,
1627    wrapperEl
1628  } = swiper;
1629  if (swiper.animating && params.preventInteractionOnTransition) {
1630    return false;
1631  }
1632  const minTranslate2 = swiper.minTranslate();
1633  const maxTranslate2 = swiper.maxTranslate();
1634  let newTranslate;
1635  if (translateBounds && translate2 > minTranslate2) newTranslate = minTranslate2;
1636  else if (translateBounds && translate2 < maxTranslate2) newTranslate = maxTranslate2;
1637  else newTranslate = translate2;
1638  swiper.updateProgress(newTranslate);
1639  if (params.cssMode) {
1640    const isH = swiper.isHorizontal();
1641    if (speed === 0) {
1642      wrapperEl[isH ? "scrollLeft" : "scrollTop"] = -newTranslate;
1643    } else {
1644      if (!swiper.support.smoothScroll) {
1645        animateCSSModeScroll({
1646          swiper,
1647          targetPosition: -newTranslate,
1648          side: isH ? "left" : "top"
1649        });
1650        return true;
1651      }
1652      wrapperEl.scrollTo({
1653        [isH ? "left" : "top"]: -newTranslate,
1654        behavior: "smooth"
1655      });
1656    }
1657    return true;
1658  }
1659  if (speed === 0) {
1660    swiper.setTransition(0);
1661    swiper.setTranslate(newTranslate);
1662    if (runCallbacks) {
1663      swiper.emit("beforeTransitionStart", speed, internal);
1664      swiper.emit("transitionEnd");
1665    }
1666  } else {
1667    swiper.setTransition(speed);
1668    swiper.setTranslate(newTranslate);
1669    if (runCallbacks) {
1670      swiper.emit("beforeTransitionStart", speed, internal);
1671      swiper.emit("transitionStart");
1672    }
1673    if (!swiper.animating) {
1674      swiper.animating = true;
1675      if (!swiper.onTranslateToWrapperTransitionEnd) {
1676        swiper.onTranslateToWrapperTransitionEnd = function transitionEnd2(e) {
1677          if (!swiper || swiper.destroyed) return;
1678          if (e.target !== this) return;
1679          swiper.wrapperEl.removeEventListener("transitionend", swiper.onTranslateToWrapperTransitionEnd);
1680          swiper.onTranslateToWrapperTransitionEnd = null;
1681          delete swiper.onTranslateToWrapperTransitionEnd;
1682          swiper.animating = false;
1683          if (runCallbacks) {
1684            swiper.emit("transitionEnd");
1685          }
1686        };
1687      }
1688      swiper.wrapperEl.addEventListener("transitionend", swiper.onTranslateToWrapperTransitionEnd);
1689    }
1690  }
1691  return true;
1692}
1693var translate = {
1694  getTranslate: getSwiperTranslate,
1695  setTranslate,
1696  minTranslate,
1697  maxTranslate,
1698  translateTo
1699};
1700function setTransition(duration, byController) {
1701  const swiper = this;
1702  if (!swiper.params.cssMode) {
1703    swiper.wrapperEl.style.transitionDuration = `${duration}ms`;
1704    swiper.wrapperEl.style.transitionDelay = duration === 0 ? `0ms` : "";
1705  }
1706  swiper.emit("setTransition", duration, byController);
1707}
1708function transitionEmit(_ref) {
1709  let {
1710    swiper,
1711    runCallbacks,
1712    direction,
1713    step
1714  } = _ref;
1715  const {
1716    activeIndex,
1717    previousIndex
1718  } = swiper;
1719  let dir = direction;
1720  if (!dir) {
1721    if (activeIndex > previousIndex) dir = "next";
1722    else if (activeIndex < previousIndex) dir = "prev";
1723    else dir = "reset";
1724  }
1725  swiper.emit(`transition${step}`);
1726  if (runCallbacks && activeIndex !== previousIndex) {
1727    if (dir === "reset") {
1728      swiper.emit(`slideResetTransition${step}`);
1729      return;
1730    }
1731    swiper.emit(`slideChangeTransition${step}`);
1732    if (dir === "next") {
1733      swiper.emit(`slideNextTransition${step}`);
1734    } else {
1735      swiper.emit(`slidePrevTransition${step}`);
1736    }
1737  }
1738}
1739function transitionStart(runCallbacks, direction) {
1740  if (runCallbacks === void 0) {
1741    runCallbacks = true;
1742  }
1743  const swiper = this;
1744  const {
1745    params
1746  } = swiper;
1747  if (params.cssMode) return;
1748  if (params.autoHeight) {
1749    swiper.updateAutoHeight();
1750  }
1751  transitionEmit({
1752    swiper,
1753    runCallbacks,
1754    direction,
1755    step: "Start"
1756  });
1757}
1758function transitionEnd(runCallbacks, direction) {
1759  if (runCallbacks === void 0) {
1760    runCallbacks = true;
1761  }
1762  const swiper = this;
1763  const {
1764    params
1765  } = swiper;
1766  swiper.animating = false;
1767  if (params.cssMode) return;
1768  swiper.setTransition(0);
1769  transitionEmit({
1770    swiper,
1771    runCallbacks,
1772    direction,
1773    step: "End"
1774  });
1775}
1776var transition = {
1777  setTransition,
1778  transitionStart,
1779  transitionEnd
1780};
1781function slideTo(index, speed, runCallbacks, internal, initial) {
1782  if (index === void 0) {
1783    index = 0;
1784  }
1785  if (runCallbacks === void 0) {
1786    runCallbacks = true;
1787  }
1788  if (typeof index === "string") {
1789    index = parseInt(index, 10);
1790  }
1791  const swiper = this;
1792  let slideIndex = index;
1793  if (slideIndex < 0) slideIndex = 0;
1794  const {
1795    params,
1796    snapGrid,
1797    slidesGrid,
1798    previousIndex,
1799    activeIndex,
1800    rtlTranslate: rtl,
1801    wrapperEl,
1802    enabled
1803  } = swiper;
1804  if (!enabled && !internal && !initial || swiper.destroyed || swiper.animating && params.preventInteractionOnTransition) {
1805    return false;
1806  }
1807  if (typeof speed === "undefined") {
1808    speed = swiper.params.speed;
1809  }
1810  const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex);
1811  let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup);
1812  if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;
1813  const translate2 = -snapGrid[snapIndex];
1814  if (params.normalizeSlideIndex) {
1815    for (let i = 0; i < slidesGrid.length; i += 1) {
1816      const normalizedTranslate = -Math.floor(translate2 * 100);
1817      const normalizedGrid = Math.floor(slidesGrid[i] * 100);
1818      const normalizedGridNext = Math.floor(slidesGrid[i + 1] * 100);
1819      if (typeof slidesGrid[i + 1] !== "undefined") {
1820        if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext - (normalizedGridNext - normalizedGrid) / 2) {
1821          slideIndex = i;
1822        } else if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext) {
1823          slideIndex = i + 1;
1824        }
1825      } else if (normalizedTranslate >= normalizedGrid) {
1826        slideIndex = i;
1827      }
1828    }
1829  }
1830  if (swiper.initialized && slideIndex !== activeIndex) {
1831    if (!swiper.allowSlideNext && (rtl ? translate2 > swiper.translate && translate2 > swiper.minTranslate() : translate2 < swiper.translate && translate2 < swiper.minTranslate())) {
1832      return false;
1833    }
1834    if (!swiper.allowSlidePrev && translate2 > swiper.translate && translate2 > swiper.maxTranslate()) {
1835      if ((activeIndex || 0) !== slideIndex) {
1836        return false;
1837      }
1838    }
1839  }
1840  if (slideIndex !== (previousIndex || 0) && runCallbacks) {
1841    swiper.emit("beforeSlideChangeStart");
1842  }
1843  swiper.updateProgress(translate2);
1844  let direction;
1845  if (slideIndex > activeIndex) direction = "next";
1846  else if (slideIndex < activeIndex) direction = "prev";
1847  else direction = "reset";
1848  const isVirtual = swiper.virtual && swiper.params.virtual.enabled;
1849  const isInitialVirtual = isVirtual && initial;
1850  if (!isInitialVirtual && (rtl && -translate2 === swiper.translate || !rtl && translate2 === swiper.translate)) {
1851    swiper.updateActiveIndex(slideIndex);
1852    if (params.autoHeight) {
1853      swiper.updateAutoHeight();
1854    }
1855    swiper.updateSlidesClasses();
1856    if (params.effect !== "slide") {
1857      swiper.setTranslate(translate2);
1858    }
1859    if (direction !== "reset") {
1860      swiper.transitionStart(runCallbacks, direction);
1861      swiper.transitionEnd(runCallbacks, direction);
1862    }
1863    return false;
1864  }
1865  if (params.cssMode) {
1866    const isH = swiper.isHorizontal();
1867    const t = rtl ? translate2 : -translate2;
1868    if (speed === 0) {
1869      if (isVirtual) {
1870        swiper.wrapperEl.style.scrollSnapType = "none";
1871        swiper._immediateVirtual = true;
1872      }
1873      if (isVirtual && !swiper._cssModeVirtualInitialSet && swiper.params.initialSlide > 0) {
1874        swiper._cssModeVirtualInitialSet = true;
1875        requestAnimationFrame(() => {
1876          wrapperEl[isH ? "scrollLeft" : "scrollTop"] = t;
1877        });
1878      } else {
1879        wrapperEl[isH ? "scrollLeft" : "scrollTop"] = t;
1880      }
1881      if (isVirtual) {
1882        requestAnimationFrame(() => {
1883          swiper.wrapperEl.style.scrollSnapType = "";
1884          swiper._immediateVirtual = false;
1885        });
1886      }
1887    } else {
1888      if (!swiper.support.smoothScroll) {
1889        animateCSSModeScroll({
1890          swiper,
1891          targetPosition: t,
1892          side: isH ? "left" : "top"
1893        });
1894        return true;
1895      }
1896      wrapperEl.scrollTo({
1897        [isH ? "left" : "top"]: t,
1898        behavior: "smooth"
1899      });
1900    }
1901    return true;
1902  }
1903  swiper.setTransition(speed);
1904  swiper.setTranslate(translate2);
1905  swiper.updateActiveIndex(slideIndex);
1906  swiper.updateSlidesClasses();
1907  swiper.emit("beforeTransitionStart", speed, internal);
1908  swiper.transitionStart(runCallbacks, direction);
1909  if (speed === 0) {
1910    swiper.transitionEnd(runCallbacks, direction);
1911  } else if (!swiper.animating) {
1912    swiper.animating = true;
1913    if (!swiper.onSlideToWrapperTransitionEnd) {
1914      swiper.onSlideToWrapperTransitionEnd = function transitionEnd2(e) {
1915        if (!swiper || swiper.destroyed) return;
1916        if (e.target !== this) return;
1917        swiper.wrapperEl.removeEventListener("transitionend", swiper.onSlideToWrapperTransitionEnd);
1918        swiper.onSlideToWrapperTransitionEnd = null;
1919        delete swiper.onSlideToWrapperTransitionEnd;
1920        swiper.transitionEnd(runCallbacks, direction);
1921      };
1922    }
1923    swiper.wrapperEl.addEventListener("transitionend", swiper.onSlideToWrapperTransitionEnd);
1924  }
1925  return true;
1926}
1927function slideToLoop(index, speed, runCallbacks, internal) {
1928  if (index === void 0) {
1929    index = 0;
1930  }
1931  if (runCallbacks === void 0) {
1932    runCallbacks = true;
1933  }
1934  if (typeof index === "string") {
1935    const indexAsNumber = parseInt(index, 10);
1936    index = indexAsNumber;
1937  }
1938  const swiper = this;
1939  if (swiper.destroyed) return;
1940  if (typeof speed === "undefined") {
1941    speed = swiper.params.speed;
1942  }
1943  const gridEnabled = swiper.grid && swiper.params.grid && swiper.params.grid.rows > 1;
1944  let newIndex = index;
1945  if (swiper.params.loop) {
1946    if (swiper.virtual && swiper.params.virtual.enabled) {
1947      newIndex = newIndex + swiper.virtual.slidesBefore;
1948    } else {
1949      let targetSlideIndex;
1950      if (gridEnabled) {
1951        const slideIndex = newIndex * swiper.params.grid.rows;
1952        targetSlideIndex = swiper.slides.filter((slideEl) => slideEl.getAttribute("data-swiper-slide-index") * 1 === slideIndex)[0].column;
1953      } else {
1954        targetSlideIndex = swiper.getSlideIndexByData(newIndex);
1955      }
1956      const cols = gridEnabled ? Math.ceil(swiper.slides.length / swiper.params.grid.rows) : swiper.slides.length;
1957      const {
1958        centeredSlides
1959      } = swiper.params;
1960      let slidesPerView = swiper.params.slidesPerView;
1961      if (slidesPerView === "auto") {
1962        slidesPerView = swiper.slidesPerViewDynamic();
1963      } else {
1964        slidesPerView = Math.ceil(parseFloat(swiper.params.slidesPerView, 10));
1965        if (centeredSlides && slidesPerView % 2 === 0) {
1966          slidesPerView = slidesPerView + 1;
1967        }
1968      }
1969      let needLoopFix = cols - targetSlideIndex < slidesPerView;
1970      if (centeredSlides) {
1971        needLoopFix = needLoopFix || targetSlideIndex < Math.ceil(slidesPerView / 2);
1972      }
1973      if (internal && centeredSlides && swiper.params.slidesPerView !== "auto" && !gridEnabled) {
1974        needLoopFix = false;
1975      }
1976      if (needLoopFix) {
1977        const direction = centeredSlides ? targetSlideIndex < swiper.activeIndex ? "prev" : "next" : targetSlideIndex - swiper.activeIndex - 1 < swiper.params.slidesPerView ? "next" : "prev";
1978        swiper.loopFix({
1979          direction,
1980          slideTo: true,
1981          activeSlideIndex: direction === "next" ? targetSlideIndex + 1 : targetSlideIndex - cols + 1,
1982          slideRealIndex: direction === "next" ? swiper.realIndex : void 0
1983        });
1984      }
1985      if (gridEnabled) {
1986        const slideIndex = newIndex * swiper.params.grid.rows;
1987        newIndex = swiper.slides.filter((slideEl) => slideEl.getAttribute("data-swiper-slide-index") * 1 === slideIndex)[0].column;
1988      } else {
1989        newIndex = swiper.getSlideIndexByData(newIndex);
1990      }
1991    }
1992  }
1993  requestAnimationFrame(() => {
1994    swiper.slideTo(newIndex, speed, runCallbacks, internal);
1995  });
1996  return swiper;
1997}
1998function slideNext(speed, runCallbacks, internal) {
1999  if (runCallbacks === void 0) {
2000    runCallbacks = true;
2001  }
2002  const swiper = this;
2003  const {
2004    enabled,
2005    params,
2006    animating
2007  } = swiper;
2008  if (!enabled || swiper.destroyed) return swiper;
2009  if (typeof speed === "undefined") {
2010    speed = swiper.params.speed;
2011  }
2012  let perGroup = params.slidesPerGroup;
2013  if (params.slidesPerView === "auto" && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {
2014    perGroup = Math.max(swiper.slidesPerViewDynamic("current", true), 1);
2015  }
2016  const increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : perGroup;
2017  const isVirtual = swiper.virtual && params.virtual.enabled;
2018  if (params.loop) {
2019    if (animating && !isVirtual && params.loopPreventsSliding) return false;
2020    swiper.loopFix({
2021      direction: "next"
2022    });
2023    swiper._clientLeft = swiper.wrapperEl.clientLeft;
2024    if (swiper.activeIndex === swiper.slides.length - 1 && params.cssMode) {
2025      requestAnimationFrame(() => {
2026        swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal);
2027      });
2028      return true;
2029    }
2030  }
2031  if (params.rewind && swiper.isEnd) {
2032    return swiper.slideTo(0, speed, runCallbacks, internal);
2033  }
2034  return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal);
2035}
2036function slidePrev(speed, runCallbacks, internal) {
2037  if (runCallbacks === void 0) {
2038    runCallbacks = true;
2039  }
2040  const swiper = this;
2041  const {
2042    params,
2043    snapGrid,
2044    slidesGrid,
2045    rtlTranslate,
2046    enabled,
2047    animating
2048  } = swiper;
2049  if (!enabled || swiper.destroyed) return swiper;
2050  if (typeof speed === "undefined") {
2051    speed = swiper.params.speed;
2052  }
2053  const isVirtual = swiper.virtual && params.virtual.enabled;
2054  if (params.loop) {
2055    if (animating && !isVirtual && params.loopPreventsSliding) return false;
2056    swiper.loopFix({
2057      direction: "prev"
2058    });
2059    swiper._clientLeft = swiper.wrapperEl.clientLeft;
2060  }
2061  const translate2 = rtlTranslate ? swiper.translate : -swiper.translate;
2062  function normalize(val) {
2063    if (val < 0) return -Math.floor(Math.abs(val));
2064    return Math.floor(val);
2065  }
2066  const normalizedTranslate = normalize(translate2);
2067  const normalizedSnapGrid = snapGrid.map((val) => normalize(val));
2068  let prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1];
2069  if (typeof prevSnap === "undefined" && params.cssMode) {
2070    let prevSnapIndex;
2071    snapGrid.forEach((snap, snapIndex) => {
2072      if (normalizedTranslate >= snap) {
2073        prevSnapIndex = snapIndex;
2074      }
2075    });
2076    if (typeof prevSnapIndex !== "undefined") {
2077      prevSnap = snapGrid[prevSnapIndex > 0 ? prevSnapIndex - 1 : prevSnapIndex];
2078    }
2079  }
2080  let prevIndex = 0;
2081  if (typeof prevSnap !== "undefined") {
2082    prevIndex = slidesGrid.indexOf(prevSnap);
2083    if (prevIndex < 0) prevIndex = swiper.activeIndex - 1;
2084    if (params.slidesPerView === "auto" && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {
2085      prevIndex = prevIndex - swiper.slidesPerViewDynamic("previous", true) + 1;
2086      prevIndex = Math.max(prevIndex, 0);
2087    }
2088  }
2089  if (params.rewind && swiper.isBeginning) {
2090    const lastIndex = swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1;
2091    return swiper.slideTo(lastIndex, speed, runCallbacks, internal);
2092  } else if (params.loop && swiper.activeIndex === 0 && params.cssMode) {
2093    requestAnimationFrame(() => {
2094      swiper.slideTo(prevIndex, speed, runCallbacks, internal);
2095    });
2096    return true;
2097  }
2098  return swiper.slideTo(prevIndex, speed, runCallbacks, internal);
2099}
2100function slideReset(speed, runCallbacks, internal) {
2101  if (runCallbacks === void 0) {
2102    runCallbacks = true;
2103  }
2104  const swiper = this;
2105  if (swiper.destroyed) return;
2106  if (typeof speed === "undefined") {
2107    speed = swiper.params.speed;
2108  }
2109  return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);
2110}
2111function slideToClosest(speed, runCallbacks, internal, threshold) {
2112  if (runCallbacks === void 0) {
2113    runCallbacks = true;
2114  }
2115  if (threshold === void 0) {
2116    threshold = 0.5;
2117  }
2118  const swiper = this;
2119  if (swiper.destroyed) return;
2120  if (typeof speed === "undefined") {
2121    speed = swiper.params.speed;
2122  }
2123  let index = swiper.activeIndex;
2124  const skip = Math.min(swiper.params.slidesPerGroupSkip, index);
2125  const snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup);
2126  const translate2 = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
2127  if (translate2 >= swiper.snapGrid[snapIndex]) {
2128    const currentSnap = swiper.snapGrid[snapIndex];
2129    const nextSnap = swiper.snapGrid[snapIndex + 1];
2130    if (translate2 - currentSnap > (nextSnap - currentSnap) * threshold) {
2131      index += swiper.params.slidesPerGroup;
2132    }
2133  } else {
2134    const prevSnap = swiper.snapGrid[snapIndex - 1];
2135    const currentSnap = swiper.snapGrid[snapIndex];
2136    if (translate2 - prevSnap <= (currentSnap - prevSnap) * threshold) {
2137      index -= swiper.params.slidesPerGroup;
2138    }
2139  }
2140  index = Math.max(index, 0);
2141  index = Math.min(index, swiper.slidesGrid.length - 1);
2142  return swiper.slideTo(index, speed, runCallbacks, internal);
2143}
2144function slideToClickedSlide() {
2145  const swiper = this;
2146  if (swiper.destroyed) return;
2147  const {
2148    params,
2149    slidesEl
2150  } = swiper;
2151  const slidesPerView = params.slidesPerView === "auto" ? swiper.slidesPerViewDynamic() : params.slidesPerView;
2152  let slideToIndex = swiper.clickedIndex;
2153  let realIndex;
2154  const slideSelector = swiper.isElement ? `swiper-slide` : `.${params.slideClass}`;
2155  if (params.loop) {
2156    if (swiper.animating) return;
2157    realIndex = parseInt(swiper.clickedSlide.getAttribute("data-swiper-slide-index"), 10);
2158    if (params.centeredSlides) {
2159      if (slideToIndex < swiper.loopedSlides - slidesPerView / 2 || slideToIndex > swiper.slides.length - swiper.loopedSlides + slidesPerView / 2) {
2160        swiper.loopFix();
2161        slideToIndex = swiper.getSlideIndex(elementChildren(slidesEl, `${slideSelector}[data-swiper-slide-index="${realIndex}"]`)[0]);
2162        nextTick(() => {
2163          swiper.slideTo(slideToIndex);
2164        });
2165      } else {
2166        swiper.slideTo(slideToIndex);
2167      }
2168    } else if (slideToIndex > swiper.slides.length - slidesPerView) {
2169      swiper.loopFix();
2170      slideToIndex = swiper.getSlideIndex(elementChildren(slidesEl, `${slideSelector}[data-swiper-slide-index="${realIndex}"]`)[0]);
2171      nextTick(() => {
2172        swiper.slideTo(slideToIndex);
2173      });
2174    } else {
2175      swiper.slideTo(slideToIndex);
2176    }
2177  } else {
2178    swiper.slideTo(slideToIndex);
2179  }
2180}
2181var slide = {
2182  slideTo,
2183  slideToLoop,
2184  slideNext,
2185  slidePrev,
2186  slideReset,
2187  slideToClosest,
2188  slideToClickedSlide
2189};
2190function loopCreate(slideRealIndex) {
2191  const swiper = this;
2192  const {
2193    params,
2194    slidesEl
2195  } = swiper;
2196  if (!params.loop || swiper.virtual && swiper.params.virtual.enabled) return;
2197  const initSlides = () => {
2198    const slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`);
2199    slides.forEach((el, index) => {
2200      el.setAttribute("data-swiper-slide-index", index);
2201    });
2202  };
2203  const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1;
2204  const slidesPerGroup = params.slidesPerGroup * (gridEnabled ? params.grid.rows : 1);
2205  const shouldFillGroup = swiper.slides.length % slidesPerGroup !== 0;
2206  const shouldFillGrid = gridEnabled && swiper.slides.length % params.grid.rows !== 0;
2207  const addBlankSlides = (amountOfSlides) => {
2208    for (let i = 0; i < amountOfSlides; i += 1) {
2209      const slideEl = swiper.isElement ? createElement("swiper-slide", [params.slideBlankClass]) : createElement("div", [params.slideClass, params.slideBlankClass]);
2210      swiper.slidesEl.append(slideEl);
2211    }
2212  };
2213  if (shouldFillGroup) {
2214    if (params.loopAddBlankSlides) {
2215      const slidesToAdd = slidesPerGroup - swiper.slides.length % slidesPerGroup;
2216      addBlankSlides(slidesToAdd);
2217      swiper.recalcSlides();
2218      swiper.updateSlides();
2219    } else {
2220      showWarning("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");
2221    }
2222    initSlides();
2223  } else if (shouldFillGrid) {
2224    if (params.loopAddBlankSlides) {
2225      const slidesToAdd = params.grid.rows - swiper.slides.length % params.grid.rows;
2226      addBlankSlides(slidesToAdd);
2227      swiper.recalcSlides();
2228      swiper.updateSlides();
2229    } else {
2230      showWarning("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");
2231    }
2232    initSlides();
2233  } else {
2234    initSlides();
2235  }
2236  swiper.loopFix({
2237    slideRealIndex,
2238    direction: params.centeredSlides ? void 0 : "next"
2239  });
2240}
2241function loopFix(_temp) {
2242  let {
2243    slideRealIndex,
2244    slideTo: slideTo2 = true,
2245    direction,
2246    setTranslate: setTranslate2,
2247    activeSlideIndex,
2248    byController,
2249    byMousewheel
2250  } = _temp === void 0 ? {} : _temp;
2251  const swiper = this;
2252  if (!swiper.params.loop) return;
2253  swiper.emit("beforeLoopFix");
2254  const {
2255    slides,
2256    allowSlidePrev,
2257    allowSlideNext,
2258    slidesEl,
2259    params
2260  } = swiper;
2261  const {
2262    centeredSlides
2263  } = params;
2264  swiper.allowSlidePrev = true;
2265  swiper.allowSlideNext = true;
2266  if (swiper.virtual && params.virtual.enabled) {
2267    if (slideTo2) {
2268      if (!params.centeredSlides && swiper.snapIndex === 0) {
2269        swiper.slideTo(swiper.virtual.slides.length, 0, false, true);
2270      } else if (params.centeredSlides && swiper.snapIndex < params.slidesPerView) {
2271        swiper.slideTo(swiper.virtual.slides.length + swiper.snapIndex, 0, false, true);
2272      } else if (swiper.snapIndex === swiper.snapGrid.length - 1) {
2273        swiper.slideTo(swiper.virtual.slidesBefore, 0, false, true);
2274      }
2275    }
2276    swiper.allowSlidePrev = allowSlidePrev;
2277    swiper.allowSlideNext = allowSlideNext;
2278    swiper.emit("loopFix");
2279    return;
2280  }
2281  let slidesPerView = params.slidesPerView;
2282  if (slidesPerView === "auto") {
2283    slidesPerView = swiper.slidesPerViewDynamic();
2284  } else {
2285    slidesPerView = Math.ceil(parseFloat(params.slidesPerView, 10));
2286    if (centeredSlides && slidesPerView % 2 === 0) {
2287      slidesPerView = slidesPerView + 1;
2288    }
2289  }
2290  const slidesPerGroup = params.slidesPerGroupAuto ? slidesPerView : params.slidesPerGroup;
2291  let loopedSlides = slidesPerGroup;
2292  if (loopedSlides % slidesPerGroup !== 0) {
2293    loopedSlides += slidesPerGroup - loopedSlides % slidesPerGroup;
2294  }
2295  loopedSlides += params.loopAdditionalSlides;
2296  swiper.loopedSlides = loopedSlides;
2297  const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1;
2298  if (slides.length < slidesPerView + loopedSlides) {
2299    showWarning("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled and not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters");
2300  } else if (gridEnabled && params.grid.fill === "row") {
2301    showWarning("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");
2302  }
2303  const prependSlidesIndexes = [];
2304  const appendSlidesIndexes = [];
2305  let activeIndex = swiper.activeIndex;
2306  if (typeof activeSlideIndex === "undefined") {
2307    activeSlideIndex = swiper.getSlideIndex(slides.filter((el) => el.classList.contains(params.slideActiveClass))[0]);
2308  } else {
2309    activeIndex = activeSlideIndex;
2310  }
2311  const isNext = direction === "next" || !direction;
2312  const isPrev = direction === "prev" || !direction;
2313  let slidesPrepended = 0;
2314  let slidesAppended = 0;
2315  const cols = gridEnabled ? Math.ceil(slides.length / params.grid.rows) : slides.length;
2316  const activeColIndex = gridEnabled ? slides[activeSlideIndex].column : activeSlideIndex;
2317  const activeColIndexWithShift = activeColIndex + (centeredSlides && typeof setTranslate2 === "undefined" ? -slidesPerView / 2 + 0.5 : 0);
2318  if (activeColIndexWithShift < loopedSlides) {
2319    slidesPrepended = Math.max(loopedSlides - activeColIndexWithShift, slidesPerGroup);
2320    for (let i = 0; i < loopedSlides - activeColIndexWithShift; i += 1) {
2321      const index = i - Math.floor(i / cols) * cols;
2322      if (gridEnabled) {
2323        const colIndexToPrepend = cols - index - 1;
2324        for (let i2 = slides.length - 1; i2 >= 0; i2 -= 1) {
2325          if (slides[i2].column === colIndexToPrepend) prependSlidesIndexes.push(i2);
2326        }
2327      } else {
2328        prependSlidesIndexes.push(cols - index - 1);
2329      }
2330    }
2331  } else if (activeColIndexWithShift + slidesPerView > cols - loopedSlides) {
2332    slidesAppended = Math.max(activeColIndexWithShift - (cols - loopedSlides * 2), slidesPerGroup);
2333    for (let i = 0; i < slidesAppended; i += 1) {
2334      const index = i - Math.floor(i / cols) * cols;
2335      if (gridEnabled) {
2336        slides.forEach((slide2, slideIndex) => {
2337          if (slide2.column === index) appendSlidesIndexes.push(slideIndex);
2338        });
2339      } else {
2340        appendSlidesIndexes.push(index);
2341      }
2342    }
2343  }
2344  swiper.__preventObserver__ = true;
2345  requestAnimationFrame(() => {
2346    swiper.__preventObserver__ = false;
2347  });
2348  if (isPrev) {
2349    prependSl
vendor: 21,518 bytes, lines 2349-2935
2349idesIndexes.forEach((index) => {
2350      slides[index].swiperLoopMoveDOM = true;
2351      slidesEl.prepend(slides[index]);
2352      slides[index].swiperLoopMoveDOM = false;
2353    });
2354  }
2355  if (isNext) {
2356    appendSlidesIndexes.forEach((index) => {
2357      slides[index].swiperLoopMoveDOM = true;
2358      slidesEl.append(slides[index]);
2359      slides[index].swiperLoopMoveDOM = false;
2360    });
2361  }
2362  swiper.recalcSlides();
2363  if (params.slidesPerView === "auto") {
2364    swiper.updateSlides();
2365  } else if (gridEnabled && (prependSlidesIndexes.length > 0 && isPrev || appendSlidesIndexes.length > 0 && isNext)) {
2366    swiper.slides.forEach((slide2, slideIndex) => {
2367      swiper.grid.updateSlide(slideIndex, slide2, swiper.slides);
2368    });
2369  }
2370  if (params.watchSlidesProgress) {
2371    swiper.updateSlidesOffset();
2372  }
2373  if (slideTo2) {
2374    if (prependSlidesIndexes.length > 0 && isPrev) {
2375      if (typeof slideRealIndex === "undefined") {
2376        const currentSlideTranslate = swiper.slidesGrid[activeIndex];
2377        const newSlideTranslate = swiper.slidesGrid[activeIndex + slidesPrepended];
2378        const diff = newSlideTranslate - currentSlideTranslate;
2379        if (byMousewheel) {
2380          swiper.setTranslate(swiper.translate - diff);
2381        } else {
2382          swiper.slideTo(activeIndex + Math.ceil(slidesPrepended), 0, false, true);
2383          if (setTranslate2) {
2384            swiper.touchEventsData.startTranslate = swiper.touchEventsData.startTranslate - diff;
2385            swiper.touchEventsData.currentTranslate = swiper.touchEventsData.currentTranslate - diff;
2386          }
2387        }
2388      } else {
2389        if (setTranslate2) {
2390          const shift = gridEnabled ? prependSlidesIndexes.length / params.grid.rows : prependSlidesIndexes.length;
2391          swiper.slideTo(swiper.activeIndex + shift, 0, false, true);
2392          swiper.touchEventsData.currentTranslate = swiper.translate;
2393        }
2394      }
2395    } else if (appendSlidesIndexes.length > 0 && isNext) {
2396      if (typeof slideRealIndex === "undefined") {
2397        const currentSlideTranslate = swiper.slidesGrid[activeIndex];
2398        const newSlideTranslate = swiper.slidesGrid[activeIndex - slidesAppended];
2399        const diff = newSlideTranslate - currentSlideTranslate;
2400        if (byMousewheel) {
2401          swiper.setTranslate(swiper.translate - diff);
2402        } else {
2403          swiper.slideTo(activeIndex - slidesAppended, 0, false, true);
2404          if (setTranslate2) {
2405            swiper.touchEventsData.startTranslate = swiper.touchEventsData.startTranslate - diff;
2406            swiper.touchEventsData.currentTranslate = swiper.touchEventsData.currentTranslate - diff;
2407          }
2408        }
2409      } else {
2410        const shift = gridEnabled ? appendSlidesIndexes.length / params.grid.rows : appendSlidesIndexes.length;
2411        swiper.slideTo(swiper.activeIndex - shift, 0, false, true);
2412      }
2413    }
2414  }
2415  swiper.allowSlidePrev = allowSlidePrev;
2416  swiper.allowSlideNext = allowSlideNext;
2417  if (swiper.controller && swiper.controller.control && !byController) {
2418    const loopParams = {
2419      slideRealIndex,
2420      direction,
2421      setTranslate: setTranslate2,
2422      activeSlideIndex,
2423      byController: true
2424    };
2425    if (Array.isArray(swiper.controller.control)) {
2426      swiper.controller.control.forEach((c) => {
2427        if (!c.destroyed && c.params.loop) c.loopFix({
2428          ...loopParams,
2429          slideTo: c.params.slidesPerView === params.slidesPerView ? slideTo2 : false
2430        });
2431      });
2432    } else if (swiper.controller.control instanceof swiper.constructor && swiper.controller.control.params.loop) {
2433      swiper.controller.control.loopFix({
2434        ...loopParams,
2435        slideTo: swiper.controller.control.params.slidesPerView === params.slidesPerView ? slideTo2 : false
2436      });
2437    }
2438  }
2439  swiper.emit("loopFix");
2440}
2441function loopDestroy() {
2442  const swiper = this;
2443  const {
2444    params,
2445    slidesEl
2446  } = swiper;
2447  if (!params.loop || swiper.virtual && swiper.params.virtual.enabled) return;
2448  swiper.recalcSlides();
2449  const newSlidesOrder = [];
2450  swiper.slides.forEach((slideEl) => {
2451    const index = typeof slideEl.swiperSlideIndex === "undefined" ? slideEl.getAttribute("data-swiper-slide-index") * 1 : slideEl.swiperSlideIndex;
2452    newSlidesOrder[index] = slideEl;
2453  });
2454  swiper.slides.forEach((slideEl) => {
2455    slideEl.removeAttribute("data-swiper-slide-index");
2456  });
2457  newSlidesOrder.forEach((slideEl) => {
2458    slidesEl.append(slideEl);
2459  });
2460  swiper.recalcSlides();
2461  swiper.slideTo(swiper.realIndex, 0);
2462}
2463var loop = {
2464  loopCreate,
2465  loopFix,
2466  loopDestroy
2467};
2468function setGrabCursor(moving) {
2469  const swiper = this;
2470  if (!swiper.params.simulateTouch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) return;
2471  const el = swiper.params.touchEventsTarget === "container" ? swiper.el : swiper.wrapperEl;
2472  if (swiper.isElement) {
2473    swiper.__preventObserver__ = true;
2474  }
2475  el.style.cursor = "move";
2476  el.style.cursor = moving ? "grabbing" : "grab";
2477  if (swiper.isElement) {
2478    requestAnimationFrame(() => {
2479      swiper.__preventObserver__ = false;
2480    });
2481  }
2482}
2483function unsetGrabCursor() {
2484  const swiper = this;
2485  if (swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) {
2486    return;
2487  }
2488  if (swiper.isElement) {
2489    swiper.__preventObserver__ = true;
2490  }
2491  swiper[swiper.params.touchEventsTarget === "container" ? "el" : "wrapperEl"].style.cursor = "";
2492  if (swiper.isElement) {
2493    requestAnimationFrame(() => {
2494      swiper.__preventObserver__ = false;
2495    });
2496  }
2497}
2498var grabCursor = {
2499  setGrabCursor,
2500  unsetGrabCursor
2501};
2502function closestElement(selector, base) {
2503  if (base === void 0) {
2504    base = this;
2505  }
2506  function __closestFrom(el) {
2507    if (!el || el === getDocument() || el === getWindow()) return null;
2508    if (el.assignedSlot) el = el.assignedSlot;
2509    const found = el.closest(selector);
2510    if (!found && !el.getRootNode) {
2511      return null;
2512    }
2513    return found || __closestFrom(el.getRootNode().host);
2514  }
2515  return __closestFrom(base);
2516}
2517function preventEdgeSwipe(swiper, event2, startX) {
2518  const window2 = getWindow();
2519  const {
2520    params
2521  } = swiper;
2522  const edgeSwipeDetection = params.edgeSwipeDetection;
2523  const edgeSwipeThreshold = params.edgeSwipeThreshold;
2524  if (edgeSwipeDetection && (startX <= edgeSwipeThreshold || startX >= window2.innerWidth - edgeSwipeThreshold)) {
2525    if (edgeSwipeDetection === "prevent") {
2526      event2.preventDefault();
2527      return true;
2528    }
2529    return false;
2530  }
2531  return true;
2532}
2533function onTouchStart(event2) {
2534  const swiper = this;
2535  const document2 = getDocument();
2536  let e = event2;
2537  if (e.originalEvent) e = e.originalEvent;
2538  const data = swiper.touchEventsData;
2539  if (e.type === "pointerdown") {
2540    if (data.pointerId !== null && data.pointerId !== e.pointerId) {
2541      return;
2542    }
2543    data.pointerId = e.pointerId;
2544  } else if (e.type === "touchstart" && e.targetTouches.length === 1) {
2545    data.touchId = e.targetTouches[0].identifier;
2546  }
2547  if (e.type === "touchstart") {
2548    preventEdgeSwipe(swiper, e, e.targetTouches[0].pageX);
2549    return;
2550  }
2551  const {
2552    params,
2553    touches,
2554    enabled
2555  } = swiper;
2556  if (!enabled) return;
2557  if (!params.simulateTouch && e.pointerType === "mouse") return;
2558  if (swiper.animating && params.preventInteractionOnTransition) {
2559    return;
2560  }
2561  if (!swiper.animating && params.cssMode && params.loop) {
2562    swiper.loopFix();
2563  }
2564  let targetEl = e.target;
2565  if (params.touchEventsTarget === "wrapper") {
2566    if (!elementIsChildOf(targetEl, swiper.wrapperEl)) return;
2567  }
2568  if ("which" in e && e.which === 3) return;
2569  if ("button" in e && e.button > 0) return;
2570  if (data.isTouched && data.isMoved) return;
2571  const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== "";
2572  const eventPath = e.composedPath ? e.composedPath() : e.path;
2573  if (swipingClassHasValue && e.target && e.target.shadowRoot && eventPath) {
2574    targetEl = eventPath[0];
2575  }
2576  const noSwipingSelector = params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`;
2577  const isTargetShadow = !!(e.target && e.target.shadowRoot);
2578  if (params.noSwiping && (isTargetShadow ? closestElement(noSwipingSelector, targetEl) : targetEl.closest(noSwipingSelector))) {
2579    swiper.allowClick = true;
2580    return;
2581  }
2582  if (params.swipeHandler) {
2583    if (!targetEl.closest(params.swipeHandler)) return;
2584  }
2585  touches.currentX = e.pageX;
2586  touches.currentY = e.pageY;
2587  const startX = touches.currentX;
2588  const startY = touches.currentY;
2589  if (!preventEdgeSwipe(swiper, e, startX)) {
2590    return;
2591  }
2592  Object.assign(data, {
2593    isTouched: true,
2594    isMoved: false,
2595    allowTouchCallbacks: true,
2596    isScrolling: void 0,
2597    startMoving: void 0
2598  });
2599  touches.startX = startX;
2600  touches.startY = startY;
2601  data.touchStartTime = now();
2602  swiper.allowClick = true;
2603  swiper.updateSize();
2604  swiper.swipeDirection = void 0;
2605  if (params.threshold > 0) data.allowThresholdMove = false;
2606  let preventDefault = true;
2607  if (targetEl.matches(data.focusableElements)) {
2608    preventDefault = false;
2609    if (targetEl.nodeName === "SELECT") {
2610      data.isTouched = false;
2611    }
2612  }
2613  if (document2.activeElement && document2.activeElement.matches(data.focusableElements) && document2.activeElement !== targetEl && (e.pointerType === "mouse" || e.pointerType !== "mouse" && !targetEl.matches(data.focusableElements))) {
2614    document2.activeElement.blur();
2615  }
2616  const shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault;
2617  if ((params.touchStartForcePreventDefault || shouldPreventDefault) && !targetEl.isContentEditable) {
2618    e.preventDefault();
2619  }
2620  if (params.freeMode && params.freeMode.enabled && swiper.freeMode && swiper.animating && !params.cssMode) {
2621    swiper.freeMode.onTouchStart();
2622  }
2623  swiper.emit("touchStart", e);
2624}
2625function onTouchMove(event2) {
2626  const document2 = getDocument();
2627  const swiper = this;
2628  const data = swiper.touchEventsData;
2629  const {
2630    params,
2631    touches,
2632    rtlTranslate: rtl,
2633    enabled
2634  } = swiper;
2635  if (!enabled) return;
2636  if (!params.simulateTouch && event2.pointerType === "mouse") return;
2637  let e = event2;
2638  if (e.originalEvent) e = e.originalEvent;
2639  if (e.type === "pointermove") {
2640    if (data.touchId !== null) return;
2641    const id = e.pointerId;
2642    if (id !== data.pointerId) return;
2643  }
2644  let targetTouch;
2645  if (e.type === "touchmove") {
2646    targetTouch = [...e.changedTouches].filter((t) => t.identifier === data.touchId)[0];
2647    if (!targetTouch || targetTouch.identifier !== data.touchId) return;
2648  } else {
2649    targetTouch = e;
2650  }
2651  if (!data.isTouched) {
2652    if (data.startMoving && data.isScrolling) {
2653      swiper.emit("touchMoveOpposite", e);
2654    }
2655    return;
2656  }
2657  const pageX = targetTouch.pageX;
2658  const pageY = targetTouch.pageY;
2659  if (e.preventedByNestedSwiper) {
2660    touches.startX = pageX;
2661    touches.startY = pageY;
2662    return;
2663  }
2664  if (!swiper.allowTouchMove) {
2665    if (!e.target.matches(data.focusableElements)) {
2666      swiper.allowClick = false;
2667    }
2668    if (data.isTouched) {
2669      Object.assign(touches, {
2670        startX: pageX,
2671        startY: pageY,
2672        currentX: pageX,
2673        currentY: pageY
2674      });
2675      data.touchStartTime = now();
2676    }
2677    return;
2678  }
2679  if (params.touchReleaseOnEdges && !params.loop) {
2680    if (swiper.isVertical()) {
2681      if (pageY < touches.startY && swiper.translate <= swiper.maxTranslate() || pageY > touches.startY && swiper.translate >= swiper.minTranslate()) {
2682        data.isTouched = false;
2683        data.isMoved = false;
2684        return;
2685      }
2686    } else if (pageX < touches.startX && swiper.translate <= swiper.maxTranslate() || pageX > touches.startX && swiper.translate >= swiper.minTranslate()) {
2687      return;
2688    }
2689  }
2690  if (document2.activeElement && document2.activeElement.matches(data.focusableElements) && document2.activeElement !== e.target && e.pointerType !== "mouse") {
2691    document2.activeElement.blur();
2692  }
2693  if (document2.activeElement) {
2694    if (e.target === document2.activeElement && e.target.matches(data.focusableElements)) {
2695      data.isMoved = true;
2696      swiper.allowClick = false;
2697      return;
2698    }
2699  }
2700  if (data.allowTouchCallbacks) {
2701    swiper.emit("touchMove", e);
2702  }
2703  touches.previousX = touches.currentX;
2704  touches.previousY = touches.currentY;
2705  touches.currentX = pageX;
2706  touches.currentY = pageY;
2707  const diffX = touches.currentX - touches.startX;
2708  const diffY = touches.currentY - touches.startY;
2709  if (swiper.params.threshold && Math.sqrt(diffX ** 2 + diffY ** 2) < swiper.params.threshold) return;
2710  if (typeof data.isScrolling === "undefined") {
2711    let touchAngle;
2712    if (swiper.isHorizontal() && touches.currentY === touches.startY || swiper.isVertical() && touches.currentX === touches.startX) {
2713      data.isScrolling = false;
2714    } else {
2715      if (diffX * diffX + diffY * diffY >= 25) {
2716        touchAngle = Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180 / Math.PI;
2717        data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : 90 - touchAngle > params.touchAngle;
2718      }
2719    }
2720  }
2721  if (data.isScrolling) {
2722    swiper.emit("touchMoveOpposite", e);
2723  }
2724  if (typeof data.startMoving === "undefined") {
2725    if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) {
2726      data.startMoving = true;
2727    }
2728  }
2729  if (data.isScrolling || e.type === "touchmove" && data.preventTouchMoveFromPointerMove) {
2730    data.isTouched = false;
2731    return;
2732  }
2733  if (!data.startMoving) {
2734    return;
2735  }
2736  swiper.allowClick = false;
2737  if (!params.cssMode && e.cancelable) {
2738    e.preventDefault();
2739  }
2740  if (params.touchMoveStopPropagation && !params.nested) {
2741    e.stopPropagation();
2742  }
2743  let diff = swiper.isHorizontal() ? diffX : diffY;
2744  let touchesDiff = swiper.isHorizontal() ? touches.currentX - touches.previousX : touches.currentY - touches.previousY;
2745  if (params.oneWayMovement) {
2746    diff = Math.abs(diff) * (rtl ? 1 : -1);
2747    touchesDiff = Math.abs(touchesDiff) * (rtl ? 1 : -1);
2748  }
2749  touches.diff = diff;
2750  diff *= params.touchRatio;
2751  if (rtl) {
2752    diff = -diff;
2753    touchesDiff = -touchesDiff;
2754  }
2755  const prevTouchesDirection = swiper.touchesDirection;
2756  swiper.swipeDirection = diff > 0 ? "prev" : "next";
2757  swiper.touchesDirection = touchesDiff > 0 ? "prev" : "next";
2758  const isLoop = swiper.params.loop && !params.cssMode;
2759  const allowLoopFix = swiper.touchesDirection === "next" && swiper.allowSlideNext || swiper.touchesDirection === "prev" && swiper.allowSlidePrev;
2760  if (!data.isMoved) {
2761    if (isLoop && allowLoopFix) {
2762      swiper.loopFix({
2763        direction: swiper.swipeDirection
2764      });
2765    }
2766    data.startTranslate = swiper.getTranslate();
2767    swiper.setTransition(0);
2768    if (swiper.animating) {
2769      const evt = new window.CustomEvent("transitionend", {
2770        bubbles: true,
2771        cancelable: true,
2772        detail: {
2773          bySwiperTouchMove: true
2774        }
2775      });
2776      swiper.wrapperEl.dispatchEvent(evt);
2777    }
2778    data.allowMomentumBounce = false;
2779    if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
2780      swiper.setGrabCursor(true);
2781    }
2782    swiper.emit("sliderFirstMove", e);
2783  }
2784  let loopFixed;
2785  (/* @__PURE__ */ new Date()).getTime();
2786  if (data.isMoved && data.allowThresholdMove && prevTouchesDirection !== swiper.touchesDirection && isLoop && allowLoopFix && Math.abs(diff) >= 1) {
2787    Object.assign(touches, {
2788      startX: pageX,
2789      startY: pageY,
2790      currentX: pageX,
2791      currentY: pageY,
2792      startTranslate: data.currentTranslate
2793    });
2794    data.loopSwapReset = true;
2795    data.startTranslate = data.currentTranslate;
2796    return;
2797  }
2798  swiper.emit("sliderMove", e);
2799  data.isMoved = true;
2800  data.currentTranslate = diff + data.startTranslate;
2801  let disableParentSwiper = true;
2802  let resistanceRatio = params.resistanceRatio;
2803  if (params.touchReleaseOnEdges) {
2804    resistanceRatio = 0;
2805  }
2806  if (diff > 0) {
2807    if (isLoop && allowLoopFix && !loopFixed && data.allowThresholdMove && data.currentTranslate > (params.centeredSlides ? swiper.minTranslate() - swiper.slidesSizesGrid[swiper.activeIndex + 1] - (params.slidesPerView !== "auto" && swiper.slides.length - params.slidesPerView >= 2 ? swiper.slidesSizesGrid[swiper.activeIndex + 1] + swiper.params.spaceBetween : 0) - swiper.params.spaceBetween : swiper.minTranslate())) {
2808      swiper.loopFix({
2809        direction: "prev",
2810        setTranslate: true,
2811        activeSlideIndex: 0
2812      });
2813    }
2814    if (data.currentTranslate > swiper.minTranslate()) {
2815      disableParentSwiper = false;
2816      if (params.resistance) {
2817        data.currentTranslate = swiper.minTranslate() - 1 + (-swiper.minTranslate() + data.startTranslate + diff) ** resistanceRatio;
2818      }
2819    }
2820  } else if (diff < 0) {
2821    if (isLoop && allowLoopFix && !loopFixed && data.allowThresholdMove && data.currentTranslate < (params.centeredSlides ? swiper.maxTranslate() + swiper.slidesSizesGrid[swiper.slidesSizesGrid.length - 1] + swiper.params.spaceBetween + (params.slidesPerView !== "auto" && swiper.slides.length - params.slidesPerView >= 2 ? swiper.slidesSizesGrid[swiper.slidesSizesGrid.length - 1] + swiper.params.spaceBetween : 0) : swiper.maxTranslate())) {
2822      swiper.loopFix({
2823        direction: "next",
2824        setTranslate: true,
2825        activeSlideIndex: swiper.slides.length - (params.slidesPerView === "auto" ? swiper.slidesPerViewDynamic() : Math.ceil(parseFloat(params.slidesPerView, 10)))
2826      });
2827    }
2828    if (data.currentTranslate < swiper.maxTranslate()) {
2829      disableParentSwiper = false;
2830      if (params.resistance) {
2831        data.currentTranslate = swiper.maxTranslate() + 1 - (swiper.maxTranslate() - data.startTranslate - diff) ** resistanceRatio;
2832      }
2833    }
2834  }
2835  if (disableParentSwiper) {
2836    e.preventedByNestedSwiper = true;
2837  }
2838  if (!swiper.allowSlideNext && swiper.swipeDirection === "next" && data.currentTranslate < data.startTranslate) {
2839    data.currentTranslate = data.startTranslate;
2840  }
2841  if (!swiper.allowSlidePrev && swiper.swipeDirection === "prev" && data.currentTranslate > data.startTranslate) {
2842    data.currentTranslate = data.startTranslate;
2843  }
2844  if (!swiper.allowSlidePrev && !swiper.allowSlideNext) {
2845    data.currentTranslate = data.startTranslate;
2846  }
2847  if (params.threshold > 0) {
2848    if (Math.abs(diff) > params.threshold || data.allowThresholdMove) {
2849      if (!data.allowThresholdMove) {
2850        data.allowThresholdMove = true;
2851        touches.startX = touches.currentX;
2852        touches.startY = touches.currentY;
2853        data.currentTranslate = data.startTranslate;
2854        touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY;
2855        return;
2856      }
2857    } else {
2858      data.currentTranslate = data.startTranslate;
2859      return;
2860    }
2861  }
2862  if (!params.followFinger || params.cssMode) return;
2863  if (params.freeMode && params.freeMode.enabled && swiper.freeMode || params.watchSlidesProgress) {
2864    swiper.updateActiveIndex();
2865    swiper.updateSlidesClasses();
2866  }
2867  if (params.freeMode && params.freeMode.enabled && swiper.freeMode) {
2868    swiper.freeMode.onTouchMove();
2869  }
2870  swiper.updateProgress(data.currentTranslate);
2871  swiper.setTranslate(data.currentTranslate);
2872}
2873function onTouchEnd(event2) {
2874  const swiper = this;
2875  const data = swiper.touchEventsData;
2876  let e = event2;
2877  if (e.originalEvent) e = e.originalEvent;
2878  let targetTouch;
2879  const isTouchEvent = e.type === "touchend" || e.type === "touchcancel";
2880  if (!isTouchEvent) {
2881    if (data.touchId !== null) return;
2882    if (e.pointerId !== data.pointerId) return;
2883    targetTouch = e;
2884  } else {
2885    targetTouch = [...e.changedTouches].filter((t) => t.identifier === data.touchId)[0];
2886    if (!targetTouch || targetTouch.identifier !== data.touchId) return;
2887  }
2888  if (["pointercancel", "pointerout", "pointerleave", "contextmenu"].includes(e.type)) {
2889    const proceed = ["pointercancel", "contextmenu"].includes(e.type) && (swiper.browser.isSafari || swiper.browser.isWebView);
2890    if (!proceed) {
2891      return;
2892    }
2893  }
2894  data.pointerId = null;
2895  data.touchId = null;
2896  const {
2897    params,
2898    touches,
2899    rtlTranslate: rtl,
2900    slidesGrid,
2901    enabled
2902  } = swiper;
2903  if (!enabled) return;
2904  if (!params.simulateTouch && e.pointerType === "mouse") return;
2905  if (data.allowTouchCallbacks) {
2906    swiper.emit("touchEnd", e);
2907  }
2908  data.allowTouchCallbacks = false;
2909  if (!data.isTouched) {
2910    if (data.isMoved && params.grabCursor) {
2911      swiper.setGrabCursor(false);
2912    }
2913    data.isMoved = false;
2914    data.startMoving = false;
2915    return;
2916  }
2917  if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
2918    swiper.setGrabCursor(false);
2919  }
2920  const touchEndTime = now();
2921  const timeDiff = touchEndTime - data.touchStartTime;
2922  if (swiper.allowClick) {
2923    const pathTree = e.path || e.composedPath && e.composedPath();
2924    swiper.updateClickedSlide(pathTree && pathTree[0] || e.target, pathTree);
2925    swiper.emit("tap click", e);
2926    if (timeDiff < 300 && touchEndTime - data.lastClickTime < 300) {
2927      swiper.emit("doubleTap doubleClick", e);
2928    }
2929  }
2930  data.lastClickTime = now();
2931  nextTick(() => {
2932    if (!swiper.destroyed) swiper.allowClick = true;
2933  });
2934  if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 && !data.loopSwapReset || data.currentTranslate === data.startTranslate && !data.loopSwapReset) {
2935    data.isTouched = false;
vendor: 5,975 bytes, lines 2936-3112
2936    data.isMoved = false;
2937    data.startMoving = false;
2938    return;
2939  }
2940  data.isTouched = false;
2941  data.isMoved = false;
2942  data.startMoving = false;
2943  let currentPos;
2944  if (params.followFinger) {
2945    currentPos = rtl ? swiper.translate : -swiper.translate;
2946  } else {
2947    currentPos = -data.currentTranslate;
2948  }
2949  if (params.cssMode) {
2950    return;
2951  }
2952  if (params.freeMode && params.freeMode.enabled) {
2953    swiper.freeMode.onTouchEnd({
2954      currentPos
2955    });
2956    return;
2957  }
2958  const swipeToLast = currentPos >= -swiper.maxTranslate() && !swiper.params.loop;
2959  let stopIndex = 0;
2960  let groupSize = swiper.slidesSizesGrid[0];
2961  for (let i = 0; i < slidesGrid.length; i += i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup) {
2962    const increment2 = i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;
2963    if (typeof slidesGrid[i + increment2] !== "undefined") {
2964      if (swipeToLast || currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + increment2]) {
2965        stopIndex = i;
2966        groupSize = slidesGrid[i + increment2] - slidesGrid[i];
2967      }
2968    } else if (swipeToLast || currentPos >= slidesGrid[i]) {
2969      stopIndex = i;
2970      groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];
2971    }
2972  }
2973  let rewindFirstIndex = null;
2974  let rewindLastIndex = null;
2975  if (params.rewind) {
2976    if (swiper.isBeginning) {
2977      rewindLastIndex = params.virtual && params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1;
2978    } else if (swiper.isEnd) {
2979      rewindFirstIndex = 0;
2980    }
2981  }
2982  const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize;
2983  const increment = stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;
2984  if (timeDiff > params.longSwipesMs) {
2985    if (!params.longSwipes) {
2986      swiper.slideTo(swiper.activeIndex);
2987      return;
2988    }
2989    if (swiper.swipeDirection === "next") {
2990      if (ratio >= params.longSwipesRatio) swiper.slideTo(params.rewind && swiper.isEnd ? rewindFirstIndex : stopIndex + increment);
2991      else swiper.slideTo(stopIndex);
2992    }
2993    if (swiper.swipeDirection === "prev") {
2994      if (ratio > 1 - params.longSwipesRatio) {
2995        swiper.slideTo(stopIndex + increment);
2996      } else if (rewindLastIndex !== null && ratio < 0 && Math.abs(ratio) > params.longSwipesRatio) {
2997        swiper.slideTo(rewindLastIndex);
2998      } else {
2999        swiper.slideTo(stopIndex);
3000      }
3001    }
3002  } else {
3003    if (!params.shortSwipes) {
3004      swiper.slideTo(swiper.activeIndex);
3005      return;
3006    }
3007    const isNavButtonTarget = swiper.navigation && (e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl);
3008    if (!isNavButtonTarget) {
3009      if (swiper.swipeDirection === "next") {
3010        swiper.slideTo(rewindFirstIndex !== null ? rewindFirstIndex : stopIndex + increment);
3011      }
3012      if (swiper.swipeDirection === "prev") {
3013        swiper.slideTo(rewindLastIndex !== null ? rewindLastIndex : stopIndex);
3014      }
3015    } else if (e.target === swiper.navigation.nextEl) {
3016      swiper.slideTo(stopIndex + increment);
3017    } else {
3018      swiper.slideTo(stopIndex);
3019    }
3020  }
3021}
3022function onResize() {
3023  const swiper = this;
3024  const {
3025    params,
3026    el
3027  } = swiper;
3028  if (el && el.offsetWidth === 0) return;
3029  if (params.breakpoints) {
3030    swiper.setBreakpoint();
3031  }
3032  const {
3033    allowSlideNext,
3034    allowSlidePrev,
3035    snapGrid
3036  } = swiper;
3037  const isVirtual = swiper.virtual && swiper.params.virtual.enabled;
3038  swiper.allowSlideNext = true;
3039  swiper.allowSlidePrev = true;
3040  swiper.updateSize();
3041  swiper.updateSlides();
3042  swiper.updateSlidesClasses();
3043  const isVirtualLoop = isVirtual && params.loop;
3044  if ((params.slidesPerView === "auto" || params.slidesPerView > 1) && swiper.isEnd && !swiper.isBeginning && !swiper.params.centeredSlides && !isVirtualLoop) {
3045    swiper.slideTo(swiper.slides.length - 1, 0, false, true);
3046  } else {
3047    if (swiper.params.loop && !isVirtual) {
3048      swiper.slideToLoop(swiper.realIndex, 0, false, true);
3049    } else {
3050      swiper.slideTo(swiper.activeIndex, 0, false, true);
3051    }
3052  }
3053  if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) {
3054    clearTimeout(swiper.autoplay.resizeTimeout);
3055    swiper.autoplay.resizeTimeout = setTimeout(() => {
3056      if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) {
3057        swiper.autoplay.resume();
3058      }
3059    }, 500);
3060  }
3061  swiper.allowSlidePrev = allowSlidePrev;
3062  swiper.allowSlideNext = allowSlideNext;
3063  if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) {
3064    swiper.checkOverflow();
3065  }
3066}
3067function onClick(e) {
3068  const swiper = this;
3069  if (!swiper.enabled) return;
3070  if (!swiper.allowClick) {
3071    if (swiper.params.preventClicks) e.preventDefault();
3072    if (swiper.params.preventClicksPropagation && swiper.animating) {
3073      e.stopPropagation();
3074      e.stopImmediatePropagation();
3075    }
3076  }
3077}
3078function onScroll() {
3079  const swiper = this;
3080  const {
3081    wrapperEl,
3082    rtlTranslate,
3083    enabled
3084  } = swiper;
3085  if (!enabled) return;
3086  swiper.previousTranslate = swiper.translate;
3087  if (swiper.isHorizontal()) {
3088    swiper.translate = -wrapperEl.scrollLeft;
3089  } else {
3090    swiper.translate = -wrapperEl.scrollTop;
3091  }
3092  if (swiper.translate === 0) swiper.translate = 0;
3093  swiper.updateActiveIndex();
3094  swiper.updateSlidesClasses();
3095  let newProgress;
3096  const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
3097  if (translatesDiff === 0) {
3098    newProgress = 0;
3099  } else {
3100    newProgress = (swiper.translate - swiper.minTranslate()) / translatesDiff;
3101  }
3102  if (newProgress !== swiper.progress) {
3103    swiper.updateProgress(rtlTranslate ? -swiper.translate : swiper.translate);
3104  }
3105  swiper.emit("setTranslate", swiper.translate, false);
3106}
3107function onLoad(e) {
3108  const swiper = this;
3109  processLazyPreloader(swiper, e.target);
3110  if (swiper.params.cssMode || swiper.params.slidesPerView !== "auto" && !swiper.params.autoHeight) {
3111    return;
3112  }
vendor: 4,308 bytes, lines 3113-3245
3113  swiper.update();
3114}
3115function onDocumentTouchStart() {
3116  const swiper = this;
3117  if (swiper.documentTouchHandlerProceeded) return;
3118  swiper.documentTouchHandlerProceeded = true;
3119  if (swiper.params.touchReleaseOnEdges) {
3120    swiper.el.style.touchAction = "auto";
3121  }
3122}
3123const events = (swiper, method) => {
3124  const document2 = getDocument();
3125  const {
3126    params,
3127    el,
3128    wrapperEl,
3129    device
3130  } = swiper;
3131  const capture = !!params.nested;
3132  const domMethod = method === "on" ? "addEventListener" : "removeEventListener";
3133  const swiperMethod = method;
3134  if (!el || typeof el === "string") return;
3135  document2[domMethod]("touchstart", swiper.onDocumentTouchStart, {
3136    passive: false,
3137    capture
3138  });
3139  el[domMethod]("touchstart", swiper.onTouchStart, {
3140    passive: false
3141  });
3142  el[domMethod]("pointerdown", swiper.onTouchStart, {
3143    passive: false
3144  });
3145  document2[domMethod]("touchmove", swiper.onTouchMove, {
3146    passive: false,
3147    capture
3148  });
3149  document2[domMethod]("pointermove", swiper.onTouchMove, {
3150    passive: false,
3151    capture
3152  });
3153  document2[domMethod]("touchend", swiper.onTouchEnd, {
3154    passive: true
3155  });
3156  document2[domMethod]("pointerup", swiper.onTouchEnd, {
3157    passive: true
3158  });
3159  document2[domMethod]("pointercancel", swiper.onTouchEnd, {
3160    passive: true
3161  });
3162  document2[domMethod]("touchcancel", swiper.onTouchEnd, {
3163    passive: true
3164  });
3165  document2[domMethod]("pointerout", swiper.onTouchEnd, {
3166    passive: true
3167  });
3168  document2[domMethod]("pointerleave", swiper.onTouchEnd, {
3169    passive: true
3170  });
3171  document2[domMethod]("contextmenu", swiper.onTouchEnd, {
3172    passive: true
3173  });
3174  if (params.preventClicks || params.preventClicksPropagation) {
3175    el[domMethod]("click", swiper.onClick, true);
3176  }
3177  if (params.cssMode) {
3178    wrapperEl[domMethod]("scroll", swiper.onScroll);
3179  }
3180  if (params.updateOnWindowResize) {
3181    swiper[swiperMethod](device.ios || device.android ? "resize orientationchange observerUpdate" : "resize observerUpdate", onResize, true);
3182  } else {
3183    swiper[swiperMethod]("observerUpdate", onResize, true);
3184  }
3185  el[domMethod]("load", swiper.onLoad, {
3186    capture: true
3187  });
3188};
3189function attachEvents() {
3190  const swiper = this;
3191  const {
3192    params
3193  } = swiper;
3194  swiper.onTouchStart = onTouchStart.bind(swiper);
3195  swiper.onTouchMove = onTouchMove.bind(swiper);
3196  swiper.onTouchEnd = onTouchEnd.bind(swiper);
3197  swiper.onDocumentTouchStart = onDocumentTouchStart.bind(swiper);
3198  if (params.cssMode) {
3199    swiper.onScroll = onScroll.bind(swiper);
3200  }
3201  swiper.onClick = onClick.bind(swiper);
3202  swiper.onLoad = onLoad.bind(swiper);
3203  events(swiper, "on");
3204}
3205function detachEvents() {
3206  const swiper = this;
3207  events(swiper, "off");
3208}
3209var events$1 = {
3210  attachEvents,
3211  detachEvents
3212};
3213const isGridEnabled = (swiper, params) => {
3214  return swiper.grid && params.grid && params.grid.rows > 1;
3215};
3216function setBreakpoint() {
3217  const swiper = this;
3218  const {
3219    realIndex,
3220    initialized,
3221    params,
3222    el
3223  } = swiper;
3224  const breakpoints2 = params.breakpoints;
3225  if (!breakpoints2 || breakpoints2 && Object.keys(breakpoints2).length === 0) return;
3226  const breakpoint = swiper.getBreakpoint(breakpoints2, swiper.params.breakpointsBase, swiper.el);
3227  if (!breakpoint || swiper.currentBreakpoint === breakpoint) return;
3228  const breakpointOnlyParams = breakpoint in breakpoints2 ? breakpoints2[breakpoint] : void 0;
3229  const breakpointParams = breakpointOnlyParams || swiper.originalParams;
3230  const wasMultiRow = isGridEnabled(swiper, params);
3231  const isMultiRow = isGridEnabled(swiper, breakpointParams);
3232  const wasGrabCursor = swiper.params.grabCursor;
3233  const isGrabCursor = breakpointParams.grabCursor;
3234  const wasEnabled = params.enabled;
3235  if (wasMultiRow && !isMultiRow) {
3236    el.classList.remove(`${params.containerModifierClass}grid`, `${params.containerModifierClass}grid-column`);
3237    swiper.emitContainerClasses();
3238  } else if (!wasMultiRow && isMultiRow) {
3239    el.classList.add(`${params.containerModifierClass}grid`);
3240    if (breakpointParams.grid.fill && breakpointParams.grid.fill === "column" || !breakpointParams.grid.fill && params.grid.fill === "column") {
3241      el.classList.add(`${params.containerModifierClass}grid-column`);
3242    }
3243    swiper.emitContainerClasses();
3244  }
3245  if (wasGrabCursor && !isGrabCursor) {
vendor: 4,820 bytes, lines 3246-3412
3246    swiper.unsetGrabCursor();
3247  } else if (!wasGrabCursor && isGrabCursor) {
3248    swiper.setGrabCursor();
3249  }
3250  ["navigation", "pagination", "scrollbar"].forEach((prop) => {
3251    if (typeof breakpointParams[prop] === "undefined") return;
3252    const wasModuleEnabled = params[prop] && params[prop].enabled;
3253    const isModuleEnabled = breakpointParams[prop] && breakpointParams[prop].enabled;
3254    if (wasModuleEnabled && !isModuleEnabled) {
3255      swiper[prop].disable();
3256    }
3257    if (!wasModuleEnabled && isModuleEnabled) {
3258      swiper[prop].enable();
3259    }
3260  });
3261  const directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction;
3262  const needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged);
3263  const wasLoop = params.loop;
3264  if (directionChanged && initialized) {
3265    swiper.changeDirection();
3266  }
3267  extend(swiper.params, breakpointParams);
3268  const isEnabled = swiper.params.enabled;
3269  const hasLoop = swiper.params.loop;
3270  Object.assign(swiper, {
3271    allowTouchMove: swiper.params.allowTouchMove,
3272    allowSlideNext: swiper.params.allowSlideNext,
3273    allowSlidePrev: swiper.params.allowSlidePrev
3274  });
3275  if (wasEnabled && !isEnabled) {
3276    swiper.disable();
3277  } else if (!wasEnabled && isEnabled) {
3278    swiper.enable();
3279  }
3280  swiper.currentBreakpoint = breakpoint;
3281  swiper.emit("_beforeBreakpoint", breakpointParams);
3282  if (initialized) {
3283    if (needsReLoop) {
3284      swiper.loopDestroy();
3285      swiper.loopCreate(realIndex);
3286      swiper.updateSlides();
3287    } else if (!wasLoop && hasLoop) {
3288      swiper.loopCreate(realIndex);
3289      swiper.updateSlides();
3290    } else if (wasLoop && !hasLoop) {
3291      swiper.loopDestroy();
3292    }
3293  }
3294  swiper.emit("breakpoint", breakpointParams);
3295}
3296function getBreakpoint(breakpoints2, base, containerEl) {
3297  if (base === void 0) {
3298    base = "window";
3299  }
3300  if (!breakpoints2 || base === "container" && !containerEl) return void 0;
3301  let breakpoint = false;
3302  const window2 = getWindow();
3303  const currentHeight = base === "window" ? window2.innerHeight : containerEl.clientHeight;
3304  const points = Object.keys(breakpoints2).map((point) => {
3305    if (typeof point === "string" && point.indexOf("@") === 0) {
3306      const minRatio = parseFloat(point.substr(1));
3307      const value = currentHeight * minRatio;
3308      return {
3309        value,
3310        point
3311      };
3312    }
3313    return {
3314      value: point,
3315      point
3316    };
3317  });
3318  points.sort((a, b) => parseInt(a.value, 10) - parseInt(b.value, 10));
3319  for (let i = 0; i < points.length; i += 1) {
3320    const {
3321      point,
3322      value
3323    } = points[i];
3324    if (base === "window") {
3325      if (window2.matchMedia(`(min-width: ${value}px)`).matches) {
3326        breakpoint = point;
3327      }
3328    } else if (value <= containerEl.clientWidth) {
3329      breakpoint = point;
3330    }
3331  }
3332  return breakpoint || "max";
3333}
3334var breakpoints = {
3335  setBreakpoint,
3336  getBreakpoint
3337};
3338function prepareClasses(entries, prefix) {
3339  const resultClasses = [];
3340  entries.forEach((item) => {
3341    if (typeof item === "object") {
3342      Object.keys(item).forEach((classNames) => {
3343        if (item[classNames]) {
3344          resultClasses.push(prefix + classNames);
3345        }
3346      });
3347    } else if (typeof item === "string") {
3348      resultClasses.push(prefix + item);
3349    }
3350  });
3351  return resultClasses;
3352}
3353function addClasses() {
3354  const swiper = this;
3355  const {
3356    classNames,
3357    params,
3358    rtl,
3359    el,
3360    device
3361  } = swiper;
3362  const suffixes = prepareClasses(["initialized", params.direction, {
3363    "free-mode": swiper.params.freeMode && params.freeMode.enabled
3364  }, {
3365    "autoheight": params.autoHeight
3366  }, {
3367    "rtl": rtl
3368  }, {
3369    "grid": params.grid && params.grid.rows > 1
3370  }, {
3371    "grid-column": params.grid && params.grid.rows > 1 && params.grid.fill === "column"
3372  }, {
3373    "android": device.android
3374  }, {
3375    "ios": device.ios
3376  }, {
3377    "css-mode": params.cssMode
3378  }, {
3379    "centered": params.cssMode && params.centeredSlides
3380  }, {
3381    "watch-progress": params.watchSlidesProgress
3382  }], params.containerModifierClass);
3383  classNames.push(...suffixes);
3384  el.classList.add(...classNames);
3385  swiper.emitContainerClasses();
3386}
3387function removeClasses() {
3388  const swiper = this;
3389  const {
3390    el,
3391    classNames
3392  } = swiper;
3393  if (!el || typeof el === "string") return;
3394  el.classList.remove(...classNames);
3395  swiper.emitContainerClasses();
3396}
3397var classes = {
3398  addClasses,
3399  removeClasses
3400};
3401function checkOverflow() {
3402  const swiper = this;
3403  const {
3404    isLocked: wasLocked,
3405    params
3406  } = swiper;
3407  const {
3408    slidesOffsetBefore
3409  } = params;
3410  if (slidesOffsetBefore) {
3411    const lastSlideIndex = swiper.slides.length - 1;
3412    const lastSlideRightEdge = swiper.slidesGrid[lastSlideIndex] + swiper.slidesSizesGrid[lastSlideIndex] + slidesOffsetBefore * 2;
vendor: 5,313 bytes, lines 3413-3609
3413    swiper.isLocked = swiper.size > lastSlideRightEdge;
3414  } else {
3415    swiper.isLocked = swiper.snapGrid.length === 1;
3416  }
3417  if (params.allowSlideNext === true) {
3418    swiper.allowSlideNext = !swiper.isLocked;
3419  }
3420  if (params.allowSlidePrev === true) {
3421    swiper.allowSlidePrev = !swiper.isLocked;
3422  }
3423  if (wasLocked && wasLocked !== swiper.isLocked) {
3424    swiper.isEnd = false;
3425  }
3426  if (wasLocked !== swiper.isLocked) {
3427    swiper.emit(swiper.isLocked ? "lock" : "unlock");
3428  }
3429}
3430var checkOverflow$1 = {
3431  checkOverflow
3432};
3433var defaults = {
3434  init: true,
3435  direction: "horizontal",
3436  oneWayMovement: false,
3437  swiperElementNodeName: "SWIPER-CONTAINER",
3438  touchEventsTarget: "wrapper",
3439  initialSlide: 0,
3440  speed: 300,
3441  cssMode: false,
3442  updateOnWindowResize: true,
3443  resizeObserver: true,
3444  nested: false,
3445  createElements: false,
3446  eventsPrefix: "swiper",
3447  enabled: true,
3448  focusableElements: "input, select, option, textarea, button, video, label",
3449  // Overrides
3450  width: null,
3451  height: null,
3452  //
3453  preventInteractionOnTransition: false,
3454  // ssr
3455  userAgent: null,
3456  url: null,
3457  // To support iOS's swipe-to-go-back gesture (when being used in-app).
3458  edgeSwipeDetection: false,
3459  edgeSwipeThreshold: 20,
3460  // Autoheight
3461  autoHeight: false,
3462  // Set wrapper width
3463  setWrapperSize: false,
3464  // Virtual Translate
3465  virtualTranslate: false,
3466  // Effects
3467  effect: "slide",
3468  // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'
3469  // Breakpoints
3470  breakpoints: void 0,
3471  breakpointsBase: "window",
3472  // Slides grid
3473  spaceBetween: 0,
3474  slidesPerView: 1,
3475  slidesPerGroup: 1,
3476  slidesPerGroupSkip: 0,
3477  slidesPerGroupAuto: false,
3478  centeredSlides: false,
3479  centeredSlidesBounds: false,
3480  slidesOffsetBefore: 0,
3481  // in px
3482  slidesOffsetAfter: 0,
3483  // in px
3484  normalizeSlideIndex: true,
3485  centerInsufficientSlides: false,
3486  // Disable swiper and hide navigation when container not overflow
3487  watchOverflow: true,
3488  // Round length
3489  roundLengths: false,
3490  // Touches
3491  touchRatio: 1,
3492  touchAngle: 45,
3493  simulateTouch: true,
3494  shortSwipes: true,
3495  longSwipes: true,
3496  longSwipesRatio: 0.5,
3497  longSwipesMs: 300,
3498  followFinger: true,
3499  allowTouchMove: true,
3500  threshold: 5,
3501  touchMoveStopPropagation: false,
3502  touchStartPreventDefault: true,
3503  touchStartForcePreventDefault: false,
3504  touchReleaseOnEdges: false,
3505  // Unique Navigation Elements
3506  uniqueNavElements: true,
3507  // Resistance
3508  resistance: true,
3509  resistanceRatio: 0.85,
3510  // Progress
3511  watchSlidesProgress: false,
3512  // Cursor
3513  grabCursor: false,
3514  // Clicks
3515  preventClicks: true,
3516  preventClicksPropagation: true,
3517  slideToClickedSlide: false,
3518  // loop
3519  loop: false,
3520  loopAddBlankSlides: true,
3521  loopAdditionalSlides: 0,
3522  loopPreventsSliding: true,
3523  // rewind
3524  rewind: false,
3525  // Swiping/no swiping
3526  allowSlidePrev: true,
3527  allowSlideNext: true,
3528  swipeHandler: null,
3529  // '.swipe-handler',
3530  noSwiping: true,
3531  noSwipingClass: "swiper-no-swiping",
3532  noSwipingSelector: null,
3533  // Passive Listeners
3534  passiveListeners: true,
3535  maxBackfaceHiddenSlides: 10,
3536  // NS
3537  containerModifierClass: "swiper-",
3538  // NEW
3539  slideClass: "swiper-slide",
3540  slideBlankClass: "swiper-slide-blank",
3541  slideActiveClass: "swiper-slide-active",
3542  slideVisibleClass: "swiper-slide-visible",
3543  slideFullyVisibleClass: "swiper-slide-fully-visible",
3544  slideNextClass: "swiper-slide-next",
3545  slidePrevClass: "swiper-slide-prev",
3546  wrapperClass: "swiper-wrapper",
3547  lazyPreloaderClass: "swiper-lazy-preloader",
3548  lazyPreloadPrevNext: 0,
3549  // Callbacks
3550  runCallbacksOnInit: true,
3551  // Internals
3552  _emitClasses: false
3553};
3554function moduleExtendParams(params, allModulesParams) {
3555  return function extendParams(obj) {
3556    if (obj === void 0) {
3557      obj = {};
3558    }
3559    const moduleParamName = Object.keys(obj)[0];
3560    const moduleParams = obj[moduleParamName];
3561    if (typeof moduleParams !== "object" || moduleParams === null) {
3562      extend(allModulesParams, obj);
3563      return;
3564    }
3565    if (params[moduleParamName] === true) {
3566      params[moduleParamName] = {
3567        enabled: true
3568      };
3569    }
3570    if (moduleParamName === "navigation" && params[moduleParamName] && params[moduleParamName].enabled && !params[moduleParamName].prevEl && !params[moduleParamName].nextEl) {
3571      params[moduleParamName].auto = true;
3572    }
3573    if (["pagination", "scrollbar"].indexOf(moduleParamName) >= 0 && params[moduleParamName] && params[moduleParamName].enabled && !params[moduleParamName].el) {
3574      params[moduleParamName].auto = true;
3575    }
3576    if (!(moduleParamName in params && "enabled" in moduleParams)) {
3577      extend(allModulesParams, obj);
3578      return;
3579    }
3580    if (typeof params[moduleParamName] === "object" && !("enabled" in params[moduleParamName])) {
3581      params[moduleParamName].enabled = true;
3582    }
3583    if (!params[moduleParamName]) params[moduleParamName] = {
3584      enabled: false
3585    };
3586    extend(allModulesParams, obj);
3587  };
3588}
3589const prototypes = {
3590  eventsEmitter,
3591  update,
3592  translate,
3593  transition,
3594  slide,
3595  loop,
3596  grabCursor,
3597  events: events$1,
3598  breakpoints,
3599  checkOverflow: checkOverflow$1,
3600  classes
3601};
3602const extendedDefaults = {};
3603class Swiper {
3604  constructor() {
3605    let el;
3606    let params;
3607    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
3608      args[_key] = arguments[_key];
3609    }
vendor: 15,333 bytes, lines 3610-4089
3610    if (args.length === 1 && args[0].constructor && Object.prototype.toString.call(args[0]).slice(8, -1) === "Object") {
3611      params = args[0];
3612    } else {
3613      [el, params] = args;
3614    }
3615    if (!params) params = {};
3616    params = extend({}, params);
3617    if (el && !params.el) params.el = el;
3618    const document2 = getDocument();
3619    if (params.el && typeof params.el === "string" && document2.querySelectorAll(params.el).length > 1) {
3620      const swipers = [];
3621      document2.querySelectorAll(params.el).forEach((containerEl) => {
3622        const newParams = extend({}, params, {
3623          el: containerEl
3624        });
3625        swipers.push(new Swiper(newParams));
3626      });
3627      return swipers;
3628    }
3629    const swiper = this;
3630    swiper.__swiper__ = true;
3631    swiper.support = getSupport();
3632    swiper.device = getDevice({
3633      userAgent: params.userAgent
3634    });
3635    swiper.browser = getBrowser();
3636    swiper.eventsListeners = {};
3637    swiper.eventsAnyListeners = [];
3638    swiper.modules = [...swiper.__modules__];
3639    if (params.modules && Array.isArray(params.modules)) {
3640      swiper.modules.push(...params.modules);
3641    }
3642    const allModulesParams = {};
3643    swiper.modules.forEach((mod) => {
3644      mod({
3645        params,
3646        swiper,
3647        extendParams: moduleExtendParams(params, allModulesParams),
3648        on: swiper.on.bind(swiper),
3649        once: swiper.once.bind(swiper),
3650        off: swiper.off.bind(swiper),
3651        emit: swiper.emit.bind(swiper)
3652      });
3653    });
3654    const swiperParams = extend({}, defaults, allModulesParams);
3655    swiper.params = extend({}, swiperParams, extendedDefaults, params);
3656    swiper.originalParams = extend({}, swiper.params);
3657    swiper.passedParams = extend({}, params);
3658    if (swiper.params && swiper.params.on) {
3659      Object.keys(swiper.params.on).forEach((eventName) => {
3660        swiper.on(eventName, swiper.params.on[eventName]);
3661      });
3662    }
3663    if (swiper.params && swiper.params.onAny) {
3664      swiper.onAny(swiper.params.onAny);
3665    }
3666    Object.assign(swiper, {
3667      enabled: swiper.params.enabled,
3668      el,
3669      // Classes
3670      classNames: [],
3671      // Slides
3672      slides: [],
3673      slidesGrid: [],
3674      snapGrid: [],
3675      slidesSizesGrid: [],
3676      // isDirection
3677      isHorizontal() {
3678        return swiper.params.direction === "horizontal";
3679      },
3680      isVertical() {
3681        return swiper.params.direction === "vertical";
3682      },
3683      // Indexes
3684      activeIndex: 0,
3685      realIndex: 0,
3686      //
3687      isBeginning: true,
3688      isEnd: false,
3689      // Props
3690      translate: 0,
3691      previousTranslate: 0,
3692      progress: 0,
3693      velocity: 0,
3694      animating: false,
3695      cssOverflowAdjustment() {
3696        return Math.trunc(this.translate / 2 ** 23) * 2 ** 23;
3697      },
3698      // Locks
3699      allowSlideNext: swiper.params.allowSlideNext,
3700      allowSlidePrev: swiper.params.allowSlidePrev,
3701      // Touch Events
3702      touchEventsData: {
3703        isTouched: void 0,
3704        isMoved: void 0,
3705        allowTouchCallbacks: void 0,
3706        touchStartTime: void 0,
3707        isScrolling: void 0,
3708        currentTranslate: void 0,
3709        startTranslate: void 0,
3710        allowThresholdMove: void 0,
3711        // Form elements to match
3712        focusableElements: swiper.params.focusableElements,
3713        // Last click time
3714        lastClickTime: 0,
3715        clickTimeout: void 0,
3716        // Velocities
3717        velocities: [],
3718        allowMomentumBounce: void 0,
3719        startMoving: void 0,
3720        pointerId: null,
3721        touchId: null
3722      },
3723      // Clicks
3724      allowClick: true,
3725      // Touches
3726      allowTouchMove: swiper.params.allowTouchMove,
3727      touches: {
3728        startX: 0,
3729        startY: 0,
3730        currentX: 0,
3731        currentY: 0,
3732        diff: 0
3733      },
3734      // Images
3735      imagesToLoad: [],
3736      imagesLoaded: 0
3737    });
3738    swiper.emit("_swiper");
3739    if (swiper.params.init) {
3740      swiper.init();
3741    }
3742    return swiper;
3743  }
3744  getDirectionLabel(property) {
3745    if (this.isHorizontal()) {
3746      return property;
3747    }
3748    return {
3749      "width": "height",
3750      "margin-top": "margin-left",
3751      "margin-bottom ": "margin-right",
3752      "margin-left": "margin-top",
3753      "margin-right": "margin-bottom",
3754      "padding-left": "padding-top",
3755      "padding-right": "padding-bottom",
3756      "marginRight": "marginBottom"
3757    }[property];
3758  }
3759  getSlideIndex(slideEl) {
3760    const {
3761      slidesEl,
3762      params
3763    } = this;
3764    const slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`);
3765    const firstSlideIndex = elementIndex(slides[0]);
3766    return elementIndex(slideEl) - firstSlideIndex;
3767  }
3768  getSlideIndexByData(index) {
3769    return this.getSlideIndex(this.slides.filter((slideEl) => slideEl.getAttribute("data-swiper-slide-index") * 1 === index)[0]);
3770  }
3771  recalcSlides() {
3772    const swiper = this;
3773    const {
3774      slidesEl,
3775      params
3776    } = swiper;
3777    swiper.slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`);
3778  }
3779  enable() {
3780    const swiper = this;
3781    if (swiper.enabled) return;
3782    swiper.enabled = true;
3783    if (swiper.params.grabCursor) {
3784      swiper.setGrabCursor();
3785    }
3786    swiper.emit("enable");
3787  }
3788  disable() {
3789    const swiper = this;
3790    if (!swiper.enabled) return;
3791    swiper.enabled = false;
3792    if (swiper.params.grabCursor) {
3793      swiper.unsetGrabCursor();
3794    }
3795    swiper.emit("disable");
3796  }
3797  setProgress(progress, speed) {
3798    const swiper = this;
3799    progress = Math.min(Math.max(progress, 0), 1);
3800    const min = swiper.minTranslate();
3801    const max = swiper.maxTranslate();
3802    const current = (max - min) * progress + min;
3803    swiper.translateTo(current, typeof speed === "undefined" ? 0 : speed);
3804    swiper.updateActiveIndex();
3805    swiper.updateSlidesClasses();
3806  }
3807  emitContainerClasses() {
3808    const swiper = this;
3809    if (!swiper.params._emitClasses || !swiper.el) return;
3810    const cls = swiper.el.className.split(" ").filter((className) => {
3811      return className.indexOf("swiper") === 0 || className.indexOf(swiper.params.containerModifierClass) === 0;
3812    });
3813    swiper.emit("_containerClasses", cls.join(" "));
3814  }
3815  getSlideClasses(slideEl) {
3816    const swiper = this;
3817    if (swiper.destroyed) return "";
3818    return slideEl.className.split(" ").filter((className) => {
3819      return className.indexOf("swiper-slide") === 0 || className.indexOf(swiper.params.slideClass) === 0;
3820    }).join(" ");
3821  }
3822  emitSlidesClasses() {
3823    const swiper = this;
3824    if (!swiper.params._emitClasses || !swiper.el) return;
3825    const updates = [];
3826    swiper.slides.forEach((slideEl) => {
3827      const classNames = swiper.getSlideClasses(slideEl);
3828      updates.push({
3829        slideEl,
3830        classNames
3831      });
3832      swiper.emit("_slideClass", slideEl, classNames);
3833    });
3834    swiper.emit("_slideClasses", updates);
3835  }
3836  slidesPerViewDynamic(view, exact) {
3837    if (view === void 0) {
3838      view = "current";
3839    }
3840    if (exact === void 0) {
3841      exact = false;
3842    }
3843    const swiper = this;
3844    const {
3845      params,
3846      slides,
3847      slidesGrid,
3848      slidesSizesGrid,
3849      size: swiperSize,
3850      activeIndex
3851    } = swiper;
3852    let spv = 1;
3853    if (typeof params.slidesPerView === "number") return params.slidesPerView;
3854    if (params.centeredSlides) {
3855      let slideSize = slides[activeIndex] ? Math.ceil(slides[activeIndex].swiperSlideSize) : 0;
3856      let breakLoop;
3857      for (let i = activeIndex + 1; i < slides.length; i += 1) {
3858        if (slides[i] && !breakLoop) {
3859          slideSize += Math.ceil(slides[i].swiperSlideSize);
3860          spv += 1;
3861          if (slideSize > swiperSize) breakLoop = true;
3862        }
3863      }
3864      for (let i = activeIndex - 1; i >= 0; i -= 1) {
3865        if (slides[i] && !breakLoop) {
3866          slideSize += slides[i].swiperSlideSize;
3867          spv += 1;
3868          if (slideSize > swiperSize) breakLoop = true;
3869        }
3870      }
3871    } else {
3872      if (view === "current") {
3873        for (let i = activeIndex + 1; i < slides.length; i += 1) {
3874          const slideInView = exact ? slidesGrid[i] + slidesSizesGrid[i] - slidesGrid[activeIndex] < swiperSize : slidesGrid[i] - slidesGrid[activeIndex] < swiperSize;
3875          if (slideInView) {
3876            spv += 1;
3877          }
3878        }
3879      } else {
3880        for (let i = activeIndex - 1; i >= 0; i -= 1) {
3881          const slideInView = slidesGrid[activeIndex] - slidesGrid[i] < swiperSize;
3882          if (slideInView) {
3883            spv += 1;
3884          }
3885        }
3886      }
3887    }
3888    return spv;
3889  }
3890  update() {
3891    const swiper = this;
3892    if (!swiper || swiper.destroyed) return;
3893    const {
3894      snapGrid,
3895      params
3896    } = swiper;
3897    if (params.breakpoints) {
3898      swiper.setBreakpoint();
3899    }
3900    [...swiper.el.querySelectorAll('[loading="lazy"]')].forEach((imageEl) => {
3901      if (imageEl.complete) {
3902        processLazyPreloader(swiper, imageEl);
3903      }
3904    });
3905    swiper.updateSize();
3906    swiper.updateSlides();
3907    swiper.updateProgress();
3908    swiper.updateSlidesClasses();
3909    function setTranslate2() {
3910      const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate;
3911      const newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate());
3912      swiper.setTranslate(newTranslate);
3913      swiper.updateActiveIndex();
3914      swiper.updateSlidesClasses();
3915    }
3916    let translated;
3917    if (params.freeMode && params.freeMode.enabled && !params.cssMode) {
3918      setTranslate2();
3919      if (params.autoHeight) {
3920        swiper.updateAutoHeight();
3921      }
3922    } else {
3923      if ((params.slidesPerView === "auto" || params.slidesPerView > 1) && swiper.isEnd && !params.centeredSlides) {
3924        const slides = swiper.virtual && params.virtual.enabled ? swiper.virtual.slides : swiper.slides;
3925        translated = swiper.slideTo(slides.length - 1, 0, false, true);
3926      } else {
3927        translated = swiper.slideTo(swiper.activeIndex, 0, false, true);
3928      }
3929      if (!translated) {
3930        setTranslate2();
3931      }
3932    }
3933    if (params.watchOverflow && snapGrid !== swiper.snapGrid) {
3934      swiper.checkOverflow();
3935    }
3936    swiper.emit("update");
3937  }
3938  changeDirection(newDirection, needUpdate) {
3939    if (needUpdate === void 0) {
3940      needUpdate = true;
3941    }
3942    const swiper = this;
3943    const currentDirection = swiper.params.direction;
3944    if (!newDirection) {
3945      newDirection = currentDirection === "horizontal" ? "vertical" : "horizontal";
3946    }
3947    if (newDirection === currentDirection || newDirection !== "horizontal" && newDirection !== "vertical") {
3948      return swiper;
3949    }
3950    swiper.el.classList.remove(`${swiper.params.containerModifierClass}${currentDirection}`);
3951    swiper.el.classList.add(`${swiper.params.containerModifierClass}${newDirection}`);
3952    swiper.emitContainerClasses();
3953    swiper.params.direction = newDirection;
3954    swiper.slides.forEach((slideEl) => {
3955      if (newDirection === "vertical") {
3956        slideEl.style.width = "";
3957      } else {
3958        slideEl.style.height = "";
3959      }
3960    });
3961    swiper.emit("changeDirection");
3962    if (needUpdate) swiper.update();
3963    return swiper;
3964  }
3965  changeLanguageDirection(direction) {
3966    const swiper = this;
3967    if (swiper.rtl && direction === "rtl" || !swiper.rtl && direction === "ltr") return;
3968    swiper.rtl = direction === "rtl";
3969    swiper.rtlTranslate = swiper.params.direction === "horizontal" && swiper.rtl;
3970    if (swiper.rtl) {
3971      swiper.el.classList.add(`${swiper.params.containerModifierClass}rtl`);
3972      swiper.el.dir = "rtl";
3973    } else {
3974      swiper.el.classList.remove(`${swiper.params.containerModifierClass}rtl`);
3975      swiper.el.dir = "ltr";
3976    }
3977    swiper.update();
3978  }
3979  mount(element) {
3980    const swiper = this;
3981    if (swiper.mounted) return true;
3982    let el = element || swiper.params.el;
3983    if (typeof el === "string") {
3984      el = document.querySelector(el);
3985    }
3986    if (!el) {
3987      return false;
3988    }
3989    el.swiper = swiper;
3990    if (el.parentNode && el.parentNode.host && el.parentNode.host.nodeName === swiper.params.swiperElementNodeName.toUpperCase()) {
3991      swiper.isElement = true;
3992    }
3993    const getWrapperSelector = () => {
3994      return `.${(swiper.params.wrapperClass || "").trim().split(" ").join(".")}`;
3995    };
3996    const getWrapper = () => {
3997      if (el && el.shadowRoot && el.shadowRoot.querySelector) {
3998        const res = el.shadowRoot.querySelector(getWrapperSelector());
3999        return res;
4000      }
4001      return elementChildren(el, getWrapperSelector())[0];
4002    };
4003    let wrapperEl = getWrapper();
4004    if (!wrapperEl && swiper.params.createElements) {
4005      wrapperEl = createElement("div", swiper.params.wrapperClass);
4006      el.append(wrapperEl);
4007      elementChildren(el, `.${swiper.params.slideClass}`).forEach((slideEl) => {
4008        wrapperEl.append(slideEl);
4009      });
4010    }
4011    Object.assign(swiper, {
4012      el,
4013      wrapperEl,
4014      slidesEl: swiper.isElement && !el.parentNode.host.slideSlots ? el.parentNode.host : wrapperEl,
4015      hostEl: swiper.isElement ? el.parentNode.host : el,
4016      mounted: true,
4017      // RTL
4018      rtl: el.dir.toLowerCase() === "rtl" || elementStyle(el, "direction") === "rtl",
4019      rtlTranslate: swiper.params.direction === "horizontal" && (el.dir.toLowerCase() === "rtl" || elementStyle(el, "direction") === "rtl"),
4020      wrongRTL: elementStyle(wrapperEl, "display") === "-webkit-box"
4021    });
4022    return true;
4023  }
4024  init(el) {
4025    const swiper = this;
4026    if (swiper.initialized) return swiper;
4027    const mounted = swiper.mount(el);
4028    if (mounted === false) return swiper;
4029    swiper.emit("beforeInit");
4030    if (swiper.params.breakpoints) {
4031      swiper.setBreakpoint();
4032    }
4033    swiper.addClasses();
4034    swiper.updateSize();
4035    swiper.updateSlides();
4036    if (swiper.params.watchOverflow) {
4037      swiper.checkOverflow();
4038    }
4039    if (swiper.params.grabCursor && swiper.enabled) {
4040      swiper.setGrabCursor();
4041    }
4042    if (swiper.params.loop && swiper.virtual && swiper.params.virtual.enabled) {
4043      swiper.slideTo(swiper.params.initialSlide + swiper.virtual.slidesBefore, 0, swiper.params.runCallbacksOnInit, false, true);
4044    } else {
4045      swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit, false, true);
4046    }
4047    if (swiper.params.loop) {
4048      swiper.loopCreate();
4049    }
4050    swiper.attachEvents();
4051    const lazyElements = [...swiper.el.querySelectorAll('[loading="lazy"]')];
4052    if (swiper.isElement) {
4053      lazyElements.push(...swiper.hostEl.querySelectorAll('[loading="lazy"]'));
4054    }
4055    lazyElements.forEach((imageEl) => {
4056      if (imageEl.complete) {
4057        processLazyPreloader(swiper, imageEl);
4058      } else {
4059        imageEl.addEventListener("load", (e) => {
4060          processLazyPreloader(swiper, e.target);
4061        });
4062      }
4063    });
4064    preload(swiper);
4065    swiper.initialized = true;
4066    preload(swiper);
4067    swiper.emit("init");
4068    swiper.emit("afterInit");
4069    return swiper;
4070  }
4071  destroy(deleteInstance, cleanStyles) {
4072    if (deleteInstance === void 0) {
4073      deleteInstance = true;
4074    }
4075    if (cleanStyles === void 0) {
4076      cleanStyles = true;
4077    }
4078    const swiper = this;
4079    const {
4080      params,
4081      el,
4082      wrapperEl,
4083      slides
4084    } = swiper;
4085    if (typeof swiper.params === "undefined" || swiper.destroyed) {
4086      return null;
4087    }
4088    swiper.emit("beforeDestroy");
4089    swiper.initialized = false;
4090    swiper.detachEvents();
4091    if (params.loop) {
4092      swiper.loopDestroy();
4093    }
4094    if (cleanStyles) {
4095      swiper.removeClasses();
4096      if (el && typeof el !== "string") {
4097        el.removeAttribute("style");
4098      }
4099      if (wrapperEl) {
4100        wrapperEl.removeAttribute("style");
4101      }
4102      if (slides && slides.length) {
4103        slides.forEach((slideEl) => {
4104          slideEl.classList.remove(params.slideVisibleClass, params.slideFullyVisibleClass, params.slideActiveClass, params.slideNextClass, params.slidePrevClass);
4105          slideEl.removeAttribute("style");
4106          slideEl.removeAttribute("data-swiper-slide-index");
4107        });
4108      }
4109    }
4110    swiper.emit("destroy");
4111    Object.keys(swiper.eventsListeners).forEach((eventName) => {
4112      swiper.off(eventName);
4113    });
4114    if (deleteInstance !== false) {
4115      if (swiper.el && typeof swiper.el !== "string") {
4116        swiper.el.swiper = null;
4117      }
4118      deleteProps(swiper);
4119    }
4120    swiper.destroyed = true;
4121    return null;
4122  }
4123  static extendDefaults(newDefaults) {
4124    extend(extendedDefaults, newDefaults);
4125  }
4126  static get extendedDefaults() {
4127    return extendedDefaults;
4128  }
4129  static get defaults() {
4130    return defaults;
4131  }
4132  static installModule(mod) {
4133    if (!Swiper.prototype.__modules__) Swiper.prototype.__modules__ = [];
4134    const modules2 = Swiper.prototype.__modules__;
4135    if (typeof mod === "function" && modules2.indexOf(mod) < 0) {
4136      modules2.push(mod);
4137    }
4138  }
4139  static use(module) {
4140    if (Array.isArray(module)) {
4141      module.forEach((m) => Swiper.installModule(m));
4142      return Swiper;
4143    }
4144    Swiper.installModule(module);
4145    return Swiper;
4146  }
4147}
4148Object.keys(prototypes).forEach((prototypeGroup) => {
4149  Object.keys(prototypes[prototypeGroup]).forEach((protoMethod) => {
4150    Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod];
4151  });
4152});
4153Swiper.use([Resize, Observer]);
4154function Virtual(_ref) {
4155  let {
4156    swiper,
4157    extendParams,
4158    on,
4159    emit
4160  } = _ref;
4161  extendParams({
4162    virtual: {
4163      enabled: false,
4164      slides: [],
4165      cache: true,
4166      renderSlide: null,
4167      renderExternal: null,
4168      renderExternalUpdate: true,
4169      addSlidesBefore: 0,
4170      addSlidesAfter: 0
4171    }
4172  });
4173  let cssModeTimeout;
4174  const document2 = getDocument();
4175  swiper.virtual = {
4176    cache: {},
4177    from: void 0,
4178    to: void 0,
4179    slides: [],
4180    offset: 0,
4181    slidesGrid: []
4182  };
4183  const tempDOM = document2.createElement("div");
vendor: 4,202 bytes, lines 4184-4318
4184  function renderSlide(slide2, index) {
4185    const params = swiper.params.virtual;
4186    if (params.cache && swiper.virtual.cache[index]) {
4187      return swiper.virtual.cache[index];
4188    }
4189    let slideEl;
4190    if (params.renderSlide) {
4191      slideEl = params.renderSlide.call(swiper, slide2, index);
4192      if (typeof slideEl === "string") {
4193        tempDOM.innerHTML = slideEl;
4194        slideEl = tempDOM.children[0];
4195      }
4196    } else if (swiper.isElement) {
4197      slideEl = createElement("swiper-slide");
4198    } else {
4199      slideEl = createElement("div", swiper.params.slideClass);
4200    }
4201    slideEl.setAttribute("data-swiper-slide-index", index);
4202    if (!params.renderSlide) {
4203      slideEl.innerHTML = slide2;
4204    }
4205    if (params.cache) {
4206      swiper.virtual.cache[index] = slideEl;
4207    }
4208    return slideEl;
4209  }
4210  function update2(force, beforeInit) {
4211    const {
4212      slidesPerView,
4213      slidesPerGroup,
4214      centeredSlides,
4215      loop: isLoop,
4216      initialSlide
4217    } = swiper.params;
4218    if (beforeInit && !isLoop && initialSlide > 0) {
4219      return;
4220    }
4221    const {
4222      addSlidesBefore,
4223      addSlidesAfter
4224    } = swiper.params.virtual;
4225    const {
4226      from: previousFrom,
4227      to: previousTo,
4228      slides,
4229      slidesGrid: previousSlidesGrid,
4230      offset: previousOffset
4231    } = swiper.virtual;
4232    if (!swiper.params.cssMode) {
4233      swiper.updateActiveIndex();
4234    }
4235    const activeIndex = swiper.activeIndex || 0;
4236    let offsetProp;
4237    if (swiper.rtlTranslate) offsetProp = "right";
4238    else offsetProp = swiper.isHorizontal() ? "left" : "top";
4239    let slidesAfter;
4240    let slidesBefore;
4241    if (centeredSlides) {
4242      slidesAfter = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesAfter;
4243      slidesBefore = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesBefore;
4244    } else {
4245      slidesAfter = slidesPerView + (slidesPerGroup - 1) + addSlidesAfter;
4246      slidesBefore = (isLoop ? slidesPerView : slidesPerGroup) + addSlidesBefore;
4247    }
4248    let from = activeIndex - slidesBefore;
4249    let to = activeIndex + slidesAfter;
4250    if (!isLoop) {
4251      from = Math.max(from, 0);
4252      to = Math.min(to, slides.length - 1);
4253    }
4254    let offset = (swiper.slidesGrid[from] || 0) - (swiper.slidesGrid[0] || 0);
4255    if (isLoop && activeIndex >= slidesBefore) {
4256      from -= slidesBefore;
4257      if (!centeredSlides) offset += swiper.slidesGrid[0];
4258    } else if (isLoop && activeIndex < slidesBefore) {
4259      from = -slidesBefore;
4260      if (centeredSlides) offset += swiper.slidesGrid[0];
4261    }
4262    Object.assign(swiper.virtual, {
4263      from,
4264      to,
4265      offset,
4266      slidesGrid: swiper.slidesGrid,
4267      slidesBefore,
4268      slidesAfter
4269    });
4270    function onRendered() {
4271      swiper.updateSlides();
4272      swiper.updateProgress();
4273      swiper.updateSlidesClasses();
4274      emit("virtualUpdate");
4275    }
4276    if (previousFrom === from && previousTo === to && !force) {
4277      if (swiper.slidesGrid !== previousSlidesGrid && offset !== previousOffset) {
4278        swiper.slides.forEach((slideEl) => {
4279          slideEl.style[offsetProp] = `${offset - Math.abs(swiper.cssOverflowAdjustment())}px`;
4280        });
4281      }
4282      swiper.updateProgress();
4283      emit("virtualUpdate");
4284      return;
4285    }
4286    if (swiper.params.virtual.renderExternal) {
4287      swiper.params.virtual.renderExternal.call(swiper, {
4288        offset,
4289        from,
4290        to,
4291        slides: function getSlides() {
4292          const slidesToRender = [];
4293          for (let i = from; i <= to; i += 1) {
4294            slidesToRender.push(slides[i]);
4295          }
4296          return slidesToRender;
4297        }()
4298      });
4299      if (swiper.params.virtual.renderExternalUpdate) {
4300        onRendered();
4301      } else {
4302        emit("virtualUpdate");
4303      }
4304      return;
4305    }
4306    const prependIndexes = [];
4307    const appendIndexes = [];
4308    const getSlideIndex = (index) => {
4309      let slideIndex = index;
4310      if (index < 0) {
4311        slideIndex = slides.length + index;
4312      } else if (slideIndex >= slides.length) {
4313        slideIndex = slideIndex - slides.length;
4314      }
4315      return slideIndex;
4316    };
4317    if (force) {
4318      swiper.slides.filter((el) => el.matches(`.${swiper.params.slideClass}
4318, swiper-slide`)).forEach((slideEl) => {
4319        slideEl.remove();
4320      });
4321    } else {
4322      for (let i = previousFrom; i <= previousTo; i += 1) {
4323        if (i < from || i > to) {
4324          const slideIndex = getSlideIndex(i);
4325          swiper.slides.filter((el) => el.matches(`.${swiper.params.slideClass}[data-swiper-slide-index="${slideIndex}"], swiper-slide[data-swiper-slide-index="${slideIndex}"]`)).forEach((slideEl) => {
4326            slideEl.remove();
4327          });
4328        }
4329      }
4330    }
4331    const loopFrom = isLoop ? -slides.length : 0;
4332    const loopTo = isLoop ? slides.length * 2 : slides.length;
4333    for (let i = loopFrom; i < loopTo; i += 1) {
4334      if (i >= from && i <= to) {
4335        const slideIndex = getSlideIndex(i);
4336        if (typeof previousTo === "undefined" || force) {
4337          appendIndexes.push(slideIndex);
4338        } else {
4339          if (i > previousTo) appendIndexes.push(slideIndex);
4340          if (i < previousFrom) prependIndexes.push(slideIndex);
4341        }
4342      }
4343    }
4344    appendIndexes.forEach((index) => {
4345      swiper.slidesEl.append(renderSlide(slides[index], index));
4346    });
4347    if (isLoop) {
4348      for (let i = prependIndexes.length - 1; i >= 0; i -= 1) {
4349        const index = prependIndexes[i];
4350        swiper.slidesEl.prepend(renderSlide(slides[index], index));
4351      }
4352    } else {
4353      prependIndexes.sort((a, b) => b - a);
4354      prependIndexes.forEach((index) => {
4355        swiper.slidesEl.prepend(renderSlide(slides[index], index));
4356      });
4357    }
4358    elementChildren(swiper.slidesEl, ".swiper-slide, swiper-slide").forEach((slideEl) => {
4359      slideEl.style[offsetProp] = `${offset - Math.abs(swiper.cssOverflowAdjustment())}px`;
4360    });
4361    onRendered();
4362  }
4363  function appendSlide2(slides) {
4364    if (typeof slides === "object" && "length" in slides) {
4365      for (let i = 0; i < slides.length; i += 1) {
4366        if (slides[i]) swiper.virtual.slides.push(slides[i]);
4367      }
4368    } else {
4369      swiper.virtual.slides.push(slides);
4370    }
4371    update2(true);
4372  }
4373  function prependSlide2(slides) {
4374    const activeIndex = swiper.activeIndex;
4375    let newActiveIndex = activeIndex + 1;
4376    let numberOfNewSlides = 1;
4377    if (Array.isArray(slides)) {
4378      for (let i = 0; i < slides.length; i += 1) {
4379        if (slides[i]) swiper.virtual.slides.unshift(slides[i]);
4380      }
4381      newActiveIndex = activeIndex + slides.length;
4382      numberOfNewSlides = slides.length;
4383    } else {
4384      swiper.virtual.slides.unshift(slides);
4385    }
4386    if (swiper.params.virtual.cache) {
4387      const cache = swiper.virtual.cache;
4388      const newCache = {};
4389      Object.keys(cache).forEach((cachedIndex) => {
4390        const cachedEl = cache[cachedIndex];
4391        const cachedElIndex = cachedEl.getAttribute("data-swiper-slide-index");
4392        if (cachedElIndex) {
4393          cachedEl.setAttribute("data-swiper-slide-index", parseInt(cachedElIndex, 10) + numberOfNewSlides);
4394        }
4395        newCache[parseInt(cachedIndex, 10) + numberOfNewSlides] = cachedEl;
4396      });
4397      swiper.virtual.cache = newCache;
4398    }
4399    update2(true);
4400    swiper.slideTo(newActiveIndex, 0);
4401  }
4402  function removeSlide2(slidesIndexes) {
4403    if (typeof slidesIndexes === "undefined" || slidesIndexes === null) return;
4404    let activeIndex = swiper.activeIndex;
4405    if (Array.isArray(slidesIndexes)) {
4406      for (let i = slidesIndexes.length - 1; i >= 0; i -= 1) {
4407        if (swiper.params.virtual.cache) {
4408          delete swiper.virtual.cache[slidesIndexes[i]];
4409          Object.keys(swiper.virtual.cache).forEach((key) => {
4410            if (key > slidesIndexes) {
4411              swiper.virtual.cache[key - 1] = swiper.virtual.cache[key];
4412              swiper.virtual.cache[key - 1].setAttribute("data-swiper-slide-index", key - 1);
4413              delete swiper.virtual.cache[key];
4414            }
4415          });
4416        }
4417        swiper.virtual.slides.splice(slidesIndexes[i], 1);
4418        if (slidesIndexes[i] < activeIndex) activeIndex -= 1;
4419        activeIndex = Math.max(activeIndex, 0);
4420      }
4421    } else {
4422      if (swiper.params.virtual.cache) {
4423        delete swiper.virtual.cache[slidesIndexes];
4424        Object.keys(swiper.virtual.cache).forEach((key) => {
4425          if (key > slidesIndexes) {
4426            swiper.virtual.cache[key - 1] = swiper.virtual.cache[key];
4427            swiper.virtual.cache[key - 1].setAttribute("data-swiper-slide-index", key - 1);
4428            delete swiper.virtual.cache[key];
4429          }
4430        });
4431      }
4432      swiper.virtual.slides.splice(slidesIndexes, 1);
4433      if (slidesIndexes < activeIndex) activeIndex -= 1;
4434      activeIndex = Math.max(activeIndex, 0);
4435    }
4436    update2(true);
4437    swiper.slideTo(activeIndex, 0);
4438  }
4439  function removeAllSlides2() {
4440    swiper.virtual.slides = [];
4441    if (swiper.params.virtual.cache) {
4442      swiper.virtual.cache = {};
4443    }
4444    update2(true);
4445    swiper.slideTo(0, 0);
4446  }
4447  on("beforeInit", () => {
4448    if (!swiper.params.virtual.enabled) return;
4449    let domSlidesAssigned;
4450    if (typeof swiper.passedParams.virtual.slides === "undefined") {
4451      const slides = [...swiper.slidesEl.children].filter((el) => el.matches(`.${swiper.params.slideClass}, swiper-slide`));
4452      if (slides && slides.length) {
4453        swiper.virtual.slides = [...slides];
4454        domSlidesAssigned = true;
4455        slides.forEach((slideEl, slideIndex) => {
4456          slideEl.setAttribute("data-swiper-slide-index", slideIndex);
4457          swiper.virtual.cache[slideIndex] = slideEl;
4458          slideEl.remove();
4459        });
4460      }
4461    }
4462    if (!domSlidesAssigned) {
4463      swiper.virtual.slides = swiper.params.virtual.slides;
4464    }
4465    swiper.classNames.push(`${swiper.params.containerModifierClass}virtual`);
4466    swiper.params.watchSlidesProgress = true;
4467    swiper.originalParams.watchSlidesProgress = true;
4468    update2(false, true);
4469  });
4470  on("setTranslate", () => {
4471    if (!swiper.params.virtual.enabled) return;
4472    if (swiper.params.cssMode && !swiper._immediateVirtual) {
4473      clearTimeout(cssModeTimeout);
4474      cssModeTimeout = setTimeout(() => {
4475        update2();
4476      }, 100);
4477    } else {
4478      update2();
4479    }
4480  });
4481  on("init update resize", () => {
4482    if (!swiper.params.virtual.enabled) return;
4483    if (swiper.params.cssMode) {
4484      setCSSProperty(swiper.wrapperEl, "--swiper-virtual-size", `${swiper.virtualSize}px`);
4485    }
4486  });
4487  Object.assign(swiper.virtual, {
4488    appendSlide: appendSlide2,
4489    prependSlide: prependSlide2,
4490    removeSlide: removeSlide2,
4491    removeAllSlides: removeAllSlides2,
4492    update: update2
4493  });
4494}
4495function Keyboard(_ref) {
4496  let {
4497    swiper,
4498    extendParams,
4499    on,
4500    emit
4501  } = _ref;
4502  const document2 = getDocument();
4503  const window2 = getWindow();
4504  swiper.keyboard = {
4505    enabled: false
4506  };
4507  extendParams({
4508    keyboard: {
4509      enabled: false,
4510      onlyInViewport: true,
4511      pageUpDown: true
4512    }
4513  });
4514  function handle(event2) {
4515    if (!swiper.enabled) return;
4516    const {
4517      rtlTranslate: rtl
4518    } = swiper;
4519    let e = event2;
4520    if (e.originalEvent) e = e.originalEvent;
4521    const kc = e.keyCode || e.charCode;
4522    const pageUpDown = swiper.params.keyboard.pageUpDown;
4523    const isPageUp = pageUpDown && kc === 33;
4524    const isPageDown = pageUpDown && kc === 34;
4525    const isArrowLeft = kc === 37;
4526    const isArrowRight = kc === 39;
4527    const isArrowUp = kc === 38;
4528    const isArrowDown = kc === 40;
4529    if (!swiper.allowSlideNext && (swiper.isHorizontal() && isArrowRight || swiper.isVertical() && isArrowDown || isPageDown)) {
4530      return false;
4531    }
4532    if (!swiper.allowSlidePrev && (swiper.isHorizontal() && isArrowLeft || swiper.isVertical() && isArrowUp || isPageUp)) {
4533      return false;
4534    }
4535    if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) {
4536      return void 0;
4537    }
4538    if (document2.activeElement && document2.activeElement.nodeName && (document2.activeElement.nodeName.toLowerCase() === "input" || document2.activeElement.nodeName.toLowerCase() === "textarea")) {
4539      return void 0;
4540    }
4541    if (swiper.params.keyboard.onlyInViewport && (isPageUp || isPageDown || isArrowLeft || isArrowRight || isArrowUp || isArrowDown)) {
4542      let inView = false;
4543      if (elementParents(swiper.el, `.${swiper.params.slideClass}, swiper-slide`).length > 0 && elementParents(swiper.el, `.${swiper.params.slideActiveClass}`).length === 0) {
4544        return void 0;
4545      }
4546      const el = swiper.el;
4547      const swiperWidth = el.clientWidth;
4548      const swiperHeight = el.clientHeight;
4549      const windowWidth = window2.innerWidth;
4550      const windowHeight = window2.innerHeight;
4551      const swiperOffset = elementOffset(el);
4552      if (rtl) swiperOffset.left -= el.scrollLeft;
4553      const swiperCoord = [[swiperOffset.left, swiperOffset.top], [swiperOffset.left + swiperWidth, swiperOffset.top], [swiperOffset.left, swiperOffset.top + swiperHeight], [swiperOffset.left + swiperWidth, swiperOffset.top + swiperHeight]];
4554      for (let i = 0; i < swiperCoord.length; i += 1) {
4555        const point = swiperCoord[i];
4556        if (point[0] >= 0 && point[0] <= windowWidth && point[1] >= 0 && point[1] <= windowHeight) {
4557          if (point[0] === 0 && point[1] === 0) continue;
4558          inView = true;
4559        }
4560      }
4561      if (!inView) return void 0;
4562    }
4563    if (swiper.isHorizontal()) {
4564      if (isPageUp || isPageDown || isArrowLeft || isArrowRight) {
4565        if (e.preventDefault) e.preventDefault();
4566        else e.returnValue = false;
4567      }
4568      if ((isPageDown || isArrowRight) && !rtl || (isPageUp || isArrowLeft) && rtl) swiper.slideNext();
4569      if ((isPageUp || isArrowLeft) && !rtl || (isPageDown || isArrowRight) && rtl) swiper.slidePrev();
4570    } else {
4571      if (isPageUp || isPageDown || isArrowUp || isArrowDown) {
4572        if (e.preventDefault) e.preventDefault();
4573        else e.returnValue = false;
4574      }
4575      if (isPageDown || isArrowDown) swiper.slideNext();
4576      if (isPageUp || isArrowUp) swiper.slidePrev();
4577    }
4578    emit("keyPress", kc);
4579    return void 0;
4580  }
4581  function enable() {
4582    if (swiper.keyboard.enabled) return;
4583    document2.addEventListener("keydown", handle);
4584    swiper.keyboard.enabled = true;
4585  }
4586  function disable() {
4587    if (!swiper.keyboard.enabled) return;
4588    document2.removeEventListener("keydown", handle);
4589    swiper.keyboard.enabled = false;
4590  }
4591  on("init", () => {
4592    if (swiper.params.keyboard.enabled) {
4593      enable();
4594    }
4595  });
4596  on("destroy", () => {
4597    if (swiper.keyboard.enabled) {
4598      disable();
4599    }
4600  });
4601  Object.assign(swiper.keyboard, {
4602    enable,
4603    disable
4604  });
4605}
4606function Mousewheel(_ref) {
4607  let {
4608    swiper,
4609    extendParams,
4610    on,
4611    emit
4612  } = _ref;
4613  const window2 = getWindow();
4614  extendParams({
4615    mousewheel: {
4616      enabled: false,
4617      releaseOnEdges: false,
4618      invert: false,
vendor: 12,648 bytes, lines 4619-4998
4619      forceToAxis: false,
4620      sensitivity: 1,
4621      eventsTarget: "container",
4622      thresholdDelta: null,
4623      thresholdTime: null,
4624      noMousewheelClass: "swiper-no-mousewheel"
4625    }
4626  });
4627  swiper.mousewheel = {
4628    enabled: false
4629  };
4630  let timeout;
4631  let lastScrollTime = now();
4632  let lastEventBeforeSnap;
4633  const recentWheelEvents = [];
4634  function normalize(e) {
4635    const PIXEL_STEP = 10;
4636    const LINE_HEIGHT = 40;
4637    const PAGE_HEIGHT = 800;
4638    let sX = 0;
4639    let sY = 0;
4640    let pX = 0;
4641    let pY = 0;
4642    if ("detail" in e) {
4643      sY = e.detail;
4644    }
4645    if ("wheelDelta" in e) {
4646      sY = -e.wheelDelta / 120;
4647    }
4648    if ("wheelDeltaY" in e) {
4649      sY = -e.wheelDeltaY / 120;
4650    }
4651    if ("wheelDeltaX" in e) {
4652      sX = -e.wheelDeltaX / 120;
4653    }
4654    if ("axis" in e && e.axis === e.HORIZONTAL_AXIS) {
4655      sX = sY;
4656      sY = 0;
4657    }
4658    pX = sX * PIXEL_STEP;
4659    pY = sY * PIXEL_STEP;
4660    if ("deltaY" in e) {
4661      pY = e.deltaY;
4662    }
4663    if ("deltaX" in e) {
4664      pX = e.deltaX;
4665    }
4666    if (e.shiftKey && !pX) {
4667      pX = pY;
4668      pY = 0;
4669    }
4670    if ((pX || pY) && e.deltaMode) {
4671      if (e.deltaMode === 1) {
4672        pX *= LINE_HEIGHT;
4673        pY *= LINE_HEIGHT;
4674      } else {
4675        pX *= PAGE_HEIGHT;
4676        pY *= PAGE_HEIGHT;
4677      }
4678    }
4679    if (pX && !sX) {
4680      sX = pX < 1 ? -1 : 1;
4681    }
4682    if (pY && !sY) {
4683      sY = pY < 1 ? -1 : 1;
4684    }
4685    return {
4686      spinX: sX,
4687      spinY: sY,
4688      pixelX: pX,
4689      pixelY: pY
4690    };
4691  }
4692  function handleMouseEnter() {
4693    if (!swiper.enabled) return;
4694    swiper.mouseEntered = true;
4695  }
4696  function handleMouseLeave() {
4697    if (!swiper.enabled) return;
4698    swiper.mouseEntered = false;
4699  }
4700  function animateSlider(newEvent) {
4701    if (swiper.params.mousewheel.thresholdDelta && newEvent.delta < swiper.params.mousewheel.thresholdDelta) {
4702      return false;
4703    }
4704    if (swiper.params.mousewheel.thresholdTime && now() - lastScrollTime < swiper.params.mousewheel.thresholdTime) {
4705      return false;
4706    }
4707    if (newEvent.delta >= 6 && now() - lastScrollTime < 60) {
4708      return true;
4709    }
4710    if (newEvent.direction < 0) {
4711      if ((!swiper.isEnd || swiper.params.loop) && !swiper.animating) {
4712        swiper.slideNext();
4713        emit("scroll", newEvent.raw);
4714      }
4715    } else if ((!swiper.isBeginning || swiper.params.loop) && !swiper.animating) {
4716      swiper.slidePrev();
4717      emit("scroll", newEvent.raw);
4718    }
4719    lastScrollTime = new window2.Date().getTime();
4720    return false;
4721  }
4722  function releaseScroll(newEvent) {
4723    const params = swiper.params.mousewheel;
4724    if (newEvent.direction < 0) {
4725      if (swiper.isEnd && !swiper.params.loop && params.releaseOnEdges) {
4726        return true;
4727      }
4728    } else if (swiper.isBeginning && !swiper.params.loop && params.releaseOnEdges) {
4729      return true;
4730    }
4731    return false;
4732  }
4733  function handle(event2) {
4734    let e = event2;
4735    let disableParentSwiper = true;
4736    if (!swiper.enabled) return;
4737    if (event2.target.closest(`.${swiper.params.mousewheel.noMousewheelClass}`)) return;
4738    const params = swiper.params.mousewheel;
4739    if (swiper.params.cssMode) {
4740      e.preventDefault();
4741    }
4742    let targetEl = swiper.el;
4743    if (swiper.params.mousewheel.eventsTarget !== "container") {
4744      targetEl = document.querySelector(swiper.params.mousewheel.eventsTarget);
4745    }
4746    const targetElContainsTarget = targetEl && targetEl.contains(e.target);
4747    if (!swiper.mouseEntered && !targetElContainsTarget && !params.releaseOnEdges) return true;
4748    if (e.originalEvent) e = e.originalEvent;
4749    let delta = 0;
4750    const rtlFactor = swiper.rtlTranslate ? -1 : 1;
4751    const data = normalize(e);
4752    if (params.forceToAxis) {
4753      if (swiper.isHorizontal()) {
4754        if (Math.abs(data.pixelX) > Math.abs(data.pixelY)) delta = -data.pixelX * rtlFactor;
4755        else return true;
4756      } else if (Math.abs(data.pixelY) > Math.abs(data.pixelX)) delta = -data.pixelY;
4757      else return true;
4758    } else {
4759      delta = Math.abs(data.pixelX) > Math.abs(data.pixelY) ? -data.pixelX * rtlFactor : -data.pixelY;
4760    }
4761    if (delta === 0) return true;
4762    if (params.invert) delta = -delta;
4763    let positions = swiper.getTranslate() + delta * params.sensitivity;
4764    if (positions >= swiper.minTranslate()) positions = swiper.minTranslate();
4765    if (positions <= swiper.maxTranslate()) positions = swiper.maxTranslate();
4766    disableParentSwiper = swiper.params.loop ? true : !(positions === swiper.minTranslate() || positions === swiper.maxTranslate());
4767    if (disableParentSwiper && swiper.params.nested) e.stopPropagation();
4768    if (!swiper.params.freeMode || !swiper.params.freeMode.enabled) {
4769      const newEvent = {
4770        time: now(),
4771        delta: Math.abs(delta),
4772        direction: Math.sign(delta),
4773        raw: event2
4774      };
4775      if (recentWheelEvents.length >= 2) {
4776        recentWheelEvents.shift();
4777      }
4778      const prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : void 0;
4779      recentWheelEvents.push(newEvent);
4780      if (prevEvent) {
4781        if (newEvent.direction !== prevEvent.direction || newEvent.delta > prevEvent.delta || newEvent.time > prevEvent.time + 150) {
4782          animateSlider(newEvent);
4783        }
4784      } else {
4785        animateSlider(newEvent);
4786      }
4787      if (releaseScroll(newEvent)) {
4788        return true;
4789      }
4790    } else {
4791      const newEvent = {
4792        time: now(),
4793        delta: Math.abs(delta),
4794        direction: Math.sign(delta)
4795      };
4796      const ignoreWheelEvents = lastEventBeforeSnap && newEvent.time < lastEventBeforeSnap.time + 500 && newEvent.delta <= lastEventBeforeSnap.delta && newEvent.direction === lastEventBeforeSnap.direction;
4797      if (!ignoreWheelEvents) {
4798        lastEventBeforeSnap = void 0;
4799        let position = swiper.getTranslate() + delta * params.sensitivity;
4800        const wasBeginning = swiper.isBeginning;
4801        const wasEnd = swiper.isEnd;
4802        if (position >= swiper.minTranslate()) position = swiper.minTranslate();
4803        if (position <= swiper.maxTranslate()) position = swiper.maxTranslate();
4804        swiper.setTransition(0);
4805        swiper.setTranslate(position);
4806        swiper.updateProgress();
4807        swiper.updateActiveIndex();
4808        swiper.updateSlidesClasses();
4809        if (!wasBeginning && swiper.isBeginning || !wasEnd && swiper.isEnd) {
4810          swiper.updateSlidesClasses();
4811        }
4812        if (swiper.params.loop) {
4813          swiper.loopFix({
4814            direction: newEvent.direction < 0 ? "next" : "prev",
4815            byMousewheel: true
4816          });
4817        }
4818        if (swiper.params.freeMode.sticky) {
4819          clearTimeout(timeout);
4820          timeout = void 0;
4821          if (recentWheelEvents.length >= 15) {
4822            recentWheelEvents.shift();
4823          }
4824          const prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : void 0;
4825          const firstEvent = recentWheelEvents[0];
4826          recentWheelEvents.push(newEvent);
4827          if (prevEvent && (newEvent.delta > prevEvent.delta || newEvent.direction !== prevEvent.direction)) {
4828            recentWheelEvents.splice(0);
4829          } else if (recentWheelEvents.length >= 15 && newEvent.time - firstEvent.time < 500 && firstEvent.delta - newEvent.delta >= 1 && newEvent.delta <= 6) {
4830            const snapToThreshold = delta > 0 ? 0.8 : 0.2;
4831            lastEventBeforeSnap = newEvent;
4832            recentWheelEvents.splice(0);
4833            timeout = nextTick(() => {
4834              if (swiper.destroyed || !swiper.params) return;
4835              swiper.slideToClosest(swiper.params.speed, true, void 0, snapToThreshold);
4836            }, 0);
4837          }
4838          if (!timeout) {
4839            timeout = nextTick(() => {
4840              if (swiper.destroyed || !swiper.params) return;
4841              const snapToThreshold = 0.5;
4842              lastEventBeforeSnap = newEvent;
4843              recentWheelEvents.splice(0);
4844              swiper.slideToClosest(swiper.params.speed, true, void 0, snapToThreshold);
4845            }, 500);
4846          }
4847        }
4848        if (!ignoreWheelEvents) emit("scroll", e);
4849        if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction) swiper.autoplay.stop();
4850        if (params.releaseOnEdges && (position === swiper.minTranslate() || position === swiper.maxTranslate())) {
4851          return true;
4852        }
4853      }
4854    }
4855    if (e.preventDefault) e.preventDefault();
4856    else e.returnValue = false;
4857    return false;
4858  }
4859  function events2(method) {
4860    let targetEl = swiper.el;
4861    if (swiper.params.mousewheel.eventsTarget !== "container") {
4862      targetEl = document.querySelector(swiper.params.mousewheel.eventsTarget);
4863    }
4864    targetEl[method]("mouseenter", handleMouseEnter);
4865    targetEl[method]("mouseleave", handleMouseLeave);
4866    targetEl[method]("wheel", handle);
4867  }
4868  function enable() {
4869    if (swiper.params.cssMode) {
4870      swiper.wrapperEl.removeEventListener("wheel", handle);
4871      return true;
4872    }
4873    if (swiper.mousewheel.enabled) return false;
4874    events2("addEventListener");
4875    swiper.mousewheel.enabled = true;
4876    return true;
4877  }
4878  function disable() {
4879    if (swiper.params.cssMode) {
4880      swiper.wrapperEl.addEventListener(event, handle);
4881      return true;
4882    }
4883    if (!swiper.mousewheel.enabled) return false;
4884    events2("removeEventListener");
4885    swiper.mousewheel.enabled = false;
4886    return true;
4887  }
4888  on("init", () => {
4889    if (!swiper.params.mousewheel.enabled && swiper.params.cssMode) {
4890      disable();
4891    }
4892    if (swiper.params.mousewheel.enabled) enable();
4893  });
4894  on("destroy", () => {
4895    if (swiper.params.cssMode) {
4896      enable();
4897    }
4898    if (swiper.mousewheel.enabled) disable();
4899  });
4900  Object.assign(swiper.mousewheel, {
4901    enable,
4902    disable
4903  });
4904}
4905function createElementIfNotDefined(swiper, originalParams, params, checkProps) {
4906  if (swiper.params.createElements) {
4907    Object.keys(checkProps).forEach((key) => {
4908      if (!params[key] && params.auto === true) {
4909        let element = elementChildren(swiper.el, `.${checkProps[key]}`)[0];
4910        if (!element) {
4911          element = createElement("div", checkProps[key]);
4912          element.className = checkProps[key];
4913          swiper.el.append(element);
4914        }
4915        params[key] = element;
4916        originalParams[key] = element;
4917      }
4918    });
4919  }
4920  return params;
4921}
4922function Navigation(_ref) {
4923  let {
4924    swiper,
4925    extendParams,
4926    on,
4927    emit
4928  } = _ref;
4929  extendParams({
4930    navigation: {
4931      nextEl: null,
4932      prevEl: null,
4933      hideOnClick: false,
4934      disabledClass: "swiper-button-disabled",
4935      hiddenClass: "swiper-button-hidden",
4936      lockClass: "swiper-button-lock",
4937      navigationDisabledClass: "swiper-navigation-disabled"
4938    }
4939  });
4940  swiper.navigation = {
4941    nextEl: null,
4942    prevEl: null
4943  };
4944  function getEl(el) {
4945    let res;
4946    if (el && typeof el === "string" && swiper.isElement) {
4947      res = swiper.el.querySelector(el) || swiper.hostEl.querySelector(el);
4948      if (res) return res;
4949    }
4950    if (el) {
4951      if (typeof el === "string") res = [...document.querySelectorAll(el)];
4952      if (swiper.params.uniqueNavElements && typeof el === "string" && res && res.length > 1 && swiper.el.querySelectorAll(el).length === 1) {
4953        res = swiper.el.querySelector(el);
4954      } else if (res && res.length === 1) {
4955        res = res[0];
4956      }
4957    }
4958    if (el && !res) return el;
4959    return res;
4960  }
4961  function toggleEl(el, disabled) {
4962    const params = swiper.params.navigation;
4963    el = makeElementsArray(el);
4964    el.forEach((subEl) => {
4965      if (subEl) {
4966        subEl.classList[disabled ? "add" : "remove"](...params.disabledClass.split(" "));
4967        if (subEl.tagName === "BUTTON") subEl.disabled = disabled;
4968        if (swiper.params.watchOverflow && swiper.enabled) {
4969          subEl.classList[swiper.isLocked ? "add" : "remove"](params.lockClass);
4970        }
4971      }
4972    });
4973  }
4974  function update2() {
4975    const {
4976      nextEl,
4977      prevEl
4978    } = swiper.navigation;
4979    if (swiper.params.loop) {
4980      toggleEl(prevEl, false);
4981      toggleEl(nextEl, false);
4982      return;
4983    }
4984    toggleEl(prevEl, swiper.isBeginning && !swiper.params.rewind);
4985    toggleEl(nextEl, swiper.isEnd && !swiper.params.rewind);
4986  }
4987  function onPrevClick(e) {
4988    e.preventDefault();
4989    if (swiper.isBeginning && !swiper.params.loop && !swiper.params.rewind) return;
4990    swiper.slidePrev();
4991    emit("navigationPrev");
4992  }
4993  function onNextClick(e) {
4994    e.preventDefault();
4995    if (swiper.isEnd && !swiper.params.loop && !swiper.params.rewind) return;
4996    swiper.slideNext();
4997    emit("navigationNext");
4998  }
4999  function init() {
5000    const params = swiper.params.navigation;
5001    swiper.params.navigation = createElementIfNotDefined(swiper, swiper.originalParams.navigation, swiper.params.navigation, {
5002      nextEl: "swiper-button-next",
5003      prevEl: "swiper-button-prev"
5004    });
5005    if (!(params.nextEl || params.prevEl)) return;
5006    let nextEl = getEl(params.nextEl);
5007    let prevEl = getEl(params.prevEl);
5008    Object.assign(swiper.navigation, {
5009      nextEl,
5010      prevEl
5011    });
5012    nextEl = makeElementsArray(nextEl);
5013    prevEl = makeElementsArray(prevEl);
5014    const initButton = (el, dir) => {
5015      if (el) {
5016        el.addEventListener("click", dir === "next" ? onNextClick : onPrevClick);
5017      }
5018      if (!swiper.enabled && el) {
5019        el.classList.add(...params.lockClass.split(" "));
5020      }
5021    };
5022    nextEl.forEach((el) => initButton(el, "next"));
5023    prevEl.forEach((el) => initButton(el, "prev"));
5024  }
5025  function destroy() {
5026    let {
5027      nextEl,
5028      prevEl
5029    } = swiper.navigation;
5030    nextEl = makeElementsArray(nextEl);
5031    prevEl = makeElementsArray(prevEl);
5032    const destroyButton = (el, dir) => {
5033      el.removeEventListener("click", dir === "next" ? onNextClick : onPrevClick);
5034      el.classList.remove(...swiper.params.navigation.disabledClass.split(" "));
5035    };
5036    nextEl.forEach((el) => destroyButton(el, "next"));
5037    prevEl.forEach((el) => destroyButton(el, "prev"));
5038  }
5039  on("init", () => {
5040    if (swiper.params.navigation.enabled === false) {
5041      disable();
5042    } else {
5043      init();
5044      update2();
5045    }
5046  });
5047  on("toEdge fromEdge lock unlock", () => {
5048    update2();
5049  });
5050  on("destroy", () => {
5051    destroy();
5052  });
5053  on("enable disable", () => {
5054    let {
5055      nextEl,
5056      prevEl
5057    } = swiper.navigation;
5058    nextEl = makeElementsArray(nextEl);
5059    prevEl = makeElementsArray(prevEl);
5060    if (swiper.enabled) {
5061      update2();
5062      return;
5063    }
5064    [...nextEl, ...prevEl].filter((el) => !!el).forEach((el) => el.classList.add(swiper.params.navigation.lockClass));
5065  });
5066  on("click", (_s, e) => {
5067    let {
5068      nextEl,
5069      prevEl
5070    } = swiper.navigation;
5071    nextEl = makeElementsArray(nextEl);
5072    prevEl = makeElementsArray(prevEl);
5073    const targetEl = e.target;
5074    let targetIsButton = prevEl.includes(targetEl) || nextEl.includes(targetEl);
5075    if (swiper.isElement && !targetIsButton) {
5076      const path = e.path || e.composedPath && e.composedPath();
5077      if (path) {
5078        targetIsButton = path.find((pathEl) => nextEl.includes(pathEl) || prevEl.includes(pathEl));
5079      }
5080    }
5081    if (swiper.params.navigation.hideOnClick && !targetIsButton) {
5082      if (swiper.pagination && swiper.params.pagination && swiper.params.pagination.clickable && (swiper.pagination.el === targetEl || swiper.pagination.el.contains(targetEl))) return;
5083      let isHidden;
5084      if (nextEl.length) {
5085        isHidden = nextEl[0].classList.contains(swiper.params.navigation.hiddenClass);
5086      } else if (prevEl.length) {
5087        isHidden = prevEl[0].classList.contains(swiper.params.navigation.hiddenClass);
5088      }
5089      if (isHidden === true) {
5090        emit("navigationShow");
5091      } else {
5092        emit("navigationHide");
5093      }
5094      [...nextEl, ...prevEl].filter((el) => !!el).forEach((el) => el.classList.toggle(swiper.params.navigation.hiddenClass));
5095    }
5096  });
5097  const enable = () => {
5098    swiper.el.classList.remove(...swiper.params.navigation.navigationDisabledClass.split(" "));
5099    init();
5100    update2();
5101  };
5102  const disable = () => {
5103    swiper.el.classList.add(...swiper.params.navigation.navigationDisabledClass.split(" "));
5104    destroy();
5105  };
5106  Object.assign(swiper.navigation, {
5107    enable,
5108    disable,
5109    update: update2,
5110    init,
5111    destroy
5112  });
5113}
5114function classesToSelector(classes2) {
5115  if (classes2 === void 0) {
5116    classes2 = "";
5117  }
5118  return `.${classes2.trim().replace(/([\.:!+\/])/g, "\\$1").replace(/ /g, ".")}`;
5119}
5120function Pagination(_ref) {
5121  let {
5122    swiper,
5123    extendParams,
5124    on,
5125    emit
5126  } = _ref;
5127  const pfx = "swiper-pagination";
5128  extendParams({
5129    pagination: {
5130      el: null,
5131      bulletElement: "span",
5132      clickable: false,
5133      hideOnClick: false,
5134      renderBullet: null,
5135      renderProgressbar: null,
5136      renderFraction: null,
5137      renderCustom: null,
5138      progressbarOpposite: false,
5139      type: "bullets",
5140      // 'bullets' or 'progressbar' or 'fraction' or 'custom'
5141      dynamicBullets: false,
5142      dynamicMainBullets: 1,
5143      formatFractionCurrent: (number) => number,
5144      formatFractionTotal: (number) => number,
5145      bulletClass: `${pfx}-bullet`,
5146      bulletActiveClass: `${pfx}-bullet-active`,
5147      modifierClass: `${pfx}-`,
5148      currentClass: `${pfx}-current`,
5149      totalClass: `${pfx}-total`,
5150      hiddenClass: `${pfx}-hidden`,
5151      progressbarFillClass: `${pfx}-progressbar-fill`,
5152      progressbarOppositeClass: `${pfx}-progressbar-opposite`,
5153      clickableClass: `${pfx}-clickable`,
5154      lockClass: `${pfx}-lock`,
5155      horizontalClass: `${pfx}-horizontal`,
5156      verticalClass: `${pfx}-vertical`,
5157      paginationDisabledClass: `${pfx}-disabled`
5158    }
5159  });
5160  swiper.pagination = {
5161    el: null,
5162    bullets: []
5163  };
5164  let bulletSize;
5165  let dynamicBulletIndex = 0;
5166  function isPaginationDisabled() {
5167    return !swiper.params.pagination.el || !swiper.pagination.el || Array.isArray(swiper.pagination.el) && swiper.pagination.el.length === 0;
5168  }
5169  function setSideBullets(bulletEl, position) {
5170    const {
5171      bulletActiveClass
5172    } = swiper.params.pagination;
5173    if (!bulletEl) return;
5174    bulletEl = bulletEl[`${position === "prev" ? "previous" : "next"}ElementSibling`];
5175    if (bulletEl) {
5176      bulletEl.classList.add(`${bulletActiveClass}-${position}`);
5177      bulletEl = bulletEl[`${position === "prev" ? "previous" : "next"}ElementSibling`];
5178      if (bulletEl) {
5179        bulletEl.classList.add(`${bulletActiveClass}-${position}-${position}`);
5180      }
5181    }
5182  }
5183  function getMoveDirection(prevIndex, nextIndex, length) {
5184    prevIndex = prevIndex % length;
5185    nextIndex = nextIndex % length;
5186    if (nextIndex === prevIndex + 1) {
5187      return "next";
5188    } else if (nextIndex === prevIndex - 1) {
5189      return "previous";
5190    }
5191    return;
5192  }
5193  function onBulletClick(e) {
5194    const bulletEl = e.target.closest(classesToSelector(swiper.params.pagination.bulletClass));
5195    if (!bulletEl) {
5196      return;
5197    }
5198    e.preventDefault();
5199    const index = elementIndex(bulletEl) * swiper.params.slidesPerGroup;
5200    if (swiper.params.loop) {
5201      if (swiper.realIndex === index) return;
5202      const moveDirection = getMoveDirection(swiper.realIndex, index, swiper.slides.length);
5203      if (moveDirection === "next") {
5204        swiper.slideNext();
5205      } else if (moveDirection === "previous") {
5206        swiper.slidePrev();
5207      } else {
5208        swiper.slideToLoop(index);
5209      }
5210    } else {
5211      swiper.slideTo(index);
5212    }
5213  }
5214  function update2() {
5215    const rtl = swiper.rtl;
5216    const params = swiper.params.pagination;
5217    if (isPaginationDisabled()) return;
5218    let el = swiper.pagination.el;
5219    el = makeElementsArray(el);
vendor: 13,901 bytes, lines 5220-5575
5220    let current;
5221    let previousIndex;
5222    const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;
5223    const total = swiper.params.loop ? Math.ceil(slidesLength / swiper.params.slidesPerGroup) : swiper.snapGrid.length;
5224    if (swiper.params.loop) {
5225      previousIndex = swiper.previousRealIndex || 0;
5226      current = swiper.params.slidesPerGroup > 1 ? Math.floor(swiper.realIndex / swiper.params.slidesPerGroup) : swiper.realIndex;
5227    } else if (typeof swiper.snapIndex !== "undefined") {
5228      current = swiper.snapIndex;
5229      previousIndex = swiper.previousSnapIndex;
5230    } else {
5231      previousIndex = swiper.previousIndex || 0;
5232      current = swiper.activeIndex || 0;
5233    }
5234    if (params.type === "bullets" && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) {
5235      const bullets = swiper.pagination.bullets;
5236      let firstIndex;
5237      let lastIndex;
5238      let midIndex;
5239      if (params.dynamicBullets) {
5240        bulletSize = elementOuterSize(bullets[0], swiper.isHorizontal() ? "width" : "height");
5241        el.forEach((subEl) => {
5242          subEl.style[swiper.isHorizontal() ? "width" : "height"] = `${bulletSize * (params.dynamicMainBullets + 4)}px`;
5243        });
5244        if (params.dynamicMainBullets > 1 && previousIndex !== void 0) {
5245          dynamicBulletIndex += current - (previousIndex || 0);
5246          if (dynamicBulletIndex > params.dynamicMainBullets - 1) {
5247            dynamicBulletIndex = params.dynamicMainBullets - 1;
5248          } else if (dynamicBulletIndex < 0) {
5249            dynamicBulletIndex = 0;
5250          }
5251        }
5252        firstIndex = Math.max(current - dynamicBulletIndex, 0);
5253        lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1);
5254        midIndex = (lastIndex + firstIndex) / 2;
5255      }
5256      bullets.forEach((bulletEl) => {
5257        const classesToRemove = [...["", "-next", "-next-next", "-prev", "-prev-prev", "-main"].map((suffix) => `${params.bulletActiveClass}${suffix}`)].map((s) => typeof s === "string" && s.includes(" ") ? s.split(" ") : s).flat();
5258        bulletEl.classList.remove(...classesToRemove);
5259      });
5260      if (el.length > 1) {
5261        bullets.forEach((bullet) => {
5262          const bulletIndex = elementIndex(bullet);
5263          if (bulletIndex === current) {
5264            bullet.classList.add(...params.bulletActiveClass.split(" "));
5265          } else if (swiper.isElement) {
5266            bullet.setAttribute("part", "bullet");
5267          }
5268          if (params.dynamicBullets) {
5269            if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) {
5270              bullet.classList.add(...`${params.bulletActiveClass}-main`.split(" "));
5271            }
5272            if (bulletIndex === firstIndex) {
5273              setSideBullets(bullet, "prev");
5274            }
5275            if (bulletIndex === lastIndex) {
5276              setSideBullets(bullet, "next");
5277            }
5278          }
5279        });
5280      } else {
5281        const bullet = bullets[current];
5282        if (bullet) {
5283          bullet.classList.add(...params.bulletActiveClass.split(" "));
5284        }
5285        if (swiper.isElement) {
5286          bullets.forEach((bulletEl, bulletIndex) => {
5287            bulletEl.setAttribute("part", bulletIndex === current ? "bullet-active" : "bullet");
5288          });
5289        }
5290        if (params.dynamicBullets) {
5291          const firstDisplayedBullet = bullets[firstIndex];
5292          const lastDisplayedBullet = bullets[lastIndex];
5293          for (let i = firstIndex; i <= lastIndex; i += 1) {
5294            if (bullets[i]) {
5295              bullets[i].classList.add(...`${params.bulletActiveClass}-main`.split(" "));
5296            }
5297          }
5298          setSideBullets(firstDisplayedBullet, "prev");
5299          setSideBullets(lastDisplayedBullet, "next");
5300        }
5301      }
5302      if (params.dynamicBullets) {
5303        const dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4);
5304        const bulletsOffset = (bulletSize * dynamicBulletsLength - bulletSize) / 2 - midIndex * bulletSize;
5305        const offsetProp = rtl ? "right" : "left";
5306        bullets.forEach((bullet) => {
5307          bullet.style[swiper.isHorizontal() ? offsetProp : "top"] = `${bulletsOffset}px`;
5308        });
5309      }
5310    }
5311    el.forEach((subEl, subElIndex) => {
5312      if (params.type === "fraction") {
5313        subEl.querySelectorAll(classesToSelector(params.currentClass)).forEach((fractionEl) => {
5314          fractionEl.textContent = params.formatFractionCurrent(current + 1);
5315        });
5316        subEl.querySelectorAll(classesToSelector(params.totalClass)).forEach((totalEl) => {
5317          totalEl.textContent = params.formatFractionTotal(total);
5318        });
5319      }
5320      if (params.type === "progressbar") {
5321        let progressbarDirection;
5322        if (params.progressbarOpposite) {
5323          progressbarDirection = swiper.isHorizontal() ? "vertical" : "horizontal";
5324        } else {
5325          progressbarDirection = swiper.isHorizontal() ? "horizontal" : "vertical";
5326        }
5327        const scale = (current + 1) / total;
5328        let scaleX = 1;
5329        let scaleY = 1;
5330        if (progressbarDirection === "horizontal") {
5331          scaleX = scale;
5332        } else {
5333          scaleY = scale;
5334        }
5335        subEl.querySelectorAll(classesToSelector(params.progressbarFillClass)).forEach((progressEl) => {
5336          progressEl.style.transform = `translate3d(0,0,0) scaleX(${scaleX}) scaleY(${scaleY})`;
5337          progressEl.style.transitionDuration = `${swiper.params.speed}ms`;
5338        });
5339      }
5340      if (params.type === "custom" && params.renderCustom) {
5341        subEl.innerHTML = params.renderCustom(swiper, current + 1, total);
5342        if (subElIndex === 0) emit("paginationRender", subEl);
5343      } else {
5344        if (subElIndex === 0) emit("paginationRender", subEl);
5345        emit("paginationUpdate", subEl);
5346      }
5347      if (swiper.params.watchOverflow && swiper.enabled) {
5348        subEl.classList[swiper.isLocked ? "add" : "remove"](params.lockClass);
5349      }
5350    });
5351  }
5352  function render() {
5353    const params = swiper.params.pagination;
5354    if (isPaginationDisabled()) return;
5355    const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.grid && swiper.params.grid.rows > 1 ? swiper.slides.length / Math.ceil(swiper.params.grid.rows) : swiper.slides.length;
5356    let el = swiper.pagination.el;
5357    el = makeElementsArray(el);
5358    let paginationHTML = "";
5359    if (params.type === "bullets") {
5360      let numberOfBullets = swiper.params.loop ? Math.ceil(slidesLength / swiper.params.slidesPerGroup) : swiper.snapGrid.length;
5361      if (swiper.params.freeMode && swiper.params.freeMode.enabled && numberOfBullets > slidesLength) {
5362        numberOfBullets = slidesLength;
5363      }
5364      for (let i = 0; i < numberOfBullets; i += 1) {
5365        if (params.renderBullet) {
5366          paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass);
5367        } else {
5368          paginationHTML += `<${params.bulletElement} ${swiper.isElement ? 'part="bullet"' : ""} class="${params.bulletClass}"></${params.bulletElement}>`;
5369        }
5370      }
5371    }
5372    if (params.type === "fraction") {
5373      if (params.renderFraction) {
5374        paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass);
5375      } else {
5376        paginationHTML = `<span class="${params.currentClass}"></span> / <span class="${params.totalClass}"></span>`;
5377      }
5378    }
5379    if (params.type === "progressbar") {
5380      if (params.renderProgressbar) {
5381        paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass);
5382      } else {
5383        paginationHTML = `<span class="${params.progressbarFillClass}"></span>`;
5384      }
5385    }
5386    swiper.pagination.bullets = [];
5387    el.forEach((subEl) => {
5388      if (params.type !== "custom") {
5389        subEl.innerHTML = paginationHTML || "";
5390      }
5391      if (params.type === "bullets") {
5392        swiper.pagination.bullets.push(...subEl.querySelectorAll(classesToSelector(params.bulletClass)));
5393      }
5394    });
5395    if (params.type !== "custom") {
5396      emit("paginationRender", el[0]);
5397    }
5398  }
5399  function init() {
5400    swiper.params.pagination = createElementIfNotDefined(swiper, swiper.originalParams.pagination, swiper.params.pagination, {
5401      el: "swiper-pagination"
5402    });
5403    const params = swiper.params.pagination;
5404    if (!params.el) return;
5405    let el;
5406    if (typeof params.el === "string" && swiper.isElement) {
5407      el = swiper.el.querySelector(params.el);
5408    }
5409    if (!el && typeof params.el === "string") {
5410      el = [...document.querySelectorAll(params.el)];
5411    }
5412    if (!el) {
5413      el = params.el;
5414    }
5415    if (!el || el.length === 0) return;
5416    if (swiper.params.uniqueNavElements && typeof params.el === "string" && Array.isArray(el) && el.length > 1) {
5417      el = [...swiper.el.querySelectorAll(params.el)];
5418      if (el.length > 1) {
5419        el = el.filter((subEl) => {
5420          if (elementParents(subEl, ".swiper")[0] !== swiper.el) return false;
5421          return true;
5422        })[0];
5423      }
5424    }
5425    if (Array.isArray(el) && el.length === 1) el = el[0];
5426    Object.assign(swiper.pagination, {
5427      el
5428    });
5429    el = makeElementsArray(el);
5430    el.forEach((subEl) => {
5431      if (params.type === "bullets" && params.clickable) {
5432        subEl.classList.add(...(params.clickableClass || "").split(" "));
5433      }
5434      subEl.classList.add(params.modifierClass + params.type);
5435      subEl.classList.add(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass);
5436      if (params.type === "bullets" && params.dynamicBullets) {
5437        subEl.classList.add(`${params.modifierClass}${params.type}-dynamic`);
5438        dynamicBulletIndex = 0;
5439        if (params.dynamicMainBullets < 1) {
5440          params.dynamicMainBullets = 1;
5441        }
5442      }
5443      if (params.type === "progressbar" && params.progressbarOpposite) {
5444        subEl.classList.add(params.progressbarOppositeClass);
5445      }
5446      if (params.clickable) {
5447        subEl.addEventListener("click", onBulletClick);
5448      }
5449      if (!swiper.enabled) {
5450        subEl.classList.add(params.lockClass);
5451      }
5452    });
5453  }
5454  function destroy() {
5455    const params = swiper.params.pagination;
5456    if (isPaginationDisabled()) return;
5457    let el = swiper.pagination.el;
5458    if (el) {
5459      el = makeElementsArray(el);
5460      el.forEach((subEl) => {
5461        subEl.classList.remove(params.hiddenClass);
5462        subEl.classList.remove(params.modifierClass + params.type);
5463        subEl.classList.remove(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass);
5464        if (params.clickable) {
5465          subEl.classList.remove(...(params.clickableClass || "").split(" "));
5466          subEl.removeEventListener("click", onBulletClick);
5467        }
5468      });
5469    }
5470    if (swiper.pagination.bullets) swiper.pagination.bullets.forEach((subEl) => subEl.classList.remove(...params.bulletActiveClass.split(" ")));
5471  }
5472  on("changeDirection", () => {
5473    if (!swiper.pagination || !swiper.pagination.el) return;
5474    const params = swiper.params.pagination;
5475    let {
5476      el
5477    } = swiper.pagination;
5478    el = makeElementsArray(el);
5479    el.forEach((subEl) => {
5480      subEl.classList.remove(params.horizontalClass, params.verticalClass);
5481      subEl.classList.add(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass);
5482    });
5483  });
5484  on("init", () => {
5485    if (swiper.params.pagination.enabled === false) {
5486      disable();
5487    } else {
5488      init();
5489      render();
5490      update2();
5491    }
5492  });
5493  on("activeIndexChange", () => {
5494    if (typeof swiper.snapIndex === "undefined") {
5495      update2();
5496    }
5497  });
5498  on("snapIndexChange", () => {
5499    update2();
5500  });
5501  on("snapGridLengthChange", () => {
5502    render();
5503    update2();
5504  });
5505  on("destroy", () => {
5506    destroy();
5507  });
5508  on("enable disable", () => {
5509    let {
5510      el
5511    } = swiper.pagination;
5512    if (el) {
5513      el = makeElementsArray(el);
5514      el.forEach((subEl) => subEl.classList[swiper.enabled ? "remove" : "add"](swiper.params.pagination.lockClass));
5515    }
5516  });
5517  on("lock unlock", () => {
5518    update2();
5519  });
5520  on("click", (_s, e) => {
5521    const targetEl = e.target;
5522    const el = makeElementsArray(swiper.pagination.el);
5523    if (swiper.params.pagination.el && swiper.params.pagination.hideOnClick && el && el.length > 0 && !targetEl.classList.contains(swiper.params.pagination.bulletClass)) {
5524      if (swiper.navigation && (swiper.navigation.nextEl && targetEl === swiper.navigation.nextEl || swiper.navigation.prevEl && targetEl === swiper.navigation.prevEl)) return;
5525      const isHidden = el[0].classList.contains(swiper.params.pagination.hiddenClass);
5526      if (isHidden === true) {
5527        emit("paginationShow");
5528      } else {
5529        emit("paginationHide");
5530      }
5531      el.forEach((subEl) => subEl.classList.toggle(swiper.params.pagination.hiddenClass));
5532    }
5533  });
5534  const enable = () => {
5535    swiper.el.classList.remove(swiper.params.pagination.paginationDisabledClass);
5536    let {
5537      el
5538    } = swiper.pagination;
5539    if (el) {
5540      el = makeElementsArray(el);
5541      el.forEach((subEl) => subEl.classList.remove(swiper.params.pagination.paginationDisabledClass));
5542    }
5543    init();
5544    render();
5545    update2();
5546  };
5547  const disable = () => {
5548    swiper.el.classList.add(swiper.params.pagination.paginationDisabledClass);
5549    let {
5550      el
5551    } = swiper.pagination;
5552    if (el) {
5553      el = makeElementsArray(el);
5554      el.forEach((subEl) => subEl.classList.add(swiper.params.pagination.paginationDisabledClass));
5555    }
5556    destroy();
5557  };
5558  Object.assign(swiper.pagination, {
5559    enable,
5560    disable,
5561    render,
5562    update: update2,
5563    init,
5564    destroy
5565  });
5566}
5567function Scrollbar(_ref) {
5568  let {
5569    swiper,
5570    extendParams,
5571    on,
5572    emit
5573  } = _ref;
5574  const document2 = getDocument();
5575  let isTouched = false;
vendor: 5,075 bytes, lines 5576-5744
5576  let timeout = null;
5577  let dragTimeout = null;
5578  let dragStartPos;
5579  let dragSize;
5580  let trackSize;
5581  let divider;
5582  extendParams({
5583    scrollbar: {
5584      el: null,
5585      dragSize: "auto",
5586      hide: false,
5587      draggable: false,
5588      snapOnRelease: true,
5589      lockClass: "swiper-scrollbar-lock",
5590      dragClass: "swiper-scrollbar-drag",
5591      scrollbarDisabledClass: "swiper-scrollbar-disabled",
5592      horizontalClass: `swiper-scrollbar-horizontal`,
5593      verticalClass: `swiper-scrollbar-vertical`
5594    }
5595  });
5596  swiper.scrollbar = {
5597    el: null,
5598    dragEl: null
5599  };
5600  function setTranslate2() {
5601    if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;
5602    const {
5603      scrollbar,
5604      rtlTranslate: rtl
5605    } = swiper;
5606    const {
5607      dragEl,
5608      el
5609    } = scrollbar;
5610    const params = swiper.params.scrollbar;
5611    const progress = swiper.params.loop ? swiper.progressLoop : swiper.progress;
5612    let newSize = dragSize;
5613    let newPos = (trackSize - dragSize) * progress;
5614    if (rtl) {
5615      newPos = -newPos;
5616      if (newPos > 0) {
5617        newSize = dragSize - newPos;
5618        newPos = 0;
5619      } else if (-newPos + dragSize > trackSize) {
5620        newSize = trackSize + newPos;
5621      }
5622    } else if (newPos < 0) {
5623      newSize = dragSize + newPos;
5624      newPos = 0;
5625    } else if (newPos + dragSize > trackSize) {
5626      newSize = trackSize - newPos;
5627    }
5628    if (swiper.isHorizontal()) {
5629      dragEl.style.transform = `translate3d(${newPos}px, 0, 0)`;
5630      dragEl.style.width = `${newSize}px`;
5631    } else {
5632      dragEl.style.transform = `translate3d(0px, ${newPos}px, 0)`;
5633      dragEl.style.height = `${newSize}px`;
5634    }
5635    if (params.hide) {
5636      clearTimeout(timeout);
5637      el.style.opacity = 1;
5638      timeout = setTimeout(() => {
5639        el.style.opacity = 0;
5640        el.style.transitionDuration = "400ms";
5641      }, 1e3);
5642    }
5643  }
5644  function setTransition2(duration) {
5645    if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;
5646    swiper.scrollbar.dragEl.style.transitionDuration = `${duration}ms`;
5647  }
5648  function updateSize2() {
5649    if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;
5650    const {
5651      scrollbar
5652    } = swiper;
5653    const {
5654      dragEl,
5655      el
5656    } = scrollbar;
5657    dragEl.style.width = "";
5658    dragEl.style.height = "";
5659    trackSize = swiper.isHorizontal() ? el.offsetWidth : el.offsetHeight;
5660    divider = swiper.size / (swiper.virtualSize + swiper.params.slidesOffsetBefore - (swiper.params.centeredSlides ? swiper.snapGrid[0] : 0));
5661    if (swiper.params.scrollbar.dragSize === "auto") {
5662      dragSize = trackSize * divider;
5663    } else {
5664      dragSize = parseInt(swiper.params.scrollbar.dragSize, 10);
5665    }
5666    if (swiper.isHorizontal()) {
5667      dragEl.style.width = `${dragSize}px`;
5668    } else {
5669      dragEl.style.height = `${dragSize}px`;
5670    }
5671    if (divider >= 1) {
5672      el.style.display = "none";
5673    } else {
5674      el.style.display = "";
5675    }
5676    if (swiper.params.scrollbar.hide) {
5677      el.style.opacity = 0;
5678    }
5679    if (swiper.params.watchOverflow && swiper.enabled) {
5680      scrollbar.el.classList[swiper.isLocked ? "add" : "remove"](swiper.params.scrollbar.lockClass);
5681    }
5682  }
5683  function getPointerPosition(e) {
5684    return swiper.isHorizontal() ? e.clientX : e.clientY;
5685  }
5686  function setDragPosition(e) {
5687    const {
5688      scrollbar,
5689      rtlTranslate: rtl
5690    } = swiper;
5691    const {
5692      el
5693    } = scrollbar;
5694    let positionRatio;
5695    positionRatio = (getPointerPosition(e) - elementOffset(el)[swiper.isHorizontal() ? "left" : "top"] - (dragStartPos !== null ? dragStartPos : dragSize / 2)) / (trackSize - dragSize);
5696    positionRatio = Math.max(Math.min(positionRatio, 1), 0);
5697    if (rtl) {
5698      positionRatio = 1 - positionRatio;
5699    }
5700    const position = swiper.minTranslate() + (swiper.maxTranslate() - swiper.minTranslate()) * positionRatio;
5701    swiper.updateProgress(position);
5702    swiper.setTranslate(position);
5703    swiper.updateActiveIndex();
5704    swiper.updateSlidesClasses();
5705  }
5706  function onDragStart(e) {
5707    const params = swiper.params.scrollbar;
5708    const {
5709      scrollbar,
5710      wrapperEl
5711    } = swiper;
5712    const {
5713      el,
5714      dragEl
5715    } = scrollbar;
5716    isTouched = true;
5717    dragStartPos = e.target === dragEl ? getPointerPosition(e) - e.target.getBoundingClientRect()[swiper.isHorizontal() ? "left" : "top"] : null;
5718    e.preventDefault();
5719    e.stopPropagation();
5720    wrapperEl.style.transitionDuration = "100ms";
5721    dragEl.style.transitionDuration = "100ms";
5722    setDragPosition(e);
5723    clearTimeout(dragTimeout);
5724    el.style.transitionDuration = "0ms";
5725    if (params.hide) {
5726      el.style.opacity = 1;
5727    }
5728    if (swiper.params.cssMode) {
5729      swiper.wrapperEl.style["scroll-snap-type"] = "none";
5730    }
5731    emit("scrollbarDragStart", e);
5732  }
5733  function onDragMove(e) {
5734    const {
5735      scrollbar,
5736      wrapperEl
5737    } = swiper;
5738    const {
5739      el,
5740      dragEl
5741    } = scrollbar;
5742    if (!isTouched) return;
5743    if (e.preventDefault && e.cancelable) e.preventDefault();
5744    else e.returnValue = false;
vendor: 6,526 bytes, lines 5745-5962
5745    setDragPosition(e);
5746    wrapperEl.style.transitionDuration = "0ms";
5747    el.style.transitionDuration = "0ms";
5748    dragEl.style.transitionDuration = "0ms";
5749    emit("scrollbarDragMove", e);
5750  }
5751  function onDragEnd(e) {
5752    const params = swiper.params.scrollbar;
5753    const {
5754      scrollbar,
5755      wrapperEl
5756    } = swiper;
5757    const {
5758      el
5759    } = scrollbar;
5760    if (!isTouched) return;
5761    isTouched = false;
5762    if (swiper.params.cssMode) {
5763      swiper.wrapperEl.style["scroll-snap-type"] = "";
5764      wrapperEl.style.transitionDuration = "";
5765    }
5766    if (params.hide) {
5767      clearTimeout(dragTimeout);
5768      dragTimeout = nextTick(() => {
5769        el.style.opacity = 0;
5770        el.style.transitionDuration = "400ms";
5771      }, 1e3);
5772    }
5773    emit("scrollbarDragEnd", e);
5774    if (params.snapOnRelease) {
5775      swiper.slideToClosest();
5776    }
5777  }
5778  function events2(method) {
5779    const {
5780      scrollbar,
5781      params
5782    } = swiper;
5783    const el = scrollbar.el;
5784    if (!el) return;
5785    const target = el;
5786    const activeListener = params.passiveListeners ? {
5787      passive: false,
5788      capture: false
5789    } : false;
5790    const passiveListener = params.passiveListeners ? {
5791      passive: true,
5792      capture: false
5793    } : false;
5794    if (!target) return;
5795    const eventMethod = method === "on" ? "addEventListener" : "removeEventListener";
5796    target[eventMethod]("pointerdown", onDragStart, activeListener);
5797    document2[eventMethod]("pointermove", onDragMove, activeListener);
5798    document2[eventMethod]("pointerup", onDragEnd, passiveListener);
5799  }
5800  function enableDraggable() {
5801    if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;
5802    events2("on");
5803  }
5804  function disableDraggable() {
5805    if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;
5806    events2("off");
5807  }
5808  function init() {
5809    const {
5810      scrollbar,
5811      el: swiperEl
5812    } = swiper;
5813    swiper.params.scrollbar = createElementIfNotDefined(swiper, swiper.originalParams.scrollbar, swiper.params.scrollbar, {
5814      el: "swiper-scrollbar"
5815    });
5816    const params = swiper.params.scrollbar;
5817    if (!params.el) return;
5818    let el;
5819    if (typeof params.el === "string" && swiper.isElement) {
5820      el = swiper.el.querySelector(params.el);
5821    }
5822    if (!el && typeof params.el === "string") {
5823      el = document2.querySelectorAll(params.el);
5824      if (!el.length) return;
5825    } else if (!el) {
5826      el = params.el;
5827    }
5828    if (swiper.params.uniqueNavElements && typeof params.el === "string" && el.length > 1 && swiperEl.querySelectorAll(params.el).length === 1) {
5829      el = swiperEl.querySelector(params.el);
5830    }
5831    if (el.length > 0) el = el[0];
5832    el.classList.add(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass);
5833    let dragEl;
5834    if (el) {
5835      dragEl = el.querySelector(classesToSelector(swiper.params.scrollbar.dragClass));
5836      if (!dragEl) {
5837        dragEl = createElement("div", swiper.params.scrollbar.dragClass);
5838        el.append(dragEl);
5839      }
5840    }
5841    Object.assign(scrollbar, {
5842      el,
5843      dragEl
5844    });
5845    if (params.draggable) {
5846      enableDraggable();
5847    }
5848    if (el) {
5849      el.classList[swiper.enabled ? "remove" : "add"](...classesToTokens(swiper.params.scrollbar.lockClass));
5850    }
5851  }
5852  function destroy() {
5853    const params = swiper.params.scrollbar;
5854    const el = swiper.scrollbar.el;
5855    if (el) {
5856      el.classList.remove(...classesToTokens(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass));
5857    }
5858    disableDraggable();
5859  }
5860  on("changeDirection", () => {
5861    if (!swiper.scrollbar || !swiper.scrollbar.el) return;
5862    const params = swiper.params.scrollbar;
5863    let {
5864      el
5865    } = swiper.scrollbar;
5866    el = makeElementsArray(el);
5867    el.forEach((subEl) => {
5868      subEl.classList.remove(params.horizontalClass, params.verticalClass);
5869      subEl.classList.add(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass);
5870    });
5871  });
5872  on("init", () => {
5873    if (swiper.params.scrollbar.enabled === false) {
5874      disable();
5875    } else {
5876      init();
5877      updateSize2();
5878      setTranslate2();
5879    }
5880  });
5881  on("update resize observerUpdate lock unlock changeDirection", () => {
5882    updateSize2();
5883  });
5884  on("setTranslate", () => {
5885    setTranslate2();
5886  });
5887  on("setTransition", (_s, duration) => {
5888    setTransition2(duration);
5889  });
5890  on("enable disable", () => {
5891    const {
5892      el
5893    } = swiper.scrollbar;
5894    if (el) {
5895      el.classList[swiper.enabled ? "remove" : "add"](...classesToTokens(swiper.params.scrollbar.lockClass));
5896    }
5897  });
5898  on("destroy", () => {
5899    destroy();
5900  });
5901  const enable = () => {
5902    swiper.el.classList.remove(...classesToTokens(swiper.params.scrollbar.scrollbarDisabledClass));
5903    if (swiper.scrollbar.el) {
5904      swiper.scrollbar.el.classList.remove(...classesToTokens(swiper.params.scrollbar.scrollbarDisabledClass));
5905    }
5906    init();
5907    updateSize2();
5908    setTranslate2();
5909  };
5910  const disable = () => {
5911    swiper.el.classList.add(...classesToTokens(swiper.params.scrollbar.scrollbarDisabledClass));
5912    if (swiper.scrollbar.el) {
5913      swiper.scrollbar.el.classList.add(...classesToTokens(swiper.params.scrollbar.scrollbarDisabledClass));
5914    }
5915    destroy();
5916  };
5917  Object.assign(swiper.scrollbar, {
5918    enable,
5919    disable,
5920    updateSize: updateSize2,
5921    setTranslate: setTranslate2,
5922    init,
5923    destroy
5924  });
5925}
5926function Parallax(_ref) {
5927  let {
5928    swiper,
5929    extendParams,
5930    on
5931  } = _ref;
5932  extendParams({
5933    parallax: {
5934      enabled: false
5935    }
5936  });
5937  const elementsSelector = "[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]";
5938  const setTransform = (el, progress) => {
5939    const {
5940      rtl
5941    } = swiper;
5942    const rtlFactor = rtl ? -1 : 1;
5943    const p = el.getAttribute("data-swiper-parallax") || "0";
5944    let x = el.getAttribute("data-swiper-parallax-x");
5945    let y = el.getAttribute("data-swiper-parallax-y");
5946    const scale = el.getAttribute("data-swiper-parallax-scale");
5947    const opacity = el.getAttribute("data-swiper-parallax-opacity");
5948    const rotate = el.getAttribute("data-swiper-parallax-rotate");
5949    if (x || y) {
5950      x = x || "0";
5951      y = y || "0";
5952    } else if (swiper.isHorizontal()) {
5953      x = p;
5954      y = "0";
5955    } else {
5956      y = p;
5957      x = "0";
5958    }
5959    if (x.indexOf("%") >= 0) {
5960      x = `${parseInt(x, 10) * progress * rtlFactor}%`;
5961    } else {
5962      x = `${x * progress * rtlFactor}px`;
5963    }
5964    if (y.indexOf("%") >= 0) {
5965      y = `${parseInt(y, 10) * progress}%`;
5966    } else {
5967      y = `${y * progress}px`;
5968    }
5969    if (typeof opacity !== "undefined" && opacity !== null) {
5970      const currentOpacity = opacity - (opacity - 1) * (1 - Math.abs(progress));
5971      el.style.opacity = currentOpacity;
5972    }
5973    let transform = `translate3d(${x}, ${y}, 0px)`;
5974    if (typeof scale !== "undefined" && scale !== null) {
5975      const currentScale = scale - (scale - 1) * (1 - Math.abs(progress));
5976      transform += ` scale(${currentScale})`;
5977    }
5978    if (rotate && typeof rotate !== "undefined" && rotate !== null) {
5979      const currentRotate = rotate * progress * -1;
5980      transform += ` rotate(${currentRotate}deg)`;
5981    }
5982    el.style.transform = transform;
5983  };
5984  const setTranslate2 = () => {
5985    const {
5986      el,
5987      slides,
5988      progress,
5989      snapGrid,
5990      isElement
5991    } = swiper;
5992    const elements = elementChildren(el, elementsSelector);
5993    if (swiper.isElement) {
5994      elements.push(...elementChildren(swiper.hostEl, elementsSelector));
5995    }
5996    elements.forEach((subEl) => {
5997      setTransform(subEl, progress);
5998    });
5999    slides.forEach((slideEl, slideIndex) => {
6000      let slideProgress = slideEl.progress;
6001      if (swiper.params.slidesPerGroup > 1 && swiper.params.slidesPerView !== "auto") {
6002        slideProgress += Math.ceil(slideIndex / 2) - progress * (snapGrid.length - 1);
6003      }
6004      slideProgress = Math.min(Math.max(slideProgress, -1), 1);
6005      slideEl.querySelectorAll(`${elementsSelector}, [data-swiper-parallax-rotate]`).forEach((subEl) => {
6006        setTransform(subEl, slideProgress);
6007      });
6008    });
6009  };
6010  const setTransition2 = function(duration) {
6011    if (duration === void 0) {
6012      duration = swiper.params.speed;
6013    }
6014    const {
6015      el,
6016      hostEl
6017    } = swiper;
6018    const elements = [...el.querySelectorAll(elementsSelector)];
6019    if (swiper.isElement) {
6020      elements.push(...hostEl.querySelectorAll(elementsSelector));
6021    }
6022    elements.forEach((parallaxEl) => {
6023      let parallaxDuration = parseInt(parallaxEl.getAttribute("data-swiper-parallax-duration"), 10) || duration;
6024      if (duration === 0) parallaxDuration = 0;
6025      parallaxEl.style.transitionDuration = `${parallaxDuration}ms`;
6026    });
6027  };
6028  on("beforeInit", () => {
6029    if (!swiper.params.parallax.enabled) return;
6030    swiper.params.watchSlidesProgress = true;
6031    swiper.originalParams.watchSlidesProgress = true;
6032  });
6033  on("init", () => {
6034    if (!swiper.params.parallax.enabled) return;
6035    setTranslate2();
6036  });
6037  on("setTranslate", () => {
6038    if (!swiper.params.parallax.enabled) return;
6039    setTranslate2();
6040  });
6041  on("setTransition", (_swiper, duration) => {
6042    if (!swiper.params.parallax.enabled) return;
6043    setTransition2(duration);
6044  });
6045}
6046function Zoom(_ref) {
6047  let {
6048    swiper,
6049    extendParams,
6050    on,
6051    emit
6052  } = _ref;
6053  const window2 = getWindow();
6054  extendParams({
6055    zoom: {
6056      enabled: false,
6057      limitToOriginalSize: false,
6058      maxRatio: 3,
6059      minRatio: 1,
6060      toggle: true,
6061      containerClass: "swiper-zoom-container",
6062      zoomedSlideClass: "swiper-slide-zoomed"
6063    }
6064  });
6065  swiper.zoom = {
6066    enabled: false
6067  };
6068  let currentScale = 1;
6069  let isScaling = false;
6070  let fakeGestureTouched;
6071  let fakeGestureMoved;
6072  const evCache = [];
6073  const gesture = {
6074    originX: 0,
6075    originY: 0,
6076    slideEl: void 0,
6077    slideWidth: void 0,
6078    slideHeight: void 0,
6079    imageEl: void 0,
6080    imageWrapEl: void 0,
6081    maxRatio: 3
6082  };
6083  const image = {
6084    isTouched: void 0,
6085    isMoved: void 0,
6086    currentX: void 0,
6087    currentY: void 0,
6088    minX: void 0,
6089    minY: void 0,
6090    maxX: void 0,
6091    maxY: void 0,
6092    width: void 0,
6093    height: void 0,
6094    startX: void 0,
6095    startY: void 0,
6096    touchesStart: {},
6097    touchesCurrent: {}
6098  };
6099  const velocity = {
6100    x: void 0,
6101    y: void 0,
6102    prevPositionX: void 0,
6103    prevPositionY: void 0,
6104    prevTime: void 0
6105  };
6106  let scale = 1;
6107  Object.defineProperty(swiper.zoom, "scale", {
6108    get() {
6109      return scale;
6110    },
6111    set(value) {
6112      if (scale !== value) {
6113        const imageEl = gesture.imageEl;
6114        const slideEl = gesture.slideEl;
6115        emit("zoomChange", value, imageEl, slideEl);
6116      }
6117      scale = value;
6118    }
6119  });
6120  function getDistanceBetweenTouches() {
6121    if (evCache.length < 2) return 1;
6122    const x1 = evCache[0].pageX;
6123    const y1 = evCache[0].pageY;
6124    const x2 = evCache[1].pageX;
vendor: 10,039 bytes, lines 6125-6361
6125    const y2 = evCache[1].pageY;
6126    const distance = Math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2);
6127    return distance;
6128  }
6129  function getMaxRatio() {
6130    const params = swiper.params.zoom;
6131    const maxRatio = gesture.imageWrapEl.getAttribute("data-swiper-zoom") || params.maxRatio;
6132    if (params.limitToOriginalSize && gesture.imageEl && gesture.imageEl.naturalWidth) {
6133      const imageMaxRatio = gesture.imageEl.naturalWidth / gesture.imageEl.offsetWidth;
6134      return Math.min(imageMaxRatio, maxRatio);
6135    }
6136    return maxRatio;
6137  }
6138  function getScaleOrigin() {
6139    if (evCache.length < 2) return {
6140      x: null,
6141      y: null
6142    };
6143    const box = gesture.imageEl.getBoundingClientRect();
6144    return [(evCache[0].pageX + (evCache[1].pageX - evCache[0].pageX) / 2 - box.x - window2.scrollX) / currentScale, (evCache[0].pageY + (evCache[1].pageY - evCache[0].pageY) / 2 - box.y - window2.scrollY) / currentScale];
6145  }
6146  function getSlideSelector() {
6147    return swiper.isElement ? `swiper-slide` : `.${swiper.params.slideClass}`;
6148  }
6149  function eventWithinSlide(e) {
6150    const slideSelector = getSlideSelector();
6151    if (e.target.matches(slideSelector)) return true;
6152    if (swiper.slides.filter((slideEl) => slideEl.contains(e.target)).length > 0) return true;
6153    return false;
6154  }
6155  function eventWithinZoomContainer(e) {
6156    const selector = `.${swiper.params.zoom.containerClass}`;
6157    if (e.target.matches(selector)) return true;
6158    if ([...swiper.hostEl.querySelectorAll(selector)].filter((containerEl) => containerEl.contains(e.target)).length > 0) return true;
6159    return false;
6160  }
6161  function onGestureStart(e) {
6162    if (e.pointerType === "mouse") {
6163      evCache.splice(0, evCache.length);
6164    }
6165    if (!eventWithinSlide(e)) return;
6166    const params = swiper.params.zoom;
6167    fakeGestureTouched = false;
6168    fakeGestureMoved = false;
6169    evCache.push(e);
6170    if (evCache.length < 2) {
6171      return;
6172    }
6173    fakeGestureTouched = true;
6174    gesture.scaleStart = getDistanceBetweenTouches();
6175    if (!gesture.slideEl) {
6176      gesture.slideEl = e.target.closest(`.${swiper.params.slideClass}, swiper-slide`);
6177      if (!gesture.slideEl) gesture.slideEl = swiper.slides[swiper.activeIndex];
6178      let imageEl = gesture.slideEl.querySelector(`.${params.containerClass}`);
6179      if (imageEl) {
6180        imageEl = imageEl.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0];
6181      }
6182      gesture.imageEl = imageEl;
6183      if (imageEl) {
6184        gesture.imageWrapEl = elementParents(gesture.imageEl, `.${params.containerClass}`)[0];
6185      } else {
6186        gesture.imageWrapEl = void 0;
6187      }
6188      if (!gesture.imageWrapEl) {
6189        gesture.imageEl = void 0;
6190        return;
6191      }
6192      gesture.maxRatio = getMaxRatio();
6193    }
6194    if (gesture.imageEl) {
6195      const [originX, originY] = getScaleOrigin();
6196      gesture.originX = originX;
6197      gesture.originY = originY;
6198      gesture.imageEl.style.transitionDuration = "0ms";
6199    }
6200    isScaling = true;
6201  }
6202  function onGestureChange(e) {
6203    if (!eventWithinSlide(e)) return;
6204    const params = swiper.params.zoom;
6205    const zoom = swiper.zoom;
6206    const pointerIndex = evCache.findIndex((cachedEv) => cachedEv.pointerId === e.pointerId);
6207    if (pointerIndex >= 0) evCache[pointerIndex] = e;
6208    if (evCache.length < 2) {
6209      return;
6210    }
6211    fakeGestureMoved = true;
6212    gesture.scaleMove = getDistanceBetweenTouches();
6213    if (!gesture.imageEl) {
6214      return;
6215    }
6216    zoom.scale = gesture.scaleMove / gesture.scaleStart * currentScale;
6217    if (zoom.scale > gesture.maxRatio) {
6218      zoom.scale = gesture.maxRatio - 1 + (zoom.scale - gesture.maxRatio + 1) ** 0.5;
6219    }
6220    if (zoom.scale < params.minRatio) {
6221      zoom.scale = params.minRatio + 1 - (params.minRatio - zoom.scale + 1) ** 0.5;
6222    }
6223    gesture.imageEl.style.transform = `translate3d(0,0,0) scale(${zoom.scale})`;
6224  }
6225  function onGestureEnd(e) {
6226    if (!eventWithinSlide(e)) return;
6227    if (e.pointerType === "mouse" && e.type === "pointerout") return;
6228    const params = swiper.params.zoom;
6229    const zoom = swiper.zoom;
6230    const pointerIndex = evCache.findIndex((cachedEv) => cachedEv.pointerId === e.pointerId);
6231    if (pointerIndex >= 0) evCache.splice(pointerIndex, 1);
6232    if (!fakeGestureTouched || !fakeGestureMoved) {
6233      return;
6234    }
6235    fakeGestureTouched = false;
6236    fakeGestureMoved = false;
6237    if (!gesture.imageEl) return;
6238    zoom.scale = Math.max(Math.min(zoom.scale, gesture.maxRatio), params.minRatio);
6239    gesture.imageEl.style.transitionDuration = `${swiper.params.speed}ms`;
6240    gesture.imageEl.style.transform = `translate3d(0,0,0) scale(${zoom.scale})`;
6241    currentScale = zoom.scale;
6242    isScaling = false;
6243    if (zoom.scale > 1 && gesture.slideEl) {
6244      gesture.slideEl.classList.add(`${params.zoomedSlideClass}`);
6245    } else if (zoom.scale <= 1 && gesture.slideEl) {
6246      gesture.slideEl.classList.remove(`${params.zoomedSlideClass}`);
6247    }
6248    if (zoom.scale === 1) {
6249      gesture.originX = 0;
6250      gesture.originY = 0;
6251      gesture.slideEl = void 0;
6252    }
6253  }
6254  let allowTouchMoveTimeout;
6255  function allowTouchMove() {
6256    swiper.touchEventsData.preventTouchMoveFromPointerMove = false;
6257  }
6258  function preventTouchMove() {
6259    clearTimeout(allowTouchMoveTimeout);
6260    swiper.touchEventsData.preventTouchMoveFromPointerMove = true;
6261    allowTouchMoveTimeout = setTimeout(() => {
6262      if (swiper.destroyed) return;
6263      allowTouchMove();
6264    });
6265  }
6266  function onTouchStart2(e) {
6267    const device = swiper.device;
6268    if (!gesture.imageEl) return;
6269    if (image.isTouched) return;
6270    if (device.android && e.cancelable) e.preventDefault();
6271    image.isTouched = true;
6272    const event2 = evCache.length > 0 ? evCache[0] : e;
6273    image.touchesStart.x = event2.pageX;
6274    image.touchesStart.y = event2.pageY;
6275  }
6276  function onTouchMove2(e) {
6277    if (!eventWithinSlide(e) || !eventWithinZoomContainer(e)) {
6278      return;
6279    }
6280    const zoom = swiper.zoom;
6281    if (!gesture.imageEl) {
6282      return;
6283    }
6284    if (!image.isTouched || !gesture.slideEl) {
6285      return;
6286    }
6287    if (!image.isMoved) {
6288      image.width = gesture.imageEl.offsetWidth || gesture.imageEl.clientWidth;
6289      image.height = gesture.imageEl.offsetHeight || gesture.imageEl.clientHeight;
6290      image.startX = getTranslate(gesture.imageWrapEl, "x") || 0;
6291      image.startY = getTranslate(gesture.imageWrapEl, "y") || 0;
6292      gesture.slideWidth = gesture.slideEl.offsetWidth;
6293      gesture.slideHeight = gesture.slideEl.offsetHeight;
6294      gesture.imageWrapEl.style.transitionDuration = "0ms";
6295    }
6296    const scaledWidth = image.width * zoom.scale;
6297    const scaledHeight = image.height * zoom.scale;
6298    image.minX = Math.min(gesture.slideWidth / 2 - scaledWidth / 2, 0);
6299    image.maxX = -image.minX;
6300    image.minY = Math.min(gesture.slideHeight / 2 - scaledHeight / 2, 0);
6301    image.maxY = -image.minY;
6302    image.touchesCurrent.x = evCache.length > 0 ? evCache[0].pageX : e.pageX;
6303    image.touchesCurrent.y = evCache.length > 0 ? evCache[0].pageY : e.pageY;
6304    const touchesDiff = Math.max(Math.abs(image.touchesCurrent.x - image.touchesStart.x), Math.abs(image.touchesCurrent.y - image.touchesStart.y));
6305    if (touchesDiff > 5) {
6306      swiper.allowClick = false;
6307    }
6308    if (!image.isMoved && !isScaling) {
6309      if (swiper.isHorizontal() && (Math.floor(image.minX) === Math.floor(image.startX) && image.touchesCurrent.x < image.touchesStart.x || Math.floor(image.maxX) === Math.floor(image.startX) && image.touchesCurrent.x > image.touchesStart.x)) {
6310        image.isTouched = false;
6311        allowTouchMove();
6312        return;
6313      }
6314      if (!swiper.isHorizontal() && (Math.floor(image.minY) === Math.floor(image.startY) && image.touchesCurrent.y < image.touchesStart.y || Math.floor(image.maxY) === Math.floor(image.startY) && image.touchesCurrent.y > image.touchesStart.y)) {
6315        image.isTouched = false;
6316        allowTouchMove();
6317        return;
6318      }
6319    }
6320    if (e.cancelable) {
6321      e.preventDefault();
6322    }
6323    e.stopPropagation();
6324    preventTouchMove();
6325    image.isMoved = true;
6326    const scaleRatio = (zoom.scale - currentScale) / (gesture.maxRatio - swiper.params.zoom.minRatio);
6327    const {
6328      originX,
6329      originY
6330    } = gesture;
6331    image.currentX = image.touchesCurrent.x - image.touchesStart.x + image.startX + scaleRatio * (image.width - originX * 2);
6332    image.currentY = image.touchesCurrent.y - image.touchesStart.y + image.startY + scaleRatio * (image.height - originY * 2);
6333    if (image.currentX < image.minX) {
6334      image.currentX = image.minX + 1 - (image.minX - image.currentX + 1) ** 0.8;
6335    }
6336    if (image.currentX > image.maxX) {
6337      image.currentX = image.maxX - 1 + (image.currentX - image.maxX + 1) ** 0.8;
6338    }
6339    if (image.currentY < image.minY) {
6340      image.currentY = image.minY + 1 - (image.minY - image.currentY + 1) ** 0.8;
6341    }
6342    if (image.currentY > image.maxY) {
6343      image.currentY = image.maxY - 1 + (image.currentY - image.maxY + 1) ** 0.8;
6344    }
6345    if (!velocity.prevPositionX) velocity.prevPositionX = image.touchesCurrent.x;
6346    if (!velocity.prevPositionY) velocity.prevPositionY = image.touchesCurrent.y;
6347    if (!velocity.prevTime) velocity.prevTime = Date.now();
6348    velocity.x = (image.touchesCurrent.x - velocity.prevPositionX) / (Date.now() - velocity.prevTime) / 2;
6349    velocity.y = (image.touchesCurrent.y - velocity.prevPositionY) / (Date.now() - velocity.prevTime) / 2;
6350    if (Math.abs(image.touchesCurrent.x - velocity.prevPositionX) < 2) velocity.x = 0;
6351    if (Math.abs(image.touchesCurrent.y - velocity.prevPositionY) < 2) velocity.y = 0;
6352    velocity.prevPositionX = image.touchesCurrent.x;
6353    velocity.prevPositionY = image.touchesCurrent.y;
6354    velocity.prevTime = Date.now();
6355    gesture.imageWrapEl.style.transform = `translate3d(${image.currentX}px, ${image.currentY}px,0)`;
6356  }
6357  function onTouchEnd2() {
6358    const zoom = swiper.zoom;
6359    if (!gesture.imageEl) return;
6360    if (!image.isTouched || !image.isMoved) {
6361      image.isTouched = false;
6362      image.isMoved = false;
6363      return;
6364    }
6365    image.isTouched = false;
6366    image.isMoved = false;
6367    let momentumDurationX = 300;
6368    let momentumDurationY = 300;
6369    const momentumDistanceX = velocity.x * momentumDurationX;
6370    const newPositionX = image.currentX + momentumDistanceX;
6371    const momentumDistanceY = velocity.y * momentumDurationY;
6372    const newPositionY = image.currentY + momentumDistanceY;
6373    if (velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - image.currentX) / velocity.x);
6374    if (velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - image.currentY) / velocity.y);
6375    const momentumDuration = Math.max(momentumDurationX, momentumDurationY);
6376    image.currentX = newPositionX;
6377    image.currentY = newPositionY;
6378    const scaledWidth = image.width * zoom.scale;
6379    const scaledHeight = image.height * zoom.scale;
6380    image.minX = Math.min(gesture.slideWidth / 2 - scaledWidth / 2, 0);
6381    image.maxX = -image.minX;
6382    image.minY = Math.min(gesture.slideHeight / 2 - scaledHeight / 2, 0);
6383    image.maxY = -image.minY;
6384    image.currentX = Math.max(Math.min(image.currentX, image.maxX), image.minX);
6385    image.currentY = Math.max(Math.min(image.currentY, image.maxY), image.minY);
6386    gesture.imageWrapEl.style.transitionDuration = `${momentumDuration}ms`;
6387    gesture.imageWrapEl.style.transform = `translate3d(${image.currentX}px, ${image.currentY}px,0)`;
6388  }
6389  function onTransitionEnd() {
6390    const zoom = swiper.zoom;
6391    if (gesture.slideEl && swiper.activeIndex !== swiper.slides.indexOf(gesture.slideEl)) {
6392      if (gesture.imageEl) {
6393        gesture.imageEl.style.transform = "translate3d(0,0,0) scale(1)";
6394      }
6395      if (gesture.imageWrapEl) {
6396        gesture.imageWrapEl.style.transform = "translate3d(0,0,0)";
6397      }
6398      gesture.slideEl.classList.remove(`${swiper.params.zoom.zoomedSlideClass}`);
6399      zoom.scale = 1;
6400      currentScale = 1;
6401      gesture.slideEl = void 0;
6402      gesture.imageEl = void 0;
6403      gesture.imageWrapEl = void 0;
6404      gesture.originX = 0;
6405      gesture.originY = 0;
6406    }
6407  }
6408  function zoomIn(e) {
6409    const zoom = swiper.zoom;
6410    const params = swiper.params.zoom;
6411    if (!gesture.slideEl) {
6412      if (e && e.target) {
6413        gesture.slideEl = e.target.closest(`.${swiper.params.slideClass}, swiper-slide`);
6414      }
6415      if (!gesture.slideEl) {
6416        if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) {
6417          gesture.slideEl = elementChildren(swiper.slidesEl, `.${swiper.params.slideActiveClass}`)[0];
6418        } else {
6419          gesture.slideEl = swiper.slides[swiper.activeIndex];
6420        }
6421      }
6422      let imageEl = gesture.slideEl.querySelector(`.${params.containerClass}`);
6423      if (imageEl) {
6424        imageEl = imageEl.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0];
6425      }
6426      gesture.imageEl = imageEl;
6427      if (imageEl) {
6428        gesture.imageWrapEl = elementParents(gesture.imageEl, `.${params.containerClass}`)[0];
6429      } else {
6430        gesture.imageWrapEl = void 0;
6431      }
6432    }
6433    if (!gesture.imageEl || !gesture.imageWrapEl) return;
6434    if (swiper.params.cssMode) {
6435      swiper.wrapperEl.style.overflow = "hidden";
6436      swiper.wrapperEl.style.touchAction = "none";
6437    }
6438    gesture.slideEl.classList.add(`${params.zoomedSlideClass}`);
6439    let touchX;
6440    let touchY;
6441    let offsetX;
6442    let offsetY;
6443    let diffX;
6444    let diffY;
6445    let translateX;
6446    let translateY;
6447    let imageWidth;
6448    let imageHeight;
6449    let scaledWidth;
6450    let scaledHeight;
6451    let translateMinX;
6452    let translateMinY;
6453    let translateMaxX;
6454    let translateMaxY;
6455    let slideWidth;
6456    let slideHeight;
6457    if (typeof image.touchesStart.x === "undefined" && e) {
6458      touchX = e.pageX;
6459      touchY = e.pageY;
6460    } else {
6461      touchX = image.touchesStart.x;
6462      touchY = image.touchesStart.y;
6463    }
6464    const forceZoomRatio = typeof e === "number" ? e : null;
6465    if (currentScale === 1 && forceZoomRatio) {
6466      touchX = void 0;
6467      touchY = void 0;
6468      image.touchesStart.x = void 0;
6469      image.touchesStart.y = void 0;
6470    }
6471    const maxRatio = getMaxRatio();
6472    zoom.scale = forceZoomRatio || maxRatio;
6473    currentScale = forceZoomRatio || maxRatio;
6474    if (e && !(currentScale === 1 && forceZoomRatio)) {
6475      slideWidth = gesture.slideEl.offsetWidth;
6476      slideHeight = gesture.slideEl.offsetHeight;
6477      offsetX = elementOffset(gesture.slideEl).left + window2.scrollX;
6478      offsetY = elementOffset(gesture.slideEl).top + window2.scrollY;
6479      diffX = offsetX + slideWidth / 2 - touchX;
6480      diffY = offsetY + slideHeight / 2 - touchY;
6481      imageWidth = gesture.imageEl.offsetWidth || gesture.imageEl.clientWidth;
6482      imageHeight = gesture.imageEl.offsetHeight || gesture.imageEl.clientHeight;
6483      scaledWidth = imageWidth * zoom.scale;
6484      scaledHeight = imageHeight * zoom.scale;
6485      translateMinX = Math.min(slideWidth / 2 - scaledWidth / 2, 0);
6486      translateMinY = Math.min(slideHeight / 2 - scaledHeight / 2, 0);
6487      translateMaxX = -translateMinX;
6488      translateMaxY = -translateMinY;
6489      translateX = diffX * zoom.scale;
6490      translateY = diffY * zoom.scale;
6491      if (translateX < translateMinX) {
6492        translateX = translateMinX;
6493      }
6494      if (translateX > translateMaxX) {
6495        translateX = translateMaxX;
6496      }
6497      if (translateY < translateMinY) {
6498        translateY = translateMinY;
6499      }
6500      if (translateY > translateMaxY) {
6501        translateY = translateMaxY;
6502      }
6503    } else {
6504      translateX = 0;
6505      translateY = 0;
6506    }
6507    if (forceZoomRatio && zoom.scale === 1) {
6508      gesture.originX = 0;
6509      gesture.originY = 0;
6510    }
6511    gesture.imageWrapEl.style.transitionDuration = "300ms";
6512    gesture.imageWrapEl.style.transform = `translate3d(${translateX}px, ${translateY}px,0)`;
6513    gesture.imageEl.style.transitionDuration = "300ms";
6514    gesture.imageEl.style.transform = `translate3d(0,0,0) scale(${zoom.scale})`;
6515  }
6516  function zoomOut() {
6517    const zoom = swiper.zoom;
6518    const params = swiper.params.zoom;
6519    if (!gesture.slideEl) {
6520      if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) {
6521        gesture.slideEl = elementChildren(swiper.slidesEl, `.${swiper.params.slideActiveClass}`)[0];
6522      } else {
6523        gesture.slideEl = swiper.slides[swiper.activeIndex];
6524      }
6525      let imageEl = gesture.slideEl.querySelector(`.${params.containerClass}`);
6526      if (imageEl) {
6527        imageEl = imageEl.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0];
6528      }
6529      gesture.imageEl = imageEl;
6530      if (imageEl) {
6531        gesture.imageWrapEl = elementParents(gesture.imageEl, `.${params.containerClass}`)[0];
6532      } else {
6533        gesture.imageWrapEl = void 0;
6534      }
6535    }
6536    if (!gesture.imageEl || !gesture.imageWrapEl) return;
6537    if (swiper.params.cssMode) {
6538      swiper.wrapperEl.style.overflow = "";
6539      swiper.wrapperEl.style.touchAction = "";
6540    }
6541    zoom.scale = 1;
6542    currentScale = 1;
6543    image.touchesStart.x = void 0;
6544    image.touchesStart.y = void 0;
6545    gesture.imageWrapEl.style.transitionDuration = "300ms";
6546    gesture.imageWrapEl.style.transform = "translate3d(0,0,0)";
6547    gesture.imageEl.style.transitionDuration = "300ms";
6548    gesture.imageEl.style.transform = "translate3d(0,0,0) scale(1)";
6549    gesture.slideEl.classList.remove(`${params.zoomedSlideClass}`);
6550    gesture.slideEl = void 0;
6551    gesture.originX = 0;
6552    gesture.originY = 0;
6553  }
6554  function zoomToggle(e) {
6555    const zoom = swiper.zoom;
6556    if (zoom.scale && zoom.scale !== 1) {
6557      zoomOut();
6558    } else {
6559      zoomIn(e);
6560    }
6561  }
6562  function getListeners() {
6563    const passiveListener = swiper.params.passiveListeners ? {
6564      passive: true,
6565      capture: false
6566    } : false;
6567    const activeListenerWithCapture = swiper.params.passiveListeners ? {
6568      passive: false,
6569      capture: true
6570    } : true;
6571    return {
6572      passiveListener,
6573      activeListenerWithCapture
6574    };
6575  }
6576  function enable() {
6577    const zoom = swiper.zoom;
6578    if (zoom.enabled) return;
6579    zoom.enabled = true;
6580    const {
6581      passiveListener,
6582      activeListenerWithCapture
6583    } = getListeners();
6584    swiper.wrapperEl.addEventListener("pointerdown", onGestureStart, passiveListener);
6585    swiper.wrapperEl.addEventListener("pointermove", onGestureChange, activeListenerWithCapture);
6586    ["pointerup", "pointercancel", "pointerout"].forEach((eventName) => {
6587      swiper.wrapperEl.addEventListener(eventName, onGestureEnd, passiveListener);
6588    });
6589    swiper.wrapperEl.addEventListener("pointermove", onTouchMove2, activeListenerWithCapture);
6590  }
6591  function disable() {
6592    const zoom = swiper.zoom;
6593    if (!zoom.enabled) return;
6594    zoom.enabled = false;
6595    const {
6596      passiveListener,
6597      activeListenerWithCapture
6598    } = getListeners();
6599    swiper.wrapperEl.removeEventListener("pointerdown", onGestureStart, passiveListener);
6600    swiper.wrapperEl.removeEventListener("pointermove", onGestureChange, activeListenerWithCapture);
6601    ["pointerup", "pointercancel", "pointerout"].forEach((eventName) => {
6602      swiper.wrapperEl.removeEventListener(eventName, onGestureEnd, passiveListener);
6603    });
6604    swiper.wrapperEl.removeEventListener("pointermove", onTouchMove2, activeListenerWithCapture);
6605  }
6606  on("init", () => {
6607    if (swiper.params.zoom.enabled) {
6608      enable();
6609    }
6610  });
6611  on("destroy", () => {
6612    disable();
6613  });
6614  on("touchStart", (_s, e) => {
6615    if (!swiper.zoom.enabled) return;
6616    onTouchStart2(e);
6617  });
6618  on("touchEnd", (_s, e) => {
6619    if (!swiper.zoom.enabled) return;
6620    onTouchEnd2();
6621  });
6622  on("doubleTap", (_s, e) => {
6623    if (!swiper.animating && swiper.params.zoom.enabled && swiper.zoom.enabled && swiper.params.zoom.toggle) {
6624      zoomToggle(e);
6625    }
6626  });
6627  on("transitionEnd", () => {
6628    if (swiper.zoom.enabled && swiper.params.zoom.enabled) {
6629      onTransitionEnd();
6630    }
6631  });
6632  on("slideChange", () => {
6633    if (swiper.zoom.enabled && swiper.params.zoom.enabled && swiper.params.cssMode) {
6634      onTransitionEnd();
6635    }
6636  });
6637  Object.assign(swiper.zoom, {
6638    enable,
6639    disable,
6640    in: zoomIn,
6641    out: zoomOut,
6642    toggle: zoomToggle
6643  });
6644}
6645function Controller(_ref) {
6646  let {
6647    swiper,
6648    extendParams,
6649    on
6650  } = _ref;
6651  extendParams({
6652    controller: {
6653      control: void 0,
6654      inverse: false,
6655      by: "slide"
6656      // or 'container'
6657    }
6658  });
6659  swiper.controller = {
6660    control: void 0
6661  };
6662  function LinearSpline(x, y) {
6663    const binarySearch = /* @__PURE__ */ function search() {
6664      let maxIndex;
6665      let minIndex;
6666      let guess;
6667      return (array, val) => {
6668        minIndex = -1;
6669        maxIndex = array.length;
6670        while (maxIndex - minIndex > 1) {
vendor: 4,355 bytes, lines 6671-6782
6671          guess = maxIndex + minIndex >> 1;
6672          if (array[guess] <= val) {
6673            minIndex = guess;
6674          } else {
6675            maxIndex = guess;
6676          }
6677        }
6678        return maxIndex;
6679      };
6680    }();
6681    this.x = x;
6682    this.y = y;
6683    this.lastIndex = x.length - 1;
6684    let i1;
6685    let i3;
6686    this.interpolate = function interpolate(x2) {
6687      if (!x2) return 0;
6688      i3 = binarySearch(this.x, x2);
6689      i1 = i3 - 1;
6690      return (x2 - this.x[i1]) * (this.y[i3] - this.y[i1]) / (this.x[i3] - this.x[i1]) + this.y[i1];
6691    };
6692    return this;
6693  }
6694  function getInterpolateFunction(c) {
6695    swiper.controller.spline = swiper.params.loop ? new LinearSpline(swiper.slidesGrid, c.slidesGrid) : new LinearSpline(swiper.snapGrid, c.snapGrid);
6696  }
6697  function setTranslate2(_t, byController) {
6698    const controlled = swiper.controller.control;
6699    let multiplier;
6700    let controlledTranslate;
6701    const Swiper2 = swiper.constructor;
6702    function setControlledTranslate(c) {
6703      if (c.destroyed) return;
6704      const translate2 = swiper.rtlTranslate ? -swiper.translate : swiper.translate;
6705      if (swiper.params.controller.by === "slide") {
6706        getInterpolateFunction(c);
6707        controlledTranslate = -swiper.controller.spline.interpolate(-translate2);
6708      }
6709      if (!controlledTranslate || swiper.params.controller.by === "container") {
6710        multiplier = (c.maxTranslate() - c.minTranslate()) / (swiper.maxTranslate() - swiper.minTranslate());
6711        if (Number.isNaN(multiplier) || !Number.isFinite(multiplier)) {
6712          multiplier = 1;
6713        }
6714        controlledTranslate = (translate2 - swiper.minTranslate()) * multiplier + c.minTranslate();
6715      }
6716      if (swiper.params.controller.inverse) {
6717        controlledTranslate = c.maxTranslate() - controlledTranslate;
6718      }
6719      c.updateProgress(controlledTranslate);
6720      c.setTranslate(controlledTranslate, swiper);
6721      c.updateActiveIndex();
6722      c.updateSlidesClasses();
6723    }
6724    if (Array.isArray(controlled)) {
6725      for (let i = 0; i < controlled.length; i += 1) {
6726        if (controlled[i] !== byController && controlled[i] instanceof Swiper2) {
6727          setControlledTranslate(controlled[i]);
6728        }
6729      }
6730    } else if (controlled instanceof Swiper2 && byController !== controlled) {
6731      setControlledTranslate(controlled);
6732    }
6733  }
6734  function setTransition2(duration, byController) {
6735    const Swiper2 = swiper.constructor;
6736    const controlled = swiper.controller.control;
6737    let i;
6738    function setControlledTransition(c) {
6739      if (c.destroyed) return;
6740      c.setTransition(duration, swiper);
6741      if (duration !== 0) {
6742        c.transitionStart();
6743        if (c.params.autoHeight) {
6744          nextTick(() => {
6745            c.updateAutoHeight();
6746          });
6747        }
6748        elementTransitionEnd(c.wrapperEl, () => {
6749          if (!controlled) return;
6750          c.transitionEnd();
6751        });
6752      }
6753    }
6754    if (Array.isArray(controlled)) {
6755      for (i = 0; i < controlled.length; i += 1) {
6756        if (controlled[i] !== byController && controlled[i] instanceof Swiper2) {
6757          setControlledTransition(controlled[i]);
6758        }
6759      }
6760    } else if (controlled instanceof Swiper2 && byController !== controlled) {
6761      setControlledTransition(controlled);
6762    }
6763  }
6764  function removeSpline() {
6765    if (!swiper.controller.control) return;
6766    if (swiper.controller.spline) {
6767      swiper.controller.spline = void 0;
6768      delete swiper.controller.spline;
6769    }
6770  }
6771  on("beforeInit", () => {
6772    if (typeof window !== "undefined" && // eslint-disable-line
6773    (typeof swiper.params.controller.control === "string" || swiper.params.controller.control instanceof HTMLElement)) {
6774      const controlElements = typeof swiper.params.controller.control === "string" ? [...document.querySelectorAll(swiper.params.controller.control)] : [swiper.params.controller.control];
6775      controlElements.forEach((controlElement) => {
6776        if (!swiper.controller.control) swiper.controller.control = [];
6777        if (controlElement && controlElement.swiper) {
6778          swiper.controller.control.push(controlElement.swiper);
6779        } else if (controlElement) {
6780          const eventName = `${swiper.params.eventsPrefix}init`;
6781          const onControllerSwiper = (e) => {
6782            swiper.controller.control.push(e.detail[0]);
6783            swiper.update();
6784            controlElement.removeEventListener(eventName, onControllerSwiper);
6785          };
6786          controlElement.addEventListener(eventName, onControllerSwiper);
6787        }
6788      });
6789      return;
6790    }
6791    swiper.controller.control = swiper.params.controller.control;
6792  });
6793  on("update", () => {
6794    removeSpline();
6795  });
6796  on("resize", () => {
6797    removeSpline();
6798  });
6799  on("observerUpdate", () => {
6800    removeSpline();
6801  });
6802  on("setTranslate", (_s, translate2, byController) => {
6803    if (!swiper.controller.control || swiper.controller.control.destroyed) return;
6804    swiper.controller.setTranslate(translate2, byController);
6805  });
6806  on("setTransition", (_s, duration, byController) => {
6807    if (!swiper.controller.control || swiper.controller.control.destroyed) return;
6808    swiper.controller.setTransition(duration, byController);
6809  });
6810  Object.assign(swiper.controller, {
6811    setTranslate: setTranslate2,
6812    setTransition: setTransition2
6813  });
6814}
6815function A11y(_ref) {
6816  let {
6817    swiper,
6818    extendParams,
6819    on
6820  } = _ref;
6821  extendParams({
6822    a11y: {
6823      enabled: true,
6824      notificationClass: "swiper-notification",
6825      prevSlideMessage: "Previous slide",
6826      nextSlideMessage: "Next slide",
6827      firstSlideMessage: "This is the first slide",
6828      lastSlideMessage: "This is the last slide",
6829      paginationBulletMessage: "Go to slide {{index}}",
6830      slideLabelMessage: "{{index}} / {{slidesLength}}",
6831      containerMessage: null,
6832      containerRoleDescriptionMessage: null,
6833      containerRole: null,
6834      itemRoleDescriptionMessage: null,
6835      slideRole: "group",
6836      id: null,
6837      scrollOnFocus: true
6838    }
6839  });
6840  swiper.a11y = {
6841    clicked: false
6842  };
6843  let liveRegion = null;
6844  let preventFocusHandler;
6845  let focusTargetSlideEl;
6846  let visibilityChangedTimestamp = (/* @__PURE__ */ new Date()).getTime();
6847  function notify(message) {
6848    const notification = liveRegion;
6849    if (notification.length === 0) return;
6850    notification.innerHTML = "";
6851    notification.innerHTML = message;
6852  }
6853  function getRandomNumber(size) {
6854    const randomChar = () => Math.round(16 * Math.random()).toString(16);
6855    return "x".repeat(size).replace(/x/g, randomChar);
6856  }
6857  function makeElFocusable(el) {
6858    el = makeElementsArray(el);
6859    el.forEach((subEl) => {
6860      subEl.setAttribute("tabIndex", "0");
6861    });
6862  }
6863  function makeElNotFocusable(el) {
6864    el = makeElementsArray(el);
6865    el.forEach((subEl) => {
6866      subEl.setAttribute("tabIndex", "-1");
6867    });
6868  }
6869  function addElRole(el, role) {
6870    el = makeElementsArray(el);
6871    el.forEach((subEl) => {
6872      subEl.setAttribute("role", role);
6873    });
6874  }
6875  function addElRoleDescription(el, description) {
6876    el = makeElementsArray(el);
6877    el.forEach((subEl) => {
6878      subEl.setAttribute("aria-roledescription", description);
6879    });
6880  }
6881  function addElControls(el, controls) {
6882    el = makeElementsArray(el);
6883    el.forEach((subEl) => {
6884      subEl.setAttribute("aria-controls", controls);
6885    });
6886  }
6887  function addElLabel(el, label) {
6888    el = makeElementsArray(el);
6889    el.forEach((subEl) => {
6890      subEl.setAttribute("aria-label", label);
6891    });
6892  }
6893  function addElId(el, id) {
6894    el = makeElementsArray(el);
6895    el.forEach((subEl) => {
6896      subEl.setAttribute("id", id);
6897    });
6898  }
6899  function addElLive(el, live) {
6900    el = makeElementsArray(el);
6901    el.forEach((subEl) => {
6902      subEl.setAttribute("aria-live", live);
6903    });
6904  }
6905  function disableEl(el) {
6906    el = makeElementsArray(el);
6907    el.forEach((subEl) => {
6908      subEl.setAttribute("aria-disabled", true);
6909    });
6910  }
6911  function enableEl(el) {
6912    el = makeElementsArray(el);
6913    el.forEach((subEl) => {
6914      subEl.setAttribute("aria-disabled", false);
6915    });
6916  }
6917  function onEnterOrSpaceKey(e) {
6918    if (e.keyCode !== 13 && e.keyCode !== 32) return;
6919    const params = swiper.params.a11y;
6920    const targetEl = e.target;
6921    if (swiper.pagination && swiper.pagination.el && (targetEl === swiper.pagination.el || swiper.pagination.el.contains(e.target))) {
6922      if (!e.target.matches(classesToSelector(swiper.params.pagination.bulletClass))) return;
6923    }
6924    if (swiper.navigation && swiper.navigation.prevEl && swiper.navigation.nextEl) {
6925      const prevEls = makeElementsArray(swiper.navigation.prevEl);
6926      const nextEls = makeElementsArray(swiper.navigation.nextEl);
6927      if (nextEls.includes(targetEl)) {
6928        if (!(swiper.isEnd && !swiper.params.loop)) {
6929          swiper.slideNext();
6930        }
6931        if (swiper.isEnd) {
6932          notify(params.lastSlideMessage);
6933        } else {
6934          notify(params.nextSlideMessage);
6935        }
6936      }
6937      if (prevEls.includes(targetEl)) {
6938        if (!(swiper.isBeginning && !swiper.params.loop)) {
6939          swiper.slidePrev();
6940        }
6941        if (swiper.isBeginning) {
6942          notify(params.firstSlideMessage);
6943        } else {
6944          notify(params.prevSlideMessage);
6945        }
6946      }
6947    }
6948    if (swiper.pagination && targetEl.matches(classesToSelector(swiper.params.pagination.bulletClass))) {
6949      targetEl.click();
6950    }
6951  }
6952  function updateNavigation() {
6953    if (swiper.params.loop || swiper.params.rewind || !swiper.navigation) return;
6954    const {
6955      nextEl,
6956      prevEl
6957    } = swiper.navigation;
6958    if (prevEl) {
6959      if (swiper.isBeginning) {
6960        disableEl(prevEl);
6961        makeElNotFocusable(prevEl);
6962      } else {
6963        enableEl(prevEl);
6964        makeElFocusable(prevEl);
6965      }
6966    }
6967    if (nextEl) {
6968      if (swiper.isEnd) {
6969        disableEl(nextEl);
6970        makeElNotFocusable(nextEl);
6971      } else {
6972        enableEl(nextEl);
6973        makeElFocusable(nextEl);
6974      }
6975    }
6976  }
6977  function hasPagination() {
6978    return swiper.pagination && swiper.pagination.bullets && swiper.pagination.bullets.length;
6979  }
6980  function hasClickablePagination() {
6981    return hasPagination() && swiper.params.pagination.clickable;
6982  }
6983  function updatePagination() {
6984    const params = swiper.params.a11y;
6985    if (!hasPagination()) return;
6986    swiper.pagination.bullets.forEach((bulletEl) => {
6987      if (swiper.params.pagination.clickable) {
6988        makeElFocusable(bulletEl);
6989        if (!swiper.params.pagination.renderBullet) {
6990          addElRole(bulletEl, "button");
6991          addElLabel(bulletEl, params.paginationBulletMessage.replace(/\{\{index\}\}/, elementIndex(bulletEl) + 1));
6992        }
6993      }
6994      if (bulletEl.matches(classesToSelector(swiper.params.pagination.bulletActiveClass))) {
6995        bulletEl.setAttribute("aria-current", "true");
6996      } else {
6997        bulletEl.removeAttribute("aria-current");
6998      }
6999    });
7000  }
7001  const initNavEl = (el, wrapperId, message) => {
7002    makeElFocusable(el);
7003    if (el.tagName !== "BUTTON") {
7004      addElRole(el, "button");
7005      el.addEventListener("keydown", onEnterOrSpaceKey);
7006    }
7007    addElLabel(el, message);
7008    addElControls(el, wrapperId);
7009  };
7010  const handlePointerDown = (e) => {
7011    if (focusTargetSlideEl && focusTargetSlideEl !== e.target && !focusTargetSlideEl.contains(e.target)) {
7012      preventFocusHandler = true;
7013    }
7014    swiper.a11y.clicked = true;
7015  };
7016  const handlePointerUp = () => {
7017    preventFocusHandler = false;
7018    requestAnimationFrame(() => {
7019      requestAnimationFrame(() => {
7020        if (!swiper.destroyed) {
7021          swiper.a11y.clicked = false;
7022        }
7023      });
7024    });
7025  };
7026  const onVisibilityChange = (e) => {
7027    visibilityChangedTimestamp = (/* @__PURE__ */ new Date()).getTime();
7028  };
7029  const handleFocus = (e) => {
7030    if (swiper.a11y.clicked || !swiper.params.a11y.scrollOnFocus) return;
7031    if ((/* @__PURE__ */ new Date()).getTime() - visibilityChangedTimestamp < 100) return;
7032    const slideEl = e.target.closest(`.${swiper.params.slideClass}, swiper-slide`);
7033    if (!slideEl || !swiper.slides.includes(slideEl)) return;
7034    focusTargetSlideEl = slideEl;
7035    const isActive = swiper.slides.indexOf(slideEl) === swiper.activeIndex;
7036    const isVisible = swiper.params.watchSlidesProgress && swiper.visibleSlides && swiper.visibleSlides.includes(slideEl);
7037    if (isActive || isVisible) return;
7038    if (e.sourceCapabilities && e.sourceCapabilities.firesTouchEvents) return;
7039    if (swiper.isHorizontal()) {
7040      swiper.el.scrollLeft = 0;
7041    } else {
7042      swiper.el.scrollTop = 0;
7043    }
7044    requestAnimationFrame(() => {
7045      if (preventFocusHandler) return;
7046      if (swiper.params.loop) {
7047        swiper.slideToLoop(parseInt(slideEl.getAttribute("data-swiper-slide-index")), 0);
7048      } else {
7049        swiper.slideTo(swiper.slides.indexOf(slideEl), 0);
7050      }
7051      preventFocusHandler = false;
7052    });
7053  };
7054  const initSlides = () => {
7055    const params = swiper.params.a11y;
7056    if (params.itemRoleDescriptionMessage) {
7057      addElRoleDescription(swiper.slides, params.itemRoleDescriptionMessage);
7058    }
7059    if (params.slideRole) {
7060      addElRole(swiper.slides, params.slideRole);
7061    }
7062    const slidesLength = swiper.slides.length;
7063    if (params.slideLabelMessage) {
7064      swiper.slides.forEach((slideEl, index) => {
7065        const slideIndex = swiper.params.loop ? parseInt(slideEl.getAttribute("data-swiper-slide-index"), 10) : index;
7066        const ariaLabelMessage = params.slideLabelMessage.replace(/\{\{index\}\}/, slideIndex + 1).replace(/\{\{slidesLength\}\}/, slidesLength);
7067        addElLabel(slideEl, ariaLabelMessage);
7068      });
7069    }
7070  };
7071  const init = () => {
7072    const params = swiper.params.a11y;
7073    swiper.el.append(liveRegion);
7074    const containerEl = swiper.el;
7075    if (params.containerRoleDescriptionMessage) {
7076      addElRoleDescription(containerEl, params.containerRoleDescriptionMessage);
7077    }
7078    if (params.containerMessage) {
7079      addElLabel(containerEl, params.containerMessage);
7080    }
7081    if (params.containerRole) {
7082      addElRole(containerEl, params.containerRole);
7083    }
7084    const wrapperEl = swiper.wrapperEl;
7085    const wrapperId = params.id || wrapperEl.getAttribute("id") || `swiper-wrapper-${getRandomNumber(16)}`;
7086    const live = swiper.params.autoplay && swiper.params.autoplay.enabled ? "off" : "polite";
7087    addElId(wrapperEl, wrapperId);
7088    addElLive(wrapperEl, live);
7089    initSlides();
7090    let {
7091      nextEl,
7092      prevEl
7093    } = swiper.navigation ? swiper.navigation : {};
7094    nextEl = makeElementsArray(nextEl);
7095    prevEl = makeElementsArray(prevEl);
7096    if (nextEl) {
7097      nextEl.forEach((el) => initNavEl(el, wrapperId, params.nextSlideMessage));
7098    }
7099    if (prevEl) {
7100      prevEl.forEach((el) => initNavEl(el, wrapperId, params.prevSlideMessage));
7101    }
7102    if (hasClickablePagination()) {
7103      const paginationEl = makeElementsArray(swiper.pagination.el);
7104      paginationEl.forEach((el) => {
7105        el.addEventListener("keydown", onEnterOrSpaceKey);
7106      });
7107    }
7108    const document2 = getDocument();
7109    document2.addEventListener("visibilitychange", onVisibilityChange);
7110    swiper.el.addEventListener("focus", handleFocus, true);
7111    swiper.el.addEventListener("focus", handleFocus, true);
7112    swiper.el.addEventListener("pointerdown", handlePointerDown, true);
7113    swiper.el.addEventListener("pointerup", handlePointerUp, true);
7114  };
7115  function destroy() {
7116    if (liveRegion) liveRegion.remove();
7117    let {
7118      nextEl,
7119      prevEl
7120    } = swiper.navigation ? swiper.navigation : {};
7121    nextEl = makeElementsArray(nextEl);
7122    prevEl = makeElementsArray(prevEl);
7123    if (nextEl) {
7124      nextEl.forEach((el) => el.removeEventListener("keydown", onEnterOrSpaceKey));
7125    }
7126    if (prevEl) {
7127      prevEl.forEach((el) => el.removeEventListener("keydown", onEnterOrSpaceKey));
7128    }
7129    if (hasClickablePagination()) {
7130      const paginationEl = makeElementsArray(swiper.pagination.el);
7131      paginationEl.forEach((el) => {
7132        el.removeEventListener("keydown", onEnterOrSpaceKey);
7133      });
7134    }
7135    const document2 = getDocument();
7136    document2.removeEventListener("visibilitychange", onVisibilityChange);
7137    if (swiper.el && typeof swiper.el !== "string") {
7138      swiper.el.removeEventListener("focus", handleFocus, true);
7139      swiper.el.removeEventListener("pointerdown", handlePointerDown, true);
7140      swiper.el.removeEventListener("pointerup", handlePointerUp, true);
7141    }
7142  }
7143  on("beforeInit", () => {
7144    liveRegion = createElement("span", swiper.params.a11y.notificationClass);
7145    liveRegion.setAttribute("aria-live", "assertive");
7146    liveRegion.setAttribute("aria-atomic", "true");
7147  });
7148  on("afterInit", () => {
7149    if (!swiper.params.a11y.enabled) return;
7150    init();
7151  });
7152  on("slidesLengthChange snapGridLengthChange slidesGridLengthChange", () => {
7153    if (!swiper.params.a11y.enabled) return;
7154    initSlides();
7155  });
7156  on("fromEdge toEdge afterInit lock unlock", () => {
7157    if (!swiper.params.a11y.enabled) return;
7158    updateNavigation();
7159  });
7160  on("paginationUpdate", () => {
7161    if (!swiper.params.a11y.enabled) return;
7162    updatePagination();
7163  });
7164  on("destroy", () => {
7165    if (!swiper.params.a11y.enabled) return;
7166    destroy();
7167  });
7168}
7169function History(_ref) {
7170  let {
7171    swiper,
7172    extendParams,
7173    on
7174  } = _ref;
7175  extendParams({
7176    history: {
7177      enabled: false,
7178      root: "",
7179      replaceState: false,
7180      key: "slides",
7181      keepQuery: false
7182    }
7183  });
7184  let initialized = false;
vendor: 8,766 bytes, lines 7185-7447
7185  let paths = {};
7186  const slugify = (text) => {
7187    return text.toString().replace(/\s+/g, "-").replace(/[^\w-]+/g, "").replace(/--+/g, "-").replace(/^-+/, "").replace(/-+$/, "");
7188  };
7189  const getPathValues = (urlOverride) => {
7190    const window2 = getWindow();
7191    let location2;
7192    if (urlOverride) {
7193      location2 = new URL(urlOverride);
7194    } else {
7195      location2 = window2.location;
7196    }
7197    const pathArray = location2.pathname.slice(1).split("/").filter((part) => part !== "");
7198    const total = pathArray.length;
7199    const key = pathArray[total - 2];
7200    const value = pathArray[total - 1];
7201    return {
7202      key,
7203      value
7204    };
7205  };
7206  const setHistory = (key, index) => {
7207    const window2 = getWindow();
7208    if (!initialized || !swiper.params.history.enabled) return;
7209    let location2;
7210    if (swiper.params.url) {
7211      location2 = new URL(swiper.params.url);
7212    } else {
7213      location2 = window2.location;
7214    }
7215    const slide2 = swiper.virtual && swiper.params.virtual.enabled ? swiper.slidesEl.querySelector(`[data-swiper-slide-index="${index}"]`) : swiper.slides[index];
7216    let value = slugify(slide2.getAttribute("data-history"));
7217    if (swiper.params.history.root.length > 0) {
7218      let root = swiper.params.history.root;
7219      if (root[root.length - 1] === "/") root = root.slice(0, root.length - 1);
7220      value = `${root}/${key ? `${key}/` : ""}${value}`;
7221    } else if (!location2.pathname.includes(key)) {
7222      value = `${key ? `${key}/` : ""}${value}`;
7223    }
7224    if (swiper.params.history.keepQuery) {
7225      value += location2.search;
7226    }
7227    const currentState = window2.history.state;
7228    if (currentState && currentState.value === value) {
7229      return;
7230    }
7231    if (swiper.params.history.replaceState) {
7232      window2.history.replaceState({
7233        value
7234      }, null, value);
7235    } else {
7236      window2.history.pushState({
7237        value
7238      }, null, value);
7239    }
7240  };
7241  const scrollToSlide = (speed, value, runCallbacks) => {
7242    if (value) {
7243      for (let i = 0, length = swiper.slides.length; i < length; i += 1) {
7244        const slide2 = swiper.slides[i];
7245        const slideHistory = slugify(slide2.getAttribute("data-history"));
7246        if (slideHistory === value) {
7247          const index = swiper.getSlideIndex(slide2);
7248          swiper.slideTo(index, speed, runCallbacks);
7249        }
7250      }
7251    } else {
7252      swiper.slideTo(0, speed, runCallbacks);
7253    }
7254  };
7255  const setHistoryPopState = () => {
7256    paths = getPathValues(swiper.params.url);
7257    scrollToSlide(swiper.params.speed, paths.value, false);
7258  };
7259  const init = () => {
7260    const window2 = getWindow();
7261    if (!swiper.params.history) return;
7262    if (!window2.history || !window2.history.pushState) {
7263      swiper.params.history.enabled = false;
7264      swiper.params.hashNavigation.enabled = true;
7265      return;
7266    }
7267    initialized = true;
7268    paths = getPathValues(swiper.params.url);
7269    if (!paths.key && !paths.value) {
7270      if (!swiper.params.history.replaceState) {
7271        window2.addEventListener("popstate", setHistoryPopState);
7272      }
7273      return;
7274    }
7275    scrollToSlide(0, paths.value, swiper.params.runCallbacksOnInit);
7276    if (!swiper.params.history.replaceState) {
7277      window2.addEventListener("popstate", setHistoryPopState);
7278    }
7279  };
7280  const destroy = () => {
7281    const window2 = getWindow();
7282    if (!swiper.params.history.replaceState) {
7283      window2.removeEventListener("popstate", setHistoryPopState);
7284    }
7285  };
7286  on("init", () => {
7287    if (swiper.params.history.enabled) {
7288      init();
7289    }
7290  });
7291  on("destroy", () => {
7292    if (swiper.params.history.enabled) {
7293      destroy();
7294    }
7295  });
7296  on("transitionEnd _freeModeNoMomentumRelease", () => {
7297    if (initialized) {
7298      setHistory(swiper.params.history.key, swiper.activeIndex);
7299    }
7300  });
7301  on("slideChange", () => {
7302    if (initialized && swiper.params.cssMode) {
7303      setHistory(swiper.params.history.key, swiper.activeIndex);
7304    }
7305  });
7306}
7307function HashNavigation(_ref) {
7308  let {
7309    swiper,
7310    extendParams,
7311    emit,
7312    on
7313  } = _ref;
7314  let initialized = false;
7315  const document2 = getDocument();
7316  const window2 = getWindow();
7317  extendParams({
7318    hashNavigation: {
7319      enabled: false,
7320      replaceState: false,
7321      watchState: false,
7322      getSlideIndex(_s, hash) {
7323        if (swiper.virtual && swiper.params.virtual.enabled) {
7324          const slideWithHash = swiper.slides.filter((slideEl) => slideEl.getAttribute("data-hash") === hash)[0];
7325          if (!slideWithHash) return 0;
7326          const index = parseInt(slideWithHash.getAttribute("data-swiper-slide-index"), 10);
7327          return index;
7328        }
7329        return swiper.getSlideIndex(elementChildren(swiper.slidesEl, `.${swiper.params.slideClass}[data-hash="${hash}"], swiper-slide[data-hash="${hash}"]`)[0]);
7330      }
7331    }
7332  });
7333  const onHashChange = () => {
7334    emit("hashChange");
7335    const newHash = document2.location.hash.replace("#", "");
7336    const activeSlideEl = swiper.virtual && swiper.params.virtual.enabled ? swiper.slidesEl.querySelector(`[data-swiper-slide-index="${swiper.activeIndex}"]`) : swiper.slides[swiper.activeIndex];
7337    const activeSlideHash = activeSlideEl ? activeSlideEl.getAttribute("data-hash") : "";
7338    if (newHash !== activeSlideHash) {
7339      const newIndex = swiper.params.hashNavigation.getSlideIndex(swiper, newHash);
7340      if (typeof newIndex === "undefined" || Number.isNaN(newIndex)) return;
7341      swiper.slideTo(newIndex);
7342    }
7343  };
7344  const setHash = () => {
7345    if (!initialized || !swiper.params.hashNavigation.enabled) return;
7346    const activeSlideEl = swiper.virtual && swiper.params.virtual.enabled ? swiper.slidesEl.querySelector(`[data-swiper-slide-index="${swiper.activeIndex}"]`) : swiper.slides[swiper.activeIndex];
7347    const activeSlideHash = activeSlideEl ? activeSlideEl.getAttribute("data-hash") || activeSlideEl.getAttribute("data-history") : "";
7348    if (swiper.params.hashNavigation.replaceState && window2.history && window2.history.replaceState) {
7349      window2.history.replaceState(null, null, `#${activeSlideHash}` || "");
7350      emit("hashSet");
7351    } else {
7352      document2.location.hash = activeSlideHash || "";
7353      emit("hashSet");
7354    }
7355  };
7356  const init = () => {
7357    if (!swiper.params.hashNavigation.enabled || swiper.params.history && swiper.params.history.enabled) return;
7358    initialized = true;
7359    const hash = document2.location.hash.replace("#", "");
7360    if (hash) {
7361      const speed = 0;
7362      const index = swiper.params.hashNavigation.getSlideIndex(swiper, hash);
7363      swiper.slideTo(index || 0, speed, swiper.params.runCallbacksOnInit, true);
7364    }
7365    if (swiper.params.hashNavigation.watchState) {
7366      window2.addEventListener("hashchange", onHashChange);
7367    }
7368  };
7369  const destroy = () => {
7370    if (swiper.params.hashNavigation.watchState) {
7371      window2.removeEventListener("hashchange", onHashChange);
7372    }
7373  };
7374  on("init", () => {
7375    if (swiper.params.hashNavigation.enabled) {
7376      init();
7377    }
7378  });
7379  on("destroy", () => {
7380    if (swiper.params.hashNavigation.enabled) {
7381      destroy();
7382    }
7383  });
7384  on("transitionEnd _freeModeNoMomentumRelease", () => {
7385    if (initialized) {
7386      setHash();
7387    }
7388  });
7389  on("slideChange", () => {
7390    if (initialized && swiper.params.cssMode) {
7391      setHash();
7392    }
7393  });
7394}
7395function Autoplay(_ref) {
7396  let {
7397    swiper,
7398    extendParams,
7399    on,
7400    emit,
7401    params
7402  } = _ref;
7403  swiper.autoplay = {
7404    running: false,
7405    paused: false,
7406    timeLeft: 0
7407  };
7408  extendParams({
7409    autoplay: {
7410      enabled: false,
7411      delay: 3e3,
7412      waitForTransition: true,
7413      disableOnInteraction: false,
7414      stopOnLastSlide: false,
7415      reverseDirection: false,
7416      pauseOnMouseEnter: false
7417    }
7418  });
7419  let timeout;
7420  let raf;
7421  let autoplayDelayTotal = params && params.autoplay ? params.autoplay.delay : 3e3;
7422  let autoplayDelayCurrent = params && params.autoplay ? params.autoplay.delay : 3e3;
7423  let autoplayTimeLeft;
7424  let autoplayStartTime = (/* @__PURE__ */ new Date()).getTime();
7425  let wasPaused;
7426  let isTouched;
7427  let pausedByTouch;
7428  let touchStartTimeout;
7429  let slideChanged;
7430  let pausedByInteraction;
7431  let pausedByPointerEnter;
7432  function onTransitionEnd(e) {
7433    if (!swiper || swiper.destroyed || !swiper.wrapperEl) return;
7434    if (e.target !== swiper.wrapperEl) return;
7435    swiper.wrapperEl.removeEventListener("transitionend", onTransitionEnd);
7436    if (pausedByPointerEnter || e.detail && e.detail.bySwiperTouchMove) {
7437      return;
7438    }
7439    resume();
7440  }
7441  const calcTimeLeft = () => {
7442    if (swiper.destroyed || !swiper.autoplay.running) return;
7443    if (swiper.autoplay.paused) {
7444      wasPaused = true;
7445    } else if (wasPaused) {
7446      autoplayDelayCurrent = autoplayTimeLeft;
7447      wasPaused = false;
vendor: 4,247 bytes, lines 7448-7565
7448    }
7449    const timeLeft = swiper.autoplay.paused ? autoplayTimeLeft : autoplayStartTime + autoplayDelayCurrent - (/* @__PURE__ */ new Date()).getTime();
7450    swiper.autoplay.timeLeft = timeLeft;
7451    emit("autoplayTimeLeft", timeLeft, timeLeft / autoplayDelayTotal);
7452    raf = requestAnimationFrame(() => {
7453      calcTimeLeft();
7454    });
7455  };
7456  const getSlideDelay = () => {
7457    let activeSlideEl;
7458    if (swiper.virtual && swiper.params.virtual.enabled) {
7459      activeSlideEl = swiper.slides.filter((slideEl) => slideEl.classList.contains("swiper-slide-active"))[0];
7460    } else {
7461      activeSlideEl = swiper.slides[swiper.activeIndex];
7462    }
7463    if (!activeSlideEl) return void 0;
7464    const currentSlideDelay = parseInt(activeSlideEl.getAttribute("data-swiper-autoplay"), 10);
7465    return currentSlideDelay;
7466  };
7467  const run = (delayForce) => {
7468    if (swiper.destroyed || !swiper.autoplay.running) return;
7469    cancelAnimationFrame(raf);
7470    calcTimeLeft();
7471    let delay = typeof delayForce === "undefined" ? swiper.params.autoplay.delay : delayForce;
7472    autoplayDelayTotal = swiper.params.autoplay.delay;
7473    autoplayDelayCurrent = swiper.params.autoplay.delay;
7474    const currentSlideDelay = getSlideDelay();
7475    if (!Number.isNaN(currentSlideDelay) && currentSlideDelay > 0 && typeof delayForce === "undefined") {
7476      delay = currentSlideDelay;
7477      autoplayDelayTotal = currentSlideDelay;
7478      autoplayDelayCurrent = currentSlideDelay;
7479    }
7480    autoplayTimeLeft = delay;
7481    const speed = swiper.params.speed;
7482    const proceed = () => {
7483      if (!swiper || swiper.destroyed) return;
7484      if (swiper.params.autoplay.reverseDirection) {
7485        if (!swiper.isBeginning || swiper.params.loop || swiper.params.rewind) {
7486          swiper.slidePrev(speed, true, true);
7487          emit("autoplay");
7488        } else if (!swiper.params.autoplay.stopOnLastSlide) {
7489          swiper.slideTo(swiper.slides.length - 1, speed, true, true);
7490          emit("autoplay");
7491        }
7492      } else {
7493        if (!swiper.isEnd || swiper.params.loop || swiper.params.rewind) {
7494          swiper.slideNext(speed, true, true);
7495          emit("autoplay");
7496        } else if (!swiper.params.autoplay.stopOnLastSlide) {
7497          swiper.slideTo(0, speed, true, true);
7498          emit("autoplay");
7499        }
7500      }
7501      if (swiper.params.cssMode) {
7502        autoplayStartTime = (/* @__PURE__ */ new Date()).getTime();
7503        requestAnimationFrame(() => {
7504          run();
7505        });
7506      }
7507    };
7508    if (delay > 0) {
7509      clearTimeout(timeout);
7510      timeout = setTimeout(() => {
7511        proceed();
7512      }, delay);
7513    } else {
7514      requestAnimationFrame(() => {
7515        proceed();
7516      });
7517    }
7518    return delay;
7519  };
7520  const start = () => {
7521    autoplayStartTime = (/* @__PURE__ */ new Date()).getTime();
7522    swiper.autoplay.running = true;
7523    run();
7524    emit("autoplayStart");
7525  };
7526  const stop = () => {
7527    swiper.autoplay.running = false;
7528    clearTimeout(timeout);
7529    cancelAnimationFrame(raf);
7530    emit("autoplayStop");
7531  };
7532  const pause = (internal, reset) => {
7533    if (swiper.destroyed || !swiper.autoplay.running) return;
7534    clearTimeout(timeout);
7535    if (!internal) {
7536      pausedByInteraction = true;
7537    }
7538    const proceed = () => {
7539      emit("autoplayPause");
7540      if (swiper.params.autoplay.waitForTransition) {
7541        swiper.wrapperEl.addEventListener("transitionend", onTransitionEnd);
7542      } else {
7543        resume();
7544      }
7545    };
7546    swiper.autoplay.paused = true;
7547    if (reset) {
7548      if (slideChanged) {
7549        autoplayTimeLeft = swiper.params.autoplay.delay;
7550      }
7551      slideChanged = false;
7552      proceed();
7553      return;
7554    }
7555    const delay = autoplayTimeLeft || swiper.params.autoplay.delay;
7556    autoplayTimeLeft = delay - ((/* @__PURE__ */ new Date()).getTime() - autoplayStartTime);
7557    if (swiper.isEnd && autoplayTimeLeft < 0 && !swiper.params.loop) return;
7558    if (autoplayTimeLeft < 0) autoplayTimeLeft = 0;
7559    proceed();
7560  };
7561  const resume = () => {
7562    if (swiper.isEnd && autoplayTimeLeft < 0 && !swiper.params.loop || swiper.destroyed || !swiper.autoplay.running) return;
7563    autoplayStartTime = (/* @__PURE__ */ new Date()).getTime();
7564    if (pausedByInteraction) {
7565      pausedByInteraction = false;
vendor: 9,440 bytes, lines 7566-7836
7566      run(autoplayTimeLeft);
7567    } else {
7568      run();
7569    }
7570    swiper.autoplay.paused = false;
7571    emit("autoplayResume");
7572  };
7573  const onVisibilityChange = () => {
7574    if (swiper.destroyed || !swiper.autoplay.running) return;
7575    const document2 = getDocument();
7576    if (document2.visibilityState === "hidden") {
7577      pausedByInteraction = true;
7578      pause(true);
7579    }
7580    if (document2.visibilityState === "visible") {
7581      resume();
7582    }
7583  };
7584  const onPointerEnter = (e) => {
7585    if (e.pointerType !== "mouse") return;
7586    pausedByInteraction = true;
7587    pausedByPointerEnter = true;
7588    if (swiper.animating || swiper.autoplay.paused) return;
7589    pause(true);
7590  };
7591  const onPointerLeave = (e) => {
7592    if (e.pointerType !== "mouse") return;
7593    pausedByPointerEnter = false;
7594    if (swiper.autoplay.paused) {
7595      resume();
7596    }
7597  };
7598  const attachMouseEvents = () => {
7599    if (swiper.params.autoplay.pauseOnMouseEnter) {
7600      swiper.el.addEventListener("pointerenter", onPointerEnter);
7601      swiper.el.addEventListener("pointerleave", onPointerLeave);
7602    }
7603  };
7604  const detachMouseEvents = () => {
7605    if (swiper.el && typeof swiper.el !== "string") {
7606      swiper.el.removeEventListener("pointerenter", onPointerEnter);
7607      swiper.el.removeEventListener("pointerleave", onPointerLeave);
7608    }
7609  };
7610  const attachDocumentEvents = () => {
7611    const document2 = getDocument();
7612    document2.addEventListener("visibilitychange", onVisibilityChange);
7613  };
7614  const detachDocumentEvents = () => {
7615    const document2 = getDocument();
7616    document2.removeEventListener("visibilitychange", onVisibilityChange);
7617  };
7618  on("init", () => {
7619    if (swiper.params.autoplay.enabled) {
7620      attachMouseEvents();
7621      attachDocumentEvents();
7622      start();
7623    }
7624  });
7625  on("destroy", () => {
7626    detachMouseEvents();
7627    detachDocumentEvents();
7628    if (swiper.autoplay.running) {
7629      stop();
7630    }
7631  });
7632  on("_freeModeStaticRelease", () => {
7633    if (pausedByTouch || pausedByInteraction) {
7634      resume();
7635    }
7636  });
7637  on("_freeModeNoMomentumRelease", () => {
7638    if (!swiper.params.autoplay.disableOnInteraction) {
7639      pause(true, true);
7640    } else {
7641      stop();
7642    }
7643  });
7644  on("beforeTransitionStart", (_s, speed, internal) => {
7645    if (swiper.destroyed || !swiper.autoplay.running) return;
7646    if (internal || !swiper.params.autoplay.disableOnInteraction) {
7647      pause(true, true);
7648    } else {
7649      stop();
7650    }
7651  });
7652  on("sliderFirstMove", () => {
7653    if (swiper.destroyed || !swiper.autoplay.running) return;
7654    if (swiper.params.autoplay.disableOnInteraction) {
7655      stop();
7656      return;
7657    }
7658    isTouched = true;
7659    pausedByTouch = false;
7660    pausedByInteraction = false;
7661    touchStartTimeout = setTimeout(() => {
7662      pausedByInteraction = true;
7663      pausedByTouch = true;
7664      pause(true);
7665    }, 200);
7666  });
7667  on("touchEnd", () => {
7668    if (swiper.destroyed || !swiper.autoplay.running || !isTouched) return;
7669    clearTimeout(touchStartTimeout);
7670    clearTimeout(timeout);
7671    if (swiper.params.autoplay.disableOnInteraction) {
7672      pausedByTouch = false;
7673      isTouched = false;
7674      return;
7675    }
7676    if (pausedByTouch && swiper.params.cssMode) resume();
7677    pausedByTouch = false;
7678    isTouched = false;
7679  });
7680  on("slideChange", () => {
7681    if (swiper.destroyed || !swiper.autoplay.running) return;
7682    slideChanged = true;
7683  });
7684  Object.assign(swiper.autoplay, {
7685    start,
7686    stop,
7687    pause,
7688    resume
7689  });
7690}
7691function Thumb(_ref) {
7692  let {
7693    swiper,
7694    extendParams,
7695    on
7696  } = _ref;
7697  extendParams({
7698    thumbs: {
7699      swiper: null,
7700      multipleActiveThumbs: true,
7701      autoScrollOffset: 0,
7702      slideThumbActiveClass: "swiper-slide-thumb-active",
7703      thumbsContainerClass: "swiper-thumbs"
7704    }
7705  });
7706  let initialized = false;
7707  let swiperCreated = false;
7708  swiper.thumbs = {
7709    swiper: null
7710  };
7711  function onThumbClick() {
7712    const thumbsSwiper = swiper.thumbs.swiper;
7713    if (!thumbsSwiper || thumbsSwiper.destroyed) return;
7714    const clickedIndex = thumbsSwiper.clickedIndex;
7715    const clickedSlide = thumbsSwiper.clickedSlide;
7716    if (clickedSlide && clickedSlide.classList.contains(swiper.params.thumbs.slideThumbActiveClass)) return;
7717    if (typeof clickedIndex === "undefined" || clickedIndex === null) return;
7718    let slideToIndex;
7719    if (thumbsSwiper.params.loop) {
7720      slideToIndex = parseInt(thumbsSwiper.clickedSlide.getAttribute("data-swiper-slide-index"), 10);
7721    } else {
7722      slideToIndex = clickedIndex;
7723    }
7724    if (swiper.params.loop) {
7725      swiper.slideToLoop(slideToIndex);
7726    } else {
7727      swiper.slideTo(slideToIndex);
7728    }
7729  }
7730  function init() {
7731    const {
7732      thumbs: thumbsParams
7733    } = swiper.params;
7734    if (initialized) return false;
7735    initialized = true;
7736    const SwiperClass = swiper.constructor;
7737    if (thumbsParams.swiper instanceof SwiperClass) {
7738      swiper.thumbs.swiper = thumbsParams.swiper;
7739      Object.assign(swiper.thumbs.swiper.originalParams, {
7740        watchSlidesProgress: true,
7741        slideToClickedSlide: false
7742      });
7743      Object.assign(swiper.thumbs.swiper.params, {
7744        watchSlidesProgress: true,
7745        slideToClickedSlide: false
7746      });
7747      swiper.thumbs.swiper.update();
7748    } else if (isObject(thumbsParams.swiper)) {
7749      const thumbsSwiperParams = Object.assign({}, thumbsParams.swiper);
7750      Object.assign(thumbsSwiperParams, {
7751        watchSlidesProgress: true,
7752        slideToClickedSlide: false
7753      });
7754      swiper.thumbs.swiper = new SwiperClass(thumbsSwiperParams);
7755      swiperCreated = true;
7756    }
7757    swiper.thumbs.swiper.el.classList.add(swiper.params.thumbs.thumbsContainerClass);
7758    swiper.thumbs.swiper.on("tap", onThumbClick);
7759    return true;
7760  }
7761  function update2(initial) {
7762    const thumbsSwiper = swiper.thumbs.swiper;
7763    if (!thumbsSwiper || thumbsSwiper.destroyed) return;
7764    const slidesPerView = thumbsSwiper.params.slidesPerView === "auto" ? thumbsSwiper.slidesPerViewDynamic() : thumbsSwiper.params.slidesPerView;
7765    let thumbsToActivate = 1;
7766    const thumbActiveClass = swiper.params.thumbs.slideThumbActiveClass;
7767    if (swiper.params.slidesPerView > 1 && !swiper.params.centeredSlides) {
7768      thumbsToActivate = swiper.params.slidesPerView;
7769    }
7770    if (!swiper.params.thumbs.multipleActiveThumbs) {
7771      thumbsToActivate = 1;
7772    }
7773    thumbsToActivate = Math.floor(thumbsToActivate);
7774    thumbsSwiper.slides.forEach((slideEl) => slideEl.classList.remove(thumbActiveClass));
7775    if (thumbsSwiper.params.loop || thumbsSwiper.params.virtual && thumbsSwiper.params.virtual.enabled) {
7776      for (let i = 0; i < thumbsToActivate; i += 1) {
7777        elementChildren(thumbsSwiper.slidesEl, `[data-swiper-slide-index="${swiper.realIndex + i}"]`).forEach((slideEl) => {
7778          slideEl.classList.add(thumbActiveClass);
7779        });
7780      }
7781    } else {
7782      for (let i = 0; i < thumbsToActivate; i += 1) {
7783        if (thumbsSwiper.slides[swiper.realIndex + i]) {
7784          thumbsSwiper.slides[swiper.realIndex + i].classList.add(thumbActiveClass);
7785        }
7786      }
7787    }
7788    const autoScrollOffset = swiper.params.thumbs.autoScrollOffset;
7789    const useOffset = autoScrollOffset && !thumbsSwiper.params.loop;
7790    if (swiper.realIndex !== thumbsSwiper.realIndex || useOffset) {
7791      const currentThumbsIndex = thumbsSwiper.activeIndex;
7792      let newThumbsIndex;
7793      let direction;
7794      if (thumbsSwiper.params.loop) {
7795        const newThumbsSlide = thumbsSwiper.slides.filter((slideEl) => slideEl.getAttribute("data-swiper-slide-index") === `${swiper.realIndex}`)[0];
7796        newThumbsIndex = thumbsSwiper.slides.indexOf(newThumbsSlide);
7797        direction = swiper.activeIndex > swiper.previousIndex ? "next" : "prev";
7798      } else {
7799        newThumbsIndex = swiper.realIndex;
7800        direction = newThumbsIndex > swiper.previousIndex ? "next" : "prev";
7801      }
7802      if (useOffset) {
7803        newThumbsIndex += direction === "next" ? autoScrollOffset : -1 * autoScrollOffset;
7804      }
7805      if (thumbsSwiper.visibleSlidesIndexes && thumbsSwiper.visibleSlidesIndexes.indexOf(newThumbsIndex) < 0) {
7806        if (thumbsSwiper.params.centeredSlides) {
7807          if (newThumbsIndex > currentThumbsIndex) {
7808            newThumbsIndex = newThumbsIndex - Math.floor(slidesPerView / 2) + 1;
7809          } else {
7810            newThumbsIndex = newThumbsIndex + Math.floor(slidesPerView / 2) - 1;
7811          }
7812        } else if (newThumbsIndex > currentThumbsIndex && thumbsSwiper.params.slidesPerGroup === 1) ;
7813        thumbsSwiper.slideTo(newThumbsIndex, initial ? 0 : void 0);
7814      }
7815    }
7816  }
7817  on("beforeInit", () => {
7818    const {
7819      thumbs
7820    } = swiper.params;
7821    if (!thumbs || !thumbs.swiper) return;
7822    if (typeof thumbs.swiper === "string" || thumbs.swiper instanceof HTMLElement) {
7823      const document2 = getDocument();
7824      const getThumbsElementAndInit = () => {
7825        const thumbsElement = typeof thumbs.swiper === "string" ? document2.querySelector(thumbs.swiper) : thumbs.swiper;
7826        if (thumbsElement && thumbsElement.swiper) {
7827          thumbs.swiper = thumbsElement.swiper;
7828          init();
7829          update2(true);
7830        } else if (thumbsElement) {
7831          const eventName = `${swiper.params.eventsPrefix}init`;
7832          const onThumbsSwiper = (e) => {
7833            thumbs.swiper = e.detail[0];
7834            thumbsElement.removeEventListener(eventName, onThumbsSwiper);
7835            init();
7836            update2(true);
7837            thumbs.swiper.update();
7838            swiper.update();
7839          };
7840          thumbsElement.addEventListener(eventName, onThumbsSwiper);
7841        }
7842        return thumbsElement;
7843      };
7844      const watchForThumbsToAppear = () => {
7845        if (swiper.destroyed) return;
7846        const thumbsElement = getThumbsElementAndInit();
7847        if (!thumbsElement) {
7848          requestAnimationFrame(watchForThumbsToAppear);
7849        }
7850      };
7851      requestAnimationFrame(watchForThumbsToAppear);
7852    } else {
7853      init();
7854      update2(true);
7855    }
7856  });
7857  on("slideChange update resize observerUpdate", () => {
7858    update2();
7859  });
7860  on("setTransition", (_s, duration) => {
7861    const thumbsSwiper = swiper.thumbs.swiper;
7862    if (!thumbsSwiper || thumbsSwiper.destroyed) return;
7863    thumbsSwiper.setTransition(duration);
7864  });
7865  on("beforeDestroy", () => {
7866    const thumbsSwiper = swiper.thumbs.swiper;
7867    if (!thumbsSwiper || thumbsSwiper.destroyed) return;
7868    if (swiperCreated) {
7869      thumbsSwiper.destroy();
7870    }
7871  });
7872  Object.assign(swiper.thumbs, {
7873    init,
7874    update: update2
7875  });
7876}
7877function freeMode(_ref) {
7878  let {
7879    swiper,
7880    extendParams,
7881    emit,
7882    once
7883  } = _ref;
7884  extendParams({
7885    freeMode: {
7886      enabled: false,
7887      momentum: true,
7888      momentumRatio: 1,
7889      momentumBounce: true,
7890      momentumBounceRatio: 1,
7891      momentumVelocityRatio: 1,
7892      sticky: false,
7893      minimumVelocity: 0.02
7894    }
7895  });
7896  function onTouchStart2() {
7897    if (swiper.params.cssMode) return;
7898    const translate2 = swiper.getTranslate();
7899    swiper.setTranslate(translate2);
7900    swiper.setTransition(0);
7901    swiper.touchEventsData.velocities.length = 0;
7902    swiper.freeMode.onTouchEnd({
7903      currentPos: swiper.rtl ? swiper.translate : -swiper.translate
7904    });
7905  }
7906  function onTouchMove2() {
7907    if (swiper.params.cssMode) return;
7908    const {
7909      touchEventsData: data,
7910      touches
7911    } = swiper;
7912    if (data.velocities.length === 0) {
7913      data.velocities.push({
7914        position: touches[swiper.isHorizontal() ? "startX" : "startY"],
7915        time: data.touchStartTime
7916      });
7917    }
7918    data.velocities.push({
7919      position: touches[swiper.isHorizontal() ? "currentX" : "currentY"],
7920      time: now()
7921    });
7922  }
7923  function onTouchEnd2(_ref2) {
7924    let {
7925      currentPos
7926    } = _ref2;
7927    if (swiper.params.cssMode) return;
7928    const {
7929      params,
7930      wrapperEl,
7931      rtlTranslate: rtl,
7932      snapGrid,
7933      touchEventsData: data
7934    } = swiper;
7935    const touchEndTime = now();
7936    const timeDiff = touchEndTime - data.touchStartTime;
vendor: 6,193 bytes, lines 7937-8109
7937    if (currentPos < -swiper.minTranslate()) {
7938      swiper.slideTo(swiper.activeIndex);
7939      return;
7940    }
7941    if (currentPos > -swiper.maxTranslate()) {
7942      if (swiper.slides.length < snapGrid.length) {
7943        swiper.slideTo(snapGrid.length - 1);
7944      } else {
7945        swiper.slideTo(swiper.slides.length - 1);
7946      }
7947      return;
7948    }
7949    if (params.freeMode.momentum) {
7950      if (data.velocities.length > 1) {
7951        const lastMoveEvent = data.velocities.pop();
7952        const velocityEvent = data.velocities.pop();
7953        const distance = lastMoveEvent.position - velocityEvent.position;
7954        const time = lastMoveEvent.time - velocityEvent.time;
7955        swiper.velocity = distance / time;
7956        swiper.velocity /= 2;
7957        if (Math.abs(swiper.velocity) < params.freeMode.minimumVelocity) {
7958          swiper.velocity = 0;
7959        }
7960        if (time > 150 || now() - lastMoveEvent.time > 300) {
7961          swiper.velocity = 0;
7962        }
7963      } else {
7964        swiper.velocity = 0;
7965      }
7966      swiper.velocity *= params.freeMode.momentumVelocityRatio;
7967      data.velocities.length = 0;
7968      let momentumDuration = 1e3 * params.freeMode.momentumRatio;
7969      const momentumDistance = swiper.velocity * momentumDuration;
7970      let newPosition = swiper.translate + momentumDistance;
7971      if (rtl) newPosition = -newPosition;
7972      let doBounce = false;
7973      let afterBouncePosition;
7974      const bounceAmount = Math.abs(swiper.velocity) * 20 * params.freeMode.momentumBounceRatio;
7975      let needsLoopFix;
7976      if (newPosition < swiper.maxTranslate()) {
7977        if (params.freeMode.momentumBounce) {
7978          if (newPosition + swiper.maxTranslate() < -bounceAmount) {
7979            newPosition = swiper.maxTranslate() - bounceAmount;
7980          }
7981          afterBouncePosition = swiper.maxTranslate();
7982          doBounce = true;
7983          data.allowMomentumBounce = true;
7984        } else {
7985          newPosition = swiper.maxTranslate();
7986        }
7987        if (params.loop && params.centeredSlides) needsLoopFix = true;
7988      } else if (newPosition > swiper.minTranslate()) {
7989        if (params.freeMode.momentumBounce) {
7990          if (newPosition - swiper.minTranslate() > bounceAmount) {
7991            newPosition = swiper.minTranslate() + bounceAmount;
7992          }
7993          afterBouncePosition = swiper.minTranslate();
7994          doBounce = true;
7995          data.allowMomentumBounce = true;
7996        } else {
7997          newPosition = swiper.minTranslate();
7998        }
7999        if (params.loop && params.centeredSlides) needsLoopFix = true;
8000      } else if (params.freeMode.sticky) {
8001        let nextSlide;
8002        for (let j = 0; j < snapGrid.length; j += 1) {
8003          if (snapGrid[j] > -newPosition) {
8004            nextSlide = j;
8005            break;
8006          }
8007        }
8008        if (Math.abs(snapGrid[nextSlide] - newPosition) < Math.abs(snapGrid[nextSlide - 1] - newPosition) || swiper.swipeDirection === "next") {
8009          newPosition = snapGrid[nextSlide];
8010        } else {
8011          newPosition = snapGrid[nextSlide - 1];
8012        }
8013        newPosition = -newPosition;
8014      }
8015      if (needsLoopFix) {
8016        once("transitionEnd", () => {
8017          swiper.loopFix();
8018        });
8019      }
8020      if (swiper.velocity !== 0) {
8021        if (rtl) {
8022          momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity);
8023        } else {
8024          momentumDuration = Math.abs((newPosition - swiper.translate) / swiper.velocity);
8025        }
8026        if (params.freeMode.sticky) {
8027          const moveDistance = Math.abs((rtl ? -newPosition : newPosition) - swiper.translate);
8028          const currentSlideSize = swiper.slidesSizesGrid[swiper.activeIndex];
8029          if (moveDistance < currentSlideSize) {
8030            momentumDuration = params.speed;
8031          } else if (moveDistance < 2 * currentSlideSize) {
8032            momentumDuration = params.speed * 1.5;
8033          } else {
8034            momentumDuration = params.speed * 2.5;
8035          }
8036        }
8037      } else if (params.freeMode.sticky) {
8038        swiper.slideToClosest();
8039        return;
8040      }
8041      if (params.freeMode.momentumBounce && doBounce) {
8042        swiper.updateProgress(afterBouncePosition);
8043        swiper.setTransition(momentumDuration);
8044        swiper.setTranslate(newPosition);
8045        swiper.transitionStart(true, swiper.swipeDirection);
8046        swiper.animating = true;
8047        elementTransitionEnd(wrapperEl, () => {
8048          if (!swiper || swiper.destroyed || !data.allowMomentumBounce) return;
8049          emit("momentumBounce");
8050          swiper.setTransition(params.speed);
8051          setTimeout(() => {
8052            swiper.setTranslate(afterBouncePosition);
8053            elementTransitionEnd(wrapperEl, () => {
8054              if (!swiper || swiper.destroyed) return;
8055              swiper.transitionEnd();
8056            });
8057          }, 0);
8058        });
8059      } else if (swiper.velocity) {
8060        emit("_freeModeNoMomentumRelease");
8061        swiper.updateProgress(newPosition);
8062        swiper.setTransition(momentumDuration);
8063        swiper.setTranslate(newPosition);
8064        swiper.transitionStart(true, swiper.swipeDirection);
8065        if (!swiper.animating) {
8066          swiper.animating = true;
8067          elementTransitionEnd(wrapperEl, () => {
8068            if (!swiper || swiper.destroyed) return;
8069            swiper.transitionEnd();
8070          });
8071        }
8072      } else {
8073        swiper.updateProgress(newPosition);
8074      }
8075      swiper.updateActiveIndex();
8076      swiper.updateSlidesClasses();
8077    } else if (params.freeMode.sticky) {
8078      swiper.slideToClosest();
8079      return;
8080    } else if (params.freeMode) {
8081      emit("_freeModeNoMomentumRelease");
8082    }
8083    if (!params.freeMode.momentum || timeDiff >= params.longSwipesMs) {
8084      emit("_freeModeStaticRelease");
8085      swiper.updateProgress();
8086      swiper.updateActiveIndex();
8087      swiper.updateSlidesClasses();
8088    }
8089  }
8090  Object.assign(swiper, {
8091    freeMode: {
8092      onTouchStart: onTouchStart2,
8093      onTouchMove: onTouchMove2,
8094      onTouchEnd: onTouchEnd2
8095    }
8096  });
8097}
8098function Grid(_ref) {
8099  let {
8100    swiper,
8101    extendParams,
8102    on
8103  } = _ref;
8104  extendParams({
8105    grid: {
8106      rows: 1,
8107      fill: "column"
8108    }
8109  });
vendor: 5,798 bytes, lines 8110-8280
8110  let slidesNumberEvenToRows;
8111  let slidesPerRow;
8112  let numFullColumns;
8113  let wasMultiRow;
8114  const getSpaceBetween = () => {
8115    let spaceBetween = swiper.params.spaceBetween;
8116    if (typeof spaceBetween === "string" && spaceBetween.indexOf("%") >= 0) {
8117      spaceBetween = parseFloat(spaceBetween.replace("%", "")) / 100 * swiper.size;
8118    } else if (typeof spaceBetween === "string") {
8119      spaceBetween = parseFloat(spaceBetween);
8120    }
8121    return spaceBetween;
8122  };
8123  const initSlides = (slides) => {
8124    const {
8125      slidesPerView
8126    } = swiper.params;
8127    const {
8128      rows,
8129      fill
8130    } = swiper.params.grid;
8131    const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : slides.length;
8132    numFullColumns = Math.floor(slidesLength / rows);
8133    if (Math.floor(slidesLength / rows) === slidesLength / rows) {
8134      slidesNumberEvenToRows = slidesLength;
8135    } else {
8136      slidesNumberEvenToRows = Math.ceil(slidesLength / rows) * rows;
8137    }
8138    if (slidesPerView !== "auto" && fill === "row") {
8139      slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, slidesPerView * rows);
8140    }
8141    slidesPerRow = slidesNumberEvenToRows / rows;
8142  };
8143  const unsetSlides = () => {
8144    if (swiper.slides) {
8145      swiper.slides.forEach((slide2) => {
8146        if (slide2.swiperSlideGridSet) {
8147          slide2.style.height = "";
8148          slide2.style[swiper.getDirectionLabel("margin-top")] = "";
8149        }
8150      });
8151    }
8152  };
8153  const updateSlide = (i, slide2, slides) => {
8154    const {
8155      slidesPerGroup
8156    } = swiper.params;
8157    const spaceBetween = getSpaceBetween();
8158    const {
8159      rows,
8160      fill
8161    } = swiper.params.grid;
8162    const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : slides.length;
8163    let newSlideOrderIndex;
8164    let column;
8165    let row;
8166    if (fill === "row" && slidesPerGroup > 1) {
8167      const groupIndex = Math.floor(i / (slidesPerGroup * rows));
8168      const slideIndexInGroup = i - rows * slidesPerGroup * groupIndex;
8169      const columnsInGroup = groupIndex === 0 ? slidesPerGroup : Math.min(Math.ceil((slidesLength - groupIndex * rows * slidesPerGroup) / rows), slidesPerGroup);
8170      row = Math.floor(slideIndexInGroup / columnsInGroup);
8171      column = slideIndexInGroup - row * columnsInGroup + groupIndex * slidesPerGroup;
8172      newSlideOrderIndex = column + row * slidesNumberEvenToRows / rows;
8173      slide2.style.order = newSlideOrderIndex;
8174    } else if (fill === "column") {
8175      column = Math.floor(i / rows);
8176      row = i - column * rows;
8177      if (column > numFullColumns || column === numFullColumns && row === rows - 1) {
8178        row += 1;
8179        if (row >= rows) {
8180          row = 0;
8181          column += 1;
8182        }
8183      }
8184    } else {
8185      row = Math.floor(i / slidesPerRow);
8186      column = i - row * slidesPerRow;
8187    }
8188    slide2.row = row;
8189    slide2.column = column;
8190    slide2.style.height = `calc((100% - ${(rows - 1) * spaceBetween}px) / ${rows})`;
8191    slide2.style[swiper.getDirectionLabel("margin-top")] = row !== 0 ? spaceBetween && `${spaceBetween}px` : "";
8192    slide2.swiperSlideGridSet = true;
8193  };
8194  const updateWrapperSize = (slideSize, snapGrid) => {
8195    const {
8196      centeredSlides,
8197      roundLengths
8198    } = swiper.params;
8199    const spaceBetween = getSpaceBetween();
8200    const {
8201      rows
8202    } = swiper.params.grid;
8203    swiper.virtualSize = (slideSize + spaceBetween) * slidesNumberEvenToRows;
8204    swiper.virtualSize = Math.ceil(swiper.virtualSize / rows) - spaceBetween;
8205    if (!swiper.params.cssMode) {
8206      swiper.wrapperEl.style[swiper.getDirectionLabel("width")] = `${swiper.virtualSize + spaceBetween}px`;
8207    }
8208    if (centeredSlides) {
8209      const newSlidesGrid = [];
8210      for (let i = 0; i < snapGrid.length; i += 1) {
8211        let slidesGridItem = snapGrid[i];
8212        if (roundLengths) slidesGridItem = Math.floor(slidesGridItem);
8213        if (snapGrid[i] < swiper.virtualSize + snapGrid[0]) newSlidesGrid.push(slidesGridItem);
8214      }
8215      snapGrid.splice(0, snapGrid.length);
8216      snapGrid.push(...newSlidesGrid);
8217    }
8218  };
8219  const onInit = () => {
8220    wasMultiRow = swiper.params.grid && swiper.params.grid.rows > 1;
8221  };
8222  const onUpdate = () => {
8223    const {
8224      params,
8225      el
8226    } = swiper;
8227    const isMultiRow = params.grid && params.grid.rows > 1;
8228    if (wasMultiRow && !isMultiRow) {
8229      el.classList.remove(`${params.containerModifierClass}grid`, `${params.containerModifierClass}grid-column`);
8230      numFullColumns = 1;
8231      swiper.emitContainerClasses();
8232    } else if (!wasMultiRow && isMultiRow) {
8233      el.classList.add(`${params.containerModifierClass}grid`);
8234      if (params.grid.fill === "column") {
8235        el.classList.add(`${params.containerModifierClass}grid-column`);
8236      }
8237      swiper.emitContainerClasses();
8238    }
8239    wasMultiRow = isMultiRow;
8240  };
8241  on("init", onInit);
8242  on("update", onUpdate);
8243  swiper.grid = {
8244    initSlides,
8245    unsetSlides,
8246    updateSlide,
8247    updateWrapperSize
8248  };
8249}
8250function appendSlide(slides) {
8251  const swiper = this;
8252  const {
8253    params,
8254    slidesEl
8255  } = swiper;
8256  if (params.loop) {
8257    swiper.loopDestroy();
8258  }
8259  const appendElement = (slideEl) => {
8260    if (typeof slideEl === "string") {
8261      const tempDOM = document.createElement("div");
8262      tempDOM.innerHTML = slideEl;
8263      slidesEl.append(tempDOM.children[0]);
8264      tempDOM.innerHTML = "";
8265    } else {
8266      slidesEl.append(slideEl);
8267    }
8268  };
8269  if (typeof slides === "object" && "length" in slides) {
8270    for (let i = 0; i < slides.length; i += 1) {
8271      if (slides[i]) appendElement(slides[i]);
8272    }
8273  } else {
8274    appendElement(slides);
8275  }
8276  swiper.recalcSlides();
8277  if (params.loop) {
8278    swiper.loopCreate();
8279  }
8280  if (!params.observer || swiper.isElement) {
vendor: 4,768 bytes, lines 8281-8452
8281    swiper.update();
8282  }
8283}
8284function prependSlide(slides) {
8285  const swiper = this;
8286  const {
8287    params,
8288    activeIndex,
8289    slidesEl
8290  } = swiper;
8291  if (params.loop) {
8292    swiper.loopDestroy();
8293  }
8294  let newActiveIndex = activeIndex + 1;
8295  const prependElement = (slideEl) => {
8296    if (typeof slideEl === "string") {
8297      const tempDOM = document.createElement("div");
8298      tempDOM.innerHTML = slideEl;
8299      slidesEl.prepend(tempDOM.children[0]);
8300      tempDOM.innerHTML = "";
8301    } else {
8302      slidesEl.prepend(slideEl);
8303    }
8304  };
8305  if (typeof slides === "object" && "length" in slides) {
8306    for (let i = 0; i < slides.length; i += 1) {
8307      if (slides[i]) prependElement(slides[i]);
8308    }
8309    newActiveIndex = activeIndex + slides.length;
8310  } else {
8311    prependElement(slides);
8312  }
8313  swiper.recalcSlides();
8314  if (params.loop) {
8315    swiper.loopCreate();
8316  }
8317  if (!params.observer || swiper.isElement) {
8318    swiper.update();
8319  }
8320  swiper.slideTo(newActiveIndex, 0, false);
8321}
8322function addSlide(index, slides) {
8323  const swiper = this;
8324  const {
8325    params,
8326    activeIndex,
8327    slidesEl
8328  } = swiper;
8329  let activeIndexBuffer = activeIndex;
8330  if (params.loop) {
8331    activeIndexBuffer -= swiper.loopedSlides;
8332    swiper.loopDestroy();
8333    swiper.recalcSlides();
8334  }
8335  const baseLength = swiper.slides.length;
8336  if (index <= 0) {
8337    swiper.prependSlide(slides);
8338    return;
8339  }
8340  if (index >= baseLength) {
8341    swiper.appendSlide(slides);
8342    return;
8343  }
8344  let newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + 1 : activeIndexBuffer;
8345  const slidesBuffer = [];
8346  for (let i = baseLength - 1; i >= index; i -= 1) {
8347    const currentSlide = swiper.slides[i];
8348    currentSlide.remove();
8349    slidesBuffer.unshift(currentSlide);
8350  }
8351  if (typeof slides === "object" && "length" in slides) {
8352    for (let i = 0; i < slides.length; i += 1) {
8353      if (slides[i]) slidesEl.append(slides[i]);
8354    }
8355    newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + slides.length : activeIndexBuffer;
8356  } else {
8357    slidesEl.append(slides);
8358  }
8359  for (let i = 0; i < slidesBuffer.length; i += 1) {
8360    slidesEl.append(slidesBuffer[i]);
8361  }
8362  swiper.recalcSlides();
8363  if (params.loop) {
8364    swiper.loopCreate();
8365  }
8366  if (!params.observer || swiper.isElement) {
8367    swiper.update();
8368  }
8369  if (params.loop) {
8370    swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);
8371  } else {
8372    swiper.slideTo(newActiveIndex, 0, false);
8373  }
8374}
8375function removeSlide(slidesIndexes) {
8376  const swiper = this;
8377  const {
8378    params,
8379    activeIndex
8380  } = swiper;
8381  let activeIndexBuffer = activeIndex;
8382  if (params.loop) {
8383    activeIndexBuffer -= swiper.loopedSlides;
8384    swiper.loopDestroy();
8385  }
8386  let newActiveIndex = activeIndexBuffer;
8387  let indexToRemove;
8388  if (typeof slidesIndexes === "object" && "length" in slidesIndexes) {
8389    for (let i = 0; i < slidesIndexes.length; i += 1) {
8390      indexToRemove = slidesIndexes[i];
8391      if (swiper.slides[indexToRemove]) swiper.slides[indexToRemove].remove();
8392      if (indexToRemove < newActiveIndex) newActiveIndex -= 1;
8393    }
8394    newActiveIndex = Math.max(newActiveIndex, 0);
8395  } else {
8396    indexToRemove = slidesIndexes;
8397    if (swiper.slides[indexToRemove]) swiper.slides[indexToRemove].remove();
8398    if (indexToRemove < newActiveIndex) newActiveIndex -= 1;
8399    newActiveIndex = Math.max(newActiveIndex, 0);
8400  }
8401  swiper.recalcSlides();
8402  if (params.loop) {
8403    swiper.loopCreate();
8404  }
8405  if (!params.observer || swiper.isElement) {
8406    swiper.update();
8407  }
8408  if (params.loop) {
8409    swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);
8410  } else {
8411    swiper.slideTo(newActiveIndex, 0, false);
8412  }
8413}
8414function removeAllSlides() {
8415  const swiper = this;
8416  const slidesIndexes = [];
8417  for (let i = 0; i < swiper.slides.length; i += 1) {
8418    slidesIndexes.push(i);
8419  }
8420  swiper.removeSlide(slidesIndexes);
8421}
8422function Manipulation(_ref) {
8423  let {
8424    swiper
8425  } = _ref;
8426  Object.assign(swiper, {
8427    appendSlide: appendSlide.bind(swiper),
8428    prependSlide: prependSlide.bind(swiper),
8429    addSlide: addSlide.bind(swiper),
8430    removeSlide: removeSlide.bind(swiper),
8431    removeAllSlides: removeAllSlides.bind(swiper)
8432  });
8433}
8434function effectInit(params) {
8435  const {
8436    effect,
8437    swiper,
8438    on,
8439    setTranslate: setTranslate2,
8440    setTransition: setTransition2,
8441    overwriteParams,
8442    perspective,
8443    recreateShadows,
8444    getEffectParams
8445  } = params;
8446  on("beforeInit", () => {
8447    if (swiper.params.effect !== effect) return;
8448    swiper.classNames.push(`${swiper.params.containerModifierClass}${effect}`);
8449    if (perspective && perspective()) {
8450      swiper.classNames.push(`${swiper.params.containerModifierClass}3d`);
8451    }
8452    const overwriteParamsResult = overwriteParams ? overwriteParams() : {};
8453    Object.assign(swiper.params, overwriteParamsResult);
8454    Object.assign(swiper.originalParams, overwriteParamsResult);
8455  });
8456  on("setTranslate", () => {
8457    if (swiper.params.effect !== effect) return;
8458    setTranslate2();
8459  });
8460  on("setTransition", (_s, duration) => {
8461    if (swiper.params.effect !== effect) return;
8462    setTransition2(duration);
8463  });
8464  on("transitionEnd", () => {
8465    if (swiper.params.effect !== effect) return;
8466    if (recreateShadows) {
8467      if (!getEffectParams || !getEffectParams().slideShadows) return;
8468      swiper.slides.forEach((slideEl) => {
8469        slideEl.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((shadowEl) => shadowEl.remove());
8470      });
8471      recreateShadows();
8472    }
8473  });
8474  let requireUpdateOnVirtual;
8475  on("virtualUpdate", () => {
8476    if (swiper.params.effect !== effect) return;
8477    if (!swiper.slides.length) {
8478      requireUpdateOnVirtual = true;
8479    }
8480    requestAnimationFrame(() => {
8481      if (requireUpdateOnVirtual && swiper.slides && swiper.slides.length) {
8482        setTranslate2();
8483        requireUpdateOnVirtual = false;
8484      }
8485    });
8486  });
8487}
8488function effectTarget(effectParams, slideEl) {
8489  const transformEl = getSlideTransformEl(slideEl);
8490  if (transformEl !== slideEl) {
8491    transformEl.style.backfaceVisibility = "hidden";
8492    transformEl.style["-webkit-backface-visibility"] = "hidden";
8493  }
8494  return transformEl;
8495}
8496function effectVirtualTransitionEnd(_ref) {
8497  let {
8498    swiper,
8499    duration,
8500    transformElements,
8501    allSlides
8502  } = _ref;
8503  const {
8504    activeIndex
8505  } = swiper;
8506  const getSlide = (el) => {
8507    if (!el.parentElement) {
8508      const slide2 = swiper.slides.filter((slideEl) => slideEl.shadowRoot && slideEl.shadowRoot === el.parentNode)[0];
8509      return slide2;
8510    }
8511    return el.parentElement;
8512  };
8513  if (swiper.params.virtualTranslate && duration !== 0) {
8514    let eventTriggered = false;
8515    let transitionEndTarget;
8516    if (allSlides) {
8517      transitionEndTarget = transformElements;
8518    } else {
8519      transitionEndTarget = transformElements.filter((transformEl) => {
8520        const el = transformEl.classList.contains("swiper-slide-transform") ? getSlide(transformEl) : transformEl;
8521        return swiper.getSlideIndex(el) === activeIndex;
8522      });
8523    }
8524    transitionEndTarget.forEach((el) => {
8525      elementTransitionEnd(el, () => {
8526        if (eventTriggered) return;
8527        if (!swiper || swiper.destroyed) return;
8528        eventTriggered = true;
8529        swiper.animating = false;
8530        const evt = new window.CustomEvent("transitionend", {
8531          bubbles: true,
8532          cancelable: true
8533        });
8534        swiper.wrapperEl.dispatchEvent(evt);
8535      });
8536    });
8537  }
8538}
8539function EffectFade(_ref) {
8540  let {
8541    swiper,
8542    extendParams,
8543    on
8544  } = _ref;
8545  extendParams({
8546    fadeEffect: {
8547      crossFade: false
8548    }
8549  });
8550  const setTranslate2 = () => {
8551    const {
8552      slides
8553    } = swiper;
8554    const params = swiper.params.fadeEffect;
8555    for (let i = 0; i < slides.length; i += 1) {
8556      const slideEl = swiper.slides[i];
8557      const offset = slideEl.swiperSlideOffset;
8558      let tx = -offset;
8559      if (!swiper.params.virtualTranslate) tx -= swiper.translate;
8560      let ty = 0;
8561      if (!swiper.isHorizontal()) {
8562        ty = tx;
8563        tx = 0;
8564      }
8565      const slideOpacity = swiper.params.fadeEffect.crossFade ? Math.max(1 - Math.abs(slideEl.progress), 0) : 1 + Math.min(Math.max(slideEl.progress, -1), 0);
8566      const targetEl = effectTarget(params, slideEl);
8567      targetEl.style.opacity = slideOpacity;
8568      targetEl.style.transform = `translate3d(${tx}px, ${ty}px, 0px)`;
8569    }
8570  };
8571  const setTransition2 = (duration) => {
8572    const transformElements = swiper.slides.map((slideEl) => getSlideTransformEl(slideEl));
8573    transformElements.forEach((el) => {
8574      el.style.transitionDuration = `${duration}ms`;
8575    });
8576    effectVirtualTransitionEnd({
8577      swiper,
8578      duration,
8579      transformElements,
8580      allSlides: true
8581    });
8582  };
8583  effectInit({
8584    effect: "fade",
8585    swiper,
8586    on,
8587    setTranslate: setTranslate2,
8588    setTransition: setTransition2,
8589    overwriteParams: () => ({
8590      slidesPerView: 1,
8591      slidesPerGroup: 1,
8592      watchSlidesProgress: true,
8593      spaceBetween: 0,
8594      virtualTranslate: !swiper.params.cssMode
8595    })
8596  });
8597}
8598function EffectCube(_ref) {
8599  let {
8600    swiper,
8601    extendParams,
8602    on
8603  } = _ref;
8604  extendParams({
8605    cubeEffect: {
8606      slideShadows: true,
8607      shadow: true,
8608      shadowOffset: 20,
8609      shadowScale: 0.94
8610    }
8611  });
8612  const createSlideShadows = (slideEl, progress, isHorizontal) => {
8613    let shadowBefore = isHorizontal ? slideEl.querySelector(".swiper-slide-shadow-left") : slideEl.querySelector(".swiper-slide-shadow-top");
8614    let shadowAfter = isHorizontal ? slideEl.querySelector(".swiper-slide-shadow-right") : slideEl.querySelector(".swiper-slide-shadow-bottom");
8615    if (!shadowBefore) {
8616      shadowBefore = createElement("div", `swiper-slide-shadow-cube swiper-slide-shadow-${isHorizontal ? "left" : "top"}`.split(" "));
8617      slideEl.append(shadowBefore);
8618    }
8619    if (!shadowAfter) {
8620      shadowAfter = createElement("div", `swiper-slide-shadow-cube swiper-slide-shadow-${isHorizontal ? "right" : "bottom"}`.split(" "));
8621      slideEl.append(shadowAfter);
8622    }
8623    if (shadowBefore) shadowBefore.style.opacity = Math.max(-progress, 0);
8624    if (shadowAfter) shadowAfter.style.opacity = Math.max(progress, 0);
8625  };
8626  const recreateShadows = () => {
8627    const isHorizontal = swiper.isHorizontal();
vendor: 4,270 bytes, lines 8628-8734
8628    swiper.slides.forEach((slideEl) => {
8629      const progress = Math.max(Math.min(slideEl.progress, 1), -1);
8630      createSlideShadows(slideEl, progress, isHorizontal);
8631    });
8632  };
8633  const setTranslate2 = () => {
8634    const {
8635      el,
8636      wrapperEl,
8637      slides,
8638      width: swiperWidth,
8639      height: swiperHeight,
8640      rtlTranslate: rtl,
8641      size: swiperSize,
8642      browser: browser2
8643    } = swiper;
8644    const r = getRotateFix(swiper);
8645    const params = swiper.params.cubeEffect;
8646    const isHorizontal = swiper.isHorizontal();
8647    const isVirtual = swiper.virtual && swiper.params.virtual.enabled;
8648    let wrapperRotate = 0;
8649    let cubeShadowEl;
8650    if (params.shadow) {
8651      if (isHorizontal) {
8652        cubeShadowEl = swiper.wrapperEl.querySelector(".swiper-cube-shadow");
8653        if (!cubeShadowEl) {
8654          cubeShadowEl = createElement("div", "swiper-cube-shadow");
8655          swiper.wrapperEl.append(cubeShadowEl);
8656        }
8657        cubeShadowEl.style.height = `${swiperWidth}px`;
8658      } else {
8659        cubeShadowEl = el.querySelector(".swiper-cube-shadow");
8660        if (!cubeShadowEl) {
8661          cubeShadowEl = createElement("div", "swiper-cube-shadow");
8662          el.append(cubeShadowEl);
8663        }
8664      }
8665    }
8666    for (let i = 0; i < slides.length; i += 1) {
8667      const slideEl = slides[i];
8668      let slideIndex = i;
8669      if (isVirtual) {
8670        slideIndex = parseInt(slideEl.getAttribute("data-swiper-slide-index"), 10);
8671      }
8672      let slideAngle = slideIndex * 90;
8673      let round = Math.floor(slideAngle / 360);
8674      if (rtl) {
8675        slideAngle = -slideAngle;
8676        round = Math.floor(-slideAngle / 360);
8677      }
8678      const progress = Math.max(Math.min(slideEl.progress, 1), -1);
8679      let tx = 0;
8680      let ty = 0;
8681      let tz = 0;
8682      if (slideIndex % 4 === 0) {
8683        tx = -round * 4 * swiperSize;
8684        tz = 0;
8685      } else if ((slideIndex - 1) % 4 === 0) {
8686        tx = 0;
8687        tz = -round * 4 * swiperSize;
8688      } else if ((slideIndex - 2) % 4 === 0) {
8689        tx = swiperSize + round * 4 * swiperSize;
8690        tz = swiperSize;
8691      } else if ((slideIndex - 3) % 4 === 0) {
8692        tx = -swiperSize;
8693        tz = 3 * swiperSize + swiperSize * 4 * round;
8694      }
8695      if (rtl) {
8696        tx = -tx;
8697      }
8698      if (!isHorizontal) {
8699        ty = tx;
8700        tx = 0;
8701      }
8702      const transform = `rotateX(${r(isHorizontal ? 0 : -slideAngle)}deg) rotateY(${r(isHorizontal ? slideAngle : 0)}deg) translate3d(${tx}px, ${ty}px, ${tz}px)`;
8703      if (progress <= 1 && progress > -1) {
8704        wrapperRotate = slideIndex * 90 + progress * 90;
8705        if (rtl) wrapperRotate = -slideIndex * 90 - progress * 90;
8706      }
8707      slideEl.style.transform = transform;
8708      if (params.slideShadows) {
8709        createSlideShadows(slideEl, progress, isHorizontal);
8710      }
8711    }
8712    wrapperEl.style.transformOrigin = `50% 50% -${swiperSize / 2}px`;
8713    wrapperEl.style["-webkit-transform-origin"] = `50% 50% -${swiperSize / 2}px`;
8714    if (params.shadow) {
8715      if (isHorizontal) {
8716        cubeShadowEl.style.transform = `translate3d(0px, ${swiperWidth / 2 + params.shadowOffset}px, ${-swiperWidth / 2}px) rotateX(89.99deg) rotateZ(0deg) scale(${params.shadowScale})`;
8717      } else {
8718        const shadowAngle = Math.abs(wrapperRotate) - Math.floor(Math.abs(wrapperRotate) / 90) * 90;
8719        const multiplier = 1.5 - (Math.sin(shadowAngle * 2 * Math.PI / 360) / 2 + Math.cos(shadowAngle * 2 * Math.PI / 360) / 2);
8720        const scale1 = params.shadowScale;
8721        const scale2 = params.shadowScale / multiplier;
8722        const offset = params.shadowOffset;
8723        cubeShadowEl.style.transform = `scale3d(${scale1}, 1, ${scale2}) translate3d(0px, ${swiperHeight / 2 + offset}px, ${-swiperHeight / 2 / scale2}px) rotateX(-89.99deg)`;
8724      }
8725    }
8726    const zFactor = (browser2.isSafari || browser2.isWebView) && browser2.needPerspectiveFix ? -swiperSize / 2 : 0;
8727    wrapperEl.style.transform = `translate3d(0px,0,${zFactor}px) rotateX(${r(swiper.isHorizontal() ? 0 : wrapperRotate)}deg) rotateY(${r(swiper.isHorizontal() ? -wrapperRotate : 0)}deg)`;
8728    wrapperEl.style.setProperty("--swiper-cube-translate-z", `${zFactor}px`);
8729  };
8730  const setTransition2 = (duration) => {
8731    const {
8732      el,
8733      slides
8734    } = swiper;
8735    slides.forEach((slideEl) => {
8736      slideEl.style.transitionDuration = `${duration}ms`;
8737      slideEl.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((subEl) => {
8738        subEl.style.transitionDuration = `${duration}ms`;
8739      });
8740    });
8741    if (swiper.params.cubeEffect.shadow && !swiper.isHorizontal()) {
8742      const shadowEl = el.querySelector(".swiper-cube-shadow");
8743      if (shadowEl) shadowEl.style.transitionDuration = `${duration}ms`;
8744    }
8745  };
8746  effectInit({
8747    effect: "cube",
8748    swiper,
8749    on,
8750    setTranslate: setTranslate2,
8751    setTransition: setTransition2,
8752    recreateShadows,
8753    getEffectParams: () => swiper.params.cubeEffect,
8754    perspective: () => true,
8755    overwriteParams: () => ({
8756      slidesPerView: 1,
8757      slidesPerGroup: 1,
8758      watchSlidesProgress: true,
8759      resistanceRatio: 0,
8760      spaceBetween: 0,
8761      centeredSlides: false,
8762      virtualTranslate: true
8763    })
8764  });
8765}
8766function createShadow(suffix, slideEl, side) {
8767  const shadowClass = `swiper-slide-shadow${side ? `-${side}` : ""}${suffix ? ` swiper-slide-shadow-${suffix}` : ""}`;
8768  const shadowContainer = getSlideTransformEl(slideEl);
8769  let shadowEl = shadowContainer.querySelector(`.${shadowClass.split(" ").join(".")}`);
8770  if (!shadowEl) {
8771    shadowEl = createElement("div", shadowClass.split(" "));
8772    shadowContainer.append(shadowEl);
8773  }
8774  return shadowEl;
8775}
8776function EffectFlip(_ref) {
8777  let {
8778    swiper,
8779    extendParams,
8780    on
8781  } = _ref;
8782  extendParams({
8783    flipEffect: {
8784      slideShadows: true,
8785      limitRotation: true
8786    }
8787  });
8788  const createSlideShadows = (slideEl, progress) => {
8789    let shadowBefore = swiper.isHorizontal() ? slideEl.querySelector(".swiper-slide-shadow-left") : slideEl.querySelector(".swiper-slide-shadow-top");
8790    let shadowAfter = swiper.isHorizontal() ? slideEl.querySelector(".swiper-slide-shadow-right") : slideEl.querySelector(".swiper-slide-shadow-bottom");
8791    if (!shadowBefore) {
8792      shadowBefore = createShadow("flip", slideEl, swiper.isHorizontal() ? "left" : "top");
8793    }
8794    if (!shadowAfter) {
8795      shadowAfter = createShadow("flip", slideEl, swiper.isHorizontal() ? "right" : "bottom");
8796    }
8797    if (shadowBefore) shadowBefore.style.opacity = Math.max(-progress, 0);
8798    if (shadowAfter) shadowAfter.style.opacity = Math.max(progress, 0);
8799  };
8800  const recreateShadows = () => {
8801    swiper.params.flipEffect;
8802    swiper.slides.forEach((slideEl) => {
8803      let progress = slideEl.progress;
8804      if (swiper.params.flipEffect.limitRotation) {
8805        progress = Math.max(Math.min(slideEl.progress, 1), -1);
8806      }
8807      createSlideShadows(slideEl, progress);
8808    });
8809  };
8810  const setTranslate2 = () => {
8811    const {
8812      slides,
8813      rtlTranslate: rtl
8814    } = swiper;
8815    const params = swiper.params.flipEffect;
8816    const rotateFix = getRotateFix(swiper);
8817    for (let i = 0; i < slides.length; i += 1) {
8818      const slideEl = slides[i];
8819      let progress = slideEl.progress;
8820      if (swiper.params.flipEffect.limitRotation) {
8821        progress = Math.max(Math.min(slideEl.progress, 1), -1);
8822      }
8823      const offset = slideEl.swiperSlideOffset;
8824      const rotate = -180 * progress;
8825      let rotateY = rotate;
8826      let rotateX = 0;
8827      let tx = swiper.params.cssMode ? -offset - swiper.translate : -offset;
8828      let ty = 0;
8829      if (!swiper.isHorizontal()) {
8830        ty = tx;
8831        tx = 0;
8832        rotateX = -rotateY;
8833        rotateY = 0;
8834      } else if (rtl) {
8835        rotateY = -rotateY;
8836      }
8837      slideEl.style.zIndex = -Math.abs(Math.round(progress)) + slides.length;
8838      if (params.slideShadows) {
8839        createSlideShadows(slideEl, progress);
8840      }
8841      const transform = `translate3d(${tx}px, ${ty}px, 0px) rotateX(${rotateFix(rotateX)}deg) rotateY(${rotateFix(rotateY)}deg)`;
8842      const targetEl = effectTarget(params, slideEl);
8843      targetEl.style.transform = transform;
8844    }
8845  };
8846  const setTransition2 = (duration) => {
8847    const transformElements = swiper.slides.map((slideEl) => getSlideTransformEl(slideEl));
8848    transformElements.forEach((el) => {
8849      el.style.transitionDuration = `${duration}ms`;
8850      el.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((shadowEl) => {
8851        shadowEl.style.transitionDuration = `${duration}ms`;
8852      });
8853    });
8854    effectVirtualTransitionEnd({
8855      swiper,
8856      duration,
8857      transformElements
8858    });
8859  };
8860  effectInit({
8861    effect: "flip",
8862    swiper,
8863    on,
8864    setTranslate: setTranslate2,
8865    setTransition: setTransition2,
8866    recreateShadows,
8867    getEffectParams: () => swiper.params.flipEffect,
8868    perspective: () => true,
8869    overwriteParams: () => ({
8870      slidesPerView: 1,
8871      slidesPerGroup: 1,
8872      watchSlidesProgress: true,
8873      spaceBetween: 0,
8874      virtualTranslate: !swiper.params.cssMode
8875    })
8876  });
8877}
8878function EffectCoverflow(_ref) {
8879  let {
8880    swiper,
8881    extendParams,
8882    on
8883  } = _ref;
8884  extendParams({
8885    coverflowEffect: {
8886      rotate: 50,
8887      stretch: 0,
8888      depth: 100,
8889      scale: 1,
8890      modifier: 1,
8891      slideShadows: true
8892    }
8893  });
8894  const setTranslate2 = () => {
8895    const {
8896      width: swiperWidth,
8897      height: swiperHeight,
8898      slides,
8899      slidesSizesGrid
8900    } = swiper;
8901    const params = swiper.params.coverflowEffect;
8902    const isHorizontal = swiper.isHorizontal();
8903    const transform = swiper.translate;
8904    const center = isHorizontal ? -transform + swiperWidth / 2 : -transform + swiperHeight / 2;
8905    const rotate = isHorizontal ? params.rotate : -params.rotate;
8906    const translate2 = params.depth;
8907    const r = getRotateFix(swiper);
8908    for (let i = 0, length = slides.length; i < length; i += 1) {
8909      const slideEl = slides[i];
8910      const slideSize = slidesSizesGrid[i];
8911      const slideOffset = slideEl.swiperSlideOffset;
8912      const centerOffset = (center - slideOffset - slideSize / 2) / slideSize;
8913      const offsetMultiplier = typeof params.modifier === "function" ? params.modifier(centerOffset) : centerOffset * params.modifier;
8914      let rotateY = isHorizontal ? rotate * offsetMultiplier : 0;
8915      let rotateX = isHorizontal ? 0 : rotate * offsetMultiplier;
8916      let translateZ = -translate2 * Math.abs(offsetMultiplier);
8917      let stretch = params.stretch;
8918      if (typeof stretch === "string" && stretch.indexOf("%") !== -1) {
8919        stretch = parseFloat(params.stretch) / 100 * slideSize;
8920      }
8921      let translateY = isHorizontal ? 0 : stretch * offsetMultiplier;
8922      let translateX = isHorizontal ? stretch * offsetMultiplier : 0;
8923      let scale = 1 - (1 - params.scale) * Math.abs(offsetMultiplier);
8924      if (Math.abs(translateX) < 1e-3) translateX = 0;
8925      if (Math.abs(translateY) < 1e-3) translateY = 0;
8926      if (Math.abs(translateZ) < 1e-3) translateZ = 0;
8927      if (Math.abs(rotateY) < 1e-3) rotateY = 0;
8928      if (Math.abs(rotateX) < 1e-3) rotateX = 0;
8929      if (Math.abs(scale) < 1e-3) scale = 0;
8930      const slideTransform = `translate3d(${translateX}px,${translateY}px,${translateZ}px)  rotateX(${r(rotateX)}deg) rotateY(${r(rotateY)}deg) scale(${scale})`;
8931      const targetEl = effectTarget(params, slideEl);
8932      targetEl.style.transform = slideTransform;
8933      slideEl.style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1;
8934      if (params.slideShadows) {
8935        let shadowBeforeEl = isHorizontal ? slideEl.querySelector(".swiper-slide-shadow-left") : slideEl.querySelector(".swiper-slide-shadow-top");
8936        let shadowAfterEl = isHorizontal ? slideEl.querySelector(".swiper-slide-shadow-right") : slideEl.querySelector(".swiper-slide-shadow-bottom");
8937        if (!shadowBeforeEl) {
8938          shadowBeforeEl = createShadow("coverflow", slideEl, isHorizontal ? "left" : "top");
8939        }
8940        if (!shadowAfterEl) {
8941          shadowAfterEl = createShadow("coverflow", slideEl, isHorizontal ? "right" : "bottom");
8942        }
8943        if (shadowBeforeEl) shadowBeforeEl.style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0;
8944        if (shadowAfterEl) shadowAfterEl.style.opacity = -offsetMultiplier > 0 ? -offsetMultiplier : 0;
8945      }
8946    }
8947  };
8948  const setTransition2 = (duration) => {
8949    const transformElements = swiper.slides.map((slideEl) => getSlideTransformEl(slideEl));
8950    transformElements.forEach((el) => {
8951      el.style.transitionDuration = `${duration}ms`;
8952      el.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((shadowEl) => {
8953        shadowEl.style.transitionDuration = `${duration}ms`;
8954      });
8955    });
8956  };
8957  effectInit({
8958    effect: "coverflow",
8959    swiper,
8960    on,
8961    setTranslate: setTranslate2,
8962    setTransition: setTransition2,
8963    perspective: () => true,
8964    overwriteParams: () => ({
8965      watchSlidesProgress: true
8966    })
8967  });
8968}
8969function EffectCreative(_ref) {
8970  let {
8971    swiper,
8972    extendParams,
8973    on
8974  } = _ref;
8975  extendParams({
8976    creativeEffect: {
8977      limitProgress: 1,
8978      shadowPerProgress: false,
8979      progressMultiplier: 1,
8980      perspective: true,
8981      prev: {
8982        translate: [0, 0, 0],
8983        rotate: [0, 0, 0],
8984        opacity: 1,
8985        scale: 1
8986      },
8987      next: {
8988        translate: [0, 0, 0],
8989        rotate: [0, 0, 0],
8990        opacity: 1,
8991        scale: 1
8992      }
8993    }
8994  });
8995  const getTranslateValue = (value) => {
8996    if (typeof value === "string") return value;
8997    return `${value}px`;
8998  };
8999  const setTranslate2 = () => {
9000    const {
9001      slides,
9002      wrapperEl,
9003      slidesSizesGrid
9004    } = swiper;
9005    const params = swiper.params.creativeEffect;
9006    const {
9007      progressMultiplier: multiplier
9008    } = params;
9009    const isCenteredSlides = swiper.params.centeredSlides;
9010    const rotateFix = getRotateFix(swiper);
9011    if (isCenteredSlides) {
9012      const margin = slidesSizesGrid[0] / 2 - swiper.params.slidesOffsetBefore || 0;
9013      wrapperEl.style.transform = `translateX(calc(50% - ${margin}px))`;
9014    }
9015    for (let i = 0; i < slides.length; i += 1) {
9016      const slideEl = slides[i];
9017      const slideProgress = slideEl.progress;
9018      const progress = Math.min(Math.max(slideEl.progress, -params.limitProgress), params.limitProgress);
9019      let originalProgress = progress;
9020      if (!isCenteredSlides) {
9021        originalProgress = Math.min(Math.max(slideEl.originalProgress, -params.limitProgress), params.limitProgress);
9022      }
9023      const offset = slideEl.swiperSlideOffset;
9024      const t = [swiper.params.cssMode ? -offset - swiper.translate : -offset, 0, 0];
9025      const r = [0, 0, 0];
9026      let custom = false;
9027      if (!swiper.isHorizontal()) {
9028        t[1] = t[0];
9029        t[0] = 0;
9030      }
9031      let data = {
9032        translate: [0, 0, 0],
9033        rotate: [0, 0, 0],
9034        scale: 1,
9035        opacity: 1
9036      };
9037      if (progress < 0) {
9038        data = params.next;
9039        custom = true;
9040      } else if (progress > 0) {
9041        data = params.prev;
9042        custom = true;
9043      }
9044      t.forEach((value, index) => {
9045        t[index] = `calc(${value}px + (${getTranslateValue(data.translate[index])} * ${Math.abs(progress * multiplier)}))`;
9046      });
9047      r.forEach((value, index) => {
9048        let val = data.rotate[index] * Math.abs(progress * multiplier);
9049        r[index] = val;
9050      });
9051      slideEl.style.zIndex = -Math.abs(Math.round(slideProgress)) + slides.length;
9052      const translateString = t.join(", ");
9053      const rotateString = `rotateX(${rotateFix(r[0])}deg) rotateY(${rotateFix(r[1])}deg) rotateZ(${rotateFix(r[2])}deg)`;
9054      const scaleString = originalProgress < 0 ? `scale(${1 + (1 - data.scale) * originalProgress * multiplier})` : `scale(${1 - (1 - data.scale) * originalProgress * multiplier})`;
9055      const opacityString = originalProgress < 0 ? 1 + (1 - data.opacity) * originalProgress * multiplier : 1 - (1 - data.opacity) * originalProgress * multiplier;
9056      const transform = `translate3d(${translateString}) ${rotateString} ${scaleString}`;
9057      if (custom && data.shadow || !custom) {
9058        let shadowEl = slideEl.querySelector(".swiper-slide-shadow");
9059        if (!shadowEl && data.shadow) {
9060          shadowEl = createShadow("creative", slideEl);
9061        }
9062        if (shadowEl) {
9063          const shadowOpacity = params.shadowPerProgress ? progress * (1 / params.limitProgress) : progress;
9064          shadowEl.style.opacity = Math.min(Math.max(Math.abs(shadowOpacity), 0), 1);
9065        }
9066      }
9067      const targetEl = effectTarget(params, slideEl);
9068      targetEl.style.transform = transform;
9069      targetEl.style.opacity = opacityString;
9070      if (data.origin) {
9071        targetEl.style.transformOrigin = data.origin;
9072      }
9073    }
9074  };
9075  const setTransition2 = (duration) => {
9076    const transformElements = swiper.slides.map((slideEl) => getSlideTransformEl(slideEl));
vendor: 4,152 bytes, lines 9077-9187
9077    transformElements.forEach((el) => {
9078      el.style.transitionDuration = `${duration}ms`;
9079      el.querySelectorAll(".swiper-slide-shadow").forEach((shadowEl) => {
9080        shadowEl.style.transitionDuration = `${duration}ms`;
9081      });
9082    });
9083    effectVirtualTransitionEnd({
9084      swiper,
9085      duration,
9086      transformElements,
9087      allSlides: true
9088    });
9089  };
9090  effectInit({
9091    effect: "creative",
9092    swiper,
9093    on,
9094    setTranslate: setTranslate2,
9095    setTransition: setTransition2,
9096    perspective: () => swiper.params.creativeEffect.perspective,
9097    overwriteParams: () => ({
9098      watchSlidesProgress: true,
9099      virtualTranslate: !swiper.params.cssMode
9100    })
9101  });
9102}
9103function EffectCards(_ref) {
9104  let {
9105    swiper,
9106    extendParams,
9107    on
9108  } = _ref;
9109  extendParams({
9110    cardsEffect: {
9111      slideShadows: true,
9112      rotate: true,
9113      perSlideRotate: 2,
9114      perSlideOffset: 8
9115    }
9116  });
9117  const setTranslate2 = () => {
9118    const {
9119      slides,
9120      activeIndex,
9121      rtlTranslate: rtl
9122    } = swiper;
9123    const params = swiper.params.cardsEffect;
9124    const {
9125      startTranslate,
9126      isTouched
9127    } = swiper.touchEventsData;
9128    const currentTranslate = rtl ? -swiper.translate : swiper.translate;
9129    for (let i = 0; i < slides.length; i += 1) {
9130      const slideEl = slides[i];
9131      const slideProgress = slideEl.progress;
9132      const progress = Math.min(Math.max(slideProgress, -4), 4);
9133      let offset = slideEl.swiperSlideOffset;
9134      if (swiper.params.centeredSlides && !swiper.params.cssMode) {
9135        swiper.wrapperEl.style.transform = `translateX(${swiper.minTranslate()}px)`;
9136      }
9137      if (swiper.params.centeredSlides && swiper.params.cssMode) {
9138        offset -= slides[0].swiperSlideOffset;
9139      }
9140      let tX = swiper.params.cssMode ? -offset - swiper.translate : -offset;
9141      let tY = 0;
9142      const tZ = -100 * Math.abs(progress);
9143      let scale = 1;
9144      let rotate = -params.perSlideRotate * progress;
9145      let tXAdd = params.perSlideOffset - Math.abs(progress) * 0.75;
9146      const slideIndex = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.from + i : i;
9147      const isSwipeToNext = (slideIndex === activeIndex || slideIndex === activeIndex - 1) && progress > 0 && progress < 1 && (isTouched || swiper.params.cssMode) && currentTranslate < startTranslate;
9148      const isSwipeToPrev = (slideIndex === activeIndex || slideIndex === activeIndex + 1) && progress < 0 && progress > -1 && (isTouched || swiper.params.cssMode) && currentTranslate > startTranslate;
9149      if (isSwipeToNext || isSwipeToPrev) {
9150        const subProgress = (1 - Math.abs((Math.abs(progress) - 0.5) / 0.5)) ** 0.5;
9151        rotate += -28 * progress * subProgress;
9152        scale += -0.5 * subProgress;
9153        tXAdd += 96 * subProgress;
9154        tY = `${-25 * subProgress * Math.abs(progress)}%`;
9155      }
9156      if (progress < 0) {
9157        tX = `calc(${tX}px ${rtl ? "-" : "+"} (${tXAdd * Math.abs(progress)}%))`;
9158      } else if (progress > 0) {
9159        tX = `calc(${tX}px ${rtl ? "-" : "+"} (-${tXAdd * Math.abs(progress)}%))`;
9160      } else {
9161        tX = `${tX}px`;
9162      }
9163      if (!swiper.isHorizontal()) {
9164        const prevY = tY;
9165        tY = tX;
9166        tX = prevY;
9167      }
9168      const scaleString = progress < 0 ? `${1 + (1 - scale) * progress}` : `${1 - (1 - scale) * progress}`;
9169      const transform = `
9170        translate3d(${tX}, ${tY}, ${tZ}px)
9171        rotateZ(${params.rotate ? rtl ? -rotate : rotate : 0}deg)
9172        scale(${scaleString})
9173      `;
9174      if (params.slideShadows) {
9175        let shadowEl = slideEl.querySelector(".swiper-slide-shadow");
9176        if (!shadowEl) {
9177          shadowEl = createShadow("cards", slideEl);
9178        }
9179        if (shadowEl) shadowEl.style.opacity = Math.min(Math.max((Math.abs(progress) - 0.5) / 0.5, 0), 1);
9180      }
9181      slideEl.style.zIndex = -Math.abs(Math.round(slideProgress)) + slides.length;
9182      const targetEl = effectTarget(params, slideEl);
9183      targetEl.style.transform = transform;
9184    }
9185  };
9186  const setTransition2 = (duration) => {
9187    const transformElements = swiper.slides.map((slideEl) => getSlideTransformEl(slideEl));
9188    transformElements.forEach((el) => {
9189      el.style.transitionDuration = `${duration}ms`;
9190      el.querySelectorAll(".swiper-slide-shadow").forEach((shadowEl) => {
9191        shadowEl.style.transitionDuration = `${duration}ms`;
9192      });
9193    });
9194    effectVirtualTransitionEnd({
9195      swiper,
9196      duration,
9197      transformElements
9198    });
9199  };
9200  effectInit({
9201    effect: "cards",
9202    swiper,
9203    on,
9204    setTranslate: setTranslate2,
9205    setTransition: setTransition2,
9206    perspective: () => true,
9207    overwriteParams: () => ({
9208      watchSlidesProgress: true,
9209      virtualTranslate: !swiper.params.cssMode
9210    })
9211  });
9212}
9213const modules = [Virtual, Keyboard, Mousewheel, Navigation, Pagination, Scrollbar, Parallax, Zoom, Controller, A11y, History, HashNavigation, Autoplay, Thumb, freeMode, Grid, Manipulation, EffectFade, EffectCube, EffectFlip, EffectCoverflow, EffectCreative, EffectCards];
9214Swiper.use(modules);
9215var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
9216var bvi_min = { exports: {} };
9217/*!
9218  * Button visually impaired - v1.0.0 https://bvi.isvek.ru
9219  * Copyright 2014-2021 Oleg Korotenko <[email protected]>.
9220  * Licensed MIT (https://github.com/veks/button-visually-impaired-javascript/blob/master/LICENSE.md)
9221  */
9222(function(module, exports) {
9223  !function(e, t) {
9224    module.exports = t();
9225  }(commonjsGlobal, function() {
9226    function e(e2, t2) {
9227      var n2 = Object.keys(e2);
9228      if (Object.getOwnPropertySymbols) {
9229        var i2 = Object.getOwnPropertySymbols(e2);
9230        t2 && (i2 = i2.filter(function(t3) {
9231          return Object.getOwnPropertyDescriptor(e2, t3).enumerable;
9232        })), n2.push.apply(n2, i2);
9233      }
9234      return n2;
9235    }
9236    function t(t2) {
9237      for (var n2 = 1; n2 < arguments.length; n2++) {
9238        var i2 = null != arguments[n2] ? arguments[n2] : {};
9239        n2 % 2 ? e(Object(i2), true).forEach(function(e2) {
9240          a(t2, e2, i2[e2]);
9241        }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t2, Object.getOwnPropertyDescriptors(i2)) : e(Object(i2)).forEach(function(e2) {
9242          Object.defineProperty(t2, e2, Object.getOwnPropertyDescriptor(i2, e2));
9243        });
9244      }
9245      return t2;
9246    }
9247    function n(e2) {
9248      return (n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e3) {
9249        return typeof e3;
9250      } : function(e3) {
9251        return e3 && "function" == typeof Symbol && e3.constructor === Symbol && e3 !== Symbol.prototype ? "symbol" : typeof e3;
9252      })(e2);
9253    }
9254    function i(e2, t2) {
9255      if (!(e2 instanceof t2)) throw new TypeError("Cannot call a class as a function");
9256    }
9257    function r(e2, t2) {
9258      for (var n2 = 0; n2 < t2.length; n2++) {
9259        var i2 = t2[n2];
9260        i2.enumerable = i2.enumerable || false, i2.configurable = true, "value" in i2 && (i2.writable = true), Object.defineProperty(e2, i2.key, i2);
9261      }
9262    }
9263    function o(e2, t2, n2) {
9264      return t2 && r(e2.prototype, t2), e2;
9265    }
9266    function a(e2, t2, n2) {
9267      return t2 in e2 ? Object.defineProperty(e2, t2, { value: n2, enumerable: true, configurable: true, writable: true }) : e2[t2] = n2, e2;
9268    }
9269    function c(e2, t2) {
9270      (null == t2 || t2 > e2.length) && (t2 = e2.length);
9271      for (var n2 = 0, i2 = new Array(t2); n2 < t2; n2++) i2[n2] = e2[n2];
9272      return i2;
9273    }
9274    !function(e2) {
9275      var t2 = function(e3) {
9276        var t3, i2 = Object.prototype, r2 = i2.hasOwnProperty, o2 = "function" == typeof Symbol ? Symbol : {}, a2 = o2.iterator || "@@iterator", c2 = o2.asyncIterator || "@@asyncIterator", l2 = o2.toStringTag || "@@toStringTag";
9277        function s2(e4, t4, n2) {
9278          return Object.defineProperty(e4, t4, { value: n2, enumerable: true, configurable: true, writable: true }), e4[t4];
9279        }
9280        try {
9281          s2({}, "");
9282        } catch (e4) {
9283          s2 = function(e5, t4, n2) {
9284            return e5[t4] = n2;
9285          };
9286        }
9287        function u2(e4, t4, n2, i3) {
9288          var r3 = t4 && t4.prototype instanceof g2 ? t4 : g2, o3 = Object.create(r3.prototype), a3 = new q(i3 || []);
9289          return o3._invoke = /* @__PURE__ */ function(e5, t5, n3) {
9290            var i4 = f2;
9291            return function(r4, o4) {
9292              if (i4 === d2) throw new Error("Generator is already running");
9293              if (i4 === m2) {
9294                if ("throw" === r4) throw o4;
9295                return H();
9296              }
9297              for (n3.method = r4, n3.arg = o4; ; ) {
9298                var a4 = n3.delegate;
9299                if (a4) {
9300                  var c3 = E(a4, n3);
9301                  if (c3) {
9302                    if (c3 === b2) continue;
9303                    return c3;
9304                  }
9305                }
9306                if ("next" === n3.method) n3.sent = n3._sent = n3.arg;
9307                else if ("throw" === n3.method) {
9308                  if (i4 === f2) throw i4 = m2, n3.arg;
9309                  n3.dispatchException(n3.arg);
9310                } else "return" === n3.method && n3.abrupt("return", n3.arg);
9311                i4 = d2;
9312                var l3 = v2(e5, t5, n3);
9313                if ("normal" === l3.type) {
9314                  if (i4 = n3.done ? m2 : h2, l3.arg === b2) continue;
9315                  return { value: l3.arg, done: n3.done };
9316                }
9317                "throw" === l3.type && (i4 = m2, n3.method = "throw", n3.arg = l3.arg);
9318              }
9319            };
9320          }(e4, n2, a3), o3;
9321        }
9322        function v2(e4, t4, n2) {
9323          try {
9324            return { type: "normal", arg: e4.call(t4, n2) };
9325          } catch (e5) {
9326            return { type: "throw", arg: e5 };
9327          }
9328        }
9329        e3.wrap = u2;
9330        var f2 = "suspendedStart", h2 = "suspendedYield", d2 = "executing", m2 = "completed", b2 = {};
9331        function g2() {
9332        }
9333        function p2() {
9334        }
9335        function y2() {
9336        }
9337        var S2 = {};
9338        s2(S2, a2, function() {
9339          return this;
9340        });
9341        var _2 = Object.getPrototypeOf, k = _2 && _2(_2(x([])));
9342        k && k !== i2 && r2.call(k, a2) && (S2 = k);
9343        var w = y2.prototype = g2.prototype = Object.create(S2);
9344        function L(e4) {
9345          ["next", "throw", "return"].forEach(function(t4) {
9346            s2(e4, t4, function(e5) {
9347              return this._invoke(t4, e5);
9348            });
9349          });
9350        }
9351        function B(e4, t4) {
9352          function i3(o4, a3, c3, l3) {
9353            var s3 = v2(e4[o4], e4, a3);
9354            if ("throw" !== s3.type) {
9355              var u3 = s3.arg, f3 = u3.value;
9356              return f3 && "object" === n(f3) && r2.call(f3, "__await") ? t4.resolve(f3.__await).then(function(e5) {
9357                i3("next", e5, c3, l3);
9358              }, function(e5) {
9359                i3("throw", e5, c3, l3);
9360              }) : t4.resolve(f3).then(function(e5) {
9361                u3.value = e5, c3(u3);
9362              }, function(e5) {
9363                return i3("throw", e5, c3, l3);
9364              });
9365            }
9366            l3(s3.arg);
9367          }
9368          var o3;
9369          this._invoke = function(e5, n2) {
9370            function r3() {
9371              return new t4(function(t5, r4) {
9372                i3(e5, n2, t5, r4);
9373              });
9374            }
9375            return o3 = o3 ? o3.then(r3, r3) : r3();
9376          };
9377        }
9378        function E(e4, n2) {
9379          var i3 = e4.iterator[n2.method];
9380          if (i3 === t3) {
9381            if (n2.delegate = null, "throw" === n2.method) {
9382              if (e4.iterator.return && (n2.method = "return", n2.arg = t3, E(e4, n2), "throw" === n2.method)) return b2;
9383              n2.method = "throw", n2.arg = new TypeError("The iterator does not provide a 'throw' method");
9384            }
9385            return b2;
9386          }
9387          var r3 = v2(i3, e4.iterator, n2.arg);
9388          if ("throw" === r3.type) return n2.method = "throw", n2.arg = r3.arg, n2.delegate = null, b2;
9389          var o3 = r3.arg;
9390          return o3 ? o3.done ? (n2[e4.resultName] = o3.value, n2.next = e4.nextLoc, "return" !== n2.method && (n2.method = "next", n2.arg = t3), n2.delegate = null, b2) : o3 : (n2.method = "throw", n2.arg = new TypeError("iterator result is not an object"), n2.delegate = null, b2);
9391        }
9392        function O(e4) {
9393          var t4 = { tryLoc: e4[0] };
9394          1 in e4 && (t4.catchLoc = e4[1]), 2 in e4 && (t4.finallyLoc = e4[2], t4.afterLoc = e4[3]), this.tryEntries.push(t4);
9395        }
9396        function A(e4) {
9397          var t4 = e4.completion || {};
9398          t4.type = "normal", delete t4.arg, e4.completion = t4;
9399        }
9400        function q(e4) {
9401          this.tryEntries = [{ tryLoc: "root" }], e4.forEach(O, this), this.reset(true);
9402        }
9403        function x(e4) {
9404          if (e4) {
9405            var n2 = e4[a2];
9406            if (n2) return n2.call(e4);
9407            if ("function" == typeof e4.next) return e4;
9408            if (!isNaN(e4.length)) {
9409              var i3 = -1, o3 = function n3() {
9410                for (; ++i3 < e4.length; ) if (r2.call(e4, i3)) return n3.value = e4[i3], n3.done = false, n3;
9411                return n3.value = t3, n3.done = true, n3;
9412              };
9413              return o3.next = o3;
9414            }
9415          }
9416          return { next: H };
9417        }
9418        function H() {
9419          return { value: t3, done: true };
9420        }
9421        return p2.prototype = y2, s2(w, "constructor", y2), s2(y2, "constructor", p2), p2.displayName = s2(y2, l2, "GeneratorFunction"), e3.isGeneratorFunction = function(e4) {
9422          var t4 = "function" == typeof e4 && e4.constructor;
9423          return !!t4 && (t4 === p2 || "GeneratorFunction" === (t4.displayName || t4.name));
9424        }, e3.mark = function(e4) {
9425          return Object.setPrototypeOf ? Object.setPrototypeOf(e4, y2) : (e4.__proto__ = y2, s2(e4, l2, "GeneratorFunction")), e4.prototype = Object.create(w), e4;
9426        }, e3.awrap = function(e4) {
9427          return { __await: e4 };
9428        }, L(B.prototype), s2(B.prototype, c2, function() {
9429          return this;
9430        }), e3.AsyncIterator = B, e3.async = function(t4, n2, i3, r3, o3) {
9431          void 0 === o3 && (o3 = Promise);
9432          var a3 = new B(u2(t4, n2, i3, r3), o3);
9433          return e3.isGeneratorFunction(n2) ? a3 : a3.next().then(function(e4) {
9434            return e4.done ? e4.value : a3.next();
9435          });
9436        }, L(w), s2(w, l2, "Generator"), s2(w, a2, function() {
9437          return this;
9438        }), s2(w, "toString", function() {
9439          return "[object Generator]";
9440        }), e3.keys = function(e4) {
9441          var t4 = [];
9442          for (var n2 in e4) t4.push(n2);
9443          return t4.reverse(), function n3() {
9444            for (; t4.length; ) {
9445              var i3 = t4.pop();
9446              if (i3 in e4) return n3.value = i3, n3.done = false, n3;
9447            }
9448            return n3.done = true, n3;
9449          };
9450        }, e3.values = x, q.prototype = { constructor: q, reset: function(e4) {
9451          if (this.prev = 0, this.next = 0, this.sent = this._sent = t3, this.done = false, this.delegate = null, this.method = "next", this.arg = t3, this.tryEntries.forEac
9451h(A), !e4) for (var n2 in this) "t" === n2.charAt(0) && r2.call(this, n2) && !isNaN(+n2.slice(1)) && (this[n2] = t3);
9452        }, stop: function() {
9453          this.done = true;
9454          var e4 = this.tryEntries[0].completion;
9455          if ("throw" === e4.type) throw e4.arg;
9456          return this.rval;
9457        }, dispatchException: function(e4) {
9458          if (this.done) throw e4;
9459          var n2 = this;
9460          function i3(i4, r3) {
9461            return c3.type = "throw", c3.arg = e4, n2.next = i4, r3 && (n2.method = "next", n2.arg = t3), !!r3;
9462          }
9463          for (var o3 = this.tryEntries.length - 1; o3 >= 0; --o3) {
9464            var a3 = this.tryEntries[o3], c3 = a3.completion;
9465            if ("root" === a3.tryLoc) return i3("end");
9466            if (a3.tryLoc <= this.prev) {
9467              var l3 = r2.call(a3, "catchLoc"), s3 = r2.call(a3, "finallyLoc");
9468              if (l3 && s3) {
9469                if (this.prev < a3.catchLoc) return i3(a3.catchLoc, true);
9470                if (this.prev < a3.finallyLoc) return i3(a3.finallyLoc);
9471              } else if (l3) {
9472                if (this.prev < a3.catchLoc) return i3(a3.catchLoc, true);
9473              } else {
9474                if (!s3) throw new Error("try statement without catch or finally");
9475                if (this.prev < a3.finallyLoc) return i3(a3.finallyLoc);
9476              }
9477            }
9478          }
9479        }, abrupt: function(e4, t4) {
9480          for (var n2 = this.tryEntries.length - 1; n2 >= 0; --n2) {
9481            var i3 = this.tryEntries[n2];
9482            if (i3.tryLoc <= this.prev && r2.call(i3, "finallyLoc") && this.prev < i3.finallyLoc) {
9483              var o3 = i3;
9484              break;
9485            }
9486          }
9487          o3 && ("break" === e4 || "continue" === e4) && o3.tryLoc <= t4 && t4 <= o3.finallyLoc && (o3 = null);
9488          var a3 = o3 ? o3.completion : {};
9489          return a3.type = e4, a3.arg = t4, o3 ? (this.method = "next", this.next = o3.finallyLoc, b2) : this.complete(a3);
9490        }, complete: function(e4, t4) {
9491          if ("throw" === e4.type) throw e4.arg;
9492          return "break" === e4.type || "continue" === e4.type ? this.next = e4.arg : "return" === e4.type ? (this.rval = this.arg = e4.arg, this.method = "return", this.next = "end") : "normal" === e4.type && t4 && (this.next = t4), b2;
9493        }, finish: function(e4) {
9494          for (var t4 = this.tryEntries.length - 1; t4 >= 0; --t4) {
9495            var n2 = this.tryEntries[t4];
9496            if (n2.finallyLoc === e4) return this.complete(n2.completion, n2.afterLoc), A(n2), b2;
9497          }
9498        }, catch: function(e4) {
9499          for (var t4 = this.tryEntries.length - 1; t4 >= 0; --t4) {
9500            var n2 = this.tryEntries[t4];
9501            if (n2.tryLoc === e4) {
9502              var i3 = n2.completion;
9503              if ("throw" === i3.type) {
9504                var r3 = i3.arg;
9505                A(n2);
9506              }
9507              return r3;
9508            }
9509          }
9510          throw new Error("illegal catch attempt");
9511        }, delegateYield: function(e4, n2, i3) {
9512          return this.delegate = { iterator: x(e4), resultName: n2, nextLoc: i3 }, "next" === this.method && (this.arg = t3), b2;
9513        } }, e3;
9514      }({});
9515      try {
9516        regeneratorRuntime = t2;
9517      } catch (e3) {
9518        "object" === ("undefined" == typeof globalThis ? "undefined" : n(globalThis)) ? globalThis.regeneratorRuntime = t2 : Function("r", "regeneratorRuntime = r")(t2);
9519      }
9520    }(), [Element.prototype, Document.prototype, DocumentFragment.prototype].forEach(function(e2) {
9521      e2.hasOwnProperty("prepend") || Object.defineProperty(e2, "prepend", { configurable: true, enumerable: true, writable: true, value: function() {
9522        var e3 = Array.prototype.slice.call(arguments), t2 = document.createDocumentFragment();
9523        e3.forEach(function(e4) {
9524          var n2 = e4 instanceof Node;
9525          t2.appendChild(n2 ? e4 : document.createTextNode(String(e4)));
9526        }), this.insertBefore(t2, this.firstChild);
9527      } });
9528    }), window.NodeList && !NodeList.prototype.forEach && (NodeList.prototype.forEach = Array.prototype.forEach), window.HTMLCollection && !HTMLCollection.prototype.forEach && (HTMLCollection.prototype.forEach = Array.prototype.forEach);
9529    var l = function(e2) {
9530      switch (e2) {
9531        case "on":
9532        case "true":
9533        case "1":
9534          return true;
9535        default:
9536          return false;
9537      }
9538    }, s = function(e2, t2, n2) {
9539      for ("string" == typeof t2 && (t2 = document.createElement(t2)), e2.appendChild(t2).className = n2; e2.firstChild !== t2; ) t2.appendChild(e2.firstChild);
9540    }, u = function(e2) {
9541      var t2 = document.createDocumentFragment();
9542      if (e2) {
9543        for (; e2.firstChild; ) {
9544          var n2 = e2.removeChild(e2.firstChild);
9545          t2.appendChild(n2);
9546        }
9547        e2.parentNode.replaceChild(t2, e2);
9548      }
9549    }, v = function(e2, t2) {
9550      Object.keys(e2).forEach(function(e3) {
9551        "function" == typeof t2 && t2(e3);
9552      });
9553    }, f = function(e2, t2) {
9554      Array.from(e2).forEach(function(e3) {
9555        "function" == typeof t2 && t2(e3);
9556      });
9557    }, h = function() {
9558      return window.speechSynthesis;
9559    }, d = function() {
9560      var e2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "", t2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "", n2 = /* @__PURE__ */ new Date(), i2 = n2.getTime();
9561      i2 += 864e5, n2.setTime(i2), document.cookie = "bvi_".concat(e2, "=").concat(t2, ";path=/;expires=").concat(n2.toUTCString(), ";domain=").concat(location.host);
9562    }, m = function() {
9563      var e2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "";
9564      e2 = "bvi_".concat(e2, "=");
9565      for (var t2 = decodeURIComponent(document.cookie), n2 = t2.split(";"), i2 = 0; i2 < n2.length; i2++) {
9566        var r2 = n2[i2].trim();
9567        if (-1 !== r2.indexOf(e2)) return r2.substring(e2.length, r2.length);
9568      }
9569    }, b = function() {
9570      var e2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "";
9571      document.cookie = "bvi_".concat(e2, "=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;domain=").concat(location.host);
9572    }, g = { "ru-RU": { text: { fontSize: "Размер шрифта", siteColors: "Цвета сайта", images: "Изображения", speech: "Синтез речи", settings: "Настройки", regularVersionOfTheSite: "Обычная версия сайта", letterSpacing: "Межбуквенное расстояние", normal: "Стандартный", average: "Средний", big: "Большой", lineHeight: "Межстрочный интервал", font: "Шрифт", arial: "Без засечек", times: "С засечками", builtElements: "Встроенные элементы (Видео, карты и тд.)", on: "Включить", off: "Выключить", reset: "Сбросить настройки", plural_0: "пиксель", plural_1: "пекселя", plural_2: "пикселей" }, voice: { fontSizePlus: "Размер шрифта увели́чен", fontSizeMinus: "Размер шрифта уме́ньшен", siteColorBlackOnWhite: "Цвет сайта черным по белому", siteColorWhiteOnBlack: "Цвет сайта белым по черному", siteColorDarkBlueOnBlue: "Цвет сайта тёмно-синим по голубому", siteColorBeigeBrown: "Цвет сайта кори́чневым по бе́жевому", siteColorGreenOnDarkBrown: "Цвет сайта зеленым по тёмно-коричневому", imagesOn: "Изображения включены", imagesOFF: "Изображения выключены", imagesGrayscale: "Изображения чёрно-белые", speechOn: "Синтез речи включён", speechOff: "Синтез речи вы́ключен", lineHeightNormal: "Межстрочный интервал стандартный", lineHeightAverage: "Межстрочный интервал средний", lineHeightBig: "Межстрочный интервал большой", LetterSpacingNormal: "Интервал между буквами стандартный", LetterSpacingAverage: "Интервал между буквами средний", LetterSpacingBig: "Интервал между буквами большой", fontArial: "Шрифт без засечек", fontTimes: "Шрифт с засечками", builtElementsOn: "Встроенные элементы включены", builtElementsOFF: "Встроенные элементы выключены", resetSettings: "Установлены настройки по умолча́нию", panelShow: "Панель открыта", panelHide: "Панель скрыта", panelOn: "Версия сайта для слабови́дящий", panelOff: "Обычная версия сайта" } }, "en-US": { text: { fontSize: "Font size", siteColors: "Site colors", images: "Images", speech: "Speech synthesis", settings: "Settings", regularVersionOfTheSite: "Regular version Of The site", letterSpacing: "Letter spacing", normal: "Single", average: "One and a half", big: "Double", lineHeight: "Line spacing", font: "Font", arial: "Sans Serif - Ar
9572ial", times: "Serif - Times New Roman", builtElements: "Include inline elements (Videos, maps, etc.)", on: "Enable", off: "Disabled", reset: "Reset settings", plural_0: "pixel", plural_1: "pixels", plural_2: "pixels" }, voice: { fontSizePlus: "Font size increased", fontSizeMinus: "Font size reduced", siteColorBlackOnWhite: "Site color black on white", siteColorWhiteOnBlack: "Site color white on black", siteColorDarkBlueOnBlue: "Site color dark blue on cyan", siteColorBeigeBrown: "SiteColorBeigeBrown", siteColorGreenOnDarkBrown: "Site color green on dark brown", imagesOn: "Images enable", imagesOFF: "Images disabled", imagesGrayscale: "Images gray scale", speechOn: "Synthesis speech enable", speechOff: "Synthesis speech disabled", lineHeightNormal: "Line spacing single", lineHeightAverage: "Line spacing one and a half", lineHeightBig: "Line spacing double", LetterSpacingNormal: "Letter spacing single", LetterSpacingAverage: "Letter spacing one and a half", LetterSpacingBig: "Letter spacing letter double", fontArial: "Sans Serif - Arial", fontTimes: "Serif - Times New Roman", builtElementsOn: "Include inline elements are enabled", builtElementsOFF: "Include inline elements are disabled", resetSettings: "Default settings have been set", panelShow: "Panel show", panelHide: "Panel hide", panelOn: "Site version for visually impaired", panelOff: "Regular version of the site" } } }, p = function() {
9573      function e2(t2) {
9574        i(this, e2), this._config = t2;
9575      }
9576      return o(e2, [{ key: "t", value: function(e3) {
9577        return g[this._config.lang].text[e3];
9578      } }, { key: "v", value: function(e3) {
9579        return g[this._config.lang].voice[e3];
9580      } }]), e2;
9581    }(), y = { target: ".bvi-open", fontSize: 16, theme: "white", images: "grayscale", letterSpacing: "normal", lineHeight: "normal", speech: true, fontFamily: "arial", builtElements: false, panelFixed: true, panelHide: false, reload: false, lang: "ru-RU" }, S = { target: "string", fontSize: "number", theme: "string", images: "(string|boolean)", letterSpacing: "string", lineHeight: "string", speech: "boolean", fontFamily: "string", builtElements: "boolean", panelFixed: "boolean", panelHide: "boolean", reload: "boolean", lang: "string" }, _ = { target: "", fontSize: "(^[1-9]$|^[1-3][0-9]?$|^39$)", theme: "(white|black|blue|brown|green)", images: "(true|false|grayscale)", letterSpacing: "(normal|average|big)", lineHeight: "(normal|average|big)", speech: "(true|false)", fontFamily: "(arial|times)", builtElements: "(true|false)", panelFixed: "(true|false)", panelHide: "(true|false)", reload: "(true|false)", lang: "(ru-RU|en-US)" };
9582    return { Bvi: function() {
9583      function e2(t2) {
9584        i(this, e2), this._config = this._getConfig(t2), this._elements = document.querySelectorAll(this._config.target), this._i18n = new p({ lang: this._config.lang }), this._addEventListeners(), this._init(), console.log("Bvi console: ready Button visually impaired v1.0.0");
9585      }
9586      return o(e2, [{ key: "_init", value: function() {
9587        v(this._config, function(e3) {
9588          void 0 === m(e3) && b("panelActive");
9589        }), l(m("panelActive")) ? (this._set(), this._getPanel(), this._addEventListenersPanel(), this._images(), this._speechPlayer(), "speechSynthesis" in window && l(m("speech")) && setInterval(function() {
9590          if (false === h().pending) {
9591            var e3 = document.querySelectorAll(".bvi-speech-play"), t2 = document.querySelectorAll(".bvi-speech-pause"), n2 = document.querySelectorAll(".bvi-speech-resume"), i2 = document.querySelectorAll(".bvi-speech-stop"), r2 = function(e4, t3) {
9592              e4.forEach(function(e5) {
9593                return t3(e5);
9594              });
9595            };
9596            r2(e3, function(e4) {
9597              return e4.classList.remove("disabled");
9598            }), r2(t2, function(e4) {
9599              return e4.classList.add("disabled");
9600            }), r2(n2, function(e4) {
9601              return e4.classList.add("disabled");
9602            }), r2(i2, function(e4) {
9603              return e4.classList.add("disabled");
9604            });
9605          }
9606        }, 1e3)) : this._remove();
9607      } }, { key: "_addEventListeners", value: function() {
9608        var e3 = this;
9609        if (!this._elements) return false;
9610        this._elements.forEach(function(t2) {
9611          t2.addEventListener("click", function(t3) {
9612            t3.preventDefault(), v(e3._config, function(t4) {
9613              return d(t4, e3._config[t4]);
9614            }), d("panelActive", true), e3._init(), e3._speech("".concat(e3._i18n.v("panelOn")));
9615          });
9616        });
9617      } }, { key: "_addEventListenersPanel", value: function() {
9618        var e3 = this, t2 = { fontSizeMinus: document.querySelector(".bvi-fontSize-minus"), fontSizePlus: document.querySelector(".bvi-fontSize-plus"), themeWhite: document.querySelector(".bvi-theme-white"), themeBlack: document.querySelector(".bvi-theme-black"), themeBlue: document.querySelector(".bvi-theme-blue"), themeBrown: document.querySelector(".bvi-theme-brown"), themeGreen: document.querySelector(".bvi-theme-green"), imagesOn: document.querySelector(".bvi-images-on"), imagesOff: document.querySelector(".bvi-images-off"), imagesGrayscale: document.querySelector(".bvi-images-grayscale"), speechOn: document.querySelector(".bvi-speech-on"), speechOff: document.querySelector(".bvi-speech-off"), lineHeightNormal: document.querySelector(".bvi-line-height-normal"), lineHeightAverage: document.querySelector(".bvi-line-height-average"), lineHeightBig: document.querySelector(".bvi-line-height-big"), letterSpacingNormal: document.querySelector(".bvi-letter-spacing-normal"), letterSpacingAverage: document.querySelector(".bvi-letter-spacing-average"), letterSpacingBig: document.querySelector(".bvi-letter-spacing-big"), fontFamilyArial: document.querySelector(".bvi-font-family-arial"), fontFamilyTimes: document.querySelector(".bvi-font-family-times"), builtElementsOn: document.querySelector(".bvi-built-elements-on"), builtElementsOff: document.querySelector(".bvi-built-elements-off"), reset: document.querySelector(".bvi-reset"), links: document.querySelectorAll(".bvi-link"), modal: document.querySelector(".bvi-modal") }, n2 = function(e4) {
9619          var t3, n3 = function(e5, t4) {
9620            var n4 = "undefined" != typeof Symbol && e5[Symbol.iterator] || e5["@@iterator"];
9621            if (!n4) {
9622              if (Array.isArray(e5) || (n4 = function(e6, t5) {
9623                if (e6) {
9624                  if ("string" == typeof e6) return c(e6, t5);
9625                  var n5 = Object.prototype.toString.call(e6).slice(8, -1);
9626                  return "Object" === n5 && e6.constructor && (n5 = e6.constructor.name), "Map" === n5 || "Set" === n5 ? Array.from(e6) : "Arguments" === n5 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n5) ? c(e6, t5) : void 0;
9627                }
9628              }(e5)) || t4) {
9629                n4 && (e5 = n4);
9630                var i3 = 0, r3 = function() {
9631                };
9632                return { s: r3, n: function() {
9633                  return i3 >= e5.length ? { done: true } : { done: false, value: e5[i3++] };
9634                }, e: function(e6) {
9635                  throw e6;
9636                }, f: r3 };
9637              }
9638              throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
9639            }
9640            var o2, a2 = true, l2 = false;
9641            return { s: function() {
9642              n4 = n4.call(e5);
9643            }, n: function() {
9644              var e6 = n4.next();
9645              return a2 = e6.done, e6;
9646            }, e: function(e6) {
9647              l2 = true, o2 = e6;
9648            }, f: function() {
9649              try {
9650                a2 || null == n4.return || n4.return();
9651              } finally {
9652                if (l2) throw o2;
9653              }
9654            } };
9655          }(e4.parentNode.children);
9656          try {
9657            for (n3.s(); !(t3 = n3.n()).done; ) t3.value.classList.remove("active");
9658          } catch (e5) {
9659            n3.e(e5);
9660          } finally {
9661            n3.f();
9662          }
9663          e4.classList.add("active");
9664        }, i2 = function(e4, t3) {
9665          e4.addEventListener("click", function(e5) {
9666            e5.preventDefault(), "function" == typeof t3 && t3(e5);
9667          });
9668        }, r2 = function() {
9669          document.querySelectorAll(".bvi-link").forEach(function(e4) {
9670            e4.classList.remove("active");
9671          }), v(e3._config, function(e4) {
9672            if ("theme" === e4) {
9673              var t3 = m(e4);
9674              document.querySelector(".bvi-theme-".concat(t3)).classList.add("active");
9675            }
9676            if ("images" === e4) {
9677              var n3 = "grayscale" === m(e4) ? "grayscale" : l(m(e4)) ? "on" : "off";
9678              document.querySelector(".bvi-images-".concat(n3)).classList.add("active");
9679            }
9680            if ("speech" === e4) {
9681              var i3 = l(m(e4)) ? "on" : "off";
9682              document.querySelector(".bvi-speech-".concat(i3)).classList.add("active");
9683            }
9684            if ("lineHeight" === e4) {
9685              var r3 = m(e4);
9686              document.querySelector(".bvi-line-height-".concat(r3)).classList.add("active");
9687            }
9688            if ("letterSpacing" === e4) {
9689              var o2 = m(e4);
9690              document.querySelector(".bvi-letter-spacing-".concat(o2)).classList.add("active");
9691            }
9692            if ("fontFamily" === e4) {
9693              var a2 = m(e4);
9694              document.querySelector(".bvi-font-family-".concat(a2)).classList.add("active");
9695            }
9696            if ("builtElements" === e4) {
9697              var c2 = l(m(e4)) ? "on" : "off";
9698              document.querySelector(".bvi-built-elements-".concat(c2)).classList.add("active");
9699            }
9700          });
9701        };
9702        r2(), i2(t2.fontSizeMinus, function() {
9703          var i3 = parseFloat(m("fontSize")) - 1;
9704          0 !== i3 && (e3._setAttrDataBviBody("fontSize", i3), d("fontSize", i3), e3._speech("".concat(e3._i18n.v("fontSizeMinus"))), n2(t2.fontSizeMinus));
9705        }), i2(t2.fontSizePlus, function() {
9706          var i3 = parseFloat(m("fontSize")) + 1;
9707          40 !== i3 && (e3._setAttrDataBviBody("fontSize", i3), d("fontSize", i3), e3._speech("".concat(e3._i18n.v("fontSizePlus"))), n2(t2.fontSizePlus));
9708        }), i2(t2.themeWhite, function() {
9709          e3._setAttrDataBviBody("theme", "white"), d("theme", "white"), e3._speech("".concat(e3._i18n.v("siteColorBlackOnWhite"))), n2(t2.themeWhite);
9710        }), i2(t2.themeBlack, function() {
9711          e3._setAttrDataBviBody("theme", "black"), d("theme", "black"), e3._speech("".concat(e3._i18n.v("siteColorWhiteOnBlack"))), n2(t2.themeBlack);
9712        }), i2(t2.themeBlue, function() {
9713          e3._setAttrDataBviBody("theme", "blue"), d("theme", "blue"), e3._speech("".concat(e3._i18n.v("siteColorDarkBlueOnBlue"))), n2(t2.themeBlue);
9714        }), i2(t2.themeBrown, function() {
9715          e3._setAttrDataBviBody("theme", "brown"), d("theme", "brown"), e3._speech("".concat(e3._i18n.v("siteColorBeigeBrown"))), n2(t2.themeBrown);
9716        }), i2(t2.themeGreen, function() {
9717          e3._setAttrDataBviBody("theme", "green"), d("theme", "green"), e3._speech("".concat(e3._i18n.v("siteColorGreenOnDarkBrown"))), n2(t2.themeGreen);
9718        }), i2(t2.imagesOn, function() {
9719          e3._setAttrDataBviBody("images", "true"), d("images", "true"), e3._speech("".concat(e3._i18n.v("imagesOn"))), n2(t2.imagesOn);
9720        }), i2(t2.imagesOff, function() {
9721          e3._setAttrDataBviBody("images", "false"), d("images", "false"), e3._speech("".concat(e3._i18n.v("imagesOFF"))), n2(t2.imagesOff);
9722        }), i2(t2.imagesGrayscale, function() {
9723          e3._setAttrDataBviBody("images", "grayscale"), d("images", "grayscale"), e3._speech("".concat(e3._i18n.v("imagesGrayscale"))), n2(t2.imagesGrayscale);
9724        }), i2(t2.speechOn, function() {
9725          e3._setAttrDataBviBody("speech", "true"), d("speech", "true"), e3._speech("".concat(e3._i18n.v("speechOn"))), n2(t2.speechOn), e3._speechPlayer();
9726        }), i2(t2.speechOff, function() {
9727          e3._speech("".concat(e3._i18n.v("speechOff"))), e3._setAttrDataBviBody("speech", "false"), d("speech", "false"), n2(t2.speechOff), e3._speechPlayer();
9728        }), i2(t2.lineHeightNormal, function() {
9729          e3._setAttrDataBviBody("lineHeight", "normal"), d("lineHeight", "normal"), e3._speech("".concat(e3._i18n.v("lineHeightNormal"))), n2(t2.lineHeightNormal);
9730        }), i2(t2.lineHeightAverage, function() {
9731          e3._setAttrDataBviBody("lineHeight", "average"), d("lineHeight", "average"), e3._speech("".concat(e3._i18n.v("lineHeightAverage"))), n2(t2.lineHeightAverage);
9732        }), i2(t2.lineHeightBig, function() {
9733          e3._setAttrDataBviBody("lineHeight", "big"), d("lineHeight", "big"), e3._speech("".concat(e3._i18n.v("lineHeightBig"))), n2(t2.lineHeightBig);
9734        }), i2(t2.letterSpacingNormal, function() {
9735          e3._setAttrDataBviBody("letterSpacing", "normal"), d("letterSpacing", "normal"), e3._speech("".concat(e3._i18n.v("LetterSpacingNormal"))), n2(t2.letterSpacingNormal);
9736        }), i2(t2.letterSpacingAverage, function() {
9737          e3._setAttrDataBviBody("letterSpacing", "average"), d("letterSpacing", "average"), e3._speech("".concat(e3._i18n.v("LetterSpacingAverage"))), n2(t2.letterSpacingAverage);
9738        }), i2(t2.letterSpacingBig, function() {
9739          e3._setAttrDataBviBody("letterSpacing", "big"), d("letterSpacing", "big"), e3._speech("".concat(e3._i18n.v("LetterSpacingBig"))), n2(t2.letterSpacingBig);
9740        }), i2(t2.fontFamilyArial, function() {
9741          e3._setAttrDataBviBody("fontFamily", "arial"), d("fontFamily", "arial"), e3._speech("".concat(e3._i18n.v("fontArial"))), n2(t2.fontFamilyArial);
9742        }), i2(t2.fontFamilyTimes, function() {
9743          e3._setAttrDataBviBody("fontFamily", "times"), d("fontFamily", "times"), e3._speech("".concat(e3._i18n.v("fontTimes"))), n2(t2.fontFamilyTimes);
9744        }), i2(t2.builtElementsOn, function() {
9745          e3._setAttrDataBviBody("builtElements", "true"), d("builtElements", "true"), e3._speech("".concat(e3._i18n.v("builtElementsOn"))), n2(t2.builtElementsOn);
9746        }), i2(t2.builtElementsOff, function() {
9747          e3._setAttrDataBviBody("builtElements", "false"), d("builtElements", "false"), e3._speech("".concat(e3._i18n.v("builtElementsOFF"))), n2(t2.builtElementsOff);
9748        }), i2(t2.reset, function() {
9749          e3._speech("".concat(e3._i18n.v("resetSettings"))), v(e3._config, function(t3) {
9750            e3._setAttrDataBviBody(t3, e3._config[t3]), d(t3, e3._config[t3]), r2();
9751          });
9752        }), f(t2.links, function(n3) {
9753          i2(n3, function(n4) {
9754            var i3 = n4.target.getAttribute("data-bvi");
9755            "close" === i3 && (e3._setAttrDataBviBody("panelActive", "false"), d("panelActive", "false"), e3._init()), "modal" === i3 && (document.body.style.overflow = "hidden", document.body.classList.add("bvi-noscroll"), t2.modal.classList.toggle("show")), "modal-close" === i3 && (document.body.classList.remove("bvi-noscroll"), document.body.style.overflow = "", t2.modal.classList.remove("show")), "panel-hide" === i3 && (document.querySelector(".bvi-panel").classList.add("bvi-panel-hide"), document.querySelector(".bvi-link-fixed-top").classList.remove("bvi-hide"), document.querySelector(".bvi-link-fixed-top").classList.add("bvi-show"), d("panelHide", "true"), e3._speech("".concat(e3._i18n.v("panelHide")))), "panel-show" === i3 && (document.querySelector(".bvi-link-fixed-top").classList.remove("bvi-show"), document.querySelector(".bvi-link-fixed-top").classList.add("bvi-hide"), document.querySelector(".bvi-panel").classList.remove("bvi-panel-hide"), d("panelHide", "false"), e3._speech("".concat(e3._i18n.v("panelShow"))));
9756          });
9757        }), i2(t2.modal, function(e4) {
9758          e4.target.contains(t2.modal) && (document.body.classList.remove("bvi-noscroll"), document.body.style.overflow = "", t2.modal.classList.remove("show"));
9759        });
9760      } }, { key: "_getPanel", value: function() {
9761        var e3 = function() {
9762          var e4 = void 0 !== window.pageYOffset ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop;
9763          l(m("panelFixed")) && (e4 > 200 ? document.querySelector(".bvi-panel").classList.add("bvi-fixed-top") : document.querySelector(".bvi-panel").classList.remove("bvi-fixed-top"));
9764        }, t2 = l(m("panelHide")) ? " bvi-panel-hide" : "", n2 = l(m("panelHide")) ? "bvi-show" : " bvi-hide", i2 = "\n    <div class='bvi-panel".concat(t2, `'>
9765        <div class="bvi-blocks bvi-block-center">
9766            <div class="bvi-block">
9767                <div class="bvi-block-title">`).concat(this._i18n.t("fontSize"), '</div>\n                <a class="bvi-link bvi-fontSize-minus">А-</a>\n                <a class="bvi-link bvi-fontSize-plus">А+</a>\n            </div>\n            <div class="bvi-block">\n                <div class="bvi-block-title">').concat(this._i18n.t("siteColors"), '</div>\n                <a href="#" class="bvi-link bvi-theme-white">Ц</a>\n                <a href="#" class="bvi-link bvi-theme-black">Ц</a>\n                <a href="#" class="bvi-link bvi-theme-blue">Ц</a>\n                <a href="#" class="bvi-link bvi-theme-brown">Ц</a>\n                <a href="#" class="bvi-link bvi-theme-green">Ц</a>\n            </div>\n            <div class="bvi-block">\n                <div class="bvi-block-title">').concat(this._i18n.t("images"), '</div>\n                <a href="#" class="bvi-link bvi-images-on">\n                    <i class="bvi-images bvi-images-image"></i>\n                </a>\n                <a href="#" class="bvi-link bvi-images-off">\n                    <i class="bvi-images bvi-images-minus-circle"></i>\n                </a>\n                <a href="#" class="bvi-link bvi-images-grayscale">\n                    <i class="bvi-images bvi-images-adjust"></i>\n                </a>\n            </div>\n            <div class="bvi-block">\n                <div class="bvi-block-title">').concat(this._i18n.t("speech"), '</div>\n                <a href="#" class="bvi-link bvi-speech-off">\n                    <i class="bvi-images bvi-images-volume-off"></i>\n                </a>\n                <a href="#" class="bvi-link bvi-speech-on">\n                    <i class="bvi-images bvi-images-volume-up"></i>\n                </a>\n            </div>\n            <div class="bvi-block">\n                <div class="bvi-block-title">').concat(this._i18n.t("settings"), '</div>\n                <a href="#" class="bvi-link" data-bvi="modal">\n                    <i class="bvi-images bvi-images-cog"></i>\n                </a>\n                <a href="#" class="bvi-link" data-bvi="close">\n                    ').concat(this._i18n.t("regularVersionOfTheSite"), '\n                </a>\n                <a href="#" class="bvi-link" data-bvi="panel-hide">\n                    <i class="bvi-images bvi-images-minus"></i>\n                </a>\n            </div>\n        </div>\n        <div class="bvi-modal">\n            <div class="bvi-modal-dialog">\n                <div class="bvi-modal-content">\n                    <div class="bvi-modal-header">\n                        <div class="bvi-modal-title">').concat(this._i18n.t("settings"), '</div>\n                        <a href="#" class="bvi-link bvi-modal-close" data-bvi="modal-close">×</a>\n                    </div>\n                    <div class="bvi-modal-body">\n                        <div class="bvi-blocks bvi-block-center">\n                            <div class="bvi-block">\n                                <div class="bvi-block-title">').concat(this._i18n.t("letterSpacing"), '</div>\n                                <a href="#" class="bvi-link bvi-letter-spacing-normal">').concat(this._i18n.t("normal"), '</a>\n                                <a href="#" class="bvi-link bvi-letter-spacing-average">').concat(this._i18n.t("average"), '</a>\n                                <a href="#" class="bvi-link bvi-letter-spacing-big">').concat(this._i18n.t("big"), '</a>\n                            </div>\n                            <div class="bvi-block">\n                                <div class="bvi-block-title">').concat(this._i18n.t("lineHeight"), '</div>\n                                <a href="#" class="bvi-link bvi-line-height-normal">').concat(this._i18n.t("normal"), '</a>\n                                <a href="#" class="bvi-link bvi-line-height-average">').concat(this._i18n.t("average"), '</a>\n                                <a href="#" class="bvi-link bvi-line-height-big">').concat(this._i18n.t("big"), '</a>\n                            </div>\n                            <div class="bvi-block">\n                                <div class="bvi-block-title">').concat(this._i18n.t("font"), '</div>\n                                <a href="#" class="bvi-link bvi-font-family-arial">').concat(this._i18n.t("arial"), '</a>\n                                <a href="#" class="bvi-link bvi-font-family-times">').concat(this._i18n.t("times"), '</a>\n                            </div>\n                            <div class="bvi-block">\n                                <div class="bvi-block-title">').concat(this._i18n.t("builtElements"), '</div>\n                                <a href="#" class="bvi-link bvi-built-elements-on">').concat(this._i18n.t("on"), '</a>\n                                <a href="#" class="bvi-link bvi-built-elements-off">').concat(this._i18n.t("off"), '</a>\n                            </div>\n                        </div>\n                        <div class="bvi-blocks bvi-block-center">\n                            <a href="https://bvi.isvek.ru" class="bvi-copyright" target="_blank">bvi.isvek.ru</a>\n                        </div>\n                    </div>\n                    <div class="bvi-modal-footer">\n                        <a href="#" class="bvi-link bvi-reset">').concat(this._i18n.t("reset"), "</a>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>"), r2 = '<a href="#" class="bvi-link bvi-link-fixed-top bvi-no-styles '.concat(n2, '" data-bvi="panel-show">') + '<i class="bvi-images bvi-images-eye bvi-images-size-32 bvi-no-styles"></i></a>';
9768        window.addEventListener("scroll", e3), document.querySelector(".bvi-body").insertAdjacentHTML("beforebegin", i2), document.querySelector(".bvi-body").insertAdjacentHTML("afterbegin", r2), e3();
9769      } }, { key: "_set", value: function() {
9770        var e3 = this;
9771        document.body.classList.add("bvi-active"), s(document.body, "div", "bvi-body"), v(this._config, function(t2) {
9772          return e3._setAttrDataBviBody(t2, m(t2));
9773        }), f(this._elements, function(e4) {
9774          return e4.style.display = "none";
9775        }), document.querySelectorAll("img").forEach(function(e4) {
9776          e4.classList.contains("bvi-img") && e4.classList.remove("bvi-img");
9777        }), document.querySelectorAll("body *").forEach(function(e4) {
9778          e4.classList.contains("bvi-background-image") && e4.classList.remove("bvi-background-image");
9779        });
9780      } }, { key: "_remove", value: function() {
9781        var e3 = document.querySelector(".bvi-panel"), t2 = document.querySelector(".bvi-body"), n2 = document.querySelector(".bvi-link-fixed-top");
9782        e3 && e3.remove(), t2 && u(t2), n2 && n2.remove(), this._speech("".concat(this._i18n.v("panelOff"))), document.body.classList.remove("bvi-active"), f(this._elements, function(e4) {
9783          return e4.style.display = "";
9784        }), l(m("reload")) && document.location.reload(), v(this._config, function(e4) {
9785          b(e4);
9786        }), this._speechPlayer(), b("panelActive");
9787      } }, { key: "_images", value: function() {
9788        document.querySelectorAll("img").forEach(function(e3) {
9789          e3.classList.contains("bvi-no-style") || e3.classList.add("bvi-img");
9790        }), document.querySelectorAll(".bvi-body *").forEach(function(e3) {
9791          var t2 = getComputedStyle(e3);
9792          "none" === t2.backgroundImage || "none" === t2.background || e3.classList.contains("bvi-no-style") || e3.classList.add("bvi-background-image");
9793        });
9794      } }, { key: "_getConfig", value: function(e3) {
9795        e3 = t(t({}, y), e3);
9796        var i2 = {};
9797        for (var r2 in y) i2[r2] = e3[r2];
9798        return function(e4, t2, i3) {
9799          Object.keys(t2).forEach(function(i4) {
9800            var r3, o2 = t2[i4], a2 = e4[i4], c2 = a2 && (r3 = a2) && "object" === n(r3) && void 0 !== r3.nodeType ? "element" : function(e5) {
9801              return null == e5 ? "".concat(e5) : {}.toString.call(e5).match(/\s([a-z]+)/i)[1].toLowerCase();
9802            }(a2);
9803            if (!new RegExp(o2).test(c2)) throw new TypeError('Bvi console: Опция "'.concat(i4, '" предоставленный тип "').concat(c2, '", ожидаемый тип "').concat(o2, '".'));
9804          }), Object.keys(i3).forEach(function(t3) {
9805            var n2 = i3[t3], r3 = e4[t3];
9806            if (!new RegExp(n2).test(r3)) throw new TypeError('Bvi console: Опция "'.concat(t3, '" параметр "').concat(r3, '", ожидаемый параметр "').concat(n2, '".'));
9807          });
9808        }(i2, S, _), i2;
9809      } }, { key: "_setAttrDataBviBody", value: function() {
9810        var e3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "", t2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "";
9811        document.querySelector(".bvi-body").setAttribute("data-bvi-".concat(e3), t2);
9812      } }, { key: "_speechPlayer", value: function() {
9813        var e3 = this, t2 = document.querySelectorAll(".bvi-speech-text"), n2 = document.querySelectorAll(".bvi-speech-link"), i2 = document.querySelectorAll(".bvi-speech");
9814        if ("speechSynthesis" in window && l(m("speech"))) {
9815          if (i2) {
9816            t2 && t2.forEach(function(e4) {
9817              return u(e4);
9818            }), n2 && n2.forEach(function(e4) {
9819              return e4.remove();
9820            }), i2.forEach(function(e4, t3) {
9821              var n3 = "bvi-speech-text-id-".concat(t3 + 1);
9822              s(e4, "div", "bvi-speech-text ".concat(n3)), e4.insertAdjacentHTML("afterbegin", '\n            <div class="bvi-speech-link">\n              <a href="#" class="bvi-link bvi-speech-play" title="Воспроизвести">Воспроизвести</a>\n              <a href="#" class="bvi-link bvi-speech-pause disabled" title="Пауза">Пауза</a>\n              <a href="#" class="bvi-link bvi-speech-resume disabled" title="Продолжить">Продолжить</a>\n              <a href="#" class="bvi-link bvi-speech-stop disabled" title="Стоп">Стоп</i></a>\n          </div>');
9823            });
9824            var r2 = document.querySelectorAll(".bvi-speech-play"), o2 = document.querySelectorAll(".bvi-speech-pause"), a2 = document.querySelectorAll(".bvi-speech-resume"), c2 = document.querySelectorAll(".bvi-speech-stop"), v2 = function(e4, t3) {
9825              e4.forEach(function(e5) {
9826                e5.addEventListener("click", function(n3) {
9827                  if (n3.preventDefault(), "function" == typeof t3) return t3(e5, n3);
9828                }, false);
9829              });
9830            };
9831            v2(r2, function(t3, n3) {
9832              var i3 = n3.target, r3 = i3.parentNode.nextElementSibling, o3 = n3.target.closest(".bvi-speech-link"), a3 = document.querySelectorAll(".bvi-speech-play"), c3 = document.querySelectorAll(".bvi-speech-pause"), l2 = document.querySelectorAll(".bvi-speech-resume"), s2 = document.querySelectorAll(".bvi-speech-stop");
9833              e3._speech(r3.textContent, r3, true), a3.forEach(function(e4) {
9834                return e4.classList.remove("disabled");
9835              }), c3.forEach(function(e4) {
9836                return e4.classList.add("disabled");
9837              }), l2.forEach(function(e4) {
9838                return e4.classList.add("disabled");
9839              }), s2.forEach(function(e4) {
9840                return e4.classList.add("disabled");
9841              }), i3.classList.add("disabled"), o3.querySelector(".bvi-speech-pause").classList.remove("disabled"), o3.querySelector(".bvi-speech-stop").classList.remove("disabled");
9842            }), v2(o2, function(e4, t3) {
9843              var n3 = t3.target, i3 = t3.target.closest(".bvi-speech-link");
9844              n3.classList.add("disabled"), i3.querySelector(".bvi-speech-resume").classList.remove("disabled"), h().pause();
9845            }), v2(a2, function(e4, t3) {
9846              var n3 = t3.target, i3 = t3.target.closest(".bvi-speech-link");
9847              n3.classList.add("disabled"), i3.querySelector(".bvi-speech-pause").classList.remove("disabled"), h().resume();
9848            }), v2(c2, function(e4, t3) {
9849              var n3 = t3.target, i3 = t3.target.closest(".bvi-speech-link");
9850              n3.classList.add("disabled"), i3.querySelector(".bvi-speech-pause").classList.add("disabled"), i3.querySelector(".bvi-speech-play").classList.remove("disabled"), h().cancel();
9851            });
9852          }
9853        } else t2 && t2.forEach(function(e4) {
9854          return u(e4);
9855        }), n2 && n2.forEach(function(e4) {
9856          return e4.remove();
9857        });
9858      } }, { key: "_speech", value: function(e3, t2) {
9859        var n2 = this, i2 = arguments.length > 2 && void 0 !== arguments[2] && arguments[2];
9860        if ("speechSynthesis" in window && l(m("speech"))) {
9861          h().cancel();
9862          for (var r2 = function(e4, t3) {
9863            e4 = String(e4), t3 = Number(t3) >>> 0;
9864            var n3 = e4.slice(0, t3 + 1).search(/\S+$/), i3 = e4.slice(t3).search(/\s/);
9865            return i3 < 0 ? e4.slice(n3) : e4.slice(n3, i3 + t3);
9866          }, o2 = 120, a2 = new RegExp("^[\\s\\S]{" + Math.floor(o2 / 2) + "," + o2 + "}[.!?,]{1}|^[\\s\\S]{1," + o2 + "}$|^[\\s\\S]{1," + o2 + "} "), c2 = [], s2 = e3, u2 = h().getVoices(); s2.length > 0; ) c2.push(s2.match(a2)[0]), s2 = s2.substring(c2[c2.length - 1].length);
9867          c2.forEach(function(e4) {
9868            var o3 = new SpeechSynthesisUtterance(e4.trim());
9869            o3.volume = 1, o3.rate = 1, o3.pitch = 1, o3.lang = n2._config.lang;
9870            for (var a3 = 0; a3 < u2.length; a3++) "ru-RU" === n2._config.lang && "Microsoft Pavel - Russian (Russia)" === u2[a3].name && (o3.voice = u2[a3]), "en-US" === n2._config.lang && "Microsoft Pavel - English (English)" === u2[a3].name && (o3.voice = u2[a3]);
9871            i2 && (o3.onboundary = function(e5) {
9872              t2.classList.add("bvi-highlighting");
9873              var n3 = r2(e5.utterance.text, e5.charIndex), i3 = t2.textContent, o4 = n3.replace(/(\s+)/, "((<[^>]+>)*$1(<[^>
9873]+>)*)"), a4 = new RegExp("(" + o4 + ")", "gi");
9874              i3 = (i3 = i3.replace(a4, "<mark>$1</mark>")).replace(/(<mark>[^<>]*)((<[^>]+>)+)([^<>]*<\/mark>)/, "$1</mark>$2<mark>$4"), t2.innerHTML = i3;
9875            }, o3.onend = function(e5) {
9876              t2.classList.remove("bvi-highlighting");
9877              var n3 = t2.textContent;
9878              n3 = n3.replace(/(<mark>$1<\/mark>)/, "$1"), t2.innerHTML = n3;
9879            }), h().speak(o3);
9880          });
9881        }
9882      } }]), e2;
9883    }() };
9884  });
9885})(bvi_min);
9886var bvi_minExports = bvi_min.exports;
9887function initSliders() {
9888  new Swiper(".programs__swiper", {
9889    spaceBetween: 30,
9890    navigation: {
9891      nextEl: ".programs__swiper-button-next",
9892      prevEl: ".programs__swiper-button-prev"
9893    },
9894    breakpoints: {
9895      1280: {
9896        slidesPerView: 4
9897      },
9898      950: {
9899        slidesPerView: 3
9900      },
9901      600: {
9902        slidesPerView: 2
9903      },
9904      320: {
9905        slidesPerView: 1,
9906        grid: {
9907          rows: 2,
9908          fill: "row"
9909        }
9910      }
9911    }
9912  });
9913  new Swiper(".team__swiper", {
9914    spaceBetween: 30,
9915    navigation: {
9916      nextEl: ".team__swiper-button-next",
9917      prevEl: ".team__swiper-button-prev"
9918    },
9919    breakpoints: {
9920      1280: {
9921        slidesPerView: 4
9922      },
9923      950: {
9924        slidesPerView: 3
9925      },
9926      600: {
9927        slidesPerView: 2
9928      },
9929      320: {
9930        slidesPerView: 1,
9931        grid: {
9932          rows: 2,
9933          fill: "row"
9934        }
9935      }
9936    }
9937  });
9938  new Swiper(".news__swiper", {
9939    spaceBetween: 30,
9940    navigation: {
9941      nextEl: ".news__swiper-button-next",
9942      prevEl: ".news__swiper-button-prev"
9943    },
9944    breakpoints: {
9945      1280: {
9946        slidesPerView: 2
9947      },
9948      620: {
9949        slidesPerView: 1,
9950        grid: {
9951          rows: 2,
9952          fill: "row"
9953        }
9954      },
9955      320: {
9956        slidesPerView: 1,
9957        grid: {
9958          rows: 2,
9959          fill: "row"
9960        }
9961      }
9962    }
9963  });
9964}
9965function loaderOn() {
9966  const preloader = document.getElementById("preloader");
9967  if (!preloader) return;
9968  preloader.style.display = "flex";
9969  preloader.classList.remove("hidden");
9970}
9971function loaderOff() {
9972  const preloader = document.getElementById("preloader");
9973  if (!preloader) return;
9974  preloader.classList.add("hidden");
9975  setTimeout(() => {
9976    preloader.style.display = "none";
9977  }, 1e3);
9978}
9979function initVisuals() {
9980  window.addEventListener("load", loaderOff);
9981  const burgerMenu = document.getElementById("burger-menu");
9982  const navLinks = document.getElementById("header__nav");
9983  burgerMenu.addEventListener("click", () => {
9984    navLinks.classList.toggle("active");
9985    burgerMenu.classList.toggle("active");
9986  });
9987  for (let e of document.querySelectorAll('input[type="range"].slider-progress')) {
9988    e.style.setProperty("--value", e.value);
9989    e.style.setProperty("--min", e.min == "" ? "0" : e.min);
9990    e.style.setProperty("--max", e.max == "" ? "100" : e.max);
9991    e.addEventListener("input", () => e.style.setProperty("--value", e.value));
9992  }
9993  function rearrangeElements() {
9994    const monthsTop = document.querySelector(".ad__table-months-top");
9995    const monthsBottom = document.querySelector(".ad__table-months-bottom");
9996    const container = document.querySelector(".ad__table-months");
9997    if (!monthsTop || !monthsBottom || !container) return;
9998    if (window.innerWidth <= 800) {
9999      const months = monthsTop.querySelectorAll("span");
10000      const values = monthsBottom.querySelectorAll("span");
10001      container.innerHTML = "";
10002      let monthIndex = 0;
10003      values.forEach((value) => {
10004        const spanClass = value.className;
10005        let spanCount;
10006        if (spanClass.includes("span-1-12")) {
10007          spanCount = 1;
10008        } else if (spanClass.includes("span-1-6")) {
10009          spanCount = 2;
10010        } else if (spanClass.includes("span-1-4")) {
10011          spanCount = 3;
10012        } else if (spanClass.includes("span-1-3")) {
10013          spanCount = 4;
10014        } else if (spanClass.includes("span-1-2")) {
10015          spanCount = 6;
10016        }
10017        const monthDiv = document.createElement("div");
10018        monthDiv.classList.add("month-value-pair");
10019        const monthsWrapper = document.createElement("div");
10020        monthsWrapper.classList.add("months");
10021        for (let i = 0; i < spanCount; i++) {
10022          if (months[monthIndex]) {
10023            monthsWrapper.appendChild(months[monthIndex]);
10024            monthIndex++;
10025          }
10026        }
10027        monthDiv.appendChild(monthsWrapper);
10028        monthDiv.appendChild(value);
10029        monthDiv.classList.add(`span-${spanCount}`);
10030        container.appendChild(monthDiv);
10031      });
10032    } else {
10033      container.innerHTML = "";
10034      container.appendChild(monthsTop);
10035      container.appendChild(monthsBottom);
10036    }
10037  }
10038  window.addEventListener("resize", rearrangeElements);
10039  window.addEventListener("load", rearrangeElements);
10040  initSliders();
10041  new bvi_minExports.Bvi({
10042    target: ".header__ver-button"
10043    // fontSize: 24,
10044    // theme: 'black'
10045  });
10046}
10047const TOTAL_NEWS_COUNT = 10;
10048async function portion() {
10049  let url = window.location.href + "more.php?", btn = document.querySelector("button.button.show-more[data-from]");
10050  if (!btn) {
10051    return;
10052  }
10053  try {
10054    const response = await fetch(url + new URLSearchParams(
10055      { ajax_mode: "Y", data_from: btn.dataset.from }
10056    ).toString());
10057    let text = await response.text(), was = document.querySelectorAll(".news-page__all-items>a").length;
10058    btn.insertAdjacentHTML("beforebegin", text);
10059    let items = document.querySelectorAll(".news-page__all-items>a"), _now = items.length, id;
10060    if (_now - was > TOTAL_NEWS_COUNT) {
10061      let last = items[items.length - 1];
10062      id = last.dataset.id ?? 0;
10063      last.parentNode.removeChild(last);
10064    }
10065    if (_now - was <= TOTAL_NEWS_COUNT || id === 0) {
10066      btn.remove();
10067    } else {
10068      btn.dataset.from = id;
10069    }
10070  } catch (error) {
10071  }
10072}
10073function initNewsLoader() {
10074  let btn = document.querySelector("button.button.show-more[data-from]");
10075  if (!btn) {
10076    return;
10077  }
10078  btn.addEventListener("click", portion);
10079}
10080const streamUrl = "https://stream2.datacenter.by/trkbrest";
10081let player = new Audio(), volume = null, mute = null, button = null, local = null;
10082function playButtonHandler() {
10083  var _a, _b, _c, _d;
10084  if (player.src !== streamUrl) {
10085    player.src = streamUrl;
10086    local = null;
10087    player.load();
10088    player.play();
10089    (_a = button.querySelector(".header__play-pause")) == null ? void 0 : _a.classList.add("active");
10090  } else if (player.paused) {
10091    player.load();
10092    player.play();
10093    (_b = button.querySelector(".header__play-pause")) == null ? void 0 : _b.classList.add("active");
10094  } else if (player.muted && !(mute == null ? void 0 : mute.classList.contains("active"))) {
10095    player.muted = false;
10096    (_c = button.querySelector(".header__play-pause")) == null ? void 0 : _c.classList.add("active");
10097  } else if (player.muted && (mute == null ? void 0 : mute.classList.contains("active"))) {
10098    player.muted = false;
10099    mute == null ? void 0 : mute.classList.remove("active");
10100    if (player.volume < 0.01) {
10101      player.volume = 0.7;
10102      volume.value = 70;
10103      volume.style.setProperty("--value", 70);
10104    }
10105  } else {
10106    player.muted = true;
10107    (_d = button.querySelector(".header__play-pause")) == null ? void 0 : _d.classList.remove("active");
10108  }
10109}
10110function muteButtonHandler() {
10111  if (player.paused) return;
10112  if (!player.muted && player.volume > 0.01) {
10113    player.muted = true;
10114    mute == null ? void 0 : mute.classList.add("active");
10115  } else if (mute == null ? void 0 : mute.classList.contains("active")) {
10116    player.muted = false;
10117    if (player.volume < 0.01) {
10118      player.volume = 0.7;
10119      volume.value = 70;
10120      volume.style.setProperty("--value", 70);
10121    }
10122    mute == null ? void 0 : mute.classList.remove("active");
10123  }
10124}
10125function volumeChangeHandler(e) {
10126  let vol = parseInt(volume.value);
10127  player.volume = vol / 100;
10128  if (vol === 0) {
10129    mute == null ? void 0 : mute.classList.add("active");
10130  } else {
10131    mute == null ? void 0 : mute.classList.remove("active");
10132  }
10133}
10134const localTrackEnd = function() {
10135  if (local) {
10136    local.classList.remove("active");
10137  }
10138  console.log("end.");
10139};
10140function initPlayer() {
10141  volume = document.querySelector(".header__player-volume input");
10142  mute = document.querySelector(".header__player-mute");
10143  button = document.querySelector(".header__pb-wrap");
10144  player.src = streamUrl;
10145  player.volume = Number(volume.value) / 100;
10146  player.onended = localTrackEnd;
10147  button.addEventListener("click", playButtonHandler);
10148  mute.addEventListener("click", muteButtonHandler);
10149  volume.addEventListener("change", volumeChangeHandler);
10150  volume.addEventListener("input", volumeChangeHandler);
10151  initPageControls();
10152}
10153function localTrackHandler(e) {
10154  var _a;
10155  if (player.src === window.location.origin + e.currentTarget.dataset.mp3 && player.played && e.currentTarget.classList.contains("active")) {
10156    console.log("// проигрывается локальный файл, необходимо выключить");
10157    e.currentTarget.classList.remove("active");
10158    player.pause();
10159  } else {
10160    console.log("// запускаем проигрывание локального файла");
10161    if (local) local.classList.remove("active");
10162    player.src = e.currentTarget.dataset.mp3;
10163    player.load();
10164    player.play();
10165    local = e.currentTarget;
10166    (_a = button.querySelector(".header__play-pause")) == null ? void 0 : _a.classList.remove("active");
10167    e.currentTarget.classList.add("active");
10168    if ((mute == null ? void 0 : mute.classList.contains("active")) || player.muted) {
10169      player.muted = false;
10170      if (player.volume < 0.01) {
10171        player.volume = 0.7;
10172        volume.value = 70;
10173        volume.style.setProperty("--value", 70);
10174      }
10175      mute == null ? void 0 : mute.classList.remove("active");
10176    }
10177  }
10178}
10179function initPageControls() {
10180  local = null;
10181  for (let button2 of document.querySelectorAll("div.play-pause")) {
10182    button2.addEventListener("click", localTrackHandler);
10183  }
10184}
10185function reInitControls(page) {
10186  const footer = document.querySelector("footer");
10187  let main = document.querySelector("main");
10188  main == null ? void 0 : main.parentNode.removeChild(main);
10189  footer.insertAdjacentHTML("beforebegin", page);
10190  window.scrollTo(0, 0);
10191  main = document.querySelector("main");
10192  document.querySelector("title").innerText = main == null ? void 0 : main.dataset.title;
10193  for (let a of main.querySelectorAll("a:where(.breadcrumbs__link,.contacts__link.link,.programs__link.link,.team__link.link,.news__link.link), .news__swiper-slide a, .news-page__latest-items a, .programs__item a")) {
10194    a.addEventListener("click", linkHandler);
10195  }
10196  initSliders();
10197  initPageControls();
10198  initNewsLoader();
10199}
10200async function linkHandler(e) {
10201  var _a, _b;
10202  if (e.currentTarget.getAttribute("href").includes("://")) {
10203    const host = new URL(e.currentTarget.getAttribute("href")).host;
10204    if (host !== document.location.host) return;
10205  }
10206  e.preventDefault();
10207  const url = window.location.origin + e.currentTarget.getAttribute("href");
10208  try {
10209    loaderOn();
10210    const response = await fetch(url + "index.php?ajax_mode=Y");
10211    reInitControls(await response.text());
10212    history.pushState({}, null, url);
10213    (_a = document.getElementById("burger-menu")) == null ? void 0 : _a.classList.remove("active");
10214    (_b = document.getElementById("header__nav")) == null ? void 0 : _b.classList.remove("active");
10215  } catch (error) {
10216  }
10217  loaderOff();
10218}
10219async function backHandler(e) {
10220  e.preventDefault();
10221  const url = window.location.origin + document.location.pathname;
10222  try {
10223    loaderOn();
10224    const response = await fetch(url + "index.php?ajax_mode=Y");
10225    reInitControls(await response.text());
10226  } catch (error) {
10227  }
10228  loaderOff();
10229}
10230function initSpa() {
10231  for (let a of document.querySelectorAll("a:where(.header__list-link,.footer__nav-link,.breadcrumbs__link,.contacts__link.link,.header__logo-link.logo,.programs__link.link,.team__link.link,.news__link.link), .news__swiper-slide a, .news-page__latest-items a, .programs__item a")) {
10232    a.addEventListener("click", linkHandler);
10233  }
10234  window.addEventListener("popstate", backHandler);
10235}
10236document.addEventListener("DOMContentLoaded", function() {
10237  initVisuals();
10238  initNewsLoader();
10239  initSpa();
10240  initPlayer();
10241});

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.