webim-adapter 0.20.0 → 0.21.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.
@@ -58,26 +58,26 @@ function h(e) {
58
58
  delete t.textStrokeWidth, delete t.textStrokeColor, (ae !== void 0 || oe !== void 0) && (t.WebkitTextStroke = `${p(ae ?? 1)} ${oe || "currentColor"}`);
59
59
  let { clipText: se } = t;
60
60
  delete t.clipText, se && (t.WebkitBackgroundClip = "text", t.backgroundClip = "text", t.WebkitTextFillColor = "transparent");
61
- let { transitions: ce, transitionDuration: B, transitionEasing: V, transitionProperty: le } = t, H = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}ms` : e;
61
+ let { transitions: ce, transitionDuration: B, transitionEasing: V, transitionProperty: le } = t, ue = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}ms` : e;
62
62
  delete t.transitions, delete t.transitionDuration, delete t.transitionEasing, delete t.transitionProperty;
63
- let U = (Array.isArray(ce) ? ce : []).filter((e) => e && e.on !== !1).map((e) => `${e.property || "all"} ${H(e.duration ?? 200)} ${e.easing || "ease"}`);
64
- if (B !== void 0 && U.push(`${le || "all"} ${H(B)} ${V || "ease"}`), U.length && (t.transition = U.join(", ")), t.textDecoration !== void 0 && (t.textDecorationLine = t.textDecoration, delete t.textDecoration), t.backgroundImage && !String(t.backgroundImage).includes("(") && (t.backgroundImage = `url("${t.backgroundImage}")`), n) {
63
+ let de = (Array.isArray(ce) ? ce : []).filter((e) => e && e.on !== !1).map((e) => `${e.property || "all"} ${ue(e.duration ?? 200)} ${e.easing || "ease"}`);
64
+ if (B !== void 0 && de.push(`${le || "all"} ${ue(B)} ${V || "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) {
65
65
  let e = `${i || "rgba(0,0,0,0.5)"}, ${a || "transparent"}`, o = n === "radial" ? `radial-gradient(circle, ${e})` : `linear-gradient(${r ?? 180}deg, ${e})`;
66
66
  t.backgroundImage = t.backgroundImage ? `${o}, ${t.backgroundImage}` : o;
67
67
  }
68
68
  delete t.backgroundVideo;
69
- let { overlayColor: W, overlayOpacity: ue } = t;
70
- if (delete t.overlayColor, delete t.overlayOpacity, W) {
71
- let e = `color-mix(in srgb, ${W} ${ue ?? 50}%, transparent)`, n = `linear-gradient(${e}, ${e})`;
69
+ let { overlayColor: H, overlayOpacity: fe } = t;
70
+ if (delete t.overlayColor, delete t.overlayOpacity, H) {
71
+ let e = `color-mix(in srgb, ${H} ${fe ?? 50}%, transparent)`, n = `linear-gradient(${e}, ${e})`;
72
72
  t.backgroundImage = t.backgroundImage ? `${n}, ${t.backgroundImage}` : n;
73
73
  }
74
74
  t.backgroundImage && (t.backgroundSize ??= "cover", t.backgroundPosition ??= "center", t.backgroundRepeat ??= "no-repeat");
75
- let { backgroundLayers: G } = t;
75
+ let { backgroundLayers: U } = t;
76
76
  delete t.backgroundLayers;
77
- let de = (Array.isArray(G) ? G : []).filter((e) => e && e.on !== !1);
78
- if (de.length) {
77
+ let pe = (Array.isArray(U) ? U : []).filter((e) => e && e.on !== !1);
78
+ if (pe.length) {
79
79
  let e = [], n = [], r = [], i = [], a = [];
80
- 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");
80
+ for (let t of pe) 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");
81
81
  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");
82
82
  else {
83
83
  if (!t.src) continue;
@@ -492,11 +492,23 @@ var oe = /* @__PURE__ */ new Set([
492
492
  if (typeof window > "u") return 1;
493
493
  let n = Number(new URLSearchParams(window.location.search).get("page"));
494
494
  return Number.isFinite(n) && n >= 1 ? Math.floor(n) : 1;
495
- }, H = t(null), U = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
496
- function W(e, t) {
495
+ }, ue = () => {
496
+ if (typeof window > "u") return {};
497
+ let e = {};
498
+ return new URLSearchParams(window.location.search).forEach((t, n) => {
499
+ n.startsWith("f_") && n.length > 2 && t !== "" && (e[n.slice(2)] = t);
500
+ }), e;
501
+ }, de = (e) => {
502
+ let t = {
503
+ ...e && typeof e == "object" && !Array.isArray(e) ? e : {},
504
+ ...ue()
505
+ };
506
+ return Object.fromEntries(Object.entries(t).filter(([, e]) => typeof e == "string" && e.trim() !== ""));
507
+ }, H = t(null), fe = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
508
+ function U(e, t) {
497
509
  if (t) return t.includes(".") ? t.split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e) : e?.[t];
498
510
  }
499
- var ue = (e) => {
511
+ var pe = (e) => {
500
512
  let t = [];
501
513
  for (let [n, r] of Object.entries(e ?? {})) {
502
514
  if (!/^[\w-]+$/.test(n)) continue;
@@ -506,36 +518,36 @@ var ue = (e) => {
506
518
  }
507
519
  return t;
508
520
  };
509
- function G(e) {
510
- 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 ?? "") : 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(" ") : "";
521
+ function W(e) {
522
+ 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(" ") : "";
511
523
  }
512
- function de(e, t) {
513
- let n = t?.data ?? {}, r = ue(n);
524
+ function me(e, t) {
525
+ let n = t?.data ?? {}, r = pe(n);
514
526
  if (!r.length) return e;
515
- let i = RegExp(`:(${r.map(U).sort((e, t) => t.length - e.length).join("|")})`, "g"), a = (e) => typeof e == "string" ? e.replace(i, (e, t) => G(W(n, t))) : Array.isArray(e) ? e.map(a) : e && typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, a(t)])) : e;
527
+ let i = RegExp(`:(${r.map(fe).sort((e, t) => t.length - e.length).join("|")})`, "g"), a = (e) => typeof e == "string" ? e.replace(i, (e, t) => W(U(n, t))) : Array.isArray(e) ? e.map(a) : e && typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, a(t)])) : e;
516
528
  return a(e);
517
529
  }
518
- var fe = {
530
+ var he = {
519
531
  margin: 0,
520
532
  fontWeight: 700,
521
533
  lineHeight: 1.2,
522
534
  fontFamily: "var(--page-heading-font, inherit)"
523
- }, pe = { margin: 0 }, K = {
535
+ }, ge = { margin: 0 }, G = {
524
536
  display: "inline-block",
525
537
  textDecoration: "none",
526
538
  cursor: "pointer",
527
539
  backgroundColor: "var(--page-accent, #111827)",
528
540
  color: "var(--page-accent-text, #ffffff)"
529
- }, me = {
541
+ }, _e = {
530
542
  flexGrow: 1,
531
543
  display: "flex",
532
544
  flexDirection: "column",
533
545
  position: "relative"
534
- }, he = {
546
+ }, ve = {
535
547
  display: "flex",
536
548
  flexDirection: "column"
537
549
  };
538
- function ge({ style: e }) {
550
+ function ye({ style: e }) {
539
551
  let t = e?.backgroundVideo;
540
552
  if (!t) return null;
541
553
  let n = {
@@ -561,7 +573,7 @@ function ge({ style: e }) {
561
573
  background: r
562
574
  } })] });
563
575
  }
564
- var _e = (e, t) => e?.backgroundVideo ? {
576
+ var be = (e, t) => e?.backgroundVideo ? {
565
577
  position: "relative",
566
578
  ...t,
567
579
  ...h(e)
@@ -569,24 +581,24 @@ var _e = (e, t) => e?.backgroundVideo ? {
569
581
  ...t,
570
582
  ...h(e)
571
583
  };
572
- function ve({ style: e, nodeRef: t, children: n }) {
584
+ function xe({ style: e, nodeRef: t, children: n }) {
573
585
  return /* @__PURE__ */ d("div", {
574
586
  ref: t,
575
587
  style: {
576
- ...me,
588
+ ..._e,
577
589
  ...h(e)
578
590
  },
579
- children: [/* @__PURE__ */ u(ge, { style: e }), n]
591
+ children: [/* @__PURE__ */ u(ye, { style: e }), n]
580
592
  });
581
593
  }
582
- function ye({ style: e, nodeRef: t, children: n }) {
594
+ function Se({ style: e, nodeRef: t, children: n }) {
583
595
  return /* @__PURE__ */ d("section", {
584
596
  ref: t,
585
- style: _e(e, he),
586
- children: [/* @__PURE__ */ u(ge, { style: e }), n]
597
+ style: be(e, ve),
598
+ children: [/* @__PURE__ */ u(ye, { style: e }), n]
587
599
  });
588
600
  }
589
- function be({ style: e, freeLayout: t, nodeRef: n, children: r }) {
601
+ function Ce({ style: e, freeLayout: t, nodeRef: n, children: r }) {
590
602
  let i = t ? {
591
603
  position: "relative",
592
604
  minHeight: 240
@@ -595,32 +607,32 @@ function be({ style: e, freeLayout: t, nodeRef: n, children: r }) {
595
607
  ref: n,
596
608
  style: i ? {
597
609
  ...i,
598
- ..._e(e)
599
- } : _e(e),
600
- children: [/* @__PURE__ */ u(ge, { style: e }), r]
610
+ ...be(e)
611
+ } : be(e),
612
+ children: [/* @__PURE__ */ u(ye, { style: e }), r]
601
613
  });
602
614
  }
603
- function xe({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
615
+ function we({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
604
616
  return /* @__PURE__ */ u(n, {
605
617
  ref: a,
606
618
  style: {
607
- ...fe,
619
+ ...he,
608
620
  ...h(r)
609
621
  },
610
- children: q(t, e, i)
622
+ children: K(t, e, i)
611
623
  });
612
624
  }
613
- var Se = {
625
+ var Te = {
614
626
  fontFamily: j.mono.value,
615
627
  background: "rgba(148, 163, 184, 0.18)",
616
628
  padding: "1px 5px",
617
629
  borderRadius: 4,
618
630
  fontSize: "0.9em"
619
631
  };
620
- function Ce(e, t = [], n, r) {
632
+ function Ee(e, t = [], n, r) {
621
633
  let i = e;
622
634
  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", {
623
- style: Se,
635
+ style: Te,
624
636
  children: i
625
637
  })), 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", {
626
638
  href: n,
@@ -630,13 +642,13 @@ function Ce(e, t = [], n, r) {
630
642
  children: i
631
643
  })), i;
632
644
  }
633
- function q(t, n, r) {
645
+ function K(t, n, r) {
634
646
  return t?.length ? t.map((t, n) => {
635
647
  if (t.slot) return /* @__PURE__ */ u(e, { children: r?.[t.slot] ?? null }, n);
636
- if (t.parts) return /* @__PURE__ */ u(e, { children: q(t.parts, "", r) }, n);
648
+ if (t.parts) return /* @__PURE__ */ u(e, { children: K(t.parts, "", r) }, n);
637
649
  let i = t.text;
638
650
  return t.sup ? i = /* @__PURE__ */ u("sup", { children: i }) : t.sub && (i = /* @__PURE__ */ u("sub", { children: i })), t.code && (i = /* @__PURE__ */ u("code", {
639
- style: Se,
651
+ style: Te,
640
652
  children: i
641
653
  })), 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", {
642
654
  style: {
@@ -653,13 +665,13 @@ function q(t, n, r) {
653
665
  })), /* @__PURE__ */ u(e, { children: i }, n);
654
666
  }) : n;
655
667
  }
656
- function we({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
668
+ function De({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
657
669
  return /* @__PURE__ */ u("span", {
658
670
  style: h(a),
659
- children: e?.length ? q(e, t) : Ce(t, n, r, i)
671
+ children: e?.length ? K(e, t) : Ee(t, n, r, i)
660
672
  });
661
673
  }
662
- var Te = {
674
+ var Oe = {
663
675
  h1: 40,
664
676
  h2: 32,
665
677
  h3: 26,
@@ -667,7 +679,7 @@ var Te = {
667
679
  h5: 19,
668
680
  h6: 16
669
681
  };
670
- function Ee({ align: e = "center", width: t, wrap: n } = {}) {
682
+ function ke({ align: e = "center", width: t, wrap: n } = {}) {
671
683
  let r = t ? `${t}%` : void 0;
672
684
  if (e === "full") return { width: "100%" };
673
685
  let i = e === "left" || e === "right";
@@ -701,8 +713,8 @@ function Ee({ align: e = "center", width: t, wrap: n } = {}) {
701
713
  marginRight: "auto"
702
714
  };
703
715
  }
704
- function De(e = [], t, n) {
705
- let r = n ?? ((e, n) => q(e, n, t));
716
+ function Ae(e = [], t, n) {
717
+ let r = n ?? ((e, n) => K(e, n, t));
706
718
  return e.map((t, n) => {
707
719
  let i = {
708
720
  marginTop: 0,
@@ -724,7 +736,7 @@ function De(e = [], t, n) {
724
736
  marginLeft: 0,
725
737
  marginRight: 0,
726
738
  ...i,
727
- ...Ee(t)
739
+ ...ke(t)
728
740
  },
729
741
  children: [t.href ? /* @__PURE__ */ u("a", {
730
742
  href: t.href,
@@ -743,16 +755,16 @@ function De(e = [], t, n) {
743
755
  })]
744
756
  }, n);
745
757
  }
746
- if (t.type === "video") return Re(t.url) ? /* @__PURE__ */ u("div", {
758
+ if (t.type === "video") return Ve(t.url) ? /* @__PURE__ */ u("div", {
747
759
  style: {
748
760
  ...i,
749
- ...Ee({
761
+ ...ke({
750
762
  align: t.align,
751
763
  wrap: t.wrap,
752
764
  width: t.width ?? 100
753
765
  })
754
766
  },
755
- children: /* @__PURE__ */ u(ze, {
767
+ children: /* @__PURE__ */ u(He, {
756
768
  url: t.url,
757
769
  autoplay: t.autoplay,
758
770
  muted: t.muted,
@@ -814,17 +826,17 @@ function De(e = [], t, n) {
814
826
  }
815
827
  if (t.type === "quote") return /* @__PURE__ */ u("blockquote", {
816
828
  style: {
817
- ...ke,
829
+ ...Me,
818
830
  ...i
819
831
  },
820
832
  children: r(t.parts, t.text)
821
833
  }, n);
822
- if (Te[t.type]) {
834
+ if (Oe[t.type]) {
823
835
  let e = t.type;
824
836
  return /* @__PURE__ */ u(e, {
825
837
  style: {
826
- ...fe,
827
- fontSize: Te[t.type],
838
+ ...he,
839
+ fontSize: Oe[t.type],
828
840
  ...i
829
841
  },
830
842
  children: r(t.parts, t.text)
@@ -832,39 +844,39 @@ function De(e = [], t, n) {
832
844
  }
833
845
  return /* @__PURE__ */ u("p", {
834
846
  style: {
835
- ...pe,
847
+ ...ge,
836
848
  ...i
837
849
  },
838
850
  children: r(t.parts, t.text)
839
851
  }, n);
840
852
  });
841
853
  }
842
- function Oe({ content: e, style: t, linked: n, nodeRef: r }) {
854
+ function je({ content: e, style: t, linked: n, nodeRef: r }) {
843
855
  return /* @__PURE__ */ u("div", {
844
856
  ref: r,
845
857
  style: {
846
858
  display: "flow-root",
847
859
  ...h(t)
848
860
  },
849
- children: De(e, n)
861
+ children: Ae(e, n)
850
862
  });
851
863
  }
852
- var ke = {
864
+ var Me = {
853
865
  margin: 0,
854
866
  padding: "8px 0 8px 20px",
855
867
  borderLeft: "4px solid var(--page-accent, rgba(148, 163, 184, 0.6))"
856
868
  };
857
- function Ae({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
869
+ function Ne({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
858
870
  return /* @__PURE__ */ u("blockquote", {
859
871
  ref: i,
860
872
  style: {
861
- ...ke,
873
+ ...Me,
862
874
  ...h(n)
863
875
  },
864
- children: q(t, e, r)
876
+ children: K(t, e, r)
865
877
  });
866
878
  }
867
- function je({ ordered: e, items: t = [], style: n, nodeRef: r }) {
879
+ function Pe({ ordered: e, items: t = [], style: n, nodeRef: r }) {
868
880
  return /* @__PURE__ */ u(e ? "ol" : "ul", {
869
881
  ref: r,
870
882
  style: {
@@ -874,53 +886,53 @@ function je({ ordered: e, items: t = [], style: n, nodeRef: r }) {
874
886
  },
875
887
  children: t.map((e, t) => /* @__PURE__ */ u("li", {
876
888
  style: { marginBottom: 4 },
877
- children: q(e.parts, e.text)
889
+ children: K(e.parts, e.text)
878
890
  }, t))
879
891
  });
880
892
  }
881
- function Me({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
893
+ function Fe({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
882
894
  return /* @__PURE__ */ u("p", {
883
895
  ref: i,
884
896
  style: {
885
- ...pe,
897
+ ...ge,
886
898
  ...h(n)
887
899
  },
888
- children: q(t, e, r)
900
+ children: K(t, e, r)
889
901
  });
890
902
  }
891
- var Ne = {
903
+ var Ie = {
892
904
  color: "var(--page-accent, inherit)",
893
905
  textDecoration: "underline",
894
906
  textUnderlineOffset: 3,
895
907
  cursor: "pointer"
896
908
  };
897
- function Pe({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
909
+ function Le({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
898
910
  return /* @__PURE__ */ u("a", {
899
911
  ref: o,
900
912
  href: n || "#",
901
913
  target: r || void 0,
902
914
  rel: r === "_blank" ? "noopener noreferrer" : void 0,
903
915
  style: {
904
- ...Ne,
916
+ ...Ie,
905
917
  ...h(i)
906
918
  },
907
- children: q(t, e, a)
919
+ children: K(t, e, a)
908
920
  });
909
921
  }
910
- function Fe({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
922
+ function Re({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
911
923
  return /* @__PURE__ */ u("a", {
912
924
  ref: o,
913
925
  href: n || "#",
914
926
  target: r || void 0,
915
927
  rel: r === "_blank" ? "noopener noreferrer" : void 0,
916
928
  style: {
917
- ...K,
929
+ ...G,
918
930
  ...h(i)
919
931
  },
920
- children: q(t, e, a)
932
+ children: K(t, e, a)
921
933
  });
922
934
  }
923
- function Ie({ src: e, alt: t, style: n, nodeRef: r }) {
935
+ function ze({ src: e, alt: t, style: n, nodeRef: r }) {
924
936
  return e ? /* @__PURE__ */ u("img", {
925
937
  ref: r,
926
938
  src: e,
@@ -932,7 +944,7 @@ function Ie({ src: e, alt: t, style: n, nodeRef: r }) {
932
944
  }
933
945
  }) : null;
934
946
  }
935
- function Le({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
947
+ function Be({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
936
948
  return e ? /* @__PURE__ */ u("video", {
937
949
  ref: s,
938
950
  src: e,
@@ -950,9 +962,9 @@ function Le({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !
950
962
  }
951
963
  }) : null;
952
964
  }
953
- var Re = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
954
- function ze({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
955
- let c = Re(e);
965
+ var Ve = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
966
+ function He({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
967
+ let c = Ve(e);
956
968
  if (!c) return null;
957
969
  let l = new URLSearchParams({ rel: "0" });
958
970
  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", {
@@ -978,7 +990,7 @@ function ze({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i
978
990
  })
979
991
  });
980
992
  }
981
- function Be({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
993
+ function Ue({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
982
994
  return e ? /* @__PURE__ */ u("iframe", {
983
995
  ref: i,
984
996
  src: e,
@@ -994,7 +1006,7 @@ function Be({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i })
994
1006
  }
995
1007
  }) : null;
996
1008
  }
997
- function Ve({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
1009
+ function We({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
998
1010
  let [a, o] = c(null);
999
1011
  return i(() => {
1000
1012
  a && (a.innerHTML = e || "", t && a.querySelectorAll("script").forEach((e) => {
@@ -1013,7 +1025,7 @@ function Ve({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
1013
1025
  style: h(n)
1014
1026
  });
1015
1027
  }
1016
- function He({ height: e, nodeRef: t }) {
1028
+ function Ge({ height: e, nodeRef: t }) {
1017
1029
  return /* @__PURE__ */ u("div", {
1018
1030
  ref: t,
1019
1031
  style: {
@@ -1023,7 +1035,7 @@ function He({ height: e, nodeRef: t }) {
1023
1035
  }
1024
1036
  });
1025
1037
  }
1026
- function Ue({ style: e, nodeRef: t }) {
1038
+ function Ke({ style: e, nodeRef: t }) {
1027
1039
  return /* @__PURE__ */ u("div", {
1028
1040
  ref: t,
1029
1041
  style: {
@@ -1034,7 +1046,7 @@ function Ue({ style: e, nodeRef: t }) {
1034
1046
  }
1035
1047
  });
1036
1048
  }
1037
- var We = {
1049
+ var qe = {
1038
1050
  position: "absolute",
1039
1051
  top: "50%",
1040
1052
  transform: "translateY(-50%)",
@@ -1051,7 +1063,7 @@ var We = {
1051
1063
  alignItems: "center",
1052
1064
  justifyContent: "center",
1053
1065
  padding: 0
1054
- }, Ge = {
1066
+ }, Je = {
1055
1067
  bottom: {
1056
1068
  inset: "auto 0 0 0",
1057
1069
  padding: "40px 24px 20px",
@@ -1070,8 +1082,8 @@ var We = {
1070
1082
  padding: 24,
1071
1083
  textShadow: "0 2px 12px rgba(0, 0, 0, 0.6)"
1072
1084
  }
1073
- }, Ke = 48;
1074
- function qe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: a = 320, swipe: o = !0, style: s, nodeRef: f }) {
1085
+ }, Ye = 48;
1086
+ function Xe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: a = 320, swipe: o = !0, style: s, nodeRef: f }) {
1075
1087
  let [p, m] = c(0), [g, _] = c(!1), [v, y] = c(null), b = e ? Math.min(p, e - 1) : 0;
1076
1088
  if (i(() => {
1077
1089
  if (!n || g || v || e < 2) return;
@@ -1087,7 +1099,7 @@ function qe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1087
1099
  let x = (t) => m((t + e) % e), S = () => {
1088
1100
  if (!v) return;
1089
1101
  let { dx: e } = v;
1090
- y(null), e < -48 ? x(b + 1) : e > Ke && x(b - 1);
1102
+ y(null), e < -48 ? x(b + 1) : e > Ye && x(b - 1);
1091
1103
  };
1092
1104
  return /* @__PURE__ */ d("div", {
1093
1105
  ref: f,
@@ -1135,7 +1147,7 @@ function qe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1135
1147
  type: "button",
1136
1148
  "aria-label": "Previous slide",
1137
1149
  style: {
1138
- ...We,
1150
+ ...qe,
1139
1151
  left: 12
1140
1152
  },
1141
1153
  onClick: () => x(b - 1),
@@ -1145,7 +1157,7 @@ function qe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1145
1157
  type: "button",
1146
1158
  "aria-label": "Next slide",
1147
1159
  style: {
1148
- ...We,
1160
+ ...qe,
1149
1161
  right: 12
1150
1162
  },
1151
1163
  onClick: () => x(b + 1),
@@ -1179,7 +1191,7 @@ function qe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1179
1191
  ] })]
1180
1192
  });
1181
1193
  }
1182
- var Je = (e, t) => ({
1194
+ var Ze = (e, t) => ({
1183
1195
  position: "absolute",
1184
1196
  inset: 0,
1185
1197
  backgroundImage: e ? `url(${e})` : "none",
@@ -1187,18 +1199,18 @@ var Je = (e, t) => ({
1187
1199
  backgroundSize: "cover",
1188
1200
  backgroundPosition: "center"
1189
1201
  });
1190
- function Ye({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
1191
- return e.length ? /* @__PURE__ */ u(qe, {
1202
+ function Qe({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
1203
+ return e.length ? /* @__PURE__ */ u(Xe, {
1192
1204
  ...r,
1193
1205
  count: e.length,
1194
1206
  renderSlide: (r) => {
1195
1207
  let i = e[r];
1196
- return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: Je(i.image) }), (i.title || i.text) && /* @__PURE__ */ d("div", {
1208
+ return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: Ze(i.image) }), (i.title || i.text) && /* @__PURE__ */ d("div", {
1197
1209
  style: {
1198
1210
  position: "absolute",
1199
1211
  color: "#fff",
1200
1212
  textAlign: n,
1201
- ...Ge[t] ?? Ge.bottom
1213
+ ...Je[t] ?? Je.bottom
1202
1214
  },
1203
1215
  children: [i.title && /* @__PURE__ */ u("div", {
1204
1216
  style: {
@@ -1218,13 +1230,13 @@ function Ye({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "
1218
1230
  }
1219
1231
  }) : null;
1220
1232
  }
1221
- function Xe({ slides: e = [], linked: t, ...n }) {
1222
- return e.length ? /* @__PURE__ */ u(qe, {
1233
+ function $e({ slides: e = [], linked: t, ...n }) {
1234
+ return e.length ? /* @__PURE__ */ u(Xe, {
1223
1235
  ...n,
1224
1236
  count: e.length,
1225
1237
  renderSlide: (n) => {
1226
1238
  let r = e[n];
1227
- return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: Je(r.image, r.color) }), /* @__PURE__ */ u("div", {
1239
+ return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: Ze(r.image, r.color) }), /* @__PURE__ */ u("div", {
1228
1240
  style: {
1229
1241
  position: "absolute",
1230
1242
  inset: 0,
@@ -1236,7 +1248,7 @@ function Xe({ slides: e = [], linked: t, ...n }) {
1236
1248
  }
1237
1249
  }) : null;
1238
1250
  }
1239
- function Ze({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lightbox: a = !0, style: o, nodeRef: s, inert: f }) {
1251
+ function et({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lightbox: a = !0, style: o, nodeRef: s, inert: f }) {
1240
1252
  let p = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.src) : [], m = Math.max(0, Number(n) || 0), g = f ? (e) => e.preventDefault() : void 0, [_, v] = c(null), y = a && !f && _ !== null && p[_];
1241
1253
  i(() => {
1242
1254
  if (!y) return;
@@ -1435,19 +1447,19 @@ function Ze({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lig
1435
1447
  ]
1436
1448
  });
1437
1449
  }
1438
- var Qe = {
1450
+ var tt = {
1439
1451
  color: "inherit",
1440
1452
  textDecoration: "none",
1441
1453
  fontSize: 14,
1442
1454
  opacity: .85
1443
- }, $e = {
1455
+ }, nt = {
1444
1456
  background: "var(--page-bg, #ffffff)",
1445
1457
  color: "var(--page-text, #111827)",
1446
1458
  border: "1px solid rgba(148, 163, 184, 0.25)",
1447
1459
  boxShadow: "0 16px 40px rgba(15, 23, 42, 0.16)",
1448
1460
  zIndex: 60
1449
1461
  };
1450
- function et({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], style: s, nodeRef: f, menu: p = "auto", breakpoint: m = 768 }) {
1462
+ function rt({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], style: s, nodeRef: f, menu: p = "auto", breakpoint: m = 768 }) {
1451
1463
  let [g, _] = c(null), [v, y] = c(!1), [b, x] = c(!1), [S, C] = c(null);
1452
1464
  i(() => {
1453
1465
  if (!g) return;
@@ -1457,7 +1469,7 @@ function et({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1457
1469
  let w = p === "hamburger" || p === "auto" && v, T = (e, t) => /* @__PURE__ */ d("a", {
1458
1470
  href: e.href || "#",
1459
1471
  style: {
1460
- ...Qe,
1472
+ ...tt,
1461
1473
  display: "block",
1462
1474
  ...t
1463
1475
  },
@@ -1545,7 +1557,7 @@ function et({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1545
1557
  let t = e.children ?? [];
1546
1558
  if (!t.length) return /* @__PURE__ */ u("a", {
1547
1559
  href: e.href || "#",
1548
- style: Qe,
1560
+ style: tt,
1549
1561
  children: e.label
1550
1562
  }, e.key);
1551
1563
  let n = e.type === "mega";
@@ -1559,7 +1571,7 @@ function et({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1559
1571
  children: [/* @__PURE__ */ d("a", {
1560
1572
  href: e.href || "#",
1561
1573
  style: {
1562
- ...Qe,
1574
+ ...tt,
1563
1575
  cursor: "pointer"
1564
1576
  },
1565
1577
  children: [
@@ -1575,7 +1587,7 @@ function et({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1575
1587
  ]
1576
1588
  }), S === e.key && (n ? /* @__PURE__ */ u("div", {
1577
1589
  style: {
1578
- ...$e,
1590
+ ...nt,
1579
1591
  position: "absolute",
1580
1592
  left: 0,
1581
1593
  right: 0,
@@ -1591,7 +1603,7 @@ function et({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1591
1603
  }))
1592
1604
  }) : /* @__PURE__ */ u("div", {
1593
1605
  style: {
1594
- ...$e,
1606
+ ...nt,
1595
1607
  position: "absolute",
1596
1608
  top: "100%",
1597
1609
  left: 0,
@@ -1620,7 +1632,7 @@ function et({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1620
1632
  children: o.map((t) => /* @__PURE__ */ d(e, { children: [/* @__PURE__ */ u("a", {
1621
1633
  href: t.href || "#",
1622
1634
  style: {
1623
- ...Qe,
1635
+ ...tt,
1624
1636
  padding: "10px 4px",
1625
1637
  fontWeight: (t.children ?? []).length ? 600 : 400,
1626
1638
  opacity: 1
@@ -1631,7 +1643,7 @@ function et({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1631
1643
  ]
1632
1644
  });
1633
1645
  }
1634
- function tt({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
1646
+ function it({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
1635
1647
  let [i, a] = c(0), o = e.length ? Math.min(i, e.length - 1) : 0;
1636
1648
  return e.length ? /* @__PURE__ */ d("div", {
1637
1649
  ref: r,
@@ -1671,7 +1683,7 @@ function tt({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
1671
1683
  }, e.key))]
1672
1684
  }) : null;
1673
1685
  }
1674
- function nt({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }) {
1686
+ function at({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }) {
1675
1687
  let [a, o] = c(() => new Set(e.length ? [e[0].key] : []));
1676
1688
  if (!e.length) return null;
1677
1689
  let s = (e) => o((t) => {
@@ -1728,15 +1740,15 @@ function nt({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }
1728
1740
  })
1729
1741
  });
1730
1742
  }
1731
- var rt = {
1743
+ var ot = {
1732
1744
  display: "flex",
1733
1745
  flexDirection: "column",
1734
1746
  gap: "12px"
1735
- }, J = {
1747
+ }, q = {
1736
1748
  fontSize: "14px",
1737
1749
  fontWeight: 500,
1738
1750
  color: "var(--page-text, #111827)"
1739
- }, Y = {
1751
+ }, J = {
1740
1752
  padding: "10px 12px",
1741
1753
  border: "1px solid #d1d5db",
1742
1754
  borderRadius: "6px",
@@ -1746,18 +1758,18 @@ var rt = {
1746
1758
  boxSizing: "border-box",
1747
1759
  backgroundColor: "#ffffff",
1748
1760
  color: "#111827"
1749
- }, it = {
1761
+ }, st = {
1750
1762
  display: "flex",
1751
1763
  alignItems: "center",
1752
1764
  gap: "8px",
1753
1765
  fontSize: "14px",
1754
1766
  color: "var(--page-text, #111827)"
1755
- }, X = (e) => e ? {
1767
+ }, Y = (e) => e ? {
1756
1768
  readOnly: !0,
1757
1769
  tabIndex: -1,
1758
1770
  onMouseDown: (e) => e.preventDefault()
1759
1771
  } : {};
1760
- function at(e, t) {
1772
+ function ct(e, t) {
1761
1773
  if (!e) return !0;
1762
1774
  let n = t[e.field], r = n == null || n === "" ? "" : String(n), i = e.value ?? "";
1763
1775
  switch (e.op) {
@@ -1771,11 +1783,11 @@ function at(e, t) {
1771
1783
  default: return !1;
1772
1784
  }
1773
1785
  }
1774
- var ot = {
1786
+ var lt = {
1775
1787
  display: "flex",
1776
1788
  flexDirection: "column",
1777
1789
  gap: 6
1778
- }, st = {
1790
+ }, ut = {
1779
1791
  font: "inherit",
1780
1792
  fontSize: 15,
1781
1793
  padding: "10px 12px",
@@ -1786,16 +1798,16 @@ var ot = {
1786
1798
  width: "100%",
1787
1799
  boxSizing: "border-box"
1788
1800
  };
1789
- function ct(e, t) {
1801
+ function dt(e, t) {
1790
1802
  let n = Array.isArray(e?.options) ? e.options : [];
1791
1803
  if (!e?.parentField) return n;
1792
1804
  let r = t?.[e.parentField];
1793
1805
  return r ? n.filter((e) => typeof e == "string" ? !1 : !e.parent || e.parent === r) : [];
1794
1806
  }
1795
- function lt({ field: e, value: t, onChange: n, inert: r, values: i }) {
1807
+ function ft({ field: e, value: t, onChange: n, inert: r, values: i }) {
1796
1808
  let a = /* @__PURE__ */ d("span", {
1797
1809
  style: {
1798
- ...J,
1810
+ ...q,
1799
1811
  fontSize: 14
1800
1812
  },
1801
1813
  children: [e.label, e.required ? " *" : ""]
@@ -1804,7 +1816,7 @@ function lt({ field: e, value: t, onChange: n, inert: r, values: i }) {
1804
1816
  required: e.required || void 0,
1805
1817
  placeholder: e.placeholder || void 0,
1806
1818
  disabled: r || void 0,
1807
- style: st,
1819
+ style: ut,
1808
1820
  value: t ?? "",
1809
1821
  onChange: (t) => n(e.name, t.target.value)
1810
1822
  };
@@ -1833,7 +1845,7 @@ function lt({ field: e, value: t, onChange: n, inert: r, values: i }) {
1833
1845
  borderRadius: 8,
1834
1846
  display: "block"
1835
1847
  }
1836
- }) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ u(ze, {
1848
+ }) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ u(He, {
1837
1849
  url: e.src,
1838
1850
  style: { width: "100%" }
1839
1851
  }) : /* @__PURE__ */ u("video", {
@@ -1845,14 +1857,14 @@ function lt({ field: e, value: t, onChange: n, inert: r, values: i }) {
1845
1857
  display: "block"
1846
1858
  }
1847
1859
  }) : null : /* @__PURE__ */ d("label", {
1848
- style: ot,
1860
+ style: lt,
1849
1861
  children: [
1850
1862
  a,
1851
1863
  e.type === "textarea" || e.multiline ? /* @__PURE__ */ u("textarea", {
1852
1864
  ...o,
1853
1865
  rows: 4,
1854
1866
  style: {
1855
- ...st,
1867
+ ...ut,
1856
1868
  resize: "vertical"
1857
1869
  }
1858
1870
  }) : e.type === "select" ? /* @__PURE__ */ d("select", {
@@ -1861,7 +1873,7 @@ function lt({ field: e, value: t, onChange: n, inert: r, values: i }) {
1861
1873
  children: [/* @__PURE__ */ u("option", {
1862
1874
  value: "",
1863
1875
  children: e.placeholder || "—"
1864
- }), ct(e, i).map((e, t) => /* @__PURE__ */ u("option", {
1876
+ }), dt(e, i).map((e, t) => /* @__PURE__ */ u("option", {
1865
1877
  value: typeof e == "string" ? e : e.value,
1866
1878
  children: typeof e == "string" ? e : e.label ?? e.value
1867
1879
  }, t))]
@@ -1908,7 +1920,7 @@ function lt({ field: e, value: t, onChange: n, inert: r, values: i }) {
1908
1920
  ]
1909
1921
  });
1910
1922
  }
1911
- function ut({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s, auto: f, submitLabel: p, nodeRef: m, inert: g, children: _, linked: v, show: y }) {
1923
+ function pt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s, auto: f, submitLabel: p, nodeRef: m, inert: g, children: _, linked: v, show: y }) {
1912
1924
  let { tenant: b, apiUrl: x } = r(B), [S, C] = c("form"), [w, T] = c(null), [E, D] = c({}), [O, k] = c(0), A = g ? y || "form" : S;
1913
1925
  i(() => {
1914
1926
  if (!f || !s) return;
@@ -1930,9 +1942,9 @@ function ut({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
1930
1942
  section: e,
1931
1943
  fields: []
1932
1944
  }) : j[j.length - 1].fields.push(e);
1933
- let M = j.filter((e) => e.section || e.fields.length), N = M.filter((e) => !e.section || at(e.section.condition, E)).map((e) => ({
1945
+ let M = j.filter((e) => e.section || e.fields.length), N = M.filter((e) => !e.section || ct(e.section.condition, E)).map((e) => ({
1934
1946
  ...e,
1935
- fields: e.fields.filter((e) => at(e.condition, E))
1947
+ fields: e.fields.filter((e) => ct(e.condition, E))
1936
1948
  })), P = M.length > 1, F = Math.min(O, Math.max(0, N.length - 1)), I = P ? N[F]?.fields ?? [] : N.flatMap((e) => e.fields), ee = I.filter((e) => {
1937
1949
  let t = E[e.name];
1938
1950
  return e.required && (t == null || t === "" || t === !1);
@@ -1990,11 +2002,11 @@ function ut({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
1990
2002
  }
1991
2003
  },
1992
2004
  style: {
1993
- ...rt,
2005
+ ...ot,
1994
2006
  display: A === "success" ? "none" : "flex"
1995
2007
  },
1996
2008
  children: f && s ? /* @__PURE__ */ d(l, { children: [
1997
- P && /* @__PURE__ */ u(jt, {
2009
+ P && /* @__PURE__ */ u(Ft, {
1998
2010
  steps: N.map((e) => ({ label: e.section?.label ?? "Start" })),
1999
2011
  active: F + 1,
2000
2012
  style: { marginBottom: 8 }
@@ -2007,7 +2019,7 @@ function ut({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
2007
2019
  },
2008
2020
  children: N[F].section.help
2009
2021
  }),
2010
- I.map((e) => /* @__PURE__ */ u(lt, {
2022
+ I.map((e) => /* @__PURE__ */ u(ft, {
2011
2023
  field: e,
2012
2024
  value: E[e.name],
2013
2025
  values: E,
@@ -2026,7 +2038,7 @@ function ut({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
2026
2038
  disabled: g || void 0,
2027
2039
  onClick: () => k(F - 1),
2028
2040
  style: {
2029
- ...K,
2041
+ ...G,
2030
2042
  background: "transparent",
2031
2043
  color: "inherit",
2032
2044
  border: 0,
@@ -2039,7 +2051,7 @@ function ut({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
2039
2051
  disabled: g || ee.length > 0,
2040
2052
  onClick: () => k(F + 1),
2041
2053
  style: {
2042
- ...K,
2054
+ ...G,
2043
2055
  border: 0,
2044
2056
  padding: "10px 22px",
2045
2057
  borderRadius: 8,
@@ -2053,7 +2065,7 @@ function ut({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
2053
2065
  type: "submit",
2054
2066
  disabled: g || void 0,
2055
2067
  style: {
2056
- ...K,
2068
+ ...G,
2057
2069
  border: 0,
2058
2070
  padding: "10px 22px",
2059
2071
  borderRadius: 8,
@@ -2080,10 +2092,10 @@ function ut({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
2080
2092
  ]
2081
2093
  });
2082
2094
  }
2083
- var Z = null, dt = null, ft = (e) => {
2095
+ var X = null, mt = null, ht = (e) => {
2084
2096
  let t = typeof e == "string" && e.trim() ? e.trim() : "";
2085
- if (Z && dt === t) return Z;
2086
- if (Z && typeof window < "u") {
2097
+ if (X && mt === t) return X;
2098
+ if (X && typeof window < "u") {
2087
2099
  for (let e of ["grecaptcha", "___grecaptcha_cfg"]) try {
2088
2100
  delete window[e];
2089
2101
  } catch {
@@ -2091,27 +2103,32 @@ var Z = null, dt = null, ft = (e) => {
2091
2103
  }
2092
2104
  document.querySelectorAll("script[src*=\"recaptcha\"]").forEach((e) => e.remove());
2093
2105
  }
2094
- return dt = t, Z = new Promise((e) => {
2106
+ return mt = t, X = new Promise((e) => {
2095
2107
  if (typeof window > "u") return;
2096
2108
  if (window.grecaptcha?.render) return e(window.grecaptcha);
2097
2109
  window.__webimRecaptchaReady = () => e(window.grecaptcha);
2098
2110
  let n = document.createElement("script");
2099
2111
  n.src = `https://www.google.com/recaptcha/api.js?onload=__webimRecaptchaReady&render=explicit${t ? `&hl=${encodeURIComponent(t)}` : ""}`, n.async = !0, document.head.appendChild(n);
2100
- }), Z;
2112
+ }), X;
2101
2113
  };
2102
- function pt({ siteKey: e, theme: t, size: n, hl: a, style: o, nodeRef: c, inert: l }) {
2103
- let f = r(B), p = f?.settings && typeof f.settings == "object" ? f.settings["google.recaptchaKey"] : "", m = typeof e == "string" && e.trim() || (typeof p == "string" ? p.trim() : ""), g = s(null);
2104
- if (i(() => {
2105
- if (l || !m || !g.current) return;
2106
- let e = !0;
2107
- return ft(a).then((r) => {
2108
- if (!(!e || !g.current || !r?.render)) {
2109
- g.current.innerHTML = "";
2114
+ function gt({ siteKey: e, theme: t, size: n, hl: a, style: o, nodeRef: c, inert: l, onChange: f }) {
2115
+ let p = r(B), m = p?.settings && typeof p.settings == "object" ? p.settings["google.recaptchaKey"] : "", g = typeof e == "string" && e.trim() || (typeof m == "string" ? m.trim() : ""), _ = s(null), v = s(f);
2116
+ if (v.current = f, i(() => {
2117
+ if (l || !g || !_.current) return;
2118
+ let e = !0, r = (t) => {
2119
+ e && typeof v.current == "function" && v.current(t);
2120
+ };
2121
+ return ht(a).then((i) => {
2122
+ if (!(!e || !_.current || !i?.render)) {
2123
+ _.current.innerHTML = "", r("");
2110
2124
  try {
2111
- r.render(g.current, {
2112
- sitekey: m,
2125
+ i.render(_.current, {
2126
+ sitekey: g,
2113
2127
  theme: t === "dark" ? "dark" : "light",
2114
- size: n === "compact" ? "compact" : "normal"
2128
+ size: n === "compact" ? "compact" : "normal",
2129
+ callback: (e) => r(typeof e == "string" ? e : ""),
2130
+ "expired-callback": () => r(""),
2131
+ "error-callback": () => r("")
2115
2132
  });
2116
2133
  } catch {}
2117
2134
  }
@@ -2120,7 +2137,7 @@ function pt({ siteKey: e, theme: t, size: n, hl: a, style: o, nodeRef: c, inert:
2120
2137
  };
2121
2138
  }, [
2122
2139
  l,
2123
- m,
2140
+ g,
2124
2141
  t,
2125
2142
  n,
2126
2143
  a
@@ -2167,7 +2184,7 @@ function pt({ siteKey: e, theme: t, size: n, hl: a, style: o, nodeRef: c, inert:
2167
2184
  children: "reCAPTCHA"
2168
2185
  })
2169
2186
  ]
2170
- }), !m && /* @__PURE__ */ u("div", {
2187
+ }), !g && /* @__PURE__ */ u("div", {
2171
2188
  style: {
2172
2189
  marginTop: 6,
2173
2190
  fontSize: 11,
@@ -2177,23 +2194,23 @@ function pt({ siteKey: e, theme: t, size: n, hl: a, style: o, nodeRef: c, inert:
2177
2194
  })]
2178
2195
  });
2179
2196
  }
2180
- return m ? /* @__PURE__ */ u("div", {
2197
+ return g ? /* @__PURE__ */ u("div", {
2181
2198
  ref: c,
2182
2199
  style: h(o),
2183
- children: /* @__PURE__ */ u("div", { ref: g })
2200
+ children: /* @__PURE__ */ u("div", { ref: _ })
2184
2201
  }) : null;
2185
2202
  }
2186
- function mt({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
2203
+ function _t({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
2187
2204
  return /* @__PURE__ */ u("label", {
2188
2205
  ref: r,
2189
2206
  style: {
2190
- ...J,
2207
+ ...q,
2191
2208
  ...h(n)
2192
2209
  },
2193
- children: q(t, e, i)
2210
+ children: K(t, e, i)
2194
2211
  });
2195
2212
  }
2196
- function ht({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
2213
+ function vt({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
2197
2214
  return /* @__PURE__ */ u("input", {
2198
2215
  ref: a,
2199
2216
  type: e,
@@ -2201,13 +2218,13 @@ function ht({ type: e = "text", name: t, placeholder: n, required: r, style: i,
2201
2218
  placeholder: n,
2202
2219
  required: !o && !!r,
2203
2220
  style: {
2204
- ...Y,
2221
+ ...J,
2205
2222
  ...h(i)
2206
2223
  },
2207
- ...X(o)
2224
+ ...Y(o)
2208
2225
  });
2209
2226
  }
2210
- function gt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
2227
+ function yt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
2211
2228
  return /* @__PURE__ */ u("textarea", {
2212
2229
  ref: a,
2213
2230
  name: e || void 0,
@@ -2215,18 +2232,18 @@ function gt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeR
2215
2232
  rows: n,
2216
2233
  required: !o && !!r,
2217
2234
  style: {
2218
- ...Y,
2235
+ ...J,
2219
2236
  resize: "vertical",
2220
2237
  ...h(i)
2221
2238
  },
2222
- ...X(o)
2239
+ ...Y(o)
2223
2240
  });
2224
2241
  }
2225
- function _t({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
2242
+ function bt({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
2226
2243
  return /* @__PURE__ */ d("label", {
2227
2244
  ref: o,
2228
2245
  style: {
2229
- ...it,
2246
+ ...st,
2230
2247
  ...h(a)
2231
2248
  },
2232
2249
  children: [/* @__PURE__ */ u("input", {
@@ -2243,7 +2260,7 @@ function _t({ kind: e = "checkbox", label: t, name: n, value: r, required: i, st
2243
2260
  }), t]
2244
2261
  });
2245
2262
  }
2246
- function vt({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
2263
+ function xt({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
2247
2264
  return /* @__PURE__ */ d("select", {
2248
2265
  ref: a,
2249
2266
  name: e || void 0,
@@ -2252,7 +2269,7 @@ function vt({ name: e, placeholder: t, options: n = [], required: r, style: i, n
2252
2269
  onMouseDown: o ? (e) => e.preventDefault() : void 0,
2253
2270
  tabIndex: o ? -1 : void 0,
2254
2271
  style: {
2255
- ...Y,
2272
+ ...J,
2256
2273
  appearance: "auto",
2257
2274
  ...h(i)
2258
2275
  },
@@ -2266,12 +2283,12 @@ function vt({ name: e, placeholder: t, options: n = [], required: r, style: i, n
2266
2283
  }, t))]
2267
2284
  });
2268
2285
  }
2269
- function yt({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
2286
+ function St({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
2270
2287
  let [s, l] = c(null);
2271
2288
  return /* @__PURE__ */ d("label", {
2272
2289
  ref: a,
2273
2290
  style: {
2274
- ...Y,
2291
+ ...J,
2275
2292
  display: "flex",
2276
2293
  alignItems: "center",
2277
2294
  gap: "8px",
@@ -2298,12 +2315,12 @@ function yt({ name: e, accept: t, required: n, text: r = "Choose a file…", sty
2298
2315
  ]
2299
2316
  });
2300
2317
  }
2301
- function bt({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
2318
+ function Ct({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
2302
2319
  return /* @__PURE__ */ u("button", {
2303
2320
  ref: n,
2304
2321
  type: r ? "button" : "submit",
2305
2322
  style: {
2306
- ...K,
2323
+ ...G,
2307
2324
  border: 0,
2308
2325
  cursor: "pointer",
2309
2326
  alignSelf: "flex-start",
@@ -2318,7 +2335,7 @@ function bt({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
2318
2335
  children: e
2319
2336
  });
2320
2337
  }
2321
- function xt({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
2338
+ function wt({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
2322
2339
  let a = Math.max(1, (Number(e) || 1) * (Number(t) || 1));
2323
2340
  return /* @__PURE__ */ u("div", {
2324
2341
  ref: r,
@@ -2335,61 +2352,63 @@ function xt({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
2335
2352
  }, t))
2336
2353
  });
2337
2354
  }
2338
- function St({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, imageField: o, titleField: s = "name", textField: l, custom: f, templateId: p, paged: m, style: g, nodeRef: _ }) {
2339
- let { tenant: v, apiUrl: y, locale: b } = r(B), x = r(H), S = r(V), C = S?.[e], w = m ? le(S) : 1, [T, E] = c(null);
2355
+ function Tt({ 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: g, style: _, nodeRef: v }) {
2356
+ let { tenant: y, apiUrl: b, locale: x } = r(B), S = r(H), C = r(V), w = de(g), T = JSON.stringify(w), E = T !== "{}" && !e?.startsWith?.("api:"), D = E ? null : C?.[e], O = m ? le(C) : 1, [k, A] = c(null);
2340
2357
  if (i(() => {
2341
- if (!e || C) return;
2358
+ if (!e || D) return;
2342
2359
  let n = !0, r = new URLSearchParams();
2343
- if (b && r.set("locale", b), m && !e.startsWith("api:")) {
2360
+ if (x && r.set("locale", x), E && r.set("data_filter", T), m && !e.startsWith("api:")) {
2344
2361
  let e = Math.max(1, Number(t) || 6);
2345
- r.set("offset", String((w - 1) * e)), r.set("limit", String(e));
2362
+ r.set("offset", String((O - 1) * e)), r.set("limit", String(e));
2346
2363
  }
2347
- let i = r.toString(), a = e.startsWith("api:") ? `${y}/data/${encodeURIComponent(e.slice(4))}` : `${y}/dynamic/${encodeURIComponent(e)}${i ? `?${i}` : ""}`;
2348
- return fetch(a, { headers: v ? { "x-tenant": v } : {} }).then((e) => e.json()).then((e) => {
2364
+ let i = r.toString(), a = e.startsWith("api:") ? `${b}/data/${encodeURIComponent(e.slice(4))}` : `${b}/dynamic/${encodeURIComponent(e)}${i ? `?${i}` : ""}`;
2365
+ return fetch(a, { headers: y ? { "x-tenant": y } : {} }).then((e) => e.json()).then((e) => {
2349
2366
  let t = Array.isArray(e?.payload) ? e.payload : Array.isArray(e?.payload?.data) ? e.payload.data : [];
2350
- return n && E(t.filter((e) => e && typeof e == "object"));
2351
- }).catch(() => n && E([])), () => {
2367
+ return n && A(t.filter((e) => e && typeof e == "object"));
2368
+ }).catch(() => n && A([])), () => {
2352
2369
  n = !1;
2353
2370
  };
2354
2371
  }, [
2355
2372
  e,
2356
- v,
2357
2373
  y,
2358
2374
  b,
2359
- C,
2375
+ x,
2376
+ D,
2360
2377
  m,
2361
- w,
2362
- t
2378
+ O,
2379
+ t,
2380
+ E,
2381
+ T
2363
2382
  ]), !e) return null;
2364
- let D = Math.max(1, Number(t) || 6), O = m ? C || e.startsWith("api:") ? (C ?? T ?? []).slice((w - 1) * D, w * D) : (T ?? []).slice(0, D) : (C ?? T ?? []).slice(0, D), k = Math.min(Math.max(Number(a) || 3, 1), 6), A = n === "list" ? {
2383
+ let j = Math.max(1, Number(t) || 6), M = m ? D || e.startsWith("api:") ? (D ?? k ?? []).slice((O - 1) * j, O * j) : (k ?? []).slice(0, j) : (D ?? k ?? []).slice(0, j), N = Math.min(Math.max(Number(a) || 3, 1), 6), P = n === "list" ? {
2365
2384
  display: "flex",
2366
2385
  flexDirection: "column",
2367
2386
  gap: 20
2368
2387
  } : {
2369
2388
  display: "grid",
2370
- gridTemplateColumns: `repeat(${k}, minmax(0, 1fr))`,
2389
+ gridTemplateColumns: `repeat(${N}, minmax(0, 1fr))`,
2371
2390
  gap: 24
2372
2391
  };
2373
- return f && p && x?.render ? /* @__PURE__ */ u("div", {
2374
- ref: _,
2392
+ return f && p && S?.render ? /* @__PURE__ */ u("div", {
2393
+ ref: v,
2375
2394
  style: {
2376
2395
  width: "100%",
2377
- ...A,
2378
- ...h(g)
2396
+ ...P,
2397
+ ...h(_)
2379
2398
  },
2380
- children: O.map((e) => /* @__PURE__ */ u("div", {
2399
+ children: M.map((e) => /* @__PURE__ */ u("div", {
2381
2400
  style: { minWidth: 0 },
2382
- children: x.render(p, (t) => de(t, e))
2401
+ children: S.render(p, (t) => me(t, e))
2383
2402
  }, e.id ?? e?.data?.slug))
2384
2403
  }) : /* @__PURE__ */ u("div", {
2385
- ref: _,
2404
+ ref: v,
2386
2405
  style: {
2387
2406
  width: "100%",
2388
- ...A,
2389
- ...h(g)
2407
+ ...P,
2408
+ ...h(_)
2390
2409
  },
2391
- children: O.map((e) => {
2392
- let t = o ? W(e?.data, o) : null, r = s ? G(W(e?.data, s)) : null, i = l ? W(e?.data, l) : null, a = Array.isArray(i) ? i : null, c = a || i == null ? null : G(i), f = n === "list";
2410
+ children: M.map((e) => {
2411
+ let t = o ? U(e?.data, o) : null, r = s ? W(U(e?.data, s)) : null, i = l ? U(e?.data, l) : null, a = Array.isArray(i) ? i : null, c = a || i == null ? null : W(i), f = n === "list";
2393
2412
  return /* @__PURE__ */ d("div", {
2394
2413
  style: {
2395
2414
  display: "flex",
@@ -2436,7 +2455,7 @@ function St({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
2436
2455
  lineHeight: 1.55,
2437
2456
  opacity: .85
2438
2457
  },
2439
- children: De(a)
2458
+ children: Ae(a)
2440
2459
  })
2441
2460
  ]
2442
2461
  })]
@@ -2444,7 +2463,91 @@ function St({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
2444
2463
  })
2445
2464
  });
2446
2465
  }
2447
- function Ct({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
2466
+ function Et({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, inert: i }) {
2467
+ let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} : ue(), s = {
2468
+ display: "flex",
2469
+ flexDirection: "column",
2470
+ gap: 4,
2471
+ fontSize: 12,
2472
+ fontWeight: 600,
2473
+ color: "var(--page-text, #111827)",
2474
+ minWidth: 140,
2475
+ flex: "1 1 140px"
2476
+ }, c = (e) => {
2477
+ let t = e && typeof e == "object" ? e.value : e, n = e && typeof e == "object" ? e.label ?? e.value : e;
2478
+ return {
2479
+ value: String(t ?? ""),
2480
+ label: String(n ?? "")
2481
+ };
2482
+ };
2483
+ return /* @__PURE__ */ d("form", {
2484
+ ref: r,
2485
+ method: "get",
2486
+ onSubmit: i ? (e) => e.preventDefault() : void 0,
2487
+ style: {
2488
+ display: "flex",
2489
+ flexWrap: "wrap",
2490
+ alignItems: "flex-end",
2491
+ gap: 12,
2492
+ width: "100%",
2493
+ ...h(n)
2494
+ },
2495
+ children: [a.map((e) => /* @__PURE__ */ d("label", {
2496
+ style: s,
2497
+ children: [/* @__PURE__ */ u("span", { children: e.label || e.name }), e.type === "option" || e.type === "select" ? /* @__PURE__ */ d("select", {
2498
+ name: `f_${e.name}`,
2499
+ defaultValue: o[e.name] ?? "",
2500
+ style: J,
2501
+ ...Y(i),
2502
+ children: [/* @__PURE__ */ u("option", {
2503
+ value: "",
2504
+ children: "—"
2505
+ }), (Array.isArray(e.options) ? e.options : []).map((e) => {
2506
+ let t = c(e);
2507
+ return /* @__PURE__ */ u("option", {
2508
+ value: t.value,
2509
+ children: t.label
2510
+ }, t.value);
2511
+ })]
2512
+ }) : e.type === "switch" ? /* @__PURE__ */ d("select", {
2513
+ name: `f_${e.name}`,
2514
+ defaultValue: o[e.name] ?? "",
2515
+ style: J,
2516
+ ...Y(i),
2517
+ children: [
2518
+ /* @__PURE__ */ u("option", {
2519
+ value: "",
2520
+ children: "—"
2521
+ }),
2522
+ /* @__PURE__ */ u("option", {
2523
+ value: "true",
2524
+ children: "Yes"
2525
+ }),
2526
+ /* @__PURE__ */ u("option", {
2527
+ value: "false",
2528
+ children: "No"
2529
+ })
2530
+ ]
2531
+ }) : /* @__PURE__ */ u("input", {
2532
+ type: "text",
2533
+ name: `f_${e.name}`,
2534
+ defaultValue: o[e.name] ?? "",
2535
+ placeholder: e.label || e.name,
2536
+ style: J,
2537
+ ...Y(i)
2538
+ })]
2539
+ }, e.name)), /* @__PURE__ */ u("button", {
2540
+ type: "submit",
2541
+ style: {
2542
+ ...G,
2543
+ flex: "0 0 auto"
2544
+ },
2545
+ ...Y(i),
2546
+ children: t
2547
+ })]
2548
+ });
2549
+ }
2550
+ function Dt({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
2448
2551
  return e.length ? /* @__PURE__ */ u("nav", {
2449
2552
  ref: r,
2450
2553
  "aria-label": "Breadcrumb",
@@ -2494,7 +2597,7 @@ function Ct({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
2494
2597
  })
2495
2598
  }) : null;
2496
2599
  }
2497
- function wt({ 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: g }) {
2600
+ function Ot({ 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: g }) {
2498
2601
  let { tenant: _, apiUrl: v } = r(B), y = r(V), [b, x] = c(null), S = o ? Number(y?.[`${o}:total`]) : NaN;
2499
2602
  i(() => {
2500
2603
  if (!o || Number.isFinite(S)) return;
@@ -2579,15 +2682,15 @@ function wt({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", sou
2579
2682
  ]
2580
2683
  });
2581
2684
  }
2582
- var Tt = "webim.page_mode", Et = () => {
2685
+ var kt = "webim.page_mode", At = () => {
2583
2686
  if (typeof window > "u") return "auto";
2584
2687
  try {
2585
- let e = window.localStorage.getItem(Tt);
2688
+ let e = window.localStorage.getItem(kt);
2586
2689
  return e === "light" || e === "dark" ? e : "auto";
2587
2690
  } catch {
2588
2691
  return "auto";
2589
2692
  }
2590
- }, Dt = (e) => {
2693
+ }, jt = (e) => {
2591
2694
  let t = {
2592
2695
  width: 16,
2593
2696
  height: 16,
@@ -2619,13 +2722,13 @@ var Tt = "webim.page_mode", Et = () => {
2619
2722
  rx: "2"
2620
2723
  }), /* @__PURE__ */ u("path", { d: "M8 21h8M12 17v4" })]
2621
2724
  });
2622
- }, Q = {
2725
+ }, Z = {
2623
2726
  light: "Light theme",
2624
2727
  dark: "Dark theme",
2625
2728
  auto: "Follow the device theme"
2626
2729
  };
2627
- function Ot({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
2628
- let [o, l] = c(a ? "auto" : Et), d = s(null), f = (e) => {
2730
+ function Mt({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
2731
+ let [o, l] = c(a ? "auto" : At), d = s(null), f = (e) => {
2629
2732
  d.current = e, typeof r == "function" && r(e);
2630
2733
  };
2631
2734
  i(() => {
@@ -2633,7 +2736,7 @@ function Ot({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
2633
2736
  let e = d.current?.closest?.(".webim-page");
2634
2737
  e && (o === "light" || o === "dark" ? e.setAttribute("data-webim-mode", o) : e.removeAttribute("data-webim-mode"));
2635
2738
  try {
2636
- o === "auto" ? window.localStorage.removeItem(Tt) : window.localStorage.setItem(Tt, o);
2739
+ o === "auto" ? window.localStorage.removeItem(kt) : window.localStorage.setItem(kt, o);
2637
2740
  } catch {}
2638
2741
  }, [o, a]);
2639
2742
  let p = t === !1 ? ["light", "dark"] : [
@@ -2668,8 +2771,8 @@ function Ot({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
2668
2771
  },
2669
2772
  children: p.map((e) => /* @__PURE__ */ u("button", {
2670
2773
  type: "button",
2671
- title: Q[e],
2672
- "aria-label": Q[e],
2774
+ title: Z[e],
2775
+ "aria-label": Z[e],
2673
2776
  "aria-pressed": e === m,
2674
2777
  onClick: a ? void 0 : () => l(e),
2675
2778
  style: {
@@ -2680,15 +2783,15 @@ function Ot({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
2680
2783
  background: e === m ? "var(--page-accent, #111827)" : "transparent",
2681
2784
  opacity: e === m ? 1 : .7
2682
2785
  },
2683
- children: Dt(e)
2786
+ children: jt(e)
2684
2787
  }, e))
2685
2788
  });
2686
2789
  let _ = p[(p.indexOf(m) + 1) % p.length];
2687
2790
  return /* @__PURE__ */ u("button", {
2688
2791
  ref: f,
2689
2792
  type: "button",
2690
- title: Q[m],
2691
- "aria-label": `Theme: ${Q[m]} — switch to ${Q[_]}`,
2793
+ title: Z[m],
2794
+ "aria-label": `Theme: ${Z[m]} — switch to ${Z[_]}`,
2692
2795
  onClick: a ? void 0 : () => l(_),
2693
2796
  style: {
2694
2797
  ...g,
@@ -2697,10 +2800,10 @@ function Ot({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
2697
2800
  border: "1px solid rgba(148, 163, 184, 0.4)",
2698
2801
  ...h(n)
2699
2802
  },
2700
- children: Dt(m)
2803
+ children: jt(m)
2701
2804
  });
2702
2805
  }
2703
- var kt = {
2806
+ var Nt = {
2704
2807
  facebook: {
2705
2808
  label: "Facebook",
2706
2809
  color: "#1877f2",
@@ -2767,8 +2870,8 @@ var kt = {
2767
2870
  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"
2768
2871
  }
2769
2872
  };
2770
- function At({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, style: o, nodeRef: s, inert: c }) {
2771
- let l = Array.isArray(e) ? e.filter((e) => e && kt[e.network]) : [];
2873
+ function Pt({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, style: o, nodeRef: s, inert: c }) {
2874
+ let l = Array.isArray(e) ? e.filter((e) => e && Nt[e.network]) : [];
2772
2875
  if (!l.length) return null;
2773
2876
  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, g = c ? (e) => e.preventDefault() : void 0;
2774
2877
  return /* @__PURE__ */ u("div", {
@@ -2781,7 +2884,7 @@ function At({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
2781
2884
  ...h(o)
2782
2885
  },
2783
2886
  children: l.map((e, r) => {
2784
- let i = kt[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);
2887
+ let i = Nt[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);
2785
2888
  return /* @__PURE__ */ u("a", {
2786
2889
  href: e.url || "#",
2787
2890
  onClick: g,
@@ -2815,7 +2918,7 @@ function At({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
2815
2918
  })
2816
2919
  });
2817
2920
  }
2818
- function jt({ steps: t = [], active: n = 1, vertical: r = !1, style: i, nodeRef: a }) {
2921
+ function Ft({ steps: t = [], active: n = 1, vertical: r = !1, style: i, nodeRef: a }) {
2819
2922
  if (!t.length) return null;
2820
2923
  let o = Math.min(Math.max(Number(n) || 1, 1), t.length), s = (e) => ({
2821
2924
  width: 32,
@@ -2893,7 +2996,7 @@ function jt({ steps: t = [], active: n = 1, vertical: r = !1, style: i, nodeRef:
2893
2996
  })
2894
2997
  });
2895
2998
  }
2896
- var Mt = {
2999
+ var Q = {
2897
3000
  small: {
2898
3001
  w: 132,
2899
3002
  h: 46,
@@ -2915,10 +3018,10 @@ var Mt = {
2915
3018
  title: 12.5,
2916
3019
  avatar: 46
2917
3020
  }
2918
- }, Nt = (e) => Mt[e] ?? Mt.medium;
2919
- Mt.medium.w, Mt.medium.h;
2920
- function Pt(e, { size: t = "medium", horizontal: n = !1 } = {}) {
2921
- let r = Nt(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 = [];
3021
+ }, It = (e) => Q[e] ?? Q.medium;
3022
+ Q.medium.w, Q.medium.h;
3023
+ function Lt(e, { size: t = "medium", horizontal: n = !1 } = {}) {
3024
+ let r = It(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 = [];
2922
3025
  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);
2923
3026
  let d = /* @__PURE__ */ new Map(), f = (e, t) => {
2924
3027
  if (t.has(e.id)) return 0;
@@ -2970,19 +3073,19 @@ function Pt(e, { size: t = "medium", horizontal: n = !1 } = {}) {
2970
3073
  horizontal: n
2971
3074
  };
2972
3075
  }
2973
- var Ft = (e, t) => {
3076
+ var Rt = (e, t) => {
2974
3077
  let n = String(e ?? "");
2975
3078
  return n.length > t ? `${n.slice(0, t - 1)}…` : n;
2976
- }, It = (e) => {
3079
+ }, zt = (e) => {
2977
3080
  let t = /^#([0-9a-f]{6}|[0-9a-f]{3})$/i.exec(String(e ?? "").trim());
2978
3081
  if (!t) return "#ffffff";
2979
3082
  let n = t[1];
2980
3083
  n.length === 3 && (n = [...n].map((e) => e + e).join(""));
2981
3084
  let r = parseInt(n, 16);
2982
3085
  return .299 * (r >> 16 & 255) + .587 * (r >> 8 & 255) + .114 * (r & 255) > 150 ? "#111827" : "#ffffff";
2983
- }, Lt = (e) => !!(e?.cv?.trim?.() || e?.photo);
2984
- function Rt(e, t = {}) {
2985
- 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 ? "" : G(e);
3086
+ }, Bt = (e) => !!(e?.cv?.trim?.() || e?.photo);
3087
+ function Vt(e, t = {}) {
3088
+ 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 ? "" : W(e);
2986
3089
  return n.map((e) => {
2987
3090
  let n = e.data ?? {}, a = r(n[t.parentField]), o = a && typeof a == "object" ? a.id ?? null : a || null;
2988
3091
  return {
@@ -2996,11 +3099,11 @@ function Rt(e, t = {}) {
2996
3099
  };
2997
3100
  });
2998
3101
  }
2999
- var zt = {
3102
+ var Ht = {
3000
3103
  size: 36,
3001
3104
  pad: 10
3002
3105
  };
3003
- function Bt({ node: e, onClose: t }) {
3106
+ function Ut({ node: e, onClose: t }) {
3004
3107
  return i(() => {
3005
3108
  let e = (e) => e.key === "Escape" && t();
3006
3109
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
@@ -3118,7 +3221,7 @@ function Bt({ node: e, onClose: t }) {
3118
3221
  })
3119
3222
  });
3120
3223
  }
3121
- function Vt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField: s, parentField: f, cvField: p, hrefField: m, size: g = "medium", horizontal: _ = !1, style: v, nodeRef: y, interactive: b = !0 }) {
3224
+ function Wt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField: s, parentField: f, cvField: p, hrefField: m, size: g = "medium", horizontal: _ = !1, style: v, nodeRef: y, interactive: b = !0 }) {
3122
3225
  let x = a(), [S, C] = c(null), { tenant: w, apiUrl: T } = r(B), E = r(V)?.[t], [D, O] = c(null);
3123
3226
  i(() => {
3124
3227
  if (!t || E) return;
@@ -3135,14 +3238,14 @@ function Vt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
3135
3238
  T,
3136
3239
  E
3137
3240
  ]);
3138
- let k = t ? Rt(E ?? D ?? [], {
3241
+ let k = t ? Vt(E ?? D ?? [], {
3139
3242
  nameField: n,
3140
3243
  titleField: o,
3141
3244
  photoField: s,
3142
3245
  parentField: f,
3143
3246
  cvField: p,
3144
3247
  hrefField: m
3145
- }) : e, A = Nt(g), { boxes: j, links: M, width: N, height: P } = Pt(k, {
3248
+ }) : e, A = It(g), { boxes: j, links: M, width: N, height: P } = Lt(k, {
3146
3249
  size: g,
3147
3250
  horizontal: _
3148
3251
  });
@@ -3188,7 +3291,7 @@ function Vt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
3188
3291
  stroke: "rgba(148, 163, 184, 0.7)",
3189
3292
  strokeWidth: "1.5"
3190
3293
  }, t)), j.map(({ node: e, x: t, y: n }) => {
3191
- 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 ? It(e.color) : r ? "var(--page-accent-text, #ffffff)" : "var(--page-text, #111827)", c = i ? It(e.color2) : s, f = b && (Lt(e) || e.href), p = () => Lt(e) ? C(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);
3294
+ 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 ? zt(e.color) : r ? "var(--page-accent-text, #ffffff)" : "var(--page-text, #111827)", c = i ? zt(e.color2) : s, f = b && (Bt(e) || e.href), p = () => Bt(e) ? C(e) : window.open(e.href, "_blank", "noreferrer"), m = e.photo ? t + Ht.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);
3192
3295
  return /* @__PURE__ */ d("g", {
3193
3296
  onClick: f ? p : void 0,
3194
3297
  style: f ? { cursor: "pointer" } : void 0,
@@ -3252,13 +3355,13 @@ function Vt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
3252
3355
  e.photo && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("clipPath", {
3253
3356
  id: `${x}-${e.id}`,
3254
3357
  children: /* @__PURE__ */ u("circle", {
3255
- cx: t + zt.pad + A.avatar / 2,
3358
+ cx: t + Ht.pad + A.avatar / 2,
3256
3359
  cy: n + A.h / 2,
3257
3360
  r: A.avatar / 2
3258
3361
  })
3259
3362
  }), /* @__PURE__ */ u("image", {
3260
3363
  href: e.photo,
3261
- x: t + zt.pad,
3364
+ x: t + Ht.pad,
3262
3365
  y: n + (A.h - A.avatar) / 2,
3263
3366
  width: A.avatar,
3264
3367
  height: A.avatar,
@@ -3272,7 +3375,7 @@ function Vt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
3272
3375
  fontSize: A.title,
3273
3376
  fontWeight: "600",
3274
3377
  fill: s,
3275
- children: Ft(e.title, g + 4)
3378
+ children: Rt(e.title, g + 4)
3276
3379
  }), e.name && /* @__PURE__ */ u("text", {
3277
3380
  x: m,
3278
3381
  y: n + _ + _ / 2 + A.name * .35,
@@ -3280,7 +3383,7 @@ function Vt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
3280
3383
  fontSize: A.name,
3281
3384
  fontWeight: "600",
3282
3385
  fill: c,
3283
- children: Ft(e.name, g)
3386
+ children: Rt(e.name, g)
3284
3387
  })] }) : /* @__PURE__ */ d(l, { children: [v[0] && /* @__PURE__ */ u("text", {
3285
3388
  x: m,
3286
3389
  y: n + (v[1] ? A.h * .43 : A.h * .57),
@@ -3288,7 +3391,7 @@ function Vt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
3288
3391
  fontSize: A.name,
3289
3392
  fontWeight: "600",
3290
3393
  fill: s,
3291
- children: Ft(v[0], g)
3394
+ children: Rt(v[0], g)
3292
3395
  }), v[1] && /* @__PURE__ */ u("text", {
3293
3396
  x: m,
3294
3397
  y: n + A.h * .73,
@@ -3296,18 +3399,18 @@ function Vt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
3296
3399
  fontSize: A.title,
3297
3400
  opacity: "0.7",
3298
3401
  fill: s,
3299
- children: Ft(v[1], g + 4)
3402
+ children: Rt(v[1], g + 4)
3300
3403
  })] })
3301
3404
  ]
3302
3405
  }, e.id);
3303
3406
  })]
3304
- }), S && /* @__PURE__ */ u(Bt, {
3407
+ }), S && /* @__PURE__ */ u(Ut, {
3305
3408
  node: S,
3306
3409
  onClose: () => C(null)
3307
3410
  })]
3308
3411
  });
3309
3412
  }
3310
- function Ht({ 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: g }) {
3413
+ function Gt({ 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: g }) {
3311
3414
  let { tenant: _, apiUrl: v } = r(B), y = r(V), b = y?.[n], x = f ? le(y) : 1, [S, C] = c(null);
3312
3415
  if (i(() => {
3313
3416
  if (!n || b) return;
@@ -3327,7 +3430,7 @@ function Ht({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped:
3327
3430
  x,
3328
3431
  a
3329
3432
  ]), !e.length) return null;
3330
- let w = Math.max(1, Number(a) || 10), T = n ? f ? b || n.startsWith("api:") ? (b ?? S ?? []).slice((x - 1) * w, x * w) : (S ?? []).slice(0, w) : (b ?? S ?? []).slice(0, w) : null, E = T ? T.map((t) => e.map((e) => G(W(t?.data, e.field)))) : t, D = !!n && !(n && !b && S === 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 };
3433
+ let w = Math.max(1, Number(a) || 10), T = n ? f ? b || n.startsWith("api:") ? (b ?? S ?? []).slice((x - 1) * w, x * w) : (S ?? []).slice(0, w) : (b ?? S ?? []).slice(0, w) : null, E = T ? T.map((t) => e.map((e) => W(U(t?.data, e.field)))) : t, D = !!n && !(n && !b && S === 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 };
3331
3434
  return /* @__PURE__ */ u("div", {
3332
3435
  ref: g,
3333
3436
  style: {
@@ -3373,77 +3476,78 @@ function Ht({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped:
3373
3476
  })
3374
3477
  });
3375
3478
  }
3376
- var Ut = {
3377
- PageRoot: ve,
3378
- Section: ye,
3379
- Container: be,
3380
- Heading: xe,
3381
- TextBlock: Me,
3382
- ButtonBlock: Fe,
3383
- ImageBlock: Ie,
3384
- Spacer: He,
3385
- Divider: Ue,
3386
- SliderBlock: Ye,
3387
- CanvasSlider: Xe,
3388
- TabsBlock: tt,
3389
- QuickStack: xt,
3390
- CollectionList: St,
3391
- BreadcrumbsBlock: Ct,
3392
- PaginationBlock: wt,
3393
- StepperBlock: jt,
3394
- SocialLinksBlock: At,
3395
- ThemeModeBlock: Ot,
3396
- OrgChartBlock: Vt,
3397
- TableBlock: Ht,
3398
- MasonryBlock: Ze,
3399
- AccordionBlock: nt,
3400
- NavbarBlock: et,
3401
- ListBlock: je,
3402
- TextSpan: we,
3403
- QuoteBlock: Ae,
3404
- TextLink: Pe,
3405
- RichTextBlock: Oe,
3406
- RichContentBlock: Oe,
3407
- VideoBlock: Le,
3408
- YouTubeBlock: ze,
3409
- IframeBlock: Be,
3410
- EmbedBlock: Ve,
3411
- FormBlock: ut,
3412
- FormLabel: mt,
3413
- FormInput: ht,
3414
- FormTextarea: gt,
3415
- FormCheckbox: (e) => /* @__PURE__ */ u(_t, {
3479
+ var Kt = {
3480
+ PageRoot: xe,
3481
+ Section: Se,
3482
+ Container: Ce,
3483
+ Heading: we,
3484
+ TextBlock: Fe,
3485
+ ButtonBlock: Re,
3486
+ ImageBlock: ze,
3487
+ Spacer: Ge,
3488
+ Divider: Ke,
3489
+ SliderBlock: Qe,
3490
+ CanvasSlider: $e,
3491
+ TabsBlock: it,
3492
+ QuickStack: wt,
3493
+ CollectionList: Tt,
3494
+ CollectionSearch: Et,
3495
+ BreadcrumbsBlock: Dt,
3496
+ PaginationBlock: Ot,
3497
+ StepperBlock: Ft,
3498
+ SocialLinksBlock: Pt,
3499
+ ThemeModeBlock: Mt,
3500
+ OrgChartBlock: Wt,
3501
+ TableBlock: Gt,
3502
+ MasonryBlock: et,
3503
+ AccordionBlock: at,
3504
+ NavbarBlock: rt,
3505
+ ListBlock: Pe,
3506
+ TextSpan: De,
3507
+ QuoteBlock: Ne,
3508
+ TextLink: Le,
3509
+ RichTextBlock: je,
3510
+ RichContentBlock: je,
3511
+ VideoBlock: Be,
3512
+ YouTubeBlock: He,
3513
+ IframeBlock: Ue,
3514
+ EmbedBlock: We,
3515
+ FormBlock: pt,
3516
+ FormLabel: _t,
3517
+ FormInput: vt,
3518
+ FormTextarea: yt,
3519
+ FormCheckbox: (e) => /* @__PURE__ */ u(bt, {
3416
3520
  kind: "checkbox",
3417
3521
  ...e
3418
3522
  }),
3419
- FormRadio: (e) => /* @__PURE__ */ u(_t, {
3523
+ FormRadio: (e) => /* @__PURE__ */ u(bt, {
3420
3524
  kind: "radio",
3421
3525
  ...e
3422
3526
  }),
3423
- FormSelect: vt,
3424
- FormFile: yt,
3425
- FormRecaptcha: pt,
3426
- FormSubmit: bt
3427
- }, Wt = {
3527
+ FormSelect: xt,
3528
+ FormFile: St,
3529
+ FormRecaptcha: gt,
3530
+ FormSubmit: Ct
3531
+ }, qt = {
3428
3532
  id: "auth",
3429
3533
  label: "Accounts",
3430
3534
  category: "Apps",
3431
3535
  keys: ["SiteLoginForm", "SiteAccountMenu"],
3432
3536
  ssr: "shell",
3433
3537
  settings: ["site.authRedirect"]
3434
- }, Gt = t({
3538
+ }, Jt = t({
3435
3539
  user: null,
3436
3540
  status: "idle",
3437
3541
  ensure: () => {},
3438
3542
  refresh: () => {},
3439
3543
  signOut: () => {}
3440
- }), Kt = () => {
3441
- let e = r(Gt);
3544
+ }), Yt = () => {
3545
+ let e = r(Jt);
3442
3546
  return i(() => {
3443
3547
  e.ensure();
3444
3548
  }, [e]), e;
3445
3549
  };
3446
- function qt({ children: e, initialUser: t, disabled: i, apiUrl: a, tenant: l }) {
3550
+ function Xt({ children: e, initialUser: t, disabled: i, apiUrl: a, tenant: l }) {
3447
3551
  let d = r(B), 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}`, {
3448
3552
  ...t,
3449
3553
  credentials: "include",
@@ -3476,18 +3580,18 @@ function qt({ children: e, initialUser: t, disabled: i, apiUrl: a, tenant: l })
3476
3580
  b,
3477
3581
  x
3478
3582
  ]);
3479
- return /* @__PURE__ */ u(Gt.Provider, {
3583
+ return /* @__PURE__ */ u(Jt.Provider, {
3480
3584
  value: C,
3481
3585
  children: e
3482
3586
  });
3483
3587
  }
3484
- function Jt({ when: e, children: t }) {
3485
- let { status: n } = Kt();
3588
+ function Zt({ when: e, children: t }) {
3589
+ let { status: n } = Yt();
3486
3590
  return !e || e === "always" ? t : n === "idle" || n === "loading" ? null : e === "user" == (n === "user") ? t : null;
3487
3591
  }
3488
3592
  //#endregion
3489
3593
  //#region ../ui/src/components/builder/apps/auth/views.jsx
3490
- function Yt({ 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 }) {
3594
+ function Qt({ 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 }) {
3491
3595
  let { tenant: g, apiUrl: _, settings: v } = r(B), [y, b] = c("form"), [x, S] = c(""), [C, w] = c(!1), T = e === "register", E = f ? m || "form" : y, D = (e) => typeof e == "string" && e.startsWith("/") && !e.startsWith("//") ? e : "", O = async (e) => {
3492
3596
  if (e.preventDefault(), f) return;
3493
3597
  let n = new FormData(e.currentTarget);
@@ -3536,20 +3640,20 @@ function Yt({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
3536
3640
  children: [
3537
3641
  T ? /* @__PURE__ */ d("label", {
3538
3642
  style: {
3539
- ...J,
3643
+ ...q,
3540
3644
  display: "grid",
3541
3645
  gap: 6
3542
3646
  },
3543
3647
  children: [a, /* @__PURE__ */ u("input", {
3544
3648
  name: "name",
3545
3649
  type: "text",
3546
- style: Y,
3547
- ...X(f)
3650
+ style: J,
3651
+ ...Y(f)
3548
3652
  })]
3549
3653
  }) : null,
3550
3654
  /* @__PURE__ */ d("label", {
3551
3655
  style: {
3552
- ...J,
3656
+ ...q,
3553
3657
  display: "grid",
3554
3658
  gap: 6
3555
3659
  },
@@ -3557,13 +3661,13 @@ function Yt({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
3557
3661
  name: "email",
3558
3662
  type: "email",
3559
3663
  required: !f,
3560
- style: Y,
3561
- ...X(f)
3664
+ style: J,
3665
+ ...Y(f)
3562
3666
  })]
3563
3667
  }),
3564
3668
  /* @__PURE__ */ d("label", {
3565
3669
  style: {
3566
- ...J,
3670
+ ...q,
3567
3671
  display: "grid",
3568
3672
  gap: 6
3569
3673
  },
@@ -3571,15 +3675,15 @@ function Yt({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
3571
3675
  name: "password",
3572
3676
  type: "password",
3573
3677
  required: !f,
3574
- style: Y,
3575
- ...X(f)
3678
+ style: J,
3679
+ ...Y(f)
3576
3680
  })]
3577
3681
  }),
3578
3682
  /* @__PURE__ */ u("button", {
3579
3683
  type: f ? "button" : "submit",
3580
3684
  disabled: C || void 0,
3581
3685
  style: {
3582
- ...K,
3686
+ ...G,
3583
3687
  border: 0,
3584
3688
  padding: "10px 22px",
3585
3689
  borderRadius: 8,
@@ -3611,8 +3715,8 @@ function Yt({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
3611
3715
  ]
3612
3716
  });
3613
3717
  }
3614
- function Xt({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
3615
- let { user: c, status: l, signOut: f } = Kt(), p = a ? s || "user" : l, m = a ? {
3718
+ function $t({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
3719
+ let { user: c, status: l, signOut: f } = Yt(), p = a ? s || "user" : l, m = a ? {
3616
3720
  name: "Ada Lovelace",
3617
3721
  email: "ada@example.com"
3618
3722
  } : c;
@@ -3633,7 +3737,7 @@ function Xt({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
3633
3737
  children: [
3634
3738
  /* @__PURE__ */ d("span", {
3635
3739
  style: {
3636
- ...J,
3740
+ ...q,
3637
3741
  fontWeight: 600
3638
3742
  },
3639
3743
  children: [
@@ -3644,7 +3748,7 @@ function Xt({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
3644
3748
  }),
3645
3749
  n && m?.email ? /* @__PURE__ */ u("span", {
3646
3750
  style: {
3647
- ...J,
3751
+ ...q,
3648
3752
  opacity: .7
3649
3753
  },
3650
3754
  children: m.email
@@ -3653,14 +3757,14 @@ function Xt({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
3653
3757
  type: "button",
3654
3758
  onClick: a ? void 0 : f,
3655
3759
  style: {
3656
- ...K,
3760
+ ...G,
3657
3761
  border: 0,
3658
3762
  padding: "8px 16px",
3659
3763
  borderRadius: 8,
3660
3764
  fontSize: 14,
3661
3765
  cursor: a ? "default" : "pointer"
3662
3766
  },
3663
- ...X(a),
3767
+ ...Y(a),
3664
3768
  children: t
3665
3769
  })
3666
3770
  ]
@@ -3677,42 +3781,42 @@ function Xt({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
3677
3781
  }
3678
3782
  //#endregion
3679
3783
  //#region ../ui/src/components/builder/apps/index.js
3680
- var Zt = [Wt], Qt = {
3681
- SiteLoginForm: Yt,
3682
- SiteAccountMenu: Xt
3784
+ var en = [qt], tn = {
3785
+ SiteLoginForm: Qt,
3786
+ SiteAccountMenu: $t
3683
3787
  };
3684
- new Set(Zt.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
3788
+ new Set(en.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
3685
3789
  //#endregion
3686
3790
  //#region ../ui/src/components/builder/plugins/runtime.js
3687
- var $t = /* @__PURE__ */ new Map();
3688
- function en(e) {
3689
- if ($t.has(e)) return $t.get(e);
3791
+ var nn = /* @__PURE__ */ new Map();
3792
+ function rn(e) {
3793
+ if (nn.has(e)) return nn.get(e);
3690
3794
  let t = URL.createObjectURL(new Blob([e], { type: "text/javascript" })), n = import(
3691
3795
  /* @vite-ignore */
3692
3796
  /* webpackIgnore: true */
3693
3797
  t
3694
3798
  ).finally(() => URL.revokeObjectURL(t));
3695
- return $t.set(e, n), n;
3799
+ return nn.set(e, n), n;
3696
3800
  }
3697
- function tn(e) {
3801
+ function an(e) {
3698
3802
  let t = e && typeof e == "object" ? e.builder_plugins : null, n = t && typeof t == "object" ? t.plugins : null;
3699
3803
  return n && typeof n == "object" ? n : {};
3700
3804
  }
3701
3805
  //#endregion
3702
3806
  //#region ../ui/src/components/builder/plugins/view.jsx
3703
- async function nn(e, t) {
3704
- let n = await en(e);
3807
+ async function on(e, t) {
3808
+ let n = await rn(e);
3705
3809
  return (Array.isArray(n?.default?.blocks) ? n.default.blocks : []).find((e) => e?.id === t && typeof e.mount == "function") ?? null;
3706
3810
  }
3707
- var rn = {
3811
+ var sn = {
3708
3812
  padding: "10px 12px",
3709
3813
  border: "1px dashed rgba(148, 163, 184, 0.5)",
3710
3814
  borderRadius: 8,
3711
3815
  fontSize: 12,
3712
3816
  opacity: .6
3713
3817
  };
3714
- function an({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
3715
- let c = r(B), l = tn(c?.settings)[e], f = s(null), p = s(null), m = {
3818
+ function cn({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
3819
+ let c = r(B), l = an(c?.settings)[e], f = s(null), p = s(null), m = {
3716
3820
  tenant: c?.tenant ?? "",
3717
3821
  apiUrl: c?.apiUrl ?? "/api",
3718
3822
  locale: c?.locale ?? "",
@@ -3724,7 +3828,7 @@ function an({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
3724
3828
  let e = f.current;
3725
3829
  if (!l?.code || !e) return;
3726
3830
  let n = !0;
3727
- return nn(l.code, t).then((e) => {
3831
+ return on(l.code, t).then((e) => {
3728
3832
  if (!(!n || !e || !f.current)) {
3729
3833
  p.current = e;
3730
3834
  try {
@@ -3754,7 +3858,7 @@ function an({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
3754
3858
  }) : /* @__PURE__ */ d("div", {
3755
3859
  ref: o,
3756
3860
  style: {
3757
- ...rn,
3861
+ ...sn,
3758
3862
  ...h(a)
3759
3863
  },
3760
3864
  children: [
@@ -3766,10 +3870,10 @@ function an({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
3766
3870
  }
3767
3871
  //#endregion
3768
3872
  //#region ../ui/src/components/builder/render.jsx
3769
- var on = {
3770
- ...Ut,
3771
- ...Qt,
3772
- PluginBlock: an
3873
+ var ln = {
3874
+ ...Kt,
3875
+ ...tn,
3876
+ PluginBlock: cn
3773
3877
  };
3774
3878
  function $(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
3775
3879
  let o = n[t];
@@ -3781,7 +3885,7 @@ function $(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
3781
3885
  let c = new Set(i).add(n);
3782
3886
  return /* @__PURE__ */ u(e, { children: $(s.template.rootId, s.template.nodes, r, c, a) }, t);
3783
3887
  }
3784
- let l = on[s];
3888
+ let l = ln[s];
3785
3889
  if (!l) return null;
3786
3890
  let d = (o.nodes ?? []).map((e) => $(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, $(t, n, r, i)])) : void 0, m = /* @__PURE__ */ u(l, {
3787
3891
  ...c,
@@ -3792,16 +3896,16 @@ function $(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
3792
3896
  },
3793
3897
  children: d.length ? d : void 0
3794
3898
  }, t);
3795
- return c.when && c.when !== "always" ? /* @__PURE__ */ u(Jt, {
3899
+ return c.when && c.when !== "always" ? /* @__PURE__ */ u(Zt, {
3796
3900
  when: c.when,
3797
3901
  children: m
3798
3902
  }, t) : m;
3799
3903
  }
3800
3904
  //#endregion
3801
3905
  //#region ../ui/src/components/builder/PageRenderer.jsx
3802
- var sn = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), cn = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(F(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
3906
+ var un = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), dn = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(F(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
3803
3907
  .webim-page[data-webim-mode="dark"] { ${Object.entries(F(e.dark)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }`;
3804
- function ln({ 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: g }) {
3908
+ 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: g }) {
3805
3909
  let _ = s?.js?.trim();
3806
3910
  if (i(() => {
3807
3911
  if (!_) return;
@@ -3819,7 +3923,7 @@ function ln({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
3819
3923
  rel: "stylesheet",
3820
3924
  precedence: "default",
3821
3925
  href: z(e)
3822
- }, e)), k = P(t), A = cn(k);
3926
+ }, e)), k = P(t), A = dn(k);
3823
3927
  return r === "auto" ? /* @__PURE__ */ u(B.Provider, {
3824
3928
  value: {
3825
3929
  tenant: c || "",
@@ -3827,7 +3931,7 @@ function ln({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
3827
3931
  locale: p || "",
3828
3932
  settings: h ?? null
3829
3933
  },
3830
- children: /* @__PURE__ */ u(qt, {
3934
+ children: /* @__PURE__ */ u(Xt, {
3831
3935
  initialUser: g,
3832
3936
  children: /* @__PURE__ */ u(V.Provider, {
3833
3937
  value: f ?? null,
@@ -3842,8 +3946,8 @@ function ln({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
3842
3946
  ...a
3843
3947
  },
3844
3948
  children: [
3845
- /* @__PURE__ */ u("style", { children: `.webim-page { ${sn(F(k.light))} }
3846
- @media (prefers-color-scheme: dark) { .webim-page { ${sn(F(k.dark))} } }` }),
3949
+ /* @__PURE__ */ u("style", { children: `.webim-page { ${un(F(k.light))} }
3950
+ @media (prefers-color-scheme: dark) { .webim-page { ${un(F(k.dark))} } }` }),
3847
3951
  /* @__PURE__ */ u("style", { children: A }),
3848
3952
  O,
3849
3953
  /* @__PURE__ */ u("style", { children: y }),
@@ -3863,7 +3967,7 @@ function ln({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
3863
3967
  locale: p || "",
3864
3968
  settings: h ?? null
3865
3969
  },
3866
- children: /* @__PURE__ */ u(qt, {
3970
+ children: /* @__PURE__ */ u(Xt, {
3867
3971
  initialUser: g,
3868
3972
  children: /* @__PURE__ */ u(V.Provider, {
3869
3973
  value: f ?? null,
@@ -3894,8 +3998,8 @@ function ln({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
3894
3998
  }
3895
3999
  //#endregion
3896
4000
  //#region src/WebimContent.jsx
3897
- function un({ bundle: e, mode: t = "auto", style: n }) {
3898
- return e?.blocks?.ROOT ? /* @__PURE__ */ u(ln, {
4001
+ function pn({ bundle: e, mode: t = "auto", style: n }) {
4002
+ return e?.blocks?.ROOT ? /* @__PURE__ */ u(fn, {
3899
4003
  blocks: e.blocks,
3900
4004
  theme: e.theme,
3901
4005
  components: e.components,
@@ -3912,7 +4016,7 @@ function un({ bundle: e, mode: t = "auto", style: n }) {
3912
4016
  }
3913
4017
  //#endregion
3914
4018
  //#region src/WebimPage.jsx
3915
- function dn({ 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 }) {
4019
+ function mn({ 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 }) {
3916
4020
  let [g, _] = c({ status: "loading" }), v = s({
3917
4021
  onLoad: m,
3918
4022
  onError: h
@@ -3949,11 +4053,11 @@ function dn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: a, token: o, mo
3949
4053
  r,
3950
4054
  a,
3951
4055
  o
3952
- ]), g.status === "loading" ? f : g.status === "error" ? typeof p == "function" ? p(g.error) : p : /* @__PURE__ */ u(un, {
4056
+ ]), g.status === "loading" ? f : g.status === "error" ? typeof p == "function" ? p(g.error) : p : /* @__PURE__ */ u(pn, {
3953
4057
  bundle: g.bundle,
3954
4058
  mode: l,
3955
4059
  style: d
3956
4060
  });
3957
4061
  }
3958
4062
  //#endregion
3959
- export { ln as PageRenderer, un as WebimContent, dn as WebimPage, ne as fetchPage, De as renderRichContent, L as resolveTheme };
4063
+ export { fn as PageRenderer, pn as WebimContent, mn as WebimPage, ne as fetchPage, Ae as renderRichContent, L as resolveTheme };