@cntrl-site/components 1.0.1-alpha.13 → 1.0.1-alpha.14
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/dist/index.js +27 -20
- package/dist/index.mjs +1168 -1159
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as O, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { s as F, u as
|
|
1
|
+
import { jsx as O, Fragment as Te, jsxs as St } from "react/jsx-runtime";
|
|
2
|
+
import oe, { useState as ct, useEffect as bt, useRef as wt, useCallback as gr } from "react";
|
|
3
|
+
import dt from "classnames";
|
|
4
|
+
import { s as F, u as $o, g as Xe } from "./useScopedStyles-Da2iLz5N.mjs";
|
|
5
5
|
import { createPortal as fr } from "react-dom";
|
|
6
|
-
function
|
|
6
|
+
function Vl(t) {
|
|
7
7
|
return t.type === "object" && t.version === 1;
|
|
8
8
|
}
|
|
9
9
|
const mr = "ControlSlider-module__wrapper___sHEkd", yr = "ControlSlider-module__hoverArrow___A-dOH", hr = "ControlSlider-module__sliderItem___QQSkR", vr = "ControlSlider-module__sliderImage___9hRl-", br = "ControlSlider-module__arrow___05ghY", Sr = "ControlSlider-module__arrowVertical___tBfVN", Cr = "ControlSlider-module__nextArrow___-30Yc", xr = "ControlSlider-module__arrowInner___aEra3", $r = "ControlSlider-module__arrowIcon___S4ztF", _r = "ControlSlider-module__arrowImg___2dwJW", wr = "ControlSlider-module__mirror___brd6U", Tr = "ControlSlider-module__pagination___bicLF", Lr = "ControlSlider-module__paginationInner___bT-P-", Ar = "ControlSlider-module__paginationVertical___zYqKw", Er = "ControlSlider-module__paginationItem___nTRbk", Ir = "ControlSlider-module__dot___p1Qun", kr = "ControlSlider-module__activeDot___LHFaj", Fr = "ControlSlider-module__paginationInsideBottom___R3FWn", Rr = "ControlSlider-module__paginationInsideTop___V-qb-", Or = "ControlSlider-module__paginationOutsideBottom___14w8D", Pr = "ControlSlider-module__paginationOutsideTop___SCLqB", Br = "ControlSlider-module__paginationInsideLeft___yOBRZ", Nr = "ControlSlider-module__paginationInsideRight___Rtt3o", Wr = "ControlSlider-module__paginationOutsideLeft___lahaw", zr = "ControlSlider-module__paginationOutsideRight___EtuQa", Vr = "ControlSlider-module__imgWrapper___UjEgB", Mr = "ControlSlider-module__captionBlock___dJ6-j", Dr = "ControlSlider-module__captionTextWrapper___HFlpf", Hr = "ControlSlider-module__captionText___uGBVc", jr = "ControlSlider-module__active___WZK4G", Ur = "ControlSlider-module__withPointerEvents___t-18M", Yr = "ControlSlider-module__topLeftAlignment___zjnGM", Gr = "ControlSlider-module__topCenterAlignment___gD1xW", qr = "ControlSlider-module__topRightAlignment___NMapS", Xr = "ControlSlider-module__middleLeftAlignment___OnUrY", Kr = "ControlSlider-module__middleCenterAlignment___Tdkl0", Jr = "ControlSlider-module__middleRightAlignment___wEbfX", Zr = "ControlSlider-module__bottomLeftAlignment___cTP2-", Qr = "ControlSlider-module__bottomCenterAlignment___c54fB", ti = "ControlSlider-module__bottomRightAlignment___kEwrz", ei = "ControlSlider-module__clickOverlay___DZA28", ni = "ControlSlider-module__contain___pLyq7", oi = "ControlSlider-module__cover___KdDat", U = {
|
|
@@ -60,109 +60,109 @@ function ri(t, e) {
|
|
|
60
60
|
function ii(t, e, n) {
|
|
61
61
|
return e && ri(t.prototype, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
|
|
62
62
|
}
|
|
63
|
-
var
|
|
64
|
-
CREATED:
|
|
63
|
+
var Jn = "(prefers-reduced-motion: reduce)", fe = 1, ai = 2, he = 3, Se = 4, Oe = 5, Ue = 6, Ke = 7, li = {
|
|
64
|
+
CREATED: fe,
|
|
65
65
|
MOUNTED: ai,
|
|
66
|
-
IDLE:
|
|
67
|
-
MOVING:
|
|
68
|
-
SCROLLING:
|
|
69
|
-
DRAGGING:
|
|
70
|
-
DESTROYED:
|
|
66
|
+
IDLE: he,
|
|
67
|
+
MOVING: Se,
|
|
68
|
+
SCROLLING: Oe,
|
|
69
|
+
DRAGGING: Ue,
|
|
70
|
+
DESTROYED: Ke
|
|
71
71
|
};
|
|
72
|
-
function
|
|
72
|
+
function jt(t) {
|
|
73
73
|
t.length = 0;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function Qt(t, e, n) {
|
|
76
76
|
return Array.prototype.slice.call(t, e, n);
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
return t.bind.apply(t, [null].concat(
|
|
78
|
+
function ut(t) {
|
|
79
|
+
return t.bind.apply(t, [null].concat(Qt(arguments, 1)));
|
|
80
80
|
}
|
|
81
|
-
var
|
|
81
|
+
var _o = setTimeout, Sn = function() {
|
|
82
82
|
};
|
|
83
|
-
function
|
|
83
|
+
function Zn(t) {
|
|
84
84
|
return requestAnimationFrame(t);
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function en(t, e) {
|
|
87
87
|
return typeof e === t;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
return !
|
|
89
|
+
function Le(t) {
|
|
90
|
+
return !In(t) && en("object", t);
|
|
91
91
|
}
|
|
92
|
-
var
|
|
93
|
-
function
|
|
92
|
+
var En = Array.isArray, wo = ut(en, "function"), Jt = ut(en, "string"), Pe = ut(en, "undefined");
|
|
93
|
+
function In(t) {
|
|
94
94
|
return t === null;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function To(t) {
|
|
97
97
|
try {
|
|
98
98
|
return t instanceof (t.ownerDocument.defaultView || window).HTMLElement;
|
|
99
99
|
} catch {
|
|
100
100
|
return !1;
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
function
|
|
104
|
-
return
|
|
103
|
+
function Be(t) {
|
|
104
|
+
return En(t) ? t : [t];
|
|
105
105
|
}
|
|
106
106
|
function Et(t, e) {
|
|
107
|
-
|
|
107
|
+
Be(t).forEach(e);
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function kn(t, e) {
|
|
110
110
|
return t.indexOf(e) > -1;
|
|
111
111
|
}
|
|
112
|
-
function
|
|
113
|
-
return t.push.apply(t,
|
|
112
|
+
function Ye(t, e) {
|
|
113
|
+
return t.push.apply(t, Be(e)), t;
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function Mt(t, e, n) {
|
|
116
116
|
t && Et(e, function(o) {
|
|
117
117
|
o && t.classList[n ? "add" : "remove"](o);
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
120
|
function Pt(t, e) {
|
|
121
|
-
|
|
121
|
+
Mt(t, Jt(e) ? e.split(" ") : e, !0);
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function Ne(t, e) {
|
|
124
124
|
Et(e, t.appendChild.bind(t));
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function Fn(t, e) {
|
|
127
127
|
Et(t, function(n) {
|
|
128
128
|
var o = (e || n).parentNode;
|
|
129
129
|
o && o.insertBefore(n, e);
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
|
-
function
|
|
133
|
-
return
|
|
132
|
+
function Ae(t, e) {
|
|
133
|
+
return To(t) && (t.msMatchesSelector || t.matches).call(t, e);
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
var n = t ?
|
|
135
|
+
function Lo(t, e) {
|
|
136
|
+
var n = t ? Qt(t.children) : [];
|
|
137
137
|
return e ? n.filter(function(o) {
|
|
138
|
-
return
|
|
138
|
+
return Ae(o, e);
|
|
139
139
|
}) : n;
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
return e ?
|
|
141
|
+
function We(t, e) {
|
|
142
|
+
return e ? Lo(t, e)[0] : t.firstElementChild;
|
|
143
143
|
}
|
|
144
|
-
var
|
|
145
|
-
function
|
|
146
|
-
return t && (n ?
|
|
144
|
+
var Ee = Object.keys;
|
|
145
|
+
function re(t, e, n) {
|
|
146
|
+
return t && (n ? Ee(t).reverse() : Ee(t)).forEach(function(o) {
|
|
147
147
|
o !== "__proto__" && e(t[o], o);
|
|
148
148
|
}), t;
|
|
149
149
|
}
|
|
150
|
-
function
|
|
151
|
-
return
|
|
152
|
-
|
|
150
|
+
function Ie(t) {
|
|
151
|
+
return Qt(arguments, 1).forEach(function(e) {
|
|
152
|
+
re(e, function(n, o) {
|
|
153
153
|
t[o] = e[o];
|
|
154
154
|
});
|
|
155
155
|
}), t;
|
|
156
156
|
}
|
|
157
|
-
function
|
|
158
|
-
return
|
|
159
|
-
|
|
160
|
-
|
|
157
|
+
function Kt(t) {
|
|
158
|
+
return Qt(arguments, 1).forEach(function(e) {
|
|
159
|
+
re(e, function(n, o) {
|
|
160
|
+
En(n) ? t[o] = n.slice() : Le(n) ? t[o] = Kt({}, Le(t[o]) ? t[o] : {}, n) : t[o] = n;
|
|
161
161
|
});
|
|
162
162
|
}), t;
|
|
163
163
|
}
|
|
164
|
-
function
|
|
165
|
-
Et(e ||
|
|
164
|
+
function Qn(t, e) {
|
|
165
|
+
Et(e || Ee(t), function(n) {
|
|
166
166
|
delete t[n];
|
|
167
167
|
});
|
|
168
168
|
}
|
|
@@ -174,108 +174,108 @@ function Bt(t, e) {
|
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
176
|
function Q(t, e, n) {
|
|
177
|
-
|
|
177
|
+
Le(e) ? re(e, function(o, r) {
|
|
178
178
|
Q(t, r, o);
|
|
179
179
|
}) : Et(t, function(o) {
|
|
180
|
-
|
|
180
|
+
In(n) || n === "" ? Bt(o, e) : o.setAttribute(e, String(n));
|
|
181
181
|
});
|
|
182
182
|
}
|
|
183
|
-
function
|
|
183
|
+
function me(t, e, n) {
|
|
184
184
|
var o = document.createElement(t);
|
|
185
|
-
return e && (
|
|
185
|
+
return e && (Jt(e) ? Pt(o, e) : Q(o, e)), n && Ne(n, o), o;
|
|
186
186
|
}
|
|
187
|
-
function
|
|
188
|
-
if (
|
|
187
|
+
function Ft(t, e, n) {
|
|
188
|
+
if (Pe(n))
|
|
189
189
|
return getComputedStyle(t)[e];
|
|
190
|
-
|
|
190
|
+
In(n) || (t.style[e] = "" + n);
|
|
191
191
|
}
|
|
192
|
-
function
|
|
193
|
-
|
|
192
|
+
function ke(t, e) {
|
|
193
|
+
Ft(t, "display", e);
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function Ao(t) {
|
|
196
196
|
t.setActive && t.setActive() || t.focus({
|
|
197
197
|
preventScroll: !0
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
|
-
function
|
|
200
|
+
function Rt(t, e) {
|
|
201
201
|
return t.getAttribute(e);
|
|
202
202
|
}
|
|
203
|
-
function
|
|
203
|
+
function to(t, e) {
|
|
204
204
|
return t && t.classList.contains(e);
|
|
205
205
|
}
|
|
206
206
|
function Lt(t) {
|
|
207
207
|
return t.getBoundingClientRect();
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function ie(t) {
|
|
210
210
|
Et(t, function(e) {
|
|
211
211
|
e && e.parentNode && e.parentNode.removeChild(e);
|
|
212
212
|
});
|
|
213
213
|
}
|
|
214
|
-
function
|
|
215
|
-
return
|
|
214
|
+
function Eo(t) {
|
|
215
|
+
return We(new DOMParser().parseFromString(t, "text/html").body);
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function Vt(t, e) {
|
|
218
218
|
t.preventDefault(), e && (t.stopPropagation(), t.stopImmediatePropagation());
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function Io(t, e) {
|
|
221
221
|
return t && t.querySelector(e);
|
|
222
222
|
}
|
|
223
|
-
function
|
|
224
|
-
return e ?
|
|
223
|
+
function Rn(t, e) {
|
|
224
|
+
return e ? Qt(t.querySelectorAll(e)) : [];
|
|
225
225
|
}
|
|
226
|
-
function
|
|
227
|
-
|
|
226
|
+
function Dt(t, e) {
|
|
227
|
+
Mt(t, e, !1);
|
|
228
228
|
}
|
|
229
|
-
function
|
|
229
|
+
function Cn(t) {
|
|
230
230
|
return t.timeStamp;
|
|
231
231
|
}
|
|
232
|
-
function
|
|
233
|
-
return
|
|
232
|
+
function ne(t) {
|
|
233
|
+
return Jt(t) ? t : t ? t + "px" : "";
|
|
234
234
|
}
|
|
235
|
-
var
|
|
236
|
-
function
|
|
235
|
+
var ze = "splide", On = "data-" + ze;
|
|
236
|
+
function $e(t, e) {
|
|
237
237
|
if (!t)
|
|
238
|
-
throw new Error("[" +
|
|
238
|
+
throw new Error("[" + ze + "] " + (e || ""));
|
|
239
239
|
}
|
|
240
|
-
var
|
|
241
|
-
function
|
|
242
|
-
return
|
|
240
|
+
var Zt = Math.min, Je = Math.max, Ze = Math.floor, Fe = Math.ceil, $t = Math.abs;
|
|
241
|
+
function ko(t, e, n) {
|
|
242
|
+
return $t(t - e) < n;
|
|
243
243
|
}
|
|
244
|
-
function
|
|
245
|
-
var r =
|
|
244
|
+
function Ge(t, e, n, o) {
|
|
245
|
+
var r = Zt(e, n), a = Je(e, n);
|
|
246
246
|
return o ? r < t && t < a : r <= t && t <= a;
|
|
247
247
|
}
|
|
248
|
-
function
|
|
249
|
-
var o =
|
|
250
|
-
return
|
|
248
|
+
function de(t, e, n) {
|
|
249
|
+
var o = Zt(e, n), r = Je(e, n);
|
|
250
|
+
return Zt(Je(o, t), r);
|
|
251
251
|
}
|
|
252
|
-
function
|
|
252
|
+
function xn(t) {
|
|
253
253
|
return +(t > 0) - +(t < 0);
|
|
254
254
|
}
|
|
255
|
-
function
|
|
255
|
+
function $n(t, e) {
|
|
256
256
|
return Et(e, function(n) {
|
|
257
257
|
t = t.replace("%s", "" + n);
|
|
258
258
|
}), t;
|
|
259
259
|
}
|
|
260
|
-
function
|
|
260
|
+
function Pn(t) {
|
|
261
261
|
return t < 10 ? "0" + t : "" + t;
|
|
262
262
|
}
|
|
263
|
-
var
|
|
263
|
+
var eo = {};
|
|
264
264
|
function si(t) {
|
|
265
|
-
return "" + t +
|
|
265
|
+
return "" + t + Pn(eo[t] = (eo[t] || 0) + 1);
|
|
266
266
|
}
|
|
267
|
-
function
|
|
267
|
+
function Fo() {
|
|
268
268
|
var t = [];
|
|
269
269
|
function e(i, c, l, p) {
|
|
270
|
-
r(i, c, function(u, C,
|
|
270
|
+
r(i, c, function(u, C, h) {
|
|
271
271
|
var g = "addEventListener" in u, s = g ? u.removeEventListener.bind(u, C, l, p) : u.removeListener.bind(u, l);
|
|
272
|
-
g ? u.addEventListener(C, l, p) : u.addListener(l), t.push([u, C,
|
|
272
|
+
g ? u.addEventListener(C, l, p) : u.addListener(l), t.push([u, C, h, l, s]);
|
|
273
273
|
});
|
|
274
274
|
}
|
|
275
275
|
function n(i, c, l) {
|
|
276
276
|
r(i, c, function(p, u, C) {
|
|
277
|
-
t = t.filter(function(
|
|
278
|
-
return
|
|
277
|
+
t = t.filter(function(h) {
|
|
278
|
+
return h[0] === p && h[1] === u && h[2] === C && (!l || h[3] === l) ? (h[4](), !1) : !0;
|
|
279
279
|
});
|
|
280
280
|
});
|
|
281
281
|
}
|
|
@@ -290,8 +290,8 @@ function ko() {
|
|
|
290
290
|
Et(i, function(p) {
|
|
291
291
|
p && Et(c, function(u) {
|
|
292
292
|
u.split(" ").forEach(function(C) {
|
|
293
|
-
var
|
|
294
|
-
l(p,
|
|
293
|
+
var h = C.split(".");
|
|
294
|
+
l(p, h[0], h[1]);
|
|
295
295
|
});
|
|
296
296
|
});
|
|
297
297
|
});
|
|
@@ -299,7 +299,7 @@ function ko() {
|
|
|
299
299
|
function a() {
|
|
300
300
|
t.forEach(function(i) {
|
|
301
301
|
i[4]();
|
|
302
|
-
}),
|
|
302
|
+
}), jt(t);
|
|
303
303
|
}
|
|
304
304
|
return {
|
|
305
305
|
bind: e,
|
|
@@ -308,37 +308,37 @@ function ko() {
|
|
|
308
308
|
destroy: a
|
|
309
309
|
};
|
|
310
310
|
}
|
|
311
|
-
var
|
|
312
|
-
function
|
|
313
|
-
var e = t ? t.event.bus : document.createDocumentFragment(), n =
|
|
311
|
+
var te = "mounted", _n = "ready", Ut = "move", Ce = "moved", Bn = "click", Ro = "active", Oo = "inactive", Po = "visible", Bo = "hidden", ht = "refresh", Ct = "updated", ve = "resize", nn = "resized", No = "drag", Wo = "dragging", zo = "dragged", on = "scroll", le = "scrolled", ci = "overflow", Nn = "destroy", Vo = "arrows:mounted", Mo = "arrows:updated", Do = "pagination:mounted", Ho = "pagination:updated", Wn = "navigation:mounted", zn = "autoplay:play", jo = "autoplay:playing", Vn = "autoplay:pause", Mn = "lazyload:loaded", Uo = "sk", Yo = "sh", Qe = "ei";
|
|
312
|
+
function gt(t) {
|
|
313
|
+
var e = t ? t.event.bus : document.createDocumentFragment(), n = Fo();
|
|
314
314
|
function o(a, i) {
|
|
315
|
-
n.bind(e,
|
|
316
|
-
i.apply(i,
|
|
315
|
+
n.bind(e, Be(a).join(" "), function(c) {
|
|
316
|
+
i.apply(i, En(c.detail) ? c.detail : []);
|
|
317
317
|
});
|
|
318
318
|
}
|
|
319
319
|
function r(a) {
|
|
320
|
-
n.dispatch(e, a,
|
|
320
|
+
n.dispatch(e, a, Qt(arguments, 1));
|
|
321
321
|
}
|
|
322
|
-
return t && t.event.on(
|
|
322
|
+
return t && t.event.on(Nn, n.destroy), Ie(n, {
|
|
323
323
|
bus: e,
|
|
324
324
|
on: o,
|
|
325
|
-
off:
|
|
325
|
+
off: ut(n.unbind, e),
|
|
326
326
|
emit: r
|
|
327
327
|
});
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function rn(t, e, n, o) {
|
|
330
330
|
var r = Date.now, a, i = 0, c, l = !0, p = 0;
|
|
331
331
|
function u() {
|
|
332
332
|
if (!l) {
|
|
333
|
-
if (i = t ?
|
|
334
|
-
return
|
|
335
|
-
c =
|
|
333
|
+
if (i = t ? Zt((r() - a) / t, 1) : 1, n && n(i), i >= 1 && (e(), a = r(), o && ++p >= o))
|
|
334
|
+
return h();
|
|
335
|
+
c = Zn(u);
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
|
-
function C(
|
|
339
|
-
|
|
338
|
+
function C(b) {
|
|
339
|
+
b || s(), a = r() - (b ? i * t : 0), l = !1, c = Zn(u);
|
|
340
340
|
}
|
|
341
|
-
function
|
|
341
|
+
function h() {
|
|
342
342
|
l = !0;
|
|
343
343
|
}
|
|
344
344
|
function g() {
|
|
@@ -347,8 +347,8 @@ function en(t, e, n, o) {
|
|
|
347
347
|
function s() {
|
|
348
348
|
c && cancelAnimationFrame(c), i = 0, c = 0, l = !0;
|
|
349
349
|
}
|
|
350
|
-
function d(
|
|
351
|
-
t =
|
|
350
|
+
function d(b) {
|
|
351
|
+
t = b;
|
|
352
352
|
}
|
|
353
353
|
function w() {
|
|
354
354
|
return l;
|
|
@@ -356,7 +356,7 @@ function en(t, e, n, o) {
|
|
|
356
356
|
return {
|
|
357
357
|
start: C,
|
|
358
358
|
rewind: g,
|
|
359
|
-
pause:
|
|
359
|
+
pause: h,
|
|
360
360
|
cancel: s,
|
|
361
361
|
set: d,
|
|
362
362
|
isPaused: w
|
|
@@ -368,7 +368,7 @@ function ui(t) {
|
|
|
368
368
|
e = r;
|
|
369
369
|
}
|
|
370
370
|
function o(r) {
|
|
371
|
-
return
|
|
371
|
+
return kn(Be(r), e);
|
|
372
372
|
}
|
|
373
373
|
return {
|
|
374
374
|
set: n,
|
|
@@ -376,20 +376,20 @@ function ui(t) {
|
|
|
376
376
|
};
|
|
377
377
|
}
|
|
378
378
|
function pi(t, e) {
|
|
379
|
-
var n =
|
|
379
|
+
var n = rn(0, t, null, 1);
|
|
380
380
|
return function() {
|
|
381
381
|
n.isPaused() && n.start();
|
|
382
382
|
};
|
|
383
383
|
}
|
|
384
384
|
function di(t, e, n) {
|
|
385
|
-
var o = t.state, r = n.breakpoints || {}, a = n.reducedMotion || {}, i =
|
|
385
|
+
var o = t.state, r = n.breakpoints || {}, a = n.reducedMotion || {}, i = Fo(), c = [];
|
|
386
386
|
function l() {
|
|
387
387
|
var s = n.mediaQuery === "min";
|
|
388
|
-
|
|
388
|
+
Ee(r).sort(function(d, w) {
|
|
389
389
|
return s ? +d - +w : +w - +d;
|
|
390
390
|
}).forEach(function(d) {
|
|
391
391
|
u(r[d], "(" + (s ? "min" : "max") + "-width:" + d + "px)");
|
|
392
|
-
}), u(a,
|
|
392
|
+
}), u(a, Jn), C();
|
|
393
393
|
}
|
|
394
394
|
function p(s) {
|
|
395
395
|
s && i.destroy();
|
|
@@ -399,182 +399,182 @@ function di(t, e, n) {
|
|
|
399
399
|
i.bind(w, "change", C), c.push([s, w]);
|
|
400
400
|
}
|
|
401
401
|
function C() {
|
|
402
|
-
var s = o.is(
|
|
403
|
-
return
|
|
402
|
+
var s = o.is(Ke), d = n.direction, w = c.reduce(function(b, y) {
|
|
403
|
+
return Kt(b, y[1].matches ? y[0] : {});
|
|
404
404
|
}, {});
|
|
405
|
-
|
|
405
|
+
Qn(n), g(w), n.destroy ? t.destroy(n.destroy === "completely") : s ? (p(!0), t.mount()) : d !== n.direction && t.refresh();
|
|
406
406
|
}
|
|
407
|
-
function
|
|
408
|
-
matchMedia(
|
|
407
|
+
function h(s) {
|
|
408
|
+
matchMedia(Jn).matches && (s ? Kt(n, a) : Qn(n, Ee(a)));
|
|
409
409
|
}
|
|
410
410
|
function g(s, d, w) {
|
|
411
|
-
|
|
411
|
+
Kt(n, s), d && Kt(Object.getPrototypeOf(n), s), (w || !o.is(fe)) && t.emit(Ct, n);
|
|
412
412
|
}
|
|
413
413
|
return {
|
|
414
414
|
setup: l,
|
|
415
415
|
destroy: p,
|
|
416
|
-
reduce:
|
|
416
|
+
reduce: h,
|
|
417
417
|
set: g
|
|
418
418
|
};
|
|
419
419
|
}
|
|
420
|
-
var
|
|
420
|
+
var an = "Arrow", ln = an + "Left", sn = an + "Right", Go = an + "Up", qo = an + "Down", no = "rtl", cn = "ttb", gn = {
|
|
421
421
|
width: ["height"],
|
|
422
422
|
left: ["top", "right"],
|
|
423
423
|
right: ["bottom", "left"],
|
|
424
424
|
x: ["y"],
|
|
425
425
|
X: ["Y"],
|
|
426
426
|
Y: ["X"],
|
|
427
|
-
ArrowLeft: [
|
|
428
|
-
ArrowRight: [
|
|
427
|
+
ArrowLeft: [Go, sn],
|
|
428
|
+
ArrowRight: [qo, ln]
|
|
429
429
|
};
|
|
430
430
|
function gi(t, e, n) {
|
|
431
431
|
function o(a, i, c) {
|
|
432
432
|
c = c || n.direction;
|
|
433
|
-
var l = c ===
|
|
434
|
-
return
|
|
435
|
-
var C =
|
|
433
|
+
var l = c === no && !i ? 1 : c === cn ? 0 : -1;
|
|
434
|
+
return gn[a] && gn[a][l] || a.replace(/width|left|right/i, function(p, u) {
|
|
435
|
+
var C = gn[p.toLowerCase()][l] || p;
|
|
436
436
|
return u > 0 ? C.charAt(0).toUpperCase() + C.slice(1) : C;
|
|
437
437
|
});
|
|
438
438
|
}
|
|
439
439
|
function r(a) {
|
|
440
|
-
return a * (n.direction ===
|
|
440
|
+
return a * (n.direction === no ? 1 : -1);
|
|
441
441
|
}
|
|
442
442
|
return {
|
|
443
443
|
resolve: o,
|
|
444
444
|
orient: r
|
|
445
445
|
};
|
|
446
446
|
}
|
|
447
|
-
var
|
|
448
|
-
slide:
|
|
449
|
-
clone:
|
|
450
|
-
arrows:
|
|
451
|
-
arrow:
|
|
452
|
-
prev:
|
|
453
|
-
next:
|
|
454
|
-
pagination:
|
|
455
|
-
page:
|
|
447
|
+
var Ht = "role", ye = "tabindex", fi = "disabled", Ot = "aria-", Ve = Ot + "controls", Xo = Ot + "current", oo = Ot + "selected", At = Ot + "label", Dn = Ot + "labelledby", Ko = Ot + "hidden", Hn = Ot + "orientation", Re = Ot + "roledescription", ro = Ot + "live", io = Ot + "busy", ao = Ot + "atomic", jn = [Ht, ye, fi, Ve, Xo, At, Dn, Ko, Hn, Re], Nt = ze + "__", ee = "is-", fn = ze, lo = Nt + "track", mi = Nt + "list", un = Nt + "slide", Jo = un + "--clone", yi = un + "__container", Un = Nt + "arrows", pn = Nt + "arrow", Zo = pn + "--prev", Qo = pn + "--next", dn = Nt + "pagination", tr = dn + "__page", hi = Nt + "progress", vi = hi + "__bar", bi = Nt + "toggle", Si = Nt + "spinner", Ci = Nt + "sr", xi = ee + "initialized", ae = ee + "active", er = ee + "prev", nr = ee + "next", wn = ee + "visible", Tn = ee + "loading", or = ee + "focus-in", rr = ee + "overflow", $i = [ae, wn, er, nr, Tn, or, rr], _i = {
|
|
448
|
+
slide: un,
|
|
449
|
+
clone: Jo,
|
|
450
|
+
arrows: Un,
|
|
451
|
+
arrow: pn,
|
|
452
|
+
prev: Zo,
|
|
453
|
+
next: Qo,
|
|
454
|
+
pagination: dn,
|
|
455
|
+
page: tr,
|
|
456
456
|
spinner: Si
|
|
457
457
|
};
|
|
458
458
|
function wi(t, e) {
|
|
459
|
-
if (
|
|
459
|
+
if (wo(t.closest))
|
|
460
460
|
return t.closest(e);
|
|
461
|
-
for (var n = t; n && n.nodeType === 1 && !
|
|
461
|
+
for (var n = t; n && n.nodeType === 1 && !Ae(n, e); )
|
|
462
462
|
n = n.parentElement;
|
|
463
463
|
return n;
|
|
464
464
|
}
|
|
465
|
-
var Ti = 5,
|
|
465
|
+
var Ti = 5, so = 200, ir = "touchstart mousedown", mn = "touchmove mousemove", yn = "touchend touchcancel mouseup click";
|
|
466
466
|
function Li(t, e, n) {
|
|
467
|
-
var o =
|
|
467
|
+
var o = gt(t), r = o.on, a = o.bind, i = t.root, c = n.i18n, l = {}, p = [], u = [], C = [], h, g, s;
|
|
468
468
|
function d() {
|
|
469
|
-
x(), V(),
|
|
469
|
+
x(), V(), y();
|
|
470
470
|
}
|
|
471
471
|
function w() {
|
|
472
|
-
r(ht,
|
|
473
|
-
s =
|
|
472
|
+
r(ht, b), r(ht, d), r(Ct, y), a(document, ir + " keydown", function(v) {
|
|
473
|
+
s = v.type === "keydown";
|
|
474
474
|
}, {
|
|
475
475
|
capture: !0
|
|
476
476
|
}), a(i, "focusin", function() {
|
|
477
|
-
|
|
477
|
+
Mt(i, or, !!s);
|
|
478
478
|
});
|
|
479
479
|
}
|
|
480
|
-
function v
|
|
481
|
-
var T =
|
|
482
|
-
|
|
480
|
+
function b(v) {
|
|
481
|
+
var T = jn.concat("style");
|
|
482
|
+
jt(p), Dt(i, u), Dt(h, C), Bt([h, g], T), Bt(i, v ? T : ["style", Re]);
|
|
483
483
|
}
|
|
484
|
-
function
|
|
485
|
-
|
|
484
|
+
function y() {
|
|
485
|
+
Dt(i, u), Dt(h, C), u = L(fn), C = L(lo), Pt(i, u), Pt(h, C), Q(i, At, n.label), Q(i, Dn, n.labelledby);
|
|
486
486
|
}
|
|
487
487
|
function x() {
|
|
488
|
-
|
|
489
|
-
arrows:
|
|
490
|
-
pagination:
|
|
491
|
-
prev:
|
|
492
|
-
next:
|
|
488
|
+
h = N("." + lo), g = We(h, "." + mi), $e(h && g, "A track/list element is missing."), Ye(p, Lo(g, "." + un + ":not(." + Jo + ")")), re({
|
|
489
|
+
arrows: Un,
|
|
490
|
+
pagination: dn,
|
|
491
|
+
prev: Zo,
|
|
492
|
+
next: Qo,
|
|
493
493
|
bar: vi,
|
|
494
494
|
toggle: bi
|
|
495
|
-
}, function(
|
|
496
|
-
l[T] = N("." +
|
|
497
|
-
}),
|
|
495
|
+
}, function(v, T) {
|
|
496
|
+
l[T] = N("." + v);
|
|
497
|
+
}), Ie(l, {
|
|
498
498
|
root: i,
|
|
499
|
-
track:
|
|
499
|
+
track: h,
|
|
500
500
|
list: g,
|
|
501
501
|
slides: p
|
|
502
502
|
});
|
|
503
503
|
}
|
|
504
504
|
function V() {
|
|
505
|
-
var
|
|
506
|
-
i.id =
|
|
505
|
+
var v = i.id || si(ze), T = n.role;
|
|
506
|
+
i.id = v, h.id = h.id || v + "-track", g.id = g.id || v + "-list", !Rt(i, Ht) && i.tagName !== "SECTION" && T && Q(i, Ht, T), Q(i, Re, c.carousel), Q(g, Ht, "presentation");
|
|
507
507
|
}
|
|
508
|
-
function N(
|
|
509
|
-
var T =
|
|
510
|
-
return T && wi(T, "." +
|
|
508
|
+
function N(v) {
|
|
509
|
+
var T = Io(i, v);
|
|
510
|
+
return T && wi(T, "." + fn) === i ? T : void 0;
|
|
511
511
|
}
|
|
512
|
-
function L(
|
|
513
|
-
return [
|
|
512
|
+
function L(v) {
|
|
513
|
+
return [v + "--" + n.type, v + "--" + n.direction, n.drag && v + "--draggable", n.isNavigation && v + "--nav", v === fn && ae];
|
|
514
514
|
}
|
|
515
|
-
return
|
|
515
|
+
return Ie(l, {
|
|
516
516
|
setup: d,
|
|
517
517
|
mount: w,
|
|
518
|
-
destroy:
|
|
518
|
+
destroy: b
|
|
519
519
|
});
|
|
520
520
|
}
|
|
521
|
-
var
|
|
521
|
+
var be = "slide", xe = "loop", Me = "fade";
|
|
522
522
|
function Ai(t, e, n, o) {
|
|
523
|
-
var r =
|
|
523
|
+
var r = gt(t), a = r.on, i = r.emit, c = r.bind, l = t.Components, p = t.root, u = t.options, C = u.isNavigation, h = u.updateOnMove, g = u.i18n, s = u.pagination, d = u.slideFocus, w = l.Direction.resolve, b = Rt(o, "style"), y = Rt(o, At), x = n > -1, V = We(o, "." + yi), N;
|
|
524
524
|
function L() {
|
|
525
|
-
x || (o.id = p.id + "-slide" +
|
|
525
|
+
x || (o.id = p.id + "-slide" + Pn(e + 1), Q(o, Ht, s ? "tabpanel" : "group"), Q(o, Re, g.slide), Q(o, At, y || $n(g.slideLabel, [e + 1, t.length]))), v();
|
|
526
526
|
}
|
|
527
|
-
function
|
|
528
|
-
c(o, "click",
|
|
527
|
+
function v() {
|
|
528
|
+
c(o, "click", ut(i, Bn, $)), c(o, "keydown", ut(i, Uo, $)), a([Ce, Yo, le], E), a(Wn, k), h && a(Ut, z);
|
|
529
529
|
}
|
|
530
530
|
function T() {
|
|
531
|
-
N = !0, r.destroy(),
|
|
531
|
+
N = !0, r.destroy(), Dt(o, $i), Bt(o, jn), Q(o, "style", b), Q(o, At, y || "");
|
|
532
532
|
}
|
|
533
533
|
function k() {
|
|
534
|
-
var
|
|
534
|
+
var _ = t.splides.map(function(S) {
|
|
535
535
|
var B = S.splide.Components.Slides.getAt(e);
|
|
536
536
|
return B ? B.slide.id : "";
|
|
537
537
|
}).join(" ");
|
|
538
|
-
Q(o, At,
|
|
538
|
+
Q(o, At, $n(g.slideX, (x ? n : e) + 1)), Q(o, Ve, _), Q(o, Ht, d ? "button" : ""), d && Bt(o, Re);
|
|
539
539
|
}
|
|
540
540
|
function z() {
|
|
541
541
|
N || E();
|
|
542
542
|
}
|
|
543
543
|
function E() {
|
|
544
544
|
if (!N) {
|
|
545
|
-
var
|
|
546
|
-
R(), P(),
|
|
545
|
+
var _ = t.index;
|
|
546
|
+
R(), P(), Mt(o, er, e === _ - 1), Mt(o, nr, e === _ + 1);
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
549
|
function R() {
|
|
550
|
-
var
|
|
551
|
-
|
|
550
|
+
var _ = H();
|
|
551
|
+
_ !== to(o, ae) && (Mt(o, ae, _), Q(o, Xo, C && _ || ""), i(_ ? Ro : Oo, $));
|
|
552
552
|
}
|
|
553
553
|
function P() {
|
|
554
|
-
var
|
|
555
|
-
if (t.state.is([
|
|
554
|
+
var _ = m(), S = !_ && (!H() || x);
|
|
555
|
+
if (t.state.is([Se, Oe]) || Q(o, Ko, S || ""), Q(Rn(o, u.focusableNodes || ""), ye, S ? -1 : ""), d && Q(o, ye, S ? -1 : 0), _ !== to(o, wn) && (Mt(o, wn, _), i(_ ? Po : Bo, $)), !_ && document.activeElement === o) {
|
|
556
556
|
var B = l.Slides.getAt(t.index);
|
|
557
|
-
B &&
|
|
557
|
+
B && Ao(B.slide);
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
|
-
function j(
|
|
561
|
-
|
|
560
|
+
function j(_, S, B) {
|
|
561
|
+
Ft(B && V || o, _, S);
|
|
562
562
|
}
|
|
563
563
|
function H() {
|
|
564
|
-
var
|
|
565
|
-
return
|
|
564
|
+
var _ = t.index;
|
|
565
|
+
return _ === e || u.cloneStatus && _ === n;
|
|
566
566
|
}
|
|
567
|
-
function
|
|
568
|
-
if (t.is(
|
|
567
|
+
function m() {
|
|
568
|
+
if (t.is(Me))
|
|
569
569
|
return H();
|
|
570
|
-
var
|
|
571
|
-
return
|
|
570
|
+
var _ = Lt(l.Elements.track), S = Lt(o), B = w("left", !0), G = w("right", !0);
|
|
571
|
+
return Ze(_[B]) <= Fe(S[B]) && Ze(S[G]) <= Fe(_[G]);
|
|
572
572
|
}
|
|
573
|
-
function I(
|
|
574
|
-
var B =
|
|
575
|
-
return !x && (u.rewind || t.is(
|
|
573
|
+
function I(_, S) {
|
|
574
|
+
var B = $t(_ - e);
|
|
575
|
+
return !x && (u.rewind || t.is(xe)) && (B = Zt(B, t.length - B)), B <= S;
|
|
576
576
|
}
|
|
577
|
-
var
|
|
577
|
+
var $ = {
|
|
578
578
|
index: e,
|
|
579
579
|
slideIndex: n,
|
|
580
580
|
slide: o,
|
|
@@ -586,14 +586,14 @@ function Ai(t, e, n, o) {
|
|
|
586
586
|
style: j,
|
|
587
587
|
isWithin: I
|
|
588
588
|
};
|
|
589
|
-
return
|
|
589
|
+
return $;
|
|
590
590
|
}
|
|
591
591
|
function Ei(t, e, n) {
|
|
592
|
-
var o =
|
|
592
|
+
var o = gt(t), r = o.on, a = o.emit, i = o.bind, c = e.Elements, l = c.slides, p = c.list, u = [];
|
|
593
593
|
function C() {
|
|
594
|
-
|
|
594
|
+
h(), r(ht, g), r(ht, h);
|
|
595
595
|
}
|
|
596
|
-
function
|
|
596
|
+
function h() {
|
|
597
597
|
l.forEach(function(E, R) {
|
|
598
598
|
d(E, R, -1);
|
|
599
599
|
});
|
|
@@ -601,7 +601,7 @@ function Ei(t, e, n) {
|
|
|
601
601
|
function g() {
|
|
602
602
|
N(function(E) {
|
|
603
603
|
E.destroy();
|
|
604
|
-
}),
|
|
604
|
+
}), jt(u);
|
|
605
605
|
}
|
|
606
606
|
function s() {
|
|
607
607
|
N(function(E) {
|
|
@@ -610,8 +610,8 @@ function Ei(t, e, n) {
|
|
|
610
610
|
}
|
|
611
611
|
function d(E, R, P) {
|
|
612
612
|
var j = Ai(t, R, P, E);
|
|
613
|
-
j.mount(), u.push(j), u.sort(function(H,
|
|
614
|
-
return H.index -
|
|
613
|
+
j.mount(), u.push(j), u.sort(function(H, m) {
|
|
614
|
+
return H.index - m.index;
|
|
615
615
|
});
|
|
616
616
|
}
|
|
617
617
|
function w(E) {
|
|
@@ -619,25 +619,25 @@ function Ei(t, e, n) {
|
|
|
619
619
|
return !R.isClone;
|
|
620
620
|
}) : u;
|
|
621
621
|
}
|
|
622
|
-
function
|
|
622
|
+
function b(E) {
|
|
623
623
|
var R = e.Controller, P = R.toIndex(E), j = R.hasFocus() ? 1 : n.perPage;
|
|
624
624
|
return L(function(H) {
|
|
625
|
-
return
|
|
625
|
+
return Ge(H.index, P, P + j - 1);
|
|
626
626
|
});
|
|
627
627
|
}
|
|
628
|
-
function
|
|
628
|
+
function y(E) {
|
|
629
629
|
return L(E)[0];
|
|
630
630
|
}
|
|
631
631
|
function x(E, R) {
|
|
632
632
|
Et(E, function(P) {
|
|
633
|
-
if (
|
|
633
|
+
if (Jt(P) && (P = Eo(P)), To(P)) {
|
|
634
634
|
var j = l[R];
|
|
635
|
-
j ?
|
|
635
|
+
j ? Fn(P, j) : Ne(p, P), Pt(P, n.classes.slide), T(P, ut(a, ve));
|
|
636
636
|
}
|
|
637
637
|
}), a(ht);
|
|
638
638
|
}
|
|
639
639
|
function V(E) {
|
|
640
|
-
|
|
640
|
+
ie(L(E).map(function(R) {
|
|
641
641
|
return R.slide;
|
|
642
642
|
})), a(ht);
|
|
643
643
|
}
|
|
@@ -645,17 +645,17 @@ function Ei(t, e, n) {
|
|
|
645
645
|
w(R).forEach(E);
|
|
646
646
|
}
|
|
647
647
|
function L(E) {
|
|
648
|
-
return u.filter(
|
|
649
|
-
return
|
|
648
|
+
return u.filter(wo(E) ? E : function(R) {
|
|
649
|
+
return Jt(E) ? Ae(R.slide, E) : kn(Be(E), R.index);
|
|
650
650
|
});
|
|
651
651
|
}
|
|
652
|
-
function
|
|
652
|
+
function v(E, R, P) {
|
|
653
653
|
N(function(j) {
|
|
654
654
|
j.style(E, R, P);
|
|
655
655
|
});
|
|
656
656
|
}
|
|
657
657
|
function T(E, R) {
|
|
658
|
-
var P =
|
|
658
|
+
var P = Rn(E, "img"), j = P.length;
|
|
659
659
|
j ? P.forEach(function(H) {
|
|
660
660
|
i(H, "load error", function() {
|
|
661
661
|
--j || R();
|
|
@@ -674,212 +674,212 @@ function Ei(t, e, n) {
|
|
|
674
674
|
update: s,
|
|
675
675
|
register: d,
|
|
676
676
|
get: w,
|
|
677
|
-
getIn:
|
|
678
|
-
getAt:
|
|
677
|
+
getIn: b,
|
|
678
|
+
getAt: y,
|
|
679
679
|
add: x,
|
|
680
680
|
remove: V,
|
|
681
681
|
forEach: N,
|
|
682
682
|
filter: L,
|
|
683
|
-
style:
|
|
683
|
+
style: v,
|
|
684
684
|
getLength: k,
|
|
685
685
|
isEnough: z
|
|
686
686
|
};
|
|
687
687
|
}
|
|
688
688
|
function Ii(t, e, n) {
|
|
689
|
-
var o =
|
|
690
|
-
function
|
|
691
|
-
x(), a(window, "resize load", pi(
|
|
689
|
+
var o = gt(t), r = o.on, a = o.bind, i = o.emit, c = e.Slides, l = e.Direction.resolve, p = e.Elements, u = p.root, C = p.track, h = p.list, g = c.getAt, s = c.style, d, w, b;
|
|
690
|
+
function y() {
|
|
691
|
+
x(), a(window, "resize load", pi(ut(i, ve))), r([Ct, ht], x), r(ve, V);
|
|
692
692
|
}
|
|
693
693
|
function x() {
|
|
694
|
-
d = n.direction ===
|
|
694
|
+
d = n.direction === cn, Ft(u, "maxWidth", ne(n.width)), Ft(C, l("paddingLeft"), N(!1)), Ft(C, l("paddingRight"), N(!0)), V(!0);
|
|
695
695
|
}
|
|
696
|
-
function V(
|
|
697
|
-
var
|
|
698
|
-
(
|
|
696
|
+
function V($) {
|
|
697
|
+
var _ = Lt(u);
|
|
698
|
+
($ || w.width !== _.width || w.height !== _.height) && (Ft(C, "height", L()), s(l("marginRight"), ne(n.gap)), s("width", T()), s("height", k(), !0), w = _, i(nn), b !== (b = I()) && (Mt(u, rr, b), i(ci, b)));
|
|
699
699
|
}
|
|
700
|
-
function N(
|
|
701
|
-
var
|
|
702
|
-
return
|
|
700
|
+
function N($) {
|
|
701
|
+
var _ = n.padding, S = l($ ? "right" : "left");
|
|
702
|
+
return _ && ne(_[S] || (Le(_) ? 0 : _)) || "0px";
|
|
703
703
|
}
|
|
704
704
|
function L() {
|
|
705
|
-
var
|
|
706
|
-
return d && (
|
|
705
|
+
var $ = "";
|
|
706
|
+
return d && ($ = v(), $e($, "height or heightRatio is missing."), $ = "calc(" + $ + " - " + N(!1) + " - " + N(!0) + ")"), $;
|
|
707
707
|
}
|
|
708
|
-
function
|
|
709
|
-
return
|
|
708
|
+
function v() {
|
|
709
|
+
return ne(n.height || Lt(h).width * n.heightRatio);
|
|
710
710
|
}
|
|
711
711
|
function T() {
|
|
712
|
-
return n.autoWidth ? null :
|
|
712
|
+
return n.autoWidth ? null : ne(n.fixedWidth) || (d ? "" : z());
|
|
713
713
|
}
|
|
714
714
|
function k() {
|
|
715
|
-
return
|
|
715
|
+
return ne(n.fixedHeight) || (d ? n.autoHeight ? null : z() : v());
|
|
716
716
|
}
|
|
717
717
|
function z() {
|
|
718
|
-
var
|
|
719
|
-
return "calc((100%" + (
|
|
718
|
+
var $ = ne(n.gap);
|
|
719
|
+
return "calc((100%" + ($ && " + " + $) + ")/" + (n.perPage || 1) + ($ && " - " + $) + ")";
|
|
720
720
|
}
|
|
721
721
|
function E() {
|
|
722
|
-
return Lt(
|
|
722
|
+
return Lt(h)[l("width")];
|
|
723
723
|
}
|
|
724
|
-
function R(_
|
|
725
|
-
var S = g(
|
|
726
|
-
return S ? Lt(S.slide)[l("width")] + (
|
|
724
|
+
function R($, _) {
|
|
725
|
+
var S = g($ || 0);
|
|
726
|
+
return S ? Lt(S.slide)[l("width")] + (_ ? 0 : H()) : 0;
|
|
727
727
|
}
|
|
728
|
-
function P(_
|
|
729
|
-
var S = g(
|
|
728
|
+
function P($, _) {
|
|
729
|
+
var S = g($);
|
|
730
730
|
if (S) {
|
|
731
|
-
var B = Lt(S.slide)[l("right")], G = Lt(
|
|
732
|
-
return
|
|
731
|
+
var B = Lt(S.slide)[l("right")], G = Lt(h)[l("left")];
|
|
732
|
+
return $t(B - G) + (_ ? 0 : H());
|
|
733
733
|
}
|
|
734
734
|
return 0;
|
|
735
735
|
}
|
|
736
|
-
function j(
|
|
737
|
-
return P(t.length - 1) - P(0) + R(0,
|
|
736
|
+
function j($) {
|
|
737
|
+
return P(t.length - 1) - P(0) + R(0, $);
|
|
738
738
|
}
|
|
739
739
|
function H() {
|
|
740
|
-
var
|
|
741
|
-
return
|
|
740
|
+
var $ = g(0);
|
|
741
|
+
return $ && parseFloat(Ft($.slide, l("marginRight"))) || 0;
|
|
742
742
|
}
|
|
743
|
-
function
|
|
744
|
-
return parseFloat(
|
|
743
|
+
function m($) {
|
|
744
|
+
return parseFloat(Ft(C, l("padding" + ($ ? "Right" : "Left")))) || 0;
|
|
745
745
|
}
|
|
746
746
|
function I() {
|
|
747
|
-
return t.is(
|
|
747
|
+
return t.is(Me) || j(!0) > E();
|
|
748
748
|
}
|
|
749
749
|
return {
|
|
750
|
-
mount:
|
|
750
|
+
mount: y,
|
|
751
751
|
resize: V,
|
|
752
752
|
listSize: E,
|
|
753
753
|
slideSize: R,
|
|
754
754
|
sliderSize: j,
|
|
755
755
|
totalSize: P,
|
|
756
|
-
getPadding:
|
|
756
|
+
getPadding: m,
|
|
757
757
|
isOverflow: I
|
|
758
758
|
};
|
|
759
759
|
}
|
|
760
760
|
var ki = 2;
|
|
761
761
|
function Fi(t, e, n) {
|
|
762
|
-
var o =
|
|
762
|
+
var o = gt(t), r = o.on, a = e.Elements, i = e.Slides, c = e.Direction.resolve, l = [], p;
|
|
763
763
|
function u() {
|
|
764
|
-
r(ht, C), r([
|
|
764
|
+
r(ht, C), r([Ct, ve], g), (p = w()) && (s(p), e.Layout.resize(!0));
|
|
765
765
|
}
|
|
766
766
|
function C() {
|
|
767
|
-
|
|
767
|
+
h(), u();
|
|
768
768
|
}
|
|
769
|
-
function
|
|
770
|
-
|
|
769
|
+
function h() {
|
|
770
|
+
ie(l), jt(l), o.destroy();
|
|
771
771
|
}
|
|
772
772
|
function g() {
|
|
773
|
-
var
|
|
774
|
-
p !==
|
|
773
|
+
var b = w();
|
|
774
|
+
p !== b && (p < b || !b) && o.emit(ht);
|
|
775
775
|
}
|
|
776
|
-
function s(
|
|
777
|
-
var
|
|
776
|
+
function s(b) {
|
|
777
|
+
var y = i.get().slice(), x = y.length;
|
|
778
778
|
if (x) {
|
|
779
|
-
for (;
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
var L = N <
|
|
783
|
-
L ?
|
|
779
|
+
for (; y.length < b; )
|
|
780
|
+
Ye(y, y);
|
|
781
|
+
Ye(y.slice(-b), y.slice(0, b)).forEach(function(V, N) {
|
|
782
|
+
var L = N < b, v = d(V.slide, N);
|
|
783
|
+
L ? Fn(v, y[0].slide) : Ne(a.list, v), Ye(l, v), i.register(v, N - b + (L ? 0 : x), V.index);
|
|
784
784
|
});
|
|
785
785
|
}
|
|
786
786
|
}
|
|
787
|
-
function d(
|
|
788
|
-
var x =
|
|
789
|
-
return Pt(x, n.classes.clone), x.id = t.root.id + "-clone" +
|
|
787
|
+
function d(b, y) {
|
|
788
|
+
var x = b.cloneNode(!0);
|
|
789
|
+
return Pt(x, n.classes.clone), x.id = t.root.id + "-clone" + Pn(y + 1), x;
|
|
790
790
|
}
|
|
791
791
|
function w() {
|
|
792
|
-
var
|
|
793
|
-
if (!t.is(
|
|
794
|
-
|
|
795
|
-
else if (
|
|
796
|
-
var
|
|
797
|
-
|
|
792
|
+
var b = n.clones;
|
|
793
|
+
if (!t.is(xe))
|
|
794
|
+
b = 0;
|
|
795
|
+
else if (Pe(b)) {
|
|
796
|
+
var y = n[c("fixedWidth")] && e.Layout.slideSize(0), x = y && Fe(Lt(a.track)[c("width")] / y);
|
|
797
|
+
b = x || n[c("autoWidth")] && t.length || n.perPage * ki;
|
|
798
798
|
}
|
|
799
|
-
return
|
|
799
|
+
return b;
|
|
800
800
|
}
|
|
801
801
|
return {
|
|
802
802
|
mount: u,
|
|
803
|
-
destroy:
|
|
803
|
+
destroy: h
|
|
804
804
|
};
|
|
805
805
|
}
|
|
806
806
|
function Ri(t, e, n) {
|
|
807
|
-
var o =
|
|
807
|
+
var o = gt(t), r = o.on, a = o.emit, i = t.state.set, c = e.Layout, l = c.slideSize, p = c.getPadding, u = c.totalSize, C = c.listSize, h = c.sliderSize, g = e.Direction, s = g.resolve, d = g.orient, w = e.Elements, b = w.list, y = w.track, x;
|
|
808
808
|
function V() {
|
|
809
|
-
x = e.Transition, r([
|
|
809
|
+
x = e.Transition, r([te, nn, Ct, ht], N);
|
|
810
810
|
}
|
|
811
811
|
function N() {
|
|
812
|
-
e.Controller.isBusy() || (e.Scroll.cancel(),
|
|
812
|
+
e.Controller.isBusy() || (e.Scroll.cancel(), v(t.index), e.Slides.update());
|
|
813
813
|
}
|
|
814
|
-
function L(S, B, G,
|
|
815
|
-
S !== B &&
|
|
816
|
-
i(
|
|
814
|
+
function L(S, B, G, nt) {
|
|
815
|
+
S !== B && $(S > G) && (E(), T(z(j(), S > G), !0)), i(Se), a(Ut, B, G, S), x.start(B, function() {
|
|
816
|
+
i(he), a(Ce, B, G, S), nt && nt();
|
|
817
817
|
});
|
|
818
818
|
}
|
|
819
|
-
function
|
|
819
|
+
function v(S) {
|
|
820
820
|
T(P(S, !0));
|
|
821
821
|
}
|
|
822
822
|
function T(S, B) {
|
|
823
|
-
if (!t.is(
|
|
823
|
+
if (!t.is(Me)) {
|
|
824
824
|
var G = B ? S : k(S);
|
|
825
|
-
|
|
825
|
+
Ft(b, "transform", "translate" + s("X") + "(" + G + "px)"), S !== G && a(Yo);
|
|
826
826
|
}
|
|
827
827
|
}
|
|
828
828
|
function k(S) {
|
|
829
|
-
if (t.is(
|
|
830
|
-
var B = R(S), G = B > e.Controller.getEnd(),
|
|
831
|
-
(
|
|
829
|
+
if (t.is(xe)) {
|
|
830
|
+
var B = R(S), G = B > e.Controller.getEnd(), nt = B < 0;
|
|
831
|
+
(nt || G) && (S = z(S, G));
|
|
832
832
|
}
|
|
833
833
|
return S;
|
|
834
834
|
}
|
|
835
835
|
function z(S, B) {
|
|
836
|
-
var G = S - I(B),
|
|
837
|
-
return S -= d(
|
|
836
|
+
var G = S - I(B), nt = h();
|
|
837
|
+
return S -= d(nt * (Fe($t(G) / nt) || 1)) * (B ? 1 : -1), S;
|
|
838
838
|
}
|
|
839
839
|
function E() {
|
|
840
840
|
T(j(), !0), x.cancel();
|
|
841
841
|
}
|
|
842
842
|
function R(S) {
|
|
843
|
-
for (var B = e.Slides.get(), G = 0,
|
|
844
|
-
var
|
|
845
|
-
if (A <=
|
|
846
|
-
|
|
843
|
+
for (var B = e.Slides.get(), G = 0, nt = 1 / 0, tt = 0; tt < B.length; tt++) {
|
|
844
|
+
var lt = B[tt].index, A = $t(P(lt, !0) - S);
|
|
845
|
+
if (A <= nt)
|
|
846
|
+
nt = A, G = lt;
|
|
847
847
|
else
|
|
848
848
|
break;
|
|
849
849
|
}
|
|
850
850
|
return G;
|
|
851
851
|
}
|
|
852
852
|
function P(S, B) {
|
|
853
|
-
var G = d(u(S - 1) -
|
|
853
|
+
var G = d(u(S - 1) - m(S));
|
|
854
854
|
return B ? H(G) : G;
|
|
855
855
|
}
|
|
856
856
|
function j() {
|
|
857
857
|
var S = s("left");
|
|
858
|
-
return Lt(
|
|
858
|
+
return Lt(b)[S] - Lt(y)[S] + d(p(!1));
|
|
859
859
|
}
|
|
860
860
|
function H(S) {
|
|
861
|
-
return n.trimSpace && t.is(
|
|
861
|
+
return n.trimSpace && t.is(be) && (S = de(S, 0, d(h(!0) - C()))), S;
|
|
862
862
|
}
|
|
863
|
-
function
|
|
863
|
+
function m(S) {
|
|
864
864
|
var B = n.focus;
|
|
865
865
|
return B === "center" ? (C() - l(S, !0)) / 2 : +B * l(S) || 0;
|
|
866
866
|
}
|
|
867
867
|
function I(S) {
|
|
868
868
|
return P(S ? e.Controller.getEnd() : 0, !!n.trimSpace);
|
|
869
869
|
}
|
|
870
|
-
function
|
|
870
|
+
function $(S) {
|
|
871
871
|
var B = d(z(j(), S));
|
|
872
|
-
return S ? B >= 0 : B <=
|
|
872
|
+
return S ? B >= 0 : B <= b[s("scrollWidth")] - Lt(y)[s("width")];
|
|
873
873
|
}
|
|
874
|
-
function
|
|
875
|
-
B =
|
|
876
|
-
var G = S !== !0 && d(B) < d(I(!1)),
|
|
877
|
-
return G ||
|
|
874
|
+
function _(S, B) {
|
|
875
|
+
B = Pe(B) ? j() : B;
|
|
876
|
+
var G = S !== !0 && d(B) < d(I(!1)), nt = S !== !1 && d(B) > d(I(!0));
|
|
877
|
+
return G || nt;
|
|
878
878
|
}
|
|
879
879
|
return {
|
|
880
880
|
mount: V,
|
|
881
881
|
move: L,
|
|
882
|
-
jump:
|
|
882
|
+
jump: v,
|
|
883
883
|
translate: T,
|
|
884
884
|
shift: z,
|
|
885
885
|
cancel: E,
|
|
@@ -887,194 +887,194 @@ function Ri(t, e, n) {
|
|
|
887
887
|
toPosition: P,
|
|
888
888
|
getPosition: j,
|
|
889
889
|
getLimit: I,
|
|
890
|
-
exceededLimit:
|
|
890
|
+
exceededLimit: _,
|
|
891
891
|
reposition: N
|
|
892
892
|
};
|
|
893
893
|
}
|
|
894
894
|
function Oi(t, e, n) {
|
|
895
|
-
var o =
|
|
895
|
+
var o = gt(t), r = o.on, a = o.emit, i = e.Move, c = i.getPosition, l = i.getLimit, p = i.toPosition, u = e.Slides, C = u.isEnough, h = u.getLength, g = n.omitEnd, s = t.is(xe), d = t.is(be), w = ut(j, !1), b = ut(j, !0), y = n.start || 0, x, V = y, N, L, v;
|
|
896
896
|
function T() {
|
|
897
|
-
k(), r([
|
|
897
|
+
k(), r([Ct, ht, Qe], k), r(nn, z);
|
|
898
898
|
}
|
|
899
899
|
function k() {
|
|
900
|
-
N =
|
|
901
|
-
var A =
|
|
902
|
-
A !==
|
|
900
|
+
N = h(!0), L = n.perMove, v = n.perPage, x = $();
|
|
901
|
+
var A = de(y, 0, g ? x : N - 1);
|
|
902
|
+
A !== y && (y = A, i.reposition());
|
|
903
903
|
}
|
|
904
904
|
function z() {
|
|
905
|
-
x !==
|
|
905
|
+
x !== $() && a(Qe);
|
|
906
906
|
}
|
|
907
|
-
function E(A,
|
|
908
|
-
if (!
|
|
909
|
-
var it = P(A),
|
|
910
|
-
|
|
907
|
+
function E(A, K, yt) {
|
|
908
|
+
if (!lt()) {
|
|
909
|
+
var it = P(A), mt = I(it);
|
|
910
|
+
mt > -1 && (K || mt !== y) && (G(mt), i.move(it, mt, V, yt));
|
|
911
911
|
}
|
|
912
912
|
}
|
|
913
|
-
function R(A,
|
|
914
|
-
e.Scroll.scroll(A,
|
|
915
|
-
var
|
|
916
|
-
G(g ?
|
|
913
|
+
function R(A, K, yt, it) {
|
|
914
|
+
e.Scroll.scroll(A, K, yt, function() {
|
|
915
|
+
var mt = I(i.toIndex(c()));
|
|
916
|
+
G(g ? Zt(mt, x) : mt), it && it();
|
|
917
917
|
});
|
|
918
918
|
}
|
|
919
919
|
function P(A) {
|
|
920
|
-
var
|
|
921
|
-
if (
|
|
922
|
-
var yt = A.match(/([+\-<>])(\d+)?/) || [], it = yt[1],
|
|
923
|
-
it === "+" || it === "-" ?
|
|
920
|
+
var K = y;
|
|
921
|
+
if (Jt(A)) {
|
|
922
|
+
var yt = A.match(/([+\-<>])(\d+)?/) || [], it = yt[1], mt = yt[2];
|
|
923
|
+
it === "+" || it === "-" ? K = H(y + +("" + it + (+mt || 1)), y) : it === ">" ? K = mt ? _(+mt) : w(!0) : it === "<" && (K = b(!0));
|
|
924
924
|
} else
|
|
925
|
-
|
|
926
|
-
return
|
|
925
|
+
K = s ? A : de(A, 0, x);
|
|
926
|
+
return K;
|
|
927
927
|
}
|
|
928
|
-
function j(A,
|
|
929
|
-
var yt = L || (
|
|
930
|
-
return it === -1 && d && !
|
|
928
|
+
function j(A, K) {
|
|
929
|
+
var yt = L || (tt() ? 1 : v), it = H(y + yt * (A ? -1 : 1), y, !(L || tt()));
|
|
930
|
+
return it === -1 && d && !ko(c(), l(!A), 1) ? A ? 0 : x : K ? it : I(it);
|
|
931
931
|
}
|
|
932
|
-
function H(A,
|
|
933
|
-
if (C() ||
|
|
934
|
-
var it =
|
|
935
|
-
it !== A && (
|
|
932
|
+
function H(A, K, yt) {
|
|
933
|
+
if (C() || tt()) {
|
|
934
|
+
var it = m(A);
|
|
935
|
+
it !== A && (K = A, A = it, yt = !1), A < 0 || A > x ? !L && (Ge(0, A, K, !0) || Ge(x, K, A, !0)) ? A = _(S(A)) : s ? A = yt ? A < 0 ? -(N % v || v) : N : A : n.rewind ? A = A < 0 ? x : 0 : A = -1 : yt && A !== K && (A = _(S(K) + (A < K ? -1 : 1)));
|
|
936
936
|
} else
|
|
937
937
|
A = -1;
|
|
938
938
|
return A;
|
|
939
939
|
}
|
|
940
|
-
function
|
|
941
|
-
if (d && n.trimSpace === "move" && A !==
|
|
942
|
-
for (var
|
|
943
|
-
A <
|
|
940
|
+
function m(A) {
|
|
941
|
+
if (d && n.trimSpace === "move" && A !== y)
|
|
942
|
+
for (var K = c(); K === p(A, !0) && Ge(A, 0, t.length - 1, !n.rewind); )
|
|
943
|
+
A < y ? --A : ++A;
|
|
944
944
|
return A;
|
|
945
945
|
}
|
|
946
946
|
function I(A) {
|
|
947
947
|
return s ? (A + N) % N || 0 : A;
|
|
948
948
|
}
|
|
949
|
-
function
|
|
950
|
-
for (var A = N - (
|
|
949
|
+
function $() {
|
|
950
|
+
for (var A = N - (tt() || s && L ? 1 : v); g && A-- > 0; )
|
|
951
951
|
if (p(N - 1, !0) !== p(A, !0)) {
|
|
952
952
|
A++;
|
|
953
953
|
break;
|
|
954
954
|
}
|
|
955
|
-
return
|
|
955
|
+
return de(A, 0, N - 1);
|
|
956
956
|
}
|
|
957
|
-
function
|
|
958
|
-
return
|
|
957
|
+
function _(A) {
|
|
958
|
+
return de(tt() ? A : v * A, 0, x);
|
|
959
959
|
}
|
|
960
960
|
function S(A) {
|
|
961
|
-
return
|
|
961
|
+
return tt() ? Zt(A, x) : Ze((A >= x ? N - 1 : A) / v);
|
|
962
962
|
}
|
|
963
963
|
function B(A) {
|
|
964
|
-
var
|
|
965
|
-
return d ?
|
|
964
|
+
var K = i.toIndex(A);
|
|
965
|
+
return d ? de(K, 0, x) : K;
|
|
966
966
|
}
|
|
967
967
|
function G(A) {
|
|
968
|
-
A !==
|
|
968
|
+
A !== y && (V = y, y = A);
|
|
969
969
|
}
|
|
970
|
-
function
|
|
971
|
-
return A ? V :
|
|
970
|
+
function nt(A) {
|
|
971
|
+
return A ? V : y;
|
|
972
972
|
}
|
|
973
|
-
function
|
|
974
|
-
return !
|
|
973
|
+
function tt() {
|
|
974
|
+
return !Pe(n.focus) || n.isNavigation;
|
|
975
975
|
}
|
|
976
|
-
function
|
|
977
|
-
return t.state.is([
|
|
976
|
+
function lt() {
|
|
977
|
+
return t.state.is([Se, Oe]) && !!n.waitForTransition;
|
|
978
978
|
}
|
|
979
979
|
return {
|
|
980
980
|
mount: T,
|
|
981
981
|
go: E,
|
|
982
982
|
scroll: R,
|
|
983
983
|
getNext: w,
|
|
984
|
-
getPrev:
|
|
984
|
+
getPrev: b,
|
|
985
985
|
getAdjacent: j,
|
|
986
|
-
getEnd:
|
|
986
|
+
getEnd: $,
|
|
987
987
|
setIndex: G,
|
|
988
|
-
getIndex:
|
|
989
|
-
toIndex:
|
|
988
|
+
getIndex: nt,
|
|
989
|
+
toIndex: _,
|
|
990
990
|
toPage: S,
|
|
991
991
|
toDest: B,
|
|
992
|
-
hasFocus:
|
|
993
|
-
isBusy:
|
|
992
|
+
hasFocus: tt,
|
|
993
|
+
isBusy: lt
|
|
994
994
|
};
|
|
995
995
|
}
|
|
996
|
-
var Pi = "http://www.w3.org/2000/svg", Bi = "m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z",
|
|
996
|
+
var Pi = "http://www.w3.org/2000/svg", Bi = "m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z", De = 40;
|
|
997
997
|
function Ni(t, e, n) {
|
|
998
|
-
var o =
|
|
998
|
+
var o = gt(t), r = o.on, a = o.bind, i = o.emit, c = n.classes, l = n.i18n, p = e.Elements, u = e.Controller, C = p.arrows, h = p.track, g = C, s = p.prev, d = p.next, w, b, y = {};
|
|
999
999
|
function x() {
|
|
1000
|
-
N(), r(
|
|
1000
|
+
N(), r(Ct, V);
|
|
1001
1001
|
}
|
|
1002
1002
|
function V() {
|
|
1003
1003
|
L(), x();
|
|
1004
1004
|
}
|
|
1005
1005
|
function N() {
|
|
1006
1006
|
var R = n.arrows;
|
|
1007
|
-
R && !(s && d) && k(), s && d && (
|
|
1007
|
+
R && !(s && d) && k(), s && d && (Ie(y, {
|
|
1008
1008
|
prev: s,
|
|
1009
1009
|
next: d
|
|
1010
|
-
}),
|
|
1010
|
+
}), ke(g, R ? "" : "none"), Pt(g, b = Un + "--" + n.direction), R && (v(), E(), Q([s, d], Ve, h.id), i(Vo, s, d)));
|
|
1011
1011
|
}
|
|
1012
1012
|
function L() {
|
|
1013
|
-
o.destroy(),
|
|
1013
|
+
o.destroy(), Dt(g, b), w ? (ie(C ? [s, d] : g), s = d = null) : Bt([s, d], jn);
|
|
1014
1014
|
}
|
|
1015
|
-
function
|
|
1016
|
-
r([
|
|
1015
|
+
function v() {
|
|
1016
|
+
r([te, Ce, ht, le, Qe], E), a(d, "click", ut(T, ">")), a(s, "click", ut(T, "<"));
|
|
1017
1017
|
}
|
|
1018
1018
|
function T(R) {
|
|
1019
1019
|
u.go(R, !0);
|
|
1020
1020
|
}
|
|
1021
1021
|
function k() {
|
|
1022
|
-
g = C ||
|
|
1022
|
+
g = C || me("div", c.arrows), s = z(!0), d = z(!1), w = !0, Ne(g, [s, d]), !C && Fn(g, h);
|
|
1023
1023
|
}
|
|
1024
1024
|
function z(R) {
|
|
1025
|
-
var P = '<button class="' + c.arrow + " " + (R ? c.prev : c.next) + '" type="button"><svg xmlns="' + Pi + '" viewBox="0 0 ' +
|
|
1026
|
-
return
|
|
1025
|
+
var P = '<button class="' + c.arrow + " " + (R ? c.prev : c.next) + '" type="button"><svg xmlns="' + Pi + '" viewBox="0 0 ' + De + " " + De + '" width="' + De + '" height="' + De + '" focusable="false"><path d="' + (n.arrowPath || Bi) + '" />';
|
|
1026
|
+
return Eo(P);
|
|
1027
1027
|
}
|
|
1028
1028
|
function E() {
|
|
1029
1029
|
if (s && d) {
|
|
1030
|
-
var R = t.index, P = u.getPrev(), j = u.getNext(), H = P > -1 && R < P ? l.last : l.prev,
|
|
1031
|
-
s.disabled = P < 0, d.disabled = j < 0, Q(s, At, H), Q(d, At,
|
|
1030
|
+
var R = t.index, P = u.getPrev(), j = u.getNext(), H = P > -1 && R < P ? l.last : l.prev, m = j > -1 && R > j ? l.first : l.next;
|
|
1031
|
+
s.disabled = P < 0, d.disabled = j < 0, Q(s, At, H), Q(d, At, m), i(Mo, s, d, P, j);
|
|
1032
1032
|
}
|
|
1033
1033
|
}
|
|
1034
1034
|
return {
|
|
1035
|
-
arrows:
|
|
1035
|
+
arrows: y,
|
|
1036
1036
|
mount: x,
|
|
1037
1037
|
destroy: L,
|
|
1038
1038
|
update: E
|
|
1039
1039
|
};
|
|
1040
1040
|
}
|
|
1041
|
-
var Wi =
|
|
1041
|
+
var Wi = On + "-interval";
|
|
1042
1042
|
function zi(t, e, n) {
|
|
1043
|
-
var o =
|
|
1044
|
-
function
|
|
1045
|
-
g && (
|
|
1043
|
+
var o = gt(t), r = o.on, a = o.bind, i = o.emit, c = rn(n.interval, t.go.bind(t, ">"), v), l = c.isPaused, p = e.Elements, u = e.Elements, C = u.root, h = u.toggle, g = n.autoplay, s, d, w = g === "pause";
|
|
1044
|
+
function b() {
|
|
1045
|
+
g && (y(), h && Q(h, Ve, p.track.id), w || x(), L());
|
|
1046
1046
|
}
|
|
1047
|
-
function
|
|
1047
|
+
function y() {
|
|
1048
1048
|
n.pauseOnHover && a(C, "mouseenter mouseleave", function(k) {
|
|
1049
1049
|
s = k.type === "mouseenter", N();
|
|
1050
1050
|
}), n.pauseOnFocus && a(C, "focusin focusout", function(k) {
|
|
1051
1051
|
d = k.type === "focusin", N();
|
|
1052
|
-
}),
|
|
1052
|
+
}), h && a(h, "click", function() {
|
|
1053
1053
|
w ? x() : V(!0);
|
|
1054
|
-
}), r([
|
|
1054
|
+
}), r([Ut, on, ht], c.rewind), r(Ut, T);
|
|
1055
1055
|
}
|
|
1056
1056
|
function x() {
|
|
1057
|
-
l() && e.Slides.isEnough() && (c.start(!n.resetProgress), d = s = w = !1, L(), i(
|
|
1057
|
+
l() && e.Slides.isEnough() && (c.start(!n.resetProgress), d = s = w = !1, L(), i(zn));
|
|
1058
1058
|
}
|
|
1059
1059
|
function V(k) {
|
|
1060
|
-
k === void 0 && (k = !0), w = !!k, L(), l() || (c.pause(), i(
|
|
1060
|
+
k === void 0 && (k = !0), w = !!k, L(), l() || (c.pause(), i(Vn));
|
|
1061
1061
|
}
|
|
1062
1062
|
function N() {
|
|
1063
1063
|
w || (s || d ? V(!1) : x());
|
|
1064
1064
|
}
|
|
1065
1065
|
function L() {
|
|
1066
|
-
|
|
1066
|
+
h && (Mt(h, ae, !w), Q(h, At, n.i18n[w ? "play" : "pause"]));
|
|
1067
1067
|
}
|
|
1068
|
-
function
|
|
1068
|
+
function v(k) {
|
|
1069
1069
|
var z = p.bar;
|
|
1070
|
-
z &&
|
|
1070
|
+
z && Ft(z, "width", k * 100 + "%"), i(jo, k);
|
|
1071
1071
|
}
|
|
1072
1072
|
function T(k) {
|
|
1073
1073
|
var z = e.Slides.getAt(k);
|
|
1074
|
-
c.set(z && +
|
|
1074
|
+
c.set(z && +Rt(z.slide, Wi) || n.interval);
|
|
1075
1075
|
}
|
|
1076
1076
|
return {
|
|
1077
|
-
mount:
|
|
1077
|
+
mount: b,
|
|
1078
1078
|
destroy: c.cancel,
|
|
1079
1079
|
play: x,
|
|
1080
1080
|
pause: V,
|
|
@@ -1082,193 +1082,193 @@ function zi(t, e, n) {
|
|
|
1082
1082
|
};
|
|
1083
1083
|
}
|
|
1084
1084
|
function Vi(t, e, n) {
|
|
1085
|
-
var o =
|
|
1085
|
+
var o = gt(t), r = o.on;
|
|
1086
1086
|
function a() {
|
|
1087
|
-
n.cover && (r(
|
|
1087
|
+
n.cover && (r(Mn, ut(c, !0)), r([te, Ct, ht], ut(i, !0)));
|
|
1088
1088
|
}
|
|
1089
1089
|
function i(l) {
|
|
1090
1090
|
e.Slides.forEach(function(p) {
|
|
1091
|
-
var u =
|
|
1091
|
+
var u = We(p.container || p.slide, "img");
|
|
1092
1092
|
u && u.src && c(l, u, p);
|
|
1093
1093
|
});
|
|
1094
1094
|
}
|
|
1095
1095
|
function c(l, p, u) {
|
|
1096
|
-
u.style("background", l ? 'center/cover no-repeat url("' + p.src + '")' : "", !0),
|
|
1096
|
+
u.style("background", l ? 'center/cover no-repeat url("' + p.src + '")' : "", !0), ke(p, l ? "none" : "");
|
|
1097
1097
|
}
|
|
1098
1098
|
return {
|
|
1099
1099
|
mount: a,
|
|
1100
|
-
destroy:
|
|
1100
|
+
destroy: ut(i, !1)
|
|
1101
1101
|
};
|
|
1102
1102
|
}
|
|
1103
1103
|
var Mi = 10, Di = 600, Hi = 0.6, ji = 1.5, Ui = 800;
|
|
1104
1104
|
function Yi(t, e, n) {
|
|
1105
|
-
var o =
|
|
1105
|
+
var o = gt(t), r = o.on, a = o.emit, i = t.state.set, c = e.Move, l = c.getPosition, p = c.getLimit, u = c.exceededLimit, C = c.translate, h = t.is(be), g, s, d = 1;
|
|
1106
1106
|
function w() {
|
|
1107
|
-
r(
|
|
1107
|
+
r(Ut, V), r([Ct, ht], N);
|
|
1108
1108
|
}
|
|
1109
|
-
function v
|
|
1109
|
+
function b(v, T, k, z, E) {
|
|
1110
1110
|
var R = l();
|
|
1111
|
-
if (V(), k && (!
|
|
1112
|
-
var P = e.Layout.sliderSize(), j =
|
|
1113
|
-
|
|
1111
|
+
if (V(), k && (!h || !u())) {
|
|
1112
|
+
var P = e.Layout.sliderSize(), j = xn(v) * P * Ze($t(v) / P) || 0;
|
|
1113
|
+
v = c.toPosition(e.Controller.toDest(v % P)) + j;
|
|
1114
1114
|
}
|
|
1115
|
-
var H =
|
|
1116
|
-
d = 1, T = H ? 0 : T ||
|
|
1115
|
+
var H = ko(R, v, 1);
|
|
1116
|
+
d = 1, T = H ? 0 : T || Je($t(v - R) / ji, Ui), s = z, g = rn(T, y, ut(x, R, v, E), 1), i(Oe), a(on), g.start();
|
|
1117
1117
|
}
|
|
1118
|
-
function
|
|
1119
|
-
i(
|
|
1118
|
+
function y() {
|
|
1119
|
+
i(he), s && s(), a(le);
|
|
1120
1120
|
}
|
|
1121
|
-
function x(
|
|
1122
|
-
var E = l(), R =
|
|
1123
|
-
C(E + P),
|
|
1121
|
+
function x(v, T, k, z) {
|
|
1122
|
+
var E = l(), R = v + (T - v) * L(z), P = (R - E) * d;
|
|
1123
|
+
C(E + P), h && !k && u() && (d *= Hi, $t(P) < Mi && b(p(u(!0)), Di, !1, s, !0));
|
|
1124
1124
|
}
|
|
1125
1125
|
function V() {
|
|
1126
1126
|
g && g.cancel();
|
|
1127
1127
|
}
|
|
1128
1128
|
function N() {
|
|
1129
|
-
g && !g.isPaused() && (V(),
|
|
1129
|
+
g && !g.isPaused() && (V(), y());
|
|
1130
1130
|
}
|
|
1131
|
-
function L(
|
|
1131
|
+
function L(v) {
|
|
1132
1132
|
var T = n.easingFunc;
|
|
1133
|
-
return T ? T(
|
|
1133
|
+
return T ? T(v) : 1 - Math.pow(1 - v, 4);
|
|
1134
1134
|
}
|
|
1135
1135
|
return {
|
|
1136
1136
|
mount: w,
|
|
1137
1137
|
destroy: V,
|
|
1138
|
-
scroll:
|
|
1138
|
+
scroll: b,
|
|
1139
1139
|
cancel: N
|
|
1140
1140
|
};
|
|
1141
1141
|
}
|
|
1142
|
-
var
|
|
1142
|
+
var ge = {
|
|
1143
1143
|
passive: !1,
|
|
1144
1144
|
capture: !0
|
|
1145
1145
|
};
|
|
1146
1146
|
function Gi(t, e, n) {
|
|
1147
|
-
var o =
|
|
1147
|
+
var o = gt(t), r = o.on, a = o.emit, i = o.bind, c = o.unbind, l = t.state, p = e.Move, u = e.Scroll, C = e.Controller, h = e.Elements.track, g = e.Media.reduce, s = e.Direction, d = s.resolve, w = s.orient, b = p.getPosition, y = p.exceededLimit, x, V, N, L, v, T = !1, k, z, E;
|
|
1148
1148
|
function R() {
|
|
1149
|
-
i(
|
|
1149
|
+
i(h, mn, Sn, ge), i(h, yn, Sn, ge), i(h, ir, j, ge), i(h, "click", I, {
|
|
1150
1150
|
capture: !0
|
|
1151
|
-
}), i(
|
|
1151
|
+
}), i(h, "dragstart", Vt), r([te, Ct], P);
|
|
1152
1152
|
}
|
|
1153
1153
|
function P() {
|
|
1154
1154
|
var M = n.drag;
|
|
1155
|
-
|
|
1155
|
+
zt(!M), L = M === "free";
|
|
1156
1156
|
}
|
|
1157
1157
|
function j(M) {
|
|
1158
1158
|
if (k = !1, !z) {
|
|
1159
|
-
var
|
|
1160
|
-
it(M.target) && (
|
|
1159
|
+
var f = mt(M);
|
|
1160
|
+
it(M.target) && (f || !M.button) && (C.isBusy() ? Vt(M, !0) : (E = f ? h : window, v = l.is([Se, Oe]), N = null, i(E, mn, H, ge), i(E, yn, m, ge), p.cancel(), u.cancel(), $(M)));
|
|
1161
1161
|
}
|
|
1162
1162
|
}
|
|
1163
1163
|
function H(M) {
|
|
1164
|
-
if (l.is(
|
|
1165
|
-
if (
|
|
1166
|
-
p.translate(x + yt(
|
|
1167
|
-
var
|
|
1168
|
-
(
|
|
1169
|
-
} else B(M) && (
|
|
1164
|
+
if (l.is(Ue) || (l.set(Ue), a(No)), M.cancelable)
|
|
1165
|
+
if (v) {
|
|
1166
|
+
p.translate(x + yt(tt(M)));
|
|
1167
|
+
var f = lt(M) > so, D = T !== (T = y());
|
|
1168
|
+
(f || D) && $(M), k = !0, a(Wo), Vt(M);
|
|
1169
|
+
} else B(M) && (v = S(M), Vt(M));
|
|
1170
1170
|
}
|
|
1171
|
-
function
|
|
1172
|
-
l.is(
|
|
1171
|
+
function m(M) {
|
|
1172
|
+
l.is(Ue) && (l.set(he), a(zo)), v && (_(M), Vt(M)), c(E, mn, H), c(E, yn, m), v = !1;
|
|
1173
1173
|
}
|
|
1174
1174
|
function I(M) {
|
|
1175
|
-
!z && k &&
|
|
1176
|
-
}
|
|
1177
|
-
function _(M) {
|
|
1178
|
-
N = V, V = M, x = v();
|
|
1175
|
+
!z && k && Vt(M, !0);
|
|
1179
1176
|
}
|
|
1180
1177
|
function $(M) {
|
|
1181
|
-
|
|
1182
|
-
|
|
1178
|
+
N = V, V = M, x = b();
|
|
1179
|
+
}
|
|
1180
|
+
function _(M) {
|
|
1181
|
+
var f = G(M), D = nt(f), q = n.rewind && n.rewindByDrag;
|
|
1182
|
+
g(!1), L ? C.scroll(D, 0, n.snap) : t.is(Me) ? C.go(w(xn(f)) < 0 ? q ? "<" : "-" : q ? ">" : "+") : t.is(be) && T && q ? C.go(y(!0) ? ">" : "<") : C.go(C.toDest(D), !0), g(!0);
|
|
1183
1183
|
}
|
|
1184
1184
|
function S(M) {
|
|
1185
|
-
var
|
|
1186
|
-
return
|
|
1185
|
+
var f = n.dragMinThreshold, D = Le(f), q = D && f.mouse || 0, Y = (D ? f.touch : +f) || 10;
|
|
1186
|
+
return $t(tt(M)) > (mt(M) ? Y : q);
|
|
1187
1187
|
}
|
|
1188
1188
|
function B(M) {
|
|
1189
|
-
return
|
|
1189
|
+
return $t(tt(M)) > $t(tt(M, !0));
|
|
1190
1190
|
}
|
|
1191
1191
|
function G(M) {
|
|
1192
|
-
if (t.is(
|
|
1193
|
-
var
|
|
1194
|
-
if (
|
|
1195
|
-
return
|
|
1192
|
+
if (t.is(xe) || !T) {
|
|
1193
|
+
var f = lt(M);
|
|
1194
|
+
if (f && f < so)
|
|
1195
|
+
return tt(M) / f;
|
|
1196
1196
|
}
|
|
1197
1197
|
return 0;
|
|
1198
1198
|
}
|
|
1199
|
-
function
|
|
1200
|
-
return
|
|
1199
|
+
function nt(M) {
|
|
1200
|
+
return b() + xn(M) * Zt($t(M) * (n.flickPower || 600), L ? 1 / 0 : e.Layout.listSize() * (n.flickMaxPages || 1));
|
|
1201
1201
|
}
|
|
1202
|
-
function
|
|
1203
|
-
return
|
|
1202
|
+
function tt(M, f) {
|
|
1203
|
+
return K(M, f) - K(A(M), f);
|
|
1204
1204
|
}
|
|
1205
|
-
function
|
|
1206
|
-
return
|
|
1205
|
+
function lt(M) {
|
|
1206
|
+
return Cn(M) - Cn(A(M));
|
|
1207
1207
|
}
|
|
1208
1208
|
function A(M) {
|
|
1209
1209
|
return V === M && N || V;
|
|
1210
1210
|
}
|
|
1211
|
-
function
|
|
1212
|
-
return (
|
|
1211
|
+
function K(M, f) {
|
|
1212
|
+
return (mt(M) ? M.changedTouches[0] : M)["page" + d(f ? "Y" : "X")];
|
|
1213
1213
|
}
|
|
1214
1214
|
function yt(M) {
|
|
1215
|
-
return M / (T && t.is(
|
|
1215
|
+
return M / (T && t.is(be) ? Ti : 1);
|
|
1216
1216
|
}
|
|
1217
1217
|
function it(M) {
|
|
1218
|
-
var
|
|
1219
|
-
return !
|
|
1218
|
+
var f = n.noDrag;
|
|
1219
|
+
return !Ae(M, "." + tr + ", ." + pn) && (!f || !Ae(M, f));
|
|
1220
1220
|
}
|
|
1221
|
-
function
|
|
1221
|
+
function mt(M) {
|
|
1222
1222
|
return typeof TouchEvent < "u" && M instanceof TouchEvent;
|
|
1223
1223
|
}
|
|
1224
|
-
function
|
|
1225
|
-
return
|
|
1224
|
+
function Wt() {
|
|
1225
|
+
return v;
|
|
1226
1226
|
}
|
|
1227
|
-
function
|
|
1227
|
+
function zt(M) {
|
|
1228
1228
|
z = M;
|
|
1229
1229
|
}
|
|
1230
1230
|
return {
|
|
1231
1231
|
mount: R,
|
|
1232
|
-
disable:
|
|
1233
|
-
isDragging:
|
|
1232
|
+
disable: zt,
|
|
1233
|
+
isDragging: Wt
|
|
1234
1234
|
};
|
|
1235
1235
|
}
|
|
1236
1236
|
var qi = {
|
|
1237
1237
|
Spacebar: " ",
|
|
1238
|
-
Right:
|
|
1239
|
-
Left:
|
|
1240
|
-
Up:
|
|
1241
|
-
Down:
|
|
1238
|
+
Right: sn,
|
|
1239
|
+
Left: ln,
|
|
1240
|
+
Up: Go,
|
|
1241
|
+
Down: qo
|
|
1242
1242
|
};
|
|
1243
|
-
function
|
|
1244
|
-
return t =
|
|
1243
|
+
function Yn(t) {
|
|
1244
|
+
return t = Jt(t) ? t : t.key, qi[t] || t;
|
|
1245
1245
|
}
|
|
1246
|
-
var
|
|
1246
|
+
var co = "keydown";
|
|
1247
1247
|
function Xi(t, e, n) {
|
|
1248
|
-
var o =
|
|
1248
|
+
var o = gt(t), r = o.on, a = o.bind, i = o.unbind, c = t.root, l = e.Direction.resolve, p, u;
|
|
1249
1249
|
function C() {
|
|
1250
|
-
|
|
1250
|
+
h(), r(Ct, g), r(Ct, h), r(Ut, d);
|
|
1251
1251
|
}
|
|
1252
|
-
function
|
|
1253
|
-
var
|
|
1254
|
-
|
|
1252
|
+
function h() {
|
|
1253
|
+
var b = n.keyboard;
|
|
1254
|
+
b && (p = b === "global" ? window : c, a(p, co, w));
|
|
1255
1255
|
}
|
|
1256
1256
|
function g() {
|
|
1257
|
-
i(p,
|
|
1257
|
+
i(p, co);
|
|
1258
1258
|
}
|
|
1259
|
-
function s(
|
|
1260
|
-
u =
|
|
1259
|
+
function s(b) {
|
|
1260
|
+
u = b;
|
|
1261
1261
|
}
|
|
1262
1262
|
function d() {
|
|
1263
|
-
var
|
|
1264
|
-
u = !0,
|
|
1265
|
-
u =
|
|
1263
|
+
var b = u;
|
|
1264
|
+
u = !0, _o(function() {
|
|
1265
|
+
u = b;
|
|
1266
1266
|
});
|
|
1267
1267
|
}
|
|
1268
|
-
function w(
|
|
1268
|
+
function w(b) {
|
|
1269
1269
|
if (!u) {
|
|
1270
|
-
var
|
|
1271
|
-
|
|
1270
|
+
var y = Yn(b);
|
|
1271
|
+
y === l(ln) ? t.go("<") : y === l(sn) && t.go(">");
|
|
1272
1272
|
}
|
|
1273
1273
|
}
|
|
1274
1274
|
return {
|
|
@@ -1277,89 +1277,89 @@ function Xi(t, e, n) {
|
|
|
1277
1277
|
disable: s
|
|
1278
1278
|
};
|
|
1279
1279
|
}
|
|
1280
|
-
var
|
|
1280
|
+
var _e = On + "-lazy", qe = _e + "-srcset", Ki = "[" + _e + "], [" + qe + "]";
|
|
1281
1281
|
function Ji(t, e, n) {
|
|
1282
|
-
var o =
|
|
1282
|
+
var o = gt(t), r = o.on, a = o.off, i = o.bind, c = o.emit, l = n.lazyLoad === "sequential", p = [Ce, le], u = [];
|
|
1283
1283
|
function C() {
|
|
1284
|
-
n.lazyLoad && (
|
|
1284
|
+
n.lazyLoad && (h(), r(ht, h));
|
|
1285
1285
|
}
|
|
1286
|
-
function
|
|
1287
|
-
|
|
1286
|
+
function h() {
|
|
1287
|
+
jt(u), g(), l ? b() : (a(p), r(p, s), s());
|
|
1288
1288
|
}
|
|
1289
1289
|
function g() {
|
|
1290
|
-
e.Slides.forEach(function(
|
|
1291
|
-
|
|
1292
|
-
var V =
|
|
1290
|
+
e.Slides.forEach(function(y) {
|
|
1291
|
+
Rn(y.slide, Ki).forEach(function(x) {
|
|
1292
|
+
var V = Rt(x, _e), N = Rt(x, qe);
|
|
1293
1293
|
if (V !== x.src || N !== x.srcset) {
|
|
1294
|
-
var L = n.classes.spinner,
|
|
1295
|
-
u.push([x,
|
|
1294
|
+
var L = n.classes.spinner, v = x.parentElement, T = We(v, "." + L) || me("span", L, v);
|
|
1295
|
+
u.push([x, y, T]), x.src || ke(x, "none");
|
|
1296
1296
|
}
|
|
1297
1297
|
});
|
|
1298
1298
|
});
|
|
1299
1299
|
}
|
|
1300
1300
|
function s() {
|
|
1301
|
-
u = u.filter(function(
|
|
1301
|
+
u = u.filter(function(y) {
|
|
1302
1302
|
var x = n.perPage * ((n.preloadPages || 1) + 1) - 1;
|
|
1303
|
-
return
|
|
1303
|
+
return y[1].isWithin(t.index, x) ? d(y) : !0;
|
|
1304
1304
|
}), u.length || a(p);
|
|
1305
1305
|
}
|
|
1306
|
-
function d(
|
|
1307
|
-
var x =
|
|
1308
|
-
Pt(
|
|
1306
|
+
function d(y) {
|
|
1307
|
+
var x = y[0];
|
|
1308
|
+
Pt(y[1].slide, Tn), i(x, "load error", ut(w, y)), Q(x, "src", Rt(x, _e)), Q(x, "srcset", Rt(x, qe)), Bt(x, _e), Bt(x, qe);
|
|
1309
1309
|
}
|
|
1310
|
-
function w(
|
|
1311
|
-
var V =
|
|
1312
|
-
|
|
1310
|
+
function w(y, x) {
|
|
1311
|
+
var V = y[0], N = y[1];
|
|
1312
|
+
Dt(N.slide, Tn), x.type !== "error" && (ie(y[2]), ke(V, ""), c(Mn, V, N), c(ve)), l && b();
|
|
1313
1313
|
}
|
|
1314
|
-
function
|
|
1314
|
+
function b() {
|
|
1315
1315
|
u.length && d(u.shift());
|
|
1316
1316
|
}
|
|
1317
1317
|
return {
|
|
1318
1318
|
mount: C,
|
|
1319
|
-
destroy:
|
|
1319
|
+
destroy: ut(jt, u),
|
|
1320
1320
|
check: s
|
|
1321
1321
|
};
|
|
1322
1322
|
}
|
|
1323
1323
|
function Zi(t, e, n) {
|
|
1324
|
-
var o =
|
|
1325
|
-
function
|
|
1326
|
-
x(), r([
|
|
1324
|
+
var o = gt(t), r = o.on, a = o.emit, i = o.bind, c = e.Slides, l = e.Elements, p = e.Controller, u = p.hasFocus, C = p.getIndex, h = p.go, g = e.Direction.resolve, s = l.pagination, d = [], w, b;
|
|
1325
|
+
function y() {
|
|
1326
|
+
x(), r([Ct, ht, Qe], y);
|
|
1327
1327
|
var z = n.pagination;
|
|
1328
|
-
s &&
|
|
1328
|
+
s && ke(s, z ? "" : "none"), z && (r([Ut, on, le], k), V(), k(), a(Do, {
|
|
1329
1329
|
list: w,
|
|
1330
1330
|
items: d
|
|
1331
1331
|
}, T(t.index)));
|
|
1332
1332
|
}
|
|
1333
1333
|
function x() {
|
|
1334
|
-
w && (
|
|
1334
|
+
w && (ie(s ? Qt(w.children) : w), Dt(w, b), jt(d), w = null), o.destroy();
|
|
1335
1335
|
}
|
|
1336
1336
|
function V() {
|
|
1337
|
-
var z = t.length, E = n.classes, R = n.i18n, P = n.perPage, j = u() ? p.getEnd() + 1 :
|
|
1338
|
-
w = s ||
|
|
1337
|
+
var z = t.length, E = n.classes, R = n.i18n, P = n.perPage, j = u() ? p.getEnd() + 1 : Fe(z / P);
|
|
1338
|
+
w = s || me("ul", E.pagination, l.track.parentElement), Pt(w, b = dn + "--" + v()), Q(w, Ht, "tablist"), Q(w, At, R.select), Q(w, Hn, v() === cn ? "vertical" : "");
|
|
1339
1339
|
for (var H = 0; H < j; H++) {
|
|
1340
|
-
var
|
|
1340
|
+
var m = me("li", null, w), I = me("button", {
|
|
1341
1341
|
class: E.page,
|
|
1342
1342
|
type: "button"
|
|
1343
|
-
},
|
|
1343
|
+
}, m), $ = c.getIn(H).map(function(S) {
|
|
1344
1344
|
return S.slide.id;
|
|
1345
|
-
}),
|
|
1346
|
-
i(I, "click",
|
|
1347
|
-
li:
|
|
1345
|
+
}), _ = !u() && P > 1 ? R.pageX : R.slideX;
|
|
1346
|
+
i(I, "click", ut(N, H)), n.paginationKeyboard && i(I, "keydown", ut(L, H)), Q(m, Ht, "presentation"), Q(I, Ht, "tab"), Q(I, Ve, $.join(" ")), Q(I, At, $n(_, H + 1)), Q(I, ye, -1), d.push({
|
|
1347
|
+
li: m,
|
|
1348
1348
|
button: I,
|
|
1349
1349
|
page: H
|
|
1350
1350
|
});
|
|
1351
1351
|
}
|
|
1352
1352
|
}
|
|
1353
1353
|
function N(z) {
|
|
1354
|
-
|
|
1354
|
+
h(">" + z, !0);
|
|
1355
1355
|
}
|
|
1356
1356
|
function L(z, E) {
|
|
1357
|
-
var R = d.length, P =
|
|
1358
|
-
P === g(
|
|
1359
|
-
var
|
|
1360
|
-
|
|
1357
|
+
var R = d.length, P = Yn(E), j = v(), H = -1;
|
|
1358
|
+
P === g(sn, !1, j) ? H = ++z % R : P === g(ln, !1, j) ? H = (--z + R) % R : P === "Home" ? H = 0 : P === "End" && (H = R - 1);
|
|
1359
|
+
var m = d[H];
|
|
1360
|
+
m && (Ao(m.button), h(">" + H), Vt(E, !0));
|
|
1361
1361
|
}
|
|
1362
|
-
function
|
|
1362
|
+
function v() {
|
|
1363
1363
|
return n.paginationDirection || n.direction;
|
|
1364
1364
|
}
|
|
1365
1365
|
function T(z) {
|
|
@@ -1369,20 +1369,20 @@ function Zi(t, e, n) {
|
|
|
1369
1369
|
var z = T(C(!0)), E = T(C());
|
|
1370
1370
|
if (z) {
|
|
1371
1371
|
var R = z.button;
|
|
1372
|
-
|
|
1372
|
+
Dt(R, ae), Bt(R, oo), Q(R, ye, -1);
|
|
1373
1373
|
}
|
|
1374
1374
|
if (E) {
|
|
1375
1375
|
var P = E.button;
|
|
1376
|
-
Pt(P,
|
|
1376
|
+
Pt(P, ae), Q(P, oo, !0), Q(P, ye, "");
|
|
1377
1377
|
}
|
|
1378
|
-
a(
|
|
1378
|
+
a(Ho, {
|
|
1379
1379
|
list: w,
|
|
1380
1380
|
items: d
|
|
1381
1381
|
}, z, E);
|
|
1382
1382
|
}
|
|
1383
1383
|
return {
|
|
1384
1384
|
items: d,
|
|
1385
|
-
mount:
|
|
1385
|
+
mount: y,
|
|
1386
1386
|
destroy: x,
|
|
1387
1387
|
getAt: T,
|
|
1388
1388
|
update: k
|
|
@@ -1399,33 +1399,33 @@ function ta(t, e, n) {
|
|
|
1399
1399
|
function c() {
|
|
1400
1400
|
a.forEach(function(s) {
|
|
1401
1401
|
s.destroy();
|
|
1402
|
-
}),
|
|
1402
|
+
}), jt(a);
|
|
1403
1403
|
}
|
|
1404
1404
|
function l() {
|
|
1405
1405
|
c(), i();
|
|
1406
1406
|
}
|
|
1407
1407
|
function p(s, d) {
|
|
1408
|
-
var w =
|
|
1409
|
-
w.on(
|
|
1410
|
-
d.go(d.is(
|
|
1408
|
+
var w = gt(s);
|
|
1409
|
+
w.on(Ut, function(b, y, x) {
|
|
1410
|
+
d.go(d.is(xe) ? x : b);
|
|
1411
1411
|
}), a.push(w);
|
|
1412
1412
|
}
|
|
1413
1413
|
function u() {
|
|
1414
|
-
var s =
|
|
1415
|
-
d(
|
|
1414
|
+
var s = gt(t), d = s.on;
|
|
1415
|
+
d(Bn, h), d(Uo, g), d([te, Ct], C), a.push(s), s.emit(Wn, t.splides);
|
|
1416
1416
|
}
|
|
1417
1417
|
function C() {
|
|
1418
|
-
Q(e.Elements.list,
|
|
1418
|
+
Q(e.Elements.list, Hn, n.direction === cn ? "vertical" : "");
|
|
1419
1419
|
}
|
|
1420
|
-
function
|
|
1420
|
+
function h(s) {
|
|
1421
1421
|
t.go(s.index);
|
|
1422
1422
|
}
|
|
1423
1423
|
function g(s, d) {
|
|
1424
|
-
|
|
1424
|
+
kn(Qi, Yn(d)) && (h(s), Vt(d));
|
|
1425
1425
|
}
|
|
1426
1426
|
return {
|
|
1427
|
-
setup:
|
|
1428
|
-
slideFocus:
|
|
1427
|
+
setup: ut(e.Media.set, {
|
|
1428
|
+
slideFocus: Pe(r) ? o : r
|
|
1429
1429
|
}, !0),
|
|
1430
1430
|
mount: i,
|
|
1431
1431
|
destroy: c,
|
|
@@ -1433,18 +1433,18 @@ function ta(t, e, n) {
|
|
|
1433
1433
|
};
|
|
1434
1434
|
}
|
|
1435
1435
|
function ea(t, e, n) {
|
|
1436
|
-
var o =
|
|
1436
|
+
var o = gt(t), r = o.bind, a = 0;
|
|
1437
1437
|
function i() {
|
|
1438
|
-
n.wheel && r(e.Elements.track, "wheel", c,
|
|
1438
|
+
n.wheel && r(e.Elements.track, "wheel", c, ge);
|
|
1439
1439
|
}
|
|
1440
1440
|
function c(p) {
|
|
1441
1441
|
if (p.cancelable) {
|
|
1442
|
-
var u = p.deltaY, C = u < 0,
|
|
1443
|
-
|
|
1442
|
+
var u = p.deltaY, C = u < 0, h = Cn(p), g = n.wheelMinThreshold || 0, s = n.wheelSleep || 0;
|
|
1443
|
+
$t(u) > g && h - a > s && (t.go(C ? "<" : ">"), a = h), l(C) && Vt(p);
|
|
1444
1444
|
}
|
|
1445
1445
|
}
|
|
1446
1446
|
function l(p) {
|
|
1447
|
-
return !n.releaseWheel || t.state.is(
|
|
1447
|
+
return !n.releaseWheel || t.state.is(Se) || e.Controller.getAdjacent(p) !== -1;
|
|
1448
1448
|
}
|
|
1449
1449
|
return {
|
|
1450
1450
|
mount: i
|
|
@@ -1452,22 +1452,22 @@ function ea(t, e, n) {
|
|
|
1452
1452
|
}
|
|
1453
1453
|
var na = 90;
|
|
1454
1454
|
function oa(t, e, n) {
|
|
1455
|
-
var o =
|
|
1455
|
+
var o = gt(t), r = o.on, a = e.Elements.track, i = n.live && !n.isNavigation, c = me("span", Ci), l = rn(na, ut(u, !1));
|
|
1456
1456
|
function p() {
|
|
1457
|
-
i && (
|
|
1457
|
+
i && (h(!e.Autoplay.isPaused()), Q(a, ao, !0), c.textContent = "…", r(zn, ut(h, !0)), r(Vn, ut(h, !1)), r([Ce, le], ut(u, !0)));
|
|
1458
1458
|
}
|
|
1459
1459
|
function u(g) {
|
|
1460
|
-
Q(a,
|
|
1460
|
+
Q(a, io, g), g ? (Ne(a, c), l.start()) : (ie(c), l.cancel());
|
|
1461
1461
|
}
|
|
1462
1462
|
function C() {
|
|
1463
|
-
Bt(a, [
|
|
1463
|
+
Bt(a, [ro, ao, io]), ie(c);
|
|
1464
1464
|
}
|
|
1465
|
-
function
|
|
1466
|
-
i && Q(a,
|
|
1465
|
+
function h(g) {
|
|
1466
|
+
i && Q(a, ro, g ? "off" : "polite");
|
|
1467
1467
|
}
|
|
1468
1468
|
return {
|
|
1469
1469
|
mount: p,
|
|
1470
|
-
disable:
|
|
1470
|
+
disable: h,
|
|
1471
1471
|
destroy: C
|
|
1472
1472
|
};
|
|
1473
1473
|
}
|
|
@@ -1535,7 +1535,7 @@ var ra = /* @__PURE__ */ Object.freeze({
|
|
|
1535
1535
|
function la(t, e, n) {
|
|
1536
1536
|
var o = e.Slides;
|
|
1537
1537
|
function r() {
|
|
1538
|
-
|
|
1538
|
+
gt(t).on([te, ht], a);
|
|
1539
1539
|
}
|
|
1540
1540
|
function a() {
|
|
1541
1541
|
o.forEach(function(c) {
|
|
@@ -1543,31 +1543,31 @@ function la(t, e, n) {
|
|
|
1543
1543
|
});
|
|
1544
1544
|
}
|
|
1545
1545
|
function i(c, l) {
|
|
1546
|
-
o.style("transition", "opacity " + n.speed + "ms " + n.easing),
|
|
1546
|
+
o.style("transition", "opacity " + n.speed + "ms " + n.easing), _o(l);
|
|
1547
1547
|
}
|
|
1548
1548
|
return {
|
|
1549
1549
|
mount: r,
|
|
1550
1550
|
start: i,
|
|
1551
|
-
cancel:
|
|
1551
|
+
cancel: Sn
|
|
1552
1552
|
};
|
|
1553
1553
|
}
|
|
1554
1554
|
function sa(t, e, n) {
|
|
1555
|
-
var o = e.Move, r = e.Controller, a = e.Scroll, i = e.Elements.list, c =
|
|
1555
|
+
var o = e.Move, r = e.Controller, a = e.Scroll, i = e.Elements.list, c = ut(Ft, i, "transition"), l;
|
|
1556
1556
|
function p() {
|
|
1557
|
-
|
|
1557
|
+
gt(t).bind(i, "transitionend", function(g) {
|
|
1558
1558
|
g.target === i && l && (C(), l());
|
|
1559
1559
|
});
|
|
1560
1560
|
}
|
|
1561
1561
|
function u(g, s) {
|
|
1562
|
-
var d = o.toPosition(g, !0), w = o.getPosition(),
|
|
1563
|
-
|
|
1562
|
+
var d = o.toPosition(g, !0), w = o.getPosition(), b = h(g);
|
|
1563
|
+
$t(d - w) >= 1 && b >= 1 ? n.useScroll ? a.scroll(d, b, !1, s) : (c("transform " + b + "ms " + n.easing), o.translate(d, !0), l = s) : (o.jump(g), s());
|
|
1564
1564
|
}
|
|
1565
1565
|
function C() {
|
|
1566
1566
|
c(""), a.cancel();
|
|
1567
1567
|
}
|
|
1568
|
-
function
|
|
1568
|
+
function h(g) {
|
|
1569
1569
|
var s = n.rewindSpeed;
|
|
1570
|
-
if (t.is(
|
|
1570
|
+
if (t.is(be) && s) {
|
|
1571
1571
|
var d = r.getIndex(!0), w = r.getEnd();
|
|
1572
1572
|
if (d === 0 && g >= w || d >= w && g === 0)
|
|
1573
1573
|
return s;
|
|
@@ -1582,39 +1582,39 @@ function sa(t, e, n) {
|
|
|
1582
1582
|
}
|
|
1583
1583
|
var ca = /* @__PURE__ */ (function() {
|
|
1584
1584
|
function t(n, o) {
|
|
1585
|
-
this.event =
|
|
1586
|
-
var r =
|
|
1587
|
-
|
|
1588
|
-
label:
|
|
1589
|
-
labelledby:
|
|
1585
|
+
this.event = gt(), this.Components = {}, this.state = ui(fe), this.splides = [], this._o = {}, this._E = {};
|
|
1586
|
+
var r = Jt(n) ? Io(document, n) : n;
|
|
1587
|
+
$e(r, r + " is invalid."), this.root = r, o = Kt({
|
|
1588
|
+
label: Rt(r, At) || "",
|
|
1589
|
+
labelledby: Rt(r, Dn) || ""
|
|
1590
1590
|
}, aa, t.defaults, o || {});
|
|
1591
1591
|
try {
|
|
1592
|
-
|
|
1592
|
+
Kt(o, JSON.parse(Rt(r, On)));
|
|
1593
1593
|
} catch {
|
|
1594
|
-
|
|
1594
|
+
$e(!1, "Invalid JSON");
|
|
1595
1595
|
}
|
|
1596
|
-
this._o = Object.create(
|
|
1596
|
+
this._o = Object.create(Kt({}, o));
|
|
1597
1597
|
}
|
|
1598
1598
|
var e = t.prototype;
|
|
1599
1599
|
return e.mount = function(o, r) {
|
|
1600
1600
|
var a = this, i = this.state, c = this.Components;
|
|
1601
|
-
|
|
1602
|
-
var l =
|
|
1601
|
+
$e(i.is([fe, Ke]), "Already mounted!"), i.set(fe), this._C = c, this._T = r || this._T || (this.is(Me) ? la : sa), this._E = o || this._E;
|
|
1602
|
+
var l = Ie({}, ra, this._E, {
|
|
1603
1603
|
Transition: this._T
|
|
1604
1604
|
});
|
|
1605
|
-
return
|
|
1605
|
+
return re(l, function(p, u) {
|
|
1606
1606
|
var C = p(a, c, a._o);
|
|
1607
1607
|
c[u] = C, C.setup && C.setup();
|
|
1608
|
-
}),
|
|
1608
|
+
}), re(c, function(p) {
|
|
1609
1609
|
p.mount && p.mount();
|
|
1610
|
-
}), this.emit(
|
|
1610
|
+
}), this.emit(te), Pt(this.root, xi), i.set(he), this.emit(_n), this;
|
|
1611
1611
|
}, e.sync = function(o) {
|
|
1612
1612
|
return this.splides.push({
|
|
1613
1613
|
splide: o
|
|
1614
1614
|
}), o.splides.push({
|
|
1615
1615
|
splide: this,
|
|
1616
1616
|
isParent: !0
|
|
1617
|
-
}), this.state.is(
|
|
1617
|
+
}), this.state.is(he) && (this._C.Sync.remount(), o.Components.Sync.remount()), this;
|
|
1618
1618
|
}, e.go = function(o) {
|
|
1619
1619
|
return this._C.Controller.go(o), this;
|
|
1620
1620
|
}, e.on = function(o, r) {
|
|
@@ -1623,7 +1623,7 @@ var ca = /* @__PURE__ */ (function() {
|
|
|
1623
1623
|
return this.event.off(o), this;
|
|
1624
1624
|
}, e.emit = function(o) {
|
|
1625
1625
|
var r;
|
|
1626
|
-
return (r = this.event).emit.apply(r, [o].concat(
|
|
1626
|
+
return (r = this.event).emit.apply(r, [o].concat(Qt(arguments, 1))), this;
|
|
1627
1627
|
}, e.add = function(o, r) {
|
|
1628
1628
|
return this._C.Slides.add(o, r), this;
|
|
1629
1629
|
}, e.remove = function(o) {
|
|
@@ -1635,9 +1635,9 @@ var ca = /* @__PURE__ */ (function() {
|
|
|
1635
1635
|
}, e.destroy = function(o) {
|
|
1636
1636
|
o === void 0 && (o = !0);
|
|
1637
1637
|
var r = this.event, a = this.state;
|
|
1638
|
-
return a.is(
|
|
1638
|
+
return a.is(fe) ? gt(this).on(_n, this.destroy.bind(this, o)) : (re(this._C, function(i) {
|
|
1639
1639
|
i.destroy && i.destroy(o);
|
|
1640
|
-
}, !0), r.emit(
|
|
1640
|
+
}, !0), r.emit(Nn), r.destroy(), o && jt(this.splides), a.set(Ke)), this;
|
|
1641
1641
|
}, ii(t, [{
|
|
1642
1642
|
key: "options",
|
|
1643
1643
|
get: function() {
|
|
@@ -1657,51 +1657,51 @@ var ca = /* @__PURE__ */ (function() {
|
|
|
1657
1657
|
return this._C.Controller.getIndex();
|
|
1658
1658
|
}
|
|
1659
1659
|
}]), t;
|
|
1660
|
-
})(),
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
var
|
|
1664
|
-
[
|
|
1665
|
-
[
|
|
1666
|
-
[
|
|
1667
|
-
[
|
|
1668
|
-
[
|
|
1669
|
-
[
|
|
1670
|
-
[
|
|
1671
|
-
[
|
|
1672
|
-
[
|
|
1660
|
+
})(), Gn = ca;
|
|
1661
|
+
Gn.defaults = {};
|
|
1662
|
+
Gn.STATES = li;
|
|
1663
|
+
var uo = [
|
|
1664
|
+
[te, "onMounted"],
|
|
1665
|
+
[_n, "onReady"],
|
|
1666
|
+
[Ut, "onMove"],
|
|
1667
|
+
[Ce, "onMoved"],
|
|
1668
|
+
[Bn, "onClick"],
|
|
1669
|
+
[Ro, "onActive"],
|
|
1670
|
+
[Oo, "onInactive"],
|
|
1671
|
+
[Po, "onVisible"],
|
|
1672
|
+
[Bo, "onHidden"],
|
|
1673
1673
|
[ht, "onRefresh"],
|
|
1674
|
-
[
|
|
1675
|
-
[
|
|
1676
|
-
[
|
|
1677
|
-
[
|
|
1678
|
-
[
|
|
1679
|
-
[
|
|
1680
|
-
[
|
|
1681
|
-
[
|
|
1682
|
-
[
|
|
1683
|
-
[
|
|
1684
|
-
[
|
|
1685
|
-
[
|
|
1686
|
-
[
|
|
1687
|
-
[
|
|
1688
|
-
[
|
|
1689
|
-
[
|
|
1690
|
-
[
|
|
1691
|
-
[
|
|
1674
|
+
[Ct, "onUpdated"],
|
|
1675
|
+
[ve, "onResize"],
|
|
1676
|
+
[nn, "onResized"],
|
|
1677
|
+
[No, "onDrag"],
|
|
1678
|
+
[Wo, "onDragging"],
|
|
1679
|
+
[zo, "onDragged"],
|
|
1680
|
+
[on, "onScroll"],
|
|
1681
|
+
[le, "onScrolled"],
|
|
1682
|
+
[Nn, "onDestroy"],
|
|
1683
|
+
[Vo, "onArrowsMounted"],
|
|
1684
|
+
[Mo, "onArrowsUpdated"],
|
|
1685
|
+
[Do, "onPaginationMounted"],
|
|
1686
|
+
[Ho, "onPaginationUpdated"],
|
|
1687
|
+
[Wn, "onNavigationMounted"],
|
|
1688
|
+
[zn, "onAutoplayPlay"],
|
|
1689
|
+
[jo, "onAutoplayPlaying"],
|
|
1690
|
+
[Vn, "onAutoplayPause"],
|
|
1691
|
+
[Mn, "onLazyLoadLoaded"]
|
|
1692
1692
|
];
|
|
1693
|
-
function
|
|
1693
|
+
function qn(...t) {
|
|
1694
1694
|
return t.filter(Boolean).join(" ");
|
|
1695
1695
|
}
|
|
1696
|
-
function
|
|
1696
|
+
function tn(t) {
|
|
1697
1697
|
return t !== null && typeof t == "object";
|
|
1698
1698
|
}
|
|
1699
|
-
function
|
|
1699
|
+
function Ln(t, e) {
|
|
1700
1700
|
if (Array.isArray(t) && Array.isArray(e))
|
|
1701
|
-
return t.length === e.length && !t.some((n, o) => !
|
|
1702
|
-
if (
|
|
1701
|
+
return t.length === e.length && !t.some((n, o) => !Ln(n, e[o]));
|
|
1702
|
+
if (tn(t) && tn(e)) {
|
|
1703
1703
|
const n = Object.keys(t), o = Object.keys(e);
|
|
1704
|
-
return n.length === o.length && !n.some((r) => !Object.prototype.hasOwnProperty.call(e, r) || !
|
|
1704
|
+
return n.length === o.length && !n.some((r) => !Object.prototype.hasOwnProperty.call(e, r) || !Ln(t[r], e[r]));
|
|
1705
1705
|
}
|
|
1706
1706
|
return t === e;
|
|
1707
1707
|
}
|
|
@@ -1719,24 +1719,24 @@ function pa(t, e) {
|
|
|
1719
1719
|
}
|
|
1720
1720
|
return t;
|
|
1721
1721
|
}
|
|
1722
|
-
function
|
|
1722
|
+
function An(t, e) {
|
|
1723
1723
|
const n = t;
|
|
1724
1724
|
return pa(e, (o, r) => {
|
|
1725
|
-
Array.isArray(o) ? n[r] = o.slice() :
|
|
1725
|
+
Array.isArray(o) ? n[r] = o.slice() : tn(o) ? n[r] = An(tn(n[r]) ? n[r] : {}, o) : n[r] = o;
|
|
1726
1726
|
}), n;
|
|
1727
1727
|
}
|
|
1728
|
-
var da = ({ children: t, className: e, ...n }) => /* @__PURE__ */
|
|
1729
|
-
className:
|
|
1728
|
+
var da = ({ children: t, className: e, ...n }) => /* @__PURE__ */ oe.createElement("div", {
|
|
1729
|
+
className: qn("splide__track", e),
|
|
1730
1730
|
...n
|
|
1731
|
-
}, /* @__PURE__ */
|
|
1731
|
+
}, /* @__PURE__ */ oe.createElement("ul", {
|
|
1732
1732
|
className: "splide__list"
|
|
1733
|
-
}, t)),
|
|
1733
|
+
}, t)), ar = class extends oe.Component {
|
|
1734
1734
|
constructor() {
|
|
1735
|
-
super(...arguments), this.splideRef =
|
|
1735
|
+
super(...arguments), this.splideRef = oe.createRef(), this.slides = [];
|
|
1736
1736
|
}
|
|
1737
1737
|
componentDidMount() {
|
|
1738
1738
|
const { options: t, extensions: e, transition: n } = this.props, { current: o } = this.splideRef;
|
|
1739
|
-
o && (this.splide = new
|
|
1739
|
+
o && (this.splide = new Gn(o, t), this.bind(this.splide), this.splide.mount(e, n), this.options = An({}, t || {}), this.slides = this.getSlides());
|
|
1740
1740
|
}
|
|
1741
1741
|
componentWillUnmount() {
|
|
1742
1742
|
this.splide && (this.splide.destroy(), this.splide = void 0), this.options = void 0, this.slides.length = 0;
|
|
@@ -1745,7 +1745,7 @@ var da = ({ children: t, className: e, ...n }) => /* @__PURE__ */ te.createEleme
|
|
|
1745
1745
|
if (!this.splide)
|
|
1746
1746
|
return;
|
|
1747
1747
|
const { options: t } = this.props;
|
|
1748
|
-
t && !
|
|
1748
|
+
t && !Ln(this.options, t) && (this.splide.options = t, this.options = An({}, t));
|
|
1749
1749
|
const e = this.getSlides();
|
|
1750
1750
|
ua(this.slides, e) || (this.splide.refresh(), this.slides = e);
|
|
1751
1751
|
}
|
|
@@ -1766,7 +1766,7 @@ var da = ({ children: t, className: e, ...n }) => /* @__PURE__ */ te.createEleme
|
|
|
1766
1766
|
return [];
|
|
1767
1767
|
}
|
|
1768
1768
|
bind(t) {
|
|
1769
|
-
|
|
1769
|
+
uo.forEach(([e, n]) => {
|
|
1770
1770
|
const o = this.props[n];
|
|
1771
1771
|
typeof o == "function" && t.on(e, (...r) => {
|
|
1772
1772
|
o(t, ...r);
|
|
@@ -1780,14 +1780,14 @@ var da = ({ children: t, className: e, ...n }) => /* @__PURE__ */ te.createEleme
|
|
|
1780
1780
|
}
|
|
1781
1781
|
render() {
|
|
1782
1782
|
const { className: t, tag: e = "div", hasTrack: n = !0, children: o, ...r } = this.props;
|
|
1783
|
-
return /* @__PURE__ */
|
|
1784
|
-
className:
|
|
1783
|
+
return /* @__PURE__ */ oe.createElement(e, {
|
|
1784
|
+
className: qn("splide", t),
|
|
1785
1785
|
ref: this.splideRef,
|
|
1786
|
-
...this.omit(r, ["options", ...
|
|
1787
|
-
}, n ? /* @__PURE__ */
|
|
1786
|
+
...this.omit(r, ["options", ...uo.map((a) => a[1])])
|
|
1787
|
+
}, n ? /* @__PURE__ */ oe.createElement(da, null, o) : o);
|
|
1788
1788
|
}
|
|
1789
|
-
},
|
|
1790
|
-
className:
|
|
1789
|
+
}, lr = ({ children: t, className: e, ...n }) => /* @__PURE__ */ oe.createElement("li", {
|
|
1790
|
+
className: qn("splide__slide", e),
|
|
1791
1791
|
...n
|
|
1792
1792
|
}, t);
|
|
1793
1793
|
/*!
|
|
@@ -1798,9 +1798,9 @@ var da = ({ children: t, className: e, ...n }) => /* @__PURE__ */ te.createEleme
|
|
|
1798
1798
|
*/
|
|
1799
1799
|
const ga = "RichTextRenderer-module__link___BWeZ2", fa = {
|
|
1800
1800
|
link: ga
|
|
1801
|
-
},
|
|
1801
|
+
}, sr = ({ content: t }) => {
|
|
1802
1802
|
const e = (n) => n.map((o, r) => o.type === "link" ? /* @__PURE__ */ O("a", { className: fa.link, href: o.value, target: o.target, children: e(o.children) }, r) : /* @__PURE__ */ O("span", { style: ma(o), children: o.text }, r));
|
|
1803
|
-
return /* @__PURE__ */ O(
|
|
1803
|
+
return /* @__PURE__ */ O(Te, { children: t.map((n, o) => {
|
|
1804
1804
|
const r = n.children;
|
|
1805
1805
|
return /* @__PURE__ */ O("div", { children: e(r) }, o);
|
|
1806
1806
|
}) });
|
|
@@ -1819,21 +1819,21 @@ function ma(t) {
|
|
|
1819
1819
|
}
|
|
1820
1820
|
};
|
|
1821
1821
|
}
|
|
1822
|
-
const ya = "SvgImage-module__svg___q3xE-", ha = "SvgImage-module__img___VsTm-",
|
|
1822
|
+
const ya = "SvgImage-module__svg___q3xE-", ha = "SvgImage-module__img___VsTm-", po = {
|
|
1823
1823
|
svg: ya,
|
|
1824
1824
|
img: ha
|
|
1825
|
-
},
|
|
1826
|
-
const [r, a] =
|
|
1827
|
-
return
|
|
1825
|
+
}, we = ({ url: t, fill: e = "#000000", hoverFill: n = "#CCCCCC", className: o = "" }) => {
|
|
1826
|
+
const [r, a] = ct(!0);
|
|
1827
|
+
return bt(() => {
|
|
1828
1828
|
if (typeof window < "u" && window.CSS) {
|
|
1829
1829
|
const i = CSS.supports("mask-image", 'url("")') || CSS.supports("-webkit-mask-image", 'url("")');
|
|
1830
1830
|
a(i);
|
|
1831
1831
|
}
|
|
1832
|
-
}, []), !t.endsWith(".svg") || !r ? /* @__PURE__ */ O("img", { src: t, alt: "", className:
|
|
1832
|
+
}, []), !t.endsWith(".svg") || !r ? /* @__PURE__ */ O("img", { src: t, alt: "", className: dt(po.img, o) }) : /* @__PURE__ */ O(
|
|
1833
1833
|
"span",
|
|
1834
1834
|
{
|
|
1835
1835
|
"data-supports-mask": r,
|
|
1836
|
-
className:
|
|
1836
|
+
className: dt(po.svg, o),
|
|
1837
1837
|
style: {
|
|
1838
1838
|
"--svg": `url(${t})`,
|
|
1839
1839
|
"--fill": e,
|
|
@@ -1853,46 +1853,46 @@ const ya = "SvgImage-module__svg___q3xE-", ha = "SvgImage-module__img___VsTm-",
|
|
|
1853
1853
|
"bottom-right": U.bottomRightAlignment
|
|
1854
1854
|
};
|
|
1855
1855
|
function ba({ settings: t, content: e, styles: n, isEditor: o }) {
|
|
1856
|
-
const [r, a] =
|
|
1857
|
-
r && r.go(
|
|
1856
|
+
const [r, a] = ct(null), { widthSettings: i, fontSettings: c, letterSpacing: l, textAlign: p, wordSpacing: u, fontSizeLineHeight: C, textAppearance: h, color: g } = n.imageCaption, [s, d] = ct(void 0), [w, b] = ct(null), [y, x] = ct(0), [V, N] = ct(0), { direction: L, transition: v, controls: T, pagination: k, imageCaption: z, triggers: E } = t, R = wt(v.type), { x: P, y: j } = t.controls.offset, H = (m) => {
|
|
1857
|
+
r && r.go(m);
|
|
1858
1858
|
};
|
|
1859
|
-
return
|
|
1859
|
+
return bt(() => {
|
|
1860
1860
|
if (!w) return;
|
|
1861
|
-
const
|
|
1861
|
+
const m = new ResizeObserver((I) => {
|
|
1862
1862
|
if (!r) return;
|
|
1863
|
-
const [
|
|
1863
|
+
const [$] = I;
|
|
1864
1864
|
d({
|
|
1865
|
-
width: Math.round(
|
|
1866
|
-
height: Math.round(
|
|
1865
|
+
width: Math.round($.contentRect.width),
|
|
1866
|
+
height: Math.round($.contentRect.height)
|
|
1867
1867
|
});
|
|
1868
1868
|
});
|
|
1869
|
-
return
|
|
1870
|
-
}, [w]),
|
|
1871
|
-
!r || R.current ===
|
|
1872
|
-
}, [
|
|
1869
|
+
return m.observe(w), () => m.unobserve(w);
|
|
1870
|
+
}, [w]), bt(() => {
|
|
1871
|
+
!r || R.current === v.type || (N((m) => m + 1), R.current = v.type);
|
|
1872
|
+
}, [v.type]), /* @__PURE__ */ O("div", { className: dt(U.wrapper, { [U.editor]: o }), ref: b, children: /* @__PURE__ */ St(
|
|
1873
1873
|
"div",
|
|
1874
1874
|
{
|
|
1875
1875
|
className: U.sliderInner,
|
|
1876
1876
|
style: {
|
|
1877
1877
|
width: s ? s.width : "100%",
|
|
1878
1878
|
height: s ? s.height : "100%",
|
|
1879
|
-
backgroundColor:
|
|
1879
|
+
backgroundColor: v.backgroundColor && v.type === "fade in" ? v.backgroundColor : "transparent"
|
|
1880
1880
|
},
|
|
1881
1881
|
children: [
|
|
1882
1882
|
t.imageCaption.isActive && /* @__PURE__ */ O(
|
|
1883
1883
|
"div",
|
|
1884
1884
|
{
|
|
1885
|
-
className:
|
|
1885
|
+
className: dt(U.captionBlock),
|
|
1886
1886
|
children: /* @__PURE__ */ O(
|
|
1887
1887
|
"div",
|
|
1888
1888
|
{
|
|
1889
1889
|
className: U.captionTextWrapper,
|
|
1890
|
-
children: e.map((
|
|
1890
|
+
children: e.map((m, I) => /* @__PURE__ */ O(
|
|
1891
1891
|
"div",
|
|
1892
1892
|
{
|
|
1893
|
-
className:
|
|
1894
|
-
[U.withPointerEvents]: I ===
|
|
1895
|
-
[U.active]: I ===
|
|
1893
|
+
className: dt(U.captionText, va[z.alignment], {
|
|
1894
|
+
[U.withPointerEvents]: I === y && o,
|
|
1895
|
+
[U.active]: I === y
|
|
1896
1896
|
}),
|
|
1897
1897
|
style: {
|
|
1898
1898
|
fontFamily: c.fontFamily,
|
|
@@ -1904,11 +1904,11 @@ function ba({ settings: t, content: e, styles: n, isEditor: o }) {
|
|
|
1904
1904
|
textAlign: p,
|
|
1905
1905
|
fontSize: F(C.fontSize, o),
|
|
1906
1906
|
lineHeight: F(C.lineHeight, o),
|
|
1907
|
-
textTransform:
|
|
1908
|
-
textDecoration:
|
|
1909
|
-
fontVariant:
|
|
1907
|
+
textTransform: h.textTransform ?? "none",
|
|
1908
|
+
textDecoration: h.textDecoration ?? "none",
|
|
1909
|
+
fontVariant: h.fontVariant ?? "normal",
|
|
1910
1910
|
color: g,
|
|
1911
|
-
transitionDuration:
|
|
1911
|
+
transitionDuration: v.duration ? `${Math.round(parseInt(v.duration) / 2)}ms` : "500ms"
|
|
1912
1912
|
},
|
|
1913
1913
|
children: /* @__PURE__ */ O(
|
|
1914
1914
|
"div",
|
|
@@ -1922,7 +1922,7 @@ function ba({ settings: t, content: e, styles: n, isEditor: o }) {
|
|
|
1922
1922
|
top: F(z.offset.y, o),
|
|
1923
1923
|
left: F(z.offset.x, o)
|
|
1924
1924
|
},
|
|
1925
|
-
children: /* @__PURE__ */ O(
|
|
1925
|
+
children: /* @__PURE__ */ O(sr, { content: m.imageCaption })
|
|
1926
1926
|
}
|
|
1927
1927
|
)
|
|
1928
1928
|
},
|
|
@@ -1933,29 +1933,29 @@ function ba({ settings: t, content: e, styles: n, isEditor: o }) {
|
|
|
1933
1933
|
}
|
|
1934
1934
|
),
|
|
1935
1935
|
/* @__PURE__ */ O(
|
|
1936
|
-
|
|
1936
|
+
ar,
|
|
1937
1937
|
{
|
|
1938
|
-
onMove: (
|
|
1939
|
-
x(
|
|
1938
|
+
onMove: (m) => {
|
|
1939
|
+
x(m.index);
|
|
1940
1940
|
},
|
|
1941
1941
|
ref: a,
|
|
1942
1942
|
options: {
|
|
1943
1943
|
arrows: !1,
|
|
1944
|
-
speed:
|
|
1944
|
+
speed: v.duration ? parseInt(v.duration) : 500,
|
|
1945
1945
|
autoplay: E.autoPlay !== null,
|
|
1946
1946
|
...E.autoPlay !== null && {
|
|
1947
1947
|
interval: parseInt(E.autoPlay) * 1e3
|
|
1948
1948
|
},
|
|
1949
|
-
direction: L === "horiz" ||
|
|
1949
|
+
direction: L === "horiz" || v.type === "fade in" ? "ltr" : "ttb",
|
|
1950
1950
|
pagination: !1,
|
|
1951
1951
|
drag: E.triggersList.drag,
|
|
1952
1952
|
perPage: 1,
|
|
1953
1953
|
width: s ? s.width : "100%",
|
|
1954
1954
|
height: s ? s.height : "100%",
|
|
1955
|
-
type:
|
|
1955
|
+
type: v.type === "fade in" ? "fade" : "loop",
|
|
1956
1956
|
rewind: !0
|
|
1957
1957
|
},
|
|
1958
|
-
children: e.map((
|
|
1958
|
+
children: e.map((m, I) => /* @__PURE__ */ O(lr, { children: /* @__PURE__ */ O(
|
|
1959
1959
|
"div",
|
|
1960
1960
|
{
|
|
1961
1961
|
className: U.sliderItem,
|
|
@@ -1966,12 +1966,12 @@ function ba({ settings: t, content: e, styles: n, isEditor: o }) {
|
|
|
1966
1966
|
children: /* @__PURE__ */ O(
|
|
1967
1967
|
"img",
|
|
1968
1968
|
{
|
|
1969
|
-
className:
|
|
1970
|
-
[U.contain]:
|
|
1971
|
-
[U.cover]:
|
|
1969
|
+
className: dt(U.sliderImage, {
|
|
1970
|
+
[U.contain]: m.image.objectFit === "contain",
|
|
1971
|
+
[U.cover]: m.image.objectFit === "cover"
|
|
1972
1972
|
}),
|
|
1973
|
-
src:
|
|
1974
|
-
alt:
|
|
1973
|
+
src: m.image.url,
|
|
1974
|
+
alt: m.image.name ?? ""
|
|
1975
1975
|
}
|
|
1976
1976
|
)
|
|
1977
1977
|
}
|
|
@@ -1981,11 +1981,11 @@ function ba({ settings: t, content: e, styles: n, isEditor: o }) {
|
|
|
1981
1981
|
},
|
|
1982
1982
|
V
|
|
1983
1983
|
),
|
|
1984
|
-
T.isActive && /* @__PURE__ */
|
|
1984
|
+
T.isActive && /* @__PURE__ */ St(Te, { children: [
|
|
1985
1985
|
/* @__PURE__ */ O(
|
|
1986
1986
|
"div",
|
|
1987
1987
|
{
|
|
1988
|
-
className:
|
|
1988
|
+
className: dt(U.arrow, {
|
|
1989
1989
|
[U.arrowVertical]: L === "vert",
|
|
1990
1990
|
[U.hoverArrow]: T.show === "on hover"
|
|
1991
1991
|
}),
|
|
@@ -1993,7 +1993,7 @@ function ba({ settings: t, content: e, styles: n, isEditor: o }) {
|
|
|
1993
1993
|
color: T.color,
|
|
1994
1994
|
"--arrow-hover-color": T.hover
|
|
1995
1995
|
},
|
|
1996
|
-
children: /* @__PURE__ */
|
|
1996
|
+
children: /* @__PURE__ */ St(
|
|
1997
1997
|
"button",
|
|
1998
1998
|
{
|
|
1999
1999
|
onClick: () => {
|
|
@@ -2005,15 +2005,15 @@ function ba({ settings: t, content: e, styles: n, isEditor: o }) {
|
|
|
2005
2005
|
},
|
|
2006
2006
|
children: [
|
|
2007
2007
|
T.arrowsImgUrl && /* @__PURE__ */ O(
|
|
2008
|
-
|
|
2008
|
+
we,
|
|
2009
2009
|
{
|
|
2010
2010
|
url: T.arrowsImgUrl,
|
|
2011
2011
|
fill: T.color,
|
|
2012
2012
|
hoverFill: T.hover,
|
|
2013
|
-
className:
|
|
2013
|
+
className: dt(U.arrowImg, U.mirror)
|
|
2014
2014
|
}
|
|
2015
2015
|
),
|
|
2016
|
-
!T.arrowsImgUrl && /* @__PURE__ */ O(
|
|
2016
|
+
!T.arrowsImgUrl && /* @__PURE__ */ O(go, { color: T.color, className: dt(U.arrowIcon, U.arrowImg, U.mirror) })
|
|
2017
2017
|
]
|
|
2018
2018
|
}
|
|
2019
2019
|
)
|
|
@@ -2022,7 +2022,7 @@ function ba({ settings: t, content: e, styles: n, isEditor: o }) {
|
|
|
2022
2022
|
/* @__PURE__ */ O(
|
|
2023
2023
|
"div",
|
|
2024
2024
|
{
|
|
2025
|
-
className:
|
|
2025
|
+
className: dt(U.arrow, U.nextArrow, {
|
|
2026
2026
|
[U.arrowVertical]: L === "vert",
|
|
2027
2027
|
[U.hoverArrow]: T.show === "on hover"
|
|
2028
2028
|
}),
|
|
@@ -2030,7 +2030,7 @@ function ba({ settings: t, content: e, styles: n, isEditor: o }) {
|
|
|
2030
2030
|
color: T.color,
|
|
2031
2031
|
"--arrow-hover-color": T.hover
|
|
2032
2032
|
},
|
|
2033
|
-
children: /* @__PURE__ */
|
|
2033
|
+
children: /* @__PURE__ */ St(
|
|
2034
2034
|
"button",
|
|
2035
2035
|
{
|
|
2036
2036
|
className: U.arrowInner,
|
|
@@ -2040,7 +2040,7 @@ function ba({ settings: t, content: e, styles: n, isEditor: o }) {
|
|
|
2040
2040
|
},
|
|
2041
2041
|
children: [
|
|
2042
2042
|
T.arrowsImgUrl && /* @__PURE__ */ O(
|
|
2043
|
-
|
|
2043
|
+
we,
|
|
2044
2044
|
{
|
|
2045
2045
|
url: T.arrowsImgUrl,
|
|
2046
2046
|
fill: T.color,
|
|
@@ -2048,7 +2048,7 @@ function ba({ settings: t, content: e, styles: n, isEditor: o }) {
|
|
|
2048
2048
|
className: U.arrowImg
|
|
2049
2049
|
}
|
|
2050
2050
|
),
|
|
2051
|
-
!T.arrowsImgUrl && /* @__PURE__ */ O(
|
|
2051
|
+
!T.arrowsImgUrl && /* @__PURE__ */ O(go, { color: T.color, className: dt(U.arrowIcon, U.arrowImg) })
|
|
2052
2052
|
]
|
|
2053
2053
|
}
|
|
2054
2054
|
)
|
|
@@ -2067,7 +2067,7 @@ function ba({ settings: t, content: e, styles: n, isEditor: o }) {
|
|
|
2067
2067
|
k.isActive && /* @__PURE__ */ O(
|
|
2068
2068
|
"div",
|
|
2069
2069
|
{
|
|
2070
|
-
className:
|
|
2070
|
+
className: dt(U.pagination, {
|
|
2071
2071
|
[U.paginationInsideBottom]: k.position === "inside-1" && L === "horiz",
|
|
2072
2072
|
[U.paginationInsideTop]: k.position === "inside-2" && L === "horiz",
|
|
2073
2073
|
[U.paginationOutsideBottom]: k.position === "outside-1" && L === "horiz",
|
|
@@ -2086,21 +2086,21 @@ function ba({ settings: t, content: e, styles: n, isEditor: o }) {
|
|
|
2086
2086
|
backgroundColor: k.colors[2],
|
|
2087
2087
|
transform: `scale(${k.scale / 100}) translate(${F(k.offset.x, o)}, ${F(k.offset.y, o)}) rotate(${L === "horiz" ? "0deg" : "90deg"})`
|
|
2088
2088
|
},
|
|
2089
|
-
children: e.map((
|
|
2089
|
+
children: e.map((m, I) => /* @__PURE__ */ O(
|
|
2090
2090
|
"button",
|
|
2091
2091
|
{
|
|
2092
2092
|
onClick: () => {
|
|
2093
2093
|
r && r.go(I);
|
|
2094
2094
|
},
|
|
2095
|
-
className:
|
|
2095
|
+
className: dt(U.paginationItem),
|
|
2096
2096
|
children: /* @__PURE__ */ O(
|
|
2097
2097
|
"div",
|
|
2098
2098
|
{
|
|
2099
|
-
className:
|
|
2100
|
-
[U.activeDot]: I ===
|
|
2099
|
+
className: dt(U.dot, {
|
|
2100
|
+
[U.activeDot]: I === y
|
|
2101
2101
|
}),
|
|
2102
2102
|
style: {
|
|
2103
|
-
backgroundColor: I ===
|
|
2103
|
+
backgroundColor: I === y ? k.colors[0] : k.colors[1],
|
|
2104
2104
|
"--pagination-hover-color": k.hover
|
|
2105
2105
|
}
|
|
2106
2106
|
}
|
|
@@ -2116,7 +2116,7 @@ function ba({ settings: t, content: e, styles: n, isEditor: o }) {
|
|
|
2116
2116
|
}
|
|
2117
2117
|
) });
|
|
2118
2118
|
}
|
|
2119
|
-
function
|
|
2119
|
+
function go({ color: t, className: e }) {
|
|
2120
2120
|
return /* @__PURE__ */ O("svg", { viewBox: "0 0 10 18", className: e, children: /* @__PURE__ */ O("g", { id: "Symbols", stroke: "none", strokeWidth: "1", fillRule: "evenodd", children: /* @__PURE__ */ O("path", { d: "M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z", id: "Shape-Copy", fill: t, transform: "translate(5, 9) rotate(-90) translate(-5, -9)" }) }) });
|
|
2121
2121
|
}
|
|
2122
2122
|
const Sa = {
|
|
@@ -2719,13 +2719,13 @@ const Sa = {
|
|
|
2719
2719
|
},
|
|
2720
2720
|
required: ["settings", "content", "styles"]
|
|
2721
2721
|
}
|
|
2722
|
-
}, Ca = "ImageRevealSlider-module__imageRevealSlider___UE5Ob", xa = "ImageRevealSlider-module__image___Qjt-e", $a = "ImageRevealSlider-module__link___N-iLG", _a = "ImageRevealSlider-module__cursor___2U03d",
|
|
2722
|
+
}, Ca = "ImageRevealSlider-module__imageRevealSlider___UE5Ob", xa = "ImageRevealSlider-module__image___Qjt-e", $a = "ImageRevealSlider-module__link___N-iLG", _a = "ImageRevealSlider-module__cursor___2U03d", ue = {
|
|
2723
2723
|
imageRevealSlider: Ca,
|
|
2724
2724
|
image: xa,
|
|
2725
2725
|
link: $a,
|
|
2726
2726
|
cursor: _a
|
|
2727
2727
|
};
|
|
2728
|
-
function
|
|
2728
|
+
function fo(t, e, n) {
|
|
2729
2729
|
for (const o of n) {
|
|
2730
2730
|
const r = new Image();
|
|
2731
2731
|
r.src = o.url;
|
|
@@ -2735,7 +2735,7 @@ function go(t, e, n) {
|
|
|
2735
2735
|
}
|
|
2736
2736
|
return !1;
|
|
2737
2737
|
}
|
|
2738
|
-
function
|
|
2738
|
+
function hn(t) {
|
|
2739
2739
|
return new Promise((e) => {
|
|
2740
2740
|
const n = new Image();
|
|
2741
2741
|
n.src = t, n.onload = () => {
|
|
@@ -2747,46 +2747,46 @@ async function wa(t, e, n, o) {
|
|
|
2747
2747
|
let r, a;
|
|
2748
2748
|
if (e === "custom") {
|
|
2749
2749
|
r = n;
|
|
2750
|
-
const i = await
|
|
2750
|
+
const i = await hn(t);
|
|
2751
2751
|
a = i.height / i.width * r;
|
|
2752
2752
|
} else if (e === "random") {
|
|
2753
2753
|
r = Math.random() * (o.max - o.min) + o.min;
|
|
2754
|
-
const i = await
|
|
2754
|
+
const i = await hn(t);
|
|
2755
2755
|
a = i.height / i.width * r;
|
|
2756
2756
|
} else {
|
|
2757
|
-
const i = await
|
|
2757
|
+
const i = await hn(t);
|
|
2758
2758
|
r = i.width, a = i.height;
|
|
2759
2759
|
}
|
|
2760
2760
|
return { width: r, height: a, finalWidth: `${r}px` };
|
|
2761
2761
|
}
|
|
2762
2762
|
function Ta({ settings: t, content: e, isEditor: n }) {
|
|
2763
|
-
const [o, r] =
|
|
2764
|
-
|
|
2763
|
+
const [o, r] = ct(null), [a, i] = ct([]), [c, l] = ct(0), p = wt(0), [u, C] = ct({ x: 0, y: 0 }), [h, g] = ct(1), [s, d] = ct("none"), w = wt({ x: 0, y: 0 }), [b, y] = ct(!1), { sizeType: x, imageWidth: V, randomRangeImageWidth: N } = t.imageSize, { revealPosition: L, visible: v } = t.position, { cursorType: T, target: k, defaultCursorScale: z, defaultCursor: E, hoverCursorScale: R, hoverCursor: P } = t.cursor;
|
|
2764
|
+
bt(() => {
|
|
2765
2765
|
if (!o) return;
|
|
2766
|
-
const
|
|
2767
|
-
const B = o.getBoundingClientRect(), G =
|
|
2768
|
-
if (C({ x: G, y:
|
|
2766
|
+
const m = (_, S) => {
|
|
2767
|
+
const B = o.getBoundingClientRect(), G = _ - B.left, nt = S - B.top;
|
|
2768
|
+
if (C({ x: G, y: nt }), T === "system") {
|
|
2769
2769
|
d("none"), g(1);
|
|
2770
2770
|
return;
|
|
2771
2771
|
}
|
|
2772
|
-
const
|
|
2772
|
+
const tt = G, lt = nt, A = document.elementFromPoint(B.left + tt, B.top + lt);
|
|
2773
2773
|
if (A && A.closest("a")) {
|
|
2774
2774
|
d("none"), g(1);
|
|
2775
2775
|
return;
|
|
2776
2776
|
}
|
|
2777
|
-
const
|
|
2778
|
-
d(
|
|
2779
|
-
}, I = (
|
|
2780
|
-
|
|
2781
|
-
},
|
|
2782
|
-
|
|
2777
|
+
const K = fo(tt, lt, a) || k === "area" ? { img: P ?? "none", scale: R } : { img: E ?? "none", scale: z };
|
|
2778
|
+
d(K.img), g(K.scale);
|
|
2779
|
+
}, I = (_) => {
|
|
2780
|
+
_.stopPropagation(), w.current = { x: _.clientX, y: _.clientY }, m(_.clientX, _.clientY);
|
|
2781
|
+
}, $ = () => {
|
|
2782
|
+
b && m(w.current.x, w.current.y);
|
|
2783
2783
|
};
|
|
2784
|
-
return o.addEventListener("mousemove", I), window.addEventListener("scroll",
|
|
2785
|
-
o.removeEventListener("mousemove", I), window.removeEventListener("scroll",
|
|
2784
|
+
return o.addEventListener("mousemove", I), window.addEventListener("scroll", $, !0), () => {
|
|
2785
|
+
o.removeEventListener("mousemove", I), window.removeEventListener("scroll", $, !0);
|
|
2786
2786
|
};
|
|
2787
2787
|
}, [
|
|
2788
2788
|
o,
|
|
2789
|
-
|
|
2789
|
+
b,
|
|
2790
2790
|
u,
|
|
2791
2791
|
T,
|
|
2792
2792
|
k,
|
|
@@ -2795,97 +2795,97 @@ function Ta({ settings: t, content: e, isEditor: n }) {
|
|
|
2795
2795
|
R,
|
|
2796
2796
|
z,
|
|
2797
2797
|
a
|
|
2798
|
-
]),
|
|
2799
|
-
|
|
2800
|
-
}, [
|
|
2801
|
-
const j = async (
|
|
2798
|
+
]), bt(() => {
|
|
2799
|
+
b || (d("none"), g(0));
|
|
2800
|
+
}, [b]);
|
|
2801
|
+
const j = async (m, I, $, _ = {}) => {
|
|
2802
2802
|
const { width: S, height: B, finalWidth: G } = await wa(
|
|
2803
|
-
|
|
2803
|
+
m.image.url,
|
|
2804
2804
|
x,
|
|
2805
2805
|
V,
|
|
2806
2806
|
N
|
|
2807
2807
|
);
|
|
2808
|
-
let
|
|
2809
|
-
L === "same" ? (
|
|
2810
|
-
const
|
|
2808
|
+
let nt = 0, tt = 0;
|
|
2809
|
+
L === "same" ? (nt = I / 2, tt = $ / 2) : (nt = _.x ?? Math.random() * I, tt = _.y ?? Math.random() * $);
|
|
2810
|
+
const lt = Math.min(Math.max(nt, S / 2), I - S / 2), A = Math.min(Math.max(tt, B / 2), $ - B / 2);
|
|
2811
2811
|
return {
|
|
2812
2812
|
id: p.current++,
|
|
2813
|
-
url:
|
|
2814
|
-
link:
|
|
2815
|
-
name:
|
|
2816
|
-
x:
|
|
2813
|
+
url: m.image.url,
|
|
2814
|
+
link: m.link,
|
|
2815
|
+
name: m.image.name,
|
|
2816
|
+
x: lt,
|
|
2817
2817
|
y: A,
|
|
2818
2818
|
width: G
|
|
2819
2819
|
};
|
|
2820
2820
|
};
|
|
2821
|
-
return
|
|
2821
|
+
return bt(() => {
|
|
2822
2822
|
if (!o || e.length === 0) return;
|
|
2823
|
-
const
|
|
2823
|
+
const m = o.getBoundingClientRect(), I = m.width, $ = m.height, _ = [];
|
|
2824
2824
|
(async () => {
|
|
2825
|
-
const B = e[0], G = await j(B, I,
|
|
2826
|
-
|
|
2825
|
+
const B = e[0], G = await j(B, I, $);
|
|
2826
|
+
_.push(G), i(_), l(1);
|
|
2827
2827
|
})();
|
|
2828
|
-
}, [x, V, N, L, o]),
|
|
2829
|
-
|
|
2830
|
-
}, [
|
|
2828
|
+
}, [x, V, N, L, o]), bt(() => {
|
|
2829
|
+
v === "last One" && i((m) => m.length > 0 ? [m[m.length - 1]] : []);
|
|
2830
|
+
}, [v]), /* @__PURE__ */ St(
|
|
2831
2831
|
"div",
|
|
2832
2832
|
{
|
|
2833
2833
|
ref: r,
|
|
2834
|
-
onClick: async (
|
|
2834
|
+
onClick: async (m) => {
|
|
2835
2835
|
if (!o) return;
|
|
2836
|
-
const I = o.getBoundingClientRect(),
|
|
2837
|
-
if (k === "image" && !
|
|
2836
|
+
const I = o.getBoundingClientRect(), $ = m.clientX - I.left, _ = m.clientY - I.top;
|
|
2837
|
+
if (k === "image" && !fo($, _, a)) return;
|
|
2838
2838
|
let S = 0, B = 0;
|
|
2839
|
-
L === "on Click" ? (S =
|
|
2840
|
-
const G = e[c],
|
|
2841
|
-
i((
|
|
2839
|
+
L === "on Click" ? (S = $, B = _) : L === "same" ? (S = I.width / 2, B = I.height / 2) : (S = Math.random() * I.width, B = Math.random() * I.height);
|
|
2840
|
+
const G = e[c], nt = await j(G, I.width, I.height, { x: S, y: B });
|
|
2841
|
+
i((tt) => v === "all" ? [...tt, nt] : [nt]), l((tt) => tt >= e.length - 1 ? 0 : tt + 1);
|
|
2842
2842
|
},
|
|
2843
|
-
onMouseEnter: () =>
|
|
2844
|
-
onMouseLeave: () =>
|
|
2845
|
-
className:
|
|
2843
|
+
onMouseEnter: () => y(!0),
|
|
2844
|
+
onMouseLeave: () => y(!1),
|
|
2845
|
+
className: ue.imageRevealSlider,
|
|
2846
2846
|
style: { cursor: s === "none" ? "default" : "none" },
|
|
2847
2847
|
children: [
|
|
2848
|
-
a.map((
|
|
2848
|
+
a.map((m) => /* @__PURE__ */ O(
|
|
2849
2849
|
"div",
|
|
2850
2850
|
{
|
|
2851
|
-
className:
|
|
2851
|
+
className: ue.wrapper,
|
|
2852
2852
|
style: {
|
|
2853
|
-
top: `${
|
|
2854
|
-
left: `${
|
|
2853
|
+
top: `${m.y}px`,
|
|
2854
|
+
left: `${m.x}px`,
|
|
2855
2855
|
position: "absolute",
|
|
2856
2856
|
transform: "translate(-50%, -50%)",
|
|
2857
|
-
width:
|
|
2857
|
+
width: m.width ?? "auto",
|
|
2858
2858
|
height: "auto",
|
|
2859
2859
|
cursor: s === "none" ? "default" : "none"
|
|
2860
2860
|
},
|
|
2861
|
-
children: k === "area" &&
|
|
2861
|
+
children: k === "area" && m.link ? /* @__PURE__ */ O("a", { href: m.link, target: "_blank", className: ue.link, children: /* @__PURE__ */ O(
|
|
2862
2862
|
"img",
|
|
2863
2863
|
{
|
|
2864
|
-
src:
|
|
2865
|
-
alt:
|
|
2866
|
-
className:
|
|
2864
|
+
src: m.url,
|
|
2865
|
+
alt: m.name,
|
|
2866
|
+
className: ue.image
|
|
2867
2867
|
},
|
|
2868
|
-
|
|
2868
|
+
m.id
|
|
2869
2869
|
) }) : /* @__PURE__ */ O(
|
|
2870
2870
|
"img",
|
|
2871
2871
|
{
|
|
2872
|
-
src:
|
|
2873
|
-
alt:
|
|
2874
|
-
className:
|
|
2872
|
+
src: m.url,
|
|
2873
|
+
alt: m.name,
|
|
2874
|
+
className: ue.image
|
|
2875
2875
|
},
|
|
2876
|
-
|
|
2876
|
+
m.id
|
|
2877
2877
|
)
|
|
2878
2878
|
},
|
|
2879
|
-
|
|
2879
|
+
m.id
|
|
2880
2880
|
)),
|
|
2881
|
-
|
|
2881
|
+
b && /* @__PURE__ */ O(
|
|
2882
2882
|
"div",
|
|
2883
2883
|
{
|
|
2884
|
-
className:
|
|
2884
|
+
className: ue.cursor,
|
|
2885
2885
|
style: {
|
|
2886
2886
|
left: `${u.x}px`,
|
|
2887
2887
|
top: `${u.y}px`,
|
|
2888
|
-
transform: `translate(-50%, -50%) scale(${
|
|
2888
|
+
transform: `translate(-50%, -50%) scale(${h})`,
|
|
2889
2889
|
backgroundImage: `url('${s}')`,
|
|
2890
2890
|
backgroundSize: "cover",
|
|
2891
2891
|
backgroundPosition: "center",
|
|
@@ -3248,11 +3248,11 @@ const La = {
|
|
|
3248
3248
|
slideOutTop: cl,
|
|
3249
3249
|
slideOutBottom: ul,
|
|
3250
3250
|
scaleSlide: pl
|
|
3251
|
-
},
|
|
3251
|
+
}, He = (t, e, n) => {
|
|
3252
3252
|
const o = {}, [r, a] = t.split("-");
|
|
3253
3253
|
return r === "top" ? (o.top = "0", o.bottom = "auto") : r === "middle" ? (o.top = "50%", o.bottom = "auto") : r === "bottom" && (o.top = "auto", o.bottom = "0"), a === "left" ? (o.left = "0", o.right = "auto") : a === "center" ? (o.left = "50%", o.right = "auto") : a === "right" && (o.left = "auto", o.right = "0"), r === "middle" && a === "center" ? o.transform = `translate(calc(-50% + ${F(e.x, n)}), calc(-50% + ${F(e.y, n)}))` : r === "middle" ? o.transform = `translate(${F(e.x, n)}, calc(-50% + ${F(e.y, n)}))` : a === "center" ? o.transform = `translate(calc(-50% + ${F(e.x, n)}), ${F(e.y, n)})` : o.transform = `translate(${F(e.x, n)}, ${F(e.y, n)})`, o;
|
|
3254
3254
|
};
|
|
3255
|
-
function
|
|
3255
|
+
function cr(t) {
|
|
3256
3256
|
const e = window.getComputedStyle(t);
|
|
3257
3257
|
return {
|
|
3258
3258
|
top: parseFloat(e.paddingTop) || 0,
|
|
@@ -3261,11 +3261,11 @@ function sr(t) {
|
|
|
3261
3261
|
left: parseFloat(e.paddingLeft) || 0
|
|
3262
3262
|
};
|
|
3263
3263
|
}
|
|
3264
|
-
function
|
|
3265
|
-
const e = t.getBoundingClientRect(), n =
|
|
3264
|
+
function mo(t) {
|
|
3265
|
+
const e = t.getBoundingClientRect(), n = cr(t), o = Math.max(0, e.width - n.left - n.right), r = Math.max(0, e.height - n.top - n.bottom), a = t.naturalWidth, i = t.naturalHeight, c = o / r, l = a / i;
|
|
3266
3266
|
let p, u;
|
|
3267
3267
|
l > c ? (p = o, u = o / l) : (u = r, p = r * l);
|
|
3268
|
-
const C = e.left + n.left,
|
|
3268
|
+
const C = e.left + n.left, h = e.top + n.top, g = (o - p) / 2 + C, s = (r - u) / 2 + h;
|
|
3269
3269
|
return {
|
|
3270
3270
|
x: g,
|
|
3271
3271
|
y: s,
|
|
@@ -3273,8 +3273,8 @@ function fo(t) {
|
|
|
3273
3273
|
height: u
|
|
3274
3274
|
};
|
|
3275
3275
|
}
|
|
3276
|
-
function
|
|
3277
|
-
const e = t.getBoundingClientRect(), n =
|
|
3276
|
+
function yo(t) {
|
|
3277
|
+
const e = t.getBoundingClientRect(), n = cr(t);
|
|
3278
3278
|
return {
|
|
3279
3279
|
left: e.left + n.left,
|
|
3280
3280
|
right: e.right - n.right,
|
|
@@ -3282,7 +3282,7 @@ function mo(t) {
|
|
|
3282
3282
|
bottom: e.bottom - n.bottom
|
|
3283
3283
|
};
|
|
3284
3284
|
}
|
|
3285
|
-
function
|
|
3285
|
+
function ho(t) {
|
|
3286
3286
|
const e = t.match(/rgba?\(([^)]+)\)/);
|
|
3287
3287
|
if (e) {
|
|
3288
3288
|
const o = e[1].split(",").map((r) => parseFloat(r.trim()));
|
|
@@ -3364,10 +3364,10 @@ function dl(t, e) {
|
|
|
3364
3364
|
return { appearClass: n, backdropAppearClass: o, backdropDisappearClass: r, disappearClass: a };
|
|
3365
3365
|
}
|
|
3366
3366
|
const gl = ({ settings: t, content: e, styles: n, portalId: o, activeEvent: r, isEditor: a }) => {
|
|
3367
|
-
const [i, c] =
|
|
3368
|
-
return
|
|
3367
|
+
const [i, c] = ct(!1), { url: l } = t.thumbnailBlock.cover;
|
|
3368
|
+
return bt(() => {
|
|
3369
3369
|
r === "close" && c(!1), r === "open" && c(!0);
|
|
3370
|
-
}, [r]), /* @__PURE__ */
|
|
3370
|
+
}, [r]), /* @__PURE__ */ St(Te, { children: [
|
|
3371
3371
|
/* @__PURE__ */ O(
|
|
3372
3372
|
"img",
|
|
3373
3373
|
{
|
|
@@ -3392,128 +3392,128 @@ const gl = ({ settings: t, content: e, styles: n, portalId: o, activeEvent: r, i
|
|
|
3392
3392
|
] });
|
|
3393
3393
|
}, fl = ({ isOpen: t, onClose: e, content: n, lightboxStyles: o, settings: r, portalId: a, isEditor: i, metadata: c }) => {
|
|
3394
3394
|
var M;
|
|
3395
|
-
const [l, p] =
|
|
3396
|
-
|
|
3397
|
-
const
|
|
3395
|
+
const [l, p] = ct(0), [u, C] = ct(0), [h, g] = ct(!1), [s, d] = ct(!1), [w, b] = ct({}), y = wt(null), x = wt(null), V = wt(null), N = wt(!1), L = wt(null), v = wt(null), T = wt(null), k = wt(null), z = wt(!1), E = wt(null), [R, P] = ct(!1), { appear: j, triggers: H, slider: m, thumbnail: I, controls: $, area: _, caption: S, layout: B } = r.lightboxBlock, { appearClass: G, backdropAppearClass: nt, backdropDisappearClass: tt, disappearClass: lt } = dl(j.type, j.direction), A = (c == null ? void 0 : c.itemId) ?? null;
|
|
3396
|
+
bt(() => {
|
|
3397
|
+
const f = () => {
|
|
3398
3398
|
setTimeout(() => {
|
|
3399
3399
|
var q, Y;
|
|
3400
|
-
(Y = (q =
|
|
3400
|
+
(Y = (q = y.current) == null ? void 0 : q.splide) == null || Y.refresh();
|
|
3401
3401
|
}, 16);
|
|
3402
3402
|
}, D = () => {
|
|
3403
3403
|
C((q) => q + 1);
|
|
3404
3404
|
};
|
|
3405
|
-
return window.addEventListener("ArticleEditor.Layout:change",
|
|
3406
|
-
window.removeEventListener("ArticleEditor.Layout:change",
|
|
3405
|
+
return window.addEventListener("ArticleEditor.Layout:change", f), window.addEventListener("ArticleEditor.ComponentContent:change", D), () => {
|
|
3406
|
+
window.removeEventListener("ArticleEditor.Layout:change", f), window.removeEventListener("ArticleEditor.ComponentContent:change", D);
|
|
3407
3407
|
};
|
|
3408
|
-
}, []),
|
|
3408
|
+
}, []), bt(() => {
|
|
3409
3409
|
if (!t || !I.isActive) {
|
|
3410
3410
|
P(!1);
|
|
3411
3411
|
return;
|
|
3412
3412
|
}
|
|
3413
|
-
const
|
|
3414
|
-
if (!
|
|
3413
|
+
const f = E.current;
|
|
3414
|
+
if (!f) return;
|
|
3415
3415
|
const D = () => {
|
|
3416
|
-
|
|
3416
|
+
m.direction === "horiz" ? P(f.scrollWidth > f.clientWidth) : P(f.scrollHeight > f.clientHeight);
|
|
3417
3417
|
};
|
|
3418
3418
|
D();
|
|
3419
3419
|
const q = new ResizeObserver(D);
|
|
3420
|
-
return q.observe(
|
|
3421
|
-
}, [t, I.isActive, n.length, w,
|
|
3422
|
-
const
|
|
3423
|
-
const
|
|
3424
|
-
|
|
3420
|
+
return q.observe(f), () => q.disconnect();
|
|
3421
|
+
}, [t, I.isActive, n.length, w, m.direction]);
|
|
3422
|
+
const K = gr(() => {
|
|
3423
|
+
const f = window.matchMedia("(max-width: 768px)").matches, D = ho(_.color);
|
|
3424
|
+
f && !i && D > 0.9 && (document.body.style.backgroundColor = ""), g(!0), N.current = !0;
|
|
3425
3425
|
const q = (Y) => {
|
|
3426
|
-
Y.target === L.current && Y.animationName && (L.current &&
|
|
3426
|
+
Y.target === L.current && Y.animationName && (L.current && v.current && L.current.removeEventListener("animationend", v.current), v.current = null, N.current && (N.current = !1, e()), g(!1));
|
|
3427
3427
|
};
|
|
3428
|
-
L.current && (
|
|
3429
|
-
}, [e,
|
|
3430
|
-
var Y,
|
|
3431
|
-
if (
|
|
3428
|
+
L.current && (v.current = q, L.current.addEventListener("animationend", q));
|
|
3429
|
+
}, [e, _.color, i]), yt = (f, D, q) => {
|
|
3430
|
+
var Y, et;
|
|
3431
|
+
if (f) {
|
|
3432
3432
|
if (H.type === "click" && H.switch === "image")
|
|
3433
|
-
H.repeat === "close" && l === n.length - 1 ?
|
|
3433
|
+
H.repeat === "close" && l === n.length - 1 ? K() : (Y = y.current) == null || Y.go("+1");
|
|
3434
3434
|
else if (H.type === "click" && H.switch === "50/50") {
|
|
3435
|
-
const
|
|
3436
|
-
let
|
|
3437
|
-
|
|
3435
|
+
const J = f.getBoundingClientRect(), X = D - J.left, at = q - J.top, ft = J.width, rt = J.height;
|
|
3436
|
+
let ot;
|
|
3437
|
+
m.direction === "horiz" ? ot = X < ft / 2 ? "-1" : "+1" : ot = at < rt / 2 ? "-1" : "+1", (et = y.current) == null || et.go(ot);
|
|
3438
3438
|
}
|
|
3439
3439
|
}
|
|
3440
|
-
}, it = (
|
|
3440
|
+
}, it = (f) => {
|
|
3441
3441
|
if (z.current) {
|
|
3442
3442
|
z.current = !1;
|
|
3443
3443
|
return;
|
|
3444
3444
|
}
|
|
3445
3445
|
const D = n[l], q = (D == null ? void 0 : D.image.objectFit) === "cover";
|
|
3446
|
-
let Y,
|
|
3447
|
-
if ("changedTouches" in
|
|
3448
|
-
Y =
|
|
3449
|
-
else if ("clientX" in
|
|
3450
|
-
Y =
|
|
3446
|
+
let Y, et;
|
|
3447
|
+
if ("changedTouches" in f && f.changedTouches.length > 0)
|
|
3448
|
+
Y = f.changedTouches[0].clientX, et = f.changedTouches[0].clientY;
|
|
3449
|
+
else if ("clientX" in f)
|
|
3450
|
+
Y = f.clientX, et = f.clientY;
|
|
3451
3451
|
else
|
|
3452
3452
|
return;
|
|
3453
|
-
let
|
|
3453
|
+
let J;
|
|
3454
3454
|
if (q && V.current) {
|
|
3455
|
-
const X =
|
|
3456
|
-
|
|
3455
|
+
const X = yo(V.current);
|
|
3456
|
+
J = Y >= X.left && Y <= X.right && et >= X.top && et <= X.bottom;
|
|
3457
3457
|
} else {
|
|
3458
|
-
const X = V.current ?
|
|
3458
|
+
const X = V.current ? mo(V.current) : null;
|
|
3459
3459
|
if (!X) {
|
|
3460
|
-
|
|
3460
|
+
f.target === f.currentTarget && K();
|
|
3461
3461
|
return;
|
|
3462
3462
|
}
|
|
3463
|
-
|
|
3463
|
+
J = Y >= X.x && Y <= X.x + X.width && et >= X.y && et <= X.y + X.height;
|
|
3464
3464
|
}
|
|
3465
|
-
|
|
3466
|
-
},
|
|
3467
|
-
const D =
|
|
3468
|
-
(D.classList.contains(W.thumbsWrapper) || D.classList.contains(W.thumbsContainer)) && it(
|
|
3465
|
+
J ? yt(V.current, Y, et) : K();
|
|
3466
|
+
}, mt = (f) => {
|
|
3467
|
+
const D = f.target;
|
|
3468
|
+
(D.classList.contains(W.thumbsWrapper) || D.classList.contains(W.thumbsContainer)) && it(f);
|
|
3469
3469
|
};
|
|
3470
|
-
|
|
3470
|
+
bt(() => {
|
|
3471
3471
|
if (!t) return;
|
|
3472
|
-
const
|
|
3472
|
+
const f = (D) => {
|
|
3473
3473
|
var q, Y;
|
|
3474
3474
|
if (D.key === "Escape") {
|
|
3475
|
-
|
|
3475
|
+
K();
|
|
3476
3476
|
return;
|
|
3477
3477
|
}
|
|
3478
3478
|
if (D.key === "ArrowRight") {
|
|
3479
|
-
p((
|
|
3479
|
+
p((et) => (et + 1) % Math.max(n.length, 1)), (q = y.current) == null || q.go("+1");
|
|
3480
3480
|
return;
|
|
3481
3481
|
}
|
|
3482
|
-
D.key === "ArrowLeft" && (p((
|
|
3482
|
+
D.key === "ArrowLeft" && (p((et) => (et - 1 + Math.max(n.length, 1)) % Math.max(n.length, 1)), (Y = y.current) == null || Y.go("-1"));
|
|
3483
3483
|
};
|
|
3484
|
-
return window.addEventListener("keydown",
|
|
3485
|
-
window.removeEventListener("keydown",
|
|
3484
|
+
return window.addEventListener("keydown", f), () => {
|
|
3485
|
+
window.removeEventListener("keydown", f);
|
|
3486
3486
|
};
|
|
3487
|
-
}, [t,
|
|
3487
|
+
}, [t, K, n.length]), bt(() => {
|
|
3488
3488
|
if (t) {
|
|
3489
|
-
if (p(0), C((D) => D + 1), N.current = !1, g(!1), d(!1),
|
|
3490
|
-
const
|
|
3491
|
-
window.dispatchEvent(
|
|
3489
|
+
if (p(0), C((D) => D + 1), N.current = !1, g(!1), d(!1), b({}), !A) return;
|
|
3490
|
+
const f = new CustomEvent("page-overlay", { detail: { itemId: A } });
|
|
3491
|
+
window.dispatchEvent(f);
|
|
3492
3492
|
}
|
|
3493
3493
|
return () => {
|
|
3494
|
-
L.current &&
|
|
3494
|
+
L.current && v.current && (L.current.removeEventListener("animationend", v.current), v.current = null), d(!1);
|
|
3495
3495
|
};
|
|
3496
|
-
}, [t, A]),
|
|
3497
|
-
x.current !== null && x.current !==
|
|
3498
|
-
}, [
|
|
3496
|
+
}, [t, A]), bt(() => {
|
|
3497
|
+
x.current !== null && x.current !== m.type && C((f) => f + 1), x.current = m.type;
|
|
3498
|
+
}, [m.type]), bt(() => {
|
|
3499
3499
|
if (!t) return;
|
|
3500
|
-
const
|
|
3500
|
+
const f = document.body.style.overflow, D = window.matchMedia("(max-width: 768px)").matches, q = ho(_.color);
|
|
3501
3501
|
document.body.style.overflow = "hidden", d(!1);
|
|
3502
|
-
const Y = (
|
|
3503
|
-
|
|
3502
|
+
const Y = (J) => {
|
|
3503
|
+
J.target === L.current && !N.current && J.animationName && (D && !i && q > 0.9 && (document.body.style.backgroundColor = _.color), d(!0), L.current && T.current && L.current.removeEventListener("animationend", T.current), T.current = null);
|
|
3504
3504
|
};
|
|
3505
3505
|
L.current && (T.current = Y, L.current.addEventListener("animationend", Y));
|
|
3506
|
-
const
|
|
3507
|
-
const X =
|
|
3508
|
-
X && (X.closest(`.${W.thumbsWrapper}`) || X.closest(`.${W.thumbsContainer}`)) ||
|
|
3506
|
+
const et = (J) => {
|
|
3507
|
+
const X = J.target;
|
|
3508
|
+
X && (X.closest(`.${W.thumbsWrapper}`) || X.closest(`.${W.thumbsContainer}`)) || m.type !== "slide" && J.preventDefault();
|
|
3509
3509
|
};
|
|
3510
|
-
return document.addEventListener("touchmove",
|
|
3511
|
-
document.body.style.overflow =
|
|
3510
|
+
return document.addEventListener("touchmove", et, { passive: !1 }), () => {
|
|
3511
|
+
document.body.style.overflow = f, document.removeEventListener("touchmove", et), L.current && T.current && (L.current.removeEventListener("animationend", T.current), T.current = null), d(!1);
|
|
3512
3512
|
};
|
|
3513
|
-
}, [t, i,
|
|
3513
|
+
}, [t, i, _.color, m.type]), bt(() => {
|
|
3514
3514
|
if (!t) return;
|
|
3515
|
-
const
|
|
3516
|
-
var Y,
|
|
3515
|
+
const f = (D) => {
|
|
3516
|
+
var Y, et;
|
|
3517
3517
|
if (N.current) {
|
|
3518
3518
|
D.stopPropagation();
|
|
3519
3519
|
return;
|
|
@@ -3524,100 +3524,100 @@ const gl = ({ settings: t, content: e, styles: n, portalId: o, activeEvent: r, i
|
|
|
3524
3524
|
}
|
|
3525
3525
|
const q = D.target;
|
|
3526
3526
|
if (!(q && (q.closest(`.${W.thumbsContainer}`) || q.closest(`.${W.thumbItem}`)))) {
|
|
3527
|
-
if (
|
|
3528
|
-
const
|
|
3529
|
-
if (q && (
|
|
3527
|
+
if (m.type === "slide" && H.type === "drag" && ((et = (Y = y.current) == null ? void 0 : Y.splide) != null && et.root)) {
|
|
3528
|
+
const J = y.current.splide.root;
|
|
3529
|
+
if (q && (J.contains(q) || J === q))
|
|
3530
3530
|
return;
|
|
3531
3531
|
}
|
|
3532
3532
|
if (D.touches.length === 0 && D.changedTouches.length > 0) {
|
|
3533
|
-
const
|
|
3534
|
-
let
|
|
3533
|
+
const J = n[l], X = (J == null ? void 0 : J.image.objectFit) === "cover", at = D.changedTouches[0];
|
|
3534
|
+
let ft;
|
|
3535
3535
|
if (X && V.current) {
|
|
3536
|
-
const
|
|
3537
|
-
|
|
3536
|
+
const rt = yo(V.current);
|
|
3537
|
+
ft = at.clientX >= rt.left && at.clientX <= rt.right && at.clientY >= rt.top && at.clientY <= rt.bottom;
|
|
3538
3538
|
} else {
|
|
3539
|
-
const
|
|
3540
|
-
if (!
|
|
3541
|
-
|
|
3539
|
+
const rt = V.current ? mo(V.current) : null;
|
|
3540
|
+
if (!rt) return;
|
|
3541
|
+
ft = at.clientX >= rt.x && at.clientX <= rt.x + rt.width && at.clientY >= rt.y && at.clientY <= rt.y + rt.height;
|
|
3542
3542
|
}
|
|
3543
|
-
if (!
|
|
3543
|
+
if (!ft) {
|
|
3544
3544
|
D.stopPropagation(), N.current = !0;
|
|
3545
|
-
const
|
|
3546
|
-
|
|
3545
|
+
const rt = (ot) => {
|
|
3546
|
+
ot.stopPropagation(), ot.preventDefault(), document.removeEventListener("click", rt, !0);
|
|
3547
3547
|
};
|
|
3548
|
-
document.addEventListener("click",
|
|
3548
|
+
document.addEventListener("click", rt, !0), K();
|
|
3549
3549
|
}
|
|
3550
3550
|
}
|
|
3551
3551
|
}
|
|
3552
3552
|
};
|
|
3553
|
-
return document.addEventListener("touchend",
|
|
3554
|
-
document.removeEventListener("touchend",
|
|
3553
|
+
return document.addEventListener("touchend", f, { passive: !0 }), () => {
|
|
3554
|
+
document.removeEventListener("touchend", f);
|
|
3555
3555
|
};
|
|
3556
|
-
}, [t,
|
|
3557
|
-
const
|
|
3558
|
-
|
|
3559
|
-
var
|
|
3560
|
-
if (!t || !
|
|
3561
|
-
const
|
|
3556
|
+
}, [t, K, l, n]);
|
|
3557
|
+
const Wt = (m.type === "scale" || m.type === "fade") && m.direction === "vert" && H.type === "drag";
|
|
3558
|
+
bt(() => {
|
|
3559
|
+
var ot, Yt;
|
|
3560
|
+
if (!t || !Wt || !((Yt = (ot = y.current) == null ? void 0 : ot.splide) != null && Yt.root)) return;
|
|
3561
|
+
const f = y.current.splide.root, D = 30, q = (Z, st) => {
|
|
3562
3562
|
if (k.current) {
|
|
3563
|
-
const
|
|
3564
|
-
(
|
|
3563
|
+
const xt = Math.abs(Z - k.current.x), It = Math.abs(st - k.current.y);
|
|
3564
|
+
(xt > 0 || It > 0) && (z.current = !0);
|
|
3565
3565
|
}
|
|
3566
3566
|
}, Y = (Z) => {
|
|
3567
3567
|
k.current && (Z.preventDefault(), q(Z.clientX, Z.clientY));
|
|
3568
|
-
},
|
|
3568
|
+
}, et = (Z) => {
|
|
3569
3569
|
k.current && Z.touches.length > 0 && (Z.preventDefault(), q(Z.touches[0].clientX, Z.touches[0].clientY));
|
|
3570
|
-
},
|
|
3571
|
-
if (!k.current || !
|
|
3570
|
+
}, J = (Z, st) => {
|
|
3571
|
+
if (!k.current || !y.current) {
|
|
3572
3572
|
k.current = null;
|
|
3573
3573
|
return;
|
|
3574
3574
|
}
|
|
3575
|
-
const
|
|
3576
|
-
|
|
3575
|
+
const xt = Math.abs(Z - k.current.x), It = Math.abs(st - k.current.y);
|
|
3576
|
+
It > D && It > xt && y.current.go(st < k.current.y ? "+1" : "-1"), k.current = null;
|
|
3577
3577
|
}, X = (Z) => {
|
|
3578
|
-
k.current &&
|
|
3579
|
-
},
|
|
3578
|
+
k.current && J(Z.clientX, Z.clientY), document.removeEventListener("pointerup", X), document.removeEventListener("pointercancel", X), document.removeEventListener("pointermove", Y);
|
|
3579
|
+
}, at = (Z) => {
|
|
3580
3580
|
if (k.current) {
|
|
3581
3581
|
if (Z.changedTouches.length > 0) {
|
|
3582
|
-
const
|
|
3583
|
-
|
|
3582
|
+
const st = Z.changedTouches[0];
|
|
3583
|
+
J(st.clientX, st.clientY);
|
|
3584
3584
|
}
|
|
3585
|
-
document.removeEventListener("touchend",
|
|
3585
|
+
document.removeEventListener("touchend", at), document.removeEventListener("touchcancel", at), document.removeEventListener("touchmove", et);
|
|
3586
3586
|
}
|
|
3587
|
-
},
|
|
3587
|
+
}, ft = (Z) => {
|
|
3588
3588
|
k.current = { x: Z.clientX, y: Z.clientY }, z.current = !1, document.addEventListener("pointermove", Y, { passive: !1 }), document.addEventListener("pointerup", X), document.addEventListener("pointercancel", X);
|
|
3589
|
-
},
|
|
3590
|
-
Z.touches.length > 0 && (k.current = { x: Z.touches[0].clientX, y: Z.touches[0].clientY }, z.current = !1, document.addEventListener("touchmove",
|
|
3589
|
+
}, rt = (Z) => {
|
|
3590
|
+
Z.touches.length > 0 && (k.current = { x: Z.touches[0].clientX, y: Z.touches[0].clientY }, z.current = !1, document.addEventListener("touchmove", et, { passive: !1 }), document.addEventListener("touchend", at), document.addEventListener("touchcancel", at));
|
|
3591
3591
|
};
|
|
3592
|
-
return
|
|
3593
|
-
|
|
3592
|
+
return f.addEventListener("pointerdown", ft), f.addEventListener("touchstart", rt), () => {
|
|
3593
|
+
f.removeEventListener("pointerdown", ft), f.removeEventListener("touchstart", rt), document.removeEventListener("pointermove", Y), document.removeEventListener("pointerup", X), document.removeEventListener("pointercancel", X), document.removeEventListener("touchmove", et), document.removeEventListener("touchend", at), document.removeEventListener("touchcancel", at), k.current = null, z.current = !1;
|
|
3594
3594
|
};
|
|
3595
|
-
}, [t,
|
|
3596
|
-
const
|
|
3597
|
-
backgroundColor:
|
|
3598
|
-
backdropFilter: `blur(${
|
|
3595
|
+
}, [t, Wt, u]);
|
|
3596
|
+
const zt = {
|
|
3597
|
+
backgroundColor: _.color,
|
|
3598
|
+
backdropFilter: `blur(${_.blur}px)`,
|
|
3599
3599
|
animationDuration: `${parseInt(j.duration)}ms`,
|
|
3600
3600
|
animationTimingFunction: "ease",
|
|
3601
3601
|
animationFillMode: "both"
|
|
3602
3602
|
};
|
|
3603
3603
|
return document.getElementById(a) ? fr(
|
|
3604
|
-
/* @__PURE__ */
|
|
3604
|
+
/* @__PURE__ */ St(Te, { children: [
|
|
3605
3605
|
/* @__PURE__ */ O(
|
|
3606
3606
|
"div",
|
|
3607
3607
|
{
|
|
3608
3608
|
ref: i ? null : L,
|
|
3609
|
-
className:
|
|
3609
|
+
className: dt(W.background, h ? tt : nt, { [W.editor]: i }, { [W.hidden]: !t }),
|
|
3610
3610
|
style: {
|
|
3611
|
-
...
|
|
3612
|
-
...s && !i && !
|
|
3611
|
+
...zt,
|
|
3612
|
+
...s && !i && !h ? { position: "absolute" } : {}
|
|
3613
3613
|
}
|
|
3614
3614
|
}
|
|
3615
3615
|
),
|
|
3616
|
-
/* @__PURE__ */
|
|
3616
|
+
/* @__PURE__ */ St(
|
|
3617
3617
|
"div",
|
|
3618
3618
|
{
|
|
3619
3619
|
ref: i ? L : null,
|
|
3620
|
-
className:
|
|
3620
|
+
className: dt(W.contentStyle, h ? lt : G, { [W.editor]: i }, { [W.hidden]: !t }),
|
|
3621
3621
|
style: {
|
|
3622
3622
|
animationDuration: `${parseInt(j.duration)}ms`,
|
|
3623
3623
|
animationTimingFunction: "ease",
|
|
@@ -3625,83 +3625,83 @@ const gl = ({ settings: t, content: e, styles: n, portalId: o, activeEvent: r, i
|
|
|
3625
3625
|
},
|
|
3626
3626
|
children: [
|
|
3627
3627
|
/* @__PURE__ */ O(
|
|
3628
|
-
|
|
3628
|
+
ar,
|
|
3629
3629
|
{
|
|
3630
|
-
onMove: (
|
|
3631
|
-
ref:
|
|
3630
|
+
onMove: (f) => p(f.index),
|
|
3631
|
+
ref: y,
|
|
3632
3632
|
className: W.lightboxSplide,
|
|
3633
3633
|
options: {
|
|
3634
3634
|
arrows: !1,
|
|
3635
|
-
speed:
|
|
3636
|
-
direction:
|
|
3635
|
+
speed: m.duration ? parseInt(m.duration) : 500,
|
|
3636
|
+
direction: m.direction === "horiz" || m.type === "fade" || m.type === "scale" ? "ltr" : "ttb",
|
|
3637
3637
|
pagination: !1,
|
|
3638
3638
|
// Disable Splide's drag when we need custom vertical drag handling
|
|
3639
|
-
drag: H.type === "drag" && !
|
|
3639
|
+
drag: H.type === "drag" && !Wt,
|
|
3640
3640
|
perPage: 1,
|
|
3641
3641
|
width: "100%",
|
|
3642
3642
|
height: "100%",
|
|
3643
|
-
type:
|
|
3643
|
+
type: m.type === "fade" || m.type === "scale" ? "fade" : "loop",
|
|
3644
3644
|
padding: 0,
|
|
3645
3645
|
rewind: H.repeat !== "close",
|
|
3646
3646
|
start: 0
|
|
3647
3647
|
},
|
|
3648
|
-
style: { "--splide-speed":
|
|
3649
|
-
children: n.map((
|
|
3650
|
-
const q =
|
|
3651
|
-
const { transform:
|
|
3648
|
+
style: { "--splide-speed": m.duration },
|
|
3649
|
+
children: n.map((f, D) => {
|
|
3650
|
+
const q = He(B.position, B.offset, i), Y = `${F(B.padding.top, i)} ${F(B.padding.right, i)} ${F(B.padding.bottom, i)} ${F(B.padding.left, i)}`, et = m.type === "scale" ? (() => {
|
|
3651
|
+
const { transform: J, ...X } = q;
|
|
3652
3652
|
return {
|
|
3653
3653
|
...X,
|
|
3654
3654
|
position: "absolute",
|
|
3655
3655
|
padding: Y,
|
|
3656
3656
|
boxSizing: "border-box",
|
|
3657
|
-
"--position-transform":
|
|
3657
|
+
"--position-transform": J || "none"
|
|
3658
3658
|
};
|
|
3659
3659
|
})() : { ...q, position: "absolute", padding: Y, boxSizing: "border-box" };
|
|
3660
|
-
return /* @__PURE__ */ O(
|
|
3660
|
+
return /* @__PURE__ */ O(lr, { children: /* @__PURE__ */ O("div", { className: W.imgWrapper, onClick: it, children: /* @__PURE__ */ O(
|
|
3661
3661
|
"img",
|
|
3662
3662
|
{
|
|
3663
3663
|
ref: D === l ? V : null,
|
|
3664
|
-
className:
|
|
3665
|
-
[W.contain]:
|
|
3666
|
-
[W.cover]:
|
|
3667
|
-
[W.scaleSlide]:
|
|
3664
|
+
className: dt(W.imageStyle, {
|
|
3665
|
+
[W.contain]: f.image.objectFit === "contain",
|
|
3666
|
+
[W.cover]: f.image.objectFit === "cover",
|
|
3667
|
+
[W.scaleSlide]: m.type === "scale"
|
|
3668
3668
|
}),
|
|
3669
|
-
src:
|
|
3670
|
-
alt:
|
|
3671
|
-
style: { ...
|
|
3669
|
+
src: f.image.url,
|
|
3670
|
+
alt: f.image.name ?? "",
|
|
3671
|
+
style: { ...et, pointerEvents: f.image.objectFit === "contain" ? "none" : "auto" }
|
|
3672
3672
|
}
|
|
3673
3673
|
) }) }, D);
|
|
3674
3674
|
})
|
|
3675
3675
|
},
|
|
3676
3676
|
u
|
|
3677
3677
|
),
|
|
3678
|
-
|
|
3678
|
+
$.isActive && /* @__PURE__ */ St(Te, { children: [
|
|
3679
3679
|
/* @__PURE__ */ O(
|
|
3680
3680
|
"div",
|
|
3681
3681
|
{
|
|
3682
|
-
className:
|
|
3683
|
-
style: { color:
|
|
3684
|
-
children: /* @__PURE__ */
|
|
3682
|
+
className: dt(W.arrow, { [W.arrowVertical]: m.direction === "vert" }),
|
|
3683
|
+
style: { color: $.color, "--arrow-hover-color": $.hover },
|
|
3684
|
+
children: /* @__PURE__ */ St(
|
|
3685
3685
|
"button",
|
|
3686
3686
|
{
|
|
3687
3687
|
className: W.arrowInner,
|
|
3688
|
-
style: { transform: `translate(${F(
|
|
3688
|
+
style: { transform: `translate(${F($.offset.x, i)}, ${F($.offset.y * (m.direction === "horiz" ? 1 : -1), i)}) scale(${$.scale}) rotate(${m.direction === "horiz" ? "0deg" : "90deg"})` },
|
|
3689
3689
|
onClick: () => {
|
|
3690
|
-
var
|
|
3691
|
-
return (
|
|
3690
|
+
var f;
|
|
3691
|
+
return (f = y.current) == null ? void 0 : f.go("-1");
|
|
3692
3692
|
},
|
|
3693
3693
|
"aria-label": "Previous",
|
|
3694
3694
|
children: [
|
|
3695
|
-
|
|
3696
|
-
|
|
3695
|
+
$.arrowsImgUrl && /* @__PURE__ */ O(
|
|
3696
|
+
we,
|
|
3697
3697
|
{
|
|
3698
|
-
url:
|
|
3699
|
-
fill:
|
|
3700
|
-
hoverFill:
|
|
3701
|
-
className:
|
|
3698
|
+
url: $.arrowsImgUrl,
|
|
3699
|
+
fill: $.color,
|
|
3700
|
+
hoverFill: $.hover,
|
|
3701
|
+
className: dt(W.arrowImg, W.mirror)
|
|
3702
3702
|
}
|
|
3703
3703
|
),
|
|
3704
|
-
|
|
3704
|
+
!$.arrowsImgUrl && /* @__PURE__ */ O(vo, { color: $.color, className: dt(W.arrowIcon, W.arrowImg, W.mirror) })
|
|
3705
3705
|
]
|
|
3706
3706
|
}
|
|
3707
3707
|
)
|
|
@@ -3710,62 +3710,62 @@ const gl = ({ settings: t, content: e, styles: n, portalId: o, activeEvent: r, i
|
|
|
3710
3710
|
/* @__PURE__ */ O(
|
|
3711
3711
|
"div",
|
|
3712
3712
|
{
|
|
3713
|
-
className:
|
|
3714
|
-
style: { color:
|
|
3715
|
-
children: /* @__PURE__ */
|
|
3713
|
+
className: dt(W.arrow, W.nextArrow, { [W.arrowVertical]: m.direction === "vert" }),
|
|
3714
|
+
style: { color: $.color, "--arrow-hover-color": $.hover },
|
|
3715
|
+
children: /* @__PURE__ */ St(
|
|
3716
3716
|
"button",
|
|
3717
3717
|
{
|
|
3718
3718
|
className: W.arrowInner,
|
|
3719
|
-
style: { transform: `translate(${F(
|
|
3719
|
+
style: { transform: `translate(${F($.offset.x * (m.direction === "horiz" ? -1 : 1), i)}, ${F($.offset.y, i)}) scale(${$.scale}) rotate(${m.direction === "horiz" ? "0deg" : "90deg"})` },
|
|
3720
3720
|
onClick: () => {
|
|
3721
|
-
var
|
|
3722
|
-
return (
|
|
3721
|
+
var f;
|
|
3722
|
+
return (f = y.current) == null ? void 0 : f.go("+1");
|
|
3723
3723
|
},
|
|
3724
3724
|
"aria-label": "Next",
|
|
3725
3725
|
children: [
|
|
3726
|
-
|
|
3727
|
-
|
|
3726
|
+
$.arrowsImgUrl && /* @__PURE__ */ O(
|
|
3727
|
+
we,
|
|
3728
3728
|
{
|
|
3729
|
-
url:
|
|
3730
|
-
fill:
|
|
3731
|
-
hoverFill:
|
|
3729
|
+
url: $.arrowsImgUrl,
|
|
3730
|
+
fill: $.color,
|
|
3731
|
+
hoverFill: $.hover,
|
|
3732
3732
|
className: W.arrowImg
|
|
3733
3733
|
}
|
|
3734
3734
|
),
|
|
3735
|
-
|
|
3735
|
+
!$.arrowsImgUrl && /* @__PURE__ */ O(vo, { color: $.color, className: dt(W.arrowIcon, W.arrowImg) })
|
|
3736
3736
|
]
|
|
3737
3737
|
}
|
|
3738
3738
|
)
|
|
3739
3739
|
}
|
|
3740
3740
|
)
|
|
3741
3741
|
] }),
|
|
3742
|
-
|
|
3743
|
-
const
|
|
3744
|
-
return /* @__PURE__ */ O("button", { className: W.closeButton, style: { ...
|
|
3742
|
+
_.closeIconUrl && (() => {
|
|
3743
|
+
const f = He(_.closeIconAlign, _.closeIconOffset, i), D = `scale(${_.closeIconScale})`, q = f.transform ? `${f.transform} ${D}` : D;
|
|
3744
|
+
return /* @__PURE__ */ O("button", { className: W.closeButton, style: { ...f, transform: q }, onClick: K, "aria-label": "Close lightbox", children: /* @__PURE__ */ O(we, { url: _.closeIconUrl, fill: _.closeIconColor ?? "#000000", hoverFill: _.closeIconHover ?? "#cccccc" }) });
|
|
3745
3745
|
})(),
|
|
3746
3746
|
S && S.isActive && o.imageCaption && ((M = n[l]) == null ? void 0 : M.imageCaption) && (() => {
|
|
3747
|
-
const { widthSettings:
|
|
3747
|
+
const { widthSettings: f, fontSettings: D, letterSpacing: q, textAlign: Y, wordSpacing: et, fontSizeLineHeight: J, textAppearance: X, color: at } = o.imageCaption;
|
|
3748
3748
|
return /* @__PURE__ */ O(
|
|
3749
3749
|
"div",
|
|
3750
3750
|
{
|
|
3751
3751
|
className: W.caption,
|
|
3752
3752
|
style: {
|
|
3753
|
-
...
|
|
3753
|
+
...He(S.alignment, S.offset, i),
|
|
3754
3754
|
fontFamily: D.fontFamily,
|
|
3755
3755
|
fontWeight: D.fontWeight,
|
|
3756
3756
|
fontStyle: D.fontStyle,
|
|
3757
|
-
width:
|
|
3757
|
+
width: f.sizing === "auto" ? "max-content" : F(f.width, i),
|
|
3758
3758
|
letterSpacing: F(q, i),
|
|
3759
|
-
wordSpacing: F(
|
|
3759
|
+
wordSpacing: F(et, i),
|
|
3760
3760
|
textAlign: Y,
|
|
3761
|
-
fontSize: F(
|
|
3762
|
-
lineHeight: F(
|
|
3761
|
+
fontSize: F(J.fontSize, i),
|
|
3762
|
+
lineHeight: F(J.lineHeight, i),
|
|
3763
3763
|
textTransform: X.textTransform ?? "none",
|
|
3764
3764
|
textDecoration: X.textDecoration ?? "none",
|
|
3765
3765
|
fontVariant: X.fontVariant ?? "normal",
|
|
3766
|
-
color:
|
|
3766
|
+
color: at
|
|
3767
3767
|
},
|
|
3768
|
-
onClick: (
|
|
3768
|
+
onClick: (ft) => ft.stopPropagation(),
|
|
3769
3769
|
children: /* @__PURE__ */ O(
|
|
3770
3770
|
"div",
|
|
3771
3771
|
{
|
|
@@ -3775,22 +3775,22 @@ const gl = ({ settings: t, content: e, styles: n, portalId: o, activeEvent: r, i
|
|
|
3775
3775
|
"--link-color": S.linkColor,
|
|
3776
3776
|
"--link-hover-color": S.linkHoverColor
|
|
3777
3777
|
},
|
|
3778
|
-
children: /* @__PURE__ */ O(
|
|
3778
|
+
children: /* @__PURE__ */ O(sr, { content: n[l].imageCaption })
|
|
3779
3779
|
}
|
|
3780
3780
|
)
|
|
3781
3781
|
}
|
|
3782
3782
|
);
|
|
3783
3783
|
})(),
|
|
3784
3784
|
I.isActive && (() => {
|
|
3785
|
-
const [
|
|
3786
|
-
if (
|
|
3785
|
+
const [f, D] = I.position.split("-"), q = m.direction === "horiz" ? `${f}-left` : I.position, Y = He(q, I.offset, i), et = () => {
|
|
3786
|
+
if (m.direction === "horiz") {
|
|
3787
3787
|
if (D === "left") return "flex-start";
|
|
3788
3788
|
if (D === "center") return "center";
|
|
3789
3789
|
if (D === "right") return "flex-end";
|
|
3790
3790
|
} else {
|
|
3791
|
-
if (
|
|
3792
|
-
if (
|
|
3793
|
-
if (
|
|
3791
|
+
if (f === "top") return "flex-start";
|
|
3792
|
+
if (f === "middle") return "center";
|
|
3793
|
+
if (f === "bottom") return "flex-end";
|
|
3794
3794
|
}
|
|
3795
3795
|
return "flex-start";
|
|
3796
3796
|
};
|
|
@@ -3799,11 +3799,11 @@ const gl = ({ settings: t, content: e, styles: n, portalId: o, activeEvent: r, i
|
|
|
3799
3799
|
{
|
|
3800
3800
|
ref: E,
|
|
3801
3801
|
className: W.thumbsWrapper,
|
|
3802
|
-
onClick: (
|
|
3802
|
+
onClick: (J) => mt(J),
|
|
3803
3803
|
style: {
|
|
3804
3804
|
position: i ? "absolute" : "fixed",
|
|
3805
3805
|
...Y,
|
|
3806
|
-
...
|
|
3806
|
+
...m.direction === "horiz" ? {
|
|
3807
3807
|
maxWidth: "100vw",
|
|
3808
3808
|
width: "100%",
|
|
3809
3809
|
overflowX: "auto",
|
|
@@ -3817,33 +3817,33 @@ const gl = ({ settings: t, content: e, styles: n, portalId: o, activeEvent: r, i
|
|
|
3817
3817
|
children: /* @__PURE__ */ O(
|
|
3818
3818
|
"div",
|
|
3819
3819
|
{
|
|
3820
|
-
className:
|
|
3821
|
-
[W.thumbsContainerVertical]:
|
|
3820
|
+
className: dt(W.thumbsContainer, {
|
|
3821
|
+
[W.thumbsContainerVertical]: m.direction === "vert",
|
|
3822
3822
|
[W.thumbsAlignStart]: I.align === "start",
|
|
3823
3823
|
[W.thumbsAlignCenter]: I.align === "center",
|
|
3824
3824
|
[W.thumbsAlignEnd]: I.align === "end"
|
|
3825
3825
|
}),
|
|
3826
3826
|
style: {
|
|
3827
3827
|
gap: F(I.grid.gap, i),
|
|
3828
|
-
justifyContent: R ? "flex-start" :
|
|
3828
|
+
justifyContent: R ? "flex-start" : et()
|
|
3829
3829
|
},
|
|
3830
|
-
children: n.map((
|
|
3831
|
-
const
|
|
3830
|
+
children: n.map((J, X) => {
|
|
3831
|
+
const at = X === l, ft = w[X], ot = I.grid.size * (at ? I.activeState.scale : 1), Yt = () => {
|
|
3832
3832
|
if (I.fit !== "fit") return {};
|
|
3833
|
-
if (!
|
|
3834
|
-
return
|
|
3835
|
-
const Z =
|
|
3836
|
-
if (
|
|
3837
|
-
const
|
|
3833
|
+
if (!ft)
|
|
3834
|
+
return m.direction === "horiz" ? { height: F(ot, i) } : { width: F(ot, i) };
|
|
3835
|
+
const Z = ft.width / ft.height;
|
|
3836
|
+
if (m.direction === "horiz") {
|
|
3837
|
+
const st = ot, xt = st * Z;
|
|
3838
3838
|
return {
|
|
3839
|
-
width: F(
|
|
3840
|
-
height: F(
|
|
3839
|
+
width: F(xt, i),
|
|
3840
|
+
height: F(st, i)
|
|
3841
3841
|
};
|
|
3842
3842
|
} else {
|
|
3843
|
-
const
|
|
3843
|
+
const st = ot, xt = st / Z;
|
|
3844
3844
|
return {
|
|
3845
|
-
width: F(
|
|
3846
|
-
height: F(
|
|
3845
|
+
width: F(st, i),
|
|
3846
|
+
height: F(xt, i)
|
|
3847
3847
|
};
|
|
3848
3848
|
}
|
|
3849
3849
|
};
|
|
@@ -3852,32 +3852,32 @@ const gl = ({ settings: t, content: e, styles: n, portalId: o, activeEvent: r, i
|
|
|
3852
3852
|
{
|
|
3853
3853
|
className: W.thumbItem,
|
|
3854
3854
|
style: {
|
|
3855
|
-
...
|
|
3856
|
-
...
|
|
3857
|
-
...I.fit === "cover" ? { width: F(
|
|
3858
|
-
...
|
|
3859
|
-
transition:
|
|
3860
|
-
opacity:
|
|
3855
|
+
...m.direction === "horiz" && I.fit !== "fit" ? { height: F(ot, i) } : {},
|
|
3856
|
+
...m.direction === "vert" && I.fit !== "fit" ? { width: F(ot, i) } : {},
|
|
3857
|
+
...I.fit === "cover" ? { width: F(ot, i), height: F(ot, i) } : {},
|
|
3858
|
+
...Yt(),
|
|
3859
|
+
transition: at ? "all 0.25s ease-out" : "none",
|
|
3860
|
+
opacity: at ? I.activeState.opacity / 100 : I.opacity / 100,
|
|
3861
3861
|
"--thumb-hover": I.activeState.opacity / 100
|
|
3862
3862
|
},
|
|
3863
3863
|
onClick: (Z) => {
|
|
3864
|
-
var
|
|
3865
|
-
Z.stopPropagation(), p(X), (
|
|
3864
|
+
var st;
|
|
3865
|
+
Z.stopPropagation(), p(X), (st = y.current) == null || st.go(X);
|
|
3866
3866
|
},
|
|
3867
3867
|
onMouseEnter: () => {
|
|
3868
3868
|
var Z;
|
|
3869
|
-
I.triggers === "hov" && ((Z =
|
|
3869
|
+
I.triggers === "hov" && ((Z = y.current) == null || Z.go(X));
|
|
3870
3870
|
},
|
|
3871
3871
|
children: /* @__PURE__ */ O(
|
|
3872
3872
|
"img",
|
|
3873
3873
|
{
|
|
3874
|
-
src:
|
|
3875
|
-
alt:
|
|
3874
|
+
src: J.image.url,
|
|
3875
|
+
alt: J.image.name ?? "",
|
|
3876
3876
|
onLoad: (Z) => {
|
|
3877
|
-
const
|
|
3878
|
-
|
|
3879
|
-
...
|
|
3880
|
-
[X]: { width:
|
|
3877
|
+
const st = Z.currentTarget;
|
|
3878
|
+
st.naturalWidth && st.naturalHeight && b((xt) => ({
|
|
3879
|
+
...xt,
|
|
3880
|
+
[X]: { width: st.naturalWidth, height: st.naturalHeight }
|
|
3881
3881
|
}));
|
|
3882
3882
|
},
|
|
3883
3883
|
style: {
|
|
@@ -3888,7 +3888,7 @@ const gl = ({ settings: t, content: e, styles: n, portalId: o, activeEvent: r, i
|
|
|
3888
3888
|
}
|
|
3889
3889
|
)
|
|
3890
3890
|
},
|
|
3891
|
-
`${
|
|
3891
|
+
`${J.image.name}-${X}`
|
|
3892
3892
|
);
|
|
3893
3893
|
})
|
|
3894
3894
|
}
|
|
@@ -3903,7 +3903,7 @@ const gl = ({ settings: t, content: e, styles: n, portalId: o, activeEvent: r, i
|
|
|
3903
3903
|
document.getElementById(a)
|
|
3904
3904
|
) : null;
|
|
3905
3905
|
};
|
|
3906
|
-
function
|
|
3906
|
+
function vo({ color: t, className: e }) {
|
|
3907
3907
|
return /* @__PURE__ */ O("svg", { viewBox: "0 0 10 18", className: e, children: /* @__PURE__ */ O("g", { id: "Symbols", stroke: "none", strokeWidth: "1", fillRule: "evenodd", children: /* @__PURE__ */ O("path", { d: "M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z", id: "Shape-Copy", fill: t, transform: "translate(5, 9) rotate(-90) translate(-5, -9)" }) }) });
|
|
3908
3908
|
}
|
|
3909
3909
|
const ml = {
|
|
@@ -4970,7 +4970,7 @@ const ml = {
|
|
|
4970
4970
|
required: ["settings", "content", "styles"]
|
|
4971
4971
|
}
|
|
4972
4972
|
};
|
|
4973
|
-
function
|
|
4973
|
+
function pe(t) {
|
|
4974
4974
|
return `calc(var(--cntrl-article-width, 100vw) * ${t / 1440})`;
|
|
4975
4975
|
}
|
|
4976
4976
|
function yl(t) {
|
|
@@ -4979,7 +4979,7 @@ function yl(t) {
|
|
|
4979
4979
|
display: flex;
|
|
4980
4980
|
flex-direction: column;
|
|
4981
4981
|
width: 100%;
|
|
4982
|
-
min-height: ${
|
|
4982
|
+
min-height: ${pe(48)};
|
|
4983
4983
|
}
|
|
4984
4984
|
.${t}-wrapper.${t}-type-C .${t}-input:focus-visible,
|
|
4985
4985
|
.${t}-wrapper.${t}-type-C .${t}-button:focus-visible {
|
|
@@ -5003,7 +5003,7 @@ function yl(t) {
|
|
|
5003
5003
|
min-width: 0;
|
|
5004
5004
|
}
|
|
5005
5005
|
.${t}-field-group.${t}-labeled {
|
|
5006
|
-
gap: ${
|
|
5006
|
+
gap: ${pe(4)};
|
|
5007
5007
|
}
|
|
5008
5008
|
.${t}-field-label {
|
|
5009
5009
|
white-space: nowrap;
|
|
@@ -5040,7 +5040,7 @@ function yl(t) {
|
|
|
5040
5040
|
color: var(--${t}-focus-input-text-color, var(--${t}-input-text-color));
|
|
5041
5041
|
border-color: var(--${t}-focus-input-border-color, var(--${t}-input-border-color));
|
|
5042
5042
|
}
|
|
5043
|
-
.${t}-
|
|
5043
|
+
.${t}-input[data-filled="true"] {
|
|
5044
5044
|
background-color: var(--${t}-filled-input-color, var(--${t}-input-color));
|
|
5045
5045
|
color: var(--${t}-filled-input-text-color, var(--${t}-input-text-color));
|
|
5046
5046
|
border-color: var(--${t}-filled-input-border-color, var(--${t}-input-border-color));
|
|
@@ -5094,13 +5094,13 @@ function yl(t) {
|
|
|
5094
5094
|
outline: 1px solid var(--${t}-focus-button-border-color, var(--${t}-button-border-color));
|
|
5095
5095
|
}
|
|
5096
5096
|
.${t}-success {
|
|
5097
|
-
margin-top: ${
|
|
5098
|
-
font-size: ${
|
|
5097
|
+
margin-top: ${pe(8)};
|
|
5098
|
+
font-size: ${pe(14)};
|
|
5099
5099
|
color: var(--${t}-success-success-color, var(--${t}-success-color));
|
|
5100
5100
|
}
|
|
5101
5101
|
.${t}-error {
|
|
5102
|
-
margin-top: ${
|
|
5103
|
-
font-size: ${
|
|
5102
|
+
margin-top: ${pe(8)};
|
|
5103
|
+
font-size: ${pe(14)};
|
|
5104
5104
|
color: var(--${t}-error-error-color, var(--${t}-error-color));
|
|
5105
5105
|
}
|
|
5106
5106
|
.${t}-overlay-anchor {
|
|
@@ -5110,7 +5110,7 @@ function yl(t) {
|
|
|
5110
5110
|
`;
|
|
5111
5111
|
}
|
|
5112
5112
|
function hl({ settings: t, isEditor: e, metadata: n, activeEvent: o }) {
|
|
5113
|
-
const { prefix: r } =
|
|
5113
|
+
const { prefix: r } = $o(), {
|
|
5114
5114
|
type: a = "A",
|
|
5115
5115
|
fieldsToShow: i = 2,
|
|
5116
5116
|
fields: c = [],
|
|
@@ -5118,18 +5118,18 @@ function hl({ settings: t, isEditor: e, metadata: n, activeEvent: o }) {
|
|
|
5118
5118
|
gap: p,
|
|
5119
5119
|
fieldsGap: u,
|
|
5120
5120
|
buttonCorners: C,
|
|
5121
|
-
buttonStroke:
|
|
5121
|
+
buttonStroke: h,
|
|
5122
5122
|
buttonPadding: g,
|
|
5123
5123
|
isButtonFullWidth: s,
|
|
5124
5124
|
inputCorners: d,
|
|
5125
5125
|
inputStroke: w,
|
|
5126
|
-
inputPadding:
|
|
5127
|
-
inputColor:
|
|
5126
|
+
inputPadding: b,
|
|
5127
|
+
inputColor: y,
|
|
5128
5128
|
inputTextColor: x,
|
|
5129
5129
|
inputBorderColor: V,
|
|
5130
5130
|
placeholderColor: N,
|
|
5131
5131
|
buttonColor: L,
|
|
5132
|
-
buttonTextColor:
|
|
5132
|
+
buttonTextColor: v,
|
|
5133
5133
|
buttonBorderColor: T,
|
|
5134
5134
|
labelTextColor: k,
|
|
5135
5135
|
successColor: z,
|
|
@@ -5138,25 +5138,25 @@ function hl({ settings: t, isEditor: e, metadata: n, activeEvent: o }) {
|
|
|
5138
5138
|
inputFontSettings: P,
|
|
5139
5139
|
inputFontSize: j,
|
|
5140
5140
|
inputLineHeight: H,
|
|
5141
|
-
inputLetterSpacing:
|
|
5141
|
+
inputLetterSpacing: m,
|
|
5142
5142
|
inputWordSpacing: I,
|
|
5143
|
-
inputTextAppearance:
|
|
5144
|
-
buttonFontSettings:
|
|
5143
|
+
inputTextAppearance: $,
|
|
5144
|
+
buttonFontSettings: _,
|
|
5145
5145
|
buttonFontSize: S,
|
|
5146
5146
|
buttonLineHeight: B,
|
|
5147
5147
|
buttonLetterSpacing: G,
|
|
5148
|
-
buttonWordSpacing:
|
|
5149
|
-
buttonTextAppearance:
|
|
5150
|
-
labelFontSettings:
|
|
5148
|
+
buttonWordSpacing: nt,
|
|
5149
|
+
buttonTextAppearance: tt,
|
|
5150
|
+
labelFontSettings: lt,
|
|
5151
5151
|
labelFontSize: A,
|
|
5152
|
-
labelLineHeight:
|
|
5152
|
+
labelLineHeight: K,
|
|
5153
5153
|
labelLetterSpacing: yt,
|
|
5154
5154
|
labelWordSpacing: it,
|
|
5155
|
-
labelTextAppearance:
|
|
5156
|
-
successMessage:
|
|
5157
|
-
errorMessage:
|
|
5155
|
+
labelTextAppearance: mt,
|
|
5156
|
+
successMessage: Wt,
|
|
5157
|
+
errorMessage: zt,
|
|
5158
5158
|
stateOverrides: M
|
|
5159
|
-
} = t,
|
|
5159
|
+
} = t, f = a === "B", D = c.slice(0, Math.min(i, c.length)), q = {
|
|
5160
5160
|
fontSettings: {
|
|
5161
5161
|
fontFamily: R,
|
|
5162
5162
|
fontWeight: (P == null ? void 0 : P.fontWeight) ?? 400,
|
|
@@ -5164,92 +5164,92 @@ function hl({ settings: t, isEditor: e, metadata: n, activeEvent: o }) {
|
|
|
5164
5164
|
},
|
|
5165
5165
|
fontSize: j ?? 0.01,
|
|
5166
5166
|
lineHeight: H,
|
|
5167
|
-
letterSpacing:
|
|
5167
|
+
letterSpacing: m ?? 0,
|
|
5168
5168
|
wordSpacing: I ?? 0,
|
|
5169
|
-
textAppearance:
|
|
5170
|
-
}, Y =
|
|
5169
|
+
textAppearance: $
|
|
5170
|
+
}, Y = vn(q, e), et = F(w ?? 0, e), J = {
|
|
5171
5171
|
...Y,
|
|
5172
5172
|
borderStyle: "solid",
|
|
5173
5173
|
borderRadius: a === "C" ? 0 : F(d ?? 0, e),
|
|
5174
|
-
borderWidth: a === "C" ? void 0 :
|
|
5174
|
+
borderWidth: a === "C" ? void 0 : et,
|
|
5175
5175
|
borderTopWidth: a === "C" ? 0 : void 0,
|
|
5176
5176
|
borderRightWidth: a === "C" ? 0 : void 0,
|
|
5177
|
-
borderBottomWidth: a === "C" ?
|
|
5177
|
+
borderBottomWidth: a === "C" ? et : void 0,
|
|
5178
5178
|
borderLeftWidth: a === "C" ? 0 : void 0,
|
|
5179
|
-
paddingTop: F((
|
|
5180
|
-
paddingRight: F((
|
|
5181
|
-
paddingBottom: F((
|
|
5182
|
-
paddingLeft: F((
|
|
5179
|
+
paddingTop: F((b == null ? void 0 : b.top) ?? 0, e),
|
|
5180
|
+
paddingRight: F((b == null ? void 0 : b.right) ?? 0, e),
|
|
5181
|
+
paddingBottom: F((b == null ? void 0 : b.bottom) ?? 0, e),
|
|
5182
|
+
paddingLeft: F((b == null ? void 0 : b.left) ?? 0, e)
|
|
5183
5183
|
}, X = {
|
|
5184
5184
|
fontSettings: {
|
|
5185
5185
|
fontFamily: R,
|
|
5186
|
-
fontWeight: (
|
|
5187
|
-
fontStyle: (
|
|
5186
|
+
fontWeight: (_ == null ? void 0 : _.fontWeight) ?? 400,
|
|
5187
|
+
fontStyle: (_ == null ? void 0 : _.fontStyle) ?? "normal"
|
|
5188
5188
|
},
|
|
5189
5189
|
fontSize: S ?? 0.01,
|
|
5190
5190
|
lineHeight: B,
|
|
5191
5191
|
letterSpacing: G ?? 0,
|
|
5192
|
-
wordSpacing:
|
|
5193
|
-
textAppearance:
|
|
5194
|
-
},
|
|
5192
|
+
wordSpacing: nt ?? 0,
|
|
5193
|
+
textAppearance: tt
|
|
5194
|
+
}, at = vn(X, e), ft = F(h ?? 0, e), rt = {
|
|
5195
5195
|
fontSettings: {
|
|
5196
5196
|
fontFamily: R,
|
|
5197
|
-
fontWeight: (
|
|
5198
|
-
fontStyle: (
|
|
5197
|
+
fontWeight: (lt == null ? void 0 : lt.fontWeight) ?? 400,
|
|
5198
|
+
fontStyle: (lt == null ? void 0 : lt.fontStyle) ?? "normal"
|
|
5199
5199
|
},
|
|
5200
5200
|
fontSize: A ?? 0.01,
|
|
5201
|
-
lineHeight:
|
|
5201
|
+
lineHeight: K,
|
|
5202
5202
|
letterSpacing: yt ?? 0,
|
|
5203
5203
|
wordSpacing: it ?? 0,
|
|
5204
|
-
textAppearance:
|
|
5205
|
-
},
|
|
5206
|
-
inputColor:
|
|
5204
|
+
textAppearance: mt
|
|
5205
|
+
}, ot = vn(rt, e), Yt = bl(r, {
|
|
5206
|
+
inputColor: y,
|
|
5207
5207
|
inputTextColor: x,
|
|
5208
5208
|
inputBorderColor: V,
|
|
5209
5209
|
placeholderColor: N != null && N.trim() ? N : "#cccccc",
|
|
5210
5210
|
buttonColor: L,
|
|
5211
|
-
buttonTextColor:
|
|
5211
|
+
buttonTextColor: v,
|
|
5212
5212
|
buttonBorderColor: T,
|
|
5213
5213
|
labelTextColor: k,
|
|
5214
5214
|
successColor: z,
|
|
5215
5215
|
errorColor: E
|
|
5216
|
-
}, M), [Z,
|
|
5217
|
-
() => Object.fromEntries(D.map((
|
|
5218
|
-
), [
|
|
5219
|
-
|
|
5220
|
-
}, dr = async (
|
|
5221
|
-
|
|
5222
|
-
const
|
|
5223
|
-
D.map((
|
|
5224
|
-
var
|
|
5225
|
-
return [
|
|
5226
|
-
}).filter(([,
|
|
5216
|
+
}, M), [Z, st] = ct(
|
|
5217
|
+
() => Object.fromEntries(D.map((pt) => [pt.name, ""]))
|
|
5218
|
+
), [xt, It] = ct("idle"), [vt, Gt] = ct(null), qt = o === "success" ? "success" : o === "error" ? "error" : xt, _t = o === "error" ? zt : vt, Tt = o === "filled" ? Object.fromEntries(D.map((pt) => [pt.name, "Filled"])) : Z, ur = qt === "error" ? Xe(D, Tt) : null, pr = `${o && o !== "default" ? `${r}-state-${o}` : ""}`.trim(), Xn = n == null ? void 0 : n.submitUrl, Kn = (pt, se) => {
|
|
5219
|
+
st((Xt) => ({ ...Xt, [pt]: se }));
|
|
5220
|
+
}, dr = async (pt) => {
|
|
5221
|
+
pt.preventDefault();
|
|
5222
|
+
const se = Object.fromEntries(
|
|
5223
|
+
D.map((kt) => {
|
|
5224
|
+
var ce;
|
|
5225
|
+
return [kt.name, ((ce = Z[kt.name]) == null ? void 0 : ce.trim()) ?? ""];
|
|
5226
|
+
}).filter(([, kt]) => kt)
|
|
5227
5227
|
);
|
|
5228
|
-
if (!
|
|
5229
|
-
const
|
|
5230
|
-
if (
|
|
5231
|
-
|
|
5228
|
+
if (!Xn || Object.keys(se).length === 0) return;
|
|
5229
|
+
const Xt = Xe(D, Z);
|
|
5230
|
+
if (Xt) {
|
|
5231
|
+
It("error"), Gt(Xt);
|
|
5232
5232
|
return;
|
|
5233
5233
|
}
|
|
5234
|
-
|
|
5234
|
+
It("submitting"), Gt(null);
|
|
5235
5235
|
try {
|
|
5236
|
-
const
|
|
5236
|
+
const kt = await fetch(Xn, {
|
|
5237
5237
|
method: "POST",
|
|
5238
5238
|
headers: { "Content-Type": "application/json" },
|
|
5239
|
-
body: JSON.stringify(
|
|
5239
|
+
body: JSON.stringify(se)
|
|
5240
5240
|
});
|
|
5241
|
-
if (!
|
|
5242
|
-
const
|
|
5243
|
-
throw new Error(
|
|
5241
|
+
if (!kt.ok) {
|
|
5242
|
+
const ce = await kt.text();
|
|
5243
|
+
throw new Error(ce || `Request failed: ${kt.status}`);
|
|
5244
5244
|
}
|
|
5245
|
-
|
|
5246
|
-
} catch (
|
|
5247
|
-
|
|
5245
|
+
It("success"), st(Object.fromEntries(D.map((ce) => [ce.name, ""])));
|
|
5246
|
+
} catch (kt) {
|
|
5247
|
+
It("error"), Gt(kt instanceof Error ? kt.message : "Something went wrong");
|
|
5248
5248
|
}
|
|
5249
5249
|
};
|
|
5250
|
-
return /* @__PURE__ */
|
|
5250
|
+
return /* @__PURE__ */ St("div", { className: `${r}-wrapper ${r}-type-${a} ${pr}`.trim(), style: Yt, children: [
|
|
5251
5251
|
/* @__PURE__ */ O("style", { children: yl(r) }),
|
|
5252
|
-
/* @__PURE__ */
|
|
5252
|
+
/* @__PURE__ */ St(
|
|
5253
5253
|
"form",
|
|
5254
5254
|
{
|
|
5255
5255
|
onSubmit: dr,
|
|
@@ -5261,36 +5261,38 @@ function hl({ settings: t, isEditor: e, metadata: n, activeEvent: o }) {
|
|
|
5261
5261
|
{
|
|
5262
5262
|
className: `${r}-fields`,
|
|
5263
5263
|
style: { gap: F(u ?? 0, e) },
|
|
5264
|
-
children: D.map((
|
|
5265
|
-
|
|
5266
|
-
|
|
5264
|
+
children: D.map((pt, se) => /* @__PURE__ */ St("div", { className: `${r}-field-group${f ? ` ${r}-labeled` : ""}`, children: [
|
|
5265
|
+
f && /* @__PURE__ */ O("span", { className: `${r}-field-label`, style: ot ? { ...ot, lineHeight: ot.fontSize } : void 0, children: pt.label || pt.name }),
|
|
5266
|
+
pt.type === "textarea" ? /* @__PURE__ */ O(
|
|
5267
5267
|
"textarea",
|
|
5268
5268
|
{
|
|
5269
|
-
name:
|
|
5269
|
+
name: pt.name,
|
|
5270
5270
|
autoComplete: "off",
|
|
5271
|
-
value:
|
|
5272
|
-
onChange: (
|
|
5273
|
-
placeholder:
|
|
5271
|
+
value: Tt[pt.name] ?? "",
|
|
5272
|
+
onChange: (Xt) => Kn(pt.name, Xt.target.value),
|
|
5273
|
+
placeholder: pt.placeholder,
|
|
5274
5274
|
className: `${r}-input`,
|
|
5275
|
-
style:
|
|
5275
|
+
style: J,
|
|
5276
5276
|
rows: 1,
|
|
5277
|
+
"data-filled": (Tt[pt.name] ?? "").trim().length > 0,
|
|
5277
5278
|
"data-field-type": "textarea"
|
|
5278
5279
|
}
|
|
5279
5280
|
) : /* @__PURE__ */ O(
|
|
5280
5281
|
"input",
|
|
5281
5282
|
{
|
|
5282
|
-
type:
|
|
5283
|
-
name:
|
|
5283
|
+
type: pt.type === "phone" ? "tel" : pt.type === "email" ? "email" : "text",
|
|
5284
|
+
name: pt.name,
|
|
5284
5285
|
autoComplete: "off",
|
|
5285
|
-
value:
|
|
5286
|
-
onChange: (
|
|
5287
|
-
placeholder:
|
|
5288
|
-
required:
|
|
5286
|
+
value: Tt[pt.name] ?? "",
|
|
5287
|
+
onChange: (Xt) => Kn(pt.name, Xt.target.value),
|
|
5288
|
+
placeholder: pt.placeholder,
|
|
5289
|
+
required: pt.type === "email",
|
|
5289
5290
|
className: `${r}-input`,
|
|
5290
|
-
style:
|
|
5291
|
+
style: J,
|
|
5292
|
+
"data-filled": (Tt[pt.name] ?? "").trim().length > 0
|
|
5291
5293
|
}
|
|
5292
5294
|
)
|
|
5293
|
-
] },
|
|
5295
|
+
] }, se))
|
|
5294
5296
|
}
|
|
5295
5297
|
),
|
|
5296
5298
|
/* @__PURE__ */ O("div", { className: `${r}-overlay-anchor`, children: /* @__PURE__ */ O(
|
|
@@ -5301,12 +5303,12 @@ function hl({ settings: t, isEditor: e, metadata: n, activeEvent: o }) {
|
|
|
5301
5303
|
style: {
|
|
5302
5304
|
borderStyle: "solid",
|
|
5303
5305
|
borderRadius: F(C ?? 0, e),
|
|
5304
|
-
borderWidth:
|
|
5306
|
+
borderWidth: ft,
|
|
5305
5307
|
paddingTop: F((g == null ? void 0 : g.top) ?? 0, e),
|
|
5306
5308
|
paddingRight: F((g == null ? void 0 : g.right) ?? 0, e),
|
|
5307
5309
|
paddingBottom: F((g == null ? void 0 : g.bottom) ?? 0, e),
|
|
5308
5310
|
paddingLeft: F((g == null ? void 0 : g.left) ?? 0, e),
|
|
5309
|
-
...
|
|
5311
|
+
...at,
|
|
5310
5312
|
...s ? {
|
|
5311
5313
|
width: "100%",
|
|
5312
5314
|
textAlign: "center",
|
|
@@ -5323,7 +5325,7 @@ function hl({ settings: t, isEditor: e, metadata: n, activeEvent: o }) {
|
|
|
5323
5325
|
whiteSpace: "normal",
|
|
5324
5326
|
textAlign: "center"
|
|
5325
5327
|
} : void 0,
|
|
5326
|
-
children:
|
|
5328
|
+
children: xt === "submitting" ? "..." : l
|
|
5327
5329
|
}
|
|
5328
5330
|
)
|
|
5329
5331
|
}
|
|
@@ -5331,26 +5333,26 @@ function hl({ settings: t, isEditor: e, metadata: n, activeEvent: o }) {
|
|
|
5331
5333
|
]
|
|
5332
5334
|
}
|
|
5333
5335
|
),
|
|
5334
|
-
|
|
5336
|
+
qt === "success" && /* @__PURE__ */ O(
|
|
5335
5337
|
"p",
|
|
5336
5338
|
{
|
|
5337
5339
|
className: `${r}-success`,
|
|
5338
5340
|
style: { ...Y, lineHeight: Y == null ? void 0 : Y.fontSize },
|
|
5339
|
-
children:
|
|
5341
|
+
children: Wt
|
|
5340
5342
|
}
|
|
5341
5343
|
),
|
|
5342
|
-
|
|
5344
|
+
qt === "error" && /* @__PURE__ */ O(
|
|
5343
5345
|
"p",
|
|
5344
5346
|
{
|
|
5345
5347
|
className: `${r}-error`,
|
|
5346
5348
|
style: { ...Y, lineHeight: Y == null ? void 0 : Y.fontSize },
|
|
5347
5349
|
role: "alert",
|
|
5348
|
-
children: ur ??
|
|
5350
|
+
children: ur ?? _t ?? zt
|
|
5349
5351
|
}
|
|
5350
5352
|
)
|
|
5351
5353
|
] });
|
|
5352
5354
|
}
|
|
5353
|
-
const
|
|
5355
|
+
const bo = {
|
|
5354
5356
|
inputColor: "input-color",
|
|
5355
5357
|
inputTextColor: "input-text-color",
|
|
5356
5358
|
inputBorderColor: "input-border-color",
|
|
@@ -5364,20 +5366,20 @@ const vo = {
|
|
|
5364
5366
|
}, vl = ["hover", "focus", "filled", "success", "error"];
|
|
5365
5367
|
function bl(t, e, n) {
|
|
5366
5368
|
const o = {};
|
|
5367
|
-
for (const [r, a] of Object.entries(
|
|
5369
|
+
for (const [r, a] of Object.entries(bo))
|
|
5368
5370
|
o[`--${t}-${a}`] = e[r];
|
|
5369
5371
|
if (n)
|
|
5370
5372
|
for (const r of vl) {
|
|
5371
5373
|
const a = n[r];
|
|
5372
5374
|
if (a)
|
|
5373
|
-
for (const [i, c] of Object.entries(
|
|
5375
|
+
for (const [i, c] of Object.entries(bo)) {
|
|
5374
5376
|
const l = a[i];
|
|
5375
5377
|
l !== void 0 && (o[`--${t}-${r}-${c}`] = l);
|
|
5376
5378
|
}
|
|
5377
5379
|
}
|
|
5378
5380
|
return o;
|
|
5379
5381
|
}
|
|
5380
|
-
function
|
|
5382
|
+
function vn(t, e) {
|
|
5381
5383
|
var n, o, r;
|
|
5382
5384
|
return {
|
|
5383
5385
|
fontFamily: t.fontSettings.fontFamily,
|
|
@@ -5467,7 +5469,7 @@ function getCSS(P: string): string {
|
|
|
5467
5469
|
color: var(--\${P}-focus-input-text-color, var(--\${P}-input-text-color));
|
|
5468
5470
|
border-color: var(--\${P}-focus-input-border-color, var(--\${P}-input-border-color));
|
|
5469
5471
|
}
|
|
5470
|
-
.\${P}-
|
|
5472
|
+
.\${P}-input[data-filled="true"] {
|
|
5471
5473
|
background-color: var(--\${P}-filled-input-color, var(--\${P}-input-color));
|
|
5472
5474
|
color: var(--\${P}-filled-input-text-color, var(--\${P}-input-text-color));
|
|
5473
5475
|
border-color: var(--\${P}-filled-input-border-color, var(--\${P}-input-border-color));
|
|
@@ -5690,6 +5692,7 @@ export function Form({ settings, isEditor, metadata, activeEvent }: FormProps) {
|
|
|
5690
5692
|
? getFormFieldValidationError(visibleFields, displayValues)
|
|
5691
5693
|
: null;
|
|
5692
5694
|
const stateClass = activeEvent && activeEvent !== 'default' ? \`\${P}-state-\${activeEvent}\` : '';
|
|
5695
|
+
const wrapperStateClasses = \`\${stateClass}\`.trim();
|
|
5693
5696
|
|
|
5694
5697
|
const submitUrl = metadata?.submitUrl as string | undefined;
|
|
5695
5698
|
const handleFieldChange = (name: string, value: string) => {
|
|
@@ -5733,7 +5736,7 @@ export function Form({ settings, isEditor, metadata, activeEvent }: FormProps) {
|
|
|
5733
5736
|
};
|
|
5734
5737
|
|
|
5735
5738
|
return (
|
|
5736
|
-
<div className={\`\${P}-wrapper \${P}-type-\${type} \${
|
|
5739
|
+
<div className={\`\${P}-wrapper \${P}-type-\${type} \${wrapperStateClasses}\`.trim()} style={colorVars}>
|
|
5737
5740
|
<style>{getCSS(P)}</style>
|
|
5738
5741
|
<form
|
|
5739
5742
|
onSubmit={handleSubmit}
|
|
@@ -5761,6 +5764,7 @@ export function Form({ settings, isEditor, metadata, activeEvent }: FormProps) {
|
|
|
5761
5764
|
className={\`\${P}-input\`}
|
|
5762
5765
|
style={inputFieldCss}
|
|
5763
5766
|
rows={1}
|
|
5767
|
+
data-filled={((displayValues[field.name] ?? '') as string).trim().length > 0}
|
|
5764
5768
|
data-field-type="textarea"
|
|
5765
5769
|
/>
|
|
5766
5770
|
) : (
|
|
@@ -5774,6 +5778,7 @@ export function Form({ settings, isEditor, metadata, activeEvent }: FormProps) {
|
|
|
5774
5778
|
required={field.type === 'email'}
|
|
5775
5779
|
className={\`\${P}-input\`}
|
|
5776
5780
|
style={inputFieldCss}
|
|
5781
|
+
data-filled={((displayValues[field.name] ?? '') as string).trim().length > 0}
|
|
5777
5782
|
/>
|
|
5778
5783
|
)}
|
|
5779
5784
|
</div>
|
|
@@ -5995,7 +6000,7 @@ function textStylesToCss(textStyles: TextStyles, isEditor?: boolean): React.CSSP
|
|
|
5995
6000
|
{ name: "message", type: "textarea", placeholder: "Enter your message", label: "Message", isRequired: !1, error: "Message is required" },
|
|
5996
6001
|
{ name: "message2", type: "textarea", placeholder: "Enter your message 2", label: "Message 2", isRequired: !1, error: "Message 2 is required" },
|
|
5997
6002
|
{ name: "message3", type: "textarea", placeholder: "Enter your message 3", label: "Message 3", isRequired: !1, error: "Message 3 is required" }
|
|
5998
|
-
],
|
|
6003
|
+
], bn = {
|
|
5999
6004
|
fontSettings: {
|
|
6000
6005
|
type: "object",
|
|
6001
6006
|
display: { type: "font-settings-weight" },
|
|
@@ -6208,7 +6213,7 @@ function textStylesToCss(textStyles: TextStyles, isEditor?: boolean): React.CSSP
|
|
|
6208
6213
|
display: { type: "font-family-select" }
|
|
6209
6214
|
},
|
|
6210
6215
|
inputFontSettings: {
|
|
6211
|
-
...
|
|
6216
|
+
...bn.fontSettings,
|
|
6212
6217
|
scope: "layout",
|
|
6213
6218
|
title: "Input",
|
|
6214
6219
|
display: { type: "font-settings-weight" }
|
|
@@ -6244,7 +6249,7 @@ function textStylesToCss(textStyles: TextStyles, isEditor?: boolean): React.CSSP
|
|
|
6244
6249
|
display: { type: "text-appearance" }
|
|
6245
6250
|
},
|
|
6246
6251
|
buttonFontSettings: {
|
|
6247
|
-
...
|
|
6252
|
+
...bn.fontSettings,
|
|
6248
6253
|
scope: "layout",
|
|
6249
6254
|
title: "Button",
|
|
6250
6255
|
display: { type: "font-settings-weight" }
|
|
@@ -6280,7 +6285,7 @@ function textStylesToCss(textStyles: TextStyles, isEditor?: boolean): React.CSSP
|
|
|
6280
6285
|
display: { type: "text-appearance" }
|
|
6281
6286
|
},
|
|
6282
6287
|
labelFontSettings: {
|
|
6283
|
-
...
|
|
6288
|
+
...bn.fontSettings,
|
|
6284
6289
|
scope: "layout",
|
|
6285
6290
|
title: "Label",
|
|
6286
6291
|
display: { type: "font-settings-weight", visible: !1 }
|
|
@@ -6532,8 +6537,8 @@ function textStylesToCss(textStyles: TextStyles, isEditor?: boolean): React.CSSP
|
|
|
6532
6537
|
panelIds: ["general", "typeStyle"],
|
|
6533
6538
|
stateItems: {
|
|
6534
6539
|
default: ["inputColor", "inputBorderColor", "placeholderColor", "placeholderTextColor", "buttonColor", "buttonTextColor", "buttonBorderColor", "labelTextColor"],
|
|
6535
|
-
hover: ["inputColor", "inputBorderColor", "
|
|
6536
|
-
focus: ["inputColor", "inputBorderColor", "
|
|
6540
|
+
hover: ["inputColor", "inputBorderColor", "buttonColor", "buttonTextColor", "buttonBorderColor"],
|
|
6541
|
+
focus: ["inputColor", "inputBorderColor", "buttonColor", "buttonTextColor", "buttonBorderColor"],
|
|
6537
6542
|
filled: ["inputColor", "inputTextColor", "inputBorderColor", "buttonTextColor"],
|
|
6538
6543
|
success: ["successColor"],
|
|
6539
6544
|
error: ["errorColor"]
|
|
@@ -6557,7 +6562,7 @@ function textStylesToCss(textStyles: TextStyles, isEditor?: boolean): React.CSSP
|
|
|
6557
6562
|
schema: $l,
|
|
6558
6563
|
sourceCode: Sl
|
|
6559
6564
|
};
|
|
6560
|
-
function
|
|
6565
|
+
function je(t) {
|
|
6561
6566
|
return `calc(var(--cntrl-article-width, 100vw) * ${t / 1440})`;
|
|
6562
6567
|
}
|
|
6563
6568
|
function wl(t) {
|
|
@@ -6715,19 +6720,19 @@ function wl(t) {
|
|
|
6715
6720
|
align-items: center;
|
|
6716
6721
|
}
|
|
6717
6722
|
.${t}-success {
|
|
6718
|
-
margin-top: ${
|
|
6719
|
-
font-size: ${
|
|
6723
|
+
margin-top: ${je(8)};
|
|
6724
|
+
font-size: ${je(14)};
|
|
6720
6725
|
color: var(--${t}-success-success-color, var(--${t}-success-color));
|
|
6721
6726
|
}
|
|
6722
6727
|
.${t}-error {
|
|
6723
|
-
margin-top: ${
|
|
6724
|
-
font-size: ${
|
|
6728
|
+
margin-top: ${je(8)};
|
|
6729
|
+
font-size: ${je(14)};
|
|
6725
6730
|
color: var(--${t}-error-error-color, var(--${t}-error-color));
|
|
6726
6731
|
}
|
|
6727
6732
|
`;
|
|
6728
6733
|
}
|
|
6729
6734
|
const Tl = ({ settings: t, isEditor: e, metadata: n, activeEvent: o }) => {
|
|
6730
|
-
const { prefix: r } =
|
|
6735
|
+
const { prefix: r } = $o(), {
|
|
6731
6736
|
fields: a = [{ name: "email", type: "email", placeholder: "Your email" }],
|
|
6732
6737
|
buttonContent: i,
|
|
6733
6738
|
submitButtonContent: c,
|
|
@@ -6735,18 +6740,18 @@ const Tl = ({ settings: t, isEditor: e, metadata: n, activeEvent: o }) => {
|
|
|
6735
6740
|
buttonIcon: p,
|
|
6736
6741
|
fieldsToShow: u = 1,
|
|
6737
6742
|
fontFamily: C,
|
|
6738
|
-
input:
|
|
6743
|
+
input: h,
|
|
6739
6744
|
button: g,
|
|
6740
6745
|
inputFontSettings: s,
|
|
6741
6746
|
inputFontSize: d,
|
|
6742
6747
|
inputLineHeight: w,
|
|
6743
|
-
inputLetterSpacing:
|
|
6744
|
-
inputWordSpacing:
|
|
6748
|
+
inputLetterSpacing: b,
|
|
6749
|
+
inputWordSpacing: y,
|
|
6745
6750
|
inputTextAppearance: x,
|
|
6746
6751
|
buttonFontSettings: V,
|
|
6747
6752
|
buttonFontSize: N,
|
|
6748
6753
|
buttonLineHeight: L,
|
|
6749
|
-
buttonLetterSpacing:
|
|
6754
|
+
buttonLetterSpacing: v,
|
|
6750
6755
|
buttonWordSpacing: T,
|
|
6751
6756
|
buttonTextAppearance: k,
|
|
6752
6757
|
minHeight: z,
|
|
@@ -6755,11 +6760,11 @@ const Tl = ({ settings: t, isEditor: e, metadata: n, activeEvent: o }) => {
|
|
|
6755
6760
|
stateOverrides: P,
|
|
6756
6761
|
inputPadding: j,
|
|
6757
6762
|
buttonPadding: H,
|
|
6758
|
-
successMessage:
|
|
6763
|
+
successMessage: m = "Thanks for subscribing!",
|
|
6759
6764
|
errorMessage: I = "Please, fill all required fields."
|
|
6760
|
-
} = t,
|
|
6761
|
-
() => Object.fromEntries(
|
|
6762
|
-
), [B, G] =
|
|
6765
|
+
} = t, $ = a.slice(0, Math.min(u, a.length)), [_, S] = ct(
|
|
6766
|
+
() => Object.fromEntries($.map((vt) => [vt.name, ""]))
|
|
6767
|
+
), [B, G] = ct("idle"), [nt, tt] = ct(null), lt = o === "success" ? "success" : o === "error" ? "error" : B, A = o === "error" ? I : nt, K = o === "filled" ? Object.fromEntries($.map((vt) => [vt.name, "Filled"])) : _, yt = lt === "error" ? Xe($, K) : null, it = o && o !== "default" ? `${r}-state-${o}` : "", mt = $.some((vt) => (K[vt.name] ?? "").trim().length > 0), Wt = it !== `${r}-state-filled` && mt ? `${r}-state-filled` : "", zt = `${it} ${Wt}`.trim(), M = n == null ? void 0 : n.submitUrl, f = i, D = (f == null ? void 0 : f.mode) === "Icon" || (f == null ? void 0 : f.mode) === "Label" ? f.mode : c === "Icon" ? "Icon" : "Label", q = f === void 0 ? l : f.label !== void 0 ? f.label : l, Y = f === void 0 ? p : f.icon !== void 0 ? f.icon : p, et = q ?? "", J = Y ?? "", X = D === "Icon", at = et || "Submit", ft = s || d !== void 0 || w !== void 0 || b !== void 0 || y !== void 0 || x !== void 0 ? {
|
|
6763
6768
|
fontSettings: {
|
|
6764
6769
|
fontFamily: C,
|
|
6765
6770
|
fontWeight: (s == null ? void 0 : s.fontWeight) ?? 400,
|
|
@@ -6767,18 +6772,18 @@ const Tl = ({ settings: t, isEditor: e, metadata: n, activeEvent: o }) => {
|
|
|
6767
6772
|
},
|
|
6768
6773
|
fontSize: d ?? 0.01,
|
|
6769
6774
|
lineHeight: w,
|
|
6770
|
-
letterSpacing:
|
|
6771
|
-
wordSpacing:
|
|
6775
|
+
letterSpacing: b ?? 0,
|
|
6776
|
+
wordSpacing: y ?? 0,
|
|
6772
6777
|
textAppearance: x,
|
|
6773
6778
|
color: t.inputTextColor ?? "#111111"
|
|
6774
|
-
} :
|
|
6775
|
-
...
|
|
6779
|
+
} : h ? {
|
|
6780
|
+
...h,
|
|
6776
6781
|
fontSettings: {
|
|
6777
|
-
...
|
|
6778
|
-
fontFamily: C ??
|
|
6782
|
+
...h.fontSettings,
|
|
6783
|
+
fontFamily: C ?? h.fontSettings.fontFamily
|
|
6779
6784
|
},
|
|
6780
|
-
color: t.inputTextColor ??
|
|
6781
|
-
} : void 0,
|
|
6785
|
+
color: t.inputTextColor ?? h.color ?? "#111111"
|
|
6786
|
+
} : void 0, rt = V || N !== void 0 || L !== void 0 || v !== void 0 || T !== void 0 || k !== void 0 ? {
|
|
6782
6787
|
fontSettings: {
|
|
6783
6788
|
fontFamily: C,
|
|
6784
6789
|
fontWeight: (V == null ? void 0 : V.fontWeight) ?? 400,
|
|
@@ -6786,7 +6791,7 @@ const Tl = ({ settings: t, isEditor: e, metadata: n, activeEvent: o }) => {
|
|
|
6786
6791
|
},
|
|
6787
6792
|
fontSize: N ?? 0.01,
|
|
6788
6793
|
lineHeight: L,
|
|
6789
|
-
letterSpacing:
|
|
6794
|
+
letterSpacing: v ?? 0,
|
|
6790
6795
|
wordSpacing: T ?? 0,
|
|
6791
6796
|
textAppearance: k,
|
|
6792
6797
|
color: t.buttonTextColor ?? "#ffffff"
|
|
@@ -6797,58 +6802,58 @@ const Tl = ({ settings: t, isEditor: e, metadata: n, activeEvent: o }) => {
|
|
|
6797
6802
|
fontFamily: C ?? g.fontSettings.fontFamily
|
|
6798
6803
|
},
|
|
6799
6804
|
color: t.buttonTextColor ?? g.color ?? "#ffffff"
|
|
6800
|
-
} : void 0, ot =
|
|
6805
|
+
} : void 0, ot = ft ? Co(ft, e) : void 0, Yt = rt ? Co(rt, e) : void 0, Z = Al(r, {
|
|
6801
6806
|
strokeColor: t.strokeColor,
|
|
6802
6807
|
inputColor: t.inputColor,
|
|
6803
6808
|
placeholderColor: t.placeholderColor,
|
|
6804
6809
|
buttonColor: t.buttonColor,
|
|
6805
6810
|
successColor: t.successColor,
|
|
6806
6811
|
errorColor: t.errorColor,
|
|
6807
|
-
inputTextColor: t.inputTextColor ?? (
|
|
6808
|
-
buttonTextColor: t.buttonTextColor ?? (
|
|
6809
|
-
}, P),
|
|
6812
|
+
inputTextColor: t.inputTextColor ?? (ft == null ? void 0 : ft.color) ?? "#111111",
|
|
6813
|
+
buttonTextColor: t.buttonTextColor ?? (rt == null ? void 0 : rt.color) ?? "#ffffff"
|
|
6814
|
+
}, P), st = {
|
|
6810
6815
|
borderRadius: F(E, e),
|
|
6811
6816
|
borderWidth: F(R, e),
|
|
6812
6817
|
borderStyle: "solid"
|
|
6813
|
-
},
|
|
6814
|
-
|
|
6815
|
-
const
|
|
6816
|
-
|
|
6817
|
-
var
|
|
6818
|
-
return [
|
|
6819
|
-
}).filter(([,
|
|
6818
|
+
}, xt = { borderLeftWidth: F(R, e) }, It = async (vt) => {
|
|
6819
|
+
vt.preventDefault();
|
|
6820
|
+
const Gt = Object.fromEntries(
|
|
6821
|
+
$.map((_t) => {
|
|
6822
|
+
var Tt;
|
|
6823
|
+
return [_t.name, ((Tt = _[_t.name]) == null ? void 0 : Tt.trim()) ?? ""];
|
|
6824
|
+
}).filter(([, _t]) => _t)
|
|
6820
6825
|
);
|
|
6821
|
-
if (!
|
|
6822
|
-
const
|
|
6823
|
-
if (
|
|
6824
|
-
G("error"),
|
|
6826
|
+
if (!M || Object.keys(Gt).length === 0) return;
|
|
6827
|
+
const qt = Xe($, _);
|
|
6828
|
+
if (qt) {
|
|
6829
|
+
G("error"), tt(qt);
|
|
6825
6830
|
return;
|
|
6826
6831
|
}
|
|
6827
|
-
G("submitting"),
|
|
6832
|
+
G("submitting"), tt(null);
|
|
6828
6833
|
try {
|
|
6829
|
-
const
|
|
6834
|
+
const _t = await fetch(M, {
|
|
6830
6835
|
method: "POST",
|
|
6831
6836
|
headers: { "Content-Type": "application/json" },
|
|
6832
|
-
body: JSON.stringify(
|
|
6837
|
+
body: JSON.stringify(Gt)
|
|
6833
6838
|
});
|
|
6834
|
-
if (!
|
|
6835
|
-
const
|
|
6836
|
-
throw new Error(
|
|
6839
|
+
if (!_t.ok) {
|
|
6840
|
+
const Tt = await _t.text();
|
|
6841
|
+
throw new Error(Tt || `Request failed: ${_t.status}`);
|
|
6837
6842
|
}
|
|
6838
|
-
G("success"), S(Object.fromEntries(
|
|
6839
|
-
} catch (
|
|
6840
|
-
G("error"),
|
|
6843
|
+
G("success"), S(Object.fromEntries($.map((Tt) => [Tt.name, ""])));
|
|
6844
|
+
} catch (_t) {
|
|
6845
|
+
G("error"), tt(_t instanceof Error ? _t.message : "Something went wrong");
|
|
6841
6846
|
}
|
|
6842
6847
|
};
|
|
6843
|
-
return /* @__PURE__ */
|
|
6848
|
+
return /* @__PURE__ */ St("div", { className: `${r}-wrapper ${zt}`.trim(), style: Z, children: [
|
|
6844
6849
|
/* @__PURE__ */ O("style", { children: wl(r) }),
|
|
6845
|
-
/* @__PURE__ */
|
|
6850
|
+
/* @__PURE__ */ St(
|
|
6846
6851
|
"form",
|
|
6847
6852
|
{
|
|
6848
|
-
onSubmit:
|
|
6853
|
+
onSubmit: It,
|
|
6849
6854
|
className: `${r}-form`,
|
|
6850
6855
|
style: {
|
|
6851
|
-
...
|
|
6856
|
+
...st,
|
|
6852
6857
|
height: F(z, e),
|
|
6853
6858
|
minHeight: F(z, e)
|
|
6854
6859
|
},
|
|
@@ -6858,16 +6863,16 @@ const Tl = ({ settings: t, isEditor: e, metadata: n, activeEvent: o }) => {
|
|
|
6858
6863
|
{
|
|
6859
6864
|
className: `${r}-inputWrap ${r}-overlayAnchor`,
|
|
6860
6865
|
style: { flex: 1, minWidth: 0 },
|
|
6861
|
-
children:
|
|
6866
|
+
children: $.map((vt) => /* @__PURE__ */ O(
|
|
6862
6867
|
"input",
|
|
6863
6868
|
{
|
|
6864
|
-
type:
|
|
6865
|
-
name:
|
|
6869
|
+
type: vt.type === "email" ? "email" : vt.type === "phone" ? "tel" : "text",
|
|
6870
|
+
name: vt.name,
|
|
6866
6871
|
autoComplete: "off",
|
|
6867
|
-
value:
|
|
6868
|
-
onChange: (
|
|
6869
|
-
placeholder:
|
|
6870
|
-
required:
|
|
6872
|
+
value: K[vt.name] ?? "",
|
|
6873
|
+
onChange: (Gt) => S((qt) => ({ ...qt, [vt.name]: Gt.target.value })),
|
|
6874
|
+
placeholder: vt.placeholder,
|
|
6875
|
+
required: vt.type === "email",
|
|
6871
6876
|
className: `${r}-input`,
|
|
6872
6877
|
style: {
|
|
6873
6878
|
...ot,
|
|
@@ -6877,7 +6882,7 @@ const Tl = ({ settings: t, isEditor: e, metadata: n, activeEvent: o }) => {
|
|
|
6877
6882
|
paddingBottom: F(j.bottom, e)
|
|
6878
6883
|
}
|
|
6879
6884
|
},
|
|
6880
|
-
|
|
6885
|
+
vt.name
|
|
6881
6886
|
))
|
|
6882
6887
|
}
|
|
6883
6888
|
),
|
|
@@ -6886,30 +6891,30 @@ const Tl = ({ settings: t, isEditor: e, metadata: n, activeEvent: o }) => {
|
|
|
6886
6891
|
{
|
|
6887
6892
|
type: "submit",
|
|
6888
6893
|
className: `${r}-submitBtn`,
|
|
6889
|
-
"aria-label":
|
|
6894
|
+
"aria-label": at,
|
|
6890
6895
|
style: {
|
|
6891
|
-
...
|
|
6892
|
-
...
|
|
6896
|
+
...Yt,
|
|
6897
|
+
...xt,
|
|
6893
6898
|
paddingRight: F(H.right, e),
|
|
6894
6899
|
paddingLeft: F(H.left, e),
|
|
6895
6900
|
paddingTop: F(H.top, e),
|
|
6896
6901
|
paddingBottom: F(H.bottom, e)
|
|
6897
6902
|
},
|
|
6898
|
-
children: B === "submitting" ? "..." :
|
|
6903
|
+
children: B === "submitting" ? "..." : X ? J ? /* @__PURE__ */ O("img", { src: J, alt: "", draggable: !1 }) : null : et
|
|
6899
6904
|
}
|
|
6900
6905
|
) })
|
|
6901
6906
|
]
|
|
6902
6907
|
}
|
|
6903
6908
|
),
|
|
6904
|
-
|
|
6909
|
+
lt === "success" && /* @__PURE__ */ O(
|
|
6905
6910
|
"p",
|
|
6906
6911
|
{
|
|
6907
6912
|
className: `${r}-success`,
|
|
6908
6913
|
style: { ...ot, lineHeight: ot == null ? void 0 : ot.fontSize },
|
|
6909
|
-
children:
|
|
6914
|
+
children: m
|
|
6910
6915
|
}
|
|
6911
6916
|
),
|
|
6912
|
-
|
|
6917
|
+
lt === "error" && /* @__PURE__ */ O(
|
|
6913
6918
|
"p",
|
|
6914
6919
|
{
|
|
6915
6920
|
className: `${r}-error`,
|
|
@@ -6919,7 +6924,7 @@ const Tl = ({ settings: t, isEditor: e, metadata: n, activeEvent: o }) => {
|
|
|
6919
6924
|
}
|
|
6920
6925
|
)
|
|
6921
6926
|
] });
|
|
6922
|
-
},
|
|
6927
|
+
}, So = {
|
|
6923
6928
|
strokeColor: "stroke-color",
|
|
6924
6929
|
inputColor: "input-color",
|
|
6925
6930
|
placeholderColor: "placeholder-color",
|
|
@@ -6931,20 +6936,20 @@ const Tl = ({ settings: t, isEditor: e, metadata: n, activeEvent: o }) => {
|
|
|
6931
6936
|
}, Ll = ["hover", "focus", "filled", "success", "error"];
|
|
6932
6937
|
function Al(t, e, n) {
|
|
6933
6938
|
const o = {};
|
|
6934
|
-
for (const [r, a] of Object.entries(
|
|
6939
|
+
for (const [r, a] of Object.entries(So))
|
|
6935
6940
|
o[`--${t}-${a}`] = e[r];
|
|
6936
6941
|
if (n)
|
|
6937
6942
|
for (const r of Ll) {
|
|
6938
6943
|
const a = n[r];
|
|
6939
6944
|
if (a)
|
|
6940
|
-
for (const [i, c] of Object.entries(
|
|
6945
|
+
for (const [i, c] of Object.entries(So)) {
|
|
6941
6946
|
const l = a[i];
|
|
6942
6947
|
l !== void 0 && (o[`--${t}-${r}-${c}`] = l);
|
|
6943
6948
|
}
|
|
6944
6949
|
}
|
|
6945
6950
|
return o;
|
|
6946
6951
|
}
|
|
6947
|
-
function
|
|
6952
|
+
function Co(t, e) {
|
|
6948
6953
|
var n, o, r;
|
|
6949
6954
|
return {
|
|
6950
6955
|
fontFamily: t.fontSettings.fontFamily,
|
|
@@ -7194,6 +7199,10 @@ export const OnelinerForm = ({ settings, isEditor, metadata, activeEvent }: Onel
|
|
|
7194
7199
|
? getFormFieldValidationError(visibleFields, displayValues)
|
|
7195
7200
|
: null;
|
|
7196
7201
|
const stateClass = activeEvent && activeEvent !== 'default' ? \`\${P}-state-\${activeEvent}\` : '';
|
|
7202
|
+
const hasFilledFieldValue = visibleFields.some((f) => (displayValues[f.name] ?? '').trim().length > 0);
|
|
7203
|
+
const filledStateClass =
|
|
7204
|
+
stateClass !== \`\${P}-state-filled\` && hasFilledFieldValue ? \`\${P}-state-filled\` : '';
|
|
7205
|
+
const wrapperStateClasses = \`\${stateClass} \${filledStateClass}\`.trim();
|
|
7197
7206
|
|
|
7198
7207
|
const submitUrl = metadata?.submitUrl as string | undefined;
|
|
7199
7208
|
const bc = buttonContentFromSettings;
|
|
@@ -7334,7 +7343,7 @@ export const OnelinerForm = ({ settings, isEditor, metadata, activeEvent }: Onel
|
|
|
7334
7343
|
};
|
|
7335
7344
|
|
|
7336
7345
|
return (
|
|
7337
|
-
<div className={\`\${P}-wrapper \${
|
|
7346
|
+
<div className={\`\${P}-wrapper \${wrapperStateClasses}\`.trim()} style={colorVars}>
|
|
7338
7347
|
<style>{getCSS(P)}</style>
|
|
7339
7348
|
<form
|
|
7340
7349
|
onSubmit={handleSubmit}
|
|
@@ -7561,7 +7570,7 @@ function textStylesToCss(textStyles: TextStyles, isEditor?: boolean): React.CSSP
|
|
|
7561
7570
|
{ name: "name", type: "text", placeholder: "Enter your name", label: "Name", isRequired: !1, error: "Please, enter your name." },
|
|
7562
7571
|
{ name: "company", type: "text", placeholder: "Enter company", label: "Company", isRequired: !1, error: "Please, enter your company name." },
|
|
7563
7572
|
{ name: "phone", type: "phone", placeholder: "Enter your phone", label: "Phone", isRequired: !1, error: "Please, enter a valid phone number." }
|
|
7564
|
-
],
|
|
7573
|
+
], xo = {
|
|
7565
7574
|
fontSettings: {
|
|
7566
7575
|
type: "object",
|
|
7567
7576
|
display: { type: "font-settings-weight" },
|
|
@@ -7738,7 +7747,7 @@ function textStylesToCss(textStyles: TextStyles, isEditor?: boolean): React.CSSP
|
|
|
7738
7747
|
scope: "layout"
|
|
7739
7748
|
},
|
|
7740
7749
|
inputFontSettings: {
|
|
7741
|
-
...
|
|
7750
|
+
...xo.fontSettings,
|
|
7742
7751
|
scope: "layout",
|
|
7743
7752
|
title: "Input"
|
|
7744
7753
|
},
|
|
@@ -7773,7 +7782,7 @@ function textStylesToCss(textStyles: TextStyles, isEditor?: boolean): React.CSSP
|
|
|
7773
7782
|
display: { type: "text-appearance" }
|
|
7774
7783
|
},
|
|
7775
7784
|
buttonFontSettings: {
|
|
7776
|
-
...
|
|
7785
|
+
...xo.fontSettings,
|
|
7777
7786
|
scope: "layout",
|
|
7778
7787
|
title: "Button"
|
|
7779
7788
|
},
|
|
@@ -7977,7 +7986,7 @@ function textStylesToCss(textStyles: TextStyles, isEditor?: boolean): React.CSSP
|
|
|
7977
7986
|
},
|
|
7978
7987
|
schema: Fl,
|
|
7979
7988
|
sourceCode: El
|
|
7980
|
-
},
|
|
7989
|
+
}, Ml = [
|
|
7981
7990
|
Sa,
|
|
7982
7991
|
La,
|
|
7983
7992
|
ml,
|
|
@@ -7985,6 +7994,6 @@ function textStylesToCss(textStyles: TextStyles, isEditor?: boolean): React.CSSP
|
|
|
7985
7994
|
Rl
|
|
7986
7995
|
];
|
|
7987
7996
|
export {
|
|
7988
|
-
|
|
7989
|
-
|
|
7997
|
+
Ml as components,
|
|
7998
|
+
Vl as isSchemaV1
|
|
7990
7999
|
};
|