@cntrl-site/components 1.0.115 → 1.0.116

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 (30) hide show
  1. package/dist/Chronicles-BNvvaFYY.mjs +744 -0
  2. package/dist/Chronicles-Dj1gvNjE.js +196 -0
  3. package/dist/{ChroniclesComponent-D-yEbs9w.mjs → ChroniclesComponent-0ZWBPdbh.mjs} +542 -491
  4. package/dist/ChroniclesComponent-D4_6w8f7.js +1 -0
  5. package/dist/Components/Chronicles/Chronicles.d.ts +7 -1
  6. package/dist/Components/Chronicles/ChroniclesComponent.d.ts +26 -2
  7. package/dist/Components/LightboxJournal/LightboxJournal.d.ts +1 -0
  8. package/dist/Components/LightboxStrip/LightboxStrip.d.ts +1 -0
  9. package/dist/LightboxJournal-Bmw2zm4t.js +549 -0
  10. package/dist/{LightboxJournal-D59ex6wH.mjs → LightboxJournal-gePVKQJ4.mjs} +429 -403
  11. package/dist/{LightboxStrip-YspzBP8N.mjs → LightboxStrip-BPQiQhd3.mjs} +461 -435
  12. package/dist/LightboxStrip-CTxRwLYk.js +412 -0
  13. package/dist/{components-D4ZrIo2M.js → components-B8MjlzLL.js} +1 -1
  14. package/dist/{components-Ds6rhj3U.mjs → components-BQjon_-7.mjs} +1 -1
  15. package/dist/elements.js +1 -1
  16. package/dist/elements.mjs +3 -3
  17. package/dist/elements.node.js +1 -1
  18. package/dist/elements.node.mjs +1 -1
  19. package/dist/index.d.ts +1 -1
  20. package/dist/index.js +1 -1
  21. package/dist/index.mjs +36 -32
  22. package/dist/sources.js +124 -25
  23. package/dist/sources.mjs +131 -32
  24. package/dist/types/SchemaV1.d.ts +3 -0
  25. package/package.json +1 -1
  26. package/dist/Chronicles-Cy2h3jlZ.mjs +0 -724
  27. package/dist/Chronicles-D0ojQzOP.js +0 -196
  28. package/dist/ChroniclesComponent-Os_r2IYg.js +0 -1
  29. package/dist/LightboxJournal-DAEZOPDi.js +0 -523
  30. package/dist/LightboxStrip-BDjI1jyH.js +0 -386
@@ -1,51 +1,51 @@
1
- import { jsxs as w, jsx as f, Fragment as xt } from "react/jsx-runtime";
2
- import { useState as yt, useRef as p, useMemo as _, useCallback as A, useEffect as ft, useLayoutEffect as ie } from "react";
3
- import { createPortal as kn } from "react-dom";
4
- import { u as On } from "./useScopedStyles-DhBG3557.mjs";
5
- import { i as Ot, g as je, u as zn } from "./useLightboxSwipeDismiss-SGv6Ra33.mjs";
6
- import { s as Mt } from "./scalingValue-C9JH5L6O.mjs";
7
- import { S as En } from "./SvgImage-B5mR9y6q.mjs";
8
- import { u as Kn } from "./useLightboxScrollLock-VQ07s7EJ.mjs";
9
- import { t as Fn } from "./textStylesToCss-05Mn6I_2.mjs";
10
- const Bn = (e, o, a, c) => {
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";
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";
9
+ import { t as Dn } from "./textStylesToCss-05Mn6I_2.mjs";
10
+ const Xn = (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
- }, Dn = (e) => {
13
+ }, jn = (e) => {
14
14
  e.style.transition = "", e.style.transform = "", e.style.willChange = "";
15
- }, Hn = (e) => {
15
+ }, Gn = (e) => {
16
16
  const o = getComputedStyle(e).transform;
17
17
  return o === "none" ? 0 : new DOMMatrixReadOnly(o).m41;
18
- }, Xn = (e, o, a, { duration: c, easing: s, onComplete: d }) => {
19
- const m = e.scrollLeft, S = a - m, R = m - a, H = (E, tt) => {
20
- Dn(o), e.scrollLeft = E, tt && (d == null || d());
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());
21
21
  };
22
- if (Math.abs(S) < 0.5)
23
- return H(a, !0), () => {
22
+ if (Math.abs($) < 0.5)
23
+ return F(a, !0), () => {
24
24
  };
25
- let k = !1, X = 0;
26
- const L = () => {
27
- o.removeEventListener("transitionend", q), clearTimeout(X);
28
- }, q = (E) => {
29
- E.target !== o || E.propertyName !== "transform" || k || (k = !0, L(), H(a, !0));
25
+ let k = !1, P = 0;
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));
30
30
  };
31
- return o.addEventListener("transitionend", q), 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(${R}px, 0, 0)`, X = window.setTimeout(() => {
32
- k || (k = !0, L(), H(a, !0));
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));
33
33
  }, c + 64), () => {
34
- k || (k = !0, L(), H(m - Hn(o), !1));
34
+ k || (k = !0, R(), F(m - Gn(o), !1));
35
35
  };
36
- }, wt = 300, jn = 900, Gn = 1500, Yn = "cubic-bezier(0.16, 1, 0.3, 1)", Vn = 3e3, qn = 2, Un = 16, Zn = 0.05, Jn = 1, Nt = 0.3, Qn = 50, Pn = 20, ut = 4e-3, tr = ["title1", "title2", "title3"], er = {
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 = {
37
37
  title1: "1",
38
38
  title2: "2",
39
39
  title3: "3"
40
- }, nr = {
40
+ }, ir = {
41
41
  title1: "title1Color",
42
42
  title2: "title2Color",
43
43
  title3: "title3Color"
44
- }, rr = {
44
+ }, lr = {
45
45
  title1: 0.02,
46
46
  title2: 0.02,
47
47
  title3: 0.02
48
- }, _t = (e) => `max(${e}, ${Pn}px)`, or = (e) => {
48
+ }, kt = (e) => `max(${e}, ${nr}px)`, sr = (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 Bn = (e, o, a, c) => {
55
55
  title2: c[1],
56
56
  title3: c[2]
57
57
  };
58
- }, ir = (e) => {
58
+ }, ar = (e) => {
59
59
  if (!e)
60
60
  return { title1: "", title2: "", title3: "" };
61
61
  if (e.title1 || e.title2 || e.title3)
@@ -64,89 +64,89 @@ const Bn = (e, o, a, c) => {
64
64
  title2: e.title2 ?? "",
65
65
  title3: e.title3 ?? ""
66
66
  };
67
- const o = or(e.text);
67
+ const o = sr(e.text);
68
68
  return {
69
69
  title1: o.title1 ?? "",
70
70
  title2: o.title2 ?? "",
71
71
  title3: o.title3 ?? ""
72
72
  };
73
- }, D = (e, o) => `${e}${o.charAt(0).toUpperCase()}${o.slice(1)}`, lr = (e) => [
74
- D(e, "fontFamily"),
75
- D(e, "fontSettings"),
73
+ }, X = (e, o) => `${e}${o.charAt(0).toUpperCase()}${o.slice(1)}`, cr = (e) => [
74
+ X(e, "fontFamily"),
75
+ X(e, "fontSettings"),
76
76
  {
77
77
  type: "row",
78
78
  items: [
79
- D(e, "fontSize"),
80
- D(e, "lineHeight"),
81
- D(e, "letterSpacing"),
82
- D(e, "wordSpacing")
79
+ X(e, "fontSize"),
80
+ X(e, "lineHeight"),
81
+ X(e, "letterSpacing"),
82
+ X(e, "wordSpacing")
83
83
  ]
84
84
  },
85
- D(e, "textAlign"),
86
- D(e, "textAppearance")
87
- ], yr = () => ({
85
+ X(e, "textAlign"),
86
+ X(e, "textAppearance")
87
+ ], Lr = () => ({
88
88
  type: "tab",
89
89
  id: "stripTextStyle",
90
90
  tabs: Object.fromEntries(
91
- tr.map((e) => [
92
- er[e],
93
- lr(e)
91
+ rr.map((e) => [
92
+ or[e],
93
+ cr(e)
94
94
  ])
95
95
  )
96
- }), ae = (e, o) => {
96
+ }), fe = (e, o) => {
97
97
  if (e <= 0)
98
98
  return [];
99
99
  const a = o.slice(0, e), c = a.reduce((d, m) => d + m, 0);
100
100
  if (c <= 1)
101
101
  return a;
102
102
  const { widths: s } = [...a].reverse().reduce(
103
- ({ overflow: d, widths: m }, S) => {
104
- if (d <= 0 || S <= 0)
105
- return { overflow: d, widths: [S, ...m] };
106
- const R = Math.min(d, S);
103
+ ({ overflow: d, widths: m }, $) => {
104
+ if (d <= 0 || $ <= 0)
105
+ return { overflow: d, widths: [$, ...m] };
106
+ const A = Math.min(d, $);
107
107
  return {
108
- overflow: d - R,
109
- widths: [S - R, ...m]
108
+ overflow: d - A,
109
+ widths: [$ - A, ...m]
110
110
  };
111
111
  },
112
112
  { overflow: c - 1, widths: [] }
113
113
  );
114
114
  return s;
115
- }, Ge = (e, o) => ae(e, o), kt = (e, o) => {
115
+ }, Ye = (e, o) => fe(e, o), Et = (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
- }, Xe = (e, o) => {
118
+ }, Ge = (e, o) => {
119
119
  const a = e.map((c) => o[c.widthKey] ?? 0);
120
120
  return {
121
- resolved: ae(e.length, a),
122
- effective: Ge(e.length, a)
121
+ resolved: fe(e.length, a),
122
+ effective: Ye(e.length, a)
123
123
  };
124
- }, sr = (e, o, a, c, s, d, m) => {
125
- const S = [];
126
- return o && S.push({
124
+ }, ur = (e, o, a, c, s, d, m) => {
125
+ const $ = [];
126
+ return o && $.push({
127
127
  prefix: "title1",
128
128
  widthKey: "title1Width",
129
129
  className: `${e}-title1`,
130
130
  style: s,
131
131
  text: o
132
- }), a && S.push({
132
+ }), a && $.push({
133
133
  prefix: "title2",
134
134
  widthKey: "title2Width",
135
135
  marginLeftKey: "title2MarginLeft",
136
136
  className: `${e}-title2`,
137
137
  style: d,
138
138
  text: a
139
- }), c && S.push({
139
+ }), c && $.push({
140
140
  prefix: "title3",
141
141
  widthKey: "title3Width",
142
142
  marginLeftKey: "title3MarginLeft",
143
143
  className: `${e}-title3`,
144
144
  style: m,
145
145
  text: c
146
- }), S;
147
- }, le = (e, o) => {
146
+ }), $;
147
+ }, ce = (e, o) => {
148
148
  const a = (c) => {
149
- const s = D(o, c);
149
+ const s = X(o, c);
150
150
  return e[s];
151
151
  };
152
152
  return {
@@ -161,12 +161,12 @@ const Bn = (e, o, a, c) => {
161
161
  wordSpacing: a("wordSpacing") ?? 0,
162
162
  textAlign: a("textAlign") ?? "left",
163
163
  textAppearance: a("textAppearance"),
164
- color: e[nr[o]]
164
+ color: e[ir[o]]
165
165
  };
166
- }, ar = (e, o, a, c) => e.slice(0, c).reduce(
166
+ }, fr = (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
- ), se = (e, o, a) => {
169
+ ), ue = (e, o, a) => {
170
170
  var s, d;
171
171
  const c = {
172
172
  fontSettings: {
@@ -174,7 +174,7 @@ const Bn = (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 ?? rr[e],
177
+ fontSize: o.fontSize ?? lr[e],
178
178
  lineHeight: o.lineHeight,
179
179
  letterSpacing: o.letterSpacing,
180
180
  wordSpacing: o.wordSpacing,
@@ -182,8 +182,8 @@ const Bn = (e, o, a, c) => {
182
182
  textAppearance: o.textAppearance,
183
183
  color: o.color ?? "#ffffff"
184
184
  };
185
- return Fn(c, a);
186
- }, cr = ({
185
+ return Dn(c, a);
186
+ }, hr = ({
187
187
  prefix: e,
188
188
  images: o,
189
189
  settings: a,
@@ -193,99 +193,99 @@ const Bn = (e, o, a, c) => {
193
193
  onClose: m
194
194
  }) => {
195
195
  const {
196
- backgroundColor: S,
197
- thumbnailSize: R,
198
- thumbnailGap: H,
196
+ backgroundColor: $,
197
+ thumbnailSize: A,
198
+ thumbnailGap: F,
199
199
  thumbnailMarginBottom: k,
200
- imageGap: X,
201
- closeIcon: L,
202
- closeIconMaxWidth: q,
203
- closeIconColor: E,
200
+ imageGap: P,
201
+ closeIcon: R,
202
+ closeIconMaxWidth: K,
203
+ closeIconColor: M,
204
204
  closeIconHoverColor: tt,
205
- thumbnailTrigger: ce,
206
- thumbnailVisibility: zt,
207
- thumbnailObjectFit: St,
208
- thumbnailActive: Ye,
209
- thumbnailActiveColor: Ve,
210
- title1Width: Et,
211
- title2Width: ue,
212
- title3Width: fe,
205
+ thumbnailTrigger: St,
206
+ thumbnailVisibility: ht,
207
+ thumbnailObjectFit: Lt,
208
+ thumbnailActive: Ue,
209
+ thumbnailActiveColor: Ze,
210
+ title1Width: Bt,
211
+ title2Width: he,
212
+ title3Width: de,
213
213
  title1MarginLeft: C = 0,
214
- title2MarginLeft: he = 0,
215
- title3MarginLeft: de = 0,
216
- titleRowMarginBottom: me = 0,
217
- titleHeaderLayout: pe = "desktop",
218
- contentMarginTop: qe,
219
- iconMarginLeft: Ue
220
- } = a, et = (t) => Mt(t, c ?? !1), Ze = R ?? a.thumnailSize ?? 0.03, ge = et(Ze), Kt = et(H), Ft = et(k ?? 0.02), ht = et(X ?? 0), ve = et(qe ?? 0), Je = _t(ve), be = et(Ue ?? 0), [nt, Bt] = yt(0), M = p(nt);
221
- M.current = nt;
222
- const Qe = o[nt], { title1: Dt, title2: Ht, title3: Xt } = ir(Qe), xe = se("title1", le(a, "title1"), c), ye = se("title2", le(a, "title2"), c), we = se("title3", le(a, "title3"), c), N = pe === "mobile", U = !s && (!c || d), dt = U, mt = U, Pe = U, Se = Ot(St), tn = Se ? { "--image-aspect-ratio": je(St) } : void 0, $e = !!(Dt || Ht || Xt), v = _(
223
- () => sr(e, Dt, Ht, Xt, xe, ye, we),
224
- [e, nt, Dt, Ht, Xt, xe, ye, we]
225
- ), rt = _(() => ({ title1Width: Et, title2Width: ue, title3Width: fe }), [Et, ue, fe]), $t = _(() => v.map((t) => rt[t.widthKey]), [v, rt]), K = _(() => ae(v.length, $t), [v.length, $t]), Le = _(() => Ge(v.length, $t), [v.length, $t]), Lt = _(() => v.filter((t) => t.prefix === "title1"), [v]), O = _(() => v.filter((t) => t.prefix === "title2" || t.prefix === "title3"), [v]), Tt = _(() => Xe(Lt, rt), [Lt, rt]), j = _(() => Xe(O, rt), [O, rt]), jt = A((t, n) => {
214
+ title2MarginLeft: me = 0,
215
+ title3MarginLeft: pe = 0,
216
+ titleRowMarginBottom: ge = 0,
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);
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) => {
226
226
  const r = v.indexOf(t);
227
- if (!N || n === "single-row")
227
+ if (!_ || n === "single-row")
228
228
  return {
229
- effectiveWidth: Le[r] ?? 0,
230
- resolvedWidth: K[r] ?? 0,
231
- maxWidth: kt(r, K)
229
+ effectiveWidth: Ie[r] ?? 0,
230
+ resolvedWidth: B[r] ?? 0,
231
+ maxWidth: Et(r, B)
232
232
  };
233
233
  if (n === "two-row-top") {
234
- const l = Lt.indexOf(t);
234
+ const l = It.indexOf(t);
235
235
  return {
236
- effectiveWidth: Tt.effective[l] ?? 0,
237
- resolvedWidth: Tt.resolved[l] ?? 0,
238
- maxWidth: kt(l, Tt.resolved)
236
+ effectiveWidth: Wt.effective[l] ?? 0,
237
+ resolvedWidth: Wt.resolved[l] ?? 0,
238
+ maxWidth: Et(l, Wt.resolved)
239
239
  };
240
240
  }
241
- const i = O.indexOf(t);
241
+ const i = E.indexOf(t);
242
242
  return {
243
243
  effectiveWidth: j.effective[i] ?? 0,
244
244
  resolvedWidth: j.resolved[i] ?? 0,
245
- maxWidth: kt(i, j.resolved)
245
+ maxWidth: Et(i, j.resolved)
246
246
  };
247
247
  }, [
248
- O,
248
+ E,
249
249
  j,
250
- Le,
251
- K,
250
+ Ie,
251
+ B,
252
252
  v,
253
- Lt,
254
- Tt,
255
- N
256
- ]), y = A(
257
- (t) => Mt(t, c ?? !1),
253
+ It,
254
+ Wt,
255
+ _
256
+ ]), y = W(
257
+ (t) => _t(t, c ?? !1),
258
258
  [c]
259
- ), en = y(me ?? 0), z = _(
259
+ ), on = y(ge ?? 0), z = O(
260
260
  () => ({
261
261
  title1MarginLeft: C,
262
- title2MarginLeft: he,
263
- title3MarginLeft: de
262
+ title2MarginLeft: me,
263
+ title3MarginLeft: pe
264
264
  }),
265
- [C, he, de]
266
- ), nn = A(
265
+ [C, me, pe]
266
+ ), ln = W(
267
267
  (t) => v.slice(0, t + 1).reduce(
268
- (n, r, i) => n + (r != null && r.marginLeftKey ? z[r.marginLeftKey] ?? 0 : 0) + (K[i] ?? 0),
268
+ (n, r, i) => n + (r != null && r.marginLeftKey ? z[r.marginLeftKey] ?? 0 : 0) + (B[i] ?? 0),
269
269
  0
270
- ) + (N ? 0 : C ?? 0),
271
- [v, z, K, N, C]
272
- ), rn = A(
273
- () => N ? 0 : C ?? 0,
274
- [N, C]
275
- ), Gt = A(
276
- (t) => O.slice(0, t).reduce(
270
+ ) + (_ ? 0 : C ?? 0),
271
+ [v, z, B, _, C]
272
+ ), sn = W(
273
+ () => _ ? 0 : C ?? 0,
274
+ [_, C]
275
+ ), qt = W(
276
+ (t) => E.slice(0, t).reduce(
277
277
  (n, r, i) => n + (r.marginLeftKey ? z[r.marginLeftKey] ?? 0 : 0) + (j.resolved[i] ?? 0),
278
278
  0
279
279
  ),
280
- [O, j.resolved, z]
281
- ), on = A(
280
+ [E, j.resolved, z]
281
+ ), an = W(
282
282
  (t) => {
283
- const n = O[t];
284
- return Gt(t) + (n.marginLeftKey ? z[n.marginLeftKey] ?? 0 : 0) + (j.resolved[t] ?? 0);
283
+ const n = E[t];
284
+ return qt(t) + (n.marginLeftKey ? z[n.marginLeftKey] ?? 0 : 0) + (j.resolved[t] ?? 0);
285
285
  },
286
- [O, j.resolved, Gt, z]
287
- ), Yt = (t, n) => {
288
- const r = t.marginLeftKey ? z[t.marginLeftKey] ?? 0 : 0, { effectiveWidth: i, resolvedWidth: l, maxWidth: u } = jt(t, n), h = s && n === "two-row-top";
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";
289
289
  return /* @__PURE__ */ w(
290
290
  "div",
291
291
  {
@@ -337,9 +337,9 @@ const Bn = (e, o, a, c) => {
337
337
  },
338
338
  t.className
339
339
  );
340
- }, ln = () => {
341
- const t = N ? -1 : v.findIndex((i) => i.prefix === "title1"), n = !N && (s || (C ?? 0) > 0) ? (() => {
342
- const i = C ?? 0, l = t >= 0 ? K[t] : Et ?? 0;
340
+ }, cn = () => {
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;
343
343
  return /* @__PURE__ */ f(
344
344
  "div",
345
345
  {
@@ -360,19 +360,19 @@ const Bn = (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 = ar(
363
+ const u = z[i.marginLeftKey] ?? 0, h = fr(
364
364
  v,
365
- K,
365
+ B,
366
366
  z,
367
367
  l
368
- ) + rn();
368
+ ) + sn();
369
369
  return /* @__PURE__ */ f(
370
370
  "div",
371
371
  {
372
372
  "data-controls": i.marginLeftKey,
373
373
  "data-controls-axis": "x",
374
374
  "data-controls-min": "0",
375
- "data-controls-max-fraction": String(K[l]),
375
+ "data-controls-max-fraction": String(B[l]),
376
376
  style: {
377
377
  position: "absolute",
378
378
  top: 0,
@@ -386,11 +386,11 @@ const Bn = (e, o, a, c) => {
386
386
  );
387
387
  });
388
388
  return n ? [n, ...r] : r;
389
- }, sn = () => v.map((t, n) => {
390
- const r = kt(
389
+ }, un = () => v.map((t, n) => {
390
+ const r = Et(
391
391
  n,
392
- K
393
- ), l = nn(n) - ut / 2;
392
+ B
393
+ ), l = ln(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 Bn = (e, o, a, c) => {
409
409
  }
410
410
  }
411
411
  ) }, `${t.widthKey}-junction`);
412
- }), an = () => O.flatMap((t, n) => {
412
+ }), fn = () => E.flatMap((t, n) => {
413
413
  if (!t.marginLeftKey) return [];
414
- const r = z[t.marginLeftKey] ?? 0, i = Gt(n), { resolvedWidth: l } = jt(t, "two-row-bottom");
414
+ const r = z[t.marginLeftKey] ?? 0, i = qt(n), { resolvedWidth: l } = Yt(t, "two-row-bottom");
415
415
  return /* @__PURE__ */ f(
416
416
  "div",
417
417
  {
@@ -430,8 +430,8 @@ const Bn = (e, o, a, c) => {
430
430
  },
431
431
  t.marginLeftKey
432
432
  );
433
- }), cn = () => O.map((t, n) => {
434
- const { maxWidth: r } = jt(t, "two-row-bottom"), l = on(n) - ut / 2;
433
+ }), hn = () => E.map((t, n) => {
434
+ const { maxWidth: r } = Yt(t, "two-row-bottom"), l = an(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,32 +450,32 @@ const Bn = (e, o, a, c) => {
450
450
  }
451
451
  }
452
452
  ) }, `${t.widthKey}-junction`);
453
- }), un = p(null), b = p(null), Vt = p(null), Te = p(null), It = p([]), $ = p([]), ot = p(0), Wt = p(null), x = p({
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({
454
454
  isActive: !1,
455
455
  startX: 0,
456
456
  scrollLeft: 0,
457
457
  startActiveIndex: 0,
458
458
  hasMoved: !1
459
- }), pt = p(null), it = p(null), qt = p(0), Ut = p("forward"), G = p(0), Y = p(null), Z = p(!1), T = o.length > 1 && (!s || !!d), Zt = T ? 3 : 1, fn = _(
460
- () => Array.from({ length: Zt }, () => o).flat(),
461
- [o, Zt]
462
- ), [hn, Ie] = yt(!1), [We, Ae] = yt(!1), [dn, Jt] = yt(!0), J = p(null), lt = p(null), Qt = p(!1), Re = p(!1), Pt = p(null), Q = p(null), Ce = dt && !dn, F = A(() => {
463
- dt && (Jt(!0), Q.current && clearTimeout(Q.current), Q.current = setTimeout(() => {
464
- x.current.isActive || Jt(!1);
465
- }, Vn));
466
- }, [dt]), gt = A(() => {
467
- s || Re.current || (Re.current = !0, Ae(!1), Pt.current = setTimeout(() => {
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));
466
+ }, [mt]), vt = W(() => {
467
+ s || Ce.current || (Ce.current = !0, Me(!1), ne.current = setTimeout(() => {
468
468
  m();
469
- }, wt));
470
- }, [s, m]), Me = () => /* @__PURE__ */ w(
469
+ }, $t));
470
+ }, [s, m]), _e = () => /* @__PURE__ */ w(
471
471
  "div",
472
472
  {
473
473
  className: `${e}-close-icon`,
474
- "data-overlay-content-hidden": Ce ? "true" : "false",
474
+ "data-overlay-content-hidden": Ne ? "true" : "false",
475
475
  style: {
476
- width: Mt(q ?? 0, c),
477
- height: Mt(q ?? 0, c),
478
- marginRight: be,
476
+ width: _t(K ?? 0, c),
477
+ height: _t(K ?? 0, c),
478
+ marginRight: ye,
479
479
  "--close-icon-hover-color": tt
480
480
  },
481
481
  children: [
@@ -484,14 +484,14 @@ const Bn = (e, o, a, c) => {
484
484
  {
485
485
  type: "button",
486
486
  className: `${e}-close-icon-inner`,
487
- onClick: gt,
487
+ onClick: vt,
488
488
  "aria-label": "Close",
489
489
  children: /* @__PURE__ */ f(
490
- En,
490
+ Bn,
491
491
  {
492
- url: L,
493
- fill: E,
494
- hoverFill: c && !d ? E : tt,
492
+ url: R,
493
+ fill: M,
494
+ hoverFill: c && !d ? M : tt,
495
495
  className: `${e}-close-icon-img`
496
496
  }
497
497
  )
@@ -508,7 +508,7 @@ const Bn = (e, o, a, c) => {
508
508
  position: "absolute",
509
509
  top: 0,
510
510
  left: "100%",
511
- width: be,
511
+ width: ye,
512
512
  height: "100%",
513
513
  pointerEvents: "auto"
514
514
  }
@@ -516,7 +516,7 @@ const Bn = (e, o, a, c) => {
516
516
  )
517
517
  ]
518
518
  }
519
- ), Ne = (t = "two-row") => /* @__PURE__ */ f(
519
+ ), Oe = (t = "two-row") => /* @__PURE__ */ f(
520
520
  "div",
521
521
  {
522
522
  ...t === "two-row" && s ? {
@@ -530,20 +530,20 @@ const Bn = (e, o, a, c) => {
530
530
  ...t === "two-row" && s ? { pointerEvents: "auto" } : {}
531
531
  }
532
532
  }
533
- ), mn = () => {
534
- const t = v.find((i) => i.prefix === "title1"), n = v.filter((i) => i.prefix === "title2" || i.prefix === "title3"), r = n.length > 0 || s || (me ?? 0) > 0;
535
- return /* @__PURE__ */ w(xt, { children: [
533
+ ), vn = () => {
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
+ return /* @__PURE__ */ w(yt, { children: [
536
536
  /* @__PURE__ */ w("div", { className: `${e}-header-row-top`, children: [
537
- (C ?? 0) > 0 || s ? Ne() : null,
538
- t && Yt(t, "two-row-top"),
539
- L && Me()
537
+ (C ?? 0) > 0 || s ? Oe() : null,
538
+ t && Ut(t, "two-row-top"),
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) => Yt(i, "two-row-bottom")),
544
- s && /* @__PURE__ */ w(xt, { children: [
545
- an(),
546
- cn()
543
+ n.map((i) => Ut(i, "two-row-bottom")),
544
+ s && /* @__PURE__ */ w(yt, { children: [
545
+ fn(),
546
+ hn()
547
547
  ] })
548
548
  ] }) : null,
549
549
  /* @__PURE__ */ f(
@@ -554,7 +554,7 @@ const Bn = (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: en,
557
+ height: on,
558
558
  width: "100%",
559
559
  flexShrink: 0,
560
560
  pointerEvents: s ? "auto" : "none"
@@ -563,377 +563,377 @@ const Bn = (e, o, a, c) => {
563
563
  )
564
564
  ] }) : null
565
565
  ] });
566
- }, pn = () => /* @__PURE__ */ w(xt, { children: [
567
- (C ?? 0) > 0 || s ? Ne("single-row") : null,
568
- v.map((t) => Yt(t, "single-row")),
569
- s ? /* @__PURE__ */ w(xt, { children: [
570
- ln(),
571
- sn()
566
+ }, bn = () => /* @__PURE__ */ w(yt, { children: [
567
+ (C ?? 0) > 0 || s ? Oe("single-row") : null,
568
+ v.map((t) => Ut(t, "single-row")),
569
+ s ? /* @__PURE__ */ w(yt, { children: [
570
+ cn(),
571
+ un()
572
572
  ] }) : null,
573
- L ? Me() : null
574
- ] }), te = A((t) => !!(t.closest("[data-controls]") || t.closest(`.${e}-thumbnails`) || t.closest(`.${e}-close-icon`)), [e]), {
575
- isSwipeDragging: gn,
576
- backdropStyle: vn,
577
- mediaAreaStyle: bn,
578
- overlayContentStyle: xn,
579
- swipeHandlers: yn,
580
- dismissAreaStyle: wn
581
- } = zn({
582
- enabled: U ?? !1,
583
- onClose: gt,
584
- animMs: wt,
585
- isBlockedTarget: te
586
- }), ee = () => {
587
- if (!T || o.length === 0)
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
581
+ } = Kn({
582
+ enabled: q ?? !1,
583
+ onClose: vt,
584
+ animMs: $t,
585
+ isBlockedTarget: re
586
+ }), oe = () => {
587
+ if (!L || o.length === 0)
588
588
  return ot.current = 0, 0;
589
- const t = $.current[0], n = $.current[o.length];
589
+ const t = S.current[0], n = S.current[o.length];
590
590
  if (!t || !n) return ot.current;
591
591
  const r = n.offsetLeft - t.offsetLeft;
592
592
  return r > 0 && (ot.current = r), ot.current;
593
- }, P = (t = !1) => {
594
- if (!T) return;
595
- const n = b.current, r = ee();
596
- !n || r <= 0 || r < n.clientWidth * 0.25 || (n.scrollLeft <= 0 ? (n.scrollLeft += r, t && (x.current.scrollLeft += r), Z.current && (G.current += r)) : n.scrollLeft >= r * 2 && (n.scrollLeft -= r, t && (x.current.scrollLeft -= r), Z.current && (G.current -= r)));
597
- }, _e = (t, n = ((r) => (r = b.current) == null ? void 0 : r.scrollLeft)() ?? 0) => {
598
- if (!T) return t;
593
+ }, Q = (t = !1) => {
594
+ if (!L) return;
595
+ const n = b.current, r = oe();
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) => {
598
+ if (!L) return t;
599
599
  let i = o.length + t, l = 1 / 0;
600
- for (let u = 0; u < Zt; u++) {
601
- const h = u * o.length + t, g = $.current[h];
600
+ for (let u = 0; u < Pt; u++) {
601
+ const h = u * o.length + t, g = S.current[h];
602
602
  if (!g) continue;
603
- const I = Math.abs(g.offsetLeft - n);
604
- I < l && (l = I, i = h);
603
+ const T = Math.abs(g.offsetLeft - n);
604
+ T < l && (l = T, i = h);
605
605
  }
606
606
  return i;
607
- }, ke = (t) => {
607
+ }, Ee = (t) => {
608
608
  const n = b.current;
609
609
  return !t || !n ? !1 : t.offsetWidth > n.clientWidth + 1;
610
- }, ne = (t) => {
610
+ }, ie = (t) => {
611
611
  const n = b.current;
612
- if (!t || !n || !ke(t)) return !1;
612
+ if (!t || !n || !Ee(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
- for (let i = 0; i < $.current.length; i += 1) {
617
- const l = $.current[i];
618
- if (l && ne(l))
616
+ for (let i = 0; i < S.current.length; i += 1) {
617
+ const l = S.current[i];
618
+ if (l && ie(l))
619
619
  return i;
620
620
  }
621
621
  let r = { flatIndex: 0, distance: 1 / 0 };
622
- return $.current.forEach((i, l) => {
622
+ return S.current.forEach((i, l) => {
623
623
  if (!i) return;
624
624
  const u = Math.abs(i.offsetLeft - t);
625
625
  u < r.distance && (r = { flatIndex: l, distance: u });
626
626
  }), r.flatIndex;
627
- }, Oe = (t) => {
628
- b.current && $.current.forEach((n) => {
629
- n && (n.style.scrollSnapAlign = ke(n) && t === "backward" ? "end" : "start");
627
+ }, ze = (t) => {
628
+ b.current && S.current.forEach((n) => {
629
+ n && (n.style.scrollSnapAlign = Ee(n) && t === "backward" ? "end" : "start");
630
630
  });
631
- }, Sn = (t, n, r) => {
632
- const i = t - n, l = st(n), u = $.current[l];
633
- if (ne(u))
631
+ }, Tn = (t, n, r) => {
632
+ const i = t - n, l = st(n), u = S.current[l];
633
+ if (ie(u))
634
634
  return st(t) % o.length;
635
- const h = $.current[l + 1], g = u ? h ? h.offsetLeft - u.offsetLeft : u.offsetWidth : 0, I = g > 0 ? i > g * Nt ? 1 : i < -g * Nt ? -1 : 0 : 0;
636
- return I === 0 ? r : T ? (r + I + o.length) % o.length : Math.max(0, Math.min(o.length - 1, r + I));
637
- }, ze = A((t = !1) => {
638
- if (zt !== "on" || s) return;
639
- const n = Te.current, r = M.current, i = It.current[r];
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;
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) => {
638
+ if (ht !== "on" || s) return;
639
+ const n = We.current, r = N.current, i = At.current[r];
640
640
  if (!n || !i || n.scrollWidth <= n.clientWidth) return;
641
641
  const l = n.scrollLeft, u = l + n.clientWidth, h = i.offsetLeft, g = h + i.offsetWidth;
642
642
  if (h >= l && g <= u) return;
643
- const I = n.scrollWidth - n.clientWidth;
644
- let W = l;
645
- if (!t && J.current === null) {
646
- const ct = It.current[r - 1], bt = It.current[r + 1], Ct = ct ? i.offsetLeft - ct.offsetLeft : bt ? bt.offsetLeft - i.offsetLeft : i.offsetWidth;
647
- g > u ? W += Ct : h < l && (W -= Ct);
648
- } else g > u ? W = g - n.clientWidth : W = h;
649
- n.scrollLeft = Math.max(0, Math.min(I, W));
650
- }, [s, zt]), re = A((t = !1) => {
651
- t && (Qt.current = !0), lt.current === null && (lt.current = requestAnimationFrame(() => {
643
+ const T = n.scrollWidth - n.clientWidth;
644
+ let I = l;
645
+ if (!t && Z.current === null) {
646
+ const ct = At.current[r - 1], xt = At.current[r + 1], Nt = ct ? i.offsetLeft - ct.offsetLeft : xt ? xt.offsetLeft - i.offsetLeft : i.offsetWidth;
647
+ g > u ? I += Nt : h < l && (I -= Nt);
648
+ } else g > u ? I = g - n.clientWidth : I = h;
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(() => {
652
652
  lt.current = null;
653
- const n = Qt.current;
654
- Qt.current = !1, ze(n);
653
+ const n = ee.current;
654
+ ee.current = !1, Fe(n);
655
655
  }));
656
- }, [ze]), $n = A((t) => {
657
- if (t === M.current) return;
658
- const n = M.current;
659
- M.current = t;
660
- const r = Math.abs(t - n) > 1, i = T && o.length > 1 && (n === o.length - 1 && t === 0 || n === 0 && t === o.length - 1);
661
- Bt(t), re(r || i);
662
- }, [o.length, T, re]), B = () => {
663
- if (!b.current || o.length === 0 || J.current !== null || x.current.isActive && x.current.hasMoved) return;
656
+ }, [Fe]), In = W((t) => {
657
+ if (t === N.current) return;
658
+ const n = N.current;
659
+ N.current = t;
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 = () => {
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 !== M.current && $n(n);
666
- }, Ln = () => {
667
- J.current = null;
668
- }, V = (t) => {
665
+ n !== N.current && In(n);
666
+ }, Wn = () => {
667
+ Z.current = null;
668
+ }, Y = (t) => {
669
669
  const n = b.current;
670
670
  n && (n.style.scrollSnapType = t ? "" : "none");
671
- }, vt = () => {
671
+ }, bt = () => {
672
672
  var t;
673
673
  (t = it.current) == null || t.call(it), it.current = null;
674
- }, At = () => {
675
- Y.current !== null && (cancelAnimationFrame(Y.current), Y.current = null), Z.current = !1;
676
- }, Ee = () => {
674
+ }, Mt = () => {
675
+ V.current !== null && (cancelAnimationFrame(V.current), V.current = null), U.current = !1;
676
+ }, Ke = () => {
677
677
  const t = b.current;
678
678
  if (!t) {
679
- Y.current = null, Z.current = !1;
679
+ V.current = null, U.current = !1;
680
680
  return;
681
681
  }
682
682
  const n = G.current - t.scrollLeft;
683
683
  if (Math.abs(n) < 0.5) {
684
- t.scrollLeft = G.current, P(), B(), Y.current = null, Z.current = !1;
684
+ t.scrollLeft = G.current, Q(), D(), V.current = null, U.current = !1;
685
685
  return;
686
686
  }
687
- t.scrollLeft += n * Zn, P(), B(), F(), Y.current = requestAnimationFrame(Ee);
688
- }, Ke = () => {
689
- const t = Vt.current;
687
+ t.scrollLeft += n * Pn, Q(), D(), H(), V.current = requestAnimationFrame(Ke);
688
+ }, Be = () => {
689
+ const t = Zt.current;
690
690
  t && (t.style.transition = "", t.style.transform = "", t.style.willChange = "");
691
- }, Fe = (t, n, r, i) => {
692
- Ke(), t.scrollLeft = n, qt.current = t.scrollLeft, P(), r !== void 0 ? (M.current = r, Bt(r)) : B(), V(!0), i == null || i();
693
- }, Be = (t, { behavior: n = "smooth", activeIndex: r, onComplete: i } = {}) => {
694
- const l = b.current, u = Vt.current;
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;
695
695
  if (!l || !u) return;
696
- if (At(), vt(), V(!1), n === "auto") {
697
- Fe(l, t, r, i);
696
+ if (Mt(), bt(), Y(!1), n === "auto") {
697
+ He(l, t, r, i);
698
698
  return;
699
699
  }
700
- const h = Math.abs(t - l.scrollLeft), g = Bn(
700
+ const h = Math.abs(t - l.scrollLeft), g = Xn(
701
701
  h,
702
- jn,
703
- Gn,
702
+ Yn,
703
+ qn,
704
704
  l.clientWidth * 0.55
705
705
  );
706
- it.current = Xn(l, u, t, {
706
+ it.current = Vn(l, u, t, {
707
707
  duration: g,
708
- easing: Yn,
708
+ easing: Un,
709
709
  onComplete: () => {
710
- it.current = null, Fe(l, t, r, i);
710
+ it.current = null, He(l, t, r, i);
711
711
  }
712
712
  });
713
- }, Tn = (t = "smooth") => {
713
+ }, An = (t = "smooth") => {
714
714
  const n = b.current;
715
715
  if (!n || o.length === 0) return;
716
- const r = st() % o.length, i = _e(r, n.scrollLeft), l = $.current[i];
717
- l && Be(l.offsetLeft, { behavior: t, activeIndex: r });
718
- }, In = (t, n = "smooth", r, i) => {
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) => {
719
719
  const l = b.current;
720
720
  if (!l || o.length === 0) return;
721
- const u = (i ?? l.scrollLeft) - t, h = st(t), g = $.current[h];
722
- if (ne(g)) {
723
- V(!0), B();
721
+ const u = (i ?? l.scrollLeft) - t, h = st(t), g = S.current[h];
722
+ if (ie(g)) {
723
+ Y(!0), D();
724
724
  return;
725
725
  }
726
- const I = $.current[h + 1], W = g ? I ? I.offsetLeft - g.offsetLeft : g.offsetWidth : 0;
727
- if ((W > 0 ? u > W * Nt ? 1 : u < -W * Nt ? -1 : 0 : 0) !== 0) {
728
- const Nn = r ?? h % o.length, _n = Sn(
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(
729
729
  i ?? l.scrollLeft,
730
730
  t,
731
- Nn
731
+ kn
732
732
  );
733
- at(_n, n);
733
+ at(En, n);
734
734
  return;
735
735
  }
736
- const bt = i ?? l.scrollLeft, Ct = st(bt), He = $.current[Ct];
737
- if (He && Math.abs(He.offsetLeft - bt) < 1) {
738
- V(!0), B();
736
+ const xt = i ?? l.scrollLeft, Nt = st(xt), je = S.current[Nt];
737
+ if (je && Math.abs(je.offsetLeft - xt) < 1) {
738
+ Y(!0), D();
739
739
  return;
740
740
  }
741
- Tn("auto");
741
+ An("auto");
742
742
  }, at = (t, n = "smooth") => {
743
743
  const r = b.current;
744
744
  if (!r || o.length === 0) return;
745
- const i = _e(t, r.scrollLeft), l = $.current[i];
746
- l && (n === "smooth" ? J.current = t : J.current = null, M.current = t, Bt(t), re(!0), Be(l.offsetLeft, {
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, {
747
747
  behavior: n,
748
748
  activeIndex: t,
749
- onComplete: n === "smooth" ? Ln : void 0
749
+ onComplete: n === "smooth" ? Wn : void 0
750
750
  }));
751
- }, oe = () => {
752
- pt.current && (window.removeEventListener("pointerup", pt.current), window.removeEventListener("pointercancel", pt.current), pt.current = null);
753
- }, Wn = (t, n, r, i, l) => {
754
- const u = r - t, h = i - n, g = Math.abs(u), I = Math.abs(h);
755
- if (g < Qn || g <= I) return !1;
756
- const W = u < 0 ? 1 : -1, ct = T ? (l + W + o.length) % o.length : Math.max(0, Math.min(o.length - 1, l + W));
751
+ }, se = () => {
752
+ gt.current && (window.removeEventListener("pointerup", gt.current), window.removeEventListener("pointercancel", gt.current), gt.current = null);
753
+ }, Mn = (t, n, r, i, l) => {
754
+ const u = r - t, h = i - n, g = Math.abs(u), T = Math.abs(h);
755
+ if (g < er || g <= T) return !1;
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
- }, Rt = (t) => {
758
+ }, Ct = (t) => {
759
759
  if (!x.current.isActive) return;
760
- oe();
760
+ se();
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;
764
- P(!0), x.current = {
764
+ Q(!0), x.current = {
765
765
  isActive: !1,
766
766
  startX: 0,
767
767
  scrollLeft: 0,
768
768
  startActiveIndex: 0,
769
769
  hasMoved: !1
770
- }, Ie(!1), t !== void 0 && n.hasPointerCapture(t) && n.releasePointerCapture(t), l ? In(r, "smooth", i, u) : (V(!0), B()), F();
771
- }, An = (t, n) => {
772
- const r = Wt.current;
773
- Wt.current = null, r && (Wn(
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) => {
772
+ const r = Rt.current;
773
+ Rt.current = null, r && (Mn(
774
774
  r.startX,
775
775
  r.startY,
776
776
  t,
777
777
  n,
778
778
  r.startActiveIndex
779
- ), F());
780
- }, Rn = (t) => {
781
- if (!mt) return;
779
+ ), H());
780
+ }, Nn = (t) => {
781
+ if (!pt) return;
782
782
  if (t.pointerType === "touch") {
783
- if (At(), V(!0), te(t.target)) return;
784
- Wt.current = {
783
+ if (Mt(), Y(!0), re(t.target)) return;
784
+ Rt.current = {
785
785
  startX: t.clientX,
786
786
  startY: t.clientY,
787
- startActiveIndex: M.current
787
+ startActiveIndex: N.current
788
788
  };
789
789
  return;
790
790
  }
791
- if (t.pointerType !== "mouse" || t.button !== 0 || te(t.target)) return;
791
+ if (t.pointerType !== "mouse" || t.button !== 0 || re(t.target)) return;
792
792
  const n = b.current;
793
793
  if (!n) return;
794
- At(), vt(), Ke(), J.current = null, x.current = {
794
+ Mt(), bt(), Be(), Z.current = null, x.current = {
795
795
  isActive: !0,
796
796
  startX: t.clientX,
797
797
  scrollLeft: n.scrollLeft,
798
- startActiveIndex: M.current,
798
+ startActiveIndex: N.current,
799
799
  hasMoved: !1
800
- }, V(!1), F(), n.setPointerCapture(t.pointerId), oe();
800
+ }, Y(!1), H(), n.setPointerCapture(t.pointerId), se();
801
801
  const r = (i) => {
802
- i.pointerType === "mouse" && Rt(i.pointerId);
802
+ i.pointerType === "mouse" && Ct(i.pointerId);
803
803
  };
804
- pt.current = r, window.addEventListener("pointerup", r), window.addEventListener("pointercancel", r);
805
- }, Cn = (t) => {
806
- if (!mt || t.pointerType !== "mouse") return;
804
+ gt.current = r, window.addEventListener("pointerup", r), window.addEventListener("pointercancel", r);
805
+ }, _n = (t) => {
806
+ if (!pt || t.pointerType !== "mouse") return;
807
807
  const n = b.current;
808
808
  if (!n || !x.current.isActive) return;
809
809
  if (t.buttons === 0) {
810
- Rt(t.pointerId);
810
+ Ct(t.pointerId);
811
811
  return;
812
812
  }
813
813
  const r = t.clientX - x.current.startX;
814
- Math.abs(r) > Jn && (x.current.hasMoved = !0, Ie(!0)), x.current.hasMoved && (t.preventDefault(), n.scrollLeft = x.current.scrollLeft - r, P(!0), B(), F());
815
- }, De = (t) => {
816
- if (mt) {
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());
815
+ }, Xe = (t) => {
816
+ if (pt) {
817
817
  if (t.pointerType === "touch") {
818
- t.type === "pointerup" ? An(t.clientX, t.clientY) : Wt.current = null;
818
+ t.type === "pointerup" ? Cn(t.clientX, t.clientY) : Rt.current = null;
819
819
  return;
820
820
  }
821
- t.pointerType === "mouse" && Rt(t.pointerId);
821
+ t.pointerType === "mouse" && Ct(t.pointerId);
822
822
  }
823
- }, Mn = (t) => {
824
- !mt || t.pointerType !== "mouse" || Rt(t.pointerId);
823
+ }, On = (t) => {
824
+ !pt || t.pointerType !== "mouse" || Ct(t.pointerId);
825
825
  };
826
- return Kn(), ft(() => {
827
- const t = requestAnimationFrame(() => Ae(!0));
826
+ return Hn(), ft(() => {
827
+ const t = requestAnimationFrame(() => Me(!0));
828
828
  return () => {
829
- cancelAnimationFrame(t), vt(), oe(), lt.current !== null && (cancelAnimationFrame(lt.current), lt.current = null), Pt.current && clearTimeout(Pt.current), Q.current && clearTimeout(Q.current);
829
+ cancelAnimationFrame(t), bt(), se(), lt.current !== null && (cancelAnimationFrame(lt.current), lt.current = null), ne.current && clearTimeout(ne.current), J.current && clearTimeout(J.current);
830
830
  };
831
831
  }, []), ft(() => {
832
- if (!dt) {
833
- Jt(!0);
832
+ if (!mt) {
833
+ te(!0);
834
834
  return;
835
835
  }
836
- F();
837
- const t = () => F();
836
+ H();
837
+ const t = () => H();
838
838
  return document.addEventListener("pointermove", t, { passive: !0 }), document.addEventListener("pointerdown", t, { passive: !0 }), () => {
839
- document.removeEventListener("pointermove", t), document.removeEventListener("pointerdown", t), Q.current && clearTimeout(Q.current);
839
+ document.removeEventListener("pointermove", t), document.removeEventListener("pointerdown", t), J.current && clearTimeout(J.current);
840
840
  };
841
- }, [dt, F]), ft(() => {
841
+ }, [mt, H]), ft(() => {
842
842
  const t = (n) => {
843
- n.key === "Escape" && gt();
843
+ n.key === "Escape" && vt();
844
844
  };
845
845
  return window.addEventListener("keydown", t), () => window.removeEventListener("keydown", t);
846
- }, [gt]), ie(() => {
847
- ee();
848
- }, [ht, o.length, T]), ie(() => {
849
- s || at(M.current, "auto");
850
- }, [ht, s]), ie(() => {
846
+ }, [vt]), ae(() => {
847
+ oe();
848
+ }, [dt, o.length, L]), ae(() => {
849
+ s || at(N.current, "auto");
850
+ }, [dt, s]), ae(() => {
851
851
  at(0, "auto");
852
- }, [o.length, T]), ft(() => {
852
+ }, [o.length, L]), ft(() => {
853
853
  const t = b.current;
854
- if (!t || s || !U) return;
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 ? Un : r.deltaMode === 2 ? t.clientHeight : 1, l = r.deltaY * i * qn;
857
+ const i = r.deltaMode === 1 ? Qn : r.deltaMode === 2 ? t.clientHeight : 1, l = r.deltaY * i * Jn;
858
858
  if (l !== 0) {
859
- if (vt(), Z.current || (Z.current = !0, G.current = t.scrollLeft, J.current = null, V(!1)), G.current += l, !T) {
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
- F(), Y.current === null && (Y.current = requestAnimationFrame(Ee));
863
+ H(), V.current === null && (V.current = requestAnimationFrame(Ke));
864
864
  }
865
865
  };
866
866
  return t.addEventListener("wheel", n, { passive: !1 }), () => {
867
- t.removeEventListener("wheel", n), At();
867
+ t.removeEventListener("wheel", n), Mt();
868
868
  };
869
- }, [s, U, T]), ft(() => {
869
+ }, [s, q, L]), ft(() => {
870
870
  const t = b.current;
871
871
  if (!t) return;
872
872
  const n = () => {
873
- P(x.current.isActive);
874
- const i = t.scrollLeft, l = i - qt.current;
875
- qt.current = i;
873
+ Q(x.current.isActive);
874
+ const i = t.scrollLeft, l = i - Jt.current;
875
+ Jt.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 !== Ut.current && (Ut.current = h, Oe(h));
879
+ h !== Qt.current && (Qt.current = h, ze(h));
880
880
  }
881
- x.current.isActive && x.current.hasMoved || B();
881
+ x.current.isActive && x.current.hasMoved || D();
882
882
  };
883
883
  t.addEventListener("scroll", n, { passive: !0 });
884
884
  const r = new ResizeObserver(() => {
885
- ee(), P(x.current.isActive), Oe(Ut.current), B();
885
+ oe(), Q(x.current.isActive), ze(Qt.current), D();
886
886
  });
887
887
  return r.observe(t), () => {
888
- vt(), t.removeEventListener("scroll", n), r.disconnect();
888
+ bt(), t.removeEventListener("scroll", n), r.disconnect();
889
889
  };
890
- }, [o.length, T]), /* @__PURE__ */ w(
890
+ }, [o.length, L]), /* @__PURE__ */ w(
891
891
  "div",
892
892
  {
893
893
  "data-selection": "none",
894
894
  className: `${e}-lightbox${c ? ` ${e}-lightbox-editor` : ""}${s ? ` ${e}-lightbox-edit-mode` : ""}`,
895
895
  onClick: () => {
896
- gn || gt();
896
+ xn || vt();
897
897
  },
898
898
  role: "dialog",
899
899
  "aria-modal": "true",
900
900
  "aria-label": "Image gallery",
901
901
  style: {
902
- opacity: We ? 1 : 0,
903
- transition: `opacity ${wt}ms ease`,
904
- pointerEvents: We ? "auto" : "none"
902
+ opacity: Re ? 1 : 0,
903
+ transition: `opacity ${$t}ms ease`,
904
+ pointerEvents: Re ? "auto" : "none"
905
905
  },
906
906
  children: [
907
- /* @__PURE__ */ f("div", { className: `${e}-lightbox-backdrop`, style: { backgroundColor: S, ...vn } }),
907
+ /* @__PURE__ */ f("div", { className: `${e}-lightbox-backdrop`, style: { backgroundColor: $, ...yn } }),
908
908
  /* @__PURE__ */ w(
909
909
  "div",
910
910
  {
911
- ref: un,
911
+ ref: dn,
912
912
  className: `${e}-lightbox-dismiss-area`,
913
- style: wn,
914
- ...yn,
913
+ style: Ln,
914
+ ...Sn,
915
915
  children: [
916
- /* @__PURE__ */ f("div", { className: `${e}-lightbox-content`, style: bn, onClick: (t) => t.stopPropagation(), children: /* @__PURE__ */ f(
916
+ /* @__PURE__ */ f("div", { className: `${e}-lightbox-content`, style: wn, 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
- "data-mouse-draggable": mt && o.length > 0 ? "true" : "false",
923
- "data-mouse-dragging": hn ? "true" : "false",
924
- onPointerDown: Rn,
925
- onPointerMove: Cn,
926
- onPointerUp: De,
927
- onPointerCancel: De,
928
- onLostPointerCapture: Mn,
929
- children: /* @__PURE__ */ f("div", { ref: Vt, className: `${e}-lightbox-strip-track`, style: { gap: ht }, children: fn.map((t, n) => {
930
- const r = t.image.objectFit ?? "contain", i = n % o.length, l = Math.floor(n / o.length), u = _t(ht), h = `calc(-0.5 * (${u} + ${ht}))`;
922
+ "data-mouse-draggable": pt && o.length > 0 ? "true" : "false",
923
+ "data-mouse-dragging": pn ? "true" : "false",
924
+ onPointerDown: Nn,
925
+ onPointerMove: _n,
926
+ onPointerUp: Xe,
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}))`;
931
931
  return /* @__PURE__ */ w(
932
932
  "div",
933
933
  {
934
- ref: (g) => $.current[n] = g,
934
+ ref: (g) => S.current[n] = g,
935
935
  className: `${e}-strip-item`,
936
- style: { height: pe === "mobile" ? "calc(0.75 * var(--cntrl-viewport-height, 100vh))" : "100%" },
936
+ style: { height: ve === "mobile" ? "calc(0.75 * var(--cntrl-viewport-height, 100vh))" : "100%" },
937
937
  children: [
938
938
  /* @__PURE__ */ f(
939
939
  "img",
@@ -975,8 +975,8 @@ const Bn = (e, o, a, c) => {
975
975
  "div",
976
976
  {
977
977
  className: `${e}-lightbox-content-inner`,
978
- "data-overlay-content-hidden": Ce ? "true" : "false",
979
- style: xn,
978
+ "data-overlay-content-hidden": Ne ? "true" : "false",
979
+ style: $n,
980
980
  children: [
981
981
  /* @__PURE__ */ f(
982
982
  "div",
@@ -984,7 +984,7 @@ const Bn = (e, o, a, c) => {
984
984
  style: {
985
985
  position: "relative",
986
986
  width: "100%",
987
- height: ve,
987
+ height: xe,
988
988
  flexShrink: 0,
989
989
  pointerEvents: "none"
990
990
  },
@@ -999,7 +999,7 @@ const Bn = (e, o, a, c) => {
999
999
  left: 0,
1000
1000
  right: 0,
1001
1001
  top: 0,
1002
- height: Je,
1002
+ height: tn,
1003
1003
  pointerEvents: "auto",
1004
1004
  zIndex: 3
1005
1005
  }
@@ -1007,21 +1007,21 @@ const Bn = (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${N ? ` ${e}-lightbox-content-area-stacked` : ""}`, children: ($e || L) && /* @__PURE__ */ f("div", { className: `${e}-header ${N ? `${e}-header-two-row` : `${e}-header-single-row`}`, children: N ? mn() : $e || L ? pn() : 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: _ ? vn() : Te || R ? bn() : null }) }) })
1011
1011
  ]
1012
1012
  }
1013
1013
  ),
1014
- o.length > 1 && zt === "on" && (() => {
1015
- const t = _t(Ft), n = `calc(-0.5 * (${Ft} + ${t}))`;
1014
+ o.length > 1 && ht === "on" && (() => {
1015
+ const t = kt(Dt), n = `calc(-0.5 * (${Dt} + ${t}))`;
1016
1016
  return /* @__PURE__ */ f(
1017
1017
  "div",
1018
1018
  {
1019
1019
  className: `${e}-thumbnails-wrap`,
1020
- style: { bottom: Ft },
1020
+ style: { bottom: Dt },
1021
1021
  children: /* @__PURE__ */ f(
1022
1022
  "div",
1023
1023
  {
1024
- ref: Te,
1024
+ ref: We,
1025
1025
  className: `${e}-thumbnails`,
1026
1026
  "data-lightbox-scrollable": "",
1027
1027
  onClick: (r) => r.stopPropagation(),
@@ -1029,19 +1029,19 @@ const Bn = (e, o, a, c) => {
1029
1029
  "div",
1030
1030
  {
1031
1031
  className: `${e}-thumbnails-track`,
1032
- "data-thumbnail-active": Ye,
1032
+ "data-thumbnail-active": Ue,
1033
1033
  style: {
1034
- gap: Kt,
1035
- "--thumbnail-active-color": Ve
1034
+ gap: Ht,
1035
+ "--thumbnail-active-color": Ze
1036
1036
  },
1037
1037
  children: [
1038
1038
  o.map((r, i) => {
1039
- const l = _t(Kt), u = `calc(-0.5 * (${l} + ${Kt}))`;
1039
+ const l = kt(Ht), u = `calc(-0.5 * (${l} + ${Ht}))`;
1040
1040
  return /* @__PURE__ */ w(
1041
1041
  "div",
1042
1042
  {
1043
1043
  ref: (h) => {
1044
- It.current[i] = h;
1044
+ At.current[i] = h;
1045
1045
  },
1046
1046
  style: { position: "relative", flex: "0 0 auto" },
1047
1047
  children: [
@@ -1051,24 +1051,24 @@ const Bn = (e, o, a, c) => {
1051
1051
  type: "button",
1052
1052
  className: `${e}-thumb`,
1053
1053
  "data-active": nt === i ? "true" : "false",
1054
- onClick: () => U && ce === "click" && at(i),
1055
- onMouseEnter: () => Pe && ce === "hover" && at(i),
1054
+ onClick: () => q && St === "click" && at(i),
1055
+ onMouseEnter: () => nn && 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(
1059
1059
  "img",
1060
1060
  {
1061
- className: `${e}-thumb-image${Se ? ` ${e}-thumb-image-cover` : ""}`,
1061
+ className: `${e}-thumb-image${Le ? ` ${e}-thumb-image-cover` : ""}`,
1062
1062
  src: r.image.assetId,
1063
1063
  alt: "",
1064
1064
  draggable: !1,
1065
1065
  style: {
1066
- ...tn,
1067
- maxWidth: ge,
1068
- maxHeight: ge,
1069
- width: St.display === "cover" ? "auto" : "100%",
1066
+ ...rn,
1067
+ maxWidth: be,
1068
+ maxHeight: be,
1069
+ width: Lt.display === "cover" ? "auto" : "100%",
1070
1070
  height: "auto",
1071
- objectFit: St.display === "cover" ? "cover" : "contain"
1071
+ objectFit: Lt.display === "cover" ? "cover" : "contain"
1072
1072
  }
1073
1073
  }
1074
1074
  )
@@ -1126,8 +1126,8 @@ const Bn = (e, o, a, c) => {
1126
1126
  ]
1127
1127
  }
1128
1128
  );
1129
- };
1130
- function ur(e) {
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) {
1131
1131
  return `
1132
1132
  .${e}-wrapper {
1133
1133
  position: relative;
@@ -1173,6 +1173,32 @@ function ur(e) {
1173
1173
  max-width: 100%;
1174
1174
  }
1175
1175
 
1176
+ .${e}-hover-zoom-in .${e}-cover-image {
1177
+ clip-path: inset(0);
1178
+ transition: transform ${zt}ms ${Ft}, clip-path ${zt}ms ${Ft};
1179
+ }
1180
+
1181
+ .${e}-hover-scale-down .${e}-cover-image {
1182
+ transition: transform ${zt}ms ${Ft};
1183
+ }
1184
+
1185
+ .${e}-hover-greyscale .${e}-cover-image {
1186
+ transition: filter ${zt}ms ${Ft};
1187
+ }
1188
+
1189
+ @media (hover: hover) {
1190
+ .${e}-hover-zoom-in .${e}-cover:hover .${e}-cover-image {
1191
+ transform: scale(${qe});
1192
+ clip-path: inset(${dr});
1193
+ }
1194
+ .${e}-hover-scale-down .${e}-cover:hover .${e}-cover-image {
1195
+ transform: scale(0.9);
1196
+ }
1197
+ .${e}-hover-greyscale .${e}-cover:hover .${e}-cover-image {
1198
+ filter: grayscale(1);
1199
+ }
1200
+ }
1201
+
1176
1202
  .${e}-lightbox {
1177
1203
  position: fixed;
1178
1204
  inset: 0;
@@ -1359,7 +1385,7 @@ function ur(e) {
1359
1385
  background-color: transparent;
1360
1386
  padding: 0;
1361
1387
  opacity: 1;
1362
- transition: opacity ${wt}ms ease;
1388
+ transition: opacity ${$t}ms ease;
1363
1389
  }
1364
1390
 
1365
1391
  .${e}-close-icon[data-overlay-content-hidden="true"] {
@@ -1472,7 +1498,7 @@ function ur(e) {
1472
1498
  display: flex;
1473
1499
  flex-direction: column;
1474
1500
  opacity: 1;
1475
- transition: opacity ${wt}ms ease;
1501
+ transition: opacity ${$t}ms ease;
1476
1502
  }
1477
1503
 
1478
1504
  .${e}-lightbox-content-inner[data-overlay-content-hidden="true"] {
@@ -1515,60 +1541,60 @@ function ur(e) {
1515
1541
  }
1516
1542
  `;
1517
1543
  }
1518
- const wr = ({ settings: e, content: o, isEditor: a, isEditMode: c, isPreviewMode: s, portalId: d }) => {
1519
- const { prefix: m } = On(), { cover: S, coverFit: R } = e, H = p(null), [k, X] = yt(!1), L = o ?? [], q = k && L.length > 0, E = () => {
1520
- L.length !== 0 && X(!0);
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);
1521
1547
  };
1522
1548
  return ft(() => {
1523
- !a || c || s || X(!1);
1524
- }, [a, c, s]), /* @__PURE__ */ w(xt, { children: [
1525
- /* @__PURE__ */ w("div", { ref: H, className: `${m}-wrapper`, children: [
1526
- /* @__PURE__ */ f("style", { dangerouslySetInnerHTML: { __html: ur(m) } }),
1527
- S && /* @__PURE__ */ f(
1549
+ !a || c || s || K(!1);
1550
+ }, [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) } }),
1553
+ $ && /* @__PURE__ */ f(
1528
1554
  "div",
1529
1555
  {
1530
- className: `${m}-cover ${Ot(R) ? `${m}-ratio-wrapper-cover` : `${m}-ratio-wrapper-fit`}`,
1531
- onClick: () => E(),
1532
- style: { ...Ot(R) ? { "--image-aspect-ratio": je(R) } : {} },
1556
+ className: `${m}-cover ${Kt(A) ? `${m}-ratio-wrapper-cover` : `${m}-ratio-wrapper-fit`}`,
1557
+ onClick: () => St(),
1558
+ style: { ...Kt(A) ? { "--image-aspect-ratio": Ve(A) } : {} },
1533
1559
  "aria-label": "Open image gallery",
1534
1560
  children: /* @__PURE__ */ f(
1535
1561
  "img",
1536
1562
  {
1537
- className: `${m}-cover-image ${Ot(R) ? `${m}-cover-image-cover` : `${m}-cover-image-fit`}`,
1538
- src: S,
1563
+ className: `${m}-cover-image ${Kt(A) ? `${m}-cover-image-cover` : `${m}-cover-image-fit`}`,
1564
+ src: $,
1539
1565
  alt: "cover"
1540
1566
  }
1541
1567
  )
1542
1568
  }
1543
1569
  )
1544
1570
  ] }),
1545
- q && typeof document < "u" && (() => {
1546
- const tt = (d ? document.getElementById(d) : null) ?? document.body;
1547
- return kn(
1571
+ tt && typeof document < "u" && (() => {
1572
+ const ht = (d ? document.getElementById(d) : null) ?? document.body;
1573
+ return zn(
1548
1574
  /* @__PURE__ */ f(
1549
- cr,
1575
+ hr,
1550
1576
  {
1551
1577
  prefix: m,
1552
- images: L,
1578
+ images: M,
1553
1579
  settings: e,
1554
1580
  isEditor: a,
1555
1581
  isEditMode: c,
1556
1582
  isPreviewMode: s,
1557
- onClose: () => X(!1)
1583
+ onClose: () => K(!1)
1558
1584
  }
1559
1585
  ),
1560
- tt
1586
+ ht
1561
1587
  );
1562
1588
  })()
1563
1589
  ] });
1564
1590
  };
1565
1591
  export {
1566
- wr as LightboxStrip,
1567
- tr as STRIP_TEXT_STYLE_PREFIXES,
1568
- er as STRIP_TEXT_STYLE_TAB_LABELS,
1569
- yr as createStripTextStylePanelTab,
1570
- lr as createStripTextStyleTabContentItems,
1571
- or as extractTitlesFromLegacyText,
1572
- D as getStripTextStyleSettingKey,
1573
- ir as resolveStripItemTitles
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
+ X as getStripTextStyleSettingKey,
1599
+ ar as resolveStripItemTitles
1574
1600
  };