webim-adapter 0.27.0 → 0.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -210,36 +210,36 @@ function C(e) {
210
210
  color: j,
211
211
  inset: M
212
212
  })), N.length && (t.boxShadow = N.join(", "));
213
- let P = (e) => e.type === "blur" ? `blur(${x(e.v ?? 0)})` : e.type === "hue-rotate" ? `hue-rotate(${f(e.v ?? 0)})` : `${e.type}(${e.v ?? 100}%)`, F = (e) => (Array.isArray(e) ? e : []).filter((e) => e && e.on !== !1 && e.type).map(P), { filters: I, backdropFilters: L, filterBlur: R, filterGrayscale: z, filterBrightness: ee, filterContrast: te, filterSaturate: B } = t;
213
+ let P = (e) => e.type === "blur" ? `blur(${x(e.v ?? 0)})` : e.type === "hue-rotate" ? `hue-rotate(${f(e.v ?? 0)})` : `${e.type}(${e.v ?? 100}%)`, F = (e) => (Array.isArray(e) ? e : []).filter((e) => e && e.on !== !1 && e.type).map(P), { filters: ee, backdropFilters: I, filterBlur: L, filterGrayscale: R, filterBrightness: z, filterContrast: te, filterSaturate: ne } = t;
214
214
  delete t.filters, delete t.backdropFilters, delete t.filterBlur, delete t.filterGrayscale, delete t.filterBrightness, delete t.filterContrast, delete t.filterSaturate;
215
+ let B = F(ee);
216
+ L !== void 0 && B.push(`blur(${x(L)})`), R !== void 0 && B.push(`grayscale(${R}%)`), z !== void 0 && B.push(`brightness(${z}%)`), te !== void 0 && B.push(`contrast(${te}%)`), ne !== void 0 && B.push(`saturate(${ne}%)`), B.length && (t.filter = B.join(" "));
215
217
  let V = F(I);
216
- R !== void 0 && V.push(`blur(${x(R)})`), z !== void 0 && V.push(`grayscale(${z}%)`), ee !== void 0 && V.push(`brightness(${ee}%)`), te !== void 0 && V.push(`contrast(${te}%)`), B !== void 0 && V.push(`saturate(${B}%)`), V.length && (t.filter = V.join(" "));
217
- let ne = F(L);
218
- ne.length && (t.backdropFilter = ne.join(" "), t.WebkitBackdropFilter = t.backdropFilter);
218
+ V.length && (t.backdropFilter = V.join(" "), t.WebkitBackdropFilter = t.backdropFilter);
219
219
  let { textStrokeWidth: re, textStrokeColor: ie } = t;
220
220
  delete t.textStrokeWidth, delete t.textStrokeColor, (re !== void 0 || ie !== void 0) && (t.WebkitTextStroke = `${x(re ?? 1)} ${ie || "currentColor"}`);
221
221
  let { clipText: ae } = t;
222
222
  delete t.clipText, ae && (t.WebkitBackgroundClip = "text", t.backgroundClip = "text", t.WebkitTextFillColor = "transparent");
223
- let { transitions: oe, transitionDuration: H, transitionEasing: se, transitionProperty: ce } = t, le = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}ms` : e;
223
+ let { transitions: oe, transitionDuration: se, transitionEasing: ce, transitionProperty: le } = t, ue = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}ms` : e;
224
224
  delete t.transitions, delete t.transitionDuration, delete t.transitionEasing, delete t.transitionProperty;
225
- let ue = (Array.isArray(oe) ? oe : []).filter((e) => e && e.on !== !1).map((e) => `${e.property || "all"} ${le(e.duration ?? 200)} ${e.easing || "ease"}`);
226
- if (H !== void 0 && ue.push(`${ce || "all"} ${le(H)} ${se || "ease"}`), ue.length && (t.transition = ue.join(", ")), t.textDecoration !== void 0 && (t.textDecorationLine = t.textDecoration, delete t.textDecoration), t.backgroundImage && !String(t.backgroundImage).includes("(") && (t.backgroundImage = `url("${t.backgroundImage}")`), n) {
225
+ let de = (Array.isArray(oe) ? oe : []).filter((e) => e && e.on !== !1).map((e) => `${e.property || "all"} ${ue(e.duration ?? 200)} ${e.easing || "ease"}`);
226
+ if (se !== void 0 && de.push(`${le || "all"} ${ue(se)} ${ce || "ease"}`), de.length && (t.transition = de.join(", ")), t.textDecoration !== void 0 && (t.textDecorationLine = t.textDecoration, delete t.textDecoration), t.backgroundImage && !String(t.backgroundImage).includes("(") && (t.backgroundImage = `url("${t.backgroundImage}")`), n) {
227
227
  let e = `${i || "rgba(0,0,0,0.5)"}, ${a || "transparent"}`, o = n === "radial" ? `radial-gradient(circle, ${e})` : `linear-gradient(${r ?? 180}deg, ${e})`;
228
228
  t.backgroundImage = t.backgroundImage ? `${o}, ${t.backgroundImage}` : o;
229
229
  }
230
230
  delete t.backgroundVideo;
231
- let { overlayColor: U, overlayOpacity: W } = t;
232
- if (delete t.overlayColor, delete t.overlayOpacity, U) {
233
- let e = `color-mix(in srgb, ${U} ${W ?? 50}%, transparent)`, n = `linear-gradient(${e}, ${e})`;
231
+ let { overlayColor: fe, overlayOpacity: H } = t;
232
+ if (delete t.overlayColor, delete t.overlayOpacity, fe) {
233
+ let e = `color-mix(in srgb, ${fe} ${H ?? 50}%, transparent)`, n = `linear-gradient(${e}, ${e})`;
234
234
  t.backgroundImage = t.backgroundImage ? `${n}, ${t.backgroundImage}` : n;
235
235
  }
236
236
  t.backgroundImage && (t.backgroundSize ??= "cover", t.backgroundPosition ??= "center", t.backgroundRepeat ??= "no-repeat");
237
- let { backgroundLayers: G } = t;
237
+ let { backgroundLayers: U } = t;
238
238
  delete t.backgroundLayers;
239
- let de = (Array.isArray(G) ? G : []).filter((e) => e && e.on !== !1);
240
- if (de.length) {
239
+ let W = (Array.isArray(U) ? U : []).filter((e) => e && e.on !== !1);
240
+ if (W.length) {
241
241
  let e = [], n = [], r = [], i = [], a = [];
242
- for (let t of de) if (t.kind === "linear") e.push(`linear-gradient(${t.angle ?? 180}deg, ${t.from || "rgba(0,0,0,0.5)"}, ${t.to || "transparent"})`), n.push("auto"), r.push("0% 0%"), i.push("repeat"), a.push("scroll");
242
+ for (let t of W) if (t.kind === "linear") e.push(`linear-gradient(${t.angle ?? 180}deg, ${t.from || "rgba(0,0,0,0.5)"}, ${t.to || "transparent"})`), n.push("auto"), r.push("0% 0%"), i.push("repeat"), a.push("scroll");
243
243
  else if (t.kind === "radial") e.push(`radial-gradient(circle, ${t.from || "rgba(0,0,0,0.5)"}, ${t.to || "transparent"})`), n.push("auto"), r.push("0% 0%"), i.push("repeat"), a.push("scroll");
244
244
  else {
245
245
  if (!t.src) continue;
@@ -260,26 +260,30 @@ var w = {
260
260
  "data-wb",
261
261
  "data-wb-class",
262
262
  "data-slot"
263
- ]), E = (e) => /^[a-zA-Z_][\w-]*$/.test(e) && !/^on/i.test(e) && !T.has(e.toLowerCase());
264
- function D(e, t, n = []) {
263
+ ]), E = (e) => /^[a-zA-Z_][\w-]*$/.test(e) && !/^on/i.test(e) && !T.has(e.toLowerCase()), D = (e) => [...new Set(String(e ?? "").split(/\s+/).map((e) => e.replace(/^\./, "")).filter((e) => /^-?[_a-zA-Z][\w-]*$/.test(e)))];
264
+ function O(e, t, n = []) {
265
265
  t.htmlId ? e.id = t.htmlId : e.removeAttribute("id");
266
+ let r = D(t.classNames), i = D(e.getAttribute("data-wb-class"));
267
+ for (let t of i) r.includes(t) || e.classList.remove(t);
268
+ for (let t of r) e.classList.add(t);
269
+ r.length ? e.setAttribute("data-wb-class", r.join(" ")) : e.removeAttribute("data-wb-class");
266
270
  for (let t of n) e.removeAttribute(t);
267
- let r = [];
271
+ let a = [];
268
272
  for (let n of t.attributes ?? []) {
269
273
  let t = String(n?.name ?? "").trim();
270
- E(t) && (e.setAttribute(t, n.value ?? ""), r.push(t));
274
+ E(t) && (e.setAttribute(t, n.value ?? ""), a.push(t));
271
275
  }
272
- return r;
276
+ return a;
273
277
  }
274
- var O = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
275
- function k(e, t, n, r = !1) {
276
- let i = Object.entries(C(t)).map(([e, t]) => `${O(e)}: ${t} !important;`).join(" ");
278
+ var k = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
279
+ function A(e, t, n, r = !1) {
280
+ let i = Object.entries(C(t)).map(([e, t]) => `${k(e)}: ${t} !important;`).join(" ");
277
281
  return i ? `[data-wb="${e}"]${r ? "" : n} { ${i} }` : "";
278
282
  }
279
- function A(e, t, n) {
280
- return Object.entries(w).map(([r, i]) => k(e, t?.[r], i, n === r)).filter(Boolean).join("\n");
283
+ function j(e, t, n) {
284
+ return Object.entries(w).map(([r, i]) => A(e, t?.[r], i, n === r)).filter(Boolean).join("\n");
281
285
  }
282
- var j = [
286
+ var M = [
283
287
  {
284
288
  key: "tablet",
285
289
  max: 991
@@ -292,17 +296,17 @@ var j = [
292
296
  key: "mobile",
293
297
  max: 478
294
298
  }
295
- ], M = (e) => Object.entries(C(e)).map(([e, t]) => `${O(e)}: ${t} !important;`).join(" ");
296
- function N(e, t) {
297
- return j.map(({ key: n, max: r }) => {
298
- let i = t?.[n] ? M(t[n]) : "";
299
+ ], N = (e) => Object.entries(C(e)).map(([e, t]) => `${k(e)}: ${t} !important;`).join(" ");
300
+ function P(e, t) {
301
+ return M.map(({ key: n, max: r }) => {
302
+ let i = t?.[n] ? N(t[n]) : "";
299
303
  return i ? `@media (max-width: ${r}px) { [data-wb="${e}"] { ${i} } }` : "";
300
304
  }).filter(Boolean).join("\n");
301
305
  }
302
- function P(e, t) {
306
+ function F(e, t) {
303
307
  let n = [], r = (e) => {
304
308
  for (let [t, r] of Object.entries(e || {})) {
305
- let e = N(t, r.props);
309
+ let e = P(t, r.props);
306
310
  e && n.push(e);
307
311
  }
308
312
  };
@@ -310,10 +314,10 @@ function P(e, t) {
310
314
  for (let e of Object.values(t || {})) r(e.template?.nodes);
311
315
  return n.join("\n");
312
316
  }
313
- function F(e, t) {
317
+ function ee(e, t) {
314
318
  let n = [], r = (e) => {
315
319
  for (let [t, r] of Object.entries(e || {})) {
316
- let e = A(t, r.props);
320
+ let e = j(t, r.props);
317
321
  e && n.push(e);
318
322
  }
319
323
  };
@@ -388,7 +392,7 @@ var I = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
388
392
  label: "Mono",
389
393
  value: "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"
390
394
  }
391
- }, ee = (e, t) => z[e]?.value ?? v(e) ?? (typeof e == "string" && e.trim() ? `"${e.trim()}", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif` : t), te = (e, ...t) => {
395
+ }, te = (e, t) => z[e]?.value ?? v(e) ?? (typeof e == "string" && e.trim() ? `"${e.trim()}", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif` : t), ne = (e, ...t) => {
392
396
  let n = Object.assign({}, e, ...t);
393
397
  return n.primary = {
394
398
  ...e.primary,
@@ -409,8 +413,8 @@ function B(e) {
409
413
  return {
410
414
  font: r ?? R.font,
411
415
  headingFont: i ?? R.headingFont,
412
- light: te(L.light, a, t),
413
- dark: te(L.dark, n)
416
+ light: ne(L.light, a, t),
417
+ dark: ne(L.dark, n)
414
418
  };
415
419
  }
416
420
  function V(e) {
@@ -431,31 +435,31 @@ function V(e) {
431
435
  "--page-secondary-contrast": e.secondary.contrastText
432
436
  };
433
437
  }
434
- function ne(e) {
438
+ function re(e) {
435
439
  let t = B(e);
436
440
  return {
437
441
  backgroundColor: "var(--page-bg)",
438
442
  color: "var(--page-text)",
439
- fontFamily: ee(t.font, I),
440
- "--page-heading-font": t.headingFont === "inherit" ? "inherit" : ee(t.headingFont, "inherit")
443
+ fontFamily: te(t.font, I),
444
+ "--page-heading-font": t.headingFont === "inherit" ? "inherit" : te(t.headingFont, "inherit")
441
445
  };
442
446
  }
443
- function re(e, t = "light") {
447
+ function ie(e, t = "light") {
444
448
  let n = B(e);
445
449
  return {
446
- ...ne(e),
450
+ ...re(e),
447
451
  ...V(n[t] ?? n.light)
448
452
  };
449
453
  }
450
- function ie(e, t) {
454
+ function ae(e, t) {
451
455
  return e?.themeRef && t?.[e.themeRef] || e?.theme;
452
456
  }
453
- function ae(e, t) {
457
+ function oe(e, t) {
454
458
  return e === "light" || e === "dark" ? e : t === "light" || t === "dark" ? t : "auto";
455
459
  }
456
460
  //#endregion
457
461
  //#region src/bundle.js
458
- function oe({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
462
+ function se({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
459
463
  let a = {
460
464
  ...t?.global ?? {},
461
465
  ...t?.tenant ?? {}
@@ -465,7 +469,7 @@ function oe({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
465
469
  title: e.title,
466
470
  slug: e.slug,
467
471
  blocks: i && o.i18n?.[i]?.blocks || e.blocks,
468
- theme: ie(o, a.builder_themes?.themes),
472
+ theme: ae(o, a.builder_themes?.themes),
469
473
  components: a.builder_components?.components ?? {},
470
474
  custom: o.custom,
471
475
  seo: o.seo,
@@ -480,18 +484,18 @@ function oe({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
480
484
  }
481
485
  //#endregion
482
486
  //#region src/fetchPage.js
483
- var H = async (e) => {
487
+ var ce = async (e) => {
484
488
  let t = await e.json().catch(() => null);
485
489
  if (!e.ok || t?.success === !1) throw Error(t?.error?.message || `Request failed (${e.status})`);
486
490
  return t?.payload ?? t;
487
491
  };
488
- async function se({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token: a, page: o, fetch: s }) {
492
+ async function le({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token: a, page: o, fetch: s }) {
489
493
  if (!e) throw Error("fetchPage: apiUrl is required");
490
494
  if (!n) throw Error("fetchPage: slug is required");
491
495
  let c = s ?? fetch, l = e.replace(/\/$/, ""), u = {
492
496
  ...t ? { "x-tenant": t } : {},
493
497
  ...a ? { authorization: `Bearer ${a}` } : {}
494
- }, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(H), c(`${l}/settings/public`, { headers: u }).then(H)]), p = oe({
498
+ }, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(ce), c(`${l}/settings/public`, { headers: u }).then(ce)]), p = se({
495
499
  page: d,
496
500
  settings: f,
497
501
  tenant: t,
@@ -499,7 +503,7 @@ async function se({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
499
503
  locale: r
500
504
  }), m = [...new Set(Object.values(p.blocks ?? {}).map((e) => e?.type?.resolvedName === "CollectionList" ? e.props?.collection : e?.type?.resolvedName === "TableBlock" || e?.type?.resolvedName === "OrgChartBlock" ? e.props?.source : null).filter(Boolean))];
501
505
  if (m.length) {
502
- let e = (e) => e.startsWith("api:") ? `${l}/data/${encodeURIComponent(e.slice(4))}` : `${l}/dynamic/${encodeURIComponent(e)}?all=1${r ? `&locale=${encodeURIComponent(r)}` : ""}`, t = await Promise.all(m.map((t) => c(e(t), { headers: u }).then(H).then((e) => {
506
+ let e = (e) => e.startsWith("api:") ? `${l}/data/${encodeURIComponent(e.slice(4))}` : `${l}/dynamic/${encodeURIComponent(e)}?all=1${r ? `&locale=${encodeURIComponent(r)}` : ""}`, t = await Promise.all(m.map((t) => c(e(t), { headers: u }).then(ce).then((e) => {
503
507
  let n = Array.isArray(e) ? e : Array.isArray(e?.data) ? e.data : [], r = Number(e?.total?.filtered ?? e?.total?.all ?? n.length);
504
508
  return [[t, n], [`${t}:total`, Number.isFinite(r) ? r : n.length]];
505
509
  }).catch(() => [[t, []]])));
@@ -513,7 +517,7 @@ async function se({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
513
517
  }
514
518
  //#endregion
515
519
  //#region ../ui/src/components/builder/locale.js
516
- var ce = /* @__PURE__ */ new Set([
520
+ var ue = /* @__PURE__ */ new Set([
517
521
  "ar",
518
522
  "he",
519
523
  "fa",
@@ -524,34 +528,34 @@ var ce = /* @__PURE__ */ new Set([
524
528
  "yi",
525
529
  "dv",
526
530
  "ckb"
527
- ]), le = (e) => ce.has(String(e || "").toLowerCase().split(/[-_]/)[0]) ? "rtl" : "ltr", ue = (e, t) => e === "ltr" || e === "rtl" ? e : t ? le(t) : void 0, U = t({
531
+ ]), de = (e) => ue.has(String(e || "").toLowerCase().split(/[-_]/)[0]) ? "rtl" : "ltr", fe = (e, t) => e === "ltr" || e === "rtl" ? e : t ? de(t) : void 0, H = t({
528
532
  tenant: "",
529
533
  apiUrl: "/api",
530
534
  locale: "",
531
535
  settings: null
532
- }), W = t(null), G = (e) => {
536
+ }), U = t(null), W = (e) => {
533
537
  let t = Number(e?.__page);
534
538
  if (Number.isFinite(t) && t >= 1) return Math.floor(t);
535
539
  if (typeof window > "u") return 1;
536
540
  let n = Number(new URLSearchParams(window.location.search).get("page"));
537
541
  return Number.isFinite(n) && n >= 1 ? Math.floor(n) : 1;
538
- }, de = () => {
542
+ }, pe = () => {
539
543
  if (typeof window > "u") return {};
540
544
  let e = {};
541
545
  return new URLSearchParams(window.location.search).forEach((t, n) => {
542
546
  n.startsWith("f_") && n.length > 2 && t !== "" && (e[n.slice(2)] = t);
543
547
  }), e;
544
- }, fe = (e) => {
548
+ }, me = (e) => {
545
549
  let t = {
546
550
  ...e && typeof e == "object" && !Array.isArray(e) ? e : {},
547
- ...de()
551
+ ...pe()
548
552
  };
549
553
  return Object.fromEntries(Object.entries(t).filter(([, e]) => typeof e == "string" && e.trim() !== ""));
550
- }, pe = t(null), me = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
551
- function K(e, t) {
554
+ }, he = t(null), ge = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
555
+ function G(e, t) {
552
556
  if (t) return t.includes(".") ? t.split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e) : e?.[t];
553
557
  }
554
- var he = (e) => {
558
+ var _e = (e) => {
555
559
  let t = [];
556
560
  for (let [n, r] of Object.entries(e ?? {})) {
557
561
  if (!/^[\w-]+$/.test(n)) continue;
@@ -561,36 +565,36 @@ var he = (e) => {
561
565
  }
562
566
  return t;
563
567
  };
564
- function q(e) {
568
+ function K(e) {
565
569
  return e == null ? "" : typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? String(e) : typeof e == "object" && !Array.isArray(e) && ("label" in e || "name" in e || "slug" in e) ? String(e.label ?? e.name ?? e.slug ?? "") : typeof e == "object" && !Array.isArray(e) && Number.isFinite(Number(e.lat)) && Number.isFinite(Number(e.lng)) ? `${e.lat}, ${e.lng}` : Array.isArray(e) ? e.map((e) => typeof e == "string" ? e : Array.isArray(e?.parts) ? e.parts.map((e) => e?.text ?? "").join("") : Array.isArray(e?.items) ? e.items.map((e) => e?.text ?? "").join(" ") : e && (e.label != null || e.name != null || e.slug != null) ? String(e.label ?? e.name ?? e.slug) : "").filter(Boolean).join(" ") : "";
566
570
  }
567
- function ge(e, t) {
568
- let n = t?.data ?? {}, r = he(n);
571
+ function ve(e, t) {
572
+ let n = t?.data ?? {}, r = _e(n);
569
573
  if (!r.length) return e;
570
- let i = RegExp(`:(${r.map(me).sort((e, t) => t.length - e.length).join("|")})`, "g"), a = (e) => typeof e == "string" ? e.replace(i, (e, t) => q(K(n, t))) : Array.isArray(e) ? e.map(a) : e && typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, a(t)])) : e;
574
+ let i = RegExp(`:(${r.map(ge).sort((e, t) => t.length - e.length).join("|")})`, "g"), a = (e) => typeof e == "string" ? e.replace(i, (e, t) => K(G(n, t))) : Array.isArray(e) ? e.map(a) : e && typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, a(t)])) : e;
571
575
  return a(e);
572
576
  }
573
- var _e = {
577
+ var ye = {
574
578
  margin: 0,
575
579
  fontWeight: 700,
576
580
  lineHeight: 1.2,
577
581
  fontFamily: "var(--page-heading-font, inherit)"
578
- }, ve = { margin: 0 }, J = {
582
+ }, be = { margin: 0 }, q = {
579
583
  display: "inline-block",
580
584
  textDecoration: "none",
581
585
  cursor: "pointer",
582
586
  backgroundColor: "var(--page-accent, #111827)",
583
587
  color: "var(--page-accent-text, #ffffff)"
584
- }, ye = {
588
+ }, xe = {
585
589
  flexGrow: 1,
586
590
  display: "flex",
587
591
  flexDirection: "column",
588
592
  position: "relative"
589
- }, be = {
593
+ }, Se = {
590
594
  display: "flex",
591
595
  flexDirection: "column"
592
596
  };
593
- function xe({ style: e }) {
597
+ function Ce({ style: e }) {
594
598
  let t = e?.backgroundVideo;
595
599
  if (!t) return null;
596
600
  let n = {
@@ -616,7 +620,7 @@ function xe({ style: e }) {
616
620
  background: r
617
621
  } })] });
618
622
  }
619
- var Se = (e, t) => e?.backgroundVideo ? {
623
+ var we = (e, t) => e?.backgroundVideo ? {
620
624
  position: "relative",
621
625
  ...t,
622
626
  ...C(e)
@@ -624,24 +628,24 @@ var Se = (e, t) => e?.backgroundVideo ? {
624
628
  ...t,
625
629
  ...C(e)
626
630
  };
627
- function Ce({ style: e, nodeRef: t, children: n }) {
631
+ function Te({ style: e, nodeRef: t, children: n }) {
628
632
  return /* @__PURE__ */ d("div", {
629
633
  ref: t,
630
634
  style: {
631
- ...ye,
635
+ ...xe,
632
636
  ...C(e)
633
637
  },
634
- children: [/* @__PURE__ */ u(xe, { style: e }), n]
638
+ children: [/* @__PURE__ */ u(Ce, { style: e }), n]
635
639
  });
636
640
  }
637
- function we({ style: e, nodeRef: t, children: n }) {
641
+ function Ee({ style: e, nodeRef: t, children: n }) {
638
642
  return /* @__PURE__ */ d("section", {
639
643
  ref: t,
640
- style: Se(e, be),
641
- children: [/* @__PURE__ */ u(xe, { style: e }), n]
644
+ style: we(e, Se),
645
+ children: [/* @__PURE__ */ u(Ce, { style: e }), n]
642
646
  });
643
647
  }
644
- function Te({ style: e, freeLayout: t, nodeRef: n, children: r }) {
648
+ function De({ style: e, freeLayout: t, nodeRef: n, children: r }) {
645
649
  let i = t ? {
646
650
  position: "relative",
647
651
  minHeight: 240
@@ -650,32 +654,32 @@ function Te({ style: e, freeLayout: t, nodeRef: n, children: r }) {
650
654
  ref: n,
651
655
  style: i ? {
652
656
  ...i,
653
- ...Se(e)
654
- } : Se(e),
655
- children: [/* @__PURE__ */ u(xe, { style: e }), r]
657
+ ...we(e)
658
+ } : we(e),
659
+ children: [/* @__PURE__ */ u(Ce, { style: e }), r]
656
660
  });
657
661
  }
658
- function Ee({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
662
+ function Oe({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
659
663
  return /* @__PURE__ */ u(n, {
660
664
  ref: a,
661
665
  style: {
662
- ..._e,
666
+ ...ye,
663
667
  ...C(r)
664
668
  },
665
- children: Y(t, e, i)
669
+ children: J(t, e, i)
666
670
  });
667
671
  }
668
- var De = {
672
+ var ke = {
669
673
  fontFamily: z.mono.value,
670
674
  background: "rgba(148, 163, 184, 0.18)",
671
675
  padding: "1px 5px",
672
676
  borderRadius: 4,
673
677
  fontSize: "0.9em"
674
678
  };
675
- function Oe(e, t = [], n, r) {
679
+ function Ae(e, t = [], n, r) {
676
680
  let i = e;
677
681
  return t.includes("sup") ? i = /* @__PURE__ */ u("sup", { children: i }) : t.includes("sub") && (i = /* @__PURE__ */ u("sub", { children: i })), t.includes("code") && (i = /* @__PURE__ */ u("code", {
678
- style: De,
682
+ style: ke,
679
683
  children: i
680
684
  })), t.includes("strike") && (i = /* @__PURE__ */ u("s", { children: i })), t.includes("underline") && (i = /* @__PURE__ */ u("u", { children: i })), t.includes("italic") && (i = /* @__PURE__ */ u("em", { children: i })), t.includes("bold") && (i = /* @__PURE__ */ u("strong", { children: i })), n && (i = /* @__PURE__ */ u("a", {
681
685
  href: n,
@@ -685,13 +689,13 @@ function Oe(e, t = [], n, r) {
685
689
  children: i
686
690
  })), i;
687
691
  }
688
- function Y(t, n, r) {
692
+ function J(t, n, r) {
689
693
  return t?.length ? t.map((t, n) => {
690
694
  if (t.slot) return /* @__PURE__ */ u(e, { children: r?.[t.slot] ?? null }, n);
691
- if (t.parts) return /* @__PURE__ */ u(e, { children: Y(t.parts, "", r) }, n);
695
+ if (t.parts) return /* @__PURE__ */ u(e, { children: J(t.parts, "", r) }, n);
692
696
  let i = t.text;
693
697
  return t.sup ? i = /* @__PURE__ */ u("sup", { children: i }) : t.sub && (i = /* @__PURE__ */ u("sub", { children: i })), t.code && (i = /* @__PURE__ */ u("code", {
694
- style: De,
698
+ style: ke,
695
699
  children: i
696
700
  })), t.strike && (i = /* @__PURE__ */ u("s", { children: i })), t.underline && (i = /* @__PURE__ */ u("u", { children: i })), t.italic && (i = /* @__PURE__ */ u("em", { children: i })), t.bold && (i = /* @__PURE__ */ u("strong", { children: i })), (t.color || t.background) && (i = /* @__PURE__ */ u("span", {
697
701
  style: {
@@ -708,13 +712,13 @@ function Y(t, n, r) {
708
712
  })), /* @__PURE__ */ u(e, { children: i }, n);
709
713
  }) : n;
710
714
  }
711
- function ke({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
715
+ function je({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
712
716
  return /* @__PURE__ */ u("span", {
713
717
  style: C(a),
714
- children: e?.length ? Y(e, t) : Oe(t, n, r, i)
718
+ children: e?.length ? J(e, t) : Ae(t, n, r, i)
715
719
  });
716
720
  }
717
- var Ae = {
721
+ var Me = {
718
722
  h1: 40,
719
723
  h2: 32,
720
724
  h3: 26,
@@ -722,7 +726,7 @@ var Ae = {
722
726
  h5: 19,
723
727
  h6: 16
724
728
  };
725
- function je({ align: e = "center", width: t, wrap: n } = {}) {
729
+ function Ne({ align: e = "center", width: t, wrap: n } = {}) {
726
730
  let r = t ? `${t}%` : void 0;
727
731
  if (e === "full") return { width: "100%" };
728
732
  let i = e === "left" || e === "right";
@@ -756,8 +760,8 @@ function je({ align: e = "center", width: t, wrap: n } = {}) {
756
760
  marginRight: "auto"
757
761
  };
758
762
  }
759
- function Me(e = [], t, n) {
760
- let r = n ?? ((e, n) => Y(e, n, t));
763
+ function Pe(e = [], t, n) {
764
+ let r = n ?? ((e, n) => J(e, n, t));
761
765
  return e.map((t, n) => {
762
766
  let i = {
763
767
  marginTop: 0,
@@ -779,7 +783,7 @@ function Me(e = [], t, n) {
779
783
  marginLeft: 0,
780
784
  marginRight: 0,
781
785
  ...i,
782
- ...je(t)
786
+ ...Ne(t)
783
787
  },
784
788
  children: [t.href ? /* @__PURE__ */ u("a", {
785
789
  href: t.href,
@@ -798,16 +802,16 @@ function Me(e = [], t, n) {
798
802
  })]
799
803
  }, n);
800
804
  }
801
- if (t.type === "video") return Ue(t.url) ? /* @__PURE__ */ u("div", {
805
+ if (t.type === "video") return Ge(t.url) ? /* @__PURE__ */ u("div", {
802
806
  style: {
803
807
  ...i,
804
- ...je({
808
+ ...Ne({
805
809
  align: t.align,
806
810
  wrap: t.wrap,
807
811
  width: t.width ?? 100
808
812
  })
809
813
  },
810
- children: /* @__PURE__ */ u(We, {
814
+ children: /* @__PURE__ */ u(Ke, {
811
815
  url: t.url,
812
816
  autoplay: t.autoplay,
813
817
  muted: t.muted,
@@ -869,17 +873,17 @@ function Me(e = [], t, n) {
869
873
  }
870
874
  if (t.type === "quote") return /* @__PURE__ */ u("blockquote", {
871
875
  style: {
872
- ...Pe,
876
+ ...Ie,
873
877
  ...i
874
878
  },
875
879
  children: r(t.parts, t.text)
876
880
  }, n);
877
- if (Ae[t.type]) {
881
+ if (Me[t.type]) {
878
882
  let e = t.type;
879
883
  return /* @__PURE__ */ u(e, {
880
884
  style: {
881
- ..._e,
882
- fontSize: Ae[t.type],
885
+ ...ye,
886
+ fontSize: Me[t.type],
883
887
  ...i
884
888
  },
885
889
  children: r(t.parts, t.text)
@@ -887,39 +891,39 @@ function Me(e = [], t, n) {
887
891
  }
888
892
  return /* @__PURE__ */ u("p", {
889
893
  style: {
890
- ...ve,
894
+ ...be,
891
895
  ...i
892
896
  },
893
897
  children: r(t.parts, t.text)
894
898
  }, n);
895
899
  });
896
900
  }
897
- function Ne({ content: e, style: t, linked: n, nodeRef: r }) {
901
+ function Fe({ content: e, style: t, linked: n, nodeRef: r }) {
898
902
  return /* @__PURE__ */ u("div", {
899
903
  ref: r,
900
904
  style: {
901
905
  display: "flow-root",
902
906
  ...C(t)
903
907
  },
904
- children: Me(e, n)
908
+ children: Pe(e, n)
905
909
  });
906
910
  }
907
- var Pe = {
911
+ var Ie = {
908
912
  margin: 0,
909
913
  padding: "8px 0 8px 20px",
910
914
  borderLeft: "4px solid var(--page-accent, rgba(148, 163, 184, 0.6))"
911
915
  };
912
- function Fe({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
916
+ function Le({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
913
917
  return /* @__PURE__ */ u("blockquote", {
914
918
  ref: i,
915
919
  style: {
916
- ...Pe,
920
+ ...Ie,
917
921
  ...C(n)
918
922
  },
919
- children: Y(t, e, r)
923
+ children: J(t, e, r)
920
924
  });
921
925
  }
922
- function Ie({ ordered: e, items: t = [], style: n, nodeRef: r }) {
926
+ function Re({ ordered: e, items: t = [], style: n, nodeRef: r }) {
923
927
  return /* @__PURE__ */ u(e ? "ol" : "ul", {
924
928
  ref: r,
925
929
  style: {
@@ -929,53 +933,53 @@ function Ie({ ordered: e, items: t = [], style: n, nodeRef: r }) {
929
933
  },
930
934
  children: t.map((e, t) => /* @__PURE__ */ u("li", {
931
935
  style: { marginBottom: 4 },
932
- children: Y(e.parts, e.text)
936
+ children: J(e.parts, e.text)
933
937
  }, t))
934
938
  });
935
939
  }
936
- function Le({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
940
+ function ze({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
937
941
  return /* @__PURE__ */ u("p", {
938
942
  ref: i,
939
943
  style: {
940
- ...ve,
944
+ ...be,
941
945
  ...C(n)
942
946
  },
943
- children: Y(t, e, r)
947
+ children: J(t, e, r)
944
948
  });
945
949
  }
946
- var Re = {
950
+ var Be = {
947
951
  color: "var(--page-accent, inherit)",
948
952
  textDecoration: "underline",
949
953
  textUnderlineOffset: 3,
950
954
  cursor: "pointer"
951
955
  };
952
- function ze({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
956
+ function Ve({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
953
957
  return /* @__PURE__ */ u("a", {
954
958
  ref: o,
955
959
  href: n || "#",
956
960
  target: r || void 0,
957
961
  rel: r === "_blank" ? "noopener noreferrer" : void 0,
958
962
  style: {
959
- ...Re,
963
+ ...Be,
960
964
  ...C(i)
961
965
  },
962
- children: Y(t, e, a)
966
+ children: J(t, e, a)
963
967
  });
964
968
  }
965
- function Be({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
969
+ function He({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
966
970
  return /* @__PURE__ */ u("a", {
967
971
  ref: o,
968
972
  href: n || "#",
969
973
  target: r || void 0,
970
974
  rel: r === "_blank" ? "noopener noreferrer" : void 0,
971
975
  style: {
972
- ...J,
976
+ ...q,
973
977
  ...C(i)
974
978
  },
975
- children: Y(t, e, a)
979
+ children: J(t, e, a)
976
980
  });
977
981
  }
978
- function Ve({ src: e, alt: t, style: n, nodeRef: r }) {
982
+ function Ue({ src: e, alt: t, style: n, nodeRef: r }) {
979
983
  return e ? /* @__PURE__ */ u("img", {
980
984
  ref: r,
981
985
  src: e,
@@ -987,7 +991,7 @@ function Ve({ src: e, alt: t, style: n, nodeRef: r }) {
987
991
  }
988
992
  }) : null;
989
993
  }
990
- function He({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
994
+ function We({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
991
995
  return e ? /* @__PURE__ */ u("video", {
992
996
  ref: s,
993
997
  src: e,
@@ -1005,9 +1009,9 @@ function He({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !
1005
1009
  }
1006
1010
  }) : null;
1007
1011
  }
1008
- var Ue = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
1009
- function We({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
1010
- let c = Ue(e);
1012
+ var Ge = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
1013
+ function Ke({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
1014
+ let c = Ge(e);
1011
1015
  if (!c) return null;
1012
1016
  let l = new URLSearchParams({ rel: "0" });
1013
1017
  return t && l.set("autoplay", "1"), (n || t) && l.set("mute", "1"), i || l.set("controls", "0"), r && (l.set("loop", "1"), l.set("playlist", c)), Number(a) > 0 && l.set("start", String(Math.floor(Number(a)))), /* @__PURE__ */ u("div", {
@@ -1033,7 +1037,7 @@ function We({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i
1033
1037
  })
1034
1038
  });
1035
1039
  }
1036
- function Ge({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
1040
+ function qe({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
1037
1041
  return e ? /* @__PURE__ */ u("iframe", {
1038
1042
  ref: i,
1039
1043
  src: e,
@@ -1049,7 +1053,7 @@ function Ge({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i })
1049
1053
  }
1050
1054
  }) : null;
1051
1055
  }
1052
- function Ke({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
1056
+ function Je({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
1053
1057
  let [a, o] = c(null);
1054
1058
  return i(() => {
1055
1059
  a && (a.innerHTML = e || "", t && a.querySelectorAll("script").forEach((e) => {
@@ -1068,7 +1072,7 @@ function Ke({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
1068
1072
  style: C(n)
1069
1073
  });
1070
1074
  }
1071
- function qe({ height: e, nodeRef: t }) {
1075
+ function Ye({ height: e, nodeRef: t }) {
1072
1076
  return /* @__PURE__ */ u("div", {
1073
1077
  ref: t,
1074
1078
  style: {
@@ -1078,7 +1082,7 @@ function qe({ height: e, nodeRef: t }) {
1078
1082
  }
1079
1083
  });
1080
1084
  }
1081
- function Je({ style: e, nodeRef: t }) {
1085
+ function Xe({ style: e, nodeRef: t }) {
1082
1086
  return /* @__PURE__ */ u("div", {
1083
1087
  ref: t,
1084
1088
  style: {
@@ -1089,7 +1093,7 @@ function Je({ style: e, nodeRef: t }) {
1089
1093
  }
1090
1094
  });
1091
1095
  }
1092
- var Ye = {
1096
+ var Ze = {
1093
1097
  position: "absolute",
1094
1098
  top: "50%",
1095
1099
  transform: "translateY(-50%)",
@@ -1106,7 +1110,7 @@ var Ye = {
1106
1110
  alignItems: "center",
1107
1111
  justifyContent: "center",
1108
1112
  padding: 0
1109
- }, Xe = {
1113
+ }, Qe = {
1110
1114
  bottom: {
1111
1115
  inset: "auto 0 0 0",
1112
1116
  padding: "40px 24px 20px",
@@ -1125,8 +1129,8 @@ var Ye = {
1125
1129
  padding: 24,
1126
1130
  textShadow: "0 2px 12px rgba(0, 0, 0, 0.6)"
1127
1131
  }
1128
- }, Ze = 48;
1129
- function Qe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: a = 320, swipe: o = !0, style: s, nodeRef: f }) {
1132
+ }, $e = 48;
1133
+ function et({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: a = 320, swipe: o = !0, style: s, nodeRef: f }) {
1130
1134
  let [p, m] = c(0), [h, g] = c(!1), [_, v] = c(null), y = e ? Math.min(p, e - 1) : 0;
1131
1135
  if (i(() => {
1132
1136
  if (!n || h || _ || e < 2) return;
@@ -1142,7 +1146,7 @@ function Qe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1142
1146
  let b = (t) => m((t + e) % e), x = () => {
1143
1147
  if (!_) return;
1144
1148
  let { dx: e } = _;
1145
- v(null), e < -48 ? b(y + 1) : e > Ze && b(y - 1);
1149
+ v(null), e < -48 ? b(y + 1) : e > $e && b(y - 1);
1146
1150
  };
1147
1151
  return /* @__PURE__ */ d("div", {
1148
1152
  ref: f,
@@ -1190,7 +1194,7 @@ function Qe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1190
1194
  type: "button",
1191
1195
  "aria-label": "Previous slide",
1192
1196
  style: {
1193
- ...Ye,
1197
+ ...Ze,
1194
1198
  left: 12
1195
1199
  },
1196
1200
  onClick: () => b(y - 1),
@@ -1200,7 +1204,7 @@ function Qe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1200
1204
  type: "button",
1201
1205
  "aria-label": "Next slide",
1202
1206
  style: {
1203
- ...Ye,
1207
+ ...Ze,
1204
1208
  right: 12
1205
1209
  },
1206
1210
  onClick: () => b(y + 1),
@@ -1234,7 +1238,7 @@ function Qe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1234
1238
  ] })]
1235
1239
  });
1236
1240
  }
1237
- var $e = (e, t) => ({
1241
+ var tt = (e, t) => ({
1238
1242
  position: "absolute",
1239
1243
  inset: 0,
1240
1244
  backgroundImage: e ? `url(${e})` : "none",
@@ -1242,18 +1246,18 @@ var $e = (e, t) => ({
1242
1246
  backgroundSize: "cover",
1243
1247
  backgroundPosition: "center"
1244
1248
  });
1245
- function et({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
1246
- return e.length ? /* @__PURE__ */ u(Qe, {
1249
+ function nt({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
1250
+ return e.length ? /* @__PURE__ */ u(et, {
1247
1251
  ...r,
1248
1252
  count: e.length,
1249
1253
  renderSlide: (r) => {
1250
1254
  let i = e[r];
1251
- return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: $e(i.image) }), (i.title || i.text) && /* @__PURE__ */ d("div", {
1255
+ return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: tt(i.image) }), (i.title || i.text) && /* @__PURE__ */ d("div", {
1252
1256
  style: {
1253
1257
  position: "absolute",
1254
1258
  color: "#fff",
1255
1259
  textAlign: n,
1256
- ...Xe[t] ?? Xe.bottom
1260
+ ...Qe[t] ?? Qe.bottom
1257
1261
  },
1258
1262
  children: [i.title && /* @__PURE__ */ u("div", {
1259
1263
  style: {
@@ -1273,13 +1277,13 @@ function et({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "
1273
1277
  }
1274
1278
  }) : null;
1275
1279
  }
1276
- function tt({ slides: e = [], linked: t, ...n }) {
1277
- return e.length ? /* @__PURE__ */ u(Qe, {
1280
+ function rt({ slides: e = [], linked: t, ...n }) {
1281
+ return e.length ? /* @__PURE__ */ u(et, {
1278
1282
  ...n,
1279
1283
  count: e.length,
1280
1284
  renderSlide: (n) => {
1281
1285
  let r = e[n];
1282
- return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: $e(r.image, r.color) }), /* @__PURE__ */ u("div", {
1286
+ return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: tt(r.image, r.color) }), /* @__PURE__ */ u("div", {
1283
1287
  style: {
1284
1288
  position: "absolute",
1285
1289
  inset: 0,
@@ -1291,7 +1295,7 @@ function tt({ slides: e = [], linked: t, ...n }) {
1291
1295
  }
1292
1296
  }) : null;
1293
1297
  }
1294
- function nt({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lightbox: a = !0, style: o, nodeRef: s, inert: f }) {
1298
+ function it({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lightbox: a = !0, style: o, nodeRef: s, inert: f }) {
1295
1299
  let p = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.src) : [], m = Math.max(0, Number(n) || 0), h = f ? (e) => e.preventDefault() : void 0, [g, _] = c(null), v = a && !f && g !== null && p[g];
1296
1300
  i(() => {
1297
1301
  if (!v) return;
@@ -1490,19 +1494,19 @@ function nt({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lig
1490
1494
  ]
1491
1495
  });
1492
1496
  }
1493
- var rt = {
1497
+ var at = {
1494
1498
  color: "inherit",
1495
1499
  textDecoration: "none",
1496
1500
  fontSize: 14,
1497
1501
  opacity: .85
1498
- }, it = {
1502
+ }, ot = {
1499
1503
  background: "var(--page-surface, #f2f2f2)",
1500
1504
  color: "var(--page-text, #111827)",
1501
1505
  border: "1px solid rgba(148, 163, 184, 0.25)",
1502
1506
  boxShadow: "0 16px 40px rgba(15, 23, 42, 0.16)",
1503
1507
  zIndex: 60
1504
1508
  };
1505
- function at({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], style: s, nodeRef: f, menu: p = "auto", breakpoint: m = 768 }) {
1509
+ function st({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], style: s, nodeRef: f, menu: p = "auto", breakpoint: m = 768 }) {
1506
1510
  let [h, g] = c(null), [_, v] = c(!1), [y, b] = c(!1), [x, S] = c(null);
1507
1511
  i(() => {
1508
1512
  if (!h) return;
@@ -1512,7 +1516,7 @@ function at({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1512
1516
  let w = p === "hamburger" || p === "auto" && _, T = (e, t) => /* @__PURE__ */ d("a", {
1513
1517
  href: e.href || "#",
1514
1518
  style: {
1515
- ...rt,
1519
+ ...at,
1516
1520
  display: "block",
1517
1521
  ...t
1518
1522
  },
@@ -1600,7 +1604,7 @@ function at({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1600
1604
  let t = e.children ?? [];
1601
1605
  if (!t.length) return /* @__PURE__ */ u("a", {
1602
1606
  href: e.href || "#",
1603
- style: rt,
1607
+ style: at,
1604
1608
  children: e.label
1605
1609
  }, e.key);
1606
1610
  let n = e.type === "mega";
@@ -1614,7 +1618,7 @@ function at({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1614
1618
  children: [/* @__PURE__ */ d("a", {
1615
1619
  href: e.href || "#",
1616
1620
  style: {
1617
- ...rt,
1621
+ ...at,
1618
1622
  cursor: "pointer"
1619
1623
  },
1620
1624
  children: [
@@ -1630,7 +1634,7 @@ function at({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1630
1634
  ]
1631
1635
  }), x === e.key && (n ? /* @__PURE__ */ u("div", {
1632
1636
  style: {
1633
- ...it,
1637
+ ...ot,
1634
1638
  position: "absolute",
1635
1639
  left: 0,
1636
1640
  right: 0,
@@ -1646,7 +1650,7 @@ function at({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1646
1650
  }))
1647
1651
  }) : /* @__PURE__ */ u("div", {
1648
1652
  style: {
1649
- ...it,
1653
+ ...ot,
1650
1654
  position: "absolute",
1651
1655
  top: "100%",
1652
1656
  left: 0,
@@ -1675,7 +1679,7 @@ function at({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1675
1679
  children: o.map((t) => /* @__PURE__ */ d(e, { children: [/* @__PURE__ */ u("a", {
1676
1680
  href: t.href || "#",
1677
1681
  style: {
1678
- ...rt,
1682
+ ...at,
1679
1683
  padding: "10px 4px",
1680
1684
  fontWeight: (t.children ?? []).length ? 600 : 400,
1681
1685
  opacity: 1
@@ -1686,7 +1690,7 @@ function at({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1686
1690
  ]
1687
1691
  });
1688
1692
  }
1689
- function ot({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
1693
+ function ct({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
1690
1694
  let [i, a] = c(0), o = e.length ? Math.min(i, e.length - 1) : 0;
1691
1695
  return e.length ? /* @__PURE__ */ d("div", {
1692
1696
  ref: r,
@@ -1726,7 +1730,7 @@ function ot({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
1726
1730
  }, e.key))]
1727
1731
  }) : null;
1728
1732
  }
1729
- function st({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }) {
1733
+ function lt({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }) {
1730
1734
  let [a, o] = c(() => new Set(e.length ? [e[0].key] : []));
1731
1735
  if (!e.length) return null;
1732
1736
  let s = (e) => o((t) => {
@@ -1783,15 +1787,15 @@ function st({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }
1783
1787
  })
1784
1788
  });
1785
1789
  }
1786
- var ct = {
1790
+ var ut = {
1787
1791
  display: "flex",
1788
1792
  flexDirection: "column",
1789
1793
  gap: "12px"
1790
- }, X = {
1794
+ }, Y = {
1791
1795
  fontSize: "14px",
1792
1796
  fontWeight: 500,
1793
1797
  color: "var(--page-text, #111827)"
1794
- }, Z = {
1798
+ }, X = {
1795
1799
  padding: "10px 12px",
1796
1800
  border: "1px solid var(--page-border, #d1d5db)",
1797
1801
  borderRadius: "6px",
@@ -1801,18 +1805,18 @@ var ct = {
1801
1805
  boxSizing: "border-box",
1802
1806
  backgroundColor: "var(--page-surface, #f2f2f2)",
1803
1807
  color: "var(--page-text, #111827)"
1804
- }, lt = {
1808
+ }, dt = {
1805
1809
  display: "flex",
1806
1810
  alignItems: "center",
1807
1811
  gap: "8px",
1808
1812
  fontSize: "14px",
1809
1813
  color: "var(--page-text, #111827)"
1810
- }, Q = (e) => e ? {
1814
+ }, Z = (e) => e ? {
1811
1815
  readOnly: !0,
1812
1816
  tabIndex: -1,
1813
1817
  onMouseDown: (e) => e.preventDefault()
1814
1818
  } : {};
1815
- function ut(e, t) {
1819
+ function ft(e, t) {
1816
1820
  if (!e) return !0;
1817
1821
  let n = t[e.field], r = n == null || n === "" ? "" : String(n), i = e.value ?? "";
1818
1822
  switch (e.op) {
@@ -1826,11 +1830,11 @@ function ut(e, t) {
1826
1830
  default: return !1;
1827
1831
  }
1828
1832
  }
1829
- var dt = {
1833
+ var pt = {
1830
1834
  display: "flex",
1831
1835
  flexDirection: "column",
1832
1836
  gap: 6
1833
- }, ft = {
1837
+ }, mt = {
1834
1838
  font: "inherit",
1835
1839
  fontSize: 15,
1836
1840
  padding: "10px 12px",
@@ -1841,16 +1845,16 @@ var dt = {
1841
1845
  width: "100%",
1842
1846
  boxSizing: "border-box"
1843
1847
  };
1844
- function pt(e, t) {
1848
+ function ht(e, t) {
1845
1849
  let n = Array.isArray(e?.options) ? e.options : [];
1846
1850
  if (!e?.parentField) return n;
1847
1851
  let r = t?.[e.parentField];
1848
1852
  return r ? n.filter((e) => typeof e == "string" ? !1 : !e.parent || e.parent === r) : [];
1849
1853
  }
1850
- function mt({ field: e, value: t, onChange: n, inert: r, values: i }) {
1854
+ function gt({ field: e, value: t, onChange: n, inert: r, values: i }) {
1851
1855
  let a = /* @__PURE__ */ d("span", {
1852
1856
  style: {
1853
- ...X,
1857
+ ...Y,
1854
1858
  fontSize: 14
1855
1859
  },
1856
1860
  children: [e.label, e.required ? " *" : ""]
@@ -1859,7 +1863,7 @@ function mt({ field: e, value: t, onChange: n, inert: r, values: i }) {
1859
1863
  required: e.required || void 0,
1860
1864
  placeholder: e.placeholder || void 0,
1861
1865
  disabled: r || void 0,
1862
- style: ft,
1866
+ style: mt,
1863
1867
  value: t ?? "",
1864
1868
  onChange: (t) => n(e.name, t.target.value)
1865
1869
  };
@@ -1888,7 +1892,7 @@ function mt({ field: e, value: t, onChange: n, inert: r, values: i }) {
1888
1892
  borderRadius: 8,
1889
1893
  display: "block"
1890
1894
  }
1891
- }) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ u(We, {
1895
+ }) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ u(Ke, {
1892
1896
  url: e.src,
1893
1897
  style: { width: "100%" }
1894
1898
  }) : /* @__PURE__ */ u("video", {
@@ -1900,14 +1904,14 @@ function mt({ field: e, value: t, onChange: n, inert: r, values: i }) {
1900
1904
  display: "block"
1901
1905
  }
1902
1906
  }) : null : /* @__PURE__ */ d("label", {
1903
- style: dt,
1907
+ style: pt,
1904
1908
  children: [
1905
1909
  a,
1906
1910
  e.type === "textarea" || e.multiline ? /* @__PURE__ */ u("textarea", {
1907
1911
  ...o,
1908
1912
  rows: 4,
1909
1913
  style: {
1910
- ...ft,
1914
+ ...mt,
1911
1915
  resize: "vertical"
1912
1916
  }
1913
1917
  }) : e.type === "select" ? /* @__PURE__ */ d("select", {
@@ -1916,7 +1920,7 @@ function mt({ field: e, value: t, onChange: n, inert: r, values: i }) {
1916
1920
  children: [/* @__PURE__ */ u("option", {
1917
1921
  value: "",
1918
1922
  children: e.placeholder || "—"
1919
- }), pt(e, i).map((e, t) => /* @__PURE__ */ u("option", {
1923
+ }), ht(e, i).map((e, t) => /* @__PURE__ */ u("option", {
1920
1924
  value: typeof e == "string" ? e : e.value,
1921
1925
  children: typeof e == "string" ? e : e.label ?? e.value
1922
1926
  }, t))]
@@ -1963,8 +1967,8 @@ function mt({ field: e, value: t, onChange: n, inert: r, values: i }) {
1963
1967
  ]
1964
1968
  });
1965
1969
  }
1966
- function ht({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s, auto: f, submitLabel: p, nodeRef: m, inert: h, children: g, linked: _, show: v }) {
1967
- let { tenant: y, apiUrl: b } = r(U), [x, S] = c("form"), [w, T] = c(null), [E, D] = c({}), [O, k] = c(0), A = h ? v || "form" : x;
1970
+ function _t({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s, auto: f, submitLabel: p, nodeRef: m, inert: h, children: g, linked: _, show: v }) {
1971
+ let { tenant: y, apiUrl: b } = r(H), [x, S] = c("form"), [w, T] = c(null), [E, D] = c({}), [O, k] = c(0), A = h ? v || "form" : x;
1968
1972
  i(() => {
1969
1973
  if (!f || !s) return;
1970
1974
  let e = !0;
@@ -1985,13 +1989,13 @@ function ht({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
1985
1989
  section: e,
1986
1990
  fields: []
1987
1991
  }) : j[j.length - 1].fields.push(e);
1988
- let M = j.filter((e) => e.section || e.fields.length), N = M.filter((e) => !e.section || ut(e.section.condition, E)).map((e) => ({
1992
+ let M = j.filter((e) => e.section || e.fields.length), N = M.filter((e) => !e.section || ft(e.section.condition, E)).map((e) => ({
1989
1993
  ...e,
1990
- fields: e.fields.filter((e) => ut(e.condition, E))
1991
- })), P = M.length > 1, F = Math.min(O, Math.max(0, N.length - 1)), I = P ? N[F]?.fields ?? [] : N.flatMap((e) => e.fields), L = I.filter((e) => {
1994
+ fields: e.fields.filter((e) => ft(e.condition, E))
1995
+ })), P = M.length > 1, F = Math.min(O, Math.max(0, N.length - 1)), ee = P ? N[F]?.fields ?? [] : N.flatMap((e) => e.fields), I = ee.filter((e) => {
1992
1996
  let t = E[e.name];
1993
1997
  return e.required && (t == null || t === "" || t === !1);
1994
- }), R = F >= N.length - 1, z = (e, t) => D((n) => {
1998
+ }), L = F >= N.length - 1, R = (e, t) => D((n) => {
1995
1999
  let r = {
1996
2000
  ...n,
1997
2001
  [e]: t
@@ -2045,11 +2049,11 @@ function ht({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
2045
2049
  }
2046
2050
  },
2047
2051
  style: {
2048
- ...ct,
2052
+ ...ut,
2049
2053
  display: A === "success" ? "none" : "flex"
2050
2054
  },
2051
2055
  children: f && s ? /* @__PURE__ */ d(l, { children: [
2052
- P && /* @__PURE__ */ u(Ht, {
2056
+ P && /* @__PURE__ */ u(Ut, {
2053
2057
  steps: N.map((e) => ({ label: e.section?.label ?? "Start" })),
2054
2058
  active: F + 1,
2055
2059
  style: { marginBottom: 8 }
@@ -2062,11 +2066,11 @@ function ht({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
2062
2066
  },
2063
2067
  children: N[F].section.help
2064
2068
  }),
2065
- I.map((e) => /* @__PURE__ */ u(mt, {
2069
+ ee.map((e) => /* @__PURE__ */ u(gt, {
2066
2070
  field: e,
2067
2071
  value: E[e.name],
2068
2072
  values: E,
2069
- onChange: z,
2073
+ onChange: R,
2070
2074
  inert: h
2071
2075
  }, e.name)),
2072
2076
  /* @__PURE__ */ d("div", {
@@ -2081,7 +2085,7 @@ function ht({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
2081
2085
  disabled: h || void 0,
2082
2086
  onClick: () => k(F - 1),
2083
2087
  style: {
2084
- ...J,
2088
+ ...q,
2085
2089
  background: "transparent",
2086
2090
  color: "inherit",
2087
2091
  border: 0,
@@ -2089,26 +2093,26 @@ function ht({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
2089
2093
  cursor: "pointer"
2090
2094
  },
2091
2095
  children: "Back"
2092
- }), P && !R ? /* @__PURE__ */ u("button", {
2096
+ }), P && !L ? /* @__PURE__ */ u("button", {
2093
2097
  type: "button",
2094
- disabled: h || L.length > 0,
2098
+ disabled: h || I.length > 0,
2095
2099
  onClick: () => k(F + 1),
2096
2100
  style: {
2097
- ...J,
2101
+ ...q,
2098
2102
  border: 0,
2099
2103
  padding: "10px 22px",
2100
2104
  borderRadius: 8,
2101
2105
  fontSize: 15,
2102
2106
  fontWeight: 600,
2103
2107
  cursor: "pointer",
2104
- opacity: L.length ? .5 : 1
2108
+ opacity: I.length ? .5 : 1
2105
2109
  },
2106
2110
  children: "Next"
2107
2111
  }) : /* @__PURE__ */ u("button", {
2108
2112
  type: "submit",
2109
2113
  disabled: h || void 0,
2110
2114
  style: {
2111
- ...J,
2115
+ ...q,
2112
2116
  border: 0,
2113
2117
  padding: "10px 22px",
2114
2118
  borderRadius: 8,
@@ -2135,10 +2139,10 @@ function ht({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
2135
2139
  ]
2136
2140
  });
2137
2141
  }
2138
- var $ = null, gt = null, _t = (e) => {
2142
+ var Q = null, vt = null, yt = (e) => {
2139
2143
  let t = typeof e == "string" && e.trim() ? e.trim() : "";
2140
- if ($ && gt === t) return $;
2141
- if ($ && typeof window < "u") {
2144
+ if (Q && vt === t) return Q;
2145
+ if (Q && typeof window < "u") {
2142
2146
  for (let e of ["grecaptcha", "___grecaptcha_cfg"]) try {
2143
2147
  delete window[e];
2144
2148
  } catch {
@@ -2146,22 +2150,22 @@ var $ = null, gt = null, _t = (e) => {
2146
2150
  }
2147
2151
  document.querySelectorAll("script[src*=\"recaptcha\"]").forEach((e) => e.remove());
2148
2152
  }
2149
- return gt = t, $ = new Promise((e) => {
2153
+ return vt = t, Q = new Promise((e) => {
2150
2154
  if (typeof window > "u") return;
2151
2155
  if (window.grecaptcha?.render) return e(window.grecaptcha);
2152
2156
  window.__webimRecaptchaReady = () => e(window.grecaptcha);
2153
2157
  let n = document.createElement("script");
2154
2158
  n.src = `https://www.google.com/recaptcha/api.js?onload=__webimRecaptchaReady&render=explicit${t ? `&hl=${encodeURIComponent(t)}` : ""}`, n.async = !0, document.head.appendChild(n);
2155
- }), $;
2159
+ }), Q;
2156
2160
  };
2157
- function vt({ siteKey: e, theme: t, size: n, hl: a, style: o, nodeRef: c, inert: l, onChange: f }) {
2158
- let p = r(U), m = p?.settings && typeof p.settings == "object" ? p.settings["google.recaptchaKey"] : "", h = typeof e == "string" && e.trim() || (typeof m == "string" ? m.trim() : ""), g = s(null), _ = s(f);
2161
+ function bt({ siteKey: e, theme: t, size: n, hl: a, style: o, nodeRef: c, inert: l, onChange: f }) {
2162
+ let p = r(H), m = p?.settings && typeof p.settings == "object" ? p.settings["google.recaptchaKey"] : "", h = typeof e == "string" && e.trim() || (typeof m == "string" ? m.trim() : ""), g = s(null), _ = s(f);
2159
2163
  if (_.current = f, i(() => {
2160
2164
  if (l || !h || !g.current) return;
2161
2165
  let e = !0, r = (t) => {
2162
2166
  e && typeof _.current == "function" && _.current(t);
2163
2167
  };
2164
- return _t(a).then((i) => {
2168
+ return yt(a).then((i) => {
2165
2169
  if (!(!e || !g.current || !i?.render)) {
2166
2170
  g.current.innerHTML = "", r("");
2167
2171
  try {
@@ -2243,17 +2247,17 @@ function vt({ siteKey: e, theme: t, size: n, hl: a, style: o, nodeRef: c, inert:
2243
2247
  children: /* @__PURE__ */ u("div", { ref: g })
2244
2248
  }) : null;
2245
2249
  }
2246
- function yt({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
2250
+ function xt({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
2247
2251
  return /* @__PURE__ */ u("label", {
2248
2252
  ref: r,
2249
2253
  style: {
2250
- ...X,
2254
+ ...Y,
2251
2255
  ...C(n)
2252
2256
  },
2253
- children: Y(t, e, i)
2257
+ children: J(t, e, i)
2254
2258
  });
2255
2259
  }
2256
- function bt({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
2260
+ function St({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
2257
2261
  return /* @__PURE__ */ u("input", {
2258
2262
  ref: a,
2259
2263
  type: e,
@@ -2261,13 +2265,13 @@ function bt({ type: e = "text", name: t, placeholder: n, required: r, style: i,
2261
2265
  placeholder: n,
2262
2266
  required: !o && !!r,
2263
2267
  style: {
2264
- ...Z,
2268
+ ...X,
2265
2269
  ...C(i)
2266
2270
  },
2267
- ...Q(o)
2271
+ ...Z(o)
2268
2272
  });
2269
2273
  }
2270
- function xt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
2274
+ function Ct({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
2271
2275
  return /* @__PURE__ */ u("textarea", {
2272
2276
  ref: a,
2273
2277
  name: e || void 0,
@@ -2275,18 +2279,18 @@ function xt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeR
2275
2279
  rows: n,
2276
2280
  required: !o && !!r,
2277
2281
  style: {
2278
- ...Z,
2282
+ ...X,
2279
2283
  resize: "vertical",
2280
2284
  ...C(i)
2281
2285
  },
2282
- ...Q(o)
2286
+ ...Z(o)
2283
2287
  });
2284
2288
  }
2285
- function St({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
2289
+ function wt({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
2286
2290
  return /* @__PURE__ */ d("label", {
2287
2291
  ref: o,
2288
2292
  style: {
2289
- ...lt,
2293
+ ...dt,
2290
2294
  ...C(a)
2291
2295
  },
2292
2296
  children: [/* @__PURE__ */ u("input", {
@@ -2303,7 +2307,7 @@ function St({ kind: e = "checkbox", label: t, name: n, value: r, required: i, st
2303
2307
  }), t]
2304
2308
  });
2305
2309
  }
2306
- function Ct({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
2310
+ function Tt({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
2307
2311
  return /* @__PURE__ */ d("select", {
2308
2312
  ref: a,
2309
2313
  name: e || void 0,
@@ -2312,7 +2316,7 @@ function Ct({ name: e, placeholder: t, options: n = [], required: r, style: i, n
2312
2316
  onMouseDown: o ? (e) => e.preventDefault() : void 0,
2313
2317
  tabIndex: o ? -1 : void 0,
2314
2318
  style: {
2315
- ...Z,
2319
+ ...X,
2316
2320
  appearance: "auto",
2317
2321
  ...C(i)
2318
2322
  },
@@ -2326,12 +2330,12 @@ function Ct({ name: e, placeholder: t, options: n = [], required: r, style: i, n
2326
2330
  }, t))]
2327
2331
  });
2328
2332
  }
2329
- function wt({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
2333
+ function Et({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
2330
2334
  let [s, l] = c(null);
2331
2335
  return /* @__PURE__ */ d("label", {
2332
2336
  ref: a,
2333
2337
  style: {
2334
- ...Z,
2338
+ ...X,
2335
2339
  display: "flex",
2336
2340
  alignItems: "center",
2337
2341
  gap: "8px",
@@ -2358,12 +2362,12 @@ function wt({ name: e, accept: t, required: n, text: r = "Choose a file…", sty
2358
2362
  ]
2359
2363
  });
2360
2364
  }
2361
- function Tt({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
2365
+ function Dt({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
2362
2366
  return /* @__PURE__ */ u("button", {
2363
2367
  ref: n,
2364
2368
  type: r ? "button" : "submit",
2365
2369
  style: {
2366
- ...J,
2370
+ ...q,
2367
2371
  border: 0,
2368
2372
  cursor: "pointer",
2369
2373
  alignSelf: "flex-start",
@@ -2378,7 +2382,7 @@ function Tt({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
2378
2382
  children: e
2379
2383
  });
2380
2384
  }
2381
- function Et({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
2385
+ function Ot({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
2382
2386
  let a = Math.max(1, (Number(e) || 1) * (Number(t) || 1));
2383
2387
  return /* @__PURE__ */ u("div", {
2384
2388
  ref: r,
@@ -2395,8 +2399,8 @@ function Et({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
2395
2399
  }, t))
2396
2400
  });
2397
2401
  }
2398
- function Dt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, imageField: o, titleField: s = "name", textField: l, custom: f, templateId: p, paged: m, filters: h, style: g, nodeRef: _ }) {
2399
- let { tenant: v, apiUrl: y, locale: b } = r(U), x = r(pe), S = r(W), [, w] = c(0);
2402
+ function kt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, imageField: o, titleField: s = "name", textField: l, custom: f, templateId: p, paged: m, filters: h, style: g, nodeRef: _ }) {
2403
+ let { tenant: v, apiUrl: y, locale: b } = r(H), x = r(he), S = r(U), [, w] = c(0);
2400
2404
  i(() => {
2401
2405
  if (typeof window > "u") return;
2402
2406
  let e = () => w((e) => e + 1);
@@ -2404,7 +2408,7 @@ function Dt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
2404
2408
  window.removeEventListener("popstate", e), window.removeEventListener("webim:urlchange", e);
2405
2409
  };
2406
2410
  }, []);
2407
- let T = fe(h), E = JSON.stringify(T), D = E !== "{}" && !e?.startsWith?.("api:"), O = D ? null : S?.[e], k = m ? G(S) : 1, [A, j] = c(null);
2411
+ let T = me(h), E = JSON.stringify(T), D = E !== "{}" && !e?.startsWith?.("api:"), O = D ? null : S?.[e], k = m ? W(S) : 1, [A, j] = c(null);
2408
2412
  if (i(() => {
2409
2413
  if (!e || O) return;
2410
2414
  let n = !0, r = new URLSearchParams();
@@ -2449,7 +2453,7 @@ function Dt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
2449
2453
  },
2450
2454
  children: N.map((e) => /* @__PURE__ */ u("div", {
2451
2455
  style: { minWidth: 0 },
2452
- children: x.render(p, (t) => ge(t, e))
2456
+ children: x.render(p, (t) => ve(t, e))
2453
2457
  }, e.id ?? e?.data?.slug))
2454
2458
  }) : /* @__PURE__ */ u("div", {
2455
2459
  ref: _,
@@ -2459,7 +2463,7 @@ function Dt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
2459
2463
  ...C(g)
2460
2464
  },
2461
2465
  children: N.map((e) => {
2462
- let t = o ? K(e?.data, o) : null, r = s ? q(K(e?.data, s)) : null, i = l ? K(e?.data, l) : null, a = Array.isArray(i) ? i : null, c = a || i == null ? null : q(i), f = n === "list";
2466
+ let t = o ? G(e?.data, o) : null, r = s ? K(G(e?.data, s)) : null, i = l ? G(e?.data, l) : null, a = Array.isArray(i) ? i : null, c = a || i == null ? null : K(i), f = n === "list";
2463
2467
  return /* @__PURE__ */ d("div", {
2464
2468
  style: {
2465
2469
  display: "flex",
@@ -2506,7 +2510,7 @@ function Dt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
2506
2510
  lineHeight: 1.55,
2507
2511
  opacity: .85
2508
2512
  },
2509
- children: Me(a)
2513
+ children: Pe(a)
2510
2514
  })
2511
2515
  ]
2512
2516
  })]
@@ -2514,8 +2518,8 @@ function Dt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
2514
2518
  })
2515
2519
  });
2516
2520
  }
2517
- function Ot({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, inert: i }) {
2518
- let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} : de(), s = {
2521
+ function At({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, inert: i }) {
2522
+ let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} : pe(), s = {
2519
2523
  height: 34,
2520
2524
  padding: "0 12px",
2521
2525
  borderRadius: 8,
@@ -2563,7 +2567,7 @@ function Ot({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
2563
2567
  name: `f_${e.name}`,
2564
2568
  defaultValue: o[e.name] ?? "",
2565
2569
  style: s,
2566
- ...Q(i),
2570
+ ...Z(i),
2567
2571
  children: [/* @__PURE__ */ u("option", {
2568
2572
  value: "",
2569
2573
  children: e.label || e.name
@@ -2578,7 +2582,7 @@ function Ot({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
2578
2582
  name: `f_${e.name}`,
2579
2583
  defaultValue: o[e.name] ?? "",
2580
2584
  style: s,
2581
- ...Q(i),
2585
+ ...Z(i),
2582
2586
  children: [
2583
2587
  /* @__PURE__ */ u("option", {
2584
2588
  value: "",
@@ -2599,7 +2603,7 @@ function Ot({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
2599
2603
  defaultValue: o[e.name] ?? "",
2600
2604
  placeholder: e.label || e.name,
2601
2605
  style: s,
2602
- ...Q(i)
2606
+ ...Z(i)
2603
2607
  }, e.name)), /* @__PURE__ */ u("button", {
2604
2608
  type: "submit",
2605
2609
  style: {
@@ -2612,12 +2616,12 @@ function Ot({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
2612
2616
  fontWeight: 600,
2613
2617
  cursor: i ? "default" : "pointer"
2614
2618
  },
2615
- ...Q(i),
2619
+ ...Z(i),
2616
2620
  children: t
2617
2621
  })]
2618
2622
  });
2619
2623
  }
2620
- function kt({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
2624
+ function jt({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
2621
2625
  return e.length ? /* @__PURE__ */ u("nav", {
2622
2626
  ref: r,
2623
2627
  "aria-label": "Breadcrumb",
@@ -2667,8 +2671,8 @@ function kt({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
2667
2671
  })
2668
2672
  }) : null;
2669
2673
  }
2670
- function At({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", source: o, pageSize: s = 6, align: l, hideEmpty: f, inert: p, style: m, nodeRef: h }) {
2671
- let { tenant: g, apiUrl: _ } = r(U), v = r(W), [y, b] = c(null), x = o ? Number(v?.[`${o}:total`]) : NaN;
2674
+ function Mt({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", source: o, pageSize: s = 6, align: l, hideEmpty: f, inert: p, style: m, nodeRef: h }) {
2675
+ let { tenant: g, apiUrl: _ } = r(H), v = r(U), [y, b] = c(null), x = o ? Number(v?.[`${o}:total`]) : NaN;
2672
2676
  i(() => {
2673
2677
  if (!o || Number.isFinite(x)) return;
2674
2678
  let e = !0, t = o.startsWith("api:") ? `${_}/data/${encodeURIComponent(o.slice(4))}` : `${_}/dynamic/${encodeURIComponent(o)}?limit=1`;
@@ -2687,7 +2691,7 @@ function At({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", sou
2687
2691
  ]);
2688
2692
  let S = Math.max(1, Number(s) || 6), w = Number.isFinite(x) ? x : y;
2689
2693
  if (o && w === null || o && f && !(w > 0)) return null;
2690
- let T = Math.min(Math.max(o ? Math.ceil(w / S) : Number(e) || 1, 1), 50), E = Math.min(Math.max(o ? G(v) : Number(t) || 1, 1), T), D = (e) => {
2694
+ let T = Math.min(Math.max(o ? Math.ceil(w / S) : Number(e) || 1, 1), 50), E = Math.min(Math.max(o ? W(v) : Number(t) || 1, 1), T), D = (e) => {
2691
2695
  if (o) {
2692
2696
  if (typeof window < "u") {
2693
2697
  let t = new URLSearchParams(window.location.search);
@@ -2752,15 +2756,15 @@ function At({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", sou
2752
2756
  ]
2753
2757
  });
2754
2758
  }
2755
- var jt = "webim.page_mode", Mt = () => {
2759
+ var Nt = "webim.page_mode", Pt = () => {
2756
2760
  if (typeof window > "u") return "auto";
2757
2761
  try {
2758
- let e = window.localStorage.getItem(jt);
2762
+ let e = window.localStorage.getItem(Nt);
2759
2763
  return e === "light" || e === "dark" ? e : "auto";
2760
2764
  } catch {
2761
2765
  return "auto";
2762
2766
  }
2763
- }, Nt = (e) => {
2767
+ }, Ft = (e) => {
2764
2768
  let t = {
2765
2769
  width: 16,
2766
2770
  height: 16,
@@ -2792,13 +2796,13 @@ var jt = "webim.page_mode", Mt = () => {
2792
2796
  rx: "2"
2793
2797
  }), /* @__PURE__ */ u("path", { d: "M8 21h8M12 17v4" })]
2794
2798
  });
2795
- }, Pt = {
2799
+ }, $ = {
2796
2800
  light: "Light theme",
2797
2801
  dark: "Dark theme",
2798
2802
  auto: "Follow the device theme"
2799
2803
  };
2800
- function Ft({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
2801
- let [o, l] = c(a ? "auto" : Mt), d = s(null), f = (e) => {
2804
+ function It({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
2805
+ let [o, l] = c(a ? "auto" : Pt), d = s(null), f = (e) => {
2802
2806
  d.current = e, typeof r == "function" && r(e);
2803
2807
  };
2804
2808
  i(() => {
@@ -2806,7 +2810,7 @@ function Ft({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
2806
2810
  let e = d.current?.closest?.(".webim-page");
2807
2811
  e && (o === "light" || o === "dark" ? e.setAttribute("data-webim-mode", o) : e.removeAttribute("data-webim-mode"));
2808
2812
  try {
2809
- o === "auto" ? window.localStorage.removeItem(jt) : window.localStorage.setItem(jt, o);
2813
+ o === "auto" ? window.localStorage.removeItem(Nt) : window.localStorage.setItem(Nt, o);
2810
2814
  } catch {}
2811
2815
  }, [o, a]);
2812
2816
  let p = t === !1 ? ["light", "dark"] : [
@@ -2841,8 +2845,8 @@ function Ft({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
2841
2845
  },
2842
2846
  children: p.map((e) => /* @__PURE__ */ u("button", {
2843
2847
  type: "button",
2844
- title: Pt[e],
2845
- "aria-label": Pt[e],
2848
+ title: $[e],
2849
+ "aria-label": $[e],
2846
2850
  "aria-pressed": e === m,
2847
2851
  onClick: a ? void 0 : () => l(e),
2848
2852
  style: {
@@ -2853,15 +2857,15 @@ function Ft({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
2853
2857
  background: e === m ? "var(--page-accent, #111827)" : "transparent",
2854
2858
  opacity: e === m ? 1 : .7
2855
2859
  },
2856
- children: Nt(e)
2860
+ children: Ft(e)
2857
2861
  }, e))
2858
2862
  });
2859
2863
  let g = p[(p.indexOf(m) + 1) % p.length];
2860
2864
  return /* @__PURE__ */ u("button", {
2861
2865
  ref: f,
2862
2866
  type: "button",
2863
- title: Pt[m],
2864
- "aria-label": `Theme: ${Pt[m]} — switch to ${Pt[g]}`,
2867
+ title: $[m],
2868
+ "aria-label": `Theme: ${$[m]} — switch to ${$[g]}`,
2865
2869
  onClick: a ? void 0 : () => l(g),
2866
2870
  style: {
2867
2871
  ...h,
@@ -2870,10 +2874,10 @@ function Ft({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
2870
2874
  border: "1px solid rgba(148, 163, 184, 0.4)",
2871
2875
  ...C(n)
2872
2876
  },
2873
- children: Nt(m)
2877
+ children: Ft(m)
2874
2878
  });
2875
2879
  }
2876
- function It(e) {
2880
+ function Lt(e) {
2877
2881
  let t = e?.parentElement;
2878
2882
  for (; t && t !== document.body;) {
2879
2883
  let e = getComputedStyle(t).overflowY;
@@ -2882,7 +2886,7 @@ function It(e) {
2882
2886
  }
2883
2887
  return window;
2884
2888
  }
2885
- var Lt = (e) => e === window ? window.scrollY : e.scrollTop, Rt = {
2889
+ var Rt = (e) => e === window ? window.scrollY : e.scrollTop, zt = {
2886
2890
  "bottom-right": (e) => ({
2887
2891
  right: e,
2888
2892
  bottom: e
@@ -2897,22 +2901,33 @@ var Lt = (e) => e === window ? window.scrollY : e.scrollTop, Rt = {
2897
2901
  transform: "translateX(-50%)"
2898
2902
  })
2899
2903
  };
2900
- function zt({ variant: e, label: t, position: n, offset: r, showAfter: a, smooth: o, bg: s, fg: l, style: f, nodeRef: p, inert: m, frame: h }) {
2901
- let [g, _] = c(!!m), [v, y] = c(null), b = (e) => {
2902
- y(e), typeof p == "function" && p(e);
2904
+ function Bt({ variant: e, label: t, position: n, offset: r, showAfter: a, smooth: o, bg: s, fg: l, style: f, nodeRef: p, inert: m, frame: h, builder: g }) {
2905
+ let [_, v] = c(!!m), [y, b] = c(null), x = (e) => {
2906
+ b(e), typeof p == "function" && p(e);
2903
2907
  };
2904
2908
  i(() => {
2905
- if (m || !v) return;
2906
- let e = It(v), t = Number(a) >= 0 ? Number(a) : 300, n = () => _(Lt(e) > t);
2907
- return n(), e.addEventListener("scroll", n, { passive: !0 }), () => e.removeEventListener("scroll", n);
2909
+ if (m) {
2910
+ v(!0);
2911
+ return;
2912
+ }
2913
+ if (!y) return;
2914
+ let e = Number(a) >= 0 ? Number(a) : 300, t = () => {
2915
+ let t = Lt(y), n = g && !(t === window ? document.documentElement.scrollHeight > window.innerHeight : t.scrollHeight > t.clientHeight);
2916
+ v(n || Rt(t) > e);
2917
+ };
2918
+ return t(), document.addEventListener("scroll", t, {
2919
+ capture: !0,
2920
+ passive: !0
2921
+ }), () => document.removeEventListener("scroll", t, { capture: !0 });
2908
2922
  }, [
2909
2923
  m,
2910
- v,
2911
- a
2924
+ y,
2925
+ a,
2926
+ g
2912
2927
  ]);
2913
- let x = () => {
2928
+ let S = () => {
2914
2929
  if (m) return;
2915
- let e = It(v), t = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, n = o === !1 || t ? "auto" : "smooth";
2930
+ let e = Lt(y), t = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, n = o === !1 || t ? "auto" : "smooth";
2916
2931
  e === window ? window.scrollTo({
2917
2932
  top: 0,
2918
2933
  behavior: n
@@ -2920,53 +2935,53 @@ function zt({ variant: e, label: t, position: n, offset: r, showAfter: a, smooth
2920
2935
  top: 0,
2921
2936
  behavior: n
2922
2937
  });
2923
- }, S = Number(r) >= 0 ? Number(r) : 24, w = e === "pill", T = t || "Top", E = Rt[n] ? n : "bottom-right", D = h ? {
2938
+ }, w = Number(r) >= 0 ? Number(r) : 24, T = e === "pill", E = t || "Top", D = zt[n] ? n : "bottom-right", O = h ? {
2924
2939
  position: "fixed",
2925
2940
  zIndex: 5,
2926
- bottom: (h.bottom ?? 0) + S,
2927
- ...E === "bottom-left" ? { left: (h.left ?? 0) + S } : null,
2928
- ...E === "bottom-right" ? { right: (h.right ?? 0) + S } : null,
2929
- ...E === "bottom-center" ? {
2941
+ bottom: (h.bottom ?? 0) + w,
2942
+ ...D === "bottom-left" ? { left: (h.left ?? 0) + w } : null,
2943
+ ...D === "bottom-right" ? { right: (h.right ?? 0) + w } : null,
2944
+ ...D === "bottom-center" ? {
2930
2945
  left: (h.left ?? 0) + (h.width ?? 0) / 2,
2931
2946
  transform: "translateX(-50%)"
2932
2947
  } : null
2933
2948
  } : {
2934
2949
  position: "fixed",
2935
2950
  zIndex: 2147482e3,
2936
- ...Rt[E](S)
2951
+ ...zt[D](w)
2937
2952
  };
2938
2953
  return /* @__PURE__ */ d("button", {
2939
- ref: b,
2954
+ ref: x,
2940
2955
  type: "button",
2941
- title: T,
2942
- "aria-label": T,
2943
- "aria-hidden": !g,
2944
- tabIndex: g ? 0 : -1,
2945
- onClick: x,
2956
+ title: E,
2957
+ "aria-label": E,
2958
+ "aria-hidden": !_,
2959
+ tabIndex: _ ? 0 : -1,
2960
+ onClick: S,
2946
2961
  style: {
2947
2962
  display: "inline-flex",
2948
2963
  alignItems: "center",
2949
2964
  justifyContent: "center",
2950
- gap: w ? 8 : 0,
2965
+ gap: T ? 8 : 0,
2951
2966
  appearance: "none",
2952
2967
  font: "inherit",
2953
2968
  fontSize: 14,
2954
2969
  fontWeight: 600,
2955
- width: w ? "auto" : 44,
2970
+ width: T ? "auto" : 44,
2956
2971
  height: 44,
2957
- padding: w ? "0 18px" : 0,
2972
+ padding: T ? "0 18px" : 0,
2958
2973
  borderRadius: 999,
2959
2974
  border: "1px solid transparent",
2960
2975
  background: s || "var(--page-accent, #111827)",
2961
2976
  color: l || "var(--page-accent-text, #ffffff)",
2962
2977
  boxShadow: "0 6px 20px rgba(15, 23, 42, 0.25)",
2963
2978
  cursor: m ? "default" : "pointer",
2964
- opacity: +!!g,
2965
- pointerEvents: g ? "auto" : "none",
2979
+ opacity: +!!_,
2980
+ pointerEvents: _ ? "auto" : "none",
2966
2981
  transition: "opacity 160ms ease, transform 160ms ease",
2967
- ...D,
2982
+ ...O,
2968
2983
  ...C(f),
2969
- ...D.transform ? { transform: D.transform } : null
2984
+ ...O.transform ? { transform: O.transform } : null
2970
2985
  },
2971
2986
  children: [/* @__PURE__ */ u("svg", {
2972
2987
  width: "18",
@@ -2981,10 +2996,10 @@ function zt({ variant: e, label: t, position: n, offset: r, showAfter: a, smooth
2981
2996
  strokeLinecap: "round",
2982
2997
  strokeLinejoin: "round"
2983
2998
  })
2984
- }), w ? /* @__PURE__ */ u("span", { children: T }) : null]
2999
+ }), T ? /* @__PURE__ */ u("span", { children: E }) : null]
2985
3000
  });
2986
3001
  }
2987
- var Bt = {
3002
+ var Vt = {
2988
3003
  facebook: {
2989
3004
  label: "Facebook",
2990
3005
  color: "#1877f2",
@@ -3051,8 +3066,8 @@ var Bt = {
3051
3066
  d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"
3052
3067
  }
3053
3068
  };
3054
- function Vt({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, style: o, nodeRef: s, inert: c }) {
3055
- let l = Array.isArray(e) ? e.filter((e) => e && Bt[e.network]) : [];
3069
+ function Ht({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, style: o, nodeRef: s, inert: c }) {
3070
+ let l = Array.isArray(e) ? e.filter((e) => e && Vt[e.network]) : [];
3056
3071
  if (!l.length) return null;
3057
3072
  let d = Math.min(Math.max(Number(r) || 18, 10), 64), f = Math.round(d * 1.9), p = Number.isFinite(Number(i)) ? Number(i) : 10, m = (e) => n === "accent" ? "var(--page-accent, #111827)" : n === "inherit" ? "currentColor" : e.color, h = c ? (e) => e.preventDefault() : void 0;
3058
3073
  return /* @__PURE__ */ u("div", {
@@ -3065,7 +3080,7 @@ function Vt({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
3065
3080
  ...C(o)
3066
3081
  },
3067
3082
  children: l.map((e, r) => {
3068
- let i = Bt[e.network], o = t !== "outline" && t !== "plain", s = o ? n === "accent" ? "var(--page-accent-text, #ffffff)" : n === "inherit" ? "var(--page-bg, #ffffff)" : "#ffffff" : m(i);
3083
+ let i = Vt[e.network], o = t !== "outline" && t !== "plain", s = o ? n === "accent" ? "var(--page-accent-text, #ffffff)" : n === "inherit" ? "var(--page-bg, #ffffff)" : "#ffffff" : m(i);
3069
3084
  return /* @__PURE__ */ u("a", {
3070
3085
  href: e.url || "#",
3071
3086
  onClick: h,
@@ -3099,7 +3114,7 @@ function Vt({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
3099
3114
  })
3100
3115
  });
3101
3116
  }
3102
- function Ht({ steps: t = [], active: n = 1, vertical: r = !1, style: i, nodeRef: a }) {
3117
+ function Ut({ steps: t = [], active: n = 1, vertical: r = !1, style: i, nodeRef: a }) {
3103
3118
  if (!t.length) return null;
3104
3119
  let o = Math.min(Math.max(Number(n) || 1, 1), t.length), s = (e) => ({
3105
3120
  width: 32,
@@ -3177,7 +3192,7 @@ function Ht({ steps: t = [], active: n = 1, vertical: r = !1, style: i, nodeRef:
3177
3192
  })
3178
3193
  });
3179
3194
  }
3180
- var Ut = {
3195
+ var Wt = {
3181
3196
  small: {
3182
3197
  w: 132,
3183
3198
  h: 46,
@@ -3199,10 +3214,10 @@ var Ut = {
3199
3214
  title: 12.5,
3200
3215
  avatar: 46
3201
3216
  }
3202
- }, Wt = (e) => Ut[e] ?? Ut.medium;
3203
- Ut.medium.w, Ut.medium.h;
3204
- function Gt(e, { size: t = "medium", horizontal: n = !1 } = {}) {
3205
- let r = Wt(t), i = n ? r.h : r.w, a = n ? 16 : 20, o = (n ? r.w : r.h) + (n ? 56 : 48), s = Array.isArray(e) ? e.filter((e) => e && e.id) : [], c = new Set(s.map((e) => e.id)), l = /* @__PURE__ */ new Map(), u = [];
3217
+ }, Gt = (e) => Wt[e] ?? Wt.medium;
3218
+ Wt.medium.w, Wt.medium.h;
3219
+ function Kt(e, { size: t = "medium", horizontal: n = !1 } = {}) {
3220
+ let r = Gt(t), i = n ? r.h : r.w, a = n ? 16 : 20, o = (n ? r.w : r.h) + (n ? 56 : 48), s = Array.isArray(e) ? e.filter((e) => e && e.id) : [], c = new Set(s.map((e) => e.id)), l = /* @__PURE__ */ new Map(), u = [];
3206
3221
  for (let e of s) e.parent && c.has(e.parent) && e.parent !== e.id ? (l.has(e.parent) || l.set(e.parent, []), l.get(e.parent).push(e)) : u.push(e);
3207
3222
  let d = /* @__PURE__ */ new Map(), f = (e, t) => {
3208
3223
  if (t.has(e.id)) return 0;
@@ -3254,19 +3269,19 @@ function Gt(e, { size: t = "medium", horizontal: n = !1 } = {}) {
3254
3269
  horizontal: n
3255
3270
  };
3256
3271
  }
3257
- var Kt = (e, t) => {
3272
+ var qt = (e, t) => {
3258
3273
  let n = String(e ?? "");
3259
3274
  return n.length > t ? `${n.slice(0, t - 1)}…` : n;
3260
- }, qt = (e) => {
3275
+ }, Jt = (e) => {
3261
3276
  let t = /^#([0-9a-f]{6}|[0-9a-f]{3})$/i.exec(String(e ?? "").trim());
3262
3277
  if (!t) return "#ffffff";
3263
3278
  let n = t[1];
3264
3279
  n.length === 3 && (n = [...n].map((e) => e + e).join(""));
3265
3280
  let r = parseInt(n, 16);
3266
3281
  return .299 * (r >> 16 & 255) + .587 * (r >> 8 & 255) + .114 * (r & 255) > 150 ? "#111827" : "#ffffff";
3267
- }, Jt = (e) => !!(e?.cv?.trim?.() || e?.photo);
3268
- function Yt(e, t = {}) {
3269
- let n = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.id) : [], r = (e) => Array.isArray(e) ? e[0] : e, i = (e) => e == null ? "" : q(e);
3282
+ }, Yt = (e) => !!(e?.cv?.trim?.() || e?.photo);
3283
+ function Xt(e, t = {}) {
3284
+ let n = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.id) : [], r = (e) => Array.isArray(e) ? e[0] : e, i = (e) => e == null ? "" : K(e);
3270
3285
  return n.map((e) => {
3271
3286
  let n = e.data ?? {}, a = r(n[t.parentField]), o = a && typeof a == "object" ? a.id ?? null : a || null;
3272
3287
  return {
@@ -3280,11 +3295,11 @@ function Yt(e, t = {}) {
3280
3295
  };
3281
3296
  });
3282
3297
  }
3283
- var Xt = {
3298
+ var Zt = {
3284
3299
  size: 36,
3285
3300
  pad: 10
3286
3301
  };
3287
- function Zt({ node: e, onClose: t }) {
3302
+ function Qt({ node: e, onClose: t }) {
3288
3303
  return i(() => {
3289
3304
  let e = (e) => e.key === "Escape" && t();
3290
3305
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
@@ -3405,8 +3420,8 @@ function Zt({ node: e, onClose: t }) {
3405
3420
  })
3406
3421
  });
3407
3422
  }
3408
- function Qt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField: s, parentField: f, cvField: p, hrefField: m, size: h = "medium", horizontal: g = !1, style: _, nodeRef: v, interactive: y = !0 }) {
3409
- let b = a(), [x, S] = c(null), { tenant: w, apiUrl: T } = r(U), E = r(W)?.[t], [D, O] = c(null);
3423
+ function $t({ nodes: e = [], source: t, nameField: n, titleField: o, photoField: s, parentField: f, cvField: p, hrefField: m, size: h = "medium", horizontal: g = !1, style: _, nodeRef: v, interactive: y = !0 }) {
3424
+ let b = a(), [x, S] = c(null), { tenant: w, apiUrl: T } = r(H), E = r(U)?.[t], [D, O] = c(null);
3410
3425
  i(() => {
3411
3426
  if (!t || E) return;
3412
3427
  let e = !0;
@@ -3422,14 +3437,14 @@ function Qt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
3422
3437
  T,
3423
3438
  E
3424
3439
  ]);
3425
- let k = t ? Yt(E ?? D ?? [], {
3440
+ let k = t ? Xt(E ?? D ?? [], {
3426
3441
  nameField: n,
3427
3442
  titleField: o,
3428
3443
  photoField: s,
3429
3444
  parentField: f,
3430
3445
  cvField: p,
3431
3446
  hrefField: m
3432
- }) : e, A = Wt(h), { boxes: j, links: M, width: N, height: P } = Gt(k, {
3447
+ }) : e, A = Gt(h), { boxes: j, links: M, width: N, height: P } = Kt(k, {
3433
3448
  size: h,
3434
3449
  horizontal: g
3435
3450
  });
@@ -3475,7 +3490,7 @@ function Qt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
3475
3490
  stroke: "rgba(148, 163, 184, 0.7)",
3476
3491
  strokeWidth: "1.5"
3477
3492
  }, t)), j.map(({ node: e, x: t, y: n }) => {
3478
- let r = F.has(e.id), i = !!e.color2, a = !!e.color || r || i, o = e.color || (r ? "var(--page-accent, #4f46e5)" : "var(--page-bg, #ffffff)"), s = e.color ? qt(e.color) : r ? "var(--page-accent-text, #ffffff)" : "var(--page-text, #111827)", c = i ? qt(e.color2) : s, f = y && (Jt(e) || e.href), p = () => Jt(e) ? S(e) : window.open(e.href, "_blank", "noreferrer"), m = e.photo ? t + Xt.pad + A.avatar + 8 : t + A.w / 2, h = e.photo ? "start" : "middle", g = e.photo ? Math.floor((A.w - A.avatar - 26) / 7) : Math.floor(A.w / 7.6), _ = A.h / 2, v = [e.name, e.title].map((e) => String(e ?? "").trim()).filter(Boolean);
3493
+ let r = F.has(e.id), i = !!e.color2, a = !!e.color || r || i, o = e.color || (r ? "var(--page-accent, #4f46e5)" : "var(--page-bg, #ffffff)"), s = e.color ? Jt(e.color) : r ? "var(--page-accent-text, #ffffff)" : "var(--page-text, #111827)", c = i ? Jt(e.color2) : s, f = y && (Yt(e) || e.href), p = () => Yt(e) ? S(e) : window.open(e.href, "_blank", "noreferrer"), m = e.photo ? t + Zt.pad + A.avatar + 8 : t + A.w / 2, h = e.photo ? "start" : "middle", g = e.photo ? Math.floor((A.w - A.avatar - 26) / 7) : Math.floor(A.w / 7.6), _ = A.h / 2, v = [e.name, e.title].map((e) => String(e ?? "").trim()).filter(Boolean);
3479
3494
  return /* @__PURE__ */ d("g", {
3480
3495
  onClick: f ? p : void 0,
3481
3496
  style: f ? { cursor: "pointer" } : void 0,
@@ -3539,13 +3554,13 @@ function Qt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
3539
3554
  e.photo && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("clipPath", {
3540
3555
  id: `${b}-${e.id}`,
3541
3556
  children: /* @__PURE__ */ u("circle", {
3542
- cx: t + Xt.pad + A.avatar / 2,
3557
+ cx: t + Zt.pad + A.avatar / 2,
3543
3558
  cy: n + A.h / 2,
3544
3559
  r: A.avatar / 2
3545
3560
  })
3546
3561
  }), /* @__PURE__ */ u("image", {
3547
3562
  href: e.photo,
3548
- x: t + Xt.pad,
3563
+ x: t + Zt.pad,
3549
3564
  y: n + (A.h - A.avatar) / 2,
3550
3565
  width: A.avatar,
3551
3566
  height: A.avatar,
@@ -3559,7 +3574,7 @@ function Qt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
3559
3574
  fontSize: A.title,
3560
3575
  fontWeight: "600",
3561
3576
  fill: s,
3562
- children: Kt(e.title, g + 4)
3577
+ children: qt(e.title, g + 4)
3563
3578
  }), e.name && /* @__PURE__ */ u("text", {
3564
3579
  x: m,
3565
3580
  y: n + _ + _ / 2 + A.name * .35,
@@ -3567,7 +3582,7 @@ function Qt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
3567
3582
  fontSize: A.name,
3568
3583
  fontWeight: "600",
3569
3584
  fill: c,
3570
- children: Kt(e.name, g)
3585
+ children: qt(e.name, g)
3571
3586
  })] }) : /* @__PURE__ */ d(l, { children: [v[0] && /* @__PURE__ */ u("text", {
3572
3587
  x: m,
3573
3588
  y: n + (v[1] ? A.h * .43 : A.h * .57),
@@ -3575,7 +3590,7 @@ function Qt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
3575
3590
  fontSize: A.name,
3576
3591
  fontWeight: "600",
3577
3592
  fill: s,
3578
- children: Kt(v[0], g)
3593
+ children: qt(v[0], g)
3579
3594
  }), v[1] && /* @__PURE__ */ u("text", {
3580
3595
  x: m,
3581
3596
  y: n + A.h * .73,
@@ -3583,19 +3598,19 @@ function Qt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
3583
3598
  fontSize: A.title,
3584
3599
  opacity: "0.7",
3585
3600
  fill: s,
3586
- children: Kt(v[1], g + 4)
3601
+ children: qt(v[1], g + 4)
3587
3602
  })] })
3588
3603
  ]
3589
3604
  }, e.id);
3590
3605
  })]
3591
- }), x && /* @__PURE__ */ u(Zt, {
3606
+ }), x && /* @__PURE__ */ u(Qt, {
3592
3607
  node: x,
3593
3608
  onClose: () => S(null)
3594
3609
  })]
3595
3610
  });
3596
3611
  }
3597
- function $t({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped: o = !0, bordered: s = !1, compact: l = !1, paged: f, emptyText: p, style: m, nodeRef: h }) {
3598
- let { tenant: g, apiUrl: _ } = r(U), v = r(W), y = v?.[n], b = f ? G(v) : 1, [x, S] = c(null);
3612
+ function en({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped: o = !0, bordered: s = !1, compact: l = !1, paged: f, emptyText: p, style: m, nodeRef: h }) {
3613
+ let { tenant: g, apiUrl: _ } = r(H), v = r(U), y = v?.[n], b = f ? W(v) : 1, [x, S] = c(null);
3599
3614
  if (i(() => {
3600
3615
  if (!n || y) return;
3601
3616
  let e = !0, t = Math.max(1, Number(a) || 10), r = f && !n.startsWith("api:") ? `?offset=${(b - 1) * t}&limit=${t}` : "", i = n.startsWith("api:") ? `${_}/data/${encodeURIComponent(n.slice(4))}` : `${_}/dynamic/${encodeURIComponent(n)}${r}`;
@@ -3614,7 +3629,7 @@ function $t({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped:
3614
3629
  b,
3615
3630
  a
3616
3631
  ]), !e.length) return null;
3617
- let w = Math.max(1, Number(a) || 10), T = n ? f ? y || n.startsWith("api:") ? (y ?? x ?? []).slice((b - 1) * w, b * w) : (x ?? []).slice(0, w) : (y ?? x ?? []).slice(0, w) : null, E = T ? T.map((t) => e.map((e) => q(K(t?.data, e.field)))) : t, D = !!n && !(n && !y && x === null) && E.length === 0, O = l ? "6px 10px" : "10px 14px", k = "1px solid rgba(148, 163, 184, 0.35)", A = s ? { border: k } : { borderBottom: k };
3632
+ let w = Math.max(1, Number(a) || 10), T = n ? f ? y || n.startsWith("api:") ? (y ?? x ?? []).slice((b - 1) * w, b * w) : (x ?? []).slice(0, w) : (y ?? x ?? []).slice(0, w) : null, E = T ? T.map((t) => e.map((e) => K(G(t?.data, e.field)))) : t, D = !!n && !(n && !y && x === null) && E.length === 0, O = l ? "6px 10px" : "10px 14px", k = "1px solid rgba(148, 163, 184, 0.35)", A = s ? { border: k } : { borderBottom: k };
3618
3633
  return /* @__PURE__ */ u("div", {
3619
3634
  ref: h,
3620
3635
  style: {
@@ -3660,80 +3675,80 @@ function $t({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped:
3660
3675
  })
3661
3676
  });
3662
3677
  }
3663
- var en = {
3664
- PageRoot: Ce,
3665
- Section: we,
3666
- Container: Te,
3667
- Heading: Ee,
3668
- TextBlock: Le,
3669
- ButtonBlock: Be,
3670
- ImageBlock: Ve,
3671
- Spacer: qe,
3672
- Divider: Je,
3673
- SliderBlock: et,
3674
- CanvasSlider: tt,
3675
- TabsBlock: ot,
3676
- QuickStack: Et,
3677
- CollectionList: Dt,
3678
- CollectionSearch: Ot,
3679
- BreadcrumbsBlock: kt,
3680
- PaginationBlock: At,
3681
- StepperBlock: Ht,
3682
- SocialLinksBlock: Vt,
3683
- ThemeModeBlock: Ft,
3684
- ScrollTopBlock: zt,
3685
- OrgChartBlock: Qt,
3686
- TableBlock: $t,
3687
- MasonryBlock: nt,
3688
- AccordionBlock: st,
3689
- NavbarBlock: at,
3690
- ListBlock: Ie,
3691
- TextSpan: ke,
3692
- QuoteBlock: Fe,
3693
- TextLink: ze,
3694
- RichTextBlock: Ne,
3695
- RichContentBlock: Ne,
3696
- VideoBlock: He,
3697
- YouTubeBlock: We,
3698
- IframeBlock: Ge,
3699
- EmbedBlock: Ke,
3700
- FormBlock: ht,
3701
- FormLabel: yt,
3702
- FormInput: bt,
3703
- FormTextarea: xt,
3704
- FormCheckbox: (e) => /* @__PURE__ */ u(St, {
3678
+ var tn = {
3679
+ PageRoot: Te,
3680
+ Section: Ee,
3681
+ Container: De,
3682
+ Heading: Oe,
3683
+ TextBlock: ze,
3684
+ ButtonBlock: He,
3685
+ ImageBlock: Ue,
3686
+ Spacer: Ye,
3687
+ Divider: Xe,
3688
+ SliderBlock: nt,
3689
+ CanvasSlider: rt,
3690
+ TabsBlock: ct,
3691
+ QuickStack: Ot,
3692
+ CollectionList: kt,
3693
+ CollectionSearch: At,
3694
+ BreadcrumbsBlock: jt,
3695
+ PaginationBlock: Mt,
3696
+ StepperBlock: Ut,
3697
+ SocialLinksBlock: Ht,
3698
+ ThemeModeBlock: It,
3699
+ ScrollTopBlock: Bt,
3700
+ OrgChartBlock: $t,
3701
+ TableBlock: en,
3702
+ MasonryBlock: it,
3703
+ AccordionBlock: lt,
3704
+ NavbarBlock: st,
3705
+ ListBlock: Re,
3706
+ TextSpan: je,
3707
+ QuoteBlock: Le,
3708
+ TextLink: Ve,
3709
+ RichTextBlock: Fe,
3710
+ RichContentBlock: Fe,
3711
+ VideoBlock: We,
3712
+ YouTubeBlock: Ke,
3713
+ IframeBlock: qe,
3714
+ EmbedBlock: Je,
3715
+ FormBlock: _t,
3716
+ FormLabel: xt,
3717
+ FormInput: St,
3718
+ FormTextarea: Ct,
3719
+ FormCheckbox: (e) => /* @__PURE__ */ u(wt, {
3705
3720
  kind: "checkbox",
3706
3721
  ...e
3707
3722
  }),
3708
- FormRadio: (e) => /* @__PURE__ */ u(St, {
3723
+ FormRadio: (e) => /* @__PURE__ */ u(wt, {
3709
3724
  kind: "radio",
3710
3725
  ...e
3711
3726
  }),
3712
- FormSelect: Ct,
3713
- FormFile: wt,
3714
- FormRecaptcha: vt,
3715
- FormSubmit: Tt
3716
- }, tn = {
3727
+ FormSelect: Tt,
3728
+ FormFile: Et,
3729
+ FormRecaptcha: bt,
3730
+ FormSubmit: Dt
3731
+ }, nn = {
3717
3732
  id: "auth",
3718
3733
  label: "Accounts",
3719
3734
  category: "Apps",
3720
3735
  keys: ["SiteLoginForm", "SiteAccountMenu"],
3721
3736
  ssr: "shell",
3722
3737
  settings: ["site.authRedirect"]
3723
- }, nn = t({
3738
+ }, rn = t({
3724
3739
  user: null,
3725
3740
  status: "idle",
3726
3741
  ensure: () => {},
3727
3742
  refresh: () => {},
3728
3743
  signOut: () => {}
3729
- }), rn = () => {
3730
- let e = r(nn);
3744
+ }), an = () => {
3745
+ let e = r(rn);
3731
3746
  return i(() => {
3732
3747
  e.ensure();
3733
3748
  }, [e]), e;
3734
3749
  };
3735
- function an({ children: e, initialUser: t, disabled: i, apiUrl: a, tenant: l }) {
3736
- let d = r(U), f = a || d?.apiUrl || "/api", p = l || d?.tenant || "", [m, h] = c(t ?? null), [g, _] = c(t ? "user" : i ? "guest" : "idle"), v = s(!1), y = n((e, t) => fetch(`${f}${e}`, {
3750
+ function on({ children: e, initialUser: t, disabled: i, apiUrl: a, tenant: l }) {
3751
+ let d = r(H), f = a || d?.apiUrl || "/api", p = l || d?.tenant || "", [m, h] = c(t ?? null), [g, _] = c(t ? "user" : i ? "guest" : "idle"), v = s(!1), y = n((e, t) => fetch(`${f}${e}`, {
3737
3752
  ...t,
3738
3753
  credentials: "include",
3739
3754
  headers: {
@@ -3765,19 +3780,19 @@ function an({ children: e, initialUser: t, disabled: i, apiUrl: a, tenant: l })
3765
3780
  b,
3766
3781
  x
3767
3782
  ]);
3768
- return /* @__PURE__ */ u(nn.Provider, {
3783
+ return /* @__PURE__ */ u(rn.Provider, {
3769
3784
  value: C,
3770
3785
  children: e
3771
3786
  });
3772
3787
  }
3773
- function on({ when: e, children: t }) {
3774
- let { status: n } = rn();
3788
+ function sn({ when: e, children: t }) {
3789
+ let { status: n } = an();
3775
3790
  return !e || e === "always" ? t : n === "idle" || n === "loading" ? null : e === "user" == (n === "user") ? t : null;
3776
3791
  }
3777
3792
  //#endregion
3778
3793
  //#region ../ui/src/components/builder/apps/auth/views.jsx
3779
- function sn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordLabel: i = "Password", nameLabel: a = "Name", submitLabel: o, style: s, nodeRef: l, inert: f, linked: p, show: m }) {
3780
- let { tenant: h, apiUrl: g, settings: _ } = r(U), [v, y] = c("form"), [b, x] = c(""), [S, w] = c(!1), T = e === "register", E = f ? m || "form" : v, D = (e) => typeof e == "string" && e.startsWith("/") && !e.startsWith("//") ? e : "", O = async (e) => {
3794
+ function cn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordLabel: i = "Password", nameLabel: a = "Name", submitLabel: o, style: s, nodeRef: l, inert: f, linked: p, show: m }) {
3795
+ let { tenant: h, apiUrl: g, settings: _ } = r(H), [v, y] = c("form"), [b, x] = c(""), [S, w] = c(!1), T = e === "register", E = f ? m || "form" : v, D = (e) => typeof e == "string" && e.startsWith("/") && !e.startsWith("//") ? e : "", O = async (e) => {
3781
3796
  if (e.preventDefault(), f) return;
3782
3797
  let n = new FormData(e.currentTarget);
3783
3798
  w(!0), x("");
@@ -3825,20 +3840,20 @@ function sn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
3825
3840
  children: [
3826
3841
  T ? /* @__PURE__ */ d("label", {
3827
3842
  style: {
3828
- ...X,
3843
+ ...Y,
3829
3844
  display: "grid",
3830
3845
  gap: 6
3831
3846
  },
3832
3847
  children: [a, /* @__PURE__ */ u("input", {
3833
3848
  name: "name",
3834
3849
  type: "text",
3835
- style: Z,
3836
- ...Q(f)
3850
+ style: X,
3851
+ ...Z(f)
3837
3852
  })]
3838
3853
  }) : null,
3839
3854
  /* @__PURE__ */ d("label", {
3840
3855
  style: {
3841
- ...X,
3856
+ ...Y,
3842
3857
  display: "grid",
3843
3858
  gap: 6
3844
3859
  },
@@ -3846,13 +3861,13 @@ function sn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
3846
3861
  name: "email",
3847
3862
  type: "email",
3848
3863
  required: !f,
3849
- style: Z,
3850
- ...Q(f)
3864
+ style: X,
3865
+ ...Z(f)
3851
3866
  })]
3852
3867
  }),
3853
3868
  /* @__PURE__ */ d("label", {
3854
3869
  style: {
3855
- ...X,
3870
+ ...Y,
3856
3871
  display: "grid",
3857
3872
  gap: 6
3858
3873
  },
@@ -3860,15 +3875,15 @@ function sn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
3860
3875
  name: "password",
3861
3876
  type: "password",
3862
3877
  required: !f,
3863
- style: Z,
3864
- ...Q(f)
3878
+ style: X,
3879
+ ...Z(f)
3865
3880
  })]
3866
3881
  }),
3867
3882
  /* @__PURE__ */ u("button", {
3868
3883
  type: f ? "button" : "submit",
3869
3884
  disabled: S || void 0,
3870
3885
  style: {
3871
- ...J,
3886
+ ...q,
3872
3887
  border: 0,
3873
3888
  padding: "10px 22px",
3874
3889
  borderRadius: 8,
@@ -3900,8 +3915,8 @@ function sn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
3900
3915
  ]
3901
3916
  });
3902
3917
  }
3903
- function cn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
3904
- let { user: c, status: l, signOut: f } = rn(), p = a ? s || "user" : l, m = a ? {
3918
+ function ln({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
3919
+ let { user: c, status: l, signOut: f } = an(), p = a ? s || "user" : l, m = a ? {
3905
3920
  name: "Ada Lovelace",
3906
3921
  email: "ada@example.com"
3907
3922
  } : c;
@@ -3922,7 +3937,7 @@ function cn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
3922
3937
  children: [
3923
3938
  /* @__PURE__ */ d("span", {
3924
3939
  style: {
3925
- ...X,
3940
+ ...Y,
3926
3941
  fontWeight: 600
3927
3942
  },
3928
3943
  children: [
@@ -3933,7 +3948,7 @@ function cn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
3933
3948
  }),
3934
3949
  n && m?.email ? /* @__PURE__ */ u("span", {
3935
3950
  style: {
3936
- ...X,
3951
+ ...Y,
3937
3952
  opacity: .7
3938
3953
  },
3939
3954
  children: m.email
@@ -3942,14 +3957,14 @@ function cn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
3942
3957
  type: "button",
3943
3958
  onClick: a ? void 0 : f,
3944
3959
  style: {
3945
- ...J,
3960
+ ...q,
3946
3961
  border: 0,
3947
3962
  padding: "8px 16px",
3948
3963
  borderRadius: 8,
3949
3964
  fontSize: 14,
3950
3965
  cursor: a ? "default" : "pointer"
3951
3966
  },
3952
- ...Q(a),
3967
+ ...Z(a),
3953
3968
  children: t
3954
3969
  })
3955
3970
  ]
@@ -3966,40 +3981,40 @@ function cn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
3966
3981
  }
3967
3982
  //#endregion
3968
3983
  //#region ../ui/src/components/builder/apps/consent/manifest.js
3969
- var ln = {
3984
+ var un = {
3970
3985
  id: "consent",
3971
3986
  label: "Cookie consent",
3972
3987
  category: "Apps",
3973
3988
  keys: ["CookieConsent"],
3974
3989
  ssr: "shell",
3975
3990
  settings: []
3976
- }, un = "webim.cookie_consent";
3977
- function dn() {
3991
+ }, dn = "webim.cookie_consent";
3992
+ function fn() {
3978
3993
  try {
3979
- let e = window.localStorage.getItem(un), t = e ? JSON.parse(e) : null;
3994
+ let e = window.localStorage.getItem(dn), t = e ? JSON.parse(e) : null;
3980
3995
  return t?.choice === "accepted" || t?.choice === "declined" ? t.choice : "";
3981
3996
  } catch {
3982
3997
  return "";
3983
3998
  }
3984
3999
  }
3985
- function fn(e) {
4000
+ function pn(e) {
3986
4001
  try {
3987
4002
  document.querySelectorAll(".webim-page").forEach((t) => t.setAttribute("data-webim-consent", e));
3988
4003
  } catch {}
3989
4004
  }
3990
- function pn(e) {
4005
+ function mn(e) {
3991
4006
  try {
3992
- window.localStorage.setItem(un, JSON.stringify({
4007
+ window.localStorage.setItem(dn, JSON.stringify({
3993
4008
  choice: e,
3994
4009
  at: (/* @__PURE__ */ new Date()).toISOString()
3995
4010
  }));
3996
4011
  } catch {}
3997
- fn(e);
4012
+ pn(e);
3998
4013
  try {
3999
4014
  window.dispatchEvent(new CustomEvent("webim:consent", { detail: { choice: e } }));
4000
4015
  } catch {}
4001
4016
  }
4002
- var mn = {
4017
+ var hn = {
4003
4018
  bottom: {
4004
4019
  left: 0,
4005
4020
  right: 0,
@@ -4021,21 +4036,21 @@ var mn = {
4021
4036
  maxWidth: 400
4022
4037
  }
4023
4038
  };
4024
- function hn({ message: e, acceptLabel: t, rejectLabel: n, showReject: r, linkLabel: a, linkHref: o, position: s, linked: f, style: p, nodeRef: m, inert: h }) {
4039
+ function gn({ message: e, acceptLabel: t, rejectLabel: n, showReject: r, linkLabel: a, linkHref: o, position: s, linked: f, style: p, nodeRef: m, inert: h }) {
4025
4040
  let [g, _] = c(!!h), [v, y] = c(null), b = (e) => {
4026
4041
  y(e), typeof m == "function" && m(e);
4027
4042
  };
4028
4043
  if (i(() => {
4029
4044
  if (h) return;
4030
- let e = dn();
4045
+ let e = fn();
4031
4046
  if (e) {
4032
4047
  let t = v?.closest?.(".webim-page");
4033
4048
  t && t.setAttribute("data-webim-consent", e);
4034
4049
  } else _(!0);
4035
4050
  }, [h, v]), !g) return null;
4036
4051
  let x = (e) => () => {
4037
- h || (pn(e, v), _(!1));
4038
- }, S = mn[s] ?? mn.bottom, w = {
4052
+ h || (mn(e, v), _(!1));
4053
+ }, S = hn[s] ?? hn.bottom, w = {
4039
4054
  appearance: "none",
4040
4055
  font: "inherit",
4041
4056
  fontSize: 14,
@@ -4115,7 +4130,7 @@ function hn({ message: e, acceptLabel: t, rejectLabel: n, showReject: r, linkLab
4115
4130
  }
4116
4131
  //#endregion
4117
4132
  //#region ../ui/src/components/builder/apps/language/manifest.js
4118
- var gn = {
4133
+ var _n = {
4119
4134
  id: "language",
4120
4135
  label: "Language",
4121
4136
  category: "Apps",
@@ -4125,21 +4140,21 @@ var gn = {
4125
4140
  };
4126
4141
  //#endregion
4127
4142
  //#region ../ui/src/components/builder/apps/language/views.jsx
4128
- function _n(e) {
4143
+ function vn(e) {
4129
4144
  let t = e?.locales, n = [typeof t?.default == "string" && t.default.trim() ? t.default.trim() : "", ...Array.isArray(t?.enabled) ? t.enabled : []].filter((e) => typeof e == "string" && e.trim());
4130
4145
  return [...new Set(n.map((e) => e.trim()))];
4131
4146
  }
4132
- var vn = (e) => e && e.charAt(0).toUpperCase() + e.slice(1);
4133
- function yn(e, t) {
4147
+ var yn = (e) => e && e.charAt(0).toUpperCase() + e.slice(1);
4148
+ function bn(e, t) {
4134
4149
  let n = String(e ?? "").toUpperCase();
4135
4150
  if (t === "code") return n;
4136
4151
  let r = "";
4137
4152
  try {
4138
- r = vn(new Intl.DisplayNames([e], { type: "language" }).of(e) ?? "");
4153
+ r = yn(new Intl.DisplayNames([e], { type: "language" }).of(e) ?? "");
4139
4154
  } catch {}
4140
4155
  return !r || r.toUpperCase() === n ? n : t === "both" ? `${n} — ${r}` : r;
4141
4156
  }
4142
- function bn(e, t) {
4157
+ function xn(e, t) {
4143
4158
  let n = t ? "" : `?locale=${encodeURIComponent(e)}`;
4144
4159
  if (typeof window > "u") return n || "?";
4145
4160
  try {
@@ -4149,8 +4164,8 @@ function bn(e, t) {
4149
4164
  return n || "/";
4150
4165
  }
4151
4166
  }
4152
- function xn({ variant: e, display: t, separator: n, label: i, style: a, nodeRef: o, inert: s }) {
4153
- let c = r(U), l = _n(c?.settings), f = l[0] ?? "", p = l.includes(c?.locale) ? c.locale : f, m = {
4167
+ function Sn({ variant: e, display: t, separator: n, label: i, style: a, nodeRef: o, inert: s }) {
4168
+ let c = r(H), l = vn(c?.settings), f = l[0] ?? "", p = l.includes(c?.locale) ? c.locale : f, m = {
4154
4169
  display: "inline-flex",
4155
4170
  alignItems: "center",
4156
4171
  gap: 8,
@@ -4185,7 +4200,7 @@ function xn({ variant: e, display: t, separator: n, label: i, style: a, nodeRef:
4185
4200
  style: { opacity: .4 },
4186
4201
  children: n ?? "·"
4187
4202
  }), /* @__PURE__ */ u("a", {
4188
- href: bn(e, e === f),
4203
+ href: xn(e, e === f),
4189
4204
  hrefLang: e,
4190
4205
  "aria-current": e === p ? "true" : void 0,
4191
4206
  onClick: s ? (e) => e.preventDefault() : void 0,
@@ -4195,7 +4210,7 @@ function xn({ variant: e, display: t, separator: n, label: i, style: a, nodeRef:
4195
4210
  textDecoration: "none",
4196
4211
  cursor: s ? "default" : "pointer"
4197
4212
  },
4198
- children: yn(e, t)
4213
+ children: bn(e, t)
4199
4214
  })]
4200
4215
  }, e))]
4201
4216
  }) : /* @__PURE__ */ d("div", {
@@ -4206,7 +4221,7 @@ function xn({ variant: e, display: t, separator: n, label: i, style: a, nodeRef:
4206
4221
  value: p,
4207
4222
  onChange: s ? void 0 : (e) => {
4208
4223
  let t = e.target.value;
4209
- window.location.assign(bn(t, t === f));
4224
+ window.location.assign(xn(t, t === f));
4210
4225
  },
4211
4226
  onKeyDown: s ? (e) => e.preventDefault() : void 0,
4212
4227
  style: {
@@ -4220,55 +4235,55 @@ function xn({ variant: e, display: t, separator: n, label: i, style: a, nodeRef:
4220
4235
  },
4221
4236
  children: l.map((e) => /* @__PURE__ */ u("option", {
4222
4237
  value: e,
4223
- children: yn(e, t)
4238
+ children: bn(e, t)
4224
4239
  }, e))
4225
4240
  })]
4226
4241
  });
4227
4242
  }
4228
4243
  //#endregion
4229
4244
  //#region ../ui/src/components/builder/apps/index.js
4230
- var Sn = [
4231
- tn,
4232
- gn,
4233
- ln
4234
- ], Cn = {
4235
- SiteLoginForm: sn,
4236
- SiteAccountMenu: cn,
4237
- SiteLanguagePicker: xn,
4238
- CookieConsent: hn
4245
+ var Cn = [
4246
+ nn,
4247
+ _n,
4248
+ un
4249
+ ], wn = {
4250
+ SiteLoginForm: cn,
4251
+ SiteAccountMenu: ln,
4252
+ SiteLanguagePicker: Sn,
4253
+ CookieConsent: gn
4239
4254
  };
4240
- new Set(Sn.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
4255
+ new Set(Cn.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
4241
4256
  //#endregion
4242
4257
  //#region ../ui/src/components/builder/plugins/runtime.js
4243
- var wn = /* @__PURE__ */ new Map();
4244
- function Tn(e) {
4245
- if (wn.has(e)) return wn.get(e);
4258
+ var Tn = /* @__PURE__ */ new Map();
4259
+ function En(e) {
4260
+ if (Tn.has(e)) return Tn.get(e);
4246
4261
  let t = URL.createObjectURL(new Blob([e], { type: "text/javascript" })), n = import(
4247
4262
  /* @vite-ignore */
4248
4263
  /* webpackIgnore: true */
4249
4264
  t
4250
4265
  ).finally(() => URL.revokeObjectURL(t));
4251
- return wn.set(e, n), n;
4266
+ return Tn.set(e, n), n;
4252
4267
  }
4253
- function En(e) {
4268
+ function Dn(e) {
4254
4269
  let t = e && typeof e == "object" ? e.builder_plugins : null, n = t && typeof t == "object" ? t.plugins : null;
4255
4270
  return n && typeof n == "object" ? n : {};
4256
4271
  }
4257
4272
  //#endregion
4258
4273
  //#region ../ui/src/components/builder/plugins/view.jsx
4259
- async function Dn(e, t) {
4260
- let n = await Tn(e);
4274
+ async function On(e, t) {
4275
+ let n = await En(e);
4261
4276
  return (Array.isArray(n?.default?.blocks) ? n.default.blocks : []).find((e) => e?.id === t && typeof e.mount == "function") ?? null;
4262
4277
  }
4263
- var On = {
4278
+ var kn = {
4264
4279
  padding: "10px 12px",
4265
4280
  border: "1px dashed rgba(148, 163, 184, 0.5)",
4266
4281
  borderRadius: 8,
4267
4282
  fontSize: 12,
4268
4283
  opacity: .6
4269
4284
  };
4270
- function kn({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
4271
- let c = r(U), l = En(c?.settings)[e], f = s(null), p = s(null), m = {
4285
+ function An({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
4286
+ let c = r(H), l = Dn(c?.settings)[e], f = s(null), p = s(null), m = {
4272
4287
  tenant: c?.tenant ?? "",
4273
4288
  apiUrl: c?.apiUrl ?? "/api",
4274
4289
  locale: c?.locale ?? "",
@@ -4280,7 +4295,7 @@ function kn({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
4280
4295
  let e = f.current;
4281
4296
  if (!l?.code || !e) return;
4282
4297
  let n = !0;
4283
- return Dn(l.code, t).then((e) => {
4298
+ return On(l.code, t).then((e) => {
4284
4299
  if (!(!n || !e || !f.current)) {
4285
4300
  p.current = e;
4286
4301
  try {
@@ -4310,7 +4325,7 @@ function kn({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
4310
4325
  }) : /* @__PURE__ */ d("div", {
4311
4326
  ref: o,
4312
4327
  style: {
4313
- ...On,
4328
+ ...kn,
4314
4329
  ...C(a)
4315
4330
  },
4316
4331
  children: [
@@ -4322,12 +4337,12 @@ function kn({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
4322
4337
  }
4323
4338
  //#endregion
4324
4339
  //#region ../ui/src/components/builder/render.jsx
4325
- var An = {
4326
- ...en,
4327
- ...Cn,
4328
- PluginBlock: kn
4340
+ var jn = {
4341
+ ...tn,
4342
+ ...wn,
4343
+ PluginBlock: An
4329
4344
  };
4330
- function jn(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
4345
+ function Mn(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
4331
4346
  let o = n[t];
4332
4347
  if (!o || o.hidden) return null;
4333
4348
  let s = o.type?.resolvedName, c = a?.mapProps ? a.mapProps(o.props ?? {}, s) : o.props ?? {};
@@ -4335,29 +4350,29 @@ function jn(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
4335
4350
  let n = o.props?.componentId, s = r?.[n];
4336
4351
  if (!s?.template || i.has(n)) return null;
4337
4352
  let c = new Set(i).add(n);
4338
- return /* @__PURE__ */ u(e, { children: jn(s.template.rootId, s.template.nodes, r, c, a) }, t);
4353
+ return /* @__PURE__ */ u(e, { children: Mn(s.template.rootId, s.template.nodes, r, c, a) }, t);
4339
4354
  }
4340
- let l = An[s];
4355
+ let l = jn[s];
4341
4356
  if (!l) return null;
4342
- let d = (o.nodes ?? []).map((e) => jn(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, jn(t, n, r, i)])) : void 0, m = /* @__PURE__ */ u(l, {
4357
+ let d = (o.nodes ?? []).map((e) => Mn(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, Mn(t, n, r, i)])) : void 0, m = /* @__PURE__ */ u(l, {
4343
4358
  ...c,
4344
4359
  ...s === "CollectionList" ? { templateId: o.linkedNodes?.card } : null,
4345
4360
  linked: p,
4346
4361
  nodeRef: (e) => {
4347
- e && (e.setAttribute("data-wb", t), D(e, c));
4362
+ e && (e.setAttribute("data-wb", t), O(e, c));
4348
4363
  },
4349
4364
  children: d.length ? d : void 0
4350
4365
  }, t);
4351
- return c.when && c.when !== "always" ? /* @__PURE__ */ u(on, {
4366
+ return c.when && c.when !== "always" ? /* @__PURE__ */ u(sn, {
4352
4367
  when: c.when,
4353
4368
  children: m
4354
4369
  }, t) : m;
4355
4370
  }
4356
4371
  //#endregion
4357
4372
  //#region ../ui/src/components/builder/PageRenderer.jsx
4358
- var Mn = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), Nn = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(V(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
4373
+ var Nn = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), Pn = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(V(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
4359
4374
  .webim-page[data-webim-mode="dark"] { ${Object.entries(V(e.dark)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }`;
4360
- function Pn({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, custom: s, tenant: c, apiUrl: l, datasets: f, locale: p, direction: m, settings: h, siteUser: _ }) {
4375
+ function Fn({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, custom: s, tenant: c, apiUrl: l, datasets: f, locale: p, direction: m, settings: h, siteUser: _ }) {
4361
4376
  let v = s?.js?.trim();
4362
4377
  if (i(() => {
4363
4378
  if (!v) return;
@@ -4366,40 +4381,40 @@ function Pn({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
4366
4381
  }, [v]), !e?.ROOT) return null;
4367
4382
  let b = {
4368
4383
  lang: p || void 0,
4369
- dir: ue(m, p)
4384
+ dir: fe(m, p)
4370
4385
  }, x = ".webim-page, .webim-page *, .webim-page *::before, .webim-page *::after { box-sizing: border-box; }", S = {
4371
4386
  minHeight: "100%",
4372
4387
  display: "flex",
4373
4388
  flexDirection: "column"
4374
- }, C = jn("ROOT", e, n), w = o(() => ({ render: (t, r) => jn(t, e, n, void 0, { mapProps: r }) }), [e, n]), T = F(e, n), E = P(e, n), D = s?.css?.trim(), O = B(t), k = [O.font, O.headingFont].filter((e) => typeof e == "string" && e.trim() && e !== "inherit" && !z[e]), A = [.../* @__PURE__ */ new Set([...y(e, n), ...k])].map((e) => /* @__PURE__ */ u("link", {
4389
+ }, C = Mn("ROOT", e, n), w = o(() => ({ render: (t, r) => Mn(t, e, n, void 0, { mapProps: r }) }), [e, n]), T = ee(e, n), E = F(e, n), D = s?.css?.trim(), O = B(t), k = [O.font, O.headingFont].filter((e) => typeof e == "string" && e.trim() && e !== "inherit" && !z[e]), A = [.../* @__PURE__ */ new Set([...y(e, n), ...k])].map((e) => /* @__PURE__ */ u("link", {
4375
4390
  rel: "stylesheet",
4376
4391
  precedence: "default",
4377
4392
  href: g(e)
4378
- }, e)), j = Nn(O);
4379
- return r === "auto" ? /* @__PURE__ */ u(U.Provider, {
4393
+ }, e)), j = Pn(O);
4394
+ return r === "auto" ? /* @__PURE__ */ u(H.Provider, {
4380
4395
  value: {
4381
4396
  tenant: c || "",
4382
4397
  apiUrl: l || "/api",
4383
4398
  locale: p || "",
4384
4399
  settings: h ?? null
4385
4400
  },
4386
- children: /* @__PURE__ */ u(an, {
4401
+ children: /* @__PURE__ */ u(on, {
4387
4402
  initialUser: _,
4388
- children: /* @__PURE__ */ u(W.Provider, {
4403
+ children: /* @__PURE__ */ u(U.Provider, {
4389
4404
  value: f ?? null,
4390
- children: /* @__PURE__ */ u(pe.Provider, {
4405
+ children: /* @__PURE__ */ u(he.Provider, {
4391
4406
  value: w,
4392
4407
  children: /* @__PURE__ */ d("div", {
4393
4408
  ...b,
4394
4409
  className: "webim-page",
4395
4410
  style: {
4396
4411
  ...S,
4397
- ...ne(t),
4412
+ ...re(t),
4398
4413
  ...a
4399
4414
  },
4400
4415
  children: [
4401
- /* @__PURE__ */ u("style", { children: `.webim-page { ${Mn(V(O.light))} }
4402
- @media (prefers-color-scheme: dark) { .webim-page { ${Mn(V(O.dark))} } }` }),
4416
+ /* @__PURE__ */ u("style", { children: `.webim-page { ${Nn(V(O.light))} }
4417
+ @media (prefers-color-scheme: dark) { .webim-page { ${Nn(V(O.dark))} } }` }),
4403
4418
  /* @__PURE__ */ u("style", { children: j }),
4404
4419
  A,
4405
4420
  /* @__PURE__ */ u("style", { children: x }),
@@ -4412,25 +4427,25 @@ function Pn({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
4412
4427
  })
4413
4428
  })
4414
4429
  })
4415
- }) : /* @__PURE__ */ u(U.Provider, {
4430
+ }) : /* @__PURE__ */ u(H.Provider, {
4416
4431
  value: {
4417
4432
  tenant: c || "",
4418
4433
  apiUrl: l || "/api",
4419
4434
  locale: p || "",
4420
4435
  settings: h ?? null
4421
4436
  },
4422
- children: /* @__PURE__ */ u(an, {
4437
+ children: /* @__PURE__ */ u(on, {
4423
4438
  initialUser: _,
4424
- children: /* @__PURE__ */ u(W.Provider, {
4439
+ children: /* @__PURE__ */ u(U.Provider, {
4425
4440
  value: f ?? null,
4426
- children: /* @__PURE__ */ u(pe.Provider, {
4441
+ children: /* @__PURE__ */ u(he.Provider, {
4427
4442
  value: w,
4428
4443
  children: /* @__PURE__ */ d("div", {
4429
4444
  ...b,
4430
4445
  className: "webim-page",
4431
4446
  style: {
4432
4447
  ...S,
4433
- ...re(t, r),
4448
+ ...ie(t, r),
4434
4449
  ...a
4435
4450
  },
4436
4451
  children: [
@@ -4450,8 +4465,8 @@ function Pn({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
4450
4465
  }
4451
4466
  //#endregion
4452
4467
  //#region src/WebimContent.jsx
4453
- function Fn({ bundle: e, mode: t = "auto", style: n }) {
4454
- return e?.blocks?.ROOT ? /* @__PURE__ */ u(Pn, {
4468
+ function In({ bundle: e, mode: t = "auto", style: n }) {
4469
+ return e?.blocks?.ROOT ? /* @__PURE__ */ u(Fn, {
4455
4470
  blocks: e.blocks,
4456
4471
  theme: e.theme,
4457
4472
  components: e.components,
@@ -4462,13 +4477,13 @@ function Fn({ bundle: e, mode: t = "auto", style: n }) {
4462
4477
  locale: e.locale,
4463
4478
  direction: e.direction,
4464
4479
  settings: e.settings,
4465
- mode: ae(t, e.scheme),
4480
+ mode: oe(t, e.scheme),
4466
4481
  style: n
4467
4482
  }) : null;
4468
4483
  }
4469
4484
  //#endregion
4470
4485
  //#region src/WebimPage.jsx
4471
- function In({ apiUrl: e, tenant: t, slug: n, locale: r, preview: a, token: o, mode: l = "auto", style: d, fallback: f = null, errorFallback: p = null, onLoad: m, onError: h }) {
4486
+ function Ln({ apiUrl: e, tenant: t, slug: n, locale: r, preview: a, token: o, mode: l = "auto", style: d, fallback: f = null, errorFallback: p = null, onLoad: m, onError: h }) {
4472
4487
  let [g, _] = c({ status: "loading" }), v = s({
4473
4488
  onLoad: m,
4474
4489
  onError: h
@@ -4478,7 +4493,7 @@ function In({ apiUrl: e, tenant: t, slug: n, locale: r, preview: a, token: o, mo
4478
4493
  onError: h
4479
4494
  }, i(() => {
4480
4495
  let i = !0;
4481
- return _({ status: "loading" }), se({
4496
+ return _({ status: "loading" }), le({
4482
4497
  apiUrl: e,
4483
4498
  tenant: t,
4484
4499
  slug: n,
@@ -4505,11 +4520,11 @@ function In({ apiUrl: e, tenant: t, slug: n, locale: r, preview: a, token: o, mo
4505
4520
  r,
4506
4521
  a,
4507
4522
  o
4508
- ]), g.status === "loading" ? f : g.status === "error" ? typeof p == "function" ? p(g.error) : p : /* @__PURE__ */ u(Fn, {
4523
+ ]), g.status === "loading" ? f : g.status === "error" ? typeof p == "function" ? p(g.error) : p : /* @__PURE__ */ u(In, {
4509
4524
  bundle: g.bundle,
4510
4525
  mode: l,
4511
4526
  style: d
4512
4527
  });
4513
4528
  }
4514
4529
  //#endregion
4515
- export { Pn as PageRenderer, Fn as WebimContent, In as WebimPage, se as fetchPage, Me as renderRichContent, ie as resolveTheme };
4530
+ export { Fn as PageRenderer, In as WebimContent, Ln as WebimPage, le as fetchPage, Pe as renderRichContent, ae as resolveTheme };