@slidejs/runner-swiper 0.1.4 → 0.1.5
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.
- package/.turbo/turbo-build.log +6 -6
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.mjs +342 -358
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/adapter.ts +17 -14
- package/src/index.ts +2 -2
- package/src/runner.ts +7 -27
- package/src/types.ts +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Swiper as
|
|
1
|
+
import { Swiper as F } from "swiper";
|
|
2
2
|
import { parseSlideDSL as U, compile as V } from "@slidejs/dsl";
|
|
3
3
|
import { SlideRunner as K } from "@slidejs/runner";
|
|
4
|
-
function
|
|
5
|
-
return
|
|
4
|
+
function T(n) {
|
|
5
|
+
return n !== null && typeof n == "object" && "constructor" in n && n.constructor === Object;
|
|
6
6
|
}
|
|
7
|
-
function G(
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
Object.keys(e).filter((t) =>
|
|
11
|
-
typeof
|
|
7
|
+
function G(n, e) {
|
|
8
|
+
n === void 0 && (n = {}), e === void 0 && (e = {});
|
|
9
|
+
const s = ["__proto__", "constructor", "prototype"];
|
|
10
|
+
Object.keys(e).filter((t) => s.indexOf(t) < 0).forEach((t) => {
|
|
11
|
+
typeof n[t] > "u" ? n[t] = e[t] : T(e[t]) && T(n[t]) && Object.keys(e[t]).length > 0 && G(n[t], e[t]);
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
|
-
const
|
|
14
|
+
const $ = {
|
|
15
15
|
body: {},
|
|
16
16
|
addEventListener() {
|
|
17
17
|
},
|
|
@@ -67,11 +67,11 @@ const F = {
|
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
69
|
function W() {
|
|
70
|
-
const
|
|
71
|
-
return G(
|
|
70
|
+
const n = typeof document < "u" ? document : {};
|
|
71
|
+
return G(n, $), n;
|
|
72
72
|
}
|
|
73
73
|
const J = {
|
|
74
|
-
document:
|
|
74
|
+
document: $,
|
|
75
75
|
navigator: {
|
|
76
76
|
userAgent: ""
|
|
77
77
|
},
|
|
@@ -121,75 +121,75 @@ const J = {
|
|
|
121
121
|
matchMedia() {
|
|
122
122
|
return {};
|
|
123
123
|
},
|
|
124
|
-
requestAnimationFrame(
|
|
125
|
-
return typeof setTimeout > "u" ? (
|
|
124
|
+
requestAnimationFrame(n) {
|
|
125
|
+
return typeof setTimeout > "u" ? (n(), null) : setTimeout(n, 0);
|
|
126
126
|
},
|
|
127
|
-
cancelAnimationFrame(
|
|
128
|
-
typeof setTimeout > "u" || clearTimeout(
|
|
127
|
+
cancelAnimationFrame(n) {
|
|
128
|
+
typeof setTimeout > "u" || clearTimeout(n);
|
|
129
129
|
}
|
|
130
130
|
};
|
|
131
131
|
function H() {
|
|
132
|
-
const
|
|
133
|
-
return G(
|
|
132
|
+
const n = typeof window < "u" ? window : {};
|
|
133
|
+
return G(n, J), n;
|
|
134
134
|
}
|
|
135
|
-
function X(
|
|
136
|
-
return
|
|
135
|
+
function X(n) {
|
|
136
|
+
return n === void 0 && (n = ""), n.trim().split(" ").filter((e) => !!e.trim());
|
|
137
137
|
}
|
|
138
|
-
function _(
|
|
138
|
+
function _(n, e) {
|
|
139
139
|
e === void 0 && (e = "");
|
|
140
|
-
const
|
|
141
|
-
return
|
|
140
|
+
const s = H(), t = [...n.children];
|
|
141
|
+
return s.HTMLSlotElement && n instanceof HTMLSlotElement && t.push(...n.assignedElements()), e ? t.filter((p) => p.matches(e)) : t;
|
|
142
142
|
}
|
|
143
|
-
function ee(
|
|
143
|
+
function ee(n, e) {
|
|
144
144
|
e === void 0 && (e = []);
|
|
145
|
-
const
|
|
146
|
-
return
|
|
145
|
+
const s = document.createElement(n);
|
|
146
|
+
return s.classList.add(...Array.isArray(e) ? e : X(e)), s;
|
|
147
147
|
}
|
|
148
|
-
function ie(
|
|
149
|
-
const e = H(),
|
|
148
|
+
function ie(n) {
|
|
149
|
+
const e = H(), s = W(), t = n.getBoundingClientRect(), p = s.body, a = n.clientTop || p.clientTop || 0, f = n.clientLeft || p.clientLeft || 0, h = n === e ? e.scrollY : n.scrollTop, w = n === e ? e.scrollX : n.scrollLeft;
|
|
150
150
|
return {
|
|
151
|
-
top: t.top + h -
|
|
152
|
-
left: t.left +
|
|
151
|
+
top: t.top + h - a,
|
|
152
|
+
left: t.left + w - f
|
|
153
153
|
};
|
|
154
154
|
}
|
|
155
|
-
function
|
|
156
|
-
let e =
|
|
155
|
+
function I(n) {
|
|
156
|
+
let e = n, s;
|
|
157
157
|
if (e) {
|
|
158
|
-
for (
|
|
159
|
-
e.nodeType === 1 && (
|
|
160
|
-
return
|
|
158
|
+
for (s = 0; (e = e.previousSibling) !== null; )
|
|
159
|
+
e.nodeType === 1 && (s += 1);
|
|
160
|
+
return s;
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
function N(
|
|
164
|
-
const
|
|
165
|
-
let t =
|
|
163
|
+
function N(n, e) {
|
|
164
|
+
const s = [];
|
|
165
|
+
let t = n.parentElement;
|
|
166
166
|
for (; t; )
|
|
167
|
-
e ? t.matches(e) &&
|
|
168
|
-
return
|
|
167
|
+
e ? t.matches(e) && s.push(t) : s.push(t), t = t.parentElement;
|
|
168
|
+
return s;
|
|
169
169
|
}
|
|
170
|
-
function te(
|
|
170
|
+
function te(n, e, s) {
|
|
171
171
|
const t = H();
|
|
172
|
-
return
|
|
172
|
+
return n[e === "width" ? "offsetWidth" : "offsetHeight"] + parseFloat(t.getComputedStyle(n, null).getPropertyValue(e === "width" ? "margin-right" : "margin-top")) + parseFloat(t.getComputedStyle(n, null).getPropertyValue(e === "width" ? "margin-left" : "margin-bottom"));
|
|
173
173
|
}
|
|
174
|
-
function E(
|
|
175
|
-
return (Array.isArray(
|
|
174
|
+
function E(n) {
|
|
175
|
+
return (Array.isArray(n) ? n : [n]).filter((e) => !!e);
|
|
176
176
|
}
|
|
177
|
-
function O(
|
|
178
|
-
e === void 0 && (e = ""), typeof trustedTypes < "u" ?
|
|
179
|
-
createHTML: (
|
|
180
|
-
}).createHTML(e) :
|
|
177
|
+
function O(n, e) {
|
|
178
|
+
e === void 0 && (e = ""), typeof trustedTypes < "u" ? n.innerHTML = trustedTypes.createPolicy("html", {
|
|
179
|
+
createHTML: (s) => s
|
|
180
|
+
}).createHTML(e) : n.innerHTML = e;
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function Q(n) {
|
|
183
183
|
let {
|
|
184
184
|
swiper: e,
|
|
185
|
-
extendParams:
|
|
185
|
+
extendParams: s,
|
|
186
186
|
on: t,
|
|
187
|
-
emit:
|
|
188
|
-
} =
|
|
189
|
-
const
|
|
187
|
+
emit: p
|
|
188
|
+
} = n;
|
|
189
|
+
const a = W(), f = H();
|
|
190
190
|
e.keyboard = {
|
|
191
191
|
enabled: !1
|
|
192
|
-
},
|
|
192
|
+
}, s({
|
|
193
193
|
keyboard: {
|
|
194
194
|
enabled: !1,
|
|
195
195
|
onlyInViewport: !0,
|
|
@@ -199,64 +199,64 @@ function q(a) {
|
|
|
199
199
|
function h(S) {
|
|
200
200
|
if (!e.enabled) return;
|
|
201
201
|
const {
|
|
202
|
-
rtlTranslate:
|
|
202
|
+
rtlTranslate: v
|
|
203
203
|
} = e;
|
|
204
204
|
let m = S;
|
|
205
205
|
m.originalEvent && (m = m.originalEvent);
|
|
206
|
-
const
|
|
207
|
-
if (!e.allowSlideNext && (e.isHorizontal() && i || e.isVertical() && o ||
|
|
206
|
+
const k = m.keyCode || m.charCode, c = e.params.keyboard.pageUpDown, l = c && k === 33, g = c && k === 34, u = k === 37, i = k === 39, r = k === 38, o = k === 40;
|
|
207
|
+
if (!e.allowSlideNext && (e.isHorizontal() && i || e.isVertical() && o || g) || !e.allowSlidePrev && (e.isHorizontal() && u || e.isVertical() && r || l))
|
|
208
208
|
return !1;
|
|
209
|
-
if (!(m.shiftKey || m.altKey || m.ctrlKey || m.metaKey) && !(
|
|
210
|
-
if (e.params.keyboard.onlyInViewport && (
|
|
209
|
+
if (!(m.shiftKey || m.altKey || m.ctrlKey || m.metaKey) && !(a.activeElement && (a.activeElement.isContentEditable || a.activeElement.nodeName && (a.activeElement.nodeName.toLowerCase() === "input" || a.activeElement.nodeName.toLowerCase() === "textarea")))) {
|
|
210
|
+
if (e.params.keyboard.onlyInViewport && (l || g || u || i || r || o)) {
|
|
211
211
|
let d = !1;
|
|
212
212
|
if (N(e.el, `.${e.params.slideClass}, swiper-slide`).length > 0 && N(e.el, `.${e.params.slideActiveClass}`).length === 0)
|
|
213
213
|
return;
|
|
214
|
-
const
|
|
215
|
-
|
|
216
|
-
const D = [[
|
|
217
|
-
for (let
|
|
218
|
-
const
|
|
219
|
-
if (
|
|
220
|
-
if (
|
|
214
|
+
const C = e.el, M = C.clientWidth, Y = C.clientHeight, A = f.innerWidth, L = f.innerHeight, b = ie(C);
|
|
215
|
+
v && (b.left -= C.scrollLeft);
|
|
216
|
+
const D = [[b.left, b.top], [b.left + M, b.top], [b.left, b.top + Y], [b.left + M, b.top + Y]];
|
|
217
|
+
for (let x = 0; x < D.length; x += 1) {
|
|
218
|
+
const y = D[x];
|
|
219
|
+
if (y[0] >= 0 && y[0] <= A && y[1] >= 0 && y[1] <= L) {
|
|
220
|
+
if (y[0] === 0 && y[1] === 0) continue;
|
|
221
221
|
d = !0;
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
224
|
if (!d) return;
|
|
225
225
|
}
|
|
226
|
-
e.isHorizontal() ? ((
|
|
226
|
+
e.isHorizontal() ? ((l || g || u || i) && (m.preventDefault ? m.preventDefault() : m.returnValue = !1), ((g || i) && !v || (l || u) && v) && e.slideNext(), ((l || u) && !v || (g || i) && v) && e.slidePrev()) : ((l || g || r || o) && (m.preventDefault ? m.preventDefault() : m.returnValue = !1), (g || o) && e.slideNext(), (l || r) && e.slidePrev()), p("keyPress", k);
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
|
-
function
|
|
230
|
-
e.keyboard.enabled || (
|
|
229
|
+
function w() {
|
|
230
|
+
e.keyboard.enabled || (a.addEventListener("keydown", h), e.keyboard.enabled = !0);
|
|
231
231
|
}
|
|
232
|
-
function
|
|
233
|
-
e.keyboard.enabled && (
|
|
232
|
+
function B() {
|
|
233
|
+
e.keyboard.enabled && (a.removeEventListener("keydown", h), e.keyboard.enabled = !1);
|
|
234
234
|
}
|
|
235
235
|
t("init", () => {
|
|
236
|
-
e.params.keyboard.enabled &&
|
|
236
|
+
e.params.keyboard.enabled && w();
|
|
237
237
|
}), t("destroy", () => {
|
|
238
|
-
e.keyboard.enabled &&
|
|
238
|
+
e.keyboard.enabled && B();
|
|
239
239
|
}), Object.assign(e.keyboard, {
|
|
240
|
-
enable:
|
|
241
|
-
disable:
|
|
240
|
+
enable: w,
|
|
241
|
+
disable: B
|
|
242
242
|
});
|
|
243
243
|
}
|
|
244
|
-
function
|
|
245
|
-
return
|
|
246
|
-
if (!
|
|
247
|
-
let
|
|
248
|
-
|
|
244
|
+
function q(n, e, s, t) {
|
|
245
|
+
return n.params.createElements && Object.keys(t).forEach((p) => {
|
|
246
|
+
if (!s[p] && s.auto === !0) {
|
|
247
|
+
let a = _(n.el, `.${t[p]}`)[0];
|
|
248
|
+
a || (a = ee("div", t[p]), a.className = t[p], n.el.append(a)), s[p] = a, e[p] = a;
|
|
249
249
|
}
|
|
250
|
-
}),
|
|
250
|
+
}), s;
|
|
251
251
|
}
|
|
252
|
-
function R(
|
|
252
|
+
function R(n) {
|
|
253
253
|
let {
|
|
254
254
|
swiper: e,
|
|
255
|
-
extendParams:
|
|
255
|
+
extendParams: s,
|
|
256
256
|
on: t,
|
|
257
|
-
emit:
|
|
258
|
-
} =
|
|
259
|
-
|
|
257
|
+
emit: p
|
|
258
|
+
} = n;
|
|
259
|
+
s({
|
|
260
260
|
navigation: {
|
|
261
261
|
nextEl: null,
|
|
262
262
|
prevEl: null,
|
|
@@ -270,119 +270,119 @@ function R(a) {
|
|
|
270
270
|
nextEl: null,
|
|
271
271
|
prevEl: null
|
|
272
272
|
};
|
|
273
|
-
function
|
|
274
|
-
let
|
|
275
|
-
return c && typeof c == "string" && e.isElement && (
|
|
276
|
-
}
|
|
277
|
-
function
|
|
278
|
-
const
|
|
279
|
-
c = E(c), c.forEach((
|
|
280
|
-
|
|
273
|
+
function a(c) {
|
|
274
|
+
let l;
|
|
275
|
+
return c && typeof c == "string" && e.isElement && (l = e.el.querySelector(c) || e.hostEl.querySelector(c), l) ? l : (c && (typeof c == "string" && (l = [...document.querySelectorAll(c)]), e.params.uniqueNavElements && typeof c == "string" && l && l.length > 1 && e.el.querySelectorAll(c).length === 1 ? l = e.el.querySelector(c) : l && l.length === 1 && (l = l[0])), c && !l ? c : l);
|
|
276
|
+
}
|
|
277
|
+
function f(c, l) {
|
|
278
|
+
const g = e.params.navigation;
|
|
279
|
+
c = E(c), c.forEach((u) => {
|
|
280
|
+
u && (u.classList[l ? "add" : "remove"](...g.disabledClass.split(" ")), u.tagName === "BUTTON" && (u.disabled = l), e.params.watchOverflow && e.enabled && u.classList[e.isLocked ? "add" : "remove"](g.lockClass));
|
|
281
281
|
});
|
|
282
282
|
}
|
|
283
283
|
function h() {
|
|
284
284
|
const {
|
|
285
285
|
nextEl: c,
|
|
286
|
-
prevEl:
|
|
286
|
+
prevEl: l
|
|
287
287
|
} = e.navigation;
|
|
288
288
|
if (e.params.loop) {
|
|
289
|
-
|
|
289
|
+
f(l, !1), f(c, !1);
|
|
290
290
|
return;
|
|
291
291
|
}
|
|
292
|
-
|
|
292
|
+
f(l, e.isBeginning && !e.params.rewind), f(c, e.isEnd && !e.params.rewind);
|
|
293
293
|
}
|
|
294
|
-
function
|
|
295
|
-
c.preventDefault(), !(e.isBeginning && !e.params.loop && !e.params.rewind) && (e.slidePrev(),
|
|
294
|
+
function w(c) {
|
|
295
|
+
c.preventDefault(), !(e.isBeginning && !e.params.loop && !e.params.rewind) && (e.slidePrev(), p("navigationPrev"));
|
|
296
296
|
}
|
|
297
|
-
function
|
|
298
|
-
c.preventDefault(), !(e.isEnd && !e.params.loop && !e.params.rewind) && (e.slideNext(),
|
|
297
|
+
function B(c) {
|
|
298
|
+
c.preventDefault(), !(e.isEnd && !e.params.loop && !e.params.rewind) && (e.slideNext(), p("navigationNext"));
|
|
299
299
|
}
|
|
300
300
|
function S() {
|
|
301
301
|
const c = e.params.navigation;
|
|
302
|
-
if (e.params.navigation =
|
|
302
|
+
if (e.params.navigation = q(e, e.originalParams.navigation, e.params.navigation, {
|
|
303
303
|
nextEl: "swiper-button-next",
|
|
304
304
|
prevEl: "swiper-button-prev"
|
|
305
305
|
}), !(c.nextEl || c.prevEl)) return;
|
|
306
|
-
let
|
|
306
|
+
let l = a(c.nextEl), g = a(c.prevEl);
|
|
307
307
|
Object.assign(e.navigation, {
|
|
308
|
-
nextEl:
|
|
309
|
-
prevEl:
|
|
310
|
-
}),
|
|
311
|
-
const
|
|
312
|
-
i && i.addEventListener("click",
|
|
308
|
+
nextEl: l,
|
|
309
|
+
prevEl: g
|
|
310
|
+
}), l = E(l), g = E(g);
|
|
311
|
+
const u = (i, r) => {
|
|
312
|
+
i && i.addEventListener("click", r === "next" ? B : w), !e.enabled && i && i.classList.add(...c.lockClass.split(" "));
|
|
313
313
|
};
|
|
314
|
-
|
|
314
|
+
l.forEach((i) => u(i, "next")), g.forEach((i) => u(i, "prev"));
|
|
315
315
|
}
|
|
316
|
-
function
|
|
316
|
+
function v() {
|
|
317
317
|
let {
|
|
318
318
|
nextEl: c,
|
|
319
|
-
prevEl:
|
|
319
|
+
prevEl: l
|
|
320
320
|
} = e.navigation;
|
|
321
|
-
c = E(c),
|
|
322
|
-
const
|
|
323
|
-
|
|
321
|
+
c = E(c), l = E(l);
|
|
322
|
+
const g = (u, i) => {
|
|
323
|
+
u.removeEventListener("click", i === "next" ? B : w), u.classList.remove(...e.params.navigation.disabledClass.split(" "));
|
|
324
324
|
};
|
|
325
|
-
c.forEach((
|
|
325
|
+
c.forEach((u) => g(u, "next")), l.forEach((u) => g(u, "prev"));
|
|
326
326
|
}
|
|
327
327
|
t("init", () => {
|
|
328
|
-
e.params.navigation.enabled === !1 ?
|
|
328
|
+
e.params.navigation.enabled === !1 ? k() : (S(), h());
|
|
329
329
|
}), t("toEdge fromEdge lock unlock", () => {
|
|
330
330
|
h();
|
|
331
331
|
}), t("destroy", () => {
|
|
332
|
-
|
|
332
|
+
v();
|
|
333
333
|
}), t("enable disable", () => {
|
|
334
334
|
let {
|
|
335
335
|
nextEl: c,
|
|
336
|
-
prevEl:
|
|
336
|
+
prevEl: l
|
|
337
337
|
} = e.navigation;
|
|
338
|
-
if (c = E(c),
|
|
338
|
+
if (c = E(c), l = E(l), e.enabled) {
|
|
339
339
|
h();
|
|
340
340
|
return;
|
|
341
341
|
}
|
|
342
|
-
[...c, ...
|
|
343
|
-
}), t("click", (c,
|
|
342
|
+
[...c, ...l].filter((g) => !!g).forEach((g) => g.classList.add(e.params.navigation.lockClass));
|
|
343
|
+
}), t("click", (c, l) => {
|
|
344
344
|
let {
|
|
345
|
-
nextEl:
|
|
346
|
-
prevEl:
|
|
345
|
+
nextEl: g,
|
|
346
|
+
prevEl: u
|
|
347
347
|
} = e.navigation;
|
|
348
|
-
|
|
349
|
-
const i =
|
|
350
|
-
let
|
|
351
|
-
if (e.isElement && !
|
|
352
|
-
const o =
|
|
353
|
-
o && (
|
|
348
|
+
g = E(g), u = E(u);
|
|
349
|
+
const i = l.target;
|
|
350
|
+
let r = u.includes(i) || g.includes(i);
|
|
351
|
+
if (e.isElement && !r) {
|
|
352
|
+
const o = l.path || l.composedPath && l.composedPath();
|
|
353
|
+
o && (r = o.find((d) => g.includes(d) || u.includes(d)));
|
|
354
354
|
}
|
|
355
|
-
if (e.params.navigation.hideOnClick && !
|
|
355
|
+
if (e.params.navigation.hideOnClick && !r) {
|
|
356
356
|
if (e.pagination && e.params.pagination && e.params.pagination.clickable && (e.pagination.el === i || e.pagination.el.contains(i))) return;
|
|
357
357
|
let o;
|
|
358
|
-
|
|
358
|
+
g.length ? o = g[0].classList.contains(e.params.navigation.hiddenClass) : u.length && (o = u[0].classList.contains(e.params.navigation.hiddenClass)), p(o === !0 ? "navigationShow" : "navigationHide"), [...g, ...u].filter((d) => !!d).forEach((d) => d.classList.toggle(e.params.navigation.hiddenClass));
|
|
359
359
|
}
|
|
360
360
|
});
|
|
361
361
|
const m = () => {
|
|
362
362
|
e.el.classList.remove(...e.params.navigation.navigationDisabledClass.split(" ")), S(), h();
|
|
363
|
-
},
|
|
364
|
-
e.el.classList.add(...e.params.navigation.navigationDisabledClass.split(" ")),
|
|
363
|
+
}, k = () => {
|
|
364
|
+
e.el.classList.add(...e.params.navigation.navigationDisabledClass.split(" ")), v();
|
|
365
365
|
};
|
|
366
366
|
Object.assign(e.navigation, {
|
|
367
367
|
enable: m,
|
|
368
|
-
disable:
|
|
368
|
+
disable: k,
|
|
369
369
|
update: h,
|
|
370
370
|
init: S,
|
|
371
|
-
destroy:
|
|
371
|
+
destroy: v
|
|
372
372
|
});
|
|
373
373
|
}
|
|
374
|
-
function P(
|
|
375
|
-
return
|
|
374
|
+
function P(n) {
|
|
375
|
+
return n === void 0 && (n = ""), `.${n.trim().replace(/([\.:!+\/()[\]])/g, "\\$1").replace(/ /g, ".")}`;
|
|
376
376
|
}
|
|
377
|
-
function Z(
|
|
377
|
+
function Z(n) {
|
|
378
378
|
let {
|
|
379
379
|
swiper: e,
|
|
380
|
-
extendParams:
|
|
380
|
+
extendParams: s,
|
|
381
381
|
on: t,
|
|
382
|
-
emit:
|
|
383
|
-
} =
|
|
384
|
-
const
|
|
385
|
-
|
|
382
|
+
emit: p
|
|
383
|
+
} = n;
|
|
384
|
+
const a = "swiper-pagination";
|
|
385
|
+
s({
|
|
386
386
|
pagination: {
|
|
387
387
|
el: null,
|
|
388
388
|
bulletElement: "span",
|
|
@@ -399,46 +399,46 @@ function Z(a) {
|
|
|
399
399
|
dynamicMainBullets: 1,
|
|
400
400
|
formatFractionCurrent: (i) => i,
|
|
401
401
|
formatFractionTotal: (i) => i,
|
|
402
|
-
bulletClass: `${
|
|
403
|
-
bulletActiveClass: `${
|
|
404
|
-
modifierClass: `${
|
|
405
|
-
currentClass: `${
|
|
406
|
-
totalClass: `${
|
|
407
|
-
hiddenClass: `${
|
|
408
|
-
progressbarFillClass: `${
|
|
409
|
-
progressbarOppositeClass: `${
|
|
410
|
-
clickableClass: `${
|
|
411
|
-
lockClass: `${
|
|
412
|
-
horizontalClass: `${
|
|
413
|
-
verticalClass: `${
|
|
414
|
-
paginationDisabledClass: `${
|
|
402
|
+
bulletClass: `${a}-bullet`,
|
|
403
|
+
bulletActiveClass: `${a}-bullet-active`,
|
|
404
|
+
modifierClass: `${a}-`,
|
|
405
|
+
currentClass: `${a}-current`,
|
|
406
|
+
totalClass: `${a}-total`,
|
|
407
|
+
hiddenClass: `${a}-hidden`,
|
|
408
|
+
progressbarFillClass: `${a}-progressbar-fill`,
|
|
409
|
+
progressbarOppositeClass: `${a}-progressbar-opposite`,
|
|
410
|
+
clickableClass: `${a}-clickable`,
|
|
411
|
+
lockClass: `${a}-lock`,
|
|
412
|
+
horizontalClass: `${a}-horizontal`,
|
|
413
|
+
verticalClass: `${a}-vertical`,
|
|
414
|
+
paginationDisabledClass: `${a}-disabled`
|
|
415
415
|
}
|
|
416
416
|
}), e.pagination = {
|
|
417
417
|
el: null,
|
|
418
418
|
bullets: []
|
|
419
419
|
};
|
|
420
|
-
let
|
|
421
|
-
function
|
|
420
|
+
let f, h = 0;
|
|
421
|
+
function w() {
|
|
422
422
|
return !e.params.pagination.el || !e.pagination.el || Array.isArray(e.pagination.el) && e.pagination.el.length === 0;
|
|
423
423
|
}
|
|
424
|
-
function
|
|
424
|
+
function B(i, r) {
|
|
425
425
|
const {
|
|
426
426
|
bulletActiveClass: o
|
|
427
427
|
} = e.params.pagination;
|
|
428
|
-
i && (i = i[`${
|
|
428
|
+
i && (i = i[`${r === "prev" ? "previous" : "next"}ElementSibling`], i && (i.classList.add(`${o}-${r}`), i = i[`${r === "prev" ? "previous" : "next"}ElementSibling`], i && i.classList.add(`${o}-${r}-${r}`)));
|
|
429
429
|
}
|
|
430
|
-
function S(i,
|
|
431
|
-
if (i = i % o,
|
|
430
|
+
function S(i, r, o) {
|
|
431
|
+
if (i = i % o, r = r % o, r === i + 1)
|
|
432
432
|
return "next";
|
|
433
|
-
if (
|
|
433
|
+
if (r === i - 1)
|
|
434
434
|
return "previous";
|
|
435
435
|
}
|
|
436
|
-
function
|
|
437
|
-
const
|
|
438
|
-
if (!
|
|
436
|
+
function v(i) {
|
|
437
|
+
const r = i.target.closest(P(e.params.pagination.bulletClass));
|
|
438
|
+
if (!r)
|
|
439
439
|
return;
|
|
440
440
|
i.preventDefault();
|
|
441
|
-
const o =
|
|
441
|
+
const o = I(r) * e.params.slidesPerGroup;
|
|
442
442
|
if (e.params.loop) {
|
|
443
443
|
if (e.realIndex === o) return;
|
|
444
444
|
const d = S(e.realIndex, o, e.slides.length);
|
|
@@ -447,156 +447,156 @@ function Z(a) {
|
|
|
447
447
|
e.slideTo(o);
|
|
448
448
|
}
|
|
449
449
|
function m() {
|
|
450
|
-
const i = e.rtl,
|
|
451
|
-
if (
|
|
450
|
+
const i = e.rtl, r = e.params.pagination;
|
|
451
|
+
if (w()) return;
|
|
452
452
|
let o = e.pagination.el;
|
|
453
453
|
o = E(o);
|
|
454
|
-
let d,
|
|
454
|
+
let d, C;
|
|
455
455
|
const M = e.virtual && e.params.virtual.enabled ? e.virtual.slides.length : e.slides.length, Y = e.params.loop ? Math.ceil(M / e.params.slidesPerGroup) : e.snapGrid.length;
|
|
456
|
-
if (e.params.loop ? (
|
|
457
|
-
const
|
|
458
|
-
let
|
|
459
|
-
if (
|
|
460
|
-
|
|
461
|
-
}),
|
|
462
|
-
const
|
|
463
|
-
|
|
456
|
+
if (e.params.loop ? (C = e.previousRealIndex || 0, d = e.params.slidesPerGroup > 1 ? Math.floor(e.realIndex / e.params.slidesPerGroup) : e.realIndex) : typeof e.snapIndex < "u" ? (d = e.snapIndex, C = e.previousSnapIndex) : (C = e.previousIndex || 0, d = e.activeIndex || 0), r.type === "bullets" && e.pagination.bullets && e.pagination.bullets.length > 0) {
|
|
457
|
+
const A = e.pagination.bullets;
|
|
458
|
+
let L, b, D;
|
|
459
|
+
if (r.dynamicBullets && (f = te(A[0], e.isHorizontal() ? "width" : "height"), o.forEach((x) => {
|
|
460
|
+
x.style[e.isHorizontal() ? "width" : "height"] = `${f * (r.dynamicMainBullets + 4)}px`;
|
|
461
|
+
}), r.dynamicMainBullets > 1 && C !== void 0 && (h += d - (C || 0), h > r.dynamicMainBullets - 1 ? h = r.dynamicMainBullets - 1 : h < 0 && (h = 0)), L = Math.max(d - h, 0), b = L + (Math.min(A.length, r.dynamicMainBullets) - 1), D = (b + L) / 2), A.forEach((x) => {
|
|
462
|
+
const y = [...["", "-next", "-next-next", "-prev", "-prev-prev", "-main"].map((z) => `${r.bulletActiveClass}${z}`)].map((z) => typeof z == "string" && z.includes(" ") ? z.split(" ") : z).flat();
|
|
463
|
+
x.classList.remove(...y);
|
|
464
464
|
}), o.length > 1)
|
|
465
|
-
|
|
466
|
-
const
|
|
467
|
-
|
|
465
|
+
A.forEach((x) => {
|
|
466
|
+
const y = I(x);
|
|
467
|
+
y === d ? x.classList.add(...r.bulletActiveClass.split(" ")) : e.isElement && x.setAttribute("part", "bullet"), r.dynamicBullets && (y >= L && y <= b && x.classList.add(...`${r.bulletActiveClass}-main`.split(" ")), y === L && B(x, "prev"), y === b && B(x, "next"));
|
|
468
468
|
});
|
|
469
469
|
else {
|
|
470
|
-
const
|
|
471
|
-
if (
|
|
472
|
-
|
|
473
|
-
}),
|
|
474
|
-
const
|
|
475
|
-
for (let j =
|
|
476
|
-
|
|
477
|
-
|
|
470
|
+
const x = A[d];
|
|
471
|
+
if (x && x.classList.add(...r.bulletActiveClass.split(" ")), e.isElement && A.forEach((y, z) => {
|
|
472
|
+
y.setAttribute("part", z === d ? "bullet-active" : "bullet");
|
|
473
|
+
}), r.dynamicBullets) {
|
|
474
|
+
const y = A[L], z = A[b];
|
|
475
|
+
for (let j = L; j <= b; j += 1)
|
|
476
|
+
A[j] && A[j].classList.add(...`${r.bulletActiveClass}-main`.split(" "));
|
|
477
|
+
B(y, "prev"), B(z, "next");
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
|
-
if (
|
|
481
|
-
const
|
|
482
|
-
|
|
483
|
-
j.style[e.isHorizontal() ?
|
|
480
|
+
if (r.dynamicBullets) {
|
|
481
|
+
const x = Math.min(A.length, r.dynamicMainBullets + 4), y = (f * x - f) / 2 - D * f, z = i ? "right" : "left";
|
|
482
|
+
A.forEach((j) => {
|
|
483
|
+
j.style[e.isHorizontal() ? z : "top"] = `${y}px`;
|
|
484
484
|
});
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
|
-
o.forEach((
|
|
488
|
-
if (
|
|
489
|
-
|
|
490
|
-
}),
|
|
491
|
-
|
|
492
|
-
})),
|
|
493
|
-
let
|
|
494
|
-
|
|
487
|
+
o.forEach((A, L) => {
|
|
488
|
+
if (r.type === "fraction" && (A.querySelectorAll(P(r.currentClass)).forEach((b) => {
|
|
489
|
+
b.textContent = r.formatFractionCurrent(d + 1);
|
|
490
|
+
}), A.querySelectorAll(P(r.totalClass)).forEach((b) => {
|
|
491
|
+
b.textContent = r.formatFractionTotal(Y);
|
|
492
|
+
})), r.type === "progressbar") {
|
|
493
|
+
let b;
|
|
494
|
+
r.progressbarOpposite ? b = e.isHorizontal() ? "vertical" : "horizontal" : b = e.isHorizontal() ? "horizontal" : "vertical";
|
|
495
495
|
const D = (d + 1) / Y;
|
|
496
|
-
let
|
|
497
|
-
|
|
498
|
-
|
|
496
|
+
let x = 1, y = 1;
|
|
497
|
+
b === "horizontal" ? x = D : y = D, A.querySelectorAll(P(r.progressbarFillClass)).forEach((z) => {
|
|
498
|
+
z.style.transform = `translate3d(0,0,0) scaleX(${x}) scaleY(${y})`, z.style.transitionDuration = `${e.params.speed}ms`;
|
|
499
499
|
});
|
|
500
500
|
}
|
|
501
|
-
|
|
501
|
+
r.type === "custom" && r.renderCustom ? (O(A, r.renderCustom(e, d + 1, Y)), L === 0 && p("paginationRender", A)) : (L === 0 && p("paginationRender", A), p("paginationUpdate", A)), e.params.watchOverflow && e.enabled && A.classList[e.isLocked ? "add" : "remove"](r.lockClass);
|
|
502
502
|
});
|
|
503
503
|
}
|
|
504
|
-
function
|
|
504
|
+
function k() {
|
|
505
505
|
const i = e.params.pagination;
|
|
506
|
-
if (
|
|
507
|
-
const
|
|
506
|
+
if (w()) return;
|
|
507
|
+
const r = 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;
|
|
508
508
|
let o = e.pagination.el;
|
|
509
509
|
o = E(o);
|
|
510
510
|
let d = "";
|
|
511
511
|
if (i.type === "bullets") {
|
|
512
|
-
let
|
|
513
|
-
e.params.freeMode && e.params.freeMode.enabled &&
|
|
514
|
-
for (let M = 0; M <
|
|
512
|
+
let C = e.params.loop ? Math.ceil(r / e.params.slidesPerGroup) : e.snapGrid.length;
|
|
513
|
+
e.params.freeMode && e.params.freeMode.enabled && C > r && (C = r);
|
|
514
|
+
for (let M = 0; M < C; M += 1)
|
|
515
515
|
i.renderBullet ? d += i.renderBullet.call(e, M, i.bulletClass) : d += `<${i.bulletElement} ${e.isElement ? 'part="bullet"' : ""} class="${i.bulletClass}"></${i.bulletElement}>`;
|
|
516
516
|
}
|
|
517
|
-
i.type === "fraction" && (i.renderFraction ? d = i.renderFraction.call(e, i.currentClass, i.totalClass) : d = `<span class="${i.currentClass}"></span> / <span class="${i.totalClass}"></span>`), i.type === "progressbar" && (i.renderProgressbar ? d = i.renderProgressbar.call(e, i.progressbarFillClass) : d = `<span class="${i.progressbarFillClass}"></span>`), e.pagination.bullets = [], o.forEach((
|
|
518
|
-
i.type !== "custom" && O(
|
|
519
|
-
}), i.type !== "custom" &&
|
|
517
|
+
i.type === "fraction" && (i.renderFraction ? d = i.renderFraction.call(e, i.currentClass, i.totalClass) : d = `<span class="${i.currentClass}"></span> / <span class="${i.totalClass}"></span>`), i.type === "progressbar" && (i.renderProgressbar ? d = i.renderProgressbar.call(e, i.progressbarFillClass) : d = `<span class="${i.progressbarFillClass}"></span>`), e.pagination.bullets = [], o.forEach((C) => {
|
|
518
|
+
i.type !== "custom" && O(C, d || ""), i.type === "bullets" && e.pagination.bullets.push(...C.querySelectorAll(P(i.bulletClass)));
|
|
519
|
+
}), i.type !== "custom" && p("paginationRender", o[0]);
|
|
520
520
|
}
|
|
521
521
|
function c() {
|
|
522
|
-
e.params.pagination =
|
|
522
|
+
e.params.pagination = q(e, e.originalParams.pagination, e.params.pagination, {
|
|
523
523
|
el: "swiper-pagination"
|
|
524
524
|
});
|
|
525
525
|
const i = e.params.pagination;
|
|
526
526
|
if (!i.el) return;
|
|
527
|
-
let
|
|
528
|
-
typeof i.el == "string" && e.isElement && (
|
|
529
|
-
el:
|
|
530
|
-
}),
|
|
531
|
-
i.type === "bullets" && i.clickable && o.classList.add(...(i.clickableClass || "").split(" ")), o.classList.add(i.modifierClass + i.type), o.classList.add(e.isHorizontal() ? i.horizontalClass : i.verticalClass), i.type === "bullets" && i.dynamicBullets && (o.classList.add(`${i.modifierClass}${i.type}-dynamic`), h = 0, i.dynamicMainBullets < 1 && (i.dynamicMainBullets = 1)), i.type === "progressbar" && i.progressbarOpposite && o.classList.add(i.progressbarOppositeClass), i.clickable && o.addEventListener("click",
|
|
527
|
+
let r;
|
|
528
|
+
typeof i.el == "string" && e.isElement && (r = e.el.querySelector(i.el)), !r && typeof i.el == "string" && (r = [...document.querySelectorAll(i.el)]), r || (r = i.el), !(!r || r.length === 0) && (e.params.uniqueNavElements && typeof i.el == "string" && Array.isArray(r) && r.length > 1 && (r = [...e.el.querySelectorAll(i.el)], r.length > 1 && (r = r.find((o) => N(o, ".swiper")[0] === e.el))), Array.isArray(r) && r.length === 1 && (r = r[0]), Object.assign(e.pagination, {
|
|
529
|
+
el: r
|
|
530
|
+
}), r = E(r), r.forEach((o) => {
|
|
531
|
+
i.type === "bullets" && i.clickable && o.classList.add(...(i.clickableClass || "").split(" ")), o.classList.add(i.modifierClass + i.type), o.classList.add(e.isHorizontal() ? i.horizontalClass : i.verticalClass), i.type === "bullets" && i.dynamicBullets && (o.classList.add(`${i.modifierClass}${i.type}-dynamic`), h = 0, i.dynamicMainBullets < 1 && (i.dynamicMainBullets = 1)), i.type === "progressbar" && i.progressbarOpposite && o.classList.add(i.progressbarOppositeClass), i.clickable && o.addEventListener("click", v), e.enabled || o.classList.add(i.lockClass);
|
|
532
532
|
}));
|
|
533
533
|
}
|
|
534
|
-
function
|
|
534
|
+
function l() {
|
|
535
535
|
const i = e.params.pagination;
|
|
536
|
-
if (
|
|
537
|
-
let
|
|
538
|
-
|
|
539
|
-
o.classList.remove(i.hiddenClass), o.classList.remove(i.modifierClass + i.type), o.classList.remove(e.isHorizontal() ? i.horizontalClass : i.verticalClass), i.clickable && (o.classList.remove(...(i.clickableClass || "").split(" ")), o.removeEventListener("click",
|
|
536
|
+
if (w()) return;
|
|
537
|
+
let r = e.pagination.el;
|
|
538
|
+
r && (r = E(r), r.forEach((o) => {
|
|
539
|
+
o.classList.remove(i.hiddenClass), o.classList.remove(i.modifierClass + i.type), o.classList.remove(e.isHorizontal() ? i.horizontalClass : i.verticalClass), i.clickable && (o.classList.remove(...(i.clickableClass || "").split(" ")), o.removeEventListener("click", v));
|
|
540
540
|
})), e.pagination.bullets && e.pagination.bullets.forEach((o) => o.classList.remove(...i.bulletActiveClass.split(" ")));
|
|
541
541
|
}
|
|
542
542
|
t("changeDirection", () => {
|
|
543
543
|
if (!e.pagination || !e.pagination.el) return;
|
|
544
544
|
const i = e.params.pagination;
|
|
545
545
|
let {
|
|
546
|
-
el:
|
|
546
|
+
el: r
|
|
547
547
|
} = e.pagination;
|
|
548
|
-
|
|
548
|
+
r = E(r), r.forEach((o) => {
|
|
549
549
|
o.classList.remove(i.horizontalClass, i.verticalClass), o.classList.add(e.isHorizontal() ? i.horizontalClass : i.verticalClass);
|
|
550
550
|
});
|
|
551
551
|
}), t("init", () => {
|
|
552
|
-
e.params.pagination.enabled === !1 ?
|
|
552
|
+
e.params.pagination.enabled === !1 ? u() : (c(), k(), m());
|
|
553
553
|
}), t("activeIndexChange", () => {
|
|
554
554
|
typeof e.snapIndex > "u" && m();
|
|
555
555
|
}), t("snapIndexChange", () => {
|
|
556
556
|
m();
|
|
557
557
|
}), t("snapGridLengthChange", () => {
|
|
558
|
-
|
|
558
|
+
k(), m();
|
|
559
559
|
}), t("destroy", () => {
|
|
560
|
-
|
|
560
|
+
l();
|
|
561
561
|
}), t("enable disable", () => {
|
|
562
562
|
let {
|
|
563
563
|
el: i
|
|
564
564
|
} = e.pagination;
|
|
565
|
-
i && (i = E(i), i.forEach((
|
|
565
|
+
i && (i = E(i), i.forEach((r) => r.classList[e.enabled ? "remove" : "add"](e.params.pagination.lockClass)));
|
|
566
566
|
}), t("lock unlock", () => {
|
|
567
567
|
m();
|
|
568
|
-
}), t("click", (i,
|
|
569
|
-
const o =
|
|
568
|
+
}), t("click", (i, r) => {
|
|
569
|
+
const o = r.target, d = E(e.pagination.el);
|
|
570
570
|
if (e.params.pagination.el && e.params.pagination.hideOnClick && d && d.length > 0 && !o.classList.contains(e.params.pagination.bulletClass)) {
|
|
571
571
|
if (e.navigation && (e.navigation.nextEl && o === e.navigation.nextEl || e.navigation.prevEl && o === e.navigation.prevEl)) return;
|
|
572
|
-
const
|
|
573
|
-
|
|
572
|
+
const C = d[0].classList.contains(e.params.pagination.hiddenClass);
|
|
573
|
+
p(C === !0 ? "paginationShow" : "paginationHide"), d.forEach((M) => M.classList.toggle(e.params.pagination.hiddenClass));
|
|
574
574
|
}
|
|
575
575
|
});
|
|
576
|
-
const
|
|
576
|
+
const g = () => {
|
|
577
577
|
e.el.classList.remove(e.params.pagination.paginationDisabledClass);
|
|
578
578
|
let {
|
|
579
579
|
el: i
|
|
580
580
|
} = e.pagination;
|
|
581
|
-
i && (i = E(i), i.forEach((
|
|
582
|
-
},
|
|
581
|
+
i && (i = E(i), i.forEach((r) => r.classList.remove(e.params.pagination.paginationDisabledClass))), c(), k(), m();
|
|
582
|
+
}, u = () => {
|
|
583
583
|
e.el.classList.add(e.params.pagination.paginationDisabledClass);
|
|
584
584
|
let {
|
|
585
585
|
el: i
|
|
586
586
|
} = e.pagination;
|
|
587
|
-
i && (i = E(i), i.forEach((
|
|
587
|
+
i && (i = E(i), i.forEach((r) => r.classList.add(e.params.pagination.paginationDisabledClass))), l();
|
|
588
588
|
};
|
|
589
589
|
Object.assign(e.pagination, {
|
|
590
|
-
enable:
|
|
591
|
-
disable:
|
|
592
|
-
render:
|
|
590
|
+
enable: g,
|
|
591
|
+
disable: u,
|
|
592
|
+
render: k,
|
|
593
593
|
update: m,
|
|
594
594
|
init: c,
|
|
595
|
-
destroy:
|
|
595
|
+
destroy: l
|
|
596
596
|
});
|
|
597
597
|
}
|
|
598
|
-
|
|
599
|
-
class
|
|
598
|
+
F.use([R, Z, Q]);
|
|
599
|
+
class re {
|
|
600
600
|
constructor() {
|
|
601
601
|
this.name = "swiper", this.eventHandlers = /* @__PURE__ */ new Map();
|
|
602
602
|
}
|
|
@@ -606,7 +606,7 @@ class ne {
|
|
|
606
606
|
* @param container - 容器元素
|
|
607
607
|
* @param options - Swiper 选项
|
|
608
608
|
*/
|
|
609
|
-
async initialize(e,
|
|
609
|
+
async initialize(e, s) {
|
|
610
610
|
try {
|
|
611
611
|
if (this.createSwiperStructure(e), !this.swiperContainer || !this.swiperWrapper)
|
|
612
612
|
throw new Error("Swiper container not created");
|
|
@@ -618,15 +618,15 @@ class ne {
|
|
|
618
618
|
spaceBetween: 30,
|
|
619
619
|
slidesPerView: 1,
|
|
620
620
|
// 注册模块
|
|
621
|
-
modules: [R, Z,
|
|
622
|
-
// 导航配置
|
|
621
|
+
modules: [R, Z, Q],
|
|
622
|
+
// 导航配置 - 使用元素引用而不是选择器,确保在 Vue 组件中也能正常工作
|
|
623
623
|
navigation: {
|
|
624
|
-
nextEl:
|
|
625
|
-
prevEl:
|
|
624
|
+
nextEl: this.nextButton || void 0,
|
|
625
|
+
prevEl: this.prevButton || void 0
|
|
626
626
|
},
|
|
627
|
-
// 分页配置
|
|
627
|
+
// 分页配置 - 使用元素引用而不是选择器
|
|
628
628
|
pagination: {
|
|
629
|
-
el:
|
|
629
|
+
el: this.paginationEl || void 0,
|
|
630
630
|
clickable: !0
|
|
631
631
|
},
|
|
632
632
|
// 键盘控制配置
|
|
@@ -634,16 +634,16 @@ class ne {
|
|
|
634
634
|
enabled: !0,
|
|
635
635
|
onlyInViewport: !0
|
|
636
636
|
},
|
|
637
|
-
...
|
|
637
|
+
...s?.swiperConfig
|
|
638
638
|
};
|
|
639
|
-
this.swiper = new
|
|
639
|
+
this.swiper = new F(this.swiperContainer, t), await new Promise((p) => {
|
|
640
640
|
requestAnimationFrame(() => {
|
|
641
|
-
|
|
641
|
+
p();
|
|
642
642
|
});
|
|
643
643
|
}), this.setupEventListeners(), this.emit("ready");
|
|
644
644
|
} catch (t) {
|
|
645
|
-
const
|
|
646
|
-
throw this.emit("error", { message:
|
|
645
|
+
const p = t instanceof Error ? t.message : String(t);
|
|
646
|
+
throw this.emit("error", { message: p }), new Error(`Failed to initialize SwiperAdapter: ${p}`);
|
|
647
647
|
}
|
|
648
648
|
}
|
|
649
649
|
/**
|
|
@@ -656,13 +656,13 @@ class ne {
|
|
|
656
656
|
throw new Error("SwiperAdapter not initialized");
|
|
657
657
|
try {
|
|
658
658
|
this.swiperWrapper.innerHTML = "";
|
|
659
|
-
for (const
|
|
660
|
-
const t = await this.renderSlide(
|
|
659
|
+
for (const s of e) {
|
|
660
|
+
const t = await this.renderSlide(s);
|
|
661
661
|
this.swiperWrapper.appendChild(t);
|
|
662
662
|
}
|
|
663
663
|
this.swiper.update(), this.emit("slideRendered", { totalSlides: e.length });
|
|
664
|
-
} catch (
|
|
665
|
-
const t =
|
|
664
|
+
} catch (s) {
|
|
665
|
+
const t = s instanceof Error ? s.message : String(s);
|
|
666
666
|
throw this.emit("error", { message: t }), new Error(`Failed to render slides: ${t}`);
|
|
667
667
|
}
|
|
668
668
|
}
|
|
@@ -700,18 +700,18 @@ class ne {
|
|
|
700
700
|
* @param index - 幻灯片索引
|
|
701
701
|
* @param slide - 新的幻灯片定义
|
|
702
702
|
*/
|
|
703
|
-
async updateSlide(e,
|
|
703
|
+
async updateSlide(e, s) {
|
|
704
704
|
if (!this.swiperWrapper || !this.swiper)
|
|
705
705
|
throw new Error("SwiperAdapter not initialized");
|
|
706
706
|
try {
|
|
707
|
-
const
|
|
708
|
-
if (!
|
|
707
|
+
const p = this.swiperWrapper.querySelectorAll(".swiper-slide")[e];
|
|
708
|
+
if (!p)
|
|
709
709
|
throw new Error(`Slide at index ${e} not found`);
|
|
710
|
-
const
|
|
711
|
-
|
|
710
|
+
const a = await this.renderSlide(s);
|
|
711
|
+
p.replaceWith(a), this.swiper.update();
|
|
712
712
|
} catch (t) {
|
|
713
|
-
const
|
|
714
|
-
throw this.emit("error", { message:
|
|
713
|
+
const p = t instanceof Error ? t.message : String(t);
|
|
714
|
+
throw this.emit("error", { message: p }), new Error(`Failed to update slide: ${p}`);
|
|
715
715
|
}
|
|
716
716
|
}
|
|
717
717
|
/**
|
|
@@ -720,8 +720,8 @@ class ne {
|
|
|
720
720
|
* @param event - 事件类型
|
|
721
721
|
* @param handler - 事件处理器
|
|
722
722
|
*/
|
|
723
|
-
on(e,
|
|
724
|
-
this.eventHandlers.has(e) || this.eventHandlers.set(e, /* @__PURE__ */ new Set()), this.eventHandlers.get(e).add(
|
|
723
|
+
on(e, s) {
|
|
724
|
+
this.eventHandlers.has(e) || this.eventHandlers.set(e, /* @__PURE__ */ new Set()), this.eventHandlers.get(e).add(s);
|
|
725
725
|
}
|
|
726
726
|
/**
|
|
727
727
|
* 移除事件监听器
|
|
@@ -729,9 +729,9 @@ class ne {
|
|
|
729
729
|
* @param event - 事件类型
|
|
730
730
|
* @param handler - 事件处理器
|
|
731
731
|
*/
|
|
732
|
-
off(e,
|
|
732
|
+
off(e, s) {
|
|
733
733
|
const t = this.eventHandlers.get(e);
|
|
734
|
-
t && t.delete(
|
|
734
|
+
t && t.delete(s);
|
|
735
735
|
}
|
|
736
736
|
/**
|
|
737
737
|
* 创建 Swiper DOM 结构
|
|
@@ -740,25 +740,19 @@ class ne {
|
|
|
740
740
|
*/
|
|
741
741
|
createSwiperStructure(e) {
|
|
742
742
|
e.className = "swiper";
|
|
743
|
-
const r = document.createElement("div");
|
|
744
|
-
r.className = "swiper-wrapper";
|
|
745
|
-
const t = document.createElement("div");
|
|
746
|
-
t.className = "swiper-button-prev";
|
|
747
|
-
const l = document.createElement("div");
|
|
748
|
-
l.className = "swiper-button-next";
|
|
749
743
|
const s = document.createElement("div");
|
|
750
|
-
s.className = "swiper-pagination", e.appendChild(
|
|
744
|
+
s.className = "swiper-wrapper", this.prevButton = document.createElement("div"), this.prevButton.className = "swiper-button-prev", this.nextButton = document.createElement("div"), this.nextButton.className = "swiper-button-next", this.paginationEl = document.createElement("div"), this.paginationEl.className = "swiper-pagination", e.appendChild(s), e.appendChild(this.prevButton), e.appendChild(this.nextButton), e.appendChild(this.paginationEl), this.swiperContainer = e, this.swiperWrapper = s;
|
|
751
745
|
}
|
|
752
746
|
/**
|
|
753
747
|
* 设置 Swiper 事件监听
|
|
754
748
|
*/
|
|
755
749
|
setupEventListeners() {
|
|
756
750
|
this.swiper && this.swiper.on("slideChange", () => {
|
|
757
|
-
const e = this.swiper.activeIndex,
|
|
751
|
+
const e = this.swiper.activeIndex, s = this.swiper.previousIndex;
|
|
758
752
|
this.emit("slideChanged", {
|
|
759
753
|
index: e,
|
|
760
|
-
previousIndex:
|
|
761
|
-
from:
|
|
754
|
+
previousIndex: s,
|
|
755
|
+
from: s,
|
|
762
756
|
to: e
|
|
763
757
|
});
|
|
764
758
|
});
|
|
@@ -770,19 +764,19 @@ class ne {
|
|
|
770
764
|
* @returns slide 元素
|
|
771
765
|
*/
|
|
772
766
|
async renderSlide(e) {
|
|
773
|
-
const
|
|
774
|
-
if (
|
|
767
|
+
const s = document.createElement("div");
|
|
768
|
+
if (s.className = "swiper-slide", e.behavior?.transition) {
|
|
775
769
|
const t = this.mapTransition(e.behavior.transition.type);
|
|
776
|
-
t &&
|
|
770
|
+
t && s.classList.add(`slide-transition-${t}`);
|
|
777
771
|
}
|
|
778
772
|
if (e.content.type === "dynamic") {
|
|
779
773
|
const t = await this.renderDynamicContent(e.content.component, e.content.props);
|
|
780
|
-
|
|
774
|
+
s.appendChild(t);
|
|
781
775
|
} else {
|
|
782
776
|
const t = this.renderTextContent(e.content.lines);
|
|
783
|
-
|
|
777
|
+
s.appendChild(t);
|
|
784
778
|
}
|
|
785
|
-
return
|
|
779
|
+
return s;
|
|
786
780
|
}
|
|
787
781
|
/**
|
|
788
782
|
* 渲染动态内容(Web Component)
|
|
@@ -796,10 +790,10 @@ class ne {
|
|
|
796
790
|
* @param props - 组件属性
|
|
797
791
|
* @returns 组件元素
|
|
798
792
|
*/
|
|
799
|
-
async renderDynamicContent(e,
|
|
793
|
+
async renderDynamicContent(e, s) {
|
|
800
794
|
const t = document.createElement(e);
|
|
801
|
-
for (const [
|
|
802
|
-
typeof
|
|
795
|
+
for (const [p, a] of Object.entries(s))
|
|
796
|
+
typeof a == "string" || typeof a == "number" ? t.setAttribute(p, String(a)) : typeof a == "boolean" ? a && t.setAttribute(p, "") : t[p] = a;
|
|
803
797
|
return t;
|
|
804
798
|
}
|
|
805
799
|
/**
|
|
@@ -817,51 +811,51 @@ class ne {
|
|
|
817
811
|
* @returns 内容容器元素
|
|
818
812
|
*/
|
|
819
813
|
renderTextContent(e) {
|
|
820
|
-
const
|
|
821
|
-
|
|
814
|
+
const s = document.createElement("div");
|
|
815
|
+
s.className = "slide-content";
|
|
822
816
|
let t = null;
|
|
823
|
-
for (const
|
|
824
|
-
const
|
|
825
|
-
if (!
|
|
817
|
+
for (const p of e) {
|
|
818
|
+
const a = p.trim();
|
|
819
|
+
if (!a) {
|
|
826
820
|
t = null;
|
|
827
821
|
continue;
|
|
828
822
|
}
|
|
829
|
-
if (
|
|
823
|
+
if (a.startsWith("# ")) {
|
|
830
824
|
t = null;
|
|
831
|
-
const
|
|
832
|
-
|
|
825
|
+
const w = document.createElement("h1");
|
|
826
|
+
w.textContent = a.substring(2), s.appendChild(w);
|
|
833
827
|
continue;
|
|
834
828
|
}
|
|
835
|
-
if (
|
|
829
|
+
if (a.startsWith("## ")) {
|
|
836
830
|
t = null;
|
|
837
|
-
const
|
|
838
|
-
|
|
831
|
+
const w = document.createElement("h2");
|
|
832
|
+
w.textContent = a.substring(3), s.appendChild(w);
|
|
839
833
|
continue;
|
|
840
834
|
}
|
|
841
|
-
if (
|
|
835
|
+
if (a.startsWith("### ")) {
|
|
842
836
|
t = null;
|
|
843
|
-
const
|
|
844
|
-
|
|
837
|
+
const w = document.createElement("h3");
|
|
838
|
+
w.textContent = a.substring(4), s.appendChild(w);
|
|
845
839
|
continue;
|
|
846
840
|
}
|
|
847
|
-
const
|
|
848
|
-
if (
|
|
841
|
+
const f = a.match(/^!\[(.*?)\]\((.*?)\)$/);
|
|
842
|
+
if (f) {
|
|
849
843
|
t = null;
|
|
850
|
-
const
|
|
851
|
-
|
|
844
|
+
const w = document.createElement("img");
|
|
845
|
+
w.alt = f[1], w.src = f[2], w.style.maxWidth = "80%", w.style.maxHeight = "500px", s.appendChild(w);
|
|
852
846
|
continue;
|
|
853
847
|
}
|
|
854
|
-
if (
|
|
855
|
-
t || (t = document.createElement("ul"),
|
|
856
|
-
const
|
|
857
|
-
|
|
848
|
+
if (a.startsWith("- ")) {
|
|
849
|
+
t || (t = document.createElement("ul"), s.appendChild(t));
|
|
850
|
+
const w = document.createElement("li");
|
|
851
|
+
w.textContent = a.substring(2), t.appendChild(w);
|
|
858
852
|
continue;
|
|
859
853
|
}
|
|
860
854
|
t = null;
|
|
861
855
|
const h = document.createElement("p");
|
|
862
|
-
h.textContent =
|
|
856
|
+
h.textContent = a, s.appendChild(h);
|
|
863
857
|
}
|
|
864
|
-
return
|
|
858
|
+
return s;
|
|
865
859
|
}
|
|
866
860
|
/**
|
|
867
861
|
* 映射 Slide DSL 过渡效果到 Swiper 过渡效果
|
|
@@ -878,60 +872,50 @@ class ne {
|
|
|
878
872
|
* @param event - 事件类型
|
|
879
873
|
* @param data - 事件数据
|
|
880
874
|
*/
|
|
881
|
-
emit(e,
|
|
875
|
+
emit(e, s) {
|
|
882
876
|
const t = this.eventHandlers.get(e);
|
|
883
877
|
if (t)
|
|
884
|
-
for (const
|
|
878
|
+
for (const p of t)
|
|
885
879
|
try {
|
|
886
|
-
|
|
887
|
-
} catch (
|
|
888
|
-
console.error(`Error in ${e} handler:`,
|
|
880
|
+
p(s);
|
|
881
|
+
} catch (a) {
|
|
882
|
+
console.error(`Error in ${e} handler:`, a);
|
|
889
883
|
}
|
|
890
884
|
}
|
|
891
885
|
}
|
|
892
|
-
const re = '@font-face{font-family:swiper-icons;src:url(data:application/font-woff;charset=utf-8;base64,\\ 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);font-weight:400;font-style:normal}:root{--swiper-theme-color: #007aff}:host{position:relative;display:block;margin-left:auto;margin-right:auto;z-index:1}.swiper{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1;display:block}.swiper-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;transition-timing-function:var(--swiper-wrapper-transition-timing-function, initial);box-sizing:content-box}.swiper-android .swiper-slide,.swiper-ios .swiper-slide,.swiper-wrapper{transform:translateZ(0)}.swiper-horizontal{touch-action:pan-y}.swiper-vertical{touch-action:pan-x}.swiper-slide{flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform;display:block}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-backface-hidden .swiper-slide{transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-3d.swiper-css-mode .swiper-wrapper{perspective:1200px}.swiper-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-3d{perspective:1200px}.swiper-3d .swiper-slide,.swiper-3d .swiper-cube-shadow{transform-style:preserve-3d}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-css-mode.swiper-horizontal>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-css-mode.swiper-vertical>.swiper-wrapper{scroll-snap-type:y mandatory}.swiper-css-mode.swiper-free-mode>.swiper-wrapper{scroll-snap-type:none}.swiper-css-mode.swiper-free-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:none}.swiper-css-mode.swiper-centered>.swiper-wrapper:before{content:"";flex-shrink:0;order:9999}.swiper-css-mode.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center;scroll-snap-stop:always}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{margin-inline-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper:before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{margin-block-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper:before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-slide-shadow-bottom{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-3d .swiper-slide-shadow{background:#00000026}.swiper-3d .swiper-slide-shadow-left{background-image:linear-gradient(to left,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-right{background-image:linear-gradient(to right,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-top{background-image:linear-gradient(to top,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(to bottom,#00000080,#0000)}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;transform-origin:50%;box-sizing:border-box;border:4px solid var(--swiper-preloader-color, var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader,.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader{animation:swiper-preloader-spin 1s infinite linear}.swiper-lazy-preloader-white{--swiper-preloader-color: #fff}.swiper-lazy-preloader-black{--swiper-preloader-color: #000}@keyframes swiper-preloader-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}', ae = ':root{--swiper-navigation-size: 44px}.swiper-button-prev,.swiper-button-next{position:absolute;top:var(--swiper-navigation-top-offset, 50%);width:calc(var(--swiper-navigation-size) / 44 * 27);height:var(--swiper-navigation-size);margin-top:calc(0px - (var(--swiper-navigation-size) / 2));z-index:10;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--swiper-navigation-color, var(--swiper-theme-color))}.swiper-button-prev.swiper-button-disabled,.swiper-button-next.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-prev.swiper-button-hidden,.swiper-button-next.swiper-button-hidden{opacity:0;cursor:auto;pointer-events:none}.swiper-navigation-disabled .swiper-button-prev,.swiper-navigation-disabled .swiper-button-next{display:none!important}.swiper-button-prev svg,.swiper-button-next svg{width:100%;height:100%;object-fit:contain;transform-origin:center}.swiper-rtl .swiper-button-prev svg,.swiper-rtl .swiper-button-next svg{transform:rotate(180deg)}.swiper-button-prev,.swiper-rtl .swiper-button-next{left:var(--swiper-navigation-sides-offset, 10px);right:auto}.swiper-button-lock{display:none}.swiper-button-prev:after,.swiper-button-next:after{font-family:swiper-icons;font-size:var(--swiper-navigation-size);text-transform:none!important;letter-spacing:0;font-variant:initial;line-height:1}.swiper-button-prev:after,.swiper-rtl .swiper-button-next:after{content:"prev"}.swiper-button-next,.swiper-rtl .swiper-button-prev{right:var(--swiper-navigation-sides-offset, 10px);left:auto}.swiper-button-next:after,.swiper-rtl .swiper-button-prev:after{content:"next"}', se = ".swiper-pagination{position:absolute;text-align:center;transition:.3s opacity;transform:translateZ(0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-pagination-disabled>.swiper-pagination,.swiper-pagination.swiper-pagination-disabled{display:none!important}.swiper-pagination-fraction,.swiper-pagination-custom,.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-bullets.swiper-pagination-horizontal{bottom:var(--swiper-pagination-bottom, 8px);top:var(--swiper-pagination-top, auto);left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active,.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{transform:scale(.33)}.swiper-pagination-bullet{width:var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 8px));height:var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 8px));display:inline-block;border-radius:var(--swiper-pagination-bullet-border-radius, 50%);background:var(--swiper-pagination-bullet-inactive-color, #000);opacity:var(--swiper-pagination-bullet-inactive-opacity, .2)}button.swiper-pagination-bullet{border:none;margin:0;padding:0;box-shadow:none;-webkit-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet:only-child{display:none!important}.swiper-pagination-bullet-active{opacity:var(--swiper-pagination-bullet-opacity, 1);background:var(--swiper-pagination-color, var(--swiper-theme-color))}.swiper-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets{right:var(--swiper-pagination-right, 8px);left:var(--swiper-pagination-left, auto);top:50%;transform:translate3d(0,-50%,0)}.swiper-vertical>.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet{margin:var(--swiper-pagination-bullet-vertical-gap, 6px) 0;display:block}.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;transform:translateY(-50%);width:8px}.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;transition:.2s transform,.2s top}.swiper-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 var(--swiper-pagination-bullet-horizontal-gap, 4px)}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;transform:translate(-50%);white-space:nowrap}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s left}.swiper-horizontal.swiper-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s right}.swiper-pagination-fraction{color:var(--swiper-pagination-fraction-color, inherit)}.swiper-pagination-progressbar{background:var(--swiper-pagination-progressbar-bg-color, rgba(0, 0, 0, .25));position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color, var(--swiper-theme-color));position:absolute;left:0;top:0;width:100%;height:100%;transform:scale(0);transform-origin:left top}.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{transform-origin:right top}.swiper-horizontal>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-horizontal,.swiper-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite{width:100%;height:var(--swiper-pagination-progressbar-size, 4px);left:0;top:0}.swiper-vertical>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-vertical,.swiper-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite{width:var(--swiper-pagination-progressbar-size, 4px);height:100%;left:0;top:0}.swiper-pagination-lock{display:none}", oe = ".swiper{width:100%;height:100%;--slidejs-swiper-navigation-color: var(--slidejs-navigation-color, #007aff);--slidejs-swiper-pagination-color: var(--slidejs-pagination-color, #007aff);--slidejs-swiper-pagination-bullet-active-color: var(--slidejs-pagination-active-color, #007aff);--slidejs-swiper-scrollbar-bg: var(--slidejs-scrollbar-bg, rgba(0, 0, 0, .1));--slidejs-swiper-scrollbar-drag-bg: var(--slidejs-scrollbar-drag-bg, rgba(0, 0, 0, .5));--swiper-navigation-color: var(--slidejs-navigation-color, #007aff);--swiper-pagination-color: var(--slidejs-pagination-color, #007aff);--swiper-pagination-bullet-active-color: var(--slidejs-pagination-active-color, #007aff);--swiper-theme-color: var(--slidejs-navigation-color, #007aff)}.swiper .swiper-button-next,.swiper .swiper-button-prev{color:var(--swiper-navigation-color, var(--slidejs-swiper-navigation-color, #007aff))!important}.swiper .swiper-pagination-bullet{background-color:var( --swiper-pagination-color, var(--slidejs-swiper-pagination-color, #007aff) )!important}.swiper .swiper-pagination-bullet-active{background-color:var( --swiper-pagination-bullet-active-color, var(--slidejs-swiper-pagination-bullet-active-color, #007aff) )!important}.swiper .swiper-scrollbar{background:var(--slidejs-swiper-scrollbar-bg, rgba(0, 0, 0, .1))!important}.swiper .swiper-scrollbar-drag{background:var(--slidejs-swiper-scrollbar-drag-bg, rgba(0, 0, 0, .5))!important}.swiper-slide{display:flex;align-items:center;justify-content:center;width:100%;height:100%;background:var(--slidejs-background-color, #fff);padding:2rem;box-sizing:border-box}.slide-content{width:100%;text-align:center}.slide-content h1{font-size:3rem;margin-bottom:1rem;color:var(--slidejs-heading-color, #333)}.slide-content h2{font-size:2rem;margin-bottom:1rem;color:var(--slidejs-heading-color, #666)}.slide-content h3{font-size:1.5rem;margin-bottom:.5rem;color:var(--slidejs-heading-color, #666)}.slide-content p{font-size:1.2rem;line-height:1.6;color:var(--slidejs-text-color, #555);margin-bottom:1rem}.slide-content ul{text-align:left;display:inline-block;font-size:1.2rem;line-height:1.8;color:var(--slidejs-text-color, #555)}.slide-content li{margin-bottom:.5rem}.slide-content img{border-radius:8px;box-shadow:0 4px 12px #0000001a}.swiper-button-next:after,.swiper-button-prev:after{font-size:24px}.swiper-pagination-bullet{opacity:.5}.swiper-pagination-bullet-active{opacity:1}";
|
|
893
|
-
async function
|
|
894
|
-
const t = await U(
|
|
895
|
-
if (!document.head.querySelector(`#${
|
|
896
|
-
const
|
|
897
|
-
|
|
898
|
-
}
|
|
899
|
-
|
|
900
|
-
if (
|
|
901
|
-
const
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
if (!document.head.querySelector(`#${h}`)) {
|
|
906
|
-
const w = document.createElement("style");
|
|
907
|
-
w.id = h, w.textContent = se, document.head.appendChild(w);
|
|
908
|
-
}
|
|
909
|
-
let g;
|
|
910
|
-
if (typeof r.container == "string") {
|
|
911
|
-
const w = document.querySelector(r.container);
|
|
912
|
-
if (!w)
|
|
913
|
-
throw new Error(`Container not found: ${r.container}`);
|
|
914
|
-
g = w;
|
|
886
|
+
const se = '@font-face{font-family:swiper-icons;src:url(data:application/font-woff;charset=utf-8;base64,\\ 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);font-weight:400;font-style:normal}:root{--swiper-theme-color: #007aff}:host{position:relative;display:block;margin-left:auto;margin-right:auto;z-index:1}.swiper{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1;display:block}.swiper-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;transition-timing-function:var(--swiper-wrapper-transition-timing-function, initial);box-sizing:content-box}.swiper-android .swiper-slide,.swiper-ios .swiper-slide,.swiper-wrapper{transform:translateZ(0)}.swiper-horizontal{touch-action:pan-y}.swiper-vertical{touch-action:pan-x}.swiper-slide{flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform;display:block}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-backface-hidden .swiper-slide{transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-3d.swiper-css-mode .swiper-wrapper{perspective:1200px}.swiper-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-3d{perspective:1200px}.swiper-3d .swiper-slide,.swiper-3d .swiper-cube-shadow{transform-style:preserve-3d}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-css-mode.swiper-horizontal>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-css-mode.swiper-vertical>.swiper-wrapper{scroll-snap-type:y mandatory}.swiper-css-mode.swiper-free-mode>.swiper-wrapper{scroll-snap-type:none}.swiper-css-mode.swiper-free-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:none}.swiper-css-mode.swiper-centered>.swiper-wrapper:before{content:"";flex-shrink:0;order:9999}.swiper-css-mode.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center;scroll-snap-stop:always}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{margin-inline-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper:before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{margin-block-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper:before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-slide-shadow-bottom{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-3d .swiper-slide-shadow{background:#00000026}.swiper-3d .swiper-slide-shadow-left{background-image:linear-gradient(to left,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-right{background-image:linear-gradient(to right,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-top{background-image:linear-gradient(to top,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(to bottom,#00000080,#0000)}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;transform-origin:50%;box-sizing:border-box;border:4px solid var(--swiper-preloader-color, var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader,.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader{animation:swiper-preloader-spin 1s infinite linear}.swiper-lazy-preloader-white{--swiper-preloader-color: #fff}.swiper-lazy-preloader-black{--swiper-preloader-color: #000}@keyframes swiper-preloader-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.swiper-virtual .swiper-slide{-webkit-backface-visibility:hidden;transform:translateZ(0)}.swiper-virtual.swiper-css-mode .swiper-wrapper:after{content:"";position:absolute;left:0;top:0;pointer-events:none}.swiper-virtual.swiper-css-mode.swiper-horizontal .swiper-wrapper:after{height:1px;width:var(--swiper-virtual-size)}.swiper-virtual.swiper-css-mode.swiper-vertical .swiper-wrapper:after{width:1px;height:var(--swiper-virtual-size)}:root{--swiper-navigation-size: 44px}.swiper-button-prev,.swiper-button-next{position:absolute;top:var(--swiper-navigation-top-offset, 50%);width:calc(var(--swiper-navigation-size) / 44 * 27);height:var(--swiper-navigation-size);margin-top:calc(0px - (var(--swiper-navigation-size) / 2));z-index:10;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--swiper-navigation-color, var(--swiper-theme-color))}.swiper-button-prev.swiper-button-disabled,.swiper-button-next.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-prev.swiper-button-hidden,.swiper-button-next.swiper-button-hidden{opacity:0;cursor:auto;pointer-events:none}.swiper-navigation-disabled .swiper-button-prev,.swiper-navigation-disabled .swiper-button-next{display:none!important}.swiper-button-prev svg,.swiper-button-next svg{width:100%;height:100%;object-fit:contain;transform-origin:center}.swiper-rtl .swiper-button-prev svg,.swiper-rtl .swiper-button-next svg{transform:rotate(180deg)}.swiper-button-prev,.swiper-rtl .swiper-button-next{left:var(--swiper-navigation-sides-offset, 10px);right:auto}.swiper-button-lock{display:none}.swiper-button-prev:after,.swiper-button-next:after{font-family:swiper-icons;font-size:var(--swiper-navigation-size);text-transform:none!important;letter-spacing:0;font-variant:initial;line-height:1}.swiper-button-prev:after,.swiper-rtl .swiper-button-next:after{content:"prev"}.swiper-button-next,.swiper-rtl .swiper-button-prev{right:var(--swiper-navigation-sides-offset, 10px);left:auto}.swiper-button-next:after,.swiper-rtl .swiper-button-prev:after{content:"next"}.swiper-pagination{position:absolute;text-align:center;transition:.3s opacity;transform:translateZ(0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-pagination-disabled>.swiper-pagination,.swiper-pagination.swiper-pagination-disabled{display:none!important}.swiper-pagination-fraction,.swiper-pagination-custom,.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-bullets.swiper-pagination-horizontal{bottom:var(--swiper-pagination-bottom, 8px);top:var(--swiper-pagination-top, auto);left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active,.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{transform:scale(.33)}.swiper-pagination-bullet{width:var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 8px));height:var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 8px));display:inline-block;border-radius:var(--swiper-pagination-bullet-border-radius, 50%);background:var(--swiper-pagination-bullet-inactive-color, #000);opacity:var(--swiper-pagination-bullet-inactive-opacity, .2)}button.swiper-pagination-bullet{border:none;margin:0;padding:0;box-shadow:none;-webkit-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet:only-child{display:none!important}.swiper-pagination-bullet-active{opacity:var(--swiper-pagination-bullet-opacity, 1);background:var(--swiper-pagination-color, var(--swiper-theme-color))}.swiper-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets{right:var(--swiper-pagination-right, 8px);left:var(--swiper-pagination-left, auto);top:50%;transform:translate3d(0,-50%,0)}.swiper-vertical>.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet{margin:var(--swiper-pagination-bullet-vertical-gap, 6px) 0;display:block}.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;transform:translateY(-50%);width:8px}.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;transition:.2s transform,.2s top}.swiper-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 var(--swiper-pagination-bullet-horizontal-gap, 4px)}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;transform:translate(-50%);white-space:nowrap}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s left}.swiper-horizontal.swiper-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s right}.swiper-pagination-fraction{color:var(--swiper-pagination-fraction-color, inherit)}.swiper-pagination-progressbar{background:var(--swiper-pagination-progressbar-bg-color, rgba(0, 0, 0, .25));position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color, var(--swiper-theme-color));position:absolute;left:0;top:0;width:100%;height:100%;transform:scale(0);transform-origin:left top}.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{transform-origin:right top}.swiper-horizontal>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-horizontal,.swiper-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite{width:100%;height:var(--swiper-pagination-progressbar-size, 4px);left:0;top:0}.swiper-vertical>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-vertical,.swiper-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite{width:var(--swiper-pagination-progressbar-size, 4px);height:100%;left:0;top:0}.swiper-pagination-lock{display:none}.swiper-scrollbar{border-radius:var(--swiper-scrollbar-border-radius, 10px);position:relative;touch-action:none;background:var(--swiper-scrollbar-bg-color, rgba(0, 0, 0, .1))}.swiper-scrollbar-disabled>.swiper-scrollbar,.swiper-scrollbar.swiper-scrollbar-disabled{display:none!important}.swiper-horizontal>.swiper-scrollbar,.swiper-scrollbar.swiper-scrollbar-horizontal{position:absolute;left:var(--swiper-scrollbar-sides-offset, 1%);bottom:var(--swiper-scrollbar-bottom, 4px);top:var(--swiper-scrollbar-top, auto);z-index:50;height:var(--swiper-scrollbar-size, 4px);width:calc(100% - 2 * var(--swiper-scrollbar-sides-offset, 1%))}.swiper-vertical>.swiper-scrollbar,.swiper-scrollbar.swiper-scrollbar-vertical{position:absolute;left:var(--swiper-scrollbar-left, auto);right:var(--swiper-scrollbar-right, 4px);top:var(--swiper-scrollbar-sides-offset, 1%);z-index:50;width:var(--swiper-scrollbar-size, 4px);height:calc(100% - 2 * var(--swiper-scrollbar-sides-offset, 1%))}.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:var(--swiper-scrollbar-drag-bg-color, rgba(0, 0, 0, .5));border-radius:var(--swiper-scrollbar-border-radius, 10px);left:0;top:0}.swiper-scrollbar-cursor-drag{cursor:move}.swiper-scrollbar-lock{display:none}.swiper-zoom-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center;text-align:center}.swiper-zoom-container>img,.swiper-zoom-container>svg,.swiper-zoom-container>canvas{max-width:100%;max-height:100%;object-fit:contain}.swiper-slide-zoomed{cursor:move;touch-action:none}.swiper .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}.swiper-free-mode>.swiper-wrapper{transition-timing-function:ease-out;margin:0 auto}.swiper-grid>.swiper-wrapper{flex-wrap:wrap}.swiper-grid-column>.swiper-wrapper{flex-wrap:wrap;flex-direction:column}.swiper-fade.swiper-free-mode .swiper-slide{transition-timing-function:ease-out}.swiper-fade .swiper-slide{pointer-events:none;transition-property:opacity}.swiper-fade .swiper-slide .swiper-slide{pointer-events:none}.swiper-fade .swiper-slide-active,.swiper-fade .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper.swiper-cube{overflow:visible}.swiper-cube .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1;visibility:hidden;transform-origin:0 0;width:100%;height:100%}.swiper-cube .swiper-slide .swiper-slide{pointer-events:none}.swiper-cube.swiper-rtl .swiper-slide{transform-origin:100% 0}.swiper-cube .swiper-slide-active,.swiper-cube .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-cube .swiper-slide-active,.swiper-cube .swiper-slide-next,.swiper-cube .swiper-slide-prev{pointer-events:auto;visibility:visible}.swiper-cube .swiper-cube-shadow{position:absolute;left:0;bottom:0;width:100%;height:100%;opacity:.6;z-index:0}.swiper-cube .swiper-cube-shadow:before{content:"";background:#000;position:absolute;inset:0;filter:blur(50px)}.swiper-cube .swiper-slide-next+.swiper-slide{pointer-events:auto;visibility:visible}.swiper-cube .swiper-slide-shadow-cube.swiper-slide-shadow-top,.swiper-cube .swiper-slide-shadow-cube.swiper-slide-shadow-bottom,.swiper-cube .swiper-slide-shadow-cube.swiper-slide-shadow-left,.swiper-cube .swiper-slide-shadow-cube.swiper-slide-shadow-right{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper.swiper-flip{overflow:visible}.swiper-flip .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1}.swiper-flip .swiper-slide .swiper-slide{pointer-events:none}.swiper-flip .swiper-slide-active,.swiper-flip .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-flip .swiper-slide-shadow-flip.swiper-slide-shadow-top,.swiper-flip .swiper-slide-shadow-flip.swiper-slide-shadow-bottom,.swiper-flip .swiper-slide-shadow-flip.swiper-slide-shadow-left,.swiper-flip .swiper-slide-shadow-flip.swiper-slide-shadow-right{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-creative .swiper-slide{-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden;transition-property:transform,opacity,height}.swiper.swiper-cards{overflow:visible}.swiper-cards .swiper-slide{transform-origin:center bottom;-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden}', ne = ".swiper{width:100%;height:100%;--slidejs-swiper-navigation-color: var(--slidejs-navigation-color, #007aff);--slidejs-swiper-pagination-color: var(--slidejs-pagination-color, #007aff);--slidejs-swiper-pagination-bullet-active-color: var(--slidejs-pagination-active-color, #007aff);--slidejs-swiper-scrollbar-bg: var(--slidejs-scrollbar-bg, rgba(0, 0, 0, .1));--slidejs-swiper-scrollbar-drag-bg: var(--slidejs-scrollbar-drag-bg, rgba(0, 0, 0, .5));--swiper-navigation-color: var(--slidejs-navigation-color, #007aff);--swiper-pagination-color: var(--slidejs-pagination-color, #007aff);--swiper-pagination-bullet-active-color: var(--slidejs-pagination-active-color, #007aff);--swiper-theme-color: var(--slidejs-navigation-color, #007aff)}.swiper .swiper-button-next,.swiper .swiper-button-prev{color:var(--swiper-navigation-color, var(--slidejs-swiper-navigation-color, #007aff))!important}.swiper .swiper-pagination-bullet{background-color:var( --swiper-pagination-color, var(--slidejs-swiper-pagination-color, #007aff) )!important}.swiper .swiper-pagination-bullet-active{background-color:var( --swiper-pagination-bullet-active-color, var(--slidejs-swiper-pagination-bullet-active-color, #007aff) )!important}.swiper .swiper-scrollbar{background:var(--slidejs-swiper-scrollbar-bg, rgba(0, 0, 0, .1))!important}.swiper .swiper-scrollbar-drag{background:var(--slidejs-swiper-scrollbar-drag-bg, rgba(0, 0, 0, .5))!important}.swiper-slide{display:flex;align-items:center;justify-content:center;width:100%;height:100%;background:var(--slidejs-background-color, #fff);padding:2rem;box-sizing:border-box}.slide-content{width:100%;text-align:center}.slide-content h1{font-size:3rem;margin-bottom:1rem;color:var(--slidejs-heading-color, #333)}.slide-content h2{font-size:2rem;margin-bottom:1rem;color:var(--slidejs-heading-color, #666)}.slide-content h3{font-size:1.5rem;margin-bottom:.5rem;color:var(--slidejs-heading-color, #666)}.slide-content p{font-size:1.2rem;line-height:1.6;color:var(--slidejs-text-color, #555);margin-bottom:1rem}.slide-content ul{text-align:left;display:inline-block;font-size:1.2rem;line-height:1.8;color:var(--slidejs-text-color, #555)}.slide-content li{margin-bottom:.5rem}.slide-content img{border-radius:8px;box-shadow:0 4px 12px #0000001a}.swiper-button-next:after,.swiper-button-prev:after{font-size:24px}.swiper-pagination-bullet{opacity:.5}.swiper-pagination-bullet-active{opacity:1}";
|
|
887
|
+
async function pe(n, e, s) {
|
|
888
|
+
const t = await U(n), p = V(t), a = "swiper-bundle-styles";
|
|
889
|
+
if (!document.head.querySelector(`#${a}`)) {
|
|
890
|
+
const v = document.createElement("style");
|
|
891
|
+
v.id = a, v.textContent = se, document.head.appendChild(v);
|
|
892
|
+
}
|
|
893
|
+
let f;
|
|
894
|
+
if (typeof s.container == "string") {
|
|
895
|
+
const v = document.querySelector(s.container);
|
|
896
|
+
if (!v)
|
|
897
|
+
throw new Error(`Container not found: ${s.container}`);
|
|
898
|
+
f = v;
|
|
915
899
|
} else
|
|
916
|
-
|
|
917
|
-
const
|
|
918
|
-
if (!
|
|
919
|
-
const
|
|
920
|
-
|
|
921
|
-
}
|
|
922
|
-
const
|
|
923
|
-
|
|
924
|
-
const
|
|
925
|
-
container:
|
|
926
|
-
adapter:
|
|
900
|
+
f = s.container;
|
|
901
|
+
const h = "slidejs-runner-swiper-styles";
|
|
902
|
+
if (!f.querySelector(`#${h}`)) {
|
|
903
|
+
const v = document.createElement("style");
|
|
904
|
+
v.id = h, v.textContent = ne, f.appendChild(v);
|
|
905
|
+
}
|
|
906
|
+
const w = document.createElement("div");
|
|
907
|
+
f.appendChild(w);
|
|
908
|
+
const B = new re(), S = new K({
|
|
909
|
+
container: w,
|
|
910
|
+
adapter: B,
|
|
927
911
|
adapterOptions: {
|
|
928
|
-
swiperConfig:
|
|
912
|
+
swiperConfig: s.swiperOptions
|
|
929
913
|
}
|
|
930
914
|
});
|
|
931
|
-
return await
|
|
915
|
+
return await S.run(p, e), S;
|
|
932
916
|
}
|
|
933
917
|
export {
|
|
934
|
-
|
|
935
|
-
|
|
918
|
+
re as SwiperAdapter,
|
|
919
|
+
pe as createSlideRunner
|
|
936
920
|
};
|
|
937
921
|
//# sourceMappingURL=index.mjs.map
|