webim-adapter 0.14.0 → 0.16.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.
@@ -60,24 +60,24 @@ function h(e) {
60
60
  delete t.clipText, oe && (t.WebkitBackgroundClip = "text", t.backgroundClip = "text", t.WebkitTextFillColor = "transparent");
61
61
  let { transitions: se, transitionDuration: V, transitionEasing: H, transitionProperty: U } = t, W = (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 G = (Array.isArray(se) ? se : []).filter((e) => e && e.on !== !1).map((e) => `${e.property || "all"} ${W(e.duration ?? 200)} ${e.easing || "ease"}`);
64
- if (V !== void 0 && G.push(`${U || "all"} ${W(V)} ${H || "ease"}`), G.length && (t.transition = G.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 ce = (Array.isArray(se) ? se : []).filter((e) => e && e.on !== !1).map((e) => `${e.property || "all"} ${W(e.duration ?? 200)} ${e.easing || "ease"}`);
64
+ if (V !== void 0 && ce.push(`${U || "all"} ${W(V)} ${H || "ease"}`), ce.length && (t.transition = ce.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: K, overlayOpacity: ce } = t;
70
- if (delete t.overlayColor, delete t.overlayOpacity, K) {
71
- let e = `color-mix(in srgb, ${K} ${ce ?? 50}%, transparent)`, n = `linear-gradient(${e}, ${e})`;
69
+ let { overlayColor: G, overlayOpacity: le } = t;
70
+ if (delete t.overlayColor, delete t.overlayOpacity, G) {
71
+ let e = `color-mix(in srgb, ${G} ${le ?? 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: q } = t;
75
+ let { backgroundLayers: K } = t;
76
76
  delete t.backgroundLayers;
77
- let le = (Array.isArray(q) ? q : []).filter((e) => e && e.on !== !1);
78
- if (le.length) {
77
+ let ue = (Array.isArray(K) ? K : []).filter((e) => e && e.on !== !1);
78
+ if (ue.length) {
79
79
  let e = [], n = [], r = [], i = [], a = [];
80
- for (let t of le) 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 ue) 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,11 @@ var ae = /* @__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
- }, W = t(null), G = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
496
- function K(e, t) {
495
+ }, W = t(null), ce = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
496
+ function G(e, t) {
497
497
  if (t) return t.includes(".") ? t.split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e) : e?.[t];
498
498
  }
499
- var ce = (e) => {
499
+ var le = (e) => {
500
500
  let t = [];
501
501
  for (let [n, r] of Object.entries(e ?? {})) {
502
502
  if (!/^[\w-]+$/.test(n)) continue;
@@ -506,36 +506,36 @@ var ce = (e) => {
506
506
  }
507
507
  return t;
508
508
  };
509
- function q(e) {
509
+ function K(e) {
510
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(" ") : "";
511
511
  }
512
- function le(e, t) {
513
- let n = t?.data ?? {}, r = ce(n);
512
+ function ue(e, t) {
513
+ let n = t?.data ?? {}, r = le(n);
514
514
  if (!r.length) return e;
515
- let i = RegExp(`:(${r.map(G).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;
515
+ let i = RegExp(`:(${r.map(ce).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;
516
516
  return a(e);
517
517
  }
518
- var ue = {
518
+ var de = {
519
519
  margin: 0,
520
520
  fontWeight: 700,
521
521
  lineHeight: 1.2,
522
522
  fontFamily: "var(--page-heading-font, inherit)"
523
- }, de = { margin: 0 }, J = {
523
+ }, fe = { margin: 0 }, q = {
524
524
  display: "inline-block",
525
525
  textDecoration: "none",
526
526
  cursor: "pointer",
527
527
  backgroundColor: "var(--page-accent, #111827)",
528
528
  color: "var(--page-accent-text, #ffffff)"
529
- }, fe = {
529
+ }, pe = {
530
530
  flexGrow: 1,
531
531
  display: "flex",
532
532
  flexDirection: "column",
533
533
  position: "relative"
534
- }, pe = {
534
+ }, me = {
535
535
  display: "flex",
536
536
  flexDirection: "column"
537
537
  };
538
- function me({ style: e }) {
538
+ function he({ style: e }) {
539
539
  let t = e?.backgroundVideo;
540
540
  if (!t) return null;
541
541
  let n = {
@@ -561,7 +561,7 @@ function me({ style: e }) {
561
561
  background: r
562
562
  } })] });
563
563
  }
564
- var he = (e, t) => e?.backgroundVideo ? {
564
+ var ge = (e, t) => e?.backgroundVideo ? {
565
565
  position: "relative",
566
566
  ...t,
567
567
  ...h(e)
@@ -569,24 +569,24 @@ var he = (e, t) => e?.backgroundVideo ? {
569
569
  ...t,
570
570
  ...h(e)
571
571
  };
572
- function ge({ style: e, nodeRef: t, children: n }) {
572
+ function _e({ style: e, nodeRef: t, children: n }) {
573
573
  return /* @__PURE__ */ d("div", {
574
574
  ref: t,
575
575
  style: {
576
- ...fe,
576
+ ...pe,
577
577
  ...h(e)
578
578
  },
579
- children: [/* @__PURE__ */ u(me, { style: e }), n]
579
+ children: [/* @__PURE__ */ u(he, { style: e }), n]
580
580
  });
581
581
  }
582
- function _e({ style: e, nodeRef: t, children: n }) {
582
+ function ve({ style: e, nodeRef: t, children: n }) {
583
583
  return /* @__PURE__ */ d("section", {
584
584
  ref: t,
585
- style: he(e, pe),
586
- children: [/* @__PURE__ */ u(me, { style: e }), n]
585
+ style: ge(e, me),
586
+ children: [/* @__PURE__ */ u(he, { style: e }), n]
587
587
  });
588
588
  }
589
- function ve({ style: e, freeLayout: t, nodeRef: n, children: r }) {
589
+ function ye({ style: e, freeLayout: t, nodeRef: n, children: r }) {
590
590
  let i = t ? {
591
591
  position: "relative",
592
592
  minHeight: 240
@@ -595,32 +595,32 @@ function ve({ style: e, freeLayout: t, nodeRef: n, children: r }) {
595
595
  ref: n,
596
596
  style: i ? {
597
597
  ...i,
598
- ...he(e)
599
- } : he(e),
600
- children: [/* @__PURE__ */ u(me, { style: e }), r]
598
+ ...ge(e)
599
+ } : ge(e),
600
+ children: [/* @__PURE__ */ u(he, { style: e }), r]
601
601
  });
602
602
  }
603
- function ye({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
603
+ function be({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
604
604
  return /* @__PURE__ */ u(n, {
605
605
  ref: a,
606
606
  style: {
607
- ...ue,
607
+ ...de,
608
608
  ...h(r)
609
609
  },
610
- children: Y(t, e, i)
610
+ children: J(t, e, i)
611
611
  });
612
612
  }
613
- var be = {
613
+ var xe = {
614
614
  fontFamily: j.mono.value,
615
615
  background: "rgba(148, 163, 184, 0.18)",
616
616
  padding: "1px 5px",
617
617
  borderRadius: 4,
618
618
  fontSize: "0.9em"
619
619
  };
620
- function xe(e, t = [], n, r) {
620
+ function Se(e, t = [], n, r) {
621
621
  let i = e;
622
622
  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: be,
623
+ style: xe,
624
624
  children: i
625
625
  })), 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
626
  href: n,
@@ -630,13 +630,13 @@ function xe(e, t = [], n, r) {
630
630
  children: i
631
631
  })), i;
632
632
  }
633
- function Y(t, n, r) {
633
+ function J(t, n, r) {
634
634
  return t?.length ? t.map((t, n) => {
635
635
  if (t.slot) return /* @__PURE__ */ u(e, { children: r?.[t.slot] ?? null }, n);
636
- if (t.parts) return /* @__PURE__ */ u(e, { children: Y(t.parts, "", r) }, n);
636
+ if (t.parts) return /* @__PURE__ */ u(e, { children: J(t.parts, "", r) }, n);
637
637
  let i = t.text;
638
638
  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: be,
639
+ style: xe,
640
640
  children: i
641
641
  })), 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
642
  style: {
@@ -653,13 +653,13 @@ function Y(t, n, r) {
653
653
  })), /* @__PURE__ */ u(e, { children: i }, n);
654
654
  }) : n;
655
655
  }
656
- function Se({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
656
+ function Ce({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
657
657
  return /* @__PURE__ */ u("span", {
658
658
  style: h(a),
659
- children: e?.length ? Y(e, t) : xe(t, n, r, i)
659
+ children: e?.length ? J(e, t) : Se(t, n, r, i)
660
660
  });
661
661
  }
662
- var Ce = {
662
+ var we = {
663
663
  h1: 40,
664
664
  h2: 32,
665
665
  h3: 26,
@@ -667,7 +667,7 @@ var Ce = {
667
667
  h5: 19,
668
668
  h6: 16
669
669
  };
670
- function we({ align: e = "center", width: t, wrap: n } = {}) {
670
+ function Te({ align: e = "center", width: t, wrap: n } = {}) {
671
671
  let r = t ? `${t}%` : void 0;
672
672
  if (e === "full") return { width: "100%" };
673
673
  let i = e === "left" || e === "right";
@@ -701,8 +701,8 @@ function we({ align: e = "center", width: t, wrap: n } = {}) {
701
701
  marginRight: "auto"
702
702
  };
703
703
  }
704
- function Te(e = [], t, n) {
705
- let r = n ?? ((e, n) => Y(e, n, t));
704
+ function Ee(e = [], t, n) {
705
+ let r = n ?? ((e, n) => J(e, n, t));
706
706
  return e.map((t, n) => {
707
707
  let i = {
708
708
  marginTop: 0,
@@ -724,7 +724,7 @@ function Te(e = [], t, n) {
724
724
  marginLeft: 0,
725
725
  marginRight: 0,
726
726
  ...i,
727
- ...we(t)
727
+ ...Te(t)
728
728
  },
729
729
  children: [t.href ? /* @__PURE__ */ u("a", {
730
730
  href: t.href,
@@ -743,16 +743,16 @@ function Te(e = [], t, n) {
743
743
  })]
744
744
  }, n);
745
745
  }
746
- if (t.type === "video") return Ie(t.url) ? /* @__PURE__ */ u("div", {
746
+ if (t.type === "video") return Le(t.url) ? /* @__PURE__ */ u("div", {
747
747
  style: {
748
748
  ...i,
749
- ...we({
749
+ ...Te({
750
750
  align: t.align,
751
751
  wrap: t.wrap,
752
752
  width: t.width ?? 100
753
753
  })
754
754
  },
755
- children: /* @__PURE__ */ u(Le, {
755
+ children: /* @__PURE__ */ u(Re, {
756
756
  url: t.url,
757
757
  autoplay: t.autoplay,
758
758
  muted: t.muted,
@@ -781,17 +781,17 @@ function Te(e = [], t, n) {
781
781
  }
782
782
  if (t.type === "quote") return /* @__PURE__ */ u("blockquote", {
783
783
  style: {
784
- ...De,
784
+ ...Oe,
785
785
  ...i
786
786
  },
787
787
  children: r(t.parts, t.text)
788
788
  }, n);
789
- if (Ce[t.type]) {
789
+ if (we[t.type]) {
790
790
  let e = t.type;
791
791
  return /* @__PURE__ */ u(e, {
792
792
  style: {
793
- ...ue,
794
- fontSize: Ce[t.type],
793
+ ...de,
794
+ fontSize: we[t.type],
795
795
  ...i
796
796
  },
797
797
  children: r(t.parts, t.text)
@@ -799,39 +799,39 @@ function Te(e = [], t, n) {
799
799
  }
800
800
  return /* @__PURE__ */ u("p", {
801
801
  style: {
802
- ...de,
802
+ ...fe,
803
803
  ...i
804
804
  },
805
805
  children: r(t.parts, t.text)
806
806
  }, n);
807
807
  });
808
808
  }
809
- function Ee({ content: e, style: t, linked: n, nodeRef: r }) {
809
+ function De({ content: e, style: t, linked: n, nodeRef: r }) {
810
810
  return /* @__PURE__ */ u("div", {
811
811
  ref: r,
812
812
  style: {
813
813
  display: "flow-root",
814
814
  ...h(t)
815
815
  },
816
- children: Te(e, n)
816
+ children: Ee(e, n)
817
817
  });
818
818
  }
819
- var De = {
819
+ var Oe = {
820
820
  margin: 0,
821
821
  padding: "8px 0 8px 20px",
822
822
  borderLeft: "4px solid var(--page-accent, rgba(148, 163, 184, 0.6))"
823
823
  };
824
- function Oe({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
824
+ function ke({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
825
825
  return /* @__PURE__ */ u("blockquote", {
826
826
  ref: i,
827
827
  style: {
828
- ...De,
828
+ ...Oe,
829
829
  ...h(n)
830
830
  },
831
- children: Y(t, e, r)
831
+ children: J(t, e, r)
832
832
  });
833
833
  }
834
- function ke({ ordered: e, items: t = [], style: n, nodeRef: r }) {
834
+ function Ae({ ordered: e, items: t = [], style: n, nodeRef: r }) {
835
835
  return /* @__PURE__ */ u(e ? "ol" : "ul", {
836
836
  ref: r,
837
837
  style: {
@@ -841,53 +841,53 @@ function ke({ ordered: e, items: t = [], style: n, nodeRef: r }) {
841
841
  },
842
842
  children: t.map((e, t) => /* @__PURE__ */ u("li", {
843
843
  style: { marginBottom: 4 },
844
- children: Y(e.parts, e.text)
844
+ children: J(e.parts, e.text)
845
845
  }, t))
846
846
  });
847
847
  }
848
- function Ae({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
848
+ function je({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
849
849
  return /* @__PURE__ */ u("p", {
850
850
  ref: i,
851
851
  style: {
852
- ...de,
852
+ ...fe,
853
853
  ...h(n)
854
854
  },
855
- children: Y(t, e, r)
855
+ children: J(t, e, r)
856
856
  });
857
857
  }
858
- var je = {
858
+ var Me = {
859
859
  color: "var(--page-accent, inherit)",
860
860
  textDecoration: "underline",
861
861
  textUnderlineOffset: 3,
862
862
  cursor: "pointer"
863
863
  };
864
- function Me({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
864
+ function Ne({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
865
865
  return /* @__PURE__ */ u("a", {
866
866
  ref: o,
867
867
  href: n || "#",
868
868
  target: r || void 0,
869
869
  rel: r === "_blank" ? "noopener noreferrer" : void 0,
870
870
  style: {
871
- ...je,
871
+ ...Me,
872
872
  ...h(i)
873
873
  },
874
- children: Y(t, e, a)
874
+ children: J(t, e, a)
875
875
  });
876
876
  }
877
- function Ne({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
877
+ function Pe({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
878
878
  return /* @__PURE__ */ u("a", {
879
879
  ref: o,
880
880
  href: n || "#",
881
881
  target: r || void 0,
882
882
  rel: r === "_blank" ? "noopener noreferrer" : void 0,
883
883
  style: {
884
- ...J,
884
+ ...q,
885
885
  ...h(i)
886
886
  },
887
- children: Y(t, e, a)
887
+ children: J(t, e, a)
888
888
  });
889
889
  }
890
- function Pe({ src: e, alt: t, style: n, nodeRef: r }) {
890
+ function Fe({ src: e, alt: t, style: n, nodeRef: r }) {
891
891
  return e ? /* @__PURE__ */ u("img", {
892
892
  ref: r,
893
893
  src: e,
@@ -899,7 +899,7 @@ function Pe({ src: e, alt: t, style: n, nodeRef: r }) {
899
899
  }
900
900
  }) : null;
901
901
  }
902
- function Fe({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
902
+ function Ie({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
903
903
  return e ? /* @__PURE__ */ u("video", {
904
904
  ref: s,
905
905
  src: e,
@@ -917,9 +917,9 @@ function Fe({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !
917
917
  }
918
918
  }) : null;
919
919
  }
920
- var Ie = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
921
- function Le({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
922
- let c = Ie(e);
920
+ var Le = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
921
+ function Re({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
922
+ let c = Le(e);
923
923
  if (!c) return null;
924
924
  let l = new URLSearchParams({ rel: "0" });
925
925
  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", {
@@ -945,7 +945,7 @@ function Le({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i
945
945
  })
946
946
  });
947
947
  }
948
- function Re({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
948
+ function ze({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
949
949
  return e ? /* @__PURE__ */ u("iframe", {
950
950
  ref: i,
951
951
  src: e,
@@ -961,7 +961,7 @@ function Re({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i })
961
961
  }
962
962
  }) : null;
963
963
  }
964
- function ze({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
964
+ function Be({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
965
965
  let [a, o] = c(null);
966
966
  return i(() => {
967
967
  a && (a.innerHTML = e || "", t && a.querySelectorAll("script").forEach((e) => {
@@ -980,7 +980,7 @@ function ze({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
980
980
  style: h(n)
981
981
  });
982
982
  }
983
- function Be({ height: e, nodeRef: t }) {
983
+ function Ve({ height: e, nodeRef: t }) {
984
984
  return /* @__PURE__ */ u("div", {
985
985
  ref: t,
986
986
  style: {
@@ -990,7 +990,7 @@ function Be({ height: e, nodeRef: t }) {
990
990
  }
991
991
  });
992
992
  }
993
- function Ve({ style: e, nodeRef: t }) {
993
+ function He({ style: e, nodeRef: t }) {
994
994
  return /* @__PURE__ */ u("div", {
995
995
  ref: t,
996
996
  style: {
@@ -1001,7 +1001,7 @@ function Ve({ style: e, nodeRef: t }) {
1001
1001
  }
1002
1002
  });
1003
1003
  }
1004
- var He = {
1004
+ var Ue = {
1005
1005
  position: "absolute",
1006
1006
  top: "50%",
1007
1007
  transform: "translateY(-50%)",
@@ -1018,7 +1018,7 @@ var He = {
1018
1018
  alignItems: "center",
1019
1019
  justifyContent: "center",
1020
1020
  padding: 0
1021
- }, Ue = {
1021
+ }, We = {
1022
1022
  bottom: {
1023
1023
  inset: "auto 0 0 0",
1024
1024
  padding: "40px 24px 20px",
@@ -1037,8 +1037,8 @@ var He = {
1037
1037
  padding: 24,
1038
1038
  textShadow: "0 2px 12px rgba(0, 0, 0, 0.6)"
1039
1039
  }
1040
- }, We = 48;
1041
- function Ge({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: a = 320, swipe: o = !0, style: s, nodeRef: f }) {
1040
+ }, Ge = 48;
1041
+ function Ke({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: a = 320, swipe: o = !0, style: s, nodeRef: f }) {
1042
1042
  let [p, m] = c(0), [g, _] = c(!1), [v, y] = c(null), b = e ? Math.min(p, e - 1) : 0;
1043
1043
  if (i(() => {
1044
1044
  if (!n || g || v || e < 2) return;
@@ -1054,7 +1054,7 @@ function Ge({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1054
1054
  let x = (t) => m((t + e) % e), S = () => {
1055
1055
  if (!v) return;
1056
1056
  let { dx: e } = v;
1057
- y(null), e < -48 ? x(b + 1) : e > We && x(b - 1);
1057
+ y(null), e < -48 ? x(b + 1) : e > Ge && x(b - 1);
1058
1058
  };
1059
1059
  return /* @__PURE__ */ d("div", {
1060
1060
  ref: f,
@@ -1102,7 +1102,7 @@ function Ge({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1102
1102
  type: "button",
1103
1103
  "aria-label": "Previous slide",
1104
1104
  style: {
1105
- ...He,
1105
+ ...Ue,
1106
1106
  left: 12
1107
1107
  },
1108
1108
  onClick: () => x(b - 1),
@@ -1112,7 +1112,7 @@ function Ge({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1112
1112
  type: "button",
1113
1113
  "aria-label": "Next slide",
1114
1114
  style: {
1115
- ...He,
1115
+ ...Ue,
1116
1116
  right: 12
1117
1117
  },
1118
1118
  onClick: () => x(b + 1),
@@ -1146,7 +1146,7 @@ function Ge({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1146
1146
  ] })]
1147
1147
  });
1148
1148
  }
1149
- var Ke = (e, t) => ({
1149
+ var qe = (e, t) => ({
1150
1150
  position: "absolute",
1151
1151
  inset: 0,
1152
1152
  backgroundImage: e ? `url(${e})` : "none",
@@ -1154,18 +1154,18 @@ var Ke = (e, t) => ({
1154
1154
  backgroundSize: "cover",
1155
1155
  backgroundPosition: "center"
1156
1156
  });
1157
- function qe({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
1158
- return e.length ? /* @__PURE__ */ u(Ge, {
1157
+ function Je({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
1158
+ return e.length ? /* @__PURE__ */ u(Ke, {
1159
1159
  ...r,
1160
1160
  count: e.length,
1161
1161
  renderSlide: (r) => {
1162
1162
  let i = e[r];
1163
- return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: Ke(i.image) }), (i.title || i.text) && /* @__PURE__ */ d("div", {
1163
+ return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: qe(i.image) }), (i.title || i.text) && /* @__PURE__ */ d("div", {
1164
1164
  style: {
1165
1165
  position: "absolute",
1166
1166
  color: "#fff",
1167
1167
  textAlign: n,
1168
- ...Ue[t] ?? Ue.bottom
1168
+ ...We[t] ?? We.bottom
1169
1169
  },
1170
1170
  children: [i.title && /* @__PURE__ */ u("div", {
1171
1171
  style: {
@@ -1185,13 +1185,13 @@ function qe({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "
1185
1185
  }
1186
1186
  }) : null;
1187
1187
  }
1188
- function Je({ slides: e = [], linked: t, ...n }) {
1189
- return e.length ? /* @__PURE__ */ u(Ge, {
1188
+ function Ye({ slides: e = [], linked: t, ...n }) {
1189
+ return e.length ? /* @__PURE__ */ u(Ke, {
1190
1190
  ...n,
1191
1191
  count: e.length,
1192
1192
  renderSlide: (n) => {
1193
1193
  let r = e[n];
1194
- return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: Ke(r.image, r.color) }), /* @__PURE__ */ u("div", {
1194
+ return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: qe(r.image, r.color) }), /* @__PURE__ */ u("div", {
1195
1195
  style: {
1196
1196
  position: "absolute",
1197
1197
  inset: 0,
@@ -1203,19 +1203,218 @@ function Je({ slides: e = [], linked: t, ...n }) {
1203
1203
  }
1204
1204
  }) : null;
1205
1205
  }
1206
- var Ye = {
1206
+ function Xe({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lightbox: a = !0, style: o, nodeRef: s, inert: f }) {
1207
+ 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[_];
1208
+ i(() => {
1209
+ if (!y) return;
1210
+ let e = (e) => {
1211
+ e.key === "Escape" && v(null), e.key === "ArrowRight" && v((e) => (e + 1) % p.length), e.key === "ArrowLeft" && v((e) => (e - 1 + p.length) % p.length);
1212
+ };
1213
+ return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
1214
+ }, [y, p.length]);
1215
+ let b = (e) => {
1216
+ if (typeof e.name == "string" && e.name.trim()) return e.name;
1217
+ if (typeof e.alt == "string" && e.alt.trim()) return e.alt;
1218
+ try {
1219
+ let t = String(e.src).split("?")[0].split("/").pop();
1220
+ return decodeURIComponent(t ?? "");
1221
+ } catch {
1222
+ return "";
1223
+ }
1224
+ };
1225
+ return /* @__PURE__ */ d("div", {
1226
+ ref: s,
1227
+ style: {
1228
+ columnCount: Math.min(Math.max(Number(t) || 3, 1), 8),
1229
+ columnGap: m,
1230
+ width: "100%",
1231
+ ...h(o)
1232
+ },
1233
+ children: [
1234
+ p.map((e, t) => {
1235
+ let n = /* @__PURE__ */ d("span", {
1236
+ style: {
1237
+ position: "relative",
1238
+ display: "block",
1239
+ borderRadius: "inherit",
1240
+ overflow: "hidden"
1241
+ },
1242
+ children: [/* @__PURE__ */ u("img", {
1243
+ src: e.src,
1244
+ alt: e.alt ?? "",
1245
+ style: {
1246
+ width: "100%",
1247
+ display: "block",
1248
+ borderRadius: "inherit"
1249
+ }
1250
+ }), r && b(e) && /* @__PURE__ */ u("span", {
1251
+ style: {
1252
+ position: "absolute",
1253
+ insetInline: 0,
1254
+ bottom: 0,
1255
+ padding: "14px 10px 8px",
1256
+ background: "linear-gradient(transparent, rgba(0, 0, 0, 0.65))",
1257
+ color: "#fff",
1258
+ fontSize: 12,
1259
+ lineHeight: 1.3,
1260
+ whiteSpace: "nowrap",
1261
+ overflow: "hidden",
1262
+ textOverflow: "ellipsis"
1263
+ },
1264
+ children: b(e)
1265
+ })]
1266
+ }), i = e.href ? /* @__PURE__ */ u("a", {
1267
+ href: e.href,
1268
+ onClick: g,
1269
+ target: e.target || void 0,
1270
+ rel: e.target === "_blank" ? "noopener noreferrer" : void 0,
1271
+ style: {
1272
+ display: "block",
1273
+ borderRadius: "inherit"
1274
+ },
1275
+ children: n
1276
+ }) : a && !f ? /* @__PURE__ */ u("span", {
1277
+ role: "button",
1278
+ tabIndex: 0,
1279
+ onClick: () => v(t),
1280
+ onKeyDown: (e) => (e.key === "Enter" || e.key === " ") && v(t),
1281
+ style: {
1282
+ display: "block",
1283
+ borderRadius: "inherit",
1284
+ cursor: "zoom-in"
1285
+ },
1286
+ children: n
1287
+ }) : n;
1288
+ return /* @__PURE__ */ u("div", {
1289
+ style: {
1290
+ breakInside: "avoid",
1291
+ marginBottom: m,
1292
+ borderRadius: "inherit",
1293
+ overflow: "hidden"
1294
+ },
1295
+ children: i
1296
+ }, t);
1297
+ }),
1298
+ !p.length && /* @__PURE__ */ u("div", {
1299
+ style: {
1300
+ padding: "24px 12px",
1301
+ fontSize: 13,
1302
+ opacity: .55,
1303
+ textAlign: "center",
1304
+ columnSpan: "all"
1305
+ },
1306
+ children: "Pick images in Settings to fill the gallery"
1307
+ }),
1308
+ y && /* @__PURE__ */ d("div", {
1309
+ role: "dialog",
1310
+ "aria-modal": "true",
1311
+ onClick: () => v(null),
1312
+ style: {
1313
+ position: "fixed",
1314
+ inset: 0,
1315
+ zIndex: 1400,
1316
+ background: "rgba(0, 0, 0, 0.86)",
1317
+ display: "flex",
1318
+ flexDirection: "column",
1319
+ alignItems: "center",
1320
+ justifyContent: "center",
1321
+ padding: 24
1322
+ },
1323
+ children: [
1324
+ /* @__PURE__ */ u("img", {
1325
+ src: p[_].src,
1326
+ alt: p[_].alt ?? "",
1327
+ onClick: (e) => e.stopPropagation(),
1328
+ style: {
1329
+ maxWidth: "92vw",
1330
+ maxHeight: "84vh",
1331
+ borderRadius: 8,
1332
+ boxShadow: "0 12px 48px rgba(0,0,0,0.5)"
1333
+ }
1334
+ }),
1335
+ b(p[_]) && /* @__PURE__ */ u("div", {
1336
+ style: {
1337
+ color: "#fff",
1338
+ fontSize: 14,
1339
+ marginTop: 12,
1340
+ opacity: .85
1341
+ },
1342
+ children: b(p[_])
1343
+ }),
1344
+ /* @__PURE__ */ u("button", {
1345
+ type: "button",
1346
+ "aria-label": "Close",
1347
+ onClick: () => v(null),
1348
+ style: {
1349
+ position: "absolute",
1350
+ top: 16,
1351
+ right: 20,
1352
+ background: "transparent",
1353
+ border: 0,
1354
+ color: "#fff",
1355
+ fontSize: 28,
1356
+ lineHeight: 1,
1357
+ cursor: "pointer"
1358
+ },
1359
+ children: "×"
1360
+ }),
1361
+ p.length > 1 && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("button", {
1362
+ type: "button",
1363
+ "aria-label": "Previous",
1364
+ onClick: (e) => {
1365
+ e.stopPropagation(), v((e) => (e - 1 + p.length) % p.length);
1366
+ },
1367
+ style: {
1368
+ position: "absolute",
1369
+ left: 16,
1370
+ top: "50%",
1371
+ transform: "translateY(-50%)",
1372
+ background: "transparent",
1373
+ border: 0,
1374
+ color: "#fff",
1375
+ fontSize: 36,
1376
+ cursor: "pointer",
1377
+ padding: 12
1378
+ },
1379
+ children: "‹"
1380
+ }), /* @__PURE__ */ u("button", {
1381
+ type: "button",
1382
+ "aria-label": "Next",
1383
+ onClick: (e) => {
1384
+ e.stopPropagation(), v((e) => (e + 1) % p.length);
1385
+ },
1386
+ style: {
1387
+ position: "absolute",
1388
+ right: 16,
1389
+ top: "50%",
1390
+ transform: "translateY(-50%)",
1391
+ background: "transparent",
1392
+ border: 0,
1393
+ color: "#fff",
1394
+ fontSize: 36,
1395
+ cursor: "pointer",
1396
+ padding: 12
1397
+ },
1398
+ children: "›"
1399
+ })] })
1400
+ ]
1401
+ })
1402
+ ]
1403
+ });
1404
+ }
1405
+ var Y = {
1207
1406
  color: "inherit",
1208
1407
  textDecoration: "none",
1209
1408
  fontSize: 14,
1210
1409
  opacity: .85
1211
- }, Xe = {
1410
+ }, Ze = {
1212
1411
  background: "var(--page-bg, #ffffff)",
1213
1412
  color: "var(--page-text, #111827)",
1214
1413
  border: "1px solid rgba(148, 163, 184, 0.25)",
1215
1414
  boxShadow: "0 16px 40px rgba(15, 23, 42, 0.16)",
1216
1415
  zIndex: 60
1217
1416
  };
1218
- function Ze({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], style: s, nodeRef: f, menu: p = "auto", breakpoint: m = 768 }) {
1417
+ function Qe({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], style: s, nodeRef: f, menu: p = "auto", breakpoint: m = 768 }) {
1219
1418
  let [g, _] = c(null), [v, y] = c(!1), [b, x] = c(!1), [S, C] = c(null);
1220
1419
  i(() => {
1221
1420
  if (!g) return;
@@ -1225,7 +1424,7 @@ function Ze({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1225
1424
  let w = p === "hamburger" || p === "auto" && v, T = (e, t) => /* @__PURE__ */ d("a", {
1226
1425
  href: e.href || "#",
1227
1426
  style: {
1228
- ...Ye,
1427
+ ...Y,
1229
1428
  display: "block",
1230
1429
  ...t
1231
1430
  },
@@ -1313,7 +1512,7 @@ function Ze({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1313
1512
  let t = e.children ?? [];
1314
1513
  if (!t.length) return /* @__PURE__ */ u("a", {
1315
1514
  href: e.href || "#",
1316
- style: Ye,
1515
+ style: Y,
1317
1516
  children: e.label
1318
1517
  }, e.key);
1319
1518
  let n = e.type === "mega";
@@ -1327,7 +1526,7 @@ function Ze({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1327
1526
  children: [/* @__PURE__ */ d("a", {
1328
1527
  href: e.href || "#",
1329
1528
  style: {
1330
- ...Ye,
1529
+ ...Y,
1331
1530
  cursor: "pointer"
1332
1531
  },
1333
1532
  children: [
@@ -1343,7 +1542,7 @@ function Ze({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1343
1542
  ]
1344
1543
  }), S === e.key && (n ? /* @__PURE__ */ u("div", {
1345
1544
  style: {
1346
- ...Xe,
1545
+ ...Ze,
1347
1546
  position: "absolute",
1348
1547
  left: 0,
1349
1548
  right: 0,
@@ -1359,7 +1558,7 @@ function Ze({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1359
1558
  }))
1360
1559
  }) : /* @__PURE__ */ u("div", {
1361
1560
  style: {
1362
- ...Xe,
1561
+ ...Ze,
1363
1562
  position: "absolute",
1364
1563
  top: "100%",
1365
1564
  left: 0,
@@ -1388,7 +1587,7 @@ function Ze({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1388
1587
  children: o.map((t) => /* @__PURE__ */ d(e, { children: [/* @__PURE__ */ u("a", {
1389
1588
  href: t.href || "#",
1390
1589
  style: {
1391
- ...Ye,
1590
+ ...Y,
1392
1591
  padding: "10px 4px",
1393
1592
  fontWeight: (t.children ?? []).length ? 600 : 400,
1394
1593
  opacity: 1
@@ -1399,7 +1598,7 @@ function Ze({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1399
1598
  ]
1400
1599
  });
1401
1600
  }
1402
- function Qe({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
1601
+ function $e({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
1403
1602
  let [i, a] = c(0), o = e.length ? Math.min(i, e.length - 1) : 0;
1404
1603
  return e.length ? /* @__PURE__ */ d("div", {
1405
1604
  ref: r,
@@ -1439,7 +1638,7 @@ function Qe({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
1439
1638
  }, e.key))]
1440
1639
  }) : null;
1441
1640
  }
1442
- function $e({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }) {
1641
+ function et({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }) {
1443
1642
  let [a, o] = c(() => new Set(e.length ? [e[0].key] : []));
1444
1643
  if (!e.length) return null;
1445
1644
  let s = (e) => o((t) => {
@@ -1496,7 +1695,7 @@ function $e({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }
1496
1695
  })
1497
1696
  });
1498
1697
  }
1499
- var et = {
1698
+ var tt = {
1500
1699
  display: "flex",
1501
1700
  flexDirection: "column",
1502
1701
  gap: "12px"
@@ -1514,7 +1713,7 @@ var et = {
1514
1713
  boxSizing: "border-box",
1515
1714
  backgroundColor: "#ffffff",
1516
1715
  color: "#111827"
1517
- }, tt = {
1716
+ }, nt = {
1518
1717
  display: "flex",
1519
1718
  alignItems: "center",
1520
1719
  gap: "8px",
@@ -1525,7 +1724,7 @@ var et = {
1525
1724
  tabIndex: -1,
1526
1725
  onMouseDown: (e) => e.preventDefault()
1527
1726
  } : {};
1528
- function nt(e, t) {
1727
+ function rt(e, t) {
1529
1728
  if (!e) return !0;
1530
1729
  let n = t[e.field], r = n == null || n === "" ? "" : String(n), i = e.value ?? "";
1531
1730
  switch (e.op) {
@@ -1539,11 +1738,11 @@ function nt(e, t) {
1539
1738
  default: return !1;
1540
1739
  }
1541
1740
  }
1542
- var rt = {
1741
+ var it = {
1543
1742
  display: "flex",
1544
1743
  flexDirection: "column",
1545
1744
  gap: 6
1546
- }, it = {
1745
+ }, at = {
1547
1746
  font: "inherit",
1548
1747
  fontSize: 15,
1549
1748
  padding: "10px 12px",
@@ -1554,13 +1753,13 @@ var rt = {
1554
1753
  width: "100%",
1555
1754
  boxSizing: "border-box"
1556
1755
  };
1557
- function at(e, t) {
1756
+ function ot(e, t) {
1558
1757
  let n = Array.isArray(e?.options) ? e.options : [];
1559
1758
  if (!e?.parentField) return n;
1560
1759
  let r = t?.[e.parentField];
1561
1760
  return r ? n.filter((e) => typeof e == "string" ? !1 : !e.parent || e.parent === r) : [];
1562
1761
  }
1563
- function ot({ field: e, value: t, onChange: n, inert: r, values: i }) {
1762
+ function st({ field: e, value: t, onChange: n, inert: r, values: i }) {
1564
1763
  let a = /* @__PURE__ */ d("span", {
1565
1764
  style: {
1566
1765
  ...X,
@@ -1572,7 +1771,7 @@ function ot({ field: e, value: t, onChange: n, inert: r, values: i }) {
1572
1771
  required: e.required || void 0,
1573
1772
  placeholder: e.placeholder || void 0,
1574
1773
  disabled: r || void 0,
1575
- style: it,
1774
+ style: at,
1576
1775
  value: t ?? "",
1577
1776
  onChange: (t) => n(e.name, t.target.value)
1578
1777
  };
@@ -1601,7 +1800,7 @@ function ot({ field: e, value: t, onChange: n, inert: r, values: i }) {
1601
1800
  borderRadius: 8,
1602
1801
  display: "block"
1603
1802
  }
1604
- }) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ u(Le, {
1803
+ }) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ u(Re, {
1605
1804
  url: e.src,
1606
1805
  style: { width: "100%" }
1607
1806
  }) : /* @__PURE__ */ u("video", {
@@ -1613,14 +1812,14 @@ function ot({ field: e, value: t, onChange: n, inert: r, values: i }) {
1613
1812
  display: "block"
1614
1813
  }
1615
1814
  }) : null : /* @__PURE__ */ d("label", {
1616
- style: rt,
1815
+ style: it,
1617
1816
  children: [
1618
1817
  a,
1619
1818
  e.type === "textarea" || e.multiline ? /* @__PURE__ */ u("textarea", {
1620
1819
  ...o,
1621
1820
  rows: 4,
1622
1821
  style: {
1623
- ...it,
1822
+ ...at,
1624
1823
  resize: "vertical"
1625
1824
  }
1626
1825
  }) : e.type === "select" ? /* @__PURE__ */ d("select", {
@@ -1629,7 +1828,7 @@ function ot({ field: e, value: t, onChange: n, inert: r, values: i }) {
1629
1828
  children: [/* @__PURE__ */ u("option", {
1630
1829
  value: "",
1631
1830
  children: e.placeholder || "—"
1632
- }), at(e, i).map((e, t) => /* @__PURE__ */ u("option", {
1831
+ }), ot(e, i).map((e, t) => /* @__PURE__ */ u("option", {
1633
1832
  value: typeof e == "string" ? e : e.value,
1634
1833
  children: typeof e == "string" ? e : e.label ?? e.value
1635
1834
  }, t))]
@@ -1676,7 +1875,7 @@ function ot({ field: e, value: t, onChange: n, inert: r, values: i }) {
1676
1875
  ]
1677
1876
  });
1678
1877
  }
1679
- function st({ 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 }) {
1878
+ function ct({ 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 }) {
1680
1879
  let { tenant: b, apiUrl: x } = r(V), [S, C] = c("form"), [w, T] = c(null), [E, D] = c({}), [O, k] = c(0), A = g ? y || "form" : S;
1681
1880
  i(() => {
1682
1881
  if (!f || !s) return;
@@ -1698,9 +1897,9 @@ function st({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
1698
1897
  section: e,
1699
1898
  fields: []
1700
1899
  }) : j[j.length - 1].fields.push(e);
1701
- let M = j.filter((e) => e.section || e.fields.length), N = M.filter((e) => !e.section || nt(e.section.condition, E)).map((e) => ({
1900
+ let M = j.filter((e) => e.section || e.fields.length), N = M.filter((e) => !e.section || rt(e.section.condition, E)).map((e) => ({
1702
1901
  ...e,
1703
- fields: e.fields.filter((e) => nt(e.condition, E))
1902
+ fields: e.fields.filter((e) => rt(e.condition, E))
1704
1903
  })), 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) => {
1705
1904
  let t = E[e.name];
1706
1905
  return e.required && (t == null || t === "" || t === !1);
@@ -1758,11 +1957,11 @@ function st({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
1758
1957
  }
1759
1958
  },
1760
1959
  style: {
1761
- ...et,
1960
+ ...tt,
1762
1961
  display: A === "success" ? "none" : "flex"
1763
1962
  },
1764
1963
  children: f && s ? /* @__PURE__ */ d(l, { children: [
1765
- P && /* @__PURE__ */ u(St, {
1964
+ P && /* @__PURE__ */ u(Ct, {
1766
1965
  steps: N.map((e) => ({ label: e.section?.label ?? "Start" })),
1767
1966
  active: F + 1,
1768
1967
  style: { marginBottom: 8 }
@@ -1775,7 +1974,7 @@ function st({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
1775
1974
  },
1776
1975
  children: N[F].section.help
1777
1976
  }),
1778
- I.map((e) => /* @__PURE__ */ u(ot, {
1977
+ I.map((e) => /* @__PURE__ */ u(st, {
1779
1978
  field: e,
1780
1979
  value: E[e.name],
1781
1980
  values: E,
@@ -1794,7 +1993,7 @@ function st({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
1794
1993
  disabled: g || void 0,
1795
1994
  onClick: () => k(F - 1),
1796
1995
  style: {
1797
- ...J,
1996
+ ...q,
1798
1997
  background: "transparent",
1799
1998
  color: "inherit",
1800
1999
  border: 0,
@@ -1807,7 +2006,7 @@ function st({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
1807
2006
  disabled: g || ee.length > 0,
1808
2007
  onClick: () => k(F + 1),
1809
2008
  style: {
1810
- ...J,
2009
+ ...q,
1811
2010
  border: 0,
1812
2011
  padding: "10px 22px",
1813
2012
  borderRadius: 8,
@@ -1821,7 +2020,7 @@ function st({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
1821
2020
  type: "submit",
1822
2021
  disabled: g || void 0,
1823
2022
  style: {
1824
- ...J,
2023
+ ...q,
1825
2024
  border: 0,
1826
2025
  padding: "10px 22px",
1827
2026
  borderRadius: 8,
@@ -1848,19 +2047,19 @@ function st({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
1848
2047
  ]
1849
2048
  });
1850
2049
  }
1851
- var ct = null, lt = () => ct || (ct = new Promise((e) => {
2050
+ var lt = null, ut = () => lt || (lt = new Promise((e) => {
1852
2051
  if (typeof window > "u") return;
1853
2052
  if (window.grecaptcha?.render) return e(window.grecaptcha);
1854
2053
  window.__webimRecaptchaReady = () => e(window.grecaptcha);
1855
2054
  let t = document.createElement("script");
1856
2055
  t.src = "https://www.google.com/recaptcha/api.js?onload=__webimRecaptchaReady&render=explicit", t.async = !0, document.head.appendChild(t);
1857
- }), ct);
1858
- function ut({ siteKey: e, theme: t, size: n, style: a, nodeRef: o, inert: c }) {
2056
+ }), lt);
2057
+ function dt({ siteKey: e, theme: t, size: n, style: a, nodeRef: o, inert: c }) {
1859
2058
  let l = r(V), f = l?.settings && typeof l.settings == "object" ? l.settings["google.recaptchaKey"] : "", p = typeof e == "string" && e.trim() || (typeof f == "string" ? f.trim() : ""), m = s(null), g = s(!1);
1860
2059
  if (i(() => {
1861
2060
  if (c || !p || g.current || !m.current) return;
1862
2061
  let e = !0;
1863
- return lt().then((r) => {
2062
+ return ut().then((r) => {
1864
2063
  if (!(!e || g.current || !m.current || !r?.render)) {
1865
2064
  g.current = !0;
1866
2065
  try {
@@ -1938,17 +2137,17 @@ function ut({ siteKey: e, theme: t, size: n, style: a, nodeRef: o, inert: c }) {
1938
2137
  children: /* @__PURE__ */ u("div", { ref: m })
1939
2138
  }) : null;
1940
2139
  }
1941
- function dt({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
2140
+ function ft({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
1942
2141
  return /* @__PURE__ */ u("label", {
1943
2142
  ref: r,
1944
2143
  style: {
1945
2144
  ...X,
1946
2145
  ...h(n)
1947
2146
  },
1948
- children: Y(t, e, i)
2147
+ children: J(t, e, i)
1949
2148
  });
1950
2149
  }
1951
- function ft({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
2150
+ function pt({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
1952
2151
  return /* @__PURE__ */ u("input", {
1953
2152
  ref: a,
1954
2153
  type: e,
@@ -1962,7 +2161,7 @@ function ft({ type: e = "text", name: t, placeholder: n, required: r, style: i,
1962
2161
  ...Q(o)
1963
2162
  });
1964
2163
  }
1965
- function pt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
2164
+ function mt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
1966
2165
  return /* @__PURE__ */ u("textarea", {
1967
2166
  ref: a,
1968
2167
  name: e || void 0,
@@ -1977,11 +2176,11 @@ function pt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeR
1977
2176
  ...Q(o)
1978
2177
  });
1979
2178
  }
1980
- function mt({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
2179
+ function ht({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
1981
2180
  return /* @__PURE__ */ d("label", {
1982
2181
  ref: o,
1983
2182
  style: {
1984
- ...tt,
2183
+ ...nt,
1985
2184
  ...h(a)
1986
2185
  },
1987
2186
  children: [/* @__PURE__ */ u("input", {
@@ -1998,7 +2197,7 @@ function mt({ kind: e = "checkbox", label: t, name: n, value: r, required: i, st
1998
2197
  }), t]
1999
2198
  });
2000
2199
  }
2001
- function ht({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
2200
+ function gt({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
2002
2201
  return /* @__PURE__ */ d("select", {
2003
2202
  ref: a,
2004
2203
  name: e || void 0,
@@ -2021,7 +2220,7 @@ function ht({ name: e, placeholder: t, options: n = [], required: r, style: i, n
2021
2220
  }, t))]
2022
2221
  });
2023
2222
  }
2024
- function gt({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
2223
+ function _t({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
2025
2224
  let [s, l] = c(null);
2026
2225
  return /* @__PURE__ */ d("label", {
2027
2226
  ref: a,
@@ -2053,12 +2252,12 @@ function gt({ name: e, accept: t, required: n, text: r = "Choose a file…", sty
2053
2252
  ]
2054
2253
  });
2055
2254
  }
2056
- function _t({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
2255
+ function vt({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
2057
2256
  return /* @__PURE__ */ u("button", {
2058
2257
  ref: n,
2059
2258
  type: r ? "button" : "submit",
2060
2259
  style: {
2061
- ...J,
2260
+ ...q,
2062
2261
  border: 0,
2063
2262
  cursor: "pointer",
2064
2263
  alignSelf: "flex-start",
@@ -2073,7 +2272,7 @@ function _t({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
2073
2272
  children: e
2074
2273
  });
2075
2274
  }
2076
- function vt({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
2275
+ function yt({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
2077
2276
  let a = Math.max(1, (Number(e) || 1) * (Number(t) || 1));
2078
2277
  return /* @__PURE__ */ u("div", {
2079
2278
  ref: r,
@@ -2090,7 +2289,7 @@ function vt({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
2090
2289
  }, t))
2091
2290
  });
2092
2291
  }
2093
- function yt({ 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: _ }) {
2292
+ function bt({ 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: _ }) {
2094
2293
  let { tenant: v, apiUrl: y, locale: b } = r(V), x = r(W), S = r(H), C = S?.[e], w = m ? U(S) : 1, [T, E] = c(null);
2095
2294
  if (i(() => {
2096
2295
  if (!e || C) return;
@@ -2134,7 +2333,7 @@ function yt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
2134
2333
  },
2135
2334
  children: O.map((e) => /* @__PURE__ */ u("div", {
2136
2335
  style: { minWidth: 0 },
2137
- children: x.render(p, (t) => le(t, e))
2336
+ children: x.render(p, (t) => ue(t, e))
2138
2337
  }, e.id ?? e?.data?.slug))
2139
2338
  }) : /* @__PURE__ */ u("div", {
2140
2339
  ref: _,
@@ -2144,7 +2343,7 @@ function yt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
2144
2343
  ...h(g)
2145
2344
  },
2146
2345
  children: O.map((e) => {
2147
- 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";
2346
+ 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";
2148
2347
  return /* @__PURE__ */ d("div", {
2149
2348
  style: {
2150
2349
  display: "flex",
@@ -2191,7 +2390,7 @@ function yt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
2191
2390
  lineHeight: 1.55,
2192
2391
  opacity: .85
2193
2392
  },
2194
- children: Te(a)
2393
+ children: Ee(a)
2195
2394
  })
2196
2395
  ]
2197
2396
  })]
@@ -2199,7 +2398,7 @@ function yt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
2199
2398
  })
2200
2399
  });
2201
2400
  }
2202
- function bt({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
2401
+ function xt({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
2203
2402
  return e.length ? /* @__PURE__ */ u("nav", {
2204
2403
  ref: r,
2205
2404
  "aria-label": "Breadcrumb",
@@ -2249,7 +2448,7 @@ function bt({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
2249
2448
  })
2250
2449
  }) : null;
2251
2450
  }
2252
- function xt({ 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 }) {
2451
+ function St({ 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 }) {
2253
2452
  let { tenant: _, apiUrl: v } = r(V), y = r(H), [b, x] = c(null), S = o ? Number(y?.[`${o}:total`]) : NaN;
2254
2453
  i(() => {
2255
2454
  if (!o || Number.isFinite(S)) return;
@@ -2334,7 +2533,7 @@ function xt({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", sou
2334
2533
  ]
2335
2534
  });
2336
2535
  }
2337
- function St({ steps: t = [], active: n = 1, vertical: r = !1, style: i, nodeRef: a }) {
2536
+ function Ct({ steps: t = [], active: n = 1, vertical: r = !1, style: i, nodeRef: a }) {
2338
2537
  if (!t.length) return null;
2339
2538
  let o = Math.min(Math.max(Number(n) || 1, 1), t.length), s = (e) => ({
2340
2539
  width: 32,
@@ -2412,7 +2611,7 @@ function St({ steps: t = [], active: n = 1, vertical: r = !1, style: i, nodeRef:
2412
2611
  })
2413
2612
  });
2414
2613
  }
2415
- var Ct = {
2614
+ var wt = {
2416
2615
  small: {
2417
2616
  w: 132,
2418
2617
  h: 46,
@@ -2434,10 +2633,10 @@ var Ct = {
2434
2633
  title: 12.5,
2435
2634
  avatar: 46
2436
2635
  }
2437
- }, wt = (e) => Ct[e] ?? Ct.medium;
2438
- Ct.medium.w, Ct.medium.h;
2439
- function Tt(e, { size: t = "medium", horizontal: n = !1 } = {}) {
2440
- 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 = [];
2636
+ }, Tt = (e) => wt[e] ?? wt.medium;
2637
+ wt.medium.w, wt.medium.h;
2638
+ function Et(e, { size: t = "medium", horizontal: n = !1 } = {}) {
2639
+ let r = Tt(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 = [];
2441
2640
  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);
2442
2641
  let d = /* @__PURE__ */ new Map(), f = (e, t) => {
2443
2642
  if (t.has(e.id)) return 0;
@@ -2489,19 +2688,19 @@ function Tt(e, { size: t = "medium", horizontal: n = !1 } = {}) {
2489
2688
  horizontal: n
2490
2689
  };
2491
2690
  }
2492
- var Et = (e, t) => {
2691
+ var Dt = (e, t) => {
2493
2692
  let n = String(e ?? "");
2494
2693
  return n.length > t ? `${n.slice(0, t - 1)}…` : n;
2495
- }, Dt = (e) => {
2694
+ }, Ot = (e) => {
2496
2695
  let t = /^#([0-9a-f]{6}|[0-9a-f]{3})$/i.exec(String(e ?? "").trim());
2497
2696
  if (!t) return "#ffffff";
2498
2697
  let n = t[1];
2499
2698
  n.length === 3 && (n = [...n].map((e) => e + e).join(""));
2500
2699
  let r = parseInt(n, 16);
2501
2700
  return .299 * (r >> 16 & 255) + .587 * (r >> 8 & 255) + .114 * (r & 255) > 150 ? "#111827" : "#ffffff";
2502
- }, Ot = (e) => !!(e?.cv?.trim?.() || e?.photo);
2503
- function kt(e, t = {}) {
2504
- 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);
2701
+ }, kt = (e) => !!(e?.cv?.trim?.() || e?.photo);
2702
+ function At(e, t = {}) {
2703
+ 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);
2505
2704
  return n.map((e) => {
2506
2705
  let n = e.data ?? {}, a = r(n[t.parentField]), o = a && typeof a == "object" ? a.id ?? null : a || null;
2507
2706
  return {
@@ -2515,11 +2714,11 @@ function kt(e, t = {}) {
2515
2714
  };
2516
2715
  });
2517
2716
  }
2518
- var At = {
2717
+ var jt = {
2519
2718
  size: 36,
2520
2719
  pad: 10
2521
2720
  };
2522
- function jt({ node: e, onClose: t }) {
2721
+ function Mt({ node: e, onClose: t }) {
2523
2722
  return i(() => {
2524
2723
  let e = (e) => e.key === "Escape" && t();
2525
2724
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
@@ -2637,7 +2836,7 @@ function jt({ node: e, onClose: t }) {
2637
2836
  })
2638
2837
  });
2639
2838
  }
2640
- function Mt({ 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 }) {
2839
+ function Nt({ 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 }) {
2641
2840
  let x = a(), [S, C] = c(null), { tenant: w, apiUrl: T } = r(V), E = r(H)?.[t], [D, O] = c(null);
2642
2841
  i(() => {
2643
2842
  if (!t || E) return;
@@ -2654,14 +2853,14 @@ function Mt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
2654
2853
  T,
2655
2854
  E
2656
2855
  ]);
2657
- let k = t ? kt(E ?? D ?? [], {
2856
+ let k = t ? At(E ?? D ?? [], {
2658
2857
  nameField: n,
2659
2858
  titleField: o,
2660
2859
  photoField: s,
2661
2860
  parentField: f,
2662
2861
  cvField: p,
2663
2862
  hrefField: m
2664
- }) : e, A = wt(g), { boxes: j, links: M, width: N, height: P } = Tt(k, {
2863
+ }) : e, A = Tt(g), { boxes: j, links: M, width: N, height: P } = Et(k, {
2665
2864
  size: g,
2666
2865
  horizontal: _
2667
2866
  });
@@ -2707,7 +2906,7 @@ function Mt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
2707
2906
  stroke: "rgba(148, 163, 184, 0.7)",
2708
2907
  strokeWidth: "1.5"
2709
2908
  }, t)), j.map(({ node: e, x: t, y: n }) => {
2710
- 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 ? Dt(e.color) : r ? "var(--page-accent-text, #ffffff)" : "var(--page-text, #111827)", c = i ? Dt(e.color2) : s, f = b && (Ot(e) || e.href), p = () => Ot(e) ? C(e) : window.open(e.href, "_blank", "noreferrer"), m = e.photo ? t + At.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);
2909
+ 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 ? Ot(e.color) : r ? "var(--page-accent-text, #ffffff)" : "var(--page-text, #111827)", c = i ? Ot(e.color2) : s, f = b && (kt(e) || e.href), p = () => kt(e) ? C(e) : window.open(e.href, "_blank", "noreferrer"), m = e.photo ? t + jt.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);
2711
2910
  return /* @__PURE__ */ d("g", {
2712
2911
  onClick: f ? p : void 0,
2713
2912
  style: f ? { cursor: "pointer" } : void 0,
@@ -2771,13 +2970,13 @@ function Mt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
2771
2970
  e.photo && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("clipPath", {
2772
2971
  id: `${x}-${e.id}`,
2773
2972
  children: /* @__PURE__ */ u("circle", {
2774
- cx: t + At.pad + A.avatar / 2,
2973
+ cx: t + jt.pad + A.avatar / 2,
2775
2974
  cy: n + A.h / 2,
2776
2975
  r: A.avatar / 2
2777
2976
  })
2778
2977
  }), /* @__PURE__ */ u("image", {
2779
2978
  href: e.photo,
2780
- x: t + At.pad,
2979
+ x: t + jt.pad,
2781
2980
  y: n + (A.h - A.avatar) / 2,
2782
2981
  width: A.avatar,
2783
2982
  height: A.avatar,
@@ -2791,7 +2990,7 @@ function Mt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
2791
2990
  fontSize: A.title,
2792
2991
  fontWeight: "600",
2793
2992
  fill: s,
2794
- children: Et(e.title, g + 4)
2993
+ children: Dt(e.title, g + 4)
2795
2994
  }), e.name && /* @__PURE__ */ u("text", {
2796
2995
  x: m,
2797
2996
  y: n + _ + _ / 2 + A.name * .35,
@@ -2799,7 +2998,7 @@ function Mt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
2799
2998
  fontSize: A.name,
2800
2999
  fontWeight: "600",
2801
3000
  fill: c,
2802
- children: Et(e.name, g)
3001
+ children: Dt(e.name, g)
2803
3002
  })] }) : /* @__PURE__ */ d(l, { children: [v[0] && /* @__PURE__ */ u("text", {
2804
3003
  x: m,
2805
3004
  y: n + (v[1] ? A.h * .43 : A.h * .57),
@@ -2807,7 +3006,7 @@ function Mt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
2807
3006
  fontSize: A.name,
2808
3007
  fontWeight: "600",
2809
3008
  fill: s,
2810
- children: Et(v[0], g)
3009
+ children: Dt(v[0], g)
2811
3010
  }), v[1] && /* @__PURE__ */ u("text", {
2812
3011
  x: m,
2813
3012
  y: n + A.h * .73,
@@ -2815,18 +3014,18 @@ function Mt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
2815
3014
  fontSize: A.title,
2816
3015
  opacity: "0.7",
2817
3016
  fill: s,
2818
- children: Et(v[1], g + 4)
3017
+ children: Dt(v[1], g + 4)
2819
3018
  })] })
2820
3019
  ]
2821
3020
  }, e.id);
2822
3021
  })]
2823
- }), S && /* @__PURE__ */ u(jt, {
3022
+ }), S && /* @__PURE__ */ u(Mt, {
2824
3023
  node: S,
2825
3024
  onClose: () => C(null)
2826
3025
  })]
2827
3026
  });
2828
3027
  }
2829
- function Nt({ 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 }) {
3028
+ function Pt({ 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 }) {
2830
3029
  let { tenant: _, apiUrl: v } = r(V), y = r(H), b = y?.[n], x = f ? U(y) : 1, [S, C] = c(null);
2831
3030
  if (i(() => {
2832
3031
  if (!n || b) return;
@@ -2846,7 +3045,7 @@ function Nt({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped:
2846
3045
  x,
2847
3046
  a
2848
3047
  ]), !e.length) return null;
2849
- 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) => q(K(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 };
3048
+ 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) => K(G(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 };
2850
3049
  return /* @__PURE__ */ u("div", {
2851
3050
  ref: g,
2852
3051
  style: {
@@ -2892,74 +3091,75 @@ function Nt({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped:
2892
3091
  })
2893
3092
  });
2894
3093
  }
2895
- var Pt = {
2896
- PageRoot: ge,
2897
- Section: _e,
2898
- Container: ve,
2899
- Heading: ye,
2900
- TextBlock: Ae,
2901
- ButtonBlock: Ne,
2902
- ImageBlock: Pe,
2903
- Spacer: Be,
2904
- Divider: Ve,
2905
- SliderBlock: qe,
2906
- CanvasSlider: Je,
2907
- TabsBlock: Qe,
2908
- QuickStack: vt,
2909
- CollectionList: yt,
2910
- BreadcrumbsBlock: bt,
2911
- PaginationBlock: xt,
2912
- StepperBlock: St,
2913
- OrgChartBlock: Mt,
2914
- TableBlock: Nt,
2915
- AccordionBlock: $e,
2916
- NavbarBlock: Ze,
2917
- ListBlock: ke,
2918
- TextSpan: Se,
2919
- QuoteBlock: Oe,
2920
- TextLink: Me,
2921
- RichTextBlock: Ee,
2922
- RichContentBlock: Ee,
2923
- VideoBlock: Fe,
2924
- YouTubeBlock: Le,
2925
- IframeBlock: Re,
2926
- EmbedBlock: ze,
2927
- FormBlock: st,
2928
- FormLabel: dt,
2929
- FormInput: ft,
2930
- FormTextarea: pt,
2931
- FormCheckbox: (e) => /* @__PURE__ */ u(mt, {
3094
+ var Ft = {
3095
+ PageRoot: _e,
3096
+ Section: ve,
3097
+ Container: ye,
3098
+ Heading: be,
3099
+ TextBlock: je,
3100
+ ButtonBlock: Pe,
3101
+ ImageBlock: Fe,
3102
+ Spacer: Ve,
3103
+ Divider: He,
3104
+ SliderBlock: Je,
3105
+ CanvasSlider: Ye,
3106
+ TabsBlock: $e,
3107
+ QuickStack: yt,
3108
+ CollectionList: bt,
3109
+ BreadcrumbsBlock: xt,
3110
+ PaginationBlock: St,
3111
+ StepperBlock: Ct,
3112
+ OrgChartBlock: Nt,
3113
+ TableBlock: Pt,
3114
+ MasonryBlock: Xe,
3115
+ AccordionBlock: et,
3116
+ NavbarBlock: Qe,
3117
+ ListBlock: Ae,
3118
+ TextSpan: Ce,
3119
+ QuoteBlock: ke,
3120
+ TextLink: Ne,
3121
+ RichTextBlock: De,
3122
+ RichContentBlock: De,
3123
+ VideoBlock: Ie,
3124
+ YouTubeBlock: Re,
3125
+ IframeBlock: ze,
3126
+ EmbedBlock: Be,
3127
+ FormBlock: ct,
3128
+ FormLabel: ft,
3129
+ FormInput: pt,
3130
+ FormTextarea: mt,
3131
+ FormCheckbox: (e) => /* @__PURE__ */ u(ht, {
2932
3132
  kind: "checkbox",
2933
3133
  ...e
2934
3134
  }),
2935
- FormRadio: (e) => /* @__PURE__ */ u(mt, {
3135
+ FormRadio: (e) => /* @__PURE__ */ u(ht, {
2936
3136
  kind: "radio",
2937
3137
  ...e
2938
3138
  }),
2939
- FormSelect: ht,
2940
- FormFile: gt,
2941
- FormRecaptcha: ut,
2942
- FormSubmit: _t
2943
- }, Ft = {
3139
+ FormSelect: gt,
3140
+ FormFile: _t,
3141
+ FormRecaptcha: dt,
3142
+ FormSubmit: vt
3143
+ }, It = {
2944
3144
  id: "auth",
2945
3145
  label: "Accounts",
2946
3146
  category: "Apps",
2947
3147
  keys: ["SiteLoginForm", "SiteAccountMenu"],
2948
3148
  ssr: "shell",
2949
3149
  settings: ["apps.auth.redirect"]
2950
- }, It = t({
3150
+ }, Lt = t({
2951
3151
  user: null,
2952
3152
  status: "idle",
2953
3153
  ensure: () => {},
2954
3154
  refresh: () => {},
2955
3155
  signOut: () => {}
2956
- }), Lt = () => {
2957
- let e = r(It);
3156
+ }), Rt = () => {
3157
+ let e = r(Lt);
2958
3158
  return i(() => {
2959
3159
  e.ensure();
2960
3160
  }, [e]), e;
2961
3161
  };
2962
- function Rt({ children: e, initialUser: t, disabled: i, apiUrl: a, tenant: l }) {
3162
+ function zt({ children: e, initialUser: t, disabled: i, apiUrl: a, tenant: l }) {
2963
3163
  let d = r(V), 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}`, {
2964
3164
  ...t,
2965
3165
  credentials: "include",
@@ -2992,18 +3192,18 @@ function Rt({ children: e, initialUser: t, disabled: i, apiUrl: a, tenant: l })
2992
3192
  b,
2993
3193
  x
2994
3194
  ]);
2995
- return /* @__PURE__ */ u(It.Provider, {
3195
+ return /* @__PURE__ */ u(Lt.Provider, {
2996
3196
  value: C,
2997
3197
  children: e
2998
3198
  });
2999
3199
  }
3000
- function zt({ when: e, children: t }) {
3001
- let { status: n } = Lt();
3200
+ function Bt({ when: e, children: t }) {
3201
+ let { status: n } = Rt();
3002
3202
  return !e || e === "always" ? t : n === "idle" || n === "loading" ? null : e === "user" == (n === "user") ? t : null;
3003
3203
  }
3004
3204
  //#endregion
3005
3205
  //#region ../ui/src/components/builder/apps/auth/views.jsx
3006
- function Bt({ 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 }) {
3206
+ function Vt({ 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 }) {
3007
3207
  let { tenant: g, apiUrl: _, settings: v } = r(V), [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) => {
3008
3208
  if (e.preventDefault(), f) return;
3009
3209
  let n = new FormData(e.currentTarget);
@@ -3095,7 +3295,7 @@ function Bt({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
3095
3295
  type: f ? "button" : "submit",
3096
3296
  disabled: C || void 0,
3097
3297
  style: {
3098
- ...J,
3298
+ ...q,
3099
3299
  border: 0,
3100
3300
  padding: "10px 22px",
3101
3301
  borderRadius: 8,
@@ -3127,8 +3327,8 @@ function Bt({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
3127
3327
  ]
3128
3328
  });
3129
3329
  }
3130
- function Vt({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
3131
- let { user: c, status: l, signOut: f } = Lt(), p = a ? s || "user" : l, m = a ? {
3330
+ function Ht({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
3331
+ let { user: c, status: l, signOut: f } = Rt(), p = a ? s || "user" : l, m = a ? {
3132
3332
  name: "Ada Lovelace",
3133
3333
  email: "ada@example.com"
3134
3334
  } : c;
@@ -3169,7 +3369,7 @@ function Vt({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
3169
3369
  type: "button",
3170
3370
  onClick: a ? void 0 : f,
3171
3371
  style: {
3172
- ...J,
3372
+ ...q,
3173
3373
  border: 0,
3174
3374
  padding: "8px 16px",
3175
3375
  borderRadius: 8,
@@ -3193,16 +3393,99 @@ function Vt({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
3193
3393
  }
3194
3394
  //#endregion
3195
3395
  //#region ../ui/src/components/builder/apps/index.js
3196
- var Ht = [Ft], Ut = {
3197
- SiteLoginForm: Bt,
3198
- SiteAccountMenu: Vt
3396
+ var Ut = [It], Wt = {
3397
+ SiteLoginForm: Vt,
3398
+ SiteAccountMenu: Ht
3199
3399
  };
3200
- new Set(Ht.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
3400
+ new Set(Ut.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
3401
+ //#endregion
3402
+ //#region ../ui/src/components/builder/plugins/runtime.js
3403
+ var Gt = /* @__PURE__ */ new Map();
3404
+ function Kt(e) {
3405
+ if (Gt.has(e)) return Gt.get(e);
3406
+ let t = URL.createObjectURL(new Blob([e], { type: "text/javascript" })), n = import(
3407
+ /* @vite-ignore */
3408
+ /* webpackIgnore: true */
3409
+ t
3410
+ ).finally(() => URL.revokeObjectURL(t));
3411
+ return Gt.set(e, n), n;
3412
+ }
3413
+ function qt(e) {
3414
+ let t = e && typeof e == "object" ? e.builder_plugins : null, n = t && typeof t == "object" ? t.plugins : null;
3415
+ return n && typeof n == "object" ? n : {};
3416
+ }
3417
+ //#endregion
3418
+ //#region ../ui/src/components/builder/plugins/view.jsx
3419
+ async function Jt(e, t) {
3420
+ let n = await Kt(e);
3421
+ return (Array.isArray(n?.default?.blocks) ? n.default.blocks : []).find((e) => e?.id === t && typeof e.mount == "function") ?? null;
3422
+ }
3423
+ var Yt = {
3424
+ padding: "10px 12px",
3425
+ border: "1px dashed rgba(148, 163, 184, 0.5)",
3426
+ borderRadius: 8,
3427
+ fontSize: 12,
3428
+ opacity: .6
3429
+ };
3430
+ function Xt({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
3431
+ let c = r(V), l = qt(c?.settings)[e], f = s(null), p = s(null), m = {
3432
+ tenant: c?.tenant ?? "",
3433
+ apiUrl: c?.apiUrl ?? "/api",
3434
+ locale: c?.locale ?? "",
3435
+ settings: c?.settings ?? null
3436
+ }, g = s(m);
3437
+ g.current = m;
3438
+ let _ = JSON.stringify(n ?? {});
3439
+ return i(() => {
3440
+ let e = f.current;
3441
+ if (!l?.code || !e) return;
3442
+ let n = !0;
3443
+ return Jt(l.code, t).then((e) => {
3444
+ if (!(!n || !e || !f.current)) {
3445
+ p.current = e;
3446
+ try {
3447
+ e.mount(f.current, JSON.parse(_), g.current);
3448
+ } catch {
3449
+ p.current = null;
3450
+ }
3451
+ }
3452
+ }).catch(() => {}), () => {
3453
+ n = !1;
3454
+ let t = p.current;
3455
+ p.current = null;
3456
+ try {
3457
+ t?.unmount?.(e);
3458
+ } catch {}
3459
+ e && (e.innerHTML = "");
3460
+ };
3461
+ }, [l?.code, t]), i(() => {
3462
+ let e = p.current, t = f.current;
3463
+ if (!(!e || !t)) try {
3464
+ e.update ? e.update(t, JSON.parse(_), g.current) : (e.unmount?.(t), t.innerHTML = "", e.mount(t, JSON.parse(_), g.current));
3465
+ } catch {}
3466
+ }, [_]), l ? /* @__PURE__ */ u("div", {
3467
+ ref: o,
3468
+ style: h(a),
3469
+ children: /* @__PURE__ */ u("div", { ref: f })
3470
+ }) : /* @__PURE__ */ d("div", {
3471
+ ref: o,
3472
+ style: {
3473
+ ...Yt,
3474
+ ...h(a)
3475
+ },
3476
+ children: [
3477
+ "Plugin “",
3478
+ e,
3479
+ "” is not installed"
3480
+ ]
3481
+ });
3482
+ }
3201
3483
  //#endregion
3202
3484
  //#region ../ui/src/components/builder/render.jsx
3203
- var Wt = {
3204
- ...Pt,
3205
- ...Ut
3485
+ var Zt = {
3486
+ ...Ft,
3487
+ ...Wt,
3488
+ PluginBlock: Xt
3206
3489
  };
3207
3490
  function $(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
3208
3491
  let o = n[t];
@@ -3214,7 +3497,7 @@ function $(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
3214
3497
  let c = new Set(i).add(n);
3215
3498
  return /* @__PURE__ */ u(e, { children: $(s.template.rootId, s.template.nodes, r, c, a) }, t);
3216
3499
  }
3217
- let l = Wt[s];
3500
+ let l = Zt[s];
3218
3501
  if (!l) return null;
3219
3502
  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, {
3220
3503
  ...c,
@@ -3225,15 +3508,15 @@ function $(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
3225
3508
  },
3226
3509
  children: d.length ? d : void 0
3227
3510
  }, t);
3228
- return c.when && c.when !== "always" ? /* @__PURE__ */ u(zt, {
3511
+ return c.when && c.when !== "always" ? /* @__PURE__ */ u(Bt, {
3229
3512
  when: c.when,
3230
3513
  children: m
3231
3514
  }, t) : m;
3232
3515
  }
3233
3516
  //#endregion
3234
3517
  //#region ../ui/src/components/builder/PageRenderer.jsx
3235
- var Gt = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" ");
3236
- function Kt({ 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 }) {
3518
+ var Qt = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" ");
3519
+ function $t({ 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 }) {
3237
3520
  let _ = s?.js?.trim();
3238
3521
  if (i(() => {
3239
3522
  if (!_) return;
@@ -3259,7 +3542,7 @@ function Kt({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
3259
3542
  locale: p || "",
3260
3543
  settings: h ?? null
3261
3544
  },
3262
- children: /* @__PURE__ */ u(Rt, {
3545
+ children: /* @__PURE__ */ u(zt, {
3263
3546
  initialUser: g,
3264
3547
  children: /* @__PURE__ */ u(H.Provider, {
3265
3548
  value: f ?? null,
@@ -3294,7 +3577,7 @@ function Kt({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
3294
3577
  locale: p || "",
3295
3578
  settings: h ?? null
3296
3579
  },
3297
- children: /* @__PURE__ */ u(Rt, {
3580
+ children: /* @__PURE__ */ u(zt, {
3298
3581
  initialUser: g,
3299
3582
  children: /* @__PURE__ */ u(H.Provider, {
3300
3583
  value: f ?? null,
@@ -3309,8 +3592,8 @@ function Kt({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
3309
3592
  ...a
3310
3593
  },
3311
3594
  children: [
3312
- /* @__PURE__ */ u("style", { children: `.webim-page { ${Gt(F(k.light))} }
3313
- @media (prefers-color-scheme: dark) { .webim-page { ${Gt(F(k.dark))} } }` }),
3595
+ /* @__PURE__ */ u("style", { children: `.webim-page { ${Qt(F(k.light))} }
3596
+ @media (prefers-color-scheme: dark) { .webim-page { ${Qt(F(k.dark))} } }` }),
3314
3597
  O,
3315
3598
  /* @__PURE__ */ u("style", { children: y }),
3316
3599
  C && /* @__PURE__ */ u("style", { children: C }),
@@ -3326,8 +3609,8 @@ function Kt({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
3326
3609
  }
3327
3610
  //#endregion
3328
3611
  //#region src/WebimContent.jsx
3329
- function qt({ bundle: e, mode: t = "auto", style: n }) {
3330
- return e?.blocks?.ROOT ? /* @__PURE__ */ u(Kt, {
3612
+ function en({ bundle: e, mode: t = "auto", style: n }) {
3613
+ return e?.blocks?.ROOT ? /* @__PURE__ */ u($t, {
3331
3614
  blocks: e.blocks,
3332
3615
  theme: e.theme,
3333
3616
  components: e.components,
@@ -3344,7 +3627,7 @@ function qt({ bundle: e, mode: t = "auto", style: n }) {
3344
3627
  }
3345
3628
  //#endregion
3346
3629
  //#region src/WebimPage.jsx
3347
- function Jt({ 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 }) {
3630
+ function tn({ 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 }) {
3348
3631
  let [g, _] = c({ status: "loading" }), v = s({
3349
3632
  onLoad: m,
3350
3633
  onError: h
@@ -3381,11 +3664,11 @@ function Jt({ apiUrl: e, tenant: t, slug: n, locale: r, preview: a, token: o, mo
3381
3664
  r,
3382
3665
  a,
3383
3666
  o
3384
- ]), g.status === "loading" ? f : g.status === "error" ? typeof p == "function" ? p(g.error) : p : /* @__PURE__ */ u(qt, {
3667
+ ]), g.status === "loading" ? f : g.status === "error" ? typeof p == "function" ? p(g.error) : p : /* @__PURE__ */ u(en, {
3385
3668
  bundle: g.bundle,
3386
3669
  mode: l,
3387
3670
  style: d
3388
3671
  });
3389
3672
  }
3390
3673
  //#endregion
3391
- export { Kt as PageRenderer, qt as WebimContent, Jt as WebimPage, z as fetchPage, Te as renderRichContent, L as resolveTheme };
3674
+ export { $t as PageRenderer, en as WebimContent, tn as WebimPage, z as fetchPage, Ee as renderRichContent, L as resolveTheme };