@cntrl-site/components 1.0.116 → 1.0.118-alpha.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.
Files changed (62) hide show
  1. package/dist/{Burger-C3yVbQcq.js → Burger-B4kXX9aY.js} +1 -1
  2. package/dist/{Burger-BkVgNMGU.mjs → Burger-DyORh_vF.mjs} +1 -1
  3. package/dist/{ChroniclesComponent-0ZWBPdbh.mjs → ChroniclesComponent-DVoJ0kdT.mjs} +12 -12
  4. package/dist/{ChroniclesComponent-D4_6w8f7.js → ChroniclesComponent-Nm_yIRmr.js} +1 -1
  5. package/dist/Components/PopupMenu/PopupMenu.d.ts +73 -0
  6. package/dist/Components/PopupMenu/PopupMenuComponent.d.ts +594 -0
  7. package/dist/Components/PopupMenu/popupMenuLayout.d.ts +203 -0
  8. package/dist/Components/PopupMenu/popupMenuSnap.d.ts +61 -0
  9. package/dist/Components/helpers/SvgImage/loadSvgMaskUrl.d.ts +7 -0
  10. package/dist/{ControlSlider-DqKfaKMG.mjs → ControlSlider-3w-bHQEg.mjs} +1 -1
  11. package/dist/{ControlSlider-C8ckUIDm.js → ControlSlider-DB4nbVLT.js} +1 -1
  12. package/dist/{FAQ-DLh63Utr.js → FAQ-7HEkaoU6.js} +1 -1
  13. package/dist/{FAQ-CJHCMSBa.mjs → FAQ-GmiwRdFq.mjs} +1 -1
  14. package/dist/{Grid-t07NDMzY.mjs → Grid-BuRdth9A.mjs} +201 -196
  15. package/dist/{Grid-OvzWvUW9.js → Grid-tqSSYh2-.js} +14 -9
  16. package/dist/{Hive-CzabuuCc.js → Hive-34KvKNsa.js} +1 -1
  17. package/dist/{Hive-DyxYd5eg.mjs → Hive-7xHXyMM1.mjs} +1 -1
  18. package/dist/{HiveLightboxTitles-DhEeFKWs.mjs → HiveLightboxTitles-BCoL46-V.mjs} +1 -1
  19. package/dist/{HiveLightboxTitles-DlyptAaK.js → HiveLightboxTitles-DEeyQGcf.js} +1 -1
  20. package/dist/{Lightbox-DZckgBzK.js → Lightbox-Cb7lyaNt.js} +1 -1
  21. package/dist/{Lightbox-BY99NS14.mjs → Lightbox-DzPqgKP4.mjs} +1 -1
  22. package/dist/{LightboxJournal-Bmw2zm4t.js → LightboxJournal-B-vul_be.js} +14 -8
  23. package/dist/{LightboxJournal-gePVKQJ4.mjs → LightboxJournal-DisD2DLv.mjs} +340 -334
  24. package/dist/{LightboxStrip-CTxRwLYk.js → LightboxStrip-YDyEPEb6.js} +14 -8
  25. package/dist/{LightboxStrip-BPQiQhd3.mjs → LightboxStrip-wCHUhAqN.mjs} +258 -252
  26. package/dist/{Mercury-B-s2Kvuq.js → Mercury-BmhtFYOw.js} +1 -1
  27. package/dist/{Mercury-CCW0Es-s.mjs → Mercury-Q788wrYQ.mjs} +1 -1
  28. package/dist/{OnelinerForm-C2Y_XMCY.js → OnelinerForm-CUmY-bXL.js} +1 -1
  29. package/dist/{OnelinerForm-BEu7_sho.mjs → OnelinerForm-D8WIB9Qy.mjs} +1 -1
  30. package/dist/PopupMenu-CYdDyzEt.mjs +1372 -0
  31. package/dist/PopupMenu-Di1fHgho.js +409 -0
  32. package/dist/{SimpleButton-C-o2W9bS.mjs → SimpleButton-DTpzfmb6.mjs} +1 -1
  33. package/dist/{SimpleButton-nGEcO2gB.js → SimpleButton-DtaCYa3y.js} +1 -1
  34. package/dist/{Slider20-DUi6qwnd.mjs → Slider20-CKngROrc.mjs} +1 -1
  35. package/dist/{Slider20-BOmjDRf2.js → Slider20-q0iGgnE3.js} +1 -1
  36. package/dist/SvgImage-CwRq9-ec.mjs +56 -0
  37. package/dist/SvgImage-_QN8ngad.js +1 -0
  38. package/dist/{TestimonialSingle-DrnyReim.mjs → TestimonialSingle-Bax71Hyo.mjs} +1 -1
  39. package/dist/{TestimonialSingle-BORQom3u.js → TestimonialSingle-CpEUendN.js} +1 -1
  40. package/dist/{Waterfall-DII4-WV5.js → Waterfall-B9YWMhrg.js} +1 -1
  41. package/dist/{Waterfall-3kKioKh2.mjs → Waterfall-znaoynn5.mjs} +1 -1
  42. package/dist/components-BYoTPJk3.js +1 -0
  43. package/dist/{components-BQjon_-7.mjs → components-eK82xypT.mjs} +653 -29
  44. package/dist/elements.js +1 -1
  45. package/dist/elements.mjs +23 -22
  46. package/dist/elements.node.js +1 -1
  47. package/dist/elements.node.mjs +1 -1
  48. package/dist/index.d.ts +3 -1
  49. package/dist/index.js +1 -1
  50. package/dist/index.mjs +63 -36
  51. package/dist/loadSvgMaskUrl-B6kHUyof.js +1 -0
  52. package/dist/loadSvgMaskUrl-DUhCVvpl.mjs +39 -0
  53. package/dist/sources.js +30 -16
  54. package/dist/sources.mjs +30 -16
  55. package/dist/types/Component.d.ts +7 -0
  56. package/dist/types/SchemaV1.d.ts +3 -0
  57. package/package.json +1 -1
  58. package/dist/SvgImage-B5mR9y6q.mjs +0 -51
  59. package/dist/SvgImage-DFlmxAoL.js +0 -1
  60. package/dist/components-B8MjlzLL.js +0 -1
  61. package/dist/loadSvgMaskUrl-DfF7ay6h.js +0 -1
  62. package/dist/loadSvgMaskUrl-xHgGYgPe.mjs +0 -20
@@ -1,51 +1,51 @@
1
1
  import { jsxs as w, jsx as f, Fragment as yt } from "react/jsx-runtime";
2
- import { useState as wt, useRef as p, useMemo as O, useCallback as W, useEffect as ft, useLayoutEffect as ae } from "react";
3
- import { createPortal as zn } from "react-dom";
4
- import { u as Fn } from "./useScopedStyles-DhBG3557.mjs";
5
- import { i as Kt, g as Ve, u as Kn } from "./useLightboxSwipeDismiss-SGv6Ra33.mjs";
2
+ import { useState as wt, useRef as p, useMemo as z, useCallback as W, useEffect as ft, useLayoutEffect as le } from "react";
3
+ import { createPortal as kn } from "react-dom";
4
+ import { u as En } from "./useScopedStyles-DhBG3557.mjs";
5
+ import { i as Et, g as Ve, u as Kn } from "./useLightboxSwipeDismiss-SGv6Ra33.mjs";
6
6
  import { s as _t } from "./scalingValue-C9JH5L6O.mjs";
7
- import { S as Bn } from "./SvgImage-B5mR9y6q.mjs";
8
- import { u as Hn } from "./useLightboxScrollLock-VQ07s7EJ.mjs";
7
+ import { S as Fn } from "./SvgImage-CwRq9-ec.mjs";
8
+ import { u as Bn } from "./useLightboxScrollLock-VQ07s7EJ.mjs";
9
9
  import { t as Dn } from "./textStylesToCss-05Mn6I_2.mjs";
10
- const Xn = (e, o, a, c) => {
10
+ const Hn = (e, o, a, c) => {
11
11
  const s = Math.min(Math.abs(e) / Math.max(c, 1), 1);
12
12
  return o + (a - o) * s;
13
- }, jn = (e) => {
13
+ }, Xn = (e) => {
14
14
  e.style.transition = "", e.style.transform = "", e.style.willChange = "";
15
- }, Gn = (e) => {
15
+ }, jn = (e) => {
16
16
  const o = getComputedStyle(e).transform;
17
17
  return o === "none" ? 0 : new DOMMatrixReadOnly(o).m41;
18
- }, Vn = (e, o, a, { duration: c, easing: s, onComplete: d }) => {
19
- const m = e.scrollLeft, $ = a - m, A = m - a, F = (M, tt) => {
20
- jn(o), e.scrollLeft = M, tt && (d == null || d());
18
+ }, Gn = (e, o, a, { duration: c, easing: s, onComplete: d }) => {
19
+ const m = e.scrollLeft, $ = a - m, A = m - a, K = (M, tt) => {
20
+ Xn(o), e.scrollLeft = M, tt && (d == null || d());
21
21
  };
22
22
  if (Math.abs($) < 0.5)
23
- return F(a, !0), () => {
23
+ return K(a, !0), () => {
24
24
  };
25
- let k = !1, P = 0;
25
+ let O = !1, P = 0;
26
26
  const R = () => {
27
- o.removeEventListener("transitionend", K), clearTimeout(P);
28
- }, K = (M) => {
29
- M.target !== o || M.propertyName !== "transform" || k || (k = !0, R(), F(a, !0));
27
+ o.removeEventListener("transitionend", F), clearTimeout(P);
28
+ }, F = (M) => {
29
+ M.target !== o || M.propertyName !== "transform" || O || (O = !0, R(), K(a, !0));
30
30
  };
31
- return o.addEventListener("transitionend", K), o.style.willChange = "transform", o.style.transition = "none", o.style.transform = "translate3d(0, 0, 0)", o.offsetHeight, o.style.transition = `transform ${c}ms ${s}`, o.style.transform = `translate3d(${A}px, 0, 0)`, P = window.setTimeout(() => {
32
- k || (k = !0, R(), F(a, !0));
31
+ return o.addEventListener("transitionend", F), o.style.willChange = "transform", o.style.transition = "none", o.style.transform = "translate3d(0, 0, 0)", o.offsetHeight, o.style.transition = `transform ${c}ms ${s}`, o.style.transform = `translate3d(${A}px, 0, 0)`, P = window.setTimeout(() => {
32
+ O || (O = !0, R(), K(a, !0));
33
33
  }, c + 64), () => {
34
- k || (k = !0, R(), F(m - Gn(o), !1));
34
+ O || (O = !0, R(), K(m - jn(o), !1));
35
35
  };
36
- }, $t = 300, Yn = 900, qn = 1500, Un = "cubic-bezier(0.16, 1, 0.3, 1)", Zn = 3e3, Jn = 2, Qn = 16, Pn = 0.05, tr = 1, Ot = 0.3, er = 50, nr = 20, ut = 4e-3, rr = ["title1", "title2", "title3"], or = {
36
+ }, $t = 300, Vn = 900, Yn = 1500, qn = "cubic-bezier(0.16, 1, 0.3, 1)", Un = 3e3, Zn = 2, Jn = 16, Qn = 0.05, Pn = 1, zt = 0.3, tr = 50, er = 20, ut = 4e-3, nr = ["title1", "title2", "title3"], rr = {
37
37
  title1: "1",
38
38
  title2: "2",
39
39
  title3: "3"
40
- }, ir = {
40
+ }, or = {
41
41
  title1: "title1Color",
42
42
  title2: "title2Color",
43
43
  title3: "title3Color"
44
- }, lr = {
44
+ }, ir = {
45
45
  title1: 0.02,
46
46
  title2: 0.02,
47
47
  title3: 0.02
48
- }, kt = (e) => `max(${e}, ${nr}px)`, sr = (e) => {
48
+ }, Ot = (e) => `max(${e}, ${er}px)`, lr = (e) => {
49
49
  if (!Array.isArray(e) || e.length === 0) return {};
50
50
  const o = e.find((s) => (s == null ? void 0 : s.type) === "paragraph") ?? e[0], a = o == null ? void 0 : o.children;
51
51
  if (!Array.isArray(a)) return {};
@@ -55,7 +55,7 @@ const Xn = (e, o, a, c) => {
55
55
  title2: c[1],
56
56
  title3: c[2]
57
57
  };
58
- }, ar = (e) => {
58
+ }, sr = (e) => {
59
59
  if (!e)
60
60
  return { title1: "", title2: "", title3: "" };
61
61
  if (e.title1 || e.title2 || e.title3)
@@ -64,13 +64,13 @@ const Xn = (e, o, a, c) => {
64
64
  title2: e.title2 ?? "",
65
65
  title3: e.title3 ?? ""
66
66
  };
67
- const o = sr(e.text);
67
+ const o = lr(e.text);
68
68
  return {
69
69
  title1: o.title1 ?? "",
70
70
  title2: o.title2 ?? "",
71
71
  title3: o.title3 ?? ""
72
72
  };
73
- }, X = (e, o) => `${e}${o.charAt(0).toUpperCase()}${o.slice(1)}`, cr = (e) => [
73
+ }, X = (e, o) => `${e}${o.charAt(0).toUpperCase()}${o.slice(1)}`, ar = (e) => [
74
74
  X(e, "fontFamily"),
75
75
  X(e, "fontSettings"),
76
76
  {
@@ -84,13 +84,13 @@ const Xn = (e, o, a, c) => {
84
84
  },
85
85
  X(e, "textAlign"),
86
86
  X(e, "textAppearance")
87
- ], Lr = () => ({
87
+ ], Sr = () => ({
88
88
  type: "tab",
89
89
  id: "stripTextStyle",
90
90
  tabs: Object.fromEntries(
91
- rr.map((e) => [
92
- or[e],
93
- cr(e)
91
+ nr.map((e) => [
92
+ rr[e],
93
+ ar(e)
94
94
  ])
95
95
  )
96
96
  }), fe = (e, o) => {
@@ -112,7 +112,7 @@ const Xn = (e, o, a, c) => {
112
112
  { overflow: c - 1, widths: [] }
113
113
  );
114
114
  return s;
115
- }, Ye = (e, o) => fe(e, o), Et = (e, o) => {
115
+ }, Ye = (e, o) => fe(e, o), kt = (e, o) => {
116
116
  const a = o.filter((c, s) => s !== e).reduce((c, s) => c + s, 0);
117
117
  return Math.max(1 - a, 0);
118
118
  }, Ge = (e, o) => {
@@ -121,7 +121,7 @@ const Xn = (e, o, a, c) => {
121
121
  resolved: fe(e.length, a),
122
122
  effective: Ye(e.length, a)
123
123
  };
124
- }, ur = (e, o, a, c, s, d, m) => {
124
+ }, cr = (e, o, a, c, s, d, m) => {
125
125
  const $ = [];
126
126
  return o && $.push({
127
127
  prefix: "title1",
@@ -144,7 +144,7 @@ const Xn = (e, o, a, c) => {
144
144
  style: m,
145
145
  text: c
146
146
  }), $;
147
- }, ce = (e, o) => {
147
+ }, se = (e, o) => {
148
148
  const a = (c) => {
149
149
  const s = X(o, c);
150
150
  return e[s];
@@ -161,12 +161,12 @@ const Xn = (e, o, a, c) => {
161
161
  wordSpacing: a("wordSpacing") ?? 0,
162
162
  textAlign: a("textAlign") ?? "left",
163
163
  textAppearance: a("textAppearance"),
164
- color: e[ir[o]]
164
+ color: e[or[o]]
165
165
  };
166
- }, fr = (e, o, a, c) => e.slice(0, c).reduce(
166
+ }, ur = (e, o, a, c) => e.slice(0, c).reduce(
167
167
  (s, d, m) => s + (d != null && d.marginLeftKey ? a[d.marginLeftKey] ?? 0 : 0) + (o[m] ?? 0),
168
168
  0
169
- ), ue = (e, o, a) => {
169
+ ), ae = (e, o, a) => {
170
170
  var s, d;
171
171
  const c = {
172
172
  fontSettings: {
@@ -174,7 +174,7 @@ const Xn = (e, o, a, c) => {
174
174
  fontWeight: ((s = o.fontSettings) == null ? void 0 : s.fontWeight) ?? 400,
175
175
  fontStyle: ((d = o.fontSettings) == null ? void 0 : d.fontStyle) ?? "normal"
176
176
  },
177
- fontSize: o.fontSize ?? lr[e],
177
+ fontSize: o.fontSize ?? ir[e],
178
178
  lineHeight: o.lineHeight,
179
179
  letterSpacing: o.letterSpacing,
180
180
  wordSpacing: o.wordSpacing,
@@ -183,7 +183,7 @@ const Xn = (e, o, a, c) => {
183
183
  color: o.color ?? "#ffffff"
184
184
  };
185
185
  return Dn(c, a);
186
- }, hr = ({
186
+ }, fr = ({
187
187
  prefix: e,
188
188
  images: o,
189
189
  settings: a,
@@ -195,19 +195,19 @@ const Xn = (e, o, a, c) => {
195
195
  const {
196
196
  backgroundColor: $,
197
197
  thumbnailSize: A,
198
- thumbnailGap: F,
199
- thumbnailMarginBottom: k,
198
+ thumbnailGap: K,
199
+ thumbnailMarginBottom: O,
200
200
  imageGap: P,
201
201
  closeIcon: R,
202
- closeIconMaxWidth: K,
202
+ closeIconMaxWidth: F,
203
203
  closeIconColor: M,
204
204
  closeIconHoverColor: tt,
205
205
  thumbnailTrigger: St,
206
206
  thumbnailVisibility: ht,
207
207
  thumbnailObjectFit: Lt,
208
- thumbnailActive: Ue,
209
- thumbnailActiveColor: Ze,
210
- title1Width: Bt,
208
+ thumbnailActive: qe,
209
+ thumbnailActiveColor: Ue,
210
+ title1Width: Kt,
211
211
  title2Width: he,
212
212
  title3Width: de,
213
213
  title1MarginLeft: C = 0,
@@ -215,37 +215,37 @@ const Xn = (e, o, a, c) => {
215
215
  title3MarginLeft: pe = 0,
216
216
  titleRowMarginBottom: ge = 0,
217
217
  titleHeaderLayout: ve = "desktop",
218
- contentMarginTop: Je,
219
- iconMarginLeft: Qe
220
- } = a, et = (t) => _t(t, c ?? !1), Pe = A ?? a.thumnailSize ?? 0.03, be = et(Pe), Ht = et(F), Dt = et(k ?? 0.02), dt = et(P ?? 0), xe = et(Je ?? 0), tn = kt(xe), ye = et(Qe ?? 0), [nt, Xt] = wt(0), N = p(nt);
218
+ contentMarginTop: Ze,
219
+ iconMarginLeft: Je
220
+ } = a, et = (t) => _t(t, c ?? !1), Qe = A ?? a.thumnailSize ?? 0.03, be = et(Qe), Ft = et(K), Bt = et(O ?? 0.02), dt = et(P ?? 0), xe = et(Ze ?? 0), Pe = Ot(xe), ye = et(Je ?? 0), [nt, Dt] = wt(0), N = p(nt);
221
221
  N.current = nt;
222
- const en = o[nt], { title1: jt, title2: Gt, title3: Vt } = ar(en), we = ue("title1", ce(a, "title1"), c), $e = ue("title2", ce(a, "title2"), c), Se = ue("title3", ce(a, "title3"), c), _ = ve === "mobile", q = !s && (!c || d), mt = q, pt = q, nn = q, Le = Kt(Lt), rn = Le ? { "--image-aspect-ratio": Ve(Lt) } : void 0, Te = !!(jt || Gt || Vt), v = O(
223
- () => ur(e, jt, Gt, Vt, we, $e, Se),
224
- [e, nt, jt, Gt, Vt, we, $e, Se]
225
- ), rt = O(() => ({ title1Width: Bt, title2Width: he, title3Width: de }), [Bt, he, de]), Tt = O(() => v.map((t) => rt[t.widthKey]), [v, rt]), B = O(() => fe(v.length, Tt), [v.length, Tt]), Ie = O(() => Ye(v.length, Tt), [v.length, Tt]), It = O(() => v.filter((t) => t.prefix === "title1"), [v]), E = O(() => v.filter((t) => t.prefix === "title2" || t.prefix === "title3"), [v]), Wt = O(() => Ge(It, rt), [It, rt]), j = O(() => Ge(E, rt), [E, rt]), Yt = W((t, n) => {
222
+ const tn = o[nt], { title1: Ht, title2: Xt, title3: jt } = sr(tn), we = ae("title1", se(a, "title1"), c), $e = ae("title2", se(a, "title2"), c), Se = ae("title3", se(a, "title3"), c), _ = ve === "mobile", q = !s && (!c || d), mt = q, pt = q, en = q, Le = Et(Lt), nn = Le ? { "--image-aspect-ratio": Ve(Lt) } : void 0, Te = !!(Ht || Xt || jt), v = z(
223
+ () => cr(e, Ht, Xt, jt, we, $e, Se),
224
+ [e, nt, Ht, Xt, jt, we, $e, Se]
225
+ ), rt = z(() => ({ title1Width: Kt, title2Width: he, title3Width: de }), [Kt, he, de]), Tt = z(() => v.map((t) => rt[t.widthKey]), [v, rt]), B = z(() => fe(v.length, Tt), [v.length, Tt]), Ie = z(() => Ye(v.length, Tt), [v.length, Tt]), It = z(() => v.filter((t) => t.prefix === "title1"), [v]), k = z(() => v.filter((t) => t.prefix === "title2" || t.prefix === "title3"), [v]), Wt = z(() => Ge(It, rt), [It, rt]), j = z(() => Ge(k, rt), [k, rt]), Gt = W((t, n) => {
226
226
  const r = v.indexOf(t);
227
227
  if (!_ || n === "single-row")
228
228
  return {
229
229
  effectiveWidth: Ie[r] ?? 0,
230
230
  resolvedWidth: B[r] ?? 0,
231
- maxWidth: Et(r, B)
231
+ maxWidth: kt(r, B)
232
232
  };
233
233
  if (n === "two-row-top") {
234
234
  const l = It.indexOf(t);
235
235
  return {
236
236
  effectiveWidth: Wt.effective[l] ?? 0,
237
237
  resolvedWidth: Wt.resolved[l] ?? 0,
238
- maxWidth: Et(l, Wt.resolved)
238
+ maxWidth: kt(l, Wt.resolved)
239
239
  };
240
240
  }
241
- const i = E.indexOf(t);
241
+ const i = k.indexOf(t);
242
242
  return {
243
243
  effectiveWidth: j.effective[i] ?? 0,
244
244
  resolvedWidth: j.resolved[i] ?? 0,
245
- maxWidth: Et(i, j.resolved)
245
+ maxWidth: kt(i, j.resolved)
246
246
  };
247
247
  }, [
248
- E,
248
+ k,
249
249
  j,
250
250
  Ie,
251
251
  B,
@@ -256,36 +256,36 @@ const Xn = (e, o, a, c) => {
256
256
  ]), y = W(
257
257
  (t) => _t(t, c ?? !1),
258
258
  [c]
259
- ), on = y(ge ?? 0), z = O(
259
+ ), rn = y(ge ?? 0), E = z(
260
260
  () => ({
261
261
  title1MarginLeft: C,
262
262
  title2MarginLeft: me,
263
263
  title3MarginLeft: pe
264
264
  }),
265
265
  [C, me, pe]
266
- ), ln = W(
266
+ ), on = W(
267
267
  (t) => v.slice(0, t + 1).reduce(
268
- (n, r, i) => n + (r != null && r.marginLeftKey ? z[r.marginLeftKey] ?? 0 : 0) + (B[i] ?? 0),
268
+ (n, r, i) => n + (r != null && r.marginLeftKey ? E[r.marginLeftKey] ?? 0 : 0) + (B[i] ?? 0),
269
269
  0
270
270
  ) + (_ ? 0 : C ?? 0),
271
- [v, z, B, _, C]
272
- ), sn = W(
271
+ [v, E, B, _, C]
272
+ ), ln = W(
273
273
  () => _ ? 0 : C ?? 0,
274
274
  [_, C]
275
- ), qt = W(
276
- (t) => E.slice(0, t).reduce(
277
- (n, r, i) => n + (r.marginLeftKey ? z[r.marginLeftKey] ?? 0 : 0) + (j.resolved[i] ?? 0),
275
+ ), Vt = W(
276
+ (t) => k.slice(0, t).reduce(
277
+ (n, r, i) => n + (r.marginLeftKey ? E[r.marginLeftKey] ?? 0 : 0) + (j.resolved[i] ?? 0),
278
278
  0
279
279
  ),
280
- [E, j.resolved, z]
281
- ), an = W(
280
+ [k, j.resolved, E]
281
+ ), sn = W(
282
282
  (t) => {
283
- const n = E[t];
284
- return qt(t) + (n.marginLeftKey ? z[n.marginLeftKey] ?? 0 : 0) + (j.resolved[t] ?? 0);
283
+ const n = k[t];
284
+ return Vt(t) + (n.marginLeftKey ? E[n.marginLeftKey] ?? 0 : 0) + (j.resolved[t] ?? 0);
285
285
  },
286
- [E, j.resolved, qt, z]
287
- ), Ut = (t, n) => {
288
- const r = t.marginLeftKey ? z[t.marginLeftKey] ?? 0 : 0, { effectiveWidth: i, resolvedWidth: l, maxWidth: u } = Yt(t, n), h = s && n === "two-row-top";
286
+ [k, j.resolved, Vt, E]
287
+ ), Yt = (t, n) => {
288
+ const r = t.marginLeftKey ? E[t.marginLeftKey] ?? 0 : 0, { effectiveWidth: i, resolvedWidth: l, maxWidth: u } = Gt(t, n), h = s && n === "two-row-top";
289
289
  return /* @__PURE__ */ w(
290
290
  "div",
291
291
  {
@@ -337,9 +337,9 @@ const Xn = (e, o, a, c) => {
337
337
  },
338
338
  t.className
339
339
  );
340
- }, cn = () => {
340
+ }, an = () => {
341
341
  const t = _ ? -1 : v.findIndex((i) => i.prefix === "title1"), n = !_ && (s || (C ?? 0) > 0) ? (() => {
342
- const i = C ?? 0, l = t >= 0 ? B[t] : Bt ?? 0;
342
+ const i = C ?? 0, l = t >= 0 ? B[t] : Kt ?? 0;
343
343
  return /* @__PURE__ */ f(
344
344
  "div",
345
345
  {
@@ -360,12 +360,12 @@ const Xn = (e, o, a, c) => {
360
360
  );
361
361
  })() : null, r = v.flatMap((i, l) => {
362
362
  if (!i.marginLeftKey) return [];
363
- const u = z[i.marginLeftKey] ?? 0, h = fr(
363
+ const u = E[i.marginLeftKey] ?? 0, h = ur(
364
364
  v,
365
365
  B,
366
- z,
366
+ E,
367
367
  l
368
- ) + sn();
368
+ ) + ln();
369
369
  return /* @__PURE__ */ f(
370
370
  "div",
371
371
  {
@@ -386,11 +386,11 @@ const Xn = (e, o, a, c) => {
386
386
  );
387
387
  });
388
388
  return n ? [n, ...r] : r;
389
- }, un = () => v.map((t, n) => {
390
- const r = Et(
389
+ }, cn = () => v.map((t, n) => {
390
+ const r = kt(
391
391
  n,
392
392
  B
393
- ), l = ln(n) - ut / 2;
393
+ ), l = on(n) - ut / 2;
394
394
  return /* @__PURE__ */ f("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" }, children: /* @__PURE__ */ f(
395
395
  "div",
396
396
  {
@@ -409,9 +409,9 @@ const Xn = (e, o, a, c) => {
409
409
  }
410
410
  }
411
411
  ) }, `${t.widthKey}-junction`);
412
- }), fn = () => E.flatMap((t, n) => {
412
+ }), un = () => k.flatMap((t, n) => {
413
413
  if (!t.marginLeftKey) return [];
414
- const r = z[t.marginLeftKey] ?? 0, i = qt(n), { resolvedWidth: l } = Yt(t, "two-row-bottom");
414
+ const r = E[t.marginLeftKey] ?? 0, i = Vt(n), { resolvedWidth: l } = Gt(t, "two-row-bottom");
415
415
  return /* @__PURE__ */ f(
416
416
  "div",
417
417
  {
@@ -430,8 +430,8 @@ const Xn = (e, o, a, c) => {
430
430
  },
431
431
  t.marginLeftKey
432
432
  );
433
- }), hn = () => E.map((t, n) => {
434
- const { maxWidth: r } = Yt(t, "two-row-bottom"), l = an(n) - ut / 2;
433
+ }), fn = () => k.map((t, n) => {
434
+ const { maxWidth: r } = Gt(t, "two-row-bottom"), l = sn(n) - ut / 2;
435
435
  return /* @__PURE__ */ f("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" }, children: /* @__PURE__ */ f(
436
436
  "div",
437
437
  {
@@ -450,21 +450,21 @@ const Xn = (e, o, a, c) => {
450
450
  }
451
451
  }
452
452
  ) }, `${t.widthKey}-junction`);
453
- }), dn = p(null), b = p(null), Zt = p(null), We = p(null), At = p([]), S = p([]), ot = p(0), Rt = p(null), x = p({
453
+ }), hn = p(null), b = p(null), qt = p(null), We = p(null), At = p([]), S = p([]), ot = p(0), Rt = p(null), x = p({
454
454
  isActive: !1,
455
455
  startX: 0,
456
456
  scrollLeft: 0,
457
457
  startActiveIndex: 0,
458
458
  hasMoved: !1
459
- }), gt = p(null), it = p(null), Jt = p(0), Qt = p("forward"), G = p(0), V = p(null), U = p(!1), L = o.length > 1 && (!s || !!d), Pt = L ? 3 : 1, mn = O(
460
- () => Array.from({ length: Pt }, () => o).flat(),
461
- [o, Pt]
462
- ), [pn, Ae] = wt(!1), [Re, Me] = wt(!1), [gn, te] = wt(!0), Z = p(null), lt = p(null), ee = p(!1), Ce = p(!1), ne = p(null), J = p(null), Ne = mt && !gn, H = W(() => {
463
- mt && (te(!0), J.current && clearTimeout(J.current), J.current = setTimeout(() => {
464
- x.current.isActive || te(!1);
465
- }, Zn));
459
+ }), gt = p(null), it = p(null), Ut = p(0), Zt = p("forward"), G = p(0), V = p(null), U = p(!1), L = o.length > 1 && (!s || !!d), Jt = L ? 3 : 1, dn = z(
460
+ () => Array.from({ length: Jt }, () => o).flat(),
461
+ [o, Jt]
462
+ ), [mn, Ae] = wt(!1), [Re, Me] = wt(!1), [pn, Qt] = wt(!0), Z = p(null), lt = p(null), Pt = p(!1), Ce = p(!1), te = p(null), J = p(null), Ne = mt && !pn, D = W(() => {
463
+ mt && (Qt(!0), J.current && clearTimeout(J.current), J.current = setTimeout(() => {
464
+ x.current.isActive || Qt(!1);
465
+ }, Un));
466
466
  }, [mt]), vt = W(() => {
467
- s || Ce.current || (Ce.current = !0, Me(!1), ne.current = setTimeout(() => {
467
+ s || Ce.current || (Ce.current = !0, Me(!1), te.current = setTimeout(() => {
468
468
  m();
469
469
  }, $t));
470
470
  }, [s, m]), _e = () => /* @__PURE__ */ w(
@@ -473,8 +473,8 @@ const Xn = (e, o, a, c) => {
473
473
  className: `${e}-close-icon`,
474
474
  "data-overlay-content-hidden": Ne ? "true" : "false",
475
475
  style: {
476
- width: _t(K ?? 0, c),
477
- height: _t(K ?? 0, c),
476
+ width: _t(F ?? 0, c),
477
+ height: _t(F ?? 0, c),
478
478
  marginRight: ye,
479
479
  "--close-icon-hover-color": tt
480
480
  },
@@ -487,7 +487,7 @@ const Xn = (e, o, a, c) => {
487
487
  onClick: vt,
488
488
  "aria-label": "Close",
489
489
  children: /* @__PURE__ */ f(
490
- Bn,
490
+ Fn,
491
491
  {
492
492
  url: R,
493
493
  fill: M,
@@ -516,7 +516,7 @@ const Xn = (e, o, a, c) => {
516
516
  )
517
517
  ]
518
518
  }
519
- ), Oe = (t = "two-row") => /* @__PURE__ */ f(
519
+ ), ze = (t = "two-row") => /* @__PURE__ */ f(
520
520
  "div",
521
521
  {
522
522
  ...t === "two-row" && s ? {
@@ -530,20 +530,20 @@ const Xn = (e, o, a, c) => {
530
530
  ...t === "two-row" && s ? { pointerEvents: "auto" } : {}
531
531
  }
532
532
  }
533
- ), vn = () => {
533
+ ), gn = () => {
534
534
  const t = v.find((i) => i.prefix === "title1"), n = v.filter((i) => i.prefix === "title2" || i.prefix === "title3"), r = n.length > 0 || s || (ge ?? 0) > 0;
535
535
  return /* @__PURE__ */ w(yt, { children: [
536
536
  /* @__PURE__ */ w("div", { className: `${e}-header-row-top`, children: [
537
- (C ?? 0) > 0 || s ? Oe() : null,
538
- t && Ut(t, "two-row-top"),
537
+ (C ?? 0) > 0 || s ? ze() : null,
538
+ t && Yt(t, "two-row-top"),
539
539
  R && _e()
540
540
  ] }),
541
541
  r ? /* @__PURE__ */ w("div", { className: `${e}-header-row-bottom-wrap`, children: [
542
542
  n.length > 0 ? /* @__PURE__ */ w("div", { className: `${e}-header-row-bottom`, children: [
543
- n.map((i) => Ut(i, "two-row-bottom")),
543
+ n.map((i) => Yt(i, "two-row-bottom")),
544
544
  s && /* @__PURE__ */ w(yt, { children: [
545
- fn(),
546
- hn()
545
+ un(),
546
+ fn()
547
547
  ] })
548
548
  ] }) : null,
549
549
  /* @__PURE__ */ f(
@@ -554,7 +554,7 @@ const Xn = (e, o, a, c) => {
554
554
  "data-controls-reverse": s ? "" : void 0,
555
555
  className: s ? `${e}-control` : void 0,
556
556
  style: {
557
- height: on,
557
+ height: rn,
558
558
  width: "100%",
559
559
  flexShrink: 0,
560
560
  pointerEvents: s ? "auto" : "none"
@@ -563,27 +563,27 @@ const Xn = (e, o, a, c) => {
563
563
  )
564
564
  ] }) : null
565
565
  ] });
566
- }, bn = () => /* @__PURE__ */ w(yt, { children: [
567
- (C ?? 0) > 0 || s ? Oe("single-row") : null,
568
- v.map((t) => Ut(t, "single-row")),
566
+ }, vn = () => /* @__PURE__ */ w(yt, { children: [
567
+ (C ?? 0) > 0 || s ? ze("single-row") : null,
568
+ v.map((t) => Yt(t, "single-row")),
569
569
  s ? /* @__PURE__ */ w(yt, { children: [
570
- cn(),
571
- un()
570
+ an(),
571
+ cn()
572
572
  ] }) : null,
573
573
  R ? _e() : null
574
- ] }), re = W((t) => !!(t.closest("[data-controls]") || t.closest(`.${e}-thumbnails`) || t.closest(`.${e}-close-icon`)), [e]), {
575
- isSwipeDragging: xn,
576
- backdropStyle: yn,
577
- mediaAreaStyle: wn,
578
- overlayContentStyle: $n,
579
- swipeHandlers: Sn,
580
- dismissAreaStyle: Ln
574
+ ] }), ee = W((t) => !!(t.closest("[data-controls]") || t.closest(`.${e}-thumbnails`) || t.closest(`.${e}-close-icon`)), [e]), {
575
+ isSwipeDragging: bn,
576
+ backdropStyle: xn,
577
+ mediaAreaStyle: yn,
578
+ overlayContentStyle: wn,
579
+ swipeHandlers: $n,
580
+ dismissAreaStyle: Sn
581
581
  } = Kn({
582
582
  enabled: q ?? !1,
583
583
  onClose: vt,
584
584
  animMs: $t,
585
- isBlockedTarget: re
586
- }), oe = () => {
585
+ isBlockedTarget: ee
586
+ }), ne = () => {
587
587
  if (!L || o.length === 0)
588
588
  return ot.current = 0, 0;
589
589
  const t = S.current[0], n = S.current[o.length];
@@ -592,30 +592,30 @@ const Xn = (e, o, a, c) => {
592
592
  return r > 0 && (ot.current = r), ot.current;
593
593
  }, Q = (t = !1) => {
594
594
  if (!L) return;
595
- const n = b.current, r = oe();
595
+ const n = b.current, r = ne();
596
596
  !n || r <= 0 || r < n.clientWidth * 0.25 || (n.scrollLeft <= 0 ? (n.scrollLeft += r, t && (x.current.scrollLeft += r), U.current && (G.current += r)) : n.scrollLeft >= r * 2 && (n.scrollLeft -= r, t && (x.current.scrollLeft -= r), U.current && (G.current -= r)));
597
- }, ke = (t, n = ((r) => (r = b.current) == null ? void 0 : r.scrollLeft)() ?? 0) => {
597
+ }, Oe = (t, n = ((r) => (r = b.current) == null ? void 0 : r.scrollLeft)() ?? 0) => {
598
598
  if (!L) return t;
599
599
  let i = o.length + t, l = 1 / 0;
600
- for (let u = 0; u < Pt; u++) {
600
+ for (let u = 0; u < Jt; u++) {
601
601
  const h = u * o.length + t, g = S.current[h];
602
602
  if (!g) continue;
603
603
  const T = Math.abs(g.offsetLeft - n);
604
604
  T < l && (l = T, i = h);
605
605
  }
606
606
  return i;
607
- }, Ee = (t) => {
607
+ }, ke = (t) => {
608
608
  const n = b.current;
609
609
  return !t || !n ? !1 : t.offsetWidth > n.clientWidth + 1;
610
- }, ie = (t) => {
610
+ }, re = (t) => {
611
611
  const n = b.current;
612
- if (!t || !n || !Ee(t)) return !1;
612
+ if (!t || !n || !ke(t)) return !1;
613
613
  const r = t.offsetLeft, i = r + t.offsetWidth;
614
614
  return n.scrollLeft >= r - 1 && n.scrollLeft + n.clientWidth <= i + 1;
615
615
  }, st = (t = ((n) => (n = b.current) == null ? void 0 : n.scrollLeft)() ?? 0) => {
616
616
  for (let i = 0; i < S.current.length; i += 1) {
617
617
  const l = S.current[i];
618
- if (l && ie(l))
618
+ if (l && re(l))
619
619
  return i;
620
620
  }
621
621
  let r = { flatIndex: 0, distance: 1 / 0 };
@@ -624,17 +624,17 @@ const Xn = (e, o, a, c) => {
624
624
  const u = Math.abs(i.offsetLeft - t);
625
625
  u < r.distance && (r = { flatIndex: l, distance: u });
626
626
  }), r.flatIndex;
627
- }, ze = (t) => {
627
+ }, Ee = (t) => {
628
628
  b.current && S.current.forEach((n) => {
629
- n && (n.style.scrollSnapAlign = Ee(n) && t === "backward" ? "end" : "start");
629
+ n && (n.style.scrollSnapAlign = ke(n) && t === "backward" ? "end" : "start");
630
630
  });
631
- }, Tn = (t, n, r) => {
631
+ }, Ln = (t, n, r) => {
632
632
  const i = t - n, l = st(n), u = S.current[l];
633
- if (ie(u))
633
+ if (re(u))
634
634
  return st(t) % o.length;
635
- const h = S.current[l + 1], g = u ? h ? h.offsetLeft - u.offsetLeft : u.offsetWidth : 0, T = g > 0 ? i > g * Ot ? 1 : i < -g * Ot ? -1 : 0 : 0;
635
+ const h = S.current[l + 1], g = u ? h ? h.offsetLeft - u.offsetLeft : u.offsetWidth : 0, T = g > 0 ? i > g * zt ? 1 : i < -g * zt ? -1 : 0 : 0;
636
636
  return T === 0 ? r : L ? (r + T + o.length) % o.length : Math.max(0, Math.min(o.length - 1, r + T));
637
- }, Fe = W((t = !1) => {
637
+ }, Ke = W((t = !1) => {
638
638
  if (ht !== "on" || s) return;
639
639
  const n = We.current, r = N.current, i = At.current[r];
640
640
  if (!n || !i || n.scrollWidth <= n.clientWidth) return;
@@ -647,23 +647,23 @@ const Xn = (e, o, a, c) => {
647
647
  g > u ? I += Nt : h < l && (I -= Nt);
648
648
  } else g > u ? I = g - n.clientWidth : I = h;
649
649
  n.scrollLeft = Math.max(0, Math.min(T, I));
650
- }, [s, ht]), le = W((t = !1) => {
651
- t && (ee.current = !0), lt.current === null && (lt.current = requestAnimationFrame(() => {
650
+ }, [s, ht]), oe = W((t = !1) => {
651
+ t && (Pt.current = !0), lt.current === null && (lt.current = requestAnimationFrame(() => {
652
652
  lt.current = null;
653
- const n = ee.current;
654
- ee.current = !1, Fe(n);
653
+ const n = Pt.current;
654
+ Pt.current = !1, Ke(n);
655
655
  }));
656
- }, [Fe]), In = W((t) => {
656
+ }, [Ke]), Tn = W((t) => {
657
657
  if (t === N.current) return;
658
658
  const n = N.current;
659
659
  N.current = t;
660
660
  const r = Math.abs(t - n) > 1, i = L && o.length > 1 && (n === o.length - 1 && t === 0 || n === 0 && t === o.length - 1);
661
- Xt(t), le(r || i);
662
- }, [o.length, L, le]), D = () => {
661
+ Dt(t), oe(r || i);
662
+ }, [o.length, L, oe]), H = () => {
663
663
  if (!b.current || o.length === 0 || Z.current !== null || x.current.isActive && x.current.hasMoved) return;
664
664
  const t = b.current.scrollLeft, n = st(t) % o.length;
665
- n !== N.current && In(n);
666
- }, Wn = () => {
665
+ n !== N.current && Tn(n);
666
+ }, In = () => {
667
667
  Z.current = null;
668
668
  }, Y = (t) => {
669
669
  const n = b.current;
@@ -673,7 +673,7 @@ const Xn = (e, o, a, c) => {
673
673
  (t = it.current) == null || t.call(it), it.current = null;
674
674
  }, Mt = () => {
675
675
  V.current !== null && (cancelAnimationFrame(V.current), V.current = null), U.current = !1;
676
- }, Ke = () => {
676
+ }, Fe = () => {
677
677
  const t = b.current;
678
678
  if (!t) {
679
679
  V.current = null, U.current = !1;
@@ -681,83 +681,83 @@ const Xn = (e, o, a, c) => {
681
681
  }
682
682
  const n = G.current - t.scrollLeft;
683
683
  if (Math.abs(n) < 0.5) {
684
- t.scrollLeft = G.current, Q(), D(), V.current = null, U.current = !1;
684
+ t.scrollLeft = G.current, Q(), H(), V.current = null, U.current = !1;
685
685
  return;
686
686
  }
687
- t.scrollLeft += n * Pn, Q(), D(), H(), V.current = requestAnimationFrame(Ke);
687
+ t.scrollLeft += n * Qn, Q(), H(), D(), V.current = requestAnimationFrame(Fe);
688
688
  }, Be = () => {
689
- const t = Zt.current;
689
+ const t = qt.current;
690
690
  t && (t.style.transition = "", t.style.transform = "", t.style.willChange = "");
691
- }, He = (t, n, r, i) => {
692
- Be(), t.scrollLeft = n, Jt.current = t.scrollLeft, Q(), r !== void 0 ? (N.current = r, Xt(r)) : D(), Y(!0), i == null || i();
693
- }, De = (t, { behavior: n = "smooth", activeIndex: r, onComplete: i } = {}) => {
694
- const l = b.current, u = Zt.current;
691
+ }, De = (t, n, r, i) => {
692
+ Be(), t.scrollLeft = n, Ut.current = t.scrollLeft, Q(), r !== void 0 ? (N.current = r, Dt(r)) : H(), Y(!0), i == null || i();
693
+ }, He = (t, { behavior: n = "smooth", activeIndex: r, onComplete: i } = {}) => {
694
+ const l = b.current, u = qt.current;
695
695
  if (!l || !u) return;
696
696
  if (Mt(), bt(), Y(!1), n === "auto") {
697
- He(l, t, r, i);
697
+ De(l, t, r, i);
698
698
  return;
699
699
  }
700
- const h = Math.abs(t - l.scrollLeft), g = Xn(
700
+ const h = Math.abs(t - l.scrollLeft), g = Hn(
701
701
  h,
702
+ Vn,
702
703
  Yn,
703
- qn,
704
704
  l.clientWidth * 0.55
705
705
  );
706
- it.current = Vn(l, u, t, {
706
+ it.current = Gn(l, u, t, {
707
707
  duration: g,
708
- easing: Un,
708
+ easing: qn,
709
709
  onComplete: () => {
710
- it.current = null, He(l, t, r, i);
710
+ it.current = null, De(l, t, r, i);
711
711
  }
712
712
  });
713
- }, An = (t = "smooth") => {
713
+ }, Wn = (t = "smooth") => {
714
714
  const n = b.current;
715
715
  if (!n || o.length === 0) return;
716
- const r = st() % o.length, i = ke(r, n.scrollLeft), l = S.current[i];
717
- l && De(l.offsetLeft, { behavior: t, activeIndex: r });
718
- }, Rn = (t, n = "smooth", r, i) => {
716
+ const r = st() % o.length, i = Oe(r, n.scrollLeft), l = S.current[i];
717
+ l && He(l.offsetLeft, { behavior: t, activeIndex: r });
718
+ }, An = (t, n = "smooth", r, i) => {
719
719
  const l = b.current;
720
720
  if (!l || o.length === 0) return;
721
721
  const u = (i ?? l.scrollLeft) - t, h = st(t), g = S.current[h];
722
- if (ie(g)) {
723
- Y(!0), D();
722
+ if (re(g)) {
723
+ Y(!0), H();
724
724
  return;
725
725
  }
726
726
  const T = S.current[h + 1], I = g ? T ? T.offsetLeft - g.offsetLeft : g.offsetWidth : 0;
727
- if ((I > 0 ? u > I * Ot ? 1 : u < -I * Ot ? -1 : 0 : 0) !== 0) {
728
- const kn = r ?? h % o.length, En = Tn(
727
+ if ((I > 0 ? u > I * zt ? 1 : u < -I * zt ? -1 : 0 : 0) !== 0) {
728
+ const zn = r ?? h % o.length, On = Ln(
729
729
  i ?? l.scrollLeft,
730
730
  t,
731
- kn
731
+ zn
732
732
  );
733
- at(En, n);
733
+ at(On, n);
734
734
  return;
735
735
  }
736
736
  const xt = i ?? l.scrollLeft, Nt = st(xt), je = S.current[Nt];
737
737
  if (je && Math.abs(je.offsetLeft - xt) < 1) {
738
- Y(!0), D();
738
+ Y(!0), H();
739
739
  return;
740
740
  }
741
- An("auto");
741
+ Wn("auto");
742
742
  }, at = (t, n = "smooth") => {
743
743
  const r = b.current;
744
744
  if (!r || o.length === 0) return;
745
- const i = ke(t, r.scrollLeft), l = S.current[i];
746
- l && (n === "smooth" ? Z.current = t : Z.current = null, N.current = t, Xt(t), le(!0), De(l.offsetLeft, {
745
+ const i = Oe(t, r.scrollLeft), l = S.current[i];
746
+ l && (n === "smooth" ? Z.current = t : Z.current = null, N.current = t, Dt(t), oe(!0), He(l.offsetLeft, {
747
747
  behavior: n,
748
748
  activeIndex: t,
749
- onComplete: n === "smooth" ? Wn : void 0
749
+ onComplete: n === "smooth" ? In : void 0
750
750
  }));
751
- }, se = () => {
751
+ }, ie = () => {
752
752
  gt.current && (window.removeEventListener("pointerup", gt.current), window.removeEventListener("pointercancel", gt.current), gt.current = null);
753
- }, Mn = (t, n, r, i, l) => {
753
+ }, Rn = (t, n, r, i, l) => {
754
754
  const u = r - t, h = i - n, g = Math.abs(u), T = Math.abs(h);
755
- if (g < er || g <= T) return !1;
755
+ if (g < tr || g <= T) return !1;
756
756
  const I = u < 0 ? 1 : -1, ct = L ? (l + I + o.length) % o.length : Math.max(0, Math.min(o.length - 1, l + I));
757
757
  return ct === l ? !1 : (at(ct), !0);
758
758
  }, Ct = (t) => {
759
759
  if (!x.current.isActive) return;
760
- se();
760
+ ie();
761
761
  const n = b.current;
762
762
  if (!n) return;
763
763
  const { scrollLeft: r, startActiveIndex: i, hasMoved: l } = x.current, u = n.scrollLeft;
@@ -767,20 +767,20 @@ const Xn = (e, o, a, c) => {
767
767
  scrollLeft: 0,
768
768
  startActiveIndex: 0,
769
769
  hasMoved: !1
770
- }, Ae(!1), t !== void 0 && n.hasPointerCapture(t) && n.releasePointerCapture(t), l ? Rn(r, "smooth", i, u) : (Y(!0), D()), H();
771
- }, Cn = (t, n) => {
770
+ }, Ae(!1), t !== void 0 && n.hasPointerCapture(t) && n.releasePointerCapture(t), l ? An(r, "smooth", i, u) : (Y(!0), H()), D();
771
+ }, Mn = (t, n) => {
772
772
  const r = Rt.current;
773
- Rt.current = null, r && (Mn(
773
+ Rt.current = null, r && (Rn(
774
774
  r.startX,
775
775
  r.startY,
776
776
  t,
777
777
  n,
778
778
  r.startActiveIndex
779
- ), H());
780
- }, Nn = (t) => {
779
+ ), D());
780
+ }, Cn = (t) => {
781
781
  if (!pt) return;
782
782
  if (t.pointerType === "touch") {
783
- if (Mt(), Y(!0), re(t.target)) return;
783
+ if (Mt(), Y(!0), ee(t.target)) return;
784
784
  Rt.current = {
785
785
  startX: t.clientX,
786
786
  startY: t.clientY,
@@ -788,7 +788,7 @@ const Xn = (e, o, a, c) => {
788
788
  };
789
789
  return;
790
790
  }
791
- if (t.pointerType !== "mouse" || t.button !== 0 || re(t.target)) return;
791
+ if (t.pointerType !== "mouse" || t.button !== 0 || ee(t.target)) return;
792
792
  const n = b.current;
793
793
  if (!n) return;
794
794
  Mt(), bt(), Be(), Z.current = null, x.current = {
@@ -797,12 +797,12 @@ const Xn = (e, o, a, c) => {
797
797
  scrollLeft: n.scrollLeft,
798
798
  startActiveIndex: N.current,
799
799
  hasMoved: !1
800
- }, Y(!1), H(), n.setPointerCapture(t.pointerId), se();
800
+ }, Y(!1), D(), n.setPointerCapture(t.pointerId), ie();
801
801
  const r = (i) => {
802
802
  i.pointerType === "mouse" && Ct(i.pointerId);
803
803
  };
804
804
  gt.current = r, window.addEventListener("pointerup", r), window.addEventListener("pointercancel", r);
805
- }, _n = (t) => {
805
+ }, Nn = (t) => {
806
806
  if (!pt || t.pointerType !== "mouse") return;
807
807
  const n = b.current;
808
808
  if (!n || !x.current.isActive) return;
@@ -811,56 +811,56 @@ const Xn = (e, o, a, c) => {
811
811
  return;
812
812
  }
813
813
  const r = t.clientX - x.current.startX;
814
- Math.abs(r) > tr && (x.current.hasMoved = !0, Ae(!0)), x.current.hasMoved && (t.preventDefault(), n.scrollLeft = x.current.scrollLeft - r, Q(!0), D(), H());
814
+ Math.abs(r) > Pn && (x.current.hasMoved = !0, Ae(!0)), x.current.hasMoved && (t.preventDefault(), n.scrollLeft = x.current.scrollLeft - r, Q(!0), H(), D());
815
815
  }, Xe = (t) => {
816
816
  if (pt) {
817
817
  if (t.pointerType === "touch") {
818
- t.type === "pointerup" ? Cn(t.clientX, t.clientY) : Rt.current = null;
818
+ t.type === "pointerup" ? Mn(t.clientX, t.clientY) : Rt.current = null;
819
819
  return;
820
820
  }
821
821
  t.pointerType === "mouse" && Ct(t.pointerId);
822
822
  }
823
- }, On = (t) => {
823
+ }, _n = (t) => {
824
824
  !pt || t.pointerType !== "mouse" || Ct(t.pointerId);
825
825
  };
826
- return Hn(), ft(() => {
826
+ return Bn(), ft(() => {
827
827
  const t = requestAnimationFrame(() => Me(!0));
828
828
  return () => {
829
- cancelAnimationFrame(t), bt(), se(), lt.current !== null && (cancelAnimationFrame(lt.current), lt.current = null), ne.current && clearTimeout(ne.current), J.current && clearTimeout(J.current);
829
+ cancelAnimationFrame(t), bt(), ie(), lt.current !== null && (cancelAnimationFrame(lt.current), lt.current = null), te.current && clearTimeout(te.current), J.current && clearTimeout(J.current);
830
830
  };
831
831
  }, []), ft(() => {
832
832
  if (!mt) {
833
- te(!0);
833
+ Qt(!0);
834
834
  return;
835
835
  }
836
- H();
837
- const t = () => H();
836
+ D();
837
+ const t = () => D();
838
838
  return document.addEventListener("pointermove", t, { passive: !0 }), document.addEventListener("pointerdown", t, { passive: !0 }), () => {
839
839
  document.removeEventListener("pointermove", t), document.removeEventListener("pointerdown", t), J.current && clearTimeout(J.current);
840
840
  };
841
- }, [mt, H]), ft(() => {
841
+ }, [mt, D]), ft(() => {
842
842
  const t = (n) => {
843
843
  n.key === "Escape" && vt();
844
844
  };
845
845
  return window.addEventListener("keydown", t), () => window.removeEventListener("keydown", t);
846
- }, [vt]), ae(() => {
847
- oe();
848
- }, [dt, o.length, L]), ae(() => {
846
+ }, [vt]), le(() => {
847
+ ne();
848
+ }, [dt, o.length, L]), le(() => {
849
849
  s || at(N.current, "auto");
850
- }, [dt, s]), ae(() => {
850
+ }, [dt, s]), le(() => {
851
851
  at(0, "auto");
852
852
  }, [o.length, L]), ft(() => {
853
853
  const t = b.current;
854
854
  if (!t || s || !q) return;
855
855
  const n = (r) => {
856
856
  if (r.preventDefault(), Math.abs(r.deltaY) <= Math.abs(r.deltaX)) return;
857
- const i = r.deltaMode === 1 ? Qn : r.deltaMode === 2 ? t.clientHeight : 1, l = r.deltaY * i * Jn;
857
+ const i = r.deltaMode === 1 ? Jn : r.deltaMode === 2 ? t.clientHeight : 1, l = r.deltaY * i * Zn;
858
858
  if (l !== 0) {
859
859
  if (bt(), U.current || (U.current = !0, G.current = t.scrollLeft, Z.current = null, Y(!1)), G.current += l, !L) {
860
860
  const u = t.scrollWidth - t.clientWidth;
861
861
  G.current = Math.max(0, Math.min(u, G.current));
862
862
  }
863
- H(), V.current === null && (V.current = requestAnimationFrame(Ke));
863
+ D(), V.current === null && (V.current = requestAnimationFrame(Fe));
864
864
  }
865
865
  };
866
866
  return t.addEventListener("wheel", n, { passive: !1 }), () => {
@@ -871,18 +871,18 @@ const Xn = (e, o, a, c) => {
871
871
  if (!t) return;
872
872
  const n = () => {
873
873
  Q(x.current.isActive);
874
- const i = t.scrollLeft, l = i - Jt.current;
875
- Jt.current = i;
874
+ const i = t.scrollLeft, l = i - Ut.current;
875
+ Ut.current = i;
876
876
  const u = ot.current > 0 ? ot.current * 0.5 : 1 / 0;
877
877
  if (l !== 0 && Math.abs(l) < u) {
878
878
  const h = l > 0 ? "forward" : "backward";
879
- h !== Qt.current && (Qt.current = h, ze(h));
879
+ h !== Zt.current && (Zt.current = h, Ee(h));
880
880
  }
881
- x.current.isActive && x.current.hasMoved || D();
881
+ x.current.isActive && x.current.hasMoved || H();
882
882
  };
883
883
  t.addEventListener("scroll", n, { passive: !0 });
884
884
  const r = new ResizeObserver(() => {
885
- oe(), Q(x.current.isActive), ze(Qt.current), D();
885
+ ne(), Q(x.current.isActive), Ee(Zt.current), H();
886
886
  });
887
887
  return r.observe(t), () => {
888
888
  bt(), t.removeEventListener("scroll", n), r.disconnect();
@@ -893,7 +893,7 @@ const Xn = (e, o, a, c) => {
893
893
  "data-selection": "none",
894
894
  className: `${e}-lightbox${c ? ` ${e}-lightbox-editor` : ""}${s ? ` ${e}-lightbox-edit-mode` : ""}`,
895
895
  onClick: () => {
896
- xn || vt();
896
+ bn || vt();
897
897
  },
898
898
  role: "dialog",
899
899
  "aria-modal": "true",
@@ -904,30 +904,30 @@ const Xn = (e, o, a, c) => {
904
904
  pointerEvents: Re ? "auto" : "none"
905
905
  },
906
906
  children: [
907
- /* @__PURE__ */ f("div", { className: `${e}-lightbox-backdrop`, style: { backgroundColor: $, ...yn } }),
907
+ /* @__PURE__ */ f("div", { className: `${e}-lightbox-backdrop`, style: { backgroundColor: $, ...xn } }),
908
908
  /* @__PURE__ */ w(
909
909
  "div",
910
910
  {
911
- ref: dn,
911
+ ref: hn,
912
912
  className: `${e}-lightbox-dismiss-area`,
913
- style: Ln,
914
- ...Sn,
913
+ style: Sn,
914
+ ...$n,
915
915
  children: [
916
- /* @__PURE__ */ f("div", { className: `${e}-lightbox-content`, style: wn, onClick: (t) => t.stopPropagation(), children: /* @__PURE__ */ f(
916
+ /* @__PURE__ */ f("div", { className: `${e}-lightbox-content`, style: yn, onClick: (t) => t.stopPropagation(), children: /* @__PURE__ */ f(
917
917
  "div",
918
918
  {
919
919
  ref: b,
920
920
  className: `${e}-lightbox-strip`,
921
921
  "data-lightbox-scrollable": "",
922
922
  "data-mouse-draggable": pt && o.length > 0 ? "true" : "false",
923
- "data-mouse-dragging": pn ? "true" : "false",
924
- onPointerDown: Nn,
925
- onPointerMove: _n,
923
+ "data-mouse-dragging": mn ? "true" : "false",
924
+ onPointerDown: Cn,
925
+ onPointerMove: Nn,
926
926
  onPointerUp: Xe,
927
927
  onPointerCancel: Xe,
928
- onLostPointerCapture: On,
929
- children: /* @__PURE__ */ f("div", { ref: Zt, className: `${e}-lightbox-strip-track`, style: { gap: dt }, children: mn.map((t, n) => {
930
- const r = t.image.objectFit ?? "contain", i = n % o.length, l = Math.floor(n / o.length), u = kt(dt), h = `calc(-0.5 * (${u} + ${dt}))`;
928
+ onLostPointerCapture: _n,
929
+ children: /* @__PURE__ */ f("div", { ref: qt, className: `${e}-lightbox-strip-track`, style: { gap: dt }, children: dn.map((t, n) => {
930
+ const r = t.image.objectFit ?? "contain", i = n % o.length, l = Math.floor(n / o.length), u = Ot(dt), h = `calc(-0.5 * (${u} + ${dt}))`;
931
931
  return /* @__PURE__ */ w(
932
932
  "div",
933
933
  {
@@ -976,7 +976,7 @@ const Xn = (e, o, a, c) => {
976
976
  {
977
977
  className: `${e}-lightbox-content-inner`,
978
978
  "data-overlay-content-hidden": Ne ? "true" : "false",
979
- style: $n,
979
+ style: wn,
980
980
  children: [
981
981
  /* @__PURE__ */ f(
982
982
  "div",
@@ -999,7 +999,7 @@ const Xn = (e, o, a, c) => {
999
999
  left: 0,
1000
1000
  right: 0,
1001
1001
  top: 0,
1002
- height: tn,
1002
+ height: Pe,
1003
1003
  pointerEvents: "auto",
1004
1004
  zIndex: 3
1005
1005
  }
@@ -1007,17 +1007,17 @@ const Xn = (e, o, a, c) => {
1007
1007
  )
1008
1008
  }
1009
1009
  ),
1010
- /* @__PURE__ */ f("div", { style: { display: "flex", flexDirection: "row", width: "100%", flex: 1, minHeight: 0, pointerEvents: "none" }, children: /* @__PURE__ */ f("div", { className: `${e}-lightbox-content-area${_ ? ` ${e}-lightbox-content-area-stacked` : ""}`, children: (Te || R) && /* @__PURE__ */ f("div", { className: `${e}-header ${_ ? `${e}-header-two-row` : `${e}-header-single-row`}`, children: _ ? vn() : Te || R ? bn() : null }) }) })
1010
+ /* @__PURE__ */ f("div", { style: { display: "flex", flexDirection: "row", width: "100%", flex: 1, minHeight: 0, pointerEvents: "none" }, children: /* @__PURE__ */ f("div", { className: `${e}-lightbox-content-area${_ ? ` ${e}-lightbox-content-area-stacked` : ""}`, children: (Te || R) && /* @__PURE__ */ f("div", { className: `${e}-header ${_ ? `${e}-header-two-row` : `${e}-header-single-row`}`, children: _ ? gn() : Te || R ? vn() : null }) }) })
1011
1011
  ]
1012
1012
  }
1013
1013
  ),
1014
1014
  o.length > 1 && ht === "on" && (() => {
1015
- const t = kt(Dt), n = `calc(-0.5 * (${Dt} + ${t}))`;
1015
+ const t = Ot(Bt), n = `calc(-0.5 * (${Bt} + ${t}))`;
1016
1016
  return /* @__PURE__ */ f(
1017
1017
  "div",
1018
1018
  {
1019
1019
  className: `${e}-thumbnails-wrap`,
1020
- style: { bottom: Dt },
1020
+ style: { bottom: Bt },
1021
1021
  children: /* @__PURE__ */ f(
1022
1022
  "div",
1023
1023
  {
@@ -1029,14 +1029,14 @@ const Xn = (e, o, a, c) => {
1029
1029
  "div",
1030
1030
  {
1031
1031
  className: `${e}-thumbnails-track`,
1032
- "data-thumbnail-active": Ue,
1032
+ "data-thumbnail-active": qe,
1033
1033
  style: {
1034
- gap: Ht,
1035
- "--thumbnail-active-color": Ze
1034
+ gap: Ft,
1035
+ "--thumbnail-active-color": Ue
1036
1036
  },
1037
1037
  children: [
1038
1038
  o.map((r, i) => {
1039
- const l = kt(Ht), u = `calc(-0.5 * (${l} + ${Ht}))`;
1039
+ const l = Ot(Ft), u = `calc(-0.5 * (${l} + ${Ft}))`;
1040
1040
  return /* @__PURE__ */ w(
1041
1041
  "div",
1042
1042
  {
@@ -1052,7 +1052,7 @@ const Xn = (e, o, a, c) => {
1052
1052
  className: `${e}-thumb`,
1053
1053
  "data-active": nt === i ? "true" : "false",
1054
1054
  onClick: () => q && St === "click" && at(i),
1055
- onMouseEnter: () => nn && St === "hover" && at(i),
1055
+ onMouseEnter: () => en && St === "hover" && at(i),
1056
1056
  "aria-label": r.image.name ? `View ${r.image.name}` : `View image ${i + 1}`,
1057
1057
  "aria-current": nt === i ? "true" : void 0,
1058
1058
  children: /* @__PURE__ */ f(
@@ -1063,7 +1063,7 @@ const Xn = (e, o, a, c) => {
1063
1063
  alt: "",
1064
1064
  draggable: !1,
1065
1065
  style: {
1066
- ...rn,
1066
+ ...nn,
1067
1067
  maxWidth: be,
1068
1068
  maxHeight: be,
1069
1069
  width: Lt.display === "cover" ? "auto" : "100%",
@@ -1126,8 +1126,8 @@ const Xn = (e, o, a, c) => {
1126
1126
  ]
1127
1127
  }
1128
1128
  );
1129
- }, zt = 400, Ft = "cubic-bezier(0.25, 0.1, 0.25, 1)", qe = 1.1, dr = `${((1 - 1 / qe) / 2 * 100).toFixed(4)}%`;
1130
- function mr(e) {
1129
+ }, ce = 400, ue = "cubic-bezier(0.25, 0.1, 0.25, 1)", hr = 1.1;
1130
+ function dr(e) {
1131
1131
  return `
1132
1132
  .${e}-wrapper {
1133
1133
  position: relative;
@@ -1173,23 +1173,29 @@ function mr(e) {
1173
1173
  max-width: 100%;
1174
1174
  }
1175
1175
 
1176
+ @property --${e}-hover-zoom {
1177
+ syntax: '<number>';
1178
+ inherits: false;
1179
+ initial-value: 1;
1180
+ }
1181
+
1176
1182
  .${e}-hover-zoom-in .${e}-cover-image {
1177
- clip-path: inset(0);
1178
- transition: transform ${zt}ms ${Ft}, clip-path ${zt}ms ${Ft};
1183
+ transform: scale(var(--${e}-hover-zoom));
1184
+ clip-path: inset(calc(50% - 50% / var(--${e}-hover-zoom)));
1185
+ transition: --${e}-hover-zoom ${ce}ms ${ue};
1179
1186
  }
1180
1187
 
1181
1188
  .${e}-hover-scale-down .${e}-cover-image {
1182
- transition: transform ${zt}ms ${Ft};
1189
+ transition: transform ${ce}ms ${ue};
1183
1190
  }
1184
1191
 
1185
1192
  .${e}-hover-greyscale .${e}-cover-image {
1186
- transition: filter ${zt}ms ${Ft};
1193
+ transition: filter ${ce}ms ${ue};
1187
1194
  }
1188
1195
 
1189
1196
  @media (hover: hover) {
1190
1197
  .${e}-hover-zoom-in .${e}-cover:hover .${e}-cover-image {
1191
- transform: scale(${qe});
1192
- clip-path: inset(${dr});
1198
+ --${e}-hover-zoom: ${hr};
1193
1199
  }
1194
1200
  .${e}-hover-scale-down .${e}-cover:hover .${e}-cover-image {
1195
1201
  transform: scale(0.9);
@@ -1541,26 +1547,26 @@ function mr(e) {
1541
1547
  }
1542
1548
  `;
1543
1549
  }
1544
- const Tr = ({ settings: e, content: o, isEditor: a, isEditMode: c, isPreviewMode: s, portalId: d }) => {
1545
- const { prefix: m } = Fn(), { cover: $, coverFit: A, hover: F = "none" } = e, k = F !== "none" && (!a || s) ? ` ${m}-hover-${F}` : "", P = p(null), [R, K] = wt(!1), M = o ?? [], tt = R && M.length > 0, St = () => {
1546
- M.length !== 0 && K(!0);
1550
+ const Lr = ({ settings: e, content: o, isEditor: a, isEditMode: c, isPreviewMode: s, portalId: d }) => {
1551
+ const { prefix: m } = En(), { cover: $, coverFit: A, hover: K = "none" } = e, O = K !== "none" && (!a || s) ? ` ${m}-hover-${K}` : "", P = p(null), [R, F] = wt(!1), M = o ?? [], tt = R && M.length > 0, St = () => {
1552
+ M.length !== 0 && F(!0);
1547
1553
  };
1548
1554
  return ft(() => {
1549
- !a || c || s || K(!1);
1555
+ !a || c || s || F(!1);
1550
1556
  }, [a, c, s]), /* @__PURE__ */ w(yt, { children: [
1551
- /* @__PURE__ */ w("div", { ref: P, className: `${m}-wrapper${k}`, children: [
1552
- /* @__PURE__ */ f("style", { dangerouslySetInnerHTML: { __html: mr(m) } }),
1557
+ /* @__PURE__ */ w("div", { ref: P, className: `${m}-wrapper${O}`, children: [
1558
+ /* @__PURE__ */ f("style", { dangerouslySetInnerHTML: { __html: dr(m) } }),
1553
1559
  $ && /* @__PURE__ */ f(
1554
1560
  "div",
1555
1561
  {
1556
- className: `${m}-cover ${Kt(A) ? `${m}-ratio-wrapper-cover` : `${m}-ratio-wrapper-fit`}`,
1562
+ className: `${m}-cover ${Et(A) ? `${m}-ratio-wrapper-cover` : `${m}-ratio-wrapper-fit`}`,
1557
1563
  onClick: () => St(),
1558
- style: { ...Kt(A) ? { "--image-aspect-ratio": Ve(A) } : {} },
1564
+ style: { ...Et(A) ? { "--image-aspect-ratio": Ve(A) } : {} },
1559
1565
  "aria-label": "Open image gallery",
1560
1566
  children: /* @__PURE__ */ f(
1561
1567
  "img",
1562
1568
  {
1563
- className: `${m}-cover-image ${Kt(A) ? `${m}-cover-image-cover` : `${m}-cover-image-fit`}`,
1569
+ className: `${m}-cover-image ${Et(A) ? `${m}-cover-image-cover` : `${m}-cover-image-fit`}`,
1564
1570
  src: $,
1565
1571
  alt: "cover"
1566
1572
  }
@@ -1570,9 +1576,9 @@ const Tr = ({ settings: e, content: o, isEditor: a, isEditMode: c, isPreviewMode
1570
1576
  ] }),
1571
1577
  tt && typeof document < "u" && (() => {
1572
1578
  const ht = (d ? document.getElementById(d) : null) ?? document.body;
1573
- return zn(
1579
+ return kn(
1574
1580
  /* @__PURE__ */ f(
1575
- hr,
1581
+ fr,
1576
1582
  {
1577
1583
  prefix: m,
1578
1584
  images: M,
@@ -1580,7 +1586,7 @@ const Tr = ({ settings: e, content: o, isEditor: a, isEditMode: c, isPreviewMode
1580
1586
  isEditor: a,
1581
1587
  isEditMode: c,
1582
1588
  isPreviewMode: s,
1583
- onClose: () => K(!1)
1589
+ onClose: () => F(!1)
1584
1590
  }
1585
1591
  ),
1586
1592
  ht
@@ -1589,12 +1595,12 @@ const Tr = ({ settings: e, content: o, isEditor: a, isEditMode: c, isPreviewMode
1589
1595
  ] });
1590
1596
  };
1591
1597
  export {
1592
- Tr as LightboxStrip,
1593
- rr as STRIP_TEXT_STYLE_PREFIXES,
1594
- or as STRIP_TEXT_STYLE_TAB_LABELS,
1595
- Lr as createStripTextStylePanelTab,
1596
- cr as createStripTextStyleTabContentItems,
1597
- sr as extractTitlesFromLegacyText,
1598
+ Lr as LightboxStrip,
1599
+ nr as STRIP_TEXT_STYLE_PREFIXES,
1600
+ rr as STRIP_TEXT_STYLE_TAB_LABELS,
1601
+ Sr as createStripTextStylePanelTab,
1602
+ ar as createStripTextStyleTabContentItems,
1603
+ lr as extractTitlesFromLegacyText,
1598
1604
  X as getStripTextStyleSettingKey,
1599
- ar as resolveStripItemTitles
1605
+ sr as resolveStripItemTitles
1600
1606
  };