@streamlayer/react 1.24.5 → 1.24.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/lib/cjs/advertisement.js +19607 -203
  2. package/lib/cjs/auth.js +4459 -1
  3. package/lib/cjs/bet-pack.js +15691 -1
  4. package/lib/cjs/index.js +19411 -1
  5. package/lib/cjs/insight.js +13509 -1
  6. package/lib/cjs/masters.js +20696 -1
  7. package/lib/cjs/notification.js +13087 -1
  8. package/lib/cjs/package.json +1 -0
  9. package/lib/cjs/pause-ad.js +8390 -1
  10. package/lib/cjs/points.js +7189 -1
  11. package/lib/cjs/polyfills.js +69 -0
  12. package/lib/cjs/polymarket.js +16394 -14
  13. package/lib/cjs/style.css +1 -0
  14. package/lib/cjs/useStreamLayerApp.js +4711 -1
  15. package/lib/dist/cjs/index.js +20696 -1
  16. package/lib/dist/es/index.js +20669 -10
  17. package/lib/dist/es/polyfills.js +92 -0
  18. package/lib/es/Question.js +66 -65
  19. package/lib/es/advertisement.js +3402 -3294
  20. package/lib/es/analytics.js +1 -1
  21. package/lib/es/bet-pack.js +1 -1
  22. package/lib/es/feature.js +192 -37
  23. package/lib/es/{index-DvqmgCor.js → index-D8wyDNJD.js} +1 -1
  24. package/lib/es/index.js +1 -1
  25. package/lib/es/index10.js +181 -7
  26. package/lib/es/index11.js +371 -181
  27. package/lib/es/index12.js +366 -2579
  28. package/lib/es/index13.js +789 -234
  29. package/lib/es/index14.js +293 -792
  30. package/lib/es/index15.js +2550 -305
  31. package/lib/es/index16.js +64 -66
  32. package/lib/es/index2.js +285 -279
  33. package/lib/es/index3.js +34 -4
  34. package/lib/es/index4.js +16 -17
  35. package/lib/es/index5.js +3 -19
  36. package/lib/es/index6.js +7 -5
  37. package/lib/es/index7.js +284 -5
  38. package/lib/es/index8.js +236 -281
  39. package/lib/es/index9.js +8 -179
  40. package/lib/es/insight.js +2 -2
  41. package/lib/es/masters2.js +199 -189
  42. package/lib/es/notification.js +27 -28
  43. package/lib/es/pause-ad.js +124 -149
  44. package/lib/es/points.js +23 -24
  45. package/lib/es/polymarket.js +3 -3
  46. package/lib/es/storage.js +4 -4
  47. package/lib/es/style.css +1 -0
  48. package/lib/es/useStreamLayerApp2.js +5579 -4475
  49. package/lib/source.css +1 -120
  50. package/package.json +126 -91
  51. package/lib/cjs/Question.js +0 -1
  52. package/lib/cjs/analytics.js +0 -1
  53. package/lib/cjs/feature.js +0 -1
  54. package/lib/cjs/gamification-feature.js +0 -1
  55. package/lib/cjs/gamification-feature2.js +0 -1
  56. package/lib/cjs/hooks-n9ax4LRT.js +0 -1
  57. package/lib/cjs/index-DvqmgCor.js +0 -5
  58. package/lib/cjs/index10.js +0 -1
  59. package/lib/cjs/index11.js +0 -1
  60. package/lib/cjs/index12.js +0 -1
  61. package/lib/cjs/index13.js +0 -1
  62. package/lib/cjs/index14.js +0 -4
  63. package/lib/cjs/index15.js +0 -1
  64. package/lib/cjs/index16.js +0 -5
  65. package/lib/cjs/index2.js +0 -1
  66. package/lib/cjs/index3.js +0 -1
  67. package/lib/cjs/index4.js +0 -5
  68. package/lib/cjs/index5.js +0 -1
  69. package/lib/cjs/index6.js +0 -1
  70. package/lib/cjs/index7.js +0 -1
  71. package/lib/cjs/index8.js +0 -1
  72. package/lib/cjs/index9.js +0 -7
  73. package/lib/cjs/masters2.js +0 -8
  74. package/lib/cjs/sl-types.js +0 -1
  75. package/lib/cjs/storage.js +0 -1
  76. package/lib/cjs/theme.js +0 -1
  77. package/lib/cjs/useStreamLayerApp2.js +0 -17
  78. package/lib/cjs/utils.js +0 -47
  79. package/lib/classic/app/advertisement.d.ts +0 -19
  80. package/lib/classic/app/app.d.ts +0 -23
  81. package/lib/classic/app/auth.d.ts +0 -4
  82. package/lib/classic/app/bet-pack.d.ts +0 -10
  83. package/lib/classic/app/insight.d.ts +0 -13
  84. package/lib/classic/app/masters.d.ts +0 -19
  85. package/lib/classic/app/notification.d.ts +0 -5
  86. package/lib/classic/app/pause-ad.d.ts +0 -27
  87. package/lib/classic/app/points.d.ts +0 -3
  88. package/lib/classic/app/polymarket.d.ts +0 -7
  89. package/lib/classic/app/useStreamLayerApp.d.ts +0 -1
  90. package/lib/classic/cjs/Question.js +0 -1
  91. package/lib/classic/cjs/advertisement.js +0 -203
  92. package/lib/classic/cjs/analytics.js +0 -1
  93. package/lib/classic/cjs/auth.js +0 -1
  94. package/lib/classic/cjs/bet-pack.js +0 -5
  95. package/lib/classic/cjs/feature.js +0 -1
  96. package/lib/classic/cjs/gamification-feature.js +0 -1
  97. package/lib/classic/cjs/hooks-n9ax4LRT.js +0 -1
  98. package/lib/classic/cjs/index-DvqmgCor.js +0 -5
  99. package/lib/classic/cjs/index.js +0 -1
  100. package/lib/classic/cjs/index10.js +0 -1
  101. package/lib/classic/cjs/index11.js +0 -1
  102. package/lib/classic/cjs/index12.js +0 -1
  103. package/lib/classic/cjs/index13.js +0 -4
  104. package/lib/classic/cjs/index2.js +0 -5
  105. package/lib/classic/cjs/index3.js +0 -1
  106. package/lib/classic/cjs/index4.js +0 -1
  107. package/lib/classic/cjs/index5.js +0 -1
  108. package/lib/classic/cjs/index6.js +0 -1
  109. package/lib/classic/cjs/index7.js +0 -7
  110. package/lib/classic/cjs/index8.js +0 -1
  111. package/lib/classic/cjs/index9.js +0 -1
  112. package/lib/classic/cjs/insight.js +0 -1
  113. package/lib/classic/cjs/notification.js +0 -1
  114. package/lib/classic/cjs/notification2.js +0 -1
  115. package/lib/classic/cjs/pause-ad.js +0 -1
  116. package/lib/classic/cjs/points.js +0 -1
  117. package/lib/classic/cjs/polymarket.js +0 -14
  118. package/lib/classic/cjs/sl-types.js +0 -1
  119. package/lib/classic/cjs/useStreamLayerApp.js +0 -1
  120. package/lib/classic/cjs/useStreamLayerApp2.js +0 -17
  121. package/lib/classic/cjs/utils.js +0 -47
  122. package/lib/classic/es/Question.js +0 -388
  123. package/lib/classic/es/advertisement.js +0 -38759
  124. package/lib/classic/es/analytics.js +0 -84
  125. package/lib/classic/es/auth.js +0 -11
  126. package/lib/classic/es/bet-pack.js +0 -3419
  127. package/lib/classic/es/feature.js +0 -59
  128. package/lib/classic/es/gamification-feature.js +0 -4
  129. package/lib/classic/es/hooks-n9ax4LRT.js +0 -97
  130. package/lib/classic/es/index-DvqmgCor.js +0 -3775
  131. package/lib/classic/es/index.js +0 -15
  132. package/lib/classic/es/index10.js +0 -2592
  133. package/lib/classic/es/index11.js +0 -317
  134. package/lib/classic/es/index12.js +0 -185
  135. package/lib/classic/es/index13.js +0 -820
  136. package/lib/classic/es/index2.js +0 -2597
  137. package/lib/classic/es/index3.js +0 -19
  138. package/lib/classic/es/index4.js +0 -6
  139. package/lib/classic/es/index5.js +0 -5
  140. package/lib/classic/es/index6.js +0 -285
  141. package/lib/classic/es/index7.js +0 -181
  142. package/lib/classic/es/index8.js +0 -7
  143. package/lib/classic/es/index9.js +0 -11
  144. package/lib/classic/es/insight.js +0 -79
  145. package/lib/classic/es/notification.js +0 -9
  146. package/lib/classic/es/notification2.js +0 -1127
  147. package/lib/classic/es/pause-ad.js +0 -257
  148. package/lib/classic/es/points.js +0 -77
  149. package/lib/classic/es/polymarket.js +0 -6617
  150. package/lib/classic/es/sl-types.js +0 -156
  151. package/lib/classic/es/useStreamLayerApp.js +0 -4
  152. package/lib/classic/es/useStreamLayerApp2.js +0 -11573
  153. package/lib/classic/es/utils.js +0 -76
  154. package/lib/classic/index.d.ts +0 -6
  155. package/lib/classic/masters.d.ts +0 -8
  156. package/lib/classic/source.css +0 -110
  157. package/lib/dist/cjs/gamification-feature.js +0 -1
  158. package/lib/dist/cjs/index-DvqmgCor.js +0 -5
  159. package/lib/dist/cjs/masters.js +0 -69
  160. package/lib/dist/es/gamification-feature.js +0 -4
  161. package/lib/dist/es/index-DvqmgCor.js +0 -3775
  162. package/lib/dist/es/masters.js +0 -22204
  163. package/lib/dist/index.d.ts +0 -1355
  164. package/lib/dist/source.css +0 -64
  165. package/lib/es/sl-types.js +0 -156
  166. package/lib/style.css +0 -1
@@ -1,3419 +0,0 @@
1
- import { jsx as P, jsxs as F } from "react/jsx-runtime";
2
- import { e as gt } from "./index4.js";
3
- import $, { forwardRef as Ae, useRef as D, useState as W, useEffect as Y, useLayoutEffect as vt, createContext as He, useMemo as Re, useCallback as qe, memo as wt } from "react";
4
- import { s as _, u as Se, c as Ee } from "./sl-types.js";
5
- import yt from "lodash.throttle";
6
- import { B as te } from "./index6.js";
7
- import { d as bt } from "./index7.js";
8
- import { Q as St } from "./index13.js";
9
- import { d as Et, e as Tt, S as We } from "./useStreamLayerApp2.js";
10
- import { c as xt } from "./feature.js";
11
- import { Y as Ct } from "./hooks-n9ax4LRT.js";
12
- function _e(t) {
13
- return t !== null && typeof t == "object" && "constructor" in t && t.constructor === Object;
14
- }
15
- function Oe(t, e) {
16
- t === void 0 && (t = {}), e === void 0 && (e = {});
17
- const s = ["__proto__", "constructor", "prototype"];
18
- Object.keys(e).filter((r) => s.indexOf(r) < 0).forEach((r) => {
19
- typeof t[r] > "u" ? t[r] = e[r] : _e(e[r]) && _e(t[r]) && Object.keys(e[r]).length > 0 && Oe(t[r], e[r]);
20
- });
21
- }
22
- const Ye = {
23
- body: {},
24
- addEventListener() {
25
- },
26
- removeEventListener() {
27
- },
28
- activeElement: {
29
- blur() {
30
- },
31
- nodeName: ""
32
- },
33
- querySelector() {
34
- return null;
35
- },
36
- querySelectorAll() {
37
- return [];
38
- },
39
- getElementById() {
40
- return null;
41
- },
42
- createEvent() {
43
- return {
44
- initEvent() {
45
- }
46
- };
47
- },
48
- createElement() {
49
- return {
50
- children: [],
51
- childNodes: [],
52
- style: {},
53
- setAttribute() {
54
- },
55
- getElementsByTagName() {
56
- return [];
57
- }
58
- };
59
- },
60
- createElementNS() {
61
- return {};
62
- },
63
- importNode() {
64
- return null;
65
- },
66
- location: {
67
- hash: "",
68
- host: "",
69
- hostname: "",
70
- href: "",
71
- origin: "",
72
- pathname: "",
73
- protocol: "",
74
- search: ""
75
- }
76
- };
77
- function K() {
78
- const t = typeof document < "u" ? document : {};
79
- return Oe(t, Ye), t;
80
- }
81
- const Pt = {
82
- document: Ye,
83
- navigator: {
84
- userAgent: ""
85
- },
86
- location: {
87
- hash: "",
88
- host: "",
89
- hostname: "",
90
- href: "",
91
- origin: "",
92
- pathname: "",
93
- protocol: "",
94
- search: ""
95
- },
96
- history: {
97
- replaceState() {
98
- },
99
- pushState() {
100
- },
101
- go() {
102
- },
103
- back() {
104
- }
105
- },
106
- CustomEvent: function() {
107
- return this;
108
- },
109
- addEventListener() {
110
- },
111
- removeEventListener() {
112
- },
113
- getComputedStyle() {
114
- return {
115
- getPropertyValue() {
116
- return "";
117
- }
118
- };
119
- },
120
- Image() {
121
- },
122
- Date() {
123
- },
124
- screen: {},
125
- setTimeout() {
126
- },
127
- clearTimeout() {
128
- },
129
- matchMedia() {
130
- return {};
131
- },
132
- requestAnimationFrame(t) {
133
- return typeof setTimeout > "u" ? (t(), null) : setTimeout(t, 0);
134
- },
135
- cancelAnimationFrame(t) {
136
- typeof setTimeout > "u" || clearTimeout(t);
137
- }
138
- };
139
- function B() {
140
- const t = typeof window < "u" ? window : {};
141
- return Oe(t, Pt), t;
142
- }
143
- function Mt(t) {
144
- return t === void 0 && (t = ""), t.trim().split(" ").filter((e) => !!e.trim());
145
- }
146
- function kt(t) {
147
- const e = t;
148
- Object.keys(e).forEach((s) => {
149
- try {
150
- e[s] = null;
151
- } catch {
152
- }
153
- try {
154
- delete e[s];
155
- } catch {
156
- }
157
- });
158
- }
159
- function Te(t, e) {
160
- return e === void 0 && (e = 0), setTimeout(t, e);
161
- }
162
- function le() {
163
- return Date.now();
164
- }
165
- function It(t) {
166
- const e = B();
167
- let s;
168
- return e.getComputedStyle && (s = e.getComputedStyle(t, null)), !s && t.currentStyle && (s = t.currentStyle), s || (s = t.style), s;
169
- }
170
- function Lt(t, e) {
171
- e === void 0 && (e = "x");
172
- const s = B();
173
- let r, n, i;
174
- const l = It(t);
175
- return s.WebKitCSSMatrix ? (n = l.transform || l.webkitTransform, n.split(",").length > 6 && (n = n.split(", ").map((a) => a.replace(",", ".")).join(", ")), i = new s.WebKitCSSMatrix(n === "none" ? "" : n)) : (i = l.MozTransform || l.OTransform || l.MsTransform || l.msTransform || l.transform || l.getPropertyValue("transform").replace("translate(", "matrix(1, 0, 0, 1,"), r = i.toString().split(",")), e === "x" && (s.WebKitCSSMatrix ? n = i.m41 : r.length === 16 ? n = parseFloat(r[12]) : n = parseFloat(r[4])), e === "y" && (s.WebKitCSSMatrix ? n = i.m42 : r.length === 16 ? n = parseFloat(r[13]) : n = parseFloat(r[5])), n || 0;
176
- }
177
- function se(t) {
178
- return typeof t == "object" && t !== null && t.constructor && Object.prototype.toString.call(t).slice(8, -1) === "Object";
179
- }
180
- function At(t) {
181
- return typeof window < "u" && typeof window.HTMLElement < "u" ? t instanceof HTMLElement : t && (t.nodeType === 1 || t.nodeType === 11);
182
- }
183
- function N() {
184
- const t = Object(arguments.length <= 0 ? void 0 : arguments[0]), e = ["__proto__", "constructor", "prototype"];
185
- for (let s = 1; s < arguments.length; s += 1) {
186
- const r = s < 0 || arguments.length <= s ? void 0 : arguments[s];
187
- if (r != null && !At(r)) {
188
- const n = Object.keys(Object(r)).filter((i) => e.indexOf(i) < 0);
189
- for (let i = 0, l = n.length; i < l; i += 1) {
190
- const a = n[i], o = Object.getOwnPropertyDescriptor(r, a);
191
- o !== void 0 && o.enumerable && (se(t[a]) && se(r[a]) ? r[a].__swiper__ ? t[a] = r[a] : N(t[a], r[a]) : !se(t[a]) && se(r[a]) ? (t[a] = {}, r[a].__swiper__ ? t[a] = r[a] : N(t[a], r[a])) : t[a] = r[a]);
192
- }
193
- }
194
- }
195
- return t;
196
- }
197
- function re(t, e, s) {
198
- t.style.setProperty(e, s);
199
- }
200
- function Xe(t) {
201
- let {
202
- swiper: e,
203
- targetPosition: s,
204
- side: r
205
- } = t;
206
- const n = B(), i = -e.translate;
207
- let l = null, a;
208
- const o = e.params.speed;
209
- e.wrapperEl.style.scrollSnapType = "none", n.cancelAnimationFrame(e.cssModeFrameID);
210
- const c = s > i ? "next" : "prev", d = (h, g) => c === "next" && h >= g || c === "prev" && h <= g, p = () => {
211
- a = (/* @__PURE__ */ new Date()).getTime(), l === null && (l = a);
212
- const h = Math.max(Math.min((a - l) / o, 1), 0), g = 0.5 - Math.cos(h * Math.PI) / 2;
213
- let m = i + g * (s - i);
214
- if (d(m, s) && (m = s), e.wrapperEl.scrollTo({
215
- [r]: m
216
- }), d(m, s)) {
217
- e.wrapperEl.style.overflow = "hidden", e.wrapperEl.style.scrollSnapType = "", setTimeout(() => {
218
- e.wrapperEl.style.overflow = "", e.wrapperEl.scrollTo({
219
- [r]: m
220
- });
221
- }), n.cancelAnimationFrame(e.cssModeFrameID);
222
- return;
223
- }
224
- e.cssModeFrameID = n.requestAnimationFrame(p);
225
- };
226
- p();
227
- }
228
- function H(t, e) {
229
- e === void 0 && (e = "");
230
- const s = B(), r = [...t.children];
231
- return s.HTMLSlotElement && t instanceof HTMLSlotElement && r.push(...t.assignedElements()), e ? r.filter((n) => n.matches(e)) : r;
232
- }
233
- function Ot(t, e) {
234
- const s = [e];
235
- for (; s.length > 0; ) {
236
- const r = s.shift();
237
- if (t === r)
238
- return !0;
239
- s.push(...r.children, ...r.shadowRoot ? r.shadowRoot.children : [], ...r.assignedElements ? r.assignedElements() : []);
240
- }
241
- }
242
- function zt(t, e) {
243
- const s = B();
244
- let r = e.contains(t);
245
- return !r && s.HTMLSlotElement && e instanceof HTMLSlotElement && (r = [...e.assignedElements()].includes(t), r || (r = Ot(t, e))), r;
246
- }
247
- function oe(t) {
248
- try {
249
- console.warn(t);
250
- return;
251
- } catch {
252
- }
253
- }
254
- function de(t, e) {
255
- e === void 0 && (e = []);
256
- const s = document.createElement(t);
257
- return s.classList.add(...Array.isArray(e) ? e : Mt(e)), s;
258
- }
259
- function _t(t, e) {
260
- const s = [];
261
- for (; t.previousElementSibling; ) {
262
- const r = t.previousElementSibling;
263
- e ? r.matches(e) && s.push(r) : s.push(r), t = r;
264
- }
265
- return s;
266
- }
267
- function $t(t, e) {
268
- const s = [];
269
- for (; t.nextElementSibling; ) {
270
- const r = t.nextElementSibling;
271
- e ? r.matches(e) && s.push(r) : s.push(r), t = r;
272
- }
273
- return s;
274
- }
275
- function X(t, e) {
276
- return B().getComputedStyle(t, null).getPropertyValue(e);
277
- }
278
- function ce(t) {
279
- let e = t, s;
280
- if (e) {
281
- for (s = 0; (e = e.previousSibling) !== null; )
282
- e.nodeType === 1 && (s += 1);
283
- return s;
284
- }
285
- }
286
- function Ue(t, e) {
287
- const s = [];
288
- let r = t.parentElement;
289
- for (; r; )
290
- e ? r.matches(e) && s.push(r) : s.push(r), r = r.parentElement;
291
- return s;
292
- }
293
- function xe(t, e, s) {
294
- const r = B();
295
- return t[e === "width" ? "offsetWidth" : "offsetHeight"] + parseFloat(r.getComputedStyle(t, null).getPropertyValue(e === "width" ? "margin-right" : "margin-top")) + parseFloat(r.getComputedStyle(t, null).getPropertyValue(e === "width" ? "margin-left" : "margin-bottom"));
296
- }
297
- function R(t) {
298
- return (Array.isArray(t) ? t : [t]).filter((e) => !!e);
299
- }
300
- let me;
301
- function Gt() {
302
- const t = B(), e = K();
303
- return {
304
- smoothScroll: e.documentElement && e.documentElement.style && "scrollBehavior" in e.documentElement.style,
305
- touch: !!("ontouchstart" in t || t.DocumentTouch && e instanceof t.DocumentTouch)
306
- };
307
- }
308
- function Qe() {
309
- return me || (me = Gt()), me;
310
- }
311
- let he;
312
- function Bt(t) {
313
- let {
314
- userAgent: e
315
- } = t === void 0 ? {} : t;
316
- const s = Qe(), r = B(), n = r.navigator.platform, i = e || r.navigator.userAgent, l = {
317
- ios: !1,
318
- android: !1
319
- }, a = r.screen.width, o = r.screen.height, c = i.match(/(Android);?[\s\/]+([\d.]+)?/);
320
- let d = i.match(/(iPad).*OS\s([\d_]+)/);
321
- const p = i.match(/(iPod)(.*OS\s([\d_]+))?/), h = !d && i.match(/(iPhone\sOS|iOS)\s([\d_]+)/), g = n === "Win32";
322
- let m = n === "MacIntel";
323
- const T = ["1024x1366", "1366x1024", "834x1194", "1194x834", "834x1112", "1112x834", "768x1024", "1024x768", "820x1180", "1180x820", "810x1080", "1080x810"];
324
- return !d && m && s.touch && T.indexOf(`${a}x${o}`) >= 0 && (d = i.match(/(Version)\/([\d.]+)/), d || (d = [0, 1, "13_0_0"]), m = !1), c && !g && (l.os = "android", l.android = !0), (d || h || p) && (l.os = "ios", l.ios = !0), l;
325
- }
326
- function Ke(t) {
327
- return t === void 0 && (t = {}), he || (he = Bt(t)), he;
328
- }
329
- let ge;
330
- function Nt() {
331
- const t = B(), e = Ke();
332
- let s = !1;
333
- function r() {
334
- const a = t.navigator.userAgent.toLowerCase();
335
- return a.indexOf("safari") >= 0 && a.indexOf("chrome") < 0 && a.indexOf("android") < 0;
336
- }
337
- if (r()) {
338
- const a = String(t.navigator.userAgent);
339
- if (a.includes("Version/")) {
340
- const [o, c] = a.split("Version/")[1].split(" ")[0].split(".").map((d) => Number(d));
341
- s = o < 16 || o === 16 && c < 2;
342
- }
343
- }
344
- const n = /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(t.navigator.userAgent), i = r(), l = i || n && e.ios;
345
- return {
346
- isSafari: s || i,
347
- needPerspectiveFix: s,
348
- need3dFix: l,
349
- isWebView: n
350
- };
351
- }
352
- function Je() {
353
- return ge || (ge = Nt()), ge;
354
- }
355
- function Dt(t) {
356
- let {
357
- swiper: e,
358
- on: s,
359
- emit: r
360
- } = t;
361
- const n = B();
362
- let i = null, l = null;
363
- const a = () => {
364
- !e || e.destroyed || !e.initialized || (r("beforeResize"), r("resize"));
365
- }, o = () => {
366
- !e || e.destroyed || !e.initialized || (i = new ResizeObserver((p) => {
367
- l = n.requestAnimationFrame(() => {
368
- const {
369
- width: h,
370
- height: g
371
- } = e;
372
- let m = h, T = g;
373
- p.forEach((M) => {
374
- let {
375
- contentBoxSize: w,
376
- contentRect: u,
377
- target: f
378
- } = M;
379
- f && f !== e.el || (m = u ? u.width : (w[0] || w).inlineSize, T = u ? u.height : (w[0] || w).blockSize);
380
- }), (m !== h || T !== g) && a();
381
- });
382
- }), i.observe(e.el));
383
- }, c = () => {
384
- l && n.cancelAnimationFrame(l), i && i.unobserve && e.el && (i.unobserve(e.el), i = null);
385
- }, d = () => {
386
- !e || e.destroyed || !e.initialized || r("orientationchange");
387
- };
388
- s("init", () => {
389
- if (e.params.resizeObserver && typeof n.ResizeObserver < "u") {
390
- o();
391
- return;
392
- }
393
- n.addEventListener("resize", a), n.addEventListener("orientationchange", d);
394
- }), s("destroy", () => {
395
- c(), n.removeEventListener("resize", a), n.removeEventListener("orientationchange", d);
396
- });
397
- }
398
- function Ft(t) {
399
- let {
400
- swiper: e,
401
- extendParams: s,
402
- on: r,
403
- emit: n
404
- } = t;
405
- const i = [], l = B(), a = function(d, p) {
406
- p === void 0 && (p = {});
407
- const h = l.MutationObserver || l.WebkitMutationObserver, g = new h((m) => {
408
- if (e.__preventObserver__) return;
409
- if (m.length === 1) {
410
- n("observerUpdate", m[0]);
411
- return;
412
- }
413
- const T = function() {
414
- n("observerUpdate", m[0]);
415
- };
416
- l.requestAnimationFrame ? l.requestAnimationFrame(T) : l.setTimeout(T, 0);
417
- });
418
- g.observe(d, {
419
- attributes: typeof p.attributes > "u" ? !0 : p.attributes,
420
- childList: e.isElement || (typeof p.childList > "u" ? !0 : p).childList,
421
- characterData: typeof p.characterData > "u" ? !0 : p.characterData
422
- }), i.push(g);
423
- }, o = () => {
424
- if (e.params.observer) {
425
- if (e.params.observeParents) {
426
- const d = Ue(e.hostEl);
427
- for (let p = 0; p < d.length; p += 1)
428
- a(d[p]);
429
- }
430
- a(e.hostEl, {
431
- childList: e.params.observeSlideChildren
432
- }), a(e.wrapperEl, {
433
- attributes: !1
434
- });
435
- }
436
- }, c = () => {
437
- i.forEach((d) => {
438
- d.disconnect();
439
- }), i.splice(0, i.length);
440
- };
441
- s({
442
- observer: !1,
443
- observeParents: !1,
444
- observeSlideChildren: !1
445
- }), r("init", o), r("destroy", c);
446
- }
447
- var Vt = {
448
- on(t, e, s) {
449
- const r = this;
450
- if (!r.eventsListeners || r.destroyed || typeof e != "function") return r;
451
- const n = s ? "unshift" : "push";
452
- return t.split(" ").forEach((i) => {
453
- r.eventsListeners[i] || (r.eventsListeners[i] = []), r.eventsListeners[i][n](e);
454
- }), r;
455
- },
456
- once(t, e, s) {
457
- const r = this;
458
- if (!r.eventsListeners || r.destroyed || typeof e != "function") return r;
459
- function n() {
460
- r.off(t, n), n.__emitterProxy && delete n.__emitterProxy;
461
- for (var i = arguments.length, l = new Array(i), a = 0; a < i; a++)
462
- l[a] = arguments[a];
463
- e.apply(r, l);
464
- }
465
- return n.__emitterProxy = e, r.on(t, n, s);
466
- },
467
- onAny(t, e) {
468
- const s = this;
469
- if (!s.eventsListeners || s.destroyed || typeof t != "function") return s;
470
- const r = e ? "unshift" : "push";
471
- return s.eventsAnyListeners.indexOf(t) < 0 && s.eventsAnyListeners[r](t), s;
472
- },
473
- offAny(t) {
474
- const e = this;
475
- if (!e.eventsListeners || e.destroyed || !e.eventsAnyListeners) return e;
476
- const s = e.eventsAnyListeners.indexOf(t);
477
- return s >= 0 && e.eventsAnyListeners.splice(s, 1), e;
478
- },
479
- off(t, e) {
480
- const s = this;
481
- return !s.eventsListeners || s.destroyed || !s.eventsListeners || t.split(" ").forEach((r) => {
482
- typeof e > "u" ? s.eventsListeners[r] = [] : s.eventsListeners[r] && s.eventsListeners[r].forEach((n, i) => {
483
- (n === e || n.__emitterProxy && n.__emitterProxy === e) && s.eventsListeners[r].splice(i, 1);
484
- });
485
- }), s;
486
- },
487
- emit() {
488
- const t = this;
489
- if (!t.eventsListeners || t.destroyed || !t.eventsListeners) return t;
490
- let e, s, r;
491
- for (var n = arguments.length, i = new Array(n), l = 0; l < n; l++)
492
- i[l] = arguments[l];
493
- return typeof i[0] == "string" || Array.isArray(i[0]) ? (e = i[0], s = i.slice(1, i.length), r = t) : (e = i[0].events, s = i[0].data, r = i[0].context || t), s.unshift(r), (Array.isArray(e) ? e : e.split(" ")).forEach((a) => {
494
- t.eventsAnyListeners && t.eventsAnyListeners.length && t.eventsAnyListeners.forEach((o) => {
495
- o.apply(r, [a, ...s]);
496
- }), t.eventsListeners && t.eventsListeners[a] && t.eventsListeners[a].forEach((o) => {
497
- o.apply(r, s);
498
- });
499
- }), t;
500
- }
501
- };
502
- function jt() {
503
- const t = this;
504
- let e, s;
505
- const r = t.el;
506
- typeof t.params.width < "u" && t.params.width !== null ? e = t.params.width : e = r.clientWidth, typeof t.params.height < "u" && t.params.height !== null ? s = t.params.height : s = r.clientHeight, !(e === 0 && t.isHorizontal() || s === 0 && t.isVertical()) && (e = e - parseInt(X(r, "padding-left") || 0, 10) - parseInt(X(r, "padding-right") || 0, 10), s = s - parseInt(X(r, "padding-top") || 0, 10) - parseInt(X(r, "padding-bottom") || 0, 10), Number.isNaN(e) && (e = 0), Number.isNaN(s) && (s = 0), Object.assign(t, {
507
- width: e,
508
- height: s,
509
- size: t.isHorizontal() ? e : s
510
- }));
511
- }
512
- function Ht() {
513
- const t = this;
514
- function e(S, E) {
515
- return parseFloat(S.getPropertyValue(t.getDirectionLabel(E)) || 0);
516
- }
517
- const s = t.params, {
518
- wrapperEl: r,
519
- slidesEl: n,
520
- size: i,
521
- rtlTranslate: l,
522
- wrongRTL: a
523
- } = t, o = t.virtual && s.virtual.enabled, c = o ? t.virtual.slides.length : t.slides.length, d = H(n, `.${t.params.slideClass}, swiper-slide`), p = o ? t.virtual.slides.length : d.length;
524
- let h = [];
525
- const g = [], m = [];
526
- let T = s.slidesOffsetBefore;
527
- typeof T == "function" && (T = s.slidesOffsetBefore.call(t));
528
- let M = s.slidesOffsetAfter;
529
- typeof M == "function" && (M = s.slidesOffsetAfter.call(t));
530
- const w = t.snapGrid.length, u = t.slidesGrid.length;
531
- let f = s.spaceBetween, v = -T, y = 0, C = 0;
532
- if (typeof i > "u")
533
- return;
534
- typeof f == "string" && f.indexOf("%") >= 0 ? f = parseFloat(f.replace("%", "")) / 100 * i : typeof f == "string" && (f = parseFloat(f)), t.virtualSize = -f, d.forEach((S) => {
535
- l ? S.style.marginLeft = "" : S.style.marginRight = "", S.style.marginBottom = "", S.style.marginTop = "";
536
- }), s.centeredSlides && s.cssMode && (re(r, "--swiper-centered-offset-before", ""), re(r, "--swiper-centered-offset-after", ""));
537
- const A = s.grid && s.grid.rows > 1 && t.grid;
538
- A ? t.grid.initSlides(d) : t.grid && t.grid.unsetSlides();
539
- let I;
540
- const b = s.slidesPerView === "auto" && s.breakpoints && Object.keys(s.breakpoints).filter((S) => typeof s.breakpoints[S].slidesPerView < "u").length > 0;
541
- for (let S = 0; S < p; S += 1) {
542
- I = 0;
543
- let E;
544
- if (d[S] && (E = d[S]), A && t.grid.updateSlide(S, E, d), !(d[S] && X(E, "display") === "none")) {
545
- if (s.slidesPerView === "auto") {
546
- b && (d[S].style[t.getDirectionLabel("width")] = "");
547
- const k = getComputedStyle(E), L = E.style.transform, O = E.style.webkitTransform;
548
- if (L && (E.style.transform = "none"), O && (E.style.webkitTransform = "none"), s.roundLengths)
549
- I = t.isHorizontal() ? xe(E, "width") : xe(E, "height");
550
- else {
551
- const x = e(k, "width"), z = e(k, "padding-left"), U = e(k, "padding-right"), V = e(k, "margin-left"), G = e(k, "margin-right"), j = k.getPropertyValue("box-sizing");
552
- if (j && j === "border-box")
553
- I = x + V + G;
554
- else {
555
- const {
556
- clientWidth: mt,
557
- offsetWidth: ht
558
- } = E;
559
- I = x + z + U + V + G + (ht - mt);
560
- }
561
- }
562
- L && (E.style.transform = L), O && (E.style.webkitTransform = O), s.roundLengths && (I = Math.floor(I));
563
- } else
564
- I = (i - (s.slidesPerView - 1) * f) / s.slidesPerView, s.roundLengths && (I = Math.floor(I)), d[S] && (d[S].style[t.getDirectionLabel("width")] = `${I}px`);
565
- d[S] && (d[S].swiperSlideSize = I), m.push(I), s.centeredSlides ? (v = v + I / 2 + y / 2 + f, y === 0 && S !== 0 && (v = v - i / 2 - f), S === 0 && (v = v - i / 2 - f), Math.abs(v) < 1 / 1e3 && (v = 0), s.roundLengths && (v = Math.floor(v)), C % s.slidesPerGroup === 0 && h.push(v), g.push(v)) : (s.roundLengths && (v = Math.floor(v)), (C - Math.min(t.params.slidesPerGroupSkip, C)) % t.params.slidesPerGroup === 0 && h.push(v), g.push(v), v = v + I + f), t.virtualSize += I + f, y = I, C += 1;
566
- }
567
- }
568
- if (t.virtualSize = Math.max(t.virtualSize, i) + M, l && a && (s.effect === "slide" || s.effect === "coverflow") && (r.style.width = `${t.virtualSize + f}px`), s.setWrapperSize && (r.style[t.getDirectionLabel("width")] = `${t.virtualSize + f}px`), A && t.grid.updateWrapperSize(I, h), !s.centeredSlides) {
569
- const S = [];
570
- for (let E = 0; E < h.length; E += 1) {
571
- let k = h[E];
572
- s.roundLengths && (k = Math.floor(k)), h[E] <= t.virtualSize - i && S.push(k);
573
- }
574
- h = S, Math.floor(t.virtualSize - i) - Math.floor(h[h.length - 1]) > 1 && h.push(t.virtualSize - i);
575
- }
576
- if (o && s.loop) {
577
- const S = m[0] + f;
578
- if (s.slidesPerGroup > 1) {
579
- const E = Math.ceil((t.virtual.slidesBefore + t.virtual.slidesAfter) / s.slidesPerGroup), k = S * s.slidesPerGroup;
580
- for (let L = 0; L < E; L += 1)
581
- h.push(h[h.length - 1] + k);
582
- }
583
- for (let E = 0; E < t.virtual.slidesBefore + t.virtual.slidesAfter; E += 1)
584
- s.slidesPerGroup === 1 && h.push(h[h.length - 1] + S), g.push(g[g.length - 1] + S), t.virtualSize += S;
585
- }
586
- if (h.length === 0 && (h = [0]), f !== 0) {
587
- const S = t.isHorizontal() && l ? "marginLeft" : t.getDirectionLabel("marginRight");
588
- d.filter((E, k) => !s.cssMode || s.loop ? !0 : k !== d.length - 1).forEach((E) => {
589
- E.style[S] = `${f}px`;
590
- });
591
- }
592
- if (s.centeredSlides && s.centeredSlidesBounds) {
593
- let S = 0;
594
- m.forEach((k) => {
595
- S += k + (f || 0);
596
- }), S -= f;
597
- const E = S > i ? S - i : 0;
598
- h = h.map((k) => k <= 0 ? -T : k > E ? E + M : k);
599
- }
600
- if (s.centerInsufficientSlides) {
601
- let S = 0;
602
- m.forEach((k) => {
603
- S += k + (f || 0);
604
- }), S -= f;
605
- const E = (s.slidesOffsetBefore || 0) + (s.slidesOffsetAfter || 0);
606
- if (S + E < i) {
607
- const k = (i - S - E) / 2;
608
- h.forEach((L, O) => {
609
- h[O] = L - k;
610
- }), g.forEach((L, O) => {
611
- g[O] = L + k;
612
- });
613
- }
614
- }
615
- if (Object.assign(t, {
616
- slides: d,
617
- snapGrid: h,
618
- slidesGrid: g,
619
- slidesSizesGrid: m
620
- }), s.centeredSlides && s.cssMode && !s.centeredSlidesBounds) {
621
- re(r, "--swiper-centered-offset-before", `${-h[0]}px`), re(r, "--swiper-centered-offset-after", `${t.size / 2 - m[m.length - 1] / 2}px`);
622
- const S = -t.snapGrid[0], E = -t.slidesGrid[0];
623
- t.snapGrid = t.snapGrid.map((k) => k + S), t.slidesGrid = t.slidesGrid.map((k) => k + E);
624
- }
625
- if (p !== c && t.emit("slidesLengthChange"), h.length !== w && (t.params.watchOverflow && t.checkOverflow(), t.emit("snapGridLengthChange")), g.length !== u && t.emit("slidesGridLengthChange"), s.watchSlidesProgress && t.updateSlidesOffset(), t.emit("slidesUpdated"), !o && !s.cssMode && (s.effect === "slide" || s.effect === "fade")) {
626
- const S = `${s.containerModifierClass}backface-hidden`, E = t.el.classList.contains(S);
627
- p <= s.maxBackfaceHiddenSlides ? E || t.el.classList.add(S) : E && t.el.classList.remove(S);
628
- }
629
- }
630
- function Rt(t) {
631
- const e = this, s = [], r = e.virtual && e.params.virtual.enabled;
632
- let n = 0, i;
633
- typeof t == "number" ? e.setTransition(t) : t === !0 && e.setTransition(e.params.speed);
634
- const l = (a) => r ? e.slides[e.getSlideIndexByData(a)] : e.slides[a];
635
- if (e.params.slidesPerView !== "auto" && e.params.slidesPerView > 1)
636
- if (e.params.centeredSlides)
637
- (e.visibleSlides || []).forEach((a) => {
638
- s.push(a);
639
- });
640
- else
641
- for (i = 0; i < Math.ceil(e.params.slidesPerView); i += 1) {
642
- const a = e.activeIndex + i;
643
- if (a > e.slides.length && !r) break;
644
- s.push(l(a));
645
- }
646
- else
647
- s.push(l(e.activeIndex));
648
- for (i = 0; i < s.length; i += 1)
649
- if (typeof s[i] < "u") {
650
- const a = s[i].offsetHeight;
651
- n = a > n ? a : n;
652
- }
653
- (n || n === 0) && (e.wrapperEl.style.height = `${n}px`);
654
- }
655
- function qt() {
656
- const t = this, e = t.slides, s = t.isElement ? t.isHorizontal() ? t.wrapperEl.offsetLeft : t.wrapperEl.offsetTop : 0;
657
- for (let r = 0; r < e.length; r += 1)
658
- e[r].swiperSlideOffset = (t.isHorizontal() ? e[r].offsetLeft : e[r].offsetTop) - s - t.cssOverflowAdjustment();
659
- }
660
- const $e = (t, e, s) => {
661
- e && !t.classList.contains(s) ? t.classList.add(s) : !e && t.classList.contains(s) && t.classList.remove(s);
662
- };
663
- function Wt(t) {
664
- t === void 0 && (t = this && this.translate || 0);
665
- const e = this, s = e.params, {
666
- slides: r,
667
- rtlTranslate: n,
668
- snapGrid: i
669
- } = e;
670
- if (r.length === 0) return;
671
- typeof r[0].swiperSlideOffset > "u" && e.updateSlidesOffset();
672
- let l = -t;
673
- n && (l = t), e.visibleSlidesIndexes = [], e.visibleSlides = [];
674
- let a = s.spaceBetween;
675
- typeof a == "string" && a.indexOf("%") >= 0 ? a = parseFloat(a.replace("%", "")) / 100 * e.size : typeof a == "string" && (a = parseFloat(a));
676
- for (let o = 0; o < r.length; o += 1) {
677
- const c = r[o];
678
- let d = c.swiperSlideOffset;
679
- s.cssMode && s.centeredSlides && (d -= r[0].swiperSlideOffset);
680
- const p = (l + (s.centeredSlides ? e.minTranslate() : 0) - d) / (c.swiperSlideSize + a), h = (l - i[0] + (s.centeredSlides ? e.minTranslate() : 0) - d) / (c.swiperSlideSize + a), g = -(l - d), m = g + e.slidesSizesGrid[o], T = g >= 0 && g <= e.size - e.slidesSizesGrid[o], M = g >= 0 && g < e.size - 1 || m > 1 && m <= e.size || g <= 0 && m >= e.size;
681
- M && (e.visibleSlides.push(c), e.visibleSlidesIndexes.push(o)), $e(c, M, s.slideVisibleClass), $e(c, T, s.slideFullyVisibleClass), c.progress = n ? -p : p, c.originalProgress = n ? -h : h;
682
- }
683
- }
684
- function Yt(t) {
685
- const e = this;
686
- if (typeof t > "u") {
687
- const d = e.rtlTranslate ? -1 : 1;
688
- t = e && e.translate && e.translate * d || 0;
689
- }
690
- const s = e.params, r = e.maxTranslate() - e.minTranslate();
691
- let {
692
- progress: n,
693
- isBeginning: i,
694
- isEnd: l,
695
- progressLoop: a
696
- } = e;
697
- const o = i, c = l;
698
- if (r === 0)
699
- n = 0, i = !0, l = !0;
700
- else {
701
- n = (t - e.minTranslate()) / r;
702
- const d = Math.abs(t - e.minTranslate()) < 1, p = Math.abs(t - e.maxTranslate()) < 1;
703
- i = d || n <= 0, l = p || n >= 1, d && (n = 0), p && (n = 1);
704
- }
705
- if (s.loop) {
706
- const d = e.getSlideIndexByData(0), p = e.getSlideIndexByData(e.slides.length - 1), h = e.slidesGrid[d], g = e.slidesGrid[p], m = e.slidesGrid[e.slidesGrid.length - 1], T = Math.abs(t);
707
- T >= h ? a = (T - h) / m : a = (T + m - g) / m, a > 1 && (a -= 1);
708
- }
709
- Object.assign(e, {
710
- progress: n,
711
- progressLoop: a,
712
- isBeginning: i,
713
- isEnd: l
714
- }), (s.watchSlidesProgress || s.centeredSlides && s.autoHeight) && e.updateSlidesProgress(t), i && !o && e.emit("reachBeginning toEdge"), l && !c && e.emit("reachEnd toEdge"), (o && !i || c && !l) && e.emit("fromEdge"), e.emit("progress", n);
715
- }
716
- const ve = (t, e, s) => {
717
- e && !t.classList.contains(s) ? t.classList.add(s) : !e && t.classList.contains(s) && t.classList.remove(s);
718
- };
719
- function Xt() {
720
- const t = this, {
721
- slides: e,
722
- params: s,
723
- slidesEl: r,
724
- activeIndex: n
725
- } = t, i = t.virtual && s.virtual.enabled, l = t.grid && s.grid && s.grid.rows > 1, a = (p) => H(r, `.${s.slideClass}${p}, swiper-slide${p}`)[0];
726
- let o, c, d;
727
- if (i)
728
- if (s.loop) {
729
- let p = n - t.virtual.slidesBefore;
730
- p < 0 && (p = t.virtual.slides.length + p), p >= t.virtual.slides.length && (p -= t.virtual.slides.length), o = a(`[data-swiper-slide-index="${p}"]`);
731
- } else
732
- o = a(`[data-swiper-slide-index="${n}"]`);
733
- else
734
- l ? (o = e.find((p) => p.column === n), d = e.find((p) => p.column === n + 1), c = e.find((p) => p.column === n - 1)) : o = e[n];
735
- o && (l || (d = $t(o, `.${s.slideClass}, swiper-slide`)[0], s.loop && !d && (d = e[0]), c = _t(o, `.${s.slideClass}, swiper-slide`)[0], s.loop && !c === 0 && (c = e[e.length - 1]))), e.forEach((p) => {
736
- ve(p, p === o, s.slideActiveClass), ve(p, p === d, s.slideNextClass), ve(p, p === c, s.slidePrevClass);
737
- }), t.emitSlidesClasses();
738
- }
739
- const ne = (t, e) => {
740
- if (!t || t.destroyed || !t.params) return;
741
- const s = () => t.isElement ? "swiper-slide" : `.${t.params.slideClass}`, r = e.closest(s());
742
- if (r) {
743
- let n = r.querySelector(`.${t.params.lazyPreloaderClass}`);
744
- !n && t.isElement && (r.shadowRoot ? n = r.shadowRoot.querySelector(`.${t.params.lazyPreloaderClass}`) : requestAnimationFrame(() => {
745
- r.shadowRoot && (n = r.shadowRoot.querySelector(`.${t.params.lazyPreloaderClass}`), n && n.remove());
746
- })), n && n.remove();
747
- }
748
- }, we = (t, e) => {
749
- if (!t.slides[e]) return;
750
- const s = t.slides[e].querySelector('[loading="lazy"]');
751
- s && s.removeAttribute("loading");
752
- }, Ce = (t) => {
753
- if (!t || t.destroyed || !t.params) return;
754
- let e = t.params.lazyPreloadPrevNext;
755
- const s = t.slides.length;
756
- if (!s || !e || e < 0) return;
757
- e = Math.min(e, s);
758
- const r = t.params.slidesPerView === "auto" ? t.slidesPerViewDynamic() : Math.ceil(t.params.slidesPerView), n = t.activeIndex;
759
- if (t.params.grid && t.params.grid.rows > 1) {
760
- const l = n, a = [l - e];
761
- a.push(...Array.from({
762
- length: e
763
- }).map((o, c) => l + r + c)), t.slides.forEach((o, c) => {
764
- a.includes(o.column) && we(t, c);
765
- });
766
- return;
767
- }
768
- const i = n + r - 1;
769
- if (t.params.rewind || t.params.loop)
770
- for (let l = n - e; l <= i + e; l += 1) {
771
- const a = (l % s + s) % s;
772
- (a < n || a > i) && we(t, a);
773
- }
774
- else
775
- for (let l = Math.max(n - e, 0); l <= Math.min(i + e, s - 1); l += 1)
776
- l !== n && (l > i || l < n) && we(t, l);
777
- };
778
- function Ut(t) {
779
- const {
780
- slidesGrid: e,
781
- params: s
782
- } = t, r = t.rtlTranslate ? t.translate : -t.translate;
783
- let n;
784
- for (let i = 0; i < e.length; i += 1)
785
- typeof e[i + 1] < "u" ? r >= e[i] && r < e[i + 1] - (e[i + 1] - e[i]) / 2 ? n = i : r >= e[i] && r < e[i + 1] && (n = i + 1) : r >= e[i] && (n = i);
786
- return s.normalizeSlideIndex && (n < 0 || typeof n > "u") && (n = 0), n;
787
- }
788
- function Qt(t) {
789
- const e = this, s = e.rtlTranslate ? e.translate : -e.translate, {
790
- snapGrid: r,
791
- params: n,
792
- activeIndex: i,
793
- realIndex: l,
794
- snapIndex: a
795
- } = e;
796
- let o = t, c;
797
- const d = (g) => {
798
- let m = g - e.virtual.slidesBefore;
799
- return m < 0 && (m = e.virtual.slides.length + m), m >= e.virtual.slides.length && (m -= e.virtual.slides.length), m;
800
- };
801
- if (typeof o > "u" && (o = Ut(e)), r.indexOf(s) >= 0)
802
- c = r.indexOf(s);
803
- else {
804
- const g = Math.min(n.slidesPerGroupSkip, o);
805
- c = g + Math.floor((o - g) / n.slidesPerGroup);
806
- }
807
- if (c >= r.length && (c = r.length - 1), o === i && !e.params.loop) {
808
- c !== a && (e.snapIndex = c, e.emit("snapIndexChange"));
809
- return;
810
- }
811
- if (o === i && e.params.loop && e.virtual && e.params.virtual.enabled) {
812
- e.realIndex = d(o);
813
- return;
814
- }
815
- const p = e.grid && n.grid && n.grid.rows > 1;
816
- let h;
817
- if (e.virtual && n.virtual.enabled && n.loop)
818
- h = d(o);
819
- else if (p) {
820
- const g = e.slides.find((T) => T.column === o);
821
- let m = parseInt(g.getAttribute("data-swiper-slide-index"), 10);
822
- Number.isNaN(m) && (m = Math.max(e.slides.indexOf(g), 0)), h = Math.floor(m / n.grid.rows);
823
- } else if (e.slides[o]) {
824
- const g = e.slides[o].getAttribute("data-swiper-slide-index");
825
- g ? h = parseInt(g, 10) : h = o;
826
- } else
827
- h = o;
828
- Object.assign(e, {
829
- previousSnapIndex: a,
830
- snapIndex: c,
831
- previousRealIndex: l,
832
- realIndex: h,
833
- previousIndex: i,
834
- activeIndex: o
835
- }), e.initialized && Ce(e), e.emit("activeIndexChange"), e.emit("snapIndexChange"), (e.initialized || e.params.runCallbacksOnInit) && (l !== h && e.emit("realIndexChange"), e.emit("slideChange"));
836
- }
837
- function Kt(t, e) {
838
- const s = this, r = s.params;
839
- let n = t.closest(`.${r.slideClass}, swiper-slide`);
840
- !n && s.isElement && e && e.length > 1 && e.includes(t) && [...e.slice(e.indexOf(t) + 1, e.length)].forEach((a) => {
841
- !n && a.matches && a.matches(`.${r.slideClass}, swiper-slide`) && (n = a);
842
- });
843
- let i = !1, l;
844
- if (n) {
845
- for (let a = 0; a < s.slides.length; a += 1)
846
- if (s.slides[a] === n) {
847
- i = !0, l = a;
848
- break;
849
- }
850
- }
851
- if (n && i)
852
- s.clickedSlide = n, s.virtual && s.params.virtual.enabled ? s.clickedIndex = parseInt(n.getAttribute("data-swiper-slide-index"), 10) : s.clickedIndex = l;
853
- else {
854
- s.clickedSlide = void 0, s.clickedIndex = void 0;
855
- return;
856
- }
857
- r.slideToClickedSlide && s.clickedIndex !== void 0 && s.clickedIndex !== s.activeIndex && s.slideToClickedSlide();
858
- }
859
- var Jt = {
860
- updateSize: jt,
861
- updateSlides: Ht,
862
- updateAutoHeight: Rt,
863
- updateSlidesOffset: qt,
864
- updateSlidesProgress: Wt,
865
- updateProgress: Yt,
866
- updateSlidesClasses: Xt,
867
- updateActiveIndex: Qt,
868
- updateClickedSlide: Kt
869
- };
870
- function Zt(t) {
871
- t === void 0 && (t = this.isHorizontal() ? "x" : "y");
872
- const e = this, {
873
- params: s,
874
- rtlTranslate: r,
875
- translate: n,
876
- wrapperEl: i
877
- } = e;
878
- if (s.virtualTranslate)
879
- return r ? -n : n;
880
- if (s.cssMode)
881
- return n;
882
- let l = Lt(i, t);
883
- return l += e.cssOverflowAdjustment(), r && (l = -l), l || 0;
884
- }
885
- function es(t, e) {
886
- const s = this, {
887
- rtlTranslate: r,
888
- params: n,
889
- wrapperEl: i,
890
- progress: l
891
- } = s;
892
- let a = 0, o = 0;
893
- const c = 0;
894
- s.isHorizontal() ? a = r ? -t : t : o = t, n.roundLengths && (a = Math.floor(a), o = Math.floor(o)), s.previousTranslate = s.translate, s.translate = s.isHorizontal() ? a : o, n.cssMode ? i[s.isHorizontal() ? "scrollLeft" : "scrollTop"] = s.isHorizontal() ? -a : -o : n.virtualTranslate || (s.isHorizontal() ? a -= s.cssOverflowAdjustment() : o -= s.cssOverflowAdjustment(), i.style.transform = `translate3d(${a}px, ${o}px, ${c}px)`);
895
- let d;
896
- const p = s.maxTranslate() - s.minTranslate();
897
- p === 0 ? d = 0 : d = (t - s.minTranslate()) / p, d !== l && s.updateProgress(t), s.emit("setTranslate", s.translate, e);
898
- }
899
- function ts() {
900
- return -this.snapGrid[0];
901
- }
902
- function ss() {
903
- return -this.snapGrid[this.snapGrid.length - 1];
904
- }
905
- function rs(t, e, s, r, n) {
906
- t === void 0 && (t = 0), e === void 0 && (e = this.params.speed), s === void 0 && (s = !0), r === void 0 && (r = !0);
907
- const i = this, {
908
- params: l,
909
- wrapperEl: a
910
- } = i;
911
- if (i.animating && l.preventInteractionOnTransition)
912
- return !1;
913
- const o = i.minTranslate(), c = i.maxTranslate();
914
- let d;
915
- if (r && t > o ? d = o : r && t < c ? d = c : d = t, i.updateProgress(d), l.cssMode) {
916
- const p = i.isHorizontal();
917
- if (e === 0)
918
- a[p ? "scrollLeft" : "scrollTop"] = -d;
919
- else {
920
- if (!i.support.smoothScroll)
921
- return Xe({
922
- swiper: i,
923
- targetPosition: -d,
924
- side: p ? "left" : "top"
925
- }), !0;
926
- a.scrollTo({
927
- [p ? "left" : "top"]: -d,
928
- behavior: "smooth"
929
- });
930
- }
931
- return !0;
932
- }
933
- return e === 0 ? (i.setTransition(0), i.setTranslate(d), s && (i.emit("beforeTransitionStart", e, n), i.emit("transitionEnd"))) : (i.setTransition(e), i.setTranslate(d), s && (i.emit("beforeTransitionStart", e, n), i.emit("transitionStart")), i.animating || (i.animating = !0, i.onTranslateToWrapperTransitionEnd || (i.onTranslateToWrapperTransitionEnd = function(p) {
934
- !i || i.destroyed || p.target === this && (i.wrapperEl.removeEventListener("transitionend", i.onTranslateToWrapperTransitionEnd), i.onTranslateToWrapperTransitionEnd = null, delete i.onTranslateToWrapperTransitionEnd, i.animating = !1, s && i.emit("transitionEnd"));
935
- }), i.wrapperEl.addEventListener("transitionend", i.onTranslateToWrapperTransitionEnd))), !0;
936
- }
937
- var is = {
938
- getTranslate: Zt,
939
- setTranslate: es,
940
- minTranslate: ts,
941
- maxTranslate: ss,
942
- translateTo: rs
943
- };
944
- function ns(t, e) {
945
- const s = this;
946
- s.params.cssMode || (s.wrapperEl.style.transitionDuration = `${t}ms`, s.wrapperEl.style.transitionDelay = t === 0 ? "0ms" : ""), s.emit("setTransition", t, e);
947
- }
948
- function Ze(t) {
949
- let {
950
- swiper: e,
951
- runCallbacks: s,
952
- direction: r,
953
- step: n
954
- } = t;
955
- const {
956
- activeIndex: i,
957
- previousIndex: l
958
- } = e;
959
- let a = r;
960
- if (a || (i > l ? a = "next" : i < l ? a = "prev" : a = "reset"), e.emit(`transition${n}`), s && i !== l) {
961
- if (a === "reset") {
962
- e.emit(`slideResetTransition${n}`);
963
- return;
964
- }
965
- e.emit(`slideChangeTransition${n}`), a === "next" ? e.emit(`slideNextTransition${n}`) : e.emit(`slidePrevTransition${n}`);
966
- }
967
- }
968
- function as(t, e) {
969
- t === void 0 && (t = !0);
970
- const s = this, {
971
- params: r
972
- } = s;
973
- r.cssMode || (r.autoHeight && s.updateAutoHeight(), Ze({
974
- swiper: s,
975
- runCallbacks: t,
976
- direction: e,
977
- step: "Start"
978
- }));
979
- }
980
- function ls(t, e) {
981
- t === void 0 && (t = !0);
982
- const s = this, {
983
- params: r
984
- } = s;
985
- s.animating = !1, !r.cssMode && (s.setTransition(0), Ze({
986
- swiper: s,
987
- runCallbacks: t,
988
- direction: e,
989
- step: "End"
990
- }));
991
- }
992
- var os = {
993
- setTransition: ns,
994
- transitionStart: as,
995
- transitionEnd: ls
996
- };
997
- function ds(t, e, s, r, n) {
998
- t === void 0 && (t = 0), s === void 0 && (s = !0), typeof t == "string" && (t = parseInt(t, 10));
999
- const i = this;
1000
- let l = t;
1001
- l < 0 && (l = 0);
1002
- const {
1003
- params: a,
1004
- snapGrid: o,
1005
- slidesGrid: c,
1006
- previousIndex: d,
1007
- activeIndex: p,
1008
- rtlTranslate: h,
1009
- wrapperEl: g,
1010
- enabled: m
1011
- } = i;
1012
- if (!m && !r && !n || i.destroyed || i.animating && a.preventInteractionOnTransition)
1013
- return !1;
1014
- typeof e > "u" && (e = i.params.speed);
1015
- const T = Math.min(i.params.slidesPerGroupSkip, l);
1016
- let M = T + Math.floor((l - T) / i.params.slidesPerGroup);
1017
- M >= o.length && (M = o.length - 1);
1018
- const w = -o[M];
1019
- if (a.normalizeSlideIndex)
1020
- for (let y = 0; y < c.length; y += 1) {
1021
- const C = -Math.floor(w * 100), A = Math.floor(c[y] * 100), I = Math.floor(c[y + 1] * 100);
1022
- typeof c[y + 1] < "u" ? C >= A && C < I - (I - A) / 2 ? l = y : C >= A && C < I && (l = y + 1) : C >= A && (l = y);
1023
- }
1024
- if (i.initialized && l !== p && (!i.allowSlideNext && (h ? w > i.translate && w > i.minTranslate() : w < i.translate && w < i.minTranslate()) || !i.allowSlidePrev && w > i.translate && w > i.maxTranslate() && (p || 0) !== l))
1025
- return !1;
1026
- l !== (d || 0) && s && i.emit("beforeSlideChangeStart"), i.updateProgress(w);
1027
- let u;
1028
- l > p ? u = "next" : l < p ? u = "prev" : u = "reset";
1029
- const f = i.virtual && i.params.virtual.enabled;
1030
- if (!(f && n) && (h && -w === i.translate || !h && w === i.translate))
1031
- return i.updateActiveIndex(l), a.autoHeight && i.updateAutoHeight(), i.updateSlidesClasses(), a.effect !== "slide" && i.setTranslate(w), u !== "reset" && (i.transitionStart(s, u), i.transitionEnd(s, u)), !1;
1032
- if (a.cssMode) {
1033
- const y = i.isHorizontal(), C = h ? w : -w;
1034
- if (e === 0)
1035
- f && (i.wrapperEl.style.scrollSnapType = "none", i._immediateVirtual = !0), f && !i._cssModeVirtualInitialSet && i.params.initialSlide > 0 ? (i._cssModeVirtualInitialSet = !0, requestAnimationFrame(() => {
1036
- g[y ? "scrollLeft" : "scrollTop"] = C;
1037
- })) : g[y ? "scrollLeft" : "scrollTop"] = C, f && requestAnimationFrame(() => {
1038
- i.wrapperEl.style.scrollSnapType = "", i._immediateVirtual = !1;
1039
- });
1040
- else {
1041
- if (!i.support.smoothScroll)
1042
- return Xe({
1043
- swiper: i,
1044
- targetPosition: C,
1045
- side: y ? "left" : "top"
1046
- }), !0;
1047
- g.scrollTo({
1048
- [y ? "left" : "top"]: C,
1049
- behavior: "smooth"
1050
- });
1051
- }
1052
- return !0;
1053
- }
1054
- const v = Je().isSafari;
1055
- return f && !n && v && i.isElement && i.virtual.update(!1, !1, l), i.setTransition(e), i.setTranslate(w), i.updateActiveIndex(l), i.updateSlidesClasses(), i.emit("beforeTransitionStart", e, r), i.transitionStart(s, u), e === 0 ? i.transitionEnd(s, u) : i.animating || (i.animating = !0, i.onSlideToWrapperTransitionEnd || (i.onSlideToWrapperTransitionEnd = function(y) {
1056
- !i || i.destroyed || y.target === this && (i.wrapperEl.removeEventListener("transitionend", i.onSlideToWrapperTransitionEnd), i.onSlideToWrapperTransitionEnd = null, delete i.onSlideToWrapperTransitionEnd, i.transitionEnd(s, u));
1057
- }), i.wrapperEl.addEventListener("transitionend", i.onSlideToWrapperTransitionEnd)), !0;
1058
- }
1059
- function cs(t, e, s, r) {
1060
- t === void 0 && (t = 0), s === void 0 && (s = !0), typeof t == "string" && (t = parseInt(t, 10));
1061
- const n = this;
1062
- if (n.destroyed) return;
1063
- typeof e > "u" && (e = n.params.speed);
1064
- const i = n.grid && n.params.grid && n.params.grid.rows > 1;
1065
- let l = t;
1066
- if (n.params.loop)
1067
- if (n.virtual && n.params.virtual.enabled)
1068
- l = l + n.virtual.slidesBefore;
1069
- else {
1070
- let a;
1071
- if (i) {
1072
- const h = l * n.params.grid.rows;
1073
- a = n.slides.find((g) => g.getAttribute("data-swiper-slide-index") * 1 === h).column;
1074
- } else
1075
- a = n.getSlideIndexByData(l);
1076
- const o = i ? Math.ceil(n.slides.length / n.params.grid.rows) : n.slides.length, {
1077
- centeredSlides: c
1078
- } = n.params;
1079
- let d = n.params.slidesPerView;
1080
- d === "auto" ? d = n.slidesPerViewDynamic() : (d = Math.ceil(parseFloat(n.params.slidesPerView, 10)), c && d % 2 === 0 && (d = d + 1));
1081
- let p = o - a < d;
1082
- if (c && (p = p || a < Math.ceil(d / 2)), r && c && n.params.slidesPerView !== "auto" && !i && (p = !1), p) {
1083
- const h = c ? a < n.activeIndex ? "prev" : "next" : a - n.activeIndex - 1 < n.params.slidesPerView ? "next" : "prev";
1084
- n.loopFix({
1085
- direction: h,
1086
- slideTo: !0,
1087
- activeSlideIndex: h === "next" ? a + 1 : a - o + 1,
1088
- slideRealIndex: h === "next" ? n.realIndex : void 0
1089
- });
1090
- }
1091
- if (i) {
1092
- const h = l * n.params.grid.rows;
1093
- l = n.slides.find((g) => g.getAttribute("data-swiper-slide-index") * 1 === h).column;
1094
- } else
1095
- l = n.getSlideIndexByData(l);
1096
- }
1097
- return requestAnimationFrame(() => {
1098
- n.slideTo(l, e, s, r);
1099
- }), n;
1100
- }
1101
- function us(t, e, s) {
1102
- e === void 0 && (e = !0);
1103
- const r = this, {
1104
- enabled: n,
1105
- params: i,
1106
- animating: l
1107
- } = r;
1108
- if (!n || r.destroyed) return r;
1109
- typeof t > "u" && (t = r.params.speed);
1110
- let a = i.slidesPerGroup;
1111
- i.slidesPerView === "auto" && i.slidesPerGroup === 1 && i.slidesPerGroupAuto && (a = Math.max(r.slidesPerViewDynamic("current", !0), 1));
1112
- const o = r.activeIndex < i.slidesPerGroupSkip ? 1 : a, c = r.virtual && i.virtual.enabled;
1113
- if (i.loop) {
1114
- if (l && !c && i.loopPreventsSliding) return !1;
1115
- if (r.loopFix({
1116
- direction: "next"
1117
- }), r._clientLeft = r.wrapperEl.clientLeft, r.activeIndex === r.slides.length - 1 && i.cssMode)
1118
- return requestAnimationFrame(() => {
1119
- r.slideTo(r.activeIndex + o, t, e, s);
1120
- }), !0;
1121
- }
1122
- return i.rewind && r.isEnd ? r.slideTo(0, t, e, s) : r.slideTo(r.activeIndex + o, t, e, s);
1123
- }
1124
- function ps(t, e, s) {
1125
- e === void 0 && (e = !0);
1126
- const r = this, {
1127
- params: n,
1128
- snapGrid: i,
1129
- slidesGrid: l,
1130
- rtlTranslate: a,
1131
- enabled: o,
1132
- animating: c
1133
- } = r;
1134
- if (!o || r.destroyed) return r;
1135
- typeof t > "u" && (t = r.params.speed);
1136
- const d = r.virtual && n.virtual.enabled;
1137
- if (n.loop) {
1138
- if (c && !d && n.loopPreventsSliding) return !1;
1139
- r.loopFix({
1140
- direction: "prev"
1141
- }), r._clientLeft = r.wrapperEl.clientLeft;
1142
- }
1143
- const p = a ? r.translate : -r.translate;
1144
- function h(u) {
1145
- return u < 0 ? -Math.floor(Math.abs(u)) : Math.floor(u);
1146
- }
1147
- const g = h(p), m = i.map((u) => h(u)), T = n.freeMode && n.freeMode.enabled;
1148
- let M = i[m.indexOf(g) - 1];
1149
- if (typeof M > "u" && (n.cssMode || T)) {
1150
- let u;
1151
- i.forEach((f, v) => {
1152
- g >= f && (u = v);
1153
- }), typeof u < "u" && (M = T ? i[u] : i[u > 0 ? u - 1 : u]);
1154
- }
1155
- let w = 0;
1156
- if (typeof M < "u" && (w = l.indexOf(M), w < 0 && (w = r.activeIndex - 1), n.slidesPerView === "auto" && n.slidesPerGroup === 1 && n.slidesPerGroupAuto && (w = w - r.slidesPerViewDynamic("previous", !0) + 1, w = Math.max(w, 0))), n.rewind && r.isBeginning) {
1157
- const u = r.params.virtual && r.params.virtual.enabled && r.virtual ? r.virtual.slides.length - 1 : r.slides.length - 1;
1158
- return r.slideTo(u, t, e, s);
1159
- } else if (n.loop && r.activeIndex === 0 && n.cssMode)
1160
- return requestAnimationFrame(() => {
1161
- r.slideTo(w, t, e, s);
1162
- }), !0;
1163
- return r.slideTo(w, t, e, s);
1164
- }
1165
- function fs(t, e, s) {
1166
- e === void 0 && (e = !0);
1167
- const r = this;
1168
- if (!r.destroyed)
1169
- return typeof t > "u" && (t = r.params.speed), r.slideTo(r.activeIndex, t, e, s);
1170
- }
1171
- function ms(t, e, s, r) {
1172
- e === void 0 && (e = !0), r === void 0 && (r = 0.5);
1173
- const n = this;
1174
- if (n.destroyed) return;
1175
- typeof t > "u" && (t = n.params.speed);
1176
- let i = n.activeIndex;
1177
- const l = Math.min(n.params.slidesPerGroupSkip, i), a = l + Math.floor((i - l) / n.params.slidesPerGroup), o = n.rtlTranslate ? n.translate : -n.translate;
1178
- if (o >= n.snapGrid[a]) {
1179
- const c = n.snapGrid[a], d = n.snapGrid[a + 1];
1180
- o - c > (d - c) * r && (i += n.params.slidesPerGroup);
1181
- } else {
1182
- const c = n.snapGrid[a - 1], d = n.snapGrid[a];
1183
- o - c <= (d - c) * r && (i -= n.params.slidesPerGroup);
1184
- }
1185
- return i = Math.max(i, 0), i = Math.min(i, n.slidesGrid.length - 1), n.slideTo(i, t, e, s);
1186
- }
1187
- function hs() {
1188
- const t = this;
1189
- if (t.destroyed) return;
1190
- const {
1191
- params: e,
1192
- slidesEl: s
1193
- } = t, r = e.slidesPerView === "auto" ? t.slidesPerViewDynamic() : e.slidesPerView;
1194
- let n = t.clickedIndex, i;
1195
- const l = t.isElement ? "swiper-slide" : `.${e.slideClass}`;
1196
- if (e.loop) {
1197
- if (t.animating) return;
1198
- i = parseInt(t.clickedSlide.getAttribute("data-swiper-slide-index"), 10), e.centeredSlides ? n < t.loopedSlides - r / 2 || n > t.slides.length - t.loopedSlides + r / 2 ? (t.loopFix(), n = t.getSlideIndex(H(s, `${l}[data-swiper-slide-index="${i}"]`)[0]), Te(() => {
1199
- t.slideTo(n);
1200
- })) : t.slideTo(n) : n > t.slides.length - r ? (t.loopFix(), n = t.getSlideIndex(H(s, `${l}[data-swiper-slide-index="${i}"]`)[0]), Te(() => {
1201
- t.slideTo(n);
1202
- })) : t.slideTo(n);
1203
- } else
1204
- t.slideTo(n);
1205
- }
1206
- var gs = {
1207
- slideTo: ds,
1208
- slideToLoop: cs,
1209
- slideNext: us,
1210
- slidePrev: ps,
1211
- slideReset: fs,
1212
- slideToClosest: ms,
1213
- slideToClickedSlide: hs
1214
- };
1215
- function vs(t, e) {
1216
- const s = this, {
1217
- params: r,
1218
- slidesEl: n
1219
- } = s;
1220
- if (!r.loop || s.virtual && s.params.virtual.enabled) return;
1221
- const i = () => {
1222
- H(n, `.${r.slideClass}, swiper-slide`).forEach((p, h) => {
1223
- p.setAttribute("data-swiper-slide-index", h);
1224
- });
1225
- }, l = s.grid && r.grid && r.grid.rows > 1, a = r.slidesPerGroup * (l ? r.grid.rows : 1), o = s.slides.length % a !== 0, c = l && s.slides.length % r.grid.rows !== 0, d = (p) => {
1226
- for (let h = 0; h < p; h += 1) {
1227
- const g = s.isElement ? de("swiper-slide", [r.slideBlankClass]) : de("div", [r.slideClass, r.slideBlankClass]);
1228
- s.slidesEl.append(g);
1229
- }
1230
- };
1231
- if (o) {
1232
- if (r.loopAddBlankSlides) {
1233
- const p = a - s.slides.length % a;
1234
- d(p), s.recalcSlides(), s.updateSlides();
1235
- } else
1236
- oe("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)");
1237
- i();
1238
- } else if (c) {
1239
- if (r.loopAddBlankSlides) {
1240
- const p = r.grid.rows - s.slides.length % r.grid.rows;
1241
- d(p), s.recalcSlides(), s.updateSlides();
1242
- } else
1243
- oe("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)");
1244
- i();
1245
- } else
1246
- i();
1247
- s.loopFix({
1248
- slideRealIndex: t,
1249
- direction: r.centeredSlides ? void 0 : "next",
1250
- initial: e
1251
- });
1252
- }
1253
- function ws(t) {
1254
- let {
1255
- slideRealIndex: e,
1256
- slideTo: s = !0,
1257
- direction: r,
1258
- setTranslate: n,
1259
- activeSlideIndex: i,
1260
- initial: l,
1261
- byController: a,
1262
- byMousewheel: o
1263
- } = t === void 0 ? {} : t;
1264
- const c = this;
1265
- if (!c.params.loop) return;
1266
- c.emit("beforeLoopFix");
1267
- const {
1268
- slides: d,
1269
- allowSlidePrev: p,
1270
- allowSlideNext: h,
1271
- slidesEl: g,
1272
- params: m
1273
- } = c, {
1274
- centeredSlides: T,
1275
- initialSlide: M
1276
- } = m;
1277
- if (c.allowSlidePrev = !0, c.allowSlideNext = !0, c.virtual && m.virtual.enabled) {
1278
- s && (!m.centeredSlides && c.snapIndex === 0 ? c.slideTo(c.virtual.slides.length, 0, !1, !0) : m.centeredSlides && c.snapIndex < m.slidesPerView ? c.slideTo(c.virtual.slides.length + c.snapIndex, 0, !1, !0) : c.snapIndex === c.snapGrid.length - 1 && c.slideTo(c.virtual.slidesBefore, 0, !1, !0)), c.allowSlidePrev = p, c.allowSlideNext = h, c.emit("loopFix");
1279
- return;
1280
- }
1281
- let w = m.slidesPerView;
1282
- w === "auto" ? w = c.slidesPerViewDynamic() : (w = Math.ceil(parseFloat(m.slidesPerView, 10)), T && w % 2 === 0 && (w = w + 1));
1283
- const u = m.slidesPerGroupAuto ? w : m.slidesPerGroup;
1284
- let f = u;
1285
- f % u !== 0 && (f += u - f % u), f += m.loopAdditionalSlides, c.loopedSlides = f;
1286
- const v = c.grid && m.grid && m.grid.rows > 1;
1287
- d.length < w + f || c.params.effect === "cards" && d.length < w + f * 2 ? oe("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters") : v && m.grid.fill === "row" && oe("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");
1288
- const y = [], C = [], A = v ? Math.ceil(d.length / m.grid.rows) : d.length, I = l && A - M < w && !T;
1289
- let b = I ? M : c.activeIndex;
1290
- typeof i > "u" ? i = c.getSlideIndex(d.find((x) => x.classList.contains(m.slideActiveClass))) : b = i;
1291
- const S = r === "next" || !r, E = r === "prev" || !r;
1292
- let k = 0, L = 0;
1293
- const O = (v ? d[i].column : i) + (T && typeof n > "u" ? -w / 2 + 0.5 : 0);
1294
- if (O < f) {
1295
- k = Math.max(f - O, u);
1296
- for (let x = 0; x < f - O; x += 1) {
1297
- const z = x - Math.floor(x / A) * A;
1298
- if (v) {
1299
- const U = A - z - 1;
1300
- for (let V = d.length - 1; V >= 0; V -= 1)
1301
- d[V].column === U && y.push(V);
1302
- } else
1303
- y.push(A - z - 1);
1304
- }
1305
- } else if (O + w > A - f) {
1306
- L = Math.max(O - (A - f * 2), u), I && (L = Math.max(L, w - A + M + 1));
1307
- for (let x = 0; x < L; x += 1) {
1308
- const z = x - Math.floor(x / A) * A;
1309
- v ? d.forEach((U, V) => {
1310
- U.column === z && C.push(V);
1311
- }) : C.push(z);
1312
- }
1313
- }
1314
- if (c.__preventObserver__ = !0, requestAnimationFrame(() => {
1315
- c.__preventObserver__ = !1;
1316
- }), c.params.effect === "cards" && d.length < w + f * 2 && (C.includes(i) && C.splice(C.indexOf(i), 1), y.includes(i) && y.splice(y.indexOf(i), 1)), E && y.forEach((x) => {
1317
- d[x].swiperLoopMoveDOM = !0, g.prepend(d[x]), d[x].swiperLoopMoveDOM = !1;
1318
- }), S && C.forEach((x) => {
1319
- d[x].swiperLoopMoveDOM = !0, g.append(d[x]), d[x].swiperLoopMoveDOM = !1;
1320
- }), c.recalcSlides(), m.slidesPerView === "auto" ? c.updateSlides() : v && (y.length > 0 && E || C.length > 0 && S) && c.slides.forEach((x, z) => {
1321
- c.grid.updateSlide(z, x, c.slides);
1322
- }), m.watchSlidesProgress && c.updateSlidesOffset(), s) {
1323
- if (y.length > 0 && E) {
1324
- if (typeof e > "u") {
1325
- const x = c.slidesGrid[b], z = c.slidesGrid[b + k] - x;
1326
- o ? c.setTranslate(c.translate - z) : (c.slideTo(b + Math.ceil(k), 0, !1, !0), n && (c.touchEventsData.startTranslate = c.touchEventsData.startTranslate - z, c.touchEventsData.currentTranslate = c.touchEventsData.currentTranslate - z));
1327
- } else if (n) {
1328
- const x = v ? y.length / m.grid.rows : y.length;
1329
- c.slideTo(c.activeIndex + x, 0, !1, !0), c.touchEventsData.currentTranslate = c.translate;
1330
- }
1331
- } else if (C.length > 0 && S)
1332
- if (typeof e > "u") {
1333
- const x = c.slidesGrid[b], z = c.slidesGrid[b - L] - x;
1334
- o ? c.setTranslate(c.translate - z) : (c.slideTo(b - L, 0, !1, !0), n && (c.touchEventsData.startTranslate = c.touchEventsData.startTranslate - z, c.touchEventsData.currentTranslate = c.touchEventsData.currentTranslate - z));
1335
- } else {
1336
- const x = v ? C.length / m.grid.rows : C.length;
1337
- c.slideTo(c.activeIndex - x, 0, !1, !0);
1338
- }
1339
- }
1340
- if (c.allowSlidePrev = p, c.allowSlideNext = h, c.controller && c.controller.control && !a) {
1341
- const x = {
1342
- slideRealIndex: e,
1343
- direction: r,
1344
- setTranslate: n,
1345
- activeSlideIndex: i,
1346
- byController: !0
1347
- };
1348
- Array.isArray(c.controller.control) ? c.controller.control.forEach((z) => {
1349
- !z.destroyed && z.params.loop && z.loopFix({
1350
- ...x,
1351
- slideTo: z.params.slidesPerView === m.slidesPerView ? s : !1
1352
- });
1353
- }) : c.controller.control instanceof c.constructor && c.controller.control.params.loop && c.controller.control.loopFix({
1354
- ...x,
1355
- slideTo: c.controller.control.params.slidesPerView === m.slidesPerView ? s : !1
1356
- });
1357
- }
1358
- c.emit("loopFix");
1359
- }
1360
- function ys() {
1361
- const t = this, {
1362
- params: e,
1363
- slidesEl: s
1364
- } = t;
1365
- if (!e.loop || !s || t.virtual && t.params.virtual.enabled) return;
1366
- t.recalcSlides();
1367
- const r = [];
1368
- t.slides.forEach((n) => {
1369
- const i = typeof n.swiperSlideIndex > "u" ? n.getAttribute("data-swiper-slide-index") * 1 : n.swiperSlideIndex;
1370
- r[i] = n;
1371
- }), t.slides.forEach((n) => {
1372
- n.removeAttribute("data-swiper-slide-index");
1373
- }), r.forEach((n) => {
1374
- s.append(n);
1375
- }), t.recalcSlides(), t.slideTo(t.realIndex, 0);
1376
- }
1377
- var bs = {
1378
- loopCreate: vs,
1379
- loopFix: ws,
1380
- loopDestroy: ys
1381
- };
1382
- function Ss(t) {
1383
- const e = this;
1384
- if (!e.params.simulateTouch || e.params.watchOverflow && e.isLocked || e.params.cssMode) return;
1385
- const s = e.params.touchEventsTarget === "container" ? e.el : e.wrapperEl;
1386
- e.isElement && (e.__preventObserver__ = !0), s.style.cursor = "move", s.style.cursor = t ? "grabbing" : "grab", e.isElement && requestAnimationFrame(() => {
1387
- e.__preventObserver__ = !1;
1388
- });
1389
- }
1390
- function Es() {
1391
- const t = this;
1392
- t.params.watchOverflow && t.isLocked || t.params.cssMode || (t.isElement && (t.__preventObserver__ = !0), t[t.params.touchEventsTarget === "container" ? "el" : "wrapperEl"].style.cursor = "", t.isElement && requestAnimationFrame(() => {
1393
- t.__preventObserver__ = !1;
1394
- }));
1395
- }
1396
- var Ts = {
1397
- setGrabCursor: Ss,
1398
- unsetGrabCursor: Es
1399
- };
1400
- function xs(t, e) {
1401
- e === void 0 && (e = this);
1402
- function s(r) {
1403
- if (!r || r === K() || r === B()) return null;
1404
- r.assignedSlot && (r = r.assignedSlot);
1405
- const n = r.closest(t);
1406
- return !n && !r.getRootNode ? null : n || s(r.getRootNode().host);
1407
- }
1408
- return s(e);
1409
- }
1410
- function Ge(t, e, s) {
1411
- const r = B(), {
1412
- params: n
1413
- } = t, i = n.edgeSwipeDetection, l = n.edgeSwipeThreshold;
1414
- return i && (s <= l || s >= r.innerWidth - l) ? i === "prevent" ? (e.preventDefault(), !0) : !1 : !0;
1415
- }
1416
- function Cs(t) {
1417
- const e = this, s = K();
1418
- let r = t;
1419
- r.originalEvent && (r = r.originalEvent);
1420
- const n = e.touchEventsData;
1421
- if (r.type === "pointerdown") {
1422
- if (n.pointerId !== null && n.pointerId !== r.pointerId)
1423
- return;
1424
- n.pointerId = r.pointerId;
1425
- } else r.type === "touchstart" && r.targetTouches.length === 1 && (n.touchId = r.targetTouches[0].identifier);
1426
- if (r.type === "touchstart") {
1427
- Ge(e, r, r.targetTouches[0].pageX);
1428
- return;
1429
- }
1430
- const {
1431
- params: i,
1432
- touches: l,
1433
- enabled: a
1434
- } = e;
1435
- if (!a || !i.simulateTouch && r.pointerType === "mouse" || e.animating && i.preventInteractionOnTransition)
1436
- return;
1437
- !e.animating && i.cssMode && i.loop && e.loopFix();
1438
- let o = r.target;
1439
- if (i.touchEventsTarget === "wrapper" && !zt(o, e.wrapperEl) || "which" in r && r.which === 3 || "button" in r && r.button > 0 || n.isTouched && n.isMoved) return;
1440
- const c = !!i.noSwipingClass && i.noSwipingClass !== "", d = r.composedPath ? r.composedPath() : r.path;
1441
- c && r.target && r.target.shadowRoot && d && (o = d[0]);
1442
- const p = i.noSwipingSelector ? i.noSwipingSelector : `.${i.noSwipingClass}`, h = !!(r.target && r.target.shadowRoot);
1443
- if (i.noSwiping && (h ? xs(p, o) : o.closest(p))) {
1444
- e.allowClick = !0;
1445
- return;
1446
- }
1447
- if (i.swipeHandler && !o.closest(i.swipeHandler))
1448
- return;
1449
- l.currentX = r.pageX, l.currentY = r.pageY;
1450
- const g = l.currentX, m = l.currentY;
1451
- if (!Ge(e, r, g))
1452
- return;
1453
- Object.assign(n, {
1454
- isTouched: !0,
1455
- isMoved: !1,
1456
- allowTouchCallbacks: !0,
1457
- isScrolling: void 0,
1458
- startMoving: void 0
1459
- }), l.startX = g, l.startY = m, n.touchStartTime = le(), e.allowClick = !0, e.updateSize(), e.swipeDirection = void 0, i.threshold > 0 && (n.allowThresholdMove = !1);
1460
- let T = !0;
1461
- o.matches(n.focusableElements) && (T = !1, o.nodeName === "SELECT" && (n.isTouched = !1)), s.activeElement && s.activeElement.matches(n.focusableElements) && s.activeElement !== o && (r.pointerType === "mouse" || r.pointerType !== "mouse" && !o.matches(n.focusableElements)) && s.activeElement.blur();
1462
- const M = T && e.allowTouchMove && i.touchStartPreventDefault;
1463
- (i.touchStartForcePreventDefault || M) && !o.isContentEditable && r.preventDefault(), i.freeMode && i.freeMode.enabled && e.freeMode && e.animating && !i.cssMode && e.freeMode.onTouchStart(), e.emit("touchStart", r);
1464
- }
1465
- function Ps(t) {
1466
- const e = K(), s = this, r = s.touchEventsData, {
1467
- params: n,
1468
- touches: i,
1469
- rtlTranslate: l,
1470
- enabled: a
1471
- } = s;
1472
- if (!a || !n.simulateTouch && t.pointerType === "mouse") return;
1473
- let o = t;
1474
- if (o.originalEvent && (o = o.originalEvent), o.type === "pointermove" && (r.touchId !== null || o.pointerId !== r.pointerId))
1475
- return;
1476
- let c;
1477
- if (o.type === "touchmove") {
1478
- if (c = [...o.changedTouches].find((y) => y.identifier === r.touchId), !c || c.identifier !== r.touchId) return;
1479
- } else
1480
- c = o;
1481
- if (!r.isTouched) {
1482
- r.startMoving && r.isScrolling && s.emit("touchMoveOpposite", o);
1483
- return;
1484
- }
1485
- const d = c.pageX, p = c.pageY;
1486
- if (o.preventedByNestedSwiper) {
1487
- i.startX = d, i.startY = p;
1488
- return;
1489
- }
1490
- if (!s.allowTouchMove) {
1491
- o.target.matches(r.focusableElements) || (s.allowClick = !1), r.isTouched && (Object.assign(i, {
1492
- startX: d,
1493
- startY: p,
1494
- currentX: d,
1495
- currentY: p
1496
- }), r.touchStartTime = le());
1497
- return;
1498
- }
1499
- if (n.touchReleaseOnEdges && !n.loop) {
1500
- if (s.isVertical()) {
1501
- if (p < i.startY && s.translate <= s.maxTranslate() || p > i.startY && s.translate >= s.minTranslate()) {
1502
- r.isTouched = !1, r.isMoved = !1;
1503
- return;
1504
- }
1505
- } else if (l && (d > i.startX && -s.translate <= s.maxTranslate() || d < i.startX && -s.translate >= s.minTranslate()) || !l && (d < i.startX && s.translate <= s.maxTranslate() || d > i.startX && s.translate >= s.minTranslate()))
1506
- return;
1507
- }
1508
- if (e.activeElement && e.activeElement.matches(r.focusableElements) && e.activeElement !== o.target && o.pointerType !== "mouse" && e.activeElement.blur(), e.activeElement && o.target === e.activeElement && o.target.matches(r.focusableElements)) {
1509
- r.isMoved = !0, s.allowClick = !1;
1510
- return;
1511
- }
1512
- r.allowTouchCallbacks && s.emit("touchMove", o), i.previousX = i.currentX, i.previousY = i.currentY, i.currentX = d, i.currentY = p;
1513
- const h = i.currentX - i.startX, g = i.currentY - i.startY;
1514
- if (s.params.threshold && Math.sqrt(h ** 2 + g ** 2) < s.params.threshold) return;
1515
- if (typeof r.isScrolling > "u") {
1516
- let y;
1517
- s.isHorizontal() && i.currentY === i.startY || s.isVertical() && i.currentX === i.startX ? r.isScrolling = !1 : h * h + g * g >= 25 && (y = Math.atan2(Math.abs(g), Math.abs(h)) * 180 / Math.PI, r.isScrolling = s.isHorizontal() ? y > n.touchAngle : 90 - y > n.touchAngle);
1518
- }
1519
- if (r.isScrolling && s.emit("touchMoveOpposite", o), typeof r.startMoving > "u" && (i.currentX !== i.startX || i.currentY !== i.startY) && (r.startMoving = !0), r.isScrolling || o.type === "touchmove" && r.preventTouchMoveFromPointerMove) {
1520
- r.isTouched = !1;
1521
- return;
1522
- }
1523
- if (!r.startMoving)
1524
- return;
1525
- s.allowClick = !1, !n.cssMode && o.cancelable && o.preventDefault(), n.touchMoveStopPropagation && !n.nested && o.stopPropagation();
1526
- let m = s.isHorizontal() ? h : g, T = s.isHorizontal() ? i.currentX - i.previousX : i.currentY - i.previousY;
1527
- n.oneWayMovement && (m = Math.abs(m) * (l ? 1 : -1), T = Math.abs(T) * (l ? 1 : -1)), i.diff = m, m *= n.touchRatio, l && (m = -m, T = -T);
1528
- const M = s.touchesDirection;
1529
- s.swipeDirection = m > 0 ? "prev" : "next", s.touchesDirection = T > 0 ? "prev" : "next";
1530
- const w = s.params.loop && !n.cssMode, u = s.touchesDirection === "next" && s.allowSlideNext || s.touchesDirection === "prev" && s.allowSlidePrev;
1531
- if (!r.isMoved) {
1532
- if (w && u && s.loopFix({
1533
- direction: s.swipeDirection
1534
- }), r.startTranslate = s.getTranslate(), s.setTransition(0), s.animating) {
1535
- const y = new window.CustomEvent("transitionend", {
1536
- bubbles: !0,
1537
- cancelable: !0,
1538
- detail: {
1539
- bySwiperTouchMove: !0
1540
- }
1541
- });
1542
- s.wrapperEl.dispatchEvent(y);
1543
- }
1544
- r.allowMomentumBounce = !1, n.grabCursor && (s.allowSlideNext === !0 || s.allowSlidePrev === !0) && s.setGrabCursor(!0), s.emit("sliderFirstMove", o);
1545
- }
1546
- if ((/* @__PURE__ */ new Date()).getTime(), n._loopSwapReset !== !1 && r.isMoved && r.allowThresholdMove && M !== s.touchesDirection && w && u && Math.abs(m) >= 1) {
1547
- Object.assign(i, {
1548
- startX: d,
1549
- startY: p,
1550
- currentX: d,
1551
- currentY: p,
1552
- startTranslate: r.currentTranslate
1553
- }), r.loopSwapReset = !0, r.startTranslate = r.currentTranslate;
1554
- return;
1555
- }
1556
- s.emit("sliderMove", o), r.isMoved = !0, r.currentTranslate = m + r.startTranslate;
1557
- let f = !0, v = n.resistanceRatio;
1558
- if (n.touchReleaseOnEdges && (v = 0), m > 0 ? (w && u && r.allowThresholdMove && r.currentTranslate > (n.centeredSlides ? s.minTranslate() - s.slidesSizesGrid[s.activeIndex + 1] - (n.slidesPerView !== "auto" && s.slides.length - n.slidesPerView >= 2 ? s.slidesSizesGrid[s.activeIndex + 1] + s.params.spaceBetween : 0) - s.params.spaceBetween : s.minTranslate()) && s.loopFix({
1559
- direction: "prev",
1560
- setTranslate: !0,
1561
- activeSlideIndex: 0
1562
- }), r.currentTranslate > s.minTranslate() && (f = !1, n.resistance && (r.currentTranslate = s.minTranslate() - 1 + (-s.minTranslate() + r.startTranslate + m) ** v))) : m < 0 && (w && u && r.allowThresholdMove && r.currentTranslate < (n.centeredSlides ? s.maxTranslate() + s.slidesSizesGrid[s.slidesSizesGrid.length - 1] + s.params.spaceBetween + (n.slidesPerView !== "auto" && s.slides.length - n.slidesPerView >= 2 ? s.slidesSizesGrid[s.slidesSizesGrid.length - 1] + s.params.spaceBetween : 0) : s.maxTranslate()) && s.loopFix({
1563
- direction: "next",
1564
- setTranslate: !0,
1565
- activeSlideIndex: s.slides.length - (n.slidesPerView === "auto" ? s.slidesPerViewDynamic() : Math.ceil(parseFloat(n.slidesPerView, 10)))
1566
- }), r.currentTranslate < s.maxTranslate() && (f = !1, n.resistance && (r.currentTranslate = s.maxTranslate() + 1 - (s.maxTranslate() - r.startTranslate - m) ** v))), f && (o.preventedByNestedSwiper = !0), !s.allowSlideNext && s.swipeDirection === "next" && r.currentTranslate < r.startTranslate && (r.currentTranslate = r.startTranslate), !s.allowSlidePrev && s.swipeDirection === "prev" && r.currentTranslate > r.startTranslate && (r.currentTranslate = r.startTranslate), !s.allowSlidePrev && !s.allowSlideNext && (r.currentTranslate = r.startTranslate), n.threshold > 0)
1567
- if (Math.abs(m) > n.threshold || r.allowThresholdMove) {
1568
- if (!r.allowThresholdMove) {
1569
- r.allowThresholdMove = !0, i.startX = i.currentX, i.startY = i.currentY, r.currentTranslate = r.startTranslate, i.diff = s.isHorizontal() ? i.currentX - i.startX : i.currentY - i.startY;
1570
- return;
1571
- }
1572
- } else {
1573
- r.currentTranslate = r.startTranslate;
1574
- return;
1575
- }
1576
- !n.followFinger || n.cssMode || ((n.freeMode && n.freeMode.enabled && s.freeMode || n.watchSlidesProgress) && (s.updateActiveIndex(), s.updateSlidesClasses()), n.freeMode && n.freeMode.enabled && s.freeMode && s.freeMode.onTouchMove(), s.updateProgress(r.currentTranslate), s.setTranslate(r.currentTranslate));
1577
- }
1578
- function Ms(t) {
1579
- const e = this, s = e.touchEventsData;
1580
- let r = t;
1581
- r.originalEvent && (r = r.originalEvent);
1582
- let n;
1583
- if (r.type === "touchend" || r.type === "touchcancel") {
1584
- if (n = [...r.changedTouches].find((v) => v.identifier === s.touchId), !n || n.identifier !== s.touchId) return;
1585
- } else {
1586
- if (s.touchId !== null || r.pointerId !== s.pointerId) return;
1587
- n = r;
1588
- }
1589
- if (["pointercancel", "pointerout", "pointerleave", "contextmenu"].includes(r.type) && !(["pointercancel", "contextmenu"].includes(r.type) && (e.browser.isSafari || e.browser.isWebView)))
1590
- return;
1591
- s.pointerId = null, s.touchId = null;
1592
- const {
1593
- params: i,
1594
- touches: l,
1595
- rtlTranslate: a,
1596
- slidesGrid: o,
1597
- enabled: c
1598
- } = e;
1599
- if (!c || !i.simulateTouch && r.pointerType === "mouse") return;
1600
- if (s.allowTouchCallbacks && e.emit("touchEnd", r), s.allowTouchCallbacks = !1, !s.isTouched) {
1601
- s.isMoved && i.grabCursor && e.setGrabCursor(!1), s.isMoved = !1, s.startMoving = !1;
1602
- return;
1603
- }
1604
- i.grabCursor && s.isMoved && s.isTouched && (e.allowSlideNext === !0 || e.allowSlidePrev === !0) && e.setGrabCursor(!1);
1605
- const d = le(), p = d - s.touchStartTime;
1606
- if (e.allowClick) {
1607
- const v = r.path || r.composedPath && r.composedPath();
1608
- e.updateClickedSlide(v && v[0] || r.target, v), e.emit("tap click", r), p < 300 && d - s.lastClickTime < 300 && e.emit("doubleTap doubleClick", r);
1609
- }
1610
- if (s.lastClickTime = le(), Te(() => {
1611
- e.destroyed || (e.allowClick = !0);
1612
- }), !s.isTouched || !s.isMoved || !e.swipeDirection || l.diff === 0 && !s.loopSwapReset || s.currentTranslate === s.startTranslate && !s.loopSwapReset) {
1613
- s.isTouched = !1, s.isMoved = !1, s.startMoving = !1;
1614
- return;
1615
- }
1616
- s.isTouched = !1, s.isMoved = !1, s.startMoving = !1;
1617
- let h;
1618
- if (i.followFinger ? h = a ? e.translate : -e.translate : h = -s.currentTranslate, i.cssMode)
1619
- return;
1620
- if (i.freeMode && i.freeMode.enabled) {
1621
- e.freeMode.onTouchEnd({
1622
- currentPos: h
1623
- });
1624
- return;
1625
- }
1626
- const g = h >= -e.maxTranslate() && !e.params.loop;
1627
- let m = 0, T = e.slidesSizesGrid[0];
1628
- for (let v = 0; v < o.length; v += v < i.slidesPerGroupSkip ? 1 : i.slidesPerGroup) {
1629
- const y = v < i.slidesPerGroupSkip - 1 ? 1 : i.slidesPerGroup;
1630
- typeof o[v + y] < "u" ? (g || h >= o[v] && h < o[v + y]) && (m = v, T = o[v + y] - o[v]) : (g || h >= o[v]) && (m = v, T = o[o.length - 1] - o[o.length - 2]);
1631
- }
1632
- let M = null, w = null;
1633
- i.rewind && (e.isBeginning ? w = i.virtual && i.virtual.enabled && e.virtual ? e.virtual.slides.length - 1 : e.slides.length - 1 : e.isEnd && (M = 0));
1634
- const u = (h - o[m]) / T, f = m < i.slidesPerGroupSkip - 1 ? 1 : i.slidesPerGroup;
1635
- if (p > i.longSwipesMs) {
1636
- if (!i.longSwipes) {
1637
- e.slideTo(e.activeIndex);
1638
- return;
1639
- }
1640
- e.swipeDirection === "next" && (u >= i.longSwipesRatio ? e.slideTo(i.rewind && e.isEnd ? M : m + f) : e.slideTo(m)), e.swipeDirection === "prev" && (u > 1 - i.longSwipesRatio ? e.slideTo(m + f) : w !== null && u < 0 && Math.abs(u) > i.longSwipesRatio ? e.slideTo(w) : e.slideTo(m));
1641
- } else {
1642
- if (!i.shortSwipes) {
1643
- e.slideTo(e.activeIndex);
1644
- return;
1645
- }
1646
- e.navigation && (r.target === e.navigation.nextEl || r.target === e.navigation.prevEl) ? r.target === e.navigation.nextEl ? e.slideTo(m + f) : e.slideTo(m) : (e.swipeDirection === "next" && e.slideTo(M !== null ? M : m + f), e.swipeDirection === "prev" && e.slideTo(w !== null ? w : m));
1647
- }
1648
- }
1649
- function Be() {
1650
- const t = this, {
1651
- params: e,
1652
- el: s
1653
- } = t;
1654
- if (s && s.offsetWidth === 0) return;
1655
- e.breakpoints && t.setBreakpoint();
1656
- const {
1657
- allowSlideNext: r,
1658
- allowSlidePrev: n,
1659
- snapGrid: i
1660
- } = t, l = t.virtual && t.params.virtual.enabled;
1661
- t.allowSlideNext = !0, t.allowSlidePrev = !0, t.updateSize(), t.updateSlides(), t.updateSlidesClasses();
1662
- const a = l && e.loop;
1663
- (e.slidesPerView === "auto" || e.slidesPerView > 1) && t.isEnd && !t.isBeginning && !t.params.centeredSlides && !a ? t.slideTo(t.slides.length - 1, 0, !1, !0) : t.params.loop && !l ? t.slideToLoop(t.realIndex, 0, !1, !0) : t.slideTo(t.activeIndex, 0, !1, !0), t.autoplay && t.autoplay.running && t.autoplay.paused && (clearTimeout(t.autoplay.resizeTimeout), t.autoplay.resizeTimeout = setTimeout(() => {
1664
- t.autoplay && t.autoplay.running && t.autoplay.paused && t.autoplay.resume();
1665
- }, 500)), t.allowSlidePrev = n, t.allowSlideNext = r, t.params.watchOverflow && i !== t.snapGrid && t.checkOverflow();
1666
- }
1667
- function ks(t) {
1668
- const e = this;
1669
- e.enabled && (e.allowClick || (e.params.preventClicks && t.preventDefault(), e.params.preventClicksPropagation && e.animating && (t.stopPropagation(), t.stopImmediatePropagation())));
1670
- }
1671
- function Is() {
1672
- const t = this, {
1673
- wrapperEl: e,
1674
- rtlTranslate: s,
1675
- enabled: r
1676
- } = t;
1677
- if (!r) return;
1678
- t.previousTranslate = t.translate, t.isHorizontal() ? t.translate = -e.scrollLeft : t.translate = -e.scrollTop, t.translate === 0 && (t.translate = 0), t.updateActiveIndex(), t.updateSlidesClasses();
1679
- let n;
1680
- const i = t.maxTranslate() - t.minTranslate();
1681
- i === 0 ? n = 0 : n = (t.translate - t.minTranslate()) / i, n !== t.progress && t.updateProgress(s ? -t.translate : t.translate), t.emit("setTranslate", t.translate, !1);
1682
- }
1683
- function Ls(t) {
1684
- const e = this;
1685
- ne(e, t.target), !(e.params.cssMode || e.params.slidesPerView !== "auto" && !e.params.autoHeight) && e.update();
1686
- }
1687
- function As() {
1688
- const t = this;
1689
- t.documentTouchHandlerProceeded || (t.documentTouchHandlerProceeded = !0, t.params.touchReleaseOnEdges && (t.el.style.touchAction = "auto"));
1690
- }
1691
- const et = (t, e) => {
1692
- const s = K(), {
1693
- params: r,
1694
- el: n,
1695
- wrapperEl: i,
1696
- device: l
1697
- } = t, a = !!r.nested, o = e === "on" ? "addEventListener" : "removeEventListener", c = e;
1698
- !n || typeof n == "string" || (s[o]("touchstart", t.onDocumentTouchStart, {
1699
- passive: !1,
1700
- capture: a
1701
- }), n[o]("touchstart", t.onTouchStart, {
1702
- passive: !1
1703
- }), n[o]("pointerdown", t.onTouchStart, {
1704
- passive: !1
1705
- }), s[o]("touchmove", t.onTouchMove, {
1706
- passive: !1,
1707
- capture: a
1708
- }), s[o]("pointermove", t.onTouchMove, {
1709
- passive: !1,
1710
- capture: a
1711
- }), s[o]("touchend", t.onTouchEnd, {
1712
- passive: !0
1713
- }), s[o]("pointerup", t.onTouchEnd, {
1714
- passive: !0
1715
- }), s[o]("pointercancel", t.onTouchEnd, {
1716
- passive: !0
1717
- }), s[o]("touchcancel", t.onTouchEnd, {
1718
- passive: !0
1719
- }), s[o]("pointerout", t.onTouchEnd, {
1720
- passive: !0
1721
- }), s[o]("pointerleave", t.onTouchEnd, {
1722
- passive: !0
1723
- }), s[o]("contextmenu", t.onTouchEnd, {
1724
- passive: !0
1725
- }), (r.preventClicks || r.preventClicksPropagation) && n[o]("click", t.onClick, !0), r.cssMode && i[o]("scroll", t.onScroll), r.updateOnWindowResize ? t[c](l.ios || l.android ? "resize orientationchange observerUpdate" : "resize observerUpdate", Be, !0) : t[c]("observerUpdate", Be, !0), n[o]("load", t.onLoad, {
1726
- capture: !0
1727
- }));
1728
- };
1729
- function Os() {
1730
- const t = this, {
1731
- params: e
1732
- } = t;
1733
- t.onTouchStart = Cs.bind(t), t.onTouchMove = Ps.bind(t), t.onTouchEnd = Ms.bind(t), t.onDocumentTouchStart = As.bind(t), e.cssMode && (t.onScroll = Is.bind(t)), t.onClick = ks.bind(t), t.onLoad = Ls.bind(t), et(t, "on");
1734
- }
1735
- function zs() {
1736
- et(this, "off");
1737
- }
1738
- var _s = {
1739
- attachEvents: Os,
1740
- detachEvents: zs
1741
- };
1742
- const Ne = (t, e) => t.grid && e.grid && e.grid.rows > 1;
1743
- function $s() {
1744
- const t = this, {
1745
- realIndex: e,
1746
- initialized: s,
1747
- params: r,
1748
- el: n
1749
- } = t, i = r.breakpoints;
1750
- if (!i || i && Object.keys(i).length === 0) return;
1751
- const l = K(), a = r.breakpointsBase === "window" || !r.breakpointsBase ? r.breakpointsBase : "container", o = ["window", "container"].includes(r.breakpointsBase) || !r.breakpointsBase ? t.el : l.querySelector(r.breakpointsBase), c = t.getBreakpoint(i, a, o);
1752
- if (!c || t.currentBreakpoint === c) return;
1753
- const d = (c in i ? i[c] : void 0) || t.originalParams, p = Ne(t, r), h = Ne(t, d), g = t.params.grabCursor, m = d.grabCursor, T = r.enabled;
1754
- p && !h ? (n.classList.remove(`${r.containerModifierClass}grid`, `${r.containerModifierClass}grid-column`), t.emitContainerClasses()) : !p && h && (n.classList.add(`${r.containerModifierClass}grid`), (d.grid.fill && d.grid.fill === "column" || !d.grid.fill && r.grid.fill === "column") && n.classList.add(`${r.containerModifierClass}grid-column`), t.emitContainerClasses()), g && !m ? t.unsetGrabCursor() : !g && m && t.setGrabCursor(), ["navigation", "pagination", "scrollbar"].forEach((y) => {
1755
- if (typeof d[y] > "u") return;
1756
- const C = r[y] && r[y].enabled, A = d[y] && d[y].enabled;
1757
- C && !A && t[y].disable(), !C && A && t[y].enable();
1758
- });
1759
- const M = d.direction && d.direction !== r.direction, w = r.loop && (d.slidesPerView !== r.slidesPerView || M), u = r.loop;
1760
- M && s && t.changeDirection(), N(t.params, d);
1761
- const f = t.params.enabled, v = t.params.loop;
1762
- Object.assign(t, {
1763
- allowTouchMove: t.params.allowTouchMove,
1764
- allowSlideNext: t.params.allowSlideNext,
1765
- allowSlidePrev: t.params.allowSlidePrev
1766
- }), T && !f ? t.disable() : !T && f && t.enable(), t.currentBreakpoint = c, t.emit("_beforeBreakpoint", d), s && (w ? (t.loopDestroy(), t.loopCreate(e), t.updateSlides()) : !u && v ? (t.loopCreate(e), t.updateSlides()) : u && !v && t.loopDestroy()), t.emit("breakpoint", d);
1767
- }
1768
- function Gs(t, e, s) {
1769
- if (e === void 0 && (e = "window"), !t || e === "container" && !s) return;
1770
- let r = !1;
1771
- const n = B(), i = e === "window" ? n.innerHeight : s.clientHeight, l = Object.keys(t).map((a) => {
1772
- if (typeof a == "string" && a.indexOf("@") === 0) {
1773
- const o = parseFloat(a.substr(1));
1774
- return {
1775
- value: i * o,
1776
- point: a
1777
- };
1778
- }
1779
- return {
1780
- value: a,
1781
- point: a
1782
- };
1783
- });
1784
- l.sort((a, o) => parseInt(a.value, 10) - parseInt(o.value, 10));
1785
- for (let a = 0; a < l.length; a += 1) {
1786
- const {
1787
- point: o,
1788
- value: c
1789
- } = l[a];
1790
- e === "window" ? n.matchMedia(`(min-width: ${c}px)`).matches && (r = o) : c <= s.clientWidth && (r = o);
1791
- }
1792
- return r || "max";
1793
- }
1794
- var Bs = {
1795
- setBreakpoint: $s,
1796
- getBreakpoint: Gs
1797
- };
1798
- function Ns(t, e) {
1799
- const s = [];
1800
- return t.forEach((r) => {
1801
- typeof r == "object" ? Object.keys(r).forEach((n) => {
1802
- r[n] && s.push(e + n);
1803
- }) : typeof r == "string" && s.push(e + r);
1804
- }), s;
1805
- }
1806
- function Ds() {
1807
- const t = this, {
1808
- classNames: e,
1809
- params: s,
1810
- rtl: r,
1811
- el: n,
1812
- device: i
1813
- } = t, l = Ns(["initialized", s.direction, {
1814
- "free-mode": t.params.freeMode && s.freeMode.enabled
1815
- }, {
1816
- autoheight: s.autoHeight
1817
- }, {
1818
- rtl: r
1819
- }, {
1820
- grid: s.grid && s.grid.rows > 1
1821
- }, {
1822
- "grid-column": s.grid && s.grid.rows > 1 && s.grid.fill === "column"
1823
- }, {
1824
- android: i.android
1825
- }, {
1826
- ios: i.ios
1827
- }, {
1828
- "css-mode": s.cssMode
1829
- }, {
1830
- centered: s.cssMode && s.centeredSlides
1831
- }, {
1832
- "watch-progress": s.watchSlidesProgress
1833
- }], s.containerModifierClass);
1834
- e.push(...l), n.classList.add(...e), t.emitContainerClasses();
1835
- }
1836
- function Fs() {
1837
- const t = this, {
1838
- el: e,
1839
- classNames: s
1840
- } = t;
1841
- !e || typeof e == "string" || (e.classList.remove(...s), t.emitContainerClasses());
1842
- }
1843
- var Vs = {
1844
- addClasses: Ds,
1845
- removeClasses: Fs
1846
- };
1847
- function js() {
1848
- const t = this, {
1849
- isLocked: e,
1850
- params: s
1851
- } = t, {
1852
- slidesOffsetBefore: r
1853
- } = s;
1854
- if (r) {
1855
- const n = t.slides.length - 1, i = t.slidesGrid[n] + t.slidesSizesGrid[n] + r * 2;
1856
- t.isLocked = t.size > i;
1857
- } else
1858
- t.isLocked = t.snapGrid.length === 1;
1859
- s.allowSlideNext === !0 && (t.allowSlideNext = !t.isLocked), s.allowSlidePrev === !0 && (t.allowSlidePrev = !t.isLocked), e && e !== t.isLocked && (t.isEnd = !1), e !== t.isLocked && t.emit(t.isLocked ? "lock" : "unlock");
1860
- }
1861
- var Hs = {
1862
- checkOverflow: js
1863
- }, Pe = {
1864
- init: !0,
1865
- direction: "horizontal",
1866
- oneWayMovement: !1,
1867
- swiperElementNodeName: "SWIPER-CONTAINER",
1868
- touchEventsTarget: "wrapper",
1869
- initialSlide: 0,
1870
- speed: 300,
1871
- cssMode: !1,
1872
- updateOnWindowResize: !0,
1873
- resizeObserver: !0,
1874
- nested: !1,
1875
- createElements: !1,
1876
- eventsPrefix: "swiper",
1877
- enabled: !0,
1878
- focusableElements: "input, select, option, textarea, button, video, label",
1879
- // Overrides
1880
- width: null,
1881
- height: null,
1882
- //
1883
- preventInteractionOnTransition: !1,
1884
- // ssr
1885
- userAgent: null,
1886
- url: null,
1887
- // To support iOS's swipe-to-go-back gesture (when being used in-app).
1888
- edgeSwipeDetection: !1,
1889
- edgeSwipeThreshold: 20,
1890
- // Autoheight
1891
- autoHeight: !1,
1892
- // Set wrapper width
1893
- setWrapperSize: !1,
1894
- // Virtual Translate
1895
- virtualTranslate: !1,
1896
- // Effects
1897
- effect: "slide",
1898
- // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'
1899
- // Breakpoints
1900
- breakpoints: void 0,
1901
- breakpointsBase: "window",
1902
- // Slides grid
1903
- spaceBetween: 0,
1904
- slidesPerView: 1,
1905
- slidesPerGroup: 1,
1906
- slidesPerGroupSkip: 0,
1907
- slidesPerGroupAuto: !1,
1908
- centeredSlides: !1,
1909
- centeredSlidesBounds: !1,
1910
- slidesOffsetBefore: 0,
1911
- // in px
1912
- slidesOffsetAfter: 0,
1913
- // in px
1914
- normalizeSlideIndex: !0,
1915
- centerInsufficientSlides: !1,
1916
- // Disable swiper and hide navigation when container not overflow
1917
- watchOverflow: !0,
1918
- // Round length
1919
- roundLengths: !1,
1920
- // Touches
1921
- touchRatio: 1,
1922
- touchAngle: 45,
1923
- simulateTouch: !0,
1924
- shortSwipes: !0,
1925
- longSwipes: !0,
1926
- longSwipesRatio: 0.5,
1927
- longSwipesMs: 300,
1928
- followFinger: !0,
1929
- allowTouchMove: !0,
1930
- threshold: 5,
1931
- touchMoveStopPropagation: !1,
1932
- touchStartPreventDefault: !0,
1933
- touchStartForcePreventDefault: !1,
1934
- touchReleaseOnEdges: !1,
1935
- // Unique Navigation Elements
1936
- uniqueNavElements: !0,
1937
- // Resistance
1938
- resistance: !0,
1939
- resistanceRatio: 0.85,
1940
- // Progress
1941
- watchSlidesProgress: !1,
1942
- // Cursor
1943
- grabCursor: !1,
1944
- // Clicks
1945
- preventClicks: !0,
1946
- preventClicksPropagation: !0,
1947
- slideToClickedSlide: !1,
1948
- // loop
1949
- loop: !1,
1950
- loopAddBlankSlides: !0,
1951
- loopAdditionalSlides: 0,
1952
- loopPreventsSliding: !0,
1953
- // rewind
1954
- rewind: !1,
1955
- // Swiping/no swiping
1956
- allowSlidePrev: !0,
1957
- allowSlideNext: !0,
1958
- swipeHandler: null,
1959
- // '.swipe-handler',
1960
- noSwiping: !0,
1961
- noSwipingClass: "swiper-no-swiping",
1962
- noSwipingSelector: null,
1963
- // Passive Listeners
1964
- passiveListeners: !0,
1965
- maxBackfaceHiddenSlides: 10,
1966
- // NS
1967
- containerModifierClass: "swiper-",
1968
- // NEW
1969
- slideClass: "swiper-slide",
1970
- slideBlankClass: "swiper-slide-blank",
1971
- slideActiveClass: "swiper-slide-active",
1972
- slideVisibleClass: "swiper-slide-visible",
1973
- slideFullyVisibleClass: "swiper-slide-fully-visible",
1974
- slideNextClass: "swiper-slide-next",
1975
- slidePrevClass: "swiper-slide-prev",
1976
- wrapperClass: "swiper-wrapper",
1977
- lazyPreloaderClass: "swiper-lazy-preloader",
1978
- lazyPreloadPrevNext: 0,
1979
- // Callbacks
1980
- runCallbacksOnInit: !0,
1981
- // Internals
1982
- _emitClasses: !1
1983
- };
1984
- function Rs(t, e) {
1985
- return function(s) {
1986
- s === void 0 && (s = {});
1987
- const r = Object.keys(s)[0], n = s[r];
1988
- if (typeof n != "object" || n === null) {
1989
- N(e, s);
1990
- return;
1991
- }
1992
- if (t[r] === !0 && (t[r] = {
1993
- enabled: !0
1994
- }), r === "navigation" && t[r] && t[r].enabled && !t[r].prevEl && !t[r].nextEl && (t[r].auto = !0), ["pagination", "scrollbar"].indexOf(r) >= 0 && t[r] && t[r].enabled && !t[r].el && (t[r].auto = !0), !(r in t && "enabled" in n)) {
1995
- N(e, s);
1996
- return;
1997
- }
1998
- typeof t[r] == "object" && !("enabled" in t[r]) && (t[r].enabled = !0), t[r] || (t[r] = {
1999
- enabled: !1
2000
- }), N(e, s);
2001
- };
2002
- }
2003
- const ye = {
2004
- eventsEmitter: Vt,
2005
- update: Jt,
2006
- translate: is,
2007
- transition: os,
2008
- slide: gs,
2009
- loop: bs,
2010
- grabCursor: Ts,
2011
- events: _s,
2012
- breakpoints: Bs,
2013
- checkOverflow: Hs,
2014
- classes: Vs
2015
- }, be = {};
2016
- let ze = class q {
2017
- constructor() {
2018
- let e, s;
2019
- for (var r = arguments.length, n = new Array(r), i = 0; i < r; i++)
2020
- n[i] = arguments[i];
2021
- n.length === 1 && n[0].constructor && Object.prototype.toString.call(n[0]).slice(8, -1) === "Object" ? s = n[0] : [e, s] = n, s || (s = {}), s = N({}, s), e && !s.el && (s.el = e);
2022
- const l = K();
2023
- if (s.el && typeof s.el == "string" && l.querySelectorAll(s.el).length > 1) {
2024
- const d = [];
2025
- return l.querySelectorAll(s.el).forEach((p) => {
2026
- const h = N({}, s, {
2027
- el: p
2028
- });
2029
- d.push(new q(h));
2030
- }), d;
2031
- }
2032
- const a = this;
2033
- a.__swiper__ = !0, a.support = Qe(), a.device = Ke({
2034
- userAgent: s.userAgent
2035
- }), a.browser = Je(), a.eventsListeners = {}, a.eventsAnyListeners = [], a.modules = [...a.__modules__], s.modules && Array.isArray(s.modules) && a.modules.push(...s.modules);
2036
- const o = {};
2037
- a.modules.forEach((d) => {
2038
- d({
2039
- params: s,
2040
- swiper: a,
2041
- extendParams: Rs(s, o),
2042
- on: a.on.bind(a),
2043
- once: a.once.bind(a),
2044
- off: a.off.bind(a),
2045
- emit: a.emit.bind(a)
2046
- });
2047
- });
2048
- const c = N({}, Pe, o);
2049
- return a.params = N({}, c, be, s), a.originalParams = N({}, a.params), a.passedParams = N({}, s), a.params && a.params.on && Object.keys(a.params.on).forEach((d) => {
2050
- a.on(d, a.params.on[d]);
2051
- }), a.params && a.params.onAny && a.onAny(a.params.onAny), Object.assign(a, {
2052
- enabled: a.params.enabled,
2053
- el: e,
2054
- // Classes
2055
- classNames: [],
2056
- // Slides
2057
- slides: [],
2058
- slidesGrid: [],
2059
- snapGrid: [],
2060
- slidesSizesGrid: [],
2061
- // isDirection
2062
- isHorizontal() {
2063
- return a.params.direction === "horizontal";
2064
- },
2065
- isVertical() {
2066
- return a.params.direction === "vertical";
2067
- },
2068
- // Indexes
2069
- activeIndex: 0,
2070
- realIndex: 0,
2071
- //
2072
- isBeginning: !0,
2073
- isEnd: !1,
2074
- // Props
2075
- translate: 0,
2076
- previousTranslate: 0,
2077
- progress: 0,
2078
- velocity: 0,
2079
- animating: !1,
2080
- cssOverflowAdjustment() {
2081
- return Math.trunc(this.translate / 2 ** 23) * 2 ** 23;
2082
- },
2083
- // Locks
2084
- allowSlideNext: a.params.allowSlideNext,
2085
- allowSlidePrev: a.params.allowSlidePrev,
2086
- // Touch Events
2087
- touchEventsData: {
2088
- isTouched: void 0,
2089
- isMoved: void 0,
2090
- allowTouchCallbacks: void 0,
2091
- touchStartTime: void 0,
2092
- isScrolling: void 0,
2093
- currentTranslate: void 0,
2094
- startTranslate: void 0,
2095
- allowThresholdMove: void 0,
2096
- // Form elements to match
2097
- focusableElements: a.params.focusableElements,
2098
- // Last click time
2099
- lastClickTime: 0,
2100
- clickTimeout: void 0,
2101
- // Velocities
2102
- velocities: [],
2103
- allowMomentumBounce: void 0,
2104
- startMoving: void 0,
2105
- pointerId: null,
2106
- touchId: null
2107
- },
2108
- // Clicks
2109
- allowClick: !0,
2110
- // Touches
2111
- allowTouchMove: a.params.allowTouchMove,
2112
- touches: {
2113
- startX: 0,
2114
- startY: 0,
2115
- currentX: 0,
2116
- currentY: 0,
2117
- diff: 0
2118
- },
2119
- // Images
2120
- imagesToLoad: [],
2121
- imagesLoaded: 0
2122
- }), a.emit("_swiper"), a.params.init && a.init(), a;
2123
- }
2124
- getDirectionLabel(e) {
2125
- return this.isHorizontal() ? e : {
2126
- width: "height",
2127
- "margin-top": "margin-left",
2128
- "margin-bottom ": "margin-right",
2129
- "margin-left": "margin-top",
2130
- "margin-right": "margin-bottom",
2131
- "padding-left": "padding-top",
2132
- "padding-right": "padding-bottom",
2133
- marginRight: "marginBottom"
2134
- }[e];
2135
- }
2136
- getSlideIndex(e) {
2137
- const {
2138
- slidesEl: s,
2139
- params: r
2140
- } = this, n = H(s, `.${r.slideClass}, swiper-slide`), i = ce(n[0]);
2141
- return ce(e) - i;
2142
- }
2143
- getSlideIndexByData(e) {
2144
- return this.getSlideIndex(this.slides.find((s) => s.getAttribute("data-swiper-slide-index") * 1 === e));
2145
- }
2146
- recalcSlides() {
2147
- const e = this, {
2148
- slidesEl: s,
2149
- params: r
2150
- } = e;
2151
- e.slides = H(s, `.${r.slideClass}, swiper-slide`);
2152
- }
2153
- enable() {
2154
- const e = this;
2155
- e.enabled || (e.enabled = !0, e.params.grabCursor && e.setGrabCursor(), e.emit("enable"));
2156
- }
2157
- disable() {
2158
- const e = this;
2159
- e.enabled && (e.enabled = !1, e.params.grabCursor && e.unsetGrabCursor(), e.emit("disable"));
2160
- }
2161
- setProgress(e, s) {
2162
- const r = this;
2163
- e = Math.min(Math.max(e, 0), 1);
2164
- const n = r.minTranslate(), i = (r.maxTranslate() - n) * e + n;
2165
- r.translateTo(i, typeof s > "u" ? 0 : s), r.updateActiveIndex(), r.updateSlidesClasses();
2166
- }
2167
- emitContainerClasses() {
2168
- const e = this;
2169
- if (!e.params._emitClasses || !e.el) return;
2170
- const s = e.el.className.split(" ").filter((r) => r.indexOf("swiper") === 0 || r.indexOf(e.params.containerModifierClass) === 0);
2171
- e.emit("_containerClasses", s.join(" "));
2172
- }
2173
- getSlideClasses(e) {
2174
- const s = this;
2175
- return s.destroyed ? "" : e.className.split(" ").filter((r) => r.indexOf("swiper-slide") === 0 || r.indexOf(s.params.slideClass) === 0).join(" ");
2176
- }
2177
- emitSlidesClasses() {
2178
- const e = this;
2179
- if (!e.params._emitClasses || !e.el) return;
2180
- const s = [];
2181
- e.slides.forEach((r) => {
2182
- const n = e.getSlideClasses(r);
2183
- s.push({
2184
- slideEl: r,
2185
- classNames: n
2186
- }), e.emit("_slideClass", r, n);
2187
- }), e.emit("_slideClasses", s);
2188
- }
2189
- slidesPerViewDynamic(e, s) {
2190
- e === void 0 && (e = "current"), s === void 0 && (s = !1);
2191
- const r = this, {
2192
- params: n,
2193
- slides: i,
2194
- slidesGrid: l,
2195
- slidesSizesGrid: a,
2196
- size: o,
2197
- activeIndex: c
2198
- } = r;
2199
- let d = 1;
2200
- if (typeof n.slidesPerView == "number") return n.slidesPerView;
2201
- if (n.centeredSlides) {
2202
- let p = i[c] ? Math.ceil(i[c].swiperSlideSize) : 0, h;
2203
- for (let g = c + 1; g < i.length; g += 1)
2204
- i[g] && !h && (p += Math.ceil(i[g].swiperSlideSize), d += 1, p > o && (h = !0));
2205
- for (let g = c - 1; g >= 0; g -= 1)
2206
- i[g] && !h && (p += i[g].swiperSlideSize, d += 1, p > o && (h = !0));
2207
- } else if (e === "current")
2208
- for (let p = c + 1; p < i.length; p += 1)
2209
- (s ? l[p] + a[p] - l[c] < o : l[p] - l[c] < o) && (d += 1);
2210
- else
2211
- for (let p = c - 1; p >= 0; p -= 1)
2212
- l[c] - l[p] < o && (d += 1);
2213
- return d;
2214
- }
2215
- update() {
2216
- const e = this;
2217
- if (!e || e.destroyed) return;
2218
- const {
2219
- snapGrid: s,
2220
- params: r
2221
- } = e;
2222
- r.breakpoints && e.setBreakpoint(), [...e.el.querySelectorAll('[loading="lazy"]')].forEach((l) => {
2223
- l.complete && ne(e, l);
2224
- }), e.updateSize(), e.updateSlides(), e.updateProgress(), e.updateSlidesClasses();
2225
- function n() {
2226
- const l = e.rtlTranslate ? e.translate * -1 : e.translate, a = Math.min(Math.max(l, e.maxTranslate()), e.minTranslate());
2227
- e.setTranslate(a), e.updateActiveIndex(), e.updateSlidesClasses();
2228
- }
2229
- let i;
2230
- if (r.freeMode && r.freeMode.enabled && !r.cssMode)
2231
- n(), r.autoHeight && e.updateAutoHeight();
2232
- else {
2233
- if ((r.slidesPerView === "auto" || r.slidesPerView > 1) && e.isEnd && !r.centeredSlides) {
2234
- const l = e.virtual && r.virtual.enabled ? e.virtual.slides : e.slides;
2235
- i = e.slideTo(l.length - 1, 0, !1, !0);
2236
- } else
2237
- i = e.slideTo(e.activeIndex, 0, !1, !0);
2238
- i || n();
2239
- }
2240
- r.watchOverflow && s !== e.snapGrid && e.checkOverflow(), e.emit("update");
2241
- }
2242
- changeDirection(e, s) {
2243
- s === void 0 && (s = !0);
2244
- const r = this, n = r.params.direction;
2245
- return e || (e = n === "horizontal" ? "vertical" : "horizontal"), e === n || e !== "horizontal" && e !== "vertical" || (r.el.classList.remove(`${r.params.containerModifierClass}${n}`), r.el.classList.add(`${r.params.containerModifierClass}${e}`), r.emitContainerClasses(), r.params.direction = e, r.slides.forEach((i) => {
2246
- e === "vertical" ? i.style.width = "" : i.style.height = "";
2247
- }), r.emit("changeDirection"), s && r.update()), r;
2248
- }
2249
- changeLanguageDirection(e) {
2250
- const s = this;
2251
- s.rtl && e === "rtl" || !s.rtl && e === "ltr" || (s.rtl = e === "rtl", s.rtlTranslate = s.params.direction === "horizontal" && s.rtl, s.rtl ? (s.el.classList.add(`${s.params.containerModifierClass}rtl`), s.el.dir = "rtl") : (s.el.classList.remove(`${s.params.containerModifierClass}rtl`), s.el.dir = "ltr"), s.update());
2252
- }
2253
- mount(e) {
2254
- const s = this;
2255
- if (s.mounted) return !0;
2256
- let r = e || s.params.el;
2257
- if (typeof r == "string" && (r = document.querySelector(r)), !r)
2258
- return !1;
2259
- r.swiper = s, r.parentNode && r.parentNode.host && r.parentNode.host.nodeName === s.params.swiperElementNodeName.toUpperCase() && (s.isElement = !0);
2260
- const n = () => `.${(s.params.wrapperClass || "").trim().split(" ").join(".")}`;
2261
- let i = r && r.shadowRoot && r.shadowRoot.querySelector ? r.shadowRoot.querySelector(n()) : H(r, n())[0];
2262
- return !i && s.params.createElements && (i = de("div", s.params.wrapperClass), r.append(i), H(r, `.${s.params.slideClass}`).forEach((l) => {
2263
- i.append(l);
2264
- })), Object.assign(s, {
2265
- el: r,
2266
- wrapperEl: i,
2267
- slidesEl: s.isElement && !r.parentNode.host.slideSlots ? r.parentNode.host : i,
2268
- hostEl: s.isElement ? r.parentNode.host : r,
2269
- mounted: !0,
2270
- // RTL
2271
- rtl: r.dir.toLowerCase() === "rtl" || X(r, "direction") === "rtl",
2272
- rtlTranslate: s.params.direction === "horizontal" && (r.dir.toLowerCase() === "rtl" || X(r, "direction") === "rtl"),
2273
- wrongRTL: X(i, "display") === "-webkit-box"
2274
- }), !0;
2275
- }
2276
- init(e) {
2277
- const s = this;
2278
- if (s.initialized || s.mount(e) === !1) return s;
2279
- s.emit("beforeInit"), s.params.breakpoints && s.setBreakpoint(), s.addClasses(), s.updateSize(), s.updateSlides(), s.params.watchOverflow && s.checkOverflow(), s.params.grabCursor && s.enabled && s.setGrabCursor(), s.params.loop && s.virtual && s.params.virtual.enabled ? s.slideTo(s.params.initialSlide + s.virtual.slidesBefore, 0, s.params.runCallbacksOnInit, !1, !0) : s.slideTo(s.params.initialSlide, 0, s.params.runCallbacksOnInit, !1, !0), s.params.loop && s.loopCreate(void 0, !0), s.attachEvents();
2280
- const r = [...s.el.querySelectorAll('[loading="lazy"]')];
2281
- return s.isElement && r.push(...s.hostEl.querySelectorAll('[loading="lazy"]')), r.forEach((n) => {
2282
- n.complete ? ne(s, n) : n.addEventListener("load", (i) => {
2283
- ne(s, i.target);
2284
- });
2285
- }), Ce(s), s.initialized = !0, Ce(s), s.emit("init"), s.emit("afterInit"), s;
2286
- }
2287
- destroy(e, s) {
2288
- e === void 0 && (e = !0), s === void 0 && (s = !0);
2289
- const r = this, {
2290
- params: n,
2291
- el: i,
2292
- wrapperEl: l,
2293
- slides: a
2294
- } = r;
2295
- return typeof r.params > "u" || r.destroyed || (r.emit("beforeDestroy"), r.initialized = !1, r.detachEvents(), n.loop && r.loopDestroy(), s && (r.removeClasses(), i && typeof i != "string" && i.removeAttribute("style"), l && l.removeAttribute("style"), a && a.length && a.forEach((o) => {
2296
- o.classList.remove(n.slideVisibleClass, n.slideFullyVisibleClass, n.slideActiveClass, n.slideNextClass, n.slidePrevClass), o.removeAttribute("style"), o.removeAttribute("data-swiper-slide-index");
2297
- })), r.emit("destroy"), Object.keys(r.eventsListeners).forEach((o) => {
2298
- r.off(o);
2299
- }), e !== !1 && (r.el && typeof r.el != "string" && (r.el.swiper = null), kt(r)), r.destroyed = !0), null;
2300
- }
2301
- static extendDefaults(e) {
2302
- N(be, e);
2303
- }
2304
- static get extendedDefaults() {
2305
- return be;
2306
- }
2307
- static get defaults() {
2308
- return Pe;
2309
- }
2310
- static installModule(e) {
2311
- q.prototype.__modules__ || (q.prototype.__modules__ = []);
2312
- const s = q.prototype.__modules__;
2313
- typeof e == "function" && s.indexOf(e) < 0 && s.push(e);
2314
- }
2315
- static use(e) {
2316
- return Array.isArray(e) ? (e.forEach((s) => q.installModule(s)), q) : (q.installModule(e), q);
2317
- }
2318
- };
2319
- Object.keys(ye).forEach((t) => {
2320
- Object.keys(ye[t]).forEach((e) => {
2321
- ze.prototype[e] = ye[t][e];
2322
- });
2323
- });
2324
- ze.use([Dt, Ft]);
2325
- const tt = [
2326
- "eventsPrefix",
2327
- "injectStyles",
2328
- "injectStylesUrls",
2329
- "modules",
2330
- "init",
2331
- "_direction",
2332
- "oneWayMovement",
2333
- "swiperElementNodeName",
2334
- "touchEventsTarget",
2335
- "initialSlide",
2336
- "_speed",
2337
- "cssMode",
2338
- "updateOnWindowResize",
2339
- "resizeObserver",
2340
- "nested",
2341
- "focusableElements",
2342
- "_enabled",
2343
- "_width",
2344
- "_height",
2345
- "preventInteractionOnTransition",
2346
- "userAgent",
2347
- "url",
2348
- "_edgeSwipeDetection",
2349
- "_edgeSwipeThreshold",
2350
- "_freeMode",
2351
- "_autoHeight",
2352
- "setWrapperSize",
2353
- "virtualTranslate",
2354
- "_effect",
2355
- "breakpoints",
2356
- "breakpointsBase",
2357
- "_spaceBetween",
2358
- "_slidesPerView",
2359
- "maxBackfaceHiddenSlides",
2360
- "_grid",
2361
- "_slidesPerGroup",
2362
- "_slidesPerGroupSkip",
2363
- "_slidesPerGroupAuto",
2364
- "_centeredSlides",
2365
- "_centeredSlidesBounds",
2366
- "_slidesOffsetBefore",
2367
- "_slidesOffsetAfter",
2368
- "normalizeSlideIndex",
2369
- "_centerInsufficientSlides",
2370
- "_watchOverflow",
2371
- "roundLengths",
2372
- "touchRatio",
2373
- "touchAngle",
2374
- "simulateTouch",
2375
- "_shortSwipes",
2376
- "_longSwipes",
2377
- "longSwipesRatio",
2378
- "longSwipesMs",
2379
- "_followFinger",
2380
- "allowTouchMove",
2381
- "_threshold",
2382
- "touchMoveStopPropagation",
2383
- "touchStartPreventDefault",
2384
- "touchStartForcePreventDefault",
2385
- "touchReleaseOnEdges",
2386
- "uniqueNavElements",
2387
- "_resistance",
2388
- "_resistanceRatio",
2389
- "_watchSlidesProgress",
2390
- "_grabCursor",
2391
- "preventClicks",
2392
- "preventClicksPropagation",
2393
- "_slideToClickedSlide",
2394
- "_loop",
2395
- "loopAdditionalSlides",
2396
- "loopAddBlankSlides",
2397
- "loopPreventsSliding",
2398
- "_rewind",
2399
- "_allowSlidePrev",
2400
- "_allowSlideNext",
2401
- "_swipeHandler",
2402
- "_noSwiping",
2403
- "noSwipingClass",
2404
- "noSwipingSelector",
2405
- "passiveListeners",
2406
- "containerModifierClass",
2407
- "slideClass",
2408
- "slideActiveClass",
2409
- "slideVisibleClass",
2410
- "slideFullyVisibleClass",
2411
- "slideNextClass",
2412
- "slidePrevClass",
2413
- "slideBlankClass",
2414
- "wrapperClass",
2415
- "lazyPreloaderClass",
2416
- "lazyPreloadPrevNext",
2417
- "runCallbacksOnInit",
2418
- "observer",
2419
- "observeParents",
2420
- "observeSlideChildren",
2421
- // modules
2422
- "a11y",
2423
- "_autoplay",
2424
- "_controller",
2425
- "coverflowEffect",
2426
- "cubeEffect",
2427
- "fadeEffect",
2428
- "flipEffect",
2429
- "creativeEffect",
2430
- "cardsEffect",
2431
- "hashNavigation",
2432
- "history",
2433
- "keyboard",
2434
- "mousewheel",
2435
- "_navigation",
2436
- "_pagination",
2437
- "parallax",
2438
- "_scrollbar",
2439
- "_thumbs",
2440
- "virtual",
2441
- "zoom",
2442
- "control"
2443
- ];
2444
- function Q(t) {
2445
- return typeof t == "object" && t !== null && t.constructor && Object.prototype.toString.call(t).slice(8, -1) === "Object" && !t.__swiper__;
2446
- }
2447
- function J(t, e) {
2448
- const s = ["__proto__", "constructor", "prototype"];
2449
- Object.keys(e).filter((r) => s.indexOf(r) < 0).forEach((r) => {
2450
- typeof t[r] > "u" ? t[r] = e[r] : Q(e[r]) && Q(t[r]) && Object.keys(e[r]).length > 0 ? e[r].__swiper__ ? t[r] = e[r] : J(t[r], e[r]) : t[r] = e[r];
2451
- });
2452
- }
2453
- function st(t) {
2454
- return t === void 0 && (t = {}), t.navigation && typeof t.navigation.nextEl > "u" && typeof t.navigation.prevEl > "u";
2455
- }
2456
- function rt(t) {
2457
- return t === void 0 && (t = {}), t.pagination && typeof t.pagination.el > "u";
2458
- }
2459
- function it(t) {
2460
- return t === void 0 && (t = {}), t.scrollbar && typeof t.scrollbar.el > "u";
2461
- }
2462
- function nt(t) {
2463
- t === void 0 && (t = "");
2464
- const e = t.split(" ").map((r) => r.trim()).filter((r) => !!r), s = [];
2465
- return e.forEach((r) => {
2466
- s.indexOf(r) < 0 && s.push(r);
2467
- }), s.join(" ");
2468
- }
2469
- function qs(t) {
2470
- return t === void 0 && (t = ""), t ? t.includes("swiper-wrapper") ? t : `swiper-wrapper ${t}` : "swiper-wrapper";
2471
- }
2472
- function Ws(t) {
2473
- let {
2474
- swiper: e,
2475
- slides: s,
2476
- passedParams: r,
2477
- changedParams: n,
2478
- nextEl: i,
2479
- prevEl: l,
2480
- scrollbarEl: a,
2481
- paginationEl: o
2482
- } = t;
2483
- const c = n.filter((b) => b !== "children" && b !== "direction" && b !== "wrapperClass"), {
2484
- params: d,
2485
- pagination: p,
2486
- navigation: h,
2487
- scrollbar: g,
2488
- virtual: m,
2489
- thumbs: T
2490
- } = e;
2491
- let M, w, u, f, v, y, C, A;
2492
- n.includes("thumbs") && r.thumbs && r.thumbs.swiper && !r.thumbs.swiper.destroyed && d.thumbs && (!d.thumbs.swiper || d.thumbs.swiper.destroyed) && (M = !0), n.includes("controller") && r.controller && r.controller.control && d.controller && !d.controller.control && (w = !0), n.includes("pagination") && r.pagination && (r.pagination.el || o) && (d.pagination || d.pagination === !1) && p && !p.el && (u = !0), n.includes("scrollbar") && r.scrollbar && (r.scrollbar.el || a) && (d.scrollbar || d.scrollbar === !1) && g && !g.el && (f = !0), n.includes("navigation") && r.navigation && (r.navigation.prevEl || l) && (r.navigation.nextEl || i) && (d.navigation || d.navigation === !1) && h && !h.prevEl && !h.nextEl && (v = !0);
2493
- const I = (b) => {
2494
- e[b] && (e[b].destroy(), b === "navigation" ? (e.isElement && (e[b].prevEl.remove(), e[b].nextEl.remove()), d[b].prevEl = void 0, d[b].nextEl = void 0, e[b].prevEl = void 0, e[b].nextEl = void 0) : (e.isElement && e[b].el.remove(), d[b].el = void 0, e[b].el = void 0));
2495
- };
2496
- n.includes("loop") && e.isElement && (d.loop && !r.loop ? y = !0 : !d.loop && r.loop ? C = !0 : A = !0), c.forEach((b) => {
2497
- if (Q(d[b]) && Q(r[b]))
2498
- Object.assign(d[b], r[b]), (b === "navigation" || b === "pagination" || b === "scrollbar") && "enabled" in r[b] && !r[b].enabled && I(b);
2499
- else {
2500
- const S = r[b];
2501
- (S === !0 || S === !1) && (b === "navigation" || b === "pagination" || b === "scrollbar") ? S === !1 && I(b) : d[b] = r[b];
2502
- }
2503
- }), c.includes("controller") && !w && e.controller && e.controller.control && d.controller && d.controller.control && (e.controller.control = d.controller.control), n.includes("children") && s && m && d.virtual.enabled ? (m.slides = s, m.update(!0)) : n.includes("virtual") && m && d.virtual.enabled && (s && (m.slides = s), m.update(!0)), n.includes("children") && s && d.loop && (A = !0), M && T.init() && T.update(!0), w && (e.controller.control = d.controller.control), u && (e.isElement && (!o || typeof o == "string") && (o = document.createElement("div"), o.classList.add("swiper-pagination"), o.part.add("pagination"), e.el.appendChild(o)), o && (d.pagination.el = o), p.init(), p.render(), p.update()), f && (e.isElement && (!a || typeof a == "string") && (a = document.createElement("div"), a.classList.add("swiper-scrollbar"), a.part.add("scrollbar"), e.el.appendChild(a)), a && (d.scrollbar.el = a), g.init(), g.updateSize(), g.setTranslate()), v && (e.isElement && ((!i || typeof i == "string") && (i = document.createElement("div"), i.classList.add("swiper-button-next"), i.innerHTML = e.hostEl.constructor.nextButtonSvg, i.part.add("button-next"), e.el.appendChild(i)), (!l || typeof l == "string") && (l = document.createElement("div"), l.classList.add("swiper-button-prev"), l.innerHTML = e.hostEl.constructor.prevButtonSvg, l.part.add("button-prev"), e.el.appendChild(l))), i && (d.navigation.nextEl = i), l && (d.navigation.prevEl = l), h.init(), h.update()), n.includes("allowSlideNext") && (e.allowSlideNext = r.allowSlideNext), n.includes("allowSlidePrev") && (e.allowSlidePrev = r.allowSlidePrev), n.includes("direction") && e.changeDirection(r.direction, !1), (y || A) && e.loopDestroy(), (C || A) && e.loopCreate(), e.update();
2504
- }
2505
- function Ys(t, e) {
2506
- t === void 0 && (t = {}), e === void 0 && (e = !0);
2507
- const s = {
2508
- on: {}
2509
- }, r = {}, n = {};
2510
- J(s, Pe), s._emitClasses = !0, s.init = !1;
2511
- const i = {}, l = tt.map((o) => o.replace(/_/, "")), a = Object.assign({}, t);
2512
- return Object.keys(a).forEach((o) => {
2513
- typeof t[o] > "u" || (l.indexOf(o) >= 0 ? Q(t[o]) ? (s[o] = {}, n[o] = {}, J(s[o], t[o]), J(n[o], t[o])) : (s[o] = t[o], n[o] = t[o]) : o.search(/on[A-Z]/) === 0 && typeof t[o] == "function" ? e ? r[`${o[2].toLowerCase()}${o.substr(3)}`] = t[o] : s.on[`${o[2].toLowerCase()}${o.substr(3)}`] = t[o] : i[o] = t[o]);
2514
- }), ["navigation", "pagination", "scrollbar"].forEach((o) => {
2515
- s[o] === !0 && (s[o] = {}), s[o] === !1 && delete s[o];
2516
- }), {
2517
- params: s,
2518
- passedParams: n,
2519
- rest: i,
2520
- events: r
2521
- };
2522
- }
2523
- function Xs(t, e) {
2524
- let {
2525
- el: s,
2526
- nextEl: r,
2527
- prevEl: n,
2528
- paginationEl: i,
2529
- scrollbarEl: l,
2530
- swiper: a
2531
- } = t;
2532
- st(e) && r && n && (a.params.navigation.nextEl = r, a.originalParams.navigation.nextEl = r, a.params.navigation.prevEl = n, a.originalParams.navigation.prevEl = n), rt(e) && i && (a.params.pagination.el = i, a.originalParams.pagination.el = i), it(e) && l && (a.params.scrollbar.el = l, a.originalParams.scrollbar.el = l), a.init(s);
2533
- }
2534
- function Us(t, e, s, r, n) {
2535
- const i = [];
2536
- if (!e) return i;
2537
- const l = (a) => {
2538
- i.indexOf(a) < 0 && i.push(a);
2539
- };
2540
- if (s && r) {
2541
- const a = r.map(n), o = s.map(n);
2542
- a.join("") !== o.join("") && l("children"), r.length !== s.length && l("children");
2543
- }
2544
- return tt.filter((a) => a[0] === "_").map((a) => a.replace(/_/, "")).forEach((a) => {
2545
- if (a in t && a in e)
2546
- if (Q(t[a]) && Q(e[a])) {
2547
- const o = Object.keys(t[a]), c = Object.keys(e[a]);
2548
- o.length !== c.length ? l(a) : (o.forEach((d) => {
2549
- t[a][d] !== e[a][d] && l(a);
2550
- }), c.forEach((d) => {
2551
- t[a][d] !== e[a][d] && l(a);
2552
- }));
2553
- } else t[a] !== e[a] && l(a);
2554
- }), i;
2555
- }
2556
- const Qs = (t) => {
2557
- !t || t.destroyed || !t.params.virtual || t.params.virtual && !t.params.virtual.enabled || (t.updateSlides(), t.updateProgress(), t.updateSlidesClasses(), t.parallax && t.params.parallax && t.params.parallax.enabled && t.parallax.setTranslate());
2558
- };
2559
- function ue() {
2560
- return ue = Object.assign ? Object.assign.bind() : function(t) {
2561
- for (var e = 1; e < arguments.length; e++) {
2562
- var s = arguments[e];
2563
- for (var r in s)
2564
- Object.prototype.hasOwnProperty.call(s, r) && (t[r] = s[r]);
2565
- }
2566
- return t;
2567
- }, ue.apply(this, arguments);
2568
- }
2569
- function at(t) {
2570
- return t.type && t.type.displayName && t.type.displayName.includes("SwiperSlide");
2571
- }
2572
- function lt(t) {
2573
- const e = [];
2574
- return $.Children.toArray(t).forEach((s) => {
2575
- at(s) ? e.push(s) : s.props && s.props.children && lt(s.props.children).forEach((r) => e.push(r));
2576
- }), e;
2577
- }
2578
- function Ks(t) {
2579
- const e = [], s = {
2580
- "container-start": [],
2581
- "container-end": [],
2582
- "wrapper-start": [],
2583
- "wrapper-end": []
2584
- };
2585
- return $.Children.toArray(t).forEach((r) => {
2586
- if (at(r))
2587
- e.push(r);
2588
- else if (r.props && r.props.slot && s[r.props.slot])
2589
- s[r.props.slot].push(r);
2590
- else if (r.props && r.props.children) {
2591
- const n = lt(r.props.children);
2592
- n.length > 0 ? n.forEach((i) => e.push(i)) : s["container-end"].push(r);
2593
- } else
2594
- s["container-end"].push(r);
2595
- }), {
2596
- slides: e,
2597
- slots: s
2598
- };
2599
- }
2600
- function Js(t, e, s) {
2601
- if (!s) return null;
2602
- const r = (d) => {
2603
- let p = d;
2604
- return d < 0 ? p = e.length + d : p >= e.length && (p = p - e.length), p;
2605
- }, n = t.isHorizontal() ? {
2606
- [t.rtlTranslate ? "right" : "left"]: `${s.offset}px`
2607
- } : {
2608
- top: `${s.offset}px`
2609
- }, {
2610
- from: i,
2611
- to: l
2612
- } = s, a = t.params.loop ? -e.length : 0, o = t.params.loop ? e.length * 2 : e.length, c = [];
2613
- for (let d = a; d < o; d += 1)
2614
- d >= i && d <= l && c.push(e[r(d)]);
2615
- return c.map((d, p) => /* @__PURE__ */ $.cloneElement(d, {
2616
- swiper: t,
2617
- style: n,
2618
- key: d.props.virtualIndex || d.key || `slide-${p}`
2619
- }));
2620
- }
2621
- function ee(t, e) {
2622
- return typeof window > "u" ? Y(t, e) : vt(t, e);
2623
- }
2624
- const De = /* @__PURE__ */ He(null), Zs = /* @__PURE__ */ He(null), ot = /* @__PURE__ */ Ae(function(t, e) {
2625
- let {
2626
- className: s,
2627
- tag: r = "div",
2628
- wrapperTag: n = "div",
2629
- children: i,
2630
- onSwiper: l,
2631
- ...a
2632
- } = t === void 0 ? {} : t, o = !1;
2633
- const [c, d] = W("swiper"), [p, h] = W(null), [g, m] = W(!1), T = D(!1), M = D(null), w = D(null), u = D(null), f = D(null), v = D(null), y = D(null), C = D(null), A = D(null), {
2634
- params: I,
2635
- passedParams: b,
2636
- rest: S,
2637
- events: E
2638
- } = Ys(a), {
2639
- slides: k,
2640
- slots: L
2641
- } = Ks(i), O = () => {
2642
- m(!g);
2643
- };
2644
- Object.assign(I.on, {
2645
- _containerClasses(G, j) {
2646
- d(j);
2647
- }
2648
- });
2649
- const x = () => {
2650
- Object.assign(I.on, E), o = !0;
2651
- const G = {
2652
- ...I
2653
- };
2654
- if (delete G.wrapperClass, w.current = new ze(G), w.current.virtual && w.current.params.virtual.enabled) {
2655
- w.current.virtual.slides = k;
2656
- const j = {
2657
- cache: !1,
2658
- slides: k,
2659
- renderExternal: h,
2660
- renderExternalUpdate: !1
2661
- };
2662
- J(w.current.params.virtual, j), J(w.current.originalParams.virtual, j);
2663
- }
2664
- };
2665
- M.current || x(), w.current && w.current.on("_beforeBreakpoint", O);
2666
- const z = () => {
2667
- o || !E || !w.current || Object.keys(E).forEach((G) => {
2668
- w.current.on(G, E[G]);
2669
- });
2670
- }, U = () => {
2671
- !E || !w.current || Object.keys(E).forEach((G) => {
2672
- w.current.off(G, E[G]);
2673
- });
2674
- };
2675
- Y(() => () => {
2676
- w.current && w.current.off("_beforeBreakpoint", O);
2677
- }), Y(() => {
2678
- !T.current && w.current && (w.current.emitSlidesClasses(), T.current = !0);
2679
- }), ee(() => {
2680
- if (e && (e.current = M.current), !!M.current)
2681
- return w.current.destroyed && x(), Xs({
2682
- el: M.current,
2683
- nextEl: v.current,
2684
- prevEl: y.current,
2685
- paginationEl: C.current,
2686
- scrollbarEl: A.current,
2687
- swiper: w.current
2688
- }, I), l && !w.current.destroyed && l(w.current), () => {
2689
- w.current && !w.current.destroyed && w.current.destroy(!0, !1);
2690
- };
2691
- }, []), ee(() => {
2692
- z();
2693
- const G = Us(b, u.current, k, f.current, (j) => j.key);
2694
- return u.current = b, f.current = k, G.length && w.current && !w.current.destroyed && Ws({
2695
- swiper: w.current,
2696
- slides: k,
2697
- passedParams: b,
2698
- changedParams: G,
2699
- nextEl: v.current,
2700
- prevEl: y.current,
2701
- scrollbarEl: A.current,
2702
- paginationEl: C.current
2703
- }), () => {
2704
- U();
2705
- };
2706
- }), ee(() => {
2707
- Qs(w.current);
2708
- }, [p]);
2709
- function V() {
2710
- return I.virtual ? Js(w.current, k, p) : k.map((G, j) => /* @__PURE__ */ $.cloneElement(G, {
2711
- swiper: w.current,
2712
- swiperSlideIndex: j
2713
- }));
2714
- }
2715
- return /* @__PURE__ */ $.createElement(r, ue({
2716
- ref: M,
2717
- className: nt(`${c}${s ? ` ${s}` : ""}`)
2718
- }, S), /* @__PURE__ */ $.createElement(Zs.Provider, {
2719
- value: w.current
2720
- }, L["container-start"], /* @__PURE__ */ $.createElement(n, {
2721
- className: qs(I.wrapperClass)
2722
- }, L["wrapper-start"], V(), L["wrapper-end"]), st(I) && /* @__PURE__ */ $.createElement($.Fragment, null, /* @__PURE__ */ $.createElement("div", {
2723
- ref: y,
2724
- className: "swiper-button-prev"
2725
- }), /* @__PURE__ */ $.createElement("div", {
2726
- ref: v,
2727
- className: "swiper-button-next"
2728
- })), it(I) && /* @__PURE__ */ $.createElement("div", {
2729
- ref: A,
2730
- className: "swiper-scrollbar"
2731
- }), rt(I) && /* @__PURE__ */ $.createElement("div", {
2732
- ref: C,
2733
- className: "swiper-pagination"
2734
- }), L["container-end"]));
2735
- });
2736
- ot.displayName = "Swiper";
2737
- const ae = /* @__PURE__ */ Ae(function(t, e) {
2738
- let {
2739
- tag: s = "div",
2740
- children: r,
2741
- className: n = "",
2742
- swiper: i,
2743
- zoom: l,
2744
- lazy: a,
2745
- virtualIndex: o,
2746
- swiperSlideIndex: c,
2747
- ...d
2748
- } = t === void 0 ? {} : t;
2749
- const p = D(null), [h, g] = W("swiper-slide"), [m, T] = W(!1);
2750
- function M(v, y, C) {
2751
- y === p.current && g(C);
2752
- }
2753
- ee(() => {
2754
- if (typeof c < "u" && (p.current.swiperSlideIndex = c), e && (e.current = p.current), !(!p.current || !i)) {
2755
- if (i.destroyed) {
2756
- h !== "swiper-slide" && g("swiper-slide");
2757
- return;
2758
- }
2759
- return i.on("_slideClass", M), () => {
2760
- i && i.off("_slideClass", M);
2761
- };
2762
- }
2763
- }), ee(() => {
2764
- i && p.current && !i.destroyed && g(i.getSlideClasses(p.current));
2765
- }, [i]);
2766
- const w = {
2767
- isActive: h.indexOf("swiper-slide-active") >= 0,
2768
- isVisible: h.indexOf("swiper-slide-visible") >= 0,
2769
- isPrev: h.indexOf("swiper-slide-prev") >= 0,
2770
- isNext: h.indexOf("swiper-slide-next") >= 0
2771
- }, u = () => typeof r == "function" ? r(w) : r, f = () => {
2772
- T(!0);
2773
- };
2774
- return /* @__PURE__ */ $.createElement(s, ue({
2775
- ref: p,
2776
- className: nt(`${h}${n ? ` ${n}` : ""}`),
2777
- "data-swiper-slide-index": o,
2778
- onLoad: f
2779
- }, d), l && /* @__PURE__ */ $.createElement(De.Provider, {
2780
- value: w
2781
- }, /* @__PURE__ */ $.createElement("div", {
2782
- className: "swiper-zoom-container",
2783
- "data-swiper-zoom": typeof l == "number" ? l : void 0
2784
- }, u(), a && !m && /* @__PURE__ */ $.createElement("div", {
2785
- className: "swiper-lazy-preloader"
2786
- }))), !l && /* @__PURE__ */ $.createElement(De.Provider, {
2787
- value: w
2788
- }, u(), a && !m && /* @__PURE__ */ $.createElement("div", {
2789
- className: "swiper-lazy-preloader"
2790
- })));
2791
- });
2792
- ae.displayName = "SwiperSlide";
2793
- const er = () => ot, tr = /* @__PURE__ */ _(er())({
2794
- name: "Carousel",
2795
- class: "c1f9jjsn",
2796
- propsAsIs: !0
2797
- }), Me = /* @__PURE__ */ _("div")({
2798
- name: "ScreenWrap",
2799
- class: "s25r51y",
2800
- propsAsIs: !1
2801
- }), sr = () => te, rr = /* @__PURE__ */ _(sr())({
2802
- name: "SponsorIconI",
2803
- class: "s1lvrmx8",
2804
- propsAsIs: !0
2805
- }), dt = ({
2806
- style: t,
2807
- className: e
2808
- }) => /* @__PURE__ */ P(rr, {
2809
- className: e,
2810
- style: t,
2811
- name: "icon-masters-logo"
2812
- }), ct = /* @__PURE__ */ _("div")({
2813
- name: "ScreenTextBlock",
2814
- class: "s11xps29",
2815
- propsAsIs: !1
2816
- }), ut = /* @__PURE__ */ _("div")({
2817
- name: "ScreenTitle",
2818
- class: "s14qstuv",
2819
- propsAsIs: !1
2820
- }), ke = /* @__PURE__ */ _("div")({
2821
- name: "ScreenDescription",
2822
- class: "s14mdh2e",
2823
- propsAsIs: !1
2824
- }), pe = /* @__PURE__ */ _("button")({
2825
- name: "ScreenButton",
2826
- class: "sqtjig9",
2827
- propsAsIs: !1
2828
- }), ir = /* @__PURE__ */ _("div")({
2829
- name: "EmergencyContainer",
2830
- class: "e1f9mu2m",
2831
- propsAsIs: !1
2832
- }), nr = /* @__PURE__ */ _("div")({
2833
- name: "EmergencyScreenTitle",
2834
- class: "e1n10yo1",
2835
- propsAsIs: !1
2836
- }), ar = /* @__PURE__ */ _("div")({
2837
- name: "EmergencyScreenDescription",
2838
- class: "e1xecypc",
2839
- propsAsIs: !1
2840
- }), lr = () => pe, or = /* @__PURE__ */ _(lr())({
2841
- name: "EmergencyScreenButton",
2842
- class: "e1k6zoyu",
2843
- propsAsIs: !0
2844
- }), Ie = ({ actionFn: t, description: e, className: s, onEvent: r }) => (Y(() => {
2845
- r({ type: "slBetPackReady" });
2846
- }, [r]), /* @__PURE__ */ F(ir, { className: s, children: [
2847
- /* @__PURE__ */ P(nr, { children: "Something went wrong." }),
2848
- /* @__PURE__ */ P(ar, { children: e }),
2849
- /* @__PURE__ */ P(or, { onClick: t, children: "Try again" })
2850
- ] })), dr = /* @__PURE__ */ _("div")({
2851
- name: "ScreenContainerBox",
2852
- class: "s28ooi9",
2853
- propsAsIs: !1
2854
- }), fe = ({ children: t }) => /* @__PURE__ */ P(dr, { className: "ScreenContainer", children: /* @__PURE__ */ P("div", { children: t }) }), cr = /* @__PURE__ */ _("img")({
2855
- name: "EndScreenMedia",
2856
- class: "e8s3kc9",
2857
- propsAsIs: !1
2858
- }), ur = () => dt, pr = /* @__PURE__ */ _(ur())({
2859
- name: "EndScreenSponsorIcon",
2860
- class: "e1uswib2",
2861
- propsAsIs: !0
2862
- }), fr = ({ onEvent: t }) => {
2863
- const [e, s] = W(
2864
- 0
2865
- /* FIRST */
2866
- );
2867
- return e === 0 ? /* @__PURE__ */ P(fe, { children: /* @__PURE__ */ F(Me, { children: [
2868
- /* @__PURE__ */ P(pr, {}),
2869
- /* @__PURE__ */ F(ct, { children: [
2870
- /* @__PURE__ */ P(ut, { children: "Great picks!" }),
2871
- /* @__PURE__ */ P(ke, { children: "Stay in the Enhanced Stream for live results, predictions, trivia, polls, and match insights." })
2872
- ] }),
2873
- /* @__PURE__ */ P(
2874
- pe,
2875
- {
2876
- "data-a": "intr",
2877
- onClick: () => {
2878
- s(
2879
- 1
2880
- /* LAST */
2881
- );
2882
- },
2883
- style: { marginTop: "auto " },
2884
- children: "Continue"
2885
- }
2886
- )
2887
- ] }) }, "end") : /* @__PURE__ */ P(fe, { children: /* @__PURE__ */ F(Me, { children: [
2888
- /* @__PURE__ */ P(cr, { src: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/bet_pack_end_screen.png" }),
2889
- /* @__PURE__ */ P(ke, { children: "Look for more live match insights, predictions and more." }),
2890
- /* @__PURE__ */ P(pe, { "data-a": "intr", onClick: () => t({ type: "slOpenGameCenter" }), children: "Open Game Center" })
2891
- ] }) }, "end");
2892
- }, mr = /* @__PURE__ */ _("div")({
2893
- name: "Container",
2894
- class: "cv31tt7",
2895
- propsAsIs: !1
2896
- }), Le = ({
2897
- className: t
2898
- }) => /* @__PURE__ */ P(mr, {
2899
- className: t,
2900
- children: /* @__PURE__ */ P(bt, {})
2901
- }), hr = ({ question: t, vote: e }) => t ? /* @__PURE__ */ P(St, { close: () => {
2902
- }, openedQuestion: t, vote: e, isLoading: !1, isEarlyPrediction: !0 }) : null, gr = /* @__PURE__ */ _("span")({
2903
- name: "NextButton",
2904
- class: "n991vvm",
2905
- propsAsIs: !1
2906
- }), vr = () => te, wr = /* @__PURE__ */ _(vr())({
2907
- name: "IconArrowRight",
2908
- class: "inbj36g",
2909
- propsAsIs: !0
2910
- }), yr = /* @__PURE__ */ _("div")({
2911
- name: "StartScreenSponsor",
2912
- class: "szrvgt",
2913
- propsAsIs: !1
2914
- }), br = /* @__PURE__ */ _("div")({
2915
- name: "StartScreenNote",
2916
- class: "swqs2ju",
2917
- propsAsIs: !1
2918
- }), Sr = ({ countQuestionsAvailable: t, sliderRef: e }) => /* @__PURE__ */ P(fe, { children: /* @__PURE__ */ F(Me, { children: [
2919
- /* @__PURE__ */ P(dt, {}),
2920
- /* @__PURE__ */ F(ct, { children: [
2921
- /* @__PURE__ */ P(yr, { children: "FEATURED GROUPS+" }),
2922
- /* @__PURE__ */ P(ut, { children: "The First Five" })
2923
- ] }),
2924
- /* @__PURE__ */ P(ke, { children: "Tee off with these five initial predictions for today’s play." }),
2925
- /* @__PURE__ */ F(
2926
- pe,
2927
- {
2928
- "data-a": "intr",
2929
- onClick: () => {
2930
- e.current?.slideNext();
2931
- },
2932
- children: [
2933
- t ? `${t} questions available` : "See all questions",
2934
- /* @__PURE__ */ P(gr, { children: /* @__PURE__ */ P(wr, { name: "iconArrowRight" }) })
2935
- ]
2936
- }
2937
- ),
2938
- /* @__PURE__ */ P(br, { children: "Note: Some questions may have been resolved as a result of today’s play." })
2939
- ] }) }, "start");
2940
- function Er(t, e, s, r) {
2941
- return t.params.createElements && Object.keys(r).forEach((n) => {
2942
- if (!s[n] && s.auto === !0) {
2943
- let i = H(t.el, `.${r[n]}`)[0];
2944
- i || (i = de("div", r[n]), i.className = r[n], t.el.append(i)), s[n] = i, e[n] = i;
2945
- }
2946
- }), s;
2947
- }
2948
- function Z(t) {
2949
- return t === void 0 && (t = ""), `.${t.trim().replace(/([\.:!+\/])/g, "\\$1").replace(/ /g, ".")}`;
2950
- }
2951
- function Tr(t) {
2952
- let {
2953
- swiper: e,
2954
- extendParams: s,
2955
- on: r,
2956
- emit: n
2957
- } = t;
2958
- const i = "swiper-pagination";
2959
- s({
2960
- pagination: {
2961
- el: null,
2962
- bulletElement: "span",
2963
- clickable: !1,
2964
- hideOnClick: !1,
2965
- renderBullet: null,
2966
- renderProgressbar: null,
2967
- renderFraction: null,
2968
- renderCustom: null,
2969
- progressbarOpposite: !1,
2970
- type: "bullets",
2971
- // 'bullets' or 'progressbar' or 'fraction' or 'custom'
2972
- dynamicBullets: !1,
2973
- dynamicMainBullets: 1,
2974
- formatFractionCurrent: (u) => u,
2975
- formatFractionTotal: (u) => u,
2976
- bulletClass: `${i}-bullet`,
2977
- bulletActiveClass: `${i}-bullet-active`,
2978
- modifierClass: `${i}-`,
2979
- currentClass: `${i}-current`,
2980
- totalClass: `${i}-total`,
2981
- hiddenClass: `${i}-hidden`,
2982
- progressbarFillClass: `${i}-progressbar-fill`,
2983
- progressbarOppositeClass: `${i}-progressbar-opposite`,
2984
- clickableClass: `${i}-clickable`,
2985
- lockClass: `${i}-lock`,
2986
- horizontalClass: `${i}-horizontal`,
2987
- verticalClass: `${i}-vertical`,
2988
- paginationDisabledClass: `${i}-disabled`
2989
- }
2990
- }), e.pagination = {
2991
- el: null,
2992
- bullets: []
2993
- };
2994
- let l, a = 0;
2995
- function o() {
2996
- return !e.params.pagination.el || !e.pagination.el || Array.isArray(e.pagination.el) && e.pagination.el.length === 0;
2997
- }
2998
- function c(u, f) {
2999
- const {
3000
- bulletActiveClass: v
3001
- } = e.params.pagination;
3002
- u && (u = u[`${f === "prev" ? "previous" : "next"}ElementSibling`], u && (u.classList.add(`${v}-${f}`), u = u[`${f === "prev" ? "previous" : "next"}ElementSibling`], u && u.classList.add(`${v}-${f}-${f}`)));
3003
- }
3004
- function d(u, f, v) {
3005
- if (u = u % v, f = f % v, f === u + 1)
3006
- return "next";
3007
- if (f === u - 1)
3008
- return "previous";
3009
- }
3010
- function p(u) {
3011
- const f = u.target.closest(Z(e.params.pagination.bulletClass));
3012
- if (!f)
3013
- return;
3014
- u.preventDefault();
3015
- const v = ce(f) * e.params.slidesPerGroup;
3016
- if (e.params.loop) {
3017
- if (e.realIndex === v) return;
3018
- const y = d(e.realIndex, v, e.slides.length);
3019
- y === "next" ? e.slideNext() : y === "previous" ? e.slidePrev() : e.slideToLoop(v);
3020
- } else
3021
- e.slideTo(v);
3022
- }
3023
- function h() {
3024
- const u = e.rtl, f = e.params.pagination;
3025
- if (o()) return;
3026
- let v = e.pagination.el;
3027
- v = R(v);
3028
- let y, C;
3029
- const A = e.virtual && e.params.virtual.enabled ? e.virtual.slides.length : e.slides.length, I = e.params.loop ? Math.ceil(A / e.params.slidesPerGroup) : e.snapGrid.length;
3030
- if (e.params.loop ? (C = e.previousRealIndex || 0, y = e.params.slidesPerGroup > 1 ? Math.floor(e.realIndex / e.params.slidesPerGroup) : e.realIndex) : typeof e.snapIndex < "u" ? (y = e.snapIndex, C = e.previousSnapIndex) : (C = e.previousIndex || 0, y = e.activeIndex || 0), f.type === "bullets" && e.pagination.bullets && e.pagination.bullets.length > 0) {
3031
- const b = e.pagination.bullets;
3032
- let S, E, k;
3033
- if (f.dynamicBullets && (l = xe(b[0], e.isHorizontal() ? "width" : "height"), v.forEach((L) => {
3034
- L.style[e.isHorizontal() ? "width" : "height"] = `${l * (f.dynamicMainBullets + 4)}px`;
3035
- }), f.dynamicMainBullets > 1 && C !== void 0 && (a += y - (C || 0), a > f.dynamicMainBullets - 1 ? a = f.dynamicMainBullets - 1 : a < 0 && (a = 0)), S = Math.max(y - a, 0), E = S + (Math.min(b.length, f.dynamicMainBullets) - 1), k = (E + S) / 2), b.forEach((L) => {
3036
- const O = [...["", "-next", "-next-next", "-prev", "-prev-prev", "-main"].map((x) => `${f.bulletActiveClass}${x}`)].map((x) => typeof x == "string" && x.includes(" ") ? x.split(" ") : x).flat();
3037
- L.classList.remove(...O);
3038
- }), v.length > 1)
3039
- b.forEach((L) => {
3040
- const O = ce(L);
3041
- O === y ? L.classList.add(...f.bulletActiveClass.split(" ")) : e.isElement && L.setAttribute("part", "bullet"), f.dynamicBullets && (O >= S && O <= E && L.classList.add(...`${f.bulletActiveClass}-main`.split(" ")), O === S && c(L, "prev"), O === E && c(L, "next"));
3042
- });
3043
- else {
3044
- const L = b[y];
3045
- if (L && L.classList.add(...f.bulletActiveClass.split(" ")), e.isElement && b.forEach((O, x) => {
3046
- O.setAttribute("part", x === y ? "bullet-active" : "bullet");
3047
- }), f.dynamicBullets) {
3048
- const O = b[S], x = b[E];
3049
- for (let z = S; z <= E; z += 1)
3050
- b[z] && b[z].classList.add(...`${f.bulletActiveClass}-main`.split(" "));
3051
- c(O, "prev"), c(x, "next");
3052
- }
3053
- }
3054
- if (f.dynamicBullets) {
3055
- const L = Math.min(b.length, f.dynamicMainBullets + 4), O = (l * L - l) / 2 - k * l, x = u ? "right" : "left";
3056
- b.forEach((z) => {
3057
- z.style[e.isHorizontal() ? x : "top"] = `${O}px`;
3058
- });
3059
- }
3060
- }
3061
- v.forEach((b, S) => {
3062
- if (f.type === "fraction" && (b.querySelectorAll(Z(f.currentClass)).forEach((E) => {
3063
- E.textContent = f.formatFractionCurrent(y + 1);
3064
- }), b.querySelectorAll(Z(f.totalClass)).forEach((E) => {
3065
- E.textContent = f.formatFractionTotal(I);
3066
- })), f.type === "progressbar") {
3067
- let E;
3068
- f.progressbarOpposite ? E = e.isHorizontal() ? "vertical" : "horizontal" : E = e.isHorizontal() ? "horizontal" : "vertical";
3069
- const k = (y + 1) / I;
3070
- let L = 1, O = 1;
3071
- E === "horizontal" ? L = k : O = k, b.querySelectorAll(Z(f.progressbarFillClass)).forEach((x) => {
3072
- x.style.transform = `translate3d(0,0,0) scaleX(${L}) scaleY(${O})`, x.style.transitionDuration = `${e.params.speed}ms`;
3073
- });
3074
- }
3075
- f.type === "custom" && f.renderCustom ? (b.innerHTML = f.renderCustom(e, y + 1, I), S === 0 && n("paginationRender", b)) : (S === 0 && n("paginationRender", b), n("paginationUpdate", b)), e.params.watchOverflow && e.enabled && b.classList[e.isLocked ? "add" : "remove"](f.lockClass);
3076
- });
3077
- }
3078
- function g() {
3079
- const u = e.params.pagination;
3080
- if (o()) return;
3081
- const f = e.virtual && e.params.virtual.enabled ? e.virtual.slides.length : e.grid && e.params.grid.rows > 1 ? e.slides.length / Math.ceil(e.params.grid.rows) : e.slides.length;
3082
- let v = e.pagination.el;
3083
- v = R(v);
3084
- let y = "";
3085
- if (u.type === "bullets") {
3086
- let C = e.params.loop ? Math.ceil(f / e.params.slidesPerGroup) : e.snapGrid.length;
3087
- e.params.freeMode && e.params.freeMode.enabled && C > f && (C = f);
3088
- for (let A = 0; A < C; A += 1)
3089
- u.renderBullet ? y += u.renderBullet.call(e, A, u.bulletClass) : y += `<${u.bulletElement} ${e.isElement ? 'part="bullet"' : ""} class="${u.bulletClass}"></${u.bulletElement}>`;
3090
- }
3091
- u.type === "fraction" && (u.renderFraction ? y = u.renderFraction.call(e, u.currentClass, u.totalClass) : y = `<span class="${u.currentClass}"></span> / <span class="${u.totalClass}"></span>`), u.type === "progressbar" && (u.renderProgressbar ? y = u.renderProgressbar.call(e, u.progressbarFillClass) : y = `<span class="${u.progressbarFillClass}"></span>`), e.pagination.bullets = [], v.forEach((C) => {
3092
- u.type !== "custom" && (C.innerHTML = y || ""), u.type === "bullets" && e.pagination.bullets.push(...C.querySelectorAll(Z(u.bulletClass)));
3093
- }), u.type !== "custom" && n("paginationRender", v[0]);
3094
- }
3095
- function m() {
3096
- e.params.pagination = Er(e, e.originalParams.pagination, e.params.pagination, {
3097
- el: "swiper-pagination"
3098
- });
3099
- const u = e.params.pagination;
3100
- if (!u.el) return;
3101
- let f;
3102
- typeof u.el == "string" && e.isElement && (f = e.el.querySelector(u.el)), !f && typeof u.el == "string" && (f = [...document.querySelectorAll(u.el)]), f || (f = u.el), !(!f || f.length === 0) && (e.params.uniqueNavElements && typeof u.el == "string" && Array.isArray(f) && f.length > 1 && (f = [...e.el.querySelectorAll(u.el)], f.length > 1 && (f = f.find((v) => Ue(v, ".swiper")[0] === e.el))), Array.isArray(f) && f.length === 1 && (f = f[0]), Object.assign(e.pagination, {
3103
- el: f
3104
- }), f = R(f), f.forEach((v) => {
3105
- u.type === "bullets" && u.clickable && v.classList.add(...(u.clickableClass || "").split(" ")), v.classList.add(u.modifierClass + u.type), v.classList.add(e.isHorizontal() ? u.horizontalClass : u.verticalClass), u.type === "bullets" && u.dynamicBullets && (v.classList.add(`${u.modifierClass}${u.type}-dynamic`), a = 0, u.dynamicMainBullets < 1 && (u.dynamicMainBullets = 1)), u.type === "progressbar" && u.progressbarOpposite && v.classList.add(u.progressbarOppositeClass), u.clickable && v.addEventListener("click", p), e.enabled || v.classList.add(u.lockClass);
3106
- }));
3107
- }
3108
- function T() {
3109
- const u = e.params.pagination;
3110
- if (o()) return;
3111
- let f = e.pagination.el;
3112
- f && (f = R(f), f.forEach((v) => {
3113
- v.classList.remove(u.hiddenClass), v.classList.remove(u.modifierClass + u.type), v.classList.remove(e.isHorizontal() ? u.horizontalClass : u.verticalClass), u.clickable && (v.classList.remove(...(u.clickableClass || "").split(" ")), v.removeEventListener("click", p));
3114
- })), e.pagination.bullets && e.pagination.bullets.forEach((v) => v.classList.remove(...u.bulletActiveClass.split(" ")));
3115
- }
3116
- r("changeDirection", () => {
3117
- if (!e.pagination || !e.pagination.el) return;
3118
- const u = e.params.pagination;
3119
- let {
3120
- el: f
3121
- } = e.pagination;
3122
- f = R(f), f.forEach((v) => {
3123
- v.classList.remove(u.horizontalClass, u.verticalClass), v.classList.add(e.isHorizontal() ? u.horizontalClass : u.verticalClass);
3124
- });
3125
- }), r("init", () => {
3126
- e.params.pagination.enabled === !1 ? w() : (m(), g(), h());
3127
- }), r("activeIndexChange", () => {
3128
- typeof e.snapIndex > "u" && h();
3129
- }), r("snapIndexChange", () => {
3130
- h();
3131
- }), r("snapGridLengthChange", () => {
3132
- g(), h();
3133
- }), r("destroy", () => {
3134
- T();
3135
- }), r("enable disable", () => {
3136
- let {
3137
- el: u
3138
- } = e.pagination;
3139
- u && (u = R(u), u.forEach((f) => f.classList[e.enabled ? "remove" : "add"](e.params.pagination.lockClass)));
3140
- }), r("lock unlock", () => {
3141
- h();
3142
- }), r("click", (u, f) => {
3143
- const v = f.target, y = R(e.pagination.el);
3144
- if (e.params.pagination.el && e.params.pagination.hideOnClick && y && y.length > 0 && !v.classList.contains(e.params.pagination.bulletClass)) {
3145
- if (e.navigation && (e.navigation.nextEl && v === e.navigation.nextEl || e.navigation.prevEl && v === e.navigation.prevEl)) return;
3146
- const C = y[0].classList.contains(e.params.pagination.hiddenClass);
3147
- n(C === !0 ? "paginationShow" : "paginationHide"), y.forEach((A) => A.classList.toggle(e.params.pagination.hiddenClass));
3148
- }
3149
- });
3150
- const M = () => {
3151
- e.el.classList.remove(e.params.pagination.paginationDisabledClass);
3152
- let {
3153
- el: u
3154
- } = e.pagination;
3155
- u && (u = R(u), u.forEach((f) => f.classList.remove(e.params.pagination.paginationDisabledClass))), m(), g(), h();
3156
- }, w = () => {
3157
- e.el.classList.add(e.params.pagination.paginationDisabledClass);
3158
- let {
3159
- el: u
3160
- } = e.pagination;
3161
- u && (u = R(u), u.forEach((f) => f.classList.add(e.params.pagination.paginationDisabledClass))), T();
3162
- };
3163
- Object.assign(e.pagination, {
3164
- enable: M,
3165
- disable: w,
3166
- render: g,
3167
- update: h,
3168
- init: m,
3169
- destroy: T
3170
- });
3171
- }
3172
- const xr = ({ data: t, gamification: e, onEvent: s, swipeable: r, autoplay: n }) => {
3173
- const i = D(), l = D(), { listOfQuestions: a, countQuestionsAvailable: o } = Re(() => {
3174
- const g = t ? Object.values(t) : [];
3175
- return {
3176
- listOfQuestions: g,
3177
- countQuestionsAvailable: g.filter(({ marketClosed: m }) => !m).length
3178
- };
3179
- }, [t]), c = qe(
3180
- async (g, m) => {
3181
- try {
3182
- await e.betPackVote(g, m), s({
3183
- type: "slVoted",
3184
- payload: {
3185
- questionId: g,
3186
- answerId: m
3187
- }
3188
- });
3189
- } finally {
3190
- i.current && clearTimeout(i.current), n && (i.current = setTimeout(() => {
3191
- l.current?.slideNext();
3192
- }, 2e3));
3193
- }
3194
- },
3195
- [e, s, n]
3196
- );
3197
- Y(() => (s({
3198
- type: "slBetPackReady",
3199
- payload: {
3200
- next: () => l.current?.slideNext(),
3201
- prev: () => l.current?.slidePrev(),
3202
- current: 0,
3203
- canNext: !0,
3204
- canPrev: !1
3205
- }
3206
- }), () => {
3207
- i.current && clearTimeout(i.current);
3208
- }), [s]);
3209
- const d = (g) => {
3210
- const m = g.realIndex;
3211
- if (s({
3212
- type: "slBetPackChangeCard",
3213
- payload: {
3214
- current: m,
3215
- canNext: m < Object.keys(t).length + 1,
3216
- canPrev: m >= 1
3217
- }
3218
- }), m !== 0 && m !== Object.keys(t).length + 1 && a[m - 1]?.id) {
3219
- e.openQuestion(a[m - 1].id, {
3220
- openedFrom: "bet-pack",
3221
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
3222
- // @ts-expect-error
3223
- attributes: {
3224
- id: a[m - 1].id,
3225
- type: a[m - 1].type,
3226
- status: a[m - 1].status,
3227
- attributes: {
3228
- case: void 0
3229
- }
3230
- }
3231
- });
3232
- return;
3233
- }
3234
- e.closeQuestion();
3235
- }, [p, h] = W(1.1);
3236
- return Y(() => {
3237
- const g = yt(() => {
3238
- const m = l.current?.size;
3239
- if (!m)
3240
- return;
3241
- const T = 1 + 30 / (m / 100) / 100 * 2;
3242
- h(Math.ceil(T * 1e3) / 1e3);
3243
- }, 200);
3244
- return window.addEventListener("resize", g), g(), () => {
3245
- window.removeEventListener("resize", g);
3246
- };
3247
- }, []), /* @__PURE__ */ F(
3248
- tr,
3249
- {
3250
- slidesPerView: p,
3251
- spaceBetween: 12,
3252
- centeredSlides: !0,
3253
- centerInsufficientSlides: !0,
3254
- allowTouchMove: r,
3255
- pagination: {
3256
- clickable: !0
3257
- },
3258
- modules: [Tr],
3259
- onSlideChange: d,
3260
- onBeforeSlideChangeStart: () => {
3261
- i.current && clearTimeout(i.current);
3262
- },
3263
- onSwiper: (g) => {
3264
- l.current = g;
3265
- },
3266
- children: [
3267
- /* @__PURE__ */ P(ae, { children: /* @__PURE__ */ P(Sr, { sliderRef: l, countQuestionsAvailable: o }) }),
3268
- a.map((g) => g ? /* @__PURE__ */ P(ae, { children: /* @__PURE__ */ P(fe, { children: /* @__PURE__ */ P(hr, { question: g, vote: c }) }, g.id) }) : null),
3269
- /* @__PURE__ */ P(ae, { children: /* @__PURE__ */ P(fr, { onEvent: s }) })
3270
- ]
3271
- }
3272
- );
3273
- }, Cr = ({ gamification: t, autoplay: e, overlay: s, swipeable: r, onEvent: n }) => {
3274
- const i = Se(t.betPack.getStore()), { error: l, loading: a, data: o } = i;
3275
- return a || !Object.hasOwn(i, "data") ? /* @__PURE__ */ P(Le, {}) : l ? /* @__PURE__ */ P(
3276
- Ie,
3277
- {
3278
- onEvent: n,
3279
- actionFn: () => n({ type: "slHardRefresh" }),
3280
- description: l instanceof Et && l.code !== Tt.InvalidArgument ? `The event ID was not
3281
- specified or is invalid.` : `The server is unable to
3282
- handle this request.`
3283
- }
3284
- ) : !o || !o.timestamp || !o.data || !Object.keys(o.data).length ? /* @__PURE__ */ P(
3285
- Ie,
3286
- {
3287
- onEvent: n,
3288
- actionFn: () => n({ type: "slHardRefresh" }),
3289
- description: `It looks like we couldn't
3290
- load the questions.`
3291
- }
3292
- ) : /* @__PURE__ */ P(
3293
- xr,
3294
- {
3295
- data: o.data,
3296
- gamification: t,
3297
- onEvent: n,
3298
- swipeable: r,
3299
- autoplay: e,
3300
- overlay: s
3301
- }
3302
- );
3303
- }, Pr = /* @__PURE__ */ _("div")({
3304
- name: "BetPackContainer",
3305
- class: "b18vssq2",
3306
- propsAsIs: !1
3307
- }), ie = "slBetPackCb", Mr = xt("betPack-ui"), kr = (t, e = {}) => {
3308
- const { questionId: s, answerId: r } = e, n = { questionId: s, answerId: r };
3309
- Mr.debug({ id: ie, type: t, ...n }), window.top?.postMessage({ id: ie, type: t, ...n }, "*"), window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers[ie] && window.webkit.messageHandlers[ie].postMessage({ type: t, ...n }), window.slBetPackCb?.postMessage && window.slBetPackCb.postMessage(JSON.stringify({ type: t, ...n, from: "base" }));
3310
- }, Ir = (t) => {
3311
- kr(t.type, t.payload);
3312
- }, Lr = /* @__PURE__ */ _("div")({
3313
- name: "Container",
3314
- class: "c1mj28sn",
3315
- propsAsIs: !1
3316
- }), Ar = /* @__PURE__ */ _("button")({
3317
- name: "CloseButton",
3318
- class: "coc9f01",
3319
- propsAsIs: !1
3320
- }), Fe = "b590k5k", Or = () => te, pt = /* @__PURE__ */ _(Or())({
3321
- name: "IconArrowPrev",
3322
- class: "i1tkem14",
3323
- propsAsIs: !0
3324
- }), zr = () => pt, _r = /* @__PURE__ */ _(zr())({
3325
- name: "IconArrowNext",
3326
- class: "i175qlj5",
3327
- propsAsIs: !0
3328
- }), $r = /* @__PURE__ */ _("div")({
3329
- name: "Header",
3330
- class: "h1foi3kz",
3331
- propsAsIs: !1
3332
- }), Gr = /* @__PURE__ */ _("div")({
3333
- name: "HeaderTitle",
3334
- class: "hc2d48a",
3335
- propsAsIs: !1
3336
- }), Br = /* @__PURE__ */ _("div")({
3337
- name: "Main",
3338
- class: "mgfyjlp",
3339
- propsAsIs: !1
3340
- }), Nr = /* @__PURE__ */ _("div")({
3341
- name: "Footer",
3342
- class: "f1vakhu9",
3343
- propsAsIs: !1
3344
- }), Ve = /* @__PURE__ */ _("button")({
3345
- name: "SlideSwitchButton",
3346
- class: "spp13y7",
3347
- propsAsIs: !1
3348
- });
3349
- Ae(({ sdk: t, onEvent: e, close: s }, r) => {
3350
- const [n, i] = W(), [l, a] = W(), o = qe(
3351
- (c) => {
3352
- if (c.type === "slBetPackReady") {
3353
- const { next: d, prev: p, current: h, canNext: g, canPrev: m } = c.payload || {};
3354
- i({ next: d, prev: p }), a((T) => ({
3355
- current: T?.current ? T?.current : h,
3356
- canPrev: T?.current ? T?.canPrev : m,
3357
- canNext: g
3358
- }));
3359
- }
3360
- if (c.type === "slBetPackChangeCard") {
3361
- const { current: d, canNext: p, canPrev: h } = c.payload || {};
3362
- a({ current: d, canNext: p, canPrev: h });
3363
- }
3364
- e?.(c);
3365
- },
3366
- [e]
3367
- );
3368
- return Y(() => () => {
3369
- const c = t.getFeature(We.GAMES);
3370
- c && c.betPack?.off();
3371
- }, [t]), /* @__PURE__ */ F(Lr, { ref: r, children: [
3372
- /* @__PURE__ */ F($r, { children: [
3373
- /* @__PURE__ */ F(Gr, { children: [
3374
- /* @__PURE__ */ P(te, { name: "fgIcon" }),
3375
- "Featured Groups+"
3376
- ] }),
3377
- /* @__PURE__ */ P(Ar, { "data-a": "intr", onClick: s, children: /* @__PURE__ */ P(te, { name: "icon-close-btn-gray" }) })
3378
- ] }),
3379
- /* @__PURE__ */ P(Br, { children: /* @__PURE__ */ P(ft, { sdk: t, onEvent: o, overlay: !0 }) }),
3380
- /* @__PURE__ */ F(Nr, { children: [
3381
- /* @__PURE__ */ P(Ve, { "data-a": "intr", onClick: n?.prev, disabled: !l?.canPrev, children: /* @__PURE__ */ P(pt, { "data-a": "intr", name: "iconArrowPrev", className: Ee(l?.canPrev && Fe) }) }),
3382
- /* @__PURE__ */ P(Ve, { "data-a": "intr", onClick: n?.next, disabled: !l?.canNext, children: /* @__PURE__ */ P(_r, { "data-a": "intr", name: "iconArrowPrev", className: Ee(l?.canNext && Fe) }) })
3383
- ] })
3384
- ] });
3385
- });
3386
- const Dr = ({ user: t, gamification: e, overlay: s, swipeable: r, onEvent: n }) => t.data ? e ? /* @__PURE__ */ P(Cr, { overlay: s, gamification: e, onEvent: n, swipeable: r }) : /* @__PURE__ */ P(Le, {}) : t.error && !t.loading ? /* @__PURE__ */ P(
3387
- Ie,
3388
- {
3389
- onEvent: n,
3390
- actionFn: () => n({ type: "slHardRefresh" }),
3391
- description: `You are not authorized to
3392
- view this resource.`
3393
- }
3394
- ) : /* @__PURE__ */ P(Le, {}), ft = wt(({ sdk: t, swipeable: e = !0, onEvent: s = Ir, overlay: r }) => {
3395
- const n = Se(t.featuresList.getStore()), i = Re(() => t.getFeature(We.GAMES), [n]), l = Se(t.getUserStore());
3396
- return Y(() => (t.writeOverlaySessionId(), () => {
3397
- t.writeOverlaySessionId("");
3398
- }), []), /* @__PURE__ */ P(
3399
- Pr,
3400
- {
3401
- className: Ee("SL-BetPack", r && "SL-BetPack--overlay", !r && "SL-BetPack--standalone"),
3402
- children: /* @__PURE__ */ P(Dr, { overlay: r, user: l, gamification: i, onEvent: s, swipeable: e })
3403
- }
3404
- );
3405
- }), je = (t) => {
3406
- const e = t.target;
3407
- e instanceof Element && e.getAttribute("data-a") === "intr" && gt.emit("interactions", {
3408
- action: "tap",
3409
- payload: {}
3410
- });
3411
- }, Kr = () => {
3412
- const t = Ct();
3413
- return Y(() => (document?.addEventListener("click", je), () => {
3414
- document?.removeEventListener("click", je);
3415
- }), []), t ? /* @__PURE__ */ P(ft, { sdk: t }) : null;
3416
- };
3417
- export {
3418
- Kr as BetPackProvider
3419
- };