@cntrl-site/components 0.1.26 → 0.1.27-0

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.mjs CHANGED
@@ -1,446 +1,2110 @@
1
- import { jsx, Fragment, jsxs } from "react/jsx-runtime";
2
- import { useState, useEffect, useRef, useCallback } from "react";
3
- import { Splide, SplideSlide } from "@splidejs/react-splide";
4
- import cn from "classnames";
5
- import { createPortal } from "react-dom";
6
- const wrapper = "ControlSlider-module__wrapper___sHEkd";
7
- const hoverArrow = "ControlSlider-module__hoverArrow___A-dOH";
8
- const sliderItem = "ControlSlider-module__sliderItem___QQSkR";
9
- const sliderImage = "ControlSlider-module__sliderImage___9hRl-";
10
- const arrow$1 = "ControlSlider-module__arrow___05ghY";
11
- const arrowVertical$1 = "ControlSlider-module__arrowVertical___tBfVN";
12
- const nextArrow$1 = "ControlSlider-module__nextArrow___-30Yc";
13
- const arrowInner$1 = "ControlSlider-module__arrowInner___aEra3";
14
- const arrowIcon$1 = "ControlSlider-module__arrowIcon___S4ztF";
15
- const arrowImg$1 = "ControlSlider-module__arrowImg___2dwJW";
16
- const mirror$1 = "ControlSlider-module__mirror___brd6U";
17
- const pagination = "ControlSlider-module__pagination___bicLF";
18
- const paginationInner = "ControlSlider-module__paginationInner___bT-P-";
19
- const paginationVertical = "ControlSlider-module__paginationVertical___zYqKw";
20
- const paginationItem = "ControlSlider-module__paginationItem___nTRbk";
21
- const dot = "ControlSlider-module__dot___p1Qun";
22
- const activeDot = "ControlSlider-module__activeDot___LHFaj";
23
- const paginationInsideBottom = "ControlSlider-module__paginationInsideBottom___R3FWn";
24
- const paginationInsideTop = "ControlSlider-module__paginationInsideTop___V-qb-";
25
- const paginationOutsideBottom = "ControlSlider-module__paginationOutsideBottom___14w8D";
26
- const paginationOutsideTop = "ControlSlider-module__paginationOutsideTop___SCLqB";
27
- const paginationInsideLeft = "ControlSlider-module__paginationInsideLeft___yOBRZ";
28
- const paginationInsideRight = "ControlSlider-module__paginationInsideRight___Rtt3o";
29
- const paginationOutsideLeft = "ControlSlider-module__paginationOutsideLeft___lahaw";
30
- const paginationOutsideRight = "ControlSlider-module__paginationOutsideRight___EtuQa";
31
- const imgWrapper$1 = "ControlSlider-module__imgWrapper___UjEgB";
32
- const captionBlock = "ControlSlider-module__captionBlock___dJ6-j";
33
- const captionTextWrapper = "ControlSlider-module__captionTextWrapper___HFlpf";
34
- const captionText = "ControlSlider-module__captionText___uGBVc";
35
- const active = "ControlSlider-module__active___WZK4G";
36
- const withPointerEvents = "ControlSlider-module__withPointerEvents___t-18M";
37
- const topLeftAlignment = "ControlSlider-module__topLeftAlignment___zjnGM";
38
- const topCenterAlignment = "ControlSlider-module__topCenterAlignment___gD1xW";
39
- const topRightAlignment = "ControlSlider-module__topRightAlignment___NMapS";
40
- const middleLeftAlignment = "ControlSlider-module__middleLeftAlignment___OnUrY";
41
- const middleCenterAlignment = "ControlSlider-module__middleCenterAlignment___Tdkl0";
42
- const middleRightAlignment = "ControlSlider-module__middleRightAlignment___wEbfX";
43
- const bottomLeftAlignment = "ControlSlider-module__bottomLeftAlignment___cTP2-";
44
- const bottomCenterAlignment = "ControlSlider-module__bottomCenterAlignment___c54fB";
45
- const bottomRightAlignment = "ControlSlider-module__bottomRightAlignment___kEwrz";
46
- const clickOverlay = "ControlSlider-module__clickOverlay___DZA28";
47
- const contain$1 = "ControlSlider-module__contain___pLyq7";
48
- const cover$1 = "ControlSlider-module__cover___KdDat";
49
- const styles$3 = {
50
- wrapper,
51
- hoverArrow,
52
- sliderItem,
53
- sliderImage,
54
- arrow: arrow$1,
55
- arrowVertical: arrowVertical$1,
56
- nextArrow: nextArrow$1,
57
- arrowInner: arrowInner$1,
58
- arrowIcon: arrowIcon$1,
59
- arrowImg: arrowImg$1,
60
- mirror: mirror$1,
61
- pagination,
62
- paginationInner,
63
- paginationVertical,
64
- paginationItem,
65
- dot,
66
- activeDot,
67
- paginationInsideBottom,
68
- paginationInsideTop,
69
- paginationOutsideBottom,
70
- paginationOutsideTop,
71
- paginationInsideLeft,
72
- paginationInsideRight,
73
- paginationOutsideLeft,
74
- paginationOutsideRight,
75
- imgWrapper: imgWrapper$1,
76
- captionBlock,
77
- captionTextWrapper,
78
- captionText,
79
- active,
80
- withPointerEvents,
81
- topLeftAlignment,
82
- topCenterAlignment,
83
- topRightAlignment,
84
- middleLeftAlignment,
85
- middleCenterAlignment,
86
- middleRightAlignment,
87
- bottomLeftAlignment,
88
- bottomCenterAlignment,
89
- bottomRightAlignment,
90
- clickOverlay,
91
- contain: contain$1,
92
- cover: cover$1
1
+ import { jsx as M, Fragment as pt, jsxs as Ae } from "react/jsx-runtime";
2
+ import Ue, { useState as ue, useEffect as me, useRef as be, useCallback as Vr } from "react";
3
+ import ae from "classnames";
4
+ import { createPortal as jr } from "react-dom";
5
+ const $r = "ControlSlider-module__wrapper___sHEkd", Hr = "ControlSlider-module__hoverArrow___A-dOH", Ur = "ControlSlider-module__sliderItem___QQSkR", Yr = "ControlSlider-module__sliderImage___9hRl-", Gr = "ControlSlider-module__arrow___05ghY", Xr = "ControlSlider-module__arrowVertical___tBfVN", Kr = "ControlSlider-module__nextArrow___-30Yc", qr = "ControlSlider-module__arrowInner___aEra3", Jr = "ControlSlider-module__arrowIcon___S4ztF", Zr = "ControlSlider-module__arrowImg___2dwJW", Qr = "ControlSlider-module__mirror___brd6U", ei = "ControlSlider-module__pagination___bicLF", ti = "ControlSlider-module__paginationInner___bT-P-", ni = "ControlSlider-module__paginationVertical___zYqKw", ri = "ControlSlider-module__paginationItem___nTRbk", ii = "ControlSlider-module__dot___p1Qun", oi = "ControlSlider-module__activeDot___LHFaj", ai = "ControlSlider-module__paginationInsideBottom___R3FWn", si = "ControlSlider-module__paginationInsideTop___V-qb-", li = "ControlSlider-module__paginationOutsideBottom___14w8D", ci = "ControlSlider-module__paginationOutsideTop___SCLqB", ui = "ControlSlider-module__paginationInsideLeft___yOBRZ", di = "ControlSlider-module__paginationInsideRight___Rtt3o", pi = "ControlSlider-module__paginationOutsideLeft___lahaw", fi = "ControlSlider-module__paginationOutsideRight___EtuQa", gi = "ControlSlider-module__imgWrapper___UjEgB", mi = "ControlSlider-module__captionBlock___dJ6-j", hi = "ControlSlider-module__captionTextWrapper___HFlpf", vi = "ControlSlider-module__captionText___uGBVc", yi = "ControlSlider-module__active___WZK4G", _i = "ControlSlider-module__withPointerEvents___t-18M", bi = "ControlSlider-module__topLeftAlignment___zjnGM", Si = "ControlSlider-module__topCenterAlignment___gD1xW", wi = "ControlSlider-module__topRightAlignment___NMapS", Ei = "ControlSlider-module__middleLeftAlignment___OnUrY", Ci = "ControlSlider-module__middleCenterAlignment___Tdkl0", Ai = "ControlSlider-module__middleRightAlignment___wEbfX", Ii = "ControlSlider-module__bottomLeftAlignment___cTP2-", xi = "ControlSlider-module__bottomCenterAlignment___c54fB", Li = "ControlSlider-module__bottomRightAlignment___kEwrz", Ti = "ControlSlider-module__clickOverlay___DZA28", Ri = "ControlSlider-module__contain___pLyq7", Ni = "ControlSlider-module__cover___KdDat", j = {
6
+ wrapper: $r,
7
+ hoverArrow: Hr,
8
+ sliderItem: Ur,
9
+ sliderImage: Yr,
10
+ arrow: Gr,
11
+ arrowVertical: Xr,
12
+ nextArrow: Kr,
13
+ arrowInner: qr,
14
+ arrowIcon: Jr,
15
+ arrowImg: Zr,
16
+ mirror: Qr,
17
+ pagination: ei,
18
+ paginationInner: ti,
19
+ paginationVertical: ni,
20
+ paginationItem: ri,
21
+ dot: ii,
22
+ activeDot: oi,
23
+ paginationInsideBottom: ai,
24
+ paginationInsideTop: si,
25
+ paginationOutsideBottom: li,
26
+ paginationOutsideTop: ci,
27
+ paginationInsideLeft: ui,
28
+ paginationInsideRight: di,
29
+ paginationOutsideLeft: pi,
30
+ paginationOutsideRight: fi,
31
+ imgWrapper: gi,
32
+ captionBlock: mi,
33
+ captionTextWrapper: hi,
34
+ captionText: vi,
35
+ active: yi,
36
+ withPointerEvents: _i,
37
+ topLeftAlignment: bi,
38
+ topCenterAlignment: Si,
39
+ topRightAlignment: wi,
40
+ middleLeftAlignment: Ei,
41
+ middleCenterAlignment: Ci,
42
+ middleRightAlignment: Ai,
43
+ bottomLeftAlignment: Ii,
44
+ bottomCenterAlignment: xi,
45
+ bottomRightAlignment: Li,
46
+ clickOverlay: Ti,
47
+ contain: Ri,
48
+ cover: Ni
93
49
  };
94
- const link$1 = "RichTextRenderer-module__link___BWeZ2";
95
- const styles$2 = {
96
- link: link$1
50
+ function ki(e, n) {
51
+ for (var t = 0; t < n.length; t++) {
52
+ var r = n[t];
53
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
54
+ }
55
+ }
56
+ function Oi(e, n, t) {
57
+ return n && ki(e.prototype, n), Object.defineProperty(e, "prototype", { writable: !1 }), e;
58
+ }
59
+ var Dn = "(prefers-reduced-motion: reduce)", Qe = 1, Di = 2, nt = 3, ot = 4, bt = 5, Ot = 6, zt = 7, Pi = {
60
+ CREATED: Qe,
61
+ MOUNTED: Di,
62
+ IDLE: nt,
63
+ MOVING: ot,
64
+ SCROLLING: bt,
65
+ DRAGGING: Ot,
66
+ DESTROYED: zt
67
+ };
68
+ function Be(e) {
69
+ e.length = 0;
70
+ }
71
+ function Ve(e, n, t) {
72
+ return Array.prototype.slice.call(e, n, t);
73
+ }
74
+ function re(e) {
75
+ return e.bind.apply(e, [null].concat(Ve(arguments, 1)));
76
+ }
77
+ var tr = setTimeout, on = function() {
78
+ };
79
+ function Pn(e) {
80
+ return requestAnimationFrame(e);
81
+ }
82
+ function jt(e, n) {
83
+ return typeof n === e;
84
+ }
85
+ function ft(e) {
86
+ return !mn(e) && jt("object", e);
87
+ }
88
+ var gn = Array.isArray, nr = re(jt, "function"), Me = re(jt, "string"), St = re(jt, "undefined");
89
+ function mn(e) {
90
+ return e === null;
91
+ }
92
+ function rr(e) {
93
+ try {
94
+ return e instanceof (e.ownerDocument.defaultView || window).HTMLElement;
95
+ } catch {
96
+ return !1;
97
+ }
98
+ }
99
+ function wt(e) {
100
+ return gn(e) ? e : [e];
101
+ }
102
+ function Ee(e, n) {
103
+ wt(e).forEach(n);
104
+ }
105
+ function hn(e, n) {
106
+ return e.indexOf(n) > -1;
107
+ }
108
+ function Dt(e, n) {
109
+ return e.push.apply(e, wt(n)), e;
110
+ }
111
+ function Oe(e, n, t) {
112
+ e && Ee(n, function(r) {
113
+ r && e.classList[t ? "add" : "remove"](r);
114
+ });
115
+ }
116
+ function Le(e, n) {
117
+ Oe(e, Me(n) ? n.split(" ") : n, !0);
118
+ }
119
+ function Et(e, n) {
120
+ Ee(n, e.appendChild.bind(e));
121
+ }
122
+ function vn(e, n) {
123
+ Ee(e, function(t) {
124
+ var r = (n || t).parentNode;
125
+ r && r.insertBefore(t, n);
126
+ });
127
+ }
128
+ function gt(e, n) {
129
+ return rr(e) && (e.msMatchesSelector || e.matches).call(e, n);
130
+ }
131
+ function ir(e, n) {
132
+ var t = e ? Ve(e.children) : [];
133
+ return n ? t.filter(function(r) {
134
+ return gt(r, n);
135
+ }) : t;
136
+ }
137
+ function Ct(e, n) {
138
+ return n ? ir(e, n)[0] : e.firstElementChild;
139
+ }
140
+ var mt = Object.keys;
141
+ function Ye(e, n, t) {
142
+ return e && (t ? mt(e).reverse() : mt(e)).forEach(function(r) {
143
+ r !== "__proto__" && n(e[r], r);
144
+ }), e;
145
+ }
146
+ function ht(e) {
147
+ return Ve(arguments, 1).forEach(function(n) {
148
+ Ye(n, function(t, r) {
149
+ e[r] = n[r];
150
+ });
151
+ }), e;
152
+ }
153
+ function We(e) {
154
+ return Ve(arguments, 1).forEach(function(n) {
155
+ Ye(n, function(t, r) {
156
+ gn(t) ? e[r] = t.slice() : ft(t) ? e[r] = We({}, ft(e[r]) ? e[r] : {}, t) : e[r] = t;
157
+ });
158
+ }), e;
159
+ }
160
+ function Bn(e, n) {
161
+ Ee(n || mt(e), function(t) {
162
+ delete e[t];
163
+ });
164
+ }
165
+ function Te(e, n) {
166
+ Ee(e, function(t) {
167
+ Ee(n, function(r) {
168
+ t && t.removeAttribute(r);
169
+ });
170
+ });
171
+ }
172
+ function K(e, n, t) {
173
+ ft(n) ? Ye(n, function(r, o) {
174
+ K(e, o, r);
175
+ }) : Ee(e, function(r) {
176
+ mn(t) || t === "" ? Te(r, n) : r.setAttribute(n, String(t));
177
+ });
178
+ }
179
+ function et(e, n, t) {
180
+ var r = document.createElement(e);
181
+ return n && (Me(n) ? Le(r, n) : K(r, n)), t && Et(t, r), r;
182
+ }
183
+ function Ce(e, n, t) {
184
+ if (St(t))
185
+ return getComputedStyle(e)[n];
186
+ mn(t) || (e.style[n] = "" + t);
187
+ }
188
+ function vt(e, n) {
189
+ Ce(e, "display", n);
190
+ }
191
+ function or(e) {
192
+ e.setActive && e.setActive() || e.focus({
193
+ preventScroll: !0
194
+ });
195
+ }
196
+ function Ie(e, n) {
197
+ return e.getAttribute(n);
198
+ }
199
+ function zn(e, n) {
200
+ return e && e.classList.contains(n);
201
+ }
202
+ function Se(e) {
203
+ return e.getBoundingClientRect();
204
+ }
205
+ function Ge(e) {
206
+ Ee(e, function(n) {
207
+ n && n.parentNode && n.parentNode.removeChild(n);
208
+ });
209
+ }
210
+ function ar(e) {
211
+ return Ct(new DOMParser().parseFromString(e, "text/html").body);
212
+ }
213
+ function ke(e, n) {
214
+ e.preventDefault(), n && (e.stopPropagation(), e.stopImmediatePropagation());
215
+ }
216
+ function sr(e, n) {
217
+ return e && e.querySelector(n);
218
+ }
219
+ function yn(e, n) {
220
+ return n ? Ve(e.querySelectorAll(n)) : [];
221
+ }
222
+ function De(e, n) {
223
+ Oe(e, n, !1);
224
+ }
225
+ function an(e) {
226
+ return e.timeStamp;
227
+ }
228
+ function He(e) {
229
+ return Me(e) ? e : e ? e + "px" : "";
230
+ }
231
+ var At = "splide", _n = "data-" + At;
232
+ function ct(e, n) {
233
+ if (!e)
234
+ throw new Error("[" + At + "] " + (n || ""));
235
+ }
236
+ var Fe = Math.min, Wt = Math.max, Mt = Math.floor, yt = Math.ceil, _e = Math.abs;
237
+ function lr(e, n, t) {
238
+ return _e(e - n) < t;
239
+ }
240
+ function Pt(e, n, t, r) {
241
+ var o = Fe(n, t), a = Wt(n, t);
242
+ return r ? o < e && e < a : o <= e && e <= a;
243
+ }
244
+ function Je(e, n, t) {
245
+ var r = Fe(n, t), o = Wt(n, t);
246
+ return Fe(Wt(r, e), o);
247
+ }
248
+ function sn(e) {
249
+ return +(e > 0) - +(e < 0);
250
+ }
251
+ function ln(e, n) {
252
+ return Ee(n, function(t) {
253
+ e = e.replace("%s", "" + t);
254
+ }), e;
255
+ }
256
+ function bn(e) {
257
+ return e < 10 ? "0" + e : "" + e;
258
+ }
259
+ var Wn = {};
260
+ function Bi(e) {
261
+ return "" + e + bn(Wn[e] = (Wn[e] || 0) + 1);
262
+ }
263
+ function cr() {
264
+ var e = [];
265
+ function n(i, l, s, d) {
266
+ o(i, l, function(u, S, m) {
267
+ var v = "addEventListener" in u, c = v ? u.removeEventListener.bind(u, S, s, d) : u.removeListener.bind(u, s);
268
+ v ? u.addEventListener(S, s, d) : u.addListener(s), e.push([u, S, m, s, c]);
269
+ });
270
+ }
271
+ function t(i, l, s) {
272
+ o(i, l, function(d, u, S) {
273
+ e = e.filter(function(m) {
274
+ return m[0] === d && m[1] === u && m[2] === S && (!s || m[3] === s) ? (m[4](), !1) : !0;
275
+ });
276
+ });
277
+ }
278
+ function r(i, l, s) {
279
+ var d, u = !0;
280
+ return typeof CustomEvent == "function" ? d = new CustomEvent(l, {
281
+ bubbles: u,
282
+ detail: s
283
+ }) : (d = document.createEvent("CustomEvent"), d.initCustomEvent(l, u, !1, s)), i.dispatchEvent(d), d;
284
+ }
285
+ function o(i, l, s) {
286
+ Ee(i, function(d) {
287
+ d && Ee(l, function(u) {
288
+ u.split(" ").forEach(function(S) {
289
+ var m = S.split(".");
290
+ s(d, m[0], m[1]);
291
+ });
292
+ });
293
+ });
294
+ }
295
+ function a() {
296
+ e.forEach(function(i) {
297
+ i[4]();
298
+ }), Be(e);
299
+ }
300
+ return {
301
+ bind: n,
302
+ unbind: t,
303
+ dispatch: r,
304
+ destroy: a
305
+ };
306
+ }
307
+ var je = "mounted", cn = "ready", ze = "move", at = "moved", Sn = "click", ur = "active", dr = "inactive", pr = "visible", fr = "hidden", de = "refresh", ve = "updated", rt = "resize", $t = "resized", gr = "drag", mr = "dragging", hr = "dragged", Ht = "scroll", Ke = "scrolled", zi = "overflow", wn = "destroy", vr = "arrows:mounted", yr = "arrows:updated", _r = "pagination:mounted", br = "pagination:updated", En = "navigation:mounted", Cn = "autoplay:play", Sr = "autoplay:playing", An = "autoplay:pause", In = "lazyload:loaded", wr = "sk", Er = "sh", Ft = "ei";
308
+ function se(e) {
309
+ var n = e ? e.event.bus : document.createDocumentFragment(), t = cr();
310
+ function r(a, i) {
311
+ t.bind(n, wt(a).join(" "), function(l) {
312
+ i.apply(i, gn(l.detail) ? l.detail : []);
313
+ });
314
+ }
315
+ function o(a) {
316
+ t.dispatch(n, a, Ve(arguments, 1));
317
+ }
318
+ return e && e.event.on(wn, t.destroy), ht(t, {
319
+ bus: n,
320
+ on: r,
321
+ off: re(t.unbind, n),
322
+ emit: o
323
+ });
324
+ }
325
+ function Ut(e, n, t, r) {
326
+ var o = Date.now, a, i = 0, l, s = !0, d = 0;
327
+ function u() {
328
+ if (!s) {
329
+ if (i = e ? Fe((o() - a) / e, 1) : 1, t && t(i), i >= 1 && (n(), a = o(), r && ++d >= r))
330
+ return m();
331
+ l = Pn(u);
332
+ }
333
+ }
334
+ function S(E) {
335
+ E || c(), a = o() - (E ? i * e : 0), s = !1, l = Pn(u);
336
+ }
337
+ function m() {
338
+ s = !0;
339
+ }
340
+ function v() {
341
+ a = o(), i = 0, t && t(i);
342
+ }
343
+ function c() {
344
+ l && cancelAnimationFrame(l), i = 0, l = 0, s = !0;
345
+ }
346
+ function p(E) {
347
+ e = E;
348
+ }
349
+ function w() {
350
+ return s;
351
+ }
352
+ return {
353
+ start: S,
354
+ rewind: v,
355
+ pause: m,
356
+ cancel: c,
357
+ set: p,
358
+ isPaused: w
359
+ };
360
+ }
361
+ function Wi(e) {
362
+ var n = e;
363
+ function t(o) {
364
+ n = o;
365
+ }
366
+ function r(o) {
367
+ return hn(wt(o), n);
368
+ }
369
+ return {
370
+ set: t,
371
+ is: r
372
+ };
373
+ }
374
+ function Mi(e, n) {
375
+ var t = Ut(0, e, null, 1);
376
+ return function() {
377
+ t.isPaused() && t.start();
378
+ };
379
+ }
380
+ function Fi(e, n, t) {
381
+ var r = e.state, o = t.breakpoints || {}, a = t.reducedMotion || {}, i = cr(), l = [];
382
+ function s() {
383
+ var c = t.mediaQuery === "min";
384
+ mt(o).sort(function(p, w) {
385
+ return c ? +p - +w : +w - +p;
386
+ }).forEach(function(p) {
387
+ u(o[p], "(" + (c ? "min" : "max") + "-width:" + p + "px)");
388
+ }), u(a, Dn), S();
389
+ }
390
+ function d(c) {
391
+ c && i.destroy();
392
+ }
393
+ function u(c, p) {
394
+ var w = matchMedia(p);
395
+ i.bind(w, "change", S), l.push([c, w]);
396
+ }
397
+ function S() {
398
+ var c = r.is(zt), p = t.direction, w = l.reduce(function(E, g) {
399
+ return We(E, g[1].matches ? g[0] : {});
400
+ }, {});
401
+ Bn(t), v(w), t.destroy ? e.destroy(t.destroy === "completely") : c ? (d(!0), e.mount()) : p !== t.direction && e.refresh();
402
+ }
403
+ function m(c) {
404
+ matchMedia(Dn).matches && (c ? We(t, a) : Bn(t, mt(a)));
405
+ }
406
+ function v(c, p, w) {
407
+ We(t, c), p && We(Object.getPrototypeOf(t), c), (w || !r.is(Qe)) && e.emit(ve, t);
408
+ }
409
+ return {
410
+ setup: s,
411
+ destroy: d,
412
+ reduce: m,
413
+ set: v
414
+ };
415
+ }
416
+ var Yt = "Arrow", Gt = Yt + "Left", Xt = Yt + "Right", Cr = Yt + "Up", Ar = Yt + "Down", Mn = "rtl", Kt = "ttb", Qt = {
417
+ width: ["height"],
418
+ left: ["top", "right"],
419
+ right: ["bottom", "left"],
420
+ x: ["y"],
421
+ X: ["Y"],
422
+ Y: ["X"],
423
+ ArrowLeft: [Cr, Xt],
424
+ ArrowRight: [Ar, Gt]
425
+ };
426
+ function Vi(e, n, t) {
427
+ function r(a, i, l) {
428
+ l = l || t.direction;
429
+ var s = l === Mn && !i ? 1 : l === Kt ? 0 : -1;
430
+ return Qt[a] && Qt[a][s] || a.replace(/width|left|right/i, function(d, u) {
431
+ var S = Qt[d.toLowerCase()][s] || d;
432
+ return u > 0 ? S.charAt(0).toUpperCase() + S.slice(1) : S;
433
+ });
434
+ }
435
+ function o(a) {
436
+ return a * (t.direction === Mn ? 1 : -1);
437
+ }
438
+ return {
439
+ resolve: r,
440
+ orient: o
441
+ };
442
+ }
443
+ var Pe = "role", tt = "tabindex", ji = "disabled", xe = "aria-", It = xe + "controls", Ir = xe + "current", Fn = xe + "selected", we = xe + "label", xn = xe + "labelledby", xr = xe + "hidden", Ln = xe + "orientation", _t = xe + "roledescription", Vn = xe + "live", jn = xe + "busy", $n = xe + "atomic", Tn = [Pe, tt, ji, It, Ir, we, xn, xr, Ln, _t], Re = At + "__", $e = "is-", en = At, Hn = Re + "track", $i = Re + "list", qt = Re + "slide", Lr = qt + "--clone", Hi = qt + "__container", Rn = Re + "arrows", Jt = Re + "arrow", Tr = Jt + "--prev", Rr = Jt + "--next", Zt = Re + "pagination", Nr = Zt + "__page", Ui = Re + "progress", Yi = Ui + "__bar", Gi = Re + "toggle", Xi = Re + "spinner", Ki = Re + "sr", qi = $e + "initialized", Xe = $e + "active", kr = $e + "prev", Or = $e + "next", un = $e + "visible", dn = $e + "loading", Dr = $e + "focus-in", Pr = $e + "overflow", Ji = [Xe, un, kr, Or, dn, Dr, Pr], Zi = {
444
+ slide: qt,
445
+ clone: Lr,
446
+ arrows: Rn,
447
+ arrow: Jt,
448
+ prev: Tr,
449
+ next: Rr,
450
+ pagination: Zt,
451
+ page: Nr,
452
+ spinner: Xi
453
+ };
454
+ function Qi(e, n) {
455
+ if (nr(e.closest))
456
+ return e.closest(n);
457
+ for (var t = e; t && t.nodeType === 1 && !gt(t, n); )
458
+ t = t.parentElement;
459
+ return t;
460
+ }
461
+ var eo = 5, Un = 200, Br = "touchstart mousedown", tn = "touchmove mousemove", nn = "touchend touchcancel mouseup click";
462
+ function to(e, n, t) {
463
+ var r = se(e), o = r.on, a = r.bind, i = e.root, l = t.i18n, s = {}, d = [], u = [], S = [], m, v, c;
464
+ function p() {
465
+ b(), F(), g();
466
+ }
467
+ function w() {
468
+ o(de, E), o(de, p), o(ve, g), a(document, Br + " keydown", function(h) {
469
+ c = h.type === "keydown";
470
+ }, {
471
+ capture: !0
472
+ }), a(i, "focusin", function() {
473
+ Oe(i, Dr, !!c);
474
+ });
475
+ }
476
+ function E(h) {
477
+ var C = Tn.concat("style");
478
+ Be(d), De(i, u), De(m, S), Te([m, v], C), Te(i, h ? C : ["style", _t]);
479
+ }
480
+ function g() {
481
+ De(i, u), De(m, S), u = I(en), S = I(Hn), Le(i, u), Le(m, S), K(i, we, t.label), K(i, xn, t.labelledby);
482
+ }
483
+ function b() {
484
+ m = B("." + Hn), v = Ct(m, "." + $i), ct(m && v, "A track/list element is missing."), Dt(d, ir(v, "." + qt + ":not(." + Lr + ")")), Ye({
485
+ arrows: Rn,
486
+ pagination: Zt,
487
+ prev: Tr,
488
+ next: Rr,
489
+ bar: Yi,
490
+ toggle: Gi
491
+ }, function(h, C) {
492
+ s[C] = B("." + h);
493
+ }), ht(s, {
494
+ root: i,
495
+ track: m,
496
+ list: v,
497
+ slides: d
498
+ });
499
+ }
500
+ function F() {
501
+ var h = i.id || Bi(At), C = t.role;
502
+ i.id = h, m.id = m.id || h + "-track", v.id = v.id || h + "-list", !Ie(i, Pe) && i.tagName !== "SECTION" && C && K(i, Pe, C), K(i, _t, l.carousel), K(v, Pe, "presentation");
503
+ }
504
+ function B(h) {
505
+ var C = sr(i, h);
506
+ return C && Qi(C, "." + en) === i ? C : void 0;
507
+ }
508
+ function I(h) {
509
+ return [h + "--" + t.type, h + "--" + t.direction, t.drag && h + "--draggable", t.isNavigation && h + "--nav", h === en && Xe];
510
+ }
511
+ return ht(s, {
512
+ setup: p,
513
+ mount: w,
514
+ destroy: E
515
+ });
516
+ }
517
+ var it = "slide", st = "loop", xt = "fade";
518
+ function no(e, n, t, r) {
519
+ var o = se(e), a = o.on, i = o.emit, l = o.bind, s = e.Components, d = e.root, u = e.options, S = u.isNavigation, m = u.updateOnMove, v = u.i18n, c = u.pagination, p = u.slideFocus, w = s.Direction.resolve, E = Ie(r, "style"), g = Ie(r, we), b = t > -1, F = Ct(r, "." + Hi), B;
520
+ function I() {
521
+ b || (r.id = d.id + "-slide" + bn(n + 1), K(r, Pe, c ? "tabpanel" : "group"), K(r, _t, v.slide), K(r, we, g || ln(v.slideLabel, [n + 1, e.length]))), h();
522
+ }
523
+ function h() {
524
+ l(r, "click", re(i, Sn, x)), l(r, "keydown", re(i, wr, x)), a([at, Er, Ke], T), a(En, N), m && a(ze, z);
525
+ }
526
+ function C() {
527
+ B = !0, o.destroy(), De(r, Ji), Te(r, Tn), K(r, "style", E), K(r, we, g || "");
528
+ }
529
+ function N() {
530
+ var L = e.splides.map(function(_) {
531
+ var k = _.splide.Components.Slides.getAt(n);
532
+ return k ? k.slide.id : "";
533
+ }).join(" ");
534
+ K(r, we, ln(v.slideX, (b ? t : n) + 1)), K(r, It, L), K(r, Pe, p ? "button" : ""), p && Te(r, _t);
535
+ }
536
+ function z() {
537
+ B || T();
538
+ }
539
+ function T() {
540
+ if (!B) {
541
+ var L = e.index;
542
+ O(), P(), Oe(r, kr, n === L - 1), Oe(r, Or, n === L + 1);
543
+ }
544
+ }
545
+ function O() {
546
+ var L = $();
547
+ L !== zn(r, Xe) && (Oe(r, Xe, L), K(r, Ir, S && L || ""), i(L ? ur : dr, x));
548
+ }
549
+ function P() {
550
+ var L = f(), _ = !L && (!$() || b);
551
+ if (e.state.is([ot, bt]) || K(r, xr, _ || ""), K(yn(r, u.focusableNodes || ""), tt, _ ? -1 : ""), p && K(r, tt, _ ? -1 : 0), L !== zn(r, un) && (Oe(r, un, L), i(L ? pr : fr, x)), !L && document.activeElement === r) {
552
+ var k = s.Slides.getAt(e.index);
553
+ k && or(k.slide);
554
+ }
555
+ }
556
+ function H(L, _, k) {
557
+ Ce(k && F || r, L, _);
558
+ }
559
+ function $() {
560
+ var L = e.index;
561
+ return L === n || u.cloneStatus && L === t;
562
+ }
563
+ function f() {
564
+ if (e.is(xt))
565
+ return $();
566
+ var L = Se(s.Elements.track), _ = Se(r), k = w("left", !0), G = w("right", !0);
567
+ return Mt(L[k]) <= yt(_[k]) && Mt(_[G]) <= yt(L[G]);
568
+ }
569
+ function R(L, _) {
570
+ var k = _e(L - n);
571
+ return !b && (u.rewind || e.is(st)) && (k = Fe(k, e.length - k)), k <= _;
572
+ }
573
+ var x = {
574
+ index: n,
575
+ slideIndex: t,
576
+ slide: r,
577
+ container: F,
578
+ isClone: b,
579
+ mount: I,
580
+ destroy: C,
581
+ update: T,
582
+ style: H,
583
+ isWithin: R
584
+ };
585
+ return x;
586
+ }
587
+ function ro(e, n, t) {
588
+ var r = se(e), o = r.on, a = r.emit, i = r.bind, l = n.Elements, s = l.slides, d = l.list, u = [];
589
+ function S() {
590
+ m(), o(de, v), o(de, m);
591
+ }
592
+ function m() {
593
+ s.forEach(function(T, O) {
594
+ p(T, O, -1);
595
+ });
596
+ }
597
+ function v() {
598
+ B(function(T) {
599
+ T.destroy();
600
+ }), Be(u);
601
+ }
602
+ function c() {
603
+ B(function(T) {
604
+ T.update();
605
+ });
606
+ }
607
+ function p(T, O, P) {
608
+ var H = no(e, O, P, T);
609
+ H.mount(), u.push(H), u.sort(function($, f) {
610
+ return $.index - f.index;
611
+ });
612
+ }
613
+ function w(T) {
614
+ return T ? I(function(O) {
615
+ return !O.isClone;
616
+ }) : u;
617
+ }
618
+ function E(T) {
619
+ var O = n.Controller, P = O.toIndex(T), H = O.hasFocus() ? 1 : t.perPage;
620
+ return I(function($) {
621
+ return Pt($.index, P, P + H - 1);
622
+ });
623
+ }
624
+ function g(T) {
625
+ return I(T)[0];
626
+ }
627
+ function b(T, O) {
628
+ Ee(T, function(P) {
629
+ if (Me(P) && (P = ar(P)), rr(P)) {
630
+ var H = s[O];
631
+ H ? vn(P, H) : Et(d, P), Le(P, t.classes.slide), C(P, re(a, rt));
632
+ }
633
+ }), a(de);
634
+ }
635
+ function F(T) {
636
+ Ge(I(T).map(function(O) {
637
+ return O.slide;
638
+ })), a(de);
639
+ }
640
+ function B(T, O) {
641
+ w(O).forEach(T);
642
+ }
643
+ function I(T) {
644
+ return u.filter(nr(T) ? T : function(O) {
645
+ return Me(T) ? gt(O.slide, T) : hn(wt(T), O.index);
646
+ });
647
+ }
648
+ function h(T, O, P) {
649
+ B(function(H) {
650
+ H.style(T, O, P);
651
+ });
652
+ }
653
+ function C(T, O) {
654
+ var P = yn(T, "img"), H = P.length;
655
+ H ? P.forEach(function($) {
656
+ i($, "load error", function() {
657
+ --H || O();
658
+ });
659
+ }) : O();
660
+ }
661
+ function N(T) {
662
+ return T ? s.length : u.length;
663
+ }
664
+ function z() {
665
+ return u.length > t.perPage;
666
+ }
667
+ return {
668
+ mount: S,
669
+ destroy: v,
670
+ update: c,
671
+ register: p,
672
+ get: w,
673
+ getIn: E,
674
+ getAt: g,
675
+ add: b,
676
+ remove: F,
677
+ forEach: B,
678
+ filter: I,
679
+ style: h,
680
+ getLength: N,
681
+ isEnough: z
682
+ };
683
+ }
684
+ function io(e, n, t) {
685
+ var r = se(e), o = r.on, a = r.bind, i = r.emit, l = n.Slides, s = n.Direction.resolve, d = n.Elements, u = d.root, S = d.track, m = d.list, v = l.getAt, c = l.style, p, w, E;
686
+ function g() {
687
+ b(), a(window, "resize load", Mi(re(i, rt))), o([ve, de], b), o(rt, F);
688
+ }
689
+ function b() {
690
+ p = t.direction === Kt, Ce(u, "maxWidth", He(t.width)), Ce(S, s("paddingLeft"), B(!1)), Ce(S, s("paddingRight"), B(!0)), F(!0);
691
+ }
692
+ function F(x) {
693
+ var L = Se(u);
694
+ (x || w.width !== L.width || w.height !== L.height) && (Ce(S, "height", I()), c(s("marginRight"), He(t.gap)), c("width", C()), c("height", N(), !0), w = L, i($t), E !== (E = R()) && (Oe(u, Pr, E), i(zi, E)));
695
+ }
696
+ function B(x) {
697
+ var L = t.padding, _ = s(x ? "right" : "left");
698
+ return L && He(L[_] || (ft(L) ? 0 : L)) || "0px";
699
+ }
700
+ function I() {
701
+ var x = "";
702
+ return p && (x = h(), ct(x, "height or heightRatio is missing."), x = "calc(" + x + " - " + B(!1) + " - " + B(!0) + ")"), x;
703
+ }
704
+ function h() {
705
+ return He(t.height || Se(m).width * t.heightRatio);
706
+ }
707
+ function C() {
708
+ return t.autoWidth ? null : He(t.fixedWidth) || (p ? "" : z());
709
+ }
710
+ function N() {
711
+ return He(t.fixedHeight) || (p ? t.autoHeight ? null : z() : h());
712
+ }
713
+ function z() {
714
+ var x = He(t.gap);
715
+ return "calc((100%" + (x && " + " + x) + ")/" + (t.perPage || 1) + (x && " - " + x) + ")";
716
+ }
717
+ function T() {
718
+ return Se(m)[s("width")];
719
+ }
720
+ function O(x, L) {
721
+ var _ = v(x || 0);
722
+ return _ ? Se(_.slide)[s("width")] + (L ? 0 : $()) : 0;
723
+ }
724
+ function P(x, L) {
725
+ var _ = v(x);
726
+ if (_) {
727
+ var k = Se(_.slide)[s("right")], G = Se(m)[s("left")];
728
+ return _e(k - G) + (L ? 0 : $());
729
+ }
730
+ return 0;
731
+ }
732
+ function H(x) {
733
+ return P(e.length - 1) - P(0) + O(0, x);
734
+ }
735
+ function $() {
736
+ var x = v(0);
737
+ return x && parseFloat(Ce(x.slide, s("marginRight"))) || 0;
738
+ }
739
+ function f(x) {
740
+ return parseFloat(Ce(S, s("padding" + (x ? "Right" : "Left")))) || 0;
741
+ }
742
+ function R() {
743
+ return e.is(xt) || H(!0) > T();
744
+ }
745
+ return {
746
+ mount: g,
747
+ resize: F,
748
+ listSize: T,
749
+ slideSize: O,
750
+ sliderSize: H,
751
+ totalSize: P,
752
+ getPadding: f,
753
+ isOverflow: R
754
+ };
755
+ }
756
+ var oo = 2;
757
+ function ao(e, n, t) {
758
+ var r = se(e), o = r.on, a = n.Elements, i = n.Slides, l = n.Direction.resolve, s = [], d;
759
+ function u() {
760
+ o(de, S), o([ve, rt], v), (d = w()) && (c(d), n.Layout.resize(!0));
761
+ }
762
+ function S() {
763
+ m(), u();
764
+ }
765
+ function m() {
766
+ Ge(s), Be(s), r.destroy();
767
+ }
768
+ function v() {
769
+ var E = w();
770
+ d !== E && (d < E || !E) && r.emit(de);
771
+ }
772
+ function c(E) {
773
+ var g = i.get().slice(), b = g.length;
774
+ if (b) {
775
+ for (; g.length < E; )
776
+ Dt(g, g);
777
+ Dt(g.slice(-E), g.slice(0, E)).forEach(function(F, B) {
778
+ var I = B < E, h = p(F.slide, B);
779
+ I ? vn(h, g[0].slide) : Et(a.list, h), Dt(s, h), i.register(h, B - E + (I ? 0 : b), F.index);
780
+ });
781
+ }
782
+ }
783
+ function p(E, g) {
784
+ var b = E.cloneNode(!0);
785
+ return Le(b, t.classes.clone), b.id = e.root.id + "-clone" + bn(g + 1), b;
786
+ }
787
+ function w() {
788
+ var E = t.clones;
789
+ if (!e.is(st))
790
+ E = 0;
791
+ else if (St(E)) {
792
+ var g = t[l("fixedWidth")] && n.Layout.slideSize(0), b = g && yt(Se(a.track)[l("width")] / g);
793
+ E = b || t[l("autoWidth")] && e.length || t.perPage * oo;
794
+ }
795
+ return E;
796
+ }
797
+ return {
798
+ mount: u,
799
+ destroy: m
800
+ };
801
+ }
802
+ function so(e, n, t) {
803
+ var r = se(e), o = r.on, a = r.emit, i = e.state.set, l = n.Layout, s = l.slideSize, d = l.getPadding, u = l.totalSize, S = l.listSize, m = l.sliderSize, v = n.Direction, c = v.resolve, p = v.orient, w = n.Elements, E = w.list, g = w.track, b;
804
+ function F() {
805
+ b = n.Transition, o([je, $t, ve, de], B);
806
+ }
807
+ function B() {
808
+ n.Controller.isBusy() || (n.Scroll.cancel(), h(e.index), n.Slides.update());
809
+ }
810
+ function I(_, k, G, ne) {
811
+ _ !== k && x(_ > G) && (T(), C(z(H(), _ > G), !0)), i(ot), a(ze, k, G, _), b.start(k, function() {
812
+ i(nt), a(at, k, G, _), ne && ne();
813
+ });
814
+ }
815
+ function h(_) {
816
+ C(P(_, !0));
817
+ }
818
+ function C(_, k) {
819
+ if (!e.is(xt)) {
820
+ var G = k ? _ : N(_);
821
+ Ce(E, "transform", "translate" + c("X") + "(" + G + "px)"), _ !== G && a(Er);
822
+ }
823
+ }
824
+ function N(_) {
825
+ if (e.is(st)) {
826
+ var k = O(_), G = k > n.Controller.getEnd(), ne = k < 0;
827
+ (ne || G) && (_ = z(_, G));
828
+ }
829
+ return _;
830
+ }
831
+ function z(_, k) {
832
+ var G = _ - R(k), ne = m();
833
+ return _ -= p(ne * (yt(_e(G) / ne) || 1)) * (k ? 1 : -1), _;
834
+ }
835
+ function T() {
836
+ C(H(), !0), b.cancel();
837
+ }
838
+ function O(_) {
839
+ for (var k = n.Slides.get(), G = 0, ne = 1 / 0, ee = 0; ee < k.length; ee++) {
840
+ var he = k[ee].index, A = _e(P(he, !0) - _);
841
+ if (A <= ne)
842
+ ne = A, G = he;
843
+ else
844
+ break;
845
+ }
846
+ return G;
847
+ }
848
+ function P(_, k) {
849
+ var G = p(u(_ - 1) - f(_));
850
+ return k ? $(G) : G;
851
+ }
852
+ function H() {
853
+ var _ = c("left");
854
+ return Se(E)[_] - Se(g)[_] + p(d(!1));
855
+ }
856
+ function $(_) {
857
+ return t.trimSpace && e.is(it) && (_ = Je(_, 0, p(m(!0) - S()))), _;
858
+ }
859
+ function f(_) {
860
+ var k = t.focus;
861
+ return k === "center" ? (S() - s(_, !0)) / 2 : +k * s(_) || 0;
862
+ }
863
+ function R(_) {
864
+ return P(_ ? n.Controller.getEnd() : 0, !!t.trimSpace);
865
+ }
866
+ function x(_) {
867
+ var k = p(z(H(), _));
868
+ return _ ? k >= 0 : k <= E[c("scrollWidth")] - Se(g)[c("width")];
869
+ }
870
+ function L(_, k) {
871
+ k = St(k) ? H() : k;
872
+ var G = _ !== !0 && p(k) < p(R(!1)), ne = _ !== !1 && p(k) > p(R(!0));
873
+ return G || ne;
874
+ }
875
+ return {
876
+ mount: F,
877
+ move: I,
878
+ jump: h,
879
+ translate: C,
880
+ shift: z,
881
+ cancel: T,
882
+ toIndex: O,
883
+ toPosition: P,
884
+ getPosition: H,
885
+ getLimit: R,
886
+ exceededLimit: L,
887
+ reposition: B
888
+ };
889
+ }
890
+ function lo(e, n, t) {
891
+ var r = se(e), o = r.on, a = r.emit, i = n.Move, l = i.getPosition, s = i.getLimit, d = i.toPosition, u = n.Slides, S = u.isEnough, m = u.getLength, v = t.omitEnd, c = e.is(st), p = e.is(it), w = re(H, !1), E = re(H, !0), g = t.start || 0, b, F = g, B, I, h;
892
+ function C() {
893
+ N(), o([ve, de, Ft], N), o($t, z);
894
+ }
895
+ function N() {
896
+ B = m(!0), I = t.perMove, h = t.perPage, b = x();
897
+ var A = Je(g, 0, v ? b : B - 1);
898
+ A !== g && (g = A, i.reposition());
899
+ }
900
+ function z() {
901
+ b !== x() && a(Ft);
902
+ }
903
+ function T(A, q, ge) {
904
+ if (!he()) {
905
+ var ie = P(A), fe = R(ie);
906
+ fe > -1 && (q || fe !== g) && (G(fe), i.move(ie, fe, F, ge));
907
+ }
908
+ }
909
+ function O(A, q, ge, ie) {
910
+ n.Scroll.scroll(A, q, ge, function() {
911
+ var fe = R(i.toIndex(l()));
912
+ G(v ? Fe(fe, b) : fe), ie && ie();
913
+ });
914
+ }
915
+ function P(A) {
916
+ var q = g;
917
+ if (Me(A)) {
918
+ var ge = A.match(/([+\-<>])(\d+)?/) || [], ie = ge[1], fe = ge[2];
919
+ ie === "+" || ie === "-" ? q = $(g + +("" + ie + (+fe || 1)), g) : ie === ">" ? q = fe ? L(+fe) : w(!0) : ie === "<" && (q = E(!0));
920
+ } else
921
+ q = c ? A : Je(A, 0, b);
922
+ return q;
923
+ }
924
+ function H(A, q) {
925
+ var ge = I || (ee() ? 1 : h), ie = $(g + ge * (A ? -1 : 1), g, !(I || ee()));
926
+ return ie === -1 && p && !lr(l(), s(!A), 1) ? A ? 0 : b : q ? ie : R(ie);
927
+ }
928
+ function $(A, q, ge) {
929
+ if (S() || ee()) {
930
+ var ie = f(A);
931
+ ie !== A && (q = A, A = ie, ge = !1), A < 0 || A > b ? !I && (Pt(0, A, q, !0) || Pt(b, q, A, !0)) ? A = L(_(A)) : c ? A = ge ? A < 0 ? -(B % h || h) : B : A : t.rewind ? A = A < 0 ? b : 0 : A = -1 : ge && A !== q && (A = L(_(q) + (A < q ? -1 : 1)));
932
+ } else
933
+ A = -1;
934
+ return A;
935
+ }
936
+ function f(A) {
937
+ if (p && t.trimSpace === "move" && A !== g)
938
+ for (var q = l(); q === d(A, !0) && Pt(A, 0, e.length - 1, !t.rewind); )
939
+ A < g ? --A : ++A;
940
+ return A;
941
+ }
942
+ function R(A) {
943
+ return c ? (A + B) % B || 0 : A;
944
+ }
945
+ function x() {
946
+ for (var A = B - (ee() || c && I ? 1 : h); v && A-- > 0; )
947
+ if (d(B - 1, !0) !== d(A, !0)) {
948
+ A++;
949
+ break;
950
+ }
951
+ return Je(A, 0, B - 1);
952
+ }
953
+ function L(A) {
954
+ return Je(ee() ? A : h * A, 0, b);
955
+ }
956
+ function _(A) {
957
+ return ee() ? Fe(A, b) : Mt((A >= b ? B - 1 : A) / h);
958
+ }
959
+ function k(A) {
960
+ var q = i.toIndex(A);
961
+ return p ? Je(q, 0, b) : q;
962
+ }
963
+ function G(A) {
964
+ A !== g && (F = g, g = A);
965
+ }
966
+ function ne(A) {
967
+ return A ? F : g;
968
+ }
969
+ function ee() {
970
+ return !St(t.focus) || t.isNavigation;
971
+ }
972
+ function he() {
973
+ return e.state.is([ot, bt]) && !!t.waitForTransition;
974
+ }
975
+ return {
976
+ mount: C,
977
+ go: T,
978
+ scroll: O,
979
+ getNext: w,
980
+ getPrev: E,
981
+ getAdjacent: H,
982
+ getEnd: x,
983
+ setIndex: G,
984
+ getIndex: ne,
985
+ toIndex: L,
986
+ toPage: _,
987
+ toDest: k,
988
+ hasFocus: ee,
989
+ isBusy: he
990
+ };
991
+ }
992
+ var co = "http://www.w3.org/2000/svg", uo = "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", Nt = 40;
993
+ function po(e, n, t) {
994
+ var r = se(e), o = r.on, a = r.bind, i = r.emit, l = t.classes, s = t.i18n, d = n.Elements, u = n.Controller, S = d.arrows, m = d.track, v = S, c = d.prev, p = d.next, w, E, g = {};
995
+ function b() {
996
+ B(), o(ve, F);
997
+ }
998
+ function F() {
999
+ I(), b();
1000
+ }
1001
+ function B() {
1002
+ var O = t.arrows;
1003
+ O && !(c && p) && N(), c && p && (ht(g, {
1004
+ prev: c,
1005
+ next: p
1006
+ }), vt(v, O ? "" : "none"), Le(v, E = Rn + "--" + t.direction), O && (h(), T(), K([c, p], It, m.id), i(vr, c, p)));
1007
+ }
1008
+ function I() {
1009
+ r.destroy(), De(v, E), w ? (Ge(S ? [c, p] : v), c = p = null) : Te([c, p], Tn);
1010
+ }
1011
+ function h() {
1012
+ o([je, at, de, Ke, Ft], T), a(p, "click", re(C, ">")), a(c, "click", re(C, "<"));
1013
+ }
1014
+ function C(O) {
1015
+ u.go(O, !0);
1016
+ }
1017
+ function N() {
1018
+ v = S || et("div", l.arrows), c = z(!0), p = z(!1), w = !0, Et(v, [c, p]), !S && vn(v, m);
1019
+ }
1020
+ function z(O) {
1021
+ var P = '<button class="' + l.arrow + " " + (O ? l.prev : l.next) + '" type="button"><svg xmlns="' + co + '" viewBox="0 0 ' + Nt + " " + Nt + '" width="' + Nt + '" height="' + Nt + '" focusable="false"><path d="' + (t.arrowPath || uo) + '" />';
1022
+ return ar(P);
1023
+ }
1024
+ function T() {
1025
+ if (c && p) {
1026
+ var O = e.index, P = u.getPrev(), H = u.getNext(), $ = P > -1 && O < P ? s.last : s.prev, f = H > -1 && O > H ? s.first : s.next;
1027
+ c.disabled = P < 0, p.disabled = H < 0, K(c, we, $), K(p, we, f), i(yr, c, p, P, H);
1028
+ }
1029
+ }
1030
+ return {
1031
+ arrows: g,
1032
+ mount: b,
1033
+ destroy: I,
1034
+ update: T
1035
+ };
1036
+ }
1037
+ var fo = _n + "-interval";
1038
+ function go(e, n, t) {
1039
+ var r = se(e), o = r.on, a = r.bind, i = r.emit, l = Ut(t.interval, e.go.bind(e, ">"), h), s = l.isPaused, d = n.Elements, u = n.Elements, S = u.root, m = u.toggle, v = t.autoplay, c, p, w = v === "pause";
1040
+ function E() {
1041
+ v && (g(), m && K(m, It, d.track.id), w || b(), I());
1042
+ }
1043
+ function g() {
1044
+ t.pauseOnHover && a(S, "mouseenter mouseleave", function(N) {
1045
+ c = N.type === "mouseenter", B();
1046
+ }), t.pauseOnFocus && a(S, "focusin focusout", function(N) {
1047
+ p = N.type === "focusin", B();
1048
+ }), m && a(m, "click", function() {
1049
+ w ? b() : F(!0);
1050
+ }), o([ze, Ht, de], l.rewind), o(ze, C);
1051
+ }
1052
+ function b() {
1053
+ s() && n.Slides.isEnough() && (l.start(!t.resetProgress), p = c = w = !1, I(), i(Cn));
1054
+ }
1055
+ function F(N) {
1056
+ N === void 0 && (N = !0), w = !!N, I(), s() || (l.pause(), i(An));
1057
+ }
1058
+ function B() {
1059
+ w || (c || p ? F(!1) : b());
1060
+ }
1061
+ function I() {
1062
+ m && (Oe(m, Xe, !w), K(m, we, t.i18n[w ? "play" : "pause"]));
1063
+ }
1064
+ function h(N) {
1065
+ var z = d.bar;
1066
+ z && Ce(z, "width", N * 100 + "%"), i(Sr, N);
1067
+ }
1068
+ function C(N) {
1069
+ var z = n.Slides.getAt(N);
1070
+ l.set(z && +Ie(z.slide, fo) || t.interval);
1071
+ }
1072
+ return {
1073
+ mount: E,
1074
+ destroy: l.cancel,
1075
+ play: b,
1076
+ pause: F,
1077
+ isPaused: s
1078
+ };
1079
+ }
1080
+ function mo(e, n, t) {
1081
+ var r = se(e), o = r.on;
1082
+ function a() {
1083
+ t.cover && (o(In, re(l, !0)), o([je, ve, de], re(i, !0)));
1084
+ }
1085
+ function i(s) {
1086
+ n.Slides.forEach(function(d) {
1087
+ var u = Ct(d.container || d.slide, "img");
1088
+ u && u.src && l(s, u, d);
1089
+ });
1090
+ }
1091
+ function l(s, d, u) {
1092
+ u.style("background", s ? 'center/cover no-repeat url("' + d.src + '")' : "", !0), vt(d, s ? "none" : "");
1093
+ }
1094
+ return {
1095
+ mount: a,
1096
+ destroy: re(i, !1)
1097
+ };
1098
+ }
1099
+ var ho = 10, vo = 600, yo = 0.6, _o = 1.5, bo = 800;
1100
+ function So(e, n, t) {
1101
+ var r = se(e), o = r.on, a = r.emit, i = e.state.set, l = n.Move, s = l.getPosition, d = l.getLimit, u = l.exceededLimit, S = l.translate, m = e.is(it), v, c, p = 1;
1102
+ function w() {
1103
+ o(ze, F), o([ve, de], B);
1104
+ }
1105
+ function E(h, C, N, z, T) {
1106
+ var O = s();
1107
+ if (F(), N && (!m || !u())) {
1108
+ var P = n.Layout.sliderSize(), H = sn(h) * P * Mt(_e(h) / P) || 0;
1109
+ h = l.toPosition(n.Controller.toDest(h % P)) + H;
1110
+ }
1111
+ var $ = lr(O, h, 1);
1112
+ p = 1, C = $ ? 0 : C || Wt(_e(h - O) / _o, bo), c = z, v = Ut(C, g, re(b, O, h, T), 1), i(bt), a(Ht), v.start();
1113
+ }
1114
+ function g() {
1115
+ i(nt), c && c(), a(Ke);
1116
+ }
1117
+ function b(h, C, N, z) {
1118
+ var T = s(), O = h + (C - h) * I(z), P = (O - T) * p;
1119
+ S(T + P), m && !N && u() && (p *= yo, _e(P) < ho && E(d(u(!0)), vo, !1, c, !0));
1120
+ }
1121
+ function F() {
1122
+ v && v.cancel();
1123
+ }
1124
+ function B() {
1125
+ v && !v.isPaused() && (F(), g());
1126
+ }
1127
+ function I(h) {
1128
+ var C = t.easingFunc;
1129
+ return C ? C(h) : 1 - Math.pow(1 - h, 4);
1130
+ }
1131
+ return {
1132
+ mount: w,
1133
+ destroy: F,
1134
+ scroll: E,
1135
+ cancel: B
1136
+ };
1137
+ }
1138
+ var Ze = {
1139
+ passive: !1,
1140
+ capture: !0
97
1141
  };
98
- const RichTextRenderer = ({ content }) => {
99
- const getChildren = (children) => {
100
- return children.map((child, i) => {
101
- if (child.type === "link") {
102
- return /* @__PURE__ */ jsx("a", { className: styles$2.link, href: child.value, target: child.target, children: getChildren(child.children) }, i);
103
- }
104
- return /* @__PURE__ */ jsx("span", { style: getLeafCss(child), children: child.text }, i);
1142
+ function wo(e, n, t) {
1143
+ var r = se(e), o = r.on, a = r.emit, i = r.bind, l = r.unbind, s = e.state, d = n.Move, u = n.Scroll, S = n.Controller, m = n.Elements.track, v = n.Media.reduce, c = n.Direction, p = c.resolve, w = c.orient, E = d.getPosition, g = d.exceededLimit, b, F, B, I, h, C = !1, N, z, T;
1144
+ function O() {
1145
+ i(m, tn, on, Ze), i(m, nn, on, Ze), i(m, Br, H, Ze), i(m, "click", R, {
1146
+ capture: !0
1147
+ }), i(m, "dragstart", ke), o([je, ve], P);
1148
+ }
1149
+ function P() {
1150
+ var W = t.drag;
1151
+ Lt(!W), I = W === "free";
1152
+ }
1153
+ function H(W) {
1154
+ if (N = !1, !z) {
1155
+ var y = fe(W);
1156
+ ie(W.target) && (y || !W.button) && (S.isBusy() ? ke(W, !0) : (T = y ? m : window, h = s.is([ot, bt]), B = null, i(T, tn, $, Ze), i(T, nn, f, Ze), d.cancel(), u.cancel(), x(W)));
1157
+ }
1158
+ }
1159
+ function $(W) {
1160
+ if (s.is(Ot) || (s.set(Ot), a(gr)), W.cancelable)
1161
+ if (h) {
1162
+ d.translate(b + ge(ee(W)));
1163
+ var y = he(W) > Un, V = C !== (C = g());
1164
+ (y || V) && x(W), N = !0, a(mr), ke(W);
1165
+ } else k(W) && (h = _(W), ke(W));
1166
+ }
1167
+ function f(W) {
1168
+ s.is(Ot) && (s.set(nt), a(hr)), h && (L(W), ke(W)), l(T, tn, $), l(T, nn, f), h = !1;
1169
+ }
1170
+ function R(W) {
1171
+ !z && N && ke(W, !0);
1172
+ }
1173
+ function x(W) {
1174
+ B = F, F = W, b = E();
1175
+ }
1176
+ function L(W) {
1177
+ var y = G(W), V = ne(y), Y = t.rewind && t.rewindByDrag;
1178
+ v(!1), I ? S.scroll(V, 0, t.snap) : e.is(xt) ? S.go(w(sn(y)) < 0 ? Y ? "<" : "-" : Y ? ">" : "+") : e.is(it) && C && Y ? S.go(g(!0) ? ">" : "<") : S.go(S.toDest(V), !0), v(!0);
1179
+ }
1180
+ function _(W) {
1181
+ var y = t.dragMinThreshold, V = ft(y), Y = V && y.mouse || 0, J = (V ? y.touch : +y) || 10;
1182
+ return _e(ee(W)) > (fe(W) ? J : Y);
1183
+ }
1184
+ function k(W) {
1185
+ return _e(ee(W)) > _e(ee(W, !0));
1186
+ }
1187
+ function G(W) {
1188
+ if (e.is(st) || !C) {
1189
+ var y = he(W);
1190
+ if (y && y < Un)
1191
+ return ee(W) / y;
1192
+ }
1193
+ return 0;
1194
+ }
1195
+ function ne(W) {
1196
+ return E() + sn(W) * Fe(_e(W) * (t.flickPower || 600), I ? 1 / 0 : n.Layout.listSize() * (t.flickMaxPages || 1));
1197
+ }
1198
+ function ee(W, y) {
1199
+ return q(W, y) - q(A(W), y);
1200
+ }
1201
+ function he(W) {
1202
+ return an(W) - an(A(W));
1203
+ }
1204
+ function A(W) {
1205
+ return F === W && B || F;
1206
+ }
1207
+ function q(W, y) {
1208
+ return (fe(W) ? W.changedTouches[0] : W)["page" + p(y ? "Y" : "X")];
1209
+ }
1210
+ function ge(W) {
1211
+ return W / (C && e.is(it) ? eo : 1);
1212
+ }
1213
+ function ie(W) {
1214
+ var y = t.noDrag;
1215
+ return !gt(W, "." + Nr + ", ." + Jt) && (!y || !gt(W, y));
1216
+ }
1217
+ function fe(W) {
1218
+ return typeof TouchEvent < "u" && W instanceof TouchEvent;
1219
+ }
1220
+ function lt() {
1221
+ return h;
1222
+ }
1223
+ function Lt(W) {
1224
+ z = W;
1225
+ }
1226
+ return {
1227
+ mount: O,
1228
+ disable: Lt,
1229
+ isDragging: lt
1230
+ };
1231
+ }
1232
+ var Eo = {
1233
+ Spacebar: " ",
1234
+ Right: Xt,
1235
+ Left: Gt,
1236
+ Up: Cr,
1237
+ Down: Ar
1238
+ };
1239
+ function Nn(e) {
1240
+ return e = Me(e) ? e : e.key, Eo[e] || e;
1241
+ }
1242
+ var Yn = "keydown";
1243
+ function Co(e, n, t) {
1244
+ var r = se(e), o = r.on, a = r.bind, i = r.unbind, l = e.root, s = n.Direction.resolve, d, u;
1245
+ function S() {
1246
+ m(), o(ve, v), o(ve, m), o(ze, p);
1247
+ }
1248
+ function m() {
1249
+ var E = t.keyboard;
1250
+ E && (d = E === "global" ? window : l, a(d, Yn, w));
1251
+ }
1252
+ function v() {
1253
+ i(d, Yn);
1254
+ }
1255
+ function c(E) {
1256
+ u = E;
1257
+ }
1258
+ function p() {
1259
+ var E = u;
1260
+ u = !0, tr(function() {
1261
+ u = E;
1262
+ });
1263
+ }
1264
+ function w(E) {
1265
+ if (!u) {
1266
+ var g = Nn(E);
1267
+ g === s(Gt) ? e.go("<") : g === s(Xt) && e.go(">");
1268
+ }
1269
+ }
1270
+ return {
1271
+ mount: S,
1272
+ destroy: v,
1273
+ disable: c
1274
+ };
1275
+ }
1276
+ var ut = _n + "-lazy", Bt = ut + "-srcset", Ao = "[" + ut + "], [" + Bt + "]";
1277
+ function Io(e, n, t) {
1278
+ var r = se(e), o = r.on, a = r.off, i = r.bind, l = r.emit, s = t.lazyLoad === "sequential", d = [at, Ke], u = [];
1279
+ function S() {
1280
+ t.lazyLoad && (m(), o(de, m));
1281
+ }
1282
+ function m() {
1283
+ Be(u), v(), s ? E() : (a(d), o(d, c), c());
1284
+ }
1285
+ function v() {
1286
+ n.Slides.forEach(function(g) {
1287
+ yn(g.slide, Ao).forEach(function(b) {
1288
+ var F = Ie(b, ut), B = Ie(b, Bt);
1289
+ if (F !== b.src || B !== b.srcset) {
1290
+ var I = t.classes.spinner, h = b.parentElement, C = Ct(h, "." + I) || et("span", I, h);
1291
+ u.push([b, g, C]), b.src || vt(b, "none");
1292
+ }
1293
+ });
1294
+ });
1295
+ }
1296
+ function c() {
1297
+ u = u.filter(function(g) {
1298
+ var b = t.perPage * ((t.preloadPages || 1) + 1) - 1;
1299
+ return g[1].isWithin(e.index, b) ? p(g) : !0;
1300
+ }), u.length || a(d);
1301
+ }
1302
+ function p(g) {
1303
+ var b = g[0];
1304
+ Le(g[1].slide, dn), i(b, "load error", re(w, g)), K(b, "src", Ie(b, ut)), K(b, "srcset", Ie(b, Bt)), Te(b, ut), Te(b, Bt);
1305
+ }
1306
+ function w(g, b) {
1307
+ var F = g[0], B = g[1];
1308
+ De(B.slide, dn), b.type !== "error" && (Ge(g[2]), vt(F, ""), l(In, F, B), l(rt)), s && E();
1309
+ }
1310
+ function E() {
1311
+ u.length && p(u.shift());
1312
+ }
1313
+ return {
1314
+ mount: S,
1315
+ destroy: re(Be, u),
1316
+ check: c
1317
+ };
1318
+ }
1319
+ function xo(e, n, t) {
1320
+ var r = se(e), o = r.on, a = r.emit, i = r.bind, l = n.Slides, s = n.Elements, d = n.Controller, u = d.hasFocus, S = d.getIndex, m = d.go, v = n.Direction.resolve, c = s.pagination, p = [], w, E;
1321
+ function g() {
1322
+ b(), o([ve, de, Ft], g);
1323
+ var z = t.pagination;
1324
+ c && vt(c, z ? "" : "none"), z && (o([ze, Ht, Ke], N), F(), N(), a(_r, {
1325
+ list: w,
1326
+ items: p
1327
+ }, C(e.index)));
1328
+ }
1329
+ function b() {
1330
+ w && (Ge(c ? Ve(w.children) : w), De(w, E), Be(p), w = null), r.destroy();
1331
+ }
1332
+ function F() {
1333
+ var z = e.length, T = t.classes, O = t.i18n, P = t.perPage, H = u() ? d.getEnd() + 1 : yt(z / P);
1334
+ w = c || et("ul", T.pagination, s.track.parentElement), Le(w, E = Zt + "--" + h()), K(w, Pe, "tablist"), K(w, we, O.select), K(w, Ln, h() === Kt ? "vertical" : "");
1335
+ for (var $ = 0; $ < H; $++) {
1336
+ var f = et("li", null, w), R = et("button", {
1337
+ class: T.page,
1338
+ type: "button"
1339
+ }, f), x = l.getIn($).map(function(_) {
1340
+ return _.slide.id;
1341
+ }), L = !u() && P > 1 ? O.pageX : O.slideX;
1342
+ i(R, "click", re(B, $)), t.paginationKeyboard && i(R, "keydown", re(I, $)), K(f, Pe, "presentation"), K(R, Pe, "tab"), K(R, It, x.join(" ")), K(R, we, ln(L, $ + 1)), K(R, tt, -1), p.push({
1343
+ li: f,
1344
+ button: R,
1345
+ page: $
1346
+ });
1347
+ }
1348
+ }
1349
+ function B(z) {
1350
+ m(">" + z, !0);
1351
+ }
1352
+ function I(z, T) {
1353
+ var O = p.length, P = Nn(T), H = h(), $ = -1;
1354
+ P === v(Xt, !1, H) ? $ = ++z % O : P === v(Gt, !1, H) ? $ = (--z + O) % O : P === "Home" ? $ = 0 : P === "End" && ($ = O - 1);
1355
+ var f = p[$];
1356
+ f && (or(f.button), m(">" + $), ke(T, !0));
1357
+ }
1358
+ function h() {
1359
+ return t.paginationDirection || t.direction;
1360
+ }
1361
+ function C(z) {
1362
+ return p[d.toPage(z)];
1363
+ }
1364
+ function N() {
1365
+ var z = C(S(!0)), T = C(S());
1366
+ if (z) {
1367
+ var O = z.button;
1368
+ De(O, Xe), Te(O, Fn), K(O, tt, -1);
1369
+ }
1370
+ if (T) {
1371
+ var P = T.button;
1372
+ Le(P, Xe), K(P, Fn, !0), K(P, tt, "");
1373
+ }
1374
+ a(br, {
1375
+ list: w,
1376
+ items: p
1377
+ }, z, T);
1378
+ }
1379
+ return {
1380
+ items: p,
1381
+ mount: g,
1382
+ destroy: b,
1383
+ getAt: C,
1384
+ update: N
1385
+ };
1386
+ }
1387
+ var Lo = [" ", "Enter"];
1388
+ function To(e, n, t) {
1389
+ var r = t.isNavigation, o = t.slideFocus, a = [];
1390
+ function i() {
1391
+ e.splides.forEach(function(c) {
1392
+ c.isParent || (d(e, c.splide), d(c.splide, e));
1393
+ }), r && u();
1394
+ }
1395
+ function l() {
1396
+ a.forEach(function(c) {
1397
+ c.destroy();
1398
+ }), Be(a);
1399
+ }
1400
+ function s() {
1401
+ l(), i();
1402
+ }
1403
+ function d(c, p) {
1404
+ var w = se(c);
1405
+ w.on(ze, function(E, g, b) {
1406
+ p.go(p.is(st) ? b : E);
1407
+ }), a.push(w);
1408
+ }
1409
+ function u() {
1410
+ var c = se(e), p = c.on;
1411
+ p(Sn, m), p(wr, v), p([je, ve], S), a.push(c), c.emit(En, e.splides);
1412
+ }
1413
+ function S() {
1414
+ K(n.Elements.list, Ln, t.direction === Kt ? "vertical" : "");
1415
+ }
1416
+ function m(c) {
1417
+ e.go(c.index);
1418
+ }
1419
+ function v(c, p) {
1420
+ hn(Lo, Nn(p)) && (m(c), ke(p));
1421
+ }
1422
+ return {
1423
+ setup: re(n.Media.set, {
1424
+ slideFocus: St(o) ? r : o
1425
+ }, !0),
1426
+ mount: i,
1427
+ destroy: l,
1428
+ remount: s
1429
+ };
1430
+ }
1431
+ function Ro(e, n, t) {
1432
+ var r = se(e), o = r.bind, a = 0;
1433
+ function i() {
1434
+ t.wheel && o(n.Elements.track, "wheel", l, Ze);
1435
+ }
1436
+ function l(d) {
1437
+ if (d.cancelable) {
1438
+ var u = d.deltaY, S = u < 0, m = an(d), v = t.wheelMinThreshold || 0, c = t.wheelSleep || 0;
1439
+ _e(u) > v && m - a > c && (e.go(S ? "<" : ">"), a = m), s(S) && ke(d);
1440
+ }
1441
+ }
1442
+ function s(d) {
1443
+ return !t.releaseWheel || e.state.is(ot) || n.Controller.getAdjacent(d) !== -1;
1444
+ }
1445
+ return {
1446
+ mount: i
1447
+ };
1448
+ }
1449
+ var No = 90;
1450
+ function ko(e, n, t) {
1451
+ var r = se(e), o = r.on, a = n.Elements.track, i = t.live && !t.isNavigation, l = et("span", Ki), s = Ut(No, re(u, !1));
1452
+ function d() {
1453
+ i && (m(!n.Autoplay.isPaused()), K(a, $n, !0), l.textContent = "…", o(Cn, re(m, !0)), o(An, re(m, !1)), o([at, Ke], re(u, !0)));
1454
+ }
1455
+ function u(v) {
1456
+ K(a, jn, v), v ? (Et(a, l), s.start()) : (Ge(l), s.cancel());
1457
+ }
1458
+ function S() {
1459
+ Te(a, [Vn, $n, jn]), Ge(l);
1460
+ }
1461
+ function m(v) {
1462
+ i && K(a, Vn, v ? "off" : "polite");
1463
+ }
1464
+ return {
1465
+ mount: d,
1466
+ disable: m,
1467
+ destroy: S
1468
+ };
1469
+ }
1470
+ var Oo = /* @__PURE__ */ Object.freeze({
1471
+ __proto__: null,
1472
+ Media: Fi,
1473
+ Direction: Vi,
1474
+ Elements: to,
1475
+ Slides: ro,
1476
+ Layout: io,
1477
+ Clones: ao,
1478
+ Move: so,
1479
+ Controller: lo,
1480
+ Arrows: po,
1481
+ Autoplay: go,
1482
+ Cover: mo,
1483
+ Scroll: So,
1484
+ Drag: wo,
1485
+ Keyboard: Co,
1486
+ LazyLoad: Io,
1487
+ Pagination: xo,
1488
+ Sync: To,
1489
+ Wheel: Ro,
1490
+ Live: ko
1491
+ }), Do = {
1492
+ prev: "Previous slide",
1493
+ next: "Next slide",
1494
+ first: "Go to first slide",
1495
+ last: "Go to last slide",
1496
+ slideX: "Go to slide %s",
1497
+ pageX: "Go to page %s",
1498
+ play: "Start autoplay",
1499
+ pause: "Pause autoplay",
1500
+ carousel: "carousel",
1501
+ slide: "slide",
1502
+ select: "Select a slide to show",
1503
+ slideLabel: "%s of %s"
1504
+ }, Po = {
1505
+ type: "slide",
1506
+ role: "region",
1507
+ speed: 400,
1508
+ perPage: 1,
1509
+ cloneStatus: !0,
1510
+ arrows: !0,
1511
+ pagination: !0,
1512
+ paginationKeyboard: !0,
1513
+ interval: 5e3,
1514
+ pauseOnHover: !0,
1515
+ pauseOnFocus: !0,
1516
+ resetProgress: !0,
1517
+ easing: "cubic-bezier(0.25, 1, 0.5, 1)",
1518
+ drag: !0,
1519
+ direction: "ltr",
1520
+ trimSpace: !0,
1521
+ focusableNodes: "a, button, textarea, input, select, iframe",
1522
+ live: !0,
1523
+ classes: Zi,
1524
+ i18n: Do,
1525
+ reducedMotion: {
1526
+ speed: 0,
1527
+ rewindSpeed: 0,
1528
+ autoplay: "pause"
1529
+ }
1530
+ };
1531
+ function Bo(e, n, t) {
1532
+ var r = n.Slides;
1533
+ function o() {
1534
+ se(e).on([je, de], a);
1535
+ }
1536
+ function a() {
1537
+ r.forEach(function(l) {
1538
+ l.style("transform", "translateX(-" + 100 * l.index + "%)");
105
1539
  });
1540
+ }
1541
+ function i(l, s) {
1542
+ r.style("transition", "opacity " + t.speed + "ms " + t.easing), tr(s);
1543
+ }
1544
+ return {
1545
+ mount: o,
1546
+ start: i,
1547
+ cancel: on
1548
+ };
1549
+ }
1550
+ function zo(e, n, t) {
1551
+ var r = n.Move, o = n.Controller, a = n.Scroll, i = n.Elements.list, l = re(Ce, i, "transition"), s;
1552
+ function d() {
1553
+ se(e).bind(i, "transitionend", function(v) {
1554
+ v.target === i && s && (S(), s());
1555
+ });
1556
+ }
1557
+ function u(v, c) {
1558
+ var p = r.toPosition(v, !0), w = r.getPosition(), E = m(v);
1559
+ _e(p - w) >= 1 && E >= 1 ? t.useScroll ? a.scroll(p, E, !1, c) : (l("transform " + E + "ms " + t.easing), r.translate(p, !0), s = c) : (r.jump(v), c());
1560
+ }
1561
+ function S() {
1562
+ l(""), a.cancel();
1563
+ }
1564
+ function m(v) {
1565
+ var c = t.rewindSpeed;
1566
+ if (e.is(it) && c) {
1567
+ var p = o.getIndex(!0), w = o.getEnd();
1568
+ if (p === 0 && v >= w || p >= w && v === 0)
1569
+ return c;
1570
+ }
1571
+ return t.speed;
1572
+ }
1573
+ return {
1574
+ mount: d,
1575
+ start: u,
1576
+ cancel: S
106
1577
  };
107
- return /* @__PURE__ */ jsx(Fragment, { children: content.map((block, i) => {
108
- const children = block.children;
109
- return /* @__PURE__ */ jsx("div", { children: getChildren(children) }, i);
1578
+ }
1579
+ var Wo = /* @__PURE__ */ (function() {
1580
+ function e(t, r) {
1581
+ this.event = se(), this.Components = {}, this.state = Wi(Qe), this.splides = [], this._o = {}, this._E = {};
1582
+ var o = Me(t) ? sr(document, t) : t;
1583
+ ct(o, o + " is invalid."), this.root = o, r = We({
1584
+ label: Ie(o, we) || "",
1585
+ labelledby: Ie(o, xn) || ""
1586
+ }, Po, e.defaults, r || {});
1587
+ try {
1588
+ We(r, JSON.parse(Ie(o, _n)));
1589
+ } catch {
1590
+ ct(!1, "Invalid JSON");
1591
+ }
1592
+ this._o = Object.create(We({}, r));
1593
+ }
1594
+ var n = e.prototype;
1595
+ return n.mount = function(r, o) {
1596
+ var a = this, i = this.state, l = this.Components;
1597
+ ct(i.is([Qe, zt]), "Already mounted!"), i.set(Qe), this._C = l, this._T = o || this._T || (this.is(xt) ? Bo : zo), this._E = r || this._E;
1598
+ var s = ht({}, Oo, this._E, {
1599
+ Transition: this._T
1600
+ });
1601
+ return Ye(s, function(d, u) {
1602
+ var S = d(a, l, a._o);
1603
+ l[u] = S, S.setup && S.setup();
1604
+ }), Ye(l, function(d) {
1605
+ d.mount && d.mount();
1606
+ }), this.emit(je), Le(this.root, qi), i.set(nt), this.emit(cn), this;
1607
+ }, n.sync = function(r) {
1608
+ return this.splides.push({
1609
+ splide: r
1610
+ }), r.splides.push({
1611
+ splide: this,
1612
+ isParent: !0
1613
+ }), this.state.is(nt) && (this._C.Sync.remount(), r.Components.Sync.remount()), this;
1614
+ }, n.go = function(r) {
1615
+ return this._C.Controller.go(r), this;
1616
+ }, n.on = function(r, o) {
1617
+ return this.event.on(r, o), this;
1618
+ }, n.off = function(r) {
1619
+ return this.event.off(r), this;
1620
+ }, n.emit = function(r) {
1621
+ var o;
1622
+ return (o = this.event).emit.apply(o, [r].concat(Ve(arguments, 1))), this;
1623
+ }, n.add = function(r, o) {
1624
+ return this._C.Slides.add(r, o), this;
1625
+ }, n.remove = function(r) {
1626
+ return this._C.Slides.remove(r), this;
1627
+ }, n.is = function(r) {
1628
+ return this._o.type === r;
1629
+ }, n.refresh = function() {
1630
+ return this.emit(de), this;
1631
+ }, n.destroy = function(r) {
1632
+ r === void 0 && (r = !0);
1633
+ var o = this.event, a = this.state;
1634
+ return a.is(Qe) ? se(this).on(cn, this.destroy.bind(this, r)) : (Ye(this._C, function(i) {
1635
+ i.destroy && i.destroy(r);
1636
+ }, !0), o.emit(wn), o.destroy(), r && Be(this.splides), a.set(zt)), this;
1637
+ }, Oi(e, [{
1638
+ key: "options",
1639
+ get: function() {
1640
+ return this._o;
1641
+ },
1642
+ set: function(r) {
1643
+ this._C.Media.set(r, !0, !0);
1644
+ }
1645
+ }, {
1646
+ key: "length",
1647
+ get: function() {
1648
+ return this._C.Slides.getLength(!0);
1649
+ }
1650
+ }, {
1651
+ key: "index",
1652
+ get: function() {
1653
+ return this._C.Controller.getIndex();
1654
+ }
1655
+ }]), e;
1656
+ })(), kn = Wo;
1657
+ kn.defaults = {};
1658
+ kn.STATES = Pi;
1659
+ var Gn = [
1660
+ [je, "onMounted"],
1661
+ [cn, "onReady"],
1662
+ [ze, "onMove"],
1663
+ [at, "onMoved"],
1664
+ [Sn, "onClick"],
1665
+ [ur, "onActive"],
1666
+ [dr, "onInactive"],
1667
+ [pr, "onVisible"],
1668
+ [fr, "onHidden"],
1669
+ [de, "onRefresh"],
1670
+ [ve, "onUpdated"],
1671
+ [rt, "onResize"],
1672
+ [$t, "onResized"],
1673
+ [gr, "onDrag"],
1674
+ [mr, "onDragging"],
1675
+ [hr, "onDragged"],
1676
+ [Ht, "onScroll"],
1677
+ [Ke, "onScrolled"],
1678
+ [wn, "onDestroy"],
1679
+ [vr, "onArrowsMounted"],
1680
+ [yr, "onArrowsUpdated"],
1681
+ [_r, "onPaginationMounted"],
1682
+ [br, "onPaginationUpdated"],
1683
+ [En, "onNavigationMounted"],
1684
+ [Cn, "onAutoplayPlay"],
1685
+ [Sr, "onAutoplayPlaying"],
1686
+ [An, "onAutoplayPause"],
1687
+ [In, "onLazyLoadLoaded"]
1688
+ ];
1689
+ function On(...e) {
1690
+ return e.filter(Boolean).join(" ");
1691
+ }
1692
+ function Vt(e) {
1693
+ return e !== null && typeof e == "object";
1694
+ }
1695
+ function pn(e, n) {
1696
+ if (Array.isArray(e) && Array.isArray(n))
1697
+ return e.length === n.length && !e.some((t, r) => !pn(t, n[r]));
1698
+ if (Vt(e) && Vt(n)) {
1699
+ const t = Object.keys(e), r = Object.keys(n);
1700
+ return t.length === r.length && !t.some((o) => !Object.prototype.hasOwnProperty.call(n, o) || !pn(e[o], n[o]));
1701
+ }
1702
+ return e === n;
1703
+ }
1704
+ function Mo(e, n) {
1705
+ return e.length === n.length && !e.some((t, r) => t !== n[r]);
1706
+ }
1707
+ function Fo(e, n) {
1708
+ if (e) {
1709
+ const t = Object.keys(e);
1710
+ for (let r = 0; r < t.length; r++) {
1711
+ const o = t[r];
1712
+ if (o !== "__proto__" && n(e[o], o) === !1)
1713
+ break;
1714
+ }
1715
+ }
1716
+ return e;
1717
+ }
1718
+ function fn(e, n) {
1719
+ const t = e;
1720
+ return Fo(n, (r, o) => {
1721
+ Array.isArray(r) ? t[o] = r.slice() : Vt(r) ? t[o] = fn(Vt(t[o]) ? t[o] : {}, r) : t[o] = r;
1722
+ }), t;
1723
+ }
1724
+ var Vo = ({ children: e, className: n, ...t }) => /* @__PURE__ */ Ue.createElement("div", {
1725
+ className: On("splide__track", n),
1726
+ ...t
1727
+ }, /* @__PURE__ */ Ue.createElement("ul", {
1728
+ className: "splide__list"
1729
+ }, e)), zr = class extends Ue.Component {
1730
+ constructor() {
1731
+ super(...arguments), this.splideRef = Ue.createRef(), this.slides = [];
1732
+ }
1733
+ componentDidMount() {
1734
+ const { options: e, extensions: n, transition: t } = this.props, { current: r } = this.splideRef;
1735
+ r && (this.splide = new kn(r, e), this.bind(this.splide), this.splide.mount(n, t), this.options = fn({}, e || {}), this.slides = this.getSlides());
1736
+ }
1737
+ componentWillUnmount() {
1738
+ this.splide && (this.splide.destroy(), this.splide = void 0), this.options = void 0, this.slides.length = 0;
1739
+ }
1740
+ componentDidUpdate() {
1741
+ if (!this.splide)
1742
+ return;
1743
+ const { options: e } = this.props;
1744
+ e && !pn(this.options, e) && (this.splide.options = e, this.options = fn({}, e));
1745
+ const n = this.getSlides();
1746
+ Mo(this.slides, n) || (this.splide.refresh(), this.slides = n);
1747
+ }
1748
+ sync(e) {
1749
+ var n;
1750
+ (n = this.splide) == null || n.sync(e);
1751
+ }
1752
+ go(e) {
1753
+ var n;
1754
+ (n = this.splide) == null || n.go(e);
1755
+ }
1756
+ getSlides() {
1757
+ var e;
1758
+ if (this.splide) {
1759
+ const n = (e = this.splide.Components.Elements) == null ? void 0 : e.list.children;
1760
+ return n && Array.prototype.slice.call(n) || [];
1761
+ }
1762
+ return [];
1763
+ }
1764
+ bind(e) {
1765
+ Gn.forEach(([n, t]) => {
1766
+ const r = this.props[t];
1767
+ typeof r == "function" && e.on(n, (...o) => {
1768
+ r(e, ...o);
1769
+ });
1770
+ });
1771
+ }
1772
+ omit(e, n) {
1773
+ return n.forEach((t) => {
1774
+ Object.prototype.hasOwnProperty.call(e, t) && delete e[t];
1775
+ }), e;
1776
+ }
1777
+ render() {
1778
+ const { className: e, tag: n = "div", hasTrack: t = !0, children: r, ...o } = this.props;
1779
+ return /* @__PURE__ */ Ue.createElement(n, {
1780
+ className: On("splide", e),
1781
+ ref: this.splideRef,
1782
+ ...this.omit(o, ["options", ...Gn.map((a) => a[1])])
1783
+ }, t ? /* @__PURE__ */ Ue.createElement(Vo, null, r) : r);
1784
+ }
1785
+ }, Wr = ({ children: e, className: n, ...t }) => /* @__PURE__ */ Ue.createElement("li", {
1786
+ className: On("splide__slide", n),
1787
+ ...t
1788
+ }, e);
1789
+ /*!
1790
+ * Splide.js
1791
+ * Version : 4.1.3
1792
+ * License : MIT
1793
+ * Copyright: 2022 Naotoshi Fujita
1794
+ */
1795
+ const jo = "RichTextRenderer-module__link___BWeZ2", $o = {
1796
+ link: jo
1797
+ }, Mr = ({ content: e }) => {
1798
+ const n = (t) => t.map((r, o) => r.type === "link" ? /* @__PURE__ */ M("a", { className: $o.link, href: r.value, target: r.target, children: n(r.children) }, o) : /* @__PURE__ */ M("span", { style: Ho(r), children: r.text }, o));
1799
+ return /* @__PURE__ */ M(pt, { children: e.map((t, r) => {
1800
+ const o = t.children;
1801
+ return /* @__PURE__ */ M("div", { children: n(o) }, r);
110
1802
  }) });
111
1803
  };
112
- function getLeafCss(leaf) {
1804
+ function Ho(e) {
113
1805
  return {
114
- ...leaf.fontFamily && { fontFamily: leaf.fontFamily },
115
- ...leaf.fontWeight && { fontWeight: leaf.fontWeight },
116
- ...leaf.fontStyle && { fontStyle: leaf.fontStyle },
117
- ...leaf.textDecoration && { textDecoration: leaf.textDecoration },
118
- ...leaf.textTransform && { textTransform: leaf.textTransform },
119
- ...leaf.fontVariant && { fontVariant: leaf.fontVariant },
120
- ...leaf.verticalAlign && {
121
- verticalAlign: leaf.verticalAlign,
1806
+ ...e.fontFamily && { fontFamily: e.fontFamily },
1807
+ ...e.fontWeight && { fontWeight: e.fontWeight },
1808
+ ...e.fontStyle && { fontStyle: e.fontStyle },
1809
+ ...e.textDecoration && { textDecoration: e.textDecoration },
1810
+ ...e.textTransform && { textTransform: e.textTransform },
1811
+ ...e.fontVariant && { fontVariant: e.fontVariant },
1812
+ ...e.verticalAlign && {
1813
+ verticalAlign: e.verticalAlign,
122
1814
  lineHeight: "0px"
123
1815
  }
124
1816
  };
125
1817
  }
126
- function scalingValue(value, isEditor = false) {
127
- return isEditor ? `calc(var(--cntrl-article-width) * ${value})` : `${value * 100}vw`;
1818
+ function U(e, n = !1) {
1819
+ return n ? `calc(var(--cntrl-article-width) * ${e})` : `${e * 100}vw`;
128
1820
  }
129
- const svg = "SvgImage-module__svg___q3xE-";
130
- const img = "SvgImage-module__img___VsTm-";
131
- const styles$1 = {
132
- svg,
133
- img
134
- };
135
- const SvgImage = ({ url, fill = "#000000", hoverFill = "#CCCCCC", className = "" }) => {
136
- const [supportsMask, setSupportsMask] = useState(true);
137
- useEffect(() => {
138
- if (typeof window !== "undefined" && window.CSS) {
139
- const supported = CSS.supports("mask-image", 'url("")') || CSS.supports("-webkit-mask-image", 'url("")');
140
- setSupportsMask(supported);
1821
+ const Uo = "SvgImage-module__svg___q3xE-", Yo = "SvgImage-module__img___VsTm-", Xn = {
1822
+ svg: Uo,
1823
+ img: Yo
1824
+ }, dt = ({ url: e, fill: n = "#000000", hoverFill: t = "#CCCCCC", className: r = "" }) => {
1825
+ const [o, a] = ue(!0);
1826
+ return me(() => {
1827
+ if (typeof window < "u" && window.CSS) {
1828
+ const i = CSS.supports("mask-image", 'url("")') || CSS.supports("-webkit-mask-image", 'url("")');
1829
+ a(i);
141
1830
  }
142
- }, []);
143
- if (!url.endsWith(".svg") || !supportsMask) {
144
- return /* @__PURE__ */ jsx("img", { src: url, alt: "", className: cn(styles$1.img, className) });
145
- }
146
- return /* @__PURE__ */ jsx(
1831
+ }, []), !e.endsWith(".svg") || !o ? /* @__PURE__ */ M("img", { src: e, alt: "", className: ae(Xn.img, r) }) : /* @__PURE__ */ M(
147
1832
  "span",
148
1833
  {
149
- "data-supports-mask": supportsMask,
150
- className: cn(styles$1.svg, className),
1834
+ "data-supports-mask": o,
1835
+ className: ae(Xn.svg, r),
151
1836
  style: {
152
- "--svg": `url(${url})`,
153
- "--fill": fill,
154
- "--hover-fill": hoverFill
1837
+ "--svg": `url(${e})`,
1838
+ "--fill": n,
1839
+ "--hover-fill": t
155
1840
  }
156
1841
  }
157
1842
  );
1843
+ }, Go = {
1844
+ "top-left": j.topLeftAlignment,
1845
+ "top-center": j.topCenterAlignment,
1846
+ "top-right": j.topRightAlignment,
1847
+ "middle-left": j.middleLeftAlignment,
1848
+ "middle-center": j.middleCenterAlignment,
1849
+ "middle-right": j.middleRightAlignment,
1850
+ "bottom-left": j.bottomLeftAlignment,
1851
+ "bottom-center": j.bottomCenterAlignment,
1852
+ "bottom-right": j.bottomRightAlignment
158
1853
  };
159
- const alignmentClassName = {
160
- "top-left": styles$3.topLeftAlignment,
161
- "top-center": styles$3.topCenterAlignment,
162
- "top-right": styles$3.topRightAlignment,
163
- "middle-left": styles$3.middleLeftAlignment,
164
- "middle-center": styles$3.middleCenterAlignment,
165
- "middle-right": styles$3.middleRightAlignment,
166
- "bottom-left": styles$3.bottomLeftAlignment,
167
- "bottom-center": styles$3.bottomCenterAlignment,
168
- "bottom-right": styles$3.bottomRightAlignment
169
- };
170
- function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
171
- const [sliderRef, setSliderRef] = useState(null);
172
- const { widthSettings, fontSettings, letterSpacing, textAlign, wordSpacing, fontSizeLineHeight, textAppearance, color } = sliderStyles.imageCaption;
173
- const [sliderDimensions, setSliderDimensions] = useState(void 0);
174
- const [wrapperRef, setWrapperRef] = useState(null);
175
- const [currentSlideIndex, setCurrentSlideIndex] = useState(0);
176
- const [key, setKey] = useState(0);
177
- const { direction, transition, controls, pagination: pagination2, imageCaption, triggers } = settings;
178
- const prevSliderTypeRef = useRef(transition.type);
179
- const { x: controlsOffsetX, y: controlsOffsetY } = settings.controls.offset;
180
- const handleArrowClick = (dir) => {
181
- if (sliderRef) {
182
- sliderRef.go(dir);
183
- }
1854
+ function Xo({ settings: e, content: n, styles: t, isEditor: r }) {
1855
+ const [o, a] = ue(null), { widthSettings: i, fontSettings: l, letterSpacing: s, textAlign: d, wordSpacing: u, fontSizeLineHeight: S, textAppearance: m, color: v } = t.imageCaption, [c, p] = ue(void 0), [w, E] = ue(null), [g, b] = ue(0), [F, B] = ue(0), { direction: I, transition: h, controls: C, pagination: N, imageCaption: z, triggers: T } = e, O = be(h.type), { x: P, y: H } = e.controls.offset, $ = (f) => {
1856
+ o && o.go(f);
184
1857
  };
185
- useEffect(() => {
186
- if (!wrapperRef) return;
187
- const observer = new ResizeObserver((entries) => {
188
- if (!sliderRef) return;
189
- const [wrapper2] = entries;
190
- setSliderDimensions({
191
- width: Math.round(wrapper2.contentRect.width),
192
- height: Math.round(wrapper2.contentRect.height)
1858
+ return me(() => {
1859
+ if (!w) return;
1860
+ const f = new ResizeObserver((R) => {
1861
+ if (!o) return;
1862
+ const [x] = R;
1863
+ p({
1864
+ width: Math.round(x.contentRect.width),
1865
+ height: Math.round(x.contentRect.height)
193
1866
  });
194
1867
  });
195
- observer.observe(wrapperRef);
196
- return () => observer.unobserve(wrapperRef);
197
- }, [wrapperRef]);
198
- useEffect(() => {
199
- if (!sliderRef || prevSliderTypeRef.current === transition.type) return;
200
- setKey((prev) => prev + 1);
201
- prevSliderTypeRef.current = transition.type;
202
- }, [transition.type]);
203
- return /* @__PURE__ */ jsx("div", { className: cn(styles$3.wrapper, { [styles$3.editor]: isEditor }), ref: setWrapperRef, children: /* @__PURE__ */ jsxs(
1868
+ return f.observe(w), () => f.unobserve(w);
1869
+ }, [w]), me(() => {
1870
+ !o || O.current === h.type || (B((f) => f + 1), O.current = h.type);
1871
+ }, [h.type]), /* @__PURE__ */ M("div", { className: ae(j.wrapper, { [j.editor]: r }), ref: E, children: /* @__PURE__ */ Ae(
204
1872
  "div",
205
1873
  {
206
- className: styles$3.sliderInner,
1874
+ className: j.sliderInner,
207
1875
  style: {
208
- width: sliderDimensions ? sliderDimensions.width : "100%",
209
- height: sliderDimensions ? sliderDimensions.height : "100%",
210
- backgroundColor: transition.backgroundColor && transition.type === "fade in" ? transition.backgroundColor : "transparent"
1876
+ width: c ? c.width : "100%",
1877
+ height: c ? c.height : "100%",
1878
+ backgroundColor: h.backgroundColor && h.type === "fade in" ? h.backgroundColor : "transparent"
211
1879
  },
212
1880
  children: [
213
- settings.imageCaption.isActive && /* @__PURE__ */ jsx(
1881
+ e.imageCaption.isActive && /* @__PURE__ */ M(
214
1882
  "div",
215
1883
  {
216
- className: cn(styles$3.captionBlock),
217
- children: /* @__PURE__ */ jsx(
1884
+ className: ae(j.captionBlock),
1885
+ children: /* @__PURE__ */ M(
218
1886
  "div",
219
1887
  {
220
- className: styles$3.captionTextWrapper,
221
- children: content.map((item, index) => /* @__PURE__ */ jsx(
1888
+ className: j.captionTextWrapper,
1889
+ children: n.map((f, R) => /* @__PURE__ */ M(
222
1890
  "div",
223
1891
  {
224
- className: cn(styles$3.captionText, alignmentClassName[imageCaption.alignment], {
225
- [styles$3.withPointerEvents]: index === currentSlideIndex && isEditor,
226
- [styles$3.active]: index === currentSlideIndex
1892
+ className: ae(j.captionText, Go[z.alignment], {
1893
+ [j.withPointerEvents]: R === g && r,
1894
+ [j.active]: R === g
227
1895
  }),
228
1896
  style: {
229
- fontFamily: fontSettings.fontFamily,
230
- fontWeight: fontSettings.fontWeight,
231
- fontStyle: fontSettings.fontStyle,
232
- width: widthSettings.sizing === "auto" ? "max-content" : scalingValue(widthSettings.width, isEditor),
233
- letterSpacing: scalingValue(letterSpacing, isEditor),
234
- wordSpacing: scalingValue(wordSpacing, isEditor),
235
- textAlign,
236
- fontSize: scalingValue(fontSizeLineHeight.fontSize, isEditor),
237
- lineHeight: scalingValue(fontSizeLineHeight.lineHeight, isEditor),
238
- textTransform: textAppearance.textTransform ?? "none",
239
- textDecoration: textAppearance.textDecoration ?? "none",
240
- fontVariant: textAppearance.fontVariant ?? "normal",
241
- color,
242
- transitionDuration: transition.duration ? `${Math.round(parseInt(transition.duration) / 2)}ms` : "500ms"
1897
+ fontFamily: l.fontFamily,
1898
+ fontWeight: l.fontWeight,
1899
+ fontStyle: l.fontStyle,
1900
+ width: i.sizing === "auto" ? "max-content" : U(i.width, r),
1901
+ letterSpacing: U(s, r),
1902
+ wordSpacing: U(u, r),
1903
+ textAlign: d,
1904
+ fontSize: U(S.fontSize, r),
1905
+ lineHeight: U(S.lineHeight, r),
1906
+ textTransform: m.textTransform ?? "none",
1907
+ textDecoration: m.textDecoration ?? "none",
1908
+ fontVariant: m.fontVariant ?? "normal",
1909
+ color: v,
1910
+ transitionDuration: h.duration ? `${Math.round(parseInt(h.duration) / 2)}ms` : "500ms"
243
1911
  },
244
- children: /* @__PURE__ */ jsx(
1912
+ children: /* @__PURE__ */ M(
245
1913
  "div",
246
1914
  {
247
1915
  "data-styles": "imageCaption",
248
- className: styles$3.captionTextInner,
1916
+ className: j.captionTextInner,
249
1917
  style: {
250
- "--link-hover-color": imageCaption.hover,
1918
+ "--link-hover-color": z.hover,
251
1919
  position: "relative",
252
- top: scalingValue(imageCaption.offset.y, isEditor),
253
- left: scalingValue(imageCaption.offset.x, isEditor)
1920
+ top: U(z.offset.y, r),
1921
+ left: U(z.offset.x, r)
254
1922
  },
255
- children: /* @__PURE__ */ jsx(RichTextRenderer, { content: item.imageCaption })
1923
+ children: /* @__PURE__ */ M(Mr, { content: f.imageCaption })
256
1924
  }
257
1925
  )
258
1926
  },
259
- index
1927
+ R
260
1928
  ))
261
1929
  }
262
1930
  )
263
1931
  }
264
1932
  ),
265
- /* @__PURE__ */ jsx(
266
- Splide,
1933
+ /* @__PURE__ */ M(
1934
+ zr,
267
1935
  {
268
- onMove: (e) => {
269
- setCurrentSlideIndex(e.index);
1936
+ onMove: (f) => {
1937
+ b(f.index);
270
1938
  },
271
- ref: setSliderRef,
1939
+ ref: a,
272
1940
  options: {
273
- arrows: false,
274
- speed: transition.duration ? parseInt(transition.duration) : 500,
275
- autoplay: triggers.autoPlay !== null,
276
- ...triggers.autoPlay !== null && {
277
- interval: parseInt(triggers.autoPlay) * 1e3
278
- },
279
- direction: direction === "horiz" || transition.type === "fade in" ? "ltr" : "ttb",
280
- pagination: false,
281
- drag: triggers.triggersList.drag,
1941
+ arrows: !1,
1942
+ speed: h.duration ? parseInt(h.duration) : 500,
1943
+ autoplay: T.autoPlay !== null,
1944
+ ...T.autoPlay !== null && {
1945
+ interval: parseInt(T.autoPlay) * 1e3
1946
+ },
1947
+ direction: I === "horiz" || h.type === "fade in" ? "ltr" : "ttb",
1948
+ pagination: !1,
1949
+ drag: T.triggersList.drag,
282
1950
  perPage: 1,
283
- width: sliderDimensions ? sliderDimensions.width : "100%",
284
- height: sliderDimensions ? sliderDimensions.height : "100%",
285
- type: transition.type === "fade in" ? "fade" : "loop",
286
- rewind: true
1951
+ width: c ? c.width : "100%",
1952
+ height: c ? c.height : "100%",
1953
+ type: h.type === "fade in" ? "fade" : "loop",
1954
+ rewind: !0
287
1955
  },
288
- children: content.map((item, index) => /* @__PURE__ */ jsx(SplideSlide, { children: /* @__PURE__ */ jsx(
1956
+ children: n.map((f, R) => /* @__PURE__ */ M(Wr, { children: /* @__PURE__ */ M(
289
1957
  "div",
290
1958
  {
291
- className: styles$3.sliderItem,
292
- children: /* @__PURE__ */ jsx(
1959
+ className: j.sliderItem,
1960
+ children: /* @__PURE__ */ M(
293
1961
  "div",
294
1962
  {
295
- className: styles$3.imgWrapper,
296
- children: /* @__PURE__ */ jsx(
1963
+ className: j.imgWrapper,
1964
+ children: /* @__PURE__ */ M(
297
1965
  "img",
298
1966
  {
299
- className: cn(styles$3.sliderImage, {
300
- [styles$3.contain]: item.image.objectFit === "contain",
301
- [styles$3.cover]: item.image.objectFit === "cover"
1967
+ className: ae(j.sliderImage, {
1968
+ [j.contain]: f.image.objectFit === "contain",
1969
+ [j.cover]: f.image.objectFit === "cover"
302
1970
  }),
303
- src: item.image.url,
304
- alt: item.image.name ?? ""
1971
+ src: f.image.url,
1972
+ alt: f.image.name ?? ""
305
1973
  }
306
1974
  )
307
1975
  }
308
1976
  )
309
1977
  }
310
- ) }, index))
1978
+ ) }, R))
311
1979
  },
312
- key
1980
+ F
313
1981
  ),
314
- controls.isActive && /* @__PURE__ */ jsxs(Fragment, { children: [
315
- /* @__PURE__ */ jsx(
1982
+ C.isActive && /* @__PURE__ */ Ae(pt, { children: [
1983
+ /* @__PURE__ */ M(
316
1984
  "div",
317
1985
  {
318
- className: cn(styles$3.arrow, {
319
- [styles$3.arrowVertical]: direction === "vert",
320
- [styles$3.hoverArrow]: controls.show === "on hover"
1986
+ className: ae(j.arrow, {
1987
+ [j.arrowVertical]: I === "vert",
1988
+ [j.hoverArrow]: C.show === "on hover"
321
1989
  }),
322
1990
  style: {
323
- color: controls.color,
324
- ["--arrow-hover-color"]: controls.hover
1991
+ color: C.color,
1992
+ "--arrow-hover-color": C.hover
325
1993
  },
326
- children: /* @__PURE__ */ jsxs(
1994
+ children: /* @__PURE__ */ Ae(
327
1995
  "button",
328
1996
  {
329
1997
  onClick: () => {
330
- handleArrowClick("-1");
1998
+ $("-1");
331
1999
  },
332
- className: styles$3.arrowInner,
2000
+ className: j.arrowInner,
333
2001
  style: {
334
- transform: `translate(${scalingValue(controlsOffsetX, isEditor)}, ${scalingValue(controlsOffsetY * (direction === "horiz" ? 1 : -1), isEditor)}) scale(${settings.controls.scale / 100}) rotate(${direction === "horiz" ? "0deg" : "90deg"})`
2002
+ transform: `translate(${U(P, r)}, ${U(H * (I === "horiz" ? 1 : -1), r)}) scale(${e.controls.scale / 100}) rotate(${I === "horiz" ? "0deg" : "90deg"})`
335
2003
  },
336
2004
  children: [
337
- controls.arrowsImgUrl && /* @__PURE__ */ jsx(
338
- SvgImage,
2005
+ C.arrowsImgUrl && /* @__PURE__ */ M(
2006
+ dt,
339
2007
  {
340
- url: controls.arrowsImgUrl,
341
- fill: controls.color,
342
- hoverFill: controls.hover,
343
- className: cn(styles$3.arrowImg, styles$3.mirror)
2008
+ url: C.arrowsImgUrl,
2009
+ fill: C.color,
2010
+ hoverFill: C.hover,
2011
+ className: ae(j.arrowImg, j.mirror)
344
2012
  }
345
2013
  ),
346
- !controls.arrowsImgUrl && /* @__PURE__ */ jsx(ArrowIcon$1, { color: controls.color, className: cn(styles$3.arrowIcon, styles$3.arrowImg, styles$3.mirror) })
2014
+ !C.arrowsImgUrl && /* @__PURE__ */ M(Kn, { color: C.color, className: ae(j.arrowIcon, j.arrowImg, j.mirror) })
347
2015
  ]
348
2016
  }
349
2017
  )
350
2018
  }
351
2019
  ),
352
- /* @__PURE__ */ jsx(
2020
+ /* @__PURE__ */ M(
353
2021
  "div",
354
2022
  {
355
- className: cn(styles$3.arrow, styles$3.nextArrow, {
356
- [styles$3.arrowVertical]: direction === "vert",
357
- [styles$3.hoverArrow]: controls.show === "on hover"
2023
+ className: ae(j.arrow, j.nextArrow, {
2024
+ [j.arrowVertical]: I === "vert",
2025
+ [j.hoverArrow]: C.show === "on hover"
358
2026
  }),
359
2027
  style: {
360
- color: controls.color,
361
- ["--arrow-hover-color"]: controls.hover
2028
+ color: C.color,
2029
+ "--arrow-hover-color": C.hover
362
2030
  },
363
- children: /* @__PURE__ */ jsxs(
2031
+ children: /* @__PURE__ */ Ae(
364
2032
  "button",
365
2033
  {
366
- className: styles$3.arrowInner,
367
- onClick: () => handleArrowClick("+1"),
2034
+ className: j.arrowInner,
2035
+ onClick: () => $("+1"),
368
2036
  style: {
369
- transform: `translate(${scalingValue(controlsOffsetX * (direction === "horiz" ? -1 : 1), isEditor)}, ${scalingValue(controlsOffsetY, isEditor)}) scale(${settings.controls.scale / 100}) rotate(${direction === "horiz" ? "0deg" : "90deg"})`
2037
+ transform: `translate(${U(P * (I === "horiz" ? -1 : 1), r)}, ${U(H, r)}) scale(${e.controls.scale / 100}) rotate(${I === "horiz" ? "0deg" : "90deg"})`
370
2038
  },
371
2039
  children: [
372
- controls.arrowsImgUrl && /* @__PURE__ */ jsx(
373
- SvgImage,
2040
+ C.arrowsImgUrl && /* @__PURE__ */ M(
2041
+ dt,
374
2042
  {
375
- url: controls.arrowsImgUrl,
376
- fill: controls.color,
377
- hoverFill: controls.hover,
378
- className: styles$3.arrowImg
2043
+ url: C.arrowsImgUrl,
2044
+ fill: C.color,
2045
+ hoverFill: C.hover,
2046
+ className: j.arrowImg
379
2047
  }
380
2048
  ),
381
- !controls.arrowsImgUrl && /* @__PURE__ */ jsx(ArrowIcon$1, { color: controls.color, className: cn(styles$3.arrowIcon, styles$3.arrowImg) })
2049
+ !C.arrowsImgUrl && /* @__PURE__ */ M(Kn, { color: C.color, className: ae(j.arrowIcon, j.arrowImg) })
382
2050
  ]
383
2051
  }
384
2052
  )
385
2053
  }
386
2054
  )
387
2055
  ] }),
388
- triggers.triggersList.click && /* @__PURE__ */ jsx(
2056
+ T.triggersList.click && /* @__PURE__ */ M(
389
2057
  "div",
390
2058
  {
391
- className: styles$3.clickOverlay,
2059
+ className: j.clickOverlay,
392
2060
  onClick: () => {
393
- if (sliderRef) {
394
- sliderRef.go("+1");
395
- }
2061
+ o && o.go("+1");
396
2062
  }
397
2063
  }
398
2064
  ),
399
- pagination2.isActive && /* @__PURE__ */ jsx(
2065
+ N.isActive && /* @__PURE__ */ M(
400
2066
  "div",
401
2067
  {
402
- className: cn(styles$3.pagination, {
403
- [styles$3.paginationInsideBottom]: pagination2.position === "inside-1" && direction === "horiz",
404
- [styles$3.paginationInsideTop]: pagination2.position === "inside-2" && direction === "horiz",
405
- [styles$3.paginationOutsideBottom]: pagination2.position === "outside-1" && direction === "horiz",
406
- [styles$3.paginationOutsideTop]: pagination2.position === "outside-2" && direction === "horiz",
407
- [styles$3.paginationInsideLeft]: pagination2.position === "inside-1" && direction === "vert",
408
- [styles$3.paginationInsideRight]: pagination2.position === "inside-2" && direction === "vert",
409
- [styles$3.paginationOutsideLeft]: pagination2.position === "outside-1" && direction === "vert",
410
- [styles$3.paginationOutsideRight]: pagination2.position === "outside-2" && direction === "vert",
411
- [styles$3.paginationVertical]: direction === "vert"
2068
+ className: ae(j.pagination, {
2069
+ [j.paginationInsideBottom]: N.position === "inside-1" && I === "horiz",
2070
+ [j.paginationInsideTop]: N.position === "inside-2" && I === "horiz",
2071
+ [j.paginationOutsideBottom]: N.position === "outside-1" && I === "horiz",
2072
+ [j.paginationOutsideTop]: N.position === "outside-2" && I === "horiz",
2073
+ [j.paginationInsideLeft]: N.position === "inside-1" && I === "vert",
2074
+ [j.paginationInsideRight]: N.position === "inside-2" && I === "vert",
2075
+ [j.paginationOutsideLeft]: N.position === "outside-1" && I === "vert",
2076
+ [j.paginationOutsideRight]: N.position === "outside-2" && I === "vert",
2077
+ [j.paginationVertical]: I === "vert"
412
2078
  }),
413
- children: /* @__PURE__ */ jsx(
2079
+ children: /* @__PURE__ */ M(
414
2080
  "div",
415
2081
  {
416
- className: styles$3.paginationInner,
2082
+ className: j.paginationInner,
417
2083
  style: {
418
- backgroundColor: pagination2.colors[2],
419
- transform: `scale(${pagination2.scale / 100}) translate(${scalingValue(pagination2.offset.x, isEditor)}, ${scalingValue(pagination2.offset.y, isEditor)}) rotate(${direction === "horiz" ? "0deg" : "90deg"})`
2084
+ backgroundColor: N.colors[2],
2085
+ transform: `scale(${N.scale / 100}) translate(${U(N.offset.x, r)}, ${U(N.offset.y, r)}) rotate(${I === "horiz" ? "0deg" : "90deg"})`
420
2086
  },
421
- children: content.map((_, index) => /* @__PURE__ */ jsx(
2087
+ children: n.map((f, R) => /* @__PURE__ */ M(
422
2088
  "button",
423
2089
  {
424
2090
  onClick: () => {
425
- if (sliderRef) {
426
- sliderRef.go(index);
427
- }
2091
+ o && o.go(R);
428
2092
  },
429
- className: cn(styles$3.paginationItem),
430
- children: /* @__PURE__ */ jsx(
2093
+ className: ae(j.paginationItem),
2094
+ children: /* @__PURE__ */ M(
431
2095
  "div",
432
2096
  {
433
- className: cn(styles$3.dot, {
434
- [styles$3.activeDot]: index === currentSlideIndex
2097
+ className: ae(j.dot, {
2098
+ [j.activeDot]: R === g
435
2099
  }),
436
2100
  style: {
437
- backgroundColor: index === currentSlideIndex ? pagination2.colors[0] : pagination2.colors[1],
438
- ["--pagination-hover-color"]: pagination2.hover
2101
+ backgroundColor: R === g ? N.colors[0] : N.colors[1],
2102
+ "--pagination-hover-color": N.hover
439
2103
  }
440
2104
  }
441
2105
  )
442
2106
  },
443
- index
2107
+ R
444
2108
  ))
445
2109
  }
446
2110
  )
@@ -450,11 +2114,11 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
450
2114
  }
451
2115
  ) });
452
2116
  }
453
- function ArrowIcon$1({ color, className }) {
454
- return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 10 18", className, children: /* @__PURE__ */ jsx("g", { id: "Symbols", stroke: "none", strokeWidth: "1", fillRule: "evenodd", children: /* @__PURE__ */ jsx("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: color, transform: "translate(5, 9) rotate(-90) translate(-5, -9)" }) }) });
2117
+ function Kn({ color: e, className: n }) {
2118
+ return /* @__PURE__ */ M("svg", { viewBox: "0 0 10 18", className: n, children: /* @__PURE__ */ M("g", { id: "Symbols", stroke: "none", strokeWidth: "1", fillRule: "evenodd", children: /* @__PURE__ */ M("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: e, transform: "translate(5, 9) rotate(-90) translate(-5, -9)" }) }) });
455
2119
  }
456
- const ControlSliderComponent = {
457
- element: ControlSlider,
2120
+ const Ko = {
2121
+ element: Xo,
458
2122
  id: "control-slider",
459
2123
  name: "Slider",
460
2124
  preview: {
@@ -469,7 +2133,7 @@ const ControlSliderComponent = {
469
2133
  type: "object",
470
2134
  properties: {
471
2135
  settings: {
472
- layoutBased: true,
2136
+ layoutBased: !0,
473
2137
  type: "object",
474
2138
  display: {
475
2139
  type: "settings-block"
@@ -531,7 +2195,7 @@ const ControlSliderComponent = {
531
2195
  type: ["string", "null"],
532
2196
  title: "BG Color",
533
2197
  display: {
534
- visible: false,
2198
+ visible: !1,
535
2199
  type: "settings-color-picker",
536
2200
  format: "single"
537
2201
  }
@@ -574,19 +2238,19 @@ const ControlSliderComponent = {
574
2238
  x: {
575
2239
  type: "number",
576
2240
  label: "X",
577
- scalingEnabled: true,
2241
+ scalingEnabled: !0,
578
2242
  display: {
579
2243
  type: "numeric-input",
580
- visible: true
2244
+ visible: !0
581
2245
  }
582
2246
  },
583
2247
  y: {
584
2248
  type: "number",
585
2249
  label: "Y",
586
- scalingEnabled: true,
2250
+ scalingEnabled: !0,
587
2251
  display: {
588
2252
  type: "numeric-input",
589
- visible: true
2253
+ visible: !0
590
2254
  }
591
2255
  }
592
2256
  }
@@ -656,19 +2320,19 @@ const ControlSliderComponent = {
656
2320
  x: {
657
2321
  type: "number",
658
2322
  label: "X",
659
- scalingEnabled: true,
2323
+ scalingEnabled: !0,
660
2324
  display: {
661
2325
  type: "numeric-input",
662
- visible: true
2326
+ visible: !0
663
2327
  }
664
2328
  },
665
2329
  y: {
666
2330
  type: "number",
667
2331
  label: "Y",
668
- scalingEnabled: true,
2332
+ scalingEnabled: !0,
669
2333
  display: {
670
2334
  type: "numeric-input",
671
- visible: true
2335
+ visible: !0
672
2336
  }
673
2337
  }
674
2338
  }
@@ -732,19 +2396,19 @@ const ControlSliderComponent = {
732
2396
  x: {
733
2397
  type: "number",
734
2398
  label: "X",
735
- scalingEnabled: true,
2399
+ scalingEnabled: !0,
736
2400
  display: {
737
2401
  type: "numeric-input",
738
- visible: true
2402
+ visible: !0
739
2403
  }
740
2404
  },
741
2405
  y: {
742
2406
  type: "number",
743
2407
  label: "Y",
744
- scalingEnabled: true,
2408
+ scalingEnabled: !0,
745
2409
  display: {
746
2410
  type: "numeric-input",
747
- visible: true
2411
+ visible: !0
748
2412
  }
749
2413
  }
750
2414
  }
@@ -763,13 +2427,13 @@ const ControlSliderComponent = {
763
2427
  default: {
764
2428
  triggers: {
765
2429
  triggersList: {
766
- click: false,
767
- drag: true
2430
+ click: !1,
2431
+ drag: !0
768
2432
  },
769
2433
  autoPlay: null
770
2434
  },
771
2435
  controls: {
772
- isActive: true,
2436
+ isActive: !0,
773
2437
  arrowsImgUrl: null,
774
2438
  offset: {
775
2439
  x: 0,
@@ -786,7 +2450,7 @@ const ControlSliderComponent = {
786
2450
  backgroundColor: null
787
2451
  },
788
2452
  pagination: {
789
- isActive: true,
2453
+ isActive: !0,
790
2454
  scale: 50,
791
2455
  position: "outside-1",
792
2456
  offset: {
@@ -802,7 +2466,7 @@ const ControlSliderComponent = {
802
2466
  x: 0,
803
2467
  y: 0
804
2468
  },
805
- isActive: true,
2469
+ isActive: !0,
806
2470
  alignment: "middle-center",
807
2471
  hover: "#cccccc"
808
2472
  }
@@ -825,16 +2489,16 @@ const ControlSliderComponent = {
825
2489
  },
826
2490
  then: {
827
2491
  name: "properties.transition.properties.backgroundColor.display.visible",
828
- value: true
2492
+ value: !0
829
2493
  }
830
2494
  }
831
2495
  ]
832
2496
  },
833
2497
  content: {
834
- layoutBased: false,
2498
+ layoutBased: !1,
835
2499
  type: "array",
836
2500
  settings: {
837
- addItemFromFileExplorer: true,
2501
+ addItemFromFileExplorer: !0,
838
2502
  defaultWidth: 500
839
2503
  },
840
2504
  items: {
@@ -917,7 +2581,7 @@ const ControlSliderComponent = {
917
2581
  ]
918
2582
  },
919
2583
  styles: {
920
- layoutBased: true,
2584
+ layoutBased: !0,
921
2585
  type: "object",
922
2586
  properties: {
923
2587
  imageCaption: {
@@ -1047,249 +2711,174 @@ const ControlSliderComponent = {
1047
2711
  },
1048
2712
  required: ["settings", "content", "styles"]
1049
2713
  }
2714
+ }, qo = "ImageRevealSlider-module__imageRevealSlider___UE5Ob", Jo = "ImageRevealSlider-module__image___Qjt-e", Zo = "ImageRevealSlider-module__link___N-iLG", Qo = "ImageRevealSlider-module__cursor___2U03d", qe = {
2715
+ imageRevealSlider: qo,
2716
+ image: Jo,
2717
+ link: Zo,
2718
+ cursor: Qo
1050
2719
  };
1051
- const imageRevealSlider = "ImageRevealSlider-module__imageRevealSlider___UE5Ob";
1052
- const image = "ImageRevealSlider-module__image___Qjt-e";
1053
- const link = "ImageRevealSlider-module__link___N-iLG";
1054
- const cursor = "ImageRevealSlider-module__cursor___2U03d";
1055
- const styles = {
1056
- imageRevealSlider,
1057
- image,
1058
- link,
1059
- cursor
1060
- };
1061
- function isMouseOverImage(mouseX, mouseY, placedImages) {
1062
- for (const img2 of placedImages) {
1063
- const imgEl = new Image();
1064
- imgEl.src = img2.url;
1065
- const imgWidth = img2.width ? Number.parseFloat(img2.width) : imgEl.naturalWidth;
1066
- const imgHeight = imgEl.naturalHeight / imgEl.naturalWidth * imgWidth;
1067
- const halfW = imgWidth / 2;
1068
- const halfH = imgHeight / 2;
1069
- if (mouseX >= img2.x - halfW && mouseX <= img2.x + halfW && mouseY >= img2.y - halfH && mouseY <= img2.y + halfH) {
1070
- return true;
1071
- }
2720
+ function qn(e, n, t) {
2721
+ for (const r of t) {
2722
+ const o = new Image();
2723
+ o.src = r.url;
2724
+ const a = r.width ? Number.parseFloat(r.width) : o.naturalWidth, i = o.naturalHeight / o.naturalWidth * a, l = a / 2, s = i / 2;
2725
+ if (e >= r.x - l && e <= r.x + l && n >= r.y - s && n <= r.y + s)
2726
+ return !0;
1072
2727
  }
1073
- return false;
2728
+ return !1;
1074
2729
  }
1075
- function getImageSize(url) {
1076
- return new Promise((resolve) => {
1077
- const img2 = new Image();
1078
- img2.src = url;
1079
- img2.onload = () => {
1080
- resolve({ width: img2.naturalWidth, height: img2.naturalHeight });
2730
+ function rn(e) {
2731
+ return new Promise((n) => {
2732
+ const t = new Image();
2733
+ t.src = e, t.onload = () => {
2734
+ n({ width: t.naturalWidth, height: t.naturalHeight });
1081
2735
  };
1082
2736
  });
1083
2737
  }
1084
- async function calculateImageWidthHeight(imgUrl, sizeType, customWidth, randomRange) {
1085
- let width;
1086
- let height;
1087
- if (sizeType === "custom") {
1088
- width = customWidth;
1089
- const size = await getImageSize(imgUrl);
1090
- height = size.height / size.width * width;
1091
- } else if (sizeType === "random") {
1092
- width = Math.random() * (randomRange.max - randomRange.min) + randomRange.min;
1093
- const size = await getImageSize(imgUrl);
1094
- height = size.height / size.width * width;
2738
+ async function ea(e, n, t, r) {
2739
+ let o, a;
2740
+ if (n === "custom") {
2741
+ o = t;
2742
+ const i = await rn(e);
2743
+ a = i.height / i.width * o;
2744
+ } else if (n === "random") {
2745
+ o = Math.random() * (r.max - r.min) + r.min;
2746
+ const i = await rn(e);
2747
+ a = i.height / i.width * o;
1095
2748
  } else {
1096
- const size = await getImageSize(imgUrl);
1097
- width = size.width;
1098
- height = size.height;
1099
- }
1100
- return { width, height, finalWidth: `${width}px` };
1101
- }
1102
- function ImageRevealSlider({ settings, content, isEditor }) {
1103
- const [divRef, setDivRef] = useState(null);
1104
- const [placedImages, setPlacedImages] = useState([]);
1105
- const [counter, setCounter] = useState(0);
1106
- const imageIdCounter = useRef(0);
1107
- const [cursorCenter, setCursorCenter] = useState({ x: 0, y: 0 });
1108
- const [cursorScale, setCursorScale] = useState(1);
1109
- const [customCursorImg, setCustomCursorImg] = useState("none");
1110
- const lastMousePos = useRef({ x: 0, y: 0 });
1111
- const [isInside, setIsInside] = useState(false);
1112
- const { sizeType, imageWidth: customWidth, randomRangeImageWidth: randomRange } = settings.imageSize;
1113
- const { revealPosition, visible } = settings.position;
1114
- const { cursorType, target, defaultCursorScale, defaultCursor, hoverCursorScale, hoverCursor } = settings.cursor;
1115
- useEffect(() => {
1116
- if (!divRef) return;
1117
- const updateCursorPosition = (clientX, clientY) => {
1118
- const rect = divRef.getBoundingClientRect();
1119
- const x = clientX - rect.left;
1120
- const y = clientY - rect.top;
1121
- setCursorCenter({ x, y });
1122
- if (cursorType === "system") {
1123
- setCustomCursorImg("none");
1124
- setCursorScale(1);
2749
+ const i = await rn(e);
2750
+ o = i.width, a = i.height;
2751
+ }
2752
+ return { width: o, height: a, finalWidth: `${o}px` };
2753
+ }
2754
+ function ta({ settings: e, content: n, isEditor: t }) {
2755
+ const [r, o] = ue(null), [a, i] = ue([]), [l, s] = ue(0), d = be(0), [u, S] = ue({ x: 0, y: 0 }), [m, v] = ue(1), [c, p] = ue("none"), w = be({ x: 0, y: 0 }), [E, g] = ue(!1), { sizeType: b, imageWidth: F, randomRangeImageWidth: B } = e.imageSize, { revealPosition: I, visible: h } = e.position, { cursorType: C, target: N, defaultCursorScale: z, defaultCursor: T, hoverCursorScale: O, hoverCursor: P } = e.cursor;
2756
+ me(() => {
2757
+ if (!r) return;
2758
+ const f = (L, _) => {
2759
+ const k = r.getBoundingClientRect(), G = L - k.left, ne = _ - k.top;
2760
+ if (S({ x: G, y: ne }), C === "system") {
2761
+ p("none"), v(1);
1125
2762
  return;
1126
2763
  }
1127
- const cx = x;
1128
- const cy = y;
1129
- const el = document.elementFromPoint(rect.left + cx, rect.top + cy);
1130
- if (el && el.closest("a")) {
1131
- setCustomCursorImg("none");
1132
- setCursorScale(1);
2764
+ const ee = G, he = ne, A = document.elementFromPoint(k.left + ee, k.top + he);
2765
+ if (A && A.closest("a")) {
2766
+ p("none"), v(1);
1133
2767
  return;
1134
2768
  }
1135
- const next = isMouseOverImage(cx, cy, placedImages) || target === "area" ? { img: hoverCursor ?? "none", scale: hoverCursorScale } : { img: defaultCursor ?? "none", scale: defaultCursorScale };
1136
- setCustomCursorImg(next.img);
1137
- setCursorScale(next.scale);
1138
- };
1139
- const mouseMove = (e) => {
1140
- e.stopPropagation();
1141
- lastMousePos.current = { x: e.clientX, y: e.clientY };
1142
- updateCursorPosition(e.clientX, e.clientY);
2769
+ const q = qn(ee, he, a) || N === "area" ? { img: P ?? "none", scale: O } : { img: T ?? "none", scale: z };
2770
+ p(q.img), v(q.scale);
2771
+ }, R = (L) => {
2772
+ L.stopPropagation(), w.current = { x: L.clientX, y: L.clientY }, f(L.clientX, L.clientY);
2773
+ }, x = () => {
2774
+ E && f(w.current.x, w.current.y);
1143
2775
  };
1144
- const handleScroll = () => {
1145
- if (!isInside) return;
1146
- updateCursorPosition(lastMousePos.current.x, lastMousePos.current.y);
1147
- };
1148
- divRef.addEventListener("mousemove", mouseMove);
1149
- window.addEventListener("scroll", handleScroll, true);
1150
- return () => {
1151
- divRef.removeEventListener("mousemove", mouseMove);
1152
- window.removeEventListener("scroll", handleScroll, true);
2776
+ return r.addEventListener("mousemove", R), window.addEventListener("scroll", x, !0), () => {
2777
+ r.removeEventListener("mousemove", R), window.removeEventListener("scroll", x, !0);
1153
2778
  };
1154
2779
  }, [
1155
- divRef,
1156
- isInside,
1157
- cursorCenter,
1158
- cursorType,
1159
- target,
1160
- hoverCursor,
1161
- defaultCursor,
1162
- hoverCursorScale,
1163
- defaultCursorScale,
1164
- placedImages
1165
- ]);
1166
- useEffect(() => {
1167
- if (!isInside) {
1168
- setCustomCursorImg("none");
1169
- setCursorScale(0);
1170
- }
1171
- }, [isInside]);
1172
- const createNewImage = async (imgData, containerWidth, containerHeight, position = {}) => {
1173
- const { width, height, finalWidth } = await calculateImageWidthHeight(
1174
- imgData.image.url,
1175
- sizeType,
1176
- customWidth,
1177
- randomRange
2780
+ r,
2781
+ E,
2782
+ u,
2783
+ C,
2784
+ N,
2785
+ P,
2786
+ T,
2787
+ O,
2788
+ z,
2789
+ a
2790
+ ]), me(() => {
2791
+ E || (p("none"), v(0));
2792
+ }, [E]);
2793
+ const H = async (f, R, x, L = {}) => {
2794
+ const { width: _, height: k, finalWidth: G } = await ea(
2795
+ f.image.url,
2796
+ b,
2797
+ F,
2798
+ B
1178
2799
  );
1179
- let x = 0, y = 0;
1180
- if (revealPosition === "same") {
1181
- x = containerWidth / 2;
1182
- y = containerHeight / 2;
1183
- } else {
1184
- x = position.x ?? Math.random() * containerWidth;
1185
- y = position.y ?? Math.random() * containerHeight;
1186
- }
1187
- const adjustedX = Math.min(Math.max(x, width / 2), containerWidth - width / 2);
1188
- const adjustedY = Math.min(Math.max(y, height / 2), containerHeight - height / 2);
2800
+ let ne = 0, ee = 0;
2801
+ I === "same" ? (ne = R / 2, ee = x / 2) : (ne = L.x ?? Math.random() * R, ee = L.y ?? Math.random() * x);
2802
+ const he = Math.min(Math.max(ne, _ / 2), R - _ / 2), A = Math.min(Math.max(ee, k / 2), x - k / 2);
1189
2803
  return {
1190
- id: imageIdCounter.current++,
1191
- url: imgData.image.url,
1192
- link: imgData.link,
1193
- name: imgData.image.name,
1194
- x: adjustedX,
1195
- y: adjustedY,
1196
- width: finalWidth
1197
- };
1198
- };
1199
- useEffect(() => {
1200
- if (!divRef || content.length === 0) return;
1201
- const rect = divRef.getBoundingClientRect();
1202
- const containerWidth = rect.width;
1203
- const containerHeight = rect.height;
1204
- const defaultPlaced = [];
1205
- const placeImages = async () => {
1206
- const imgData = content[0];
1207
- const newImg = await createNewImage(imgData, containerWidth, containerHeight);
1208
- defaultPlaced.push(newImg);
1209
- setPlacedImages(defaultPlaced);
1210
- setCounter(1);
2804
+ id: d.current++,
2805
+ url: f.image.url,
2806
+ link: f.link,
2807
+ name: f.image.name,
2808
+ x: he,
2809
+ y: A,
2810
+ width: G
1211
2811
  };
1212
- placeImages();
1213
- }, [sizeType, customWidth, randomRange, revealPosition, divRef]);
1214
- useEffect(() => {
1215
- if (visible === "last One") {
1216
- setPlacedImages((prev) => prev.length > 0 ? [prev[prev.length - 1]] : []);
1217
- }
1218
- }, [visible]);
1219
- const handleClick = async (e) => {
1220
- if (!divRef) return;
1221
- const rect = divRef.getBoundingClientRect();
1222
- const clickX = e.clientX - rect.left;
1223
- const clickY = e.clientY - rect.top;
1224
- if (target === "image" && !isMouseOverImage(clickX, clickY, placedImages)) return;
1225
- let x = 0, y = 0;
1226
- if (revealPosition === "on Click") {
1227
- x = clickX;
1228
- y = clickY;
1229
- } else if (revealPosition === "same") {
1230
- x = rect.width / 2;
1231
- y = rect.height / 2;
1232
- } else {
1233
- x = Math.random() * rect.width;
1234
- y = Math.random() * rect.height;
1235
- }
1236
- const imgData = content[counter];
1237
- const newImage = await createNewImage(imgData, rect.width, rect.height, { x, y });
1238
- setPlacedImages((prev) => visible === "all" ? [...prev, newImage] : [newImage]);
1239
- setCounter((prev) => prev >= content.length - 1 ? 0 : prev + 1);
1240
2812
  };
1241
- return /* @__PURE__ */ jsxs(
2813
+ return me(() => {
2814
+ if (!r || n.length === 0) return;
2815
+ const f = r.getBoundingClientRect(), R = f.width, x = f.height, L = [];
2816
+ (async () => {
2817
+ const k = n[0], G = await H(k, R, x);
2818
+ L.push(G), i(L), s(1);
2819
+ })();
2820
+ }, [b, F, B, I, r]), me(() => {
2821
+ h === "last One" && i((f) => f.length > 0 ? [f[f.length - 1]] : []);
2822
+ }, [h]), /* @__PURE__ */ Ae(
1242
2823
  "div",
1243
2824
  {
1244
- ref: setDivRef,
1245
- onClick: handleClick,
1246
- onMouseEnter: () => setIsInside(true),
1247
- onMouseLeave: () => setIsInside(false),
1248
- className: styles.imageRevealSlider,
1249
- style: { cursor: customCursorImg === "none" ? "default" : "none" },
2825
+ ref: o,
2826
+ onClick: async (f) => {
2827
+ if (!r) return;
2828
+ const R = r.getBoundingClientRect(), x = f.clientX - R.left, L = f.clientY - R.top;
2829
+ if (N === "image" && !qn(x, L, a)) return;
2830
+ let _ = 0, k = 0;
2831
+ I === "on Click" ? (_ = x, k = L) : I === "same" ? (_ = R.width / 2, k = R.height / 2) : (_ = Math.random() * R.width, k = Math.random() * R.height);
2832
+ const G = n[l], ne = await H(G, R.width, R.height, { x: _, y: k });
2833
+ i((ee) => h === "all" ? [...ee, ne] : [ne]), s((ee) => ee >= n.length - 1 ? 0 : ee + 1);
2834
+ },
2835
+ onMouseEnter: () => g(!0),
2836
+ onMouseLeave: () => g(!1),
2837
+ className: qe.imageRevealSlider,
2838
+ style: { cursor: c === "none" ? "default" : "none" },
1250
2839
  children: [
1251
- placedImages.map((img2) => /* @__PURE__ */ jsx(
2840
+ a.map((f) => /* @__PURE__ */ M(
1252
2841
  "div",
1253
2842
  {
1254
- className: styles.wrapper,
2843
+ className: qe.wrapper,
1255
2844
  style: {
1256
- top: `${img2.y}px`,
1257
- left: `${img2.x}px`,
2845
+ top: `${f.y}px`,
2846
+ left: `${f.x}px`,
1258
2847
  position: "absolute",
1259
2848
  transform: "translate(-50%, -50%)",
1260
- width: img2.width ?? "auto",
2849
+ width: f.width ?? "auto",
1261
2850
  height: "auto",
1262
- cursor: customCursorImg === "none" ? "default" : "none"
2851
+ cursor: c === "none" ? "default" : "none"
1263
2852
  },
1264
- children: target === "area" && img2.link ? /* @__PURE__ */ jsx("a", { href: img2.link, target: "_blank", className: styles.link, children: /* @__PURE__ */ jsx(
2853
+ children: N === "area" && f.link ? /* @__PURE__ */ M("a", { href: f.link, target: "_blank", className: qe.link, children: /* @__PURE__ */ M(
1265
2854
  "img",
1266
2855
  {
1267
- src: img2.url,
1268
- alt: img2.name,
1269
- className: styles.image
2856
+ src: f.url,
2857
+ alt: f.name,
2858
+ className: qe.image
1270
2859
  },
1271
- img2.id
1272
- ) }) : /* @__PURE__ */ jsx(
2860
+ f.id
2861
+ ) }) : /* @__PURE__ */ M(
1273
2862
  "img",
1274
2863
  {
1275
- src: img2.url,
1276
- alt: img2.name,
1277
- className: styles.image
2864
+ src: f.url,
2865
+ alt: f.name,
2866
+ className: qe.image
1278
2867
  },
1279
- img2.id
2868
+ f.id
1280
2869
  )
1281
2870
  },
1282
- img2.id
2871
+ f.id
1283
2872
  )),
1284
- isInside && /* @__PURE__ */ jsx(
2873
+ E && /* @__PURE__ */ M(
1285
2874
  "div",
1286
2875
  {
1287
- className: styles.cursor,
2876
+ className: qe.cursor,
1288
2877
  style: {
1289
- left: `${cursorCenter.x}px`,
1290
- top: `${cursorCenter.y}px`,
1291
- transform: `translate(-50%, -50%) scale(${cursorScale})`,
1292
- backgroundImage: `url('${customCursorImg}')`,
2878
+ left: `${u.x}px`,
2879
+ top: `${u.y}px`,
2880
+ transform: `translate(-50%, -50%) scale(${m})`,
2881
+ backgroundImage: `url('${c}')`,
1293
2882
  backgroundSize: "cover",
1294
2883
  backgroundPosition: "center",
1295
2884
  position: "absolute",
@@ -1301,8 +2890,8 @@ function ImageRevealSlider({ settings, content, isEditor }) {
1301
2890
  }
1302
2891
  );
1303
2892
  }
1304
- const ControlImageRevealSliderComponent = {
1305
- element: ImageRevealSlider,
2893
+ const na = {
2894
+ element: ta,
1306
2895
  id: "control-image-reveal",
1307
2896
  name: "Click Gallery",
1308
2897
  preview: {
@@ -1317,7 +2906,7 @@ const ControlImageRevealSliderComponent = {
1317
2906
  type: "object",
1318
2907
  properties: {
1319
2908
  settings: {
1320
- layoutBased: true,
2909
+ layoutBased: !0,
1321
2910
  type: "object",
1322
2911
  display: {
1323
2912
  type: "settings-block"
@@ -1341,14 +2930,14 @@ const ControlImageRevealSliderComponent = {
1341
2930
  label: "W",
1342
2931
  display: {
1343
2932
  type: "numeric-input",
1344
- visible: false
2933
+ visible: !1
1345
2934
  }
1346
2935
  },
1347
2936
  randomRangeImageWidth: {
1348
2937
  type: "object",
1349
2938
  display: {
1350
2939
  type: "random-range-controls",
1351
- visible: false
2940
+ visible: !1
1352
2941
  },
1353
2942
  properties: {
1354
2943
  min: {
@@ -1387,7 +2976,7 @@ const ControlImageRevealSliderComponent = {
1387
2976
  title: "Default",
1388
2977
  display: {
1389
2978
  type: "settings-image-input",
1390
- visible: false
2979
+ visible: !1
1391
2980
  }
1392
2981
  },
1393
2982
  defaultCursorScale: {
@@ -1398,7 +2987,7 @@ const ControlImageRevealSliderComponent = {
1398
2987
  step: 0.1,
1399
2988
  display: {
1400
2989
  type: "range-control",
1401
- visible: false
2990
+ visible: !1
1402
2991
  }
1403
2992
  },
1404
2993
  hoverCursor: {
@@ -1406,7 +2995,7 @@ const ControlImageRevealSliderComponent = {
1406
2995
  title: "Hover",
1407
2996
  display: {
1408
2997
  type: "settings-image-input",
1409
- visible: false
2998
+ visible: !1
1410
2999
  }
1411
3000
  },
1412
3001
  hoverCursorScale: {
@@ -1417,7 +3006,7 @@ const ControlImageRevealSliderComponent = {
1417
3006
  step: 0.1,
1418
3007
  display: {
1419
3008
  type: "range-control",
1420
- visible: false
3009
+ visible: !1
1421
3010
  }
1422
3011
  }
1423
3012
  }
@@ -1476,7 +3065,7 @@ const ControlImageRevealSliderComponent = {
1476
3065
  },
1477
3066
  then: {
1478
3067
  name: "properties.imageSize.properties.imageWidth.display.visible",
1479
- value: true
3068
+ value: !0
1480
3069
  }
1481
3070
  },
1482
3071
  {
@@ -1486,7 +3075,7 @@ const ControlImageRevealSliderComponent = {
1486
3075
  },
1487
3076
  then: {
1488
3077
  name: "properties.imageSize.properties.randomRangeImageWidth.display.visible",
1489
- value: true
3078
+ value: !0
1490
3079
  }
1491
3080
  },
1492
3081
  {
@@ -1496,18 +3085,18 @@ const ControlImageRevealSliderComponent = {
1496
3085
  ],
1497
3086
  then: {
1498
3087
  name: "properties.cursor.properties.defaultCursor.display.visible",
1499
- value: true
3088
+ value: !0
1500
3089
  }
1501
3090
  },
1502
3091
  {
1503
3092
  if: [
1504
3093
  { name: "cursor.target", value: "image" },
1505
3094
  { name: "cursor.cursorType", value: "custom" },
1506
- { name: "cursor.defaultCursor", value: null, isNotEqual: true }
3095
+ { name: "cursor.defaultCursor", value: null, isNotEqual: !0 }
1507
3096
  ],
1508
3097
  then: {
1509
3098
  name: "properties.cursor.properties.defaultCursorScale.display.visible",
1510
- value: true
3099
+ value: !0
1511
3100
  }
1512
3101
  },
1513
3102
  {
@@ -1517,26 +3106,26 @@ const ControlImageRevealSliderComponent = {
1517
3106
  },
1518
3107
  then: {
1519
3108
  name: "properties.cursor.properties.hoverCursor.display.visible",
1520
- value: true
3109
+ value: !0
1521
3110
  }
1522
3111
  },
1523
3112
  {
1524
3113
  if: [
1525
3114
  { name: "cursor.cursorType", value: "custom" },
1526
- { name: "cursor.hoverCursor", value: null, isNotEqual: true }
3115
+ { name: "cursor.hoverCursor", value: null, isNotEqual: !0 }
1527
3116
  ],
1528
3117
  then: {
1529
3118
  name: "properties.cursor.properties.hoverCursorScale.display.visible",
1530
- value: true
3119
+ value: !0
1531
3120
  }
1532
3121
  }
1533
3122
  ]
1534
3123
  },
1535
3124
  content: {
1536
- layoutBased: false,
3125
+ layoutBased: !1,
1537
3126
  type: "array",
1538
3127
  settings: {
1539
- addItemFromFileExplorer: true,
3128
+ addItemFromFileExplorer: !0,
1540
3129
  defaultWidth: 500
1541
3130
  },
1542
3131
  items: {
@@ -1546,7 +3135,7 @@ const ControlImageRevealSliderComponent = {
1546
3135
  type: "object",
1547
3136
  label: "Image",
1548
3137
  display: {
1549
- isObjectFitEditable: false,
3138
+ isObjectFitEditable: !1,
1550
3139
  minWidth: 58,
1551
3140
  maxWidth: 108,
1552
3141
  type: "media-input"
@@ -1614,899 +3203,598 @@ const ControlImageRevealSliderComponent = {
1614
3203
  }
1615
3204
  }
1616
3205
  }
3206
+ }, ra = "LightBox-module__hidden___9s-9x", ia = "LightBox-module__heroImage___sTxNF", oa = "LightBox-module__background___rm9ml", aa = "LightBox-module__editor___4ACaY", sa = "LightBox-module__contentStyle___Bgnsq", la = "LightBox-module__imageStyle___tLIlB", ca = "LightBox-module__imgWrapper___LuFUp", ua = "LightBox-module__contain___8-yaS", da = "LightBox-module__cover___hNvOG", pa = "LightBox-module__caption___b6L2I", fa = "LightBox-module__captionTextInner___rCGNH", ga = "LightBox-module__lightboxSplide___XFuWC", ma = "LightBox-module__arrow___iz38X", ha = "LightBox-module__arrowVertical___Zfz81", va = "LightBox-module__nextArrow___zkAQN", ya = "LightBox-module__arrowInner___p48sW", _a = "LightBox-module__arrowIcon___3VaFf", ba = "LightBox-module__arrowImg___pNV88", Sa = "LightBox-module__mirror___pjeXc", wa = "LightBox-module__thumbsWrapper___GB-nU", Ea = "LightBox-module__thumbsContainerVertical___wttk5", Ca = "LightBox-module__thumbsContainer___osSma", Aa = "LightBox-module__thumbsAlignStart___MO6tY", Ia = "LightBox-module__thumbsAlignCenter___Q4sUx", xa = "LightBox-module__thumbsAlignEnd___p4y9R", La = "LightBox-module__thumbItem___HvnF3", Ta = "LightBox-module__closeButton___g2khP", Ra = "LightBox-module__fadeIn___0m5GW", Na = "LightBox-module__slideInLeft___gPYwC", ka = "LightBox-module__slideInRight___S-pPp", Oa = "LightBox-module__slideInTop___DFdAj", Da = "LightBox-module__slideInBottom___m27kZ", Pa = "LightBox-module__fadeOut___55qBR", Ba = "LightBox-module__slideOutLeft___NvU7P", za = "LightBox-module__slideOutRight___SK7eC", Wa = "LightBox-module__slideOutTop___Vgg0z", Ma = "LightBox-module__slideOutBottom___nJ0Ef", Fa = "LightBox-module__scaleSlide___vZriG", D = {
3207
+ hidden: ra,
3208
+ heroImage: ia,
3209
+ background: oa,
3210
+ editor: aa,
3211
+ contentStyle: sa,
3212
+ imageStyle: la,
3213
+ imgWrapper: ca,
3214
+ contain: ua,
3215
+ cover: da,
3216
+ caption: pa,
3217
+ captionTextInner: fa,
3218
+ lightboxSplide: ga,
3219
+ arrow: ma,
3220
+ arrowVertical: ha,
3221
+ nextArrow: va,
3222
+ arrowInner: ya,
3223
+ arrowIcon: _a,
3224
+ arrowImg: ba,
3225
+ mirror: Sa,
3226
+ thumbsWrapper: wa,
3227
+ thumbsContainerVertical: Ea,
3228
+ thumbsContainer: Ca,
3229
+ thumbsAlignStart: Aa,
3230
+ thumbsAlignCenter: Ia,
3231
+ thumbsAlignEnd: xa,
3232
+ thumbItem: La,
3233
+ closeButton: Ta,
3234
+ fadeIn: Ra,
3235
+ slideInLeft: Na,
3236
+ slideInRight: ka,
3237
+ slideInTop: Oa,
3238
+ slideInBottom: Da,
3239
+ fadeOut: Pa,
3240
+ slideOutLeft: Ba,
3241
+ slideOutRight: za,
3242
+ slideOutTop: Wa,
3243
+ slideOutBottom: Ma,
3244
+ scaleSlide: Fa
3245
+ }, kt = (e, n, t) => {
3246
+ const r = {}, [o, a] = e.split("-");
3247
+ return o === "top" ? (r.top = "0", r.bottom = "auto") : o === "middle" ? (r.top = "50%", r.bottom = "auto") : o === "bottom" && (r.top = "auto", r.bottom = "0"), a === "left" ? (r.left = "0", r.right = "auto") : a === "center" ? (r.left = "50%", r.right = "auto") : a === "right" && (r.left = "auto", r.right = "0"), o === "middle" && a === "center" ? r.transform = `translate(calc(-50% + ${U(n.x, t)}), calc(-50% + ${U(n.y, t)}))` : o === "middle" ? r.transform = `translate(${U(n.x, t)}, calc(-50% + ${U(n.y, t)}))` : a === "center" ? r.transform = `translate(calc(-50% + ${U(n.x, t)}), ${U(n.y, t)})` : r.transform = `translate(${U(n.x, t)}, ${U(n.y, t)})`, r;
1617
3248
  };
1618
- const hidden = "LightBox-module__hidden___9s-9x";
1619
- const heroImage = "LightBox-module__heroImage___sTxNF";
1620
- const background = "LightBox-module__background___rm9ml";
1621
- const editor = "LightBox-module__editor___4ACaY";
1622
- const contentStyle = "LightBox-module__contentStyle___Bgnsq";
1623
- const imageStyle = "LightBox-module__imageStyle___tLIlB";
1624
- const imgWrapper = "LightBox-module__imgWrapper___LuFUp";
1625
- const contain = "LightBox-module__contain___8-yaS";
1626
- const cover = "LightBox-module__cover___hNvOG";
1627
- const caption = "LightBox-module__caption___b6L2I";
1628
- const captionTextInner = "LightBox-module__captionTextInner___rCGNH";
1629
- const lightboxSplide = "LightBox-module__lightboxSplide___XFuWC";
1630
- const arrow = "LightBox-module__arrow___iz38X";
1631
- const arrowVertical = "LightBox-module__arrowVertical___Zfz81";
1632
- const nextArrow = "LightBox-module__nextArrow___zkAQN";
1633
- const arrowInner = "LightBox-module__arrowInner___p48sW";
1634
- const arrowIcon = "LightBox-module__arrowIcon___3VaFf";
1635
- const arrowImg = "LightBox-module__arrowImg___pNV88";
1636
- const mirror = "LightBox-module__mirror___pjeXc";
1637
- const thumbsWrapper = "LightBox-module__thumbsWrapper___GB-nU";
1638
- const thumbsContainerVertical = "LightBox-module__thumbsContainerVertical___wttk5";
1639
- const thumbsContainer = "LightBox-module__thumbsContainer___osSma";
1640
- const thumbsAlignStart = "LightBox-module__thumbsAlignStart___MO6tY";
1641
- const thumbsAlignCenter = "LightBox-module__thumbsAlignCenter___Q4sUx";
1642
- const thumbsAlignEnd = "LightBox-module__thumbsAlignEnd___p4y9R";
1643
- const thumbItem = "LightBox-module__thumbItem___HvnF3";
1644
- const closeButton = "LightBox-module__closeButton___g2khP";
1645
- const fadeIn = "LightBox-module__fadeIn___0m5GW";
1646
- const slideInLeft = "LightBox-module__slideInLeft___gPYwC";
1647
- const slideInRight = "LightBox-module__slideInRight___S-pPp";
1648
- const slideInTop = "LightBox-module__slideInTop___DFdAj";
1649
- const slideInBottom = "LightBox-module__slideInBottom___m27kZ";
1650
- const fadeOut = "LightBox-module__fadeOut___55qBR";
1651
- const slideOutLeft = "LightBox-module__slideOutLeft___NvU7P";
1652
- const slideOutRight = "LightBox-module__slideOutRight___SK7eC";
1653
- const slideOutTop = "LightBox-module__slideOutTop___Vgg0z";
1654
- const slideOutBottom = "LightBox-module__slideOutBottom___nJ0Ef";
1655
- const scaleSlide = "LightBox-module__scaleSlide___vZriG";
1656
- const classes = {
1657
- hidden,
1658
- heroImage,
1659
- background,
1660
- editor,
1661
- contentStyle,
1662
- imageStyle,
1663
- imgWrapper,
1664
- contain,
1665
- cover,
1666
- caption,
1667
- captionTextInner,
1668
- lightboxSplide,
1669
- arrow,
1670
- arrowVertical,
1671
- nextArrow,
1672
- arrowInner,
1673
- arrowIcon,
1674
- arrowImg,
1675
- mirror,
1676
- thumbsWrapper,
1677
- thumbsContainerVertical,
1678
- thumbsContainer,
1679
- thumbsAlignStart,
1680
- thumbsAlignCenter,
1681
- thumbsAlignEnd,
1682
- thumbItem,
1683
- closeButton,
1684
- fadeIn,
1685
- slideInLeft,
1686
- slideInRight,
1687
- slideInTop,
1688
- slideInBottom,
1689
- fadeOut,
1690
- slideOutLeft,
1691
- slideOutRight,
1692
- slideOutTop,
1693
- slideOutBottom,
1694
- scaleSlide
1695
- };
1696
- const getPositionStyles = (position, offset, isEditor) => {
1697
- const styles2 = {};
1698
- const [vertical, horizontal] = position.split("-");
1699
- if (vertical === "top") {
1700
- styles2.top = "0";
1701
- styles2.bottom = "auto";
1702
- } else if (vertical === "middle") {
1703
- styles2.top = "50%";
1704
- styles2.bottom = "auto";
1705
- } else if (vertical === "bottom") {
1706
- styles2.top = "auto";
1707
- styles2.bottom = "0";
1708
- }
1709
- if (horizontal === "left") {
1710
- styles2.left = "0";
1711
- styles2.right = "auto";
1712
- } else if (horizontal === "center") {
1713
- styles2.left = "50%";
1714
- styles2.right = "auto";
1715
- } else if (horizontal === "right") {
1716
- styles2.left = "auto";
1717
- styles2.right = "0";
1718
- }
1719
- if (vertical === "middle" && horizontal === "center") {
1720
- styles2.transform = `translate(calc(-50% + ${scalingValue(offset.x, isEditor)}), calc(-50% + ${scalingValue(offset.y, isEditor)}))`;
1721
- } else if (vertical === "middle") {
1722
- styles2.transform = `translate(${scalingValue(offset.x, isEditor)}, calc(-50% + ${scalingValue(offset.y, isEditor)}))`;
1723
- } else if (horizontal === "center") {
1724
- styles2.transform = `translate(calc(-50% + ${scalingValue(offset.x, isEditor)}), ${scalingValue(offset.y, isEditor)})`;
1725
- } else {
1726
- styles2.transform = `translate(${scalingValue(offset.x, isEditor)}, ${scalingValue(offset.y, isEditor)})`;
1727
- }
1728
- return styles2;
1729
- };
1730
- function getPaddingValues(img2) {
1731
- const style = window.getComputedStyle(img2);
3249
+ function Fr(e) {
3250
+ const n = window.getComputedStyle(e);
1732
3251
  return {
1733
- top: parseFloat(style.paddingTop) || 0,
1734
- right: parseFloat(style.paddingRight) || 0,
1735
- bottom: parseFloat(style.paddingBottom) || 0,
1736
- left: parseFloat(style.paddingLeft) || 0
3252
+ top: parseFloat(n.paddingTop) || 0,
3253
+ right: parseFloat(n.paddingRight) || 0,
3254
+ bottom: parseFloat(n.paddingBottom) || 0,
3255
+ left: parseFloat(n.paddingLeft) || 0
1737
3256
  };
1738
3257
  }
1739
- function getDisplayedImageRect(img2) {
1740
- const container = img2.getBoundingClientRect();
1741
- const padding = getPaddingValues(img2);
1742
- const containerW = Math.max(0, container.width - padding.left - padding.right);
1743
- const containerH = Math.max(0, container.height - padding.top - padding.bottom);
1744
- const imgW = img2.naturalWidth;
1745
- const imgH = img2.naturalHeight;
1746
- const containerRatio = containerW / containerH;
1747
- const imgRatio = imgW / imgH;
1748
- let renderedW, renderedH;
1749
- if (imgRatio > containerRatio) {
1750
- renderedW = containerW;
1751
- renderedH = containerW / imgRatio;
1752
- } else {
1753
- renderedH = containerH;
1754
- renderedW = containerH * imgRatio;
1755
- }
1756
- const contentLeft = container.left + padding.left;
1757
- const contentTop = container.top + padding.top;
1758
- const offsetX = (containerW - renderedW) / 2 + contentLeft;
1759
- const offsetY = (containerH - renderedH) / 2 + contentTop;
3258
+ function Jn(e) {
3259
+ const n = e.getBoundingClientRect(), t = Fr(e), r = Math.max(0, n.width - t.left - t.right), o = Math.max(0, n.height - t.top - t.bottom), a = e.naturalWidth, i = e.naturalHeight, l = r / o, s = a / i;
3260
+ let d, u;
3261
+ s > l ? (d = r, u = r / s) : (u = o, d = o * s);
3262
+ const S = n.left + t.left, m = n.top + t.top, v = (r - d) / 2 + S, c = (o - u) / 2 + m;
1760
3263
  return {
1761
- x: offsetX,
1762
- y: offsetY,
1763
- width: renderedW,
1764
- height: renderedH
3264
+ x: v,
3265
+ y: c,
3266
+ width: d,
3267
+ height: u
1765
3268
  };
1766
3269
  }
1767
- function getPaddedContainerBounds(img2) {
1768
- const container = img2.getBoundingClientRect();
1769
- const padding = getPaddingValues(img2);
3270
+ function Zn(e) {
3271
+ const n = e.getBoundingClientRect(), t = Fr(e);
1770
3272
  return {
1771
- left: container.left + padding.left,
1772
- right: container.right - padding.right,
1773
- top: container.top + padding.top,
1774
- bottom: container.bottom - padding.bottom
3273
+ left: n.left + t.left,
3274
+ right: n.right - t.right,
3275
+ top: n.top + t.top,
3276
+ bottom: n.bottom - t.bottom
1775
3277
  };
1776
3278
  }
1777
- function getColorAlpha(color) {
1778
- const rgbaMatch = color.match(/rgba?\(([^)]+)\)/);
1779
- if (rgbaMatch) {
1780
- const values = rgbaMatch[1].split(",").map((v) => parseFloat(v.trim()));
1781
- if (values.length === 4) {
1782
- return values[3];
1783
- }
1784
- return 1;
3279
+ function Qn(e) {
3280
+ const n = e.match(/rgba?\(([^)]+)\)/);
3281
+ if (n) {
3282
+ const r = n[1].split(",").map((o) => parseFloat(o.trim()));
3283
+ return r.length === 4 ? r[3] : 1;
1785
3284
  }
1786
- const hexMatch = color.match(/^#([0-9a-fA-F]{8})$/);
1787
- if (hexMatch) {
1788
- const alphaHex = hexMatch[1].substring(6, 8);
1789
- return parseInt(alphaHex, 16) / 255;
3285
+ const t = e.match(/^#([0-9a-fA-F]{8})$/);
3286
+ if (t) {
3287
+ const r = t[1].substring(6, 8);
3288
+ return parseInt(r, 16) / 255;
1790
3289
  }
1791
- if (color.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/)) {
1792
- return 1;
1793
- }
1794
- return 1;
3290
+ return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/), 1;
1795
3291
  }
1796
- function getAnimationClasses(type, direction) {
1797
- const appearClass = (() => {
1798
- if (type === "fade in") return classes.fadeIn;
1799
- if (type === "slide in" || type === "mix") {
1800
- switch (direction) {
3292
+ function Va(e, n) {
3293
+ const t = (() => {
3294
+ if (e === "fade in") return D.fadeIn;
3295
+ if (e === "slide in" || e === "mix")
3296
+ switch (n) {
1801
3297
  case "left":
1802
- return classes.slideInLeft;
3298
+ return D.slideInLeft;
1803
3299
  case "right":
1804
- return classes.slideInRight;
3300
+ return D.slideInRight;
1805
3301
  case "top":
1806
- return classes.slideInTop;
3302
+ return D.slideInTop;
1807
3303
  case "bottom":
1808
- return classes.slideInBottom;
3304
+ return D.slideInBottom;
1809
3305
  default:
1810
- return classes.slideInRight;
3306
+ return D.slideInRight;
1811
3307
  }
1812
- }
1813
- return classes.fadeIn;
1814
- })();
1815
- const backdropAppearClass = (() => {
1816
- if (type === "fade in" || type === "mix") return classes.fadeIn;
1817
- if (type === "slide in") {
1818
- switch (direction) {
3308
+ return D.fadeIn;
3309
+ })(), r = (() => {
3310
+ if (e === "fade in" || e === "mix") return D.fadeIn;
3311
+ if (e === "slide in")
3312
+ switch (n) {
1819
3313
  case "left":
1820
- return classes.slideInLeft;
3314
+ return D.slideInLeft;
1821
3315
  case "right":
1822
- return classes.slideInRight;
3316
+ return D.slideInRight;
1823
3317
  case "top":
1824
- return classes.slideInTop;
3318
+ return D.slideInTop;
1825
3319
  case "bottom":
1826
- return classes.slideInBottom;
3320
+ return D.slideInBottom;
1827
3321
  default:
1828
- return classes.slideInRight;
3322
+ return D.slideInRight;
1829
3323
  }
1830
- }
1831
- return classes.fadeIn;
1832
- })();
1833
- const backdropDisappearClass = (() => {
1834
- if (type === "fade in" || type === "mix") return classes.fadeOut;
1835
- if (type === "slide in") {
1836
- switch (direction) {
3324
+ return D.fadeIn;
3325
+ })(), o = (() => {
3326
+ if (e === "fade in" || e === "mix") return D.fadeOut;
3327
+ if (e === "slide in")
3328
+ switch (n) {
1837
3329
  case "left":
1838
- return classes.slideOutLeft;
3330
+ return D.slideOutLeft;
1839
3331
  case "right":
1840
- return classes.slideOutRight;
3332
+ return D.slideOutRight;
1841
3333
  case "top":
1842
- return classes.slideOutTop;
3334
+ return D.slideOutTop;
1843
3335
  case "bottom":
1844
- return classes.slideOutBottom;
3336
+ return D.slideOutBottom;
1845
3337
  default:
1846
- return classes.slideOutRight;
3338
+ return D.slideOutRight;
1847
3339
  }
1848
- }
1849
- return classes.fadeOut;
1850
- })();
1851
- const disappearClass = (() => {
1852
- if (type === "fade in") return classes.fadeOut;
1853
- if (type === "slide in" || type === "mix") {
1854
- switch (direction) {
3340
+ return D.fadeOut;
3341
+ })(), a = (() => {
3342
+ if (e === "fade in") return D.fadeOut;
3343
+ if (e === "slide in" || e === "mix")
3344
+ switch (n) {
1855
3345
  case "left":
1856
- return classes.slideOutLeft;
3346
+ return D.slideOutLeft;
1857
3347
  case "right":
1858
- return classes.slideOutRight;
3348
+ return D.slideOutRight;
1859
3349
  case "top":
1860
- return classes.slideOutTop;
3350
+ return D.slideOutTop;
1861
3351
  case "bottom":
1862
- return classes.slideOutBottom;
3352
+ return D.slideOutBottom;
1863
3353
  default:
1864
- return classes.slideOutRight;
3354
+ return D.slideOutRight;
1865
3355
  }
1866
- }
1867
- return classes.fadeOut;
3356
+ return D.fadeOut;
1868
3357
  })();
1869
- return { appearClass, backdropAppearClass, backdropDisappearClass, disappearClass };
1870
- }
1871
- const LightboxGallery = ({ settings, content, styles: styles2, portalId, activeEvent, isEditor }) => {
1872
- const [open, setOpen] = useState(false);
1873
- const { url } = settings.thumbnailBlock.cover;
1874
- useEffect(() => {
1875
- if (activeEvent === "close") {
1876
- setOpen(false);
1877
- }
1878
- if (activeEvent === "open") {
1879
- setOpen(true);
1880
- }
1881
- }, [activeEvent]);
1882
- return /* @__PURE__ */ jsxs(Fragment, { children: [
1883
- /* @__PURE__ */ jsx(
3358
+ return { appearClass: t, backdropAppearClass: r, backdropDisappearClass: o, disappearClass: a };
3359
+ }
3360
+ const ja = ({ settings: e, content: n, styles: t, portalId: r, activeEvent: o, isEditor: a }) => {
3361
+ const [i, l] = ue(!1), { url: s } = e.thumbnailBlock.cover;
3362
+ return me(() => {
3363
+ o === "close" && l(!1), o === "open" && l(!0);
3364
+ }, [o]), /* @__PURE__ */ Ae(pt, { children: [
3365
+ /* @__PURE__ */ M(
1884
3366
  "img",
1885
3367
  {
1886
- src: url,
3368
+ src: s,
1887
3369
  alt: "Cover",
1888
- className: classes.heroImage,
1889
- onClick: () => setOpen(true)
3370
+ className: D.heroImage,
3371
+ onClick: () => l(!0)
1890
3372
  }
1891
3373
  ),
1892
- /* @__PURE__ */ jsx(
1893
- Lightbox,
3374
+ /* @__PURE__ */ M(
3375
+ $a,
1894
3376
  {
1895
- isOpen: open,
1896
- onClose: () => setOpen(false),
1897
- content,
1898
- settings,
1899
- lightboxStyles: styles2,
1900
- portalId,
1901
- isEditor
3377
+ isOpen: i,
3378
+ onClose: () => l(!1),
3379
+ content: n,
3380
+ settings: e,
3381
+ lightboxStyles: t,
3382
+ portalId: r,
3383
+ isEditor: a
1902
3384
  }
1903
3385
  )
1904
3386
  ] });
1905
- };
1906
- const Lightbox = ({ isOpen, onClose, content, lightboxStyles, settings, portalId, isEditor, metadata }) => {
1907
- var _a;
1908
- const [currentIndex, setCurrentIndex] = useState(0);
1909
- const [splideKey, setSplideKey] = useState(0);
1910
- const [isClosing, setIsClosing] = useState(false);
1911
- const [animationFinished, setAnimationFinished] = useState(false);
1912
- const [thumbnailDimensions, setThumbnailDimensions] = useState({});
1913
- const lightboxRef = useRef(null);
1914
- const prevSliderTypeRef = useRef(null);
1915
- const imageRef = useRef(null);
1916
- const isClosingRef = useRef(false);
1917
- const animationTargetRef = useRef(null);
1918
- const animationEndHandlerRef = useRef(null);
1919
- const appearAnimationEndHandlerRef = useRef(null);
1920
- const dragStartRef = useRef(null);
1921
- const hasDraggedRef = useRef(false);
1922
- const thumbsWrapperRef = useRef(null);
1923
- const [hasThumbsOverflow, setHasThumbsOverflow] = useState(false);
1924
- const { appear, triggers, slider, thumbnail, controls, area, caption: caption2, layout } = settings.lightboxBlock;
1925
- const { appearClass, backdropAppearClass, backdropDisappearClass, disappearClass } = getAnimationClasses(appear.type, appear.direction);
1926
- const itemId = (metadata == null ? void 0 : metadata.itemId) ?? null;
1927
- useEffect(() => {
1928
- const handleLayoutChange = () => {
3387
+ }, $a = ({ isOpen: e, onClose: n, content: t, lightboxStyles: r, settings: o, portalId: a, isEditor: i, metadata: l }) => {
3388
+ var W;
3389
+ const [s, d] = ue(0), [u, S] = ue(0), [m, v] = ue(!1), [c, p] = ue(!1), [w, E] = ue({}), g = be(null), b = be(null), F = be(null), B = be(!1), I = be(null), h = be(null), C = be(null), N = be(null), z = be(!1), T = be(null), [O, P] = ue(!1), { appear: H, triggers: $, slider: f, thumbnail: R, controls: x, area: L, caption: _, layout: k } = o.lightboxBlock, { appearClass: G, backdropAppearClass: ne, backdropDisappearClass: ee, disappearClass: he } = Va(H.type, H.direction), A = (l == null ? void 0 : l.itemId) ?? null;
3390
+ me(() => {
3391
+ const y = () => {
1929
3392
  setTimeout(() => {
1930
- var _a2, _b;
1931
- (_b = (_a2 = lightboxRef.current) == null ? void 0 : _a2.splide) == null ? void 0 : _b.refresh();
3393
+ var Y, J;
3394
+ (J = (Y = g.current) == null ? void 0 : Y.splide) == null || J.refresh();
1932
3395
  }, 16);
3396
+ }, V = () => {
3397
+ S((Y) => Y + 1);
1933
3398
  };
1934
- const handleComponentContentChange = () => {
1935
- setSplideKey((prev) => prev + 1);
1936
- };
1937
- window.addEventListener("ArticleEditor.Layout:change", handleLayoutChange);
1938
- window.addEventListener("ArticleEditor.ComponentContent:change", handleComponentContentChange);
1939
- return () => {
1940
- window.removeEventListener("ArticleEditor.Layout:change", handleLayoutChange);
1941
- window.removeEventListener("ArticleEditor.ComponentContent:change", handleComponentContentChange);
3399
+ return window.addEventListener("ArticleEditor.Layout:change", y), window.addEventListener("ArticleEditor.ComponentContent:change", V), () => {
3400
+ window.removeEventListener("ArticleEditor.Layout:change", y), window.removeEventListener("ArticleEditor.ComponentContent:change", V);
1942
3401
  };
1943
- }, []);
1944
- useEffect(() => {
1945
- if (!isOpen || !thumbnail.isActive) {
1946
- setHasThumbsOverflow(false);
3402
+ }, []), me(() => {
3403
+ if (!e || !R.isActive) {
3404
+ P(!1);
1947
3405
  return;
1948
3406
  }
1949
- const ref = thumbsWrapperRef.current;
1950
- if (!ref) return;
1951
- const checkOverflow = () => {
1952
- if (slider.direction === "horiz") {
1953
- setHasThumbsOverflow(ref.scrollWidth > ref.clientWidth);
1954
- } else {
1955
- setHasThumbsOverflow(ref.scrollHeight > ref.clientHeight);
1956
- }
3407
+ const y = T.current;
3408
+ if (!y) return;
3409
+ const V = () => {
3410
+ f.direction === "horiz" ? P(y.scrollWidth > y.clientWidth) : P(y.scrollHeight > y.clientHeight);
1957
3411
  };
1958
- checkOverflow();
1959
- const observer = new ResizeObserver(checkOverflow);
1960
- observer.observe(ref);
1961
- return () => observer.disconnect();
1962
- }, [isOpen, thumbnail.isActive, content.length, thumbnailDimensions, slider.direction]);
1963
- const handleClose = useCallback(() => {
1964
- const isMobile = window.matchMedia("(max-width: 768px)").matches;
1965
- const colorAlpha = getColorAlpha(area.color);
1966
- if (isMobile && !isEditor && colorAlpha > 0.9) {
1967
- document.body.style.backgroundColor = "";
1968
- }
1969
- setIsClosing(true);
1970
- isClosingRef.current = true;
1971
- const handleAnimationEnd = (e) => {
1972
- if (e.target === animationTargetRef.current && e.animationName) {
1973
- if (animationTargetRef.current && animationEndHandlerRef.current) {
1974
- animationTargetRef.current.removeEventListener("animationend", animationEndHandlerRef.current);
1975
- }
1976
- animationEndHandlerRef.current = null;
1977
- if (isClosingRef.current) {
1978
- isClosingRef.current = false;
1979
- onClose();
1980
- }
1981
- setIsClosing(false);
1982
- }
3412
+ V();
3413
+ const Y = new ResizeObserver(V);
3414
+ return Y.observe(y), () => Y.disconnect();
3415
+ }, [e, R.isActive, t.length, w, f.direction]);
3416
+ const q = Vr(() => {
3417
+ const y = window.matchMedia("(max-width: 768px)").matches, V = Qn(L.color);
3418
+ y && !i && V > 0.9 && (document.body.style.backgroundColor = ""), v(!0), B.current = !0;
3419
+ const Y = (J) => {
3420
+ J.target === I.current && J.animationName && (I.current && h.current && I.current.removeEventListener("animationend", h.current), h.current = null, B.current && (B.current = !1, n()), v(!1));
1983
3421
  };
1984
- if (animationTargetRef.current) {
1985
- animationEndHandlerRef.current = handleAnimationEnd;
1986
- animationTargetRef.current.addEventListener("animationend", handleAnimationEnd);
1987
- }
1988
- }, [onClose, area.color, isEditor]);
1989
- const handleTriggerClick = (img2, clientX, clientY) => {
1990
- var _a2, _b;
1991
- if (!img2) return;
1992
- if (triggers.type === "click" && triggers.switch === "image") {
1993
- if (triggers.repeat === "close" && currentIndex === content.length - 1) {
1994
- handleClose();
1995
- } else {
1996
- (_a2 = lightboxRef.current) == null ? void 0 : _a2.go("+1");
3422
+ I.current && (h.current = Y, I.current.addEventListener("animationend", Y));
3423
+ }, [n, L.color, i]), ge = (y, V, Y) => {
3424
+ var J, te;
3425
+ if (y) {
3426
+ if ($.type === "click" && $.switch === "image")
3427
+ $.repeat === "close" && s === t.length - 1 ? q() : (J = g.current) == null || J.go("+1");
3428
+ else if ($.type === "click" && $.switch === "50/50") {
3429
+ const Z = y.getBoundingClientRect(), X = V - Z.left, oe = Y - Z.top, ye = Z.width, le = Z.height;
3430
+ let pe;
3431
+ f.direction === "horiz" ? pe = X < ye / 2 ? "-1" : "+1" : pe = oe < le / 2 ? "-1" : "+1", (te = g.current) == null || te.go(pe);
1997
3432
  }
1998
- } else if (triggers.type === "click" && triggers.switch === "50/50") {
1999
- const rect = img2.getBoundingClientRect();
2000
- const clickX = clientX - rect.left;
2001
- const clickY = clientY - rect.top;
2002
- const imgWidth = rect.width;
2003
- const imgHeight = rect.height;
2004
- let dir;
2005
- if (slider.direction === "horiz") {
2006
- dir = clickX < imgWidth / 2 ? "-1" : "+1";
2007
- } else {
2008
- dir = clickY < imgHeight / 2 ? "-1" : "+1";
2009
- }
2010
- (_b = lightboxRef.current) == null ? void 0 : _b.go(dir);
2011
3433
  }
2012
- };
2013
- const handleImageWrapperClick = (e) => {
2014
- if (hasDraggedRef.current) {
2015
- hasDraggedRef.current = false;
3434
+ }, ie = (y) => {
3435
+ if (z.current) {
3436
+ z.current = !1;
2016
3437
  return;
2017
3438
  }
2018
- const currentImage = content[currentIndex];
2019
- const isCover = (currentImage == null ? void 0 : currentImage.image.objectFit) === "cover";
2020
- let clientX;
2021
- let clientY;
2022
- if ("changedTouches" in e && e.changedTouches.length > 0) {
2023
- clientX = e.changedTouches[0].clientX;
2024
- clientY = e.changedTouches[0].clientY;
2025
- } else if ("clientX" in e) {
2026
- clientX = e.clientX;
2027
- clientY = e.clientY;
2028
- } else {
3439
+ const V = t[s], Y = (V == null ? void 0 : V.image.objectFit) === "cover";
3440
+ let J, te;
3441
+ if ("changedTouches" in y && y.changedTouches.length > 0)
3442
+ J = y.changedTouches[0].clientX, te = y.changedTouches[0].clientY;
3443
+ else if ("clientX" in y)
3444
+ J = y.clientX, te = y.clientY;
3445
+ else
2029
3446
  return;
2030
- }
2031
- let inside;
2032
- if (isCover && imageRef.current) {
2033
- const bounds = getPaddedContainerBounds(imageRef.current);
2034
- inside = clientX >= bounds.left && clientX <= bounds.right && clientY >= bounds.top && clientY <= bounds.bottom;
3447
+ let Z;
3448
+ if (Y && F.current) {
3449
+ const X = Zn(F.current);
3450
+ Z = J >= X.left && J <= X.right && te >= X.top && te <= X.bottom;
2035
3451
  } else {
2036
- const rect = imageRef.current ? getDisplayedImageRect(imageRef.current) : null;
2037
- if (!rect) {
2038
- if (e.target === e.currentTarget) handleClose();
3452
+ const X = F.current ? Jn(F.current) : null;
3453
+ if (!X) {
3454
+ y.target === y.currentTarget && q();
2039
3455
  return;
2040
3456
  }
2041
- inside = clientX >= rect.x && clientX <= rect.x + rect.width && clientY >= rect.y && clientY <= rect.y + rect.height;
2042
- }
2043
- if (inside) {
2044
- handleTriggerClick(imageRef.current, clientX, clientY);
2045
- } else {
2046
- handleClose();
3457
+ Z = J >= X.x && J <= X.x + X.width && te >= X.y && te <= X.y + X.height;
2047
3458
  }
3459
+ Z ? ge(F.current, J, te) : q();
3460
+ }, fe = (y) => {
3461
+ const V = y.target;
3462
+ (V.classList.contains(D.thumbsWrapper) || V.classList.contains(D.thumbsContainer)) && ie(y);
2048
3463
  };
2049
- const handleThumbWrapperClick = (e) => {
2050
- const target = e.target;
2051
- if (target.classList.contains(classes.thumbsWrapper) || target.classList.contains(classes.thumbsContainer)) {
2052
- handleImageWrapperClick(e);
2053
- }
2054
- };
2055
- useEffect(() => {
2056
- if (!isOpen) return;
2057
- const onKeyDown = (event) => {
2058
- var _a2, _b;
2059
- if (event.key === "Escape") {
2060
- handleClose();
3464
+ me(() => {
3465
+ if (!e) return;
3466
+ const y = (V) => {
3467
+ var Y, J;
3468
+ if (V.key === "Escape") {
3469
+ q();
2061
3470
  return;
2062
3471
  }
2063
- if (event.key === "ArrowRight") {
2064
- setCurrentIndex((prev) => (prev + 1) % Math.max(content.length, 1));
2065
- (_a2 = lightboxRef.current) == null ? void 0 : _a2.go("+1");
3472
+ if (V.key === "ArrowRight") {
3473
+ d((te) => (te + 1) % Math.max(t.length, 1)), (Y = g.current) == null || Y.go("+1");
2066
3474
  return;
2067
3475
  }
2068
- if (event.key === "ArrowLeft") {
2069
- setCurrentIndex((prev) => (prev - 1 + Math.max(content.length, 1)) % Math.max(content.length, 1));
2070
- (_b = lightboxRef.current) == null ? void 0 : _b.go("-1");
2071
- }
3476
+ V.key === "ArrowLeft" && (d((te) => (te - 1 + Math.max(t.length, 1)) % Math.max(t.length, 1)), (J = g.current) == null || J.go("-1"));
2072
3477
  };
2073
- window.addEventListener("keydown", onKeyDown);
2074
- return () => {
2075
- window.removeEventListener("keydown", onKeyDown);
3478
+ return window.addEventListener("keydown", y), () => {
3479
+ window.removeEventListener("keydown", y);
2076
3480
  };
2077
- }, [isOpen, handleClose, content.length]);
2078
- useEffect(() => {
2079
- if (isOpen) {
2080
- setCurrentIndex(0);
2081
- setSplideKey((prev) => prev + 1);
2082
- isClosingRef.current = false;
2083
- setIsClosing(false);
2084
- setAnimationFinished(false);
2085
- setThumbnailDimensions({});
2086
- if (!itemId) return;
2087
- const event = new CustomEvent("page-overlay", { detail: { itemId } });
2088
- window.dispatchEvent(event);
3481
+ }, [e, q, t.length]), me(() => {
3482
+ if (e) {
3483
+ if (d(0), S((V) => V + 1), B.current = !1, v(!1), p(!1), E({}), !A) return;
3484
+ const y = new CustomEvent("page-overlay", { detail: { itemId: A } });
3485
+ window.dispatchEvent(y);
2089
3486
  }
2090
3487
  return () => {
2091
- if (animationTargetRef.current && animationEndHandlerRef.current) {
2092
- animationTargetRef.current.removeEventListener("animationend", animationEndHandlerRef.current);
2093
- animationEndHandlerRef.current = null;
2094
- }
2095
- setAnimationFinished(false);
3488
+ I.current && h.current && (I.current.removeEventListener("animationend", h.current), h.current = null), p(!1);
2096
3489
  };
2097
- }, [isOpen, itemId]);
2098
- useEffect(() => {
2099
- if (prevSliderTypeRef.current !== null && prevSliderTypeRef.current !== slider.type) {
2100
- setSplideKey((prev) => prev + 1);
2101
- }
2102
- prevSliderTypeRef.current = slider.type;
2103
- }, [slider.type]);
2104
- useEffect(() => {
2105
- if (!isOpen) return;
2106
- const originalOverflow = document.body.style.overflow;
2107
- const isMobile = window.matchMedia("(max-width: 768px)").matches;
2108
- const colorAlpha = getColorAlpha(area.color);
2109
- document.body.style.overflow = "hidden";
2110
- setAnimationFinished(false);
2111
- const handleAppearAnimationEnd = (e) => {
2112
- if (e.target === animationTargetRef.current && !isClosingRef.current && e.animationName) {
2113
- if (isMobile && !isEditor && colorAlpha > 0.9) {
2114
- document.body.style.backgroundColor = area.color;
2115
- }
2116
- setAnimationFinished(true);
2117
- if (animationTargetRef.current && appearAnimationEndHandlerRef.current) {
2118
- animationTargetRef.current.removeEventListener("animationend", appearAnimationEndHandlerRef.current);
2119
- }
2120
- appearAnimationEndHandlerRef.current = null;
2121
- }
3490
+ }, [e, A]), me(() => {
3491
+ b.current !== null && b.current !== f.type && S((y) => y + 1), b.current = f.type;
3492
+ }, [f.type]), me(() => {
3493
+ if (!e) return;
3494
+ const y = document.body.style.overflow, V = window.matchMedia("(max-width: 768px)").matches, Y = Qn(L.color);
3495
+ document.body.style.overflow = "hidden", p(!1);
3496
+ const J = (Z) => {
3497
+ Z.target === I.current && !B.current && Z.animationName && (V && !i && Y > 0.9 && (document.body.style.backgroundColor = L.color), p(!0), I.current && C.current && I.current.removeEventListener("animationend", C.current), C.current = null);
2122
3498
  };
2123
- if (animationTargetRef.current) {
2124
- appearAnimationEndHandlerRef.current = handleAppearAnimationEnd;
2125
- animationTargetRef.current.addEventListener("animationend", handleAppearAnimationEnd);
2126
- }
2127
- const preventScroll = (e) => {
2128
- const target = e.target;
2129
- if (target && (target.closest(`.${classes.thumbsWrapper}`) || target.closest(`.${classes.thumbsContainer}`))) {
2130
- return;
2131
- }
2132
- if (slider.type === "slide") {
2133
- return;
2134
- }
2135
- e.preventDefault();
3499
+ I.current && (C.current = J, I.current.addEventListener("animationend", J));
3500
+ const te = (Z) => {
3501
+ const X = Z.target;
3502
+ X && (X.closest(`.${D.thumbsWrapper}`) || X.closest(`.${D.thumbsContainer}`)) || f.type !== "slide" && Z.preventDefault();
2136
3503
  };
2137
- document.addEventListener("touchmove", preventScroll, { passive: false });
2138
- return () => {
2139
- document.body.style.overflow = originalOverflow;
2140
- document.removeEventListener("touchmove", preventScroll);
2141
- if (animationTargetRef.current && appearAnimationEndHandlerRef.current) {
2142
- animationTargetRef.current.removeEventListener("animationend", appearAnimationEndHandlerRef.current);
2143
- appearAnimationEndHandlerRef.current = null;
2144
- }
2145
- setAnimationFinished(false);
3504
+ return document.addEventListener("touchmove", te, { passive: !1 }), () => {
3505
+ document.body.style.overflow = y, document.removeEventListener("touchmove", te), I.current && C.current && (I.current.removeEventListener("animationend", C.current), C.current = null), p(!1);
2146
3506
  };
2147
- }, [isOpen, isEditor, area.color, slider.type]);
2148
- useEffect(() => {
2149
- if (!isOpen) return;
2150
- const handleTouchEnd = (e) => {
2151
- var _a2, _b;
2152
- if (isClosingRef.current) {
2153
- e.stopPropagation();
3507
+ }, [e, i, L.color, f.type]), me(() => {
3508
+ if (!e) return;
3509
+ const y = (V) => {
3510
+ var J, te;
3511
+ if (B.current) {
3512
+ V.stopPropagation();
2154
3513
  return;
2155
3514
  }
2156
- if (hasDraggedRef.current) {
2157
- hasDraggedRef.current = false;
3515
+ if (z.current) {
3516
+ z.current = !1;
2158
3517
  return;
2159
3518
  }
2160
- const target = e.target;
2161
- if (target && (target.closest(`.${classes.thumbsContainer}`) || target.closest(`.${classes.thumbItem}`))) {
2162
- return;
2163
- }
2164
- if (slider.type === "slide" && triggers.type === "drag" && ((_b = (_a2 = lightboxRef.current) == null ? void 0 : _a2.splide) == null ? void 0 : _b.root)) {
2165
- const splideContainer = lightboxRef.current.splide.root;
2166
- if (target && (splideContainer.contains(target) || splideContainer === target)) {
2167
- return;
2168
- }
2169
- }
2170
- if (e.touches.length === 0 && e.changedTouches.length > 0) {
2171
- const currentImage = content[currentIndex];
2172
- const isCover = (currentImage == null ? void 0 : currentImage.image.objectFit) === "cover";
2173
- const touch = e.changedTouches[0];
2174
- let inside;
2175
- if (isCover && imageRef.current) {
2176
- const bounds = getPaddedContainerBounds(imageRef.current);
2177
- inside = touch.clientX >= bounds.left && touch.clientX <= bounds.right && touch.clientY >= bounds.top && touch.clientY <= bounds.bottom;
2178
- } else {
2179
- const rect = imageRef.current ? getDisplayedImageRect(imageRef.current) : null;
2180
- if (!rect) return;
2181
- inside = touch.clientX >= rect.x && touch.clientX <= rect.x + rect.width && touch.clientY >= rect.y && touch.clientY <= rect.y + rect.height;
3519
+ const Y = V.target;
3520
+ if (!(Y && (Y.closest(`.${D.thumbsContainer}`) || Y.closest(`.${D.thumbItem}`)))) {
3521
+ if (f.type === "slide" && $.type === "drag" && ((te = (J = g.current) == null ? void 0 : J.splide) != null && te.root)) {
3522
+ const Z = g.current.splide.root;
3523
+ if (Y && (Z.contains(Y) || Z === Y))
3524
+ return;
2182
3525
  }
2183
- if (!inside) {
2184
- e.stopPropagation();
2185
- isClosingRef.current = true;
2186
- const blockNextClick = (clickEvent) => {
2187
- clickEvent.stopPropagation();
2188
- clickEvent.preventDefault();
2189
- document.removeEventListener("click", blockNextClick, true);
2190
- };
2191
- document.addEventListener("click", blockNextClick, true);
2192
- handleClose();
2193
- }
2194
- }
2195
- };
2196
- document.addEventListener("touchend", handleTouchEnd, { passive: true });
2197
- return () => {
2198
- document.removeEventListener("touchend", handleTouchEnd);
2199
- };
2200
- }, [isOpen, handleClose, currentIndex, content]);
2201
- const needsCustomVerticalDrag = (slider.type === "scale" || slider.type === "fade") && slider.direction === "vert" && triggers.type === "drag";
2202
- useEffect(() => {
2203
- var _a2, _b;
2204
- if (!isOpen || !needsCustomVerticalDrag || !((_b = (_a2 = lightboxRef.current) == null ? void 0 : _a2.splide) == null ? void 0 : _b.root)) return;
2205
- const container = lightboxRef.current.splide.root;
2206
- const DRAG_THRESHOLD = 30;
2207
- const handleMove = (clientX, clientY) => {
2208
- if (dragStartRef.current) {
2209
- const deltaX = Math.abs(clientX - dragStartRef.current.x);
2210
- const deltaY = Math.abs(clientY - dragStartRef.current.y);
2211
- if (deltaX > 0 || deltaY > 0) {
2212
- hasDraggedRef.current = true;
3526
+ if (V.touches.length === 0 && V.changedTouches.length > 0) {
3527
+ const Z = t[s], X = (Z == null ? void 0 : Z.image.objectFit) === "cover", oe = V.changedTouches[0];
3528
+ let ye;
3529
+ if (X && F.current) {
3530
+ const le = Zn(F.current);
3531
+ ye = oe.clientX >= le.left && oe.clientX <= le.right && oe.clientY >= le.top && oe.clientY <= le.bottom;
3532
+ } else {
3533
+ const le = F.current ? Jn(F.current) : null;
3534
+ if (!le) return;
3535
+ ye = oe.clientX >= le.x && oe.clientX <= le.x + le.width && oe.clientY >= le.y && oe.clientY <= le.y + le.height;
3536
+ }
3537
+ if (!ye) {
3538
+ V.stopPropagation(), B.current = !0;
3539
+ const le = (pe) => {
3540
+ pe.stopPropagation(), pe.preventDefault(), document.removeEventListener("click", le, !0);
3541
+ };
3542
+ document.addEventListener("click", le, !0), q();
3543
+ }
2213
3544
  }
2214
3545
  }
2215
3546
  };
2216
- const handlePointerMove = (e) => {
2217
- if (dragStartRef.current) {
2218
- e.preventDefault();
2219
- handleMove(e.clientX, e.clientY);
2220
- }
2221
- };
2222
- const handleTouchMove = (e) => {
2223
- if (dragStartRef.current && e.touches.length > 0) {
2224
- e.preventDefault();
2225
- handleMove(e.touches[0].clientX, e.touches[0].clientY);
2226
- }
2227
- };
2228
- const handleUp = (clientX, clientY) => {
2229
- if (!dragStartRef.current || !lightboxRef.current) {
2230
- dragStartRef.current = null;
2231
- return;
2232
- }
2233
- const deltaX = Math.abs(clientX - dragStartRef.current.x);
2234
- const deltaY = Math.abs(clientY - dragStartRef.current.y);
2235
- if (deltaY > DRAG_THRESHOLD && deltaY > deltaX) {
2236
- lightboxRef.current.go(clientY < dragStartRef.current.y ? "+1" : "-1");
2237
- }
2238
- dragStartRef.current = null;
3547
+ return document.addEventListener("touchend", y, { passive: !0 }), () => {
3548
+ document.removeEventListener("touchend", y);
2239
3549
  };
2240
- const handlePointerUp = (e) => {
2241
- if (dragStartRef.current) {
2242
- handleUp(e.clientX, e.clientY);
3550
+ }, [e, q, s, t]);
3551
+ const lt = (f.type === "scale" || f.type === "fade") && f.direction === "vert" && $.type === "drag";
3552
+ me(() => {
3553
+ var pe, Tt;
3554
+ if (!e || !lt || !((Tt = (pe = g.current) == null ? void 0 : pe.splide) != null && Tt.root)) return;
3555
+ const y = g.current.splide.root, V = 30, Y = (Q, ce) => {
3556
+ if (N.current) {
3557
+ const Ne = Math.abs(Q - N.current.x), Rt = Math.abs(ce - N.current.y);
3558
+ (Ne > 0 || Rt > 0) && (z.current = !0);
2243
3559
  }
2244
- document.removeEventListener("pointerup", handlePointerUp);
2245
- document.removeEventListener("pointercancel", handlePointerUp);
2246
- document.removeEventListener("pointermove", handlePointerMove);
2247
- };
2248
- const handleTouchEnd = (e) => {
2249
- if (!dragStartRef.current) {
3560
+ }, J = (Q) => {
3561
+ N.current && (Q.preventDefault(), Y(Q.clientX, Q.clientY));
3562
+ }, te = (Q) => {
3563
+ N.current && Q.touches.length > 0 && (Q.preventDefault(), Y(Q.touches[0].clientX, Q.touches[0].clientY));
3564
+ }, Z = (Q, ce) => {
3565
+ if (!N.current || !g.current) {
3566
+ N.current = null;
2250
3567
  return;
2251
3568
  }
2252
- if (e.changedTouches.length > 0) {
2253
- const touch = e.changedTouches[0];
2254
- handleUp(touch.clientX, touch.clientY);
2255
- }
2256
- document.removeEventListener("touchend", handleTouchEnd);
2257
- document.removeEventListener("touchcancel", handleTouchEnd);
2258
- document.removeEventListener("touchmove", handleTouchMove);
2259
- };
2260
- const handlePointerDown = (e) => {
2261
- dragStartRef.current = { x: e.clientX, y: e.clientY };
2262
- hasDraggedRef.current = false;
2263
- document.addEventListener("pointermove", handlePointerMove, { passive: false });
2264
- document.addEventListener("pointerup", handlePointerUp);
2265
- document.addEventListener("pointercancel", handlePointerUp);
2266
- };
2267
- const handleTouchStart = (e) => {
2268
- if (e.touches.length > 0) {
2269
- dragStartRef.current = { x: e.touches[0].clientX, y: e.touches[0].clientY };
2270
- hasDraggedRef.current = false;
2271
- document.addEventListener("touchmove", handleTouchMove, { passive: false });
2272
- document.addEventListener("touchend", handleTouchEnd);
2273
- document.addEventListener("touchcancel", handleTouchEnd);
3569
+ const Ne = Math.abs(Q - N.current.x), Rt = Math.abs(ce - N.current.y);
3570
+ Rt > V && Rt > Ne && g.current.go(ce < N.current.y ? "+1" : "-1"), N.current = null;
3571
+ }, X = (Q) => {
3572
+ N.current && Z(Q.clientX, Q.clientY), document.removeEventListener("pointerup", X), document.removeEventListener("pointercancel", X), document.removeEventListener("pointermove", J);
3573
+ }, oe = (Q) => {
3574
+ if (N.current) {
3575
+ if (Q.changedTouches.length > 0) {
3576
+ const ce = Q.changedTouches[0];
3577
+ Z(ce.clientX, ce.clientY);
3578
+ }
3579
+ document.removeEventListener("touchend", oe), document.removeEventListener("touchcancel", oe), document.removeEventListener("touchmove", te);
2274
3580
  }
3581
+ }, ye = (Q) => {
3582
+ N.current = { x: Q.clientX, y: Q.clientY }, z.current = !1, document.addEventListener("pointermove", J, { passive: !1 }), document.addEventListener("pointerup", X), document.addEventListener("pointercancel", X);
3583
+ }, le = (Q) => {
3584
+ Q.touches.length > 0 && (N.current = { x: Q.touches[0].clientX, y: Q.touches[0].clientY }, z.current = !1, document.addEventListener("touchmove", te, { passive: !1 }), document.addEventListener("touchend", oe), document.addEventListener("touchcancel", oe));
2275
3585
  };
2276
- container.addEventListener("pointerdown", handlePointerDown);
2277
- container.addEventListener("touchstart", handleTouchStart);
2278
- return () => {
2279
- container.removeEventListener("pointerdown", handlePointerDown);
2280
- container.removeEventListener("touchstart", handleTouchStart);
2281
- document.removeEventListener("pointermove", handlePointerMove);
2282
- document.removeEventListener("pointerup", handlePointerUp);
2283
- document.removeEventListener("pointercancel", handlePointerUp);
2284
- document.removeEventListener("touchmove", handleTouchMove);
2285
- document.removeEventListener("touchend", handleTouchEnd);
2286
- document.removeEventListener("touchcancel", handleTouchEnd);
2287
- dragStartRef.current = null;
2288
- hasDraggedRef.current = false;
3586
+ return y.addEventListener("pointerdown", ye), y.addEventListener("touchstart", le), () => {
3587
+ y.removeEventListener("pointerdown", ye), y.removeEventListener("touchstart", le), document.removeEventListener("pointermove", J), document.removeEventListener("pointerup", X), document.removeEventListener("pointercancel", X), document.removeEventListener("touchmove", te), document.removeEventListener("touchend", oe), document.removeEventListener("touchcancel", oe), N.current = null, z.current = !1;
2289
3588
  };
2290
- }, [isOpen, needsCustomVerticalDrag, splideKey]);
2291
- const backdropStyles = {
2292
- backgroundColor: area.color,
2293
- backdropFilter: `blur(${area.blur}px)`,
2294
- animationDuration: `${parseInt(appear.duration)}ms`,
3589
+ }, [e, lt, u]);
3590
+ const Lt = {
3591
+ backgroundColor: L.color,
3592
+ backdropFilter: `blur(${L.blur}px)`,
3593
+ animationDuration: `${parseInt(H.duration)}ms`,
2295
3594
  animationTimingFunction: "ease",
2296
3595
  animationFillMode: "both"
2297
3596
  };
2298
- if (!document.getElementById(portalId)) return null;
2299
- return createPortal(
2300
- /* @__PURE__ */ jsxs(Fragment, { children: [
2301
- /* @__PURE__ */ jsx(
3597
+ return document.getElementById(a) ? jr(
3598
+ /* @__PURE__ */ Ae(pt, { children: [
3599
+ /* @__PURE__ */ M(
2302
3600
  "div",
2303
3601
  {
2304
- ref: !isEditor ? animationTargetRef : null,
2305
- className: cn(classes.background, isClosing ? backdropDisappearClass : backdropAppearClass, { [classes.editor]: isEditor }, { [classes.hidden]: !isOpen }),
3602
+ ref: i ? null : I,
3603
+ className: ae(D.background, m ? ee : ne, { [D.editor]: i }, { [D.hidden]: !e }),
2306
3604
  style: {
2307
- ...backdropStyles,
2308
- ...animationFinished && !isEditor && !isClosing ? { position: "absolute" } : {}
3605
+ ...Lt,
3606
+ ...c && !i && !m ? { position: "absolute" } : {}
2309
3607
  }
2310
3608
  }
2311
3609
  ),
2312
- /* @__PURE__ */ jsxs(
3610
+ /* @__PURE__ */ Ae(
2313
3611
  "div",
2314
3612
  {
2315
- ref: isEditor ? animationTargetRef : null,
2316
- className: cn(classes.contentStyle, !isClosing ? appearClass : disappearClass, { [classes.editor]: isEditor }, { [classes.hidden]: !isOpen }),
3613
+ ref: i ? I : null,
3614
+ className: ae(D.contentStyle, m ? he : G, { [D.editor]: i }, { [D.hidden]: !e }),
2317
3615
  style: {
2318
- animationDuration: `${parseInt(appear.duration)}ms`,
3616
+ animationDuration: `${parseInt(H.duration)}ms`,
2319
3617
  animationTimingFunction: "ease",
2320
3618
  animationFillMode: "both"
2321
3619
  },
2322
3620
  children: [
2323
- /* @__PURE__ */ jsx(
2324
- Splide,
3621
+ /* @__PURE__ */ M(
3622
+ zr,
2325
3623
  {
2326
- onMove: (splide) => setCurrentIndex(splide.index),
2327
- ref: lightboxRef,
2328
- className: classes.lightboxSplide,
3624
+ onMove: (y) => d(y.index),
3625
+ ref: g,
3626
+ className: D.lightboxSplide,
2329
3627
  options: {
2330
- arrows: false,
2331
- speed: slider.duration ? parseInt(slider.duration) : 500,
2332
- direction: (() => {
2333
- const isHoriz = slider.direction === "horiz";
2334
- return isHoriz || slider.type === "fade" || slider.type === "scale" ? "ltr" : "ttb";
2335
- })(),
2336
- pagination: false,
3628
+ arrows: !1,
3629
+ speed: f.duration ? parseInt(f.duration) : 500,
3630
+ direction: f.direction === "horiz" || f.type === "fade" || f.type === "scale" ? "ltr" : "ttb",
3631
+ pagination: !1,
2337
3632
  // Disable Splide's drag when we need custom vertical drag handling
2338
- drag: triggers.type === "drag" && !needsCustomVerticalDrag,
3633
+ drag: $.type === "drag" && !lt,
2339
3634
  perPage: 1,
2340
3635
  width: "100%",
2341
3636
  height: "100%",
2342
- type: slider.type === "fade" || slider.type === "scale" ? "fade" : "loop",
3637
+ type: f.type === "fade" || f.type === "scale" ? "fade" : "loop",
2343
3638
  padding: 0,
2344
- rewind: triggers.repeat !== "close",
3639
+ rewind: $.repeat !== "close",
2345
3640
  start: 0
2346
3641
  },
2347
- style: { "--splide-speed": slider.duration },
2348
- children: content.map((item, index) => {
2349
- const positionStyles = getPositionStyles(layout.position, layout.offset, isEditor);
2350
- const padding = `${scalingValue(layout.padding.top, isEditor)} ${scalingValue(layout.padding.right, isEditor)} ${scalingValue(layout.padding.bottom, isEditor)} ${scalingValue(layout.padding.left, isEditor)}`;
2351
- const imageStyle2 = slider.type === "scale" ? (() => {
2352
- const { transform, ...restStyles } = positionStyles;
3642
+ style: { "--splide-speed": f.duration },
3643
+ children: t.map((y, V) => {
3644
+ const Y = kt(k.position, k.offset, i), J = `${U(k.padding.top, i)} ${U(k.padding.right, i)} ${U(k.padding.bottom, i)} ${U(k.padding.left, i)}`, te = f.type === "scale" ? (() => {
3645
+ const { transform: Z, ...X } = Y;
2353
3646
  return {
2354
- ...restStyles,
3647
+ ...X,
2355
3648
  position: "absolute",
2356
- padding,
3649
+ padding: J,
2357
3650
  boxSizing: "border-box",
2358
- "--position-transform": transform || "none"
3651
+ "--position-transform": Z || "none"
2359
3652
  };
2360
- })() : { ...positionStyles, position: "absolute", padding, boxSizing: "border-box" };
2361
- return /* @__PURE__ */ jsx(SplideSlide, { children: /* @__PURE__ */ jsx("div", { className: classes.imgWrapper, onClick: handleImageWrapperClick, children: /* @__PURE__ */ jsx(
3653
+ })() : { ...Y, position: "absolute", padding: J, boxSizing: "border-box" };
3654
+ return /* @__PURE__ */ M(Wr, { children: /* @__PURE__ */ M("div", { className: D.imgWrapper, onClick: ie, children: /* @__PURE__ */ M(
2362
3655
  "img",
2363
3656
  {
2364
- ref: index === currentIndex ? imageRef : null,
2365
- className: cn(classes.imageStyle, {
2366
- [classes.contain]: item.image.objectFit === "contain",
2367
- [classes.cover]: item.image.objectFit === "cover",
2368
- [classes.scaleSlide]: slider.type === "scale"
3657
+ ref: V === s ? F : null,
3658
+ className: ae(D.imageStyle, {
3659
+ [D.contain]: y.image.objectFit === "contain",
3660
+ [D.cover]: y.image.objectFit === "cover",
3661
+ [D.scaleSlide]: f.type === "scale"
2369
3662
  }),
2370
- src: item.image.url,
2371
- alt: item.image.name ?? "",
2372
- style: { ...imageStyle2, pointerEvents: item.image.objectFit === "contain" ? "none" : "auto" }
3663
+ src: y.image.url,
3664
+ alt: y.image.name ?? "",
3665
+ style: { ...te, pointerEvents: y.image.objectFit === "contain" ? "none" : "auto" }
2373
3666
  }
2374
- ) }) }, index);
3667
+ ) }) }, V);
2375
3668
  })
2376
3669
  },
2377
- splideKey
3670
+ u
2378
3671
  ),
2379
- controls.isActive && /* @__PURE__ */ jsxs(Fragment, { children: [
2380
- /* @__PURE__ */ jsx(
3672
+ x.isActive && /* @__PURE__ */ Ae(pt, { children: [
3673
+ /* @__PURE__ */ M(
2381
3674
  "div",
2382
3675
  {
2383
- className: cn(classes.arrow, { [classes.arrowVertical]: slider.direction === "vert" }),
2384
- style: { color: controls.color, ["--arrow-hover-color"]: controls.hover },
2385
- children: /* @__PURE__ */ jsxs(
3676
+ className: ae(D.arrow, { [D.arrowVertical]: f.direction === "vert" }),
3677
+ style: { color: x.color, "--arrow-hover-color": x.hover },
3678
+ children: /* @__PURE__ */ Ae(
2386
3679
  "button",
2387
3680
  {
2388
- className: classes.arrowInner,
2389
- style: { transform: `translate(${scalingValue(controls.offset.x, isEditor)}, ${scalingValue(controls.offset.y * (slider.direction === "horiz" ? 1 : -1), isEditor)}) scale(${controls.scale}) rotate(${slider.direction === "horiz" ? "0deg" : "90deg"})` },
3681
+ className: D.arrowInner,
3682
+ style: { transform: `translate(${U(x.offset.x, i)}, ${U(x.offset.y * (f.direction === "horiz" ? 1 : -1), i)}) scale(${x.scale}) rotate(${f.direction === "horiz" ? "0deg" : "90deg"})` },
2390
3683
  onClick: () => {
2391
- var _a2;
2392
- return (_a2 = lightboxRef.current) == null ? void 0 : _a2.go("-1");
3684
+ var y;
3685
+ return (y = g.current) == null ? void 0 : y.go("-1");
2393
3686
  },
2394
3687
  "aria-label": "Previous",
2395
3688
  children: [
2396
- controls.arrowsImgUrl && /* @__PURE__ */ jsx(
2397
- SvgImage,
3689
+ x.arrowsImgUrl && /* @__PURE__ */ M(
3690
+ dt,
2398
3691
  {
2399
- url: controls.arrowsImgUrl,
2400
- fill: controls.color,
2401
- hoverFill: controls.hover,
2402
- className: cn(classes.arrowImg, classes.mirror)
3692
+ url: x.arrowsImgUrl,
3693
+ fill: x.color,
3694
+ hoverFill: x.hover,
3695
+ className: ae(D.arrowImg, D.mirror)
2403
3696
  }
2404
3697
  ),
2405
- !controls.arrowsImgUrl && /* @__PURE__ */ jsx(ArrowIcon, { color: controls.color, className: cn(classes.arrowIcon, classes.arrowImg, classes.mirror) })
3698
+ !x.arrowsImgUrl && /* @__PURE__ */ M(er, { color: x.color, className: ae(D.arrowIcon, D.arrowImg, D.mirror) })
2406
3699
  ]
2407
3700
  }
2408
3701
  )
2409
3702
  }
2410
3703
  ),
2411
- /* @__PURE__ */ jsx(
3704
+ /* @__PURE__ */ M(
2412
3705
  "div",
2413
3706
  {
2414
- className: cn(classes.arrow, classes.nextArrow, { [classes.arrowVertical]: slider.direction === "vert" }),
2415
- style: { color: controls.color, ["--arrow-hover-color"]: controls.hover },
2416
- children: /* @__PURE__ */ jsxs(
3707
+ className: ae(D.arrow, D.nextArrow, { [D.arrowVertical]: f.direction === "vert" }),
3708
+ style: { color: x.color, "--arrow-hover-color": x.hover },
3709
+ children: /* @__PURE__ */ Ae(
2417
3710
  "button",
2418
3711
  {
2419
- className: classes.arrowInner,
2420
- style: { transform: `translate(${scalingValue(controls.offset.x * (slider.direction === "horiz" ? -1 : 1), isEditor)}, ${scalingValue(controls.offset.y, isEditor)}) scale(${controls.scale}) rotate(${slider.direction === "horiz" ? "0deg" : "90deg"})` },
3712
+ className: D.arrowInner,
3713
+ style: { transform: `translate(${U(x.offset.x * (f.direction === "horiz" ? -1 : 1), i)}, ${U(x.offset.y, i)}) scale(${x.scale}) rotate(${f.direction === "horiz" ? "0deg" : "90deg"})` },
2421
3714
  onClick: () => {
2422
- var _a2;
2423
- return (_a2 = lightboxRef.current) == null ? void 0 : _a2.go("+1");
3715
+ var y;
3716
+ return (y = g.current) == null ? void 0 : y.go("+1");
2424
3717
  },
2425
3718
  "aria-label": "Next",
2426
3719
  children: [
2427
- controls.arrowsImgUrl && /* @__PURE__ */ jsx(
2428
- SvgImage,
3720
+ x.arrowsImgUrl && /* @__PURE__ */ M(
3721
+ dt,
2429
3722
  {
2430
- url: controls.arrowsImgUrl,
2431
- fill: controls.color,
2432
- hoverFill: controls.hover,
2433
- className: classes.arrowImg
3723
+ url: x.arrowsImgUrl,
3724
+ fill: x.color,
3725
+ hoverFill: x.hover,
3726
+ className: D.arrowImg
2434
3727
  }
2435
3728
  ),
2436
- !controls.arrowsImgUrl && /* @__PURE__ */ jsx(ArrowIcon, { color: controls.color, className: cn(classes.arrowIcon, classes.arrowImg) })
3729
+ !x.arrowsImgUrl && /* @__PURE__ */ M(er, { color: x.color, className: ae(D.arrowIcon, D.arrowImg) })
2437
3730
  ]
2438
3731
  }
2439
3732
  )
2440
3733
  }
2441
3734
  )
2442
3735
  ] }),
2443
- area.closeIconUrl && (() => {
2444
- const positionStyles = getPositionStyles(area.closeIconAlign, area.closeIconOffset, isEditor);
2445
- const scaleTransform = `scale(${area.closeIconScale})`;
2446
- const combinedTransform = positionStyles.transform ? `${positionStyles.transform} ${scaleTransform}` : scaleTransform;
2447
- return /* @__PURE__ */ jsx("button", { className: classes.closeButton, style: { ...positionStyles, transform: combinedTransform }, onClick: handleClose, "aria-label": "Close lightbox", children: /* @__PURE__ */ jsx(SvgImage, { url: area.closeIconUrl, fill: area.closeIconColor ?? "#000000", hoverFill: area.closeIconHover ?? "#cccccc" }) });
3736
+ L.closeIconUrl && (() => {
3737
+ const y = kt(L.closeIconAlign, L.closeIconOffset, i), V = `scale(${L.closeIconScale})`, Y = y.transform ? `${y.transform} ${V}` : V;
3738
+ return /* @__PURE__ */ M("button", { className: D.closeButton, style: { ...y, transform: Y }, onClick: q, "aria-label": "Close lightbox", children: /* @__PURE__ */ M(dt, { url: L.closeIconUrl, fill: L.closeIconColor ?? "#000000", hoverFill: L.closeIconHover ?? "#cccccc" }) });
2448
3739
  })(),
2449
- caption2 && caption2.isActive && lightboxStyles.imageCaption && ((_a = content[currentIndex]) == null ? void 0 : _a.imageCaption) && (() => {
2450
- const { widthSettings, fontSettings, letterSpacing, textAlign, wordSpacing, fontSizeLineHeight, textAppearance, color } = lightboxStyles.imageCaption;
2451
- return /* @__PURE__ */ jsx(
3740
+ _ && _.isActive && r.imageCaption && ((W = t[s]) == null ? void 0 : W.imageCaption) && (() => {
3741
+ const { widthSettings: y, fontSettings: V, letterSpacing: Y, textAlign: J, wordSpacing: te, fontSizeLineHeight: Z, textAppearance: X, color: oe } = r.imageCaption;
3742
+ return /* @__PURE__ */ M(
2452
3743
  "div",
2453
3744
  {
2454
- className: classes.caption,
3745
+ className: D.caption,
2455
3746
  style: {
2456
- ...getPositionStyles(caption2.alignment, caption2.offset, isEditor),
2457
- fontFamily: fontSettings.fontFamily,
2458
- fontWeight: fontSettings.fontWeight,
2459
- fontStyle: fontSettings.fontStyle,
2460
- width: widthSettings.sizing === "auto" ? "max-content" : scalingValue(widthSettings.width, isEditor),
2461
- letterSpacing: scalingValue(letterSpacing, isEditor),
2462
- wordSpacing: scalingValue(wordSpacing, isEditor),
2463
- textAlign,
2464
- fontSize: scalingValue(fontSizeLineHeight.fontSize, isEditor),
2465
- lineHeight: scalingValue(fontSizeLineHeight.lineHeight, isEditor),
2466
- textTransform: textAppearance.textTransform ?? "none",
2467
- textDecoration: textAppearance.textDecoration ?? "none",
2468
- fontVariant: textAppearance.fontVariant ?? "normal",
2469
- color
3747
+ ...kt(_.alignment, _.offset, i),
3748
+ fontFamily: V.fontFamily,
3749
+ fontWeight: V.fontWeight,
3750
+ fontStyle: V.fontStyle,
3751
+ width: y.sizing === "auto" ? "max-content" : U(y.width, i),
3752
+ letterSpacing: U(Y, i),
3753
+ wordSpacing: U(te, i),
3754
+ textAlign: J,
3755
+ fontSize: U(Z.fontSize, i),
3756
+ lineHeight: U(Z.lineHeight, i),
3757
+ textTransform: X.textTransform ?? "none",
3758
+ textDecoration: X.textDecoration ?? "none",
3759
+ fontVariant: X.fontVariant ?? "normal",
3760
+ color: oe
2470
3761
  },
2471
- onClick: (e) => e.stopPropagation(),
2472
- children: /* @__PURE__ */ jsx(
3762
+ onClick: (ye) => ye.stopPropagation(),
3763
+ children: /* @__PURE__ */ M(
2473
3764
  "div",
2474
3765
  {
2475
3766
  "data-styles": "imageCaption",
2476
- className: classes.captionTextInner,
2477
- style: { ["--link-hover-color"]: caption2.hover },
2478
- children: /* @__PURE__ */ jsx(RichTextRenderer, { content: content[currentIndex].imageCaption })
3767
+ className: D.captionTextInner,
3768
+ style: { "--link-hover-color": _.hover },
3769
+ children: /* @__PURE__ */ M(Mr, { content: t[s].imageCaption })
2479
3770
  }
2480
3771
  )
2481
3772
  }
2482
3773
  );
2483
3774
  })(),
2484
- thumbnail.isActive && (() => {
2485
- const [vertical, horizontal] = thumbnail.position.split("-");
2486
- const effectivePosition = slider.direction === "horiz" ? `${vertical}-left` : thumbnail.position;
2487
- const thumbsPositionStyles = getPositionStyles(effectivePosition, thumbnail.offset, isEditor);
2488
- const getJustifyContent = () => {
2489
- if (slider.direction === "horiz") {
2490
- if (horizontal === "left") return "flex-start";
2491
- if (horizontal === "center") return "center";
2492
- if (horizontal === "right") return "flex-end";
3775
+ R.isActive && (() => {
3776
+ const [y, V] = R.position.split("-"), Y = f.direction === "horiz" ? `${y}-left` : R.position, J = kt(Y, R.offset, i), te = () => {
3777
+ if (f.direction === "horiz") {
3778
+ if (V === "left") return "flex-start";
3779
+ if (V === "center") return "center";
3780
+ if (V === "right") return "flex-end";
2493
3781
  } else {
2494
- if (vertical === "top") return "flex-start";
2495
- if (vertical === "middle") return "center";
2496
- if (vertical === "bottom") return "flex-end";
3782
+ if (y === "top") return "flex-start";
3783
+ if (y === "middle") return "center";
3784
+ if (y === "bottom") return "flex-end";
2497
3785
  }
2498
3786
  return "flex-start";
2499
3787
  };
2500
- return /* @__PURE__ */ jsx(
3788
+ return /* @__PURE__ */ M(
2501
3789
  "div",
2502
3790
  {
2503
- ref: thumbsWrapperRef,
2504
- className: classes.thumbsWrapper,
2505
- onClick: (e) => handleThumbWrapperClick(e),
3791
+ ref: T,
3792
+ className: D.thumbsWrapper,
3793
+ onClick: (Z) => fe(Z),
2506
3794
  style: {
2507
- position: isEditor ? "absolute" : "fixed",
2508
- ...thumbsPositionStyles,
2509
- ...slider.direction === "horiz" ? {
3795
+ position: i ? "absolute" : "fixed",
3796
+ ...J,
3797
+ ...f.direction === "horiz" ? {
2510
3798
  maxWidth: "100vw",
2511
3799
  width: "100%",
2512
3800
  overflowX: "auto",
@@ -2517,98 +3805,81 @@ const Lightbox = ({ isOpen, onClose, content, lightboxStyles, settings, portalId
2517
3805
  overflowX: "hidden"
2518
3806
  }
2519
3807
  },
2520
- children: /* @__PURE__ */ jsx(
3808
+ children: /* @__PURE__ */ M(
2521
3809
  "div",
2522
3810
  {
2523
- className: cn(classes.thumbsContainer, {
2524
- [classes.thumbsContainerVertical]: slider.direction === "vert",
2525
- [classes.thumbsAlignStart]: thumbnail.align === "start",
2526
- [classes.thumbsAlignCenter]: thumbnail.align === "center",
2527
- [classes.thumbsAlignEnd]: thumbnail.align === "end"
3811
+ className: ae(D.thumbsContainer, {
3812
+ [D.thumbsContainerVertical]: f.direction === "vert",
3813
+ [D.thumbsAlignStart]: R.align === "start",
3814
+ [D.thumbsAlignCenter]: R.align === "center",
3815
+ [D.thumbsAlignEnd]: R.align === "end"
2528
3816
  }),
2529
3817
  style: {
2530
- gap: scalingValue(thumbnail.grid.gap, isEditor),
2531
- justifyContent: hasThumbsOverflow ? "flex-start" : getJustifyContent()
3818
+ gap: U(R.grid.gap, i),
3819
+ justifyContent: O ? "flex-start" : te()
2532
3820
  },
2533
- children: content.map((item, index) => {
2534
- const isActive = index === currentIndex;
2535
- const thumbDims = thumbnailDimensions[index];
2536
- const baseSizeValue = thumbnail.grid.size;
2537
- const activeSizeValue = baseSizeValue * (isActive ? thumbnail.activeState.scale : 1);
2538
- const getFitDimensions = () => {
2539
- if (thumbnail.fit !== "fit") return {};
2540
- if (!thumbDims) {
2541
- if (slider.direction === "horiz") {
2542
- return { height: scalingValue(activeSizeValue, isEditor) };
2543
- } else {
2544
- return { width: scalingValue(activeSizeValue, isEditor) };
2545
- }
2546
- }
2547
- const aspectRatio = thumbDims.width / thumbDims.height;
2548
- if (slider.direction === "horiz") {
2549
- const heightValue = activeSizeValue;
2550
- const widthValue = heightValue * aspectRatio;
3821
+ children: t.map((Z, X) => {
3822
+ const oe = X === s, ye = w[X], pe = R.grid.size * (oe ? R.activeState.scale : 1), Tt = () => {
3823
+ if (R.fit !== "fit") return {};
3824
+ if (!ye)
3825
+ return f.direction === "horiz" ? { height: U(pe, i) } : { width: U(pe, i) };
3826
+ const Q = ye.width / ye.height;
3827
+ if (f.direction === "horiz") {
3828
+ const ce = pe, Ne = ce * Q;
2551
3829
  return {
2552
- width: scalingValue(widthValue, isEditor),
2553
- height: scalingValue(heightValue, isEditor)
3830
+ width: U(Ne, i),
3831
+ height: U(ce, i)
2554
3832
  };
2555
3833
  } else {
2556
- const widthValue = activeSizeValue;
2557
- const heightValue = widthValue / aspectRatio;
3834
+ const ce = pe, Ne = ce / Q;
2558
3835
  return {
2559
- width: scalingValue(widthValue, isEditor),
2560
- height: scalingValue(heightValue, isEditor)
3836
+ width: U(ce, i),
3837
+ height: U(Ne, i)
2561
3838
  };
2562
3839
  }
2563
3840
  };
2564
- return /* @__PURE__ */ jsx(
3841
+ return /* @__PURE__ */ M(
2565
3842
  "button",
2566
3843
  {
2567
- className: classes.thumbItem,
3844
+ className: D.thumbItem,
2568
3845
  style: {
2569
- ...slider.direction === "horiz" && thumbnail.fit !== "fit" ? { height: scalingValue(activeSizeValue, isEditor) } : {},
2570
- ...slider.direction === "vert" && thumbnail.fit !== "fit" ? { width: scalingValue(activeSizeValue, isEditor) } : {},
2571
- ...thumbnail.fit === "cover" ? { width: scalingValue(activeSizeValue, isEditor), height: scalingValue(activeSizeValue, isEditor) } : {},
2572
- ...getFitDimensions(),
2573
- transition: isActive ? "all 0.25s ease-out" : "none",
2574
- opacity: isActive ? thumbnail.activeState.opacity / 100 : thumbnail.opacity / 100,
2575
- ["--thumb-hover"]: thumbnail.activeState.opacity / 100
3846
+ ...f.direction === "horiz" && R.fit !== "fit" ? { height: U(pe, i) } : {},
3847
+ ...f.direction === "vert" && R.fit !== "fit" ? { width: U(pe, i) } : {},
3848
+ ...R.fit === "cover" ? { width: U(pe, i), height: U(pe, i) } : {},
3849
+ ...Tt(),
3850
+ transition: oe ? "all 0.25s ease-out" : "none",
3851
+ opacity: oe ? R.activeState.opacity / 100 : R.opacity / 100,
3852
+ "--thumb-hover": R.activeState.opacity / 100
2576
3853
  },
2577
- onClick: (e) => {
2578
- var _a2;
2579
- e.stopPropagation();
2580
- setCurrentIndex(index);
2581
- (_a2 = lightboxRef.current) == null ? void 0 : _a2.go(index);
3854
+ onClick: (Q) => {
3855
+ var ce;
3856
+ Q.stopPropagation(), d(X), (ce = g.current) == null || ce.go(X);
2582
3857
  },
2583
3858
  onMouseEnter: () => {
2584
- var _a2;
2585
- if (thumbnail.triggers === "hov") {
2586
- (_a2 = lightboxRef.current) == null ? void 0 : _a2.go(index);
2587
- }
3859
+ var Q;
3860
+ R.triggers === "hov" && ((Q = g.current) == null || Q.go(X));
2588
3861
  },
2589
- children: /* @__PURE__ */ jsx(
3862
+ children: /* @__PURE__ */ M(
2590
3863
  "img",
2591
3864
  {
2592
- src: item.image.url,
2593
- alt: item.image.name ?? "",
2594
- onLoad: (e) => {
2595
- const img2 = e.currentTarget;
2596
- if (img2.naturalWidth && img2.naturalHeight) {
2597
- setThumbnailDimensions((prev) => ({
2598
- ...prev,
2599
- [index]: { width: img2.naturalWidth, height: img2.naturalHeight }
2600
- }));
2601
- }
3865
+ src: Z.image.url,
3866
+ alt: Z.image.name ?? "",
3867
+ onLoad: (Q) => {
3868
+ const ce = Q.currentTarget;
3869
+ ce.naturalWidth && ce.naturalHeight && E((Ne) => ({
3870
+ ...Ne,
3871
+ [X]: { width: ce.naturalWidth, height: ce.naturalHeight }
3872
+ }));
2602
3873
  },
2603
3874
  style: {
2604
- objectFit: thumbnail.fit === "cover" ? "cover" : "contain",
2605
- ...thumbnail.fit === "fit" ? { maxWidth: "100%", maxHeight: "100%", objectFit: "contain" } : {},
2606
- ...thumbnail.fit === "cover" ? { width: "100%", height: "100%" } : {}
3875
+ objectFit: R.fit === "cover" ? "cover" : "contain",
3876
+ ...R.fit === "fit" ? { maxWidth: "100%", maxHeight: "100%", objectFit: "contain" } : {},
3877
+ ...R.fit === "cover" ? { width: "100%", height: "100%" } : {}
2607
3878
  }
2608
3879
  }
2609
3880
  )
2610
3881
  },
2611
- `${item.image.name}-${index}`
3882
+ `${Z.image.name}-${X}`
2612
3883
  );
2613
3884
  })
2614
3885
  }
@@ -2620,14 +3891,14 @@ const Lightbox = ({ isOpen, onClose, content, lightboxStyles, settings, portalId
2620
3891
  }
2621
3892
  )
2622
3893
  ] }),
2623
- document.getElementById(portalId)
2624
- );
3894
+ document.getElementById(a)
3895
+ ) : null;
2625
3896
  };
2626
- function ArrowIcon({ color, className }) {
2627
- return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 10 18", className, children: /* @__PURE__ */ jsx("g", { id: "Symbols", stroke: "none", strokeWidth: "1", fillRule: "evenodd", children: /* @__PURE__ */ jsx("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: color, transform: "translate(5, 9) rotate(-90) translate(-5, -9)" }) }) });
3897
+ function er({ color: e, className: n }) {
3898
+ return /* @__PURE__ */ M("svg", { viewBox: "0 0 10 18", className: n, children: /* @__PURE__ */ M("g", { id: "Symbols", stroke: "none", strokeWidth: "1", fillRule: "evenodd", children: /* @__PURE__ */ M("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: e, transform: "translate(5, 9) rotate(-90) translate(-5, -9)" }) }) });
2628
3899
  }
2629
- const LightboxComponent = {
2630
- element: LightboxGallery,
3900
+ const Ha = {
3901
+ element: ja,
2631
3902
  id: "lightbox",
2632
3903
  name: "Lightbox",
2633
3904
  preview: {
@@ -2642,7 +3913,7 @@ const LightboxComponent = {
2642
3913
  type: "object",
2643
3914
  properties: {
2644
3915
  settings: {
2645
- layoutBased: true,
3916
+ layoutBased: !0,
2646
3917
  type: "object",
2647
3918
  properties: {
2648
3919
  thumbnailBlock: {
@@ -2730,7 +4001,7 @@ const LightboxComponent = {
2730
4001
  type: "string",
2731
4002
  title: "Repeat",
2732
4003
  display: {
2733
- visible: false,
4004
+ visible: !1,
2734
4005
  type: "ratio-group"
2735
4006
  },
2736
4007
  enum: ["close", "loop"]
@@ -2821,16 +4092,16 @@ const LightboxComponent = {
2821
4092
  size: {
2822
4093
  type: "number",
2823
4094
  label: "Box",
2824
- scalingEnabled: true,
4095
+ scalingEnabled: !0,
2825
4096
  display: {
2826
4097
  type: "numeric-input",
2827
- visible: true
4098
+ visible: !0
2828
4099
  }
2829
4100
  },
2830
4101
  gap: {
2831
4102
  type: "number",
2832
4103
  label: "Gap",
2833
- scalingEnabled: true,
4104
+ scalingEnabled: !0,
2834
4105
  min: 0,
2835
4106
  display: {
2836
4107
  type: "numeric-input"
@@ -2848,19 +4119,19 @@ const LightboxComponent = {
2848
4119
  x: {
2849
4120
  type: "number",
2850
4121
  label: "X",
2851
- scalingEnabled: true,
4122
+ scalingEnabled: !0,
2852
4123
  display: {
2853
4124
  type: "numeric-input",
2854
- visible: true
4125
+ visible: !0
2855
4126
  }
2856
4127
  },
2857
4128
  y: {
2858
4129
  type: "number",
2859
4130
  label: "Y",
2860
- scalingEnabled: true,
4131
+ scalingEnabled: !0,
2861
4132
  display: {
2862
4133
  type: "numeric-input",
2863
- visible: true
4134
+ visible: !0
2864
4135
  }
2865
4136
  }
2866
4137
  }
@@ -2931,19 +4202,19 @@ const LightboxComponent = {
2931
4202
  x: {
2932
4203
  type: "number",
2933
4204
  label: "X",
2934
- scalingEnabled: true,
4205
+ scalingEnabled: !0,
2935
4206
  display: {
2936
4207
  type: "numeric-input",
2937
- visible: true
4208
+ visible: !0
2938
4209
  }
2939
4210
  },
2940
4211
  y: {
2941
4212
  type: "number",
2942
4213
  label: "Y",
2943
- scalingEnabled: true,
4214
+ scalingEnabled: !0,
2944
4215
  display: {
2945
4216
  type: "numeric-input",
2946
- visible: true
4217
+ visible: !0
2947
4218
  }
2948
4219
  }
2949
4220
  }
@@ -3007,19 +4278,19 @@ const LightboxComponent = {
3007
4278
  x: {
3008
4279
  type: "number",
3009
4280
  label: "X",
3010
- scalingEnabled: true,
4281
+ scalingEnabled: !0,
3011
4282
  display: {
3012
4283
  type: "numeric-input",
3013
- visible: true
4284
+ visible: !0
3014
4285
  }
3015
4286
  },
3016
4287
  y: {
3017
4288
  type: "number",
3018
4289
  label: "Y",
3019
- scalingEnabled: true,
4290
+ scalingEnabled: !0,
3020
4291
  display: {
3021
4292
  type: "numeric-input",
3022
- visible: true
4293
+ visible: !0
3023
4294
  }
3024
4295
  }
3025
4296
  }
@@ -3107,19 +4378,19 @@ const LightboxComponent = {
3107
4378
  x: {
3108
4379
  type: "number",
3109
4380
  label: "X",
3110
- scalingEnabled: true,
4381
+ scalingEnabled: !0,
3111
4382
  display: {
3112
4383
  type: "numeric-input",
3113
- visible: true
4384
+ visible: !0
3114
4385
  }
3115
4386
  },
3116
4387
  y: {
3117
4388
  type: "number",
3118
4389
  label: "Y",
3119
- scalingEnabled: true,
4390
+ scalingEnabled: !0,
3120
4391
  display: {
3121
4392
  type: "numeric-input",
3122
- visible: true
4393
+ visible: !0
3123
4394
  }
3124
4395
  }
3125
4396
  }
@@ -3171,19 +4442,19 @@ const LightboxComponent = {
3171
4442
  x: {
3172
4443
  type: "number",
3173
4444
  label: "X",
3174
- scalingEnabled: true,
4445
+ scalingEnabled: !0,
3175
4446
  display: {
3176
4447
  type: "numeric-input",
3177
- visible: true
4448
+ visible: !0
3178
4449
  }
3179
4450
  },
3180
4451
  y: {
3181
4452
  type: "number",
3182
4453
  label: "Y",
3183
- scalingEnabled: true,
4454
+ scalingEnabled: !0,
3184
4455
  display: {
3185
4456
  type: "numeric-input",
3186
- visible: true
4457
+ visible: !0
3187
4458
  }
3188
4459
  }
3189
4460
  }
@@ -3202,7 +4473,7 @@ const LightboxComponent = {
3202
4473
  }
3203
4474
  },
3204
4475
  default: {
3205
- "d": {
4476
+ d: {
3206
4477
  thumbnailBlock: {
3207
4478
  cover: {
3208
4479
  url: "https://cdn.cntrl.site/component-assets/Cover.jpg"
@@ -3225,7 +4496,7 @@ const LightboxComponent = {
3225
4496
  duration: "1000ms"
3226
4497
  },
3227
4498
  thumbnail: {
3228
- isActive: true,
4499
+ isActive: !0,
3229
4500
  position: "middle-left",
3230
4501
  fit: "fit",
3231
4502
  align: "start",
@@ -3247,7 +4518,7 @@ const LightboxComponent = {
3247
4518
  padding: { top: 0.06, right: 0, bottom: 0.06, left: 0 }
3248
4519
  },
3249
4520
  controls: {
3250
- isActive: false,
4521
+ isActive: !1,
3251
4522
  arrowsImgUrl: null,
3252
4523
  offset: { x: 0, y: 0 },
3253
4524
  scale: 1,
@@ -3265,14 +4536,14 @@ const LightboxComponent = {
3265
4536
  closeIconScale: 1
3266
4537
  },
3267
4538
  caption: {
3268
- isActive: true,
4539
+ isActive: !0,
3269
4540
  alignment: "middle-center",
3270
4541
  offset: { x: 0, y: 0 },
3271
4542
  hover: "#cccccc"
3272
4543
  }
3273
4544
  }
3274
4545
  },
3275
- "m": {
4546
+ m: {
3276
4547
  thumbnailBlock: {
3277
4548
  cover: {
3278
4549
  url: "https://cdn.cntrl.site/component-assets/Cover.jpg"
@@ -3295,7 +4566,7 @@ const LightboxComponent = {
3295
4566
  duration: "1000ms"
3296
4567
  },
3297
4568
  thumbnail: {
3298
- isActive: true,
4569
+ isActive: !0,
3299
4570
  position: "bottom-center",
3300
4571
  fit: "fit",
3301
4572
  align: "start",
@@ -3317,7 +4588,7 @@ const LightboxComponent = {
3317
4588
  padding: { top: 0.06, right: 0.05, bottom: 0.06, left: 0.05 }
3318
4589
  },
3319
4590
  controls: {
3320
- isActive: false,
4591
+ isActive: !1,
3321
4592
  arrowsImgUrl: null,
3322
4593
  offset: { x: 0, y: 0 },
3323
4594
  scale: 1,
@@ -3335,14 +4606,14 @@ const LightboxComponent = {
3335
4606
  closeIconScale: 1
3336
4607
  },
3337
4608
  caption: {
3338
- isActive: true,
4609
+ isActive: !0,
3339
4610
  alignment: "middle-center",
3340
4611
  offset: { x: 0, y: 0 },
3341
4612
  hover: "#cccccc"
3342
4613
  }
3343
4614
  }
3344
4615
  },
3345
- "t": {
4616
+ t: {
3346
4617
  thumbnailBlock: {
3347
4618
  cover: {
3348
4619
  url: "https://cdn.cntrl.site/component-assets/Cover.jpg"
@@ -3365,7 +4636,7 @@ const LightboxComponent = {
3365
4636
  duration: "1000ms"
3366
4637
  },
3367
4638
  thumbnail: {
3368
- isActive: true,
4639
+ isActive: !0,
3369
4640
  position: "middle-left",
3370
4641
  fit: "fit",
3371
4642
  align: "start",
@@ -3387,7 +4658,7 @@ const LightboxComponent = {
3387
4658
  padding: { top: 0.06, right: 0.1, bottom: 0.06, left: 0.1 }
3388
4659
  },
3389
4660
  controls: {
3390
- isActive: false,
4661
+ isActive: !1,
3391
4662
  arrowsImgUrl: null,
3392
4663
  offset: { x: 0, y: 0 },
3393
4664
  scale: 1,
@@ -3405,7 +4676,7 @@ const LightboxComponent = {
3405
4676
  closeIconScale: 1
3406
4677
  },
3407
4678
  caption: {
3408
- isActive: true,
4679
+ isActive: !0,
3409
4680
  alignment: "middle-center",
3410
4681
  offset: { x: 0, y: 0 },
3411
4682
  hover: "#cccccc"
@@ -3421,7 +4692,7 @@ const LightboxComponent = {
3421
4692
  },
3422
4693
  then: {
3423
4694
  name: "properties.lightboxBlock.properties.appear.properties.direction.display.visible",
3424
- value: true
4695
+ value: !0
3425
4696
  }
3426
4697
  },
3427
4698
  {
@@ -3441,7 +4712,7 @@ const LightboxComponent = {
3441
4712
  },
3442
4713
  then: {
3443
4714
  name: "properties.lightboxBlock.properties.appear.properties.direction.display.visible",
3444
- value: true
4715
+ value: !0
3445
4716
  }
3446
4717
  },
3447
4718
  {
@@ -3451,7 +4722,7 @@ const LightboxComponent = {
3451
4722
  },
3452
4723
  then: {
3453
4724
  name: "properties.lightboxBlock.properties.appear.properties.direction.display.visible",
3454
- value: false
4725
+ value: !1
3455
4726
  }
3456
4727
  },
3457
4728
  {
@@ -3461,16 +4732,16 @@ const LightboxComponent = {
3461
4732
  ],
3462
4733
  then: {
3463
4734
  name: "properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",
3464
- value: true
4735
+ value: !0
3465
4736
  }
3466
4737
  }
3467
4738
  ]
3468
4739
  },
3469
4740
  content: {
3470
- layoutBased: false,
4741
+ layoutBased: !1,
3471
4742
  type: "array",
3472
4743
  settings: {
3473
- addItemFromFileExplorer: true,
4744
+ addItemFromFileExplorer: !0,
3474
4745
  defaultWidth: 500
3475
4746
  },
3476
4747
  items: {
@@ -3553,7 +4824,7 @@ const LightboxComponent = {
3553
4824
  ]
3554
4825
  },
3555
4826
  styles: {
3556
- layoutBased: true,
4827
+ layoutBased: !0,
3557
4828
  type: "object",
3558
4829
  properties: {
3559
4830
  imageCaption: {
@@ -3683,12 +4954,11 @@ const LightboxComponent = {
3683
4954
  },
3684
4955
  required: ["settings", "content", "styles"]
3685
4956
  }
3686
- };
3687
- const components = [
3688
- ControlSliderComponent,
3689
- ControlImageRevealSliderComponent,
3690
- LightboxComponent
4957
+ }, Ka = [
4958
+ Ko,
4959
+ na,
4960
+ Ha
3691
4961
  ];
3692
4962
  export {
3693
- components
4963
+ Ka as components
3694
4964
  };