@cntrl-site/components 1.0.118-alpha.1 → 1.0.118-alpha.2

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.
@@ -1,13 +1,13 @@
1
- import { jsxs as L, jsx as s, Fragment as In } from "react/jsx-runtime";
2
- import { useRef as y, useMemo as uo, useState as R, useEffect as A, useLayoutEffect as mo, Fragment as _o } from "react";
3
- import { s as z } from "./scalingValue-C9JH5L6O.mjs";
1
+ import { jsxs as C, jsx as s, Fragment as In } from "react/jsx-runtime";
2
+ import { useRef as S, useMemo as uo, useState as I, useEffect as N, useLayoutEffect as mo, Fragment as _o } from "react";
3
+ import { s as A } from "./scalingValue-C9JH5L6O.mjs";
4
4
  import { b as Rn } from "./buildColorVars-CLyWQm5K.mjs";
5
5
  import { u as _n } from "./useScopedStyles-DhBG3557.mjs";
6
6
  import { u as Mn } from "./useLightboxScrollLock-VQ07s7EJ.mjs";
7
7
  import { o as Wn, t as En } from "./textStylesToCss-05Mn6I_2.mjs";
8
- import { i as ut, l as Gn } from "./loadSvgMaskUrl-xHgGYgPe.mjs";
9
- const w = 300, v = 300, Un = 8 / 1440, X = 4e-3, Dn = 50, jn = 1440, W = Dn / jn;
10
- function Vn(o) {
8
+ import { i as $t, l as Gn } from "./loadSvgMaskUrl-xHgGYgPe.mjs";
9
+ const y = 300, v = 300, Dn = 8 / 1440, U = 4e-3, Un = 50, Vn = 1440, M = Un / Vn;
10
+ function jn(o) {
11
11
  if (o === "default" || o === "compact" || o === "open") return o;
12
12
  if (o === "onScroll") return "compact";
13
13
  }
@@ -18,7 +18,7 @@ function Yn(o) {
18
18
  return o === "left" || o === "right" ? o : "center";
19
19
  }
20
20
  function Kn(o, t, e) {
21
- const n = z(t, e);
21
+ const n = A(t, e);
22
22
  return o === "center" ? `translateX(calc(-50% + ${n}))` : `translateX(${n})`;
23
23
  }
24
24
  function qn(o, t) {
@@ -30,12 +30,12 @@ function qn(o, t) {
30
30
  }
31
31
  return o;
32
32
  }
33
- function Go(o, t) {
33
+ function Eo(o, t) {
34
34
  const e = (qn(o, t) ?? "always").trim().toLowerCase().replace(/[_-]+/g, " ");
35
35
  return e === "open only" || e === "openonly" ? "open only" : e === "default only" || e === "defaultonly" ? "default only" : e === "open and compact" || e === "openandcompact" ? "open and compact" : e === "default and open" || e === "defaultandopen" ? "default and open" : e === "default and compact" || e === "defaultandcompact" ? "default and compact" : "always";
36
36
  }
37
37
  function Zn(o, t, e) {
38
- switch (Go(o.showIn, e)) {
38
+ switch (Eo(o.showIn, e)) {
39
39
  case "open only":
40
40
  return !1;
41
41
  case "default only":
@@ -51,7 +51,7 @@ function Zn(o, t, e) {
51
51
  }
52
52
  }
53
53
  function Jn(o, t) {
54
- switch (Go(o.showIn, t)) {
54
+ switch (Eo(o.showIn, t)) {
55
55
  case "default only":
56
56
  case "default and compact":
57
57
  return !1;
@@ -60,7 +60,7 @@ function Jn(o, t) {
60
60
  }
61
61
  }
62
62
  function Qn(o, t) {
63
- return !Array.isArray(o) || o.length === 0 ? !0 : o.some((e) => Go(e == null ? void 0 : e.showIn, t) !== "default only");
63
+ return !Array.isArray(o) || o.length === 0 ? !0 : o.some((e) => Eo(e == null ? void 0 : e.showIn, t) !== "default only");
64
64
  }
65
65
  function Pn(o) {
66
66
  return (o == null ? void 0 : o.find((t) => t.slug === "")) ?? (o == null ? void 0 : o[0]);
@@ -69,37 +69,33 @@ function oa(o, t) {
69
69
  const e = o ? t == null ? void 0 : t.find((n) => n.id === o) : Pn(t);
70
70
  return !o && !e ? "" : e ? e.slug === "" ? "/" : `/${e.slug}` : o.startsWith("/") || o.startsWith("#") || /^[a-z][a-z\d+\-.]*:/i.test(o) ? o : t ? `/${o}` : o;
71
71
  }
72
- function mt(o) {
72
+ function ut(o) {
73
73
  const t = (o ?? "").toLowerCase();
74
74
  return t === "blank" || t === "_blank" || t.includes("new");
75
75
  }
76
- function Mo(o) {
76
+ function zt(o) {
77
77
  const t = o.link;
78
78
  if (t && typeof t == "object") {
79
- const n = mt(t.target) ? "_blank" : void 0;
79
+ const n = ut(t.target) ? "_blank" : void 0;
80
80
  if (t.type === "url")
81
81
  return { type: "url", value: t.value ?? t.url ?? "", target: n };
82
82
  if (t.type === "anchor")
83
83
  return { type: "anchor", value: t.value ?? "", target: n };
84
84
  if (t.type === "page")
85
85
  return { type: "page", value: t.value ?? "", target: n, anchor: t.anchor };
86
- if (t.type === "file")
87
- return { type: "file", value: t.value ?? "" };
88
86
  if (typeof t.url == "string")
89
- return { type: "url", value: t.url, target: n, download: typeof t.download == "string" ? t.download : void 0 };
87
+ return { type: "url", value: t.url, target: n };
90
88
  }
91
- const e = mt(o.openIn) ? "_blank" : void 0;
89
+ const e = ut(o.openIn) ? "_blank" : void 0;
92
90
  return o.mode === "url" ? { type: "url", value: o.url ?? "", target: e } : { type: "page", value: o.page ?? "", target: e, anchor: o.anchor };
93
91
  }
94
92
  function ta(o) {
95
93
  return /^[a-z][a-z\d+\-.]*:/i.test(o) || o.startsWith("/") || o.startsWith("#") ? o : `https://${o}`;
96
94
  }
97
- function Wo(o, t) {
98
- const e = o.label || "Link", n = Mo(o);
95
+ function Mo(o, t) {
96
+ const e = o.label || "Link", n = zt(o);
99
97
  if (n.type === "url")
100
- return { label: e, href: n.value, target: n.target, download: n.download };
101
- if (n.type === "file")
102
- return { label: e, href: n.value ? "#" : "", target: "_blank" };
98
+ return { label: e, href: n.value, target: n.target };
103
99
  if (n.type === "anchor") {
104
100
  const p = n.value.replace(/^#/, "");
105
101
  return { label: e, href: p ? `#${p}` : "", target: n.target };
@@ -107,13 +103,13 @@ function Wo(o, t) {
107
103
  const r = oa(n.value, t), c = (n.anchor ?? "").replace(/^#/, ""), g = c ? r ? `${r}#${c}` : `#${c}` : r;
108
104
  return { label: e, href: g, target: n.target };
109
105
  }
110
- const _ = 24, I = _ * 0.125, Bt = _ * 0.125, Ro = (_ - (3 * I + 2 * Bt)) / 2, xt = I + Bt;
106
+ const R = 24, F = R * 0.125, Bt = R * 0.125, Ro = (R - (3 * F + 2 * Bt)) / 2, mt = F + Bt;
111
107
  function ea({ className: o, lineClassName: t }) {
112
- return /* @__PURE__ */ L(
108
+ return /* @__PURE__ */ C(
113
109
  "svg",
114
110
  {
115
111
  className: o,
116
- viewBox: `0 0 ${_} ${_}`,
112
+ viewBox: `0 0 ${R} ${R}`,
117
113
  "aria-hidden": "true",
118
114
  children: [
119
115
  /* @__PURE__ */ s(
@@ -122,9 +118,9 @@ function ea({ className: o, lineClassName: t }) {
122
118
  className: `${t} ${t}-top`,
123
119
  x: "0",
124
120
  y: Ro,
125
- width: _,
126
- height: I,
127
- rx: I / 2
121
+ width: R,
122
+ height: F,
123
+ rx: F / 2
128
124
  }
129
125
  ),
130
126
  /* @__PURE__ */ s(
@@ -132,10 +128,10 @@ function ea({ className: o, lineClassName: t }) {
132
128
  {
133
129
  className: `${t} ${t}-mid`,
134
130
  x: "0",
135
- y: Ro + xt,
136
- width: _,
137
- height: I,
138
- rx: I / 2
131
+ y: Ro + mt,
132
+ width: R,
133
+ height: F,
134
+ rx: F / 2
139
135
  }
140
136
  ),
141
137
  /* @__PURE__ */ s(
@@ -143,10 +139,10 @@ function ea({ className: o, lineClassName: t }) {
143
139
  {
144
140
  className: `${t} ${t}-bot`,
145
141
  x: "0",
146
- y: Ro + 2 * xt,
147
- width: _,
148
- height: I,
149
- rx: I / 2
142
+ y: Ro + 2 * mt,
143
+ width: R,
144
+ height: F,
145
+ rx: F / 2
150
146
  }
151
147
  )
152
148
  ]
@@ -159,13 +155,13 @@ function na(o, t, e, n) {
159
155
  function aa(o, t, e, n) {
160
156
  const r = o ?? 0.01;
161
157
  return t === void 0 || t >= r ? {} : {
162
- [`--${e}-text-leading-gap`]: z((r - t) / 2, n)
158
+ [`--${e}-text-leading-gap`]: A((r - t) / 2, n)
163
159
  };
164
160
  }
165
161
  const Ht = 4e-3;
166
- let ro;
162
+ let no;
167
163
  function ra() {
168
- return ro !== void 0 ? ro : typeof document > "u" ? (ro = null, null) : (ro = document.createElement("canvas").getContext("2d"), ro);
164
+ return no !== void 0 ? no : typeof document > "u" ? (no = null, null) : (no = document.createElement("canvas").getContext("2d"), no);
169
165
  }
170
166
  function ia(o) {
171
167
  const t = getComputedStyle(o), e = parseFloat(t.fontSize) || 0;
@@ -176,14 +172,14 @@ function ia(o) {
176
172
  const r = n.measureText("H"), c = r.actualBoundingBoxAscent > 0 ? r.actualBoundingBoxAscent : 0, g = Math.max(0, r.actualBoundingBoxDescent || 0), p = r.fontBoundingBoxAscent || 0, d = r.fontBoundingBoxDescent || 0;
177
173
  return c <= 0 || p <= 0 && d <= 0 ? 0 : (d - g - (p - c)) / 2 / e;
178
174
  }
179
- function kt(o, t) {
180
- const [e, n] = R(0);
175
+ function xt(o, t) {
176
+ const [e, n] = I(0);
181
177
  return mo(() => {
182
178
  const r = o.current;
183
179
  if (!r) return;
184
180
  const c = () => {
185
181
  const d = ia(r);
186
- n((m) => Math.abs(m - d) < Ht ? m : d);
182
+ n((u) => Math.abs(u - d) < Ht ? u : d);
187
183
  };
188
184
  c();
189
185
  const g = document.fonts;
@@ -195,11 +191,11 @@ function kt(o, t) {
195
191
  };
196
192
  }, [o, t]), e;
197
193
  }
198
- function bt(o) {
194
+ function kt(o) {
199
195
  if (!(Math.abs(o) < Ht))
200
196
  return `translateY(${o}em)`;
201
197
  }
202
- function St(o) {
198
+ function bt(o) {
203
199
  var t, e;
204
200
  return [
205
201
  o.fontFamily ?? "",
@@ -209,7 +205,7 @@ function St(o) {
209
205
  o.lineHeight ?? ""
210
206
  ].join("\0");
211
207
  }
212
- function yt(o) {
208
+ function St(o) {
213
209
  return {
214
210
  fontFamily: o.fontFamily,
215
211
  fontWeight: o.fontWeight,
@@ -224,7 +220,7 @@ function yt(o) {
224
220
  whiteSpace: "nowrap"
225
221
  };
226
222
  }
227
- function wt(o, t = {}) {
223
+ function yt(o, t = {}) {
228
224
  return {
229
225
  fontFamily: o.fontFamily ?? t.fontFamily,
230
226
  fontSettings: o.fontSettings ?? t.fontSettings,
@@ -236,7 +232,7 @@ function wt(o, t = {}) {
236
232
  textAppearance: o.textAppearance ?? t.textAppearance
237
233
  };
238
234
  }
239
- function Lt(o, t, e) {
235
+ function Ct(o, t, e) {
240
236
  var r, c;
241
237
  const n = {
242
238
  fontSettings: {
@@ -265,14 +261,14 @@ function Lt(o, t, e) {
265
261
  )
266
262
  };
267
263
  }
268
- function Ct(o) {
264
+ function Lt(o) {
269
265
  const t = o.split(/\r?\n/);
270
- return t.length === 1 ? o : t.map((e, n) => /* @__PURE__ */ L(_o, { children: [
266
+ return t.length === 1 ? o : t.map((e, n) => /* @__PURE__ */ C(_o, { children: [
271
267
  e,
272
268
  n < t.length - 1 ? /* @__PURE__ */ s("br", {}) : null
273
269
  ] }, n));
274
270
  }
275
- function Tt(o, t, e, n) {
271
+ function wt(o, t, e, n) {
276
272
  const r = Math.max(0, e - n), c = o + t;
277
273
  if (c <= r || c <= 0)
278
274
  return { start: o, end: t };
@@ -283,16 +279,16 @@ function Tt(o, t, e, n) {
283
279
  };
284
280
  }
285
281
  function Ot(o) {
286
- const e = Math.max(W, o.fontSize ?? W), { start: n, end: r } = Tt(
282
+ const e = Math.max(M, o.fontSize ?? M), { start: n, end: r } = wt(
287
283
  o.textPaddingTop,
288
284
  o.textPaddingBottom,
289
285
  1,
290
286
  e
291
- ), { start: c, end: g } = Tt(
287
+ ), { start: c, end: g } = wt(
292
288
  o.textPaddingLeft,
293
289
  o.textPaddingRight,
294
290
  1,
295
- W
291
+ M
296
292
  );
297
293
  return {
298
294
  effectivePaddingLeft: c,
@@ -349,8 +345,8 @@ function Ft(o) {
349
345
  const n = t.stateOverrides;
350
346
  return n && (n.onScroll !== void 0 || n["onScroll-hover"] !== void 0) && (e.stateOverrides = { ...o.stateOverrides }, n.onScroll !== void 0 && ((r = o.stateOverrides) == null ? void 0 : r.compact) === void 0 && (e.stateOverrides.compact = n.onScroll), n["onScroll-hover"] !== void 0 && ((c = o.stateOverrides) == null ? void 0 : c["compact-hover"]) === void 0 && (e.stateOverrides["compact-hover"] = n["onScroll-hover"])), Object.keys(e).length === 0 ? o : { ...o, ...e };
351
347
  }
352
- function Nt(o) {
353
- var r, c, g, p, d, m, C, B, b, a, $, H, Y, K, q, F;
348
+ function Tt(o) {
349
+ var r, c, g, p, d, u, L, z, m, a, B, V, j, X, Y, O;
354
350
  o = Ft(o);
355
351
  const t = o, e = {};
356
352
  if (o.backgroundColor === void 0 && t.panelColor !== void 0 && (e.backgroundColor = t.panelColor), o.openFontFamily === void 0 && o.fontFamily !== void 0 && (e.openFontFamily = o.fontFamily), o.openFontSettings === void 0 && o.fontSettings !== void 0 && (e.openFontSettings = o.fontSettings), o.openFontSize === void 0 && o.fontSize !== void 0 && (e.openFontSize = o.fontSize), o.openLineHeight === void 0 && o.lineHeight !== void 0 && (e.openLineHeight = o.lineHeight), o.openLetterSpacing === void 0 && o.letterSpacing !== void 0 && (e.openLetterSpacing = o.letterSpacing), o.openWordSpacing === void 0 && o.wordSpacing !== void 0 && (e.openWordSpacing = o.wordSpacing), o.openTextAlign === void 0 && o.textAlign !== void 0 && (e.openTextAlign = o.textAlign), o.openTextAppearance === void 0 && o.textAppearance !== void 0 && (e.openTextAppearance = o.textAppearance), o.openLinkColor === void 0) {
@@ -358,30 +354,30 @@ function Nt(o) {
358
354
  f !== void 0 && (e.openLinkColor = f);
359
355
  }
360
356
  if (o.compactIconColor === void 0) {
361
- const f = ((m = (d = o.stateOverrides) == null ? void 0 : d.compact) == null ? void 0 : m.iconColor) ?? o.iconColor;
357
+ const f = ((u = (d = o.stateOverrides) == null ? void 0 : d.compact) == null ? void 0 : u.iconColor) ?? o.iconColor;
362
358
  f !== void 0 && (e.compactIconColor = f);
363
359
  }
364
360
  if (o.compactLinkColor === void 0) {
365
- const f = ((B = (C = o.stateOverrides) == null ? void 0 : C.compact) == null ? void 0 : B.linkColor) ?? o.linkColor;
361
+ const f = ((z = (L = o.stateOverrides) == null ? void 0 : L.compact) == null ? void 0 : z.linkColor) ?? o.linkColor;
366
362
  f !== void 0 && (e.compactLinkColor = f);
367
363
  }
368
364
  if (o.compactLogoColor === void 0) {
369
- const f = ((a = (b = o.stateOverrides) == null ? void 0 : b.compact) == null ? void 0 : a.logoColor) ?? o.logoColor;
365
+ const f = ((a = (m = o.stateOverrides) == null ? void 0 : m.compact) == null ? void 0 : a.logoColor) ?? o.logoColor;
370
366
  f !== void 0 && (e.compactLogoColor = f);
371
367
  }
372
368
  if (o.openLogoColor === void 0) {
373
- const f = ((H = ($ = o.stateOverrides) == null ? void 0 : $.open) == null ? void 0 : H.logoColor) ?? o.logoColor;
369
+ const f = ((V = (B = o.stateOverrides) == null ? void 0 : B.open) == null ? void 0 : V.logoColor) ?? o.logoColor;
374
370
  f !== void 0 && (e.openLogoColor = f);
375
371
  }
376
372
  if (o.compactBackgroundColor === void 0) {
377
- const f = ((K = (Y = o.stateOverrides) == null ? void 0 : Y.compact) == null ? void 0 : K.backgroundColor) ?? ((F = (q = t.stateOverrides) == null ? void 0 : q.compact) == null ? void 0 : F.panelColor) ?? t.compactPanelColor ?? t.onScrollPanelColor ?? o.backgroundColor ?? e.backgroundColor;
373
+ const f = ((X = (j = o.stateOverrides) == null ? void 0 : j.compact) == null ? void 0 : X.backgroundColor) ?? ((O = (Y = t.stateOverrides) == null ? void 0 : Y.compact) == null ? void 0 : O.panelColor) ?? t.compactPanelColor ?? t.onScrollPanelColor ?? o.backgroundColor ?? e.backgroundColor;
378
374
  f !== void 0 && (e.compactBackgroundColor = f);
379
375
  }
380
376
  o.logoMaxHeight === void 0 && o.logoMaxWidth !== void 0 && (e.logoMaxHeight = o.logoMaxWidth), o.compactLogoMaxHeight === void 0 && o.compactLogoMaxWidth !== void 0 && (e.compactLogoMaxHeight = o.compactLogoMaxWidth);
381
- const n = (f, Z) => {
377
+ const n = (f, K) => {
382
378
  if (o[f] !== void 0) return;
383
- const J = o[Z];
384
- J !== void 0 && (e[f] = J);
379
+ const q = o[K];
380
+ q !== void 0 && (e[f] = q);
385
381
  };
386
382
  return n("compactLogoMaxHeight", "logoMaxHeight"), n("compactLogoPosition", "logoPosition"), n("compactPanelHeight", "panelHeight"), n("compactShowIcon", "showIcon"), n("compactIconSize", "iconSize"), n("compactNavTextWidth", "navTextWidth"), n("compactNavTextPosition", "navTextPosition"), n("compactNavTextOffset", "navTextOffset"), n("compactNavGap", "navGap"), n("compactNavPaddingLeft", "navPaddingLeft"), n("compactNavPaddingRight", "navPaddingRight"), n("compactFontFamily", "fontFamily"), n("compactFontSettings", "fontSettings"), n("compactFontSize", "fontSize"), n("compactLineHeight", "lineHeight"), n("compactLetterSpacing", "letterSpacing"), n("compactWordSpacing", "wordSpacing"), n("compactTextAlign", "textAlign"), n("compactTextAppearance", "textAppearance"), Object.keys(e).length === 0 ? o : { ...o, ...e };
387
383
  }
@@ -397,15 +393,15 @@ function ga(o, t) {
397
393
  }
398
394
  function fa(o, t) {
399
395
  return {
400
- paddingLeft: z(o.effectivePaddingLeft, t),
401
- paddingRight: z(o.effectivePaddingRight, t),
402
- paddingTop: z(o.effectivePaddingTop, t),
403
- paddingBottom: z(o.effectivePaddingBottom, t)
396
+ paddingLeft: A(o.effectivePaddingLeft, t),
397
+ paddingRight: A(o.effectivePaddingRight, t),
398
+ paddingTop: A(o.effectivePaddingTop, t),
399
+ paddingBottom: A(o.effectivePaddingBottom, t)
404
400
  };
405
401
  }
406
402
  function pa(o, t, e, n) {
407
- const r = Math.max(W, e ?? W), c = Math.max(t.effectivePaddingTop, X), g = Math.max(t.effectivePaddingBottom, X), p = Math.max(0, t.panelSize - t.effectivePaddingBottom - r), d = Math.max(0, t.panelSize - t.effectivePaddingTop - r), m = Math.max(t.effectivePaddingLeft, X), C = Math.max(t.effectivePaddingRight, X), B = Math.max(0, t.panelSize - t.effectivePaddingRight - W), b = Math.max(0, t.panelSize - t.effectivePaddingLeft - W);
408
- return /* @__PURE__ */ L(In, { children: [
403
+ const r = Math.max(M, e ?? M), c = Math.max(t.effectivePaddingTop, U), g = Math.max(t.effectivePaddingBottom, U), p = Math.max(0, t.panelSize - t.effectivePaddingBottom - r), d = Math.max(0, t.panelSize - t.effectivePaddingTop - r), u = Math.max(t.effectivePaddingLeft, U), L = Math.max(t.effectivePaddingRight, U), z = Math.max(0, t.panelSize - t.effectivePaddingRight - M), m = Math.max(0, t.panelSize - t.effectivePaddingLeft - M);
404
+ return /* @__PURE__ */ C(In, { children: [
409
405
  /* @__PURE__ */ s(
410
406
  "div",
411
407
  {
@@ -438,9 +434,9 @@ function pa(o, t, e, n) {
438
434
  "data-controls-axis": "x",
439
435
  "data-controls-variant": "column-padding",
440
436
  "data-controls-min": "0",
441
- "data-controls-max-fraction": String(B),
437
+ "data-controls-max-fraction": String(z),
442
438
  className: `${o}-control-anchor`,
443
- style: { top: 0, left: 0, width: n(m), height: "100%" }
439
+ style: { top: 0, left: 0, width: n(u), height: "100%" }
444
440
  }
445
441
  ),
446
442
  /* @__PURE__ */ s(
@@ -451,9 +447,9 @@ function pa(o, t, e, n) {
451
447
  "data-controls-variant": "column-padding",
452
448
  "data-controls-reverse": "",
453
449
  "data-controls-min": "0",
454
- "data-controls-max-fraction": String(b),
450
+ "data-controls-max-fraction": String(m),
455
451
  className: `${o}-control-anchor`,
456
- style: { top: 0, right: 0, width: n(C), height: "100%" }
452
+ style: { top: 0, right: 0, width: n(L), height: "100%" }
457
453
  }
458
454
  )
459
455
  ] });
@@ -512,7 +508,7 @@ function ma(o) {
512
508
  background: none;
513
509
  cursor: pointer;
514
510
  color: var(--${o}-icon-color);
515
- transition: color ${w}ms ease;
511
+ transition: color ${y}ms ease;
516
512
  line-height: 0;
517
513
  font-size: 0;
518
514
  -webkit-appearance: none;
@@ -532,7 +528,7 @@ function ma(o) {
532
528
  fill: currentColor;
533
529
  transform-box: fill-box;
534
530
  transform-origin: center;
535
- transition: transform ${w}ms ease, opacity ${w}ms ease;
531
+ transition: transform ${y}ms ease, opacity ${y}ms ease;
536
532
  }
537
533
  .${o}-root.${o}-open .${o}-icon-line-top {
538
534
  transform: translateY(200%) rotate(45deg);
@@ -587,7 +583,7 @@ function ma(o) {
587
583
  margin: 0;
588
584
  background-color: var(--${o}-overlay-color);
589
585
  opacity: 0;
590
- transition: opacity ${w}ms ease, background-color ${w}ms ease;
586
+ transition: opacity ${y}ms ease, background-color ${y}ms ease;
591
587
  }
592
588
  .${o}-lightbox.${o}-lightbox-active .${o}-backdrop {
593
589
  opacity: 1;
@@ -602,7 +598,7 @@ function ma(o) {
602
598
  flex-direction: column;
603
599
  overflow-y: auto;
604
600
  background-color: var(--${o}-menu-background-color);
605
- transition: transform ${w}ms ease, opacity ${w}ms ease, background-color ${w}ms ease;
601
+ transition: transform ${y}ms ease, opacity ${y}ms ease, background-color ${y}ms ease;
606
602
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.12);
607
603
  }
608
604
  .${o}-full-lightbox .${o}-panel {
@@ -1097,7 +1093,7 @@ function ma(o) {
1097
1093
  }
1098
1094
  .${o}-nav-state-anim .${o}-nav-bar {
1099
1095
  transition:
1100
- background-color ${w}ms ease,
1096
+ background-color ${y}ms ease,
1101
1097
  height ${v}ms ease,
1102
1098
  min-height ${v}ms ease,
1103
1099
  padding ${v}ms ease,
@@ -1135,8 +1131,8 @@ function ma(o) {
1135
1131
  }
1136
1132
  .${o}-nav-state-anim .${o}-icon-line {
1137
1133
  transition:
1138
- transform ${w}ms ease,
1139
- opacity ${w}ms ease;
1134
+ transform ${y}ms ease,
1135
+ opacity ${y}ms ease;
1140
1136
  }
1141
1137
  .${o}-nav-state-anim .${o}-nav-link,
1142
1138
  .${o}-nav-state-anim .${o}-link,
@@ -1152,13 +1148,13 @@ function ma(o) {
1152
1148
  }
1153
1149
  `;
1154
1150
  }
1155
- function Eo(o) {
1151
+ function Wo(o) {
1156
1152
  return o ? !o.startsWith("http://") && !o.startsWith("https://") && !o.startsWith("blob:") && !o.startsWith("data:") : !1;
1157
1153
  }
1158
1154
  function xa(o, t) {
1159
1155
  var n;
1160
1156
  const e = (n = o.logo) == null ? void 0 : n.icon;
1161
- return !o.logo || Eo(e) || !t ? o : {
1157
+ return !o.logo || Wo(e) || !t ? o : {
1162
1158
  ...o,
1163
1159
  logo: {
1164
1160
  ...o.logo,
@@ -1174,8 +1170,8 @@ function ba(o) {
1174
1170
  return t.startsWith("data:image/svg+xml") || t.includes("image/svg+xml") ? !0 : t.includes(".svg");
1175
1171
  }
1176
1172
  function Sa(o) {
1177
- const t = ba(o), [e, n] = R(!1);
1178
- return A(() => {
1173
+ const t = ba(o), [e, n] = I(!1);
1174
+ return N(() => {
1179
1175
  if (t || !o.startsWith("blob:")) {
1180
1176
  n(!1);
1181
1177
  return;
@@ -1201,13 +1197,13 @@ function Sa(o) {
1201
1197
  }, [t, o]), t || e;
1202
1198
  }
1203
1199
  function ya(o, t) {
1204
- const [e, n] = R(ut(o) ? o : null);
1205
- return A(() => {
1200
+ const [e, n] = I($t(o) ? o : null);
1201
+ return N(() => {
1206
1202
  if (!t || !o) {
1207
1203
  n(null);
1208
1204
  return;
1209
1205
  }
1210
- if (ut(o)) {
1206
+ if ($t(o)) {
1211
1207
  n(o);
1212
1208
  return;
1213
1209
  }
@@ -1221,7 +1217,7 @@ function ya(o, t) {
1221
1217
  };
1222
1218
  }, [t, o]), t ? e : null;
1223
1219
  }
1224
- function wa(o) {
1220
+ function Ca(o) {
1225
1221
  const t = o.indexOf("#");
1226
1222
  if (t === -1) return "";
1227
1223
  try {
@@ -1243,55 +1239,38 @@ function It(o) {
1243
1239
  const t = document.getElementById(o), e = document.querySelector(`[data-section-id="${CSS.escape(o)}"]`), n = t ?? e;
1244
1240
  return n instanceof HTMLElement ? n : null;
1245
1241
  }
1246
- function Ca(o, t) {
1247
- fetch(o).then((e) => {
1248
- if (!e.ok) throw new Error(`Could not download ${o}: ${e.status}`);
1249
- return e.blob();
1250
- }).then((e) => {
1251
- const n = URL.createObjectURL(e), r = document.createElement("a");
1252
- r.href = n, r.download = t || decodeURIComponent(o.split("?")[0].split("/").pop() ?? ""), document.body.appendChild(r), r.click(), r.remove(), window.setTimeout(() => URL.revokeObjectURL(n), 0);
1253
- }).catch(() => {
1254
- window.location.assign(o);
1255
- });
1256
- }
1257
- function At(o) {
1242
+ function Nt(o) {
1258
1243
  const t = It(o);
1259
1244
  return t ? (t.scrollIntoView({ behavior: "smooth", block: "start" }), !0) : !1;
1260
1245
  }
1261
- function Ta(o, t, e = {}) {
1262
- const { isEditor: n, isPreviewMode: r, item: c, pages: g, onLinkNavigate: p } = e, d = e.runAfterClose ?? ((a) => a()), m = o.currentTarget.getAttribute("href") ?? "", C = wa(m), B = o.currentTarget.target === "_blank";
1246
+ function wa(o, t, e = {}) {
1247
+ const { isEditor: n, isPreviewMode: r, item: c, pages: g, onLinkNavigate: p } = e, d = e.runAfterClose ?? ((m) => m()), u = o.currentTarget.getAttribute("href") ?? "", L = Ca(u), z = o.currentTarget.target === "_blank";
1263
1248
  if (c && p) {
1264
1249
  o.preventDefault(), o.stopPropagation();
1265
- const a = Wo(c, g), $ = Mo(c), H = {
1266
- mode: $.type === "url" || $.type === "file" ? $.type : "page",
1267
- href: a.href || m,
1268
- page: $.type === "page" ? $.value : void 0,
1269
- url: $.type === "url" ? $.value : void 0,
1270
- file: $.type === "file" ? $.value : void 0,
1271
- anchor: $.type === "anchor" ? $.value.replace(/^#/, "") : ($.anchor ?? "").replace(/^#/, ""),
1272
- target: a.target
1250
+ const m = Mo(c, g), a = zt(c), B = {
1251
+ mode: a.type === "url" ? "url" : "page",
1252
+ href: m.href || u,
1253
+ page: a.type === "page" ? a.value : void 0,
1254
+ url: a.type === "url" ? a.value : void 0,
1255
+ anchor: a.type === "anchor" ? a.value.replace(/^#/, "") : (a.anchor ?? "").replace(/^#/, ""),
1256
+ target: m.target
1273
1257
  };
1274
- H.target === "_blank" ? p(H) : d(() => p(H)), t();
1258
+ B.target === "_blank" ? p(B) : d(() => p(B)), t();
1275
1259
  return;
1276
1260
  }
1277
1261
  if (n) {
1278
- o.preventDefault(), d(() => At(C)), t();
1279
- return;
1280
- }
1281
- const b = c ? Mo(c).download : void 0;
1282
- if (b !== void 0 && m && !o.metaKey && !o.ctrlKey && !o.shiftKey && !o.altKey) {
1283
- o.preventDefault(), Ca(m, b), t();
1262
+ o.preventDefault(), d(() => Nt(L)), t();
1284
1263
  return;
1285
1264
  }
1286
- !B && C && La(m) && It(C) && (o.preventDefault(), d(() => At(C))), t();
1265
+ !z && L && La(u) && It(L) && (o.preventDefault(), d(() => Nt(L))), t();
1287
1266
  }
1288
- const Na = [
1267
+ const Ta = [
1289
1268
  "--cntrl-article-width",
1290
1269
  "--cntrl-article-top",
1291
1270
  "--cntrl-article-left",
1292
1271
  "--cntrl-viewport-height"
1293
1272
  ];
1294
- function Aa(o) {
1273
+ function Na(o) {
1295
1274
  let t = o;
1296
1275
  for (; t; ) {
1297
1276
  if (getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim())
@@ -1300,17 +1279,17 @@ function Aa(o) {
1300
1279
  }
1301
1280
  return o;
1302
1281
  }
1303
- function za(o) {
1304
- const t = {}, e = Aa(o);
1282
+ function Aa(o) {
1283
+ const t = {}, e = Na(o);
1305
1284
  if (!e) return t;
1306
1285
  const n = getComputedStyle(e);
1307
- for (const r of Na) {
1286
+ for (const r of Ta) {
1308
1287
  const c = n.getPropertyValue(r).trim();
1309
1288
  c && (t[r] = c);
1310
1289
  }
1311
1290
  return t;
1312
1291
  }
1313
- function zt(o, t, e, n, r) {
1292
+ function At(o, t, e, n, r) {
1314
1293
  return /* @__PURE__ */ s(
1315
1294
  "span",
1316
1295
  {
@@ -1327,7 +1306,7 @@ function zt(o, t, e, n, r) {
1327
1306
  }
1328
1307
  );
1329
1308
  }
1330
- function Ea({
1309
+ function Wa({
1331
1310
  settings: o,
1332
1311
  isEditor: t,
1333
1312
  isEditMode: e,
@@ -1337,28 +1316,28 @@ function Ea({
1337
1316
  isSwitchClone: g = !1,
1338
1317
  unavailableStates: p = [],
1339
1318
  layoutId: d,
1340
- pages: m,
1341
- onLinkNavigate: C,
1342
- onUpdateSettings: B,
1343
- onOpenChange: b
1319
+ pages: u,
1320
+ onLinkNavigate: L,
1321
+ onUpdateSettings: z,
1322
+ onOpenChange: m
1344
1323
  }) {
1345
- var ht, $t;
1346
- const { prefix: a } = _n(), $ = y(null), H = y(null), Y = y(null), K = y(null), q = y(null), F = y(0), f = y(null), Z = y(null), J = y(d), Rt = uo(() => ma(a), [a]), [_t, Q] = R(!1), [E, xo] = R(!1), [Uo, io] = R(!1), M = Vn(c), Mt = uo(() => new Set(p), [p]), ko = (i) => !!(i && Mt.has(i)), Do = Qn(o.link, d), Wt = !!(t && !n && M === "open" && !ko("open")), h = Do && (Wt || !(t && !n) && _t), bo = !!(t && !n), P = h && !bo;
1347
- Mn(P), A(() => {
1324
+ var vt, ht;
1325
+ const { prefix: a } = _n(), B = S(null), V = S(null), j = S(null), X = S(null), Y = S(null), O = S(0), f = S(null), K = S(null), q = S(d), Rt = uo(() => ma(a), [a]), [_t, Z] = I(!1), [W, xo] = I(!1), [Go, ao] = I(!1), _ = jn(c), Mt = uo(() => new Set(p), [p]), ko = (i) => !!(i && Mt.has(i)), Do = Qn(o.link, d), Wt = !!(t && !n && _ === "open" && !ko("open")), h = Do && (Wt || !(t && !n) && _t), bo = !!(t && !n), J = h && !bo;
1326
+ Mn(J), N(() => {
1348
1327
  if (!h || !bo) return;
1349
1328
  const i = document.documentElement, l = i.style.overflow;
1350
1329
  return i.style.overflow = "hidden", () => {
1351
1330
  i.style.overflow = l;
1352
1331
  };
1353
1332
  }, [h, bo]);
1354
- const Et = !ko("compact") && !ko("onScroll"), Gt = !t || !!n && !e, co = r && r !== "default" ? r : void 0, T = Et && M === "compact" ? "compact" : "default", [jo, Ut] = R(T), [So, Vo] = R(!1), Xo = !e;
1355
- T !== jo && (Ut(T), Xo && Vo(!0));
1356
- const Dt = Ft(o), {
1357
- logo: G,
1358
- logoLink: Yo = "",
1359
- logoMaxHeight: jt = 120 / 1440,
1360
- logoPosition: Vt = "left",
1361
- panelHeight: Ko = 60 / 1440,
1333
+ const Et = !ko("compact") && !ko("onScroll"), Gt = !t || !!n && !e, ro = r && r !== "default" ? r : void 0, w = Et && _ === "compact" ? "compact" : "default", [Uo, Dt] = I(w), [So, Vo] = I(!1), jo = !e;
1334
+ w !== Uo && (Dt(w), jo && Vo(!0));
1335
+ const Ut = Ft(o), {
1336
+ logo: E,
1337
+ logoLink: Xo = "",
1338
+ logoMaxHeight: Vt = 120 / 1440,
1339
+ logoPosition: jt = "left",
1340
+ panelHeight: Yo = 60 / 1440,
1362
1341
  backgroundColor: Xt = "#b3b3b3",
1363
1342
  logoColor: Yt = "#000000",
1364
1343
  position: Kt,
@@ -1391,25 +1370,25 @@ function Ea({
1391
1370
  compactLetterSpacing: be = 0,
1392
1371
  compactWordSpacing: Se = 0,
1393
1372
  compactTextAlign: ye = "left",
1394
- compactTextAppearance: we,
1373
+ compactTextAppearance: Ce,
1395
1374
  openLogoColor: Le = "#000000",
1396
- menuBackgroundColor: qo = "#ffffff",
1397
- overlayColor: Ce = "rgba(0, 0, 0, 0.45)",
1375
+ menuBackgroundColor: Ko = "#ffffff",
1376
+ overlayColor: we = "rgba(0, 0, 0, 0.45)",
1398
1377
  closeButtonColor: Te = "#000000",
1399
1378
  effect: yo = "fade",
1400
- openPanelSize: Zo = 100,
1401
- textWidth: Jo = 280 / 1440,
1379
+ openPanelSize: qo = 100,
1380
+ textWidth: Zo = 280 / 1440,
1402
1381
  navTextWidth: Ne,
1403
1382
  navTextPosition: Ae = "center",
1404
1383
  navTextOffset: ze = 0,
1405
- gap: Qo = 0,
1384
+ gap: Jo = 0,
1406
1385
  navGap: Be,
1407
1386
  navPaddingLeft: He = 10 / 1440,
1408
1387
  navPaddingRight: Oe = 10 / 1440,
1409
- textPaddingLeft: Po = 10 / 1440,
1410
- textPaddingRight: ot = 10 / 1440,
1411
- textPaddingTop: tt = 10 / 1440,
1412
- textPaddingBottom: et = 10 / 1440,
1388
+ textPaddingLeft: Qo = 10 / 1440,
1389
+ textPaddingRight: Po = 10 / 1440,
1390
+ textPaddingTop: ot = 10 / 1440,
1391
+ textPaddingBottom: tt = 10 / 1440,
1413
1392
  fontFamily: Fe,
1414
1393
  fontSettings: Ie,
1415
1394
  fontSize: Re,
@@ -1418,21 +1397,21 @@ function Ea({
1418
1397
  wordSpacing: We = 0,
1419
1398
  textAlign: Ee = "left",
1420
1399
  textAppearance: Ge,
1421
- openFontFamily: Ue,
1422
- openFontSettings: De,
1423
- openFontSize: je,
1424
- openLineHeight: Ve,
1400
+ openFontFamily: De,
1401
+ openFontSettings: Ue,
1402
+ openFontSize: Ve,
1403
+ openLineHeight: je,
1425
1404
  openLetterSpacing: Xe,
1426
1405
  openWordSpacing: Ye,
1427
1406
  openTextAlign: Ke,
1428
1407
  openTextAppearance: qe,
1429
- stateOverrides: nt,
1430
- link: at
1431
- } = Dt, { horizontalAlign: Ze, verticalAlign: Je } = la({
1408
+ stateOverrides: et,
1409
+ link: nt
1410
+ } = Ut, { horizontalAlign: Ze, verticalAlign: Je } = la({
1432
1411
  position: Kt,
1433
1412
  horizontalAlign: qt,
1434
1413
  verticalAlign: Zt
1435
- }), x = T === "compact", Qe = x ? ie : jt, lo = Xn(x ? ce : Vt), so = x ? le : Ko, wo = x ? de : Pt, Pe = x ? ge : Ne, rt = Yn(x ? fe : Ae), on = (x ? pe : ze) ?? 0, tn = x ? ve : Be, it = x ? he : He, ct = x ? $e : Oe, en = Pe ?? Jo, nn = h || Do && (x ? se : Qt) !== "off", Lo = Rn(a, {
1414
+ }), x = w === "compact", Qe = x ? ie : Vt, io = Xn(x ? ce : jt), co = x ? le : Yo, Co = x ? de : Pt, Pe = x ? ge : Ne, at = Yn(x ? fe : Ae), on = (x ? pe : ze) ?? 0, tn = x ? ve : Be, rt = x ? he : He, it = x ? $e : Oe, en = Pe ?? Zo, nn = h || Do && (x ? se : Qt) !== "off", Lo = Rn(a, {
1436
1415
  iconColor: Jt,
1437
1416
  closeButtonColor: Te,
1438
1417
  linkColor: oe,
@@ -1442,11 +1421,11 @@ function Ea({
1442
1421
  compactLogoColor: ae,
1443
1422
  compactBackgroundColor: re,
1444
1423
  openLogoColor: Le,
1445
- menuBackgroundColor: qo,
1446
- overlayColor: Ce,
1424
+ menuBackgroundColor: Ko,
1425
+ overlayColor: we,
1447
1426
  backgroundColor: Xt,
1448
1427
  logoColor: Yt
1449
- }, va, ha, nt), Co = wt(x ? {
1428
+ }, va, ha, et), wo = yt(x ? {
1450
1429
  fontFamily: ue,
1451
1430
  fontSettings: me,
1452
1431
  fontSize: xe,
@@ -1454,7 +1433,7 @@ function Ea({
1454
1433
  letterSpacing: be,
1455
1434
  wordSpacing: Se,
1456
1435
  textAlign: ye,
1457
- textAppearance: we
1436
+ textAppearance: Ce
1458
1437
  } : {
1459
1438
  fontFamily: Fe,
1460
1439
  fontSettings: Ie,
@@ -1464,214 +1443,213 @@ function Ea({
1464
1443
  wordSpacing: We,
1465
1444
  textAlign: Ee,
1466
1445
  textAppearance: Ge
1467
- }), oo = wt({
1468
- fontFamily: Ue,
1469
- fontSettings: De,
1470
- fontSize: je,
1471
- lineHeight: Ve,
1446
+ }), Q = yt({
1447
+ fontFamily: De,
1448
+ fontSettings: Ue,
1449
+ fontSize: Ve,
1450
+ lineHeight: je,
1472
1451
  letterSpacing: Xe,
1473
1452
  wordSpacing: Ye,
1474
1453
  textAlign: Ke,
1475
1454
  textAppearance: qe
1476
- }, Co), To = Lt(a, Co, t), No = Lt(a, oo, t), an = kt(Y, St(Co)), rn = kt(K, St(oo)), cn = {
1455
+ }, wo), To = Ct(a, wo, t), No = Ct(a, Q, t), an = xt(j, bt(wo)), rn = xt(X, bt(Q)), cn = {
1477
1456
  ...No.css,
1478
1457
  whiteSpace: "pre-wrap",
1479
- transform: bt(rn)
1480
- }, ln = No.className, O = (i) => z(i, t), sn = tn ?? Qo, dn = Math.max(it, X), gn = Math.max(ct, X), fn = Math.max(0, 1 - wo), pn = Math.max(0, 1 - wo), go = e ?? !1, fo = go && !h, lt = uo(
1458
+ transform: kt(rn)
1459
+ }, ln = No.className, H = (i) => A(i, t), sn = tn ?? Jo, dn = Math.max(rt, U), gn = Math.max(it, U), fn = Math.max(0, 1 - Co), pn = Math.max(0, 1 - Co), lo = e ?? !1, so = lo && !h, ct = uo(
1481
1460
  () => Ot({
1482
- textPaddingLeft: Po,
1483
- textPaddingRight: ot,
1484
- textPaddingTop: tt,
1485
- textPaddingBottom: et,
1486
- fontSize: oo.fontSize
1461
+ textPaddingLeft: Qo,
1462
+ textPaddingRight: Po,
1463
+ textPaddingTop: ot,
1464
+ textPaddingBottom: tt,
1465
+ fontSize: Q.fontSize
1487
1466
  }),
1488
1467
  [
1468
+ Qo,
1489
1469
  Po,
1490
1470
  ot,
1491
1471
  tt,
1492
- et,
1493
- oo.fontSize
1472
+ Q.fontSize
1494
1473
  ]
1495
- ), st = (i) => {
1496
- const l = /* @__PURE__ */ s("span", { className: ln, style: cn, children: Ct(i) });
1497
- return zt(
1474
+ ), lt = (i) => {
1475
+ const l = /* @__PURE__ */ s("span", { className: ln, style: cn, children: Lt(i) });
1476
+ return At(
1498
1477
  a,
1499
1478
  l,
1500
- Jo,
1501
- go,
1502
- O
1479
+ Zo,
1480
+ lo,
1481
+ H
1503
1482
  );
1504
- }, vn = yo === "left" || yo === "right" ? { width: `${Zo}%` } : { height: `${Zo}%` }, hn = {
1505
- ...fa(lt, t),
1483
+ }, vn = yo === "left" || yo === "right" ? { width: `${qo}%` } : { height: `${qo}%` }, hn = {
1484
+ ...fa(ct, t),
1506
1485
  ...vn,
1507
1486
  alignItems: ua[Ze],
1508
1487
  justifyContent: $a[Je]
1509
- }, to = y(o), po = y(d), Ao = y(null);
1510
- Eo((ht = o.logo) == null ? void 0 : ht.icon) && (Ao.current = o.logo.icon), A(() => {
1511
- var j;
1512
- if (!B || !t) {
1513
- to.current = o, po.current = d;
1488
+ }, P = S(o), go = S(d), Ao = S(null);
1489
+ Wo((vt = o.logo) == null ? void 0 : vt.icon) && (Ao.current = o.logo.icon), N(() => {
1490
+ var ho;
1491
+ if (!z || !t) {
1492
+ P.current = o, go.current = d;
1514
1493
  return;
1515
1494
  }
1516
- const i = (j = o.logo) == null ? void 0 : j.icon;
1517
- if (o.logo && !Eo(i) && !Ao.current) {
1518
- to.current = o, po.current = d;
1495
+ const i = (ho = o.logo) == null ? void 0 : ho.icon;
1496
+ if (o.logo && !Wo(i) && !Ao.current) {
1497
+ P.current = o, go.current = d;
1519
1498
  return;
1520
1499
  }
1521
- const l = (V) => {
1522
- B(xa(V, Ao.current));
1500
+ const l = ($o) => {
1501
+ z(xa($o, Ao.current));
1523
1502
  };
1524
- if (po.current !== d) {
1525
- to.current = o, po.current = d;
1526
- const V = Nt(o);
1527
- V !== o && l(V);
1503
+ if (go.current !== d) {
1504
+ P.current = o, go.current = d;
1505
+ const $o = Tt(o);
1506
+ $o !== o && l($o);
1528
1507
  return;
1529
1508
  }
1530
- const u = Nt(o), k = to.current, S = k !== o, N = S ? ga(u, k) : u;
1531
- to.current = o;
1532
- const ao = u !== o, D = S && sa(u, N);
1533
- !ao && !D || l(N);
1534
- }, [o, B, t, d]);
1535
- const U = z(wo, t), $n = {
1536
- width: U,
1537
- height: U,
1538
- minWidth: U,
1539
- minHeight: U,
1540
- maxWidth: U,
1541
- maxHeight: U
1509
+ const $ = Tt(o), k = P.current, b = k !== o, T = b ? ga($, k) : $;
1510
+ P.current = o;
1511
+ const D = $ !== o, eo = b && sa($, T);
1512
+ !D && !eo || l(T);
1513
+ }, [o, z, t, d]);
1514
+ const G = A(Co, t), $n = {
1515
+ width: G,
1516
+ height: G,
1517
+ minWidth: G,
1518
+ minHeight: G,
1519
+ maxWidth: G,
1520
+ maxHeight: G
1542
1521
  }, un = {
1543
1522
  ...To.css,
1544
1523
  textDecoration: "none",
1545
- transform: bt(an)
1546
- }, mn = To.className, dt = (G == null ? void 0 : G.mode) !== "Off", eo = (G == null ? void 0 : G.icon) ?? "", xn = Sa(eo), no = ya(eo, xn), vo = !!no, kn = O(Math.min(Qe, so)), bn = !!(dt && eo && lo === "right"), zo = Yo.trim() ? { link: { type: "url", value: ta(Yo.trim()), target: "self" } } : null, Bo = bn ? "left" : "right", gt = Array.isArray(at) ? at : [], Ho = [
1547
- T !== "default" ? `${a}-state-${T}` : "",
1548
- h || M === "open" ? `${a}-state-open` : "",
1549
- co && co !== T && co !== M ? `${a}-state-${co}` : ""
1550
- ].filter(Boolean).join(" "), Sn = t && !n ? `${a}-editor` : "", ft = Gt ? `${a}-interactive` : "", yn = Xo && (T !== jo || So) ? `${a}-nav-state-anim` : "", wn = h ? `${a}-open` : "", Ln = uo(
1551
- () => za($.current),
1552
- [E, h, d]
1524
+ transform: kt(an)
1525
+ }, mn = To.className, st = (E == null ? void 0 : E.mode) !== "Off", oo = (E == null ? void 0 : E.icon) ?? "", xn = Sa(oo), to = ya(oo, xn), fo = !!to, kn = H(Math.min(Qe, co)), bn = !!(st && oo && io === "right"), zo = Xo.trim() ? { link: { type: "url", value: ta(Xo.trim()), target: "self" } } : null, Bo = bn ? "left" : "right", dt = Array.isArray(nt) ? nt : [], Ho = [
1526
+ w !== "default" ? `${a}-state-${w}` : "",
1527
+ h || _ === "open" ? `${a}-state-open` : "",
1528
+ ro && ro !== w && ro !== _ ? `${a}-state-${ro}` : ""
1529
+ ].filter(Boolean).join(" "), Sn = t && !n ? `${a}-editor` : "", gt = Gt ? `${a}-interactive` : "", yn = jo && (w !== Uo || So) ? `${a}-nav-state-anim` : "", Cn = h ? `${a}-open` : "", Ln = uo(
1530
+ () => Aa(B.current),
1531
+ [W, h, d]
1553
1532
  ), Oo = () => {
1554
- Q(!1);
1555
- }, Fo = !t || n, Cn = (i) => {
1556
- if (P) {
1557
- Z.current = i;
1533
+ Z(!1);
1534
+ }, Fo = !t || n, wn = (i) => {
1535
+ if (J) {
1536
+ K.current = i;
1558
1537
  return;
1559
1538
  }
1560
1539
  i();
1561
1540
  };
1562
- A(() => {
1541
+ N(() => {
1563
1542
  if (h) return;
1564
- const i = Z.current;
1565
- Z.current = null, i == null || i();
1543
+ const i = K.current;
1544
+ K.current = null, i == null || i();
1566
1545
  }, [h]);
1567
1546
  const Io = (i, l) => {
1568
- Ta(i, Oo, {
1547
+ wa(i, Oo, {
1569
1548
  isEditor: t,
1570
1549
  isPreviewMode: n,
1571
1550
  item: l,
1572
- pages: m,
1573
- onLinkNavigate: C,
1574
- runAfterClose: Cn
1551
+ pages: u,
1552
+ onLinkNavigate: L,
1553
+ runAfterClose: wn
1575
1554
  });
1576
1555
  }, Tn = () => {
1577
- t && !n || Q((i) => !i);
1556
+ t && !n || Z((i) => !i);
1578
1557
  }, Nn = (i) => {
1579
1558
  i.pointerType === "touch" && i.currentTarget.blur();
1580
- }, ho = () => {
1559
+ }, po = () => {
1581
1560
  f.current !== null && (window.clearTimeout(f.current), f.current = null);
1582
1561
  };
1583
- A(() => {
1562
+ N(() => {
1584
1563
  if (!So) return;
1585
1564
  const i = window.setTimeout(() => {
1586
1565
  Vo(!1);
1587
1566
  }, v);
1588
1567
  return () => window.clearTimeout(i);
1589
- }, [So, T]), A(() => {
1568
+ }, [So, w]), N(() => {
1590
1569
  if (h) {
1591
- ho(), xo(!0);
1570
+ po(), xo(!0);
1592
1571
  return;
1593
1572
  }
1594
- return F.current += 1, io(!1), ho(), f.current = window.setTimeout(() => {
1573
+ return O.current += 1, ao(!1), po(), f.current = window.setTimeout(() => {
1595
1574
  f.current = null, xo(!1);
1596
- }, w), ho;
1575
+ }, y), po;
1597
1576
  }, [h]), mo(() => {
1598
- J.current !== d && (J.current = d, F.current += 1, ho(), Q(!1), io(!1), xo(!1));
1577
+ q.current !== d && (q.current = d, O.current += 1, po(), Z(!1), ao(!1), xo(!1));
1599
1578
  }, [d]), mo(() => {
1600
- var u;
1601
- if (!E || !h)
1579
+ var $;
1580
+ if (!W || !h)
1602
1581
  return;
1603
- const i = F.current + 1;
1604
- F.current = i, io(!1), (u = H.current) == null || u.offsetHeight;
1582
+ const i = O.current + 1;
1583
+ O.current = i, ao(!1), ($ = V.current) == null || $.offsetHeight;
1605
1584
  const l = requestAnimationFrame(() => {
1606
- F.current === i && io(!0);
1585
+ O.current === i && ao(!0);
1607
1586
  });
1608
1587
  return () => {
1609
1588
  cancelAnimationFrame(l);
1610
1589
  };
1611
- }, [E, h]), mo(() => {
1612
- if (!P || !E) return;
1613
- const i = q.current;
1590
+ }, [W, h]), mo(() => {
1591
+ if (!J || !W) return;
1592
+ const i = Y.current;
1614
1593
  if (!i) return;
1615
1594
  const l = getComputedStyle(i).backgroundColor;
1616
1595
  if (!l) return;
1617
- const u = document.documentElement, { body: k } = document, S = u.style.backgroundColor, N = k.style.backgroundColor;
1618
- return u.style.backgroundColor = l, k.style.backgroundColor = l, () => {
1619
- u.style.backgroundColor = S, k.style.backgroundColor = N;
1596
+ const $ = document.documentElement, { body: k } = document, b = $.style.backgroundColor, T = k.style.backgroundColor;
1597
+ return $.style.backgroundColor = l, k.style.backgroundColor = l, () => {
1598
+ $.style.backgroundColor = b, k.style.backgroundColor = T;
1620
1599
  };
1621
- }, [P, E, Ho, qo, nt]), A(() => {
1622
- b == null || b(h);
1623
- }, [h, b]), A(() => {
1600
+ }, [J, W, Ho, Ko, et]), N(() => {
1601
+ m == null || m(h);
1602
+ }, [h, m]), N(() => {
1624
1603
  if (!h) return;
1625
1604
  const i = (l) => {
1626
1605
  l.key === "Escape" && (t && n || Oo());
1627
1606
  };
1628
1607
  return window.addEventListener("keydown", i), () => window.removeEventListener("keydown", i);
1629
- }, [h, t, n]), A(() => {
1630
- t && !n && M !== "open" && Q(!1);
1631
- }, [t, n, M]), A(() => {
1632
- n && Q(!1);
1608
+ }, [h, t, n]), N(() => {
1609
+ t && !n && _ !== "open" && Z(!1);
1610
+ }, [t, n, _]), N(() => {
1611
+ n && Z(!1);
1633
1612
  }, [n]);
1634
- const pt = go && h, An = (i) => gt.filter((l) => Jn(l, d)).map((l, u) => {
1635
- const { label: k, href: S, target: N, download: ao } = Wo(l, m), D = S ? /* @__PURE__ */ s(
1613
+ const ft = lo && h, An = (i) => dt.filter((l) => Jn(l, d)).map((l, $) => {
1614
+ const { label: k, href: b, target: T } = Mo(l, u), D = b ? /* @__PURE__ */ s(
1636
1615
  "a",
1637
1616
  {
1638
- href: S,
1639
- target: N,
1640
- rel: N === "_blank" ? "noopener noreferrer" : void 0,
1641
- download: ao,
1617
+ href: b,
1618
+ target: T,
1619
+ rel: T === "_blank" ? "noopener noreferrer" : void 0,
1642
1620
  className: `${i} ${a}-has-href`,
1643
- onClick: (j) => Io(j, l),
1644
- children: st(k)
1621
+ onClick: (eo) => Io(eo, l),
1622
+ children: lt(k)
1645
1623
  }
1646
- ) : /* @__PURE__ */ s("span", { className: i, children: st(k) });
1647
- return /* @__PURE__ */ L(_o, { children: [
1648
- u > 0 && /* @__PURE__ */ s(
1624
+ ) : /* @__PURE__ */ s("span", { className: i, children: lt(k) });
1625
+ return /* @__PURE__ */ C(_o, { children: [
1626
+ $ > 0 && /* @__PURE__ */ s(
1649
1627
  "div",
1650
1628
  {
1651
- "data-controls": pt ? "gap" : void 0,
1629
+ "data-controls": ft ? "gap" : void 0,
1652
1630
  "data-controls-axis": "y",
1653
- className: pt ? `${a}-gap-control` : void 0,
1654
- style: { height: O(Qo) }
1631
+ className: ft ? `${a}-gap-control` : void 0,
1632
+ style: { height: H(Jo) }
1655
1633
  }
1656
1634
  ),
1657
1635
  D
1658
- ] }, u);
1659
- }), zn = E ? /* @__PURE__ */ L(
1636
+ ] }, $);
1637
+ }), zn = W ? /* @__PURE__ */ C(
1660
1638
  "div",
1661
1639
  {
1662
- ref: H,
1640
+ ref: V,
1663
1641
  "data-selection": "none",
1664
1642
  className: [
1665
1643
  `${a}-lightbox`,
1666
1644
  `${a}-full-lightbox ${a}-effect-${yo}`,
1667
- Uo ? `${a}-lightbox-active` : "",
1645
+ Go ? `${a}-lightbox-active` : "",
1668
1646
  `${a}-lightbox-editor`,
1669
1647
  e ? `${a}-lightbox-edit-mode` : "",
1670
- ft,
1648
+ gt,
1671
1649
  Ho
1672
1650
  ].filter(Boolean).join(" "),
1673
1651
  style: { ...Lo, ...Ln },
1674
- "aria-hidden": !Uo,
1652
+ "aria-hidden": !Go,
1675
1653
  children: [
1676
1654
  /* @__PURE__ */ s(
1677
1655
  "div",
@@ -1681,7 +1659,7 @@ function Ea({
1681
1659
  onClick: Fo ? Oo : void 0
1682
1660
  }
1683
1661
  ),
1684
- /* @__PURE__ */ L(
1662
+ /* @__PURE__ */ C(
1685
1663
  "nav",
1686
1664
  {
1687
1665
  className: [`${a}-panel`, Fo ? `${a}-panel-blocking` : ""].filter(Boolean).join(" "),
@@ -1689,12 +1667,12 @@ function Ea({
1689
1667
  "aria-label": "Menu",
1690
1668
  "data-lightbox-scrollable": "",
1691
1669
  children: [
1692
- go && pa(a, lt, oo.fontSize, O),
1670
+ lo && pa(a, ct, Q.fontSize, H),
1693
1671
  An(`${a}-link`)
1694
1672
  ]
1695
1673
  }
1696
1674
  ),
1697
- P ? /* @__PURE__ */ s("div", { ref: q, className: `${a}-safari-tint`, "aria-hidden": "true" }) : null
1675
+ J ? /* @__PURE__ */ s("div", { ref: Y, className: `${a}-safari-tint`, "aria-hidden": "true" }) : null
1698
1676
  ]
1699
1677
  }
1700
1678
  ) : null, Bn = () => /* @__PURE__ */ s(
@@ -1708,27 +1686,27 @@ function Ea({
1708
1686
  "aria-label": h ? "Close menu" : "Open menu",
1709
1687
  children: /* @__PURE__ */ s(ea, { className: `${a}-icon`, lineClassName: `${a}-icon-line` })
1710
1688
  }
1711
- ), $o = (i) => {
1712
- const l = i === "left", u = l ? it : ct, k = l ? dn : gn, S = l ? fn : pn, N = x ? l ? "compactNavPaddingLeft" : "compactNavPaddingRight" : l ? "navPaddingLeft" : "navPaddingRight";
1689
+ ), vo = (i) => {
1690
+ const l = i === "left", $ = l ? rt : it, k = l ? dn : gn, b = l ? fn : pn, T = x ? l ? "compactNavPaddingLeft" : "compactNavPaddingRight" : l ? "navPaddingLeft" : "navPaddingRight";
1713
1691
  return /* @__PURE__ */ s(
1714
1692
  "div",
1715
1693
  {
1716
1694
  className: l ? `${a}-nav-padding-left` : `${a}-nav-padding-right`,
1717
- style: { width: O(u), flexShrink: 0 },
1718
- children: fo ? /* @__PURE__ */ s(
1695
+ style: { width: H($), flexShrink: 0 },
1696
+ children: so ? /* @__PURE__ */ s(
1719
1697
  "div",
1720
1698
  {
1721
- "data-controls": N,
1699
+ "data-controls": T,
1722
1700
  "data-controls-axis": "x",
1723
1701
  "data-controls-variant": "column-padding",
1724
1702
  ...l ? {} : { "data-controls-reverse": "" },
1725
1703
  "data-controls-min": "0",
1726
- "data-controls-max-fraction": String(S),
1704
+ "data-controls-max-fraction": String(b),
1727
1705
  className: `${a}-control-anchor`,
1728
1706
  style: {
1729
1707
  top: 0,
1730
1708
  [l ? "left" : "right"]: 0,
1731
- width: O(k),
1709
+ width: H(k),
1732
1710
  height: "100%"
1733
1711
  }
1734
1712
  }
@@ -1736,67 +1714,66 @@ function Ea({
1736
1714
  }
1737
1715
  );
1738
1716
  }, Hn = (i, l) => {
1739
- const { label: u, href: k, target: S, download: N } = Wo(i, m), ao = /* @__PURE__ */ s("span", { className: mn, style: un, children: Ct(u) }), D = zt(
1717
+ const { label: $, href: k, target: b } = Mo(i, u), T = /* @__PURE__ */ s("span", { className: mn, style: un, children: Lt($) }), D = At(
1740
1718
  a,
1741
- ao,
1719
+ T,
1742
1720
  en,
1743
- fo,
1744
- O
1745
- ), j = k ? /* @__PURE__ */ s(
1721
+ so,
1722
+ H
1723
+ ), eo = k ? /* @__PURE__ */ s(
1746
1724
  "a",
1747
1725
  {
1748
1726
  href: k,
1749
- target: S,
1750
- rel: S === "_blank" ? "noopener noreferrer" : void 0,
1751
- download: N,
1727
+ target: b,
1728
+ rel: b === "_blank" ? "noopener noreferrer" : void 0,
1752
1729
  className: `${a}-nav-link ${a}-has-href`,
1753
- onClick: (V) => Io(V, i),
1730
+ onClick: (ho) => Io(ho, i),
1754
1731
  children: D
1755
1732
  }
1756
1733
  ) : /* @__PURE__ */ s("span", { className: `${a}-nav-link`, children: D });
1757
- return /* @__PURE__ */ L(_o, { children: [
1734
+ return /* @__PURE__ */ C(_o, { children: [
1758
1735
  l > 0 && /* @__PURE__ */ s(
1759
1736
  "div",
1760
1737
  {
1761
- "data-controls": fo ? x ? "compactNavGap" : "navGap" : void 0,
1738
+ "data-controls": so ? x ? "compactNavGap" : "navGap" : void 0,
1762
1739
  "data-controls-axis": "x",
1763
- className: fo ? `${a}-gap-control ${a}-nav-gap-control` : `${a}-nav-gap-control}`,
1764
- style: { width: O(sn), flexShrink: 0 }
1740
+ className: so ? `${a}-gap-control ${a}-nav-gap-control` : `${a}-nav-gap-control}`,
1741
+ style: { width: H(sn), flexShrink: 0 }
1765
1742
  }
1766
1743
  ),
1767
- j
1744
+ eo
1768
1745
  ] }, l);
1769
- }, vt = /* @__PURE__ */ L(
1746
+ }, pt = /* @__PURE__ */ C(
1770
1747
  "div",
1771
1748
  {
1772
- className: `${a}-nav-logo-inner${vo ? ` ${a}-nav-logo-tinted` : ""}`,
1749
+ className: `${a}-nav-logo-inner${fo ? ` ${a}-nav-logo-tinted` : ""}`,
1773
1750
  style: {
1774
1751
  height: kn,
1775
- ...vo && no ? { [`--${a}-logo-image`]: ka(no) } : {}
1752
+ ...fo && to ? { [`--${a}-logo-image`]: ka(to) } : {}
1776
1753
  },
1777
1754
  children: [
1778
1755
  /* @__PURE__ */ s(
1779
1756
  "img",
1780
1757
  {
1781
- src: vo && no ? no : eo,
1758
+ src: fo && to ? to : oo,
1782
1759
  alt: "",
1783
1760
  className: `${a}-nav-logo-img`
1784
1761
  }
1785
1762
  ),
1786
- vo ? /* @__PURE__ */ s("span", { className: `${a}-nav-logo-tint`, "aria-hidden": "true" }) : null
1763
+ fo ? /* @__PURE__ */ s("span", { className: `${a}-nav-logo-tint`, "aria-hidden": "true" }) : null
1787
1764
  ]
1788
1765
  }
1789
1766
  ), On = {
1790
1767
  ...Lo,
1791
- height: z(so, t),
1792
- minHeight: z(so, t),
1793
- [`--${a}-panel-height`]: z(so, t)
1794
- }, Fn = g && T === "default" && M !== "open" && !n ? O(Ko + Un) : "0px";
1795
- return /* @__PURE__ */ L(
1768
+ height: A(co, t),
1769
+ minHeight: A(co, t),
1770
+ [`--${a}-panel-height`]: A(co, t)
1771
+ }, Fn = g && w === "default" && _ !== "open" && !n ? H(Yo + Dn) : "0px";
1772
+ return /* @__PURE__ */ C(
1796
1773
  "div",
1797
1774
  {
1798
- ref: $,
1799
- className: `${a}-root ${Ho} ${Sn} ${ft} ${yn}`.trim(),
1775
+ ref: B,
1776
+ className: `${a}-root ${Ho} ${Sn} ${gt} ${yn}`.trim(),
1800
1777
  style: {
1801
1778
  width: "100%",
1802
1779
  height: "100%",
@@ -1807,52 +1784,52 @@ function Ea({
1807
1784
  },
1808
1785
  children: [
1809
1786
  /* @__PURE__ */ s("style", { dangerouslySetInnerHTML: { __html: Rt } }),
1810
- /* @__PURE__ */ s("span", { ref: Y, "aria-hidden": !0, style: yt(To.css), children: "H" }),
1811
- /* @__PURE__ */ s("span", { ref: K, "aria-hidden": !0, style: yt(No.css), children: "H" }),
1812
- /* @__PURE__ */ s("div", { className: `${a}-nav-slide`, children: /* @__PURE__ */ L("div", { className: `${a}-nav-bar`, style: On, children: [
1813
- dt && eo ? /* @__PURE__ */ L("div", { className: `${a}-nav-logo ${a}-nav-logo-${lo}`, children: [
1814
- lo === "left" ? $o("left") : null,
1787
+ /* @__PURE__ */ s("span", { ref: j, "aria-hidden": !0, style: St(To.css), children: "H" }),
1788
+ /* @__PURE__ */ s("span", { ref: X, "aria-hidden": !0, style: St(No.css), children: "H" }),
1789
+ /* @__PURE__ */ s("div", { className: `${a}-nav-slide`, children: /* @__PURE__ */ C("div", { className: `${a}-nav-bar`, style: On, children: [
1790
+ st && oo ? /* @__PURE__ */ C("div", { className: `${a}-nav-logo ${a}-nav-logo-${io}`, children: [
1791
+ io === "left" ? vo("left") : null,
1815
1792
  zo ? /* @__PURE__ */ s(
1816
1793
  "a",
1817
1794
  {
1818
- href: ($t = zo.link) == null ? void 0 : $t.value,
1795
+ href: (ht = zo.link) == null ? void 0 : ht.value,
1819
1796
  className: `${a}-nav-logo-link`,
1820
1797
  "aria-label": "Home",
1821
1798
  onClick: (i) => Io(i, zo),
1822
- children: vt
1799
+ children: pt
1823
1800
  }
1824
- ) : vt,
1825
- lo === "right" ? $o("right") : null
1801
+ ) : pt,
1802
+ io === "right" ? vo("right") : null
1826
1803
  ] }) : null,
1827
1804
  /* @__PURE__ */ s(
1828
1805
  "nav",
1829
1806
  {
1830
- className: `${a}-nav-links ${a}-nav-links-${rt}`,
1831
- style: { transform: Kn(rt, on, t) },
1807
+ className: `${a}-nav-links ${a}-nav-links-${at}`,
1808
+ style: { transform: Kn(at, on, t) },
1832
1809
  "aria-label": "Navigation",
1833
- children: /* @__PURE__ */ s("div", { className: `${a}-nav-links-inner`, children: gt.filter((i) => Zn(i, T, d)).map((i, l) => Hn(i, l)) })
1810
+ children: /* @__PURE__ */ s("div", { className: `${a}-nav-links-inner`, children: dt.filter((i) => Zn(i, w, d)).map((i, l) => Hn(i, l)) })
1834
1811
  }
1835
1812
  )
1836
1813
  ] }) }),
1837
1814
  zn,
1838
- /* @__PURE__ */ L("div", { className: `${a}-nav-toggle-wrap ${a}-nav-toggle-wrap-${Bo}`, children: [
1839
- Bo === "left" ? $o("left") : null,
1815
+ /* @__PURE__ */ C("div", { className: `${a}-nav-toggle-wrap ${a}-nav-toggle-wrap-${Bo}`, children: [
1816
+ Bo === "left" ? vo("left") : null,
1840
1817
  nn ? /* @__PURE__ */ s(
1841
1818
  "div",
1842
1819
  {
1843
- className: `${a}-root ${wn}`.trim(),
1820
+ className: `${a}-root ${Cn}`.trim(),
1844
1821
  style: $n,
1845
1822
  children: Bn()
1846
1823
  }
1847
1824
  ) : null,
1848
- Bo === "right" ? $o("right") : null
1825
+ Bo === "right" ? vo("right") : null
1849
1826
  ] })
1850
1827
  ]
1851
1828
  }
1852
1829
  );
1853
1830
  }
1854
1831
  export {
1855
- Ea as Burger,
1832
+ Wa as Burger,
1856
1833
  ga as applyBurgerSettingsChange,
1857
1834
  Qn as isBurgerOpenMenuAvailable
1858
1835
  };